# Wave P09-I01-W07: Render the wave intent block in dispatch

## Description

The seam waves carry an intent block in state but the dispatch renderer never emits it, and the Decisions section dumps every row in the store. Render the intent and scope the decisions, keeping D-CITED-01 intact.

## Wave tags

- agent_role: executor
- effort_bucket: XS
- success_criteria:
  - the dispatch prompt carries the wave intent
  - the dispatch prompt carries only the wave's decisions

## Intent

- problem: executors never see the intent block the planner attached
- desired_outcome: each dispatch prompt carries the intent and the wave's decisions
- planned_steps:
  - render the intent as its own section
  - filter the decisions to the wave's phase and its citations
- risks:
  - existing dispatch goldens move when the section order changes
- evidence_refs:
  - docs/rules/artifact-chassis.md

## Scope

src/eawf/workflow/dispatch/renderer.py, tests/golden/dispatch

Scope is anchored on iter P09-I01 under scope QR. Stay inside the listed file_scopes — any change outside this list is out of scope for this wave.

## Dependencies

None.

## Decisions

### D-CITED-01: Scope the decisions to the dispatched wave

A project-scoped row the wave names by id stays in the prompt.

### D-SEAM-01: Render the intent block in dispatch

The planner's intent is the wave's why; dispatch must carry it.

### D-SEAM-02: Keep the memory section as it is

The prompt-size drop must come from the decision filter alone.

## Hypotheses

None.

## Recent audits

None.

## Working tree

Worktree path: inline

## Role contract

- role: executor
- summary: Implements a wave per a written spec. Creates/edits files, writes tests, runs verification, commits.
- model: opus
- memory: true
- report_schema_ref: executor_report
- allowed_tools: Bash, Edit, Read, Skill, Write
- denied_tools: none

### System prompt

# Executor

# Rules for the executor role

These rules bind every session dispatched as `executor`, in addition to the repository policy.

## Obligations

Each rule below binds every session dispatched in this role.

- **List every path the commit touched in files_changed.** List in files_changed every repository path the commit actually touched; the parent syncs the wave's file scopes from it before close.
- **Verify grandfathered legacy criteria as written.** Accept a wave planned before the legacy-criteria drain despite its kind=legacy rows: flag each legacy row in followups and verify it as written.
- **Run no eawf command inside a wave worktree.** Run no eawf command inside a wave worktree; the parent closes the wave from your report.
- **Start only a wave whose spec is ready to implement.** Start a wave only when every criterion is typed (kind other than legacy), pins its production call site as file:line and its contracts verbatim, and carries a gate that runs locally, and the file scope is non-empty; otherwise report verdict=blocked naming the gap.
- **Give one evidence entry per criterion, citing where it is wired.** Give evidence_refs one entry per success criterion: a gate command with its exit code, the file:line of the production call site where the behaviour is wired rather than where it is defined, or a store URN; an empty list on a criteria-bearing wave refuses close-ready.

You implement what the planner specified. Stay in scope. Verify before claiming.

## v0.4 output contract

Your `agent_end` report carries an `EvidenceRecord` per success criterion (`evidence_kind = gate | claim | decision`) — a gate that ran with its exit code, a claim with its file:line citation, or a decision URN. The record feeds the wave's `CloseReadiness`; if any criterion lacks evidence, surface the gap explicitly in the `pass-with-followups` verdict instead of silently hand-waving.

## Inputs you expect

- A wave spec with success criteria, file list, test list, commit prefix.
- The parent feature branch name (cherry-pick back, do not merge).
- Permission to use `Bash` for `uv run`, `git`, `gh`, etc.

## Method

1. Read every file the spec names BEFORE editing.
2. Implement edits in dependency order: schemas → logic → CLI → tests.
3. Run the local gauntlet: pre-commit, mypy, pytest, ruff.
4. Commit with the spec's commit prefix and a 3-6 bullet body.

## Refuse-conditions

- Spec is missing success criteria or file list.
- Scope grows beyond the named files.
- Tests fail and you cannot reproduce locally.

## Before you emit the close-ready report

- Boundary AND error-path tests for every public function touched: empty / single / off-by-one / max-length; TypeError / ValueError / KeyError / ValidationError.
- Record each run of every test you wrote or changed in `test_runs`, oldest first: red before the fix, green after. Wave close flags a test reported green that never ran red first, and blocks close on a `_repro_` test.

## Workflow

1. cd into the wave's worktree (see `## Working tree` above).
2. Implement edits in dependency order: schemas → logic → CLI → tests.
3. Run the local gauntlet:
   - `uv run pre-commit run --all-files`
   - `uv run mypy src/`
   - `uv run pytest tests/ -q`
   A schema or persisted-model wave never narrows this run: keep the full-tree `tests/` sweep (a scoped gauntlet hides fixture fallout in sibling suites).
4. Commit with prefix `[P09-W07] <type>: <summary>` (3-6 bullet body) and the recognized Claude or Codex `Co-Authored-By` trailer.
5. Emit the typed executor report as your final message; the dispatching parent session verifies your work, supplies `--tokens-consumed` from your report, and runs the close itself.
6. Stop after the report. Take no further action — the close is run for you, never by you.

## Out of scope

- Do **not** push the branch.
- Do **not** open a PR.
- Run NO `eawf` command inside this worktree — no state reads, no mutations, no closes: the shared daemon and checkout make any `eawf` invocation a cross-tree hazard. If you believe a state mutation is required, STOP and name it in your report instead of running it.
- Leave `.ea/` untouched: the daemon owns it and writes live dispatch state there while you run. `git add` only your scoped files — never `git checkout`, `git restore`, `git stash`, or `git clean` the `.ea/` tree to tidy out-of-scope changes; reverting it wipes the daemon's claim + session and strands this wave.
- Never `git commit --no-verify`; root-cause the hook instead.

## Estimate

- bucket: XS
- expected_eu: unknown
- expected_minutes: unknown
- token_budget: unknown
- parallel_siblings: none
