WORK-029
ID:WORK-029Status:done

plan init and plan create Commands

Priority:mediumComplexity:simpleSource:SPEC-022

Criteria completion

Criteria completion: 7 of 7 (100%) checked; history from Mar 22 to Mar 230%25%50%75%100%Mar 22Mar 23
Branches 3
History 4
  1. e900a90
    Created (done)by bjornolofandersson
  2. f262d7b
    Content editedby Claude
  3. bae844c
    • ☑ `plan init` creates `plan/work/`, `plan/spec/`, `plan/decision/` directories
    • ☑ `plan init` generates example files (work item, decision, spec) and starter `index.md`
    • ☑ `plan init` appends workflow section to CLAUDE.md (or creates one) including `next`/`update`/`status` commands
    • ☑ `plan create work --id WORK-XXX --title "..."` scaffolds a work item from template
    • ☑ `plan create` supports all 5 types: work, bug, decision, spec, milestone
    • ☑ Templates include all required sections per `plan/CLAUDE.md` structure
    • ☑ Tests for directory creation, file generation, and template rendering
    by Claude
  4. 30b2ae0
    Created (ready)by Claude
    Add 9 work items for SPEC-022 (Plan CLI) implementation

Summary

Scaffolding commands that create plan directories and template files. init sets up the full plan structure in a new project. create scaffolds individual plan items from templates. Neither command needs the scanner — they only write files.

Acceptance Criteria

  • plan init creates plan/work/, plan/spec/, plan/decision/ directories
  • plan init generates example files (work item, decision, spec) and starter index.md
  • plan init appends workflow section to CLAUDE.md (or creates one) including next/update/status commands
  • plan create work --id WORK-XXX --title "..." scaffolds a work item from template
  • plan create supports all 5 types: work, bug, decision, spec, milestone
  • Templates include all required sections per plan/CLAUDE.md structure
  • Tests for directory creation, file generation, and template rendering

Approach

Templates live in runes/plan/src/templates/ as string constants (not separate files). Each template is a function that accepts attributes and returns a Markdoc string. init calls create internally for its example files.

Dependencies

  • WORK-027 (plugin architecture — so commands can be registered)

References

  • SPEC-022 (Plan CLI)
  • plan/CLAUDE.md (required content structure)