Help us improve
Share bugs, ideas, or general feedback.
From developer-kit
Manages persistent knowledge graph for specs by caching agent discoveries, codebase analysis, patterns, components, and APIs. Use to remember findings across sessions, validate task dependencies, and query prior work.
npx claudepluginhub giuseppe-trisciuoglio/developer-kit --plugin developer-kitHow this skill is triggered — by the user, by Claude, or both
Slash command
/developer-kit:knowledge-graphThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Persistent JSON storage that caches agent discoveries and codebase analysis. Remember findings across sessions, validate task dependencies, query patterns/components/APIs, skip redundant exploration.
Queries and manages a project knowledge graph across tasks, SOPs, memories, and concepts. Useful for recalling patterns, pitfalls, decisions, or related knowledge.
Analyzes codebase to produce knowledge-graph.json for interactive dashboard exploring architecture, components, and relationships
Orchestrates parallel knowledge base generation from codebases using spatial analysis, map-reduce architecture, and sub-agents for concepts, architecture, modules, and patterns. Supports feature learning from archived features.
Share bugs, ideas, or general feedback.
Persistent JSON storage that caches agent discoveries and codebase analysis. Remember findings across sessions, validate task dependencies, query patterns/components/APIs, skip redundant exploration.
Location: docs/specs/[ID-feature]/knowledge-graph.json
Read existing Knowledge Graph or initialize empty structure:
Read file_path="docs/specs/001/knowledge-graph.json"
Returns full KG content. If file missing, returns empty structure and creates on first update.
Query specific sections: components, patterns, apis, integration-points, all
Read file_path="docs/specs/001/knowledge-graph.json"
Filter results by section and process in-memory.
# 1. Read existing
Read file_path="docs/specs/001/knowledge-graph.json"
# 2. Deep-merge updates (arrays append by ID, objects preserve existing)
# 3. Update timestamp
Write file_path="docs/specs/001/knowledge-graph.json" content="<merged JSON>"
Deep-merge rules:
id fieldmetadata.updated_at to current ISO timestampComplete JSON example for update:
{
"metadata": {
"spec_id": "001-hotel-search",
"created_at": "2026-03-14T10:30:00Z",
"updated_at": "2026-03-23T10:00:00Z",
"version": "1.0.0"
},
"patterns": {
"architectural": [
{
"id": "pat-001",
"name": "Repository Pattern",
"convention": "Extend JpaRepository<Entity, ID>",
"files": ["src/main/java/**/repository/*Repository.java"]
}
]
},
"components": {
"services": [
{
"id": "comp-svc-001",
"name": "HotelService",
"location": "src/main/java/com/example/hotel/service/HotelService.java",
"type": "service",
"methods": [{"name": "searchHotels", "returns": "List<HotelDTO>"}]
}
]
}
}
# 1. Read KG
Read file_path="docs/specs/001/knowledge-graph.json"
# 2. Check KG contains required IDs
# 3. Verify actual files exist
Grep pattern="src/**/HotelRepository.java"
Report satisfied dependencies and missing components.
# 1. Read KG and task expectations
Read file_path="docs/specs/001/knowledge-graph.json"
Glob pattern="src/**/ExpectedFile.java"
Grep pattern="class ExpectedClass|interface ExpectedInterface"
# 2. Match expectations against KG.provides
# 3. Report satisfied/unsatisfied contracts
# 1. Find implementation files
Glob pattern="src/**/*.java"
# 2. Extract symbols
Grep pattern="^(public|protected)? (class|interface|enum) " output_mode="content"
# 3. Classify by directory: /entity/ → entity, /service/ → service, /repository/ → repository
# 4. Update KG.provides with {task_id, file, symbols, type, implemented_at}
# 1. Find all KG files
Glob pattern="docs/specs/*/knowledge-graph.json"
# 2. Read each, extract patterns.architectural and patterns.conventions
# 3. Write merged .global-knowledge-graph.json
Write file_path="docs/specs/.global-knowledge-graph.json" content="<aggregated>"
knowledge-graph.json
├── metadata (spec_id, created_at, updated_at, version, analysis_sources)
├── codebase_context (project_structure, technology_stack)
├── patterns (architectural[], conventions[])
├── components (controllers[], services[], repositories[], entities[], dtos[])
├── provides[] ({ task_id, file, symbols[], type, implemented_at })
├── apis (internal[], external[])
└── integration_points[]
Complete schema with field definitions: See references/schema.md
| Scenario | Handling |
|---|---|
| File not found | Return empty KG; creates on first update |
| Invalid JSON | Raise error; offer to recreate from analysis |
| Merge conflicts | Deep-merge preserves existing, adds new with timestamps |
| Write failure | Log error; continue without caching (non-blocking) |
Update workflow:
Read → docs/specs/[ID]/knowledge-graph.jsonWrite → same pathBefore expensive operations:
After discoveries:
Freshness guidelines:
30 days: Stale, re-analysis recommended
# Step 1: Check existing KG
Read file_path="docs/specs/001/knowledge-graph.json"
# Step 2: Analyze codebase (agent task)
Glob pattern="src/main/java/**/*.java"
Grep pattern="public (class|interface) " output_mode="content"
# Step 3: Build update with discoveries
Write file_path="docs/specs/001/knowledge-graph.json" content="{
\"metadata\": {
\"spec_id\": \"001-hotel-search\",
\"created_at\": \"2026-03-14T10:30:00Z\",
\"updated_at\": \"2026-03-23T10:00:00Z\",
\"version\": \"1.0.0\",
\"analysis_sources\": [{\"agent\": \"general-code-explorer\", \"timestamp\": \"2026-03-23T10:00:00Z\"}]
},
\"patterns\": {
\"architectural\": [{
\"id\": \"pat-001\",
\"name\": \"Repository Pattern\",
\"convention\": \"Extend JpaRepository<Entity, ID>\"
}]
},
\"components\": {
\"services\": [{
\"id\": \"comp-svc-001\",
\"name\": \"HotelService\",
\"location\": \"src/main/java/com/example/hotel/service/HotelService.java\",
\"type\": \"service\"
}],
\"repositories\": [{
\"id\": \"comp-repo-001\",
\"name\": \"HotelRepository\",
\"location\": \"src/main/java/com/example/hotel/repository/HotelRepository.java\",
\"type\": \"repository\"
}]
}
}"
# Read KG and task requirements
Read file_path="docs/specs/001/knowledge-graph.json"
# Verify components exist in codebase
Grep pattern="src/main/java/com/example/hotel/repository/HotelRepository.java"
Grep pattern="src/main/java/com/example/hotel/service/HotelService.java"
# Report validation result
# If all found: "All dependencies satisfied, proceed with implementation"
# If missing: "Warning: HotelService not found. Create it first?"
# Load KG to get cached context
Read file_path="docs/specs/001/knowledge-graph.json"
# Present summary to user:
# "Found cached analysis (2 days old):
# - Patterns: Repository Pattern, Service Layer
# - Components: HotelService, HotelController
# - Conventions: naming with *Controller/*Service/*Repository
# Use cached context for task generation?"
More examples: See references/query-examples.md
Critical Constraints:
knowledge-graph.jsondocs/specs/[ID]/ pathsLimitations:
aggregate operationWarnings:
references/schema.md - Complete JSON schema with field definitionsreferences/query-examples.md - Query patterns and integration examplesreferences/integration-patterns.md - Command integration details