Feat: Implement V2 Protocol Build System - #158
Conversation
This commit introduces a complete overhaul of how agent protocols are managed, moving from a single, monolithic AGENTS.md file to a modern, source-controlled build system. This change addresses critical issues of merge conflicts, verifiability, security, and machine-readability that were present in the previous flat-file system.
The new system is built around the following core components:
1. **Protocol Source Files:**
- Protocols are now defined in structured `.protocol.json` files, which serve as the single source of truth.
- These source files are validated against a formal JSON schema (`protocols/protocol.schema.json`) to ensure structural integrity and prevent errors before runtime.
2. **Hierarchical Build System:**
- A new script, `tooling/hierarchical_compiler.py`, orchestrates the entire build process.
- It recursively finds all `protocols` subdirectories and runs a `tooling/compiler.py` on each one.
- This generates scoped `AGENTS.md` files (e.g., `core/AGENTS.md`), allowing for context-specific protocols that apply only to certain parts of the codebase.
3. **Knowledge Graph Generation:**
- The build process now generates a `protocols.ttl` file in the root directory.
- This file is a formal RDF knowledge graph of all protocols, their rules, and their associated tools, created by `tooling/knowledge_graph_generator.py`.
- This restores the critical capability for the agent to perform machine reasoning and introspection on its own rules.
4. **Self-Modification Protocol:**
- A new meta-protocol (`self-modification-001`) has been introduced to govern how the agent modifies the protocol system itself.
- This establishes a recursive self-improvement loop, ensuring that all future changes to the system follow the new, robust process.
By treating protocols as source code and `AGENTS.md` as a build artifact, this new system makes the agent's governing rules more dynamic, merge-friendly, and powerful.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. |
|
To generate Unit Tests for this PR, please click here. |
This change refactors the AGENTS.md system into a robust, verifiable build process. It introduces protocol source files, a hierarchical compiler, and knowledge graph generation to make the agent's governing rules more dynamic, merge-friendly, and powerful.
PR created automatically by Jules for task 14205341405984497837