name: m-autoflow description: Enforce a staged, auditable software execution workflow with worktree-first initialization, requirements analysis, architecture design, root plan.md gating, mandatory code review, docs/change archiving, explicit blocker handling, rollback traceability, and controlled sub-agent delegation. Use this skill for work that must follow strict engineering discipline rather than ad hoc coding.
m:autoflow
Overview
Use this skill to execute implementation work under strict stage gates, explicit blockers, worktree isolation, and auditable artifacts. Treat speed as secondary to correctness, traceability, and handoff quality.
Quick Start
- Invoke this skill explicitly as
$m-autoflowwhen you want deterministic routing into this workflow. - Keep this skill as the umbrella workflow entry. For split-phase execution, route to:
$m-autoflow-researchfor optional web research only when the user explicitly asks for online/current/source-backed research.$m-autoflow-planfor initialization, requirements, architecture, andplan.md/todo.mdgating.$m-autoflow-executefor approved implementation mapped to confirmed Task IDs, including light syntax/static/focused checks.$m-autoflow-testfor optional heavy workflow validation, integration testing, usability review, security review, and performance review.$m-autoflow-archivefordocs/change, lessons, workflow-end confirmation, merge, and cleanup.
- If
docs/requirementsordocs/specsexists, prioritize them during stages1and2before falling back to code-only inference. - Do not run web research by default. Use
$m-autoflow-researchbefore or during planning only when the user explicitly asks for web search, online research, latest/current external facts, or source-backed investigation. - Read
references/initialization.mdbefore stage1. - Read
references/stages.mdto execute stages1through4and emit the required outputs. - Read
references/m-docs-integration.mdbefore editingplan.md,docs/requirements,docs/specs,docs/change, ordocs/lessons. - Read
references/subagents.mdbefore any parallelism assessment or delegation in3.2or3.3. - Read
references/templates.mdwhen creatingplan.md,docs/change, ordocs/lessonsartifacts.
Workflow
- If the user explicitly requests online research, run
$m-autoflow-researchas a read-only planning aid and feed only verified findings into planning docs. - Start with initialization, not coding:
- confirm the task actually requires strict staged workflow execution
- read
guide.mdif it exists - confirm repo, base branch, and participating modules
- require a dedicated branch and worktree under the current project root's own
worktrees\directory (<project-root>\worktrees\) - refuse implementation in the main repo path
- Run stage
1requirements analysis and prioritizedocs/requirementswhen it exists before relying on code or chat context alone. - Run stage
2architecture analysis and prioritizedocs/specswhen it exists before relying on code or chat context alone. - In stage
3.1, explicitly use$m-docs, record requirements/specs impact plus any already-known related lessons, and confirm the active worktree-rootplan.mdortodo.md. - In stage
3.2, map every implementation change to a confirmed Task ID. Perform a parallelism assessment, but only use sub-agents when both the workflow rules and host platform policy allow it. - In stage
3.3, decide whether heavy testing/review is needed. Skip it for low-risk small changes when execution checks are sufficient and the reason is recorded; otherwise review integration flow, usability, security, and performance, then return to3.2if any item fails. - In stage
4, explicitly use$m-docs, archive the workflow indocs/change/YYYY-MM-DD_topic.md, extract reusable experience / lessons plus lookup hints, updatedocs/lessonswhen needed, and then ask whether the workflow should end. - If the user ends the workflow, perform the required merge and worktree cleanup steps. If not, restart from stage
1for the next iteration.
Split Phase Mapping
- Plan: use
$m-autoflow-planfor initialization plus stages1,2, and3.1. - Research: use
$m-autoflow-researchas an optional read-only planning aid only on explicit user request. - Execute: use
$m-autoflow-executefor stage3.2. - Test: use
$m-autoflow-testfor optional heavy validation and stage3.3. - Archive: use
$m-autoflow-archivefor stage4and workflow-end closeout.
The split skills are companion entry points. Do not remove or bypass this original skill when a user explicitly asks for the full $m-autoflow workflow.
Guardrails
- Only one stage may be active at a time.
- Do not skip, merge, or reorder stages.
- Do not assume missing business rules, data contracts, interfaces, environment details, dependency versions, acceptance criteria, or user preferences.
- Do not write code without a dedicated worktree and confirmed
plan.md. - Do not treat rollback as a silent action; state the reason and update the affected docs.
- Do not dispatch sub-agents without a complete context package and an allowed phase.
- Do not treat
docs/changeas the stable source of truth for requirements or specs. - Do not leave reusable lessons only in
docs/change; promote them intodocs/lessonswhen they should be queried later. - Do not merge or clean the worktree until the user explicitly confirms workflow end.
References
references/initialization.md- worktree, branch, repo, and
guide.mdprerequisites
- worktree, branch, repo, and
references/stages.md- required outputs, blockers, and transitions for stages
1through4
- required outputs, blockers, and transitions for stages
references/m-docs-integration.md- mandatory
$m-docsusage and docs impact recording rules
- mandatory
references/subagents.md- parallelism assessment, delegation gates, and audit requirements
references/templates.md- compact templates for
plan.md, blocker output,docs/change, anddocs/lessons
- compact templates for
../m-autoflow-research/SKILL.md- optional web research entry point
../m-autoflow-plan/SKILL.md- split planning entry point
../m-autoflow-execute/SKILL.md- split execution entry point
../m-autoflow-test/SKILL.md- split validation and review entry point
../m-autoflow-archive/SKILL.md- split archive and closeout entry point