Files
APAW/SINGLE_SOURCE_OF_TRUTH.md
Deploy Bot a49686e997 feat: milestone 78 — dashboard freeze + single source of truth pre-commit hook
- Add dashboard::frozen label and moratorium rule
- Create pre-commit hook: kilo-meta.json → auto-sync to all derivatives
- Fix sync script to cover kilo.jsonc and capability-index.yaml
- Remove stale glm-5.1/glm-5 aliases across all config files
- Add SINGLE_SOURCE_OF_TRUTH.md documentation

Issues: #127, #125
2026-06-01 11:59:58 +01:00

1.9 KiB

Single Source of Truth: Agent Definitions

Source of truth: kilo-meta.json

All other files are auto-generated derivatives. Never edit them by hand.

Derivative Files

File Generator Notes
.kilo/agents/*.md scripts/sync-agents.cjs --fix Frontmatter fields synced
.kilo/KILO_SPEC.md scripts/sync-agents.cjs --fix Pipeline Agents + Workflow Commands tables
AGENTS.md scripts/sync-agents.cjs --fix Category tables
kilo.jsonc .git/hooks/pre-commit Agent description, mode, model, color
.kilo/capability-index.yaml .git/hooks/pre-commit model field per agent block

Workflow

  1. Edit only kilo-meta.json.

  2. Stage your changes: git add kilo-meta.json

  3. Commit: git commit

  4. The pre-commit hook auto-generates derivatives and blocks the commit if anything changed.

  5. If the hook printed:

    Pre-commit checks passed.
    

    then the derivatives were already in sync or have been staged automatically by the hook.

    If the hook printed:

    ERROR: Derivative files are out of sync.
    

    then changes were written to disk by the hook. Simply run:

    git add -A
    git commit
    

    (Re-running commit is fine; the second run will see no new diffs and succeed.)

Validation

The hook enforces:

  • YAML frontmatter color is double-quoted and starts with "#
  • mode is subagent or all
  • model exists in kilo-meta.json
  • description is non-empty
  • permission block contains all 7 required keys
  • Fallback model aliases in capability-index.yaml are checked (warnings only)
  • No uncommitted diffs remain after generation (commit blocked if so)

Manual One-Shot

If you need to force-regenerate all derivatives without committing:

node scripts/sync-agents.cjs --fix
python3 .git/hooks/pre-commit      # idempotent