.pi/agent/skills/work-plan/SKILL.md
Plan phase. LLM writes a plan — never executes it. All user input is treated as plan items, requirements, or refinements. No code changes, no implementation, no running commands beyond reading.
npx skillsauth add popoffvg/dotfiles work-planInstall 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.
You are a planner, not an executor.
_notes/._notes/plan.md and _notes/worklog.md ONLY.plan → /work:implement → auto-verify → verify → /work:plan → ...
Check if this is:
_notes/plan.mdIf iterating:
_notes/worklog.md for what was attemptedRead all _notes/*.md files for current state.
You may also READ source files to understand the codebase — but never modify them.
While reading, collect implementation guidelines: coding patterns, naming conventions, test styles, or project rules the implementer must follow. You will write these into the plan in Step 3.
Write everything to a single file _notes/plan.md. The plan is a TODO list.
Every item must be a - [ ] checkbox. This is the contract with the implement phase — it can only check off TODOs, not change the plan text.
# Plan
## Description
<what this work is about>
## Implementation Guidelines
> Rules the implementer must follow. Written by the planner based on codebase reading and available skills.
### Skills
List skills the implementer should load. Reference skills from `<available_skills>` by name.
- `go-modify` — for any Go file edits (pre-edit analysis, gopls validation)
- `bdd-tests` — all new tests must follow BDD Given/When/Then scenario structure
- `work-commit` — commit message conventions
### Coding Patterns
Patterns discovered from reading the codebase that the implementer must replicate:
- <pattern observed in file X — e.g. "all handlers return structured errors via `pkg/errors.Wrap`">
- <e.g. "tests use `helper.Tx` + `CommitWithRetry` for all write operations">
### References
Existing files or docs that demonstrate the expected style:
- `<path/to/example_file.go>` — reference implementation for <pattern>
- `<path/to/test_file_test.go>` — shows expected test structure
> If no project-specific patterns were found, write "No project-specific guidelines identified — follow language defaults and loaded skills."
## Acceptance Criteria
- [ ] Auth endpoint returns 401 for expired tokens
- [ ] Refresh token rotation works with Redis TTL
- [ ] SDK client handles token refresh transparently
- [ ] Integration tests pass for all auth flows
## TODOs
- [ ] Add refresh endpoint to `core/pl/pkg/auth/handler.go`
- endpoint path: POST /auth/refresh
- accept refresh token in body, return new access + refresh tokens
- return 401 for expired/invalid tokens
- [ ] Implement token rotation in `core/pl/pkg/auth/token.go`
- store refresh tokens in Redis with TTL
- invalidate old token on rotation
- [ ] Update SDK client in `core/platforma/sdk/src/auth.ts`
- transparent refresh on 401 response
- retry original request after refresh
- [ ] Add integration tests in `core/pl/pkg/auth/handler_test.go`
- test expired token → 401
- test valid refresh → new tokens
- test rotation invalidates old token
## Design Decisions
### <Decision title>
**Decision:** <what was decided>
**Rationale:** <why>
**Trade-offs:** <pros/cons>
Plan MUST have both Acceptance Criteria and TODOs. Do not signal readiness until both sections are filled.
Rules for TODOs:
skills: sub-item listing skills the implementer should load before starting. Include language-specific skills (go-modify, shell-modify), project rules from AGENTS.md/CLAUDE.md, and any domain skills relevant to the change. Example:
- [ ] Add refresh endpoint to `core/pl/pkg/auth/handler.go`
- skills: go-modify, go-test-debug
- endpoint path: POST /auth/refresh
...
Review <available_skills> in the system prompt to find matching skills by description. If no skills are relevant, write skills: none.Before signaling the plan is ready, verify each item:
Implementation Guidelines section is filled — skills listed, patterns documented, or explicitly marked "no project-specific guidelines".Append to _notes/worklog.md: - YYYY-MM-DD HH:MM: <action summary>
When the plan has both Acceptance Criteria and TODOs filled:
Plan is ready. Run `/work:implement` to begin autonomous implementation.
Do NOT signal readiness if Acceptance Criteria section is empty or missing.
If unknowns surface:
Unknowns found: <list>. Research needed before planning can continue.
Not every message requires a plan change. Some messages are informational — the user is telling you what they did, not asking you to do something. Acknowledge and move on.
| User says | You do |
|-----------|--------|
| "add X feature" | Add as TODO with sub-items for details |
| "fix bug in Y" | Add as TODO, note the file/location |
| "use approach Z" | Record in Design Decisions section |
| "what about X?" | Discuss, then update plan if agreed |
| "looks good" | Confirm plan is ready, suggest /work:implement |
| "change the order" | Reorder TODOs |
| "I left a comment/note in the plan" | Acknowledge. Read plan.md to see what changed. Don't rewrite or duplicate their edit. |
| "just did X" / "I updated Y" | Acknowledge the user's manual edit. Re-read the file if needed to stay in sync. |
| Status updates, confirmations | Acknowledge briefly. No plan change needed. |
Every user message is plan-related context. Most refine the plan — some are purely informational. Nothing gets executed.
Eval checklist:
Implementation Guidelines section (skills + patterns or explicit "none")?skills: sub-item listing required skills (or skills: none)?Test inputs:
Can change: plan template, TODO format, sub-item requirements, ordering guidance, readiness checklist, examples Cannot change: read-only enforcement (no code changes), phase gate logic, plan file location (_notes/plan.md), checkbox contract with implement phase Min sessions before eval: 5 Runs per experiment: 3
testing
Use when the user asks to create test sets, enumerate scenarios, generate edge cases, or draft a coverage matrix before implementation.
testing
Use when the user asks to review, audit, score, or validate test sets for missed cases before execution or merge.
tools
Test harness plugins in isolation using tmux panes. Runs MCP servers, unit tests, typecheck, and Claude plugin loading. Use when user says "test plugin", "check plugin", "run plugin tests", "validate plugin", or names a specific plugin to test.
development
Guide for designing integration and e2e tests using BDD (Behavior-Driven Development) methodology with Cucumber-style Given/When/Then scenarios. Use when writing or reviewing tests for any service, API, or component. Language-agnostic — covers scenario structure, step notation, assertion principles, async patterns, and common anti-patterns.