Full-stack monorepo preset, packkit.json provenance, agent tool steering#14
Merged
Conversation
Three items from the field review of a real project built with Packkit. Full-stack monorepo (`fullstack`, alias `fs`): apps/web (React+Vite), apps/server (Hono), packages/shared. The pieces already existed as standalone presets — what was missing was the composition. Both apps import the shared package, Vite proxies /api to the server so requests are same-origin in dev exactly as in production, and the server serves the web build in production so one process covers the whole app. The existing `monorepo` preset is unchanged and remains the default layout. Verified by generating it, installing, and running the real toolchain rather than eyeballing the output. That caught two things templates get subtly wrong: missing @types/react (turbo typecheck failed on every JSX element) and a test script with no test files (vitest exits 1). Both fixed; build, typecheck and tests are green across all three packages, and the production server was confirmed serving both /api/health and the built web app on one port. packkit.json records the generator version, preset, and only the settings that differ from the defaults, so a project can finally answer "what did I start from?" — the prerequisite for any future upgrade command. No timestamps or machine details: generation stays a pure function of the config, so the same config yields the same bytes. MCP tool descriptions now point agents at packkit_schema first and describe packkit_preview as the structure-preview step. The reviewer asked for a "preview_project_structure" tool that already existed under a name they never found; the misremembering was the finding. Also fixes the MCP scaffold path to write a lockfile before pushing, matching the CLI — without it a created repo fails its first CI run. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Every preset but the new one was covered, and it is the most complex — three packages, a workspace, and a dev story with two servers. Verified locally: install, typecheck, lint, build, test, and `turbo dev` bringing up Vite on 5173 and Hono on 3000 together. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Three items from the field review, plus a bug the testing turned up.
Full-stack monorepo preset
fullstack(aliasfs), or--monorepo-layout fullstack:The reviewer's sharpest complaint was scaffolding pieces separately and merging them by hand. The parts already existed (
node-service,react-app) — the composition didn't. Vite proxies/apito the server so requests are same-origin in dev exactly as in production (no CORS, no environment-specific base URL), andturbo devbuildssharedbefore either app starts, so a changed shared type surfaces as a type error on both sides rather than at runtime.The existing
monorepopreset is untouched and stays the default layout.This is why generating isn't verifying
I installed the generated workspace and ran the real toolchain instead of eyeballing the file list. It failed, twice:
@types/react→turbo typecheckfailed with TS7016/TS7026 on every JSX element.testscript with no test files → vitest exits 1, soturbo testfailed.Both are exactly the "subtly wrong" plumbing a scaffolder is supposed to eliminate. Fixed, then re-verified end to end:
And the production claim in the README was checked rather than assumed —
NODE_ENV=production node dist/index.jsserves/api/healthas JSON and/as the built web app, one process, one port.packkit.jsonprovenanceRecords generator version, preset, and only settings that differ from the defaults, so it reads as the decisions someone made rather than a dump of every option. Packkit previously left no trace, so a project couldn't say what it started from — this is the prerequisite for any future
packkit upgrade.Deliberately no timestamps or machine details: generation stays a pure function of the config, so the same config produces the same bytes. There's a test for that.
Agent tool steering
MCP descriptions now push agents to
packkit_schemafirst and framepackkit_previewas the structure-preview step. The reviewer asked forpreview_project_structure"as a default pre-scaffold step" — that tool exists, aspackkit_preview. Them not finding it was the finding.Also
The MCP scaffold path now writes a lockfile before pushing, matching the CLI. Without it, a repo created through MCP failed its first CI run.
48 tests pass.
🤖 Generated with Claude Code