Loops Work
Execute work plans fast, safely, end-to-end.
Default Execution Contract
This skill defaults to incremental execution with explicit checkpoints.
Do not attempt to execute the entire plan in one uninterrupted pass unless the work is trivial or the user explicitly asks for that style.
For non-trivial work, the default sequence is:
- confirm the next slice of work
- read the relevant code and plan references
- implement one vertical slice
- run validation immediately
- review the actual diff
- update task tracking and plan state
- continue to the next slice
Input
Plan/spec/todo doc path.
If input missing or unclear, ask once before starting.
Workflow
Phase 1: Quick Start
- Read plan fully.
- follow links/references in plan
- ask clarifying questions early
- Choose work mode (self-contained).
- if already on feature branch: ask continue vs new branch
- if on default branch: require explicit confirmation before committing there
- Convert plan into actionable tasks.
- use
dexfor non-trivial scope when available - fallback: explicit markdown checklist in plan/session notes
- capture dependencies and priority
- include testing/quality tasks
Dex quick commands:
dex create "<task name>" --description "<context + acceptance criteria>"
dex list --ready
dex show <id> --full
dex complete <id> --result "<verified outcome>" --commit <sha>
Phase 2: Execute Loop
For each task:
- mark in progress
- read referenced code/patterns
- read surrounding implementation enough to understand the change in context
- implement with existing conventions
- prefer vertical slices over horizontal layer-by-layer execution
- add/update tests
- run the smallest meaningful validation step immediately
- confirm the slice behaves as expected before moving on
- mark completed
- evaluate incremental commit
- update source plan checkboxes (
- [ ]=>- [x]) and note any approved deviations
Incremental Commit Rules
Prefer vertical slices over horizontal layer-by-layer execution.
Avoid doing all database work, then all backend work, then all frontend work unless the plan or architecture truly requires it.
Each slice should end in something testable, reviewable, or otherwise verifiable.
Commit when:
- logical unit complete
- tests pass
- context switch incoming
- risky change boundary reached
Do not commit when:
- partial/WIP unit
- failing tests
- scaffolding-only noise
Commit style:
- conventional commits
- stage related files only (avoid
git add .)
Plan Drift Rules
If implementation reveals the plan is materially wrong, incomplete, or unsafe:
- stop before continuing deeper
- surface the mismatch clearly
- propose a corrected next step
- update the source plan or task list when appropriate
- ask the user before making major design or scope changes
Do not silently improvise around major plan defects.
Phase 3: Quality Gates
Before handoff:
- run full relevant test suite
- run repo lint/format checks
- fix regressions immediately
- confirm no outstanding critical warnings
Optional for high-risk/complex work:
- run multi-agent review via
counselorsCLI when available - address critical findings before final handoff
Phase 4: Final Validation
Confirm:
- all planned tasks done
- dex tasks complete (if used)
- tests/lint passing
- implementation matches plan intent
- actual diff reviewed for correctness, unintended changes, and adherence to existing patterns
- any plan deviations are documented and reflected in the source plan/task list
- UI parity artifacts captured if applicable
- do not rely on tests alone as proof of correctness for sensitive changes
Key Principles
- clarify once, then execute
- do not rely on the plan alone; read and understand the actual code being changed
- treat the plan as a tactical guide, not a substitute for code review
- self-review important diffs before handoff
- follow existing patterns, avoid reinvention
- test continuously, not only at end
- ship complete slices, avoid 80% states
Pitfalls to Avoid
- analysis paralysis
- skipping clarifications
- ignoring plan references
- batch testing at end
- stale task tracking
Output
Report:
- what shipped
- tests/checks run
- plan deviations made during implementation
- open risks/blockers (if any)
- next concrete step