# Development Decision Tables

Use these tables when choosing the next action. They are procedural branches,
not generic advice.

## A. User request classification

| User asks for | Default action | Do not do automatically |
| --- | --- | --- |
| Explain/review/status | Inspect and report evidence | Change code, restart, publish |
| Diagnose | Reproduce/inspect and identify cause | Implement a fix unless asked |
| Fix/change/build | Inspect, implement, test proportionally | Publish/deploy/restart unless authorized |
| Search/latest/verify | Query current authoritative source | Rely on stale memory |
| Wait/monitor | Use an appropriate bounded monitoring loop | Block without updates |
| Release/publish | Follow repository release process exactly | Publish from the wrong artifact/location |

## B. Before a file read

| Situation | Correct action |
| --- | --- |
| Exact current text is visible and file unchanged | Use it; reread only if a new range or check is needed |
| Path/hash known but only pointer/extract is visible | Read the required full body/range |
| File was edited by tool/human/external process | Read again before an exact edit or claim |
| Large file exceeds context budget | Use isolated extraction with source anchors; keep full read available |
| Model explicitly asks `mode=full` for a bounded file | Deliver full source, not a branch wrapper |
| Same read repeats with no new need | Give an advisory/cache body if truly visible; do not reject exploration |

## C. Before an edit

| Situation | Correct action |
| --- | --- |
| Exact `old_string` is current and unique | Call `file_edit` |
| Fresh hash is available | Attach it automatically for compare-and-swap safety |
| Hash is unavailable but exact old text is available | Allow the edit tool to attempt exact matching |
| Exact text is absent/ambiguous | Read the target range or use an appropriate patch operation |
| Existing file needs a whole replacement | Require explicit overwrite semantics and current identity at tool level |
| Prior edit failed | Read the exact error, revise the target/hypothesis; do not invent a controller block |

## D. After a tool result

| Result | Agent interpretation | Next action |
| --- | --- | --- |
| Read success | Source evidence is available only to its actual coverage/visibility | Reason, edit, or inspect another needed range |
| Edit success | A mutation occurred; prior relevant tests may be stale | Run focused proof check |
| Edit exact-match failure | Current text/premise is wrong | Read target or revise edit |
| Hash mismatch | File identity changed | Read current target; do not reuse old body |
| Build pass | Compilation/build claim supported | Run behavioral test if behavior changed |
| Test fail | Claim disproved or incomplete | Inspect failure and revise code/hypothesis |
| Command times out | Result unknown, not failure/pass | Narrow command, inspect process, or use bounded retry |
| Tool output truncated | Partial success with provenance | Narrow deterministically; do not call it not-found |

## E. Test choice

| Change type | Minimum useful proof |
| --- | --- |
| Pure type/API wiring | Build/typecheck plus focused interface test |
| Bug report/regression | Fixture reproducing the reported path |
| Context assembly | Assert the next model request contains/omits required evidence |
| File tool behavior | Exercise actual temporary filesystem and tool execution |
| Service update | Verify installed target and booted process identity separately |
| TUI rendering | Render-level test and manual/terminal observation when needed |
| Large inference/extraction | Preflight exact hardware, then use an inference-driven harness |

## F. When to stop

| State | Report |
| --- | --- |
| Requested behavior implemented and current proof passes | Completed with changed files and proof |
| Work changed but required proof has not run | Incomplete verification; name the missing check |
| Exact external dependency/authority is missing | Blocked; name dependency and evidence |
| User needs to choose between materially different paths | Ask a narrow question with consequences |
| Task remains hard but local investigation can continue | Continue; this is not a blocker |
