88 lines
3.9 KiB
Markdown
88 lines
3.9 KiB
Markdown
|
|
# Full SDD workflow
|
||
|
|
|
||
|
|
## Configuration
|
||
|
|
- **Artifacts Path**: {@artifacts_path} → `.zenflow/tasks/{task_id}`
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## Agent Instructions
|
||
|
|
|
||
|
|
If you are blocked and need user clarification, mark the current step with `[!]` in plan.md before stopping.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## Workflow Steps
|
||
|
|
|
||
|
|
### [x] Step: Requirements
|
||
|
|
<!-- chat-id: c41b4352-a09d-4280-9aa2-cf29378edb68 -->
|
||
|
|
|
||
|
|
Create a Product Requirements Document (PRD) based on the feature description.
|
||
|
|
|
||
|
|
1. Review existing codebase to understand current architecture and patterns
|
||
|
|
2. Analyze the feature definition and identify unclear aspects
|
||
|
|
3. Ask the user for clarifications on aspects that significantly impact scope or user experience
|
||
|
|
4. Make reasonable decisions for minor details based on context and conventions
|
||
|
|
5. If user can't clarify, make a decision, state the assumption, and continue
|
||
|
|
|
||
|
|
Save the PRD to `{@artifacts_path}/requirements.md`.
|
||
|
|
|
||
|
|
### [x] Step: Technical Specification
|
||
|
|
<!-- chat-id: c8a2d821-c232-4b10-a4b9-471df9e53543 -->
|
||
|
|
|
||
|
|
Create a technical specification based on the PRD in `{@artifacts_path}/requirements.md`.
|
||
|
|
|
||
|
|
1. Review existing codebase architecture and identify reusable components
|
||
|
|
2. Define the implementation approach
|
||
|
|
|
||
|
|
Save to `{@artifacts_path}/spec.md` with:
|
||
|
|
- Technical context (language, dependencies)
|
||
|
|
- Implementation approach referencing existing code patterns
|
||
|
|
- Source code structure changes
|
||
|
|
- Data model / API / interface changes
|
||
|
|
- Delivery phases (incremental, testable milestones)
|
||
|
|
- Verification approach using project lint/test commands
|
||
|
|
|
||
|
|
### [x] Step: Planning
|
||
|
|
<!-- chat-id: 5128cbb3-0529-47f2-a7ac-9a978ea72267 -->
|
||
|
|
|
||
|
|
Create a detailed implementation plan based on `{@artifacts_path}/spec.md`.
|
||
|
|
|
||
|
|
1. Break down the work into concrete tasks
|
||
|
|
2. Each task should reference relevant contracts and include verification steps
|
||
|
|
3. Replace the Implementation step below with the planned tasks
|
||
|
|
|
||
|
|
Rule of thumb for step size: each step should represent a coherent unit of work (e.g., implement a component, add an API endpoint). Avoid steps that are too granular (single function) or too broad (entire feature).
|
||
|
|
|
||
|
|
Important: unit tests must be part of each implementation task, not separate tasks. Each task should implement the code and its tests together, if relevant.
|
||
|
|
|
||
|
|
If the feature is trivial and doesn't warrant full specification, update this workflow to remove unnecessary steps and explain the reasoning to the user.
|
||
|
|
|
||
|
|
Save to `{@artifacts_path}/plan.md`.
|
||
|
|
|
||
|
|
### [x] Phase 1: Create DEVELOPMENT.md
|
||
|
|
<!-- chat-id: 0da2c64e-4b20-423d-9049-46fc0467eaec -->
|
||
|
|
1. Research tech stack, monorepo structure, and database schemas in `server/db/`.
|
||
|
|
2. Document the "Parents Table" approach and database initialization/migration.
|
||
|
|
3. Add setup and development commands.
|
||
|
|
4. Verify correctness against `server/db/init.js` and `package.json`.
|
||
|
|
|
||
|
|
### [x] Phase 2: Create API.md
|
||
|
|
<!-- chat-id: bde368a7-164c-419e-b4b9-582e6ced4a45 -->
|
||
|
|
1. Research all routes in `server/routes/` for endpoints, methods, parameters, and responses.
|
||
|
|
2. Document endpoint groups: Dogs, Litters, Health, Genetics, Breeding, and Settings.
|
||
|
|
3. Provide JSON schema examples for key data models (Dog, Litter, etc.).
|
||
|
|
4. Verify endpoints against route handlers in `server/routes/`.
|
||
|
|
|
||
|
|
### [x] Phase 3: Create FRONTEND_GUIDE.md
|
||
|
|
<!-- chat-id: f0c53f46-3014-4030-9433-3df4d730fde7 -->
|
||
|
|
1. Research React patterns, hooks (`useSettings`), and `PedigreeTree` logic.
|
||
|
|
2. Document routing, state management, and key reusable components (`DogForm`, `PedigreeTree`, etc.).
|
||
|
|
3. Explain styling conventions and theme implementation using CSS variables.
|
||
|
|
4. Verify patterns against `client/src/App.jsx`, `client/src/hooks/`, and `client/src/components/`.
|
||
|
|
|
||
|
|
### [x] Phase 4: Final Review and Verification
|
||
|
|
<!-- chat-id: b87b4e6a-5d6a-4ad2-91dc-70916b830845 -->
|
||
|
|
1. Cross-reference all new documentation files with the current codebase (v0.6.1).
|
||
|
|
2. Ensure consistent formatting and clarity across all three files.
|
||
|
|
3. Verify that an agent can understand how to implement a new feature using only these documents.
|