rcf-lite 0.9.0 → 0.10.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 (105) hide show
  1. package/CHANGELOG.md +86 -54
  2. package/README.md +8 -4
  3. package/bin/rcf.js +145 -57
  4. package/fixtures/canary-manifest.json +9 -9
  5. package/guidance/README.md +1 -1
  6. package/guidance/build-cycle-playbook.md +51 -51
  7. package/guidance/build-cycle.md +7 -7
  8. package/guidance/document-model.md +1 -1
  9. package/guidance/elicitation-playbook.md +29 -29
  10. package/guidance/harness-template.md +10 -10
  11. package/guidance/managed/README.md +1 -1
  12. package/guidance/managed/agent-instructions-block.hash +1 -1
  13. package/guidance/managed/agent-instructions-block.md +9 -9
  14. package/guidance/manifest.json +1 -1
  15. package/guidance/overview.md +4 -4
  16. package/package.json +4 -6
  17. package/rcf/adrs/adr-008.json +1 -1
  18. package/rcf/adrs/adr-009.json +4 -4
  19. package/rcf/code-nodes/cn-016.json +1 -1
  20. package/rcf/code-nodes/cn-019.json +1 -1
  21. package/rcf/code-nodes/cn-020.json +1 -1
  22. package/rcf/code-nodes/cn-021.json +1 -1
  23. package/rcf/code-nodes/cn-022.json +1 -1
  24. package/rcf/code-nodes/cn-049.json +1 -1
  25. package/rcf/code-nodes/cn-055.json +1 -1
  26. package/rcf/code-nodes/cn-057.json +5 -5
  27. package/rcf/code-nodes/cn-061.json +1 -1
  28. package/rcf/code-nodes/cn-066.json +1 -1
  29. package/rcf/code-nodes/cn-069.json +1 -1
  30. package/rcf/fbs/fbs-005.json +1 -1
  31. package/rcf/fbs/fbs-006.json +2 -2
  32. package/rcf/fbs/fbs-007.json +1 -1
  33. package/rcf/fbs/fbs-014.json +1 -1
  34. package/rcf/fbs/fbs-015.json +9 -8
  35. package/rcf/fbs/fbs-016.json +1 -1
  36. package/rcf/fbs/fbs-017.json +1 -1
  37. package/rcf/fbs/fbs-018.json +2 -2
  38. package/rcf/requirements/req-008.json +1 -1
  39. package/rcf/requirements/req-009.json +2 -2
  40. package/rcf/requirements/req-010.json +1 -1
  41. package/rcf/test-suites/PENDING.md +2 -2
  42. package/rcf/test-suites/ts-004.json +1 -1
  43. package/rcf/test-suites/ts-006.json +3 -3
  44. package/rcf/test-suites/ts-008.json +2 -2
  45. package/rcf/test-suites/ts-009.json +2 -2
  46. package/rcf/test-suites/ts-017.json +1 -1
  47. package/rcf/test-suites/ts-024.json +1 -1
  48. package/rcf/test-suites/ts-025.json +32 -18
  49. package/rcf/test-suites/ts-026.json +1 -1
  50. package/rcf/test-suites/ts-027.json +7 -7
  51. package/rcf/test-suites/ts-028.json +1 -1
  52. package/rcf/user-stories/us-1001.json +10 -10
  53. package/rcf/user-stories/us-1002.json +12 -12
  54. package/rcf/user-stories/us-1003.json +6 -6
  55. package/rcf/user-stories/us-805.json +2 -2
  56. package/rcf/user-stories/us-901.json +13 -13
  57. package/src/blueprint/conflicts.js +15 -15
  58. package/src/blueprint/supersede.js +6 -6
  59. package/src/build/bundle.js +3 -3
  60. package/src/build/formatters/markdown.js +9 -9
  61. package/src/build/mark.js +3 -3
  62. package/src/build/queue.js +1 -1
  63. package/src/cli/blueprint.js +3 -3
  64. package/src/cli/browser-verify.js +1 -1
  65. package/src/cli/build.js +139 -69
  66. package/src/cli/coverage.js +1 -1
  67. package/src/cli/create.js +3 -3
  68. package/src/cli/delete.js +2 -2
  69. package/src/cli/design.js +10 -10
  70. package/src/cli/fbs.js +1 -1
  71. package/src/cli/finalise.js +22 -20
  72. package/src/cli/help.js +267 -95
  73. package/src/cli/impact.js +1 -1
  74. package/src/cli/intake.js +3 -3
  75. package/src/cli/link.js +3 -3
  76. package/src/cli/preflight.js +2 -2
  77. package/src/cli/read.js +1 -1
  78. package/src/cli/req-baseline.js +2 -2
  79. package/src/cli/req-classify.js +3 -3
  80. package/src/cli/review.js +1 -1
  81. package/src/cli/standards.js +1 -1
  82. package/src/cli/test-suite.js +1 -1
  83. package/src/cli/trace.js +1 -1
  84. package/src/cli/ui-baseline.js +3 -3
  85. package/src/cli/ui-classify.js +4 -4
  86. package/src/cli/update.js +2 -2
  87. package/src/cli/validate.js +2 -2
  88. package/src/cli/view.js +12 -10
  89. package/src/core/store/writer.js +1 -1
  90. package/src/design/writer.js +3 -3
  91. package/src/finalise/detect.js +32 -38
  92. package/src/finalise/index.js +0 -1
  93. package/src/finalise/install.js +9 -8
  94. package/src/finalise/spawn.js +14 -10
  95. package/src/mcp/tools.js +1 -1
  96. package/src/req-baseline/gate.js +1 -1
  97. package/src/ui-baseline/manifest-writer.js +2 -2
  98. package/src/verify/cli/cleanup.js +1 -1
  99. package/src/verify/cli/mcp.js +1 -1
  100. package/src/verify/cli/provision.js +1 -1
  101. package/src/verify/cli/report.js +1 -1
  102. package/src/verify/cli/run.js +1 -1
  103. package/src/view-supervisor/manifest-writer.js +2 -2
  104. package/bin/rcf-verify.js +0 -122
  105. package/src/verify/cli/help.js +0 -56
package/src/cli/help.js CHANGED
@@ -1,14 +1,17 @@
1
- // Top-level and per-subcommand help. British English, ASCII hyphens
2
- // only (Phase 4 §D17).
1
+ // Top-level, per-group and per-verb help. British English, ASCII
2
+ // hyphens only (Phase 4 §D17). No em-dashes anywhere in user-facing
3
+ // strings.
3
4
  //
4
- // Single-source rule: this module owns the TOP_LEVEL block and NOTHING
5
- // else. Every per-subcommand block is imported from the module that
6
- // implements the subcommand, so `rcf help <cmd>` and `rcf <cmd> --help`
7
- // are the same string by construction. Do not reintroduce a local copy
8
- // of a subcommand's help - `test/cli/help-parity.test.js` fails the
9
- // moment the two paths differ. (This file previously kept private
10
- // duplicates of nine blocks; every one of them had drifted stale, and
11
- // `rcf help create` was hiding the `cn` kind outright.)
5
+ // Single-source rule (unchanged): each per-verb block is imported from
6
+ // the module that implements the verb, so `rcf help <group> <verb>` and
7
+ // `rcf <group> <verb> --help` are the same string by construction. Do
8
+ // not reintroduce a local copy of a verb's help - `help-parity.test.js`
9
+ // fails the moment the two paths differ.
10
+ //
11
+ // The 0.10.0 reorg introduces two new surfaces:
12
+ // - GROUP_HELP: printed by `rcf <group>` bare and `rcf help <group>`
13
+ // - TOP_LEVEL_HELP: grouped verb catalogue; the primary cold-reader
14
+ // entry point.
12
15
 
13
16
  import { HELP as BUILD_HELP } from './build.js';
14
17
  import { HELP as COVERAGE_HELP } from './coverage.js';
@@ -34,56 +37,83 @@ import { HELP as BROWSER_VERIFY_HELP } from './browser-verify.js';
34
37
  import { HELP as UPDATE_HELP } from './update.js';
35
38
  import { HELP as VALIDATE_HELP } from './validate.js';
36
39
  import { HELP as VIEW_HELP } from './view.js';
37
- // Track C+D (elicitation-and-playbook-hardening-0.7.0) verbs.
38
40
  import { HELP as REQ_CLASSIFY_HELP } from './req-classify.js';
39
41
  import { HELP as REQ_BASELINE_HELP } from './req-baseline.js';
40
42
  import { HELP as INTAKE_HELP } from './intake.js';
41
- // 0.7.1 packaging consolidation: `rcf verify <verb>` routes to the same
42
- // help block the transition-grace `rcf-verify` alias bin uses.
43
- import { TOP_LEVEL_HELP as VERIFY_HELP } from '../verify/cli/help.js';
44
- // Blueprint mechanism (Phase 1, w-2026-08-18-016).
45
43
  import { HELP as BLUEPRINT_HELP } from './blueprint.js';
46
44
  import { HELP as STANDARDS_HELP } from './standards.js';
47
45
 
46
+ // Verify group members (from the verify-suite subtree).
47
+ import { HELP as VERIFY_RUN_HELP } from '../verify/cli/run.js';
48
+ import { HELP as VERIFY_REPORT_HELP } from '../verify/cli/report.js';
49
+ import { HELP as VERIFY_PROVISION_HELP } from '../verify/cli/provision.js';
50
+ import { HELP as VERIFY_CLEANUP_HELP } from '../verify/cli/cleanup.js';
51
+ import { HELP as VERIFY_MCP_HELP } from '../verify/cli/mcp.js';
52
+
53
+ // Rendering order (spec §rcf help top-level layout): core first, then
54
+ // the five RCF stages in canonical order.
55
+ export const GROUP_ORDER = ['discover', 'define', 'build', 'verify', 'audit'];
56
+
48
57
  const TOP_LEVEL = `Usage: rcf <command> [options]
49
58
 
50
- Commands:
51
- init Scaffold a new RCF project
52
- view Render the tree as HTML (live server)
53
- validate Walk the tree and report schema and reference issues
54
- create <kind> Create a new document
55
- read <id> Print a document's body to stdout
56
- update <id> Patch fields on an existing document
57
- delete <id> Delete a document (refuses on dependents by default)
58
- link <us-id> Link a US to a TAC (appends to tacIds; idempotent)
59
- unlink <us-id> Unlink a US from a TAC
60
- coverage Structural coverage report (PRD -> REQ -> US -> AC -> TS -> TC)
61
- trace <id> Walk the graph forward / back / both from an id
62
- impact <id> Impact fan-out with per-node action label
63
- build [fbs-id] Assemble FBS spec bundles and drive the build queue
64
- finalise <fbs-id> Ship gate: verify the deployed app, then mark verified
65
- doctor Diagnose init-hygiene drift (0.6.0 spec); --fix repairs
66
- guidance [topic] Print a method document from the installed pack
67
- mcp Serve the project over MCP (local stdio)
68
- preflight Elicit pre-flight service-attestation + design-shape record
69
- fbs <fbs-id> FBS-level verbs (depends-on)
70
- test-suite <ts-id> Test-suite verbs (provenance, approve)
71
- review <fbs-id> REVIEW-stage audit (test-theatre + mutation-sampling)
72
- ui-classify <id> Run the UI-bearing classifier on one FBS
73
- ui-baseline <verb> UI baseline: init | show | opt-out
74
- design <fbs-id> Design substage: dispatch worker or hand-author artefacts
75
- browser-verify <id> Stage 5 browser-verification gate for a UI-bearing FBS
76
- req-classify <id> Rerun the REQ-shape classifier and write the block
77
- req-baseline <verb> Baseline-AC sweep and opt-out ledger for classified REQs
78
- intake Variable-fidelity intake stage (classify supplied artefacts)
79
- verify <verb> Adversarial ship gate (run|report|provision|cleanup|mcp); the legacy rcf-verify bin is a transition alias
80
- blueprint <verb> Compose blueprints onto the project (add | list | remove)
81
- standards <verb> Register standards packs against the project (add | list)
82
- help [command] Print help for a command
59
+ The Requirements Confidence Framework CLI. Verbs are grouped by the
60
+ five RCF stages, plus a small core set for platform plumbing.
61
+
62
+ core Platform plumbing that predates any RCF stage.
63
+ init Scaffold a new RCF project in this directory.
64
+ doctor Diagnose and repair init-hygiene drift.
65
+ guidance [topic] Print a method document from the installed pack.
66
+ mcp Serve the project over MCP (local stdio).
67
+ help [group] [verb] Print help for a group or a verb.
68
+
69
+ discover Learn what is already true for this project.
70
+ intake Classify supplied artefacts.
71
+ preflight Elicit third-party service dependencies.
72
+ req-classify <req-id> Classify one or every REQ by shape.
73
+ req-baseline <verb> Sweep and record baseline ACs per REQ.
74
+ ui-classify <fbs-id> Classify one FBS as UI-bearing or not.
75
+ ui-baseline <verb> Rule and record the project's UI defaults.
76
+
77
+ define Author the RCF tree.
78
+ create <kind> Create a new document.
79
+ read <id> Print a document's body.
80
+ update <id> Patch fields on an existing document.
81
+ delete <id> Delete a document.
82
+ link <us-id> Link a US to a TAC.
83
+ unlink <us-id> Unlink a US from a TAC.
84
+ validate Walk the tree and report schema and reference
85
+ issues.
86
+ design <fbs-id> <verb> Design substage for a UI-bearing FBS.
87
+ blueprint <verb> Compose blueprints onto the project.
88
+ standards <verb> Register standards packs against the project.
89
+
90
+ build Drive the FBS queue and the five-stage build cycle.
91
+ queue Show the FBS build queue.
92
+ bundle <fbs-id> Spec bundle for one FBS (or --next).
93
+ mark <fbs-id> <status> Record a lifecycle transition.
94
+ finalise <fbs-id> Ship gate: run the independent verifier and
95
+ promote a complete FBS to verified.
96
+ review <fbs-id> Stage-3-to-Stage-4 audit.
97
+ fbs <fbs-id> <verb> FBS-level operations.
98
+ test-suite <ts-id> <verb> Test-suite operations.
99
+
100
+ verify Run the independent adversarial ship-gate verifier.
101
+ run Run adversarial verification; emit a report.
102
+ report <path> Re-render a prior report artifact.
103
+ provision Stand up prerequisite accounts and sandboxes.
104
+ cleanup Tear down provisioned artefacts.
105
+ mcp Serve verify over MCP (local stdio).
106
+ browser <fbs-id> Stage 5 browser-verification gate.
107
+
108
+ audit Inspect the tree and its rollups.
109
+ view Live HTML tree render (long-running server).
110
+ coverage [scope-id] Structural coverage over the REQ chain.
111
+ trace <id> Walk the graph forward, back, or both from a node.
112
+ impact <id> Change-impact fan-out from a node.
83
113
 
84
114
  Options:
85
- --version Print the package version and exit
86
- --help Print this help and exit
115
+ --version Print the package version and exit.
116
+ --help Print this help and exit.
87
117
 
88
118
  Exit codes:
89
119
  0 success
@@ -92,51 +122,180 @@ Exit codes:
92
122
  3 schema validation or broken references
93
123
  4 refused (delete with dependents; other blocked mutations)
94
124
 
95
- Run 'rcf help <command>' for command-specific help.
125
+ Run 'rcf help <group>' for group help; 'rcf help <group> <verb>' for
126
+ per-verb help.
127
+ `;
128
+
129
+ const DISCOVER_HELP = `Usage: rcf discover <verb> [options]
130
+
131
+ Learn what is already true for this project: classify supplied
132
+ artefacts, elicit external dependencies, propose baseline defaults from
133
+ prior art, classify existing REQs and FBS items.
134
+
135
+ Verbs:
136
+ intake Classify supplied artefacts.
137
+ preflight Elicit third-party service dependencies.
138
+ req-classify <req-id> Classify one or every REQ by shape.
139
+ req-baseline <verb> Sweep and record baseline ACs per REQ.
140
+ ui-classify <fbs-id> Classify one FBS as UI-bearing or not.
141
+ ui-baseline <verb> Rule and record the project's UI defaults.
142
+
143
+ Run 'rcf help discover <verb>' for per-verb help.
96
144
  `;
97
145
 
98
- // Every value here is an import. See the single-source rule at the top
99
- // of this file before adding an entry.
100
- const HELP_MAP = {
146
+ const DEFINE_HELP = `Usage: rcf define <verb> [options]
147
+
148
+ Author the RCF tree: create, edit, link, and validate RCF documents;
149
+ compose blueprints and register standards packs; author the design
150
+ substage for UI-bearing work. Everything that writes durable spec
151
+ content lives here.
152
+
153
+ Verbs:
154
+ create <kind> Create a new document.
155
+ read <id> Print a document's body.
156
+ update <id> Patch fields on an existing document.
157
+ delete <id> Delete a document.
158
+ link <us-id> Link a US to a TAC.
159
+ unlink <us-id> Unlink a US from a TAC.
160
+ validate Walk the tree and report schema and reference
161
+ issues.
162
+ design <fbs-id> <verb> Design substage for a UI-bearing FBS.
163
+ blueprint <verb> Compose blueprints onto the project.
164
+ standards <verb> Register standards packs against the project.
165
+
166
+ Run 'rcf help define <verb>' for per-verb help.
167
+ `;
168
+
169
+ const BUILD_GROUP_HELP = `Usage: rcf build <verb> [options]
170
+
171
+ Drive the FBS queue and the five-stage build cycle. Every FBS item
172
+ walks: Define -> Build -> Review -> Test -> Finalise.
173
+
174
+ Verbs:
175
+ queue Show the FBS build queue with parallel-safe tiers.
176
+ bundle <fbs-id> Assemble the spec bundle for one FBS (or --next).
177
+ mark <fbs-id> <status> Record a lifecycle transition (notStarted ->
178
+ inProgress -> complete). 'verified' is written
179
+ only by 'build finalise'.
180
+ finalise <fbs-id> Ship gate: run the independent verifier and
181
+ promote a complete FBS to verified.
182
+ review <fbs-id> Stage-3-to-Stage-4 audit (test-theatre and
183
+ mutation-sampling).
184
+ fbs <fbs-id> <verb> FBS-level operations (depends-on).
185
+ test-suite <ts-id> <verb> Test-suite operations (provenance, approve).
186
+
187
+ Run 'rcf help build <verb>' for per-verb help.
188
+ `;
189
+
190
+ const VERIFY_GROUP_HELP = `Usage: rcf verify <verb> [options]
191
+
192
+ Run the fresh-context adversarial ship-gate verifier against a running
193
+ app, and gate UI-bearing work through browser verification. Independent
194
+ ship-readiness signal, not a correctness proof.
195
+
196
+ Verbs:
197
+ run Run adversarial verification; emit a report.
198
+ report <path> Re-render a prior report artifact.
199
+ provision Stand up prerequisite accounts and sandboxes.
200
+ cleanup Tear down provisioned artefacts (all prefixed
201
+ 'zzverify-').
202
+ mcp Serve verify over MCP (local stdio).
203
+ browser <fbs-id> Stage 5 browser-verification gate for a
204
+ UI-bearing FBS.
205
+
206
+ Run 'rcf help verify <verb>' for per-verb help.
207
+ `;
208
+
209
+ const AUDIT_HELP = `Usage: rcf audit <verb> [options]
210
+
211
+ Inspect the tree and its rollups: live HTML view, structural coverage,
212
+ forward and backward trace, change-impact fan-out. Read-only visibility
213
+ over what has been defined and built.
214
+
215
+ Verbs:
216
+ view Live HTML tree render (long-running server).
217
+ coverage [scope-id] Structural coverage over the PRD -> REQ -> US ->
218
+ AC -> TS -> TC chain.
219
+ trace <id> Walk the graph forward, back, or both from a node.
220
+ impact <id> Change-impact fan-out from a node.
221
+
222
+ Run 'rcf help audit <verb>' for per-verb help.
223
+ `;
224
+
225
+ export const GROUP_HELP = {
226
+ discover: DISCOVER_HELP,
227
+ define: DEFINE_HELP,
228
+ build: BUILD_GROUP_HELP,
229
+ verify: VERIFY_GROUP_HELP,
230
+ audit: AUDIT_HELP,
231
+ };
232
+
233
+ // Per-verb HELP_MAP is a two-level structure keyed by [group][verb].
234
+ // Every value is an import from the module that implements the verb.
235
+ // See the single-source rule at the top of this file before adding an
236
+ // entry.
237
+ export const HELP_MAP = {
238
+ discover: {
239
+ intake: INTAKE_HELP,
240
+ preflight: PREFLIGHT_HELP,
241
+ 'req-classify': REQ_CLASSIFY_HELP,
242
+ 'req-baseline': REQ_BASELINE_HELP,
243
+ 'ui-classify': UI_CLASSIFY_HELP,
244
+ 'ui-baseline': UI_BASELINE_HELP,
245
+ },
246
+ define: {
247
+ create: CREATE_HELP,
248
+ read: READ_HELP,
249
+ update: UPDATE_HELP,
250
+ delete: DELETE_HELP,
251
+ link: LINK_HELP,
252
+ unlink: UNLINK_HELP,
253
+ validate: VALIDATE_HELP,
254
+ design: DESIGN_HELP,
255
+ blueprint: BLUEPRINT_HELP,
256
+ standards: STANDARDS_HELP,
257
+ },
258
+ build: {
259
+ queue: BUILD_HELP,
260
+ bundle: BUILD_HELP,
261
+ mark: BUILD_HELP,
262
+ finalise: FINALISE_HELP,
263
+ review: REVIEW_HELP,
264
+ fbs: FBS_HELP,
265
+ 'test-suite': TEST_SUITE_HELP,
266
+ },
267
+ verify: {
268
+ run: VERIFY_RUN_HELP,
269
+ report: VERIFY_REPORT_HELP,
270
+ provision: VERIFY_PROVISION_HELP,
271
+ cleanup: VERIFY_CLEANUP_HELP,
272
+ mcp: VERIFY_MCP_HELP,
273
+ browser: BROWSER_VERIFY_HELP,
274
+ },
275
+ audit: {
276
+ view: VIEW_HELP,
277
+ coverage: COVERAGE_HELP,
278
+ trace: TRACE_HELP,
279
+ impact: IMPACT_HELP,
280
+ },
281
+ };
282
+
283
+ // Core-verb HELP blocks live outside the group tree.
284
+ export const CORE_HELP = {
101
285
  init: INIT_HELP,
102
- validate: VALIDATE_HELP,
103
- create: CREATE_HELP,
104
- read: READ_HELP,
105
- update: UPDATE_HELP,
106
- delete: DELETE_HELP,
107
- link: LINK_HELP,
108
- unlink: UNLINK_HELP,
109
- coverage: COVERAGE_HELP,
110
- trace: TRACE_HELP,
111
- impact: IMPACT_HELP,
112
- build: BUILD_HELP,
113
- finalise: FINALISE_HELP,
114
286
  doctor: DOCTOR_HELP,
115
287
  guidance: GUIDANCE_HELP,
116
288
  mcp: MCP_HELP,
117
- view: VIEW_HELP,
118
- preflight: PREFLIGHT_HELP,
119
- review: REVIEW_HELP,
120
- fbs: FBS_HELP,
121
- 'test-suite': TEST_SUITE_HELP,
122
- 'ui-classify': UI_CLASSIFY_HELP,
123
- 'ui-baseline': UI_BASELINE_HELP,
124
- design: DESIGN_HELP,
125
- 'browser-verify': BROWSER_VERIFY_HELP,
126
- // Track C+D (elicitation-and-playbook-hardening-0.7.0) verbs.
127
- 'req-classify': REQ_CLASSIFY_HELP,
128
- 'req-baseline': REQ_BASELINE_HELP,
129
- intake: INTAKE_HELP,
130
- // 0.7.1 packaging consolidation: verify subcommand tree.
131
- verify: VERIFY_HELP,
132
- // Blueprint mechanism (Phase 1, w-2026-08-18-016).
133
- blueprint: BLUEPRINT_HELP,
134
- standards: STANDARDS_HELP,
135
289
  };
136
290
 
137
291
  /**
138
- * `rcf help [command]` handler. Positional after `help` names the
139
- * subcommand; absent → top-level help.
292
+ * `rcf help [group] [verb]` handler.
293
+ *
294
+ * Positional layout:
295
+ * - no positionals -> top-level help
296
+ * - <core-verb> -> per-verb help for a core verb
297
+ * - <group> -> group help
298
+ * - <group> <verb> -> per-verb help for a grouped verb
140
299
  *
141
300
  * @param {string[]} argv - argv slice after `help`
142
301
  * @param {object} [deps]
@@ -149,16 +308,29 @@ export async function main(argv, deps = {}) {
149
308
  stdout.write(TOP_LEVEL);
150
309
  return 0;
151
310
  }
152
- const cmd = argv[0];
153
- const body = HELP_MAP[cmd];
154
- if (!body) {
155
- stderr.write(`[error] usage no help topic named '${cmd}'\n`);
156
- stdout.write(TOP_LEVEL);
157
- return 2;
311
+ const first = argv[0];
312
+ if (first in CORE_HELP) {
313
+ stdout.write(CORE_HELP[first]);
314
+ return 0;
315
+ }
316
+ if (first in GROUP_HELP) {
317
+ const verb = argv[1];
318
+ if (!verb) {
319
+ stdout.write(GROUP_HELP[first]);
320
+ return 0;
321
+ }
322
+ const body = HELP_MAP[first][verb];
323
+ if (!body) {
324
+ stderr.write(`[error] usage no help topic '${first} ${verb}'\n`);
325
+ stdout.write(GROUP_HELP[first]);
326
+ return 2;
327
+ }
328
+ stdout.write(body);
329
+ return 0;
158
330
  }
159
- stdout.write(body);
160
- return 0;
331
+ stderr.write(`[error] usage no help topic named '${first}'\n`);
332
+ stdout.write(TOP_LEVEL);
333
+ return 2;
161
334
  }
162
335
 
163
336
  export const TOP_LEVEL_HELP = TOP_LEVEL;
164
- export { HELP_MAP };
package/src/cli/impact.js CHANGED
@@ -26,7 +26,7 @@ const OPTION_SPEC = {
26
26
  'to-code': { type: 'boolean' },
27
27
  };
28
28
 
29
- export const HELP = `Usage: rcf impact <id> [options]
29
+ export const HELP = `Usage: rcf audit impact <id> [options]
30
30
 
31
31
  Report the fan-out for 'if <id> changes'. Emits ancestors (up to the
32
32
  root PRD / TAD / BS) plus descendants (down to test-leaves) with a
package/src/cli/intake.js CHANGED
@@ -30,8 +30,8 @@ const OPTION_SPEC = {
30
30
  help: { type: 'boolean' },
31
31
  };
32
32
 
33
- export const HELP = `Usage: rcf intake [--artefact <path>[,path]] [--kind <kind>] [--dry-run]
34
- rcf intake --input <config.json> [--dry-run]
33
+ export const HELP = `Usage: rcf discover intake [--artefact <path>[,path]] [--kind <kind>] [--dry-run]
34
+ rcf discover intake --input <config.json> [--dry-run]
35
35
 
36
36
  Variable-fidelity intake: read what the operator supplied, classify its
37
37
  fidelity, validate it against elicitation integrity, and record an
@@ -109,7 +109,7 @@ export async function main(argv, deps = {}) {
109
109
 
110
110
  const walkResult = await walkTree({ projectRoot });
111
111
  if (walkResult.errors.length > 0) {
112
- stderr.write(`[warn] tree has ${walkResult.errors.length} pre-existing issue(s); proceeding - writes are validated against the post-write state (run 'rcf validate' for details)\n`);
112
+ stderr.write(`[warn] tree has ${walkResult.errors.length} pre-existing issue(s); proceeding - writes are validated against the post-write state (run 'rcf define validate' for details)\n`);
113
113
  }
114
114
 
115
115
  const outcome = await runIntakePhases({
package/src/cli/link.js CHANGED
@@ -15,7 +15,7 @@ const OPTION_SPEC = {
15
15
  help: { type: 'boolean' },
16
16
  };
17
17
 
18
- export const HELP = `Usage: rcf link <us-id> --tac <tac-id> [options]
18
+ export const HELP = `Usage: rcf define link <us-id> --tac <tac-id> [options]
19
19
 
20
20
  Options:
21
21
  --tac <tac-id> TAC id to link (repeatable to link multiple
@@ -25,7 +25,7 @@ Options:
25
25
  --help Print this help
26
26
  `;
27
27
 
28
- export const UNLINK_HELP = `Usage: rcf unlink <us-id> --tac <tac-id> [options]
28
+ export const UNLINK_HELP = `Usage: rcf define unlink <us-id> --tac <tac-id> [options]
29
29
 
30
30
  Options:
31
31
  --tac <tac-id> TAC id to unlink (repeatable)
@@ -77,7 +77,7 @@ export async function main(argv, deps = {}) {
77
77
  // B5: pre-existing tree breakage no longer blocks write verbs - the
78
78
  // write is gated on the POST-write tree state inside the writer.
79
79
  if (walkResult.errors.length > 0) {
80
- stderr.write(`[warn] tree has ${walkResult.errors.length} pre-existing issue(s); proceeding - writes are validated against the post-write state (run 'rcf validate' for details)\n`);
80
+ stderr.write(`[warn] tree has ${walkResult.errors.length} pre-existing issue(s); proceeding - writes are validated against the post-write state (run 'rcf define validate' for details)\n`);
81
81
  }
82
82
  const us = walkResult.tree.byId.get(usId);
83
83
  if (!us || walkResult.tree.kindById.get(usId) !== 'userStory') {
@@ -47,7 +47,7 @@ const OPTION_SPEC = {
47
47
  help: { type: 'boolean' },
48
48
  };
49
49
 
50
- export const HELP = `Usage: rcf preflight [options]
50
+ export const HELP = `Usage: rcf discover preflight [options]
51
51
 
52
52
  Elicit the pre-flight configuration record: for every third-party
53
53
  service the PRD or TAD names, force one of the five attestation modes,
@@ -115,7 +115,7 @@ export async function main(argv, deps = {}) {
115
115
 
116
116
  const walkResult = await walkTree({ projectRoot });
117
117
  if (walkResult.errors.length > 0) {
118
- stderr.write(`[warn] tree has ${walkResult.errors.length} pre-existing issue(s); proceeding — run 'rcf validate' for details\n`);
118
+ stderr.write(`[warn] tree has ${walkResult.errors.length} pre-existing issue(s); proceeding - run 'rcf define validate' for details\n`);
119
119
  }
120
120
  const { tree } = walkResult;
121
121
 
package/src/cli/read.js CHANGED
@@ -13,7 +13,7 @@ const OPTION_SPEC = {
13
13
  help: { type: 'boolean' },
14
14
  };
15
15
 
16
- export const HELP = `Usage: rcf read <id> [options]
16
+ export const HELP = `Usage: rcf define read <id> [options]
17
17
 
18
18
  Prints the document body to stdout and a schema-validity report to
19
19
  stderr: a valid document is reported as valid; an invalid-but-present
@@ -47,7 +47,7 @@ const OPTION_SPEC = {
47
47
  help: { type: 'boolean' },
48
48
  };
49
49
 
50
- export const HELP = `Usage: rcf req-baseline <verb> [options]
50
+ export const HELP = `Usage: rcf discover req-baseline <verb> [options]
51
51
 
52
52
  Verbs:
53
53
  sweep [--req <id> | --all] [--status] [--dry-run] [--yes] [--json]
@@ -131,7 +131,7 @@ export async function main(argv, deps = {}) {
131
131
 
132
132
  const walkResult = await walkTree({ projectRoot });
133
133
  if (walkResult.errors.length > 0) {
134
- stderr.write(`[warn] tree has ${walkResult.errors.length} pre-existing issue(s); proceeding - writes are validated against the post-write state (run 'rcf validate' for details)\n`);
134
+ stderr.write(`[warn] tree has ${walkResult.errors.length} pre-existing issue(s); proceeding - writes are validated against the post-write state (run 'rcf define validate' for details)\n`);
135
135
  }
136
136
 
137
137
  if (verb === 'sweep') {
@@ -21,8 +21,8 @@ const OPTION_SPEC = {
21
21
  help: { type: 'boolean' },
22
22
  };
23
23
 
24
- export const HELP = `Usage: rcf req-classify <req-id> [options]
25
- rcf req-classify --all [options]
24
+ export const HELP = `Usage: rcf discover req-classify <req-id> [options]
25
+ rcf discover req-classify --all [options]
26
26
 
27
27
  Rerun the REQ-shape classifier for one requirement (or every requirement
28
28
  in the tree with --all) and write the resulting shapeClassification
@@ -86,7 +86,7 @@ export async function main(argv, deps = {}) {
86
86
 
87
87
  const walkResult = await walkTree({ projectRoot });
88
88
  if (walkResult.errors.length > 0) {
89
- stderr.write(`[warn] tree has ${walkResult.errors.length} pre-existing issue(s); proceeding - writes are validated against the post-write state (run 'rcf validate' for details)\n`);
89
+ stderr.write(`[warn] tree has ${walkResult.errors.length} pre-existing issue(s); proceeding - writes are validated against the post-write state (run 'rcf define validate' for details)\n`);
90
90
  }
91
91
 
92
92
  const reqIds = [];
package/src/cli/review.js CHANGED
@@ -45,7 +45,7 @@ const OPTION_SPEC = {
45
45
  help: { type: 'boolean' },
46
46
  };
47
47
 
48
- export const HELP = `Usage: rcf review <fbs-id> [options]
48
+ export const HELP = `Usage: rcf build review <fbs-id> [options]
49
49
 
50
50
  Run the REVIEW-stage audit (test-theatre + mutation-sampling) and write
51
51
  the reviewAudit record to the manifest. Exit 4 on any warn or block
@@ -7,7 +7,7 @@ import { walkTree } from '#core/store';
7
7
  import { findProjectRoot } from '../view/index.js';
8
8
  import { listStandards, registerStandardsPack } from '../blueprint/index.js';
9
9
 
10
- export const HELP = `Usage: rcf standards <verb> [options]
10
+ export const HELP = `Usage: rcf define standards <verb> [options]
11
11
 
12
12
  Verbs:
13
13
  add <source> Register a standards pack against the project.
@@ -34,7 +34,7 @@ const APPROVE_OPTION_SPEC = {
34
34
 
35
35
  const VALID_PROFILES = new Set(['mock', 'stub', 'fixture', 'live', 'mixed']);
36
36
 
37
- export const HELP = `Usage: rcf test-suite <ts-id> <verb> [options]
37
+ export const HELP = `Usage: rcf build test-suite <ts-id> <verb> [options]
38
38
 
39
39
  Verbs:
40
40
  provenance Author runtimeProvenance on the TS or a specific TC
package/src/cli/trace.js CHANGED
@@ -29,7 +29,7 @@ const OPTION_SPEC = {
29
29
  'to-code': { type: 'boolean' },
30
30
  };
31
31
 
32
- export const HELP = `Usage: rcf trace <id|path> [options]
32
+ export const HELP = `Usage: rcf audit trace <id|path> [options]
33
33
 
34
34
  Walk the graph from <id> forward (descendants), backward (ancestors),
35
35
  or both. Default is --forward. When <id> is not a known document id, it
@@ -48,7 +48,7 @@ const OPTION_SPEC = {
48
48
  help: { type: 'boolean' },
49
49
  };
50
50
 
51
- export const HELP = `Usage: rcf ui-baseline <verb> [options]
51
+ export const HELP = `Usage: rcf discover ui-baseline <verb> [options]
52
52
 
53
53
  Manage the project's ruled UI defaults (theme, layout, contrast,
54
54
  components, auth flow). Written once per project as a uiBaseline record
@@ -136,7 +136,7 @@ export async function main(argv, deps = {}) {
136
136
  function runShow({ tree, stdout, flags }) {
137
137
  const record = tree.manifest?.uiBaseline;
138
138
  if (!record) {
139
- stdout.write('ui-baseline: no baseline recorded. Run \'rcf ui-baseline init\'.\n');
139
+ stdout.write('ui-baseline: no baseline recorded. Run \'rcf discover ui-baseline init\'.\n');
140
140
  return 0;
141
141
  }
142
142
  if (flags.json) {
@@ -171,7 +171,7 @@ async function runOptOut({ tree, projectRoot, stdout, stderr, flags, now }) {
171
171
  }
172
172
  const normalisedField = flags.field.startsWith('defaults.') ? flags.field.slice('defaults.'.length) : flags.field;
173
173
  if (!isKnownBaselinePath(normalisedField)) {
174
- stderr.write(`[error] usage ui-baseline opt-out: unknown baseline field '${normalisedField}' (see 'rcf ui-baseline show' for the field list)\n`);
174
+ stderr.write(`[error] usage ui-baseline opt-out: unknown baseline field '${normalisedField}' (see 'rcf discover ui-baseline show' for the field list)\n`);
175
175
  return 2;
176
176
  }
177
177
  const result = await writeUiBaselineOptOut({
@@ -19,11 +19,11 @@ const OPTION_SPEC = {
19
19
  help: { type: 'boolean' },
20
20
  };
21
21
 
22
- export const HELP = `Usage: rcf ui-classify <fbs-id> [options]
22
+ export const HELP = `Usage: rcf discover ui-classify <fbs-id> [options]
23
23
 
24
24
  Run the UI-bearing classifier on one FBS and print the verdict. Does
25
25
  not write to the FBS document; ratify with:
26
- rcf update <fbs-id> --set uiBearing=true
26
+ rcf define update <fbs-id> --set uiBearing=true
27
27
 
28
28
  Options:
29
29
  --json Emit the uiClassification block as JSON.
@@ -98,9 +98,9 @@ export async function main(argv, deps = {}) {
98
98
  }
99
99
  }
100
100
  if (block.verdict === 'ui') {
101
- stdout.write(' Ratify with: rcf update ' + fbsId + ' --set uiBearing=true\n');
101
+ stdout.write(' Ratify with: rcf define update ' + fbsId + ' --set uiBearing=true\n');
102
102
  } else if (block.verdict === 'notUi' && signals.length === 0) {
103
- stdout.write(' No UI signals detected. Override with: rcf update ' + fbsId + ' --set uiBearing=true\n');
103
+ stdout.write(' No UI signals detected. Override with: rcf define update ' + fbsId + ' --set uiBearing=true\n');
104
104
  } else if (block.verdict === 'operatorOverride') {
105
105
  stdout.write(' Operator ruling recorded on FBS.uiBearing wins over the classifier.\n');
106
106
  }
package/src/cli/update.js CHANGED
@@ -26,7 +26,7 @@ const OPTION_SPEC = {
26
26
  'derive-deps': { type: 'boolean' },
27
27
  };
28
28
 
29
- export const HELP = `Usage: rcf update <id> [options]
29
+ export const HELP = `Usage: rcf define update <id> [options]
30
30
 
31
31
  Options:
32
32
  --set <dotPath>=<value> Set a field; repeatable
@@ -80,7 +80,7 @@ export async function main(argv, deps = {}) {
80
80
  // update is gated on the POST-write tree state inside the writer, so
81
81
  // repairing a broken doc is exactly what this verb is now for.
82
82
  if (walkResult.errors.length > 0) {
83
- stderr.write(`[warn] tree has ${walkResult.errors.length} pre-existing issue(s); proceeding - writes are validated against the post-write state (run 'rcf validate' for details)\n`);
83
+ stderr.write(`[warn] tree has ${walkResult.errors.length} pre-existing issue(s); proceeding - writes are validated against the post-write state (run 'rcf define validate' for details)\n`);
84
84
  }
85
85
 
86
86
  const sets = [];