.pi/agent/skills/work-implement/SKILL.md
This skill should be used when the current work phase is "implement". LLM executes the plan autonomously. After completion, auto-transitions to auto-verify.
npx skillsauth add popoffvg/dotfiles work-implementInstall 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.
Implement phase workflow. Execute autonomously — do not ask the user for guidance.
Your state was auto-committed before entering this phase. Work freely.
You are working in the current branch/repository (no worktree).
_notes/ (plan.md, worklog.md) for planning/logging.Read _notes/plan.md for the TODO list. Read _notes/research-*.md for additional context.
For each unchecked - [ ] TODO in _notes/plan.md:
skills: sub-item, read each listed skill's SKILL.md before starting. Use absolute paths from <available_skills> in the system prompt. Follow skill instructions throughout the TODO._notes/worklog.md and tell the user manual verification is requiredgit add for the files you changedsubagent tool:agent: "work-reviewer"
task: "Review the staged changes for this TODO:\n\nTODO: <todo text>\n\nStaged diff:\n```diff\n<output of git diff --cached>\n```\n\nPlan context: <relevant acceptance criteria>"
approveCommits is enabled in settings: Ask the user for approval before committing. Show: TODO text, changed files, test results, and reviewer verdict. Wait for explicit "yes"/"ok"/"approve". If rejected — fix and ask again (re-run reviewer after fixes).- [ ] → - [x]_notes/worklog.mdwork_compact with a brief summary of what was completed — this frees context space and re-injects the plan so you stay orientedIMPORTANT: Call work_compact after each TODO. Long implementation sessions accumulate tool calls, file reads, and test output that consume context. Compaction discards this noise and re-injects the current plan + worklog, keeping you focused on remaining work.
Each TODO = one git commit. Commit only after implementation + tests + re-tests + subagent review approval confirm the TODO is done. Follow the work-commit skill for commit message format:
feat|fix|doc|test|build|refactorfeat: support token refresh on expired sessionsWhen the user asks to combine or join N previous commits (e.g., "join items 1,2,3" or "squash last 3 commits"):
git reset --soft HEAD~Ngit commit -m "<prefix>: <unified why description>"- YYYY-MM-DD HH:MM: [SQUASH] joined last N commits into oneWhen the user sends a message starting with FIX or FIXUP during implementation, they are requesting a correction to a previous commit. Handle it as a git fixup commit:
git log --oneline -10 and identify which commit the fix applies togit commit --fixup=<target-sha>
fixup! feat: original message- YYYY-MM-DD HH:MM: [FIXUP] <description> (target: <short-sha>)The fixup commits will be squashed into their targets later via git rebase -i --autosquash.
Examples of user fixup messages:
fix: forgot to add error handling in auth.go → fixup the commit that touched auth.gofixup missing test for edge case → fixup the most recent test commitFIX: typo in config key → fixup the commit that introduced the config_notes/plan.md is editable during implement phase when needed.
- [ ] → - [x] (check off completed TODOs)_notes/worklog.md with reason and timestamp.After each TODO, append to _notes/worklog.md:
- YYYY-MM-DD HH:MM: [TODO] <todo text>
- changed `path/to/file.go:42` — added refresh endpoint
- changed `path/to/test.go:15` — added integration test
- tests: pass
Do NOT create impl-*.md files. Everything goes in worklog.
After all TODOs are checked off:
This is mandatory. After implementation is complete:
.pi/work.settings.json: set "phase": "auto-verify"_notes/worklog.md: - YYYY-MM-DD HH:MM: Implementation completeDo NOT present results or ask the user anything. The extension will run an automatic review. Just update the files and stop.
Eval checklist:
work_compact called after each TODO completion?Test inputs:
Can change: execution steps, edit strategy, thrashing detection threshold, logging format, review flow Cannot change: commit-per-TODO contract, work_compact requirement, autonomous execution principle Min sessions before eval: 5 Runs per experiment: 3
tools
Improve a whole CLAUDE.local.md — the private, per-project rules captured from user corrections. Wraps each conditional rule in a <task-relevant> block so it only surfaces for matching work, merges duplicates, generalizes one-off facts, drops stale entries, and routes raw project facts to engram. Use when the user says "improve claude.local", "clean up the local rules", "claude.local is bloated", or after the Stop hook has appended many rules.
testing
WM pipeline and conventions shared across all phases. Agents must read this before spec, impl, or verify work.
development
One entry point for spec writing, implementation, and bug fixing. Default is new (write spec → grill loop → produce notes → author TODO bodies). Other subcommands: verify (audit), revise (sync to shipped), prototype (settle a decision), code-map (diagram), impl (execute one TODO), fix (analyze cause, correct thoughts, fix behavior), help (this page). Invoke as /code <subcommand>.
development
Red-Green-Refactor cycle for bug fixes. Before fixing a bug, first write a failing test that reproduces it (Red), then make the minimal change to pass (Green), then clean up the code (Refactor). Use on any bug fix, error correction, failing test repair, or when user says "fix this bug".