@dafuga01/harness
v0.1.2
Published
An opinionated CLI that helps humans and agents code in small, Rails-inspired harnesses.
Readme
Harness
Harness is an opinionated CLI for humans and coding agents. It gives projects a Rails-like structure for TypeScript: small files, focused classes, small functions, generators, specs, and static guidance that agents can query before making a change.
Commands
bun run dev -- new lib my-lib
bun run dev -- new app my-app
bun run dev -- generate model Post title:string body:text --adapter sqlite
bun run dev -- generate mailer Welcome
bun run dev -- generate resource Article
bun run dev -- info scaffolds
bun run dev -- info model
bun run dev -- info model --json
bun run dev -- audit .
bun run dev -- audit . --coverage
bun run dev -- audit . --profile app
bun run dev -- audit . --profile dapp
bun run checkProject Families
appscaffolds a SvelteKit-shaped application inspired by Daniel'sapp-template.dappaudits SvelteKit dApps with Antelope or Harbor smart-contract folders.libscaffolds a Bun TypeScript package.
Harness Rules
- One file should have one reason to change.
- Prefer small functions and tiny classes over broad modules.
- Generate a feature spec before implementation work.
- Keep persistence behind adapters.
- Give agents static, explicit instructions through
harness info. - Use
harness info scaffolds --jsonto inspect what each scaffold should contain. - Use
harness audit --coverageto inspect which ecosystem adapters covered the project. - Generated projects use
bun run checkto run format checks, project checks, tests, build, and Harness audit.
