Skip to content

Commit b496209

Browse files
author
Dmitrii Vasilev
committed
fix(governance): add repo_policy.json + toxic episode tracking
- Add .trinity/repo_policy.json: t27=language_canon, trinity=agent_framework - Save toxic episode: .trinity/experience/wrong-repo-agent-manual.json - Fix docs/FIELD_MANUAL.md: remove false links to non-existent AGENTS_ALPHABET/AGENT_T_SKILL - Links now point to existing docs (ARCHITECTURE.md, DOCUMENTATION_INDEX.md, t27 repo)
1 parent 340d42a commit b496209

6 files changed

Lines changed: 173 additions & 4 deletions

File tree

.trinity/cells/registry.jsonl

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,17 @@
9696
]
9797
},
9898

99-
"verdict": "NUMERIC-STANDARD-001: SPEC_COMPLETE ✅ | CONFORMANCE_PASS ✅ | BENCH_DONE ✅ | GRAPH_COMPLETE ✅ | NUMERIC_CANON_SEALED",
99+
"steps_completed": [
100+
"HOTFIX SP-1: PHI naming + OMEGA_LAMBDA corrections",
101+
"Spec layer completion: all GF4-GF32 specs created",
102+
"Conformance: sacred_physics_*.json (4 vectors)",
103+
"Conformance: gf4/8/12/16 vectors",
104+
"BENCH-005: GF_FAMILY_BENCH.md documentation",
105+
"GF20/GF24 conformance vectors added",
106+
"Graph v2 update: numeric canon complete (22 nodes, 51 edges, 5 bench_links)",
107+
"Cell seal: graph_v2.json reflects numeric canon completeness"
108+
],
109+
"verdict": "NUMERIC-STANDARD-001: SPEC_COMPLETE ✅ | CONFORMANCE_PASS ✅ | BENCH_DONE ✅ | GRAPH_COMPLETE ✅ | NUMERIC_CANON_SEALED | SEALED",
100110
"toxic": false,
101111
"next_phase": "build_system"
102112
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"episode_id": "wrong-repo-agent-manual-001",
3+
"timestamp": "2026-04-04T00:00:00Z",
4+
"severity": "toxic",
5+
"category": "repo_governance",
6+
"summary": "Created agent framework documentation (FIELD_MANUAL.md) in t27 repo instead of trinity",
7+
8+
"mistake": {
9+
"what": "Agent created docs/FIELD_MANUAL.md in gHashTag/t27 repository",
10+
"why": "No repo_policy.json, no tri git guard, no context of repo role",
11+
"consequence": "Misplaced files, broken cross-repo links, no episode tracking"
12+
},
13+
14+
"steps": [
15+
{"step": 1, "action": "created", "path": "t27/docs/FIELD_MANUAL.md", "toxic": true},
16+
{"step": 2, "action": "modified", "path": "README.md", "added": "Field Manual link", "toxic": true},
17+
{"step": 3, "action": "modified", "path": "docs/DOCUMENTATION_INDEX.md", "added": "Field Manual reference", "toxic": true},
18+
{"step": 4, "action": "modified", "path": "MEMORY.md", "added": "false completion record", "toxic": true},
19+
{"step": 5, "action": "reverted", "paths": ["README.md", "DOCUMENTATION_INDEX.md", "MEMORY.md"], "toxic": false},
20+
{"step": 6, "action": "orphaned", "path": "t27/docs/FIELD_MANUAL.md", "toxic": true}
21+
],
22+
23+
"fix": {
24+
"architectural": [
25+
"Create .trinity/repo_policy.json with repo roles (t27=language_canon, trinity=agent_framework)",
26+
"Implement tri git guard to block forbidden paths/patterns",
27+
"Use tri cell protocol for any repo changes with begin/checkpoint/verdict/seal"
28+
],
29+
"immediate": [
30+
"Delete t27/docs/FIELD_MANUAL.md (or redirect to trinity)",
31+
"Create proper issue in gHashTag/trinity for AGENTS/Field Manual",
32+
"Save this episode as toxic with MNL pattern"
33+
]
34+
},
35+
36+
"mnl": {
37+
"pattern": "Mistake → Not-repeat → Learning",
38+
"mistake": "Wrote to wrong repo (t27) without repo_policy validation",
39+
"not_repeat": "tri git guard will block forbidden paths in t27",
40+
"learning": "Repo governance is not optional; all changes must go through tri cell"
41+
},
42+
43+
"verdict": {
44+
"toxic": true,
45+
"reason": "Created orphaned file in wrong repo, no episode tracking, no tri cell protocol",
46+
"repeat_risk": "high",
47+
"mitigation": "repo_policy.json + tri git guard + mandatory tri cell for repo changes"
48+
},
49+
50+
"cell": {
51+
"issue": null,
52+
"cell_id": "repo-governance-001",
53+
"steps_executed": 0,
54+
"steps_expected": 8
55+
},
56+
57+
"prevention": {
58+
"check": "tri git commit should verify repo_policy.json",
59+
"block": "forbidden_paths in t27 → ERROR: use gHashTag/trinity for agent docs",
60+
"enforce": "tri cell begin required for any repo modification"
61+
}
62+
}

.trinity/repo_policy.json

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"$schema": "https://gHashTag.github.io/trinity/schemas/repo_policy.json",
3+
"version": "1.0.0",
4+
"policies": {
5+
"t27": {
6+
"role": "language_canon",
7+
"purpose": "TRI-27 Assembly language specification — numeric formats, sacred constants, ops, types, conformance tests",
8+
"allowed_paths": [
9+
"t27/specs/",
10+
"t27/conformance/",
11+
"architecture/graph_v2.json",
12+
"architecture/graph.tri"
13+
],
14+
"forbidden_paths": [
15+
"docs/FIELD_MANUAL.md",
16+
"docs/AGENTS_ALPHABET.md",
17+
".trinity/agents/",
18+
"AGENTS.md",
19+
"FIELD_MANUAL.md"
20+
],
21+
"forbidden_patterns": [
22+
"agent.*framework",
23+
"27-agent.*alphabet",
24+
"queen.*trinity",
25+
"orchestration.*cycle"
26+
],
27+
"redirect_to": "gHashTag/trinity",
28+
"redirect_message": "Agent framework documentation lives in gHashTag/trinity. This repository is for TRI-27 language specification only."
29+
},
30+
"trinity": {
31+
"role": "agent_framework",
32+
"purpose": "Trinity CLI, agents, orchestration, training, FPGA, research",
33+
"allowed_paths": [
34+
"src/",
35+
"docs/",
36+
"specs/",
37+
".trinity/",
38+
"fpga/",
39+
"tools/",
40+
"deploy/"
41+
],
42+
"forbidden_paths": [],
43+
"forbidden_patterns": []
44+
}
45+
},
46+
"enforcement": {
47+
"tri_git": {
48+
"enabled": true,
49+
"check": "before_commit,before_push",
50+
"action": "block_with_error"
51+
}
52+
}
53+
}

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,6 @@ trinity/
10691069

10701070
| Resource | URL |
10711071
|----------|-----|
1072-
| **Field Manual** | [docs/FIELD_MANUAL.md](docs/FIELD_MANUAL.md) — 1-page quick reference (6-phase cycle, key commands) |
10731072
| **Documentation Index** | [docs/DOCUMENTATION_INDEX.md](docs/DOCUMENTATION_INDEX.md) — Central documentation hub |
10741073
| **API Reference** | [docs/api_reference.md](docs/api_reference.md) — HTTP API, CLI, MCP servers |
10751074
| **Glossary** | [docs/glossary.md](docs/glossary.md) — Technical terms and acronyms |
@@ -1079,7 +1078,6 @@ trinity/
10791078
| **Changelog** | [CHANGELOG.md](CHANGELOG.md) — Version history |
10801079
| **For Researchers** | [docs/papers/README_FOR_SCIENTISTS.md](docs/papers/README_FOR_SCIENTISTS.md) |
10811080
| **Command Reference** | [docs/command_registry.md](docs/command_registry.md) (auto-generated) |
1082-
| **27-Agent Canon** | [gHashTag/t27](https://github.com/gHashTag/t27) — AGENTS_ALPHABET + AGENT_T_SKILL |
10831081
| **DePIN Overview** | [gHashTag.github.io/trinity/docs/depin](https://gHashTag.github.io/trinity/docs/depin) |
10841082
| **Quick Start** | [gHashTag.github.io/trinity/docs/depin/quickstart](https://gHashTag.github.io/trinity/docs/depin/quickstart) |
10851083
| **Tokenomics** | [gHashTag.github.io/trinity/docs/depin/tokenomics](https://gHashTag.github.io/trinity/docs/depin/tokenomics) |

docs/DOCUMENTATION_INDEX.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
| File | Description |
2525
|------|-------------|
2626
| [`README.md`](../README.md) | Main project README with installation and quick start |
27-
| [`FIELD_MANUAL.md`](FIELD_MANUAL.md) | 1-page developer quick reference (6-phase cycle, key commands) |
2827
| [`ARCHITECTURE.md`](ARCHITECTURE.md) | High-level system architecture overview |
2928
| [`docs/papers/README_FOR_SCIENTISTS.md`](papers/README_FOR_SCIENTISTS.md) | Mathematical framework for scientific collaborators |
3029
| [Contributing Guide](docs/docs/contributing.md) | Guidelines for contributing to Trinity |

docs/FIELD_MANUAL.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Trinity Field Manual — Quick Reference
2+
3+
## 6-Phase Cycle (Quick)
4+
5+
1. **Plan**`tri plan --impact <node>`
6+
2. **Specify**`tri spec create`
7+
3. **Generate**`tri gen`
8+
4. **Test**`tri test`
9+
5. **Verdict**`tri verdict --toxic`
10+
6. **Evolve**`tri experience save`
11+
12+
## W→F/M→V→E→W Micro-Loop
13+
14+
- W: `tri cell begin` — seal step start
15+
- F/M: Validate and measure
16+
- V: `tri verdict --toxic`
17+
- E: `tri experience save`
18+
- W: `tri cell commit` — seal step end
19+
20+
## Key Commands
21+
22+
| Task | Command |
23+
|------|---------|
24+
| Create ADR | `tri adr create` |
25+
| Initialize SOUL | `tri soul init` |
26+
| Scan issues | `tri dev scan` |
27+
| Pick task | `tri dev pick --smart` |
28+
| Generate code | `tri gen` |
29+
| Run tests | `tri test` |
30+
| Toxic verdict | `tri verdict --toxic` |
31+
| Save experience | `tri experience save` |
32+
| Git commit | `tri git commit` |
33+
34+
## Agent Reference (Key Letters)
35+
36+
- **T**: Orchestration, Queen
37+
- **N**: Numeric (GF16, TF3)
38+
- **P**: Physics (φ, sacred constants)
39+
- **S**: Specs (.t27 files)
40+
- **V**: Verdict, validation
41+
- **W**: Workflow, tri cell
42+
43+
## Links
44+
45+
- **Architecture**: [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md)
46+
- **Documentation Index**: [docs/DOCUMENTATION_INDEX.md](docs/DOCUMENTATION_INDEX.md)
47+
- **TRI-27 Language**: https://github.com/gHashTag/t27

0 commit comments

Comments
 (0)