@codihaus/claude-skills 1.0.0

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.
Files changed (46) hide show
  1. package/README.md +167 -0
  2. package/bin/cli.js +58 -0
  3. package/package.json +46 -0
  4. package/skills/_quality-attributes.md +392 -0
  5. package/skills/_registry.md +189 -0
  6. package/skills/debrief/SKILL.md +647 -0
  7. package/skills/debrief/references/change-request-template.md +124 -0
  8. package/skills/debrief/references/file-patterns.md +173 -0
  9. package/skills/debrief/references/group-codes.md +72 -0
  10. package/skills/debrief/references/research-queries.md +106 -0
  11. package/skills/debrief/references/use-case-template.md +141 -0
  12. package/skills/debrief/scripts/generate_questionnaire.py +195 -0
  13. package/skills/dev-arch/SKILL.md +747 -0
  14. package/skills/dev-changelog/SKILL.md +378 -0
  15. package/skills/dev-coding/SKILL.md +470 -0
  16. package/skills/dev-coding-backend/SKILL.md +361 -0
  17. package/skills/dev-coding-frontend/SKILL.md +534 -0
  18. package/skills/dev-coding-frontend/references/nextjs.md +477 -0
  19. package/skills/dev-review/SKILL.md +548 -0
  20. package/skills/dev-scout/SKILL.md +723 -0
  21. package/skills/dev-scout/references/feature-patterns.md +210 -0
  22. package/skills/dev-scout/references/file-patterns.md +252 -0
  23. package/skills/dev-scout/references/tech-detection.md +211 -0
  24. package/skills/dev-scout/scripts/scout-analyze.sh +280 -0
  25. package/skills/dev-specs/SKILL.md +577 -0
  26. package/skills/dev-specs/references/checklist.md +176 -0
  27. package/skills/dev-specs/references/spec-templates.md +460 -0
  28. package/skills/dev-test/SKILL.md +364 -0
  29. package/skills/utils/diagram/SKILL.md +205 -0
  30. package/skills/utils/diagram/references/common-errors.md +305 -0
  31. package/skills/utils/diagram/references/diagram-types.md +636 -0
  32. package/skills/utils/docs-graph/SKILL.md +204 -0
  33. package/skills/utils/gemini/SKILL.md +292 -0
  34. package/skills/utils/gemini/scripts/gemini-scan.py +340 -0
  35. package/skills/utils/gemini/scripts/setup.sh +169 -0
  36. package/src/commands/add.js +64 -0
  37. package/src/commands/doctor.js +179 -0
  38. package/src/commands/init.js +251 -0
  39. package/src/commands/list.js +88 -0
  40. package/src/commands/remove.js +60 -0
  41. package/src/commands/update.js +72 -0
  42. package/src/index.js +26 -0
  43. package/src/utils/config.js +272 -0
  44. package/src/utils/deps.js +599 -0
  45. package/src/utils/skills.js +253 -0
  46. package/templates/CLAUDE.md.template +58 -0
@@ -0,0 +1,723 @@
1
+ ---
2
+ name: dev-scout
3
+ description: Explore and document existing codebases at various depths
4
+ version: 2.7.0
5
+ ---
6
+
7
+ # /dev-scout - Codebase Explorer
8
+
9
+ > **Skill Awareness**: See `skills/_registry.md` for all available skills.
10
+ > - **Before**: Use `/debrief` if requirements unclear
11
+ > - **After**: Use `/dev-specs` for implementation plans
12
+ > - **Utils**: `/utils/diagram` for architecture visualization
13
+
14
+ Explore and document codebases. Works at project level or per feature.
15
+
16
+ ## When to Use
17
+
18
+ - Understand existing codebase before adding features
19
+ - Document current state for team
20
+ - Analyze specific area before implementation
21
+ - Update scout after implementation
22
+
23
+ ## Usage
24
+
25
+ ```
26
+ /dev-scout # Project-level, medium mode
27
+ /dev-scout deep # Project-level, deep mode
28
+ /dev-scout auth # Feature-level (plans/features/auth/)
29
+ /dev-scout deep billing # Feature-level, deep mode
30
+ /dev-scout /path/to/code # Custom path
31
+ ```
32
+
33
+ ## Output Structure
34
+
35
+ Outputs to unified `plans/` structure:
36
+
37
+ ```
38
+ plans/
39
+ ├── scout/ # Project-level (/dev-scout)
40
+ │ ├── README.md # Current summary
41
+ │ ├── structure.md # File tree, tech stack
42
+ │ ├── features.md # Existing features
43
+ │ └── history/ # Previous snapshots
44
+ │ └── {date}.md
45
+
46
+ └── features/
47
+ └── {feature}/
48
+ ├── scout.md # Feature-level (/dev-scout {feature})
49
+ └── ...
50
+ ```
51
+
52
+ ## Modes
53
+
54
+ | Mode | What It Does | When to Use |
55
+ |------|--------------|-------------|
56
+ | **medium** (default) | Structure, files, UI inventory | Quick overview |
57
+ | **deep** | + API, models, logic, patterns | Before implementation |
58
+
59
+ ## Exploration Strategy
60
+
61
+ ### Large Codebase Strategy (500+ files)
62
+
63
+ For very large codebases, use `/utils/gemini` for initial scan:
64
+
65
+ ```
66
+ 1. Count files
67
+ → find . -type f | wc -l
68
+ → If 500+, use Gemini
69
+
70
+ 2. Run Gemini scan
71
+ → python skills/utils/gemini/scripts/gemini-scan.py \
72
+ --path . \
73
+ --output plans/scout/gemini-summary.md
74
+
75
+ 3. Read Gemini output
76
+ → Gemini provides: structure, patterns, key files
77
+
78
+ 4. Claude refines
79
+ → Deep dive on key files Gemini identified
80
+ → Add analysis and recommendations
81
+ → Create final scout.md
82
+ ```
83
+
84
+ **Why Gemini for large codebases?**
85
+ - Gemini Flash: 1M token context (can fit entire codebase)
86
+ - Claude: 200K context (may not fit all files)
87
+ - Gemini scans cheap/fast, Claude analyzes precisely
88
+
89
+ ### Parallel Directory Search
90
+
91
+ For medium codebases (100-500 files), use parallel exploration:
92
+
93
+ ```
94
+ Divide codebase into logical sections:
95
+ - Agent 1: src/app/, src/pages/ (routes & pages)
96
+ - Agent 2: src/components/, src/ui/ (UI components)
97
+ - Agent 3: src/lib/, src/utils/, src/services/ (utilities)
98
+ - Agent 4: src/api/, prisma/, db/ (backend)
99
+ ```
100
+
101
+ **When to use which strategy:**
102
+
103
+ | Files | Strategy |
104
+ |-------|----------|
105
+ | <50 | Sequential (simple) |
106
+ | 50-100 | Sequential or parallel |
107
+ | 100-500 | Parallel agents |
108
+ | 500+ | Gemini first, then focused Claude analysis |
109
+
110
+ **When to stay sequential:**
111
+ - Small codebases (<50 files)
112
+ - Feature-level scout (focused area)
113
+ - Simple structure
114
+
115
+ ### Priority Directories
116
+
117
+ Search high-value directories first based on task:
118
+
119
+ | Task | Priority Directories |
120
+ |------|---------------------|
121
+ | General overview | README, package.json, src/app/ |
122
+ | Feature analysis | Feature folder, related components, API routes |
123
+ | API understanding | api/, routes/, controllers/, services/ |
124
+ | Data model | prisma/, models/, schema/, types/ |
125
+ | UI inventory | components/, ui/, views/, pages/ |
126
+
127
+ ### Resilience
128
+
129
+ Handle exploration failures gracefully:
130
+
131
+ - **If a directory doesn't exist**: Skip, note in coverage
132
+ - **If file read fails**: Continue, mark as "unreadable"
133
+ - **If pattern returns nothing**: Try alternative patterns
134
+ - **If timeout on large dir**: Summarize what was found, note gap
135
+
136
+ Track coverage in output:
137
+ ```markdown
138
+ ## Coverage
139
+ | Area | Status | Notes |
140
+ |------|--------|-------|
141
+ | src/app/ | ✓ Complete | 45 files |
142
+ | src/lib/ | ✓ Complete | 12 files |
143
+ | src/legacy/ | ⚠ Partial | Timeout after 50 files |
144
+ | docs/ | ✗ Skipped | Directory not found |
145
+ ```
146
+
147
+ ## Workflow
148
+
149
+ ### Step 0: Check Documentation Graph
150
+
151
+ Before exploring code, check existing documentation context:
152
+
153
+ ```
154
+ 1. Read plans/docs-graph.json (if exists)
155
+ 2. Find related nodes:
156
+ - For feature scout: Find use cases, existing specs for that feature
157
+ - For project scout: Get overview of documented features
158
+ 3. Use relationships to focus exploration
159
+ ```
160
+
161
+ **How docs-graph helps:**
162
+
163
+ | Scout Type | Graph Provides |
164
+ |------------|----------------|
165
+ | Project | List of documented features, existing UCs to validate |
166
+ | Feature | Related use cases, specs, dependencies |
167
+
168
+ **Example: `/dev-scout auth`**
169
+ ```
170
+ From docs-graph.json:
171
+ - uc-auth-001 (Login) → focus on login flow
172
+ - uc-auth-002 (Signup) → focus on registration
173
+ - [[feature-billing]] referenced → check billing integration
174
+ ```
175
+
176
+ This context helps:
177
+ - Focus exploration on relevant areas
178
+ - Validate discovered features against documented UCs
179
+ - Find integration points via graph edges
180
+
181
+ ### Step 0.5: Initial Assessment
182
+
183
+ Before diving in, run quick assessment:
184
+
185
+ ```bash
186
+ # Option 1: Use scout-analyze script (recommended)
187
+ ./scripts/scout-analyze.sh . --check
188
+
189
+ # If tools missing, ask user:
190
+ # "Missing tools: tree, scc. Install for better analysis? (--install)"
191
+
192
+ # Run full analysis
193
+ ./scripts/scout-analyze.sh .
194
+ ```
195
+
196
+ ```bash
197
+ # Option 2: Manual (if script not available)
198
+ find . -type f | wc -l
199
+ ls -la && ls -d */
200
+ ```
201
+
202
+ **Determine strategy based on file count:**
203
+ | File Count | Strategy |
204
+ |------------|----------|
205
+ | <50 | Sequential, thorough |
206
+ | 50-200 | Sequential, prioritized |
207
+ | 200+ | Parallel exploration |
208
+
209
+ **Check for existing docs:**
210
+ - README.md → Project description
211
+ - CLAUDE.md → AI instructions, patterns
212
+ - docs/ → Additional documentation
213
+ - package.json / requirements.txt → Dependencies
214
+
215
+ ### Step 1: Determine Scope
216
+
217
+ **Project-level** (`/dev-scout`):
218
+ - Scans entire codebase
219
+ - Outputs to `plans/scout/`
220
+ - Creates history snapshot if scout exists
221
+
222
+ **Feature-level** (`/dev-scout auth`):
223
+ - Scans specific area only
224
+ - Outputs to `plans/features/auth/scout.md`
225
+ - Links to BRD use cases
226
+
227
+ ### Step 2: Check for Existing Scout
228
+
229
+ **If `plans/scout/` exists:**
230
+ 1. Move current README.md to `history/{date}.md`
231
+ 2. Create fresh analysis
232
+ 3. Note what changed since last scout
233
+
234
+ **If first scout:**
235
+ 1. Create `plans/scout/` folder
236
+ 2. Generate initial analysis
237
+
238
+ ### Step 3: Medium Mode Analysis
239
+
240
+ #### 3.1 Documentation Check
241
+
242
+ ```
243
+ Patterns:
244
+ - README.md, CLAUDE.md
245
+ - docs/**/*.md
246
+ - package.json, requirements.txt
247
+ ```
248
+
249
+ Extract:
250
+ - App description
251
+ - Tech stack
252
+ - Setup instructions
253
+
254
+ #### 3.2 File Structure Scan
255
+
256
+ ```
257
+ Get folder tree (depth 3):
258
+ - /src, /app, /pages
259
+ - /components, /views
260
+ - /lib, /utils
261
+ - /api, /server
262
+ ```
263
+
264
+ #### 3.3 Frontend File Inventory
265
+
266
+ See `references/file-patterns.md`:
267
+
268
+ ```
269
+ Include: **/*.vue, **/*.tsx, **/*.jsx
270
+ Exclude: node_modules/**, dist/**
271
+ ```
272
+
273
+ Group by:
274
+ - Pages/Routes → Screens
275
+ - Components → UI inventory
276
+ - Views → Layouts
277
+
278
+ #### 3.4 Feature Inference
279
+
280
+ See `references/feature-patterns.md`:
281
+
282
+ | Pattern | Feature |
283
+ |---------|---------|
284
+ | `auth/`, `login.*` | Authentication |
285
+ | `payment/`, `checkout/` | Payments |
286
+ | `dashboard/` | Dashboard |
287
+
288
+ #### 3.5 Tech Stack Detection
289
+
290
+ See `references/tech-detection.md`:
291
+
292
+ | File | Tech |
293
+ |------|------|
294
+ | `next.config.*` | Next.js |
295
+ | `prisma/schema.prisma` | Prisma |
296
+
297
+ ### Step 4: Deep Mode Analysis (if requested)
298
+
299
+ Additional to medium mode:
300
+
301
+ #### 4.1 API Analysis
302
+
303
+ ```
304
+ Patterns:
305
+ - **/api/**/*.ts
306
+ - **/routes/**/*.ts
307
+ ```
308
+
309
+ Document:
310
+ - Endpoints (method, path)
311
+ - Authentication requirements
312
+ - Patterns used
313
+
314
+ #### 4.2 Data Model Analysis
315
+
316
+ ```
317
+ Patterns:
318
+ - prisma/schema.prisma
319
+ - **/models/**/*.ts
320
+ ```
321
+
322
+ Document:
323
+ - Entities
324
+ - Relationships
325
+ - Key fields
326
+
327
+ #### 4.3 Code Pattern Identification
328
+
329
+ Read representative files for:
330
+ - State management
331
+ - API client patterns
332
+ - Authentication flow
333
+ - Error handling
334
+
335
+ #### 4.4 Project Conventions Detection
336
+
337
+ **Code Style** (read from config or infer from code):
338
+
339
+ ```
340
+ Check for configs:
341
+ - .eslintrc.* → Linting rules
342
+ - .prettierrc.* → Formatting
343
+ - tsconfig.json → TypeScript strictness
344
+ - .editorconfig → Tabs/spaces, line endings
345
+
346
+ Infer from code (sample 3-5 files):
347
+ - Naming: camelCase, PascalCase, snake_case
348
+ - File naming: Component.tsx vs component.tsx
349
+ - Import style: absolute (@/) vs relative (./)
350
+ - Quote style: single vs double
351
+ - Semicolons: yes/no
352
+ ```
353
+
354
+ **Git Conventions** (read from history):
355
+
356
+ ```bash
357
+ # Check commit style
358
+ git log --oneline -20
359
+
360
+ Detect patterns:
361
+ - Conventional commits? (feat:, fix:, chore:)
362
+ - Emoji commits? (✨, 🐛, 🔧)
363
+ - Ticket refs? (JIRA-123, #123)
364
+ - Simple messages? (no pattern)
365
+
366
+ # Check branch naming
367
+ git branch -a | head -20
368
+
369
+ Detect patterns:
370
+ - feature/*, bugfix/*, hotfix/*
371
+ - feat/*, fix/*
372
+ - username/feature-name
373
+ - No pattern
374
+ ```
375
+
376
+ **Project Conventions**:
377
+
378
+ ```
379
+ Check for:
380
+ - CLAUDE.md → AI instructions (HIGH VALUE)
381
+ - CONTRIBUTING.md → Team guidelines
382
+ - .github/PULL_REQUEST_TEMPLATE.md → PR format
383
+ - .github/ISSUE_TEMPLATE/* → Issue format
384
+
385
+ Document:
386
+ - How to name files
387
+ - How to structure components
388
+ - How to write tests
389
+ - PR/commit requirements
390
+ ```
391
+
392
+ ### Step 5: Generate Output
393
+
394
+ #### Project-Level Output
395
+
396
+ **plans/scout/README.md:**
397
+ ```markdown
398
+ # Codebase Analysis
399
+
400
+ > **Last Updated**: {date}
401
+ > **Mode**: Medium | Deep
402
+ > **Previous**: [→ history/]
403
+
404
+ ## Summary
405
+ {Brief description of the app}
406
+
407
+ ## Tech Stack
408
+ | Layer | Technology |
409
+ |-------|------------|
410
+ | Frontend | {framework} |
411
+ | Backend | {framework} |
412
+ | Database | {db} |
413
+ | Auth | {method} |
414
+
415
+ ## Conventions (deep mode)
416
+
417
+ ### Code Style
418
+ | Aspect | Convention |
419
+ |--------|------------|
420
+ | Naming | camelCase (variables), PascalCase (components) |
421
+ | File naming | kebab-case.tsx |
422
+ | Imports | Absolute (@/lib/*) |
423
+ | Quotes | Single |
424
+ | Semicolons | No |
425
+
426
+ ### Git Conventions
427
+ | Aspect | Convention |
428
+ |--------|------------|
429
+ | Commits | Conventional (feat:, fix:, chore:) |
430
+ | Branches | feature/*, bugfix/* |
431
+ | PR template | Yes (.github/PULL_REQUEST_TEMPLATE.md) |
432
+
433
+ ### Project Rules
434
+ {From CLAUDE.md or CONTRIBUTING.md}
435
+ - {Rule 1}
436
+ - {Rule 2}
437
+
438
+ ## Structure Overview
439
+ ```
440
+ src/
441
+ ├── app/ # {description}
442
+ ├── components/ # {description}
443
+ └── lib/ # {description}
444
+ ```
445
+
446
+ ## Existing Features
447
+ | Feature | Evidence | Confidence |
448
+ |---------|----------|------------|
449
+ | Auth | `app/auth/`, `LoginForm.tsx` | High |
450
+ | Dashboard | `app/dashboard/` | High |
451
+
452
+ ## Pages/Routes
453
+ | Path | File | Description |
454
+ |------|------|-------------|
455
+ | / | `app/page.tsx` | Home |
456
+ | /login | `app/login/page.tsx` | Login |
457
+
458
+ ## Components ({count})
459
+ {List key components}
460
+
461
+ ## API Endpoints (deep mode)
462
+ | Method | Path | Handler |
463
+ |--------|------|---------|
464
+ | GET | /api/users | users.list |
465
+
466
+ ## Integration Points
467
+ {How to connect new features}
468
+
469
+ ## Coverage
470
+ | Area | Status | Files | Notes |
471
+ |------|--------|-------|-------|
472
+ | src/app/ | ✓ | 45 | Routes, pages |
473
+ | src/components/ | ✓ | 32 | UI components |
474
+ | src/lib/ | ✓ | 8 | Utilities |
475
+
476
+ ## Gaps / Unresolved
477
+ - {Any areas not fully explored}
478
+ - {Questions for follow-up}
479
+
480
+ ## Notes
481
+ {Observations, potential issues}
482
+ ```
483
+
484
+ **plans/scout/structure.md:**
485
+ ```markdown
486
+ # File Structure
487
+
488
+ ## Directory Tree
489
+ ```
490
+ {full tree output}
491
+ ```
492
+
493
+ ## Key Directories
494
+ | Directory | Purpose | File Count |
495
+ |-----------|---------|------------|
496
+
497
+ ## Config Files
498
+ | File | Purpose |
499
+ |------|---------|
500
+ ```
501
+
502
+ **plans/scout/features.md:**
503
+ ```markdown
504
+ # Existing Features
505
+
506
+ ## Feature Inventory
507
+
508
+ ### {Feature 1}
509
+ - **Status**: Complete | Partial | Planned
510
+ - **Files**: {list}
511
+ - **Depends on**: {other features}
512
+
513
+ ### {Feature 2}
514
+ ...
515
+
516
+ ## Feature Relationships
517
+ ```mermaid
518
+ graph LR
519
+ Auth --> User
520
+ User --> Dashboard
521
+ Billing --> User
522
+ ```
523
+ ```
524
+
525
+ #### Feature-Level Output
526
+
527
+ **plans/features/{feature}/scout.md:**
528
+ ```markdown
529
+ # {Feature} - Scout Analysis
530
+
531
+ > **Date**: {date}
532
+ > **Mode**: Medium | Deep
533
+ > **Feature**: [[feature-{feature}]]
534
+ > **Related UCs**: [[uc-{group}-001]], [[uc-{group}-002]]
535
+
536
+ ## Summary
537
+ {What this feature does currently}
538
+
539
+ ## Files
540
+ | File | Purpose |
541
+ |------|---------|
542
+ | {path} | {description} |
543
+
544
+ ## Current Implementation
545
+ {How it works}
546
+
547
+ ## API Endpoints (if applicable)
548
+ | Method | Path | Description |
549
+ |--------|------|-------------|
550
+
551
+ ## Data Models (if applicable)
552
+ | Model | Fields | Relations |
553
+ |-------|--------|-----------|
554
+
555
+ ## Integration Points
556
+ {How to extend or modify}
557
+
558
+ ## For Implementation
559
+ - Entry point: {file}
560
+ - Key patterns: {patterns used}
561
+ - Dependencies: {what to be aware of}
562
+ ```
563
+
564
+ ### Step 6: Update History (project-level)
565
+
566
+ If updating existing scout:
567
+
568
+ 1. Move current to `history/{date}.md`
569
+ 2. In new README.md, add:
570
+
571
+ ```markdown
572
+ ## Changes Since Last Scout
573
+ - Added: {new files/features}
574
+ - Modified: {changed areas}
575
+ - Removed: {deleted items}
576
+ ```
577
+
578
+ ## Tools Used
579
+
580
+ | Tool | Purpose |
581
+ |------|---------|
582
+ | `Task` | Parallel exploration (Explore agents) |
583
+ | `Glob` | Find files by pattern |
584
+ | `Grep` | Search code patterns |
585
+ | `Read` | Read file contents |
586
+ | `Bash` | Directory listing, file counts |
587
+ | `Write` | Output files |
588
+ | `Playwright` | Capture UI screenshots |
589
+
590
+ ### Playwright for Visual Documentation
591
+
592
+ When scouting a web app, capture screenshots of key UI:
593
+
594
+ ```
595
+ 1. Start the dev server (if not running)
596
+ → Bash: npm run dev
597
+
598
+ 2. Navigate to app
599
+ → mcp__playwright__browser_navigate({ url: "http://localhost:3000" })
600
+
601
+ 3. Take screenshots of key pages
602
+ → mcp__playwright__browser_take_screenshot({
603
+ filename: "plans/scout/screenshots/home.png"
604
+ })
605
+
606
+ 4. Capture different states
607
+ → Login page
608
+ → Dashboard (if accessible)
609
+ → Key feature pages
610
+ ```
611
+
612
+ **When to capture UI:**
613
+ - Initial project scout (what does app look like?)
614
+ - Before major UI changes (for comparison)
615
+ - Feature scout (existing UI in that area)
616
+
617
+ **Output:**
618
+ ```
619
+ plans/scout/screenshots/
620
+ ├── home.png
621
+ ├── login.png
622
+ ├── dashboard.png
623
+ └── feature-{name}.png
624
+ ```
625
+
626
+ Include in scout.md:
627
+ ```markdown
628
+ ## Current UI
629
+
630
+ ### Home Page
631
+ ![Home](./screenshots/home.png)
632
+
633
+ ### Dashboard
634
+ ![Dashboard](./screenshots/dashboard.png)
635
+ ```
636
+
637
+ ### Parallel Exploration Example
638
+
639
+ For large codebases (200+ files), spawn parallel agents:
640
+
641
+ ```
642
+ Task 1 (Explore): "Search src/app/ and src/pages/ for route definitions, page components. List files with brief purpose."
643
+
644
+ Task 2 (Explore): "Search src/components/ for UI components. Group by type (forms, buttons, layouts, etc.)."
645
+
646
+ Task 3 (Explore): "Search src/lib/, src/utils/, src/services/ for utilities. Identify patterns, shared logic."
647
+
648
+ Task 4 (Explore): "Search api/, prisma/, db/ for backend code. Document endpoints, models."
649
+ ```
650
+
651
+ Synthesize results from all agents into unified scout output.
652
+
653
+ ## Tips
654
+
655
+ **General:**
656
+ - Run project-level scout first for overview
657
+ - Use feature-level before `/dev-specs`
658
+ - Update scout after major implementations
659
+ - History helps track codebase evolution
660
+
661
+ **For large codebases:**
662
+ - Start with Step 0 assessment to choose strategy
663
+ - Parallelize with 3-5 agents max (diminishing returns beyond)
664
+ - Focus deep analysis on areas relevant to task
665
+ - Accept partial coverage if codebase is huge - note gaps
666
+
667
+ **For monorepos:**
668
+ - Treat each package/app as separate scout target
669
+ - Document inter-package dependencies
670
+ - Use feature-level scout for specific packages
671
+
672
+ **Quality over speed:**
673
+ - Better to have thorough analysis of key areas than shallow scan of everything
674
+ - Flag uncertainties rather than guessing
675
+ - Include "Gaps / Unresolved" section honestly
676
+
677
+ ## Scripts
678
+
679
+ ### scout-analyze.sh
680
+
681
+ Quick codebase analysis with optional tool installation:
682
+
683
+ ```bash
684
+ # Check available tools
685
+ ./scripts/scout-analyze.sh . --check
686
+
687
+ # Run analysis with available tools
688
+ ./scripts/scout-analyze.sh /path/to/code
689
+
690
+ # Auto-install missing tools and analyze
691
+ ./scripts/scout-analyze.sh . --install
692
+
693
+ # Output as JSON (for parsing)
694
+ ./scripts/scout-analyze.sh . --json
695
+ ```
696
+
697
+ **Tools checked:**
698
+ | Tool | Purpose | Fallback |
699
+ |------|---------|----------|
700
+ | `tree` | Visual directory structure | `find -type d` |
701
+ | `scc` | Code stats (fast, accurate) | `wc -l` |
702
+ | `jq` | Parse JSON configs | `grep` |
703
+ | `rg` | Fast search | `grep -r` |
704
+
705
+ **Output includes:**
706
+ - File/directory counts
707
+ - Directory structure (depth 2)
708
+ - Code statistics by language
709
+ - Top file extensions
710
+ - Dependencies (package.json, requirements.txt, go.mod)
711
+ - Git activity (recent commits, active files, contributors)
712
+ - Config files detected
713
+
714
+ **Usage in workflow:**
715
+ 1. Run `./scripts/scout-analyze.sh . --check` in Step 0
716
+ 2. Offer user to install missing tools
717
+ 3. Run full analysis to inform exploration strategy
718
+
719
+ ## References
720
+
721
+ - `references/file-patterns.md` - Search patterns
722
+ - `references/feature-patterns.md` - Feature inference
723
+ - `references/tech-detection.md` - Tech stack detection