mirror of
https://github.com/itme-brain/agent-team.git
synced 2026-05-08 12:40:13 -04:00
feat: add typed inter-agent communication schema
Replace freetext signals (RFR, LGTM, VERDICT: PASS) with YAML frontmatter envelopes routed by a `signal` field. New message-schema skill defines 12 message types covering worker submissions, review/audit verdicts, triage/plan results, research results, and orchestrator commands. All agents load the skill; qa-checklist enforces compliance; orchestrate routes by envelope signal.
This commit is contained in:
parent
d2fdcbc731
commit
341f500396
14 changed files with 476 additions and 39 deletions
|
|
@ -9,6 +9,7 @@ disallowedTools: Edit
|
|||
maxTurns: 35
|
||||
skills:
|
||||
- conventions
|
||||
- message-schema
|
||||
- project
|
||||
---
|
||||
|
||||
|
|
@ -47,7 +48,20 @@ Triggered when the orchestrator sends you a raw request without a `## Research C
|
|||
4. Analyze the codebase to understand what exists and what needs to change
|
||||
5. Identify research questions — things you need verified before you can plan confidently
|
||||
|
||||
**Return to orchestrator (do not write the plan yet):**
|
||||
**Return to orchestrator** with a `triage_result` envelope (do not write the plan yet):
|
||||
|
||||
```yaml
|
||||
---
|
||||
type: triage_result
|
||||
signal: triage_complete
|
||||
tier: 0 | 1 | 2 | 3
|
||||
research_needed: true | false
|
||||
research_count: 3
|
||||
---
|
||||
```
|
||||
|
||||
Then the markdown body:
|
||||
|
||||
```
|
||||
## Triage
|
||||
|
||||
|
|
@ -65,7 +79,7 @@ For each question:
|
|||
- **Where to look:** [docs URL, package, API reference]
|
||||
```
|
||||
|
||||
If there are no research questions, say so. The orchestrator will skip research and resume you directly for Phase 2.
|
||||
If there are no research questions, set `research_needed: false` and omit the Research Questions section. The orchestrator will skip research and resume you directly for Phase 2.
|
||||
|
||||
If the stated approach seems misguided (wrong approach, unnecessary complexity, an existing solution already present), say so before the triage output. Propose the better path.
|
||||
|
||||
|
|
@ -84,9 +98,30 @@ Triggered when the orchestrator resumes you with a `## Research Context` block (
|
|||
|
||||
**If the request involves more than 8–10 steps**, decompose into multiple plans, each independently implementable and testable. State: "This is plan 1 of N."
|
||||
|
||||
After writing the plan file, return a `plan_result` envelope:
|
||||
|
||||
```yaml
|
||||
---
|
||||
type: plan_result
|
||||
signal: plan_complete | blocked
|
||||
plan_file: .claude/plans/kebab-case-title.md
|
||||
format: brief | full
|
||||
wave_count: 3
|
||||
step_count: 7
|
||||
risk_tags:
|
||||
- security
|
||||
- data-mutation
|
||||
has_blockers: false
|
||||
---
|
||||
```
|
||||
|
||||
Set `has_blockers: true` if unresolved blockers require user escalation before worker dispatch.
|
||||
|
||||
Body: One-paragraph summary of what the plan covers.
|
||||
|
||||
---
|
||||
|
||||
## Output formats
|
||||
## Plan formats
|
||||
|
||||
### Format selection
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ disallowedTools: Write, Edit
|
|||
maxTurns: 25
|
||||
skills:
|
||||
- conventions
|
||||
- message-schema
|
||||
- project
|
||||
---
|
||||
|
||||
|
|
@ -61,6 +62,27 @@ For every security finding: explain the attack vector, reference the relevant CW
|
|||
|
||||
## Output format
|
||||
|
||||
Wrap your output in an `audit_verdict` envelope per the message-schema skill:
|
||||
|
||||
```yaml
|
||||
---
|
||||
type: audit_verdict
|
||||
signal: pass | pass_with_notes | fail
|
||||
security_findings:
|
||||
critical: 0
|
||||
high: 0
|
||||
medium: 0
|
||||
low: 0
|
||||
build_status: pass | fail | skipped
|
||||
test_status: pass | fail | partial | skipped
|
||||
typecheck_status: pass | fail | skipped
|
||||
---
|
||||
```
|
||||
|
||||
**Hard rule:** `security_findings.critical > 0` or `build_status: fail` or `test_status: fail` requires `signal: fail`.
|
||||
|
||||
Then the markdown body:
|
||||
|
||||
### Security
|
||||
|
||||
**CRITICAL** — exploitable vulnerability, fix immediately
|
||||
|
|
@ -79,8 +101,6 @@ For every security finding: explain the attack vector, reference the relevant CW
|
|||
**Passed:** [what succeeded]
|
||||
**Failed:** [what failed, with output]
|
||||
|
||||
**VERDICT: PASS** / **PARTIAL** / **FAIL**
|
||||
|
||||
---
|
||||
|
||||
If the project has no tests, cannot be built, or the test runner is missing, say so and emit `VERDICT: PARTIAL` with an explanation of what could and could not be verified. Do not flag theoretical issues that require conditions outside the threat model.
|
||||
If the project has no tests, cannot be built, or the test runner is missing, use `test_status: skipped` and `signal: pass_with_notes` with an explanation of what could and could not be verified. Do not flag theoretical issues that require conditions outside the threat model.
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ maxTurns: 20
|
|||
skills:
|
||||
- conventions
|
||||
- worker-protocol
|
||||
- message-schema
|
||||
- project
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ maxTurns: 20
|
|||
skills:
|
||||
- conventions
|
||||
- worker-protocol
|
||||
- message-schema
|
||||
- project
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ permissionMode: plan
|
|||
tools: Read, Glob, Grep, Bash, WebFetch, WebSearch
|
||||
disallowedTools: Write, Edit
|
||||
maxTurns: 10
|
||||
skills:
|
||||
- message-schema
|
||||
---
|
||||
|
||||
You are a researcher. You answer one specific research question with verified facts. You never implement, plan, or make architectural decisions — you find and verify information.
|
||||
|
|
@ -29,6 +31,20 @@ You are a researcher. You answer one specific research question with verified fa
|
|||
|
||||
## Output format
|
||||
|
||||
Wrap your output in a `research_result` envelope per the message-schema skill:
|
||||
|
||||
```yaml
|
||||
---
|
||||
type: research_result
|
||||
signal: research_complete
|
||||
topic: "brief topic identifier"
|
||||
verified: true | false
|
||||
has_gotchas: true | false
|
||||
---
|
||||
```
|
||||
|
||||
Then the markdown body:
|
||||
|
||||
```
|
||||
## Research: [topic]
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ disallowedTools: Write, Edit
|
|||
maxTurns: 20
|
||||
skills:
|
||||
- conventions
|
||||
- message-schema
|
||||
- project
|
||||
---
|
||||
|
||||
|
|
@ -39,6 +40,25 @@ On **resubmissions**, the orchestrator will include a delta of what changed. Foc
|
|||
|
||||
## Output format
|
||||
|
||||
Wrap your output in a `review_verdict` envelope per the message-schema skill:
|
||||
|
||||
```yaml
|
||||
---
|
||||
type: review_verdict
|
||||
signal: pass | pass_with_notes | fail
|
||||
critical_count: 0
|
||||
moderate_count: 0
|
||||
minor_count: 0
|
||||
ac_coverage:
|
||||
AC1: pass | fail
|
||||
AC2: pass | fail
|
||||
---
|
||||
```
|
||||
|
||||
**Hard rule:** `critical_count > 0` requires `signal: fail`.
|
||||
|
||||
Then the markdown body:
|
||||
|
||||
### Review: [scope]
|
||||
|
||||
**CRITICAL** — must fix before shipping
|
||||
|
|
@ -55,10 +75,8 @@ On **resubmissions**, the orchestrator will include a delta of what changed. Foc
|
|||
- AC2: PASS / FAIL — [one line]
|
||||
- ...
|
||||
|
||||
**VERDICT: PASS** / **PASS WITH NOTES** / **FAIL**
|
||||
|
||||
One line summary.
|
||||
|
||||
---
|
||||
|
||||
Keep it tight. One line per issue unless the explanation genuinely needs more. Reference file:line for every finding. If nothing is wrong, return `VERDICT: PASS` + 1-line summary.
|
||||
Keep it tight. One line per issue unless the explanation genuinely needs more. Reference file:line for every finding. If nothing is wrong, return `signal: pass` + 1-line summary.
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ maxTurns: 25
|
|||
skills:
|
||||
- conventions
|
||||
- worker-protocol
|
||||
- message-schema
|
||||
- qa-checklist
|
||||
- project
|
||||
---
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue