Instructions for working on the bborbe/coding plugin repository.
Claude Code plugin with coding guidelines (docs/), quality agents (agents/), and slash commands (commands/). Installed via claude plugin install coding.
- NEVER include trading/project-specific examples (no Candle, Epic, Broker, SignalStore)
- ALWAYS use generic examples (User, Order, Product, Customer)
- This repo serves anyone learning Go/Python patterns
Each enforceable guide in docs/ should have a matching agent in agents/. The agent reads its doc as source of truth — rules live in docs, not duplicated in agents.
| Doc | Agent |
|---|---|
go-architecture-patterns.md |
go-architecture-assistant (rule-block owner; cross-unit concerns) + go-quality-assistant (broader review) |
go-context-cancellation-in-loops.md |
go-context-assistant |
go-error-wrapping-guide.md |
go-error-assistant |
go-time-injection.md |
go-time-assistant |
go-prometheus-metrics-guide.md |
go-metrics-assistant |
go-factory-pattern.md |
go-factory-pattern-assistant |
go-http-handler-refactoring-guide.md |
go-http-handler-assistant |
go-json-error-handler-guide.md |
go-http-handler-assistant |
go-linting-guide.md |
go-quality-assistant |
go-state-machine-pattern.md |
go-architecture-assistant |
go-service-implementation-patterns.md |
go-architecture-assistant |
go-kubernetes-crd-controller-guide.md |
go-architecture-assistant |
go-functional-options-pattern.md |
go-quality-assistant |
go-doc-best-practices.md |
godoc-assistant |
go-testing-guide.md |
go-test-quality-assistant |
go-security-linting.md |
go-security-specialist |
go-licensing-guide.md |
license-assistant |
agent-command-development-guide.md |
agent-auditor + slash-command-auditor |
claude-code-skill-writing-guide.md |
skill-auditor |
Reference-only docs (patterns, setup guides) don't need agents.
Commands parse arguments, detect project type, invoke agents, merge reports. No inline rules — delegate to agents.
All agent references from commands must use coding: prefix:
subagent_type="coding:go-quality-assistant"
No references to ~/.claude/, /Users/bborbe/, or other personal paths. Plugin must work for anyone who installs it.
.claude-plugin/ Plugin metadata (marketplace.json, plugin.json)
agents/ Quality agents (read docs/, invoked by commands/)
commands/ Slash commands (thin wrappers around agents)
docs/ Coding guidelines (source of truth for rules)
skills/ IDE launchers (vscode, intellij)
templates/ Project templates (Makefile, tools.go, .gitignore)
- Create
docs/new-guide.md - Add to
README.mdin appropriate table - Update
llms.txt - If enforceable: create matching agent in
agents/ - If agent created: add to
code-review.mdagent list
- Create
agents/new-agent.mdwith matching doc reference - Add to
code-review.md(standard or full mode) - Add to
README.mdagents table
- Create
commands/new-command.md— thin wrapper - Use
coding:prefix for agent references - Add to
README.mdcommands table
- Update all cross-references in other docs
- Update README.md tables
- Update llms.txt
- Update code-review.md if agent affected
Never code directly. All code changes go through the dark-factory pipeline.
- Assess the change size:
| Change | Action |
|---|---|
| Doc-only edit, README typo, llms.txt entry | Direct commit — no dark-factory ceremony |
Add a ### RULE block + ast-grep YAML to an existing doc |
Write a prompt → [[Dark Factory - Write Prompts]] |
| Bootstrap pass across many docs | Mirror prompt template per doc → standalone prompts |
| Multi-prompt feature with shared interfaces | Write a spec first → [[Dark Factory - Write Spec]] |
-
Read the relevant guide before starting — every time, not from memory:
- Writing a spec → [[Dark Factory - Write Spec]] + [[Dark Factory Guide#Specs What Makes a Good Spec]]
- Writing prompts → [[Dark Factory - Write Prompts]] + [[Dark Factory Guide#Prompts What Makes a Good Prompt]]
- Running prompts → [[Dark Factory - Run]]
-
Follow the guide step by step. Do not skip audit steps.
- Prompts go to
prompts/(inbox) — never toprompts/in-progress/orprompts/completed/ - Specs go to
specs/(inbox) — never tospecs/in-progress/orspecs/completed/ - Never number filenames — dark-factory assigns numbers on approve
- Never manually edit frontmatter status — use CLI (
dark-factory prompt approve,dark-factory spec approve) - Always audit before approving (
/dark-factory:audit-prompt,/dark-factory:audit-spec) - Never approve or run dark-factory without explicit user confirmation
autoRelease: false— dark-factory commits locally; release is handled by maintainer-agent-releaser per.maintainer.yaml
make precommit # validates links + JSON syntax (the standard verification command)
make release-check # adds check-versions on top — run before tagging
make build-index # regenerates rules/index.json from ### RULE blocks (Phase 1c+)docs/— prose guides + inline### RULEblocks (rule source of truth)rules/— ast-grep YAML detectors (mechanical layer; new in Phase 0+)agents/— specialist agents; reference docs by pathcommands/— slash command thin wrappersscripts/— build/check helpers (Python stdlib forbuild-index.py, bash for the rest)prompts/,specs/— dark-factory inboxes
Plugin-only repo — no Go/Python test suite. Quality gates:
shellcheckforscripts/*.shjqfor JSON syntax of.claude-plugin/*.json- Markdown link validation in
make precommit
Four version strings MUST equal each other at release time:
CHANGELOG.md— top## vX.Y.Zentry (the most-recent versioned section).claude-plugin/plugin.json—"version"field.claude-plugin/marketplace.json—metadata.version.claude-plugin/marketplace.json—plugins[0].version
make check-versions (script: scripts/check-versions.sh) fails non-zero if any of the four diverge. It is NOT wired into make precommit — drift during development is allowed; alignment is enforced by make release-check before tagging. Same shape as dark-factory / vault-cli / semantic-search.
Every release commit (Workflow B in /coding:commit) bumps all four together — even guide-only patch releases. Plugin manifests are NOT decoupled from the git tag; users running claude plugin update coding@coding rely on the manifest version matching the tag.
Full procedure: see docs/releasing-coding.md.
When releasing a new version vX.Y.Z, update all four version strings together, then commit + tag + push:
CHANGELOG.md— rename## Unreleased→## vX.Y.Z(or create new section).claude-plugin/plugin.json—"version": "X.Y.Z".claude-plugin/marketplace.json—metadata.versionandplugins[0].version(both →"X.Y.Z")make release-check— must pass (precommit + check-versions)git add -A && git commit -m "release vX.Y.Z" && git tag vX.Y.Z && git push && git push origin vX.Y.Z
The /coding:commit skill should drive this — but if invoked manually, run make release-check after the manifest edits and before the commit.
- Start with name, brief overview
- Show both GOOD and BAD examples
- Use generic examples (User, Order — not trading domain)
- Use
github.com/bborbe/time,bborbe/errors,bborbe/collectionin examples - End with antipatterns section
- Reference related guides with relative links