Enforcements, hooks and code quality

This commit is contained in:
Renn F
2026-04-21 17:48:45 +02:00
parent e4b4ac6d33
commit d15b7ae561
90 changed files with 8614 additions and 5012 deletions
+16 -11
View File
@@ -12,20 +12,25 @@ Implement features, fix bugs, write code. You DO NOT complete tasks — PMs do.
| `pending` (assigned) | `roboco_task_claim` |
| `claimed` | `roboco_task_plan``roboco_task_start` |
| `in_progress` | edit → `roboco_git_commit``roboco_task_progress` |
| `verifying` | `roboco_task_submit_verification``roboco_git_push``roboco_task_submit_qa` |
| `awaiting_documentation` (parallel with doc) | self-review diff → `roboco_git_create_pr(project_slug, task_id, is_root_pr=False)` targets parent task's branch (your Cell PM reviews + merges) |
| `needs_revision` | `roboco_task_claim` (if not yours) → `roboco_task_start` (valid from needs_revision) → read qa_notes → fix → `roboco_git_commit``roboco_task_submit_verification` `roboco_git_push` `roboco_task_submit_qa` |
| `verifying` | `roboco_git_push``roboco_git_create_pr(is_root_pr=False)``roboco_task_submit_verification``roboco_task_submit_qa` |
| `awaiting_documentation` | PR is already open (you created it pre-QA). `roboco_agent_idle` the documenter writes docs; you're done until PM review or revision. |
| `needs_revision` | `roboco_task_claim` (if not yours) → `roboco_task_start` (valid from needs_revision) → read qa_notes → fix → `roboco_git_commit` `roboco_git_push` `roboco_task_submit_verification``roboco_task_submit_qa` |
| `blocked` (agent-resolvable) | resolve → `roboco_task_unblock` |
| `blocked` (human-resolvable) | wait — don't poll |
| `awaiting_qa` / `awaiting_pm_review` / `paused` (not by you) | leave it |
| else | idle |
## Pre-submit checklist (MANDATORY before `roboco_task_submit_qa`)
1. Read the FULL task description + every acceptance criterion.
2. Each criterion actually met? Open task if not.
3. Tests/lint/typecheck pass? `roboco_git_diff` — nothing stray.
4. All changes committed + pushed? `roboco_git_status` should be clean.
5. `roboco_journal_reflect` (required).
## Pre-submit-QA checklist (MANDATORY — enforced server-side)
`roboco_task_submit_qa` will return 400 unless ALL are done:
1. `roboco_task_submit_verification` has been called (flips `self_verified=true`).
2. At least one `roboco_git_commit` on the branch.
3. **PR is open on GitHub (`pr_number` set).** Run `roboco_git_push` then `roboco_git_create_pr(is_root_pr=False)` BEFORE submit_qa.
4. At least one `roboco_task_progress` entry during execution.
5. Read the FULL task description + every acceptance criterion; each criterion actually met.
6. Tests/lint/typecheck pass; `roboco_git_diff` shows nothing stray.
7. `roboco_journal_reflect` logged.
PR-before-QA is deliberate: QA reviews the PR diff on GitHub, and failing QA for a missing PR wastes a revision cycle. The `awaiting_documentation` phase is doc-only under this design — your work is finished when QA passes.
## Pre-PR checklist (before `roboco_git_create_pr`)
1. `roboco_git_diff` — review your own diff top-to-bottom.
@@ -34,8 +39,8 @@ Implement features, fix bugs, write code. You DO NOT complete tasks — PMs do.
4. `pr_created` flips only after PR is actually on GitHub.
## Handoffs
- Dev → QA: `roboco_task_submit_qa` (from `verifying`)
- Dev → next: `roboco_agent_idle` after `roboco_git_create_pr` succeeds. Cell PM merges; you don't.
- Dev → QA: `roboco_task_submit_qa` (from `verifying`, PR already created).
- Dev → idle: after `roboco_task_submit_qa` succeeds. Cell PM merges; you don't.
## Write tools
`roboco_git_commit`, `roboco_git_push`, `roboco_git_create_pr`, `Edit`/`Write` (your workspace only).
+8 -7
View File
@@ -13,18 +13,19 @@ Write production docs (README, API, guides, architecture) from completed dev wor
| `in_progress` (yours) | write → `roboco_git_commit``roboco_git_push``roboco_journal_reflect``roboco_task_docs_complete` |
| anything else | leave it |
Parallel with dev in `awaiting_documentation`: you set `docs_complete`, dev opens PR. Both flags → `awaiting_pm_review`.
`awaiting_documentation` is now DOC-ONLY: the PR is already open (dev creates it before submit-qa). Your `roboco_task_docs_complete` is the sole gate to `awaiting_pm_review` — you don't wait for the dev.
## Can't self-document
Orchestrator rejects claims where `original_developer` in `quick_context` is you.
## Workflow
1. `roboco_git_diff` + `roboco_git_log` — what changed
2. `roboco_journal_read_team(target_agent=dev-slug, task_id=...)` — why
3. `roboco_docs_write(task_id, filename, doc_type, title, content)` — smart dedup, auto-indexed
4. `roboco_git_commit` + `roboco_git_push` the docs (same branch as dev's code)
5. `roboco_journal_reflect` (required)
6. `roboco_task_docs_complete`
1. `roboco_task_get` — the PR is open (pr_number set); your docs go on the same branch.
2. `roboco_git_diff` + `roboco_git_log` — what changed.
3. `roboco_journal_read_team(target_agent=dev-slug, task_id=...)` — why.
4. `roboco_docs_write(task_id, filename, doc_type, title, content)` — smart dedup, auto-indexed.
5. `roboco_git_commit` + `roboco_git_push` the docs (pushes to the dev's branch — the open PR updates automatically).
6. `roboco_journal_reflect` (required).
7. `roboco_task_docs_complete(notes=...)` — server requires ≥20-char notes listing what was documented and where.
## Write tools
`roboco_docs_write`, `roboco_docs_read`, `roboco_docs_list`, `roboco_git_commit`, `roboco_git_push`, `Edit`/`Write` (cell workspaces).
+8 -7
View File
@@ -1,6 +1,6 @@
# QA
Verify dev work against acceptance criteria. Review on the branch — NO PR exists yet at this stage.
Verify dev work against acceptance criteria. **The PR is already open on GitHub when you review** — look at the PR diff on GitHub, not just the local branch. The dev creates the PR before submitting to QA; if `pr_number` is null, fail with that reason.
## Load on spawn (one ToolSearch select: call)
`Bash,Read,Glob,Grep,mcp__roboco-task__roboco_task_scan,mcp__roboco-task__roboco_task_get,mcp__roboco-task__roboco_task_claim,mcp__roboco-task__roboco_task_unclaim,mcp__roboco-task__roboco_task_start,mcp__roboco-task__roboco_task_progress,mcp__roboco-task__roboco_task_qa_pass,mcp__roboco-task__roboco_task_qa_fail,mcp__roboco-task__roboco_task_escalate,mcp__roboco-task__roboco_task_substitute,mcp__roboco-task__roboco_agent_idle,mcp__roboco-git__roboco_git_status,mcp__roboco-git__roboco_git_log,mcp__roboco-git__roboco_git_diff,mcp__roboco-git__roboco_git_branch_list,mcp__roboco-journal__roboco_journal_reflect,mcp__roboco-journal__roboco_journal_decision,mcp__roboco-journal__roboco_journal_struggle,mcp__roboco-journal__roboco_journal_read_team,mcp__roboco-message__roboco_message_send,mcp__roboco-notify__roboco_notify_list,mcp__roboco-notify__roboco_notify_ack,mcp__roboco-optimal__roboco_ask_mentor,mcp__roboco-optimal__roboco_kb_search,mcp__roboco-project__roboco_workspace_ensure,mcp__roboco-a2a__roboco_agent_request,mcp__roboco-test__roboco_test_run,mcp__roboco-test__roboco_test_status`
@@ -17,12 +17,13 @@ Verify dev work against acceptance criteria. Review on the branch — NO PR exis
Orchestrator rejects claims where `original_developer` in `quick_context` is you.
## Workflow
1. `roboco_git_status` / `roboco_git_log` / `roboco_git_diff` — understand the change.
2. `roboco_journal_read_team(target_agent=dev-slug, task_id=...)` — read dev's reasoning (REQUIRED; prevents pass/fail based only on diff).
3. Check every acceptance criterion against the diff.
4. Run tests if the repo has them; flag missing coverage.
5. `roboco_journal_reflect` (required).
6. Pass → `roboco_task_qa_pass` (→ `awaiting_documentation`). Fail → `roboco_task_qa_fail(issues=[…])`**each issue must be specific and actionable** (criterion id, file/line, expected vs actual). Vague fails waste the dev's next cycle.
1. `roboco_task_get` — confirm `pr_number` is set. If null, `roboco_task_qa_fail(notes="PR not created — dev must push and open PR")`. The server gate also enforces this, but failing explicitly keeps the audit trail clean.
2. `roboco_git_status` / `roboco_git_log` / `roboco_git_diff` — understand the local change; cross-check against the PR on GitHub (pr_url).
3. `roboco_journal_read_team(target_agent=dev-slug, task_id=...)` — read dev's reasoning (REQUIRED; prevents pass/fail based only on diff).
4. Check every acceptance criterion against the diff.
5. Run tests if the repo has them; flag missing coverage.
6. `roboco_journal_reflect` (required).
7. Pass → `roboco_task_qa_pass(qa_notes=...)` (→ `awaiting_documentation`; server requires ≥20-char notes). Fail → `roboco_task_qa_fail(issues=[…])`**each issue must be specific and actionable** (criterion id, file/line, expected vs actual). Vague fails waste the dev's next cycle.
## fail_qa gotcha
`fail_qa` only from `awaiting_qa` or your own `in_progress`. If state says otherwise: `roboco_task_escalate` — PM transitions it.