@neyugn/agent-kits 0.2.6 → 0.2.8
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 +102 -38
- package/common/skills/filter-agent/SKILL.md +194 -0
- package/common/skills/filter-skill/SKILL.md +158 -180
- 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 +131 -44
- package/dist/cli.js +30 -6
- 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 +1 -1
|
@@ -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()
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
description: Analyze workspace and enable/disable skills/agents based on techstack
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
# /filter - Workspace Skill Filtering
|
|
5
|
+
# /filter - Workspace Skill & Agent Filtering
|
|
6
6
|
|
|
7
7
|
## Trigger
|
|
8
8
|
|
|
@@ -10,7 +10,7 @@ User calls `/filter` or requests "filter skills", "optimize skills for this proj
|
|
|
10
10
|
|
|
11
11
|
## Agent
|
|
12
12
|
|
|
13
|
-
No specific agent required - this
|
|
13
|
+
No specific agent required - this workflow uses common skills.
|
|
14
14
|
|
|
15
15
|
## Prerequisites
|
|
16
16
|
|
|
@@ -19,18 +19,31 @@ No specific agent required - this skill is standalone.
|
|
|
19
19
|
## Critical Rules
|
|
20
20
|
|
|
21
21
|
1. **ALWAYS ASK** - Always ask user confirmation before applying changes
|
|
22
|
-
2. **NEVER DISABLE CORE** - Never disable core skills
|
|
23
|
-
3. **PERSIST RESULTS** - Save results to `.agent/
|
|
22
|
+
2. **NEVER DISABLE CORE** - Never disable core skills/agents
|
|
23
|
+
3. **PERSIST RESULTS** - Save results to `.agent/profile.json`
|
|
24
24
|
4. **ASK FUTURE STACK** - Ask user about planned future techstack additions
|
|
25
25
|
|
|
26
26
|
---
|
|
27
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
|
+
|
|
28
41
|
## Workflow Steps
|
|
29
42
|
|
|
30
|
-
### Step 1:
|
|
43
|
+
### Step 1: Scan Techstack
|
|
31
44
|
|
|
32
45
|
```
|
|
33
|
-
1. Read
|
|
46
|
+
1. Read scan-techstack SKILL.md to understand detection criteria
|
|
34
47
|
2. Scan workspace for config files:
|
|
35
48
|
- package.json, pubspec.yaml, pyproject.toml, Cargo.toml, go.mod
|
|
36
49
|
- next.config.*, vite.config.*, angular.json, nuxt.config.*
|
|
@@ -38,20 +51,39 @@ No specific agent required - this skill is standalone.
|
|
|
38
51
|
- .github/workflows/, .gitlab-ci.yml
|
|
39
52
|
- prisma/, drizzle.config.*, terraform/
|
|
40
53
|
3. Parse dependencies if package manager exists
|
|
41
|
-
4. Build techstack profile
|
|
54
|
+
4. Build techstack profile with categories:
|
|
55
|
+
- frontend, backend, mobile, database, devops, ai, realtime, queue
|
|
42
56
|
```
|
|
43
57
|
|
|
44
|
-
|
|
58
|
+
**Output:** TechstackProfile object
|
|
59
|
+
|
|
60
|
+
### Step 2: Filter Skills
|
|
45
61
|
|
|
46
62
|
```
|
|
47
|
-
1.
|
|
48
|
-
2.
|
|
49
|
-
3.
|
|
50
|
-
4. Identify skills to
|
|
51
|
-
5.
|
|
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
|
|
52
69
|
```
|
|
53
70
|
|
|
54
|
-
|
|
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
|
|
55
87
|
|
|
56
88
|
Display in this format:
|
|
57
89
|
|
|
@@ -69,7 +101,9 @@ Display in this format:
|
|
|
69
101
|
| Cache | Redis |
|
|
70
102
|
| CI/CD | GitHub Actions |
|
|
71
103
|
|
|
72
|
-
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
### 📚 Skill Recommendations
|
|
73
107
|
|
|
74
108
|
#### ✅ Skills to ENABLE:
|
|
75
109
|
|
|
@@ -92,76 +126,108 @@ Display in this format:
|
|
|
92
126
|
|
|
93
127
|
---
|
|
94
128
|
|
|
95
|
-
###
|
|
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:
|
|
96
154
|
|
|
97
155
|
1. **Do you agree with the changes above?** (yes/no/customize)
|
|
98
156
|
|
|
99
157
|
2. **Are there any techstacks you plan to add in the future?**
|
|
100
158
|
(e.g., mobile app, Kubernetes, different CI/CD...)
|
|
101
159
|
|
|
102
|
-
3. **Are there any skills you want to force enable or disable?**
|
|
160
|
+
3. **Are there any skills/agents you want to force enable or disable?**
|
|
103
161
|
(e.g., keep ai-rag-patterns even though not currently used)
|
|
104
162
|
```
|
|
105
163
|
|
|
106
|
-
### Step
|
|
164
|
+
### Step 5: Process User Response
|
|
107
165
|
|
|
108
166
|
```
|
|
109
167
|
Based on user answer:
|
|
110
168
|
|
|
111
169
|
If YES:
|
|
112
170
|
→ Apply all recommended changes
|
|
113
|
-
→ Save to
|
|
171
|
+
→ Save to profile.json
|
|
114
172
|
|
|
115
173
|
If NO / CUSTOMIZE:
|
|
116
174
|
→ Ask which changes to skip/modify
|
|
117
175
|
→ Apply only approved changes
|
|
118
|
-
→ Save to
|
|
176
|
+
→ Save to profile.json
|
|
119
177
|
|
|
120
178
|
If user mentions FUTURE techstack:
|
|
121
179
|
→ Add to futureTechstack array
|
|
122
|
-
→ Keep relevant skills enabled (don't disable)
|
|
180
|
+
→ Keep relevant skills/agents enabled (don't disable)
|
|
123
181
|
```
|
|
124
182
|
|
|
125
|
-
### Step
|
|
183
|
+
### Step 6: Save Profile
|
|
126
184
|
|
|
127
|
-
Create/Update `.agent/
|
|
185
|
+
Create/Update `.agent/profile.json`:
|
|
128
186
|
|
|
129
187
|
```json
|
|
130
188
|
{
|
|
131
189
|
"version": "1.0",
|
|
132
190
|
"generatedAt": "ISO timestamp",
|
|
133
|
-
"analyzedBy": "filter-
|
|
134
|
-
"techstack": {
|
|
191
|
+
"analyzedBy": "filter-workflow v1.0",
|
|
192
|
+
"techstack": {
|
|
193
|
+
"languages": ["typescript"],
|
|
194
|
+
"frameworks": ["nextjs", "tailwindcss"],
|
|
195
|
+
"databases": ["postgresql"],
|
|
196
|
+
"tools": ["docker", "github-actions"]
|
|
197
|
+
},
|
|
135
198
|
"skills": {
|
|
136
|
-
"enabled": [...],
|
|
137
|
-
"disabled": [...],
|
|
138
|
-
"userOverrides": {
|
|
199
|
+
"enabled": ["react-patterns", "tailwind-patterns", "postgres-patterns", ...],
|
|
200
|
+
"disabled": ["flutter-patterns", "mobile-design", ...],
|
|
201
|
+
"userOverrides": {
|
|
202
|
+
"force-enabled": [],
|
|
203
|
+
"force-disabled": []
|
|
204
|
+
}
|
|
139
205
|
},
|
|
140
206
|
"agents": {
|
|
141
|
-
"disabled": [
|
|
207
|
+
"disabled": ["mobile-developer", "realtime-specialist", "queue-specialist"]
|
|
142
208
|
},
|
|
143
|
-
"futureTechstack": [
|
|
209
|
+
"futureTechstack": ["react-native", "kubernetes"]
|
|
144
210
|
}
|
|
145
211
|
```
|
|
146
212
|
|
|
147
|
-
### Step
|
|
213
|
+
### Step 7: Confirm
|
|
148
214
|
|
|
149
215
|
```markdown
|
|
150
216
|
## ✅ Workspace Profile Saved!
|
|
151
217
|
|
|
152
|
-
**File:** `.agent/
|
|
218
|
+
**File:** `.agent/profile.json`
|
|
153
219
|
|
|
154
220
|
**Summary:**
|
|
155
221
|
|
|
156
222
|
- Skills enabled: 15
|
|
157
223
|
- Skills disabled: 8
|
|
158
|
-
- Agents disabled:
|
|
224
|
+
- Agents disabled: 3
|
|
159
225
|
- Future techstack tracked: 2
|
|
160
226
|
|
|
161
227
|
**Next steps:**
|
|
162
228
|
|
|
163
229
|
- Profile will be automatically loaded in subsequent sessions
|
|
164
|
-
- Run `/filter --reset` to re-enable all skills
|
|
230
|
+
- Run `/filter --reset` to re-enable all skills/agents
|
|
165
231
|
- Run `/filter` again when project adds new techstack
|
|
166
232
|
```
|
|
167
233
|
|
|
@@ -169,7 +235,7 @@ Create/Update `.agent/workspace-profile.json`:
|
|
|
169
235
|
|
|
170
236
|
## Output Format
|
|
171
237
|
|
|
172
|
-
Final result is the `
|
|
238
|
+
Final result is the `profile.json` file saved to disk.
|
|
173
239
|
|
|
174
240
|
---
|
|
175
241
|
|
|
@@ -181,6 +247,18 @@ Final result is the `workspace-profile.json` file saved to disk.
|
|
|
181
247
|
|
|
182
248
|
---
|
|
183
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
|
+
|
|
184
262
|
## Examples
|
|
185
263
|
|
|
186
264
|
### Example 1: Next.js + Tailwind Project
|
|
@@ -188,17 +266,21 @@ Final result is the `workspace-profile.json` file saved to disk.
|
|
|
188
266
|
```
|
|
189
267
|
User: /filter
|
|
190
268
|
|
|
191
|
-
AI: [
|
|
269
|
+
AI: [Step 1: scan-techstack...]
|
|
270
|
+
[Step 2: filter-skill...]
|
|
271
|
+
[Step 3: filter-agent...]
|
|
192
272
|
|
|
193
273
|
Detected: Next.js 14, TypeScript, Tailwind CSS, Prisma, PostgreSQL
|
|
194
274
|
|
|
195
|
-
|
|
196
|
-
|
|
275
|
+
Skills to ENABLE: react-patterns, tailwind-patterns, postgres-patterns
|
|
276
|
+
Skills to DISABLE: flutter-patterns, mobile-design, queue-patterns
|
|
197
277
|
|
|
198
|
-
|
|
278
|
+
Agents to DISABLE: mobile-developer, realtime-specialist, queue-specialist
|
|
279
|
+
|
|
280
|
+
User: yes, but in the future I might add mobile app
|
|
199
281
|
|
|
200
282
|
AI: [Save profile with futureTechstack: ["react-native"]]
|
|
201
|
-
[Keep mobile-
|
|
283
|
+
[Keep mobile-developer enabled for future use]
|
|
202
284
|
```
|
|
203
285
|
|
|
204
286
|
### Example 2: Python ML Project
|
|
@@ -210,12 +292,17 @@ AI: [Analyze workspace...]
|
|
|
210
292
|
|
|
211
293
|
Detected: Python 3.11, Poetry, FastAPI, PostgreSQL, OpenAI
|
|
212
294
|
|
|
213
|
-
|
|
214
|
-
|
|
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
|
|
215
300
|
|
|
216
|
-
User: customize,
|
|
301
|
+
User: customize, I also need docker
|
|
217
302
|
|
|
218
|
-
AI: [
|
|
303
|
+
AI: [Add docker-patterns to enabled]
|
|
304
|
+
[Keep devops-engineer enabled]
|
|
305
|
+
[Apply with user customization]
|
|
219
306
|
```
|
|
220
307
|
|
|
221
308
|
---
|