@ngxtm/devkit 3.11.0 → 3.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cli/init.js CHANGED
@@ -87,7 +87,7 @@ function installForTool(toolId, tool, projectDir, options = {}) {
87
87
 
88
88
  // 1. Install core commands (if tool supports it) - optimized size ~400KB
89
89
  if (tool.commandsPath) {
90
- const coreCommandsDir = path.join(PACKAGE_ROOT, 'core-commands');
90
+ const coreCommandsDir = path.join(PACKAGE_ROOT, 'merged-commands');
91
91
  const commandsDir = path.join(targetDir, tool.commandsPath);
92
92
 
93
93
  if (fs.existsSync(coreCommandsDir)) {
package/cli/update.js CHANGED
@@ -58,7 +58,7 @@ function updateToolInstallation(toolId, tool, projectDir, options = {}) {
58
58
 
59
59
  // 1. Update core commands (if tool supports it) - optimized size ~400KB
60
60
  if (tool.commandsPath) {
61
- const coreCommandsDir = path.join(PACKAGE_ROOT, 'core-commands');
61
+ const coreCommandsDir = path.join(PACKAGE_ROOT, 'merged-commands');
62
62
  const commandsDir = path.join(targetDir, tool.commandsPath);
63
63
  if (fs.existsSync(coreCommandsDir)) {
64
64
  updatedCount += copyDir(coreCommandsDir, commandsDir);
@@ -1,476 +1,147 @@
1
1
  ---
2
2
  name: learn
3
- description: Interactive step-by-step learning mode. Teaches concepts from basics to advanced while solving real problems. Auto-detects language, verifies code at each step, creates markdown tutorials. Triggers on "/learn [topic]". Features: concept explanation, incremental coding with auto-verify, user checkpoints, optional quiz, saves tutorial to .claude/learn/.
3
+ description: Interactive learning mode. Teaches by doing with verified code, adaptive difficulty, and Socratic questioning.
4
+ argument-hint: [topic]
4
5
  ---
5
6
 
6
- # Learn Mode - Interactive Step-by-Step Learning
7
+ # Learn Mode v2.0
7
8
 
8
- > **Version 1.0.0** | Learn by Doing | Verified at Every Step
9
-
10
- ---
11
-
12
- ## Overview
13
-
14
- Learn Mode helps you understand concepts deeply while solving real problems. Instead of just giving you code, it:
15
-
16
- 1. Explains concepts from basics to advanced
17
- 2. Guides you through implementation step-by-step
18
- 3. Verifies code actually works at each step
19
- 4. Saves everything to a markdown tutorial for future reference
20
-
21
- ---
9
+ > Learn by doing. Verified at every step. Adapted to your level.
22
10
 
23
11
  ## Activation
24
12
 
25
- User invokes with: `/learn "topic or problem to solve"`
26
-
27
- Examples:
28
- - `/learn "implement debounce function in TypeScript"`
29
- - `/learn "add JWT authentication to Express API"`
30
- - `/learn "create custom React hook for form validation"`
13
+ `/learn "topic"` e.g., `/learn "JWT auth in Express"`, `/learn "React custom hooks"`
31
14
 
32
15
  ---
33
16
 
34
- ## Execution Flow
35
-
36
- ### Phase 0: INIT - Setup & Context Gathering
37
-
38
- **Actions:**
39
- 1. Create output directory if not exists: `.claude/learn/`
40
- 2. Generate filename: `YYYY-MM-DD-{topic-slug}.md`
41
- 3. Scan project for language detection:
42
- - Check for config files: `tsconfig.json`, `package.json`, `go.mod`, `Cargo.toml`, `requirements.txt`, `pyproject.toml`, `pom.xml`, `composer.json`, `Gemfile`, etc.
43
- - Identify primary language(s)
44
- 4. Set verify strategy based on detected language
45
- 5. Read relevant existing code for context
46
-
47
- **Language Detection & Verify Strategy:**
48
-
49
- | Language | Config Files | Verify Command |
50
- |----------|--------------|----------------|
51
- | TypeScript | `tsconfig.json`, `*.ts`, `*.tsx` | `npx tsc --noEmit` |
52
- | JavaScript | `package.json`, `*.js`, `*.mjs` | `node --check <file>` |
53
- | Python | `requirements.txt`, `pyproject.toml`, `*.py` | `python -m py_compile <file>` |
54
- | Go | `go.mod`, `*.go` | `go build ./...` |
55
- | Rust | `Cargo.toml`, `*.rs` | `cargo check` |
56
- | Java | `pom.xml`, `build.gradle`, `*.java` | `javac <file>` or `./gradlew compileJava` |
57
- | C# | `*.csproj`, `*.cs` | `dotnet build --no-restore` |
58
- | PHP | `composer.json`, `*.php` | `php -l <file>` |
59
- | Ruby | `Gemfile`, `*.rb` | `ruby -c <file>` |
60
- | Shell | `*.sh`, `*.bash` | `bash -n <file>` |
61
- | C/C++ | `Makefile`, `CMakeLists.txt`, `*.c`, `*.cpp` | `make` or `cmake --build .` |
62
-
63
- **If multiple languages detected:** Ask user which one to use for this session.
64
- **If no language detected:** Ask user to specify.
65
-
66
- **Markdown Header (write to file):**
67
- ```markdown
68
- # Learn: {Topic}
69
-
70
- > Generated: {YYYY-MM-DD HH:MM}
71
- > Language: {detected_language}
72
- > Project: {project_name}
73
-
74
- ---
75
- ```
76
-
77
- ---
78
-
79
- ### Phase 1: CONCEPT - Knowledge Foundation
80
-
81
- **Goal:** Explain the underlying concepts before writing any code.
17
+ ## Phase 1: INIT (auto, no user interaction needed)
82
18
 
83
- **Actions:**
84
- 1. Break down the topic into fundamental concepts
85
- 2. Explain each concept clearly:
86
- - What is it?
87
- - Why does it exist? What problem does it solve?
88
- - How does it work (high-level)?
89
- - Real-world analogies if helpful
90
- 3. Compare with related concepts (if applicable)
91
- - e.g., debounce vs throttle
92
- - e.g., JWT vs session-based auth
93
- 4. Show simple diagrams using ASCII if helpful
19
+ 1. **Resume check**: Look in `learn/` for existing file matching topic. If found, read its YAML frontmatter and offer to resume from last checkpoint via `AskUserQuestion`.
94
20
 
95
- **Write to markdown:**
96
- ```markdown
97
- ## 1. Concepts
21
+ 2. **Language detection**: Scan project for config files to identify primary language.
98
22
 
99
- ### What is {topic}?
100
- {explanation}
23
+ | Language | Config Files | Verify: Syntax | Verify: Run/Test |
24
+ |----------|-------------|----------------|------------------|
25
+ | TypeScript | tsconfig.json | `npx tsc --noEmit` | `npx tsx <file>` |
26
+ | JavaScript | package.json, *.mjs | `node --check <file>` | `node <file>` |
27
+ | Python | pyproject.toml, requirements.txt | `python -m py_compile <file>` | `python <file>` |
28
+ | Go | go.mod | `go build ./...` | `go test ./...` |
29
+ | Rust | Cargo.toml | `cargo check` | `cargo test` |
30
+ | Java | pom.xml, build.gradle | `javac <file>` | `./gradlew test` |
31
+ | Kotlin | build.gradle.kts | `kotlinc <file>` | `./gradlew test` |
32
+ | C#/Unity | *.csproj, *.sln | `dotnet build` | `dotnet test` |
33
+ | Dart/Flutter | pubspec.yaml | `dart analyze` | `flutter test` |
34
+ | Swift | Package.swift | `swift build` | `swift test` |
35
+ | PHP | composer.json | `php -l <file>` | `php <file>` |
36
+ | Ruby | Gemfile | `ruby -c <file>` | `ruby <file>` |
37
+ | Elixir | mix.exs | `mix compile` | `mix test` |
38
+ | Zig | build.zig | `zig build` | `zig build test` |
39
+ | Lua | *.lua | `luac -p <file>` | `lua <file>` |
40
+ | Shell | *.sh | `bash -n <file>` | `bash <file>` |
41
+ | C/C++ | Makefile, CMakeLists.txt | `make` | `make test` |
101
42
 
102
- ### Why use {topic}?
103
- {use cases and benefits}
43
+ If multiple detected → ask user. If none → ask user.
104
44
 
105
- ### How it works
106
- {mechanism explanation}
45
+ 3. **Codebase scan**: Read key project files (entry points, configs, existing code related to topic) for context. Use project's conventions in all examples.
107
46
 
108
- ### Related Concepts
109
- | Concept A | Concept B |
110
- |-----------|-----------|
111
- | ... | ... |
47
+ 4. **Mode from codingLevel** (read from `.claude/.ck.json`):
48
+ - Level 0-1 **Deep**: full concepts, analogies, Socratic questions at every step
49
+ - Level 2-3 → **Standard**: concepts + code, balanced explanations
50
+ - Level 4-5 → **Quick**: minimal explanation, jump straight to code
51
+ - Not set → ask user with `AskUserQuestion`
112
52
 
53
+ 5. **Create output file**: `learn/{YYYY-MM-DD}-{topic-slug}.md` with YAML frontmatter:
54
+ ```yaml
113
55
  ---
114
- ```
115
-
116
- **User Checkpoint:**
117
- ```
118
- Phase 1/5: CONCEPT complete.
119
-
120
- Do you understand these concepts?
121
- [ ] Yes, continue to planning
122
- [ ] Need more explanation (specify what)
123
- ```
124
-
125
- **STOP and wait for user response before proceeding.**
126
-
127
- ---
128
-
129
- ### Phase 2: PLAN - Implementation Strategy
130
-
131
- **Goal:** Create a clear, step-by-step implementation plan.
132
-
133
- **Actions:**
134
- 1. Break implementation into small, verifiable steps (3-7 steps typically)
135
- 2. Each step should:
136
- - Have a clear goal
137
- - Be independently verifiable
138
- - Build on previous steps
139
- 3. Identify files to create/modify
140
- 4. Note any dependencies needed
141
-
142
- **Write to markdown:**
143
- ```markdown
144
- ## 2. Implementation Plan
145
-
146
- ### Files
147
- - `{path/to/file1}` - {purpose}
148
- - `{path/to/file2}` - {purpose}
149
-
150
- ### Steps
151
- 1. **{Step 1 title}** - {brief description}
152
- 2. **{Step 2 title}** - {brief description}
153
- 3. **{Step 3 title}** - {brief description}
154
- ...
155
-
156
- ### Dependencies
157
- - {dependency 1} - {why needed}
158
- - {dependency 2} - {why needed}
159
-
56
+ topic: "{topic}"
57
+ language: {detected}
58
+ phase: INIT
59
+ step: 0
60
+ total_steps: 0
61
+ mode: {deep|standard|quick}
62
+ started: {ISO timestamp}
63
+ updated: {ISO timestamp}
160
64
  ---
161
65
  ```
162
66
 
163
- **User Checkpoint:**
164
- ```
165
- Phase 2/5: PLAN complete.
166
-
167
- Ready to start coding?
168
- [ ] Yes, let's code
169
- [ ] Modify plan (specify changes)
170
- ```
171
-
172
- **STOP and wait for user response before proceeding.**
173
-
174
67
  ---
175
68
 
176
- ### Phase 3: CODE + VERIFY - Incremental Implementation
69
+ ## Phase 2: LEARN (skip entirely in Quick mode)
177
70
 
178
- **Goal:** Implement each step, verify it works, ensure user understands.
71
+ 1. **WebSearch** official docs: `WebSearch("{topic} {language} official documentation")`, then `WebFetch` the most relevant result. Cite sources in tutorial.
179
72
 
180
- **For each step in the plan:**
73
+ 2. **Socratic opening** (Deep/Standard): Before explaining, ask user via `AskUserQuestion`:
74
+ > "Before I explain — what do you think {concept} does and why it's useful?"
75
+ Then build on their answer.
181
76
 
182
- #### 3.1 Explain Before Coding
183
- - What we're about to do
184
- - Why we're doing it this way
185
- - Key things to understand
77
+ 3. **Explain concepts** using the project's actual code as examples where possible. Cover: what it is, why it exists, how it works.
186
78
 
187
- #### 3.2 Write the Code
188
- - Write complete, working code (no placeholders)
189
- - Include all necessary imports
190
- - Add inline comments explaining non-obvious parts
191
- - Use Edit tool to modify existing files, Write for new files
79
+ 4. **Checkpoint**: `AskUserQuestion` — "Concepts clear? Continue to building?"
192
80
 
193
- #### 3.3 Auto-Verify
194
- Run the appropriate verify command:
195
- ```bash
196
- # Execute verify command based on language
197
- {verify_command}
198
- ```
199
-
200
- **If verify FAILS:**
201
- 1. Analyze the error
202
- 2. Explain what went wrong (teaching moment)
203
- 3. Fix the code
204
- 4. Re-verify
205
- 5. Repeat until pass
206
-
207
- **If verify PASSES:** Continue to user checkpoint.
208
-
209
- #### 3.4 Write to Markdown
210
- ```markdown
211
- ### Step {N}: {Title}
212
-
213
- **Goal:** {what this step accomplishes}
214
-
215
- **Why:** {explanation of approach}
216
-
217
- **Code:**
218
- ```{language}
219
- {code with comments}
220
- ```
221
-
222
- **Key Points:**
223
- - {important thing 1}
224
- - {important thing 2}
225
-
226
- **Verify:** {verify_command} - PASSED
81
+ Update frontmatter: `phase: LEARN`
227
82
 
228
83
  ---
229
- ```
230
-
231
- #### 3.5 User Checkpoint
232
- ```
233
- Step {N}/{total} complete and verified.
234
-
235
- [ ] Understood, next step
236
- [ ] Need more explanation
237
- [ ] Code doesn't work on my machine (paste error)
238
- ```
239
84
 
240
- **If user reports error:**
241
- 1. Ask for the error message
242
- 2. Debug and fix
243
- 3. Re-verify locally
244
- 4. Update the markdown with the fix
85
+ ## Phase 3: BUILD (core phase)
245
86
 
246
- **STOP and wait for user response before next step.**
87
+ 1. **Plan steps**: Break implementation into 3-7 verifiable steps. Show plan to user.
247
88
 
248
- ---
249
-
250
- ### Phase 4: SUMMARY - Knowledge Consolidation
89
+ 2. **For each step**:
251
90
 
252
- **Goal:** Reinforce learning with summary and best practices.
91
+ a. **Explain** what we're doing and why (skip in Quick mode)
253
92
 
254
- **Actions:**
255
- 1. Summarize what was built
256
- 2. List key takeaways
257
- 3. Document common mistakes to avoid
258
- 4. Suggest next steps for deeper learning
93
+ b. **Write real code** — no placeholders, no pseudocode. Use project conventions. Use `Edit` for existing files, `Write` for new files.
259
94
 
260
- **Write to markdown:**
261
- ```markdown
262
- ## 4. Summary
95
+ c. **Tiered verify**:
96
+ - Always: run syntax check command from table above
97
+ - When possible: run the code
98
+ - If test framework detected: write/run a test
263
99
 
264
- ### What We Built
265
- {summary of implementation}
100
+ d. **Socratic** (Deep mode only): Ask "Why did we use X instead of Y?" via `AskUserQuestion`
266
101
 
267
- ### Key Takeaways
268
- 1. {takeaway 1}
269
- 2. {takeaway 2}
270
- 3. {takeaway 3}
102
+ e. **Checkpoint**: `AskUserQuestion` — "Step {N}/{total} verified. Understood?"
103
+ - If user reports error → debug, fix, re-verify, update tutorial
104
+ - If user needs explanation → explain, then continue
271
105
 
272
- ### Common Mistakes to Avoid
273
- - {mistake 1} - {why it's bad}
274
- - {mistake 2} - {why it's bad}
106
+ f. **Write to tutorial file**: step title, explanation, code, key points, verify result
275
107
 
276
- ### Next Steps
277
- - {suggestion for further learning 1}
278
- - {suggestion for further learning 2}
108
+ Update frontmatter: `phase: BUILD`, `step: {N}`, `total_steps: {total}`
279
109
 
280
110
  ---
281
- ```
282
111
 
283
- **User Checkpoint:**
284
- ```
285
- Phase 4/5: SUMMARY complete.
112
+ ## Phase 4: WRAP-UP
286
113
 
287
- Would you like to take a quiz to reinforce learning?
288
- [ ] Yes, quiz me
289
- [ ] No, finish up
290
- ```
291
-
292
- ---
114
+ 1. **Summary**: What was built, key takeaways (3-5 points)
293
115
 
294
- ### Phase 5: QUIZ (Optional)
116
+ 2. **Quiz** (optional): Ask user via `AskUserQuestion` if they want a quiz.
117
+ If yes: 3-4 questions (conceptual, code reading, debugging). Use `AskUserQuestion` for each.
295
118
 
296
- **Goal:** Test understanding with practical questions.
119
+ 3. **Save tutorial**: Finalize the markdown file. Update frontmatter: `phase: COMPLETE`
297
120
 
298
- **Only if user opted in.**
121
+ 4. **Next topics**: Suggest 2-3 related topics to learn next.
299
122
 
300
- **Question Types:**
301
- 1. **Conceptual:** Test understanding of the "why"
302
- 2. **Code Reading:** Given code, predict behavior
303
- 3. **Code Writing:** Small exercise to implement variation
304
- 4. **Debugging:** Find the bug in given code
305
-
306
- **Format:**
307
- ```
308
- QUIZ MODE
309
-
310
- Q1 (Conceptual): {question}
311
-
312
- Your answer: [wait for user]
313
-
314
- ---
315
-
316
- Correct answer: {answer}
317
- Explanation: {why}
318
-
319
- Score: {X}/4
320
- ```
321
-
322
- **Write to markdown:**
323
- ```markdown
324
- ## 5. Quiz
325
-
326
- <details>
327
- <summary>Q1: {question}</summary>
328
-
329
- **Answer:** {answer}
330
-
331
- **Explanation:** {explanation}
332
- </details>
333
-
334
- <details>
335
- <summary>Q2: {question}</summary>
336
- ...
337
- </details>
338
-
339
- ---
340
- ```
341
-
342
- ---
343
-
344
- ### Phase 6: COMPLETE
345
-
346
- **Actions:**
347
- 1. Finalize markdown file
348
- 2. Display completion message
349
-
350
- **Add to markdown:**
351
- ```markdown
352
- ---
353
-
354
- > Tutorial completed: {timestamp}
355
- > Total steps: {N}
356
- > All code verified and working
357
-
358
- Happy coding!
359
- ```
360
-
361
- **Display to user:**
362
- ```
363
- LEARN MODE COMPLETE
364
-
365
- Tutorial saved: .claude/learn/{filename}.md
366
- You can review this file anytime to refresh your knowledge.
367
-
368
- What you learned:
369
- - {concept 1}
370
- - {concept 2}
371
- - {concept 3}
372
-
373
- Great job!
374
- ```
375
-
376
- ---
377
-
378
- ## Error Handling
379
-
380
- ### Verify Command Not Available
381
- If the verify command fails because tool is not installed:
382
- 1. Inform user: "Verify tool not available: {command}"
383
- 2. Ask: "Install it now, or proceed with manual verification?"
384
- 3. If install: run appropriate install command
385
- 4. If manual: ask user to confirm code works after each step
386
-
387
- ### User Reports Code Doesn't Work
388
- 1. Ask for exact error message
389
- 2. Ask for their environment (OS, versions)
390
- 3. Debug systematically
391
- 4. Update tutorial with fix
392
- 5. Add to "Common Issues" section in markdown
393
-
394
- ### Language Not Detected
395
- 1. List common languages
396
- 2. Ask user to specify
397
- 3. Set verify strategy accordingly
123
+ Display: `Tutorial saved: learn/{filename}.md`
398
124
 
399
125
  ---
400
126
 
401
127
  ## Principles
402
128
 
403
- 1. **No code without understanding** - Always explain before implementing
404
- 2. **Verify everything** - Never assume code works, always test
405
- 3. **Fix before proceed** - Don't move on until current step works
406
- 4. **User controls pace** - Always checkpoint before next phase
407
- 5. **Document for future** - Create reusable tutorial
408
- 6. **Basics to advanced** - Start simple, build up complexity
409
- 7. **Real working code** - No pseudocode, no placeholders
129
+ 1. **Verify everything** never assume code works
130
+ 2. **Real code only** no placeholders, no pseudocode
131
+ 3. **User controls pace** always checkpoint before proceeding
132
+ 4. **Teach with their code** use project's actual codebase, not generic examples
410
133
 
411
134
  ---
412
135
 
413
- ## Example Session
414
-
415
- ```
416
- User: /learn "implement debounce in TypeScript"
417
-
418
- [INIT]
419
- Detected: TypeScript (tsconfig.json found)
420
- Verify command: npx tsc --noEmit
421
- Creating: .claude/learn/2024-02-06-debounce-typescript.md
422
-
423
- [CONCEPT]
424
- Debounce is a technique that delays executing a function until
425
- after a specified time has passed since the last call...
426
- [detailed explanation]
427
-
428
- Ready to continue? [Yes/Explain more]
429
-
430
- User: Yes
431
-
432
- [PLAN]
433
- Step 1: Create utils/debounce.ts with basic structure
434
- Step 2: Implement core debounce logic
435
- Step 3: Add TypeScript generics for type safety
436
- Step 4: Write unit tests
437
-
438
- Ready to code? [Yes/Modify plan]
439
-
440
- User: Yes
441
-
442
- [CODE Step 1/4]
443
- Creating utils/debounce.ts...
444
- [code with explanation]
445
-
446
- Verifying: npx tsc --noEmit
447
- PASSED
448
-
449
- Understood? [Yes/Explain more/Error on my machine]
450
-
451
- User: Yes
452
-
453
- [CODE Step 2/4]
454
- ...
455
-
456
- [After all steps]
457
-
458
- [SUMMARY]
459
- Key takeaways:
460
- 1. Debounce delays execution until activity stops
461
- 2. clearTimeout prevents stale callbacks
462
- 3. Generics preserve function type signatures
463
-
464
- Quiz? [Yes/No]
465
-
466
- User: No
136
+ ## Error Handling
467
137
 
468
- COMPLETE
469
- Tutorial saved: .claude/learn/2024-02-06-debounce-typescript.md
470
- ```
138
+ - **Verify tool missing**: Ask user to install or switch to manual verification
139
+ - **Code doesn't work on user's machine**: Get error message, debug, fix, re-verify, update tutorial
140
+ - **Language not detected**: Ask user to specify, set verify strategy accordingly
471
141
 
472
142
  ---
473
143
 
474
144
  ## Version History
475
145
 
476
- - **1.0.0** - Initial release with full interactive learning flow
146
+ - **2.0.0** - Rewrite: adaptive difficulty via codingLevel, 4 phases, WebSearch, Socratic method, resume support, tiered verify, 17 languages, codebase-aware
147
+ - **1.0.0** - Initial release
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ngxtm/devkit",
3
- "version": "3.11.0",
3
+ "version": "3.11.1",
4
4
  "description": "Per-project AI skills with smart tech detection - lightweight and context-optimized",
5
5
  "main": "cli/index.js",
6
6
  "bin": {
@@ -38,7 +38,6 @@ const MERGE_STRATEGY = {
38
38
  'journal.md': 'claudekit',
39
39
  'kanban.md': 'claudekit',
40
40
  'preview.md': 'claudekit',
41
- 'scout.md': 'claudekit',
42
41
  'use-mcp.md': 'claudekit',
43
42
  'watzup.md': 'claudekit',
44
43
  'worktree.md': 'claudekit',
@@ -1,35 +0,0 @@
1
- ---
2
- description: ⚡ Use external agentic tools to scout given directories
3
- argument-hint: [user-prompt] [scale]
4
- ---
5
-
6
- ## Purpose
7
-
8
- Utilize external agentic tools to scout given directories or explore the codebase for files needed to complete the task using a fast, token efficient agent.
9
-
10
- ## Variables
11
-
12
- USER_PROMPT: $1
13
- SCALE: $2 (defaults to 3)
14
- RELEVANT_FILE_OUTPUT_DIR: Use `Report:` from `## Naming` section
15
-
16
- ## Workflow:
17
- - Write a prompt for 'SCALE' number of agents to the `Task` tool that will immediately call the `Bash` tool to run these commands to kick off your agents to conduct the search:
18
- - `gemini -p "[prompt]" --model gemini-2.5-flash-preview-09-2025` (if count <= 3)
19
- - `opencode run "[prompt]" --model opencode/grok-code` (if count > 3 and count < 6)
20
- - if count >= 6, spawn `Explore` subagents to search the codebase in parallel
21
-
22
- **Why use external agentic tools?**
23
- - External agentic tools are faster and more efficient when using LLMs with large context windows (1M+ tokens).
24
-
25
- **How to prompt the agents:**
26
- - If `gemini` or `opencode` is not available, ask the user if they want to install it:
27
- - If **yes**, install it (if there are permission issues, instruct the user to install it manually, including authentication steps)
28
- - If **no**, use the default `Explore` subagents.
29
- - IMPORTANT: Kick these agents off in parallel using the `Task` tool, analyze and divide folders for each agent to scout intelligently and quickly.
30
- - IMPORTANT: These agents are calling OTHER agentic coding tools to search the codebase. DO NOT call any search tools yourself.
31
- - IMPORTANT: That means with the `Task` tool, you'll immediately call the Bash tool to run the respective agentic coding tool (gemini, opencode, claude, etc.)
32
- - IMPORTANT: Instruct the agents to quickly search the codebase for files needed to complete the task. This isn't about a full blown search, just a quick search to find the files needed to complete the task.
33
- - Instruct the subagent to use a timeout of 3 minutes for each agent's bash call. Skip any agents that don't return within the timeout, don't restart them.
34
- - **IMPORTANT:** Sacrifice grammar for the sake of concision when writing reports.
35
- - **IMPORTANT:** In reports, list any unresolved questions at the end, if any.
@@ -1,28 +0,0 @@
1
- ---
2
- description: ⚡⚡ Scout given directories to respond to the user's requests
3
- argument-hint: [user-prompt] [scale]
4
- ---
5
-
6
- ## Purpose
7
-
8
- Search the codebase for files needed to complete the task using a fast, token efficient agent.
9
-
10
- ## Variables
11
-
12
- USER_PROMPT: $1
13
- SCALE: $2 (defaults to 3)
14
- REPORT_OUTPUT_DIR: Use `Report:` from `## Naming` section
15
-
16
- ## Workflow:
17
-
18
- - Write a prompt for 'SCALE' number of agents to the `Task` tool that will immediately call the `Bash` tool to run these commands to kick off your agents to conduct the search: spawn many `Explore` subagents to search the codebase in parallel based on the user's prompt.
19
-
20
- **How to prompt the agents:**
21
- - IMPORTANT: Kick these agents off in parallel using the `Task` tool, analyze and divide folders for each agent to scout intelligently and quickly.
22
- - IMPORTANT: Instruct the agents to quickly search the codebase for files needed to complete the task. This isn't about a full blown search, just a quick search to find the files needed to complete the task.
23
- - Instruct the subagent to use a timeout of 3 minutes for each agent's bash call. Skip any agents that don't return within the timeout, don't restart them.
24
-
25
- **How to write reports:**
26
-
27
- - **IMPORTANT:** Sacrifice grammar for the sake of concision when writing reports.
28
- - **IMPORTANT:** In reports, list any unresolved questions at the end, if any.