gennady 0.8.4-draft.2 → 0.8.4-draft.3

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 (146) hide show
  1. package/ai/directives/sdd-v2/root.directive.xml +36 -3
  2. package/ai/directives/sdd-v2/router.directive.xml +22 -1
  3. package/ai/kit/templates/sdd-v2/root.directive.hbs +11 -3
  4. package/ai/kit/templates/sdd-v2/router.directive.hbs +22 -1
  5. package/ai/skills/agent-inbox/SKILL.md +1 -1
  6. package/ai/skills/sdd/SKILL.md +5 -3
  7. package/ai/skills/sdd-audit/SKILL.md +5 -2
  8. package/ai/skills/sdd-check/SKILL.md +2 -2
  9. package/ai/skills/sdd-code-review/SKILL.md +4 -1
  10. package/ai/skills/sdd-critic/SKILL.md +5 -2
  11. package/ai/skills/sdd-execute/SKILL.md +5 -2
  12. package/ai/skills/sdd-reconcile/SKILL.md +5 -2
  13. package/ai/skills/sdd-scaffold/SKILL.md +5 -2
  14. package/dist/ai/directives/sdd-v2/root.directive.xml +36 -3
  15. package/dist/ai/directives/sdd-v2/router.directive.xml +22 -1
  16. package/dist/ai/kit/templates/sdd-v2/root.directive.hbs +11 -3
  17. package/dist/ai/kit/templates/sdd-v2/router.directive.hbs +22 -1
  18. package/dist/ai/skills/agent-inbox/SKILL.md +1 -1
  19. package/dist/ai/skills/sdd/SKILL.md +5 -3
  20. package/dist/ai/skills/sdd-audit/SKILL.md +5 -2
  21. package/dist/ai/skills/sdd-check/SKILL.md +2 -2
  22. package/dist/ai/skills/sdd-code-review/SKILL.md +4 -1
  23. package/dist/ai/skills/sdd-critic/SKILL.md +5 -2
  24. package/dist/ai/skills/sdd-execute/SKILL.md +5 -2
  25. package/dist/ai/skills/sdd-reconcile/SKILL.md +5 -2
  26. package/dist/ai/skills/sdd-scaffold/SKILL.md +5 -2
  27. package/dist/chunks/{classify-mr-stage.logic-BiCHTmPp.js → classify-mr-stage.logic-CazmQDwZ.js} +2 -2
  28. package/dist/chunks/{config-index-9VHWSDQD.js → config-index-DU8-FEjq.js} +1 -1
  29. package/dist/chunks/{devtools-b0DwO1x_.js → devtools-1JmXJjUG.js} +1 -1
  30. package/dist/chunks/{eval.cmd-CwNPaNJd.js → eval.cmd-CBANnOFG.js} +1 -1
  31. package/dist/chunks/{help-D5cXtdMI.js → help-DVloaFF5.js} +1 -1
  32. package/dist/chunks/{index-BVnJEutp.js → index-2xhpqJtd.js} +2 -2
  33. package/dist/chunks/{index-RR5OUxje.js → index-AxsLBUAx.js} +14 -14
  34. package/dist/chunks/{index-CUkeTGqM.js → index-B7sydB0W.js} +2 -2
  35. package/dist/chunks/{index-CMCn9ErF.js → index-BKxk4zOz.js} +2 -2
  36. package/dist/chunks/{index-Db13NlHh.js → index-BNMmX_Mv.js} +21 -21
  37. package/dist/chunks/{index-CmQO-RmM.js → index-BPzldG3a.js} +2 -2
  38. package/dist/chunks/{index-BOQl7F_Z.js → index-BQlFDvKW.js} +2 -2
  39. package/dist/chunks/{index-RzkvIfJQ.js → index-Baq7RL1L.js} +3 -3
  40. package/dist/chunks/index-BbPiwvY9.js +2 -0
  41. package/dist/chunks/{index-ClJLPEUB.js → index-BreGNLJ_.js} +1 -1
  42. package/dist/chunks/{index-DjSafAkN.js → index-BslPwGtM.js} +2 -2
  43. package/dist/chunks/{index-DiMFxS0z.js → index-BtCUN2fZ.js} +16 -16
  44. package/dist/chunks/{index-CS0VbiLD.js → index-C10-EOdB.js} +1 -1
  45. package/dist/chunks/{index-2BOEcJIa.js → index-C4JmZLaj.js} +2 -2
  46. package/dist/chunks/index-CA-JKLr4.js +2 -0
  47. package/dist/chunks/{index-43GiH--T.js → index-CG_jJZVu.js} +2 -2
  48. package/dist/chunks/{index-BdkFKsMm.js → index-CGyP2uDE.js} +3 -3
  49. package/dist/chunks/{index-BOKv0b01.js → index-CPl1s9XJ.js} +2 -2
  50. package/dist/chunks/{index-DIPrBH-4.js → index-CSxE4cEm.js} +9 -9
  51. package/dist/chunks/{index-Cm7U1-fU.js → index-CWR5EzXx.js} +2 -2
  52. package/dist/chunks/{index-BwN5llCR.js → index-Camql5kL.js} +2 -2
  53. package/dist/chunks/{index-Drh-J9O7.js → index-CdUiTipO.js} +7 -7
  54. package/dist/chunks/{index-Cn029KTN.js → index-Crg61pK5.js} +2 -2
  55. package/dist/chunks/{index-Dja2O-hV.js → index-Cv9ZYXso.js} +1 -1
  56. package/dist/chunks/{index-Ck8v_Gv7.js → index-D7ADMlG3.js} +1 -1
  57. package/dist/chunks/index-DNl2gC8l.js +158 -0
  58. package/dist/chunks/{index-BYIzl-Ut.js → index-DVJA0qVm.js} +36 -36
  59. package/dist/chunks/{index-BAEIZVx0.js → index-DcFJhkY1.js} +2 -2
  60. package/dist/chunks/{index-Dx5_CB2E.js → index-DdEd-L3x.js} +2 -2
  61. package/dist/chunks/{index-DVmqMmgb.js → index-DkGA1eW_.js} +32 -32
  62. package/dist/chunks/{index-3k7mPX1e.js → index-Dnwxlti3.js} +1 -1
  63. package/dist/chunks/{index-CrizvxOJ.js → index-DqdEJDi2.js} +2 -2
  64. package/dist/chunks/{index-BIPebtDl.js → index-DqiwmBt4.js} +1 -1
  65. package/dist/chunks/{index-DS4MhAw-.js → index-PfuqBWjY.js} +2 -2
  66. package/dist/chunks/{index-BmFT1Kx2.js → index-SVP6RfVl.js} +2 -2
  67. package/dist/chunks/{index-CDxV4b81.js → index-Y8wu48Q0.js} +1 -1
  68. package/dist/chunks/index-_ewSKppm.js +2 -0
  69. package/dist/chunks/{index-Ctcr_Qeu.js → index-aBVtCLIJ.js} +2 -2
  70. package/dist/chunks/index-dNdz9j6d.js +2 -0
  71. package/dist/chunks/{index-BFUkVkSo.js → index-gskOpu3H.js} +16 -16
  72. package/dist/chunks/{index-CXpkT25O.js → index-pBSLMn5Q.js} +3 -3
  73. package/dist/chunks/index-sqPhX5Io.js +2 -0
  74. package/dist/chunks/{index-BzmR4Es2.js → index-vfrjhUD1.js} +39 -39
  75. package/dist/chunks/{index-J2NvjjDV.js → index-xGF5XC_i.js} +2 -2
  76. package/dist/chunks/{run-review-command.logic-CA2Rjymb.js → run-review-command.logic-B9GoCxh-.js} +24 -24
  77. package/dist/chunks/{serve.cmd-RxYS6WoN.js → serve.cmd-UXkaeaPI.js} +2 -2
  78. package/dist/chunks/{services-Csd556Tv.js → services-BYCeGBlO.js} +4 -4
  79. package/dist/chunks/{shared-B5CTGvpG.js → shared-B3cXL2Np.js} +1178 -1117
  80. package/dist/chunks/{stats-index-BLztvK69.js → stats-index-AIAnnp9S.js} +2 -2
  81. package/dist/gennady.js +46 -46
  82. package/dist/index.js +4 -4
  83. package/dist/shared/sdd/ladder.d.ts +42 -0
  84. package/dist/shared/sdd/module-specs.d.ts +7 -0
  85. package/dist/shared/sdd/tracker.d.ts +9 -0
  86. package/package.json +1 -1
  87. package/dist/chunks/classify-mr-stage.logic-ClmhzQPQ.js +0 -53
  88. package/dist/chunks/config-index-RFeqlDWs.js +0 -104
  89. package/dist/chunks/devtools-p8tmPuLn.js +0 -79
  90. package/dist/chunks/eval.cmd-ewU5lcUY.js +0 -34
  91. package/dist/chunks/help-DzGnMNi2.js +0 -7
  92. package/dist/chunks/index--AXFi0ty.js +0 -89
  93. package/dist/chunks/index-64TSesTc.js +0 -186
  94. package/dist/chunks/index-9Gv5trS_.js +0 -125
  95. package/dist/chunks/index-B1DQIryA.js +0 -2
  96. package/dist/chunks/index-B1PiBeQ3.js +0 -2
  97. package/dist/chunks/index-B4rzuhkt.js +0 -183
  98. package/dist/chunks/index-B97HJjkg.js +0 -159
  99. package/dist/chunks/index-BF6qypm0.js +0 -131
  100. package/dist/chunks/index-BK84ZQsh.js +0 -128
  101. package/dist/chunks/index-BRVIirjj.js +0 -141
  102. package/dist/chunks/index-BXnryCGW.js +0 -96
  103. package/dist/chunks/index-BaZm7Otb.js +0 -2
  104. package/dist/chunks/index-Bhk746A2.js +0 -129
  105. package/dist/chunks/index-Bi-eY_dY.js +0 -164
  106. package/dist/chunks/index-BjumU69g.js +0 -2
  107. package/dist/chunks/index-BkWXcpXU.js +0 -16979
  108. package/dist/chunks/index-BlY4jQIA.js +0 -168
  109. package/dist/chunks/index-C0iy7GxD.js +0 -140
  110. package/dist/chunks/index-CCBTXczb.js +0 -56
  111. package/dist/chunks/index-CDAfkSrr.js +0 -2
  112. package/dist/chunks/index-CDHymWzC.js +0 -102
  113. package/dist/chunks/index-CNfXJAao.js +0 -2
  114. package/dist/chunks/index-CQsae1nq.js +0 -207
  115. package/dist/chunks/index-CVmd0prf.js +0 -2
  116. package/dist/chunks/index-CZuTNeNm.js +0 -2
  117. package/dist/chunks/index-CasNhhrL.js +0 -96
  118. package/dist/chunks/index-Ce7GWENF.js +0 -377
  119. package/dist/chunks/index-Cf-02TAg.js +0 -265
  120. package/dist/chunks/index-CfjQWSrh.js +0 -52
  121. package/dist/chunks/index-Chr7gBBz.js +0 -443
  122. package/dist/chunks/index-Ci875Zlg.js +0 -346
  123. package/dist/chunks/index-CwA6RzIB.js +0 -3793
  124. package/dist/chunks/index-D1dI63ej.js +0 -46
  125. package/dist/chunks/index-DCS32A2i.js +0 -663
  126. package/dist/chunks/index-DOFoNxvb.js +0 -131
  127. package/dist/chunks/index-DVkCEuws.js +0 -136
  128. package/dist/chunks/index-DkadaaXq.js +0 -658
  129. package/dist/chunks/index-Dn11CLtk.js +0 -7
  130. package/dist/chunks/index-Do3spFJT.js +0 -340
  131. package/dist/chunks/index-DrFRZ0Yg.js +0 -2
  132. package/dist/chunks/index-DvEQhXi2.js +0 -1054
  133. package/dist/chunks/index-GiS0x6jg.js +0 -90
  134. package/dist/chunks/index-NacvqeQ5.js +0 -69
  135. package/dist/chunks/index-RNJhFzdr.js +0 -227
  136. package/dist/chunks/index-R_vUB6CL.js +0 -2
  137. package/dist/chunks/index-TQft1s5H.js +0 -20
  138. package/dist/chunks/index-ZmQRP38W.js +0 -26969
  139. package/dist/chunks/index-jdOZ4AkD.js +0 -143
  140. package/dist/chunks/index-kNa21kUI.js +0 -279
  141. package/dist/chunks/index-v4AV9kAc.js +0 -108
  142. package/dist/chunks/run-review-command.logic-CU1Slmc_.js +0 -331
  143. package/dist/chunks/serve.cmd-dWu_k_G_.js +0 -162
  144. package/dist/chunks/services-CwvXl2MB.js +0 -46832
  145. package/dist/chunks/shared-DSZTUx5b.js +0 -4509
  146. package/dist/chunks/stats-index-H6ALcjxy.js +0 -66
@@ -66,6 +66,35 @@
66
66
  </Axiom>
67
67
  </BeliefState>
68
68
 
69
+ <ChatProtocol>
70
+ <Contract id="QUESTION_FORMAT">
71
+ Questions must LOOK like questions and stay readable on any theme. A `### ❓ Вопросы — реши <N>`
72
+ section header; each question numbered `Q<N>`; options described in words. Never use `+` / `-`
73
+ signs for pros / cons (they render black and vanish on dark themes). Group obvious sub-questions
74
+ into one; do not pad the count.
75
+
76
+ Low-stakes — a recommendation is allowed, but only as the result of `AX_DIVERGE_BEFORE_RECOMMEND`
77
+ (not the first typical answer):
78
+
79
+ ### ❓ Вопросы — реши <N>
80
+ «годится» = беру все рекомендации, или поправь по номерам.
81
+
82
+ **Q1 · <вопрос?>**
83
+ ✅ **<рекомендованный вариант>** `[code]` — почему подходит именно под эту задачу.
84
+ Иначе:
85
+ - **<альтернатива>** `[code]` — _за: <плюс> · против: <минус>_
86
+
87
+ High-stakes / architecture — do NOT pre-anchor one pick. List the strongest candidates (include a
88
+ non-obvious / tail one) with «за / против» and let the operator choose; or give a recommendation
89
+ only alongside its strongest alternative and the reason it might win.
90
+
91
+ A plain binary question needs no list — recommendation + inline alternative:
92
+
93
+ **Q2 · <вопрос?>**
94
+ ✅ **<рекомендация>** — почему. _или <короткая альтернатива>?_
95
+ </Contract>
96
+ </ChatProtocol>
97
+
69
98
  <HaltConditions>
70
99
  | 🛑 ID | Trigger |
71
100
  |---|---|
@@ -82,9 +111,13 @@
82
111
  State from the router (`sdd-state`) already reports whether `specs/README.md` exists.
83
112
  - Absent → no portal yet: run `sdd-state --probe` to learn whether the repo is greenfield or
84
113
  already holds code (`AX_TOOL_INVOCATION`; probe only now that it is needed — not at flow start).
85
- - `CODE=absent` (empty / only package.json) → **greenfield init**. Ask (Russian): «Как называется
86
- проект? Опиши в одном предложении его vision и первые scope'ы (infra-base, backend, web — на
87
- черновую)
114
+ - `CODE=absent` (empty / only package.json) → **greenfield init**. The operator already saw the
115
+ state card and, for empty intake, confirmed «Создать проект» at the router's entry Ask
116
+ (`AX_DIALOGUE_DISCIPLINE`) — the interview opens HERE, never before that card and never as
117
+ prose dumped into the reply. Ask through the SAME channel: the `AskUserQuestion` tool when
118
+ available (open answer via its free-text slot), otherwise `QUESTION_FORMAT` (Russian) — one
119
+ structured question: «Как называется проект? Опиши в одном предложении его vision и первые
120
+ scope'ы (infra-base, backend, web — на черновую).»
88
121
  - `CODE=present` → **from-code recovery** — do NOT invent a vision over existing code:
89
122
  `READ_AND_USE_DIRECTIVE("ai/directives/sdd-v2/discover-from-code.directive.xml")`.
90
123
  - Present → empty intake → `H_NO_INTENT`; otherwise classify the change:
@@ -287,17 +287,25 @@
287
287
  | 🛑 ID | Trigger |
288
288
  |---|---|
289
289
  | `H_AMBIGUOUS_INTENT` | Operator intent cannot be classified against state — ask, never guess |
290
+ | `H_WRONG_REPO` | Operator answered the empty-intake entry Ask with «я не в том репозитории» — stop here, no directive loads |
290
291
  </HaltConditions>
291
292
 
292
293
  <ExecutionPlan>
293
294
  <Step id="STEP_0_STATE">
294
- <Goal>Obtain project state and clear the preflight gates before any routing.</Goal>
295
+ <Goal>Obtain project state, show it to the operator, then clear the preflight gates before any routing.</Goal>
295
296
  <Action>
296
297
  Call `sdd-state` (deterministic) — one call returns everything routing needs: `FLOW_VERSION`,
297
298
  `READINESS` (exact required scripts: typecheck / test / test:coverage / lint+gennady / format),
298
299
  portal presence (`specs/README.md`), the Scopes table (id + scope-type + status + description),
299
300
  and the in-progress session set (`SESSION_FILE_FORMAT`, `specs/.sdd-session.md`).
300
301
 
302
+ Show the operator the state card exactly as `sdd-state` printed it — flow version, readiness,
303
+ portal presence, the Scopes table, the session set — verbatim, in its own message, BEFORE any
304
+ classification of intent begins. Never paraphrase it, never fold it silently into the agent's own
305
+ reasoning, never skip it because the state looks empty — an absent portal still gets the card;
306
+ «нет ни одной спеки» IS the picture. This print is a required observable action, not a narration
307
+ aside (`AX_NO_PROCESS_NARRATION` bans commentary about the work being done, not this display).
308
+
301
309
  Then clear each preflight gate inline via the switch below, sized to the task's blast radius
302
310
  (`AX_PREFLIGHT_BLAST_RADIUS_SCOPED`). After any embedded flow (migration / readiness) returns,
303
311
  re-run `sdd-state` and re-evaluate on the FRESH snapshot — that flow changed the project, so the
@@ -329,6 +337,19 @@
329
337
  inside the `root` branch, not this switch). A path-bearing request against an absent portal is
330
338
  still ambiguous between the two — ask the operator which they mean before routing.
331
339
 
340
+ WHEN `specs/README.md` is absent AND the operator's message carries no substantive project
341
+ content (bare `/sdd`, a greeting, no vision / scope-type stated) — empty intake against an empty
342
+ portal — do NOT silently classify `project-setup` by elimination; the operator just saw the state
343
+ card and is still «в непонятной ситуации» without a concrete next step. Run `sdd-state --probe`
344
+ (`CODE` presence only) and STOP: ask via the `AskUserQuestion` tool when available, otherwise
345
+ `QUESTION_FORMAT` (message in Russian) — «Создать проект» (рекомендую) · «Воссоздать спеки из
346
+ существующего кода» (offered ONLY when `CODE=present`) · «Я не в том репозитории» → halt
347
+ (`H_WRONG_REPO`), no directive loads. Either non-halt answer locks `intent: project-setup` for
348
+ STEP_2_ROUTE's existing case below — this is a confirmation of intent, not a new route. WHEN the
349
+ message already carries substantive project content (e.g. «новый проект X про Y») this Ask is
350
+ skipped entirely — classify `project-setup` directly and fold its confirmation into the ordinary
351
+ SCALE exchange below; one stop, not two.
352
+
332
353
  Alongside intent, assess SCALE ∈ {product, library, module, function, fix} from context:
333
354
  the intent itself, the portal state (an empty portal leans product; a mature scope leans
334
355
  module / function), and the size of the request. Per `AX_SCALE_PROPORTIONAL_DEPTH` the
@@ -33,6 +33,10 @@
33
33
  {{> "axiom/process/ax-close-with-integrity-check"}}
34
34
  </BeliefState>
35
35
 
36
+ <ChatProtocol>
37
+ {{> "contract/process/question-format"}}
38
+ </ChatProtocol>
39
+
36
40
  <HaltConditions>
37
41
  | 🛑 ID | Trigger |
38
42
  |---|---|
@@ -49,9 +53,13 @@
49
53
  State from the router (`sdd-state`) already reports whether `specs/README.md` exists.
50
54
  - Absent → no portal yet: run `sdd-state --probe` to learn whether the repo is greenfield or
51
55
  already holds code (`AX_TOOL_INVOCATION`; probe only now that it is needed — not at flow start).
52
- - `CODE=absent` (empty / only package.json) → **greenfield init**. Ask (Russian): «Как называется
53
- проект? Опиши в одном предложении его vision и первые scope'ы (infra-base, backend, web — на
54
- черновую)
56
+ - `CODE=absent` (empty / only package.json) → **greenfield init**. The operator already saw the
57
+ state card and, for empty intake, confirmed «Создать проект» at the router's entry Ask
58
+ (`AX_DIALOGUE_DISCIPLINE`) — the interview opens HERE, never before that card and never as
59
+ prose dumped into the reply. Ask through the SAME channel: the `AskUserQuestion` tool when
60
+ available (open answer via its free-text slot), otherwise `QUESTION_FORMAT` (Russian) — one
61
+ structured question: «Как называется проект? Опиши в одном предложении его vision и первые
62
+ scope'ы (infra-base, backend, web — на черновую).»
55
63
  - `CODE=present` → **from-code recovery** — do NOT invent a vision over existing code:
56
64
  `READ_AND_USE_DIRECTIVE("ai/directives/sdd-v2/discover-from-code.directive.xml")`.
57
65
  - Present → empty intake → `H_NO_INTENT`; otherwise classify the change:
@@ -82,17 +82,25 @@
82
82
  | 🛑 ID | Trigger |
83
83
  |---|---|
84
84
  | `H_AMBIGUOUS_INTENT` | Operator intent cannot be classified against state — ask, never guess |
85
+ | `H_WRONG_REPO` | Operator answered the empty-intake entry Ask with «я не в том репозитории» — stop here, no directive loads |
85
86
  </HaltConditions>
86
87
 
87
88
  <ExecutionPlan>
88
89
  <Step id="STEP_0_STATE">
89
- <Goal>Obtain project state and clear the preflight gates before any routing.</Goal>
90
+ <Goal>Obtain project state, show it to the operator, then clear the preflight gates before any routing.</Goal>
90
91
  <Action>
91
92
  Call `sdd-state` (deterministic) — one call returns everything routing needs: `FLOW_VERSION`,
92
93
  `READINESS` (exact required scripts: typecheck / test / test:coverage / lint+gennady / format),
93
94
  portal presence (`specs/README.md`), the Scopes table (id + scope-type + status + description),
94
95
  and the in-progress session set (`SESSION_FILE_FORMAT`, `specs/.sdd-session.md`).
95
96
 
97
+ Show the operator the state card exactly as `sdd-state` printed it — flow version, readiness,
98
+ portal presence, the Scopes table, the session set — verbatim, in its own message, BEFORE any
99
+ classification of intent begins. Never paraphrase it, never fold it silently into the agent's own
100
+ reasoning, never skip it because the state looks empty — an absent portal still gets the card;
101
+ «нет ни одной спеки» IS the picture. This print is a required observable action, not a narration
102
+ aside (`AX_NO_PROCESS_NARRATION` bans commentary about the work being done, not this display).
103
+
96
104
  Then clear each preflight gate inline via the switch below, sized to the task's blast radius
97
105
  (`AX_PREFLIGHT_BLAST_RADIUS_SCOPED`). After any embedded flow (migration / readiness) returns,
98
106
  re-run `sdd-state` and re-evaluate on the FRESH snapshot — that flow changed the project, so the
@@ -124,6 +132,19 @@
124
132
  inside the `root` branch, not this switch). A path-bearing request against an absent portal is
125
133
  still ambiguous between the two — ask the operator which they mean before routing.
126
134
 
135
+ WHEN `specs/README.md` is absent AND the operator's message carries no substantive project
136
+ content (bare `/sdd`, a greeting, no vision / scope-type stated) — empty intake against an empty
137
+ portal — do NOT silently classify `project-setup` by elimination; the operator just saw the state
138
+ card and is still «в непонятной ситуации» without a concrete next step. Run `sdd-state --probe`
139
+ (`CODE` presence only) and STOP: ask via the `AskUserQuestion` tool when available, otherwise
140
+ `QUESTION_FORMAT` (message in Russian) — «Создать проект» (рекомендую) · «Воссоздать спеки из
141
+ существующего кода» (offered ONLY when `CODE=present`) · «Я не в том репозитории» → halt
142
+ (`H_WRONG_REPO`), no directive loads. Either non-halt answer locks `intent: project-setup` for
143
+ STEP_2_ROUTE's existing case below — this is a confirmation of intent, not a new route. WHEN the
144
+ message already carries substantive project content (e.g. «новый проект X про Y») this Ask is
145
+ skipped entirely — classify `project-setup` directly and fold its confirmation into the ordinary
146
+ SCALE exchange below; one stop, not two.
147
+
127
148
  Alongside intent, assess SCALE ∈ {product, library, module, function, fix} from context:
128
149
  the intent itself, the portal state (an empty portal leans product; a mature scope leans
129
150
  module / function), and the size of the request. Per `AX_SCALE_PROPORTIONAL_DEPTH` the
@@ -31,7 +31,7 @@ compatibility: opencode
31
31
  single-MR review pipeline, and finalization. You EMBODY this directive.
32
32
  </Step>
33
33
  <Step id="PREFLIGHT">
34
- Run `npx tsx ~/Developer/gennady/cli/gennady.ts inbox --json`. Response has
34
+ Run `npx gennady inbox --json`. Response has
35
35
  `"configured": false` → do NOT exit: run the setup flow from inbox-flow (two `AskUserQuestion`
36
36
  — `reposBase`, then `vcsHost` → `inbox config --set` → retry). `"configured": true` → EMBODY.
37
37
  Not inside a repo → pass `--vcs-host=<host>` on every call. Token: `GITLAB_PERSONAL_TOKEN` or
@@ -16,10 +16,12 @@ compatibility: opencode
16
16
 
17
17
  <ExecutionPlan>
18
18
  <Step id="GATHER">
19
- One parallel batch (do NOT serialize): run `npx tsx ~/Developer/gennady/cli/gennady.ts sdd-state`
19
+ One parallel batch (do NOT serialize): run `npx gennady sdd-state`
20
20
  — one call returns portal presence, the Scopes table (id / type / status), declared gate scripts,
21
- and the in-progress session set — AND read in full
22
- `~/Developer/gennady/ai/directives/sdd-v2/router.directive.xml`.
21
+ and the in-progress session set — AND read in full `ai/directives/sdd-v2/router.directive.xml`.
22
+ Resolve deterministically, project root first: `ai/directives/sdd-v2/router.directive.xml`; if
23
+ missing, `node_modules/gennady/ai/directives/sdd-v2/router.directive.xml`; if neither exists,
24
+ stop and tell the operator to run `npx gennady sync` — never search for it.
23
25
  </Step>
24
26
  <Step id="EMBODY">You ARE the router directive now. Intent — from the operator message; state — from sdd-state.</Step>
25
27
  <Step id="ROUTE">
@@ -6,8 +6,11 @@ compatibility: opencode
6
6
 
7
7
  1. **Extract intent.** Operator wants audit of {TSK-NN | full tree | current changes}. If ambiguous — ask.
8
8
 
9
- 2. **Load & activate directive.** Read in full: `~/Developer/gennady/ai/directives/sdd-v2/audit.directive.xml`
9
+ 2. **Load & activate directive.** Read in full `ai/directives/sdd-v2/audit.directive.xml`. Resolve
10
+ deterministically, project root first: `ai/directives/sdd-v2/audit.directive.xml`; if missing,
11
+ `node_modules/gennady/ai/directives/sdd-v2/audit.directive.xml`; if neither exists, stop and tell
12
+ the operator to run `npx gennady sync` — never search for it.
10
13
  Announce: `🔒 DIRECTIVE ACTIVATED: SddAudit`
11
14
  You ARE this directive now.
12
15
 
13
- 3. **Apply directive to intent.** Mode auto-detected per `AX_AUDIT_MODES` (per-task | epic-level). Per `STEP_1_MECHANICAL`, first run the mechanical tool — `npx tsx ~/Developer/gennady/cli/gennady.ts sdd-check --task <ticket-path>` (or `--all` for an epic) — and take its findings as given. Then re-derive the gate independently: `npx tsx ~/Developer/gennady/cli/gennady.ts sdd-verify --profile full`, `npx tsx ~/Developer/gennady/cli/gennady.ts lint --spec=<module-spec>` on changed files, and `npx tsx ~/Developer/gennady/cli/gennady.ts testcov --run --min=80`. Feed all output into the directive's finding pipeline. Then follow Execution_Plan end-to-end (STEP_2_SEMANTIC, STEP_3_ROUTE). Do not deviate.
16
+ 3. **Apply directive to intent.** Mode auto-detected per `AX_AUDIT_MODES` (per-task | epic-level). Per `STEP_1_MECHANICAL`, first run the mechanical tool — `npx gennady sdd-check --task <ticket-path>` (or `--all` for an epic) — and take its findings as given. Then re-derive the gate independently: `npx gennady sdd-verify --profile full`, `npx gennady lint --spec=<module-spec>` on changed files, and `npx gennady testcov --run --min=80`. Feed all output into the directive's finding pipeline. Then follow Execution_Plan end-to-end (STEP_2_SEMANTIC, STEP_3_ROUTE). Do not deviate.
@@ -14,8 +14,8 @@ compatibility: opencode
14
14
 
15
15
  <ExecutionPlan>
16
16
  <Step id="RUN">
17
- If the operator named a Task-ID / ticket path → `npx tsx ~/Developer/gennady/cli/gennady.ts sdd-check --task <path>`.
18
- Otherwise (whole project) → `npx tsx ~/Developer/gennady/cli/gennady.ts sdd-check --all`.
17
+ If the operator named a Task-ID / ticket path → `npx gennady sdd-check --task <path>`.
18
+ Otherwise (whole project) → `npx gennady sdd-check --all`.
19
19
  </Step>
20
20
  <Step id="REPORT">
21
21
  Relay the findings verbatim grouped by file (`file: severity: code message`) plus the one-line summary,
@@ -16,7 +16,10 @@ compatibility: opencode
16
16
 
17
17
  <ExecutionPlan>
18
18
  <Step id="GATHER">
19
- Read in full `~/Developer/gennady/ai/directives/sdd-v2/code-review.directive.xml`.
19
+ Read in full `ai/directives/sdd-v2/code-review.directive.xml`. Resolve deterministically,
20
+ project root first: `ai/directives/sdd-v2/code-review.directive.xml`; if missing,
21
+ `node_modules/gennady/ai/directives/sdd-v2/code-review.directive.xml`; if neither exists,
22
+ stop and tell the operator to run `npx gennady sync` — never search for it.
20
23
  </Step>
21
24
  <Step id="EMBODY">
22
25
  You ARE the code-review now. Input — a Task-ID (or the dispatch payload from the execute orchestrator):
@@ -16,8 +16,11 @@ compatibility: opencode
16
16
 
17
17
  <ExecutionPlan>
18
18
  <Step id="GATHER">
19
- One parallel batch (do NOT serialize): run `npx tsx ~/Developer/gennady/cli/gennady.ts sdd-state`
20
- AND read in full `~/Developer/gennady/ai/directives/sdd-v2/critic.directive.xml`.
19
+ One parallel batch (do NOT serialize): run `npx gennady sdd-state`
20
+ AND read in full `ai/directives/sdd-v2/critic.directive.xml`.
21
+ Resolve every `ai/directives/sdd-v2/<file>` below deterministically, project root first: if
22
+ missing, `node_modules/gennady/ai/directives/sdd-v2/<file>`; if neither exists, stop and tell
23
+ the operator to run `npx gennady sync` — never search for it.
21
24
  </Step>
22
25
  <Step id="PREFLIGHT">
23
26
  Size the gate to this request's blast radius first: when the critique target stays inside its own scope (a single spec / task) and never touches `tasks/` layout or a missing gate script, record `FLOW_VERSION` / `READINESS` in one line and proceed straight to EMBODY — offer migration / readiness setup to the operator as a separate next step, not inside this run.
@@ -16,9 +16,12 @@ compatibility: opencode
16
16
 
17
17
  <ExecutionPlan>
18
18
  <Step id="GATHER">
19
- One parallel batch (do NOT serialize): run `npx tsx ~/Developer/gennady/cli/gennady.ts sdd-state`
19
+ One parallel batch (do NOT serialize): run `npx gennady sdd-state`
20
20
  (flow version · readiness · scopes) AND read in full
21
- `~/Developer/gennady/ai/directives/sdd-v2/execute.directive.xml`.
21
+ `ai/directives/sdd-v2/execute.directive.xml`.
22
+ Resolve every `ai/directives/sdd-v2/<file>` below deterministically, project root first: if
23
+ missing, `node_modules/gennady/ai/directives/sdd-v2/<file>`; if neither exists, stop and tell
24
+ the operator to run `npx gennady sync` — never search for it.
22
25
  </Step>
23
26
  <Step id="PREFLIGHT">
24
27
  Size the gate to this request's blast radius first: when the requested execution stays inside a single task's own scope and never touches `tasks/` layout or a missing gate script, record `FLOW_VERSION` / `READINESS` in one line and proceed straight to EMBODY — offer migration / readiness setup to the operator as a separate next step, not inside this run.
@@ -16,8 +16,11 @@ compatibility: opencode
16
16
 
17
17
  <ExecutionPlan>
18
18
  <Step id="GATHER">
19
- One parallel batch (do NOT serialize): run `npx tsx ~/Developer/gennady/cli/gennady.ts sdd-state`
20
- AND read in full `~/Developer/gennady/ai/directives/sdd-v2/reconcile.directive.xml`.
19
+ One parallel batch (do NOT serialize): run `npx gennady sdd-state`
20
+ AND read in full `ai/directives/sdd-v2/reconcile.directive.xml`.
21
+ Resolve every `ai/directives/sdd-v2/<file>` below deterministically, project root first: if
22
+ missing, `node_modules/gennady/ai/directives/sdd-v2/<file>`; if neither exists, stop and tell
23
+ the operator to run `npx gennady sync` — never search for it.
21
24
  </Step>
22
25
  <Step id="PREFLIGHT">
23
26
  Size the gate to this request's blast radius first: when the reconcile stays inside its own scope (a single finding, a single ticket) and never touches `tasks/` layout or a missing gate script, record `FLOW_VERSION` / `READINESS` in one line and proceed straight to EMBODY — offer migration / readiness setup to the operator as a separate next step, not inside this run.
@@ -16,9 +16,12 @@ compatibility: opencode
16
16
 
17
17
  <ExecutionPlan>
18
18
  <Step id="GATHER">
19
- One parallel batch (do NOT serialize): run `npx tsx ~/Developer/gennady/cli/gennady.ts sdd-state`
19
+ One parallel batch (do NOT serialize): run `npx gennady sdd-state`
20
20
  (flow version · readiness · portal · scopes) AND read in full
21
- `~/Developer/gennady/ai/directives/sdd-v2/scaffold.directive.xml`.
21
+ `ai/directives/sdd-v2/scaffold.directive.xml`.
22
+ Resolve every `ai/directives/sdd-v2/<file>` below deterministically, project root first: if
23
+ missing, `node_modules/gennady/ai/directives/sdd-v2/<file>`; if neither exists, stop and tell
24
+ the operator to run `npx gennady sync` — never search for it.
22
25
  </Step>
23
26
  <Step id="PREFLIGHT">
24
27
  Size the gate to this request's blast radius first: when the scaffolding target stays inside a single
@@ -66,6 +66,35 @@
66
66
  </Axiom>
67
67
  </BeliefState>
68
68
 
69
+ <ChatProtocol>
70
+ <Contract id="QUESTION_FORMAT">
71
+ Questions must LOOK like questions and stay readable on any theme. A `### ❓ Вопросы — реши <N>`
72
+ section header; each question numbered `Q<N>`; options described in words. Never use `+` / `-`
73
+ signs for pros / cons (they render black and vanish on dark themes). Group obvious sub-questions
74
+ into one; do not pad the count.
75
+
76
+ Low-stakes — a recommendation is allowed, but only as the result of `AX_DIVERGE_BEFORE_RECOMMEND`
77
+ (not the first typical answer):
78
+
79
+ ### ❓ Вопросы — реши <N>
80
+ «годится» = беру все рекомендации, или поправь по номерам.
81
+
82
+ **Q1 · <вопрос?>**
83
+ ✅ **<рекомендованный вариант>** `[code]` — почему подходит именно под эту задачу.
84
+ Иначе:
85
+ - **<альтернатива>** `[code]` — _за: <плюс> · против: <минус>_
86
+
87
+ High-stakes / architecture — do NOT pre-anchor one pick. List the strongest candidates (include a
88
+ non-obvious / tail one) with «за / против» and let the operator choose; or give a recommendation
89
+ only alongside its strongest alternative and the reason it might win.
90
+
91
+ A plain binary question needs no list — recommendation + inline alternative:
92
+
93
+ **Q2 · <вопрос?>**
94
+ ✅ **<рекомендация>** — почему. _или <короткая альтернатива>?_
95
+ </Contract>
96
+ </ChatProtocol>
97
+
69
98
  <HaltConditions>
70
99
  | 🛑 ID | Trigger |
71
100
  |---|---|
@@ -82,9 +111,13 @@
82
111
  State from the router (`sdd-state`) already reports whether `specs/README.md` exists.
83
112
  - Absent → no portal yet: run `sdd-state --probe` to learn whether the repo is greenfield or
84
113
  already holds code (`AX_TOOL_INVOCATION`; probe only now that it is needed — not at flow start).
85
- - `CODE=absent` (empty / only package.json) → **greenfield init**. Ask (Russian): «Как называется
86
- проект? Опиши в одном предложении его vision и первые scope'ы (infra-base, backend, web — на
87
- черновую)
114
+ - `CODE=absent` (empty / only package.json) → **greenfield init**. The operator already saw the
115
+ state card and, for empty intake, confirmed «Создать проект» at the router's entry Ask
116
+ (`AX_DIALOGUE_DISCIPLINE`) — the interview opens HERE, never before that card and never as
117
+ prose dumped into the reply. Ask through the SAME channel: the `AskUserQuestion` tool when
118
+ available (open answer via its free-text slot), otherwise `QUESTION_FORMAT` (Russian) — one
119
+ structured question: «Как называется проект? Опиши в одном предложении его vision и первые
120
+ scope'ы (infra-base, backend, web — на черновую).»
88
121
  - `CODE=present` → **from-code recovery** — do NOT invent a vision over existing code:
89
122
  `READ_AND_USE_DIRECTIVE("ai/directives/sdd-v2/discover-from-code.directive.xml")`.
90
123
  - Present → empty intake → `H_NO_INTENT`; otherwise classify the change:
@@ -287,17 +287,25 @@
287
287
  | 🛑 ID | Trigger |
288
288
  |---|---|
289
289
  | `H_AMBIGUOUS_INTENT` | Operator intent cannot be classified against state — ask, never guess |
290
+ | `H_WRONG_REPO` | Operator answered the empty-intake entry Ask with «я не в том репозитории» — stop here, no directive loads |
290
291
  </HaltConditions>
291
292
 
292
293
  <ExecutionPlan>
293
294
  <Step id="STEP_0_STATE">
294
- <Goal>Obtain project state and clear the preflight gates before any routing.</Goal>
295
+ <Goal>Obtain project state, show it to the operator, then clear the preflight gates before any routing.</Goal>
295
296
  <Action>
296
297
  Call `sdd-state` (deterministic) — one call returns everything routing needs: `FLOW_VERSION`,
297
298
  `READINESS` (exact required scripts: typecheck / test / test:coverage / lint+gennady / format),
298
299
  portal presence (`specs/README.md`), the Scopes table (id + scope-type + status + description),
299
300
  and the in-progress session set (`SESSION_FILE_FORMAT`, `specs/.sdd-session.md`).
300
301
 
302
+ Show the operator the state card exactly as `sdd-state` printed it — flow version, readiness,
303
+ portal presence, the Scopes table, the session set — verbatim, in its own message, BEFORE any
304
+ classification of intent begins. Never paraphrase it, never fold it silently into the agent's own
305
+ reasoning, never skip it because the state looks empty — an absent portal still gets the card;
306
+ «нет ни одной спеки» IS the picture. This print is a required observable action, not a narration
307
+ aside (`AX_NO_PROCESS_NARRATION` bans commentary about the work being done, not this display).
308
+
301
309
  Then clear each preflight gate inline via the switch below, sized to the task's blast radius
302
310
  (`AX_PREFLIGHT_BLAST_RADIUS_SCOPED`). After any embedded flow (migration / readiness) returns,
303
311
  re-run `sdd-state` and re-evaluate on the FRESH snapshot — that flow changed the project, so the
@@ -329,6 +337,19 @@
329
337
  inside the `root` branch, not this switch). A path-bearing request against an absent portal is
330
338
  still ambiguous between the two — ask the operator which they mean before routing.
331
339
 
340
+ WHEN `specs/README.md` is absent AND the operator's message carries no substantive project
341
+ content (bare `/sdd`, a greeting, no vision / scope-type stated) — empty intake against an empty
342
+ portal — do NOT silently classify `project-setup` by elimination; the operator just saw the state
343
+ card and is still «в непонятной ситуации» without a concrete next step. Run `sdd-state --probe`
344
+ (`CODE` presence only) and STOP: ask via the `AskUserQuestion` tool when available, otherwise
345
+ `QUESTION_FORMAT` (message in Russian) — «Создать проект» (рекомендую) · «Воссоздать спеки из
346
+ существующего кода» (offered ONLY when `CODE=present`) · «Я не в том репозитории» → halt
347
+ (`H_WRONG_REPO`), no directive loads. Either non-halt answer locks `intent: project-setup` for
348
+ STEP_2_ROUTE's existing case below — this is a confirmation of intent, not a new route. WHEN the
349
+ message already carries substantive project content (e.g. «новый проект X про Y») this Ask is
350
+ skipped entirely — classify `project-setup` directly and fold its confirmation into the ordinary
351
+ SCALE exchange below; one stop, not two.
352
+
332
353
  Alongside intent, assess SCALE ∈ {product, library, module, function, fix} from context:
333
354
  the intent itself, the portal state (an empty portal leans product; a mature scope leans
334
355
  module / function), and the size of the request. Per `AX_SCALE_PROPORTIONAL_DEPTH` the
@@ -33,6 +33,10 @@
33
33
  {{> "axiom/process/ax-close-with-integrity-check"}}
34
34
  </BeliefState>
35
35
 
36
+ <ChatProtocol>
37
+ {{> "contract/process/question-format"}}
38
+ </ChatProtocol>
39
+
36
40
  <HaltConditions>
37
41
  | 🛑 ID | Trigger |
38
42
  |---|---|
@@ -49,9 +53,13 @@
49
53
  State from the router (`sdd-state`) already reports whether `specs/README.md` exists.
50
54
  - Absent → no portal yet: run `sdd-state --probe` to learn whether the repo is greenfield or
51
55
  already holds code (`AX_TOOL_INVOCATION`; probe only now that it is needed — not at flow start).
52
- - `CODE=absent` (empty / only package.json) → **greenfield init**. Ask (Russian): «Как называется
53
- проект? Опиши в одном предложении его vision и первые scope'ы (infra-base, backend, web — на
54
- черновую)
56
+ - `CODE=absent` (empty / only package.json) → **greenfield init**. The operator already saw the
57
+ state card and, for empty intake, confirmed «Создать проект» at the router's entry Ask
58
+ (`AX_DIALOGUE_DISCIPLINE`) — the interview opens HERE, never before that card and never as
59
+ prose dumped into the reply. Ask through the SAME channel: the `AskUserQuestion` tool when
60
+ available (open answer via its free-text slot), otherwise `QUESTION_FORMAT` (Russian) — one
61
+ structured question: «Как называется проект? Опиши в одном предложении его vision и первые
62
+ scope'ы (infra-base, backend, web — на черновую).»
55
63
  - `CODE=present` → **from-code recovery** — do NOT invent a vision over existing code:
56
64
  `READ_AND_USE_DIRECTIVE("ai/directives/sdd-v2/discover-from-code.directive.xml")`.
57
65
  - Present → empty intake → `H_NO_INTENT`; otherwise classify the change:
@@ -82,17 +82,25 @@
82
82
  | 🛑 ID | Trigger |
83
83
  |---|---|
84
84
  | `H_AMBIGUOUS_INTENT` | Operator intent cannot be classified against state — ask, never guess |
85
+ | `H_WRONG_REPO` | Operator answered the empty-intake entry Ask with «я не в том репозитории» — stop here, no directive loads |
85
86
  </HaltConditions>
86
87
 
87
88
  <ExecutionPlan>
88
89
  <Step id="STEP_0_STATE">
89
- <Goal>Obtain project state and clear the preflight gates before any routing.</Goal>
90
+ <Goal>Obtain project state, show it to the operator, then clear the preflight gates before any routing.</Goal>
90
91
  <Action>
91
92
  Call `sdd-state` (deterministic) — one call returns everything routing needs: `FLOW_VERSION`,
92
93
  `READINESS` (exact required scripts: typecheck / test / test:coverage / lint+gennady / format),
93
94
  portal presence (`specs/README.md`), the Scopes table (id + scope-type + status + description),
94
95
  and the in-progress session set (`SESSION_FILE_FORMAT`, `specs/.sdd-session.md`).
95
96
 
97
+ Show the operator the state card exactly as `sdd-state` printed it — flow version, readiness,
98
+ portal presence, the Scopes table, the session set — verbatim, in its own message, BEFORE any
99
+ classification of intent begins. Never paraphrase it, never fold it silently into the agent's own
100
+ reasoning, never skip it because the state looks empty — an absent portal still gets the card;
101
+ «нет ни одной спеки» IS the picture. This print is a required observable action, not a narration
102
+ aside (`AX_NO_PROCESS_NARRATION` bans commentary about the work being done, not this display).
103
+
96
104
  Then clear each preflight gate inline via the switch below, sized to the task's blast radius
97
105
  (`AX_PREFLIGHT_BLAST_RADIUS_SCOPED`). After any embedded flow (migration / readiness) returns,
98
106
  re-run `sdd-state` and re-evaluate on the FRESH snapshot — that flow changed the project, so the
@@ -124,6 +132,19 @@
124
132
  inside the `root` branch, not this switch). A path-bearing request against an absent portal is
125
133
  still ambiguous between the two — ask the operator which they mean before routing.
126
134
 
135
+ WHEN `specs/README.md` is absent AND the operator's message carries no substantive project
136
+ content (bare `/sdd`, a greeting, no vision / scope-type stated) — empty intake against an empty
137
+ portal — do NOT silently classify `project-setup` by elimination; the operator just saw the state
138
+ card and is still «в непонятной ситуации» without a concrete next step. Run `sdd-state --probe`
139
+ (`CODE` presence only) and STOP: ask via the `AskUserQuestion` tool when available, otherwise
140
+ `QUESTION_FORMAT` (message in Russian) — «Создать проект» (рекомендую) · «Воссоздать спеки из
141
+ существующего кода» (offered ONLY when `CODE=present`) · «Я не в том репозитории» → halt
142
+ (`H_WRONG_REPO`), no directive loads. Either non-halt answer locks `intent: project-setup` for
143
+ STEP_2_ROUTE's existing case below — this is a confirmation of intent, not a new route. WHEN the
144
+ message already carries substantive project content (e.g. «новый проект X про Y») this Ask is
145
+ skipped entirely — classify `project-setup` directly and fold its confirmation into the ordinary
146
+ SCALE exchange below; one stop, not two.
147
+
127
148
  Alongside intent, assess SCALE ∈ {product, library, module, function, fix} from context:
128
149
  the intent itself, the portal state (an empty portal leans product; a mature scope leans
129
150
  module / function), and the size of the request. Per `AX_SCALE_PROPORTIONAL_DEPTH` the
@@ -31,7 +31,7 @@ compatibility: opencode
31
31
  single-MR review pipeline, and finalization. You EMBODY this directive.
32
32
  </Step>
33
33
  <Step id="PREFLIGHT">
34
- Run `npx tsx ~/Developer/gennady/cli/gennady.ts inbox --json`. Response has
34
+ Run `npx gennady inbox --json`. Response has
35
35
  `"configured": false` → do NOT exit: run the setup flow from inbox-flow (two `AskUserQuestion`
36
36
  — `reposBase`, then `vcsHost` → `inbox config --set` → retry). `"configured": true` → EMBODY.
37
37
  Not inside a repo → pass `--vcs-host=<host>` on every call. Token: `GITLAB_PERSONAL_TOKEN` or
@@ -16,10 +16,12 @@ compatibility: opencode
16
16
 
17
17
  <ExecutionPlan>
18
18
  <Step id="GATHER">
19
- One parallel batch (do NOT serialize): run `npx tsx ~/Developer/gennady/cli/gennady.ts sdd-state`
19
+ One parallel batch (do NOT serialize): run `npx gennady sdd-state`
20
20
  — one call returns portal presence, the Scopes table (id / type / status), declared gate scripts,
21
- and the in-progress session set — AND read in full
22
- `~/Developer/gennady/ai/directives/sdd-v2/router.directive.xml`.
21
+ and the in-progress session set — AND read in full `ai/directives/sdd-v2/router.directive.xml`.
22
+ Resolve deterministically, project root first: `ai/directives/sdd-v2/router.directive.xml`; if
23
+ missing, `node_modules/gennady/ai/directives/sdd-v2/router.directive.xml`; if neither exists,
24
+ stop and tell the operator to run `npx gennady sync` — never search for it.
23
25
  </Step>
24
26
  <Step id="EMBODY">You ARE the router directive now. Intent — from the operator message; state — from sdd-state.</Step>
25
27
  <Step id="ROUTE">
@@ -6,8 +6,11 @@ compatibility: opencode
6
6
 
7
7
  1. **Extract intent.** Operator wants audit of {TSK-NN | full tree | current changes}. If ambiguous — ask.
8
8
 
9
- 2. **Load & activate directive.** Read in full: `~/Developer/gennady/ai/directives/sdd-v2/audit.directive.xml`
9
+ 2. **Load & activate directive.** Read in full `ai/directives/sdd-v2/audit.directive.xml`. Resolve
10
+ deterministically, project root first: `ai/directives/sdd-v2/audit.directive.xml`; if missing,
11
+ `node_modules/gennady/ai/directives/sdd-v2/audit.directive.xml`; if neither exists, stop and tell
12
+ the operator to run `npx gennady sync` — never search for it.
10
13
  Announce: `🔒 DIRECTIVE ACTIVATED: SddAudit`
11
14
  You ARE this directive now.
12
15
 
13
- 3. **Apply directive to intent.** Mode auto-detected per `AX_AUDIT_MODES` (per-task | epic-level). Per `STEP_1_MECHANICAL`, first run the mechanical tool — `npx tsx ~/Developer/gennady/cli/gennady.ts sdd-check --task <ticket-path>` (or `--all` for an epic) — and take its findings as given. Then re-derive the gate independently: `npx tsx ~/Developer/gennady/cli/gennady.ts sdd-verify --profile full`, `npx tsx ~/Developer/gennady/cli/gennady.ts lint --spec=<module-spec>` on changed files, and `npx tsx ~/Developer/gennady/cli/gennady.ts testcov --run --min=80`. Feed all output into the directive's finding pipeline. Then follow Execution_Plan end-to-end (STEP_2_SEMANTIC, STEP_3_ROUTE). Do not deviate.
16
+ 3. **Apply directive to intent.** Mode auto-detected per `AX_AUDIT_MODES` (per-task | epic-level). Per `STEP_1_MECHANICAL`, first run the mechanical tool — `npx gennady sdd-check --task <ticket-path>` (or `--all` for an epic) — and take its findings as given. Then re-derive the gate independently: `npx gennady sdd-verify --profile full`, `npx gennady lint --spec=<module-spec>` on changed files, and `npx gennady testcov --run --min=80`. Feed all output into the directive's finding pipeline. Then follow Execution_Plan end-to-end (STEP_2_SEMANTIC, STEP_3_ROUTE). Do not deviate.
@@ -14,8 +14,8 @@ compatibility: opencode
14
14
 
15
15
  <ExecutionPlan>
16
16
  <Step id="RUN">
17
- If the operator named a Task-ID / ticket path → `npx tsx ~/Developer/gennady/cli/gennady.ts sdd-check --task <path>`.
18
- Otherwise (whole project) → `npx tsx ~/Developer/gennady/cli/gennady.ts sdd-check --all`.
17
+ If the operator named a Task-ID / ticket path → `npx gennady sdd-check --task <path>`.
18
+ Otherwise (whole project) → `npx gennady sdd-check --all`.
19
19
  </Step>
20
20
  <Step id="REPORT">
21
21
  Relay the findings verbatim grouped by file (`file: severity: code message`) plus the one-line summary,
@@ -16,7 +16,10 @@ compatibility: opencode
16
16
 
17
17
  <ExecutionPlan>
18
18
  <Step id="GATHER">
19
- Read in full `~/Developer/gennady/ai/directives/sdd-v2/code-review.directive.xml`.
19
+ Read in full `ai/directives/sdd-v2/code-review.directive.xml`. Resolve deterministically,
20
+ project root first: `ai/directives/sdd-v2/code-review.directive.xml`; if missing,
21
+ `node_modules/gennady/ai/directives/sdd-v2/code-review.directive.xml`; if neither exists,
22
+ stop and tell the operator to run `npx gennady sync` — never search for it.
20
23
  </Step>
21
24
  <Step id="EMBODY">
22
25
  You ARE the code-review now. Input — a Task-ID (or the dispatch payload from the execute orchestrator):
@@ -16,8 +16,11 @@ compatibility: opencode
16
16
 
17
17
  <ExecutionPlan>
18
18
  <Step id="GATHER">
19
- One parallel batch (do NOT serialize): run `npx tsx ~/Developer/gennady/cli/gennady.ts sdd-state`
20
- AND read in full `~/Developer/gennady/ai/directives/sdd-v2/critic.directive.xml`.
19
+ One parallel batch (do NOT serialize): run `npx gennady sdd-state`
20
+ AND read in full `ai/directives/sdd-v2/critic.directive.xml`.
21
+ Resolve every `ai/directives/sdd-v2/<file>` below deterministically, project root first: if
22
+ missing, `node_modules/gennady/ai/directives/sdd-v2/<file>`; if neither exists, stop and tell
23
+ the operator to run `npx gennady sync` — never search for it.
21
24
  </Step>
22
25
  <Step id="PREFLIGHT">
23
26
  Size the gate to this request's blast radius first: when the critique target stays inside its own scope (a single spec / task) and never touches `tasks/` layout or a missing gate script, record `FLOW_VERSION` / `READINESS` in one line and proceed straight to EMBODY — offer migration / readiness setup to the operator as a separate next step, not inside this run.
@@ -16,9 +16,12 @@ compatibility: opencode
16
16
 
17
17
  <ExecutionPlan>
18
18
  <Step id="GATHER">
19
- One parallel batch (do NOT serialize): run `npx tsx ~/Developer/gennady/cli/gennady.ts sdd-state`
19
+ One parallel batch (do NOT serialize): run `npx gennady sdd-state`
20
20
  (flow version · readiness · scopes) AND read in full
21
- `~/Developer/gennady/ai/directives/sdd-v2/execute.directive.xml`.
21
+ `ai/directives/sdd-v2/execute.directive.xml`.
22
+ Resolve every `ai/directives/sdd-v2/<file>` below deterministically, project root first: if
23
+ missing, `node_modules/gennady/ai/directives/sdd-v2/<file>`; if neither exists, stop and tell
24
+ the operator to run `npx gennady sync` — never search for it.
22
25
  </Step>
23
26
  <Step id="PREFLIGHT">
24
27
  Size the gate to this request's blast radius first: when the requested execution stays inside a single task's own scope and never touches `tasks/` layout or a missing gate script, record `FLOW_VERSION` / `READINESS` in one line and proceed straight to EMBODY — offer migration / readiness setup to the operator as a separate next step, not inside this run.
@@ -16,8 +16,11 @@ compatibility: opencode
16
16
 
17
17
  <ExecutionPlan>
18
18
  <Step id="GATHER">
19
- One parallel batch (do NOT serialize): run `npx tsx ~/Developer/gennady/cli/gennady.ts sdd-state`
20
- AND read in full `~/Developer/gennady/ai/directives/sdd-v2/reconcile.directive.xml`.
19
+ One parallel batch (do NOT serialize): run `npx gennady sdd-state`
20
+ AND read in full `ai/directives/sdd-v2/reconcile.directive.xml`.
21
+ Resolve every `ai/directives/sdd-v2/<file>` below deterministically, project root first: if
22
+ missing, `node_modules/gennady/ai/directives/sdd-v2/<file>`; if neither exists, stop and tell
23
+ the operator to run `npx gennady sync` — never search for it.
21
24
  </Step>
22
25
  <Step id="PREFLIGHT">
23
26
  Size the gate to this request's blast radius first: when the reconcile stays inside its own scope (a single finding, a single ticket) and never touches `tasks/` layout or a missing gate script, record `FLOW_VERSION` / `READINESS` in one line and proceed straight to EMBODY — offer migration / readiness setup to the operator as a separate next step, not inside this run.