Tyler Gillispie 42b336173e docs(protocol): enshrine black-box delegation and pre-review summary gate
- Add Section 3.5 to AGENTS.md for agent orchestration and tool autonomy
- Add Section E to tasks/GUIDELINES.md with pre-review summary gate
- Update tasks/do.md dispatch template with DRY positive acceptance criteria
- Align task lifecycle state machine to keep in-flight work in tasks/new/
2026-08-26 10:37:22 -07:00

62 lines
2.8 KiB
Markdown

# Task Implementation Execution Protocol (`tasks/do.md`)
This protocol defines the standard for executing an approved task from
`tasks/new/`.
---
## 1. Direct Execution Protocol (When You Are Doing the Task)
When commanded to **"tasks/do `[TASK_FILE]`"**:
1. **Keep in New During Work:** The task file remains in `tasks/new/` while work
is in progress.
2. **Follow the 4-Step State Machine:**
- **Step 1 (Research):** Inspect the target files and verify architectural
assumptions.
- **Step 2 (Implementation):** Apply minimal, pure functional modifications.
Preserve existing docstrings and comments.
- **Step 3 (Quality Gates):** Run all verification gates:
- `deno fmt`
- `deno task lint`
- `deno task check`
- `deno test --allow-all` (Run ONLY hermetic unit tests; NEVER run
`deno task start` in container sandboxes).
- **Step 4 (Review & Move):** Upon all gates passing, move the task file
directly from `tasks/new/` to
`tasks/complete/YYYY-MMDD.XX.agent.type.scope.title-HHMM.md`. (If the
session must end without completing the task, park it in `tasks/wip/`).
3. **Commit & Sync:** Commit with standard conventional commit syntax and push
to both remotes (`origin` and `gitea`).
---
## 2. Dispatch Template (When Preparing a Prompt for Jules or External Agents)
When commanded to **"tasks/do a prompt for Jules on `[TASK_FILE]`"**, fill in
and provide the following block:
```text
**Role:** Act as an Implementation Engineer.
**The Task:** Please review and execute the approved task plan in `[tasks/new/TASK_FILENAME.md]`.
**Directives & Guidelines:**
- Adhere strictly to the repository architecture and operating protocols in `AGENTS.md` and `tasks/GUIDELINES.md`.
- Keep the task file in `tasks/new/` during execution; only move it to `tasks/complete/` upon successful verification (or park in `tasks/wip/` only if work cannot be finished in this session).
- Run ONLY hermetic unit tests (`deno test --allow-all`). Do NOT start long-running servers (`deno task start` / `deno task dev`).
**Acceptance Criteria & Delivery Protocol:**
1. **Pre-Review Quality & Summary (Before Requesting Review / Opening PR):**
- Run and pass all quality gates: `deno fmt`, `deno task lint`, `deno task check`, and `deno test --allow-all`.
- Ensure the git working tree contains only intentional modifications to target deliverables (zero untracked or temporary files).
- Present a concise verification summary detailing:
* Exact list of modified/created files
* Test execution results proving all test suites pass
2. **Final Completion (Upon Approval):**
- Move the task file from `tasks/new/` directly to `tasks/complete/YYYY-MMDD.XX.agent.type.scope.title-HHMM.md` (or park in `tasks/wip/` only if work cannot be finished in this session).
- Submit the final pull request with a clean git history.
```