giuseppe-trisciuoglio/knowledge-graph
Manage persistent Knowledge Graph for specifications. Provides read, query, update, and validation capabilities for codebase analysis caching. Use when: spec-to-tasks needs to cache/reuse codebase analysis, task-implementation needs to validate task dependencies or contracts, spec-quality needs to synchronize provides, or any command needs to query existing patterns/components/APIs. Reduces redundant codebase exploration by caching agent discoveries.
npx skills add https://github.com/giuseppe-trisciuoglio/developer-kit --skill knowledge-graph
The Knowledge Graph (KG) is a persistent JSON file that stores discoveries from codebase analysis, eliminating redundant exploration and enabling task validation.
Location: docs/specs/[ID-feature]/knowledge-graph.json
Key Benefits:
Use this skill when:
Trigger phrases:
1. read-knowledge-graph - Load and parse KG for a specification
docs/specs/001-feature/)2. query-knowledge-graph - Query specific sections (components, patterns, APIs)
3. update-knowledge-graph - Update KG with new discoveries
4. validate-against-knowledge-graph - Validate task dependencies against KG
5. validate-contract - Validate provides/expects between tasks
6. extract-provides - Extract symbols from implemented files
7. aggregate-knowledge-graphs - Merge patterns from all specs
See references/query-examples.md for detailed usage examples.
Read Knowledge Graph:
Input: /knowledge-graph read docs/specs/001-hotel-search/
Output: {
metadata: { spec_id: "001-hotel-search", version: "1.0" },
patterns: { architectural: [...], conventions: [...] },
components: { controllers: [...], services: [...]}
}
Query Components:
Input: /knowledge-graph query docs/specs/001-hotel-search/ components {"category": "services"}
Output: [{ id: "comp-svc-001", name: "HotelSearchService", type: "service"}]
Update Knowledge Graph:
Input: /knowledge-graph update docs/specs/001-hotel-search/ {
patterns: { architectural: [{ name: "Repository Pattern"}] }
}
Output: "Added 1 pattern to knowledge graph"
Validate Dependencies:
Input: /knowledge-graph validate docs/specs/001-hotel-search/ {
components: ["comp-repo-001"]
}
Output: { valid: true, errors: [], warnings: [] }
See references/examples.md for comprehensive workflow examples.
See references/schema.md for complete JSON schema with examples.
See references/integration-patterns.md for detailed integration with Developer Kit commands.
See references/error-handling.md for comprehensive error handling strategies and recovery procedures.
See references/performance.md for optimization strategies and performance characteristics.
See references/security.md for security considerations, threat mitigation, and best practices.
When to Query KG: Before codebase analysis, task generation, dependency validation
When to Update KG: After agent discoveries, component implementation, pattern discovery
KG Freshness:
See references/performance.md and references/security.md for detailed best practices.
knowledge-graph.json files.docs/specs/[ID]/ paths.See references/error-handling.md and references/security.md for complete constraints and warnings.
Take giuseppe-trisciuoglio/knowledge-graph from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.