Get the FREE Ultimate OpenClaw Setup Guide →

grace-add

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

Add a new module to the project.

Process

Step 1: Understand Context

Read docs/knowledge-graph.xml to understand:

  • What modules already exist
  • What the new module will connect to
  • What gap it fills

Step 2: Design Contract

Propose a MODULE_CONTRACT for the new module:

  • PURPOSE
  • SCOPE
  • DEPENDS (which existing modules)
  • Key functions/components it will expose

Present to user and wait for approval.

Step 3: Update Planning Artifacts

After approval:

  1. Add the module to docs/development-plan.xml using unique ID-based tag: M-xxx NAME="..." TYPE="..." LAYER="N" ORDER="N". Use export-name for interface entries, step-N for pipeline steps. See AGENTS.md "Documentation Artifacts" for full convention.
  2. Add the module to docs/knowledge-graph.xml with unique ID-based tag: M-xxx NAME="..." TYPE="...". Use fn-name, type-Name, class-Name for annotation entries. Add CrossLinks to dependencies.

Step 4: Generate Code

Follow the same generation protocol as $grace-generate:

  • Full MODULE_CONTRACT header
  • MODULE_MAP
  • CHANGE_SUMMARY
  • Contracts for each function/component
  • Semantic blocks with unique names

Step 5: Verify Integration

  • Check that imports from existing modules resolve
  • Run type checking or linting as appropriate for the project language
  • Verify CrossLinks are bidirectionally consistent in the knowledge graph

Source

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

Overview

Grace-add inserts a new module into a GRACE project by designing a module contract, updating planning artifacts, generating code, and verifying integration. It ensures the new module connects properly with existing modules and updates the knowledge graph accordingly.

How This Skill Works

1) Read docs/knowledge-graph.xml to understand existing modules and connections. 2) Design a MODULE_CONTRACT (PURPOSE, SCOPE, DEPENDS, key functions) and present it for approval. 3) Upon approval, update docs/development-plan.xml and docs/knowledge-graph.xml with proper IDs, generate code using the grace-generate protocol (MODULE_CONTRACT header, MODULE_MAP, CHANGE_SUMMARY, contracts for functions), and finally verify integration (imports, type checks, and bidirectional CrossLinks).

When to Use It

  • When adding a module that wasn't in the original GRACE plan.
  • When you need a formal MODULE_CONTRACT design and stakeholder approval.
  • When planning artifacts must be updated with unique IDs and cross-references.
  • When generating code following the grace-generate protocol (contracts, maps, summaries).
  • When validating integration through imports, type checks, and knowledge-graph CrossLinks.

Quick Start

  1. Step 1: Understand Context by reviewing docs/knowledge-graph.xml and design the MODULE_CONTRACT; present for approval.
  2. Step 2: After approval, update docs/development-plan.xml and docs/knowledge-graph.xml, then generate code using the grace-generate protocol (MODULE_CONTRACT header, MODULE_MAP, CHANGE_SUMMARY, function contracts).
  3. Step 3: Verify Integration by checking imports, running type checks, and validating CrossLinks in the knowledge graph.

Best Practices

  • Clearly specify PURPOSE, SCOPE, DEPENDS, and key functions in the MODULE_CONTRACT.
  • Obtain explicit approval before updating planning artifacts.
  • Use unique IDs (M-xxx) and follow the export-name, step-N conventions for planning entries.
  • Adhere to AGENTS.md Documentation Artifacts guidelines for consistency.
  • Verify bidirectional CrossLinks and run standard lint/type checks after integration.

Example Use Cases

  • Add a PaymentsModule that connects to Billing and User modules, with a clear contract and tests.
  • Introduce a RecommendationEngineModule that consumes user behavior from existing modules and updates the knowledge graph.
  • Add a NotificationModule to dispatch alerts across modules, ensuring proper CrossLinks.
  • Incorporate an AuthModule to centralize authentication and authorization interfaces.
  • Create a ReportingModule that aggregates outputs from multiple modules for dashboards.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers