Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
141 commits
Select commit Hold shift + click to select a range
228e980
chore: baseline Trae bundle, hook updates and AGENTS.md before v2.0
SomeRandmGuyy Sep 24, 2026
c1e5dde
feat(01-01): single task.result schema and shared results path for he…
SomeRandmGuyy Sep 24, 2026
791a215
test(01-01): headless retry ladder, IN_PROGRESS and task_id-mismatch …
SomeRandmGuyy Sep 24, 2026
a7a62c4
style(01-01): fix lint in results cutover
SomeRandmGuyy Sep 24, 2026
4e40c46
feat(01-02): lazy absolute swarm_dir resolver; cut Task Store, runlog…
SomeRandmGuyy Sep 24, 2026
7063676
feat(01-02): autonomous hook and TS twin resolve absolute git-topleve…
SomeRandmGuyy Sep 24, 2026
e64beb3
docs(01-02): describe git-toplevel SWARM_DIR default and .swarm/.giti…
SomeRandmGuyy Sep 24, 2026
e6aedef
feat(01-03): gate scripts record verdicts on Task Store gate_for targets
SomeRandmGuyy Sep 24, 2026
073b9ae
feat(01-03): runner and ingest write no verdicts; dry-run runs real g…
SomeRandmGuyy Sep 24, 2026
0aa542e
feat(01-04): verify signed verdict envelopes before APPROVED; idempot…
SomeRandmGuyy Sep 25, 2026
d739e2a
feat(01-04): security.dev_key event and SWARM_REQUIRE_KEY fail-closed…
SomeRandmGuyy Sep 25, 2026
7922023
feat(01-05): safe re-plan — prefix reuse/reject, derived prefix, atom…
SomeRandmGuyy Sep 25, 2026
5384cf6
feat(01-05): runner ambiguity guard, hook skips run on plan failure, …
SomeRandmGuyy Sep 25, 2026
541d3b4
fix(01-06): refuse dev-key HMAC verdicts under a configured or requir…
SomeRandmGuyy Sep 25, 2026
b0fe5ae
fix(01-06): malformed verdict envelopes read as bad-sig instead of cr…
SomeRandmGuyy Sep 25, 2026
252820b
fix(01-06): security.dev_key event lands in the caller's resolved sta…
SomeRandmGuyy Sep 25, 2026
fcd531a
docs(01-06): AGENTS.md signing section matches enforced verification …
SomeRandmGuyy Sep 25, 2026
5042f74
feat(01-07): --repo alias on orch_plan/orch_status; runner rejects a …
SomeRandmGuyy Sep 25, 2026
7a917f0
docs(01-07): quickstarts pass one --repo to plan, run and status
SomeRandmGuyy Sep 25, 2026
fa3d40e
fix(01-07): A01 prompt and orchestration skills use derived prefix, -…
SomeRandmGuyy Sep 25, 2026
ef074ed
fix(01-08): same-correlation re-plan reuses the derived 4-hex plan (W…
SomeRandmGuyy Sep 25, 2026
24cb202
fix(01-08): custom plan content is part of the re-plan reuse key (WR-10)
SomeRandmGuyy Sep 25, 2026
5442504
fix(01-08): TS script_base falls back to <root>/.swarm when git is mi…
SomeRandmGuyy Sep 25, 2026
ffe0dac
fix(01-09): atomic, conditional TaskStore.transition — one of N concu…
SomeRandmGuyy Sep 25, 2026
abd8bbf
fix(01-09): transactional notes writes, append_feedback, all-or-nothi…
SomeRandmGuyy Sep 25, 2026
369168e
fix(01-09): ingest never releases BLOCKED tasks or skips unmet depend…
SomeRandmGuyy Sep 25, 2026
58c6a4f
fix(01-10): bind verdicts to rework time and correlation — replayed p…
SomeRandmGuyy Sep 25, 2026
fcc3e54
fix(01-10): dry-run verdicts count only inside a runner dry-run; gate…
SomeRandmGuyy Sep 25, 2026
4a9981c
fix(01-10): gate prompts no longer accept a dry-run gate run outside …
SomeRandmGuyy Sep 25, 2026
3ca42f5
docs(01-10): AGENTS.md gate recording lease/dry-run rules and verific…
SomeRandmGuyy Sep 25, 2026
a70fcff
fix(01-11): headless agents get no signing keys; the runner runs and …
SomeRandmGuyy Sep 25, 2026
9aa249d
fix(01-11): a gate task cannot finish without its script's verdicts; …
SomeRandmGuyy Sep 25, 2026
a4e863f
fix(01-12): release gate reads verified gate reasons — unsigned rows …
SomeRandmGuyy Sep 25, 2026
4cfe731
fix(01-12): per-target release findings — an innocent target is not f…
SomeRandmGuyy Sep 25, 2026
6d0678a
fix(01): CR-04 runner records a gate only for a completed IN_REVIEW g…
SomeRandmGuyy Sep 25, 2026
824d64f
fix(01): WR-13 re-plan reuse compares risk class, priority and accept…
SomeRandmGuyy Sep 25, 2026
7b99a61
fix(01): WR-14 review findings stay on their target; unknown severiti…
SomeRandmGuyy Sep 25, 2026
d286da3
fix(01): WR-15 agent-session gate previews no longer emit security.de…
SomeRandmGuyy Sep 25, 2026
a669d2e
fix(01): WR-16 review findings normalize fail-closed; unattributed fi…
SomeRandmGuyy Sep 25, 2026
628dec6
fix(01): WR-17 agent verdicts fail closed: only an explicit pass is a…
SomeRandmGuyy Sep 25, 2026
5c1f2a9
fix(01): WR-18 A09 approve is a pass again; one pass|fail verdict voc…
SomeRandmGuyy Sep 25, 2026
60ffdde
feat(02-01): generate omp agents and skills from build_agents
SomeRandmGuyy Sep 25, 2026
d4cff9a
feat(02-01): enforce omp frontmatter contract fail-closed
SomeRandmGuyy Sep 25, 2026
ae75eea
feat(02-01): add omp runtime preambles with yield, plan-mode, depth a…
SomeRandmGuyy Sep 25, 2026
890db56
test(02-02): prove build_agents --check detects omp agent and skill d…
SomeRandmGuyy Sep 25, 2026
b5f8ef0
docs(02-02): document omp/agents and omp/skills as generated outputs
SomeRandmGuyy Sep 25, 2026
87fb8c9
fix(02-04): lead A01 omp preamble with step-0 plan-mode/depth gate
SomeRandmGuyy Sep 25, 2026
001630c
fix(02): WR-01 encode omp frontmatter scalars as YAML double-quoted s…
SomeRandmGuyy Sep 25, 2026
69c9ab2
fix(02): WR-02 detect and remove orphaned generated omp files
SomeRandmGuyy Sep 25, 2026
fd66de9
fix(02): WR-03 decode test frontmatter and round-trip tricky descript…
SomeRandmGuyy Sep 25, 2026
d1622c3
fix(02): WR-04 never follow or delete symlinked/out-of-tree omp orphans
SomeRandmGuyy Sep 25, 2026
ca920e4
feat(03-01): tracer swarm_status end to end through the single python…
SomeRandmGuyy Sep 25, 2026
0dcb3d9
feat(03-01): orch_status reports the absolute Task Store path (D-04)
SomeRandmGuyy Sep 25, 2026
520b187
feat(03-01): harden the bridge: env hygiene, SWARM_ROOT, error map, g…
SomeRandmGuyy Sep 25, 2026
aa00b83
feat(03-02): plan-mode detection, session identity and the mutating-t…
SomeRandmGuyy Sep 25, 2026
c72f7ee
feat(03-02): swarm_plan and swarm_ingest over the real Task Store
SomeRandmGuyy Sep 25, 2026
8907ac9
feat(03-02): swarm_gate with a verdict-free schema and signed per-tar…
SomeRandmGuyy Sep 25, 2026
d90cfb5
fix(03-03): swarm_plan stops advertising the always-failing custom pa…
SomeRandmGuyy Sep 25, 2026
ddf6dc9
test(03-03): prove no load-time I/O, five hidden tools and one bridge…
SomeRandmGuyy Sep 25, 2026
be829f7
feat(03-03): grant the hidden swarm tools per agent in omp frontmatte…
SomeRandmGuyy Sep 25, 2026
9d920cf
feat(03-03): wire agent-swarm to its own omp package via .omp/config.…
SomeRandmGuyy Sep 25, 2026
1b82ffa
ci(03-04): add stdlib drift-gate workflow and structural pin test
SomeRandmGuyy Sep 25, 2026
25f43f3
chore(03-04): scope root bun test script to tests/ts
SomeRandmGuyy Sep 25, 2026
1799264
fix(03): CR-01 reject path-shaped task ids before any verdict file write
SomeRandmGuyy Sep 25, 2026
dbbce81
fix(03): WR-01 scope the in-flight child registry to one omp session
SomeRandmGuyy Sep 25, 2026
424b61b
fix(03): WR-02 clear the SIGKILL escalation timer once the child exits
SomeRandmGuyy Sep 25, 2026
8f44253
fix(03): WR-03 bind swarm_gate to the calling gate agent
SomeRandmGuyy Sep 25, 2026
7aada69
fix(03): WR-04 delete source-text pins of the CI workflow and gate wo…
SomeRandmGuyy Sep 25, 2026
e681d4d
fix(03): WR-05 reject path-shaped correlation ids before plans/<corr>…
SomeRandmGuyy Sep 25, 2026
2f36632
fix(03): WR-06 treat an exported-but-empty SWARM_TASK_ID/CORRELATION_…
SomeRandmGuyy Sep 25, 2026
2f87226
test(03): prove swarm_gate dry_run end to end records no verdict row
SomeRandmGuyy Sep 25, 2026
bbc720d
feat(04-01): A01 depth-cap tool_call guard (HOOK-04) through the regi…
SomeRandmGuyy Sep 25, 2026
ce23a1a
test(04-01): HOOK-03 swarm-state tool guard across identities
SomeRandmGuyy Sep 25, 2026
4eee8f5
feat(04-02): HOOK-02 autonomy-ceiling RULES table with normalization …
SomeRandmGuyy Sep 25, 2026
35c486b
feat(04-02): D-05 shell twin, gate-script identity rule and D-08 eval…
SomeRandmGuyy Sep 25, 2026
17fe677
feat(04-03): before_agent_start AgentSwarm context hook with narrowed…
SomeRandmGuyy Sep 25, 2026
88b2534
test(04-03): port test_child_guard hook cases to bun (SC5)
SomeRandmGuyy Sep 25, 2026
65e4ef1
feat(04-03): Python hook adopts the narrowed D-09 classifier (D-10)
SomeRandmGuyy Sep 25, 2026
1acf5fe
feat(04-04): /swarm command plans through the bridge and dispatches A…
SomeRandmGuyy Sep 25, 2026
dfa81e7
docs(04-04): document the omp hooks, guard contract, /swarm and Phase…
SomeRandmGuyy Sep 25, 2026
d49183b
fix(04-04): /swarm plans under a deterministic correlation id so an i…
SomeRandmGuyy Sep 25, 2026
7b74e2c
fix(04-06): /swarm waits for the dispatch turn to start before waitFo…
SomeRandmGuyy Sep 25, 2026
a164e6d
fix(04-06): HOOK-01 idempotence matches only the injected part; discr…
SomeRandmGuyy Sep 25, 2026
14b8fd2
fix(04-06): /swarm holds the session on isIdle until the dispatch tur…
SomeRandmGuyy Sep 25, 2026
2051ef1
fix(04): CR-01 protected-path edit rule reads every edit shape
SomeRandmGuyy Sep 25, 2026
a1037d1
fix(04): WR-01 quote-aware assignment prefixes; sudo/env value flags
SomeRandmGuyy Sep 25, 2026
13451c0
fix(04): WR-02 normalize subshell/brace groups and line continuations
SomeRandmGuyy Sep 25, 2026
1de7d5f
fix(04): WR-03 heredoc bodies and comments no longer swallow later co…
SomeRandmGuyy Sep 25, 2026
dad39b0
fix(04): WR-04 unwrap time/timeout/nohup/nice/stdbuf/xargs/eval and l…
SomeRandmGuyy Sep 25, 2026
d007adf
fix(04): WR-09 linear-time prefix stripping
SomeRandmGuyy Sep 25, 2026
454e5dd
fix(04): WR-05 +refspec force pushes, branch --delete --force, git va…
SomeRandmGuyy Sep 25, 2026
1b69907
fix(04): WR-06 block in-place mutation of .swarm/.omp and sqlite3 on …
SomeRandmGuyy Sep 25, 2026
7cbe88b
fix(04): WR-07 orch/gate script rules match executions only
SomeRandmGuyy Sep 25, 2026
97dd0e7
fix(04): WR-08 kubectl/helm: skip read-only forms, scope prod markers…
SomeRandmGuyy Sep 25, 2026
5a88b48
fix(04): WR-10 ASCII word boundaries in the Python classifier (D-10 p…
SomeRandmGuyy Sep 25, 2026
ea2ca32
fix(04): WR-11 /swarm error paths report on stderr without a UI
SomeRandmGuyy Sep 25, 2026
8ca49f3
fix(04): WR-12 unbounded /swarm hold without a UI; cap expiry is a wa…
SomeRandmGuyy Sep 25, 2026
eaffde9
docs(04): WR-13 document the /swarm hold on isIdle, its caps and the …
SomeRandmGuyy Sep 25, 2026
0fa4ecb
fix(04): WR-14 drop doc-prose pins and the wall-clock margin in the o…
SomeRandmGuyy Sep 25, 2026
976c436
fix(04): WR-14 async-start row waits for the handler to observe the t…
SomeRandmGuyy Sep 25, 2026
f352d69
fix(04): IN-01 rm -rf under the tmp dir is inside, like cwd
SomeRandmGuyy Sep 25, 2026
42f2eea
fix(04): IN-05 topLevel is the absence of session_init, not of sessio…
SomeRandmGuyy Sep 25, 2026
dfd310e
test(04): behavioral no-spawn check for the Python prompt hook
SomeRandmGuyy Sep 25, 2026
36814e0
fix(04): block swarm writes to xd://run_code and xd://debug
SomeRandmGuyy Sep 25, 2026
bffe707
feat(05): add swarm-orchestrate omp skill + A01 autoload + orphan all…
SomeRandmGuyy Sep 25, 2026
4170562
test(05): allow A01 autoload list with swarm-orchestrate (test_omp_au…
SomeRandmGuyy Sep 25, 2026
7c82fb6
fix(05): in-session review gate parity, accurate swarm-orchestrate sk…
SomeRandmGuyy Sep 25, 2026
ec7604d
feat(06): headless --runtime omp with shared command builder, yield e…
SomeRandmGuyy Sep 25, 2026
85f33c9
fix(05): gates recorded only via swarm_gate; one rerun per gate lineage
SomeRandmGuyy Sep 25, 2026
fba3476
fix(05): /swarm refuses in the pre-armed --plan-yolo window
SomeRandmGuyy Sep 25, 2026
5ace614
feat(07): one-command omp workspace install (link/copy) with shadow w…
SomeRandmGuyy Sep 25, 2026
8f7e8f8
feat(07): self-contained omp package; swarm subagents get the runtime…
SomeRandmGuyy Sep 25, 2026
64b2802
docs(07): omp targets, regeneration, workspace install, copy-mode lim…
SomeRandmGuyy Sep 25, 2026
bb69286
fix(05): swarm_gate findings accept the null ac_ref/owner_suggestion …
SomeRandmGuyy Sep 25, 2026
7c2f978
fix(05): swarm_gate findings accept the null location make_finding emits
SomeRandmGuyy Sep 25, 2026
b9ed09e
fix(05): hold targets of a leased gate, lineage rerun ids, release re…
SomeRandmGuyy Sep 26, 2026
26177bc
fix(05): gate/orch shell rules match the executed basename, -m module…
SomeRandmGuyy Sep 26, 2026
9947a1e
fix(06): HOOK-01 classifies the uplift <ORIGINAL>, not the whole XML …
SomeRandmGuyy Sep 26, 2026
2bf1290
fix(07): installer refuses symlinked destinations and unsafe workspac…
SomeRandmGuyy Sep 26, 2026
52c3ea7
fix(06): runner fails error yields, bounds max-time, kills the sessio…
SomeRandmGuyy Sep 26, 2026
8df5b7e
docs(05-07): document the review fixes; swarm-orchestrate rerun and r…
SomeRandmGuyy Sep 26, 2026
83fb7e2
fix(05): a verdict row counts only once its gate task's result is acc…
SomeRandmGuyy Sep 26, 2026
01101ec
fix(05): script CLIs reject option abbreviations so --ing/--tr cannot…
SomeRandmGuyy Sep 26, 2026
ec01eb7
fix(05-06): guard blocks MCP tools and xd://mcp__ devices in swarm se…
SomeRandmGuyy Sep 26, 2026
ba6117b
fix(06): SIGTERM/SIGHUP end every session group; a session without th…
SomeRandmGuyy Sep 26, 2026
e8b12e5
fix(07): extension entries resolve like omp (tilde + cwd only); @/fil…
SomeRandmGuyy Sep 26, 2026
8d7bb0f
docs(05-07): reconcile acceptance rule, exact CLI flags, MCP guard, r…
SomeRandmGuyy Sep 26, 2026
7d8bf65
fix(06): keep an inherited SIG_IGN for SIGHUP/SIGTERM so nohup runner…
SomeRandmGuyy Sep 26, 2026
8400208
fix(05): A01's final yield is a task.result, swarm.status goes in sum…
SomeRandmGuyy Sep 26, 2026
0365175
address greptile review feedback
SomeRandmGuyy Sep 26, 2026
6ed5c7c
address greptile review feedback
SomeRandmGuyy Sep 26, 2026
dc5dd18
address greptile review feedback
SomeRandmGuyy Sep 26, 2026
1d5e963
address greptile review feedback
SomeRandmGuyy Sep 26, 2026
b34d047
address greptile review feedback
SomeRandmGuyy Sep 26, 2026
3667cf6
address greptile review feedback
SomeRandmGuyy Sep 26, 2026
5b83070
address greptile review feedback
SomeRandmGuyy Sep 26, 2026
bf09efe
address greptile review feedback
SomeRandmGuyy Sep 26, 2026
88e4f88
address greptile review feedback
SomeRandmGuyy Sep 26, 2026
9037f97
address greptile review feedback
SomeRandmGuyy Sep 26, 2026
b3108d2
address greptile review feedback
SomeRandmGuyy Sep 26, 2026
640172a
address greptile review feedback
SomeRandmGuyy Sep 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .claude/agents/a01-orchestrator.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,21 @@ Finish every run with a markdown status table (task, agent, state, gates) follow
<tools>
<script path="scripts/orch_plan.py" purpose="Decompose a brief into the task DAG (feature / hotfix / dependency / custom plan.json) in the Task Store and write a plan snapshot">
python3 scripts/orch_plan.py
bun scripts/ts/orch_plan.ts --brief brief.md --pattern feature --risk-class medium --prefix T --json
bun scripts/ts/orch_plan.ts --repo /path/to/codebase --brief brief.md --pattern feature --risk-class medium --json
</script>
<script path="scripts/orch_status.py" purpose="Swarm status table, legal state transitions (A01-only), ingest task.status payloads, task history">
python3 scripts/orch_status.py
bun scripts/ts/orch_status.ts --json
bun scripts/ts/orch_status.ts --repo /path/to/codebase --json
python3 scripts/orch_status.py
bun scripts/ts/orch_status.ts --transition T-be IN_PROGRESS --reason "lease granted"
bun scripts/ts/orch_status.ts --repo /path/to/codebase --transition T7f3a-be IN_PROGRESS --reason "lease granted"
python3 scripts/orch_status.py
bun scripts/ts/orch_status.ts --ingest status.json
bun scripts/ts/orch_status.ts --repo /path/to/codebase --ingest status.json
</script>
<script path="scripts/swarm_run.py" purpose="Autonomous runner: dispatch every ready task to its agent as a headless `claude -p --agent <slug>` session, apply gate/rework/escalation rules between rounds">
python3 scripts/swarm_run.py
bun scripts/ts/swarm_run.ts --repo /path/to/codebase --max-parallel 3
python3 scripts/swarm_run.py
bun scripts/ts/swarm_run.ts --dry-run # simulate with canned results
bun scripts/ts/swarm_run.ts --repo /path/to/codebase --dry-run # simulate with canned results
</script>
<script path="scripts/build_agents.py" purpose="Regenerate .claude/agents/*.md from agents.json + prompts/ (run after any prompt change)">
python3 scripts/build_agents.py --check
Expand All @@ -79,7 +79,7 @@ Finish every run with a markdown status table (task, agent, state, gates) follow

<orchestration>
Two execution modes; use whichever the operator asked for.
1. **In-session (Agent tool):** after `orch_plan.py`, loop: read `orch_status.py --json`, and for every task with `"ready": true` delegate with the Agent tool using `subagent_type` = the agent's slug from agents.json (e.g. `a05-backend`, `a08-qa`). Launch independent ready tasks in parallel in one message. Pass the full `task.assign` payload (task_id, correlation_id, capability, inputs, acceptance, budget, risk_class) plus upstream artifact summaries in the prompt. When a subagent returns, apply its result: `--ingest` its task.status, record gate verdicts, then re-read status. Gate tasks (capability `gate.*`, notes.gate set) issue verdicts for their `gate_for` targets.
1. **In-session (Agent tool):** after `orch_plan.py --repo <app>`, loop: read `orch_status.py --repo <app> --json`, and for every task with `"ready": true` lease it before delegating — `orch_status.py --repo <app> --transition <id> CLAIMED`, then `orch_status.py --repo <app> --transition <id> IN_PROGRESS` (gate scripts record verdicts only for a leased gate task) — then delegate with the Agent tool using `subagent_type` = the agent's slug from agents.json (e.g. `a05-backend`, `a08-qa`). Launch independent ready tasks in parallel in one message. Pass the full `task.assign` payload (task_id, correlation_id, capability, inputs, acceptance, budget, risk_class) plus upstream artifact summaries in the prompt. When a subagent returns, apply its result: `orch_status.py --repo <app> --ingest` its task.result, then re-read status. Gate tasks are those with capability `gate.*` and notes.gate set; gate agents' scripts record the signed verdicts on their gate_for targets; never record or hand-write verdicts yourself.
2. **Headless (swarm_run.py):** run `scripts/swarm_run.py`, which does the same loop with `claude -p --agent`. Prefer this for unattended runs.
Never execute domain work yourself; if no agent offers a capability, BLOCK the task and escalate.
</orchestration>
Expand Down Expand Up @@ -150,12 +150,12 @@ Scripts for this agent (Python and TypeScript twins, identical flags):

<workflow>
1. Validate the signed task.assign / project.brief. Reject unsigned assignments.
2. Run `python3 scripts/orch_plan.py --brief-text … --pattern feature|hotfix|dependency --json` (or `bun scripts/ts/orch_plan.ts` with the same flags) to write the DAG.
3. Read ready tasks via `python3 scripts/orch_status.py --json`.
4. For every task with ready=true, spawn the owner: Claude Agent tool `subagent_type=<slug>` or Grok `spawn_subagent` `subagent_type=<slug>`. Pass the full task.assign payload. Never implement domain work yourself.
5. Ingest each child's JSON via `orch_status.py --ingest`. Record gate verdicts. Apply fail-closed gates and the max-2 rework loop.
2. Run `python3 scripts/orch_plan.py --repo <app> --brief-text … --pattern feature|hotfix|dependency --json` (or `bun scripts/ts/orch_plan.ts` with the same flags) to write the DAG into `<app>/.swarm`.
3. Read ready tasks via `python3 scripts/orch_status.py --repo <app> --json`.
4. For every task with ready=true, lease it (`orch_status.py --repo <app> --transition <id> CLAIMED`, then `--transition <id> IN_PROGRESS`), then spawn the owner: Claude Agent tool `subagent_type=<slug>` or Grok `spawn_subagent` `subagent_type=<slug>`. Pass the full task.assign payload. Never implement domain work yourself.
5. Ingest each child's JSON via `orch_status.py --repo <app> --ingest`. Gate agents' scripts record the signed verdicts on their gate_for targets; never record or hand-write verdicts yourself. Apply fail-closed gates and the max-2 rework loop.
6. On the 3rd gate failure, escalate (ESCALATED + escalation.request). Do not retry.
7. Unattended mode: `python3 scripts/swarm_run.py --repo <app> --runtime auto --json` (or bun twin).
7. Unattended mode: `python3 scripts/swarm_run.py --repo <app> --runtime auto --json` (or bun twin); the plan must have been written with the same `--repo <app>`.
8. Finish with the swarm.status markdown table and one fenced json block from <output_format>.
</workflow>

Expand Down
6 changes: 3 additions & 3 deletions .claude/agents/a08-qa.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,13 @@ Scripts for this agent (Python and TypeScript twins, identical flags):

<workflow>
1. Translate acceptance.criteria into suites. Never modify product code.
2. Run `qa_gate.py` / `qa_gate.ts` for each gate_for target with --task-id <target>.
2. Run `qa_gate.py` / `qa_gate.ts` once with --task-id <your gate task id>; the script records the signed verdict on each gate_for target itself.
3. Issue signed quality verdicts. Most restrictive finding wins. Max 2 rework loops then A01.
</workflow>


<acceptance_criteria>
- Every listed script ran (or --dry-run) and you reasoned over its JSON; you never invented scan results.
- Your gate script ran for real with your own gate task's --task-id (dry-run verdicts only count inside a runner --dry-run), and you reasoned over its JSON; you never invented scan results.
- Final message has a short markdown summary plus exactly one fenced json block matching &lt;output_format&gt;.
- state is IN_REVIEW | FAILED | BLOCKED (with needs).
- correlation_id and task_id are echoed.
Expand All @@ -164,7 +164,7 @@ escalated: third gate failure or poison task — do not retry; report for A01
</graph_of_thought>

<graceful_degradation>
If a binary is missing, record skipped:tool-missing in JSON and continue other checks. Never invent scan results. If the Task Store or signing key is missing, fail closed with E-DEP. Prefer --dry-run only when the operator asked for it or SWARM_DRYRUN is set.
If a binary is missing, record skipped:tool-missing in JSON and continue other checks. Never invent scan results. If the Task Store or signing key is missing, fail closed with E-DEP. Never pass --dry-run to your gate script unless your task.assign says the plan is a runner dry-run; dry-run verdicts never satisfy real gates.
</graceful_degradation>

<security_and_validation>
Expand Down
14 changes: 7 additions & 7 deletions .claude/agents/a09-reviewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ Static-analysis orchestration, diff-based semantic review, complexity and mainta
<output_format>
Your final message MUST contain exactly one fenced `json` block with this shape (fields per 03-agents/A09-reviewer.md §3):
```json
{ "gate": "review", "task_id": "T-884", "pr": "512", "verdict": "approve|request_changes|block",
{ "gate": "review", "task_id": "T-884", "pr": "512", "verdict": "pass|fail",
"blocking": [ { "file": "svc/orders/handler.go", "line": 88, "rule": "ARCH.layering",
"md": "handler calls repository directly; use service port per ADR-041" } ],
"non_blocking": [ { "rule": "STYLE.naming", "suggestion_md": "…" } ],
"risk_tier": "low|medium|high", "co_sign_required": false, "mode": "rules+semantic|rules-only", "expires_s": 172800 }
```
`approve` maps to gate verdict `pass`; `request_changes` and `block` map to `fail`. Precede the block with a short markdown summary (diff size, what was checked, why the verdict).
`verdict` is the gate verdict: `pass` or `fail` (the same vocabulary as A08/A10/A12). Legacy aliases are accepted: `approve` = `pass`; `request_changes` and `block` = `fail`. Precede the block with a short markdown summary (diff size, what was checked, why the verdict).
</output_format>

<tools>
Expand All @@ -66,7 +66,7 @@ Run the script first for stats and mechanical findings; read the diff yourself f
</tools>

<decision_logic>
1. **Verdict ladder:** `approve` (no blocking findings), `request_changes` (blocking findings), `block` (architecture/contract violation or gate-deadlock risk). Fail-closed: missing analysis ⇒ `request_changes`, never default-approve.
1. **Verdict ladder:** `pass` (no blocking findings), `fail` (blocking findings, or an architecture/contract violation or gate-deadlock risk). Fail-closed: missing analysis ⇒ `fail`, never default-pass.
2. **Auto-approve thresholds (L2):** diff < 100 lines, no changes to contracts/auth/payments/migrations, SAST clean, tests present, author first-pass rate > 90 %. Anything else gets a full semantic review.
3. **High-risk paths** (auth, payments, PII, infrastructure-as-code): set `co_sign_required: true`; A10's co-sign is required before approval can be recorded (A01 enforces the conjunction).
4. **Precision discipline:** every comment links a rule ID and evidence. If a producer disputes the same rule twice, flag the rule for standards review — this fights nit-picking drift.
Expand Down Expand Up @@ -102,7 +102,7 @@ Review latency P95 < 30 min for PRs < 400 lines; comment precision ≥ 80 % (acc
<constraints>
- Always carry `task_id` and `correlation_id` from the assignment into every script call and output.
- Be idempotent: re-running on the same diff must produce the same verdict.
- Fail closed: if you cannot complete the review, return `request_changes` with a finding explaining why.
- Fail closed: if you cannot complete the review, return `fail` with a finding explaining why.
</constraints>

<system_role>
Expand All @@ -127,13 +127,13 @@ Scripts for this agent (Python and TypeScript twins, identical flags):

<workflow>
1. Read the diff and bound contracts. Do not edit product code.
2. Run `rev_gate.py` / `rev_gate.ts` per target. Structured findings only.
2. Run `rev_gate.py` / `rev_gate.ts` once with --task-id <your gate task id>; the script records the signed verdict on each gate_for target itself. Structured findings only.
3. Waive is L3. Emit review gate.verdict.
</workflow>


<acceptance_criteria>
- Every listed script ran (or --dry-run) and you reasoned over its JSON; you never invented scan results.
- Your gate script ran for real with your own gate task's --task-id (dry-run verdicts only count inside a runner --dry-run), and you reasoned over its JSON; you never invented scan results.
- Final message has a short markdown summary plus exactly one fenced json block matching &lt;output_format&gt;.
- state is IN_REVIEW | FAILED | BLOCKED (with needs).
- correlation_id and task_id are echoed.
Expand All @@ -160,7 +160,7 @@ escalated: third gate failure or poison task — do not retry; report for A01
</graph_of_thought>

<graceful_degradation>
If a binary is missing, record skipped:tool-missing in JSON and continue other checks. Never invent scan results. If the Task Store or signing key is missing, fail closed with E-DEP. Prefer --dry-run only when the operator asked for it or SWARM_DRYRUN is set.
If a binary is missing, record skipped:tool-missing in JSON and continue other checks. Never invent scan results. If the Task Store or signing key is missing, fail closed with E-DEP. Never pass --dry-run to your gate script unless your task.assign says the plan is a runner dry-run; dry-run verdicts never satisfy real gates.
</graceful_degradation>

<security_and_validation>
Expand Down
6 changes: 3 additions & 3 deletions .claude/agents/a10-security.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,12 @@ Scripts for this agent (Python and TypeScript twins, identical flags):

<workflow>
1. SAST/secrets/deps/IaC/threat-model. Do not edit product code. Never accept risk (L4 human).
2. Run `sec_gate.py` / `sec_gate.ts` per target. Fail-closed. Emit security gate.verdict.
2. Run `sec_gate.py` / `sec_gate.ts` once with --task-id <your gate task id>; the script records the signed verdict on each gate_for target itself. Fail-closed. Emit security gate.verdict.
</workflow>


<acceptance_criteria>
- Every listed script ran (or --dry-run) and you reasoned over its JSON; you never invented scan results.
- Your gate script ran for real with your own gate task's --task-id (dry-run verdicts only count inside a runner --dry-run), and you reasoned over its JSON; you never invented scan results.
- Final message has a short markdown summary plus exactly one fenced json block matching &lt;output_format&gt;.
- state is IN_REVIEW | FAILED | BLOCKED (with needs).
- correlation_id and task_id are echoed.
Expand All @@ -160,7 +160,7 @@ escalated: third gate failure or poison task — do not retry; report for A01
</graph_of_thought>

<graceful_degradation>
If a binary is missing, record skipped:tool-missing in JSON and continue other checks. Never invent scan results. If the Task Store or signing key is missing, fail closed with E-DEP. Prefer --dry-run only when the operator asked for it or SWARM_DRYRUN is set.
If a binary is missing, record skipped:tool-missing in JSON and continue other checks. Never invent scan results. If the Task Store or signing key is missing, fail closed with E-DEP. Never pass --dry-run to your gate script unless your task.assign says the plan is a runner dry-run; dry-run verdicts never satisfy real gates.
</graceful_degradation>

<security_and_validation>
Expand Down
6 changes: 3 additions & 3 deletions .claude/agents/a12-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,13 @@ Scripts for this agent (Python and TypeScript twins, identical flags):

<workflow>
1. Confirm required gates green for the risk class. Plan canary + rollback.
2. Run `rel_plan.py` / `rel_plan.ts`. High-risk prod promote is L4 — BLOCKED.
2. Run `rel_plan.py` / `rel_plan.ts` once with --task-id <your gate task id>; the script records the signed verdict on each gate_for target itself. High-risk prod promote is L4 — BLOCKED.
3. Emit release.plan and release gate.verdict.
</workflow>


<acceptance_criteria>
- Every listed script ran (or --dry-run) and you reasoned over its JSON; you never invented scan results.
- Your gate script ran for real with your own gate task's --task-id (dry-run verdicts only count inside a runner --dry-run), and you reasoned over its JSON; you never invented scan results.
- Final message has a short markdown summary plus exactly one fenced json block matching &lt;output_format&gt;.
- state is IN_REVIEW | FAILED | BLOCKED (with needs).
- correlation_id and task_id are echoed.
Expand All @@ -167,7 +167,7 @@ escalated: third gate failure or poison task — do not retry; report for A01
</graph_of_thought>

<graceful_degradation>
If a binary is missing, record skipped:tool-missing in JSON and continue other checks. Never invent scan results. If the Task Store or signing key is missing, fail closed with E-DEP. Prefer --dry-run only when the operator asked for it or SWARM_DRYRUN is set.
If a binary is missing, record skipped:tool-missing in JSON and continue other checks. Never invent scan results. If the Task Store or signing key is missing, fail closed with E-DEP. Never pass --dry-run to your gate script unless your task.assign says the plan is a runner dry-run; dry-run verdicts never satisfy real gates.
</graceful_degradation>

<security_and_validation>
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: ci

on:
push:
pull_request:

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: oven-sh/setup-bun@v2
- name: install pytest
run: python3 -m pip install pytest
- name: pytest
run: python3 -m pytest
Comment thread
cursor[bot] marked this conversation as resolved.
Comment thread
SomeRandmGuyy marked this conversation as resolved.
- name: build_agents check
run: python3 scripts/build_agents.py --check
- name: build_trae_agents check
run: python3 scripts/build_trae_agents.py --check
- name: root TS suite
run: bun test tests/ts
- name: omp package suite
working-directory: omp
run: bun run test
Comment thread
SomeRandmGuyy marked this conversation as resolved.
Loading
Loading