@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
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
# Agent Assistant — Data Flow
|
|
2
|
+
|
|
3
|
+
> **Purpose**: Request lifecycle, CLI install flow, skill resolution flow, and Golden Triangle team flow — all with Mermaid diagrams
|
|
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. [User Command Lifecycle](#user-command-lifecycle)
|
|
13
|
+
2. [CLI Install Flow](#cli-install-flow)
|
|
14
|
+
3. [Skill Resolution Flow (HSOL)](#skill-resolution-flow-hsol)
|
|
15
|
+
4. [Golden Triangle Team Flow](#golden-triangle-team-flow)
|
|
16
|
+
5. [Error Recovery Flow](#error-recovery-flow)
|
|
17
|
+
6. [Evidence Sources](#evidence-sources)
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## User Command Lifecycle
|
|
22
|
+
|
|
23
|
+
This is the primary data flow — from a user typing a prompt to receiving a structured deliverable. The orchestrator detects the command, routes to a variant, then executes phases sequentially, delegating each phase to a specialist agent.
|
|
24
|
+
|
|
25
|
+
```mermaid
|
|
26
|
+
sequenceDiagram
|
|
27
|
+
participant U as User
|
|
28
|
+
participant EP as Platform Entry Point
|
|
29
|
+
participant ORC as Orchestrator (CORE.md)
|
|
30
|
+
participant R as Command Router
|
|
31
|
+
participant V as Variant Workflow
|
|
32
|
+
participant A as Agent (TIER 1 or 2)
|
|
33
|
+
participant S as Skill Layer (HSOL)
|
|
34
|
+
|
|
35
|
+
U->>EP: User prompt or /command
|
|
36
|
+
EP->>ORC: Load CORE.md (identity + laws)
|
|
37
|
+
|
|
38
|
+
Note over ORC: DETECT command<br/>(explicit or NLP mapping)
|
|
39
|
+
ORC->>ORC: Load PHASES.md + AGENTS.md
|
|
40
|
+
ORC->>R: Route to commands/{cmd}.md
|
|
41
|
+
|
|
42
|
+
Note over R: Parse $ARGUMENTS<br/>Assess complexity
|
|
43
|
+
R->>V: Route to commands/{cmd}/{variant}.md
|
|
44
|
+
|
|
45
|
+
Note over V: PRE-FLIGHT complete<br/>Begin phase execution
|
|
46
|
+
|
|
47
|
+
loop For each Phase N
|
|
48
|
+
V->>ORC: Phase N assignment
|
|
49
|
+
ORC->>ORC: Parse requirements into Registry
|
|
50
|
+
|
|
51
|
+
alt TIER 1 available
|
|
52
|
+
ORC->>A: runSubagent(agent, context)
|
|
53
|
+
Note over A: Isolated context
|
|
54
|
+
else TIER 2 fallback
|
|
55
|
+
ORC->>ORC: EMBODY agent
|
|
56
|
+
Note over ORC: Shared context<br/>Read agent file completely
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
A->>S: Request skill injection (profile-based)
|
|
60
|
+
S->>A: Return matched skills (fitness ≥ threshold)
|
|
61
|
+
A->>A: Execute phase work
|
|
62
|
+
A->>ORC: Return deliverable
|
|
63
|
+
|
|
64
|
+
Note over ORC: VERIFY exit criteria<br/>Mark phase complete<br/>Deliverable becomes immutable (L8)
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
ORC->>U: Deliver final result
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Key Data at Each Stage
|
|
71
|
+
|
|
72
|
+
| Stage | Data Flowing | Format |
|
|
73
|
+
|-------|-------------|--------|
|
|
74
|
+
| User → Entry Point | Natural language or `/command:variant args` | Free text |
|
|
75
|
+
| Entry Point → Orchestrator | Identity binding + path configuration | CORE.md loaded into context |
|
|
76
|
+
| Orchestrator → Router | Command name + arguments | Mapped via REFERENCE.md table |
|
|
77
|
+
| Router → Variant | Complexity assessment + user arguments | Redirect to variant file |
|
|
78
|
+
| Variant → Orchestrator | Phase assignment (agent name, task, criteria) | Phase definition in variant file |
|
|
79
|
+
| Orchestrator → Agent | Requirements registry, task description, acceptance criteria, constraints | Structured handoff context |
|
|
80
|
+
| Agent → Skill Layer | Agent profile from YAML frontmatter (e.g., `backend:execution`) | Profile string |
|
|
81
|
+
| Skill Layer → Agent | Matched SKILL.md contents sorted by fitness score | Markdown content |
|
|
82
|
+
| Agent → Orchestrator | Completed deliverable | Per PHASES.md output format |
|
|
83
|
+
| Orchestrator → User | Final result (all phases composed) | Markdown with phase sections |
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## CLI Install Flow
|
|
88
|
+
|
|
89
|
+
The CLI installer is the distribution mechanism — it copies framework files from the npm package to each platform's global directory, performing placeholder substitution on every Markdown and YAML file.
|
|
90
|
+
|
|
91
|
+
```mermaid
|
|
92
|
+
flowchart TD
|
|
93
|
+
START["npm install @namch/agent-assistant<br/>or npx agent-assistant install {tool}"]
|
|
94
|
+
|
|
95
|
+
PARSE["Parse CLI arguments<br/>install | uninstall | list"]
|
|
96
|
+
RESOLVE["Resolve target platform(s)<br/>cursor | copilot | antigravity | codex | --all"]
|
|
97
|
+
|
|
98
|
+
subgraph "Per Platform"
|
|
99
|
+
DIRS["Create directory structure<br/>~/.{tool}/skills/agent-assistant/"]
|
|
100
|
+
|
|
101
|
+
subgraph "Copy Loop (all framework files)"
|
|
102
|
+
READ["Read source file from npm package"]
|
|
103
|
+
REPLACE["Apply {TOOL} replacements:<br/>~/.{TOOL}/skills/ → ~/.cursor/skills/<br/>{TOOL} → cursor<br/>{HOME} → ~"]
|
|
104
|
+
WRITE["Write transformed file to target"]
|
|
105
|
+
SYNC["fs.sync for reliability"]
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
ASSETS["Copy platform-specific assets<br/>from code-assistants/{tool}-assistant/"]
|
|
109
|
+
VERIFY["Verification phase<br/>Check all files written"]
|
|
110
|
+
REPORT["Summary report with statistics"]
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
START --> PARSE --> RESOLVE
|
|
114
|
+
RESOLVE --> DIRS
|
|
115
|
+
DIRS --> READ --> REPLACE --> WRITE --> SYNC
|
|
116
|
+
SYNC -->|"Next file"| READ
|
|
117
|
+
SYNC -->|"All files done"| ASSETS
|
|
118
|
+
ASSETS --> VERIFY --> REPORT
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Files Distributed per Platform
|
|
122
|
+
|
|
123
|
+
| Category | Source Path | Destination |
|
|
124
|
+
|----------|-----------|-------------|
|
|
125
|
+
| Rules | `rules/*.md` | `~/.{tool}/skills/agent-assistant/rules/` |
|
|
126
|
+
| Agents | `agents/*.md` | `~/.{tool}/skills/agent-assistant/agents/` |
|
|
127
|
+
| Team Agents | `agents/teams/*/` | `~/.{tool}/skills/agent-assistant/agents/teams/` |
|
|
128
|
+
| Commands | `commands/**/*.md` | `~/.{tool}/skills/agent-assistant/commands/` |
|
|
129
|
+
| Matrix Skills | `matrix-skills/*.yaml` | `~/.{tool}/skills/agent-assistant/matrix-skills/` |
|
|
130
|
+
| Skills | `skills/*/SKILL.md` | `~/.{tool}/skills/*/SKILL.md` (at skills root) |
|
|
131
|
+
| Documents | `documents/**` | `~/.{tool}/skills/agent-assistant/documents/` |
|
|
132
|
+
| Platform Assets | `code-assistants/{tool}-assistant/` | Platform-specific locations (varies) |
|
|
133
|
+
|
|
134
|
+
### Replacement Table (from cli/install.js)
|
|
135
|
+
|
|
136
|
+
All `.md` and `.yaml` files undergo text replacement. The replacement map is platform-specific:
|
|
137
|
+
|
|
138
|
+
| Placeholder | Cursor | Copilot | Codex |
|
|
139
|
+
|------------|--------|---------|-------|
|
|
140
|
+
| `{TOOL}` | `cursor` | `copilot` | `codex` |
|
|
141
|
+
| `~/.{TOOL}/skills/agent-assistant/` | `~/.cursor/skills/agent-assistant/` | `~/.copilot/skills/agent-assistant/` | `~/.codex/skills/agent-assistant/` |
|
|
142
|
+
| `{HOME}` | `~` | `~` | `~` |
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Skill Resolution Flow (HSOL)
|
|
147
|
+
|
|
148
|
+
The Hybrid Skill Orchestration Layer resolves domain skills for an agent based on their profile, applies a 5-factor fitness score, and either uses matrix skills directly or triggers community discovery for gaps.
|
|
149
|
+
|
|
150
|
+
```mermaid
|
|
151
|
+
flowchart TD
|
|
152
|
+
TRIGGER["Agent delegated for phase<br/>Profile: backend:execution"]
|
|
153
|
+
|
|
154
|
+
ASSESS["Assess task complexity<br/>Simple or Complex?"]
|
|
155
|
+
|
|
156
|
+
SIMPLE["Simple → Skip skill resolution<br/>Use base knowledge"]
|
|
157
|
+
|
|
158
|
+
PARSE["Parse agent profile<br/>from YAML frontmatter"]
|
|
159
|
+
LOAD["Load inherited domains<br/>from _index.yaml"]
|
|
160
|
+
FILTER["Filter skills by relevance_mapping<br/>from domain YAML files"]
|
|
161
|
+
|
|
162
|
+
SCORE["Calculate fitness score per skill:<br/>0.35 × Semantic Match<br/>+ 0.25 × Specificity<br/>+ 0.20 × Trust Level<br/>+ 0.10 × Freshness<br/>+ 0.10 × Success Rate"]
|
|
163
|
+
|
|
164
|
+
THRESHOLD{{"Fitness ≥ 0.8?"}}
|
|
165
|
+
ASYNC{{"Fitness 0.75–0.8?"}}
|
|
166
|
+
|
|
167
|
+
USE["Execute with matrix skills<br/>(skip discovery)"]
|
|
168
|
+
RECOMMEND["Execute with matrix skills<br/>+ surface recommendation later"]
|
|
169
|
+
|
|
170
|
+
DISCOVER["BLOCKING: Run dynamic discovery<br/>npx skills find [query]"]
|
|
171
|
+
INSTALL["Install discovered skill<br/>npx skills add owner/repo@skill"]
|
|
172
|
+
|
|
173
|
+
TRUST["Apply trust level:<br/>Matrix = 1.0 (always trusted)<br/>Dynamic = 0.3 (new) → 1.0 (promoted)"]
|
|
174
|
+
|
|
175
|
+
INJECT["Inject skill SKILL.md content<br/>into agent context"]
|
|
176
|
+
|
|
177
|
+
TRIGGER --> ASSESS
|
|
178
|
+
ASSESS -->|"Simple"| SIMPLE
|
|
179
|
+
ASSESS -->|"Complex"| PARSE
|
|
180
|
+
PARSE --> LOAD --> FILTER --> SCORE
|
|
181
|
+
SCORE --> THRESHOLD
|
|
182
|
+
THRESHOLD -->|"≥ 0.8"| USE
|
|
183
|
+
THRESHOLD -->|"< 0.8"| ASYNC
|
|
184
|
+
ASYNC -->|"0.75–0.8"| RECOMMEND
|
|
185
|
+
ASYNC -->|"< 0.75"| DISCOVER
|
|
186
|
+
DISCOVER --> INSTALL --> TRUST
|
|
187
|
+
TRUST --> INJECT
|
|
188
|
+
USE --> INJECT
|
|
189
|
+
RECOMMEND --> INJECT
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### Trust Progression Lifecycle (from SKILLS.md)
|
|
193
|
+
|
|
194
|
+
```mermaid
|
|
195
|
+
stateDiagram-v2
|
|
196
|
+
[*] --> NEW: Dynamic skill installed
|
|
197
|
+
NEW --> EVALUATING: 3 successful executions
|
|
198
|
+
EVALUATING --> VALIDATED: 10 successful executions
|
|
199
|
+
VALIDATED --> PROMOTED: Auto-promote to matrix
|
|
200
|
+
PROMOTED --> [*]: Added to matrix-skills YAML
|
|
201
|
+
|
|
202
|
+
state NEW {
|
|
203
|
+
note right of NEW: Trust = 0.3
|
|
204
|
+
}
|
|
205
|
+
state EVALUATING {
|
|
206
|
+
note right of EVALUATING: Trust = 0.5
|
|
207
|
+
}
|
|
208
|
+
state VALIDATED {
|
|
209
|
+
note right of VALIDATED: Trust = 0.7
|
|
210
|
+
}
|
|
211
|
+
state PROMOTED {
|
|
212
|
+
note right of PROMOTED: Trust = 1.0
|
|
213
|
+
}
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
### Variant Impact on Discovery (from SKILLS.md)
|
|
217
|
+
|
|
218
|
+
| Variant | Discovery Behavior |
|
|
219
|
+
|---------|-------------------|
|
|
220
|
+
| `:fast` | Skip — use matrix skills only, no dynamic discovery |
|
|
221
|
+
| `:hard` | Check matrix fitness; trigger discovery if < 0.8 |
|
|
222
|
+
| `:focus` | Check matrix fitness; trigger discovery if < 0.8 |
|
|
223
|
+
| `:team` | Same as `:hard`/`:focus` — applies per agent in the triangle |
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## Golden Triangle Team Flow
|
|
228
|
+
|
|
229
|
+
When a `:team` variant is activated, each phase spawns exactly 3 agents who collaborate through a structured adversarial protocol with file-based communication.
|
|
230
|
+
|
|
231
|
+
```mermaid
|
|
232
|
+
sequenceDiagram
|
|
233
|
+
participant ORC as Orchestrator
|
|
234
|
+
participant TL as Tech Lead
|
|
235
|
+
participant EX as Executor
|
|
236
|
+
participant RV as Reviewer
|
|
237
|
+
participant MB as Mailbox<br/>(append-only file)
|
|
238
|
+
participant TK as Shared Task List
|
|
239
|
+
|
|
240
|
+
ORC->>TL: Phase N assignment (:team variant)
|
|
241
|
+
|
|
242
|
+
Note over TL: Decompose into tasks
|
|
243
|
+
TL->>TK: Create Shared Task List
|
|
244
|
+
TL->>MB: TASK_ASSIGNMENT → Executor
|
|
245
|
+
|
|
246
|
+
EX->>TK: Read task assignments
|
|
247
|
+
Note over EX: Implement deliverable
|
|
248
|
+
EX->>MB: SUBMISSION → Reviewer
|
|
249
|
+
|
|
250
|
+
RV->>MB: Read submission
|
|
251
|
+
Note over RV: Devil's Advocate review<br/>"Assume defects exist"
|
|
252
|
+
|
|
253
|
+
alt PASS
|
|
254
|
+
RV->>MB: REVIEW (PASS) → All
|
|
255
|
+
Note over TL,RV: Consensus reached
|
|
256
|
+
else FAIL (Round 1)
|
|
257
|
+
RV->>MB: REVIEW (FAIL) → Executor
|
|
258
|
+
|
|
259
|
+
alt Executor agrees
|
|
260
|
+
EX->>EX: Apply fixes
|
|
261
|
+
EX->>MB: RESUBMISSION → Reviewer
|
|
262
|
+
else Executor defends
|
|
263
|
+
EX->>MB: DEFENSE (with evidence) → Reviewer
|
|
264
|
+
Note over EX: Must include technical proof<br/>(benchmarks, specs, references)
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
RV->>MB: Re-review
|
|
268
|
+
|
|
269
|
+
alt PASS
|
|
270
|
+
RV->>MB: REVIEW (PASS) → All
|
|
271
|
+
else FAIL (Round 2-3)
|
|
272
|
+
Note over RV: Loop continues<br/>Max 3 rounds
|
|
273
|
+
end
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
alt No consensus after 3 rounds
|
|
277
|
+
RV->>TL: Escalate unresolved dispute
|
|
278
|
+
TL->>MB: Read ALL exchanges
|
|
279
|
+
Note over TL: Evaluate evidence quality<br/>Not seniority or role
|
|
280
|
+
TL->>MB: DECISION (binding) → All
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
Note over TL,RV: CONSENSUS STAMP<br/>TechLead ✓ | Executor ✓ | Reviewer ✓
|
|
284
|
+
TL->>ORC: Return consensus-stamped deliverable
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
### Communication Artifacts
|
|
288
|
+
|
|
289
|
+
| Artifact | Location | Owner | Rules |
|
|
290
|
+
|----------|----------|-------|-------|
|
|
291
|
+
| Shared Task List | Inline in phase output | Tech Lead | Status tracking: assignments, priorities, completion |
|
|
292
|
+
| Mailbox | `./reports/{topic}/MAILBOX-{date}.md` | All agents (append-only) | No edits or deletions; every exchange is logged |
|
|
293
|
+
|
|
294
|
+
### Message Types in Mailbox
|
|
295
|
+
|
|
296
|
+
| Type | From → To | Purpose |
|
|
297
|
+
|------|-----------|---------|
|
|
298
|
+
| `TASK_ASSIGNMENT` | Tech Lead → Executor | Assign implementation tasks |
|
|
299
|
+
| `SUBMISSION` | Executor → Reviewer | Submit completed work for review |
|
|
300
|
+
| `REVIEW (PASS)` | Reviewer → All | Approve submission |
|
|
301
|
+
| `REVIEW (FAIL)` | Reviewer → Executor | Reject with specific issues |
|
|
302
|
+
| `DEFENSE` | Executor → Reviewer | Defend work with evidence |
|
|
303
|
+
| `RESUBMISSION` | Executor → Reviewer | Resubmit after fixes |
|
|
304
|
+
| `DECISION` | Tech Lead → All | Binding arbitration (after 3 rounds) |
|
|
305
|
+
|
|
306
|
+
### C8 Enforcement Checkpoints (from TEAMS.md)
|
|
307
|
+
|
|
308
|
+
| Checkpoint | Rule | Block Level |
|
|
309
|
+
|-----------|------|-------------|
|
|
310
|
+
| C8-TEAMS-01 | Mailbox is append-only and required for all inter-agent exchanges | BLOCK |
|
|
311
|
+
| C8-TEAMS-02 | Debate capped at 3 rounds; unresolved disputes escalate to Tech Lead | BLOCK |
|
|
312
|
+
| C8-TEAMS-03 | Phase output requires explicit consensus stamp before release | BLOCK |
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
316
|
+
## Error Recovery Flow
|
|
317
|
+
|
|
318
|
+
When errors occur during any flow above, the framework follows a self-healing protocol with 5 error classes.
|
|
319
|
+
|
|
320
|
+
```mermaid
|
|
321
|
+
flowchart TD
|
|
322
|
+
ERROR["Error Detected"]
|
|
323
|
+
CAPTURE["1. CAPTURE<br/>error type, phase, agent, state"]
|
|
324
|
+
CLASSIFY["2. CLASSIFY"]
|
|
325
|
+
|
|
326
|
+
E1["E1: Transient<br/>(timeout, network)"]
|
|
327
|
+
E1B["E1b: Output Overflow<br/>(file too large)"]
|
|
328
|
+
E2["E2: Recoverable<br/>(logic error)"]
|
|
329
|
+
E3["E3: Blocking<br/>(critical failure)"]
|
|
330
|
+
E4["E4: Cascading<br/>(affects downstream)"]
|
|
331
|
+
|
|
332
|
+
RETRY["Retry 3× with backoff"]
|
|
333
|
+
CHUNK["Switch to chunked<br/>deliverable strategy"]
|
|
334
|
+
ALT["Attempt alternative<br/>approach"]
|
|
335
|
+
SAFE["Safe point →<br/>Best option →<br/>Auto-recover"]
|
|
336
|
+
ROLLBACK["Stop propagation →<br/>Rollback →<br/>Report impact"]
|
|
337
|
+
|
|
338
|
+
RESUME["4. RESUME immediately"]
|
|
339
|
+
ESCALATE["USER ESCALATION<br/>⚠️ BLOCKED — Decision Required<br/>Options A/B/C/D"]
|
|
340
|
+
|
|
341
|
+
ERROR --> CAPTURE --> CLASSIFY
|
|
342
|
+
CLASSIFY --> E1 --> RETRY --> RESUME
|
|
343
|
+
CLASSIFY --> E1B --> CHUNK --> RESUME
|
|
344
|
+
CLASSIFY --> E2 --> ALT --> RESUME
|
|
345
|
+
CLASSIFY --> E3 --> SAFE --> RESUME
|
|
346
|
+
CLASSIFY --> E4 --> ROLLBACK --> RESUME
|
|
347
|
+
|
|
348
|
+
RETRY -->|"3 retries failed"| ESCALATE
|
|
349
|
+
ALT -->|"No alternative"| ESCALATE
|
|
350
|
+
SAFE -->|"Cannot auto-recover"| ESCALATE
|
|
351
|
+
ROLLBACK -->|"Rollback failed"| ESCALATE
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
---
|
|
355
|
+
|
|
356
|
+
## Evidence Sources
|
|
357
|
+
|
|
358
|
+
| Source | Path | What It Provides |
|
|
359
|
+
|--------|------|------------------|
|
|
360
|
+
| CORE.md v4.1 | `rules/CORE.md` | Execution loop (5 steps), command routing table, tiered execution, NLP detection |
|
|
361
|
+
| PHASES.md | `rules/PHASES.md` | Requirements intake format, phase output format (standard + GT), exit criteria |
|
|
362
|
+
| AGENTS.md | `rules/AGENTS.md` | TIER 1/TIER 2 handoff protocol, tool discovery, embodiment announcement format |
|
|
363
|
+
| SKILLS.md | `rules/SKILLS.md` | Resolution algorithm (6 steps), fitness formula (5 factors), trust lifecycle (4 stages), variant behavior |
|
|
364
|
+
| TEAMS.md | `rules/TEAMS.md` | Golden Triangle diagram, 3 roles, debate flow, max 3 rounds, defense rules, mailbox protocol, C8 checkpoints |
|
|
365
|
+
| ERRORS.md | `rules/ERRORS.md` | Error classification table (E1–E4), recovery protocol (5 steps), user escalation format |
|
|
366
|
+
| _index.yaml | `matrix-skills/_index.yaml` | HSOL config: async_threshold 0.8, discovery settings, variant apply rules |
|
|
367
|
+
| cli/install.js | `cli/install.js` | Platform TOOLS config, replacement maps, directory creation, file copy logic |
|
|
368
|
+
| package.json | `package.json` | npm scripts for install/uninstall per platform, files array for distribution |
|
|
369
|
+
| REFERENCE.md | `rules/REFERENCE.md` | Deliverable paths per agent, command-variant mappings |
|