Agent skill
grace-plan
Run the GRACE architectural planning phase. Use when you have requirements and technology decisions defined and need to design the module architecture, create contracts, map data flows, and establish verification references. Produces development-plan.xml, verification-plan.xml, and knowledge-graph.xml.
Install this agent skill to your Project
npx add-skill https://github.com/osovv/grace-marketplace/tree/main/skills/grace/grace-plan
SKILL.md
Run the GRACE architectural planning phase.
Prerequisites
docs/requirements.xmlmust exist and have at least one UseCasedocs/technology.xmlmust exist with stack decisionsdocs/verification-plan.xmlshould exist as the shared verification artifact template- If requirements or technology are missing, tell the user to run
$grace-initfirst - If the verification plan template is missing, recreate it before finalizing the planning artifacts
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 only the module's public interface
- Do not push private helpers or implementation-only types into shared XML artifacts
Verification-Aware Planning
Planning is incomplete if modules cannot be verified.
For every significant module, define during planning:
- a
verification-reflikeV-M-xxx - likely source and test file targets
- critical scenarios that must be checked
- the log or trace anchors needed to debug failures later
- which checks stay module-local versus wave-level or phase-level
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 public interfaces (what the module exposes to other modules or callers)
- Tentative source path, test path, and
verification-ref
Present this to the user as a structured list and wait for approval before proceeding.
Phase 3: Design Verification Surfaces
Before finalizing the plan, derive the first verification draft:
- map critical UseCases to
DF-xxxdata flows - assign
V-M-xxxverification entries for important modules - list the most important success and failure scenarios
- identify required log markers or trace evidence for critical branches
- note module-local checks plus any wave-level or phase-level follow-up
Present this verification draft to the user as part of the same approval checkpoint. If the verification story is weak, revise the architecture before proceeding.
Phase 4: Mental Walkthroughs
Run "mental tests" for 2-3 key user scenarios step by step:
- Which modules are involved?
- What data flows through them?
- Where could it break?
- Which logs or trace markers would prove the path was correct?
- Are there circular dependencies?
Present the walkthrough to the user. If issues are found — revise the architecture.
Phase 5: Generate Artifacts
After user approval:
- Update
docs/development-plan.xmlwith the full module breakdown, public module contracts, target paths, observability notes, data flows, and implementation order. Use unique ID-based tags:M-xxxfor modules,Phase-Nfor phases,DF-xxxfor flows,step-Nfor steps, andV-M-xxxreferences for verification. - Update
docs/verification-plan.xmlwith global verification policy, critical flows, module verification stubs, and phase gates. - Update
docs/knowledge-graph.xmlwith all modules (asM-xxxtags), their public-interface annotations (asfn-name,type-Name, etc.),verification-reflinks, and CrossLinks between them. - Print: "Architecture approved. Run
$grace-verificationto deepen tests and trace expectations,$grace-executefor sequential execution, or$grace-multiagent-executefor parallel-safe waves."
Important
- Do NOT generate any code during this phase
- This phase produces ONLY planning documents and verification artifacts
- Every architectural decision must be explicitly approved by the user
Output Format
Always produce:
- Module breakdown table (ID, name, type, purpose, dependencies, target paths, verification ref)
- Data flow diagrams (textual)
- Verification surface overview (critical flows, module-local checks, log or trace anchors)
- Implementation order (phased, with dependency justification)
- Risk assessment (what could go wrong)
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
grace-verification
Design and enforce testing, traces, and log-driven verification for a GRACE project. Use when modules need stronger automated tests, execution-trace checks, or a maintained verification-plan.xml that autonomous and multi-agent workflows can trust.
grace-refactor
Refactor GRACE-governed code safely: rename, move, split, merge, or extract modules while keeping contracts, graph, verification, and semantic markup synchronized.
grace-fix
Debug an issue using GRACE semantic navigation. Use when encountering bugs, errors, or unexpected behavior - navigate through the graph, verification plan, and semantic blocks to analyze the mismatch and apply a targeted fix.
grace-cli
Operate the optional `grace` CLI against a GRACE project. Use when you want to lint GRACE artifacts, resolve modules from names or file paths, inspect shared/public module context, or inspect file-local/private markup through `grace lint`, `grace module find`, `grace module show`, and `grace file show`.
grace-reviewer
GRACE integrity reviewer. Use for fast scoped gate reviews during execution, or full integrity audits at phase boundaries and after broader code, graph, or verification changes.
grace-multiagent-execute
Execute a GRACE development plan in controller-managed parallel waves with selectable safety profiles, verification-plan excerpts, batched shared-artifact sync, and scoped reviews.
Didn't find tool you were looking for?