@mmerterden/multi-agent-pipeline 23.3.0 → 23.5.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 +73 -0
- package/README.md +27 -8
- package/README.tr.md +28 -9
- package/SECURITY.md +16 -0
- package/docs/adr/0008-installer-modularization-and-secret-leak-defense.md +1 -1
- package/docs/adr/0010-own-code-graph.md +299 -8
- package/docs/architecture.md +3 -3
- package/docs/ecosystem.md +10 -10
- package/docs/engineering.md +4 -4
- package/docs/facts.json +8 -8
- package/docs/features.md +5 -5
- package/docs/performance.md +17 -17
- package/install/_dev-only-files.mjs +9 -0
- package/install/_platform-filter.mjs +2 -55
- package/install/claude.mjs +28 -2
- package/install/codex.mjs +1 -3
- package/install/copilot.mjs +4 -8
- package/install/templates/claude-hooks.json +32 -1
- package/manifest.json +236 -167
- package/package.json +11 -3
- package/pipeline/commands/multi-agent/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/design-check/SKILL.md +3 -2
- package/pipeline/commands/multi-agent/diff-explain/SKILL.md +3 -3
- package/pipeline/commands/multi-agent/graph/SKILL.md +57 -24
- package/pipeline/commands/multi-agent/pair/SKILL.md +92 -0
- package/pipeline/commands/multi-agent/prune-prompts/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/search/SKILL.md +7 -1
- package/pipeline/commands/multi-agent/status/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/sync/SKILL.md +3 -3
- package/pipeline/contract/CHANGELOG.md +63 -0
- package/pipeline/contract/README.md +1 -0
- package/pipeline/contract/build.mjs +13 -1
- package/pipeline/contract/fixtures/error-invalid-request.json +1 -1
- package/pipeline/contract/fixtures/error-unauthorized.json +1 -1
- package/pipeline/contract/fixtures/runs-awaiting-question.json +4 -1
- package/pipeline/contract/fixtures/runs-empty.json +1 -1
- package/pipeline/contract/fixtures/runs-failed.json +4 -1
- package/pipeline/contract/fixtures/runs-old-schema.json +3 -0
- package/pipeline/contract/fixtures/runs-pr-opened-redacted.json +4 -1
- package/pipeline/contract/fixtures/runs-pr-opened.json +4 -1
- package/pipeline/contract/fixtures/runs-running.json +4 -1
- package/pipeline/contract/manifest.json +41 -15
- package/pipeline/contract/types/index.d.ts +81 -3
- package/pipeline/lib/detach-self.mjs +95 -0
- package/pipeline/lib/public-mcp-servers.mjs +33 -0
- package/pipeline/lib/rotated-log.mjs +93 -0
- package/pipeline/lib/stack-detect.sh +1 -1
- package/pipeline/lib/tls-trust.mjs +29 -0
- package/pipeline/lib/usage-lifecycle.mjs +9 -11
- package/pipeline/lib/usage-names.generated.mjs +613 -0
- package/pipeline/lib/usage-run-key.mjs +235 -0
- package/pipeline/lib/usage-vocab.mjs +210 -0
- package/pipeline/multi-agent-refs/analysis/intake.md +2 -2
- package/pipeline/multi-agent-refs/analysis/render.md +1 -1
- package/pipeline/multi-agent-refs/channels/generator.md +4 -5
- package/pipeline/multi-agent-refs/cross-cli-contract.md +3 -3
- package/pipeline/multi-agent-refs/design-check/init-inventory.md +11 -1
- package/pipeline/multi-agent-refs/design-check/scope-and-ledger.md +1 -1
- package/pipeline/multi-agent-refs/features/code-graph.md +146 -11
- package/pipeline/multi-agent-refs/features/code-intelligence.md +16 -14
- package/pipeline/multi-agent-refs/features/dev-critic.md +7 -7
- package/pipeline/multi-agent-refs/features/model-fallback.md +6 -4
- package/pipeline/multi-agent-refs/features/remote-control.md +253 -0
- package/pipeline/multi-agent-refs/features/review-delta.md +1 -1
- package/pipeline/multi-agent-refs/features/review-file-set.md +3 -3
- package/pipeline/multi-agent-refs/features/review-multi-repo.md +1 -1
- package/pipeline/multi-agent-refs/features/session-brief.md +42 -0
- package/pipeline/multi-agent-refs/features/skill-conformance.md +3 -3
- package/pipeline/multi-agent-refs/features/usage-reporting.md +255 -27
- package/pipeline/multi-agent-refs/help/en.md +3 -2
- package/pipeline/multi-agent-refs/help/tr.md +3 -2
- package/pipeline/multi-agent-refs/knowledge.md +1 -1
- package/pipeline/multi-agent-refs/orchestrator/dispatcher.md +2 -2
- package/pipeline/multi-agent-refs/phases/operations.md +2 -2
- package/pipeline/multi-agent-refs/phases/phase-0-init.md +13 -12
- package/pipeline/multi-agent-refs/phases/phase-1-plan.md +4 -4
- package/pipeline/multi-agent-refs/phases/phase-3-review.md +2 -0
- package/pipeline/multi-agent-refs/phases/phase-5-report.md +1 -1
- package/pipeline/multi-agent-refs/platform-parity.md +2 -2
- package/pipeline/multi-agent-refs/wiki-capture.md +3 -17
- package/pipeline/office/index.html +1309 -236
- package/pipeline/office/toolkit.json +1 -1
- package/pipeline/rules/outside-the-pipeline.md +1 -1
- package/pipeline/schemas/activity.schema.json +23 -0
- package/pipeline/schemas/agent-state.schema.json +6 -1
- package/pipeline/schemas/code-graph-calls.schema.json +254 -0
- package/pipeline/schemas/code-graph-docs.schema.json +223 -0
- package/pipeline/schemas/code-graph-infra.schema.json +227 -0
- package/pipeline/schemas/code-graph.schema.json +2 -2
- package/pipeline/schemas/examples/design-check-config.json +27 -0
- package/pipeline/schemas/learning-curve.schema.json +67 -0
- package/pipeline/schemas/mcp-health.schema.json +96 -0
- package/pipeline/schemas/office-jobs.json +69 -2
- package/pipeline/schemas/office-jobs.schema.json +8 -1
- package/pipeline/schemas/phases.json +5 -0
- package/pipeline/schemas/phases.schema.json +8 -0
- package/pipeline/schemas/prefs.schema.json +46 -12
- package/pipeline/schemas/runs-index.schema.json +17 -0
- package/pipeline/schemas/toolkit-path-params.json +78 -8
- package/pipeline/scripts/README.md +1 -0
- package/pipeline/scripts/_code-graph.mjs +184 -103
- package/pipeline/scripts/_contract-core.mjs +1 -1
- package/pipeline/scripts/_contract-routes-office.mjs +33 -0
- package/pipeline/scripts/_diff-impact.mjs +21 -2
- package/pipeline/scripts/_graph-sidecars.mjs +372 -0
- package/pipeline/scripts/_http-post.mjs +103 -115
- package/pipeline/scripts/_safe-read.mjs +57 -0
- package/pipeline/scripts/_skill-practices.mjs +26 -0
- package/pipeline/scripts/_strip-code.mjs +380 -0
- package/pipeline/scripts/activity-snapshot.mjs +13 -1
- package/pipeline/scripts/aggregate-metrics.mjs +3 -5
- package/pipeline/scripts/build-stack-plugins.mjs +1 -47
- package/pipeline/scripts/call-graph/index.mjs +78 -0
- package/pipeline/scripts/call-graph/lang/cpp.mjs +308 -0
- package/pipeline/scripts/call-graph/lang/csharp.mjs +130 -0
- package/pipeline/scripts/call-graph/lang/go.mjs +303 -0
- package/pipeline/scripts/call-graph/lang/java.mjs +370 -0
- package/pipeline/scripts/call-graph/lang/kotlin.mjs +397 -0
- package/pipeline/scripts/call-graph/lang/python.mjs +399 -0
- package/pipeline/scripts/call-graph/lang/rust.mjs +345 -0
- package/pipeline/scripts/call-graph/lang/shared.mjs +230 -0
- package/pipeline/scripts/call-graph/lang/swift.mjs +432 -0
- package/pipeline/scripts/call-graph/lang/typescript.mjs +692 -0
- package/pipeline/scripts/call-graph/lex.mjs +396 -0
- package/pipeline/scripts/call-graph/platform.mjs +86 -0
- package/pipeline/scripts/call-graph/profiles.mjs +89 -0
- package/pipeline/scripts/call-graph/resolve.mjs +1125 -0
- package/pipeline/scripts/call-graph/scan.mjs +267 -0
- package/pipeline/scripts/code-graph-rules/android.json +7 -2
- package/pipeline/scripts/code-graph-rules/cpp.json +99 -0
- package/pipeline/scripts/code-graph-rules/csharp.json +102 -0
- package/pipeline/scripts/code-graph-rules/go.json +2 -1
- package/pipeline/scripts/code-graph-rules/ios.json +3 -1
- package/pipeline/scripts/code-graph-rules/java.json +76 -0
- package/pipeline/scripts/code-graph-rules/node.json +7 -2
- package/pipeline/scripts/code-graph-rules/python.json +6 -2
- package/pipeline/scripts/code-graph-rules/rust.json +105 -0
- package/pipeline/scripts/contract-server.mjs +3 -0
- package/pipeline/scripts/design-check-config.mjs +205 -0
- package/pipeline/scripts/feedback-send.mjs +26 -26
- package/pipeline/scripts/gate-ledger.mjs +2 -1
- package/pipeline/scripts/gen-facts.mjs +1 -2
- package/pipeline/scripts/gen-usage-names.mjs +124 -0
- package/pipeline/scripts/graph-affected.mjs +109 -20
- package/pipeline/scripts/graph-build.mjs +95 -15
- package/pipeline/scripts/graph-export.mjs +272 -0
- package/pipeline/scripts/graph-hint.mjs +15 -2
- package/pipeline/scripts/graph-query.mjs +305 -26
- package/pipeline/scripts/graph-report.mjs +187 -1
- package/pipeline/scripts/health-report.mjs +3 -4
- package/pipeline/scripts/infra/docs.mjs +317 -0
- package/pipeline/scripts/infra/extract.mjs +998 -0
- package/pipeline/scripts/infra/graph.mjs +245 -0
- package/pipeline/scripts/infra/yaml-lite.mjs +311 -0
- package/pipeline/scripts/job-launch.mjs +67 -2
- package/pipeline/scripts/learning-curve.mjs +288 -178
- package/pipeline/scripts/log-metric.sh +10 -1
- package/pipeline/scripts/mcp-health.mjs +309 -0
- package/pipeline/scripts/note-agent-event.mjs +3 -4
- package/pipeline/scripts/note-command-use.mjs +333 -0
- package/pipeline/scripts/note-command-use.sh +126 -0
- package/pipeline/scripts/note-mcp-call.sh +89 -0
- package/pipeline/scripts/note-mcp-failure.mjs +272 -1
- package/pipeline/scripts/note-session.sh +62 -3
- package/pipeline/scripts/note-skill-use.mjs +58 -2
- package/pipeline/scripts/office-build.mjs +115 -1
- package/pipeline/scripts/office-memory.mjs +14 -5
- package/pipeline/scripts/pair.mjs +333 -0
- package/pipeline/scripts/pre-push-check.sh +1 -1
- package/pipeline/scripts/remote/cbor.mjs +128 -0
- package/pipeline/scripts/remote/contract.mjs +98 -0
- package/pipeline/scripts/remote/handler.mjs +330 -0
- package/pipeline/scripts/remote/handles.mjs +57 -0
- package/pipeline/scripts/remote/lifecycle.mjs +186 -0
- package/pipeline/scripts/remote/listener.mjs +204 -0
- package/pipeline/scripts/remote/lockout.mjs +103 -0
- package/pipeline/scripts/remote/nonces.mjs +61 -0
- package/pipeline/scripts/remote/pairing.mjs +519 -0
- package/pipeline/scripts/remote/qr-encode.mjs +459 -0
- package/pipeline/scripts/remote/store.mjs +191 -0
- package/pipeline/scripts/remote/transport.mjs +211 -0
- package/pipeline/scripts/remote/verbs.json +70 -0
- package/pipeline/scripts/remote/verbs.mjs +217 -0
- package/pipeline/scripts/remote/webauthn.mjs +169 -0
- package/pipeline/scripts/remote/wire.mjs +364 -0
- package/pipeline/scripts/remote-listener.mjs +83 -0
- package/pipeline/scripts/route-learn.mjs +4 -4
- package/pipeline/scripts/run-kill.mjs +1 -1
- package/pipeline/scripts/run-write.mjs +13 -2
- package/pipeline/scripts/runs-index.mjs +30 -3
- package/pipeline/scripts/search-logs.sh +9 -0
- package/pipeline/scripts/session-brief.mjs +458 -0
- package/pipeline/scripts/session-brief.sh +130 -0
- package/pipeline/scripts/skill-usage.mjs +16 -5
- package/pipeline/scripts/test-gap-rules/cpp.json +25 -0
- package/pipeline/scripts/test-gap-rules/csharp.json +20 -0
- package/pipeline/scripts/test-gap-rules/java.json +20 -0
- package/pipeline/scripts/test-gap-rules/rust.json +14 -0
- package/pipeline/scripts/token-budget-report.mjs +3 -2
- package/pipeline/scripts/uninstall.mjs +29 -0
- package/pipeline/scripts/usage-access.mjs +16 -31
- package/pipeline/scripts/usage-health.mjs +31 -62
- package/pipeline/scripts/usage-register-beacon.mjs +11 -22
- package/pipeline/scripts/usage-register.mjs +39 -29
- package/pipeline/scripts/usage-report.mjs +579 -178
- package/pipeline/scripts/validate-code-graph.mjs +361 -111
- package/pipeline/scripts/write-state.mjs +39 -0
- package/pipeline/skills/.skill-manifest.json +21 -17
- package/pipeline/skills/.skills-index.json +13 -2
- package/pipeline/skills/shared/README.md +5 -4
- package/pipeline/skills/shared/core/multi-agent-design-check/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-diff-explain/SKILL.md +3 -3
- package/pipeline/skills/shared/core/multi-agent-graph/SKILL.md +55 -21
- package/pipeline/skills/shared/core/multi-agent-pair/SKILL.md +41 -0
- package/pipeline/skills/shared/core/multi-agent-prune-prompts/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-sync/SKILL.md +3 -3
- package/pipeline/skills/shared/external/app-store-optimization/SKILL.md +2 -3
- package/pipeline/skills/shared/external/app-store-optimization/references/keyword-research-methodology.md +2 -2
- package/pipeline/skills/shared/external/app-store-optimization/references/product-page-variants.md +2 -2
- package/pipeline/skills/shared/external/app-store-review/SKILL.md +11 -4
- package/pipeline/skills/shared/external/build-settings-audit/SKILL.md +1 -1
- package/pipeline/skills/shared/external/build-time-benchmark/SKILL.md +5 -5
- package/pipeline/skills/shared/external/build-time-fixes/SKILL.md +5 -5
- package/pipeline/skills/shared/external/build-time-optimizer/SKILL.md +6 -6
- package/pipeline/skills/shared/external/free-llm-apis/references/providers.md +1 -0
- package/pipeline/skills/shared/external/ios-coding-standard/references/STANDARD.md +2 -2
- package/pipeline/skills/shared/external/ios-haptics/references/core-haptics.md +1 -1
- package/pipeline/skills/shared/external/localization-reuse-map/references/publish-and-snapshot.md +1 -1
- package/pipeline/skills/shared/external/package-build-audit/SKILL.md +3 -3
- package/pipeline/skills/shared/external/reverse-engineer-own-app/SKILL.md +2 -3
- package/pipeline/skills/shared/external/swift-compile-hotspots/SKILL.md +2 -2
- package/pipeline/skills/shared/external/weatherkit/SKILL.md +5 -6
- package/pipeline/skills/skills-index.md +3 -2
- package/docs/FIGMA_PIPELINE.md +0 -137
- package/pipeline/lib/identifier-scan.mjs +0 -156
- package/pipeline/scripts/_renamed-skills.mjs +0 -164
- package/pipeline/scripts/publish-staged.mjs +0 -324
- package/pipeline/skills/renamed.json +0 -30
- package/pipeline/skills/shared/external/ios-coding-standard/scripts/check_structure.py +0 -765
|
@@ -47,17 +47,210 @@ already has model routing for that), an MCP server (we ship our own toolkit),
|
|
|
47
47
|
and its multi-platform installers and hooks.
|
|
48
48
|
|
|
49
49
|
The engine is `pipeline/scripts/_code-graph.mjs`, with per-stack rules in
|
|
50
|
-
`pipeline/scripts/code-graph-rules/<stack>.json
|
|
51
|
-
|
|
52
|
-
`
|
|
53
|
-
|
|
50
|
+
`pipeline/scripts/code-graph-rules/<stack>.json` (ios, android, node, python,
|
|
51
|
+
go, rust, java, csharp, cpp), a call-edge resolver under
|
|
52
|
+
`pipeline/scripts/call-graph/`, an infrastructure and documentation extractor
|
|
53
|
+
under `pipeline/scripts/infra/`, entry points (`graph-build`, `graph-query`,
|
|
54
|
+
`graph-affected`, `graph-report`, `graph-export`, `validate-code-graph`), a
|
|
55
|
+
schema at `pipeline/schemas/code-graph.schema.json`, and the
|
|
56
|
+
`/multi-agent:graph` command. It sits behind
|
|
54
57
|
`prefs.global.codeGraph.enabled`, off when this was decided and on by default
|
|
55
58
|
since ADR 0017's change-impact work made Phase 3 depend on it.
|
|
56
59
|
|
|
60
|
+
## Layers: a main graph and sidecars
|
|
61
|
+
|
|
62
|
+
The main graph file (`code-graph.json`, schema 1.2.x) holds files, modules and
|
|
63
|
+
type-level symbols with `defines`, `imports`, `references` and `inherits` edges
|
|
64
|
+
only. Everything a newer capability adds sits in a sidecar file next to it:
|
|
65
|
+
|
|
66
|
+
| Sidecar | File | Built | Holds |
|
|
67
|
+
| ------- | -------------------- | ---------- | ------------------------------------------------------------------------------------------------------ |
|
|
68
|
+
| calls | `<graph>.calls.json` | by default | function and method nodes, `calls` edges |
|
|
69
|
+
| docs | `<graph>.docs.json` | opt-in | documentation sections, rationale comments |
|
|
70
|
+
| infra | `<graph>.infra.json` | opt-in | Dockerfile, Compose, Kubernetes, Helm, Terraform, CI, `.env`, application config, dependency manifests |
|
|
71
|
+
|
|
72
|
+
`--no-calls`, `--docs` and `--infra` on `graph-build` choose the layers for one
|
|
73
|
+
run; `code-graph.config.json` beside the graph (`{"calls": false, "docs": true,
|
|
74
|
+
"infra": true}`) chooses them per repo and a flag beats it. A sidecar a run did
|
|
75
|
+
not build is deleted, so none outlives the graph it was made against.
|
|
76
|
+
|
|
77
|
+
Each sidecar has its own schema (`code-graph-calls`, `-docs`, `-infra`) and
|
|
78
|
+
version. It records the graph it was built against (`parent`: generatedAt,
|
|
79
|
+
baseCommit, stack, node and edge counts), carries node and edge caps (calls
|
|
80
|
+
250,000 / 1,000,000; docs 20,000 / 80,000; infra 30,000 / 120,000), and a
|
|
81
|
+
`truncated` marker when a cap dropped something: edges go weakest-first, then
|
|
82
|
+
nodes no kept edge needs. The docs and infra sidecars also list the files they
|
|
83
|
+
read in a manifest, so a documentation or configuration file edited or added
|
|
84
|
+
after the build makes the layer stale.
|
|
85
|
+
|
|
86
|
+
Why a separate file: the published toolkit and every older reader validate the
|
|
87
|
+
main graph against schema 1.2.x and know its kinds. Folding calls, documentation
|
|
88
|
+
and configuration into it would double the file and break those readers.
|
|
89
|
+
With sidecars the main file is within 1 KB of the size it had before this
|
|
90
|
+
work (24.21 MB on the reference Swift app), HEAD's validator accepts it, and the
|
|
91
|
+
toolkit keeps working unchanged. New abilities are additive.
|
|
92
|
+
|
|
93
|
+
Readers (`graph-query`, `graph-report`, `graph-export`, `graph-affected`,
|
|
94
|
+
`graph-hint`) join the sidecars in memory when they are present and say plainly,
|
|
95
|
+
in a `notes` list or a stderr line, when one is absent, stale (the graph or the
|
|
96
|
+
manifest inputs moved), built against another graph (not joined), invalid, or
|
|
97
|
+
truncated. Joined nodes carry a `layer` and a degree of 0: hub and degree
|
|
98
|
+
metrics stay structural, so a call edge never ranks a function above a type.
|
|
99
|
+
|
|
100
|
+
## Call edges without a language server
|
|
101
|
+
|
|
102
|
+
Definitions and imports are regex over comment-stripped source. Calls need more
|
|
103
|
+
than a regex, and a tree-sitter binding is still forbidden, so `call-graph/`
|
|
104
|
+
holds a hand-written tokeniser, a bracket matcher and one declaration reader per
|
|
105
|
+
language (Swift, Kotlin, TypeScript and JavaScript, Python, Go, Rust, Java, C#,
|
|
106
|
+
C and C++), chosen by file extension. It finds the declarations of a file (types,
|
|
107
|
+
functions, fields, parameters, imports), reads each function body as call
|
|
108
|
+
chains (`root.member.method(args)`), and resolves the chains across files:
|
|
109
|
+
|
|
110
|
+
- the receiver's type from a declaration, a parameter, a field, `self`, a
|
|
111
|
+
constructor call, or the return type of the previous call in the chain
|
|
112
|
+
- the method on that type, on its supertypes, and on the extensions, impl blocks
|
|
113
|
+
and receiver methods that add to it
|
|
114
|
+
- a call through a protocol or interface, or to a method a subclass overrides,
|
|
115
|
+
also reaches each implementer's method (Go interfaces are satisfied
|
|
116
|
+
structurally)
|
|
117
|
+
- a bare call to a method of the enclosing type, a function in the same file, an
|
|
118
|
+
imported module, or a constructor
|
|
119
|
+
- overloads by argument count and labels; what stays ambiguous is reported as
|
|
120
|
+
ambiguous. JavaScript and TypeScript calls may pass any number of arguments,
|
|
121
|
+
so arity ranks candidates there and never rejects one
|
|
122
|
+
|
|
123
|
+
Every local, parameter and nested function is bound in its scope, so a name that
|
|
124
|
+
shadows an outer function resolves to the local one and produces no edge. A
|
|
125
|
+
function declared inside another is hoisted to the whole enclosing body and is
|
|
126
|
+
visible to the closures in it; a name the enclosing function binds as a plain
|
|
127
|
+
variable stays that variable inside the nested function. A module-level
|
|
128
|
+
variable that holds a function is the callee of a bare call in its own file.
|
|
129
|
+
|
|
130
|
+
What a bare name may denote:
|
|
131
|
+
|
|
132
|
+
- A type nested inside another type is reached by its bare name only from code
|
|
133
|
+
lexically inside the outer type or an extension of it (and, in Java and C#,
|
|
134
|
+
from a subclass). From anywhere else it needs the qualified spelling
|
|
135
|
+
(`Outer.Inner(...)`). In type position, where a bare spelling can be a
|
|
136
|
+
shortened qualified one, a nested type is reachable at medium.
|
|
137
|
+
- A name every platform already owns (`URL`, `Date`, `Timeline`, `Text`,
|
|
138
|
+
`print`, `Map`, `fetch`, `List`, ...; a short list per language in
|
|
139
|
+
`call-graph/platform.mjs`) is the platform's. It binds to a repository
|
|
140
|
+
declaration only when that declaration is in lexical scope: the same file, an
|
|
141
|
+
enclosing type, or a module an import names.
|
|
142
|
+
- In Swift a declaration in another build target is seen only when the caller's
|
|
143
|
+
target can see it. A target is the `Sources/<Target>` or `Tests/<Target>`
|
|
144
|
+
directory of a package, or the first directory of an Xcode project; a caller
|
|
145
|
+
sees its own target, a module it imports, and, in a test target, the app target
|
|
146
|
+
it is named after. A unique match in a target the caller cannot see is `low`.
|
|
147
|
+
- A name bound by an import that leads outside the repository is external (no
|
|
148
|
+
edge), whatever repository function shares it. Only a language whose imports
|
|
149
|
+
name modules a path can reach (`moduleSuffixes`) can call an import external;
|
|
150
|
+
elsewhere an unresolved import degrades the edge to low.
|
|
151
|
+
- `import { x } from m; export { x }`, `export { x } from m` and
|
|
152
|
+
`export * from m` are followed to the file that defines `x`.
|
|
153
|
+
|
|
154
|
+
Each `calls` edge records how it was derived (`via`) and a confidence defined
|
|
155
|
+
by what the resolver proved:
|
|
156
|
+
|
|
157
|
+
- `high`: a binding was resolved. The callee is in the same file, in a repo file
|
|
158
|
+
the caller imports by that name (through re-exports too), a member of the
|
|
159
|
+
enclosing type, a member of the receiver's declared type, or visible
|
|
160
|
+
package-wide in a language whose scope is the package (Go, Java, Kotlin, C#)
|
|
161
|
+
or in the caller's own Swift target.
|
|
162
|
+
- `medium`: inference. The type came through a chain of return types, a weak
|
|
163
|
+
receiver match, a dispatch to implementers, a type found by its bare name in
|
|
164
|
+
another package or in a Swift target reached by import, or a name unique in the
|
|
165
|
+
repo in a language without per-name imports.
|
|
166
|
+
- `low`: an unresolved binding: only the name and argument count identify the
|
|
167
|
+
callee, or an import was followed that did not reach the definition, or the
|
|
168
|
+
caller's target cannot see the declaration. A bare call that matches only a
|
|
169
|
+
same-directory file in JavaScript, TypeScript or Python is at most `low`: a
|
|
170
|
+
directory is not a scope in those languages. In script-style code, where
|
|
171
|
+
files share globals, such an edge is often right; anywhere else it is a lead.
|
|
172
|
+
|
|
173
|
+
A guess is never `certain`; the calls schema and validator reject it. A receiver
|
|
174
|
+
of a library type produces no edge, except for a method an extension in the
|
|
175
|
+
repository adds to that type: that edge is at most `medium`, and `high` only when
|
|
176
|
+
the call uses a parameter or shape only the extension declares. An unknown
|
|
177
|
+
receiver falls back to a method name that is unique in the repository, at low confidence and never for a
|
|
178
|
+
name common in standard libraries or on web and DOM objects.
|
|
179
|
+
|
|
180
|
+
Everything that is consumed without a person choosing it reads edges of medium
|
|
181
|
+
confidence and better by default: `--callers`, `--callees`, `--path`, the
|
|
182
|
+
report's most-called table and `graph-export`. `graph-affected` never follows a
|
|
183
|
+
`low` edge, prints each row's confidence and `via`, and marks a dependent
|
|
184
|
+
reached only through medium edges. Low edges appear only on request
|
|
185
|
+
(`--min-confidence low`) and are labelled as leads.
|
|
186
|
+
|
|
187
|
+
A call is attributed to the function that contains it, which becomes a node of
|
|
188
|
+
its own (`symbolKind` method or function, with an `owner`); a call outside any
|
|
189
|
+
function belongs to the file. A function is a node only in the calls sidecar.
|
|
190
|
+
Its id is its qualified name; an overload adds its parameter labels
|
|
191
|
+
(`Song.init(title:id:)`) and a true duplicate a numeral, so an id does not
|
|
192
|
+
change when lines above it move.
|
|
193
|
+
|
|
194
|
+
What it costs in precision and recall, stated so a reader does not assume more:
|
|
195
|
+
|
|
196
|
+
- No type inference beyond a constructor call, an annotation or a return type.
|
|
197
|
+
A receiver reached through a collection element, a closure's return value, a
|
|
198
|
+
generic container, a function value, a registry lookup or reflection is
|
|
199
|
+
unknown, and a call through such a value has no edge.
|
|
200
|
+
- Overloads that differ only by parameter type cannot be told apart; they are
|
|
201
|
+
reported as ambiguous with low confidence.
|
|
202
|
+
- Macros and code generation are invisible. In C and C++ each `#if` / `#else`
|
|
203
|
+
branch is read with its own bracket state.
|
|
204
|
+
- A trailing closure without parentheses (`foo { }`) is not a call.
|
|
205
|
+
- Parameter lists are scanned for calls (a default value such as
|
|
206
|
+
`copy = (a, b) => copyDir(a, b)`) in TypeScript and JavaScript only; the other
|
|
207
|
+
languages read function bodies. Nested functions are resolved in TypeScript and
|
|
208
|
+
JavaScript only. A self-recursive call has no edge.
|
|
209
|
+
- A dynamic import with a computed path binds nothing, and the calls on its
|
|
210
|
+
destructured names resolve at low confidence.
|
|
211
|
+
- Swift target boundaries come from directories and `import` lines, not from the
|
|
212
|
+
project file, so a project whose directories do not follow its targets sees
|
|
213
|
+
more `low` and `medium` edges than the truth.
|
|
214
|
+
- The lexer follows nested block comments (Swift, Kotlin, Rust), raw strings
|
|
215
|
+
(Swift `#"..."#`, Rust `r#"..."#`, C++ `R"x(...)x"`), and calls inside string
|
|
216
|
+
interpolation (Swift, Kotlin, JavaScript).
|
|
217
|
+
- A file over 1.5 MB, a binary one, one with a line over 4,000 characters, one
|
|
218
|
+
with more than 400,000 tokens, nesting deeper than 400, brackets that do not
|
|
219
|
+
balance, or that takes more than 2.5 s to analyse is not call-analysed; its
|
|
220
|
+
definitions are still in the graph and the count is in
|
|
221
|
+
`stats.callFilesSkipped`, the files and reasons in `coverage`. A build whose
|
|
222
|
+
call analysis passes four minutes in total stops analysing and records
|
|
223
|
+
`total-time-budget`; resolving the calls has its own two-minute budget, and the
|
|
224
|
+
files it did not reach are listed as `resolve-time-budget`.
|
|
225
|
+
|
|
226
|
+
## Configuration, documentation and rationale as nodes
|
|
227
|
+
|
|
228
|
+
With `--infra`, Dockerfiles, Compose files, Kubernetes manifests, Helm charts,
|
|
229
|
+
Kustomize, Terraform and Terragrunt, GitHub Actions and GitLab CI, `.env` files,
|
|
230
|
+
Gradle build configuration, application configuration files and dependency
|
|
231
|
+
manifests are read into `infra`, `env`, `config` and `module` nodes with `sets`,
|
|
232
|
+
`uses`, `builds`, `runs` and `reads` edges. Code that reads a variable or key by
|
|
233
|
+
a literal name (`process.env.X`, `os.getenv("X")`, `System.getenv`,
|
|
234
|
+
`@Value("${a.b}")`, `BuildConfig.X`, ...) gets a `reads` edge to the same `env:`
|
|
235
|
+
or `config:` node the infrastructure sets or defines. Only names are stored,
|
|
236
|
+
never values.
|
|
237
|
+
|
|
238
|
+
With `--docs`, documentation sections and decision records become `doc` nodes
|
|
239
|
+
with `mentions` edges to the files and symbols they name in backticks, and a
|
|
240
|
+
code comment that opens with NOTE, WHY, HACK or cites an ADR becomes a
|
|
241
|
+
`rationale` node with an `explains` edge to the declaration around it.
|
|
242
|
+
|
|
243
|
+
Both extractors read only regular files inside the repository root (symlinks
|
|
244
|
+
are not followed, nothing is read through one), bound every file by size, line
|
|
245
|
+
length, nesting and node count, run every pattern in linear time, and stop
|
|
246
|
+
collecting after 30 s, listing what they skipped in `coverage.skipped`. The YAML
|
|
247
|
+
reader keeps maps without a prototype, so a key named `__proto__`,
|
|
248
|
+
`constructor` or `prototype` is data.
|
|
249
|
+
|
|
57
250
|
## What we deliberately gave up
|
|
58
251
|
|
|
59
|
-
|
|
60
|
-
|
|
252
|
+
Definition extraction is regex over comment-stripped source, and the call
|
|
253
|
+
resolver is a set of lightweight readers, not parsers. Two further limits
|
|
61
254
|
follow from the same choice and are documented in the command rather than
|
|
62
255
|
hidden:
|
|
63
256
|
|
|
@@ -79,6 +272,99 @@ hidden:
|
|
|
79
272
|
|
|
80
273
|
## Measurement
|
|
81
274
|
|
|
275
|
+
Call-edge quality is measured three ways, and they are kept apart.
|
|
276
|
+
|
|
277
|
+
Fixtures: `eval-call-edges.mjs` runs nine hand-checked cases, one per language,
|
|
278
|
+
under `pipeline/eval/call-edges/` (small sources, a list of every call to
|
|
279
|
+
something the sources define, a floor per case). A call to a library is not
|
|
280
|
+
listed, so an edge for it counts against precision. Pooled over 147 expected
|
|
281
|
+
edges: recall 98.0%, precision at medium and above 100.0%. The cases include
|
|
282
|
+
calls the resolver cannot follow, so recall is not 100%.
|
|
283
|
+
|
|
284
|
+
Samples to read by hand. Precision on real code is checked, not computed:
|
|
285
|
+
`eval-call-sample.mjs` prints a reproducible sample of edges, each with the
|
|
286
|
+
caller's lines that name the callee and the callee's declaration. The seeds are
|
|
287
|
+
fixed: 7 for this repository, 278 for a Next.js site, 11 for a Swift app.
|
|
288
|
+
|
|
289
|
+
```
|
|
290
|
+
node pipeline/scripts/graph-build.mjs --root <repo> --stack <node|ios> --out <dir>/code-graph.json
|
|
291
|
+
node pipeline/scripts/eval-call-sample.mjs --graph <dir>/code-graph.json --root <repo> \
|
|
292
|
+
--confidence high --n 40 --seed 7
|
|
293
|
+
node pipeline/scripts/eval-call-sample.mjs --graph <dir>/code-graph.json --root <repo> \
|
|
294
|
+
--confidence low --n 8 --seed 7
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
Edge counts by confidence, from the same build on the three trees:
|
|
298
|
+
|
|
299
|
+
| Tree | high | medium | low |
|
|
300
|
+
| --------------------------------------- | ------ | ------ | --- |
|
|
301
|
+
| this repository (875 files, JavaScript) | 13,249 | 66 | 453 |
|
|
302
|
+
| site (410 files, TypeScript) | 3,915 | 1 | 0 |
|
|
303
|
+
| Swift app (499 files) | 3,629 | 1,371 | 165 |
|
|
304
|
+
|
|
305
|
+
A sample of 40 with no error bounds the error rate of the population at about
|
|
306
|
+
7% with 95% confidence, and 8 with no error at about 38%. A `low` edge is an
|
|
307
|
+
unresolved binding: often right in script-style code that shares globals, a
|
|
308
|
+
lead anywhere else. Trust `high`, confirm `medium`, ask for `low` explicitly.
|
|
309
|
+
|
|
310
|
+
Scope rules, counted mechanically on a Swift graph: `eval-call-scope.mjs` counts
|
|
311
|
+
`high` constructor edges to a nested type from a caller outside its outer type
|
|
312
|
+
that does not spell the name qualified, and `high` edges to a top-level
|
|
313
|
+
repository symbol with a platform name reached from another file. Both must be
|
|
314
|
+
zero; it exits 1 otherwise.
|
|
315
|
+
|
|
316
|
+
```
|
|
317
|
+
node pipeline/scripts/eval-call-scope.mjs --graph <dir>/code-graph.json --root <swift-repo>
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
Recall of bare calls on JavaScript and TypeScript, whole populations: for every
|
|
321
|
+
function, each bare call to a function its own source binds (defined in the same
|
|
322
|
+
file or imported from a repository file) should be an edge.
|
|
323
|
+
|
|
324
|
+
```
|
|
325
|
+
node pipeline/scripts/eval-call-recall.mjs bare --graph <dir>/code-graph.json --root <repo>
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
This repository: 7,940 of 7,966 (99.7%); the site: 2,243 of 2,245 (99.9%). What
|
|
329
|
+
remains missed: a self-recursive call (an edge to oneself is not emitted), a
|
|
330
|
+
callback parameter that shares a repository function's name (the script counts
|
|
331
|
+
it, the resolver is right not to), a name that is rebound inside a nested
|
|
332
|
+
function, and a call through a computed dynamic import. Calls through a function
|
|
333
|
+
value, a registry or reflection are not counted by that script and are not edges
|
|
334
|
+
either.
|
|
335
|
+
|
|
336
|
+
Member-call recall is a named limit for Swift. `eval-call-recall.mjs member`
|
|
337
|
+
takes a seeded sample of functions and counts each `.name(` call whose name is a
|
|
338
|
+
function of the repository; it over-counts, since a call on a library object
|
|
339
|
+
that shares a name counts as a miss. With seed 11 on the Swift app, 15 of 23
|
|
340
|
+
such calls have an edge. The misses that are the resolver's, and not name
|
|
341
|
+
clashes with a library, have three causes:
|
|
342
|
+
|
|
343
|
+
- a local bound by a cast: `guard let c = x as? Cell` is read (medium); a cast
|
|
344
|
+
inside a longer expression is not;
|
|
345
|
+
- a local bound to a shared instance: `let m = Mgr.shared` is read when the
|
|
346
|
+
static is declared with a type or a constructor call; one initialised by a
|
|
347
|
+
closure, a factory function or a computed property, and an instance property
|
|
348
|
+
initialised that way, are not;
|
|
349
|
+
- a static extension method on a platform type, called through the type.
|
|
350
|
+
|
|
351
|
+
```
|
|
352
|
+
node pipeline/scripts/eval-call-recall.mjs member --graph <dir>/code-graph.json --root <repo> \
|
|
353
|
+
--n 40 --seed 11
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
Python, Go, Rust, Java, C#, C++ and Kotlin precision is fixture-verified only:
|
|
357
|
+
`eval-call-edges.mjs` checks nine hand-written cases (147 expected edges, pooled
|
|
358
|
+
recall 98.0%, precision at medium and above 100.0%) and no real tree of those
|
|
359
|
+
languages was sampled.
|
|
360
|
+
|
|
361
|
+
The question set is the guard for ranking: a change to the graph must not lower
|
|
362
|
+
its coverage there. On the reference Swift app (4,428 files, 30,394 nodes, main
|
|
363
|
+
graph 24.21 MB, HEAD's validator accepts it) the grep-and-read arm scores 67.0%
|
|
364
|
+
at 25,347 tokens per question and the code graph 78.06% at 19,494, the coverage
|
|
365
|
+
the main graph reaches alone. A build takes 4.4 to 5.2 s with the calls sidecar
|
|
366
|
+
(21.9 MB) against 2.7 to 3.0 s without it.
|
|
367
|
+
|
|
82
368
|
Gated on a large private Swift app: 4,290 sources, 29,212 nodes, 54,626 edges,
|
|
83
369
|
built in 3.2s, validator clean. Build time is dominated by reading the tree, so
|
|
84
370
|
a repo whose files are not in the page cache costs more: the first build of the
|
|
@@ -133,5 +419,10 @@ Negative:
|
|
|
133
419
|
- The symbol layer is thin on stacks whose exported unit is a function. On
|
|
134
420
|
Node the useful graph is the import graph between files, and the command
|
|
135
421
|
says so rather than implying a richness the stack does not have.
|
|
136
|
-
- A 4,
|
|
137
|
-
|
|
422
|
+
- A 4,400-file repo produces a main graph of about 24 MB (unchanged by this
|
|
423
|
+
work) and a calls sidecar of about 22 MB. Both are read whole on every query;
|
|
424
|
+
that is fine at this scale and is not proven at ten times it.
|
|
425
|
+
- A build with the calls sidecar costs about 60% more than without it (4.4 to
|
|
426
|
+
5.2 s against 2.7 to 3.0 s on a large Swift app).
|
|
427
|
+
- `low` call edges are leads, not facts; the sidecar keeps them because a
|
|
428
|
+
reader can filter on `--min-confidence`, and says so in every report.
|
package/docs/architecture.md
CHANGED
|
@@ -115,7 +115,7 @@ graph TB
|
|
|
115
115
|
end
|
|
116
116
|
|
|
117
117
|
subgraph "Pipeline Specs"
|
|
118
|
-
CMD[commands/<br/>
|
|
118
|
+
CMD[commands/<br/>80 command files]
|
|
119
119
|
AGT[agents/<br/>11 agent personas]
|
|
120
120
|
RUL[rules/<br/>domain rules]
|
|
121
121
|
PHS[multi-agent-refs/phases/<br/>phase specs + contracts]
|
|
@@ -207,8 +207,8 @@ repo and the website, plus the two independently shipped repos
|
|
|
207
207
|
```mermaid
|
|
208
208
|
graph TD
|
|
209
209
|
CC["Claude Code<br/>(source of truth)"]
|
|
210
|
-
COP["Copilot CLI<br/>(instructions +
|
|
211
|
-
COD["Codex CLI<br/>(1 router skill +
|
|
210
|
+
COP["Copilot CLI<br/>(instructions + 80 sub-command skills)"]
|
|
211
|
+
COD["Codex CLI<br/>(1 router skill + 80 refs)"]
|
|
212
212
|
REPO["Pipeline Repo<br/>(npm package)"]
|
|
213
213
|
WEB["Website"]
|
|
214
214
|
PLUGREPO["multi-agent-plugins<br/>(6 plugins, own repo)"]
|
package/docs/ecosystem.md
CHANGED
|
@@ -5,9 +5,9 @@ separately, wired together at install time and at run time:
|
|
|
5
5
|
|
|
6
6
|
| Repo | What it owns | Ships as |
|
|
7
7
|
|---|---|---|
|
|
8
|
-
| **`multi-agent-pipeline`** (this repo) | Orchestration: the <!-- fact:phaseCount -->6<!-- /fact -->-phase flow, the <!-- fact:commandCount -->
|
|
8
|
+
| **`multi-agent-pipeline`** (this repo) | Orchestration: the <!-- fact:phaseCount -->6<!-- /fact -->-phase flow, the <!-- fact:commandCount -->80<!-- /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-mcp`** | The pipeline's hands on devices and browsers: <!-- fact:toolCount -->
|
|
10
|
+
| **`multi-agent-mcp`** | The pipeline's hands on devices and browsers: <!-- fact:toolCount -->258<!-- /fact --> MCP tools across <!-- fact:toolFamilyCount -->25<!-- /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, offline facts about builds you own) | 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
|
|
@@ -19,7 +19,7 @@ Either can be swapped or removed without touching the other two's source.
|
|
|
19
19
|
graph LR
|
|
20
20
|
subgraph PIPE ["multi-agent-pipeline (orchestrator)"]
|
|
21
21
|
direction TB
|
|
22
|
-
PHASES["6 phases ·
|
|
22
|
+
PHASES["6 phases · 80 commands"]
|
|
23
23
|
GATES["deterministic gates + review triage"]
|
|
24
24
|
end
|
|
25
25
|
|
|
@@ -70,8 +70,8 @@ only those:
|
|
|
70
70
|
graph TD
|
|
71
71
|
CC["Claude Code<br/>~/.claude/commands/multi-agent/<br/>(source of truth)"]
|
|
72
72
|
|
|
73
|
-
CC -->|"Step 2: copy + reformat<br/>
|
|
74
|
-
CC -->|"Step 2b: transform<br/>(install.js --codex)"| COD["Codex CLI<br/>1 router skill +
|
|
73
|
+
CC -->|"Step 2: copy + reformat<br/>80 sub-command skills"| COP["Copilot CLI<br/>~/.copilot/skills/"]
|
|
74
|
+
CC -->|"Step 2b: transform<br/>(install.js --codex)"| COD["Codex CLI<br/>1 router skill + 80 refs<br/>+ 11 agent TOML"]
|
|
75
75
|
CC -->|"Step 3: genericize<br/>(strip personal data)"| REPO["multi-agent-pipeline repo<br/>pipeline/"]
|
|
76
76
|
CC -->|"Step 4: version + feature sync"| WEB["Website<br/>projects.ts / i18n.tsx"]
|
|
77
77
|
|
|
@@ -162,7 +162,7 @@ measurements behind this table):
|
|
|
162
162
|
|
|
163
163
|
| | Claude Code | Copilot CLI | Codex CLI |
|
|
164
164
|
|---|---|---|---|
|
|
165
|
-
| **Pipeline commands** | <!-- fact:commandCount -->
|
|
165
|
+
| **Pipeline commands** | <!-- fact:commandCount -->80<!-- /fact --> slash-command skills, native | <!-- fact:commandCount -->80<!-- /fact --> sub-command skills, `multi-agent-{cmd}` naming, copied in | 1 router skill (`multi-agent`) + <!-- fact:commandCount -->80<!-- /fact --> command specs as reference files - Codex silently truncates its skills block past a few dozen entries, so sub-commands are not peer skills here |
|
|
166
166
|
| **Stack plugins** | Marketplace plugin, loaded natively, resolved by `.claude/settings.json` enabled-list | Enabled plugin's authored skills copied flat into `~/.copilot/skills/`; `knowledge/` **not** re-copied (already delivered via `shared/external`) | Copied as reference files under `~/.codex/multi-agent-refs/skills/`, plugin-prefixed on name clash (e.g. `architecture` → `ai-ios-toolkit-architecture`) |
|
|
167
167
|
| **Component dispatch (Phase 3)** | Marketplace plugin's `create-component`/`create-screen` skill via the Skill tool | No plugin loader - the enabled stack plugin's authored skills (incl. `create-component`) are copied flat into `~/.copilot/skills/` at install time (the old frozen `figma-*` copies are pruned, they were never a fallback) | Not part of the enforced parity axis; classification + state-shape must match, skill *inventory* does not |
|
|
168
168
|
| **multi-agent-mcp** | `claude mcp add multi-agent -- npx -y @mmerterden/multi-agent-mcp` | `copilot mcp add multi-agent -- npx -y @mmerterden/multi-agent-mcp` | `codex mcp add multi-agent -- npx -y @mmerterden/multi-agent-mcp` (skipped with a warning if `codex` isn't on `PATH`) |
|
|
@@ -239,8 +239,8 @@ Detail: [`unattended-security.md`](../pipeline/multi-agent-refs/features/unatten
|
|
|
239
239
|
|
|
240
240
|
### multi-agent-mcp's tools, by category
|
|
241
241
|
|
|
242
|
-
<!-- fact:toolCount -->
|
|
243
|
-
at toolkit <!-- fact:toolkitVersion -->4.
|
|
242
|
+
<!-- fact:toolCount -->258<!-- /fact --> tools in <!-- fact:toolFamilyCount -->25<!-- /fact --> families, counted from the server's own `tools/list` response
|
|
243
|
+
at toolkit <!-- fact:toolkitVersion -->4.4.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.
|
|
@@ -257,8 +257,8 @@ skill or a command such as `multi-agent:review`. Both qualified forms
|
|
|
257
257
|
let `lint-mcp-refs.mjs` check that the tool exists.
|
|
258
258
|
|
|
259
259
|
The families can be narrowed per host: `MCP_TOOLKIT_CAPS` serves only the named
|
|
260
|
-
ones, and unset serves all <!-- fact:toolCount -->
|
|
261
|
-
sees 50 tools instead of <!-- fact:toolCount -->
|
|
260
|
+
ones, and unset serves all <!-- fact:toolCount -->258<!-- /fact -->. A frontend repo that sets `web,code,context`
|
|
261
|
+
sees 50 tools instead of <!-- fact:toolCount -->258<!-- /fact -->, which matters because every registered server's
|
|
262
262
|
tool list is charged against the context window on every turn.
|
|
263
263
|
|
|
264
264
|
Per-family tool counts are `toolCategories` in [`facts.json`](facts.json), taken from the
|
package/docs/engineering.md
CHANGED
|
@@ -6,10 +6,10 @@ The pipeline's output quality comes less from any single model call and more fro
|
|
|
6
6
|
|
|
7
7
|
Every loop in the pipeline has a deterministic exit condition and a hard iteration cap. Nothing "keeps trying".
|
|
8
8
|
|
|
9
|
-
- **TDD micro-loop** (Phase
|
|
10
|
-
- **Dev-critic loop** (Phase
|
|
11
|
-
- **Review-fix macro-loop** (Phase
|
|
12
|
-
- **Disagreement round** (Phase
|
|
9
|
+
- **TDD micro-loop** (Phase 2): red -> green -> refactor per task; build-fix retries capped at 3 attempts.
|
|
10
|
+
- **Dev-critic loop** (Phase 2.5, opt-in): generator vs critic on deterministic criteria; max 2 iterations, round 3 escalates to the user.
|
|
11
|
+
- **Review-fix macro-loop** (Phase 2 <-> 3): only triage-accepted blocking findings re-enter development; max 3 iterations, then hard-kill and escalate.
|
|
12
|
+
- **Disagreement round** (Phase 3, opt-in): when reviewers split, exactly one rebuttal round - never more.
|
|
13
13
|
- **Global rule**: any retry loop stops after 3 attempts and asks the user. No exceptions, no infinite loops.
|
|
14
14
|
|
|
15
15
|
## Evidence over claims
|
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
|
-
"generatedAt": "2026-11-
|
|
4
|
-
"version": "23.
|
|
3
|
+
"generatedAt": "2026-11-11",
|
|
4
|
+
"version": "23.5.0",
|
|
5
5
|
"phaseSchema": 2,
|
|
6
6
|
"phases": [
|
|
7
7
|
{
|
|
@@ -36,26 +36,26 @@
|
|
|
36
36
|
"analysis": [0, 1, 2, 3, 4, 5]
|
|
37
37
|
},
|
|
38
38
|
"reworkCap": 3,
|
|
39
|
-
"commandCount":
|
|
39
|
+
"commandCount": 80,
|
|
40
40
|
"skillCount": 173,
|
|
41
|
-
"skillCountAll":
|
|
41
|
+
"skillCountAll": 256,
|
|
42
42
|
"agentCount": 11,
|
|
43
43
|
"hosts": ["Claude Code", "Codex CLI", "Copilot CLI"],
|
|
44
|
-
"toolCount":
|
|
44
|
+
"toolCount": 258,
|
|
45
45
|
"toolCategories": {
|
|
46
46
|
"ios": 42,
|
|
47
47
|
"web": 38,
|
|
48
48
|
"android": 35,
|
|
49
49
|
"store": 35,
|
|
50
|
+
"binary": 11,
|
|
50
51
|
"vphone": 10,
|
|
51
52
|
"media": 9,
|
|
52
53
|
"code": 8,
|
|
53
54
|
"design": 8,
|
|
54
55
|
"graph": 8,
|
|
55
|
-
"thesis":
|
|
56
|
+
"thesis": 8,
|
|
56
57
|
"repo": 6,
|
|
57
58
|
"voice": 6,
|
|
58
|
-
"binary": 5,
|
|
59
59
|
"security": 5,
|
|
60
60
|
"ui": 5,
|
|
61
61
|
"context": 4,
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"test": 1
|
|
71
71
|
},
|
|
72
72
|
"pluginSkillCount": 269,
|
|
73
|
-
"toolkitVersion": "4.
|
|
73
|
+
"toolkitVersion": "4.4.0"
|
|
74
74
|
}
|
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` MCP.** <!-- fact:toolCount -->
|
|
57
|
+
- **The `multi-agent` MCP.** <!-- fact:toolCount -->258<!-- /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
|
|
|
@@ -207,16 +207,16 @@ Cheap, objective checks run BEFORE any AI token is spent:
|
|
|
207
207
|
|
|
208
208
|
If any gate fails, fix first. Don't waste AI tokens reviewing broken code.
|
|
209
209
|
|
|
210
|
-
### Analysis Document Review (Phase
|
|
210
|
+
### Analysis Document Review (Phase 3.2 + 3.3)
|
|
211
211
|
|
|
212
|
-
`/multi-agent:analysis` does not publish behind a structural validator alone. Phase
|
|
212
|
+
`/multi-agent:analysis` does not publish behind a structural validator alone. Phase 3.2 runs the same
|
|
213
213
|
reviewer set and triage a code diff gets, on the draft, before the destination is even chosen. Its first question is what the run skipped -
|
|
214
214
|
an input declared missing that nothing searched for, an open question about evidence nobody read, a gap
|
|
215
215
|
with no owner, a scope call made without asking. A blocking finding returns to synthesis with dispatch
|
|
216
216
|
closed; it never becomes an open question, because "the document is wrong" is not something to ask the
|
|
217
217
|
reader.
|
|
218
218
|
|
|
219
|
-
Phase
|
|
219
|
+
Phase 3.3 then sorts what is left: reachable evidence is searched (never asked about), decisions the
|
|
220
220
|
user owns are asked with `AskUserQuestion`, and only genuinely external gaps enter the document as
|
|
221
221
|
`AS-NN` rows with an owner. A gap carrying neither a `searched, not found` nor an `asked, external`
|
|
222
222
|
stamp fails the dispatch gate. Autopilot runs both phases; only the asking degrades, into rows stamped
|
|
@@ -365,7 +365,7 @@ Commands (`commands.mjs --json`) and run questions (`launch-request.mjs question
|
|
|
365
365
|
- **Read-Size Gate** (opt-in, `prefs.global.bulkRead.mode`): a `PreToolUse` hook inspects `Read` and the shell commands that read a file whole. In `observe` it only logs what it would have caught - the baseline you measure before routing anything. In `enforce` a file over `minLines` (default 350) is blocked and delegated to a haiku-rung worker (`bulk-read.sh`), which returns a line-numbered summary so the follow-up is a bounded `Read(offset:limit:)` instead of the whole file; the full text is parked under `.multi-agent/refs/`. The development phase and any file the run has already touched are exempt, because Claude Code's `Edit` requires its own `Read` first.
|
|
366
366
|
- **Free models for simple work** (opt-in, `/multi-agent:route-on --free`): large-file reads, log and document summaries, field extraction, labels and translation or commit-body drafts go to the multi-agent-mcp's free-model chain (`llm_delegate`) first. Every answer is verified against its source and discarded when it does not hold, Claude takes over whenever none passes, and decisions, plans, code and reviews never leave Claude. By default only providers that do not train on prompts receive text. `route-status` reports what was answered free and the tokens kept off Claude; `doctor --probe` checks each provider key. Contract: `multi-agent-refs/features/free-models.md`.
|
|
367
367
|
- **Capture Hooks** (`SessionEnd`, `PreCompact`, `SessionStart`): durable writes do not wait for Phase 5, the phase a run is least likely to reach. `SessionEnd` flushes a run that never got there; `PreCompact` flushes before an auto-compaction summarizes a long phase mid-flight, which is the same loss one level down; `SessionStart` prints at most two lines about an unfinished run. None calls a model, none reads a payload, and all exit 0 on every path - a hook that fails a session over bookkeeping is worse than the bookkeeping.
|
|
368
|
-
- **Operational Reporting** (`prefs.global.usageLog`): coarse run metadata -
|
|
368
|
+
- **Operational Reporting** (`prefs.global.usageLog`): coarse run metadata - a keyed digest of the run id and of the repository, task type, current phase, run status (in progress, completed, halted, parked), phase durations, whether a PR opened, token counts, how many times each shipped `/multi-agent` command was typed (the name and a count, never the arguments or the prompt) - sent at every phase transition and at completion, halt and park, and never prompts, code, diffs or absolute paths (a summary of the task title - word count, ticket shape, language - and the PR URL of github.com, gitlab.com, bitbucket.org or dev.azure.com only when `includeTitle` / `includePrUrl` are set). Runs are reported under the GitHub account on the machine that can read the pipeline repository, found with no question asked through gh, the git credential helper or an SSH key (`usage-identity.mjs`, cached in `usageLog.login` / `loginMethod`, `--refresh` to re-check); with no such account nothing is sent. The per-machine token is REQUESTED from the endpoint by `usage-register.mjs` (setup, update, and the Phase 0 exit gate as a backstop), is write-only, and lives in the OS credential store; prefs hold only the entry name and the switch. `usageLog.optOut: true` blocks registration permanently and is checked before the network call. Registration proves the login with that account's gh or credential-helper token, or with an SSH signature over a server challenge. The server issues a token only to the repository owner or a collaborator, pins the login to it, and shows only those accounts' records on the panel. An unreachable endpoint leaves reporting off with one line and exit 0 - a run is never failed over bookkeeping.
|
|
369
369
|
- **Post-Edit Syntax Gate** (opt-in, `prefs.global.editSyntaxGate.enabled`): after a file edit, `edit-syntax-gate.sh` parses the file within 2 s (`swiftc -parse`, `node --check`, `py_compile` into a temp dir, JSON, `bash -n`; Kotlin skipped) and hands a syntax error to the model as hook context. It never blocks and stays silent when a parser is missing or slow. Registered on Claude Code and Codex: Claude Code `PostToolUse` on `Edit|Write|MultiEdit` (`claude-hooks.json`), Codex `PostToolUse` on `apply_patch`, checking every file the patch adds, updates or moves to (`codex-hooks.json`, merged into `~/.codex/hooks.json`, run once trusted in Codex's `/hooks`). `/multi-agent:setup` Step 8 offers it; on Codex it calls `host-hooks.mjs install`, and uninstall takes it back. Copilot CLI gets no registration: as of 1.0.45 it loads `~/.copilot/hooks/*.json` but discards a `postToolUse` hook's output and applies no matcher, so the gate would spawn on every tool call and the model would never see its message. Source for the Codex contract: the Codex hooks guide plus `codex-rs` (`hooks/src/engine`, `core/src/tools/handlers/apply_patch.rs`).
|
|
370
370
|
- **Build Queue**: All `xcodebuild` calls acquire a lock. Each worktree uses own `-derivedDataPath`. Stale locks auto-clean after 15 min. Non-Xcode builds don't need the lock.
|
|
371
371
|
- **Context Management**: `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=65` - compaction at 65% usage (prevents degradation in <!-- fact:phaseCount -->6<!-- /fact -->-phase sessions).
|
package/docs/performance.md
CHANGED
|
@@ -48,28 +48,28 @@ _Source: ~/.claude/logs/multi-agent/metrics.jsonl · Events: 421 (0 parse errors
|
|
|
48
48
|
|
|
49
49
|
## Reviews
|
|
50
50
|
|
|
51
|
-
| Metric
|
|
52
|
-
|
|
53
|
-
| Completed
|
|
54
|
-
| Cycles per task (avg) | 1.3
|
|
55
|
-
| Cycles per task (p95) | 2
|
|
51
|
+
| Metric | Value |
|
|
52
|
+
| --------------------- | ----- |
|
|
53
|
+
| Completed | 28 |
|
|
54
|
+
| Cycles per task (avg) | 1.3 |
|
|
55
|
+
| Cycles per task (p95) | 2 |
|
|
56
56
|
|
|
57
57
|
## Triage Classification
|
|
58
58
|
|
|
59
|
-
| Category
|
|
60
|
-
|
|
61
|
-
| Raw findings | 167
|
|
62
|
-
| Accepted
|
|
63
|
-
| Deferred
|
|
64
|
-
| Rejected
|
|
59
|
+
| Category | Count | Rate |
|
|
60
|
+
| ------------ | ----- | ---- |
|
|
61
|
+
| Raw findings | 167 | - |
|
|
62
|
+
| Accepted | 41 | 0.25 |
|
|
63
|
+
| Deferred | 19 | - |
|
|
64
|
+
| Rejected | 107 | 0.64 |
|
|
65
65
|
|
|
66
66
|
## Cost Per Model
|
|
67
67
|
|
|
68
|
-
| Model
|
|
69
|
-
|
|
70
|
-
| `claude-fable-5`
|
|
71
|
-
| `claude-sonnet-
|
|
72
|
-
| `gpt-5.4`
|
|
68
|
+
| Model | Calls | Duration (ms) | Tokens In | Tokens Out |
|
|
69
|
+
| ------------------- | ----- | ------------- | --------- | ---------- |
|
|
70
|
+
| `claude-fable-5-2` | 124 | 612430 | 380221 | 92114 |
|
|
71
|
+
| `claude-sonnet-5-5` | 89 | 412318 | 201445 | 58903 |
|
|
72
|
+
| `gpt-5.4` | 88 | 398214 | 194302 | 55128 |
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
## Interpreting Review-Cycle Metrics
|
|
@@ -110,4 +110,4 @@ template in `phase-5-report.md`.
|
|
|
110
110
|
|
|
111
111
|
Remove or rename `~/.claude/logs/multi-agent/metrics.jsonl`. The pipeline
|
|
112
112
|
will not error - `log-metric.sh` fails silently if the file isn't writable.
|
|
113
|
-
|
|
113
|
+
This file is never sent off-device. Operational reporting is a separate, coarser record described in `pipeline/multi-agent-refs/features/usage-reporting.md`.
|
|
@@ -65,6 +65,8 @@ const DEV_ONLY_TOOLING = Object.freeze([
|
|
|
65
65
|
"lint-skills.mjs",
|
|
66
66
|
"lint-personas.mjs", // imports install/_codex-agents.mjs, which never ships to scripts/
|
|
67
67
|
"lint-mcp-refs.mjs",
|
|
68
|
+
"lint-unused-exports.mjs", // reads the repo's own source tree; an install has none
|
|
69
|
+
"lint-phase-labels.mjs", // checks the repo's own docs against phases.json; an install has neither
|
|
68
70
|
"_toolkit-coverage.mjs", // imported only by lint-mcp-refs.mjs, which never ships
|
|
69
71
|
"check-md-links.mjs",
|
|
70
72
|
"check-rewrite-overlap.mjs", // compares a rewrite against a source only a maintainer has
|
|
@@ -73,7 +75,9 @@ const DEV_ONLY_TOOLING = Object.freeze([
|
|
|
73
75
|
"_png-phash.mjs", // imported only by upstream-overlap-gate.mjs, which never ships
|
|
74
76
|
"gen-free-llm-skill.mjs", // reads the sibling toolkit checkout; an install has none
|
|
75
77
|
"gen-toolkit-path-params.mjs", // reads the sibling toolkit checkout; an install has none
|
|
78
|
+
"gen-access-check.mjs", // rewrites the repo's own command files; an install has no pipeline/commands source
|
|
76
79
|
"gen-fact-marks.mjs", // renders the counts in the repo's own docs; an install has no docs/
|
|
80
|
+
"gen-office-command-matrix.mjs", // reads office-src, which an install does not carry
|
|
77
81
|
"gen-ref-toc.mjs", // regenerates the repo's own reference tree; an install has no pipeline/
|
|
78
82
|
"ref-filler-audit.mjs", // audits the repo's own instruction docs; an install has no pipeline/
|
|
79
83
|
"validate-schemas.mjs", // validates the repo's own schema files, needs ajv
|
|
@@ -84,6 +88,10 @@ const DEV_ONLY_TOOLING = Object.freeze([
|
|
|
84
88
|
// manifest.json into the tarball. It shells `npm pack` against that root,
|
|
85
89
|
// which in an install is $HOME - so an installed copy could only ever fail.
|
|
86
90
|
"make-manifest.mjs",
|
|
91
|
+
// Maintainer release step (docs/ecosystem.md): publishes from a clean checkout.
|
|
92
|
+
"publish-staged.mjs",
|
|
93
|
+
// Imported by smoke-personal-data.sh, which never ships.
|
|
94
|
+
"identifier-scan.mjs",
|
|
87
95
|
]);
|
|
88
96
|
|
|
89
97
|
/** Eval harnesses (`eval-*.mjs`) read `pipeline/eval/**`, which never ships. */
|
|
@@ -94,6 +102,7 @@ export const DEV_ONLY_SCRIPTS = Object.freeze([
|
|
|
94
102
|
"smoke-figma-config-schema.sh",
|
|
95
103
|
"smoke-personal-data.sh", // scanner contains the patterns it detects
|
|
96
104
|
"smoke-install-leak-gate.sh", // same - scanner shadows the install pipeline
|
|
105
|
+
"_leak-denylist.sh", // loader for the private deny-list the two scanners above read
|
|
97
106
|
"validate-prefs.mjs", // needs ajv (devDependency); end users have no node_modules here
|
|
98
107
|
"fixtures", // smoke test fixtures live in the repo only, never ship to users
|
|
99
108
|
// --- reason 2: maintainer CI ---
|