## /coding — Manual Trigger for the DEV Coding Workflow

**Why this command exists:** the `[DEV] 5-Gate Development Workflow` (for `taskType`: `bug-fix`, `feature`, `refactor`, `investigation`, `documentation`) normally auto-starts via the `SessionStart` hook, which only fires when a Claude Code session **starts, resumes, or is cleared**. If a ticket was loaded with `ak use <TICKET-ID>` while this chat session was already open, the hook never re-ran — so this session has no ticket context yet, and typing "start" does nothing because nothing told the AI what "start" means. `/coding` fixes that by loading the ticket context manually, right now.

**Steps — do these now, in order:**

1. Read `.aiflow/context/current.json`.
   - Missing, or no `taskId` field → tell the developer to run `ak use <TICKET-ID>` first, then stop here.
2. Read `.aiflow/tasks/[taskId]/task-state.json` if it exists.
   - If `currentGate > 1` (task already in progress) → **resume at that gate** — do NOT restart from Gate 1. List which gates are already `APPROVED` before continuing.
   - Otherwise → start fresh at Gate 1.
3. Find the **`## [DEV] 5-Gate Development Workflow`** section and follow it exactly, beginning at the gate identified in step 2. Look in this order:
   - `.aiflow/instructions/gate-workflow.md` — present when the instruction file links to the workflows instead of inlining them (Codex / `AGENTS.md` setups).
   - Otherwise this project's main AI instruction file: `CLAUDE.md`, `AGENTS.md`, `GEMINI.md`, or `.github/copilot-instructions.md` — whichever is present.
4. This workflow applies regardless of the ticket's `taskType` value — `bug-fix`, `feature`, `refactor`, `investigation`, and `documentation` all share this same 5-gate flow (see the "Workflow Selection" table above that section for the full routing).

Do not wait for further confirmation from the developer before starting — begin the identified gate immediately.
