Skip to content

feat: add backlog init command#88

Merged
tkstang merged 21 commits intomainfrom
backlog-init
Mar 21, 2026
Merged

feat: add backlog init command#88
tkstang merged 21 commits intomainfrom
backlog-init

Conversation

@tkstang
Copy link
Copy Markdown
Owner

@tkstang tkstang commented Mar 21, 2026

feat: add backlog init command

Summary

This adds an explicit oat backlog init command for repositories that have OAT installed but do not yet have the local file-backed backlog structure. The command scaffolds the canonical backlog directories and starter files, preserves curated content on rerun, and now keeps the empty backlog directories versionable across git round-trips. Because this was delivered in quick mode, the PR is grounded in discovery.md, plan.md, and implementation.md rather than a separate spec/design pair.

Goals / Non-Goals

  • Goal: add a first-class CLI entry point for creating .oat/repo/reference/backlog/, items/, archived/, index.md, and completed.md.
  • Goal: keep the scaffold idempotent so reruns do not clobber curated backlog content.
  • Goal: prove the scaffold works with existing backlog flows, especially oat backlog regenerate-index.
  • Non-goal: change oat-pjm-* skills or add automatic backlog initialization behavior.
  • Non-goal: introduce any remote project-management integration behavior.

Changes

  • Added packages/cli/src/commands/backlog/init.ts with reusable scaffold logic and starter content for index.md and completed.md.
  • Wired oat backlog init into the backlog command group with --backlog-root, text output, and JSON output in packages/cli/src/commands/backlog/index.ts.
  • Added helper-level regression coverage in packages/cli/src/commands/backlog/init.test.ts.
  • Added compatibility coverage in packages/cli/src/commands/backlog/regenerate-index.test.ts, including a commit/clone round-trip that verifies the scaffold remains usable without rerunning init.
  • Added command-level coverage in packages/cli/src/commands/backlog/index.test.ts for default root resolution, --backlog-root, JSON output, and exit-code behavior.
  • Seeded .gitkeep placeholders so empty items/ and archived/ directories survive normal git workflows.

Verification

  • pnpm --filter @oat/cli test -- src/commands/backlog/init.test.ts
  • pnpm --filter @oat/cli test -- src/commands/help-snapshots.test.ts
  • pnpm --filter @oat/cli test -- src/commands/backlog/init.test.ts src/commands/backlog/regenerate-index.test.ts src/commands/help-snapshots.test.ts && pnpm type-check
  • pnpm --filter @oat/cli test -- src/commands/backlog/init.test.ts src/commands/backlog/regenerate-index.test.ts
  • pnpm --filter @oat/cli test -- src/commands/backlog/index.test.ts src/commands/backlog/init.test.ts src/commands/backlog/regenerate-index.test.ts
  • pnpm test
  • pnpm lint
  • pnpm type-check
  • pnpm build

Reviews

Scope Type Status Date Artifact
final code passed 2026-03-20 reviews/archived/final-review-2026-03-20-v2.md

References

@tkstang tkstang merged commit 7927602 into main Mar 21, 2026
1 check passed
@tkstang tkstang deleted the backlog-init branch March 21, 2026 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant