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

License 许可
MIT
所属仓库
khoavu882/do-flow
最近更新
2026-11-10
Stars
★ 0
Forks
0

01 前言 Front Matter

name
do-test
effort
medium
description
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.
argument-hint
[target] [--clean] [--watch]

03 SKILL.md 正文

do-test

Unified build verification and test runner for DoFlow projects.

Invocation

/do-test [target] [--clean] [--watch]

Behavioral Flow

  1. Resolve the runtime — every DoFlow runtime call in this skill goes through the runtime seam. Resolve it once here and reuse $DOFLOW for 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.

  1. State the contract before running anything — compile it, do not recall it:

    <task id> is the plan task id when the run is scoped to one task, otherwise the feature slug — the same id every other stage used for it. --risk is an input the caller supplies: omitted, the contract compiles at the registry's default; a change touching security, auth, payments or data migration is what HIGH is for, and the level also sets maxRecoveryIterations.

    Optionally ask for a decision-model second opinion before compiling the contract:

"$DOFLOW" advise --kind verify-risk --state "<what the change touches, one paragraph>" --static "<the level you chose>" --task-id "<task id>" --json

When status is answered and agrees is false, say so in one line and keep or change the level by your own judgement. Record the level used, and skip both calls when status is not answered:

"$DOFLOW" advise --action outcome --pick-id "<pickId>" --actual "<level>"
"$DOFLOW" verify --task-id "<task id>" --risk "<LOW|MEDIUM|HIGH|CRITICAL>" --action contract --json

Report, before any tier runs:

  • the compiled tiers[] in the order returned — that list, and nothing else, is what will run;
  • the riskLevel it compiled at and the maxRecoveryIterations it carries;
  • detection.absent — the command roles the runtime could not find in this repo's manifests (detection.manifests names what it read). Those are the tiers most likely to come back unresolved, and naming them up front is the difference between a gap and a surprise.

Detection belongs to the verb. Do not re-derive the toolchain by hand, and do not substitute a runner the contract did not compile.

  1. Run the contract and report against it:
"$DOFLOW" verify --task-id "<task id>" --risk "<the same level>" --action report --json

When an explicit manifest and pinned ancestor baseline are provided, pass --verification-input <file> --verification-phase postimplementation --baseline-ref <ref>; the verdict proves current checks under postimplementation chronology without claiming preimplementation compilation.

Every tier step 2 listed gets a status in the report — PASS, FAIL, UNRESOLVED, SUBSUMED, NOT_APPLICABLE, SKIPPED or NOT_RUN. Report all of them. A tier the contract named and the run did not reach is reported as unreached, never omitted. Stop when every required tier the contract names has an answer or a stated gap, and the last round produced no new required tier. A round that only restates what you already have is the last round. Report the remaining gaps rather than continuing.

  1. Read the verdict as it stands:

    • A tier whose command cannot be detected is UNRESOLVED, and one unresolved required tier makes the whole run INCONCLUSIVE. The verb computes that and returns it in status with a reason naming the tiers — report it as it stands. Never call a check passed that was not run, and never narrow the set to make the report green.
    • Coverage comes with the test tiers and with what the detected runner already emits, not from a separate request: report line and branch numbers when the runner produces them, and say plainly that it does not when it does not.
    • --clean forces a clean compile before the deterministic tiers run.
    • --watch launches interactive watcher mode when the detected runner supports it. It is an interactive session, not a verification run: it produces no contract verdict.
  2. Diagnostics & Reporting:

    • Report pass/fail summaries, exact failure traces, and affected requirements.
    • Never skip or delete failing tests to force passing status.
  3. Record the handoff — read the guidance tree's references/WORKFLOW_HANDOFF.md. Use the feature slug as <task id>; if no feature is active, this is standalone and there is no workflow handoff. After completing this skill's work:

    "$DOFLOW" orchestrate --action handoff --task-id "<task id>" --calling-skill do-test --note "<work completed and verification result>" --result <passed|failed> --json
    

    The runtime selects this skill's stage, records completion or a rerun annotation, and returns disposition. Report deferred with its reason; resolve no gate in this skill. standalone means no run was created. Render the trail after a recorded handoff:

    "$DOFLOW" render-audit --slug="<task id>" --json
    

    passed means the contract was met, including an expected failure in a reproduction stage. Use failed when it was not met; missing verification is unverified, never an implied pass.

Embedded feature research

For an external fact gap or request, follow the Gap or request protocol in ../do-document/references/embedded-research.md before stage completion.

Boundaries

Will: Run the compiled tiers, report every status (including unreached), coverage, and failure traces; hand off the current stage in a chain. Will Not: Write tests or build config, narrow tiers, invent a verdict, resolve gates, or start a standalone run.

04 同仓库更多 Skills

khoavu882
khoavu882/do-flow

beta

暂无简介

★ 0
khoavu882
khoavu882/do-flow

alpha

暂无简介

★ 0
khoavu882
khoavu882/do-flow

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.

★ 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