This document defines the architecture, rules, and workflows for LLM Agents (like Antigravity, Claude, ChatGPT, etc.) that maintain the Prompt Logic Gates (PLG) Wiki.
As an agent, you must act as a disciplined, automated bookkeeper and synthesizer for the user. Do not delete this file; it serves as your program specification.
All wiki files live in the wiki/ directory. Immutable raw source materials are documented or placed under raw/.
PLG (Project Root)
├── AGENTS.md # This schema definition file (Root level)
├── raw/ # Raw source documents (e.g. Research_Documentation.docx)
└── wiki/ # The compounding visual logic wiki
├── index.md # Content catalog & entrypoint (updated on every ingest)
├── log.md # Append-only chronological log of operations
├── overview.md # Vision, concept, and core logic compiler goals
├── architecture.md # Technical compiler engine, reactive sync, & top-sort order
├── nodes.md # Complete reference guide of custom react-flow nodes & handles
├── compiler.md # Categories, keywords, semantic weights, conflict matrices, & AI prompts
└── workflows.md # How to construct, compile, export, and load prompt circuits
You must follow these precise procedures when the user requests operations.
When a user adds a new raw source (e.g. article, podcast transcript, docx) to their collection:
- Read & Extract: Read the source, extract all primary subjects, style rules, semantic structures, and compiler impacts.
- Review with User: Briefly discuss the core takeaways and how they relate to the PLG visual compiler.
- Write/Modify Subject Pages:
- Update
overview.md,architecture.md,nodes.md,compiler.md, orworkflows.mdif the new source introduces updates. - Create new concept or comparison pages if needed.
- Update
- Update
wiki/index.md: Add any new files with a relative link and a clean 1-line description. - Update
wiki/log.md: Append a new entry using the exact format:## [YYYY-MM-DD] ingest | Title of Source
When the user asks technical questions or requests new logic circuits:
- Index Search: Read
wiki/index.mdfirst to identify target files. - Synthesize & Cite: Read those target files and synthesize a comprehensive answer with direct markdown citations.
- Compound Answers: If the answer is a reusable schematic, a new node custom layout, or a complex logic circuit, save it as a new markdown page in the wiki rather than leaving it in the chat history. Link it in
index.md.
Periodically or upon request, scan the wiki for:
- Broken Links: Any relative markdown link (
[Title](file.md)) pointing to a missing file. - Inconsistencies: Contradictory explanations of gate execution, priorities, or node handles.
- Orphan Pages: Markdown pages in
wiki/that have no incoming links inwiki/index.mdor other pages. - Missing Concepts: Mention of gate types or compiler steps without an active relative link to their reference.
Must be structured under three categories:
- Core Concepts: High-level understanding and design patterns.
- Reference & Engine: Node types, handle specifications, compile scripts, categories.
- Timeline & History: Quick links to log files.
Format every list item precisely:
* [[Page Title](relative_path.md)] - 1-line plain text summary of the page.- Note: Do not wrap the file links in backticks.
Every record must be an append-only block started by a H2 tag of form:
## [YYYY-MM-DD] <operation_type> | <Description>
Valid operation types:
ingest(New source added)refine(Concept page updated)lint(Periodic health-check run)design(Adding new circuit patterns/nodes)
To ensure maximum visual aesthetic and compatibility with tools like Obsidian:
- Relative Linking: Always use standard markdown relative paths (e.g.
[Nodes Reference](nodes.md)). - Yaml Frontmatter: Prefix all concept pages with a clean HSL/Dataview friendly header:
--- category: wiki-concept updated: YYYY-MM-DD tags: [plg, compiler, reference] ---
- Graph Hubs: Make sure pages like
overview.mdconnect toarchitecture.md,nodes.md, andcompiler.mdto form a gorgeous connected star-graph in Obsidian Graph View.