Workflow for refactoring discipline-level guides (e.g., JavaScript, CSS) to remove "Common Knowledge" by generating and comparing against model-specific "Knowledge Mirrors".
curl -fsSL https://cookapps.net/api/skills/install?skills=••••••• | nodeA discipline guide serves as the conceptual orientation "hub" for a category or domain, establishing the coding agent's mental model and routing to granular use-case subguides via the {{ GUIDE_REF("guide-slug") }} macro. A guide is recognized as a discipline guide once registered in DISCIPLINE_GUIDES in [src/core/guide-validation.ts](../../../src/core/guide-validation.ts), which includes:
guides/css/css/guide.md).guides/wasm/cpp-on-the-web/guide.md).Discipline guides are exempt from the description and web-feature-ids frontmatter requirements and are reported as bundled core guides by src/build/audit-build.ts.
This skill also facilitates the "Differential Knowledge Refactor" of discipline guides to ensure they remain lean, context-efficient, and strictly additive to what modern AI models already know natively.
The goal is to aggressively "whittle down" a target guide (the Target) by removing any content that is natively understood by modern coding models.
Use the provided script to generate "Redundancy Mirrors"—comprehensive guides of what Gemini, Claude, and Codex consider "Common Knowledge" for a given discipline, and intersect them into a single LCD mirror.
# Ensure that model setup is configured (instructions are in the top level readme) node .agents/skills/project-discipline-guides/scripts/generate_mirrors.ts <discipline_name>
This will create files inside the .agents/skills/project-discipline-guides/mirrors/ directory:
mirrors/<discipline>/gemini_mirror.md (via Gemini - temporary)mirrors/<discipline>/claude_mirror.md (via Claude - temporary)mirrors/<discipline>/codex_mirror.md (via Codex - temporary)mirrors/<discipline>/mirror.md (Unified Redundancy Mirror intersection)[!IMPORTANT]
Ensure that the unified Redundancy Mirror (.agents/skills/project-discipline-guides/mirrors/<discipline>/mirror.md) has been successfully generated. This mirror represents the exact mathematical intersection of all three source models, preventing pruning errors and reducing context window overhead.As the agent, read the Target guide and the unified Redundancy Mirror (.agents/skills/project-discipline-guides/mirrors/<discipline>/mirror.md).
[!WARNING]
Keep the Refactor Scoped: The primary and sole goal of this skill is reduction of redundant common knowledge. Do not add new rules, modify logic, or introduce unrelated guidelines in this refactoring pass. Keep the changes highly focused and easy to review.
Perform the cleanup on the Target file. Aim for surgical edits that preserve the file's structure while removing unnecessary content.
In your response, provide an explanation of the changes made and the rationale for what was removed or kept.
After applying edits, perform a self-verification:
Object.groupBy()) were not accidentally removed.Get instant access to complete setup guides, repository source code, and integration assets.
OWASP Top 10 mitigation, secret scanning, dependency vulnerability audit rules, least privilege access, and secure coding practices.