Implementation Task Executor
Executes a single implementation (or refactor) task from Todo to To Review using the task description and linked guides.
Purpose & Scope
- Handle one selected task only; never touch other tasks.
- Follow task Technical Approach/plan/AC; apply KISS/YAGNI and guide patterns.
- Update Linear/kanban for this task: Todo -> In Progress -> To Review.
- Run typecheck/lint; update docs/tests/config per task instructions.
- Not for test tasks (label "tests" goes to ln-404-test-executor).
Task Storage Mode
| Aspect |
Linear Mode |
File Mode |
| Load task |
get_issue(task_id) |
Read("docs/tasks/epics/.../tasks/T{NNN}-*.md") |
| Update status |
update_issue(id, state) |
Edit the **Status:** line in file |
| Kanban |
Updated by Linear sync |
Must update kanban_board.md manually |
File Mode status format:
## Status
**Status:** In Progress | **Priority:** High | **Estimate:** 4h
Mode Detection
Detect operating mode at startup:
Plan Mode Active:
- Steps 1-2: Load task context (read-only, OK in plan mode)
- Generate EXECUTION PLAN (files to create/modify, approach) → write to plan file
- Call ExitPlanMode → STOP. Do NOT implement.
- Steps 3-6: After approval → execute implementation
Normal Mode:
- Steps 1-6: Standard workflow without stopping
Progress Tracking with TodoWrite
When operating in any mode, skill MUST create detailed todo checklist tracking ALL steps.
Rules:
- Create todos IMMEDIATELY before Step 1
- Each workflow step = separate todo item; implementation step gets sub-items
- Mark
in_progress before starting step, completed after finishing
Todo Template (10 items):
Step 1: Load Context
- Fetch full task description + linked guides/manuals/ADRs
Step 2: Receive Task
- Get task ID from orchestrator, load full description
Step 2b: Goal Articulation Gate
- Complete 4 questions from shared/references/goal_articulation_gate.md (<=25 tokens each)
Step 3: Start Work
- Set task to In Progress, update kanban
Step 4: Implement
- 4a Pattern Reuse: IF creating new file/utility, Grep src/ for existing similar patterns
(error handlers, validators, HTTP wrappers, config loaders). Reuse if found.
- 4b Follow task plan/AC, apply KISS/YAGNI
- 4c Architecture Guard: IF creating service function: (1) 3+ side-effect categories → split;
(2) get_*/find_*/check_* naming → verify no hidden writes; (3) 3+ service imports → flatten
- Update docs and existing tests if impacted
- Execute verify: methods from task AC (test/command/inspect)
Step 5: Quality
- Run typecheck and lint (or project equivalents)
Step 6: Finish
- Set task to To Review, update kanban
- Add summary comment (changes, tests, docs)
Workflow (concise)
- Load context: Fetch full task description (Linear: get_issue; File: Read task file); read linked guides/manuals/ADRs/research; auto-discover team/config if needed.
- Receive task: Get task ID from orchestrator (ln-400); load full task description.
2b) Goal gate: MANDATORY READ:
shared/references/goal_articulation_gate.md — Complete the 4-question gate (<=25 tokens each). State REAL GOAL (deliverable as subject), DONE LOOKS LIKE, NOT THE GOAL, INVARIANTS & HIDDEN CONSTRAINTS.
- Start work: Update this task to In Progress (Linear: update_issue; File: Edit status line); move it in kanban (keep Epic/Story indent).
- Implement (with verification loop): Before writing new utilities/handlers, Grep
src/ for existing patterns (error handling, validation, config access). Reuse if found; if not reusable, document rationale in code comment. Follow checkboxes/plan; keep it simple; avoid hardcoded values; reuse existing components; add Task ID comment (// See PROJ-123) to new code blocks; update docs noted in Affected Components; update existing tests if impacted (no new tests here). Before creating service functions, apply Architecture Guard (cascade depth, interface honesty, flat orchestration). After implementation, execute verify: methods from task AC: test → run specified test; command → execute and check output; inspect → verify file/content exists. If any verify fails → fix before proceeding.
- Quality: Run typecheck and lint (or project equivalents); ensure instructions in Existing Code Impact are addressed.
- Finish: Mark task To Review (Linear: update_issue; File: Edit status line); update kanban to To Review; add summary comment (what changed, tests run, docs touched).
Pre-Submission Checklist
Context: Self-assessment before To Review reduces review round-trips and catches obvious issues early.
Before setting To Review, verify all 6 items:
| # |
Check |
Verify |
| 0 |
AC verified |
Each AC verify: method executed with pass evidence |
| 1 |
Approach alignment |
Implementation matches Story Technical Approach |
| 2 |
Clean code |
No dead code, no backward-compat shims, unused imports removed |
| 3 |
Config hygiene |
No hardcoded creds/URLs/magic numbers |
| 4 |
Docs updated |
Affected Components docs reflect changes |
| 5 |
Tests pass |
Existing tests still pass after changes |
| 6 |
Pattern reuse |
New utilities checked against existing codebase; no duplicate patterns introduced |
| 7 |
Architecture guard |
Cascade depth <= 2; no hidden writes in read-named functions; no service chains >= 3 |
If any check fails: Fix before setting To Review. Do not rely on reviewer to catch preventable issues.
Critical Rules
- Single-task updates only; no bulk status changes.
- Keep language of the task (EN/RU) in edits/comments.
- No code snippets in the description; code lives in repo, not in Linear.
- No new test creation; only update existing tests if required.
- Preserve Foundation-First ordering from orchestrator; do not reorder tasks.
- Add Task ID comments to new code blocks for traceability (
// See PROJ-123 or # See PROJ-123).
- Do NOT commit. Leave all changes uncommitted — ln-402 reviews and commits with task ID reference.
Definition of Done
- Task selected and set to In Progress; kanban updated accordingly.
- Guides/manuals/ADRs/research read; approach aligned with task Technical Approach.
- Implementation completed per plan/AC; each AC
verify: method executed with pass evidence.
- Docs and impacted tests updated.
- Typecheck and lint passed (or project quality commands) with evidence in comment.
- Task set to To Review; kanban moved to To Review; summary comment added.
Reference Files
- Guides/manuals/ADRs/research:
docs/guides/, docs/manuals/, docs/adrs/, docs/research/
- Kanban format:
docs/tasks/kanban_board.md
Version: 3.0.0
Last Updated: 2025-12-23
1---2name: ln-401-task-executor-23description: Executes implementation tasks (Todo -> In Progress -> To Review). Follows KISS/YAGNI, guides, quality checks. Not for test tasks.4---5
6# Implementation Task Executor
7
8Executes a single implementation (or refactor) task from Todo to To Review using the task description and linked guides.
9
10## Purpose & Scope
11- Handle one selected task only; never touch other tasks.
12- Follow task Technical Approach/plan/AC; apply KISS/YAGNI and guide patterns.
13- Update Linear/kanban for this task: Todo -> In Progress -> To Review.
14- Run typecheck/lint; update docs/tests/config per task instructions.
15- Not for test tasks (label "tests" goes to ln-404-test-executor).
16
17## Task Storage Mode
18
19| Aspect | Linear Mode | File Mode |
20|--------|-------------|-----------|
21| **Load task** | `get_issue(task_id)` | `Read("docs/tasks/epics/.../tasks/T{NNN}-*.md")` |
22| **Update status** | `update_issue(id, state)` | `Edit` the `**Status:**` line in file |
23| **Kanban** | Updated by Linear sync | Must update `kanban_board.md` manually |
24
25**File Mode status format:**
26```markdown
27## Status
28**Status:** In Progress | **Priority:** High | **Estimate:** 4h
29```
30
31## Mode Detection
32
33Detect operating mode at startup:
34
35**Plan Mode Active:**
36- Steps 1-2: Load task context (read-only, OK in plan mode)
37- Generate EXECUTION PLAN (files to create/modify, approach) → write to plan file
38- Call ExitPlanMode → STOP. Do NOT implement.
39- Steps 3-6: After approval → execute implementation
40
41**Normal Mode:**
42- Steps 1-6: Standard workflow without stopping
43
44## Progress Tracking with TodoWrite
45
46When operating in any mode, skill MUST create detailed todo checklist tracking ALL steps.
47
48**Rules:**
491. Create todos IMMEDIATELY before Step 1
502. Each workflow step = separate todo item; implementation step gets sub-items
513. Mark `in_progress` before starting step, `completed` after finishing
52
53**Todo Template (10 items):**
54
55```
56Step 1: Load Context
57 - Fetch full task description + linked guides/manuals/ADRs
58
59Step 2: Receive Task
60 - Get task ID from orchestrator, load full description
61
62Step 2b: Goal Articulation Gate
63 - Complete 4 questions from shared/references/goal_articulation_gate.md (<=25 tokens each)
64
65Step 3: Start Work
66 - Set task to In Progress, update kanban
67
68Step 4: Implement
69 - 4a Pattern Reuse: IF creating new file/utility, Grep src/ for existing similar patterns
70 (error handlers, validators, HTTP wrappers, config loaders). Reuse if found.
71 - 4b Follow task plan/AC, apply KISS/YAGNI
72 - 4c Architecture Guard: IF creating service function: (1) 3+ side-effect categories → split;
73 (2) get_*/find_*/check_* naming → verify no hidden writes; (3) 3+ service imports → flatten
74 - Update docs and existing tests if impacted
75 - Execute verify: methods from task AC (test/command/inspect)
76
77Step 5: Quality
78 - Run typecheck and lint (or project equivalents)
79
80Step 6: Finish
81 - Set task to To Review, update kanban
82 - Add summary comment (changes, tests, docs)
83```
84
85## Workflow (concise)
861) **Load context:** Fetch full task description (Linear: get_issue; File: Read task file); read linked guides/manuals/ADRs/research; auto-discover team/config if needed.
872) **Receive task:** Get task ID from orchestrator (ln-400); load full task description.
882b) **Goal gate:** **MANDATORY READ:** `shared/references/goal_articulation_gate.md` — Complete the 4-question gate (<=25 tokens each). State REAL GOAL (deliverable as subject), DONE LOOKS LIKE, NOT THE GOAL, INVARIANTS & HIDDEN CONSTRAINTS.
893) **Start work:** Update this task to In Progress (Linear: update_issue; File: Edit status line); move it in kanban (keep Epic/Story indent).
904) **Implement (with verification loop):** **Before writing new utilities/handlers**, Grep `src/` for existing patterns (error handling, validation, config access). Reuse if found; if not reusable, document rationale in code comment. Follow checkboxes/plan; keep it simple; avoid hardcoded values; reuse existing components; add Task ID comment (`// See PROJ-123`) to new code blocks; update docs noted in Affected Components; update existing tests if impacted (no new tests here). Before creating service functions, apply Architecture Guard (cascade depth, interface honesty, flat orchestration). After implementation, execute `verify:` methods from task AC: test → run specified test; command → execute and check output; inspect → verify file/content exists. If any verify fails → fix before proceeding.
915) **Quality:** Run typecheck and lint (or project equivalents); ensure instructions in Existing Code Impact are addressed.
926) **Finish:** Mark task To Review (Linear: update_issue; File: Edit status line); update kanban to To Review; add summary comment (what changed, tests run, docs touched).
93
94## Pre-Submission Checklist
95
96**Context:** Self-assessment before To Review reduces review round-trips and catches obvious issues early.
97
98Before setting To Review, verify all 6 items:
99
100| # | Check | Verify |
101|---|-------|--------|
102| 0 | **AC verified** | Each AC `verify:` method executed with pass evidence |
103| 1 | **Approach alignment** | Implementation matches Story Technical Approach |
104| 2 | **Clean code** | No dead code, no backward-compat shims, unused imports removed |
105| 3 | **Config hygiene** | No hardcoded creds/URLs/magic numbers |
106| 4 | **Docs updated** | Affected Components docs reflect changes |
107| 5 | **Tests pass** | Existing tests still pass after changes |
108| 6 | **Pattern reuse** | New utilities checked against existing codebase; no duplicate patterns introduced |
109| 7 | **Architecture guard** | Cascade depth <= 2; no hidden writes in read-named functions; no service chains >= 3 |
110
111**If any check fails:** Fix before setting To Review. Do not rely on reviewer to catch preventable issues.
112
113## Critical Rules
114- Single-task updates only; no bulk status changes.
115- Keep language of the task (EN/RU) in edits/comments.
116- No code snippets in the description; code lives in repo, not in Linear.
117- No new test creation; only update existing tests if required.
118- Preserve Foundation-First ordering from orchestrator; do not reorder tasks.
119- Add Task ID comments to new code blocks for traceability (`// See PROJ-123` or `# See PROJ-123`).
120- **Do NOT commit.** Leave all changes uncommitted — ln-402 reviews and commits with task ID reference.
121
122## Definition of Done
123- Task selected and set to In Progress; kanban updated accordingly.
124- Guides/manuals/ADRs/research read; approach aligned with task Technical Approach.
125- Implementation completed per plan/AC; each AC `verify:` method executed with pass evidence.
126- Docs and impacted tests updated.
127- Typecheck and lint passed (or project quality commands) with evidence in comment.
128- Task set to To Review; kanban moved to To Review; summary comment added.
129
130## Reference Files
131- Guides/manuals/ADRs/research: `docs/guides/`, `docs/manuals/`, `docs/adrs/`, `docs/research/`
132- Kanban format: `docs/tasks/kanban_board.md`
133
134---
135**Version:** 3.0.0
136**Last Updated:** 2025-12-23