## ADDED Requirements ### Requirement: Devflow context lookup uses an index-first strategy SM Flow SHALL use a stable index-first devflow lookup order to find relevant context. #### Scenario: Phase 0.5 starts - **WHEN** Phase 0.5 collects devflow context - **THEN** the flow checks `devflow/index.md` first, then `devflow/glossary/CONTEXT.md`, then related project brief/acceptance/ADR files, then `devflow/compound/` #### Scenario: Index is missing during lookup - **WHEN** `devflow/index.md` does not exist - **THEN** the flow initializes a lightweight index from known project directories, falls back to targeted search for the current lookup, and records that the index was bootstrapped ### Requirement: Phase 4 maintains devflow index SM Flow SHALL update devflow index metadata during Phase 4 when a project archive is created or updated. #### Scenario: Project is backfilled - **WHEN** Phase 4 creates or updates `devflow/projects/YYYY-MM-DD-{slug}/` - **THEN** the flow updates `devflow/index.md` with date, slug, domain, keywords, related OpenSpec change, and status #### Scenario: Phase 4 completes without index update - **WHEN** Phase 4 has created or updated project backfill files but has not updated `devflow/index.md` - **THEN** the flow is incomplete and must update the index before reporting completion