Get the FREE Ultimate OpenClaw Setup Guide →

grace-execute

Scanned
npx machina-cli add skill osovv/grace-marketplace/grace-execute --openclaw
Files (1)
SKILL.md
4.2 KB

Execute the development plan step by step, generating code for each pending module with validation and commits.

Prerequisites

  • docs/development-plan.xml must exist with an ImplementationOrder section
  • docs/knowledge-graph.xml must exist
  • If either is missing, tell the user to run $grace-plan first

Process

Step 1: Load and Parse the Plan

Read docs/development-plan.xml. Parse ImplementationOrder and build the execution queue:

  1. Collect all Phase-N elements where status="pending" (tags use unique names: Phase-1, Phase-2, etc.)
  2. Within each phase, collect step-N elements (unique tags: step-1, step-2, etc.)
  3. Present the execution queue to the user as a numbered list:
    Execution Queue:
    Phase N: phase name
      Step order: module ID — step description
      Step order: module ID — step description
    Phase N+1: ...
    
  4. Wait for user approval before proceeding. The user may exclude specific steps or reorder.

Step 2: Execute Each Step

For each step in the approved queue, sequentially:

2a. Generate Code

Follow the $grace-generate protocol for this module:

  • Load context from knowledge-graph.xml
  • Generate code with MODULE_CONTRACT + MODULE_MAP + CHANGE_SUMMARY + semantic blocks
  • Update knowledge-graph.xml with CrossLinks
  • Run type checking

2b. Code Review

After generating, review the code:

  • Does the generated code match the MODULE_CONTRACT from development-plan.xml?
  • Are all GRACE markup conventions followed (paired blocks, unique names, ~500 token granularity)?
  • Are imports correct and do they reference existing modules?
  • Are there any security issues or obvious bugs?

If critical issues found (missing contract fields, broken imports, security problems):

  1. Present the issues to the user
  2. Fix them before proceeding
  3. Re-run the review

If only minor issues (style, naming suggestions): note them and proceed.

2c. Plan Review

Verify the step against the development plan:

  1. Read the module's M-xxx entry in development-plan.xml
  2. Confirm all export-xxx entries are implemented
  3. Confirm all depends modules are imported
  4. Confirm the contract inputs/outputs/errors match the implementation
  5. Check that docs/knowledge-graph.xml was updated with the new module entry and CrossLinks

If mismatches are found — fix them before committing.

2d. Commit

After validation passes:

  1. Stage only the files related to this step (the generated module + updated knowledge-graph.xml)
  2. Create a commit with message format:
    grace(MODULE_ID): short description of what was generated
    
    Phase N, Step order
    Module: module name (module path)
    Contract: one-line purpose from development-plan.xml
    
  3. Report commit hash to user

2e. Progress Report

After each step, print:

--- Step order/total complete ---
Module: MODULE_ID (path)
Status: DONE
Review: passed / passed with N minor notes
Commit: hash
Remaining: count steps

Step 3: Phase Completion

After all steps in a phase are done:

  1. Update docs/development-plan.xml: set the Phase-N element's status attribute to "done"
  2. Run $grace-refresh to verify knowledge graph integrity
  3. Commit the plan update:
    grace(plan): mark Phase N "phase name" as done
    
  4. Print phase summary

Step 4: Final Summary

After all phases are executed:

=== EXECUTION COMPLETE ===
Phases executed: count
Modules generated: count
Total commits: count
Knowledge graph: synced

Error Handling

  • If a step fails — stop execution, report the error, and ask the user how to proceed
  • If type checking fails — attempt to fix, if unfixable stop and report
  • Never skip a failing step — the dependency chain matters

Important

  • Steps within a phase are executed sequentially (dependencies matter)
  • Always verify the previous step's outputs exist before starting the next step
  • The development plan is the source of truth — never deviate from the contract

Source

git clone https://github.com/osovv/grace-marketplace/blob/main/codex-skills/grace-execute/SKILL.mdView on GitHub

Overview

grace-execute orchestrates the full GRACE development plan by loading the planned ImplementationOrder from docs/development-plan.xml and project context from docs/knowledge-graph.xml. It builds an execution queue of pending phases and steps, asks for approval, and then generates code for each pending module with validation and commits.

How This Skill Works

Starting with Step 1, it parses ImplementationOrder to identify pending Phase-N and step-N elements. For each approved step, it follows the GRACE protocol: generate code (including MODULE_CONTRACT, MODULE_MAP, CHANGE_SUMMARY, and semantic blocks), update CrossLinks in the knowledge graph, and run type checking; a code review and a plan review are performed before committing. After each step, a progress report is printed.

When to Use It

  • When the architecture is planned and you want to generate all modules sequentially with review checkpoints
  • When you need explicit user approval to reorder or exclude steps before execution
  • When you require generated code to be validated, reviewed, and tied to the knowledge graph via CrossLinks
  • When you want per-step commits that include the module code and updated knowledge-graph.xml
  • When you need to verify that each module's exports, imports, and contract inputs/outputs match the development plan before proceeding

Quick Start

  1. Step 1: Load and parse docs/development-plan.xml to build the Execution Queue and wait for your approval
  2. Step 2: For each approved step, generate code following the GRACE protocol (2a–2e) with validation and a post-step progress report
  3. Step 3: After all steps in a phase complete, update the plan, run grace-refresh, and produce a phase summary

Best Practices

  • Confirm prerequisites: docs/development-plan.xml with ImplementationOrder and docs/knowledge-graph.xml are present
  • Always present or adjust the execution queue with user approval; you can exclude or reorder steps
  • Review 2a-2e outputs thoroughly; fix critical issues before continuing
  • Keep commits focused per step and update knowledge-graph.xml accordingly
  • Run type checking and ensure CrossLinks are updated to reflect new modules

Example Use Cases

  • New feature module bundle: execute Phase-1 steps to scaffold and validate all modules
  • Reordering steps after a plan change to honor dependencies
  • Fixing a critical import error found during 2b Review and re-running the step
  • Updating the knowledge graph with a new module and CrossLinks after code generation
  • Completing Phase 1 and marking it done with grace(plan) commit and grace-refresh

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers