AGENT SKILL

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
所属仓库
khoavu882/do-flow
最近更新
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

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

  1. Session & Command Dispatch:
    • If invoked with no arguments or --help, announce DoFlow session status and display the core command reference.
    • If $1 matches a /do-* skill in the Core Command Reference table below, forward to that skill directly.
    • Otherwise, resolve the runtime seam once and reuse $DOFLOW for every later call here:
# 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 ($1 is maintain): note the start time T, run doflow-run lifecycle --action overview --maintain --since T --view brief --json (doflow-run is the $DOFLOW resolved above), and settle each pending item with the question tool through the doflow-run followup, doflow-run goal or doflow-run failure command its next lines give. Advice on a follow-up: references/advice_calls.md, followup-triage. Rerun with the same --since T until nothing is pending. A product problem the user reports goes to doflow-run followup --action report; a large goal they state, to doflow-run goal --action add. It edits no source file.
  • /do program <goal>, or an ask larger than one feature: follow references/program_mode.md, researching per ../do-document/references/deep_research.md at the tiers the guidance tree's references/MODEL_SELECTION.md gives.
  • /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],...>; follow next lines. No evidence batch; never write grants.jsonl, add remote sources or create a feature folder.
  1. 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 with mktemp, 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 --request only 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" with agrees: 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 returned workflow is this run's plan of record; read stages, gates and handoff off it rather than from memory.
  • REJECTED — stop. Print message verbatim (it already names validClasses and any suggestions), ask the user to choose from validClasses, then re-validate. Never substitute feature. 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 in fit.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:

  1. Target skill by name: name the exact /do-* skill that owns the package (e.g. do-implement for direct code edits, do-document for documentation/guides/references, do-code-review for code reviews, do-test for test execution, do-flow for end-to-end features).
  2. Validated task class: the class accepted by the runtime in this step.
  3. 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's references/ORCHESTRATION.md and references/MODEL_SELECTION.md.
  1. Capability & Tool Selection:

    • Before routing, run "$DOFLOW" discover --json to check recorded runs. Exit 1 signals a finding, not an error. When metadata cannot settle the analysis, surface UNKNOWN as 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 --json to parse, --check for a deep smoke check), or "$DOFLOW" route --intent <intent> --json to 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.md for 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.
  2. 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.md for 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.

  1. 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

khoavu882
khoavu882/do-flow

beta

暂无简介

★ 0
khoavu882
khoavu882/do-flow

alpha

暂无简介

★ 0
khoavu882
khoavu882/do-flow

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.

★ 0
khoavu882
khoavu882/do-flow

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.

★ 0
khoavu882
khoavu882/do-flow

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.

★ 0
khoavu882
khoavu882/do-flow

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.

★ 0