From 5e252412d4511fa22bc396c14ae8d62f3a4dd988 Mon Sep 17 00:00:00 2001 From: Matteo Cherubini Date: Fri, 8 May 2026 22:10:25 +0200 Subject: [PATCH] refactor: Update wiki index and logging templates to support agent protocols --- templates/wiki-index.md | 24 +++++++++++++++---- templates/wiki-log.md | 52 ++++++++++++++++++++++++++++++++--------- 2 files changed, 60 insertions(+), 16 deletions(-) diff --git a/templates/wiki-index.md b/templates/wiki-index.md index 39c43f6..875ec9c 100644 --- a/templates/wiki-index.md +++ b/templates/wiki-index.md @@ -9,21 +9,35 @@ private: false # Master Index: {{GENOME_NAME}} **[AGENT INSTRUCTION]** -Maintain strict alphabetical sorting within each section. Ensure the `last_updated` YAML field is modified upon every edit. Use only `[[slug]] - Summary` format. +This is the primary navigation file. Read it first on every session before accessing individual pages. +Maintain strict alphabetical sorting within each section. +Update `last_updated` in the YAML frontmatter on every edit. +Entry format: `- [[folder/slug]] — One-line summary. \`maturity: \`` --- ## Sources (`wiki/sources/`) -*Ingested raw materials.* +*Ingested raw materials. One entry per processed source.* ## Entities (`wiki/entities/`) -*People, organizations, tools.* +*People, organisations, tools, projects.* ## Concepts (`wiki/concepts/`) -*Theories, methodologies, architecture.* +*Theories, methodologies, patterns, architectural decisions.* + + +## Queries (`wiki/queries/`) +*Synthesised answers worth preserving. Archived explorations and analyses.* + + +## Conflicts Pending Review (`wiki/queries/conflict-*.md`) +*Created automatically when the agent detects contradictions between sources.* +*Do not summarise entries here — list slugs only to avoid surfacing unresolved claims.* +*Remove entry once the operator has resolved and closed the corresponding PR.* ## Private Synthesis (`wiki/private/`) -*Restricted access. Use slug names ONLY. Do not append summaries to prevent metadata leakage.* +*Restricted access. Requires `PRIVATE_CONTEXT: enabled` and unlocked repo.* +*List slug names ONLY. Do not append summaries — prevents metadata leakage.* diff --git a/templates/wiki-log.md b/templates/wiki-log.md index 96e6008..ff5d2c4 100644 --- a/templates/wiki-log.md +++ b/templates/wiki-log.md @@ -8,17 +8,47 @@ private: false # Operations Log: {{GENOME_NAME}} **[AGENT INSTRUCTION]** - -This is an append-only system ledger. Do not edit previous lines. - -Append new entries strictly using the following format: - -```text -YYYY-MM-DD | [TYPE] | [AUTHOR] | Message -``` - -*(Valid TYPEs: INGEST, LINT, QUERY, CONFIG, SECURITY)* +This is an append-only system ledger. Never edit or delete previous entries. +Append new entries at the bottom using the format defined below. --- -2024-05-08 | [CONFIG] | SYSTEM | Genome Scaffolded. Directory structure and encryption layer initialized. +## Entry Format + +### Required header (enables shell parsing): +```text +## [YYYY-MM-DD] TYPE | Subject or title +``` + +### Required metadata block for all agent-generated entries: +```markdown +- run_id: `` +- model: `` +- context_read: `[[path/A]]`, `[[path/B]]` +- output_written: `[[path/C]]`, `[[path/D]]` +- reasoning: One sentence explaining what changed and why. +``` + +**Valid TYPEs:** `INGEST` | `LINT` | `QUERY` | `CONFLICT` | `CONFIG` | `SECURITY` + +**Parse examples:** +```bash +# Last 5 entries +grep "^## \[" wiki/log.md | tail -5 + +# All CONFLICT entries +grep "^## \[" wiki/log.md | grep "CONFLICT" + +# All entries from a specific date +grep "^## \[2026-05" wiki/log.md +``` + +--- + +## [{{DATE}}] CONFIG | Genome scaffolded + +- run_id: `system-init` +- model: `setup-knowledge-genome.sh` +- context_read: *(none — initial scaffold)* +- output_written: `[[wiki/index.md]]`, `[[wiki/log.md]]`, `[[AGENTS.md]]` +- reasoning: Initial directory structure and encryption layer initialized by setup script.