rcf-lite 0.8.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 (138) hide show
  1. package/CHANGELOG.md +124 -51
  2. package/README.md +8 -4
  3. package/bin/rcf.js +147 -53
  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 +21 -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 +20 -9
  14. package/guidance/manifest.json +1 -1
  15. package/guidance/overview.md +4 -4
  16. package/package.json +5 -7
  17. package/rcf/adrs/adr-008.json +1 -1
  18. package/rcf/adrs/adr-009.json +4 -4
  19. package/rcf/adrs/adr-010.json +30 -0
  20. package/rcf/code-nodes/cn-016.json +1 -1
  21. package/rcf/code-nodes/cn-019.json +1 -1
  22. package/rcf/code-nodes/cn-020.json +1 -1
  23. package/rcf/code-nodes/cn-021.json +1 -1
  24. package/rcf/code-nodes/cn-022.json +1 -1
  25. package/rcf/code-nodes/cn-049.json +1 -1
  26. package/rcf/code-nodes/cn-055.json +1 -1
  27. package/rcf/code-nodes/cn-057.json +5 -5
  28. package/rcf/code-nodes/cn-058.json +18 -0
  29. package/rcf/code-nodes/cn-059.json +14 -0
  30. package/rcf/code-nodes/cn-060.json +14 -0
  31. package/rcf/code-nodes/cn-061.json +14 -0
  32. package/rcf/code-nodes/cn-062.json +14 -0
  33. package/rcf/code-nodes/cn-063.json +15 -0
  34. package/rcf/code-nodes/cn-064.json +15 -0
  35. package/rcf/code-nodes/cn-065.json +16 -0
  36. package/rcf/code-nodes/cn-066.json +14 -0
  37. package/rcf/code-nodes/cn-067.json +15 -0
  38. package/rcf/code-nodes/cn-068.json +15 -0
  39. package/rcf/code-nodes/cn-069.json +16 -0
  40. package/rcf/fbs/fbs-005.json +1 -1
  41. package/rcf/fbs/fbs-006.json +2 -2
  42. package/rcf/fbs/fbs-007.json +1 -1
  43. package/rcf/fbs/fbs-014.json +1 -1
  44. package/rcf/fbs/fbs-015.json +9 -8
  45. package/rcf/fbs/fbs-016.json +39 -0
  46. package/rcf/fbs/fbs-017.json +40 -0
  47. package/rcf/fbs/fbs-018.json +34 -0
  48. package/rcf/fbs/fbs-019.json +33 -0
  49. package/rcf/requirements/req-008.json +1 -1
  50. package/rcf/requirements/req-009.json +2 -2
  51. package/rcf/requirements/req-010.json +20 -0
  52. package/rcf/test-suites/PENDING.md +2 -2
  53. package/rcf/test-suites/ts-004.json +1 -1
  54. package/rcf/test-suites/ts-006.json +3 -3
  55. package/rcf/test-suites/ts-008.json +2 -2
  56. package/rcf/test-suites/ts-009.json +2 -2
  57. package/rcf/test-suites/ts-017.json +1 -1
  58. package/rcf/test-suites/ts-024.json +1 -1
  59. package/rcf/test-suites/ts-025.json +32 -18
  60. package/rcf/test-suites/ts-026.json +54 -0
  61. package/rcf/test-suites/ts-027.json +115 -0
  62. package/rcf/test-suites/ts-028.json +46 -0
  63. package/rcf/test-suites/ts-029.json +46 -0
  64. package/rcf/user-stories/us-1001.json +56 -0
  65. package/rcf/user-stories/us-1002.json +96 -0
  66. package/rcf/user-stories/us-1003.json +48 -0
  67. package/rcf/user-stories/us-1004.json +48 -0
  68. package/rcf/user-stories/us-805.json +2 -2
  69. package/rcf/user-stories/us-901.json +13 -13
  70. package/src/blueprint/apply.js +464 -0
  71. package/src/blueprint/conflicts.js +351 -0
  72. package/src/blueprint/diff.js +82 -0
  73. package/src/blueprint/index.js +12 -0
  74. package/src/blueprint/list.js +21 -0
  75. package/src/blueprint/loader.js +163 -0
  76. package/src/blueprint/manifest-writer.js +49 -0
  77. package/src/blueprint/namespace.js +145 -0
  78. package/src/blueprint/remove.js +105 -0
  79. package/src/blueprint/resolutions.js +83 -0
  80. package/src/blueprint/standards.js +148 -0
  81. package/src/blueprint/supersede.js +318 -0
  82. package/src/browser-verify/invariants.js +33 -6
  83. package/src/build/bundle.js +37 -14
  84. package/src/build/formatters/markdown.js +9 -9
  85. package/src/build/mark.js +3 -3
  86. package/src/build/queue.js +1 -1
  87. package/src/build/standards-selector.js +52 -0
  88. package/src/cli/blueprint.js +325 -0
  89. package/src/cli/browser-verify.js +1 -1
  90. package/src/cli/build.js +139 -69
  91. package/src/cli/coverage.js +1 -1
  92. package/src/cli/create.js +48 -3
  93. package/src/cli/delete.js +2 -2
  94. package/src/cli/design.js +10 -10
  95. package/src/cli/fbs.js +1 -1
  96. package/src/cli/finalise.js +22 -20
  97. package/src/cli/help.js +269 -89
  98. package/src/cli/impact.js +1 -1
  99. package/src/cli/init.js +20 -5
  100. package/src/cli/intake.js +3 -3
  101. package/src/cli/link.js +3 -3
  102. package/src/cli/preflight.js +2 -2
  103. package/src/cli/read.js +1 -1
  104. package/src/cli/req-baseline.js +2 -2
  105. package/src/cli/req-classify.js +3 -3
  106. package/src/cli/review.js +1 -1
  107. package/src/cli/standards.js +127 -0
  108. package/src/cli/test-suite.js +1 -1
  109. package/src/cli/trace.js +1 -1
  110. package/src/cli/ui-baseline.js +3 -3
  111. package/src/cli/ui-classify.js +4 -4
  112. package/src/cli/update.js +2 -2
  113. package/src/cli/validate.js +2 -2
  114. package/src/cli/view.js +12 -10
  115. package/src/core/store/ids.js +168 -18
  116. package/src/core/store/loader.js +27 -16
  117. package/src/core/store/walker.js +27 -15
  118. package/src/core/store/writer.js +1 -1
  119. package/src/deployment/index.js +13 -0
  120. package/src/deployment/placeholder-detector.js +113 -0
  121. package/src/design/writer.js +3 -3
  122. package/src/finalise/detect.js +32 -38
  123. package/src/finalise/index.js +0 -1
  124. package/src/finalise/install.js +9 -8
  125. package/src/finalise/spawn.js +14 -10
  126. package/src/mcp/tools.js +1 -1
  127. package/src/query/formatters/table.js +7 -10
  128. package/src/query/trace.js +45 -4
  129. package/src/req-baseline/gate.js +1 -1
  130. package/src/ui-baseline/manifest-writer.js +2 -2
  131. package/src/verify/cli/cleanup.js +1 -1
  132. package/src/verify/cli/mcp.js +1 -1
  133. package/src/verify/cli/provision.js +1 -1
  134. package/src/verify/cli/report.js +1 -1
  135. package/src/verify/cli/run.js +1 -1
  136. package/src/view-supervisor/manifest-writer.js +2 -2
  137. package/bin/rcf-verify.js +0 -122
  138. package/src/verify/cli/help.js +0 -56
package/bin/rcf-verify.js DELETED
@@ -1,122 +0,0 @@
1
- #!/usr/bin/env node
2
- // The `rcf-verify` alias bin. Post 0.7.1 packaging consolidation the
3
- // unified `rcf` CLI grew a `verify` subcommand that dispatches to the
4
- // same handlers this file wires up; `rcf-verify` remains as a
5
- // transition-grace alias (see docs/2026-08-06_packaging-consolidation-
6
- // proposal.md R3). When run directly (as `rcf-verify <verb>` rather
7
- // than through the routing `rcf verify <verb>`), the entrypoint emits
8
- // a one-line stderr deprecation notice; behaviour is otherwise
9
- // unchanged.
10
- //
11
- // Argv layout: `rcf-verify <subcommand> [args...]`. The first positional
12
- // selects the subcommand handler; global --version / --help short-circuit
13
- // before dispatch. The `main` export is also imported by bin/rcf.js as
14
- // the `verify` subcommand handler, so the dispatcher lives in one place.
15
-
16
- import { realpathSync } from 'node:fs';
17
- import { readFile } from 'node:fs/promises';
18
- import { dirname, resolve } from 'node:path';
19
- import process from 'node:process';
20
- import { fileURLToPath, pathToFileURL } from 'node:url';
21
-
22
- import { main as runMain } from '../src/verify/cli/run.js';
23
- import { main as reportMain } from '../src/verify/cli/report.js';
24
- import { main as provisionMain } from '../src/verify/cli/provision.js';
25
- import { main as cleanupMain } from '../src/verify/cli/cleanup.js';
26
- import { main as mcpMain } from '../src/verify/cli/mcp.js';
27
- import { main as helpMain, TOP_LEVEL_HELP } from '../src/verify/cli/help.js';
28
-
29
- const here = dirname(fileURLToPath(import.meta.url));
30
-
31
- const SUBCOMMANDS = {
32
- run: runMain,
33
- report: reportMain,
34
- provision: provisionMain,
35
- cleanup: cleanupMain,
36
- mcp: mcpMain,
37
- help: helpMain,
38
- };
39
-
40
- /**
41
- * @param {string[]} argv - argv minus node + script
42
- * @param {object} [deps]
43
- * @returns {Promise<number>}
44
- */
45
- export async function main(argv, deps = {}) {
46
- const stdout = deps.stdout ?? process.stdout;
47
- const stderr = deps.stderr ?? process.stderr;
48
-
49
- if (argv.length === 0) {
50
- stdout.write(TOP_LEVEL_HELP);
51
- return 0;
52
- }
53
- const first = argv[0];
54
- if (first === '--version' || first === '-v') {
55
- stdout.write(`rcf-verify ${await readPackageVersion()}\n`);
56
- return 0;
57
- }
58
- if (first === '--help' || first === '-h') {
59
- stdout.write(TOP_LEVEL_HELP);
60
- return 0;
61
- }
62
- const handler = SUBCOMMANDS[first];
63
- if (!handler) {
64
- stderr.write(`[error] usage unknown subcommand: ${first}\n`);
65
- stderr.write(TOP_LEVEL_HELP);
66
- return 2;
67
- }
68
- return await handler(argv.slice(1), deps);
69
- }
70
-
71
- async function readPackageVersion() {
72
- try {
73
- const pkgPath = resolve(here, '..', 'package.json');
74
- const pkg = JSON.parse(await readFile(pkgPath, 'utf8'));
75
- return pkg.version ?? '0.0.0';
76
- } catch {
77
- return '0.0.0';
78
- }
79
- }
80
-
81
- /**
82
- * Symlink-safe entry-point compare (mirrors build's bin/rcf.js). macOS `/tmp`
83
- * is a symlink to `/private/tmp` and every `pnpm link` shim is a symlink;
84
- * without realpath the isMain gate breaks and main() never runs.
85
- *
86
- * @param {string} metaUrl
87
- * @param {string} argvPath
88
- * @returns {boolean}
89
- */
90
- export function isSameEntryPoint(metaUrl, argvPath) {
91
- try {
92
- const metaPath = fileURLToPath(metaUrl);
93
- return realpathSync(metaPath) === realpathSync(argvPath);
94
- } catch {
95
- try {
96
- return metaUrl === pathToFileURL(argvPath).href;
97
- } catch {
98
- return false;
99
- }
100
- }
101
- }
102
-
103
- const isMain = process.argv[1] && isSameEntryPoint(import.meta.url, process.argv[1]);
104
- if (isMain) {
105
- // Transition-grace deprecation notice per proposal R3. Only fires when
106
- // the alias bin is invoked directly (not when bin/rcf.js routes the
107
- // `verify` subcommand through the exported `main`, since the isMain
108
- // guard is false in that case). Suppressible via RCF_QUIET=1 for
109
- // scripted callers who cannot tolerate stderr chatter.
110
- if (!process.env.RCF_QUIET) {
111
- process.stderr.write(
112
- '[rcf-verify] deprecation: prefer `rcf verify` (the umbrella CLI subcommand). ' +
113
- 'The `rcf-verify` alias will be removed in a future major. Set RCF_QUIET=1 to silence.\n',
114
- );
115
- }
116
- main(process.argv.slice(2))
117
- .then((code) => process.exit(code))
118
- .catch((err) => {
119
- process.stderr.write(`[rcf-verify] unexpected failure: ${err.message}\n${err.stack}\n`);
120
- process.exit(1);
121
- });
122
- }
@@ -1,56 +0,0 @@
1
- // Top-level and per-subcommand help (mirrors build's cli/help.js). British
2
- // English, ASCII hyphens only.
3
-
4
- import { HELP as RUN_HELP } from './run.js';
5
- import { HELP as REPORT_HELP } from './report.js';
6
- import { HELP as PROVISION_HELP } from './provision.js';
7
- import { HELP as CLEANUP_HELP } from './cleanup.js';
8
- import { HELP as MCP_HELP } from './mcp.js';
9
-
10
- export const TOP_LEVEL_HELP = `Usage: rcf-verify <command> [options]
11
-
12
- A fresh-context adversarial verifier. Given an RCF chain (the acceptance
13
- contract) and a running app under a declared runtime profile, it launches an
14
- isolated verifier agent that walks real user journeys adversarially and emits a
15
- structured verdict stamped with the runtime it ran against.
16
-
17
- This is an independent ship-readiness signal, not a correctness guarantee.
18
-
19
- Commands:
20
- run Run adversarial verification and emit a report artifact
21
- report <path> Re-render a prior report artifact
22
- provision Stand up prerequisite accounts/sandboxes/data standalone
23
- cleanup Tear down provisioned artefacts (all prefixed 'zzverify-')
24
- mcp Serve verify over MCP (local stdio)
25
- help [command] Print help for a command
26
-
27
- Options:
28
- --version Print the package version and exit
29
- --help Print this help and exit
30
-
31
- Run 'rcf-verify help <command>' for command-specific help.
32
- `;
33
-
34
- const SUB_HELP = {
35
- run: RUN_HELP,
36
- report: REPORT_HELP,
37
- provision: PROVISION_HELP,
38
- cleanup: CLEANUP_HELP,
39
- mcp: MCP_HELP,
40
- };
41
-
42
- /**
43
- * @param {string[]} argv
44
- * @param {object} [deps]
45
- * @returns {Promise<number>}
46
- */
47
- export async function main(argv, deps = {}) {
48
- const stdout = deps.stdout ?? process.stdout;
49
- const topic = argv[0];
50
- if (topic && SUB_HELP[topic]) {
51
- stdout.write(SUB_HELP[topic]);
52
- return 0;
53
- }
54
- stdout.write(TOP_LEVEL_HELP);
55
- return 0;
56
- }