Skip to content
Skill Authoring
Skill

/team-repair

Use when indexes are inconsistent, orphans are detected, after bulk changes to team-ai-directives, or for periodic directives health validation; --build-to-delete proposes rules the model no longer needs; --validate-drafts validates draft files in .adlc/drafts/ without modifying

BOOST
From plugin
adlc-team-skills
14345 skills
Install
$ npx -y skills add tikalk/adlc-team-skills --skill team-repair --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/team-repair

Context preview

The summary Claude sees to decide when to auto-load this skill.

Use when indexes are inconsistent, orphans are detected, after bulk changes to team-ai-directives, or for periodic directives health validation; --build-to-delete proposes rules the model no longer needs; --validate-drafts validates draft files in .adlc/drafts/ without modifying

SKILL.md

team-repair.SKILL.md
name: team-repair
description: Use when indexes are inconsistent, orphans are detected, after bulk changes to team-ai-directives, or for periodic directives health validation; --build-to-delete proposes rules the model no longer needs; --validate-drafts validates draft files in .adlc/drafts/ without modifying them.
disable-model-invocation: true

team-repair

Overview

Re-indexes OKF v0.2 artifacts (`index.md`, `log.md`), derives the flat `CDR.md` inject, rebuilds `.skills.json` and `AGENTS.md` in team-ai-directives to fix inconsistencies, detect orphaned files, and auto-repair issues. Migrates OKF v0.1 frontmatter to v0.2 on every run (always-on, no opt-out). Begins with a health-check phase (Phase 0) that verifies the directives framework is installed, configured, and aligned before performing any repairs.

**Input**: team-ai-directives repository

**Output**: 0. Health check report (7 checks: team AI directives configured, context modules exist, skills registry, OKF log tracking, constitution alignment, OKF v0.2 type field presence, project AGENTS.md directive) 1. Repaired AGENTS.md (if missing or corrupted) 2. Migrated all context module frontmatter from OKF v0.1 to v0.2 (always-on) 3. Rebuilt per-directory `index.md` files (OKF §8 catalog) 4. Rebuilt per-directory `log.md` files (OKF §9 audit trail) 5. Derived `CDR.md` flat table from `index.md` files (for team-boot system prompt injection) 6. Rebuilt .skills.json manifest from skills/ 7. Auto-added OKF v0.2 YAML frontmatter to orphan context modules 8. Auto-generated .skills.json entries for orphan skills 9. Conflict scan across rules (creates conflict CDRs if issues found) 10. Freshness verification (updates `verified` timestamps, flags stale directives) 11. Draft validation report (if `--validate-drafts` — read-only, no modifications) 12. Summary report of all repairs

You are acting as an **Index Repair Specialist** ensuring team-ai-directives indexes are consistent and complete. Your role involves:

  • **Verifying** health checks before repair (Phase 0)
  • **Scanning** context_modules/ and skills/ directories
  • **Detecting** orphan files (missing frontmatter/manifest entries)
  • **Auto-repairing** issues by generating missing metadata
  • **Rebuilding** index files to reflect actual content
  • **Reporting** all changes made

Repair Targets

| Target | Location | Purpose | |--------|----------|---------| | **AGENTS.md** | `{TEAM_AI_DIRECTIVES}/AGENTS.md` | Main instruction file for AI agents | | **index.md** | `{TEAM_AI_DIRECTIVES}/context_modules/**/index.md` | OKF §8 per-directory catalogs (progressive disclosure) | | **log.md** | `{TEAM_AI_DIRECTIVES}/context_modules/**/log.md` | OKF §9 per-directory audit trails | | **CDR.md** | `{TEAM_AI_DIRECTIVES}/CDR.md` | Derived flat table for team-boot system prompt injection (auto-generated from index.md files) | | **.skills.json** | `{TEAM_AI_DIRECTIVES}/.skills.json` | Skills manifest registry |

When to Use

User Input

$ARGUMENTS

You **MUST** consider the user input before proceeding (if not empty).

**Examples of User Input**:

  • `""` - Repair all three indexes (default)
  • `"--dry-run"` - Report only, don't write changes
  • `"--index-only"` - Only rebuild OKF index.md + log.md + derive CDR.md
  • `"--skills-only"` - Only repair .skills.json
  • `"--agents-only"` - Only repair AGENTS.md
  • `"--validate-drafts"` - Validate draft files in .adlc/drafts/ without modifying them
  • Empty input: Repair all indexes with auto-fix (includes v0.1→v0.2 migration)

Flags

| Flag | Description | |------|-------------| | `--dry-run` | Report only, don't write changes | | `--health-only` | Run Phase 0 health check only, then stop. | | `--validate` | Run conflict scan + freshness verification only (Phases 8-9) | | `--conflicts` | Scan for rule conflicts only | | `--freshness` | Verify directive freshness only | | `--build-to-delete` | Run evals without directives to identify candidates for removal (Factor XII) | | `--validate-drafts` | Validate draft files in .adlc/drafts/{adr,pdr,chdr,cdr,evals}/ — validation only, no modifications | | `--update-confidence` | Aggregate usage data from `adlc` branch and update OKF frontmatter confidence scores | | `--ensure-adlc` | Ensure the `adlc` orphan branch exists (create if missing) | | `--index-only` | Only rebuild OKF index.md + log.md + derive CDR.md | | `--skills-only` | Only repair .skills.json | | `--agents-only` | Only repair AGENTS.md | | (default) | Repair all indexes + migrate v0.1→v0.2 + validate conflicts and freshness |

Core Process

Phase 0: Health Check

**Objective**: Run a non-destructive health check against the team directives framework before proceeding with repairs. If any check returns `[FAIL]`, present the report and stop — the framework is not healthy enough to repair safely.

Execute all eight checks below. Each check prints a status line. If any check is `[FAIL]`, abort repair.

Check 1: Team AI Directives Configured

1. Read `.adlc/init-options.json` 2. Verify `team_ai_directives` field exists and points to valid path 3. Check the team AI directives path exists

Output: `[OK]` or `[FAIL]` with reason

Check 2: Context Modules Exist

1. Read `.adlc/init-options.json` → get team AI directives path 2. Verify:

  • `{TEAM_AI_DIRECTIVES}/context_modules/constitution.md`
  • `{TEAM_AI_DIRECTIVES}/context_modules/personas/`
  • `{TEAM_AI_DIRECTIVES}/context_modules/rules/`
  • `{TEAM_AI_DIRECTIVES}/context_modules/examples/`

Output: `[OK]` or `[FAIL]` with reason

Check 3: Skills Registry

  • `{TEAM_AI_DIRECTIVES}/.skills.json` exists and is valid JSON

Output: `[OK]` or `[FAIL]` with reason

Check 4: OKF Log Tracking

  • `{TEAM_AI_DIRECTIVES}/context_modules/rules/log.md` exists
  • `{TEAM_AI_DIRECTIVES}/context_modules/personas/log.md` exists
  • `{TEAM_AI_DIRECTIVES}/context_modules/examples/log.md` exists
  • `{TEAM_AI_DIRECTIVES}/CDR.md` exists (derived artifact)

Output: `[OK]` o

Read more
Ships withadlc-team-skills

Agent skills that give coding agents your team's context at session start, so they stop working like strangers.

Get the whole plugin

Other skills on adlc-team-skills.