009-compile-scope

Compiles XDRS policies into a compiled scope from git, local, and web sources.

1|1|Updated Feb 28, 2026
One-click install
npx skills add https://github.com/flaviostutz/xdrs-core --skill 009-compile-scope-flaviostutz
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: 009-compile-scope
Source: https://github.com/flaviostutz/xdrs-core/tree/main/examples/typed-scope/.xdrs/_core/adrs/principles/skills/009-compile-scope
Command: npx skills add https://github.com/flaviostutz/xdrs-core --skill 009-compile-scope-flaviostutz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @playwright/cli, markitdown, xdrs-core.

What problem does it solve? Keeping a compiled XDRS scope synchronized with its external decision-record sources is manual and error-prone. This Skill automates the full compilation cycle: discovering compilation meta-policies, fetching sources, planning policy changes, migrating policies with source traceability, and validating the result with lint and review. ## Core Features & Use Cases - Source Fetching: Clones git repositories, copies local folders, or scrapes web pages into a temporary workspace, converting PDF, DOCX, XLSX, PPTX, and HTML files to Markdown. - Planned Policy Migration: Produces a CREATE/UPDATE/REMOVE/KEEP plan for user confirmation, then migrates policies one at a time with ## Source sections and **compilation-note:** traceability markers. - Validation and Inconsistency Reporting: Runs xdrs-core lint and the review skill, then documents source inconsistencies in a dedicated policy without inventing fixes. - Use Case: A team maintains an engineering scope compiled from an external standards repository. Run this Skill to re-sync the scope after the upstream repository changes, producing updated policies with full source traceability. ## Quick Start Compile the typed-scope example scope from its configured external sources and update its policies.

Frequently Asked Questions about 009-compile-scope

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compile an XDRS scope from external sources?▼

Declare scope-type: compiled in the scope's index.md and create a meta-policy NNN-core.md with Sources and Selectors sections. Then activate this Skill to fetch sources, plan policy changes, and migrate policies with source traceability.

What source types does XDRS scope compilation support?▼

Compilation supports git URLs cloned with depth 1, local folders copied into a temporary directory, and web URLs scraped via Playwright or a specialized fetch skill. Non-Markdown files like PDF, DOCX, XLSX, and PPTX are converted with markitdown.

Does the compilation skill modify policies without confirmation?▼

No. Phase 2 produces a TODO list marking each policy as CREATE, UPDATE, REMOVE, or KEEP, and the Skill waits for user confirmation before migrating any policies in Phase 3.

What happens when source content is inconsistent or contradictory?▼

The Skill records inconsistencies during migration and review, then documents them in a dedicated NNN-inconsistencies-from-source.md policy listing the source file, affected policy, and description. It never invents fixes for source problems.

Why does compilation fail with a meta-policy error?▼

Compilation aborts if the scope does not declare scope-type: compiled or if no local meta-policy matching NNN-core.md exists in any type folder's principles directory. Create the meta-policy with Sources and Selectors sections first.