Repository navigation
fix: lefthook-hooks, template-lint, per-command --help - #74
Merged
Merged
Conversation
Generated projects shipped lefthook.yml but never had .git/hooks/pre-commit: lefthook's own postinstall runs during the scaffold install, before the project has a .git. A `prepare: lefthook install || exit 0` script now runs on every real install; `|| exit 0` keeps the Docker build (no .git) and installs without dev deps from failing. A project's own prepare script is left alone with a note. pull's install takes pnpm's "Already up to date" fast path, which skips prepare, so the ci update() runs it once itself (shared:ci 1.1.2).
The scaffold's trailing `eslint --fix` hid that 49 template files broke the project's own style (operator-linebreak, member-delimiter-style, max-attributes-per-line, ...), so CI's scaffold lint stayed green. pull merges the raw template into the user's formatted copy, which turned every such difference into a conflict; odu-zzs had switched those rules off to cope. Templates are now `eslint --fix`ed with that config, and CI lints the raw templates inside the scaffolded project so this cannot regress. Patch bumps for every feature whose templates changed.
`battlestack own --help` printed the generic command list, so an agent concluded `own` was not implemented. A reserved command (pull, own, disown, doctor, remove, ...) now prints its usage, label and extra invocations, and `--help` inside a project prints the project help, which lists the core commands, instead of only the feature commands.
@playwright/mcp defaults to the `chrome` channel and fails with "Chromium distribution 'chrome' is not found at /opt/google/chrome" on linux-arm64 and WSL, where only Playwright's bundled Chromium exists. Pass `--browser chromium` (shared:ai-tool-config 1.1.10).
…romium" A hard-coded --browser flag overrides PLAYWRIGHT_MCP_BROWSER, so machines that do have Chrome could no longer opt back, and .mcp.json is rewritten on every pull. Machines without a system Chrome (linux-arm64) set PLAYWRIGHT_MCP_BROWSER=chromium in their own environment instead. This reverts commit 11729b2.
christian-at-sevenlab
left a comment
Contributor
Author
There was a problem hiding this comment.
Vier tooling-fixes. Lefthook, template-formatting en --help breken niets. Het Playwright-punt heb ik teruggedraaid in a109c38.
Teruggedraaid: Playwright MCP --browser chromium
@playwright/mcpleest de browser ook uitPLAYWRIGHT_MCP_BROWSER, maar een CLI-flag wint van die env var. Met de hardcoded flag kan iemand mét Chrome (Mac, Windows) dus niet meer terug naar Chrome..mcp.jsonmet de hand aanpassen helpt ook niet, wantpullherschrijft het elke keer.- Wie de bundled Chromium nodig heeft (linux-arm64, waar geen Google Chrome bestaat), zet in de eigen shell
export PLAYWRIGHT_MCP_BROWSER=chromium. Claude Code geeft die door aan de MCP-server. shared:ai-tool-configstaat daarmee weer op 1.1.9, gelijk aan main. Dat scheelt ook een versieconflict met #72.
Gecontroleerd
- Lefthook
prepare:|| exit 0vangt Docker (geen.git) en installs zonder dev deps op.- Een eigen
prepareblijft staan, met een note. - SITE, ECHO en HERA hebben geen
prepare, alleenpostinstall: nuxt prepare. writeJsonschrijft met 4 spaties, net als de projecten, duspackage.jsonwordt niet heropgemaakt.
- Template-formatting:
- Op whitespace na verschillen alleen drie
auth-2fa-bestanden: twee keerPragma→'Pragma', en intotp.tseen string-concatenatie met de operator op een andere plek en andere quotes. De betekenis is gelijk. pullheeft eenconverged-staat: een geformatteerde kopie die gelijk is aan de nieuwe template wordt geaccepteerd, niet als merge klaargezet.
- Op whitespace na verschillen alleen drie
--help: een gereserveerd commando toont zijn eigen usage. Binnen een project toont--helpde projecthulp in plaats vanprojectCommandte draaien.- Alle CI-checks waren groen. Na de revert:
mcp-json.test.tsslaagt enpnpm bump:check origin/mainis OK.
Merge-risico
Deur: tweerichtingsdeur. Alleen tooling, templates en scripts. Een revert plus pull zet het terug.
Blast radius: platform. Elk project krijgt prepare en de geformatteerde templates bij de volgende pull. Er verandert niets aan het runtime-gedrag.
…of running it self-update (and its alias update) is dispatched before the --help check, so `battlestack self-update --help` upgraded the CLI. It now prints its usage like the reserved commands do.
joris-sevenlab
approved these changes
Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Drie tooling-gaten uit een retrospective op recente sessies. Elk punt eerst gereproduceerd op
origin/main(een versenuxt4-ai/nuxt4-fullstackscaffold); geen ervan was al opgelost. Eén commit per punt.1. Lefthook-hooks worden nooit geïnstalleerd (
shared:ci1.1.2)Oorzaak: lefthook's eigen
postinstalldraait tijdens de scaffold-install, als het project nog geen.githeeft (battlestack scaffoldt met--no-gitInit). Daarna draait hij niet meer.package.jsonkrijgt"prepare": "lefthook install || exit 0".|| exit 0is nodig: de Docker build-stage heeft geen.giten geengit, en zonder de fallback faaltpnpm installdaar (lokaal geverifieerd: image bouwt).exit 0werkt ook in cmd.exe.prepareblijft staan, met een note bijpull.pulldraaitupdate()hetprepare-script één keer zelf: de install van pull neemt pnpm's fast path ("Already up to date"), dieprepareoverslaat. Zo krijgen odu-zzs, HERA en ECHO de hook bij hun eerstvolgendebattlestack pull.2. Templates voldoen niet aan de eigen ESLint-config
Oorzaak: de scaffold eindigt met
eslint --fix, waardoor de lint-stap in CI groen bleef, terwijl 49 templatebestanden de stijl van het project braken (operator-linebreak,member-delimiter-style,max-attributes-per-line, …).pullmerget de ruwe template in de geformatteerde kopie van de gebruiker, en elk stijlverschil werd zo een conflict (odu-zzs had die regels daarom uitgezet).eslint --fixt met de config van een gegenereerd project. Alleen opmaak, geen placeholders geraakt.verify-scaffold): nieuwe stap die de ruwepackages/preset-nuxt4/templatesin het gescaffolde project kopieert en daar lint met de config van het project.vue/multi-word-component-namesstaat in die stap uit, omdat pages/layouts daar buiten de paden vallen die ze uitzonderen.build-infoenlanding-shellmet de hand gebumpt:bump:checkziet hun templates niet (zie open punten).3.
battlestack <cmd> --helptoont de usage van dat commandobattlestack own --help(en pull, disown, doctor, remove, …) print nu usage, label en de extra aanroepen van dat commando.battlestack --helpbinnen een project print nu de projecthulp, die de core commands lijst. Daarvoor kwam alleen de lijst met feature-commando's.Teruggedraaid: Playwright MCP
--browser chromiumStond eerst in deze PR (
11729b2), teruggedraaid ina109c38. Een CLI-flag wint vanPLAYWRIGHT_MCP_BROWSER, dus wie Chrome heeft kon niet meer terug, en.mcp.jsonwordt bij elkepullherschreven. Wie geen systeem-Chrome heeft (linux-arm64) zetexport PLAYWRIGHT_MCP_BROWSER=chromiumin de eigen shell.shared:ai-tool-configblijft op 1.1.9.Hoe het bij bestaande projecten landt
battlestack pullziet de nieuwe versies en draaitupdate().package.json#scripts.preparewordt bijgewerkt, de hook wordt geïnstalleerd en de geformatteerde templates komen overeen met wat de gebruiker al had.Conflicten met open PR's
chatenmastra, dus versieconflicten. Wie als tweede merget, rebumpt.collectDocsniet, dus geennuxt4:docs-bump.health.get.tsenvitest/.../auth.test.ts, die hier geformatteerd zijn.Checks
pnpm tsc✓,pnpm test✓ (behalve de bekende WSL-only fout inbrowser.test.ts, "uses xdg-open on plain Linux"),pnpm bump:check origin/main✓. Lokaal ook: versenuxt4-fullstackscaffold →pnpm run lint✓, ruwe template-lint ✓,git init && pnpm install --forceinstalleertpre-commit✓,docker build✓.Open punten
bump:checkmist features dieemitTemplate(ctx, this.id, …)gebruiken (build-info,landing-shell). Een kleine aanpassing aan de regex; die zit niet in deze PR.pnpm installdie volgt opgit init. De docs zeggen nog "Install hooks once:lefthook install". Dat aanpassen zou eennuxt4:docs-bump vragen, en die laat ik aan feat(docs): keep the generated AGENTS.md an index #73.