一键导入
rai-docs-update
Sync module docs with knowledge graph. Use when architecture docs drift.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Sync module docs with knowledge graph. Use when architecture docs drift.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | rai-docs-update |
| description | Sync module docs with knowledge graph. Use when architecture docs drift. |
| allowed-tools | ["Read","Edit","Write","Grep","Glob","Bash(rai:*)"] |
| license | MIT |
| metadata | {"raise.work_cycle":"utility","raise.frequency":"per-story","raise.fase":"","raise.prerequisites":"","raise.next":"","raise.gate":"","raise.adaptable":"true","raise.version":"2.0.0","raise.visibility":"public"} |
Close the coherence loop between code and architecture docs. Compare knowledge graph truth against module doc frontmatter, update drifted fields, and optionally refresh narrative sections.
When to use: After stories that changed code structure, during /rai-story-close, after discovery refresh.
When to skip: Stories that only changed tests/docs/non-code. No graph available.
Inputs: Knowledge graph (.raise/rai/memory/index.json), module docs (governance/architecture/modules/*.md).
rai graph build
Read .raise/rai/personal/last-diff.json for changed modules. If no diff or no affected_modules, check all modules.
rai graph context mod-{name} --format json
Compare doc-declared vs code-truth:
| Doc field | Graph truth | Comparison |
|---|---|---|
depends_on | code_imports | Sort both, compare sets |
depended_by | Reverse lookup from other modules | Computed |
public_api | code_exports | Sort both, compare sets |
components | code_components | Direct number |
Fields the skill MUST NOT touch: purpose, constraints, status, entry_points, name, type.
Present drift report:
### mod-memory
depends_on: [config] → [config, schemas] (added: schemas)
components: 30 → 34
Ask: "Apply frontmatter updates to N modules? [y/n/selective]"
Apply changes to YAML frontmatter only — preserve all other content and field ordering.
Frontmatter updates applied (or skipped by user).Trigger A (full review): New/removed modules, major dependency changes (>2), significant API changes (>5).
Trigger B (targeted scan): For any frontmatter change, scan prose for stale hardcoded values (old counts, removed dependency names, removed API names). These are mechanical text fixes.
Present proposed changes as diff. HITL approval before writing.
Narrative changes applied or no triggers found.If any changes applied:
rai graph build
Present summary: modules checked, frontmatter updated, narrative updated, graph rebuilt.
Graph reflects updated docs. Coherence loop closed.| Item | Destination |
|---|---|
| Updated frontmatter | governance/architecture/modules/*.md |
| Narrative changes | governance/architecture/modules/*.md (with HITL) |
| Summary | Displayed |
governance/architecture/modules/*.md.raise/rai/memory/index.jsonrai graph context mod-{name} --format jsonInteractive adapter setup for Jira and Confluence. Detects available backends, discovers projects/spaces, generates validated YAML config. 3-4 questions max.
Evaluate design proportionality using Beck's four rules. Use after implementation.
Root cause analysis using the method best suited to the bug. Phase 3 of bugfix pipeline.
Push branch, create MR, verify artifacts complete. Phase 7 of bugfix pipeline.
Execute fix tasks with TDD and all validation gates. Phase 5 of bugfix pipeline.
Decompose fix into atomic TDD tasks. Phase 4 of bugfix pipeline.