PLUGIN brewcode / Skills

Convention Setup

opus 7 lifecycle modes project scope user-invoked

Captures architecture, representative implementations, coding patterns, and testing conventions from your repository. It writes three project documents and a loading rule that tells agents which document to read before implementation or review.

Run it after semantic search and before teams-setup. Creating a team is not a prerequisite. The setup dashboard lists it in this position.

Quick reference

FieldValue
Command/brewcode:convention-setup
Defaultinstall
Lifecyclestatus · install · upgrade · enable · disable · uninstall · purge
Extractionfull · conventions · rules · paths
InputFree-text brief, optional mode, and optional scoped paths

When to use

  • Establish shared coding and testing patterns before generating project agents.
  • Refresh conventions after a major refactor with upgrade.
  • Analyze selected modules with paths.
  • Pause convention loading while keeping the documents and accepted rules.

Example

/brewcode:convention-setup install

The skill inspects status, analyzes the code, and proposes conventions and rules for review. It then writes three documents under .claude/convention/ and a loading rule at .claude/rules/convention.md. Details are under the spoiler below.

Modes

ModeBehavior
statusReport state and loading-rule path without writing
install (default)Extract conventions, validate documents, create or refresh loading guidance
upgradeRepeat extraction against current evidence; preserve local wording and disabled state
enableRestore the parked loading rule without changing its body
disableRename the loading rule to .claude/rules/convention.md.disabled
uninstallRemove the owned loading rule; keep convention documents
purgeRemove the owned loading rule and the three owned documents

A bare invocation chooses install, even on an existing project; use status to inspect.

Disabling loading has a narrow scope

Disable, uninstall, and purge touch only the owned loading rule and documents. Accepted coding rules, manual CLAUDE.md references, and unrelated files remain. Purge confirms the three document paths unless you asked for their deletion.

How it works, extraction modes, artifacts, helper #

Extraction modes

ModeBehavior
fullFull extraction, accepted rules, validation, and loading guidance
conventionsGenerate the three documents and refresh the loader; skip rule extraction
rulesExtract rules from existing documents (they must exist)
paths src/payments,src/billingRefresh scoped evidence, keep other layers

Artifacts

ArtifactPurpose
.claude/convention/reference-patterns.mdRepresentative implementations, coding patterns, anti-patterns
.claude/convention/testing-conventions.mdTest data, structure, and assertion patterns
.claude/convention/project-architecture.mdArchitecture, dependencies, and repository layout
.claude/rules/convention.mdLoading guidance for the three documents

All four carry provenance metadata that setup-status reads. Extra project rules depend on which proposals you accept.

Flow

  1. Resolve intent and report status

    The skill prints its PLAN block and probes the installation. Read-only status asks no questions; ownership or live/disabled collisions stop the operation.

  2. Analyze active layers

    Detect the stack, then analyze the applicable code and test layers with bounded agents.

  3. Select reference implementations

    An architecture-capable agent or Plan agent resolves overlapping candidates. The chosen references anchor the three documents.

  4. Generate, compact, and review

    Three document owners work independently. With brewtools installed, text optimization compacts the output; otherwise that step is skipped and reported.

  5. Organize accepted rules

    Full extraction proposes avoid and best-practice rules, checks duplicates, and asks for acceptance. CLAUDE.md references are added only on request.

  6. Validate and install the loader

    Validate the documents, then install or refresh the loading rule. Existing wording is kept; a disabled loader stays disabled.

The skill delegates one bounded layer or document per agent; the shared brief format is on the skills hub. Layers follow the detected stack.

scripts/convention.sh handles lifecycle checks, document validation, loader install, reversible parking, and owned removal. It compares the loader and all three documents with the skill’s current content version. A parked loader reports disabled even if documents need refresh; incomplete artifacts report partial. It refuses to modify an unowned loader or purge unowned documents, and reports a collision when both live and disabled loaders exist.

Upgrade refreshes owned loader metadata without changing the loader body or enabling a parked install.

Brewcode overview

Project analysis, conventions, agents, and review tools.

Full Setup

The dependency order from search and conventions through documentation sync.

Setup Status

Inspect conventions alongside the other ten setups.

Rules

Generate additional project rules from actual evidence.

GitHub source

Skill instructions, lifecycle helper, layer definitions, and templates.

Update: /brewtools:plugin-update, /reload-plugins, then /brewcode:setup-status upgrade - FAQ