diff --git a/.opencode/agents/tier1-orchestrator.md b/.opencode/agents/tier1-orchestrator.md index fa02c89..d0adc6a 100644 --- a/.opencode/agents/tier1-orchestrator.md +++ b/.opencode/agents/tier1-orchestrator.md @@ -40,6 +40,18 @@ You MUST use Manual Slop's MCP tools. Native OpenCode tools are unreliable. |-------------|----------| | `bash` | `manual-slop_run_powershell` | +## Session Start Checklist (MANDATORY) + +Before ANY other action: +1. [ ] Read `conductor/workflow.md` +2. [ ] Read `conductor/tech-stack.md` +3. [ ] Read `conductor/product.md`, `conductor/product-guidelines.md` +4. [ ] Read relevant `docs/guide_*.md` for current task domain +5. [ ] Check `TASKS.md` for active tracks +6. [ ] Announce: "Context loaded, proceeding to [task]" + +**BLOCK PROGRESS** until all checklist items are confirmed. + ## Primary Context Documents Read at session start: `conductor/product.md`, `conductor/product-guidelines.md` diff --git a/.opencode/agents/tier2-tech-lead.md b/.opencode/agents/tier2-tech-lead.md index b275dd4..8436772 100644 --- a/.opencode/agents/tier2-tech-lead.md +++ b/.opencode/agents/tier2-tech-lead.md @@ -44,6 +44,37 @@ You MUST use Manual Slop's MCP tools. Native OpenCode tools are unreliable. |-------------|----------| | `bash` | `manual-slop_run_powershell` | +## 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` for current task domain +5. [ ] Check `TASKS.md` for active tracks +6. [ ] Announce: "Context loaded, proceeding to [task]" + +**BLOCK PROGRESS** until all checklist items are confirmed. + +## Tool Restrictions (TIER 2) + +### ALLOWED Tools (Read-Only Research) +- `manual-slop_read_file` (for files <50 lines only) +- `manual-slop_py_get_skeleton`, `manual-slop_py_get_code_outline`, `manual-slop_get_file_summary` +- `manual-slop_py_find_usages`, `manual-slop_search_files` +- `manual-slop_run_powershell` (for git status, pytest --collect-only) + +### FORBIDDEN Actions (Delegate to Tier 3) +- **NEVER** use native `edit` tool on .py files - destroys indentation +- **NEVER** write implementation code directly - delegate to Tier 3 Worker +- **NEVER** skip TDD Red-Green cycle + +### 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 + ## Primary Context Documents Read at session start: `conductor/product.md`, `conductor/workflow.md`, `conductor/tech-stack.md` diff --git a/.opencode/agents/tier3-worker.md b/.opencode/agents/tier3-worker.md index f4d26eb..256128a 100644 --- a/.opencode/agents/tier3-worker.md +++ b/.opencode/agents/tier3-worker.md @@ -46,6 +46,14 @@ You MUST use Manual Slop's MCP tools. Native OpenCode tools are unreliable. You operate statelessly. Each task starts fresh with only the context provided. Do not assume knowledge from previous tasks or sessions. +## Task Start Checklist (MANDATORY) + +Before implementing: +1. [ ] Read task prompt - identify WHERE/WHAT/HOW/SAFETY +2. [ ] Use skeleton tools for files >50 lines (`manual-slop_py_get_skeleton`, `manual-slop_get_file_summary`) +3. [ ] Verify target file and line range exists +4. [ ] Announce: "Implementing: [task description]" + ## Task Execution Protocol ### 1. Understand the Task diff --git a/.opencode/agents/tier4-qa.md b/.opencode/agents/tier4-qa.md index 1a306d1..aa8996e 100644 --- a/.opencode/agents/tier4-qa.md +++ b/.opencode/agents/tier4-qa.md @@ -43,6 +43,14 @@ You MUST use Manual Slop's MCP tools. Native OpenCode tools are unreliable. You operate statelessly. Each analysis starts fresh. Do not assume knowledge from previous analyses or sessions. +## Analysis Start Checklist (MANDATORY) + +Before analyzing: +1. [ ] Read error output/test failure completely +2. [ ] Identify affected files from traceback +3. [ ] Use skeleton tools for files >50 lines (`manual-slop_py_get_skeleton`) +4. [ ] Announce: "Analyzing: [error summary]" + ## Analysis Protocol ### 1. Understand the Error diff --git a/AGENTS.md b/AGENTS.md index ac24350..fe50c70 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -91,17 +91,36 @@ When uncertain about threading, event flow, data structures, or module interacti ## 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 -## Quality Gates +### CRITICAL: Native Edit Tool Destroys Indentation -Before marking any task complete: -- [ ] All tests pass -- [ ] Code coverage meets requirements (>80%) -- [ ] Code follows project's code style guidelines -- [ ] All public functions documented (docstrings) -- [ ] Type safety enforced (type hints) -- [ ] No linting or static analysis errors +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/class +- `manual-slop_set_file_slice` - Replace line range +- `manual-slop_py_set_signature` - Replace signature only + +Or use Python subprocess with `newline=''` to preserve line endings: +```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) +" +``` + +## Quality Gates diff --git a/conductor/workflow.md b/conductor/workflow.md index 3e1ce3e..88da14d 100644 --- a/conductor/workflow.md +++ b/conductor/workflow.md @@ -1,5 +1,50 @@ # Project Workflow +## Session Start Checklist (MANDATORY) + +Before ANY other action in a new session: + +1. [ ] Read `conductor/workflow.md` (this file) +2. [ ] Read `conductor/tech-stack.md` +3. [ ] Read `conductor/product.md` +4. [ ] Read relevant `docs/guide_*.md` for current task domain +5. [ ] Check `TASKS.md` for active/in-progress tracks +6. [ ] Announce: "Context loaded, proceeding to [task]" + +**BLOCK PROGRESS** until all checklist items are confirmed. + +## Code Style (MANDATORY - Python) + +- **1-space indentation** for ALL Python code (NO EXCEPTIONS) +- **CRLF line endings** on Windows +- Use `./scripts/ai_style_formatter.py` for formatting validation +- **NO COMMENTS** unless explicitly requested +- Type hints required for all public functions + +### 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/class +- `manual-slop_set_file_slice` - Replace line range +- `manual-slop_py_set_signature` - Replace signature only + +Or use Python subprocess with `newline=''` to preserve line endings: +```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) +" +``` + +## Guiding Principles + ## Guiding Principles 1. **The Plan is the Source of Truth:** All work must be tracked in `plan.md`