Prerequisite Gate
Before any task prefix runs (except management_status: and state:), the agent checks that upstream inputs and outputs exist.
What gets checked
- Required inputs — every entry in
dept.yaml → inputswithrequired: truemust exist in../nepwalk-docs/. - Prerequisite outputs — every entry in
dept.yaml → outputswithrequired_before_work: truemust exist and havestatus:≥draft.
What happens on failure
WARNING: prerequisites incomplete.
[ ] docs/management/mvp/v1/PRD_v1.md (missing)
[ ] docs/management/mvp/v1/SRS_v1.md (status: missing)
Proceed anyway? (yes / no)
- no → stop. Fix the upstream doc first.
- yes → continue, with a note added to
PROJECT_STATE.mdso the override is visible.
Why we have the gate
Skipping upstream docs produces specs that contradict each other. The gate keeps the doc chain coherent: PRD informed by idea, SRS informed by PRD, tasks informed by SRS.
When to override
Override only when the upstream doc is intentionally pending (e.g. parallel drafting) and you accept that the current doc may need rewrites once upstream lands. Record the reason in PROJECT_STATE.md → OPEN QUESTIONS.