# Task Planning & Specification Protocol (`tasks/plan.md`) This protocol defines the standard for researching and drafting new task specifications in `tasks/new/` across greenfield repositories and mature, existing codebases. --- ## 1. Direct Execution Protocol (When You Are Planning a Task) When commanded to **"tasks/plan `[OBJECTIVE]`"**: 1. **Remain Strictly Read-Only:** Do not modify any production source code during planning. 2. **Deep Codebase Exploration:** - For existing codebases: Inspect architecture, dependencies, data schemas, and prior patterns (`AGENTS.md`, `docs/`, `server/`, `ui/`). - Identify potential failure modes, circular import risks, and monolithic file sprawl. 3. **Draft the Task Specification:** - Create a new file in `tasks/new/YYYY-MMDD.XX.agent.type.scope.title-HHMM.md`. - Adhere strictly to the `# TASK METADATA` header, Target Files list, Architectural Risks, and Phased Implementation plan required by `tasks/GUIDELINES.md`. 4. **Halt for Audit-1:** Stop after saving the task file in `tasks/new/` and await task plan review (`tasks/audit-1.md`). --- ## 2. Dispatch Template (When Preparing a Planning Prompt for Jules or External Agents) When commanded to **"tasks/plan a prompt for Jules on `[OBJECTIVE]`"**, fill in and provide the following block: ```text **Role:** Act as a System Analyst and Solutions Architect. Do not execute code or modify production files during this session. Your sole deliverable is to generate a compliant task file in tasks/new/. **The Objective:** [State exactly what you want to achieve.] **Suggestions & Initial Thoughts:** *Here is our starting hypothesis. Treat these as ideas to evaluate, not rigid requirements:* * [Suggestion 1] * [Suggestion 2] **Your Task:** 1. Research the codebase and analyze this objective against our current architecture and existing codebase patterns. 2. Critically evaluate our suggestions: Do they make technical sense, or is there a cleaner, more modular, or more native approach? 3. Map out `Target Files`, prerequisites/dependencies, and explicitly identify potential architectural risks, regressions, or friction. 4. Draft the task file in `tasks/new/` strictly adhering to the naming conventions, header metadata, and mandatory structure defined in `tasks/GUIDELINES.md`. ```