@nforma.ai/nforma 0.2.1 → 0.29.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 (193) hide show
  1. package/README.md +2 -2
  2. package/agents/{qgsd-codebase-mapper.md → nf-codebase-mapper.md} +1 -1
  3. package/agents/{qgsd-debugger.md → nf-debugger.md} +3 -3
  4. package/agents/{qgsd-executor.md → nf-executor.md} +14 -14
  5. package/agents/{qgsd-integration-checker.md → nf-integration-checker.md} +1 -1
  6. package/agents/{qgsd-phase-researcher.md → nf-phase-researcher.md} +6 -6
  7. package/agents/{qgsd-plan-checker.md → nf-plan-checker.md} +9 -9
  8. package/agents/{qgsd-planner.md → nf-planner.md} +9 -9
  9. package/agents/{qgsd-project-researcher.md → nf-project-researcher.md} +2 -2
  10. package/agents/{qgsd-quorum-orchestrator.md → nf-quorum-orchestrator.md} +33 -33
  11. package/agents/{qgsd-quorum-slot-worker.md → nf-quorum-slot-worker.md} +3 -3
  12. package/agents/{qgsd-quorum-synthesizer.md → nf-quorum-synthesizer.md} +3 -3
  13. package/agents/{qgsd-quorum-test-worker.md → nf-quorum-test-worker.md} +1 -1
  14. package/agents/{qgsd-quorum-worker.md → nf-quorum-worker.md} +6 -6
  15. package/agents/{qgsd-research-synthesizer.md → nf-research-synthesizer.md} +5 -5
  16. package/agents/{qgsd-roadmapper.md → nf-roadmapper.md} +3 -3
  17. package/agents/{qgsd-verifier.md → nf-verifier.md} +8 -8
  18. package/bin/accept-debug-invariant.cjs +2 -2
  19. package/bin/account-manager.cjs +10 -10
  20. package/bin/aggregate-requirements.cjs +1 -1
  21. package/bin/analyze-assumptions.cjs +3 -3
  22. package/bin/analyze-state-space.cjs +14 -14
  23. package/bin/assumption-register.cjs +146 -0
  24. package/bin/attribute-trace-divergence.cjs +1 -1
  25. package/bin/auth-drivers/gh-cli.cjs +1 -1
  26. package/bin/auth-drivers/pool.cjs +1 -1
  27. package/bin/autoClosePtoF.cjs +3 -3
  28. package/bin/budget-tracker.cjs +77 -0
  29. package/bin/build-layer-manifest.cjs +153 -0
  30. package/bin/call-quorum-slot.cjs +3 -3
  31. package/bin/ccr-secure-config.cjs +5 -5
  32. package/bin/check-bundled-sdks.cjs +1 -1
  33. package/bin/check-mcp-health.cjs +1 -1
  34. package/bin/check-provider-health.cjs +6 -6
  35. package/bin/check-spec-sync.cjs +26 -26
  36. package/bin/check-trace-schema-drift.cjs +5 -5
  37. package/bin/conformance-schema.cjs +2 -2
  38. package/bin/cross-layer-dashboard.cjs +297 -0
  39. package/bin/design-impact.cjs +377 -0
  40. package/bin/detect-coverage-gaps.cjs +7 -7
  41. package/bin/failure-mode-catalog.cjs +227 -0
  42. package/bin/failure-taxonomy.cjs +177 -0
  43. package/bin/formal-scope-scan.cjs +179 -0
  44. package/bin/gate-a-grounding.cjs +334 -0
  45. package/bin/gate-b-abstraction.cjs +243 -0
  46. package/bin/gate-c-validation.cjs +166 -0
  47. package/bin/generate-formal-specs.cjs +17 -17
  48. package/bin/generate-petri-net.cjs +3 -3
  49. package/bin/generate-tla-cfg.cjs +5 -5
  50. package/bin/git-heatmap.cjs +571 -0
  51. package/bin/harness-diagnostic.cjs +326 -0
  52. package/bin/hazard-model.cjs +261 -0
  53. package/bin/install-formal-tools.cjs +1 -1
  54. package/bin/install.js +184 -139
  55. package/bin/instrumentation-map.cjs +178 -0
  56. package/bin/invariant-catalog.cjs +437 -0
  57. package/bin/issue-classifier.cjs +2 -2
  58. package/bin/load-baseline-requirements.cjs +4 -4
  59. package/bin/manage-agents-core.cjs +32 -32
  60. package/bin/migrate-to-slots.cjs +39 -39
  61. package/bin/mismatch-register.cjs +217 -0
  62. package/bin/nForma.cjs +176 -81
  63. package/bin/{qgsd-solve.cjs → nf-solve.cjs} +327 -14
  64. package/bin/observe-config.cjs +8 -0
  65. package/bin/observe-debt-writer.cjs +1 -1
  66. package/bin/observe-handler-deps.cjs +356 -0
  67. package/bin/observe-handler-grafana.cjs +2 -17
  68. package/bin/observe-handler-internal.cjs +5 -5
  69. package/bin/observe-handler-logstash.cjs +2 -17
  70. package/bin/observe-handler-prometheus.cjs +2 -17
  71. package/bin/observe-handler-upstream.cjs +251 -0
  72. package/bin/observe-handlers.cjs +12 -33
  73. package/bin/observe-render.cjs +68 -22
  74. package/bin/observe-utils.cjs +37 -0
  75. package/bin/observed-fsm.cjs +324 -0
  76. package/bin/planning-paths.cjs +6 -0
  77. package/bin/polyrepo.cjs +1 -1
  78. package/bin/probe-quorum-slots.cjs +1 -1
  79. package/bin/promote-gate-maturity.cjs +274 -0
  80. package/bin/promote-model.cjs +1 -1
  81. package/bin/propose-debug-invariants.cjs +1 -1
  82. package/bin/quorum-cache.cjs +144 -0
  83. package/bin/quorum-consensus-gate.cjs +1 -1
  84. package/bin/quorum-preflight.cjs +89 -0
  85. package/bin/quorum-slot-dispatch.cjs +6 -6
  86. package/bin/requirements-core.cjs +1 -1
  87. package/bin/review-mcp-logs.cjs +1 -1
  88. package/bin/risk-heatmap.cjs +151 -0
  89. package/bin/run-account-manager-tlc.cjs +4 -4
  90. package/bin/run-account-pool-alloy.cjs +2 -2
  91. package/bin/run-alloy.cjs +2 -2
  92. package/bin/run-audit-alloy.cjs +2 -2
  93. package/bin/run-breaker-tlc.cjs +3 -3
  94. package/bin/run-formal-check.cjs +9 -9
  95. package/bin/run-formal-verify.cjs +30 -9
  96. package/bin/run-installer-alloy.cjs +2 -2
  97. package/bin/run-oscillation-tlc.cjs +4 -4
  98. package/bin/run-phase-tlc.cjs +1 -1
  99. package/bin/run-protocol-tlc.cjs +4 -4
  100. package/bin/run-quorum-composition-alloy.cjs +2 -2
  101. package/bin/run-sensitivity-sweep.cjs +2 -2
  102. package/bin/run-stop-hook-tlc.cjs +3 -3
  103. package/bin/run-tlc.cjs +21 -21
  104. package/bin/run-transcript-alloy.cjs +2 -2
  105. package/bin/secrets.cjs +5 -5
  106. package/bin/security-sweep.cjs +238 -0
  107. package/bin/sensitivity-report.cjs +3 -3
  108. package/bin/set-secret.cjs +5 -5
  109. package/bin/setup-telemetry-cron.sh +3 -3
  110. package/bin/stall-detector.cjs +126 -0
  111. package/bin/state-candidates.cjs +206 -0
  112. package/bin/sync-baseline-requirements.cjs +1 -1
  113. package/bin/telemetry-collector.cjs +1 -1
  114. package/bin/test-changed.cjs +111 -0
  115. package/bin/test-recipe-gen.cjs +250 -0
  116. package/bin/trace-corpus-stats.cjs +211 -0
  117. package/bin/unified-mcp-server.mjs +3 -3
  118. package/bin/update-scoreboard.cjs +1 -1
  119. package/bin/validate-memory.cjs +2 -2
  120. package/bin/validate-traces.cjs +10 -10
  121. package/bin/verify-quorum-health.cjs +66 -5
  122. package/bin/xstate-to-tla.cjs +4 -4
  123. package/bin/xstate-trace-walker.cjs +3 -3
  124. package/commands/{qgsd → nf}/add-phase.md +3 -3
  125. package/commands/{qgsd → nf}/add-requirement.md +3 -3
  126. package/commands/{qgsd → nf}/add-todo.md +3 -3
  127. package/commands/{qgsd → nf}/audit-milestone.md +4 -4
  128. package/commands/{qgsd → nf}/check-todos.md +3 -3
  129. package/commands/{qgsd → nf}/cleanup.md +3 -3
  130. package/commands/{qgsd → nf}/close-formal-gaps.md +2 -2
  131. package/commands/{qgsd → nf}/complete-milestone.md +9 -9
  132. package/commands/{qgsd → nf}/debug.md +9 -9
  133. package/commands/{qgsd → nf}/discuss-phase.md +3 -3
  134. package/commands/{qgsd → nf}/execute-phase.md +15 -15
  135. package/commands/{qgsd → nf}/fix-tests.md +3 -3
  136. package/commands/{qgsd → nf}/formal-test-sync.md +1 -1
  137. package/commands/{qgsd → nf}/health.md +3 -3
  138. package/commands/{qgsd → nf}/help.md +3 -3
  139. package/commands/{qgsd → nf}/insert-phase.md +3 -3
  140. package/commands/nf/join-discord.md +18 -0
  141. package/commands/{qgsd → nf}/list-phase-assumptions.md +2 -2
  142. package/commands/{qgsd → nf}/map-codebase.md +7 -7
  143. package/commands/{qgsd → nf}/map-requirements.md +3 -3
  144. package/commands/{qgsd → nf}/mcp-restart.md +3 -3
  145. package/commands/{qgsd → nf}/mcp-set-model.md +8 -8
  146. package/commands/{qgsd → nf}/mcp-setup.md +63 -63
  147. package/commands/{qgsd → nf}/mcp-status.md +3 -3
  148. package/commands/{qgsd → nf}/mcp-update.md +7 -7
  149. package/commands/{qgsd → nf}/new-milestone.md +8 -8
  150. package/commands/{qgsd → nf}/new-project.md +8 -8
  151. package/commands/{qgsd → nf}/observe.md +49 -16
  152. package/commands/{qgsd → nf}/pause-work.md +3 -3
  153. package/commands/{qgsd → nf}/plan-milestone-gaps.md +5 -5
  154. package/commands/{qgsd → nf}/plan-phase.md +6 -6
  155. package/commands/{qgsd → nf}/polyrepo.md +2 -2
  156. package/commands/{qgsd → nf}/progress.md +3 -3
  157. package/commands/{qgsd → nf}/queue.md +2 -2
  158. package/commands/{qgsd → nf}/quick.md +8 -8
  159. package/commands/{qgsd → nf}/quorum-test.md +10 -10
  160. package/commands/{qgsd → nf}/quorum.md +36 -86
  161. package/commands/{qgsd → nf}/reapply-patches.md +2 -2
  162. package/commands/{qgsd → nf}/remove-phase.md +3 -3
  163. package/commands/{qgsd → nf}/research-phase.md +12 -12
  164. package/commands/{qgsd → nf}/resume-work.md +3 -3
  165. package/commands/nf/review-requirements.md +31 -0
  166. package/commands/{qgsd → nf}/set-profile.md +3 -3
  167. package/commands/{qgsd → nf}/settings.md +6 -6
  168. package/commands/{qgsd → nf}/solve.md +35 -35
  169. package/commands/{qgsd → nf}/sync-baselines.md +4 -4
  170. package/commands/{qgsd → nf}/triage.md +10 -10
  171. package/commands/{qgsd → nf}/update.md +3 -3
  172. package/commands/{qgsd → nf}/verify-work.md +5 -5
  173. package/hooks/dist/config-loader.js +188 -32
  174. package/hooks/dist/conformance-schema.cjs +2 -2
  175. package/hooks/dist/gsd-context-monitor.js +118 -13
  176. package/hooks/dist/{qgsd-check-update.js → nf-check-update.js} +5 -5
  177. package/hooks/dist/{qgsd-circuit-breaker.js → nf-circuit-breaker.js} +35 -24
  178. package/hooks/dist/{qgsd-precompact.js → nf-precompact.js} +13 -13
  179. package/hooks/dist/{qgsd-prompt.js → nf-prompt.js} +110 -33
  180. package/hooks/dist/nf-session-start.js +185 -0
  181. package/hooks/dist/{qgsd-slot-correlator.js → nf-slot-correlator.js} +13 -5
  182. package/hooks/dist/{qgsd-spec-regen.js → nf-spec-regen.js} +17 -8
  183. package/hooks/dist/{qgsd-statusline.js → nf-statusline.js} +12 -3
  184. package/hooks/dist/{qgsd-stop.js → nf-stop.js} +152 -18
  185. package/hooks/dist/{qgsd-token-collector.js → nf-token-collector.js} +12 -4
  186. package/hooks/dist/unified-mcp-server.mjs +2 -2
  187. package/package.json +6 -4
  188. package/scripts/build-hooks.js +13 -6
  189. package/scripts/secret-audit.sh +1 -1
  190. package/scripts/verify-hooks-sync.cjs +90 -0
  191. package/templates/{qgsd.json → nf.json} +4 -4
  192. package/commands/qgsd/join-discord.md +0 -18
  193. package/hooks/dist/qgsd-session-start.js +0 -122
@@ -85,7 +85,7 @@ function pMajorityExternal(agents) {
85
85
  // Atomically updates maxDeliberation in the XState machine and config.json,
86
86
  // then regenerates formal specs. Returns { success, newValue, machineUpdated, configUpdated, specsRegenerated, error, rolledBack }
87
87
  function applyMaxDeliberationUpdate(newValue, options = {}) {
88
- const machineFile = options.machineFile || path.join(ROOT, 'src', 'machines', 'qgsd-workflow.machine.ts');
88
+ const machineFile = options.machineFile || path.join(ROOT, 'src', 'machines', 'nf-workflow.machine.ts');
89
89
  const configFile = options.configFile || path.join(ROOT, '.planning', 'config.json');
90
90
  const skipSpecGen = options.skipSpecGen || false; // For testing without generate-formal-specs.cjs
91
91
 
@@ -135,6 +135,40 @@ function applyMaxDeliberationUpdate(newValue, options = {}) {
135
135
  }
136
136
  }
137
137
 
138
+ // computePassAtKRates(conformanceEventsPath)
139
+ // Reads a JSONL conformance events file and computes pass@k consensus efficiency
140
+ // rates from quorum_complete APPROVE events that have a pass_at_k field.
141
+ // Excludes cache-hit events (pass_at_k === 0) and pre-PASSK events (no pass_at_k field).
142
+ // Returns { total, pass_at_1, pass_at_3, avg_k } — rates as floats 0.0-1.0.
143
+ function computePassAtKRates(conformanceEventsPath) {
144
+ const result = { total: 0, pass_at_1: 0, pass_at_3: 0, avg_k: 0 };
145
+ if (!fs.existsSync(conformanceEventsPath)) return result;
146
+
147
+ const lines = fs.readFileSync(conformanceEventsPath, 'utf8')
148
+ .split('\n')
149
+ .filter(l => l.trim().length > 0);
150
+
151
+ const qualifying = [];
152
+ for (const line of lines) {
153
+ try {
154
+ const evt = JSON.parse(line);
155
+ if (evt.action !== 'quorum_complete') continue;
156
+ if (evt.outcome !== 'APPROVE') continue;
157
+ if (typeof evt.pass_at_k !== 'number') continue; // skip pre-PASSK events
158
+ if (evt.pass_at_k === 0) continue; // skip cache hits
159
+ qualifying.push(evt.pass_at_k);
160
+ } catch { /* skip malformed lines */ }
161
+ }
162
+
163
+ if (qualifying.length === 0) return result;
164
+
165
+ result.total = qualifying.length;
166
+ result.pass_at_1 = qualifying.filter(k => k === 1).length / qualifying.length;
167
+ result.pass_at_3 = qualifying.filter(k => k <= 3).length / qualifying.length;
168
+ result.avg_k = qualifying.reduce((sum, k) => sum + k, 0) / qualifying.length;
169
+ return result;
170
+ }
171
+
138
172
  // ── CLI Handler ───────────────────────────────────────────────────────────────
139
173
 
140
174
  function main() {
@@ -145,7 +179,7 @@ function main() {
145
179
 
146
180
  // ── Load XState machine (source of truth for MaxDeliberation) ─────────────────
147
181
  const machineSrc = fs.readFileSync(
148
- path.join(ROOT, 'src', 'machines', 'qgsd-workflow.machine.ts'), 'utf8'
182
+ path.join(ROOT, 'src', 'machines', 'nf-workflow.machine.ts'), 'utf8'
149
183
  );
150
184
  const maxDelibMatch = machineSrc.match(/maxDeliberation:\s*(\d+)/);
151
185
  const maxDelib = maxDelibMatch ? parseInt(maxDelibMatch[1], 10) : null;
@@ -193,7 +227,7 @@ function main() {
193
227
  const pPriorWithinK = k => 1 - Math.pow(1 - P_PRIOR_PER_ROUND, k);
194
228
 
195
229
  // ── Report ────────────────────────────────────────────────────────────────────
196
- process.stdout.write('\n[verify-quorum-health] QGSD Quorum Reliability Report\n');
230
+ process.stdout.write('\n[verify-quorum-health] nForma Quorum Reliability Report\n');
197
231
  process.stdout.write('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n');
198
232
 
199
233
  process.stdout.write('Per-agent effective approval probability (tp_rate × availability):\n');
@@ -233,6 +267,33 @@ function main() {
233
267
  // ── Gate ──────────────────────────────────────────────────────────────────────
234
268
  const pass = pActual >= TARGET_CONFIDENCE;
235
269
 
270
+ // ── Pass@k Consensus Efficiency ──────────────────────────────────────────
271
+ try {
272
+ let conformancePath;
273
+ try {
274
+ const pp = require('./planning-paths.cjs');
275
+ conformancePath = pp.resolve(ROOT, 'conformance-events');
276
+ } catch (_) {
277
+ // Fallback: try both canonical and legacy paths directly
278
+ const canonical = path.join(ROOT, '.planning', 'telemetry', 'conformance-events.jsonl');
279
+ const legacy = path.join(ROOT, '.planning', 'conformance-events.jsonl');
280
+ conformancePath = fs.existsSync(canonical) ? canonical : legacy;
281
+ }
282
+ const passAtK = computePassAtKRates(conformancePath);
283
+ process.stdout.write('## Pass@k Consensus Efficiency\n');
284
+ if (passAtK.total > 0) {
285
+ process.stdout.write(' pass@1: ' + (passAtK.pass_at_1 * 100).toFixed(1) + '%\n');
286
+ process.stdout.write(' pass@3: ' + (passAtK.pass_at_3 * 100).toFixed(1) + '%\n');
287
+ process.stdout.write(' avg rounds: ' + passAtK.avg_k.toFixed(1) + '\n');
288
+ process.stdout.write(' total quorum events: ' + passAtK.total + '\n');
289
+ } else {
290
+ process.stdout.write(' No pass@k data available yet (requires quorum runs after v0.28-02).\n');
291
+ }
292
+ process.stdout.write('\n');
293
+ } catch (_) {
294
+ // Fail-open: pass@k reporting is informational, never blocks the gate
295
+ }
296
+
236
297
  if (pass) {
237
298
  process.stdout.write('✓ PASS P(within ' + maxDelib + ' rounds) = ' + (pActual * 100).toFixed(1) + '% ≥ ' + (TARGET_CONFIDENCE * 100).toFixed(0) + '% target\n\n');
238
299
  } else {
@@ -256,7 +317,7 @@ function main() {
256
317
  }
257
318
  } else {
258
319
  process.stderr.write(' Run with --auto-apply to apply automatically, or manually update:\n' +
259
- ' src/machines/qgsd-workflow.machine.ts and re-run: node bin/generate-formal-specs.cjs && node bin/check-spec-sync.cjs\n\n');
320
+ ' src/machines/nf-workflow.machine.ts and re-run: node bin/generate-formal-specs.cjs && node bin/check-spec-sync.cjs\n\n');
260
321
  process.exit(1);
261
322
  }
262
323
  }
@@ -264,7 +325,7 @@ function main() {
264
325
 
265
326
  // ── Exports ───────────────────────────────────────────────────────────────────
266
327
 
267
- module.exports = { suggestMaxDeliberation, applyMaxDeliberationUpdate, computeRates, pMajorityExternal };
328
+ module.exports = { suggestMaxDeliberation, applyMaxDeliberationUpdate, computeRates, pMajorityExternal, computePassAtKRates };
268
329
 
269
330
  // ── CLI Execution ─────────────────────────────────────────────────────────────
270
331
 
@@ -12,11 +12,11 @@
12
12
  //
13
13
  // Usage:
14
14
  // node bin/xstate-to-tla.cjs <machine-file.ts>
15
- // node bin/xstate-to-tla.cjs src/machines/qgsd-workflow.machine.ts \
16
- // --module=QGSDQuorum \
17
- // --config=.planning/formal/tla/guards/qgsd-workflow.json
15
+ // node bin/xstate-to-tla.cjs src/machines/nf-workflow.machine.ts \
16
+ // --module=NFQuorum \
17
+ // --config=.planning/formal/tla/guards/nf-workflow.json
18
18
  // node bin/xstate-to-tla.cjs src/machines/account-manager.machine.ts \
19
- // --module=QGSDAccountManager \
19
+ // --module=NFAccountManager \
20
20
  // --config=.planning/formal/tla/guards/account-manager.json \
21
21
  // --dry
22
22
  //
@@ -19,11 +19,11 @@ let _cachedMachineModule = null;
19
19
 
20
20
  function loadMachineModule() {
21
21
  if (_cachedMachineModule) return _cachedMachineModule;
22
- const repoDist = path.join(__dirname, '..', 'dist', 'machines', 'qgsd-workflow.machine.cjs');
23
- const installDist = path.join(__dirname, 'dist', 'machines', 'qgsd-workflow.machine.cjs');
22
+ const repoDist = path.join(__dirname, '..', 'dist', 'machines', 'nf-workflow.machine.js');
23
+ const installDist = path.join(__dirname, 'dist', 'machines', 'nf-workflow.machine.js');
24
24
  const machinePath = fs.existsSync(repoDist) ? repoDist : installDist;
25
25
  if (!fs.existsSync(machinePath)) {
26
- throw new Error('Cannot find qgsd-workflow.machine.cjs at ' + repoDist + ' or ' + installDist);
26
+ throw new Error('Cannot find nf-workflow.machine.js at ' + repoDist + ' or ' + installDist);
27
27
  }
28
28
  _cachedMachineModule = require(machinePath);
29
29
  return _cachedMachineModule;
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: qgsd:add-phase
2
+ name: nf:add-phase
3
3
  description: Add phase to end of current milestone in roadmap
4
4
  argument-hint: <description>
5
5
  allowed-tools:
@@ -19,7 +19,7 @@ Routes to the add-phase workflow which handles:
19
19
  </objective>
20
20
 
21
21
  <execution_context>
22
- @~/.claude/qgsd/workflows/add-phase.md
22
+ @~/.claude/nf/workflows/add-phase.md
23
23
  </execution_context>
24
24
 
25
25
  <context>
@@ -29,7 +29,7 @@ Roadmap and state are resolved in-workflow via `init phase-op` and targeted tool
29
29
  </context>
30
30
 
31
31
  <process>
32
- **Follow the add-phase workflow** from `@~/.claude/qgsd/workflows/add-phase.md`.
32
+ **Follow the add-phase workflow** from `@~/.claude/nf/workflows/add-phase.md`.
33
33
 
34
34
  The workflow handles all logic including:
35
35
  1. Argument parsing and validation
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: qgsd:add-requirement
2
+ name: nf:add-requirement
3
3
  description: Add a single requirement to .planning/formal/requirements.json with duplicate and conflict checks
4
4
  argument-hint: [--id=PREFIX-NN] [--text="..."] [--category="..."] [--phase=vX.XX-NN] [--dry-run]
5
5
  allowed-tools:
@@ -15,10 +15,10 @@ Add a single requirement to the formal requirements envelope (`.planning/formal/
15
15
  </objective>
16
16
 
17
17
  <execution_context>
18
- @~/.claude/qgsd/workflows/add-requirement.md
18
+ @~/.claude/nf/workflows/add-requirement.md
19
19
  </execution_context>
20
20
 
21
21
  <process>
22
- Execute the add-requirement workflow from @~/.claude/qgsd/workflows/add-requirement.md end-to-end.
22
+ Execute the add-requirement workflow from @~/.claude/nf/workflows/add-requirement.md end-to-end.
23
23
  Pass through all --flags from arguments. If required fields (id, text, category, phase) are not provided as arguments, prompt the user interactively.
24
24
  </process>
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: qgsd:add-todo
2
+ name: nf:add-todo
3
3
  description: Capture idea or task as todo from current conversation context
4
4
  argument-hint: [optional description]
5
5
  allowed-tools:
@@ -23,7 +23,7 @@ Routes to the add-todo workflow which handles:
23
23
  </objective>
24
24
 
25
25
  <execution_context>
26
- @~/.claude/qgsd/workflows/add-todo.md
26
+ @~/.claude/nf/workflows/add-todo.md
27
27
  </execution_context>
28
28
 
29
29
  <context>
@@ -33,7 +33,7 @@ State is resolved in-workflow via `init todos` and targeted reads.
33
33
  </context>
34
34
 
35
35
  <process>
36
- **Follow the add-todo workflow** from `@~/.claude/qgsd/workflows/add-todo.md`.
36
+ **Follow the add-todo workflow** from `@~/.claude/nf/workflows/add-todo.md`.
37
37
 
38
38
  The workflow handles all logic including:
39
39
  1. Directory ensuring
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: qgsd:audit-milestone
2
+ name: nf:audit-milestone
3
3
  description: Audit milestone completion against original intent before archiving
4
4
  argument-hint: "[version] [--auto]"
5
5
  allowed-tools:
@@ -12,13 +12,13 @@ allowed-tools:
12
12
  - AskUserQuestion
13
13
  ---
14
14
  <objective>
15
- Verify milestone achieved its definition of done. Check requirements coverage, cross-phase integration, and end-to-end flows.
15
+ Verify milestone achieved its definition of done. Check requirements coverage, cross-phase integration, and end-to-end flows. Auto-remediates tech debt and gaps via solve→plan→execute loop.
16
16
 
17
17
  **This command IS the orchestrator.** Reads existing VERIFICATION.md files (phases already verified during execute-phase), aggregates tech debt and deferred gaps, then spawns integration checker for cross-phase wiring.
18
18
  </objective>
19
19
 
20
20
  <execution_context>
21
- @~/.claude/qgsd/workflows/audit-milestone.md
21
+ @~/.claude/nf/workflows/audit-milestone.md
22
22
  </execution_context>
23
23
 
24
24
  <context>
@@ -32,6 +32,6 @@ Glob: .planning/phases/*/*-VERIFICATION.md
32
32
  </context>
33
33
 
34
34
  <process>
35
- Execute the audit-milestone workflow from @~/.claude/qgsd/workflows/audit-milestone.md end-to-end.
35
+ Execute the audit-milestone workflow from @~/.claude/nf/workflows/audit-milestone.md end-to-end.
36
36
  Preserve all workflow gates (scope determination, verification reading, integration check, requirements coverage, routing).
37
37
  </process>
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: qgsd:check-todos
2
+ name: nf:check-todos
3
3
  description: List pending todos and select one to work on
4
4
  argument-hint: [area filter]
5
5
  allowed-tools:
@@ -21,7 +21,7 @@ Routes to the check-todos workflow which handles:
21
21
  </objective>
22
22
 
23
23
  <execution_context>
24
- @~/.claude/qgsd/workflows/check-todos.md
24
+ @~/.claude/nf/workflows/check-todos.md
25
25
  </execution_context>
26
26
 
27
27
  <context>
@@ -31,7 +31,7 @@ Todo state and roadmap correlation are loaded in-workflow using `init todos` and
31
31
  </context>
32
32
 
33
33
  <process>
34
- **Follow the check-todos workflow** from `@~/.claude/qgsd/workflows/check-todos.md`.
34
+ **Follow the check-todos workflow** from `@~/.claude/nf/workflows/check-todos.md`.
35
35
 
36
36
  The workflow handles all logic including:
37
37
  1. Todo existence checking
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: qgsd:cleanup
2
+ name: nf:cleanup
3
3
  description: Archive accumulated phase directories from completed milestones
4
4
  ---
5
5
  <objective>
@@ -9,10 +9,10 @@ Use when `.planning/phases/` has accumulated directories from past milestones.
9
9
  </objective>
10
10
 
11
11
  <execution_context>
12
- @~/.claude/qgsd/workflows/cleanup.md
12
+ @~/.claude/nf/workflows/cleanup.md
13
13
  </execution_context>
14
14
 
15
15
  <process>
16
- Follow the cleanup workflow at @~/.claude/qgsd/workflows/cleanup.md.
16
+ Follow the cleanup workflow at @~/.claude/nf/workflows/cleanup.md.
17
17
  Identify completed milestones, show a dry-run summary, and archive on confirmation.
18
18
  </process>
@@ -18,11 +18,11 @@ Close formal model coverage gaps by generating new formal specifications for unc
18
18
  </objective>
19
19
 
20
20
  <execution_context>
21
- @/Users/jonathanborduas/.claude/qgsd/workflows/close-formal-gaps.md
21
+ @/Users/jonathanborduas/.claude/nf/workflows/close-formal-gaps.md
22
22
  </execution_context>
23
23
 
24
24
  <process>
25
- Execute the close-formal-gaps workflow from @/Users/jonathanborduas/.claude/qgsd/workflows/close-formal-gaps.md end-to-end.
25
+ Execute the close-formal-gaps workflow from @/Users/jonathanborduas/.claude/nf/workflows/close-formal-gaps.md end-to-end.
26
26
  Pass through all --flags from arguments:
27
27
  --batch Fully autonomous mode — skip all user prompts, auto-approve clusters
28
28
  --category="Category Name" Focus on a specific category
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  type: prompt
3
- name: qgsd:complete-milestone
3
+ name: nf:complete-milestone
4
4
  description: Archive completed milestone and prepare for next version
5
5
  argument-hint: <version>
6
6
  allowed-tools:
@@ -19,8 +19,8 @@ Output: Milestone archived (roadmap + requirements), PROJECT.md evolved, git tag
19
19
  <execution_context>
20
20
  **Load these files NOW (before proceeding):**
21
21
 
22
- - @~/.claude/qgsd/workflows/complete-milestone.md (main workflow)
23
- - @~/.claude/qgsd/templates/milestone-archive.md (archive template)
22
+ - @~/.claude/nf/workflows/complete-milestone.md (main workflow)
23
+ - @~/.claude/nf/templates/milestone-archive.md (archive template)
24
24
  </execution_context>
25
25
 
26
26
  <context>
@@ -42,19 +42,19 @@ Output: Milestone archived (roadmap + requirements), PROJECT.md evolved, git tag
42
42
  0. **Check for audit:**
43
43
 
44
44
  - Look for `.planning/milestones/v{{version}}-MILESTONE-AUDIT.md` (or legacy `.planning/v{{version}}-MILESTONE-AUDIT.md`)
45
- - If missing or stale: recommend `/qgsd:audit-milestone` first
46
- - If audit status is `gaps_found`: recommend `/qgsd:plan-milestone-gaps` first
45
+ - If missing or stale: recommend `/nf:audit-milestone` first
46
+ - If audit status is `gaps_found`: recommend `/nf:plan-milestone-gaps` first
47
47
  - If audit status is `passed`: proceed to step 1
48
48
 
49
49
  ```markdown
50
50
  ## Pre-flight Check
51
51
 
52
52
  {If no v{{version}}-MILESTONE-AUDIT.md in milestones/ or root:}
53
- ⚠ No milestone audit found. Run `/qgsd:audit-milestone` first to verify
53
+ ⚠ No milestone audit found. Run `/nf:audit-milestone` first to verify
54
54
  requirements coverage, cross-phase integration, and E2E flows.
55
55
 
56
56
  {If audit has gaps:}
57
- ⚠ Milestone audit found gaps. Run `/qgsd:plan-milestone-gaps` to create
57
+ ⚠ Milestone audit found gaps. Run `/nf:plan-milestone-gaps` to create
58
58
  phases that close the gaps, or proceed anyway to accept as tech debt.
59
59
 
60
60
  {If audit passed:}
@@ -108,7 +108,7 @@ Output: Milestone archived (roadmap + requirements), PROJECT.md evolved, git tag
108
108
  - Ask about pushing tag
109
109
 
110
110
  8. **Offer next steps:**
111
- - `/qgsd:new-milestone` — start next milestone (questioning → research → requirements → roadmap)
111
+ - `/nf:new-milestone` — start next milestone (questioning → research → requirements → roadmap)
112
112
 
113
113
  </process>
114
114
 
@@ -132,5 +132,5 @@ Output: Milestone archived (roadmap + requirements), PROJECT.md evolved, git tag
132
132
  - **Archive before deleting:** Always create archive files before updating/deleting originals
133
133
  - **One-line summary:** Collapsed milestone in ROADMAP.md should be single line with link
134
134
  - **Context efficiency:** Archive keeps ROADMAP.md and REQUIREMENTS.md constant size per milestone
135
- - **Fresh requirements:** Next milestone starts with `/qgsd:new-milestone` which includes requirements definition
135
+ - **Fresh requirements:** Next milestone starts with `/nf:new-milestone` which includes requirements definition
136
136
  </critical_rules>
@@ -1,6 +1,6 @@
1
1
  ---
2
- name: qgsd:debug
3
- description: Debug loop with quorum consensus on next step. Feed failure context to 4 quorum workers — each identifies the single most likely root cause and next debugging step. Renders a NEXT STEP table. Call repeatedly: run test → fail → /qgsd:debug → apply step → run test again.
2
+ name: nf:debug
3
+ description: Debug loop with quorum consensus on next step. Feed failure context to 4 quorum workers — each identifies the single most likely root cause and next debugging step. Renders a NEXT STEP table. Call repeatedly: run test → fail → /nf:debug → apply step → run test again.
4
4
  argument-hint: "[failure context: test output, error trace, or symptom description]"
5
5
  allowed-tools:
6
6
  - Task
@@ -16,7 +16,7 @@ Dispatch the full quorum debug process to a subagent. The main command stays cle
16
16
 
17
17
  ```
18
18
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
19
- QGSD ► QUORUM-DEBUG: Dispatching debug subagent...
19
+ nForma ► QUORUM-DEBUG: Dispatching debug subagent...
20
20
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
21
21
  ```
22
22
 
@@ -29,7 +29,7 @@ Task(
29
29
  subagent_type="general-purpose",
30
30
  description="Quorum debug orchestration",
31
31
  prompt="""
32
- You are the QGSD quorum debug orchestrator. Run the full process below for this failure.
32
+ You are the nForma quorum debug orchestrator. Run the full process below for this failure.
33
33
 
34
34
  ARGUMENTS: $ARGUMENTS
35
35
 
@@ -50,7 +50,7 @@ If test files exist, run them:
50
50
  Store as $TEST_OUTPUT and $EXIT_CODE. If exit code is 0 and ARGUMENTS is empty, stop and return:
51
51
 
52
52
  QUORUM-DEBUG: No failure detected — tests pass (exit 0).
53
- If you have a symptom not captured by tests, run: /qgsd:debug [describe the symptom]
53
+ If you have a symptom not captured by tests, run: /nf:debug [describe the symptom]
54
54
 
55
55
  ### Step B: Assemble bundle
56
56
 
@@ -64,7 +64,7 @@ Compose $BUNDLE:
64
64
 
65
65
  Worker prompt template (inline $BUNDLE verbatim in each):
66
66
 
67
- You are a debugging advisor for the QGSD project.
67
+ You are a debugging advisor for the nForma project.
68
68
 
69
69
  <bundle>
70
70
  $BUNDLE
@@ -102,7 +102,7 @@ Consensus rules:
102
102
  Return this output:
103
103
 
104
104
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
105
- QGSD ► QUORUM-DEBUG RESULTS
105
+ nForma ► QUORUM-DEBUG RESULTS
106
106
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
107
107
 
108
108
  ┌──────────────┬──────────────┬─────────────────────────────────────────────┐
@@ -146,14 +146,14 @@ IF consensus was reached:
146
146
  Report what was done.
147
147
  Then return:
148
148
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
149
- Consensus step executed. Run /qgsd:debug again to continue.
149
+ Consensus step executed. Run /nf:debug again to continue.
150
150
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
151
151
 
152
152
  IF no consensus:
153
153
  Return:
154
154
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
155
155
  No consensus — review recommendations above and apply the most relevant step.
156
- Then run /qgsd:debug again with updated output.
156
+ Then run /nf:debug again with updated output.
157
157
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
158
158
  """
159
159
  )
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: qgsd:discuss-phase
2
+ name: nf:discuss-phase
3
3
  description: Gather phase context through adaptive questioning before planning
4
4
  argument-hint: "<phase> [--auto]"
5
5
  allowed-tools:
@@ -25,8 +25,8 @@ Extract implementation decisions that downstream agents need — researcher and
25
25
  </objective>
26
26
 
27
27
  <execution_context>
28
- @~/.claude/qgsd/workflows/discuss-phase.md
29
- @~/.claude/qgsd/templates/context.md
28
+ @~/.claude/nf/workflows/discuss-phase.md
29
+ @~/.claude/nf/templates/context.md
30
30
  </execution_context>
31
31
 
32
32
  <context>
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: qgsd:execute-phase
2
+ name: nf:execute-phase
3
3
  description: Execute all plans in a phase with wave parallelization and automated checkpoint:verify gates via quorum-test.
4
4
  argument-hint: "<phase-number>"
5
5
  allowed-tools:
@@ -15,11 +15,11 @@ allowed-tools:
15
15
  ---
16
16
 
17
17
  <objective>
18
- Execute all plans in a phase. Delegates to the gsd:execute-phase workflow for wave-based plan execution. Extends the workflow with automated verification gates: when a plan step has type checkpoint:verify, the executor runs /qgsd:quorum-test instead of waiting for human input. Escalates to checkpoint:human-verify only on failure.
18
+ Execute all plans in a phase. Delegates to the gsd:execute-phase workflow for wave-based plan execution. Extends the workflow with automated verification gates: when a plan step has type checkpoint:verify, the executor runs /nf:quorum-test instead of waiting for human input. Escalates to checkpoint:human-verify only on failure.
19
19
  </objective>
20
20
 
21
21
  <execution_context>
22
- @~/.claude/qgsd/workflows/execute-phase.md
22
+ @~/.claude/nf/workflows/execute-phase.md
23
23
  </execution_context>
24
24
 
25
25
  <context>
@@ -31,16 +31,16 @@ Phase: $ARGUMENTS
31
31
 
32
32
  <process>
33
33
 
34
- Execute the execute-phase workflow from @~/.claude/qgsd/workflows/execute-phase.md end-to-end, applying the checkpoint type handling rules below at every plan step.
34
+ Execute the execute-phase workflow from @~/.claude/nf/workflows/execute-phase.md end-to-end, applying the checkpoint type handling rules below at every plan step.
35
35
 
36
- ## Agent Substitution (QGSD override)
36
+ ## Agent Substitution (nForma override)
37
37
 
38
38
  The GSD workflow uses GSD-specific agent types. When following that workflow, substitute:
39
39
 
40
- | GSD agent type (in workflow) | Use instead (QGSD) |
40
+ | GSD agent type (in workflow) | Use instead (nForma) |
41
41
  |------------------------------|---------------------|
42
- | `gsd-executor` | `qgsd-executor` |
43
- | `gsd-verifier` | `qgsd-verifier` |
42
+ | `gsd-executor` | `nf-executor` |
43
+ | `gsd-verifier` | `nf-verifier` |
44
44
 
45
45
  This applies everywhere the workflow calls `Task(subagent_type="gsd-executor", ...)` or `Task(subagent_type="gsd-verifier", ...)`. All other agent types pass through unchanged.
46
46
 
@@ -56,7 +56,7 @@ When the executor reads a plan step whose type is `checkpoint:verify`, it MUST:
56
56
 
57
57
  a. NOT pause for human input.
58
58
  b. Identify the test scope from the step's verify section (test file paths or test command).
59
- c. Call `/qgsd:quorum-test` with that scope.
59
+ c. Call `/nf:quorum-test` with that scope.
60
60
  d. Evaluate the consensus verdict:
61
61
  - **PASS:** log `checkpoint:verify PASSED — quorum consensus` and continue execution.
62
62
  - **BLOCK or REVIEW-NEEDED:** enter the debug loop (see Rule 3).
@@ -72,13 +72,13 @@ When the executor reads a plan step whose type is `checkpoint:human-verify`, it
72
72
 
73
73
  ### Rule 3 — Debug loop (3 rounds max)
74
74
 
75
- Triggered when `/qgsd:quorum-test` returns BLOCK or REVIEW-NEEDED on a `checkpoint:verify` step.
75
+ Triggered when `/nf:quorum-test` returns BLOCK or REVIEW-NEEDED on a `checkpoint:verify` step.
76
76
 
77
77
  Round N (N = 1, 2, 3):
78
78
 
79
- 1. Call `/qgsd:debug` with the quorum-test failure context as `$ARGUMENTS`.
80
- 2. Apply the consensus next step from `/qgsd:debug` (code fix, test correction, or config update as directed by the consensus).
81
- 3. Re-run `/qgsd:quorum-test` with the same scope.
79
+ 1. Call `/nf:debug` with the quorum-test failure context as `$ARGUMENTS`.
80
+ 2. Apply the consensus next step from `/nf:debug` (code fix, test correction, or config update as directed by the consensus).
81
+ 3. Re-run `/nf:quorum-test` with the same scope.
82
82
  4. If result is PASS: log `checkpoint:verify PASSED after N debug round(s)` and continue.
83
83
  5. If result is still BLOCK/REVIEW-NEEDED and N < 3: increment round, repeat.
84
84
 
@@ -90,7 +90,7 @@ After 3 rounds with no PASS: escalate to `checkpoint:human-verify` (Rule 4).
90
90
 
91
91
  Display a failure summary:
92
92
  - The `checkpoint:verify` step that failed
93
- - Number of `/qgsd:debug` rounds attempted
93
+ - Number of `/nf:debug` rounds attempted
94
94
  - Final quorum-test verdict and concerns from each model
95
95
 
96
96
  Then pause: request human review and corrective action before resuming.
@@ -111,7 +111,7 @@ Then pause: request human review and corrective action before resuming.
111
111
  After all plans in the phase complete, display:
112
112
 
113
113
  ```
114
- All plans complete. Run /qgsd:verify-work to confirm goal achievement.
114
+ All plans complete. Run /nf:verify-work to confirm goal achievement.
115
115
  ```
116
116
 
117
117
  </process>
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: qgsd:fix-tests
2
+ name: nf:fix-tests
3
3
  description: Autonomously discover, batch, run, categorize, and fix test failures across large suites
4
4
  allowed-tools:
5
5
  - Read
@@ -19,9 +19,9 @@ This command is execution-only — it does NOT invoke quorum workers (R2.1 / INT
19
19
  </objective>
20
20
 
21
21
  <execution_context>
22
- @~/.claude/qgsd/workflows/fix-tests.md
22
+ @~/.claude/nf/workflows/fix-tests.md
23
23
  </execution_context>
24
24
 
25
25
  <process>
26
- Follow the fix-tests workflow from @~/.claude/qgsd/workflows/fix-tests.md end-to-end.
26
+ Follow the fix-tests workflow from @~/.claude/nf/workflows/fix-tests.md end-to-end.
27
27
  </process>
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: qgsd:formal-test-sync
2
+ name: nf:formal-test-sync
3
3
  description: Cross-reference formal model invariants with unit test coverage, validate constants, and generate test stubs
4
4
  argument-hint: [--report-only] [--dry-run] [--json] [--stubs-dir=<path>]
5
5
  allowed-tools:
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: qgsd:health
2
+ name: nf:health
3
3
  description: Diagnose planning directory health and optionally repair issues
4
4
  argument-hint: [--repair] [--force]
5
5
  allowed-tools:
@@ -13,10 +13,10 @@ Validate `.planning/` directory integrity and report actionable issues. Checks f
13
13
  </objective>
14
14
 
15
15
  <execution_context>
16
- @~/.claude/qgsd/workflows/health.md
16
+ @~/.claude/nf/workflows/health.md
17
17
  </execution_context>
18
18
 
19
19
  <process>
20
- Execute the health workflow from @~/.claude/qgsd/workflows/health.md end-to-end.
20
+ Execute the health workflow from @~/.claude/nf/workflows/health.md end-to-end.
21
21
  Parse --repair flag from arguments and pass to workflow.
22
22
  </process>
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: qgsd:help
2
+ name: nf:help
3
3
  description: Show available GSD commands and usage guide
4
4
  ---
5
5
  <objective>
@@ -13,10 +13,10 @@ Output ONLY the reference content below. Do NOT add:
13
13
  </objective>
14
14
 
15
15
  <execution_context>
16
- @~/.claude/qgsd/workflows/help.md
16
+ @~/.claude/nf/workflows/help.md
17
17
  </execution_context>
18
18
 
19
19
  <process>
20
- Output the complete GSD command reference from @~/.claude/qgsd/workflows/help.md.
20
+ Output the complete GSD command reference from @~/.claude/nf/workflows/help.md.
21
21
  Display the reference content directly — no additions or modifications.
22
22
  </process>
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: qgsd:insert-phase
2
+ name: nf:insert-phase
3
3
  description: Insert urgent work as decimal phase (e.g., 72.1) between existing phases
4
4
  argument-hint: <after> <description>
5
5
  allowed-tools:
@@ -17,7 +17,7 @@ Purpose: Handle urgent work discovered during execution without renumbering enti
17
17
  </objective>
18
18
 
19
19
  <execution_context>
20
- @~/.claude/qgsd/workflows/insert-phase.md
20
+ @~/.claude/nf/workflows/insert-phase.md
21
21
  </execution_context>
22
22
 
23
23
  <context>
@@ -27,6 +27,6 @@ Roadmap and state are resolved in-workflow via `init phase-op` and targeted tool
27
27
  </context>
28
28
 
29
29
  <process>
30
- Execute the insert-phase workflow from @~/.claude/qgsd/workflows/insert-phase.md end-to-end.
30
+ Execute the insert-phase workflow from @~/.claude/nf/workflows/insert-phase.md end-to-end.
31
31
  Preserve all validation gates (argument parsing, phase verification, decimal calculation, roadmap updates).
32
32
  </process>