|
2 | 2 | name: acquire-codebase-knowledge |
3 | 3 | description: 'Use this skill when the user explicitly asks to map, document, or onboard into an existing codebase. Trigger for prompts like "map this codebase", "document this architecture", "onboard me to this repo", or "create codebase docs". Do not trigger for routine feature implementation, bug fixes, or narrow code edits unless the user asks for repository-level discovery.' |
4 | 4 | license: MIT |
5 | | -compatibility: 'Cross-platform. Preferred: run scripts/scan.sh with Bash. On Windows without Bash, run equivalent PowerShell discovery commands and keep the same output contract. Requires git and standard shell tooling.' |
| 5 | +compatibility: 'Cross-platform. Requires Python 3.8+ and git. Run scripts/scan.py from the target project root.' |
6 | 6 | metadata: |
7 | | - version: "1.2" |
| 7 | + version: "1.3" |
| 8 | + enhancements: |
| 9 | + - Multi-language manifest detection (25+ languages supported) |
| 10 | + - CI/CD pipeline detection (10+ platforms) |
| 11 | + - Container & orchestration detection |
| 12 | + - Code metrics by language |
| 13 | + - Security & compliance config detection |
| 14 | + - Performance testing markers |
8 | 15 | argument-hint: 'Optional: specific area to focus on, e.g. "architecture only", "testing and concerns"' |
9 | 16 | --- |
10 | 17 |
|
@@ -44,18 +51,17 @@ If the user supplies a focus area (for example: "architecture only" or "testing |
44 | 51 |
|
45 | 52 | ### Phase 1: Scan and Read Intent |
46 | 53 |
|
47 | | -1. Set `SKILL_ROOT` to the absolute path of the skill folder (the directory containing this `SKILL.md`), then run the bundled script from the **target project root**: |
| 54 | +1. Run the scan script from the target project root: |
48 | 55 | ```bash |
49 | | - export SKILL_ROOT="/absolute/path/to/skills/acquire-codebase-knowledge" |
50 | | - bash "$SKILL_ROOT/scripts/scan.sh" --output docs/codebase/.codebase-scan.txt |
| 56 | + python3 "$SKILL_ROOT/scripts/scan.py" --output docs/codebase/.codebase-scan.txt |
51 | 57 | ``` |
52 | | - Keep your working directory as the target repository root so the scan covers that codebase, not the skill folder itself. |
| 58 | + Where `$SKILL_ROOT` is the absolute path to the skill folder. Works on Windows, macOS, and Linux. |
53 | 59 |
|
54 | | - **Windows fallback (limited — use only if Bash is unavailable):** The following produces a file listing only and does **not** include manifest previews, git churn, TODO/FIXME counts, or environment variable templates. Downstream phases will have reduced context. |
55 | | - ```powershell |
56 | | - New-Item -ItemType Directory -Force -Path docs/codebase | Out-Null |
57 | | - Get-ChildItem -Recurse -File | Select-Object -First 200 FullName | Out-File docs/codebase/.codebase-scan.txt |
| 60 | + **Quick start:** If you have the path inline: |
| 61 | + ```bash |
| 62 | + python3 /absolute/path/to/skills/acquire-codebase-knowledge/scripts/scan.py --output docs/codebase/.codebase-scan.txt |
58 | 63 | ``` |
| 64 | + |
59 | 65 | 2. Search for `PRD`, `TRD`, `README`, `ROADMAP`, `SPEC`, `DESIGN` files and read them. |
60 | 66 | 3. Summarise the stated project intent before reading any source code. |
61 | 67 |
|
@@ -132,11 +138,26 @@ Validation pass criteria: |
132 | 138 |
|
133 | 139 | --- |
134 | 140 |
|
| 141 | +## Enhanced Scan Output Sections |
| 142 | + |
| 143 | +The `scan.py` script now produce the following sections in addition to the original output: |
| 144 | + |
| 145 | +- **CODE METRICS** — Total files, lines of code by language, largest files (complexity signals) |
| 146 | +- **CI/CD PIPELINES** — Detected GitHub Actions, GitLab CI, Jenkins, CircleCI, etc. |
| 147 | +- **CONTAINERS & ORCHESTRATION** — Docker, Docker Compose, Kubernetes, Vagrant configs |
| 148 | +- **SECURITY & COMPLIANCE** — Snyk, Dependabot, SECURITY.md, SBOM, security policies |
| 149 | +- **PERFORMANCE & TESTING** — Benchmark configs, profiling markers, load testing tools |
| 150 | + |
| 151 | +Use these sections during Phase 2 to inform investigation questions and identify tool-specific patterns. |
| 152 | + |
| 153 | +--- |
| 154 | + |
135 | 155 | ## Bundled Assets |
136 | 156 |
|
137 | 157 | | Asset | When to load | |
138 | 158 | |-------|-------------| |
139 | | -| [`scripts/scan.sh`](scripts/scan.sh) | Phase 1 — run first, before reading any code | |
| 159 | +| [`scripts/scan.py`](scripts/scan.py) | Phase 1 — run first, before reading any code (Python 3.8+ required) | |
| 160 | + |
140 | 161 | | [`references/inquiry-checkpoints.md`](references/inquiry-checkpoints.md) | Phase 2 — load for per-template investigation questions | |
141 | 162 | | [`references/stack-detection.md`](references/stack-detection.md) | Phase 2 — only if stack is ambiguous | |
142 | 163 | | [`assets/templates/STACK.md`](assets/templates/STACK.md) | Phase 3 step 1 | |
|
0 commit comments