qfai 2.3.0 → 2.4.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 (128) hide show
  1. package/README.md +23 -3
  2. package/assets/init/.claude/settings.json +35 -1
  3. package/assets/init/.codex/hooks.json +24 -0
  4. package/assets/init/.github/instructions/code-review.instructions.md +1 -1
  5. package/assets/init/.qfai/assistant/agent/architecture-reviewer.md +2 -2
  6. package/assets/init/.qfai/assistant/agent/fullstack-engineer.md +32 -4
  7. package/assets/init/.qfai/assistant/agent/implementation-reviewer.md +4 -4
  8. package/assets/init/.qfai/assistant/agent/product-surface-reviewer.md +7 -3
  9. package/assets/init/.qfai/assistant/agent/requirements-reviewer.md +2 -2
  10. package/assets/init/.qfai/assistant/rule/agent-selection.md +1 -1
  11. package/assets/init/.qfai/assistant/rule/communication.md +1 -1
  12. package/assets/init/.qfai/assistant/rule/constitution.md +77 -242
  13. package/assets/init/.qfai/assistant/rule/drift-protocol.md +30 -164
  14. package/assets/init/.qfai/assistant/rule/references/asset-authoring.md +3 -2
  15. package/assets/init/.qfai/assistant/rule/references/gate-failure-autorepair.md +2 -2
  16. package/assets/init/.qfai/assistant/rule/references/placeholder-scan.md +2 -3
  17. package/assets/init/.qfai/assistant/rule/references/reviewer-findings.md +3 -3
  18. package/assets/init/.qfai/assistant/rule/references/worker-edit-boundary.md +12 -3
  19. package/assets/init/.qfai/assistant/rule/review-convergence.md +6 -6
  20. package/assets/init/.qfai/assistant/rule/shared-skill-delegation-baseline.md +6 -6
  21. package/assets/init/.qfai/assistant/rule/shared-skill-operating-baseline.md +17 -17
  22. package/assets/init/.qfai/assistant/rule/test-layers.md +1 -1
  23. package/assets/init/.qfai/assistant/rule/thinking.md +2 -2
  24. package/assets/init/.qfai/assistant/rule/ui-definition-protocol.md +5 -5
  25. package/assets/init/.qfai/assistant/rule/ui-procurement.md +1 -1
  26. package/assets/init/.qfai/assistant/rule/workflow.md +12 -12
  27. package/assets/init/.qfai/assistant/skill/qfai-configure/SKILL.md +12 -14
  28. package/assets/init/.qfai/assistant/skill/qfai-discussion/SKILL.md +2 -4
  29. package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/03_Story-Workshop.md +1 -2
  30. package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/uiux/50_review_input_bundle.md +4 -3
  31. package/assets/init/.qfai/assistant/skill/qfai-grill/SKILL.md +1 -3
  32. package/assets/init/.qfai/assistant/skill/qfai-grilling/SKILL.md +30 -43
  33. package/assets/init/.qfai/assistant/skill/qfai-grilling/references/confirmation-sheet.md +71 -0
  34. package/assets/init/.qfai/assistant/skill/qfai-grilling/references/delegated-session.md +18 -1
  35. package/assets/init/.qfai/assistant/skill/qfai-implement/SKILL.md +2 -4
  36. package/assets/init/.qfai/assistant/skill/qfai-implement/references/parallelization-policy.md +3 -3
  37. package/assets/init/.qfai/assistant/skill/qfai-implement/references/ui-affecting.md +35 -2
  38. package/assets/init/.qfai/assistant/skill/qfai-maintain/SKILL.md +2 -4
  39. package/assets/init/.qfai/assistant/skill/qfai-migration-v1-to-v2/SKILL.md +0 -2
  40. package/assets/init/.qfai/assistant/skill/qfai-migration-v1-to-v2/references/migration-guide.md +2 -3
  41. package/assets/init/.qfai/assistant/skill/qfai-prototyping/SKILL.md +5 -6
  42. package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/generator-prompt.md +75 -4
  43. package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/handoff.md +2 -1
  44. package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/iteration-loop.md +58 -3
  45. package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/review-payload-schema.md +11 -2
  46. package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/reviewer-prompt.md +41 -10
  47. package/assets/init/.qfai/assistant/skill/qfai-run/SKILL.md +7 -8
  48. package/assets/init/.qfai/assistant/skill/qfai-run/references/extraction.md +12 -7
  49. package/assets/init/.qfai/assistant/skill/qfai-run/references/stage-points.md +1 -1
  50. package/assets/init/.qfai/assistant/skill/qfai-sdd/SKILL.md +10 -12
  51. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/concrete-abstract-cycle.md +25 -27
  52. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/contract-artifact-rules.md +8 -10
  53. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/design-anti-patterns.md +36 -3
  54. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/design-md-authoring.md +8 -9
  55. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/requirements-decomposition.md +6 -6
  56. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-execution-playbook.md +6 -6
  57. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-phase-checklists.md +5 -5
  58. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-pre-draft-grilling.md +5 -5
  59. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-quality-gate.md +3 -3
  60. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-triage.md +115 -199
  61. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/spec-traceability-rules.md +25 -25
  62. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/ui-contract-guide.md +23 -113
  63. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/ui-design-contract-normalization.md +2 -2
  64. package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/contracts/ui-contract.sample.yaml +8 -7
  65. package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/03_contract/tech.md +1 -0
  66. package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/decisions/page-NNNN.md +2 -2
  67. package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/decisions.md +59 -31
  68. package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/open-questions.md +15 -11
  69. package/assets/init/.qfai/assistant/skill/qfai-triage/SKILL.md +1 -3
  70. package/assets/init/.qfai/assistant/skill/qfai-verify/SKILL.md +2 -4
  71. package/assets/init/.qfai/assistant/skill/qfai-verify/references/verify-output-contract.md +1 -1
  72. package/assets/init/.qfai/assistant/skill/web-research/SKILL.md +1 -3
  73. package/assets/init/.qfai/assistant/step/common-design-md/STEP.md +9 -9
  74. package/assets/init/.qfai/assistant/step/common-gate-run/STEP.md +2 -2
  75. package/assets/init/.qfai/assistant/step/common-grilling-record/STEP.md +3 -3
  76. package/assets/init/.qfai/assistant/step/common-policy-check/STEP.md +1 -1
  77. package/assets/init/.qfai/assistant/step/common-review-cycle/STEP.md +6 -4
  78. package/assets/init/.qfai/assistant/step/discussion-interview/STEP.md +7 -7
  79. package/assets/init/.qfai/assistant/step/discussion-pack/STEP.md +43 -0
  80. package/assets/init/.qfai/assistant/step/implement-acceptance/STEP.md +1 -1
  81. package/assets/init/.qfai/assistant/step/implement-dep-bump/STEP.md +11 -13
  82. package/assets/init/.qfai/assistant/step/implement-procedure/STEP.md +1 -1
  83. package/assets/init/.qfai/assistant/step/implement-regression-fix/STEP.md +2 -2
  84. package/assets/init/.qfai/assistant/step/implement-scaffold/STEP.md +5 -5
  85. package/assets/init/.qfai/assistant/step/implement-tdd/STEP.md +7 -8
  86. package/assets/init/.qfai/assistant/step/maintain-edit/STEP.md +17 -17
  87. package/assets/init/.qfai/assistant/step/prototyping-grill/STEP.md +1 -1
  88. package/assets/init/.qfai/assistant/step/prototyping-loop/STEP.md +89 -12
  89. package/assets/init/.qfai/assistant/step/sdd-contract/STEP.md +16 -15
  90. package/assets/init/.qfai/assistant/step/sdd-cycle/STEP.md +7 -8
  91. package/assets/init/.qfai/assistant/step/sdd-flow/STEP.md +25 -4
  92. package/assets/init/.qfai/assistant/step/sdd-story/STEP.md +6 -6
  93. package/assets/init/.qfai/assistant/step/sdd-triage/STEP.md +66 -75
  94. package/assets/init/.qfai/assistant/step/triage-operate/STEP.md +29 -15
  95. package/assets/init/.qfai/assistant/step/verify-commit/STEP.md +2 -4
  96. package/assets/init/.qfai/assistant/step/verify-context/STEP.md +1 -1
  97. package/assets/init/root/.agents/rules/ai-readable-markdown.md +8 -1
  98. package/assets/init/root/.agents/rules/delegation-steering.md +69 -0
  99. package/assets/init/root/.agents/rules/grilling.md +72 -43
  100. package/assets/init/root/.agents/rules/minimal-implementation.md +5 -5
  101. package/assets/init/root/.agents/rules/reply-forms.md +191 -0
  102. package/assets/init/root/.agents/rules/session-feedback.md +104 -27
  103. package/assets/init/root/.agents/rules/user-questions.md +6 -1
  104. package/assets/init/root/.gitattributes +5 -6
  105. package/assets/init/root/AGENTS.md +4 -2
  106. package/assets/mdschema/story/03_contract/tech.mdschema.yml +1 -1
  107. package/assets/mdschema/story/decisions/page-NNNN.mdschema.yml +3 -3
  108. package/assets/mdschema/story/decisions.mdschema.yml +4 -4
  109. package/assets/mdschema/story/open-questions.mdschema.yml +3 -3
  110. package/assets/schemas/workflow/extraction.schema.json +0 -2
  111. package/dist/cli/index.cjs +3749 -3029
  112. package/dist/cli/index.cjs.map +1 -1
  113. package/dist/cli/index.mjs +3718 -3006
  114. package/dist/cli/index.mjs.map +1 -1
  115. package/dist/hook/turn-end.cjs +1022 -0
  116. package/dist/hook/turn-end.cjs.map +1 -0
  117. package/dist/hook/turn-end.d.cts +2 -0
  118. package/dist/hook/turn-end.d.ts +2 -0
  119. package/dist/hook/turn-end.mjs +998 -0
  120. package/dist/hook/turn-end.mjs.map +1 -0
  121. package/dist/index.cjs +3626 -3577
  122. package/dist/index.cjs.map +1 -1
  123. package/dist/index.d.cts +19 -3
  124. package/dist/index.d.ts +19 -3
  125. package/dist/index.mjs +3544 -3498
  126. package/dist/index.mjs.map +1 -1
  127. package/package.json +2 -2
  128. package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/change-request.md +0 -52
@@ -7,9 +7,8 @@ Triage selects the smallest story-tree change that answers each incoming require
7
7
  - Inputs
8
8
  - Operation choice
9
9
  - Decision and question rows
10
- - Published decision prefix recovery
11
- - Merge-added identical decision copy recovery
12
- - Approval and no-question mode
10
+ - Where a decision's result lives
11
+ - Critical decisions and no-question mode
13
12
  - Retiring an EX, AC or BR
14
13
  - ID allocation
15
14
  - Conflicted story-tree documents
@@ -20,7 +19,7 @@ Triage selects the smallest story-tree change that answers each incoming require
20
19
  - The selected source and its requirement IDs, if present.
21
20
  - Existing 01_policy/, 02_business-flow/, 03_contract/, decisions.md, and open-questions.md.
22
21
  - .qfai/assistant/rule/change-classification.md for Primary and Tags.
23
- - .qfai/assistant/rule/drift-protocol.md for rejected options and approved change requests.
22
+ - .qfai/assistant/rule/drift-protocol.md for rejected options and critical decisions.
24
23
 
25
24
  Read the flow and story indexes plus concrete files. A subject match alone is insufficient: verify that the existing flow's purpose and observable outcomes can express the requirement.
26
25
 
@@ -28,59 +27,61 @@ Read the flow and story indexes plus concrete files. A subject match alone is in
28
27
 
29
28
  Choose one primary operation for each affected BF or US. UPDATE is the default when the existing item keeps its identity
30
29
  and purpose. Its sub-operation is written UPDATE:APPEND, UPDATE:MODIFY, or UPDATE:REMOVE. CREATE is used when no existing item represents the new
31
- outcome. DELETE, SPLIT, MERGE, and SUPERSEDE change identity or scope and require explicit approval. UPDATE:REMOVE also
32
- requires approval. A supporting contract update is named in the same decision's Approach or in a linked row; it is not a
30
+ outcome. DELETE, SPLIT, MERGE, and SUPERSEDE change identity or scope, and UPDATE:MODIFY and UPDATE:REMOVE change what
31
+ an existing item states: each is a critical decision, as Critical decisions and no-question mode says. A supporting contract update is named in the same decision's Approach or in a linked row; it is not a
33
32
  second fictional flow.
34
33
 
35
34
  Inspect the impact cascade: policy → BF → US → AC → EX → enforcing contract, then every other flow or contract that cites the changed item. Record companion changes. A shared BR remains in its authoritative contract, and no other contract cites it.
36
35
 
37
36
  ## Decision and question rows
38
37
 
39
- Use <paths.specsDir>/decisions.md and <paths.specsDir>/open-questions.md, each with exactly ID, Content, Approach, Status. Append a row; later only Status may change, including to `PARTLY SUPERSEDED (by DEC-NNNN)` when a later row narrows a decision without replacing it.
40
- Do not edit the first three cells or remove the row, except for explicit branch-added decision renumbering under ID allocation below
41
- or the bounded published decision prefix recovery below, and remove a row only as a proven surplus copy under the merge-added
42
- identical decision copy recovery below. Inherited rows retain those cells. Use the next highest ID in the table plus one; for DEC, include every listed page and the root tail. A retired item still reserves its BF or US ID.
38
+ Use <paths.specsDir>/decisions.md and <paths.specsDir>/open-questions.md, each with exactly ID, Content and Approach.
39
+ A new decisions.md row takes `DEC-yyyymmddhhMMss` and a new open-questions.md row `OQ-yyyymmddhhMMss`: the UTC
40
+ time the row is written, as 14 digits. When a row of the same register already holds that second, take the next
41
+ second no row holds. A legacy `DEC-NNNN` or `OQ-NNNN` row keeps its ID; a row the branch adds never takes that form.
43
42
 
44
- decisions.md records only what the user decided: each change request the user approved or declined,
45
- and each critical decision the user made. A row is appended once the user has decided what it records.
46
- A decision the agent took, an approval-free change and a finding it dropped append no row; the final report lists the
47
- decisions the agent took.
43
+ A decisions.md row is appended once the decision is made and afterwards keeps its ID and is never removed or renumbered; only its wording may be restated. A
44
+ later decision that refers to an earlier row is a new row whose Approach opens with the earlier ID:
45
+ `Supersedes DEC-…` when it replaces it, `Narrows DEC-…` when it replaces part of it, and `Reopens DEC-…` when it
46
+ reopens a declined option. The earlier row stays as written. The order of rows in the file means nothing: a merge
47
+ may interleave the rows two branches appended. The base and the head are compared by row ID, on the three cells.
48
+
49
+ decisions.md records only decisions the user made, approvals of critical decisions and releases included, that
50
+ pass the recording test at the top of `templates/spec/decisions.md`: hard to reverse, surprising to a reader without
51
+ context, and the result of a real trade-off. A row is appended once the user has decided what it records. A decision
52
+ the agent took, a decision that fails the test and a finding it dropped append no row; the final report states them.
53
+ Anything not decided yet is an open-questions.md row.
48
54
 
49
55
  A decision row's Approach takes the form stated at the top of `templates/spec/decisions.md`. What this file asks an Approach to state goes inside that form.
50
56
 
51
- A change request is a decision row whose Content begins Change request: and names the
52
- repository-relative paths it changes; an ID there authorizes nothing. Its Approach names the operation and target BF or US, the source as
53
- discussion-<id>#REQ-NNNN when there is one or the actual source path or user requirement otherwise,
54
- the intended files and rationale with the change classification Primary and Tags, and who approved
55
- it, when, and the option chosen. The row starts at WIP and moves to DONE once every change it names
56
- is written. A declined change request is appended at REJECTED, recording in Approach who declined
57
- it and when; it authorizes no edit. Retiring a story removes its directory under the
58
- change request that names it, with no separate retired-story file.
59
-
60
- An existing row at REJECTED is a rejected option. Open questions use OQ-NNNN rows; DEFERRED needs a
61
- specific future decision point. When a decision settles an open question or makes its text wrong, the
62
- `sdd-triage` step says when its Status becomes `DONE (by DEC-NNNN)` or `SUPERSEDED (by DEC-NNNN)`. An unanswered critical product decision is an open-questions.md row
63
- whose Content opens Unadjudicated:, at TODO until decided. A justified test exception opens a
64
- decision Content with Test exception:, names the exact BF, AC, or EX it exempts, and puts the reason
65
- in Approach. It takes effect only at DONE; it never exempts descendant items.
66
-
67
- A test annotation may remain pending only when authority to change the
68
- specification covers that state and the test deferral is approved. Record the
69
- specification change in its own `Change request:` row. Record the deferral as a
70
- `Test exception:` decision naming the exact AC at DONE. Its Approach states
57
+ An option the user rejects is a row whose Content opens `Declined:`, whatever the recording test says,
58
+ recording in Approach who declined it and when; it authorizes nothing. Retiring a story removes its directory, with no separate retired-story file.
59
+
60
+ An open-questions.md row exists exactly while its question is open, and is never edited. When a decision settles
61
+ a question, the same change appends the decision row, which names the OQ ID, and deletes the question row. To
62
+ defer a question already written, delete its row and append a new question row whose Approach names the next
63
+ decision point and says `Replaces OQ-…` with the deleted ID. An unanswered critical product decision is an
64
+ open-questions.md row whose Content opens Unadjudicated:, pending while the row exists.
65
+
66
+ A justified test exception opens a decision Content with Test exception:, names the exact BF, AC, or EX it
67
+ exempts, and puts the reason in Approach. It holds while the row exists, and a decision row is never removed; it never
68
+ exempts descendant items.
69
+
70
+ A test annotation may remain pending only when the user approved the test
71
+ deferral. Record the deferral as a `Test exception:` decision naming the exact AC. Its Approach states
71
72
  the reason, untested scope, owner, next decision date and condition for restoring
72
73
  the annotation.
73
74
 
74
- DONE establishes the exception decision; it does not mean test completion.
75
+ The row records the exception decision; it does not mean test completion.
75
76
  The existing info finding names the exempted AC and its decision without
76
77
  claiming test execution or coverage. The exception never exempts descendant EX
77
78
  obligations or authorizes changes to EX or BR scope. Do not silently substitute
78
- an EX or prose rewrite for an approved specification change. Use the next
79
+ an EX or prose rewrite for the specification change. Use the next
79
80
  decision date for manual review; there is no automatic expiry and no automatic
80
81
  warning.
81
82
 
82
- When specification changes are forbidden or either authority is missing, first
83
- append an `Unadjudicated:` OQ at TODO. Name the affected IDs, expected versus
83
+ When specification changes are forbidden or the deferral is not approved, first
84
+ append an `Unadjudicated:` question row. Name the affected IDs, expected versus
84
85
  actual behavior, implementation-change evidence, owner and required permission.
85
86
  Stop dependent AC, EX and BR edits; independent authorized work may continue.
86
87
 
@@ -90,126 +91,88 @@ The root may have one optional `## Decision pages` section before its unique
90
91
  `## Decisions` section. Its body holds only unique direct
91
92
  `- decisions/page-NNNN.md` entries with four digits; links, annotations, nested
92
93
  paths, traversal and unrelated prose are invalid. A page has `# Decisions`,
93
- one `## Decisions` section and one closed ID, Content, Approach, Status table.
94
- It has no page index or other section. The root retains its own four-column table.
94
+ one `## Decisions` section and one closed ID, Content, Approach table.
95
+ It has no page index or other section. The root retains its own three-column table.
95
96
 
96
- Read pages in list order, followed by the root table. This is one logical
97
- register: ID allocation, duplicate detection, retirement references and Status
98
- permissions include every row. Append new rows only to the root table.
99
- A root without a page list remains a valid legacy register and is read in full.
100
- Read errors or an incomplete inventory stop permission and allocation decisions.
97
+ Read pages in list order, followed by the root table. This is one
98
+ register: ID uniqueness, retirement references and the base-to-head comparison
99
+ include every row. Append new rows only to the root table, which has no line limit; never append a row to a
100
+ page. Never move a row between files. A root without a page list is read in full.
101
+ Read errors or an incomplete inventory stop allocation decisions.
101
102
 
102
- Each physical root and page has at most 500 lines, including comments, blanks,
103
- the index and table wrappers. Oversized files are reported without truncation.
104
103
  Every entry in the decisions directory must be a listed direct page. Register
105
104
  paths must be regular directories and files, without symbolic or hard links.
106
105
  A formatter exclusion preserves reviewed bytes; it does not waive validation.
107
- Use consumers that support the complete register before adopting pages; older
108
- consumers are not assumed to read them.
109
-
110
- Physical relocation needs a separately adopted execution change request and a
111
- reviewed raw-byte receipt for the exact source and target. Preserve every raw
112
- row occurrence, cell, Status, order and line ending; keep the current root tail.
113
- A historical DONE row is not approval to run a later relocation. Do not rotate
114
- automatically, repair Status, remove duplicates or normalize inherited cells.
115
- A read-only proposal or a migration projection grants no permission to write.
116
-
117
- ## Published decision prefix recovery
118
-
119
- When an approved request names a published malformed decision added by the
120
- branch, read `.qfai/assistant/rule/drift-protocol.md#published-decision-prefix-recovery`.
121
- That rule defines the source, byte boundaries, exact prefix and stop conditions.
122
- Approval of the generic protocol alone authorizes no target; append a separate
123
- new target-specific recovery change request using `templates/change-request.md`.
124
-
125
- Record the fixed base and unique common ancestor, absence of the target in both,
126
- the published source commit's ancestry, raw Approach digests and the exact
127
- approved prefix. Immediately before writing, recheck the unique current row,
128
- its original ID, Content and Status, and its old digest. Preserve every original
129
- Approach byte as the suffix and leave every other row unchanged. Recheck the
130
- existing form and validation; status or supersession clears no malformed form.
131
- Record actual results, including any stopped recovery, without claiming an
132
- automatic repair. Inherited records and open-question rows remain excluded.
133
- Rollback follows the recorded new-digest check and restores the original form
134
- failure; it never resets, amends or force pushes.
135
-
136
- ## Merge-added identical decision copy recovery
137
-
138
- When a merge left a second byte-identical copy of an inherited decision and the
139
- duplicate-ID check rejects it, read
140
- `.qfai/assistant/rule/drift-protocol.md#merge-added-identical-decision-copy-recovery`.
141
- That rule defines the lineage, the raw-row proof and the stop conditions.
142
- Approval of the generic protocol alone authorizes no target; append a separate
143
- new target-specific change request using `templates/change-request.md`.
144
-
145
- The request names the exact path, the ID, the bad merge, both parents, the
146
- common ancestor, the base and its comparison ancestor, each occurrence's
147
- location, the raw SHA-256 including the line ending and the retain/remove
148
- mapping. Fresh evidence, reviewed independently after the request is appended,
149
- fixes the actual write HEAD, the complete preimage and replacement hashes and
150
- the current authority. Immediately before writing, recheck refs, path,
151
- authority, counts, mapping and bytes; stale or changed proof stops the
152
- recovery. Remove only the mapped surplus copies. Keep one original and every
153
- other row, reference and byte. Open-question rows, rows that differ in any cell,
154
- padding or line ending, and surplus the base already holds stay excluded.
155
- Duplicate, drift and Status rules apply as before. The result is no whole-target
156
- PASS, and the request stays WIP while any named action or required check is
157
- unfinished. Rollback restores the recorded preimage only while the file still
158
- equals the replacement; it never resets, amends or force pushes.
159
-
160
- ## Approval and no-question mode
161
-
162
- Use the shared user-question protocol for CREATE, DELETE, SPLIT, MERGE, SUPERSEDE, and UPDATE:REMOVE. Present the target and rationale. Do not self-approve. A request from the user in the session that names the operation and its effect is the approval, and no second question is asked.
163
- In --auto, ask no question: append one `open-questions.md` row per pending operation naming it and its target, at TODO with its Content opening Unadjudicated:; stop before the dependent writes, and report every pending operation with its target as open.
164
- Approval-free changes may proceed only if they do not depend on a pending operation.
165
-
166
- Clarifications follow the constitution's question budget. Approval questions are decisions, so they do not consume that clarification budget. A pre-triage answer to continue is not approval for an operation not yet classified.
167
-
168
- ### A change to the story tree
169
-
170
- A story-tree or contract file changes only on the user's approval:
171
-
172
- 1. Show the user the files the stage would change and the proposed change, and
173
- change nothing until the user answers. A request from the user in the
174
- session that names the change and its effect is that answer: the stage lists
175
- the files in its announcement, asks no second question, and records the
176
- request as the option chosen.
177
- 2. On approval, write the change and append one `decisions.md` row whose Content
178
- opens `Change request:` and names every story-tree and contract file it
179
- changed, and `decisions.md` when it appended any other row. Its Approach
180
- records who approved it, when, and the label of the option chosen.
181
- 3. Move the row to DONE once every change it names is written.
182
-
183
- A row present before the stage started keeps its ID, Content and Approach, except for explicit branch-added decision renumbering under ID allocation below or published decision prefix recovery above. Inherited rows keep those cells without exception; the merge-added identical decision copy recovery above removes only surplus copies and keeps the original.
184
- Only a row this stage appended changes its Status.
106
+
107
+ ## Where a decision's result lives
108
+
109
+ Where a decision's result lives, write the current state only, and rewrite it in
110
+ place when the decision changes:
111
+
112
+ - No date, approver, quoted request or history: a decision row or the stage report holds those.
113
+ - One statement per concept, with at most one sentence of reason.
114
+ - `01_policy/` holds a result only when it binds more than one flow or the whole
115
+ product.
116
+ - A non-functional requirement is a contract BR with a measurable threshold and
117
+ an example. Only a product-wide one goes to `constraint.md`.
118
+ - A trivial edit adds no policy or constraint entry and no decision row.
119
+
120
+ ## Critical decisions and no-question mode
121
+
122
+ Use the shared user-question protocol for each critical decision: CREATE, DELETE, SPLIT, MERGE, SUPERSEDE, and UPDATE:REMOVE,
123
+ an UPDATE:MODIFY that changes what an item existing before the stage states, and any other decision
124
+ `.qfai/assistant/rule/drift-protocol.md` calls critical. Present the target and rationale. Do not self-approve. A
125
+ request from the user in the session that names the operation and its effect is the answer, and no second question is
126
+ asked. Any other story-tree or contract change, such as an appended AC, EX or BR, the stage makes itself and lists in
127
+ its report.
128
+ In --auto, ask no question: append one `open-questions.md` row per pending operation naming it and its target, with its Content opening Unadjudicated:; stop before the dependent writes, and report every pending operation with its target as open.
129
+ Other changes may proceed only if they do not depend on a pending operation.
130
+
131
+ Clarifications follow the constitution's question budget. Critical-decision questions are decisions, so they do not consume that clarification budget. A pre-triage answer to continue is not an answer for an operation not yet classified.
132
+
133
+ A decisions.md row present before the stage started keeps its ID and its decision and is never removed, and an open-questions.md row is never edited.
185
134
 
186
135
  ## Retiring an EX, AC or BR
187
136
 
188
137
  A retirement touches every place the ID is written. Do all of them in one change:
189
138
 
190
- 1. Get the user's approval of the UPDATE:REMOVE and append its `Change request:` decision row, whose Content names every retired ID.
139
+ 1. Put the UPDATE:REMOVE to the user as a critical decision, and add one `Retired: <ID>, <ID>…` row to `decisions.md` naming every retired ID.
191
140
  2. Delete the EX row from 03_Example.md, the AC scenario from 02_Acceptance-Criteria.md, or the BR row from its contract.
192
141
  3. Remove a retired EX from the Examples cell of every BR that cites it. A BR left with no example gets another example or is retired in the same row.
193
142
  4. Remove each QFAI:EX annotation of a retired EX from the tests, or point it at the example the test now proves.
194
143
  5. An AC left with no example gets one or is retired in the same row.
195
144
  6. Retiring an AC also retires each EX whose AC-Ref names it, or moves that EX to another AC of the story by changing its AC-Ref, then applies steps 3 and 4 to each EX retired. Remove each QFAI:AC annotation of the retired AC from the tests, or point it at the AC the test now proves.
196
- 7. Never reuse a retired ID. The decision row keeps it counted.
145
+ 7. Never reuse a retired ID.
197
146
 
198
147
  `npx qfai validate` reports what steps 3 to 6 left behind: a BR citing an unknown example (`QFAI-STORY-005`), a test annotation naming an undeclared ID (`QFAI-STORY-008`), and an AC with no example or an EX with an invalid AC-Ref (`QFAI-STORY-004`).
199
148
 
200
149
  ## ID allocation
201
150
 
202
- Read all IDs of the kind in the relevant scope, including IDs named by retirement rows. The next ID is the highest plus one. BF spans the project. US is inside its BF. AC and EX are inside their US.
203
- A contract number spans every contract kind, and a BR is numbered inside its contract. DEC spans the complete ordered decision register; OQ spans its own table.
204
- Empty numeric scopes begin at 0001, and AC/EX tails begin at 01. Do not reuse an ID because its file was removed or a row was rejected.
151
+ Read all IDs of the kind in the relevant scope, including IDs named by decision rows, `Retired:` rows among them. The next ID is the highest plus one. BF spans the project. US is inside its BF. AC and EX are inside their US.
152
+ A contract number spans every contract kind, and a BR is numbered inside its contract.
153
+ Empty numeric scopes begin at 0001, and AC/EX tails begin at 01. Do not reuse an ID because its file was removed or a change was declined.
205
154
  Take the number from `npx qfai sdd next-id <kind> [<parent-ID>] --base <local-ref>` right before writing it: a US names its BF, an AC or EX its US, and a BR its contract.
206
- It reads the working tree and the base ref's commit, a fetched ref such as `origin/main`, and prints the number after the highest of both, not after the last row. It writes nothing and does not see open pull requests.
155
+ It reads the working tree and the base ref's commit, a fetched ref such as `origin/main`, and prints the number after the highest of both, wherever a row sits. It writes nothing and does not see open pull requests.
156
+ A decisions.md or open-questions.md row takes its timestamp ID from the time it is written instead; no count and no other branch decides it.
207
157
 
208
- Read the IDs open pull requests add before taking one. Fetch the base. Where a forge CLI is available, list the open pull requests once per session through its REST API, for example `gh api repos/{owner}/{repo}/pulls?state=open`, and reuse that listing for every ID the session takes.
158
+ Read the IDs open pull requests add before taking a BF, US, AC, EX or BR ID. Fetch the base. Where a forge CLI is available, list the open pull requests once per session through its REST API, for example `gh api repos/{owner}/{repo}/pulls?state=open`, and reuse that listing for every ID the session takes.
209
159
  Fetch each one's head ref, such as `refs/pull/<n>/head`, so a pull request from a fork is read too, and read the IDs it adds from `git diff <base>...<head>`. Take the highest across the base, the working tree and those heads, plus one. Without a forge CLI, read the base alone.
210
- When merging the base into the branch, check each ID the branch adds against the fetched base. The base's item keeps its ID; the branch renumbers its own item and every reference to it, then runs the gates again.
211
- Check a DEC or OQ row before the merge, and renumber a DEC row with `renumber-decision` as below, or an OQ row and its references by hand: the union merge of `decisions.md` and `open-questions.md` would duplicate a colliding ID without a conflict. Check any other ID after the merge.
212
- Keep the change-request row last in `decisions.md`, so the rows the branch added stay in ascending order at the end of the register, where the merge-time renumbering works from the lowest colliding one upward.
160
+ When merging the base into the branch, check each such ID the branch adds against the merged base. The base's item keeps its ID; the branch renumbers its own item and every reference to it, then runs the gates again.
161
+
162
+ ### Register conflicts
163
+
164
+ The shipped `.gitattributes` merges `decisions.md`, its pages and
165
+ `open-questions.md` with `merge=union`. A forge may still show a conflict in
166
+ them. Resolve it by merging the fetched base locally, `git merge origin/<base>`:
167
+ the union merge keeps both sides' rows. Push the merge. Renumber no row, and
168
+ edit or move none, except to delete again a question row the union merge kept
169
+ although one side deleted it, since that deletion settled the question.
170
+
171
+ Two rows left with one ID come only from two rows written in the same second,
172
+ and the duplicate-ID check names that ID. The row the base holds keeps it. The
173
+ branch deletes its own row, which the base does not yet hold, appends it again
174
+ under a new timestamp ID, and updates the citations of it that the branch
175
+ added.
213
176
 
214
177
  ### Capacity before writing
215
178
 
@@ -220,7 +183,7 @@ valid IDs in the tree and decisions, including retired IDs, plus observed
220
183
  published parallel heads and known reservations under the project's existing
221
184
  method. Name the fixed observation and what it did not cover. A snapshot
222
185
  reserves nothing and cannot cover unpublished concurrent work. Read decisions as
223
- the complete ordered register: every listed page followed by the root tail.
186
+ the complete register: every listed page and the root table.
224
187
 
225
188
  If requested additions exceed 99-H, stop before any partial allocation or
226
189
  invalid declaration. Never fill gaps, reuse retired IDs or emit tail 100.
@@ -234,21 +197,21 @@ Only additions exceeding an actual AC or EX scope's remaining 99-H qualify for
234
197
  a capacity-only story partition. Record the source story, affected kind, H,
235
198
  remainder and requested count first. Prefer leaving every published case and ID
236
199
  in place and putting a cohesive incoming group in a capacity-checked sibling
237
- under the same BF and actual actor goal. An in-force owning change request must
238
- explicitly approve this partition and its affected paths before writing.
200
+ under the same BF and actual actor goal. The partition is a critical decision: the user
201
+ answers it, with its affected paths, before writing.
239
202
 
240
203
  State the sibling's truthful cohesive scope and settle each criterion's owner;
241
204
  do not invent a new product outcome, duplicate an obligation or weaken it.
242
- A different actor, goal, flow or intended behavior needs its existing owning
243
- approval path. Additions that fit the original scope do not qualify. Missing
244
- authority, insufficient destination capacity or no truthful partition stops
205
+ A different actor, goal, flow or intended behavior is its own critical
206
+ decision. Additions that fit the original scope do not qualify. A missing
207
+ decision, insufficient destination capacity or no truthful partition stops
245
208
  the dependent write. This prospective split places new overflow cases; moving
246
- an existing case also needs the complete map below. These instructions approve
209
+ an existing case also needs the complete map below. These instructions decide
247
210
  no future specific creation, move or split.
248
211
 
249
212
  ### Actual moves and incoming collisions
250
213
 
251
- Before an approved actual AC/EX move or incoming collision repair, make a
214
+ Before an actual AC/EX move the user decided or incoming collision repair, make a
252
215
  complete one-to-one map of:
253
216
 
254
217
  - the fixed source commit and declaration path;
@@ -261,17 +224,17 @@ complete one-to-one map of:
261
224
  Check both scopes' retired-inclusive capacity. Each destination EX needs one
262
225
  existing destination AC; each AC needs an EX. Preserve every moved EX's
263
226
  owning BR link and counted test obligation. An ID change alone proves no
264
- coverage. Retire old moved IDs in a new approved record and never refill them.
227
+ coverage. Name the old moved IDs in a `Retired:` row, and never refill them.
265
228
  Inherited published DEC ID, Content and Approach cells and their old-ID
266
- references remain historical and unchanged; update only approved active
267
- references.
229
+ references remain historical and unchanged; update only the active
230
+ references the move covers.
268
231
 
269
232
  Keep unaffected published cases and IDs. Identify same-number branch cases by
270
233
  fixed provenance and meaning, and change only the provably incoming item,
271
234
  without blanket replacement. Unknown ownership, ambiguous collisions,
272
235
  uncovered declarations, missing counted test links, changed assertions or an
273
236
  incomplete map stops the move without a completion claim. This is a manual
274
- approval and mapping procedure, not a relocation executor or mapping schema.
237
+ decision and mapping procedure, not a move executor or mapping schema.
275
238
 
276
239
  Two branches can take the same next ID. When a merge leaves one ID on two items:
277
240
 
@@ -284,58 +247,11 @@ Two branches can take the same next ID. When a merge leaves one ID on two items:
284
247
  A citation of the old ID elsewhere is then told apart from the item that kept it.
285
248
 
286
249
  A `decisions.md` or `open-questions.md` row already on the target keeps its ID, Content and Approach.
287
- A row the incoming branch added takes the next ID of its table.
250
+ No register row is renumbered; [Register conflicts](#register-conflicts) covers them.
288
251
  An ID that two merged records already share is not renumbered:
289
- ask the user for a change request row that states which record each citation meant.
290
-
291
- For a unique decision added by the incoming branch, repair its ID before merging:
292
-
293
- ```text
294
- qfai sdd renumber-decision --from <old-DEC-ID> --to <new-DEC-ID> --base <local-ref>
295
- ```
296
-
297
- Renumber once, at merge time. While the pull request is open, keep the
298
- branch's decision IDs even when the base moves. The session that merges it
299
- fetches the base and renumbers only when the fetched base now declares an ID
300
- the branch added. Then it renumbers every row the branch added, from the lowest
301
- colliding one upward and lowest first, so the rows stay in ascending order.
302
- Run on a clean tree against the fetched ref, for example `origin/main`, commit
303
- after each run, then merge the base.
304
-
305
- Check the base before merging. The shipped `.gitattributes` merges
306
- `decisions.md` with `merge=union`, so the ledger never conflicts: a colliding
307
- ID merges silently into two rows with the same ID, and the command then
308
- refuses that ledger as a duplicate. If such a merge is committed but not
309
- pushed, run `git reset --merge ORIG_HEAD`, renumber, and merge again. If it was
310
- pushed, the two records already share the ID: follow the change request rule
311
- earlier in this section.
312
-
313
- The command also refuses a ledger left dirty by a merge that stopped on
314
- conflicts in other files, and writes nothing. Abort the merge with
315
- `git merge --abort`, renumber, and merge again. Then redo any other conflict
316
- resolutions after the second merge.
317
-
318
- The explicit base and HEAD must resolve locally and have one common ancestor
319
- that declares no source row. The base may already use that ID; the current
320
- tree must declare it only once. Choose an unused destination above both story trees'
321
- highest decision number, retired IDs included, within the four-digit grammar.
322
- The command reserves no number and chooses no final number automatically.
323
-
324
- Read the preview's fixed SHAs, IDs, relative paths and replacement lines or
325
- counts. It writes nothing and dumps no original lines or full files. Each
326
- invocation builds its own plan. Run with `--apply` to recheck that invocation's
327
- fixed refs and original bytes before writing; changed refs after a preview can
328
- produce a different plan. Preflight-only
329
- `--format`, `--fail-on`, `--import` and `--assume` are not accepted here.
330
- Only provably branch-added exact references change. Inherited references stay
331
- fixed; ambiguous ownership, dirty or linked candidates, unsupported text or
332
- failed reads stop the whole plan before writing. Unrelated links and dirty
333
- files are not candidates. Apply rechecks original bytes before each write.
334
- Rollback restores a changed file only if its bytes still match this invocation's
335
- replacement, preserving concurrent changes and naming any unrestored path.
336
- These checks guarantee neither atomic concurrency nor power-loss safety.
337
-
338
- A move to another BF changes the story's US ID and all child AC and EX IDs. It follows the existing approval path, not the same-BF capacity exception. Apply the complete map above to approved active citations and retire old IDs in a new approved record; inherited DEC cells and their historical references stay unchanged.
252
+ ask the user, as a critical decision, which record each citation meant.
253
+
254
+ A move to another BF changes the story's US ID and all child AC and EX IDs. It is a critical decision, not the same-BF capacity exception. Apply the complete map above to the active citations and name the old IDs in a `Retired:` row; inherited DEC cells and their historical references stay unchanged.
339
255
 
340
256
  ## Conflicted story-tree documents
341
257
 
@@ -349,7 +265,7 @@ Review the result and stage it with `git add`; it stages nothing itself.
349
265
 
350
266
  ## Completion of triage
351
267
 
352
- Every requirement has a target, an approved or approval-free operation, and a recorded impact path. Every product ambiguity has an OQ. The next stage may write only the approved scope. A rejected option stays excluded until an explicit reopening decision is appended.
268
+ Every requirement has a target, an operation the user decided or the agent took, and a recorded impact path. Every product ambiguity has an OQ. The next stage may write only the triaged scope. A rejected option stays excluded until a decision row whose Approach opens `Reopens DEC-…` is appended.
353
269
 
354
270
  The one exception: a change to shipped seed or sample data whose values no
355
271
  story, BR or contract sets changes no story-tree file. Triage states that in one
@@ -44,7 +44,7 @@ A table the template shows with no rows is complete with no rows. The rules belo
44
44
  | glossary.md | One `## Terms` table: a term and its definition. No finding code, file name, configuration key, value set, rule text, retired term or history; the definition links the contract that defines the thing. A distinction goes in the definition. |
45
45
  | constraint.md | All three sections stay, each one table of ID, Constraint and Rationale, which may have no rows. A row states the limit and its reason in plain words: no file name, command or configuration key, and no BR, EX, AC or contract ID. A constraint a contract enforces is written there as a BR; a layer boundary is a row of tech.md's `## Architecture`. |
46
46
  | tech.md | `## Architecture` is one `mermaid` flowchart TD of the layers, then one table with a row per layer from the uppermost down: its responsibility, and the layers below it that it uses, or `-`. A layer is named, never located: no path, file name or command. See [Architecture](#architecture). |
47
- | decisions.md, open-questions.md | Exactly one table and nothing else. Rows are appended; afterwards only Status changes. |
47
+ | decisions.md, open-questions.md | Exactly one table and nothing else. Rows are appended; a decision row keeps its ID, and a settled question row is deleted. |
48
48
  | business-flows.md | `Flow` is the title in the flow's H1, after its ID, and `Path` is `` `business-flow-NNNN/` ``. Rows are in ID order. |
49
49
  | business-flow.md | `## Purpose` is prose only. `## Flow` is one `mermaid` block, a flowchart or sequenceDiagram, and nothing else. `## Alternate and exception paths` is one list of at least one item. |
50
50
  | user-stories.md | `Story` is the title in the story's H1, after its ID, word for word, and `Path` is `` `user-story-NNNN-NNNN/` ``. Rows are in ID order. |
@@ -76,33 +76,34 @@ The table holds no rule. A behaviour a layer must show is a BR in the contract t
76
76
 
77
77
  ## Identifier scopes
78
78
 
79
- | Kind | Format | Scope |
80
- | -------------------- | --------------- | ----------------------------------------------------- |
81
- | Business flow | BF-NNNN | All business flows |
82
- | User story | US-NNNN-NNNN | Its BF; first number equals the BF number |
83
- | Acceptance criterion | AC-NNNN-NNNN-NN | Its US |
84
- | Example | EX-NNNN-NNNN-NN | Its US |
85
- | Contract | KIND-NNNN | All contracts of every kind; its directory names KIND |
86
- | Business rule | BR-NNNN-NNNN | Its contract; first number equals the contract number |
87
- | Decision | DEC-NNNN | decisions.md |
88
- | Open question | OQ-NNNN | open-questions.md |
79
+ | Kind | Format | Scope |
80
+ | -------------------- | ------------------ | ----------------------------------------------------- |
81
+ | Business flow | BF-NNNN | All business flows |
82
+ | User story | US-NNNN-NNNN | Its BF; first number equals the BF number |
83
+ | Acceptance criterion | AC-NNNN-NNNN-NN | Its US |
84
+ | Example | EX-NNNN-NNNN-NN | Its US |
85
+ | Contract | KIND-NNNN | All contracts of every kind; its directory names KIND |
86
+ | Business rule | BR-NNNN-NNNN | Its contract; first number equals the contract number |
87
+ | Decision | DEC-yyyymmddhhMMss | decisions.md |
88
+ | Open question | OQ-yyyymmddhhMMss | open-questions.md |
89
89
 
90
- Use highest existing number plus one in the scope. Count IDs named in retired-item decisions, so deletion never frees an ID. Empty scopes begin at 0001 or, for AC and EX tails, 01. Directory names match their BF and US IDs. Take the number from `npx qfai sdd next-id`, which reads the working tree and a fetched base and reserves no ID.
90
+ Use highest existing number plus one in the scope. A decision or question row instead takes the UTC time it is written; a legacy `DEC-NNNN` or `OQ-NNNN` row keeps its ID.
91
+ Count IDs named in decision rows, `Retired:` rows among them, so deletion never frees an ID. Empty scopes begin at 0001 or, for AC and EX tails, 01. Directory names match their BF and US IDs. Take the number from `npx qfai sdd next-id`, which reads the working tree and a fetched base and reserves no ID.
91
92
 
92
93
  AC/EX tails remain two digits with upper bound 99. Before planned additions,
93
94
  compare requested additions with the retired-inclusive remaining 99-H. Stop an
94
- over-capacity batch before partial declarations. For an approved capacity-only
95
- sibling or actual move, apply the owning stage's capacity preflight and complete
95
+ over-capacity batch before partial declarations. For a capacity-only sibling or
96
+ actual move the user decided, apply the owning stage's capacity preflight and complete
96
97
  map before writing; no larger ID or new product outcome is a substitute for the
97
98
  required scope.
98
99
 
99
100
  Constraint IDs are the exception. `TC-NN`, `OC-NN` and `BC-NN` in constraint.md are positional: each section numbers its rows from 01 in table order. No other document cites one, so a removed row closes the gap and the rows after it are renumbered. `npx qfai validate` reports a constraint ID that is not its row's place.
100
101
 
101
102
  Moving a story to another flow changes its US ID and every child AC and EX ID
102
- under its existing approval path. Preserve case meanings and assertions through
103
- the complete fixed-source map, update approved active indexes, contract citations
104
- and counted test references. Record the old IDs as retired in a new approved
105
- record so they cannot be issued again. Inherited DEC ID, Content and Approach
103
+ as a critical decision the user answers. Preserve case meanings and assertions
104
+ through the complete fixed-source map, update the active indexes, contract
105
+ citations and counted test references. Name the old IDs as retired in the stage
106
+ report and the commit message so they are not issued again. Inherited DEC ID, Content and Approach
106
107
  cells and their old-ID references stay historical and unchanged.
107
108
 
108
109
  ## Edge rules
@@ -127,16 +128,15 @@ Each contract file written has a contracts.md row in the same change. The index
127
128
 
128
129
  Follow .qfai/assistant/rule/test-layers.md. A BF yields an E2E obligation; each AC yields an API or Integration obligation according to its observable boundary; EXs supply concrete examples and remaining layer obligations. The later acceptance-test skill authors tests. /qfai-sdd supplies unambiguous BF, AC, EX, and contract sources and does not create an execution ledger.
129
130
 
130
- A justified exception is a decisions.md row whose Content opens Test exception: and names the BF, AC, or EX it exempts. Put the reason in Approach. Only a DONE exception is in force; it exempts that item alone, not its descendants. An ID that does not exist exempts nothing.
131
+ A justified exception is a decisions.md row whose Content opens Test exception: and names the BF, AC, or EX it exempts. Put the reason in Approach. It holds while the row exists; it exempts that item alone, not its descendants. An ID that does not exist exempts nothing.
131
132
 
132
133
  ## Decision provenance and drift
133
134
 
134
- decisions.md records only what the user decided: each change request the user approved or declined,
135
- retired stories included, and each critical decision the user made. Open questions are rows of open-questions.md. Both tables have
136
- ID, Content, Approach, Status, and only Status changes after append. The change request's Content
137
- begins Change request: and names its allowed
138
- repository-relative paths. A rejected option remains REJECTED unless
139
- a later decision explicitly reopens it.
135
+ decisions.md records only the decisions the user made, approvals included, that pass the recording test at the top
136
+ of templates/spec/decisions.md. Open questions are rows of open-questions.md. Both tables have
137
+ ID, Content and Approach. A decision row keeps its ID and is never removed; only its wording may be restated. A question row is never edited. A
138
+ declined option (`Declined:`) stays rejected unless a later decision row whose Approach opens
139
+ `Reopens DEC-…` reopens it.
140
140
 
141
141
  A decisions.md row's Approach takes the form stated at the top of templates/spec/decisions.md.
142
142