@mmerterden/multi-agent-pipeline 12.7.0 → 12.8.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 (244) hide show
  1. package/CHANGELOG.md +126 -0
  2. package/install/_common.mjs +48 -0
  3. package/install/_dev-only-files.mjs +125 -5
  4. package/install/claude.mjs +14 -8
  5. package/install/copilot.mjs +5 -8
  6. package/package.json +17 -2
  7. package/pipeline/commands/multi-agent/analysis/SKILL.md +1 -1
  8. package/pipeline/lib/credential-store.sh +20 -0
  9. package/pipeline/multi-agent-refs/_account-picker.md +1 -1
  10. package/pipeline/multi-agent-refs/_dev-context.md +1 -1
  11. package/pipeline/multi-agent-refs/_repo-picker.md +1 -1
  12. package/pipeline/multi-agent-refs/phases/operations.md +28 -0
  13. package/pipeline/multi-agent-refs/phases/phase-0-init.md +1 -0
  14. package/pipeline/multi-agent-refs/phases/phase-2-planning.md +1 -1
  15. package/pipeline/multi-agent-refs/phases/phase-3-dev.md +1 -2
  16. package/pipeline/multi-agent-refs/phases/phase-4-review.md +49 -4
  17. package/pipeline/schemas/prefs.schema.json +6 -0
  18. package/pipeline/scripts/_smoke-root.sh +61 -0
  19. package/pipeline/scripts/audit-log.sh +25 -0
  20. package/pipeline/scripts/smoke-cross-cli-behavior.sh +21 -7
  21. package/pipeline/eval/golden-tasks/01-ios-bugfix-darkmode/expected/phase-1-analysis.json +0 -25
  22. package/pipeline/eval/golden-tasks/01-ios-bugfix-darkmode/expected/phase-2-plan.json +0 -30
  23. package/pipeline/eval/golden-tasks/01-ios-bugfix-darkmode/expected/phase-4-review.json +0 -20
  24. package/pipeline/eval/golden-tasks/01-ios-bugfix-darkmode/expected/phase-4-triage.json +0 -15
  25. package/pipeline/eval/golden-tasks/01-ios-bugfix-darkmode/metadata.json +0 -14
  26. package/pipeline/eval/golden-tasks/01-ios-bugfix-darkmode/task.json +0 -12
  27. package/pipeline/eval/golden-tasks/02-android-feature-compose/expected/phase-1-analysis.json +0 -29
  28. package/pipeline/eval/golden-tasks/02-android-feature-compose/expected/phase-2-plan.json +0 -43
  29. package/pipeline/eval/golden-tasks/02-android-feature-compose/expected/phase-4-review.json +0 -35
  30. package/pipeline/eval/golden-tasks/02-android-feature-compose/expected/phase-4-triage.json +0 -35
  31. package/pipeline/eval/golden-tasks/02-android-feature-compose/metadata.json +0 -14
  32. package/pipeline/eval/golden-tasks/02-android-feature-compose/task.json +0 -12
  33. package/pipeline/eval/golden-tasks/03-backend-python-ratelimit/expected/phase-1-analysis.json +0 -29
  34. package/pipeline/eval/golden-tasks/03-backend-python-ratelimit/expected/phase-2-plan.json +0 -42
  35. package/pipeline/eval/golden-tasks/03-backend-python-ratelimit/expected/phase-4-review.json +0 -20
  36. package/pipeline/eval/golden-tasks/03-backend-python-ratelimit/expected/phase-4-triage.json +0 -15
  37. package/pipeline/eval/golden-tasks/03-backend-python-ratelimit/metadata.json +0 -14
  38. package/pipeline/eval/golden-tasks/03-backend-python-ratelimit/task.json +0 -12
  39. package/pipeline/eval/golden-tasks/04-frontend-next-hydration/expected/phase-1-analysis.json +0 -29
  40. package/pipeline/eval/golden-tasks/04-frontend-next-hydration/expected/phase-2-plan.json +0 -40
  41. package/pipeline/eval/golden-tasks/04-frontend-next-hydration/expected/phase-4-review.json +0 -20
  42. package/pipeline/eval/golden-tasks/04-frontend-next-hydration/expected/phase-4-triage.json +0 -15
  43. package/pipeline/eval/golden-tasks/04-frontend-next-hydration/metadata.json +0 -14
  44. package/pipeline/eval/golden-tasks/04-frontend-next-hydration/task.json +0 -12
  45. package/pipeline/eval/golden-tasks/05-ios-security-keychain/expected/phase-1-analysis.json +0 -29
  46. package/pipeline/eval/golden-tasks/05-ios-security-keychain/expected/phase-2-plan.json +0 -42
  47. package/pipeline/eval/golden-tasks/05-ios-security-keychain/expected/phase-4-review.json +0 -28
  48. package/pipeline/eval/golden-tasks/05-ios-security-keychain/expected/phase-4-triage.json +0 -27
  49. package/pipeline/eval/golden-tasks/05-ios-security-keychain/metadata.json +0 -14
  50. package/pipeline/eval/golden-tasks/05-ios-security-keychain/task.json +0 -12
  51. package/pipeline/eval/golden-tasks/06-android-refactor-usecase/expected/phase-1-analysis.json +0 -29
  52. package/pipeline/eval/golden-tasks/06-android-refactor-usecase/expected/phase-2-plan.json +0 -41
  53. package/pipeline/eval/golden-tasks/06-android-refactor-usecase/expected/phase-4-review.json +0 -12
  54. package/pipeline/eval/golden-tasks/06-android-refactor-usecase/expected/phase-4-triage.json +0 -6
  55. package/pipeline/eval/golden-tasks/06-android-refactor-usecase/metadata.json +0 -14
  56. package/pipeline/eval/golden-tasks/06-android-refactor-usecase/task.json +0 -12
  57. package/pipeline/eval/golden-tasks/07-backend-node-idempotency/expected/phase-1-analysis.json +0 -29
  58. package/pipeline/eval/golden-tasks/07-backend-node-idempotency/expected/phase-2-plan.json +0 -42
  59. package/pipeline/eval/golden-tasks/07-backend-node-idempotency/expected/phase-4-review.json +0 -28
  60. package/pipeline/eval/golden-tasks/07-backend-node-idempotency/expected/phase-4-triage.json +0 -27
  61. package/pipeline/eval/golden-tasks/07-backend-node-idempotency/metadata.json +0 -14
  62. package/pipeline/eval/golden-tasks/07-backend-node-idempotency/task.json +0 -12
  63. package/pipeline/eval/golden-tasks/08-ios-auth-consensus-unverified/expected/phase-1-analysis.json +0 -25
  64. package/pipeline/eval/golden-tasks/08-ios-auth-consensus-unverified/expected/phase-2-plan.json +0 -31
  65. package/pipeline/eval/golden-tasks/08-ios-auth-consensus-unverified/expected/phase-4-review.json +0 -12
  66. package/pipeline/eval/golden-tasks/08-ios-auth-consensus-unverified/expected/phase-4-triage.json +0 -18
  67. package/pipeline/eval/golden-tasks/08-ios-auth-consensus-unverified/metadata.json +0 -14
  68. package/pipeline/eval/golden-tasks/08-ios-auth-consensus-unverified/task.json +0 -12
  69. package/pipeline/eval/golden-tasks/README.md +0 -65
  70. package/pipeline/eval/intent-cases.json +0 -40
  71. package/pipeline/eval/run-metrics-fixture.json +0 -93
  72. package/pipeline/eval/triage/01-empty-findings/expected.json +0 -6
  73. package/pipeline/eval/triage/01-empty-findings/input.json +0 -5
  74. package/pipeline/eval/triage/01-empty-findings/notes.md +0 -7
  75. package/pipeline/eval/triage/02-real-blocker/expected.json +0 -15
  76. package/pipeline/eval/triage/02-real-blocker/input.json +0 -14
  77. package/pipeline/eval/triage/02-real-blocker/notes.md +0 -7
  78. package/pipeline/eval/triage/03-out-of-scope-defer/expected.json +0 -18
  79. package/pipeline/eval/triage/03-out-of-scope-defer/input.json +0 -14
  80. package/pipeline/eval/triage/03-out-of-scope-defer/notes.md +0 -10
  81. package/pipeline/eval/triage/04-false-positive-reject/expected.json +0 -18
  82. package/pipeline/eval/triage/04-false-positive-reject/input.json +0 -14
  83. package/pipeline/eval/triage/04-false-positive-reject/notes.md +0 -10
  84. package/pipeline/eval/triage/05-mixed-classification/expected.json +0 -43
  85. package/pipeline/eval/triage/05-mixed-classification/input.json +0 -38
  86. package/pipeline/eval/triage/05-mixed-classification/notes.md +0 -17
  87. package/pipeline/eval/triage/06-severity-mismatch/expected.json +0 -15
  88. package/pipeline/eval/triage/06-severity-mismatch/input.json +0 -14
  89. package/pipeline/eval/triage/06-severity-mismatch/notes.md +0 -9
  90. package/pipeline/eval/triage/07-duplicate-reviewers/expected.json +0 -27
  91. package/pipeline/eval/triage/07-duplicate-reviewers/input.json +0 -22
  92. package/pipeline/eval/triage/07-duplicate-reviewers/notes.md +0 -9
  93. package/pipeline/eval/triage/08-style-misclassified/expected.json +0 -18
  94. package/pipeline/eval/triage/08-style-misclassified/input.json +0 -14
  95. package/pipeline/eval/triage/08-style-misclassified/notes.md +0 -9
  96. package/pipeline/eval/triage/09-cascading-finding/expected.json +0 -23
  97. package/pipeline/eval/triage/09-cascading-finding/input.json +0 -22
  98. package/pipeline/eval/triage/09-cascading-finding/notes.md +0 -9
  99. package/pipeline/eval/triage/10-deferred-crossref/expected.json +0 -18
  100. package/pipeline/eval/triage/10-deferred-crossref/input.json +0 -14
  101. package/pipeline/eval/triage/10-deferred-crossref/notes.md +0 -9
  102. package/pipeline/eval/triage/11-vercel-token-leak-blocker/expected.json +0 -27
  103. package/pipeline/eval/triage/11-vercel-token-leak-blocker/input.json +0 -22
  104. package/pipeline/eval/triage/11-vercel-token-leak-blocker/notes.md +0 -14
  105. package/pipeline/eval/triage/README.md +0 -54
  106. package/pipeline/scripts/benchmark-phase-0.sh +0 -128
  107. package/pipeline/scripts/check-md-links.mjs +0 -88
  108. package/pipeline/scripts/eval-golden-tasks-live.mjs +0 -302
  109. package/pipeline/scripts/eval-golden-tasks.mjs +0 -224
  110. package/pipeline/scripts/eval-intent.mjs +0 -107
  111. package/pipeline/scripts/eval-mine-corpus.mjs +0 -211
  112. package/pipeline/scripts/eval-triage.mjs +0 -171
  113. package/pipeline/scripts/fixtures/diff-risk-android.diff +0 -40
  114. package/pipeline/scripts/fixtures/diff-risk-ios.diff +0 -48
  115. package/pipeline/scripts/fixtures/diff-risk-test-removal.diff +0 -40
  116. package/pipeline/scripts/fixtures/install-layout.tsv +0 -19
  117. package/pipeline/scripts/fixtures/pack-expected-count.txt +0 -1
  118. package/pipeline/scripts/fixtures/test-gap-node.diff +0 -30
  119. package/pipeline/scripts/fixtures/test-gap-python.diff +0 -32
  120. package/pipeline/scripts/lint-mcp-refs.mjs +0 -218
  121. package/pipeline/scripts/lint-skills.mjs +0 -154
  122. package/pipeline/scripts/run-smokes.mjs +0 -130
  123. package/pipeline/scripts/scorecard.mjs +0 -258
  124. package/pipeline/scripts/smoke-add-detail.sh +0 -137
  125. package/pipeline/scripts/smoke-agent-guard.sh +0 -74
  126. package/pipeline/scripts/smoke-agent-log-cost.sh +0 -262
  127. package/pipeline/scripts/smoke-agent-model-routing.sh +0 -87
  128. package/pipeline/scripts/smoke-ask-choice.sh +0 -42
  129. package/pipeline/scripts/smoke-autopilot-circuit-breaker.sh +0 -36
  130. package/pipeline/scripts/smoke-bitbucket-contract.sh +0 -255
  131. package/pipeline/scripts/smoke-changelog-version.sh +0 -47
  132. package/pipeline/scripts/smoke-channels-approval-gate.sh +0 -60
  133. package/pipeline/scripts/smoke-channels-flow.sh +0 -130
  134. package/pipeline/scripts/smoke-ci-workflows.sh +0 -88
  135. package/pipeline/scripts/smoke-clarify.sh +0 -148
  136. package/pipeline/scripts/smoke-command-inventory.sh +0 -81
  137. package/pipeline/scripts/smoke-commands-skills-parity.sh +0 -87
  138. package/pipeline/scripts/smoke-community-gates.sh +0 -75
  139. package/pipeline/scripts/smoke-compliance-skills.sh +0 -119
  140. package/pipeline/scripts/smoke-config-hygiene.sh +0 -58
  141. package/pipeline/scripts/smoke-context-budget.sh +0 -72
  142. package/pipeline/scripts/smoke-cost-budget.sh +0 -70
  143. package/pipeline/scripts/smoke-cost-summary.sh +0 -139
  144. package/pipeline/scripts/smoke-cross-phase-cohesion.sh +0 -128
  145. package/pipeline/scripts/smoke-description-tr.sh +0 -82
  146. package/pipeline/scripts/smoke-dev-critic.sh +0 -144
  147. package/pipeline/scripts/smoke-diff-explain.sh +0 -147
  148. package/pipeline/scripts/smoke-diff-risk.sh +0 -190
  149. package/pipeline/scripts/smoke-dynamic-skill-loading.sh +0 -160
  150. package/pipeline/scripts/smoke-eval-live.sh +0 -136
  151. package/pipeline/scripts/smoke-evidence-gate.sh +0 -93
  152. package/pipeline/scripts/smoke-extract-conventions.sh +0 -163
  153. package/pipeline/scripts/smoke-fetchers-offline.sh +0 -448
  154. package/pipeline/scripts/smoke-figma-dispatch.sh +0 -112
  155. package/pipeline/scripts/smoke-gate-hooks.sh +0 -74
  156. package/pipeline/scripts/smoke-gc-tmp.sh +0 -130
  157. package/pipeline/scripts/smoke-gc-worktrees.sh +0 -125
  158. package/pipeline/scripts/smoke-generate-issue.sh +0 -120
  159. package/pipeline/scripts/smoke-handoff-contract.sh +0 -92
  160. package/pipeline/scripts/smoke-identity-isolation.sh +0 -70
  161. package/pipeline/scripts/smoke-install-layout.sh +0 -248
  162. package/pipeline/scripts/smoke-intent-guard.sh +0 -86
  163. package/pipeline/scripts/smoke-issue-comment-template.sh +0 -86
  164. package/pipeline/scripts/smoke-issue-jira-triad.sh +0 -120
  165. package/pipeline/scripts/smoke-keychain.sh +0 -158
  166. package/pipeline/scripts/smoke-language-axis.sh +0 -109
  167. package/pipeline/scripts/smoke-learning-curve.sh +0 -61
  168. package/pipeline/scripts/smoke-learnings-ledger.sh +0 -86
  169. package/pipeline/scripts/smoke-lib-scripts.sh +0 -448
  170. package/pipeline/scripts/smoke-mcp-gate.sh +0 -68
  171. package/pipeline/scripts/smoke-md-links.sh +0 -8
  172. package/pipeline/scripts/smoke-md2confluence.sh +0 -126
  173. package/pipeline/scripts/smoke-metrics-cache-ratio.sh +0 -72
  174. package/pipeline/scripts/smoke-migrate-state.sh +0 -102
  175. package/pipeline/scripts/smoke-mode-dispatch-drift.sh +0 -161
  176. package/pipeline/scripts/smoke-model-fallback.sh +0 -89
  177. package/pipeline/scripts/smoke-multi-repo-integration.sh +0 -116
  178. package/pipeline/scripts/smoke-multi-repo-worktree.sh +0 -61
  179. package/pipeline/scripts/smoke-no-mcp-in-dev-phases.sh +0 -194
  180. package/pipeline/scripts/smoke-no-token-prompt.sh +0 -85
  181. package/pipeline/scripts/smoke-own-punctuation.sh +0 -103
  182. package/pipeline/scripts/smoke-pack-contents.sh +0 -140
  183. package/pipeline/scripts/smoke-pat-audit.sh +0 -128
  184. package/pipeline/scripts/smoke-per-repo-memory.sh +0 -156
  185. package/pipeline/scripts/smoke-phase-0-multi-repo.sh +0 -170
  186. package/pipeline/scripts/smoke-phase-6-multi.sh +0 -79
  187. package/pipeline/scripts/smoke-phase-banner.sh +0 -101
  188. package/pipeline/scripts/smoke-phase-tracker.sh +0 -324
  189. package/pipeline/scripts/smoke-phase0-bridge-contract.sh +0 -241
  190. package/pipeline/scripts/smoke-phase4-gates.sh +0 -45
  191. package/pipeline/scripts/smoke-phase4-triage.sh +0 -229
  192. package/pipeline/scripts/smoke-plan-approval-gate.sh +0 -71
  193. package/pipeline/scripts/smoke-plan-safety.sh +0 -139
  194. package/pipeline/scripts/smoke-plan-todos.sh +0 -196
  195. package/pipeline/scripts/smoke-pr-review-actions.sh +0 -152
  196. package/pipeline/scripts/smoke-pre-commit.sh +0 -170
  197. package/pipeline/scripts/smoke-pref-migration.sh +0 -226
  198. package/pipeline/scripts/smoke-prefs-language.sh +0 -134
  199. package/pipeline/scripts/smoke-progress-contract.sh +0 -127
  200. package/pipeline/scripts/smoke-prune-logs.sh +0 -137
  201. package/pipeline/scripts/smoke-purge.sh +0 -138
  202. package/pipeline/scripts/smoke-push-retry.sh +0 -75
  203. package/pipeline/scripts/smoke-repo-map.sh +0 -300
  204. package/pipeline/scripts/smoke-review-readiness.sh +0 -92
  205. package/pipeline/scripts/smoke-review-watch.sh +0 -146
  206. package/pipeline/scripts/smoke-routines.sh +0 -84
  207. package/pipeline/scripts/smoke-run-aggregator.sh +0 -216
  208. package/pipeline/scripts/smoke-run-metrics.sh +0 -50
  209. package/pipeline/scripts/smoke-search.sh +0 -187
  210. package/pipeline/scripts/smoke-shadow-git.sh +0 -224
  211. package/pipeline/scripts/smoke-skill-authoring.sh +0 -137
  212. package/pipeline/scripts/smoke-skill-language.sh +0 -83
  213. package/pipeline/scripts/smoke-skill-manifest.sh +0 -138
  214. package/pipeline/scripts/smoke-skill-scan.sh +0 -198
  215. package/pipeline/scripts/smoke-source-parity.sh +0 -85
  216. package/pipeline/scripts/smoke-subagent-validators.sh +0 -108
  217. package/pipeline/scripts/smoke-sync-parity.sh +0 -92
  218. package/pipeline/scripts/smoke-tasklist-ordering.sh +0 -112
  219. package/pipeline/scripts/smoke-telemetry.sh +0 -147
  220. package/pipeline/scripts/smoke-test-gap.sh +0 -183
  221. package/pipeline/scripts/smoke-token-budget.sh +0 -67
  222. package/pipeline/scripts/smoke-token-preflight.sh +0 -82
  223. package/pipeline/scripts/smoke-tracker-contract.sh +0 -191
  224. package/pipeline/scripts/smoke-tracker-tokens-invocation.sh +0 -73
  225. package/pipeline/scripts/smoke-triage-memory.sh +0 -174
  226. package/pipeline/scripts/smoke-update-check.sh +0 -135
  227. package/pipeline/scripts/smoke-url-enrichment.sh +0 -70
  228. package/pipeline/scripts/smoke-validate-analysis-doc.sh +0 -161
  229. package/pipeline/scripts/smoke-validator-contradiction.sh +0 -67
  230. package/pipeline/scripts/smoke-validator-gates.sh +0 -164
  231. package/pipeline/scripts/smoke-vercel-deploy-redact.sh +0 -129
  232. package/pipeline/scripts/smoke-verify-by-test.sh +0 -148
  233. package/pipeline/scripts/smoke-wiki-integration.sh +0 -122
  234. package/pipeline/scripts/smoke-work-summary.sh +0 -163
  235. package/pipeline/scripts/smoke-workflow-audit.sh +0 -101
  236. package/pipeline/scripts/smoke-worktree-path-convention.sh +0 -86
  237. package/pipeline/scripts/smoke-wrapper-preservation.sh +0 -68
  238. package/pipeline/scripts/smoke-write-state.sh +0 -159
  239. package/pipeline/scripts/sync-parity-check.sh +0 -135
  240. package/pipeline/scripts/test-gap-rules/android.json +0 -25
  241. package/pipeline/scripts/test-gap-rules/ios.json +0 -34
  242. package/pipeline/scripts/test-gap-rules/node.json +0 -29
  243. package/pipeline/scripts/test-gap-rules/python.json +0 -25
  244. package/pipeline/scripts/validate-schemas.mjs +0 -88
@@ -1,135 +0,0 @@
1
- #!/usr/bin/env bash
2
- # sync-parity-check.sh - detect drift between two pipeline mirror trees.
3
- #
4
- # Use case: after editing the pipeline locally (e.g. ~/.claude/commands/multi-agent/),
5
- # verify that the open-source repo (~/multi-agent-pipeline/pipeline/) and the
6
- # Copilot mirror (~/.copilot/multi-agent/) are still byte-identical for the
7
- # files that should be shared.
8
- #
9
- # Why this exists:
10
- # The sync-instructions skill is the official "copy from A to B" tool, but
11
- # nothing currently catches drift if the user forgets to run it. This script
12
- # is the watchdog - run it before committing or as part of a pre-push hook.
13
- #
14
- # Usage:
15
- # sync-parity-check.sh <left-dir> <right-dir> [--ignore <regex>]...
16
- #
17
- # Examples:
18
- # # Compare Claude personal copy vs. open-source repo:
19
- # sync-parity-check.sh \
20
- # ~/.claude/commands/multi-agent \
21
- # ~/multi-agent-pipeline/pipeline/commands/multi-agent
22
- #
23
- # # Compare Claude vs. Copilot mirrors, ignoring help.md if it intentionally
24
- # # diverges:
25
- # sync-parity-check.sh \
26
- # ~/.claude/commands/multi-agent \
27
- # ~/.copilot/multi-agent \
28
- # --ignore '/help\.md$'
29
- #
30
- # Exit codes:
31
- # 0 - perfect parity (or only ignored files differ)
32
- # 1 - drift detected (lists differing + missing-from-each-side)
33
- # 2 - usage error
34
-
35
- set -uo pipefail
36
-
37
- if [ "$#" -lt 2 ]; then
38
- echo "usage: sync-parity-check.sh <left-dir> <right-dir> [--ignore <regex>]..." >&2
39
- exit 2
40
- fi
41
-
42
- LEFT="$1"; shift
43
- RIGHT="$1"; shift
44
-
45
- IGNORES=()
46
- while [ "$#" -gt 0 ]; do
47
- case "$1" in
48
- --ignore)
49
- IGNORES+=("$2"); shift 2 ;;
50
- *)
51
- echo "unknown arg: $1" >&2; exit 2 ;;
52
- esac
53
- done
54
-
55
- [ -d "$LEFT" ] || { echo "error: left dir not found: $LEFT" >&2; exit 2; }
56
- [ -d "$RIGHT" ] || { echo "error: right dir not found: $RIGHT" >&2; exit 2; }
57
-
58
- # Resolve to absolute, normalized paths.
59
- LEFT="$(cd "$LEFT" && pwd)"
60
- RIGHT="$(cd "$RIGHT" && pwd)"
61
-
62
- is_ignored() {
63
- local rel="$1"
64
- for pat in "${IGNORES[@]+"${IGNORES[@]}"}"; do
65
- if [[ "$rel" =~ $pat ]]; then return 0; fi
66
- done
67
- return 1
68
- }
69
-
70
- # Collect file lists, relative to each root.
71
- LEFT_FILES=$(cd "$LEFT" && find . -type f | sort)
72
- RIGHT_FILES=$(cd "$RIGHT" && find . -type f | sort)
73
-
74
- # Files only on one side.
75
- ONLY_LEFT=$(comm -23 <(echo "$LEFT_FILES") <(echo "$RIGHT_FILES"))
76
- ONLY_RIGHT=$(comm -13 <(echo "$LEFT_FILES") <(echo "$RIGHT_FILES"))
77
- COMMON=$(comm -12 <(echo "$LEFT_FILES") <(echo "$RIGHT_FILES"))
78
-
79
- # Report and tally.
80
- DRIFT=0
81
- MISSING_RIGHT=0
82
- MISSING_LEFT=0
83
- DIFFERS=0
84
- IGNORED=0
85
-
86
- # Files only on the LEFT (missing from RIGHT).
87
- while IFS= read -r f; do
88
- [ -z "$f" ] && continue
89
- rel="${f#./}"
90
- if is_ignored "$rel"; then IGNORED=$((IGNORED+1)); continue; fi
91
- echo "MISSING-FROM-RIGHT $rel"
92
- MISSING_RIGHT=$((MISSING_RIGHT+1))
93
- DRIFT=1
94
- done <<< "$ONLY_LEFT"
95
-
96
- # Files only on the RIGHT (missing from LEFT).
97
- while IFS= read -r f; do
98
- [ -z "$f" ] && continue
99
- rel="${f#./}"
100
- if is_ignored "$rel"; then IGNORED=$((IGNORED+1)); continue; fi
101
- echo "MISSING-FROM-LEFT $rel"
102
- MISSING_LEFT=$((MISSING_LEFT+1))
103
- DRIFT=1
104
- done <<< "$ONLY_RIGHT"
105
-
106
- # Files present on both sides - content compare.
107
- while IFS= read -r f; do
108
- [ -z "$f" ] && continue
109
- rel="${f#./}"
110
- if is_ignored "$rel"; then IGNORED=$((IGNORED+1)); continue; fi
111
- if ! diff -q "$LEFT/$rel" "$RIGHT/$rel" >/dev/null 2>&1; then
112
- echo "DIFFERS $rel"
113
- DIFFERS=$((DIFFERS+1))
114
- DRIFT=1
115
- fi
116
- done <<< "$COMMON"
117
-
118
- echo ""
119
- echo "── parity summary ──"
120
- echo "left: $LEFT"
121
- echo "right: $RIGHT"
122
- echo "files differ: $DIFFERS"
123
- echo "missing from right: $MISSING_RIGHT"
124
- echo "missing from left: $MISSING_LEFT"
125
- echo "ignored: $IGNORED"
126
-
127
- if [ "$DRIFT" -eq 0 ]; then
128
- echo "result: PARITY"
129
- exit 0
130
- else
131
- echo "result: DRIFT"
132
- echo ""
133
- echo "fix: run /sync-instructions full to bring mirrors back in sync." >&2
134
- exit 1
135
- fi
@@ -1,25 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "stack": "android",
4
- "description": "Android / Jetpack Compose / Kotlin test gap rules. Sources in *.kt; tests under app/src/test/ or app/src/androidTest/.",
5
- "sourceExtensions": [".kt", ".java"],
6
- "testPathSuffixes": ["Test.kt", "Tests.kt", "Test.java"],
7
- "testPathContains": ["/src/test/", "/src/androidTest/", "/test/", "/tests/"],
8
- "excludePathGlobs": ["build/", ".gradle/", "generated/", "**/BuildConfig.java", "**/R.java"],
9
- "publicApiPatterns": [
10
- { "id": "open_class", "regex": "\\bopen\\s+class\\s+([A-Z][A-Za-z0-9_]*)" },
11
- { "id": "open_fun", "regex": "\\bopen\\s+fun\\s+([a-z_][A-Za-z0-9_]*)" },
12
- { "id": "public_fun", "regex": "^\\s*(?:public\\s+)?fun\\s+([a-z_][A-Za-z0-9_]*)" },
13
- { "id": "public_class", "regex": "^\\s*(?:public\\s+)?class\\s+([A-Z][A-Za-z0-9_]*)" },
14
- { "id": "jvmstatic", "regex": "@JvmStatic\\b" },
15
- { "id": "interface", "regex": "^\\s*(?:public\\s+)?interface\\s+([A-Z][A-Za-z0-9_]*)" }
16
- ],
17
- "composablePatterns": [
18
- {
19
- "id": "composable_fun",
20
- "regex": "@Composable\\s+(?:public\\s+|internal\\s+)?fun\\s+([A-Z][A-Za-z0-9_]*)"
21
- }
22
- ],
23
- "expectedTestKindsForComposable": ["compose-ui-test"],
24
- "hint": "Cover @Composable functions with createComposeRule() + onNodeWithText/Tag/ContentDescription assertions; ViewModels with runTest + Turbine."
25
- }
@@ -1,34 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "stack": "ios",
4
- "description": "iOS / SwiftUI / UIKit test gap rules. Source files in *.swift; tests in *Tests.swift. Snapshot/ViewInspector tests are also recognised when the source is a SwiftUI View.",
5
- "sourceExtensions": [".swift"],
6
- "testPathSuffixes": ["Tests.swift", "Test.swift"],
7
- "testPathContains": ["/Tests/", "/UnitTests/", "/SnapshotTests/"],
8
- "excludePathGlobs": [
9
- "Pods/",
10
- "Carthage/",
11
- ".build/",
12
- "DerivedData/",
13
- "Generated/",
14
- "Sourcery/",
15
- "_Generated.swift",
16
- "Tests/Fixtures/"
17
- ],
18
- "publicApiPatterns": [
19
- { "id": "public_func", "regex": "\\bpublic\\s+func\\s+([A-Za-z_][A-Za-z0-9_]*)" },
20
- { "id": "public_class", "regex": "\\bpublic\\s+(?:final\\s+)?class\\s+([A-Z][A-Za-z0-9_]*)" },
21
- { "id": "public_struct", "regex": "\\bpublic\\s+struct\\s+([A-Z][A-Za-z0-9_]*)" },
22
- { "id": "public_enum", "regex": "\\bpublic\\s+enum\\s+([A-Z][A-Za-z0-9_]*)" },
23
- { "id": "public_proto", "regex": "\\bpublic\\s+protocol\\s+([A-Z][A-Za-z0-9_]*)" },
24
- { "id": "public_init", "regex": "\\bpublic\\s+init\\b" },
25
- { "id": "objc_export", "regex": "@objc(?:Members)?\\s+(?:public\\s+)?(?:func|class|var)" }
26
- ],
27
- "swiftUiViewPatterns": [
28
- { "id": "view_struct", "regex": "struct\\s+([A-Z][A-Za-z0-9_]*)\\s*:\\s*View\\b" },
29
- { "id": "config_struct", "regex": "struct\\s+([A-Z][A-Za-z0-9_]*Configuration)\\b" }
30
- ],
31
- "expectedTestKindsForView": ["snapshot", "viewinspector", "unit"],
32
- "snapshotPathHints": ["SnapshotTests", "__Snapshots__"],
33
- "hint": "Cover with a 3-layer test (structural ViewInspector + snapshot + unit) per swiftui-qa.md."
34
- }
@@ -1,29 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "stack": "node",
4
- "description": "Node.js / TypeScript test gap rules. Sources in *.ts/*.tsx/*.js/*.mjs; tests in *.test.* / *.spec.* / __tests__/.",
5
- "sourceExtensions": [".ts", ".tsx", ".js", ".mjs", ".cjs"],
6
- "testPathSuffixes": [
7
- ".test.ts",
8
- ".test.tsx",
9
- ".test.js",
10
- ".test.mjs",
11
- ".spec.ts",
12
- ".spec.tsx",
13
- ".spec.js",
14
- ".spec.mjs"
15
- ],
16
- "testPathContains": ["/__tests__/", "/test/", "/tests/"],
17
- "excludePathGlobs": ["node_modules/", "dist/", "build/", ".next/", "coverage/", "*.d.ts"],
18
- "publicApiPatterns": [
19
- {
20
- "id": "named_export",
21
- "regex": "^export\\s+(?:async\\s+)?(?:function|class|const|let|interface|type|enum)\\s+([A-Za-z_$][A-Za-z0-9_$]*)"
22
- },
23
- {
24
- "id": "default_export",
25
- "regex": "^export\\s+default\\s+(?:async\\s+)?(?:function|class)\\s+([A-Za-z_$][A-Za-z0-9_$]*)"
26
- }
27
- ],
28
- "hint": "Cover named exports with vitest/jest test('<name>', ...). React components: React Testing Library (render + screen + userEvent)."
29
- }
@@ -1,25 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "stack": "python",
4
- "description": "Python test gap rules. Sources in *.py; tests in test_*.py / *_test.py / tests/.",
5
- "sourceExtensions": [".py"],
6
- "testPathSuffixes": ["_test.py"],
7
- "testPathPrefixes": ["test_"],
8
- "testPathContains": ["/tests/", "/test/"],
9
- "excludePathGlobs": [
10
- "__pycache__/",
11
- ".venv/",
12
- "venv/",
13
- ".tox/",
14
- "build/",
15
- "dist/",
16
- "*.egg-info/",
17
- "**/migrations/**"
18
- ],
19
- "publicApiPatterns": [
20
- { "id": "top_def", "regex": "^def\\s+([a-z_][a-z0-9_]*)" },
21
- { "id": "top_class", "regex": "^class\\s+([A-Z][A-Za-z0-9_]*)" },
22
- { "id": "async_def", "regex": "^async\\s+def\\s+([a-z_][a-z0-9_]*)" }
23
- ],
24
- "hint": "Cover with pytest test_<symbol> style. Async with pytest-asyncio. Avoid name collision with private helpers (prefix _)."
25
- }
@@ -1,88 +0,0 @@
1
- #!/usr/bin/env node
2
- // Shallow schema sanity check for pipeline/schemas/*.schema.json.
3
- //
4
- // Zero dependencies - uses only Node.js built-ins. This keeps the shipped
5
- // npm package fully self-contained (no ajv / ajv-formats / anything).
6
- // CI runs this on every push; you can run it locally with:
7
- //
8
- // node pipeline/scripts/validate-schemas.mjs
9
- //
10
- // Checks (enough to catch the regressions we care about):
11
- // 1. file parses as JSON
12
- // 2. declares $schema pointing at json-schema.org
13
- // 3. has $id, title, and type
14
- // 4. if type === "object", has properties
15
- //
16
- // For deeper structural correctness (type-aware compile, format validators,
17
- // cross-reference resolution), use ajv locally:
18
- // npx ajv compile -s pipeline/schemas/agent-state.schema.json
19
- // We intentionally don't bundle ajv because this package must stay zero-dep.
20
-
21
- import { readdirSync, readFileSync } from "node:fs";
22
- import { join, dirname } from "node:path";
23
- import { fileURLToPath } from "node:url";
24
-
25
- const here = dirname(fileURLToPath(import.meta.url));
26
- const schemaDir = join(here, "..", "schemas");
27
-
28
- function fail(file, reason) {
29
- console.error(`FAIL: ${file} - ${reason}`);
30
- return 1;
31
- }
32
-
33
- function pass(file) {
34
- console.log(`PASS: ${file}`);
35
- return 0;
36
- }
37
-
38
- function validate(file, schema) {
39
- if (typeof schema !== "object" || schema === null) {
40
- return fail(file, "top-level is not an object");
41
- }
42
- if (typeof schema.$schema !== "string" || !schema.$schema.includes("json-schema.org")) {
43
- return fail(file, "missing or invalid $schema (expected a json-schema.org URL)");
44
- }
45
- if (typeof schema.$id !== "string" || !schema.$id) {
46
- return fail(file, "missing $id");
47
- }
48
- if (typeof schema.title !== "string" || !schema.title) {
49
- return fail(file, "missing title");
50
- }
51
- if (typeof schema.type !== "string") {
52
- return fail(file, "missing type");
53
- }
54
- if (
55
- schema.type === "object" &&
56
- (typeof schema.properties !== "object" || schema.properties === null)
57
- ) {
58
- return fail(file, 'type is "object" but no properties block');
59
- }
60
- return pass(file);
61
- }
62
-
63
- let files;
64
- try {
65
- files = readdirSync(schemaDir).filter((f) => f.endsWith(".schema.json"));
66
- } catch (err) {
67
- console.error(`FAIL: cannot read schema directory ${schemaDir} - ${err.message}`);
68
- process.exit(1);
69
- }
70
-
71
- if (files.length === 0) {
72
- console.log("No schemas found under pipeline/schemas/ - nothing to validate.");
73
- process.exit(0);
74
- }
75
-
76
- let failCount = 0;
77
- for (const file of files) {
78
- let schema;
79
- try {
80
- schema = JSON.parse(readFileSync(join(schemaDir, file), "utf-8"));
81
- } catch (err) {
82
- failCount += fail(file, `JSON parse error: ${err.message}`);
83
- continue;
84
- }
85
- failCount += validate(file, schema);
86
- }
87
-
88
- process.exit(failCount === 0 ? 0 : 1);