Icpg
Intent-Augmented Code Property Graph, tracks WHY code exists via ReasonNodes with...
Install
npx skills add alinaqi/maggy --skill icpg -g -a claude-code -y- Repository
- alinaqi/maggy710
- Category
- Engineering
- Updated
- 22d ago
- License
- MIT
- Context cost
- Mediumabout 2,782 tokens
- Runs scripts
- No, instructions only
What it does
Intent-Augmented Code Property Graph, tracks WHY code exists via ReasonNodes with formal contracts, 6-dimension drift detection, and 3 canonical pre-task queries for autonomous development
iCPG Skill (Intent-Augmented Code Property Graph)
Purpose: Add a Reason Graph layer on top of code structure so every function, class, and module is traceable to the goal that created it, the agent or human that owns it, and whether it's still doing what it was supposed to do.
┌────────────────────────────────────────────────────────────────┐
│ iCPG = AST + CFG + PDG + RG (Reason Graph) │
│ ─────────────────────────────────────────────────────────────│
│ AST = Abstract Syntax Tree (structure) ← existing │
│ CFG = Control Flow Graph (execution paths) ← existing │
│ PDG = Program Dependency Graph ← existing │
│ RG = Reason Graph (WHY layer) ← THIS SKILL │
│ │
│ The RG stores ReasonNodes (goals/tasks), links them to code │
│ symbols via typed edges, enforces contracts (DbC), and │
│ detects when code drifts from its original purpose. │
│ │
│ Storage: .icpg/reason.db (SQLite, per-project, gitignored) │
│ CLI: icpg init | create | record | query | drift | bootstrap │
└────────────────────────────────────────────────────────────────┘
Core Principle
Intent first, code second. Before writing or modifying code, query the reason graph to understand WHY existing code was written, WHAT constraints it must preserve, and WHETHER your change duplicates prior work.
The 3 Canonical Pre-Task Queries
Every agent MUST run these before writing code:
