survey
Skill2 starsChanged 6 months agoApache-2.0View on GitHub
Multi-perspective codebase survey that produces beads and mermaid diagrams from code structure. Each agent perspective (prod, staging, dev, feature, PM) examines the same codebase at a different zoom level, creating tagged beads and a disagreement matrix.
21 other projects use a version of this.
Adopted by
Most recently taken up by
- genkovich/sddtheir own version, first seen Oct 25, 2026
- PKU-DAIR/AutoScitheir own version, first seen Oct 25, 2026
- wheslleyrimar/BuildCLI-Agentstheir own version, first seen Oct 22, 2026
- LazyerIJ/self-clonetheir own version, first seen Oct 17, 2026
- steven112163/dotharnesstheir own version, first seen Oct 15, 2026
- DAIR-AutoResearch/AutoScitheir own version, first seen Oct 15, 2026
Used with
Projects with it also use daily-arxiv, exp-eval and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
LambenthanSkilldaily-arxiv
每日从 arXiv 拉取新论文,过滤相关性,auto-ingest 高优先级论文,检测 SOTA 更新
Also in 5 projects that use this
LambenthanSkillexp-eval
实验判决门:Review LLM 独立评判实验结果 → 4 种判决路径 → 自动更新 claims confidence、ideas status、graph edges
Also in 5 projects that use this
skyllwtSkillexp-pilot-eval
Pilot result evaluation — read pilot results, apply success criteria, update idea page (pilot_result, failure_reason if failed), generate PILOT_VERDICT_REPORT. Called by /ideate Phase 5 after /exp-pilot-run.
Also in 4 projects that use this
skyllwtSkillexp-pilot-run
Pilot experiment execution — read Pilot Spec YAML, write pilot code, run experiment(Confirm with the user before operation and require the applicant to conduct manual inspection), return results. Called by /ideate Phase 5. Does NOT modify wiki pages or judge pass/fail.
Also in 4 projects that use this
phanghonghaoSkillposter
HTML/CSS A4 海报生成。从沙龙/活动 Markdown 文件生成科技风 A4 海报 PDF/PNG。Use when user mentions: poster, 海报, 海报生成, make poster, generate poster, 活动海报, 沙龙海报.
Also in 4 projects that use this
- +6 more from Lambenthan
- +1 more from skyllwt
Other versions21 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 21
- skyllwt/OmegaWiki★ 1.7ksame name
- DAIR-AutoResearch/AutoSci★ 1.7ksame name
- PKU-DAIR/AutoSci★ 1.7ksame name
- skyllwt/AutoSci★ 1.7ksame name
- genkovich/sdd★ 187same name
- SNL-UCSB/literature-survey-skill★ 93same name
- Lambenthan/empiricalwiki★ 85same name
- spacedock-dev/spacedock★ 85same name
- V-Songbird/foreman★ 35same name
- jmylchreest/aide★ 19same name
11 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository43 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- break-glassSkill
- claim-ledgerSkill
- contract-parity-auditSkill
- counterfactual-auditSkill
- design-doc-reviewSkill
- diagram-gen-emergentSkill
- diagram-gen-specSkill
- doc-triageSkill
- explain-workSkill
- feature-implSkill
- finding-triageSkill
- first-party-auditSkill
- gh-token-rotateSkill
- handoffSkill
- implementSkill
- jj-stackSkill
- linear-escalation-triageSkill
- mache-usageSkill
- park-workSkill
- pr-boardSkill
- pr-bucketsSkill
- prior-art-cartographerSkill
- problem-decomposerSkill
- pr-review-kitSkill
- pr-reviewSkill
- pr-suggestionSkill
- readme-restructureSkill
- repo-description-polishSkill
- repo-homepage-setSkill
- repo-social-previewSkill
- repo-topic-taggerSkill
- review-prepSkill
- review-queueSkill
- reviewSkill
- self-auditSkill
- structural-pr-reviewSkill
- taskfile-ci-paritySkill
- test-fidelitySkill
- workflow-auditSkill
- work-scopeSkill
- writing-pr-descriptionsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
26 rules. 0 are common, 19 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 16 edited versions we read keep these.
19
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Run a structured survey of a codebase from multiple agent perspectives.
- Distinctive: line 21
If no arguments provided, survey the current working directory from all perspectives.
- Distinctive: line 48
Before any perspective runs, build a structural map of the codebase using mache.
- Distinctive: line 56
If not found, ask the user for the path.
- Very specific: line 60
If mache is available, prefer MCP tools (mcp__mache__get_overview, mcp__mache__list_directory, etc.) for querying structure.
- Very specific: line 106
Use mache's get_communities to identify natural subgraph boundaries
- Very specific: line 107
Use find_callers/find_callees for edges
- Very specific: line 112
Write the diagram to $REPO_PATH/docs/ARCHITECTURE_SURVEY.md (or update if it exists).
- Distinctive: line 127
Check for hardcoded values that should be config
- Distinctive: line 128
Look at error handling: swallowed errors, bare panics, empty catch blocks
- Distinctive: line 136
Check dependency direction: do lower layers import upper layers?
- Distinctive: line 138
Look for anti-patterns: global mutable state, init() side effects (Go), circular imports
- Distinctive: line 140
Check for missing input validation at system boundaries
- Distinctive: line 150
Look for test files that import mocks of the thing they're supposed to test
- Distinctive: line 151
Check integration test coverage vs unit test coverage
- Distinctive: line 161
Check for interface bloat (interfaces with 10+ methods)
- Distinctive: line 163
Look for feature flags that are always true/false (dead branches)
- Very specific: line 172
If multiple repos are available (check rosary.toml or scan parent directory), look for duplicated functionality
- Distinctive: line 174
Check for README/doc staleness vs actual code state
- Distinctive: line 175
Look at commit velocity per package — which areas are active vs neglected?
- Distinctive: line 202
After all perspectives run, produce the matrix.
- Distinctive: line 288
When re-running on a repo that was previously surveyed:
- Very specific: line 290
Check for existing beads with survey:<previous-date> labels
- Distinctive: line 293
Only create new beads for new findings
- Distinctive: line 294
Update the mermaid diagram
- Distinctive: line 299
If mache was mounted via FUSE:
“Common” is measured: kept by at least 6 in 10 of the 16 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Survey — Multi-Perspective Codebase Analysis
Run a structured survey of a codebase from multiple agent perspectives. Each perspective examines the same code at a different zoom level, produces findings as beads (tagged with --actor), and generates mermaid diagrams from the actual code structure.
Arguments
$ARGUMENTS
Arguments format: [repo-path] [--perspectives <list>] [--diagram-only] [--dry-run]
- repo-path: Path to the repo to survey (default: current working directory)
- --perspectives: Comma-separated list of perspectives to run (default: all). Options:
prod,staging,dev,feature,pm - --diagram-only: Skip bead creation, only generate mermaid diagrams
- --dry-run: Show what would be created without creating beads
If no arguments provided, survey the current working directory from all perspectives.
The Model
The survey is a graded filter bank — each perspective is a bandpass filter examining the same codebase at a different frequency:
| Perspective | Zoom Level | What It Looks For | Actor Tag |
| Dev | High freq — individual functions/files | Dead code, unused imports, TODO debt, complexity hotspots | dev-agent |
| Prod | Mid-high — module/package patterns | Code smells, anti-patterns, dependency direction violations, error handling gaps | prod-agent |
| Staging | Mid — test/code correspondence | Fake tests, coverage gaps, test-prod divergence, mocked-but-never-real | staging-agent |
| Feature | Mid-low — cross-file/cross-package | API surface coherence, circular dependencies, feature flag debt, interface bloat | feature-agent |
| PM | Low freq — cross-repo patterns | Duplicated functionality across repos, abandoned experiments, scope overlap | pm-agent |
The disagreement matrix (where perspectives conflict) is the most valuable output — it reveals concerns that no single perspective would catch alone.
Prerequisites
- mache in PATH (for code structure discovery and graph data)
- bd (beads) initialized in the target repo (
bd init) - ley-line (optional, for deeper AST analysis — falls back to mache if unavailable)
- tropo (optional, for topological significance — enhances but not required)
Workflow
Phase 1: Discovery — Build the Map
Before any perspective runs, build a structural map of the codebase using mache.
1.1 Check mache availability
which mache 2>/dev/null && echo "FOUND" || echo "NOT_FOUND"If not found, ask the user for the path. If truly unavailable, fall back to manual exploration (Glob + Grep + Read), but warn that diagram generation will be limited.
1.2 Mount or use MCP
If mache is available, prefer MCP tools (mcp__mache__get_overview, mcp__mache__list_directory, etc.) for querying structure. If MCP is not configured, mount via FUSE:
mache mount --schema auto --writable=false "$REPO_PATH" .mache-mount/survey &
echo $! > .mache-mount/.pid1.3 Get structural overview
Using mache MCP or FUSE mount, gather:
- Module/package list
- Entry points (main packages, exported APIs)
- Dependency graph (callers/callees)
- Type hierarchy
- File count and language breakdown
Store this as the base map — all perspectives will reference it.
1.4 Generate the structure diagram
From mache's graph data, generate a mermaid diagram of the codebase architecture:
# If mache MCP is available:
# Use get_overview, find_callers, find_callees, get_communities to build the graph
#
# If FUSE mount:
# Read .mache-mount/survey/packages/ or .mache-mount/survey/functions/
# Follow callers/ and callees/ virtual directoriesGenerate mermaid from the discovered structure:
graph TB
subgraph "package-a"
A1[funcA1] --> A2[funcA2]
end
subgraph "package-b"
B1[funcB1]
end
A2 --> B1Key rules for diagram generation:
- Diagrams are GENERATED from code, never hand-written
- Use mache's
get_communitiesto identify natural subgraph boundaries - Use
find_callers/find_calleesfor edges - Collapse internal details — show module-level by default, function-level on request
- Include dependency direction arrows (which package imports which)
- Mark any circular dependencies with red/dashed edges
Write the diagram to $REPO_PATH/docs/ARCHITECTURE_SURVEY.md (or update if it exists).
Phase 2: Perspectives — Run Each Lens
For each selected perspective, examine the codebase through that lens. Use the base map from Phase 1 as the starting point.
IMPORTANT: Each perspective runs as a focused analysis pass. Do NOT try to find everything — find the things that THIS perspective uniquely cares about.
2.1 Dev Perspective (--actor dev-agent)
Focus: individual functions and files.
- Scan for TODO/FIXME/HACK comments and assess staleness
- Identify functions over 50 lines (complexity hotspots)
- Find unused exports / dead code paths
- Check for hardcoded values that should be config
- Look at error handling: swallowed errors, bare panics, empty catch blocks
Label beads: --labels "perspective:dev,survey:<timestamp>"
2.2 Prod Perspective (--actor prod-agent)
Focus: module-level quality patterns.
- Check dependency direction: do lower layers import upper layers?
- Identify god packages (too many responsibilities)
- Look for anti-patterns: global mutable state, init() side effects (Go), circular imports
- Assess error propagation: are errors wrapped with context?
- Check for missing input validation at system boundaries
Label beads: --labels "perspective:prod,survey:<timestamp>"
2.3 Staging Perspective (--actor staging-agent)
Focus: test/code correspondence.
- For each package with tests, assess: do the tests test real behavior or just mock everything?
- Find packages with zero test coverage
- Look for test files that import mocks of the thing they're supposed to test
- Check integration test coverage vs unit test coverage
- Identify flaky test patterns (sleep-based synchronization, time-dependent assertions)
Label beads: --labels "perspective:staging,survey:<timestamp>"
2.4 Feature Perspective (--actor feature-agent)
Focus: cross-file and cross-package coherence.
- Using mache's graph, identify API surface boundaries
- Check for interface bloat (interfaces with 10+ methods)
- Find circular dependency cycles between packages
- Look for feature flags that are always true/false (dead branches)
- Assess whether related functionality is co-located or scattered
Label beads: --labels "perspective:feature,survey:<timestamp>"
2.5 PM Perspective (--actor pm-agent)
Focus: strategic/cross-repo patterns.
- If multiple repos are available (check
rosary.tomlor scan parent directory), look for duplicated functionality - Identify abandoned experiments (directories with no commits in 30+ days)
- Check for README/doc staleness vs actual code state
- Look at commit velocity per package — which areas are active vs neglected?
- Assess: is the repo doing too many things? Should it be split?
Label beads: --labels "perspective:pm,survey:<timestamp>"
Phase 3: Bead Creation
For each finding, create a bead:
bd create "<finding title>" \
--description "<what was found, why it matters, where it is>" \
--actor "<perspective>-agent" \
--labels "perspective:<perspective>,survey:<YYYY-MM-DD>" \
--priority <0-4> \
--type taskPriority mapping:
- P0: Security issue, data loss risk, broken functionality
- P1: Architectural violation, significant technical debt
- P2: Code quality issue, missing tests, anti-pattern
- P3: Style issue, minor improvement, documentation gap
- P4: Nitpick, optimization opportunity
Phase 4: Disagreement Matrix
After all perspectives run, produce the matrix. This is the most important output.
4.1 Cross-reference findings
Group findings by code location (file or package). For each location that has findings from 2+ perspectives, note the agreement/disagreement:
## Disagreement Matrix
| Location | Dev | Prod | Staging | Feature | PM |
|----------|-----|------|---------|---------|-----|
| pkg/auth | - | "god package" | "tests mock everything" | "API surface too wide" | - |
| pkg/worker | "50+ TODO comments" | - | "zero test coverage" | - | "duplicates pkg/runner" |
| cmd/server | - | "swallowed errors" | - | "circular dep with pkg/config" | - |4.2 Identify curvature
Where 2+ perspectives flag the same location but for different reasons, that's a high-value signal. These locations have multi-dimensional problems that individual reviews would miss.
Highlight these in the output:
### High-Curvature Zones (multiple perspectives disagree)
1. **pkg/auth** — Prod sees a god package, staging sees fake tests, feature sees API bloat.
This is likely a single root cause: the package grew without boundaries.
→ Suggested action: decompose into sub-packages with clear interfaces.4.3 Write the matrix
Append the disagreement matrix to $REPO_PATH/docs/ARCHITECTURE_SURVEY.md (same file as the mermaid diagram).
Phase 5: Summary
Output to the user:
- Total findings per perspective
- Number of high-curvature zones
- Generated diagram location
- Bead IDs created (grouped by perspective)
Diagram Generation Details
From mache graph → mermaid
The key insight: mache already has the graph. It parses AST via tree-sitter, builds a call graph, identifies communities. We just need to render it as mermaid.
Module-level diagram (default):
- One subgraph per package/module
- Edges = import relationships between packages
- Edge weight = number of cross-package calls
- Communities (from
get_communities) become subgraph clusters - Circular dependencies highlighted with
styleannotations
Function-level diagram (on request, per-package):
- One node per exported function
- Edges = call relationships (from
find_callers/find_callees) - Color by complexity or test coverage if available
Terraform-specific (if .tf files detected):
- Module dependency graph
- Resource → provider mapping
- State file cross-references
Bidirectional flow
Code (source files)
↓ ley-line (tree-sitter AST parse)
↓ mache (graph projection, community detection)
↓ survey skill (multi-perspective analysis)
↓
├── mermaid diagrams (ARCHITECTURE_SURVEY.md)
├── beads (tagged findings per perspective)
└── disagreement matrix (curvature signal)
↓
agent acts on findings → mache write-back → source files updated
↓
re-survey to verify (delta mode)The diagrams are never hand-maintained. They are regenerated from code on each survey run. If the code changes, the diagram changes. This is the opposite of "draw a diagram then forget to update it."
Re-survey (Delta Mode)
When re-running on a repo that was previously surveyed:
- Check for existing beads with
survey:<previous-date>labels - For each previous finding, verify if it's still present
- Auto-close beads for resolved issues:
bd close <id> --reason "Resolved: no longer detected in survey <date>" - Only create new beads for new findings
- Update the mermaid diagram
- Show delta: what improved, what regressed, what's new
Cleanup
If mache was mounted via FUSE:
if [ -f .mache-mount/.pid ]; then
kill "$(cat .mache-mount/.pid)" 2>/dev/null
rm .mache-mount/.pid
fi
umount .mache-mount/survey 2>/dev/null || diskutil unmount .mache-mount/survey 2>/dev/nullExample Usage
# Full survey of current repo
/survey
# Only prod and staging perspectives
/survey . --perspectives prod,staging
# Just generate the diagram, no beads
/survey ~/work/monorepo --diagram-only
# Dry run — see what would be found
/survey --dry-run
# Re-survey to check progress
/survey # will detect previous survey beads and run in delta modeRelationship to Rosary
This skill is the manual trigger for what rosary will eventually automate. When rosary's reconciliation loop runs, it dispatches agents with specific perspectives — that's the automated version of this skill. The survey skill lets you run the same analysis interactively, on demand, for any repo.
The --actor tags on beads are the bridge: rosary can query bd list --labels "perspective:prod" to see what the prod lens found, regardless of whether a human ran /survey or rosary dispatched an automated prod-agent.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

