Skip to content

Commit d32f967

Browse files
Dmitrii Vasilevclaude
andcommitted
feat(background_agent): Implement SOUL.md + Issue binding registry (Issues A-B) (#505)
- Create templates/SOUL.md template for agent souls - Update CLAUDE.md with SOUL.md mandatory rules - Update AGENTS.md with SOUL.md reference - Create src/background_agent/db/issue_bindings.zig - Extend Session struct with soul_file field - Create src/tri/agent_commands.zig with spawn/run/stop - Update main.zig routing for agent subcommands - Update .gitignore to track issue_bindings.json and souls/ Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 37b779d commit d32f967

21 files changed

Lines changed: 984 additions & 773 deletions

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ zig/
9999
# Context index (generated binary, 80MB+)
100100
deploy/trinity-nexus/.context_index
101101

102+
# SOUL bindings (tracked for orchestration)
103+
!.trinity/issue_bindings.json
104+
!.trinity/souls/
105+
102106
# Temporary scripts
103107
check_ssh.py
104108

@@ -312,6 +316,9 @@ fpga/tools/weight_pack_wide
312316
# Docker files in root (use deploy/ subdirectory instead)
313317
Dockerfile*
314318
*.toml
319+
320+
# Templates (tracked for agent orchestration)
321+
!templates/SOUL.md
315322
fly.toml
316323

317324
# Temporary directories
@@ -353,6 +360,11 @@ tree-sitter-vibee/
353360
trinity-nexus/
354361
website/
355362

363+
# SOUL bindings (tracked for orchestration)
364+
!.trinity/issue_bindings.json
365+
!.trinity/souls/
366+
!templates/SOUL.md
367+
356368
# Junk archive (large, local only)
357369
archive/junk-*/
358370
fpga/openxc7-synth/synth_reports/hslm_full_top.json
@@ -366,6 +378,7 @@ apps/queen/*.png
366378
data/cells/
367379
src/tools/uart-echo-test
368380
data/cifar-10/
381+
# Trinity: ignored except issue_bindings.json and souls/
369382
.trinity/
370383
.trinity/queen/
371384
.trinity/scholar/
@@ -374,3 +387,7 @@ data/cifar-10/
374387
.trinity/scholar/state/
375388
fpga/build-deps/
376389
fpga-flash
390+
# SOUL bindings (tracked - see lines 103-105)
391+
!.trinity/issue_bindings.json
392+
!.trinity/souls/
393+
!templates/SOUL.md

.trinity/mu/heartbeat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"agent":"mu","wake":161,"timestamp":1775215030,"errors_scanned":0,"fixes_applied":0,"build_ok":false,"test_ok":false}
1+
{"agent":"mu","wake":171,"timestamp":1775219479,"errors_scanned":0,"fixes_applied":0,"build_ok":false,"test_ok":false}

AGENTS.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
22

33
Trinity S³AI implements a multi-agent swarm architecture using pure Zig. Each agent has a specific role and communicates through GitHub issues, JSONL events, and the unified `tri` CLI.
44

5+
## SOUL.md — Mandatory Agent Soul
6+
7+
**Every agent/container MUST have `SOUL.md` at its root.**
8+
9+
**SOUL.md contains:**
10+
- Agent type (Ralph / Mu / Scholar / Copywright / Oracle / Swarm / Custom)
11+
- Bound GitHub issue number
12+
- Mission statement
13+
- Allowed commands
14+
- Stop conditions
15+
- Reporting format (Protocol v2)
16+
- References to CLAUDE.md and AGENTS.md
17+
18+
**Template**: `templates/SOUL.md`
19+
20+
**All agents must follow CLAUDE.md law.**
21+
22+
---
23+
524
## Table of Contents
625

726
- [Agent Types](#agent-types)

0 commit comments

Comments
 (0)