.agents/skills/slate-patch/SKILL.md
Handle $ARGUMENTS.
If the arguments start with repair <expectation>, run Repair Command. Otherwise
run the normal Slate Patch workflow.
Use this for Slate v2 bug fixes where the agent should fix the bug now, then challenge its own patch with Slate Plan-level architecture pressure before handoff. This is the implementation lane for "fix it, but do not ship a dirty local patch".
One pass means: reproduce, test, fix, re-architect if the first patch is not the right long-term shape, verify, autoreview, hand off. It does not mean "smallest diff wins".
slate-patch.slate-patch repair <expectation> because future
slate-patch runs missed a recurring proof, workflow, or handoff standard.slate-plan.autoreview..tmp/slate-v2.autogoal repair.slate-plan..tmp/slate-v2 source wins over memory, old plans, and prior
diagnosis..tmp/slate-v2. plate-2 commands do not prove
Slate v2 behavior.plate-2 through
benchmarks/targets/slate-v2.json and pnpm bench:targets:*. It can route
next work, expose benchmark gaps, and hand optimization to slate-ar-perf,
but it never replaces .tmp/slate-v2 reproduction, tests, or browser proof.autoreview for non-trivial implementation
changes.slate-patch.slate-ar.slate-ar-perf.slate-ar-perf.Trigger when $ARGUMENTS starts with:
repair <expectation>
Repair Command updates this workflow so future slate-patch runs do the right
thing by default. It is for missed recurring behavior in the skill, not for
fixing Slate runtime bugs.
Use it for misses like:
Do not use it for:
.tmp/slate-v2;autogoal repair;.agents/skills/*/SKILL.md.Repair workflow:
.agents/rules/slate-patch.mdc.docs/slate-v2/selection-navigation-coverage.md..agents/rules/**, run pnpm install to regenerate
.agents/skills/**.rg for the new rule in .agents/rules/slate-patch.mdc;rg for the regenerated text in .agents/skills/slate-patch/SKILL.md;Use autogoal as the lifecycle kernel for non-trivial Slate Patch work.
This derived lane owns repro, behavior coverage, Slate v2 proof, architecture pressure, autoreview, and any benchmark handoff. Autogoal owns active-goal conflicts, objective shape, plan state, completion rules, blocker rules, and repair routing.
Goal handle:
Fix Slate Patch <bug/cluster>; done when repro, behavior coverage, Slate v2
proof, and autoreview pass; target `.tmp/slate-v2`.
Do not create a Slate Plan pass schedule. This skill is one implementation slice, not a planning lane.
.tmp/slate-v2.Name the class before patching:
If the class appeared recently in the thread or adjacent tests, broaden the fix. Search for sibling examples, package helpers, and tests that likely share the same broken assumption.
Add or update the smallest behavior test that fails for the current bug:
The test should assert the user-visible invariant and the model invariant when both matter.
When the bug class touches selection, keyboard navigation, mouse selection,
focus handoff, history focus, DOM coverage, hidden DOM, multi-root, content
root, editable void, synced root, clipboard after selection, delete after
selection, or insert break after selection, pick a relevant slice from
docs/slate-v2/selection-navigation-coverage.md before writing the test.
The red test must name:
Do not claim "fully tested selection/navigation" unless the proof covers the relevant command x direction x topology x starting-state rows. If the bug only needs a narrower slice, record the intentionally skipped rows and why.
For selectionPolicy: 'materialize' bugs, include the materialize-specific
coverage rows from docs/slate-v2/selection-navigation-coverage.md: first
vertical Shift+Arrow entry must open hidden DOM, and the next plain vertical
Shift+Arrow after mount must not remain model-owned unless it enters another
unmounted materialize boundary. Include a mid-line caret on the last rendered
line before hidden content, not only block-edge positions.
Patch the owner that makes the behavior generally true.
Use this ownership ladder:
Prefer:
Do not prefer:
After the first green patch, stop and review it like a harsh Slate maintainer. If any answer is weak, rework the patch before final verification.
Checklist:
Verdict must be one of:
keep: patch is the right long-term shape.rework: fix before final verification.escalate: stop and route to slate-plan because the right fix is a broader
public architecture decision.Run focused gates from .tmp/slate-v2.
Pick the relevant set:
bun check only when the touched surface justifies a broader fast gate;bun check:full only for release-quality browser claims or when explicitly
requested.If a gate fails for unrelated existing debt, record the exact command and why it is unrelated. Do not hide a relevant failure.
After Slate v2 correctness proof, decide whether the patch needs benchmark
target sync or a slate-ar-perf handoff.
Run this when the bug class or patch touches performance/scalability,
rendering/projection, React rerender behavior, huge documents, history,
clipboard, collaboration, browser traces, operation replay, Slate-vs-Slate-v2
parity, or any behavior that should be covered by
benchmarks/targets/slate-v2.json.
Workflow:
plate-2, inspect benchmarks/targets/slate-v2.json and run
pnpm bench:targets:check.pnpm bench:targets:list or
node tooling/scripts/slate-autoresearch.mjs suggest-loops --with-checks
to find the matching target.pnpm bench:targets:dry-run -- <target-id> and
record whether slate-ar-perf should own further optimization.Benchmark target candidate needed - <behavior> and the likely benchmark
plus correctness command.slate-patch until
the test/browser proof exists.Do not run this as a tax on tiny model-only fixes with no benchmark family. Also do not skip it for perf-sensitive editor behavior just because focused tests passed. Tests prove correctness; the target registry keeps the benchmark backlog honest.
Final checklist item for non-trivial implementation changes:
.agents/skills/autoreview/SKILL.md..tmp/slate-v2 patches, cwd must be .tmp/slate-v2:/Users/zbeyens/git/plate-2/.agents/skills/autoreview/scripts/autoreview --mode local
Do not run dirty-local autoreview from plate-2 for .tmp/slate-v2 patches.
That reviews the wrong checkout.
Keep it short. Include:
slate-ar-perf
handoff, candidate target needed, or N/A with reason;If the architecture pressure verdict is escalate, say exactly why and name the
slate-plan surface to open next.