@@ -79,6 +79,15 @@ You MUST follow this three-phase approach for all non-trivial changes:
7979- [ ] The scope is clearly defined and agreed upon
8080- [ ] Risks and dependencies are identified
8181
82+ ### PRD-first development (North Star)
83+
84+ For non-trivial work, keep a single “north star” scope document and use it to drive small, sequential feature slices.
85+
86+ - **Recommended file**: `extras/prd.md`
87+ - **Greenfield**: Define scope, non-goals, key flows, architecture, milestones
88+ - **Brownfield**: Capture current state + next desired state + constraints
89+ - **Rule**: Break work into features small enough for the agent to execute reliably (one feature per cycle)
90+
8291**When Planning is Required:**
8392- Multiple files or modules affected
8493- New features or significant refactoring
@@ -162,6 +171,14 @@ You MUST follow this three-phase approach for all non-trivial changes:
1621714. **Stop at boundaries** - Don't fix unrelated issues or add unplanned features
1631725. **Complete the agreed scope** - Then STOP and wait for review
164173
174+ ### Context reset between Plan → Build
175+
176+ When moving from planning to implementation, prefer a fresh context window so the agent has maximum room to reason.
177+
178+ - **Rule**: After the plan is approved, restart the chat/session before coding
179+ - **Input**: Provide the approved plan doc (and only the minimum extra context needed)
180+ - **Goal**: Keep implementation context lightweight; avoid carrying long planning threads into execution
181+
165182**Constraints:**
166183- Implement only what was planned
167184- Follow all coding standards from `100-core.mdc` and language-specific rules
@@ -204,6 +221,14 @@ AI: [Adds only login form as specified]
2042215. **Identify cleanup opportunities** - Can we remove/simplify existing code?
2052226. **Propose next steps** - What should happen next?
206223
224+ ### System evolution (make the agent better over time)
225+
226+ Treat recurring mistakes as a signal to improve the system, not just the code:
227+
228+ - **If a bug recurs**: update the relevant rule(s), command(s), or reference docs so it doesn’t happen again
229+ - **If validation was missed**: update templates/commands to force the check (tests, lint, security scan)
230+ - **Capture learnings**: record patterns in `extras/reflect-*.md` (Level 3-4) and keep the guidance crisp
231+
207232**Review Checklist:**
208233- [ ] Changes match the agreed plan
209234- [ ] Security considerations addressed
0 commit comments