plugins/stv/skills/do-work/SKILL.md
Autonomous work execution on STV-traced scenarios. Selects unfinished scenarios from trace.md, implements via stv:work, loops until done or user input needed.
npx skillsauth add 2lab-ai/oh-my-claude do-workInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
| Tier | Lines | Example | |--------|--------|--------------------------------------------| | tiny | ~5 | Config values, constants, string literals | | small | ~20 | One function, one file, local refactor | | medium | ~50 | Multiple files, interface changes | | large | ~100 | Cross-cutting concerns, schema migrations | | xlarge | ~500 | Architecture shift, framework replacement |
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.
Scan trace files
docs/*/trace.md across the projectExtract File Map (MANDATORY)
- Persisted files:UPDATE:, INSERT:, DELETE:Prioritize 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}
Proceed? (or adjust bundle)
Goal: Implement the bundled scenarios using stv:work.
Skill(skill="stv:work") invoked
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.
Commit & Push
Goal: Prevent context overflow.
IF context > 70%:
1. Save critical state (current trace progress)
2. Use /compact or context compression
3. OR end session gracefully with resume point
ELSE:
Continue to Phase D
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 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 | Respond at 70% threshold in Phase C | | Stopping for trivial decisions | switching cost <= small → autonomous decision | | File Map files not all modified | Run File Map Completion Gate before quality gates |
| 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 Section 3c/4 file 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.
development
Problem space exploration mode. Stance, not workflow. Read-only codebase investigation before committing to spec. Triggers on 'explore this', 'investigate', 'understand the problem', 'what are we dealing with', 'before we spec this'.
tools
유저의 요구가 불명확할때 트리거. 애매한 요청, 다의적 지시, 범위 불분명한 작업에서 Context Brief를 생성하여 명확화한다.
development
STV Phase 3: Implementation (GREEN) + Trace Verify loop. Implements code to pass contract tests, then verifies implementation matches trace document. Supports non-linear flow — returning to spec/trace when implementation reveals errors in earlier artifacts.
testing
Triggers on "check the PR", "is it implemented per the issue", "compare spec vs implementation", "compare JIRA and PR", "verify", "validate". Final checkpoint before PR merge using 3-dimensional verification (Completeness, Correctness, Coherence).