ワンクリックで
rebuild-kb-index
Regenerate the knowledge base INDEX.md and all _SUMMARY.md files from current topic files, without modifying topic content.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Regenerate the knowledge base INDEX.md and all _SUMMARY.md files from current topic files, without modifying topic content.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Safely upgrade this Cortex repo to the latest template: detects on-disk state, reconciles infrastructure, and applies idempotent migrations — preserving your customizations and never overwriting your edits without asking.
Safely upgrade this Cortex workspace to the latest template: detects on-disk state, reconciles infrastructure, and applies idempotent migrations — preserving your customizations and never overwriting your edits without asking.
Maintainer auto-check for the Cortex source repo. Invoke this PROACTIVELY and automatically WHENEVER files under templates/ have been added, edited, deleted, renamed, or restructured — and before committing template changes — to classify the change as ADDITIVE (handled by the runner's reconciliation) or MIGRATION-NEEDED (breaking/structural), and scaffold a migrations/NNN-*.md if one is required. Do not wait to be asked. For use INSIDE the template source repo only; it is never shipped to user projects.
Run a full project health check across context-engineering, the knowledge base, and docs to surface gaps, drift, and inconsistencies.
Validate implementation progress of a PRP against its original requirements, auditing completed, current, and remaining phases.
Validate a generated PRP structure against its source requirements to catch gaps and misalignments before execution begins.
| name | rebuild-kb-index |
| description | Regenerate the knowledge base INDEX.md and all _SUMMARY.md files from current topic files, without modifying topic content. |
| disable-model-invocation | true |
Regenerate INDEX.md and all _SUMMARY.md files from the current state of topic files. Does NOT modify any topic content.
PURPOSE: Fix stale indexes, recalculate topic counts, and ensure the knowledge base navigation is accurate.
WHEN TO USE:
knowledge-base/
├── INDEX.md # Master navigation (regenerated)
├── concepts/ # WHAT things are
│ └── _SUMMARY.md # Regenerated
├── flows/ # HOW things work
│ └── _SUMMARY.md # Regenerated
├── implementations/ # WHERE code lives
│ ├── _SUMMARY.md # Regenerated
│ └── {project-name}/ # Per-project patterns
│ └── _SUMMARY.md # Regenerated
├── gotchas/ # WARNINGS
│ └── _SUMMARY.md # Regenerated
└── decisions/ # WHY we chose
└── _SUMMARY.md # Regenerated
Read all .md files in knowledge-base/concepts/ (excluding _SUMMARY.md):
For each topic file, extract:
# {Topic Name} - The topic title**Category:** - Should be "Concept"**Projects:** - Which projects this touches**Last Updated:** - When last modified## What section (for summary)Read all .md files in knowledge-base/flows/ (excluding _SUMMARY.md):
For each topic file, extract:
# {Topic Name} - The topic title**Category:** - Should be "Flow"**Projects:** - Which projects this touches**Last Updated:** - When last modified## Overview section (for summary)For each project folder in knowledge-base/implementations/:
Read all .md files (excluding _SUMMARY.md):
For each topic file, extract:
# {Topic Name} - The topic title**Category:** - Should be "Implementation"**Project:** - Which project this is for**Last Updated:** - When last modified## Overview section (for summary)Read all .md files in knowledge-base/gotchas/ (excluding _SUMMARY.md):
For each topic file, extract:
# {Topic Name} - The topic title**Category:** - Should be "Gotcha"**Severity:** - High/Medium/Low**Projects:** - Which projects this affects**Last Updated:** - When last modified## The Problem section (for summary)Read all .md files in knowledge-base/decisions/ (excluding _SUMMARY.md):
For each topic file, extract:
# ADR-{number}: {Title} - The decision title**Category:** - Should be "Decision (ADR)"**Status:** - Accepted/Superseded/Deprecated**Date:** - When decided**Projects:** - Which projects this affects## Context section (for summary)INVENTORY:
├── concepts: [{filename, title, projects, lastUpdated, summary}]
├── flows: [{filename, title, projects, lastUpdated, summary}]
├── implementations:
│ └── {project-name}: [{filename, title, lastUpdated, summary}]
├── gotchas: [{filename, title, severity, projects, lastUpdated, summary}]
└── decisions: [{filename, title, status, date, projects, summary}]
# Concepts
**Topics:** {count} | **Last Updated:** {most recent date}
## Overview
Core business concepts that define WHAT things are in the system. These are the foundational definitions, schemas, and rules that all other documentation references.
## Reading Order
When learning about a new area, start with the relevant concept file to understand the fundamentals before diving into flows or implementations.
## Topics
| Topic | Summary | Projects |
|-------|---------|----------|
| [{title}]({filename}) | {summary} | {projects} |
# Flows
**Topics:** {count} | **Last Updated:** {most recent date}
## Overview
Cross-cutting processes that document HOW things work end-to-end. These show the sequence of steps, decision points, and data flow across multiple components and services.
## Reading Order
After understanding a concept, read the relevant flow to see how it operates in practice. Flows connect concepts to implementations.
## Topics
| Topic | Summary | Projects |
|-------|---------|----------|
| [{title}]({filename}) | {summary} | {projects} |
# Implementations
**Topics:** {total count} | **Last Updated:** {most recent date}
## Overview
Project-specific implementation patterns that document WHERE and HOW code is organized. Each project has its own sub-section with patterns specific to that codebase and technology stack.
## Projects
| Project | Topics |
|---------|--------|
| [{project-name}]({project-name}/_SUMMARY.md) | {count} topics |
## Reading Order
After understanding concepts and flows, read the implementation for your target project to get project-specific patterns and code examples.
# {Project Name} Implementation Patterns
**Topics:** {count} | **Last Updated:** {most recent date}
## Overview
{Brief project description}.
## Topics
| Topic | Summary |
|-------|---------|
| [{title}]({filename}) | {summary} |
# Gotchas
**Topics:** {count} | **Last Updated:** {most recent date}
## Overview
Known pitfalls, edge cases, and lessons learned. These are warnings that can save significant debugging time. Always check this section before working in an unfamiliar area.
## Severity Levels
- **High**: Can cause data loss, security issues, or major bugs
- **Medium**: Can cause confusing behavior or subtle bugs
- **Low**: Good to know but unlikely to cause major issues
## Topics
| Topic | Severity | Summary |
|-------|----------|---------|
| [{title}]({filename}) | {severity} | {summary} |
# Decisions (ADRs)
**Topics:** {count} | **Last Updated:** {most recent date}
## Overview
Architecture Decision Records documenting WHY key technical decisions were made. These provide historical context and rationale for significant choices.
## ADR Format
Each decision follows the standard ADR format:
- **Context**: What prompted the decision
- **Options Considered**: Alternatives evaluated
- **Decision**: What was chosen
- **Consequences**: Trade-offs and impacts
## Topics
| ADR | Title | Status |
|-----|-------|--------|
| [{number}]({filename}) | {title} | {status} |
Build the full index:
========================================
KNOWLEDGE BASE INDEX REBUILT
========================================
Sections scanned: 5
Total topics found: {count}
Per-section breakdown:
- concepts: {N} topics
- flows: {N} topics
- implementations:
{For each project: - {project-name}: {N} topics}
- gotchas: {N} topics
- decisions: {N} topics
Files regenerated:
- knowledge-base/INDEX.md
- knowledge-base/concepts/_SUMMARY.md
- knowledge-base/flows/_SUMMARY.md
- knowledge-base/implementations/_SUMMARY.md
{For each project: - knowledge-base/implementations/{project-name}/_SUMMARY.md}
- knowledge-base/gotchas/_SUMMARY.md
- knowledge-base/decisions/_SUMMARY.md
========================================