@mindexed/cfact 1.1.1 → 1.1.3
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 -1
- package/bin/{claude-factory.js → cfact.js} +50 -4
- package/package.json +37 -5
package/README.md
CHANGED
|
@@ -55,7 +55,8 @@ This repo **is** the framework — the pieces a consuming project resolves throu
|
|
|
55
55
|
├── .mcp.json # Model Context Protocol (MCP) server definitions
|
|
56
56
|
├── .claude/
|
|
57
57
|
│ ├── CLAUDE.md # Router containing Global Hard Rules & path-scoped rule routes
|
|
58
|
-
│ ├── settings.json #
|
|
58
|
+
│ ├── settings.json # Minimal (enabledMcpjsonServers). No hooks: this repo has no app code
|
|
59
|
+
│ │ for the write-time gates to act on — see ADR-0226
|
|
59
60
|
│ ├── state/ # Symlink -> ../cfact-docs (compat path every
|
|
60
61
|
│ │ # command/hook still reads/writes)
|
|
61
62
|
│ ├── rules/, agents/, commands/ # Symlinks back to the root folders above, so Claude Code's
|
|
@@ -246,14 +246,15 @@ function parseArgs(argv) {
|
|
|
246
246
|
return opts;
|
|
247
247
|
}
|
|
248
248
|
|
|
249
|
-
const HELP = `
|
|
249
|
+
const HELP = `cfact — install/update a pinned, vendored CFacT engine
|
|
250
250
|
|
|
251
251
|
Usage:
|
|
252
252
|
npx @mindexed/cfact init [consumer-path] --version <v> [options]
|
|
253
253
|
npx @mindexed/cfact update [consumer-path] [--version <v>] [options]
|
|
254
254
|
|
|
255
|
-
Also
|
|
256
|
-
|
|
255
|
+
Also resolvable as @mindexed/claude-factory (the deprecated legacy name) --
|
|
256
|
+
frozen at its last published version as of ADR-0287 and never updated again;
|
|
257
|
+
install @mindexed/cfact for anything published from here on.
|
|
257
258
|
|
|
258
259
|
Materialises .claude/engine as REAL FILES at a pinned version (never a clone or
|
|
259
260
|
symlink of the private repo), then wires the consumer (pointer-symlinks, the
|
|
@@ -607,6 +608,45 @@ function channelBase(opts, pin) {
|
|
|
607
608
|
return DEFAULT_CHANNEL_URL;
|
|
608
609
|
}
|
|
609
610
|
|
|
611
|
+
// CHG-91 (FF-305) / ADR-0128: a plain `update` (no --version) re-requests the
|
|
612
|
+
// already-pinned version — there is deliberately no `latest` lookup, so the
|
|
613
|
+
// maintainer-controlled pin is what moves a consumer forward, never a bare
|
|
614
|
+
// `update`. That is correct and, read at the terminal, indistinguishable from
|
|
615
|
+
// a real update: checksum verified, engine materialised, "Done" — every line
|
|
616
|
+
// individually true while nothing moved. This decides which of the two a run
|
|
617
|
+
// actually was and phrases the one line every run ends on accordingly, so the
|
|
618
|
+
// two stop reading the same.
|
|
619
|
+
//
|
|
620
|
+
// Pure: takes exactly what the caller already resolved (the requested version,
|
|
621
|
+
// the version the PIN had before this run touched it, and the version that got
|
|
622
|
+
// installed) and returns strings — no I/O, so it is unit-testable without a
|
|
623
|
+
// network fetch, the same reason resolveSource()/channelBase() are pure.
|
|
624
|
+
//
|
|
625
|
+
// `requestedVersion` falsy is the whole trigger: when it holds, `targetVersion`
|
|
626
|
+
// upstream resolves to `opts.version || pin.version` picking `pin.version`, so
|
|
627
|
+
// `installedVersion` equals `priorVersion` by construction — this function does
|
|
628
|
+
// not re-derive that equality, it names the case that produces it. A bare
|
|
629
|
+
// `update` with no requested version AND no prior pin dies earlier (in
|
|
630
|
+
// resolveSource, "no engine version to install"), so that combination never
|
|
631
|
+
// reaches here.
|
|
632
|
+
function describeUpdateOutcome(command, requestedVersion, priorVersion, installedVersion) {
|
|
633
|
+
if (command === 'update' && !requestedVersion) {
|
|
634
|
+
return {
|
|
635
|
+
isNoOp: true,
|
|
636
|
+
note:
|
|
637
|
+
`ℹ️ re-materialised the PINNED version ${installedVersion} — update never moves ` +
|
|
638
|
+
`the pin by design (ADR-0128). To adopt a different release: --version <v>.`,
|
|
639
|
+
done: `Done (${command}) — pin unchanged at ${installedVersion}.`,
|
|
640
|
+
};
|
|
641
|
+
}
|
|
642
|
+
const moved = command === 'update' && priorVersion && priorVersion !== installedVersion;
|
|
643
|
+
return {
|
|
644
|
+
isNoOp: false,
|
|
645
|
+
note: null,
|
|
646
|
+
done: moved ? `Done (${command}) — ${priorVersion} → ${installedVersion}.` : `Done (${command}).`,
|
|
647
|
+
};
|
|
648
|
+
}
|
|
649
|
+
|
|
610
650
|
function resolveSource(opts, pin) {
|
|
611
651
|
if (opts.from) return { kind: 'file', via: 'local-file', ref: path.resolve(opts.from) };
|
|
612
652
|
|
|
@@ -1414,6 +1454,11 @@ async function materialise(opts) {
|
|
|
1414
1454
|
(matrixVersionOfEngine && matrixVersionOfEngine !== installedVersion ? `, matrix ${matrixVersionOfEngine}` : '') +
|
|
1415
1455
|
')'
|
|
1416
1456
|
);
|
|
1457
|
+
// CHG-91 / ADR-0128: `describeUpdateOutcome` decides whether THIS run moved
|
|
1458
|
+
// the pin — pure, so the no-op/real-update split is unit-testable without a
|
|
1459
|
+
// network fetch (the same reason resolveSource()/channelBase() are pure).
|
|
1460
|
+
const outcome = describeUpdateOutcome(opts.command, opts.version, pin.version, installedVersion);
|
|
1461
|
+
if (outcome.note) info(outcome.note);
|
|
1417
1462
|
if (!targetVersion && matrixVersionOfEngine) {
|
|
1418
1463
|
// Reached only by `--from <tarball>` with no --version and no pin: there is
|
|
1419
1464
|
// no release id to record, so the pin gets the engine's matrix version as a
|
|
@@ -1556,7 +1601,7 @@ async function materialise(opts) {
|
|
|
1556
1601
|
}
|
|
1557
1602
|
|
|
1558
1603
|
info('');
|
|
1559
|
-
info(
|
|
1604
|
+
info(outcome.done);
|
|
1560
1605
|
for (const line of requiredNextSteps({ consumerRoot, wiring })) info(line);
|
|
1561
1606
|
}
|
|
1562
1607
|
|
|
@@ -1655,5 +1700,6 @@ module.exports = {
|
|
|
1655
1700
|
envNamespaceObserved,
|
|
1656
1701
|
resetEnvNamespaceObservation,
|
|
1657
1702
|
engineMatrixVersion,
|
|
1703
|
+
describeUpdateOutcome,
|
|
1658
1704
|
requiredNextSteps,
|
|
1659
1705
|
};
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mindexed/cfact",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "Clean Orthogonal Architecture Software Factory Framework",
|
|
5
5
|
"bin": {
|
|
6
|
-
"claude-factory": "bin/
|
|
7
|
-
"cfact": "bin/
|
|
6
|
+
"claude-factory": "bin/cfact.js",
|
|
7
|
+
"cfact": "bin/cfact.js"
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
10
|
"bin/"
|
|
@@ -24,12 +24,15 @@
|
|
|
24
24
|
"gate:compliance": "node scripts/audit-framework-compliance.js",
|
|
25
25
|
"gate:doc-links": "node scripts/check-doc-links.js",
|
|
26
26
|
"gate:command-metadata": "node scripts/check-command-metadata.js",
|
|
27
|
+
"gate:agent-context-inputs": "node scripts/check-agent-context-inputs.js",
|
|
27
28
|
"gate:tracked-symlinks": "node scripts/check-tracked-symlinks.js",
|
|
28
29
|
"gate:agents-md-sync": "node scripts/check-agents-md-sync.js",
|
|
29
30
|
"gate:ripple-coverage": "node scripts/check-ripple-coverage.js",
|
|
30
31
|
"gate:profile-docs": "node scripts/check-profile-docs.js",
|
|
31
32
|
"gate:profile-coverage": "node scripts/check-profile-coverage.js",
|
|
33
|
+
"gate:document-freshness": "node scripts/check-document-freshness.js",
|
|
32
34
|
"gate:registry": "node scripts/check-registry.js",
|
|
35
|
+
"gate:rule-records": "node scripts/check-rule-records.js",
|
|
33
36
|
"gate:adr-template-edges": "node scripts/check-adr-template-edges.js",
|
|
34
37
|
"gate:installer-publish-drift": "node scripts/check-installer-publish-drift.js",
|
|
35
38
|
"gate:changelog": "node scripts/generate-changelog.js --check",
|
|
@@ -38,18 +41,25 @@
|
|
|
38
41
|
"test:json-flush": "node scripts/test-json-flush.js",
|
|
39
42
|
"test:installer-exit": "node scripts/test-installer-exit.js",
|
|
40
43
|
"test:installer-channel": "node scripts/test-installer-channel.js",
|
|
44
|
+
"test:installer-update-messaging": "node scripts/test-installer-update-messaging.js",
|
|
41
45
|
"test:installer-wiring": "node scripts/test-installer-wiring.js",
|
|
42
46
|
"test:tar-invocation": "node scripts/test-tar-invocation.js",
|
|
43
47
|
"test:framework-agents-mcp": "node scripts/test-framework-agents-mcp.js",
|
|
44
48
|
"test:controller-gates": "node scripts/test-controller-gates.js",
|
|
49
|
+
"test:controller-single-file-attribution": "node scripts/test-controller-single-file-attribution.js",
|
|
50
|
+
"test:parse-ast": "node skills/ast-parser/scripts/test-parse-ast.js",
|
|
45
51
|
"test:git-tree-sweep": "node scripts/test-git-tree-sweep.js",
|
|
46
52
|
"test:secrets-two-stage": "node scripts/test-secrets-two-stage.js",
|
|
47
53
|
"test:profile-paths": "node scripts/verify-profiles.js",
|
|
48
54
|
"test:registry-gate": "node scripts/test-registry-gate.js",
|
|
55
|
+
"test:rule-resolver": "node scripts/test-rule-resolver.js",
|
|
49
56
|
"test:adr-template-edges": "node scripts/test-adr-template-edges.js",
|
|
50
57
|
"test:adr-path-constants": "node scripts/test-adr-path-constants.js",
|
|
58
|
+
"test:resolver-topology": "node scripts/test-resolver-topology.js",
|
|
51
59
|
"test:graph-strip": "node scripts/test-graph-frontmatter-strip.js",
|
|
52
60
|
"test:graph-registry": "node scripts/test-graph-registry.js",
|
|
61
|
+
"test:graph-memory-substrate": "node scripts/test-graph-memory-substrate.js",
|
|
62
|
+
"test:document-freshness": "node scripts/test-document-freshness.js",
|
|
53
63
|
"test:frontmatter-readers": "node scripts/test-frontmatter-readers.js",
|
|
54
64
|
"test:tarball-reproducible": "node scripts/test-tarball-reproducible.js",
|
|
55
65
|
"test:release-version": "node scripts/test-release-version-lib.js",
|
|
@@ -57,22 +67,44 @@
|
|
|
57
67
|
"test:workflow-spine": "node scripts/test-workflow-spine.js",
|
|
58
68
|
"test:command-shape": "node scripts/test-command-shape.js",
|
|
59
69
|
"test:change-record": "node scripts/test-change-record.js",
|
|
70
|
+
"test:artifact-timestamps": "node scripts/test-artifact-timestamps.js",
|
|
71
|
+
"test:engine-write-lock": "node scripts/test-engine-write-lock.js",
|
|
60
72
|
"test:installer-publish-drift": "node scripts/test-installer-publish-drift.js",
|
|
61
73
|
"test:grants-authored": "node scripts/test-grants-authored.js",
|
|
62
74
|
"test:test-capability": "node scripts/test-test-capability.js",
|
|
63
75
|
"test:installer-lifecycle": "node scripts/test-installer-lifecycle.js",
|
|
64
76
|
"test:installer-shadowing": "node scripts/test-installer-shadowing.js",
|
|
65
77
|
"test:feature-record": "node scripts/test-feature-record.js",
|
|
78
|
+
"test:feature-write-guard": "node scripts/test-feature-write-guard.js",
|
|
79
|
+
"test:generate-ci": "node scripts/test-generate-ci.js",
|
|
66
80
|
"publish:release": "node maintainer-hooks/publish-release.js",
|
|
67
81
|
"gate:consistency": "npm run gate:matrix-sync && npm run gate:compliance && npm run gate:doc-links && npm run gate:command-metadata && npm run gate:tracked-symlinks && npm run gate:agents-md-sync && npm run gate:ripple-coverage && npm run gate:profile-docs && npm run gate:registry && npm run gate:adr-template-edges && npm run gate:installer-publish-drift",
|
|
68
82
|
"gate:boundaries": "bash hooks/check-matrix.sh domain && bash hooks/check-matrix.sh components && bash hooks/check-matrix.sh controllers && bash hooks/check-matrix.sh secrets",
|
|
69
|
-
"ci": "npm run gate:consistency && npm run gate:boundaries && npm run gate:profile-coverage && npm run gate:
|
|
83
|
+
"ci": "npm run gate:consistency && npm run gate:boundaries && npm run gate:profile-coverage && npm run gate:document-freshness && npm run gate:changelog && npm test",
|
|
70
84
|
"test:gate-three-state": "node scripts/test-gate-three-state.js",
|
|
71
85
|
"test:refresh-compliance": "node scripts/test-refresh-compliance.js",
|
|
72
86
|
"test:gate-coverage": "node scripts/test-gate-coverage.js",
|
|
87
|
+
"test:policy-lib": "node scripts/test-policy-lib.js",
|
|
88
|
+
"test:validate-zone-denylist-bypass": "node scripts/test-validate-zone-denylist-bypass.js",
|
|
89
|
+
"test:validate-zone-ledger-score": "node scripts/test-validate-zone-ledger-score.js",
|
|
90
|
+
"test:rules-carrier-schema": "node scripts/test-rules-carrier-schema.js",
|
|
91
|
+
"test:rule-record-schema": "node scripts/test-rule-record-schema.js",
|
|
73
92
|
"test:consumer-docs-migration": "node scripts/test-consumer-docs-migration.js",
|
|
74
93
|
"test:sot-templates-pointer": "node scripts/test-sot-templates-pointer.js",
|
|
75
|
-
"test:npm-deprecation": "node scripts/test-npm-deprecation.js"
|
|
94
|
+
"test:npm-deprecation": "node scripts/test-npm-deprecation.js",
|
|
95
|
+
"test:generate-erd": "node scripts/test-generate-erd.js",
|
|
96
|
+
"test:surfaces-layerpaths": "node scripts/test-surfaces-layerpaths.js",
|
|
97
|
+
"test:list-feature-files": "node scripts/test-list-feature-files.js",
|
|
98
|
+
"test:generate-project-analysis": "node scripts/test-generate-project-analysis.js",
|
|
99
|
+
"test:generate-feature-card": "node scripts/test-generate-feature-card.js",
|
|
100
|
+
"test:generate-codex-agents": "node scripts/test-generate-codex-agents.js",
|
|
101
|
+
"test:context-subject": "node scripts/test-context-subject.js",
|
|
102
|
+
"test": "npm run test:dc-generator && npm run test:substance-generator && npm run test:json-flush && npm run test:installer-exit && npm run test:installer-channel && npm run test:installer-update-messaging && npm run test:installer-wiring && npm run test:tar-invocation && npm run test:framework-agents-mcp && npm run test:controller-gates && npm run test:controller-single-file-attribution && npm run test:parse-ast && npm run test:git-tree-sweep && npm run test:secrets-two-stage && npm run test:profile-paths && npm run test:registry-gate && npm run test:rule-resolver && npm run test:adr-template-edges && npm run test:adr-path-constants && npm run test:resolver-topology && npm run test:graph-strip && npm run test:graph-registry && npm run test:graph-memory-substrate && npm run test:document-freshness && npm run test:frontmatter-readers && npm run test:tarball-reproducible && npm run test:release-version && npm run test:consumer-checklist && npm run test:workflow-spine && npm run test:command-shape && npm run test:change-record && npm run test:engine-write-lock && npm run test:installer-publish-drift && npm run test:grants-authored && npm run test:test-capability && npm run test:installer-lifecycle && npm run test:gate-three-state && npm run test:refresh-compliance && npm run test:gate-coverage && npm run test:policy-lib && npm run test:validate-zone-denylist-bypass && npm run test:validate-zone-ledger-score && npm run test:rules-carrier-schema && npm run test:rule-record-schema && npm run test:installer-shadowing && npm run test:feature-record && npm run test:consumer-docs-migration && npm run test:npm-deprecation && npm run test:sot-templates-pointer && npm run test:test-command-gate && npm run test:changelog-adr-refs && npm run test:generate-ci && npm run test:known-frictions-staleness && npm run test:artifact-timestamps && npm run test:generate-flow-map && npm run test:generate-zone-map && npm run test:generate-erd && npm run test:surfaces-layerpaths && npm run test:list-feature-files && npm run test:feature-write-guard && npm run test:context-subject && npm run test:generate-project-analysis && npm run test:generate-feature-card && npm run test:generate-codex-agents",
|
|
103
|
+
"test:test-command-gate": "node scripts/test-test-command-gate.js",
|
|
104
|
+
"test:changelog-adr-refs": "node scripts/test-changelog-adr-refs.js",
|
|
105
|
+
"test:known-frictions-staleness": "node scripts/test-known-frictions-staleness.js",
|
|
106
|
+
"test:generate-flow-map": "node scripts/test-generate-flow-map.js",
|
|
107
|
+
"test:generate-zone-map": "node scripts/test-generate-zone-map.js"
|
|
76
108
|
},
|
|
77
109
|
"keywords": [],
|
|
78
110
|
"author": "",
|