icpg

Track code changes against formal contracts using a Reason Graph.

705|56|Updated Dec 26, 2025
One-click install
npx skills add https://github.com/alinaqi/maggy --skill icpg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: icpg
Source: https://github.com/alinaqi/maggy/tree/main/skills/icpg
Command: npx skills add https://github.com/alinaqi/maggy --skill icpg

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

iCPG prevents accidental regressions by forcing every code change to be grounded in an explicit intent and its formal contract, then detecting when behavior drifts from that original purpose.

Core Features & Use Cases

  • Intent-Augmented Reason Graph: Represent goals, constraints, ownership, and lifecycle status as ReasonNodes linked to code symbols.
  • Contract-Driven Guardrails (DbC): Express preconditions, postconditions, and invariants so intent fulfillment can be validated against the codebase.
  • 6-Dimension Drift Detection: Detect spec, decision, ownership, test, usage, and dependency drift with a single scan before and after edits.
  • Canonical Pre-Task Queries: Require three standardized queries (prior work, constraints, risk) to reduce duplication and limit scope damage.

Quick Start

Create a new intent-driven change by running icpg init and then answering the three canonical pre-task queries (prior work, constraints, and risk) before you edit the target files.

Frequently Asked Questions about icpg

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent code drift when modifying shared software contracts?

Preventing code drift requires tracking original goals and formal contracts in a reason graph linked to code symbols, then scanning for behavioral deviations before and after edits.

What is a reason graph and how does it track code intent?

A reason graph tracks code intent by representing goals, constraints, and ownership as typed nodes linked to specific code symbols, enabling automated drift detection and protocol execution.

How do I enforce design by contract for pre-task code changes?

Enforce design by contract by specifying preconditions, postconditions, and invariants as ReasonNodes, then validating intent fulfillment against the codebase during pre-change planning and symbol scoping.

Does TDD work with automated drift detection across software modules?

TDD integrates with automated drift detection by treating test drift as one of six measured dimensions, ensuring tests remain aligned with original code intent and formal contracts.

What are the limitations of relying on canonical pre-task queries for scope management?

Canonical pre-task queries limit scope damage by requiring standardized checks for prior work, constraints, and risk before editing, but add process overhead and may miss implicit dependencies outside the reason graph.