@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,555 @@
1
+ # Agent Assistant — Business Rules
2
+
3
+ > **Purpose**: Complete business logic documentation — governance laws, execution rules, state machines, and constraint systems
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. [Orchestration Laws (L1-L10)](#orchestration-laws-l1-l10)
13
+ 2. [Tiered Execution Rules](#tiered-execution-rules)
14
+ 3. [Phase Sequencing](#phase-sequencing)
15
+ 4. [HSOL Fitness Scoring](#hsol-fitness-scoring)
16
+ 5. [Trust Progression](#trust-progression)
17
+ 6. [Error Classification (E1-E4)](#error-classification-e1-e4)
18
+ 7. [Golden Triangle Debate Rules](#golden-triangle-debate-rules)
19
+ 8. [Deliverable Integrity](#deliverable-integrity)
20
+ 9. [Language Compliance](#language-compliance)
21
+ 10. [Constraint Propagation](#constraint-propagation)
22
+ 11. [Anti-Pattern Registry (A1-A10)](#anti-pattern-registry-a1-a10)
23
+
24
+ ---
25
+
26
+ ## Orchestration Laws (L1-L10)
27
+
28
+ These 10 laws are immutable governance rules defined in `rules/CORE.md` v4.1. They constrain all Orchestrator and agent behavior. No law can be overridden by any command, variant, or agent.
29
+
30
+ | Law | Name | Rule | Enforcement |
31
+ |-----|------|------|-------------|
32
+ | **L1** | Single Point of Truth | The platform entry file loads `CORE.md` first; all other rules load on-demand | Prevents conflicting instructions from multiple sources |
33
+ | **L2** | Requirement Integrity | 100% fidelity — parse EVERY requirement, zero loss, no assumptions | Requirements Registry must capture all items before Phase 1 |
34
+ | **L3** | Explicit Loading | State what you loaded before using it | Prevents phantom references to unloaded rules/agents |
35
+ | **L4** | Deep Embodiment | When embodying an agent (TIER 2), follow that agent's Directive + Protocol + Constraints exactly | Agent file overrides default AI patterns |
36
+ | **L5** | Sequential Execution | Phase N must complete (exit criteria met) before Phase N+1 starts | No parallel phase execution, no phase skipping |
37
+ | **L6** | Language Compliance | Respond in user's language; code, comments, and report files always in English | Dual-language protocol |
38
+ | **L7** | Recursive Delegation | Meta agents (tech-lead, planner) coordinate only — they NEVER implement directly | Prevents single points of failure from meta agents coding |
39
+ | **L8** | Stateful Handoff | Prior phase deliverables are IMMUTABLE constraints for subsequent phases | No modifying decisions made by earlier agents |
40
+ | **L9** | Constraint Propagation | Scouter → Planner → Implementer chain — constraints tighten, never loosen | Downstream phases cannot relax upstream decisions |
41
+ | **L10** | Deliverable Integrity | Files created by an agent define the standard — the deliverable IS the truth | Output artifacts are authoritative |
42
+
43
+ ### Law Dependencies
44
+
45
+ ```mermaid
46
+ graph LR
47
+ L1[L1: Single Point of Truth] --> L3[L3: Explicit Loading]
48
+ L2[L2: Requirement Integrity] --> L5[L5: Sequential Execution]
49
+ L5 --> L8[L8: Stateful Handoff]
50
+ L8 --> L9[L9: Constraint Propagation]
51
+ L4[L4: Deep Embodiment] --> L7[L7: Recursive Delegation]
52
+ L9 --> L10[L10: Deliverable Integrity]
53
+ L6[L6: Language Compliance]
54
+ ```
55
+
56
+ ---
57
+
58
+ ## Tiered Execution Rules
59
+
60
+ The Orchestrator delegates work to agents through a mandatory two-tier system. TIER 1 is always preferred; TIER 2 is fallback only.
61
+
62
+ ### Tier Definitions
63
+
64
+ | Tier | Name | When | Mechanism | Context |
65
+ |------|------|------|-----------|---------|
66
+ | **TIER 1** | Sub-agent | `runSubagent` tool exists on the platform | Isolated sub-agent invocation with fresh context | Isolated from parent |
67
+ | **TIER 2** | Embody | Sub-agent tool unavailable or returned error | Orchestrator reads agent file and acts as that agent | Shared with parent |
68
+
69
+ ### Tier Decision Rules
70
+
71
+ ```mermaid
72
+ stateDiagram-v2
73
+ [*] --> ToolDiscovery: Delegation needed
74
+ ToolDiscovery --> CheckSubagent: First delegation only
75
+ CheckSubagent --> TIER1: runSubagent available
76
+ CheckSubagent --> TIER2: runSubagent unavailable
77
+ TIER1 --> VerifyOutput: Sub-agent returns
78
+ TIER1 --> TIER2: Sub-agent error
79
+ TIER2 --> EmbodyAgent: Read agent file completely
80
+ EmbodyAgent --> ExecuteAsAgent: Follow Directive + Protocol + Constraints
81
+ ExecuteAsAgent --> VerifyOutput: Agent work complete
82
+ VerifyOutput --> [*]: Exit criteria met
83
+ ```
84
+
85
+ ### Prohibitions
86
+
87
+ | Forbidden | Correct Behavior |
88
+ |-----------|-----------------|
89
+ | Using TIER 2 when `runSubagent` is available | Attempt TIER 1 first |
90
+ | Skipping TIER 1 because task seems "simple" | Always try TIER 1 regardless of task complexity |
91
+ | Using TIER 2 for "efficiency" or "token savings" | TIER 1 is mandatory when available |
92
+
93
+ ### TIER 2 Embody Protocol
94
+
95
+ 1. Log: `⚠️ TIER 2: {reason for fallback}`
96
+ 2. Read agent file completely
97
+ 3. Extract: Directive, Protocol, Constraints, Output Format
98
+ 4. Announce embodiment with prescribed format
99
+ 5. Execute as agent following their protocol
100
+ 6. Exit embodiment, resume as Orchestrator
101
+
102
+ ### Tool Discovery Caching
103
+
104
+ Tool discovery (checking if `runSubagent` exists) runs once per session. The result is cached — subsequent delegations skip the check and use the cached tier.
105
+
106
+ ---
107
+
108
+ ## Phase Sequencing
109
+
110
+ Workflow execution follows strict sequential phase ordering governed by Law L5.
111
+
112
+ ### Execution Loop
113
+
114
+ ```mermaid
115
+ flowchart TD
116
+ PRE[Pre-Flight: Load CORE.md + PHASES.md + AGENTS.md] --> REQ[Requirements Intake: Parse ALL requirements into Registry]
117
+ REQ --> P1[Phase 1: Emit header, load agent, delegate, verify exit criteria]
118
+ P1 --> D1{Deliverable > 150 lines?}
119
+ D1 -->|Yes| CHUNK1[Write chunked folder]
120
+ D1 -->|No| SINGLE1[Write single file]
121
+ CHUNK1 --> P2[Phase 2: Read prior deliverable as constraint, delegate next agent]
122
+ SINGLE1 --> P2
123
+ P2 --> PN[Phase N: Same pattern...]
124
+ PN --> DELIVER[Deliver final result to user]
125
+ ```
126
+
127
+ ### Requirements Registry
128
+
129
+ Before any phase executes, ALL user requirements must be parsed:
130
+
131
+ ```
132
+ | ID | Requirement | Priority | Status |
133
+ |----|-------------|----------|--------|
134
+ | R1 | {extracted} | H/M/L | ⏳ |
135
+ ```
136
+
137
+ Rule: 100% fidelity — every requirement extracted, no assumptions, no omissions (Law L2).
138
+
139
+ ### Phase Execution Rules
140
+
141
+ | Rule | Description |
142
+ |------|-------------|
143
+ | One phase at a time | Execute Phase 1 → Phase 2 → ... sequentially. No batching. |
144
+ | Load only current phase's needs | Do not pre-load agents for Phase 2 while executing Phase 1 |
145
+ | Prior deliverables are immutable | Read completely, lock as constraint (Law L8) — do not modify |
146
+ | Missing required deliverable | Halt with notice, create via appropriate agent first, then resume |
147
+ | Emit before execute | Announce phase start before doing work |
148
+ | Verify after execute | Check exit criteria after agent completes |
149
+ | Continue in same reply | Do not stop between phases — execute all in one response |
150
+
151
+ ### Deliverable Size Management
152
+
153
+ | Condition | Strategy |
154
+ |-----------|----------|
155
+ | <= 150 lines AND < 4 sections | Single file |
156
+ | > 150 lines OR >= 4 sections | Chunked folder with `00-index.md` |
157
+
158
+ ---
159
+
160
+ ## HSOL Fitness Scoring
161
+
162
+ The Hybrid Skill Orchestration Layer calculates a fitness score to determine which skills to inject into an agent for a given task.
163
+
164
+ ### Formula
165
+
166
+ ```
167
+ fitness = 0.35 × SEMANTIC_MATCH
168
+ + 0.25 × SPECIFICITY
169
+ + 0.20 × TRUST_LEVEL
170
+ + 0.10 × FRESHNESS_SCORE
171
+ + 0.10 × SUCCESS_RATE
172
+ ```
173
+
174
+ ### Weight Rationale
175
+
176
+ | Factor | Weight | Why |
177
+ |--------|--------|-----|
178
+ | Semantic Match | 0.35 | Highest weight — relevance to the actual task is most important |
179
+ | Specificity | 0.25 | Specialized skills outperform general ones |
180
+ | Trust Level | 0.20 | Matrix skills (trusted) preferred over unproven community skills |
181
+ | Freshness | 0.10 | Newer/recently verified skills may reflect current best practices |
182
+ | Success Rate | 0.10 | Historical performance indicates reliability |
183
+
184
+ ### Decision Thresholds
185
+
186
+ | Fitness Range | Decision | Discovery Action |
187
+ |---------------|----------|-----------------|
188
+ | >= 0.8 | Matrix Sufficient | Execute with matrix skills, skip dynamic discovery |
189
+ | 0.75 — 0.8 | Matrix Adequate | Execute with matrix skills, run async discovery as background recommendation |
190
+ | < 0.75 | Matrix Insufficient | Blocking discovery — must wait for `find-skills` result before proceeding |
191
+
192
+ The superiority delta of 0.15 means a dynamic skill must exceed the best matrix skill's fitness by at least 0.15 to be preferred over it.
193
+
194
+ ### Variant-Discovery Matrix
195
+
196
+ | Variant | Dynamic Discovery |
197
+ |---------|-------------------|
198
+ | `fast` | Always skipped — matrix only |
199
+ | `hard` | Enabled — full resolution |
200
+ | `focus` | Enabled — full resolution |
201
+ | `team` | Enabled — full resolution |
202
+
203
+ ### Complexity Gate
204
+
205
+ | Assessment | Action |
206
+ |------------|--------|
207
+ | Simple | Skip HSOL resolution — base knowledge sufficient |
208
+ | Complex | HSOL resolution mandatory — skipping is a protocol violation |
209
+
210
+ ---
211
+
212
+ ## Trust Progression
213
+
214
+ Dynamic skills (community-installed via `find-skills`) progress through a trust lifecycle.
215
+
216
+ ### State Machine
217
+
218
+ ```mermaid
219
+ stateDiagram-v2
220
+ [*] --> NEW: Skill installed
221
+ NEW --> EVALUATING: 3 successful executions
222
+ EVALUATING --> VALIDATED: 10 successful executions
223
+ VALIDATED --> PROMOTED: Auto-promote to matrix
224
+ PROMOTED --> [*]: Added to matrix-skills YAML
225
+
226
+ NEW --> BLOCKED: Failure or policy violation
227
+ EVALUATING --> BLOCKED: Success rate drops below 0.85
228
+ VALIDATED --> BLOCKED: Inactive > 30 days
229
+
230
+ note right of NEW: Trust = 0.3
231
+ note right of EVALUATING: Trust = 0.5
232
+ note right of VALIDATED: Trust = 0.7
233
+ note right of PROMOTED: Trust = 1.0
234
+ ```
235
+
236
+ ### Trust Values
237
+
238
+ | State | Trust Score | Gate to Next State |
239
+ |-------|-------------|-------------------|
240
+ | NEW | 0.3 | 3 successful executions |
241
+ | EVALUATING | 0.5 | 10 successful executions |
242
+ | VALIDATED | 0.7 | Auto-promote when all promotion criteria met |
243
+ | PROMOTED | 1.0 | Added to matrix — lifecycle complete |
244
+ | BLOCKED | N/A | Manual review required |
245
+
246
+ ### Promotion Criteria (All Required)
247
+
248
+ | Criterion | Threshold |
249
+ |-----------|-----------|
250
+ | Minimum executions | >= 10 |
251
+ | Minimum success rate | >= 0.85 (85%) |
252
+ | Maximum inactive days | <= 30 |
253
+ | Automatic | Yes — no human review queue |
254
+
255
+ ### Trust Decay
256
+
257
+ Trust decays after 90 days of inactivity. This prevents stale skills from maintaining high trust scores.
258
+
259
+ ### Support States
260
+
261
+ | State | Meaning |
262
+ |-------|---------|
263
+ | `supported` | Actively maintained and functioning |
264
+ | `experimental` | New or untested — use with caution |
265
+ | `blocked` | Known issues or policy violations — do not use |
266
+
267
+ ---
268
+
269
+ ## Error Classification (E1-E4)
270
+
271
+ Defined in `rules/ERRORS.md`, the error classification system ensures every error leads to either successful completion or explicit user decision. Silent halts are forbidden.
272
+
273
+ ### Error Types
274
+
275
+ ```mermaid
276
+ stateDiagram-v2
277
+ [*] --> Detected: Error occurs
278
+ Detected --> Classified: Classify E1/E1b/E2/E3/E4
279
+
280
+ Classified --> E1_Retry: E1 Transient
281
+ E1_Retry --> Success: Retry succeeds (max 3)
282
+ E1_Retry --> E2_Alt: Max retries exceeded
283
+
284
+ Classified --> E1b_Chunk: E1b Output Overflow
285
+ E1b_Chunk --> Success: Chunked strategy works
286
+
287
+ Classified --> E2_Alt: E2 Recoverable
288
+ E2_Alt --> Success: Alternative approach works
289
+ E2_Alt --> E3_Block: No alternative viable
290
+
291
+ Classified --> E3_Block: E3 Blocking
292
+ E3_Block --> AutoRecover: Safe point + best option
293
+ AutoRecover --> Success: Recovery works
294
+ AutoRecover --> UserEscalation: Recovery fails
295
+
296
+ Classified --> E4_Cascade: E4 Cascading
297
+ E4_Cascade --> Rollback: Stop propagation
298
+ Rollback --> UserEscalation: Report impact
299
+
300
+ UserEscalation --> [*]: User decides
301
+ Success --> [*]: Resume execution
302
+ ```
303
+
304
+ ### Error Classification Table
305
+
306
+ | Code | Type | Description | Recovery Action | Max Attempts |
307
+ |------|------|-------------|----------------|-------------|
308
+ | E1 | Transient | Timeout, network failure, temporary unavailability | Retry with exponential backoff | 3 |
309
+ | E1b | Output Overflow | File too large for single creation tool call | Switch to chunked deliverable strategy | 1 (strategy switch) |
310
+ | E2 | Recoverable | Logic error, incorrect approach, wrong tool usage | Log error, attempt alternative approach | Until alternative found |
311
+ | E3 | Blocking | Critical failure, safe state needed | Save to safe point, pick best recovery option, auto-recover | 1 (then escalate) |
312
+ | E4 | Cascading | Error affects downstream phases/agents | Stop propagation immediately, rollback affected work, report | 0 (immediate stop) |
313
+
314
+ ### User Escalation Protocol
315
+
316
+ When auto-recovery fails (E3) or cascade is detected (E4), the user is presented with options:
317
+
318
+ ```
319
+ ## ⚠️ BLOCKED — Decision Required
320
+ **Error**: {description}
321
+ **Impact**: {affected items}
322
+ **Options**:
323
+ A) {Alternative} — {tradeoff}
324
+ B) {Skip with gap} — {limitation}
325
+ C) {Provide input} — {what's needed}
326
+ D) {Modify requirements} — {suggestion}
327
+ ```
328
+
329
+ ### Core Principle
330
+
331
+ Every error must lead to either:
332
+ 1. Successful completion via automated recovery, OR
333
+ 2. Explicit user decision with clear options
334
+
335
+ Silent halts, unexplained terminations, and swallowed errors are forbidden.
336
+
337
+ ---
338
+
339
+ ## Golden Triangle Debate Rules
340
+
341
+ The Golden Triangle is the team collaboration protocol activated by `:team` variants. It spawns exactly 3 agents per phase.
342
+
343
+ ### Roles
344
+
345
+ | Role | Agent | Authority | Personality |
346
+ |------|-------|-----------|-------------|
347
+ | Tech Lead | Domain-specific (see roster) | Final authority on all decisions | Pragmatic, decisive, ships quality |
348
+ | Executor | Domain-specific implementer | Owns implementation, must defend work with evidence | Builder mindset, evidence-driven, pushes back |
349
+ | Reviewer | Domain-specific critic | Can FAIL submissions, demand fixes, escalate | Skeptical, thorough, assumes defects exist |
350
+
351
+ ### Debate Flow
352
+
353
+ ```mermaid
354
+ flowchart TD
355
+ TL[Tech Lead decomposes task] --> EX[Executor implements]
356
+ EX --> RE[Reviewer critiques]
357
+ RE --> PASS{PASS?}
358
+ PASS -->|Yes| CONSENSUS[Consensus stamp]
359
+ PASS -->|No: FAIL| EXDEF{Executor response?}
360
+ EXDEF -->|FIX| EX
361
+ EXDEF -->|DEFEND with evidence| REEVAL[Reviewer evaluates evidence]
362
+ REEVAL --> ACCEPT{Evidence valid?}
363
+ ACCEPT -->|Yes| CONSENSUS
364
+ ACCEPT -->|No| ROUND{Round <= 3?}
365
+ ROUND -->|Yes| EX
366
+ ROUND -->|No| ARB[Tech Lead arbitrates - BINDING]
367
+ ARB --> CONSENSUS
368
+ ```
369
+
370
+ ### Debate Rules
371
+
372
+ | Rule | Detail |
373
+ |------|--------|
374
+ | Maximum rounds | 3 per task — after round 3, Tech Lead makes binding decision |
375
+ | Defense requirement | Executor must provide technical evidence (benchmarks, specs, code references) |
376
+ | "I disagree" without proof | Automatic FAIL — Reviewer wins by default |
377
+ | Reviewer rejects valid evidence | Escalation to Tech Lead for arbitration |
378
+ | Tech Lead evaluation | Based on evidence quality, not seniority or role |
379
+
380
+ ### Communication Protocol
381
+
382
+ | Artifact | Owner | Rules |
383
+ |----------|-------|-------|
384
+ | Shared Task List | Tech Lead | State management for assignments, status, priorities |
385
+ | Mailbox | All agents (append-only) | `./reports/{topic}/MAILBOX-{date}.md` — all submissions, reviews, defenses, decisions |
386
+
387
+ Mailbox rules:
388
+ - Append-only — no agent may edit or delete prior exchanges
389
+ - All agents read the full Mailbox for shared context
390
+ - One Mailbox per phase execution, timestamped by date
391
+
392
+ ### Foundation Enforcement Checkpoints
393
+
394
+ | Checkpoint | Scope | Rule |
395
+ |------------|-------|------|
396
+ | C8-TEAMS-01 | BLOCK | Mailbox is append-only and required for all inter-agent exchanges |
397
+ | C8-TEAMS-02 | BLOCK | Debate capped at 3 rounds; unresolved disputes escalate to Tech Lead |
398
+ | C8-TEAMS-03 | BLOCK | Phase output requires explicit consensus stamp before release |
399
+
400
+ ### Consensus Protocol
401
+
402
+ Output is released only when one of these conditions is met:
403
+
404
+ | Condition | Trigger |
405
+ |-----------|---------|
406
+ | Clean pass | Reviewer approved submission with no disputes |
407
+ | Resolved pass | Reviewer approved after Executor fixed issues or defended successfully |
408
+ | Arbitrated pass | Tech Lead overrode after max 3 rounds — reasoning documented |
409
+
410
+ Consensus stamp format: `✅ CONSENSUS: TechLead ✓ | Executor ✓ | Reviewer ✓`
411
+
412
+ Without this stamp, no phase output is released.
413
+
414
+ ---
415
+
416
+ ## Deliverable Integrity
417
+
418
+ Governed by Law L10: files created by an agent define the standard.
419
+
420
+ ### Rules
421
+
422
+ | Rule | Description |
423
+ |------|-------------|
424
+ | Deliverable IS the truth | The output file is authoritative — it defines what was decided |
425
+ | Immutable once complete | Once a phase produces a deliverable, subsequent phases treat it as a locked constraint (Law L8) |
426
+ | Format governs quality | Deliverable must match the agent's Output Format specification |
427
+ | Size-appropriate strategy | <= 150 lines → single file; > 150 lines → chunked folder with index |
428
+
429
+ ### Deliverable Paths
430
+
431
+ Research/planning agents write to `./reports/{topic}/` with prescribed naming:
432
+
433
+ | Agent | Path Pattern |
434
+ |-------|-------------|
435
+ | brainstormer | `./reports/{topic}/brainstorms/BRAINSTORM-{feature}.md` |
436
+ | researcher | `./reports/{topic}/researchers/RESEARCH-{feature}.md` |
437
+ | scouter | `./reports/{topic}/scouts/SCOUT-{feature}.md` |
438
+ | designer | `./reports/{topic}/designs/DESIGN-{feature}.md` |
439
+ | planner | `./reports/{topic}/plans/PLAN-{feature}.md` |
440
+ | reporter | `./reports/{topic}/general/REPORT-{type}-{date}.md` |
441
+ | debugger | `./reports/{topic}/debugs/DEBUG-{issue}.md` |
442
+ | tester | `./reports/{topic}/tests/TEST-{feature}.md` |
443
+ | business-analyst | `./reports/{topic}/requirements/REQ-{feature}.md` |
444
+ | performance-engineer | `./reports/{topic}/performance/PERF-{component}.md` |
445
+
446
+ Implementation agents (backend-engineer, frontend-engineer, etc.) write directly to the project's source code.
447
+
448
+ ---
449
+
450
+ ## Language Compliance
451
+
452
+ Governed by Law L6 — a dual-language protocol.
453
+
454
+ | Context | Language Rule |
455
+ |---------|-------------|
456
+ | Response to user | Same language the user used in their request |
457
+ | Code and code comments | Always English |
458
+ | Files in `./reports/{topic}/` | Always English |
459
+ | Files in `./documents/` | Always English |
460
+ | Agent file contents | Always English |
461
+ | Rule file contents | Always English |
462
+
463
+ ---
464
+
465
+ ## Constraint Propagation
466
+
467
+ Governed by Law L9 — constraints tighten through the workflow pipeline, they never loosen.
468
+
469
+ ### Pipeline Direction
470
+
471
+ ```mermaid
472
+ flowchart LR
473
+ SC[Scouter - Discovers constraints] --> PL[Planner - Adds planning constraints]
474
+ PL --> IM[Implementer - Executes within ALL constraints]
475
+ IM --> VA[Validator - Verifies constraints met]
476
+
477
+ SC -->|"Constraints accumulate"| PL
478
+ PL -->|"Constraints accumulate"| IM
479
+ IM -->|"Constraints accumulate"| VA
480
+ ```
481
+
482
+ ### Rules
483
+
484
+ | Rule | Description |
485
+ |------|-------------|
486
+ | Tighten only | Each phase can ADD constraints but never REMOVE or RELAX constraints from prior phases |
487
+ | Scouter findings locked | If a scouter identifies technology X is used, the planner must plan around X |
488
+ | Planner decisions locked | If a planner specifies approach Y, the implementer must execute approach Y |
489
+ | No renegotiation | An implementer cannot decide to use approach Z instead of planner's approach Y |
490
+ | Violation handling | If a downstream agent violates an upstream constraint, self-healing triggers backtrack |
491
+
492
+ ### Ambiguity Handling
493
+
494
+ When a requirement is ambiguous (before it becomes a constraint):
495
+
496
+ 1. PAUSE execution
497
+ 2. ASK user for clarification
498
+ 3. DOCUMENT the decision
499
+ 4. THEN proceed
500
+
501
+ Guessing, assuming intent, or skipping unclear items is forbidden.
502
+
503
+ ---
504
+
505
+ ## Anti-Pattern Registry (A1-A10)
506
+
507
+ Defined in `rules/ERRORS.md`, these are cataloged violations that the self-healing protocol watches for.
508
+
509
+ | Code | Anti-Pattern | Correct Behavior |
510
+ |------|-------------|-----------------|
511
+ | A1 | Direct implementation by Orchestrator | Delegate to specialist agent |
512
+ | A2 | Workflow bypass (skipping phases) | Follow exact phase order |
513
+ | A3 | Silent halt (unexplained stop) | Notify user + provide options |
514
+ | A4 | Skipped step within a phase | Backtrack + complete the step |
515
+ | A5 | Lazy fallback (using TIER 2 when TIER 1 available) | Attempt TIER 1 first |
516
+ | A6 | Assumed requirements | Ask for clarification |
517
+ | A7 | Modified prior deliverable | Treat prior deliverables as immutable |
518
+ | A8 | Batched phase loading (pre-loading agents) | Load one phase at a time |
519
+ | A9 | Meta agent implementing (tech-lead coding) | Meta agents delegate only |
520
+ | A10 | Unexplained termination | Always explain + provide options |
521
+
522
+ ### Self-Healing Protocol
523
+
524
+ When a violation is detected:
525
+
526
+ 1. DETECT violation or error
527
+ 2. PAUSE at nearest safe point
528
+ 3. LOG: `⚠️ {violation_code}: {description}`
529
+ 4. BACKTRACK to correct state if needed
530
+ 5. RE-EXECUTE correctly
531
+ 6. UPDATE downstream if affected
532
+ 7. RESUME normal flow
533
+
534
+ Maximum corrections per phase: 3. If limit is reached, escalate to user.
535
+
536
+ ---
537
+
538
+ ## Evidence Sources
539
+
540
+ | Source | Path |
541
+ |--------|------|
542
+ | Orchestration Laws (L1-L10) | `rules/CORE.md` |
543
+ | Tiered Execution protocol | `rules/AGENTS.md` |
544
+ | Phase Sequencing rules | `rules/PHASES.md` |
545
+ | HSOL configuration (weights, thresholds) | `matrix-skills/_index.yaml` |
546
+ | HSOL resolution algorithm | `rules/SKILLS.md` |
547
+ | Trust progression and promotion | `rules/SKILLS.md` + `matrix-skills/_index.yaml` |
548
+ | Error Classification (E1-E4) | `rules/ERRORS.md` |
549
+ | Anti-Patterns (A1-A10) | `rules/ERRORS.md` |
550
+ | Golden Triangle protocol | `rules/TEAMS.md` |
551
+ | Foundation Enforcement Checkpoints | `rules/TEAMS.md` |
552
+ | Deliverable paths | `rules/CORE.md` + `rules/REFERENCE.md` |
553
+ | Language compliance | `rules/CORE.md` (Law L6) |
554
+ | Constraint propagation | `rules/CORE.md` (Law L9) |
555
+ | Ambiguity handling | `rules/CORE.md` |
@@ -0,0 +1,107 @@
1
+ # Knowledge Overview
2
+
3
+ > **Purpose**: High-level summary, table of contents, and cross-references for the Agent Assistant project knowledge base
4
+ > **Last Updated**: 2026-03-26
5
+ > **Generated By**: docs-core skill
6
+
7
+ ---
8
+
9
+ ## Quick Summary
10
+
11
+ Agent Assistant (`@namch/agent-assistant` v1.3.0) is a multi-agent orchestration framework that transforms a single AI coding assistant into a coordinated team of 21 specialist agents. It operates across five platforms — Cursor, GitHub Copilot, Claude Code, Codex, and Antigravity/Gemini — by installing Markdown and YAML configuration files into each tool's global directory. The framework uses a Hybrid Skill Orchestration Layer (HSOL) to dynamically resolve and inject skills from a matrix of 1,430+ skill definitions across 19 domains, requiring zero manual configuration per project.
12
+
13
+ The core value proposition is efficiency at scale: one-time global installation provides structured workflows for every project a developer works on. The Orchestrator pattern enforces 10 governance laws, delegates to specialist agents via 14 commands (with 4 variant strategies each), and supports sub-agent spawning for parallel task execution on compatible platforms. The project claims 70% faster time-to-production, 70% bug reduction, and 85% token cost savings.
14
+
15
+ Built with Node.js >=18.0.0 using only built-in modules (fs, path, os, readline), Agent Assistant has zero production dependencies. The project also includes a React 19 + Vite + Tailwind CSS v4 marketing website deployed on Vercel, and uses semantic-release with conventional commits for automated npm publishing.
16
+
17
+ ---
18
+
19
+ ## Table of Contents
20
+
21
+ 1. [Quick Summary](#quick-summary)
22
+ 2. [Sub-Files](#sub-files)
23
+ 3. [Quick Facts](#quick-facts)
24
+ 4. [Cross-References](#cross-references)
25
+ 5. [Known Gaps and Open Questions](#known-gaps-and-open-questions)
26
+
27
+ ---
28
+
29
+ ## Sub-Files
30
+
31
+ | # | File | Description |
32
+ |---|------|-------------|
33
+ | 1 | [01-project-identity.md](./01-project-identity.md) | Project name, version, author, license, purpose, problem/solution statement, key benefits, and a First 60 Minutes onboarding checklist |
34
+ | 2 | [02-tech-stack.md](./02-tech-stack.md) | Categorized technology stack table — runtime, CLI, frontend, build, styling, animation, CI/CD, release — each with version and evidence file |
35
+ | 3 | [03-features.md](./03-features.md) | Key features list with descriptions, performance metrics, capability matrix, and agent/command inventories |
36
+ | 4 | [04-getting-started.md](./04-getting-started.md) | Prerequisites, step-by-step installation, environment setup, first run commands, running tests, and common troubleshooting |
37
+
38
+ ---
39
+
40
+ ## Quick Facts
41
+
42
+ | Key | Value |
43
+ |-----|-------|
44
+ | Package Name | `@namch/agent-assistant` |
45
+ | Version | 1.3.0 |
46
+ | Type | Multi-agent orchestration framework |
47
+ | Language | JavaScript (CommonJS for CLI, ESM for web) |
48
+ | Runtime | Node.js >=18.0.0 |
49
+ | License | MIT |
50
+ | Author | NamCH |
51
+ | Repository | https://github.com/hainamchung/agent-assistant |
52
+ | npm | https://www.npmjs.com/package/@namch/agent-assistant |
53
+ | Website | https://agent-assistant-ten.vercel.app |
54
+ | Production Dependencies | 0 (zero) |
55
+ | Dev Dependencies | 9 (semantic-release ecosystem + husky) |
56
+ | Total Files | ~5,784 |
57
+ | Total Directories | ~2,372 |
58
+ | Specialist Agents | 21 |
59
+ | Team Configurations | 17 teams (51 team agents) |
60
+ | Commands | 14 |
61
+ | Command Variants | 4 (fast, hard, focus, team) |
62
+ | Skill Modules | 1,430+ |
63
+ | Skill Domains | 19 |
64
+ | Rules | 7 |
65
+ | Supported Platforms | 5 (Cursor, GitHub Copilot, Claude Code, Codex, Antigravity/Gemini) |
66
+
67
+ ---
68
+
69
+ ## Cross-References
70
+
71
+ | Resource | Path | Relationship |
72
+ |----------|------|-------------|
73
+ | Knowledge Source Base | [../knowledge-source-base/00-index.md](../knowledge-source-base/00-index.md) | Deep-dive into directory structure, entry points, key modules, and configuration |
74
+ | HSOL Assessment | [../HSOL-ASSESSMENT.md](../HSOL-ASSESSMENT.md) | Detailed evaluation of the Hybrid Skill Orchestration Layer |
75
+ | SMART Skill Orchestration | [../SMART-SKILL-ORCHESTRATION-BLUEPRINT.md](../SMART-SKILL-ORCHESTRATION-BLUEPRINT.md) | Blueprint for skill orchestration design |
76
+ | README | [../../README.md](../../README.md) | Public-facing project overview and quick start |
77
+ | CHANGELOG | [../../CHANGELOG.md](../../CHANGELOG.md) | Version history and release notes |
78
+ | Core Rules | [../../rules/CORE.md](../../rules/CORE.md) | Orchestrator protocol and 10 governance laws |
79
+ | Skills Rules | [../../rules/SKILLS.md](../../rules/SKILLS.md) | HSOL resolution algorithm and skill decision flow |
80
+ | Package Manifest | [../../package.json](../../package.json) | npm metadata, scripts, dependencies, and engine requirements |
81
+
82
+ ---
83
+
84
+ ## Known Gaps and Open Questions
85
+
86
+ 1. **No automated test suite shipped** — The `cli/install.test.js.example` file is an example, not an active test. The `npm test` script (`node --test cli/*.test.js`) expects test files matching that glob but none are committed.
87
+ 2. **Web application not documented in knowledge-source-base** — The `web/` directory contains a full React 19 + Vite application but is not covered in the source base analysis.
88
+ 3. **Dynamic skill discovery undocumented** — The `_dynamic.yaml` file and `find-skills` mechanism are referenced in rules but lack dedicated architecture documentation.
89
+ 4. **No performance benchmarks** — The claimed metrics (70% faster, 70% fewer bugs, 85% token savings) lack published methodology or benchmark data.
90
+ 5. **Team variant coverage** — Not all 14 commands have a `:team` variant; the exact availability per command is defined by the presence of `commands/{cmd}/team.md`.
91
+ 6. **Platform parity details** — While all 5 platforms are listed as "Full" support, the specific features or limitations per platform are not documented.
92
+
93
+ ---
94
+
95
+ ## Evidence Sources
96
+
97
+ | Source | Path |
98
+ |--------|------|
99
+ | Package manifest | [../../package.json](../../package.json) |
100
+ | README | [../../README.md](../../README.md) |
101
+ | Core rules | [../../rules/CORE.md](../../rules/CORE.md) |
102
+ | Skills rules | [../../rules/SKILLS.md](../../rules/SKILLS.md) |
103
+ | CLI installer | [../../cli/install.js](../../cli/install.js) |
104
+ | Agent definitions | [../../agents/](../../agents/) |
105
+ | Commands | [../../commands/](../../commands/) |
106
+ | Matrix skills registry | [../../matrix-skills/](../../matrix-skills/) |
107
+ | Knowledge source base | [../knowledge-source-base/00-index.md](../knowledge-source-base/00-index.md) |