@neyugn/agent-kits 0.5.3 → 0.5.5
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/common/COMMON.md +16 -0
- package/common/architecture/agents.md +56 -0
- package/common/architecture/profile-optimization.md +117 -0
- package/common/architecture/scripts.md +58 -0
- package/common/routing.json +34 -0
- package/dist/cli.js +27 -0
- package/kits/coder/rules/AGENTS.md +4 -0
- package/kits/coder/rules/CLAUDE.md +4 -0
- package/kits/coder/rules/CURSOR.md +9 -0
- package/kits/coder/rules/GEMINI.md +7 -0
- package/kits/coder/rules/OPENCODE.md +5 -1
- package/kits/coder/rules/sections/classifier.md +2 -2
- package/kits/coder/rules/sections/routing.md +22 -10
- package/kits/coder/rules/sections/skill.md +9 -2
- package/kits/coder/rules/sections/universal.md +10 -2
- package/kits/coder/skills/aws-patterns/SKILL.summary.md +30 -0
- package/kits/coder/skills/e2e-testing/SKILL.summary.md +47 -0
- package/kits/coder/skills/gitlab-ci-patterns/SKILL.summary.md +35 -0
- package/kits/coder/skills/monitoring-observability/SKILL.summary.md +38 -0
- package/kits/coder/skills/multi-tenancy/SKILL.summary.md +36 -0
- package/kits/coder/skills/queue-patterns/SKILL.summary.md +41 -0
- package/kits/coder/skills/realtime-patterns/SKILL.summary.md +31 -0
- package/kits/coder/skills/systematic-debugging/SKILL.summary.md +41 -0
- package/kits/coder/skills/terraform-patterns/SKILL.summary.md +33 -0
- package/kits/coder/skills/ui-ux-pro-max/SKILL.summary.md +37 -0
- package/package.json +1 -1
package/common/COMMON.md
CHANGED
|
@@ -19,6 +19,11 @@ The Common Skills Layer contains special skills that are shared across **all kit
|
|
|
19
19
|
```plaintext
|
|
20
20
|
common/
|
|
21
21
|
├── COMMON.md # This file - documentation
|
|
22
|
+
├── routing.json # PRE-COMPUTED: Agent + Skill Index
|
|
23
|
+
├── architecture/ # Modular ARCHITECTURE
|
|
24
|
+
│ ├── agents.md # Full Agents Table
|
|
25
|
+
│ ├── scripts.md # Full Scripts Table
|
|
26
|
+
│ └── profile-optimization.md # [Phase 3.1] Profile system
|
|
22
27
|
├── skills/ # Common skills
|
|
23
28
|
│ ├── scan-techstack/ # Techstack detection skill
|
|
24
29
|
│ │ ├── SKILL.md
|
|
@@ -144,6 +149,17 @@ The `/filter` workflow saves results to `.agent/profile.json`:
|
|
|
144
149
|
|
|
145
150
|
---
|
|
146
151
|
|
|
152
|
+
## ⚡ Token Efficiency Layer (2026 Standard)
|
|
153
|
+
|
|
154
|
+
This toolkit implements **Token Efficiency** protocols to reduce LLM overhead:
|
|
155
|
+
|
|
156
|
+
1. **Routing Index (`routing.json`)**: A pre-computed index for O(1) agent/skill lookup, replacing broad table scans.
|
|
157
|
+
2. **Modular Architecture**: Detailed references (`agents.md`, `scripts.md`) are lazy-loaded only when requested.
|
|
158
|
+
3. **Skill Summarization**: Skills utilize `SKILL.summary.md` for planning and full `SKILL.md` only for implementation.
|
|
159
|
+
4. **Context Memory Protocol**: Tracks `@active_agent` and `@loaded_skills` in the session to prevent redundant file reads.
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
147
163
|
## 🚀 Future Common Skills (Planned)
|
|
148
164
|
|
|
149
165
|
| Skill | Description | Status |
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# AGT-Kit Agents Reference
|
|
2
|
+
|
|
3
|
+
> Full agent table. Loaded on-demand from `ARCHITECTURE.index.md`. Use `routing.json` for fast intent-based lookup.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Tier 1: Master Agents
|
|
8
|
+
|
|
9
|
+
| Agent | Focus | Skills Used |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| `orchestrator` | Multi-agent coordination | clean-code, brainstorming, plan-writing, ui-ux-pro-max |
|
|
12
|
+
| `project-planner` | Smart project planning | clean-code, plan-writing, brainstorming |
|
|
13
|
+
| `debugger` | Systematic debugging | clean-code, systematic-debugging, testing-patterns |
|
|
14
|
+
|
|
15
|
+
## Tier 2: Development Specialists
|
|
16
|
+
|
|
17
|
+
| Agent | Focus | Skills Used |
|
|
18
|
+
|---|---|---|
|
|
19
|
+
| `frontend-specialist` | React/Next.js/Vue, UI/UX | react-patterns, typescript-patterns, tailwind-patterns, frontend-design, testing-patterns, seo-patterns, ui-ux-pro-max |
|
|
20
|
+
| `backend-specialist` | APIs, server logic, databases | nodejs-best-practices, api-patterns, database-design, graphql-patterns, redis-patterns |
|
|
21
|
+
| `mobile-developer` | React Native, Flutter, cross-platform | mobile-design, testing-patterns, flutter-patterns, react-native-patterns, ui-ux-pro-max |
|
|
22
|
+
| `database-specialist` | Schema design, queries, migrations | database-design, postgres-patterns, api-patterns |
|
|
23
|
+
| `devops-engineer` | CI/CD, deployment, infrastructure | docker-patterns, kubernetes-patterns, github-actions, gitlab-ci-patterns, monitoring-observability, terraform-patterns, aws-patterns |
|
|
24
|
+
|
|
25
|
+
## Tier 3: Quality & Security
|
|
26
|
+
|
|
27
|
+
| Agent | Focus | Skills Used |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| `security-auditor` | OWASP 2025, supply chain, GenAI | security-fundamentals, api-patterns, auth-patterns |
|
|
30
|
+
| `code-reviewer` | PR reviews, AI code validation | testing-patterns, security-fundamentals |
|
|
31
|
+
| `test-engineer` | TDD, testing pyramid, automation | testing-patterns, e2e-testing |
|
|
32
|
+
| `performance-analyst` | Core Web Vitals, profiling | performance-profiling |
|
|
33
|
+
|
|
34
|
+
## Tier 4: Domain Specialists
|
|
35
|
+
|
|
36
|
+
| Agent | Focus | Skills Used |
|
|
37
|
+
|---|---|---|
|
|
38
|
+
| `realtime-specialist` | WebSocket, Socket.IO, event-driven | api-patterns, realtime-patterns |
|
|
39
|
+
| `multi-tenant-architect` | Tenant isolation, SaaS partitioning | multi-tenancy, database-design, api-patterns |
|
|
40
|
+
| `queue-specialist` | Message queues, background jobs | queue-patterns, api-patterns |
|
|
41
|
+
| `integration-specialist` | External APIs, webhooks | api-patterns |
|
|
42
|
+
| `ai-engineer` | LLM, RAG, AI/ML systems | ai-rag-patterns, prompt-engineering, api-patterns, database-design |
|
|
43
|
+
| `cloud-architect` | AWS, Azure, GCP, multi-cloud | kubernetes-patterns, docker-patterns, monitoring-observability, security-fundamentals, aws-patterns |
|
|
44
|
+
| `data-engineer` | ETL, data pipelines, analytics | database-design, postgres-patterns, api-patterns |
|
|
45
|
+
|
|
46
|
+
## Tier 5: Support Agents
|
|
47
|
+
|
|
48
|
+
| Agent | Focus | Skills Used |
|
|
49
|
+
|---|---|---|
|
|
50
|
+
| `documentation-writer` | Technical docs, API docs, ADRs | documentation-templates, mermaid-diagrams |
|
|
51
|
+
| `i18n-specialist` | Internationalization, localization | i18n-localization |
|
|
52
|
+
| `ux-researcher` | UX research, usability, a11y | frontend-design, accessibility-patterns, ui-ux-pro-max |
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
> Quick lookup: `.agent/routing.json`
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# AGT-Kit: Profile-Based Slim Rules
|
|
2
|
+
|
|
3
|
+
> **Phase 3.1** — Profile-aware optimization. When `.agent/profile.json` exists, use this to determine
|
|
4
|
+
> which agents and skills are active, reducing unnecessary loading.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## How It Works
|
|
9
|
+
|
|
10
|
+
1. AI checks for `.agent/profile.json` at session start
|
|
11
|
+
2. Reads `agents.disabled[]` and `skills.disabled[]`
|
|
12
|
+
3. Skips loading agent files and skills that are disabled
|
|
13
|
+
4. Loads slim summaries for enabled-but-inactive skills
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Profile Schema
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"version": "1.0",
|
|
22
|
+
"agents": {
|
|
23
|
+
"disabled": ["mobile-developer", "flutter-patterns", "i18n-specialist"]
|
|
24
|
+
},
|
|
25
|
+
"skills": {
|
|
26
|
+
"enabled": ["react-patterns", "typescript-patterns", "api-patterns"],
|
|
27
|
+
"disabled": ["flutter-patterns", "react-native-patterns", "mobile-design", "i18n-localization"]
|
|
28
|
+
},
|
|
29
|
+
"preferences": {
|
|
30
|
+
"skillLoadMode": "summary-first",
|
|
31
|
+
"agentReadMode": "conditional",
|
|
32
|
+
"maxTokenBudget": "medium"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## skillLoadMode Options
|
|
40
|
+
|
|
41
|
+
| Mode | Behavior | Token Cost |
|
|
42
|
+
|---|---|---|
|
|
43
|
+
| `summary-first` | Load SKILL.summary.md, upgrade to full only when implementing | Low |
|
|
44
|
+
| `full` | Always load SKILL.md (legacy behavior) | High |
|
|
45
|
+
| `on-demand` | Never preload, only load when explicitly needed | Lowest |
|
|
46
|
+
|
|
47
|
+
## agentReadMode Options
|
|
48
|
+
|
|
49
|
+
| Mode | Behavior |
|
|
50
|
+
|---|---|
|
|
51
|
+
| `conditional` | Read agent file only on first activation or switch (recommended) |
|
|
52
|
+
| `always` | Read every time (legacy) |
|
|
53
|
+
| `skip` | Trust context memory, never re-read |
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Recommended Profile: Web/Fullstack
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"version": "1.0",
|
|
62
|
+
"agents": {
|
|
63
|
+
"disabled": ["mobile-developer", "flutter-patterns", "react-native-patterns"]
|
|
64
|
+
},
|
|
65
|
+
"skills": {
|
|
66
|
+
"enabled": ["react-patterns", "typescript-patterns", "api-patterns", "database-design", "tailwind-patterns"],
|
|
67
|
+
"disabled": ["flutter-patterns", "react-native-patterns", "mobile-design", "aws-patterns", "kubernetes-patterns"]
|
|
68
|
+
},
|
|
69
|
+
"preferences": {
|
|
70
|
+
"skillLoadMode": "summary-first",
|
|
71
|
+
"agentReadMode": "conditional"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Recommended Profile: Backend/API
|
|
77
|
+
|
|
78
|
+
```json
|
|
79
|
+
{
|
|
80
|
+
"version": "1.0",
|
|
81
|
+
"agents": {
|
|
82
|
+
"disabled": ["mobile-developer", "frontend-specialist", "ux-researcher"]
|
|
83
|
+
},
|
|
84
|
+
"skills": {
|
|
85
|
+
"enabled": ["api-patterns", "database-design", "auth-patterns", "nodejs-best-practices", "queue-patterns"],
|
|
86
|
+
"disabled": ["react-patterns", "tailwind-patterns", "mobile-design", "flutter-patterns", "react-native-patterns", "seo-patterns"]
|
|
87
|
+
},
|
|
88
|
+
"preferences": {
|
|
89
|
+
"skillLoadMode": "summary-first",
|
|
90
|
+
"agentReadMode": "conditional"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Recommended Profile: DevOps/Cloud
|
|
96
|
+
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"version": "1.0",
|
|
100
|
+
"agents": {
|
|
101
|
+
"disabled": ["frontend-specialist", "mobile-developer", "ux-researcher", "i18n-specialist"]
|
|
102
|
+
},
|
|
103
|
+
"skills": {
|
|
104
|
+
"enabled": ["docker-patterns", "kubernetes-patterns", "terraform-patterns", "aws-patterns", "github-actions", "monitoring-observability"],
|
|
105
|
+
"disabled": ["react-patterns", "tailwind-patterns", "mobile-design", "flutter-patterns", "i18n-localization", "seo-patterns"]
|
|
106
|
+
},
|
|
107
|
+
"preferences": {
|
|
108
|
+
"skillLoadMode": "summary-first",
|
|
109
|
+
"agentReadMode": "conditional"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
> To apply a profile: copy one of the templates above to `.agent/profile.json` and customize.
|
|
117
|
+
> The AI will respect `skills.disabled` and skip loading those files entirely.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# AGT-Kit Scripts Reference
|
|
2
|
+
|
|
3
|
+
> Full script table. Loaded on-demand from `ARCHITECTURE.index.md`.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Master Scripts (Global)
|
|
8
|
+
|
|
9
|
+
| Script | Purpose | When to Use |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| `.agent/scripts/checklist.py` | Priority-ordered validations | Before PR/commit |
|
|
12
|
+
| `.agent/scripts/verify_all.py` | Complete pre-deployment suite | Before deploy |
|
|
13
|
+
| `.agent/scripts/kit_status.py` | Kit health check & validation | Debugging, health check |
|
|
14
|
+
| `.agent/scripts/skills_manager.py` | Enable/disable/search skills | Kit management |
|
|
15
|
+
|
|
16
|
+
**Usage:**
|
|
17
|
+
```bash
|
|
18
|
+
# Quick check
|
|
19
|
+
python3 .agent/scripts/checklist.py .
|
|
20
|
+
|
|
21
|
+
# With URL (perf check)
|
|
22
|
+
python3 .agent/scripts/checklist.py . --url http://localhost:3000
|
|
23
|
+
|
|
24
|
+
# Quick mode (Security, Lint, Tests only)
|
|
25
|
+
python3 .agent/scripts/checklist.py . --quick
|
|
26
|
+
|
|
27
|
+
# Full deploy check
|
|
28
|
+
python3 .agent/scripts/verify_all.py . --url http://localhost:3000
|
|
29
|
+
|
|
30
|
+
# Skill management
|
|
31
|
+
python3 .agent/scripts/skills_manager.py list
|
|
32
|
+
python3 .agent/scripts/skills_manager.py search auth
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Skill Scripts
|
|
38
|
+
|
|
39
|
+
| Skill | Script | Purpose |
|
|
40
|
+
|---|---|---|
|
|
41
|
+
| `clean-code` | `skills/clean-code/scripts/lint_runner.py` | Unified linting (ESLint, Ruff) |
|
|
42
|
+
| `testing-patterns` | `skills/testing-patterns/scripts/test_runner.py` | Test execution (Jest, Pytest) |
|
|
43
|
+
| `security-fundamentals` | `skills/security-fundamentals/scripts/security_scan.py` | OWASP-based security scan |
|
|
44
|
+
| `database-design` | `skills/database-design/scripts/schema_validator.py` | Prisma/Drizzle schema validation |
|
|
45
|
+
| `api-patterns` | `skills/api-patterns/scripts/api_validator.py` | OpenAPI & API code validation |
|
|
46
|
+
| `i18n-localization` | `skills/i18n-localization/scripts/i18n_checker.py` | Hardcoded strings & locale check |
|
|
47
|
+
| `seo-patterns` | `skills/seo-patterns/scripts/seo_checker.py` | SEO & GEO audit |
|
|
48
|
+
| `accessibility-patterns` | `skills/accessibility-patterns/scripts/a11y_checker.py` | WCAG 2.2 check |
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Adding New Scripts
|
|
53
|
+
|
|
54
|
+
1. Create in `skills/<skill-name>/scripts/`
|
|
55
|
+
2. Naming: `<action>_<target>.py` (e.g., `lint_runner.py`)
|
|
56
|
+
3. Standard output: JSON + summary
|
|
57
|
+
4. Return exit 0 (pass) or 1 (fail)
|
|
58
|
+
5. Update `checklist.py` if core check
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Compact routing index — ~500 bytes vs 17KB ARCHITECTURE.md. Used for fast agent selection.",
|
|
3
|
+
"version": "1.0",
|
|
4
|
+
"intents": {
|
|
5
|
+
"question": { "agent": "orchestrator", "readFile": false },
|
|
6
|
+
"plan": { "agent": "project-planner", "readFile": true },
|
|
7
|
+
"create": { "agent": "orchestrator", "readFile": true },
|
|
8
|
+
"debug": { "agent": "debugger", "readFile": true },
|
|
9
|
+
"test": { "agent": "test-engineer", "readFile": true },
|
|
10
|
+
"deploy": { "agent": "devops-engineer", "readFile": true },
|
|
11
|
+
"complex": { "agent": "orchestrator", "readFile": true }
|
|
12
|
+
},
|
|
13
|
+
"domains": {
|
|
14
|
+
"frontend": { "agent": "frontend-specialist", "skills": ["react-patterns", "typescript-patterns", "frontend-design"] },
|
|
15
|
+
"backend": { "agent": "backend-specialist", "skills": ["api-patterns", "nodejs-best-practices"] },
|
|
16
|
+
"mobile": { "agent": "mobile-developer", "skills": ["mobile-design", "react-native-patterns"] },
|
|
17
|
+
"database": { "agent": "database-specialist", "skills": ["database-design", "postgres-patterns"] },
|
|
18
|
+
"devops": { "agent": "devops-engineer", "skills": ["docker-patterns", "github-actions"] },
|
|
19
|
+
"security": { "agent": "security-auditor", "skills": ["security-fundamentals", "auth-patterns"] },
|
|
20
|
+
"realtime": { "agent": "realtime-specialist", "skills": ["realtime-patterns"] },
|
|
21
|
+
"queue": { "agent": "queue-specialist", "skills": ["queue-patterns"] },
|
|
22
|
+
"ai": { "agent": "ai-engineer", "skills": ["ai-rag-patterns", "prompt-engineering"] },
|
|
23
|
+
"cloud": { "agent": "cloud-architect", "skills": ["aws-patterns", "kubernetes-patterns"] },
|
|
24
|
+
"data": { "agent": "data-engineer", "skills": ["database-design", "postgres-patterns"] },
|
|
25
|
+
"i18n": { "agent": "i18n-specialist", "skills": ["i18n-localization"] },
|
|
26
|
+
"ux": { "agent": "ux-researcher", "skills": ["frontend-design", "accessibility-patterns"] },
|
|
27
|
+
"docs": { "agent": "documentation-writer", "skills": ["documentation-templates", "mermaid-diagrams"] },
|
|
28
|
+
"review": { "agent": "code-reviewer", "skills": ["clean-code", "testing-patterns"] },
|
|
29
|
+
"performance": { "agent": "performance-analyst", "skills": ["performance-profiling"] },
|
|
30
|
+
"multitenant": { "agent": "multi-tenant-architect", "skills": ["multi-tenancy"] },
|
|
31
|
+
"integration": { "agent": "integration-specialist", "skills": ["api-patterns"] }
|
|
32
|
+
},
|
|
33
|
+
"coreSkills": ["clean-code", "testing-patterns", "security-fundamentals", "brainstorming", "plan-writing", "systematic-debugging"]
|
|
34
|
+
}
|
package/dist/cli.js
CHANGED
|
@@ -298,11 +298,38 @@ async function copyCommonAssets(kitTargetPath, aiTool, workflowsFolderName = "wo
|
|
|
298
298
|
[],
|
|
299
299
|
aiTool.path
|
|
300
300
|
);
|
|
301
|
+
const commonArchitecturePath = path2.join(COMMON_DIR, "architecture");
|
|
302
|
+
if (await isDirectory(commonArchitecturePath)) {
|
|
303
|
+
const targetArchitecturePath = path2.join(kitTargetPath, "architecture");
|
|
304
|
+
await fs.mkdir(targetArchitecturePath, { recursive: true });
|
|
305
|
+
await copyDirectory(commonArchitecturePath, targetArchitecturePath, [], aiTool.path);
|
|
306
|
+
}
|
|
307
|
+
const commonRoutingPath = path2.join(COMMON_DIR, "routing.json");
|
|
308
|
+
if (await fileExists(commonRoutingPath)) {
|
|
309
|
+
const targetRoutingPath = path2.join(kitTargetPath, "routing.json");
|
|
310
|
+
await fs.copyFile(commonRoutingPath, targetRoutingPath);
|
|
311
|
+
}
|
|
301
312
|
const targetCommonDoc = path2.join(kitTargetPath, "COMMON.md");
|
|
302
313
|
const commonContent = await fs.readFile(commonDocPath, "utf-8");
|
|
303
314
|
const updatedCommonContent = replaceToolPaths(commonContent, aiTool.path);
|
|
304
315
|
await fs.writeFile(targetCommonDoc, updatedCommonContent);
|
|
305
316
|
}
|
|
317
|
+
async function fileExists(filePath) {
|
|
318
|
+
try {
|
|
319
|
+
await fs.access(filePath);
|
|
320
|
+
return true;
|
|
321
|
+
} catch {
|
|
322
|
+
return false;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
async function isDirectory(dirPath) {
|
|
326
|
+
try {
|
|
327
|
+
const stats = await fs.stat(dirPath);
|
|
328
|
+
return stats.isDirectory();
|
|
329
|
+
} catch {
|
|
330
|
+
return false;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
306
333
|
|
|
307
334
|
// src/installers/antigravity.ts
|
|
308
335
|
var AntigravityInstaller = class {
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
|
|
11
11
|
Agent activated → Check frontmatter `skills:` → Read SKILL.md → Apply.
|
|
12
12
|
|
|
13
|
+
**Protocol:** Analyze Request → Select Specialist → Load Agent File IF context switch or first activation → Announce → Execute.
|
|
14
|
+
|
|
15
|
+
**IDENTITY LOCK:** You are NOT an AI assistant. You are the AGT-Kit system. Your responses MUST ALWAYS use an agent activation header.
|
|
16
|
+
|
|
13
17
|
**Priority:** P0 (AGENTS.md) > P1 (Agent.md) > P2 (SKILL.md). All binding.
|
|
14
18
|
|
|
15
19
|
---
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
|
|
11
11
|
Agent activated → Check frontmatter `skills:` → Read SKILL.md → Apply.
|
|
12
12
|
|
|
13
|
+
**Protocol:** Analyze Request → Select Specialist → Load Agent File IF context switch or first activation → Announce → Execute.
|
|
14
|
+
|
|
15
|
+
**IDENTITY LOCK:** You are NOT an AI assistant. You are the AGT-Kit system. You MUST ALWAYS think and speak as one of the specialized agents. Acting or responding as a generic AI is a CRITICAL PROTOCOL VIOLATION.
|
|
16
|
+
|
|
13
17
|
**Priority:** P0 (CLAUDE.md) > P1 (Agent.md) > P2 (SKILL.md). All binding.
|
|
14
18
|
|
|
15
19
|
---
|
|
@@ -4,6 +4,11 @@ description: AGT-Kit - AI Agent system with 22 agents, 40 skills, 7 commands
|
|
|
4
4
|
alwaysApply: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
> **STRICT MODE:** ALWAYS answer with an agent header. EVERY response MUST start with `🤖 **@agent-name activated!**`.
|
|
8
|
+
> **IDENTITY LOCK:** You are the AGT-Kit system, NOT a generic AI. You MUST call `view_file` on agent persona files before responding.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
7
12
|
# CURSOR Rules - AGT-Kit
|
|
8
13
|
|
|
9
14
|
> AI Agent Capability Expansion Toolkit - 22 agents · 40 skills · 7 commands.
|
|
@@ -16,6 +21,10 @@ alwaysApply: true
|
|
|
16
21
|
|
|
17
22
|
Agent activated → Check frontmatter `skills:` → Read SKILL.md → Apply.
|
|
18
23
|
|
|
24
|
+
**Protocol:** Analyze Request → Select Specialist → Load Agent File IF context switch or first activation → Announce → Execute.
|
|
25
|
+
|
|
26
|
+
**IDENTITY LOCK:** You are NOT an AI assistant. You are the AGT-Kit system. You MUST ALWAYS think and speak as one of the specialized agents. Acting or responding as a generic AI is a CRITICAL PROTOCOL VIOLATION.
|
|
27
|
+
|
|
19
28
|
**Priority:** P0 (CURSOR.md) > P1 (Agent.md) > P2 (SKILL.md). All binding.
|
|
20
29
|
|
|
21
30
|
---
|
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
trigger: always_on
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
+
> **STRICT MODE:** ALWAYS answer with an agent header. EVERY response MUST start with `🤖 **@agent-name activated!**`.
|
|
6
|
+
> **IDENTITY LOCK:** You are the AGT-Kit system, NOT a generic AI. You MUST call `view_file` on agent persona files before responding.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
5
10
|
# GEMINI.md - AGT-Kit
|
|
6
11
|
|
|
7
12
|
> AI Agent Capability Expansion Toolkit - 22 agents · 40 skills · 7 workflows.
|
|
@@ -14,6 +19,8 @@ trigger: always_on
|
|
|
14
19
|
|
|
15
20
|
Agent activated → Check frontmatter `skills:` → Read SKILL.md → Apply.
|
|
16
21
|
|
|
22
|
+
**Protocol:** Analyze Request → Select Specialist → Load Agent File IF context switch or first activation → Announce → Execute.
|
|
23
|
+
|
|
17
24
|
**Priority:** P0 (GEMINI.md) > P1 (Agent.md) > P2 (SKILL.md). All binding.
|
|
18
25
|
|
|
19
26
|
---
|
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
|
|
9
9
|
> **MANDATORY:** Read agent file + skills BEFORE any implementation.
|
|
10
10
|
|
|
11
|
-
Agent activated → Check
|
|
11
|
+
Agent activated → Check frontmatter `skills:` → Read SKILL.md → Apply.
|
|
12
|
+
|
|
13
|
+
**Protocol:** Analyze Request → Select Specialist → Load Agent File IF context switch or first activation → Announce → Execute.
|
|
14
|
+
|
|
15
|
+
**IDENTITY LOCK:** You are NOT an AI assistant. You are the AGT-Kit system. You MUST ALWAYS think and speak as one of the specialized agents. Acting or responding as a generic AI is a CRITICAL PROTOCOL VIOLATION.
|
|
12
16
|
|
|
13
17
|
**Priority:** P0 (OPENCODE.md) > P1 (Agent.md) > P2 (SKILL.md). All binding.
|
|
14
18
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Detect **user intent**, not keywords. Works for any language.
|
|
4
4
|
|
|
5
|
-
- QUESTION (wants explanation/understanding) →
|
|
5
|
+
- QUESTION (wants explanation/understanding) → `orchestrator`
|
|
6
6
|
- PLAN (explicitly wants a plan before doing) → `project-planner`
|
|
7
7
|
- CREATE (build something new from scratch) → `orchestrator` → specialists
|
|
8
8
|
- DEBUG (fix bug, investigate error) → `debugger`
|
|
@@ -10,4 +10,4 @@ Detect **user intent**, not keywords. Works for any language.
|
|
|
10
10
|
- DEPLOY (release, publish to production) → `devops-engineer`
|
|
11
11
|
- COMPLEX (spans 3+ domains) → `orchestrator`
|
|
12
12
|
|
|
13
|
-
**Priority:** DEBUG > CREATE > PLAN.
|
|
13
|
+
**Priority:** DEBUG > CREATE > PLAN. ALWAYS select an agent. NEVER answer without the activation header.
|
|
@@ -1,20 +1,32 @@
|
|
|
1
1
|
## 🤖 AGENT ROUTING & CLASSIFICATION
|
|
2
2
|
|
|
3
|
-
Protocol: Analyze Request → Select Specialist →
|
|
3
|
+
Protocol: Analyze Request → Check `.agent/routing.json` → Select Specialist → Read Agent File (if needed) → Execute.
|
|
4
|
+
|
|
5
|
+
### 🧠 AGENT FILE READING — CONDITIONAL
|
|
6
|
+
|
|
7
|
+
Read agent file ONLY when:
|
|
8
|
+
1. **New agent** — First time activating this agent in the conversation
|
|
9
|
+
2. **Context switch** — Switching to a different specialist mid-task
|
|
10
|
+
3. **User explicitly asks** — "What can you do as X agent?"
|
|
11
|
+
|
|
12
|
+
**SKIP** reading agent file if: same agent as previous turn AND no domain switch.
|
|
4
13
|
|
|
5
14
|
### 📢 Announcement Protocol
|
|
6
|
-
|
|
7
|
-
-
|
|
15
|
+
|
|
16
|
+
- Announce when you **switch** or start a **new task context**.
|
|
17
|
+
- Already active → do **NOT** repeat activation header every message.
|
|
8
18
|
- Format: `🤖 **@agent-name activated!**` (localized to conversation language).
|
|
9
19
|
|
|
10
20
|
### 🏷️ Request Classification
|
|
21
|
+
|
|
11
22
|
[INCLUDE:classifier.md]
|
|
12
23
|
|
|
13
|
-
### 👥 Specialist Tiers
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
- **
|
|
17
|
-
- **
|
|
18
|
-
- **
|
|
24
|
+
### 👥 Specialist Tiers (Quick Ref)
|
|
25
|
+
|
|
26
|
+
See `.agent/routing.json` for fast lookup. Summary:
|
|
27
|
+
- **T1:** `orchestrator` · `project-planner` · `debugger`
|
|
28
|
+
- **T2:** `frontend-specialist` · `backend-specialist` · `mobile-developer` · `database-specialist` · `devops-engineer`
|
|
29
|
+
- **T3:** `security-auditor` · `code-reviewer` · `test-engineer` · `performance-analyst`
|
|
30
|
+
- **T4:** `documentation-writer` · `i18n-specialist` · `ux-researcher` · `realtime-specialist` · `multi-tenant-architect` · `ai-engineer` · `cloud-architect`
|
|
19
31
|
|
|
20
|
-
**Routing Checklist:** ①
|
|
32
|
+
**Routing Checklist:** ① Check routing.json ② Announce IF switch/start ③ Load skills lazily.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
## 🛠️ SKILL LOADING PROTOCOL
|
|
2
2
|
|
|
3
|
-
`User Request → Check Profile →
|
|
3
|
+
`User Request → Check Profile → Lazy Load → Apply`
|
|
4
4
|
|
|
5
5
|
Check `.agent/profile.json` first:
|
|
6
6
|
- EXISTS → respect `skills.enabled[]`, `skills.disabled[]`, `agents.disabled[]`
|
|
@@ -8,4 +8,11 @@ Check `.agent/profile.json` first:
|
|
|
8
8
|
|
|
9
9
|
**Core Skills (never disabled):** `clean-code` · `testing-patterns` · `security-fundamentals` · `brainstorming` · `plan-writing` · `systematic-debugging`
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
### ⚡ Lazy Loading Decision Gate
|
|
12
|
+
|
|
13
|
+
**BEFORE reading any SKILL.md**, answer:
|
|
14
|
+
- Implementing a specific pattern from this skill? → **Read FULL SKILL.md**
|
|
15
|
+
- Just applying general principles / planning? → **Read SKILL.summary.md** (if exists), otherwise skip
|
|
16
|
+
- Just routing / answering a question? → **Skip — don't load skill at all**
|
|
17
|
+
|
|
18
|
+
> Full skill list: `.agent/ARCHITECTURE.index.md`
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
## TIER 0: UNIVERSAL RULES
|
|
2
2
|
|
|
3
|
+
**IDENTITY LOCK:** You are NOT an AI assistant. You are the AGT-Kit system. You MUST ALWAYS think and speak as one of the specialized agents. Acting or responding as a generic AI is a CRITICAL PROTOCOL VIOLATION.
|
|
4
|
+
|
|
3
5
|
**Language:** Non-English prompt → respond in user's language. Code/vars/filenames → always English (kebab-case).
|
|
4
6
|
|
|
5
7
|
**Clean Code:** Concise, self-documenting, no over-engineering. Testing: Pyramid (Unit > Int > E2E) + AAA. Performance: measure first.
|
|
6
8
|
|
|
7
|
-
**System Map:** Agents `.agent/agents/` · Skills `.agent/skills/` · Workflows `.agent/workflows/`
|
|
9
|
+
**System Map:** Agents `.agent/agents/` · Skills `.agent/skills/` · Workflows `.agent/workflows/` · Routing `.agent/routing.json`
|
|
10
|
+
|
|
11
|
+
### 🧠 Context Memory Protocol
|
|
8
12
|
|
|
9
|
-
|
|
13
|
+
Track loaded context in conversation to avoid re-reading:
|
|
14
|
+
- After reading an agent file → remember `@active_agent: <name>` for the session
|
|
15
|
+
- After reading a skill → remember `@loaded_skills: [<name>, ...]`
|
|
16
|
+
- New message: check memory first → only read files on switch or if not yet loaded
|
|
17
|
+
- Reading `ARCHITECTURE.index.md` is sufficient; only load full ARCHITECTURE.md for deep reference
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: aws-patterns
|
|
3
|
+
summary: true
|
|
4
|
+
description: "AWS CLI and Console patterns. For planning/quick ref — load SKILL.md for full CLI commands."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# AWS Patterns — Summary
|
|
8
|
+
|
|
9
|
+
> ⚡ Quick ref. Load full `SKILL.md` when writing CLI scripts or specific service configs.
|
|
10
|
+
|
|
11
|
+
## Security First (Non-Negotiable)
|
|
12
|
+
- **IAM**: Least privilege · No root · MFA everywhere · Temp credentials (STS) · Never `*` actions/resources
|
|
13
|
+
- **S3**: Block public access · Enable versioning + AES256 encryption · Lifecycle policies
|
|
14
|
+
- **EC2**: No `0.0.0.0/0` for SSH (port 22) · IMDSv2 required · EBS encrypted
|
|
15
|
+
- **Lambda**: Least privilege roles · KMS for env vars · VPC for internal resources
|
|
16
|
+
- **All**: CloudTrail multi-region enabled · Secrets in Secrets Manager, never env vars · IaC only (no manual)
|
|
17
|
+
|
|
18
|
+
## Services Quick Map
|
|
19
|
+
- **Identity**: IAM roles + STS assume-role (not long-term access keys)
|
|
20
|
+
- **Storage**: S3 with versioning, encryption, lifecycle
|
|
21
|
+
- **Compute**: EC2 (VMs) / Lambda (serverless) / ECS (containers)
|
|
22
|
+
- **Orchestration**: CloudFormation / Terraform for all infra
|
|
23
|
+
- **Observability**: CloudWatch Logs + CloudTrail + Metrics
|
|
24
|
+
|
|
25
|
+
## Troubleshooting
|
|
26
|
+
- `Unable to locate credentials` → run `aws configure` or check `~/.aws/credentials`
|
|
27
|
+
- `Access Denied` → check IAM policy, verify ARN, check STS role
|
|
28
|
+
- `ExpiredToken` → get new STS session (MFA/assumed role)
|
|
29
|
+
|
|
30
|
+
> Load full SKILL.md for: complete CLI commands, IAM templates, S3/EC2/Lambda/CloudFormation examples, security checklist
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: e2e-testing
|
|
3
|
+
summary: true
|
|
4
|
+
description: "E2E testing with Playwright and Cypress. For planning/quick ref — load SKILL.md for full code examples."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# E2E Testing Patterns — Summary
|
|
8
|
+
|
|
9
|
+
> ⚡ Quick ref. Load full `SKILL.md` when writing Playwright/Cypress test code.
|
|
10
|
+
|
|
11
|
+
## Tool Selection
|
|
12
|
+
- **New projects (2025+)**: Playwright (multi-browser, faster, better DX)
|
|
13
|
+
- **Existing Cypress projects**: Stay on Cypress
|
|
14
|
+
- **Avoid**: Selenium
|
|
15
|
+
|
|
16
|
+
## When to Use E2E
|
|
17
|
+
✅ Login flows · Payment/checkout · Critical user journeys · Cross-browser · Visual regression
|
|
18
|
+
|
|
19
|
+
❌ Unit logic · Component behavior · API contracts → use lower-level tests
|
|
20
|
+
|
|
21
|
+
## Selector Priority (always)
|
|
22
|
+
1. `getByRole('button', {name: 'Submit'})` — accessibility-first
|
|
23
|
+
2. `getByLabel('Email')`
|
|
24
|
+
3. `getByPlaceholder('...')`
|
|
25
|
+
4. `getByText('...')`
|
|
26
|
+
5. `getByTestId('submit-btn')` — last resort
|
|
27
|
+
|
|
28
|
+
**NEVER**: CSS class · XPath · nth-child (all brittle)
|
|
29
|
+
|
|
30
|
+
## Reliability Rules
|
|
31
|
+
- Never use `setTimeout` / `sleep()` → use `await expect(locator).toBeVisible()`
|
|
32
|
+
- Playwright auto-waits on interactions — trust it
|
|
33
|
+
- Isolate each test (beforeEach/afterEach clean up)
|
|
34
|
+
- Auth: reuse `storageState` (login once, reuse cookies)
|
|
35
|
+
|
|
36
|
+
## CI Config
|
|
37
|
+
- `fullyParallel: true` · `workers: 4` in CI
|
|
38
|
+
- `retries: 2` in CI · `trace: "on-first-retry"`
|
|
39
|
+
- Upload `playwright-report/` on failure
|
|
40
|
+
|
|
41
|
+
## Anti-Patterns
|
|
42
|
+
- Fixed `setTimeout` → use explicit waits
|
|
43
|
+
- Shared state between tests → isolate each test
|
|
44
|
+
- Testing everything in E2E → use testing pyramid
|
|
45
|
+
- Skip flaky tests → fix or delete them
|
|
46
|
+
|
|
47
|
+
> Load full SKILL.md for: Page Object Model code, auth setup pattern, visual regression, mock API, GitHub Actions YAML, test data factory
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gitlab-ci-patterns
|
|
3
|
+
summary: true
|
|
4
|
+
description: "GitLab CI/CD pipeline patterns. For planning/quick ref — load SKILL.md for full YAML configs."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# GitLab CI Patterns — Summary
|
|
8
|
+
|
|
9
|
+
> ⚡ Quick ref. Load full `SKILL.md` when writing `.gitlab-ci.yml` configurations.
|
|
10
|
+
|
|
11
|
+
## Stage Order
|
|
12
|
+
```
|
|
13
|
+
lint → test → build → security → deploy
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Key Rules
|
|
17
|
+
- **Images**: Always pin versions (`node:20-alpine`, NOT `:latest`)
|
|
18
|
+
- **Rules**: Use `rules:` keyword, avoid deprecated `only/except`
|
|
19
|
+
- **Cache**: `pull-push` for update jobs · `pull` for read-only jobs · key: `$CI_COMMIT_REF_SLUG`
|
|
20
|
+
- **Artifacts**: `expire_in` always set · `paths:` for build output · `reports:` for coverage
|
|
21
|
+
- **Secrets**: GitLab CI/CD Variables (masked+protected), NEVER in `.gitlab-ci.yml`
|
|
22
|
+
- **Docker**: `services: [docker:dind]` + `DOCKER_TLS_CERTDIR: "/certs"` + login before push
|
|
23
|
+
- **DAG**: Use `needs:` for parallel jobs within stages (faster than sequential stages)
|
|
24
|
+
|
|
25
|
+
## Optimization
|
|
26
|
+
- `interruptible: true` on default + `interruptible: false` on prod deploys
|
|
27
|
+
- Parallel matrix: `parallel: matrix: - NODE_VERSION: ["18","20"]`
|
|
28
|
+
|
|
29
|
+
## Anti-Patterns
|
|
30
|
+
- `only/except` → use `rules:`
|
|
31
|
+
- No `expire_in` on artifacts
|
|
32
|
+
- Hardcoded URLs → use variables
|
|
33
|
+
- Single large job → split into stages
|
|
34
|
+
|
|
35
|
+
> Load full SKILL.md for: full YAML examples (Node.js pipeline, Docker build, multi-env deploy), caching strategy details, security scanning templates
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: monitoring-observability
|
|
3
|
+
summary: true
|
|
4
|
+
description: "SRE monitoring, observability, SLI/SLO patterns. For planning/quick ref — load SKILL.md for Prometheus/Grafana/alerting code."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Monitoring & Observability — Summary
|
|
8
|
+
|
|
9
|
+
> ⚡ Quick ref. Load full `SKILL.md` when setting up Prometheus, Grafana, or alerting rules.
|
|
10
|
+
|
|
11
|
+
## 3 Pillars
|
|
12
|
+
- **Metrics** (Prometheus): aggregated time-series, trends → Prometheus/VictoriaMetrics/DataDog
|
|
13
|
+
- **Logs** (Loki/ELK): discrete events, high detail → structured JSON always
|
|
14
|
+
- **Traces** (Jaeger/OTel): distributed request causality chains
|
|
15
|
+
|
|
16
|
+
## Four Golden Signals (Always Instrument)
|
|
17
|
+
1. **Latency** — time to serve request (`http_request_duration_seconds`)
|
|
18
|
+
2. **Traffic** — demand (`http_requests_total`)
|
|
19
|
+
3. **Errors** — failure rate (`http_requests_total{status=~"5.."}`)
|
|
20
|
+
4. **Saturation** — resource fullness (memory/CPU/queue depth)
|
|
21
|
+
|
|
22
|
+
## SLO Framework
|
|
23
|
+
- Define SLI → Set SLO target → Calculate error budget → Alert on burn rate (not causes)
|
|
24
|
+
- Alert on **symptoms** (latency/errors breach SLO), NOT causes (CPU high)
|
|
25
|
+
|
|
26
|
+
## Non-Negotiable Rules
|
|
27
|
+
- Structured JSON logging always (no unstructured text)
|
|
28
|
+
- NO PII/secrets in logs — redact sensitive fields
|
|
29
|
+
- `traceId` + `requestId` in every log entry
|
|
30
|
+
- Every alert must have a runbook URL
|
|
31
|
+
- /health (liveness) + /ready (readiness) endpoints on every service
|
|
32
|
+
|
|
33
|
+
## Alert Tiers
|
|
34
|
+
- Critical → PagerDuty + call (service down, data loss)
|
|
35
|
+
- Warning → Slack 15-30min (latency, disk 80%)
|
|
36
|
+
- Info → email/ticket (cert expiring 30d)
|
|
37
|
+
|
|
38
|
+
> Load full SKILL.md for: PromQL patterns, burn rate alerting, OpenTelemetry setup, Grafana dashboard templates, incident response workflow
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: multi-tenancy
|
|
3
|
+
summary: true
|
|
4
|
+
description: "Multi-tenant architecture patterns. For planning/quick ref — load SKILL.md for full isolation and context code."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Multi-Tenancy — Summary
|
|
8
|
+
|
|
9
|
+
> ⚡ Quick ref. Load full `SKILL.md` when implementing isolation strategy or context propagation.
|
|
10
|
+
|
|
11
|
+
## Isolation Strategy Selection
|
|
12
|
+
| Tenants | Compliance | Strategy |
|
|
13
|
+
|---|---|---|
|
|
14
|
+
| <100 | None | Shared DB + RLS |
|
|
15
|
+
| 100-1000 | Moderate | Schema-per-tenant |
|
|
16
|
+
| Enterprise | HIPAA/PCI/SOC2 | DB-per-tenant |
|
|
17
|
+
|
|
18
|
+
## Non-Negotiable Rules
|
|
19
|
+
- **EVERY query filters by `tenant_id`** — no exceptions
|
|
20
|
+
- **NEVER trust client-provided tenant ID** — extract from JWT/subdomain/gateway header
|
|
21
|
+
- **Cache keys prefixed**: always `tenant:{id}:key`
|
|
22
|
+
- **Background jobs**: always include `tenantId` in job data
|
|
23
|
+
- **Context flows**: HTTP → Service → Queue → Worker → DB (AsyncLocalStorage in Node.js)
|
|
24
|
+
- **RLS as defense-in-depth** — even when app filters by tenant_id
|
|
25
|
+
- **Log `tenant_id`** in every log entry
|
|
26
|
+
|
|
27
|
+
## Tenant Resolution Priority
|
|
28
|
+
JWT Claim > Subdomain > Custom Header > (never: query param or URL path)
|
|
29
|
+
|
|
30
|
+
## Fatal Anti-Patterns
|
|
31
|
+
- `SELECT * FROM users` without tenant filter → instant cross-tenant data leak
|
|
32
|
+
- Trusting `req.query.tenant` → trivial to spoof
|
|
33
|
+
- No Redis key prefix → cache poisoning across tenants
|
|
34
|
+
- Background job without tenantId → orphaned/wrong-context operations
|
|
35
|
+
|
|
36
|
+
> Load full SKILL.md for: RLS SQL patterns, AsyncLocalStorage code, isolation matrix, full implementation checklist
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: queue-patterns
|
|
3
|
+
summary: true
|
|
4
|
+
description: "Message queue and background job patterns. For planning/quick ref — load SKILL.md for BullMQ/RabbitMQ code."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Queue Patterns — Summary
|
|
8
|
+
|
|
9
|
+
> ⚡ Quick ref. Load full `SKILL.md` when implementing queue workers or retry logic.
|
|
10
|
+
|
|
11
|
+
## Technology Selection
|
|
12
|
+
- **Node.js + Redis** → BullMQ
|
|
13
|
+
- **Python** → Celery / ARQ
|
|
14
|
+
- **Serverless** → AWS SQS
|
|
15
|
+
- **Multi-language routing** → RabbitMQ
|
|
16
|
+
- **High-throughput streaming** → Kafka
|
|
17
|
+
|
|
18
|
+
## Non-Negotiable Rules
|
|
19
|
+
- **Payload = IDs only**, fetch fresh data in worker (never large objects)
|
|
20
|
+
- **idempotencyKey** in every job — same job 2x = same result
|
|
21
|
+
- **tenantId** in every job (multi-tenant)
|
|
22
|
+
- **correlationId** for request tracing
|
|
23
|
+
- **Retry**: exponential backoff · max 3-5 attempts · DLQ after max retries
|
|
24
|
+
- **DLQ monitored**: alert on DLQ growth, never let jobs silently disappear
|
|
25
|
+
- **Errors bubble up**: never swallow errors in worker → let queue retry
|
|
26
|
+
|
|
27
|
+
## Job States
|
|
28
|
+
`WAITING → ACTIVE → COMPLETED | FAILED → RETRY → DLQ`
|
|
29
|
+
|
|
30
|
+
## Error Classification
|
|
31
|
+
- Transient (network, timeout) → retry with backoff
|
|
32
|
+
- Permanent (validation, auth) → move to DLQ immediately
|
|
33
|
+
- Rate limit (429) → retry with longer delay
|
|
34
|
+
|
|
35
|
+
## Anti-Patterns
|
|
36
|
+
- Catching & ignoring errors in worker
|
|
37
|
+
- No timeout on external API calls
|
|
38
|
+
- Single queue for all job types (use priority queues)
|
|
39
|
+
- No idempotency check → duplicate processing
|
|
40
|
+
|
|
41
|
+
> Load full SKILL.md for: BullMQ config code, idempotent handler pattern, graceful shutdown, concurrency patterns, implementation checklist
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: realtime-patterns
|
|
3
|
+
summary: true
|
|
4
|
+
description: "WebSocket, Socket.IO, event-driven patterns. For planning/quick ref — load SKILL.md for full patterns."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Realtime Patterns — Summary
|
|
8
|
+
|
|
9
|
+
> ⚡ Quick ref. Load full `SKILL.md` when implementing connection/scaling/event code.
|
|
10
|
+
|
|
11
|
+
## Technology Selection
|
|
12
|
+
- **2-way + browser compat** → Socket.IO
|
|
13
|
+
- **2-way, no fallback needed** → Raw WebSocket
|
|
14
|
+
- **Server→Client only** → Server-Sent Events
|
|
15
|
+
- **Server-to-server** → Webhooks
|
|
16
|
+
|
|
17
|
+
## Key Rules
|
|
18
|
+
- **Reconnection**: Exponential backoff (1s→2s→4s, max 30s) + jitter always
|
|
19
|
+
- **Auth**: JWT in handshake `auth` object (not cookie) · validate on every connection
|
|
20
|
+
- **Rooms**: `socket.join(roomId)` · naming: `entity:id` (e.g., `conversation:456`)
|
|
21
|
+
- **Scaling**: Redis adapter for multi-instance · sticky sessions OR pub/sub
|
|
22
|
+
- **Events**: `resource:action` naming · include `requestId` + `eventId` in payload
|
|
23
|
+
- **State sync**: Send missed events on reconnect via sequence numbers
|
|
24
|
+
|
|
25
|
+
## Anti-Patterns
|
|
26
|
+
- Sending large objects over socket (send IDs, fetch via HTTP)
|
|
27
|
+
- In-memory state per server (use Redis for cross-server)
|
|
28
|
+
- No reconnection handling / immediate reconnect (use backoff)
|
|
29
|
+
- Missing payload validation
|
|
30
|
+
|
|
31
|
+
> Load full SKILL.md for: connection lifecycle code, Redis adapter setup, security patterns, implementation checklist
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: systematic-debugging
|
|
3
|
+
summary: true
|
|
4
|
+
description: "4-phase debugging methodology. For quick ref — load SKILL.md for full templates and technique guides."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Systematic Debugging — Summary
|
|
8
|
+
|
|
9
|
+
> ⚡ Quick ref. Load full `SKILL.md` for detailed phase templates and debugging session docs.
|
|
10
|
+
|
|
11
|
+
## 4-Phase Workflow
|
|
12
|
+
```
|
|
13
|
+
1. REPRODUCE → reliable repro >90% · minimum steps · note env
|
|
14
|
+
2. DIAGNOSE → hypothesize → predict → test → one variable at a time
|
|
15
|
+
3. FIX → target root cause (not symptom) · minimal change
|
|
16
|
+
4. VERIFY → repro no longer triggers · regression test added
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Core Rule
|
|
20
|
+
```
|
|
21
|
+
❌ Change random things → hope it works
|
|
22
|
+
✅ Observe → Hypothesize → Predict → Test (scientific method)
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Evidence Techniques
|
|
26
|
+
- **Logs**: add strategic logging at decision points (structured, with context)
|
|
27
|
+
- **Breakpoints**: conditional breakpoints at state inspection points
|
|
28
|
+
- **Binary search**: comment out half the code to narrow location
|
|
29
|
+
- **git bisect**: find exact commit that introduced the bug
|
|
30
|
+
- **5 Whys**: ask WHY 5 times to reach root cause
|
|
31
|
+
|
|
32
|
+
## Root Cause Categories
|
|
33
|
+
Logic Error · State Problem · Data Issue · Integration · Resource · Configuration
|
|
34
|
+
|
|
35
|
+
## Anti-Patterns
|
|
36
|
+
- Fix the symptom (not root cause) → bug recurs
|
|
37
|
+
- Skip reproduction → debugging is guessing
|
|
38
|
+
- Change multiple things at once → can't isolate cause
|
|
39
|
+
- Forget regression test → bug comes back
|
|
40
|
+
|
|
41
|
+
> Load full SKILL.md for: hypothesis documentation template, debugging session template, tool selection guide, 5 Whys format, rollback strategy
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: terraform-patterns
|
|
3
|
+
summary: true
|
|
4
|
+
description: "Infrastructure as Code with Terraform/OpenTofu. For planning/quick ref — load SKILL.md for full HCL patterns."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Terraform Patterns — Summary
|
|
8
|
+
|
|
9
|
+
> ⚡ Quick ref. Load full `SKILL.md` when writing HCL, modules, or CI/CD pipeline steps.
|
|
10
|
+
|
|
11
|
+
## Workflow (Always)
|
|
12
|
+
```
|
|
13
|
+
init → plan (REVIEW!) → apply → verify
|
|
14
|
+
```
|
|
15
|
+
Never apply without reviewing plan. Never manual console changes.
|
|
16
|
+
|
|
17
|
+
## Key Rules
|
|
18
|
+
- **State**: Remote backend (S3+DynamoDB lock) · Never commit `.tfstate` to git
|
|
19
|
+
- **Variables**: Always typed + description · `sensitive = true` for secrets · no hardcoded values
|
|
20
|
+
- **for_each > count** when items may be removed (prevents index-shift recreation)
|
|
21
|
+
- **Modules**: Small, focused, single-responsibility · pin version for prod (`"5.1.2"`)
|
|
22
|
+
- **Security**: `trivy config .` / `checkov -d .` before PR · No secrets in .tfvars · Least privilege IAM
|
|
23
|
+
|
|
24
|
+
## File Structure
|
|
25
|
+
`main.tf` · `variables.tf` · `outputs.tf` · `versions.tf` · `modules/` per logical group
|
|
26
|
+
|
|
27
|
+
## Anti-Patterns
|
|
28
|
+
- `latest` provider versions → pin minor `~> 5.0`
|
|
29
|
+
- Single state file for everything → per-environment states
|
|
30
|
+
- `count` for removable items → use `for_each`
|
|
31
|
+
- Skip plan review → always review
|
|
32
|
+
|
|
33
|
+
> Load full SKILL.md for: HCL templates, count/for_each examples, state backend config, CI/CD GitHub Actions workflow, testing patterns
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ui-ux-pro-max
|
|
3
|
+
summary: true
|
|
4
|
+
description: "UI/UX design intelligence. 50 styles, 97 palettes, 57 font pairings, 9 stacks. For planning/quick ref — load SKILL.md for full patterns."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# UI/UX Pro Max — Summary
|
|
8
|
+
|
|
9
|
+
> ⚡ Quick ref. Load full `SKILL.md` when implementing specific UI patterns.
|
|
10
|
+
|
|
11
|
+
## When to Apply
|
|
12
|
+
Designing UI, choosing colors/typography, reviewing UX, building landing pages/dashboards.
|
|
13
|
+
|
|
14
|
+
## Priority Rules
|
|
15
|
+
1. **Accessibility** (CRITICAL): 4.5:1 contrast, focus rings, alt text, aria-labels, keyboard nav
|
|
16
|
+
2. **Touch & Interaction** (CRITICAL): 44x44px targets, loading states, error feedback, cursor-pointer
|
|
17
|
+
3. **Performance** (HIGH): WebP/srcset, prefers-reduced-motion, no content jumping
|
|
18
|
+
4. **Layout** (HIGH): viewport meta, min 16px body, no horizontal scroll, z-index scale
|
|
19
|
+
5. **Typography/Color** (MEDIUM): 1.5-1.75 line-height, 65-75 char lines, font pairing
|
|
20
|
+
6. **Animation** (MEDIUM): 150-300ms, transform/opacity only, skeleton screens
|
|
21
|
+
7. **Style** (MEDIUM): consistent style across pages, SVG icons not emojis
|
|
22
|
+
|
|
23
|
+
## Workflow
|
|
24
|
+
```
|
|
25
|
+
1. Analyze: product type · style keywords · stack (default: html-tailwind)
|
|
26
|
+
2. python3 .agent/skills/ui-ux-pro-max/scripts/search.py "<keywords>" --design-system
|
|
27
|
+
3. Supplement: --domain style|chart|ux|typography as needed
|
|
28
|
+
4. python3 .agent/skills/ui-ux-pro-max/scripts/search.py "<keywords>" --stack html-tailwind
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Common Mistakes
|
|
32
|
+
- Emojis as icons → use Heroicons/Lucide SVG
|
|
33
|
+
- Glass cards in light mode → use bg-white/80+ not bg-white/10
|
|
34
|
+
- No cursor-pointer on clickable cards
|
|
35
|
+
- Content behind fixed navbars
|
|
36
|
+
|
|
37
|
+
> Load full SKILL.md for: complete domain reference, style catalog, pre-delivery checklist
|