@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
@@ -1,602 +0,0 @@
1
- # Agent Assistant — Knowledge Domain
2
-
3
- > **Purpose**: Data models, schema definitions, API contracts, domain entities, and business rules for AI agents and developers.
4
-
5
- ---
6
-
7
- ## 1. Domain Overview
8
-
9
- Agent Assistant operates in the domain of **AI-assisted software development orchestration**. The system manages three primary entity types:
10
-
11
- ```
12
- ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
13
- │ AGENTS │────▶│ COMMANDS │────▶│ SKILLS │
14
- │ (21 entities) │ │ (50+ entities) │ │ (1400+ entities) │
15
- └─────────────────┘ └─────────────────┘ └─────────────────┘
16
- │ │ │
17
- ▼ ▼ ▼
18
- ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
19
- │ RULES │ │ DELIVERABLES │ │ MATRIX │
20
- │ (8 entities) │ │ (file outputs) │ │ (19 domains) │
21
- └─────────────────┘ └─────────────────┘ └─────────────────┘
22
- ```
23
-
24
- ---
25
-
26
- ## 2. Core Entities
27
-
28
- ### 2.1 Agent Entity
29
-
30
- Agents are specialist personas that perform specific development tasks.
31
-
32
- #### Schema
33
-
34
- ```yaml
35
- # Agent File: agents/{agent-name}.md
36
- ---
37
- name: string # kebab-case identifier (e.g., "backend-engineer")
38
- profile: string # domain:category pattern (e.g., "backend:execution")
39
- tools: string[] # Available tools [Read, Grep, Glob, Edit, ...]
40
- handoffs: string[] # Agents this agent can delegate to
41
- version: string? # Optional version (e.g., "1.0")
42
- ---
43
- ```
44
-
45
- #### Agent Catalog
46
-
47
- | Agent ID | Profile | Primary Domain | Role |
48
- |----------|---------|----------------|------|
49
- | `backend-engineer` | backend:execution | backend | Server-side logic, APIs, data access |
50
- | `frontend-engineer` | frontend:execution | frontend | UI, React, a11y, performance |
51
- | `tech-lead` | architecture:orchestration | architecture | Orchestration, routing, quality |
52
- | `database-architect` | data:execution | data | Schema, migrations, tuning |
53
- | `security-engineer` | security:validation | security | Threat model, OWASP, secure coding |
54
- | `devops-engineer` | devops:execution | devops | CI/CD, infra, deploy, rollback |
55
- | `tester` | quality:validation | quality | Test strategy, automation, coverage |
56
- | `reviewer` | quality:review | quality | Code review, plan compliance |
57
- | `debugger` | quality:debugging | quality | Reproduce, hypothesize, root cause |
58
- | `planner` | planning:analysis | planning | Implementation plans, risks, rollback |
59
- | `researcher` | research:analysis | research | Docs, sources, comparisons |
60
- | `scouter` | research:exploration | research | Codebase exploration, patterns |
61
- | `brainstormer` | planning:discovery | planning | Requirements, clarification |
62
- | `business-analyst` | planning:business | planning | Stakeholders, INVEST, user stories |
63
- | `designer` | design:creative | design | UI/UX, design system, a11y |
64
- | `docs-manager` | research:documentation | research | README, API docs, guides |
65
- | `performance-engineer` | performance:validation | performance | Profiling, bottlenecks, budgets |
66
- | `project-manager` | management:orchestration | management | Sprints, risks, delivery |
67
- | `mobile-engineer` | mobile:execution | mobile | iOS/Android, React Native, Flutter |
68
- | `game-engineer` | gaming:execution | gaming | Game loop, 3D, performance |
69
-
70
- #### Agent File Structure
71
-
72
- ```markdown
73
- <!-- 🔒 COGNITIVE ANCHOR — MANDATORY OPERATING SYSTEM -->
74
- > **BINDING**: This file OVERRIDES default AI patterns...
75
-
76
- ## 📋 Identity
77
-
78
- | Property | Value |
79
- |----------|-------|
80
- | **ID** | {agent-name} |
81
- | **Role** | {role description} |
82
- | **Profile** | {domain}:{category} |
83
- | **Reports To** | Orchestrator |
84
-
85
- ## 🎯 Core Directive
86
- {1-2 sentence mission statement}
87
-
88
- ## ⚡ Skills (Matrix Discovery)
89
- Profile: `{domain}:{category}`
90
- Skills are resolved from matrix-skills/{domain}.yaml at runtime.
91
-
92
- ## 🧠 Thinking Protocol
93
- Step 0: Load Context
94
- Step 1: ...
95
- Step N: Deliver
96
-
97
- ## ⛔ Constraints
98
- | NEVER | ALWAYS |
99
- |-------|--------|
100
- | ... | ... |
101
-
102
- ## 📤 Output Format
103
- {Deliverable template}
104
- ```
105
-
106
- ### 2.2 Command Entity
107
-
108
- Commands define development workflows that users can invoke.
109
-
110
- #### Schema
111
-
112
- ```yaml
113
- # Command File: commands/{command}.md or commands/{command}/{variant}.md
114
- ---
115
- description: string # Human-readable description
116
- version: string # e.g., "1.0"
117
- category: string # e.g., "development", "quality", "planning"
118
- execution-mode: string # "execute" | "router"
119
- ---
120
- ```
121
-
122
- #### Command Catalog
123
-
124
- | Command | Description | Variants | Category |
125
- |---------|-------------|----------|----------|
126
- | `/cook` | Implement features | `:fast`, `:hard`, `:focus` | development |
127
- | `/code` | Write code snippets | `:fast`, `:hard`, `:focus` | development |
128
- | `/fix` | Fix bugs and refactor | `:fast`, `:hard`, `:focus` | development |
129
- | `/test` | Generate tests | `:fast`, `:hard`, `:focus` | quality |
130
- | `/review` | Code review | `:fast`, `:hard` | quality |
131
- | `/debug` | Systematic debugging | `:fast`, `:hard`, `:focus` | quality |
132
- | `/plan` | Implementation planning | `:fast`, `:hard`, `:focus` | planning |
133
- | `/report` | Create/update reports, summaries | `:fast`, `:hard`, `:focus` | documentation |
134
- | `/brainstorm` | Requirements discovery | `:fast`, `:hard` | planning |
135
- | `/design` | UI/UX design | `:fast`, `:hard` | planning |
136
- | `/docs` | Documentation | `:core`, `:business`, `:audit` | documentation |
137
- | `/deploy` | Deployment | `:check`, `:preview`, `:production`, `:rollback` | deployment |
138
- | `/ask` | Q&A about codebase | `:fast`, `:hard` | utility |
139
- | `/auto` | Auto-detect command | — | utility |
140
-
141
- #### Variant Types
142
-
143
- | Variant | Purpose | Agents Used | Quality Gates |
144
- |---------|---------|-------------|---------------|
145
- | `:fast` | Quick execution | 2-3 agents | Minimal |
146
- | `:hard` | Full workflow | 5-8 agents | All 5 gates |
147
- | `:focus` | Full workflow with clear context | 5-8 agents | All 5 gates |
148
- | `:core` | Core documentation | scouter, docs-manager | — |
149
- | `:business` | Business documentation | researcher, business-analyst, docs-manager | — |
150
- | `:audit` | Security/compliance audit | security-engineer, docs-manager | — |
151
-
152
- ### 2.3 Skill Entity
153
-
154
- Skills are domain knowledge packages that enhance agent capabilities.
155
-
156
- #### Schema
157
-
158
- ```yaml
159
- # Skill Entry in matrix-skills/{domain}.yaml
160
- - skill_id: string # Unique identifier (kebab-case)
161
- category: string # core | expert | specialized | utility
162
- priority_score: number # 1-10 (10 = critical)
163
- relevance_mapping:
164
- agents: string[] # Agent IDs that receive this skill
165
- profiles: string[] # Profile patterns (e.g., "backend:*")
166
- description: string # AI-recognizable purpose summary
167
- ```
168
-
169
- #### Skill File Structure
170
-
171
- ```
172
- skills/{skill-id}/
173
- ├── SKILL.md # Main skill definition
174
- ├── references/ # Reference materials (optional)
175
- │ └── *.md
176
- ├── scripts/ # Executable scripts (optional)
177
- │ └── *.py, *.js
178
- └── assets/ # Templates, assets (optional)
179
- ```
180
-
181
- #### Skill Categories
182
-
183
- | Category | Priority Range | Description |
184
- |----------|----------------|-------------|
185
- | `core` | 8-10 | Essential skills for the domain |
186
- | `expert` | 6-8 | Advanced domain expertise |
187
- | `specialized` | 5-7 | Niche or technology-specific |
188
- | `utility` | 3-5 | Helper tools and utilities |
189
-
190
- ### 2.4 Rule Entity
191
-
192
- Rules define orchestration behavior and constraints.
193
-
194
- #### Schema
195
-
196
- Rules are Markdown files with structured sections.
197
-
198
- ```markdown
199
- # {Rule Name}
200
-
201
- > **LOAD CONDITION**: When {condition}
202
- > **PURPOSE**: {description}
203
-
204
- ## SECTION 1: {Topic}
205
- {Rules and guidelines}
206
-
207
- ## SECTION N: {Topic}
208
- {Rules and guidelines}
209
- ```
210
-
211
- #### Rule Catalog
212
-
213
- | Rule File | Purpose | Authority |
214
- |-----------|---------|-----------|
215
- | `BOOTSTRAP.md` | Entry point, paths, routing | Entry |
216
- | `ORCHESTRATION-LAWS.md` | 10 inviolable laws | CRITICAL |
217
- | `EXECUTION-PROTOCOL.md` | Phase execution, output format | CRITICAL |
218
- | `ADAPTIVE-EXECUTION.md` | Tier 1/2 delegation | CRITICAL |
219
- | `AGENT-RULES.md` | Agent behavior guidelines | Reference |
220
- | `SKILL.md` | Matrix resolution algorithm | Reference |
221
- | `ERROR-RECOVERY.md` | Error handling protocols | Reference |
222
- | `QUICK-REFERENCE.md` | Lookup tables | Reference |
223
-
224
- ### 2.5 Matrix Domain Entity
225
-
226
- Matrix domains organize skills by development area.
227
-
228
- #### Schema
229
-
230
- ```yaml
231
- # In matrix-skills/_index.yaml
232
- domains:
233
- {domain-name}:
234
- file: string # "{domain}.yaml"
235
- name: string # Human-readable name
236
- description: string # Domain purpose
237
- skill_count: number # Number of skills in domain
238
- ```
239
-
240
- #### Domain Catalog
241
-
242
- | Domain ID | Name | Skills | Description |
243
- |-----------|------|--------|-------------|
244
- | `backend` | Backend Development | 20 | Server-side logic, APIs, data access |
245
- | `frontend` | Frontend Development | 18 | UI/UX, web applications, client-side |
246
- | `architecture` | System Architecture | 9 | Design patterns, system design, ADRs |
247
- | `quality` | Quality Assurance | 17 | Testing, code review, validation |
248
- | `security` | Security Engineering | 6 | Threat modeling, secure coding, compliance |
249
- | `design` | UI/UX Design | 10 | Visual design, user experience, accessibility |
250
- | `planning` | Planning & Analysis | 9 | Requirements, task breakdown, roadmaps |
251
- | `devops` | DevOps & Deployment | 15 | CI/CD, infrastructure, containerization |
252
- | `data` | Data & Database | 7 | Schema design, queries, migrations |
253
- | `performance` | Performance Engineering | 1 | Profiling, optimization, benchmarking |
254
- | `research` | Research & Documentation | 11 | Technical research, documentation |
255
- | `mobile` | Mobile Development | 8 | iOS, Android, cross-platform apps |
256
- | `gaming` | Game Development | 3 | Game engines, graphics, game loop |
257
- | `management` | Project Management | 4 | Delivery, risk management, agile |
258
- | `ai_ml` | AI/ML Engineering | 13 | Machine learning, LLMs, data science |
259
- | `cloud` | Cloud & Infrastructure | 11 | AWS, Azure, GCP, serverless |
260
- | `languages` | Programming Languages | 17 | Language-specific patterns and expertise |
261
- | `tools` | Tools & Utilities | 31 | Productivity tools, document processing |
262
- | `mcp` | MCP & Agents | 8 | Model Context Protocol, agent frameworks |
263
-
264
- ---
265
-
266
- ## 3. Data Models
267
-
268
- ### 3.1 Agent Profile Model
269
-
270
- ```yaml
271
- agent_profiles:
272
- {agent-id}:
273
- profile: "{domain}:{category}"
274
- inherit_from: string[] # Domains to inherit skills from
275
- primary_domain: string # Main domain
276
- ```
277
-
278
- **Example**:
279
- ```yaml
280
- backend-engineer:
281
- profile: "backend:execution"
282
- inherit_from: ["backend", "architecture", "quality", "data", "languages"]
283
- primary_domain: "backend"
284
- ```
285
-
286
- ### 3.2 Skill Resolution Model
287
-
288
- ```yaml
289
- resolution:
290
- precedence:
291
- - direct_agent_match # skill.agents contains agent-id
292
- - profile_match # skill.profiles matches agent.profile
293
- - domain_inheritance # domain in agent.inherit_from
294
-
295
- wildcards:
296
- "*:orchestration": "Any domain with orchestration category"
297
- "backend:*": "All backend categories"
298
- "*": "Universal (all agents)"
299
-
300
- thresholds:
301
- minimum_priority: 5 # Skills below this are optional
302
- core_priority: 7 # Standard injection threshold
303
- critical_priority: 9 # Always injected
304
- ```
305
-
306
- ### 3.3 Workflow Phase Model
307
-
308
- ```yaml
309
- phase:
310
- number: number # Phase sequence (1, 2, 3, ...)
311
- name: string # Phase name
312
- agent: string # Agent ID to delegate to
313
- goal: string # Phase objective
314
- exit_criteria: string[] # Conditions to proceed
315
- deliverable: string # Output file path or description
316
- ```
317
-
318
- **Example**:
319
- ```yaml
320
- phase:
321
- number: 1
322
- name: "CODEBASE ANALYSIS"
323
- agent: "scouter"
324
- goal: "Scan entire project structure and content"
325
- exit_criteria:
326
- - "Project structure mapped"
327
- - "Tech stack identified"
328
- - "Key files located"
329
- deliverable: "./reports/{topic}/scouts/SCOUT-{feature}.md"
330
- ```
331
-
332
- ### 3.4 Deliverable Model
333
-
334
- ```yaml
335
- deliverable:
336
- type: string # report | code | test | design | plan
337
- path: string # File path
338
- format: string # markdown | code | yaml
339
- agent: string # Agent that created it
340
- phase: number # Phase number
341
- ```
342
-
343
- **Standard Deliverable Paths**:
344
- ```
345
- ./reports/{topic}/brainstorms/BRAINSTORM-{feature}.md
346
- ./reports/{topic}/researchers/RESEARCH-{feature}.md
347
- ./reports/{topic}/scouts/SCOUT-{feature}.md
348
- ./reports/{topic}/designs/DESIGN-{feature}.md
349
- ./reports/{topic}/plans/PLAN-{feature}.md
350
- ./documents/knowledge-*.md
351
- ./documents/business/business-*.md
352
- ./documents/audit/audit-*.md
353
- ```
354
-
355
- ---
356
-
357
- ## 4. API Contracts
358
-
359
- ### 4.1 CLI API
360
-
361
- The CLI provides a command-line interface for installation and management.
362
-
363
- #### Commands
364
-
365
- ```bash
366
- # Install framework for a tool
367
- agent-assistant install <tool>
368
- agent-assistant install cursor|copilot|antigravity|claude|codex|--all
369
-
370
- # Uninstall framework from a tool
371
- agent-assistant uninstall <tool>
372
- agent-assistant uninstall cursor|copilot|antigravity|claude|codex|--all
373
-
374
- # List installation status
375
- agent-assistant list
376
- ```
377
-
378
- #### Exit Codes
379
-
380
- | Code | Meaning |
381
- |------|---------|
382
- | 0 | Success |
383
- | 1 | General error |
384
- | 2 | Invalid arguments |
385
-
386
- ### 4.2 Command API
387
-
388
- Users invoke commands through the AI tool interface.
389
-
390
- #### Syntax
391
-
392
- ```
393
- /{command}:{variant} "{description}"
394
-
395
- Examples:
396
- /cook:fast "add dark mode toggle"
397
- /docs:core
398
- /deploy:production
399
- ```
400
-
401
- #### Response Format
402
-
403
- ```markdown
404
- ## 📋 Requirements Registry
405
- | ID | Requirement | Status |
406
- |---|---|---|
407
- | R1 | {requirement} | ⏳ Pending |
408
-
409
- ## 🔀 Workflow Loaded
410
- | Property | Value |
411
- |---|---|
412
- | Command | `/{command}:{variant}` |
413
- | Phases | {count} |
414
-
415
- ## 🎭 Phase {N}: {phase_name}
416
- ### Sub-agent: `{agent}` — {role}
417
- {agent work / summary}
418
-
419
- ### Exit Criteria
420
- - [x] {criterion_1}
421
- - [x] {criterion_2}
422
-
423
- ### ✅ `{agent}` complete
424
- **Deliverable**: {brief summary}
425
-
426
- ## ✅ Workflow Complete
427
- **All requirements fulfilled.**
428
- ```
429
-
430
- ### 4.3 Agent Handoff API
431
-
432
- Agents can delegate to other agents via handoffs.
433
-
434
- #### Handoff Payload
435
-
436
- ```yaml
437
- handoff:
438
- from_agent: string # Originating agent ID
439
- to_agent: string # Target agent ID
440
- task: string # Task description
441
- context:
442
- requirements: string[] # Original requirements (verbatim)
443
- constraints: object # Prior phase constraints
444
- acceptance_criteria: string[] # What constitutes success
445
- deliverable_expected: string # Expected output type
446
- ```
447
-
448
- ---
449
-
450
- ## 5. Business Rules
451
-
452
- ### 5.1 Orchestration Laws
453
-
454
- The 10 inviolable laws that govern all orchestration behavior:
455
-
456
- | Law | Name | Rule |
457
- |-----|------|------|
458
- | 1 | Absolute Decentralization | Orchestrator NEVER writes code, fixes bugs, creates tests |
459
- | 2 | Requirement Integrity | User requirements captured with 100% fidelity |
460
- | 3 | Workflow Sovereignty | Command workflow file is ABSOLUTE SOURCE OF TRUTH |
461
- | 4 | Deep Agent Embodiment | When delegating, FULLY BECOME that agent |
462
- | 5 | Context Isolation | Inter-agent handoffs transfer ONLY essential deliverables |
463
- | 6 | Language Matching | Respond in SAME language as user's request |
464
- | 7 | Recursive Delegation | Manager agents COORDINATE, never implement |
465
- | 8 | Stateful Handoff | Prior phase deliverables are IMMUTABLE CONSTRAINTS |
466
- | 9 | Constraint Propagation | Every agent operates with awareness of Global Project State |
467
- | 10 | Tiered Execution | Sub-agent is TIER 1 MANDATORY; EMBODY is TIER 2 FALLBACK |
468
-
469
- ### 5.2 Skill Resolution Rules
470
-
471
- ```yaml
472
- skill_resolution:
473
- rule_1: "Direct agent match takes precedence over profile match"
474
- rule_2: "Profile match takes precedence over domain inheritance"
475
- rule_3: "Higher priority_score skills are injected first"
476
- rule_4: "Critical skills (9-10) are always injected"
477
- rule_5: "Skills below minimum_priority (5) are optional"
478
- rule_6: "Agent can override with skill_overrides"
479
- ```
480
-
481
- ### 5.3 Phase Execution Rules
482
-
483
- ```yaml
484
- phase_execution:
485
- rule_1: "Execute one phase at a time (no batching)"
486
- rule_2: "Full workflow in one reply"
487
- rule_3: "Verify exit criteria before proceeding"
488
- rule_4: "Load only what current phase needs"
489
- rule_5: "Emit deliverable before moving to next phase"
490
- ```
491
-
492
- ### 5.4 Quality Gate Rules
493
-
494
- ```yaml
495
- quality_gates:
496
- gate_1: "Compile Gate — Build must succeed"
497
- gate_2: "Lint Gate — No linting errors"
498
- gate_3: "Test Gate — Tests must pass"
499
- gate_4: "Security Gate — No vulnerabilities"
500
- gate_5: "Review Gate — Code review approved"
501
- ```
502
-
503
- ---
504
-
505
- ## 6. Entity Relationships
506
-
507
- ### 6.1 ERD Diagram
508
-
509
- ```
510
- ┌─────────────────┐ ┌─────────────────┐
511
- │ AGENT │ │ COMMAND │
512
- ├─────────────────┤ ├─────────────────┤
513
- │ name │ │ name │
514
- │ profile │◀──────▶│ phases[].agent │
515
- │ tools[] │ │ variants[] │
516
- │ handoffs[] │ │ category │
517
- └─────────────────┘ └─────────────────┘
518
- │ │
519
- │ │
520
- ▼ ▼
521
- ┌─────────────────┐ ┌─────────────────┐
522
- │ DOMAIN │ │ DELIVERABLE │
523
- ├─────────────────┤ ├─────────────────┤
524
- │ name │◀───────│ phase │
525
- │ skills[] │ │ agent │
526
- │ skill_count │ │ path │
527
- └─────────────────┘ └─────────────────┘
528
-
529
-
530
-
531
- ┌─────────────────┐
532
- │ SKILL │
533
- ├─────────────────┤
534
- │ skill_id │
535
- │ category │
536
- │ priority_score │
537
- │ relevance_mapping│
538
- └─────────────────┘
539
- ```
540
-
541
- ### 6.2 Relationship Definitions
542
-
543
- | Relationship | Type | Description |
544
- |--------------|------|-------------|
545
- | Agent → Domain | Many-to-Many | Agent inherits from multiple domains |
546
- | Domain → Skill | One-to-Many | Domain contains multiple skills |
547
- | Skill → Agent | Many-to-Many | Skill can be used by multiple agents |
548
- | Command → Agent | One-to-Many | Command workflow invokes multiple agents |
549
- | Agent → Deliverable | One-to-Many | Agent produces deliverables |
550
- | Agent → Agent | Many-to-Many | Agents can handoff to each other |
551
-
552
- ---
553
-
554
- ## 7. Validation Rules
555
-
556
- ### 7.1 Agent Validation
557
-
558
- ```yaml
559
- agent_validation:
560
- name: "Must be kebab-case, unique"
561
- profile: "Must match pattern {domain}:{category}"
562
- tools: "Must be valid tool names from allowed list"
563
- handoffs: "Must reference existing agent names"
564
- ```
565
-
566
- ### 7.2 Skill Validation
567
-
568
- ```yaml
569
- skill_validation:
570
- skill_id: "Must be kebab-case, unique within domain"
571
- category: "Must be core|expert|specialized|utility"
572
- priority_score: "Must be 1-10"
573
- relevance_mapping.agents: "Must reference existing agent names"
574
- relevance_mapping.profiles: "Must match valid profile patterns"
575
- ```
576
-
577
- ### 7.3 Command Validation
578
-
579
- ```yaml
580
- command_validation:
581
- name: "Must be lowercase, unique"
582
- variants: "Must have at least one variant"
583
- phases: "Must have sequential phase numbers"
584
- phases[].agent: "Must reference existing agent"
585
- ```
586
-
587
- ---
588
-
589
- ## 8. Related Documentation
590
-
591
- | Document | Purpose |
592
- |----------|---------|
593
- | `knowledge-overview.md` | Project introduction, goals, tech stack |
594
- | `knowledge-architecture.md` | System design, components, data flow |
595
- | `knowledge-source-base.md` | Directory structure, file purposes |
596
- | `knowledge-standards.md` | Code style, naming conventions |
597
- | `AGENT-TEMPLATE.md` | Agent file template |
598
- | `matrix-skills/_index.yaml` | Matrix skill registry |
599
-
600
- ---
601
-
602
- **Agent Assistant Domain Model** — _Structured, Extensible, Well-Defined_