From grace
Полный справочник по методологии GRACE. Использовать при объяснении GRACE пользователям, онбординге новых проектов или когда нужно самому разобраться во фреймворке — принципах, семантической разметке, графах знаний, контрактах, тестировании и конвенциях уникальных тегов.
How this skill is triggered — by the user, by Claude, or both
Slash command
/grace:grace-explainerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
GRACE is a methodology for AI-driven code generation that makes codebases **navigable by LLMs**. It solves the core problem of AI coding assistants: they generate code but can't reliably navigate, maintain, or evolve it across sessions.
GRACE is a methodology for AI-driven code generation that makes codebases navigable by LLMs. It solves the core problem of AI coding assistants: they generate code but can't reliably navigate, maintain, or evolve it across sessions.
LLMs lose context between sessions. Without structure:
GRACE provides four interlocking systems that fix this:
Knowledge Graph (docs/knowledge-graph.xml)
maps modules, dependencies, and public module interfaces
Module Contracts (MODULE_CONTRACT in each file)
defines WHAT each module does
Semantic Markup (START_BLOCK / END_BLOCK in code)
makes code navigable at ~500 token granularity
Verification Plan (docs/verification-plan.xml)
defines HOW correctness, traces, and logs are proven
Operational Packets (docs/operational-packets.xml)
standardizes execution packets, deltas, and failure handoff
Before generating any module, create its MODULE_CONTRACT with PURPOSE, SCOPE, INPUTS, OUTPUTS. The contract is the source of truth — code implements the contract, not the other way around.
Markers like // START_BLOCK_NAME and // END_BLOCK_NAME are navigation anchors, not documentation. They serve as attention anchors for LLM context management and retrieval points for RAG systems.
docs/knowledge-graph.xml is the single map of the entire project. When you add a module — add it to the graph. When you add a dependency — add a CrossLink. The graph never drifts from reality. Shared docs should describe the module's public contract, not every private helper or implementation detail.
Code generation follows a strict pipeline:
Requirements -> Technology -> Development Plan -> Verification Plan -> Module Contracts -> Code + Tests
Never jump to code. If requirements are unclear — stop and clarify.
Testing, traces, and log markers are not cleanup work. They are part of the architectural blueprint. If another agent cannot verify or debug a module from the evidence left behind, the module is not fully done.
You have freedom in HOW, not in WHAT. If a contract seems wrong — propose a change, don't silently deviate.
docs/requirements.xml — WHAT the user needs (use cases, AAG notation)
|
docs/technology.xml — WHAT tools we use (runtime, language, versions)
|
docs/development-plan.xml — HOW we structure it (modules, phases, public contracts)
|
docs/verification-plan.xml — HOW we prove it works (tests, traces, log markers)
docs/operational-packets.xml — HOW agents hand work across execution, review, and fixes
|
docs/knowledge-graph.xml — MAP of module boundaries, dependencies, public interfaces, and verification refs
|
src/**/* + tests/**/* — CODE and TESTS with GRACE markup and evidence hooks
Each layer feeds the next. The knowledge graph and verification plan are both outputs of planning and inputs for execution.
Important boundary rule:
GRACE also has an optional CLI package, @osovv/grace-cli, which installs the grace binary.
Current public commands:
grace lint --path /path/to/projectgrace module find auth --path /path/to/projectgrace module show M-AUTH --path /path/to/project --with verificationgrace file show src/auth/index.ts --path /path/to/project --contracts --blocksUse the CLI for:
Public/private split:
grace module show is the shared/public view of a module from plan, graph, steps, and verificationgrace file show is the file-local/private view from MODULE_CONTRACT, MODULE_MAP, CHANGE_SUMMARY, scoped contracts, and semantic blocksgrace module find searches both planes, including LINKS from file-local markupThe CLI does not replace $grace-reviewer, $grace-refresh, or $grace-verification. It is a cheap automated guardrail before or alongside those higher-context workflows.
$grace-init — create docs/ structure and AGENTS.mdrequirements.xml with use casestechnology.xml with stack decisions$grace-plan — architect modules, data flows, and verification refs$grace-verification — design and maintain tests, traces, and log-driven evidence$grace-execute — generate all modules sequentially with review and commits$grace-multiagent-execute — generate parallel-safe modules in controller-managed waves$grace-refactor — rename, move, split, merge, or extract modules without drift$grace-refresh — sync graph and verification refs after manual changes$grace-fix error-description — debug via semantic navigation$grace-status — health report$grace-ask — grounded Q&A over the project artifactsFor in-depth documentation on each GRACE component, see the reference files in this skill's references/ directory:
references/semantic-markup.md — Block conventions, granularity rules, loggingreferences/knowledge-graph.md — Graph structure, module types, CrossLinks, maintenancereferences/contract-driven-dev.md — MODULE_CONTRACT, function contracts, PCAMreferences/verification-driven-dev.md — Verification plans, test design, traces, and log-driven developmentreferences/unique-tag-convention.md — Unique ID-based XML tags, why they work, full naming table| Rationalization | Reality |
|---|---|
| "I know GRACE from previous sessions, I can answer without reading this SKILL.md" | GRACE evolves — the Six Core Principles, the five-artifact diagram (adding operational-packets.xml), and the public/private boundary rule all change between releases. Answer from the current SKILL.md and the references/ files, not memory. |
| "I'll summarize the methodology in my own words, faster than quoting" | Paraphrased GRACE loses load-bearing terms: "MODULE_CONTRACT" vs. "module spec," "CrossLink" vs. "dependency edge," "V-M-xxx" vs. "test ID." The user then asks a follow-up using the paraphrase and nothing in docs/*.xml matches. Quote the canonical terms. |
| "The user asked a simple question, I don't need to cite a reference file path" | This skill IS the reference. Every claim should point to either a section in this SKILL.md or a specific file in references/ (e.g. references/semantic-markup.md). No path = no grounding, and the user cannot verify or deep-dive. |
| "Semantic markup is basically comments with a naming convention" | Explicit in Core Principle 2: "Semantic Markup Is Not Comments." They are navigation anchors for LLM context management and RAG retrieval points — calling them comments misleads the user about what they do and when to add them. |
| "Shared docs should describe every helper for completeness" | Explicit boundary rule: "shared GRACE docs describe only public module contracts and public module interfaces; private helpers, local-only types, and internal orchestration details stay in the module file header." Over-sharing violates the public/private split and causes graph bloat. |
"grace CLI replaces $grace-reviewer / $grace-refresh / $grace-verification" | Explicit in the Optional CLI Support section: "The CLI does not replace $grace-reviewer, $grace-refresh, or $grace-verification. It is a cheap automated guardrail before or alongside those higher-context workflows." Do not describe it as a substitute. |
| "Contracts are documentation, code is the real artifact" | Core Principle 1 inverts this: "code implements the contract, not the other way around." Describing contracts as documentation leads users to write code first and back-fill contracts, which is the exact drift GRACE exists to prevent. |
| "I'll skip explaining PCAM, it's just jargon" | PCAM (Purpose / Constraints / Autonomy / Metrics) is Core Principle 6 — it is how governed autonomy is defined. Skipping it means the user thinks they have freedom in WHAT, when the rule is freedom in HOW only. |
references/*.md file in the current session.operational-packets.xml in one place and omitted it in another.grace-ask or /grace-ask while the canonical developer-workflow list uses $grace-ask.$grace-verification between $grace-plan and $grace-execute, or omitted $grace-multiagent-execute.grace CLI as a replacement for $grace-reviewer, $grace-refresh, or $grace-verification.$grace-* skill; this skill is reference material, not an action skill.docs/*.xml — use $grace-ask, which loads artifacts and cites them; $grace-explainer describes the methodology, not the project.$grace-cli.$grace-status or $grace-ask, not an explainer answer.Before claiming this skill is complete, confirm:
skills/grace/grace-explainer/references/ (verification: each assertion is followed by a path or section heading)grep -E "Never Write Code Without a Contract|Semantic Markup Is Not Comments|Knowledge Graph Is Always Current|Top-Down Synthesis|Verification Is Architecture|Governed Autonomy" <answer>)development-plan.xml, verification-plan.xml, knowledge-graph.xml, operational-packets.xml, plus the MODULE_CONTRACT / markup layer (verification: grep the answer for each filename)grace module show = shared/public, grace file show = file-local/private (verification: cite the "Public/private split" section)$grace-* form as in the Development Workflow list (verification: grep -E "\\$grace-(init|plan|verification|execute|multiagent-execute|refactor|refresh|fix|status|ask)" <answer>)grace CLI was described as a guardrail, not a replacement for $grace-reviewer / $grace-refresh / $grace-verification (verification: grep for the exact phrase "does not replace" or an equivalent disclaimer)references/*.md file by name (verification: ls skills/grace/grace-explainer/references/ matches the files cited)npx claudepluginhub baho73/grace-marketplace-2 --plugin graceExplains GRACE methodology for AI-driven code generation: principles, knowledge graphs, module contracts, semantic markup, verification plans, operational packets. Use for user explanations, project onboarding, framework reference.
Crafts effective prompts, CLAUDE.md instructions, rules, agent system prompts, and skill bodies for reliable Claude Code behavior.
Routes user intent to the appropriate codebase-intelligence skill: map structure, generate knowledge graphs, update docs, extract learnings, or recall/capture phase artifacts.