@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.
- package/README.md +2 -2
- package/agents/{qgsd-codebase-mapper.md → nf-codebase-mapper.md} +1 -1
- package/agents/{qgsd-debugger.md → nf-debugger.md} +3 -3
- package/agents/{qgsd-executor.md → nf-executor.md} +14 -14
- package/agents/{qgsd-integration-checker.md → nf-integration-checker.md} +1 -1
- package/agents/{qgsd-phase-researcher.md → nf-phase-researcher.md} +6 -6
- package/agents/{qgsd-plan-checker.md → nf-plan-checker.md} +9 -9
- package/agents/{qgsd-planner.md → nf-planner.md} +9 -9
- package/agents/{qgsd-project-researcher.md → nf-project-researcher.md} +2 -2
- package/agents/{qgsd-quorum-orchestrator.md → nf-quorum-orchestrator.md} +33 -33
- package/agents/{qgsd-quorum-slot-worker.md → nf-quorum-slot-worker.md} +3 -3
- package/agents/{qgsd-quorum-synthesizer.md → nf-quorum-synthesizer.md} +3 -3
- package/agents/{qgsd-quorum-test-worker.md → nf-quorum-test-worker.md} +1 -1
- package/agents/{qgsd-quorum-worker.md → nf-quorum-worker.md} +6 -6
- package/agents/{qgsd-research-synthesizer.md → nf-research-synthesizer.md} +5 -5
- package/agents/{qgsd-roadmapper.md → nf-roadmapper.md} +3 -3
- package/agents/{qgsd-verifier.md → nf-verifier.md} +8 -8
- package/bin/accept-debug-invariant.cjs +2 -2
- package/bin/account-manager.cjs +10 -10
- package/bin/aggregate-requirements.cjs +1 -1
- package/bin/analyze-assumptions.cjs +3 -3
- package/bin/analyze-state-space.cjs +14 -14
- package/bin/assumption-register.cjs +146 -0
- package/bin/attribute-trace-divergence.cjs +1 -1
- package/bin/auth-drivers/gh-cli.cjs +1 -1
- package/bin/auth-drivers/pool.cjs +1 -1
- package/bin/autoClosePtoF.cjs +3 -3
- package/bin/budget-tracker.cjs +77 -0
- package/bin/build-layer-manifest.cjs +153 -0
- package/bin/call-quorum-slot.cjs +3 -3
- package/bin/ccr-secure-config.cjs +5 -5
- package/bin/check-bundled-sdks.cjs +1 -1
- package/bin/check-mcp-health.cjs +1 -1
- package/bin/check-provider-health.cjs +6 -6
- package/bin/check-spec-sync.cjs +26 -26
- package/bin/check-trace-schema-drift.cjs +5 -5
- package/bin/conformance-schema.cjs +2 -2
- package/bin/cross-layer-dashboard.cjs +297 -0
- package/bin/design-impact.cjs +377 -0
- package/bin/detect-coverage-gaps.cjs +7 -7
- package/bin/failure-mode-catalog.cjs +227 -0
- package/bin/failure-taxonomy.cjs +177 -0
- package/bin/formal-scope-scan.cjs +179 -0
- package/bin/gate-a-grounding.cjs +334 -0
- package/bin/gate-b-abstraction.cjs +243 -0
- package/bin/gate-c-validation.cjs +166 -0
- package/bin/generate-formal-specs.cjs +17 -17
- package/bin/generate-petri-net.cjs +3 -3
- package/bin/generate-tla-cfg.cjs +5 -5
- package/bin/git-heatmap.cjs +571 -0
- package/bin/harness-diagnostic.cjs +326 -0
- package/bin/hazard-model.cjs +261 -0
- package/bin/install-formal-tools.cjs +1 -1
- package/bin/install.js +184 -139
- package/bin/instrumentation-map.cjs +178 -0
- package/bin/invariant-catalog.cjs +437 -0
- package/bin/issue-classifier.cjs +2 -2
- package/bin/load-baseline-requirements.cjs +4 -4
- package/bin/manage-agents-core.cjs +32 -32
- package/bin/migrate-to-slots.cjs +39 -39
- package/bin/mismatch-register.cjs +217 -0
- package/bin/nForma.cjs +176 -81
- package/bin/{qgsd-solve.cjs → nf-solve.cjs} +327 -14
- package/bin/observe-config.cjs +8 -0
- package/bin/observe-debt-writer.cjs +1 -1
- package/bin/observe-handler-deps.cjs +356 -0
- package/bin/observe-handler-grafana.cjs +2 -17
- package/bin/observe-handler-internal.cjs +5 -5
- package/bin/observe-handler-logstash.cjs +2 -17
- package/bin/observe-handler-prometheus.cjs +2 -17
- package/bin/observe-handler-upstream.cjs +251 -0
- package/bin/observe-handlers.cjs +12 -33
- package/bin/observe-render.cjs +68 -22
- package/bin/observe-utils.cjs +37 -0
- package/bin/observed-fsm.cjs +324 -0
- package/bin/planning-paths.cjs +6 -0
- package/bin/polyrepo.cjs +1 -1
- package/bin/probe-quorum-slots.cjs +1 -1
- package/bin/promote-gate-maturity.cjs +274 -0
- package/bin/promote-model.cjs +1 -1
- package/bin/propose-debug-invariants.cjs +1 -1
- package/bin/quorum-cache.cjs +144 -0
- package/bin/quorum-consensus-gate.cjs +1 -1
- package/bin/quorum-preflight.cjs +89 -0
- package/bin/quorum-slot-dispatch.cjs +6 -6
- package/bin/requirements-core.cjs +1 -1
- package/bin/review-mcp-logs.cjs +1 -1
- package/bin/risk-heatmap.cjs +151 -0
- package/bin/run-account-manager-tlc.cjs +4 -4
- package/bin/run-account-pool-alloy.cjs +2 -2
- package/bin/run-alloy.cjs +2 -2
- package/bin/run-audit-alloy.cjs +2 -2
- package/bin/run-breaker-tlc.cjs +3 -3
- package/bin/run-formal-check.cjs +9 -9
- package/bin/run-formal-verify.cjs +30 -9
- package/bin/run-installer-alloy.cjs +2 -2
- package/bin/run-oscillation-tlc.cjs +4 -4
- package/bin/run-phase-tlc.cjs +1 -1
- package/bin/run-protocol-tlc.cjs +4 -4
- package/bin/run-quorum-composition-alloy.cjs +2 -2
- package/bin/run-sensitivity-sweep.cjs +2 -2
- package/bin/run-stop-hook-tlc.cjs +3 -3
- package/bin/run-tlc.cjs +21 -21
- package/bin/run-transcript-alloy.cjs +2 -2
- package/bin/secrets.cjs +5 -5
- package/bin/security-sweep.cjs +238 -0
- package/bin/sensitivity-report.cjs +3 -3
- package/bin/set-secret.cjs +5 -5
- package/bin/setup-telemetry-cron.sh +3 -3
- package/bin/stall-detector.cjs +126 -0
- package/bin/state-candidates.cjs +206 -0
- package/bin/sync-baseline-requirements.cjs +1 -1
- package/bin/telemetry-collector.cjs +1 -1
- package/bin/test-changed.cjs +111 -0
- package/bin/test-recipe-gen.cjs +250 -0
- package/bin/trace-corpus-stats.cjs +211 -0
- package/bin/unified-mcp-server.mjs +3 -3
- package/bin/update-scoreboard.cjs +1 -1
- package/bin/validate-memory.cjs +2 -2
- package/bin/validate-traces.cjs +10 -10
- package/bin/verify-quorum-health.cjs +66 -5
- package/bin/xstate-to-tla.cjs +4 -4
- package/bin/xstate-trace-walker.cjs +3 -3
- package/commands/{qgsd → nf}/add-phase.md +3 -3
- package/commands/{qgsd → nf}/add-requirement.md +3 -3
- package/commands/{qgsd → nf}/add-todo.md +3 -3
- package/commands/{qgsd → nf}/audit-milestone.md +4 -4
- package/commands/{qgsd → nf}/check-todos.md +3 -3
- package/commands/{qgsd → nf}/cleanup.md +3 -3
- package/commands/{qgsd → nf}/close-formal-gaps.md +2 -2
- package/commands/{qgsd → nf}/complete-milestone.md +9 -9
- package/commands/{qgsd → nf}/debug.md +9 -9
- package/commands/{qgsd → nf}/discuss-phase.md +3 -3
- package/commands/{qgsd → nf}/execute-phase.md +15 -15
- package/commands/{qgsd → nf}/fix-tests.md +3 -3
- package/commands/{qgsd → nf}/formal-test-sync.md +1 -1
- package/commands/{qgsd → nf}/health.md +3 -3
- package/commands/{qgsd → nf}/help.md +3 -3
- package/commands/{qgsd → nf}/insert-phase.md +3 -3
- package/commands/nf/join-discord.md +18 -0
- package/commands/{qgsd → nf}/list-phase-assumptions.md +2 -2
- package/commands/{qgsd → nf}/map-codebase.md +7 -7
- package/commands/{qgsd → nf}/map-requirements.md +3 -3
- package/commands/{qgsd → nf}/mcp-restart.md +3 -3
- package/commands/{qgsd → nf}/mcp-set-model.md +8 -8
- package/commands/{qgsd → nf}/mcp-setup.md +63 -63
- package/commands/{qgsd → nf}/mcp-status.md +3 -3
- package/commands/{qgsd → nf}/mcp-update.md +7 -7
- package/commands/{qgsd → nf}/new-milestone.md +8 -8
- package/commands/{qgsd → nf}/new-project.md +8 -8
- package/commands/{qgsd → nf}/observe.md +49 -16
- package/commands/{qgsd → nf}/pause-work.md +3 -3
- package/commands/{qgsd → nf}/plan-milestone-gaps.md +5 -5
- package/commands/{qgsd → nf}/plan-phase.md +6 -6
- package/commands/{qgsd → nf}/polyrepo.md +2 -2
- package/commands/{qgsd → nf}/progress.md +3 -3
- package/commands/{qgsd → nf}/queue.md +2 -2
- package/commands/{qgsd → nf}/quick.md +8 -8
- package/commands/{qgsd → nf}/quorum-test.md +10 -10
- package/commands/{qgsd → nf}/quorum.md +36 -86
- package/commands/{qgsd → nf}/reapply-patches.md +2 -2
- package/commands/{qgsd → nf}/remove-phase.md +3 -3
- package/commands/{qgsd → nf}/research-phase.md +12 -12
- package/commands/{qgsd → nf}/resume-work.md +3 -3
- package/commands/nf/review-requirements.md +31 -0
- package/commands/{qgsd → nf}/set-profile.md +3 -3
- package/commands/{qgsd → nf}/settings.md +6 -6
- package/commands/{qgsd → nf}/solve.md +35 -35
- package/commands/{qgsd → nf}/sync-baselines.md +4 -4
- package/commands/{qgsd → nf}/triage.md +10 -10
- package/commands/{qgsd → nf}/update.md +3 -3
- package/commands/{qgsd → nf}/verify-work.md +5 -5
- package/hooks/dist/config-loader.js +188 -32
- package/hooks/dist/conformance-schema.cjs +2 -2
- package/hooks/dist/gsd-context-monitor.js +118 -13
- package/hooks/dist/{qgsd-check-update.js → nf-check-update.js} +5 -5
- package/hooks/dist/{qgsd-circuit-breaker.js → nf-circuit-breaker.js} +35 -24
- package/hooks/dist/{qgsd-precompact.js → nf-precompact.js} +13 -13
- package/hooks/dist/{qgsd-prompt.js → nf-prompt.js} +110 -33
- package/hooks/dist/nf-session-start.js +185 -0
- package/hooks/dist/{qgsd-slot-correlator.js → nf-slot-correlator.js} +13 -5
- package/hooks/dist/{qgsd-spec-regen.js → nf-spec-regen.js} +17 -8
- package/hooks/dist/{qgsd-statusline.js → nf-statusline.js} +12 -3
- package/hooks/dist/{qgsd-stop.js → nf-stop.js} +152 -18
- package/hooks/dist/{qgsd-token-collector.js → nf-token-collector.js} +12 -4
- package/hooks/dist/unified-mcp-server.mjs +2 -2
- package/package.json +6 -4
- package/scripts/build-hooks.js +13 -6
- package/scripts/secret-audit.sh +1 -1
- package/scripts/verify-hooks-sync.cjs +90 -0
- package/templates/{qgsd.json → nf.json} +4 -4
- package/commands/qgsd/join-discord.md +0 -18
- package/hooks/dist/qgsd-session-start.js +0 -122
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: nf:solve
|
|
3
3
|
description: Orchestrator skill that migrates legacy .formal/ layouts, diagnoses consistency gaps, dispatches to remediation skills for each gap type, and converges via diagnose-remediate-rediagnose loop with before/after comparison
|
|
4
4
|
argument-hint: [--report-only] [--max-iterations=N] [--json] [--verbose]
|
|
5
5
|
allowed-tools:
|
|
@@ -14,7 +14,7 @@ allowed-tools:
|
|
|
14
14
|
---
|
|
15
15
|
|
|
16
16
|
<objective>
|
|
17
|
-
Run the
|
|
17
|
+
Run the nForma consistency solver as a full orchestrator. Sweeps 7 layer transitions (R->F, F->T, C->F, T->C, F->C, R->D, D->C), computes a residual vector showing gaps at each boundary, and automatically dispatches to the correct remediation skill/script for each gap type. Re-diagnoses after each remediation round and iterates until convergence or max iterations reached. Returns before/after residual comparison.
|
|
18
18
|
</objective>
|
|
19
19
|
|
|
20
20
|
<execution_context>
|
|
@@ -23,11 +23,11 @@ any questions. Do NOT stop for human input. If a sub-skill fails, log the
|
|
|
23
23
|
failure and continue to the next gap. The only valid reason to stop is:
|
|
24
24
|
all iterations exhausted, or total residual is zero.
|
|
25
25
|
|
|
26
|
-
This is a self-contained orchestrator skill. It runs the diagnostic engine (bin/
|
|
26
|
+
This is a self-contained orchestrator skill. It runs the diagnostic engine (bin/nf-solve.cjs) and orchestrates higher-level remediation via sub-skills and scripts. No external quorum dispatch is needed — quorum enforcement, if required, is the responsibility of the sub-skills being called.
|
|
27
27
|
|
|
28
28
|
BULK REMEDIATION: For F->T and R->D gaps, the solve skill writes PLAN.md files
|
|
29
|
-
directly and dispatches
|
|
30
|
-
/
|
|
29
|
+
directly and dispatches nf-executor agents — it does NOT invoke
|
|
30
|
+
/nf:quick for bulk remediation. This avoids per-batch quorum overhead while
|
|
31
31
|
maintaining quality through the convergence loop's before/after verification.
|
|
32
32
|
The solve skill IS the planner for these mechanical remediation tasks.
|
|
33
33
|
|
|
@@ -46,10 +46,10 @@ Before running the diagnostic sweep, check for a legacy `.formal/` directory at
|
|
|
46
46
|
Run the migration script using absolute paths (or fall back to CWD-relative):
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
|
-
MIGRATE=$(node ~/.claude/
|
|
49
|
+
MIGRATE=$(node ~/.claude/nf-bin/migrate-formal-dir.cjs --json --project-root=$(pwd) 2>&1)
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
If `~/.claude/
|
|
52
|
+
If `~/.claude/nf-bin/migrate-formal-dir.cjs` does not exist, fall back to `bin/migrate-formal-dir.cjs` (CWD-relative).
|
|
53
53
|
If neither exists, skip this step silently — the migration script is optional for projects that never had a legacy layout.
|
|
54
54
|
|
|
55
55
|
Parse the JSON output:
|
|
@@ -63,11 +63,11 @@ Parse the JSON output:
|
|
|
63
63
|
Run the diagnostic solver using absolute paths (or fall back to CWD-relative):
|
|
64
64
|
|
|
65
65
|
```bash
|
|
66
|
-
BASELINE=$(node ~/.claude/
|
|
66
|
+
BASELINE=$(node ~/.claude/nf-bin/nf-solve.cjs --json --report-only --project-root=$(pwd))
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
If ~/.claude/
|
|
70
|
-
If neither exists, error with: "
|
|
69
|
+
If ~/.claude/nf-bin/nf-solve.cjs does not exist, fall back to bin/nf-solve.cjs (CWD-relative).
|
|
70
|
+
If neither exists, error with: "nForma solve scripts not installed. Run `node bin/install.js --claude --global` from the nForma repo."
|
|
71
71
|
|
|
72
72
|
Parse the JSON output to extract the `residual_vector` object. Key fields:
|
|
73
73
|
- `residual_vector.r_to_f.residual` — count of requirements lacking formal coverage
|
|
@@ -118,12 +118,12 @@ Extract the list of uncovered requirement IDs from `residual_vector.r_to_f.detai
|
|
|
118
118
|
|
|
119
119
|
If the list has 10 or fewer IDs, dispatch:
|
|
120
120
|
```
|
|
121
|
-
/
|
|
121
|
+
/nf:close-formal-gaps --batch --ids=REQ-01,REQ-02,...
|
|
122
122
|
```
|
|
123
123
|
|
|
124
124
|
If the list has more than 10 IDs, dispatch:
|
|
125
125
|
```
|
|
126
|
-
/
|
|
126
|
+
/nf:close-formal-gaps --batch --all
|
|
127
127
|
```
|
|
128
128
|
|
|
129
129
|
Log: `"Dispatching R->F remediation: close-formal-gaps for {N} uncovered requirements"`
|
|
@@ -142,10 +142,10 @@ Find tool JARs at: `.planning/formal/tla/tla2tools.jar` (or `~/.claude/.planning
|
|
|
142
142
|
|
|
143
143
|
**Phase 1 — Generate stubs:** Run the formal-test-sync script to generate test stubs and update traceability sidecars:
|
|
144
144
|
```bash
|
|
145
|
-
node ~/.claude/
|
|
145
|
+
node ~/.claude/nf-bin/formal-test-sync.cjs --project-root=$(pwd)
|
|
146
146
|
```
|
|
147
147
|
|
|
148
|
-
If ~/.claude/
|
|
148
|
+
If ~/.claude/nf-bin/formal-test-sync.cjs does not exist, fall back to bin/formal-test-sync.cjs (CWD-relative).
|
|
149
149
|
|
|
150
150
|
Log: `"F->T phase 1: formal-test-sync generated {N} stubs"`
|
|
151
151
|
|
|
@@ -164,7 +164,7 @@ console.log('[solve] Recipes: ' + recipes.length + ' total, ' + incomplete.lengt
|
|
|
164
164
|
```
|
|
165
165
|
Incomplete recipes (missing source_files or definition) produce lower-quality tests but do NOT block dispatch.
|
|
166
166
|
|
|
167
|
-
**Phase 2 — Implement stubs via direct parallel executor dispatch:** Stubs alone do not close the gap — they contain `assert.fail('TODO')`. The solver dispatches `
|
|
167
|
+
**Phase 2 — Implement stubs via direct parallel executor dispatch:** Stubs alone do not close the gap — they contain `assert.fail('TODO')`. The solver dispatches `nf-executor` agents directly to implement real test logic — it does NOT use `/nf:quick` for bulk stub implementation.
|
|
168
168
|
|
|
169
169
|
1. **Load context:** Parse `.planning/formal/formal-test-sync-report.json` for each stub's `requirement_id`, `formal_properties[].model_file`, `formal_properties[].property`. Also verify recipe files exist at `.planning/formal/generated-stubs/{ID}.stub.recipe.json` — these contain pre-resolved context (requirement text, property definition, source files, import hints, test strategy).
|
|
170
170
|
|
|
@@ -229,9 +229,9 @@ Incomplete recipes (missing source_files or definition) produce lower-quality te
|
|
|
229
229
|
|
|
230
230
|
4. **Spawn executors in sequential waves of 3** — To avoid OOM on developer machines (each executor consumes ~1GB RAM), dispatch at most 3 parallel executors at a time. Wait for each wave to finish before starting the next:
|
|
231
231
|
```
|
|
232
|
-
Wave 1: Task(subagent_type="
|
|
232
|
+
Wave 1: Task(subagent_type="nf-executor", description="F->T stubs batch 1"), batch 2, batch 3
|
|
233
233
|
[wait for all 3 to complete]
|
|
234
|
-
Wave 2: Task(subagent_type="
|
|
234
|
+
Wave 2: Task(subagent_type="nf-executor", description="F->T stubs batch 4"), batch 5, batch 6
|
|
235
235
|
[wait for all 3 to complete]
|
|
236
236
|
... continue until all batches dispatched
|
|
237
237
|
```
|
|
@@ -250,7 +250,7 @@ The T->C residual counts both failures and skipped tests. Extract detail:
|
|
|
250
250
|
|
|
251
251
|
Dispatch the fix-tests skill:
|
|
252
252
|
```
|
|
253
|
-
/
|
|
253
|
+
/nf:fix-tests
|
|
254
254
|
```
|
|
255
255
|
|
|
256
256
|
This will discover and autonomously fix failing AND skipped tests. Skipped tests often indicate incomplete implementations or platform-specific guards that need resolution.
|
|
@@ -261,7 +261,7 @@ If it fails, log the failure and continue.
|
|
|
261
261
|
|
|
262
262
|
### 3d. C->F Gaps (residual_vector.c_to_f.residual > 0)
|
|
263
263
|
|
|
264
|
-
Constant mismatches between code and formal specs. Display the mismatch table, then dispatch `/
|
|
264
|
+
Constant mismatches between code and formal specs. Display the mismatch table, then dispatch `/nf:quick` to align them:
|
|
265
265
|
|
|
266
266
|
```
|
|
267
267
|
C->F: {N} constant mismatch(es) — dispatching quick task to align
|
|
@@ -276,7 +276,7 @@ constant_name formal_spec_file formal_val config_val
|
|
|
276
276
|
|
|
277
277
|
Dispatch:
|
|
278
278
|
```
|
|
279
|
-
/
|
|
279
|
+
/nf:quick Fix C->F constant mismatches: update formal specs OR code config to align these values: {mismatch_summary}
|
|
280
280
|
```
|
|
281
281
|
|
|
282
282
|
If the mismatch has `intentional_divergence: true`, skip it and log as intentional.
|
|
@@ -285,19 +285,19 @@ If the mismatch has `intentional_divergence: true`, skip it and log as intention
|
|
|
285
285
|
|
|
286
286
|
First, run the formal verification using absolute paths to get fresh failure data:
|
|
287
287
|
```bash
|
|
288
|
-
node ~/.claude/
|
|
288
|
+
node ~/.claude/nf-bin/run-formal-verify.cjs --project-root=$(pwd)
|
|
289
289
|
```
|
|
290
290
|
|
|
291
|
-
If ~/.claude/
|
|
291
|
+
If ~/.claude/nf-bin/run-formal-verify.cjs does not exist, fall back to bin/run-formal-verify.cjs (CWD-relative).
|
|
292
292
|
|
|
293
293
|
Then parse `.planning/formal/check-results.ndjson` and classify each failure:
|
|
294
294
|
|
|
295
295
|
| Classification | Criteria | Dispatch |
|
|
296
296
|
|---------------|----------|----------|
|
|
297
|
-
| **Syntax error** | Summary contains "Syntax error", "parse error" | `/
|
|
298
|
-
| **Scope error** | Summary contains "scope", "sig" | `/
|
|
299
|
-
| **Conformance divergence** | check_id contains "conformance" | `/
|
|
300
|
-
| **Verification failure** | Counterexample found | `/
|
|
297
|
+
| **Syntax error** | Summary contains "Syntax error", "parse error" | `/nf:quick Fix Alloy/TLA+ syntax error in {model_file}: {error_detail}` |
|
|
298
|
+
| **Scope error** | Summary contains "scope", "sig" | `/nf:quick Fix scope declaration in {model_file}: {error_detail}` |
|
|
299
|
+
| **Conformance divergence** | check_id contains "conformance" | `/nf:quick Fix conformance trace divergences in {model_file}: {error_detail}` |
|
|
300
|
+
| **Verification failure** | Counterexample found | `/nf:quick Fix formal verification counterexample in {check_id}: {summary}` |
|
|
301
301
|
| **Missing tool** | "not found", "not installed" | Log as infrastructure gap, skip |
|
|
302
302
|
| **Inconclusive** | result = "inconclusive" | Skip — not a failure |
|
|
303
303
|
|
|
@@ -321,7 +321,7 @@ R->D: {N} requirement(s) undocumented in developer docs:
|
|
|
321
321
|
...
|
|
322
322
|
```
|
|
323
323
|
|
|
324
|
-
Then auto-remediate by dispatching a single `
|
|
324
|
+
Then auto-remediate by dispatching a single `nf-executor` agent directly — it does NOT use `/nf:quick` for bulk doc generation.
|
|
325
325
|
|
|
326
326
|
1. Read `.planning/formal/requirements.json` to get the text/description for each undocumented requirement ID.
|
|
327
327
|
2. For each undocumented ID, identify the most relevant source file(s) by grepping the codebase for the requirement ID and its key terms (use Grep tool).
|
|
@@ -342,7 +342,7 @@ Then auto-remediate by dispatching a single `qgsd-executor` agent directly — i
|
|
|
342
342
|
|
|
343
343
|
4. **Spawn ONE executor:**
|
|
344
344
|
```
|
|
345
|
-
Task(subagent_type="
|
|
345
|
+
Task(subagent_type="nf-executor", description="R->D: generate doc entries for {N} requirements")
|
|
346
346
|
```
|
|
347
347
|
Wait for it to complete. If it fails, log the failure and continue.
|
|
348
348
|
|
|
@@ -406,7 +406,7 @@ Accept: [a]ll / [n]one / comma-separated numbers (e.g. 1,3,5) / [s]kip this cycl
|
|
|
406
406
|
|
|
407
407
|
Wait for user input via AskUserQuestion. Route based on response:
|
|
408
408
|
|
|
409
|
-
- **Numbers or "all"**: For each accepted candidate, dispatch `/
|
|
409
|
+
- **Numbers or "all"**: For each accepted candidate, dispatch `/nf:add-requirement` with the candidate evidence as context. The add-requirement skill handles ID assignment, duplicate checks, and semantic conflict detection. Approved candidates enter the forward flow (R→F→T→C) in the next iteration.
|
|
410
410
|
|
|
411
411
|
- **"none"**: Write ALL candidates to `.planning/formal/acknowledged-not-required.json` so they are not resurfaced in future runs. Each entry:
|
|
412
412
|
```json
|
|
@@ -426,10 +426,10 @@ Log: `"Reverse discovery: {N} candidates presented, {M} approved, {K} rejected,
|
|
|
426
426
|
|
|
427
427
|
After all remediations in Step 3 complete, run the diagnostic again using absolute paths:
|
|
428
428
|
```bash
|
|
429
|
-
POST=$(node ~/.claude/
|
|
429
|
+
POST=$(node ~/.claude/nf-bin/nf-solve.cjs --json --report-only --project-root=$(pwd))
|
|
430
430
|
```
|
|
431
431
|
|
|
432
|
-
If ~/.claude/
|
|
432
|
+
If ~/.claude/nf-bin/nf-solve.cjs does not exist, fall back to bin/nf-solve.cjs (CWD-relative).
|
|
433
433
|
|
|
434
434
|
Parse the result as `post_residual`.
|
|
435
435
|
|
|
@@ -504,10 +504,10 @@ Note: R->D gaps are auto-remediated by generating developer doc entries in docs/
|
|
|
504
504
|
|
|
505
505
|
After the before/after table, run the full formal verification using absolute paths if not already run during Step 3e:
|
|
506
506
|
```bash
|
|
507
|
-
node ~/.claude/
|
|
507
|
+
node ~/.claude/nf-bin/run-formal-verify.cjs --project-root=$(pwd)
|
|
508
508
|
```
|
|
509
509
|
|
|
510
|
-
If ~/.claude/
|
|
510
|
+
If ~/.claude/nf-bin/run-formal-verify.cjs does not exist, fall back to bin/run-formal-verify.cjs (CWD-relative).
|
|
511
511
|
|
|
512
512
|
Parse `.planning/formal/check-results.ndjson` and display **every check** grouped by result:
|
|
513
513
|
|
|
@@ -535,7 +535,7 @@ Display checks in this order: PASS first (alphabetical), then FAIL (alphabetical
|
|
|
535
535
|
After the table, if there are any FAIL or INCONCLUSIVE checks, add a brief actionability note:
|
|
536
536
|
```
|
|
537
537
|
{fail_count} check(s) failing, {inconc_count} inconclusive.
|
|
538
|
-
Failing checks need investigation — use /
|
|
538
|
+
Failing checks need investigation — use /nf:quick to dispatch fixes for syntax/scope errors or conformance divergences.
|
|
539
539
|
Inconclusive checks are not failures but indicate incomplete verification (usually missing fairness declarations or tools).
|
|
540
540
|
```
|
|
541
541
|
|
|
@@ -543,7 +543,7 @@ This table is mandatory even when the solver layer residuals are all zero — be
|
|
|
543
543
|
|
|
544
544
|
## Important Constraints
|
|
545
545
|
|
|
546
|
-
1. **bin/
|
|
546
|
+
1. **bin/nf-solve.cjs is NOT modified** — it remains the diagnostic engine. This skill orchestrates remediation at the skill/script level.
|
|
547
547
|
|
|
548
548
|
2. **Convergence loop is at skill level** — when the skill calls diagnostic again in Step 4, it uses `--json --report-only` to get fresh data. The skill then decides whether to loop back to Step 3 or exit. The script's internal auto-close loop is bypassed.
|
|
549
549
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: nf:sync-baselines
|
|
3
3
|
description: Sync baseline requirements into .planning/formal/requirements.json (auto-detects project intent by default)
|
|
4
4
|
argument-hint: [--profile <web|mobile|desktop|api|cli|library>]
|
|
5
5
|
allowed-tools:
|
|
@@ -9,7 +9,7 @@ allowed-tools:
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
<objective>
|
|
12
|
-
Sync baseline requirements from the
|
|
12
|
+
Sync baseline requirements from the nForma defaults into `.planning/formal/requirements.json`. Auto-detects project intent by default by scanning the repo for framework, deployment, and configuration signals. Supports explicit `--profile` override. Runs `node bin/sync-baseline-requirements.cjs`, displays results, and commits if requirements were added.
|
|
13
13
|
</objective>
|
|
14
14
|
|
|
15
15
|
<process>
|
|
@@ -97,13 +97,13 @@ fs.writeFileSync(configPath, JSON.stringify(config, null, 2) + '\n');
|
|
|
97
97
|
If `added.length > 0`:
|
|
98
98
|
|
|
99
99
|
```bash
|
|
100
|
-
node ~/.claude/
|
|
100
|
+
node ~/.claude/nf/bin/gsd-tools.cjs commit "req(baseline): sync N baseline requirements" --files .planning/formal/requirements.json
|
|
101
101
|
```
|
|
102
102
|
|
|
103
103
|
Also commit config if intent was stored:
|
|
104
104
|
|
|
105
105
|
```bash
|
|
106
|
-
node ~/.claude/
|
|
106
|
+
node ~/.claude/nf/bin/gsd-tools.cjs commit "chore(baseline): store detected project intent" --files .planning/config.json
|
|
107
107
|
```
|
|
108
108
|
|
|
109
109
|
Where N is the count of added requirements.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: nf:triage
|
|
3
3
|
description: Fetch issues/errors from configured sources (GitHub, Sentry, custom) and triage them. Sources are defined in .planning/triage-sources.md
|
|
4
4
|
argument-hint: "[--source github|sentry|sentry-feedback|bash] [--since 24h|7d] [--limit N]"
|
|
5
5
|
allowed-tools:
|
|
@@ -11,7 +11,7 @@ allowed-tools:
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
13
|
<objective>
|
|
14
|
-
Aggregate issues and errors from all configured sources, deduplicate, render a prioritized triage table, and route the selected issue to the right
|
|
14
|
+
Aggregate issues and errors from all configured sources, deduplicate, render a prioritized triage table, and route the selected issue to the right nForma workflow.
|
|
15
15
|
|
|
16
16
|
This command is the project's unified "what's broken right now?" entry point.
|
|
17
17
|
</objective>
|
|
@@ -36,7 +36,7 @@ Parse the YAML frontmatter block (between `---` delimiters at the top of the fil
|
|
|
36
36
|
Display:
|
|
37
37
|
```
|
|
38
38
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
39
|
-
|
|
39
|
+
nForma ► TRIAGE: No sources configured
|
|
40
40
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
41
41
|
|
|
42
42
|
Create .planning/triage-sources.md to configure issue sources.
|
|
@@ -50,7 +50,7 @@ Stop.
|
|
|
50
50
|
|
|
51
51
|
```
|
|
52
52
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
53
|
-
|
|
53
|
+
nForma ► TRIAGE: Fetching from N source(s)...
|
|
54
54
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
55
55
|
```
|
|
56
56
|
(Replace N with actual count.)
|
|
@@ -172,7 +172,7 @@ Sort by:
|
|
|
172
172
|
If total issues = 0:
|
|
173
173
|
```
|
|
174
174
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
175
|
-
|
|
175
|
+
nForma ► TRIAGE: All clear — no open issues found
|
|
176
176
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
177
177
|
Sources checked: <list>
|
|
178
178
|
```
|
|
@@ -181,7 +181,7 @@ Stop.
|
|
|
181
181
|
Otherwise:
|
|
182
182
|
```
|
|
183
183
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
184
|
-
|
|
184
|
+
nForma ► TRIAGE: N issues across M source(s)
|
|
185
185
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
186
186
|
|
|
187
187
|
┌────┬─────────────────────────────────────────────┬──────────────┬─────────┬────────────┐
|
|
@@ -208,15 +208,15 @@ Enter issue # to work on, "all" for full details, or press Enter to skip:
|
|
|
208
208
|
**If user enters a number:**
|
|
209
209
|
- Load the full issue details (title, URL, meta) for that index.
|
|
210
210
|
- Determine routing:
|
|
211
|
-
- `severity: error` or `severity: bug` → suggest `/
|
|
212
|
-
- `severity: warning` or `severity: info` → suggest `/
|
|
211
|
+
- `severity: error` or `severity: bug` → suggest `/nf:debug`
|
|
212
|
+
- `severity: warning` or `severity: info` → suggest `/nf:quick`
|
|
213
213
|
- Display:
|
|
214
214
|
```
|
|
215
215
|
◆ Issue: <title>
|
|
216
216
|
URL: <url>
|
|
217
217
|
Meta: <meta>
|
|
218
218
|
|
|
219
|
-
Suggested action: /
|
|
219
|
+
Suggested action: /nf:debug "<title> — <meta>"
|
|
220
220
|
Run it? [Y/n]
|
|
221
221
|
```
|
|
222
222
|
- If confirmed, invoke the suggested skill with the issue as context.
|
|
@@ -227,7 +227,7 @@ Enter issue # to work on, "all" for full details, or press Enter to skip:
|
|
|
227
227
|
|
|
228
228
|
**If user presses Enter (blank):**
|
|
229
229
|
```
|
|
230
|
-
Triage skipped. Run /
|
|
230
|
+
Triage skipped. Run /nf:triage again when ready.
|
|
231
231
|
```
|
|
232
232
|
|
|
233
233
|
</process>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: nf:update
|
|
3
3
|
description: Update GSD to latest version with changelog display
|
|
4
4
|
allowed-tools:
|
|
5
5
|
- Bash
|
|
@@ -19,11 +19,11 @@ Routes to the update workflow which handles:
|
|
|
19
19
|
</objective>
|
|
20
20
|
|
|
21
21
|
<execution_context>
|
|
22
|
-
@~/.claude/
|
|
22
|
+
@~/.claude/nf/workflows/update.md
|
|
23
23
|
</execution_context>
|
|
24
24
|
|
|
25
25
|
<process>
|
|
26
|
-
**Follow the update workflow** from `@~/.claude/
|
|
26
|
+
**Follow the update workflow** from `@~/.claude/nf/workflows/update.md`.
|
|
27
27
|
|
|
28
28
|
The workflow handles all logic including:
|
|
29
29
|
1. Installed version detection (local/global)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: nf:verify-work
|
|
3
3
|
description: Validate built features through conversational UAT
|
|
4
4
|
argument-hint: "[phase number, e.g., '4']"
|
|
5
5
|
allowed-tools:
|
|
@@ -16,12 +16,12 @@ Validate built features through conversational testing with persistent state.
|
|
|
16
16
|
|
|
17
17
|
Purpose: Confirm what Claude built actually works from user's perspective. One test at a time, plain text responses, no interrogation. When issues are found, automatically diagnose, plan fixes, and prepare for execution.
|
|
18
18
|
|
|
19
|
-
Output: {phase_num}-UAT.md tracking all test results. If issues found: diagnosed gaps, verified fix plans ready for /
|
|
19
|
+
Output: {phase_num}-UAT.md tracking all test results. If issues found: diagnosed gaps, verified fix plans ready for /nf:execute-phase
|
|
20
20
|
</objective>
|
|
21
21
|
|
|
22
22
|
<execution_context>
|
|
23
|
-
@~/.claude/
|
|
24
|
-
@~/.claude/
|
|
23
|
+
@~/.claude/nf/workflows/verify-work.md
|
|
24
|
+
@~/.claude/nf/templates/UAT.md
|
|
25
25
|
</execution_context>
|
|
26
26
|
|
|
27
27
|
<context>
|
|
@@ -33,6 +33,6 @@ Context files are resolved inside the workflow (`init verify-work`) and delegate
|
|
|
33
33
|
</context>
|
|
34
34
|
|
|
35
35
|
<process>
|
|
36
|
-
Execute the verify-work workflow from @~/.claude/
|
|
36
|
+
Execute the verify-work workflow from @~/.claude/nf/workflows/verify-work.md end-to-end.
|
|
37
37
|
Preserve all workflow gates (session management, test presentation, diagnosis, fix planning, routing).
|
|
38
38
|
</process>
|