Platform Features
Capabilities the Copilot Governance Platform ships today — governance authoring, PR distribution, local validation, and evidence-based prompt interception. Hook delivery is counted as governed only where the exact client path has a recorded canary. Each feature below links to its implementation.
Looking for phases, metrics and rollout status instead? See the platform documentation.
Approved Workflows
14 reusable prompt workflows in prompts/*.prompt.md. Each one is pinned to the exact instruction packs it must use, so the fix always follows an approved pattern instead of an invented one.
| Workflow | What it does |
|---|---|
/fix-pr-review | Address review feedback with the smallest safe change. |
/fix-security-finding | Fix a security issue using only approved patterns. |
/fix-console-logs | Remove debug code, keep approved logging. |
/fix-sonarqube-issue | Fix code-quality issues using root-cause fixes only, never suppress. |
/fix-eslint-issue | Fix linting errors, trying auto-fix first. |
/fix-test-failure | Fix the root cause of a failing test, never skip it. |
/fix-build-failure | Fix the root cause of a broken build, never the gate. |
/fix-typescript-error | Fix type errors using type-safe patterns only. |
/fix-angular-migration | Migrate Angular code incrementally while preserving behavior. |
/fix-react-code-quality | Fix a React code-quality issue, following existing patterns. |
/fix-java-springboot-security | Fix a Spring Boot security finding using Spring Security, never custom code. |
/generate-unit-tests | Add behavior-focused unit tests with good coverage. |
/document-repo | Write or update developer documentation — document what's there, mark what isn't. |
/explain-legacy-code | Explain what selected legacy code does, not what it should do. |
Run any of them locally with scripts/copilot-gov.sh prompt <workflow>, or trigger them the same way inside VS Code, Copilot CLI or Claude Code once a repo is synced.
Sync & Automation
Governance content reaches downstream repos only through pull requests — never a direct commit to a default branch.
- Sync Script
- Clones each target repo and updates
copilot-instructions.md,instructions/*,prompts/*,prompt-core/*andhooks/*, then opens or updates a PR. scripts/sync-copilot-instructions.sh - Target List
- The repos a sync run ships to. repos.json
- Manifest Tracking
- Records exactly what was shipped, so a file removed centrally is removed downstream on the next sync — without touching content the repo added itself. scripts/sync-manifest.mjs
- GitHub Actions Workflow
- Runs on every push to a governed path, on manual dispatch with an optional single-repo filter, and on a weekly Monday 03:00 UTC cron as a safety net for closed or ignored PRs. .github/workflows/sync-copilot-instructions.yml
- Review Gate
- Governance file changes always route to the governance team. .github/CODEOWNERS
Local CLI
One command surface, two implementations with full parity — bash for macOS/Linux/WSL/Git Bash, PowerShell for Windows without WSL.
| Command | What it does |
|---|---|
doctor | Show local tool readiness. |
validate | Validate governance repository assets — see Content Enforcement below. |
audit | Scan the current repo for common quality issues. |
prompt <workflow> | Print an approved prompt workflow. |
rewrite "<text>" | Preview how the interception kernel would govern a given prompt. |
simulate "<text>" | Replay the hook on every surface — no IDE required. |
report | Summarize local prompt-interception telemetry. |
sync --dry-run | Preview a governance sync without opening a PR. |
sync --apply | Apply governance sync through PR automation (needs GH_TOKEN + GH_ORG). |
install-hooks | Install the local pre-commit validation hook. |
Content Enforcement
validate, and the pre-commit hook it powers, enforce every file that gets auto-injected into a Copilot request before it can ship.
300 words per file by default (override with TOKEN_BUDGET_WORDS). security.instructions.md and code-quality.instructions.md carry documented higher ceilings since exhaustive coverage is their purpose.
Blocks unresolved template placeholders from ever shipping to a governed repo.
Blocks literal-looking hardcoded secrets in governance content itself.
The bash validator warns on verbatim duplicate phrasing across instruction files, to keep the injected content lean.
Pre-commit hook — scripts/hooks/pre-commit, installed with copilot-gov.sh install-hooks, runs validate before every commit so a budget or secret violation never leaves a developer's machine. See docs/demo.md for what it caught the first time it ran.
Prompt Interception Kernel
PIK v2 verifies signed policy pack v3.2.0, evaluates 28 independent contracts, composes surface-specific output and writes metadata-only audit records. Twenty-one approved mandatory rules are source-configured for enforce mode; seven legacy rules remain evidence-gated in shadow. Full engineering status is on the docs home.
core.md
The governance core: non-negotiable rules injected into every governed prompt, regardless of intent.
router.json
Intent classifier — weighted regex signal scoring picks the matched workflow; ties break by file order.
deny.json
Twenty-eight versioned policy contracts: 21 mandatory blockers in enforce mode and seven legacy broad-signal rules retained in shadow.
rewrite.mjs
Zero-package engine: verify the policy pack → create an envelope → evaluate independent rules → classify → compose → write metadata-only local audit.
context-optimizer.mjs
Trims the composed prompt to fit the target surface's character budget without dropping required sections.
repo-profile.mjs
Detects the repo's real stack — Node runtime deps, framework signals — so only relevant instructions get matched.
skill-selector.mjs
Matches governed skills to intent + repo profile, verifying each against skill-lock.json before inclusion — fails closed on any mismatch.
surfaces.json
Capability records for VS Code, Claude Code, Copilot SDK and configured Copilot CLI hooks — including observe-only and unsupported paths.
Signed Policy Pack
Ed25519 signature verification, checksums, validity windows, anti-downgrade logic, background refresh and a 24-hour last-known-good grace.
Evidence-Gated Promotion
Requires 206 true positives from 210 independent reviews, Wilson lower bound, fixture, latency, degraded-rate, disagreement and game-day gates.
Privacy-Safe Event Buffer
Asynchronous bounded rotation, concurrent append locking, stale-lock recovery, strict metadata allowlists and optional AES-256-GCM encryption.
Feedback & Review Labels
Structured agree/disagree/uncertain feedback, safe reason codes, two independent reviewers, adjudication and conservative local sanitization.
Shipped Hook Configs
Skill Registry
A governed catalog of reusable skills Copilot may pull into a prompt — scoped by stack and intent, and integrity-locked so nothing unapproved gets injected.
- Approved Catalog
- Per-skill status, risk level, allowed stacks and intents, a character budget, and a
requiresHumanReviewflag. At most 2 skills are injected into any one prompt. skill-registry/approved-skills.json - Integrity Lock
- A SHA-256 hash, approver and approval date for every skill.
skill-selector.mjsfails closed — rejecting all skills — if the lock file is missing or a hash doesn't match. skill-registry/skill-lock.json - 7 Curated Skills
- Internally reviewed content for code-review-and-quality, context-engineering, debugging-and-error-recovery, deprecation-and-migration, incremental-implementation, security-and-hardening, and test-driven-development. skill-registry/compact/
- Upstream Attribution
- Externally sourced skill content, kept with its license and source recorded. skill-registry/ATTRIBUTION.md · skill-registry/upstream/
- Registry Validator
- Checks every registry entry against the lock file before it can ship. scripts/validate-skill-registry.mjs
Testing
The complete Node suite executes 238 tests: 237 pass and one Windows symlink case is skipped when administrator privileges are unavailable. It covers the 21-rule mandatory baseline, remediation-safe negatives, cross-platform signed-policy integrity, rollback, audit privacy, evidence gates, hook contracts and sync lifecycle.
Documentation Site
The platform documents itself — a static, dependency-free docs shell published straight from /docs on GitHub Pages.
- Docs Home
- Architecture, MVP phases, the Phase 5 kernel brief, guardrails and rollout metrics — searchable sidebar, scrollspy, and light/dark theme with no build step. docs/index.html
- Feature Catalog
- This page — every feature, linked to its implementing file.
docs/features.html - PDF Generator
- Renders a documentation page to PDF for offline/approval submission. scripts/generate-docs-pdf.mjs
- Diagrams & Source Docs
- Architecture diagrams plus repository-truth records for PIK v2 delivery, topology, privacy, thresholds, pilot risk and task effectiveness. PIK v2 delivery status