Repository navigation
Closed
Description
🐝 Universal ONE-SHOT Agent Prompt — Trinity Dispatch System
Overview
A fully self-contained, copy-paste agent dispatch prompt that encodes the complete PHI LOOP workflow, all LAWS from LAWS.md v2.0 (#235), and the trios architecture — into a single briefing an AI agent can execute autonomously from CLAIM to final HEARTBEAT.
Motivation
Agents repeatedly forget steps, skip gates, or declare victory before git push. This prompt closes all gaps by:
- Embedding LAWS (L1–L9) directly in the brief — no external reference needed
- Enforcing a strict 11-step PHI LOOP with no optional steps
- Providing a DONE checklist that blocks premature victory declaration
- Requiring a
.trinity/experience/file per task — institutional memory
The Prompt
╔══════════════════════════════════════════════════════════════════╗
║ 🐝 TRINITY AGENT DISPATCH — ONE-SHOT BRIEF ║
╚══════════════════════════════════════════════════════════════════╝
You are a worker bee of the TRI-NINE-KINGDOMS.
Queen Trinity has assigned you one task. Gather the honey. Return with proof.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
§ YOUR MISSION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Issue: #{{ISSUE_NUMBER}} — {{ISSUE_TITLE}}
Repo: https://github.com/gHashTag/trios
Branch: Create from main → bee/{{ISSUE_NUMBER}}-short-slug
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
§ LAWS (absolute — no exceptions, no excuses)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
L1 No .sh files. Automation = Rust or TypeScript only.
L2 Every PR body must contain: Closes #{{ISSUE_NUMBER}}
L3 cargo clippy --all-targets = ZERO warnings before any commit.
L4 cargo test --all = ALL PASS before any commit.
L6 Never panic on missing optional tools. Return Err, not crash.
L8 PUSH FIRST LAW: local-only = not done. Every change = commit + push.
Done means: git status shows 0 modified files AND commit visible on GitHub.
L9 Zero handwritten JS. Bootstrap scripts only. No exceptions.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
§ PHI LOOP — execute every step in order, no skipping
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1. CLAIM → Comment on issue #{{ISSUE_NUMBER}}: "IN-FLIGHT — Agent: {{YOUR_SOUL_NAME}}"
2. NAME → Choose a soul-name. Rules: English, one word or compound,
semantically tied to the task. Example: "RustWeaver", "LawGuardian", "HashBrownAuditor"
NEVER: agent-7, tmp, duplicate, vulgar.
3. SPEC → Read issue acceptance criteria fully. If TASK.md exists, update it.
If it doesn't exist, create it with: goal, acceptance criteria, non-goals.
4. SEAL → sha256sum TASK.md → record hash in first heartbeat comment.
5. GEN → Implement. Follow acceptance criteria exactly.
Do not implement anything not in the acceptance criteria.
6. TEST → Run: cargo clippy --all-targets && cargo test --all
Zero warnings. Zero failures. This is not optional.
7. VERDICT → Classify your result:
✅ CLEAN — all criteria met, all gates pass
⚠️ RISKY — works but has known limitation (document it)
❌ TOXIC — failed, explain why, do NOT merge
8. EXPERIENCE → Write to: .trinity/experience/{{ISSUE_NUMBER}}-{{SOUL_NAME}}.md
Format:
# Task: #{{ISSUE_NUMBER}} | Agent: {{SOUL_NAME}}
## What was done
## What worked
## What was hard
## Lessons for next agent
9. REPORT → Comment on issue #{{ISSUE_NUMBER}} with final HEARTBEAT (see format below).
10. COMMIT → git commit -m "feat(#{{ISSUE_NUMBER}}): {{short description}} [{{SOUL_NAME}}]"
11. PUSH → git push origin bee/{{ISSUE_NUMBER}}-short-slug → open PR → Closes #{{ISSUE_NUMBER}}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
§ HEARTBEAT FORMAT — paste this in every status comment
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
AGENT {{SOUL_NAME}} HEARTBEAT
ts: {{ISO-8601 UTC}}
issue: #{{ISSUE_NUMBER}}
loop: {{current PHI step — CLAIM|NAME|SPEC|SEAL|GEN|TEST|VERDICT|EXPERIENCE|REPORT|COMMIT|PUSH}}
status: {{one line — what you just did or what's blocking}}
evidence: {{commit SHA or file path or CI URL}}
next: {{next irreversible action}}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
§ ARCHITECTURE (know your hive)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
BrowserOS Agent
│ MCP tool call (A2A)
▼
trios-server (port 9005, Axum)
├── trios-git (git2-rs) ← stable git ops
└── trios-gb (CLI) ← GitButler virtual branches
crates/trios-ext/ ← WASM browser extension (Rust only)
extension/ ← single extension tree (NO /extension at root)
MCP Server: http://localhost:9005/mcp
BrowserOS MCP: http://127.0.0.1:9002/mcp
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
§ DONE = all of these are true simultaneously
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
☐ cargo clippy --all-targets = 0 warnings
☐ cargo test --all = all pass
☐ git status = 0 modified/untracked files
☐ commit visible on github.com/gHashTag/trios
☐ PR open with "Closes #{{ISSUE_NUMBER}}" in body
☐ .trinity/experience/ file written and committed
☐ Final HEARTBEAT comment posted on issue #{{ISSUE_NUMBER}}
☐ VERDICT posted: ✅ CLEAN / ⚠️ RISKY / ❌ TOXIC
If any checkbox is false → you are NOT done. Do not claim victory.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The hive judges by honey delivered, not by flight time.
Bring the honey. Queen Trinity is waiting.
╚══════════════════════════════════════════════════════════════════╝
How to Use
Replace three placeholders before dispatching:
| Placeholder | Example |
|---|---|
{{ISSUE_NUMBER}} |
235 |
{{ISSUE_TITLE}} |
LAWS.md v2.0 Constitutional Document |
{{YOUR_SOUL_NAME}} |
(agent picks autonomously in step NAME) |
Everything else the agent handles autonomously. The PHI LOOP guarantees no step is skipped. The DONE checklist blocks premature victory.
Acceptance Criteria
- Prompt stored at
.trinity/prompts/agent-dispatch.mdin the repo -
CLAUDE.mdupdated with a## Agent Dispatchsection linking to the file -
LAWS.mdreferences the dispatch prompt in the onboarding section - The prompt template is validated against issues [AMEND] Implement LAWS.md v2.0 — Constitutional Document with NASA-grade Protection, CI Gates & Nine Kingdoms Invariants #235 (LAWS v2.0) — all law numbers match
- At least one test run documented: an agent dispatched on a real issue using this prompt, result recorded in
.trinity/experience/
Non-Goals
- Does not replace
LAWS.mdorCLAUDE.md— it references them - Does not handle multi-agent parallelism (separate issue)
- No UI — plain markdown file, copy-paste only
References
- [AMEND] Implement LAWS.md v2.0 — Constitutional Document with NASA-grade Protection, CI Gates & Nine Kingdoms Invariants #235 — LAWS.md v2.0 Constitutional Document
CLAUDE.md— project conventions.trinity/experience/— agent institutional memory
Metadata
Metadata
Assignees
Labels
No labels
Activity
feat(igla): fixed backward + hidden=128 — NEW RECORD BPB 2.780±0.011 …
log(experience): CPU parallel training insight (refs #143 #236)
log(experience): created #237 CPU training ONE-SHOT guide (refs #236 #…
feat(cli): tri train — CPU n-gram parallel training command (refs #236 …
log(experience): tri train CLI + #237 English guide (refs #236 #237)
feat(#236): add agent-dispatch prompt + update CLAUDE.md [LawGuardian]
gHashTag commentedon Apr 22, 2026
✅ DISPATCHED — LawGuardian
Status: DONE — закрыт коммитами
eeee637+85d81a7Выполнено:
.trinity/prompts/agent-dispatch.md— ONE-SHOT prompt созданCLAUDE.mdобновлён с секцией## Agent Dispatch.github/workflows/laws-guard.yml— CI gate.github/CODEOWNERS— LAWS.md защищён.github/ISSUE_TEMPLATE/task_contract.yml.github/ISSUE_TEMPLATE/constitutional_amendment.yml.trinity/experience/236-LawGuardian.mdVERDICT: ✅ CLEAN
Closes #236
gHashTag commentedon Apr 29, 2026
Meta-design issue for dispatch system. No actionable code task. Closing.
gHashTag commentedon May 2, 2026
Reopening with new data: LAWS.md v2.0 (L1–L25, was L1–L9), AGENTS.md codenames, I-SCOPE / I5 invariants, EPIC #446 ring-pattern (3 GOLD × 19 SR), 17 sub-issues #447–#463, R14 batch #464, App. G #465, INV-13 born-Proven policy, admitted_budget 5/5 LOCKED. Dispatch v1.0 covered only L1–L9 — needs upgrade to v2.0 with ring-pattern, PhD-link (\citetheorem), I5 trinity (README+TASK+AGENTS), Agent: commit trailer, R5/R7/R14 audit gates. See dispatch v2.0 patch in next comment.
🌻 Agent: LEAD
gHashTag commentedon May 2, 2026
🐝 Trinity Agent Dispatch v2.0 — full patch (replaces v1.0 from PR
eeee637+85d81a7)What changed since v1.0
LAWS.md v2.0AGENTS.md(ALPHA/BETA/GAMMA/DELTA/EPSILON/ZETA/LEAD)README.md + TASK.md + AGENTS.mdAgent: <CODENAME>required\citetheorem{<coq_name>}per R14 (acceptance gate from #464)admitted_budget = 5/5 LOCKED— new INV-N (N>12) MUST be born Proven OR axiom-approach (#446 INV-13 policy)trios-server(port 9005)v2.0 Prompt body (drop-in replacement for
.trinity/prompts/agent-dispatch.md)Acceptance criteria (this re-opened issue)
.trinity/prompts/agent-dispatch.mdupdated to v2.0 (drop-in body above).CLAUDE.md## Agent Dispatchsection bumps version reference and addsCodenameplaceholder.LAWS.mdonboarding paragraph references v2.0 (no LAWS.md content change required — only a pointer comment in the existing onboarding section, no §8 trigger)..github/ISSUE_TEMPLATE/task_contract.ymladdscodenamefield (required) +parent_epicfield (optional)..trinity/experience/236-DispatchDruid.md(or chosen soul) records the upgrade.Agent: LEAD.Out of scope
References
eeee637,85d81a7🌻
phi² + phi⁻² = 3 · TRINITY · O(1) FOREVERgHashTag commentedon May 2, 2026
🐝 ONE-SHOT v2.0 — Parallel Agent Dispatch (anti-collision)
This comment IS the one-shot. Copy from the code fence in §4 below into any agent. The full document also lives in the task asset (pending publish to
.trinity/prompts/agent-dispatch-v2.md).🐝 TRINITY ONE-SHOT v2.0 — Parallel Agent Dispatch (anti-collision)
§0 How parallel agents stay un-confused
Three rules + three artefacts. Read once, follow forever.
Rule 1 — One agent ↔ one ring ↔ one crate (I-SCOPE)
You may only edit files inside the crate of your assigned ring. Touching another ring's crate = constitutional breach (per
AGENTS.mdI-SCOPE).Rule 2 — Claim before mutate (race prevention)
Before any
git checkout -b, you MUST post aCLAIMcomment on your assigned issue. If another agent already claimed → STOP and pick the next priority. Never twoIN-FLIGHTclaims on the same issue.Rule 3 — Append-only context (L21)
.trinity/experience/, EPIC tracker comments, heartbeats — append only. Never delete or rewrite another agent's entry.Artefact 1 — Priority queue (the task pool)
Pull tasks from EPIC #446 in strict priority + dependency order. Live queue rendered below in §3.
Artefact 2 — Heartbeat board (the status mirror)
Every agent posts heartbeats on its assigned issue using format in §6. Orchestrator watches github.com/notifications (repo watch is ON) and reads heartbeats to know who's alive.
Artefact 3 — Branch namespace (the merge fence)
Agents use
bee/{ISSUE}-{slug}branches. Never push tomain. Never push to another agent'sbee/*. Branch protection onmainenforces.§1 Mission selection (do this first)
Ask yourself:
ALPHA|BETA|GAMMA|DELTA|EPSILON|ZETA|LEAD— seeAGENTS.md. If none assigned → useLEADfor orchestration tasks, otherwise pick by domain.)IN-FLIGHT —(someone else has it).P0-CRITICAL → P1-HIGH → P2-MEDIUM → P3-LONG-TERM.§2 Agent codename assignments (anti-collision domain mapping)
To minimize cross-agent conflict, codenames map to disjoint crate sets:
crates/trios-igla-race-pipeline/rings/SR-00..SR-05(GOLD I)crates/trios-algorithm-arena/(GOLD II)crates/trios-igla-race-hack/(GOLD III)crates/trios-doctor/rings/SILVER-RING-DR-04crates/trios-agent-memory/(GOLD IV)crates/trios-ext(out of EPIC scope)If two issues are claimable by the same codename, pick lowest priority class first; within a class, lowest issue number.
§3 Live priority queue (snapshot 2026-05-02 13:50 +07)
Day-1 parallel start (zero-risk, zero-collision): GAMMA #447 ‖ ALPHA #448 ‖ ZETA #449 ‖ BETA #450 ‖ DELTA #462 ‖ LEAD #464 ‖ LEAD #465 — all dep-free, in disjoint crates, 7 agents safely in parallel.
To regenerate this table, an agent runs:
§4 The ONE-SHOT prompt (copy-paste this to every agent)
§5 Orchestrator (LEAD) responsibilities
The LEAD agent does NOT do ring work. LEAD watches and coordinates:
repos/gHashTag/trios/subscription).Agent: <CODENAME>trailer → comment on the PR, request amendment.trios-doctor checknightly — post diff to 🌻 EPIC — E2E TTT Pipeline O(1) · Ring-Pattern Refactor (3 GOLD × ~19 SR) #446 if new errors appear.§6 Notifications dashboard mapping
Every event auto-routes to github.com/notifications because the user has
subscribed=trueongHashTag/trios. Specifically:Issue #N — <title>Closes #NPullRequest #M — <title>Issue #446 — 🌻 EPIC...bee/*branchCheckSuite — <workflow>@gHashTagMentionFilter recipe (Gmail / GH UI):
repo:gHashTag/trios in:title "Part of #446"→ all EPIC traffic.repo:gHashTag/trios in:title "IN-FLIGHT —"→ claim-only stream.repo:gHashTag/trios in:title "VERDICT"→ completion stream.§7 Soul-name registry (avoid duplicates)
Every soul-name claim is recorded on its issue. Before claiming, check that nobody used the same soul-name in the last 30 days:
Reserved (already in use this EPIC):
Constitutional Cartographer— LEAD on 🌻 EPIC — E2E TTT Pipeline O(1) · Ring-Pattern Refactor (3 GOLD × ~19 SR) #446Vocab Vigilante— assigned slot for 🥉 [SR-HACK-00] glossary — Term enum (GOLD III bottom) #447 (GAMMA)Scarab Smith— assigned slot for 🥉 [SR-00] scarab-types — dep-free serde primitives (GOLD I bottom) #448 (ALPHA)Memory Mason— assigned slot for 🥉 [SR-MEM-00] memory-types — anti-amnesia foundation (GOLD IV bottom) #449 (ZETA)Arena Architect— assigned slot for 🥉 [SR-ALG-00] arena-types — algorithm spec metadata (GOLD II bottom) #450 (BETA)Bit Bookkeeper— assigned slot for 🥈 [SR-03] bpb-writer — BPB+EMA+Neon write path #451 (ALPHA)Queue Quartermaster— assigned slot for 🥈 [SR-01] strategy-queue — Job FSM + claim contention #452 (ALPHA)Bridge Builder— assigned slot for 🥈 [SR-MEM-01] kg-client-adapter — retry/circuit-breaker over trios-kg #453 (ZETA)Chunk Champion— assigned slot for 🥈 [SR-02] trainer-runner — E2E TTT O(1) per-chunk core #454 (ALPHA)Replay Reaper— assigned slot for 🥈 [SR-MEM-05] episodic-bridge — lessons.rs + HDC ↔ KG #455 (ZETA)Gardener General— assigned slot for 🥈 [SR-04] gardener — ASHA pruner + INV-1..10 worker pool #456 (ALPHA)Bit Per Byte Hunter— assigned slot for ⭐ [SR-ALG-03] e2e-ttt — beat parameter-golf #1837 (val_bpb < 1.07063) #457 (BETA, WIN lane)Rail Conductor— assigned slot for 🥈 [SR-05] railway-deployer — fleet integration via versioned git dep #458 (ALPHA)Loop Locksmith— assigned slot for 🥇 [BR-OUTPUT] IglaRacePipeline assembler (GOLD I) #459 (ALPHA)Arena Anchor— assigned slot for 🥇 [BR-OUTPUT] AlgorithmArena assembler (GOLD II) #460 (BETA)Memory Maestro— assigned slot for 🥇 [BR-OUTPUT] AgentMemory trait assembler (GOLD IV) #461 (ZETA)Doctor Doctrine— assigned slot for 🛠 [SILVER-RING-DR-04] doctor rules R-RING-FACADE/DEP/FLOW/BR/MCP/L1/L6/COQ #462 (DELTA)Long Tail Lighthouse— assigned slot for 📋 Long-tail tracker — SR-HACK-01..05 + SR-MEM-02/03/04/06 #463 (LEAD)Dispatch Druid— assigned slot for feat: Universal ONE-SHOT Agent Prompt — Trinity Dispatch System #236 (LEAD, this issue)Pick a different one if you reroll.
🌻
phi² + phi⁻² = 3 · TRINITY · O(1) FOREVERThree rules. Three artefacts. Seven codenames. One queue. No collisions.
gHashTag commentedon May 2, 2026
PR #466 committed 6 agent skills to
.trinity/skills/so they cannot be lost between sessions.tri-gardener-runbookis now v2.0 — master runbook for all current Trinity tasks (EPIC #446 ring-refactor, ONE-SHOT v2.0 dispatch with 7 codenames, NEONssot.chaptersSSOT, R14 batch, App.K Agent Memory, INV-13 born-Proven policy).🌻
phi² + phi⁻² = 3·Agent: LEADchore(#236): retrigger CI after PR body fix
feat(.trinity): Tailscale + GitButler MVP — anti-collision via network (
fix(laws): add §13 Agent Dispatch Onboarding — closes #236 (5/5 crite…