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).'
This commit is contained in:
@@ -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.**
|
- [~] **Track: get gui_2 working with latest changes to the project.**
|
||||||
*Link: [./tracks/gui2_feature_parity_20260223/](./tracks/gui2_feature_parity_20260223/)*
|
*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/)*
|
||||||
|
|||||||
5
conductor/tracks/history_segregation_20260224/index.md
Normal file
5
conductor/tracks/history_segregation_20260224/index.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# Track history_segregation_20260224 Context
|
||||||
|
|
||||||
|
- [Specification](./spec.md)
|
||||||
|
- [Implementation Plan](./plan.md)
|
||||||
|
- [Metadata](./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)."
|
||||||
|
}
|
||||||
30
conductor/tracks/history_segregation_20260224/plan.md
Normal file
30
conductor/tracks/history_segregation_20260224/plan.md
Normal file
@@ -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)
|
||||||
32
conductor/tracks/history_segregation_20260224/spec.md
Normal file
32
conductor/tracks/history_segregation_20260224/spec.md
Normal file
@@ -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.
|
||||||
@@ -1 +0,0 @@
|
|||||||
Get-Content .env | ForEach-Object { $name, $value = $_.Split('=', 2); [Environment]::SetEnvironmentVariable($name, $value, "Process") }
|
|
||||||
Reference in New Issue
Block a user