|
| 1 | +--- |
| 2 | +description: Run the full autonomous speckit pipeline — specify through implement with quality gates. |
| 3 | +scripts: |
| 4 | + sh: scripts/bash/check-prerequisites.sh --json --paths-only |
| 5 | + ps: scripts/powershell/check-prerequisites.ps1 -Json -PathsOnly |
| 6 | +--- |
| 7 | + |
| 8 | +## User Input |
| 9 | + |
| 10 | +```text |
| 11 | +$ARGUMENTS |
| 12 | +``` |
| 13 | + |
| 14 | +The user input is the **feature description** (required). Optional flags: |
| 15 | +- `--commit` — after implementation, create a git commit, push, and open a PR |
| 16 | + |
| 17 | +Parse the arguments: extract the feature description text and whether `--commit` is present. |
| 18 | + |
| 19 | +## Goal |
| 20 | + |
| 21 | +Run the complete speckit pipeline autonomously — from specification through implementation — with convention-based quality gates. No human checkpoints. Halts only on unresolvable blockers (writes `blockers.md`). |
| 22 | + |
| 23 | +## Execution Steps |
| 24 | + |
| 25 | +### 1. Initialize |
| 26 | + |
| 27 | +Run `{SCRIPT}` once from repo root to get `REPO_ROOT`. |
| 28 | + |
| 29 | +Extract the feature description and `--commit` flag from user input. |
| 30 | + |
| 31 | +### 2. Specify |
| 32 | + |
| 33 | +Run `/speckit.specify {feature-description}`. |
| 34 | + |
| 35 | +This creates the feature branch, spec directory, and `spec.md`. |
| 36 | + |
| 37 | +### 3. Resolve Feature Directory |
| 38 | + |
| 39 | +Re-run `{SCRIPT}` (without `--require-tasks`) to get `FEATURE_DIR` now that the feature branch and spec exist. |
| 40 | + |
| 41 | +### 4. Convention Detection |
| 42 | + |
| 43 | +Check which autonomous infrastructure is available: |
| 44 | + |
| 45 | +``` |
| 46 | +AUTONOMOUS_CONSTITUTION = exists(".specify/memory/autonomous-constitution.md") |
| 47 | + — OR constitution.md contains "## Autonomous Clarification Protocol" |
| 48 | +QUALITY_GATE = exists(".specify/memory/quality-gate.md") |
| 49 | +DECISIONS_TEMPLATE = exists(".specify/templates/decisions-template.md") |
| 50 | +PLAYWRIGHT_CONFIG = exists("playwright.config.js") OR exists("playwright.config.ts") |
| 51 | +E2E_SKILL = /speckit.e2e is available as a skill |
| 52 | +``` |
| 53 | + |
| 54 | +Each gate is independently enabled. Missing infrastructure means that gate is skipped (not an error). |
| 55 | + |
| 56 | +### 5. Self-Clarification Loop (if AUTONOMOUS_CONSTITUTION) |
| 57 | + |
| 58 | +Read `autonomous-constitution.md` (or the autonomous sections in `constitution.md`) for the clarification protocol. |
| 59 | + |
| 60 | +1. Re-read the generated `spec.md` in full. |
| 61 | +2. Adopt the role of a skeptical Product Manager — identify ambiguous, missing, or contradictory requirements. |
| 62 | +3. For each issue, resolve using the most conservative interpretation. |
| 63 | +4. Write all resolutions to `{FEATURE_DIR}/decisions.md` (use `decisions-template.md` if available). |
| 64 | +5. Do NOT ask for human input. Resolve autonomously. |
| 65 | + |
| 66 | +### 6. Quality Gate Loop (if QUALITY_GATE) |
| 67 | + |
| 68 | +Read `.specify/memory/quality-gate.md`. |
| 69 | + |
| 70 | +1. Score `spec.md` against every checklist item — mark PASS or FAIL with a one-line rationale. |
| 71 | +2. For each FAIL: fix `spec.md` immediately. |
| 72 | +3. Re-score until all items PASS. |
| 73 | +4. Write final scores to `{FEATURE_DIR}/quality-report.md`. |
| 74 | + |
| 75 | +If after 3 full cycles any item still fails: write `{FEATURE_DIR}/blockers.md` and **halt**. |
| 76 | + |
| 77 | +### 7. Plan |
| 78 | + |
| 79 | +Run `/speckit.plan`. |
| 80 | + |
| 81 | +### 8. Tasks |
| 82 | + |
| 83 | +Run `/speckit.tasks`. |
| 84 | + |
| 85 | +### 9. Task Structural Validation (if AUTONOMOUS_CONSTITUTION) |
| 86 | + |
| 87 | +Read the Task Structural Validation section from `autonomous-constitution.md` (or `constitution.md`). |
| 88 | + |
| 89 | +Validate `tasks.md` against: |
| 90 | + |
| 91 | +**Coverage:** |
| 92 | +- Every user story in `spec.md` maps to at least one task. |
| 93 | +- Every acceptance criterion is addressed by at least one task. |
| 94 | + |
| 95 | +**Structure:** |
| 96 | +- Every task specifies at least one target file path. |
| 97 | +- Every task has a clear success condition. |
| 98 | +- No open questions or unresolved references. |
| 99 | + |
| 100 | +**Ordering:** |
| 101 | +- No dependency on a later task. |
| 102 | +- Parallel tasks `[P]` don't share write targets. |
| 103 | + |
| 104 | +**Autonomy:** |
| 105 | +- Every task can be implemented without human input. |
| 106 | + |
| 107 | +If validation fails: fix `tasks.md` and re-validate. If still failing after 3 cycles: write `{FEATURE_DIR}/blockers.md` and **halt**. |
| 108 | + |
| 109 | +### 10. Pre-Flight Assertions (if AUTONOMOUS_CONSTITUTION) |
| 110 | + |
| 111 | +Read the Pre-Flight Assertions section. Assert ALL of: |
| 112 | + |
| 113 | +- [ ] `constitution.md` exists |
| 114 | +- [ ] `spec.md` exists and has no unchecked items |
| 115 | +- [ ] `decisions.md` exists (if self-clarification was enabled) |
| 116 | +- [ ] `quality-report.md` exists and all PASS (if quality gate was enabled) |
| 117 | +- [ ] `tasks.md` passed structural validation (if task validation was enabled) |
| 118 | +- [ ] No `blockers.md` with unresolved items |
| 119 | + |
| 120 | +If any fail: write `{FEATURE_DIR}/blockers.md` and **halt**. |
| 121 | + |
| 122 | +### 11. Implement |
| 123 | + |
| 124 | +Run `/speckit.implement`. |
| 125 | + |
| 126 | +### 12. E2E Tests (conditional) |
| 127 | + |
| 128 | +**Only if** ALL of these are true: |
| 129 | +- PLAYWRIGHT_CONFIG exists |
| 130 | +- E2E_SKILL is available |
| 131 | +- `plan.md` references frontend files (e.g., files under `client/src/`, `src/pages/`, `src/components/`) |
| 132 | + |
| 133 | +Then run `/speckit.e2e`. |
| 134 | + |
| 135 | +If tests fail after 3 retry cycles: write `{FEATURE_DIR}/blockers.md` and **halt**. |
| 136 | + |
| 137 | +**Skip** if any condition is false (not an error — just skip silently). |
| 138 | + |
| 139 | +### 13. Commit and PR (if --commit flag) |
| 140 | + |
| 141 | +1. Use the `/commit` skill to create the git commit. Do NOT create commits manually. |
| 142 | +2. Push the branch: `git push -u origin HEAD` |
| 143 | +3. Create PR: `gh pr create --fill` |
| 144 | + |
| 145 | +If `/commit` skill is not available, fall back to manual `git add` + `git commit`. |
| 146 | + |
| 147 | +### 14. Report |
| 148 | + |
| 149 | +Display a summary of what was done: |
| 150 | + |
| 151 | +``` |
| 152 | +## Pipeline Complete: {feature-description} |
| 153 | +
|
| 154 | +### Steps Executed |
| 155 | +- [x] Specify — spec.md created |
| 156 | +- [x] Self-clarification — decisions.md ({N} decisions) [or: skipped — no autonomous constitution] |
| 157 | +- [x] Quality gate — all items PASS [or: skipped — no quality-gate.md] |
| 158 | +- [x] Plan — plan.md created |
| 159 | +- [x] Tasks — tasks.md created ({N} tasks) |
| 160 | +- [x] Task validation — all rules pass [or: skipped] |
| 161 | +- [x] Pre-flight — all assertions pass [or: skipped] |
| 162 | +- [x] Implement — all tasks executed |
| 163 | +- [x] E2E — tests pass [or: skipped — no playwright config / backend-only] |
| 164 | +- [x] Commit + PR — {PR_URL} [or: skipped — no --commit flag] |
| 165 | +
|
| 166 | +### Artifacts |
| 167 | +- Spec: {FEATURE_DIR}/spec.md |
| 168 | +- Decisions: {FEATURE_DIR}/decisions.md |
| 169 | +- Quality report: {FEATURE_DIR}/quality-report.md |
| 170 | +- Plan: {FEATURE_DIR}/plan.md |
| 171 | +- Tasks: {FEATURE_DIR}/tasks.md |
| 172 | +``` |
| 173 | + |
| 174 | +## Halting Protocol |
| 175 | + |
| 176 | +At no point during steps 1-13 should the agent pause for human input. |
| 177 | + |
| 178 | +If an unresolvable blocker is hit at any step: |
| 179 | +1. Write `{FEATURE_DIR}/blockers.md` with the specific failure and context. |
| 180 | +2. Display the blocker to the user. |
| 181 | +3. **Stop.** Do not continue to the next step. |
| 182 | + |
| 183 | +Never ask for human clarification mid-pipeline. Resolve autonomously or halt. |
| 184 | + |
| 185 | +## Operating Principles |
| 186 | + |
| 187 | +- **Convention over configuration** — the pipeline auto-detects available infrastructure. No flags needed to enable gates. |
| 188 | +- **Graceful degradation** — missing infrastructure means the gate is skipped, not failed. A project with zero autonomous files still runs: specify → plan → tasks → implement. |
| 189 | +- **Fail fast, fail loud** — blockers halt immediately with a clear report. No silent failures. |
| 190 | +- **Idempotent gates** — each validation loop has a max retry count (3). Infinite loops are impossible. |
0 commit comments