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.
- License 许可
- MIT
- 最近更新
- 2026-11-10
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- do
- effort
- low
- description
- 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.
- argument-hint
- [command|request] [--depth shallow|normal|deep] [--estimate]
02 资源文件 5
- 参考文档references/advice_calls.md898 B
- 参考文档references/estimation.md696 B
- 参考文档references/pm_routing.md1.1 KB
- 参考文档references/program_mode.md2.4 KB
- 参考文档references/tool_matrix.md2.8 KB
03 SKILL.md 正文
do
Universal command dispatcher, task decomposer, capability router, and development estimator for DoFlow.
Invocation
/do [command|request] [--depth shallow|normal|deep] [--estimate]
Behavioral Flow
- Session & Command Dispatch:
- If invoked with no arguments or
--help, announce DoFlow session status and display the core command reference. - If
$1matches a/do-*skill in the Core Command Reference table below, forward to that skill directly. - Otherwise, resolve the runtime seam once and reuse
$DOFLOWfor every later call here:
- If invoked with no arguments or
# 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
/do maintain($1ismaintain): note the start timeT, rundoflow-run lifecycle --action overview --maintain --since T --view brief --json(doflow-runis the$DOFLOWresolved above), and settle each pending item with the question tool through thedoflow-run followup,doflow-run goalordoflow-run failurecommand itsnextlines give. Advice on a follow-up:references/advice_calls.md, followup-triage. Rerun with the same--since Tuntil nothing is pending. A product problem the user reports goes todoflow-run followup --action report; a large goal they state, todoflow-run goal --action add. It edits no source file./do program <goal>, or an ask larger than one feature: followreferences/program_mode.md, researching per../do-document/references/deep_research.mdat the tiers the guidance tree'sreferences/MODEL_SELECTION.mdgives./do package <idea>or "make this a DoFlow extension/package/plugin": run"$DOFLOW" package --action points --json; stop if a needed point is not open. Ask up to 3 questions (what/why, id, points) via the question tool; run"$DOFLOW" package --action new --id <id> --points <point[:local],...>; follownextlines. No evidence batch; never writegrants.jsonl, add remote sources or create a feature folder.
- Multi-Part / Ambiguous Request Routing (
--depth):-
When a request bundles 2+ unrelated asks across different files or domains, verify referenced files exist first.
-
Decompose into independent or sequenced work packages, then propose one task class per package and let the runtime validate each:
"$DOFLOW" classify --task-class "<proposed>" --calling-skill do (--request-file <file> | --request <shell-escaped argument>) --view brief --json. Always pass the request. Prefer--request-file: create a temporary UTF-8 file withmktemp, write the verbatim request as the body of a single-quoted heredoc whose delimiter does not occur on any request line, pass only its path, and install cleanup traps plus explicit removal. Never interpolate raw request text into a shell command or word; use--requestonly as one safely shell-escaped argument, and omit the optional opinion if safe transport is unavailable. The flags are mutually exclusive.When the JSON carries
secondOpinion.status: "answered"withagrees: false, tell the user the decision model picked a different class, in one line naming both; the verdict stands, and no other action follows from it.
-
Branch on outcome, 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.
In the decomposition plan, explicitly state each work package with:
- Target skill by name: name the exact
/do-*skill that owns the package (e.g.do-implementfor direct code edits,do-documentfor documentation/guides/references,do-code-reviewfor code reviews,do-testfor test execution,do-flowfor end-to-end features). - Validated task class: the class accepted by the runtime in this step.
- Execution order & dependencies: sequential vs concurrent execution across the packages.
Route each package to the accepted workflow's first stage. A workflow whose stages contain nothing
that does the package's work is a misclassification — re-propose the class rather than routing the
package under one the runtime accepted for a different kind of task.
Advice on a worker's tier: references/advice_calls.md, tier.
- For detailed decomposition and dependency graph formatting, consult this skill's own
references/pm_routing.md; before dispatching agents, read the guidance tree'sreferences/ORCHESTRATION.mdandreferences/MODEL_SELECTION.md.
-
Capability & Tool Selection:
- Before routing, run
"$DOFLOW" discover --jsonto check recorded runs. Exit 1 signals a finding, not an error. When metadata cannot settle the analysis, surfaceUNKNOWNas undetermined, never clear. Show findings to the user; take no automatic action. Never render findings as a number, percentage or confidence. - Routing an information need to a tool is unconditional, not a mode this skill can be asked
for: whenever a search, graph, or testing need arises, query the Capability Router — run
"$DOFLOW" capabilities(add--jsonto parse,--checkfor a deep smoke check), or"$DOFLOW" route --intent <intent> --jsonto resolve one need end to end. It reports which provider is actually available on this machine; Semble and Graphify degrade to Ripgrep when absent, and a static table cannot know that. - Consult this skill's own
references/tool_matrix.mdfor the intent→capability map and the two fallback layers. Treat the router's output as authoritative when the two disagree. - Advice on an MCP server's trigger:
references/advice_calls.md, mcp-need.
- Before routing, run
-
Scope & Effort Estimation (
--estimate):- When asked for sizing, complexity, or timeline estimates, produce a range anchored against git history and file scope, stating the assumptions that set its width and the unknowns that would narrow it. Never attach a numeric or percentage certainty to the range — the assumptions are the honest expression of what is not yet known.
- Consult this skill's own
references/estimation.mdfor sizing breakdowns. Stops after producing the estimate; never begins edits.
Stop when every width-setting assumption the contract names has an answer or a stated gap, and the last round produced no new width-setting assumption. A round that only restates what you already have is the last round. Report the remaining gaps rather than continuing.
- Batch the Scoping Evidence — once, when the routing or estimate is delivered, not once per
finding. Use one
<task id>for the request: the plan task id when one exists, otherwise the feature slug.
"$DOFLOW" evidence --task-id "<task id>" --action add --batch <batch>.json --json
"$DOFLOW" claim --task-id "<task id>" --action add --statement "<one conclusion>"
This stage's items are the scoping inputs: what the router reported, what git history and file scope showed, and the user's own words. Each routing or sizing conclusion enters as a claim.
Item schema, provenance rules, and the refused-field list: the guidance tree's references/EVIDENCE_LEDGER.md. Read it before writing the batch.
Core Command Reference
| Command | Purpose | Lifecycle Role |
|---|---|---|
/do-flow |
Auto-chain spec-driven lifecycle end-to-end | Orchestration |
/do-brainstorm |
Interactive requirements discovery (requirement.md) |
Phase 1 (WHY/WHAT) |
/do-design |
Architecture, APIs, and component interfaces (design.md) |
Phase 2 (HOW System) |
/do-plan |
Implementation plan & task checklist (plan.md) |
Phase 3 (HOW Tasks) |
/do-execute-plan |
Execute tasks via specialist subagents with prerequisite gates | Phase 4 (BUILD) |
/do-test |
Run builds, test suites, and coverage verification | Phase 5 (VERIFY) |
/do-code-review |
Automated code quality, SOLID, and PR review | Phase 6 (AUDIT) |
/do-git |
Git branch, commit, and PR lifecycle management | Lifecycle |
/do-constitution |
Create or amend two-tier repository governance | Governance |
/do-diagnose |
Diagnose bugs, performance, security, and refactoring needs | Diagnostics |
/do-document |
Generate guides, API docs, architecture indices, or web research | Knowledge |
/do-implement |
Direct, standalone implementation from a description or review findings — no chain artifacts required | Extension |
Boundaries
Will: Announce session status, route single and multi-part requests, propose a task class per
package and have the runtime validate it, select optimal retrieval tools, generate scoped
estimates, and batch the scoping evidence and claims.
Will Not: Directly perform code edits or modify source files (delegates to specialist skills);
route a package under a class the runtime rejected or replaced with feature;
call readiness for a stage that declares no template; or express evidence, an estimate or readiness as a number, a percentage or a confidence.
04 同仓库更多 Skills
beta
暂无简介
alpha
暂无简介
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.
do-git
Git operations with lifecycle-aware intents and safety checks — start, save, sync, ship, release, hotfix, backport, and status, plus raw git passthrough for anything else. Use whenever the user requests git actions, branch management, committing changes, syncing with remotes, or release rituals (e.g., 'commit these files', 'ship this feature', 'create a feature branch', 'cut a hotfix', 'sync repo', 'what is git status'). Always activate this skill for safe, confirmed git operations rather than running bare mutating git commands.