|
| 1 | +--- |
| 2 | +name: flow-run |
| 3 | +description: Run the complete task workflow for this repository by strictly following SPECS/COMMANDS/FLOW.md from BRANCH through ARCHIVE-REVIEW, including required commit checkpoints and quality gates. Use when asked to do the next task end-to-end, complete the full workflow, or execute "start to finish" task delivery in this project. |
| 4 | +--- |
| 5 | + |
| 6 | +# Flow Run |
| 7 | + |
| 8 | +Execute the workflow in `SPECS/COMMANDS/FLOW.md` exactly, without skipping required steps unless the workflow itself explicitly allows skipping. |
| 9 | + |
| 10 | +## Required Inputs |
| 11 | + |
| 12 | +Collect these before starting: |
| 13 | +- Task identifier (for example `P5-T2`) and short description. |
| 14 | +- Current branch and whether a feature branch already exists. |
| 15 | +- Confirmation of which review subject name to use for `REVIEW_{subject}.md`. |
| 16 | + |
| 17 | +If the task identifier is unknown, determine it from `SPECS/Workplan.md` and `SPECS/INPROGRESS/next.md` during SELECT. |
| 18 | + |
| 19 | +## Execution Contract |
| 20 | + |
| 21 | +Apply these rules throughout execution: |
| 22 | +- Read `SPECS/COMMANDS/FLOW.md` at the beginning and treat it as the source of truth. |
| 23 | +- Complete steps in order: `BRANCH -> SELECT -> PLAN -> EXECUTE -> ARCHIVE -> REVIEW -> FOLLOW-UP -> ARCHIVE-REVIEW`. |
| 24 | +- Create a commit checkpoint after each major step using FLOW commit message patterns. |
| 25 | +- Run required quality gates during EXECUTE (`pytest`, `ruff check src/`, `mypy src/` if configured, `pytest --cov` with coverage >= 90%). |
| 26 | +- Record artifacts in expected locations under `SPECS/INPROGRESS/` and `SPECS/ARCHIVE/`. |
| 27 | +- If REVIEW has no actionable issues, skip FOLLOW-UP and proceed directly to ARCHIVE-REVIEW, as FLOW permits. |
| 28 | + |
| 29 | +## Step Procedure |
| 30 | + |
| 31 | +1. BRANCH |
| 32 | +- Ensure `main` is up to date. |
| 33 | +- Create `feature/{TASK_ID}-{short-description}` if not already on the correct feature branch. |
| 34 | +- Commit message pattern: `Branch for {TASK_ID}: {short description}`. |
| 35 | + |
| 36 | +2. SELECT |
| 37 | +- Choose the next task from `SPECS/Workplan.md` (optionally with `python scripts/pick_next_task.py`). |
| 38 | +- Update `SPECS/INPROGRESS/next.md` with selected task metadata. |
| 39 | +- Commit message pattern: `Select task {TASK_ID}: {TASK_NAME}`. |
| 40 | + |
| 41 | +3. PLAN |
| 42 | +- Create the task PRD at `SPECS/INPROGRESS/{TASK_ID}_{TASK_NAME}.md`. |
| 43 | +- Define deliverables, acceptance criteria, dependencies. |
| 44 | +- Commit message pattern: `Plan task {TASK_ID}: {TASK_NAME}`. |
| 45 | + |
| 46 | +4. EXECUTE |
| 47 | +- Implement to the PRD. |
| 48 | +- Run quality gates defined in FLOW. |
| 49 | +- Create `SPECS/INPROGRESS/{TASK_ID}_Validation_Report.md`. |
| 50 | +- Commit message pattern: `Implement {TASK_ID}: {brief description of changes}`. |
| 51 | +- Split into incremental commits if the task is large. |
| 52 | + |
| 53 | +5. ARCHIVE |
| 54 | +- Run `SPECS/COMMANDS/ARCHIVE.md` workflow. |
| 55 | +- Verify task archive folder exists under `SPECS/ARCHIVE/{TASK_ID}_{TASK_NAME}/`. |
| 56 | +- Confirm `SPECS/INPROGRESS/next.md` and `SPECS/Workplan.md` are updated. |
| 57 | +- Commit message pattern: `Archive task {TASK_ID}: {TASK_NAME} ({VERDICT})`. |
| 58 | + |
| 59 | +6. REVIEW |
| 60 | +- Run `SPECS/COMMANDS/REVIEW.md`. |
| 61 | +- Save review report at `SPECS/INPROGRESS/REVIEW_{subject}.md`. |
| 62 | +- Commit message pattern: `Review {TASK_ID}: {short subject}`. |
| 63 | + |
| 64 | +7. FOLLOW-UP |
| 65 | +- If review has actionable findings, run `SPECS/COMMANDS/PRIMITIVES/FOLLOW_UP.md`. |
| 66 | +- Add follow-up tasks to `SPECS/Workplan.md`. |
| 67 | +- Commit message pattern: `Follow-up {TASK_ID}: {short subject}`. |
| 68 | +- If no actionable findings, explicitly note FOLLOW-UP skipped. |
| 69 | + |
| 70 | +8. ARCHIVE-REVIEW |
| 71 | +- Move `REVIEW_{subject}.md` to `SPECS/ARCHIVE/_Historical/` or relevant task folder. |
| 72 | +- Update `SPECS/ARCHIVE/INDEX.md`. |
| 73 | +- Commit message pattern: `Archive REVIEW_{subject} report`. |
| 74 | + |
| 75 | +## Completion Criteria |
| 76 | + |
| 77 | +Consider the run complete only when all are true: |
| 78 | +- FLOW step sequence has been fully executed (or optional FOLLOW-UP formally skipped due to no findings). |
| 79 | +- Required artifacts exist in `SPECS/INPROGRESS/` and/or `SPECS/ARCHIVE/`. |
| 80 | +- Required quality gates were run and outcomes captured. |
| 81 | +- Commit checkpoints align with FLOW message patterns. |
| 82 | + |
| 83 | +## Trigger Phrases |
| 84 | + |
| 85 | +Use this skill when requests look like: |
| 86 | +- "Do the next task from start to end." |
| 87 | +- "Run the full FLOW workflow for the next task." |
| 88 | +- "Take this task all the way through branch, plan, execute, archive, and review." |
| 89 | +- "Strictly follow the instructions in the @SPECS/COMMANDS/FLOW.md file carefully for the next task. Do not stop between steps. Complete each phase of the FLOW process one by one without asking questions or pausing." |
0 commit comments