Skip to content

Repository scaffolding: Go module, layout, Makefile, LICENSE #2

Description

@Saber5656

Title

Repository scaffolding: Go module, layout, Makefile, LICENSE

Summary

Initialize the Go module and the fixed directory skeleton from DESIGN.md
§3.2, add a Makefile with the standard developer targets, a .gitignore, an
.editorconfig, and the LICENSE file, so that every later issue lands into a
stable layout with working make build / make test.

Context

The repository currently contains only README.md. All 32 later issues
assume the module path, directory layout, and Make targets defined here.
DESIGN.md §3.3 fixes the dependency policy (stdlib + BurntSushi/toml only).

Prerequisite for the implementing agent (environment setup, NOT part of this
issue's deliverables): a Go toolchain ≥ 1.23 must be available
(go version). On the reference macOS machine Go is NOT yet installed;
installing it (e.g. brew install go) is explicitly permitted setup work,
performed before starting, with the installed version recorded in the PR
description. The repository-scoped acceptance criteria below apply to the
issue's deliverables only, not to toolchain installation.

Scope

  • go.mod — module github.com/Saber5656/worklog, go 1.23.
  • Directory skeleton with placeholder doc.go files (package comment only)
    for: cmd/worklog, internal/cli, internal/config, internal/timeutil,
    internal/model, internal/sanitize, internal/redact,
    internal/source, internal/source/jsonlutil, internal/source/zsh,
    internal/source/gitsrc, internal/source/claudecode,
    internal/source/codex, internal/aggregate, internal/render,
    internal/llm, internal/output, internal/version.
  • cmd/worklog/main.go — prints worklog: not yet implemented to stderr and
    exits 2 (replaced by issue 07).
  • internal/version/version.govar Version = "dev", var Commit = ""
    (populated via -ldflags later).
  • Makefile — targets: build (go build -trimpath -o bin/worklog ./cmd/worklog), test (go test -race ./...), lint
    (gofmt -l . && go vet ./...; golangci-lint added by issue 02), clean.
  • .gitignorebin/, coverage files, .DS_Store.
  • .editorconfig — tabs for .go, spaces(2) for .yml/.md, final newline.
  • LICENSE — MIT, copyright 2026 Saber5656 (per ADR-005; flagged as
    pending final user confirmation before the repo goes public — do NOT
    publish the repository in this issue).

Detailed Requirements

  1. go.mod must not declare any require yet (BurntSushi/toml is added by
    issue 05 when first imported).
  2. Every internal/... placeholder package must contain exactly one
    doc.go with a one-sentence package comment matching its DESIGN.md §3.2
    role, so go build ./... compiles the full tree from day one.
  3. main.go must contain no logic besides the stderr message and
    os.Exit(2).
  4. Makefile must work on macOS (BSD make compatibility: no GNU-only
    features) and print the binary path on make build success.
  5. Do not create docs/ content, CI files (issue 02), or any parser code.

Acceptance Criteria

  • go build ./... and make build succeed on a clean checkout.
  • ./bin/worklog exits with code 2 and prints the placeholder line to
    stderr, nothing to stdout.
  • make test passes (no tests yet ⇒ passes trivially).
  • gofmt -l . prints nothing.
  • go.mod has zero dependencies; module path is exactly
    github.com/Saber5656/worklog.
  • LICENSE file is valid MIT text with the correct year/holder — ONLY if
    the user has confirmed MIT by then (ADR-005 open question; the repo
    is already public, so pushing an unconfirmed license would publish a
    wrong legal statement. If unconfirmed, skip the LICENSE file and note
    it in the PR).
  • No file outside the repository is created or modified by this issue's
    deliverables (toolchain installation done as a prerequisite is exempt).

Validation

Run and paste into the PR: go version, make build && ./bin/worklog; echo "exit=$?", make test, gofmt -l .. Verify the directory tree matches
DESIGN.md §3.2 with find . -name doc.go | sort.

Dependencies

None (first issue).

Non-goals

CI (02), real CLI dispatch (07), any parsing/rendering logic, README rewrite
(31), release tooling (32), changing repository visibility (the repo is
already public).

Design References

  • docs/DESIGN.md §3.2 (module layout), §3.3 (dependency policy), §16
  • docs/decisions/ADR-001-go-and-dependency-policy.md
  • docs/decisions/ADR-005-licensing-and-distribution.md

Source of truth: docs/issues/01-repo-scaffolding.md (PR #1, branch docs/v1-design). If this issue and the repo docs disagree, the docs win. Execution order and dependencies: docs/ISSUE_PLAN.md (this is issue 01 of 33).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions