From ef3d8b0ec1b75bbe78760e8ef095a025203a2fe3 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Tue, 24 Feb 2026 18:32:09 -0500 Subject: [PATCH] chore(conductor): Add new track 'Move discussion histories to their own toml to prevent the ai agent from reading it (will be on a blacklist).' --- conductor/tracks.md | 5 +++ .../history_segregation_20260224/index.md | 5 +++ .../metadata.json | 8 +++++ .../history_segregation_20260224/plan.md | 30 +++++++++++++++++ .../history_segregation_20260224/spec.md | 32 +++++++++++++++++++ setup_gemini.ps1 | 1 - startup_debug.log | 0 7 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 conductor/tracks/history_segregation_20260224/index.md create mode 100644 conductor/tracks/history_segregation_20260224/metadata.json create mode 100644 conductor/tracks/history_segregation_20260224/plan.md create mode 100644 conductor/tracks/history_segregation_20260224/spec.md delete mode 100644 setup_gemini.ps1 delete mode 100644 startup_debug.log diff --git a/conductor/tracks.md b/conductor/tracks.md index 066a2a0..b78c56d 100644 --- a/conductor/tracks.md +++ b/conductor/tracks.md @@ -17,3 +17,8 @@ This file tracks all major tracks for the project. Each track has its own detail - [~] **Track: get gui_2 working with latest changes to the project.** *Link: [./tracks/gui2_feature_parity_20260223/](./tracks/gui2_feature_parity_20260223/)* + +--- + +- [ ] **Track: Move discussion histories to their own toml to prevent the ai agent from reading it (will be on a blacklist).** +*Link: [./tracks/history_segregation_20260224/](./tracks/history_segregation_20260224/)* diff --git a/conductor/tracks/history_segregation_20260224/index.md b/conductor/tracks/history_segregation_20260224/index.md new file mode 100644 index 0000000..c53e382 --- /dev/null +++ b/conductor/tracks/history_segregation_20260224/index.md @@ -0,0 +1,5 @@ +# Track history_segregation_20260224 Context + +- [Specification](./spec.md) +- [Implementation Plan](./plan.md) +- [Metadata](./metadata.json) \ No newline at end of file diff --git a/conductor/tracks/history_segregation_20260224/metadata.json b/conductor/tracks/history_segregation_20260224/metadata.json new file mode 100644 index 0000000..8149ed0 --- /dev/null +++ b/conductor/tracks/history_segregation_20260224/metadata.json @@ -0,0 +1,8 @@ +{ + "track_id": "history_segregation_20260224", + "type": "feature", + "status": "new", + "created_at": "2026-02-24T18:28:00Z", + "updated_at": "2026-02-24T18:28:00Z", + "description": "Move discussion histories to their own toml to prevent the ai agent from reading it (will be on a blacklist)." +} \ No newline at end of file diff --git a/conductor/tracks/history_segregation_20260224/plan.md b/conductor/tracks/history_segregation_20260224/plan.md new file mode 100644 index 0000000..cfea719 --- /dev/null +++ b/conductor/tracks/history_segregation_20260224/plan.md @@ -0,0 +1,30 @@ +# Implementation Plan: Discussion History Segregation and Blacklisting + +This plan follows the Test-Driven Development (TDD) workflow to move discussion history into a dedicated sibling TOML file and enforce a strict blacklist against AI agent tool access. + +## Phase 1: Foundation and Migration Logic +This phase focuses on the structural changes needed to handle dual-file project configurations and the automatic migration of legacy history. + +- [ ] Task: Research existing `ProjectManager` serialization and tool access points in `mcp_client.py`. +- [ ] Task: Write TDD tests for migrating the `discussion` key from `manual_slop.toml` to a new sibling file. +- [ ] Task: Implement automatic migration in `ProjectManager.load_project()`. +- [ ] Task: Update `ProjectManager.save_project()` to persist history separately. +- [ ] Task: Verify that existing history is correctly migrated and remains visible in the GUI. +- [ ] Task: Conductor - User Manual Verification 'Foundation and Migration' (Protocol in workflow.md) + +## Phase 2: Blacklist Enforcement +This phase ensures the AI agent is strictly prevented from reading the history source files through its tools. + +- [ ] Task: Write failing tests that attempt to read a known history file via the `mcp_client.py` and `aggregate.py` logic. +- [ ] Task: Implement hardcoded exclusion for `*_history.toml` and `history.toml` in `mcp_client.py`. +- [ ] Task: Implement hardcoded exclusion in `aggregate.py` to prevent history from being added as a raw file context. +- [ ] Task: Verify that tool-based file reads for the history file return a "Permission Denied" or "Blacklisted" error. +- [ ] Task: Conductor - User Manual Verification 'Blacklist Enforcement' (Protocol in workflow.md) + +## Phase 3: Integration and Final Validation +This phase validates the full lifecycle, ensuring the application remains functional and secure. + +- [ ] Task: Conduct a full walkthrough using the simulation scripts to verify history persistence across turns. +- [ ] Task: Verify that the AI can still use the *curated* history provided in the prompt context but cannot access the raw file. +- [ ] Task: Run full suite of automated GUI and API hook tests. +- [ ] Task: Conductor - User Manual Verification 'Integration and Final Validation' (Protocol in workflow.md) \ No newline at end of file diff --git a/conductor/tracks/history_segregation_20260224/spec.md b/conductor/tracks/history_segregation_20260224/spec.md new file mode 100644 index 0000000..8d2170f --- /dev/null +++ b/conductor/tracks/history_segregation_20260224/spec.md @@ -0,0 +1,32 @@ +# Specification: Discussion History Segregation and Blacklisting + +## Overview +Currently, `manual_slop.toml` stores both project configuration and the entire discussion history. This leads to redundancy and potential context bloat if the AI agent reads the raw TOML file via its tools. This track will move the discussion history to a dedicated sibling TOML file (`history.toml`) and strictly blacklist it from the AI agent's file tools to ensure it only interacts with the curated context provided in the prompt. + +## Functional Requirements +1. **File Segregation:** + - Create a dedicated history file (e.g., `manual_slop_history.toml`) in the same directory as the main project configuration. + - The main `manual_slop.toml` will henceforth only store project settings, tracked files, and system prompts. +2. **Automatic Migration:** + - On application startup or project load, detect if the `discussion` key exists in `manual_slop.toml`. + - If found, automatically migrate all discussion entries to the new history sibling file and remove the key from the original file. +3. **Strict Blacklisting:** + - Hardcode the exclusion of the history TOML file in `mcp_client.py` and `aggregate.py`. + - The AI agent must be prevented from reading this file using the `read_file` or `search_files` tools. +4. **Backend Integration:** + - Update `ProjectManager` in `project_manager.py` to manage two distinct TOML files per project. + - Ensure the GUI correctly loads history from the new file while maintaining existing functionality. + +## Non-Functional Requirements +- **Data Integrity:** Ensure no history is lost during the migration process. +- **Performance:** Minimize I/O overhead when saving history entries after each AI turn. + +## Acceptance Criteria +- [ ] `manual_slop.toml` no longer contains the `discussion` array. +- [ ] A sibling `history.toml` (or similar) contains all historical and new discussion entries. +- [ ] The AI agent cannot access the history TOML file via its file tools (verification via tool call test). +- [ ] Discussion history remains visible in the GUI and is correctly included in the AI prompt context. + +## Out of Scope +- Customizable blacklist via the UI. +- Support for cloud-based history storage. \ No newline at end of file diff --git a/setup_gemini.ps1 b/setup_gemini.ps1 deleted file mode 100644 index a2c6b5b..0000000 --- a/setup_gemini.ps1 +++ /dev/null @@ -1 +0,0 @@ -Get-Content .env | ForEach-Object { $name, $value = $_.Split('=', 2); [Environment]::SetEnvironmentVariable($name, $value, "Process") } diff --git a/startup_debug.log b/startup_debug.log deleted file mode 100644 index e69de29..0000000