@mindexed/cfact 1.1.6 → 1.1.8
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/LICENSE +1 -1
- package/README.md +4 -4
- package/bin/cfact.js +23 -9
- package/package.json +24 -5
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ This repo **is** the framework — the pieces a consuming project resolves throu
|
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
40
|
├── FRAMEWORK.md # What this repo is, and how consuming projects install it
|
|
41
|
-
├── CONTRIBUTING.md # Branch-per-change flow, the
|
|
41
|
+
├── CONTRIBUTING.md # Branch-per-change flow, the fourteen self-consistency gates
|
|
42
42
|
├── matrix.json # The 6-layer / 36-zone Orthogonal Architecture Matrix schema
|
|
43
43
|
├── agents/ # The five phase-owning subagent definitions
|
|
44
44
|
├── commands/ # Custom orchestrator prompts (/build-feature, /audit-matrix)
|
|
@@ -48,7 +48,7 @@ This repo **is** the framework — the pieces a consuming project resolves throu
|
|
|
48
48
|
├── skills/ # Reusable agent tools (verify-domain, audit-rls AST parser)
|
|
49
49
|
├── registry/ # Node declarations for everything that is NOT a markdown file here
|
|
50
50
|
├── maintainer-hooks/ # This repo's own git hooks for syncing consumers
|
|
51
|
-
├── consumers.json
|
|
51
|
+
├── consumers.example.json # Template of the git-ignored consumers.json: registry (name + repo) of projects that resolve this engine
|
|
52
52
|
├── cfact-docs/ # This repo's own generated project docs (ACTIVE_PRD.md,
|
|
53
53
|
│ # TECH_SPEC.md, PROJECT_STATUS.json, sot-templates/) — same
|
|
54
54
|
│ # spot any consumer's own generated docs live, see FRAMEWORK.md
|
|
@@ -105,7 +105,7 @@ symlink), so a change here reaches every **symlinked** consumer the moment the
|
|
|
105
105
|
clone is pulled — a **vendored** consumer follows when a maintainer blesses the
|
|
106
106
|
team pin (`rules/engine-promotion.md`). Read [`CONTRIBUTING.md`](CONTRIBUTING.md)
|
|
107
107
|
before opening a PR — it covers the resolution modes, the `fw/<short-desc>`
|
|
108
|
-
branch-per-change flow, and the
|
|
108
|
+
branch-per-change flow, and the fourteen self-consistency gates that keep
|
|
109
109
|
`matrix.json` and its prose docs from drifting.
|
|
110
|
-
Licensed under [MIT](LICENSE).
|
|
110
|
+
Licensed under [MIT](LICENSE), copyright José Brenes.
|
|
111
111
|
|
package/bin/cfact.js
CHANGED
|
@@ -1267,9 +1267,22 @@ function extractTarball(tarball, destDir) {
|
|
|
1267
1267
|
// --- the two commands -------------------------------------------------------
|
|
1268
1268
|
// Windows (and any host that locks an open directory) refuses to rename a tree another process holds a handle in.
|
|
1269
1269
|
// Node surfaces it as one of these codes depending on the API and the lock; all three mean "something has it open".
|
|
1270
|
-
|
|
1270
|
+
// The holder is NOT a fixed program (CHG-296, FF-392): the measured one was a running dev server and its desktop app, both
|
|
1271
|
+
// reading the project's engine, while the earlier wording blamed Claude Code and cost several failed runs and a needless
|
|
1272
|
+
// session restart. The installer cannot name the holder, so it lists the likely kinds and, on Windows, says how to find it.
|
|
1273
|
+
const CLOSE_AND_RERUN = 'Likely holders: a dev server or desktop app that reads .claude/engine, an editor with a file from it open, or a terminal whose current directory is inside it. Stop or close whichever applies, then re-run this command.';
|
|
1271
1274
|
const LOCK_ERROR_CODES = new Set(['EPERM', 'EBUSY', 'EACCES']);
|
|
1272
1275
|
|
|
1276
|
+
/**
|
|
1277
|
+
* Extra guidance for finding the holder, platform-specific. Windows only: Resource Monitor is the tool that can name the
|
|
1278
|
+
* process, and npx.ps1 being refused by the default PowerShell execution policy stops the documented one-liner before the
|
|
1279
|
+
* installer starts, so the re-run advice offers npx.cmd. `platform` is a parameter so it is testable off Windows.
|
|
1280
|
+
*/
|
|
1281
|
+
function lockHolderGuidance(platform = process.platform) {
|
|
1282
|
+
if (platform !== 'win32') return '';
|
|
1283
|
+
return ' To find the holder: Resource Monitor > CPU > Associated Handles, search for "engine". If PowerShell refuses to run npx (npx.ps1 blocked by the execution policy), run the same command with npx.cmd instead.';
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1273
1286
|
/**
|
|
1274
1287
|
* True when `e` is the "another program holds this directory open" family of errors (CHG-288, FF-389).
|
|
1275
1288
|
* Exported so the classification is testable without a Windows machine.
|
|
@@ -1287,8 +1300,8 @@ function isLockError(e) {
|
|
|
1287
1300
|
* swap is same-filesystem renames (atomic, no partial state), and a failed final rename restores the backup. Deleting
|
|
1288
1301
|
* the old engine first (as an earlier version did) risked a mid-copy failure leaving nothing behind.
|
|
1289
1302
|
*
|
|
1290
|
-
* The first rename moves the CURRENT engine aside. On Windows it throws EPERM while a
|
|
1291
|
-
* holds a handle inside `.claude/engine`; it was unguarded, so the consumer got a raw stack and a stray untracked
|
|
1303
|
+
* The first rename moves the CURRENT engine aside. On Windows it throws EPERM while any program (a dev server, a desktop
|
|
1304
|
+
* app, an editor, a terminal) holds a handle inside `.claude/engine`; it was unguarded, so the consumer got a raw stack and a stray untracked
|
|
1292
1305
|
* `.claude/.engine.incoming`. It is now translated into the one instruction that fixes it, and the failure leaves the
|
|
1293
1306
|
* old engine untouched (the rename never happened) and the staging directories removed. A translated catch rather than
|
|
1294
1307
|
* a dry rename-and-restore probe, deliberately: a probe can succeed and the real rename still fail (a handle opened in
|
|
@@ -1296,7 +1309,7 @@ function isLockError(e) {
|
|
|
1296
1309
|
*
|
|
1297
1310
|
* `fsImpl` is injectable so the failure paths are testable without a locked directory.
|
|
1298
1311
|
*/
|
|
1299
|
-
function installStagedEngine({ enginePath, stageDir, tmpDir, fsImpl = fs }) {
|
|
1312
|
+
function installStagedEngine({ enginePath, stageDir, tmpDir, fsImpl = fs, platform = process.platform }) {
|
|
1300
1313
|
const engineParent = path.dirname(enginePath);
|
|
1301
1314
|
const incoming = path.join(engineParent, '.engine.incoming');
|
|
1302
1315
|
const backup = path.join(engineParent, '.engine.backup');
|
|
@@ -1314,7 +1327,7 @@ function installStagedEngine({ enginePath, stageDir, tmpDir, fsImpl = fs }) {
|
|
|
1314
1327
|
fsImpl.rmSync(backup, { recursive: true, force: true });
|
|
1315
1328
|
} catch (e) {
|
|
1316
1329
|
abort(isLockError(e)
|
|
1317
|
-
? `cannot clear the leftovers of an earlier update next to ${enginePath} (${e.code}): another program holds them open. ${CLOSE_AND_RERUN}`
|
|
1330
|
+
? `cannot clear the leftovers of an earlier update next to ${enginePath} (${e.code}): another program holds them open. ${CLOSE_AND_RERUN}${lockHolderGuidance(platform)}`
|
|
1318
1331
|
: `cannot clear the leftovers of an earlier update next to ${enginePath} — ${e.message}`);
|
|
1319
1332
|
}
|
|
1320
1333
|
try {
|
|
@@ -1332,7 +1345,7 @@ function installStagedEngine({ enginePath, stageDir, tmpDir, fsImpl = fs }) {
|
|
|
1332
1345
|
fsImpl.renameSync(enginePath, backup);
|
|
1333
1346
|
} catch (e) {
|
|
1334
1347
|
abort(isLockError(e)
|
|
1335
|
-
? `cannot replace ${enginePath} (${e.code}): another program is holding it open
|
|
1348
|
+
? `cannot replace ${enginePath} (${e.code}): another program is holding it open. ${CLOSE_AND_RERUN}${lockHolderGuidance(platform)}${e.code === 'EACCES' ? ' (EACCES can also mean you lack write permission on .claude/; if closing them changes nothing, check that.)' : ''} Your current engine was not touched.`
|
|
1336
1349
|
: `cannot move the current engine aside — ${e.message}. Your current engine was not touched.`);
|
|
1337
1350
|
}
|
|
1338
1351
|
}
|
|
@@ -1546,7 +1559,7 @@ async function materialise(opts) {
|
|
|
1546
1559
|
// maintainer chose is honoured verbatim.
|
|
1547
1560
|
// A label the maintainer chose THIS RUN wins; a label INHERITED from the prior
|
|
1548
1561
|
// pin must not (ADR-0124). Folding both into one fallback let a stale label beat
|
|
1549
|
-
// the derivation: on the first init
|
|
1562
|
+
// the derivation: on the first init consumer-a recorded 'github-releases', and
|
|
1550
1563
|
// the later `update --channel https://…studio/api/engine` kept that label while
|
|
1551
1564
|
// writing the studio channelUrl beside it. Behaviour stayed correct (channelUrl
|
|
1552
1565
|
// takes precedence when resolving), so nothing failed — the pin simply answered
|
|
@@ -1596,7 +1609,7 @@ async function materialise(opts) {
|
|
|
1596
1609
|
// channel, which is the recommended one and what every vendored consumer uses,
|
|
1597
1610
|
// it is never read at all. It is also the single field in this TRACKED file that
|
|
1598
1611
|
// names the PRIVATE framework repo, in consumers that may be shared outside the
|
|
1599
|
-
// team (`
|
|
1612
|
+
// team (`consumer-a` is documented as exactly that). Dropping the default costs
|
|
1600
1613
|
// nothing: the read site is `opts.repo || pin.repo || DEFAULT_REPO`, so a
|
|
1601
1614
|
// fallback-channel install still resolves it. An explicitly-supplied `--repo`, or
|
|
1602
1615
|
// a non-default value already in the pin, is still carried forward — the same
|
|
@@ -1701,7 +1714,7 @@ function requiredNextSteps({ consumerRoot, wiring, command }) {
|
|
|
1701
1714
|
"session's `NO MCP` is indistinguishable from a broken config (ADR-0066)"
|
|
1702
1715
|
);
|
|
1703
1716
|
}
|
|
1704
|
-
// CHG-236 (
|
|
1717
|
+
// CHG-236 (the owner, 2026-09-23): "a guided walkthrough on npx update, not a
|
|
1705
1718
|
// text report" — this CLI has no LLM to walk anyone through anything, so
|
|
1706
1719
|
// the walkthrough itself is `/guide-sync`, run inside the restarted
|
|
1707
1720
|
// session above. This is the one line pointing there; `update` only, since
|
|
@@ -1782,5 +1795,6 @@ module.exports = {
|
|
|
1782
1795
|
describeUpdateOutcome,
|
|
1783
1796
|
requiredNextSteps,
|
|
1784
1797
|
isLockError,
|
|
1798
|
+
lockHolderGuidance,
|
|
1785
1799
|
installStagedEngine,
|
|
1786
1800
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mindexed/cfact",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.8",
|
|
4
4
|
"description": "Clean Orthogonal Architecture Software Factory Framework",
|
|
5
5
|
"bin": {
|
|
6
6
|
"claude-factory": "bin/cfact.js",
|
|
@@ -16,6 +16,10 @@
|
|
|
16
16
|
"type": "git",
|
|
17
17
|
"url": "git+https://github.com/Mindexed/cfact.git"
|
|
18
18
|
},
|
|
19
|
+
"homepage": "https://github.com/Mindexed/cfact#readme",
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/Mindexed/cfact/issues"
|
|
22
|
+
},
|
|
19
23
|
"engines": {
|
|
20
24
|
"node": ">=18"
|
|
21
25
|
},
|
|
@@ -37,6 +41,7 @@
|
|
|
37
41
|
"gate:graph-coverage": "node scripts/check-graph-coverage.js",
|
|
38
42
|
"gate:adr-template-edges": "node scripts/check-adr-template-edges.js",
|
|
39
43
|
"gate:installer-publish-drift": "node scripts/check-installer-publish-drift.js",
|
|
44
|
+
"gate:private-names": "node scripts/check-private-names.js --cannot-evaluate-ok",
|
|
40
45
|
"gate:changelog": "node scripts/generate-changelog.js --check",
|
|
41
46
|
"test:dc-generator": "node scripts/generate-dependency-cruiser-config.js --self-test",
|
|
42
47
|
"test:substance-generator": "node scripts/generate-substance-eslint-config.js --self-test",
|
|
@@ -75,6 +80,7 @@
|
|
|
75
80
|
"test:change-record": "node scripts/test-change-record.js",
|
|
76
81
|
"test:artifact-timestamps": "node scripts/test-artifact-timestamps.js",
|
|
77
82
|
"test:engine-write-lock": "node scripts/test-engine-write-lock.js",
|
|
83
|
+
"test:engine-lock-wiring": "node scripts/test-engine-lock-wiring.js",
|
|
78
84
|
"test:installer-publish-drift": "node scripts/test-installer-publish-drift.js",
|
|
79
85
|
"test:grants-authored": "node scripts/test-grants-authored.js",
|
|
80
86
|
"test:test-capability": "node scripts/test-test-capability.js",
|
|
@@ -86,14 +92,17 @@
|
|
|
86
92
|
"test:feature-v2-switch": "node scripts/test-feature-v2-switch.js",
|
|
87
93
|
"test:feature-completeness": "node scripts/test-feature-completeness.js",
|
|
88
94
|
"test:feature-history": "node scripts/test-feature-history.js",
|
|
95
|
+
"test:feature-rekey": "node scripts/test-feature-rekey.js",
|
|
89
96
|
"test:agent-note-dispatch": "node scripts/test-agent-note-dispatch.js",
|
|
97
|
+
"test:stage-loop-next-action": "node scripts/test-stage-loop-next-action.js",
|
|
90
98
|
"test:check-record-text": "node scripts/test-check-record-text.js",
|
|
91
99
|
"test:feature-write-guard": "node scripts/test-feature-write-guard.js",
|
|
92
100
|
"test:trailer-lib": "node scripts/test-trailer-lib.js",
|
|
93
101
|
"test:feature-write-lock": "node scripts/test-feature-write-lock.js",
|
|
102
|
+
"test:ci-parity": "node scripts/test-ci-parity.js",
|
|
94
103
|
"test:generate-ci": "node scripts/test-generate-ci.js",
|
|
95
104
|
"publish:release": "node maintainer-hooks/publish-release.js",
|
|
96
|
-
"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:rule-records && npm run gate:graph-coverage && npm run gate:adr-template-edges && npm run gate:installer-publish-drift",
|
|
105
|
+
"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:rule-records && npm run gate:graph-coverage && npm run gate:adr-template-edges && npm run gate:installer-publish-drift && npm run gate:private-names",
|
|
97
106
|
"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",
|
|
98
107
|
"ci": "npm run gate:consistency && npm run gate:boundaries && npm run gate:profile-coverage && npm run gate:document-freshness && npm test",
|
|
99
108
|
"test:gate-three-state": "node scripts/test-gate-three-state.js",
|
|
@@ -120,15 +129,19 @@
|
|
|
120
129
|
"test:context-subject": "node scripts/test-context-subject.js",
|
|
121
130
|
"test:design-levels": "node scripts/test-design-levels.js",
|
|
122
131
|
"test:pre-push-unit-ref": "node scripts/test-pre-push-unit-ref.js",
|
|
132
|
+
"test:pre-push-gate-reach": "node scripts/test-pre-push-gate-reach.js",
|
|
123
133
|
"test:design-audit": "node scripts/test-design-audit.js",
|
|
124
134
|
"test:grants-definer-declaration": "node scripts/test-grants-definer-declaration.js",
|
|
125
|
-
"test
|
|
135
|
+
"test:default-ship-pipeline": "node scripts/test-default-ship-pipeline.js",
|
|
136
|
+
"test:credential-slots": "node scripts/test-credential-slots.js",
|
|
137
|
+
"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:migration-grants-check && 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:engine-host && npm run test:zone-coverage && npm run test:workflow-spine && npm run test:architecture-size-gate && npm run test:command-shape && npm run test:change-record && npm run test:engine-write-lock && npm run test:engine-lock-wiring && 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:rule-record-concerns-check && npm run test:external-standard-drift && npm run test:session-branch && npm run test:installer-shadowing && npm run test:feature-record && npm run test:feature-store && npm run test:feature-record-v2 && npm run test:feature-v2-switch && npm run test:feature-completeness && npm run test:feature-history && npm run test:feature-rekey && npm run test:agent-note-dispatch && npm run test:stage-loop-next-action && npm run test:check-record-text && 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-infra-map && npm run test:generate-legal-map && npm run test:generate-erd && npm run test:surfaces-layerpaths && npm run test:surfaces-hostmodules && npm run test:list-feature-files && npm run test:feature-write-guard && npm run test:feature-write-lock && npm run test:trailer-lib && npm run test:ci-parity && npm run test:context-subject && npm run test:generate-project-analysis && npm run test:generate-feature-card && npm run test:generate-codex-agents && npm run test:generate-agent-cards && npm run test:generate-framework-graph && npm run test:unrecorded-scope && npm run test:profile-reinstated-zones && npm run test:contract-claims && npm run test:plan-crosscheck && npm run test:consumer-alignment && npm run test:check-consumer-alignment && npm run test:design-levels && npm run test:pre-push-unit-ref && npm run test:pre-push-gate-reach && npm run test:design-audit && npm run test:grants-definer-declaration && npm run test:default-ship-pipeline && npm run test:credential-slots && npm run test:licence-holder && npm run test:engine-promotion-rungs-workflow && npm run test:engine-release-workflows && npm run test:split-acceptance && npm run test:private-names",
|
|
126
138
|
"test:test-command-gate": "node scripts/test-test-command-gate.js",
|
|
127
139
|
"test:changelog-adr-refs": "node scripts/test-changelog-adr-refs.js",
|
|
128
140
|
"test:known-frictions-staleness": "node scripts/test-known-frictions-staleness.js",
|
|
129
141
|
"test:generate-flow-map": "node scripts/test-generate-flow-map.js",
|
|
130
142
|
"test:generate-zone-map": "node scripts/test-generate-zone-map.js",
|
|
131
143
|
"test:generate-infra-map": "node scripts/test-generate-infra-map.js",
|
|
144
|
+
"test:generate-legal-map": "node scripts/test-generate-legal-map.js",
|
|
132
145
|
"test:generate-agent-cards": "node scripts/test-generate-agent-cards.js",
|
|
133
146
|
"test:generate-framework-graph": "node scripts/test-generate-framework-graph.js",
|
|
134
147
|
"test:unrecorded-scope": "node scripts/test-unrecorded-scope.js",
|
|
@@ -136,9 +149,15 @@
|
|
|
136
149
|
"test:contract-claims": "node scripts/test-contract-claims.js",
|
|
137
150
|
"test:plan-crosscheck": "node scripts/test-plan-crosscheck.js",
|
|
138
151
|
"test:consumer-alignment": "node scripts/test-consumer-alignment.js",
|
|
139
|
-
"test:check-consumer-alignment": "node scripts/test-check-consumer-alignment.js"
|
|
152
|
+
"test:check-consumer-alignment": "node scripts/test-check-consumer-alignment.js",
|
|
153
|
+
"test:licence-holder": "node scripts/test-licence-holder.js",
|
|
154
|
+
"test:engine-promotion-rungs-workflow": "node scripts/test-engine-promotion-rungs-workflow.js",
|
|
155
|
+
"test:engine-release-workflows": "node scripts/test-engine-release-workflows.js",
|
|
156
|
+
"test:split-acceptance": "node scripts/test-split-acceptance.js",
|
|
157
|
+
"test:private-names": "node scripts/test-private-names.js",
|
|
158
|
+
"acceptance:split": "node scripts/split-acceptance.js"
|
|
140
159
|
},
|
|
141
160
|
"keywords": [],
|
|
142
|
-
"author": "",
|
|
161
|
+
"author": "José Brenes",
|
|
143
162
|
"license": "MIT"
|
|
144
163
|
}
|