Skip to content

fix(skills): stop make codeclean from corrupting the templating reference - #5

Merged
Plopix merged 1 commit into
mainfrom
chore/oxfmt-skills
Sep 15, 2026
Merged

Plopix merged 1 commit into
mainfrom
chore/oxfmt-skills

Conversation

@papelipe

Copy link
Copy Markdown
Member
Q A
Branch? main
Bug fix? yes
New feature? no
BC breaks? no
Fixed tickets #...

This started as "apply oxfmt to the skills that aren't formatted" and turned up a real bug on the way.

The bug

make codeclean runs oxfmt --write ., and oxfmt formats fenced code blocks inside Markdown. It parses ```handlebars blocks as JavaScript and rewrites them:

- {{ 0.firstName }}
+ {{[0].firstName}}

That is not the same expression reformatted — it is a different Handlebars expression. mass-operations/references/templating.md documents precisely which template syntax the runner accepts, so the rewrite turns correct documentation into incorrect documentation, and teaches the wrong syntax to any agent that reads it afterwards.

Anyone running make codeclean today does this silently. It is very likely why the mass-operations skill has stayed unformatted since it was added — the diff looked wrong, so it never got committed.

The fix

oxfmt reads .gitignore and .prettierignore by default. This adds a .prettierignore excluding that one file, with the reason recorded inline so the next person does not just delete it.

With the hazard fenced off, the remaining unformatted skill files are brought up to date. make codeclean is now a no-op across use-crystallize/skills/ instead of producing a diff on every run.

Verifying the reformat is safe

Every change was checked mechanically, not by eye. Normalising away whitespace, table rules and italic markers:

File Non-cosmetic changes
permissions/SKILL.md none — whitespace only
mass-operations/SKILL.md none
mass-operations/references/intents.md none
mass-operations/references/limits.md none
mass-operations/references/lifecycle.md 18, all inside TypeScript blocks

The 18 in lifecycle.md are 12 single→double quotes, 3 argument commas from collapsed call sites, and one arrow-function paren (path =>(path) =>) — standard JS formatting, semantically identical. No shell or GraphQL samples were affected.

Not in scope

The MCP server sources and both plugin.json files are also unformatted on main. Formatting the TypeScript belongs in its own PR, where the test suite can vouch for the result.

The underlying oxfmt behaviour is worth reporting upstream — a handlebars fence should not be parsed as JavaScript — but the ignore is the right fix for this repo either way.

🤖 Generated with Claude Code

…ence

`make codeclean` runs `oxfmt --write .`, and oxfmt formats fenced code
blocks inside Markdown. It parses ```handlebars blocks as JavaScript and
rewrites them — `{{ 0.firstName }}` becomes `{{[0].firstName}}`, which is
a different Handlebars expression, not a reformatting of the same one.

mass-operations/references/templating.md documents exactly which template
syntax the runner accepts, so that rewrite turns correct documentation
into incorrect documentation. Anyone running `make codeclean` today does
this silently, and it is the reason the mass-operations skill has stayed
unformatted since it was added.

Adds a .prettierignore — oxfmt reads .gitignore and .prettierignore by
default — excluding only that one file, with the reason recorded inline.

With the hazard fenced off, the remaining unformatted skill files are
brought up to date, so `make codeclean` is now a no-op across
use-crystallize/skills/ instead of producing a diff on every run.

Verified that every change here is formatting only. permissions/SKILL.md
is whitespace alone; mass-operations SKILL.md, intents.md and limits.md
differ only in table padding and italic markers (*x* to _x_); lifecycle.md
additionally has 18 changes inside TypeScript blocks — single to double
quotes, argument commas, and one arrow-function paren — all semantically
identical JavaScript.

Left alone: the MCP server sources and the two plugin.json files are also
unformatted on main. Formatting the TypeScript deserves its own PR where
the test suite can vouch for it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Plopix
Plopix merged commit e596eae into main Sep 15, 2026
1 check passed
@Plopix
Plopix deleted the chore/oxfmt-skills branch September 15, 2026 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants