@mmerterden/multi-agent-pipeline 20.15.0 → 20.16.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 (33) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/docs/facts.json +5 -4
  3. package/install/catalog-history.json +1 -1
  4. package/install/claude.mjs +5 -1
  5. package/install/codex.mjs +4 -3
  6. package/manifest.json +36 -30
  7. package/package.json +1 -1
  8. package/pipeline/commands/multi-agent/review/SKILL.md +42 -1
  9. package/pipeline/multi-agent-refs/features/review-decision.md +2 -1
  10. package/pipeline/multi-agent-refs/features/valven.md +83 -0
  11. package/pipeline/multi-agent-refs/phases/phase-0-init.md +1 -0
  12. package/pipeline/multi-agent-refs/phases/phase-1-plan.md +2 -0
  13. package/pipeline/multi-agent-refs/phases/phase-2-dev.md +2 -4
  14. package/pipeline/multi-agent-refs/phases/phase-3-review.md +5 -5
  15. package/pipeline/multi-agent-refs/phases/phase-4-commit.md +1 -0
  16. package/pipeline/schemas/agent-state.schema.json +16 -0
  17. package/pipeline/schemas/prefs.schema.json +21 -0
  18. package/pipeline/scripts/gen-skills-index.mjs +2 -1
  19. package/pipeline/scripts/phase-tracker.sh +8 -0
  20. package/pipeline/scripts/pre-push-check.sh +3 -1
  21. package/pipeline/scripts/review-decision-gate.mjs +1 -1
  22. package/pipeline/scripts/uninstall.mjs +5 -1
  23. package/pipeline/scripts/valven-gate.mjs +788 -0
  24. package/pipeline/scripts/valven-port.mjs +169 -0
  25. package/pipeline/scripts/valven-split.mjs +341 -0
  26. package/pipeline/scripts/verify-citations.mjs +14 -1
  27. package/pipeline/skills/.skill-manifest.json +7 -3
  28. package/pipeline/skills/.skills-index.json +104 -71
  29. package/pipeline/skills/shared/README.md +4 -3
  30. package/pipeline/skills/shared/core/multi-agent-review/SKILL.md +2 -0
  31. package/pipeline/skills/shared/core/valven-rules/SKILL.md +62 -0
  32. package/pipeline/skills/shared/core/valven-rules/references/rules.yml +140 -0
  33. package/pipeline/skills/skills-index.md +74 -71
package/manifest.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@mmerterden/multi-agent-pipeline",
3
- "version": "20.15.0",
4
- "commit": "09149bf3e094216e7074ec86436ba94e8c621753",
5
- "generatedAt": "2026-10-02T09:44:18.338Z",
3
+ "version": "20.16.0",
4
+ "commit": "23aeff395893c0c78dbb8a4b65611a02454a058e",
5
+ "generatedAt": "2026-10-02T10:57:38.452Z",
6
6
  "algorithm": "sha256",
7
- "fileCount": 1297,
7
+ "fileCount": 1303,
8
8
  "files": {
9
- "CHANGELOG.md": "dde7fc53259eef5eda0d339ec6490d98df31155a1945958334b8347f8f7f8e77",
9
+ "CHANGELOG.md": "838ef9627bf6bbf35513a11a2a2786502e61ae9e3a17cb8348da488868dbe291",
10
10
  "LICENSE": "8d8c51aaf1e1538b180c69965fa038db71be86798cc3e26a143bebfefe16a43e",
11
11
  "README.md": "280e42dbd759e9a55eee46a82f2f5eaa11e866b05c0fb71b30f8330fa80b9c57",
12
12
  "README.tr.md": "25491697cbb9e3f91c1798bd1fbd05fa0a19906adb3e24a25a5fe0a055c2c559",
@@ -33,7 +33,7 @@
33
33
  "docs/best-practices.md": "f8b75b0d38b5896a6a852bb30a1edddeb24dab8b5b7b1d9313290e1241c72024",
34
34
  "docs/ecosystem.md": "6164b62955dc4b915ed13ad183682108b344378ceba6b7acbbf0b674d804b000",
35
35
  "docs/engineering.md": "550528cd47c7d2c921729c68d0782a00ac8e77a4bdfec479f6749f9c3235d188",
36
- "docs/facts.json": "f0ec3716ba9c5f364bf7984b46a09a79a89da76aeccdc8b9f44c020bb7130633",
36
+ "docs/facts.json": "76ab049f4bb47a06bdb9c08781314e406434488f5ce536c4e385f722594c9d99",
37
37
  "docs/features.md": "6c9f0efb00c683e6f611c440c87847b187f8b0eee59e9e812f3a241695bc2ae1",
38
38
  "docs/performance.md": "bbf2f3922c25dcba0c1a9e69ef420e3871a729af5b35009a49b48a5d3c5cd151",
39
39
  "docs/recovery-guide.md": "59a8f1b66b34cb9ff5507b3d54dac3b9915e184aa044d9c758d18cac818d510e",
@@ -51,9 +51,9 @@
51
51
  "install/_plugin-skills.mjs": "2de429260472a7b60bfe800eabc111624fa5f82a175e283481b05e5349dad572",
52
52
  "install/_telemetry.mjs": "5433d753f909beed2c8789272bba05e245482c472f83d3444f58000c4c9a634b",
53
53
  "install/_unattended-profile.mjs": "e1ed82bde35d19105ee12c2a551eb778912b0e5c93ab227fd15c993098d98de0",
54
- "install/catalog-history.json": "f3f777da790695046744a08011760237e124b662d6801bb7974ada3ee23b0437",
55
- "install/claude.mjs": "6af22bb9b2594aee502c36550020d2c9c4c3222061ed8a88a0885687cd91ebec",
56
- "install/codex.mjs": "d2fd88a3488a1bea580b3d81e5d434edbefa492cc08e5e9445bbcc2f5df2b509",
54
+ "install/catalog-history.json": "d1db2fb83821ef9de8437b7c893e1ce2cddbc34e368a62ac664bc626304eb9ec",
55
+ "install/claude.mjs": "10f41c13d32b8f6acaf3de92e7f7378f2ce63ba5f7b8ed167e10972a32e163d9",
56
+ "install/codex.mjs": "1008f021ac8c24fa067e5541695d3ed41c6f1c9d4d51b7bcd8644f6f054c511d",
57
57
  "install/copilot.mjs": "300a74f17084d1a38f16428ca7477394c29e33cd755156e19b92e457999be234",
58
58
  "install/index.mjs": "07ec26ecdd81cc983f146faf4b7095c98edce39c89a6fd83c24ce43229d2d9e7",
59
59
  "install/templates/claude-hooks.json": "12d6bb0c3cd7d71b1d2029e2eb4370ca7b5ee55bd88f96b09c927d8119a87be7",
@@ -62,7 +62,7 @@
62
62
  "install/templates/multi-agent-autopilot-awake.plist.template": "ddd25c76c56fcbb38a89de8e35637372d70ace993d6bc487a88ca9cfb702fe1f",
63
63
  "install/templates/multi-agent-autopilot.plist.template": "122c8a61cd927edd99375d6e3da40f1d42bcceed5b6641785c8b28bb930bc77e",
64
64
  "install/unattended-profile-legacy.json": "f52e86b998956f09ad306b1735a6c10b58580d7082d8a55665a4c6bb15c3aa1f",
65
- "package.json": "26d8d5e3083f911d97416d620bb851857cff2d6624a292852e189119bcf2dedb",
65
+ "package.json": "c80d36a6548f6630ad273a2c2bc1322d4358e4743a6ebe364704306ba236ba11",
66
66
  "pipeline/agents/android-architect.md": "11fb74543cb0ebcf9525ca6654fe95d53da7229e0bf4a1149b31fd9005abc453",
67
67
  "pipeline/agents/backend-architect.md": "b02a606c301e4714131aed70ae6d16eeb77fbc819a001e2752cff2488d4246de",
68
68
  "pipeline/agents/bulk-reader.md": "6597052cd7d205bac2b1c7633f5232fe1a40730664a913b8eb77efd5a786dc25",
@@ -115,7 +115,7 @@
115
115
  "pipeline/commands/multi-agent/review-analysis/SKILL.md": "2ba4ee67a56bd5f7041a02fcd227b5475b39f6e6a39b1f693cdf4bd5302c6e17",
116
116
  "pipeline/commands/multi-agent/review-issue/SKILL.md": "7ae7fe774c02114840cc21fb303f98c9a36bc2903f1db4cfc2cebe213ca70f1b",
117
117
  "pipeline/commands/multi-agent/review-jira/SKILL.md": "db8ecc7ec8c7040aac9c71dcf40dae194a76f146ab227833b909b45580b5347a",
118
- "pipeline/commands/multi-agent/review/SKILL.md": "2e39692a3fec193d009a8495a017fb8e13d29f04b939270f8230d5f26b2e4a7f",
118
+ "pipeline/commands/multi-agent/review/SKILL.md": "ac16dcf23fd682bc92836db6e8f6329679dcc7183fb2480658bdccc08a29cc18",
119
119
  "pipeline/commands/multi-agent/route-off/SKILL.md": "aa8b677898b0efde1bd19c50383497da43a83b3b811e36f60695675d845c2de8",
120
120
  "pipeline/commands/multi-agent/route-on/SKILL.md": "3324430a81609719264a5118d6b4613a6af10e4a04c13a809ee367f1251e58f9",
121
121
  "pipeline/commands/multi-agent/route-status/SKILL.md": "00b1759c523b672c053bfb5f3c6af67ef0bd9b7ab473576017da22c6a73148ec",
@@ -299,7 +299,7 @@
299
299
  "pipeline/multi-agent-refs/features/repo-map.md": "9102f95d5c819c3bce3dc992cc98c67657e83f1fbc77d2e9b3d16b040bfab9f6",
300
300
  "pipeline/multi-agent-refs/features/repo-profile.md": "6080ba20a4246c448d675d4712c63c16892b0baadca18cebdc6887696edb5e30",
301
301
  "pipeline/multi-agent-refs/features/research.md": "776c9f3b644f8ff355108000b4a7381ff173e38811e8e2a73ef66e756d60c169",
302
- "pipeline/multi-agent-refs/features/review-decision.md": "ac7bf33ec86c311680d9ae8a4d1d0d0b564d0bf0cfe80e270cc98d3abceb65cb",
302
+ "pipeline/multi-agent-refs/features/review-decision.md": "33b018b8e64ce1ac10197be8eb51f42602930b618b5c1501e06766957e0ec64b",
303
303
  "pipeline/multi-agent-refs/features/review-delta.md": "740cbefbd705a013b708921f2265f12d54d96823f1c46b5c1e644ebbdf7a8f85",
304
304
  "pipeline/multi-agent-refs/features/review-file-set.md": "a751888bce82a8e6970c9abe7f354c5c0704956e5278aeb091b893be0df5c1ef",
305
305
  "pipeline/multi-agent-refs/features/review-multi-repo.md": "f06857b2fa984ee6ca8cdf4360485947b55217056e5e439839c56871f9eb7595",
@@ -314,6 +314,7 @@
314
314
  "pipeline/multi-agent-refs/features/unattended-security.md": "18da3d51c175a42ab6312051a50b9d0339524dad2cc34e0350de62fbf0cece91",
315
315
  "pipeline/multi-agent-refs/features/url-enrichment.md": "72e01a799d9fa54b56c762ba404a9f9236adbbf98320e395a96f6b0f5917e76b",
316
316
  "pipeline/multi-agent-refs/features/usage-reporting.md": "095d86b839c1289c1023919da3972e561c1bbd4a32a1fc9f8e694abe887005ac",
317
+ "pipeline/multi-agent-refs/features/valven.md": "03b256885740faa83b6f030890e5caa7970005802e1109de17311474e2c594ae",
317
318
  "pipeline/multi-agent-refs/features/verify-by-test.md": "b0735adaa7ead797167b8d9ea48a10851a138083c6e638738cc96c66b02a1e37",
318
319
  "pipeline/multi-agent-refs/features/verify.md": "1a6db5e7239eac01e51100353013abd16bf785a7fce88b40139fca27f4166be4",
319
320
  "pipeline/multi-agent-refs/features/visual-evidence.md": "2b6aa2e4ff05c7a1fbe9e0fedfa4b28b9ad01c93a64f1ca6f6cd3e02293866aa",
@@ -336,11 +337,11 @@
336
337
  "pipeline/multi-agent-refs/phases/log-format.md": "62d51e57cca8445ab40f3c0dc29615e4b5c8e4743286bf9ef0173610e81397aa",
337
338
  "pipeline/multi-agent-refs/phases/modes.md": "0733e20dce458c09f30343db9149fc93bc5a4c9531670b93952f223811dcb1aa",
338
339
  "pipeline/multi-agent-refs/phases/operations.md": "9506a26684abfff1e332d92c2321e840544fd4f049aff9f118731e198dabca94",
339
- "pipeline/multi-agent-refs/phases/phase-0-init.md": "8bb87d3691062678a431c9d90f893d32f0d2faf5688dec289772832a1755bdfc",
340
- "pipeline/multi-agent-refs/phases/phase-1-plan.md": "28bebce1dd0b1adee19cb9fb7a56ebcd07e318d592590698c75fde7f3134e6b7",
341
- "pipeline/multi-agent-refs/phases/phase-2-dev.md": "d9774b3f10cabdd521952b21023ed624fee52c1191ce0a27e6bcc84cb9a92c4b",
342
- "pipeline/multi-agent-refs/phases/phase-3-review.md": "0f620c29ed3f1b6c968718d1c3500abab4e7b8c1c1e3c84c3bbf9087ce43703c",
343
- "pipeline/multi-agent-refs/phases/phase-4-commit.md": "53df1abe25875881294f1f1a0fcc093eb53f9ab463927a55e1c3964efd7ce733",
340
+ "pipeline/multi-agent-refs/phases/phase-0-init.md": "8e3047206dbee5fdecea1e3891dca1513075e84f43e0b65b14529e91691fe3d3",
341
+ "pipeline/multi-agent-refs/phases/phase-1-plan.md": "302adb4ae91b844b636e738e364749560f75685ad335bc800d52cf4ff6d4b3af",
342
+ "pipeline/multi-agent-refs/phases/phase-2-dev.md": "ebd4c2e6992f286e2215c4deb55199a01804785255afb55e1730d6a4287e96df",
343
+ "pipeline/multi-agent-refs/phases/phase-3-review.md": "bb18ce516e11e66cfd73532d8deaaa1c9d7cd7fb5bf274e6c574cc598d08a096",
344
+ "pipeline/multi-agent-refs/phases/phase-4-commit.md": "61eb5a7a358e4cfaab2024dcd9c374f8001733a1c7a440cdc01cadfbf6c77022",
344
345
  "pipeline/multi-agent-refs/phases/phase-5-report.md": "3d333dc4b072c98eda3f287f884e12de62cda7255b12de7725a72903cefa6016",
345
346
  "pipeline/multi-agent-refs/picker-contract.md": "bf1b3043946e4aa588203060d47d182ca1ee58b10dec27a85a7b74afde3565ed",
346
347
  "pipeline/multi-agent-refs/platform-parity.md": "43a3836efc359c6b7d30af38d66408d8d18661e72e5165b25bb8e15953e6feaf",
@@ -390,7 +391,7 @@
390
391
  "pipeline/rules/swiftui-qa.md": "8c4afe9e72413e7bdab655f3d17588469e80ac34cb7ad2a690901fc5b6534818",
391
392
  "pipeline/rules/tdd.md": "4c1b3114506aa9794c9bb1e1aee1b1bbb4a993d192342e5697cc00bc2f6ea4a2",
392
393
  "pipeline/rules/testing.md": "695be5520b65451f0aa300a9643df2c05e607ff6ad372201ea34798dc5998bd5",
393
- "pipeline/schemas/agent-state.schema.json": "4065712c5a646f8b3a59111063319d4c378cd22e32a7b3089c69982bee3c7543",
394
+ "pipeline/schemas/agent-state.schema.json": "c5790d53ea138662402f2a391fa24c2ca19e74d09b09e6507dc60689765b2c2f",
394
395
  "pipeline/schemas/analysis-output.schema.json": "41826f4bf7c96778f8cdbcc68531e984087897d438b7b49ac5a93fc29db47916",
395
396
  "pipeline/schemas/analysis-spec.schema.json": "230e08b931c42534e24f699f77c75a87c95e53b669b33c07930c4abb0c31281b",
396
397
  "pipeline/schemas/answer-request.schema.json": "29d4211a2a05a230e0707b171b73341d2e56f6b83edb178b731905211aab4e23",
@@ -442,7 +443,7 @@
442
443
  "pipeline/schemas/plan-todos.schema.json": "f1dcf8df338b29bbc1d874addd3408c0841a5f869c0b6075efd9242e3e8552d6",
443
444
  "pipeline/schemas/planning-output.schema.json": "bc6eda32ecd435cf84d846078f9d38347f8f741f8a427cff15913dd6c380d4b8",
444
445
  "pipeline/schemas/pr-request.schema.json": "ae75c4856349d62834802b1189af516bb6fb3d36646831b7ff2fa61d938afcd0",
445
- "pipeline/schemas/prefs.schema.json": "951e906952aa6aebd06f15ad084e695db7e9801b52e334740fbf44297b32faca",
446
+ "pipeline/schemas/prefs.schema.json": "f45d061f28b1452f38aa2a3999560eb5a51a683f9c441017c46fb962387789d6",
446
447
  "pipeline/schemas/repo-profile.schema.json": "1a74ef8330da9a26a5a70955f6f9cbb20eda54a8615efaf86c7993d420a7f04e",
447
448
  "pipeline/schemas/repos.schema.json": "a9bf56f25c66201c170912e3389bd73e4a3f61922410f83e31a6c6ba47aee861",
448
449
  "pipeline/schemas/research-output.schema.json": "54e3ba1b04fdc20fbaa84333b943a8ab95d1395c7b0e0aedc67929184cb49523",
@@ -555,7 +556,7 @@
555
556
  "pipeline/scripts/gc-worktrees.sh": "06d0a53b9293531f4b8501618648440b668ba1ef60c121576c55b0e203dcfc62",
556
557
  "pipeline/scripts/gen-facts.mjs": "6ba70f7db881c3e3577a5ce3dcbfda09aa240f728ee577b019f2176d8051fd67",
557
558
  "pipeline/scripts/gen-mode-dispatch.mjs": "41261f7af9026fe19f9f96f314a85d226edd769081c02e5388310cf71a411ba7",
558
- "pipeline/scripts/gen-skills-index.mjs": "64606fb3165786ed1488cc368dcbe8f53d2e9402f02578823a31838b9730180d",
559
+ "pipeline/scripts/gen-skills-index.mjs": "24ab4a6020bccadf768b16adf22fe4ce3f710b1ded6ca154fae361a84d4c8434",
559
560
  "pipeline/scripts/git-path.mjs": "c035624f1ab924039b37e0911f56c6a1fa781ac41dc89fadfdaa4305f4359c12",
560
561
  "pipeline/scripts/github-ssh-setup.sh": "5a9e1836d80e4e176806c143a3c8ba4c1b9c4274ed49aac71f33bd40de31968b",
561
562
  "pipeline/scripts/glob-match.mjs": "c01722f2f60ef70838cbfeef55dfb8381b49c358c7a808a5b297a92cdeccf033",
@@ -590,7 +591,7 @@
590
591
  "pipeline/scripts/owned-path-gate.mjs": "86b17e7a723d30056fac89026790e33cab891a549ffbda50b9e90d9a7675bf11",
591
592
  "pipeline/scripts/package-manager.mjs": "211046f0e32a05a0ac977a285892a4ad87e1d1e362573b048c8accd45c706d02",
592
593
  "pipeline/scripts/phase-banner.sh": "acca704968d6263810de5804ea50a96b7aab7472ec98a7149d92b78b380d8fa0",
593
- "pipeline/scripts/phase-tracker.sh": "0cad7a8073a274d609f6e3473d8eb448ca295ca482c7a9274d7d07038b6da20d",
594
+ "pipeline/scripts/phase-tracker.sh": "a3a72a3a39c8615707f1b3a77c60224ab9747f4dbb5401dc089a8c28d40e6356",
594
595
  "pipeline/scripts/phase0-exit-gate.mjs": "848244c4712c16edd2103b451f9043d20416710dc208d5fc4993c3fd008f32c6",
595
596
  "pipeline/scripts/phone-devices.mjs": "f32288cbe56670eecb7d3a4b43f9ebcb4baeac5eeec357322fe19399603d59e3",
596
597
  "pipeline/scripts/plan-coverage-gate.mjs": "1a83bc52584438a9bd5cba96d2ddefed92a6a317d30ee695e67ef6c00b93e5a8",
@@ -598,7 +599,7 @@
598
599
  "pipeline/scripts/plugin-refresh.sh": "687a33199ad963616ab537e32210ec8c967e76ecc42f494ee8a1dc9fe947fc30",
599
600
  "pipeline/scripts/pr-request.mjs": "e6f4ded2366c6599bb345b3011ecc771e13b8a1561afa4c9a50bca4edff17456",
600
601
  "pipeline/scripts/pre-commit-check.sh": "3692ef40b08968e15e8a4c7b873f1e9fd264f4809976cb616063782f2ef993b1",
601
- "pipeline/scripts/pre-push-check.sh": "e449aff7f0336d7d624eff4c6221f56d8621ba9d010669601755e57fd4ee02c7",
602
+ "pipeline/scripts/pre-push-check.sh": "4a1554a625df4745a829c0df294db7ce450fbe44fe624e562008e9912be78925",
602
603
  "pipeline/scripts/probe-evidence-capability.sh": "ac74252eed6b773fdbc7ec475a63606925f1ba7b5e7c6f911329f46fd920eae7",
603
604
  "pipeline/scripts/probe-store-key.mjs": "b46dfcf444c95d0bb61de36823314945dacaaacb8f35841d153dcfcde8e4df1a",
604
605
  "pipeline/scripts/prune-logs.sh": "c5587b33104c7253e07be8cce8249b50014c52dfdf232de637811ffdd88e95e4",
@@ -611,7 +612,7 @@
611
612
  "pipeline/scripts/repo-profile.mjs": "5f0cf90c59accdb0bb763fab9512e271e3cc4c8bc930ece137d94baa5c8e08d9",
612
613
  "pipeline/scripts/require-supported-version.sh": "490d681a8c8fb510082bc6f2325965598b3aa3b4720fe5c6e08e371c7c9073f4",
613
614
  "pipeline/scripts/research-gate.mjs": "66b0f7521fea5efa0085b9d4f31b9ce9c5c1719a7e0395ca176252c96ad974c1",
614
- "pipeline/scripts/review-decision-gate.mjs": "b54cce49be270a1291571f63563b3a3e11e2417493bd8615c2a58bd7ff41b393",
615
+ "pipeline/scripts/review-decision-gate.mjs": "81e5529e587cf67af696446b80ad3a195e728340b13a815d7d702b039efb0325",
615
616
  "pipeline/scripts/review-delta.mjs": "14a2de7ac81e7f43a634423f920f9931bb4a27441b8ba3dc8e53ec1f6a6ed54a",
616
617
  "pipeline/scripts/review-file-filter.mjs": "8b1fd9661b8d61b4282a4579ef360f952c827f90520b69ffde4770fdaeaaa05b",
617
618
  "pipeline/scripts/review-scope.mjs": "60be90f1dce0a87071695bbedf17eb4e8600b1c742b97aef8cbea41802315b93",
@@ -649,7 +650,7 @@
649
650
  "pipeline/scripts/triage-memory.mjs": "2d8541145f1749593ae5728fb4c9eb3001484edb5e4d37be473aeec34d1dbe7c",
650
651
  "pipeline/scripts/ui-tree-dumper.swift": "a09e42ef069eafa08c05afd8333e05b754ef6a7d8b9687712039b0f2c9801273",
651
652
  "pipeline/scripts/unattended_policy.py": "f1df6470c798bd7d4bc9f8338eaabf98bdcfab00198d98b7e2e654aab84b709c",
652
- "pipeline/scripts/uninstall.mjs": "880923522ef59fdd98cb7ecb1bdc85c0f15d1e2eed2d79d6d353e88712ca95fa",
653
+ "pipeline/scripts/uninstall.mjs": "88faf870f80a323d46b3eae6687f1d7eab16462d3d020ce4ed893f931e946106",
653
654
  "pipeline/scripts/update-check.sh": "9c00647e7ca4249414b2e5af08f61705ab5bd2106b6f66ae8ebce8aa143dc957",
654
655
  "pipeline/scripts/update-issue-progress.sh": "ccfef87743e91272e009e396ac07461d2784b2fa84a06c802a582526eeeb9ed9",
655
656
  "pipeline/scripts/usage-identity.mjs": "47c1f907fb1ab47672687ea0cbf2d0737985ae91ec2b48b4fe260e14c3d35d70",
@@ -665,7 +666,10 @@
665
666
  "pipeline/scripts/validate-state.mjs": "ac2cfde75fe216a7549ba476c58f777f27d36e068de3796909926d68de2fb65a",
666
667
  "pipeline/scripts/validate-test-gap.mjs": "14fa89867e49497adb2b88a3290e78d0f263afa74a5b83b062115fc5a22204f7",
667
668
  "pipeline/scripts/validate-triage.mjs": "7cd78686494c4dc003b4cd66817dfe583adbdab536b54da3fbb80c9fa0e1a216",
668
- "pipeline/scripts/verify-citations.mjs": "ed1c3d7d0dbebbc64a26524f0f321d3a0ec1318cbb60dd4517d6b3db77e7fd74",
669
+ "pipeline/scripts/valven-gate.mjs": "67a44dbcc79e90c83fc03f9fc97876f65af8f24daaa2a2060acc06932c63fd3a",
670
+ "pipeline/scripts/valven-port.mjs": "5b064d67b8a39896f64fdead7aa65ef8ce747cf58cf44bbee90025abe4300247",
671
+ "pipeline/scripts/valven-split.mjs": "c5700ee1738bc4a215321a45bc093c325ec132410c32660e72b76f38bea8d0eb",
672
+ "pipeline/scripts/verify-citations.mjs": "e3c6a3edb1d360a9ea8690d35157faa47d312dfdc87595a87350c456cc72319c",
669
673
  "pipeline/scripts/verify-skills.sh": "871fcdfe5567232cd49a4cce4401911a06c8df6ab712d0597e17ce1bf0f63d80",
670
674
  "pipeline/scripts/verify.mjs": "fdc9843dc33b37d08d132617f158b8fe10cc4ab3be5bf31714bf2453ac0f714f",
671
675
  "pipeline/scripts/website-deploy-commit.sh": "73cae49db83cf98eeeb08eb8852a13912bd5f05855319b184e348b9ca4dff44f",
@@ -674,9 +678,9 @@
674
678
  "pipeline/scripts/worktrees.mjs": "90dfd09b70fffe9b56c331a4ae2692cc248f4898f4ee6aee4239ef0b20888a90",
675
679
  "pipeline/scripts/write-state.mjs": "e1198bf970eace07d3eff22b394808a526e473df65d3d58aa2d5a12cfdac8b49",
676
680
  "pipeline/scripts/write-store-config.mjs": "b994a061f6febb2ca3d396074d8b51d2c1c1f991d3072d321703380da3639a56",
677
- "pipeline/skills/.skill-manifest.json": "ab6db9b72fc52b7edb3116f4baaaf0a6ed81515db74df3211aa9463c533534a4",
678
- "pipeline/skills/.skills-index.json": "042b1090f3e2ca310c6ce70d1bb304e8c7f96bd73133e504b95d83801608e470",
679
- "pipeline/skills/shared/README.md": "ba55209d20e44c9356fe06df81d1bd33d547fcb9656191a464f126c76eba31e9",
681
+ "pipeline/skills/.skill-manifest.json": "08d53301893d994366854c8343e4a019f607c929b5e32018ff3fd0a27691888c",
682
+ "pipeline/skills/.skills-index.json": "4fb9440c54d0850a43685c4ac3a9be2f74bd8a75d9749e3e53d3e5367cc9e11e",
683
+ "pipeline/skills/shared/README.md": "79f26b8c5210838d16ab448fef118ac9dfc2fb16d48741c08df10ba96b4a9d05",
680
684
  "pipeline/skills/shared/core/apple-archive-compliance/SKILL.md": "7239fef717ea45b79276bfcc2c3903acd57950b6e00dd6a2a66399c4b09cbd51",
681
685
  "pipeline/skills/shared/core/apple-archive-compliance/references/rules.yml": "25129ce6d416242ac04c4032f7561e0c2761ab8bbadf08d9c9f49b573a663389",
682
686
  "pipeline/skills/shared/core/google-play-compliance/SKILL.md": "3089e8c5f99c1ec7c1358394c398335ccb5ebc20ca05d60d870127da4592de34",
@@ -718,7 +722,7 @@
718
722
  "pipeline/skills/shared/core/multi-agent-review-analysis/SKILL.md": "6c3428841fa62d7e5f36dd80465b09d6f695a2e89608cbb49a0d44cc3c7d289f",
719
723
  "pipeline/skills/shared/core/multi-agent-review-issue/SKILL.md": "7409755903a3c71c55643001f784c1c044ca153097f8ca6612c54b87f4ebcbb5",
720
724
  "pipeline/skills/shared/core/multi-agent-review-jira/SKILL.md": "a17a1f11fcf6c75640452e53ddddaaf906ff9e3ebfeda73e333f44db02515352",
721
- "pipeline/skills/shared/core/multi-agent-review/SKILL.md": "1cbe44b2ec63e0e158ded35825876e7dc9c45732fc9b067f0655e68823188efb",
725
+ "pipeline/skills/shared/core/multi-agent-review/SKILL.md": "cd500e32efdf6c8f36da5bb2e43d2558d096e33cd3274aead5118dd2c14f118a",
722
726
  "pipeline/skills/shared/core/multi-agent-route-off/SKILL.md": "a30c0b9b73d5101c70c147599273019cf357969c37bc799017a9f6de4b8686a8",
723
727
  "pipeline/skills/shared/core/multi-agent-route-on/SKILL.md": "a807767460b09455087d48a7dd45036be788f67997475360acab29f2422f425b",
724
728
  "pipeline/skills/shared/core/multi-agent-route-status/SKILL.md": "b473b670b3f8535b295752eb5aed8b01cba8d1ed6763ae4d80d9cc2dbb1f7794",
@@ -745,6 +749,8 @@
745
749
  "pipeline/skills/shared/core/multi-agent-uninstall/SKILL.md": "9dccf78ffc2fb014d83f67d683d395f56f4fad8b5a36b9aa84e6cbd075b58818",
746
750
  "pipeline/skills/shared/core/multi-agent-update/SKILL.md": "d96e18b70bab0a601057f75f212dd4fb563db0cb250607c770ce1c7a1df4b1d0",
747
751
  "pipeline/skills/shared/core/multi-agent/SKILL.md": "3dd44ccc00e41c09e59ad223900a391f80158bd3f69e45d67c684285bc42418d",
752
+ "pipeline/skills/shared/core/valven-rules/SKILL.md": "274299b75e36991941b8402ae025967ce553878100c1a3878a955d27f5b7db9e",
753
+ "pipeline/skills/shared/core/valven-rules/references/rules.yml": "b08b9bc1c35104bc14d64ae8a5f1dbec00306cb9d010996133e27b4c945de77e",
748
754
  "pipeline/skills/shared/external/NOTICE-avdlee-swiftui-agent-skill.md": "24df1d1dfb47b06b8fafb98938cf1b353fb0245c3a8f8212e197321d537dadff",
749
755
  "pipeline/skills/shared/external/NOTICE-dimillian-skills.md": "b98a170d97836f00ac6ee9c80e0befde324a6062071dc06a7eedce65fa5141cd",
750
756
  "pipeline/skills/shared/external/NOTICE-paul-hudson-skills.md": "bca5fe8779df70fb0f234483d65ff3562c67521e719b69b22aac260803b75244",
@@ -1302,6 +1308,6 @@
1302
1308
  "pipeline/skills/shared/external/xcode-project-analyzer/references/build-settings-best-practices.md": "26f1a3a23b3fece4b067fb094ab12fb6bd7dee33e97044d515db3cf70bc9b8a4",
1303
1309
  "pipeline/skills/shared/external/xcode-project-analyzer/references/project-audit-checks.md": "eb61ac8e1329eccac33e7d8b4c466003f50cca6b1a23e2be118d1f6a9af62e53",
1304
1310
  "pipeline/skills/shared/external/xcode-project-analyzer/references/recommendation-format.md": "ad8eb87228be739d2dd53d0b927558fc9e68b2135e1b1eec475a981c4cd1feb2",
1305
- "pipeline/skills/skills-index.md": "bdb03634f0174c073d7c3c13f068b49059ee8c79a5a552b9cf00d218e8d7e7cd"
1311
+ "pipeline/skills/skills-index.md": "0775d77f39736511ebac57f38080a275e2af131b7fad8f323a36b7431f93b151"
1306
1312
  }
1307
1313
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mmerterden/multi-agent-pipeline",
3
- "version": "20.15.0",
3
+ "version": "20.16.0",
4
4
  "description": "6-phase AI development pipeline with full orchestration on Claude Code, Copilot CLI and Codex CLI. Analysis, planning, TDD, CLI-aware parallel review with consensus surfacing + Fable triage, default-FAIL evidence gates, secret + intent guards, per-phase cost ledger, persistent learnings memory, wiki generation, commit automation. Token-preserving uninstall.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -182,6 +182,47 @@ Persist `agent-state.review.moduleGuides = [<repo-relative paths>]` and inject i
182
182
 
183
183
  Scope note: a guide governs only files under its own directory - a guide found under one module must not be applied to a sibling module's changes in the same PR.
184
184
 
185
+ ### 2c. Valven delivery rules - required on every input
186
+
187
+ The `valven-rules` registry (`$HOME/.claude/skills/valven-rules/SKILL.md`) is applied to every review, in `review` mode. Collect what the gate needs, then run it:
188
+
189
+ ```bash
190
+ VG_FILE="/tmp/multi-agent-review-${TASK_ID}-valven.json"
191
+ VG_ARGS=(--mode review --out "$VG_FILE")
192
+ case "$kind/$provider" in
193
+ branch/local)
194
+ VG_ARGS+=(--repo . --base origin/develop --head "$ref") ;;
195
+ pr/github)
196
+ gh pr view "$pr_number" --repo "$org_repo" --json headRefName,baseRefName,body,commits \
197
+ > "/tmp/multi-agent-review-${TASK_ID}-pr.json"
198
+ jq -r '.body // ""' "/tmp/multi-agent-review-${TASK_ID}-pr.json" > "/tmp/multi-agent-review-${TASK_ID}-body.md"
199
+ jq -r '.commits[] | "\(.authoredDate)\t\(.messageHeadline)"' "/tmp/multi-agent-review-${TASK_ID}-pr.json" > "/tmp/multi-agent-review-${TASK_ID}-commits.txt"
200
+ VG_ARGS+=(--branch "$(jq -r .headRefName "/tmp/multi-agent-review-${TASK_ID}-pr.json")"
201
+ --pr-body-file "/tmp/multi-agent-review-${TASK_ID}-body.md"
202
+ --commits-file "/tmp/multi-agent-review-${TASK_ID}-commits.txt") ;;
203
+ pr/bitbucket-server)
204
+ # Same credentials as Step 2. PR: fromRef.displayId + description; commits: values[].message.
205
+ # Write the description to ...-body.md and one "<ISO authorTimestamp>\t<first message line>" per commit to ...-commits.txt, then:
206
+ VG_ARGS+=(--branch "$BB_FROM_REF" --pr-body-file "/tmp/multi-agent-review-${TASK_ID}-body.md"
207
+ --commits-file "/tmp/multi-agent-review-${TASK_ID}-commits.txt") ;;
208
+ esac
209
+ ```
210
+
211
+ For PR input: when the cwd is a checkout of the same repo, `git fetch origin "<headRef>"` (this moves no HEAD) and add `--repo . --base "origin/<baseRef>" --head FETCH_HEAD`, so sizes and the rework ratio come from history. Otherwise add `--diff-file "$DIFF_FILE"`; the rework rule then reports `not-measured`, which is stated in the summary rather than read as a pass.
212
+
213
+ ```bash
214
+ node "$HOME/.claude/scripts/valven-gate.mjs" "${VG_ARGS[@]}" >/dev/null
215
+ VG_RC=$? # 0 clean, 1 findings, 2 could not run
216
+ ```
217
+
218
+ - Exit 2: print the stderr line and continue the review with `Valven: not measured (<reason>)` in the Step 6 summary. Never print it as passed.
219
+ - The gate's `findings[]` join the reviewer findings at Step 5 with `tag: valven`. They are measurements, so triage accepts them unless the task is exempt; an accepted `important` or `blocking` one makes the Step 7 decision NEEDS WORK.
220
+ - When `splitRequired` is true, run `node "$HOME/.claude/scripts/valven-split.mjs" --repo . --base "origin/<baseRef>" --head <head>` (plan only, no `--apply`) where a checkout exists, and append the slice table (branch, lines, files) to the `VLV-SIZE-01` finding's `fix`, so the PR comment says exactly how to split.
221
+ - When `VLV-AGE-01`, `VLV-BEHIND-01` or `VLV-TRACE-03` fires and a checkout exists, run `valven-port.mjs` with the same base and head (plan only) and put its result in the finding's `fix`: the new branch to open, the commits that stay behind, `sharedWithBase[]` to re-test, then "open the new PR, close this one with a link". Contract: `$HOME/.claude/multi-agent-refs/features/valven.md`, "Old work".
222
+ - The registry's judgement rules (`rules:` block: `VLV-SCOPE-02`, `VLV-PRDESC-02`) go into every reviewer prompt in Step 3, with the PR body when one exists. Each reviewer returns a verdict per ID.
223
+
224
+ Step 6 adds one line under the table: `Valven: <n> finding(s) · <changedLines> lines / <fileCount> files · split: <yes N slices|no>`.
225
+
185
226
  ### 3. Launch parallel reviewers - host-CLI dependent
186
227
 
187
228
  Every host runs three reviewers; only the second slot differs, because GPT-5.4 exists on Copilot and Codex but not on Claude Code, where Opus fills it.
@@ -218,7 +259,7 @@ Never dispatch a Fable reviewer or a Fable triage on the model list below alone.
218
259
 
219
260
  The rung switch and its resolution: `$HOME/.claude/multi-agent-refs/features/model-fallback.md`.
220
261
 
221
- Each reviewer receives the diff, the module review guides from Step 2b (when any were found), plus the standard reviewer system prompt (see `$HOME/.claude/multi-agent-refs/phases/phase-3-review.md` for the prompt contract). Output: structured `findings[]` per reviewer.
262
+ Each reviewer receives the diff, the module review guides from Step 2b (when any were found), the Valven judgement rules from Step 2c, plus the standard reviewer system prompt (see `$HOME/.claude/multi-agent-refs/phases/phase-3-review.md` for the prompt contract). Output: structured `findings[]` per reviewer.
222
263
 
223
264
  ### 4. Store-compliance cross-reference
224
265
 
@@ -102,6 +102,7 @@ result, before Step 3.8:
102
102
  node "$HOME/.claude/scripts/review-decision-gate.mjs" "$TRIAGE_FILE" --state "$STATE_FILE" \
103
103
  --integrity "$WORKTREE/.pipeline/test-integrity.json" \
104
104
  --integrity "$WORKTREE/.pipeline/owned-path.json" \
105
+ --integrity "$WORKTREE/.pipeline/valven-gate.json" \
105
106
  --source "$WORKTREE/.pipeline/security-audit-$ITERATION.json" \
106
107
  --json > "$WORKTREE/.pipeline/review-decision-$ITERATION.json"
107
108
  RD_RC=$?
@@ -113,7 +114,7 @@ nothing); `security-audit-$ITERATION.json` is the file Step 2.7 writes when the
113
114
  audit runs (`security-audit.md`). Both are files and not process substitutions
114
115
  of a shell variable with a `{}` brace default: bash 3.2, the stock macOS
115
116
  `/bin/bash`, expands that to `{\}`, and unparseable input is exit 3.
116
- `owned-path.json` is the file Step 1.761 writes. `--integrity` repeats, one
117
+ `owned-path.json` is the file Step 1.761 writes, `valven-gate.json` the one Step 1.762 writes. `--integrity` repeats, one
117
118
  file per deterministic gate. Both gates always write their file, so a declared
118
119
  `--integrity` file that does not exist is unreadable (exit 3): the gate failed
119
120
  before writing. An empty one means no findings from that gate, and a missing or
@@ -0,0 +1,83 @@
1
+ # Valven delivery rules across the phases
2
+
3
+ The `valven-rules` registry (`$HOME/.claude/skills/valven-rules/`) holds the rules; `valven-gate.mjs` measures them and `valven-split.mjs` turns an oversized branch into stacked pull requests. This file is the per-phase contract the phase docs point at.
4
+
5
+ ## Phase 1
6
+
7
+ Work is built on one branch and shipped as small pull requests. Each task also gets an estimated line count (added + removed, tests included, generated output excluded), and the plan groups tasks into **PR slices** that each stay under the `VLV-SIZE-01` budget (`prefs.global.valven.thresholds`, default 250 lines and 25 files). Order the slices the way `valven-split.mjs` will cut them: renames and moves first, then data (models, services, repositories), then domain (view models, use cases), then UI, each slice carrying its own tests. Show the slice table in the plan (`slice`, `tasks`, `est. lines`) so the user approves the stack together with the plan. A plan whose total estimate exceeds the budget and shows no slices is incomplete. The estimate is advisory; Phase 4 Step 2.95 measures the real diff and splits by it.
8
+
9
+ ## Phase 2
10
+
11
+ Gate 6 of the exit gate, after the secret scan:
12
+
13
+ ```bash
14
+ node $HOME/.claude/scripts/valven-gate.mjs --mode dev --repo "$WORKTREE" --base "origin/$BASE_BRANCH" --worktree \
15
+ --out "$WORKTREE/.pipeline/valven-dev.json" >/dev/null
16
+ ```
17
+
18
+ **Gate 6** (valven-rules, dev mode). Exit 2 blocks the phase: the rules could not be read or git failed. Exit 1: `VLV-TEST-01` (source changed, no test changed) and `VLV-TRACE-01` (no issue key in the branch) are fixed here before Review. `VLV-SIZE-01`, `VLV-SIZE-02` and `VLV-SCOPE-01` are not fixed by editing: keep building on this branch, set `state.valven.splitRequired = true`, and Phase 4 Step 2.95 splits it into stacked PRs. `VLV-REWORK-01` is reported to the user with the ratio and continues. Contract: `$HOME/.claude/skills/valven-rules/SKILL.md`.
19
+
20
+ ## Phase 3
21
+
22
+ Step 1.762, after the owned-path gate. The PR body does not exist yet, so `VLV-PRDESC-01` reports `not-measured`; Phase 4 checks it.
23
+
24
+ ```bash
25
+ VG_FILE="$WORKTREE/.pipeline/valven-gate.json"
26
+ node $HOME/.claude/scripts/valven-gate.mjs --mode review --repo "$WORKTREE" --base "origin/$BASE_BRANCH" \
27
+ --out "$VG_FILE" >/dev/null
28
+ VG_RC=$?
29
+ [ "$VG_RC" = "2" ] && HALT "valven gate could not run - see stderr"
30
+ $HOME/.claude/scripts/log-metric.sh "$TASK_ID" 3 review.valven \
31
+ findings="$(jq -r '.findings | length' "$VG_FILE")" split="$(jq -r '.splitRequired // false' "$VG_FILE")"
32
+ ```
33
+
34
+ Exit 1 is findings, not an error: they merge at Step 3.0 with `tag: valven`, and `review-decision-gate.mjs` counts them as gate-backed, so a single-source one is not downgraded. Triage accepts a `criteriaSource: "valven-rules"` finding unless the task is exempt, never rejects it as style, and keeps its `line: 0`, which `post-pr-review.sh` posts as a top-level comment. When `splitRequired` is true the fix is never "edit the code"; Phase 4 Step 2.95 splits the branch. With `prefs.global.valven.enabled = false` the file still lands with `enabled: false` and no findings.
35
+
36
+ ## Phase 4
37
+
38
+ ```bash
39
+ VG_COMMIT="$WORKTREE/.pipeline/valven-commit.json"
40
+ node $HOME/.claude/scripts/valven-gate.mjs --mode commit --repo "$WORKTREE" --base "origin/$BASE_BRANCH" --out "$VG_COMMIT" >/dev/null
41
+ VG_RC=$?
42
+ ```
43
+
44
+ - Exit 2 halts: the gate could not measure, and pushing on an unmeasured branch is the silent pass this step exists to prevent.
45
+ - Exit 1 without `splitRequired`: fix in place. `VLV-COMMIT-01` and `VLV-TRACE-02` are squash and reword of this branch's own commits (`git rebase -i` is not available; use `git reset --soft "$(git merge-base HEAD origin/$BASE_BRANCH)"` and re-commit with the step 6 convention). `VLV-TEST-01` and `VLV-TRACE-01` return to Phase 2. Re-run the gate.
46
+ - `splitRequired: true`: plan the stack and show it.
47
+
48
+ ```bash
49
+ node $HOME/.claude/scripts/valven-split.mjs --repo "$WORKTREE" --base "origin/$BASE_BRANCH" --out "$WORKTREE/.pipeline/valven-split.json"
50
+ ```
51
+
52
+ Render one row per slice (branch, lines, layers, files, `oversized`) and ask (`question` / labels in `outputLanguage`, `header` English `"Split PR"`): option 1 "Split into N stacked PRs" (Recommended), option 2 "Ship as one PR" (the review will mark it NEEDS WORK), option 3 "Pause". Autopilot takes option 1. On option 1 re-run with `--apply`; exit 1 (the stack's top differs from the branch) halts with `drift[]` shown. Then build every slice branch with the Phase 2 Gate 1 command, in order; a slice that fails is folded into the next one: delete the `<branch>-p*` branches (`--apply` refuses to overwrite them), re-run with `--budget` raised to the two slices' combined lines, and build again. The original branch is never modified, so every re-run starts from the same tree. An `oversized` slice is one file larger than the budget: report it, it cannot be split by file.
53
+
54
+ After a split, steps 7 and 8 run once per slice in order: push `<branch>-pK`, open its PR with base `$BASE_BRANCH` for p1 and `<branch>-p(K-1)` for the rest, title suffix `(K/N)`, and a `## Stack` section in each body listing every slice PR with the current one marked. The original branch stays local. Record `state.valven.split = {sliceCount, branches[], prs[]}`.
55
+
56
+ Log: `Phase 4 Step 2.95: valven {pass|fixed|split N|shipped-whole}`
57
+
58
+ ### PR body
59
+
60
+ **Valven body check (required, every PR).** After the body is written to `/tmp/pr-body-$TASK_ID.md` and before the PR is created or updated:
61
+
62
+ ```bash
63
+ node $HOME/.claude/scripts/valven-gate.mjs --mode review --repo "$WORKTREE" --base "origin/$BASE_BRANCH" \
64
+ --pr-body-file "/tmp/pr-body-$TASK_ID.md" --out "$WORKTREE/.pipeline/valven-body.json" >/dev/null
65
+ jq -r '.findings[] | select(.ruleId == "VLV-PRDESC-01") | .issue' "$WORKTREE/.pipeline/valven-body.json"
66
+ ```
67
+
68
+ Any `VLV-PRDESC-01` line blocks creation: add the missing why / how-to-verify text and re-run. Other findings here were already handled at Step 2.95.
69
+
70
+ ## Old work
71
+
72
+ `VLV-AGE-01` (a commit older than 14 days, by author date so a rebase does not hide it), `VLV-BEHIND-01` (more than 50 commits behind the base, or a merge-base older than 14 days) and `VLV-TRACE-03` (commits carrying another issue's key) mean the branch carries old or foreign work. The answer is never a rebase of the old history: the change moves.
73
+
74
+ ```bash
75
+ node $HOME/.claude/scripts/valven-port.mjs --repo "$WORKTREE" --base "origin/$BASE_BRANCH" # plan
76
+ node $HOME/.claude/scripts/valven-port.mjs --repo "$WORKTREE" --base "origin/$BASE_BRANCH" --apply # move
77
+ ```
78
+
79
+ `--apply` cuts `<branch>-v2` (next free `-vN`) from the current base tip, applies the net diff with `git apply --3way` as one commit, and returns to the original branch, which it never modifies. Exit 1 is a conflict: the new branch is deleted, `conflicts[]` names the paths, and they are resolved by hand on a fresh branch. `sharedWithBase[]` lists the paths the base also changed; those are the ones to re-test.
80
+
81
+ - **Phase 0.** A task that resolves to an existing branch runs `valven-gate.mjs --mode dev` against it first. An old-work finding means work starts on the ported branch, not on the old one.
82
+ - **Phase 4 Step 2.95.** Old-work findings are handled before the size check: port, re-run the gate on the new branch, then split if a size rule still fails. A `VLV-TRACE-03` commit is removed from the port (`--head` at the commit before it, or a cherry-pick of the rest) and gets its own branch.
83
+ - **Review.** The finding's `fix` is concrete: the `valven-port.mjs` plan (new branch name, commits dropped, `sharedWithBase[]`), then "open the new PR from `<to>`, close this one with a link to it". For `VLV-TRACE-03` it lists the foreign commits. Accepted findings make the review NEEDS WORK.
@@ -419,6 +419,7 @@ Branch name is deterministic - no user confirmation needed.
419
419
  # 0 = ref exists (collision) · 2 = no matching ref (authoritative "free")
420
420
  # anything else = the probe itself failed; REMOTE_ERR holds why
421
421
  ```
422
+ - Old work is not reused (`features/valven.md`).
422
423
  - `REMOTE_RC` is 0 or 2 → treat as authoritative
423
424
  - `REMOTE_RC` is anything else → the remote answer is **unknown**, not "free". Log
424
425
  `Remote collision probe failed: <REMOTE_ERR>`, fall back to the local check only,
@@ -326,6 +326,8 @@ For each identified change area:
326
326
 
327
327
  Create tasks using TaskCreate with imperative subject, description (what/which files/expected behavior), and `addBlockedBy` for dependencies.
328
328
 
329
+ **PR slices (required):** `features/valven.md`.
330
+
329
331
  ##### Analysis citation requirement (every UI task)
330
332
 
331
333
  Every UI-touching task in the plan MUST cite:
@@ -349,7 +349,6 @@ bash $HOME/.claude/scripts/phase-tracker.sh tokens 2 <input_count> <output_count
349
349
 
350
350
  Contract and rationale: `progress-contract.md` -> Token telemetry forwarding.
351
351
 
352
-
353
352
  #### Generated trees are not yours to edit
354
353
 
355
354
  Many repos generate part of their source: a service client from an OpenAPI spec, mock
@@ -399,8 +398,6 @@ reach Review at all.
399
398
 
400
399
  #### Step 1 - Deterministic Gates (run BEFORE AI review)
401
400
 
402
- If any gate fails → fix first, don't waste AI tokens reviewing broken code.
403
-
404
401
  ```bash
405
402
  # Gate 0: Owned paths (repo profile), before the build
406
403
  node $HOME/.claude/scripts/owned-path-gate.mjs --repo "$WORKTREE" --base "origin/$BASE_BRANCH" --state "$STATE_FILE"
@@ -411,6 +408,7 @@ node $HOME/.claude/scripts/owned-path-gate.mjs --repo "$WORKTREE" --base "origin
411
408
  <test-command> 2>&1 | tee "{worktreePath}/.test.log"
412
409
  # Gate 4: Secrets - run the scanner against the staged diff
413
410
  bash $HOME/.claude/scripts/pre-commit-check.sh
411
+ # Gate 6: features/valven.md
414
412
  ```
415
413
 
416
414
  **Gate 0** exit 1 blocks the phase: move each change where its `fix` points, revert the owned path, re-run. Exit 2 is a call error, never a pass: an unknown `--base` ref means fetch the base branch. Exit 0 with `skipped: true` gives its reason in `note`; log it. Contract: `features/repo-profile.md`, "Owned-path gate".
@@ -442,7 +440,7 @@ The subtraction never widens: match on identifier only, and when identifiers can
442
440
  **Gate results:**
443
441
 
444
442
  - All pass (including the evidence gate) -> proceed to AI review
445
- - Any fail -> fix immediately, re-run gates (no AI review until clean)
443
+ - Any fail -> fix, re-run gates (no AI review until clean)
446
444
  Log: "Phase 3: Gates - owned:{ok/fail} build:{pass/fail} lint:{pass/fail} test:{pass/fail/inherited-red} secrets:{clean/found} evidence:{ok/unverified}"
447
445
 
448
446
  ##### Gate 5 - Fortify SSC findings (runs when `state.contextLinks[]` contains a `fortify` entry, or when `prefs.global.fortify.alwaysCheck === true`)
@@ -145,7 +145,7 @@ node $HOME/.claude/scripts/owned-path-gate.mjs --repo "$WORKTREE" --base "origin
145
145
  --state "$STATE_FILE" --out "$OP_FILE"
146
146
  ```
147
147
 
148
- `--out` drops the old file; exit 2 writes none. A missing `$OP_FILE` is a gate error, never "no findings" (`review-decision-gate.mjs` exit 3 under the gates). Findings merge at Step 3.0. Contract: `features/repo-profile.md`.
148
+ `--out` drops the old file; exit 2 writes none. A missing `$OP_FILE` is a gate error, never "no findings" (`review-decision-gate.mjs` exit 3 under the gates). Findings merge at Step 3.0. Contract: `features/repo-profile.md`. Step 1.762: `features/valven.md`.
149
149
 
150
150
  #### Step 1.77 - Reviewer scope (cost gate)
151
151
 
@@ -377,15 +377,15 @@ ANON=$(jq -n --argjson r "$REVIEWERS_JSON" --arg t "$TASK_ID" --argjson i "$ITER
377
377
 
378
378
  `$REVIEWERS_JSON` is `state.reviewIterations[i].reviewers`. Findings come back with `foundBy: "Source A|B|C"` and every identity key removed. Persist the map to `state.reviewIterations[i].anonymizationMap` for Phase 5 per-reviewer telemetry, and **never put the map in a prompt**.
379
379
 
380
- Then append the Step 1.76 test-integrity, 1.761 owned-path and 2.7 security-audit findings, so they are adjudicated:
380
+ Then append the deterministic findings (Steps 1.76, 1.761, 1.762, 2.7):
381
381
 
382
382
  ```bash
383
383
  SA_FILE="$WORKTREE/.pipeline/security-audit-$ITERATION.json"
384
- MERGED=$(printf '%s' "$ANON" | cat - "$TI_FILE" "$OP_FILE" "$SA_FILE" 2>/dev/null \
384
+ MERGED=$(printf '%s' "$ANON" | cat - "$TI_FILE" "$OP_FILE" "$VG_FILE" "$SA_FILE" 2>/dev/null \
385
385
  | jq -s '.[0] + ([.[1:][] | .findings // []] | add // [])')
386
386
  ```
387
387
 
388
- Deterministic findings keep their `tag` (`test_integrity`, `owned_path`) and no `foundBy`: a reviewer finding may hallucinate, a gate finding is a fact. Security-audit findings carry their `security` envelope and `foundBy: "security-auditor"`; no audit file contributes nothing.
388
+ Deterministic findings keep their `tag` (`test_integrity`, `owned_path`, `valven`) and no `foundBy`: a reviewer finding may hallucinate, a gate finding is a fact. Security-audit findings carry their `security` envelope and `foundBy: "security-auditor"`; no audit file contributes nothing.
389
389
 
390
390
  ##### 3.1 Short-circuit: no findings
391
391
 
@@ -550,7 +550,7 @@ A triage verdict is judgment; a failing repro test is proof. Runs only when `pre
550
550
 
551
551
  Compressed flow: dispatch ONE verifier agent (model `verifyByTest.model`, default `sonnet`) for up to `maxFindings` (default 3) accepted blocking findings. Per finding it writes ONE minimal repro test and runs ONLY that test (Phase 2 single-test invocation, build lock, log tee'd to `$WORKTREE/.pipeline/verify-<i>.test.log`). Outcomes: test FAILS as predicted -> `confirmed`, finding stays blocking and the test is KEPT in `redTests[]` as the Phase 2 rework RED test; test PASSES on every one of `verifyByTest.repeatCount` runs (default 3) -> `not-reproduced` ONLY if `evidence-gate.mjs --claim test --status passed` exits 0 on each log; a run that disagrees with the others -> `inconclusive` with `flaky: passed k/N`, finding moves to `deferred[]`, test deleted; compile error / timeout / not unit-testable -> `inconclusive`, judgment verdict stands. Stamp findings with `verification` (schema v3.2.0), persist `state.reviewIterations[-1].verifyByTest = {attempted, confirmed, downgraded, inconclusive, redTests[]}`, recompute `approved`, re-run `validate-triage.mjs` under the 3.2.1 gate. Whole step bounded by `stepTimeoutSec` (default 600); on breach or crash remaining findings keep judgment verdicts - never blocks. Telemetry per 3.4: `review.verify_by_test attempted= confirmed= downgraded= inconclusive= duration_ms=`.
552
552
 
553
- **Autopilot decision rule (every round, after 3.7):** run the call in `$HOME/.claude/multi-agent-refs/features/review-decision.md` (Wiring: `--integrity "$TI_FILE" --integrity "$OP_FILE" --source "$SA_FILE"`), merge its JSON into `state.reviewIterations[-1].reviewDecision`, repeat the `cp`. A blocker backed by neither two reviewers nor a failing test becomes important; on exit 1 or 3 run `gate-ledger.mjs park --outcome verification-failed --gate review-decision`.
553
+ **Autopilot decision rule (every round, after 3.7):** run the call in `$HOME/.claude/multi-agent-refs/features/review-decision.md` (Wiring: one `--integrity` per gate file, `--source "$SA_FILE"`), merge its JSON into `state.reviewIterations[-1].reviewDecision`, repeat the `cp`. A blocker backed by neither two reviewers nor a failing test becomes important; on exit 1 or 3 run `gate-ledger.mjs park --outcome verification-failed --gate review-decision`.
554
554
 
555
555
  ##### 3.8 Cross-round delta + circuit-breaker trigger 2 (iteration >= 2)
556
556
 
@@ -110,6 +110,7 @@ Branch **deterministically**, no implicit fallback. Read `agent-state.json` and
110
110
  - For EACH submodule with changes: stage, commit, push separately
111
111
  - Commit message uses same convention but scope reflects submodule: `{type}({submodule-scope}): {description} [{jiraId}]`
112
112
  6. Commit with convention: `{type}({scope}): {description} [{jiraId}]` or `[#{shortId}]`. When `node $HOME/.claude/scripts/repo-profile.mjs resolve commit.format --repo "$PROJECT_ROOT"` returns `use: true`, its `ticketPosition` places the ticket (`prefix` first, `suffix` last; `none` keeps this default unless confirmed or manual), `ticketStyle` its form and `scopeRequired` the scope. A profile hook with `amends-commit` or `writes-files` rewrites the commit: re-read the SHA after committing ([`features/repo-profile.md`]($HOME/.claude/multi-agent-refs/features/repo-profile.md)). **Local-only repos** (`projects[i].provider == "local"`) have no ticket, and that wins over any profile placement: the subject keeps the conventional prefix with no ticket, and the taskId (`LOCAL-...`) goes in the body footer: `Local-Task: {taskId}`.
113
+ 6a. **Valven (required):** `features/valven.md`.
113
114
  7. Push to remote - **skip per-repo when `projects[i].provider == "local"`** (no `git push`, no upstream config). Log `Phase 4: local-only commit {sha} (no push)` for that repo.
114
115
  8. Ask: "Want to open a Pull Request?"
115
116
  - **Skip the prompt entirely when `state.offlineOnly == true`** (all repos local - no PR target exists). Proceed to Phase 5 with `pr.status = "skipped-offline"` for each project.
@@ -1476,6 +1476,22 @@
1476
1476
  }
1477
1477
  }
1478
1478
  },
1479
+ "valven": {
1480
+ "type": "object",
1481
+ "additionalProperties": true,
1482
+ "description": "valven-rules delivery gate. Phase 2 Gate 6 sets splitRequired when a size or scope rule fails; Phase 4 Step 2.95 records the stacked PRs it opened.",
1483
+ "properties": {
1484
+ "splitRequired": { "type": "boolean" },
1485
+ "split": {
1486
+ "type": "object",
1487
+ "properties": {
1488
+ "sliceCount": { "type": "integer", "minimum": 1 },
1489
+ "branches": { "type": "array", "items": { "type": "string" } },
1490
+ "prs": { "type": "array", "items": { "type": "string" } }
1491
+ }
1492
+ }
1493
+ }
1494
+ },
1479
1495
  "diffRisk": {
1480
1496
  "type": "object",
1481
1497
  "additionalProperties": true,
@@ -1500,6 +1500,27 @@
1500
1500
  "default": true,
1501
1501
  "description": "v8.3+ - Phase 3 Step 1.75 advisory diff risk scoring. When enabled, `pipeline/scripts/diff-risk-score.mjs` runs before reviewer dispatch and the top-N risk-ranked files are injected into each reviewer's prompt as a priority hint (security paths, public API surfaces, untested source changes, schema migrations). Heuristic, deterministic, no LLM cost. Default ON - the run is sub-second and never gates the pipeline. Flip to false to skip the script and the prompt injection entirely."
1502
1502
  },
1503
+ "valven": {
1504
+ "type": "object",
1505
+ "additionalProperties": false,
1506
+ "description": "valven-rules delivery gate (skills/valven-rules). Runs at Phase 2 exit (Gate 6), Phase 4 Step 2.95 before push, Phase 3 Step 1.762 and every /multi-agent:review. Findings carry tag `valven`; an accepted important or blocking one sets NEEDS WORK, and an oversized branch is split into stacked PRs by valven-split.mjs.",
1507
+ "properties": {
1508
+ "enabled": {
1509
+ "type": "boolean",
1510
+ "default": true,
1511
+ "description": "false turns the gate off everywhere; each run then logs `valven: disabled by prefs` so a skipped check is never read as a pass."
1512
+ },
1513
+ "thresholds": {
1514
+ "type": "object",
1515
+ "description": "Per-rule overrides of the `gate_rules` defaults in rules.yml, keyed by rule ID, e.g. {\"VLV-SIZE-01\": {\"important_over\": 300}}. Only keys the rule already declares are applied.",
1516
+ "propertyNames": { "pattern": "^VLV-[A-Z]+-[0-9]{2}$" },
1517
+ "additionalProperties": {
1518
+ "type": "object",
1519
+ "additionalProperties": { "type": ["number", "string", "array"] }
1520
+ }
1521
+ }
1522
+ }
1523
+ },
1503
1524
  "reviewScopeGate": {
1504
1525
  "type": "boolean",
1505
1526
  "default": true,
@@ -31,7 +31,8 @@ function categorize(name) {
31
31
  if (
32
32
  name.startsWith("multi-agent") ||
33
33
  name === "apple-archive-compliance" ||
34
- name === "google-play-compliance"
34
+ name === "google-play-compliance" ||
35
+ name === "valven-rules"
35
36
  )
36
37
  return "pipeline";
37
38
  if (
@@ -162,6 +162,14 @@ usage_live_ping() {
162
162
  # Smoke runs exercise this script's state handling, never the live dashboard -
163
163
  # a test gate must not leave phantom "running" rows on the timeline.
164
164
  [ -n "${MULTI_AGENT_SMOKE:-}" ] && return 0
165
+ # A tracker file supplied through TRACKER_FILE is a fixture unless it sits
166
+ # under a run root; only real runs reach the dashboard.
167
+ if [ "$TRACKER_FILE_FROM_ENV" = "1" ]; then
168
+ case "$TRACKER_FILE" in
169
+ "${LOGS_ROOT:-$HOME/.claude/logs/multi-agent}"/* | "$HOME/.multi-agent-unattended/"*) ;;
170
+ *) return 0 ;;
171
+ esac
172
+ fi
165
173
  local task="$1" phase="$2"
166
174
  # The emitter ships into whichever host tree installed it; a Copilot- or
167
175
  # Codex-only install has no ~/.claude/scripts, so resolve across all three
@@ -53,7 +53,9 @@
53
53
 
54
54
  set -uo pipefail
55
55
 
56
- REPO_ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
56
+ # Git runs the hook from the top of the worktree being pushed; the script itself
57
+ # may live in a different checkout of the same repository. Measure the former.
58
+ REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || (cd "$(dirname "$0")/../.." && pwd))"
57
59
  cd "$REPO_ROOT" || { echo "FAIL: can't cd to repo root" >&2; exit 2; }
58
60
 
59
61
  if ! command -v node >/dev/null 2>&1; then
@@ -176,7 +176,7 @@ export function rebuttalRecorded(reviewers) {
176
176
  }
177
177
 
178
178
  /** Tags of findings a deterministic gate produced, and the basis each one records. */
179
- const GATE_BASIS = { test_integrity: "test-integrity", owned_path: "owned-path" };
179
+ const GATE_BASIS = { test_integrity: "test-integrity", owned_path: "owned-path", valven: "valven" };
180
180
 
181
181
  /**
182
182
  * Apply the decision rule. Pure: the input is not mutated.