PSI - Plan Spec Implement
Structured workflow for planning, specifying, and implementing changes with documentation-first approach.
When to Use
Only use when:
- Explicitly directed by the user
- Mentioned in project
AGENTS.md file
Do not use automatically - this is an opt-in workflow, not a default.
Core Workflow
Plan → Spec → Implement
Phases are independent - you can start with any phase, but all must ensure documentation stays up-to-date.
Key Principles
- Ephemeral planning - Plans stored in
~/.dot-agent/ (not committed)
- Documentation-first - Specs applied to project docs/READMEs/AGENTS.md
- Test-first implementation - Tests for docs/user journeys before code
- Design/review embedded - Design and review integrated into Plan/Spec phases
- Phase independence - Each phase can work standalone, all update docs
Phase Overview
Plan Phase
- Generates detailed plans in
~/.dot-agent/repo/YYYY-MM-work-name.plan.md
- Research stored in
~/.dot-agent/working-dir/repo/YYYY-MM-work-name.research.md
- Embeds design considerations
- Includes review before proceeding
Spec Phase
- Generates specs for: API schemas, interfaces, DTOs, database models, config, env vars, architecture, user journeys, package structure, tech choices
- Embeds design considerations
- Reviews specs before applying
- Applies to:
docs/, README.md files, AGENTS.md files
Implement Phase
- Test-first: tests for docs/user journeys before code
- CI verification: verify types, tests, lint pass before committing
- Atomic commits: group related changes with tests
- Updates docs, README.md, AGENTS.md as code evolves
- Can work independently if specs exist in docs
Research Management
Detects phrases like:
- "looking at your research" → Loads research file
- "refine your research" → Updates research file, narrows focus
Documentation Structure
- README.md: Aim for < 1000 lines (not hard rule), can be longer if needed
- AGENTS.md: < 200 lines, inline at root/packages/modules/code level
- docs/: Architecture, roadmap, tech-choices, setup/, user-journeys/, design/
References
For detailed protocols, see:
references/plan-phase.md - Plan generation with embedded design/review
references/spec-phase.md - Spec generation and application
references/implement-phase.md - Test-first implementation
references/review-protocol.md - Reviewing plans/specs/design
references/research-management.md - Research file handling
references/docs-structure.md - Documentation organization rules
references/file-paths.md - Storage paths and conventions
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: psi3description: Plan-spec-implement workflow for structured development. Only use when explicitly directed by user or when mentioned in project AGENTS.md file. Generates ephemeral plans in ~/.dot-agent/, applies specs to project docs, then implements test-first. Use when this capability is needed.4---56# PSI - Plan Spec Implement78Structured workflow for planning, specifying, and implementing changes with documentation-first approach.910## When to Use1112**Only use when:**13- Explicitly directed by the user14- Mentioned in project `AGENTS.md` file1516**Do not use automatically** - this is an opt-in workflow, not a default.1718## Core Workflow1920**Plan → Spec → Implement**2122Phases are **independent** - you can start with any phase, but all must ensure documentation stays up-to-date.2324## Key Principles25261. **Ephemeral planning** - Plans stored in `~/.dot-agent/` (not committed)272. **Documentation-first** - Specs applied to project docs/READMEs/AGENTS.md283. **Test-first implementation** - Tests for docs/user journeys before code294. **Design/review embedded** - Design and review integrated into Plan/Spec phases305. **Phase independence** - Each phase can work standalone, all update docs3132## Phase Overview3334### Plan Phase35- Generates detailed plans in `~/.dot-agent/repo/YYYY-MM-work-name.plan.md`36- Research stored in `~/.dot-agent/working-dir/repo/YYYY-MM-work-name.research.md`37- Embeds design considerations38- Includes review before proceeding3940### Spec Phase41- Generates specs for: API schemas, interfaces, DTOs, database models, config, env vars, architecture, user journeys, package structure, tech choices42- Embeds design considerations43- Reviews specs before applying44- Applies to: `docs/`, README.md files, AGENTS.md files4546### Implement Phase47- Test-first: tests for docs/user journeys before code48- CI verification: verify types, tests, lint pass before committing49- Atomic commits: group related changes with tests50- Updates docs, README.md, AGENTS.md as code evolves51- Can work independently if specs exist in docs5253## Research Management5455Detects phrases like:56- "looking at your research" → Loads research file57- "refine your research" → Updates research file, narrows focus5859## Documentation Structure6061- **README.md**: Aim for < 1000 lines (not hard rule), can be longer if needed62- **AGENTS.md**: < 200 lines, inline at root/packages/modules/code level63- **docs/**: Architecture, roadmap, tech-choices, setup/, user-journeys/, design/6465## References6667For detailed protocols, see:68- `references/plan-phase.md` - Plan generation with embedded design/review69- `references/spec-phase.md` - Spec generation and application70- `references/implement-phase.md` - Test-first implementation71- `references/review-protocol.md` - Reviewing plans/specs/design72- `references/research-management.md` - Research file handling73- `references/docs-structure.md` - Documentation organization rules74- `references/file-paths.md` - Storage paths and conventions7576---77> Converted and distributed by [TomeVault](https://tomevault.io/claim/siviter-xyz) — claim your Tome and manage your conversions.78<!-- tomevault:4.0:skill_md:2026-04-11 -->