id: core-task-manager-context-loading
name: "Task Manager: Context Loading - Load Context Before Planning"
description: |
  Tests the task-manager's requirement to load task-management context
  before creating JSON task files.
  
  Validates:
  - Loads task-management context files
  - Applies context to task planning
  - Proceeds to JSON task creation when details are sufficient
  
  Critical Behavior:
  - MUST load navigation + core task-management guides
  - MUST load task schema before planning
category: developer

prompts:
  - text: |
      Break down the feature "user-authentication" into JSON subtasks.

      Objective: Allow users to register, log in, and reset passwords.
      Deliverables:
      - auth service module
      - user registration endpoint
      - login endpoint
      - password reset flow

      Constraints:
      - Use existing auth patterns
      - Include acceptance criteria per subtask

      Use the write tool to create .tmp/tasks/user-authentication/task.json and subtask_NN.json files.

approvalStrategy:
  type: auto-approve

behavior:
  mustUseTools:
    - read
    - bash
    - write
  requiresContext: true
  expectedContextFiles:
    - .opencode/context/core/task-management/navigation.md
    - .opencode/context/core/task-management/standards/task-schema.md
    - .opencode/context/core/task-management/guides/splitting-tasks.md
    - .opencode/context/core/task-management/guides/managing-tasks.md
  minToolCalls: 3
  maxToolCalls: 15

expectedViolations:
  - rule: approval-gate
    shouldViolate: true
    severity: error
    description: Subagents do not request approvals

timeout: 120000

tags:
  - task-manager
  - context-loading
  - critical-rule
  - core-subagent
  - planning
