Help us improve
Share bugs, ideas, or general feedback.
From harness-engineering
Maps codebase structure, patterns, symbols, and dependencies using ast-grep and bash scripts. Outputs factual maps with paths/line numbers to .artifacts/research/.
npx claudepluginhub alchemiststudiosdotai/harness-engineeringHow this skill is triggered — by the user, by Claude, or both
Slash command
/harness-engineering:research-phaseThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Map and document codebase structure using structural analysis. This skill produces **factual maps only**—no suggestions, no recommendations, no opinions. Document what exists, where it lives, and how it connects.
Explores local codebases read-only: discovers files/symbols, traces flows, summarizes architecture/patterns/tooling/dependencies for pre-implementation context.
Explores project structure, configurations, code patterns, conventions, tests, and dependencies before modifying existing code to understand context and avoid bugs.
Maps unfamiliar codebases in phases: structure, entry points, data flow, patterns, landmines. Use before coding in new, inherited, or revisited projects.
Share bugs, ideas, or general feedback.
Map and document codebase structure using structural analysis. This skill produces factual maps only—no suggestions, no recommendations, no opinions. Document what exists, where it lives, and how it connects.
Map, don't suggest. The output is a structural map that another developer (or Claude instance) can use to navigate the codebase. Include:
Exclude:
scripts/ast-scan.sh - Structural Pattern ScannerFind code patterns using ast-grep.
# Scan for all function definitions
scripts/ast-scan.sh functions src/
# Find all class definitions
scripts/ast-scan.sh classes
# Find all exports
scripts/ast-scan.sh exports lib/
# Find API routes
scripts/ast-scan.sh routes
# Available patterns: functions, classes, exports, imports, types, components, routes, handlers, all
scripts/structure-map.sh - Directory TreeGenerate filtered directory structure.
# Basic tree (auto-filters node_modules, .git, etc.)
scripts/structure-map.sh ./
# Limit depth
scripts/structure-map.sh ./ --depth 3
# Code files only
scripts/structure-map.sh src/ --code-only
# Include file counts
scripts/structure-map.sh ./ --with-stats
scripts/symbol-index.sh - Public Symbol IndexExtract all exported/public symbols.
# Index all exports
scripts/symbol-index.sh src/
# Shows: exported functions, classes, types, interfaces, constants
scripts/dependency-graph.sh - Import TracerMap dependency relationships.
# Show all imports
scripts/dependency-graph.sh src/
# Trace specific file's dependencies
scripts/dependency-graph.sh ./ --file src/core/auth.ts
# Shows: what it imports + what imports it
If subagents are available: Spawn exactly 3 Task research tasks in parallel for comprehensive coverage.
Deploy these tasks simultaneously in a single message:
codebase-locator - Find WHERE files and components live
codebase-analyzer - Understand HOW specific code works
context-synthesis - Connect findings across components
YOU MUST DEPLOY ALL 3 TASKS IN A SINGLE MESSAGE
DO NOT DEPLOY SEQUENTIALLY - USE PARALLEL TASK CALLS
If subagents are NOT available: Execute the workflow in order — locator first, then analyzer, then synthesis.
While waiting for agents, run ast-grep scripts:
scripts/structure-map.sh ./ --with-stats
scripts/ast-scan.sh all src/
scripts/symbol-index.sh src/
Wait for ALL research tasks to complete, then compile findings:
Create .artifacts/research/YYYY-MM-DD_HH-MM-SS_<topic>.md using format:
---
title: "<topic> research findings"
link: "<topic>-research"
type: research
ontological_relations:
- relates_to: [[<related-doc>]]
tags: [research, <topic>]
uuid: "<uuid>"
created_at: "<ISO-8601 timestamp>"
---
## Structure
- Directory layout with purposes
## Key Files
- `path/file.ts:L123` → what it defines
## Patterns Found
- Pattern name: locations where it appears
## Dependencies
- Module A → imports → Module B
## Symbol Index
- Exported symbols with locations
| Need | Script |
|---|---|
| "What's the file structure?" | structure-map.sh |
| "Where are the functions?" | ast-scan.sh functions |
| "What does this module export?" | symbol-index.sh |
| "What depends on this file?" | dependency-graph.sh --file |
| "Where are the API routes?" | ast-scan.sh routes |
| "Find all React components" | ast-scan.sh components |
All research output must:
After writing the research document to .artifacts/research/, proceed to plan-phase if the next step is the Plan phase.