# Sync-Completeness Enforcement Rule -- LLMHosts.com

## ALWAYS APPLY
This rule prevents incomplete cross-system synchronization. It is a MANDATORY checkpoint that runs before declaring any multi-system work complete.

## THE PROBLEM THIS SOLVES
Cross-cutting changes (new systems, architectural shifts, prompt ecosystem updates) historically produced sync gaps: prompts updated but cursor rules missed, CONTEXT.md updated but AGENTS.md missed, code added but pyproject.toml not updated, names colliding across domains. This rule makes such gaps impossible.

## TRIGGER CONDITIONS
This rule activates when ANY of these are true:
1. A new system, package, or major component is added (e.g., Hive.CEO, new epic, new prompt)
2. An existing system is renamed, reorganized, or deprecated
3. Architecture decisions are added or revised (new ADR or ADR revision)
4. A prompt in the aut-o.com ecosystem is created or updated
5. A cross-domain naming term is introduced (could collide with existing terms)
6. Business model, pricing, or user-facing terminology changes
7. Any change touches 3+ of: prompts, cursor rules, docs, code, .hive/

## MANDATORY SYNC-COMPLETENESS AUDIT

Before declaring cross-cutting work DONE, run this checklist. Every item must be explicitly checked (not assumed). Mark each ✓ (done), ✗ (not applicable), or → (action needed).

### Layer 1: Prompt Ecosystem (`/home/dev/projects/admin/aut-o.com/prompts/`)
- [ ] `about.md` -- ecosystem overview updated?
- [ ] `IdeaFactory/idea-factory.md` -- COMPANION PROTOCOLS section updated?
- [ ] `Get-er-DONE/get-er-done.md` -- COMPANION PROTOCOLS section updated?
- [ ] `God-Mode/god-mode.md` -- COMPANION PROTOCOLS section updated?
- [ ] `Meta-Orchestrator/meta-orchestrator.md` -- lifecycle phases updated?
- [ ] `Sentinel/sentinel.md` -- COMPANION PROTOCOLS section updated?
- [ ] `Hive/hive.md` -- cross-references to other prompts correct?
- [ ] Each prompt's VERSION metadata (companion protocols line) lists all 7 prompts?

### Layer 2: LLMHosts.com Cursor Rules (`.cursor/rules/`)
- [ ] `project-context.mdc` -- vision, architecture, knowledge base, constraints sections current?
- [ ] `knowledge-sync.mdc` -- sync matrix, cross-reference index, and staleness rules current?
- [ ] `architecture-decisions.mdc` -- all ADRs listed including Hive ADR-H series?
- [ ] `coding-standards.mdc` -- file structure, conventions, package references current?
- [ ] `sync-completeness.mdc` (this file) -- trigger conditions still comprehensive?

### Layer 3: LLMHosts.com Project Docs
- [ ] `AGENTS.md` -- agent instructions, file locations, tech stack all current?
- [ ] `CONTEXT.md` -- project classification, tech stack, key documents all current?
- [ ] `docs/roadmap/` -- executive, detailed, full-pm reflect changes?
- [ ] `docs/backlog/` -- README index, relevant epics created/updated?
- [ ] `docs/knowledge-base/` -- any new technology needs a deep-dive doc?

### Layer 4: Code & Config
- [ ] `pyproject.toml` -- packages, dependencies, tool config include all packages?
- [ ] `.gitignore` -- any new generated/dynamic files excluded?
- [ ] `docker-compose.yml` -- any new services or volumes needed?
- [ ] `Dockerfile.dev` -- any new system dependencies needed?

### Layer 5: Hive.CEO Identity (`.hive/`)
- [ ] `.hive/identity.md` -- app description and architecture current?
- [ ] `.hive/capabilities.md` -- agent capabilities match hive/ code?
- [ ] `.hive/constraints.md` -- safety rails match current architecture?
- [ ] `.hive/config.yaml` -- model providers and settings current?

### Layer 6: Naming Collision Check
- [ ] Search all docs for the new term -- does it collide with existing terminology?
- [ ] If collision found: add explicit disambiguation notes in ALL affected files
- [ ] Disambiguation pattern: `> **NAMING NOTE**: [Term A] = [definition]. [Term B] = [different definition]. Do not conflate.`

## EXECUTION PROTOCOL

1. **BEFORE starting cross-cutting work**: Identify which layers will be affected. Create a checklist.
2. **DURING work**: Update ALL affected files in each layer before moving to the next task.
3. **BEFORE declaring DONE**: Run the full audit above. Any unchecked → means the work is NOT done.
4. **If you find yourself saying "I'll update that later"**: STOP. Update it NOW. "Later" is how gaps happen.

## ANTI-PATTERNS (NEVER DO THESE)

1. **"Ship now, sync later"** -- NO. Sync is part of shipping. Unsynchronized work is incomplete work.
2. **"It's just a docs update"** -- NO. Docs ARE the codebase for AI agents. Stale docs = broken agents.
3. **"Only the code matters"** -- NO. A code change without cursor rule + AGENTS.md + CONTEXT.md updates means the next AI session starts with stale context and makes wrong decisions.
4. **"I updated the main files"** -- WHICH files? Run the checklist. "Main" is subjective. The checklist is not.
5. **"This change is too small to trigger a full audit"** -- If it touches 3+ systems, it triggers the audit. Period.

## ROOT CAUSE PREVENTION

The sync gaps that created this rule were caused by:
- Completing a large body of work (Hive.CEO) but only updating the NEW files, not cascading to EXISTING files
- Treating prompt ecosystem updates and application docs updates as separate tasks that could be done independently
- Not checking for naming collisions when introducing terms that overlap with existing feature names

This rule exists because: **An agent that doesn't update all affected files hasn't finished its work.**
