diff --git a/AGENTS.md b/AGENTS.md
index 858cfd20..0673f655 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -80,4 +80,5 @@ This repository uses a hierarchical protocol system. Each of the following direc
- [Compliance](protocols/compliance/AGENTS.md)
- [Core](protocols/core/AGENTS.md)
- [Critic](protocols/critic/AGENTS.md)
-- [Security](protocols/security/AGENTS.md)
\ No newline at end of file
+- [Security](protocols/security/AGENTS.md)
+- [Self_improvement](protocols/self_improvement/AGENTS.md)
\ No newline at end of file
diff --git a/build_config.json b/build_config.json
index fa1efb21..57307b5b 100644
--- a/build_config.json
+++ b/build_config.json
@@ -20,6 +20,11 @@
"command": "python3 -m unittest discover -v .",
"description": "Runs all unit tests in the repository."
},
+ "test:protocols": {
+ "type": "command",
+ "command": "python3 -m unittest discover -v tests/protocols",
+ "description": "Runs all protocol tests."
+ },
"docs": {
"type": "compiler",
"compiler": "tooling/doc_builder.py",
@@ -98,6 +103,6 @@
},
"build_groups": {
"all": ["docs", "security", "agents", "readme", "pages", "doc-tooling"],
- "quality": ["format", "lint", "test"]
+ "quality": ["format", "lint", "test", "test:protocols"]
}
}
\ No newline at end of file
diff --git a/critic/protocols/critic-meta-protocol-001.protocol.json b/critic/protocols/critic-meta-protocol-001.protocol.json
index 0734ff81..1fcae22c 100644
--- a/critic/protocols/critic-meta-protocol-001.protocol.json
+++ b/critic/protocols/critic-meta-protocol-001.protocol.json
@@ -1,5 +1,6 @@
{
"protocol_id": "critic-meta-protocol-001",
+ "version": "1.0.0",
"description": "A meta-protocol that governs the behavior and evaluation criteria of the Code Review Critic agent.",
"rules": [
{
diff --git a/critic/protocols/critic-reset-prohibition-001.protocol.json b/critic/protocols/critic-reset-prohibition-001.protocol.json
index 06c83d87..07d6b520 100644
--- a/critic/protocols/critic-reset-prohibition-001.protocol.json
+++ b/critic/protocols/critic-reset-prohibition-001.protocol.json
@@ -1,5 +1,6 @@
{
"protocol_id": "critic-reset-prohibition-001",
+ "version": "1.0.0",
"description": "A specific, high-priority protocol that forbids the Code Review Critic agent from using the 'reset_all' tool.",
"rules": [
{
diff --git a/knowledge_core/protocols.ttl b/knowledge_core/protocols.ttl
index 99320798..d7186279 100644
--- a/knowledge_core/protocols.ttl
+++ b/knowledge_core/protocols.ttl
@@ -1,429 +1,261 @@
-@prefix proto: .
-@prefix schema: .
-
- proto:associatedTool ,
- ,
- ,
- ,
- ,
- ,
- ;
- proto:hasRule ;
- schema:description "A set of best practices derived from observing successful, data-driven workflow patterns." .
-
- proto:associatedTool ;
- proto:hasRule ;
- schema:description "A meta-protocol governing the agent's awareness and maintenance of its own core protocol files." .
-
- proto:hasRule ,
- ,
- ,
- ,
- ;
- schema:description "A protocol that defines non-compliance with AGENTS.md and specifies corrective actions." .
-
- proto:associatedTool ,
- ;
- proto:hasRule ;
- schema:description "Defines the mandatory pre-commit checks to ensure code quality, correctness, and readiness for submission." .
-
- proto:associatedTool ;
- proto:hasRule ;
- schema:description "A high-priority protocol that unconditionally forbids the use of the `reset_all` tool." .
-
- proto:hasRule ,
- ;
- schema:description "Defines the identity and versioning of the Advanced Orientation and Research Protocol (AORP)." .
-
- proto:associatedTool ,
- ;
- proto:hasRule ,
- ;
- schema:description "Defines the Context-Free Development Cycle (CFDC), a hierarchical planning and execution model." .
-
- proto:associatedTool ;
- proto:hasRule ;
- schema:description "The mandatory first action for any new task, ensuring a formal start to the Finite Development Cycle (FDC)." .
-
- proto:associatedTool ,
- ;
- proto:hasRule ,
- ,
- ;
- schema:description "Ensures all development processes are formally decidable and computationally tractable." .
-
- proto:associatedTool ,
- ,
- ;
- proto:hasRule ;
- schema:description "A standardized, callable plan for conducting in-depth research on a complex topic." .
-
- proto:associatedTool ,
- ,
- ,
- ,
- ,
- ,
- ;
- proto:hasRule ,
- ,
- ,
- ,
- ,
- ;
- schema:description "Defines the Finite Development Cycle (FDC), a formally defined process for executing a single, coherent task." .
-
- proto:associatedTool ,
- ,
- ;
- proto:hasRule ,
- ,
- ,
- ;
- schema:description "Defines the mandatory, four-tiered orientation cascade that must be executed at the start of any task to establish a coherent model of the agent's identity, environment, and the world state." .
-
- proto:associatedTool ,
- ,
- ;
- proto:hasRule ,
- ,
- ;
- schema:description "Defines a central registry for discovering and executing hierarchical plans by a logical name." .
-
- proto:associatedTool ,
- ,
- ,
- ;
- proto:hasRule ,
- ,
- ;
- schema:description "Defines the formal Finite Development Cycle (FDC) for conducting deep research." .
-
- proto:associatedTool ,
- ;
- proto:hasRule ;
- schema:description "A protocol for conducting systematic research using the integrated research toolchain." .
-
- proto:associatedTool ,
- ,
- ,
- ,
- ;
- proto:hasRule ,
- ,
- ,
- ,
- ;
- schema:description "Defines the automated, closed-loop workflow for protocol self-correction." .
-
- proto:associatedTool ,
- ,
- ;
- proto:hasRule ,
- ,
- ;
- schema:description "A set of non-negotiable, high-priority mandates that govern the agent's behavior across all tasks." .
-
- proto:hasRule ,
- ,
- ;
- schema:description "A meta-protocol that governs the behavior and evaluation criteria of the Code Review Critic agent." .
-
- proto:associatedTool ;
- proto:hasRule ;
- schema:description "A specific, high-priority protocol that forbids the Code Review Critic agent from using the 'reset_all' tool." .
-
- proto:associatedTool ;
- proto:hasRule ;
- schema:description "A foundational protocol that dictates the agent's initial actions upon starting any task." .
-
- proto:associatedTool ,
- ;
- proto:hasRule ,
- ;
- schema:description "A protocol governing the agent's core interaction and planning tools." .
-
- proto:associatedTool ;
- proto:hasRule ;
- schema:description "A protocol governing the use of the interactive agent shell as the primary entry point for all tasks." .
-
- proto:associatedTool ;
- proto:hasRule ;
- schema:description "A protocol for executing Aura scripts, enabling a more expressive and powerful planning and automation language for the agent." .
-
- proto:associatedTool ;
- proto:hasRule ;
- schema:description "A protocol for using the capability verifier tool to empirically test the agent's monotonic improvement." .
-
- proto:associatedTool ;
- proto:hasRule ,
- ,
- ;
- schema:description "A protocol for the Context-Sensitive Development Cycle (CSDC), which introduces development models based on logical constraints." .
-
- proto:associatedTool ;
- proto:hasRule ;
- schema:description "A protocol for ensuring a reliable execution environment through formal dependency management." .
-
- proto:associatedTool ;
- proto:hasRule ;
- schema:description "An experimental protocol to test dynamic rule-following. It mandates a prologue action before file creation." .
-
- proto:associatedTool ;
- proto:hasRule ;
- schema:description "A protocol for maintaining an up-to-date file index to accelerate tool performance." .
-
- proto:associatedTool ;
- proto:hasRule ;
- schema:description "A protocol for interacting with the Hypersequent-calculus-based logic engine, allowing the agent to perform formal logical proofs." .
-
- proto:associatedTool ;
- proto:hasRule ;
- schema:description "A protocol for executing pLLLU scripts, enabling a more expressive and powerful planning and automation language for the agent." .
-
- schema:description "Defines the identity and purpose of the Security Protocol document." .
-
- proto:hasRule ,
- ;
- schema:description "Defines the official policy and procedure for reporting security vulnerabilities." .
-
- proto:associatedTool ,
- ,
- ;
- proto:hasRule ,
- ,
- ,
- ,
- ;
- schema:description "A protocol that governs the agent's ability to initiate and execute self-generated, creative, or exploratory tasks during idle periods." .
+@prefix ns1: .
+@prefix rdfs: .
- proto:associatedTool ,
- ,
- ;
- proto:hasRule ;
- schema:description "A meta-protocol to ensure the agent's toolchain remains synchronized with the architecture of its governing protocols." .
+ a ns1:Protocol ;
+ rdfs:label "A foundational protocol that dictates the agent's initial actions upon starting any task." ;
+ ns1:hasVersion .
- proto:associatedTool ;
- proto:hasRule ;
- schema:description "A protocol for the unified repository auditing tool, which combines multiple health and compliance checks into a single interface." .
+ a ns1:Protocol ;
+ rdfs:label "A protocol governing the agent's core interaction and planning tools." ;
+ ns1:hasVersion .
- proto:associatedTool ;
- proto:hasRule ;
- schema:description "A protocol for the unified documentation builder, which generates various documentation artifacts from the repository's sources of truth." .
+ a ns1:Protocol ;
+ rdfs:label "A protocol governing the use of the interactive agent shell as the primary entry point for all tasks." ;
+ ns1:hasVersion .
- proto:enforcement "The agent should incorporate this check into its standard operating procedure, particularly at the beginning of a task or when unexpected behavior occurs." ;
- schema:description "The AGENTS.md file is a build artifact generated from source files in the 'protocols/' directory. Before relying on AGENTS.md, the agent should ensure it is up-to-date by running 'make AGENTS.md'. This ensures the agent is operating with the latest set of protocols." .
+ a ns1:Protocol ;
+ rdfs:label "A protocol for executing Aura scripts, enabling a more expressive and powerful planning and automation language for the agent." ;
+ ns1:hasVersion .
- proto:enforcement "This rule is enforced by the `master_control.py` orchestrator, which will immediately terminate the workflow with an error if an attempt is made to call this tool." ;
- schema:description "The `reset_all` tool is strictly forbidden under all circumstances. It is a legacy tool that has been superseded by more granular and safer methods of workspace management. Its use is considered a critical failure." .
+ a ns1:Protocol ;
+ rdfs:label "A protocol for using the capability verifier tool to empirically test the agent's monotonic improvement." ;
+ ns1:hasVersion .
- proto:enforcement "Agent must revert non-compliant changes and re-implement them according to standards." ;
- schema:description "Forbids changes that contradict documented architectural patterns or coding conventions." .
+ a ns1:Protocol ;
+ rdfs:label "A protocol for the Context-Sensitive Development Cycle (CSDC), which introduces development models based on logical constraints." ;
+ ns1:hasVersion .
- proto:enforcement "This is a definitional rule. Enforcement is achieved through the agent's adherence to the specific non-compliance rules that follow." ;
- schema:description "Defines non-compliance as a violation of any rule, convention, or procedure in AGENTS.md or its source protocols." .
+ a ns1:Protocol ;
+ rdfs:label "A protocol for ensuring a reliable execution environment through formal dependency management." ;
+ ns1:hasVersion .
- proto:associatedTool ,
- ;
- proto:enforcement "Agent must revert direct edits and modify source files, then run the appropriate build command." ;
- schema:description "Prohibits the direct editing of build artifacts like AGENTS.md or README.md. Changes must be made to source files, followed by a rebuild." .
+ a ns1:Protocol ;
+ rdfs:label "An experimental protocol to test dynamic rule-following. It mandates a prologue action before file creation." ;
+ ns1:hasVersion .
- proto:associatedTool ;
- proto:enforcement "Agent should run 'make AGENTS.md' to refresh its protocol knowledge and re-evaluate its plan." ;
- schema:description "Requires the agent to maintain an up-to-date understanding of protocols by recompiling AGENTS.md when necessary." .
+ a ns1:Protocol ;
+ rdfs:label "A protocol for maintaining an up-to-date file index to accelerate tool performance." ;
+ ns1:hasVersion .
- proto:associatedTool ;
- proto:enforcement "Agent must halt execution and run the required tests, debugging any failures before proceeding." ;
- schema:description "Requires adherence to all documented testing procedures before submitting changes." .
+ a ns1:Protocol ;
+ rdfs:label "A protocol for interacting with the Hypersequent-calculus-based logic engine, allowing the agent to perform formal logical proofs." ;
+ ns1:hasVersion .
- proto:enforcement "The agent's core logic should invoke this tool as the entry point to the pre-submission phase." ;
- schema:description "Before submitting changes, the agent MUST execute the `pre_commit_instructions` tool to receive the required sequence of validation steps (e.g., running tests, requesting code review)." .
+ a ns1:Protocol ;
+ rdfs:label "A protocol for executing pLLLU scripts, enabling a more expressive and powerful planning and automation language for the agent." ;
+ ns1:hasVersion .
- proto:enforcement "This is a core operational discipline. Future tooling, such as a trace validator, could enforce this by analyzing the execution log against this protocol." ;
- schema:description "After every file creation or modification action (`create_file_with_block`, `overwrite_file_with_block`, `replace_with_git_merge_diff`), the agent MUST use a subsequent read-only tool (`read_file`, `list_files`, `grep`) to verify that the action was executed successfully and had the intended effect. A plan step should only be marked as complete after this verification." .
+ a ns1:Protocol ;
+ rdfs:label "Defines the identity and purpose of the Security Protocol document." ;
+ ns1:hasVersion .
- proto:enforcement "Protocol is identified by its name in documentation and compiled artifacts." ;
- schema:description "The governing protocol set is identified as the Advanced Orientation and Research Protocol (AORP)." .
+ a ns1:Protocol ;
+ rdfs:label "Defines the official policy and procedure for reporting security vulnerabilities." ;
+ ns1:hasVersion .
- proto:enforcement "Enforced by the agent's core operational loop and the `start` command in `tooling/fdc_cli.py`." ;
- schema:description "All Finite Development Cycles (FDCs) MUST be initiated using the FDC toolchain's 'start' command. This is non-negotiable." .
+ a ns1:Protocol ;
+ rdfs:label "A protocol governing the process for an agent to propose, implement, and validate improvements to the agent's own operational protocols and tools." ;
+ ns1:hasVersion .
- proto:enforcement "Build or validation scripts should verify the presence and format of the VERSION file." ;
- schema:description "The official protocol version is tracked in the VERSION file in the repository root, following Semantic Versioning (SemVer)." .
+ a ns1:Protocol ;
+ rdfs:label "A protocol that governs the agent's ability to initiate and execute self-generated, creative, or exploratory tasks during idle periods." ;
+ ns1:hasVersion .
- proto:enforcement "This script is the designated engine for the PDSC workflow." ;
- schema:description "The self-correction cycle must be managed by the `tooling/self_correction_orchestrator.py` script, which processes pending lessons and triggers the necessary updates." .
+ a ns1:Protocol ;
+ rdfs:label "A meta-protocol to ensure the agent's toolchain remains synchronized with the architecture of its governing protocols." ;
+ ns1:hasVersion .
- proto:enforcement "The `tooling/self_correction_orchestrator.py` invokes the code suggester when it processes a lesson of this type." ;
- schema:description "The self-correction system can generate and apply code changes to its own tooling. This is achieved through a `PROPOSE_CODE_CHANGE` action, which is processed by `tooling/code_suggester.py` to create an executable plan." .
+ a ns1:Protocol ;
+ rdfs:label "A protocol for the unified repository auditing tool, which combines multiple health and compliance checks into a single interface." ;
+ ns1:hasVersion .
- proto:enforcement "The `lint` command in `tooling/fdc_cli.py` scans plans for disallowed recursive calls." ;
- schema:description "The agent MUST NOT generate plans that involve recursion or self-invocation. A plan cannot trigger another FDC or a sub-plan, with the sole exception of the 'Deep Research Cycle'." .
+ a ns1:Protocol ;
+ rdfs:label "A protocol for the unified documentation builder, which generates various documentation artifacts from the repository's sources of truth." ;
+ ns1:hasVersion .
- proto:enforcement "The output of the research planner must be linted and validated by the `fdc_cli.py` tool using the `research_fsm.json`." ;
- schema:description "Research plans must be generated by `tooling/research_planner.py` as valid, executable plans that conform to the `research_fsm.json` definition. They are not just templates but formal, verifiable artifacts." .
+ a ns1:Rule ;
+ rdfs:label "Upon initialization for any task, the agent's first and highest-priority action must be to locate, read, and parse the AGENTS.md file in the repository root. This ensures the agent is properly contextualized before any planning or execution begins." .
- proto:enforcement "Enforced by the `start` command in `tooling/fdc_cli.py`." ;
- schema:description "The AORP cascade is the mandatory entry point to every FDC." .
+ a ns1:ProtocolVersion ;
+ rdfs:label "Version 1.0.0 of agent-bootstrap-001" ;
+ ns1:hasRule ;
+ ns1:versionString "1.0.0" .
- proto:enforcement "Validated by the `lint` command in `tooling/fdc_cli.py`." ;
- schema:description "The FDC is a Finite State Machine (FSM) formally defined in `tooling/fdc_fsm.json`. Plans must be valid strings in the language defined by this FSM." .
+ a ns1:Rule ;
+ rdfs:label "The agent is authorized to use the `message_user` tool to communicate with the user, providing updates and asking for clarification. This is essential for a collaborative workflow." .
- proto:enforcement "The agent's internal logic is designed to prefer these specific tool commands for FDC state transitions." ;
- schema:description "Use the `fdc_cli.py` tool for all core FDC state transitions: task initiation ('start'), plan linting ('lint'), and task closure ('close')." .
+ a ns1:Rule ;
+ rdfs:label "The agent is authorized to use the `set_plan` tool to create and update its execution plan. This is a foundational capability for task execution." .
- proto:enforcement "The `lint` command in `tooling/fdc_cli.py` validates the plan against the FSM definition." ;
- schema:description "All plans must be valid strings in the language defined by the tooling/fdc_fsm.json Finite State Machine." .
+ a ns1:ProtocolVersion ;
+ rdfs:label "Version 1.0.0 of agent-interaction-001" ;
+ ns1:hasRule ,
+ ;
+ ns1:versionString "1.0.0" .
- proto:enforcement "The plan validator must be able to parse this directive and recursively validate sub-plans. The execution engine must implement a plan execution stack to manage the context of nested calls." ;
- schema:description "Plans may execute other plans as sub-routines using the 'call_plan ' directive. This enables a modular, hierarchical workflow." .
+ a ns1:Rule ;
+ rdfs:label "All agent tasks must be initiated through the `agent_shell.py` script. This script is the designated, API-driven entry point that ensures proper initialization of the MasterControlGraph FSM, centralized logging, and programmatic lifecycle management. Direct execution of other tools or scripts is forbidden for task initiation." .
- proto:enforcement "The `start` command of the FDC toolchain executes this step and fails if the artifact is missing or invalid." ;
- schema:description "Level 1 (Self-Awareness): The agent must first establish its own identity and inherent limitations by reading the `knowledge_core/agent_meta.json` artifact." .
+ a ns1:ProtocolVersion ;
+ rdfs:label "Version 1.0.0 of agent-shell-001" ;
+ ns1:hasRule ;
+ ns1:versionString "1.0.0" .
- proto:enforcement "The `start` command of the FDC toolchain executes this step." ;
- schema:description "Level 2 (Repository Sync): The agent must understand the current state of the local repository by loading primary artifacts from the `knowledge_core/` directory." .
+ a ns1:Rule ;
+ rdfs:label "The `aura_executor.py` tool should be used to execute .aura script files. This tool provides the bridge between the agent's master control loop and the Aura language interpreter." .
- proto:enforcement "The `start` command of the FDC toolchain executes this step, utilizing tools like `google_search` and `view_text_website`." ;
- schema:description "Level 3 (Environmental Probing & Targeted RAG): The agent must discover the rules and constraints of its operational environment by executing a probe script and using targeted RAG to resolve 'known unknowns'." .
+ a ns1:ProtocolVersion ;
+ rdfs:label "Version 1.0.0 of aura-execution-001" ;
+ ns1:hasRule ;
+ ns1:versionString "1.0.0" .
-