@namch/agent-assistant 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -1
- package/agents/backend-engineer.md +3 -3
- package/agents/brainstormer.md +3 -3
- package/agents/business-analyst.md +3 -3
- package/agents/database-architect.md +3 -3
- package/agents/debugger.md +2 -2
- package/agents/designer.md +2 -2
- package/agents/devops-engineer.md +2 -2
- package/agents/docs-manager.md +23 -15
- package/agents/frontend-engineer.md +3 -3
- package/agents/game-engineer.md +3 -3
- package/agents/mobile-engineer.md +4 -4
- package/agents/performance-engineer.md +3 -3
- package/agents/planner.md +4 -4
- package/agents/project-manager.md +3 -3
- package/agents/researcher.md +3 -3
- package/agents/reviewer.md +3 -3
- package/agents/scouter.md +3 -3
- package/agents/security-engineer.md +3 -3
- package/agents/tech-lead.md +3 -3
- package/agents/tester.md +2 -2
- package/commands/docs/audit.md +554 -78
- package/commands/docs/business.md +392 -76
- package/commands/docs/core.md +573 -74
- package/commands/docs.md +62 -61
- package/documents/business/business-features/00-index.md +101 -0
- package/documents/business/business-features/01-feature-inventory.md +341 -0
- package/documents/business/business-features/02-prioritization-moscow.md +148 -0
- package/documents/business/business-features/03-feature-specifications.md +512 -0
- package/documents/business/business-features/04-dependencies-and-release-sequencing.md +313 -0
- package/documents/business/business-features/05-success-metrics.md +290 -0
- package/documents/business/business-glossary/00-index.md +89 -0
- package/documents/business/business-glossary/01-canonical-terms.md +428 -0
- package/documents/business/business-glossary/02-synonyms-and-deprecated-terms.md +180 -0
- package/documents/business/business-glossary/03-domain-entities-and-events.md +395 -0
- package/documents/business/business-glossary/04-api-term-mapping.md +173 -0
- package/documents/business/business-prd/00-index.md +107 -0
- package/documents/business/business-prd/01-executive-summary.md +131 -0
- package/documents/business/business-prd/02-problem-goals-and-scope.md +204 -0
- package/documents/business/business-prd/03-stakeholders-and-requirements.md +210 -0
- package/documents/business/business-prd/04-acceptance-risks-assumptions.md +246 -0
- package/documents/business/business-workflows/00-index.md +107 -0
- package/documents/business/business-workflows/01-actor-map.md +303 -0
- package/documents/business/business-workflows/02-workflow-catalog.md +252 -0
- package/documents/business/business-workflows/03-detailed-workflows.md +641 -0
- package/documents/business/business-workflows/04-decision-rules-and-exceptions.md +216 -0
- package/documents/business/business-workflows/05-sla-and-handoffs.md +253 -0
- package/documents/knowledge-architecture/00-index.md +159 -0
- package/documents/knowledge-architecture/01-system-overview.md +240 -0
- package/documents/knowledge-architecture/02-components.md +419 -0
- package/documents/knowledge-architecture/03-data-flow.md +369 -0
- package/documents/knowledge-architecture/04-design-patterns.md +498 -0
- package/documents/knowledge-architecture/05-decisions.md +410 -0
- package/documents/knowledge-domain/00-index.md +251 -0
- package/documents/knowledge-domain/01-entities.md +583 -0
- package/documents/knowledge-domain/02-database-schema.md +138 -0
- package/documents/knowledge-domain/03-api-contracts.md +479 -0
- package/documents/knowledge-domain/04-business-rules.md +555 -0
- package/documents/knowledge-overview/00-index.md +107 -0
- package/documents/knowledge-overview/01-project-identity.md +162 -0
- package/documents/knowledge-overview/02-tech-stack.md +119 -0
- package/documents/knowledge-overview/03-features.md +233 -0
- package/documents/knowledge-overview/04-getting-started.md +394 -0
- package/documents/knowledge-source-base/00-index.md +107 -0
- package/documents/knowledge-source-base/01-directory-structure.md +312 -0
- package/documents/knowledge-source-base/02-entry-points.md +346 -0
- package/documents/knowledge-source-base/03-key-modules.md +582 -0
- package/documents/knowledge-source-base/04-configuration.md +467 -0
- package/documents/knowledge-standards/00-index.md +129 -0
- package/documents/knowledge-standards/01-code-style.md +161 -0
- package/documents/knowledge-standards/02-conventions.md +255 -0
- package/documents/knowledge-standards/03-git-workflow.md +228 -0
- package/documents/knowledge-standards/04-testing-standards.md +175 -0
- package/package.json +1 -1
- package/rules/REFERENCE.md +10 -6
- package/skills/docs-audit/README.md +10 -8
- package/skills/docs-audit/SKILL.md +45 -41
- package/skills/docs-audit/references/scoring-framework.md +5 -5
- package/skills/docs-core/README.md +19 -14
- package/skills/docs-core/SKILL.md +189 -117
- package/skills/planning/references/codebase-understanding.md +5 -5
- package/documents/business/business-features.md +0 -894
- package/documents/business/business-glossary.md +0 -554
- package/documents/business/business-prd.md +0 -400
- package/documents/business/business-workflows.md +0 -713
- package/documents/knowledge-architecture.md +0 -621
- package/documents/knowledge-domain.md +0 -602
- package/documents/knowledge-overview.md +0 -316
- package/documents/knowledge-source-base.md +0 -581
- package/documents/knowledge-standards.md +0 -632
|
@@ -1,632 +0,0 @@
|
|
|
1
|
-
# Agent Assistant — Knowledge Standards
|
|
2
|
-
|
|
3
|
-
> **Purpose**: Code style, naming conventions, commit format, documentation guidelines, and development standards for AI agents and developers.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## 1. Overview
|
|
8
|
-
|
|
9
|
-
This document defines the standards and conventions used throughout the Agent Assistant project. All contributors, agents, and AI tools should follow these standards for consistency.
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## 2. File Naming Conventions
|
|
14
|
-
|
|
15
|
-
### 2.1 General Rules
|
|
16
|
-
|
|
17
|
-
| Rule | Description | Example |
|
|
18
|
-
|------|-------------|---------|
|
|
19
|
-
| Lowercase kebab-case | Default for most files | `backend-engineer.md`, `api-patterns` |
|
|
20
|
-
| UPPERCASE | Rule files and entry points | `BOOTSTRAP.md`, `CLAUDE.md` |
|
|
21
|
-
| Lowercase | Configuration files | `package.json`, `.gitignore` |
|
|
22
|
-
| No spaces | Use hyphens instead | `mobile-engineer.md` ✅, `mobile engineer.md` ❌ |
|
|
23
|
-
|
|
24
|
-
### 2.2 By File Type
|
|
25
|
-
|
|
26
|
-
| Type | Convention | Examples |
|
|
27
|
-
|------|------------|----------|
|
|
28
|
-
| Agent files | `{kebab-case}.md` | `backend-engineer.md`, `tech-lead.md` |
|
|
29
|
-
| Command routers | `{command}.md` | `cook.md`, `fix.md`, `deploy.md` |
|
|
30
|
-
| Command variants | `{command}/{variant}.md` | `cook/fast.md`, `docs/core.md` |
|
|
31
|
-
| Skill folders | `{kebab-case}/` | `api-patterns/`, `react-patterns/` |
|
|
32
|
-
| Skill definitions | `SKILL.md` | Always uppercase |
|
|
33
|
-
| Rule files | `{UPPER-CASE}.md` | `BOOTSTRAP.md`, `EXECUTION-PROTOCOL.md` |
|
|
34
|
-
| Matrix files | `{lowercase}.yaml` | `backend.yaml`, `_index.yaml` |
|
|
35
|
-
| Entry points | `{TOOL}.md` | `CLAUDE.md`, `CURSOR.md` |
|
|
36
|
-
| JavaScript | `{kebab-case}.js` | `install.js` |
|
|
37
|
-
| Test files | `*.test.js` | `install.test.js` |
|
|
38
|
-
|
|
39
|
-
### 2.3 Special Naming
|
|
40
|
-
|
|
41
|
-
| File | Purpose | Notes |
|
|
42
|
-
|------|---------|-------|
|
|
43
|
-
| `_index.yaml` | Central registry | Underscore prefix for sorting |
|
|
44
|
-
| `AGENT-TEMPLATE.md` | Agent template | Uppercase with hyphen |
|
|
45
|
-
| `README.md` | Documentation | Standard GitHub convention |
|
|
46
|
-
| `LICENSE` | License file | No extension |
|
|
47
|
-
|
|
48
|
-
---
|
|
49
|
-
|
|
50
|
-
## 3. Directory Structure Standards
|
|
51
|
-
|
|
52
|
-
### 3.1 Top-Level Organization
|
|
53
|
-
|
|
54
|
-
```
|
|
55
|
-
project-root/
|
|
56
|
-
├── agents/ # Agent definitions (flat structure)
|
|
57
|
-
├── assets/ # Static assets
|
|
58
|
-
├── cli/ # CLI system
|
|
59
|
-
├── code-assistants/ # IDE-specific configs
|
|
60
|
-
├── commands/ # Command workflows (nested by command)
|
|
61
|
-
├── documents/ # Generated documentation
|
|
62
|
-
├── matrix-skills/ # Skill matrix YAML files
|
|
63
|
-
├── rules/ # Orchestration rules (flat structure)
|
|
64
|
-
├── skills/ # Skill definitions (nested by skill)
|
|
65
|
-
└── [entry points] # CLAUDE.md, CURSOR.md, etc.
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
### 3.2 Skill Folder Structure
|
|
69
|
-
|
|
70
|
-
```
|
|
71
|
-
skills/{skill-id}/
|
|
72
|
-
├── SKILL.md # Required: Main definition
|
|
73
|
-
├── references/ # Optional: Reference materials
|
|
74
|
-
│ └── *.md
|
|
75
|
-
├── scripts/ # Optional: Executable scripts
|
|
76
|
-
│ └── *.py, *.js
|
|
77
|
-
└── assets/ # Optional: Templates, assets
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
### 3.3 Command Folder Structure
|
|
81
|
-
|
|
82
|
-
```
|
|
83
|
-
commands/
|
|
84
|
-
├── {command}.md # Router file
|
|
85
|
-
└── {command}/ # Variant folder
|
|
86
|
-
├── fast.md # Quick execution variant
|
|
87
|
-
└── hard.md # Full workflow variant
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
---
|
|
91
|
-
|
|
92
|
-
## 4. Markdown Standards
|
|
93
|
-
|
|
94
|
-
### 4.1 Document Structure
|
|
95
|
-
|
|
96
|
-
All Markdown documents should follow this structure:
|
|
97
|
-
|
|
98
|
-
```markdown
|
|
99
|
-
# Title
|
|
100
|
-
|
|
101
|
-
> **Purpose**: One-line description of document purpose.
|
|
102
|
-
|
|
103
|
-
---
|
|
104
|
-
|
|
105
|
-
## 1. First Section
|
|
106
|
-
|
|
107
|
-
Content...
|
|
108
|
-
|
|
109
|
-
### 1.1 Subsection
|
|
110
|
-
|
|
111
|
-
Content...
|
|
112
|
-
|
|
113
|
-
---
|
|
114
|
-
|
|
115
|
-
## 2. Second Section
|
|
116
|
-
|
|
117
|
-
Content...
|
|
118
|
-
|
|
119
|
-
---
|
|
120
|
-
|
|
121
|
-
## N. Related Documentation
|
|
122
|
-
|
|
123
|
-
| Document | Purpose |
|
|
124
|
-
|----------|---------|
|
|
125
|
-
| doc1.md | Description |
|
|
126
|
-
| doc2.md | Description |
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
### 4.2 Heading Hierarchy
|
|
130
|
-
|
|
131
|
-
| Level | Use Case | Format |
|
|
132
|
-
|-------|----------|--------|
|
|
133
|
-
| `#` H1 | Document title | Only one per document |
|
|
134
|
-
| `##` H2 | Main sections | Numbered (1, 2, 3, ...) |
|
|
135
|
-
| `###` H3 | Subsections | Numbered (1.1, 1.2, ...) |
|
|
136
|
-
| `####` H4 | Sub-subsections | Rarely used |
|
|
137
|
-
|
|
138
|
-
### 4.3 Tables
|
|
139
|
-
|
|
140
|
-
Use tables for structured data:
|
|
141
|
-
|
|
142
|
-
```markdown
|
|
143
|
-
| Column 1 | Column 2 | Column 3 |
|
|
144
|
-
|----------|----------|----------|
|
|
145
|
-
| data | data | data |
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
**Rules**:
|
|
149
|
-
- Header row required
|
|
150
|
-
- Alignment with `|---|:---:|---:|` (left, center, right)
|
|
151
|
-
- Keep columns consistent within sections
|
|
152
|
-
|
|
153
|
-
### 4.4 Code Blocks
|
|
154
|
-
|
|
155
|
-
````markdown
|
|
156
|
-
```language
|
|
157
|
-
code here
|
|
158
|
-
```
|
|
159
|
-
````
|
|
160
|
-
|
|
161
|
-
**Language tags**: `yaml`, `markdown`, `javascript`, `bash`, `json`, `sql`
|
|
162
|
-
|
|
163
|
-
### 4.5 Emphasis
|
|
164
|
-
|
|
165
|
-
| Style | Usage | Syntax |
|
|
166
|
-
|-------|-------|--------|
|
|
167
|
-
| **Bold** | Key terms, important notes | `**text**` |
|
|
168
|
-
| *Italic* | Definitions, foreign terms | `*text*` |
|
|
169
|
-
| `Code` | File names, commands, variables | `` `text` `` |
|
|
170
|
-
| > Quote | Callouts, important notes | `> text` |
|
|
171
|
-
|
|
172
|
-
---
|
|
173
|
-
|
|
174
|
-
## 5. YAML Standards
|
|
175
|
-
|
|
176
|
-
### 5.1 General Formatting
|
|
177
|
-
|
|
178
|
-
```yaml
|
|
179
|
-
# Comment explaining section
|
|
180
|
-
section_name:
|
|
181
|
-
key: value
|
|
182
|
-
nested:
|
|
183
|
-
- item1
|
|
184
|
-
- item2
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
**Rules**:
|
|
188
|
-
- 2-space indentation
|
|
189
|
-
- Lowercase keys with underscores
|
|
190
|
-
- Comments above sections
|
|
191
|
-
- Lists with `- ` prefix
|
|
192
|
-
|
|
193
|
-
### 5.2 Skill Entry Schema
|
|
194
|
-
|
|
195
|
-
```yaml
|
|
196
|
-
- skill_id: kebab-case-id
|
|
197
|
-
category: core|expert|specialized|utility
|
|
198
|
-
priority_score: 1-10
|
|
199
|
-
relevance_mapping:
|
|
200
|
-
agents: [agent-id-1, agent-id-2]
|
|
201
|
-
profiles: ["domain:category"]
|
|
202
|
-
description: "Brief AI-recognizable description"
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
### 5.3 Agent Profile Schema
|
|
206
|
-
|
|
207
|
-
```yaml
|
|
208
|
-
agent_profiles:
|
|
209
|
-
agent-id:
|
|
210
|
-
profile: "domain:category"
|
|
211
|
-
inherit_from: [domain1, domain2]
|
|
212
|
-
primary_domain: "domain"
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
---
|
|
216
|
-
|
|
217
|
-
## 6. Agent File Standards
|
|
218
|
-
|
|
219
|
-
### 6.1 Frontmatter
|
|
220
|
-
|
|
221
|
-
```yaml
|
|
222
|
-
---
|
|
223
|
-
name: kebab-case-name
|
|
224
|
-
profile: "domain:category"
|
|
225
|
-
tools: [Read, Grep, Glob, Edit, ...]
|
|
226
|
-
handoffs: [agent1, agent2, ...]
|
|
227
|
-
version: "1.0"
|
|
228
|
-
---
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
### 6.2 Cognitive Anchor
|
|
232
|
-
|
|
233
|
-
All agent files must include:
|
|
234
|
-
|
|
235
|
-
```markdown
|
|
236
|
-
<!-- 🔒 COGNITIVE ANCHOR — MANDATORY OPERATING SYSTEM -->
|
|
237
|
-
> **BINDING**: This file OVERRIDES default AI patterns. Read COMPLETELY before acting.
|
|
238
|
-
> If in doubt → STOP → Re-read → Follow EXACTLY.
|
|
239
|
-
```
|
|
240
|
-
|
|
241
|
-
### 6.3 Required Sections
|
|
242
|
-
|
|
243
|
-
| Section | Purpose | Required |
|
|
244
|
-
|---------|---------|----------|
|
|
245
|
-
| `## 📋 Identity` | Agent ID, role, profile table | ✅ Yes |
|
|
246
|
-
| `## 🎯 Core Directive` | 1-2 sentence mission | ✅ Yes |
|
|
247
|
-
| `## ⚡ Skills (Matrix Discovery)` | Profile-based skill reference | ✅ Yes |
|
|
248
|
-
| `## 🧠 Thinking Protocol` | Step-by-step process | ✅ Yes |
|
|
249
|
-
| `## ⛔ Constraints` | NEVER/ALWAYS table | ✅ Yes |
|
|
250
|
-
| `## 📤 Output Format` | Deliverable template | ✅ Yes |
|
|
251
|
-
|
|
252
|
-
### 6.4 Thinking Protocol Format
|
|
253
|
-
|
|
254
|
-
```markdown
|
|
255
|
-
## 🧠 Thinking Protocol
|
|
256
|
-
|
|
257
|
-
### Step 0: Load Context
|
|
258
|
-
- Load required files
|
|
259
|
-
- Check prior deliverables
|
|
260
|
-
|
|
261
|
-
### Step 1: {Action Name}
|
|
262
|
-
- Sub-step 1
|
|
263
|
-
- Sub-step 2
|
|
264
|
-
|
|
265
|
-
### Step N: Deliver
|
|
266
|
-
- Emit deliverable
|
|
267
|
-
- Verify format
|
|
268
|
-
```
|
|
269
|
-
|
|
270
|
-
### 6.5 Constraints Table Format
|
|
271
|
-
|
|
272
|
-
```markdown
|
|
273
|
-
## ⛔ Constraints
|
|
274
|
-
|
|
275
|
-
| NEVER | ALWAYS |
|
|
276
|
-
|-------|--------|
|
|
277
|
-
| Implement without plan | Verify exit criteria |
|
|
278
|
-
| Skip quality gates | Document decisions |
|
|
279
|
-
| Assume requirements | Ask for clarification |
|
|
280
|
-
```
|
|
281
|
-
|
|
282
|
-
---
|
|
283
|
-
|
|
284
|
-
## 7. Command File Standards
|
|
285
|
-
|
|
286
|
-
### 7.1 Frontmatter
|
|
287
|
-
|
|
288
|
-
```yaml
|
|
289
|
-
---
|
|
290
|
-
description: Brief description of command
|
|
291
|
-
version: "1.0"
|
|
292
|
-
category: development|quality|planning|documentation|deployment|utility
|
|
293
|
-
execution-mode: execute|router
|
|
294
|
-
---
|
|
295
|
-
```
|
|
296
|
-
|
|
297
|
-
### 7.2 Phase Structure
|
|
298
|
-
|
|
299
|
-
```markdown
|
|
300
|
-
## 🎭 Phase {N}: {PHASE_NAME}
|
|
301
|
-
|
|
302
|
-
| Attribute | Value |
|
|
303
|
-
|-----------|-------|
|
|
304
|
-
| **Agent** | `agent-name` |
|
|
305
|
-
| **Goal** | Phase objective |
|
|
306
|
-
|
|
307
|
-
### ⚡ TIERED EXECUTION
|
|
308
|
-
|
|
309
|
-
**TIER 1 (MANDATORY when tool exists):**
|
|
310
|
-
> Invoke runSubagent for `agent`. Context: ISOLATED.
|
|
311
|
-
|
|
312
|
-
**TIER 2 (FALLBACK on system error only):**
|
|
313
|
-
> Load `{AGENTS_PATH}/agent.md`
|
|
314
|
-
> EMBODY [agent] — Requires logged system error justification.
|
|
315
|
-
|
|
316
|
-
**Actions**:
|
|
317
|
-
1. Action 1
|
|
318
|
-
2. Action 2
|
|
319
|
-
|
|
320
|
-
**Exit Criteria:**
|
|
321
|
-
- [ ] Criterion 1
|
|
322
|
-
- [ ] Criterion 2
|
|
323
|
-
```
|
|
324
|
-
|
|
325
|
-
---
|
|
326
|
-
|
|
327
|
-
## 8. Commit Message Format
|
|
328
|
-
|
|
329
|
-
### 8.1 Conventional Commits
|
|
330
|
-
|
|
331
|
-
Follow [Conventional Commits](https://www.conventionalcommits.org/) specification:
|
|
332
|
-
|
|
333
|
-
```
|
|
334
|
-
<type>[optional scope]: <description>
|
|
335
|
-
|
|
336
|
-
[optional body]
|
|
337
|
-
|
|
338
|
-
[optional footer(s)]
|
|
339
|
-
```
|
|
340
|
-
|
|
341
|
-
### 8.2 Commit Types
|
|
342
|
-
|
|
343
|
-
| Type | Description | Example |
|
|
344
|
-
|------|-------------|---------|
|
|
345
|
-
| `feat` | New feature | `feat: add OAuth authentication` |
|
|
346
|
-
| `fix` | Bug fix | `fix: resolve null pointer in parser` |
|
|
347
|
-
| `docs` | Documentation | `docs: update installation guide` |
|
|
348
|
-
| `style` | Code style (no logic change) | `style: fix indentation` |
|
|
349
|
-
| `refactor` | Code refactoring | `refactor: simplify validation logic` |
|
|
350
|
-
| `test` | Adding/updating tests | `test: add unit tests for CLI` |
|
|
351
|
-
| `chore` | Maintenance tasks | `chore: update dependencies` |
|
|
352
|
-
| `ci` | CI/CD changes | `ci: add GitHub Actions workflow` |
|
|
353
|
-
|
|
354
|
-
### 8.3 Scope Examples
|
|
355
|
-
|
|
356
|
-
| Scope | Description |
|
|
357
|
-
|-------|-------------|
|
|
358
|
-
| `cli` | CLI installer |
|
|
359
|
-
| `agents` | Agent definitions |
|
|
360
|
-
| `commands` | Command workflows |
|
|
361
|
-
| `rules` | Orchestration rules |
|
|
362
|
-
| `skills` | Skill definitions |
|
|
363
|
-
| `matrix` | Matrix skill discovery |
|
|
364
|
-
| `docs` | Documentation |
|
|
365
|
-
|
|
366
|
-
### 8.4 Examples
|
|
367
|
-
|
|
368
|
-
```bash
|
|
369
|
-
# Feature
|
|
370
|
-
feat(agents): add game-engineer specialist agent
|
|
371
|
-
|
|
372
|
-
# Bug fix
|
|
373
|
-
fix(cli): handle missing directory during installation
|
|
374
|
-
|
|
375
|
-
# Documentation
|
|
376
|
-
docs: add knowledge-standards documentation
|
|
377
|
-
|
|
378
|
-
# Breaking change
|
|
379
|
-
feat(matrix)!: redesign skill resolution algorithm
|
|
380
|
-
|
|
381
|
-
BREAKING CHANGE: skill_list replaced with profile-based resolution
|
|
382
|
-
```
|
|
383
|
-
|
|
384
|
-
---
|
|
385
|
-
|
|
386
|
-
## 9. Code Comment Standards
|
|
387
|
-
|
|
388
|
-
### 9.1 General Rules
|
|
389
|
-
|
|
390
|
-
| Rule | Description |
|
|
391
|
-
|------|-------------|
|
|
392
|
-
| Language | Always English |
|
|
393
|
-
| Purpose | Explain WHY, not WHAT |
|
|
394
|
-
| Currency | Keep comments updated |
|
|
395
|
-
| Brevity | Be concise |
|
|
396
|
-
|
|
397
|
-
### 9.2 JavaScript Comments
|
|
398
|
-
|
|
399
|
-
```javascript
|
|
400
|
-
// Single-line comment for brief explanations
|
|
401
|
-
|
|
402
|
-
/**
|
|
403
|
-
* Multi-line comment for function documentation
|
|
404
|
-
* @param {string} tool - Tool name to install
|
|
405
|
-
* @returns {Promise<void>}
|
|
406
|
-
*/
|
|
407
|
-
async function installTool(tool) { ... }
|
|
408
|
-
|
|
409
|
-
// TODO: description of pending work
|
|
410
|
-
// FIXME: description of bug to fix
|
|
411
|
-
// NOTE: important contextual information
|
|
412
|
-
```
|
|
413
|
-
|
|
414
|
-
### 9.3 YAML Comments
|
|
415
|
-
|
|
416
|
-
```yaml
|
|
417
|
-
# Section comment explaining purpose
|
|
418
|
-
section:
|
|
419
|
-
key: value # Inline comment if needed
|
|
420
|
-
```
|
|
421
|
-
|
|
422
|
-
### 9.4 Markdown Comments
|
|
423
|
-
|
|
424
|
-
```markdown
|
|
425
|
-
<!-- HTML comment for hidden notes -->
|
|
426
|
-
<!-- TODO: Add more examples -->
|
|
427
|
-
```
|
|
428
|
-
|
|
429
|
-
---
|
|
430
|
-
|
|
431
|
-
## 10. Documentation Standards
|
|
432
|
-
|
|
433
|
-
### 10.1 README Requirements
|
|
434
|
-
|
|
435
|
-
Every project/module README should include:
|
|
436
|
-
|
|
437
|
-
| Section | Required | Description |
|
|
438
|
-
|---------|----------|-------------|
|
|
439
|
-
| Title & badges | ✅ | Project name, version, license |
|
|
440
|
-
| Description | ✅ | What the project does |
|
|
441
|
-
| Installation | ✅ | How to install |
|
|
442
|
-
| Usage | ✅ | Basic usage examples |
|
|
443
|
-
| Commands | ⚠️ | If applicable |
|
|
444
|
-
| Configuration | ⚠️ | If configurable |
|
|
445
|
-
| Contributing | ✅ | How to contribute |
|
|
446
|
-
| License | ✅ | License information |
|
|
447
|
-
|
|
448
|
-
### 10.2 Knowledge Document Standards
|
|
449
|
-
|
|
450
|
-
Core knowledge documents follow this pattern:
|
|
451
|
-
|
|
452
|
-
| Document | Content |
|
|
453
|
-
|----------|---------|
|
|
454
|
-
| `knowledge-overview.md` | Purpose, goals, tech stack, getting started |
|
|
455
|
-
| `knowledge-architecture.md` | System design, components, data flow |
|
|
456
|
-
| `knowledge-domain.md` | Data models, API contracts, entities |
|
|
457
|
-
| `knowledge-source-base.md` | Directory structure, file purposes |
|
|
458
|
-
| `knowledge-standards.md` | Code style, naming, conventions |
|
|
459
|
-
|
|
460
|
-
### 10.3 Generated Documentation
|
|
461
|
-
|
|
462
|
-
| Category | Location | Files |
|
|
463
|
-
|----------|----------|-------|
|
|
464
|
-
| Core docs | `./documents/` | `knowledge-*.md` |
|
|
465
|
-
| Business docs | `./documents/business/` | `business-*.md` |
|
|
466
|
-
| Audit docs | `./documents/audit/` | `audit-*.md` |
|
|
467
|
-
|
|
468
|
-
**Rule**: All files in `./documents/` must be written in **English only**.
|
|
469
|
-
|
|
470
|
-
---
|
|
471
|
-
|
|
472
|
-
## 11. Version Numbering
|
|
473
|
-
|
|
474
|
-
### 11.1 Semantic Versioning
|
|
475
|
-
|
|
476
|
-
Follow [Semantic Versioning](https://semver.org/) (SemVer):
|
|
477
|
-
|
|
478
|
-
```
|
|
479
|
-
MAJOR.MINOR.PATCH
|
|
480
|
-
|
|
481
|
-
1.0.0 → 1.0.1 (patch: bug fix)
|
|
482
|
-
1.0.0 → 1.1.0 (minor: new feature)
|
|
483
|
-
1.0.0 → 2.0.0 (major: breaking change)
|
|
484
|
-
```
|
|
485
|
-
|
|
486
|
-
### 11.2 Version Locations
|
|
487
|
-
|
|
488
|
-
| File | Version Field |
|
|
489
|
-
|------|---------------|
|
|
490
|
-
| `package.json` | `version` |
|
|
491
|
-
| Agent files | `version` in frontmatter |
|
|
492
|
-
| Command files | `version` in frontmatter |
|
|
493
|
-
| Matrix index | `version` field |
|
|
494
|
-
|
|
495
|
-
---
|
|
496
|
-
|
|
497
|
-
## 12. Error Message Standards
|
|
498
|
-
|
|
499
|
-
### 12.1 Format
|
|
500
|
-
|
|
501
|
-
```
|
|
502
|
-
[LEVEL] [CONTEXT]: Message
|
|
503
|
-
|
|
504
|
-
Examples:
|
|
505
|
-
[ERROR] CLI: Tool 'invalid' not found
|
|
506
|
-
[WARN] Matrix: Skill 'legacy-skill' deprecated
|
|
507
|
-
[INFO] Install: Cursor installed successfully
|
|
508
|
-
```
|
|
509
|
-
|
|
510
|
-
### 12.2 Error Levels
|
|
511
|
-
|
|
512
|
-
| Level | Use Case |
|
|
513
|
-
|-------|----------|
|
|
514
|
-
| `ERROR` | Operation failed, cannot continue |
|
|
515
|
-
| `WARN` | Non-critical issue, can continue |
|
|
516
|
-
| `INFO` | Status update, success message |
|
|
517
|
-
| `DEBUG` | Detailed debugging information |
|
|
518
|
-
|
|
519
|
-
---
|
|
520
|
-
|
|
521
|
-
## 13. Testing Standards
|
|
522
|
-
|
|
523
|
-
### 13.1 Test File Naming
|
|
524
|
-
|
|
525
|
-
```
|
|
526
|
-
{module}.test.js # Unit tests
|
|
527
|
-
{module}.spec.js # Integration tests
|
|
528
|
-
```
|
|
529
|
-
|
|
530
|
-
### 13.2 Test Structure
|
|
531
|
-
|
|
532
|
-
```javascript
|
|
533
|
-
describe('Module Name', () => {
|
|
534
|
-
describe('Function Name', () => {
|
|
535
|
-
it('should do something specific', () => {
|
|
536
|
-
// Arrange
|
|
537
|
-
// Act
|
|
538
|
-
// Assert
|
|
539
|
-
});
|
|
540
|
-
});
|
|
541
|
-
});
|
|
542
|
-
```
|
|
543
|
-
|
|
544
|
-
### 13.3 Test Coverage Goals
|
|
545
|
-
|
|
546
|
-
| Type | Coverage |
|
|
547
|
-
|------|----------|
|
|
548
|
-
| CLI functions | 80%+ |
|
|
549
|
-
| Utility functions | 90%+ |
|
|
550
|
-
| Integration | Key paths |
|
|
551
|
-
|
|
552
|
-
---
|
|
553
|
-
|
|
554
|
-
## 14. Security Standards
|
|
555
|
-
|
|
556
|
-
### 14.1 Sensitive Data
|
|
557
|
-
|
|
558
|
-
| Rule | Description |
|
|
559
|
-
|------|-------------|
|
|
560
|
-
| No credentials | Never commit passwords, API keys |
|
|
561
|
-
| No secrets | Use environment variables |
|
|
562
|
-
| .gitignore | Exclude `.env`, credentials files |
|
|
563
|
-
|
|
564
|
-
### 14.2 Safe Patterns
|
|
565
|
-
|
|
566
|
-
```javascript
|
|
567
|
-
// Good: Read from environment
|
|
568
|
-
const apiKey = process.env.API_KEY;
|
|
569
|
-
|
|
570
|
-
// Bad: Hardcoded secret
|
|
571
|
-
const apiKey = 'sk-1234567890abcdef';
|
|
572
|
-
```
|
|
573
|
-
|
|
574
|
-
---
|
|
575
|
-
|
|
576
|
-
## 15. Accessibility Standards
|
|
577
|
-
|
|
578
|
-
### 15.1 Documentation
|
|
579
|
-
|
|
580
|
-
| Standard | Description |
|
|
581
|
-
|----------|-------------|
|
|
582
|
-
| Plain language | Use simple, clear language |
|
|
583
|
-
| Structure | Use headings and lists |
|
|
584
|
-
| Links | Descriptive link text |
|
|
585
|
-
| Images | Alt text for all images |
|
|
586
|
-
|
|
587
|
-
### 15.2 CLI Output
|
|
588
|
-
|
|
589
|
-
| Standard | Description |
|
|
590
|
-
|----------|-------------|
|
|
591
|
-
| Clear messages | Unambiguous status messages |
|
|
592
|
-
| Exit codes | Meaningful exit codes |
|
|
593
|
-
| Help text | Comprehensive --help output |
|
|
594
|
-
|
|
595
|
-
---
|
|
596
|
-
|
|
597
|
-
## 16. Workflow Principles
|
|
598
|
-
|
|
599
|
-
### 16.1 YAGNI
|
|
600
|
-
|
|
601
|
-
**You Aren't Gonna Need It**
|
|
602
|
-
- Don't implement features until needed
|
|
603
|
-
- Avoid speculative abstractions
|
|
604
|
-
|
|
605
|
-
### 16.2 KISS
|
|
606
|
-
|
|
607
|
-
**Keep It Simple, Stupid**
|
|
608
|
-
- Prefer simple solutions
|
|
609
|
-
- Avoid over-engineering
|
|
610
|
-
|
|
611
|
-
### 16.3 DRY
|
|
612
|
-
|
|
613
|
-
**Don't Repeat Yourself**
|
|
614
|
-
- Extract common patterns
|
|
615
|
-
- Use Matrix Skill Discovery for shared skills
|
|
616
|
-
|
|
617
|
-
---
|
|
618
|
-
|
|
619
|
-
## 17. Related Documentation
|
|
620
|
-
|
|
621
|
-
| Document | Purpose |
|
|
622
|
-
|----------|---------|
|
|
623
|
-
| `knowledge-overview.md` | Project introduction, goals, tech stack |
|
|
624
|
-
| `knowledge-architecture.md` | System design, components, data flow |
|
|
625
|
-
| `knowledge-domain.md` | Data models, API contracts, entities |
|
|
626
|
-
| `knowledge-source-base.md` | Directory structure, file purposes |
|
|
627
|
-
| `AGENT-TEMPLATE.md` | Agent file template |
|
|
628
|
-
| `CONTRIBUTING.md` | Contribution guidelines |
|
|
629
|
-
|
|
630
|
-
---
|
|
631
|
-
|
|
632
|
-
**Agent Assistant Standards** — _Consistent, Maintainable, Professional_
|