@mmerterden/multi-agent-pipeline 12.7.0 → 12.9.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 (247) hide show
  1. package/CHANGELOG.md +207 -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/features/review-multi-repo.md +65 -0
  13. package/pipeline/multi-agent-refs/features/url-enrichment.md +93 -0
  14. package/pipeline/multi-agent-refs/phases/operations.md +28 -0
  15. package/pipeline/multi-agent-refs/phases/phase-0-init.md +3 -83
  16. package/pipeline/multi-agent-refs/phases/phase-2-planning.md +1 -1
  17. package/pipeline/multi-agent-refs/phases/phase-3-dev.md +1 -2
  18. package/pipeline/multi-agent-refs/phases/phase-4-review.md +50 -62
  19. package/pipeline/schemas/prefs.schema.json +6 -0
  20. package/pipeline/scripts/_smoke-root.sh +61 -0
  21. package/pipeline/scripts/agent-guard.py +57 -3
  22. package/pipeline/scripts/audit-log.sh +25 -0
  23. package/pipeline/scripts/smoke-cross-cli-behavior.sh +21 -7
  24. package/pipeline/eval/golden-tasks/01-ios-bugfix-darkmode/expected/phase-1-analysis.json +0 -25
  25. package/pipeline/eval/golden-tasks/01-ios-bugfix-darkmode/expected/phase-2-plan.json +0 -30
  26. package/pipeline/eval/golden-tasks/01-ios-bugfix-darkmode/expected/phase-4-review.json +0 -20
  27. package/pipeline/eval/golden-tasks/01-ios-bugfix-darkmode/expected/phase-4-triage.json +0 -15
  28. package/pipeline/eval/golden-tasks/01-ios-bugfix-darkmode/metadata.json +0 -14
  29. package/pipeline/eval/golden-tasks/01-ios-bugfix-darkmode/task.json +0 -12
  30. package/pipeline/eval/golden-tasks/02-android-feature-compose/expected/phase-1-analysis.json +0 -29
  31. package/pipeline/eval/golden-tasks/02-android-feature-compose/expected/phase-2-plan.json +0 -43
  32. package/pipeline/eval/golden-tasks/02-android-feature-compose/expected/phase-4-review.json +0 -35
  33. package/pipeline/eval/golden-tasks/02-android-feature-compose/expected/phase-4-triage.json +0 -35
  34. package/pipeline/eval/golden-tasks/02-android-feature-compose/metadata.json +0 -14
  35. package/pipeline/eval/golden-tasks/02-android-feature-compose/task.json +0 -12
  36. package/pipeline/eval/golden-tasks/03-backend-python-ratelimit/expected/phase-1-analysis.json +0 -29
  37. package/pipeline/eval/golden-tasks/03-backend-python-ratelimit/expected/phase-2-plan.json +0 -42
  38. package/pipeline/eval/golden-tasks/03-backend-python-ratelimit/expected/phase-4-review.json +0 -20
  39. package/pipeline/eval/golden-tasks/03-backend-python-ratelimit/expected/phase-4-triage.json +0 -15
  40. package/pipeline/eval/golden-tasks/03-backend-python-ratelimit/metadata.json +0 -14
  41. package/pipeline/eval/golden-tasks/03-backend-python-ratelimit/task.json +0 -12
  42. package/pipeline/eval/golden-tasks/04-frontend-next-hydration/expected/phase-1-analysis.json +0 -29
  43. package/pipeline/eval/golden-tasks/04-frontend-next-hydration/expected/phase-2-plan.json +0 -40
  44. package/pipeline/eval/golden-tasks/04-frontend-next-hydration/expected/phase-4-review.json +0 -20
  45. package/pipeline/eval/golden-tasks/04-frontend-next-hydration/expected/phase-4-triage.json +0 -15
  46. package/pipeline/eval/golden-tasks/04-frontend-next-hydration/metadata.json +0 -14
  47. package/pipeline/eval/golden-tasks/04-frontend-next-hydration/task.json +0 -12
  48. package/pipeline/eval/golden-tasks/05-ios-security-keychain/expected/phase-1-analysis.json +0 -29
  49. package/pipeline/eval/golden-tasks/05-ios-security-keychain/expected/phase-2-plan.json +0 -42
  50. package/pipeline/eval/golden-tasks/05-ios-security-keychain/expected/phase-4-review.json +0 -28
  51. package/pipeline/eval/golden-tasks/05-ios-security-keychain/expected/phase-4-triage.json +0 -27
  52. package/pipeline/eval/golden-tasks/05-ios-security-keychain/metadata.json +0 -14
  53. package/pipeline/eval/golden-tasks/05-ios-security-keychain/task.json +0 -12
  54. package/pipeline/eval/golden-tasks/06-android-refactor-usecase/expected/phase-1-analysis.json +0 -29
  55. package/pipeline/eval/golden-tasks/06-android-refactor-usecase/expected/phase-2-plan.json +0 -41
  56. package/pipeline/eval/golden-tasks/06-android-refactor-usecase/expected/phase-4-review.json +0 -12
  57. package/pipeline/eval/golden-tasks/06-android-refactor-usecase/expected/phase-4-triage.json +0 -6
  58. package/pipeline/eval/golden-tasks/06-android-refactor-usecase/metadata.json +0 -14
  59. package/pipeline/eval/golden-tasks/06-android-refactor-usecase/task.json +0 -12
  60. package/pipeline/eval/golden-tasks/07-backend-node-idempotency/expected/phase-1-analysis.json +0 -29
  61. package/pipeline/eval/golden-tasks/07-backend-node-idempotency/expected/phase-2-plan.json +0 -42
  62. package/pipeline/eval/golden-tasks/07-backend-node-idempotency/expected/phase-4-review.json +0 -28
  63. package/pipeline/eval/golden-tasks/07-backend-node-idempotency/expected/phase-4-triage.json +0 -27
  64. package/pipeline/eval/golden-tasks/07-backend-node-idempotency/metadata.json +0 -14
  65. package/pipeline/eval/golden-tasks/07-backend-node-idempotency/task.json +0 -12
  66. package/pipeline/eval/golden-tasks/08-ios-auth-consensus-unverified/expected/phase-1-analysis.json +0 -25
  67. package/pipeline/eval/golden-tasks/08-ios-auth-consensus-unverified/expected/phase-2-plan.json +0 -31
  68. package/pipeline/eval/golden-tasks/08-ios-auth-consensus-unverified/expected/phase-4-review.json +0 -12
  69. package/pipeline/eval/golden-tasks/08-ios-auth-consensus-unverified/expected/phase-4-triage.json +0 -18
  70. package/pipeline/eval/golden-tasks/08-ios-auth-consensus-unverified/metadata.json +0 -14
  71. package/pipeline/eval/golden-tasks/08-ios-auth-consensus-unverified/task.json +0 -12
  72. package/pipeline/eval/golden-tasks/README.md +0 -65
  73. package/pipeline/eval/intent-cases.json +0 -40
  74. package/pipeline/eval/run-metrics-fixture.json +0 -93
  75. package/pipeline/eval/triage/01-empty-findings/expected.json +0 -6
  76. package/pipeline/eval/triage/01-empty-findings/input.json +0 -5
  77. package/pipeline/eval/triage/01-empty-findings/notes.md +0 -7
  78. package/pipeline/eval/triage/02-real-blocker/expected.json +0 -15
  79. package/pipeline/eval/triage/02-real-blocker/input.json +0 -14
  80. package/pipeline/eval/triage/02-real-blocker/notes.md +0 -7
  81. package/pipeline/eval/triage/03-out-of-scope-defer/expected.json +0 -18
  82. package/pipeline/eval/triage/03-out-of-scope-defer/input.json +0 -14
  83. package/pipeline/eval/triage/03-out-of-scope-defer/notes.md +0 -10
  84. package/pipeline/eval/triage/04-false-positive-reject/expected.json +0 -18
  85. package/pipeline/eval/triage/04-false-positive-reject/input.json +0 -14
  86. package/pipeline/eval/triage/04-false-positive-reject/notes.md +0 -10
  87. package/pipeline/eval/triage/05-mixed-classification/expected.json +0 -43
  88. package/pipeline/eval/triage/05-mixed-classification/input.json +0 -38
  89. package/pipeline/eval/triage/05-mixed-classification/notes.md +0 -17
  90. package/pipeline/eval/triage/06-severity-mismatch/expected.json +0 -15
  91. package/pipeline/eval/triage/06-severity-mismatch/input.json +0 -14
  92. package/pipeline/eval/triage/06-severity-mismatch/notes.md +0 -9
  93. package/pipeline/eval/triage/07-duplicate-reviewers/expected.json +0 -27
  94. package/pipeline/eval/triage/07-duplicate-reviewers/input.json +0 -22
  95. package/pipeline/eval/triage/07-duplicate-reviewers/notes.md +0 -9
  96. package/pipeline/eval/triage/08-style-misclassified/expected.json +0 -18
  97. package/pipeline/eval/triage/08-style-misclassified/input.json +0 -14
  98. package/pipeline/eval/triage/08-style-misclassified/notes.md +0 -9
  99. package/pipeline/eval/triage/09-cascading-finding/expected.json +0 -23
  100. package/pipeline/eval/triage/09-cascading-finding/input.json +0 -22
  101. package/pipeline/eval/triage/09-cascading-finding/notes.md +0 -9
  102. package/pipeline/eval/triage/10-deferred-crossref/expected.json +0 -18
  103. package/pipeline/eval/triage/10-deferred-crossref/input.json +0 -14
  104. package/pipeline/eval/triage/10-deferred-crossref/notes.md +0 -9
  105. package/pipeline/eval/triage/11-vercel-token-leak-blocker/expected.json +0 -27
  106. package/pipeline/eval/triage/11-vercel-token-leak-blocker/input.json +0 -22
  107. package/pipeline/eval/triage/11-vercel-token-leak-blocker/notes.md +0 -14
  108. package/pipeline/eval/triage/README.md +0 -54
  109. package/pipeline/scripts/benchmark-phase-0.sh +0 -128
  110. package/pipeline/scripts/check-md-links.mjs +0 -88
  111. package/pipeline/scripts/eval-golden-tasks-live.mjs +0 -302
  112. package/pipeline/scripts/eval-golden-tasks.mjs +0 -224
  113. package/pipeline/scripts/eval-intent.mjs +0 -107
  114. package/pipeline/scripts/eval-mine-corpus.mjs +0 -211
  115. package/pipeline/scripts/eval-triage.mjs +0 -171
  116. package/pipeline/scripts/fixtures/diff-risk-android.diff +0 -40
  117. package/pipeline/scripts/fixtures/diff-risk-ios.diff +0 -48
  118. package/pipeline/scripts/fixtures/diff-risk-test-removal.diff +0 -40
  119. package/pipeline/scripts/fixtures/install-layout.tsv +0 -19
  120. package/pipeline/scripts/fixtures/pack-expected-count.txt +0 -1
  121. package/pipeline/scripts/fixtures/test-gap-node.diff +0 -30
  122. package/pipeline/scripts/fixtures/test-gap-python.diff +0 -32
  123. package/pipeline/scripts/lint-mcp-refs.mjs +0 -218
  124. package/pipeline/scripts/lint-skills.mjs +0 -154
  125. package/pipeline/scripts/run-smokes.mjs +0 -130
  126. package/pipeline/scripts/scorecard.mjs +0 -258
  127. package/pipeline/scripts/smoke-add-detail.sh +0 -137
  128. package/pipeline/scripts/smoke-agent-guard.sh +0 -74
  129. package/pipeline/scripts/smoke-agent-log-cost.sh +0 -262
  130. package/pipeline/scripts/smoke-agent-model-routing.sh +0 -87
  131. package/pipeline/scripts/smoke-ask-choice.sh +0 -42
  132. package/pipeline/scripts/smoke-autopilot-circuit-breaker.sh +0 -36
  133. package/pipeline/scripts/smoke-bitbucket-contract.sh +0 -255
  134. package/pipeline/scripts/smoke-changelog-version.sh +0 -47
  135. package/pipeline/scripts/smoke-channels-approval-gate.sh +0 -60
  136. package/pipeline/scripts/smoke-channels-flow.sh +0 -130
  137. package/pipeline/scripts/smoke-ci-workflows.sh +0 -88
  138. package/pipeline/scripts/smoke-clarify.sh +0 -148
  139. package/pipeline/scripts/smoke-command-inventory.sh +0 -81
  140. package/pipeline/scripts/smoke-commands-skills-parity.sh +0 -87
  141. package/pipeline/scripts/smoke-community-gates.sh +0 -75
  142. package/pipeline/scripts/smoke-compliance-skills.sh +0 -119
  143. package/pipeline/scripts/smoke-config-hygiene.sh +0 -58
  144. package/pipeline/scripts/smoke-context-budget.sh +0 -72
  145. package/pipeline/scripts/smoke-cost-budget.sh +0 -70
  146. package/pipeline/scripts/smoke-cost-summary.sh +0 -139
  147. package/pipeline/scripts/smoke-cross-phase-cohesion.sh +0 -128
  148. package/pipeline/scripts/smoke-description-tr.sh +0 -82
  149. package/pipeline/scripts/smoke-dev-critic.sh +0 -144
  150. package/pipeline/scripts/smoke-diff-explain.sh +0 -147
  151. package/pipeline/scripts/smoke-diff-risk.sh +0 -190
  152. package/pipeline/scripts/smoke-dynamic-skill-loading.sh +0 -160
  153. package/pipeline/scripts/smoke-eval-live.sh +0 -136
  154. package/pipeline/scripts/smoke-evidence-gate.sh +0 -93
  155. package/pipeline/scripts/smoke-extract-conventions.sh +0 -163
  156. package/pipeline/scripts/smoke-fetchers-offline.sh +0 -448
  157. package/pipeline/scripts/smoke-figma-dispatch.sh +0 -112
  158. package/pipeline/scripts/smoke-gate-hooks.sh +0 -74
  159. package/pipeline/scripts/smoke-gc-tmp.sh +0 -130
  160. package/pipeline/scripts/smoke-gc-worktrees.sh +0 -125
  161. package/pipeline/scripts/smoke-generate-issue.sh +0 -120
  162. package/pipeline/scripts/smoke-handoff-contract.sh +0 -92
  163. package/pipeline/scripts/smoke-identity-isolation.sh +0 -70
  164. package/pipeline/scripts/smoke-install-layout.sh +0 -248
  165. package/pipeline/scripts/smoke-intent-guard.sh +0 -86
  166. package/pipeline/scripts/smoke-issue-comment-template.sh +0 -86
  167. package/pipeline/scripts/smoke-issue-jira-triad.sh +0 -120
  168. package/pipeline/scripts/smoke-keychain.sh +0 -158
  169. package/pipeline/scripts/smoke-language-axis.sh +0 -109
  170. package/pipeline/scripts/smoke-learning-curve.sh +0 -61
  171. package/pipeline/scripts/smoke-learnings-ledger.sh +0 -86
  172. package/pipeline/scripts/smoke-lib-scripts.sh +0 -448
  173. package/pipeline/scripts/smoke-mcp-gate.sh +0 -68
  174. package/pipeline/scripts/smoke-md-links.sh +0 -8
  175. package/pipeline/scripts/smoke-md2confluence.sh +0 -126
  176. package/pipeline/scripts/smoke-metrics-cache-ratio.sh +0 -72
  177. package/pipeline/scripts/smoke-migrate-state.sh +0 -102
  178. package/pipeline/scripts/smoke-mode-dispatch-drift.sh +0 -161
  179. package/pipeline/scripts/smoke-model-fallback.sh +0 -89
  180. package/pipeline/scripts/smoke-multi-repo-integration.sh +0 -116
  181. package/pipeline/scripts/smoke-multi-repo-worktree.sh +0 -61
  182. package/pipeline/scripts/smoke-no-mcp-in-dev-phases.sh +0 -194
  183. package/pipeline/scripts/smoke-no-token-prompt.sh +0 -85
  184. package/pipeline/scripts/smoke-own-punctuation.sh +0 -103
  185. package/pipeline/scripts/smoke-pack-contents.sh +0 -140
  186. package/pipeline/scripts/smoke-pat-audit.sh +0 -128
  187. package/pipeline/scripts/smoke-per-repo-memory.sh +0 -156
  188. package/pipeline/scripts/smoke-phase-0-multi-repo.sh +0 -170
  189. package/pipeline/scripts/smoke-phase-6-multi.sh +0 -79
  190. package/pipeline/scripts/smoke-phase-banner.sh +0 -101
  191. package/pipeline/scripts/smoke-phase-tracker.sh +0 -324
  192. package/pipeline/scripts/smoke-phase0-bridge-contract.sh +0 -241
  193. package/pipeline/scripts/smoke-phase4-gates.sh +0 -45
  194. package/pipeline/scripts/smoke-phase4-triage.sh +0 -229
  195. package/pipeline/scripts/smoke-plan-approval-gate.sh +0 -71
  196. package/pipeline/scripts/smoke-plan-safety.sh +0 -139
  197. package/pipeline/scripts/smoke-plan-todos.sh +0 -196
  198. package/pipeline/scripts/smoke-pr-review-actions.sh +0 -152
  199. package/pipeline/scripts/smoke-pre-commit.sh +0 -170
  200. package/pipeline/scripts/smoke-pref-migration.sh +0 -226
  201. package/pipeline/scripts/smoke-prefs-language.sh +0 -134
  202. package/pipeline/scripts/smoke-progress-contract.sh +0 -127
  203. package/pipeline/scripts/smoke-prune-logs.sh +0 -137
  204. package/pipeline/scripts/smoke-purge.sh +0 -138
  205. package/pipeline/scripts/smoke-push-retry.sh +0 -75
  206. package/pipeline/scripts/smoke-repo-map.sh +0 -300
  207. package/pipeline/scripts/smoke-review-readiness.sh +0 -92
  208. package/pipeline/scripts/smoke-review-watch.sh +0 -146
  209. package/pipeline/scripts/smoke-routines.sh +0 -84
  210. package/pipeline/scripts/smoke-run-aggregator.sh +0 -216
  211. package/pipeline/scripts/smoke-run-metrics.sh +0 -50
  212. package/pipeline/scripts/smoke-search.sh +0 -187
  213. package/pipeline/scripts/smoke-shadow-git.sh +0 -224
  214. package/pipeline/scripts/smoke-skill-authoring.sh +0 -137
  215. package/pipeline/scripts/smoke-skill-language.sh +0 -83
  216. package/pipeline/scripts/smoke-skill-manifest.sh +0 -138
  217. package/pipeline/scripts/smoke-skill-scan.sh +0 -198
  218. package/pipeline/scripts/smoke-source-parity.sh +0 -85
  219. package/pipeline/scripts/smoke-subagent-validators.sh +0 -108
  220. package/pipeline/scripts/smoke-sync-parity.sh +0 -92
  221. package/pipeline/scripts/smoke-tasklist-ordering.sh +0 -112
  222. package/pipeline/scripts/smoke-telemetry.sh +0 -147
  223. package/pipeline/scripts/smoke-test-gap.sh +0 -183
  224. package/pipeline/scripts/smoke-token-budget.sh +0 -67
  225. package/pipeline/scripts/smoke-token-preflight.sh +0 -82
  226. package/pipeline/scripts/smoke-tracker-contract.sh +0 -191
  227. package/pipeline/scripts/smoke-tracker-tokens-invocation.sh +0 -73
  228. package/pipeline/scripts/smoke-triage-memory.sh +0 -174
  229. package/pipeline/scripts/smoke-update-check.sh +0 -135
  230. package/pipeline/scripts/smoke-url-enrichment.sh +0 -70
  231. package/pipeline/scripts/smoke-validate-analysis-doc.sh +0 -161
  232. package/pipeline/scripts/smoke-validator-contradiction.sh +0 -67
  233. package/pipeline/scripts/smoke-validator-gates.sh +0 -164
  234. package/pipeline/scripts/smoke-vercel-deploy-redact.sh +0 -129
  235. package/pipeline/scripts/smoke-verify-by-test.sh +0 -148
  236. package/pipeline/scripts/smoke-wiki-integration.sh +0 -122
  237. package/pipeline/scripts/smoke-work-summary.sh +0 -163
  238. package/pipeline/scripts/smoke-workflow-audit.sh +0 -101
  239. package/pipeline/scripts/smoke-worktree-path-convention.sh +0 -86
  240. package/pipeline/scripts/smoke-wrapper-preservation.sh +0 -68
  241. package/pipeline/scripts/smoke-write-state.sh +0 -159
  242. package/pipeline/scripts/sync-parity-check.sh +0 -135
  243. package/pipeline/scripts/test-gap-rules/android.json +0 -25
  244. package/pipeline/scripts/test-gap-rules/ios.json +0 -34
  245. package/pipeline/scripts/test-gap-rules/node.json +0 -29
  246. package/pipeline/scripts/test-gap-rules/python.json +0 -25
  247. 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);