tercel/spec-forge/analyze
Claude Code and agent skill by tercel/spec-forge
- community
Checking that the SKILL.md file is still in the repository.
Analyze a collection of documents to build a knowledge map, identify themes, find gaps, duplicates, conflicts, and staleness, then produce an organized analysis with improvement recommendations. Designed for document ecosystems (cross-repo docs, research collections, mixed-format doc repos) where the challenge is understanding the landscape, not auditing against code.
Install
npx vskill@latest install tercel/spec-forge/analyzeSKILL.md
Analyze — Document Landscape Analysis & Knowledge Mapping
Map, understand, and evaluate a collection of documents as a body of knowledge. Identify structure, themes, gaps, redundancies, conflicts, and staleness. Produce an actionable analysis with reorganization recommendations.
Core Principles
- Landscape-first: Build the map before judging — understand what exists before critiquing
- Theme-driven: Group documents by what they're about, not just where they live
- Conflict detection: Find contradictions between documents that may confuse readers
- Staleness awareness: Identify documents that may be outdated based on content signals
- Non-destructive: Only reads and reports — never modifies source documents
- Reorganization as suggestion: Propose better structures, don't impose them
When to Use Analyze vs. Audit
| Situation | Use | |
|---|---|---|
| Single project with docs/ and source code | /spec-forge:audit | |
| Docs-only repo with mixed content | /spec-forge:analyze | |
| Cross-repo documentation ecosystem | /spec-forge:analyze | |
| Research notes, ideas, decision records | /spec-forge:analyze | |
| API docs need checking against code | /spec-forge:audit | |
| "I have a mess of docs and need to understand them" | /spec-forge:analyze |
Workflow
Step 1: Determine Scope
Parse the arguments to determine what to analyze:
- If a path argument is provided (e.g.,
/spec-forge:analyze ../../aipartnerup-docs), use that as the root - If no path, use the current working directory's
docs/directory - If multiple paths are provided, analyze all of them as one collection
Use AskUserQuestion to understand the user's goals:
- What is this collection? (e.g., "ecosystem docs for multiple products", "research notes", "mixed specs and decisions")
- What do you want to understand? Options:
- Full landscape analysis (recommended for first time)
- Find conflicts and contradictions
- Find gaps and missing coverage
- Suggest reorganization
- All of the above
Step 2: Document Discovery & Inventory
Scan all documents in the target path(s):
Fast path (preferred): resolve <sf_scripts> (see @../shared/scripts.md) and run python3 "<sf_scripts>/sf-scan.py" --root "<root>" --docs-only to enumerate every markdown document with its path, word count, and any declared requirement IDs in one pass. Use that inventory as the deterministic starting point. Fallback: if python3 is unavailable or the script is not found, glob for all markdown files recursively by hand. Either way, sf-scan is only a facts collector on an arbitrary doc collection — the model still judges each document's TYPE (below), its themes, and its conflicts. Switch to the manual fallback silently.
- Enumerate all markdown files recursively — path, per-file word count, and declared IDs come from the sf-scan inventory above (glob by hand only in the fallback)
- Read enough of each document to extract its metadata and claims; for large files read strategically (headings + relevant sections) rather than a fixed prefix
- Extract metadata for each document:
- File path and directory position
- Title (first H1 or filename)
- Approximate word count
- Last modified date (git log if available, file stat otherwise)
- Document type classification (see below)
- Key entities mentioned (product names, system names, technologies)
- Key claims or decisions stated
- Internal links to other documents
- Apparent audience (developers, product, leadership, external)
Document type classification:
| Type | Signals | |
|---|---|---|
vision | Mission, vision, strategy, roadmap, long-term goals | |
architecture | System design, component diagrams, data flow, technical architecture | |
spec | Requirements, specifications, protocols, standards, conformance | |
research | Analysis, investigation, comparison, feasibility study, market research | |
decision | ADR, decision record, strategy choice, trade-off analysis | |
idea | Brainstorm, proposal, exploration, "what if", future thinking | |
guide | How-to, tutorial, getting started, cookbook | |
reference | API reference, data dictionary, glossary, type mapping | |
blueprint | Master plan, project plan, implementation roadmap | |
report | Status report, audit report, analysis output | |
meta | README, index, navigation, table of contents |
Display the inventory:
Step 3: Theme & Cluster Analysis
Group documents by what they're actually about, regardless of directory structure:
3.1 Identify Themes
Read through all documents and identify the major themes/topics that emerge:
- Product/system names mentioned across multiple docs
- Recurring concepts or concerns
- Shared vocabulary or domain terms
3.2 Build Theme Clusters
For each theme, list which documents contribute to it:
3.3 Cross-Reference Map
Build a document relationship map. Pull the deterministic input first: run python3 "<sf_scripts>/sf-trace.py" ids <file...> to extract the requirement IDs each document declares, and use those exact IDs as the input to the reference map rather than eyeballed mentions. Then apply judgement:
- Which docs reference each other?
- Which docs should reference each other but don't?
- Are there isolated documents with no connections?
Generate a Mermaid graph showing document relationships. (Fall back to reading the declared IDs by hand if the script is unavailable; conflict and theme judgement always stays with the model.)
Step 4: Conflict & Contradiction Detection
Systematically compare documents for conflicts:
4.1 Factual Conflicts
Look for places where two documents state contradictory facts:
- Different architecture descriptions for the same system
- Conflicting technology choices or version numbers
- Contradictory timelines or priorities
- Inconsistent naming (same thing called different names, or same name for different things)
For each conflict:
4.2 Strategic Conflicts
Look for higher-level misalignments:
- Vision docs that contradict architecture decisions
- Research findings that aren't reflected in decisions
- Ideas that overlap with or contradict existing plans
- Decisions that seem to ignore relevant research
4.3 Temporal Conflicts
Look for staleness-related contradictions:
- Old docs describing plans that newer docs have superseded
- Documents referencing deprecated technologies or abandoned features
- Timelines or milestones that have clearly passed without update
Step 5: Gap Analysis
Identify what's missing from the document collection:
5.1 Coverage Gaps
Based on the themes and types identified:
- Are there themes with no vision/strategy doc?
- Are there systems with no architecture doc?
- Are there decisions with no supporting research?
- Are there ideas that were never evaluated or decided on?
- Is there a getting-started guide for new team members?
5.2 Depth Gaps
Some areas may be documented but not deeply enough:
- Vision without concrete roadmap
- Architecture without component details
- Research without conclusions or recommendations
- Decisions without recorded rationale
5.3 Audience Gaps
Check if all relevant audiences are served:
- Developer documentation (architecture, API, guides)
- Product documentation (vision, requirements, roadmap)
- Leadership documentation (strategy, metrics, status)
- External documentation (README, getting started, examples)
Step 6: Redundancy Detection
Find documents that overlap significantly:
- Near-duplicates: Documents covering the same topic with slightly different content
- Superseded docs: Older versions that should have been replaced but weren't
- Scattered coverage: Same topic spread across multiple docs that could be consolidated
For each redundancy:
Step 7: Staleness Assessment
Evaluate document freshness:
- Age signals: Last modified date, referenced dates in content
- Content signals: Mentions of deprecated technologies, past tense for future plans, "TODO" items that should have been resolved
- Context signals: Referenced systems that no longer exist, links that would be broken
Classify each document:
- Current: Content appears up-to-date
- Possibly stale: Some signals of age but content may still be valid
- Likely stale: Strong signals that content is outdated
- Archival: Document is historical record, not meant to be current
Step 8: Generate Analysis Report
Write the analysis report to {target-root}/analysis-report.md (or user-specified path).
Report format:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/analyze/SKILL.md
Popularity
- Repository stars
- 10
- 7-day trend score
- 12
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/tercel/spec-forge/analyze)