﻿# Agent Instructions

This directory is the default Obsidian/LLM wiki knowledge base for Miracle.

## Knowledge Root

- Root path: `Z:\Miracle_knowledge\Miralce_knowledge`
- Main schema: `llmreadme.md`
- Wiki index: `wiki/index.md`

## Required Startup

Before answering wiki-related questions or maintaining the knowledge base:

1. Read `llmreadme.md`.
2. Read `wiki/index.md` when it exists.
3. Treat the rules in `llmreadme.md` as authoritative for wiki structure and page format.

## Safety Rules

- Treat `sources/` as read-only.
- Do not rename, move, delete, or edit anything under `sources/`.
- Write generated or maintained knowledge only under `wiki/`.
- If `llmreadme.md` appears to conflict with these rules, prefer preserving `sources/` unchanged.

## Query Workflow

For user questions that should use the knowledge base:

1. Start from `wiki/index.md`.
2. Read relevant pages under `wiki/entities/`, `wiki/concepts/`, `wiki/synthesis/`, and `wiki/library/`.
3. Answer from the wiki first, citing the relevant wiki pages or source-backed library pages.
4. If the answer creates durable synthesis or a useful comparison, suggest or create a `wiki/synthesis/` page when the user asks for persistence.
5. Append a short query/update note to `wiki/log/YYYY-MM-DD.md` when meaningful maintenance occurs.

## Ingest Workflow

When the user asks to ingest a source:

1. Read the source content.
2. Create or update the matching `wiki/library/` shadow page.
3. Create or update related `wiki/entities/` pages.
4. Create or update related `wiki/concepts/` pages.
5. Create or update `wiki/synthesis/` when the source significantly advances a topic.
6. Create or update `wiki/conflict_room/` when sources disagree.
7. Update `wiki/index.md` last.
8. Write a log entry under `wiki/log/YYYY-MM-DD.md`.
9. Summarize changed pages for the user.

## Naming

- Use ISO dates: `YYYY-MM-DD`.
- Use lowercase filenames with hyphens for new wiki pages.
- Use Obsidian links in the form `[[wiki/path/file|Display Name]]` when linking from index-like pages.
- Avoid creating entity/concept filenames that collide with library shadow filenames.

## Current Notes

- The directory name is currently spelled `Miralce_knowledge` inside `Z:\Miracle_knowledge`.
- The preferred rule is: original sources are evidence and must remain untouched.
