fix: embed evolution rules in generated PROJECT.md so agents see them at runtime (#1039)

The <evolution> block in templates/project.md defined requirement lifecycle
rules (validate, invalidate, add, log decisions) but these instructions
only existed in the template — they never made it into the generated
PROJECT.md that agents actually read during phase transitions.

Changes:
- new-project.md: Add ## Evolution section to generated PROJECT.md with
  the phase transition and milestone review checklists
- new-milestone.md: Ensure ## Evolution section exists in PROJECT.md
  (backfills for projects created before this feature)
- execute-phase.md: Add .planning/PROJECT.md to executor <files_to_read>
  so executors have project context (core value, requirements, evolution)
- templates/project.md: Add comment noting the <evolution> block is
  implemented by transition.md and complete-milestone.md
- docs/ARCHITECTURE.md, docs/FEATURES.md: Note evolution rules in
  PROJECT.md descriptions
- CHANGELOG.md: Document the new Evolution section and executor context

Fixes #1039

All 755 tests pass.
This commit is contained in:
Tom Boucher
2026-03-16 20:55:22 -04:00
parent fc468adb42
commit 6e612c54d7
6 changed files with 47 additions and 2 deletions

View File

@@ -358,7 +358,7 @@ Equivalent paths for other runtimes:
```
.planning/
├── PROJECT.md # Project vision, constraints, decisions
├── PROJECT.md # Project vision, constraints, decisions, evolution rules
├── REQUIREMENTS.md # Scoped requirements (v1/v2/out-of-scope)
├── ROADMAP.md # Phase breakdown with status tracking
├── STATE.md # Living memory: position, decisions, blockers, metrics

View File

@@ -70,7 +70,7 @@
**Produces:**
| Artifact | Description |
|----------|-------------|
| `PROJECT.md` | Project vision, constraints, technical decisions |
| `PROJECT.md` | Project vision, constraints, technical decisions, evolution rules |
| `REQUIREMENTS.md` | Scoped requirements with unique IDs (REQ-XX) |
| `ROADMAP.md` | Phase breakdown with status tracking and requirement mapping |
| `STATE.md` | Initial project state with position, decisions, metrics |