Back to Plate

Dry Task Router

docs/plans/2026-05-24-dry-task-router.md

53.0.612.8 KB
Original Source

Dry Task Router

Objective: Reduce .agents/rules/task.mdc to a lean task router and move auditable task closure details into docs/plans/templates/task.md.

Goal plan: docs/plans/2026-05-24-dry-task-router.md

Template: docs/plans/templates/task.md

Task source:

  • type: chat request
  • id / link: N/A: direct user instruction
  • title: DRY task.mdc by moving completion details into the task template
  • acceptance criteria: task.mdc is materially shorter, source/generated task skill stay synced, the task template carries recordable gates, and verification commands pass.

Completion threshold:

  • .agents/rules/task.mdc is a router, not a full video/PR/tracker/final handoff policy file.
  • docs/plans/templates/task.md owns recordable branch, release, browser, PR, tracker, repro, local-env-rot, review, and final handoff gates.
  • .agents/skills/task/SKILL.md is regenerated from .agents/rules/task.mdc.
  • pnpm install, focused rg audits, template smoke, pnpm lint:fix, and node .agents/rules/goal/scripts/check-complete.mjs docs/plans/2026-05-24-dry-task-router.md pass.

Verification surface:

  • line count before/after for .agents/rules/task.mdc
  • focused rg audits for stale detailed mechanics and required router/template references
  • generated skill sync after pnpm install
  • task template smoke through create-goal-scratchpad.mjs
  • pnpm lint:fix
  • goal plan completion checker

Constraints:

  • Preserve source-of-truth-first routing.
  • Preserve skill selection.
  • Preserve --template task goal trigger.
  • Preserve proportional verification.
  • Preserve high-level tracker, PR, and browser triggers.
  • Do not create PRs, commits, pushes, or tracker comments.

Boundaries:

  • Source of truth: user instruction plus .agents/rules/task.mdc and docs/plans/templates/task.md.
  • Allowed edit scope: task rule, task template, generated task skill, generated top-level agent instructions, and this goal plan.
  • Browser surface: N/A: agent rule/template docs only.
  • Tracker sync: N/A: no tracker item.
  • Non-goals: new tracker-sync skill, PR creation, commit, push.

Blocked condition: Stop if Skiller sync fails, the generated task skill does not match the source rule, or focused audits still show detailed video/PR/tracker mechanics embedded in task.mdc.

Task state:

  • task_type: agent-rule refactor
  • task_complexity: non-trivial
  • current_phase: closeout
  • current_phase_status: done
  • next_phase: final response
  • goal_status: active

Current verdict:

  • verdict: implemented
  • confidence: high
  • next owner: task
  • reason: router/template split is in place; verification is recorded below.

Completion rule:

  • update_goal(status: complete) is legal only after every required checklist item and gate in this file is closed and the completion checker passes.
  • Do not create hook state for this goal. This file plus the active goal are the durable state.

Start Gates:

GateAppliesEvidence
Skill analysis before editsyesLoaded task and goal; this edits task rule/template behavior.
Active goal checked or createdyesget_goal returned no active goal; created focused task-router goal.
Source of truth read before editsyesRead .agents/rules/task.mdc, generated task skill, and task template.
Tracker comments and attachments readnoN/A: direct chat task, no tracker.
Video transcript evidence requirednoN/A: no tracker video evidence.
docs/solutions checked for non-trivial existing-code worknoN/A: agent rule/template cleanup, not product code behavior.
TDD decision before behavior change or bug fixnoN/A: docs/rules refactor, no runtime bug.
Branch decision for code-changing tasknoN/A: no code-changing product branch work requested.
Release artifact decisionnoN/A: no package or registry behavior changed.
Browser tool decision for browser surfacenoN/A: no browser surface.
PR expectation decisionnoN/A: user did not ask for PR.
Tracker sync expectation decisionnoN/A: no tracker item.

Work Checklist:

  • Objective includes outcome, completion threshold, verification surface, constraints, boundaries, and blocked condition.
  • Task source classified with source type, id/link, title, task type, acceptance criteria, caveats, likely files/routes/packages, browser surface, and root-cause layer.
  • Required video or screen-recording evidence is cached/read as normalized <video-transcripts> XML, or marked N/A with reason.
  • Nearby repo instructions and implementation patterns read before edits.
  • Implementation fixes the right ownership boundary, or the narrower choice is recorded with reason.
  • Release artifact requirement recorded: changeset, registry changelog, or N/A with reason.
  • Final handoff shape decided: bug/feature/testing/batch/review/tracker requirements, PR body sync, and issue/Linear sync when applicable.
  • Branch handling recorded for code-changing work: dedicated branch used, new branch needed, or N/A with reason.
  • Local-env-rot retry policy recorded for any surprising repo-wide failure: reinstall/rerun evidence or N/A with reason.
  • Review/autoreview decision recorded for risky, user-facing, architecture, or agent-tooling work.

Completion Gates:

GateAppliesRequired actionEvidence
Named verification thresholdyesRun source/generated/template audits and command checks named in this planpnpm install, focused rg, smoke helper, pnpm lint:fix, and checker evidence recorded below.
Bug reproduced before fixnoRecord failing test/repro or N/A with reasonN/A: not a bug fix.
Targeted behavior verificationyesRun focused proof for changed behavior or record N/AFocused rg confirms router/template references and removed duplicated mechanics.
TypeScript or typed config changednoRun relevant typecheckN/A: markdown/rule docs only.
Package exports or file layout changednoRun pnpm brl before final verification and keep generated barrel updatesN/A: no package exports or file layout changed.
Package manifests, lockfile, or install graph changednoRun pnpm install and relevant package checksN/A: no manifest changes; pnpm install still ran for Skiller sync.
Agent rules or skills changedyesRun pnpm install and verify generated skill syncpnpm install regenerated .agents/skills/task/SKILL.md; focused rg verified source/generated alignment.
Browser surface changednoCapture Browser Use proof or record explicit waiver/blockerN/A: no browser surface.
Browser final proofnoAttach screenshot or exact browser verification caveat when browser proof appliesN/A: no browser proof applies.
CI-controlled template output changednoRestore generated template output or record why it is intentionally keptN/A: no templates/** output touched.
Package behavior or public API changednoAdd a changeset or record why no changeset appliesN/A: no package behavior or public API changed.
Registry-only component work changednoUpdate docs/components/changelog.mdx or record N/AN/A: no registry component work.
Local install corruption suspectednoRun pnpm run reinstall once, rerun the exact failing command, or record N/AN/A: no corruption-shaped command failure.
Autoreview for non-trivial code changesnoLoad .agents/skills/autoreview/SKILL.md and follow its target selection until no accepted/actionable findings, or record N/A for docs-only/trivial/no local patchN/A: agent rule/template docs only, no product code patch.
PR create or updatenoRun check before PR work and sync PR body to final handoffN/A: user did not ask for PR.
PR proof image hostingnoIf PR body needs browser proof, replace local image paths with hosted GitHub URLs or record N/AN/A: no PR and no browser proof.
Tracker sync-backnoPost concise issue/Linear sync after PR exists, or record N/A/blockerN/A: no tracker item.
Final handoff contractyesFill the final handoff fields below with exact PR/issue/confidence/tests/browser/outcome/caveats/design/verification content or N/A reasonFinal handoff fields are filled below.
Final lintyesRun pnpm lint:fix or scoped equivalentpnpm lint:fix completed with no fixes applied.
Goal plan completeyesRun node .agents/rules/goal/scripts/check-complete.mjs docs/plans/2026-05-24-dry-task-router.mdPassed: [goal] complete: docs/plans/2026-05-24-dry-task-router.md.
Knowledge extractionnoEvaluate ce-compound; capture if usefulN/A: cleanup is local workflow maintenance, no reusable product solution.

Phase / pass table:

PhaseStatusEvidenceNext
Intake and source readdonetask/goal skills and source files readimplementation
Implementationdonetask.mdc shortened; task template expandedverification
Verificationdonecommand evidence belowcloseout
PR / tracker syncdoneN/A: no PR/tracker requestedfinal response
Closeoutdonecompletion checker gate readyfinal response

Findings:

  • .agents/rules/task.mdc mixed routing with video cache protocol, PR body mechanics, tracker comment templates, and final handoff formatting.
  • video-transcripts.mdc already owns the video cache protocol.
  • The task template is the better home for auditable per-task closure gates.

Decisions and tradeoffs:

  • Kept task.mdc as a router: source read, classification, skill loading, goal-template trigger, execution path, proportional verification, and high-level sync triggers.
  • Moved recordable closure details into the task template instead of duplicating exact workflow mechanics in the router.
  • Did not create a new tracker-sync skill; this pass only performs the requested router/template split.

Implementation notes:

  • Replaced .agents/rules/task.mdc with a leaner source rule.
  • Added task-template gates for release, PR expectation, tracker expectation, local install corruption, browser final proof, PR proof hosting, and final handoff contract.
  • Synced generated .agents/skills/task/SKILL.md with pnpm install.

Review fixes:

  • None required.

Error attempts:

Error / failed attemptCountNext different moveResolution
None0N/AN/A

Verification evidence:

  • wc -l .agents/rules/task.mdc before edit: 512 lines.
  • wc -l .agents/rules/task.mdc after edit: 220 lines.
  • pnpm install: completed Skiller sync successfully.
  • Focused rg: confirms --template task and router/template gate references.
  • Focused stale-detail rg: verifies removed detailed mechanics from task.mdc or intentional ownership in video-transcripts.mdc / task template.
  • Task template smoke: create-goal-scratchpad.mjs --template task creates a plan and untouched check fails with expected unresolved gates.
  • pnpm lint:fix: completed with no fixes applied.
  • node .agents/rules/goal/scripts/check-complete.mjs docs/plans/2026-05-24-dry-task-router.md: passed.

Final handoff contract:

  • PR line: N/A: no PR requested.
  • Issue / tracker line: N/A: no tracker item.
  • Confidence line: high confidence.
  • Flow table:
    • Reproduced: tests N/A, browser N/A
    • Verified: tests N/A, browser N/A
  • Browser check: N/A: no browser surface.
  • Outcome: task.mdc is a router; task.md owns task closure gates.
  • Caveat: no PR/commit created.
  • Design:
    • Chosen boundary: router in task.mdc, audit evidence in task template, video mechanics in video-transcripts.
    • Why not quick patch: deleting a few bullets would leave duplicate policies and no durable closure surface.
    • Why not broader change: a new tracker-sync skill can wait; user asked for task/template DRY now.
  • Verified: pnpm install, focused rg, template smoke, pnpm lint:fix, goal checker.

Final handoff / sync:

  • PR: N/A: not requested
  • Issue / tracker: N/A: no tracker
  • Browser proof: N/A: no browser surface
  • Caveats: no commit, push, or PR created

Timeline:

  • 2026-05-24T21:40:50.324Z Task goal plan created.
  • 2026-05-24T21:42Z Source rule and task template edited.
  • 2026-05-24T21:43Z Generated skill synced and verification started.

Reboot status:

QuestionAnswer
Where am I?Closeout
Where am I going?Final verification, goal completion, final response
What is the goal?DRY task rule by moving auditable closure details to task template
What have I learned?task.mdc had become router plus policy dump; template gates are the cleaner durable surface
What have I done?Shortened task rule, expanded task template gates, synced generated skill

Open risks:

  • None.