Skip to content

v5.0.0: TypeScript rewrite — deep modules on Bun + Hono + Drizzle + Biome - #66

Merged
NOGIT007 merged 5 commits into
mainfrom
feature/typescript-rewrite-v5
May 17, 2026
Merged

NOGIT007 merged 5 commits into
mainfrom
feature/typescript-rewrite-v5

Conversation

@NOGIT007

Copy link
Copy Markdown
Contributor

Summary

  • Stack swap. Replaces v4's Rust + Clean Architecture (4-crate workspace) with TypeScript + deep modules on 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.
  • Lighter footprint. v4 carried six hooks + ten scripts + a 4-crate Rust template (~50 files, including a checked-in Cargo.lock and 4711 untracked target/ 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 beyond oven-sh/setup-bun@v2.
  • Vocabulary discipline. Architecture vocabulary (module / interface / seam / adapter / depth / leverage / locality) drawn from established sources (Ousterhout, A Philosophy of Software Design; Feathers, Working Effectively with Legacy Code) — used exactly across plan/ship/review. The deletion test is the controlling rule for new extractions.
  • Lint stack named. Biome is the single binary for lint + format + import-sort. No ESLint, no Prettier, no Rust toolchain.

Commits

  1. 6c64cd7 — doctrine (architecture/anti-slop/testing) + 6 commands rewritten
  2. 0005029 — Rust template removed; TypeScript template added
  3. 6ac6965 — legacy hooks/scripts/tests dropped; plugin meta + CHANGELOG refreshed
  4. 57803e5 — lint stack made explicit (Biome rules strengthened, anti-slop §"Lint stack", install-ci adds standalone lint/lint:fix/typecheck scripts, CI step names show the tool)
  5. 4cc7228 — README "Lint + audit gate" section names Biome as the lint stack

Test plan

  • Template smoke (manual, against /tmp/code-et-smoke3):
    • bun install + bun run db:generate + bun run audit — all four stages green
    • bun src/main.ts boots; curl /health → 200; curl POST /greetings → 201
    • bun run lint standalone — clean
  • No Rust lint config or tooling references remain in the active plugin tree (only intentional guardrails: /code:start refuses to scaffold over Cargo.toml; /code:install-ci redirects Rust users to v4)
  • /code:install-ci against a real existing TS repo — not exercised in this branch; manual verification before announcing v5
  • Postgres path (sketched in start.md with explicit "untested in v5" caveat) — not exercised; user should exercise before relying

Migration

v4's final state is commit c5bad00 on main. 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

NOGIT007 and others added 5 commits May 17, 2026 22:02
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>
@NOGIT007
NOGIT007 merged commit d7221d9 into main May 17, 2026
1 check failed
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.

1 participant