v5.0.0: TypeScript rewrite — deep modules on Bun + Hono + Drizzle + Biome - #66
Merged
Merged
Conversation
Replace v4's Rust Clean Architecture (4-crate workspace, layer-enforced dep table) with TypeScript deep modules — small interfaces with a lot of behaviour behind them, no fixed taxonomy. Vocabulary (module / interface / seam / adapter / depth / leverage / locality) is standard software-engineering terminology from Ousterhout's A Philosophy of Software Design (deep modules) and Feathers' Working Effectively with Legacy Code (seams). Doctrine (docs/): - architecture.md — deep modules, dependency categories (in-process / local-substitutable / remote-but-owned / true-external), seam discipline. Composition root in src/main.ts. - anti-slop.md — 4 elements (shallow modules, duplication, defensive over-programming, drift), 5 categories, 8 hard rules. Deletion test is the controlling rule for new extractions. - testing.md — interface-as-test-surface; module-interface / HTTP-seam / e2e patterns with bun test; mirror-test ban. Commands rewritten lean (declarative prose, no procedural ceremony): - start.md — Bun + Hono + Drizzle scaffold; Postgres + web are manual add-ons rather than flags (decisions stay explicit). - fix.md — single-bug intake; Task Brief carries metadata.module (free-form lowercase) instead of v4's enforced layer enum. - plan.md — refined brief → PRD on disk → vertical-slice tasks. - ship.md — parallel worktree agents + audit (biome / tsc / bun audit --audit-level=high / bun test) + 1 auto-retry. - review.md — pre-merge gate; delegates to engineering plugin's code-review skill when installed. - install-ci.md — drop the audit workflow into an existing TS repo. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…Drizzle) Drop templates/rust/dioxus-fullstack/ — 4-crate workspace + 4 apps (server/web/desktop/mobile) + 50+ files including a committed Cargo.lock. Desktop/mobile dropped entirely: no TypeScript story matches Dioxus's one-tree-three-renderers, and chasing it would contradict v5's "lightweight" goal. Add templates/typescript/ — 12 files for the simplest viable stack: - package.json — Bun + Hono + Drizzle ORM + Zod runtime; Biome + drizzle-kit + TypeScript dev. Audit script: biome check . && tsc --noEmit && bun audit --audit-level=high && bun test - tsconfig.json — strict + noUncheckedIndexedAccess; verbatimModuleSyntax. - biome.json — v2 schema; excludes src/db/migrations/ from formatter (Drizzle-generated meta files). - src/modules/greetings/ — the canary deep module: interface in index.ts, module-interface test exercising the real Drizzle SQLite schema. - src/http/routes/greetings.ts — Zod-parsed seam; HTTP-seam test via app.fetch with a stub Greetings. - src/main.ts — composition root (the only place adapters are wired in). - src/config.ts — Zod-validated env loading at boot. CI workflow (templates/shared/.github/workflows/code-et-audit.yml) rewritten for Bun + Biome + tsc + bun audit + bun test. Uses --audit-level=high so dev-only moderate advisories (e.g. esbuild via drizzle-kit) don't block merges. Smoke-tested end-to-end against /tmp/code-et-smoke3: - bun install + bun run db:generate + bun run audit all green - bun src/main.ts boots; curl /health → 200; curl POST /greetings → 201 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Hooks (hooks/hooks.json): v4 carried six hooks — SubagentStop audit, PreToolUse(TaskCreate) regex validator, SessionStart PRD-detect, TaskCompleted notifier, PreCompact PRD-resume, plus PermissionRequest. v5 keeps only the PermissionRequest auto-approve for read-only tools; everything else is handled by skill prose (trust-the-model). Scripts (scripts/): Drop the Rust-specific audit/verify/PRD helpers (audit.sh + audit-stages.sh + audit-report.sh, run-tests.sh, verify-gate.sh, task-created-tag-check.sh, task-complete.sh, session-start-prd.sh, resolve-prd.sh, pre-compact-prd.sh). The single auto-approve-readonly.sh remains. Local audit is now just `bun run audit` (defined in the template's package.json), invoked directly by /code:ship and /code:review. Tests (tests/): Drop the bats suite that covered the Rust-targeted hooks. No TS-targeted suite yet; manual smoke test exercised the template end-to-end before commit. Meta: - plugin.json + marketplace.json — version 5.0.0; description rewritten for the TS/deep-modules stack; author scrubbed. - settings.json — add Bash(bun:*), Bash(bunx:*) to allow list; refresh spinner tips. - CLAUDE.md — TS code standards, deep-modules vocabulary, metadata.module (free-form) replaces metadata.layer (enforced enum). - README.md — workflow diagram, deep-modules architecture, "how it stays simple" updated. - FILE-REFERENCE.md — inventory matches the new tree (commands, doctrine, hooks, single script, templates). - CHANGELOG.md — v5.0.0 entry covers stack, architecture, skill style, hooks dropped, tag schema, CI gate, template, migration path. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… framing The framework already used Biome (lint + format in one binary) for the TS template, but the docs and the install-ci command treated the lint stage as an implicit slice of `audit`. After dropping the Rust toolchain (clippy / rustfmt / cargo-deny / etc.) in v5.0.0, name the TS lint stack explicitly: - biome.json — add useConst, useTemplate, noImplicitAnyLet, noUnusedFunctionParameters, noUselessLoneBlockStatements, noUselessTypeConstraint. Stays inside `recommended` + the existing custom rules; smoke-tested clean against the template. - docs/anti-slop.md — new "Lint stack — Biome only" subsection states the policy: one binary, no ESLint, no Prettier, no Rust toolchain. 4-stage table refreshed: stage 1 is now "Lint + format" (not generic "Static validation"); stage 3 explicitly shows --audit-level=high. - workflow steps renamed: `lint (biome)` / `typecheck (tsc)` / `dependency audit (bun audit)` / `test (bun test)` so CI failures identify the tool at a glance. - commands/install-ci.md — add standalone `lint`, `lint:fix`, `typecheck` scripts to package.json (in addition to the chained `audit`). Note that Biome replaces ESLint + Prettier so users migrating from those tools see the trade. Smoke-tested against /tmp/code-et-smoke3: `bun run lint`, `bun run audit` both green; 4/4 tests pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The CI gate section listed four pipeline stages but didn't make the
lint-stack policy explicit ("Biome only, no ESLint, no Prettier") or
mention the standalone `bun run lint` / `lint:fix` / `typecheck`
commands. Section retitled to "Lint + audit gate" so the lint
policy is visible before the gate's stage list.
Co-Authored-By: Claude Opus 4.7 (1M context) <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.
Summary
Bun + Hono + Drizzle + Biome. Six-command surface (/code:start,/code:install-ci,/code:fix,/code:plan,/code:ship,/code:review) preserved; doctrine, commands, template, hooks, scripts, CI all replaced.Cargo.lockand 4711 untrackedtarget/artifacts). v5 keeps one hook (read-only auto-approve), one script (the same), and a 12-file TS template — all four CI stages run by Bun without external action installs beyondoven-sh/setup-bun@v2.Commits
6c64cd7— doctrine (architecture/anti-slop/testing) + 6 commands rewritten0005029— Rust template removed; TypeScript template added6ac6965— legacy hooks/scripts/tests dropped; plugin meta + CHANGELOG refreshed57803e5— lint stack made explicit (Biome rules strengthened, anti-slop §"Lint stack", install-ci adds standalonelint/lint:fix/typecheckscripts, CI step names show the tool)4cc7228— README "Lint + audit gate" section names Biome as the lint stackTest plan
/tmp/code-et-smoke3):bun install+bun run db:generate+bun run audit— all four stages greenbun src/main.tsboots;curl /health→ 200;curl POST /greetings→ 201bun run lintstandalone — clean/code:startrefuses to scaffold overCargo.toml;/code:install-ciredirects Rust users to v4)/code:install-ciagainst a real existing TS repo — not exercised in this branch; manual verification before announcing v5start.mdwith explicit "untested in v5" caveat) — not exercised; user should exercise before relyingMigration
v4's final state is commit
c5bad00onmain. Pin or branch from there if you need to keep iterating on the Rust workflow. v5 only scaffolds new TS projects; there is no automatic v4 → v5 codebase migration.🤖 Generated with Claude Code