2.2 KiB
2.2 KiB
Git Sync Protocol & Repository Structure
The Git repository serves as the Single Source of Truth (SSOT) for all wiki content. This document defines how data is structured and synchronized.
1. Repository Layout
/
├── content/ # All Markdown wiki pages
│ ├── ships/
│ ├── modules/
│ └── ...
├── assets/ # Images, PDFs, and static files
│ ├── images/
│ └── ...
├── schema/ # Shared validation schemas (JSON Schema)
├── metadata/ # Global metadata (e.g., typeID mapping table)
│ └── mapping.json
└── .wikijsignore # Files to be ignored by Wiki.js sync
2. Synchronization Flow
Primary Write Path (Agent -> Git -> Wiki.js)
- Agent Modification: An agent (A, B, or C) generates or updates a Markdown file.
- Local Commit: The agent commits the change to its local clone of the repository.
- Push to Origin: The agent pushes to the
mainbranch. - Wiki.js Sync:
- Wiki.js is configured with the "Git" storage target.
- It pulls changes from the
mainbranch at a set interval (default: 5 minutes) or via Webhook. - Wiki.js renders the new Markdown content in the UI.
Wiki.js to Git (Optional / Prohibited)
- Status: DISABLED
- Rationale: Since human editing is disabled, there should be no writes originating from the Wiki.js UI. This prevents merge conflicts and ensures the Agent pipeline remains the sole source of content.
3. Commit Standards
To ensure a clean audit trail, all commits must follow the Conventional Commits-style with agent identifiers:
Format: [AGENT_ID] action: description (hash: source_hash)
Examples:
[AGENT_A] seed: ships/caldari/condor (hash: sha256_...)[AGENT_B] update: ships/amarr/abaddon (patch: 2026-04-16)[AGENT_G] asset: images/ships/condor.png
4. Conflict Resolution
- Strategy: Last-Write-Wins (LWW) based on Git commit timestamp.
- Merge Logic: Automated merges are preferred. If a conflict occurs (rare in agent-only environments), the pipeline will halt and trigger a "System Alert" for manual intervention.