@namch/agent-assistant 1.0.4 → 1.1.0

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 (86) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +1 -1
  3. package/agents/planner.md +59 -11
  4. package/agents/reporter.md +1 -1
  5. package/cli/install.js +514 -169
  6. package/code-assistants/antigravity-assistant/AntigravityGlobal.agent.md +38 -135
  7. package/code-assistants/antigravity-assistant/GEMINI.md +37 -137
  8. package/code-assistants/claude-assistant/CLAUDE.md +60 -38
  9. package/code-assistants/copilot-assistant/agent-assistant.agent.md +44 -125
  10. package/code-assistants/cursor-assistant/.cursorrules +42 -84
  11. package/code-assistants/cursor-assistant/rules/agent-assistant.mdc +37 -135
  12. package/commands/ask/fast.md +6 -4
  13. package/commands/ask/hard.md +6 -4
  14. package/commands/ask.md +3 -3
  15. package/commands/auto.md +3 -3
  16. package/commands/brainstorm/fast.md +6 -4
  17. package/commands/brainstorm/hard.md +6 -4
  18. package/commands/brainstorm.md +3 -3
  19. package/commands/code/fast.md +6 -4
  20. package/commands/code/focus.md +22 -46
  21. package/commands/code/hard.md +23 -48
  22. package/commands/code.md +3 -3
  23. package/commands/cook/fast.md +5 -3
  24. package/commands/cook/focus.md +22 -51
  25. package/commands/cook/hard.md +23 -55
  26. package/commands/cook.md +3 -3
  27. package/commands/debug/fast.md +5 -3
  28. package/commands/debug/focus.md +35 -40
  29. package/commands/debug/hard.md +38 -16
  30. package/commands/debug.md +3 -3
  31. package/commands/deploy/check.md +4 -4
  32. package/commands/deploy/preview.md +4 -4
  33. package/commands/deploy/production.md +4 -4
  34. package/commands/deploy/rollback.md +4 -4
  35. package/commands/deploy.md +3 -3
  36. package/commands/design/fast.md +6 -4
  37. package/commands/design/focus.md +28 -44
  38. package/commands/design/hard.md +53 -17
  39. package/commands/design.md +3 -3
  40. package/commands/docs/audit.md +5 -5
  41. package/commands/docs/business.md +5 -5
  42. package/commands/docs/core.md +5 -5
  43. package/commands/docs.md +3 -3
  44. package/commands/fix/fast.md +5 -3
  45. package/commands/fix/focus.md +36 -44
  46. package/commands/fix/hard.md +23 -37
  47. package/commands/fix.md +3 -3
  48. package/commands/plan/fast.md +6 -4
  49. package/commands/plan/focus.md +6 -4
  50. package/commands/plan/hard.md +6 -4
  51. package/commands/plan.md +3 -3
  52. package/commands/report/fast.md +6 -4
  53. package/commands/report/focus.md +6 -4
  54. package/commands/report/hard.md +6 -4
  55. package/commands/report.md +3 -3
  56. package/commands/review/fast.md +5 -3
  57. package/commands/review/hard.md +5 -3
  58. package/commands/review.md +3 -3
  59. package/commands/test/fast.md +5 -3
  60. package/commands/test/focus.md +24 -43
  61. package/commands/test/hard.md +24 -16
  62. package/commands/test.md +3 -3
  63. package/documents/HSOL-ASSESSMENT.md +121 -0
  64. package/documents/SMART-SKILL-ORCHESTRATION-BLUEPRINT.md +1341 -0
  65. package/documents/business/business-glossary.md +6 -6
  66. package/documents/knowledge-architecture.md +81 -1
  67. package/documents/knowledge-domain.md +4 -3
  68. package/documents/knowledge-overview.md +1 -1
  69. package/documents/knowledge-source-base.md +15 -10
  70. package/package.json +2 -2
  71. package/rules/AGENTS.md +187 -0
  72. package/rules/CONTEXT-GATE.md +362 -0
  73. package/rules/CORE.md +175 -0
  74. package/rules/ERRORS.md +127 -0
  75. package/rules/PHASES.md +156 -0
  76. package/rules/REFERENCE.md +179 -0
  77. package/rules/SKILLS.md +167 -0
  78. package/skills/find-skills/SKILL.md +137 -0
  79. package/rules/ADAPTIVE-EXECUTION.md +0 -271
  80. package/rules/AGENT-RULES.md +0 -285
  81. package/rules/BOOTSTRAP.md +0 -301
  82. package/rules/ERROR-RECOVERY.md +0 -201
  83. package/rules/EXECUTION-PROTOCOL.md +0 -485
  84. package/rules/ORCHESTRATION-LAWS.md +0 -218
  85. package/rules/QUICK-REFERENCE.md +0 -204
  86. package/rules/SKILL-DISCOVERY.md +0 -370
@@ -1,204 +0,0 @@
1
- # 📚 QUICK REFERENCE
2
-
3
- > **PURPOSE**: Fast lookup tables for commands, agents, and dependencies
4
-
5
- ---
6
-
7
- ## COMMAND ROUTING TABLE
8
-
9
- | User Input | Resolves To | Workflow File |
10
- | ------------------- | ------------------ | ------------------------ |
11
- | `/cook implement X` | `/cook:auto` | `~/.{TOOL}/skills/agent-assistant/commands/cook.md` |
12
- | `/cook:fast X` | `/cook:fast` | `~/.{TOOL}/skills/agent-assistant/commands/cook/fast.md` |
13
- | `/cook:hard X` | `/cook:hard` | `~/.{TOOL}/skills/agent-assistant/commands/cook/hard.md` |
14
- | `/fix error X` | `/fix:auto` | `~/.{TOOL}/skills/agent-assistant/commands/fix.md` |
15
- | `/fix:fast X` | `/fix:fast` | `~/.{TOOL}/skills/agent-assistant/commands/fix/fast.md` |
16
- | `/fix:hard X` | `/fix:hard` | `~/.{TOOL}/skills/agent-assistant/commands/fix/hard.md` |
17
- | `/debug X` | `/debug:auto` | `~/.{TOOL}/skills/agent-assistant/commands/debug.md` |
18
- | `/plan X` | `/plan:auto` | `~/.{TOOL}/skills/agent-assistant/commands/plan.md` |
19
- | `/test X` | `/test:auto` | `~/.{TOOL}/skills/agent-assistant/commands/test.md` |
20
- | `/review X` | `/review:auto` | `~/.{TOOL}/skills/agent-assistant/commands/review.md` |
21
- | `/docs X` | `/docs:auto` | `~/.{TOOL}/skills/agent-assistant/commands/docs.md` |
22
- | `/design X` | `/design:auto` | `~/.{TOOL}/skills/agent-assistant/commands/design.md` |
23
- | `/deploy X` | `/deploy:auto` | `~/.{TOOL}/skills/agent-assistant/commands/deploy.md` |
24
- | `/brainstorm X` | `/brainstorm:auto` | `~/.{TOOL}/skills/agent-assistant/commands/brainstorm.md` |
25
- | `/ask X` | `/ask:auto` | `~/.{TOOL}/skills/agent-assistant/commands/ask.md` |
26
- | `/code X` | `/code:auto` | `~/.{TOOL}/skills/agent-assistant/commands/code.md` |
27
- | `/report X` | `/report:auto` | `~/.{TOOL}/skills/agent-assistant/commands/report.md` |
28
- | `/report:fast X` | `/report:fast` | `~/.{TOOL}/skills/agent-assistant/commands/report/fast.md` |
29
- | `/report:hard X` | `/report:hard` | `~/.{TOOL}/skills/agent-assistant/commands/report/hard.md` |
30
- | `/report:focus X` | `/report:focus` | `~/.{TOOL}/skills/agent-assistant/commands/report/focus.md` |
31
-
32
- ---
33
-
34
- ## AGENT LOOKUP TABLE
35
-
36
- | Domain | Agent | File | Category |
37
- | ------------- | ---------------------- | -------------------------------- | ----------- |
38
- | Architecture | `tech-lead` | `~/.{TOOL}/skills/agent-assistant/agents/tech-lead.md` | meta |
39
- | Planning | `planner` | `~/.{TOOL}/skills/agent-assistant/agents/planner.md` | meta |
40
- | Backend | `backend-engineer` | `~/.{TOOL}/skills/agent-assistant/agents/backend-engineer.md` | engineering |
41
- | Frontend | `frontend-engineer` | `~/.{TOOL}/skills/agent-assistant/agents/frontend-engineer.md` | engineering |
42
- | Database | `database-architect` | `~/.{TOOL}/skills/agent-assistant/agents/database-architect.md` | engineering |
43
- | Mobile | `mobile-engineer` | `~/.{TOOL}/skills/agent-assistant/agents/mobile-engineer.md` | engineering |
44
- | Games | `game-engineer` | `~/.{TOOL}/skills/agent-assistant/agents/game-engineer.md` | engineering |
45
- | Testing | `tester` | `~/.{TOOL}/skills/agent-assistant/agents/tester.md` | validation |
46
- | Review | `reviewer` | `~/.{TOOL}/skills/agent-assistant/agents/reviewer.md` | validation |
47
- | Security | `security-engineer` | `~/.{TOOL}/skills/agent-assistant/agents/security-engineer.md` | validation |
48
- | Performance | `performance-engineer` | `~/.{TOOL}/skills/agent-assistant/agents/performance-engineer.md` | validation |
49
- | Debugging | `debugger` | `~/.{TOOL}/skills/agent-assistant/agents/debugger.md` | validation |
50
- | Research | `researcher` | `~/.{TOOL}/skills/agent-assistant/agents/researcher.md` | research |
51
- | Codebase | `scouter` | `~/.{TOOL}/skills/agent-assistant/agents/scouter.md` | research |
52
- | Brainstorm | `brainstormer` | `~/.{TOOL}/skills/agent-assistant/agents/brainstormer.md` | research |
53
- | Design | `designer` | `~/.{TOOL}/skills/agent-assistant/agents/designer.md` | research |
54
- | Documentation | `docs-manager` | `~/.{TOOL}/skills/agent-assistant/agents/docs-manager.md` | support |
55
- | DevOps | `devops-engineer` | `~/.{TOOL}/skills/agent-assistant/agents/devops-engineer.md` | support |
56
- | Business | `business-analyst` | `~/.{TOOL}/skills/agent-assistant/agents/business-analyst.md` | support |
57
- | Project | `project-manager` | `~/.{TOOL}/skills/agent-assistant/agents/project-manager.md` | support |
58
- | Reporting | `reporter` | `~/.{TOOL}/skills/agent-assistant/agents/reporter.md` | support |
59
-
60
- ---
61
-
62
- ## TASK → AGENT MAPPING
63
-
64
- | Task Type | Primary Agent | Backup |
65
- | ----------------- | ---------------------- | ------------------- |
66
- | API endpoints | `backend-engineer` | — |
67
- | UI components | `frontend-engineer` | `designer` |
68
- | Database schema | `database-architect` | `backend-engineer` |
69
- | Security audit | `security-engineer` | — |
70
- | Performance | `performance-engineer` | — |
71
- | Testing | `tester` | — |
72
- | Code review | `reviewer` | — |
73
- | External research | `researcher` | `scouter` |
74
- | Codebase analysis | `scouter` | `researcher` |
75
- | Documentation | `docs-manager` | — |
76
- | Requirements | `brainstormer` | `business-analyst` |
77
- | Planning | `planner` | — |
78
- | Visual design | `designer` | `frontend-engineer` |
79
- | Orchestration | `tech-lead` | — |
80
- | Bug investigation | `debugger` | `tester` |
81
- | Deployment | `devops-engineer` | — |
82
- | Git operations | `devops-engineer` | — |
83
- | AI/ML agents | `backend-engineer` | `tech-lead` |
84
- | Penetration test | `security-engineer` | — |
85
- | Workflow automation | `devops-engineer` | `backend-engineer` |
86
- | Reports, status, documentation updates | `reporter` | `docs-manager` |
87
-
88
- ---
89
-
90
- ## PHASE DEPENDENCY MATRIX
91
-
92
- | Current Phase | Required Input | Produces |
93
- | ------------------ | ------------------------- | ------------------------- |
94
- | Brainstorm | User Request | `BRAINSTORM-{feature}.md` |
95
- | Research | Request + Brainstorm | `RESEARCH-{feature}.md` |
96
- | Scout | User Request | `SCOUT-{feature}.md` |
97
- | Design | Brainstorm + Scout | `DESIGN-{feature}.md` |
98
- | **Planning** | Scout + Research + Design | `PLAN-{feature}.md` |
99
- | **Implementation** | **PLAN (MANDATORY)** | Code changes |
100
- | **Testing** | PLAN + Code | Test results |
101
- | **Review** | PLAN + Code + Tests | Review verdict |
102
-
103
- ---
104
-
105
- ## DELIVERABLE PATHS
106
-
107
- ```yaml
108
- brainstormer: "./reports/brainstorms/BRAINSTORM-{feature}.md"
109
- researcher: "./reports/researchers/RESEARCH-{feature}.md"
110
- scouter: "./reports/scouts/SCOUT-{feature}.md"
111
- designer: "./reports/designs/DESIGN-{feature}.md"
112
- planner: "./reports/plans/PLAN-{feature}.md"
113
- reporter: "./reports/ (create/update per task)"
114
- ```
115
-
116
- ---
117
-
118
- ## DOCUMENTATION PATHS (from /docs:core)
119
-
120
- When `./documents/` exists, agents **read these** for project context:
121
-
122
- | File | Purpose |
123
- | --------------------------- | -------------------------------- |
124
- | `./documents/knowledge-overview.md` | Project purpose, goals, tech stack |
125
- | `./documents/knowledge-architecture.md` | System design, components, patterns |
126
- | `./documents/knowledge-domain.md` | Data models, API contracts, entities |
127
- | `./documents/knowledge-source-base.md` | Directory structure, entry points |
128
- | `./documents/knowledge-standards.md` | Code style, naming, conventions |
129
-
130
- Business: `./documents/business/*.md`. Audit: `./documents/audit/*.md`.
131
-
132
- ---
133
-
134
- ## BLOCKING RULES
135
-
136
- ```yaml
137
- implementation:
138
- IF plan_missing:
139
- action: "BLOCK → Route to planner first"
140
- message: "⛔ Cannot implement without plan"
141
-
142
- testing:
143
- IF plan_exists:
144
- action: "MUST verify against plan checkpoints"
145
-
146
- review:
147
- IF plan_exists:
148
- action: "MUST verify code matches plan intent"
149
- ```
150
-
151
- ---
152
-
153
- ## TIERED EXECUTION QUICK CHECK
154
-
155
- ```yaml
156
- TIER_1_SUBAGENT:
157
- priority: "MANDATORY when tool exists"
158
- context: "ISOLATED"
159
- use_when: "runSubagent detected"
160
-
161
- TIER_2_EMBODY:
162
- priority: "FALLBACK only"
163
- context: "SHARED"
164
- use_when: "Tool missing OR system error"
165
-
166
- decision: 1. Check runSubagent exists
167
- 2. IF yes → MUST use TIER 1
168
- 3. IF error → Fall back TIER 2
169
- 4. IF no tool → Use TIER 2
170
-
171
- anti_lazy: ❌ TIER 2 when TIER 1 available
172
- ❌ "Complexity" as TIER 2 reason
173
- ❌ Skip Tool Discovery
174
- ```
175
-
176
- ---
177
-
178
- ## SELF-VERIFICATION
179
-
180
- ```
181
- □ Did I delegate (not execute)?
182
- □ Did I follow workflow order?
183
- □ Did I respond in user's language?
184
- □ Did I verify exit criteria?
185
- □ Did I use correct tier?
186
- ```
187
-
188
- ---
189
-
190
- ## NATURAL LANGUAGE DETECTION
191
-
192
- | User Says | Detect As |
193
- | ---------------------------------------------- | ------------- |
194
- | "implement", "build", "create", "add feature" | `/cook` |
195
- | "fix", "bug", "error", "broken", "not working" | `/fix` |
196
- | "plan", "how should", "approach", "strategy" | `/plan` |
197
- | "debug", "investigate", "why is", "trace" | `/debug` |
198
- | "test", "write tests", "coverage" | `/test` |
199
- | "review", "check code", "PR" | `/review` |
200
- | "document", "readme", "api docs" | `/docs` |
201
- | "design", "UI", "UX", "mockup" | `/design` |
202
- | "deploy", "release", "production" | `/deploy` |
203
- | "brainstorm", "ideas", "explore" | `/brainstorm` |
204
- | "report", "status report", "summary", "documentation update" | `/report` |
@@ -1,370 +0,0 @@
1
- # Skill Discovery Protocol
2
-
3
- > **Purpose**: Runtime resolution of skills for agents using the Matrix Metadata system.
4
- > **Source**: `~/.{TOOL}/skills/agent-assistant/matrix-skills/` (distributed by domain)
5
- > **Total Skills**: 310 skills across 19 domains
6
-
7
- ---
8
-
9
- ## Overview
10
-
11
- The Skill Discovery Protocol replaces hardcoded skill lists in agent files with dynamic resolution from a distributed matrix organized by domain. When an agent is activated, this protocol determines which skills to inject based on the agent's declared profile and inherited domains.
12
-
13
- ### Matrix Structure
14
-
15
- ```
16
- matrix-skills/
17
- ├── _index.yaml # Registry, agent profiles, resolution rules
18
- ├── backend.yaml # 32 skills
19
- ├── frontend.yaml # 22 skills
20
- ├── architecture.yaml # 9 skills
21
- ├── quality.yaml # 21 skills
22
- ├── security.yaml # 35 skills
23
- ├── design.yaml # 10 skills
24
- ├── planning.yaml # 12 skills
25
- ├── devops.yaml # 22 skills
26
- ├── data.yaml # 7 skills
27
- ├── performance.yaml # 1 skill
28
- ├── research.yaml # 11 skills
29
- ├── mobile.yaml # 8 skills
30
- ├── gaming.yaml # 3 skills
31
- ├── management.yaml # 4 skills
32
- ├── ai-ml.yaml # 40 skills
33
- ├── cloud.yaml # 11 skills
34
- ├── languages.yaml # 17 skills
35
- ├── tools.yaml # 41 skills
36
- └── mcp.yaml # 8 skills
37
- ```
38
-
39
- ---
40
-
41
- ## Resolution Algorithm
42
-
43
- ### Step 1: Parse Agent Profile
44
-
45
- Extract from agent frontmatter:
46
- ```yaml
47
- profile: "{domain}:{category}"
48
- ```
49
-
50
- Example: `backend:execution` → domain=backend, category=execution
51
-
52
- ### Step 2: Load Domain Files
53
-
54
- From `_index.yaml`, find agent's inherited domains:
55
- ```yaml
56
- agent_profiles:
57
- backend-engineer:
58
- profile: "backend:execution"
59
- inherit_from: ["backend", "architecture", "quality", "data", "languages"]
60
- ```
61
-
62
- Load each domain file: `backend.yaml`, `architecture.yaml`, `quality.yaml`, etc.
63
-
64
- ### Step 3: Resolve Skills
65
-
66
- Execute in order of precedence:
67
-
68
- ```
69
- 1. DIRECT AGENT MATCH
70
- → Find skills where relevance_mapping.agents contains agent_id
71
- → Example: skill.relevance_mapping.agents: [backend-engineer]
72
-
73
- 2. PROFILE MATCH
74
- → Find skills where relevance_mapping.profiles contains:
75
- - Exact match: "backend:execution"
76
- - Domain wildcard: "backend:*"
77
- - Category wildcard: "*:execution"
78
- - Universal: "*"
79
-
80
- 3. DOMAIN INHERITANCE
81
- → From agent_profiles.{agent_id}.inherit_from
82
- → Include skills from inherited domains
83
- ```
84
-
85
- ### Step 4: Apply Priority Filter
86
-
87
- ```yaml
88
- thresholds:
89
- critical_priority: 9 # Always include (mandatory)
90
- core_priority: 7 # Standard include
91
- minimum_priority: 5 # Include if context matches
92
- ```
93
-
94
- ### Step 5: Apply Overrides
95
-
96
- If agent declares `skill_overrides`:
97
- ```yaml
98
- skill_overrides:
99
- include: [additional-skill] # Force add
100
- exclude: [removed-skill] # Force remove
101
- priority_threshold: 8 # Override minimum
102
- ```
103
-
104
- ### Step 6: Return Skill Set
105
-
106
- Sorted by priority_score descending.
107
-
108
- ---
109
-
110
- ## Resolution Examples
111
-
112
- ### Example 1: Backend Engineer
113
-
114
- **Input:**
115
- ```yaml
116
- name: backend-engineer
117
- profile: "backend:execution"
118
- ```
119
-
120
- **Domain Files Loaded:**
121
- - `backend.yaml`
122
- - `architecture.yaml`
123
- - `quality.yaml`
124
- - `data.yaml`
125
- - `languages.yaml`
126
-
127
- **Resolution:**
128
-
129
- | Step | Source File | Skills Found |
130
- |------|-------------|--------------|
131
- | 1 | backend.yaml | api-patterns, backend-development, microservices-architect, backend-dev-guidelines, software-architecture, bun-development, inngest, trigger-dev, stripe-integration |
132
- | 2 | architecture.yaml | architecture, clean-code |
133
- | 3 | data.yaml | database-design, sql-pro, prisma-expert, nosql-expert, neon-postgres |
134
- | 4 | languages.yaml | typescript-expert, python-patterns, javascript-mastery |
135
- | 5 | ai-ml.yaml | ai-agents-architect, autonomous-agents, llm-app-patterns, rag-engineer, prompt-engineering, crewai, langgraph |
136
-
137
- **Output (sorted by priority):**
138
- ```
139
- architecture (10)
140
- ai-agents-architect (9)
141
- api-patterns (9)
142
- database-design (9)
143
- clean-code (9)
144
- backend-development (8)
145
- backend-dev-guidelines (8)
146
- software-architecture (8)
147
- llm-app-patterns (8)
148
- rag-engineer (8)
149
- typescript-expert (8)
150
- microservices-architect (8)
151
- ...
152
- ```
153
-
154
- ### Example 2: Designer with Override
155
-
156
- **Input:**
157
- ```yaml
158
- name: designer
159
- profile: "design:creative"
160
- skill_overrides:
161
- exclude: [ux-researcher-designer]
162
- priority_threshold: 8
163
- ```
164
-
165
- **Domain Files Loaded:**
166
- - `design.yaml`
167
- - `frontend.yaml`
168
-
169
- **Resolution:**
170
-
171
- | Step | Action |
172
- |------|--------|
173
- | 1 | Load skills from design.yaml |
174
- | 2 | Load skills from frontend.yaml |
175
- | 3 | Remove ux-researcher-designer (excluded) |
176
- | 4 | Filter priority >= 8 only |
177
-
178
- **Output:**
179
- ```
180
- aesthetic (9)
181
- ui-ux-pro-max (9)
182
- frontend-design (9)
183
- tailwind-patterns (8)
184
- ui-design-system (8)
185
- ui-styling (8)
186
- ```
187
-
188
- ---
189
-
190
- ## Wildcard Patterns
191
-
192
- | Pattern | Meaning | Example Match |
193
- |---------|---------|---------------|
194
- | `backend:execution` | Exact match | backend:execution only |
195
- | `backend:*` | Any backend category | backend:execution, backend:analysis |
196
- | `*:execution` | Any domain, execution category | backend:execution, frontend:execution |
197
- | `*:orchestration` | Any orchestrator | architecture:orchestration, management:orchestration |
198
- | `*` | Universal (all agents) | Any agent |
199
-
200
- ---
201
-
202
- ## Domain Inheritance
203
-
204
- Defined in `_index.yaml`:
205
-
206
- ```yaml
207
- agent_profiles:
208
- backend-engineer:
209
- profile: "backend:execution"
210
- inherit_from: ["backend", "architecture", "quality", "data", "languages"]
211
- primary_domain: "backend"
212
- ```
213
-
214
- When resolving skills for `backend-engineer`:
215
- 1. Load `backend.yaml` → filter matching skills
216
- 2. Load `architecture.yaml` → filter matching skills
217
- 3. Load `quality.yaml` → filter matching skills
218
- 4. Load `data.yaml` → filter matching skills
219
- 5. Load `languages.yaml` → filter matching skills
220
-
221
- This enables cross-domain skill sharing without explicit agent declarations.
222
-
223
- ---
224
-
225
- ## Agent Files: Profile + Domains Only
226
-
227
- Agent files **do not** list key skills or domain-file tables. Each agent's Skills section contains only:
228
-
229
- ```markdown
230
- ## ⚡ Skills
231
-
232
- > **MATRIX DISCOVERY**: Skills auto-injected from domain files in `~/.{TOOL}/skills/agent-assistant/matrix-skills/`
233
- > Profile: `{domain}:{category}` | Domains: `{inherit_from from _index.yaml}`
234
- ```
235
-
236
- AI tools resolve skills by reading `~/.{TOOL}/skills/agent-assistant/matrix-skills/_index.yaml` → `agent_profiles.{agent}.inherit_from`, then loading the listed domain files and injecting skills via `relevance_mapping`. **When adding new skills, update only the skill folder and the corresponding matrix-skills domain file; no agent file changes are required.**
237
-
238
- ---
239
-
240
- ## Adding New Skills
241
-
242
- ### Workflow
243
-
244
- 1. **Create skill folder:**
245
- ```
246
- ~/.{TOOL}/skills/{skill-id}/
247
- └── SKILL.md
248
- ```
249
-
250
- 2. **Add to appropriate domain file:**
251
- ```yaml
252
- # matrix-skills/{domain}.yaml
253
- - skill_id: new-skill
254
- category: {core|expert|specialized|utility}
255
- priority_score: {1-10}
256
- relevance_mapping:
257
- agents: [{agent1}, {agent2}]
258
- profiles: ["{domain}:{category}"]
259
- description: "Brief AI-recognizable description"
260
- ```
261
-
262
- 3. **Update domain skill_count in _index.yaml** (optional but recommended)
263
-
264
- 4. **Do not edit agent files** — skills are resolved from matrix-skills by Profile and Domains only.
265
-
266
- 5. **Verify resolution:**
267
- - Skill appears in target agent's resolved set
268
- - Priority ordering is correct
269
- - No conflicts with existing skills
270
-
271
- ### Priority Guidelines
272
-
273
- | Score | Category | Usage |
274
- |-------|----------|-------|
275
- | 10 | Critical | Always required, never skip |
276
- | 9 | Core | Standard for domain |
277
- | 8 | Expert | Specialized but common |
278
- | 7 | Core | Useful in most contexts |
279
- | 6 | Utility | Context-dependent |
280
- | 5 | Optional | Nice to have |
281
- | 1-4 | Rare | Edge cases only |
282
-
283
- ---
284
-
285
- ## Validation Rules
286
-
287
- ### Pre-Deployment Checks
288
-
289
- 1. **Skill existence:**
290
- - Every `skill_id` in domain files has corresponding `~/.{TOOL}/skills/{skill_id}/SKILL.md`
291
-
292
- 2. **Agent coverage:**
293
- - Every agent has at least one matching skill
294
- - No orphan agents with empty skill sets
295
-
296
- 3. **Profile validity:**
297
- - All profiles reference valid domains
298
- - Domain inheritance forms no cycles
299
-
300
- 4. **Priority consistency:**
301
- - Critical skills (9-10) present for all core agents
302
- - No domain without core skills (7+)
303
-
304
- ### Runtime Validation
305
-
306
- ```
307
- IF resolved_skills.length == 0:
308
- → ERROR: No skills found for agent
309
- → FALLBACK: Use agent's skill_overrides.include if present
310
-
311
- IF critical_skill.missing:
312
- → WARNING: Agent missing critical skill
313
- → CONTINUE: May degrade performance
314
- ```
315
-
316
- ---
317
-
318
- ## Orchestrator Integration
319
-
320
- When orchestrator activates an agent:
321
-
322
- ```
323
- 1. READ agent file → extract profile
324
- 2. LOAD _index.yaml → find inherited domains
325
- 3. LOAD domain files → collect matching skills
326
- 4. APPLY filters and overrides
327
- 5. INJECT resolved skills into agent context
328
- 6. EXECUTE agent with full skill set
329
- ```
330
-
331
- The orchestrator never needs to know individual skills—it only needs the agent's profile.
332
-
333
- ---
334
-
335
- ## Performance Considerations
336
-
337
- ### Caching Strategy
338
-
339
- - `_index.yaml` loaded once at orchestrator startup
340
- - Domain files loaded on-demand per agent
341
- - Skill resolution is cached per agent_id
342
- - Cache invalidation on any matrix file change
343
-
344
- ### Complexity
345
-
346
- - Resolution: O(D × S) where D=inherited domains, S=skills per domain
347
- - Typical resolution: < 1ms
348
- - Total Matrix size: ~310 skills = ~25KB across all YAML files
349
-
350
- ---
351
-
352
- ## Troubleshooting
353
-
354
- | Symptom | Cause | Solution |
355
- |---------|-------|----------|
356
- | Agent has no skills | Profile not in _index.yaml | Add to agent_profiles |
357
- | Wrong skills injected | Incorrect relevance_mapping | Fix mapping in domain file |
358
- | Skill not appearing | Priority below threshold | Increase priority_score |
359
- | Too many skills | Broad inheritance | Use skill_overrides.exclude |
360
- | Skill conflict | Duplicate skill_id | Ensure unique IDs across all domain files |
361
- | Domain file not loaded | Not in inherit_from | Add domain to agent's inherit_from |
362
-
363
- ---
364
-
365
- ## References
366
-
367
- - **Matrix Index**: `~/.{TOOL}/skills/agent-assistant/matrix-skills/_index.yaml`
368
- - **Domain files**: `~/.{TOOL}/skills/agent-assistant/matrix-skills/{domain}.yaml`
369
- - **Agent template**: `AGENT-TEMPLATE.md`
370
- - **Skills directory**: `~/.{TOOL}/skills/`