From gui_decoupling_controller track post-mortem: workflow.md: - Add mandatory session start checklist (6 items) - Add code style section with 1-space indentation enforcement - Add native edit tool warning with MCP alternatives AGENTS.md: - Add critical native edit tool warning - Document MCP tool alternatives for file editing tier1-orchestrator.md: - Add session start checklist tier2-tech-lead.md: - Add session start checklist - Add tool restrictions section (allowed vs forbidden) - Add explicit delegation pattern tier3-worker.md: - Add task start checklist tier4-qa.md: - Add analysis start checklist
5.2 KiB
Manual Slop - OpenCode Configuration
Project Overview
Manual Slop is a local GUI application designed as an experimental, "manual" AI coding assistant. It allows users to curate and send context (files, screenshots, and discussion history) to AI APIs (Gemini and Anthropic). The AI can then execute PowerShell scripts within the project directory to modify files, requiring explicit user confirmation before execution.
Main Technologies
- Language: Python 3.11+
- Package Management:
uv - GUI Framework: Dear PyGui (
dearpygui), ImGui Bundle (imgui-bundle) - AI SDKs:
google-genai(Gemini),anthropic - Configuration: TOML (
tomli-w)
Architecture
gui_legacy.py: Main entry point and Dear PyGui application logicai_client.py: Unified wrapper for Gemini and Anthropic APIsaggregate.py: Buildsfile_itemscontextmcp_client.py: Implements MCP-like tools (26 tools)shell_runner.py: Sandboxed subprocess wrapper for PowerShellproject_manager.py: Per-project TOML configurationssession_logger.py: Timestamped logging (JSON-L)
Critical Context (Read First)
- Tech Stack: Python 3.11+, Dear PyGui / ImGui, FastAPI, Uvicorn
- Main File:
gui_2.py(primary GUI),ai_client.py(multi-provider LLM abstraction) - Core Mechanic: GUI orchestrator for LLM-driven coding with 4-tier MMA architecture
- Key Integration: Gemini API, Anthropic API, DeepSeek, Gemini CLI (headless), MCP tools
- Platform Support: Windows (PowerShell)
- DO NOT: Read full files >50 lines without using
py_get_skeletonorget_file_summaryfirst
Environment
- Shell: PowerShell (pwsh) on Windows
- Do NOT use bash-specific syntax (use PowerShell equivalents)
- Use
uv runfor all Python execution - Path separators: forward slashes work in PowerShell
Session Startup Checklist
At the start of each session:
- Check TASKS.md - look for IN_PROGRESS or BLOCKED tracks
- Review recent JOURNAL.md entries - scan last 2-3 entries for context
- Run
/conductor-setup- load full context - Run
/conductor-status- get overview
Conductor System
The project uses a spec-driven track system in conductor/:
- Tracks:
conductor/tracks/{name}_{YYYYMMDD}/- spec.md, plan.md, metadata.json - Workflow:
conductor/workflow.md- full task lifecycle and TDD protocol - Tech Stack:
conductor/tech-stack.md- technology constraints - Product:
conductor/product.md- product vision and guidelines
MMA 4-Tier Architecture
Tier 1: Orchestrator - product alignment, epic -> tracks
Tier 2: Tech Lead - track -> tickets (DAG), architectural oversight
Tier 3: Worker - stateless TDD implementation per ticket
Tier 4: QA - stateless error analysis, no fixes
Architecture Fallback
When uncertain about threading, event flow, data structures, or module interactions, consult:
- docs/guide_architecture.md: Thread domains, event system, AI client, HITL mechanism
- docs/guide_tools.md: MCP Bridge security, 26-tool inventory, Hook API endpoints
- docs/guide_mma.md: Ticket/Track data structures, DAG engine, ConductorEngine
- docs/guide_simulations.md: live_gui fixture, Puppeteer pattern, verification
Development Workflow
- Run
/conductor-setupto load session context - Pick active track from
TASKS.mdor/conductor-status - Run
/conductor-implementto resume track execution - Follow TDD: Red (failing tests) -> Green (pass) -> Refactor
- Delegate implementation to Tier 3 Workers, errors to Tier 4 QA
- On phase completion: run
/conductor-verifyfor checkpoint
Anti-Patterns (Avoid These)
- Don't read full large files - use
py_get_skeleton,get_file_summary,py_get_code_outlinefirst - Don't implement directly as Tier 2 - delegate to Tier 3 Workers
- Don't skip TDD - write failing tests before implementation
- Don't modify tech stack silently - update
conductor/tech-stack.mdBEFORE implementing - Don't skip phase verification - run
/conductor-verifywhen all tasks in a phase are[x] - Don't mix track work - stay focused on one track at a time
Code Style
- IMPORTANT: DO NOT ADD ANY COMMENTS unless asked
- Use 1-space indentation for Python code
- Use type hints where appropriate
Code Style
- IMPORTANT: DO NOT ADD ANY COMMENTS unless asked
- Use 1-space indentation for Python code
- Use type hints where appropriate
- Internal methods/variables prefixed with underscore
CRITICAL: Native Edit Tool Destroys Indentation
The native Edit tool DESTROYS 1-space indentation and converts to 4-space.
NEVER use native edit tool on Python files.
Instead, use Manual Slop MCP tools:
manual-slop_py_update_definition- Replace function/classmanual-slop_set_file_slice- Replace line rangemanual-slop_py_set_signature- Replace signature only
Or use Python subprocess with newline='' to preserve line endings:
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)
"