grace-plan
Scannednpx machina-cli add skill osovv/grace-marketplace/grace-plan --openclawRun the GRACE architectural planning phase.
Prerequisites
docs/requirements.xmlmust exist and have at least one UseCasedocs/technology.xmlmust exist with stack decisions- If either is missing, tell the user to run
$grace-initfirst
Architectural Principles
When designing the architecture, apply these principles:
Contract-First Design
Every module gets a MODULE_CONTRACT before any code is written:
- PURPOSE: one sentence, what it does
- SCOPE: what operations are included
- DEPENDS: list of module dependencies
- LINKS: knowledge graph node references
Module Taxonomy
Classify each module as one of:
- ENTRY_POINT — where execution begins (CLI, HTTP handler, event listener)
- CORE_LOGIC — business rules and domain logic
- DATA_LAYER — persistence, queries, caching
- UI_COMPONENT — user interface elements
- UTILITY — shared helpers, configuration, logging
- INTEGRATION — external service adapters
Knowledge Graph Design
Structure docs/knowledge-graph.xml for maximum navigability:
- Each module gets a unique ID tag:
M-xxx NAME="..." TYPE="..." - Functions annotated as
fn-name, types astype-Name - CrossLinks connect dependent modules bidirectionally
- Annotations describe what each module exports
Process
Phase 1: Analyze Requirements
Read docs/requirements.xml. For each UseCase, identify:
- What modules/components are needed
- What data flows between them
- What external services or APIs are involved
Phase 2: Design Module Architecture
Propose a module breakdown. For each module, define:
- Purpose (one sentence)
- Type: ENTRY_POINT / CORE_LOGIC / DATA_LAYER / UI_COMPONENT / UTILITY / INTEGRATION
- Dependencies on other modules
- Key interfaces (what it exposes)
Present this to the user as a structured list and wait for approval before proceeding.
Phase 3: Mental Tests
Before finalizing, run "mental tests" — walk through 2-3 key user scenarios step by step:
- Which modules are involved?
- What data flows through them?
- Where could it break?
- Are there circular dependencies?
Present the walkthrough to the user. If issues are found — revise the architecture.
Phase 4: Generate Artifacts
After user approval:
- Update
docs/development-plan.xmlwith the full module breakdown, contracts, and data flows. Use unique ID-based tags:M-xxxfor modules,Phase-Nfor phases,DF-xxxfor flows,step-Nfor steps,export-namefor interface entries. See AGENTS.md "Documentation Artifacts" for full convention. - Update
docs/knowledge-graph.xmlwith all modules (asM-xxxtags), their annotations (asfn-name,type-Name, etc.), and CrossLinks between them. - Print: "Architecture approved. Run
$grace-generate module-nameto start generating code, or$grace-executeto generate all modules sequentially."
Important
- Do NOT generate any code during this phase
- This phase produces ONLY planning documents
- Every architectural decision must be explicitly approved by the user
Output Format
Always produce:
- Module breakdown table (ID, name, type, purpose, dependencies)
- Data flow diagrams (textual)
- Implementation order (phased, with dependency justification)
- Risk assessment (what could go wrong)
Source
git clone https://github.com/osovv/grace-marketplace/blob/main/codex-skills/grace-plan/SKILL.mdView on GitHub Overview
Grace-plan orchestrates the GRACE architectural planning phase to design module architecture, establish contracts, and build the knowledge graph when requirements and technology decisions are defined. It outputs development-plan.xml and knowledge-graph.xml to guide implementation and governance.
How This Skill Works
The process starts by verifying prerequisites in docs/requirements.xml and docs/technology.xml. It then outlines a module breakdown with contracts, module types, and dependencies, awaiting user approval. After approval, it generates planning artifacts (without code) and guides subsequent code generation.
When to Use It
- When requirements and technology decisions are defined and you need to design module architecture, contracts, and the knowledge graph.
- When you want CONTRACT-FIRST DESIGN to ensure every module has a clear PURPOSE, SCOPE, DEPENDS, and LINKS.
- When planning data flows and module dependencies across a GRACE system.
- When you need to produce development-plan.xml and knowledge-graph.xml for governance and documentation.
- When stakeholder approval is required before any code generation.
Quick Start
- Step 1: Ensure prerequisites exist: docs/requirements.xml with at least one UseCase and docs/technology.xml with stack decisions; if missing, run $grace-init.
- Step 2: Propose a module breakdown with contracts and present to stakeholders for approval.
- Step 3: After approval, artifacts are generated per the Architecture approved prompt: Architecture approved. Run $grace-generate module-name to start generating code, or $grace-execute to generate all modules sequentially.
Best Practices
- Verify prerequisites: docs/requirements.xml exists with at least one UseCase; docs/technology.xml exists with stack decisions.
- Define MODULE_CONTRACTs for each module with PURPOSE, SCOPE, DEPENDS, LINKS.
- Classify modules using the module taxonomy: ENTRY_POINT, CORE_LOGIC, DATA_LAYER, UI_COMPONENT, UTILITY, INTEGRATION.
- Structure docs/knowledge-graph.xml with IDs using M-xxx and ensure bidirectional CrossLinks.
- Do not generate code during this phase; wait for explicit user approval.
Example Use Cases
- Plan a new checkout module for an e-commerce GRACE deployment.
- Add an analytics module and formalize its contracts.
- Build a knowledge graph for external payment adapters.
- Rework architecture when requirements shift from batch to real-time.
- Prepare development-plan.xml for a multi-service feature release.