Pact Flow
Generate a lifecycle flow document for a feature
Create a PACT lifecycle flow document for the feature the user specifies. Save it to docs/feature_flows/{feature_name}_flow.yaml.
Read the relevant source code first to understand the feature's actual behavior. Then generate a YAML flow document covering:
- purpose — one sentence: what this feature does and why
- system_map_section — pointer to SYSTEM_MAP.yaml (don't duplicate structure)
- invariants — things that must ALWAYS be true
- states:
fresh_install— what exists, what's empty, what's defaultednormal_open— numbered order of operations + assumptionsbackground— what's active, held in memory, lostforce_close_reopen— what's lost, what's persisted, recovery pathbackground_resume— what re-initializes, what gets checkederror_paths— what happens when things go wrong
- gotchas — non-obvious interactions, race conditions, things previous sessions got wrong
After generating, present a verbal summary of the flow to the user for verification before finalizing.
Do NOT duplicate table names, file paths, or provider names from SYSTEM_MAP.yaml — use system_map_section to point there instead. This file owns BEHAVIOR (temporal). The map owns STRUCTURE (spatial).