docs/plans/2026-05-24-move-goal-templates.md
Objective: Move goal templates out of .agents/rules into a project-owned template location and make goal-plan creation a static-shell workflow, complete only when goal template scripts/rules resolve generic and Slate Ralplan templates from the new location, old objective-style CLI flags are rejected, the agent must write goal content into the generated file, stale .agents/rules template files are removed, generated skill output is synced, template creation/rendering/checker smoke tests pass, script syntax checks pass, and pnpm lint:fix passes, while preserving docs/plans as runtime goal-plan output and keeping generated SKILL.md untouched by hand.
Goal plan: docs/plans/2026-05-24-move-goal-templates.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-move-goal-templates.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/template location correction, 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-move-goal-templates.md passes after final evidence is recorded.ce-compound evaluated after non-trivial verified work. N/A: the durable artifact is the workflow/template update itself.Phase / pass table:
| Phase | Status | Evidence | Next |
|---|---|---|---|
| Intake and source read | complete | read correction, active goal state, goal scripts/rules, Slate Ralplan rule, generated references | done |
| Implementation | complete | moved templates to docs/goals/templates, made scratchpad creation static-shell only, updated resolvers/help/rules, removed .agents/rules/**/templates files | done |
| Verification | complete | syntax checks, old flag rejection, pnpm install, generic/slate static smoke renders, expected incomplete failures, lint, active checker pass | done |
| Closeout | complete | final response reports corrected architecture and evidence | done |
Findings:
.agents/rules is generic rule/tooling source and should not store project/skill-specific reusable templates.docs/goals/templates is the right compromise: it is project-owned and reusable, while docs/plans stays the only active runtime goal-plan output.docs/goals runtime state, not reusable templates under docs/goals/templates.Decisions and tradeoffs:
docs/goals/templates/goal.md -> keeps default template project-owned and generic -> each project can override it without editing generic rules.docs/goals/templates/slate-ralplan.md -> keeps skill-specific rows out of .agents/rules -> --template slate-ralplan remains simple..agents/rules/goal/scripts -> scripts are generic tooling, unlike templates -> generated SKILL.md remains untouched by hand.create-goal-scratchpad.mjs -> prevents the helper from becoming a prompt transport -> agent must edit the generated plan file.Error attempts:
| Error / failed attempt | Count | Next different move | Resolution |
|---|---|---|---|
Prior architecture stored templates under .agents/rules/**/templates | 1 | Move reusable templates to project docs layer | Fixed: no template files remain under .agents/rules |
| Initial helper accepted content-heavy objective/threshold flags | 1 | Make helper static-shell only | Fixed: old objective-style flags now fail fast |
External/browser findings:
Timeline:
get_goal returned no goal.docs/goals/templates/goal.md and docs/goals/templates/slate-ralplan.md.pnpm install synced generated AGENTS.md and skills.pnpm install after the static-shell correction; skiller sync completed.pnpm lint:fix; first pass fixed one file, second pass reported no fixes, then active goal completion checker passed.Verification evidence:
find .agents/rules -path '*/templates/*' -type f -maxdepth 5 -print -> no output; no reusable template files remain under .agents/rules.find docs/goals -maxdepth 3 -type f -print -> docs/goals/templates/goal.md and docs/goals/templates/slate-ralplan.md.rg -n '\.agents/rules/.*/templates|Do not put reusable templates|source-owned at|docs/goals.*state or templates|docs/goals/\*\*' ... -> only allowed docs/goals/** runtime state references remain; stale .agents/rules/**/templates references are gone after sync.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 --path docs/goals/templates/smoke-template.md -> created a temporary project-owned template; rg found generic template rows; temp file removed.node .agents/rules/goal/scripts/create-goal-scratchpad.mjs ... --path docs/plans/2026-05-24-smoke-generic-goal-template.md -> rendered default generic template from docs/goals/templates/goal.md; rg found expected rows; checker failed as expected on incomplete plan; temp file removed.node .agents/rules/goal/scripts/create-goal-scratchpad.mjs --template slate-ralplan ... --path docs/plans/2026-05-24-smoke-slate-ralplan-template.md -> rendered Slate Ralplan-specific rows; checker failed as expected on incomplete plan; temp file removed.node .agents/rules/goal/scripts/create-goal-scratchpad.mjs --title bad --objective nope --path docs/plans/2026-05-24-smoke-bad-cli.md -> failed as expected with unsupported flag; no smoke file remained.node .agents/rules/goal/scripts/create-goal-scratchpad.mjs --title "smoke static generic" --path docs/plans/2026-05-24-smoke-static-generic.md -> rendered static generic shell; rg found objective placeholder, goal-plan path, and threshold section; checker failed as expected on unfilled fields; temp file removed.node .agents/rules/goal/scripts/create-goal-scratchpad.mjs --template slate-ralplan --title "smoke static slate ralplan" --path docs/plans/2026-05-24-smoke-static-slate-ralplan.md -> rendered static Slate Ralplan shell; rg found objective placeholder, lane state, scorecard, issue accounting, and workspace gate; checker failed as expected on unfilled fields; temp file removed.pnpm install -> passed; skiller apply completed successfully.create-goal-scratchpad.mjs, create-goal-template.mjs, and check-complete.mjs.--objective rejected with unsupported flag --objective; no smoke file remained..agents/rules, .agents/AGENTS.md, generated AGENTS.md, generated goal/Slate skills, and docs/goals/templates -> clean.pnpm lint:fix -> passed; first pass fixed one file, second pass passed with Checked 3423 files in 5s. No fixes applied.node .agents/rules/goal/scripts/check-complete.mjs docs/plans/2026-05-24-move-goal-templates.md -> passed with [goal] complete: docs/plans/2026-05-24-move-goal-templates.md.Reboot status:
| Question | Answer |
|---|---|
| Where am I? | Closeout |
| Where am I going? | Report corrected template architecture and verification |
| What is the goal? | Move reusable goal templates out of .agents/rules and make the helper static-shell only |
| What have I learned? | .agents/rules stays generic; project/skill-specific reusable templates live under docs/goals/templates; goal content belongs in the generated plan file, not CLI args |
| What have I done? | Moved templates, rejected old content-heavy flags, updated scripts/rules/generated output, smoke-tested generic and Slate renders, ran lint |
Open risks: