@mmerterden/multi-agent-pipeline 20.40.0 → 20.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/CHANGELOG.md +94 -0
  2. package/README.md +5 -2
  3. package/README.tr.md +5 -2
  4. package/docs/adr/0019-product-tree.md +143 -0
  5. package/docs/adr/README.md +1 -0
  6. package/docs/ecosystem.md +51 -14
  7. package/docs/facts.json +7 -7
  8. package/docs/features.md +15 -4
  9. package/install/claude.mjs +45 -3
  10. package/install/templates/claude-hooks.json +23 -1
  11. package/manifest.json +146 -107
  12. package/package.json +3 -2
  13. package/pipeline/commands/multi-agent/autopilot/SKILL.md +11 -0
  14. package/pipeline/commands/multi-agent/review-analysis/SKILL.md +1 -1
  15. package/pipeline/commands/multi-agent/setup/SKILL.md +1 -1
  16. package/pipeline/contract/types/index.d.ts +53 -49
  17. package/pipeline/lib/args.mjs +131 -4
  18. package/pipeline/lib/bg-launch.mjs +5 -2
  19. package/pipeline/lib/context-budget.mjs +5 -42
  20. package/pipeline/lib/credential-store.sh +11 -1
  21. package/pipeline/lib/hook-once.mjs +134 -0
  22. package/pipeline/lib/hook-registration.mjs +5 -0
  23. package/pipeline/lib/isotonic.mjs +73 -0
  24. package/pipeline/lib/low-disk.mjs +153 -0
  25. package/pipeline/lib/mcp-schema-load.mjs +90 -0
  26. package/pipeline/lib/md2confluence-v3.py +19 -10
  27. package/pipeline/lib/model-dispatch.sh +26 -2
  28. package/pipeline/lib/normalize-text.mjs +135 -0
  29. package/pipeline/lib/outbound-gate.mjs +21 -3
  30. package/pipeline/lib/plan-todos.sh +17 -4
  31. package/pipeline/lib/redact.mjs +12 -3
  32. package/pipeline/lib/risky-settings.mjs +198 -0
  33. package/pipeline/lib/route-state.sh +1 -0
  34. package/pipeline/lib/secret-patterns.generated.mjs +6 -2
  35. package/pipeline/lib/session-usage.mjs +232 -0
  36. package/pipeline/lib/source-digest.mjs +211 -0
  37. package/pipeline/lib/tdd-evidence.mjs +250 -17
  38. package/pipeline/lib/tiered-budget.mjs +87 -0
  39. package/pipeline/lib/untrusted-fence.mjs +132 -1
  40. package/pipeline/multi-agent-refs/analysis/locked.md +1 -1
  41. package/pipeline/multi-agent-refs/analysis/review.md +23 -1
  42. package/pipeline/multi-agent-refs/features/code-graph.md +11 -1
  43. package/pipeline/multi-agent-refs/features/cost-analysis.md +37 -2
  44. package/pipeline/multi-agent-refs/features/doctor.md +82 -4
  45. package/pipeline/multi-agent-refs/features/model-fallback.md +25 -0
  46. package/pipeline/multi-agent-refs/features/plan-todos.md +4 -0
  47. package/pipeline/multi-agent-refs/features/product-tree.md +68 -0
  48. package/pipeline/multi-agent-refs/features/unattended-gates.md +5 -3
  49. package/pipeline/multi-agent-refs/features/unattended-security.md +88 -1
  50. package/pipeline/multi-agent-refs/features/usage-reporting.md +33 -0
  51. package/pipeline/multi-agent-refs/help/en.md +2 -1
  52. package/pipeline/multi-agent-refs/help/tr.md +2 -1
  53. package/pipeline/multi-agent-refs/knowledge.md +58 -0
  54. package/pipeline/multi-agent-refs/outside-the-pipeline.md +6 -0
  55. package/pipeline/multi-agent-refs/phases/phase-0-init.md +4 -0
  56. package/pipeline/multi-agent-refs/phases/phase-1-plan.md +5 -1
  57. package/pipeline/multi-agent-refs/phases/phase-2-dev.md +4 -4
  58. package/pipeline/multi-agent-refs/phases/phase-3-review.md +2 -2
  59. package/pipeline/multi-agent-refs/phases/phase-5-report.md +4 -0
  60. package/pipeline/multi-agent-refs/progress-contract.md +3 -1
  61. package/pipeline/office/index.html +13 -7
  62. package/pipeline/office/toolkit.json +1 -1
  63. package/pipeline/preferences-template.json +1 -0
  64. package/pipeline/rules/outside-the-pipeline.md +1 -1
  65. package/pipeline/schemas/doctor-report.schema.json +47 -0
  66. package/pipeline/schemas/learnings-ledger.schema.json +35 -2
  67. package/pipeline/schemas/office-archive.schema.json +225 -128
  68. package/pipeline/schemas/plan-todos.schema.json +29 -1
  69. package/pipeline/schemas/prefs.schema.json +146 -0
  70. package/pipeline/schemas/product-tree-overlay.schema.json +57 -0
  71. package/pipeline/schemas/product-tree.schema.json +136 -0
  72. package/pipeline/schemas/route-config.schema.json +51 -0
  73. package/pipeline/schemas/secret-patterns.json +17 -1
  74. package/pipeline/schemas/toolkit-path-params.json +15 -1
  75. package/pipeline/scripts/_cost-advise.mjs +357 -0
  76. package/pipeline/scripts/_cost-budget.mjs +78 -0
  77. package/pipeline/scripts/_cost.mjs +29 -0
  78. package/pipeline/scripts/_decode_text.py +107 -0
  79. package/pipeline/scripts/_eval-stats.mjs +182 -0
  80. package/pipeline/scripts/_guard-probe.mjs +406 -0
  81. package/pipeline/scripts/_guard_rules.py +336 -1
  82. package/pipeline/scripts/_learnings-promotion.mjs +229 -0
  83. package/pipeline/scripts/_locate.mjs +539 -0
  84. package/pipeline/scripts/_memory-policy.mjs +208 -33
  85. package/pipeline/scripts/_product-tree-extract.mjs +761 -0
  86. package/pipeline/scripts/_product-tree.mjs +923 -0
  87. package/pipeline/scripts/_retrieval.mjs +161 -4
  88. package/pipeline/scripts/_secret-scan.mjs +6 -1
  89. package/pipeline/scripts/_stack-routing.mjs +2 -0
  90. package/pipeline/scripts/_test-gaming.mjs +346 -0
  91. package/pipeline/scripts/_user_guard_rules.py +744 -0
  92. package/pipeline/scripts/agent-guard.py +69 -6
  93. package/pipeline/scripts/agent-guard.sh +8 -1
  94. package/pipeline/scripts/argv-secret-scan.mjs +2 -1
  95. package/pipeline/scripts/autopilot-loop.mjs +407 -0
  96. package/pipeline/scripts/autopilot-runner.mjs +38 -25
  97. package/pipeline/scripts/capture-resume.sh +9 -1
  98. package/pipeline/scripts/cost-analyze.mjs +66 -4
  99. package/pipeline/scripts/cost-budget-check.mjs +5 -13
  100. package/pipeline/scripts/disk-cleaner.mjs +1418 -0
  101. package/pipeline/scripts/doctor.mjs +324 -43
  102. package/pipeline/scripts/evidence-gate.mjs +90 -0
  103. package/pipeline/scripts/gate-ledger.mjs +76 -21
  104. package/pipeline/scripts/gc-tmp.sh +5 -0
  105. package/pipeline/scripts/graph-query.mjs +257 -17
  106. package/pipeline/scripts/guard-probe-known-holes.json +3 -0
  107. package/pipeline/scripts/learnings-ledger.mjs +680 -55
  108. package/pipeline/scripts/note-agent-event.mjs +2 -0
  109. package/pipeline/scripts/note-mcp-failure.mjs +363 -0
  110. package/pipeline/scripts/note-mcp-failure.sh +19 -0
  111. package/pipeline/scripts/note-skill-use.mjs +96 -23
  112. package/pipeline/scripts/office-archive.mjs +23 -10
  113. package/pipeline/scripts/office-memory.mjs +4 -1
  114. package/pipeline/scripts/persona-walk-anchors.mjs +443 -0
  115. package/pipeline/scripts/pre-commit-check.sh +2 -2
  116. package/pipeline/scripts/pre-push-check.sh +8 -1
  117. package/pipeline/scripts/product-tree-eval.mjs +685 -0
  118. package/pipeline/scripts/product-tree.mjs +544 -0
  119. package/pipeline/scripts/publish-staged.mjs +324 -0
  120. package/pipeline/scripts/route-learn.mjs +628 -0
  121. package/pipeline/scripts/run-scope-guard.mjs +55 -1
  122. package/pipeline/scripts/scan-agent-config.sh +1 -1
  123. package/pipeline/scripts/statusline.mjs +309 -0
  124. package/pipeline/scripts/test-integrity-gate.mjs +97 -2
  125. package/pipeline/scripts/triage-memory.mjs +12 -4
  126. package/pipeline/scripts/uninstall.mjs +1 -0
  127. package/pipeline/skills/.skill-manifest.json +15 -7
  128. package/pipeline/skills/.skills-index.json +25 -3
  129. package/pipeline/skills/shared/README.md +6 -4
  130. package/pipeline/skills/shared/core/google-play-compliance/references/examples.md +1 -1
  131. package/pipeline/skills/shared/core/multi-agent-review-analysis/SKILL.md +1 -1
  132. package/pipeline/skills/shared/external/backlog/SKILL.md +1 -1
  133. package/pipeline/skills/shared/external/disk-cleaner/SKILL.md +105 -0
  134. package/pipeline/skills/shared/external/disk-cleaner/evals/evals.json +62 -0
  135. package/pipeline/skills/shared/external/disk-cleaner/scripts/disk-cleaner.mjs +1418 -0
  136. package/pipeline/skills/shared/external/localization-reuse-map/SKILL.md +1 -1
  137. package/pipeline/skills/shared/external/spec-persona-walk/SKILL.md +118 -0
  138. package/pipeline/skills/shared/external/spec-persona-walk/evals/evals.json +50 -0
  139. package/pipeline/skills/shared/external/spec-persona-walk/scripts/persona-walk-anchors.mjs +443 -0
  140. package/pipeline/skills/shared/external/storekit/SKILL.md +1 -1
  141. package/pipeline/skills/shared/external/swiftdata/SKILL.md +1 -1
  142. package/pipeline/skills/skill-copies.json +9 -1
  143. package/pipeline/skills/skills-index.md +4 -2
@@ -674,6 +674,26 @@
674
674
  "recordDecisions": {
675
675
  "type": "boolean",
676
676
  "default": true
677
+ },
678
+ "learned": {
679
+ "type": "object",
680
+ "additionalProperties": false,
681
+ "description": "Learned rung order (route-learn.mjs), ships disabled. Contract: route-config.schema.json.",
682
+ "properties": {
683
+ "enabled": { "type": "boolean", "default": false },
684
+ "minSamples": { "type": "integer", "minimum": 1, "default": 20 },
685
+ "target": { "type": "number", "minimum": 0, "maximum": 1, "default": 0.8 },
686
+ "halfLifeDays": { "type": "integer", "minimum": 1, "default": 60 },
687
+ "explore": { "type": "boolean", "default": false },
688
+ "holdout": {
689
+ "type": "number",
690
+ "exclusiveMinimum": 0,
691
+ "exclusiveMaximum": 1,
692
+ "default": 0.25
693
+ },
694
+ "minRows": { "type": "integer", "minimum": 1, "default": 10 },
695
+ "margin": { "type": "number", "minimum": 0, "default": 0.005 }
696
+ }
677
697
  }
678
698
  }
679
699
  },
@@ -1189,6 +1209,18 @@
1189
1209
  "type": "boolean",
1190
1210
  "default": true,
1191
1211
  "description": "Deduplicated PR review comments: before posting an inline comment, scan existing PR comments for a stable fingerprint marker (sha-16 of path|line|issue). If a comment with the same marker exists, skip - preserves audit trail without flooding the PR on re-runs. Provider-agnostic: GitHub /pulls/{n}/comments + /issues/{n}/comments and Bitbucket Server /pull-requests/{id}/activities?fromType=COMMENT are both checked. Set to false to restore the pre-v8.6 behavior (every run posts fresh comments, original spec)."
1212
+ },
1213
+ "personaWalk": {
1214
+ "type": "object",
1215
+ "additionalProperties": false,
1216
+ "description": "Spec persona walk in /multi-agent:review-analysis: up to four personas derived from the document walk its flows and report missing states, unhandled errors, accessibility gaps and conflicting rules. persona-walk-anchors.mjs drops every finding whose section or quote anchor is not in the document.",
1217
+ "properties": {
1218
+ "enabled": {
1219
+ "type": "boolean",
1220
+ "default": false,
1221
+ "description": "Run the persona walk as an extra review step. Off by default until a live run of eval-persona-walk.mjs meets the bar in pipeline/eval/README.md on the seeded-defect corpus."
1222
+ }
1223
+ }
1192
1224
  }
1193
1225
  }
1194
1226
  },
@@ -1471,6 +1503,43 @@
1471
1503
  }
1472
1504
  }
1473
1505
  },
1506
+ "mcpFailures": {
1507
+ "type": "object",
1508
+ "additionalProperties": false,
1509
+ "description": "The local MCP failure log note-mcp-failure.sh writes after each failed MCP tool call (Claude Code only): the server and tool from the tool name, the time and a closed error class, never arguments, output or error text. Nothing is probed. It stays on this machine under ~/.claude/logs/multi-agent/mcp-failures.jsonl; doctor's mcp-failures check reads it and lights INFO for a server that failed five times or more in 24 hours. usageLog.optOut true turns it off as well.",
1510
+ "properties": {
1511
+ "enabled": {
1512
+ "type": "boolean",
1513
+ "default": true,
1514
+ "description": "false stops the hook writing rows; rows already written stay until removed by hand or by uninstall --all-data."
1515
+ }
1516
+ }
1517
+ },
1518
+ "diskCleaner": {
1519
+ "type": "object",
1520
+ "additionalProperties": false,
1521
+ "description": "When the ecosystem suggests the disk-cleaner skill. lib/low-disk.mjs reads these with one statfs call from doctor's disk-space check, the SessionStart banner and the pre-push gate's failure path, and prints one line naming the skill. The suggestion never deletes anything.",
1522
+ "properties": {
1523
+ "lowDiskGb": {
1524
+ "type": "number",
1525
+ "minimum": 0,
1526
+ "default": 10,
1527
+ "description": "Suggest the cleaner when less than this many gigabytes are free on the volume holding $HOME."
1528
+ },
1529
+ "lowDiskPercent": {
1530
+ "type": "number",
1531
+ "minimum": 0,
1532
+ "maximum": 100,
1533
+ "default": 5,
1534
+ "description": "Suggest the cleaner when less than this share of the volume is free. Either floor is enough."
1535
+ },
1536
+ "suggest": {
1537
+ "type": "boolean",
1538
+ "default": true,
1539
+ "description": "false silences the suggestion everywhere, including after a disk-full failure."
1540
+ }
1541
+ }
1542
+ },
1474
1543
  "analysisPhase": {
1475
1544
  "type": "object",
1476
1545
  "additionalProperties": false,
@@ -1675,6 +1744,25 @@
1675
1744
  }
1676
1745
  }
1677
1746
  },
1747
+ "productTree": {
1748
+ "type": "object",
1749
+ "additionalProperties": false,
1750
+ "description": "v20.41+ - the screen layer over the code graph (ADR-0019), built by pipeline/scripts/product-tree.mjs into ~/.claude/knowledge/<project>/product-tree.json: screens, routes, flows, localized strings, endpoints and tests, derived without a model. When enabled, Phase 0 locates the task text in it and Phase 1 injects the matching subtree. Off by default until the measured go / no-go in ADR-0019 says otherwise.",
1751
+ "properties": {
1752
+ "enabled": {
1753
+ "type": "boolean",
1754
+ "default": false,
1755
+ "description": "Master switch. When false, no tree is built, located or injected."
1756
+ },
1757
+ "maxChars": {
1758
+ "type": "integer",
1759
+ "minimum": 500,
1760
+ "maximum": 10000,
1761
+ "default": 6000,
1762
+ "description": "Character cap on the injected subtree. Lines are dropped whole, lowest ranked first, by fitToBudget."
1763
+ }
1764
+ }
1765
+ },
1678
1766
  "devCritic": {
1679
1767
  "type": "object",
1680
1768
  "additionalProperties": false,
@@ -1858,6 +1946,18 @@
1858
1946
  "maximum": 3650,
1859
1947
  "default": 30,
1860
1948
  "description": "Recency half-life. Recency only separates entries of comparable relevance; it never promotes an unrelated entry."
1949
+ },
1950
+ "mmrLambda": {
1951
+ "type": "number",
1952
+ "minimum": 0,
1953
+ "maximum": 1,
1954
+ "default": 0.7,
1955
+ "description": "Maximal Marginal Relevance weight for the head of a recall answer: lambda * relevance - (1 - lambda) * similarity to what is already picked (TF-IDF cosine). Keeps near-duplicate rows from filling every place. 1 turns the re-pick off."
1956
+ },
1957
+ "multiQuery": {
1958
+ "type": "boolean",
1959
+ "default": true,
1960
+ "description": "Rank each clause of a multi-part task as its own query and fuse the rankings, so the second thing a task asks about is not crowded out by the first. false ranks the whole text as one query."
1861
1961
  }
1862
1962
  },
1863
1963
  "default": {
@@ -1957,6 +2057,46 @@
1957
2057
  "default": [],
1958
2058
  "description": "Absolute paths (a leading ~ is expanded) of checkouts kept as read-only references: agent-guard.sh refuses an Edit, Write or NotebookEdit whose target is inside one, and a git commit, push, merge, cherry-pick, revert, am, rebase or tag that runs in one (after any cd or git -C on the line). Attended and unattended alike. Empty means no repository is protected this way."
1959
2059
  },
2060
+ "guardRules": {
2061
+ "type": "array",
2062
+ "maxItems": 64,
2063
+ "default": [],
2064
+ "description": "The user's own agent-guard rules (scripts/_user_guard_rules.py), applied after every built-in rule and only ever stricter: a rule never allows what the built-in guard refuses or asks about. Each rule searches its tool's text with a regex: the command for Bash, the target path for Edit (also NotebookEdit, and MultiEdit where the guard is registered on it), Write and Read, and the tool input as compact JSON for a toolkit tool. warn lets the call proceed with a note, ask raises the confirmation prompt, block refuses; unattended, ask is block. A pattern with a back-reference, or one that does not compile, is invalid; every other pattern runs under a 1-second budget, block rules first, each rule with its own share, and doctor names one with a slow shape. A rule that gives no answer (out of time, or input past 65,536 characters) refuses unattended and asks attended when it is an ask or block rule. A preferences file that does not parse, or a guardRules that is not a list, applies no rule: unattended it refuses every call a rule could govern when the file names guardRules, and attended each such call carries a note. An invalid rule is ignored and reported by doctor's guard-rules check, except that an invalid block rule refuses its tool unattended. Messages name the id and reason, never the matched text. A Read rule needs agent-guard.sh registered on Read, which the default hooks do not do; doctor reports it. A Read rule does not cover a shell read such as cat; that needs a Bash rule. Empty adds nothing.",
2065
+ "items": {
2066
+ "type": "object",
2067
+ "additionalProperties": false,
2068
+ "required": ["id", "tool", "match", "action", "reason"],
2069
+ "properties": {
2070
+ "id": {
2071
+ "type": "string",
2072
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$",
2073
+ "description": "Unique name shown in every message the rule produces."
2074
+ },
2075
+ "tool": {
2076
+ "type": "string",
2077
+ "pattern": "^(?:Bash|Edit|Write|Read|mcp__multi-agent-toolkit__[A-Za-z0-9_*?]{1,80})$",
2078
+ "description": "Bash, Edit (also NotebookEdit, and MultiEdit where the guard is registered on it), Write, Read, or a glob over toolkit tool names such as mcp__multi-agent-toolkit__web_*. A step of agent_run_steps is judged as a call of its own tool."
2079
+ },
2080
+ "match": {
2081
+ "type": "string",
2082
+ "minLength": 1,
2083
+ "maxLength": 512,
2084
+ "description": "Python regular expression searched anywhere in the tool's text; inline flags such as (?i) work."
2085
+ },
2086
+ "action": {
2087
+ "type": "string",
2088
+ "enum": ["warn", "ask", "block"]
2089
+ },
2090
+ "reason": {
2091
+ "type": "string",
2092
+ "minLength": 1,
2093
+ "maxLength": 300,
2094
+ "pattern": "^[^\\u0000-\\u001f\\u007f]*\\S[^\\u0000-\\u001f\\u007f]*$",
2095
+ "description": "One line shown with the rule id when it applies."
2096
+ }
2097
+ }
2098
+ }
2099
+ },
1960
2100
  "attendedCommitGate": {
1961
2101
  "type": "object",
1962
2102
  "additionalProperties": false,
@@ -2557,6 +2697,12 @@
2557
2697
  "minimum": 0,
2558
2698
  "default": 8,
2559
2699
  "description": "Report the registered-server count once it exceeds this. The number is JUDGEMENT, not a measurement - it exists so the threshold is visible and adjustable instead of hidden in the script. 0 reports the count always."
2700
+ },
2701
+ "schemaInfoAboveTokens": {
2702
+ "type": "integer",
2703
+ "minimum": 0,
2704
+ "default": 8000,
2705
+ "description": "doctor --probe reports the toolkit's tool-list load per family (an estimate, bytes / 4) once the total reaches this many tokens, with the MCP_TOOLKIT_CAPS families that would cut it. Judgement, like infoAbove. 0 reports it always."
2560
2706
  }
2561
2707
  }
2562
2708
  }
@@ -0,0 +1,57 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mmerterden/multi-agent-pipeline/schemas/product-tree-overlay.schema.json",
4
+ "title": "Product tree overlay row",
5
+ "description": "One line of ~/.claude/knowledge/<project>/product-tree-overlay.jsonl, the append-only record of nodes a model proposed and a person agreed to or rejected. A proposal always carries evidence that points into the repository; only a person at a terminal, in an attended run, writes agree or reject. A proposal without a later agree row is never used as fact.",
6
+ "type": "object",
7
+ "required": ["id", "ts", "op", "by"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "id": { "type": "string", "pattern": "^[PAR]:[0-9a-f]{8}$" },
11
+ "ts": { "type": "string" },
12
+ "op": { "enum": ["propose", "agree", "reject"] },
13
+ "by": { "enum": ["model", "human"] },
14
+ "node": {
15
+ "type": "object",
16
+ "required": ["kind", "name"],
17
+ "additionalProperties": false,
18
+ "properties": {
19
+ "kind": { "enum": ["journey", "flow", "screen", "feature", "rule", "scenario", "event"] },
20
+ "name": { "type": "string", "minLength": 1 },
21
+ "parent": { "type": "string" }
22
+ }
23
+ },
24
+ "ref": {
25
+ "type": "string",
26
+ "pattern": "^P:[0-9a-f]{8}$",
27
+ "description": "agree / reject: the proposal this row decides."
28
+ },
29
+ "evidence": {
30
+ "type": "array",
31
+ "items": {
32
+ "type": "object",
33
+ "required": ["path", "line"],
34
+ "additionalProperties": false,
35
+ "properties": {
36
+ "path": { "type": "string", "minLength": 1 },
37
+ "line": { "type": "integer", "minimum": 1 },
38
+ "text": { "type": "string" }
39
+ }
40
+ }
41
+ },
42
+ "note": { "type": "string" }
43
+ },
44
+ "allOf": [
45
+ {
46
+ "if": { "properties": { "op": { "const": "propose" } } },
47
+ "then": {
48
+ "required": ["node", "evidence"],
49
+ "properties": { "by": { "const": "model" }, "evidence": { "minItems": 1 } }
50
+ }
51
+ },
52
+ {
53
+ "if": { "properties": { "op": { "enum": ["agree", "reject"] } } },
54
+ "then": { "required": ["ref"], "properties": { "by": { "const": "human" } } }
55
+ }
56
+ ]
57
+ }
@@ -0,0 +1,136 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mmerterden/multi-agent-pipeline/schemas/product-tree.schema.json",
4
+ "title": "Product tree",
5
+ "description": "The screen layer over the code graph, derived without a model by product-tree.mjs build: screens, routes, flows, localized strings, endpoints and tests, joined by navigation, string use, endpoint calls and test references. One file per project under ~/.claude/knowledge/<project>/product-tree.json, written 0600 and never shipped. Human-agreed additions live beside it in the append-only product-tree-overlay.jsonl.",
6
+ "type": "object",
7
+ "required": [
8
+ "schemaVersion",
9
+ "project",
10
+ "stacks",
11
+ "generatedAt",
12
+ "coverage",
13
+ "stats",
14
+ "nodes",
15
+ "edges"
16
+ ],
17
+ "additionalProperties": false,
18
+ "properties": {
19
+ "schemaVersion": { "enum": ["1.0.0"] },
20
+ "project": { "type": "string", "minLength": 1 },
21
+ "stacks": {
22
+ "type": "array",
23
+ "items": { "enum": ["ios", "android", "web"] },
24
+ "uniqueItems": true
25
+ },
26
+ "baseCommit": {
27
+ "type": ["string", "null"],
28
+ "description": "git HEAD the tree was built from; null outside a work tree."
29
+ },
30
+ "generatedAt": { "type": "string" },
31
+ "coverage": {
32
+ "type": "object",
33
+ "description": "Screen-index coverage per stack. reachable counts screens with an inbound entry, route, navigation or presentation edge; programmatic counts navigation calls whose destination is computed in code, and how many of them resolved to a screen.",
34
+ "propertyNames": { "enum": ["ios", "android", "web"] },
35
+ "additionalProperties": {
36
+ "type": "object",
37
+ "required": ["screens", "reachable", "routes", "routesWithScreen", "programmatic"],
38
+ "additionalProperties": false,
39
+ "properties": {
40
+ "screens": { "type": "integer", "minimum": 0 },
41
+ "reachable": { "type": "integer", "minimum": 0 },
42
+ "routes": { "type": "integer", "minimum": 0 },
43
+ "routesWithScreen": { "type": "integer", "minimum": 0 },
44
+ "programmatic": {
45
+ "type": "object",
46
+ "required": ["total", "resolved", "unresolved"],
47
+ "additionalProperties": false,
48
+ "properties": {
49
+ "total": { "type": "integer", "minimum": 0 },
50
+ "resolved": { "type": "integer", "minimum": 0 },
51
+ "unresolved": {
52
+ "type": "array",
53
+ "maxItems": 50,
54
+ "items": {
55
+ "type": "object",
56
+ "required": ["path", "line", "text"],
57
+ "additionalProperties": false,
58
+ "properties": {
59
+ "path": { "type": "string" },
60
+ "line": { "type": "integer", "minimum": 1 },
61
+ "text": { "type": "string" }
62
+ }
63
+ }
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }
69
+ },
70
+ "stats": {
71
+ "type": "object",
72
+ "required": ["nodes", "edges", "screens", "strings"],
73
+ "additionalProperties": false,
74
+ "properties": {
75
+ "nodes": { "type": "integer", "minimum": 0 },
76
+ "edges": { "type": "integer", "minimum": 0 },
77
+ "screens": { "type": "integer", "minimum": 0 },
78
+ "strings": { "type": "integer", "minimum": 0 }
79
+ }
80
+ },
81
+ "nodes": {
82
+ "type": "array",
83
+ "items": {
84
+ "type": "object",
85
+ "required": ["id", "kind", "name"],
86
+ "additionalProperties": false,
87
+ "properties": {
88
+ "id": { "type": "string", "minLength": 1 },
89
+ "kind": { "enum": ["app", "screen", "route", "flow", "string", "endpoint", "test"] },
90
+ "name": { "type": "string" },
91
+ "stack": { "enum": ["ios", "android", "web"] },
92
+ "path": { "type": "string" },
93
+ "line": { "type": "integer", "minimum": 0 },
94
+ "values": {
95
+ "type": "object",
96
+ "description": "string nodes: locale -> value.",
97
+ "additionalProperties": { "type": "string" }
98
+ },
99
+ "files": {
100
+ "type": "array",
101
+ "description": "screen nodes: the files the screen owns, its own first. string nodes: the files that reference the key.",
102
+ "items": { "type": "string" }
103
+ }
104
+ }
105
+ }
106
+ },
107
+ "edges": {
108
+ "type": "array",
109
+ "items": {
110
+ "type": "object",
111
+ "required": ["from", "to", "kind"],
112
+ "additionalProperties": false,
113
+ "properties": {
114
+ "from": { "type": "string" },
115
+ "to": { "type": "string" },
116
+ "kind": {
117
+ "enum": ["entry", "shows", "navigates", "presents", "uses-string", "calls", "tests"]
118
+ },
119
+ "via": {
120
+ "enum": [
121
+ "link",
122
+ "link-value",
123
+ "destination",
124
+ "sheet",
125
+ "cover",
126
+ "root",
127
+ "tab",
128
+ "hosting",
129
+ "programmatic"
130
+ ]
131
+ }
132
+ }
133
+ }
134
+ }
135
+ }
136
+ }
@@ -94,6 +94,57 @@
94
94
  "type": "boolean",
95
95
  "default": true,
96
96
  "description": "Write every routing decision to the cost ledger: which rule matched, which rung it chose, and why. On by default because a router whose choices are not recorded cannot be audited after the fact - and the question that always arrives later is 'why did this run cost that'."
97
+ },
98
+ "learned": {
99
+ "type": "object",
100
+ "additionalProperties": false,
101
+ "description": "Learned rung order (route-learn.mjs). Ships disabled. While enabled, model-dispatch.sh hands the strategy's order to route-learn.mjs choose, which reorders the rule's own candidates from the PROMOTED policy: per call site, task kind and complexity band, a Beta posterior over a reward taken from gate verdicts and review findings, never from a model's report on itself, sampled by seeded Thompson sampling. A policy changes only through route-learn.mjs promote, after it beats the current one on a time-ordered holdout. Too few outcomes, no promoted policy or any failure leaves the order unchanged.",
102
+ "properties": {
103
+ "enabled": { "type": "boolean", "default": false, "description": "Ships false." },
104
+ "minSamples": {
105
+ "type": "integer",
106
+ "minimum": 1,
107
+ "default": 20,
108
+ "description": "Outcomes a rung needs in a bucket before its posterior is used; with fewer than two such rungs the rule's order stands."
109
+ },
110
+ "target": {
111
+ "type": "number",
112
+ "minimum": 0,
113
+ "maximum": 1,
114
+ "default": 0.8,
115
+ "description": "A rung whose sampled reward clears this is good enough; the cheapest such rung is tried first."
116
+ },
117
+ "halfLifeDays": {
118
+ "type": "integer",
119
+ "minimum": 1,
120
+ "default": 60,
121
+ "description": "An outcome's weight halves every this many days."
122
+ },
123
+ "explore": {
124
+ "type": "boolean",
125
+ "default": false,
126
+ "description": "Draw a rung with too few outcomes from its prior instead of leaving it after the known ones. Off by default: exploring means sometimes trying a rung with no record."
127
+ },
128
+ "holdout": {
129
+ "type": "number",
130
+ "exclusiveMinimum": 0,
131
+ "exclusiveMaximum": 1,
132
+ "default": 0.25,
133
+ "description": "Newest fraction of the outcomes promote scores a candidate on."
134
+ },
135
+ "minRows": {
136
+ "type": "integer",
137
+ "minimum": 1,
138
+ "default": 10,
139
+ "description": "Holdout rows promote requires."
140
+ },
141
+ "margin": {
142
+ "type": "number",
143
+ "minimum": 0,
144
+ "default": 0.005,
145
+ "description": "Brier-score improvement over the current policy promote requires."
146
+ }
147
+ }
97
148
  }
98
149
  }
99
150
  }
@@ -202,7 +202,7 @@
202
202
  "id": "url-with-credentials",
203
203
  "label": "URL with embedded credentials",
204
204
  "kind": "context",
205
- "ere": "[a-z][a-z0-9+.-]*://[^[:space:]/:@]+:[^[:space:]/@]+@",
205
+ "ere": "[a-z][a-z0-9+.-]{0,31}://[^[:space:]/:@]{1,255}:[^[:space:]/@]+@",
206
206
  "left": "word"
207
207
  },
208
208
  {
@@ -423,6 +423,22 @@
423
423
  "len": 12,
424
424
  "suffix": "@example.com/x.git"
425
425
  },
426
+ {
427
+ "id": "url-with-credentials-300",
428
+ "rule": "url-with-credentials",
429
+ "prefix": "https://user:",
430
+ "fill": "s",
431
+ "len": 300,
432
+ "suffix": "@example.com/x.git"
433
+ },
434
+ {
435
+ "id": "url-with-credentials-2000",
436
+ "rule": "url-with-credentials",
437
+ "prefix": "https://user:",
438
+ "fill": "s",
439
+ "len": 2000,
440
+ "suffix": "@example.com/x.git"
441
+ },
426
442
  {
427
443
  "id": "bearer-header",
428
444
  "rule": "bearer-header",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$comment": "Generated by pipeline/scripts/gen-toolkit-path-params.mjs from multi-agent-toolkit-mcp tool-manifest.json; do not edit. Per toolkit tool: the parameters it writes to and the filesystem paths it reads, both confined by scripts/unattended_policy.py.",
3
- "toolkitVersion": "3.30.1",
3
+ "toolkitVersion": "3.32.0",
4
4
  "tools": {
5
5
  "agent_query_output": {
6
6
  "writes": [],
@@ -577,6 +577,20 @@
577
577
  "writes": [],
578
578
  "reads": []
579
579
  },
580
+ "media_video_plan": {
581
+ "writes": [],
582
+ "reads": []
583
+ },
584
+ "media_video_render": {
585
+ "writes": [
586
+ "out_dir"
587
+ ],
588
+ "reads": [
589
+ "footage_dir",
590
+ "voice_dir",
591
+ "music"
592
+ ]
593
+ },
580
594
  "pass_build": {
581
595
  "writes": [
582
596
  "output"