Skip to content

v0.3.0 — CLAUDE.md → BECs, new checks, agent tooling

Choose a tag to compare

@DataDave-Dev DataDave-Dev released this 01 Jul 17:32
beae056

becwright turns the deterministic parts of a CLAUDE.md into commit-blocking BECs — automatically, gradually, and with an AI agent — while judgment-based guidance stays as prose. CLAUDE.md asks an agent to behave; becwright verifies the result on every commit.

Highlights

CLAUDE.md → enforceable rules

  • becwright init --from-claude-md reads your CLAUDE.md and turns the prohibitions it recognizes (secrets, eval, debugger, console.log, breakpoints, wildcard imports, a per-file line cap, …) into real rules, reporting which phrase matched each. It ignores what it can't verify (architecture, naming quality, function length) — that stays in CLAUDE.md.

Adopt on any codebase

  • becwright init --baseline starts rules that already have violations as warning and clean ones as blocking, so a legacy repo is guarded from day one without blocking commits on existing debt. Graduate each rule to blocking as you clean it.
  • Per-rule exclude: globs carve files out of a rule (vendored/generated code, or the check's own implementation) — no more false positives forcing you to delete a useful rule.

New language-agnostic checks

  • require — a regex that must be present (e.g. a license header); the inverse of forbid.
  • max_lines — a file-length cap (--max N).
  • filename — file-name conventions (--forbid / --require).

AI agent / MCP authoring loop

The MCP server (becwright mcp) now lets an agent build rules from your CLAUDE.md, safely:

  • propose_rules_from_claude_md — the deterministic starting point.
  • preview_rule — dry-run a candidate rule before writing it.
  • add_rule — persist it behind a trust gate (previews unless confirm=true; built-in checks only).
    The Claude Code skill/plugin teaches this whole flow.

Robustness & onboarding

  • The pre-commit path checks staged content (matches exactly what the commit records).
  • Checks have a timeout; a malformed .bec/rules.yaml or a rule pointing at an unknown check now fails with a clear message instead of a confusing block.
  • Offline catalog: becwright search / add install ready-made BECs with one command.
  • Plug into the pre-commit framework or Husky.

See the full changelog.