143 lines
5.2 KiB
Markdown
143 lines
5.2 KiB
Markdown
# Implementation Plan: [FEATURE]
|
|
|
|
**Branch**: `[###-feature-name]` | **Date**: [DATE] | **Spec**: [link]
|
|
**Input**: Feature specification from `/specs/[###-feature-name]/spec.md`
|
|
|
|
**Note**: This template is filled in by the `/speckit.plan` command. See `.specify/templates/commands/plan.md` for the execution workflow.
|
|
|
|
## Summary
|
|
|
|
[Extract from feature spec: primary requirement + technical approach from research]
|
|
|
|
## Technical Context
|
|
|
|
<!--
|
|
ACTION REQUIRED: Replace the content in this section with the technical details
|
|
for the project. The structure here is presented in advisory capacity to guide
|
|
the iteration process.
|
|
-->
|
|
|
|
**Language/Version**: [e.g., Python 3.11, Swift 5.9, Rust 1.75 or NEEDS CLARIFICATION]
|
|
**Primary Dependencies**: [e.g., FastAPI, UIKit, LLVM or NEEDS CLARIFICATION]
|
|
**Storage**: [if applicable, e.g., PostgreSQL, CoreData, files or N/A]
|
|
**Testing**: [e.g., pytest, XCTest, cargo test or NEEDS CLARIFICATION]
|
|
**Target Platform**: [e.g., Linux server, iOS 15+, WASM or NEEDS CLARIFICATION]
|
|
**Project Type**: [single/web/mobile - determines source structure]
|
|
**Performance Goals**: [domain-specific, e.g., 1000 req/s, 10k lines/sec, 60 fps or NEEDS CLARIFICATION]
|
|
**Constraints**: [domain-specific, e.g., <200ms p95, <100MB memory, offline-capable or NEEDS CLARIFICATION]
|
|
**Scale/Scope**: [domain-specific, e.g., 10k users, 1M LOC, 50 screens or NEEDS CLARIFICATION]
|
|
|
|
## Constitution Check
|
|
|
|
*GATE: Must pass before Phase 0 research. Re-check after Phase 1 design.*
|
|
|
|
**Principle I - Tool-First Architecture**
|
|
- [ ] Feature designed as standalone, reusable tool
|
|
- [ ] Single responsibility clearly defined
|
|
- [ ] Independently testable and documented
|
|
- [ ] Supports both CLI and programmatic use
|
|
|
|
**Principle II - Developer Experience (DX) Priority**
|
|
- [ ] API/interface is clear and intuitive
|
|
- [ ] Documentation includes examples
|
|
- [ ] Error messages guide users to solutions
|
|
- [ ] Simple by default, powerful when needed
|
|
|
|
**Principle III - Hook-Driven Extensibility**
|
|
- [ ] Uses well-defined hooks with clear contracts (if applicable)
|
|
- [ ] Hook execution is predictable and debuggable
|
|
- [ ] Hook failures are graceful and informative
|
|
|
|
**Principle IV - Agent Specialization**
|
|
- [ ] Agent has clearly defined scope (if applicable)
|
|
- [ ] Agent is context-aware with appropriate tools
|
|
- [ ] Agent prompts are version-controlled and testable
|
|
|
|
**Principle V - Test-First Development (NON-NEGOTIABLE)**
|
|
- [ ] Tests will be written before implementation
|
|
- [ ] Unit tests cover core functionality
|
|
- [ ] Integration tests validate tool composition/hook interactions
|
|
- [ ] Agent behavior validated through prompt/output testing (if applicable)
|
|
|
|
**Principle VI - Observability & Debuggability**
|
|
- [ ] Appropriate logging levels defined (debug, info, warn, error)
|
|
- [ ] Events emitted for monitoring (if applicable)
|
|
- [ ] Reasoning/decision-making processes exposed (for agents)
|
|
- [ ] Performance metrics measurable
|
|
|
|
**Principle VII - Simplicity & YAGNI**
|
|
- [ ] Simplest solution chosen
|
|
- [ ] Complexity justified (see Complexity Tracking if violations exist)
|
|
- [ ] Composition preferred over inheritance
|
|
- [ ] No premature optimization or feature bloat
|
|
|
|
## Project Structure
|
|
|
|
### Documentation (this feature)
|
|
|
|
```
|
|
specs/[###-feature]/
|
|
├── plan.md # This file (/speckit.plan command output)
|
|
├── research.md # Phase 0 output (/speckit.plan command)
|
|
├── data-model.md # Phase 1 output (/speckit.plan command)
|
|
├── quickstart.md # Phase 1 output (/speckit.plan command)
|
|
├── contracts/ # Phase 1 output (/speckit.plan command)
|
|
└── tasks.md # Phase 2 output (/speckit.tasks command - NOT created by /speckit.plan)
|
|
```
|
|
|
|
### Source Code (repository root)
|
|
<!--
|
|
ACTION REQUIRED: Replace the placeholder tree below with the concrete layout
|
|
for this feature. Delete unused options and expand the chosen structure with
|
|
real paths (e.g., apps/admin, packages/something). The delivered plan must
|
|
not include Option labels.
|
|
-->
|
|
|
|
```
|
|
# [REMOVE IF UNUSED] Option 1: Single project (DEFAULT)
|
|
src/
|
|
├── models/
|
|
├── services/
|
|
├── cli/
|
|
└── lib/
|
|
|
|
tests/
|
|
├── contract/
|
|
├── integration/
|
|
└── unit/
|
|
|
|
# [REMOVE IF UNUSED] Option 2: Web application (when "frontend" + "backend" detected)
|
|
backend/
|
|
├── src/
|
|
│ ├── models/
|
|
│ ├── services/
|
|
│ └── api/
|
|
└── tests/
|
|
|
|
frontend/
|
|
├── src/
|
|
│ ├── components/
|
|
│ ├── pages/
|
|
│ └── services/
|
|
└── tests/
|
|
|
|
# [REMOVE IF UNUSED] Option 3: Mobile + API (when "iOS/Android" detected)
|
|
api/
|
|
└── [same as backend above]
|
|
|
|
ios/ or android/
|
|
└── [platform-specific structure: feature modules, UI flows, platform tests]
|
|
```
|
|
|
|
**Structure Decision**: [Document the selected structure and reference the real
|
|
directories captured above]
|
|
|
|
## Complexity Tracking
|
|
|
|
*Fill ONLY if Constitution Check has violations that must be justified*
|
|
|
|
| Violation | Why Needed | Simpler Alternative Rejected Because |
|
|
|-----------|------------|-------------------------------------|
|
|
| [e.g., 4th project] | [current need] | [why 3 projects insufficient] |
|
|
| [e.g., Repository pattern] | [specific problem] | [why direct DB access insufficient] |
|