@mmerterden/multi-agent-pipeline 17.6.0 → 19.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +310 -0
- package/README.md +76 -18
- package/README.tr.md +55 -16
- package/docs/adr/0002-instruction-driven-flag.md +1 -0
- package/docs/adr/0005-lazy-phase-docs.md +11 -1
- package/docs/adr/0008-installer-modularization-and-secret-leak-defense.md +1 -0
- package/docs/adr/0010-own-code-graph.md +1 -0
- package/docs/adr/0011-dormant-ci.md +25 -1
- package/docs/adr/0014-six-phase-consolidation.md +134 -0
- package/docs/adr/README.md +2 -1
- package/docs/architecture.md +37 -38
- package/docs/best-practices.md +1 -1
- package/docs/ecosystem.md +37 -26
- package/docs/engineering.md +1 -1
- package/docs/facts.json +45 -0
- package/docs/features.md +54 -53
- package/docs/performance.md +5 -5
- package/docs/recovery-guide.md +9 -9
- package/docs/server-readiness.md +188 -0
- package/docs/token-budget-history.md +3 -1
- package/index.js +18 -3
- package/install/_codex-agents.mjs +1 -1
- package/install/_common.mjs +42 -17
- package/install/_dev-only-files.mjs +8 -0
- package/install/_unattended-profile.mjs +113 -0
- package/install/index.mjs +48 -0
- package/install/templates/claude-hooks.json +1 -1
- package/install/templates/codex-instructions.md +1 -1
- package/install/templates/copilot-instructions.md +28 -28
- package/manifest.json +1065 -0
- package/package.json +6 -3
- package/pipeline/agents/dev-critic.md +3 -3
- package/pipeline/commands/figma-to-swiftui.md +1 -1
- package/pipeline/commands/multi-agent/SKILL.md +8 -8
- package/pipeline/commands/multi-agent/analysis/SKILL.md +9 -9
- package/pipeline/commands/multi-agent/autopilot/SKILL.md +7 -7
- package/pipeline/commands/multi-agent/channels/SKILL.md +15 -15
- package/pipeline/commands/multi-agent/diff-explain/SKILL.md +6 -6
- package/pipeline/commands/multi-agent/garbage-collect/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/graph/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/help/SKILL.md +62 -62
- package/pipeline/commands/multi-agent/language/SKILL.md +2 -2
- package/pipeline/commands/multi-agent/local/SKILL.md +11 -11
- package/pipeline/commands/multi-agent/local-autopilot/SKILL.md +13 -13
- package/pipeline/commands/multi-agent/log/SKILL.md +2 -2
- package/pipeline/commands/multi-agent/manual-test/SKILL.md +9 -9
- package/pipeline/commands/multi-agent/model/SKILL.md +69 -0
- package/pipeline/commands/multi-agent/refactor/SKILL.md +3 -3
- package/pipeline/commands/multi-agent/resume/SKILL.md +4 -4
- package/pipeline/commands/multi-agent/resume-local/SKILL.md +19 -17
- package/pipeline/commands/multi-agent/review/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/route-off/SKILL.md +36 -0
- package/pipeline/commands/multi-agent/route-on/SKILL.md +74 -0
- package/pipeline/commands/multi-agent/route-status/SKILL.md +56 -0
- package/pipeline/commands/multi-agent/setup/SKILL.md +2 -2
- package/pipeline/commands/multi-agent/status/SKILL.md +54 -23
- package/pipeline/commands/multi-agent/steer/SKILL.md +2 -2
- package/pipeline/commands/multi-agent/sync/SKILL.md +12 -13
- package/pipeline/commands/multi-agent/test/SKILL.md +1 -1
- package/pipeline/lib/_jira-auth.sh +8 -0
- package/pipeline/lib/analysis-jira-write.sh +32 -0
- package/pipeline/lib/ask-choice.sh +13 -2
- package/pipeline/lib/autopilot-state.sh +8 -0
- package/pipeline/lib/credential-inventory.sh +1 -1
- package/pipeline/lib/fatal.mjs +129 -0
- package/pipeline/lib/fetch-fortify.sh +1 -1
- package/pipeline/lib/figma-mcp-refresh.sh +18 -0
- package/pipeline/lib/figma-screenshot.sh +18 -0
- package/pipeline/lib/invoked-directly.mjs +43 -0
- package/pipeline/lib/jira-publish.sh +42 -0
- package/pipeline/lib/md2confluence-v3.py +47 -0
- package/pipeline/lib/model-rung.sh +142 -0
- package/pipeline/lib/outbound-gate.mjs +175 -0
- package/pipeline/lib/phase-schema.mjs +88 -0
- package/pipeline/lib/plan-todos.sh +32 -11
- package/pipeline/lib/post-pr-review.sh +77 -8
- package/pipeline/lib/repo-hygiene.sh +8 -3
- package/pipeline/lib/require-jq.sh +40 -0
- package/pipeline/lib/route-state.sh +161 -0
- package/pipeline/lib/run-paths.sh +335 -0
- 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/_input-parser.md +1 -1
- package/pipeline/multi-agent-refs/analysis/evidence.md +0 -9
- package/pipeline/multi-agent-refs/analysis/intake.md +1 -1
- package/pipeline/multi-agent-refs/analysis/locked.md +21 -22
- package/pipeline/multi-agent-refs/analysis/render.md +1 -1
- package/pipeline/multi-agent-refs/analysis/synthesis.md +12 -6
- package/pipeline/multi-agent-refs/android-guide.md +1 -1
- package/pipeline/multi-agent-refs/audit-guide.md +13 -13
- package/pipeline/multi-agent-refs/channels/issue-comment.md +2 -2
- package/pipeline/multi-agent-refs/channels/jira.md +3 -3
- package/pipeline/multi-agent-refs/channels/pr.md +4 -4
- package/pipeline/multi-agent-refs/channels/wiki.md +1 -1
- package/pipeline/multi-agent-refs/component-dispatch.md +3 -3
- package/pipeline/multi-agent-refs/cross-cli-contract.md +31 -6
- package/pipeline/multi-agent-refs/features/autopilot-circuit-breaker.md +74 -4
- package/pipeline/multi-agent-refs/features/code-graph.md +5 -5
- package/pipeline/multi-agent-refs/features/cost-analysis.md +93 -0
- package/pipeline/multi-agent-refs/features/design-conformance.md +1 -1
- package/pipeline/multi-agent-refs/features/dev-critic.md +3 -3
- package/pipeline/multi-agent-refs/features/doctor.md +47 -2
- package/pipeline/multi-agent-refs/features/external-context-injection.md +3 -3
- package/pipeline/multi-agent-refs/features/maturity-followup.md +3 -3
- package/pipeline/multi-agent-refs/features/model-fallback.md +5 -5
- package/pipeline/multi-agent-refs/features/plan-todos.md +1 -1
- package/pipeline/multi-agent-refs/features/repo-map.md +1 -1
- package/pipeline/multi-agent-refs/features/review-delta.md +3 -3
- package/pipeline/multi-agent-refs/features/review-multi-repo.md +1 -1
- package/pipeline/multi-agent-refs/features/scope-check.md +4 -4
- package/pipeline/multi-agent-refs/features/skill-conformance.md +2 -2
- package/pipeline/multi-agent-refs/features/stack-skill-routing.md +1 -1
- package/pipeline/multi-agent-refs/features/verify-by-test.md +4 -4
- package/pipeline/multi-agent-refs/features/verify.md +83 -0
- package/pipeline/multi-agent-refs/features/visual-evidence.md +19 -19
- package/pipeline/multi-agent-refs/features/worktree-finalize.md +6 -6
- package/pipeline/multi-agent-refs/issue-jira-triad.md +10 -10
- package/pipeline/multi-agent-refs/knowledge.md +11 -11
- package/pipeline/multi-agent-refs/multi-repo-integration-build.md +13 -13
- package/pipeline/multi-agent-refs/payload-contracts.md +8 -8
- package/pipeline/multi-agent-refs/phases/log-format.md +10 -10
- package/pipeline/multi-agent-refs/phases/modes.md +30 -30
- package/pipeline/multi-agent-refs/phases/operations.md +21 -10
- package/pipeline/multi-agent-refs/phases/phase-0-init.md +25 -25
- package/pipeline/multi-agent-refs/phases/phase-1-plan.md +599 -0
- package/pipeline/multi-agent-refs/phases/{phase-3-dev.md → phase-2-dev.md} +129 -49
- package/pipeline/multi-agent-refs/phases/{phase-4-review.md → phase-3-review.md} +225 -107
- package/pipeline/multi-agent-refs/phases/{phase-6-commit.md → phase-4-commit.md} +23 -23
- package/pipeline/multi-agent-refs/phases/{phase-7-report.md → phase-5-report.md} +29 -29
- package/pipeline/multi-agent-refs/phases.md +44 -48
- package/pipeline/multi-agent-refs/picker-contract.md +1 -1
- package/pipeline/multi-agent-refs/progress-contract.md +6 -6
- package/pipeline/multi-agent-refs/readiness-review.md +1 -1
- package/pipeline/multi-agent-refs/rules.md +7 -7
- package/pipeline/multi-agent-refs/swiftui-guide.md +2 -2
- package/pipeline/multi-agent-refs/tracker-contract.md +31 -32
- package/pipeline/multi-agent-refs/unattended-contract.md +129 -0
- package/pipeline/multi-agent-refs/wiki-capture.md +14 -14
- package/pipeline/preferences-template.json +9 -1
- package/pipeline/rules/outside-the-pipeline.md +1 -1
- package/pipeline/schemas/agent-state.schema.json +50 -50
- package/pipeline/schemas/analysis-output.schema.json +2 -2
- package/pipeline/schemas/autopilot-config.schema.json +1 -1
- package/pipeline/schemas/code-graph.schema.json +1 -1
- package/pipeline/schemas/criteria-manifest.schema.json +1 -1
- package/pipeline/schemas/dev-critic-output.schema.json +1 -1
- package/pipeline/schemas/diff-risk.schema.json +1 -1
- package/pipeline/schemas/migrations/prefs-2.4.0-to-2.5.0.mjs +2 -2
- package/pipeline/schemas/migrations/prefs-2.6.0-to-2.7.0.mjs +31 -0
- package/pipeline/schemas/migrations/state-2.1.0-to-2.2.0.mjs +129 -0
- package/pipeline/schemas/phases.json +105 -0
- package/pipeline/schemas/plan-todos.schema.json +5 -5
- package/pipeline/schemas/planning-output.schema.json +1 -1
- package/pipeline/schemas/prefs.schema.json +100 -56
- package/pipeline/schemas/reviewer-output.schema.json +3 -3
- package/pipeline/schemas/route-config.schema.json +74 -0
- package/pipeline/schemas/scope-check.schema.json +1 -1
- package/pipeline/schemas/test-gap.schema.json +1 -1
- package/pipeline/schemas/token-budget.json +12 -18
- package/pipeline/schemas/triage-output.schema.json +6 -6
- package/pipeline/scripts/README.md +3 -3
- package/pipeline/scripts/_code-graph.mjs +2 -2
- package/pipeline/scripts/_run-paths.mjs +372 -0
- package/pipeline/scripts/_smoke-root.sh +1 -1
- package/pipeline/scripts/aggregate-metrics.mjs +65 -65
- package/pipeline/scripts/autopilot-arming.mjs +2 -1
- package/pipeline/scripts/autopilot-intake.mjs +2 -1
- package/pipeline/scripts/autopilot-runner.mjs +206 -2
- package/pipeline/scripts/build-references.mjs +2 -1
- package/pipeline/scripts/build-stack-plugins.mjs +10 -2
- package/pipeline/scripts/capture-evidence.sh +7 -2
- package/pipeline/scripts/capture-flush.sh +8 -8
- package/pipeline/scripts/capture-resume.sh +3 -3
- package/pipeline/scripts/classify-plan-safety.mjs +3 -2
- package/pipeline/scripts/cost-analyze.mjs +600 -0
- package/pipeline/scripts/cost-budget-check.mjs +4 -12
- package/pipeline/scripts/council-view.mjs +2 -1
- package/pipeline/scripts/crush-json.mjs +2 -1
- package/pipeline/scripts/diff-explain.mjs +7 -10
- package/pipeline/scripts/diff-risk-score.mjs +2 -1
- package/pipeline/scripts/doctor.mjs +140 -6
- package/pipeline/scripts/evidence-gate.mjs +9 -3
- package/pipeline/scripts/feedback-send.mjs +12 -2
- package/pipeline/scripts/gc-abandoned.sh +32 -16
- package/pipeline/scripts/gc-tmp.sh +1 -1
- package/pipeline/scripts/gc-worktrees.sh +12 -5
- package/pipeline/scripts/gen-facts.mjs +175 -0
- package/pipeline/scripts/gen-mode-dispatch.mjs +32 -37
- package/pipeline/scripts/gen-ref-toc.mjs +1 -1
- package/pipeline/scripts/github-ssh-setup.sh +64 -7
- package/pipeline/scripts/graph-mermaid.mjs +4 -2
- package/pipeline/scripts/graph-report.mjs +1 -1
- package/pipeline/scripts/jira-attach.sh +1 -1
- package/pipeline/scripts/keychain-save.sh +101 -30
- package/pipeline/scripts/learn-from-transcripts.mjs +3 -2
- package/pipeline/scripts/learning-curve.mjs +36 -31
- package/pipeline/scripts/log-metric.sh +17 -4
- package/pipeline/scripts/make-manifest.mjs +199 -0
- package/pipeline/scripts/memory-save.sh +1 -1
- package/pipeline/scripts/migrate-prefs.mjs +24 -6
- package/pipeline/scripts/migrate-state.mjs +94 -4
- package/pipeline/scripts/phase-banner.sh +26 -22
- package/pipeline/scripts/phase-tracker.sh +48 -10
- package/pipeline/scripts/plan-coverage-gate.mjs +8 -4
- package/pipeline/scripts/pre-commit-check.sh +7 -0
- package/pipeline/scripts/pre-push-check.sh +7 -0
- package/pipeline/scripts/purge.sh +23 -6
- package/pipeline/scripts/render-agent-log-cost.sh +10 -3
- package/pipeline/scripts/render-cost-summary.sh +9 -2
- package/pipeline/scripts/render-work-summary.sh +14 -7
- package/pipeline/scripts/review-file-filter.mjs +5 -3
- package/pipeline/scripts/review-scope.mjs +2 -1
- package/pipeline/scripts/routine-registry.mjs +2 -1
- package/pipeline/scripts/run-aggregator.mjs +26 -20
- package/pipeline/scripts/run-metrics.mjs +4 -2
- package/pipeline/scripts/runs-index.mjs +353 -0
- package/pipeline/scripts/scorecard-snapshot.mjs +178 -0
- package/pipeline/scripts/search-logs.sh +18 -0
- package/pipeline/scripts/smoke-cross-cli-behavior.sh +6 -6
- package/pipeline/scripts/smoke-schema-validation.sh +26 -7
- package/pipeline/scripts/test-gap-scan.mjs +2 -1
- package/pipeline/scripts/test-integrity-gate.mjs +2 -1
- package/pipeline/scripts/token-budget-report.mjs +13 -2
- package/pipeline/scripts/triage-memory.mjs +2 -2
- package/pipeline/scripts/update-issue-progress.sh +56 -7
- package/pipeline/scripts/usage-report.mjs +12 -1
- package/pipeline/scripts/validate-analysis-doc.mjs +75 -18
- package/pipeline/scripts/validate-code-graph.mjs +6 -3
- package/pipeline/scripts/validate-complaint-doc.mjs +2 -1
- package/pipeline/scripts/validate-diff-risk.mjs +6 -3
- package/pipeline/scripts/validate-planning.mjs +1 -1
- package/pipeline/scripts/validate-reviewer.mjs +1 -1
- package/pipeline/scripts/validate-state.mjs +45 -5
- package/pipeline/scripts/validate-test-gap.mjs +6 -3
- package/pipeline/scripts/validate-triage.mjs +6 -4
- package/pipeline/scripts/verify-citations.mjs +4 -2
- package/pipeline/scripts/verify.mjs +327 -0
- package/pipeline/scripts/worktree-finalize.sh +18 -9
- package/pipeline/scripts/write-state.mjs +154 -15
- package/pipeline/skills/.skill-manifest.json +37 -21
- package/pipeline/skills/.skills-index.json +104 -5
- package/pipeline/skills/shared/README.md +15 -6
- package/pipeline/skills/shared/core/apple-archive-compliance/SKILL.md +2 -2
- package/pipeline/skills/shared/core/google-play-compliance/SKILL.md +2 -2
- package/pipeline/skills/shared/core/multi-agent/SKILL.md +69 -71
- package/pipeline/skills/shared/core/multi-agent-autopilot/SKILL.md +3 -3
- package/pipeline/skills/shared/core/multi-agent-channels/SKILL.md +14 -14
- package/pipeline/skills/shared/core/multi-agent-diff-explain/SKILL.md +5 -5
- package/pipeline/skills/shared/core/multi-agent-graph/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-help/SKILL.md +25 -23
- package/pipeline/skills/shared/core/multi-agent-language/SKILL.md +2 -2
- package/pipeline/skills/shared/core/multi-agent-local/SKILL.md +2 -2
- package/pipeline/skills/shared/core/multi-agent-local-autopilot/SKILL.md +8 -8
- package/pipeline/skills/shared/core/multi-agent-manual-test/SKILL.md +6 -6
- package/pipeline/skills/shared/core/multi-agent-model/SKILL.md +71 -0
- package/pipeline/skills/shared/core/multi-agent-refactor/SKILL.md +3 -3
- package/pipeline/skills/shared/core/multi-agent-resume/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-resume-local/SKILL.md +7 -7
- package/pipeline/skills/shared/core/multi-agent-route-off/SKILL.md +39 -0
- package/pipeline/skills/shared/core/multi-agent-route-on/SKILL.md +76 -0
- package/pipeline/skills/shared/core/multi-agent-route-status/SKILL.md +59 -0
- package/pipeline/skills/shared/core/multi-agent-setup/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-status/SKILL.md +35 -11
- package/pipeline/skills/shared/core/multi-agent-steer/SKILL.md +2 -2
- package/pipeline/skills/shared/core/multi-agent-sync/SKILL.md +6 -5
- package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/package_app.sh +4 -1
- package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/setup_dev_signing.sh +4 -1
- package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/sign-and-notarize.sh +2 -1
- package/pipeline/skills/skills-index.md +13 -4
- package/pipeline/multi-agent-refs/phases/phase-1-analysis.md +0 -263
- package/pipeline/multi-agent-refs/phases/phase-2-planning.md +0 -344
- package/pipeline/multi-agent-refs/phases/phase-5-test.md +0 -182
|
@@ -32,8 +32,8 @@ Run all steps automatically:
|
|
|
32
32
|
```
|
|
33
33
|
Step 0: DOCTOR node $HOME/.claude/scripts/doctor.mjs - exit 2 or 4 STOPS the sync
|
|
34
34
|
Step 1: DETECT Compare timestamps, find stale targets
|
|
35
|
-
Step 2: COPILOT Claude Code -> Copilot CLI (instructions +
|
|
36
|
-
Step 2b: CODEX Claude Code -> Codex CLI (1 router skill +
|
|
35
|
+
Step 2: COPILOT Claude Code -> Copilot CLI (instructions + 60 sub-command skills)
|
|
36
|
+
Step 2b: CODEX Claude Code -> Codex CLI (1 router skill + 60 specs as refs + 8 agent TOML)
|
|
37
37
|
Step 3: REPO Claude Code -> pipeline repo (genericized, personal data scrub)
|
|
38
38
|
Step 3d: DEV-TOOLKIT Companion MCP server -> detect movement, ship gates, commit + publish
|
|
39
39
|
Step 4: WEBSITE Version + phase/model counts -> {website-host} (i18n + projects.ts)
|
|
@@ -228,16 +228,17 @@ When invoked with the `release` argument:
|
|
|
228
228
|
|-------------|-------------|
|
|
229
229
|
| `~/.claude/commands/multi-agent/{cmd}/SKILL.md` | `~/.copilot/skills/multi-agent-{cmd}/SKILL.md` |
|
|
230
230
|
|
|
231
|
-
**
|
|
231
|
+
**60 commands are synced** (canonical inventory - must match `cross-cli-contract.md` section 1; drift = contract violation):
|
|
232
232
|
|
|
233
233
|
```
|
|
234
234
|
analysis, analysis-jira, analysis-resolve, autopilot, autopilot-off,
|
|
235
235
|
autopilot-on, autopilot-status, build-optimize, channels, complaint-analysis,
|
|
236
236
|
create-jira, design-check, diff-explain, doctor, feedback, forget,
|
|
237
237
|
garbage-collect, graph, help, ios-coding-standard, issue, jira, kill,
|
|
238
|
-
language, local, local-autopilot, log, manual-test, prune-logs,
|
|
238
|
+
language, local, local-autopilot, log, manual-test, model, prune-logs,
|
|
239
239
|
prune-prompts, purge, refactor, resume, resume-local, review,
|
|
240
|
-
review-analysis, review-issue, review-jira,
|
|
240
|
+
review-analysis, review-issue, review-jira, route-off, route-on,
|
|
241
|
+
route-status, routines, save, scan, search,
|
|
241
242
|
setup, stack, status, steer, store-ready, sync, test, test-accessibility,
|
|
242
243
|
test-dark-mode, test-dynamic-type, test-screenshots, testflight-validation,
|
|
243
244
|
uninstall, update
|
package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/package_app.sh
CHANGED
|
@@ -19,7 +19,10 @@ else
|
|
|
19
19
|
BUILD_NUMBER=${BUILD_NUMBER:-1}
|
|
20
20
|
fi
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
# read -ra, not ( $ARCHES ): a bare expansion into an array splits on IFS and
|
|
23
|
+
# then GLOBS each word, so an ARCHES carrying a * builds for whatever files are
|
|
24
|
+
# in the working directory.
|
|
25
|
+
read -ra ARCH_LIST <<< "${ARCHES:-}"
|
|
23
26
|
if [[ ${#ARCH_LIST[@]} -eq 0 ]]; then
|
|
24
27
|
HOST_ARCH=$(uname -m)
|
|
25
28
|
ARCH_LIST=("$HOST_ARCH")
|
|
@@ -15,7 +15,10 @@ fi
|
|
|
15
15
|
echo "Creating self-signed certificate '$CERT_NAME'..."
|
|
16
16
|
|
|
17
17
|
TEMP_CONFIG=$(mktemp)
|
|
18
|
-
trap
|
|
18
|
+
# Single-quoted on purpose: the path is read when the trap FIRES, not when it is
|
|
19
|
+
# installed. Double quotes bake in whatever the variable held at install time,
|
|
20
|
+
# which is a template users copy into scripts where the order differs.
|
|
21
|
+
trap 'rm -f "$TEMP_CONFIG"' EXIT
|
|
19
22
|
|
|
20
23
|
cat > "$TEMP_CONFIG" <<EOFCONF
|
|
21
24
|
[ req ]
|
|
@@ -17,7 +17,8 @@ echo "$APP_STORE_CONNECT_API_KEY_P8" | sed 's/\\n/\n/g' > /tmp/app-store-connect
|
|
|
17
17
|
trap 'rm -f /tmp/app-store-connect-key.p8 /tmp/${APP_NAME}Notarize.zip' EXIT
|
|
18
18
|
|
|
19
19
|
ARCHES_VALUE=${ARCHES:-"arm64 x86_64"}
|
|
20
|
-
|
|
20
|
+
# See package_app.sh: a bare expansion into an array globs as well as splits.
|
|
21
|
+
read -ra ARCH_LIST <<< "${ARCHES_VALUE}"
|
|
21
22
|
for ARCH in "${ARCH_LIST[@]}"; do
|
|
22
23
|
swift build -c release --arch "$ARCH"
|
|
23
24
|
done
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
> Auto-generated by `pipeline/scripts/build-skills-index.mjs` - do not hand-edit.
|
|
4
4
|
> Regenerate with `node pipeline/scripts/build-skills-index.mjs`.
|
|
5
5
|
|
|
6
|
-
**
|
|
6
|
+
**216 skills** across 2 groups.
|
|
7
7
|
|
|
8
8
|
| Group | Name | Platform | Description |
|
|
9
9
|
|-------|------|----------|-------------|
|
|
@@ -94,14 +94,19 @@
|
|
|
94
94
|
| external | `monorepo-architect` | - | Expert in monorepo architecture, build systems, and dependency management at scale. Masters Nx, Turborepo, Bazel, and Lerna for efficient mu |
|
|
95
95
|
| core | `multi-agent` | - | Task orchestrator: runs the full pipeline from a Jira ID or GitHub Issue URL - analysis → plan → TDD development → parallel review (Fable |
|
|
96
96
|
| core | `multi-agent-analysis` | - | Standalone feature-spec analysis. Two profiles picked at intake: global (23-section development handoff, 8 of them in Lite mode) or corporat |
|
|
97
|
+
| core | `multi-agent-analysis-jira` | - | Turn a rendered analysis document into a Jira story tree: derive stories from the document's own rule ids, check coverage both ways, preview |
|
|
97
98
|
| core | `multi-agent-analysis-resolve` | - | Resolve the Section 20 Risks and Open Questions of an analysis v3 document one row at a time: up to 3 source-labeled answer candidates per r |
|
|
98
99
|
| core | `multi-agent-autopilot` | - | Launch any task in autopilot mode: skips every confirmation, runs end-to-end autonomously. Use when a task should run end to end with no con |
|
|
100
|
+
| core | `multi-agent-autopilot-off` | - | Turn off continuous mode on this machine: the schedule is removed, work already running finishes, the repo selection is kept. Use when the m |
|
|
101
|
+
| core | `multi-agent-autopilot-on` | - | Turn on continuous mode on THIS machine: pick the repos it watches; labelled GitHub issues and assigned+labelled Jira items then run in a wo |
|
|
102
|
+
| core | `multi-agent-autopilot-status` | - | Show what continuous mode is doing here: what runs at which phase, what is queued, what waits for an answer, what PRs it opened today. Use w |
|
|
99
103
|
| core | `multi-agent-build-optimize` | - | Wrapper that dispatches to xcode-build-orchestrator on iOS repos. Benchmarks the current Xcode build, runs compilation / project / SPM analy |
|
|
100
104
|
| core | `multi-agent-channels` | - | Multi-channel reporter - Jira/Confluence/Wiki/PR description. Multi-select channels + content, humanizer pass, reviewer-preserving Bitbuck |
|
|
101
105
|
| core | `multi-agent-complaint-analysis` | - | Customer-complaint triage. Ingests complaints (paste, csv/xlsx/txt/json file, Jira issue, Confluence URL), fetches Graylog evidence per trx/ |
|
|
102
106
|
| core | `multi-agent-create-jira` | - | Create a standards-compliant Jira issue (Task / Bug / Story): asks the type, mines project conventions, drafts from a standard template with |
|
|
103
107
|
| core | `multi-agent-design-check` | - | Mock-mode vs Figma design audit (iOS / Android, local-only). Pick repo + module, gate on mock support, enumerate every state driver into a c |
|
|
104
|
-
| core | `multi-agent-diff-explain` | - | Map Phase
|
|
108
|
+
| core | `multi-agent-diff-explain` | - | Map Phase 3 triage findings to branch diff lines. Read-only post-hoc command, used after review to answer 'which finding lines up with which |
|
|
109
|
+
| core | `multi-agent-doctor` | - | Health check for the installed pipeline: layout, preferences, credentials, hooks and host capabilities, each with one actionable step. Exit |
|
|
105
110
|
| core | `multi-agent-feedback` | - | Send one message to the maintainer: a bug, an idea or a question. Only the text you type is sent - no logs, no repo names, no paths. Shows t |
|
|
106
111
|
| core | `multi-agent-forget` | - | Remove a saved /multi-agent routine (created by /multi-agent:save): deletes its local-only command and its registry entry. Asks which one an |
|
|
107
112
|
| core | `multi-agent-garbage-collect` | - | Sweep leftover /tmp scratch (picker state, review diffs, channel payloads, analysis drafts) from past runs. Dry-run first; confirms before d |
|
|
@@ -113,19 +118,23 @@
|
|
|
113
118
|
| core | `multi-agent-kill` | - | Stop the given task, then remove its worktree and branch. Asks for confirmation. Use when a running or stuck task should be stopped and its |
|
|
114
119
|
| core | `multi-agent-language` | - | Toggle outputLanguage (assistant explanations, picker questions, PR/Jira/Confluence bodies). promptLanguage is fixed to English; commit mess |
|
|
115
120
|
| core | `multi-agent-local` | - | Full pipeline in local mode - no worktree, runs directly on the current branch. Use when the full pipeline should run on the current branc |
|
|
116
|
-
| core | `multi-agent-local-autopilot` | - | Full pipeline + local + autopilot - no worktree, no confirmations, all
|
|
121
|
+
| core | `multi-agent-local-autopilot` | - | Full pipeline + local + autopilot - no worktree, no confirmations, all 6 phases run end-to-end on the current branch. Use when the full pi |
|
|
117
122
|
| core | `multi-agent-log` | - | Show the agent-log.md for the given task. With no ID, shows the most recent task. Use when asked what a task did, or to read its log. |
|
|
118
123
|
| core | `multi-agent-manual-test` | - | Switch to the active task's branch and prepare it for manual testing in Xcode. Phase 5 standalone (the UI Bug Hunter lives at multi-agent-te |
|
|
124
|
+
| core | `multi-agent-model` | - | Turn the top model rung on or off and keep the cost ledger's pricing in step with it. Use when asked to enable or disable Fable, or which mo |
|
|
119
125
|
| core | `multi-agent-prune-logs` | - | Delete per-task project logs under ~/.claude/logs/multi-agent (filter by age/project/task). Audit trail + metrics are preserved. Dry-run fir |
|
|
120
126
|
| core | `multi-agent-prune-prompts` | - | Zero-base prompt review: measure the always-on instruction footprint, classify every rule block, propose keep/trial-removal/delete; applies |
|
|
121
127
|
| core | `multi-agent-purge` | - | ⚠️ Wipes every worktree, branch, log, and state file. Irreversible; asks for double confirmation. Use when every worktree, branch, log and s |
|
|
122
128
|
| core | `multi-agent-refactor` | - | Analyse the project: extract adapted best-practices, hunt real bugs + improvement areas, check upstream drift of derived skills, research th |
|
|
123
129
|
| core | `multi-agent-resume` | - | Resume a stopped or failed task from the phase where it left off. Use when a task stopped or failed and should carry on from where it left o |
|
|
124
|
-
| core | `multi-agent-resume-local` | - | Continue already-done LOCAL work through the pipeline tail: Review
|
|
130
|
+
| core | `multi-agent-resume-local` | - | Continue already-done LOCAL work through the pipeline tail: Review (with its build gate) → Commit/PR → Report (technical analysis + Jira tes |
|
|
125
131
|
| core | `multi-agent-review` | - | Run parallel review on a branch diff or a Pull Request: 3 models on Claude Code (Fable + Opus + Sonnet), 3 models on Copilot CLI (GPT + Opus |
|
|
126
132
|
| core | `multi-agent-review-analysis` | - | Review a written analysis document instead of a diff: resolve it from a path, a Confluence page or a Jira issue, run the deterministic gates |
|
|
127
133
|
| core | `multi-agent-review-issue` | - | Assess whether a GitHub issue is ready for multi-agent development: fetch it, grade scope / acceptance criteria / repro / design / API / sta |
|
|
128
134
|
| core | `multi-agent-review-jira` | - | Assess whether a Jira issue is ready for multi-agent development: fetch it, grade scope / acceptance criteria / repro / design / API / stack |
|
|
135
|
+
| core | `multi-agent-route-off` | - | Disable model routing and keep its rules, so turning it back on does not re-ask for the same configuration. Use when asked to turn model rou |
|
|
136
|
+
| core | `multi-agent-route-on` | - | Enable policy-driven model routing: pick a strategy, a scope, and the rules that say which rung a call lands on. Use when asked to turn mode |
|
|
137
|
+
| core | `multi-agent-route-status` | - | Report model routing: whether it is armed, which rule applies where, which rung the last dispatches took, and what this run has cost. Use wh |
|
|
129
138
|
| core | `multi-agent-routines` | - | List your saved /multi-agent routines (from /multi-agent:save) with what each one does, rendered in outputLanguage. Use when asked which sav |
|
|
130
139
|
| core | `multi-agent-save` | - | Save a recurring job as a reusable /multi-agent:<name> command. Reviews the conversation + your CLAUDE.md for candidate routines, you pick o |
|
|
131
140
|
| core | `multi-agent-scan` | - | Skill security scan: walks local skill directories against a tiered pattern catalog. Use when local skill directories need checking for unsa |
|
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
### Phase 1: Analysis (Sonnet)
|
|
2
|
-
|
|
3
|
-
> **TLDR** - Sonnet-driven codebase exploration: the `explorer` persona declares `preferredModel: sonnet` (haiku when the fallback ladder engages). Detects if the issue is already fixed (git blame, closed PRs), then launches parallel Explore sub-agents to map the affected code paths. Outputs: impact analysis, stack detection (auto-selects platform guide), relevant files, risk areas. Feeds Phase 2 planning.
|
|
4
|
-
|
|
5
|
-
<!-- progress-contract: applied -->
|
|
6
|
-
Progress emission per `$HOME/.claude/multi-agent-refs/progress-contract.md` - lines for each Explore dispatch, each finish, analyst synthesis start, `analysis.json` write.
|
|
7
|
-
|
|
8
|
-
#### Step 0 - Prior Fix Detection
|
|
9
|
-
|
|
10
|
-
Before any analysis, check if this issue was already fixed by someone else. Three signals (git commit grep on issue ID over 8 weeks, recent file-path history over 4 weeks, Jira/issue comments). On hit → prompt: Verify (cherry-pick path) / Stop (cleanup + `stopped_already_fixed` state) / Continue. Miss → Step 1. Full check commands, prompt block, and cleanup commands: `$HOME/.claude/multi-agent-refs/features/prior-fix-detection.md`.
|
|
11
|
-
|
|
12
|
-
#### Step 1 - Knowledge Injection (cached context)
|
|
13
|
-
|
|
14
|
-
Before launching Explore agents, check if project knowledge exists:
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
$HOME/.claude/knowledge/{project-name}/
|
|
18
|
-
architecture.md - file structure, module map, dependency graph
|
|
19
|
-
patterns.md - patterns in use, conventions, idioms
|
|
20
|
-
gotchas.md - encountered issues, edge cases and solutions
|
|
21
|
-
decisions.md - architectural decisions and rationale (ADR-lite)
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
Also read project-level CLAUDE.md if exists:
|
|
25
|
-
|
|
26
|
-
- `$PROJECT_ROOT/CLAUDE.md`
|
|
27
|
-
- `$PROJECT_ROOT/.claude/CLAUDE.md`
|
|
28
|
-
|
|
29
|
-
**Per-repo memory injection (opt-in via `prefs.global.perRepoMemory`):**
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
bash $HOME/.claude/scripts/memory-load.sh "$PROJECT_ROOT" "$TASK_TITLE $TASK_DESCRIPTION"
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
Exit 0 with empty output = pref off or no memory on disk - skip. Otherwise the script emits a `<repo-memory path="...">...</repo-memory>` block of MEMORY.md pointers suitable for direct injection into the analysis prompt. Passing the task text ranks the pointers against it instead of printing the first thirty; individual memory files are read on-demand when a pointer looks relevant.
|
|
36
|
-
|
|
37
|
-
**Durable knowledge (on by default via `prefs.global.learningsLedger.enabled`):** two blocks, and where each goes is part of the contract - see `$HOME/.claude/multi-agent-refs/prompt-assembly.md`.
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
# HEAD of the prompt: task-independent, byte-stable, so it caches.
|
|
41
|
-
node $HOME/.claude/scripts/learnings-ledger.mjs profile 2>/dev/null
|
|
42
|
-
# END of the prompt, after the task text: ranked against this task.
|
|
43
|
-
node $HOME/.claude/scripts/learnings-ledger.mjs brief --max "${prefs_learningsLedger_maxBriefEntries:-20}" \
|
|
44
|
-
--task "$TASK_TITLE $TASK_DESCRIPTION" 2>/dev/null
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Exit 2 (empty ledger) = skip silently. Lines end with an `L:<id>` pointer; `show --id L:<id>` returns the full entry. Skip both when `injectIntoAnalysis = false`. Context, not commands - current scope decides. Then log the injection so recall quality stays measurable:
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
bash $HOME/.claude/scripts/log-metric.sh "$TASK_ID" 1 memory.injected \
|
|
51
|
-
kind=<profile|task-relevant> rows=$N chars=$C
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
**If knowledge files exist and are fresh** (modified within last 90 days - see knowledge.md staleness rules):
|
|
55
|
-
|
|
56
|
-
1. Read relevant knowledge files based on task description
|
|
57
|
-
2. Use knowledge to **narrow Explore scope** - instead of "very thorough" full scan, do targeted exploration of only unknown/changed areas
|
|
58
|
-
3. Log: "Phase 1: Knowledge injected ({N} files), targeted explore"
|
|
59
|
-
|
|
60
|
-
**If no knowledge exists** (first time for this project):
|
|
61
|
-
|
|
62
|
-
1. Launch full Explore agents as before
|
|
63
|
-
2. Log: "Phase 1: Full explore (no cached knowledge)"
|
|
64
|
-
|
|
65
|
-
#### Step 1.4 - Figma evidence capture (when task carries a Figma reference)
|
|
66
|
-
|
|
67
|
-
When `state.contextLinks[]` or the task description contains a Figma reference, Phase 1 MUST collect the canonical evidence record. **Phase 0 Step 0.5 already resolved the tier** and the credential - read `state.figmaAccess.tier` and fetch with that tier's tool set; do not re-probe. Chain, tiers and halt conditions: `$HOME/.claude/multi-agent-refs/rules.md` "Figma Access Tier".
|
|
68
|
-
|
|
69
|
-
What Phase 1 owns is the record. Every frame gets one entry in `state.evidence.figma[]`:
|
|
70
|
-
|
|
71
|
-
| Field | Tier 1 (MCP) | Tier 2 (REST) | Tier 3 (screenshot) |
|
|
72
|
-
|---|---|---|---|
|
|
73
|
-
| `nodeId`, `screenshotUrl`, `tokens[]`, `textLayers[]` | required | required | required |
|
|
74
|
-
| `codeConnectSnippets[]` | from `CodeConnectSnippet` blocks | from repo `*.figma.swift` / `*.figma.kt` keyed on `fileKey`+`nodeId`; empty -> Open Question | always `[]` -> forced Open Question |
|
|
75
|
-
| `tier` | `1` | `2` | `3` |
|
|
76
|
-
|
|
77
|
-
Halt if all three tiers fail; never substitute primitives or invent layout from prose.
|
|
78
|
-
|
|
79
|
-
**Spacing goes in by token NAME, per atom - never a pixel number.** `tokens[]` must
|
|
80
|
-
carry each frame's spacing/padding as Figma names them (`Spacing/12`, edge `4`), keyed
|
|
81
|
-
to the atom. Phase 3 cannot call Figma, so what is missed here is gone: one run guessed
|
|
82
|
-
`16` where the frame said `Spacing/12` and the sheet was rebuilt. A pixel number also
|
|
83
|
-
cannot map back to a token. No spacing entries on a UI frame is a **capture failure**,
|
|
84
|
-
not an empty frame - Open Question and halt. Canonical chain reference: `$HOME/.claude/rules/figma-pipeline.md` "MUST: Figma access - 3-tier fallback chain".
|
|
85
|
-
|
|
86
|
-
**Telemetry (required for the no-MCP gate):** Tier 1 uses `mcp__claude_ai_Figma__*` tools. Every such MCP invocation MUST append an entry to `state.telemetry.mcpCalls[]` as `{ "tool": "<full mcp tool name>", "phase": 1, "timestamp": "<ISO-8601>" }`. This is the only phase permitted to record `phase: 1` (or `0`) entries; `smoke-no-mcp-in-dev-phases.sh` fails the run if any entry carries `phase >= 2`. Recording is what makes that BLOCKING contract enforceable - an MCP call left unrecorded defeats the gate, so record every one.
|
|
87
|
-
|
|
88
|
-
Progress lines:
|
|
89
|
-
|
|
90
|
-
```
|
|
91
|
-
→ figma evidence: <N> frames captured (tier=<n>, code-connect=<M>, open-questions=<K>)
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
#### Step 1.45 - Reuse discovery (BLOCKING for new services, entities, mappers)
|
|
95
|
-
|
|
96
|
-
Before proposing any new service call, entity or mapper, search for what already
|
|
97
|
-
covers it. Record hits under `state.reuse[]` and cite them in the doc; proposing new
|
|
98
|
-
code over a hit needs a one-line reason.
|
|
99
|
-
|
|
100
|
-
Search for: a **wrapper** over the same endpoint (especially one supplying parameters
|
|
101
|
-
the generated call leaves optional); an **entity** for the same concept (module's
|
|
102
|
-
shared entities first, then siblings); a **mapper** over the same response; a **screen**
|
|
103
|
-
doing the same interaction.
|
|
104
|
-
|
|
105
|
-
Why blocking: one run proposed a new repository over an endpoint a sibling already
|
|
106
|
-
wrapped **with its country parameter**, called the generated method without it, and
|
|
107
|
-
re-invented an entity the module had. Half that branch's commits went to converging
|
|
108
|
-
back. "Copy X and rename it" is the reuse answer, not a hint - name X's files.
|
|
109
|
-
|
|
110
|
-
#### Step 1.5 - External Context Injection (`state.contextLinks[]`)
|
|
111
|
-
|
|
112
|
-
Phase 0 Step 1b catalogued every typed external link from the task description into `state.contextLinks[]`. Phase 1 dispatches each entry to its matching fetcher (crashlytics, fortify, graylog, swagger, confluence, figma, generic-doc) and prepends results under a **Referenced External Sources** section in the analysis prompt - so the agent doesn't re-discover what the ticket already pointed at. `state.graylogContext` (advisory) and `state.relatedIssues[]` (sibling issues) are injected there too. Failures never fatal (a non-zero fetcher exit is marked skipped and the analysis still runs, exactly as for crashlytics); pending refs are advisories. Full dispatch table, exit-code handling, prompt injection shape, log line shape: `$HOME/.claude/multi-agent-refs/features/external-context-injection.md`.
|
|
113
|
-
|
|
114
|
-
**Log line shape** (progress contract):
|
|
115
|
-
|
|
116
|
-
```
|
|
117
|
-
→ context injection: total=<N>, fetched=<n>, pending=<n>, by-type={swagger:F/P, confluence:F/P, ...}
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
#### Step 2 - Stack Detection
|
|
121
|
-
|
|
122
|
-
Two questions shared one answer here, and the shared answer was wrong on both.
|
|
123
|
-
|
|
124
|
-
**What the repo is BUILT WITH** - one owner, no marker list in this file:
|
|
125
|
-
|
|
126
|
-
```bash
|
|
127
|
-
eval "$(bash $HOME/.claude/lib/stack-detect.sh "$PROJECT_ROOT")"
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
Persist `MA_STACKS` as `state.stacks[]` (a subset of `ios android web backend`,
|
|
131
|
-
always in that order) and `MA_STACK_WHY` as `state.stackWhy`. Empty is a real
|
|
132
|
-
answer meaning no marker matched; `stackWhy` separates that from a directory that
|
|
133
|
-
could not be read, and a caller that cannot tell those apart treats an unreadable
|
|
134
|
-
repo as a language-free one. `state.stacks[]` routes toolkits, through
|
|
135
|
-
`pluginsForStacks()` in `$HOME/.claude/scripts/_stack-routing.mjs`. Do not derive
|
|
136
|
-
plugin names here.
|
|
137
|
-
|
|
138
|
-
The table that used to live here scanned at depth 2, and `AndroidManifest.xml`
|
|
139
|
-
sits at `<module>/src/main/` - depth 4 in every multi-module app - so **Android
|
|
140
|
-
was never detected**. The owner goes to depth 5 for that one file, prunes
|
|
141
|
-
submodules (a vendored checkout ships its own `Package.swift`, which reported a
|
|
142
|
-
Compose app as iOS) and checks the root first so traversal order cannot decide.
|
|
143
|
-
|
|
144
|
-
**What the code is WRITTEN IN** - a different axis with its own field.
|
|
145
|
-
`state.detectedStack[]` stays the language answer (`ios`, `python`, `node`, `go`,
|
|
146
|
-
`docker`, `monorepo`): `graph-build.mjs --stack` takes `ios|android|node|python|go`
|
|
147
|
-
and has no notion of `web` or `backend`. Folding the two together is what made a
|
|
148
|
-
Gradle-built JVM service read as an Android app.
|
|
149
|
-
|
|
150
|
-
This informs:
|
|
151
|
-
|
|
152
|
-
- Phase 3: which build/test commands to use
|
|
153
|
-
- Phase 4: which deterministic gates and reviewer skills to load
|
|
154
|
-
- Phase 6: which PR template fits best
|
|
155
|
-
|
|
156
|
-
#### Step 2.5 - Repo Map Injection (advisory, opt-in)
|
|
157
|
-
|
|
158
|
-
Gated by `prefs.global.repoMap.enabled` (default: `false`). When enabled, runs `$HOME/.claude/scripts/repo-map.mjs` and injects the budgeted result into each Explore prompt as `${REPO_MAP}`. Aider-style: deterministic, no embeddings, sub-second, advisory only. Full wiring (helper invocation, properties, when-to-enable): `$HOME/.claude/multi-agent-refs/features/repo-map.md`.
|
|
159
|
-
|
|
160
|
-
#### Step 2.6 - Code Graph Injection (advisory, opt-in)
|
|
161
|
-
|
|
162
|
-
Gated by `prefs.global.codeGraph.enabled` (default: `false`). With a rule file for `detectedStack`, Phase 1 refreshes the graph and queries it; `graph-affected` feeds `analysis.touchedAreas[]`. Zero API cost, read-only. Commands and measurements: `$HOME/.claude/multi-agent-refs/features/code-graph.md`.
|
|
163
|
-
|
|
164
|
-
**A valid result REPLACES the opening sweep** rather than sitting beside it: Explore starts from those files and walks outward, with no broad `Glob`/`Grep` pass first - running both pays twice, and the second re-derives what the graph said. No graph (missing rule, stale, or disabled) leaves the previous behaviour untouched; a task naming a symbol or path is still grepped directly.
|
|
165
|
-
|
|
166
|
-
#### Step 3 - Codebase Exploration
|
|
167
|
-
|
|
168
|
-
Launch parallel Explore agents to scan codebase:
|
|
169
|
-
|
|
170
|
-
- Related files to the task
|
|
171
|
-
- Existing patterns and conventions
|
|
172
|
-
- Potential impact areas
|
|
173
|
-
|
|
174
|
-
Use `subagent_type: "Explore"` with thoroughness scaled to task size AND knowledge availability (first match wins):
|
|
175
|
-
|
|
176
|
-
- A fresh code graph answered the task's query with a ranked file set (Step 2.6) → "light" (the starting set is already narrowed; explore outward from it, do not re-scan)
|
|
177
|
-
- `taskType` is `bugfix`/`chore` AND scope is small (single named file, or a referenced crash/stack frame that pinpoints the site) → "light" (cheapest - scan only the named area + its direct callers)
|
|
178
|
-
- Knowledge exists → "medium" (targeted, cheaper)
|
|
179
|
-
- No knowledge, or `taskType` is `feature`/`refactor`/`component` → "very thorough" (full scan, first-time investment)
|
|
180
|
-
|
|
181
|
-
The light tier keeps a one-line bug fix from triggering a full-repo scan; pairing it with the deterministic `taskType` (Phase 0 Step 7) prevents the cheap path from firing on feature work.
|
|
182
|
-
|
|
183
|
-
**Dispatch resilience (required).** Explore agents run in parallel and the analyst synthesis waits on them, so a single stalled agent hangs the phase. Bound each Explore dispatch by a wall-clock budget (`EXPLORE_TIMEOUT_SECONDS`, default 180). If an agent has not returned by the budget: log `explore.timeout agent=<id>`, drop that agent's slice, and synthesize from the agents that did return. Proceed as long as at least one Explore agent returned; if zero returned, retry the cheapest single Explore once, then HALT with `ERR: no Explore agent returned within ${EXPLORE_TIMEOUT_SECONDS}s; resume with /multi-agent:resume #N.`. Never block indefinitely on a slow or dead dispatch.
|
|
184
|
-
|
|
185
|
-
#### Step 4 - Analysis document (the design contract Phase 2 and Phase 3 demand)
|
|
186
|
-
|
|
187
|
-
Phase 2 and Phase 3 pre-flights BLOCK on `analysis/<feature-slug>-<platform>.md`. **This step produces it.**
|
|
188
|
-
|
|
189
|
-
**When it runs.** From signals Phase 0 already computed:
|
|
190
|
-
|
|
191
|
-
| `taskType` | Figma reference in `state.contextLinks[]` | Document |
|
|
192
|
-
|---|---|---|
|
|
193
|
-
| `feature` · `refactor` · `component` | any | **produced** |
|
|
194
|
-
| `bugfix` · `chore` | present | **produced** |
|
|
195
|
-
| `bugfix` · `chore` | absent | **skipped** - record `state.analysis.docStatus = "not-applicable"` |
|
|
196
|
-
|
|
197
|
-
`analysisPhase.forceFull` (default `false`) overrides the skip row, for a small change that must still leave a spec behind. `analysisPhase.mode` sets depth: `auto` is Lite on the skip-row shape and Full otherwise; `full` / `lite` pin it.
|
|
198
|
-
|
|
199
|
-
A fresh document is also skipped when one already exists for this feature and platform AND its front-matter `evidence_digest` still matches (Locked 27 cache); record `docStatus = "reused"`.
|
|
200
|
-
|
|
201
|
-
**How it runs.** Load `$HOME/.claude/multi-agent-refs/analysis/` on demand, in order: `locked.md` (the 31 binding decisions) then `evidence.md`, `synthesis.md`, `render.md`. Intake is NOT re-asked; platform, repos and account come from Phase 0 state. Autopilot auto-approves the Phase 2a convention preview and writes the local file, because it may not ask.
|
|
202
|
-
|
|
203
|
-
**Where it lands.** `<worktree>/analysis/<feature-slug>-<platform>.md`, one file per platform in `state.analysisSpec.platforms[]`. Persist the paths to `state.analysis.docPath[]` and set `docStatus` to `produced` | `reused` | `not-applicable`. Also persist `state.run.lastAnalysisDigest` (this document's `evidence_digest`) and `state.run.analysisBaseCommit` (`git rev-parse HEAD`). Phase 3's freshness check reads both; unwritten, it has nothing to compare and passes silently. Whether the file is committed with the work is `prefs.global.analysisPhase.commitDoc` (default `true`), read at Phase 6.
|
|
204
|
-
|
|
205
|
-
**The gate is not optional.** `node $HOME/.claude/scripts/validate-analysis-doc.mjs <file>` must exit 0 for every produced file; non-zero fails CLOSED like the JSON validator below (rework once, then halt).
|
|
206
|
-
|
|
207
|
-
Progress line: `→ analysis doc: <produced|reused|not-applicable> (<N> platform, validator <pass|pass-after-rework>)`
|
|
208
|
-
|
|
209
|
-
#### Output contract
|
|
210
|
-
|
|
211
|
-
Two artefacts, both read downstream: `state.analysis` (the object below, for Phase 2 decomposition) and the Step 4 document (Phase 2 pre-flight + Phase 3's sole design source, Locked 30).
|
|
212
|
-
|
|
213
|
-
Phase 1 produces an object conforming to `$HOME/.claude/schemas/analysis-output.schema.json` and persists it to `state.analysis`. Required fields (exact names per the schema): `stack` (detected stack identifier + primary language), `touchedAreas[]` (path + why), `risks[]` (existing-code hazards/observations the planner must respect - each `{risk, severity, mitigation}`; use an empty array when none), `summary` (one-paragraph human-readable). Phase 2 reads this object as its sole input - see `phase-2-planning.md`'s Input contract.
|
|
214
|
-
|
|
215
|
-
**Required: validator gate (deterministic) - run on the persisted file immediately after the analysis object is produced; the validator's exit code decides, not the LLM turn:**
|
|
216
|
-
|
|
217
|
-
```bash
|
|
218
|
-
ANALYSIS_FILE="$WORKTREE/.pipeline/analysis.json"
|
|
219
|
-
mkdir -p "$(dirname "$ANALYSIS_FILE")"
|
|
220
|
-
printf '%s' "$ANALYSIS_JSON" > "$ANALYSIS_FILE"
|
|
221
|
-
node $HOME/.claude/scripts/validate-analysis.mjs "$ANALYSIS_FILE"
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
Progress line: ` → checking validator validate-analysis`
|
|
225
|
-
|
|
226
|
-
Non-zero exit fails CLOSED: emit the validator stderr + `errors[]` verbatim, attempt ONE self-correction rework (re-invoke the explorer with the errors quoted, overwrite `$ANALYSIS_FILE`), re-run the validator. If it fails again -> HALT the phase with recovery hint: `ERR: analysis output failed validate-analysis.mjs twice. Inspect $ANALYSIS_FILE against $HOME/.claude/schemas/analysis-output.schema.json, then resume with /multi-agent:resume #N.` Record `agent-state.phases["1"].validator` (`pass` | `pass-after-rework` | `halted`).
|
|
227
|
-
|
|
228
|
-
Log: "Phase 1: Analysis - stack:{stacks} lang:{detectedStack} | {N} files identified, {summary}"
|
|
229
|
-
|
|
230
|
-
#### Telemetry - token forwarding
|
|
231
|
-
|
|
232
|
-
Forward the explorer call's token totals into the tracker so Phase 7's Cost Breakdown captures Phase 1:
|
|
233
|
-
|
|
234
|
-
```bash
|
|
235
|
-
LOG_METRIC_FORWARD_TO_TRACKER=1 $HOME/.claude/scripts/log-metric.sh "$TASK_ID" 1 analysis.completed \
|
|
236
|
-
model=sonnet tokens_in=$IN tokens_out=$OUT duration_ms=$DUR
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
Best-effort. See `$HOME/.claude/multi-agent-refs/progress-contract.md#token-telemetry-forwarding` for the canonical contract.
|
|
240
|
-
|
|
241
|
-
#### Prior-Art Enrichment (advisory)
|
|
242
|
-
|
|
243
|
-
After the explorer returns its summary, consult the per-repo triage corpus for similar past tasks. Inject up to 3 matches into the analysis output as `priorArt[]` so Phase 2 planning can read them. Disabled when `prefs.global.priorArtEnrichment.enabled = false`.
|
|
244
|
-
|
|
245
|
-
```bash
|
|
246
|
-
PRIOR=$(node $HOME/.claude/scripts/triage-memory.mjs query \
|
|
247
|
-
--issue "$TASK_TITLE $TASK_DESCRIPTION" --top 3 2>/dev/null | jq -c '.hits // []')
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
Hits are relevance-ranked, and a query matching nothing returns nothing. Each hit carries an `id`: `triage-memory.mjs show --id <id>` returns the full row.
|
|
251
|
-
|
|
252
|
-
Treat hits as **context only** - they are past Phase 4 verdicts, not prescriptions. Useful when the new task touches the same files or symbols as a previous run.
|
|
253
|
-
|
|
254
|
-
---
|
|
255
|
-
|
|
256
|
-
## Token telemetry - invoke after every LLM call
|
|
257
|
-
|
|
258
|
-
```bash
|
|
259
|
-
bash $HOME/.claude/scripts/phase-tracker.sh tokens 1 <input_count> <output_count>
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
Contract and rationale: `progress-contract.md` -> Token telemetry forwarding.
|
|
263
|
-
|