@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.
- package/CHANGELOG.md +11 -1
- package/agents/backend-engineer.md +3 -3
- package/agents/brainstormer.md +3 -3
- package/agents/business-analyst.md +3 -3
- package/agents/database-architect.md +3 -3
- package/agents/debugger.md +2 -2
- package/agents/designer.md +2 -2
- package/agents/devops-engineer.md +2 -2
- package/agents/docs-manager.md +23 -15
- package/agents/frontend-engineer.md +3 -3
- package/agents/game-engineer.md +3 -3
- package/agents/mobile-engineer.md +4 -4
- package/agents/performance-engineer.md +3 -3
- package/agents/planner.md +4 -4
- package/agents/project-manager.md +3 -3
- package/agents/researcher.md +3 -3
- package/agents/reviewer.md +3 -3
- package/agents/scouter.md +3 -3
- package/agents/security-engineer.md +3 -3
- package/agents/tech-lead.md +3 -3
- package/agents/tester.md +2 -2
- package/commands/docs/audit.md +554 -78
- package/commands/docs/business.md +392 -76
- package/commands/docs/core.md +573 -74
- package/commands/docs.md +62 -61
- package/documents/business/business-features/00-index.md +101 -0
- package/documents/business/business-features/01-feature-inventory.md +341 -0
- package/documents/business/business-features/02-prioritization-moscow.md +148 -0
- package/documents/business/business-features/03-feature-specifications.md +512 -0
- package/documents/business/business-features/04-dependencies-and-release-sequencing.md +313 -0
- package/documents/business/business-features/05-success-metrics.md +290 -0
- package/documents/business/business-glossary/00-index.md +89 -0
- package/documents/business/business-glossary/01-canonical-terms.md +428 -0
- package/documents/business/business-glossary/02-synonyms-and-deprecated-terms.md +180 -0
- package/documents/business/business-glossary/03-domain-entities-and-events.md +395 -0
- package/documents/business/business-glossary/04-api-term-mapping.md +173 -0
- package/documents/business/business-prd/00-index.md +107 -0
- package/documents/business/business-prd/01-executive-summary.md +131 -0
- package/documents/business/business-prd/02-problem-goals-and-scope.md +204 -0
- package/documents/business/business-prd/03-stakeholders-and-requirements.md +210 -0
- package/documents/business/business-prd/04-acceptance-risks-assumptions.md +246 -0
- package/documents/business/business-workflows/00-index.md +107 -0
- package/documents/business/business-workflows/01-actor-map.md +303 -0
- package/documents/business/business-workflows/02-workflow-catalog.md +252 -0
- package/documents/business/business-workflows/03-detailed-workflows.md +641 -0
- package/documents/business/business-workflows/04-decision-rules-and-exceptions.md +216 -0
- package/documents/business/business-workflows/05-sla-and-handoffs.md +253 -0
- package/documents/knowledge-architecture/00-index.md +159 -0
- package/documents/knowledge-architecture/01-system-overview.md +240 -0
- package/documents/knowledge-architecture/02-components.md +419 -0
- package/documents/knowledge-architecture/03-data-flow.md +369 -0
- package/documents/knowledge-architecture/04-design-patterns.md +498 -0
- package/documents/knowledge-architecture/05-decisions.md +410 -0
- package/documents/knowledge-domain/00-index.md +251 -0
- package/documents/knowledge-domain/01-entities.md +583 -0
- package/documents/knowledge-domain/02-database-schema.md +138 -0
- package/documents/knowledge-domain/03-api-contracts.md +479 -0
- package/documents/knowledge-domain/04-business-rules.md +555 -0
- package/documents/knowledge-overview/00-index.md +107 -0
- package/documents/knowledge-overview/01-project-identity.md +162 -0
- package/documents/knowledge-overview/02-tech-stack.md +119 -0
- package/documents/knowledge-overview/03-features.md +233 -0
- package/documents/knowledge-overview/04-getting-started.md +394 -0
- package/documents/knowledge-source-base/00-index.md +107 -0
- package/documents/knowledge-source-base/01-directory-structure.md +312 -0
- package/documents/knowledge-source-base/02-entry-points.md +346 -0
- package/documents/knowledge-source-base/03-key-modules.md +582 -0
- package/documents/knowledge-source-base/04-configuration.md +467 -0
- package/documents/knowledge-standards/00-index.md +129 -0
- package/documents/knowledge-standards/01-code-style.md +161 -0
- package/documents/knowledge-standards/02-conventions.md +255 -0
- package/documents/knowledge-standards/03-git-workflow.md +228 -0
- package/documents/knowledge-standards/04-testing-standards.md +175 -0
- package/package.json +1 -1
- package/rules/REFERENCE.md +10 -6
- package/skills/docs-audit/README.md +10 -8
- package/skills/docs-audit/SKILL.md +45 -41
- package/skills/docs-audit/references/scoring-framework.md +5 -5
- package/skills/docs-core/README.md +19 -14
- package/skills/docs-core/SKILL.md +189 -117
- package/skills/planning/references/codebase-understanding.md +5 -5
- package/documents/business/business-features.md +0 -894
- package/documents/business/business-glossary.md +0 -554
- package/documents/business/business-prd.md +0 -400
- package/documents/business/business-workflows.md +0 -713
- package/documents/knowledge-architecture.md +0 -621
- package/documents/knowledge-domain.md +0 -602
- package/documents/knowledge-overview.md +0 -316
- package/documents/knowledge-source-base.md +0 -581
- package/documents/knowledge-standards.md +0 -632
|
@@ -1,621 +0,0 @@
|
|
|
1
|
-
# Agent Assistant — Knowledge Architecture
|
|
2
|
-
|
|
3
|
-
> **Purpose**: System design, component interactions, data flow, design patterns, and architectural decisions for AI agents and developers.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## 1. System Overview
|
|
8
|
-
|
|
9
|
-
Agent Assistant is a **multi-agent orchestration framework** that transforms a single AI coding assistant into a coordinated team of specialists. The architecture follows the **Orchestrator Pattern** with **Tiered Execution**.
|
|
10
|
-
|
|
11
|
-
### High-Level Architecture
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
15
|
-
│ USER INTERFACE │
|
|
16
|
-
│ (Claude Code / Cursor / Copilot / Codex / Antigravity) │
|
|
17
|
-
└─────────────────────────────────────────────────────────────────────────────┘
|
|
18
|
-
│
|
|
19
|
-
▼
|
|
20
|
-
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
21
|
-
│ ORCHESTRATOR │
|
|
22
|
-
│ ┌─────────────┐ ┌──────────────┐ ┌─────────────────┐ ┌──────────────┐ │
|
|
23
|
-
│ │ COMMAND │ │ WORKFLOW │ │ AGENT │ │ SKILL │ │
|
|
24
|
-
│ │ ROUTER │──▶│ ENGINE │──▶│ DELEGATOR │──▶│ RESOLVER │ │
|
|
25
|
-
│ └─────────────┘ └──────────────┘ └─────────────────┘ └──────────────┘ │
|
|
26
|
-
│ ▲ │ │
|
|
27
|
-
│ │ ▼ │
|
|
28
|
-
│ ┌──────┴──────────────────────────────────────────────────────────────┐ │
|
|
29
|
-
│ │ RULE ENGINE │ │
|
|
30
|
-
│ │ (ORCHESTRATION-LAWS / EXECUTION-PROTOCOL / ADAPTIVE-EXECUTION) │ │
|
|
31
|
-
│ └──────────────────────────────────────────────────────────────────────┘ │
|
|
32
|
-
└─────────────────────────────────────────────────────────────────────────────┘
|
|
33
|
-
│
|
|
34
|
-
┌─────────────────┴─────────────────┐
|
|
35
|
-
▼ ▼
|
|
36
|
-
┌─────────────────────────────────┐ ┌─────────────────────────────────────┐
|
|
37
|
-
│ TIER 1: SUB-AGENT │ │ TIER 2: EMBODY │
|
|
38
|
-
│ (Native tool, isolated context)│ │ (Read agent file, shared context) │
|
|
39
|
-
└─────────────────────────────────┘ └─────────────────────────────────────┘
|
|
40
|
-
│ │
|
|
41
|
-
└─────────────────┬─────────────────┘
|
|
42
|
-
▼
|
|
43
|
-
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
44
|
-
│ SPECIALIST AGENTS (21) │
|
|
45
|
-
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
|
|
46
|
-
│ │ tech-lead │ │ backend- │ │ frontend- │ │ security- │ ... │
|
|
47
|
-
│ │ │ │ engineer │ │ engineer │ │ engineer │ │
|
|
48
|
-
│ └─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘ │
|
|
49
|
-
└─────────────────────────────────────────────────────────────────────────────┘
|
|
50
|
-
│
|
|
51
|
-
▼
|
|
52
|
-
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
53
|
-
│ MATRIX SKILL DISCOVERY (1400+ Skills) │
|
|
54
|
-
│ ┌──────────────────────────────────────────────────────────────────────┐ │
|
|
55
|
-
│ │ _index.yaml → Domain Files (19) → Skill Resolution → Skill Injection │ │
|
|
56
|
-
│ └──────────────────────────────────────────────────────────────────────┘ │
|
|
57
|
-
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
|
|
58
|
-
│ │ backend │ │frontend │ │security │ │ quality │ │ devops │ │ ... │ │
|
|
59
|
-
│ │ .yaml │ │ .yaml │ │ .yaml │ │ .yaml │ │ .yaml │ │ │ │
|
|
60
|
-
│ └─────────┘ └─────────┘ └─────────┘ └─────────┘ └─────────┘ └─────────┘ │
|
|
61
|
-
└─────────────────────────────────────────────────────────────────────────────┘
|
|
62
|
-
│
|
|
63
|
-
▼
|
|
64
|
-
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
65
|
-
│ DELIVERABLES │
|
|
66
|
-
│ ./reports/{topic}/ ─────▶ Code, Plans, Designs, Tests, Documentation │
|
|
67
|
-
│ ./documents/ │
|
|
68
|
-
└─────────────────────────────────────────────────────────────────────────────┘
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
---
|
|
72
|
-
|
|
73
|
-
## 2. Core Components
|
|
74
|
-
|
|
75
|
-
### 2.1 Orchestrator
|
|
76
|
-
|
|
77
|
-
The central coordination layer that never implements directly.
|
|
78
|
-
|
|
79
|
-
| Responsibility | Description |
|
|
80
|
-
|----------------|-------------|
|
|
81
|
-
| **Command Routing** | Parse user input → route to workflow file |
|
|
82
|
-
| **Workflow Execution** | Execute phases in order |
|
|
83
|
-
| **Agent Delegation** | Select and invoke specialist agents |
|
|
84
|
-
| **Skill Resolution** | Resolve and inject skills via Matrix |
|
|
85
|
-
| **Quality Verification** | Verify exit criteria before proceeding |
|
|
86
|
-
| **Deliverable Assembly** | Collect and synthesize outputs |
|
|
87
|
-
|
|
88
|
-
**Anti-Pattern**: Orchestrator NEVER writes code, debugs, tests, or designs directly.
|
|
89
|
-
|
|
90
|
-
### 2.2 Command Router
|
|
91
|
-
|
|
92
|
-
Routes user commands to appropriate workflow files.
|
|
93
|
-
|
|
94
|
-
```
|
|
95
|
-
Input Detection:
|
|
96
|
-
/cook:fast "feature" → commands/cook/fast.md
|
|
97
|
-
/docs:core → commands/docs/core.md
|
|
98
|
-
/deploy:production → commands/deploy/production.md
|
|
99
|
-
|
|
100
|
-
Natural Language Detection:
|
|
101
|
-
"implement X" → /cook
|
|
102
|
-
"fix X" → /fix
|
|
103
|
-
"plan X" → /plan
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
**Variant Resolution**:
|
|
107
|
-
- Colon syntax: `/docs:core` → command=docs, variant=core
|
|
108
|
-
- Slash syntax: `/docs/core` → command=docs, variant=core
|
|
109
|
-
- Both resolve to: `commands/{command}/{variant}.md`
|
|
110
|
-
|
|
111
|
-
### 2.3 Workflow Engine
|
|
112
|
-
|
|
113
|
-
Executes multi-phase workflows with strict ordering.
|
|
114
|
-
|
|
115
|
-
```
|
|
116
|
-
Phase Execution Flow:
|
|
117
|
-
┌──────────────────────────────────────────────────────────────┐
|
|
118
|
-
│ STEP 1: INTAKE → Parse ALL requirements (zero loss) │
|
|
119
|
-
│ ↓ │
|
|
120
|
-
│ STEP 2: ROUTE → Load command workflow file │
|
|
121
|
-
│ ↓ │
|
|
122
|
-
│ STEP 3: EXECUTE → Delegate phases to agents (in order) │
|
|
123
|
-
│ ↓ │
|
|
124
|
-
│ STEP 4: VERIFY → 100% requirement fulfillment check │
|
|
125
|
-
│ ↓ │
|
|
126
|
-
│ STEP 5: REPORT → Final delivery with evidence │
|
|
127
|
-
└──────────────────────────────────────────────────────────────┘
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
**Key Rules**:
|
|
131
|
-
- One phase at a time (no batching)
|
|
132
|
-
- Full workflow in one reply
|
|
133
|
-
- Exit criteria verification before proceeding
|
|
134
|
-
- Deliverable files created per phase
|
|
135
|
-
|
|
136
|
-
### 2.4 Agent Delegator
|
|
137
|
-
|
|
138
|
-
Handles agent invocation with tiered execution.
|
|
139
|
-
|
|
140
|
-
```yaml
|
|
141
|
-
tier_selection:
|
|
142
|
-
TIER_1_SUBAGENT:
|
|
143
|
-
when: "runSubagent tool exists"
|
|
144
|
-
action: "MUST invoke sub-agent"
|
|
145
|
-
context: "ISOLATED (fresh memory)"
|
|
146
|
-
priority: "MANDATORY"
|
|
147
|
-
|
|
148
|
-
TIER_2_EMBODY:
|
|
149
|
-
when: "Tool missing OR system error"
|
|
150
|
-
action: "Read agent file, transform"
|
|
151
|
-
context: "SHARED (same memory)"
|
|
152
|
-
priority: "FALLBACK ONLY"
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
### 2.5 Skill Resolver (Matrix Skill Discovery)
|
|
156
|
-
|
|
157
|
-
Centralized skill resolution based on agent profiles.
|
|
158
|
-
|
|
159
|
-
```
|
|
160
|
-
Resolution Flow:
|
|
161
|
-
Agent Profile → _index.yaml → Domain Files → Skill Selection → Injection
|
|
162
|
-
|
|
163
|
-
Example:
|
|
164
|
-
backend-engineer
|
|
165
|
-
profile: "backend:execution"
|
|
166
|
-
inherit_from: [backend, architecture, quality, data, languages]
|
|
167
|
-
↓
|
|
168
|
-
Loads: backend.yaml, architecture.yaml, quality.yaml, data.yaml, languages.yaml
|
|
169
|
-
↓
|
|
170
|
-
Filters: skills by agent ID or profile pattern
|
|
171
|
-
↓
|
|
172
|
-
Sorts: by priority_score (10=critical, 1=optional)
|
|
173
|
-
↓
|
|
174
|
-
Injects: skills into agent context
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
### 2.6 Hybrid Skill Orchestration Layer (HSOL) ⚡
|
|
178
|
-
|
|
179
|
-
**NEW (v1.1)**: Intelligent system that bridges static matrix-skills with dynamic community skills via the **find-skills** skill. Discovery runs only for `hard`/`focus` variants; when no variant is set, the router chooses by task assessment.
|
|
180
|
-
|
|
181
|
-
**Dynamic Discovery Interface:**
|
|
182
|
-
- **Skill Path**: `{SKILLS_PATH}/find-skills/SKILL.md`
|
|
183
|
-
- **Browse**: https://skills.sh/
|
|
184
|
-
- **Commands**:
|
|
185
|
-
- `npx skills find [query]` — Search for skills
|
|
186
|
-
- `npx skills add <owner/repo@skill> -g -y` — Install globally
|
|
187
|
-
- `npx skills check` — Check for updates
|
|
188
|
-
|
|
189
|
-
```
|
|
190
|
-
HSOL Resolution Strategy:
|
|
191
|
-
┌─────────────────────────────────────────────────────────────────────────┐
|
|
192
|
-
│ SKILL REQUEST │
|
|
193
|
-
│ │ │
|
|
194
|
-
│ ┌───────────────┴───────────────┐ │
|
|
195
|
-
│ ▼ ▼ │
|
|
196
|
-
│ ┌─────────────────┐ ┌─────────────────┐ │
|
|
197
|
-
│ │ MATRIX LOOKUP │ │ DYNAMIC SEARCH │ │
|
|
198
|
-
│ │ (< 10ms) │ │ (find-skills) │ │
|
|
199
|
-
│ │ Synchronous │ │ Non-blocking │ │
|
|
200
|
-
│ └────────┬────────┘ └────────┬────────┘ │
|
|
201
|
-
│ │ │ │
|
|
202
|
-
│ ▼ ▼ │
|
|
203
|
-
│ ┌─────────────────┐ ┌─────────────────┐ │
|
|
204
|
-
│ │ Fitness Score │ │ Fitness Score │ │
|
|
205
|
-
│ │ (Pre-computed) │ │ (Calculated) │ │
|
|
206
|
-
│ └────────┬────────┘ └────────┬────────┘ │
|
|
207
|
-
│ │ │ │
|
|
208
|
-
│ └───────────────┬──────────────┘ │
|
|
209
|
-
│ ▼ │
|
|
210
|
-
│ ┌─────────────────┐ │
|
|
211
|
-
│ │ DECISION ENGINE │ │
|
|
212
|
-
│ │ Apply Formula │ │
|
|
213
|
-
│ └────────┬────────┘ │
|
|
214
|
-
│ │ │
|
|
215
|
-
│ ┌─────────────────────┼─────────────────────┐ │
|
|
216
|
-
│ ▼ ▼ ▼ │
|
|
217
|
-
│ ┌───────────┐ ┌───────────┐ ┌───────────┐ │
|
|
218
|
-
│ │ USE MATRIX│ │ ENHANCE │ │USE DYNAMIC│ │
|
|
219
|
-
│ │ (≥0.80) │ │ (delta) │ │ (better) │ │
|
|
220
|
-
│ └───────────┘ └───────────┘ └───────────┘ │
|
|
221
|
-
└─────────────────────────────────────────────────────────────────────────┘
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
**Fitness Scoring Formula:**
|
|
225
|
-
```
|
|
226
|
-
SKILL_FITNESS = (0.35 × SEMANTIC_MATCH) +
|
|
227
|
-
(0.25 × SPECIFICITY) +
|
|
228
|
-
(0.20 × TRUST_SCORE) +
|
|
229
|
-
(0.10 × FRESHNESS) +
|
|
230
|
-
(0.10 × SUCCESS_RATE)
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
**Decision Thresholds:**
|
|
234
|
-
| Condition | Action |
|
|
235
|
-
|-----------|--------|
|
|
236
|
-
| Matrix fitness ≥ 0.80 | Use matrix skill immediately |
|
|
237
|
-
| Matrix fitness 0.75-0.79 + dynamic superior by ≥0.15 | Consider dynamic enhancement (async) |
|
|
238
|
-
| Matrix fitness < 0.75 | Search dynamic skills (blocking; use for current task) |
|
|
239
|
-
| Dynamic skill superior | Surface as enhancement option |
|
|
240
|
-
|
|
241
|
-
**Trust Progression (Dynamic Skills):**
|
|
242
|
-
```
|
|
243
|
-
new → evaluating → validated → promoted
|
|
244
|
-
0.3 0.5 0.7 1.0
|
|
245
|
-
│ │ │
|
|
246
|
-
│ │ └── Promoted to matrix-skills
|
|
247
|
-
│ └── 10+ successful uses, user validation
|
|
248
|
-
└── 3 uses without failure
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
**Key Files:**
|
|
252
|
-
- `rules/SKILL.md` — Full protocol
|
|
253
|
-
- `matrix-skills/_dynamic.yaml` — Dynamic skill manifest
|
|
254
|
-
- `matrix-skills/_index.yaml` — HSOL configuration
|
|
255
|
-
|
|
256
|
-
### 2.7 Rule Engine
|
|
257
|
-
|
|
258
|
-
Enforces orchestration laws and protocols.
|
|
259
|
-
|
|
260
|
-
| Rule File | Purpose | Priority |
|
|
261
|
-
|-----------|---------|----------|
|
|
262
|
-
| `ORCHESTRATION-LAWS.md` | 10 inviolable laws | CRITICAL |
|
|
263
|
-
| `EXECUTION-PROTOCOL.md` | Phase execution details | CRITICAL |
|
|
264
|
-
| `ADAPTIVE-EXECUTION.md` | Tier 1/2 decisions | CRITICAL |
|
|
265
|
-
| `AGENT-RULES.md` | Agent behavior guidelines | Reference |
|
|
266
|
-
| `SKILL.md` | Matrix resolution algorithm | Reference |
|
|
267
|
-
| `ERROR-RECOVERY.md` | Error handling protocols | Reference |
|
|
268
|
-
| `QUICK-REFERENCE.md` | Lookup tables | Reference |
|
|
269
|
-
| `BOOTSTRAP.md` | Entry point, paths, routing | Entry |
|
|
270
|
-
|
|
271
|
-
---
|
|
272
|
-
|
|
273
|
-
## 3. Data Flow
|
|
274
|
-
|
|
275
|
-
### 3.1 Request Processing Flow
|
|
276
|
-
|
|
277
|
-
```
|
|
278
|
-
┌──────────┐ ┌───────────┐ ┌───────────┐ ┌───────────┐ ┌──────────┐
|
|
279
|
-
│ USER │───▶│ COMMAND │───▶│ WORKFLOW │───▶│ PHASE │───▶│ AGENT │
|
|
280
|
-
│ INPUT │ │ DETECTION │ │ LOADING │ │ EXECUTION │ │ INVOKE │
|
|
281
|
-
└──────────┘ └───────────┘ └───────────┘ └───────────┘ └──────────┘
|
|
282
|
-
│
|
|
283
|
-
┌──────────┐ ┌───────────┐ ┌───────────┐ ┌───────────┐ │
|
|
284
|
-
│ OUTPUT │◀───│ SYNTHESIS │◀───│ VERIFY │◀───│ SKILL │◀─────────┘
|
|
285
|
-
│ │ │ │ │ CRITERIA │ │ INJECTION │
|
|
286
|
-
└──────────┘ └───────────┘ └───────────┘ └───────────┘
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
### 3.2 Skill Resolution Flow
|
|
290
|
-
|
|
291
|
-
```
|
|
292
|
-
┌─────────────────┐
|
|
293
|
-
│ Agent Profile │
|
|
294
|
-
│ "backend:exec" │
|
|
295
|
-
└────────┬────────┘
|
|
296
|
-
│
|
|
297
|
-
▼
|
|
298
|
-
┌─────────────────┐ ┌───────────────────────────────────┐
|
|
299
|
-
│ _index.yaml │────▶│ Lookup inherit_from: │
|
|
300
|
-
│ │ │ [backend, architecture, quality, │
|
|
301
|
-
│ │ │ data, languages] │
|
|
302
|
-
└─────────────────┘ └───────────────┬───────────────────┘
|
|
303
|
-
│
|
|
304
|
-
┌──────────────────────────────┼──────────────────────────────┐
|
|
305
|
-
▼ ▼ ▼
|
|
306
|
-
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
|
|
307
|
-
│ backend.yaml │ │ architecture. │ │ quality.yaml │
|
|
308
|
-
│ (20 skills) │ │ yaml (9 skills) │ │ (17 skills) │
|
|
309
|
-
└────────┬────────┘ └────────┬────────┘ └────────┬────────┘
|
|
310
|
-
│ │ │
|
|
311
|
-
└────────────────────────────┼────────────────────────────┘
|
|
312
|
-
▼
|
|
313
|
-
┌─────────────────────────┐
|
|
314
|
-
│ Filter by: │
|
|
315
|
-
│ - agents: [agent-id] │
|
|
316
|
-
│ - profiles: [pattern] │
|
|
317
|
-
└───────────┬─────────────┘
|
|
318
|
-
▼
|
|
319
|
-
┌─────────────────────────┐
|
|
320
|
-
│ Sort by priority_score │
|
|
321
|
-
│ (10=critical → 1=low) │
|
|
322
|
-
└───────────┬─────────────┘
|
|
323
|
-
▼
|
|
324
|
-
┌─────────────────────────┐
|
|
325
|
-
│ Inject into Agent │
|
|
326
|
-
│ Context │
|
|
327
|
-
└─────────────────────────┘
|
|
328
|
-
```
|
|
329
|
-
|
|
330
|
-
### 3.3 Deliverable Flow
|
|
331
|
-
|
|
332
|
-
```
|
|
333
|
-
Phase 1: scouter → ./reports/{topic}/scouts/SCOUT-{feature}.md
|
|
334
|
-
Phase 2: researcher → ./reports/{topic}/researchers/RESEARCH-{feature}.md
|
|
335
|
-
Phase 3: planner → ./reports/{topic}/plans/PLAN-{feature}.md
|
|
336
|
-
Phase 4: designer → ./reports/{topic}/designs/DESIGN-{feature}.md
|
|
337
|
-
Phase 5: engineer → Code files (actual implementation)
|
|
338
|
-
Phase 6: tester → Test files
|
|
339
|
-
Phase 7: reviewer → Review report
|
|
340
|
-
Phase 8: Complete → Summary + deliverables list
|
|
341
|
-
```
|
|
342
|
-
|
|
343
|
-
---
|
|
344
|
-
|
|
345
|
-
## 4. Component Relationships
|
|
346
|
-
|
|
347
|
-
### 4.1 Agent Inheritance
|
|
348
|
-
|
|
349
|
-
```
|
|
350
|
-
┌─────────────────┐
|
|
351
|
-
│ ORCHESTRATOR │
|
|
352
|
-
│ (Coordinator) │
|
|
353
|
-
└────────┬────────┘
|
|
354
|
-
│
|
|
355
|
-
┌───────────────────┼───────────────────┐
|
|
356
|
-
▼ ▼ ▼
|
|
357
|
-
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
|
|
358
|
-
│ MANAGER AGENTS │ │ EXECUTOR AGENTS │ │ VALIDATOR AGENTS│
|
|
359
|
-
│ (Coordinate) │ │ (Implement) │ │ (Verify) │
|
|
360
|
-
├─────────────────┤ ├─────────────────┤ ├─────────────────┤
|
|
361
|
-
│ - tech-lead │ │ - backend-eng │ │ - tester │
|
|
362
|
-
│ - planner │ │ - frontend-eng │ │ - reviewer │
|
|
363
|
-
│ - proj-manager │ │ - devops-eng │ │ - debugger │
|
|
364
|
-
│ │ │ - mobile-eng │ │ - security-eng │
|
|
365
|
-
│ │ │ - game-eng │ │ - perf-engineer │
|
|
366
|
-
└─────────────────┘ └─────────────────┘ └─────────────────┘
|
|
367
|
-
```
|
|
368
|
-
|
|
369
|
-
### 4.2 Skill Domain Relationships
|
|
370
|
-
|
|
371
|
-
```
|
|
372
|
-
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
373
|
-
│ SKILL DOMAINS (19) │
|
|
374
|
-
├─────────────────────────────────────────────────────────────────────────────┤
|
|
375
|
-
│ ┌──────────────────────────────────────────────────────────────────────┐ │
|
|
376
|
-
│ │ IMPLEMENTATION DOMAINS │ │
|
|
377
|
-
│ │ backend(20) → frontend(18) → mobile(8) → gaming(3) │ │
|
|
378
|
-
│ └──────────────────────────────────────────────────────────────────────┘ │
|
|
379
|
-
│ ┌──────────────────────────────────────────────────────────────────────┐ │
|
|
380
|
-
│ │ ARCHITECTURE DOMAINS │ │
|
|
381
|
-
│ │ architecture(9) → data(7) → cloud(11) │ │
|
|
382
|
-
│ └──────────────────────────────────────────────────────────────────────┘ │
|
|
383
|
-
│ ┌──────────────────────────────────────────────────────────────────────┐ │
|
|
384
|
-
│ │ QUALITY DOMAINS │ │
|
|
385
|
-
│ │ quality(17) → security(6) → performance(1) │ │
|
|
386
|
-
│ └──────────────────────────────────────────────────────────────────────┘ │
|
|
387
|
-
│ ┌──────────────────────────────────────────────────────────────────────┐ │
|
|
388
|
-
│ │ PLANNING DOMAINS │ │
|
|
389
|
-
│ │ planning(9) → research(11) → management(4) │ │
|
|
390
|
-
│ └──────────────────────────────────────────────────────────────────────┘ │
|
|
391
|
-
│ ┌──────────────────────────────────────────────────────────────────────┐ │
|
|
392
|
-
│ │ DESIGN DOMAINS │ │
|
|
393
|
-
│ │ design(10) │ │
|
|
394
|
-
│ └──────────────────────────────────────────────────────────────────────┘ │
|
|
395
|
-
│ ┌──────────────────────────────────────────────────────────────────────┐ │
|
|
396
|
-
│ │ FOUNDATION DOMAINS │ │
|
|
397
|
-
│ │ languages(17) → tools(31) → devops(15) → ai_ml(13) → mcp(8) │ │
|
|
398
|
-
│ └──────────────────────────────────────────────────────────────────────┘ │
|
|
399
|
-
└─────────────────────────────────────────────────────────────────────────────┘
|
|
400
|
-
```
|
|
401
|
-
|
|
402
|
-
---
|
|
403
|
-
|
|
404
|
-
## 5. Design Patterns
|
|
405
|
-
|
|
406
|
-
### 5.1 Orchestrator Pattern
|
|
407
|
-
|
|
408
|
-
The central coordination pattern that governs all work.
|
|
409
|
-
|
|
410
|
-
```
|
|
411
|
-
┌──────────────────────────────────────────────────────────────┐
|
|
412
|
-
│ ORCHESTRATOR PATTERN │
|
|
413
|
-
├──────────────────────────────────────────────────────────────┤
|
|
414
|
-
│ Principle: Coordinate, never implement │
|
|
415
|
-
│ │
|
|
416
|
-
│ Responsibilities: │
|
|
417
|
-
│ ✅ Route commands to workflows │
|
|
418
|
-
│ ✅ Delegate tasks to specialists │
|
|
419
|
-
│ ✅ Verify exit criteria │
|
|
420
|
-
│ ✅ Synthesize outputs │
|
|
421
|
-
│ │
|
|
422
|
-
│ Anti-patterns: │
|
|
423
|
-
│ ❌ Write code directly │
|
|
424
|
-
│ ❌ Debug issues directly │
|
|
425
|
-
│ ❌ Test code directly │
|
|
426
|
-
│ ❌ Design systems directly │
|
|
427
|
-
└──────────────────────────────────────────────────────────────┘
|
|
428
|
-
```
|
|
429
|
-
|
|
430
|
-
### 5.2 Profile-Based Skill Injection
|
|
431
|
-
|
|
432
|
-
Replaces hardcoded skill lists with declarative profiles.
|
|
433
|
-
|
|
434
|
-
```yaml
|
|
435
|
-
# OLD (hardcoded)
|
|
436
|
-
skills: [api-patterns, database-design, nodejs-best-practices]
|
|
437
|
-
|
|
438
|
-
# NEW (profile-based)
|
|
439
|
-
profile: "backend:execution"
|
|
440
|
-
# Skills resolved at runtime from Matrix
|
|
441
|
-
```
|
|
442
|
-
|
|
443
|
-
**Benefits**:
|
|
444
|
-
- Single source of truth
|
|
445
|
-
- Centralized maintenance
|
|
446
|
-
- Consistent skill-agent mapping
|
|
447
|
-
- No agent file updates for new skills
|
|
448
|
-
|
|
449
|
-
### 5.3 Router Pattern
|
|
450
|
-
|
|
451
|
-
Commands use a router → variant pattern.
|
|
452
|
-
|
|
453
|
-
```
|
|
454
|
-
/command → commands/{command}.md (router)
|
|
455
|
-
└→ Analyzes request
|
|
456
|
-
└→ Selects variant (:fast, :hard, etc.)
|
|
457
|
-
└→ Loads: commands/{command}/{variant}.md
|
|
458
|
-
```
|
|
459
|
-
|
|
460
|
-
### 5.4 Phase-Based Execution
|
|
461
|
-
|
|
462
|
-
All workflows execute as discrete phases.
|
|
463
|
-
|
|
464
|
-
```yaml
|
|
465
|
-
phase_pattern:
|
|
466
|
-
entry: "Pre-flight checks (load rules)"
|
|
467
|
-
phases:
|
|
468
|
-
- phase_1: "Delegate to agent A, verify, emit deliverable"
|
|
469
|
-
- phase_2: "Delegate to agent B, verify, emit deliverable"
|
|
470
|
-
- phase_N: "Final agent, verify, emit deliverable"
|
|
471
|
-
exit: "Completion summary"
|
|
472
|
-
```
|
|
473
|
-
|
|
474
|
-
### 5.5 Just-In-Time Loading
|
|
475
|
-
|
|
476
|
-
Resources loaded only when needed.
|
|
477
|
-
|
|
478
|
-
```yaml
|
|
479
|
-
jit_loading:
|
|
480
|
-
rule_files: "Load per workflow needs"
|
|
481
|
-
agent_files: "Load per phase delegation"
|
|
482
|
-
skill_files: "Load based on Matrix resolution"
|
|
483
|
-
prior_deliverables: "Load if required by current phase"
|
|
484
|
-
```
|
|
485
|
-
|
|
486
|
-
---
|
|
487
|
-
|
|
488
|
-
## 6. Integration Points
|
|
489
|
-
|
|
490
|
-
### 6.1 Tool Integration Architecture
|
|
491
|
-
|
|
492
|
-
```
|
|
493
|
-
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
494
|
-
│ CLI INSTALLER (cli/install.js) │
|
|
495
|
-
└────────────────────────────────────┬────────────────────────────────────────┘
|
|
496
|
-
│
|
|
497
|
-
┌──────────────┬────────────┼────────────┬──────────────┐
|
|
498
|
-
▼ ▼ ▼ ▼ ▼
|
|
499
|
-
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
|
|
500
|
-
│ CURSOR │ │ COPILOT │ │ ANTIGRAVITY │ │ CLAUDE CODE │ │ CODEX │
|
|
501
|
-
├─────────────────┤ ├─────────────────┤ ├─────────────────┤ ├─────────────────┤ ├─────────────────┤
|
|
502
|
-
│ ~/.cursor/ │ │ ~/.copilot/ │ │ ~/.gemini/ │ │ ~/.claude/ │ │ ~/.codex/ │
|
|
503
|
-
│ ├─ rules/ │ │ ├─ commands/ │ │ └─ antigravity/ │ │ ├─ commands/ │ │ ├─ commands/ │
|
|
504
|
-
│ ├─ commands/ │ │ ├─ skills/ │ │ ├─ agents/ │ │ ├─ skills/ │ │ ├─ skills/ │
|
|
505
|
-
│ ├─ agents/ │ │ ├─ agents/ │ │ ├─ commands/│ │ ├─ agents/ │ │ ├─ agents/ │
|
|
506
|
-
│ └─ skills/ │ │ └─ matrix-skills│ │ └─ skills/ │ │ └─ matrix-skills│ │ └─ matrix-skills│
|
|
507
|
-
└─────────────────┘ └─────────────────┘ └─────────────────┘ └─────────────────┘ └─────────────────┘
|
|
508
|
-
```
|
|
509
|
-
|
|
510
|
-
### 6.2 Entry Point Files
|
|
511
|
-
|
|
512
|
-
| Tool | Entry File | Location |
|
|
513
|
-
|------|------------|----------|
|
|
514
|
-
| Claude Code | `CLAUDE.md` | `~/.claude/` |
|
|
515
|
-
| Cursor | `rules/agent-assistant.mdc` | `~/.cursor/rules/` |
|
|
516
|
-
| Copilot | `agent-assistant.agent.md` | `~/.copilot/` + VS Code prompts |
|
|
517
|
-
| Codex | `AGENTS.md` (primary), `CODEX.md` (compat) | `~/.codex/` |
|
|
518
|
-
| Antigravity | `GEMINI.md` | `~/.gemini/` |
|
|
519
|
-
|
|
520
|
-
---
|
|
521
|
-
|
|
522
|
-
## 7. Scalability Considerations
|
|
523
|
-
|
|
524
|
-
### 7.1 Adding New Agents
|
|
525
|
-
|
|
526
|
-
1. Create agent file: `agents/{agent-name}.md`
|
|
527
|
-
2. Follow template: `AGENT-TEMPLATE.md`
|
|
528
|
-
3. Add profile mapping in `matrix-skills/_index.yaml`
|
|
529
|
-
4. Done — no other changes needed
|
|
530
|
-
|
|
531
|
-
### 7.2 Adding New Skills
|
|
532
|
-
|
|
533
|
-
1. Create skill folder: `skills/{skill-id}/SKILL.md`
|
|
534
|
-
2. Add entry to appropriate domain file: `matrix-skills/{domain}.yaml`
|
|
535
|
-
3. Done — no agent files need modification
|
|
536
|
-
|
|
537
|
-
### 7.3 Adding New Commands
|
|
538
|
-
|
|
539
|
-
1. Create router file: `commands/{command}.md`
|
|
540
|
-
2. Create variant files: `commands/{command}/{variant}.md`
|
|
541
|
-
3. Update command routing in entry point files
|
|
542
|
-
4. Done — follows existing patterns
|
|
543
|
-
|
|
544
|
-
---
|
|
545
|
-
|
|
546
|
-
## 8. Architectural Decisions
|
|
547
|
-
|
|
548
|
-
### ADR-001: Tiered Execution
|
|
549
|
-
|
|
550
|
-
**Context**: Need reliable agent delegation across different AI tools.
|
|
551
|
-
|
|
552
|
-
**Decision**: Use TIER 1 (native sub-agent tools) when available, TIER 2 (agent embodiment) as fallback.
|
|
553
|
-
|
|
554
|
-
**Rationale**:
|
|
555
|
-
- TIER 1 provides isolated context (no memory pollution)
|
|
556
|
-
- TIER 2 ensures completion when tools unavailable
|
|
557
|
-
- Guaranteed task completion
|
|
558
|
-
|
|
559
|
-
### ADR-002: Matrix Skill Discovery
|
|
560
|
-
|
|
561
|
-
**Context**: Hardcoded skill lists in agent files cause maintenance overhead and inconsistency.
|
|
562
|
-
|
|
563
|
-
**Decision**: Replace hardcoded lists with profile-based skill resolution via centralized Matrix.
|
|
564
|
-
|
|
565
|
-
**Rationale**:
|
|
566
|
-
- Single source of truth
|
|
567
|
-
- Add skill = update 1 file
|
|
568
|
-
- Guaranteed consistency
|
|
569
|
-
- Reduced agent file size
|
|
570
|
-
|
|
571
|
-
### ADR-003: Phase-Based Workflows
|
|
572
|
-
|
|
573
|
-
**Context**: Complex features require multiple specialists in sequence.
|
|
574
|
-
|
|
575
|
-
**Decision**: All workflows execute as sequential phases with explicit exit criteria.
|
|
576
|
-
|
|
577
|
-
**Rationale**:
|
|
578
|
-
- Clear handoff points
|
|
579
|
-
- Verifiable progress
|
|
580
|
-
- Deliverable at each phase
|
|
581
|
-
- Quality gates between phases
|
|
582
|
-
|
|
583
|
-
### ADR-004: Just-In-Time Loading
|
|
584
|
-
|
|
585
|
-
**Context**: Loading all resources upfront wastes context window.
|
|
586
|
-
|
|
587
|
-
**Decision**: Load resources only when needed by current phase.
|
|
588
|
-
|
|
589
|
-
**Rationale**:
|
|
590
|
-
- Efficient context usage
|
|
591
|
-
- Faster initial response
|
|
592
|
-
- Reduced memory pressure
|
|
593
|
-
|
|
594
|
-
---
|
|
595
|
-
|
|
596
|
-
## 9. Security Considerations
|
|
597
|
-
|
|
598
|
-
| Aspect | Implementation |
|
|
599
|
-
|--------|----------------|
|
|
600
|
-
| **Code Injection** | No code execution from agent files |
|
|
601
|
-
| **Path Traversal** | Paths validated by CLI installer |
|
|
602
|
-
| **Privilege Escalation** | Agents cannot elevate their permissions |
|
|
603
|
-
| **Secret Exposure** | No credentials stored in framework files |
|
|
604
|
-
|
|
605
|
-
---
|
|
606
|
-
|
|
607
|
-
## 10. Related Documentation
|
|
608
|
-
|
|
609
|
-
| Document | Purpose |
|
|
610
|
-
|----------|---------|
|
|
611
|
-
| `knowledge-overview.md` | Project introduction, goals, tech stack |
|
|
612
|
-
| `knowledge-domain.md` | Data models, API contracts, entities |
|
|
613
|
-
| `knowledge-source-base.md` | Directory structure, file purposes |
|
|
614
|
-
| `knowledge-standards.md` | Code style, naming conventions |
|
|
615
|
-
| `rules/ORCHESTRATION-LAWS.md` | 10 inviolable laws |
|
|
616
|
-
| `rules/EXECUTION-PROTOCOL.md` | Phase execution details |
|
|
617
|
-
| `rules/ADAPTIVE-EXECUTION.md` | Tier 1/2 decisions |
|
|
618
|
-
|
|
619
|
-
---
|
|
620
|
-
|
|
621
|
-
**Agent Assistant Architecture** — _Layered, Extensible, Maintainable_
|