docs/plans/2026-05-24-goal-template-system.md
Objective: Add project/skill-specific goal plan template support while keeping the generic goal template project-agnostic, complete only when goal source rules/scripts/templates support selectable source-owned templates, a Slate Ralplan-specific goal template exists under the skill source tree, Slate Ralplan guidance points to that template, generated skill output is synced, the creator/checker scripts pass syntax and smoke tests, and pnpm lint:fix passes, while preserving docs/plans as the only runtime goal-plan location and avoiding docs/goals for state.
Goal plan: docs/plans/2026-05-24-goal-template-system.md
Completion threshold:
Verification surface:
Constraints:
Boundaries:
Blocked condition:
Completion rule:
update_goal(status: complete) while any required checklist item remains unchecked. If an item does not apply, check it and add N/A: <reason>.update_goal(status: complete) until the named verification evidence is recorded below and node .agents/rules/goal/scripts/check-complete.mjs docs/plans/2026-05-24-goal-template-system.md passes.active goal state for this goal. This file plus the active goal are the durable state.Required checklist:
get_goal checked; create_goal called only when no active goal existed, or the active matching goal was recorded.learnings-researcher / docs/solutions checked, or marked N/A with reason. N/A: workflow skill/rule update, not product bug/feature reuse.docs/plans goal plan created before substantive edits.check run before PR create/update, or marked N/A with reason. N/A: no PR requested.node .agents/rules/goal/scripts/check-complete.mjs docs/plans/2026-05-24-goal-template-system.md passes after final evidence is recorded.ce-compound evaluated after non-trivial verified work. N/A: the durable artifact is the skill/rule/template update itself.Phase / pass table:
| Phase | Status | Evidence | Next |
|---|---|---|---|
| Intake and source read | complete | read goal rule/helper/template, slate-ralplan rule, pasted generated skill, and docs/plans memory preference | done |
| Implementation | complete | added template selector, template creator, Slate Ralplan template, and source guidance | done |
| Verification | complete | syntax checks, pnpm install, template creator smoke, slate template smoke, pnpm lint:fix, active checker pass | done |
| Closeout | complete | final response reports template location decision and evidence | done |
Findings:
docs/goals is the wrong place for reusable goal templates. It would blur source templates with runtime plans.docs/plans; reusable goal templates should live beside their owning source rule under .agents/rules/<skill>/templates/.Decisions and tradeoffs:
--template <skill-or-path> to create-goal-scratchpad.mjs -> keeps one instantiation command while allowing domain-specific templates -> small resolver logic.create-goal-template.mjs -> gives future skills a standard scaffold command -> does not auto-design the domain rows, which still need human/source-rule judgment..agents/rules/slate-ralplan/templates/goal-scratchpad.md -> source-owned and synced by skiller -> avoids docs/goals state/template confusion.Error attempts:
| Error / failed attempt | Count | Next different move | Resolution |
|---|---|---|---|
First pnpm lint:fix failed on inline regex in create-goal-template.mjs | 1 | Move regex to module constant | Fixed; rerun passed |
External/browser findings:
Timeline:
get_goal returned no goal.--template resolver to create-goal-scratchpad.mjs.create-goal-template.mjs.pnpm install synced generated AGENTS.md and skill output.Verification evidence:
node --check .agents/rules/goal/scripts/create-goal-scratchpad.mjs && node --check .agents/rules/goal/scripts/create-goal-template.mjs && node --check .agents/rules/goal/scripts/check-complete.mjs -> passed.pnpm install -> passed; skiller apply completed successfully.node .agents/rules/goal/scripts/create-goal-template.mjs --skill smoke-goal-template --print | awk 'NR<=8 {print}' -> printed generic template header without writing a template file.node .agents/rules/goal/scripts/create-goal-scratchpad.mjs --template slate-ralplan ... --path docs/plans/2026-05-24-smoke-slate-ralplan-template.md -> rendered a Slate Ralplan-specific smoke plan.rg -n "Template:|Slate Ralplan lane state|Scorecard|Issue accounting|Verification workspace gate" docs/plans/2026-05-24-smoke-slate-ralplan-template.md -> found Slate-specific rows.node .agents/rules/goal/scripts/check-complete.mjs docs/plans/2026-05-24-smoke-slate-ralplan-template.md -> failed as expected on unchecked checklist, open pass rows, missing final verification, and pending risks.rm docs/plans/2026-05-24-smoke-slate-ralplan-template.md -> removed temporary smoke plan.pnpm lint:fix -> passed after regex constant fix; Checked 3423 files in 5s. No fixes applied.node .agents/rules/goal/scripts/check-complete.mjs docs/plans/2026-05-24-goal-template-system.md -> passes with [goal] complete: docs/plans/2026-05-24-goal-template-system.md.Reboot status:
| Question | Answer |
|---|---|
| Where am I? | Closeout |
| Where am I going? | Report template system changes and verification |
| What is the goal? | Add project/skill-specific goal templates while preserving generic goal template and docs/plans runtime plans |
| What have I learned? | Templates should be source-owned under .agents/rules/<skill>/templates; docs/goals would be the wrong layer |
| What have I done? | Added selector, creator, Slate Ralplan template, source guidance, sync, and smoke/lint verification |
Open risks: