convez.ai
SkillDesenvolvimento WebIntermediário
PDX-Apps

Bench — Conventions para Claude Code em Laravel + Vue/React

PDX-Apps/bench

Adapte Claude Code às convenções do seu projeto Laravel + Vue/React

Ver no GitHub
InicialPluginScore · de 0 a 100

Kit de skills e agents que ensina ao Claude Code as convenções específicas do seu projeto Laravel + Vue/React, gerando código que se encaixa na primeira vez. Detecta stack, captura padrões do projeto e cria plugins personalizados por projeto.

Instalação

$npx convez-ai PDX-Apps/bench

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
0
Forks
0
Acompanhando
0
Saúde
37%
Último commit
há 2 meses
Versão
—
Issues abertas
0
Contribuidores
1

Casos de uso

  • Gerar código backend/frontend que respeita padrões do projeto
  • Onboarding de assistentes de IA em projetos existentes com regras específicas
  • Automatizar criação de features mantendo coerência arquitetural

Veredito

Ferramenta madura (beta v0.8) que resolve um problema real: IA gerando código genérico que não se encaixa em projetos com convenções estabelecidas. Approach inteligente via detecção de stack + plugins por-projeto + skills versionadas. Ideal para equipes com Laravel/Vue/React que usam Claude Code e querem reduzir retrabalho de review.

README

A tradução para o português deste README ainda está na fila.

Bench

Teach AI coding assistants the conventions of your Laravel + Vue/React project — once — so the code they generate lands in the right place, in the right shape, the first time.

Status: beta (v0.8.x). Works end-to-end; not yet battle-tested across many projects. API soft-stable until v1.0.0 — see CHANGELOG.md.

Built for Claude Code today; designed to extend to other AI CLIs.


The problem

AI coding assistants generate generic-best-practices code. But real projects have a specific framework version, a test runner, an auth strategy, a response shape, a folder layout, a UI library. Generic code fights all of that — so you spend the review fixing placement and idioms.

Bench is a pluggable kit of slash commands + worker agents + versioned framework knowledge that adapts to your project. You describe a feature; Bench routes it to a worker that reads only the relevant conventions and produces code that fits.


Contents: Install · Using Bench · How it works · Addons · CLI reference · Docs · License


Install

Clone Bench once; then build it into each project you want to use it in.

# Once, globally — clone Bench somewhere stable:
git clone git@github.com:PDX-Apps/bench.git ~/tools/bench

# Then, once per project — from the project root:
cd ~/my-app
~/tools/bench/bin/bench build

(Tip: symlink ~/tools/bench/bin/bench onto your PATH so it's just bench build everywhere — see scripts/install-cli.sh.)

bench build detects your Laravel / PHP / Vue / React versions, builds a copy of the plugin for this project into .claude/plugins/bench/ (patterns resolved for your versions, your .bench/ overrides + addons merged), and registers it in .claude/settings.json.

Bench is per-project, not a global plugin. Each project gets its own built copy — there is no single build that's correct for every version + override set. Your project must be its own git root.

Monorepo or non-standard layout? Auto-detect reads composer.json / package.json at the repo root and scans apps/, packages/, services/ one or two levels down. If your Laravel or Vue/React app lives elsewhere — or the build prints Built BACKEND-ONLY / frontend=none when you do have a frontend — set the stack explicitly so the right skills are generated:

bench build --frontend=vue --vue=3 --laravel=13 --php=8.5   # or --frontend=react

The frontend is fixed at build time. /bench-init and bench rebuild replay whatever the build set — they do not re-detect or change it. So if Vue/React files are missing, re-run bench build with --frontend=…, not bench-init.

Now open Claude Code in the project and head to Using Bench → start with /bench-init.


Using Bench

You work inside Claude Code with slash commands. Onboard the project first, then generate code, and tailor Bench as you discover the project's quirks.

1. Onboard — /bench-init

The first thing to run in a new project. It walks the concerns — a guided interview over the essentials (auth strategy, test framework, permissions model, response shape, layout), where each concern knows exactly which patterns it owns and updates all of them — then offers to scan for anything else non-standard. Everything it captures lands in a committed .bench/ folder that travels with your repo. Re-run a single concern anytime with /bench-configure <name>.

Bench never writes your CLAUDE.md — your project context lives in .bench/.

2. Generate code

Describe what you want; Bench routes it to the right worker(s):

  • One artifact — /laravel create an endpoint to list a user's orders · /vue-component OrderCard
  • A whole feature — /bench implement <feature, PRD, or ticket> spawns the agents in dependency order (migration → model → controller → … → tests).
  • Frontend — /frontend <request> routes to your Vue or React stack (fixed at build, no guessing).
  • /help lists everything available in this project.

Want plain "build me X" to route through Bench automatically? Paste examples/CLAUDE.md into your project's CLAUDE.md — it tells Claude to default to the /laravel and /frontend routers for any build request, so "I need an endpoint" generates to your conventions without you typing a command. (Works in both the standard and compact profiles.)

3. Tailor to your conventions

When generated code doesn't match how your team does it, teach Bench — no core edits. Both commands write to your committed .bench/ folder; run bench rebuild afterward to re-resolve.

  • /bench-override — change how an existing artifact is generated. Describe it in plain language — "we don't use toDto, we return a Mapper", "controllers extend ApiController", "tests are Pest, co-located" — and Bench writes a targeted override of the affected pattern(s), layered onto core so a Bench upgrade won't clobber it.
  • /bench-slice — teach Bench a new artifact type unique to your project. Point it at one of your own domains (/bench-slice app/Reports) and it scaffolds a full Bench-grade slice — a /report skill, a worker agent, and the pattern(s) describing how your reports are built — so every future report generates the same way.

How overrides and addons actually layer onto core — append, replace, and the rest — is covered in Layering.

4. Backend guardrail (optional)

bench guardrail install adds a just-in-time hook that nudges you to route Laravel artifacts (Actions, Controllers, FormRequests, …) through Bench's skills instead of hand-writing them — Bench's worker agents are never nudged. Modes: warn (default), block, off via .bench/guardrails.yaml; bench-init offers it during setup.


How it works

Three layers. The main conversation stays at the feature level — you say what you want; the implementation details and pattern files stay out of your context window.

LayerWhat it isExample
SkillsSlash commands — thin routers. Parse your request, inspect the project, resolve ambiguity, then delegate./bench, /laravel, /frontend, /vue-component
AgentsSubagents that do the work in isolated context — read only the patterns a task needs, scaffold the artifact, return a summary.controller, vue-component, migration
PatternsVersion-aware markdown describing how to write each artifact. The shared knowledge base.CONTROLLER-001, STORE-001, MIGRATION-001
you → /laravel "add an Orders API"
        └─ skill routes → controller · request · resource · route agents
              └─ each reads its pattern(s) → writes code that matches your project

Patterns are the only version-aware layer. base/ targets the latest idioms — currently Laravel 13 + PHP 8.5 (and Vue 3 / current React) — while overrides/laravel-12/, overrides/php-8.4/ carry rollbacks for older versions. Skills and agents are single-copy and name no version-specific syntax — so the same agent emits L13 or L12 code depending on what your project resolved at build.

Out of the box: 4 routers (/bench, /laravel, /frontend, /help) + 27 Laravel and 10 Vue / 10 React component skills, backed by version-aware patterns for both stacks.

Bench follows a per-artifact test strategy (TEST-000): logic-bearing artifacts (Actions, Services, Listeners, Jobs, domain methods) get unit tests; HTTP/glue (Controllers, FormRequests, Policies) get feature tests; declarative artifacts (Events, Resources, DTOs) are asserted within the feature test rather than given their own. implement emits the right test for each artifact it generates.


Addons

Addons are opt-in plugins that extend — or replace — what core ships: adding commands, agents, and patterns, or swapping a default (the data layer, the router, the styling system) for an alternative. They layer on the same way as your own overrides (see Layering), and can declare depends_on.addons so installing one pulls in what it needs (e.g. livewire pulls in laravel-blade to inherit its page/layout/route ownership).

bench addon add tailwind     # by bundled name
bench addon add /path/to/my-addon  # or a path

One addon — bench-manager — is bundled and loaded by default; it provides the /bench-* commands above. Everything else is opt-in. Bench ships 44 addons across:

Setup & workflow · Laravel packages · Laravel UI · Frontend styling · Component libraries · Data & routing · Meta-frameworks · Testing · Docs

Full catalog + how to author your own: docs/addons.md.


CLI reference

bench build    [--copy|--symlink] [--addon=NAME ...]   # build + register Bench for this project
bench rebuild  [--addon=NAME ...]                      # re-resolve after editing .bench/ or upgrading a dependency
bench addon    list | add <name|path> | remove <name>  # manage addons
bench profile  [show | set <compact|standard>]         # compact = router/help skills only (agents always ship)
bench status                                           # detected versions, addons, profile, install path

Version flags — build and rebuild auto-detect versions from composer.json / package.json; pass any of --laravel=13 --php=8.5 --frontend=vue|react|none --vue=3 to override that detection. Run bench help for the complete, always-current flag reference.


Docs


License

MIT — see LICENSE.

Ver o original no GitHub

Bom para

Relacionados