@mindexed/cfact 1.1.7 β†’ 1.1.11

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 (4) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +99 -78
  3. package/bin/cfact.js +355 -35
  4. package/package.json +83 -5
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 Josito
3
+ Copyright (c) 2026 Jose Brenes
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,111 +1,132 @@
1
1
  # CFacT 🏭
2
2
 
3
- An agentic software development framework that translates human ideas into highly structured, matrix-aligned codebases using a multi-agent SDLC pipeline.
4
-
5
- CFacT automates software engineering by partitioning the codebase into strict layers, assigning specialized AI subagents (with scoped permissions and tools) to each layer, and checking compliance via automated quality gates.
3
+ **CFacT is a Human–Agent–App architecture engine** β€” a multi-agent framework that turns a
4
+ plain-language product idea into a structured, matrix-aligned codebase, and keeps it that
5
+ way as the codebase grows. It partitions a project into strict architectural layers, assigns
6
+ specialized AI subagents (each scoped to its own directories and tools) to each layer, and
7
+ checks every change against automated quality gates β€” so "a subagent wrote it" and "it
8
+ follows the architecture" are the same statement, not two separate hopes.
9
+
10
+ **The engine runs entirely on its own, offline, with nothing to sign up for.** The
11
+ Orthogonal Architecture Matrix, the quality gates, the subagents, and every command in this
12
+ repo work directly against your own codebase with no account and no network call. A
13
+ separately operated hosted layer β€” a "studio" channel and its MCP bridge β€” adds a pinned
14
+ install path, a shared feedback queue, and a hosted release console on top; it is optional,
15
+ and nothing in the core framework requires it. See [Installing](#installing) and
16
+ [Optional: the hosted studio layer](#optional-the-hosted-studio-layer) below.
6
17
 
7
18
  ---
8
19
 
9
- ## πŸ“ The 5-Layer Orthogonal Architecture Matrix
20
+ ## How it works
10
21
 
11
- All code developed within this framework must strictly align with one of five architectural layers:
22
+ Every file in a project built with CFacT belongs to exactly one cell of a layer Γ— domain
23
+ matrix. The baseline is five layers (a sixth, Agent System, is opt-in):
12
24
 
13
25
  | Layer | Directory | Zone Focus | Key Constraints (Non-Negotiables) |
14
26
  | :--- | :--- | :--- | :--- |
15
- | **1: Presentation** | `app/`, `components/` | UI/UX, forms, API actions | Max 300 lines for components, Max 100 lines for actions/controllers. |
16
- | **2: Application** | `src/application/` | Use cases, DTOs, orchestration | Pure orchestration. Zero direct DB or infrastructure imports. |
17
- | **3: Domain** | `src/domain/` | Domain logic, DDD, entities | **Purity Blocker:** Absolutely zero I/O, DB, HTTP, logging, or external imports. |
18
- | **4: Infrastructure** | `src/infrastructure/` | Repositories, SDK adapters, APIs | Implements Application ports. Zero hardcoded secrets (validated via Zod). |
19
- | **5: Database** | `supabase/` | Schemas, migrations, RLS | 100% Row-Level Security (RLS) coverage on public tables. |
27
+ | **1: Presentation** | `app/`, `components/` | UI/UX, forms, API actions | Max 300 lines for components, max 100 for controllers. |
28
+ | **2: Application** | `src/application/` | Use cases, DTOs, orchestration | Pure orchestration β€” zero direct DB or infrastructure imports. |
29
+ | **3: Domain** | `src/domain/` | Domain logic, DDD, entities | **Purity blocker:** zero I/O, DB, HTTP, logging, or external imports. |
30
+ | **4: Infrastructure** | `src/infrastructure/` | Repositories, SDK adapters, APIs | Implements Application ports; zero hardcoded secrets (Zod-validated). |
31
+ | **5: Database** | `supabase/` | Schemas, migrations, RLS | 100% Row-Level Security coverage on public tables. |
32
+
33
+ Five specialized subagents build against this matrix in Dependency-Rule order β€” one per
34
+ layer, each restricted to its own directories and tools (Architect, Domain Engineer,
35
+ Integration Developer, Frontend Developer, and an opt-in Agent-System owner) β€” and two
36
+ audit-only subagents (Security/QA, Data-Engineering/QA) check their work before anything
37
+ ships. `FRAMEWORK.md` and `rules/` describe the full roster, every zone, and the two more
38
+ subagents (asynchronous maintainers) that sweep a whole repo for drift without ever blocking
39
+ it.
40
+
41
+ A set of scripted audits enforce the matrix boundaries, both at write time and in CI:
42
+
43
+ - `/audit-matrix domain` β€” `src/domain/` has no external dependencies or I/O.
44
+ - `/audit-matrix components` β€” no UI component exceeds the 300-line SRP limit.
45
+ - `/audit-matrix controllers` β€” no API route/action exceeds the 100-line controller limit.
46
+ - `/audit-matrix rls` β€” every Supabase table has Row-Level Security coverage.
47
+ - `/audit-matrix secrets` β€” no hardcoded secret anywhere in the tree.
48
+
49
+ These are the same checks the framework runs against its own code before every change β€” see
50
+ [`CONTRIBUTING.md`](CONTRIBUTING.md) for the full self-consistency gate chain. The engine is
51
+ built the way it asks a consuming project to build.
20
52
 
21
53
  ---
22
54
 
23
- ## πŸ€– The Software Factory Departments
55
+ ## What's in this repo
56
+
57
+ This repo **is** the framework engine β€” the pieces a consuming project resolves through a
58
+ `.claude/engine/` symlink live at the root here, not nested inside `.claude/`.
24
59
 
25
- Development is orchestrated across five specialized agent roles, each with strict directory and tool boundaries:
60
+ ```
61
+ β”œβ”€β”€ matrix.json the layer/domain/zone schema every check is derived from
62
+ β”œβ”€β”€ agents/ the subagent definitions, one per architectural role
63
+ β”œβ”€β”€ commands/ slash-command workflows (/build-feature, /audit-matrix, ...)
64
+ β”œβ”€β”€ rules/ path-scoped constraints for each layer and domain
65
+ β”œβ”€β”€ hooks/ the quality-gate scripts that enforce rules/ at write time
66
+ β”œβ”€β”€ scripts/ full-codebase audits and the derived-projection generators
67
+ β”œβ”€β”€ skills/ reusable agent tools (AST parsing, RLS auditing, ...)
68
+ β”œβ”€β”€ bin/ the npx installer front door
69
+ └── docs/cfact/ design docs and Architecture Decision Records
70
+ ```
26
71
 
27
- * **Architect:** Owns Phase 1 (Planning & Tech Spec). Translates PRD requirements into Layer 2 Application Port interfaces.
28
- * **Domain Engineer:** Owns Phase 2a (Domain Layer). Writes pure, side-effect-free business logic. *Explicitly blocked from database or network access.*
29
- * **Integration Developer:** Owns Phase 2b (Infrastructure/Database). Builds repositories, adapters, and Supabase migrations.
30
- * **Frontend Developer:** Owns Phase 3 (User Experience). Builds React Server Components (RSC) and coordinates client hooks.
31
- * **Security/QA:** Owns Phase 4 (Verification & Release). Audits environment schemas, verifies RLS, and executes tests.
72
+ For what each piece does in depth, how a consuming project resolves this repo, and how the
73
+ pieces fit together, see [`FRAMEWORK.md`](FRAMEWORK.md) β€” that file is the maintainer-depth
74
+ reference; this one is the front door.
32
75
 
33
76
  ---
34
77
 
35
- ## πŸ“‚ Project Structure
78
+ ## Installing
79
+
80
+ Today, materializing a pinned copy of the engine (`npx @mindexed/cfact init`) needs an
81
+ access token β€” there is no public, tokenless install channel yet. If you already have one,
82
+ `FRAMEWORK.md`'s "Authenticating the studio channel" section has the exact steps.
36
83
 
37
- This repo **is** the framework β€” the pieces a consuming project resolves through its git-ignored `.claude/engine/` symlink live at the root here, not nested inside `.claude/`. Consumers track nothing framework-shaped: the pointer-symlinks are generated locally by `maintainer-hooks/setup-local.sh` (ADR-0047). New device? `bash maintainer-hooks/bootstrap-system.sh` installs the system (framework + the agentic-os dashboard) as siblings under one workspace root. See [`FRAMEWORK.md`](FRAMEWORK.md) for the full contract.
84
+ A tokenless, public quick start is planned but not shipped yet: it waits on a short list of
85
+ still-open changes, one of which is a one-time rewrite of this repository's own git history
86
+ to remove names that predate its public release β€” a change its owner is deliberately holding
87
+ as a separate, explicit decision rather than folding it into this one. Until that lands, the
88
+ accurate way to get started as a contributor, or as a maintainer-track adopter who already
89
+ holds a token, is to clone this repo directly and read `FRAMEWORK.md`.
38
90
 
39
91
  ```bash
40
- β”œβ”€β”€ FRAMEWORK.md # What this repo is, and how consuming projects install it
41
- β”œβ”€β”€ CONTRIBUTING.md # Branch-per-change flow, the eleven self-consistency gates
42
- β”œβ”€β”€ matrix.json # The 6-layer / 36-zone Orthogonal Architecture Matrix schema
43
- β”œβ”€β”€ agents/ # The five phase-owning subagent definitions
44
- β”œβ”€β”€ commands/ # Custom orchestrator prompts (/build-feature, /audit-matrix)
45
- β”œβ”€β”€ rules/ # Path-scoped constraints for Layers 1-5
46
- β”œβ”€β”€ hooks/ # Quality-gate scripts + PreToolUse/PostToolUse enforcement
47
- β”œβ”€β”€ scripts/ # Full-codebase audits (validate-zone.js, sync-env.js)
48
- β”œβ”€β”€ skills/ # Reusable agent tools (verify-domain, audit-rls AST parser)
49
- β”œβ”€β”€ registry/ # Node declarations for everything that is NOT a markdown file here
50
- β”œβ”€β”€ maintainer-hooks/ # This repo's own git hooks for syncing consumers
51
- β”œβ”€β”€ consumers.json # Path-independent registry (name + repo) of projects that resolve this engine
52
- β”œβ”€β”€ cfact-docs/ # This repo's own generated project docs (ACTIVE_PRD.md,
53
- β”‚ # TECH_SPEC.md, PROJECT_STATUS.json, sot-templates/) β€” same
54
- β”‚ # spot any consumer's own generated docs live, see FRAMEWORK.md
55
- β”œβ”€β”€ .mcp.json # Model Context Protocol (MCP) server definitions
56
- β”œβ”€β”€ .claude/
57
- β”‚ β”œβ”€β”€ CLAUDE.md # Router containing Global Hard Rules & path-scoped rule routes
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
60
- β”‚ β”œβ”€β”€ state/ # Symlink -> ../cfact-docs (compat path every
61
- β”‚ β”‚ # command/hook still reads/writes)
62
- β”‚ β”œβ”€β”€ rules/, agents/, commands/ # Symlinks back to the root folders above, so Claude Code's
63
- β”‚ β”‚ # `.claude/...`-only autodiscovery picks them up
64
- β”‚ └── skills/ # Per-skill symlinks back to the root skills/ folder
65
- └── docs/
66
- └── claude-factory/ # In-depth design and framework documentation
92
+ git clone <this-repo-url>
93
+ bash maintainer-hooks/setup-local.sh <path-to-your-project>
67
94
  ```
68
95
 
69
96
  ---
70
97
 
71
- ## ⚑ Verification & Quality Gates
98
+ ## Optional: the hosted studio layer
72
99
 
73
- The workspace includes custom verification commands to enforce architectural integrity locally and during CI/CD:
100
+ A separately operated hosted service adds, on top of the free, offline engine:
74
101
 
75
- * `/audit-matrix domain` β€” Checks that `src/domain/` has no external dependencies or I/O.
76
- * `/audit-matrix components` β€” Identifies UI components exceeding the 300-line SRP limit.
77
- * `/audit-matrix controllers` β€” Audits API routes/actions exceeding the 100-line controller limit.
78
- * `/audit-matrix rls` β€” Scans the Supabase schema to ensure 100% RLS policy coverage.
102
+ - a pinned, checksum-verified **vendored install** channel (`npx @mindexed/cfact
103
+ init`/`update`), for a team that wants every member on the exact same engine version
104
+ without anyone holding a clone of this repo;
105
+ - a hosted **release console** and a shared **framework-feedback queue**, so a team's
106
+ friction reports and proposed framework changes land in one place instead of staying
107
+ local to each developer;
108
+ - a remote **MCP bridge** exposing the subset of tools backed by shared, hosted state (as
109
+ opposed to a project's own local files, which only a local MCP server can read).
79
110
 
80
- ---
111
+ None of this is required to use CFacT. The matrix, the gates, every agent and slash command
112
+ in this repo, and a local clone-based install all work with no account, no token, and no
113
+ network access. `FRAMEWORK.md` has the full resolution-mode story β€” symlinked clone,
114
+ CI-cloned, and pinned/vendored β€” and what each one does and doesn't need from the hosted
115
+ layer.
81
116
 
82
- ## πŸ–₯️ CFacT Agentic OS
83
-
84
- The framework features an interactive **Agentic OS** UI control center that runs entirely on your Portable SSD and dynamically adapts to any open development workspace.
85
-
86
- ### Key Visual Features:
87
- * **30-Zone Grid Visualizer:** A 6x5 matrix displaying the real-time compliance status (file size, boundary violations) of each zone.
88
- * **Multi-Project Selector:** Sidebar dropdown dynamically listing all `.claude` projects on the SSD for quick visual switching.
89
- * **Phase & Gate Control Panel:** Visually monitor SDLC stages and toggle Phase/HITL locks.
90
- * **Config Editor:** Interactive form to edit and sync `variables.local.json` environment settings.
91
-
92
- ### How to Run:
93
- Start the local Next.js Visual OS from the framework root:
94
- ```bash
95
- npm run start-os
96
- ```
97
- Open **`http://localhost:3099`** in your browser to access the control panel.
117
+ An optional local, free visual dashboard (Agentic OS) is a separate piece of the same
118
+ toolkit β€” see `FRAMEWORK.md`'s "Installing the system on a new device" section for how to
119
+ clone and run it; it is not part of this repo.
98
120
 
99
121
  ---
100
122
 
101
- ## 🀝 Contributing
123
+ ## Contributing
102
124
 
103
- CFacT is consumed from a local clone (a git-ignored `.claude/engine`
104
- symlink), so a change here reaches every **symlinked** consumer the moment the
105
- clone is pulled β€” a **vendored** consumer follows when a maintainer blesses the
106
- team pin (`rules/engine-promotion.md`). Read [`CONTRIBUTING.md`](CONTRIBUTING.md)
107
- before opening a PR β€” it covers the resolution modes, the `fw/<short-desc>`
108
- branch-per-change flow, and the eleven self-consistency gates that keep
109
- `matrix.json` and its prose docs from drifting.
110
- Licensed under [MIT](LICENSE).
125
+ CFacT is consumed from a local clone (a git-ignored `.claude/engine` symlink), so a change
126
+ here reaches every symlinked consumer the moment the clone is pulled β€” a vendored consumer
127
+ follows once a maintainer blesses the team pin. Read [`CONTRIBUTING.md`](CONTRIBUTING.md)
128
+ before opening a PR β€” it covers the resolution modes, the `fw/<short-desc>` branch-per-change
129
+ flow, and the self-consistency gates that keep `matrix.json` and its prose docs from
130
+ drifting.
111
131
 
132
+ Licensed under [MIT](LICENSE), copyright Jose Brenes.
package/bin/cfact.js CHANGED
@@ -54,6 +54,18 @@
54
54
  * engine tarball becomes the code every gate runs β€” so an UNKNOWN checksum is a
55
55
  * loud warning, and --require-checksum turns it into a refusal.
56
56
  *
57
+ * WHICH VERSION, WHEN NONE IS NAMED (CHG-319/ADR-0453, narrowing ADR-0128)
58
+ * -------------------------------------------------------------------------
59
+ * `opts.version || pin.version` used to be the whole story, with a hard refusal
60
+ * when both were absent. It is now a three-step fallback: `--version` first,
61
+ * then an EXISTING pin's version (ADR-0128's rule β€” a bare `update` NEVER
62
+ * auto-upgrades a pinned consumer, unchanged), and only when NEITHER names one
63
+ * does the installer fetch `cfact-engine-latest.json` from the resolved channel
64
+ * (the SAME base a versioned tarball would use) and install whatever release it
65
+ * names β€” "newest" meaning PUBLICATION TIME, decided server-side by whichever
66
+ * channel wrote that file last, never a client-side version-string compare.
67
+ * See needsLatestResolution()/resolveLatestManifestSource()/fetchLatestManifest().
68
+ *
57
69
  * Unlike ensure-engine.js (build-time, fails OPEN so a deploy degrades rather
58
70
  * than breaks), this is an explicit install step and fails CLOSED: a teammate
59
71
  * running `init` wants the engine present, so a fetch/verify failure is an error.
@@ -87,13 +99,22 @@ const DEFAULT_REPO = 'Mindexed/cfact';
87
99
  const LEGACY_DEFAULT_REPOS = ['Mindexed/claude-factory'];
88
100
  const isDefaultRepo = (r) => r === DEFAULT_REPO || LEGACY_DEFAULT_REPOS.includes(r);
89
101
 
90
- // THE CANONICAL ENGINE CHANNEL BASE β€” DATA, NOT PROSE (ADR-0168, FF-240).
102
+ // THE CANONICAL STUDIO ORIGIN β€” DATA, NOT PROSE (ADR-0168, FF-240; widened from
103
+ // "this installer's own channel" to "the one shared export" by ADR-0439).
91
104
  //
92
105
  // This host was stated in three places and only two of them agreed. Both correct
93
106
  // statements were PROSE IN A CODE COMMENT (resolveSource below, and
94
107
  // publish-release.js's INGEST_URL); the third was agentic-os's Get Started page,
95
108
  // which re-derived it independently, hardcoded the APEX, and is the one a human
96
109
  // copy-pastes. So the two statements that were right were the two nobody read.
110
+ // ADR-0168 fixed and exported this installer's OWN copy as DEFAULT_CHANNEL_URL,
111
+ // but named the other two files' copies (this file's own prose above, and
112
+ // setup-local.sh's AGENTIC_OS_MCP_STUDIO_URL) as correct and explicitly left
113
+ // them unmerged, "since unifying them would need a shared module that does not
114
+ // exist". ADR-0439 is that module: npm ships only bin/, so this file is the one
115
+ // place a vendored install actually receives, and therefore the only place a
116
+ // single export can mean anything to a maintainer-only script like
117
+ // publish-release.js or setup-local.sh.
97
118
  //
98
119
  // NAME THE HOST THAT ANSWERS DIRECTLY β€” NOT ONE THAT REDIRECTS TO IT. A redirect
99
120
  // between the apex and `www.` (or any host change) is CROSS-ORIGIN, and per the
@@ -103,15 +124,21 @@ const isDefaultRepo = (r) => r === DEFAULT_REPO || LEGACY_DEFAULT_REPOS.includes
103
124
  // directly. `crossOriginRedirectTarget` turns that into a self-diagnosing error
104
125
  // rather than an opaque 401.
105
126
  //
106
- // It lives HERE, above HELP, because HELP interpolates it β€” defining it beside
107
- // the resolution logic further down is a temporal-dead-zone ReferenceError at
108
- // module load, which breaks every invocation including `--help`.
127
+ // It lives HERE, above HELP, because HELP interpolates DEFAULT_CHANNEL_URL below
128
+ // β€” defining either beside the resolution logic further down is a temporal-
129
+ // dead-zone ReferenceError at module load, which breaks every invocation
130
+ // including `--help`.
109
131
  //
110
132
  // EXPORTED (see module.exports) so another Node consumer can READ it instead of
111
- // restating it. Note the better fix for the studio is not to import this at all
112
- // but to stop emitting `--channel`: this constant makes the flag optional, and a
113
- // fact nobody restates cannot drift (node-contract Policy 2).
114
- const DEFAULT_CHANNEL_URL = 'https://www.agenticos.studio/api/engine';
133
+ // restating it β€” in this repo, publish-release.js's INGEST_URL and
134
+ // setup-local.sh's inline `node -e` MCP-transport resolution both now
135
+ // `require('../bin/cfact.js')` for STUDIO_ORIGIN rather than carrying their own
136
+ // literal (ADR-0439). Note the better fix for the studio's own Get Started page
137
+ // is not to import this at all but to stop emitting `--channel`: this constant
138
+ // makes the flag optional, and a fact nobody restates cannot drift (node-contract
139
+ // Policy 2).
140
+ const STUDIO_ORIGIN = 'https://www.agenticos.studio';
141
+ const DEFAULT_CHANNEL_URL = `${STUDIO_ORIGIN}/api/engine`;
115
142
  // The one label that opts OUT of the default and back to the GitHub-Releases
116
143
  // fallback. Deliberately read from THIS RUN's flags only β€” never from pin.channel,
117
144
  // which is a DERIVED provenance label (see DERIVED_CHANNEL_LABELS): treating it as
@@ -249,7 +276,7 @@ function parseArgs(argv) {
249
276
  const HELP = `cfact β€” install/update a pinned, vendored CFacT engine
250
277
 
251
278
  Usage:
252
- npx @mindexed/cfact init [consumer-path] --version <v> [options]
279
+ npx @mindexed/cfact init [consumer-path] [--version <v>] [options]
253
280
  npx @mindexed/cfact update [consumer-path] [--version <v>] [options]
254
281
 
255
282
  Also resolvable as @mindexed/claude-factory (the deprecated legacy name) --
@@ -261,8 +288,16 @@ symlink of the private repo), then wires the consumer (pointer-symlinks, the
261
288
  agentic-os MCP entry, the docs folder) via the engine's own setup-local.sh.
262
289
 
263
290
  Version & channel:
264
- --version <v> engine version to pin to (e.g. 3.6). Required for init
265
- unless .claude/engine.pin.json already records one.
291
+ --version <v> engine version to pin to (e.g. 3.6). OPTIONAL β€” when
292
+ omitted and no .claude/engine.pin.json already records
293
+ one, the installer resolves the latest published
294
+ release from the configured channel instead
295
+ (CHG-319/ADR-0453; the studio channel only for now β€”
296
+ GitHub Releases has no "latest" lookup yet). A bare
297
+ \`update\` against an ALREADY-PINNED consumer is
298
+ unaffected and keeps re-requesting the pinned version
299
+ (ADR-0128) β€” "latest" only ever applies when nothing,
300
+ anywhere, names a version.
266
301
  --channel <url|label> engine channel: an https:// BASE (the recommended
267
302
  agenticos.studio endpoint) makes the installer fetch
268
303
  <base>/cfact-engine-<version>.tar.gz; works on
@@ -516,6 +551,16 @@ const ASSET = (version) => `cfact-engine-${version}.tar.gz`;
516
551
  // those releases will ever carry. Used solely as the github-releases 404
517
552
  // fallback below β€” never requested first, and never on the studio channel.
518
553
  const LEGACY_ASSET = (version) => `claude-factory-engine-${version}.tar.gz`;
554
+ // The "latest release" pointer (CHG-319/ADR-0453). ONE well-known name, served
555
+ // under the channel base alongside the versioned tarballs β€” never version-
556
+ // suffixed, since its whole job is to be fetched when no version is known yet.
557
+ // Carries the SAME ADR-0093 metadata shape a versioned release-metadata.json
558
+ // does (version/checksum/channel/…), just for "whichever release is newest" β€”
559
+ // see maintainer-hooks/publish-release.js, which writes/updates it on every
560
+ // publish, and resolveLatestManifestSource()/fetchLatestManifest() below, which
561
+ // consume it. The app-side studio route that SERVES this asset is a separate,
562
+ // already-named app-half (not built here, per CHG-319's own scope).
563
+ const LATEST_MANIFEST_ASSET = 'cfact-engine-latest.json';
519
564
  // The env namespace accepts CFACT_* and CLAUDE_FACTORY_*, the new name winning
520
565
  // WITHIN a source tier (ADR-0189). These are ORDERED EXACT NAMES and must never
521
566
  // become a pattern, prefix, or regex: the two names share the suffix
@@ -625,10 +670,14 @@ function channelBase(opts, pin) {
625
670
  // `requestedVersion` falsy is the whole trigger: when it holds, `targetVersion`
626
671
  // upstream resolves to `opts.version || pin.version` picking `pin.version`, so
627
672
  // `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.
673
+ // not re-derive that equality, it names the case that produces it. That can
674
+ // only happen when a prior pin DOES name a version (requestedVersion is falsy
675
+ // only because nothing overrode it) β€” a bare `update` with no requested
676
+ // version AND no prior pin no longer dies before reaching here (CHG-319/
677
+ // ADR-0453): materialise() resolves "latest" first and REWRITES opts.version
678
+ // to the resolved release id before this function is ever called, so by the
679
+ // time it runs, a latest-resolved install always has a truthy
680
+ // `requestedVersion` and is correctly NOT treated as the no-op case below.
632
681
  function describeUpdateOutcome(command, requestedVersion, priorVersion, installedVersion) {
633
682
  if (command === 'update' && !requestedVersion) {
634
683
  return {
@@ -656,6 +705,12 @@ function resolveSource(opts, pin) {
656
705
  const url = opts.url || resolveEnvName(ENGINE_URL_NAMES).value;
657
706
  if (url) return { kind: 'url', via: 'explicit-url', ref: url };
658
707
 
708
+ // Reached only by a DIRECT caller of resolveSource() with no version (every
709
+ // fixture in this repo always passes one). materialise() itself never hits
710
+ // this any more for the plain "nothing named a version" case β€” as of
711
+ // CHG-319/ADR-0453 it resolves "latest" first and calls this with
712
+ // opts.version already filled in β€” so this stays as the pure function's own
713
+ // safety net rather than the CLI's actual refusal path.
659
714
  const version = opts.version || pin.version;
660
715
  if (!version) {
661
716
  die(
@@ -759,6 +814,51 @@ function resolveSource(opts, pin) {
759
814
  };
760
815
  }
761
816
 
817
+ // Is there already an explicit, VERSION-INDEPENDENT source for this run β€” a
818
+ // local tarball (--from) or an exact URL override (--url / $CFACT_ENGINE_URL)?
819
+ // Mirrors resolveSource()'s own first two branches EXACTLY (CHG-319/ADR-0453):
820
+ // those return before ever looking at a version, so a run that supplies one of
821
+ // them must never be routed into a "resolve latest" lookup it does not need β€”
822
+ // materialise() calls this BEFORE deciding whether to fetch the latest-release
823
+ // manifest, precisely so that decision can never drift from resolveSource's own.
824
+ function hasExplicitSource(opts) {
825
+ if (opts.from) return true;
826
+ return Boolean(opts.url || resolveEnvName(ENGINE_URL_NAMES).value);
827
+ }
828
+
829
+ // Does THIS run need a "latest" lookup (CHG-319/ADR-0453)? Pure and exported
830
+ // so the one invariant that matters most here β€” a bare `update` on an
831
+ // ALREADY-PINNED consumer is COMPLETELY UNCHANGED by this feature β€” is
832
+ // testable directly, rather than re-derived from a regex over materialise()'s
833
+ // source. True only when NEITHER an explicit version-independent source
834
+ // (hasExplicitSource) NOR --version NOR an existing pin names a version β€”
835
+ // i.e. exactly the condition that used to be resolveSource's unconditional
836
+ // "no engine version to install" refusal.
837
+ function needsLatestResolution(opts, pin) {
838
+ return !hasExplicitSource(opts) && !opts.version && !pin.version;
839
+ }
840
+
841
+ // Where to fetch the "latest release" manifest from, reusing the IDENTICAL
842
+ // channel-resolution resolveSource() uses for a specific version
843
+ // (channelBase(), which is itself configuredChannelBase() + optsOutOfDefaultChannel())
844
+ // rather than a second copy of that precedence (CHG-319/ADR-0453). Returns
845
+ // null when this run opted OUT of the channel-base channel (an explicit
846
+ // `--channel github-releases` or `--repo`) β€” that fallback is name/tag-keyed
847
+ // per version and has no "latest" concept yet (CHG-322 is the later, separate
848
+ // change that would add one), so the caller falls back to naming a version
849
+ // explicitly rather than this installer guessing at an endpoint it does not
850
+ // build.
851
+ function resolveLatestManifestSource(opts, pin) {
852
+ const base = channelBase(opts, pin);
853
+ if (!base) return null;
854
+ return {
855
+ kind: 'url',
856
+ via: 'studio',
857
+ ref: `${base.replace(/\/+$/, '')}/${LATEST_MANIFEST_ASSET}`,
858
+ bearerEnv: ENGINE_TOKEN_NAMES,
859
+ };
860
+ }
861
+
762
862
  // Did this failed response come back through a CROSS-ORIGIN redirect while we
763
863
  // were sending a bearer? If so the bearer was stripped in flight and the status
764
864
  // says nothing about the token's validity (ADR-0168).
@@ -1160,6 +1260,50 @@ async function fetchToFile(source, destFile) {
1160
1260
  fs.writeFileSync(destFile, buf);
1161
1261
  }
1162
1262
 
1263
+ // Fetches and parses the "latest release" manifest (CHG-319/ADR-0453). Shares
1264
+ // the studio channel's optional bearer (resolveBearer/normalizeBearer, the
1265
+ // same precedence fetchToFile already uses) but deliberately does NOT
1266
+ // replicate fetchToFile's cross-origin-redirect / stripped-bearer self-
1267
+ // diagnosis or its 404-retry-on-legacy-name dance: those exist for the large,
1268
+ // slow tarball transfer, where a wrong diagnosis costs a real debugging cycle.
1269
+ // This is a few hundred bytes of JSON β€” on failure it reports the plain status
1270
+ // and points at --version, rather than duplicating that machinery a second
1271
+ // time for a different asset.
1272
+ async function fetchLatestManifest(source, consumerRoot) {
1273
+ if (typeof fetch !== 'function') {
1274
+ die('global fetch is unavailable β€” Node 18+ is required to resolve the latest engine release.');
1275
+ }
1276
+ const headers = { 'User-Agent': 'claude-factory-installer', Accept: 'application/json' };
1277
+ const bearer = resolveBearer(source.bearerEnv, consumerRoot);
1278
+ if (bearer.value) {
1279
+ const { value } = normalizeBearer(bearer.value);
1280
+ headers.Authorization = `Bearer ${value}`;
1281
+ }
1282
+ info(` resolving the latest engine release from ${source.ref}`);
1283
+ let res;
1284
+ try {
1285
+ res = await fetch(source.ref, { headers, redirect: 'follow' });
1286
+ } catch (e) {
1287
+ die(`could not resolve the latest engine release β€” ${e.message}`);
1288
+ }
1289
+ if (!res.ok) {
1290
+ die(
1291
+ `could not resolve the latest engine release β€” HTTP ${res.status} ${res.statusText} for ${source.ref}\n` +
1292
+ ' Pass --version <v> to install a specific release instead.'
1293
+ );
1294
+ }
1295
+ let manifest;
1296
+ try {
1297
+ manifest = await res.json();
1298
+ } catch (e) {
1299
+ die(`the latest-release manifest at ${source.ref} is not valid JSON β€” ${e.message}`);
1300
+ }
1301
+ if (!manifest || typeof manifest.version !== 'string' || !manifest.version) {
1302
+ die(`the latest-release manifest at ${source.ref} has no "version" field β€” cannot resolve a release to install.`);
1303
+ }
1304
+ return manifest;
1305
+ }
1306
+
1163
1307
  function sha256(file) {
1164
1308
  // Use node's crypto without pulling a dependency.
1165
1309
  const crypto = require('crypto');
@@ -1291,6 +1435,105 @@ function isLockError(e) {
1291
1435
  return Boolean(e) && LOCK_ERROR_CODES.has(e.code);
1292
1436
  }
1293
1437
 
1438
+ // --- short bounded retry around the engine-folder-to-backup rename (CHG-344, FF-392) --------------------------
1439
+ // A transient lock on `.claude/engine` often clears within a few seconds β€” antivirus finishing a scan of a
1440
+ // just-written file, a file-watcher releasing a brief hold β€” so failing the whole update on the FIRST EPERM/EBUSY/
1441
+ // EACCES wastes a run that would have succeeded a moment later. This retries ONLY the one rename the CHG scoped
1442
+ // (moving the current engine aside); every other lock-error site in installStagedEngine below is unchanged and
1443
+ // still fails immediately, exactly as before.
1444
+ const LOCK_RETRY_ATTEMPTS = 5;
1445
+ const LOCK_RETRY_DELAY_MS = 750; // 4 gaps between 5 attempts * 750ms = ~3s total, before giving up
1446
+ // Distinct from die()'s default (1) and the usage-error code (2, parseArgs) β€” checked against every `die(...,
1447
+ // N)` call and every process.exitCode assignment in this file before picking it; nothing in bin/cfact.js uses 3.
1448
+ // A separate code (not a reused 1) is the point: FEAT-308's one-click update reads it to tell "still locked after
1449
+ // retrying" apart from every other installer failure without parsing message text.
1450
+ const ENGINE_LOCK_EXIT_CODE = 3;
1451
+
1452
+ /**
1453
+ * Synchronous sleep β€” the retry above runs inside installStagedEngine, which is synchronous (materialise() awaits
1454
+ * it as a whole, but the swap itself has no await points to yield at). Atomics.wait blocks the calling thread for
1455
+ * up to `ms` without spinning the CPU and needs no native addon. Exported so a caller that cannot use it (none in
1456
+ * this repo) could substitute its own; a fixture substitutes a no-op instead so the retry-exhausted case does not
1457
+ * actually cost ~3s per assertion.
1458
+ */
1459
+ function sleepSync(ms) {
1460
+ try {
1461
+ Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
1462
+ } catch {
1463
+ // No known supported Node build lacks Atomics.wait; kept as a defensive, non-spinning-free fallback rather than
1464
+ // silently skipping the delay outright.
1465
+ const until = Date.now() + ms;
1466
+ while (Date.now() < until) { /* busy-wait */ }
1467
+ }
1468
+ }
1469
+
1470
+ /**
1471
+ * Runs `fn`, retrying only while it throws a LOCK error (`isLockError`), up to `attempts` times with `delayMs`
1472
+ * between tries. A non-lock error, or the lock error on the final attempt, propagates to the caller unchanged β€”
1473
+ * this never swallows a failure, it only buys a transient one a few seconds to clear. `sleepImpl` is injectable so
1474
+ * a fixture can prove both outcomes (clears within the window; still locked after it) without a real wait.
1475
+ */
1476
+ function withLockRetry(fn, { attempts = LOCK_RETRY_ATTEMPTS, delayMs = LOCK_RETRY_DELAY_MS, sleepImpl = sleepSync } = {}) {
1477
+ for (let i = 0; i < attempts; i++) {
1478
+ try {
1479
+ return fn();
1480
+ } catch (e) {
1481
+ if (!isLockError(e) || i === attempts - 1) throw e;
1482
+ sleepImpl(delayMs);
1483
+ }
1484
+ }
1485
+ /* istanbul ignore next β€” unreachable: the loop above always returns or throws */
1486
+ throw new Error('withLockRetry: unreachable');
1487
+ }
1488
+
1489
+ // --- Windows-only best-effort "who might be holding it" candidate scan (CHG-344, FF-392) -----------------------
1490
+ // ADR-0378 reverted naming a single tool as THE cause of a lock β€” the two tools it used to name were, measured,
1491
+ // NOT the actual holder, and asserting a cause that is usually wrong cost real runs. This is a different, narrower
1492
+ // claim and does not reintroduce that framing: it lists processes from a small, named set that are OBSERVED
1493
+ // RUNNING right now via `tasklist`, labelled candidates, never asserted as the cause. The set is the two kinds
1494
+ // CHG-344 itself names as historically implicated (editors/IDEs, antivirus) β€” the same two kinds CLOSE_AND_RERUN
1495
+ // above already describes generically ("an editor with a file from it open") alongside "a dev server or desktop
1496
+ // app" and "a terminal", neither of which has a stable, enumerable process name and so is left out of the scan.
1497
+ const WINDOWS_LOCK_CANDIDATE_PROCESSES = [
1498
+ 'Code.exe', // Visual Studio Code
1499
+ 'Cursor.exe', // Cursor
1500
+ 'devenv.exe', // Visual Studio
1501
+ 'idea64.exe', // IntelliJ-family IDEs
1502
+ 'notepad++.exe', // Notepad++
1503
+ 'sublime_text.exe', // Sublime Text
1504
+ 'MsMpEng.exe', // Windows Defender
1505
+ 'avp.exe', // Kaspersky
1506
+ 'avastsvc.exe', // Avast
1507
+ 'bdagent.exe', // Bitdefender
1508
+ ];
1509
+
1510
+ /**
1511
+ * Best-effort only: never throws. A non-Windows platform, a missing/failing `tasklist`, or any spawn error all
1512
+ * return `[]` β€” this is supporting information for a message that must still print correctly without it.
1513
+ * `execImpl`/`platform` are injectable so the matching logic is testable without a Windows host.
1514
+ */
1515
+ function scanWindowsLockCandidates({ platform = process.platform, execImpl = execFileSync } = {}) {
1516
+ if (platform !== 'win32') return [];
1517
+ let out;
1518
+ try {
1519
+ out = String(execImpl('tasklist', [], { stdio: ['ignore', 'pipe', 'ignore'] }));
1520
+ } catch {
1521
+ return [];
1522
+ }
1523
+ const lower = out.toLowerCase();
1524
+ return WINDOWS_LOCK_CANDIDATE_PROCESSES.filter((name) => lower.includes(name.toLowerCase()));
1525
+ }
1526
+
1527
+ /**
1528
+ * Formats the scan result as an explicitly-labelled, non-causal addendum. Empty when there is nothing to add
1529
+ * (not Windows, the scan failed, or none of the named candidates are running) β€” an empty "candidates:" line would
1530
+ * read as a finding where the scan made none.
1531
+ */
1532
+ function windowsCandidateMessage(candidates) {
1533
+ if (!candidates || !candidates.length) return '';
1534
+ return ` Candidates currently running (not necessarily the cause): ${candidates.join(', ')}.`;
1535
+ }
1536
+
1294
1537
  /**
1295
1538
  * Install a staged engine tree at `enginePath` WITHOUT ever leaving the consumer with no engine, and without leaving
1296
1539
  * residue behind on any failure path (CHG-288, FF-389).
@@ -1307,19 +1550,26 @@ function isLockError(e) {
1307
1550
  * a dry rename-and-restore probe, deliberately: a probe can succeed and the real rename still fail (a handle opened in
1308
1551
  * between), and a probe whose restore half fails is exactly the "no engine" state this function exists to avoid.
1309
1552
  *
1310
- * `fsImpl` is injectable so the failure paths are testable without a locked directory.
1553
+ * `fsImpl` is injectable so the failure paths are testable without a locked directory. `sleepImpl`/`execImpl` are
1554
+ * injectable the same way for the rename's retry delay and the Windows candidate scan (CHG-344) β€” neither is a
1555
+ * real wait or a real `tasklist` call in a fixture.
1556
+ *
1557
+ * CHG-344 (FF-392) added a short bounded retry around the ONE rename that moves the current engine aside β€” a
1558
+ * transient lock there often clears within a few seconds β€” and, only once that retry is exhausted, a distinct
1559
+ * exit code (`ENGINE_LOCK_EXIT_CODE`) plus, on Windows, a best-effort list of named candidate processes observed
1560
+ * running. Every other lock-error site below is unchanged.
1311
1561
  */
1312
- function installStagedEngine({ enginePath, stageDir, tmpDir, fsImpl = fs, platform = process.platform }) {
1562
+ function installStagedEngine({ enginePath, stageDir, tmpDir, fsImpl = fs, platform = process.platform, sleepImpl, execImpl }) {
1313
1563
  const engineParent = path.dirname(enginePath);
1314
1564
  const incoming = path.join(engineParent, '.engine.incoming');
1315
1565
  const backup = path.join(engineParent, '.engine.backup');
1316
1566
  const quietRm = (target) => {
1317
1567
  try { fsImpl.rmSync(target, { recursive: true, force: true }); } catch { /* best effort: never mask the real error */ }
1318
1568
  };
1319
- const abort = (message) => {
1569
+ const abort = (message, code) => {
1320
1570
  quietRm(incoming);
1321
1571
  quietRm(tmpDir);
1322
- die(message);
1572
+ die(message, code);
1323
1573
  };
1324
1574
 
1325
1575
  try {
@@ -1342,11 +1592,22 @@ function installStagedEngine({ enginePath, stageDir, tmpDir, fsImpl = fs, platfo
1342
1592
  const hadOld = fsImpl.existsSync(enginePath);
1343
1593
  if (hadOld) {
1344
1594
  try {
1345
- fsImpl.renameSync(enginePath, backup);
1595
+ // CHG-344: this specific rename gets a short bounded retry β€” a transient lock here (antivirus finishing a
1596
+ // scan, a brief file-watcher hold) often clears within the ~3s window, and retrying costs nothing when it
1597
+ // doesn't.
1598
+ withLockRetry(() => fsImpl.renameSync(enginePath, backup), { sleepImpl });
1346
1599
  } catch (e) {
1347
- abort(isLockError(e)
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.`
1349
- : `cannot move the current engine aside β€” ${e.message}. Your current engine was not touched.`);
1600
+ if (isLockError(e)) {
1601
+ // Still locked after retrying: a distinct exit code (never asserted as "the cause" of anything β€” see
1602
+ // scanWindowsLockCandidates) and, on Windows, the best-effort candidate list.
1603
+ const candidates = scanWindowsLockCandidates({ platform, execImpl });
1604
+ abort(
1605
+ `cannot replace ${enginePath} after retrying for ~${LOCK_RETRY_DELAY_MS * (LOCK_RETRY_ATTEMPTS - 1) / 1000}s (${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.${windowsCandidateMessage(candidates)}`,
1606
+ ENGINE_LOCK_EXIT_CODE
1607
+ );
1608
+ } else {
1609
+ abort(`cannot move the current engine aside β€” ${e.message}. Your current engine was not touched.`);
1610
+ }
1350
1611
  }
1351
1612
  }
1352
1613
  try {
@@ -1413,6 +1674,37 @@ async function materialise(opts) {
1413
1674
  }
1414
1675
 
1415
1676
  const pin = readPin(consumerRoot);
1677
+
1678
+ // CHG-319/ADR-0453: resolve "latest" when NEITHER --version NOR an existing
1679
+ // pin names one. Scoped narrowly by hasExplicitSource() (--from/--url/the env
1680
+ // equivalent all still behave exactly as before, unaffected), and a bare
1681
+ // `update` on an ALREADY-PINNED consumer never reaches this branch at all β€”
1682
+ // pin.version being set is one of the two things that turns it off, so
1683
+ // ADR-0128's existing rule (a plain `update` keeps the pin, never auto-
1684
+ // upgrades) is completely unchanged.
1685
+ //
1686
+ // On success this REPLACES opts.version with the resolved release id, so
1687
+ // every line below β€” resolveSource, the checksum verification, the pin write,
1688
+ // describeUpdateOutcome's no-op/real-update split β€” proceeds exactly as if
1689
+ // the user had passed `--version <that version>` explicitly. Nothing
1690
+ // downstream needs to know "latest" was ever involved.
1691
+ let latestManifest = null;
1692
+ if (needsLatestResolution(opts, pin)) {
1693
+ const manifestSource = resolveLatestManifestSource(opts, pin);
1694
+ if (!manifestSource) {
1695
+ die(
1696
+ 'no engine version to install, and the configured channel (GitHub Releases) has no ' +
1697
+ '"latest" lookup yet (that is a later, separate change). Pass --version <v>, or run in ' +
1698
+ 'a consumer whose .claude/engine.pin.json records one, or point at a tarball with ' +
1699
+ '--from / --url, or drop --channel github-releases / --repo to use the studio ' +
1700
+ "channel's latest release."
1701
+ );
1702
+ }
1703
+ latestManifest = await fetchLatestManifest(manifestSource, consumerRoot);
1704
+ info(` resolved latest release: ${latestManifest.version}`);
1705
+ opts = { ...opts, version: latestManifest.version };
1706
+ }
1707
+
1416
1708
  const source = resolveSource(opts, pin);
1417
1709
  // Where to look for .env / .env.local when the bearer is not exported (ADR-0184,
1418
1710
  // FF-265). Stamped here rather than threaded through resolveSource's five return
@@ -1435,21 +1727,34 @@ async function materialise(opts) {
1435
1727
  // `update` β€” where the versions match and this verifies.
1436
1728
  const actual = sha256(tarball);
1437
1729
  const pinDescribesTarget = !opts.version || !pin.version || opts.version === pin.version;
1438
- const expected = pinDescribesTarget ? (pin.checksum || '').replace(/^sha256:/, '') : '';
1730
+ // CHG-319/ADR-0453: a latest-RESOLVED install verifies against the MANIFEST's
1731
+ // own checksum, never the pin's. The pin has no version/checksum to compare
1732
+ // in this branch by construction β€” that absence is exactly what triggered the
1733
+ // latest lookup above β€” so pinDescribesTarget's fallback-to-pin logic would
1734
+ // otherwise silently verify nothing. The manifest is the one source that
1735
+ // actually describes the version just downloaded, "the same way it already
1736
+ // verifies a specific-version install" (CHG-319's own scope).
1737
+ const expected = latestManifest
1738
+ ? (latestManifest.checksum || '').replace(/^sha256:/, '')
1739
+ : pinDescribesTarget
1740
+ ? (pin.checksum || '').replace(/^sha256:/, '')
1741
+ : '';
1439
1742
  if (expected) {
1440
1743
  if (actual !== expected) {
1441
1744
  die(
1442
1745
  `checksum mismatch β€” expected sha256:${expected}, got sha256:${actual}. ` +
1443
- `The tarball does not match the pinned checksum. Refusing to install.`
1746
+ `The tarball does not match the ${latestManifest ? "latest-release manifest's" : 'pinned'} checksum. Refusing to install.`
1444
1747
  );
1445
1748
  }
1446
1749
  info(`βœ… checksum verified (sha256:${actual.slice(0, 12)}…)`);
1447
1750
  } else if (opts.requireChecksum) {
1448
1751
  die(
1449
- pinDescribesTarget
1450
- ? 'no checksum recorded in .claude/engine.pin.json and --require-checksum was given.'
1451
- : `--require-checksum was given but the pin's checksum describes version ${pin.version}, ` +
1452
- `not the requested ${opts.version}. Update the pin (version + checksum) and re-run.`
1752
+ latestManifest
1753
+ ? 'no checksum recorded in the latest-release manifest and --require-checksum was given.'
1754
+ : pinDescribesTarget
1755
+ ? 'no checksum recorded in .claude/engine.pin.json and --require-checksum was given.'
1756
+ : `--require-checksum was given but the pin's checksum describes version ${pin.version}, ` +
1757
+ `not the requested ${opts.version}. Update the pin (version + checksum) and re-run.`
1453
1758
  );
1454
1759
  } else {
1455
1760
  // The remedy half of this line must describe what THIS RUN does, not a
@@ -1483,9 +1788,11 @@ async function materialise(opts) {
1483
1788
  // no pin, so there the instruction is the only thing that resolves it.
1484
1789
  info(
1485
1790
  `⚠️ checksum not verified β€” ${
1486
- pinDescribesTarget
1487
- ? 'no checksum recorded in the pin file'
1488
- : `the pin's checksum describes version ${pin.version}, not ${opts.version}`
1791
+ latestManifest
1792
+ ? 'the latest-release manifest has no checksum field'
1793
+ : pinDescribesTarget
1794
+ ? 'no checksum recorded in the pin file'
1795
+ : `the pin's checksum describes version ${pin.version}, not ${opts.version}`
1489
1796
  }. Computed sha256:${actual.slice(0, 12)}… β€” on success this run records it ` +
1490
1797
  `in .claude/engine.pin.json.`
1491
1798
  );
@@ -1559,7 +1866,7 @@ async function materialise(opts) {
1559
1866
  // maintainer chose is honoured verbatim.
1560
1867
  // A label the maintainer chose THIS RUN wins; a label INHERITED from the prior
1561
1868
  // pin must not (ADR-0124). Folding both into one fallback let a stale label beat
1562
- // the derivation: on the first init support-ops recorded 'github-releases', and
1869
+ // the derivation: on the first init consumer-a recorded 'github-releases', and
1563
1870
  // the later `update --channel https://…studio/api/engine` kept that label while
1564
1871
  // writing the studio channelUrl beside it. Behaviour stayed correct (channelUrl
1565
1872
  // takes precedence when resolving), so nothing failed β€” the pin simply answered
@@ -1609,7 +1916,7 @@ async function materialise(opts) {
1609
1916
  // channel, which is the recommended one and what every vendored consumer uses,
1610
1917
  // it is never read at all. It is also the single field in this TRACKED file that
1611
1918
  // names the PRIVATE framework repo, in consumers that may be shared outside the
1612
- // team (`support-ops` is documented as exactly that). Dropping the default costs
1919
+ // team (`consumer-a` is documented as exactly that). Dropping the default costs
1613
1920
  // nothing: the read site is `opts.repo || pin.repo || DEFAULT_REPO`, so a
1614
1921
  // fallback-channel install still resolves it. An explicitly-supplied `--repo`, or
1615
1922
  // a non-default value already in the pin, is still carried forward β€” the same
@@ -1714,7 +2021,7 @@ function requiredNextSteps({ consumerRoot, wiring, command }) {
1714
2021
  "session's `NO MCP` is indistinguishable from a broken config (ADR-0066)"
1715
2022
  );
1716
2023
  }
1717
- // CHG-236 (Jose, 2026-09-23): "a guided walkthrough on npx update, not a
2024
+ // CHG-236 (the owner, 2026-09-23): "a guided walkthrough on npx update, not a
1718
2025
  // text report" β€” this CLI has no LLM to walk anyone through anything, so
1719
2026
  // the walkthrough itself is `/guide-sync`, run inside the restarted
1720
2027
  // session above. This is the one line pointing there; `update` only, since
@@ -1771,7 +2078,12 @@ module.exports = {
1771
2078
  tarExtractInvocation,
1772
2079
  ASSET,
1773
2080
  LEGACY_ASSET,
2081
+ LATEST_MANIFEST_ASSET,
1774
2082
  resolveSource,
2083
+ hasExplicitSource,
2084
+ needsLatestResolution,
2085
+ resolveLatestManifestSource,
2086
+ STUDIO_ORIGIN,
1775
2087
  DEFAULT_CHANNEL_URL,
1776
2088
  GITHUB_CHANNEL_LABEL,
1777
2089
  channelBase,
@@ -1797,4 +2109,12 @@ module.exports = {
1797
2109
  isLockError,
1798
2110
  lockHolderGuidance,
1799
2111
  installStagedEngine,
2112
+ withLockRetry,
2113
+ sleepSync,
2114
+ scanWindowsLockCandidates,
2115
+ windowsCandidateMessage,
2116
+ WINDOWS_LOCK_CANDIDATE_PROCESSES,
2117
+ ENGINE_LOCK_EXIT_CODE,
2118
+ LOCK_RETRY_ATTEMPTS,
2119
+ LOCK_RETRY_DELAY_MS,
1800
2120
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindexed/cfact",
3
- "version": "1.1.7",
3
+ "version": "1.1.11",
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
  },
@@ -33,10 +37,12 @@
33
37
  "gate:document-freshness": "node scripts/check-document-freshness.js",
34
38
  "gate:registry": "node scripts/check-registry.js",
35
39
  "gate:rule-records": "node scripts/check-rule-records.js",
40
+ "gate:integrations": "node scripts/check-integrations.js",
36
41
  "audit:record-text": "node scripts/check-record-text.js",
37
42
  "gate:graph-coverage": "node scripts/check-graph-coverage.js",
38
43
  "gate:adr-template-edges": "node scripts/check-adr-template-edges.js",
39
44
  "gate:installer-publish-drift": "node scripts/check-installer-publish-drift.js",
45
+ "gate:private-names": "node scripts/check-private-names.js --cannot-evaluate-ok",
40
46
  "gate:changelog": "node scripts/generate-changelog.js --check",
41
47
  "test:dc-generator": "node scripts/generate-dependency-cruiser-config.js --self-test",
42
48
  "test:substance-generator": "node scripts/generate-substance-eslint-config.js --self-test",
@@ -52,9 +58,19 @@
52
58
  "test:parse-ast": "node skills/ast-parser/scripts/test-parse-ast.js",
53
59
  "test:git-tree-sweep": "node scripts/test-git-tree-sweep.js",
54
60
  "test:secrets-two-stage": "node scripts/test-secrets-two-stage.js",
61
+ "test:harmful-code": "node scripts/test-harmful-code-check.js",
55
62
  "test:migration-grants-check": "node scripts/test-migration-grants-check.js",
56
63
  "test:profile-paths": "node scripts/verify-profiles.js",
57
64
  "test:registry-gate": "node scripts/test-registry-gate.js",
65
+ "test:capability-schema": "node scripts/test-capability-schema.js",
66
+ "test:integrations-registry": "node scripts/test-integrations-registry.js",
67
+ "test:claim-schema": "node scripts/test-claim-schema.js",
68
+ "test:engine-health": "node scripts/test-engine-health.js",
69
+ "test:session-binding-schema": "node scripts/test-session-binding-schema.js",
70
+ "test:budget-schema": "node scripts/test-budget-schema.js",
71
+ "test:runner-launch-schema": "node scripts/test-runner-launch-schema.js",
72
+ "test:approval-vocabulary": "node scripts/test-approval-vocabulary.js",
73
+ "test:human-only-verbs": "node scripts/test-human-only-verbs.js",
58
74
  "test:rule-resolver": "node scripts/test-rule-resolver.js",
59
75
  "test:adr-template-edges": "node scripts/test-adr-template-edges.js",
60
76
  "test:adr-path-constants": "node scripts/test-adr-path-constants.js",
@@ -71,30 +87,61 @@
71
87
  "test:zone-coverage": "node scripts/test-zone-coverage.js",
72
88
  "test:workflow-spine": "node scripts/test-workflow-spine.js",
73
89
  "test:architecture-size-gate": "node scripts/test-architecture-size-gate.js",
90
+ "test:size-gate-attribution": "node scripts/test-size-gate-attribution.js",
74
91
  "test:command-shape": "node scripts/test-command-shape.js",
75
92
  "test:change-record": "node scripts/test-change-record.js",
76
93
  "test:artifact-timestamps": "node scripts/test-artifact-timestamps.js",
94
+ "test:regen-writes-nothing": "node scripts/test-regen-writes-nothing.js",
95
+ "test:map-fingerprint": "node scripts/test-map-fingerprint.js",
77
96
  "test:engine-write-lock": "node scripts/test-engine-write-lock.js",
97
+ "test:engine-lock-wiring": "node scripts/test-engine-lock-wiring.js",
78
98
  "test:installer-publish-drift": "node scripts/test-installer-publish-drift.js",
79
99
  "test:grants-authored": "node scripts/test-grants-authored.js",
80
100
  "test:test-capability": "node scripts/test-test-capability.js",
81
101
  "test:installer-lifecycle": "node scripts/test-installer-lifecycle.js",
82
102
  "test:installer-shadowing": "node scripts/test-installer-shadowing.js",
103
+ "test:installer-latest": "node scripts/test-installer-latest.js",
104
+ "test:outside-consumer-mcp-gate": "node scripts/test-outside-consumer-mcp-gate.js",
105
+ "test:relay-fallback": "node scripts/test-relay-fallback.js",
83
106
  "test:feature-record": "node scripts/test-feature-record.js",
84
107
  "test:feature-store": "node scripts/test-feature-store.js",
85
108
  "test:feature-record-v2": "node scripts/test-feature-record-v2.js",
109
+ "test:feature-initial": "node scripts/test-feature-initial.js",
86
110
  "test:feature-v2-switch": "node scripts/test-feature-v2-switch.js",
87
111
  "test:feature-completeness": "node scripts/test-feature-completeness.js",
112
+ "test:experience-context": "node scripts/test-experience-context.js",
113
+ "test:feature-scope-merge": "node scripts/test-feature-scope-merge.js",
114
+ "test:feature-mint-contract": "node scripts/test-feature-mint-contract.js",
115
+ "test:org-manifest": "node scripts/test-org-manifest.js",
116
+ "test:org-manifest-denies": "node scripts/test-org-manifest-denies.js",
117
+ "test:intake-seed": "node scripts/test-intake-seed.js",
118
+ "test:intake-seed-prefill": "node scripts/test-intake-seed-prefill.js",
119
+ "test:design-brief-from-seed": "node scripts/test-design-brief-from-seed.js",
120
+ "test:design-brief-regeneration": "node scripts/test-design-brief-regeneration.js",
121
+ "test:audit-sot-brand-source": "node scripts/test-audit-sot-brand-source.js",
122
+ "test:audit-sot-surfaces": "node scripts/test-audit-sot-surfaces.js",
123
+ "test:audit-sot-tenancy-model": "node scripts/test-audit-sot-tenancy-model.js",
124
+ "test:screen-binding": "node scripts/test-screen-binding.js",
125
+ "test:flow-step-action": "node scripts/test-flow-step-action.js",
88
126
  "test:feature-history": "node scripts/test-feature-history.js",
89
127
  "test:feature-rekey": "node scripts/test-feature-rekey.js",
90
128
  "test:agent-note-dispatch": "node scripts/test-agent-note-dispatch.js",
129
+ "test:subagent-reply-guard": "node scripts/test-subagent-reply-guard.js",
130
+ "test:migrations-block": "node scripts/test-migrations-block.js",
131
+ "test:stage-loop-next-action": "node scripts/test-stage-loop-next-action.js",
132
+ "test:transition-phase-flags": "node scripts/test-transition-phase-flags.js",
133
+ "test:workflow-flag-allowlist": "node scripts/test-workflow-flag-allowlist.js",
91
134
  "test:check-record-text": "node scripts/test-check-record-text.js",
92
135
  "test:feature-write-guard": "node scripts/test-feature-write-guard.js",
93
136
  "test:trailer-lib": "node scripts/test-trailer-lib.js",
94
137
  "test:feature-write-lock": "node scripts/test-feature-write-lock.js",
138
+ "test:ci-parity": "node scripts/test-ci-parity.js",
95
139
  "test:generate-ci": "node scripts/test-generate-ci.js",
140
+ "test:verification-targets": "node scripts/test-verification-targets.js",
141
+ "test:generate-capability-map": "node scripts/test-generate-capability-map.js",
142
+ "test:capability-catalogue-gate": "node scripts/test-capability-catalogue-gate.js",
96
143
  "publish:release": "node maintainer-hooks/publish-release.js",
97
- "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",
144
+ "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:integrations && npm run gate:graph-coverage && npm run gate:adr-template-edges && npm run gate:installer-publish-drift && npm run gate:private-names",
98
145
  "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",
99
146
  "ci": "npm run gate:consistency && npm run gate:boundaries && npm run gate:profile-coverage && npm run gate:document-freshness && npm test",
100
147
  "test:gate-three-state": "node scripts/test-gate-three-state.js",
@@ -106,6 +153,7 @@
106
153
  "test:rules-carrier-schema": "node scripts/test-rules-carrier-schema.js",
107
154
  "test:rule-record-schema": "node scripts/test-rule-record-schema.js",
108
155
  "test:rule-record-concerns-check": "node scripts/test-rule-record-concerns-check.js",
156
+ "test:rule-record-core-check": "node scripts/test-rule-record-core-check.js",
109
157
  "test:external-standard-drift": "node scripts/test-external-standard-drift.js",
110
158
  "test:session-branch": "node scripts/test-session-branch.js",
111
159
  "test:consumer-docs-migration": "node scripts/test-consumer-docs-migration.js",
@@ -117,15 +165,19 @@
117
165
  "test:list-feature-files": "node scripts/test-list-feature-files.js",
118
166
  "test:generate-project-analysis": "node scripts/test-generate-project-analysis.js",
119
167
  "test:generate-feature-card": "node scripts/test-generate-feature-card.js",
168
+ "test:zone-view": "node scripts/test-zone-view.js",
120
169
  "test:generate-codex-agents": "node scripts/test-generate-codex-agents.js",
121
170
  "test:context-subject": "node scripts/test-context-subject.js",
122
171
  "test:design-levels": "node scripts/test-design-levels.js",
123
172
  "test:pre-push-unit-ref": "node scripts/test-pre-push-unit-ref.js",
173
+ "test:pre-push-gate-reach": "node scripts/test-pre-push-gate-reach.js",
174
+ "test:git-identity-check": "node scripts/test-git-identity-check.js",
175
+ "test:mcp-server-name-constant": "node scripts/test-mcp-server-name-constant.js",
124
176
  "test:design-audit": "node scripts/test-design-audit.js",
125
177
  "test:grants-definer-declaration": "node scripts/test-grants-definer-declaration.js",
126
178
  "test:default-ship-pipeline": "node scripts/test-default-ship-pipeline.js",
127
179
  "test:credential-slots": "node scripts/test-credential-slots.js",
128
- "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: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: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: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:design-audit && npm run test:grants-definer-declaration && npm run test:default-ship-pipeline && npm run test:credential-slots",
180
+ "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:harmful-code && npm run test:migration-grants-check && npm run test:profile-paths && npm run test:registry-gate && npm run test:capability-schema && npm run test:integrations-registry && npm run test:claim-schema && npm run test:session-binding-schema && npm run test:budget-schema && npm run test:engine-health && npm run test:runner-launch-schema && npm run test:approval-vocabulary && npm run test:human-only-verbs && 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:size-gate-attribution && 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:outside-consumer-mcp-gate && npm run test:relay-fallback && 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:rule-record-core-check && npm run test:external-standard-drift && npm run test:session-branch && npm run test:installer-shadowing && npm run test:installer-latest && npm run test:feature-record && npm run test:feature-store && npm run test:feature-record-v2 && npm run test:feature-initial && npm run test:feature-v2-switch && npm run test:feature-completeness && npm run test:experience-context && npm run test:feature-scope-merge && npm run test:feature-mint-contract && npm run test:org-manifest && npm run test:org-manifest-denies && npm run test:intake-seed && npm run test:intake-seed-prefill && npm run test:design-brief-from-seed && npm run test:design-brief-regeneration && npm run test:audit-sot-brand-source && npm run test:audit-sot-surfaces && npm run test:audit-sot-tenancy-model && npm run test:screen-binding && npm run test:flow-step-action && npm run test:feature-history && npm run test:feature-rekey && npm run test:agent-note-dispatch && npm run test:subagent-reply-guard && npm run test:migrations-block && npm run test:stage-loop-next-action && npm run test:transition-phase-flags && npm run test:workflow-flag-allowlist && 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:verification-targets && npm run test:known-frictions-staleness && npm run test:artifact-timestamps && npm run test:regen-writes-nothing && npm run test:map-fingerprint && 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:zone-view && npm run test:generate-codex-agents && npm run test:generate-agent-cards && npm run test:generate-capability-map && npm run test:capability-catalogue-gate && 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:git-identity-check && npm run test:mcp-server-name-constant && 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 && npm run test:migrate-feature-records && npm run test:depends-on-enforcement && npm run test:integration-adapters && npm run test:sync-env-registry && npm run test:design-audit-gate && npm run test:candidate-flows && npm run test:mcp-auth-probe && npm run test:design-motion-audit && npm run test:design-screens && npm run test:feature-source-notes && npm run test:code-review-log-schema && npm run test:note-alignment && npm run test:design-motion-inputs && npm run test:requirement-promotion && npm run test:programme-note-admission && npm run test:ux-baseline && npm run test:note-promotion-gate && npm run test:proposal-acceptance-mint && npm run test:maintainer-screen-judge && npm run test:ux-qa-review-gate",
129
181
  "test:test-command-gate": "node scripts/test-test-command-gate.js",
130
182
  "test:changelog-adr-refs": "node scripts/test-changelog-adr-refs.js",
131
183
  "test:known-frictions-staleness": "node scripts/test-known-frictions-staleness.js",
@@ -140,9 +192,35 @@
140
192
  "test:contract-claims": "node scripts/test-contract-claims.js",
141
193
  "test:plan-crosscheck": "node scripts/test-plan-crosscheck.js",
142
194
  "test:consumer-alignment": "node scripts/test-consumer-alignment.js",
143
- "test:check-consumer-alignment": "node scripts/test-check-consumer-alignment.js"
195
+ "test:check-consumer-alignment": "node scripts/test-check-consumer-alignment.js",
196
+ "test:licence-holder": "node scripts/test-licence-holder.js",
197
+ "test:engine-promotion-rungs-workflow": "node scripts/test-engine-promotion-rungs-workflow.js",
198
+ "test:engine-release-workflows": "node scripts/test-engine-release-workflows.js",
199
+ "test:split-acceptance": "node scripts/test-split-acceptance.js",
200
+ "test:private-names": "node scripts/test-private-names.js",
201
+ "test:migrate-feature-records": "node scripts/test-migrate-feature-records.js",
202
+ "test:depends-on-enforcement": "node scripts/test-depends-on-enforcement.js",
203
+ "test:integration-adapters": "node scripts/test-integration-adapters.js",
204
+ "test:sync-env-registry": "node scripts/test-sync-env-registry.js",
205
+ "test:design-audit-gate": "node scripts/test-design-audit-gate.js",
206
+ "test:candidate-flows": "node scripts/test-candidate-flows.js",
207
+ "test:mcp-auth-probe": "node scripts/test-mcp-auth-probe.js",
208
+ "test:design-motion-audit": "node scripts/test-design-motion-audit.js",
209
+ "test:design-screens": "node scripts/test-design-screens.js",
210
+ "test:feature-source-notes": "node scripts/test-feature-source-notes.js",
211
+ "test:code-review-log-schema": "node scripts/test-code-review-log-schema.js",
212
+ "test:note-alignment": "node scripts/test-note-alignment.js",
213
+ "test:design-motion-inputs": "node scripts/test-design-motion-inputs.js",
214
+ "test:requirement-promotion": "node scripts/test-requirement-promotion.js",
215
+ "test:programme-note-admission": "node scripts/test-programme-note-admission.js",
216
+ "test:ux-baseline": "node scripts/test-ux-baseline.js",
217
+ "test:note-promotion-gate": "node scripts/test-note-promotion-gate.js",
218
+ "test:proposal-acceptance-mint": "node scripts/test-proposal-acceptance-mint.js",
219
+ "test:maintainer-screen-judge": "node scripts/test-maintainer-screen-judge.js",
220
+ "test:ux-qa-review-gate": "node scripts/test-ux-qa-review-gate.js",
221
+ "acceptance:split": "node scripts/split-acceptance.js"
144
222
  },
145
223
  "keywords": [],
146
- "author": "",
224
+ "author": "Jose Brenes",
147
225
  "license": "MIT"
148
226
  }