docs/plans/2026-05-24-dry-task-router.md
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:
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:
.agents/rules/task.mdcrg audits for stale detailed mechanics and required router/template
referencespnpm installcreate-goal-scratchpad.mjspnpm lint:fixConstraints:
--template task goal trigger.Boundaries:
.agents/rules/task.mdc and
docs/plans/templates/task.md.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:
Current verdict:
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.Start Gates:
| Gate | Applies | Evidence |
|---|---|---|
| Skill analysis before edits | yes | Loaded task and goal; this edits task rule/template behavior. |
| Active goal checked or created | yes | get_goal returned no active goal; created focused task-router goal. |
| Source of truth read before edits | yes | Read .agents/rules/task.mdc, generated task skill, and task template. |
| Tracker comments and attachments read | no | N/A: direct chat task, no tracker. |
| Video transcript evidence required | no | N/A: no tracker video evidence. |
docs/solutions checked for non-trivial existing-code work | no | N/A: agent rule/template cleanup, not product code behavior. |
| TDD decision before behavior change or bug fix | no | N/A: docs/rules refactor, no runtime bug. |
| Branch decision for code-changing task | no | N/A: no code-changing product branch work requested. |
| Release artifact decision | no | N/A: no package or registry behavior changed. |
| Browser tool decision for browser surface | no | N/A: no browser surface. |
| PR expectation decision | no | N/A: user did not ask for PR. |
| Tracker sync expectation decision | no | N/A: no tracker item. |
Work Checklist:
<video-transcripts> XML, or marked N/A with reason.Completion Gates:
| Gate | Applies | Required action | Evidence |
|---|---|---|---|
| Named verification threshold | yes | Run source/generated/template audits and command checks named in this plan | pnpm install, focused rg, smoke helper, pnpm lint:fix, and checker evidence recorded below. |
| Bug reproduced before fix | no | Record failing test/repro or N/A with reason | N/A: not a bug fix. |
| Targeted behavior verification | yes | Run focused proof for changed behavior or record N/A | Focused rg confirms router/template references and removed duplicated mechanics. |
| TypeScript or typed config changed | no | Run relevant typecheck | N/A: markdown/rule docs only. |
| Package exports or file layout changed | no | Run pnpm brl before final verification and keep generated barrel updates | N/A: no package exports or file layout changed. |
| Package manifests, lockfile, or install graph changed | no | Run pnpm install and relevant package checks | N/A: no manifest changes; pnpm install still ran for Skiller sync. |
| Agent rules or skills changed | yes | Run pnpm install and verify generated skill sync | pnpm install regenerated .agents/skills/task/SKILL.md; focused rg verified source/generated alignment. |
| Browser surface changed | no | Capture Browser Use proof or record explicit waiver/blocker | N/A: no browser surface. |
| Browser final proof | no | Attach screenshot or exact browser verification caveat when browser proof applies | N/A: no browser proof applies. |
| CI-controlled template output changed | no | Restore generated template output or record why it is intentionally kept | N/A: no templates/** output touched. |
| Package behavior or public API changed | no | Add a changeset or record why no changeset applies | N/A: no package behavior or public API changed. |
| Registry-only component work changed | no | Update docs/components/changelog.mdx or record N/A | N/A: no registry component work. |
| Local install corruption suspected | no | Run pnpm run reinstall once, rerun the exact failing command, or record N/A | N/A: no corruption-shaped command failure. |
| Autoreview for non-trivial code changes | no | Load .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 patch | N/A: agent rule/template docs only, no product code patch. |
| PR create or update | no | Run check before PR work and sync PR body to final handoff | N/A: user did not ask for PR. |
| PR proof image hosting | no | If PR body needs browser proof, replace local image paths with hosted GitHub URLs or record N/A | N/A: no PR and no browser proof. |
| Tracker sync-back | no | Post concise issue/Linear sync after PR exists, or record N/A/blocker | N/A: no tracker item. |
| Final handoff contract | yes | Fill the final handoff fields below with exact PR/issue/confidence/tests/browser/outcome/caveats/design/verification content or N/A reason | Final handoff fields are filled below. |
| Final lint | yes | Run pnpm lint:fix or scoped equivalent | pnpm lint:fix completed with no fixes applied. |
| Goal plan complete | yes | Run node .agents/rules/goal/scripts/check-complete.mjs docs/plans/2026-05-24-dry-task-router.md | Passed: [goal] complete: docs/plans/2026-05-24-dry-task-router.md. |
| Knowledge extraction | no | Evaluate ce-compound; capture if useful | N/A: cleanup is local workflow maintenance, no reusable product solution. |
Phase / pass table:
| Phase | Status | Evidence | Next |
|---|---|---|---|
| Intake and source read | done | task/goal skills and source files read | implementation |
| Implementation | done | task.mdc shortened; task template expanded | verification |
| Verification | done | command evidence below | closeout |
| PR / tracker sync | done | N/A: no PR/tracker requested | final response |
| Closeout | done | completion checker gate ready | final 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.Decisions and tradeoffs:
task.mdc as a router: source read, classification, skill loading,
goal-template trigger, execution path, proportional verification, and
high-level sync triggers.Implementation notes:
.agents/rules/task.mdc with a leaner source rule..agents/skills/task/SKILL.md with pnpm install.Review fixes:
Error attempts:
| Error / failed attempt | Count | Next different move | Resolution |
|---|---|---|---|
| None | 0 | N/A | N/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.rg: confirms --template task and router/template gate references.rg: verifies removed detailed mechanics from
task.mdc or intentional ownership in video-transcripts.mdc / task
template.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:
task.mdc is a router; task.md owns task closure gates.task.mdc, audit evidence in task template,
video mechanics in video-transcripts.pnpm install, focused rg, template smoke, pnpm lint:fix, goal
checker.Final handoff / sync:
Timeline:
Reboot status:
| Question | Answer |
|---|---|
| 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: