@mmerterden/multi-agent-pipeline 13.5.0 → 14.0.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 (119) hide show
  1. package/CHANGELOG.md +243 -0
  2. package/README.md +3 -3
  3. package/docs/features.md +1 -1
  4. package/install/_common.mjs +73 -0
  5. package/install/_mcp-register.mjs +70 -31
  6. package/install/_plugin-skills.mjs +73 -14
  7. package/install/claude.mjs +28 -4
  8. package/install/codex.mjs +33 -2
  9. package/install/copilot.mjs +145 -9
  10. package/install/index.mjs +10 -6
  11. package/install/templates/copilot-instructions.md +1 -1
  12. package/package.json +1 -1
  13. package/pipeline/agents/code-reviewer.md +58 -1
  14. package/pipeline/commands/multi-agent/SKILL.md +7 -5
  15. package/pipeline/commands/multi-agent/analysis/SKILL.md +7 -7
  16. package/pipeline/commands/multi-agent/analysis-resolve/SKILL.md +1 -1
  17. package/pipeline/commands/multi-agent/build-optimize/SKILL.md +7 -7
  18. package/pipeline/commands/multi-agent/channels/SKILL.md +5 -5
  19. package/pipeline/commands/multi-agent/dev/SKILL.md +23 -18
  20. package/pipeline/commands/multi-agent/dev-autopilot/SKILL.md +19 -13
  21. package/pipeline/commands/multi-agent/dev-local/SKILL.md +14 -12
  22. package/pipeline/commands/multi-agent/dev-local-autopilot/SKILL.md +17 -12
  23. package/pipeline/commands/multi-agent/garbage-collect/SKILL.md +1 -1
  24. package/pipeline/commands/multi-agent/help/SKILL.md +4 -4
  25. package/pipeline/commands/multi-agent/ios-coding-standard/SKILL.md +2 -2
  26. package/pipeline/commands/multi-agent/local-autopilot/SKILL.md +4 -4
  27. package/pipeline/commands/multi-agent/resume/SKILL.md +1 -1
  28. package/pipeline/commands/multi-agent/review/SKILL.md +5 -5
  29. package/pipeline/commands/multi-agent/scan/SKILL.md +1 -1
  30. package/pipeline/commands/multi-agent/search/SKILL.md +1 -1
  31. package/pipeline/commands/multi-agent/setup/SKILL.md +6 -6
  32. package/pipeline/commands/multi-agent/{finish → ship}/SKILL.md +12 -12
  33. package/pipeline/commands/multi-agent/testflight-validation/SKILL.md +1 -1
  34. package/pipeline/commands/multi-agent/update/SKILL.md +5 -2
  35. package/pipeline/commands/sim-test.md +2 -2
  36. package/pipeline/lib/credential-store-resolver.sh +16 -0
  37. package/pipeline/lib/credential-store.sh +47 -4
  38. package/pipeline/lib/fetch-figma-annotations.sh +26 -28
  39. package/pipeline/lib/figma-screenshot.sh +28 -39
  40. package/pipeline/lib/figma-token.sh +63 -0
  41. package/pipeline/multi-agent-refs/analysis-template.md +1 -1
  42. package/pipeline/multi-agent-refs/android-guide.md +1 -1
  43. package/pipeline/multi-agent-refs/channels/issue-comment.md +1 -1
  44. package/pipeline/multi-agent-refs/component-dispatch.md +2 -2
  45. package/pipeline/multi-agent-refs/cross-cli-contract.md +4 -4
  46. package/pipeline/multi-agent-refs/features/dev-critic.md +2 -2
  47. package/pipeline/multi-agent-refs/features/model-fallback.md +35 -2
  48. package/pipeline/multi-agent-refs/features/plan-todos.md +1 -1
  49. package/pipeline/multi-agent-refs/features/repo-map.md +1 -1
  50. package/pipeline/multi-agent-refs/features/review-multi-repo.md +3 -3
  51. package/pipeline/multi-agent-refs/features/shadow-git.md +1 -1
  52. package/pipeline/multi-agent-refs/features/skill-conformance.md +116 -0
  53. package/pipeline/multi-agent-refs/features/verify-by-test.md +1 -1
  54. package/pipeline/multi-agent-refs/generate-issue.md +1 -1
  55. package/pipeline/multi-agent-refs/multi-repo-integration-build.md +1 -1
  56. package/pipeline/multi-agent-refs/phases/log-format.md +4 -4
  57. package/pipeline/multi-agent-refs/phases/modes.md +7 -7
  58. package/pipeline/multi-agent-refs/phases/phase-0-init.md +13 -11
  59. package/pipeline/multi-agent-refs/phases/phase-1-analysis.md +17 -15
  60. package/pipeline/multi-agent-refs/phases/phase-2-planning.md +7 -7
  61. package/pipeline/multi-agent-refs/phases/phase-3-dev.md +28 -13
  62. package/pipeline/multi-agent-refs/phases/phase-4-review.md +90 -58
  63. package/pipeline/multi-agent-refs/phases/phase-5-test.md +7 -7
  64. package/pipeline/multi-agent-refs/phases/phase-6-commit.md +8 -8
  65. package/pipeline/multi-agent-refs/phases/phase-7-report.md +8 -8
  66. package/pipeline/multi-agent-refs/phases.md +13 -13
  67. package/pipeline/multi-agent-refs/progress-contract.md +2 -2
  68. package/pipeline/multi-agent-refs/rules.md +7 -5
  69. package/pipeline/multi-agent-refs/swiftui-guide.md +1 -1
  70. package/pipeline/multi-agent-refs/tracker-contract.md +16 -15
  71. package/pipeline/preferences-template.json +7 -1
  72. package/pipeline/rules/figma-pipeline.md +2 -2
  73. package/pipeline/schemas/agent-state.schema.json +333 -79
  74. package/pipeline/schemas/criteria-manifest.schema.json +228 -0
  75. package/pipeline/schemas/migrations/prefs-2.4.0-to-2.5.0.mjs +64 -0
  76. package/pipeline/schemas/prefs.schema.json +118 -262
  77. package/pipeline/schemas/reviewer-output.schema.json +48 -3
  78. package/pipeline/schemas/token-budget.json +34 -10
  79. package/pipeline/schemas/triage-output.schema.json +112 -27
  80. package/pipeline/scripts/cost-table.json +7 -4
  81. package/pipeline/scripts/gc-worktrees.sh +1 -1
  82. package/pipeline/scripts/gen-mode-dispatch.mjs +6 -6
  83. package/pipeline/scripts/match-skills.mjs +37 -4
  84. package/pipeline/scripts/migrate-prefs.mjs +88 -17
  85. package/pipeline/scripts/phase-tracker.sh +14 -3
  86. package/pipeline/scripts/pre-commit-check.sh +49 -2
  87. package/pipeline/scripts/skill-conformance.mjs +960 -0
  88. package/pipeline/scripts/smoke-schema-validation.sh +17 -4
  89. package/pipeline/scripts/uninstall.mjs +35 -9
  90. package/pipeline/scripts/validate-reviewer.mjs +108 -1
  91. package/pipeline/skills/.skill-manifest.json +1 -1
  92. package/pipeline/skills/.skills-index.json +36 -9
  93. package/pipeline/skills/shared/README.md +15 -12
  94. package/pipeline/skills/shared/core/apple-archive-compliance/SKILL.md +1 -0
  95. package/pipeline/skills/shared/core/apple-archive-compliance/references/rules.yml +167 -0
  96. package/pipeline/skills/shared/core/google-play-compliance/SKILL.md +1 -0
  97. package/pipeline/skills/shared/core/google-play-compliance/references/rules.yml +184 -0
  98. package/pipeline/skills/shared/core/multi-agent/SKILL.md +10 -10
  99. package/pipeline/skills/shared/core/multi-agent-analysis/SKILL.md +4 -4
  100. package/pipeline/skills/shared/core/multi-agent-analysis-resolve/SKILL.md +3 -3
  101. package/pipeline/skills/shared/core/multi-agent-build-optimize/SKILL.md +2 -2
  102. package/pipeline/skills/shared/core/multi-agent-create-jira/SKILL.md +1 -1
  103. package/pipeline/skills/shared/core/multi-agent-dev/SKILL.md +6 -5
  104. package/pipeline/skills/shared/core/multi-agent-dev-autopilot/SKILL.md +7 -6
  105. package/pipeline/skills/shared/core/multi-agent-dev-local/SKILL.md +4 -3
  106. package/pipeline/skills/shared/core/multi-agent-dev-local-autopilot/SKILL.md +2 -1
  107. package/pipeline/skills/shared/core/multi-agent-help/SKILL.md +2 -2
  108. package/pipeline/skills/shared/core/multi-agent-ios-coding-standard/SKILL.md +1 -1
  109. package/pipeline/skills/shared/core/multi-agent-local-autopilot/SKILL.md +4 -4
  110. package/pipeline/skills/shared/core/multi-agent-review/SKILL.md +5 -5
  111. package/pipeline/skills/shared/core/multi-agent-scan/SKILL.md +1 -1
  112. package/pipeline/skills/shared/core/multi-agent-search/SKILL.md +1 -1
  113. package/pipeline/skills/shared/core/{multi-agent-finish → multi-agent-ship}/SKILL.md +8 -8
  114. package/pipeline/skills/shared/external/ios-coding-standard/SKILL.md +44 -5
  115. package/pipeline/skills/shared/external/ios-coding-standard/modules/_TEMPLATE.yml +82 -0
  116. package/pipeline/skills/shared/external/ios-coding-standard/references/STANDARD.md +169 -10
  117. package/pipeline/skills/shared/external/ios-coding-standard/references/lint-local.sh +13 -1
  118. package/pipeline/skills/shared/external/ios-coding-standard/references/rules.yml +335 -16
  119. package/pipeline/skills/skills-index.md +11 -8
@@ -405,8 +405,19 @@ state_lock_stale() {
405
405
  kill -0 "$pid" 2>/dev/null && return 1
406
406
  return 0
407
407
  fi
408
- mtime=$(stat -f %m "$TRACKER_LOCK_DIR" 2>/dev/null || stat -c %Y "$TRACKER_LOCK_DIR" 2>/dev/null || echo "")
409
- [ -z "$mtime" ] && return 1
408
+ # GNU form first, and not because of style. On GNU coreutils `stat -f` is a valid
409
+ # flag meaning --file-system, where `%m` prints the MOUNT POINT - so a BSD-first
410
+ # chain succeeds on Linux, returns something like `/`, never reaches the `||`, and
411
+ # then the arithmetic below fails on a path. The effect was that a stale lock with
412
+ # no pid file was never reclaimed on Linux: every tracker call spun the full ~5s
413
+ # bound and fell open with a warning. macOS `stat -c` is simply invalid, so it
414
+ # errors and falls through cleanly - which is why this order works on both.
415
+ mtime=$(stat -c %Y "$TRACKER_LOCK_DIR" 2>/dev/null || stat -f %m "$TRACKER_LOCK_DIR" 2>/dev/null || echo "")
416
+ # Guard the arithmetic anyway: a non-numeric value here must not abort the caller
417
+ # under `set -u`, and treating it as "not stale" is the conservative branch.
418
+ case "$mtime" in
419
+ '' | *[!0-9]*) return 1 ;;
420
+ esac
410
421
  now=$(date +%s)
411
422
  age=$((now - mtime))
412
423
  [ "$age" -gt 30 ]
@@ -682,7 +693,7 @@ case "$ACTION" in
682
693
  state=$(load_state)
683
694
  # Idempotent: a phase id that already exists is a no-op (name, status, and
684
695
  # token history are preserved). This is what lets continuation commands
685
- # (/multi-agent:finish, resume) re-declare their phase set against a
696
+ # (/multi-agent:ship, resume) re-declare their phase set against a
686
697
  # pre-existing tracker without duplicating or resetting tiles.
687
698
  new=$(echo "$state" | jq --arg id "$PID" --arg name "$PNAME" '
688
699
  if any(.phases[]?; .id == $id) then .
@@ -115,12 +115,59 @@ while IFS= read -r -d '' file; do
115
115
  # High-entropy string scan - catches custom/unknown secrets the prefix
116
116
  # patterns miss. Skips lockfiles, integrity hashes, source maps, and snapshot
117
117
  # fixtures, which legitimately carry high-entropy non-secret content.
118
- if ! echo "$file" | grep -qiE '(package-lock\.json|yarn\.lock|pnpm-lock\.yaml|Podfile\.lock|Cartfile\.resolved|Package\.resolved|\.lock$|\.map$|__snapshots__|\.snap$|\.min\.(js|css)$)'; then
118
+ #
119
+ # `smoke-pre-commit.sh` is this gate's OWN test suite: it must contain
120
+ # secret-shaped fixtures (a fake `ghp_` token, a fake JWT, a random 44-char
121
+ # string) in order to prove the detector fires on them. Only ADDED lines are
122
+ # scanned (see the `git diff --cached | grep "^+"` above), so existing fixtures
123
+ # are invisible - but ADDING a new detector test blocks the commit that adds
124
+ # it, which makes the detector untestable. Entropy only: the provider-prefix,
125
+ # AWS, private-key, JWT and service-account checks above still apply to this
126
+ # file, so a real token pasted here is still caught. Scoped to this one path on
127
+ # purpose - widen the list and the gate stops meaning anything.
128
+ # The generic high-entropy exemptions stay case-insensitive (lockfile names
129
+ # vary). The gate's own suite is matched separately and CASE-SENSITIVELY on its
130
+ # exact repo-relative path: `(^|/)smoke-pre-commit\.sh$` under `grep -i` would
131
+ # have exempted any file with that basename in any directory and in any case,
132
+ # so staging `docs/SMOKE-PRE-COMMIT.SH` with a live credential in it would have
133
+ # passed. Staged names come from `git diff --cached --name-only`, which is
134
+ # repo-root-relative, so the full path can be anchored.
135
+ if ! echo "$file" | grep -qiE '(package-lock\.json|yarn\.lock|pnpm-lock\.yaml|Podfile\.lock|Cartfile\.resolved|Package\.resolved|\.lock$|\.map$|__snapshots__|\.snap$|\.min\.(js|css)$)' \
136
+ && ! echo "$file" | grep -qE '^pipeline/scripts/smoke-pre-commit\.sh$'; then
119
137
  candidates=$(echo "$content" | grep -oE '[A-Za-z0-9+/=_-]{40,}' || true)
120
138
  if [ -n "$candidates" ]; then
121
139
  entropy_hit=$(printf '%s\n' "$candidates" | awk '
122
140
  {
123
- s=$0; n=length(s);
141
+ s=$0;
142
+ # Scoring the joined string measures the variety of a whole SENTENCE
143
+ # rather than of any token in it, so an ordinary doc path like
144
+ # "claude/commands/multi-agent/review-jira/SKILL" scores 4.35 and was
145
+ # blocked as a possible credential. 47 of the 400 committed markdown
146
+ # files in this repo carried such a path, so each was un-editable - and
147
+ # the gate only fired once such a file was staged, which is why it
148
+ # stayed invisible.
149
+ #
150
+ # The reduction is applied ONLY to path-shaped candidates. An earlier
151
+ # version of this fix scored the longest slash-free segment for every
152
+ # candidate containing a slash, which structurally exempted any secret
153
+ # with a slash in it: the canonical 40-char AWS documentation-example
154
+ # secret access key (two slashes, full-match H=4.663, blocked before)
155
+ # reduced to an 18-char segment and sailed through, and roughly half
156
+ # of `openssl rand -base64 32` outputs contain a "/". It is not
157
+ # reproduced here on purpose - this gate flags credential-shaped
158
+ # strings in comments too, and it is right to.
159
+ # No other check here catches that key: the key-name regex above does
160
+ # not match "secret_access_key", and the AKIA pattern only covers the
161
+ # key ID, not the secret.
162
+ #
163
+ # Path-shaped means 3+ separators AND no segment long enough to be a
164
+ # token on its own. A 2-slash base64 blob therefore still gets scored
165
+ # whole, which is what keeps the AWS-key case blocked.
166
+ nseg = split(s, seg, "/");
167
+ longest = "";
168
+ for (j = 1; j <= nseg; j++) if (length(seg[j]) > length(longest)) longest = seg[j];
169
+ if (nseg >= 4 && length(longest) < 40) s = longest;
170
+ n = length(s);
124
171
  if (n < 40) next;
125
172
  if (s ~ /^[0-9]+$/) next; # pure digits
126
173
  if (s ~ /^[0-9a-f]+$/) next; # lowercase hex (git sha / md5 / sha-*)