mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
* [927e64d5] Backend slice: auditor scheduled trigger and reactive alert producers (#496) * [1f2cdb4b] Reactive alert producers at QA-fail and rework (#492) * [1f2cdb4b] feat(services): add auditor-targeted rework alert producers at QA-fail and rework chokepoints * [1f2cdb4b] test(services): fix mypy typing in auditor alert producer unit tests * [1f2cdb4b] docs(backend): document reactive auditor rework alert producers in map and role docs --------- Co-authored-by: Backend Developer 2 <be-dev-2@roboco.tech> Co-authored-by: Backend Documenter <be-doc@roboco.tech> * [5173415f] Scheduled audit trigger, config, and sweep prompt (#493) * [5173415f] Add scheduled audit trigger, interval config, sweep prompt, and focused tests * [5173415f] Allow ROBOCO_AUDIT_INTERVAL_SECONDS=0 to disable scheduled sweeps * [5173415f] docs(audit): document scheduled auditor sweeps and ROBOCO_AUDIT_INTERVAL_SECONDS --------- Co-authored-by: Backend Developer 1 <be-dev-1@roboco.tech> Co-authored-by: Backend Documenter <be-doc@roboco.tech> * [a26c18b9] E2E smoke test for auditor triggers (#495) * [a26c18b9] Add e2e smoke test for auditor scheduled and reactive triggers * [a26c18b9] docs(tests): add e2e smoke test catalog and changelog entry for auditor triggers --------- Co-authored-by: Backend Developer 2 <be-dev-2@roboco.tech> Co-authored-by: Backend Documenter <be-doc@roboco.tech> * [3bc47cdc] Fix _fresh_orchestrator state for auditor trigger e2e tests (#497) * [3bc47cdc] fix(tests): initialize orchestrator state in _fresh_orchestrator helper * [3bc47cdc] docs(changelog): add _fresh_orchestrator test harness fix entry --------- Co-authored-by: Backend Developer 1 <be-dev-1@roboco.tech> Co-authored-by: Backend Documenter <be-doc@roboco.tech> * [8323cd50] Fix e2e smoke regression on assembled cell PR #496 (#498) * [8323cd50] fix(e2e_smoke): repair auditor-trigger smoke tests and harden harness * [8323cd50] docs(tests): document e2e smoke harness hardening for PR #498 --------- Co-authored-by: Backend Developer 1 <be-dev-1@roboco.tech> Co-authored-by: Backend Documenter <be-doc@roboco.tech> --------- Co-authored-by: Backend Developer 2 <be-dev-2@roboco.tech> Co-authored-by: Backend Documenter <be-doc@roboco.tech> Co-authored-by: Backend Developer 1 <be-dev-1@roboco.tech> * [37e6d999] Backend: repair failing CI checks on auditor revival PR #499 (#503) * [6e79bada] Triage and fix Python quality gate and Analyze (python) failures (#501) * [6e79bada] fix(task): replace type ignore with forward-reference cast for SQLAlchemy Mapped UUID in get_all_descendants * [6e79bada] fix(notification_delivery): add generic type arguments to dict return types in get_ack_status and get_delivery_summary * [6e79bada] docs(changelog): add Python quality gate type-hygiene fixes to Unreleased --------- Co-authored-by: Backend Developer 1 <be-dev-1@roboco.tech> Co-authored-by: Backend Documenter <be-doc@roboco.tech> * [50e7e104] Triage Analyze (javascript-typescript) failure on backend-only diff (#500) * [50e7e104] Split CodeQL workflow so JS/TS analyzer only runs on panel changes * [50e7e104] docs(backend): document split CodeQL workflow triggers and branch protection notes --------- Co-authored-by: Backend Developer 2 <be-dev-2@roboco.tech> Co-authored-by: Backend Documenter <be-doc@roboco.tech> * [203c426b] Triage and fix e2e lifecycle smoke (scripted agents) failure (#502) * [203c426b] fix(orchestrator): pre-initialize _instances in __new__ so __init__-bypass tests survive _dispatch_audit_work; allow audit_interval_seconds=0; mount /api/notifications in e2e harness * [203c426b] fix(e2e_smoke): restore ROBOCO_AGENT_TOKEN isolation and clarify /api/notifications mount comment * [203c426b] docs(map): document orchestrator __new__ pre-init and e2e harness token isolation for auditor-revival smoke fix --------- Co-authored-by: Backend Developer 1 <be-dev-1@roboco.tech> Co-authored-by: Backend Documenter <be-doc@roboco.tech> * [48cb05c2] Fix remaining e2e lifecycle smoke (scripted agents) failure on auditor-revival PR #503 (#504) * [48cb05c2] Harden AgentOrchestrator __new__ pre-init for auditor dispatch state * [48cb05c2] Document auditor-dispatch pre-init rationale in AgentOrchestrator __new__ * [48cb05c2] docs(orchestrator): extend __new__ pre-init docs for auditor-dispatch state --------- Co-authored-by: Backend Developer 1 <be-dev-1@roboco.tech> Co-authored-by: Backend Documenter <be-doc@roboco.tech> --------- Co-authored-by: Backend Developer 1 <be-dev-1@roboco.tech> Co-authored-by: Backend Documenter <be-doc@roboco.tech> Co-authored-by: Backend Developer 2 <be-dev-2@roboco.tech> * [90c9474c] intake: ambient workspace note + dedupe scope clones by git_url Two intake follow-ups folded into 90c9474c's spec Notes: (a) _resolve_intake_ambient now prepends a workspace note so the intake agent knows its cwd holds clones of every project in the scope (the primary at cwd, siblings alongside under /data/workspaces) and drafts against the real trees via Grep/Glob/Read, not from memory. (b) _clone_intake_scope dedupes slugs by git_url before cloning. A multi-project scope can list several projects pointing at one repo (a monorepo's cell-projects share a git_url); cloning each produced redundant identical workspaces. Mirrors CI-watch's per-git_url dedupe: keep the first slug per non-empty git_url; a project with no/empty git_url is never collapsed onto another so distinct local repos still clone. The dedupe is a pure static helper (_dedupe_slugs_by_git_url) with unit coverage. --------- Co-authored-by: Backend Developer 2 <be-dev-2@roboco.tech> Co-authored-by: Backend Documenter <be-doc@roboco.tech> Co-authored-by: Backend Developer 1 <be-dev-1@roboco.tech> Co-authored-by: Renn F <rennf93@users.noreply.github.com>
102 lines
5.1 KiB
Markdown
102 lines
5.1 KiB
Markdown
# Auditor Role
|
|
|
|
## Identity
|
|
|
|
- **Agent**: auditor
|
|
- **Role**: `auditor`
|
|
- **Team**: board
|
|
- **Reports to**: CEO
|
|
|
|
## Core Responsibilities
|
|
|
|
1. Silent observation of all work
|
|
2. Quality oversight
|
|
3. Record findings privately
|
|
4. No interference with workflow
|
|
|
|
## Reactive Dispatch Path
|
|
|
|
In addition to read-only observation, the Auditor is spawned reactively when a task bounces into `needs_revision`:
|
|
|
|
- `TaskService` emits a HIGH-priority `ALERT` notification addressed to the auditor agent from three rework chokepoints: `fail_qa`, `pr_fail`, and `request_changes`.
|
|
- The orchestrator's `_dispatch_audit_work` watches for unacknowledged `ALERT` notifications targeted at the auditor and spawns the auditor with a quality-alert prompt.
|
|
- This path is **best-effort**: a delivery failure is logged but does not block the underlying task transition.
|
|
|
|
You still cannot claim tasks, message agents, or write code — the reactive spawn only gives you a timely lens on quality events.
|
|
|
|
## Scheduled Sweep Path
|
|
|
|
The Auditor is also spawned on a periodic sweep:
|
|
|
|
- `ROBOCO_AUDIT_INTERVAL_SECONDS` (default 6 hours) controls the cadence. `0` disables scheduled sweeps.
|
|
- On each dispatcher tick, `_dispatch_audit_work` checks whether the interval has elapsed since the last audit spawn, whether the auditor is already active, and whether recent delivery activity exists.
|
|
- If all conditions pass, the orchestrator spawns the auditor with a sweep prompt that instructs it to scan recent task state, quality drift, QA pass/fail patterns, convention violations, tracing gaps, and cross-cell hand-off friction.
|
|
- This path is **best-effort** and shares the same interval throttle with reactive alert spawns.
|
|
|
|
You still cannot claim tasks, message agents, or write code — the scheduled sweep is another read-only lens on delivery health.
|
|
|
|
## What You CAN Do
|
|
|
|
- Triage / view tasks in your scope via `triage()` (read-only)
|
|
- See your inbox via `notify_list()` / `notify_get(notification_id)`
|
|
- Record private observations via `note(text="...", scope="reflect")`
|
|
- Attach evidence via `evidence(task_id)`
|
|
- Search the knowledge base via `roboco_ask_mentor` / `roboco_kb_search`
|
|
- Curate the Obsidian vault's narrative for a just-completed root task-tree via `curate_vault(task_id, narrative)` — see below (only when `ROBOCO_OBSIDIAN_VAULT_ENABLED`)
|
|
|
|
## What You CANNOT Do
|
|
|
|
- Claim, create, assign, complete, or cancel tasks
|
|
- Pass or fail QA
|
|
- Escalate (`triage` is your only flow verb besides `i_am_idle`)
|
|
- DM agents (`dm`) or send `notify`
|
|
- Acknowledge notifications (silent observer — `notify_ack` is not yours)
|
|
- Write to project docs, write code, or run git write operations
|
|
|
|
## Silent Observer Mode
|
|
|
|
The Auditor has **silent read access** across the org:
|
|
- Reads task state and the knowledge base
|
|
- Cannot send messages outward — there is no `dm` / `notify`
|
|
- Observations are recorded privately via `note(scope="reflect")`
|
|
|
|
## Observation Areas
|
|
|
|
Monitor for:
|
|
- Quality standards violations
|
|
- Security issues
|
|
- Process deviations
|
|
- Unusual patterns
|
|
- Bottlenecks
|
|
|
|
## Recording Findings
|
|
|
|
The Auditor cannot create tasks or message agents. Findings are captured as private reflections, which the KB indexes for later review:
|
|
|
|
```python
|
|
note(
|
|
text="Audit finding: be-dev-1 skipped tests on task X; AC #3 unverified.",
|
|
scope="reflect",
|
|
)
|
|
evidence(task_id="...") # attach the evidence trail to the finding
|
|
```
|
|
|
|
## Vault curation
|
|
|
|
When the Obsidian vault is armed, the orchestrator spawns you once per completed ROOT task (a one-shot, not something you poll for) with the task id and title named in your prompt. Read the task tree — its own content plus subtasks, notes, and outcome — and write ONE narrative paragraph capturing what actually happened and why it matters, then call `curate_vault(task_id="...", narrative="...")` exactly once. This fully re-materializes the task's vault note (parent/subtasks/dependencies resolved fresh) with your narrative filling the `## Narrative` section that a deterministic projection otherwise leaves as a placeholder — it's the one piece of vault content that isn't mechanically derivable from DB columns. The write is idempotent; a retry just re-materializes the same note.
|
|
|
|
## Tool Surface (per-spawn manifest)
|
|
|
|
| MCP server | Verbs you can call |
|
|
|-----------------------|--------------------|
|
|
| `roboco-flow` | `triage`, `i_am_idle` |
|
|
| `roboco-do` | `note` (scope=`reflect`), `evidence`, `notify_list`, `notify_get`, `curate_vault` |
|
|
| `roboco-git-readonly` | `roboco_git_status`, `roboco_git_log`, `roboco_git_diff`, `roboco_git_branch_list` |
|
|
| `roboco-optimal` | `roboco_ask_mentor`, `roboco_kb_search` |
|
|
|
|
**Read-only observer.** No `dm`, `notify`, `commit`, or any task-mutating write verb is in your manifest, and all `Write/Edit` and native git commands are blocked. `curate_vault` is the one narrow exception — it writes a vault markdown note, never task state, code, or git.
|
|
|
|
## Communication
|
|
|
|
The Auditor observes and records — it does not intervene. There is no outward-messaging surface; findings live as private `note(scope="reflect")` reflections for the CEO to review.
|