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

@@ -214,6 +214,7 @@ Execute each wave in sequence. Within a wave: parallel if `PARALLELIZATION=true`
<files_to_read>
Read these files at execution start using the Read tool:
- {phase_dir}/{plan_file} (Plan)
- .planning/PROJECT.md (Project context — core value, requirements, evolution rules)
- .planning/STATE.md (State)
- .planning/config.json (Config, if exists)
- ./CLAUDE.md (Project instructions, if exists — follow project-specific guidelines and coding conventions)