@mmerterden/multi-agent-pipeline 12.5.0 → 12.7.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.
- package/CHANGELOG.md +213 -0
- package/README.md +19 -19
- package/docs/FIGMA_PIPELINE.md +34 -34
- package/docs/adr/0001-three-model-triage.md +12 -12
- package/docs/adr/0002-instruction-driven-flag.md +5 -5
- package/docs/adr/0003-unified-shared-skills.md +5 -5
- package/docs/adr/0004-zero-dependency-philosophy.md +5 -5
- package/docs/adr/0005-lazy-phase-docs.md +2 -2
- package/docs/adr/0006-skills-core-external-split.md +6 -6
- package/docs/adr/0007-multi-tool-adapter-framework.md +19 -19
- package/docs/adr/0008-installer-modularization-and-secret-leak-defense.md +19 -19
- package/docs/adr/README.md +1 -1
- package/docs/best-practices.md +3 -3
- package/docs/features.md +48 -28
- package/docs/performance.md +16 -16
- package/docs/recovery-guide.md +39 -39
- package/index.js +11 -5
- package/install/_common.mjs +5 -11
- package/install/_copilot-instructions.mjs +2 -2
- package/install/_dev-only-files.mjs +2 -1
- package/install/_platform-filter.mjs +1 -1
- package/install/_telemetry.mjs +1 -1
- package/install/claude.mjs +10 -9
- package/install/copilot.mjs +10 -19
- package/install/index.mjs +7 -15
- package/install/templates/copilot-instructions.md +54 -54
- package/install.js +1 -1
- package/package.json +15 -11
- package/pipeline/agents/security-auditor.md +1 -1
- package/pipeline/commands/archive-guard.md +5 -5
- package/pipeline/commands/multi-agent/SKILL.md +3 -1
- package/pipeline/commands/multi-agent/analysis/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/analysis-resolve/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/autopilot/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/build-optimize/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/create-jira/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/design-check/SKILL.md +287 -0
- package/pipeline/commands/multi-agent/dev/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/dev-autopilot/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/dev-local/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/dev-local-autopilot/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/diff-explain/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/finish/SKILL.md +6 -6
- package/pipeline/commands/multi-agent/forget/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/garbage-collect/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/help/SKILL.md +46 -6
- package/pipeline/commands/multi-agent/issue/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/jira/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/kill/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/language/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/local/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/local-autopilot/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/log/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/manual-test/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/prune-logs/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/purge/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/refactor/SKILL.md +107 -19
- package/pipeline/commands/multi-agent/resume/SKILL.md +2 -2
- package/pipeline/commands/multi-agent/review/SKILL.md +2 -2
- package/pipeline/commands/multi-agent/review-issue/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/review-jira/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/routines/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/save/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/scan/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/search/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/setup/SKILL.md +2 -2
- package/pipeline/commands/multi-agent/stack/SKILL.md +3 -3
- package/pipeline/commands/multi-agent/status/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/sync/SKILL.md +123 -16
- package/pipeline/commands/multi-agent/test/SKILL.md +2 -2
- package/pipeline/commands/multi-agent/uninstall/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/update/SKILL.md +3 -3
- package/pipeline/commands/sim-test.md +5 -5
- package/pipeline/eval/run-metrics-fixture.json +60 -13
- package/pipeline/lib/account-resolver.sh +1 -1
- package/pipeline/lib/channels-multi-repo.sh +1 -1
- package/pipeline/lib/context-link-extractor.sh +1 -1
- package/pipeline/lib/credential-store.sh +33 -1
- package/pipeline/lib/fetch-confluence.sh +1 -1
- package/pipeline/lib/fetch-crashlytics.sh +1 -1
- package/pipeline/lib/fetch-fortify.sh +1 -1
- package/pipeline/lib/fetch-graylog.sh +1 -1
- package/pipeline/lib/fetch-swagger.sh +1 -1
- package/pipeline/lib/issue-fetcher.sh +1 -1
- package/pipeline/lib/multi-repo-pipeline.sh +1 -1
- package/pipeline/lib/repo-cache.sh +1 -1
- package/pipeline/lib/submodule-detector.sh +1 -1
- package/pipeline/multi-agent-refs/component-dispatch.md +1 -1
- package/pipeline/multi-agent-refs/component-generation.md +121 -0
- package/pipeline/multi-agent-refs/cross-cli-contract.md +4 -4
- package/pipeline/multi-agent-refs/features/model-fallback.md +2 -2
- package/pipeline/multi-agent-refs/phases/phase-3-dev.md +2 -2
- package/pipeline/multi-agent-refs/phases/phase-4-review.md +1 -1
- package/pipeline/multi-agent-refs/phases/phase-5-test.md +4 -4
- package/pipeline/preferences-template.json +23 -12
- package/pipeline/schemas/agent-state.schema.json +125 -5
- package/pipeline/schemas/analysis-output.schema.json +18 -4
- package/pipeline/schemas/analysis-spec.schema.json +120 -32
- package/pipeline/schemas/clarify-output.schema.json +15 -5
- package/pipeline/schemas/design-check-config.schema.json +183 -0
- package/pipeline/schemas/dev-critic-output.schema.json +20 -5
- package/pipeline/schemas/figma-project-config.schema.json +42 -10
- package/pipeline/schemas/learnings-ledger.schema.json +10 -2
- package/pipeline/schemas/migrations/figma-config-1.0.0-to-2.0.0.mjs +1 -4
- package/pipeline/schemas/migrations/prefs-2.0.0-to-2.1.0.mjs +24 -7
- package/pipeline/schemas/migrations/state-2.0.0-to-2.1.0.mjs +30 -12
- package/pipeline/schemas/plan-todos.schema.json +6 -3
- package/pipeline/schemas/planning-output.schema.json +5 -1
- package/pipeline/schemas/prefs.schema.json +215 -197
- package/pipeline/schemas/test-gap.schema.json +5 -5
- package/pipeline/schemas/token-budget.json +8 -8
- package/pipeline/schemas/triage-corpus.schema.json +1 -1
- package/pipeline/scripts/README.md +7 -5
- package/pipeline/scripts/aggregate-metrics.mjs +18 -6
- package/pipeline/scripts/build-skills-index.mjs +6 -2
- package/pipeline/scripts/build-stack-plugins.mjs +142 -39
- package/pipeline/scripts/check-derived-drift.mjs +196 -0
- package/pipeline/scripts/check-md-links.mjs +6 -2
- package/pipeline/scripts/classify-plan-safety.mjs +26 -8
- package/pipeline/scripts/cost-budget-check.mjs +11 -6
- package/pipeline/scripts/cost-table.json +1 -1
- package/pipeline/scripts/diff-explain.mjs +7 -3
- package/pipeline/scripts/diff-risk-score.mjs +13 -3
- package/pipeline/scripts/eval-golden-tasks-live.mjs +8 -3
- package/pipeline/scripts/eval-golden-tasks.mjs +21 -9
- package/pipeline/scripts/eval-intent.mjs +8 -4
- package/pipeline/scripts/eval-mine-corpus.mjs +14 -4
- package/pipeline/scripts/evidence-gate.mjs +7 -2
- package/pipeline/scripts/fixtures/install-layout.tsv +7 -7
- package/pipeline/scripts/gen-mode-dispatch.mjs +38 -21
- package/pipeline/scripts/gen-skills-index.mjs +18 -3
- package/pipeline/scripts/learning-curve.mjs +13 -3
- package/pipeline/scripts/learnings-ledger.mjs +119 -34
- package/pipeline/scripts/lint-mcp-refs.mjs +218 -0
- package/pipeline/scripts/lint-skills.mjs +20 -9
- package/pipeline/scripts/localize-commands.mjs +6 -1
- package/pipeline/scripts/match-skills.mjs +15 -4
- package/pipeline/scripts/memory-load.sh +5 -1
- package/pipeline/scripts/migrate-prefs.mjs +33 -16
- package/pipeline/scripts/phase-tracker.sh +3 -1
- package/pipeline/scripts/render-work-summary.sh +4 -1
- package/pipeline/scripts/repo-map.mjs +110 -64
- package/pipeline/scripts/review-scope.mjs +7 -1
- package/pipeline/scripts/routine-registry.mjs +4 -9
- package/pipeline/scripts/run-aggregator.mjs +11 -5
- package/pipeline/scripts/run-metrics.mjs +13 -8
- package/pipeline/scripts/run-smokes.mjs +57 -3
- package/pipeline/scripts/scorecard.mjs +258 -0
- package/pipeline/scripts/smoke-command-inventory.sh +81 -0
- package/pipeline/scripts/smoke-commands-skills-parity.sh +1 -1
- package/pipeline/scripts/smoke-compliance-skills.sh +4 -4
- package/pipeline/scripts/smoke-context-budget.sh +72 -0
- package/pipeline/scripts/smoke-cross-cli-behavior.sh +12 -2
- package/pipeline/scripts/smoke-generate-issue.sh +6 -5
- package/pipeline/scripts/smoke-model-fallback.sh +1 -1
- package/pipeline/scripts/smoke-no-mcp-in-dev-phases.sh +86 -7
- package/pipeline/scripts/smoke-own-punctuation.sh +103 -0
- package/pipeline/scripts/smoke-per-repo-memory.sh +2 -2
- package/pipeline/scripts/smoke-review-readiness.sh +3 -2
- package/pipeline/scripts/smoke-schema-validation.sh +19 -5
- package/pipeline/scripts/smoke-shadow-git.sh +4 -2
- package/pipeline/scripts/smoke-workflow-audit.sh +43 -11
- package/pipeline/scripts/smoke-write-state.sh +49 -5
- package/pipeline/scripts/test-gap-rules/android.json +11 -11
- package/pipeline/scripts/test-gap-rules/ios.json +16 -11
- package/pipeline/scripts/test-gap-rules/node.json +19 -7
- package/pipeline/scripts/test-gap-rules/python.json +10 -4
- package/pipeline/scripts/test-gap-scan.mjs +44 -12
- package/pipeline/scripts/test-integrity-gate.mjs +5 -1
- package/pipeline/scripts/token-budget-report.mjs +44 -21
- package/pipeline/scripts/triage-memory.mjs +142 -32
- package/pipeline/scripts/uninstall.mjs +75 -31
- package/pipeline/scripts/validate-analysis-doc.mjs +15 -5
- package/pipeline/scripts/validate-diff-risk.mjs +32 -18
- package/pipeline/scripts/validate-test-gap.mjs +17 -7
- package/pipeline/scripts/validate-triage.mjs +17 -5
- package/pipeline/scripts/write-state.mjs +32 -9
- package/pipeline/skills/.skill-manifest.json +24 -8
- package/pipeline/skills/.skills-index.json +125 -89
- package/pipeline/skills/shared/README.md +65 -61
- package/pipeline/skills/shared/core/apple-archive-compliance/SKILL.md +10 -8
- package/pipeline/skills/shared/core/google-play-compliance/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent/SKILL.md +26 -279
- package/pipeline/skills/shared/core/multi-agent-analysis/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-analysis-resolve/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-autopilot/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-build-optimize/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-create-jira/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-design-check/SKILL.md +248 -0
- package/pipeline/skills/shared/core/multi-agent-dev/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-dev-autopilot/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-dev-local/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-dev-local-autopilot/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-diff-explain/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-finish/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-forget/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-garbage-collect/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-help/SKILL.md +23 -1
- package/pipeline/skills/shared/core/multi-agent-issue/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-jira/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-kill/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-language/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-local/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-local-autopilot/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-log/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-manual-test/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-prune-logs/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-purge/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-refactor/SKILL.md +82 -18
- package/pipeline/skills/shared/core/multi-agent-resume/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-review/SKILL.md +2 -2
- package/pipeline/skills/shared/core/multi-agent-review-issue/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-review-jira/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-routines/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-save/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-scan/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-search/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-setup/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-stack/SKILL.md +3 -3
- package/pipeline/skills/shared/core/multi-agent-status/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-sync/SKILL.md +51 -9
- package/pipeline/skills/shared/core/multi-agent-test/SKILL.md +2 -2
- package/pipeline/skills/shared/core/multi-agent-uninstall/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-update/SKILL.md +1 -1
- package/pipeline/skills/shared/external/accessibility-compliance-accessibility-audit/SKILL.md +1 -1
- package/pipeline/skills/shared/external/agent-introspection-debugging/SKILL.md +4 -4
- package/pipeline/skills/shared/external/agentflow/SKILL.md +1 -1
- package/pipeline/skills/shared/external/android-jetpack-compose-expert/SKILL.md +1 -1
- package/pipeline/skills/shared/external/android_ui_verification/SKILL.md +1 -1
- package/pipeline/skills/shared/external/api-patterns/SKILL.md +1 -1
- package/pipeline/skills/shared/external/api-security-best-practices/SKILL.md +1 -1
- package/pipeline/skills/shared/external/app-store-changelog/SKILL.md +1 -1
- package/pipeline/skills/shared/external/backlog/BACKLOG.md +1 -1
- package/pipeline/skills/shared/external/backlog/SKILL.md +12 -12
- package/pipeline/skills/shared/external/ci-cd-pipelines/SKILL.md +1 -1
- package/pipeline/skills/shared/external/context-compression/SKILL.md +1 -1
- package/pipeline/skills/shared/external/council/SKILL.md +3 -3
- package/pipeline/skills/shared/external/css-modern/SKILL.md +1 -1
- package/pipeline/skills/shared/external/database-patterns/SKILL.md +1 -1
- package/pipeline/skills/shared/external/debugging-strategies/SKILL.md +1 -1
- package/pipeline/skills/shared/external/docker-expert/SKILL.md +1 -1
- package/pipeline/skills/shared/external/fastapi-pro/SKILL.md +1 -1
- package/pipeline/skills/shared/external/firebase/SKILL.md +1 -1
- package/pipeline/skills/shared/external/github-actions-templates/SKILL.md +1 -1
- package/pipeline/skills/shared/external/help-skills/SKILL.md +1 -1
- package/pipeline/skills/shared/external/hig-components-content/SKILL.md +1 -1
- package/pipeline/skills/shared/external/hig-components-layout/SKILL.md +1 -1
- package/pipeline/skills/shared/external/hig-components-status/SKILL.md +1 -1
- package/pipeline/skills/shared/external/hig-components-system/SKILL.md +1 -1
- package/pipeline/skills/shared/external/hig-foundations/SKILL.md +1 -1
- package/pipeline/skills/shared/external/hig-inputs/SKILL.md +1 -1
- package/pipeline/skills/shared/external/hig-patterns/SKILL.md +1 -1
- package/pipeline/skills/shared/external/hig-platforms/SKILL.md +1 -1
- package/pipeline/skills/shared/external/hig-technologies/SKILL.md +1 -1
- package/pipeline/skills/shared/external/html-semantic/SKILL.md +1 -1
- package/pipeline/skills/shared/external/humanizer/SKILL.md +1 -1
- package/pipeline/skills/shared/external/ios-debugger-agent/SKILL.md +1 -1
- package/pipeline/skills/shared/external/ios-developer/SKILL.md +1 -1
- package/pipeline/skills/shared/external/kotlin-coroutines-expert/SKILL.md +1 -1
- package/pipeline/skills/shared/external/macos-menubar-tuist-app/SKILL.md +1 -1
- package/pipeline/skills/shared/external/macos-spm-app-packaging/SKILL.md +1 -1
- package/pipeline/skills/shared/external/monorepo-architect/SKILL.md +1 -1
- package/pipeline/skills/shared/external/nextjs-app-router/SKILL.md +1 -1
- package/pipeline/skills/shared/external/nodejs-backend-patterns/SKILL.md +1 -1
- package/pipeline/skills/shared/external/observability-engineer/SKILL.md +1 -1
- package/pipeline/skills/shared/external/python-patterns/SKILL.md +1 -1
- package/pipeline/skills/shared/external/react-best-practices/SKILL.md +1 -1
- package/pipeline/skills/shared/external/rest-api-design/SKILL.md +1 -1
- package/pipeline/skills/shared/external/search-first/SKILL.md +2 -2
- package/pipeline/skills/shared/external/skill-creator/SKILL.md +12 -12
- package/pipeline/skills/shared/external/skill-creator/audit.md +21 -21
- package/pipeline/skills/shared/external/skill-creator/checklist.md +3 -3
- package/pipeline/skills/shared/external/skill-creator/examples.md +10 -10
- package/pipeline/skills/shared/external/skill-creator/label-check.md +17 -17
- package/pipeline/skills/shared/external/skill-creator/scripts/audit-panel.js +86 -50
- package/pipeline/skills/shared/external/skill-creator/template.md +9 -9
- package/pipeline/skills/shared/external/swift-concurrency-expert/SKILL.md +1 -1
- package/pipeline/skills/shared/external/swiftui-performance-audit/SKILL.md +1 -1
- package/pipeline/skills/shared/external/swiftui-ui-patterns/SKILL.md +1 -1
- package/pipeline/skills/shared/external/swiftui-view-refactor/SKILL.md +1 -1
- package/pipeline/skills/shared/external/tailwind-css/SKILL.md +1 -1
- package/pipeline/skills/shared/external/testing-backend/SKILL.md +1 -1
- package/pipeline/skills/shared/external/typescript-patterns/SKILL.md +1 -1
- package/pipeline/skills/shared/external/vue-composition/SKILL.md +1 -1
- package/pipeline/skills/shared/external/web-accessibility/SKILL.md +1 -1
- package/pipeline/skills/shared/external/web-performance/SKILL.md +1 -1
- package/pipeline/skills/shared/external/web-testing/SKILL.md +1 -1
- package/pipeline/skills/shared/external/xcode-build-benchmark/schemas/build-benchmark.schema.json +9 -49
- package/pipeline/skills/skills-index.md +63 -59
- package/pipeline/scripts/smoke-plugin-validate.sh +0 -64
package/docs/recovery-guide.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# Recovery Guide
|
|
1
|
+
# Recovery Guide - What to Do When Things Break
|
|
2
2
|
|
|
3
3
|
Every failure mode in the pipeline has a deterministic recovery path. This
|
|
4
|
-
guide is a single place to look up "X failed
|
|
4
|
+
guide is a single place to look up "X failed - now what?" instead of chasing
|
|
5
5
|
the answer across `modes.md`, `operations.md`, and the individual phase specs.
|
|
6
6
|
|
|
7
|
-
## Fast Triage
|
|
7
|
+
## Fast Triage - Which Path Do I Need?
|
|
8
8
|
|
|
9
9
|
| Symptom | Jump to |
|
|
10
10
|
| ------------------------------------------------------- | ----------------------------------------------- |
|
|
@@ -49,15 +49,15 @@ so `resume` continues in autopilot.
|
|
|
49
49
|
|
|
50
50
|
Phase 3 retries the build up to **3 times** on each TDD cycle's green step. On
|
|
51
51
|
the 4th consecutive failure the pipeline **pauses** (even in autopilot) and
|
|
52
|
-
surfaces the error. Autopilot does not loop infinitely
|
|
52
|
+
surfaces the error. Autopilot does not loop infinitely - this is intentional.
|
|
53
53
|
|
|
54
54
|
Path forward:
|
|
55
55
|
|
|
56
|
-
1. Read the last 20 lines of `agent-log.md`
|
|
56
|
+
1. Read the last 20 lines of `agent-log.md` - the root cause is usually there.
|
|
57
57
|
2. If the failure is environmental (missing Xcode sim, wrong JDK), fix the
|
|
58
|
-
environment and `resume`
|
|
58
|
+
environment and `resume` - the 3-retry counter resets.
|
|
59
59
|
3. If the failure is logic (compile error in the generated code), edit the
|
|
60
|
-
offending file in the worktree, then `resume`
|
|
60
|
+
offending file in the worktree, then `resume` - Phase 3 re-runs build.
|
|
61
61
|
4. If the task itself is wrong-shaped (Phase 2 plan is infeasible), `kill` and
|
|
62
62
|
restart with a better-scoped prompt.
|
|
63
63
|
|
|
@@ -76,14 +76,14 @@ Path forward:
|
|
|
76
76
|
|
|
77
77
|
If exit 1 fires twice (fallback path):
|
|
78
78
|
|
|
79
|
-
1. The pipeline logs `Phase 4: triage failed twice
|
|
79
|
+
1. The pipeline logs `Phase 4: triage failed twice - fallback, all findings accepted as blocking`.
|
|
80
80
|
2. All raw findings loop back into Phase 3 as if they were all real blockers.
|
|
81
|
-
3. This is intentionally conservative
|
|
81
|
+
3. This is intentionally conservative - we'd rather over-fix than skip
|
|
82
82
|
something real. You can manually mark noise in the Phase 6 PR description.
|
|
83
83
|
|
|
84
84
|
## Over-Rejection Guard
|
|
85
85
|
|
|
86
|
-
Exit code 2 means triage rejected >80% of findings, which is suspicious
|
|
86
|
+
Exit code 2 means triage rejected >80% of findings, which is suspicious - it
|
|
87
87
|
often indicates the triage prompt lost the task context. Pipeline halts and
|
|
88
88
|
asks a human to look at the raw findings vs triage output.
|
|
89
89
|
|
|
@@ -92,9 +92,9 @@ asks a human to look at the raw findings vs triage output.
|
|
|
92
92
|
- Open `agent-log.md`, find the triage invocation.
|
|
93
93
|
- Compare raw findings (logged) with rejected items.
|
|
94
94
|
- If the rejections are correct, run `resume` with `--accept-overrejection` (Phase 4 re-enters validation with the guard soft-failed).
|
|
95
|
-
- If not, run `resume`
|
|
95
|
+
- If not, run `resume` - Phase 4 re-runs triage with the guard still active.
|
|
96
96
|
|
|
97
|
-
Autopilot behavior: logs the warning, accepts the triage output, continues
|
|
97
|
+
Autopilot behavior: logs the warning, accepts the triage output, continues -
|
|
98
98
|
the autopilot contract values throughput over human-in-loop.
|
|
99
99
|
|
|
100
100
|
---
|
|
@@ -104,13 +104,13 @@ the autopilot contract values throughput over human-in-loop.
|
|
|
104
104
|
Phase 0 creates `.worktrees/{jiraId}`. If that path already exists:
|
|
105
105
|
|
|
106
106
|
```bash
|
|
107
|
-
# Option A
|
|
107
|
+
# Option A - resume the previous run
|
|
108
108
|
/multi-agent:resume #N
|
|
109
109
|
|
|
110
|
-
# Option B
|
|
110
|
+
# Option B - delete the stale worktree
|
|
111
111
|
/multi-agent:kill #N # asks to confirm, removes worktree + branch
|
|
112
112
|
|
|
113
|
-
# Option C
|
|
113
|
+
# Option C - manual cleanup
|
|
114
114
|
git worktree list # find stale entries
|
|
115
115
|
git worktree remove .worktrees/{jiraId} # safe if no uncommitted work
|
|
116
116
|
git worktree prune # drop any dead refs
|
|
@@ -134,13 +134,13 @@ at Phase 0 load. If validation fails:
|
|
|
134
134
|
1. Back up the file: `cp agent-state.json agent-state.json.bak`.
|
|
135
135
|
2. Try `node pipeline/scripts/validate-schemas.mjs` to identify the violation.
|
|
136
136
|
3. Common fixes:
|
|
137
|
-
- **Missing required field**
|
|
138
|
-
- **Bad enum value**
|
|
139
|
-
- **`lastUpdated` not ISO-8601**
|
|
137
|
+
- **Missing required field** - add the default per the schema description.
|
|
138
|
+
- **Bad enum value** - check `phase.status` and `taskType` enums.
|
|
139
|
+
- **`lastUpdated` not ISO-8601** - regenerate with `date -u +"%Y-%m-%dT%H:%M:%SZ"`.
|
|
140
140
|
4. If the file is irrecoverable, `kill` the task and restart. State loss for
|
|
141
141
|
a single task is recoverable; corruption bleeding into the next run is not.
|
|
142
142
|
|
|
143
|
-
To prevent future corruption, use the atomic writer
|
|
143
|
+
To prevent future corruption, use the atomic writer - never write state with
|
|
144
144
|
shell `echo > agent-state.json`:
|
|
145
145
|
|
|
146
146
|
```bash
|
|
@@ -177,7 +177,7 @@ files for hardcoded secrets and blocks the commit if any are found.
|
|
|
177
177
|
|
|
178
178
|
If the hit is a **real secret**:
|
|
179
179
|
|
|
180
|
-
1. `git reset HEAD {file}`
|
|
180
|
+
1. `git reset HEAD {file}` - unstage.
|
|
181
181
|
2. Move the secret to env / keychain / secret manager.
|
|
182
182
|
3. Re-stage the cleaned file and commit.
|
|
183
183
|
|
|
@@ -186,7 +186,7 @@ If the hit is a **false positive** (e.g. an example string in docs):
|
|
|
186
186
|
1. Rename the variable so the pattern doesn't match
|
|
187
187
|
(`EXAMPLE_API_KEY` not `api_key=`).
|
|
188
188
|
2. Or, for documentation, break the pattern with a zero-width marker.
|
|
189
|
-
3. Never `--no-verify` to bypass
|
|
189
|
+
3. Never `--no-verify` to bypass - that's how real secrets slip through.
|
|
190
190
|
|
|
191
191
|
---
|
|
192
192
|
|
|
@@ -219,7 +219,7 @@ cat .worktrees/{id}/agent-state.json | grep status
|
|
|
219
219
|
is missing on disk. Phase 6 logs an error, sets
|
|
220
220
|
`state.instructionDrivenFallback=true`, and uses the standard commit path.
|
|
221
221
|
|
|
222
|
-
This is rarely fatal
|
|
222
|
+
This is rarely fatal - usually the instruction file was removed between
|
|
223
223
|
sessions or the wrong path was cached. To recover cleanly:
|
|
224
224
|
|
|
225
225
|
1. Check whether the intended instruction file still exists somewhere:
|
|
@@ -257,7 +257,7 @@ git push origin v{version} --force # only if tag was never consumed
|
|
|
257
257
|
```
|
|
258
258
|
|
|
259
259
|
If the tag has already been consumed (release CI ran), bump to the next patch
|
|
260
|
-
version and tag fresh
|
|
260
|
+
version and tag fresh - never re-publish a consumed version.
|
|
261
261
|
|
|
262
262
|
---
|
|
263
263
|
|
|
@@ -271,7 +271,7 @@ with `fatal: not a git repository`.
|
|
|
271
271
|
Fix:
|
|
272
272
|
|
|
273
273
|
```bash
|
|
274
|
-
# Inspect git's worktree registry
|
|
274
|
+
# Inspect git's worktree registry - the source of truth
|
|
275
275
|
git worktree list --porcelain | grep -A 2 "<task-id>"
|
|
276
276
|
|
|
277
277
|
# If the path is missing but git still tracks it (common when a stale .git/worktrees/<id>/
|
|
@@ -301,8 +301,8 @@ safest path is `kill` the task (preserves logs + branch) and restart with
|
|
|
301
301
|
|
|
302
302
|
## Tracker State Corruption (v8.0.0)
|
|
303
303
|
|
|
304
|
-
`phase-tracker.sh render` returns garbage
|
|
305
|
-
elapsed/token fields, JSON parse errors
|
|
304
|
+
`phase-tracker.sh render` returns garbage - duplicate phases, missing
|
|
305
|
+
elapsed/token fields, JSON parse errors - even though the task is healthy.
|
|
306
306
|
Usually caused by a manual edit to `tracker-state.json` or a partial write
|
|
307
307
|
mid-update.
|
|
308
308
|
|
|
@@ -330,7 +330,7 @@ grep -E '^## Phase [0-9]+:' "$HOME/.claude/logs/multi-agent/<project>/<task-id>/
|
|
|
330
330
|
done
|
|
331
331
|
```
|
|
332
332
|
|
|
333
|
-
Token counts are not recoverable from the log
|
|
333
|
+
Token counts are not recoverable from the log - those start fresh after a
|
|
334
334
|
reinit. A footnote in `agent-log.md` documenting the rebuild is good practice.
|
|
335
335
|
|
|
336
336
|
---
|
|
@@ -362,7 +362,7 @@ echo "$NEW_TOKEN" | secret-tool store --label="$LABEL" account "$ACCOUNT" servic
|
|
|
362
362
|
# 2. Sanity-check the doctor reports the new token's prefix
|
|
363
363
|
bash pipeline/lib/credential-store.sh doctor
|
|
364
364
|
|
|
365
|
-
# 3. Resume the pipeline
|
|
365
|
+
# 3. Resume the pipeline - Phase 6/7 re-resolve the token on each invocation,
|
|
366
366
|
# so no state edit is required.
|
|
367
367
|
/multi-agent:resume <task-id>
|
|
368
368
|
```
|
|
@@ -370,7 +370,7 @@ bash pipeline/lib/credential-store.sh doctor
|
|
|
370
370
|
If the rotated token was Vercel, also run `bash pipeline/lib/vercel-deploy.sh
|
|
371
371
|
doctor` to confirm the wrapper sees the new value before retrying any deploy.
|
|
372
372
|
|
|
373
|
-
**Never** copy-paste the new token into a `--token=` argv to test it
|
|
373
|
+
**Never** copy-paste the new token into a `--token=` argv to test it - see
|
|
374
374
|
`pipeline/lib/vercel-deploy.sh` for why this is forbidden.
|
|
375
375
|
|
|
376
376
|
---
|
|
@@ -378,12 +378,12 @@ doctor` to confirm the wrapper sees the new value before retrying any deploy.
|
|
|
378
378
|
## Author Rewrite + Tag Re-Sync (v8.0.0)
|
|
379
379
|
|
|
380
380
|
A series of commits (and any tags pointing at them) were authored under the
|
|
381
|
-
wrong identity
|
|
381
|
+
wrong identity - typically because someone passed `git -c user.email=...` or
|
|
382
382
|
the repo-local config drifted. Vercel / npm / GitHub team-membership gates
|
|
383
383
|
then reject the push because the author email is not a recognized contributor.
|
|
384
384
|
|
|
385
385
|
This is the v7.9.1 release-window incident verbatim: 7 commits across
|
|
386
|
-
v7.7.0
|
|
386
|
+
v7.7.0-v7.9.1 plus 4 annotated tags shipped with the wrong author. Recovery
|
|
387
387
|
required a rebase + retag dance.
|
|
388
388
|
|
|
389
389
|
```bash
|
|
@@ -396,7 +396,7 @@ git config user.name "You"
|
|
|
396
396
|
|
|
397
397
|
# 2. Find the first wrong commit (the one BEFORE the rebase rewrites everything):
|
|
398
398
|
git log --format='%h %ae %s' main..HEAD | grep -i "wrong-email-pattern" | tail -1
|
|
399
|
-
# Grab its parent SHA
|
|
399
|
+
# Grab its parent SHA - that's your --onto target.
|
|
400
400
|
PARENT_OF_FIRST_WRONG=<sha>
|
|
401
401
|
|
|
402
402
|
# 3. Rebase with --reset-author to rewrite every commit since that point.
|
|
@@ -419,13 +419,13 @@ NEW_SHA=$(git log --format=%H --grep="<commit-subject-or-marker>" -1)
|
|
|
419
419
|
git tag -d "$TAG"
|
|
420
420
|
git tag -a "$TAG" "$NEW_SHA" -m "$(git tag -l --format='%(contents)' "$TAG-old" 2>/dev/null || echo "$TAG release")"
|
|
421
421
|
|
|
422
|
-
# 6b. Remote tag
|
|
422
|
+
# 6b. Remote tag - DELETE then PUSH (no atomic option for tag content rewrite):
|
|
423
423
|
git push origin :refs/tags/"$TAG"
|
|
424
424
|
git push origin "$TAG"
|
|
425
425
|
|
|
426
426
|
# 7. If a CI release pipeline already consumed the OLD tag SHA (npm publish,
|
|
427
427
|
# GitHub Release creation), the published artifact stays attached to the
|
|
428
|
-
# deleted SHA. You CANNOT rewrite published packages
|
|
428
|
+
# deleted SHA. You CANNOT rewrite published packages - bump the patch
|
|
429
429
|
# version and ship a fresh release instead. Document the orphan in the
|
|
430
430
|
# CHANGELOG with a "yanked" note.
|
|
431
431
|
```
|
|
@@ -438,7 +438,7 @@ new SHA, or accept the orphan and document it.
|
|
|
438
438
|
**npm publish gotcha:** if `npm publish` ran against the wrong-author tag,
|
|
439
439
|
the package is permanently anchored to that SHA on the registry. Bump the
|
|
440
440
|
patch version (`npm version patch --no-git-tag-version`), commit, push,
|
|
441
|
-
publish
|
|
441
|
+
publish - never `npm unpublish` (registry blocks unpublish for stable
|
|
442
442
|
versions).
|
|
443
443
|
|
|
444
444
|
---
|
|
@@ -452,9 +452,9 @@ Decision tree:
|
|
|
452
452
|
|
|
453
453
|
| Condition | Safe action |
|
|
454
454
|
|---|---|
|
|
455
|
-
| Remote ahead
|
|
456
|
-
| Hook rejected (lint / signing / size) | Fix locally, amend or new commit, retry push
|
|
457
|
-
| Branch protection (review count) | Push to a new branch with `-u`, open PR
|
|
455
|
+
| Remote ahead - someone pushed to the same branch | `git pull --rebase origin <branch>`, replay the commit, retry push |
|
|
456
|
+
| Hook rejected (lint / signing / size) | Fix locally, amend or new commit, retry push - NEVER `--no-verify` |
|
|
457
|
+
| Branch protection (review count) | Push to a new branch with `-u`, open PR - do NOT `--force` |
|
|
458
458
|
| Author rewrite needed (wrong identity, see `feedback_git_author_repo_local.md`) | `git rebase --reset-author`, `git push --force-with-lease`, NOT `--force` |
|
|
459
459
|
|
|
460
460
|
Force-with-lease is the only acceptable force variant: it refuses to push if
|
|
@@ -463,7 +463,7 @@ overwrites their work.
|
|
|
463
463
|
|
|
464
464
|
Bitbucket-specific: a force-push wipes default reviewers if the PR description
|
|
465
465
|
PUT happens before reviewers re-attach. The `channels.md` adapter's
|
|
466
|
-
reviewer-preserving payload handles this
|
|
466
|
+
reviewer-preserving payload handles this - never `gh pr edit --body` on a
|
|
467
467
|
Bitbucket PR after a force-push without re-reading the reviewer list first.
|
|
468
468
|
|
|
469
469
|
---
|
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* multi-agent-pipeline
|
|
4
|
+
* multi-agent-pipeline - 8-phase AI development pipeline
|
|
5
5
|
*
|
|
6
6
|
* Supports: Claude Code, Copilot CLI
|
|
7
7
|
* Install: npx @mmerterden/multi-agent-pipeline install
|
|
@@ -36,10 +36,16 @@ if (command === "--version" || command === "-v" || command === "version") {
|
|
|
36
36
|
} else if (!command || command === "install") {
|
|
37
37
|
await import(pathToFileURL(join(__dirname, "install.js")).href);
|
|
38
38
|
} else if (command === "uninstall" || command === "delete") {
|
|
39
|
-
await import(
|
|
39
|
+
const { main } = await import(
|
|
40
|
+
pathToFileURL(join(__dirname, "pipeline", "scripts", "uninstall.mjs")).href
|
|
41
|
+
);
|
|
42
|
+
await main().catch((e) => {
|
|
43
|
+
console.error("uninstall failed:", e.message);
|
|
44
|
+
process.exit(1);
|
|
45
|
+
});
|
|
40
46
|
} else if (command === "help") {
|
|
41
47
|
console.log(`
|
|
42
|
-
multi-agent-pipeline
|
|
48
|
+
multi-agent-pipeline - 8-phase AI development pipeline
|
|
43
49
|
|
|
44
50
|
Install:
|
|
45
51
|
npx @mmerterden/multi-agent-pipeline install Install for Claude Code (default)
|
|
@@ -47,7 +53,7 @@ if (command === "--version" || command === "-v" || command === "version") {
|
|
|
47
53
|
npx @mmerterden/multi-agent-pipeline install --all Both Claude + Copilot
|
|
48
54
|
npx @mmerterden/multi-agent-pipeline install --link Use symlinks (saves tokens, dev mode)
|
|
49
55
|
|
|
50
|
-
Uninstall (token-preserving
|
|
56
|
+
Uninstall (token-preserving - Keychain/Credential Manager untouched):
|
|
51
57
|
npx @mmerterden/multi-agent-pipeline uninstall Interactive: remove from all installed targets
|
|
52
58
|
npx @mmerterden/multi-agent-pipeline uninstall --yes Skip prompt
|
|
53
59
|
npx @mmerterden/multi-agent-pipeline uninstall --dry-run Report what would be removed
|
|
@@ -65,7 +71,7 @@ if (command === "--version" || command === "-v" || command === "version") {
|
|
|
65
71
|
|
|
66
72
|
After installation:
|
|
67
73
|
Claude Code: /multi-agent "MOBILE-123"
|
|
68
|
-
Copilot CLI: Describe your task naturally
|
|
74
|
+
Copilot CLI: Describe your task naturally - pipeline instructions are loaded
|
|
69
75
|
|
|
70
76
|
More info: https://github.com/mmerterden/multi-agent-pipeline
|
|
71
77
|
`);
|
package/install/_common.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Shared filesystem helpers for install/* modules.
|
|
3
3
|
*
|
|
4
4
|
* These primitives are 1:1 ports of the helpers that lived inline in the
|
|
5
|
-
* pre-v8.0.0 monolithic install.js. Behaviour MUST stay byte-equivalent
|
|
5
|
+
* pre-v8.0.0 monolithic install.js. Behaviour MUST stay byte-equivalent -
|
|
6
6
|
* the install layout smoke test (smoke-install-layout.sh) compares before/after
|
|
7
7
|
* trees and fails on any drift.
|
|
8
8
|
*
|
|
@@ -166,15 +166,9 @@ export function copyDir(src, dest, opts = {}) {
|
|
|
166
166
|
filter: (source) => {
|
|
167
167
|
// Normalize to forward slashes so exclude patterns (written posix-style)
|
|
168
168
|
// also match on win32, where cpSync hands back backslash paths.
|
|
169
|
-
const rel = source
|
|
170
|
-
.slice(src.length)
|
|
171
|
-
.split("\\")
|
|
172
|
-
.join("/")
|
|
173
|
-
.replace(/^\//, "");
|
|
169
|
+
const rel = source.slice(src.length).split("\\").join("/").replace(/^\//, "");
|
|
174
170
|
return !exclude.some((pat) =>
|
|
175
|
-
typeof pat === "string"
|
|
176
|
-
? rel === pat || rel.startsWith(pat + "/")
|
|
177
|
-
: pat.test(rel),
|
|
171
|
+
typeof pat === "string" ? rel === pat || rel.startsWith(pat + "/") : pat.test(rel),
|
|
178
172
|
);
|
|
179
173
|
},
|
|
180
174
|
});
|
|
@@ -214,7 +208,7 @@ export function symlinkDir(src, dest) {
|
|
|
214
208
|
/**
|
|
215
209
|
* Remove `multi-agent-*` skill directories from the given skills root.
|
|
216
210
|
*
|
|
217
|
-
* Used on the Claude Code side only
|
|
211
|
+
* Used on the Claude Code side only - these skills duplicate the
|
|
218
212
|
* `/multi-agent:*` slash commands living under `~/.claude/commands/multi-agent/`,
|
|
219
213
|
* causing the slash-command picker to show two identical entries per command.
|
|
220
214
|
* Copilot CLI has no slash-command infrastructure, so these skills stay there.
|
|
@@ -303,7 +297,7 @@ export function countFiles(dir) {
|
|
|
303
297
|
}
|
|
304
298
|
|
|
305
299
|
/**
|
|
306
|
-
* Wipe a managed directory tree before copy. Non-fatal on permission errors
|
|
300
|
+
* Wipe a managed directory tree before copy. Non-fatal on permission errors -
|
|
307
301
|
* surfaces as a follow-up copy-over with stale entries kept, which is still
|
|
308
302
|
* better than a hard install failure.
|
|
309
303
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copilot CLI instructions block
|
|
2
|
+
* Copilot CLI instructions block - read from a Markdown source file.
|
|
3
3
|
*
|
|
4
4
|
* Pre-v8.0.0 (and through the v8.0.0 initial split) this module was 224
|
|
5
5
|
* lines of `content += "..."` string concatenation. v8.0.0 follow-up moved
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* prettier, diffs cleanly) instead of escaped JavaScript template literals.
|
|
9
9
|
*
|
|
10
10
|
* The smoke `smoke-multi-repo-integration.sh` greps this module's output
|
|
11
|
-
* for canonical strings
|
|
11
|
+
* for canonical strings - that contract is preserved because we still
|
|
12
12
|
* expose `generateCopilotInstructions()` with the same return shape.
|
|
13
13
|
*
|
|
14
14
|
* @module install/_copilot-instructions
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
export const DEV_ONLY_SCRIPTS = Object.freeze([
|
|
13
13
|
"smoke-figma-config-schema.sh",
|
|
14
14
|
"smoke-personal-data.sh", // scanner contains the patterns it detects
|
|
15
|
-
"smoke-install-leak-gate.sh", // same
|
|
15
|
+
"smoke-install-leak-gate.sh", // same - scanner shadows the install pipeline
|
|
16
|
+
"validate-prefs.mjs", // needs ajv (devDependency); end users have no node_modules here
|
|
16
17
|
"fixtures", // smoke test fixtures live in the repo only, never ship to users
|
|
17
18
|
]);
|
|
@@ -12,7 +12,7 @@ import { join } from "path";
|
|
|
12
12
|
import { copyDir, countFiles, ensureDir } from "./_common.mjs";
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* Heuristic prefix lists
|
|
15
|
+
* Heuristic prefix lists - intentionally loose so new skills added to
|
|
16
16
|
* `shared/external/` are classified by name (no manifest required). A skill
|
|
17
17
|
* that doesn't match either list is treated as "generic" and copies for every
|
|
18
18
|
* platform.
|
package/install/_telemetry.mjs
CHANGED
package/install/claude.mjs
CHANGED
|
@@ -196,7 +196,7 @@ function installScripts(pipelineSrc, dest, useSymlinks) {
|
|
|
196
196
|
const scriptsSrc = join(pipelineSrc, "scripts");
|
|
197
197
|
if (!existsSync(scriptsSrc)) return;
|
|
198
198
|
|
|
199
|
-
// Wipe-before-copy
|
|
199
|
+
// Wipe-before-copy - scripts/ is a 100% pipeline-managed tree, so files
|
|
200
200
|
// removed upstream should not linger.
|
|
201
201
|
if (!useSymlinks) ensureRealDir(dest);
|
|
202
202
|
wipeDir(dest);
|
|
@@ -204,11 +204,12 @@ function installScripts(pipelineSrc, dest, useSymlinks) {
|
|
|
204
204
|
// Count files actually excluded, not the array length: DEV_ONLY_SCRIPTS mixes
|
|
205
205
|
// individual .sh files with the `fixtures` directory (many files), so the
|
|
206
206
|
// array length under-counts the real exclusion.
|
|
207
|
-
const excludedCount = DEV_ONLY_SCRIPTS.reduce(
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
` -> ${scriptCount} files copied to ${dest} (${excludedCount} dev-only excluded)`,
|
|
207
|
+
const excludedCount = DEV_ONLY_SCRIPTS.reduce(
|
|
208
|
+
(n, name) => n + countFiles(join(scriptsSrc, name)),
|
|
209
|
+
0,
|
|
211
210
|
);
|
|
211
|
+
const scriptCount = countFiles(scriptsSrc) - excludedCount;
|
|
212
|
+
console.log(` -> ${scriptCount} files copied to ${dest} (${excludedCount} dev-only excluded)`);
|
|
212
213
|
}
|
|
213
214
|
|
|
214
215
|
function installAgents(pipelineSrc, dest, useSymlinks) {
|
|
@@ -249,7 +250,7 @@ function installSchemas(pipelineSrc, dest, useSymlinks) {
|
|
|
249
250
|
console.log(" [Claude Code] Installing JSON schemas...");
|
|
250
251
|
const schemasSrc = join(pipelineSrc, "schemas");
|
|
251
252
|
if (!existsSync(schemasSrc)) return;
|
|
252
|
-
// Wipe-before-copy
|
|
253
|
+
// Wipe-before-copy - schemas/ is a 100% pipeline-managed tree, so files
|
|
253
254
|
// removed upstream should not linger.
|
|
254
255
|
if (!useSymlinks) ensureRealDir(dest);
|
|
255
256
|
wipeDir(dest);
|
|
@@ -261,7 +262,7 @@ function installLib(pipelineSrc, dest, useSymlinks) {
|
|
|
261
262
|
console.log(" [Claude Code] Installing shell libraries...");
|
|
262
263
|
const libSrc = join(pipelineSrc, "lib");
|
|
263
264
|
if (!existsSync(libSrc)) return;
|
|
264
|
-
// Wipe-before-copy
|
|
265
|
+
// Wipe-before-copy - lib/ is a 100% pipeline-managed tree.
|
|
265
266
|
if (!useSymlinks) ensureRealDir(dest);
|
|
266
267
|
wipeDir(dest);
|
|
267
268
|
copyDir(libSrc, dest, { useSymlinks });
|
|
@@ -269,7 +270,7 @@ function installLib(pipelineSrc, dest, useSymlinks) {
|
|
|
269
270
|
}
|
|
270
271
|
|
|
271
272
|
function runPreDeployScans(pipelineSrc) {
|
|
272
|
-
// Pre-deploy security scan
|
|
273
|
+
// Pre-deploy security scan - warn-only, never halts install on its own.
|
|
273
274
|
const scanScript = join(pipelineSrc, "scripts", "scan-skills.sh");
|
|
274
275
|
if (existsSync(scanScript)) {
|
|
275
276
|
try {
|
|
@@ -286,7 +287,7 @@ function runPreDeployScans(pipelineSrc) {
|
|
|
286
287
|
}
|
|
287
288
|
}
|
|
288
289
|
|
|
289
|
-
// Pre-deploy manifest verify (v6.2.H)
|
|
290
|
+
// Pre-deploy manifest verify (v6.2.H) - warn-only.
|
|
290
291
|
const verifyScript = join(pipelineSrc, "scripts", "verify-skills.sh");
|
|
291
292
|
if (existsSync(verifyScript)) {
|
|
292
293
|
try {
|
package/install/copilot.mjs
CHANGED
|
@@ -8,13 +8,7 @@
|
|
|
8
8
|
* @module install/copilot
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import {
|
|
12
|
-
existsSync,
|
|
13
|
-
mkdirSync,
|
|
14
|
-
readdirSync,
|
|
15
|
-
readFileSync,
|
|
16
|
-
rmSync,
|
|
17
|
-
} from "fs";
|
|
11
|
+
import { existsSync, mkdirSync, readdirSync, readFileSync, rmSync } from "fs";
|
|
18
12
|
import { join } from "path";
|
|
19
13
|
|
|
20
14
|
import {
|
|
@@ -72,8 +66,7 @@ export const INSTRUCTIONS_START_MARKER = "# Multi-Agent Development Pipeline";
|
|
|
72
66
|
* pipeline section survives. Pre-marker files fall back to
|
|
73
67
|
* `legacyTrailingContent` bounding.
|
|
74
68
|
*/
|
|
75
|
-
export const INSTRUCTIONS_END_MARKER =
|
|
76
|
-
"<!-- multi-agent-pipeline:copilot-instructions:end -->";
|
|
69
|
+
export const INSTRUCTIONS_END_MARKER = "<!-- multi-agent-pipeline:copilot-instructions:end -->";
|
|
77
70
|
|
|
78
71
|
/**
|
|
79
72
|
* Legacy files (written before the end marker existed) have no explicit
|
|
@@ -101,8 +94,7 @@ export function legacyTrailingContent(section) {
|
|
|
101
94
|
|
|
102
95
|
function writeInstructionsFile(path) {
|
|
103
96
|
const pipelineSection = generateCopilotInstructions();
|
|
104
|
-
const managedBlock =
|
|
105
|
-
pipelineSection.trimEnd() + "\n\n" + INSTRUCTIONS_END_MARKER + "\n";
|
|
97
|
+
const managedBlock = pipelineSection.trimEnd() + "\n\n" + INSTRUCTIONS_END_MARKER + "\n";
|
|
106
98
|
|
|
107
99
|
if (!existsSync(path)) {
|
|
108
100
|
writeFile(path, managedBlock);
|
|
@@ -118,7 +110,7 @@ function writeInstructionsFile(path) {
|
|
|
118
110
|
// Orchestrator", "## Instruction Sync") were written by older install
|
|
119
111
|
// scripts and now contradict the current generator output.
|
|
120
112
|
//
|
|
121
|
-
// Match strategy: end at EXPLICIT next-section markers
|
|
113
|
+
// Match strategy: end at EXPLICIT next-section markers - either the
|
|
122
114
|
// pipeline marker itself, or a known user-preserved heading. Using a
|
|
123
115
|
// generic `\n## ` sentinel is unsafe because bash code fences inside the
|
|
124
116
|
// body contain lines like `# Personal repos` which would be mistaken for
|
|
@@ -128,9 +120,7 @@ function writeInstructionsFile(path) {
|
|
|
128
120
|
const orchestratorRe = new RegExp(
|
|
129
121
|
"\\n---\\n+## Multi-Agent Task Orchestrator[\\s\\S]*?" + nextSectionEnd,
|
|
130
122
|
);
|
|
131
|
-
const instructionSyncRe = new RegExp(
|
|
132
|
-
"\\n---\\n+## Instruction Sync[\\s\\S]*?" + nextSectionEnd,
|
|
133
|
-
);
|
|
123
|
+
const instructionSyncRe = new RegExp("\\n---\\n+## Instruction Sync[\\s\\S]*?" + nextSectionEnd);
|
|
134
124
|
|
|
135
125
|
let cleaned = false;
|
|
136
126
|
if (orchestratorRe.test(existing)) {
|
|
@@ -179,11 +169,12 @@ function installScripts(pipelineSrc, dest, useSymlinks) {
|
|
|
179
169
|
// Count files actually excluded, not the array length: DEV_ONLY_SCRIPTS mixes
|
|
180
170
|
// individual .sh files with the `fixtures` directory (many files), so the
|
|
181
171
|
// array length under-counts the real exclusion.
|
|
182
|
-
const excludedCount = DEV_ONLY_SCRIPTS.reduce(
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
` -> ${scriptCount} files copied to ${dest} (${excludedCount} dev-only excluded)`,
|
|
172
|
+
const excludedCount = DEV_ONLY_SCRIPTS.reduce(
|
|
173
|
+
(n, name) => n + countFiles(join(scriptsSrc, name)),
|
|
174
|
+
0,
|
|
186
175
|
);
|
|
176
|
+
const scriptCount = countFiles(scriptsSrc) - excludedCount;
|
|
177
|
+
console.log(` -> ${scriptCount} files copied to ${dest} (${excludedCount} dev-only excluded)`);
|
|
187
178
|
}
|
|
188
179
|
|
|
189
180
|
function installAgents(pipelineSrc, dest, useSymlinks) {
|
package/install/index.mjs
CHANGED
|
@@ -39,18 +39,12 @@ export async function runInstall(argv) {
|
|
|
39
39
|
process.exit(1);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
// Parse flags
|
|
42
|
+
// Parse flags - tolerate both invocation styles:
|
|
43
43
|
// `node install.js --all` (direct, argv[2]="--all")
|
|
44
44
|
// `multi-agent-pipeline install --all` (via bin, argv[2]="install")
|
|
45
45
|
const flags = argv.slice(2).filter((a) => a !== "install");
|
|
46
46
|
|
|
47
|
-
const KNOWN_FLAGS = [
|
|
48
|
-
...TOOL_FLAGS,
|
|
49
|
-
"--all",
|
|
50
|
-
"--link",
|
|
51
|
-
"--index-only",
|
|
52
|
-
"--dry-run",
|
|
53
|
-
];
|
|
47
|
+
const KNOWN_FLAGS = [...TOOL_FLAGS, "--all", "--link", "--index-only", "--dry-run"];
|
|
54
48
|
const KNOWN_PREFIXES = ["--target=", "--platform="];
|
|
55
49
|
const unknown = flags.filter(
|
|
56
50
|
(f) =>
|
|
@@ -69,11 +63,9 @@ export async function runInstall(argv) {
|
|
|
69
63
|
const dryRun = flags.includes("--dry-run");
|
|
70
64
|
setDryRun(dryRun);
|
|
71
65
|
|
|
72
|
-
const isExplicitlyTargeted =
|
|
73
|
-
flags.some((f) => TOOL_FLAGS.includes(f)) || flags.includes("--all");
|
|
66
|
+
const isExplicitlyTargeted = flags.some((f) => TOOL_FLAGS.includes(f)) || flags.includes("--all");
|
|
74
67
|
|
|
75
|
-
const forClaude =
|
|
76
|
-
flags.includes("--claude") || flags.includes("--all") || !isExplicitlyTargeted;
|
|
68
|
+
const forClaude = flags.includes("--claude") || flags.includes("--all") || !isExplicitlyTargeted;
|
|
77
69
|
|
|
78
70
|
const forCopilot = flags.includes("--copilot") || flags.includes("--all");
|
|
79
71
|
|
|
@@ -104,7 +96,7 @@ export async function runInstall(argv) {
|
|
|
104
96
|
|
|
105
97
|
if (dryRun) {
|
|
106
98
|
console.log("");
|
|
107
|
-
console.log(" Dry-run complete
|
|
99
|
+
console.log(" Dry-run complete - nothing was written. Re-run without --dry-run to install.");
|
|
108
100
|
console.log("");
|
|
109
101
|
return;
|
|
110
102
|
}
|
|
@@ -151,7 +143,7 @@ function parsePlatformFlag(flags) {
|
|
|
151
143
|
const value = raw.slice("--platform=".length).toLowerCase();
|
|
152
144
|
if (value === "ios" || value === "android" || value === "all") return value;
|
|
153
145
|
console.error(
|
|
154
|
-
` [warn] unrecognized --platform value: "${value}"
|
|
146
|
+
` [warn] unrecognized --platform value: "${value}" - falling back to "all". ` +
|
|
155
147
|
`Accepted: ios | android | all.`,
|
|
156
148
|
);
|
|
157
149
|
return "all";
|
|
@@ -173,7 +165,7 @@ function printSummary(opts) {
|
|
|
173
165
|
if (forCopilot) {
|
|
174
166
|
console.log(" Copilot CLI:");
|
|
175
167
|
console.log(" Pipeline instructions loaded into ~/.copilot/copilot-instructions.md");
|
|
176
|
-
console.log(" Just describe your task
|
|
168
|
+
console.log(" Just describe your task - Copilot will follow the pipeline");
|
|
177
169
|
console.log("");
|
|
178
170
|
}
|
|
179
171
|
|