@eeshaai/code 0.0.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/LICENSE.md +115 -0
  2. package/README.md +322 -0
  3. package/dist/THIRD-PARTY-NOTICES.md +23 -0
  4. package/dist/claude-agent-sdk/LICENSE.md +1 -0
  5. package/dist/claude-agent-sdk/sdk.mjs +156 -0
  6. package/dist/cli.js +23 -0
  7. package/dist/pluginWorker.js +1610 -0
  8. package/dist/resources/styles/custom/instructions/design.md +284 -0
  9. package/dist/resources/styles/custom/instructions/requirements.md +161 -0
  10. package/dist/resources/styles/custom/instructions/tasks-implement.md +90 -0
  11. package/dist/resources/styles/custom/instructions/tasks.md +159 -0
  12. package/dist/resources/styles/custom/process.md +49 -0
  13. package/dist/resources/styles/custom/prompts/first.md +29 -0
  14. package/dist/resources/styles/custom/prompts/implement.md +27 -0
  15. package/dist/resources/styles/custom/prompts/rewrite-note.md +40 -0
  16. package/dist/resources/styles/custom/prompts/rewrite.md +32 -0
  17. package/dist/resources/styles/custom/style.yml +46 -0
  18. package/dist/resources/styles/grammar.md +731 -0
  19. package/dist/server.js +839 -0
  20. package/dist/web/chunks/abnfDiagram-VCTEODGH-6KC3BO47.js +2 -0
  21. package/dist/web/chunks/architecture-7GRP2DOG-JLXNDD4H.js +2 -0
  22. package/dist/web/chunks/architectureDiagram-5GKGNRK7-QKPCVOD2.js +37 -0
  23. package/dist/web/chunks/blockDiagram-I7D4REHJ-4XZWNXLB.js +130 -0
  24. package/dist/web/chunks/c4Diagram-7LVT6UL2-4HJHKNE3.js +39 -0
  25. package/dist/web/chunks/chunk-2DLEMZHM.js +33 -0
  26. package/dist/web/chunks/chunk-2RFQIKC6.js +232 -0
  27. package/dist/web/chunks/chunk-37NHO5VO.js +2 -0
  28. package/dist/web/chunks/chunk-46RPN6IE.js +3 -0
  29. package/dist/web/chunks/chunk-4IPDIKAU.js +2 -0
  30. package/dist/web/chunks/chunk-4KP3BIPB.js +2 -0
  31. package/dist/web/chunks/chunk-4S2DRQJ6.js +340 -0
  32. package/dist/web/chunks/chunk-4TORDSRR.js +2 -0
  33. package/dist/web/chunks/chunk-5KNOHX5X.js +15 -0
  34. package/dist/web/chunks/chunk-6FQEBIA3.js +133 -0
  35. package/dist/web/chunks/chunk-6KSWTVXD.js +3 -0
  36. package/dist/web/chunks/chunk-6TGTE6CF.js +2 -0
  37. package/dist/web/chunks/chunk-6URXM4C4.js +2 -0
  38. package/dist/web/chunks/chunk-6VRLULJH.js +2 -0
  39. package/dist/web/chunks/chunk-7XAOOQR4.js +2 -0
  40. package/dist/web/chunks/chunk-BUZPUGIT.js +2 -0
  41. package/dist/web/chunks/chunk-DIRT34TZ.js +2 -0
  42. package/dist/web/chunks/chunk-FGASMJTA.js +4 -0
  43. package/dist/web/chunks/chunk-FNIFXWXL.js +2 -0
  44. package/dist/web/chunks/chunk-FPLIRG3U.js +73 -0
  45. package/dist/web/chunks/chunk-GQPX4EIC.js +11 -0
  46. package/dist/web/chunks/chunk-HAKJ3AUV.js +2 -0
  47. package/dist/web/chunks/chunk-HBEUVMXY.js +2 -0
  48. package/dist/web/chunks/chunk-HNYXDXPN.js +63 -0
  49. package/dist/web/chunks/chunk-HX7W7GSO.js +2 -0
  50. package/dist/web/chunks/chunk-II6WN3ZG.js +2 -0
  51. package/dist/web/chunks/chunk-JOSXY3EP.js +169 -0
  52. package/dist/web/chunks/chunk-L34PKG4P.js +2 -0
  53. package/dist/web/chunks/chunk-LDXBIOBF.js +2 -0
  54. package/dist/web/chunks/chunk-LHNPPNB7.js +3 -0
  55. package/dist/web/chunks/chunk-LQ6CTWX6.js +2 -0
  56. package/dist/web/chunks/chunk-LSVIQRSY.js +2 -0
  57. package/dist/web/chunks/chunk-M3SWKTLZ.js +2 -0
  58. package/dist/web/chunks/chunk-MBZYSJFT.js +2 -0
  59. package/dist/web/chunks/chunk-MZEMPN3C.js +2 -0
  60. package/dist/web/chunks/chunk-OODDZ447.js +2 -0
  61. package/dist/web/chunks/chunk-OXLTOJNY.js +3 -0
  62. package/dist/web/chunks/chunk-PR453BYT.js +2 -0
  63. package/dist/web/chunks/chunk-QNEZP2TE.js +179 -0
  64. package/dist/web/chunks/chunk-R7TFKRNM.js +2 -0
  65. package/dist/web/chunks/chunk-T4HEWXAQ.js +2 -0
  66. package/dist/web/chunks/chunk-TPXX77KB.js +2 -0
  67. package/dist/web/chunks/chunk-TPYBIPJG.js +2 -0
  68. package/dist/web/chunks/chunk-TXNHMPKM.js +89 -0
  69. package/dist/web/chunks/chunk-VAKN3BTM.js +2 -0
  70. package/dist/web/chunks/chunk-VY4GEFSG.js +2 -0
  71. package/dist/web/chunks/chunk-XBYCKXUJ.js +207 -0
  72. package/dist/web/chunks/chunk-YM7LHP34.js +16 -0
  73. package/dist/web/chunks/classDiagram-ZZMXUADV-4J5HHZD6.js +2 -0
  74. package/dist/web/chunks/classDiagram-v2-VYDZK3BY-X6WY2DAS.js +2 -0
  75. package/dist/web/chunks/cose-bilkent-JH36ORCC-ZPRW5JRW.js +2 -0
  76. package/dist/web/chunks/cynefin-OW5HDTMX-SVVTQRRB.js +2 -0
  77. package/dist/web/chunks/cynefinDiagram-5FMLGOSQ-O7GURHJG.js +63 -0
  78. package/dist/web/chunks/dagre-GXQ25YYZ-WK67O4N6.js +5 -0
  79. package/dist/web/chunks/diagram-S7CK7UJ4-2CEO2EN2.js +31 -0
  80. package/dist/web/chunks/diagram-UQ7AKVKN-2Z4VHGF3.js +42 -0
  81. package/dist/web/chunks/diagram-VSXAHHWV-AN4BOWYB.js +4 -0
  82. package/dist/web/chunks/diagram-VX7I27RA-VEZ2GXCM.js +25 -0
  83. package/dist/web/chunks/diagram-Z3DM3KII-TGGNDSLW.js +25 -0
  84. package/dist/web/chunks/ebnfDiagram-PWID7BFC-7RM57IJV.js +2 -0
  85. package/dist/web/chunks/erDiagram-RLTQ6QDP-LCATC3YT.js +100 -0
  86. package/dist/web/chunks/eventmodeling-NTZA5JFV-2SR57JAH.js +2 -0
  87. package/dist/web/chunks/flowDiagram-HODETNUW-HU6Y2EYQ.js +2 -0
  88. package/dist/web/chunks/ganttDiagram-EL5Y4UJY-5VPBBF2V.js +293 -0
  89. package/dist/web/chunks/gitGraph-4MIJSDKK-25JPIQP7.js +2 -0
  90. package/dist/web/chunks/gitGraphDiagram-WWUBYQGX-HZMAGPIJ.js +107 -0
  91. package/dist/web/chunks/info-A6RAGUB7-72MROTVX.js +2 -0
  92. package/dist/web/chunks/infoDiagram-27XIBGKW-BQYTPGNG.js +3 -0
  93. package/dist/web/chunks/ishikawaDiagram-5VMMS53U-A54WWBPX.js +71 -0
  94. package/dist/web/chunks/journeyDiagram-3NMN7TZE-XRCTMTR7.js +140 -0
  95. package/dist/web/chunks/kanban-definition-UXKFOSKX-UW2PQXZF.js +90 -0
  96. package/dist/web/chunks/katex-B7HWCVTN.js +258 -0
  97. package/dist/web/chunks/mermaid.core-VL5SQK5M.js +19 -0
  98. package/dist/web/chunks/mindmap-definition-YA3MSWOX-2H2Z6CVN.js +97 -0
  99. package/dist/web/chunks/packet-AYTQ26CC-NEGDW4B6.js +2 -0
  100. package/dist/web/chunks/pegDiagram-XKGWAZYB-KC4BYUN7.js +2 -0
  101. package/dist/web/chunks/pie-WAS4IAKB-OT3EMGHT.js +2 -0
  102. package/dist/web/chunks/pieDiagram-E7YTZNPT-54T6XSU5.js +40 -0
  103. package/dist/web/chunks/quadrantDiagram-AXDQQJYC-3G3RXSTE.js +8 -0
  104. package/dist/web/chunks/radar-RG4KPBEZ-DCHU5FOQ.js +2 -0
  105. package/dist/web/chunks/railroad-74A4TZTK-RZX6D7H6.js +2 -0
  106. package/dist/web/chunks/railroad-abnf-HS5TGJTU-STTFN7R4.js +2 -0
  107. package/dist/web/chunks/railroad-ebnf-LZEXJU2U-RBXU3IBK.js +2 -0
  108. package/dist/web/chunks/railroad-peg-WCYAUIDC-OD5BXOH6.js +2 -0
  109. package/dist/web/chunks/railroadDiagram-O6MQD6OU-3LHKFF5N.js +2 -0
  110. package/dist/web/chunks/requirementDiagram-BXWQKSXE-M4LF54YT.js +85 -0
  111. package/dist/web/chunks/sankeyDiagram-P5KCCOFB-USCKKKNT.js +41 -0
  112. package/dist/web/chunks/sequenceDiagram-WJ2MYXX4-QZ2O4KWV.js +163 -0
  113. package/dist/web/chunks/sizeCapture-INFHLROL-DZI5JWEV.js +2 -0
  114. package/dist/web/chunks/stateDiagram-D77RDMKH-EQJNTBF3.js +2 -0
  115. package/dist/web/chunks/stateDiagram-v2-MP3YSRHH-WSCDKLG6.js +2 -0
  116. package/dist/web/chunks/swimlanes-42K2YHIH-H7SZ2HG6.js +2 -0
  117. package/dist/web/chunks/swimlanesDiagram-VR7AAH4N-DFYTBPVS.js +9 -0
  118. package/dist/web/chunks/timeline-definition-24CTP7MA-4Q2ARIQ6.js +121 -0
  119. package/dist/web/chunks/treeView-Q6P3EWNA-ADCP6RPT.js +2 -0
  120. package/dist/web/chunks/treemap-WGGIJYW6-NEV7DUDY.js +2 -0
  121. package/dist/web/chunks/vennDiagram-4TSXK5OY-WMJVK74C.js +35 -0
  122. package/dist/web/chunks/wardley-WFR3VGLG-4QZOFDI5.js +2 -0
  123. package/dist/web/chunks/wardleyDiagram-VM6X3IG4-CLB324RQ.js +79 -0
  124. package/dist/web/chunks/xychartDiagram-S5SC5T6Z-G5C2R7C2.js +8 -0
  125. package/dist/web/index.html +24 -0
  126. package/dist/web/page.css +2 -0
  127. package/dist/web/page.js +210 -0
  128. package/package.json +62 -10
  129. package/cli.js +0 -2
@@ -0,0 +1,159 @@
1
+ # Implementation Plan: <Feature Name>
2
+
3
+ ## How to cut tasks
4
+
5
+ Applied when writing this file; never copied into the generated
6
+ document.
7
+
8
+ Tasks implement the approved requirements, in requirement order,
9
+ using the design's decisions. Nothing is decided here: a task that needs a
10
+ decision the design doesn't carry is a design gap - raise it, never
11
+ invent it. When the spec has no `design.md` (a bug fix), derive the
12
+ breakdown from the requirements alone and cite only those.
13
+
14
+ Only work that satisfies a requirement belongs in the plan - no
15
+ "nice to have" tasks nobody asked for. Only coding work belongs in the
16
+ plan: every task must be completable by writing, changing or testing
17
+ code, or by opening a pull request. User acceptance testing, gathering
18
+ feedback, deploying to an environment, collecting metrics, walking the
19
+ application by hand, training, user documentation and business process
20
+ changes are not tasks, however much the feature needs them - a plan that
21
+ carries one has a checkbox no agent can ever tick, and the ticked
22
+ checkbox is the only completion signal this pipeline has. Work that is
23
+ genuinely skippable is marked optional (`- [ ]* N.M`) and `## Notes`
24
+ says what skipping it costs.
25
+
26
+ Every task leaves the system runnable and testable: the build compiles,
27
+ every existing test still passes, and the behavior the task adds is
28
+ exercised by a test in the same task - tests travel with the code they
29
+ verify, never in a later task. Work in vertical increments behind the
30
+ flag: at any stopping point between tasks, flag-off behavior is exactly
31
+ today's, and a half-wired path is unreachable rather than broken. A
32
+ task that changes a contract updates every caller of that contract in
33
+ the same task.
34
+
35
+ A task is one sitting of work with one concern - a task that cannot
36
+ end green in one sitting is split before this file is signed,
37
+ scaffolding and test-infrastructure work included. Its detail lines
38
+ locate work by code anchor - repo, path from that repo's root, and the
39
+ symbol, key, or string inside the file - never by line number: position
40
+ rots between writing and execution, names survive edits, and an anchor
41
+ that no longer exists at execution time is a staleness signal to
42
+ re-check the design, never a licence to guess. A codebase fact a task
43
+ relies on - a cache, a constraint, an existing converter - cites the
44
+ design decision, or the `code-findings.md` line, that established it;
45
+ folklore doesn't ship. A task that says *every*, *all*, or *each* of a set of call
46
+ sites, endpoints, keys, or strings names the set in full and states how
47
+ many there are; the set comes from a search run while writing the task,
48
+ never from recall and never from a prose summary in an earlier document
49
+ - a summary naming three of something is a claim to re-run, not a list
50
+ to copy. A question
51
+ answered or an assumption made while cutting tasks is recorded in this
52
+ document, in the grammar's question and assumption sections - the
53
+ conversation does not survive, the document must; assumptions already
54
+ recorded in earlier documents are read from there, never restated
55
+ here. The second to last
56
+ detail line is `Files:` - the paths the task creates or edits, from the
57
+ design and from reading the code, written down rather than worked out
58
+ in your head, because the wave graph is built from it and the engine
59
+ reads it before letting two tasks run at once. A task no agent should
60
+ do - update an environment, create a branch, get a review - carries a
61
+ `Run:` detail line after `Files:` saying who does it instead: `by hand`,
62
+ one command in backticks, or a workflow's name with its params; the
63
+ grammar has the exact shapes, and a task that changes code never has
64
+ one. The last detail
65
+ line cites the criteria the task implements and the design ids it
66
+ follows. A group is one requirement, in the requirements' order.
67
+
68
+ On a revise, work already done that is no longer wanted gets a
69
+ compensating task - if 3.1 added `ISomething` and it is no longer
70
+ required, the task is "Remove `ISomething` and its implementations".
71
+ Never assume version control will revert anything.
72
+
73
+ Three closing groups follow the requirement groups, in this order. Verification
74
+ runs lint, build, and the test suites per repo and records real
75
+ outcomes; every suite it names is read from that repo's own solution or
76
+ project files rather than recalled, because a verification step that
77
+ names a project which does not exist fails on the first run; anything
78
+ unrunnable in the current environment is flagged for CI by name, never
79
+ assumed green. Documentation updates what this feature
80
+ actually changed and nothing else - a repo with nothing to update
81
+ records the reason, and a steering or team-doc addition is proposed with
82
+ its target file confirmed by a human before anything is written. Pull
83
+ requests open one per repo touched, each carrying the verification
84
+ outcomes recorded above, the flag key and its rollback, and anything
85
+ still blocked - opened for review, never merged. Rollout order is
86
+ expressed inside a group's task ordering and the wave graph, never by
87
+ reordering groups - the deploy sequence itself lives in design's
88
+ Cross-Boundary Contracts.
89
+
90
+ Where two parts of the work truly do not need each other - a backend
91
+ change and a UI change that meet only at the end, say - give their
92
+ waves an `after` list so they become two branches that two developers
93
+ can start at the same time, and let the wave that joins them wait for
94
+ both. The grammar has the shape. Where you are not sure, leave `after`
95
+ out: one wave after another is always safe.
96
+
97
+ **Before you stop, call the `check_plan` tool.** It reads the file you
98
+ wrote the way the implement phase will and lists every problem by
99
+ line - a row it cannot read, a task in no wave, two tasks of one wave
100
+ on the same file. Fix each one in the file and call it again, until it
101
+ reports no problems. A problem left in the plan is a task nobody will
102
+ run.
103
+
104
+ ## Shape
105
+
106
+ One group per requirement, hierarchical dialect, `## Task Dependency Graph`
107
+ at the end - the grammar file owns all three shapes. The generated
108
+ document carries the headings below, in this order.
109
+
110
+ ## Overview
111
+
112
+ <two or three sentences: the order the work is built in and why that
113
+ order, and anything a reader needs before the first task>
114
+
115
+ ## Tasks
116
+
117
+ - [ ] 1. <Requirement 1 title>
118
+ - [ ] 1.1 <task - one concern, ends green>
119
+ - <implementation detail, located by code anchor>
120
+ - [Design : Dec-1](design.md)
121
+ - Files: `<repo-relative path>`, `<repo-relative path>`
122
+ - _Requirements: 1.1, 1.2_
123
+ - [ ] 1.2 <task>
124
+ - <implementation detail, located by code anchor>
125
+ - Files: `<repo-relative path>`
126
+ - _Requirements: 1.5_
127
+
128
+ - [ ] 2. <Requirement 2 title>
129
+ - [ ] 2.1 <task>
130
+ - <implementation detail, located by code anchor>
131
+ - [Design : Dec-6](design.md)
132
+ - Files: `<repo-relative path>`
133
+ - _Requirements: 3.1_
134
+
135
+ - [ ] 3. Verification
136
+ - [ ] 3.1 <one task per repo touched: lint, build, unit and
137
+ integration suites - the recorded result, pass or fail, per suite>
138
+
139
+ - [ ] 4. Documentation
140
+ - [ ] 4.1 <one task per repo whose documented behavior changed - what
141
+ to update, or the reason it needs nothing>
142
+ - [ ] 4.2 <the steering or team-doc addition this feature earned,
143
+ target file confirmed with a human first - or the reason there is
144
+ none>
145
+
146
+ - [ ] 5. Pull requests
147
+ - [ ] 5.1 <one task per repo touched: branch, the repo's own PR
148
+ template, the recorded verification outcomes, the flag key and its
149
+ rollback - opened for review, never merged>
150
+
151
+ ## Notes
152
+
153
+ - <what holds across groups rather than inside one task: ordering that
154
+ is load-bearing, anything optional and why, a convention every task
155
+ follows>
156
+
157
+ ## Sign-off
158
+
159
+ - **Lead:** <name> - <UTC>
@@ -0,0 +1,49 @@
1
+ # SDD Process
2
+
3
+ You run a spec-driven development (SDD) process. Input: a PRD from a Product Owner (PO). Output: signed-off documents down to a Lead-approved task plan, which the implement gate then executes. You produce the documents below in fixed order, one phase at a time, each gated by an explicit human sign-off in conversation. Templates for every document are in `instructions/`; follow each template's fill rules for content. File locations are handled by the tooling — never decide, ask about, or restate paths.
4
+
5
+ ## Pipeline
6
+
7
+ 1. `requirements.md` — testable requirements — gate: PO sign-off
8
+ 2. `design.md` — technical design — gate: Developer + Lead + QA sign-off
9
+ 3. `tasks.md` — per-requirement implementation plan, every task leaving the system runnable and testable — gate: Lead sign-off
10
+
11
+ ## Hard rules — every phase
12
+
13
+ - Document grammar and shape — headings, item ids, citations, question format, EARS forms, checkbox shapes, sign-off recording, hygiene — come from `grammar.md`.
14
+ - Never invent behavior to fill a gap in the inputs — when to read the code, ask live, or record an open question is the grammar's ask ladder; an open question blocks the next phase.
15
+ - A gate clears only on explicit confirmation in conversation, recorded per the grammar's sign-off rules.
16
+ - Approval is never instant — a human needs time to review. After drafting or regenerating a document, present it, state that its gate is pending, and end the run: deferred is the default outcome, not a failure. Offer approve alongside defer for whoever is ready now, but never push for approval in the same turn a document was generated, and never re-ask. Approval normally arrives in a later run — record it at that moment.
17
+ - Never draft while the previous phase has an unanswered question or a missing sign-off — but don't just stop: put each blocker to the human. Ask its open questions and ask for the missing approval; record what they give in the previous phase's own document, then proceed. Stop and wait only when the human defers or doesn't answer.
18
+ - A content change to any phase document makes every later-phase document stale — recording answers and sign-offs does not count as a content change. In the run that makes the change: name the now-stale documents, stamp each with `> STALE: <changed-file> changed <UTC> — regenerate.` directly under its H1, and offer to regenerate them right away. A stale document cannot be relied on, signed off, or published — regeneration is the only thing that removes the stamp.
19
+ - When a run's ask depends on a stale document, regenerate before doing the ask: announce it, then rebuild the stale chain in pipeline order — each document rewritten whole from its now-current inputs. Gates stay deferred by default, so expect this to span runs: regenerate up to the first pending gate, stop, and continue from there next run; the original ask executes only once the chain is clean and approved.
20
+ - A later phase never narrows, contradicts, or adds a condition to an approved item in an earlier phase. Where a decision would change what an approved criterion means — restricting which cases it covers, or making it conditional on something the criterion does not mention — that is a change to the earlier document, not a decision this phase may absorb. Name it, amend that document, stamp the rest of the chain stale, and re-gate it. A note inside the later document saying the narrowing happened is not the amendment; it is the thing this rule forbids, because after sign-off the approved text still reads as approved.
21
+ - A claim in a signed document that later reading of the code disproves is a content change to that document, not a correction to carry forward. Amend it where it is written, stamp the chain below it stale, and re-gate — a repeated gate costs less than a signed document contradicting this spec's own findings. Recording the correction in `code-findings.md`, in a later document's assumptions, or in an answered question is not a substitute: none of them is read by whoever relies on the approved text.
22
+ - Every phase's document is written to its file — chat is for questions and sign-offs, never the document itself.
23
+ - `code-findings.md` in the spec folder is the shared code-reconnaissance record. Every phase that reads repository code checks it first, reads only what it doesn't already answer, and appends what it learns — one line per fact: repo, file or symbol, the fact, with the file written as a code anchor per the grammar's `Pointing at code`. It is never signed, never gated, and never restated inside a phase document; documents cite the code directly, the findings file only saves the next phase the search. A fact read from it is reused, never re-derived — but a fact that is about to become an anchor in an output document is re-confirmed against the repository first: a wrong path recorded once here otherwise reaches every later phase unchallenged.
24
+ - `decisions.md` in the spec folder preserves current human answers across document regeneration. Before asking a person, check it and reuse the answer to the same question. When a person changes an answer, update that question-and-answer pair; the person may edit or delete pairs directly. It is never signed or gated; a regenerated document still needs a fresh sign-off.
25
+
26
+ ## Phase 1 — Requirements
27
+
28
+ - Template: `instructions/requirements.md` — read it before drafting.
29
+ - Review everything the PO provides: the PRD, mocks, and the codebase(s) in the workspace. Reconcile PRD intent against what the code actually does.
30
+ - Each requirement is one user story — a vertical slice of user-visible value — with acceptance criteria written out in full, in EARS. Each requirement must read standalone.
31
+ - Ground Out of Scope entries in the inputs; never invent exclusions.
32
+ - Gate: PO sign-off.
33
+
34
+ ## Phase 2 — Design
35
+
36
+ - Template: `instructions/design.md` — read it before drafting.
37
+ - Precondition: requirements approved and every question answered. Otherwise resolve the blockers first, per the hard rules.
38
+ - Pre-write gate: before drafting, ask every unknown and agree any deviation from the requested approach or existing code patterns. Silent assumptions are the failure mode, not slow drafts.
39
+ - Cite acceptance criteria by ID; never restate them. Omit anything the repo can answer for itself. A decision nobody has made is an open question, not an omission.
40
+ - Gate: three explicit sign-offs — Developer (peer review), Lead, and QA. All three; never proceed on fewer.
41
+
42
+ ## Phase 3 — Tasks
43
+
44
+ - Template: `instructions/tasks.md` — read it before drafting.
45
+ - Precondition: design signed off. Otherwise resolve the blockers first, per the hard rules.
46
+ - Tasks implement the requirements using the design's decisions — nothing new is decided here; a task that needs a decision the design doesn't carry is a design gap to raise, never to invent.
47
+ - Every task leaves the system runnable and testable: build green, existing tests green, the task's own behavior tested in the same task, and flag-off behavior intact at every stopping point.
48
+ - One group per requirement in requirement order; each task cites the criteria it implements and the design ids it follows; three closing groups follow — verification with real recorded outcomes per repo, documentation, and one pull request per repo touched, opened for review and never merged.
49
+ - Gate: Lead sign-off.
@@ -0,0 +1,29 @@
1
+ # ${{ spec.stage }} for '${{ spec.name }}'
2
+
3
+ Your job: **write the file ${{ phase.target }}**. Writing that file is
4
+ the task. Chat is not the deliverable - the next phase starts a new
5
+ chat and can only see files on disk.
6
+
7
+ Rules:
8
+
9
+ - Everything you write goes inside the spec folder: `${{ spec.dir }}`.
10
+ - Read repository code only when **how** calls for it - and check
11
+ `code-findings.md` in the spec folder first: read only what it does
12
+ not already answer, and append what you learn (one
13
+ line per fact: repo, file or symbol, the fact). A phase that derives
14
+ from earlier documents reuses recorded findings instead of re-reading
15
+ the code.
16
+ - Before asking a person, check `decisions.md` in the spec folder.
17
+ Reuse its answer to the same question; when a person changes an
18
+ answer, update that question-and-answer pair.
19
+
20
+ Attached files. This list is everything this phase receives - if other
21
+ files sit in the spec folder, ignore them, except `code-findings.md`
22
+ and `decisions.md`:
23
+
24
+ - **how** - the instructions for this phase. Read it before writing.
25
+ ${{ phase.documents }}
26
+ ${{ phase.references }}
27
+
28
+ When you are done, reply with one sentence: what you wrote, and what a
29
+ reviewer should look at first.
@@ -0,0 +1,27 @@
1
+ # ${{ spec.stage }} for '${{ spec.name }}'
2
+
3
+ Spec folder: `${{ spec.dir }}`. This phase writes code, not a spec document. The work goes in the repository, where the design says it goes. You do not edit the plan: a task is ticked by calling the `task_done` tool with its id.
4
+
5
+ The grammar's scope rule - one document, no terminal commands - is for the phases that draft a document. It does not apply here: building, running tests and editing code are this phase's job.
6
+
7
+ **The repository is context too.** You are working in it - read the code these tasks touch, and follow the conventions it already sets, including any instructions file it carries near what you are changing (`CLAUDE.md`, `AGENTS.md`, or whatever this repository uses).
8
+
9
+ ## Attached
10
+
11
+ Everything this phase was given. Other files may sit in the spec folder; nobody declared them for this phase.
12
+
13
+ - **how** - how to do this phase. Read it first.
14
+ ${{ phase.documents }}
15
+ ${{ phase.references }}
16
+
17
+ ## Tasks to implement now
18
+
19
+ ${{ phase.tasks }}
20
+
21
+ Exactly these, and nothing else. Each row is the task as the plan writes it - its `Files:`, its citations, its notes - and names the plan line it sits on, for anything around it. A row that names a wave was handed together with the other rows of that wave: the plan put them there because their `Files:` lines share no path, so they may be worked at the same time, the way **how** describes. Check that first - if two rows above share a path, work those two one after the other. Rows with no wave are worked one at a time, in this order.
22
+
23
+ ## The ask
24
+
25
+ **Implement the tasks above.** For each one: build it, run its tests, call `task_done` with its id, then move on. A task you could not finish stays unticked - say what blocked you and stop there.
26
+
27
+ When you are done, end your reply with a `## Changed` section: one line per file you created or edited, repository-relative, in backticks, then one sentence on what a reviewer should look at first. The panel shows this reply, and that list is how a person sees what the wave touched without opening the chat.
@@ -0,0 +1,40 @@
1
+ # ${{ spec.stage }} for '${{ spec.name }}'
2
+
3
+ Your job: **rewrite the file ${{ phase.target }}** in place. Writing
4
+ that file is the task. Chat is not the deliverable - the next phase
5
+ starts a new chat and can only see files on disk.
6
+
7
+ Rules:
8
+
9
+ - Everything you write goes inside the spec folder: `${{ spec.dir }}`.
10
+ - Read repository code only when **how** calls for it - and check
11
+ `code-findings.md` in the spec folder first: read only what it does
12
+ not already answer, and append what you learn (one
13
+ line per fact: repo, file or symbol, the fact). A phase that derives
14
+ from earlier documents reuses recorded findings instead of re-reading
15
+ the code.
16
+ - Before asking a person, check `decisions.md` in the spec folder.
17
+ Reuse its answer to the same question; when a person changes an
18
+ answer, update that question-and-answer pair.
19
+
20
+ Attached files. This list is everything this phase receives - if other
21
+ files sit in the spec folder, ignore them, except `code-findings.md`
22
+ and `decisions.md`:
23
+
24
+ - **how** - the instructions for this phase. Read it before writing.
25
+ - **current** - `${{ phase.target }}` as it stands, including any
26
+ edits a human made after the last run. Those edits are deliberate
27
+ decisions - keep them.
28
+ ${{ phase.documents }}
29
+ ${{ phase.references }}
30
+
31
+ This pass has one instruction, written by the person who asked for it:
32
+
33
+ ${{ phase.note }}
34
+
35
+ Do exactly that. Where the instruction conflicts with what you would
36
+ have done on your own, the instruction wins. Where the instruction says
37
+ nothing, leave the document as it is.
38
+
39
+ When you are done, reply with one sentence: what you changed, and what
40
+ a reviewer should look at first.
@@ -0,0 +1,32 @@
1
+ # ${{ spec.stage }} for '${{ spec.name }}'
2
+
3
+ Your job: **rewrite the file ${{ phase.target }}** in place. Writing
4
+ that file is the task. Chat is not the deliverable - the next phase
5
+ starts a new chat and can only see files on disk.
6
+
7
+ Rules:
8
+
9
+ - Everything you write goes inside the spec folder: `${{ spec.dir }}`.
10
+ - Read repository code only when **how** calls for it - and check
11
+ `code-findings.md` in the spec folder first: read only what it does
12
+ not already answer, and append what you learn (one
13
+ line per fact: repo, file or symbol, the fact). A phase that derives
14
+ from earlier documents reuses recorded findings instead of re-reading
15
+ the code.
16
+ - Before asking a person, check `decisions.md` in the spec folder.
17
+ Reuse its answer to the same question; when a person changes an
18
+ answer, update that question-and-answer pair.
19
+
20
+ Attached files. This list is everything this phase receives - if other
21
+ files sit in the spec folder, ignore them, except `code-findings.md`
22
+ and `decisions.md`:
23
+
24
+ - **how** - the instructions for this phase. Read it before writing.
25
+ - **current** - `${{ phase.target }}` as it stands, including any
26
+ edits a human made after the last run. Those edits are deliberate
27
+ decisions - keep them.
28
+ ${{ phase.documents }}
29
+ ${{ phase.references }}
30
+
31
+ When you are done, reply with one sentence: what you changed, and what
32
+ a reviewer should look at first.
@@ -0,0 +1,46 @@
1
+ schema: 1
2
+ id: custom
3
+ name: Custom
4
+ desc: Requirements, design, tasks, implement. A human gate between each. The default, and a starting point for your own style.
5
+
6
+ # A question a phase wrote down and nobody answered stops the phase
7
+ # after it. Written out rather than left to the default so a reader of
8
+ # this file can see the gate is on.
9
+ blockOnOpenQuestions: true
10
+
11
+ # Starting sentences for the revise box - the split button beside Send
12
+ # in a phase's AI Session tab. Picking one fills the box; you still read
13
+ # it, edit it and press Send. Left out, the menu shows two built-in
14
+ # sentences ("Prompt changed", "Prev doc(s) changed"). Declared, yours
15
+ # replace them. A stage can carry its own list too, added after this one.
16
+ # The text may read the spec variables.
17
+ #
18
+ # presets:
19
+ # - label: Tighten wording
20
+ # text: Keep every decision. Cut words. Do not add sections.
21
+ # - label: Match the code
22
+ # text: Re-read the code ${{ spec.name }} touches and fix anything this document says that the code contradicts.
23
+
24
+ specTypes:
25
+ - id: feature
26
+ label: Feature
27
+ stages: [requirements, design, tasks, implement]
28
+ - id: bug
29
+ label: Bug fix
30
+ stages: [requirements, tasks, implement]
31
+
32
+ stages:
33
+ - id: requirements
34
+ label: Requirements
35
+ - id: design
36
+ label: Design
37
+ - id: tasks
38
+ label: Tasks
39
+ # To work the plan from its own page with no implement phase on the
40
+ # rail: set `actionable: true` here and drop `implement` from every
41
+ # spec type above. The output gate is then implied after this stage.
42
+ # actionable: true
43
+ - id: implement
44
+ label: Implementation
45
+ - id: intake
46
+ label: Intake