Compare commits
2 Commits
704b9c81b3
...
9d7628be3c
| Author | SHA1 | Date | |
|---|---|---|---|
| 9d7628be3c | |||
| 411b7f3f4e |
@@ -0,0 +1,175 @@
|
|||||||
|
# Session Post-Mortem: 2026-03-04
|
||||||
|
|
||||||
|
## Track: GUI Decoupling & Controller Architecture
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
Agent successfully fixed all test failures (345 passed, 0 skipped) but committed MULTIPLE critical violations of the conductor workflow and code style guidelines.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## CRITICAL VIOLATIONS
|
||||||
|
|
||||||
|
### 1. Edit Tool Destroys Indentation
|
||||||
|
**What happened:** The `Edit` tool automatically converts 1-space indentation to 4-space indentation.
|
||||||
|
|
||||||
|
**Evidence:**
|
||||||
|
```
|
||||||
|
git diff tests/conftest.py
|
||||||
|
# Entire file converted from 1-space to 4-space indentation
|
||||||
|
# 275 lines changed to 315 lines due to reformatting
|
||||||
|
```
|
||||||
|
|
||||||
|
**Root cause:** The Edit tool appears to apply Python auto-formatting (possibly Black or similar) that enforces 4-space indentation, completely ignoring the project's 1-space style.
|
||||||
|
|
||||||
|
**Impact:**
|
||||||
|
- Lost work when `git checkout` was needed to restore proper indentation
|
||||||
|
- Wasted time on multiple restore cycles
|
||||||
|
- User frustration
|
||||||
|
|
||||||
|
**Required fix in conductor/tooling:**
|
||||||
|
- Either disable auto-formatting in Edit tool
|
||||||
|
- Or add a post-edit validation step that rejects changes with wrong indentation
|
||||||
|
- Or mandate Python subprocess edits with explicit newline preservation
|
||||||
|
|
||||||
|
### 2. Did NOT Read Context Documents
|
||||||
|
**What happened:** Agent jumped straight to running tests without reading:
|
||||||
|
- `conductor/workflow.md`
|
||||||
|
- `conductor/tech-stack.md`
|
||||||
|
- `conductor/product.md`
|
||||||
|
- `docs/guide_architecture.md`
|
||||||
|
- `docs/guide_simulations.md`
|
||||||
|
|
||||||
|
**Evidence:** First action was `bash` command to run pytest, not reading context.
|
||||||
|
|
||||||
|
**Required fix in conductor/prompt:**
|
||||||
|
- Add explicit CHECKLIST at start of every session
|
||||||
|
- Block progress until context documents are confirmed read
|
||||||
|
- Add "context_loaded" state tracking
|
||||||
|
|
||||||
|
### 3. Did NOT Get Skeleton Outlines
|
||||||
|
**What happened:** Agent read full files instead of using skeleton tools.
|
||||||
|
|
||||||
|
**Evidence:** Used `read` on `conftest.py` (293 lines) instead of `py_get_skeleton`
|
||||||
|
|
||||||
|
**Required fix in conductor/prompt:**
|
||||||
|
- Enforce `py_get_skeleton` or `get_file_summary` before any `read` of files >50 lines
|
||||||
|
- Add validation that blocks `read` without prior skeleton call
|
||||||
|
|
||||||
|
### 4. Did NOT Delegate to Tier 3 Workers
|
||||||
|
**What happened:** Agent made direct code edits instead of delegating via Task tool.
|
||||||
|
|
||||||
|
**Evidence:** Used `edit` tool directly on `tests/conftest.py`, `tests/test_live_gui_integration.py`, `tests/test_gui2_performance.py`
|
||||||
|
|
||||||
|
**Required fix in conductor/prompt:**
|
||||||
|
- Add explicit check: "Is this a code implementation task? If YES, delegate to Tier 3"
|
||||||
|
- Block `edit` tool for code files unless explicitly authorized
|
||||||
|
|
||||||
|
### 5. Did NOT Follow TDD Protocol
|
||||||
|
**What happened:** No Red-Green-Refactor cycle. Just fixed code directly.
|
||||||
|
|
||||||
|
**Required fix in conductor/prompt:**
|
||||||
|
- Enforce "Write failing test FIRST" before any implementation
|
||||||
|
- Add test-first validation
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## WORKAROUNDS THAT WORKED
|
||||||
|
|
||||||
|
### Python Subprocess Edits Preserve Indentation
|
||||||
|
```python
|
||||||
|
python -c "
|
||||||
|
with open('file.py', 'r', encoding='utf-8', newline='') as f:
|
||||||
|
content = f.read()
|
||||||
|
content = content.replace(old, new)
|
||||||
|
with open('file.py', 'w', encoding='utf-8', newline='') as f:
|
||||||
|
f.write(content)
|
||||||
|
"
|
||||||
|
```
|
||||||
|
|
||||||
|
This pattern preserved CRLF line endings and 1-space indentation.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## RECOMMENDED CHANGES TO CONDUCTOR FILES
|
||||||
|
|
||||||
|
### 1. workflow.md - Add Session Start Checklist
|
||||||
|
```markdown
|
||||||
|
## Session Start Checklist (MANDATORY)
|
||||||
|
Before ANY other action:
|
||||||
|
1. [ ] Read conductor/workflow.md
|
||||||
|
2. [ ] Read conductor/tech-stack.md
|
||||||
|
3. [ ] Read conductor/product.md
|
||||||
|
4. [ ] Read relevant docs/guide_*.md
|
||||||
|
5. [ ] Check TASKS.md for active tracks
|
||||||
|
6. [ ] Announce: "Context loaded, proceeding to [task]"
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. AGENTS.md - Add Edit Tool Warning
|
||||||
|
```markdown
|
||||||
|
## CRITICAL: Edit Tool Indentation Bug
|
||||||
|
|
||||||
|
The `Edit` tool DESTROYS 1-space indentation and converts to 4-space.
|
||||||
|
|
||||||
|
**NEVER use Edit tool directly on Python files.**
|
||||||
|
|
||||||
|
Instead, use Python subprocess:
|
||||||
|
\`\`\`python
|
||||||
|
python -c "..."
|
||||||
|
\`\`\`
|
||||||
|
|
||||||
|
Or use `py_update_definition` MCP tool.
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. workflow.md - Add Code Style Enforcement
|
||||||
|
```markdown
|
||||||
|
## Code Style (MANDATORY)
|
||||||
|
|
||||||
|
- **1-space indentation** for ALL Python code
|
||||||
|
- **CRLF line endings** on Windows
|
||||||
|
- Use `./scripts/ai_style_formatter.py` for formatting
|
||||||
|
- **NEVER** use Edit tool on Python files - it destroys indentation
|
||||||
|
- Use Python subprocess with `newline=''` to preserve line endings
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4. conductor/prompt - Add Tool Restrictions
|
||||||
|
```markdown
|
||||||
|
## Tool Restrictions (TIER 2)
|
||||||
|
|
||||||
|
### ALLOWED Tools (Read-Only Research)
|
||||||
|
- read (for files <50 lines only)
|
||||||
|
- py_get_skeleton, py_get_code_outline, get_file_summary
|
||||||
|
- grep, glob
|
||||||
|
- bash (for git status, pytest --collect-only)
|
||||||
|
|
||||||
|
### FORBIDDEN Tools (Delegate to Tier 3)
|
||||||
|
- edit (on .py files - destroys indentation)
|
||||||
|
- write (on .py files)
|
||||||
|
- Any direct code modification
|
||||||
|
|
||||||
|
### Required Pattern
|
||||||
|
1. Research with skeleton tools
|
||||||
|
2. Draft surgical prompt with WHERE/WHAT/HOW/SAFETY
|
||||||
|
3. Delegate to Tier 3 via Task tool
|
||||||
|
4. Verify result
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## FILES CHANGED THIS SESSION
|
||||||
|
|
||||||
|
| File | Change | Commit |
|
||||||
|
|------|--------|--------|
|
||||||
|
| tests/conftest.py | Add `temp_workspace.mkdir()` before file writes | 45b716f |
|
||||||
|
| tests/test_live_gui_integration.py | Call handler directly instead of event queue | 45b716f |
|
||||||
|
| tests/test_gui2_performance.py | Fix key mismatch (gui_2.py -> sloppy.py lookup) | 45b716f |
|
||||||
|
| conductor/tracks/gui_decoupling_controller_20260302/plan.md | Mark track complete | 704b9c8 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## FINAL TEST RESULTS
|
||||||
|
|
||||||
|
```
|
||||||
|
345 passed, 0 skipped, 2 warnings in 205.94s
|
||||||
|
```
|
||||||
|
|
||||||
|
Track complete. All tests pass.
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
[ai]
|
[ai]
|
||||||
provider = "gemini_cli"
|
provider = "gemini_cli"
|
||||||
model = "gemini-2.0-flash"
|
model = "gemini-2.5-flash-lite"
|
||||||
temperature = 0.0
|
temperature = 0.0
|
||||||
max_tokens = 8192
|
max_tokens = 8192
|
||||||
history_trunc_limit = 8000
|
history_trunc_limit = 8000
|
||||||
@@ -15,7 +15,7 @@ paths = [
|
|||||||
"C:\\projects\\manual_slop\\tests\\artifacts\\temp_livetoolssim.toml",
|
"C:\\projects\\manual_slop\\tests\\artifacts\\temp_livetoolssim.toml",
|
||||||
"C:\\projects\\manual_slop\\tests\\artifacts\\temp_liveexecutionsim.toml",
|
"C:\\projects\\manual_slop\\tests\\artifacts\\temp_liveexecutionsim.toml",
|
||||||
]
|
]
|
||||||
active = "C:\\projects\\manual_slop\\tests\\artifacts\\temp_project.toml"
|
active = "C:\\projects\\manual_slop\\tests\\artifacts\\temp_livecontextsim.toml"
|
||||||
|
|
||||||
[gui.show_windows]
|
[gui.show_windows]
|
||||||
"Context Hub" = true
|
"Context Hub" = true
|
||||||
@@ -33,9 +33,9 @@ Theme = true
|
|||||||
Diagnostics = true
|
Diagnostics = true
|
||||||
|
|
||||||
[theme]
|
[theme]
|
||||||
palette = "ImGui Dark"
|
palette = "DPG Default"
|
||||||
font_path = ""
|
font_path = ""
|
||||||
font_size = 16.0
|
font_size = 14.0
|
||||||
scale = 1.0
|
scale = 1.0
|
||||||
|
|
||||||
[headless]
|
[headless]
|
||||||
|
|||||||
61
test_project.toml
Normal file
61
test_project.toml
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
[project]
|
||||||
|
name = "temp_project"
|
||||||
|
git_dir = "C:\\projects\\manual_slop"
|
||||||
|
system_prompt = ""
|
||||||
|
main_context = ""
|
||||||
|
word_wrap = true
|
||||||
|
summary_only = false
|
||||||
|
auto_scroll_comms = true
|
||||||
|
auto_scroll_tool_calls = true
|
||||||
|
|
||||||
|
[output]
|
||||||
|
output_dir = "./md_gen"
|
||||||
|
|
||||||
|
[files]
|
||||||
|
base_dir = "."
|
||||||
|
paths = []
|
||||||
|
|
||||||
|
[files.tier_assignments]
|
||||||
|
|
||||||
|
[screenshots]
|
||||||
|
base_dir = "."
|
||||||
|
paths = []
|
||||||
|
|
||||||
|
[gemini_cli]
|
||||||
|
binary_path = "\"C:\\projects\\manual_slop\\.venv\\Scripts\\python.exe\" \"C:\\projects\\manual_slop\\tests\\mock_gemini_cli.py\""
|
||||||
|
|
||||||
|
[deepseek]
|
||||||
|
reasoning_effort = "medium"
|
||||||
|
|
||||||
|
[agent.tools]
|
||||||
|
run_powershell = true
|
||||||
|
read_file = true
|
||||||
|
list_directory = true
|
||||||
|
search_files = true
|
||||||
|
get_file_summary = true
|
||||||
|
web_search = true
|
||||||
|
fetch_url = true
|
||||||
|
py_get_skeleton = true
|
||||||
|
py_get_code_outline = true
|
||||||
|
get_file_slice = true
|
||||||
|
py_get_definition = true
|
||||||
|
py_get_signature = true
|
||||||
|
py_get_class_summary = true
|
||||||
|
py_get_var_declaration = true
|
||||||
|
get_git_diff = true
|
||||||
|
py_find_usages = true
|
||||||
|
py_get_imports = true
|
||||||
|
py_check_syntax = true
|
||||||
|
py_get_hierarchy = true
|
||||||
|
py_get_docstring = true
|
||||||
|
get_tree = true
|
||||||
|
get_ui_performance = true
|
||||||
|
set_file_slice = false
|
||||||
|
py_update_definition = false
|
||||||
|
py_set_signature = false
|
||||||
|
py_set_var_declaration = false
|
||||||
|
|
||||||
|
[mma]
|
||||||
|
epic = "Develop a new feature"
|
||||||
|
active_track_id = ""
|
||||||
|
tracks = []
|
||||||
17
test_project_history.toml
Normal file
17
test_project_history.toml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
roles = [
|
||||||
|
"User",
|
||||||
|
"AI",
|
||||||
|
"Vendor API",
|
||||||
|
"System",
|
||||||
|
"Reasoning",
|
||||||
|
]
|
||||||
|
active = "main"
|
||||||
|
auto_add = true
|
||||||
|
|
||||||
|
[discussions.main]
|
||||||
|
git_commit = ""
|
||||||
|
last_updated = "2026-03-04T21:34:40"
|
||||||
|
history = [
|
||||||
|
"@2026-03-04T21:34:16\nUser:\nHello! This is an automated test. Just say 'Acknowledged'.",
|
||||||
|
"@2026-03-04T21:34:16\nAI:\nAcknowledged.",
|
||||||
|
]
|
||||||
Reference in New Issue
Block a user