/stv:do-workfrom stv
Automates STV implementation workflow: selects unfinished scenarios from trace.md, bundles them into work chunks, executes via stv:work, and loops until complete. Use when continuing work or implementing traced features.
Ships in stv. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
do-work automates the complete STV implementation workflow: select unfinished trace scenarios → implement via stv:work → quality gates → loop until done.
Core principle: Scan trace.md for ready scenarios → Bundle into work chunks → Execute with stv:work → Commit → Repeat.
Read ${CLAUDE_PLUGIN_ROOT}/prompts/decision-gate.md and apply it to every decision in this workflow.
Sizing Rubric: read ${CLAUDE_PLUGIN_ROOT}/prompts/decision-gate.md (single source — do not duplicate the table here). Sizes below (tiny/small/medium/large/xlarge) refer to expected code change (added + deleted).
Use when:
Do NOT use when:
stv:new-task first)Phase A: Task Selection
↓
Phase B: STV Work Execution (→ stv:work)
↓
Phase C: Context Check
↓
Phase D: Loop Decision
↓ (loop back to A or stop)
Goal: Select unfinished scenarios from trace.md and bundle for execution.
Honor an explicit bundle contract (if provided)
{"trace_path": "docs/{feature}/trace.md", "scenario_ids": ["1","2"], "size": "...", "rationale": "..."}trace_path exists; every scenario_ids entry is present in that trace's Implementation Status. On mismatch → stop with a targeted-scope error (do NOT widen scope to recover).Scan trace files
docs/*/trace.md across the projectExtract File Map (MANDATORY)
- Persisted files:UPDATE:, INSERT:, DELETE:> Compact trace) — backtick-quoted paths under their Files: listPrioritize scenarios
Bundle scenarios (target: xlarge)
Present bundle to user
## Work Bundle
### Target: {feature-name}
Trace: docs/{feature}/trace.md
### Scenarios to implement:
| # | Scenario | Size | Dependencies |
|---|----------|------|-------------|
| {n} | {title} | {tier} | {deps or "none"} |
### File Map (all files trace says to modify):
| # | File | Scenarios | Modified? |
|---|------|-----------|-----------|
| 1 | {path} | {scenario numbers} | pending |
Estimated total: {tier}
Contract: {"trace_path": "...", "scenario_ids": [...]}
Proceed? (or adjust bundle)
Goal: Implement the bundled scenarios using stv:work.
Skill(skill="stv:work") invoked
Pass the same targeted scope: trace_path + scenario_ids. stv:work iterates ONLY the selected scenarios.
After stv:work completes:
File Map Completion Gate (MANDATORY — before quality gates)
For each file in the File Map Checklist:
git diff --name-only)IF any File Map file is NOT modified:
★ Tests GREEN alone is NOT sufficient. File Map 100% = the real completion gate.
Gap Detection Gate (before quality gates)
assumption_injection, scope_creep, direction_drift, missing_core, over_engineeringQuality Gates
# Run project-specific commands
npm test # or bun test / pytest / dotnet test
npm run build # if applicable
npm run lint # if applicable
Spec Re-verification (MANDATORY — before commit)
Re-read the spec.md referenced in trace.md. For each acceptance criterion in the spec:
IF any spec requirement is not implemented: → Implement it now, re-run quality gates.
Finalize (environment-dependent)
Goal: Prevent context overflow.
IF the harness exposes context usage AND it exceeds ~70%:
checkpoint (update trace.md Implementation Status) and compact or end with a resume point.
OTHERWISE (no context signal available):
checkpoint trace.md Implementation Status after EVERY bundle and prefer ending
at bundle boundaries with a resume point.
/compact is host-specific and optional — never assume it exists.
Goal: Decide whether to continue autonomous work.
Continue to Phase A if:
Stop and report to user if:
Report format when stopping:
## Work Session Report
### Completed
- {N}/{total} scenarios GREEN + Verified
- Feature: {feature-name}
### Remaining
- {M} scenarios still pending
- Next: Scenario {n} — {title}
### Quality
- Tests: {pass}/{total} passing
- Build: clean / {N} errors
- Lint: clean / {N} warnings
### Next Step
→ Run `stv:do-work` to continue
→ Or `stv:work docs/{feature}/trace.md` for specific trace
During execution, unexpected architectural decisions may arise.
Default thresholds: auto_decide <= small (~20 lines), must_ask >= medium (~50 lines)
for each unexpected decision:
if switching_cost <= small:
→ Autonomous decision + record in Auto-Decision Log
→ If small tier, report result to user
elif switching_cost >= medium:
→ Check if switching cost can be reduced via generic architecture
→ If reducible: autonomous decision + log
→ If not reducible: move to Phase D and ask the user
Auto-Decision Log format: See ${CLAUDE_PLUGIN_ROOT}/prompts/decision-gate.md for the full template. Minimum fields: Decision, switching cost tier, Rationale, Impact if changed.
INVOKES:
stv:work — Per-scenario implementation execution in Phase BCALLED BY:
stv:what-we-have-to-work — After bundle selectionstv:what-to-work — After routingPRECONDITIONS:
docs/{feature}/trace.md must existstv:new-task| Mistake | Fix |
|---|---|
| Attempting execution without trace | Check docs/*/trace.md first |
| Ignoring bundle size | Target xlarge, cap at xlarge |
| Skipping quality gates | Run test/build/lint every time |
| Context overflow | Checkpoint at bundle boundaries; use context signals only if the harness provides them |
| Stopping for trivial decisions | switching cost <= small → autonomous decision |
| File Map files not all modified | Run File Map Completion Gate before quality gates |
| Ignoring an explicit bundle contract and rescanning the repo | Honor {trace_path, scenario_ids}; scope widening is a contract violation |
| Anti-Pattern | Symptom | Fix |
|---|---|---|
| "Test pass = done" bias | All tests GREEN but integration code not wired, config not updated | File Map Gate + Spec Re-verification catch the gap between "tests pass" and "feature works" |
| File Map as decoration | trace lists 5 files, only 3 modified — files without tests skipped | Extract File Map in Phase A, gate on it in Phase B. Every File Map file (Section 3c/4, or a compact scenario's Files:) MUST show a diff |
| Complexity avoidance | New utility files created but 500-line core pipeline file untouched | Integration-first ordering. Large existing files get priority. The wiring IS the feature |
★ Parts assembled without wiring do not work. Assembly is not optional — it is the feature.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub 2lab-ai/oh-my-claude --plugin stv15 skills in this plugin
/clarifyUse when the user's request is ambiguous — vague asks, polysemous instructions, unclear scope — BEFORE committing to a feature. Two-track loop (one question at a time + parallel codebase exploration) producing a Context Brief that becomes the SSOT for the follow-up work./debugUse when code behaves differently from expectations — 'why does this happen', 'find the bug', 'follow the callstack', symptom reports even without the word debugging. Blackbox methodology: AS-IS/TO-BE confirmation, callstack tracing recorded in a CWD-relative trace file, red-green fix./excalidraw-diagramCreate Excalidraw diagram JSON files that make visual arguments. Use when the user wants to visualize workflows, architectures, or concepts.Other plugins' skills for the same job