@mmerterden/multi-agent-pipeline 20.2.1 → 20.3.1
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 +919 -1
- package/README.md +104 -81
- package/README.tr.md +103 -62
- package/docs/FIGMA_PIPELINE.md +35 -35
- package/docs/adr/0006-skills-core-external-split.md +1 -1
- package/docs/adr/0007-multi-tool-adapter-framework.md +6 -0
- package/docs/adr/0008-installer-modularization-and-secret-leak-defense.md +7 -0
- package/docs/architecture.md +50 -14
- package/docs/best-practices.md +1 -1
- package/docs/ecosystem.md +56 -32
- package/docs/facts.json +10 -10
- package/docs/features.md +97 -5
- package/docs/recovery-guide.md +7 -14
- package/docs/server-readiness.md +31 -24
- package/index.js +1 -1
- package/install/_common.mjs +3 -5
- package/install/_platform-filter.mjs +23 -1
- package/install/_unattended-profile.mjs +321 -75
- package/install/claude.mjs +51 -10
- package/install/codex.mjs +2 -0
- package/install/copilot.mjs +2 -0
- package/install/index.mjs +30 -17
- package/install/templates/claude-hooks.json +16 -5
- package/install/templates/copilot-instructions.md +1 -1
- package/install/templates/multi-agent-autopilot-awake.plist.template +48 -0
- package/install/templates/multi-agent-autopilot.plist.template +12 -5
- package/install/unattended-profile-legacy.json +80 -0
- package/manifest.json +617 -483
- package/package.json +8 -3
- package/pipeline/agents/code-reviewer.md +10 -0
- package/pipeline/agents/plan-critic.md +98 -0
- package/pipeline/agents/security-auditor.md +10 -0
- package/pipeline/agents/task-clarifier.md +10 -0
- package/pipeline/commands/multi-agent/SKILL.md +2 -2
- package/pipeline/commands/multi-agent/analysis/SKILL.md +6 -2
- package/pipeline/commands/multi-agent/analysis-jira/SKILL.md +12 -1
- package/pipeline/commands/multi-agent/analysis-resolve/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/autopilot/SKILL.md +6 -2
- package/pipeline/commands/multi-agent/autopilot-off/SKILL.md +36 -6
- package/pipeline/commands/multi-agent/autopilot-on/SKILL.md +77 -12
- package/pipeline/commands/multi-agent/autopilot-status/SKILL.md +29 -8
- package/pipeline/commands/multi-agent/build-optimize/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/channels/SKILL.md +9 -9
- package/pipeline/commands/multi-agent/complaint-analysis/SKILL.md +5 -1
- package/pipeline/commands/multi-agent/create-jira/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/design-check/SKILL.md +16 -11
- package/pipeline/commands/multi-agent/diff-explain/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/doctor/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/feedback/SKILL.md +5 -1
- package/pipeline/commands/multi-agent/forget/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/garbage-collect/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/graph/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/help/SKILL.md +37 -39
- package/pipeline/commands/multi-agent/ios-coding-standard/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/issue/SKILL.md +7 -1
- package/pipeline/commands/multi-agent/jira/SKILL.md +7 -1
- package/pipeline/commands/multi-agent/kill/SKILL.md +9 -3
- package/pipeline/commands/multi-agent/language/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/log/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/manual-test/SKILL.md +5 -0
- package/pipeline/commands/multi-agent/model/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/prune-logs/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/prune-prompts/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/purge/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/refactor/SKILL.md +5 -0
- package/pipeline/commands/multi-agent/research/SKILL.md +49 -0
- package/pipeline/commands/multi-agent/resume/SKILL.md +29 -6
- package/pipeline/commands/multi-agent/review/SKILL.md +28 -9
- package/pipeline/commands/multi-agent/review-analysis/SKILL.md +5 -1
- package/pipeline/commands/multi-agent/review-issue/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/review-jira/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/route-off/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/route-on/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/route-status/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/routines/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/save/SKILL.md +6 -2
- package/pipeline/commands/multi-agent/scaffold/SKILL.md +47 -0
- package/pipeline/commands/multi-agent/scan/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/search/SKILL.md +12 -8
- package/pipeline/commands/multi-agent/security-review/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/serve/SKILL.md +62 -0
- package/pipeline/commands/multi-agent/setup/SKILL.md +27 -36
- package/pipeline/commands/multi-agent/stack/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/status/SKILL.md +10 -9
- package/pipeline/commands/multi-agent/steer/SKILL.md +5 -1
- package/pipeline/commands/multi-agent/store-ready/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/sync/SKILL.md +13 -13
- package/pipeline/commands/multi-agent/test/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/test-accessibility/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/test-dark-mode/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/test-dynamic-type/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/test-screenshots/SKILL.md +5 -1
- package/pipeline/commands/multi-agent/testflight-validation/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/uninstall/SKILL.md +5 -1
- package/pipeline/commands/multi-agent/update/SKILL.md +4 -0
- package/pipeline/contract/CHANGELOG.md +74 -0
- package/pipeline/contract/README.md +126 -0
- package/pipeline/contract/build.mjs +427 -0
- package/pipeline/contract/fixtures/answer-result.json +11 -0
- package/pipeline/contract/fixtures/error-invalid-request.json +8 -0
- package/pipeline/contract/fixtures/error-unauthorized.json +5 -0
- package/pipeline/contract/fixtures/error-unsigned.json +5 -0
- package/pipeline/contract/fixtures/issues-empty.json +18 -0
- package/pipeline/contract/fixtures/launch-plan.json +31 -0
- package/pipeline/contract/fixtures/runs-awaiting-question.json +70 -0
- package/pipeline/contract/fixtures/runs-empty.json +6 -0
- package/pipeline/contract/fixtures/runs-failed.json +84 -0
- package/pipeline/contract/fixtures/runs-old-schema.json +70 -0
- package/pipeline/contract/fixtures/runs-pr-opened-redacted.json +101 -0
- package/pipeline/contract/fixtures/runs-pr-opened.json +106 -0
- package/pipeline/contract/fixtures/runs-running.json +84 -0
- package/pipeline/contract/fixtures/worktrees-empty.json +4 -0
- package/pipeline/contract/frozen/toolbox.json +107 -0
- package/pipeline/contract/manifest.json +263 -0
- package/pipeline/contract/types/index.d.ts +343 -0
- package/pipeline/lib/_jira-auth.sh +6 -2
- package/pipeline/lib/account-resolver.sh +1 -1
- package/pipeline/lib/autopilot-state.sh +19 -0
- package/pipeline/lib/context-link-extractor.sh +12 -5
- package/pipeline/lib/credential-inventory.sh +12 -5
- package/pipeline/lib/credential-store.sh +116 -185
- package/pipeline/lib/fetch-confluence.sh +44 -3
- package/pipeline/lib/fetch-document.sh +3 -4
- package/pipeline/lib/fetch-fortify.sh +1 -1
- package/pipeline/lib/figma-mcp-refresh.sh +2 -2
- package/pipeline/lib/figma-token.sh +5 -1
- package/pipeline/lib/issue-fetcher.sh +233 -16
- package/pipeline/lib/json-file-lock.mjs +172 -0
- package/pipeline/lib/model-dispatch.sh +21 -12
- package/pipeline/lib/model-rung.sh +6 -1
- package/pipeline/lib/multi-repo-pipeline.sh +1 -1
- package/pipeline/lib/outbound-gate.mjs +46 -16
- package/pipeline/lib/parse-complaints.sh +14 -7
- package/pipeline/lib/plan-todos.sh +3 -3
- package/pipeline/lib/post-pr-review.sh +9 -9
- package/pipeline/lib/pr-request-location.mjs +85 -0
- package/pipeline/lib/regular-file.mjs +153 -0
- package/pipeline/lib/repo-hygiene.sh +17 -0
- package/pipeline/lib/route-state.sh +5 -1
- package/pipeline/lib/run-paths.sh +3 -2
- package/pipeline/lib/stack-detect.sh +19 -1
- package/pipeline/lib/unattended-profile-check.mjs +178 -0
- package/pipeline/lib/unattended-settings-location.mjs +28 -0
- package/pipeline/lib/unattended.mjs +76 -0
- package/pipeline/lib/unattended.sh +32 -0
- package/pipeline/lib/untrusted.mjs +76 -0
- package/pipeline/lib/usage-endpoint.mjs +33 -0
- package/pipeline/lib/user-facing.mjs +82 -0
- package/pipeline/lib/user-facing.sh +58 -0
- package/pipeline/multi-agent-refs/_dev-context.md +1 -1
- package/pipeline/multi-agent-refs/analysis/evidence.md +4 -0
- package/pipeline/multi-agent-refs/analysis/locked.md +2 -2
- package/pipeline/multi-agent-refs/analysis/render.md +4 -3
- package/pipeline/multi-agent-refs/analysis/resolve.md +3 -1
- package/pipeline/multi-agent-refs/analysis/synthesis.md +4 -5
- package/pipeline/multi-agent-refs/analysis-template.md +10 -17
- package/pipeline/multi-agent-refs/channels/jira.md +1 -1
- package/pipeline/multi-agent-refs/component-dispatch.md +3 -3
- package/pipeline/multi-agent-refs/conventions-defaults.md +32 -32
- package/pipeline/multi-agent-refs/cross-cli-contract.md +10 -17
- package/pipeline/multi-agent-refs/features/autopilot-circuit-breaker.md +37 -9
- package/pipeline/multi-agent-refs/features/autopilot-operations.md +277 -0
- package/pipeline/multi-agent-refs/features/constitution.md +196 -0
- package/pipeline/multi-agent-refs/features/doctor.md +6 -3
- package/pipeline/multi-agent-refs/features/external-context-injection.md +6 -1
- package/pipeline/multi-agent-refs/features/jira-context.md +1 -1
- package/pipeline/multi-agent-refs/features/maturity-followup.md +43 -23
- package/pipeline/multi-agent-refs/features/model-fallback.md +9 -0
- package/pipeline/multi-agent-refs/features/phone-api.md +306 -0
- package/pipeline/multi-agent-refs/features/plan-critic.md +159 -0
- package/pipeline/multi-agent-refs/features/research.md +150 -0
- package/pipeline/multi-agent-refs/features/review-decision.md +185 -0
- package/pipeline/multi-agent-refs/features/scaffold.md +160 -0
- package/pipeline/multi-agent-refs/features/security-audit.md +6 -2
- package/pipeline/multi-agent-refs/features/skill-conformance.md +4 -1
- package/pipeline/multi-agent-refs/features/stack-adapters.md +116 -0
- package/pipeline/multi-agent-refs/features/unattended-gates.md +316 -0
- package/pipeline/multi-agent-refs/features/unattended-security.md +731 -0
- package/pipeline/multi-agent-refs/features/url-enrichment.md +2 -2
- package/pipeline/multi-agent-refs/features/usage-reporting.md +127 -35
- package/pipeline/multi-agent-refs/features/verify-by-test.md +1 -1
- package/pipeline/multi-agent-refs/features/visual-evidence.md +7 -7
- package/pipeline/multi-agent-refs/keychain.md +6 -11
- package/pipeline/multi-agent-refs/payload-contracts.md +2 -2
- package/pipeline/multi-agent-refs/phases/log-format.md +2 -3
- package/pipeline/multi-agent-refs/phases/modes.md +10 -12
- package/pipeline/multi-agent-refs/phases/operations.md +11 -5
- package/pipeline/multi-agent-refs/phases/phase-0-init.md +73 -81
- package/pipeline/multi-agent-refs/phases/phase-1-plan.md +22 -22
- package/pipeline/multi-agent-refs/phases/phase-2-dev.md +42 -66
- package/pipeline/multi-agent-refs/phases/phase-3-review.md +45 -79
- package/pipeline/multi-agent-refs/phases/phase-4-commit.md +28 -38
- package/pipeline/multi-agent-refs/phases/phase-5-report.md +27 -25
- package/pipeline/multi-agent-refs/phases.md +1 -1
- package/pipeline/multi-agent-refs/picker-contract.md +1 -1
- package/pipeline/multi-agent-refs/progress-contract.md +13 -16
- package/pipeline/multi-agent-refs/readiness-review.md +1 -1
- package/pipeline/multi-agent-refs/research/engine.md +91 -0
- package/pipeline/multi-agent-refs/rules.md +6 -4
- package/pipeline/multi-agent-refs/setup/repo-discovery.md +2 -2
- package/pipeline/multi-agent-refs/tracker-contract.md +2 -2
- package/pipeline/multi-agent-refs/unattended-contract.md +68 -16
- package/pipeline/rules/figma-pipeline.md +12 -12
- package/pipeline/schemas/agent-state.schema.json +480 -18
- package/pipeline/schemas/analysis-spec.schema.json +4 -4
- package/pipeline/schemas/answer-request.schema.json +24 -0
- package/pipeline/schemas/answer-result.schema.json +28 -0
- package/pipeline/schemas/autopilot-config.schema.json +111 -13
- package/pipeline/schemas/command-parameters.schema.json +99 -0
- package/pipeline/schemas/constitution.schema.json +56 -0
- package/pipeline/schemas/contract-error.schema.json +52 -0
- package/pipeline/schemas/design-check-config.schema.json +5 -1
- package/pipeline/schemas/issues.schema.json +61 -0
- package/pipeline/schemas/launch-plan.schema.json +46 -0
- package/pipeline/schemas/launch-request.schema.json +45 -0
- package/pipeline/schemas/launch.json +61 -0
- package/pipeline/schemas/launch.schema.json +84 -0
- package/pipeline/schemas/phases.json +2 -2
- package/pipeline/schemas/phases.schema.json +68 -0
- package/pipeline/schemas/phone-devices.schema.json +61 -0
- package/pipeline/schemas/phone-signed-request.schema.json +67 -0
- package/pipeline/schemas/plan-critique.schema.json +99 -0
- package/pipeline/schemas/plan-todos.schema.json +7 -7
- package/pipeline/schemas/planning-output.schema.json +5 -0
- package/pipeline/schemas/pr-request.schema.json +46 -0
- package/pipeline/schemas/prefs.schema.json +79 -8
- package/pipeline/schemas/research-output.schema.json +118 -0
- package/pipeline/schemas/review-file-exclusions.schema.json +25 -0
- package/pipeline/schemas/reviewer-output.schema.json +40 -4
- package/pipeline/schemas/run-questions.json +392 -0
- package/pipeline/schemas/run-questions.schema.json +118 -0
- package/pipeline/schemas/runs-index.schema.json +189 -0
- package/pipeline/schemas/scaffold-manifest.schema.json +43 -0
- package/pipeline/schemas/secret-patterns.schema.json +28 -0
- package/pipeline/schemas/stack-adapters.json +527 -0
- package/pipeline/schemas/stack-adapters.schema.json +184 -0
- package/pipeline/schemas/token-budget.json +1 -1
- package/pipeline/schemas/token-budget.schema.json +26 -0
- package/pipeline/schemas/triage-output.schema.json +64 -3
- package/pipeline/schemas/unattended-policy.json +139 -0
- package/pipeline/schemas/unattended-policy.schema.json +73 -0
- package/pipeline/schemas/unattended-profile.json +248 -0
- package/pipeline/schemas/unattended-profile.schema.json +198 -0
- package/pipeline/schemas/worktrees.schema.json +51 -0
- package/pipeline/scripts/README.md +1 -0
- package/pipeline/scripts/_autopilot-config.mjs +130 -0
- package/pipeline/scripts/_autopilot-ops.mjs +567 -0
- package/pipeline/scripts/_autopilot-outcomes.mjs +174 -0
- package/pipeline/scripts/_command-contract.mjs +384 -0
- package/pipeline/scripts/_cost.mjs +40 -0
- package/pipeline/scripts/_notices.mjs +160 -0
- package/pipeline/scripts/_phone-auth.mjs +485 -0
- package/pipeline/scripts/_pre-existing.mjs +294 -0
- package/pipeline/scripts/_redact.mjs +77 -0
- package/pipeline/scripts/_run-paths.mjs +4 -2
- package/pipeline/scripts/_stack-adapter.mjs +678 -0
- package/pipeline/scripts/_stack-routing.mjs +1 -1
- package/pipeline/scripts/agent-guard.py +348 -37
- package/pipeline/scripts/agent-guard.sh +41 -13
- package/pipeline/scripts/analysis-story-tree.mjs +79 -3
- package/pipeline/scripts/answer-question.mjs +181 -0
- package/pipeline/scripts/audit-log-rotate.sh +1 -4
- package/pipeline/scripts/audit-log.sh +4 -4
- package/pipeline/scripts/autopilot-arming.mjs +389 -21
- package/pipeline/scripts/autopilot-awake.mjs +255 -0
- package/pipeline/scripts/autopilot-intake.mjs +137 -36
- package/pipeline/scripts/autopilot-menubar.swift +156 -44
- package/pipeline/scripts/autopilot-publish.mjs +1625 -0
- package/pipeline/scripts/autopilot-runner.mjs +1678 -222
- package/pipeline/scripts/autopilot-status.sh +198 -33
- package/pipeline/scripts/build-lock.sh +120 -0
- package/pipeline/scripts/build-references.mjs +4 -1
- package/pipeline/scripts/build-stack-plugins.mjs +59 -22
- package/pipeline/scripts/capture-flush.sh +1 -1
- package/pipeline/scripts/capture-resume.sh +13 -9
- package/pipeline/scripts/check-derived-drift.mjs +52 -11
- package/pipeline/scripts/commands.mjs +88 -0
- package/pipeline/scripts/constitution.mjs +362 -0
- package/pipeline/scripts/contract-server.mjs +776 -0
- package/pipeline/scripts/cost-analyze.mjs +89 -39
- package/pipeline/scripts/diff-explain.mjs +12 -1
- package/pipeline/scripts/doctor.mjs +77 -28
- package/pipeline/scripts/evidence-gate.mjs +192 -12
- package/pipeline/scripts/feedback-send.mjs +4 -2
- package/pipeline/scripts/gate-ledger.mjs +449 -0
- package/pipeline/scripts/gc-abandoned.sh +132 -13
- package/pipeline/scripts/gen-facts.mjs +31 -15
- package/pipeline/scripts/gen-mode-dispatch.mjs +3 -3
- package/pipeline/scripts/github-ssh-setup.sh +140 -29
- package/pipeline/scripts/graph-mermaid.mjs +4 -1
- package/pipeline/scripts/issues.mjs +236 -0
- package/pipeline/scripts/jira-attach.sh +6 -2
- package/pipeline/scripts/jira-search.sh +4 -3
- package/pipeline/scripts/keychain-save.sh +125 -24
- package/pipeline/scripts/keychain.py +63 -93
- package/pipeline/scripts/launch-request.mjs +747 -0
- package/pipeline/scripts/localize-commands.mjs +4 -10
- package/pipeline/scripts/log-metric.sh +6 -5
- package/pipeline/scripts/maturity-followup.mjs +13 -4
- package/pipeline/scripts/memory-save.sh +25 -0
- package/pipeline/scripts/migrate-prefs.mjs +4 -3
- package/pipeline/scripts/open-questions-gate.mjs +276 -0
- package/pipeline/scripts/phase-tracker.sh +41 -27
- package/pipeline/scripts/phase0-exit-gate.mjs +22 -4
- package/pipeline/scripts/phone-devices.mjs +224 -0
- package/pipeline/scripts/plan-coverage-gate.mjs +200 -66
- package/pipeline/scripts/plan-critique-gate.mjs +591 -0
- package/pipeline/scripts/pr-request.mjs +188 -0
- package/pipeline/scripts/pre-commit-check.sh +115 -4
- package/pipeline/scripts/probe-evidence-capability.sh +44 -5
- package/pipeline/scripts/record-phase.mjs +71 -0
- package/pipeline/scripts/render-agent-log-cost.sh +17 -2
- package/pipeline/scripts/render-cost-summary.sh +1 -1
- package/pipeline/scripts/render-work-summary.sh +1 -1
- package/pipeline/scripts/require-supported-version.sh +4 -1
- package/pipeline/scripts/research-gate.mjs +704 -0
- package/pipeline/scripts/review-decision-gate.mjs +403 -0
- package/pipeline/scripts/routine-registry.mjs +5 -2
- package/pipeline/scripts/runs-index.mjs +135 -27
- package/pipeline/scripts/scaffold-gate.mjs +393 -0
- package/pipeline/scripts/skill-conformance.mjs +25 -8
- package/pipeline/scripts/skill-siblings.mjs +2 -1
- package/pipeline/scripts/smoke-cross-cli-behavior.sh +32 -6
- package/pipeline/scripts/smoke-schema-validation.sh +6 -2
- package/pipeline/scripts/spec-consistency-gate.mjs +469 -0
- package/pipeline/scripts/symbol-existence-gate.mjs +450 -0
- package/pipeline/scripts/test-gap-scan.mjs +40 -2
- package/pipeline/scripts/test-integrity-gate.mjs +20 -4
- package/pipeline/scripts/test-strength.mjs +484 -0
- package/pipeline/scripts/test-summary.mjs +651 -0
- package/pipeline/scripts/triage-memory.mjs +49 -9
- package/pipeline/scripts/unattended_policy.py +2786 -0
- package/pipeline/scripts/uninstall.mjs +10 -10
- package/pipeline/scripts/update-issue-progress.sh +1 -1
- package/pipeline/scripts/usage-identity.mjs +288 -0
- package/pipeline/scripts/usage-register.mjs +187 -67
- package/pipeline/scripts/usage-report.mjs +232 -67
- package/pipeline/scripts/validate-complaint-doc.mjs +28 -10
- package/pipeline/scripts/validate-planning.mjs +6 -0
- package/pipeline/scripts/verify-citations.mjs +151 -38
- package/pipeline/scripts/verify.mjs +58 -18
- package/pipeline/scripts/worktree-prepare.sh +126 -0
- package/pipeline/scripts/worktrees.mjs +124 -0
- package/pipeline/scripts/write-state.mjs +48 -17
- package/pipeline/skills/.skill-manifest.json +222 -226
- package/pipeline/skills/.skills-index.json +77 -88
- package/pipeline/skills/shared/README.md +44 -45
- package/pipeline/skills/shared/core/apple-archive-compliance/SKILL.md +3 -2
- package/pipeline/skills/shared/core/google-play-compliance/SKILL.md +3 -2
- package/pipeline/skills/shared/core/multi-agent/SKILL.md +10 -9
- package/pipeline/skills/shared/core/multi-agent-analysis/SKILL.md +6 -5
- package/pipeline/skills/shared/core/multi-agent-analysis-jira/SKILL.md +11 -3
- package/pipeline/skills/shared/core/multi-agent-analysis-resolve/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-autopilot/SKILL.md +4 -3
- package/pipeline/skills/shared/core/multi-agent-autopilot-off/SKILL.md +32 -6
- package/pipeline/skills/shared/core/multi-agent-autopilot-on/SKILL.md +66 -8
- package/pipeline/skills/shared/core/multi-agent-autopilot-status/SKILL.md +27 -9
- package/pipeline/skills/shared/core/multi-agent-build-optimize/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-channels/SKILL.md +7 -4
- package/pipeline/skills/shared/core/multi-agent-complaint-analysis/SKILL.md +3 -2
- package/pipeline/skills/shared/core/multi-agent-create-jira/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-design-check/SKILL.md +7 -5
- package/pipeline/skills/shared/core/multi-agent-diff-explain/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-doctor/SKILL.md +3 -2
- package/pipeline/skills/shared/core/multi-agent-feedback/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-forget/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-garbage-collect/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-graph/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-help/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-ios-coding-standard/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-issue/SKILL.md +3 -2
- package/pipeline/skills/shared/core/multi-agent-jira/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-kill/SKILL.md +7 -4
- package/pipeline/skills/shared/core/multi-agent-language/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-log/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-manual-test/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-model/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-prune-logs/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-prune-prompts/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-purge/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-refactor/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-research/SKILL.md +35 -0
- package/pipeline/skills/shared/core/multi-agent-resume/SKILL.md +7 -3
- package/pipeline/skills/shared/core/multi-agent-review/SKILL.md +7 -5
- package/pipeline/skills/shared/core/multi-agent-review-analysis/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-review-issue/SKILL.md +3 -2
- package/pipeline/skills/shared/core/multi-agent-review-jira/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-route-off/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-route-on/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-route-status/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-routines/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-save/SKILL.md +3 -2
- package/pipeline/skills/shared/core/multi-agent-scaffold/SKILL.md +30 -0
- package/pipeline/skills/shared/core/multi-agent-scan/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-search/SKILL.md +4 -3
- package/pipeline/skills/shared/core/multi-agent-security-review/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-serve/SKILL.md +60 -0
- package/pipeline/skills/shared/core/multi-agent-setup/SKILL.md +8 -8
- package/pipeline/skills/shared/core/multi-agent-stack/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-status/SKILL.md +7 -8
- package/pipeline/skills/shared/core/multi-agent-steer/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-store-ready/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-sync/SKILL.md +10 -10
- package/pipeline/skills/shared/core/multi-agent-test/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-test-accessibility/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-test-dark-mode/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-test-dynamic-type/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-test-screenshots/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-testflight-validation/SKILL.md +2 -1
- package/pipeline/skills/shared/core/multi-agent-uninstall/SKILL.md +3 -2
- package/pipeline/skills/shared/core/multi-agent-update/SKILL.md +2 -1
- package/pipeline/skills/shared/external/NOTICE-avdlee-swiftui-agent-skill.md +46 -0
- package/pipeline/skills/shared/external/NOTICE-dimillian-skills.md +9 -3
- package/pipeline/skills/shared/external/NOTICE-paul-hudson-skills.md +54 -0
- package/pipeline/skills/shared/external/NOTICE-swift-ios-skills.md +9 -11
- package/pipeline/skills/shared/external/NOTICE-vibeship-spawner-skills.md +203 -0
- package/pipeline/skills/shared/external/NOTICE-xcode-build-skills.md +10 -3
- package/pipeline/skills/shared/external/accessibility-compliance-accessibility-audit/SKILL.md +131 -25
- package/pipeline/skills/shared/external/agent-introspection-debugging/SKILL.md +4 -3
- package/pipeline/skills/shared/external/alarmkit/SKILL.md +2 -1
- package/pipeline/skills/shared/external/android-architecture/SKILL.md +85 -76
- package/pipeline/skills/shared/external/android-build-quality-gates/SKILL.md +51 -3
- package/pipeline/skills/shared/external/android-build-quality-gates/references/patterns.md +9 -0
- package/pipeline/skills/shared/external/android-datastore/SKILL.md +4 -3
- package/pipeline/skills/shared/external/android-design-tokens-codegen/SKILL.md +4 -3
- package/pipeline/skills/shared/external/android-jetpack-compose-expert/SKILL.md +106 -181
- package/pipeline/skills/shared/external/android-jetpack-compose-expert/references/patterns.md +147 -0
- package/pipeline/skills/shared/external/android-mvi-viewmodel/SKILL.md +45 -4
- package/pipeline/skills/shared/external/android-performance/SKILL.md +27 -2
- package/pipeline/skills/shared/external/android-performance/references/patterns.md +37 -37
- package/pipeline/skills/shared/external/api-patterns/SKILL.md +111 -67
- package/pipeline/skills/shared/external/api-patterns/references/contract-details.md +128 -0
- package/pipeline/skills/shared/external/api-security-best-practices/SKILL.md +136 -186
- package/pipeline/skills/shared/external/api-security-best-practices/references/abuse-controls.md +140 -0
- package/pipeline/skills/shared/external/api-security-best-practices/references/identity-and-access.md +207 -0
- package/pipeline/skills/shared/external/api-security-best-practices/references/operations.md +66 -0
- package/pipeline/skills/shared/external/api-security-best-practices/references/request-handling.md +175 -0
- package/pipeline/skills/shared/external/app-clips/SKILL.md +2 -0
- package/pipeline/skills/shared/external/app-intents/SKILL.md +2 -0
- package/pipeline/skills/shared/external/app-store-changelog/SKILL.md +4 -3
- package/pipeline/skills/shared/external/app-store-optimization/SKILL.md +2 -0
- package/pipeline/skills/shared/external/app-store-review/SKILL.md +2 -0
- package/pipeline/skills/shared/external/apple-on-device-ai/SKILL.md +2 -0
- package/pipeline/skills/shared/external/architecture/SKILL.md +106 -39
- package/pipeline/skills/shared/external/architecture/references/adr-and-review.md +76 -0
- package/pipeline/skills/shared/external/authentication/SKILL.md +2 -0
- package/pipeline/skills/shared/external/avkit/SKILL.md +2 -0
- package/pipeline/skills/shared/external/background-processing/SKILL.md +2 -1
- package/pipeline/skills/shared/external/backlog/SKILL.md +3 -2
- package/pipeline/skills/shared/external/callkit-voip/SKILL.md +2 -0
- package/pipeline/skills/shared/external/callkit-voip/evals/evals.json +1 -1
- package/pipeline/skills/shared/external/ci-cd-pipelines/SKILL.md +3 -2
- package/pipeline/skills/shared/external/clean-code/SKILL.md +192 -90
- package/pipeline/skills/shared/external/cloudkit-sync/SKILL.md +2 -1
- package/pipeline/skills/shared/external/cloudkit-sync/evals/evals.json +1 -1
- package/pipeline/skills/shared/external/compose-components/SKILL.md +4 -4
- package/pipeline/skills/shared/external/compose-navigation/SKILL.md +22 -22
- package/pipeline/skills/shared/external/compose-navigation/references/patterns.md +10 -10
- package/pipeline/skills/shared/external/compose-testing/SKILL.md +13 -6
- package/pipeline/skills/shared/external/compose-testing/references/patterns.md +59 -59
- package/pipeline/skills/shared/external/contacts-framework/SKILL.md +2 -0
- package/pipeline/skills/shared/external/context-compression/SKILL.md +118 -250
- package/pipeline/skills/shared/external/core-bluetooth/SKILL.md +2 -0
- package/pipeline/skills/shared/external/core-data/SKILL.md +2 -0
- package/pipeline/skills/shared/external/core-motion/SKILL.md +2 -0
- package/pipeline/skills/shared/external/core-nfc/SKILL.md +2 -0
- package/pipeline/skills/shared/external/coreml/SKILL.md +2 -1
- package/pipeline/skills/shared/external/council/SKILL.md +2 -1
- package/pipeline/skills/shared/external/cryptokit/SKILL.md +2 -0
- package/pipeline/skills/shared/external/css-modern/SKILL.md +3 -2
- package/pipeline/skills/shared/external/database-patterns/SKILL.md +3 -2
- package/pipeline/skills/shared/external/debugging-instruments/SKILL.md +2 -0
- package/pipeline/skills/shared/external/debugging-strategies/SKILL.md +130 -20
- package/pipeline/skills/shared/external/debugging-strategies/references/hard-cases.md +54 -0
- package/pipeline/skills/shared/external/device-integrity/SKILL.md +2 -0
- package/pipeline/skills/shared/external/docker-expert/SKILL.md +137 -381
- package/pipeline/skills/shared/external/docker-expert/references/patterns.md +98 -0
- package/pipeline/skills/shared/external/energykit/SKILL.md +2 -1
- package/pipeline/skills/shared/external/eventkit-calendar/SKILL.md +3 -1
- package/pipeline/skills/shared/external/eventkit-calendar/evals/evals.json +2 -2
- package/pipeline/skills/shared/external/fastapi-pro/SKILL.md +116 -185
- package/pipeline/skills/shared/external/fastapi-pro/references/app-structure.md +235 -0
- package/pipeline/skills/shared/external/fastapi-pro/references/testing-and-deployment.md +69 -0
- package/pipeline/skills/shared/external/firebase/SKILL.md +4 -3
- package/pipeline/skills/shared/external/github-actions-templates/SKILL.md +151 -293
- package/pipeline/skills/shared/external/github-actions-templates/references/patterns.md +96 -0
- package/pipeline/skills/shared/external/healthkit/SKILL.md +2 -0
- package/pipeline/skills/shared/external/hig-components-content/SKILL.md +69 -72
- package/pipeline/skills/shared/external/hig-components-content/references/content-views.md +111 -0
- package/pipeline/skills/shared/external/hig-components-layout/SKILL.md +77 -86
- package/pipeline/skills/shared/external/hig-components-layout/references/containers.md +98 -0
- package/pipeline/skills/shared/external/hig-components-status/SKILL.md +150 -78
- package/pipeline/skills/shared/external/hig-components-system/SKILL.md +76 -97
- package/pipeline/skills/shared/external/hig-components-system/references/surfaces.md +98 -0
- package/pipeline/skills/shared/external/hig-foundations/SKILL.md +48 -76
- package/pipeline/skills/shared/external/hig-foundations/references/foundations-detail.md +132 -0
- package/pipeline/skills/shared/external/hig-inputs/SKILL.md +147 -106
- package/pipeline/skills/shared/external/hig-patterns/SKILL.md +61 -77
- package/pipeline/skills/shared/external/hig-patterns/references/patterns.md +92 -0
- package/pipeline/skills/shared/external/hig-platforms/SKILL.md +147 -77
- package/pipeline/skills/shared/external/hig-technologies/SKILL.md +61 -121
- package/pipeline/skills/shared/external/hig-technologies/references/technologies.md +108 -0
- package/pipeline/skills/shared/external/homekit-matter/SKILL.md +2 -0
- package/pipeline/skills/shared/external/homekit-matter/evals/evals.json +1 -1
- package/pipeline/skills/shared/external/html-semantic/SKILL.md +3 -2
- package/pipeline/skills/shared/external/humanizer/SKILL.md +2 -1
- package/pipeline/skills/shared/external/ios-accessibility/SKILL.md +2 -0
- package/pipeline/skills/shared/external/ios-coding-standard/SKILL.md +2 -1
- package/pipeline/skills/shared/external/ios-coding-standard/references/STANDARD.md +14 -2
- package/pipeline/skills/shared/external/ios-coding-standard/references/rules.yml +2 -2
- package/pipeline/skills/shared/external/ios-debugger-agent/SKILL.md +4 -3
- package/pipeline/skills/shared/external/ios-localization/SKILL.md +8 -6
- package/pipeline/skills/shared/external/ios-localization/evals/evals.json +2 -2
- package/pipeline/skills/shared/external/ios-localization/references/string-catalogs.md +11 -11
- package/pipeline/skills/shared/external/ios-module-structure/SKILL.md +2 -1
- package/pipeline/skills/shared/external/ios-networking/SKILL.md +2 -0
- package/pipeline/skills/shared/external/ios-simulator/SKILL.md +2 -0
- package/pipeline/skills/shared/external/kotlin-coroutines-expert/SKILL.md +102 -193
- package/pipeline/skills/shared/external/kotlin-coroutines-expert/references/patterns.md +103 -0
- package/pipeline/skills/shared/external/live-activities/SKILL.md +4 -2
- package/pipeline/skills/shared/external/live-activities/evals/evals.json +2 -2
- package/pipeline/skills/shared/external/localization-reuse-map/SKILL.md +7 -9
- package/pipeline/skills/shared/external/localization-reuse-map/reference/sources-and-recipes.md +3 -3
- package/pipeline/skills/shared/external/localization-reuse-map/scripts/resolve-new-values.py +2 -2
- package/pipeline/skills/shared/external/macos-menubar-tuist-app/SKILL.md +4 -3
- package/pipeline/skills/shared/external/macos-spm-app-packaging/SKILL.md +5 -3
- package/pipeline/skills/shared/external/mapkit-location/SKILL.md +2 -0
- package/pipeline/skills/shared/external/mapkit-location/evals/evals.json +1 -1
- package/pipeline/skills/shared/external/metrickit-diagnostics/SKILL.md +2 -0
- package/pipeline/skills/shared/external/metrickit-diagnostics/evals/evals.json +1 -1
- package/pipeline/skills/shared/external/monorepo-architect/SKILL.md +149 -46
- package/pipeline/skills/shared/external/monorepo-architect/references/patterns.md +70 -0
- package/pipeline/skills/shared/external/musickit-audio/SKILL.md +2 -0
- package/pipeline/skills/shared/external/musickit-audio/evals/evals.json +1 -1
- package/pipeline/skills/shared/external/natural-language/SKILL.md +2 -0
- package/pipeline/skills/shared/external/nextjs-app-router/SKILL.md +3 -2
- package/pipeline/skills/shared/external/nodejs-backend-patterns/SKILL.md +91 -21
- package/pipeline/skills/shared/external/nodejs-backend-patterns/references/runtime-patterns.md +247 -0
- package/pipeline/skills/shared/external/nodejs-backend-patterns/references/testing-and-frameworks.md +57 -0
- package/pipeline/skills/shared/external/observability-engineer/SKILL.md +155 -232
- package/pipeline/skills/shared/external/observability-engineer/references/patterns.md +75 -0
- package/pipeline/skills/shared/external/passkit-wallet/SKILL.md +2 -0
- package/pipeline/skills/shared/external/passkit-wallet/evals/evals.json +2 -2
- package/pipeline/skills/shared/external/passkit-wallet/references/wallet-passes.md +18 -18
- package/pipeline/skills/shared/external/pdfkit/SKILL.md +2 -1
- package/pipeline/skills/shared/external/pencilkit-drawing/SKILL.md +2 -0
- package/pipeline/skills/shared/external/pencilkit-drawing/evals/evals.json +1 -1
- package/pipeline/skills/shared/external/permissionkit/SKILL.md +2 -0
- package/pipeline/skills/shared/external/photos-camera-media/SKILL.md +2 -1
- package/pipeline/skills/shared/external/push-notifications/SKILL.md +2 -0
- package/pipeline/skills/shared/external/python-patterns/SKILL.md +3 -2
- package/pipeline/skills/shared/external/react-best-practices/SKILL.md +3 -2
- package/pipeline/skills/shared/external/realitykit-ar/SKILL.md +2 -2
- package/pipeline/skills/shared/external/realitykit-ar/evals/evals.json +1 -1
- package/pipeline/skills/shared/external/rest-api-design/SKILL.md +3 -2
- package/pipeline/skills/shared/external/retrofit-networking/SKILL.md +7 -7
- package/pipeline/skills/shared/external/retrofit-networking/references/patterns.md +69 -69
- package/pipeline/skills/shared/external/room-database/references/patterns.md +126 -126
- package/pipeline/skills/shared/external/search-first/SKILL.md +2 -1
- package/pipeline/skills/shared/external/security-review/SKILL.md +4 -3
- package/pipeline/skills/shared/external/shareplay-activities/SKILL.md +2 -2
- package/pipeline/skills/shared/external/signal-community/SKILL.md +1 -1
- package/pipeline/skills/shared/external/skill-creator/SKILL.md +2 -1
- package/pipeline/skills/shared/external/speech-recognition/SKILL.md +2 -1
- package/pipeline/skills/shared/external/spm-build-analysis/SKILL.md +2 -0
- package/pipeline/skills/shared/external/storekit/SKILL.md +2 -0
- package/pipeline/skills/shared/external/swift-api-design-guidelines/SKILL.md +2 -0
- package/pipeline/skills/shared/external/swift-architecture/SKILL.md +2 -1
- package/pipeline/skills/shared/external/swift-charts/SKILL.md +2 -1
- package/pipeline/skills/shared/external/swift-codable/SKILL.md +2 -0
- package/pipeline/skills/shared/external/swift-concurrency/SKILL.md +3 -1
- package/pipeline/skills/shared/external/swift-concurrency-expert/SKILL.md +5 -4
- package/pipeline/skills/shared/external/swift-concurrency-pro/SKILL.md +2 -1
- package/pipeline/skills/shared/external/swift-formatstyle/SKILL.md +2 -0
- package/pipeline/skills/shared/external/swift-language/SKILL.md +3 -1
- package/pipeline/skills/shared/external/swift-security/SKILL.md +2 -1
- package/pipeline/skills/shared/external/swift-testing/SKILL.md +2 -0
- package/pipeline/skills/shared/external/swift-testing-pro/SKILL.md +2 -1
- package/pipeline/skills/shared/external/swift-testing-pro/references/new-features.md +10 -0
- package/pipeline/skills/shared/external/swiftdata/SKILL.md +2 -0
- package/pipeline/skills/shared/external/swiftdata-pro/SKILL.md +2 -1
- package/pipeline/skills/shared/external/swiftlint/SKILL.md +2 -0
- package/pipeline/skills/shared/external/swiftui-animation/SKILL.md +2 -0
- package/pipeline/skills/shared/external/swiftui-expert-skill/SKILL.md +3 -1
- package/pipeline/skills/shared/external/swiftui-gestures/SKILL.md +2 -0
- package/pipeline/skills/shared/external/swiftui-layout-components/SKILL.md +2 -0
- package/pipeline/skills/shared/external/swiftui-liquid-glass/SKILL.md +2 -0
- package/pipeline/skills/shared/external/swiftui-navigation/SKILL.md +2 -0
- package/pipeline/skills/shared/external/swiftui-patterns/SKILL.md +3 -1
- package/pipeline/skills/shared/external/swiftui-performance/SKILL.md +3 -1
- package/pipeline/skills/shared/external/swiftui-performance-audit/SKILL.md +5 -4
- package/pipeline/skills/shared/external/swiftui-pro/SKILL.md +2 -1
- package/pipeline/skills/shared/external/swiftui-ui-patterns/SKILL.md +5 -4
- package/pipeline/skills/shared/external/swiftui-uikit-interop/SKILL.md +2 -0
- package/pipeline/skills/shared/external/swiftui-view-refactor/SKILL.md +4 -3
- package/pipeline/skills/shared/external/swiftui-webkit/SKILL.md +2 -0
- package/pipeline/skills/shared/external/tailwind-css/SKILL.md +3 -2
- package/pipeline/skills/shared/external/testing-backend/SKILL.md +3 -2
- package/pipeline/skills/shared/external/tipkit/SKILL.md +2 -0
- package/pipeline/skills/shared/external/typescript-patterns/SKILL.md +3 -2
- package/pipeline/skills/shared/external/vision-framework/SKILL.md +2 -0
- package/pipeline/skills/shared/external/vue-composition/SKILL.md +3 -2
- package/pipeline/skills/shared/external/weatherkit/SKILL.md +2 -0
- package/pipeline/skills/shared/external/web-accessibility/SKILL.md +3 -2
- package/pipeline/skills/shared/external/web-performance/SKILL.md +3 -2
- package/pipeline/skills/shared/external/web-testing/SKILL.md +3 -2
- package/pipeline/skills/shared/external/widgetkit/SKILL.md +2 -0
- package/pipeline/skills/shared/external/widgetkit/references/widgetkit-advanced.md +1 -1
- package/pipeline/skills/shared/external/xcode-build-benchmark/SKILL.md +2 -0
- package/pipeline/skills/shared/external/xcode-build-fixer/SKILL.md +2 -0
- package/pipeline/skills/shared/external/xcode-build-orchestrator/SKILL.md +2 -0
- package/pipeline/skills/shared/external/xcode-compilation-analyzer/SKILL.md +2 -0
- package/pipeline/skills/shared/external/xcode-project-analyzer/SKILL.md +2 -0
- package/pipeline/skills/skills-index.md +40 -41
- package/docs/token-budget-history.md +0 -24
- package/pipeline/skills/shared/external/agentflow/SKILL.md +0 -199
- package/pipeline/skills/shared/external/android-ui-verification/SKILL.md +0 -66
- package/pipeline/skills/shared/external/api-security-best-practices/references/auth.md +0 -299
- package/pipeline/skills/shared/external/api-security-best-practices/references/input-validation.md +0 -255
- package/pipeline/skills/shared/external/api-security-best-practices/references/rate-limiting.md +0 -167
- package/pipeline/skills/shared/external/closed-loop-delivery/SKILL.md +0 -116
- package/pipeline/skills/shared/external/ios-developer/SKILL.md +0 -216
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# Feature: Research Before Asking
|
|
2
|
+
|
|
3
|
+
<!-- toc -->
|
|
4
|
+
- [When it runs](#when-it-runs)
|
|
5
|
+
- [The runner flow](#the-runner-flow)
|
|
6
|
+
- [Round ceiling](#round-ceiling)
|
|
7
|
+
- [Re-entry after proceed](#re-entry-after-proceed)
|
|
8
|
+
- [Asking](#asking)
|
|
9
|
+
- [Tracker context in the descriptor](#tracker-context-in-the-descriptor)
|
|
10
|
+
- [State](#state)
|
|
11
|
+
- [Limits](#limits)
|
|
12
|
+
- [Reference](#reference)
|
|
13
|
+
<!-- /toc -->
|
|
14
|
+
|
|
15
|
+
**Pattern**: an unattended run that stops on a maturity blocker or on an open
|
|
16
|
+
analysis question waits for a person, and the person often answers with
|
|
17
|
+
something that was already in the ticket thread, a linked page or the code.
|
|
18
|
+
Research reads those first. The research session gathers and proposes;
|
|
19
|
+
`research-gate.mjs` checks every cited source and closes only what is backed; the
|
|
20
|
+
run's own check - the maturity score, the open-questions gate - re-runs on the
|
|
21
|
+
result and decides. The engine is `research/engine.md`.
|
|
22
|
+
|
|
23
|
+
## When it runs
|
|
24
|
+
|
|
25
|
+
| Run | What happens |
|
|
26
|
+
|---|---|
|
|
27
|
+
| Attended, not autopilot | Nothing automatic. `/multi-agent:research <id>` is a command a person runs; it asks one gap at a time. `research-gate.mjs` in gate mode is a no-op (`smoke-gates-interactive-noop.sh`) |
|
|
28
|
+
| Gates active (`MULTI_AGENT_UNATTENDED=1` or `state.autopilot`) | `research-gate.mjs` records its verdict and parks or re-opens the run |
|
|
29
|
+
| The autopilot runner | A parked run is routed to research before it is left awaiting an answer (below) |
|
|
30
|
+
|
|
31
|
+
The split is `lib/unattended.mjs` `gatesActive`, as for every other quality
|
|
32
|
+
gate (`features/unattended-gates.md`).
|
|
33
|
+
|
|
34
|
+
## The runner flow
|
|
35
|
+
|
|
36
|
+
The continuous-mode runner, step 5c, while the item is still claimed:
|
|
37
|
+
|
|
38
|
+
1. The dev run (`/multi-agent <id> autopilot`) ends parked. `researchRoute`
|
|
39
|
+
routes two parks: `waitingFor: "maturity"` (or a Phase 0 halt that still
|
|
40
|
+
carries blockers), and `waitingFor: "question"` with
|
|
41
|
+
`pendingQuestion.stepId: "phase-1/open-questions"`. The channels menu, a
|
|
42
|
+
user test and a failed verification are a person's call and are never
|
|
43
|
+
researched.
|
|
44
|
+
2. A research session: `/multi-agent:research <id> --autonomous --state <path>`,
|
|
45
|
+
launched with `--disallowedTools` naming `research_ask`, `research_search`
|
|
46
|
+
and `WebSearch` (`RESEARCH_DENIED_TOOLS`). It writes
|
|
47
|
+
`<state dir>/research/{context.json,research.json,research.md}`.
|
|
48
|
+
3. The runner, not the session, runs `research-gate.mjs --state <path> --json`
|
|
49
|
+
with the unattended environment.
|
|
50
|
+
4. `decision: "proceed"`: the runner launches `/multi-agent:resume <taskId>
|
|
51
|
+
autopilot` and supervises it. If that run parks again on the other kind of
|
|
52
|
+
gap, the loop goes round once more while the ceiling allows.
|
|
53
|
+
5. Anything else - `ask`, no verdict, a launch that failed, a session that did
|
|
54
|
+
not end - leaves the run's state as it is. A parked state is recorded as
|
|
55
|
+
`awaiting-answer`, exactly as it would have been without research.
|
|
56
|
+
|
|
57
|
+
The attempt row carries `researchRounds: <n>` for the rounds this tick used.
|
|
58
|
+
|
|
59
|
+
Each research and resume launch is prepared like the first one: the runner
|
|
60
|
+
checks that `agent-guard.sh` is registered on all three PreToolUse matchers (missing:
|
|
61
|
+
no session is launched and the run stays parked), clears any file left under
|
|
62
|
+
the new session's name in `pr-requests/`, and passes the unattended environment
|
|
63
|
+
(`features/unattended-security.md`, "The runner's launch"). A resumed run that
|
|
64
|
+
reaches the Phase 4 hand-off is published by the runner exactly like a first
|
|
65
|
+
run: the request is looked up under the resumed session's id.
|
|
66
|
+
|
|
67
|
+
## Round ceiling
|
|
68
|
+
|
|
69
|
+
`maxAskRounds` in `~/.claude/autopilot/config.json` (default 2) caps research
|
|
70
|
+
rounds per item. The count is summed from `researchRounds` on every
|
|
71
|
+
`attempted.jsonl` row of that item - the whole log, not the recent tail the
|
|
72
|
+
breaker reads - and not from the run state, because a later run of the same
|
|
73
|
+
item is a fresh state file and would start at zero. At the ceiling
|
|
74
|
+
the runner logs `maxAskRounds` and parks the run without researching it.
|
|
75
|
+
|
|
76
|
+
## Re-entry after proceed
|
|
77
|
+
|
|
78
|
+
| Kind | What the gate wrote | Where resume re-enters |
|
|
79
|
+
|---|---|---|
|
|
80
|
+
| `maturity` | `state.maturity` re-scored, `state.research.decision: proceed`, `waitingFor: "maturity"` | the maturity step. It re-fetches the item and runs `research-gate.mjs --state "$STATE_FILE" --recheck --descriptor <fresh.json> --json`: the recorded verified findings are applied to the fresh descriptor and re-scored. Exit 0: continue, with the printed `description` as the working description. Exit 1: the normal blocker path (`features/maturity-followup.md`) |
|
|
81
|
+
| `open-questions` | closed rows removed from `analysis.openQuestions[]`, the `open-questions` gate re-recorded as pass, `waitingFor` and `pendingQuestion` cleared, `status: in_progress` | Phase 2, as `currentPhase + 1`: the gate is the last step of Phase 1, so the plan is already made and research's `pass` is the gate's latest entry. The answers are in `state.research.resolved[]` and research.md |
|
|
82
|
+
|
|
83
|
+
Recheck re-verifies on fresh data: a comment deleted since the research no
|
|
84
|
+
longer backs its gap.
|
|
85
|
+
|
|
86
|
+
## Asking
|
|
87
|
+
|
|
88
|
+
`decision: "ask"` parks the run with `waitingFor: "question"`:
|
|
89
|
+
|
|
90
|
+
| Kind | `pendingQuestion` | Options |
|
|
91
|
+
|---|---|---|
|
|
92
|
+
| `maturity` | `id: maturity`, `stepId: phase-0/maturity`, the blockers still reported, then the unverified candidates | `fix`, `continue`, `abort` (`schemas/run-questions.json` `maturity`) |
|
|
93
|
+
| `open-questions` | `id: open-questions`, `stepId: phase-1/open-questions`, only the rows still open, then the candidates | `ask-now`, `assume`, `abort`, as `open-questions-gate.mjs` |
|
|
94
|
+
|
|
95
|
+
The candidates are shown so the person answering starts from what research
|
|
96
|
+
found. They were not verified, or they are acceptance criteria or business rules,
|
|
97
|
+
which research never decides.
|
|
98
|
+
|
|
99
|
+
## Tracker context in the descriptor
|
|
100
|
+
|
|
101
|
+
`lib/issue-fetcher.sh` carries `comments[]` (Jira comments or GitHub issue
|
|
102
|
+
comments, the newest 20, at most 1500 characters each and 12000 bytes together),
|
|
103
|
+
`commentsTotal`, `links[]` (Jira issue links) and `untrustedFields`, all on the
|
|
104
|
+
request that fetches the item. None of it feeds the maturity score.
|
|
105
|
+
`issue-fetcher.sh --rescore` re-scores a descriptor on stdin with the same
|
|
106
|
+
formula; it is how the gate re-runs the check.
|
|
107
|
+
|
|
108
|
+
## State
|
|
109
|
+
|
|
110
|
+
```jsonc
|
|
111
|
+
"research": {
|
|
112
|
+
"round": 1,
|
|
113
|
+
"kind": "maturity", // or "open-questions"
|
|
114
|
+
"decision": "proceed", // or "ask"
|
|
115
|
+
"reason": "...",
|
|
116
|
+
"dir": ".../research", "json": ".../research.json",
|
|
117
|
+
"context": ".../context.json", "md": ".../research.md",
|
|
118
|
+
"gaps": [{ "id": "description_empty", "category": "description",
|
|
119
|
+
"status": "closed", "sources": [{ "label": "evidence", "ref": "...", "quote": "..." }] }],
|
|
120
|
+
"closed": ["description_empty"], "candidates": [], "open": [], "ignored": [],
|
|
121
|
+
"resolved": [], // open-questions: answered rows with their sources
|
|
122
|
+
"maturityBefore": { }, "maturityAfter": { },
|
|
123
|
+
"at": "<ISO time>"
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Written by `research-gate.mjs` only, and declared in `agent-state.schema.json`.
|
|
128
|
+
|
|
129
|
+
## Limits
|
|
130
|
+
|
|
131
|
+
- A fetched document in `context.json` `documents[]` is written by the research
|
|
132
|
+
session. The gate proves the quote is in the text it was given, not that the
|
|
133
|
+
text came from the fetcher. The item, its comments and its links come from
|
|
134
|
+
the descriptor the fetcher printed.
|
|
135
|
+
- The research session's own token cost is not priced into the attempt's `usd`:
|
|
136
|
+
the run's tracker records phases, and research is not one.
|
|
137
|
+
- In an attended or terminal-autopilot run the gate is invoked by the agent,
|
|
138
|
+
and is advisory against an agent that skips it, as every in-run gate is. The
|
|
139
|
+
runner's own invocation is what holds.
|
|
140
|
+
|
|
141
|
+
## Reference
|
|
142
|
+
|
|
143
|
+
Scripts: `research-gate.mjs`, the continuous-mode runner (`researchRoute`,
|
|
144
|
+
`researchRoundsUsed`, `researchArgv`, `resumeArgv`; its own reference is
|
|
145
|
+
`features/autopilot-circuit-breaker.md`), `lib/issue-fetcher.sh`.
|
|
146
|
+
Schemas: `research-output.schema.json`, `agent-state.schema.json` `research`,
|
|
147
|
+
`prefs.schema.json` `projects.<slug>.research.providers`,
|
|
148
|
+
`autopilot-config.schema.json` `maxAskRounds`. Tests:
|
|
149
|
+
`test/research-gate.test.mjs`, `test/issue-fetcher-context.test.mjs`,
|
|
150
|
+
the runner's tests; smoke `smoke-gates-interactive-noop.sh`.
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# Feature: Review decision rule (autopilot)
|
|
2
|
+
|
|
3
|
+
<!-- toc -->
|
|
4
|
+
- [The rule](#the-rule)
|
|
5
|
+
- [The same finding](#the-same-finding)
|
|
6
|
+
- [Reviewers stay blind to each other](#reviewers-stay-blind-to-each-other)
|
|
7
|
+
- [Wiring](#wiring)
|
|
8
|
+
- [Verify-by-test in autopilot](#verify-by-test-in-autopilot)
|
|
9
|
+
- [Mandatory at commit](#mandatory-at-commit)
|
|
10
|
+
- [Limits](#limits)
|
|
11
|
+
- [Reference](#reference)
|
|
12
|
+
<!-- /toc -->
|
|
13
|
+
|
|
14
|
+
**Pattern**: every reviewer on Claude Code is a Claude model. A panel that
|
|
15
|
+
shares a model family shares its blind spots, so one reviewer's `blocking`
|
|
16
|
+
finding is a judgement nobody independent has checked, and a panel that
|
|
17
|
+
agrees can be agreeing for the same wrong reason. An attended run has a person
|
|
18
|
+
at the Step 4 checkpoint to weigh that. An autopilot run has none, so while the
|
|
19
|
+
quality gates are active (`lib/unattended.mjs`, `gatesActive`:
|
|
20
|
+
`MULTI_AGENT_UNATTENDED=1` or `state.autopilot === true`) a blocker has to be
|
|
21
|
+
backed by something other than one model's say-so before it stops the run.
|
|
22
|
+
The lack of model diversity is compensated by asking for executable evidence,
|
|
23
|
+
not by adding more reviewers of the same family.
|
|
24
|
+
|
|
25
|
+
Attended review is unchanged: the gate prints its decisions marked advisory,
|
|
26
|
+
exits 0 and writes neither the triage file nor the state.
|
|
27
|
+
|
|
28
|
+
## The rule
|
|
29
|
+
|
|
30
|
+
An `accepted[]` finding of severity `blocking` keeps its severity only when
|
|
31
|
+
one of these holds:
|
|
32
|
+
|
|
33
|
+
| Basis | What has to be true |
|
|
34
|
+
|---|---|
|
|
35
|
+
| `corroborated` | at least two independent reviewer outputs of the iteration carry a `blocking` finding that is the same finding |
|
|
36
|
+
| `failing-test` | its `verification` (Step 3.7, `verify-by-test.md`) is `confirmed`, and `evidencePath` names a non-empty log inside the checkout that shows a failing test and no pass |
|
|
37
|
+
| `test-integrity` | it is the finding `test-integrity-gate.mjs` produced for that file: a command's output, not a model's |
|
|
38
|
+
|
|
39
|
+
Anything else is lowered to `important`. It stays in `accepted[]`: triage
|
|
40
|
+
judged it real and in scope, so the rework still fixes it, it just no longer
|
|
41
|
+
holds the run on one opinion. It is never dropped. Each one is listed in the
|
|
42
|
+
gate's report and in its ledger entry with its fingerprint and the reason
|
|
43
|
+
(`raised by 1 reviewer, two needed; no failing test recorded`). `approved` is
|
|
44
|
+
recomputed from what is left.
|
|
45
|
+
|
|
46
|
+
Findings of severity `important` and `suggestion` are not touched.
|
|
47
|
+
|
|
48
|
+
## The same finding
|
|
49
|
+
|
|
50
|
+
Two findings are the same finding when they name the same file, with diff
|
|
51
|
+
prefixes (`a/`, `b/`, `./`) stripped, and either:
|
|
52
|
+
|
|
53
|
+
- they have the same fingerprint (`_fingerprint.mjs`, the identity the review
|
|
54
|
+
delta already uses: the file plus the cited `ruleId`, else the file plus the
|
|
55
|
+
normalised issue text), or
|
|
56
|
+
- both cite a line above 0 and the lines are at most `LINE_WINDOW` (3) apart.
|
|
57
|
+
|
|
58
|
+
A whole-file finding (line 0) matches by fingerprint only. Two findings that
|
|
59
|
+
cite different `ruleId`s, or different CWEs in their `security` envelope, are
|
|
60
|
+
never the same finding, however close their lines. The reviewer schema has no
|
|
61
|
+
category field; `ruleId` and the CWE are the categories it does carry.
|
|
62
|
+
|
|
63
|
+
Independent means a separate reviewer dispatch: one entry of
|
|
64
|
+
`state.reviewIterations[i].reviewers[]`, or one `--source` file (the Step 2.7
|
|
65
|
+
security audit is a separate dispatch too). One reviewer reporting the same
|
|
66
|
+
thing twice is one source. A second reviewer that saw the same line but called
|
|
67
|
+
it a suggestion does not corroborate a blocker.
|
|
68
|
+
|
|
69
|
+
## Reviewers stay blind to each other
|
|
70
|
+
|
|
71
|
+
Step 2 dispatches the reviewers in parallel from the same shared prefix; no
|
|
72
|
+
reviewer prompt carries another reviewer's output, and the outputs are
|
|
73
|
+
consumed by Step 3 only. The one same-round exchange is Step 2.5, the rebuttal
|
|
74
|
+
round, which shows each reviewer the others' blocker findings and replaces its
|
|
75
|
+
output. Multi-round debate converges agents on each other, which is exactly
|
|
76
|
+
what corroboration must not measure, so with the gates active the round does
|
|
77
|
+
not run:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
node "$HOME/.claude/scripts/review-decision-gate.mjs" --rebuttal-allowed --state "$STATE_FILE" \
|
|
81
|
+
|| echo "Step 2.5 skipped: the quality gates are active"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Exit 1 means skip it, whatever `prefs.global.reviewDisagreementRound` says.
|
|
85
|
+
The gate also holds it after the fact: a reviewer entry with `roundCount`
|
|
86
|
+
above 1 fails the decision (exit 1, `rebuttal-round` in the ledger) and the
|
|
87
|
+
triage file is left as it was. `test/review-decision-gate.test.mjs` asserts
|
|
88
|
+
the dispatch side against `phase-3-review.md` and the persona.
|
|
89
|
+
|
|
90
|
+
The previous-round block (Step 2.1, iteration 2 and later) is shared context,
|
|
91
|
+
not a peer's output: every reviewer sees the same prior triage. A finding that
|
|
92
|
+
two reviewers both carry over from it is still two dispatches agreeing, and it
|
|
93
|
+
already passed this rule in the round before.
|
|
94
|
+
|
|
95
|
+
## Wiring
|
|
96
|
+
|
|
97
|
+
After Step 3.7 (verify-by-test) in every round, and after the Step 3.1 empty
|
|
98
|
+
result, before Step 3.8:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
node "$HOME/.claude/scripts/review-decision-gate.mjs" "$TRIAGE_FILE" --state "$STATE_FILE" \
|
|
102
|
+
--integrity "$WORKTREE/.pipeline/test-integrity.json" \
|
|
103
|
+
--source "$WORKTREE/.pipeline/security-audit-$ITERATION.json" \
|
|
104
|
+
--json > "$WORKTREE/.pipeline/review-decision-$ITERATION.json"
|
|
105
|
+
RD_RC=$?
|
|
106
|
+
cp "$TRIAGE_FILE" "$WORKTREE/triage-output.json"
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
`test-integrity.json` is the file Step 1.76 writes (`{}` when it found
|
|
110
|
+
nothing); `security-audit-$ITERATION.json` is the file Step 2.7 writes when the
|
|
111
|
+
audit runs (`security-audit.md`). Both are files and not process substitutions
|
|
112
|
+
of a shell variable with a `{}` brace default: bash 3.2, the stock macOS
|
|
113
|
+
`/bin/bash`, expands that to `{\}`, and unparseable input is exit 3.
|
|
114
|
+
A missing or empty `--integrity` file means no test-integrity findings, and a
|
|
115
|
+
missing or empty `--source` means the audit did not run.
|
|
116
|
+
|
|
117
|
+
Merge the JSON into `state.reviewIterations[-1].reviewDecision` through
|
|
118
|
+
`write-state.mjs`:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
jq --slurpfile d "$WORKTREE/.pipeline/review-decision-$ITERATION.json" \
|
|
122
|
+
'{reviewIterations: (.reviewIterations | .[-1].reviewDecision = $d[0])}' "$STATE_FILE" \
|
|
123
|
+
| node "$HOME/.claude/scripts/write-state.mjs" "$STATE_FILE"
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
| Exit | Ledger | The run |
|
|
127
|
+
|---|---|---|
|
|
128
|
+
| 0 | `pass` | continues with the rewritten triage |
|
|
129
|
+
| 1 | `fail`: a rebuttal round ran | `gate-ledger.mjs park --outcome verification-failed --gate review-decision` |
|
|
130
|
+
| 2 | nothing | usage error; fix the call |
|
|
131
|
+
| 3 | `fail`: triage unreadable, or an accepted blocker with no reviewer record to check it against | parks the same way |
|
|
132
|
+
|
|
133
|
+
The gate records the verdict; it does not park. Parking is the explicit call:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
[ "$RD_RC" = 1 ] || [ "$RD_RC" = 3 ] && node "$HOME/.claude/scripts/gate-ledger.mjs" park \
|
|
137
|
+
--outcome verification-failed --gate review-decision --reason "review-decision exit $RD_RC" --state "$STATE_FILE"
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
A missing reviewer record is a failure and not a pass: with nothing to count,
|
|
141
|
+
every blocker would be lowered, and a run that forgot to persist its
|
|
142
|
+
reviewers would get a clean review for it. An empty `reviewers: []` is a
|
|
143
|
+
missing record, for the same reason.
|
|
144
|
+
|
|
145
|
+
## Verify-by-test in autopilot
|
|
146
|
+
|
|
147
|
+
A single-reviewer blocker survives only with a failing verify-by-test log, so
|
|
148
|
+
an autopilot run with `prefs.global.verifyByTest.enabled` false keeps only
|
|
149
|
+
corroborated and test-integrity blockers. That is the intended trade: without
|
|
150
|
+
the empirical step there is nothing but a second opinion to lean on. Turn
|
|
151
|
+
verify-by-test on for autopilot work where one reviewer catching a real bug
|
|
152
|
+
matters more than the extra single-test runs.
|
|
153
|
+
|
|
154
|
+
## Mandatory at commit
|
|
155
|
+
|
|
156
|
+
`review-decision` is in `MANDATORY_AT_COMMIT` (`gate-ledger.mjs`). Every mode
|
|
157
|
+
in `phases.json` carries Review (`smoke-review-in-every-mode.sh`), and the gate
|
|
158
|
+
runs on the Step 3.1 empty result too, where it records `pass`: a run with no
|
|
159
|
+
blocker, or with no finding at all, still gets an entry for HEAD, so the
|
|
160
|
+
requirement blocks no clean commit. It is the only check that refuses a
|
|
161
|
+
rebuttal round, and a check the commit hook does not ask for is one an agent
|
|
162
|
+
can skip. Its sha is HEAD, as for `verify-citations`, which runs on the same
|
|
163
|
+
triage output.
|
|
164
|
+
|
|
165
|
+
## Limits
|
|
166
|
+
|
|
167
|
+
- All reviewers on Claude Code are Claude-family. Requiring two of them is
|
|
168
|
+
weaker than two vendors agreeing; the failing-test basis is what carries the
|
|
169
|
+
weight, and the rule says so rather than counting same-family agreement as
|
|
170
|
+
independent proof.
|
|
171
|
+
- The line window is a heuristic. Two reviewers describing different bugs
|
|
172
|
+
three lines apart in the same file count as one finding; two describing the
|
|
173
|
+
same bug from opposite ends of a long function do not.
|
|
174
|
+
- The evidence check reads the log, it does not re-run the test. A log that
|
|
175
|
+
shows a failure for a different reason than the finding claims still counts;
|
|
176
|
+
verify-by-test writes one minimal repro per finding, which is what keeps that
|
|
177
|
+
case narrow.
|
|
178
|
+
|
|
179
|
+
## Reference
|
|
180
|
+
|
|
181
|
+
Script: `scripts/review-decision-gate.mjs`. Tests:
|
|
182
|
+
`test/review-decision-gate.test.mjs`; smoke
|
|
183
|
+
`smoke-gates-interactive-noop.sh`. Related: `verify-by-test.md`,
|
|
184
|
+
`review-delta.md`, `unattended-gates.md`, `phases/phase-3-review.md` Steps
|
|
185
|
+
2.5, 3.1, 3.6 and 3.7.
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# Feature: Scaffold contract and the between-stories check
|
|
2
|
+
|
|
3
|
+
<!-- toc -->
|
|
4
|
+
- [The command](#the-command)
|
|
5
|
+
- [What a scaffold skill must do](#what-a-scaffold-skill-must-do)
|
|
6
|
+
- [The skeleton check](#the-skeleton-check)
|
|
7
|
+
- [Between stories: build, smoke, demo](#between-stories-build-smoke-demo)
|
|
8
|
+
- [Remote repository](#remote-repository)
|
|
9
|
+
- [Ledger](#ledger)
|
|
10
|
+
- [Limits](#limits)
|
|
11
|
+
- [Reference](#reference)
|
|
12
|
+
<!-- /toc -->
|
|
13
|
+
|
|
14
|
+
**Pattern**: a new project is only a good starting point if it is already green
|
|
15
|
+
by the same commands every later change is judged by. The pipeline does not
|
|
16
|
+
write project code here. It calls the enabled toolkit's `<toolkit>:scaffold`
|
|
17
|
+
skill, which owns the stack's layout and conventions, and then verifies the
|
|
18
|
+
result with the stack adapter's build, test and lint commands and the evidence
|
|
19
|
+
tooling the rest of the pipeline uses. After that, every story ends with the
|
|
20
|
+
app still building, passing, linting and running its demo; a story that
|
|
21
|
+
leaves it otherwise stops the next one from starting.
|
|
22
|
+
|
|
23
|
+
## The command
|
|
24
|
+
|
|
25
|
+
`/multi-agent:scaffold <ios|android|web|backend> <name> [--dir <path>]`
|
|
26
|
+
(`commands/multi-agent/scaffold/SKILL.md`, frontmatter contract fields per
|
|
27
|
+
`_command-contract.mjs`: one required enum, one required text, one path flag;
|
|
28
|
+
`gui: form`, not destructive).
|
|
29
|
+
|
|
30
|
+
| Step | What happens | Who |
|
|
31
|
+
|---|---|---|
|
|
32
|
+
| Resolve | `ai-<stack>-toolkit:scaffold` (`web` → `ai-frontend-toolkit`). Not available: stop, the plugin is not enabled (`/multi-agent:stack`). | pipeline |
|
|
33
|
+
| Dispatch | the Skill tool with the name and the target directory | pipeline |
|
|
34
|
+
| Create | the skeleton, `.scaffold.json`, a `.gitignore` covering `.pipeline/`, `git init` | toolkit skill |
|
|
35
|
+
| Verify | `scaffold-gate.mjs --dir <dir> --phase skeleton` | pipeline |
|
|
36
|
+
| Commit | `chore: scaffold <name>`, only after the gate exits 0 | pipeline |
|
|
37
|
+
| Remote | a separate question after the commit, run only on an explicit yes | person |
|
|
38
|
+
|
|
39
|
+
Dispatch follows the plugin-skill contract in `component-dispatch.md`: the
|
|
40
|
+
skill is resolved by name through the Skill tool, a missing skill is a halt
|
|
41
|
+
with the plugin to enable, never a fallback to hand-written files, and the
|
|
42
|
+
skill neither reads nor writes `agent-state.json`. The pipeline's side is
|
|
43
|
+
classification, dispatch and verification.
|
|
44
|
+
|
|
45
|
+
## What a scaffold skill must do
|
|
46
|
+
|
|
47
|
+
Each toolkit's `scaffold` skill (the `multi-agent-plugins` marketplace, authored
|
|
48
|
+
in the plugin repo: `build-stack-plugins.mjs` regenerates only the `knowledge/`
|
|
49
|
+
layer) states in its own SKILL.md what it creates, the build, test and lint
|
|
50
|
+
commands that must pass, and that it never creates a remote. The pipeline holds
|
|
51
|
+
it to this:
|
|
52
|
+
|
|
53
|
+
- Writes into an empty or new directory only.
|
|
54
|
+
- Includes at least one real test, so the test count is not zero.
|
|
55
|
+
- Writes `.scaffold.json` (`schemas/scaffold-manifest.schema.json`):
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{ "version": "1.0.0", "toolkit": "ai-ios-toolkit", "name": "SampleApp",
|
|
59
|
+
"stack": "ios", "vars": { "scheme": "SampleApp-Package", "simulator": "iPhone 17 Pro" },
|
|
60
|
+
"demo": { "command": "swift run SampleAppDemo", "expect": "SampleApp ready, modules: [0-9]+" } }
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
`stack` is an adapter id in `schemas/stack-adapters.json`; `vars` fills that
|
|
64
|
+
adapter's `{slot}`s. The gate sets `worktreePath` to the skeleton and a new
|
|
65
|
+
`resultBundle` per run itself, because xcodebuild will not overwrite one; a
|
|
66
|
+
`vars` entry of either name is ignored. `demo` is a command that terminates on its own and a
|
|
67
|
+
pattern its output must match. A `remote` key is refused.
|
|
68
|
+
- Runs `git init`, makes no commit, adds no remote, pushes nothing.
|
|
69
|
+
|
|
70
|
+
## The skeleton check
|
|
71
|
+
|
|
72
|
+
`scaffold-gate.mjs --phase skeleton` passes when all of these hold:
|
|
73
|
+
|
|
74
|
+
| Check | Pass |
|
|
75
|
+
|---|---|
|
|
76
|
+
| `manifest` | `.scaffold.json` is valid and names an applicable adapter |
|
|
77
|
+
| `no-remote` | `git remote` lists nothing |
|
|
78
|
+
| `first-commit` | the repository has no commit yet: the proof comes before it |
|
|
79
|
+
| `build` | the adapter's build command exits 0 and `evidence-gate.mjs --claim build --stack` accepts the log |
|
|
80
|
+
| `test` | the adapter's test command exits 0 and `evidence-gate.mjs --claim test --stack` accepts the log, counts included (`test-summary.mjs`): zero tests executed fails. Gradle prints no counts on success, so for an adapter that reads JUnit XML the `test-results` directories are summed as well |
|
|
81
|
+
| `lint` | the adapter's lint command exits 0 |
|
|
82
|
+
| `demo` | when the manifest declares one: exit 0 and the output matches `expect` |
|
|
83
|
+
|
|
84
|
+
Commands come from the adapter (`_stack-adapter.mjs commandFor`), never from
|
|
85
|
+
the skill: `ios` builds and tests through `xcodebuild` on the package scheme
|
|
86
|
+
and lints with `swift format lint`, `android` through Gradle (`assembleDebug`,
|
|
87
|
+
`testDebugUnitTest`, `lintDebug`), `web` and `backend-node` through the
|
|
88
|
+
package's `build`, `test` and `lint` scripts with the repo's own package
|
|
89
|
+
manager. Every log is kept under `<dir>/.pipeline/scaffold/`. Exit 0 pass, 1 a
|
|
90
|
+
check failed, 2 usage, 3 manifest missing or invalid.
|
|
91
|
+
|
|
92
|
+
A failed check goes back to the scaffold skill once with the failing checks and
|
|
93
|
+
their logs; a second failure leaves the skeleton uncommitted and reports it.
|
|
94
|
+
The pipeline does not edit the skeleton to make a check pass.
|
|
95
|
+
|
|
96
|
+
## Between stories: build, smoke, demo
|
|
97
|
+
|
|
98
|
+
A story is not done because its code exists; the app has to still work and be
|
|
99
|
+
shown working. For a repository with `.scaffold.json` at its root, Phase 2 runs
|
|
100
|
+
the story check at entry and at exit:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
node "$HOME/.claude/scripts/scaffold-gate.mjs" --dir "$WORKTREE" --phase story --story "$ITEM_ID"
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
The same build, test and lint checks as the skeleton, plus `demo`, which is
|
|
107
|
+
required here (a manifest without one is exit 3), and without the
|
|
108
|
+
`first-commit` check.
|
|
109
|
+
|
|
110
|
+
| Exit | At entry | At exit |
|
|
111
|
+
|---|---|---|
|
|
112
|
+
| 0 | the story starts | the story is done |
|
|
113
|
+
| 1 | the previous story left the app broken or not demoable: this one does not start, the run halts with the failing checks | a Phase 2 gate failure, like a red build |
|
|
114
|
+
| 2 | a call error: fix the arguments; never read as a pass | the same |
|
|
115
|
+
| 3 | `.scaffold.json` missing, unreadable, invalid or without `demo`: the run halts, nothing is built on a manifest the gate cannot read | the same |
|
|
116
|
+
|
|
117
|
+
The idea of checking that the app builds, passes a smoke and can be
|
|
118
|
+
demonstrated after every story, before the next begins, comes from GPT-Pilot.
|
|
119
|
+
Only the idea is taken; this is a separate implementation built on the
|
|
120
|
+
pipeline's own adapter and evidence tooling.
|
|
121
|
+
|
|
122
|
+
## Remote repository
|
|
123
|
+
|
|
124
|
+
Creating the hosted repository is an outward write and is never part of the
|
|
125
|
+
scaffold. `/multi-agent:scaffold` asks once, after the first commit, and runs
|
|
126
|
+
`gh repo create` only on an explicit yes to the exact command shown. With
|
|
127
|
+
`MULTI_AGENT_UNATTENDED=1` the question is never asked, and agent-guard's
|
|
128
|
+
unattended policy refuses the write anyway: `gh repo create`, a mutating
|
|
129
|
+
`gh api` call (for example `-X POST user/repos`) and `git push` are all
|
|
130
|
+
blocked (`scripts/unattended_policy.py`, `GH_WRITES`; asserted in
|
|
131
|
+
`test/scaffold-gate.test.mjs`).
|
|
132
|
+
|
|
133
|
+
## Ledger
|
|
134
|
+
|
|
135
|
+
With the quality gates active (`lib/unattended.mjs`, `gatesActive`) the verdict
|
|
136
|
+
is recorded as `scaffold/skeleton` or `scaffold/story` through
|
|
137
|
+
`gate-ledger.mjs`, next to the `evidence-gate/build` and `evidence-gate/test`
|
|
138
|
+
entries evidence-gate.mjs writes for the same logs. Neither scaffold entry is
|
|
139
|
+
mandatory at commit: a repository that was not scaffolded has nothing for them
|
|
140
|
+
to check. A skeleton has no HEAD before its first commit, so its entries carry
|
|
141
|
+
no sha, and an unattended first commit is refused by the commit hook's ledger
|
|
142
|
+
check. Scaffolding is a flow with a person at it, or a terminal autopilot run.
|
|
143
|
+
|
|
144
|
+
## Limits
|
|
145
|
+
|
|
146
|
+
- The demo is a command and a pattern. It shows the app starts and reaches a
|
|
147
|
+
known state; it does not judge whether the story's behaviour is right, which
|
|
148
|
+
is what the tests and the review are for.
|
|
149
|
+
- The iOS check needs Xcode and the simulator named in `vars`; a machine
|
|
150
|
+
without them fails the build or test check rather than skipping it.
|
|
151
|
+
- A lint command the stack does not declare (`go`, `rust`, `python`, `jvm`
|
|
152
|
+
today) fails the `lint` check; those stacks have no scaffold skill.
|
|
153
|
+
|
|
154
|
+
## Reference
|
|
155
|
+
|
|
156
|
+
Scripts: `scaffold-gate.mjs`, `_stack-adapter.mjs` (`lint` command kind),
|
|
157
|
+
`evidence-gate.mjs`, `test-summary.mjs`, `gate-ledger.mjs`. Schema:
|
|
158
|
+
`schemas/scaffold-manifest.schema.json`, `schemas/stack-adapters.json`.
|
|
159
|
+
Command: `commands/multi-agent/scaffold/SKILL.md`. Tests:
|
|
160
|
+
`test/scaffold-gate.test.mjs`, `test/stack-adapter.test.mjs`.
|
|
@@ -10,7 +10,7 @@ Run the audit when any of these holds:
|
|
|
10
10
|
- The base branch is a release branch.
|
|
11
11
|
- The run is the standalone `/multi-agent:security-review` command, which dispatches straight to this step.
|
|
12
12
|
|
|
13
|
-
There is no `--audit` flag: the trigger is the diff, not a word the user has to remember. When none of these holds, the audit does not run,
|
|
13
|
+
There is no `--audit` flag: the trigger is the diff, not a word the user has to remember. When none of these holds, the audit does not run, no `security-audit-$ITERATION.json` is written, and the Step 3.0 merge and the review-decision `--source` are no-ops.
|
|
14
14
|
|
|
15
15
|
## Threat model first
|
|
16
16
|
|
|
@@ -46,7 +46,11 @@ Validate with the same gate protocol as a reviewer - the exit code decides, no
|
|
|
46
46
|
printf '%s' "$SECURITY_AUDIT_JSON" | node "$HOME/.claude/scripts/validate-reviewer.mjs" -
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
On validator failure: one self-correction rework, then HALT the phase (identical to the reviewer output-contract gate). Persist the object to `state.reviewIterations[<iteration>].securityAudit` and
|
|
49
|
+
On validator failure: one self-correction rework, then HALT the phase (identical to the reviewer output-contract gate). Persist the object to `state.reviewIterations[<iteration>].securityAudit` and write it to a file, which Step 3.0 merges and `review-decision-gate.mjs` reads as one independent `--source`:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
printf '%s' "$SECURITY_AUDIT_JSON" > "$WORKTREE/.pipeline/security-audit-$ITERATION.json"
|
|
53
|
+
```
|
|
50
54
|
|
|
51
55
|
Because the output is reviewer-shaped, the Step 3.0 merge appends its `findings[]` alongside the test-integrity findings. A `blocking` security finding then reaches triage, and a triage-accepted blocker blocks Phase 4 - the "critical security items block the commit" contract is wired here, not merely stated.
|
|
52
56
|
|
|
@@ -36,9 +36,12 @@ The sharper case is a document whose evidence supported few sections: the sole i
|
|
|
36
36
|
A skill becomes a standards registry by saying so in its own frontmatter:
|
|
37
37
|
|
|
38
38
|
```yaml
|
|
39
|
-
|
|
39
|
+
metadata:
|
|
40
|
+
standards-registry: references/rules.yml
|
|
40
41
|
```
|
|
41
42
|
|
|
43
|
+
The key sits under `metadata:` because the host skill frontmatter schema has no `standards-registry` field, and the skill linters reject unknown top-level keys in skills that ship to a plugin. A top-level `standards-registry:` line is still read.
|
|
44
|
+
|
|
42
45
|
`skill-conformance.mjs` reads frontmatter across the installed skills trees and loads what declared itself. Nothing in the pipeline names `ios-coding-standard`, `apple-archive-compliance` or any other skill, so a future UIKit, Objective-C, Kotlin or backend registry drops in with zero pipeline change - and a registry that is absent produces a declared coverage gap rather than a silent pass.
|
|
43
46
|
|
|
44
47
|
**The skills root differs per host**, so discovery is a bounded walk over candidate roots (`<install>/skills`, `<install>/multi-agent-refs/skills` for Codex, `<repo>/pipeline/skills`), installed layouts first. `install/copilot.mjs` copies `scripts/` byte-for-byte with no path rewrite, so a hardcoded `~/.claude/skills` is inert on two of the three hosts. That bug has already shipped here once: dynamic skill loading exited 1 on every real install while passing a smoke that ran from the repo. `skillsRootsSearched` is recorded in the manifest so an empty result is attributable to a root rather than to an absence of registries.
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# Feature: Stack Adapters and Test Evidence
|
|
2
|
+
|
|
3
|
+
<!-- toc -->
|
|
4
|
+
- [1. The adapter table](#1-the-adapter-table)
|
|
5
|
+
- [2. `evidence-gate.mjs --stack <id>`](#2-evidence-gatemjs---stack-id)
|
|
6
|
+
- [3. `test-summary.mjs`](#3-test-summarymjs)
|
|
7
|
+
- [4. `test-strength.mjs`](#4-test-strengthmjs)
|
|
8
|
+
- [Reference](#reference)
|
|
9
|
+
<!-- /toc -->
|
|
10
|
+
|
|
11
|
+
**Pattern**: one set of markers cannot read "the build passed" and "the tests
|
|
12
|
+
passed" for every stack. It does not know Maven's `BUILD SUCCESS` or a silent
|
|
13
|
+
`go build`, and `** TEST SUCCEEDED **`, Gradle's `BUILD SUCCESSFUL` and
|
|
14
|
+
`go test`'s `ok` are all printed for a run that executed zero tests. A pass
|
|
15
|
+
claim needs the stack's own markers and the test count, and a new test needs to
|
|
16
|
+
fail without the change it claims to cover.
|
|
17
|
+
|
|
18
|
+
## 1. The adapter table
|
|
19
|
+
|
|
20
|
+
`$HOME/.claude/schemas/stack-adapters.json` (shape:
|
|
21
|
+
`stack-adapters.schema.json`) holds one adapter per stack: `ios`, `android`,
|
|
22
|
+
`web`, `backend-node`, `python`, `go`, `rust`, `jvm`, plus `unknown`. Each carries
|
|
23
|
+
detection rules, build/test command templates, success and failure markers, the
|
|
24
|
+
test-summary parser order, test-file patterns, truth-source globs (localization
|
|
25
|
+
keys, strings.xml, i18n JSON, generated endpoints) and reference patterns with a
|
|
26
|
+
`(?<ref>...)` group for the symbol they name. No company or product names: the
|
|
27
|
+
table describes toolchains, not projects.
|
|
28
|
+
|
|
29
|
+
`$HOME/.claude/scripts/_stack-adapter.mjs` loads and validates it (no schema
|
|
30
|
+
library; every pattern is compiled at load) and resolves a repo:
|
|
31
|
+
|
|
32
|
+
- `stack-detect.sh` answers the coarse class (ios / android / web / backend) and
|
|
33
|
+
keeps the rules that need file content - the Android plugin versus a JVM
|
|
34
|
+
Gradle build, and which side of a package.json a repo is on.
|
|
35
|
+
- `backend` is refined by the manifest that names the language (`go.mod`,
|
|
36
|
+
`Cargo.toml`, `pyproject.toml`, `pom.xml`, ...), searched root first and then
|
|
37
|
+
three levels deep with the same prune set, so a vendored checkout or a build
|
|
38
|
+
directory never decides the stack.
|
|
39
|
+
- Several adapters may match. `order` picks the primary: a language manifest
|
|
40
|
+
outranks a package.json, which is often only tooling.
|
|
41
|
+
- Nothing matched is the `unknown` adapter, never an error.
|
|
42
|
+
|
|
43
|
+
Commands render through `commandFor`: a template slot inside double quotes is
|
|
44
|
+
inserted after refusing any quote-breaking character, a bare slot is
|
|
45
|
+
single-quoted, and a package script resolves through `package-manager.mjs`.
|
|
46
|
+
Tools that print nothing on success carry an `exitMarker` the shell echoes only
|
|
47
|
+
on exit 0.
|
|
48
|
+
|
|
49
|
+
## 2. `evidence-gate.mjs --stack <id>`
|
|
50
|
+
|
|
51
|
+
Without `--stack` the gate is unchanged. With it:
|
|
52
|
+
|
|
53
|
+
| Step | Rule |
|
|
54
|
+
|---|---|
|
|
55
|
+
| markers | the adapter's success/failure lists replace the defaults; a caller `--success-pattern` / `--failure-pattern` still wins |
|
|
56
|
+
| failure | decisive, before anything else |
|
|
57
|
+
| counts (test claim) | `test-summary.mjs` with the adapter's parsers, then `--junit` / `--xcresult` / `--xcresult-json` when the log has none: `executed == 0` fails ("no tests executed"), `failed > 0` fails. A `skipped` marker of the adapter (a test task that did not run) counts as zero when no count was read. Still unread: with the quality gates active the claim fails, since markers alone do not say how many tests ran; attended, the markers decide and the verdict says so |
|
|
58
|
+
| `unknown` | present evidence with no default failure marker is `ok` with `notApplicable: true`; missing or failing evidence still fails |
|
|
59
|
+
| a typo in the id | usage error (exit 2), so a misspelling cannot switch the success markers off |
|
|
60
|
+
|
|
61
|
+
## 3. `test-summary.mjs`
|
|
62
|
+
|
|
63
|
+
Reads counts from the runner's own output: xcodebuild (XCTest and Swift Testing
|
|
64
|
+
lines), xcresult (`xcrun xcresulttool` when a bundle is given, or a captured JSON
|
|
65
|
+
summary), JUnit XML (Gradle, Surefire, pytest), Maven, Gradle, pytest, jest,
|
|
66
|
+
vitest, `node --test`, `go test -v` and `-json`, `cargo test`. Output:
|
|
67
|
+
`{executed, passed, failed, skipped, parser, source, status, reason?}`.
|
|
68
|
+
|
|
69
|
+
- `executed` excludes skipped tests, so a run that skipped everything is a zero run.
|
|
70
|
+
- `status` is `passed | failed | no-tests | unparsed`; exit 0 / 1 / 3 / 4.
|
|
71
|
+
- A runner recognised without counts (Gradle on success, `go test` without `-v`,
|
|
72
|
+
a build that failed first) is `unparsed` with the reason. Text no parser
|
|
73
|
+
recognises is `unparsed` too. Never a guess.
|
|
74
|
+
|
|
75
|
+
## 4. `test-strength.mjs`
|
|
76
|
+
|
|
77
|
+
For `--base`/`--head`, runs each changed test file in a temporary worktree at
|
|
78
|
+
`head` (it must pass there), then restores every changed production file to
|
|
79
|
+
`base` (files the change added are removed) and runs it again:
|
|
80
|
+
|
|
81
|
+
| Verdict | Meaning |
|
|
82
|
+
|---|---|
|
|
83
|
+
| `red` | fails on a test without the production change: it covers the change |
|
|
84
|
+
| `still-green` | passes without it: it does not exercise the change |
|
|
85
|
+
| `unjudged` | fails without it by not compiling or loading (the adapter's `loadError` markers; every adapter's when none is named), so it never reached an assertion |
|
|
86
|
+
| `not-run` | fails on head, timed out, executed zero tests, or no production change to revert |
|
|
87
|
+
|
|
88
|
+
Exit 0 all red, 1 any still-green, 4 anything else, 2 usage. In the gate
|
|
89
|
+
ledger red plus unjudged is a pass and unjudged alone not-applicable.
|
|
90
|
+
|
|
91
|
+
The limit is the revert itself: production files go back whole and added
|
|
92
|
+
files are removed, so a test that references new code fails to compile or
|
|
93
|
+
load without it whatever it asserts. That red is no evidence, so it is not
|
|
94
|
+
counted as red. On a compiled stack (Swift, Kotlin) this covers every test
|
|
95
|
+
that calls a new symbol; only tests that compile against the base are judged. The worktree lives
|
|
96
|
+
under the system temp directory (never inside the repo), each run is killed as a
|
|
97
|
+
process group at `--timeout-ms`, and the worktree is removed and pruned on exit,
|
|
98
|
+
including on SIGINT/SIGTERM. The caller's checkout is not touched.
|
|
99
|
+
|
|
100
|
+
`--head worktree` judges the uncommitted working tree: it is snapshotted into a
|
|
101
|
+
commit object through a private index, so the caller's index, HEAD and refs are
|
|
102
|
+
not touched. Phase 2 ends before anything is committed, which is where it runs.
|
|
103
|
+
|
|
104
|
+
It runs every changed test twice, so it belongs to unattended runs, where
|
|
105
|
+
nobody is watching the clock and a weak test would otherwise pass review
|
|
106
|
+
unnoticed. The unattended Phase 2 exit gate calls it, with `evidence-gate
|
|
107
|
+
--stack` and `test-summary`, and each records its verdict in `state.gates[]`
|
|
108
|
+
(`features/unattended-gates.md`, section 4). An attended run does not invoke it.
|
|
109
|
+
|
|
110
|
+
## Reference
|
|
111
|
+
|
|
112
|
+
Tests: `test/stack-adapter.test.mjs`, `test/evidence-gate-stack.test.mjs`,
|
|
113
|
+
`test/test-summary.test.mjs`, `test/test-strength.test.mjs`. Fixtures:
|
|
114
|
+
`test/fixtures/stack-logs/<stack>/` (success, failure, zero-test and mixed logs
|
|
115
|
+
per stack; the xcodebuild, xcresult, pytest and `node --test` ones are captured
|
|
116
|
+
output).
|