@mmerterden/multi-agent-pipeline 20.22.0 → 20.23.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 (49) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/docs/adr/0010-own-code-graph.md +3 -2
  3. package/docs/facts.json +3 -3
  4. package/docs/features.md +2 -2
  5. package/install/_usage-lifecycle.mjs +44 -0
  6. package/install/catalog-history.json +1 -1
  7. package/install/index.mjs +2 -0
  8. package/manifest.json +52 -49
  9. package/package.json +1 -1
  10. package/pipeline/commands/multi-agent/create-jira/SKILL.md +1 -1
  11. package/pipeline/commands/multi-agent/setup/SKILL.md +3 -3
  12. package/pipeline/commands/multi-agent/update/SKILL.md +3 -3
  13. package/pipeline/lib/json-file-lock.mjs +24 -2
  14. package/pipeline/multi-agent-refs/analysis/evidence.md +1 -1
  15. package/pipeline/multi-agent-refs/cross-cli-contract.md +1 -0
  16. package/pipeline/multi-agent-refs/features/analysis-jira.md +5 -0
  17. package/pipeline/multi-agent-refs/features/code-graph.md +40 -3
  18. package/pipeline/multi-agent-refs/features/usage-reporting.md +40 -23
  19. package/pipeline/multi-agent-refs/generate-issue.md +11 -1
  20. package/pipeline/multi-agent-refs/knowledge.md +18 -0
  21. package/pipeline/multi-agent-refs/phases/phase-1-plan.md +2 -2
  22. package/pipeline/schemas/code-graph.schema.json +3 -3
  23. package/pipeline/schemas/prefs.schema.json +26 -4
  24. package/pipeline/scripts/_code-graph.mjs +121 -12
  25. package/pipeline/scripts/_diff-impact.mjs +12 -5
  26. package/pipeline/scripts/_supertypes.mjs +133 -0
  27. package/pipeline/scripts/analysis-story-body.mjs +24 -8
  28. package/pipeline/scripts/capture-flush.sh +4 -1
  29. package/pipeline/scripts/code-graph-rules/android.json +1 -0
  30. package/pipeline/scripts/code-graph-rules/ios.json +5 -0
  31. package/pipeline/scripts/code-graph-rules/node.json +1 -0
  32. package/pipeline/scripts/code-graph-rules/python.json +1 -0
  33. package/pipeline/scripts/git-path.mjs +21 -0
  34. package/pipeline/scripts/graph-affected.mjs +2 -1
  35. package/pipeline/scripts/graph-confirm.mjs +140 -0
  36. package/pipeline/scripts/learnings-ledger.mjs +3 -2
  37. package/pipeline/scripts/product-context.mjs +30 -19
  38. package/pipeline/scripts/symbol-existence-gate.mjs +21 -9
  39. package/pipeline/scripts/test-gap-scan.mjs +4 -1
  40. package/pipeline/scripts/test-strength.mjs +7 -8
  41. package/pipeline/scripts/usage-identity.mjs +1 -1
  42. package/pipeline/scripts/usage-register.mjs +181 -15
  43. package/pipeline/scripts/validate-code-graph.mjs +3 -3
  44. package/pipeline/scripts/valven-gate.mjs +9 -1
  45. package/pipeline/scripts/valven-port.mjs +16 -5
  46. package/pipeline/scripts/valven-split.mjs +6 -4
  47. package/pipeline/skills/.skill-manifest.json +3 -3
  48. package/pipeline/skills/shared/core/multi-agent-setup/SKILL.md +3 -3
  49. package/pipeline/skills/shared/core/multi-agent-update/SKILL.md +3 -3
package/CHANGELOG.md CHANGED
@@ -16,6 +16,35 @@ Internal file-layout changes that don't affect the slash-command surface are sti
16
16
 
17
17
  ## [Unreleased]
18
18
 
19
+ ## [20.23.0] - 2026-10-13
20
+
21
+ ### Added
22
+
23
+ - **Operational reporting reaches teammates on work machines.** When no GitHub account on the machine can prove access, setup and update ask once for the person's GitHub username and `usage-register.mjs --login <name>` registers it as declared; the server issues the token only to a collaborator (the repository owner registers with a proof), under a machine label with a random suffix, and marks its records `claimed`. Later runs re-register a declared name without asking. A declared name is used only when the machine proves no account: it never replaces a proven registration, a later proof replaces it, it is compared case-insensitively, it is never used for `/multi-agent:feedback`, it is not written on a dry run or (outside feedback) an opted-out machine, a refused name is forgotten so setup asks again, and a claim that failed otherwise is not resent for a day.
24
+ - The installer starts `usage-report.mjs --lifecycle` right after writing the version stamps, so every install and update reaches the panel when it happens (`MULTI_AGENT_SKIP_USAGE_REPORT=1` turns it off).
25
+ - `graph-confirm.mjs` merges a `graph-affected` answer with `code_references` results: each direct dependent is `confirmed`, `name-only` or `unchecked`, and `lspOnly` names files the server found that the graph missed. Only a ready semantic index confirms or demotes.
26
+ - **`inherits` edges in the code graph** (schema 1.2.0): subtype to superclass, protocol or interface, read from Swift and Kotlin `:` lists, Swift extensions, Python bases and TypeScript `extends` / `implements`. `graph-affected "<Protocol>" --kind inherits --depth 1` lists its conformers.
27
+
28
+ ### Changed
29
+
30
+ - A Story's description puts each section in a coloured wiki panel, its heading first: the user story `#d4d39e`, the acceptance criteria `#d4a19e`, every other section `#9eb6d4`. `/multi-agent:create-jira` and the stories `/multi-agent:analysis-jira` plans both write it; Task and Bug keep plain sections.
31
+ - The code graph is on by default (`prefs.global.codeGraph.enabled: true`): it costs seconds and no API calls, never fails a run, and without it the diff mapping, `dependents_reached` and `inherits` answers never run. Set it to `false` and no graph is built or refreshed.
32
+ - `knowledge.md` lists the stores a run fills without a model, how each reaches Phase 1, and why the prose files carry no generated copy of them.
33
+
34
+ ### Fixed
35
+
36
+ - The code graph never points production code at a type a test file declares; a test fake named after a framework type (`protocol View`) made every view in an app depend on it.
37
+ - A root-level `Tests/` directory (the SwiftPM layout) counts as test code in the code graph and in `test-gap-scan`.
38
+ - An attribute whose arguments run over several lines (`@available(iOS 16,` / `macOS 13, *)`, `@Test(arguments: [Item.init(a: 1),`) belongs to the declaration below it.
39
+ - `symbol-existence-gate`, `test-strength`, `valven-port` and `valven-split` read git path lists NUL-separated, so files with non-ASCII names are checked under their real paths; valven pathspecs are literal.
40
+ - `learnings-ledger from-triage` exits 2 when it distills nothing, so a repeat `capture-flush` reports `ok-nothing-new` for the ledger.
41
+ - `product-context.mjs learn` and `decline` write the preferences file under the shared file lock, leave a file that does not parse untouched, and write through a symlink.
42
+ - A diff header whose quoted path is followed by a tab maps to the right file in `graph-affected --diff` and in `symbol-existence-gate`.
43
+ - `graph-affected --diff <base>..<head>` reads the diff on the side the graph was built at (its head or its base) whatever the working tree holds.
44
+ - `graph-build` keeps git's stderr off the terminal.
45
+ - `capture-flush.sh --json` keeps stdout to the JSON answer; its progress lines go to stderr.
46
+ - A preferences file that is a dangling symlink, or a chain of them, is written through to its target instead of replacing the link.
47
+
19
48
  ## [20.22.0] - 2026-10-13
20
49
 
21
50
  ### Added
@@ -51,8 +51,9 @@ The engine is `pipeline/scripts/_code-graph.mjs`, with per-stack rules in
51
51
  `pipeline/scripts/code-graph-rules/<stack>.json`, five entry points
52
52
  (`graph-build`, `graph-query`, `graph-affected`, `graph-report`,
53
53
  `validate-code-graph`), a schema at `pipeline/schemas/code-graph.schema.json`,
54
- and the `/multi-agent:graph` command. It is off by default behind
55
- `prefs.global.codeGraph.enabled`.
54
+ and the `/multi-agent:graph` command. It sits behind
55
+ `prefs.global.codeGraph.enabled`, off when this was decided and on by default
56
+ since ADR 0017's change-impact work made Phase 3 depend on it.
56
57
 
57
58
  ## What we deliberately gave up
58
59
 
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-10-12",
4
- "version": "20.22.0",
3
+ "generatedAt": "2026-10-13",
4
+ "version": "20.23.0",
5
5
  "phaseSchema": 2,
6
6
  "phases": [
7
7
  {
@@ -62,5 +62,5 @@
62
62
  "ui": 1
63
63
  },
64
64
  "pluginSkillCount": 252,
65
- "toolkitVersion": "3.22.1"
65
+ "toolkitVersion": "3.22.2"
66
66
  }
package/docs/features.md CHANGED
@@ -58,11 +58,11 @@ The install is not only useful while `/multi-agent` is running. `rules/outside-t
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
 
61
- ### Code Graph (`/multi-agent:graph`, opt-in)
61
+ ### Code Graph (`/multi-agent:graph`)
62
62
 
63
63
  A deterministic, LLM-free map of what a repo declares and what refers to what, extracted by regex over comment-stripped source into `~/.claude/knowledge/<project>/code-graph.json`. Four stacks build today (Swift, Kotlin/Java, TypeScript/JavaScript, Python); each is one rules file, and the engine is the same for all of them. Zero runtime dependencies, zero API cost, read-only on the repo.
64
64
 
65
- Phase 1 queries it to hand Explore a ranked starting file set instead of a full scan, and Phase 5 rebuilds it after the branch changed code - a rebuild is seconds, so staleness is a `baseCommit` comparison rather than a date heuristic. Off by default behind `prefs.global.codeGraph.enabled`; with it off the pipeline behaves exactly as before.
65
+ Phase 1 queries it to hand Explore a ranked starting file set instead of a full scan, and Phase 5 rebuilds it after the branch changed code - a rebuild is seconds, so staleness is a `baseCommit` comparison rather than a date heuristic. On by default behind `prefs.global.codeGraph.enabled`; with it off no graph is built or refreshed.
66
66
 
67
67
  `GRAPH_REPORT.md` also ends with **Symbols nothing else references**: symbols no other file in the repo names, split from the ones referenced only by their own tests. Candidates, never verdicts - the extractor is regex, not a parser, so the four classes that could not carry a reference edge either way (a kind outside the stack's `referenceKinds`, a name declared twice, a nested declaration, a test file) are counted and excluded rather than listed, and nothing gates on the result.
68
68
 
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Report the version just installed, without waiting for it.
3
+ *
4
+ * `usage-report.mjs --lifecycle` compares the version stamps the installer just
5
+ * wrote with `usageLog.reportedVersion` and sends one install or update record
6
+ * when they differ. It does nothing unless operational reporting is on and a
7
+ * token resolves, and it never fails. Starting it from the installer puts an
8
+ * install or update on the panel when it happens, including a version that is
9
+ * replaced before the machine's next pipeline run.
10
+ *
11
+ * `MULTI_AGENT_SKIP_USAGE_REPORT=1` starts nothing.
12
+ *
13
+ * @module install/_usage-lifecycle
14
+ */
15
+
16
+ import { spawn } from "node:child_process";
17
+ import { existsSync } from "node:fs";
18
+ import { join } from "node:path";
19
+
20
+ const HOSTS = [".claude", ".copilot", ".codex"];
21
+
22
+ /**
23
+ * @param {{home: string, packageRoot?: string, env?: NodeJS.ProcessEnv, spawnImpl?: typeof spawn}} opts
24
+ * @returns {string|null} the script started, or null
25
+ */
26
+ export function startLifecycleReport({ home, packageRoot, env = process.env, spawnImpl = spawn }) {
27
+ if (env.MULTI_AGENT_SKIP_USAGE_REPORT === "1") return null;
28
+ const candidates = [
29
+ ...HOSTS.map((h) => join(home, h, "scripts", "usage-report.mjs")),
30
+ ...(packageRoot ? [join(packageRoot, "pipeline", "scripts", "usage-report.mjs")] : []),
31
+ ];
32
+ const script = candidates.find((p) => existsSync(p));
33
+ if (!script) return null;
34
+ try {
35
+ spawnImpl(process.execPath, [script, "--lifecycle"], {
36
+ detached: true,
37
+ stdio: "ignore",
38
+ env: { ...process.env, ...env, HOME: home },
39
+ }).unref();
40
+ return script;
41
+ } catch {
42
+ return null;
43
+ }
44
+ }