一键导入
audit-context
Run a full project health check across context-engineering, the knowledge base, and docs to surface gaps, drift, and inconsistencies.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run a full project health check across context-engineering, the knowledge base, and docs to surface gaps, drift, and inconsistencies.
用 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.
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.
Capture a complete, durable checkpoint of the current PRP work so a fresh context window can resume with zero loss via /continue-prp.
| name | audit-context |
| description | Run a full project health check across context-engineering, the knowledge base, and docs to surface gaps, drift, and inconsistencies. |
| disable-model-invocation | true |
Comprehensive project-level audit of the entire context-engineering/ system. Validates documentation consistency, status accuracy, feature input lifecycle, code verification, and cross-feature conflicts.
PURPOSE: Catch inconsistencies caused by agents forgetting to update status files, feature inputs not being archived, stale source paths, code changes not matching PRP claims, and project _STATUS.md being out of sync.
WHEN TO USE:
OUTPUT: A categorized report of issues, then offer to fix documentation issues (with user approval). Code issues are flagged for user investigation.
Phased PRPs (folders in context-engineering/PRPs/):
templates/)_STATUS.md is a phased PRPSimple PRPs (files in context-engineering/PRPs/):
.md files directly in the PRPs foldercontext-engineering/feature-inputs/pending/context-engineering/feature-inputs/in-progress/context-engineering/archive/feature-inputs/context-engineering/_STATUS.md completelyCreate an internal inventory:
PHASED PRPs: [{name, folder_path, _status_content}]
SIMPLE PRPs: [{name, file_path, has_status_header, status_value}]
FEATURE INPUTS: [{name, location (pending|in-progress|archive)}]
STATUS ENTRIES: [{name, claimed_status, claimed_phase}]
For EACH phased PRP folder (excluding templates/):
Find the LAST phase folder (highest number). Then check:
Is it actually complete?
COMPLETED.md — is it filled in (has dates, summary, file lists) or still a template?HANDOFF.md — is it filled in or still has {To be filled} placeholders?Cross-check with earlier phases:
Source Document field from _STATUS.md or OVERVIEW.mdarchive/feature-inputs/ and feature-inputs/in-progress/ and feature-inputs/pending/Based on actual status:
archive/feature-inputs/feature-inputs/in-progress/_STATUS.md_STATUS.mdFor each issue found, record:
{
type: "DOC",
prp: "{PRP name}",
issue: "{description}",
current: "{current state}",
expected: "{expected state}",
fix: "{what to do}"
}
For EACH simple PRP file (.md files directly in context-engineering/PRPs/, excluding templates):
Look for these fields at the top of the file:
**Status:** Complete | In Progress | Not Started
**Feature Input:** {path to feature requirements document}
**Last Updated:** {date}
If status header is missing:
Source Requirements, Source Document, or Feature Input fieldarchive/feature-inputs/ for matching filenameSame format as Step 2.6.
in-progress/For each file:
pending/For each file:
/generate-prp)Check if any archived feature inputs DON'T have a corresponding PRP:
For each entry in project _STATUS.md:
Verify each stat:
feature-inputs/pending/knowledge-base/concepts/, knowledge-base/flows/, knowledge-base/implementations/, knowledge-base/gotchas/, knowledge-base/decisions/.md files excluding _SUMMARY.md)_SUMMARY.md exists in each section folderknowledge-base/INDEX.md existsFor each COMPLETED PRP (both phased and simple):
knowledge-base/ for the PRP name in **Source PRPs:** fieldsKB-{N}: Completed PRP "{name}" has no knowledge base entryFor each topic file:
**Last Updated:** date**Source PRPs:** listKB-{N}: Topic "{name}" may be stale (PRP completed after last update)_SUMMARY.md headerINDEX.mdKB-{N}: Index shows {X} topics for {domain} but {Y} existKNOWLEDGE BASE:
Sections: 5 (concepts, flows, implementations, gotchas, decisions)
Total Topics: {count}
PRPs with KB entries: {count}/{total completed PRPs}
Missing entries: {count}
Stale topics: {count}
Index in sync: {yes/no}
{If issues found:}
KB-1: Completed PRP "feature-name" has no knowledge base entry
KB-2: Topic "entity-name" in concepts/ may be stale
KB-3: Index shows 5 topics for concepts but 6 exist
Check if the project-specific AGENTS.md file is up to date with completed PRPs.
For completed PRPs:
AGENTS.md<!-- Added from PRP: ... -->)PROJECT DOCUMENTATION:
AGENTS.md: Up to date | Potentially stale
{If issues found:}
PROJ-1: AGENTS.md may be stale — PRP "{name}" added module but not documented
Use Explore agents to verify PRP-claimed changes exist in the actual source code.
This step validates that what PRPs claim was implemented actually exists. Focus on phased PRPs that are marked as complete or awaiting testing.
Read the HANDOFF.md (or COMPLETED.md) from the final completed phase. Extract:
For each file claimed to be created:
CODE-{N}: {PRP} — Claimed file does not exist: {path}For each file claimed to be modified, pick 1-2 key identifiers from the claimed changes and grep for them:
CONFIG_ENABLED in config.pyCODE-{N}: {PRP} — Expected string "{string}" not found in {file}Build a map of files modified across all complete/active PRPs. For files touched by 2+ PRPs:
CODE-{N}: {file} modified by {PRP-A} and {PRP-B} — changes from {PRP-A} appear missingFor PRPs that claim code removal/cleanup:
CODE-{N}: {PRP} claims removal of {identifier} but it's still present in {file}For simple PRPs with status "Complete":
DO:
DO NOT:
Use Explore agents (Task tool with subagent_type=Explore) to parallelize this work efficiently. Group verifications by project.
For ACTIVE (non-complete) phased PRPs only:
Read the PLAN.md of the current/next pending phase. Extract all file paths that will be modified.
Compare file lists across all active PRPs. Flag files that appear in 2+ active PRPs.
Check if the overlap is already documented in project _STATUS.md's conflict analysis section.
Flag NEW overlaps not already documented:
CONFLICT-{N}: New file overlap between active PRPs
File: {path}
PRPs: {PRP-A Phase X}, {PRP-B Phase Y}
Action: Add to project _STATUS.md conflict analysis
========================================
CONTEXT AUDIT REPORT
========================================
Date: {today's date}
PHASED PRPs: {total found}
Consistent: {count}
Issues found: {count}
SIMPLE PRPs: {total found}
Have status header: {count}
Missing status header: {count}
FEATURE INPUTS:
Pending: {count}
In-Progress: {count}
Archived: {count}
Misplaced: {count}
KNOWLEDGE BASE:
Total topics: {count}
PRPs with KB entries: {count}/{total completed PRPs}
Index in sync: {yes/no}
PROJECT DOCUMENTATION:
AGENTS.md: Up to date | Potentially stale
CODE VERIFICATION:
Files verified: {count}
Missing/inconsistent: {count}
PROJECT _STATUS.md:
Accurate: {yes/no}
Issues: {count}
========================================
DOCUMENTATION ISSUES ({count})
========================================
{For each documentation issue:}
DOC-{N}: {PRP name} - {issue type}
{description}
Current: {current state}
Expected: {expected state}
Fix: {what needs to change}
KB-{N}: {issue description}
PROJ-{N}: {issue type}
========================================
CODE ISSUES ({count})
========================================
{For each code issue:}
CODE-{N}: {PRP name} - {issue type} [{severity}]
{description}
PRP claims: {what the PRP says}
Actual: {what was found in code}
{Severities:}
- CRITICAL: File doesn't exist (implementation may be missing)
- WARNING: Expected content not found (may be overwritten or renamed)
- INFO: Cross-PRP overlap detected (verify both changes present)
========================================
CONFLICT ANALYSIS ({count})
========================================
CONFLICT-{N}: {description}
File: {path}
PRPs: {list}
Status: Already documented / NEW - needs documentation
========================================
SUMMARY
========================================
Total Issues: {count}
Documentation (auto-fixable): {count}
Code (needs investigation): {count}
Conflicts (needs documentation): {count}
{If no issues:}
All clear! Context engineering system is consistent.
{If issues found:}
Would you like me to fix the documentation issues?
- Fix all ({count} documentation fixes)
- Fix specific issues (tell me which DOC numbers)
- Skip (report only)
Note: CODE issues are flagged for your review. They may indicate
incomplete implementations or overwritten changes that need manual
investigation. They are NOT auto-fixed.
CRITICAL: Do NOT fix anything without explicit user approval.
_STATUS.md (status, phase, last updated date)_STATUS.md entries (status, phase, counts)These are reported for the user to investigate manually.
Always re-read a file before editing it. Files may have been modified by earlier fixes in the same run.
After applying fixes, do a quick re-scan to confirm: