Incremental • Procedural • Antifragile
An MCP Server designed to enforce the IPA methodology for AI-assisted software engineering. Its primary objective is to maintain code quality and structural integrity in environments characterized by rapid code generation.
- Incremental: System validation is treated as an iterative process. Every change is validated as a specific delta against the existing behavior.
- Procedural: Automated generation requires structured governance. Every modification adheres to a defined lifecycle:
Intent -> Contract -> Generation -> Validation. - Antifragile: Failures serve as a mechanism for improvement. Every identified issue must be accompanied by a reliable regression test to prevent recurrence and enhance system resilience.
The server enforces the following state machine to manage the development lifecycle:
- IDLE: The system is ready for new tasks.
- INTENT: The expected changes and objectives are defined (
register_intent). - CONTRACT: The expected behavior, inputs, and outputs are specified (
define_contract). - IMPLEMENTATION: The code modifications are generated.
- VALIDATION_PENDING: The defined tests are actively executed (
run_validation_step).- PASS: Transitions to
VALIDATED. - FAIL: Transitions to
ANTIFRAGILITY.
- PASS: Transitions to
- ANTIFRAGILITY: A failure has been detected. The issue must be resolved, and a regression test path must be provided before validation can be retried.
- VALIDATED: The cycle is successfully completed (
finish_cycle), returning the state to IDLE.
init_ipa_cycle: Initializes a new development task.register_intent: Defines the intent of the change (Step 1).define_contract: Establishes the contract for the change (Step 2).generate_contract_test: Helper utility to scaffold test structures.run_validation_step: Executes the defined validation tests.register_failure: Logs failures and outlines remediation plans.analyze_reachability: Executesnpm run test:ipa:reachability.check_structural_integrity: Executesnpm run test:ipa:metrics.scaffold_dynamic_fixture: Generates dynamic data builders to mitigate static data degradation.
To utilize the structural validation features, add the following scripts to your project's package.json:
"scripts": {
"test:ipa:reachability": "ts-node tests/reachability.ts", // Optional: adapt to your environment
"test:ipa:metrics": "ts-node tests/metrics.ts"
}This project utilizes a Dual Licensing strategy to protect the intellectual property of the methodology while promoting open adoption of the software:
- Codebase (
mcp-ipa-guardian): Licensed under the Apache License 2.0. You are free to use, modify, and distribute the code, including commercially, provided you adhere to the terms (e.g., patent clause and attribution). - Methodology & Documentation (
docs/): The conceptual framework and detailed articles describing the IPA Methodology are licensed under a Creative Commons Attribution 4.0 International License (CC BY 4.0). You are free to share and adapt the conceptual material, provided you give appropriate credit to the original creator (Jonas Erik).