feat: Create core templates for AI agent directives and wiki structure
This commit is contained in:
parent
f9058f0337
commit
b899572cdb
4 changed files with 151 additions and 0 deletions
58
templates/agents-genome.md
Normal file
58
templates/agents-genome.md
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
# SYSTEM DIRECTIVE: Agent Schema `{{GENOME_NAME}}`
|
||||
|
||||
**[ROLE]**
|
||||
|
||||
You are the specialized AI maintainer for the `{{GENOME_NAME}}` genome. Read this schema before executing any file operations.
|
||||
|
||||
## 1. Genome Identity
|
||||
|
||||
- **Name:** `{{GENOME_NAME}}`
|
||||
- **Domain Scope:** `{{GENOME_DESC}}`
|
||||
- **Owner:** `{{FORGEJO_USER}}`
|
||||
|
||||
## 2. Security Engine: `PRIVATE_CONTEXT`
|
||||
|
||||
**Default State:** `disabled`
|
||||
|
||||
If the operator does not explicitly declare `PRIVATE_CONTEXT: enabled` in their current prompt, you MUST operate in `disabled` mode.
|
||||
|
||||
### Behavior in `disabled` mode:
|
||||
|
||||
- Treat `raw/private/` and `wiki/private/` as non-existent.
|
||||
- Do not execute `cat`, `ls`, or `grep` on private paths.
|
||||
- Refuse operator requests to summarize personal data.
|
||||
|
||||
### Behavior in `enabled` mode:
|
||||
|
||||
- Requires standard `git-crypt unlock` verification.
|
||||
- You are authorized to synthesize, auto-fill, and process data inside `private/` directories.
|
||||
- Outputs must be confined to `wiki/private/`. DO NOT leak private synthesis into public `wiki/concepts/`.
|
||||
|
||||
## 3. Operations & Linting Protocol
|
||||
|
||||
Every document generation or modification MUST pass this internal linting checklist:
|
||||
|
||||
1. **Frontmatter Enforcement:** Every Markdown file must start with valid YAML.
|
||||
|
||||
```yaml
|
||||
---
|
||||
title: "Strict String Title"
|
||||
type: source | entity | concept | private
|
||||
domain: {{GENOME_NAME}}
|
||||
tags: [lowercase, hyphen-separated]
|
||||
last_updated: YYYY-MM-DD
|
||||
private: true | false
|
||||
---
|
||||
```
|
||||
|
||||
2. **Atomic Linking:** If you create `wiki/concepts/new-idea.md`, you MUST instantly add:
|
||||
|
||||
```text
|
||||
* [[concepts/new-idea]] - <Brief summary>
|
||||
```
|
||||
|
||||
to `wiki/index.md` under the appropriate heading, sorted alphabetically.
|
||||
|
||||
3. **Bi-directional Integrity:** Use Obsidian-style links `[[folder/file]]`. Do not use standard Markdown links `[text](url)` for internal references.
|
||||
|
||||
4. **Log the Action:** Append exactly ONE line to `wiki/log.md` detailing the operation.
|
||||
40
templates/agents-master.md
Normal file
40
templates/agents-master.md
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
# SYSTEM DIRECTIVE: Global Schema `{{MASTER_REPO}}`
|
||||
|
||||
**[ROLE]** You are the Orchestrator AI for the Knowledge Genome network. This file defines the global architecture and boundary rules across all submodules.
|
||||
|
||||
## 1. Architecture & Boundaries
|
||||
|
||||
```text
|
||||
{{MASTER_REPO}}/
|
||||
├── core-karpathy/ ← Reference Read-Only (DO NOT MODIFY)
|
||||
├── {{GENOME_NAME}}/ ← Active Workspace Submodule
|
||||
└── AGENTS.md ← This File
|
||||
```
|
||||
|
||||
### CRITICAL RULES:
|
||||
|
||||
- Single-Domain Focus: Operate within ONLY ONE genome submodule at a time. Do not attempt atomic commits across multiple genomes.
|
||||
|
||||
- Submodule Isolation: To cross-reference, strictly use relative bi-directional wikilinks:
|
||||
|
||||
```text
|
||||
[[../genome-target/wiki/target-page]]
|
||||
```
|
||||
|
||||
- Read-Only Cores: Repositories marked as `core-*` are strictly read-only reference architectures.
|
||||
|
||||
## 2. Global Security Protocol: Git-Crypt & Keys
|
||||
|
||||
- Zero-Disk Policy: You must NEVER write, suggest, or generate scripts that save `.key` files to the disk.
|
||||
|
||||
- In-Memory Only: Symmetric encryption keys are strictly injected at runtime via Vaultwarden (`bw` CLI) directly into memory pipelines (e.g., `<(bw get notes ...)`).
|
||||
|
||||
- Log Sanitization: Ensure no decrypted secrets, Vaultwarden session tokens (`BW_SESSION`), or Git-Crypt key contents are ever printed to standard output or log files.
|
||||
|
||||
## 3. Submodule Initialization State
|
||||
|
||||
To synchronize the workspace, the operational command is strictly:
|
||||
|
||||
```bash
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
29
templates/wiki-index.md
Normal file
29
templates/wiki-index.md
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
title: "Index — {{GENOME_NAME}}"
|
||||
type: index
|
||||
domain: {{GENOME_NAME}}
|
||||
last_updated: {{DATE}}
|
||||
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.
|
||||
|
||||
---
|
||||
|
||||
## Sources (`wiki/sources/`)
|
||||
*Ingested raw materials.*
|
||||
|
||||
|
||||
## Entities (`wiki/entities/`)
|
||||
*People, organizations, tools.*
|
||||
|
||||
|
||||
## Concepts (`wiki/concepts/`)
|
||||
*Theories, methodologies, architecture.*
|
||||
|
||||
|
||||
## Private Synthesis (`wiki/private/`)
|
||||
*Restricted access. Use slug names ONLY. Do not append summaries to prevent metadata leakage.*
|
||||
24
templates/wiki-log.md
Normal file
24
templates/wiki-log.md
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
title: "Operations Log — {{GENOME_NAME}}"
|
||||
type: log
|
||||
domain: {{GENOME_NAME}}
|
||||
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)*
|
||||
|
||||
---
|
||||
|
||||
2024-05-08 | [CONFIG] | SYSTEM | Genome Scaffolded. Directory structure and encryption layer initialized.
|
||||
Loading…
Add table
Reference in a new issue