do-flow
Run the doflow feature chain end to end, from idea to reviewed code. Use when the user wants the whole lifecycle run, says 'build this feature end-to-end', 'run the doflow chain' or 'take this from idea to implementation', or /do classified the request as a feature. A plain change request that names no /do-* skill goes to /do first, which decides whether it needs this flow. Skip it for one phase on its own (that phase's /do-* skill), single-file fixes, questions and reviews.
- License 许可
- MIT
- 最近更新
- 2026-11-10
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- do-flow
- effort
- high
- description
- Run the doflow feature chain end to end, from idea to reviewed code. Use when the user wants the whole lifecycle run, says 'build this feature end-to-end', 'run the doflow chain' or 'take this from idea to implementation', or /do classified the request as a feature. A plain change request that names no /do-* skill goes to /do first, which decides whether it needs this flow. Skip it for one phase on its own (that phase's /do-* skill), single-file fixes, questions and reviews.
- argument-hint
- [feature description] [--from brainstorm|design|plan|implement|test|review]
02 资源文件 1
- 参考文档references/task_classes.md8.7 KB
03 SKILL.md 正文
do-flow
Runs a DoFlow workflow end-to-end without a manual /do-X at every stage. The task's class
selects the workflow; the resolved workflow's stages name which existing skills run, in what order,
and where the run stops. do-flow does not replace or modify those skills — it invokes their own
Behavioral Flows in sequence. do-constitution belongs to no class; invoke it directly when you
need to set or amend repo-level rules.
You propose the class; the runtime validates it. Never the reverse. A class you assumed, or one the runtime rejected and you replaced with the familiar default, runs a confident workflow for the wrong task.
Invocation
/do-flow [feature description] [--from brainstorm|design|plan|implement|test|review]
Behavioral Flow
- Resolve state — run the resolver. Every DoFlow runtime call in this skill goes through the
runtime seam. Resolve it once here and reuse
$DOFLOWfor every later call in this skill:
# Resolve the DoFlow runtime: nearest project install wins, then the global one.
D=$PWD; while [ "$D" != / ] && [ ! -x "$D/.doflow/scripts/doflow/bin/doflow-run" ]; do D=$(dirname "$D"); done
DOFLOW="$D/.doflow/scripts/doflow/bin/doflow-run"
[ -x "$DOFLOW" ] || DOFLOW="$HOME/.doflow/scripts/doflow/bin/doflow-run"
[ -x "$DOFLOW" ] || { echo "doflow: no runtime found in any .doflow/ above $PWD, nor at $HOME/.doflow. Run: npx @khoavu882/doflow install -t <harness>" >&2; exit 2; }
Run every command below from the project root — the walk-up starts at $PWD. On exit 2, print the message verbatim and stop; it names every path searched.
"$DOFLOW" paths --json
feature_slug null with a non-empty candidate_slugs is an unresolved choice, not "no active feature": ask one option per entry, re-resolve with "$DOFLOW" paths --json --slug="<chosen>", and use that slug for the rest of this flow. /do-flow passing --slug already resolves it — no prompt then.
-
Propose one class — read the request and name exactly one class id, using the cues and the confusable pairs in this skill's own
references/task_classes.md. State the class and the signal it rests on in one line. If two classes fit equally, do not take the longer one: show what each would run —"$DOFLOW" workflow --task-class "<candidate>" --json, quote itsstageIds— and ask via the question tool, one option per candidate. -
Validate the class through the runtime — a proposal is not a selection until this returns:
"$DOFLOW" classify --task-class "<proposed>" --calling-skill do-flow --json
Branch on the returned outcome field, not the exit code.
ACCEPTED— the returnedworkflowis this run's plan of record; readstages,gatesandhandoffoff it rather than from memory.REJECTED— stop. Printmessageverbatim (it already namesvalidClassesand anysuggestions), ask the user to choose fromvalidClasses, then re-validate. Never substitutefeature. A rejection may be about you rather than the class (reason: caller-not-a-stage). Then the fix is to propose one of the classes infit.hostingClasses, or to hand the work to the skill this class names for the stage you meant — not to re-propose the same class.- Exit 2 — surface the message verbatim and stop.
Every stage this run enters comes from the accepted workflow's stages; a phase the workflow does
not declare is not run here, however familiar it is from the feature chain.
-
Announce the selection — one line before anything runs:
<taskClass> → <workflow.name>: <stageIds joined by →>, plus the gate ids ifgatesis non-empty. This is the user's chance to correct a misclassification cheaply. -
Pick the starting stage.
feature: resume from the first missing chain artifact —!has_requirement→ the discovery stage;has_requirement && !has_design→ design;has_design && !has_plan→ planning; all three present → go straight to the pre-implementation gate in step 7.- Every other class: start at the first entry in
stages. --from <phase>overrides the above to deliberately re-run a stage. Match the phase to the stage whoseskillis that phase's skill (brainstorm→do-brainstorm,design→do-design,plan→do-plan,implement→ the stage withmutatesSource: true,test→do-test,review→do-code-review). No stage matches in this workflow → stop and list the stage ids it does have. Two stages match —bugandrefactoreach rundo-testtwice — → ask which one.
-
Run the stages in order, invoking each stage's
skillBehavioral Flow directly.optional: true— decide from that stage's ownpurpose, then say which way you went and why. Never drop an optional stage silently.readinessTemplateis non-null — consult readiness before entering the stage:"$DOFLOW" readiness --task-class "<taskClass>" --task-id "<task id>" --mode workflow --json. Both--task-classand--task-idare required; omitting either exits 2 and names the valid set. Act on the returnedstageEntry.decision— the entry policy is the runtime's, not this page's:ENTER→ enter the stage;GATHER_FIRST→ report the missing items and gather them first, do not enter;ASK_USER→ ask the owed decision and wait;STOP→ stop and surface the conflicted claim.readinessTemplateisnull— enter the stage. Do not consult readiness "to be safe": a workflow whoserequiresImplementationReadinessisfalsehas no implementation to be ready for and declares no template by design (references/task_classes.md). Calling it anyway invents a gate the registry does not declare.- After each stage, report one line: stage id, skill, and the artifact path or result it produced — so the user can follow without intervening.
-
Stop at the gates the resolved workflow declares — read them from
workflow.gates, each attached to a stage byafterStage.trigger: alwaysstops every time; any other trigger stops only when that named condition actually holds. Ask with the gate's ownpromptvia the question tool. For thefeatureworkflow's three, which behave as they always have:gate-0(after discovery, triggerunresolved-clarifications) — a safety net, not the normal path:do-brainstormresolves ambiguities to zero via its own loop, so this fires only if a[NEEDS CLARIFICATION]marker survived an aborted session. Ask one question per marker (grouped if closely related), patch the answers intorequirement.mddirectly, and do not re-rundo-brainstorm. Then follow steps 1-4 of the decision step in the guidance tree'sreferences/WORKFLOW_HANDOFF.md(stagediscovery, channelquestion) so the answers are registered and cited; do-brainstorm already recorded discovery's handoff, so record none.gate-a(after planning) — the conversational checkpoint on top of the already-existing advisory hook (pre-implement-gate.sh; its scope is inreferences/DOFLOW_CHAIN.md), which still reports a missing artifact. Options:Proceed/Let me review the artifacts first/Stop here.gate-b(after review) — no enforcement hook exists for this today;/do-gitis a separate, always-manually-invoked skill. Frame the question by the review's own approval status: onCHANGES REQUESTED, foreground addressing the findings rather than offering a bare proceed. A workflow with an emptygatesarray stops at none of these. It still stops on a readiness block, on an ambiguous answer, and on any stage skill's own stopping rule.
Record every answer that is a decision. Asking is not recording: a gate this skill asked but never wrote back stays open in the run, so the stage skill that owns it asks the same question again — the user answers twice for one decision. Immediately after the user answers, write it:
"$DOFLOW" orchestrate --action decide-gate --task-id "<slug>" --gate "<gate id>" --decision approve|reject --note "<the user's own answer, one line>" --jsonMap each gate's own option set onto the two decisions the runtime accepts, and never onto a third:
gate-a—Proceedisapprove;Stop hereisreject.Let me review the artifacts firstis neither: it is a pause, not a decision, so call nothing and actually pause — hold the run at this gate and re-ask once the user comes back, exactly as step 8's ambiguous-answer rule already requires.gate-b— an actual "proceed to commit/merge" answer isapprove; an explicit stop isreject. Anything that is not a real decision — "let me address the findings first" on aCHANGES REQUESTEDreview, most often — is neither, and gets nodecide-gatecall.rejectterminates the run outright, which is a different answer from "not now".gate-0— only in the aborted-session branch above, where this skill patchedrequirement.mditself: once every surviving marker is resolved,approve. If any marker is still open, leave the gate alone. This call is advisory to the trail, not to the chain: if it fails for a reason outside this flow's control (an unwritable local state directory, say), report the failure plainly and carry the user's answer forward anyway — the answer is what governs whether the next stage runs, and the record of it is what keeps the next stage from asking again.
When the answer also carries a choice beyond approve or reject and
paths --jsonreportshas_decisions: true, register it too, oncedecision --action listshows no live decision with that statement; the receiving stage's batch then leaves it out:"$DOFLOW" decision --action add --topic "<key>" --statement "<text>" --channel gate --stage "<stage the gate follows>" --rationale "<text>" --json -
Never skip a gate on an ambiguous answer — an unanswered or unclear response to the question tool means stop and ask again, per RULE_04 in
rules/RULES.md. When the terminal stage completes, stateworkflow.handoffas the next step rather than continuing into it.
Conditional research within a feature
Before a feature stage relies on an external fact that local or user evidence cannot establish, or when the developer explicitly asks a research question, let that stage follow ../do-document/references/embedded-research.md. The stage opens a same-task research-request, records a source-linked finding or gap, then resumes itself without adding a seventh workflow stage. On resume, read request status and context pack. A blocking unanswered question prevents stage completion; neither research nor a retrieved page approves any existing gate. Feature discovery and design run the ideation pass; otherwise search only for a gap or an explicit request.
Boundaries
Will:
- Propose a task class, validate it through the runtime, and run the resolved workflow's stages in order without a manual re-invocation at each boundary.
- Stop only where the resolved workflow says to: its declared gates, a readiness block, or an ambiguous answer.
- Record each gate answer it collects through
orchestrate --action decide-gate, so the stage skill that owns that gate finds it already resolved instead of asking the user the same question twice. - Compose with the existing
pre-implement-gate.shadvisory hook rather than bypass or duplicate it. That hook keys on branch and artifact state, not on class, so it can advise against abugortrivial-editworkflow's edits on a branch that already holds an incomplete feature dir — surface its message as written.
Will Not:
- Run any workflow for a class the runtime rejected, or replace a rejected class with
feature. - Infer a class silently when two fit, or read a class the user stated as a suggestion.
- Consult implementation readiness for a stage that declares no readiness template, or invent a readiness template for a class that has none.
- Modify any stage skill, or invoke
do-constitution— it is standalone and in no class. - Add a hook-level enforcement gate for commit/merge —
gate-bis conversational only. A hook-level version would be a separate, future proposal. - Silently proceed past a gate on an ambiguous or missing answer.
- Record a pause or a deferral as a gate decision —
Let me review the artifacts firstand "let me address the findings first" are neitherapprovenorreject, and forcing them into one writes a decision the user did not make.
Next Step: whatever the resolved workflow.handoff names — for every class that ends in a
change, /do-git to commit/merge once the last gate is cleared.
04 同仓库更多 Skills
beta
暂无简介
alpha
暂无简介
do
DoFlow universal dispatcher and the entry point for a plain code-change request: it classifies the task, routes it to the matching /do-* workflow and applies that workflow's gates. Use whenever the user asks to add, fix, change or build something in code without naming a /do-* skill, a request bundles several unrelated asks, or needs a tool recommendation or effort estimate first (e.g., 'add a retry to the upload client in src/upload.js', 'give me a rough estimate for this change', 'first do X, then document Y'). Skip it for questions about how existing code behaves, explanations, reviews, and work already inside a /do-* skill.
do-test
Execute project builds, automated test suites, and coverage verification with intelligent error reporting across whatever toolchain the repo already uses. Use whenever the user wants to run existing tests, execute test suites, verify builds, check test coverage, or check compile status (e.g., 'run the tests', 'execute test suite', 'check coverage', 'verify build', 'does this still build'). Always activate this skill when verifying test suites or running builds without writing new application code.
do-plan
Generate the implementation plan (HOW) and dependency-ordered task checklist from requirement.md + design.md (plus design/specs.md's IC-### interface contracts when the feature has one), with a Constitution Check gate, as Phase 3 of the doflow chain. Use whenever requirement.md and design.md exist and the next step is creating an actionable, owner-and-file-scoped task breakdown before implementation, or when the user says 'create an implementation plan', 'break this down into tasks', 'plan the work', or 'plan Phase 3'. Always activate this skill before executing feature implementation.
do-implement
Direct, standalone code implementation from a description, /do-code-review findings, or an existing task — no DoFlow chain artifacts required. Use when the user names /do-implement, says 'now implement that', 'fix what the review found' or 'address these comments', or /do routed a bug, refactor, dependency change or small edit here. A plain change request that names no /do-* skill goes to /do first, which classifies it and routes it back here when it fits. Skip it for questions, reviews, and new features that need the full chain.