@yeison.restrepo.r/code-conductor 1.52.1 → 1.52.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/package.json +1 -1
- package/scripts/adopt-claude-md.mjs +11 -1
- package/scripts/orchestrate.mjs +21 -3
package/README.md
CHANGED
|
@@ -483,7 +483,7 @@ The backup and temp rules keep the installer's own backups and crash-stranded te
|
|
|
483
483
|
| `systemMessage` | `default` | yes, for example Guard 2's overwrite prompt | no: the warning is lost |
|
|
484
484
|
- Agent definitions provided by plugins are not searched.
|
|
485
485
|
- `resume` (`[FEAT-055]`) needs approvals that recorded their commit: a run approved before it is refused `ORCH_RESUME_UNANCHORED` and still needs `end`, then `start`, and a Build task entry without a stored SNAP is redone.
|
|
486
|
-
- Unattended mode (`[FEAT-054]`) binds the agents, not the orchestrator session: the run file is inside the orchestrator's write surface, so a hand edit could set `unattended` just as it could forge an approval, and Guard 6 does not stop it. Its deterministic plan check covers only the orchestrator write surface and the control-plane files (`[BUG-080]`); every other judgement is the delegated reviewer's.
|
|
486
|
+
- Unattended mode (`[FEAT-054]`) binds the agents, not the orchestrator session: the run file is inside the orchestrator's write surface, so a hand edit could set `unattended` just as it could forge an approval, and Guard 6 does not stop it. Its deterministic plan check covers only the orchestrator write surface, any `Files` entry outside printable ASCII (`[BUG-086]`) and the control-plane files, including those that run code outside the run and any `CLAUDE.md`, `CLAUDE.local.md` or npm manifest at any depth (`[BUG-080]`, `[BUG-081]`, `[BUG-082]`); every other judgement is the delegated reviewer's.
|
|
487
487
|
|
|
488
488
|
The five role agent definitions it dispatches ship from `1.37.0`; their limits are the next item.
|
|
489
489
|
- **The role agents (`1.37.0`) are bounded by their tool masks, and Guard 7 bounds one thing beneath them: the shell.**
|
|
@@ -505,8 +505,8 @@ The backup and temp rules keep the installer's own backups and crash-stranded te
|
|
|
505
505
|
- **`[BUG-077]`, open:** `scripts/orchestrate.mjs` lets `approve spec <path> <sha256>` accept any file path relative to the run root, without checking that it is the spec the `spec` role handed back or that it sits under the run's `docs.specs` folder, so approving the wrong path makes the post-approval hash check in `install` protect that file while later edits to the real spec go undetected. Until it is fixed, confirm that the path you approve is the spec the `spec` role handed back, under the run's recorded specs folder.
|
|
506
506
|
- **`[BUG-078]`, open:** `scripts/orchestrate.mjs` builds a fix round's write scope with the approved plan included, so Guard 5 lets the fix-round `code` agent write to the plan and only the brief's instruction stops it; any change other than checkbox ticks still halts the run with `ORCH_APPROVED_DOC_CHANGED` on the next `install audit` or fix round, and ticks do not affect `tasks.done`. Until it is fixed, check after a fix round that the approved plan's checkboxes are unchanged.
|
|
507
507
|
- **`[BUG-079]`, open:** `scripts/orchestrate.mjs` stores every non-security hand-back's full SNAP in `.claude/memory/orchestrator-run.json` with a 64 KiB cap per SNAP but no cap on the total, so a plan of roughly 80 or more tasks with maximally sized hand-backs can push the run file past the hook's 10 MiB read cap, after which `readRunFile` returns null and Guard 6 downgrades from deny to warn for the rest of the run. Until it is fixed, keep orchestrated plans well under 80 tasks, or split a larger item into several runs.
|
|
508
|
-
- **`[BUG-
|
|
509
|
-
- **`[BUG-
|
|
508
|
+
- **`[BUG-083]`, open:** the `publish` job in `.github/workflows/publish.yml` avoids an npm cache only by omitting `cache:` from `actions/setup-node`, which v5+ overrides when `package.json` declares a `packageManager` (or `devEngines.packageManager`) field; no such field exists today, so there is no current impact, but adding one would let the job holding `id-token: write` restore a cache the `verify` job populated. Until it is fixed, do not add a `packageManager` or `devEngines.packageManager` field to `package.json`, or set `package-manager-cache: false` on the `publish` job's `setup-node` step in a fork.
|
|
509
|
+
- **`[BUG-085]`, open:** the unattended plan check's `CONTROL_PLANE` list in `scripts/orchestrate.mjs` does not yet cover config-read hook runners, editor and container auto-run configuration, other package managers' files or other CI systems, so in an `--unattended` run a plan approved only by the delegated review can write files that run code outside the run. Until it is fixed, check an `--unattended` run's diff for changes to such files before committing, opening the project in an editor or container, installing dependencies or pushing.
|
|
510
510
|
- **The `P7` false positive** described under [Guard 3, and what it learned](#guard-3-and-what-it-learned) is still live.
|
|
511
511
|
- **A re-run against an untouched `project.md` prints a recovery hint it cannot prove is needed.** If you install, never write anything into `.claude/memory/project.md`, and install again, you get a line suggesting the file may have been overwritten by a pre-`1.30.0` re-run. It was not; it equals the stub because it was seeded and never edited. The check compares content and **cannot distinguish "seeded and untouched" from "clobbered"**, which is why the wording is hedged to "may have been" rather than "was". This residual is named and accepted in [`BUG-039`'s spec at `:129`](docs/superpowers/specs/2026-09-27-bug039-installer-host-owned-state-design.md), where the alternative (restoring from the host's own git history) was rejected as writing host files out of the host's history with new failure modes. A **fresh** install is silent, which the Quickstart shows.
|
|
512
512
|
- **Three open dossiers**, which are the evidence-collection pipeline working rather than a backlog: a session denial tally, one for interleaved-artifact reports, and an intermittent commit-hook hang in the `snap-build` suite. A dossier holds specimens until a mechanism is characterized by probe; an id is minted only when the written condition is met. `[BUG-047]` is what that pipeline produces when it completes: an out-of-scope note, then a dossier, then four specimens across four sessions, then a mint, then a release.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yeison.restrepo.r/code-conductor",
|
|
3
|
-
"version": "1.52.
|
|
3
|
+
"version": "1.52.3",
|
|
4
4
|
"description": "A governance layer for Claude Code sessions: hooks that check an agent's commands before they run, a spec-first workflow, and project memory the next session reads.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agentic-development",
|
|
@@ -220,7 +220,17 @@ function main([command, file, planFile, token]) {
|
|
|
220
220
|
throw new AdoptError('usage: adopt-claude-md.mjs sections|render|apply <file> [plan.json] [token]');
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
-
|
|
223
|
+
// Node's ESM loader sets import.meta.url to the module's realpath, so argv[1] must be
|
|
224
|
+
// realpath-resolved too, or a launch through a symlinked directory skips the main block.
|
|
225
|
+
function invokedDirectly() {
|
|
226
|
+
const argv1 = process.argv[1];
|
|
227
|
+
if (!argv1) return false;
|
|
228
|
+
let resolved;
|
|
229
|
+
try { resolved = fs.realpathSync(argv1); } catch { resolved = argv1; }
|
|
230
|
+
return import.meta.url === pathToFileURL(resolved).href;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
if (invokedDirectly()) {
|
|
224
234
|
try { main(process.argv.slice(2)); } catch (err) {
|
|
225
235
|
if (!(err instanceof AdoptError)) throw err;
|
|
226
236
|
console.error(`ERROR: ${err.message}`);
|
package/scripts/orchestrate.mjs
CHANGED
|
@@ -22,6 +22,8 @@ export const ENVELOPE_FILE = '.claude/memory/band-envelope.json';
|
|
|
22
22
|
export const WRITE_SURFACE = [RUN_FILE, ENVELOPE_FILE, '.claude/memory/session-snapshot.json', '.conductor/**'];
|
|
23
23
|
// Owner decision (BUG-080): the files that enforce the guards or steer later dispatches, in both mirrors. Same notation
|
|
24
24
|
// as WRITE_SURFACE; a trailing `/**` protects the whole directory, so a file added to it is covered too.
|
|
25
|
+
// Owner decision (BUG-081): also the files that run code outside the run, after it ends.
|
|
26
|
+
// Owner decision (BUG-082): a CLAUDE.md or an npm manifest also reaches it at any depth, by its last segment (CONTROL_PLANE_NAMES).
|
|
25
27
|
export const CONTROL_PLANE = [
|
|
26
28
|
'.claude/hooks/**', 'project-template/.claude/hooks/**',
|
|
27
29
|
'.opencode/plugin/**', 'project-template/.opencode/plugin/**',
|
|
@@ -35,7 +37,13 @@ export const CONTROL_PLANE = [
|
|
|
35
37
|
// The router, the three modules it imports at load time, and the scan; the installer deploys them to .claude/scripts/.
|
|
36
38
|
'scripts/orchestrate.mjs', 'scripts/snap-contract.mjs', 'scripts/ticket.mjs', 'scripts/doc-locations.mjs', 'scripts/security-scan.mjs',
|
|
37
39
|
'.claude/scripts/**',
|
|
40
|
+
// BUG-081: these run code after the run ends (git, MCP and OpenCode servers, the status line, CI, npm).
|
|
41
|
+
'.git/**', '.husky/**', '.githooks/**', '.mcp.json', 'opencode.json', 'opencode.jsonc',
|
|
42
|
+
'.claude/flow-status.mjs', 'project-template/.claude/flow-status.mjs',
|
|
43
|
+
'.github/workflows/**', '.github/actions/**',
|
|
44
|
+
'package.json', 'package-lock.json', 'npm-shrinkwrap.json', '.npmrc',
|
|
38
45
|
];
|
|
46
|
+
export const CONTROL_PLANE_NAMES = ['claude.md', 'claude.local.md', 'package.json', 'package-lock.json', 'npm-shrinkwrap.json', '.npmrc'];
|
|
39
47
|
// Where /cc-orchestrate writes each agent's final message for `handback` to read: inside
|
|
40
48
|
// the surface, and cleared with the run so file names never collide across runs.
|
|
41
49
|
export const HANDBACK_DIR = '.conductor/handback';
|
|
@@ -1071,12 +1079,22 @@ function reachesList(glob, list) {
|
|
|
1071
1079
|
const taskGlob = (entry) => entry.replace(/^\.\//, '').toLowerCase();
|
|
1072
1080
|
// NTFS aliases one file under other spellings: a data stream, an 8.3 short name, a trailing dot or space.
|
|
1073
1081
|
const ntfsAlias = (glob) => glob.split('/').some((seg) => /[:~]|[. ]$/.test(seg));
|
|
1082
|
+
// Outside printable ASCII, no lexical test can tell which file a filesystem or tool resolves; tested before taskGlob
|
|
1083
|
+
// folds case, because toLowerCase maps some of these characters to ASCII (U+212A KELVIN SIGN to `k`).
|
|
1084
|
+
const nonAscii = (entry) => /[^\x20-\x7e]/.test(entry);
|
|
1074
1085
|
function inSurface(entry) {
|
|
1075
1086
|
const glob = taskGlob(entry);
|
|
1076
|
-
return ntfsAlias(glob) || reachesList(glob, WRITE_SURFACE);
|
|
1087
|
+
return nonAscii(entry) || ntfsAlias(glob) || reachesList(glob, WRITE_SURFACE);
|
|
1077
1088
|
}
|
|
1078
|
-
//
|
|
1079
|
-
|
|
1089
|
+
// A path the glob matches ends in a segment its last segment matches, except that a `**` there can span a `/`;
|
|
1090
|
+
// then only the text after the last `**` has to match the end of the file name (BUG-082).
|
|
1091
|
+
function namesControlFile(glob) {
|
|
1092
|
+
const last = glob.slice(glob.lastIndexOf('/') + 1);
|
|
1093
|
+
const tail = last.includes('**') ? `**${last.slice(last.lastIndexOf('**') + 2)}` : last;
|
|
1094
|
+
return CONTROL_PLANE_NAMES.some((name) => globToRegExp(tail).test(name));
|
|
1095
|
+
}
|
|
1096
|
+
// No alias or non-ASCII test: surfaceTask runs inSurface first, and it escalates every alias and every non-ASCII entry.
|
|
1097
|
+
const inControlPlane = (entry) => reachesList(taskGlob(entry), CONTROL_PLANE) || namesControlFile(taskGlob(entry));
|
|
1080
1098
|
|
|
1081
1099
|
// Owner decisions (FEAT-054, BUG-080): a plan whose task would write the run's own record, or the files that enforce
|
|
1082
1100
|
// the guards and steer later dispatches, never passes on a delegated verdict. The write surface keeps its reason first.
|