# Repos under protocol-audit (framework-only registry)

Per the Framework-First Design Principle, this Layer 0 registry lists **only the framework's own files** participating in the AI AGENT CORE PROTOCOL. Consumer files (Layer 1+) are discovered at audit time via the invocation-point repo's `own-dep-repos` walk — see `## Cross-repo audit discovery (runtime)` below.

## Canonical protocol host

**`AyCode.Core`** — this repo hosts the shared agent skills (`.github/skills/`), the Decision Log (`.github/LLM_PROTOCOL_DECISIONS.md`), and these registry files. All inherit files reference AyCode.Core. Cross-cutting invariants (X1–X3) are skipped for the host itself (it does not cross-reference itself).

If the host designation is ever moved to a different repo, update this section AND the inherit-file substring checked by invariant I1 in `SKILL.md`.

## Framework's own primary protocol files

| # | Name        | Absolute path                               | Layer         | Host |
|---|-------------|---------------------------------------------|---------------|------|
| 1 | AyCode.Core | `H:\Applications\Aycode\Source\AyCode.Core` | framework (0) | ★    |

The instruction file is at `<abs-path>\.github\copilot-instructions.md`.

## Cross-repo audit discovery (runtime)

When `protocol-audit` is invoked from a higher-layer repo (Layer 1+), the skill discovers participating files by walking the invocation-point repo's `own-dep-repos` recursively:

1. Read the invocation-point repo's `.github/copilot-instructions.md` `@repo` block.
2. For each `own-dep-repos` entry, resolve the path relative to the repo root and read that dep's `@repo` block.
3. Continue transitively until no new deps are found.
4. Audit set = {invocation-point repo} ∪ {all walked deps}.

Effective audit scope per invocation:
- From `AyCode.Core` (Layer 0) → audits only `AyCode.Core` (this file's table).
- From `AyCode.Blazor` (Layer 1) → audits `AyCode.Core + AyCode.Blazor`.
- From a Layer 2/3 consumer → audits the full transitive dep tree below it (consumer + all its deps).

The framework cannot directly enumerate consumer files (Framework-First). Higher layers naturally see Layer ≤ N — that's what `own-dep-repos` already encodes.

## File-type classification (by content, not by central registry)

Each discovered file is classified per content inspection:

- **Primary** — contains the `🛑 AI AGENT CORE PROTOCOL (CRITICAL ENFORCEMENT)` header → full invariant set applies (Common + Primary + Cross-cutting).
- **Inherit** — contains the `follows the AI Agent Core Protocol defined in <HOST>` blockquote AND lacks the primary header → reduced invariant set applies (Common + Inherit + Cross-cutting).
- **Unknown** — matches neither pattern → flag as `UNKNOWN` for manual review (do not silently skip).

See `SKILL.md` for the invariant sets.

## Invariants by type

**Primary files** — full invariant set per `SKILL.md`:
- `@repo` block has all 5 required fields (`name`, `prefix`, `type`, `layer`, `own-dep-repos`); paths resolve to existing directories; `prefix` has valid format
- Rule numbering contiguous 1..N; rule count ≥ 5
- Rule #1 uses count+delta format
- Rule #2 contains `CROSS-REPO HARD-GATE` and `PER-QUESTION DOC-FIRST`
- Rule #3 is `STRICT NO-RE-READ POLICY (ANTI-LOOP)` and contains "in context" definition (`lossy compressions`)
- Rule #4 contains auto-detection triggers
- Rule #5 contains broad scope wording (`any file (code, documentation, configuration, memory, or otherwise)`)
- `strictly maintain rule 3` reference exists
- `## Shared Agent Skills` section with all three skills listed (X1)
- `## Protocol History` section referencing `AyCode.Core/.github/LLM_PROTOCOL_DECISIONS.md` (X2)
- Docs-sync rule references the `docs-check` skill (X3)

**Inherit files** — reduced invariant set:
- `@repo` block (if present) has all 5 required fields; paths resolve; `prefix` has valid format
- References AyCode.Core's protocol via substring: `follows the AI Agent Core Protocol defined in AyCode.Core` (I1)
- Does NOT duplicate the numbered Rules #1-5 (I2)
- Has a link to the Decision Log (I3)
- Has `## Shared Agent Skills` section with all three skills listed (X1)
- Has `## Protocol History` section referencing the canonical Decision Log (X2)
- Numbered rules are NOT required (they are inherited from AyCode.Core)

## Known issues

*(No open issues.)*

## Maintenance note

This file lists only the framework's own files. When the framework's own repo set changes (rare — currently a single fixed entry), update the table above. **Consumer participation is auto-discovered** at audit time via `own-dep-repos` walking — no central enumeration of consumer repos is needed here, in line with the Framework-First Design Principle.
