@mmerterden/multi-agent-pipeline 23.3.0 → 23.4.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.
Files changed (224) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +25 -6
  3. package/README.tr.md +26 -7
  4. package/docs/adr/0008-installer-modularization-and-secret-leak-defense.md +1 -1
  5. package/docs/adr/0010-own-code-graph.md +299 -8
  6. package/docs/architecture.md +3 -3
  7. package/docs/ecosystem.md +10 -10
  8. package/docs/engineering.md +4 -4
  9. package/docs/facts.json +8 -8
  10. package/docs/features.md +5 -5
  11. package/docs/performance.md +17 -17
  12. package/install/_dev-only-files.mjs +9 -0
  13. package/install/claude.mjs +28 -2
  14. package/install/templates/claude-hooks.json +32 -1
  15. package/manifest.json +223 -155
  16. package/package.json +11 -3
  17. package/pipeline/commands/multi-agent/SKILL.md +1 -1
  18. package/pipeline/commands/multi-agent/design-check/SKILL.md +2 -2
  19. package/pipeline/commands/multi-agent/diff-explain/SKILL.md +3 -3
  20. package/pipeline/commands/multi-agent/graph/SKILL.md +57 -24
  21. package/pipeline/commands/multi-agent/pair/SKILL.md +92 -0
  22. package/pipeline/commands/multi-agent/prune-prompts/SKILL.md +1 -1
  23. package/pipeline/commands/multi-agent/search/SKILL.md +7 -1
  24. package/pipeline/commands/multi-agent/status/SKILL.md +4 -0
  25. package/pipeline/commands/multi-agent/sync/SKILL.md +3 -3
  26. package/pipeline/contract/CHANGELOG.md +49 -0
  27. package/pipeline/contract/build.mjs +13 -1
  28. package/pipeline/contract/fixtures/error-invalid-request.json +1 -1
  29. package/pipeline/contract/fixtures/error-unauthorized.json +1 -1
  30. package/pipeline/contract/fixtures/runs-awaiting-question.json +4 -1
  31. package/pipeline/contract/fixtures/runs-empty.json +1 -1
  32. package/pipeline/contract/fixtures/runs-failed.json +4 -1
  33. package/pipeline/contract/fixtures/runs-old-schema.json +3 -0
  34. package/pipeline/contract/fixtures/runs-pr-opened-redacted.json +4 -1
  35. package/pipeline/contract/fixtures/runs-pr-opened.json +4 -1
  36. package/pipeline/contract/fixtures/runs-running.json +4 -1
  37. package/pipeline/contract/manifest.json +28 -15
  38. package/pipeline/contract/types/index.d.ts +55 -3
  39. package/pipeline/lib/detach-self.mjs +95 -0
  40. package/pipeline/lib/public-mcp-servers.mjs +33 -0
  41. package/pipeline/lib/rotated-log.mjs +93 -0
  42. package/pipeline/lib/tls-trust.mjs +29 -0
  43. package/pipeline/lib/usage-lifecycle.mjs +9 -11
  44. package/pipeline/lib/usage-names.generated.mjs +614 -0
  45. package/pipeline/lib/usage-run-key.mjs +235 -0
  46. package/pipeline/lib/usage-vocab.mjs +210 -0
  47. package/pipeline/multi-agent-refs/analysis/intake.md +2 -2
  48. package/pipeline/multi-agent-refs/analysis/render.md +1 -1
  49. package/pipeline/multi-agent-refs/channels/generator.md +4 -5
  50. package/pipeline/multi-agent-refs/cross-cli-contract.md +3 -3
  51. package/pipeline/multi-agent-refs/design-check/scope-and-ledger.md +1 -1
  52. package/pipeline/multi-agent-refs/features/code-graph.md +146 -11
  53. package/pipeline/multi-agent-refs/features/code-intelligence.md +16 -14
  54. package/pipeline/multi-agent-refs/features/dev-critic.md +7 -7
  55. package/pipeline/multi-agent-refs/features/model-fallback.md +6 -4
  56. package/pipeline/multi-agent-refs/features/remote-control.md +252 -0
  57. package/pipeline/multi-agent-refs/features/review-delta.md +1 -1
  58. package/pipeline/multi-agent-refs/features/review-file-set.md +3 -3
  59. package/pipeline/multi-agent-refs/features/review-multi-repo.md +1 -1
  60. package/pipeline/multi-agent-refs/features/session-brief.md +42 -0
  61. package/pipeline/multi-agent-refs/features/skill-conformance.md +3 -3
  62. package/pipeline/multi-agent-refs/features/usage-reporting.md +252 -24
  63. package/pipeline/multi-agent-refs/help/en.md +3 -2
  64. package/pipeline/multi-agent-refs/help/tr.md +3 -2
  65. package/pipeline/multi-agent-refs/knowledge.md +1 -1
  66. package/pipeline/multi-agent-refs/orchestrator/dispatcher.md +1 -1
  67. package/pipeline/multi-agent-refs/phases/operations.md +2 -2
  68. package/pipeline/multi-agent-refs/phases/phase-0-init.md +13 -12
  69. package/pipeline/multi-agent-refs/phases/phase-1-plan.md +4 -4
  70. package/pipeline/multi-agent-refs/phases/phase-3-review.md +2 -0
  71. package/pipeline/multi-agent-refs/phases/phase-5-report.md +1 -1
  72. package/pipeline/multi-agent-refs/platform-parity.md +2 -2
  73. package/pipeline/multi-agent-refs/wiki-capture.md +3 -17
  74. package/pipeline/office/index.html +1207 -233
  75. package/pipeline/office/toolkit.json +1 -1
  76. package/pipeline/rules/outside-the-pipeline.md +1 -1
  77. package/pipeline/schemas/activity.schema.json +23 -0
  78. package/pipeline/schemas/agent-state.schema.json +6 -1
  79. package/pipeline/schemas/code-graph-calls.schema.json +254 -0
  80. package/pipeline/schemas/code-graph-docs.schema.json +223 -0
  81. package/pipeline/schemas/code-graph-infra.schema.json +227 -0
  82. package/pipeline/schemas/code-graph.schema.json +2 -2
  83. package/pipeline/schemas/examples/design-check-config.json +27 -0
  84. package/pipeline/schemas/learning-curve.schema.json +67 -0
  85. package/pipeline/schemas/office-jobs.json +69 -2
  86. package/pipeline/schemas/office-jobs.schema.json +8 -1
  87. package/pipeline/schemas/phases.json +5 -0
  88. package/pipeline/schemas/phases.schema.json +8 -0
  89. package/pipeline/schemas/prefs.schema.json +46 -12
  90. package/pipeline/schemas/runs-index.schema.json +17 -0
  91. package/pipeline/schemas/toolkit-path-params.json +84 -8
  92. package/pipeline/scripts/README.md +1 -0
  93. package/pipeline/scripts/_code-graph.mjs +184 -103
  94. package/pipeline/scripts/_contract-core.mjs +1 -1
  95. package/pipeline/scripts/_contract-routes-office.mjs +21 -0
  96. package/pipeline/scripts/_diff-impact.mjs +21 -2
  97. package/pipeline/scripts/_graph-sidecars.mjs +372 -0
  98. package/pipeline/scripts/_http-post.mjs +103 -115
  99. package/pipeline/scripts/_safe-read.mjs +57 -0
  100. package/pipeline/scripts/_skill-practices.mjs +26 -0
  101. package/pipeline/scripts/_strip-code.mjs +380 -0
  102. package/pipeline/scripts/activity-snapshot.mjs +13 -1
  103. package/pipeline/scripts/aggregate-metrics.mjs +3 -5
  104. package/pipeline/scripts/call-graph/index.mjs +78 -0
  105. package/pipeline/scripts/call-graph/lang/cpp.mjs +308 -0
  106. package/pipeline/scripts/call-graph/lang/csharp.mjs +130 -0
  107. package/pipeline/scripts/call-graph/lang/go.mjs +303 -0
  108. package/pipeline/scripts/call-graph/lang/java.mjs +370 -0
  109. package/pipeline/scripts/call-graph/lang/kotlin.mjs +397 -0
  110. package/pipeline/scripts/call-graph/lang/python.mjs +399 -0
  111. package/pipeline/scripts/call-graph/lang/rust.mjs +345 -0
  112. package/pipeline/scripts/call-graph/lang/shared.mjs +230 -0
  113. package/pipeline/scripts/call-graph/lang/swift.mjs +432 -0
  114. package/pipeline/scripts/call-graph/lang/typescript.mjs +692 -0
  115. package/pipeline/scripts/call-graph/lex.mjs +396 -0
  116. package/pipeline/scripts/call-graph/platform.mjs +86 -0
  117. package/pipeline/scripts/call-graph/profiles.mjs +89 -0
  118. package/pipeline/scripts/call-graph/resolve.mjs +1125 -0
  119. package/pipeline/scripts/call-graph/scan.mjs +267 -0
  120. package/pipeline/scripts/code-graph-rules/android.json +7 -2
  121. package/pipeline/scripts/code-graph-rules/cpp.json +99 -0
  122. package/pipeline/scripts/code-graph-rules/csharp.json +102 -0
  123. package/pipeline/scripts/code-graph-rules/go.json +2 -1
  124. package/pipeline/scripts/code-graph-rules/ios.json +3 -1
  125. package/pipeline/scripts/code-graph-rules/java.json +76 -0
  126. package/pipeline/scripts/code-graph-rules/node.json +7 -2
  127. package/pipeline/scripts/code-graph-rules/python.json +6 -2
  128. package/pipeline/scripts/code-graph-rules/rust.json +105 -0
  129. package/pipeline/scripts/contract-server.mjs +1 -0
  130. package/pipeline/scripts/feedback-send.mjs +26 -26
  131. package/pipeline/scripts/gate-ledger.mjs +2 -1
  132. package/pipeline/scripts/gen-usage-names.mjs +124 -0
  133. package/pipeline/scripts/graph-affected.mjs +109 -20
  134. package/pipeline/scripts/graph-build.mjs +95 -15
  135. package/pipeline/scripts/graph-export.mjs +272 -0
  136. package/pipeline/scripts/graph-hint.mjs +15 -2
  137. package/pipeline/scripts/graph-query.mjs +305 -26
  138. package/pipeline/scripts/graph-report.mjs +187 -1
  139. package/pipeline/scripts/health-report.mjs +3 -4
  140. package/pipeline/scripts/infra/docs.mjs +317 -0
  141. package/pipeline/scripts/infra/extract.mjs +998 -0
  142. package/pipeline/scripts/infra/graph.mjs +245 -0
  143. package/pipeline/scripts/infra/yaml-lite.mjs +311 -0
  144. package/pipeline/scripts/job-launch.mjs +67 -2
  145. package/pipeline/scripts/learning-curve.mjs +288 -178
  146. package/pipeline/scripts/log-metric.sh +10 -1
  147. package/pipeline/scripts/note-agent-event.mjs +3 -4
  148. package/pipeline/scripts/note-command-use.mjs +333 -0
  149. package/pipeline/scripts/note-command-use.sh +126 -0
  150. package/pipeline/scripts/note-mcp-call.sh +89 -0
  151. package/pipeline/scripts/note-mcp-failure.mjs +272 -1
  152. package/pipeline/scripts/note-session.sh +62 -3
  153. package/pipeline/scripts/note-skill-use.mjs +58 -2
  154. package/pipeline/scripts/office-build.mjs +115 -1
  155. package/pipeline/scripts/office-memory.mjs +14 -5
  156. package/pipeline/scripts/pair.mjs +333 -0
  157. package/pipeline/scripts/pre-push-check.sh +1 -1
  158. package/pipeline/scripts/remote/cbor.mjs +128 -0
  159. package/pipeline/scripts/remote/contract.mjs +98 -0
  160. package/pipeline/scripts/remote/handler.mjs +317 -0
  161. package/pipeline/scripts/remote/handles.mjs +57 -0
  162. package/pipeline/scripts/remote/lifecycle.mjs +186 -0
  163. package/pipeline/scripts/remote/listener.mjs +204 -0
  164. package/pipeline/scripts/remote/lockout.mjs +103 -0
  165. package/pipeline/scripts/remote/nonces.mjs +61 -0
  166. package/pipeline/scripts/remote/pairing.mjs +519 -0
  167. package/pipeline/scripts/remote/qr-encode.mjs +459 -0
  168. package/pipeline/scripts/remote/store.mjs +188 -0
  169. package/pipeline/scripts/remote/transport.mjs +211 -0
  170. package/pipeline/scripts/remote/verbs.json +70 -0
  171. package/pipeline/scripts/remote/verbs.mjs +217 -0
  172. package/pipeline/scripts/remote/webauthn.mjs +169 -0
  173. package/pipeline/scripts/remote/wire.mjs +364 -0
  174. package/pipeline/scripts/remote-listener.mjs +83 -0
  175. package/pipeline/scripts/route-learn.mjs +4 -4
  176. package/pipeline/scripts/run-kill.mjs +1 -1
  177. package/pipeline/scripts/run-write.mjs +13 -2
  178. package/pipeline/scripts/runs-index.mjs +30 -3
  179. package/pipeline/scripts/search-logs.sh +9 -0
  180. package/pipeline/scripts/session-brief.mjs +458 -0
  181. package/pipeline/scripts/session-brief.sh +130 -0
  182. package/pipeline/scripts/test-gap-rules/cpp.json +25 -0
  183. package/pipeline/scripts/test-gap-rules/csharp.json +20 -0
  184. package/pipeline/scripts/test-gap-rules/java.json +20 -0
  185. package/pipeline/scripts/test-gap-rules/rust.json +14 -0
  186. package/pipeline/scripts/token-budget-report.mjs +3 -2
  187. package/pipeline/scripts/uninstall.mjs +29 -0
  188. package/pipeline/scripts/usage-access.mjs +16 -31
  189. package/pipeline/scripts/usage-health.mjs +31 -62
  190. package/pipeline/scripts/usage-register-beacon.mjs +11 -22
  191. package/pipeline/scripts/usage-register.mjs +39 -29
  192. package/pipeline/scripts/usage-report.mjs +579 -178
  193. package/pipeline/scripts/validate-code-graph.mjs +361 -111
  194. package/pipeline/scripts/write-state.mjs +39 -0
  195. package/pipeline/skills/.skill-manifest.json +21 -17
  196. package/pipeline/skills/.skills-index.json +13 -2
  197. package/pipeline/skills/shared/README.md +5 -4
  198. package/pipeline/skills/shared/core/multi-agent-design-check/SKILL.md +1 -1
  199. package/pipeline/skills/shared/core/multi-agent-diff-explain/SKILL.md +3 -3
  200. package/pipeline/skills/shared/core/multi-agent-graph/SKILL.md +55 -21
  201. package/pipeline/skills/shared/core/multi-agent-pair/SKILL.md +41 -0
  202. package/pipeline/skills/shared/core/multi-agent-prune-prompts/SKILL.md +1 -1
  203. package/pipeline/skills/shared/core/multi-agent-sync/SKILL.md +3 -3
  204. package/pipeline/skills/shared/external/app-store-optimization/SKILL.md +2 -3
  205. package/pipeline/skills/shared/external/app-store-optimization/references/keyword-research-methodology.md +2 -2
  206. package/pipeline/skills/shared/external/app-store-optimization/references/product-page-variants.md +2 -2
  207. package/pipeline/skills/shared/external/app-store-review/SKILL.md +11 -4
  208. package/pipeline/skills/shared/external/build-settings-audit/SKILL.md +1 -1
  209. package/pipeline/skills/shared/external/build-time-benchmark/SKILL.md +5 -5
  210. package/pipeline/skills/shared/external/build-time-fixes/SKILL.md +5 -5
  211. package/pipeline/skills/shared/external/build-time-optimizer/SKILL.md +6 -6
  212. package/pipeline/skills/shared/external/free-llm-apis/references/providers.md +1 -0
  213. package/pipeline/skills/shared/external/ios-coding-standard/references/STANDARD.md +2 -2
  214. package/pipeline/skills/shared/external/ios-haptics/references/core-haptics.md +1 -1
  215. package/pipeline/skills/shared/external/localization-reuse-map/references/publish-and-snapshot.md +1 -1
  216. package/pipeline/skills/shared/external/package-build-audit/SKILL.md +3 -3
  217. package/pipeline/skills/shared/external/reverse-engineer-own-app/SKILL.md +2 -3
  218. package/pipeline/skills/shared/external/swift-compile-hotspots/SKILL.md +2 -2
  219. package/pipeline/skills/shared/external/weatherkit/SKILL.md +5 -6
  220. package/pipeline/skills/skills-index.md +3 -2
  221. package/docs/FIGMA_PIPELINE.md +0 -137
  222. package/pipeline/lib/identifier-scan.mjs +0 -156
  223. package/pipeline/scripts/publish-staged.mjs +0 -324
  224. package/pipeline/skills/shared/external/ios-coding-standard/scripts/check_structure.py +0 -765
package/CHANGELOG.md CHANGED
@@ -16,6 +16,50 @@ Internal file-layout changes that don't affect the slash-command surface are sti
16
16
 
17
17
  ## [Unreleased]
18
18
 
19
+ ## [23.4.0] - 2026-11-11
20
+
21
+ ### Changed
22
+
23
+ - `reverse-engineer-own-app` points the store cross-check at `ios_app_store_audit` only; `ios-coding-standard` no longer ships a structure checker its skill never called.
24
+ - The free-model provider table lists the toolkit's local OpenAI-compatible provider.
25
+ - The leak gates no longer spell private names in the repository. `smoke-personal-data.sh` and `smoke-install-leak-gate.sh` read names that identify a person, an employer or a project from a private deny-list outside the repo (`$MA_LEAK_DENYLIST`, else `~/.config/multi-agent-mcp/leak-denylist.txt`; lines `re:`, `re-case:` and `id:`, the same file and format the toolkit reads), loaded by `pipeline/scripts/_leak-denylist.sh`. Without the list the run prints `skipped: private deny-list not installed` and checks the structural shapes only; `--strict` (or `MA_LEAK_STRICT=1`, set by the pre-push gate) fails instead, and an unusable list always fails. A hit is reported as `path:line` and the deny-list entry's line number, never the pattern or the matched text; the tarball step does the same through `leak_scan_paths`. The loader strips trailing whitespace from an entry, rejects an empty one and warns when the list is readable by group or others. A structural pass flags e-mail addresses, `user:password` URLs, `/Users/` and `/home/` directories and ticket URLs that are not placeholders, also without a list, and the tarball step runs it too. In `--root` mode on an install sandbox only the trees the installer owns (the top-level directories of `install-layout.tsv`) are scanned, not other programs' caches. `smoke-install-leak-gate.sh` sets `MULTI_AGENT_SKIP_MCP_REGISTER=1`, because the registration step ran the real Copilot CLI against the sandbox home and that CLI unpacked its own 119 MB package there. `run-smokes.mjs` hands the real list to isolated suites and repeats every `skipped:` line a suite printed (count and names) in its summary.
26
+ - The release workflow writes the list from the `LEAK_DENYLIST` repository secret to a temp file at run time and fails when the secret is missing; `publish-staged.mjs` runs `smoke-personal-data.sh --strict` in the package directory before it packs (or the command of `--leak-gate`), and `package.json` gets `prepublishOnly` with the same strict gate.
27
+ - Phase numbers in prose follow `pipeline/schemas/phases.json`: reviewers, the review panel and triage belong to Phase 3, the dev critic to Phase 2.5, in the dev-critic, model-fallback, review, diff-explain and cost-summary docs and `docs/engineering.md`. `lint-phase-labels.mjs` (run by `smoke-phase-labels.sh`) fails when a role is written beside the wrong phase number, in either word order, with any spacing and in Turkish (`Faz N`); the roles per phase are the `roles` lists in `phases.json`, and a role listed under two phases (the critic) is valid beside either.
28
+ - ROADMAP.md describes the present state, drops two dangling references and the process note about the old header, and states the model-selection non-goal in terms of the rungs, the fable switch and rule routing that exist and the 21.x - 23.x lines instead of a v16 candidate list; the opt-in telemetry idea is dropped because operational reporting is not opt-in.
29
+ - `docs/adr/0008` describes the current CI workflows, and `docs/performance.md` shows model ids from `cost-table.json` and no longer claims nothing leaves the machine.
30
+ - `prefs.schema.json` drops the `gitIdentities` and `office.remote` keys; `migrate-prefs.mjs` still removes them from an old preferences file. The other deprecated keys stay because a runtime fallback or a gate still reads them.
31
+ - `publish-staged.mjs` and `identifier-scan.mjs` (moved from `lib/` to `scripts/`) are maintainer tools and are left out of the installed scripts and the npm package.
32
+
33
+ ### Added
34
+
35
+ - `lint-unused-exports.mjs`: reports exported symbols that no other source file uses (tests and docs do not count as callers). Symbols a test imports are left out unless `--include-tested` is given, so the default report is the symbols nothing references. Advisory by default, `--strict` exits 1, `--list` prints them, `fixtures/unused-exports-allow.txt` lists public entry points when it exists.
36
+ - `gen-access-check.mjs` writes the Access check block of the 26 command files that carry it from `fixtures/access-check-blocks.json` (six variants); `--check` is in the test chain and fails on a hand edit or an unlisted copy.
37
+ - `validate-schemas.mjs` validates `schemas/examples/<name>.json` against `<name>.schema.json`; `design-check-config.schema.json` gets a worked example and a test.
38
+ - `test/codex-model-tables.test.mjs` holds the Codex tier table in `model-fallback.md` to `CODEX_TIER_MAP` and the Codex review panel to one reading across `phase-3-review.md` and `review/panel.md`.
39
+ - `features/cost-analysis.md` is linked from `/multi-agent:status`.
40
+
41
+ ### Removed
42
+
43
+ - `docs/FIGMA_PIPELINE.md`, a guide to a retired skill catalog (the current flow is `rules/figma-pipeline.md` and the stack plugins).
44
+ - The legacy wiki prompt flow in `wiki-capture.md` and the version stub in the analysis intake ref.
45
+ - Code graph sidecars. The main graph file stays schema 1.2.0 with the same node and edge kinds as before and validates under the previous validator; capabilities that add nodes or edges live in files beside it, each with its own schema and version, a record of the graph it was built against, node and edge caps with a `truncated` marker, and a staleness check: `<graph>.calls.json` (built by default, `--no-calls` to skip), `<graph>.docs.json` (`--docs`) and `<graph>.infra.json` (`--infra`). `code-graph.config.json` beside the graph sets the layers per repo; a flag wins. `graph-query`, `graph-affected`, `graph-report`, `graph-export` and `graph-hint` join the sidecars that are present and say when one is absent, stale, built against another graph, invalid or truncated. Call edges never count toward degree, so hubs stay structural.
46
+ - Call edges (calls sidecar): `calls` edges from the function that contains a call to the function, method or type it reaches, resolved without a language server for Swift, Kotlin, TypeScript and JavaScript, Python, Go, Rust, Java, C#, C and C++. Each edge records how it was derived (`via`) and a `confidence`: `high` when a binding was resolved, `medium` for inference, `low` for a name and argument count only. A name imported from outside the repo produces no edge. A call through a protocol, interface or overridden method also reaches each implementer. `eval-call-edges.mjs` measures precision and recall on nine hand-checked cases and runs in `npm test`. Hand-classified samples of 40 `high` edges per tree found 37 of 37, 39 of 39 and 34 of 35 correct (JavaScript, TypeScript, Swift) and 7 of 8, 6 of 8 and 5 of 8 on `low`; the Swift error class (a bare name resolved to a nested type or to a repository type with a platform name) is now zero. `low` is an unresolved binding, often right in script-style code and a lead elsewhere. Python, Go, Rust, Java, C#, C++ and Kotlin precision is fixture-verified only. See `features/code-graph.md`.
47
+ - Stacks `rust`, `java`, `csharp` and `cpp` for `graph-build` (rules under `code-graph-rules/` and `test-gap-rules/`).
48
+ - `graph-query --callers <fn>` and `--callees <fn>` (depth up to 15, `--min-confidence`), a confidence per hop and a weakest-hop line on `--path` (the stronger of two equal-length routes wins), `--seed` to start a walk at named nodes, `--include` to rank documentation, rationale, infrastructure and configuration nodes.
49
+ - Infrastructure, configuration, dependency, documentation and rationale nodes (infra and docs sidecars): Dockerfile, Compose, Kubernetes, Helm, Kustomize, Terraform, Terragrunt, GitHub Actions and GitLab CI, `.env`, Gradle, application config, dependency manifests, Markdown and AsciiDoc sections, and NOTE / WHY / ADR comments, with `sets`, `uses`, `builds`, `runs`, `reads`, `mentions` and `explains` edges. Code that reads an environment variable or key by a literal name reaches its definition through one `env:` or `config:` node. Names only; values are never stored.
50
+ - `graph-export.mjs` writes the graph as Graphviz, GraphML, CSV or a Mermaid flowchart, with a module-level architecture view. CSV cells that start like a formula are neutralised and labels are escaped per format.
51
+ - `graph-report` lists the most-called functions with their span, functions nothing calls (candidates, with the blind spots named), and environment variables read but never set or set but never read.
52
+ - `graph-affected` reports files added since the build (`freshness.addedFiles`), and follows callers of a function seed. `graph-hint` names up to three graph nodes with the searched name.
53
+ - The free-text `graph-query` walk and the tier sections leave `calls` edges and non-code nodes out unless asked, so ranking is unchanged.
54
+ - Call edges of low confidence are leads. `graph-query --callers`, `--callees` and `--path`, `graph-export` and the report's most-called table read edges of medium confidence and better by default; `--min-confidence low` adds the leads, labelled. `graph-affected` never follows a low edge, prints each row's confidence and `via`, and marks a dependent reached only through medium edges, so `analysis.touchedAreas[]` can list those as unconfirmed. `graph-export` carries the weakest confidence of each arrow into CSV, GraphML, DOT and Mermaid.
55
+ - Name scope for call edges: a type nested in another type is reached by its bare name only from inside the outer type or an extension of it, or written qualified; names the platform owns (`URL`, `Date`, `Timeline`, `print`, `Map`, ...) bind to a repository declaration only when it is in lexical scope; in Swift a declaration in another build target is `low` unless the caller's target can see it. JavaScript and TypeScript arity ranks and never rejects; nested functions are hoisted and visible to closures; re-exports are followed; calls in default parameter values and destructuring defaults are read.
56
+ - The main graph also changes on a tree that holds strings or templates, because string and template handling was fixed: symbols and references built from text inside a string disappear, real ones appear, and a multi-line constant gets a correct end line. On this repository 31 such symbol nodes and 112 edges disappeared, 3 nodes and 7 edges appeared and 62 spans changed their end line. Degrees follow.
57
+ - A function node's id is its qualified name, with the parameter labels of an overload and a numeral for a true duplicate, so it no longer changes when lines above it move.
58
+ - The calls schema and validator refuse a `certain` confidence; the validator fails a sidecar whose `parent` does not match the main graph it is validated with. The module view of `graph-export` descends a directory level when everything lives under one directory, and call resolution has its own time budget.
59
+ - The code-graph string and comment stripper is dialect-driven: nested block comments (Swift, Kotlin, Rust), Swift and Rust raw strings, C++ raw strings, JavaScript regular-expression literals and nested template literals, and calls inside string interpolation are handled; `#if` / `#else` branches each keep their own bracket state.
60
+ - `validate-code-graph.mjs` validates a graph together with its sidecars, caps its error output, and rejects a kind newer than the declared schema version.
61
+ - The documentation and configuration extractors read only regular files inside the repo root, run every pattern in linear time, and keep YAML maps without a prototype; each file and each collection has a time budget, and what was skipped is listed under `coverage`.
62
+
19
63
  ## [23.3.0] - 2026-11-10
20
64
 
21
65
  ### Changed
package/README.md CHANGED
@@ -158,7 +158,7 @@ The discipline behind all of this - bounded loops, evidence gates, token-budgete
158
158
 
159
159
  ## Commands
160
160
 
161
- `/multi-agent` plus <!-- fact:commandCount -->79<!-- /fact --> sub-commands. `/multi-agent:help` renders the same catalog in your terminal, in your `outputLanguage`.
161
+ `/multi-agent` plus <!-- fact:commandCount -->80<!-- /fact --> sub-commands. `/multi-agent:help` renders the same catalog in your terminal, in your `outputLanguage`.
162
162
 
163
163
  ### Pipeline entries
164
164
 
@@ -433,6 +433,16 @@ the page with a one-time code; the server runs until `/multi-agent:office-off`.
433
433
  Security model: [office threat model](pipeline/multi-agent-refs/features/office-threat-model.md).
434
434
  The office is local to this machine: no phone pairing, no relay, no remote access.
435
435
 
436
+ ### Remote control from a phone (optional, off by default)
437
+
438
+ `/multi-agent:pair` pairs a phone so you can list runs, read a run's pending
439
+ question, answer it with one of its offered options and stop a run's session
440
+ from the phone. Nothing runs until the site enables it for your account and a
441
+ phone is paired; no port is opened, the computer only polls the site over
442
+ HTTPS, and every request is re-verified here against a passkey pinned at
443
+ pairing. What leaves the machine and what the site can and cannot do:
444
+ [remote control](pipeline/multi-agent-refs/features/remote-control.md).
445
+
436
446
  ## Which model answers
437
447
 
438
448
  The ladder is `fable -> opus -> sonnet -> haiku`, and a run walks it on failure.
@@ -490,17 +500,17 @@ This enables the matching plugin (+ the shared `ai-common` plugin) in the repo's
490
500
 
491
501
  ## Tool support
492
502
 
493
- The pipeline runs natively on **Claude Code**, **Copilot CLI** and **Codex CLI** - all three install from the same `pipeline/` source and get the same <!-- fact:commandCount -->79<!-- /fact --> commands.
503
+ The pipeline runs natively on **Claude Code**, **Copilot CLI** and **Codex CLI** - all three install from the same `pipeline/` source and get the same <!-- fact:commandCount -->80<!-- /fact --> commands.
494
504
 
495
505
  | Tool | Flag | What it installs |
496
506
  | ----------- | -------------------- | ------------------------------------------------------------------------------------------------------ |
497
507
  | Claude Code | `--claude` (default) | slash commands + skills + agents + the enforcement hooks (secret scan, agent-guard, read-size gate, run-scope guard, run-stop guard) |
498
- | Copilot CLI | `--copilot` | instructions + <!-- fact:commandCount -->79<!-- /fact --> sub-command skills + scripts |
499
- | Codex CLI | `--codex` | one router skill + <!-- fact:commandCount -->79<!-- /fact --> specs as refs + a `/multi-agent-<name>` prompt per user-only command + <!-- fact:agentCount -->11<!-- /fact --> agent TOML + `AGENTS.md` block + `codex mcp add` |
508
+ | Copilot CLI | `--copilot` | instructions + <!-- fact:commandCount -->80<!-- /fact --> sub-command skills + scripts |
509
+ | Codex CLI | `--codex` | one router skill + <!-- fact:commandCount -->80<!-- /fact --> specs as refs + a `/multi-agent-<name>` prompt per user-only command + <!-- fact:agentCount -->11<!-- /fact --> agent TOML + `AGENTS.md` block + `codex mcp add` |
500
510
 
501
511
  Filter skills by stack with `--platform=ios\|android\|all`.
502
512
 
503
- **Why Codex gets one skill and not <!-- fact:commandCount -->79<!-- /fact -->.** Codex assembles every discovered skill's name
513
+ **Why Codex gets one skill and not <!-- fact:commandCount -->80<!-- /fact -->.** Codex assembles every discovered skill's name
504
514
  and description into a single prompt block and drops entries when it overflows, with no
505
515
  error. Measured on 0.145: installing one plugin that declares 142 skills surfaced only
506
516
  75 of them and evicted an unrelated user skill. So on Codex the pipeline ships a single
@@ -542,6 +552,7 @@ The **secret scan** runs as a `PreToolUse` hook on Claude Code (hard-blocks a co
542
552
  | `run-scope-guard.sh` (Figma phase rule, worktree boundary warning) | PreToolUse Figma tools, file edits | none: the phase records its own MCP calls | none |
543
553
  | `run-stop-guard.sh` (no silent stop mid-run) | Stop | none: halts stay the phase's own write | none |
544
554
  | `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 |
555
+ | `session-brief.sh` (opt-in, `sessionBrief.enabled`: a cached index of the repo's learnings ledger with a pointer per line and one code-graph line, about 350 tokens per session and again after each compaction; nothing for a repo with neither; silent when unattended) | SessionStart | none | none |
545
556
  | `file-context.sh` (what the repo's memory says about a file, when it is read or searched, fitted to the 10,000-character hook output limit) | PreToolUse `Read`/`Grep`/`Glob`, PostToolUse `Read` | none | none |
546
557
  | `graph-hint.sh` (points a whole-repo identifier search at a current code graph, once per session) | PreToolUse `Grep`/`Glob` | none | none |
547
558
  | `note-agent-event.sh` (a subagent's outcome or a failed tool call, into the session notes) | SubagentStop, PostToolUseFailure | none | none |
@@ -561,10 +572,18 @@ Installing the pipeline is not only useful when you run it. Open an ordinary ses
561
572
 
562
573
  - **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.
563
574
  - **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.
564
- - **The `multi-agent` MCP.** <!-- fact:toolCount -->251<!-- /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_*`).
575
+ - **The `multi-agent` MCP.** <!-- fact:toolCount -->259<!-- /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_*`).
565
576
 
566
577
  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.
567
578
 
579
+ ## Usage reporting
580
+
581
+ A run reports coarse metadata to the maintainer's site so a failing install can be diagnosed from its record. Every field is one of four things: a number or a boolean, a value from a closed list shipped inside the package (commands, skills, tools, models, modes, halt codes), a keyed digest (run, repository and machine identifiers, which the site cannot turn back into names), or the documented subject (the GitHub login used for access, and feedback text you write yourself). Names that are not on a shipped list go out as `other` or `private`.
582
+
583
+ Never sent: prompts, code, diffs, file paths, repository names, ticket keys, titles, token values. Two fields are opt-in and reduced before they leave: a title becomes a word count, a ticket-shape flag and a language code, and a pull request address is kept only for the four public code hosts.
584
+
585
+ `usageLog.optOut: true` turns reporting off before any network call or credential read. Two things still run: the access check, which sends the login and the version and nothing else, and feedback you send on purpose. `/multi-agent:doctor` shows the outcome of the last send. The full field table is in `pipeline/multi-agent-refs/features/usage-reporting.md`.
586
+
568
587
  ## Platform support
569
588
 
570
589
  Runs on **macOS** only. The package declares `os: ["darwin"]`, so `npm` refuses to install it elsewhere rather than letting a run fail halfway through: every credential read shells `security`, every iOS build `xcodebuild`, every piece of visual evidence `simctl`. Node.js 20.11+ (tested on 20 and 22). Reasoning: [ADR-0012](docs/adr/0012-macos-only.md).
package/README.tr.md CHANGED
@@ -157,7 +157,7 @@ Koşunun kendisinde ayarlanabilen tek şey autopilot; geri kalan her şey kendi
157
157
 
158
158
  ## Komutlar
159
159
 
160
- `/multi-agent` ve <!-- fact:commandCount -->79<!-- /fact --> alt komut. `/multi-agent:help` aynı katalogu terminalde, `outputLanguage` ayarına göre gösterir.
160
+ `/multi-agent` ve <!-- fact:commandCount -->80<!-- /fact --> alt komut. `/multi-agent:help` aynı katalogu terminalde, `outputLanguage` ayarına göre gösterir.
161
161
 
162
162
  ### Pipeline girişleri
163
163
 
@@ -192,7 +192,7 @@ Koşunun kendisinde ayarlanabilen tek şey autopilot; geri kalan her şey kendi
192
192
  | `/multi-agent:review-priority` | Ekibin açık bug priority'lerini kural dosyasına göre denetler. Salt okur; her seferinde tek onaylı değişiklik |
193
193
  | `/multi-agent:review-issue` | Aynı puanlama, GitHub issue'su için |
194
194
  | `/multi-agent:review-analysis` | Yazılmış analiz dokümanını review eder; bulgular ihlal edilen Locked kuralını gösterir |
195
- | `/multi-agent:diff-explain` | Faz 4 triyaj bulgusunu onu doğuran diff satırlarına eşler |
195
+ | `/multi-agent:diff-explain` | Faz 3 triyaj bulgusunu onu doğuran diff satırlarına eşler |
196
196
  | `/multi-agent:estimate` | Benzer kapanmış işlerden efor aralığı: rol başına P25-P75, dayandığı ticket'larla |
197
197
  | `/multi-agent:postmortem` | Koşunun transkriptlerinden post-mortem: döngüler, takılmalar, dosya:satır dayanaklı kök-neden hipotezleri |
198
198
  | `/multi-agent:scenario-audit` | Test senaryolarını koda karşı denetler; her VAR çözülen bir dosya:satıra dayanır |
@@ -431,6 +431,16 @@ başlatır ve sayfayı tek kullanımlık bir kodla açar; sunucu
431
431
  Güvenlik modeli: [ofis tehdit modeli](pipeline/multi-agent-refs/features/office-threat-model.md).
432
432
  Ofis yalnızca bu makinede çalışır: telefon eşleme, aktarım ya da uzaktan erişim yoktur.
433
433
 
434
+ ### Telefondan uzaktan kontrol (isteğe bağlı, varsayılan kapalı)
435
+
436
+ `/multi-agent:pair` bir telefonu eşler; telefondan koşuları listeleyebilir,
437
+ bekleyen soruyu sunulan seçeneklerden biriyle yanıtlayabilir ve bir koşunun
438
+ oturumunu durdurabilirsiniz. Site hesabınız için açana ve bir telefon eşlenene
439
+ kadar hiçbir şey çalışmaz; port açılmaz, bilgisayar siteyi yalnızca HTTPS ile
440
+ yoklar ve her istek eşleşmede sabitlenen bir passkey'e karşı burada yeniden
441
+ doğrulanır. Makineden ne çıktığı ve sitenin neyi yapıp yapamayacağı:
442
+ [uzaktan kontrol](pipeline/multi-agent-refs/features/remote-control.md).
443
+
434
444
  ## Hangi model cevaplıyor
435
445
 
436
446
  Merdiven `fable -> opus -> sonnet -> haiku`; koşu başarısızlıkta merdiveni iner.
@@ -488,17 +498,17 @@ Bu, ilgili plugin'i (+ ortak `ai-common` plugin'ini) repo'nun `.claude/settings.
488
498
 
489
499
  ## Araç desteği
490
500
 
491
- Pipeline **Claude Code**, **Copilot CLI** ve **Codex CLI** üzerinde native çalışır - üçü de aynı `pipeline/` kaynağından kurulur ve aynı <!-- fact:commandCount -->79<!-- /fact --> komutu alır.
501
+ Pipeline **Claude Code**, **Copilot CLI** ve **Codex CLI** üzerinde native çalışır - üçü de aynı `pipeline/` kaynağından kurulur ve aynı <!-- fact:commandCount -->80<!-- /fact --> komutu alır.
492
502
 
493
503
  | Araç | Bayrak | Ne kurar |
494
504
  | ----------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------- |
495
505
  | Claude Code | `--claude` (varsayılan) | slash komutları + skill'ler + agent'lar + üç `PreToolUse` hook'u (secret scan, agent-guard, okuma-boyutu geçidi) |
496
- | Copilot CLI | `--copilot` | talimatlar + <!-- fact:commandCount -->79<!-- /fact --> alt-komut skill'i + script'ler |
497
- | Codex CLI | `--codex` | bir router skill + ref olarak <!-- fact:commandCount -->79<!-- /fact --> spec + yalnızca kullanıcının yazdığı her komut için bir `/multi-agent-<ad>` prompt'u + <!-- fact:agentCount -->11<!-- /fact --> agent TOML + `AGENTS.md` bloğu + `codex mcp add` |
506
+ | Copilot CLI | `--copilot` | talimatlar + <!-- fact:commandCount -->80<!-- /fact --> alt-komut skill'i + script'ler |
507
+ | Codex CLI | `--codex` | bir router skill + ref olarak <!-- fact:commandCount -->80<!-- /fact --> spec + yalnızca kullanıcının yazdığı her komut için bir `/multi-agent-<ad>` prompt'u + <!-- fact:agentCount -->11<!-- /fact --> agent TOML + `AGENTS.md` bloğu + `codex mcp add` |
498
508
 
499
509
  Skill'leri stack'e göre filtrele: `--platform=ios\|android\|all`.
500
510
 
501
- **Codex neden <!-- fact:commandCount -->79<!-- /fact --> değil de tek bir skill alıyor.** Codex, keşfettiği her skill'in adını
511
+ **Codex neden <!-- fact:commandCount -->80<!-- /fact --> değil de tek bir skill alıyor.** Codex, keşfettiği her skill'in adını
502
512
  ve açıklamasını tek bir prompt bloğuna toplar ve blok taştığında girdileri hatasızca
503
513
  düşürür. 0.145 üzerinde ölçüldü: 142 skill deklare eden bir plugin kurulduğunda sadece
504
514
  75'i yüzeye çıktı ve alakasız bir kullanıcı skill'i tahliye edildi. Bu yüzden Codex'te
@@ -542,6 +552,7 @@ triage notu bunu belirtir.
542
552
  | `run-stop-guard.sh` (koşu ortasında sessizce durmaz) | Stop | yok: duraklama fazın kendi yazımı olarak kalır | yok |
543
553
  | `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 |
544
554
  | `file-context.sh` (okunan ya da aranan dosya hakkında repo hafızasının söylediklerini verir; çıktı 10.000 karakterlik hook sınırına sığdırılır) | PreToolUse `Read`/`Grep`/`Glob`, PostToolUse `Read` | yok | yok |
555
+ | `session-brief.sh` (isteğe bağlı, `sessionBrief.enabled`: reponun öğrenme defterinin satır başına işaretçili önbellekli dizini ve tek satır kod grafiği; oturum başına ve her sıkıştırmadan sonra yaklaşık 350 token; ikisi de yoksa hiçbir şey basmaz; gözetimsiz çalışmada sessiz) | SessionStart | yok | yok |
545
556
  | `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 |
546
557
  | `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 |
547
558
  | `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 |
@@ -559,10 +570,18 @@ Pipeline'ı kurmak yalnız onu çalıştırdığında işe yaramıyor. Sıradan
559
570
 
560
571
  - **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.
561
572
  - **`/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.
562
- - **`multi-agent` MCP.** <!-- fact:toolCount -->251<!-- /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.
573
+ - **`multi-agent` MCP.** <!-- fact:toolCount -->259<!-- /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.
563
574
 
564
575
  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.
565
576
 
577
+ ## Kullanım raporu
578
+
579
+ Her koşu, bakımcının sitesine kaba bir özet gönderir. Amaç, bozulan bir kurulumun kaydından teşhis edilebilmesidir. Gönderilen her alan dört türden biridir: bir sayı ya da mantıksal değer; paketin içinde gelen kapalı bir listeden bir değer (komutlar, skill'ler, araçlar, modeller, modlar, kesinti kodları); anahtarlı bir özet (koşu, repo ve makine kimlikleri; site bunları ada çeviremez); ya da belgelenmiş özne (erişim için kullanılan GitHub kullanıcı adı ve kendi yazdığın geri bildirim metni). Listede olmayan adlar `other` ya da `private` olarak gider.
580
+
581
+ Hiç gönderilmez: prompt, kod, diff, dosya yolu, repo adı, bilet anahtarı, başlık, token değeri. İki alan isteğe bağlıdır ve çıkmadan önce indirgenir: başlık yalnız kelime sayısı, bilet biçimi bayrağı ve dil koduna döner; pull request adresi yalnız dört açık kod sunucusu için tutulur.
582
+
583
+ `usageLog.optOut: true` raporlamayı her ağ çağrısından ve her kimlik bilgisi okumasından önce kapatır. İki şey çalışmaya devam eder: yalnız kullanıcı adını ve sürümü gönderen erişim kontrolü ve bilerek gönderdiğin geri bildirim. `/multi-agent:doctor` son gönderimin sonucunu gösterir. Alan tablosunun tamamı `pipeline/multi-agent-refs/features/usage-reporting.md` içindedir.
584
+
566
585
  ## Platform desteği
567
586
 
568
587
  Yalnızca **macOS** üzerinde çalışır. Paket `os: ["darwin"]` beyan eder, yani `npm` başka bir platformda kurulumu reddeder - koşunun yarısında başarısız olmasındansa. Her credential okuması `security`, her iOS build'i `xcodebuild`, her ekran kaydı `simctl` çağırıyor. Node.js 20.11+ (20 ve 22'de test edildi). Gerekçe: [ADR-0012](docs/adr/0012-macos-only.md).
@@ -74,7 +74,7 @@ Schema validation proves each schema is well-formed. It does not prove that prod
74
74
 
75
75
  ### 6. CI matrix splits into full + lite workflows
76
76
 
77
- `.github/workflows/test.yml` keeps the full matrix (Ubuntu/macOS/Windows × Node 20/22 + credential-store round-trips). `.github/workflows/ci-lite.yml` is the workflow_dispatch-only fast lane (Ubuntu + Node 22, no credential round-trips, ~3 minutes). The lite workflow is the one contributors run via `act` while billing is paused; the full matrix runs on demand for releases.
77
+ `.github/workflows/test.yml` keeps the full matrix (macOS × Node 20/22 + credential-store round-trips). `.github/workflows/ci-lite.yml` is the fast lane (macOS + Node 22, no credential round-trips, 15-minute timeout). Both run on every push and pull request to `main` and by `workflow_dispatch`; the lite workflow can be reproduced locally with `act`.
78
78
 
79
79
  ### 7. Recovery guide gains four new playbooks
80
80
 
@@ -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`, five entry points
51
- (`graph-build`, `graph-query`, `graph-affected`, `graph-report`,
52
- `validate-code-graph`), a schema at `pipeline/schemas/code-graph.schema.json`,
53
- and the `/multi-agent:graph` command. It sits behind
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
- Regex over comment-stripped source is not a parser. Definitions and imports
60
- survive that trade; call graphs and type resolution do not. Two further limits
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,300-file repo produces a ~22MB JSON file. It is read whole on every
137
- query; that is fine at this scale and is not proven at ten times it.
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.
@@ -115,7 +115,7 @@ graph TB
115
115
  end
116
116
 
117
117
  subgraph "Pipeline Specs"
118
- CMD[commands/<br/>79 command files]
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 + 79 sub-command skills)"]
211
- COD["Codex CLI<br/>(1 router skill + 79 refs)"]
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)"]