Plan the feature development based on the feature specification.
Guided feature development with codebase understanding and architecture focus. Use this when implementing new features to systematically explore the codebase, clarify requirements, and design robust architecture before coding.
/plugin marketplace add NeoLabHQ/context-engineering-kit/plugin install sdd@context-engineering-kitPlan specifics suggestionsGuided feature development with codebase understanding and architecture focus.
You are helping a developer implement a new feature based on SDD: Specification Driven Development. Follow a systematic approach: understand the codebase deeply, identify and ask about all underspecified details, design elegant architectures.
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
Setup: Get the current git branch, if it written in format feature/<number-padded-to-3-digits>-<kebab-case-title>, part after feature/ is defined as FEATURE_NAME. Consuquently, FEATURE_DIR is defined as specs/FEATURE_NAME, FEATURE_SPEC is defined as specs/FEATURE_NAME/spec.md, IMPL_PLAN is defined as specs/FEATURE_NAME/plan.md, SPECS_DIR is defined as specs/.
Load context: Read FEATURE_SPEC and specs/constitution.md.
Copy specs/templates/plan-template.md to FEATURE_DIR/plan.md using cp command, in future refered as PLAN_FILE.
Continue with stage 2
Goal: Understand relevant existing code and patterns at both high and low levels. Research unknown areas, libraries, frameworks, and missing dependencies.
Follow the structure in {PLAN_FILE} template to:
Technical Context:
Extract unknowns from Technical Context above:
Launch researcher agent to perform created tasks:
For each unknown in Technical Context:
Task: "Research {unknown} for {feature context}"
For each technology choice:
Task: "Find best practices for {tech} in {domain}"
Consolidate findings in research.md using format:
Codebase Exploration:
For code explaration launch 2-3 code-explorer agents in parallel. Each agent should:
Example agent prompts:
Once the agents return, please read all files identified by agents to build deep understanding
Update research report in FEATURE_DIR/research.md file with all findings and set links to relevant files.
Present comprehensive summary of findings and patterns discovered to user.
Goal: Fill in gaps and resolve all ambiguities before designing
CRITICAL: This is one of the most important stages. DO NOT SKIP.
Actions:
If the user says "whatever you think is best", provide your recommendation and set it as a assumed decision in research.md file.
research.md with all NEEDS CLARIFICATION resolved and links to relevant files.
Prerequisites: research.md complete
Goal: Design multiple implementation approaches with different trade-offs.
Launch 2-3 software-architect agents in parallel with different focuses: minimal changes (smallest change, maximum reuse), clean architecture (maintainability, elegant abstractions), or pragmatic balance (speed + quality). Use provided prompt exactly, while prefiling required variables:
Perform software architecture plan design.
**CRITICAL**: Do not write code during this stage, use only high level planing and architecture diagrams.
User Input: {provide user input here if it exists}
## Steps
- **Load context**: Read `specs/constitution.md`, {FEATURE_SPEC}, {FEATURE_DIR}/research.md.
- Write the architecture design to {FEATURE_DIR}/design.{focus-name}.md file, while focusing on following aspect: {focus description}.
Review all approaches and form your opinion on which fits best for this specific task (consider: small fix vs large feature, urgency, complexity, team context)
Present to user: brief summary of each approach, trade-offs comparison, your recommendation with reasoning, concrete implementation differences.
Ask user which approach they prefer
Launch new software-architect agent to make final design doc, based on appraoch choosen by user in previous stage. Use provided prompt exactly, while prefiling required variables:
Perform software architecture plan design.
**Goal**: Plan the implementation based on approach choosen by the user and clarify all unclear or uncertain areas.
**CRITICAL**: Do not write code during this stage, use only high level planing and architecture diagrams.
User Input: {provide user input here}
## Steps
1. **Load context**: Read `specs/constitution.md`, {FEATURE_SPEC}, {FEATURE_DIR}/research.md.
2. Read design files: {list of design files generated by previous agents}.
3. Write the final design doc to {FEATURE_DIR}/design.md file, based on appraoch choosen by the user.
4. Write implementation plan by filling `FEATURE_DIR/plan.md` template.
5. **Extract entities from feature spec** → `FEATURE_DIR/data-model.md`:
- Entity name, fields, relationships
- Validation rules from requirements
- State transitions if applicable
6. **Generate API contracts** from functional requirements if it applicable:
- For each user action → endpoint
- Use standard REST/GraphQL patterns
- Output OpenAPI/GraphQL schema to `FEATURE_DIR/contract.md`
7. Output implementation plan summary.
Once Stage 5 is complete, launch new software-architect agent to review implementation plan. Use provided prompt exactly, while prefiling required variables:
Review implementation plan.
**Goal**: Review implementation plan and present unclear or unceartan areas to the user for clarification.
**CRITICAL**: Do not write code during this stage, use only high level planing and architecture diagrams.
User Input: {provide user input here}
## Steps
1. **Load context**: Read `specs/constitution.md`, {FEATURE_SPEC}, {FEATURE_DIR}/research.md.
2. Review implementation plan in {FEATURE_DIR}/plan.md file, identify unclear or unceartan areas.
3. Resolve high confidence issues by yourself.
4. Output areas that still not resolved or unclear to the user for clarification.
If agent returns areas that still not resolved or unclear, present them to the user for clarification, then repeat step 1.
Once all areas are resolved or unclear, report branch and generated artifacts, including: data-model.md, contract.md, plan.md, etc.