@neyugn/agent-kits 0.2.5 → 0.2.7
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/README.md +1 -1
- package/README.vi.md +1 -1
- package/README.zh.md +1 -1
- package/common/COMMON.md +166 -0
- package/common/skills/filter-agent/SKILL.md +194 -0
- package/common/skills/filter-skill/SKILL.md +225 -0
- package/common/skills/filter-skill/scripts/workspace_analyzer.py +284 -0
- package/common/skills/scan-techstack/SKILL.md +167 -0
- package/common/skills/scan-techstack/scripts/techstack_scanner.py +335 -0
- package/common/workflows/filter.md +308 -0
- package/kits/coder/rules/AGENTS.md +23 -2
- package/kits/coder/rules/CLAUDE.md +23 -2
- package/kits/coder/rules/CURSOR.md +23 -2
- package/kits/coder/rules/GEMINI.md +23 -2
- package/package.json +3 -2
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Techstack Scanner for Common Skills Layer
|
|
4
|
+
|
|
5
|
+
Analyzes workspace to detect technologies, frameworks, and dependencies.
|
|
6
|
+
Outputs structured JSON profile for filter-skill and filter-agent to consume.
|
|
7
|
+
|
|
8
|
+
Usage:
|
|
9
|
+
python3 techstack_scanner.py [workspace_path]
|
|
10
|
+
python3 techstack_scanner.py .
|
|
11
|
+
python3 techstack_scanner.py /path/to/project
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
import json
|
|
15
|
+
import os
|
|
16
|
+
import sys
|
|
17
|
+
from pathlib import Path
|
|
18
|
+
from datetime import datetime
|
|
19
|
+
from typing import Dict, List, Any
|
|
20
|
+
|
|
21
|
+
# =============================================================================
|
|
22
|
+
# Detection Mappings
|
|
23
|
+
# =============================================================================
|
|
24
|
+
|
|
25
|
+
# Config files → Language/Platform detection
|
|
26
|
+
CONFIG_TO_LANGUAGE = {
|
|
27
|
+
"package.json": "nodejs",
|
|
28
|
+
"tsconfig.json": "typescript",
|
|
29
|
+
"pubspec.yaml": "dart",
|
|
30
|
+
"pyproject.toml": "python",
|
|
31
|
+
"requirements.txt": "python",
|
|
32
|
+
"Cargo.toml": "rust",
|
|
33
|
+
"go.mod": "go",
|
|
34
|
+
"build.gradle": "kotlin",
|
|
35
|
+
"build.gradle.kts": "kotlin",
|
|
36
|
+
"Podfile": "swift",
|
|
37
|
+
"composer.json": "php",
|
|
38
|
+
"Gemfile": "ruby",
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
# Framework markers → Framework name + Category
|
|
42
|
+
FRAMEWORK_MARKERS = {
|
|
43
|
+
"next.config.js": {"framework": "nextjs", "category": "frontend"},
|
|
44
|
+
"next.config.mjs": {"framework": "nextjs", "category": "frontend"},
|
|
45
|
+
"next.config.ts": {"framework": "nextjs", "category": "frontend"},
|
|
46
|
+
"vite.config.js": {"framework": "vite", "category": "frontend"},
|
|
47
|
+
"vite.config.ts": {"framework": "vite", "category": "frontend"},
|
|
48
|
+
"angular.json": {"framework": "angular", "category": "frontend"},
|
|
49
|
+
"nuxt.config.js": {"framework": "nuxtjs", "category": "frontend"},
|
|
50
|
+
"nuxt.config.ts": {"framework": "nuxtjs", "category": "frontend"},
|
|
51
|
+
"tailwind.config.js": {"framework": "tailwindcss", "category": "styling"},
|
|
52
|
+
"tailwind.config.ts": {"framework": "tailwindcss", "category": "styling"},
|
|
53
|
+
"tailwind.config.mjs": {"framework": "tailwindcss", "category": "styling"},
|
|
54
|
+
"Dockerfile": {"framework": "docker", "category": "devops"},
|
|
55
|
+
"docker-compose.yml": {"framework": "docker-compose", "category": "devops"},
|
|
56
|
+
"docker-compose.yaml": {"framework": "docker-compose", "category": "devops"},
|
|
57
|
+
".gitlab-ci.yml": {"framework": "gitlab-ci", "category": "cicd"},
|
|
58
|
+
"pubspec.yaml": {"framework": "flutter", "category": "mobile"},
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
# Directory patterns → Framework + Category
|
|
62
|
+
DIRECTORY_MARKERS = {
|
|
63
|
+
".github/workflows": {"framework": "github-actions", "category": "cicd"},
|
|
64
|
+
"k8s": {"framework": "kubernetes", "category": "devops"},
|
|
65
|
+
"kubernetes": {"framework": "kubernetes", "category": "devops"},
|
|
66
|
+
"terraform": {"framework": "terraform", "category": "iac"},
|
|
67
|
+
"prisma": {"framework": "prisma", "category": "database"},
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
# NPM dependencies → Category detection
|
|
71
|
+
NPM_CATEGORY_MAPPINGS = {
|
|
72
|
+
# Frontend
|
|
73
|
+
"react": "frontend",
|
|
74
|
+
"react-dom": "frontend",
|
|
75
|
+
"vue": "frontend",
|
|
76
|
+
"@angular/core": "frontend",
|
|
77
|
+
"svelte": "frontend",
|
|
78
|
+
# Backend
|
|
79
|
+
"express": "backend",
|
|
80
|
+
"fastify": "backend",
|
|
81
|
+
"@nestjs/core": "backend",
|
|
82
|
+
"koa": "backend",
|
|
83
|
+
"hono": "backend",
|
|
84
|
+
# Database
|
|
85
|
+
"@prisma/client": "database",
|
|
86
|
+
"drizzle-orm": "database",
|
|
87
|
+
"pg": "database",
|
|
88
|
+
"mysql2": "database",
|
|
89
|
+
"mongodb": "database",
|
|
90
|
+
"mongoose": "database",
|
|
91
|
+
"redis": "database",
|
|
92
|
+
"ioredis": "database",
|
|
93
|
+
# AI
|
|
94
|
+
"openai": "ai",
|
|
95
|
+
"langchain": "ai",
|
|
96
|
+
"@langchain/core": "ai",
|
|
97
|
+
"@anthropic-ai/sdk": "ai",
|
|
98
|
+
# Realtime
|
|
99
|
+
"socket.io": "realtime",
|
|
100
|
+
"socket.io-client": "realtime",
|
|
101
|
+
"ws": "realtime",
|
|
102
|
+
# Queue
|
|
103
|
+
"bullmq": "queue",
|
|
104
|
+
"bull": "queue",
|
|
105
|
+
"bee-queue": "queue",
|
|
106
|
+
"amqplib": "queue",
|
|
107
|
+
# Testing
|
|
108
|
+
"jest": "testing",
|
|
109
|
+
"vitest": "testing",
|
|
110
|
+
"playwright": "testing",
|
|
111
|
+
"@playwright/test": "testing",
|
|
112
|
+
"cypress": "testing",
|
|
113
|
+
# Auth
|
|
114
|
+
"passport": "auth",
|
|
115
|
+
"next-auth": "auth",
|
|
116
|
+
"@auth/core": "auth",
|
|
117
|
+
# GraphQL
|
|
118
|
+
"graphql": "graphql",
|
|
119
|
+
"@apollo/server": "graphql",
|
|
120
|
+
"@apollo/client": "graphql",
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
# Frameworks detected from dependencies
|
|
124
|
+
NPM_FRAMEWORK_MAPPINGS = {
|
|
125
|
+
"next": "nextjs",
|
|
126
|
+
"react": "react",
|
|
127
|
+
"vue": "vue",
|
|
128
|
+
"@angular/core": "angular",
|
|
129
|
+
"express": "express",
|
|
130
|
+
"fastify": "fastify",
|
|
131
|
+
"@nestjs/core": "nestjs",
|
|
132
|
+
"socket.io": "socketio",
|
|
133
|
+
"tailwindcss": "tailwindcss",
|
|
134
|
+
"@prisma/client": "prisma",
|
|
135
|
+
"drizzle-orm": "drizzle",
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
# =============================================================================
|
|
139
|
+
# Scanner Class
|
|
140
|
+
# =============================================================================
|
|
141
|
+
|
|
142
|
+
class TechstackScanner:
|
|
143
|
+
def __init__(self, workspace_path: str):
|
|
144
|
+
self.workspace = Path(workspace_path).resolve()
|
|
145
|
+
self.config_files: List[str] = []
|
|
146
|
+
self.languages: set = set()
|
|
147
|
+
self.frameworks: set = set()
|
|
148
|
+
self.databases: List[str] = []
|
|
149
|
+
self.tools: List[str] = []
|
|
150
|
+
self.dependencies: Dict[str, List[str]] = {}
|
|
151
|
+
self.categories: Dict[str, bool] = {
|
|
152
|
+
"frontend": False,
|
|
153
|
+
"backend": False,
|
|
154
|
+
"mobile": False,
|
|
155
|
+
"database": False,
|
|
156
|
+
"devops": False,
|
|
157
|
+
"ai": False,
|
|
158
|
+
"realtime": False,
|
|
159
|
+
"queue": False,
|
|
160
|
+
"graphql": False,
|
|
161
|
+
"auth": False,
|
|
162
|
+
"testing": False,
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
def scan(self) -> Dict[str, Any]:
|
|
166
|
+
"""Run full workspace scan."""
|
|
167
|
+
if not self.workspace.exists():
|
|
168
|
+
return self._error(f"Workspace not found: {self.workspace}")
|
|
169
|
+
|
|
170
|
+
# Step 1: Scan config files for languages
|
|
171
|
+
self._scan_config_files()
|
|
172
|
+
|
|
173
|
+
# Step 2: Scan framework markers
|
|
174
|
+
self._scan_framework_markers()
|
|
175
|
+
|
|
176
|
+
# Step 3: Scan directories
|
|
177
|
+
self._scan_directories()
|
|
178
|
+
|
|
179
|
+
# Step 4: Parse dependencies
|
|
180
|
+
self._parse_dependencies()
|
|
181
|
+
|
|
182
|
+
# Step 5: Build result
|
|
183
|
+
return self._build_result()
|
|
184
|
+
|
|
185
|
+
def _scan_config_files(self):
|
|
186
|
+
"""Scan for config files and detect languages."""
|
|
187
|
+
for filename, language in CONFIG_TO_LANGUAGE.items():
|
|
188
|
+
filepath = self.workspace / filename
|
|
189
|
+
if filepath.exists():
|
|
190
|
+
self.config_files.append(filename)
|
|
191
|
+
self.languages.add(language)
|
|
192
|
+
|
|
193
|
+
def _scan_framework_markers(self):
|
|
194
|
+
"""Scan for framework-specific config files."""
|
|
195
|
+
for filename, info in FRAMEWORK_MARKERS.items():
|
|
196
|
+
filepath = self.workspace / filename
|
|
197
|
+
if filepath.exists():
|
|
198
|
+
self.config_files.append(filename)
|
|
199
|
+
self.frameworks.add(info["framework"])
|
|
200
|
+
self._set_category(info["category"])
|
|
201
|
+
|
|
202
|
+
def _scan_directories(self):
|
|
203
|
+
"""Scan for special directories."""
|
|
204
|
+
for dirname, info in DIRECTORY_MARKERS.items():
|
|
205
|
+
dirpath = self.workspace / dirname
|
|
206
|
+
if dirpath.exists() and dirpath.is_dir():
|
|
207
|
+
self.config_files.append(f"{dirname}/")
|
|
208
|
+
self.frameworks.add(info["framework"])
|
|
209
|
+
self._set_category(info["category"])
|
|
210
|
+
self.tools.append(info["framework"])
|
|
211
|
+
|
|
212
|
+
def _parse_dependencies(self):
|
|
213
|
+
"""Parse dependencies from package managers."""
|
|
214
|
+
# Parse package.json
|
|
215
|
+
package_json = self.workspace / "package.json"
|
|
216
|
+
if package_json.exists():
|
|
217
|
+
try:
|
|
218
|
+
with open(package_json, "r") as f:
|
|
219
|
+
data = json.load(f)
|
|
220
|
+
|
|
221
|
+
all_deps = {}
|
|
222
|
+
all_deps.update(data.get("dependencies", {}))
|
|
223
|
+
all_deps.update(data.get("devDependencies", {}))
|
|
224
|
+
|
|
225
|
+
self.dependencies["npm"] = list(all_deps.keys())
|
|
226
|
+
|
|
227
|
+
# Detect categories and frameworks from deps
|
|
228
|
+
for dep_name in all_deps.keys():
|
|
229
|
+
# Check category
|
|
230
|
+
for pattern, category in NPM_CATEGORY_MAPPINGS.items():
|
|
231
|
+
if pattern == dep_name or dep_name.startswith(f"{pattern}/"):
|
|
232
|
+
self._set_category(category)
|
|
233
|
+
|
|
234
|
+
# Check framework
|
|
235
|
+
for pattern, framework in NPM_FRAMEWORK_MAPPINGS.items():
|
|
236
|
+
if pattern == dep_name:
|
|
237
|
+
self.frameworks.add(framework)
|
|
238
|
+
|
|
239
|
+
except (json.JSONDecodeError, IOError):
|
|
240
|
+
pass
|
|
241
|
+
|
|
242
|
+
# Parse pubspec.yaml (Flutter)
|
|
243
|
+
pubspec = self.workspace / "pubspec.yaml"
|
|
244
|
+
if pubspec.exists():
|
|
245
|
+
self.frameworks.add("flutter")
|
|
246
|
+
self._set_category("mobile")
|
|
247
|
+
|
|
248
|
+
# Parse Podfile (iOS)
|
|
249
|
+
podfile = self.workspace / "Podfile"
|
|
250
|
+
if podfile.exists():
|
|
251
|
+
self._set_category("mobile")
|
|
252
|
+
|
|
253
|
+
# Parse build.gradle (Android)
|
|
254
|
+
gradle = self.workspace / "build.gradle"
|
|
255
|
+
if gradle.exists() or (self.workspace / "build.gradle.kts").exists():
|
|
256
|
+
self._set_category("mobile")
|
|
257
|
+
|
|
258
|
+
def _set_category(self, category: str):
|
|
259
|
+
"""Set category flag to True."""
|
|
260
|
+
# Map sub-categories to main categories
|
|
261
|
+
category_map = {
|
|
262
|
+
"frontend": "frontend",
|
|
263
|
+
"backend": "backend",
|
|
264
|
+
"mobile": "mobile",
|
|
265
|
+
"database": "database",
|
|
266
|
+
"devops": "devops",
|
|
267
|
+
"iac": "devops",
|
|
268
|
+
"cicd": "devops",
|
|
269
|
+
"ai": "ai",
|
|
270
|
+
"realtime": "realtime",
|
|
271
|
+
"queue": "queue",
|
|
272
|
+
"graphql": "graphql",
|
|
273
|
+
"auth": "auth",
|
|
274
|
+
"testing": "testing",
|
|
275
|
+
"styling": "frontend", # Styling is part of frontend
|
|
276
|
+
}
|
|
277
|
+
main_category = category_map.get(category, category)
|
|
278
|
+
if main_category in self.categories:
|
|
279
|
+
self.categories[main_category] = True
|
|
280
|
+
|
|
281
|
+
def _build_result(self) -> Dict[str, Any]:
|
|
282
|
+
"""Build final scan result."""
|
|
283
|
+
# Detect databases from frameworks
|
|
284
|
+
db_frameworks = ["prisma", "drizzle", "mongodb", "postgresql", "mysql"]
|
|
285
|
+
for fw in self.frameworks:
|
|
286
|
+
if fw in db_frameworks:
|
|
287
|
+
self.databases.append(fw)
|
|
288
|
+
|
|
289
|
+
return {
|
|
290
|
+
"success": True,
|
|
291
|
+
"analyzedAt": datetime.now().isoformat(),
|
|
292
|
+
"workspacePath": str(self.workspace),
|
|
293
|
+
"detection": {
|
|
294
|
+
"configFiles": sorted(set(self.config_files)),
|
|
295
|
+
"languages": sorted(self.languages),
|
|
296
|
+
"frameworks": sorted(self.frameworks),
|
|
297
|
+
"databases": sorted(set(self.databases)),
|
|
298
|
+
"tools": sorted(set(self.tools)),
|
|
299
|
+
"dependencies": self.dependencies,
|
|
300
|
+
},
|
|
301
|
+
"categories": self.categories,
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
def _error(self, message: str) -> Dict[str, Any]:
|
|
305
|
+
"""Return error result."""
|
|
306
|
+
return {
|
|
307
|
+
"success": False,
|
|
308
|
+
"error": message,
|
|
309
|
+
"analyzedAt": datetime.now().isoformat(),
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
# =============================================================================
|
|
314
|
+
# Main
|
|
315
|
+
# =============================================================================
|
|
316
|
+
|
|
317
|
+
def main():
|
|
318
|
+
# Get workspace path from args or use current directory
|
|
319
|
+
if len(sys.argv) > 1:
|
|
320
|
+
workspace_path = sys.argv[1]
|
|
321
|
+
else:
|
|
322
|
+
workspace_path = "."
|
|
323
|
+
|
|
324
|
+
scanner = TechstackScanner(workspace_path)
|
|
325
|
+
result = scanner.scan()
|
|
326
|
+
|
|
327
|
+
# Output as JSON for AI to parse
|
|
328
|
+
print(json.dumps(result, indent=2))
|
|
329
|
+
|
|
330
|
+
# Exit code based on success
|
|
331
|
+
sys.exit(0 if result.get("success") else 1)
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
if __name__ == "__main__":
|
|
335
|
+
main()
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Analyze workspace and enable/disable skills/agents based on techstack
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /filter - Workspace Skill & Agent Filtering
|
|
6
|
+
|
|
7
|
+
## Trigger
|
|
8
|
+
|
|
9
|
+
User calls `/filter` or requests "filter skills", "optimize skills for this project"
|
|
10
|
+
|
|
11
|
+
## Agent
|
|
12
|
+
|
|
13
|
+
No specific agent required - this workflow uses common skills.
|
|
14
|
+
|
|
15
|
+
## Prerequisites
|
|
16
|
+
|
|
17
|
+
- Currently in a workspace with code
|
|
18
|
+
|
|
19
|
+
## Critical Rules
|
|
20
|
+
|
|
21
|
+
1. **ALWAYS ASK** - Always ask user confirmation before applying changes
|
|
22
|
+
2. **NEVER DISABLE CORE** - Never disable core skills/agents
|
|
23
|
+
3. **PERSIST RESULTS** - Save results to `.agent/profile.json`
|
|
24
|
+
4. **ASK FUTURE STACK** - Ask user about planned future techstack additions
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Workflow Overview
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
/filter
|
|
32
|
+
├── Step 1: scan-techstack → Detect technologies
|
|
33
|
+
├── Step 2: filter-skill → Recommend skill changes
|
|
34
|
+
├── Step 3: filter-agent → Recommend agent changes
|
|
35
|
+
├── Step 4: Present to User → Ask confirmation
|
|
36
|
+
└── Step 5: Save Profile → Persist to profile.json
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Workflow Steps
|
|
42
|
+
|
|
43
|
+
### Step 1: Scan Techstack
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
1. Read scan-techstack SKILL.md to understand detection criteria
|
|
47
|
+
2. Scan workspace for config files:
|
|
48
|
+
- package.json, pubspec.yaml, pyproject.toml, Cargo.toml, go.mod
|
|
49
|
+
- next.config.*, vite.config.*, angular.json, nuxt.config.*
|
|
50
|
+
- Dockerfile, docker-compose.*, k8s/, kubernetes/
|
|
51
|
+
- .github/workflows/, .gitlab-ci.yml
|
|
52
|
+
- prisma/, drizzle.config.*, terraform/
|
|
53
|
+
3. Parse dependencies if package manager exists
|
|
54
|
+
4. Build techstack profile with categories:
|
|
55
|
+
- frontend, backend, mobile, database, devops, ai, realtime, queue
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**Output:** TechstackProfile object
|
|
59
|
+
|
|
60
|
+
### Step 2: Filter Skills
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
1. Read filter-skill SKILL.md to understand mapping rules
|
|
64
|
+
2. Use TechstackProfile categories to determine required skills
|
|
65
|
+
3. Map detected frameworks → additional skills
|
|
66
|
+
4. Identify skills to ENABLE (needed for project)
|
|
67
|
+
5. Identify skills to DISABLE (not needed)
|
|
68
|
+
6. Ensure core skills are NEVER in disabled list
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**Output:** SkillRecommendations object
|
|
72
|
+
|
|
73
|
+
### Step 3: Filter Agents
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
1. Read filter-agent SKILL.md to understand agent mapping
|
|
77
|
+
2. Use TechstackProfile categories to determine required agents
|
|
78
|
+
3. Identify agents to DISABLE (irrelevant to project)
|
|
79
|
+
4. Ensure core agents are NEVER in disabled list:
|
|
80
|
+
- orchestrator, project-planner, debugger
|
|
81
|
+
- security-auditor, code-reviewer, documentation-writer
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Output:** AgentRecommendations object
|
|
85
|
+
|
|
86
|
+
### Step 4: Present to User
|
|
87
|
+
|
|
88
|
+
Display in this format:
|
|
89
|
+
|
|
90
|
+
```markdown
|
|
91
|
+
## 🔍 Workspace Analysis Complete
|
|
92
|
+
|
|
93
|
+
### Detected Techstack
|
|
94
|
+
|
|
95
|
+
| Category | Technology |
|
|
96
|
+
| --------- | ----------------------- |
|
|
97
|
+
| Language | TypeScript, Python |
|
|
98
|
+
| Framework | Next.js 14 (App Router) |
|
|
99
|
+
| Styling | Tailwind CSS v4 |
|
|
100
|
+
| Database | PostgreSQL (Prisma) |
|
|
101
|
+
| Cache | Redis |
|
|
102
|
+
| CI/CD | GitHub Actions |
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
### 📚 Skill Recommendations
|
|
107
|
+
|
|
108
|
+
#### ✅ Skills to ENABLE:
|
|
109
|
+
|
|
110
|
+
| Skill | Reason |
|
|
111
|
+
| ----------------- | ------------------------ |
|
|
112
|
+
| react-patterns | Next.js detected |
|
|
113
|
+
| tailwind-patterns | tailwind.config.js found |
|
|
114
|
+
| postgres-patterns | Prisma + PostgreSQL |
|
|
115
|
+
|
|
116
|
+
#### ❌ Skills to DISABLE:
|
|
117
|
+
|
|
118
|
+
| Skill | Reason |
|
|
119
|
+
| ---------------- | ------------------------ |
|
|
120
|
+
| flutter-patterns | No pubspec.yaml found |
|
|
121
|
+
| mobile-design | No mobile setup detected |
|
|
122
|
+
|
|
123
|
+
#### 🔒 Core Skills (always ON):
|
|
124
|
+
|
|
125
|
+
- clean-code, testing-patterns, security-fundamentals, brainstorming, plan-writing
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
### 🤖 Agent Recommendations
|
|
130
|
+
|
|
131
|
+
#### ✅ Agents to KEEP:
|
|
132
|
+
|
|
133
|
+
| Agent | Reason |
|
|
134
|
+
| ------------------- | ------------------ |
|
|
135
|
+
| frontend-specialist | Next.js detected |
|
|
136
|
+
| backend-specialist | API logic detected |
|
|
137
|
+
| devops-engineer | Docker/CI detected |
|
|
138
|
+
|
|
139
|
+
#### ❌ Agents to DISABLE:
|
|
140
|
+
|
|
141
|
+
| Agent | Reason |
|
|
142
|
+
| ------------------- | ---------------------- |
|
|
143
|
+
| mobile-developer | No mobile detected |
|
|
144
|
+
| realtime-specialist | No WebSocket detected |
|
|
145
|
+
| queue-specialist | No queue deps detected |
|
|
146
|
+
|
|
147
|
+
#### 🔒 Core Agents (always ON):
|
|
148
|
+
|
|
149
|
+
- orchestrator, project-planner, debugger, security-auditor, code-reviewer
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
### ❓ Confirmation Questions:
|
|
154
|
+
|
|
155
|
+
1. **Do you agree with the changes above?** (yes/no/customize)
|
|
156
|
+
|
|
157
|
+
2. **Are there any techstacks you plan to add in the future?**
|
|
158
|
+
(e.g., mobile app, Kubernetes, different CI/CD...)
|
|
159
|
+
|
|
160
|
+
3. **Are there any skills/agents you want to force enable or disable?**
|
|
161
|
+
(e.g., keep ai-rag-patterns even though not currently used)
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Step 5: Process User Response
|
|
165
|
+
|
|
166
|
+
```
|
|
167
|
+
Based on user answer:
|
|
168
|
+
|
|
169
|
+
If YES:
|
|
170
|
+
→ Apply all recommended changes
|
|
171
|
+
→ Save to profile.json
|
|
172
|
+
|
|
173
|
+
If NO / CUSTOMIZE:
|
|
174
|
+
→ Ask which changes to skip/modify
|
|
175
|
+
→ Apply only approved changes
|
|
176
|
+
→ Save to profile.json
|
|
177
|
+
|
|
178
|
+
If user mentions FUTURE techstack:
|
|
179
|
+
→ Add to futureTechstack array
|
|
180
|
+
→ Keep relevant skills/agents enabled (don't disable)
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Step 6: Save Profile
|
|
184
|
+
|
|
185
|
+
Create/Update `.agent/profile.json`:
|
|
186
|
+
|
|
187
|
+
```json
|
|
188
|
+
{
|
|
189
|
+
"version": "1.0",
|
|
190
|
+
"generatedAt": "ISO timestamp",
|
|
191
|
+
"analyzedBy": "filter-workflow v1.0",
|
|
192
|
+
"techstack": {
|
|
193
|
+
"languages": ["typescript"],
|
|
194
|
+
"frameworks": ["nextjs", "tailwindcss"],
|
|
195
|
+
"databases": ["postgresql"],
|
|
196
|
+
"tools": ["docker", "github-actions"]
|
|
197
|
+
},
|
|
198
|
+
"skills": {
|
|
199
|
+
"enabled": ["react-patterns", "tailwind-patterns", "postgres-patterns", ...],
|
|
200
|
+
"disabled": ["flutter-patterns", "mobile-design", ...],
|
|
201
|
+
"userOverrides": {
|
|
202
|
+
"force-enabled": [],
|
|
203
|
+
"force-disabled": []
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"agents": {
|
|
207
|
+
"disabled": ["mobile-developer", "realtime-specialist", "queue-specialist"]
|
|
208
|
+
},
|
|
209
|
+
"futureTechstack": ["react-native", "kubernetes"]
|
|
210
|
+
}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### Step 7: Confirm
|
|
214
|
+
|
|
215
|
+
```markdown
|
|
216
|
+
## ✅ Workspace Profile Saved!
|
|
217
|
+
|
|
218
|
+
**File:** `.agent/profile.json`
|
|
219
|
+
|
|
220
|
+
**Summary:**
|
|
221
|
+
|
|
222
|
+
- Skills enabled: 15
|
|
223
|
+
- Skills disabled: 8
|
|
224
|
+
- Agents disabled: 3
|
|
225
|
+
- Future techstack tracked: 2
|
|
226
|
+
|
|
227
|
+
**Next steps:**
|
|
228
|
+
|
|
229
|
+
- Profile will be automatically loaded in subsequent sessions
|
|
230
|
+
- Run `/filter --reset` to re-enable all skills/agents
|
|
231
|
+
- Run `/filter` again when project adds new techstack
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## Output Format
|
|
237
|
+
|
|
238
|
+
Final result is the `profile.json` file saved to disk.
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## Exit Conditions
|
|
243
|
+
|
|
244
|
+
- User confirms and profile is saved successfully
|
|
245
|
+
- User cancels mid-process (no save)
|
|
246
|
+
- Error during analysis (report error, no save)
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## Command Variants
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
/filter # Full analysis and recommendation
|
|
254
|
+
/filter --reset # Reset to default (enable all)
|
|
255
|
+
/filter --force-enable <skill> # Force enable specific skill
|
|
256
|
+
/filter --force-disable <skill> # Force disable specific skill
|
|
257
|
+
/filter --dry-run # Show recommendations without saving
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
## Examples
|
|
263
|
+
|
|
264
|
+
### Example 1: Next.js + Tailwind Project
|
|
265
|
+
|
|
266
|
+
```
|
|
267
|
+
User: /filter
|
|
268
|
+
|
|
269
|
+
AI: [Step 1: scan-techstack...]
|
|
270
|
+
[Step 2: filter-skill...]
|
|
271
|
+
[Step 3: filter-agent...]
|
|
272
|
+
|
|
273
|
+
Detected: Next.js 14, TypeScript, Tailwind CSS, Prisma, PostgreSQL
|
|
274
|
+
|
|
275
|
+
Skills to ENABLE: react-patterns, tailwind-patterns, postgres-patterns
|
|
276
|
+
Skills to DISABLE: flutter-patterns, mobile-design, queue-patterns
|
|
277
|
+
|
|
278
|
+
Agents to DISABLE: mobile-developer, realtime-specialist, queue-specialist
|
|
279
|
+
|
|
280
|
+
User: yes, but in the future I might add mobile app
|
|
281
|
+
|
|
282
|
+
AI: [Save profile with futureTechstack: ["react-native"]]
|
|
283
|
+
[Keep mobile-developer enabled for future use]
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
### Example 2: Python ML Project
|
|
287
|
+
|
|
288
|
+
```
|
|
289
|
+
User: /filter
|
|
290
|
+
|
|
291
|
+
AI: [Analyze workspace...]
|
|
292
|
+
|
|
293
|
+
Detected: Python 3.11, Poetry, FastAPI, PostgreSQL, OpenAI
|
|
294
|
+
|
|
295
|
+
Skills to ENABLE: api-patterns, postgres-patterns, ai-rag-patterns
|
|
296
|
+
Skills to DISABLE: react-patterns, flutter-patterns, tailwind-patterns
|
|
297
|
+
|
|
298
|
+
Agents to ENABLE: ai-engineer, backend-specialist
|
|
299
|
+
Agents to DISABLE: frontend-specialist, mobile-developer
|
|
300
|
+
|
|
301
|
+
User: customize, I also need docker
|
|
302
|
+
|
|
303
|
+
AI: [Add docker-patterns to enabled]
|
|
304
|
+
[Keep devops-engineer enabled]
|
|
305
|
+
[Apply with user customization]
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
---
|
|
@@ -129,18 +129,39 @@ Agent activated → Check frontmatter `skills:` → Read SKILL.md → Apply.
|
|
|
129
129
|
## 🛠️ SKILL LOADING PROTOCOL
|
|
130
130
|
|
|
131
131
|
```
|
|
132
|
-
User Request → Skill Description Match → Load SKILL.md → Apply
|
|
132
|
+
User Request → Check Profile → Skill Description Match → Load SKILL.md → Apply
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Profile-Aware Loading
|
|
136
|
+
|
|
137
|
+
> **CRITICAL:** Before loading any skill or selecting any agent, check `.agent/profile.json`
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
1. Check if `.agent/profile.json` exists
|
|
141
|
+
2. If EXISTS:
|
|
142
|
+
- Read skills.enabled[] → Only load these skills
|
|
143
|
+
- Read skills.disabled[] → Skip these skills
|
|
144
|
+
- Read agents.disabled[] → Skip these agents
|
|
145
|
+
- Respect userOverrides.force-enabled/force-disabled
|
|
146
|
+
3. If NOT EXISTS:
|
|
147
|
+
- All skills/agents are ENABLED by default
|
|
148
|
+
- Behave as if no filtering is applied
|
|
133
149
|
```
|
|
134
150
|
|
|
135
151
|
### Core Skills (Always Available)
|
|
136
152
|
|
|
153
|
+
These skills are NEVER disabled regardless of profile:
|
|
154
|
+
|
|
137
155
|
- `clean-code` - Pragmatic coding standards (used by ALL agents)
|
|
138
156
|
- `testing-patterns` - Testing pyramid, AAA pattern
|
|
139
157
|
- `security-fundamentals` - OWASP 2025
|
|
158
|
+
- `brainstorming` - Socratic questioning protocol
|
|
159
|
+
- `plan-writing` - Task breakdown and WBS
|
|
160
|
+
- `systematic-debugging` - 4-phase debugging
|
|
140
161
|
|
|
141
162
|
### Domain Skills (39 total - see ARCHITECTURE.md)
|
|
142
163
|
|
|
143
|
-
Key skills: `api-patterns`, `database-design`, `react-patterns`, `typescript-patterns`, `docker-patterns`, `kubernetes-patterns`, `terraform-patterns`, `auth-patterns`, `graphql-patterns`, `redis-patterns`, `realtime-patterns`, `queue-patterns`, `multi-tenancy`, `ai-rag-patterns`, `prompt-engineering`, `monitoring-observability`, `frontend-design`, `mobile-design`, `tailwind-patterns`, `e2e-testing`, `performance-profiling`, `
|
|
164
|
+
Key skills: `api-patterns`, `database-design`, `react-patterns`, `typescript-patterns`, `docker-patterns`, `kubernetes-patterns`, `terraform-patterns`, `auth-patterns`, `graphql-patterns`, `redis-patterns`, `realtime-patterns`, `queue-patterns`, `multi-tenancy`, `ai-rag-patterns`, `prompt-engineering`, `monitoring-observability`, `frontend-design`, `mobile-design`, `tailwind-patterns`, `e2e-testing`, `performance-profiling`, `github-actions`, `gitlab-ci-patterns`
|
|
144
165
|
|
|
145
166
|
> 🔴 Full skill list: See `ARCHITECTURE.md` → Skills section
|
|
146
167
|
|