Skip to content

matt-bat/got-skills / skills/skill-governance

skill-governance

Verified

Govern release-affecting, policy-changing, externally mutating, destructive, or otherwise high-risk work through typed effects, mandatory evidence, independent safety gates, and an explicit go/no-go decision. Do not use for ordinary answers, read-only inspection, tiny reversible edits, or a task made "multi-skill" only by optional process helpers.

FileKindSize
SKILL.mdskill md9.7 KB
fixtures/passed-artifact-evidence.jsonconfig104 B
fixtures/routing-scenarios.jsonconfig44.2 KB
references/governance-artifacts.mdmarkdown5.1 KB
references/risk-and-gates.mdmarkdown4.6 KB
requirements.txtmanifest89 B
schemas/governance-artifact.schema.jsonconfig13.6 KB
schemas/remote-configuration-policy.schema.jsonconfig4.3 KB
schemas/routing-result.schema.jsonconfig7.7 KB
schemas/task-descriptor.schema.jsonconfig13.3 KB
scripts/enforce_governance_ci.pyscript24.4 KB
scripts/generate_governance_artifact.pyscript43.4 KB
scripts/generate_routing_views.pyscript27.6 KB
scripts/governance_common.pyscript14.5 KB
scripts/record_routing_observation.pyscript9.3 KB
scripts/resolve_task_route.pyscript69.4 KB
scripts/validate_governance_artifact.pyscript39.9 KB
scripts/validate_skill_order_sync.pyscript4.0 KB
scripts/validate_skill_policy.pyscript32.3 KB
scripts/verify_remote_configuration.pyscript12.3 KB
tests/test_advanced_svg_render.pyscript5.1 KB
tests/test_conflict_matrix_integrity.pyscript2.1 KB
tests/test_default_skill_quality_gates.pyscript2.9 KB
tests/test_docs_website_navigation.pyscript2.7 KB
tests/test_enforce_governance_scope.pyscript1.7 KB
tests/test_generate_governance_startup.pyscript9.0 KB
tests/test_generate_routing_views.pyscript12.8 KB
tests/test_governance_history_and_pair_integrity.pyscript10.6 KB
tests/test_governance_integrity.pyscript55.7 KB
tests/test_new_skill_integration.pyscript8.3 KB
tests/test_project_index_integrity.pyscript6.4 KB
tests/test_remote_configuration.pyscript5.6 KB
tests/test_routing_observation.pyscript4.3 KB
tests/test_runtime_adapter.pyscript9.2 KB
tests/test_task_routing.pyscript47.5 KB
tests/test_validate_skill_order_sync.pyscript2.4 KB
tests/test_validate_skill_policy_smoke.pyscript869 B

scripts/validate_skill_order_sync.py

View on GitHub
#!/usr/bin/env python3
"""Compatibility check for skill ordering in the two generated catalog views."""

from __future__ import annotations

import argparse
import re
from pathlib import Path


SCRIPT_PATH = Path(__file__).resolve()
DEFAULT_SKILLS_ROOT = SCRIPT_PATH.parents[2]


def parse_args() -> argparse.Namespace:
    parser = argparse.ArgumentParser(description=__doc__)
    parser.add_argument("--skills-root", default=str(DEFAULT_SKILLS_ROOT))
    parser.add_argument("--skill-map-path", default="SKILL-MAP.md")
    parser.add_argument("--skill-index-path", default="docs/skill-index.md")
    return parser.parse_args()


def parse_skill_map_order(path: Path) -> list[str]:
    if not path.exists():
        raise SystemExit(f"Missing skill map file: {path}")
    lines = path.read_text(encoding="utf-8").splitlines()
    in_section = False
    order: list[str] = []
    for raw_line in lines:
        line = raw_line.strip()
        if line in {"## Skill Index", "## Decision Ownership"}:
            in_section = True
            continue
        if in_section and line.startswith("## "):
            break
        if not in_section:
            continue
        match = re.search(r"`([a-z0-9-]+)`", line)
        if match:
            order.append(match.group(1))
    if not order:
        raise SystemExit(f"No skills found in `## Skill Index` section: {path}")
    return order


def parse_skill_index_order(path: Path) -> list[str]:
    if not path.exists():
        raise SystemExit(f"Missing skill index file: {path}")
    lines = path.read_text(encoding="utf-8").splitlines()
    in_table = False
    order: list[str] = []
    for raw_line in lines:
        line = raw_line.strip()
        if line.startswith("| Skill |"):
            in_table = True
            continue
        if not in_table:
            continue
        if not line.startswith("|"):
            if order:
                break
            continue
        if line.startswith("|---"):
            continue
        cells = [cell.strip() for cell in line.strip().strip("|").split("|")]
        if len(cells) < 1:
            continue
        match = re.search(r"`([a-z0-9-]+)`", cells[0])
        skill_name = match.group(1) if match else ""
        if skill_name:
            order.append(skill_name)
    if not order:
        raise SystemExit(f"No skill rows found in index table: {path}")
    return order


def main() -> None:
    args = parse_args()
    skills_root = Path(args.skills_root).resolve()
    skill_map_path = Path(args.skill_map_path)
    if not skill_map_path.is_absolute():
        skill_map_path = skills_root / skill_map_path
    skill_index_path = Path(args.skill_index_path)
    if not skill_index_path.is_absolute():
        skill_index_path = skills_root / skill_index_path

    map_order = parse_skill_map_order(skill_map_path)
    index_order = parse_skill_index_order(skill_index_path)

    errors: list[str] = []
    if len(map_order) != len(index_order):
        errors.append(
            f"Skill count mismatch: SKILL-MAP has {len(map_order)} entries, skill-index has {len(index_order)} entries"
        )

    map_set = set(map_order)
    index_set = set(index_order)
    missing_in_index = sorted(map_set - index_set)
    missing_in_map = sorted(index_set - map_set)
    if missing_in_index:
        errors.append(f"Missing in docs/skill-index.md: {missing_in_index}")
    if missing_in_map:
        errors.append(f"Missing in SKILL-MAP.md: {missing_in_map}")

    max_len = min(len(map_order), len(index_order))
    for idx in range(max_len):
        left = map_order[idx]
        right = index_order[idx]
        if left != right:
            errors.append(f"Order mismatch at position {idx + 1}: SKILL-MAP=`{left}` vs skill-index=`{right}`")

    if errors:
        for err in errors:
            print(f"ERROR: {err}")
        raise SystemExit(1)

    print("Skill ordering sync validation passed.")
    print(f"Checked SKILL-MAP: {skill_map_path}")
    print(f"Checked skill-index: {skill_index_path}")
    print(f"Skill count: {len(map_order)}")


if __name__ == "__main__":
    main()
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall