@namch/agent-assistant 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/CHANGELOG.md +11 -1
  2. package/agents/backend-engineer.md +3 -3
  3. package/agents/brainstormer.md +3 -3
  4. package/agents/business-analyst.md +3 -3
  5. package/agents/database-architect.md +3 -3
  6. package/agents/debugger.md +2 -2
  7. package/agents/designer.md +2 -2
  8. package/agents/devops-engineer.md +2 -2
  9. package/agents/docs-manager.md +23 -15
  10. package/agents/frontend-engineer.md +3 -3
  11. package/agents/game-engineer.md +3 -3
  12. package/agents/mobile-engineer.md +4 -4
  13. package/agents/performance-engineer.md +3 -3
  14. package/agents/planner.md +4 -4
  15. package/agents/project-manager.md +3 -3
  16. package/agents/researcher.md +3 -3
  17. package/agents/reviewer.md +3 -3
  18. package/agents/scouter.md +3 -3
  19. package/agents/security-engineer.md +3 -3
  20. package/agents/tech-lead.md +3 -3
  21. package/agents/tester.md +2 -2
  22. package/commands/docs/audit.md +554 -78
  23. package/commands/docs/business.md +392 -76
  24. package/commands/docs/core.md +573 -74
  25. package/commands/docs.md +62 -61
  26. package/documents/business/business-features/00-index.md +101 -0
  27. package/documents/business/business-features/01-feature-inventory.md +341 -0
  28. package/documents/business/business-features/02-prioritization-moscow.md +148 -0
  29. package/documents/business/business-features/03-feature-specifications.md +512 -0
  30. package/documents/business/business-features/04-dependencies-and-release-sequencing.md +313 -0
  31. package/documents/business/business-features/05-success-metrics.md +290 -0
  32. package/documents/business/business-glossary/00-index.md +89 -0
  33. package/documents/business/business-glossary/01-canonical-terms.md +428 -0
  34. package/documents/business/business-glossary/02-synonyms-and-deprecated-terms.md +180 -0
  35. package/documents/business/business-glossary/03-domain-entities-and-events.md +395 -0
  36. package/documents/business/business-glossary/04-api-term-mapping.md +173 -0
  37. package/documents/business/business-prd/00-index.md +107 -0
  38. package/documents/business/business-prd/01-executive-summary.md +131 -0
  39. package/documents/business/business-prd/02-problem-goals-and-scope.md +204 -0
  40. package/documents/business/business-prd/03-stakeholders-and-requirements.md +210 -0
  41. package/documents/business/business-prd/04-acceptance-risks-assumptions.md +246 -0
  42. package/documents/business/business-workflows/00-index.md +107 -0
  43. package/documents/business/business-workflows/01-actor-map.md +303 -0
  44. package/documents/business/business-workflows/02-workflow-catalog.md +252 -0
  45. package/documents/business/business-workflows/03-detailed-workflows.md +641 -0
  46. package/documents/business/business-workflows/04-decision-rules-and-exceptions.md +216 -0
  47. package/documents/business/business-workflows/05-sla-and-handoffs.md +253 -0
  48. package/documents/knowledge-architecture/00-index.md +159 -0
  49. package/documents/knowledge-architecture/01-system-overview.md +240 -0
  50. package/documents/knowledge-architecture/02-components.md +419 -0
  51. package/documents/knowledge-architecture/03-data-flow.md +369 -0
  52. package/documents/knowledge-architecture/04-design-patterns.md +498 -0
  53. package/documents/knowledge-architecture/05-decisions.md +410 -0
  54. package/documents/knowledge-domain/00-index.md +251 -0
  55. package/documents/knowledge-domain/01-entities.md +583 -0
  56. package/documents/knowledge-domain/02-database-schema.md +138 -0
  57. package/documents/knowledge-domain/03-api-contracts.md +479 -0
  58. package/documents/knowledge-domain/04-business-rules.md +555 -0
  59. package/documents/knowledge-overview/00-index.md +107 -0
  60. package/documents/knowledge-overview/01-project-identity.md +162 -0
  61. package/documents/knowledge-overview/02-tech-stack.md +119 -0
  62. package/documents/knowledge-overview/03-features.md +233 -0
  63. package/documents/knowledge-overview/04-getting-started.md +394 -0
  64. package/documents/knowledge-source-base/00-index.md +107 -0
  65. package/documents/knowledge-source-base/01-directory-structure.md +312 -0
  66. package/documents/knowledge-source-base/02-entry-points.md +346 -0
  67. package/documents/knowledge-source-base/03-key-modules.md +582 -0
  68. package/documents/knowledge-source-base/04-configuration.md +467 -0
  69. package/documents/knowledge-standards/00-index.md +129 -0
  70. package/documents/knowledge-standards/01-code-style.md +161 -0
  71. package/documents/knowledge-standards/02-conventions.md +255 -0
  72. package/documents/knowledge-standards/03-git-workflow.md +228 -0
  73. package/documents/knowledge-standards/04-testing-standards.md +175 -0
  74. package/package.json +1 -1
  75. package/rules/REFERENCE.md +10 -6
  76. package/skills/docs-audit/README.md +10 -8
  77. package/skills/docs-audit/SKILL.md +45 -41
  78. package/skills/docs-audit/references/scoring-framework.md +5 -5
  79. package/skills/docs-core/README.md +19 -14
  80. package/skills/docs-core/SKILL.md +189 -117
  81. package/skills/planning/references/codebase-understanding.md +5 -5
  82. package/documents/business/business-features.md +0 -894
  83. package/documents/business/business-glossary.md +0 -554
  84. package/documents/business/business-prd.md +0 -400
  85. package/documents/business/business-workflows.md +0 -713
  86. package/documents/knowledge-architecture.md +0 -621
  87. package/documents/knowledge-domain.md +0 -602
  88. package/documents/knowledge-overview.md +0 -316
  89. package/documents/knowledge-source-base.md +0 -581
  90. package/documents/knowledge-standards.md +0 -632
@@ -0,0 +1,498 @@
1
+ # Agent Assistant — Design Patterns
2
+
3
+ > **Purpose**: Catalog of all observed architectural patterns with descriptions, locations, rationale, and code references
4
+ > **Parent**: [00-index.md](./00-index.md)
5
+ > **Last Updated**: 2026-03-26
6
+ > **Generated By**: docs-core skill
7
+
8
+ ---
9
+
10
+ ## Table of Contents
11
+
12
+ 1. [Pattern Overview](#pattern-overview)
13
+ 2. [Orchestrator Pattern](#orchestrator-pattern)
14
+ 3. [Command Router Pattern](#command-router-pattern)
15
+ 4. [Strategy Pattern (Variant Selection)](#strategy-pattern-variant-selection)
16
+ 5. [Tiered Execution Pattern](#tiered-execution-pattern)
17
+ 6. [Cognitive Anchor Pattern](#cognitive-anchor-pattern)
18
+ 7. [Plugin Architecture (Skill Modules)](#plugin-architecture-skill-modules)
19
+ 8. [Profile-Based Injection Pattern](#profile-based-injection-pattern)
20
+ 9. [Phase Pipeline Pattern](#phase-pipeline-pattern)
21
+ 10. [Golden Triangle Pattern](#golden-triangle-pattern)
22
+ 11. [File-Based Communication (Mailbox)](#file-based-communication-mailbox)
23
+ 12. [Platform Abstraction Pattern](#platform-abstraction-pattern)
24
+ 13. [Evidence Sources](#evidence-sources)
25
+
26
+ ---
27
+
28
+ ## Pattern Overview
29
+
30
+ ```mermaid
31
+ graph TD
32
+ subgraph "Structural Patterns"
33
+ P1["Orchestrator"]
34
+ P6["Plugin Architecture"]
35
+ P11["Platform Abstraction"]
36
+ end
37
+
38
+ subgraph "Behavioral Patterns"
39
+ P2["Command Router"]
40
+ P3["Strategy (Variants)"]
41
+ P4["Tiered Execution"]
42
+ P9["Phase Pipeline"]
43
+ end
44
+
45
+ subgraph "Quality Patterns"
46
+ P5["Cognitive Anchor"]
47
+ P7["Profile-Based Injection"]
48
+ P10["Golden Triangle"]
49
+ end
50
+
51
+ subgraph "Communication Patterns"
52
+ P8["File-Based Mailbox"]
53
+ end
54
+
55
+ P1 -->|"routes via"| P2
56
+ P2 -->|"selects"| P3
57
+ P3 -->|"triggers"| P9
58
+ P9 -->|"delegates via"| P4
59
+ P4 -->|"agent uses"| P5
60
+ P4 -->|"agent loads"| P7
61
+ P7 -->|"resolves from"| P6
62
+ P9 -->|":team variant"| P10
63
+ P10 -->|"communicates via"| P8
64
+ P11 -->|"enables"| P1
65
+ ```
66
+
67
+ ---
68
+
69
+ ## Orchestrator Pattern
70
+
71
+ | Attribute | Value |
72
+ |-----------|-------|
73
+ | **Pattern Type** | Structural — Central Coordinator |
74
+ | **Where Applied** | `rules/CORE.md` (definition), all platform entry points (activation) |
75
+ | **Rationale** | A single coordination point prevents conflicting decisions, ensures governance compliance, and provides a consistent execution model across all AI platforms |
76
+
77
+ ### Description
78
+
79
+ The Orchestrator is the sole point of control. Every platform entry point (CLAUDE.md, COPILOT.md, CURSOR.md, CODEX.md, GEMINI.md) binds the AI model's identity to this role with the directive: "YOU ARE THE ORCHESTRATOR — NOT AN IMPLEMENTER." The orchestrator detects commands, loads rules, delegates to specialist agents, verifies exit criteria, and delivers results. It never performs implementation work directly.
80
+
81
+ ### Key Enforcement Mechanisms
82
+
83
+ - **Identity binding block** in CORE.md: `🆔 IDENTITY — ABSOLUTE BINDING`
84
+ - **Prohibitions table**: explicit list of forbidden actions (write code, debug, test, etc.) with correct alternatives
85
+ - **Self-check**: 3-point checklist executed before every response
86
+ - **Law L7** (Recursive Delegation): Meta agents coordinate, NEVER implement
87
+ - **Anti-pattern A1**: Direct implementation is a violation; correct behavior is delegation
88
+
89
+ ### Example Reference
90
+
91
+ From `rules/CORE.md`:
92
+ ```
93
+ ╔═══════════════════════════════════════════════════════════════════════╗
94
+ ║ YOU ARE THE ORCHESTRATOR — NOT AN IMPLEMENTER ║
95
+ ║ ✅ YOU DO: Delegate, coordinate, verify, synthesize ║
96
+ ║ ❌ YOU NEVER: Write code, debug, test, design, or implement ║
97
+ ╚═══════════════════════════════════════════════════════════════════════╝
98
+ ```
99
+
100
+ ---
101
+
102
+ ## Command Router Pattern
103
+
104
+ | Attribute | Value |
105
+ |-----------|-------|
106
+ | **Pattern Type** | Behavioral — Request Router |
107
+ | **Where Applied** | `commands/*.md` (14 router files) |
108
+ | **Rationale** | Decouples user intent detection from workflow execution; routers can assess complexity and select the optimal workflow without knowing implementation details |
109
+
110
+ ### Description
111
+
112
+ Each of the 14 commands (`/cook`, `/fix`, `/plan`, `/debug`, `/test`, `/review`, `/docs`, `/design`, `/deploy`, `/report`, `/brainstorm`, `/ask`, `/code`, `/auto`) has a dedicated router file that:
113
+
114
+ 1. Accepts user arguments via `<feature>$ARGUMENTS</feature>`
115
+ 2. Loads pre-flight rules (CORE.md → PHASES.md → AGENTS.md)
116
+ 3. Assesses complexity using conditional logic
117
+ 4. Routes to the appropriate variant workflow file
118
+
119
+ Routers never execute phases themselves — they redirect.
120
+
121
+ ### Natural Language Fallback
122
+
123
+ When users don't use explicit `/command` syntax, the orchestrator maps natural language to commands via the detection table in CORE.md:
124
+
125
+ | User Language | Maps To |
126
+ |--------------|---------|
127
+ | "implement/build/create" | `/cook` or `/code` |
128
+ | "fix/bug/error/broken" | `/fix` |
129
+ | "plan/strategy/approach" | `/plan` |
130
+
131
+ ### Example Reference
132
+
133
+ From `commands/cook.md`:
134
+ ```
135
+ IF feature is simple (clear spec, low complexity):
136
+ → Route to /cook:fast
137
+ IF feature is complex (multi-component, research needed):
138
+ → Route to /cook:hard
139
+ ```
140
+
141
+ ---
142
+
143
+ ## Strategy Pattern (Variant Selection)
144
+
145
+ | Attribute | Value |
146
+ |-----------|-------|
147
+ | **Pattern Type** | Behavioral — Runtime Strategy Selection |
148
+ | **Where Applied** | `commands/{cmd}/*.md` (variant workflow files) |
149
+ | **Rationale** | Different complexity levels require different workflows — a simple feature shouldn't trigger a 6-phase research pipeline, and a complex feature shouldn't use a 2-phase shortcut |
150
+
151
+ ### Description
152
+
153
+ Each command router selects from up to 4 strategy variants at runtime:
154
+
155
+ | Variant | Strategy | Phase Count | When Selected |
156
+ |---------|----------|-------------|---------------|
157
+ | `:fast` | Minimal workflow, skip research | 2–3 phases | Simple, clear specification |
158
+ | `:hard` | Full workflow with research and planning | 5–7 phases | Complex, multi-component |
159
+ | `:focus` | Full workflow with enforced context optimization | 5–7 phases | Complex + context-critical |
160
+ | `:team` | Golden Triangle adversarial collaboration | 5–7 phases × 3 agents each | Maximum quality required |
161
+
162
+ Special variants exist for some commands:
163
+ - `/docs` uses `core`, `business`, `audit`
164
+ - `/deploy` uses `check`, `preview`, `production`, `rollback`
165
+
166
+ ### Example Reference
167
+
168
+ From `rules/REFERENCE.md`:
169
+ ```
170
+ | `/cook` | cook.md | fast, hard, focus |
171
+ | `/deploy` | deploy.md | check, preview, production, rollback |
172
+ ```
173
+
174
+ ---
175
+
176
+ ## Tiered Execution Pattern
177
+
178
+ | Attribute | Value |
179
+ |-----------|-------|
180
+ | **Pattern Type** | Behavioral — Prioritized Execution Strategy |
181
+ | **Where Applied** | `rules/AGENTS.md` (protocol definition), `rules/CORE.md` (enforcement) |
182
+ | **Rationale** | Sub-agent isolation (TIER 1) provides cleaner context and better quality; fallback embodiment (TIER 2) guarantees completion on all platforms regardless of sub-agent support |
183
+
184
+ ### Description
185
+
186
+ When the orchestrator needs to delegate to an agent, it follows a strict priority:
187
+
188
+ | Tier | Mechanism | Context | Quality | Availability |
189
+ |------|-----------|---------|---------|-------------|
190
+ | **TIER 1** | `runSubagent(agent, context)` | Fresh, isolated | Optimal | Platform-dependent |
191
+ | **TIER 2** | EMBODY (read agent file, transform self) | Shared with parent | Risk of pollution | Always available |
192
+
193
+ ### Rules
194
+
195
+ - TIER 1 is **mandatory** when the sub-agent tool exists
196
+ - TIER 2 is permitted **only** when TIER 1 fails or is unavailable
197
+ - Using TIER 2 "because the task is simple" is **forbidden** (anti-pattern A5)
198
+ - Tool discovery is cached for the session — checked only on first delegation
199
+
200
+ ### Embodiment Protocol (TIER 2)
201
+
202
+ 1. Log: `⚠️ TIER 2: {reason}`
203
+ 2. Read agent file **completely**
204
+ 3. Extract: Directive, Protocol, Constraints, Format
205
+ 4. Announce embodiment with structured block
206
+ 5. Execute as agent (follow THEIR protocol)
207
+ 6. Exit embodiment, continue as orchestrator
208
+
209
+ ### Example Reference
210
+
211
+ From `rules/AGENTS.md`:
212
+ ```
213
+ ❌ FORBIDDEN: Using TIER 2 when runSubagent available
214
+ ❌ FORBIDDEN: Skipping TIER 1 because task is "simple"
215
+ ✅ REQUIRED: Attempt TIER 1 first, log if falling back
216
+ ```
217
+
218
+ ---
219
+
220
+ ## Cognitive Anchor Pattern
221
+
222
+ | Attribute | Value |
223
+ |-----------|-------|
224
+ | **Pattern Type** | Quality — Anti-Hallucination Guardrail |
225
+ | **Where Applied** | Every agent file in `agents/*.md` and `agents/teams/*/` |
226
+ | **Rationale** | AI models can drift from their assigned role, especially in long contexts. The cognitive anchor forces the AI to extract and bind to the agent's specific directive before doing any work |
227
+
228
+ ### Description
229
+
230
+ Every agent file begins with a `🔒 COGNITIVE ANCHOR — MANDATORY OPERATING SYSTEM` block that:
231
+
232
+ 1. Declares the file **overrides** default AI patterns
233
+ 2. Mandates extraction of Core Directive + Constraints + Output Format **before** proceeding
234
+ 3. Binds the AI to follow the agent's Thinking Protocol exactly
235
+
236
+ This pattern prevents the AI from falling back to generic behavior when it should be acting as a specialist.
237
+
238
+ ### Example Reference
239
+
240
+ From `agents/backend-engineer.md`:
241
+ ```markdown
242
+ <!-- 🔒 COGNITIVE ANCHOR — MANDATORY OPERATING SYSTEM -->
243
+ > **BINDING**: This file OVERRIDES default AI patterns. Follow Thinking Protocol EXACTLY.
244
+ > **EXTRACT**: Core Directive + Constraints + Output Format before proceeding.
245
+ ```
246
+
247
+ ---
248
+
249
+ ## Plugin Architecture (Skill Modules)
250
+
251
+ | Attribute | Value |
252
+ |-----------|-------|
253
+ | **Pattern Type** | Structural — Modular Plugin System |
254
+ | **Where Applied** | `skills/*/SKILL.md` (1,430+ modules), `matrix-skills/*.yaml` (19 domain registries) |
255
+ | **Rationale** | Domain knowledge changes faster than framework structure; independent modules can be added, discovered, and promoted without modifying core framework files |
256
+
257
+ ### Description
258
+
259
+ Each skill is a self-contained directory containing at minimum a `SKILL.md` file with domain-specific best practices. Skills are registered in 19 domain YAML files under `matrix-skills/` and resolved by the HSOL layer.
260
+
261
+ ### Plugin Lifecycle
262
+
263
+ | Phase | Mechanism |
264
+ |-------|-----------|
265
+ | **Registration** | Listed in `matrix-skills/{domain}.yaml` with metadata (priority, relevance mapping) |
266
+ | **Discovery** | HSOL matches skills to agent profiles; `find-skills` discovers community skills |
267
+ | **Resolution** | 5-factor fitness scoring selects optimal skills for a task |
268
+ | **Injection** | SKILL.md content is loaded into the agent's context |
269
+ | **Promotion** | Community skills progress: NEW (0.3) → EVALUATING (0.5) → VALIDATED (0.7) → PROMOTED (1.0) |
270
+
271
+ ### Example Reference
272
+
273
+ From `matrix-skills/_index.yaml`:
274
+ ```yaml
275
+ total_matrix_skills: 1430
276
+ hsol:
277
+ enabled: true
278
+ version: "1.1"
279
+ ```
280
+
281
+ ---
282
+
283
+ ## Profile-Based Injection Pattern
284
+
285
+ | Attribute | Value |
286
+ |-----------|-------|
287
+ | **Pattern Type** | Quality — Automatic Knowledge Provisioning |
288
+ | **Where Applied** | Agent YAML frontmatter (`agents/*.md`), HSOL resolution (`rules/SKILLS.md`) |
289
+ | **Rationale** | Agents should not manually request skills — their declared profile automatically determines what knowledge they receive, ensuring consistent expertise across invocations |
290
+
291
+ ### Description
292
+
293
+ Every agent declares a `profile` field in their YAML frontmatter (e.g., `profile: "backend:execution"`). The HSOL layer uses this profile to:
294
+
295
+ 1. Load inherited domains from `_index.yaml`
296
+ 2. Filter skills by relevance mapping from domain YAML files
297
+ 3. Apply priority thresholds (critical ≥ 9, core ≥ 7, minimum ≥ 5)
298
+ 4. Calculate fitness scores
299
+ 5. Return a sorted skill set
300
+
301
+ ### Profile Format
302
+
303
+ ```
304
+ {domain}:{category}
305
+ ```
306
+
307
+ | Example Profile | Domains Loaded |
308
+ |----------------|----------------|
309
+ | `backend:execution` | backend, architecture, quality, data, languages |
310
+ | `frontend:execution` | frontend, design, quality, languages |
311
+ | `research:documentation` | research |
312
+ | `quality:validation` | quality, security, performance |
313
+
314
+ ### Example Reference
315
+
316
+ From `agents/backend-engineer.md`:
317
+ ```yaml
318
+ profile: "backend:execution"
319
+ ```
320
+ ```markdown
321
+ > **MATRIX DISCOVERY**: Skills auto-injected from domain files in ~/.{TOOL}/skills/agent-assistant/matrix-skills/
322
+ > Profile: backend:execution | Domains: backend, architecture, quality, data, languages
323
+ ```
324
+
325
+ ---
326
+
327
+ ## Phase Pipeline Pattern
328
+
329
+ | Attribute | Value |
330
+ |-----------|-------|
331
+ | **Pattern Type** | Behavioral — Sequential Pipeline with Gates |
332
+ | **Where Applied** | `rules/PHASES.md` (format), `rules/CORE.md` (L5 enforcement), variant workflow files |
333
+ | **Rationale** | Sequential execution with exit criteria prevents downstream errors from incomplete phases and ensures each phase builds on verified prior work |
334
+
335
+ ### Description
336
+
337
+ Every workflow variant defines a series of phases that execute strictly in order:
338
+
339
+ 1. **Requirements Intake** — Parse ALL requirements into a numbered registry (100% fidelity)
340
+ 2. **Phase 1 → Phase N** — Each phase delegates to an agent, produces a deliverable, and verifies exit criteria
341
+ 3. **Deliverable as Constraint** — Completed deliverables become immutable inputs for subsequent phases (L8: Stateful Handoff)
342
+
343
+ ### Phase Output Format (from PHASES.md)
344
+
345
+ ```markdown
346
+ ## 🎭 Phase {N}: {name}
347
+ ### Sub-agent: `{agent}` — {role}
348
+ {agent work / summary}
349
+ ### Exit Criteria
350
+ - [x] {criterion_1}
351
+ - [x] {criterion_2}
352
+ ### ✅ `{agent}` complete
353
+ **Deliverable**: {summary}
354
+ ```
355
+
356
+ ### Key Rules
357
+
358
+ - L5 (Sequential Execution): Phase N completes before Phase N+1 starts
359
+ - L8 (Stateful Handoff): Prior deliverables are immutable constraints
360
+ - L2 (Requirement Integrity): 100% fidelity, zero loss in requirements registry
361
+ - No batching: phases execute one at a time, never loaded in parallel (anti-pattern A8)
362
+
363
+ ---
364
+
365
+ ## Golden Triangle Pattern
366
+
367
+ | Attribute | Value |
368
+ |-----------|-------|
369
+ | **Pattern Type** | Quality — Adversarial Collaboration |
370
+ | **Where Applied** | `rules/TEAMS.md` (protocol), `agents/teams/*/` (17 team directories) |
371
+ | **Rationale** | Structured tension between a builder and a challenger, orchestrated by an arbitrator, produces higher-quality output than single-agent execution or parallel cooperation |
372
+
373
+ ### Description
374
+
375
+ When `:team` variant is invoked, each phase spawns exactly 3 agent roles:
376
+
377
+ | Role | Personality | Function |
378
+ |------|------------|----------|
379
+ | **Tech Lead** | Pragmatic, decisive | Decomposes tasks, coordinates, arbitrates disputes, synthesizes |
380
+ | **Executor** | Builder, evidence-driven | Implements, defends work with technical proof |
381
+ | **Reviewer** | Skeptical, demanding | Challenges with devil's advocate mindset, assumes defects exist |
382
+
383
+ ### Debate Rules
384
+
385
+ - Max 3 rounds of Executor ↔ Reviewer exchange
386
+ - Executor MUST defend with technical evidence (benchmarks, specs, references)
387
+ - "I disagree" without proof = automatic FAIL
388
+ - After round 3 without agreement, Tech Lead reads all exchanges and issues a binding `DECISION`
389
+ - Consensus stamp required: `TechLead ✓ | Executor ✓ | Reviewer ✓`
390
+
391
+ ### Example Reference
392
+
393
+ From `rules/TEAMS.md`:
394
+ ```
395
+ CORE PRINCIPLE: Every team phase spawns exactly 3 agent roles — no more, no less.
396
+ Quality emerges from structured tension between an Executor who builds
397
+ and a Reviewer who challenges, orchestrated by a Tech Lead who arbitrates.
398
+ ```
399
+
400
+ ---
401
+
402
+ ## File-Based Communication (Mailbox)
403
+
404
+ | Attribute | Value |
405
+ |-----------|-------|
406
+ | **Pattern Type** | Communication — Append-Only Event Log |
407
+ | **Where Applied** | `rules/TEAMS.md` (protocol), `./reports/{topic}/MAILBOX-{date}.md` (runtime artifact) |
408
+ | **Rationale** | File-based communication provides a persistent, auditable record of all inter-agent exchanges without requiring a message broker or shared memory |
409
+
410
+ ### Description
411
+
412
+ All agent communication within a Golden Triangle flows through two shared artifacts:
413
+
414
+ | Artifact | Format | Rules |
415
+ |----------|--------|-------|
416
+ | **Shared Task List** | Table in phase output | Owned by Tech Lead; tracks assignments, status, priorities |
417
+ | **Mailbox** | `./reports/{topic}/MAILBOX-{date}.md` | Append-only — no edits or deletions; all agents can read; all agents can append |
418
+
419
+ ### Message Types
420
+
421
+ | Type | Direction | Purpose |
422
+ |------|-----------|---------|
423
+ | TASK_ASSIGNMENT | Tech Lead → Executor | Assign work |
424
+ | SUBMISSION | Executor → Reviewer | Submit deliverable |
425
+ | REVIEW (PASS/FAIL) | Reviewer → Executor | Accept or reject |
426
+ | DEFENSE | Executor → Reviewer | Defend with evidence |
427
+ | RESUBMISSION | Executor → Reviewer | Resubmit after fixes |
428
+ | DECISION | Tech Lead → All | Binding arbitration |
429
+
430
+ ### Enforcement
431
+
432
+ - C8-TEAMS-01 (BLOCK): Mailbox is append-only and required for all inter-agent exchanges
433
+ - No agent may edit or delete prior exchanges
434
+
435
+ ---
436
+
437
+ ## Platform Abstraction Pattern
438
+
439
+ | Attribute | Value |
440
+ |-----------|-------|
441
+ | **Pattern Type** | Structural — Write-Once Deploy-Many |
442
+ | **Where Applied** | `cli/install.js` (implementation), all `.md` and `.yaml` files (placeholders) |
443
+ | **Rationale** | Supporting 5 AI platforms from a single codebase eliminates duplication and ensures feature parity; install-time substitution is simpler than runtime branching |
444
+
445
+ ### Description
446
+
447
+ The framework uses `{TOOL}` (and related) placeholders throughout all Markdown and YAML files. At install time, `cli/install.js` performs text replacement based on the target platform:
448
+
449
+ | Platform | `{TOOL}` Value | Install Path |
450
+ |----------|---------------|--------------|
451
+ | Cursor | `cursor` | `~/.cursor/skills/agent-assistant/` |
452
+ | GitHub Copilot | `copilot` | `~/.copilot/skills/agent-assistant/` |
453
+ | Claude Code | `claude` | `~/.claude/skills/agent-assistant/` |
454
+ | Codex | `codex` | `~/.codex/skills/agent-assistant/` |
455
+ | Antigravity/Gemini | `gemini/antigravity` | `~/.gemini/antigravity/skills/agent-assistant/` |
456
+
457
+ ### Platform-Specific Assets
458
+
459
+ Beyond placeholder substitution, each platform has custom assets in `code-assistants/{tool}-assistant/`:
460
+
461
+ | Platform | Custom Assets |
462
+ |----------|--------------|
463
+ | Cursor | Rules directory, `.cursorrules` file |
464
+ | Copilot | `agent-assistant.agent.md` VS Code prompt file |
465
+ | Claude Code | Claude-specific configuration |
466
+ | Codex | Codex-specific configuration |
467
+ | Antigravity | Gemini-specific configuration |
468
+
469
+ ### Example Reference
470
+
471
+ From `cli/install.js` (Cursor config):
472
+ ```javascript
473
+ replacements: {
474
+ '~/.{TOOL}/skills/agent-assistant/': '~/.cursor/skills/agent-assistant/',
475
+ '{TOOL}': 'cursor',
476
+ '{HOME}': '~',
477
+ }
478
+ ```
479
+
480
+ ---
481
+
482
+ ## Evidence Sources
483
+
484
+ | Source | Path | What It Provides |
485
+ |--------|------|------------------|
486
+ | CORE.md v4.1 | `rules/CORE.md` | Orchestrator identity, execution loop, 10 laws, prohibitions, self-check |
487
+ | PHASES.md | `rules/PHASES.md` | Phase output format, requirements registry, exit criteria pattern |
488
+ | AGENTS.md | `rules/AGENTS.md` | TIER 1/TIER 2 protocol, embodiment format, tool discovery, completion guarantee |
489
+ | SKILLS.md | `rules/SKILLS.md` | HSOL resolution, fitness formula, trust lifecycle, complexity gating |
490
+ | TEAMS.md | `rules/TEAMS.md` | Golden Triangle: roles, debate mechanism (3 rounds), mailbox protocol, C8 checkpoints |
491
+ | ERRORS.md | `rules/ERRORS.md` | Anti-patterns A1–A10 (violations of proper patterns) |
492
+ | REFERENCE.md | `rules/REFERENCE.md` | Command-variant table, agent category table |
493
+ | _index.yaml | `matrix-skills/_index.yaml` | HSOL config, total skills, domain count, discovery settings |
494
+ | cli/install.js | `cli/install.js` | Platform configs, replacement maps, file copy logic |
495
+ | cook.md | `commands/cook.md` | Example command router: pre-flight, routing logic, variant table |
496
+ | backend-engineer.md | `agents/backend-engineer.md` | Example agent: profile `backend:execution`, cognitive anchor, handoffs |
497
+ | docs-manager.md | `agents/docs-manager.md` | Example agent profile: `research:documentation` |
498
+ | agents/teams/ | `agents/teams/` | 17 team directories with techlead.md, executor.md, reviewer.md each |