@mmerterden/multi-agent-pipeline 20.40.0 → 20.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +94 -0
- package/README.md +5 -2
- package/README.tr.md +5 -2
- package/docs/adr/0019-product-tree.md +143 -0
- package/docs/adr/README.md +1 -0
- package/docs/ecosystem.md +51 -14
- package/docs/facts.json +7 -7
- package/docs/features.md +15 -4
- package/install/claude.mjs +45 -3
- package/install/templates/claude-hooks.json +23 -1
- package/manifest.json +146 -107
- package/package.json +3 -2
- package/pipeline/commands/multi-agent/autopilot/SKILL.md +11 -0
- package/pipeline/commands/multi-agent/review-analysis/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/setup/SKILL.md +1 -1
- package/pipeline/contract/types/index.d.ts +53 -49
- package/pipeline/lib/args.mjs +131 -4
- package/pipeline/lib/bg-launch.mjs +5 -2
- package/pipeline/lib/context-budget.mjs +5 -42
- package/pipeline/lib/credential-store.sh +11 -1
- package/pipeline/lib/hook-once.mjs +134 -0
- package/pipeline/lib/hook-registration.mjs +5 -0
- package/pipeline/lib/isotonic.mjs +73 -0
- package/pipeline/lib/low-disk.mjs +153 -0
- package/pipeline/lib/mcp-schema-load.mjs +90 -0
- package/pipeline/lib/md2confluence-v3.py +19 -10
- package/pipeline/lib/model-dispatch.sh +26 -2
- package/pipeline/lib/normalize-text.mjs +135 -0
- package/pipeline/lib/outbound-gate.mjs +21 -3
- package/pipeline/lib/plan-todos.sh +17 -4
- package/pipeline/lib/redact.mjs +12 -3
- package/pipeline/lib/risky-settings.mjs +198 -0
- package/pipeline/lib/route-state.sh +1 -0
- package/pipeline/lib/secret-patterns.generated.mjs +6 -2
- package/pipeline/lib/session-usage.mjs +232 -0
- package/pipeline/lib/source-digest.mjs +211 -0
- package/pipeline/lib/tdd-evidence.mjs +250 -17
- package/pipeline/lib/tiered-budget.mjs +87 -0
- package/pipeline/lib/untrusted-fence.mjs +132 -1
- package/pipeline/multi-agent-refs/analysis/locked.md +1 -1
- package/pipeline/multi-agent-refs/analysis/review.md +23 -1
- package/pipeline/multi-agent-refs/features/code-graph.md +11 -1
- package/pipeline/multi-agent-refs/features/cost-analysis.md +37 -2
- package/pipeline/multi-agent-refs/features/doctor.md +82 -4
- package/pipeline/multi-agent-refs/features/model-fallback.md +25 -0
- package/pipeline/multi-agent-refs/features/plan-todos.md +4 -0
- package/pipeline/multi-agent-refs/features/product-tree.md +68 -0
- package/pipeline/multi-agent-refs/features/unattended-gates.md +5 -3
- package/pipeline/multi-agent-refs/features/unattended-security.md +88 -1
- package/pipeline/multi-agent-refs/features/usage-reporting.md +33 -0
- package/pipeline/multi-agent-refs/help/en.md +2 -1
- package/pipeline/multi-agent-refs/help/tr.md +2 -1
- package/pipeline/multi-agent-refs/knowledge.md +58 -0
- package/pipeline/multi-agent-refs/outside-the-pipeline.md +6 -0
- package/pipeline/multi-agent-refs/phases/phase-0-init.md +4 -0
- package/pipeline/multi-agent-refs/phases/phase-1-plan.md +5 -1
- package/pipeline/multi-agent-refs/phases/phase-2-dev.md +4 -4
- package/pipeline/multi-agent-refs/phases/phase-3-review.md +2 -2
- package/pipeline/multi-agent-refs/phases/phase-5-report.md +4 -0
- package/pipeline/multi-agent-refs/progress-contract.md +3 -1
- package/pipeline/office/index.html +13 -7
- package/pipeline/office/toolkit.json +1 -1
- package/pipeline/preferences-template.json +1 -0
- package/pipeline/rules/outside-the-pipeline.md +1 -1
- package/pipeline/schemas/doctor-report.schema.json +47 -0
- package/pipeline/schemas/learnings-ledger.schema.json +35 -2
- package/pipeline/schemas/office-archive.schema.json +225 -128
- package/pipeline/schemas/plan-todos.schema.json +29 -1
- package/pipeline/schemas/prefs.schema.json +146 -0
- package/pipeline/schemas/product-tree-overlay.schema.json +57 -0
- package/pipeline/schemas/product-tree.schema.json +136 -0
- package/pipeline/schemas/route-config.schema.json +51 -0
- package/pipeline/schemas/secret-patterns.json +17 -1
- package/pipeline/schemas/toolkit-path-params.json +15 -1
- package/pipeline/scripts/_cost-advise.mjs +357 -0
- package/pipeline/scripts/_cost-budget.mjs +78 -0
- package/pipeline/scripts/_cost.mjs +29 -0
- package/pipeline/scripts/_decode_text.py +107 -0
- package/pipeline/scripts/_eval-stats.mjs +182 -0
- package/pipeline/scripts/_guard-probe.mjs +406 -0
- package/pipeline/scripts/_guard_rules.py +336 -1
- package/pipeline/scripts/_learnings-promotion.mjs +229 -0
- package/pipeline/scripts/_locate.mjs +539 -0
- package/pipeline/scripts/_memory-policy.mjs +208 -33
- package/pipeline/scripts/_product-tree-extract.mjs +761 -0
- package/pipeline/scripts/_product-tree.mjs +923 -0
- package/pipeline/scripts/_retrieval.mjs +161 -4
- package/pipeline/scripts/_secret-scan.mjs +6 -1
- package/pipeline/scripts/_stack-routing.mjs +2 -0
- package/pipeline/scripts/_test-gaming.mjs +346 -0
- package/pipeline/scripts/_user_guard_rules.py +744 -0
- package/pipeline/scripts/agent-guard.py +69 -6
- package/pipeline/scripts/agent-guard.sh +8 -1
- package/pipeline/scripts/argv-secret-scan.mjs +2 -1
- package/pipeline/scripts/autopilot-loop.mjs +407 -0
- package/pipeline/scripts/autopilot-runner.mjs +38 -25
- package/pipeline/scripts/capture-resume.sh +9 -1
- package/pipeline/scripts/cost-analyze.mjs +66 -4
- package/pipeline/scripts/cost-budget-check.mjs +5 -13
- package/pipeline/scripts/disk-cleaner.mjs +1418 -0
- package/pipeline/scripts/doctor.mjs +324 -43
- package/pipeline/scripts/evidence-gate.mjs +90 -0
- package/pipeline/scripts/gate-ledger.mjs +76 -21
- package/pipeline/scripts/gc-tmp.sh +5 -0
- package/pipeline/scripts/graph-query.mjs +257 -17
- package/pipeline/scripts/guard-probe-known-holes.json +3 -0
- package/pipeline/scripts/learnings-ledger.mjs +680 -55
- package/pipeline/scripts/note-agent-event.mjs +2 -0
- package/pipeline/scripts/note-mcp-failure.mjs +363 -0
- package/pipeline/scripts/note-mcp-failure.sh +19 -0
- package/pipeline/scripts/note-skill-use.mjs +96 -23
- package/pipeline/scripts/office-archive.mjs +23 -10
- package/pipeline/scripts/office-memory.mjs +4 -1
- package/pipeline/scripts/persona-walk-anchors.mjs +443 -0
- package/pipeline/scripts/pre-commit-check.sh +2 -2
- package/pipeline/scripts/pre-push-check.sh +8 -1
- package/pipeline/scripts/product-tree-eval.mjs +685 -0
- package/pipeline/scripts/product-tree.mjs +544 -0
- package/pipeline/scripts/publish-staged.mjs +324 -0
- package/pipeline/scripts/route-learn.mjs +628 -0
- package/pipeline/scripts/run-scope-guard.mjs +55 -1
- package/pipeline/scripts/scan-agent-config.sh +1 -1
- package/pipeline/scripts/statusline.mjs +309 -0
- package/pipeline/scripts/test-integrity-gate.mjs +97 -2
- package/pipeline/scripts/triage-memory.mjs +12 -4
- package/pipeline/scripts/uninstall.mjs +1 -0
- package/pipeline/skills/.skill-manifest.json +15 -7
- package/pipeline/skills/.skills-index.json +25 -3
- package/pipeline/skills/shared/README.md +6 -4
- package/pipeline/skills/shared/core/google-play-compliance/references/examples.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-review-analysis/SKILL.md +1 -1
- package/pipeline/skills/shared/external/backlog/SKILL.md +1 -1
- package/pipeline/skills/shared/external/disk-cleaner/SKILL.md +105 -0
- package/pipeline/skills/shared/external/disk-cleaner/evals/evals.json +62 -0
- package/pipeline/skills/shared/external/disk-cleaner/scripts/disk-cleaner.mjs +1418 -0
- package/pipeline/skills/shared/external/localization-reuse-map/SKILL.md +1 -1
- package/pipeline/skills/shared/external/spec-persona-walk/SKILL.md +118 -0
- package/pipeline/skills/shared/external/spec-persona-walk/evals/evals.json +50 -0
- package/pipeline/skills/shared/external/spec-persona-walk/scripts/persona-walk-anchors.mjs +443 -0
- package/pipeline/skills/shared/external/storekit/SKILL.md +1 -1
- package/pipeline/skills/shared/external/swiftdata/SKILL.md +1 -1
- package/pipeline/skills/skill-copies.json +9 -1
- package/pipeline/skills/skills-index.md +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -16,6 +16,100 @@ Internal file-layout changes that don't affect the slash-command surface are sti
|
|
|
16
16
|
|
|
17
17
|
## [Unreleased]
|
|
18
18
|
|
|
19
|
+
## [20.42.0] - 2026-11-04
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- Build and test evidence is tied to a digest of the working tree (`lib/source-digest.mjs`). The gate ledger records it, an edit after the build makes the entry `stale` at commit, and `evidence-gate --ran-on` refuses a run whose source changed under it.
|
|
24
|
+
- `evidence-gate --command` / `--command-file` refuses a narrowed test run (`-only-testing`, `--filter`, `--tests`, `-t`, `-k`, `--grep`, `-run`, a single test file, `--passWithNoTests`) across fourteen runners and package scripts. `test-integrity-gate --test-command-file` reports one as blocking.
|
|
25
|
+
- `tdd-red` keeps the test files changed since the run's base commit, committed or not. `tdd-green` refuses a weakened or deleted one unless `--test-edit-reason` is given (blocking regardless when unattended), `plan-todos.sh tdd-restore` puts them back without creating anything outside the work tree, and `test-integrity-gate --state` reports the edits. An unreadable `--state` or `--test-command-file` is a blocking finding.
|
|
26
|
+
- `eval-guard-robustness` probes every PreToolUse hook in the install template, and the library matchers, with ReDoS, 1 MB and 5000-deep inputs under a timeout, against a dated known-holes list. `npm test` runs `--fast`; `npm run eval:guards` runs the whole probe.
|
|
27
|
+
- The guard asks before a recursive delete of `/`, the home directory (`$HOME`, `${HOME:?}` and the other parameter forms, `~`, `~user`) or a directory above it, and before a fork bomb, and refuses these unattended.
|
|
28
|
+
- The outbound gate, the command-line credential scan and the memory secret scan also match credentials hidden in base64, hex or rot13, with a Python twin used by the guard.
|
|
29
|
+
- Fenced untrusted text that reads like instructions is marked `suspicious` with the toolkit's classes: instruction-override, role-tag, tool-invocation, exfiltration and fence-escape.
|
|
30
|
+
- The installer reports risky `settings.json` combinations before it merges hooks, and setup asks about each HIGH finding.
|
|
31
|
+
- `run-scope-guard` on `Agent|Task` asks before a subagent starts on a run over its cost budget, and refuses with `onExceed: halt`.
|
|
32
|
+
- `lib/hook-once.mjs` makes the note-skill-use, note-mcp-failure and note-agent-event hooks write once per tool event.
|
|
33
|
+
- `cost-analyze advise` reports cache-read ratio, 1-hour cache TTL payback, sub-agent rung downshift with the pinned personas, context bloat and unpriced models, each finding with its numbers, its source and a what-if saving or null.
|
|
34
|
+
- `session-usage.mjs --host codex` reads the Codex CLI token ledger (running-total deltas, resets, forked replays); an unknown format reports UNMEASURED.
|
|
35
|
+
- Memory recall re-picks its head with MMR and ranks each clause of a multi-part task as its own query (`memoryRecall.mmrLambda`, `memoryRecall.multiQuery`); eval-recall gains two diversity cases.
|
|
36
|
+
- `doctor --json` carries `schemaVersion: 1` and `selection` under `schemas/doctor-report.schema.json`, with a golden test; `--only <id,...>`; the new check `mcp-schema-load` reports the toolkit's tool-list load per family as an estimate (`mcpSurface.schemaInfoAboveTokens`).
|
|
37
|
+
- An unknown flag or subcommand names the nearest one, in the output language.
|
|
38
|
+
- Opt-in `statusline.mjs` shows the run a session drives. Its cache lives in a private per-user directory, install never replaces an existing `statusLine`, and a symlinked settings file is written through with its mode kept.
|
|
39
|
+
- `publish-staged.mjs` publishes under a candidate dist-tag, matches the integrity, runs an install test, then promotes to latest; `--tag latest` is refused. It is the documented release step.
|
|
40
|
+
- Learned model-rung order (`modelRouting.learned`, off by default): `route-learn.mjs` learns from gate and review outcomes, promotes a policy only after a holdout Brier comparison with isotonic calibration, and chooses with seeded Thompson sampling.
|
|
41
|
+
- `/multi-agent:autopilot --loop N` (`autopilot-loop.mjs`): a bounded loop in which every iteration is a fully gated unattended run, launched with the autopilot runner's own argv, environment, unattended settings profile and preconditions, so the loop refuses to start where the runner would. Completion is checked and marked by the loop itself, and iterations, time and cost are hard caps.
|
|
42
|
+
- `disk-cleaner.mjs` frees disk space on a macOS developer machine by deleting regenerable data from a fixed allowlist of 24 categories: Xcode DerivedData, SwiftPM `.build` and DerivedData folders inside dev roots that look like build output and sat untouched for 12 hours, stale XCTest device clones, SwiftUI preview, Interface Builder and documentation caches, archives past an age, DeviceSupport for OS versions no paired device runs, unavailable simulators, simulator, SwiftPM, CocoaPods, Gradle, npm, yarn and pnpm caches, Homebrew, `dd-*` build folders in /tmp and $TMPDIR, pipeline scratch through `gc-tmp.sh`, scratchpads of ended Claude Code sessions, merged and clean agent worktrees under `.claude/worktrees`, developer-tool folders in ~/Library/Caches, old simulator logs and crash reports, finished pipeline task logs through `prune-logs.sh`, `.DS_Store` in dev roots, and orphaned children of ended sessions. The default run measures and deletes nothing; `--apply` deletes, every category can be skipped, and every path is checked again right before it goes: no symlink is followed, the real path must sit inside the category's roots, the user's folders, iCloud, keychains, credential folders and memory folders are refused, and nothing an open file or running command points into is touched. Transcripts and the Trash are opt-in; processes are stopped only with `--apply --processes`; unattended runs keep to a safe subset. It prints free space before and after and writes a JSON report.
|
|
43
|
+
- New `disk-cleaner` skill in ai-common-toolkit, which ships the script.
|
|
44
|
+
- Low-disk suggestion: `lib/low-disk.mjs` checks free space with one statfs call against `diskCleaner.lowDiskGb` (default 10) and `diskCleaner.lowDiskPercent` (default 5), and prints one line naming the disk-cleaner skill from doctor's `disk-space` check, the SessionStart banner, and the pre-push gate when a failed step said ENOSPC. `diskCleaner.suggest: false` silences it. Nothing is deleted from any of these places.
|
|
45
|
+
- `note-mcp-failure.mjs` classifies `ENOSPC` and no-space errors as `disk-full`, and doctor's `mcp-failures` check names the disk-cleaner skill after one such failure.
|
|
46
|
+
|
|
47
|
+
### Changed
|
|
48
|
+
|
|
49
|
+
- `credential-store.sh set <key>` without a value reads the secret from stdin, or asks for it with hidden input on a terminal, and refuses an empty secret with usage.
|
|
50
|
+
- `usage-reporting.md`, the hooks template and the classifier's header give the MCP failure classes in the order the code reads them: the interrupt flag, a user or permission refusal, then a JSON-RPC code.
|
|
51
|
+
- `md2confluence-v3.py --image-width` help says images in a table cell stay at 240 px, and decision 18 in `locked.md` names that width for the frame gallery.
|
|
52
|
+
- `outside-the-pipeline.md` lists `media_video_plan` and `media_video_render`.
|
|
53
|
+
- Phase 2 stops retrying a build that failed for lack of disk space and prints the low-disk line instead.
|
|
54
|
+
- The `backlog` and `localization-reuse-map` skill descriptions are shorter, to stay under the description ceiling.
|
|
55
|
+
|
|
56
|
+
### Fixed
|
|
57
|
+
|
|
58
|
+
- The URL-credential secret pattern, the command-line DSN pattern and the outbound email rule scan a long URL-shaped line in linear time, and a URL password of any length is still caught.
|
|
59
|
+
- `redact` skips the fold for printable ASCII text.
|
|
60
|
+
- `phase-1-plan.md` counts the 37 locked analysis decisions.
|
|
61
|
+
- progress-contract.md names the cost check's real default rate.
|
|
62
|
+
|
|
63
|
+
## [20.41.0] - 2026-11-03
|
|
64
|
+
|
|
65
|
+
### Added
|
|
66
|
+
|
|
67
|
+
- Global learnings. `learnings-ledger.mjs promote --candidates [--json]` lists learnings that recur in two or more repositories: entries of the same kind whose statements score at or above 0.5 on word-pair shingle similarity, high confidence only. Superseded entries, entries marked `dead_end` or `corrected`, and repositories in `memory.excludeProjects` are left out. Each candidate shows its repositories, entry ids and score. It runs on request only; nothing promotes automatically.
|
|
68
|
+
- `learnings-ledger.mjs promote --accept <P:id>` appends one candidate, with its source ids, to the global ledger `~/.claude/memory/multi-agent/_global/learnings-ledger.jsonl` after a y/N confirmation at a terminal; end of input at the question writes nothing and exits 2. `promote --retract <G:id> --reason "..."` takes a global learning back in every repository, and `feedback --id G:<id> --outcome dead_end|corrected` hides it in one repository. All three exit 3 in an unattended or autopilot run and when stdin is not a terminal, and agent-guard asks before an agent runs any of them and refuses them unattended.
|
|
69
|
+
- `brief` and `profile` include global entries marked `(global)` with a `G:` pointer (`show --id G:<id>`), at every tier. Global entries hold at most a third of the block and are ordered by date among the repository's own. They are left out in excluded repositories, in their source repositories, in repositories that already hold the same learning, and in a repository that hid them. A global row with an empty statement, or a retraction without an id, is skipped. A repo slug that folds onto a name starting with `_`, or resolves to the global ledger's folder, is refused, so no repository command can write the global ledger.
|
|
70
|
+
- Office: the memory archive (`GET /v1/archive`) has a `global` shelf for promoted learnings. Neither `/v1/archive` nor `/v1/memory` lists a folder whose name starts with `_` as a repository.
|
|
71
|
+
- `/multi-agent:review-analysis` gains an opt-in persona walk (`review.personaWalk.enabled`, default off). At most four personas derived from the document walk its flows and report missing states, unhandled errors, accessibility gaps and conflicting rules.
|
|
72
|
+
- `persona-walk-anchors.mjs` drops every persona-walk finding whose section or quote anchor is not in the document. A quote must sit in one paragraph and is matched across emphasis, code marks and link syntax; it may land above the first numbered heading or in an unnumbered document. Section ids may be bold or follow "Section" or "Bölüm", and a numbered heading nested under a numbered section whose number it does not extend belongs to that section. Fences close only on their own marker, and fenced code is never quotable. A conflicting-rule finding needs anchors in different sections or different paragraphs, and two quotes count only when they differ. A walk is refused past 200 findings, a finding past 8 anchors, and a document over 4 MB; the document and the walk must be regular files, opened without blocking.
|
|
73
|
+
- New `spec-persona-walk` skill in ai-common-toolkit, which ships the anchor checker.
|
|
74
|
+
- `eval-persona-walk.mjs` measures the walk on a seeded-defect corpus in invented domains: recall, precision, anchor-valid rate and recall per kind. Each planted gap is credited to one finding; kept findings are split into matched, duplicates and false positives, and duplicates lower precision. The scorer check runs in `npm test`; the model run is opt-in behind the live-eval cost gate. The bar for turning the walk on is in `pipeline/eval/README.md`.
|
|
75
|
+
- `graph-query.mjs --tier quick|panorama|deep` and `learnings-ledger.mjs brief|profile --tier` answer in a fixed character budget (1500, 6000, 12000), fitted by `fitToBudget` in `lib/tiered-budget.mjs`. `--tier=<t>` is accepted, an unknown tier exits 64, and the graph-query tier header shows at most 120 characters of the question. Output without `--tier` is unchanged.
|
|
76
|
+
- `note-mcp-failure.sh`, registered by install (PostToolUseFailure on `mcp__.*`), counts failed MCP calls per server and tool in `~/.claude/logs/multi-agent/mcp-failures.jsonl`. It records only server, tool, time and a closed error class, chosen from the JSON-RPC code first, then a message that opens with "invalid" or "validation", then an HTTP status (a bare three-digit number counts only after HTTP, status or a request line, or before a reason phrase), then wording. `denied` covers permission refusals only. Off with `mcpFailures.enabled: false` or `usageLog.optOut: true`, and while the preferences file exists but does not parse. `note-mcp-failure.mjs summary` prints "server-side failures of N failed calls" per server.
|
|
77
|
+
- Doctor check `mcp-failures`: INFO for a server with 5 or more server-side failures in 24 hours. Invalid input, denied and interrupted calls do not count.
|
|
78
|
+
- `eval-tool-order.mjs` (maintainer, opt-in) reports how often local sessions followed three documented tool orders, as rates only. A session counts as a pipeline run when it is named by `--run` or started a run-starting command from the command catalog; `help`, `status` and other helpers do not count.
|
|
79
|
+
- `prefs.global.guardRules`: user-defined agent-guard rules (tool, regex, `warn`/`ask`/`block`, reason). They only make the guard stricter, and unattended an `ask` is a `block`. A pattern with a back-reference, or one that does not compile, is invalid. The rest match under a 1-second budget in the guard's own process: `block` rules first, then `ask`, then `warn`, each with its own share of the time left. Messages name the rule id and reason, never the matched text.
|
|
80
|
+
- A guard rule that gives no answer (out of time, not reached before the budget ran out, or input past 65,536 characters with no match in its head and tail) refuses unattended and asks attended when it is an `ask` or `block` rule. A preferences file that does not parse, or a `guardRules` that is not a list, applies no rule: unattended it refuses every call a rule could govern when the file names `guardRules`, and attended each such call carries a note. With prompts off, an ask on Edit, Write or a toolkit tool prints the exact `confirm-command.mjs` key: the tool, the path and a sha256 of the input. A `warn` or `ask` message is added to a built-in ask's prompt.
|
|
81
|
+
- Doctor check `guard-rules`: reports invalid rules by id (an invalid `block` rule refuses its tool unattended; a duplicate id names both positions), names a rule with a slow shape as INFO, and reports rules whose tool has no agent-guard registration (a `Read` rule under the default hooks, or the `NotebookEdit` half of an `Edit` rule) and a preferences file or `guardRules` value it cannot read.
|
|
82
|
+
- `product-tree.mjs` builds a screen layer over the code graph without a model (screens, routes, flows, localized strings, endpoints, tests) for SwiftUI, Compose (Navigation 2 and 3) and Next.js / react-router. Programmatic navigation is counted and listed per stack when it cannot be resolved. Subcommands: `build`, `locate`, `show`, an evidence-checked `propose`, and person-only `agree` / `reject`.
|
|
83
|
+
- Product tree input handling: the build reads only regular files inside the repository (no symlinks, devices or FIFOs) up to 2 MB, decodes UTF-16 strings files, and runs git with the repository's fsmonitor, hooks, external diff and pager turned off. A root that is a git top level takes the main repository's name, so a linked worktree shares its repository's tree, project and exclusion. `locate` and `show` print one untrusted-data block or nothing, with the no-match note on stderr, and `locate` measures its budget on the fenced text, so it stays within `--max-chars`. Both `--json` outputs strip control characters from every string. `build`, `locate`, `show` and `propose` skip repositories in `memory.excludeProjects`.
|
|
84
|
+
- Product tree overlay: proposal evidence must resolve, symlinks followed, to a line of a regular file inside the repository, and `--parent` must name a node or a proposal. `--name` and `--note` lose control characters before a proposal is written. Proposing the same thing again keeps a person's earlier `agree` or `reject`. agent-guard asks before any `agree` or `reject` through `product-tree.mjs` (flags before the subcommand, a variable in its place, or a renamed copy run through node or directly) and before a shell write into the overlay, compared casefolded and after resolving a symlink, and refuses a file tool aimed at `product-tree-overlay.jsonl`, attended and unattended.
|
|
85
|
+
- `product-tree-eval.mjs` mines bug-fix commits, rebuilds graph and tree at each fix's parent, splits by time, tunes only on the older half, and reports Acc@k, recall@k, MRR, an exact McNemar test (summed in log space, so it holds past 1023 discordant pairs) and bootstrap intervals. It reads repository files under the same rules as the build and keeps non-ASCII paths.
|
|
86
|
+
- `prefs.global.productTree` (off by default). When on, Phase 0 builds the tree when it is missing or behind HEAD and locates the task, and Phase 1 injects the subtree, capped by `fitToBudget` at `productTree.maxChars` (default 6000) characters.
|
|
87
|
+
|
|
88
|
+
### Changed
|
|
89
|
+
|
|
90
|
+
- `/multi-agent:review-analysis` verdicts always print a G (persona walk) row: its count, or `off` when `review.personaWalk.enabled` is false.
|
|
91
|
+
- The learnings near-duplicate check, like the new promotion measure, treats curly apostrophes, every n't form, "cannot" and Turkish -me/-ma verb negation as negations, past, reported past and imperative forms whose suffix vowel follows the stem included, and reads words of any script whole.
|
|
92
|
+
- The learnings-ledger schema accepts `source: promotion`, `promoted_from` and `retracts` on global ledger rows.
|
|
93
|
+
- Doctor's hook-registration check counts a non-empty `guardRules` as needing `agent-guard.sh`.
|
|
94
|
+
- Shorter descriptions for `backlog`, `localization-reuse-map`, `storekit` and `swiftdata`, so the skill description surface stays under 96000 bytes.
|
|
95
|
+
|
|
96
|
+
### Fixed
|
|
97
|
+
|
|
98
|
+
- Confluence pages: an image inside a table cell renders at 240 px wide (`TABLE_IMAGE_WIDTH` in `md2confluence-v3.py`) instead of the 720 px page width, unless its own title names a width (`"width=400"`); images outside tables keep the page width.
|
|
99
|
+
|
|
100
|
+
### Security
|
|
101
|
+
|
|
102
|
+
- The skill-usage log and the MCP failure log share one append and rotation path through safe-write, each log under its own lock. A FIFO, link or directory at the log path drops the row instead of redirecting it, throwing or holding the hook. A writer that finds the rotation lock held waits briefly for the rotation, and a log still full afterwards, or one whose `.1` is a directory, drops the row, so neither log grows past its 1 MiB cap. The MCP summary reads only regular files.
|
|
103
|
+
- Learnings: statements, rationales and scopes lose C0 and C1 control characters when added and when printed, so an escape sequence cannot hide what a person approves. A repository folder that is a symlink, or whose real name starts with `_`, is refused. Ledger and feedback files are opened without following a link or blocking, must be regular files, and are read up to 16 MiB from the newest end.
|
|
104
|
+
|
|
105
|
+
### Docs
|
|
106
|
+
|
|
107
|
+
- ADR-0019 (Accepted, ships off, M0 verdict NO-GO): on 230 held-out bug fixes the product tree did not beat graph-only ranking (recall@10 46.5% against 47.1%, McNemar p = 1.0). It and the product tree page say the guard asks before an `agree`, a `reject` or a shell write into the overlay and refuses a file tool aimed at it.
|
|
108
|
+
- README: "Hooks per host" lists `note-mcp-failure.sh`, and "Your own guard rules" documents `guardRules`.
|
|
109
|
+
- Help lists Global Learnings under Key Features, with `--retract` and feedback on a `G:` id, in English and Turkish.
|
|
110
|
+
- `usage-reporting.md` section 10 and the hooks template say each local log rotates under its own lock, and give the MCP failure classifier's order with the `invalid` / `validation` opening read before an HTTP status.
|
|
111
|
+
- `docs/ecosystem.md` no longer carries hand-typed plugin skill counts and versions.
|
|
112
|
+
|
|
19
113
|
## [20.40.0] - 2026-11-03
|
|
20
114
|
|
|
21
115
|
### Added
|
package/README.md
CHANGED
|
@@ -515,7 +515,7 @@ The **secret scan** runs as a `PreToolUse` hook on Claude Code (hard-blocks a co
|
|
|
515
515
|
| Hook | Claude Code | Codex CLI | Copilot CLI |
|
|
516
516
|
| --- | --- | --- | --- |
|
|
517
517
|
| `pre-commit-check.sh` (secret scan, owned paths, attended build/test evidence, unattended ledger) | PreToolUse `Bash` | none: pre-push check | none: pre-push check |
|
|
518
|
-
| `agent-guard.sh` (attribution, force-push, skipped git hooks, argv secrets, closure confirmations, read-only repos, unattended policy) | PreToolUse `Bash`, file edits, fetch and toolkit tools | none | none |
|
|
518
|
+
| `agent-guard.sh` (attribution, force-push, skipped git hooks, argv secrets, closure confirmations, read-only repos, your own `guardRules`, unattended policy) | PreToolUse `Bash`, file edits, fetch and toolkit tools | none | none |
|
|
519
519
|
| `run-scope-guard.sh` (Figma phase rule, worktree boundary warning) | PreToolUse Figma tools, file edits | none: the phase records its own MCP calls | none |
|
|
520
520
|
| `run-stop-guard.sh` (no silent stop mid-run) | Stop | none: halts stay the phase's own write | none |
|
|
521
521
|
| `task-mirror.sh` (native task list into the run tracker, so the office shows it) | PostToolUse `TaskCreate`/`TaskUpdate` | none: the phase calls `phase-tracker.sh task` itself | none: the phase calls `phase-tracker.sh task` itself |
|
|
@@ -524,18 +524,21 @@ The **secret scan** runs as a `PreToolUse` hook on Claude Code (hard-blocks a co
|
|
|
524
524
|
| `note-agent-event.sh` (a subagent's outcome or a failed tool call, into the session notes) | SubagentStop, PostToolUseFailure | none | none |
|
|
525
525
|
| `answer-check.sh` (an AskUserQuestion submitted without a choice is asked again, not defaulted) | PostToolUse `AskUserQuestion` | none | none |
|
|
526
526
|
| `note-skill-use.sh` (skill name, outcome, time, host and repo folder name into a local log, so unused skills can be pruned on evidence; never arguments, prompts or output) | PostToolUse / PostToolUseFailure `Skill` | none: Codex reads skill files, no tool call to hook | none: no Copilot hooks are installed |
|
|
527
|
+
| `note-mcp-failure.sh` (server, tool, time and a closed error class of a failed MCP call into a local log, read by doctor's `mcp-failures` check; never arguments, output or error text) | PostToolUseFailure `mcp__.*` | none | none: no Copilot hooks are installed |
|
|
527
528
|
| `edit-syntax-gate.sh` | PostToolUse file edits | PostToolUse `apply_patch` | none: Copilot discards postToolUse output |
|
|
528
529
|
| `check-read-size.sh`, capture hooks | registered | none | none |
|
|
529
530
|
|
|
530
531
|
Where a host has no equivalent hook the rule is still in the phase documents; it is a request there, not enforcement.
|
|
531
532
|
|
|
533
|
+
**Your own guard rules.** `prefs.global.guardRules` adds rules to `agent-guard.sh`: each names a tool (`Bash`, `Edit`, `Write`, `Read` or a toolkit tool glob), a regex and an action (`warn`, `ask` or `block`). A rule can only make the guard stricter, never allow what it refuses, and unattended an `ask` is a `block`. Messages name the rule id and reason, never the matched text, and `/multi-agent:doctor` (`guard-rules`) reports an invalid rule and one whose tool the guard is not registered on, such as `Read` under the default hooks, warns when the preferences file does not parse (unattended, that refuses every call a rule could govern when the file names `guardRules`), and names a rule whose pattern has a slow shape, which still runs under a 1-second matching budget. [Unattended security](./pipeline/multi-agent-refs/features/unattended-security.md#user-guard-rules)
|
|
534
|
+
|
|
532
535
|
## Outside a pipeline run
|
|
533
536
|
|
|
534
537
|
Installing the pipeline is not only useful when you run it. Open an ordinary session and the same three things are available, announced by `rules/outside-the-pipeline.md` which loads with every conversation:
|
|
535
538
|
|
|
536
539
|
- **Services you already onboarded.** The token `setup` mapped is readable now - resolve the logical name through `credential-store.sh` and fetch the issue, the page, the log. **Reads are ordinary work; writes are not.** Posting a Jira comment, editing an issue or opening a PR goes through the pipeline commands, because the rules that make those safe (never auto-close, `Ref:` not `Closes:`, humanizer on outward prose) live there.
|
|
537
540
|
- **The stack skills `/multi-agent:stack` enabled for the repo.** Each toolkit's own `index` skill routes; the pipeline keeps no copy of that table.
|
|
538
|
-
- **The `multi-agent-toolkit` MCP.** <!-- fact:toolCount -->
|
|
541
|
+
- **The `multi-agent-toolkit` MCP.** <!-- fact:toolCount -->230<!-- /fact --> tools, most of them for a running app - screen state, crash logs, design comparison, store pre-submission, web scraping and browser test states. Several measure instead of judging by eye: WCAG contrast (`design_contrast_check`), layout shift across themes or a mirrored locale (`ios_visual_diff` with `mode: "layout"`), store listing limits (`store_listing_lint`), review themes with verbatim quotes (`store_review_themes`) and whether security findings cite real lines (`security_evidence_check`, with `security_sarif_export` for code-scanning views). The learnings ledger and the code graph are readable through it too (`learnings_*`, `graph_*`).
|
|
539
542
|
|
|
540
543
|
Uninstall preserves this layer: the tokens, the reader that opens them, the mapping that names them, and the MCP registration. Removing the pipeline should not cost you the credentials you onboarded through it.
|
|
541
544
|
|
package/README.tr.md
CHANGED
|
@@ -515,7 +515,7 @@ triage notu bunu belirtir.
|
|
|
515
515
|
| Hook | Claude Code | Codex CLI | Copilot CLI |
|
|
516
516
|
| --- | --- | --- | --- |
|
|
517
517
|
| `pre-commit-check.sh` (secret taraması, sahipli yollar, attended build/test kanıtı, unattended defteri) | PreToolUse `Bash` | yok: pre-push kontrolü | yok: pre-push kontrolü |
|
|
518
|
-
| `agent-guard.sh` (atıf, force-push, atlanan git hook'ları, argv'de secret, kapanış onayları, salt okunur repolar, unattended politikası) | PreToolUse `Bash`, dosya düzenlemeleri, fetch ve toolkit araçları | yok | yok |
|
|
518
|
+
| `agent-guard.sh` (atıf, force-push, atlanan git hook'ları, argv'de secret, kapanış onayları, salt okunur repolar, kendi `guardRules` kuralların, unattended politikası) | PreToolUse `Bash`, dosya düzenlemeleri, fetch ve toolkit araçları | yok | yok |
|
|
519
519
|
| `run-scope-guard.sh` (Figma faz kuralı, worktree sınırı uyarısı) | PreToolUse Figma araçları, dosya düzenlemeleri | yok: faz kendi MCP çağrılarını kaydeder | yok |
|
|
520
520
|
| `run-stop-guard.sh` (koşu ortasında sessizce durmaz) | Stop | yok: duraklama fazın kendi yazımı olarak kalır | yok |
|
|
521
521
|
| `task-mirror.sh` (terminaldeki görev listesini koşunun takipçisine yazar, ofis de onu gösterir) | PostToolUse `TaskCreate`/`TaskUpdate` | yok: faz `phase-tracker.sh task`'ı kendisi çağırır | yok: faz `phase-tracker.sh task`'ı kendisi çağırır |
|
|
@@ -523,18 +523,21 @@ triage notu bunu belirtir.
|
|
|
523
523
|
| `graph-hint.sh` (tüm repoda bir tanımlayıcı aranırken güncel kod grafiğini önerir, oturumda bir kez) | PreToolUse `Grep`/`Glob` | yok | yok |
|
|
524
524
|
| `note-agent-event.sh` (alt ajanın sonucunu ya da başarısız araç çağrısını oturum notlarına yazar) | SubagentStop, PostToolUseFailure | yok | yok |
|
|
525
525
|
| `note-skill-use.sh` (skill adı, sonuç, zaman, host ve repo klasör adı yerel bir loga yazılır; kullanılmayan skill'ler kanıtla ayıklanır; argüman, prompt ve çıktı asla yazılmaz) | PostToolUse / PostToolUseFailure `Skill` | yok: Codex skill dosyalarını okur, yakalanacak araç çağrısı yok | yok: Copilot hook'u kurulmaz |
|
|
526
|
+
| `note-mcp-failure.sh` (başarısız bir MCP çağrısının sunucusu, aracı, zamanı ve hata sınıfı yerel bir loga yazılır, doctor'ın `mcp-failures` kontrolü bunu okur; argüman, çıktı ve hata metni asla yazılmaz) | PostToolUseFailure `mcp__.*` | yok | yok: Copilot hook'u kurulmaz |
|
|
526
527
|
| `edit-syntax-gate.sh` | PostToolUse dosya düzenlemeleri | PostToolUse `apply_patch` | yok: Copilot postToolUse çıktısını atar |
|
|
527
528
|
| `check-read-size.sh`, capture hook'ları | kayıtlı | yok | yok |
|
|
528
529
|
|
|
529
530
|
Bir host'ta eşdeğer hook yoksa kural yine faz dokümanlarında durur; orada zorlama değil, bir istektir.
|
|
530
531
|
|
|
532
|
+
**Kendi guard kuralların.** `prefs.global.guardRules`, `agent-guard.sh`'a kural ekler: her kural bir araç (`Bash`, `Edit`, `Write`, `Read` ya da bir toolkit araç glob'u), bir regex ve bir eylem (`warn`, `ask` ya da `block`) belirtir. Bir kural guard'ı yalnızca sıkılaştırır, onun reddettiğine asla izin vermez. Gözetimsiz koşuda `ask` bir `block` olur. Mesajlar kuralın id'sini ve gerekçesini verir, eşleşen metni asla yazmaz. Geçersiz bir kuralı ya da aracında guard kayıtlı olmayan bir kuralı (varsayılan hook'larda `Read` gibi) `/multi-agent:doctor` (`guard-rules`) bildirir. Tercih dosyası ayrıştırılamazsa da uyarır; gözetimsiz koşuda bu durum, bir kuralın kapsayabileceği her çağrıyı reddeder. [Gözetimsiz güvenlik](./pipeline/multi-agent-refs/features/unattended-security.md#user-guard-rules)
|
|
533
|
+
|
|
531
534
|
## Pipeline koşusu dışında
|
|
532
535
|
|
|
533
536
|
Pipeline'ı kurmak yalnız onu çalıştırdığında işe yaramıyor. Sıradan bir oturum açtığında aynı üç şey elinin altında; her sohbette yüklenen `rules/outside-the-pipeline.md` bunları duyuruyor:
|
|
534
537
|
|
|
535
538
|
- **Zaten onboard ettiğin servisler.** `setup`'ın eşlediği token okunabilir durumda - mantıksal adı `credential-store.sh` ile çöz, issue'yu, sayfayı, logu getir. **Okuma sıradan iş, yazma değil.** Jira yorumu, issue düzenleme ve PR açma pipeline komutlarından geçer, çünkü onları güvenli kılan kurallar (issue asla otomatik kapanmaz, `Closes:` değil `Ref:`, dışa dönük metinde humanizer) orada yaşıyor.
|
|
536
539
|
- **`/multi-agent:stack`'in bu repo için açtığı stack skilleri.** Yönlendirmeyi her toolkit'in kendi `index` skill'i yapar; pipeline o tablonun kopyasını tutmaz.
|
|
537
|
-
- **`multi-agent-toolkit` MCP.** <!-- fact:toolCount -->
|
|
540
|
+
- **`multi-agent-toolkit` MCP.** <!-- fact:toolCount -->230<!-- /fact --> araç, çoğu çalışan uygulama için - ekran durumu, crash logu, tasarım karşılaştırma, store ön-kontrolü, web kazıma ve tarayıcı test durumları. Bazı kontrolleri gözle değil ölçümle yapar. WCAG kontrastı `design_contrast_check` ile, tema ya da RTL değişince kayan yerleşim `ios_visual_diff` (`mode: "layout"`) ile ölçülür. Mağaza metni sınırlarını `store_listing_lint` denetler. `store_review_themes` yorumları temalara ayırır ve alıntıyı birebir bırakır. Güvenlik bulgularının gerçek satırlara dayandığını `security_evidence_check` doğrular; `security_sarif_export` kod tarama ekranları için SARIF yazar. Öğrenim kaydı (`learnings_*`) ve kod grafiği (`graph_*`) de buradan okunur.
|
|
538
541
|
|
|
539
542
|
Uninstall bu katmanı korur: token'lar, onları açan okuyucu, adlarını tutan eşleme ve MCP kaydı. Pipeline'ı kaldırmak, onun üzerinden onboard ettiğin credential'ları kaybetmek anlamına gelmemeli.
|
|
540
543
|
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# 19. A product tree over the code graph, measured before it is trusted
|
|
2
|
+
|
|
3
|
+
**Status:** Accepted (ships off; M0 verdict NO-GO) · 2026-11-02 · extends [ADR-0010](./0010-own-code-graph.md)
|
|
4
|
+
|
|
5
|
+
## Context
|
|
6
|
+
|
|
7
|
+
A bug report is written in the words a person saw: a button label, a screen,
|
|
8
|
+
a step in a flow. The code graph (ADR-0010) knows files and symbols, and it
|
|
9
|
+
scored 63% on questions phrased in domain words against near-perfect scores
|
|
10
|
+
on questions that named a type. The gap is the vocabulary between the two.
|
|
11
|
+
|
|
12
|
+
The proposed answer is a screen layer joined over the graph: localized text,
|
|
13
|
+
string key, route, screen, the files a screen owns, the endpoints it calls,
|
|
14
|
+
the tests that name it. The literature on bug localization (BM25F over
|
|
15
|
+
structured fields, query expansion through UI strings, graph-seeded ranking)
|
|
16
|
+
reports gains from exactly these joins, but on other corpora and with other
|
|
17
|
+
baselines. Before the pipeline relies on such a layer, it has to beat the
|
|
18
|
+
graph it sits on, on bugs it has not been tuned on.
|
|
19
|
+
|
|
20
|
+
## Decision
|
|
21
|
+
|
|
22
|
+
Build the layer deterministically, keep it local, and gate its use on a
|
|
23
|
+
measurement.
|
|
24
|
+
|
|
25
|
+
- `pipeline/scripts/product-tree.mjs build` derives
|
|
26
|
+
`~/.claude/knowledge/<project>/product-tree.json` (0600, never shipped)
|
|
27
|
+
without a model. SwiftUI: views named Screen, Scene or Page, every
|
|
28
|
+
navigation target (links by destination, closure and value,
|
|
29
|
+
`navigationDestination` over a route enum, sheets, covers, stack roots,
|
|
30
|
+
tabs, scenes) and coordinators that host a view, which become flow nodes.
|
|
31
|
+
Compose: `composable`, `dialog`, `bottomSheet` and Navigation 3 `entry`
|
|
32
|
+
registrations, `@Serializable` route types, start destinations, one hop
|
|
33
|
+
through a wrapper composable. Web: Next.js `app/` and `pages/` routes when a
|
|
34
|
+
`package.json` depends on Next, app router API handlers, react-router tables
|
|
35
|
+
and `<Route>` elements. Strings from `.strings`, `.xcstrings`,
|
|
36
|
+
`strings.xml` and i18n JSON; endpoints from Retrofit annotations, route
|
|
37
|
+
handlers and API-shaped literals; tests by the screen names they contain.
|
|
38
|
+
- Programmatic navigation is counted and each call is resolved only when its
|
|
39
|
+
argument is a literal route or a view constructor. The rest are listed with
|
|
40
|
+
file and line. Coverage is reported per stack, never assumed.
|
|
41
|
+
- `locate` ranks files under three arms that share one implementation with the
|
|
42
|
+
evaluation: BM25F over names, symbols and directories; the same plus query
|
|
43
|
+
expansion through matched UI strings, a UI-string ranking, personalized
|
|
44
|
+
PageRank over the import and reference edges, Turkish-aware folding and
|
|
45
|
+
stemming, and identifier splitting; and the screen layer on top.
|
|
46
|
+
- The model only proposes, with evidence that resolves to a line of a
|
|
47
|
+
regular file inside the repository, into an append-only overlay. Proposing
|
|
48
|
+
the same thing again leaves an earlier decision in place. `agree` and
|
|
49
|
+
`reject` are refused in an unattended run and without a terminal. The
|
|
50
|
+
terminal check stops a piped shell but not an agent that allocates a
|
|
51
|
+
pseudo-terminal, so agent-guard is the layer that asks before an agent's
|
|
52
|
+
`agree` or `reject` and refuses a file tool aimed at the overlay. No
|
|
53
|
+
ranking reads the overlay yet: agreed rows are planned to feed `locate` in
|
|
54
|
+
M2.
|
|
55
|
+
- The repository is untrusted input. The build reads only regular files
|
|
56
|
+
inside the root, up to the same 2 MB limit the evaluation uses, never
|
|
57
|
+
through a symlink; every git call turns off the repository's fsmonitor,
|
|
58
|
+
hooks, external diff, pager, signature checks and gpg programs, and reads
|
|
59
|
+
no global or system config. `locate` and `show` print their result inside
|
|
60
|
+
one untrusted-data block. A repository listed in
|
|
61
|
+
`prefs.global.memory.excludeProjects` gets no tree.
|
|
62
|
+
- `prefs.global.productTree.enabled` defaults to `false`. When on, Phase 0
|
|
63
|
+
locates the task and Phase 1 injects the result, cut by `fitToBudget` to
|
|
64
|
+
`productTree.maxChars` (6,000).
|
|
65
|
+
|
|
66
|
+
## Measurement
|
|
67
|
+
|
|
68
|
+
This measurement is the M0 gate; M1 is the Phase 0/1 wiring; M2 is derived flows and agreed overlay rows read by locate.
|
|
69
|
+
|
|
70
|
+
`product-tree-eval.mjs` mines bug-fix commits from git history, rebuilds the
|
|
71
|
+
graph and the tree at each fix commit's parent from git objects, ranks files
|
|
72
|
+
for the commit subject (conventional prefix and PR number removed) and scores
|
|
73
|
+
them against the production files the fix modified. Every arm is cut to the
|
|
74
|
+
same 6,000-character budget before scoring. Bugs are split by time per
|
|
75
|
+
repository: ranking settings were grid-searched on the older half only, and
|
|
76
|
+
the verdict is read from the newer half. Bugs whose text already names a file,
|
|
77
|
+
symbol or stack frame are reported apart.
|
|
78
|
+
|
|
79
|
+
Corpus: nine repositories, of which eight yielded qualifying fixes, 60 per
|
|
80
|
+
repository (480 bugs): two Node tooling repositories, three web applications
|
|
81
|
+
(two Next.js, one React single-page app), one Compose app, one SwiftUI macOS
|
|
82
|
+
app and one iOS app that mixes SwiftUI with UIKit.
|
|
83
|
+
|
|
84
|
+
Held-out, domain-text bugs (n = 230), recall@10 with a 95% bootstrap interval:
|
|
85
|
+
|
|
86
|
+
| Arm | Acc@1 | Acc@5 | Acc@10 | R@1 | R@5 | R@10 | MRR | Mean chars |
|
|
87
|
+
| ----- | ----- | ----- | ------ | ----- | ----- | --------------------- | ----- | ---------- |
|
|
88
|
+
| bm25 | 29.1% | 50.4% | 57.4% | 19.5% | 38.6% | 45.7% [40.1, 51.1] | 0.393 | 2,552 |
|
|
89
|
+
| graph | 29.1% | 51.3% | 58.3% | 19.5% | 39.5% | 47.1% [41.3, 52.8] | 0.396 | 4,014 |
|
|
90
|
+
| tree | 27.8% | 50.4% | 57.8% | 19.2% | 39.1% | 46.5% [40.9, 52.3] | 0.382 | 4,038 |
|
|
91
|
+
|
|
92
|
+
Tree against graph: hit@10 discordant pairs 3 (graph only) and 2 (tree only),
|
|
93
|
+
exact McNemar p = 1.0; recall@10 difference -0.6 points, interval
|
|
94
|
+
[-1.5, +0.4]. Per repository the tree arm was lower than the graph arm on
|
|
95
|
+
four of eight (between -1.2 and -2.0 points), equal on three and higher on
|
|
96
|
+
one (+1.7, the SwiftUI macOS app). On the development half the tuned tree arm led
|
|
97
|
+
the graph arm by 0.8 points (46.3% against 45.5%, n = 220), which did not
|
|
98
|
+
survive to the held-out half. The ten held-out bugs that name code scored
|
|
99
|
+
54.5% under bm25 and graph and 42.0% under the tree.
|
|
100
|
+
|
|
101
|
+
Screen-index coverage at each repository's head: Compose 5 of 6 screens
|
|
102
|
+
reachable, 3 of 4 programmatic calls resolved; SwiftUI macOS 16 of 28
|
|
103
|
+
reachable, 0 of 22 programmatic; the mixed iOS app 45 of 92 reachable, 8 of
|
|
104
|
+
25 enum routes with a screen, 0 of 286 programmatic calls resolved (almost all
|
|
105
|
+
UIKit pushes and presents of view controllers); web apps reach every screen by
|
|
106
|
+
construction, since a web screen is a route target, and resolved 20% to 40% of
|
|
107
|
+
programmatic navigation calls.
|
|
108
|
+
|
|
109
|
+
**Verdict: NO-GO.** The rule was a recall@10 lift of at least 15 points,
|
|
110
|
+
McNemar p below 0.05 and no repository regressing. None of the three held.
|
|
111
|
+
|
|
112
|
+
## Consequences
|
|
113
|
+
|
|
114
|
+
- The tree ships off. Nothing in a default run builds or reads it.
|
|
115
|
+
- The non-tree signals (UI-string expansion and boost, PageRank) gave 1.4
|
|
116
|
+
points over plain BM25F on held-out bugs, inside the noise. They are not
|
|
117
|
+
moved into graph-query on this evidence.
|
|
118
|
+
- iOS programmatic navigation is the measured weak point: an app that
|
|
119
|
+
navigates through UIKit coordinators has half its screens unreachable and
|
|
120
|
+
no resolved programmatic call. Flows (M2) cannot be derived for such apps
|
|
121
|
+
from regex alone.
|
|
122
|
+
- Commit subjects are short and written by the developer who fixed the bug;
|
|
123
|
+
they are a weaker proxy for a user's report than issue text. A rerun with
|
|
124
|
+
linked issue bodies, and the optional issue-text-only memorization arm
|
|
125
|
+
(`--issue-text-arm`), is the next measurement before any re-decision.
|
|
126
|
+
- 41.7% of held-out bugs had no changed file in the top 10 under the best
|
|
127
|
+
arm. That is a candidate-recall question; it was not measured past k = 10
|
|
128
|
+
here.
|
|
129
|
+
- The per-bug rows and repository names stay in the harness's report under
|
|
130
|
+
`~/.claude/knowledge/_eval/` (0600); this ADR carries only pooled numbers
|
|
131
|
+
and repository kinds.
|
|
132
|
+
|
|
133
|
+
## Alternatives considered
|
|
134
|
+
|
|
135
|
+
- **A model-written tree.** Generated repository summaries have lowered agent
|
|
136
|
+
success in published measurements, and a node nobody can re-derive is an
|
|
137
|
+
assertion. The model may propose with evidence; it never writes fact.
|
|
138
|
+
- **Embeddings for the screen match.** Not tried: an embedding model arrives
|
|
139
|
+
as a runtime package or a hosted service, and ADR-0004 keeps runtime
|
|
140
|
+
packages out of the published package. This measurement did not test
|
|
141
|
+
whether they would close the candidate-recall gap; see Consequences.
|
|
142
|
+
- **Shipping on by default on the development-half result.** The 0.8-point
|
|
143
|
+
development lead is the kind of result the time split exists to catch.
|
package/docs/adr/README.md
CHANGED
|
@@ -28,6 +28,7 @@ Format: lightly adapted from [Michael Nygard's ADR template](https://cognitect.c
|
|
|
28
28
|
| [0016](./0016-the-run-shape-is-asked-not-typed.md) | The shape of a run is asked, not typed into its name | Accepted |
|
|
29
29
|
| [0017](./0017-change-impact-from-the-graph.md) | Change impact from the graph: spans, a transitive walk, freshness | Accepted |
|
|
30
30
|
| [0018](./0018-cross-repo-links-not-a-global-graph.md) | Cross-repository links, not a global graph | Accepted |
|
|
31
|
+
| [0019](./0019-product-tree.md) | A product tree over the code graph, measured before it is trusted | Accepted (ships off; M0 verdict NO-GO) |
|
|
31
32
|
|
|
32
33
|
## Writing a New ADR
|
|
33
34
|
|
package/docs/ecosystem.md
CHANGED
|
@@ -7,7 +7,7 @@ separately, wired together at install time and at run time:
|
|
|
7
7
|
|---|---|---|
|
|
8
8
|
| **`multi-agent-pipeline`** (this repo) | Orchestration: the <!-- fact:phaseCount -->6<!-- /fact -->-phase flow, the <!-- fact:commandCount -->71<!-- /fact --> slash commands, quality gates, review/triage, cross-CLI parity | npm package (`@mmerterden/multi-agent-pipeline`), installs itself onto Claude Code / Copilot CLI / Codex CLI |
|
|
9
9
|
| **`multi-agent-plugins`** | Stack knowledge: per-platform component/lifecycle skills (iOS, Android, Frontend, Backend) + shared knowledge | Claude Code marketplace, 6 independently-versioned plugins |
|
|
10
|
-
| **`multi-agent-toolkit-mcp`** | The pipeline's hands on devices and browsers: <!-- fact:toolCount -->
|
|
10
|
+
| **`multi-agent-toolkit-mcp`** | The pipeline's hands on devices and browsers: <!-- fact:toolCount -->230<!-- /fact --> MCP tools across <!-- fact:toolFamilyCount -->23<!-- /fact --> families (simulator/emulator control, end-to-end locators and assertions, memory, crash diagnostics, accessibility audit, store compliance and listing lint, web automation and scraping, Figma-vs-mock design audit with contrast checks, code intelligence, a code graph, a learnings ledger, wallet passes, an agent-DSL batch runner, a full-text context index with text-to-image rendering, provider-backed and community research, opt-in social reading, verified hand-off of simple text tasks to free models, video key frames and transcripts, offline security scoring with evidence checks, SARIF export and MCP config launch-selector audits, read-only access to related repositories at their latest branch, travel document fixtures, a voice channel, App Store Connect and Play Console APIs, virtual iPhones) | npm package, registered as a standard stdio MCP server on every host |
|
|
11
11
|
|
|
12
12
|
None of the three depends on the others at the code level. They compose through two
|
|
13
13
|
narrow contracts: the **Skill tool** (pipeline → plugin, at Phase 2) and the **MCP
|
|
@@ -95,7 +95,7 @@ graph TD
|
|
|
95
95
|
from the Claude Code source - sync writes their content. `multi-agent-toolkit-mcp` is not:
|
|
96
96
|
it's a separate codebase developed on its own schedule. Sync's Step 3d only
|
|
97
97
|
*detects* whether it moved (dirty tree, unpushed commits, untagged version), runs
|
|
98
|
-
**its own** gate suite, and ships it - commit, tag,
|
|
98
|
+
**its own** gate suite, and ships it - commit, tag, staged publish (section 6). If the pipeline
|
|
99
99
|
needs a tool that toolkit doesn't have yet, that's a two-repo change: add the tool
|
|
100
100
|
in `multi-agent-toolkit-mcp`, ship it, then bump the minimum version pin back in
|
|
101
101
|
`cross-cli-contract.md` (see section 4).
|
|
@@ -113,14 +113,14 @@ hand-authored *inside* `multi-agent-plugins` and are never touched by sync.
|
|
|
113
113
|
<!-- facts: skillCount="skills - single authoring source" -->
|
|
114
114
|
```mermaid
|
|
115
115
|
graph TD
|
|
116
|
-
EXT["pipeline/skills/shared/external/<br/>
|
|
116
|
+
EXT["pipeline/skills/shared/external/<br/>168 skills - single authoring source<br/>(the pipeline's own phases read these too)"]
|
|
117
117
|
|
|
118
|
-
EXT -->|"cross-stack skills"| COMMONP["ai-common-toolkit
|
|
119
|
-
EXT -->|"outside facts for analysis"| ANAP["ai-analyst-toolkit
|
|
120
|
-
EXT -->|"Apple/Xcode-only"| IOSP["ai-ios-toolkit
|
|
121
|
-
EXT -->|"Android/Kotlin-only"| ANDP["ai-android-toolkit
|
|
122
|
-
EXT -->|"backend-only"| BEP["ai-backend-toolkit
|
|
123
|
-
EXT -->|"web/frontend-only"| FEP["ai-frontend-toolkit
|
|
118
|
+
EXT -->|"cross-stack skills"| COMMONP["ai-common-toolkit"]
|
|
119
|
+
EXT -->|"outside facts for analysis"| ANAP["ai-analyst-toolkit"]
|
|
120
|
+
EXT -->|"Apple/Xcode-only"| IOSP["ai-ios-toolkit"]
|
|
121
|
+
EXT -->|"Android/Kotlin-only"| ANDP["ai-android-toolkit"]
|
|
122
|
+
EXT -->|"backend-only"| BEP["ai-backend-toolkit"]
|
|
123
|
+
EXT -->|"web/frontend-only"| FEP["ai-frontend-toolkit"]
|
|
124
124
|
|
|
125
125
|
COMMONP --> BUMP{"skill set<br/>changed?"}
|
|
126
126
|
ANAP --> BUMP
|
|
@@ -136,7 +136,7 @@ graph TD
|
|
|
136
136
|
style EXT fill:#ffd,stroke:#333
|
|
137
137
|
```
|
|
138
138
|
|
|
139
|
-
|
|
139
|
+
Together the plugins carry more skills than the <!-- fact:skillCount -->168<!-- /fact -->-skill source because each
|
|
140
140
|
plugin also carries its own authored `reference/`, `workflow/` and `tools/`
|
|
141
141
|
skills and an `index` router. A vendored knowledge skill ships in exactly one
|
|
142
142
|
plugin: cross-stack skills go to `ai-common-toolkit` rather than into every
|
|
@@ -239,8 +239,8 @@ Detail: [`unattended-security.md`](../pipeline/multi-agent-refs/features/unatten
|
|
|
239
239
|
|
|
240
240
|
### multi-agent-toolkit-mcp's tools, by category
|
|
241
241
|
|
|
242
|
-
<!-- fact:toolCount -->
|
|
243
|
-
at toolkit <!-- fact:toolkitVersion -->3.
|
|
242
|
+
<!-- fact:toolCount -->230<!-- /fact --> tools in <!-- fact:toolFamilyCount -->23<!-- /fact --> families, counted from the server's own `tools/list` response
|
|
243
|
+
at toolkit <!-- fact:toolkitVersion -->3.32.0<!-- /fact --> rather than from a README. Three families are defined in
|
|
244
244
|
modules the main file only spreads in, so a count taken from the source reads
|
|
245
245
|
low; the response is the only place the whole surface appears at once. A
|
|
246
246
|
family is the prefix every tool name carries.
|
|
@@ -253,8 +253,8 @@ skill body and leaves frontmatter `allowed-tools` alone. Both qualified forms
|
|
|
253
253
|
let `lint-mcp-refs.mjs` check that the tool exists.
|
|
254
254
|
|
|
255
255
|
The families can be narrowed per host: `MCP_TOOLKIT_CAPS` serves only the named
|
|
256
|
-
ones, and unset serves all <!-- fact:toolCount -->
|
|
257
|
-
sees 50 tools instead of <!-- fact:toolCount -->
|
|
256
|
+
ones, and unset serves all <!-- fact:toolCount -->230<!-- /fact -->. A frontend repo that sets `web,code,context`
|
|
257
|
+
sees 50 tools instead of <!-- fact:toolCount -->230<!-- /fact -->, which matters because every registered server's
|
|
258
258
|
tool list is charged against the context window on every turn.
|
|
259
259
|
|
|
260
260
|
| Family | Tools | Primary pipeline consumers |
|
|
@@ -304,3 +304,40 @@ tool list is charged against the context window on every turn.
|
|
|
304
304
|
present *for specific task types* (component work, UI testing) but functions
|
|
305
305
|
without either - a non-component bugfix task never touches the plugin marketplace,
|
|
306
306
|
and a task with no UI-testing step never opens the MCP connection.
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
## 6. Release step: staged npm publish
|
|
311
|
+
|
|
312
|
+
Both npm packages, the pipeline and `multi-agent-toolkit-mcp`, are published
|
|
313
|
+
with `pipeline/scripts/publish-staged.mjs` from a clean checkout of the
|
|
314
|
+
release tag, never with a bare `npm publish`. `latest` then only ever names a
|
|
315
|
+
version the registry was seen to serve and that installed:
|
|
316
|
+
|
|
317
|
+
1. `npm pack`, and the tarball's sha512 computed locally; npm's reported
|
|
318
|
+
integrity must agree.
|
|
319
|
+
2. `npm publish <tarball> --tag candidate`. A version the registry already
|
|
320
|
+
holds with the same bytes is a resumed release and is not published again;
|
|
321
|
+
with other bytes it is refused.
|
|
322
|
+
3. Poll the packument over HTTP (not `npm view`, whose cache answers before
|
|
323
|
+
the registry does) until the version carries the local integrity and the
|
|
324
|
+
`candidate` tag names it. A different integrity fails at once.
|
|
325
|
+
4. Download the tarball the registry serves and compare its sha512.
|
|
326
|
+
5. Install that tarball into an empty temp project with scripts off, and check
|
|
327
|
+
the installed version and its bins.
|
|
328
|
+
6. Run `--smoke "<cmd>"` in that project, when given.
|
|
329
|
+
7. `npm dist-tag add <name>@<version> latest`, then poll until `latest` names it.
|
|
330
|
+
|
|
331
|
+
```bash
|
|
332
|
+
node pipeline/scripts/publish-staged.mjs --dir . --userconfig "$TMP_NPMRC" \
|
|
333
|
+
--smoke "node node_modules/@mmerterden/multi-agent-pipeline/index.js --version"
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
`--userconfig` points every npm call at a temporary npmrc built from the
|
|
337
|
+
credential store, so the token never reaches argv. Exit 0 means promoted; 1
|
|
338
|
+
means nothing was published; 3 means the version is on `candidate` and
|
|
339
|
+
`latest` did not move, and running the same command again resumes from the
|
|
340
|
+
registry check. `--dry-run` stops after the pack. `test/publish-staged.test.mjs`
|
|
341
|
+
drives the whole flow against a fake npm and a fake registry, including a
|
|
342
|
+
corrupted upload, a slow registry, a failed install, a failed smoke and a
|
|
343
|
+
resumed release.
|
package/docs/facts.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$comment": "Generated by pipeline/scripts/gen-facts.mjs. Do not hand-edit: the site reads this, and a number edited here instead of at its source is the drift this file removes.",
|
|
3
3
|
"generatedAt": "2026-11-03",
|
|
4
|
-
"version": "20.
|
|
4
|
+
"version": "20.42.0",
|
|
5
5
|
"phaseSchema": 2,
|
|
6
6
|
"phases": [
|
|
7
7
|
{
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"analysis": [0, 1, 2, 3, 4, 5]
|
|
37
37
|
},
|
|
38
38
|
"commandCount": 71,
|
|
39
|
-
"skillCount":
|
|
40
|
-
"skillCountAll":
|
|
39
|
+
"skillCount": 168,
|
|
40
|
+
"skillCountAll": 242,
|
|
41
41
|
"agentCount": 11,
|
|
42
42
|
"hosts": ["Claude Code", "Codex CLI", "Copilot CLI"],
|
|
43
|
-
"toolCount":
|
|
43
|
+
"toolCount": 230,
|
|
44
44
|
"toolCategories": {
|
|
45
45
|
"ios": 42,
|
|
46
46
|
"web": 38,
|
|
@@ -55,17 +55,17 @@
|
|
|
55
55
|
"security": 5,
|
|
56
56
|
"ui": 5,
|
|
57
57
|
"context": 4,
|
|
58
|
+
"media": 4,
|
|
58
59
|
"pass": 4,
|
|
59
60
|
"document": 3,
|
|
60
61
|
"learnings": 3,
|
|
61
62
|
"research": 3,
|
|
62
63
|
"agent": 2,
|
|
63
64
|
"llm": 2,
|
|
64
|
-
"media": 2,
|
|
65
65
|
"coverage": 1,
|
|
66
66
|
"social": 1,
|
|
67
67
|
"test": 1
|
|
68
68
|
},
|
|
69
|
-
"pluginSkillCount":
|
|
70
|
-
"toolkitVersion": "3.
|
|
69
|
+
"pluginSkillCount": 264,
|
|
70
|
+
"toolkitVersion": "3.32.0"
|
|
71
71
|
}
|
package/docs/features.md
CHANGED
|
@@ -54,7 +54,7 @@ The install is not only useful while `/multi-agent` is running. `rules/outside-t
|
|
|
54
54
|
|
|
55
55
|
- **Onboarded service credentials.** Resolve the logical name through `credential-store.sh` and read the issue, page or log. Writes route through the pipeline commands, which carry the rules that make them safe - issues are never auto-closed, PR bodies use `Ref:`, outward prose goes through the humanizer.
|
|
56
56
|
- **The stack skills enabled for this repo.** Each toolkit's own `index` skill routes. The pipeline reads the effective `enabledPlugins` rather than keeping a stack table, so a seventh toolkit needs no code change.
|
|
57
|
-
- **The `multi-agent-toolkit` MCP.** <!-- fact:toolCount -->
|
|
57
|
+
- **The `multi-agent-toolkit` MCP.** <!-- fact:toolCount -->230<!-- /fact --> tools, most of them for a running app.
|
|
58
58
|
|
|
59
59
|
Uninstall preserves the whole layer - tokens, the reader that opens them, the mapping that names them, the MCP registration. It is 1.5 kB of always-loaded text; the detail lives in a ref that loads on demand, and a gate keeps both under a ceiling because every byte there is paid by every session.
|
|
60
60
|
|
|
@@ -68,6 +68,12 @@ Phase 1 queries it to hand Explore a ranked starting file set instead of a full
|
|
|
68
68
|
|
|
69
69
|
Measured on a 4,300-file Swift app against a grep-and-read baseline at the same 30,000-token retrieval budget: 80.4% key-fact coverage at 18,465 tokens against 66.0% at 24,555. The gain is entirely in searches phrased in domain words (63.3% against 32.0%, at under half the cost). When the task already names an exact type, `grep -lw` is still slightly better and slightly cheaper, and the command says so rather than overselling. Reasoning, trade and limits: `docs/adr/0010-own-code-graph.md`.
|
|
70
70
|
|
|
71
|
+
### Product Tree (`product-tree.mjs`, off by default)
|
|
72
|
+
|
|
73
|
+
A screen layer over the code graph: screens, routes, flows (coordinators), localized strings, endpoints and tests, derived without a model into `~/.claude/knowledge/<project>/product-tree.json`, so a bug written in the words a user saw can reach the files behind that screen. SwiftUI, Compose (including Navigation 3) and Next.js / react-router are read; programmatic navigation is counted and listed when its destination is computed, so coverage is a number rather than an assumption. The model may only propose additions with evidence; a person agrees at a terminal, agent-guard asks before an agent runs `agree` or `reject`, and an unattended run never decides.
|
|
74
|
+
|
|
75
|
+
Measured on 230 held-out bug fixes from eight repositories, the screen layer did not beat the graph-only ranking (recall@10 46.5% against 47.1%, McNemar p = 1.0), so `prefs.global.productTree.enabled` stays `false`. Method, numbers and coverage: `docs/adr/0019-product-tree.md`.
|
|
76
|
+
|
|
71
77
|
### Stack Auto-Detection
|
|
72
78
|
|
|
73
79
|
| Platform | Detection | Guide Loaded |
|
|
@@ -250,7 +256,7 @@ A triage verdict is a judgment call; a failing repro test is proof. When `prefs.
|
|
|
250
256
|
|
|
251
257
|
### Immutable-Test Rule + `test_lines_removed` Signal
|
|
252
258
|
|
|
253
|
-
Existing tests are immutable during a task: deleting, renaming, or weakening an assertion to reach green is a violation (`refs/rules.md`, Phase 2 GREEN step). A test changes only when the task changes the spec it encodes, named in the commit body. Deterministic backstop: `diff-risk-score.mjs` emits `test_lines_removed` (w=3.0) for any test-classified file whose diff removes more lines than it adds.
|
|
259
|
+
Existing tests are immutable during a task: deleting, renaming, or weakening an assertion to reach green is a violation (`refs/rules.md`, Phase 2 GREEN step). A test changes only when the task changes the spec it encodes, named in the commit body. Deterministic backstop: `diff-risk-score.mjs` emits `test_lines_removed` (w=3.0) for any test-classified file whose diff removes more lines than it adds. In Phase 2 the tests a todo wrote in RED are kept (`tdd-red` stores their bytes): `tdd-green` refuses a run in which one was weakened or deleted unless `--test-edit-reason` says why, `tdd-restore` puts them back, and `test-integrity-gate.mjs --state` reports a recorded edit as important and an unrecorded one as blocking.
|
|
254
260
|
|
|
255
261
|
### Update Check at Run Start
|
|
256
262
|
|
|
@@ -308,9 +314,13 @@ Detail: [`autopilot-operations.md`](../pipeline/multi-agent-refs/features/autopi
|
|
|
308
314
|
### Security Base
|
|
309
315
|
|
|
310
316
|
- **Fail-closed guard.** `agent-guard.sh` is the PreToolUse hook on `Bash`, `Edit|Write|NotebookEdit` and `WebFetch|mcp__multi-agent-toolkit__.*`. Under the variable a Bash command is judged only when it reduces to simple commands joined by `;`, `&&`, `||` and plain pipes between non-interpreter commands; a subshell, group, nested substitution, unquoted heredoc, background job, shell keyword, interpreter reading stdin, shell `-c`, inline interpreter program (`node -e`, `perl -e`, `php -r`, ...), program file the run wrote or modified, or runtime-built command name is refused unparsed. On what it parses: no push, PR, issue or tracker write, no Keychain read, no package install or manifest edit, no write into a protected path. The guard arms its own 5-second deadline and answers "block" on expiry when unattended.
|
|
317
|
+
- **Destructive floor, every mode.** A recursive `rm` of the filesystem root, of `$HOME` or of a directory above it (`~`, `$HOME`, `${HOME}/*`, `../..` resolved against the working directory, `--no-preserve-root`), and a fork bomb (`:(){ :|:& };:` under any name, perl's `fork while fork`) ask the user in an attended session and are refused unattended. A delete inside home or the project, a quoted mention and an ordinary shell function do not ask.
|
|
318
|
+
- **Encoded secrets.** The outbound gate, the command-line credential scan and the memory secret scan also match the certain credential shapes on a bounded decode of the text: base64 (standard and URL-safe), hex and rot13, two layers deep, a decoded run kept only when nine tenths of it is printable, at most 32 copies and 256 KB decoded per scan. A finding names the decode path (`encoding: "base64>hex"`). The guard reads a stored-secret read hidden the same way. Hashes, paths, images and encoded configuration are held to no finding by a negative set.
|
|
319
|
+
- **Guard probe.** `eval-guard-robustness.mjs` throws ReDoS-shaped input, a 1 MB string and 5000-deep nesting at every PreToolUse hook in the install template and at the library matchers, each in its own process group with a timeout. A probe fails on a timeout, an exit outside 0 and 2, a throw, or a median over the hook's own timeout (1 s for a library call); a dated known-holes list holds an accepted failure until its expiry. `npm test` runs the `--fast` subset; `npm run eval:guards` runs the whole probe.
|
|
311
320
|
- **Network allowlist.** `curl`, `wget`, `WebFetch` and the toolkit's `web_*` tools reach only hosts in the allowlist (`network.staticHosts` plus the configured service hosts); a URL built at run time, a proxy flag or a request body is refused, and `web_eval` is refused outright. The runner starts the toolkit with `MCP_TOOLKIT_URL_POLICY=strict` and `MCP_TOOLKIT_INDEX_DENY`.
|
|
312
321
|
- **No package installs.** A restore from the committed lockfile is allowed; adding a package is not.
|
|
313
|
-
- **Untrusted data.** Fetched bodies, ticket text, comments and PR text enter prompts inside `<untrusted-data>` delimiters that defuse a forged closing tag.
|
|
322
|
+
- **Untrusted data.** Fetched bodies, ticket text, comments and PR text enter prompts inside `<untrusted-data>` delimiters that defuse a forged closing tag. Text that reads like instructions to the model gets `suspicious="instruction-override,tool-invocation,..."` on its block, naming in a fixed order the classes the toolkit uses for the same mark: instruction-override (override phrases, new-directive headers, role reassignment, prompt probes, requests to keep something from the user), role-tag (chat template tokens and forged conversation turns), tool-invocation, exfiltration and fence-escape. The patterns are matched on the text and on a folded copy, over the head and tail of a long text; hidden or look-alike characters hide text rather than instruct, so they are not marked. The mark is a signal and never blocks; the toolkit vendors the same file, and a block it already labels with `injection-flags` gets no second mark.
|
|
323
|
+
- **Risky settings at install.** Before the installer merges its hooks it reads `~/.claude/settings.json` for what lets anything run unasked: `bypassPermissions` with a blanket Bash allow or every project MCP server enabled (HIGH), a hook that pipes fetched or decoded code into a shell (HIGH), a literal credential (HIGH), and each risky setting alone or a floating MCP launch (MEDIUM). It prints the rule and the place, never a value, changes nothing, and leaves `multi-agent-risky-settings.json` for `/multi-agent:setup`, which asks about each HIGH finding.
|
|
314
324
|
- **Permission profile.** `install --unattended` writes a `dontAsk` profile with a narrow allow list and deny rules into `~/.claude/multi-agent-unattended.settings.json`, printed in full before anything is written; the runner passes it with `claude --settings`, so `~/.claude/settings.json` and attended sessions are unchanged. A default install writes no permissions.
|
|
315
325
|
- **Machine setup, applied by the operator.** A separate non-admin macOS user for the runner, per-repo GitHub credentials limited to contents and pull requests, a Jira token that can only read and comment, and GitHub rulesets on every default and release branch (no force-push, no deletion, PR and code-owner review required, the bot in no bypass list).
|
|
316
326
|
|
|
@@ -327,7 +337,7 @@ While the quality gates are active (`MULTI_AGENT_UNATTENDED=1`, or `state.autopi
|
|
|
327
337
|
| `verify-citations` | a triage citation quotes the line it cites (at least 8 non-space characters, or the whole line) |
|
|
328
338
|
| pre-existing claims | a "pre-existing" finding cites a line the diff from the base does not add or change |
|
|
329
339
|
| `plan-coverage` | every plan step is accounted for; a planned run with no todos is a gap |
|
|
330
|
-
| `evidence-gate`, `test-summary` | build and test claims read with the stack's own markers and a positive executed test count |
|
|
340
|
+
| `evidence-gate`, `test-summary` | build and test claims read with the stack's own markers and a positive executed test count; the run must cover the whole suite (a narrowed command such as `-only-testing`, `-k`, `-t` or one test file fails) and be on the source as it is now: the entry carries a digest of the working tree, so an edit after the build makes it stale at commit |
|
|
331
341
|
| `test-strength` | a new test goes red without the change it claims to cover |
|
|
332
342
|
| `review-decision` | a `blocking` finding carries two independent reviewers or a failing test |
|
|
333
343
|
| `spec-consistency`, `plan-critique` | recorded, not required at commit (see below) |
|
|
@@ -404,6 +414,7 @@ Per-phase token budgets prevent runaway sessions. If a phase exceeds its budget,
|
|
|
404
414
|
- **Cost Telemetry**: Per-phase token cost tracking (`tokens_in`, `tokens_out`, `model`, `duration_ms`). Omitted fields handled gracefully.
|
|
405
415
|
- **Phase Tracker**: Cross-CLI visual progress (current phase, elapsed time, iteration count).
|
|
406
416
|
- **Phase Banner**: Terminal UI for phase transitions with Unicode box-drawing characters.
|
|
417
|
+
- **Status Line (opt-in)**: `node ~/.claude/scripts/statusline.mjs install` adds a Claude Code `statusLine` showing the run this session drives: phase, cost against `costBudget`, gates passed and the first failing one, and whether it waits for an answer. Local files only, no network. Install never replaces a `statusLine` that is already set; `uninstall` removes only its own.
|
|
407
418
|
- **Per-task Cost Breakdown in agent-log.md**: Phase 5 appends a 4-column block (Phase · Model · Tokens in/out · Est. USD) to every run's `agent-log.md`. Sourced from `phase-tracker.sh tokens` accumulators × `cost-table.json` prices. Independent of the channels-side `reportContent.costSummary` toggle. The `LOG_METRIC_FORWARD_TO_TRACKER=1` env flag mirrors `tokens_in`/`tokens_out`/`model` from `log-metric.sh` into the tracker so JSONL metrics and the cost block stay in sync from one call site.
|
|
408
419
|
|
|
409
420
|
### Run Post-Mortem (`/multi-agent:postmortem`)
|