grace-fix

Locate semantic blocks and apply contract-aligned fixes in GRACE-instrumented codebases.

233|51|Updated Feb 17, 2026
One-click install
npx skills add https://github.com/osovv/grace-marketplace --skill grace-fix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: grace-fix
Source: https://github.com/osovv/grace-marketplace/tree/main/skills/grace/grace-fix
Command: npx skills add https://github.com/osovv/grace-marketplace --skill grace-fix

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

GRACE-Fix addresses the challenge of debugging complex codebases instrumented with semantic markers and contracts where locating the responsible module and the exact implementation block is time-consuming and error-prone. It gives a structured procedure to navigate the project's knowledge graph, find the semantic block referenced by logs or module maps, and resolve mismatches between a block's CONTRACT and its implementation without breaking semantic boundaries.

Core Features & Use Cases

  • Knowledge-graph navigation: Read docs/knowledge-graph.xml and follow CrossLinks to identify the target module and relevant dependencies.
  • Semantic block tracing: Locate START_BLOCK_* markers and module/function CONTRACTs to pinpoint the exact code region.
  • Contract-aware analysis and repair: Compare intended behavior from CONTRACTs against code, propose targeted in-block fixes, and update CHANGE_SUMMARY and metadata.
  • Verification and safety: Recommend running type checking, linting, and strengthening tests or logs via $grace-verification after changes.
  • Use Cases: Fix runtime exceptions with block-level traces, repair logic that violates module CONTRACTs, and improve weak tests or logs revealed by failures.

Quick Start

Ask the agent to debug the reported error by locating the module in docs/knowledge-graph.xml, tracing the START_BLOCK marker to the semantic block, comparing the block code to its CONTRACT, and proposing a minimal in-block fix.

Frequently Asked Questions about grace-fix

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

FAQPage Schema
How do I debug runtime errors using a semantic knowledge graph?

To debug runtime errors using a semantic knowledge graph, navigate the project's docs/knowledge-graph.xml to identify the target module, trace START_BLOCK markers to the exact code region, and compare the implementation against its CONTRACT to apply a minimal in-block fix.

How do I fix code that violates its module CONTRACT?

To fix code that violates its module CONTRACT, locate the responsible semantic block via START_BLOCK markers, compare the intended behavior from the CONTRACT against the current implementation, and apply targeted contract-aligned modifications within that block's boundaries.

What are contract-driven fixes for complex codebases?

Contract-driven fixes resolve mismatches between a code block's intended behavior and its actual implementation by comparing against module CONTRACTs, ensuring that modifications stay within semantic boundaries and do not break cross-link dependencies defined in the knowledge graph.

Do I need specific instrumentation to trace semantic blocks?

Yes, tracing semantic blocks requires a codebase instrumented with GRACE semantic markers, a docs/knowledge-graph.xml file, module CONTRACTs, and code search capabilities to locate START_BLOCK markers for safe in-block modifications.

What should I do after applying a contract-aligned code fix?

After applying a contract-aligned code fix, you should update the CHANGE_SUMMARY and metadata, then run verification steps including type checking, linting, and strengthening tests or logs to ensure the modification maintains system integrity.