feat: add mandatory read_first and acceptance_criteria to prevent shallow execution (#1013)

Executor agents often produce shallow work because plans say "align X with Y"
without specifying what the aligned result looks like. The executor changes one
value and calls it done.

This adds three mandatory fields to every task:

- `<read_first>`: Files the executor MUST read before editing. Ensures ground
  truth is loaded, not assumed.
- `<acceptance_criteria>`: Grep-verifiable conditions checked after each task.
  No subjective language ("looks consistent"), only concrete checks
  ("file contains 'exact string'").
- `<action>` guidance: Must include concrete values (identifiers, signatures,
  config keys), never vague references like "update to match production".

Adds `<deep_work_rules>` to planner instructions with mandatory quality gate
checks. Executor workflow enforces both gates: read before edit, verify after
edit. Adds generic pre-commit hook failure handling guidance.

Co-authored-by: Dammerzone <dammerzone@users.noreply.github.com>
This commit is contained in:
Dryade AI
2026-03-12 18:35:51 +01:00
committed by GitHub
parent 2411f66a36
commit e97851ebd2
3 changed files with 96 additions and 4 deletions

View File

@@ -63,21 +63,29 @@ Output: [What artifacts will be created]
<task type="auto">
<name>Task 1: [Action-oriented name]</name>
<files>path/to/file.ext, another/file.ext</files>
<action>[Specific implementation - what to do, how to do it, what to avoid and WHY]</action>
<read_first>path/to/reference.ext, path/to/source-of-truth.ext</read_first>
<action>[Specific implementation - what to do, how to do it, what to avoid and WHY. Include CONCRETE values: exact identifiers, parameters, expected outputs, file paths, command arguments. Never say "align X with Y" without specifying the exact target state.]</action>
<verify>[Command or check to prove it worked]</verify>
<acceptance_criteria>
- [Grep-verifiable condition: "file.ext contains 'exact string'"]
- [Measurable condition: "output.ext uses 'expected-value', NOT 'wrong-value'"]
</acceptance_criteria>
<done>[Measurable acceptance criteria]</done>
</task>
<task type="auto">
<name>Task 2: [Action-oriented name]</name>
<files>path/to/file.ext</files>
<action>[Specific implementation]</action>
<read_first>path/to/reference.ext</read_first>
<action>[Specific implementation with concrete values]</action>
<verify>[Command or check]</verify>
<acceptance_criteria>
- [Grep-verifiable condition]
</acceptance_criteria>
<done>[Acceptance criteria]</done>
</task>
<!-- For checkpoint task examples and patterns, see @~/.claude/get-shit-done/references/checkpoints.md -->
<!-- Key rule: Claude starts dev server BEFORE human-verify checkpoints. User only visits URLs. -->
<task type="checkpoint:decision" gate="blocking">
<decision>[What needs deciding]</decision>
@@ -456,6 +464,39 @@ files_modified: [...]
</task>
```
**Bad: Missing read_first (executor modifies files it hasn't read)**
```xml
<task type="auto">
<name>Update database config</name>
<files>src/config/database.ts</files>
<!-- No read_first! Executor doesn't know current state or conventions -->
<action>Update the database config to match production settings</action>
</task>
```
**Bad: Vague acceptance criteria (not verifiable)**
```xml
<acceptance_criteria>
- Config is properly set up
- Database connection works correctly
</acceptance_criteria>
```
**Good: Concrete with read_first + verifiable criteria**
```xml
<task type="auto">
<name>Update database config for connection pooling</name>
<files>src/config/database.ts</files>
<read_first>src/config/database.ts, .env.example, docker-compose.yml</read_first>
<action>Add pool configuration: min=2, max=20, idleTimeoutMs=30000. Add SSL config: rejectUnauthorized=true when NODE_ENV=production. Add .env.example entry: DATABASE_POOL_MAX=20.</action>
<acceptance_criteria>
- database.ts contains "max: 20" and "idleTimeoutMillis: 30000"
- database.ts contains SSL conditional on NODE_ENV
- .env.example contains DATABASE_POOL_MAX
</acceptance_criteria>
</task>
```
---
## Guidelines