@eeshaai/code 1.0.0 → 1.0.2

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 (150) hide show
  1. package/LICENSE.md +3 -3
  2. package/README.md +337 -322
  3. package/dist/cli.js +4 -4
  4. package/dist/resources/styles/custom/instructions/design.md +283 -283
  5. package/dist/resources/styles/custom/instructions/requirements.md +161 -161
  6. package/dist/resources/styles/custom/instructions/tasks-implement.md +90 -90
  7. package/dist/resources/styles/custom/instructions/tasks.md +159 -159
  8. package/dist/resources/styles/custom/process.md +49 -49
  9. package/dist/resources/styles/custom/prompts/first.md +29 -29
  10. package/dist/resources/styles/custom/prompts/implement.md +27 -27
  11. package/dist/resources/styles/custom/prompts/rewrite-note.md +40 -40
  12. package/dist/resources/styles/custom/prompts/rewrite.md +32 -32
  13. package/dist/resources/styles/custom/style.yml +46 -46
  14. package/dist/resources/styles/grammar.md +727 -731
  15. package/dist/resources/styles/kiro/style.yml +63 -0
  16. package/dist/resources/styles/speckit/style.yml +59 -0
  17. package/dist/server.js +465 -486
  18. package/dist/web/chunks/{abnfDiagram-VCTEODGH-6KC3BO47.js → abnfDiagram-VCTEODGH-P6AZFXJU.js} +2 -2
  19. package/dist/web/chunks/architecture-7GRP2DOG-K6PMPK7N.js +2 -0
  20. package/dist/web/chunks/{architectureDiagram-5GKGNRK7-QKPCVOD2.js → architectureDiagram-5GKGNRK7-JB5DD7KL.js} +2 -2
  21. package/dist/web/chunks/{blockDiagram-I7D4REHJ-4XZWNXLB.js → blockDiagram-I7D4REHJ-ARCDWS5D.js} +2 -2
  22. package/dist/web/chunks/{c4Diagram-7LVT6UL2-4HJHKNE3.js → c4Diagram-7LVT6UL2-57CIXPJZ.js} +2 -2
  23. package/dist/web/chunks/{chunk-GQPX4EIC.js → chunk-3EZ2OKHV.js} +2 -2
  24. package/dist/web/chunks/{chunk-37NHO5VO.js → chunk-4KJ2U3VQ.js} +2 -2
  25. package/dist/web/chunks/{chunk-OXLTOJNY.js → chunk-4ZUFUR3U.js} +2 -2
  26. package/dist/web/chunks/{chunk-46RPN6IE.js → chunk-63W35XXT.js} +2 -2
  27. package/dist/web/chunks/{chunk-LSVIQRSY.js → chunk-6YVFH4BZ.js} +2 -2
  28. package/dist/web/chunks/{chunk-6VRLULJH.js → chunk-7PUK2GON.js} +2 -2
  29. package/dist/web/chunks/{chunk-TPXX77KB.js → chunk-7Q4TXKAS.js} +2 -2
  30. package/dist/web/chunks/{chunk-4S2DRQJ6.js → chunk-7QRY2XB7.js} +2 -2
  31. package/dist/web/chunks/{chunk-2DLEMZHM.js → chunk-CA2KMNVI.js} +2 -2
  32. package/dist/web/chunks/{chunk-LHNPPNB7.js → chunk-CFMSYLIK.js} +2 -2
  33. package/dist/web/chunks/{chunk-4TORDSRR.js → chunk-CKJRXIX7.js} +2 -2
  34. package/dist/web/chunks/{chunk-L34PKG4P.js → chunk-CXXG5KL5.js} +2 -2
  35. package/dist/web/chunks/chunk-EFBAEJZJ.js +2 -0
  36. package/dist/web/chunks/{chunk-LQ6CTWX6.js → chunk-FKTXB6RJ.js} +2 -2
  37. package/dist/web/chunks/{chunk-TXNHMPKM.js → chunk-FU7R4QOG.js} +2 -2
  38. package/dist/web/chunks/{chunk-DIRT34TZ.js → chunk-GEV6X2TZ.js} +2 -2
  39. package/dist/web/chunks/{chunk-II6WN3ZG.js → chunk-GPW7TXQS.js} +2 -2
  40. package/dist/web/chunks/{chunk-5KNOHX5X.js → chunk-I6RMTJPN.js} +2 -2
  41. package/dist/web/chunks/{chunk-6TGTE6CF.js → chunk-IKC3ZQV7.js} +2 -2
  42. package/dist/web/chunks/{chunk-LDXBIOBF.js → chunk-ITN3D7RJ.js} +2 -2
  43. package/dist/web/chunks/{chunk-OODDZ447.js → chunk-J6N7AUC2.js} +2 -2
  44. package/dist/web/chunks/{chunk-FGASMJTA.js → chunk-J7VDGOTK.js} +2 -2
  45. package/dist/web/chunks/chunk-KVRWT2YT.js +2 -0
  46. package/dist/web/chunks/{chunk-6URXM4C4.js → chunk-NBC6B3KN.js} +2 -2
  47. package/dist/web/chunks/{chunk-HBEUVMXY.js → chunk-NLHJT4GD.js} +2 -2
  48. package/dist/web/chunks/{chunk-HNYXDXPN.js → chunk-NOVL2262.js} +2 -2
  49. package/dist/web/chunks/{chunk-FPLIRG3U.js → chunk-NQ2XP5EN.js} +2 -2
  50. package/dist/web/chunks/chunk-P44J6WNO.js +2 -0
  51. package/dist/web/chunks/{chunk-6KSWTVXD.js → chunk-QBOSTM7Q.js} +2 -2
  52. package/dist/web/chunks/{chunk-HAKJ3AUV.js → chunk-QKU4ZFG5.js} +2 -2
  53. package/dist/web/chunks/{chunk-T4HEWXAQ.js → chunk-RINQGKTH.js} +2 -2
  54. package/dist/web/chunks/{chunk-TPYBIPJG.js → chunk-RK4EOCHJ.js} +2 -2
  55. package/dist/web/chunks/{chunk-YM7LHP34.js → chunk-S4X6ERXI.js} +2 -2
  56. package/dist/web/chunks/{chunk-VY4GEFSG.js → chunk-SE57RN36.js} +2 -2
  57. package/dist/web/chunks/{chunk-6FQEBIA3.js → chunk-SGL7WI35.js} +3 -3
  58. package/dist/web/chunks/chunk-SOAWGUAD.js +2 -0
  59. package/dist/web/chunks/{chunk-7XAOOQR4.js → chunk-U6ILIHMR.js} +2 -2
  60. package/dist/web/chunks/{chunk-M3SWKTLZ.js → chunk-USZ3ZJYA.js} +2 -2
  61. package/dist/web/chunks/{chunk-MBZYSJFT.js → chunk-UU7BHEBD.js} +2 -2
  62. package/dist/web/chunks/{chunk-QNEZP2TE.js → chunk-WL4ZMLPV.js} +2 -2
  63. package/dist/web/chunks/{chunk-MZEMPN3C.js → chunk-XE4RLI22.js} +2 -2
  64. package/dist/web/chunks/{chunk-VAKN3BTM.js → chunk-XJ6FSQEO.js} +2 -2
  65. package/dist/web/chunks/{chunk-XBYCKXUJ.js → chunk-XM7VXEGI.js} +2 -2
  66. package/dist/web/chunks/{chunk-2RFQIKC6.js → chunk-XO4SHRSO.js} +2 -2
  67. package/dist/web/chunks/{chunk-BUZPUGIT.js → chunk-XOZZFIHV.js} +2 -2
  68. package/dist/web/chunks/{chunk-FNIFXWXL.js → chunk-YYJ5VFH5.js} +2 -2
  69. package/dist/web/chunks/{chunk-JOSXY3EP.js → chunk-ZX45GMMJ.js} +2 -2
  70. package/dist/web/chunks/{chunk-4IPDIKAU.js → chunk-ZXMMITLE.js} +2 -2
  71. package/dist/web/chunks/classDiagram-ZZMXUADV-ALD5ECFE.js +2 -0
  72. package/dist/web/chunks/classDiagram-v2-VYDZK3BY-IMIEVQNX.js +2 -0
  73. package/dist/web/chunks/{cose-bilkent-JH36ORCC-ZPRW5JRW.js → cose-bilkent-JH36ORCC-YVEPG7XZ.js} +2 -2
  74. package/dist/web/chunks/cynefin-OW5HDTMX-5G3MG4ZJ.js +2 -0
  75. package/dist/web/chunks/{cynefinDiagram-5FMLGOSQ-O7GURHJG.js → cynefinDiagram-5FMLGOSQ-A3E3NM6X.js} +2 -2
  76. package/dist/web/chunks/{dagre-GXQ25YYZ-WK67O4N6.js → dagre-GXQ25YYZ-WKL3XLC6.js} +2 -2
  77. package/dist/web/chunks/{diagram-S7CK7UJ4-2CEO2EN2.js → diagram-S7CK7UJ4-AENTNBTM.js} +2 -2
  78. package/dist/web/chunks/{diagram-UQ7AKVKN-2Z4VHGF3.js → diagram-UQ7AKVKN-BN6IVDBP.js} +2 -2
  79. package/dist/web/chunks/{diagram-VSXAHHWV-AN4BOWYB.js → diagram-VSXAHHWV-X7IW7FU6.js} +2 -2
  80. package/dist/web/chunks/{diagram-VX7I27RA-VEZ2GXCM.js → diagram-VX7I27RA-4V6RQ6IS.js} +2 -2
  81. package/dist/web/chunks/{diagram-Z3DM3KII-TGGNDSLW.js → diagram-Z3DM3KII-ODYVRYAT.js} +2 -2
  82. package/dist/web/chunks/{ebnfDiagram-PWID7BFC-7RM57IJV.js → ebnfDiagram-PWID7BFC-2KD46JNN.js} +2 -2
  83. package/dist/web/chunks/{erDiagram-RLTQ6QDP-LCATC3YT.js → erDiagram-RLTQ6QDP-6MYZ2NRT.js} +2 -2
  84. package/dist/web/chunks/eventmodeling-NTZA5JFV-QZXC5VKS.js +2 -0
  85. package/dist/web/chunks/flowDiagram-HODETNUW-BILJ37ZX.js +2 -0
  86. package/dist/web/chunks/{ganttDiagram-EL5Y4UJY-5VPBBF2V.js → ganttDiagram-EL5Y4UJY-LVA23DND.js} +2 -2
  87. package/dist/web/chunks/gitGraph-4MIJSDKK-H43S2MKN.js +2 -0
  88. package/dist/web/chunks/{gitGraphDiagram-WWUBYQGX-HZMAGPIJ.js → gitGraphDiagram-WWUBYQGX-JRB4SUZI.js} +2 -2
  89. package/dist/web/chunks/info-A6RAGUB7-DKS7Q63Q.js +2 -0
  90. package/dist/web/chunks/infoDiagram-27XIBGKW-JLOVILVF.js +3 -0
  91. package/dist/web/chunks/{ishikawaDiagram-5VMMS53U-A54WWBPX.js → ishikawaDiagram-5VMMS53U-SUA2YN5D.js} +2 -2
  92. package/dist/web/chunks/{journeyDiagram-3NMN7TZE-XRCTMTR7.js → journeyDiagram-3NMN7TZE-ORMC2WB2.js} +2 -2
  93. package/dist/web/chunks/{kanban-definition-UXKFOSKX-UW2PQXZF.js → kanban-definition-UXKFOSKX-TPRG3VMF.js} +2 -2
  94. package/dist/web/chunks/{katex-B7HWCVTN.js → katex-DLHJF5VS.js} +2 -2
  95. package/dist/web/chunks/{mermaid.core-VL5SQK5M.js → mermaid.core-ZM3JSPVU.js} +3 -3
  96. package/dist/web/chunks/{mindmap-definition-YA3MSWOX-2H2Z6CVN.js → mindmap-definition-YA3MSWOX-BLW6WWFS.js} +2 -2
  97. package/dist/web/chunks/packet-AYTQ26CC-FIXQVEDM.js +2 -0
  98. package/dist/web/chunks/{pegDiagram-XKGWAZYB-KC4BYUN7.js → pegDiagram-XKGWAZYB-BYMP3YHY.js} +2 -2
  99. package/dist/web/chunks/pie-WAS4IAKB-R4EUNVPB.js +2 -0
  100. package/dist/web/chunks/{pieDiagram-E7YTZNPT-54T6XSU5.js → pieDiagram-E7YTZNPT-XOJE3H3L.js} +2 -2
  101. package/dist/web/chunks/{quadrantDiagram-AXDQQJYC-3G3RXSTE.js → quadrantDiagram-AXDQQJYC-23VSADTC.js} +2 -2
  102. package/dist/web/chunks/radar-RG4KPBEZ-O6Y2TENX.js +2 -0
  103. package/dist/web/chunks/railroad-74A4TZTK-PHWZ7KVH.js +2 -0
  104. package/dist/web/chunks/railroad-abnf-HS5TGJTU-DZ4OSJAN.js +2 -0
  105. package/dist/web/chunks/railroad-ebnf-LZEXJU2U-GYBLRQUL.js +2 -0
  106. package/dist/web/chunks/railroad-peg-WCYAUIDC-ZK4ZOBSX.js +2 -0
  107. package/dist/web/chunks/{railroadDiagram-O6MQD6OU-3LHKFF5N.js → railroadDiagram-O6MQD6OU-Z5IEAZJK.js} +2 -2
  108. package/dist/web/chunks/{requirementDiagram-BXWQKSXE-M4LF54YT.js → requirementDiagram-BXWQKSXE-MNP4O73E.js} +2 -2
  109. package/dist/web/chunks/{sankeyDiagram-P5KCCOFB-USCKKKNT.js → sankeyDiagram-P5KCCOFB-PADI35QR.js} +2 -2
  110. package/dist/web/chunks/{sequenceDiagram-WJ2MYXX4-QZ2O4KWV.js → sequenceDiagram-WJ2MYXX4-FGWOVXU4.js} +2 -2
  111. package/dist/web/chunks/{sizeCapture-INFHLROL-DZI5JWEV.js → sizeCapture-INFHLROL-Y6H3VQLE.js} +2 -2
  112. package/dist/web/chunks/{stateDiagram-D77RDMKH-EQJNTBF3.js → stateDiagram-D77RDMKH-7PRO4WYR.js} +2 -2
  113. package/dist/web/chunks/stateDiagram-v2-MP3YSRHH-2Y6SWEJW.js +2 -0
  114. package/dist/web/chunks/{swimlanes-42K2YHIH-H7SZ2HG6.js → swimlanes-42K2YHIH-DXVTFB6Q.js} +2 -2
  115. package/dist/web/chunks/swimlanesDiagram-VR7AAH4N-U2LP4OEE.js +9 -0
  116. package/dist/web/chunks/{timeline-definition-24CTP7MA-4Q2ARIQ6.js → timeline-definition-24CTP7MA-7ZIALE6C.js} +2 -2
  117. package/dist/web/chunks/treeView-Q6P3EWNA-VSJ7TJ36.js +2 -0
  118. package/dist/web/chunks/treemap-WGGIJYW6-JZWFGRKS.js +2 -0
  119. package/dist/web/chunks/{vennDiagram-4TSXK5OY-WMJVK74C.js → vennDiagram-4TSXK5OY-IPXNDYWM.js} +2 -2
  120. package/dist/web/chunks/wardley-WFR3VGLG-PAUUFL5N.js +2 -0
  121. package/dist/web/chunks/{wardleyDiagram-VM6X3IG4-CLB324RQ.js → wardleyDiagram-VM6X3IG4-4Z2U2NNR.js} +2 -2
  122. package/dist/web/chunks/{xychartDiagram-S5SC5T6Z-G5C2R7C2.js → xychartDiagram-S5SC5T6Z-NAEIWN4K.js} +2 -2
  123. package/dist/web/page.css +1 -1
  124. package/dist/web/page.js +156 -125
  125. package/package.json +64 -62
  126. package/dist/web/chunks/architecture-7GRP2DOG-JLXNDD4H.js +0 -2
  127. package/dist/web/chunks/chunk-4KP3BIPB.js +0 -2
  128. package/dist/web/chunks/chunk-HX7W7GSO.js +0 -2
  129. package/dist/web/chunks/chunk-PR453BYT.js +0 -2
  130. package/dist/web/chunks/chunk-R7TFKRNM.js +0 -2
  131. package/dist/web/chunks/classDiagram-ZZMXUADV-4J5HHZD6.js +0 -2
  132. package/dist/web/chunks/classDiagram-v2-VYDZK3BY-X6WY2DAS.js +0 -2
  133. package/dist/web/chunks/cynefin-OW5HDTMX-SVVTQRRB.js +0 -2
  134. package/dist/web/chunks/eventmodeling-NTZA5JFV-2SR57JAH.js +0 -2
  135. package/dist/web/chunks/flowDiagram-HODETNUW-HU6Y2EYQ.js +0 -2
  136. package/dist/web/chunks/gitGraph-4MIJSDKK-25JPIQP7.js +0 -2
  137. package/dist/web/chunks/info-A6RAGUB7-72MROTVX.js +0 -2
  138. package/dist/web/chunks/infoDiagram-27XIBGKW-BQYTPGNG.js +0 -3
  139. package/dist/web/chunks/packet-AYTQ26CC-NEGDW4B6.js +0 -2
  140. package/dist/web/chunks/pie-WAS4IAKB-OT3EMGHT.js +0 -2
  141. package/dist/web/chunks/radar-RG4KPBEZ-DCHU5FOQ.js +0 -2
  142. package/dist/web/chunks/railroad-74A4TZTK-RZX6D7H6.js +0 -2
  143. package/dist/web/chunks/railroad-abnf-HS5TGJTU-STTFN7R4.js +0 -2
  144. package/dist/web/chunks/railroad-ebnf-LZEXJU2U-RBXU3IBK.js +0 -2
  145. package/dist/web/chunks/railroad-peg-WCYAUIDC-OD5BXOH6.js +0 -2
  146. package/dist/web/chunks/stateDiagram-v2-MP3YSRHH-WSCDKLG6.js +0 -2
  147. package/dist/web/chunks/swimlanesDiagram-VR7AAH4N-DFYTBPVS.js +0 -9
  148. package/dist/web/chunks/treeView-Q6P3EWNA-ADCP6RPT.js +0 -2
  149. package/dist/web/chunks/treemap-WGGIJYW6-NEV7DUDY.js +0 -2
  150. package/dist/web/chunks/wardley-WFR3VGLG-4QZOFDI5.js +0 -2
@@ -1,161 +1,161 @@
1
- # Requirements Document
2
- Feature : <Feature Name>
3
-
4
- <!-- The H1 is the literal words `# Requirements Document`, never the
5
- feature's name: Kiro's validator matches that line exactly.
6
-
7
- Your source is `intake.md` when the spec has one: what was asked and
8
- where it came from. Read what it points at before you draft - every file
9
- it lists (they sit in the spec folder), and any work item or issue it
10
- names, through the MCP server for that provider, comments included. A
11
- description alone means that is all there is: work from it and the
12
- repository, and invent nothing. Do not re-open the ask: intake settled
13
- what is being asked; carry its own open questions forward where they
14
- still block, and add no scope because the ask left room for it. Intake's
15
- `type` shapes the framing - a `bug` states the wrong behaviour and the
16
- right one, a `feature` states capability the system should gain - but
17
- the sections, numbering and EARS forms are the same either way. -->
18
-
19
- > Standalone template - everything needed to draft and record these
20
- > requirements is in this file.
21
- - **Approved by (PO):** <name - filled at approval>
22
- - **Approved (UTC):** <datetime - filled at approval>
23
-
24
- ## Introduction
25
-
26
- A few sentences on the feature, its purpose, and the problem it solves -
27
- not a design summary or a restatement of the requirements below.
28
-
29
- ## Glossary
30
-
31
- Only where artifacts genuinely name one thing differently. One line
32
- per term: "Customer (canonical) - the mock-ups say 'Client'; the DB
33
- table is `account`." When a field this feature writes is also
34
- written by other flows, say so - a reader must not assume it holds
35
- only this feature's value. A multi-word term is written with
36
- underscores - `Scheduled_Appointment` - and then written that way
37
- everywhere in this document, criteria included, so a defined term is
38
- one greppable token. Omit the section when there's nothing to
39
- record.
40
-
41
- ## Personas
42
-
43
- Only when an audience beyond the user stories' own roles needs
44
- distinct verification - an integration caller that authenticates
45
- differently, a participant who sees data a requirement exposes. One
46
- line per persona: who they are and what makes their path different.
47
- Omit when the user stories' roles cover everyone.
48
-
49
- - **<Persona>** - <what makes their path distinct>
50
-
51
- ## Requirements
52
-
53
- Each requirement is one clear capability, stated as the PO would state
54
- it: a user story plus the complete acceptance criteria that verify it.
55
- Group by what a reader verifies together, never by system or repo - a
56
- requirement is an outcome, not a component's work list. Requirements
57
- are not deployment units: no requirement here carries release
58
- mechanics or dependency ordering. A requirement that documents
59
- existing behavior for verification only says so in one italic line
60
- under its heading - it implies no new build work, only tests. Each
61
- requirement must read on its own, criteria written out in full - no
62
- resolving other documents to know what to build.
63
-
64
- A requirement is one thing a PO can approve or reject whole. Where its
65
- criteria fall into groups that need their own headings or labels to
66
- stay readable, the cut is wrong and those groups are separate
67
- requirements - a label inside the criteria list is the signal, never
68
- the remedy, because a reader signs the requirement and nobody scans
69
- dozens of criteria for the one that is missing.
70
-
71
- Three cases go missing by default, so state or consciously exclude each
72
- one per requirement: the identifier that resolves to nothing; the
73
- multi-item operation where one item fails and the others must still
74
- succeed; and the dependency that is unreachable rather than merely
75
- returning an error. Where one genuinely does not apply, say so in the
76
- test notes - an absence nobody explains reads as an oversight, and
77
- usually is one.
78
-
79
- ### Requirement 1: <Short title>
80
-
81
- **User Story:** As a <role>, I want <capability>, so that <benefit>.
82
-
83
- #### Acceptance Criteria
84
-
85
- State WHAT the system observably does - HOW it's built and
86
- tested (repos, endpoints, test levels) belongs to design.md. Write
87
- every line in the product's language the PO can sign: a line that
88
- needs a service name, endpoint, header, transaction, or storage type
89
- is carrying a design fact - move the fact to design.md and restate the
90
- line in product terms. Include
91
- at least one criterion that exercises a real boundary (a persisted
92
- save, a call across a service, a full user action), not just
93
- logic/validation. State when the action must NOT apply - the entity
94
- states or conditions under which nothing is recorded or changed.
95
- Every surface the changed data reaches - reports, exports, emails,
96
- templates/merge fields, APIs - appears in some criterion. Name the
97
- concrete limit where one exists; a testable number beats an
98
- abstraction. Persona- or flag-specific behavior is its own
99
- criterion (the WHERE form) - for flag-gated work, state the flag-OFF
100
- behavior ("as today") as a criterion too, in product terms, never
101
- naming the flag key: the key and rollout mechanics are design's
102
- Dec-<n>. An NFR measurable as a single trigger/response (e.g. a
103
- response-time target) is a numbered criterion here; cross-cutting NFR
104
- facts belong to design's Non-Functional Requirements section - never
105
- a section here.
106
-
107
- 1. WHEN <trigger> THEN THE SYSTEM SHALL <behaviour>.
108
- 2. IF <error/edge condition> THEN THE SYSTEM SHALL <behaviour>.
109
- 3. WHERE <context/persona/configuration> THE SYSTEM SHALL
110
- <behaviour>.
111
-
112
- **Test notes** (optional) - only when there's something real to say:
113
- data or situations worth testing, anything only checkable by hand and
114
- why, or a persona whose path needs separate verification.
115
-
116
- ### Requirement 2: <Short title>
117
-
118
- **User Story:** As a <role>, I want <capability>, so that <benefit>.
119
-
120
- #### Acceptance Criteria
121
-
122
- 1. WHEN <trigger> THEN THE SYSTEM SHALL <behaviour>.
123
- 2. WHEN <trigger> THEN THE SYSTEM SHALL <behaviour>.
124
-
125
- ## Out of Scope
126
-
127
- Concrete exclusions a reviewer could otherwise reasonably assume were
128
- in scope - a functional variant, persona, legacy surface, or
129
- integration. Ground each in the inputs - the PRD, the code, an
130
- answered question - don't invent them here. State permanent boundary or
131
- deferred phase - never ambiguous - and the consequence the product
132
- lives with (e.g. "no criterion can be written for it, so there is no
133
- test for it either").
134
-
135
- - **<Excluded item, e.g. "Portal v1">** - <why>. <Permanent, or
136
- "planned for a future phase - <link or 'not yet scheduled'>">.
137
- <The consequence the product lives with.>
138
-
139
- ## Open Questions
140
-
141
- Questions raised while drafting these requirements. Name the
142
- requirement a question blocks, if any.
143
-
144
- - **QN-1** <question>
145
-
146
- ## Answered Questions
147
-
148
- - **QN-<n>** <question>
149
- **A:** <the decision>
150
- **By:** <name> - <datetime UTC>
151
-
152
- ## Assumptions
153
-
154
- What you decided for yourself and proceeded on - a guess, said so.
155
- Surviving PO sign-off makes it approved. Omit when empty.
156
-
157
- - <assumption> - **if false:** <what changes>
158
-
159
- ## Sign-off
160
-
161
- - **Approved by (PO):** <name> - <UTC>
1
+ # Requirements Document
2
+ Feature : <Feature Name>
3
+
4
+ <!-- The H1 is the literal words `# Requirements Document`, never the
5
+ feature's name: tools that read this file match that line exactly.
6
+
7
+ Your source is `idea.md` when the spec has one: what was asked and
8
+ where it came from. Read what it points at before you draft - every file
9
+ it lists (they sit in the spec folder), and any work item or issue it
10
+ names, through the MCP server for that provider, comments included. A
11
+ description alone means that is all there is: work from it and the
12
+ repository, and invent nothing. Do not re-open the ask: idea settled
13
+ what is being asked; carry its own open questions forward where they
14
+ still block, and add no scope because the ask left room for it. Idea's
15
+ `type` shapes the framing - a `bug` states the wrong behaviour and the
16
+ right one, a `feature` states capability the system should gain - but
17
+ the sections, numbering and EARS forms are the same either way. -->
18
+
19
+ > Standalone template - everything needed to draft and record these
20
+ > requirements is in this file.
21
+ - **Approved by (PO):** <name - filled at approval>
22
+ - **Approved (UTC):** <datetime - filled at approval>
23
+
24
+ ## Introduction
25
+
26
+ A few sentences on the feature, its purpose, and the problem it solves -
27
+ not a design summary or a restatement of the requirements below.
28
+
29
+ ## Glossary
30
+
31
+ Only where artifacts genuinely name one thing differently. One line
32
+ per term: "Customer (canonical) - the mock-ups say 'Client'; the DB
33
+ table is `account`." When a field this feature writes is also
34
+ written by other flows, say so - a reader must not assume it holds
35
+ only this feature's value. A multi-word term is written with
36
+ underscores - `Scheduled_Appointment` - and then written that way
37
+ everywhere in this document, criteria included, so a defined term is
38
+ one greppable token. Omit the section when there's nothing to
39
+ record.
40
+
41
+ ## Personas
42
+
43
+ Only when an audience beyond the user stories' own roles needs
44
+ distinct verification - an integration caller that authenticates
45
+ differently, a participant who sees data a requirement exposes. One
46
+ line per persona: who they are and what makes their path different.
47
+ Omit when the user stories' roles cover everyone.
48
+
49
+ - **<Persona>** - <what makes their path distinct>
50
+
51
+ ## Requirements
52
+
53
+ Each requirement is one clear capability, stated as the PO would state
54
+ it: a user story plus the complete acceptance criteria that verify it.
55
+ Group by what a reader verifies together, never by system or repo - a
56
+ requirement is an outcome, not a component's work list. Requirements
57
+ are not deployment units: no requirement here carries release
58
+ mechanics or dependency ordering. A requirement that documents
59
+ existing behavior for verification only says so in one italic line
60
+ under its heading - it implies no new build work, only tests. Each
61
+ requirement must read on its own, criteria written out in full - no
62
+ resolving other documents to know what to build.
63
+
64
+ A requirement is one thing a PO can approve or reject whole. Where its
65
+ criteria fall into groups that need their own headings or labels to
66
+ stay readable, the cut is wrong and those groups are separate
67
+ requirements - a label inside the criteria list is the signal, never
68
+ the remedy, because a reader signs the requirement and nobody scans
69
+ dozens of criteria for the one that is missing.
70
+
71
+ Three cases go missing by default, so state or consciously exclude each
72
+ one per requirement: the identifier that resolves to nothing; the
73
+ multi-item operation where one item fails and the others must still
74
+ succeed; and the dependency that is unreachable rather than merely
75
+ returning an error. Where one genuinely does not apply, say so in the
76
+ test notes - an absence nobody explains reads as an oversight, and
77
+ usually is one.
78
+
79
+ ### Requirement 1: <Short title>
80
+
81
+ **User Story:** As a <role>, I want <capability>, so that <benefit>.
82
+
83
+ #### Acceptance Criteria
84
+
85
+ State WHAT the system observably does - HOW it's built and
86
+ tested (repos, endpoints, test levels) belongs to design.md. Write
87
+ every line in the product's language the PO can sign: a line that
88
+ needs a service name, endpoint, header, transaction, or storage type
89
+ is carrying a design fact - move the fact to design.md and restate the
90
+ line in product terms. Include
91
+ at least one criterion that exercises a real boundary (a persisted
92
+ save, a call across a service, a full user action), not just
93
+ logic/validation. State when the action must NOT apply - the entity
94
+ states or conditions under which nothing is recorded or changed.
95
+ Every surface the changed data reaches - reports, exports, emails,
96
+ templates/merge fields, APIs - appears in some criterion. Name the
97
+ concrete limit where one exists; a testable number beats an
98
+ abstraction. Persona- or flag-specific behavior is its own
99
+ criterion (the WHERE form) - for flag-gated work, state the flag-OFF
100
+ behavior ("as today") as a criterion too, in product terms, never
101
+ naming the flag key: the key and rollout mechanics are design's
102
+ Dec-<n>. An NFR measurable as a single trigger/response (e.g. a
103
+ response-time target) is a numbered criterion here; cross-cutting NFR
104
+ facts belong to design's Non-Functional Requirements section - never
105
+ a section here.
106
+
107
+ 1. WHEN <trigger> THEN THE SYSTEM SHALL <behaviour>.
108
+ 2. IF <error/edge condition> THEN THE SYSTEM SHALL <behaviour>.
109
+ 3. WHERE <context/persona/configuration> THE SYSTEM SHALL
110
+ <behaviour>.
111
+
112
+ **Test notes** (optional) - only when there's something real to say:
113
+ data or situations worth testing, anything only checkable by hand and
114
+ why, or a persona whose path needs separate verification.
115
+
116
+ ### Requirement 2: <Short title>
117
+
118
+ **User Story:** As a <role>, I want <capability>, so that <benefit>.
119
+
120
+ #### Acceptance Criteria
121
+
122
+ 1. WHEN <trigger> THEN THE SYSTEM SHALL <behaviour>.
123
+ 2. WHEN <trigger> THEN THE SYSTEM SHALL <behaviour>.
124
+
125
+ ## Out of Scope
126
+
127
+ Concrete exclusions a reviewer could otherwise reasonably assume were
128
+ in scope - a functional variant, persona, legacy surface, or
129
+ integration. Ground each in the inputs - the PRD, the code, an
130
+ answered question - don't invent them here. State permanent boundary or
131
+ deferred phase - never ambiguous - and the consequence the product
132
+ lives with (e.g. "no criterion can be written for it, so there is no
133
+ test for it either").
134
+
135
+ - **<Excluded item, e.g. "Portal v1">** - <why>. <Permanent, or
136
+ "planned for a future phase - <link or 'not yet scheduled'>">.
137
+ <The consequence the product lives with.>
138
+
139
+ ## Open Questions
140
+
141
+ Questions raised while drafting these requirements. Name the
142
+ requirement a question blocks, if any.
143
+
144
+ - **QN-1** <question>
145
+
146
+ ## Answered Questions
147
+
148
+ - **QN-<n>** <question>
149
+ **A:** <the decision>
150
+ **By:** <name> - <datetime UTC>
151
+
152
+ ## Assumptions
153
+
154
+ What you decided for yourself and proceeded on - a guess, said so.
155
+ Surviving PO sign-off makes it approved. Omit when empty.
156
+
157
+ - <assumption> - **if false:** <what changes>
158
+
159
+ ## Sign-off
160
+
161
+ - **Approved by (PO):** <name> - <UTC>
@@ -1,90 +1,90 @@
1
- # Implement the named tasks
2
-
3
- You are implementing tasks from the approved `tasks.md` of this
4
- feature - **exactly the ones named in your instructions, nothing else**:
5
- not a related task, not an improvement you spotted.
6
-
7
- ## Scope
8
-
9
- - Read `requirements.md`, `design.md` (when the spec has one) and
10
- `tasks.md` from the spec folder before writing any code. A document stamped
11
- `> STALE:` is not implementable - stop and say so.
12
- - Implement only what the named task describes, the way the design
13
- says. If the task references requirements, satisfy exactly those.
14
- - A task's anchors are file paths plus symbols. An anchor that does not
15
- resolve is one of two things, and they are not handled the same way.
16
- Where the file exists elsewhere under an obviously equivalent path,
17
- or the symbol has moved within the repo, that is drift: re-resolve
18
- it, record the correction in `code-findings.md`, and carry on. Where
19
- nothing in the repo carries that symbol at all, the anchor was never
20
- right: stop, and report it as a defect in `tasks.md` rather than a
21
- change in the code. Never guess a replacement in either case.
22
- - Include the task's tests. Run what can be run.
23
- - Touch only the files the task requires. If a task cannot be
24
- implemented as written, stop and say why instead of improvising -
25
- that is a finding for the human, not a licence to redesign.
26
- - **A true blocker: check `decisions.md`, then ask the person once only
27
- if it has no answer.** Update that question-and-answer pair with their
28
- answer. If nobody answers, stop and report - never proceed on a guess.
29
- - Never commit, push, or open a pull request unless explicitly told to.
30
-
31
- ## Waves - what may run at the same time
32
-
33
- `tasks.md` ends with a `## Task Dependency Graph`: a `waves` array
34
- saying which tasks are safe to run concurrently, built from each task's
35
- `Files:` line so that tasks sharing a wave touch disjoint files. Read
36
- those lines before fanning out; if two tasks in the wave name the same
37
- path, work those two one after the other.
38
-
39
- - If you can delegate to sub-agents, do - one sub-agent per task, one
40
- task each, told to stay inside its task's files. If you cannot, work
41
- them one at a time.
42
- - **Never start a later wave until every task in the current wave is
43
- finished and ticked.** Waves are a barrier, not a suggestion.
44
- - **You own `tasks.md`. Sub-agents never write to it.** They report
45
- back; you tick each box yourself after each reports success.
46
- - The same ownership applies to `code-findings.md`: check it before
47
- searching the repository, and append what a task's work uncovers -
48
- one line per fact: repo, file or symbol, the fact. Sub-agents report
49
- findings back; you append them.
50
- - If a task in a wave fails: tick the ones that succeeded, leave the
51
- failed one unticked, say what broke, and **stop** - never roll into
52
- the next wave.
53
-
54
- ## Every task ends green
55
-
56
- The repository builds and its tests pass at the end of every task - not
57
- at the end of the plan. With the feature flag off, behavior is exactly
58
- today's at every stopping point: a half-wired path is unreachable, never
59
- broken. When several tasks share a wave, the guarantee lands when the
60
- wave completes.
61
-
62
- The final verification group records real outcomes per suite - a result
63
- is what actually ran, never an assumption. Anything unrunnable in this
64
- environment is named for CI, not reported green.
65
-
66
- ## When done - the checkbox is the contract
67
-
68
- A task is not complete until its checkbox in `tasks.md` is ticked
69
- (`- [x]`). In order, as the final acts of each task:
70
-
71
- 1. Verify what you built - run the task's tests.
72
- 2. Call the `task_done` tool with the task's id (`1.2`). It ticks
73
- exactly that box and changes nothing else. Never open or edit
74
- `tasks.md` to tick a box - not the text, not the numbering, not the
75
- graph; the tool is the only way a box gets ticked.
76
- 3. Summarize what changed and why, in one short paragraph, and name
77
- every file you created or edited for it - the same list your final
78
- `## Changed` section gathers up across all the tasks you were handed.
79
- The panel reads that list; it is how a person sees what the wave
80
- touched without opening the chat.
81
-
82
- If a task could not be completed, leave its box unticked, state what
83
- blocked you, and stop there. An honest unticked box is correct; a
84
- ticked box over unfinished work breaks the plan for everyone.
85
-
86
- ## The plan's shape
87
-
88
- The attached grammar owns the checkbox spacing, tick marks and the
89
- `## Task Dependency Graph` fence - the implement lens parses those
90
- lines. Keep every line you touch to that shape.
1
+ # Implement the named tasks
2
+
3
+ You are implementing tasks from the approved `tasks.md` of this
4
+ feature - **exactly the ones named in your instructions, nothing else**:
5
+ not a related task, not an improvement you spotted.
6
+
7
+ ## Scope
8
+
9
+ - Read `requirements.md`, `design.md` (when the spec has one) and
10
+ `tasks.md` from the spec folder before writing any code. A document stamped
11
+ `> STALE:` is not implementable - stop and say so.
12
+ - Implement only what the named task describes, the way the design
13
+ says. If the task references requirements, satisfy exactly those.
14
+ - A task's anchors are file paths plus symbols. An anchor that does not
15
+ resolve is one of two things, and they are not handled the same way.
16
+ Where the file exists elsewhere under an obviously equivalent path,
17
+ or the symbol has moved within the repo, that is drift: re-resolve
18
+ it, record the correction in `code-findings.md`, and carry on. Where
19
+ nothing in the repo carries that symbol at all, the anchor was never
20
+ right: stop, and report it as a defect in `tasks.md` rather than a
21
+ change in the code. Never guess a replacement in either case.
22
+ - Include the task's tests. Run what can be run.
23
+ - Touch only the files the task requires. If a task cannot be
24
+ implemented as written, stop and say why instead of improvising -
25
+ that is a finding for the human, not a licence to redesign.
26
+ - **A true blocker: check `decisions.md`, then ask the person once only
27
+ if it has no answer.** Update that question-and-answer pair with their
28
+ answer. If nobody answers, stop and report - never proceed on a guess.
29
+ - Never commit, push, or open a pull request unless explicitly told to.
30
+
31
+ ## Waves - what may run at the same time
32
+
33
+ `tasks.md` ends with a `## Task Dependency Graph`: a `waves` array
34
+ saying which tasks are safe to run concurrently, built from each task's
35
+ `Files:` line so that tasks sharing a wave touch disjoint files. Read
36
+ those lines before fanning out; if two tasks in the wave name the same
37
+ path, work those two one after the other.
38
+
39
+ - If you can delegate to sub-agents, do - one sub-agent per task, one
40
+ task each, told to stay inside its task's files. If you cannot, work
41
+ them one at a time.
42
+ - **Never start a later wave until every task in the current wave is
43
+ finished and ticked.** Waves are a barrier, not a suggestion.
44
+ - **You own `tasks.md`. Sub-agents never write to it.** They report
45
+ back; you tick each box yourself after each reports success.
46
+ - The same ownership applies to `code-findings.md`: check it before
47
+ searching the repository, and append what a task's work uncovers -
48
+ one line per fact: repo, file or symbol, the fact. Sub-agents report
49
+ findings back; you append them.
50
+ - If a task in a wave fails: tick the ones that succeeded, leave the
51
+ failed one unticked, say what broke, and **stop** - never roll into
52
+ the next wave.
53
+
54
+ ## Every task ends green
55
+
56
+ The repository builds and its tests pass at the end of every task - not
57
+ at the end of the plan. With the feature flag off, behavior is exactly
58
+ today's at every stopping point: a half-wired path is unreachable, never
59
+ broken. When several tasks share a wave, the guarantee lands when the
60
+ wave completes.
61
+
62
+ The final verification group records real outcomes per suite - a result
63
+ is what actually ran, never an assumption. Anything unrunnable in this
64
+ environment is named for CI, not reported green.
65
+
66
+ ## When done - the checkbox is the contract
67
+
68
+ A task is not complete until its checkbox in `tasks.md` is ticked
69
+ (`- [x]`). In order, as the final acts of each task:
70
+
71
+ 1. Verify what you built - run the task's tests.
72
+ 2. Call the `task_done` tool with the task's id (`1.2`). It ticks
73
+ exactly that box and changes nothing else. Never open or edit
74
+ `tasks.md` to tick a box - not the text, not the numbering, not the
75
+ graph; the tool is the only way a box gets ticked.
76
+ 3. Summarize what changed and why, in one short paragraph, and name
77
+ every file you created or edited for it - the same list your final
78
+ `## Changed` section gathers up across all the tasks you were handed.
79
+ The panel reads that list; it is how a person sees what the wave
80
+ touched without opening the chat.
81
+
82
+ If a task could not be completed, leave its box unticked, state what
83
+ blocked you, and stop there. An honest unticked box is correct; a
84
+ ticked box over unfinished work breaks the plan for everyone.
85
+
86
+ ## The plan's shape
87
+
88
+ The attached grammar owns the checkbox spacing, tick marks and the
89
+ `## Task Dependency Graph` fence - the implement lens parses those
90
+ lines. Keep every line you touch to that shape.