.claude/skills/sagerstack-code-planning/SKILL.md
Mandatory planning workflow before writing any code. Use when starting new features, projects, or any implementation work. Ensures alignment on requirements, architecture, and approach before coding begins.
npx skillsauth add sagerstack/agentic-sdlc sagerstack:code-planningInstall 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.
<essential_principles>
This workflow is MANDATORY before writing ANY code. No exceptions.
Every implementation starts with planning:
Ask ONE question at a time. Each question offers multiple-choice options with a free-text alternative as the last option. Adapt follow-up questions based on previous answers. Never batch questions.
Planning follows the OKR framework:
Epics fulfill Key Results. Key Results measure progress toward the Objective.
For each question:
@persona/ filesPlanning produces docs/project-context.md in the current project:
</essential_principles>
<intake> **What would you like to plan?**Wait for response before proceeding. </intake>
<routing> | Response | Workflow | |----------|----------| | 1, "new project", "start fresh" | `workflows/plan-new-project.md` | | 2, "feature", "add", "implement" | `workflows/plan-feature.md` | | 3, "refactor", "restructure" | `workflows/plan-refactor.md` | | 4, "continue", "resume" | `workflows/continue-planning.md` | </routing><workflow_steps>
Read references/questions.md for the question bank and references/phase-patterns.md for milestone/epic patterns.
Ask ONE question at a time. Each question has 2-4 multiple-choice options. The last option is always a free-text alternative.
Question flow:
Before asking each question, check @persona/ files and loaded skills for existing preferences. If a preference exists, present it as a suggested answer the user can confirm or override.
Core questions (ask in this order, adapt based on answers):
Project type — What are we building?
Problem — What problem does this solve?
End user — Who uses this?
Deployment target — Where will this run?
Architecture — How should we structure the code?
Tech stack — Key technology choices
Configuration — What config/secrets are needed?
External dependencies — Does this integrate with external APIs/services?
Adaptive follow-ups:
Stop asking when you have enough context to synthesize an Objective. Don't ask questions whose answers are already known from persona files or skills.
Synthesize the user's answers into a clear Objective statement.
Objective format:
Objective: [Qualitative statement of what we're building and why]
Example:
Objective: Build a Python CLI tool that accepts a name and prints it reversed,
following clean architecture principles, as a test project for the SDLC framework.
Present for user confirmation:
Based on our discussion, here is the project Objective:
Objective: [statement]
Does this capture what we're building and why? Confirm or refine.
Loop until user confirms.
Based on the confirmed Objective, propose Milestones. Read references/phase-patterns.md to select and adapt a template.
For each Milestone:
Key Results are:
Format:
Milestone 1: [Name]
Delivers: [What capability becomes available]
Key Results:
- KR-1: [Measurable outcome — what the user can observe]
- KR-2: [Measurable outcome]
- KR-3: [Measurable outcome]
Confirm or adjust?
Example:
Milestone 1: Working CLI
Delivers: A locally-running CLI tool with core functionality
Key Results:
- KR-1: CLI correctly reverses any name input (e.g., "Sagar" → "ragaS")
- KR-2: CLI shows helpful error message when no argument provided
- KR-3: Test coverage >= 90%
Confirm or adjust?
Present ONE milestone at a time. After user confirms, proceed to Epic breakdown (Step 5) before proposing the next milestone.
After a milestone's Key Results are confirmed, propose the Epic breakdown.
Read references/phase-patterns.md before proposing epics.
Key Principles:
Format — 3-column table:
Epics for Milestone 1:
| Epic | Task | Key Result |
|------|------|------------|
| E1 | Project Skeleton | — (enabling) |
| E2 | Name Reversal Domain + CLI | KR-1, KR-2 |
Confirm, reorder, or redefine?
User can:
After confirmation, repeat Steps 4-5 for the next milestone.
Continue until user says: "All milestones defined" or similar confirmation.
Create docs/project-context.md with:
# Code Context: [Project Name]
Date: [date]
## Objective
[Qualitative goal statement — the "what" and "why"]
## Architecture
[Text diagram and key decisions]
## Implementation Plan
### Milestone 1: [Name]
- **Delivers**: [Major capability]
- **Why Now**: [Why this milestone before others]
**Key Results:**
- KR-1: [Measurable outcome]
- KR-2: [Measurable outcome]
**Epics:**
| Epic | Task | Key Result |
|------|------|------------|
| E1 | [Task description] | [KR mapping or — (enabling)] |
| E2 | [Task description] | [KR mapping] |
### Milestone 2: [Name]
- **Delivers**: [Major capability]
- **Why Now**: [Ordering rationale]
**Key Results:**
- KR-1: [Measurable outcome]
**Epics:**
| Epic | Task | Key Result |
|------|------|------------|
| E3 | [Task description] | [KR mapping] |
[Continue for all confirmed milestones]
## Decisions Made
[Key choices and rationale from the planning session]
After planning is complete:
/sagerstack:planner to plan one epic at a time/sagerstack:builder to implement the planned epic</workflow_steps>
<reference_index>
All in references/:
| File | Purpose | |------|---------| | questions.md | Question bank with multiple-choice options by category | | phase-patterns.md | Milestone/epic structuring patterns, ordering principles, templates | </reference_index>
<success_criteria>
Planning is complete when:
docs/project-context.md created with Objective, Milestones, KRs, and Epics/sagerstack:planner</success_criteria>
development
Interactive UAT verification skill. Walks the user through acceptance criteria one at a time, records pass/fail/skip results, generates UAT report, and routes remediation gaps to /sagerstack:builder. Solo skill (no agent team).
development
Python code architecture with Vertical Slice + DDD and Clean Architecture. Use when designing Python projects, structuring code, creating domain models, defining bounded contexts, or reviewing architecture. Enforces strict domain purity, CamelCase naming, and proper layer separation.
data-ai
SDLC planning skill that spawns a 4-member agent team to plan one epic at a time from project-context.md. Produces epics, user stories with FR/TR/AC, implementation plans, and critical analyses. Use when planning an epic for full SDLC execution with agent teams.
testing
Testing infrastructure, local environment simulation, and deployment scripts. Use when setting up pytest fixtures, Docker Compose, LocalStack, mocking external services, or creating local deployment scripts. Focuses on HOW to test and run locally, not coding principles (TDD is in software-engineering).