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.
- package/CHANGELOG.md +124 -51
- package/README.md +8 -4
- package/bin/rcf.js +147 -53
- package/fixtures/canary-manifest.json +9 -9
- package/guidance/README.md +1 -1
- package/guidance/build-cycle-playbook.md +51 -51
- package/guidance/build-cycle.md +7 -7
- package/guidance/document-model.md +1 -1
- package/guidance/elicitation-playbook.md +29 -29
- package/guidance/harness-template.md +21 -10
- package/guidance/managed/README.md +1 -1
- package/guidance/managed/agent-instructions-block.hash +1 -1
- package/guidance/managed/agent-instructions-block.md +20 -9
- package/guidance/manifest.json +1 -1
- package/guidance/overview.md +4 -4
- package/package.json +5 -7
- package/rcf/adrs/adr-008.json +1 -1
- package/rcf/adrs/adr-009.json +4 -4
- package/rcf/adrs/adr-010.json +30 -0
- package/rcf/code-nodes/cn-016.json +1 -1
- package/rcf/code-nodes/cn-019.json +1 -1
- package/rcf/code-nodes/cn-020.json +1 -1
- package/rcf/code-nodes/cn-021.json +1 -1
- package/rcf/code-nodes/cn-022.json +1 -1
- package/rcf/code-nodes/cn-049.json +1 -1
- package/rcf/code-nodes/cn-055.json +1 -1
- package/rcf/code-nodes/cn-057.json +5 -5
- package/rcf/code-nodes/cn-058.json +18 -0
- package/rcf/code-nodes/cn-059.json +14 -0
- package/rcf/code-nodes/cn-060.json +14 -0
- package/rcf/code-nodes/cn-061.json +14 -0
- package/rcf/code-nodes/cn-062.json +14 -0
- package/rcf/code-nodes/cn-063.json +15 -0
- package/rcf/code-nodes/cn-064.json +15 -0
- package/rcf/code-nodes/cn-065.json +16 -0
- package/rcf/code-nodes/cn-066.json +14 -0
- package/rcf/code-nodes/cn-067.json +15 -0
- package/rcf/code-nodes/cn-068.json +15 -0
- package/rcf/code-nodes/cn-069.json +16 -0
- package/rcf/fbs/fbs-005.json +1 -1
- package/rcf/fbs/fbs-006.json +2 -2
- package/rcf/fbs/fbs-007.json +1 -1
- package/rcf/fbs/fbs-014.json +1 -1
- package/rcf/fbs/fbs-015.json +9 -8
- package/rcf/fbs/fbs-016.json +39 -0
- package/rcf/fbs/fbs-017.json +40 -0
- package/rcf/fbs/fbs-018.json +34 -0
- package/rcf/fbs/fbs-019.json +33 -0
- package/rcf/requirements/req-008.json +1 -1
- package/rcf/requirements/req-009.json +2 -2
- package/rcf/requirements/req-010.json +20 -0
- package/rcf/test-suites/PENDING.md +2 -2
- package/rcf/test-suites/ts-004.json +1 -1
- package/rcf/test-suites/ts-006.json +3 -3
- package/rcf/test-suites/ts-008.json +2 -2
- package/rcf/test-suites/ts-009.json +2 -2
- package/rcf/test-suites/ts-017.json +1 -1
- package/rcf/test-suites/ts-024.json +1 -1
- package/rcf/test-suites/ts-025.json +32 -18
- package/rcf/test-suites/ts-026.json +54 -0
- package/rcf/test-suites/ts-027.json +115 -0
- package/rcf/test-suites/ts-028.json +46 -0
- package/rcf/test-suites/ts-029.json +46 -0
- package/rcf/user-stories/us-1001.json +56 -0
- package/rcf/user-stories/us-1002.json +96 -0
- package/rcf/user-stories/us-1003.json +48 -0
- package/rcf/user-stories/us-1004.json +48 -0
- package/rcf/user-stories/us-805.json +2 -2
- package/rcf/user-stories/us-901.json +13 -13
- package/src/blueprint/apply.js +464 -0
- package/src/blueprint/conflicts.js +351 -0
- package/src/blueprint/diff.js +82 -0
- package/src/blueprint/index.js +12 -0
- package/src/blueprint/list.js +21 -0
- package/src/blueprint/loader.js +163 -0
- package/src/blueprint/manifest-writer.js +49 -0
- package/src/blueprint/namespace.js +145 -0
- package/src/blueprint/remove.js +105 -0
- package/src/blueprint/resolutions.js +83 -0
- package/src/blueprint/standards.js +148 -0
- package/src/blueprint/supersede.js +318 -0
- package/src/browser-verify/invariants.js +33 -6
- package/src/build/bundle.js +37 -14
- package/src/build/formatters/markdown.js +9 -9
- package/src/build/mark.js +3 -3
- package/src/build/queue.js +1 -1
- package/src/build/standards-selector.js +52 -0
- package/src/cli/blueprint.js +325 -0
- package/src/cli/browser-verify.js +1 -1
- package/src/cli/build.js +139 -69
- package/src/cli/coverage.js +1 -1
- package/src/cli/create.js +48 -3
- package/src/cli/delete.js +2 -2
- package/src/cli/design.js +10 -10
- package/src/cli/fbs.js +1 -1
- package/src/cli/finalise.js +22 -20
- package/src/cli/help.js +269 -89
- package/src/cli/impact.js +1 -1
- package/src/cli/init.js +20 -5
- package/src/cli/intake.js +3 -3
- package/src/cli/link.js +3 -3
- package/src/cli/preflight.js +2 -2
- package/src/cli/read.js +1 -1
- package/src/cli/req-baseline.js +2 -2
- package/src/cli/req-classify.js +3 -3
- package/src/cli/review.js +1 -1
- package/src/cli/standards.js +127 -0
- package/src/cli/test-suite.js +1 -1
- package/src/cli/trace.js +1 -1
- package/src/cli/ui-baseline.js +3 -3
- package/src/cli/ui-classify.js +4 -4
- package/src/cli/update.js +2 -2
- package/src/cli/validate.js +2 -2
- package/src/cli/view.js +12 -10
- package/src/core/store/ids.js +168 -18
- package/src/core/store/loader.js +27 -16
- package/src/core/store/walker.js +27 -15
- package/src/core/store/writer.js +1 -1
- package/src/deployment/index.js +13 -0
- package/src/deployment/placeholder-detector.js +113 -0
- package/src/design/writer.js +3 -3
- package/src/finalise/detect.js +32 -38
- package/src/finalise/index.js +0 -1
- package/src/finalise/install.js +9 -8
- package/src/finalise/spawn.js +14 -10
- package/src/mcp/tools.js +1 -1
- package/src/query/formatters/table.js +7 -10
- package/src/query/trace.js +45 -4
- package/src/req-baseline/gate.js +1 -1
- package/src/ui-baseline/manifest-writer.js +2 -2
- package/src/verify/cli/cleanup.js +1 -1
- package/src/verify/cli/mcp.js +1 -1
- package/src/verify/cli/provision.js +1 -1
- package/src/verify/cli/report.js +1 -1
- package/src/verify/cli/run.js +1 -1
- package/src/view-supervisor/manifest-writer.js +2 -2
- package/bin/rcf-verify.js +0 -122
- 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
|
-
}
|
package/src/verify/cli/help.js
DELETED
|
@@ -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
|
-
}
|