@mmerterden/multi-agent-pipeline 12.6.0 → 12.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +209 -0
- package/README.md +18 -18
- 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 +28 -28
- package/docs/performance.md +16 -16
- package/docs/recovery-guide.md +39 -39
- package/index.js +4 -4
- package/install/_common.mjs +53 -11
- package/install/_copilot-instructions.mjs +2 -2
- package/install/_dev-only-files.mjs +126 -6
- package/install/_platform-filter.mjs +1 -1
- package/install/_telemetry.mjs +1 -1
- package/install/claude.mjs +20 -13
- package/install/copilot.mjs +11 -23
- package/install/index.mjs +7 -15
- package/install/templates/copilot-instructions.md +54 -54
- package/install.js +1 -1
- package/package.json +29 -11
- package/pipeline/commands/multi-agent/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/analysis/SKILL.md +2 -2
- 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 +1 -1
- 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 +3 -3
- 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 +16 -8
- package/pipeline/commands/multi-agent/resume/SKILL.md +2 -2
- package/pipeline/commands/multi-agent/review/SKILL.md +1 -1
- 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 +5 -5
- package/pipeline/commands/multi-agent/test/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/uninstall/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/update/SKILL.md +3 -3
- 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 +21 -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/_account-picker.md +1 -1
- package/pipeline/multi-agent-refs/_dev-context.md +1 -1
- package/pipeline/multi-agent-refs/_repo-picker.md +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 +1 -1
- package/pipeline/multi-agent-refs/features/model-fallback.md +2 -2
- package/pipeline/multi-agent-refs/phases/operations.md +28 -0
- package/pipeline/multi-agent-refs/phases/phase-0-init.md +1 -0
- package/pipeline/multi-agent-refs/phases/phase-2-planning.md +1 -1
- package/pipeline/multi-agent-refs/phases/phase-3-dev.md +1 -2
- package/pipeline/multi-agent-refs/phases/phase-4-review.md +50 -5
- package/pipeline/preferences-template.json +5 -11
- package/pipeline/schemas/agent-state.schema.json +39 -9
- 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 +32 -11
- 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/plan-todos.schema.json +6 -3
- package/pipeline/schemas/planning-output.schema.json +5 -1
- package/pipeline/schemas/prefs.schema.json +97 -229
- 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/_smoke-root.sh +61 -0
- package/pipeline/scripts/aggregate-metrics.mjs +18 -6
- package/pipeline/scripts/audit-log.sh +25 -0
- 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/classify-plan-safety.mjs +20 -7
- package/pipeline/scripts/cost-budget-check.mjs +2 -1
- 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/evidence-gate.mjs +7 -2
- 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 +103 -36
- package/pipeline/scripts/localize-commands.mjs +6 -1
- package/pipeline/scripts/match-skills.mjs +15 -4
- package/pipeline/scripts/migrate-prefs.mjs +33 -16
- package/pipeline/scripts/phase-tracker.sh +3 -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/smoke-cross-cli-behavior.sh +21 -7
- 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 +126 -34
- package/pipeline/scripts/uninstall.mjs +74 -30
- 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/.skills-index.json +91 -91
- package/pipeline/skills/shared/README.md +57 -57
- package/pipeline/skills/shared/core/apple-archive-compliance/SKILL.md +1 -1
- 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 +1 -1
- 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 +1 -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 +16 -8
- package/pipeline/skills/shared/core/multi-agent-resume/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-review/SKILL.md +1 -1
- 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 +1 -1
- package/pipeline/skills/shared/core/multi-agent-test/SKILL.md +1 -1
- 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 +57 -57
- package/pipeline/eval/golden-tasks/01-ios-bugfix-darkmode/expected/phase-1-analysis.json +0 -25
- package/pipeline/eval/golden-tasks/01-ios-bugfix-darkmode/expected/phase-2-plan.json +0 -30
- package/pipeline/eval/golden-tasks/01-ios-bugfix-darkmode/expected/phase-4-review.json +0 -20
- package/pipeline/eval/golden-tasks/01-ios-bugfix-darkmode/expected/phase-4-triage.json +0 -15
- package/pipeline/eval/golden-tasks/01-ios-bugfix-darkmode/metadata.json +0 -14
- package/pipeline/eval/golden-tasks/01-ios-bugfix-darkmode/task.json +0 -12
- package/pipeline/eval/golden-tasks/02-android-feature-compose/expected/phase-1-analysis.json +0 -29
- package/pipeline/eval/golden-tasks/02-android-feature-compose/expected/phase-2-plan.json +0 -43
- package/pipeline/eval/golden-tasks/02-android-feature-compose/expected/phase-4-review.json +0 -35
- package/pipeline/eval/golden-tasks/02-android-feature-compose/expected/phase-4-triage.json +0 -35
- package/pipeline/eval/golden-tasks/02-android-feature-compose/metadata.json +0 -14
- package/pipeline/eval/golden-tasks/02-android-feature-compose/task.json +0 -12
- package/pipeline/eval/golden-tasks/03-backend-python-ratelimit/expected/phase-1-analysis.json +0 -29
- package/pipeline/eval/golden-tasks/03-backend-python-ratelimit/expected/phase-2-plan.json +0 -42
- package/pipeline/eval/golden-tasks/03-backend-python-ratelimit/expected/phase-4-review.json +0 -20
- package/pipeline/eval/golden-tasks/03-backend-python-ratelimit/expected/phase-4-triage.json +0 -15
- package/pipeline/eval/golden-tasks/03-backend-python-ratelimit/metadata.json +0 -14
- package/pipeline/eval/golden-tasks/03-backend-python-ratelimit/task.json +0 -12
- package/pipeline/eval/golden-tasks/04-frontend-next-hydration/expected/phase-1-analysis.json +0 -29
- package/pipeline/eval/golden-tasks/04-frontend-next-hydration/expected/phase-2-plan.json +0 -40
- package/pipeline/eval/golden-tasks/04-frontend-next-hydration/expected/phase-4-review.json +0 -20
- package/pipeline/eval/golden-tasks/04-frontend-next-hydration/expected/phase-4-triage.json +0 -15
- package/pipeline/eval/golden-tasks/04-frontend-next-hydration/metadata.json +0 -14
- package/pipeline/eval/golden-tasks/04-frontend-next-hydration/task.json +0 -12
- package/pipeline/eval/golden-tasks/05-ios-security-keychain/expected/phase-1-analysis.json +0 -29
- package/pipeline/eval/golden-tasks/05-ios-security-keychain/expected/phase-2-plan.json +0 -42
- package/pipeline/eval/golden-tasks/05-ios-security-keychain/expected/phase-4-review.json +0 -28
- package/pipeline/eval/golden-tasks/05-ios-security-keychain/expected/phase-4-triage.json +0 -27
- package/pipeline/eval/golden-tasks/05-ios-security-keychain/metadata.json +0 -14
- package/pipeline/eval/golden-tasks/05-ios-security-keychain/task.json +0 -12
- package/pipeline/eval/golden-tasks/06-android-refactor-usecase/expected/phase-1-analysis.json +0 -29
- package/pipeline/eval/golden-tasks/06-android-refactor-usecase/expected/phase-2-plan.json +0 -41
- package/pipeline/eval/golden-tasks/06-android-refactor-usecase/expected/phase-4-review.json +0 -12
- package/pipeline/eval/golden-tasks/06-android-refactor-usecase/expected/phase-4-triage.json +0 -6
- package/pipeline/eval/golden-tasks/06-android-refactor-usecase/metadata.json +0 -14
- package/pipeline/eval/golden-tasks/06-android-refactor-usecase/task.json +0 -12
- package/pipeline/eval/golden-tasks/07-backend-node-idempotency/expected/phase-1-analysis.json +0 -29
- package/pipeline/eval/golden-tasks/07-backend-node-idempotency/expected/phase-2-plan.json +0 -42
- package/pipeline/eval/golden-tasks/07-backend-node-idempotency/expected/phase-4-review.json +0 -28
- package/pipeline/eval/golden-tasks/07-backend-node-idempotency/expected/phase-4-triage.json +0 -27
- package/pipeline/eval/golden-tasks/07-backend-node-idempotency/metadata.json +0 -14
- package/pipeline/eval/golden-tasks/07-backend-node-idempotency/task.json +0 -12
- package/pipeline/eval/golden-tasks/08-ios-auth-consensus-unverified/expected/phase-1-analysis.json +0 -25
- package/pipeline/eval/golden-tasks/08-ios-auth-consensus-unverified/expected/phase-2-plan.json +0 -31
- package/pipeline/eval/golden-tasks/08-ios-auth-consensus-unverified/expected/phase-4-review.json +0 -12
- package/pipeline/eval/golden-tasks/08-ios-auth-consensus-unverified/expected/phase-4-triage.json +0 -18
- package/pipeline/eval/golden-tasks/08-ios-auth-consensus-unverified/metadata.json +0 -14
- package/pipeline/eval/golden-tasks/08-ios-auth-consensus-unverified/task.json +0 -12
- package/pipeline/eval/golden-tasks/README.md +0 -65
- package/pipeline/eval/intent-cases.json +0 -40
- package/pipeline/eval/run-metrics-fixture.json +0 -46
- package/pipeline/eval/triage/01-empty-findings/expected.json +0 -6
- package/pipeline/eval/triage/01-empty-findings/input.json +0 -5
- package/pipeline/eval/triage/01-empty-findings/notes.md +0 -7
- package/pipeline/eval/triage/02-real-blocker/expected.json +0 -15
- package/pipeline/eval/triage/02-real-blocker/input.json +0 -14
- package/pipeline/eval/triage/02-real-blocker/notes.md +0 -7
- package/pipeline/eval/triage/03-out-of-scope-defer/expected.json +0 -18
- package/pipeline/eval/triage/03-out-of-scope-defer/input.json +0 -14
- package/pipeline/eval/triage/03-out-of-scope-defer/notes.md +0 -10
- package/pipeline/eval/triage/04-false-positive-reject/expected.json +0 -18
- package/pipeline/eval/triage/04-false-positive-reject/input.json +0 -14
- package/pipeline/eval/triage/04-false-positive-reject/notes.md +0 -10
- package/pipeline/eval/triage/05-mixed-classification/expected.json +0 -43
- package/pipeline/eval/triage/05-mixed-classification/input.json +0 -38
- package/pipeline/eval/triage/05-mixed-classification/notes.md +0 -17
- package/pipeline/eval/triage/06-severity-mismatch/expected.json +0 -15
- package/pipeline/eval/triage/06-severity-mismatch/input.json +0 -14
- package/pipeline/eval/triage/06-severity-mismatch/notes.md +0 -9
- package/pipeline/eval/triage/07-duplicate-reviewers/expected.json +0 -27
- package/pipeline/eval/triage/07-duplicate-reviewers/input.json +0 -22
- package/pipeline/eval/triage/07-duplicate-reviewers/notes.md +0 -9
- package/pipeline/eval/triage/08-style-misclassified/expected.json +0 -18
- package/pipeline/eval/triage/08-style-misclassified/input.json +0 -14
- package/pipeline/eval/triage/08-style-misclassified/notes.md +0 -9
- package/pipeline/eval/triage/09-cascading-finding/expected.json +0 -23
- package/pipeline/eval/triage/09-cascading-finding/input.json +0 -22
- package/pipeline/eval/triage/09-cascading-finding/notes.md +0 -9
- package/pipeline/eval/triage/10-deferred-crossref/expected.json +0 -18
- package/pipeline/eval/triage/10-deferred-crossref/input.json +0 -14
- package/pipeline/eval/triage/10-deferred-crossref/notes.md +0 -9
- package/pipeline/eval/triage/11-vercel-token-leak-blocker/expected.json +0 -27
- package/pipeline/eval/triage/11-vercel-token-leak-blocker/input.json +0 -22
- package/pipeline/eval/triage/11-vercel-token-leak-blocker/notes.md +0 -14
- package/pipeline/eval/triage/README.md +0 -54
- package/pipeline/scripts/benchmark-phase-0.sh +0 -128
- package/pipeline/scripts/check-md-links.mjs +0 -84
- package/pipeline/scripts/eval-golden-tasks-live.mjs +0 -297
- package/pipeline/scripts/eval-golden-tasks.mjs +0 -212
- package/pipeline/scripts/eval-intent.mjs +0 -103
- package/pipeline/scripts/eval-mine-corpus.mjs +0 -201
- package/pipeline/scripts/eval-triage.mjs +0 -171
- package/pipeline/scripts/fixtures/diff-risk-android.diff +0 -40
- package/pipeline/scripts/fixtures/diff-risk-ios.diff +0 -48
- package/pipeline/scripts/fixtures/diff-risk-test-removal.diff +0 -40
- package/pipeline/scripts/fixtures/install-layout.tsv +0 -19
- package/pipeline/scripts/fixtures/pack-expected-count.txt +0 -1
- package/pipeline/scripts/fixtures/test-gap-node.diff +0 -30
- package/pipeline/scripts/fixtures/test-gap-python.diff +0 -32
- package/pipeline/scripts/lint-mcp-refs.mjs +0 -207
- package/pipeline/scripts/lint-skills.mjs +0 -143
- package/pipeline/scripts/run-smokes.mjs +0 -76
- package/pipeline/scripts/smoke-add-detail.sh +0 -137
- package/pipeline/scripts/smoke-agent-guard.sh +0 -74
- package/pipeline/scripts/smoke-agent-log-cost.sh +0 -262
- package/pipeline/scripts/smoke-agent-model-routing.sh +0 -87
- package/pipeline/scripts/smoke-ask-choice.sh +0 -42
- package/pipeline/scripts/smoke-autopilot-circuit-breaker.sh +0 -36
- package/pipeline/scripts/smoke-bitbucket-contract.sh +0 -255
- package/pipeline/scripts/smoke-changelog-version.sh +0 -47
- package/pipeline/scripts/smoke-channels-approval-gate.sh +0 -60
- package/pipeline/scripts/smoke-channels-flow.sh +0 -130
- package/pipeline/scripts/smoke-ci-workflows.sh +0 -88
- package/pipeline/scripts/smoke-clarify.sh +0 -148
- package/pipeline/scripts/smoke-command-inventory.sh +0 -81
- package/pipeline/scripts/smoke-commands-skills-parity.sh +0 -87
- package/pipeline/scripts/smoke-community-gates.sh +0 -75
- package/pipeline/scripts/smoke-compliance-skills.sh +0 -119
- package/pipeline/scripts/smoke-config-hygiene.sh +0 -58
- package/pipeline/scripts/smoke-cost-budget.sh +0 -70
- package/pipeline/scripts/smoke-cost-summary.sh +0 -139
- package/pipeline/scripts/smoke-cross-phase-cohesion.sh +0 -128
- package/pipeline/scripts/smoke-description-tr.sh +0 -82
- package/pipeline/scripts/smoke-dev-critic.sh +0 -144
- package/pipeline/scripts/smoke-diff-explain.sh +0 -147
- package/pipeline/scripts/smoke-diff-risk.sh +0 -190
- package/pipeline/scripts/smoke-dynamic-skill-loading.sh +0 -160
- package/pipeline/scripts/smoke-eval-live.sh +0 -136
- package/pipeline/scripts/smoke-evidence-gate.sh +0 -93
- package/pipeline/scripts/smoke-extract-conventions.sh +0 -163
- package/pipeline/scripts/smoke-fetchers-offline.sh +0 -448
- package/pipeline/scripts/smoke-figma-dispatch.sh +0 -112
- package/pipeline/scripts/smoke-gate-hooks.sh +0 -74
- package/pipeline/scripts/smoke-gc-tmp.sh +0 -130
- package/pipeline/scripts/smoke-gc-worktrees.sh +0 -125
- package/pipeline/scripts/smoke-generate-issue.sh +0 -120
- package/pipeline/scripts/smoke-handoff-contract.sh +0 -92
- package/pipeline/scripts/smoke-identity-isolation.sh +0 -70
- package/pipeline/scripts/smoke-install-layout.sh +0 -248
- package/pipeline/scripts/smoke-intent-guard.sh +0 -86
- package/pipeline/scripts/smoke-issue-comment-template.sh +0 -86
- package/pipeline/scripts/smoke-issue-jira-triad.sh +0 -120
- package/pipeline/scripts/smoke-keychain.sh +0 -158
- package/pipeline/scripts/smoke-language-axis.sh +0 -109
- package/pipeline/scripts/smoke-learning-curve.sh +0 -61
- package/pipeline/scripts/smoke-learnings-ledger.sh +0 -86
- package/pipeline/scripts/smoke-lib-scripts.sh +0 -448
- package/pipeline/scripts/smoke-mcp-gate.sh +0 -68
- package/pipeline/scripts/smoke-md-links.sh +0 -8
- package/pipeline/scripts/smoke-md2confluence.sh +0 -126
- package/pipeline/scripts/smoke-metrics-cache-ratio.sh +0 -72
- package/pipeline/scripts/smoke-migrate-state.sh +0 -102
- package/pipeline/scripts/smoke-mode-dispatch-drift.sh +0 -161
- package/pipeline/scripts/smoke-model-fallback.sh +0 -89
- package/pipeline/scripts/smoke-multi-repo-integration.sh +0 -116
- package/pipeline/scripts/smoke-multi-repo-worktree.sh +0 -61
- package/pipeline/scripts/smoke-no-mcp-in-dev-phases.sh +0 -115
- package/pipeline/scripts/smoke-no-token-prompt.sh +0 -85
- package/pipeline/scripts/smoke-pack-contents.sh +0 -140
- package/pipeline/scripts/smoke-pat-audit.sh +0 -128
- package/pipeline/scripts/smoke-per-repo-memory.sh +0 -156
- package/pipeline/scripts/smoke-phase-0-multi-repo.sh +0 -170
- package/pipeline/scripts/smoke-phase-6-multi.sh +0 -79
- package/pipeline/scripts/smoke-phase-banner.sh +0 -101
- package/pipeline/scripts/smoke-phase-tracker.sh +0 -324
- package/pipeline/scripts/smoke-phase0-bridge-contract.sh +0 -241
- package/pipeline/scripts/smoke-phase4-gates.sh +0 -45
- package/pipeline/scripts/smoke-phase4-triage.sh +0 -229
- package/pipeline/scripts/smoke-plan-approval-gate.sh +0 -71
- package/pipeline/scripts/smoke-plan-safety.sh +0 -139
- package/pipeline/scripts/smoke-plan-todos.sh +0 -196
- package/pipeline/scripts/smoke-plugin-validate.sh +0 -64
- package/pipeline/scripts/smoke-pr-review-actions.sh +0 -152
- package/pipeline/scripts/smoke-pre-commit.sh +0 -170
- package/pipeline/scripts/smoke-pref-migration.sh +0 -226
- package/pipeline/scripts/smoke-prefs-language.sh +0 -134
- package/pipeline/scripts/smoke-progress-contract.sh +0 -127
- package/pipeline/scripts/smoke-prune-logs.sh +0 -137
- package/pipeline/scripts/smoke-purge.sh +0 -138
- package/pipeline/scripts/smoke-push-retry.sh +0 -75
- package/pipeline/scripts/smoke-repo-map.sh +0 -300
- package/pipeline/scripts/smoke-review-readiness.sh +0 -92
- package/pipeline/scripts/smoke-review-watch.sh +0 -146
- package/pipeline/scripts/smoke-routines.sh +0 -84
- package/pipeline/scripts/smoke-run-aggregator.sh +0 -216
- package/pipeline/scripts/smoke-run-metrics.sh +0 -50
- package/pipeline/scripts/smoke-search.sh +0 -187
- package/pipeline/scripts/smoke-shadow-git.sh +0 -224
- package/pipeline/scripts/smoke-skill-authoring.sh +0 -137
- package/pipeline/scripts/smoke-skill-language.sh +0 -83
- package/pipeline/scripts/smoke-skill-manifest.sh +0 -138
- package/pipeline/scripts/smoke-skill-scan.sh +0 -198
- package/pipeline/scripts/smoke-source-parity.sh +0 -85
- package/pipeline/scripts/smoke-subagent-validators.sh +0 -108
- package/pipeline/scripts/smoke-sync-parity.sh +0 -92
- package/pipeline/scripts/smoke-tasklist-ordering.sh +0 -112
- package/pipeline/scripts/smoke-telemetry.sh +0 -147
- package/pipeline/scripts/smoke-test-gap.sh +0 -183
- package/pipeline/scripts/smoke-token-budget.sh +0 -67
- package/pipeline/scripts/smoke-token-preflight.sh +0 -82
- package/pipeline/scripts/smoke-tracker-contract.sh +0 -191
- package/pipeline/scripts/smoke-tracker-tokens-invocation.sh +0 -73
- package/pipeline/scripts/smoke-triage-memory.sh +0 -174
- package/pipeline/scripts/smoke-update-check.sh +0 -135
- package/pipeline/scripts/smoke-url-enrichment.sh +0 -70
- package/pipeline/scripts/smoke-validate-analysis-doc.sh +0 -161
- package/pipeline/scripts/smoke-validator-contradiction.sh +0 -67
- package/pipeline/scripts/smoke-validator-gates.sh +0 -164
- package/pipeline/scripts/smoke-vercel-deploy-redact.sh +0 -129
- package/pipeline/scripts/smoke-verify-by-test.sh +0 -148
- package/pipeline/scripts/smoke-wiki-integration.sh +0 -122
- package/pipeline/scripts/smoke-work-summary.sh +0 -163
- package/pipeline/scripts/smoke-workflow-audit.sh +0 -69
- package/pipeline/scripts/smoke-worktree-path-convention.sh +0 -86
- package/pipeline/scripts/smoke-wrapper-preservation.sh +0 -68
- package/pipeline/scripts/smoke-write-state.sh +0 -115
- package/pipeline/scripts/sync-parity-check.sh +0 -135
- package/pipeline/scripts/test-gap-rules/android.json +0 -25
- package/pipeline/scripts/test-gap-rules/ios.json +0 -29
- package/pipeline/scripts/test-gap-rules/node.json +0 -17
- package/pipeline/scripts/test-gap-rules/python.json +0 -19
- package/pipeline/scripts/validate-schemas.mjs +0 -88
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
|
|
@@ -45,7 +45,7 @@ if (command === "--version" || command === "-v" || command === "version") {
|
|
|
45
45
|
});
|
|
46
46
|
} else if (command === "help") {
|
|
47
47
|
console.log(`
|
|
48
|
-
multi-agent-pipeline
|
|
48
|
+
multi-agent-pipeline - 8-phase AI development pipeline
|
|
49
49
|
|
|
50
50
|
Install:
|
|
51
51
|
npx @mmerterden/multi-agent-pipeline install Install for Claude Code (default)
|
|
@@ -53,7 +53,7 @@ if (command === "--version" || command === "-v" || command === "version") {
|
|
|
53
53
|
npx @mmerterden/multi-agent-pipeline install --all Both Claude + Copilot
|
|
54
54
|
npx @mmerterden/multi-agent-pipeline install --link Use symlinks (saves tokens, dev mode)
|
|
55
55
|
|
|
56
|
-
Uninstall (token-preserving
|
|
56
|
+
Uninstall (token-preserving - Keychain/Credential Manager untouched):
|
|
57
57
|
npx @mmerterden/multi-agent-pipeline uninstall Interactive: remove from all installed targets
|
|
58
58
|
npx @mmerterden/multi-agent-pipeline uninstall --yes Skip prompt
|
|
59
59
|
npx @mmerterden/multi-agent-pipeline uninstall --dry-run Report what would be removed
|
|
@@ -71,7 +71,7 @@ if (command === "--version" || command === "-v" || command === "version") {
|
|
|
71
71
|
|
|
72
72
|
After installation:
|
|
73
73
|
Claude Code: /multi-agent "MOBILE-123"
|
|
74
|
-
Copilot CLI: Describe your task naturally
|
|
74
|
+
Copilot CLI: Describe your task naturally - pipeline instructions are loaded
|
|
75
75
|
|
|
76
76
|
More info: https://github.com/mmerterden/multi-agent-pipeline
|
|
77
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.
|
|
@@ -245,6 +239,54 @@ export function pruneLegacyMultiAgentSkills(skillsDir) {
|
|
|
245
239
|
return removed;
|
|
246
240
|
}
|
|
247
241
|
|
|
242
|
+
/**
|
|
243
|
+
* Trees an older installer created and no current one manages.
|
|
244
|
+
*
|
|
245
|
+
* A tree that stops being copied does NOT stop existing: the wipe-before-copy
|
|
246
|
+
* pattern only runs for trees the installer still writes, so dropping one from
|
|
247
|
+
* the installer leaves whatever it last wrote on every existing machine forever.
|
|
248
|
+
*
|
|
249
|
+
* `eval/` is the case that prompted this. An older version copied the eval
|
|
250
|
+
* corpora into `~/.claude/eval/`; the harnesses that read them are maintainer CI
|
|
251
|
+
* tooling and no longer ship, so neither installer references `eval` any more and
|
|
252
|
+
* neither did uninstall - 31 stale files sat there with nothing left that could
|
|
253
|
+
* ever read or remove them.
|
|
254
|
+
*
|
|
255
|
+
* @type {ReadonlyArray<{dir: string, reason: string}>}
|
|
256
|
+
*/
|
|
257
|
+
export const ABANDONED_TREES = Object.freeze([
|
|
258
|
+
{
|
|
259
|
+
dir: "eval",
|
|
260
|
+
reason: "eval corpora; the harnesses that read them are maintainer-only and no longer ship",
|
|
261
|
+
},
|
|
262
|
+
]);
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Remove trees an older install left behind under `root`.
|
|
266
|
+
*
|
|
267
|
+
* @param {string} root e.g. `$HOME/.claude`
|
|
268
|
+
* @returns {number} directories removed
|
|
269
|
+
*/
|
|
270
|
+
export function pruneAbandonedTrees(root) {
|
|
271
|
+
let removed = 0;
|
|
272
|
+
for (const { dir, reason } of ABANDONED_TREES) {
|
|
273
|
+
const target = join(root, dir);
|
|
274
|
+
if (!existsSync(target)) continue;
|
|
275
|
+
if (dryRun) {
|
|
276
|
+
console.log(` [dry-run] would remove abandoned tree ${target} (${reason})`);
|
|
277
|
+
removed++;
|
|
278
|
+
continue;
|
|
279
|
+
}
|
|
280
|
+
try {
|
|
281
|
+
rmSync(target, { recursive: true, force: true });
|
|
282
|
+
removed++;
|
|
283
|
+
} catch {
|
|
284
|
+
/* non-fatal - a leftover tree must never fail an install */
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
return removed;
|
|
288
|
+
}
|
|
289
|
+
|
|
248
290
|
/**
|
|
249
291
|
* Copy a single file, honouring dry-run mode.
|
|
250
292
|
* @param {string} src
|
|
@@ -303,7 +345,7 @@ export function countFiles(dir) {
|
|
|
303
345
|
}
|
|
304
346
|
|
|
305
347
|
/**
|
|
306
|
-
* Wipe a managed directory tree before copy. Non-fatal on permission errors
|
|
348
|
+
* Wipe a managed directory tree before copy. Non-fatal on permission errors -
|
|
307
349
|
* surfaces as a follow-up copy-over with stale entries kept, which is still
|
|
308
350
|
* better than a hard install failure.
|
|
309
351
|
*
|
|
@@ -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
|
|
@@ -1,18 +1,138 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Dev-only files excluded from end-user installs.
|
|
2
|
+
* Dev-only files excluded from end-user installs and from the published tarball.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Two separate reasons live here, and they must not be conflated:
|
|
5
|
+
*
|
|
6
|
+
* 1. LEAK: the file references the maintainer's private upstream or carries
|
|
7
|
+
* personal data (org names, hostnames, emails) on the `from:` side of a
|
|
8
|
+
* substitution rule. Shipping it is a disclosure, not just noise.
|
|
9
|
+
*
|
|
10
|
+
* 2. MAINTAINER CI: the file is a repository gate. It resolves the repo root
|
|
11
|
+
* as `dirname($0)/../..` and reads `package.json` / `install.js` /
|
|
12
|
+
* `node_modules` / the git tree. In an install layout that path is `$HOME`,
|
|
13
|
+
* so the script reports things like `FAIL: install.js missing` - a green
|
|
14
|
+
* repo check that reads as a broken installation to whoever ran it.
|
|
15
|
+
* Measured before this list existed: of 117 installed smoke scripts, 100
|
|
16
|
+
* failed that way and 17 passed only by accident of not needing the repo.
|
|
17
|
+
*
|
|
18
|
+
* Reason 2 is why the default for `smoke-*.sh` is EXCLUDE. A smoke ships only
|
|
19
|
+
* when a command actually tells a user to run it - that set is CONSUMER_SMOKES
|
|
20
|
+
* below, and `smoke-consumer-smoke-surface.sh` fails if the two drift apart.
|
|
8
21
|
*
|
|
9
22
|
* @module install/_dev-only-files
|
|
10
23
|
*/
|
|
11
24
|
|
|
25
|
+
import { readdirSync } from "node:fs";
|
|
26
|
+
import { join } from "node:path";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Smoke suites an end user is instructed to run, and which therefore must work
|
|
30
|
+
* from an installed layout (`~/.claude/scripts/`) as well as from the repo.
|
|
31
|
+
*
|
|
32
|
+
* `/multi-agent:update` runs both as its post-update verification. Anything
|
|
33
|
+
* added here MUST resolve its paths through `_smoke-root.sh`, never through a
|
|
34
|
+
* bare `dirname($0)/../..`.
|
|
35
|
+
*/
|
|
36
|
+
export const CONSUMER_SMOKES = Object.freeze([
|
|
37
|
+
"smoke-schema-validation.sh",
|
|
38
|
+
"smoke-cross-cli-behavior.sh",
|
|
39
|
+
]);
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Every `smoke-*.sh` that is NOT in CONSUMER_SMOKES. Expressed as one regex so a
|
|
43
|
+
* newly added smoke is excluded by default rather than shipping until someone
|
|
44
|
+
* notices - the safe direction for reason 2 above.
|
|
45
|
+
*/
|
|
46
|
+
export const MAINTAINER_SMOKES = new RegExp(
|
|
47
|
+
`^smoke-(?!${CONSUMER_SMOKES.map((n) => n.replace(/^smoke-/, "").replace(/\./g, "\\.")).join(
|
|
48
|
+
"|",
|
|
49
|
+
)}$)`,
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Repository tooling that is not a smoke: the smoke runner itself, the eval
|
|
54
|
+
* harnesses, the scorecard, and the linters. All of them need devDependencies
|
|
55
|
+
* (`ajv`, `c8`, `eslint`) or the repo tree, neither of which exists in an
|
|
56
|
+
* install.
|
|
57
|
+
*/
|
|
58
|
+
const DEV_ONLY_TOOLING = Object.freeze([
|
|
59
|
+
"run-smokes.mjs",
|
|
60
|
+
"scorecard.mjs",
|
|
61
|
+
"lint-skills.mjs",
|
|
62
|
+
"lint-mcp-refs.mjs",
|
|
63
|
+
"check-md-links.mjs",
|
|
64
|
+
"validate-schemas.mjs", // validates the repo's own schema files, needs ajv
|
|
65
|
+
"sync-parity-check.sh",
|
|
66
|
+
"benchmark-phase-0.sh",
|
|
67
|
+
"test-gap-rules", // rule corpus for the repo's own test-gap gate
|
|
68
|
+
]);
|
|
69
|
+
|
|
70
|
+
/** Eval harnesses (`eval-*.mjs`) read `pipeline/eval/**`, which never ships. */
|
|
71
|
+
const EVAL_HARNESSES = /^eval-.*\.mjs$/;
|
|
72
|
+
|
|
12
73
|
export const DEV_ONLY_SCRIPTS = Object.freeze([
|
|
74
|
+
// --- reason 1: leak ---
|
|
13
75
|
"smoke-figma-config-schema.sh",
|
|
14
76
|
"smoke-personal-data.sh", // scanner contains the patterns it detects
|
|
15
|
-
"smoke-install-leak-gate.sh", // same
|
|
77
|
+
"smoke-install-leak-gate.sh", // same - scanner shadows the install pipeline
|
|
16
78
|
"validate-prefs.mjs", // needs ajv (devDependency); end users have no node_modules here
|
|
17
79
|
"fixtures", // smoke test fixtures live in the repo only, never ship to users
|
|
80
|
+
// --- reason 2: maintainer CI ---
|
|
81
|
+
...DEV_ONLY_TOOLING,
|
|
82
|
+
EVAL_HARNESSES,
|
|
83
|
+
MAINTAINER_SMOKES,
|
|
18
84
|
]);
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* True when `name` (a path relative to `pipeline/scripts/`) must not be
|
|
88
|
+
* installed. Shared by both installers' excluded-file counters and by
|
|
89
|
+
* `smoke-consumer-smoke-surface.sh`, so the count and the gate can never
|
|
90
|
+
* disagree with what `copyDir` actually filtered.
|
|
91
|
+
*
|
|
92
|
+
* @param {string} name
|
|
93
|
+
* @returns {boolean}
|
|
94
|
+
*/
|
|
95
|
+
export function isDevOnlyScript(name) {
|
|
96
|
+
const rel = String(name).split("\\").join("/").replace(/^\//, "");
|
|
97
|
+
return DEV_ONLY_SCRIPTS.some((pat) =>
|
|
98
|
+
typeof pat === "string" ? rel === pat || rel.startsWith(pat + "/") : pat.test(rel),
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* How many files under `scriptsDir` `copyDir` will filter out.
|
|
104
|
+
*
|
|
105
|
+
* Walks the tree and applies `isDevOnlyScript` to the same relative paths
|
|
106
|
+
* `copyDir`'s filter sees, so the number printed by an install is the number
|
|
107
|
+
* actually withheld. The previous form summed `countFiles()` over the exclusion
|
|
108
|
+
* array, which silently returned 0 for every non-literal (regex) entry.
|
|
109
|
+
*
|
|
110
|
+
* @param {string} scriptsDir absolute path to `pipeline/scripts`
|
|
111
|
+
* @returns {number}
|
|
112
|
+
*/
|
|
113
|
+
export function countDevOnlyFiles(scriptsDir) {
|
|
114
|
+
let excluded = 0;
|
|
115
|
+
const walk = (abs, rel) => {
|
|
116
|
+
for (const entry of readdirSync(abs, { withFileTypes: true })) {
|
|
117
|
+
const childRel = rel ? `${rel}/${entry.name}` : entry.name;
|
|
118
|
+
const childAbs = join(abs, entry.name);
|
|
119
|
+
if (entry.isDirectory()) {
|
|
120
|
+
// An excluded directory takes its whole subtree with it, exactly as
|
|
121
|
+
// cpSync's filter does when it returns false for the directory itself.
|
|
122
|
+
if (isDevOnlyScript(childRel)) excluded += countTree(childAbs);
|
|
123
|
+
else walk(childAbs, childRel);
|
|
124
|
+
} else if (isDevOnlyScript(childRel)) {
|
|
125
|
+
excluded++;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
const countTree = (abs) => {
|
|
130
|
+
let n = 0;
|
|
131
|
+
for (const entry of readdirSync(abs, { withFileTypes: true })) {
|
|
132
|
+
n += entry.isDirectory() ? countTree(join(abs, entry.name)) : 1;
|
|
133
|
+
}
|
|
134
|
+
return n;
|
|
135
|
+
};
|
|
136
|
+
walk(scriptsDir, "");
|
|
137
|
+
return excluded;
|
|
138
|
+
}
|
|
@@ -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
|
@@ -27,13 +27,14 @@ import {
|
|
|
27
27
|
ensureDir,
|
|
28
28
|
ensureRealDir,
|
|
29
29
|
isDryRun,
|
|
30
|
+
pruneAbandonedTrees,
|
|
30
31
|
pruneLegacyMultiAgentSkills,
|
|
31
32
|
removePipelineAgentFiles,
|
|
32
33
|
wipeDir,
|
|
33
34
|
writeFile,
|
|
34
35
|
} from "./_common.mjs";
|
|
35
36
|
import { copyExternalSkillsFiltered } from "./_platform-filter.mjs";
|
|
36
|
-
import { DEV_ONLY_SCRIPTS } from "./_dev-only-files.mjs";
|
|
37
|
+
import { DEV_ONLY_SCRIPTS, countDevOnlyFiles } from "./_dev-only-files.mjs";
|
|
37
38
|
|
|
38
39
|
/**
|
|
39
40
|
* Dead matcher written by pre-v11.4.1 installs. Hook matchers only ever see
|
|
@@ -64,6 +65,14 @@ export function installClaude(ctx) {
|
|
|
64
65
|
const CLAUDE_LIB = join(home, ".claude", "lib");
|
|
65
66
|
const CLAUDE_MA_REFS = join(home, ".claude", "multi-agent-refs");
|
|
66
67
|
|
|
68
|
+
// Before laying anything down: drop trees an older install created that no
|
|
69
|
+
// current installer manages. Wipe-before-copy only protects trees still being
|
|
70
|
+
// written, so an abandoned one persists on every existing machine forever.
|
|
71
|
+
const prunedTrees = pruneAbandonedTrees(join(home, ".claude"));
|
|
72
|
+
if (prunedTrees > 0) {
|
|
73
|
+
console.log(` [Claude Code] Removed ${prunedTrees} abandoned tree(s) from an older install`);
|
|
74
|
+
}
|
|
75
|
+
|
|
67
76
|
installCommands(pipelineSrc, CLAUDE_COMMANDS, useSymlinks);
|
|
68
77
|
installMultiAgentRefs(pipelineSrc, CLAUDE_MA_REFS, useSymlinks);
|
|
69
78
|
installScripts(pipelineSrc, CLAUDE_SCRIPTS, useSymlinks);
|
|
@@ -196,19 +205,17 @@ function installScripts(pipelineSrc, dest, useSymlinks) {
|
|
|
196
205
|
const scriptsSrc = join(pipelineSrc, "scripts");
|
|
197
206
|
if (!existsSync(scriptsSrc)) return;
|
|
198
207
|
|
|
199
|
-
// Wipe-before-copy
|
|
208
|
+
// Wipe-before-copy - scripts/ is a 100% pipeline-managed tree, so files
|
|
200
209
|
// removed upstream should not linger.
|
|
201
210
|
if (!useSymlinks) ensureRealDir(dest);
|
|
202
211
|
wipeDir(dest);
|
|
203
212
|
copyDir(scriptsSrc, dest, { exclude: DEV_ONLY_SCRIPTS, useSymlinks });
|
|
204
|
-
// Count files actually excluded
|
|
205
|
-
//
|
|
206
|
-
//
|
|
207
|
-
const excludedCount =
|
|
213
|
+
// Count files actually excluded by walking the tree: DEV_ONLY_SCRIPTS mixes
|
|
214
|
+
// literal names, whole directories, and regexes (the maintainer-smoke rule),
|
|
215
|
+
// so summing countFiles() over the array reported 0 for every regex entry.
|
|
216
|
+
const excludedCount = countDevOnlyFiles(scriptsSrc);
|
|
208
217
|
const scriptCount = countFiles(scriptsSrc) - excludedCount;
|
|
209
|
-
console.log(
|
|
210
|
-
` -> ${scriptCount} files copied to ${dest} (${excludedCount} dev-only excluded)`,
|
|
211
|
-
);
|
|
218
|
+
console.log(` -> ${scriptCount} files copied to ${dest} (${excludedCount} dev-only excluded)`);
|
|
212
219
|
}
|
|
213
220
|
|
|
214
221
|
function installAgents(pipelineSrc, dest, useSymlinks) {
|
|
@@ -249,7 +256,7 @@ function installSchemas(pipelineSrc, dest, useSymlinks) {
|
|
|
249
256
|
console.log(" [Claude Code] Installing JSON schemas...");
|
|
250
257
|
const schemasSrc = join(pipelineSrc, "schemas");
|
|
251
258
|
if (!existsSync(schemasSrc)) return;
|
|
252
|
-
// Wipe-before-copy
|
|
259
|
+
// Wipe-before-copy - schemas/ is a 100% pipeline-managed tree, so files
|
|
253
260
|
// removed upstream should not linger.
|
|
254
261
|
if (!useSymlinks) ensureRealDir(dest);
|
|
255
262
|
wipeDir(dest);
|
|
@@ -261,7 +268,7 @@ function installLib(pipelineSrc, dest, useSymlinks) {
|
|
|
261
268
|
console.log(" [Claude Code] Installing shell libraries...");
|
|
262
269
|
const libSrc = join(pipelineSrc, "lib");
|
|
263
270
|
if (!existsSync(libSrc)) return;
|
|
264
|
-
// Wipe-before-copy
|
|
271
|
+
// Wipe-before-copy - lib/ is a 100% pipeline-managed tree.
|
|
265
272
|
if (!useSymlinks) ensureRealDir(dest);
|
|
266
273
|
wipeDir(dest);
|
|
267
274
|
copyDir(libSrc, dest, { useSymlinks });
|
|
@@ -269,7 +276,7 @@ function installLib(pipelineSrc, dest, useSymlinks) {
|
|
|
269
276
|
}
|
|
270
277
|
|
|
271
278
|
function runPreDeployScans(pipelineSrc) {
|
|
272
|
-
// Pre-deploy security scan
|
|
279
|
+
// Pre-deploy security scan - warn-only, never halts install on its own.
|
|
273
280
|
const scanScript = join(pipelineSrc, "scripts", "scan-skills.sh");
|
|
274
281
|
if (existsSync(scanScript)) {
|
|
275
282
|
try {
|
|
@@ -286,7 +293,7 @@ function runPreDeployScans(pipelineSrc) {
|
|
|
286
293
|
}
|
|
287
294
|
}
|
|
288
295
|
|
|
289
|
-
// Pre-deploy manifest verify (v6.2.H)
|
|
296
|
+
// Pre-deploy manifest verify (v6.2.H) - warn-only.
|
|
290
297
|
const verifyScript = join(pipelineSrc, "scripts", "verify-skills.sh");
|
|
291
298
|
if (existsSync(verifyScript)) {
|
|
292
299
|
try {
|