Skip to content
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ A [Claude Code](https://claude.ai/code) plugin marketplace for **linter-driven d

| | Plugin | Version | For |
|---|--------|---------|-----|
| 🐹 | [`go-linter-driven-development`](go-linter-driven-development/README.md) | 2.6.0 | Go |
| 🐹 | [`go-linter-driven-development`](go-linter-driven-development/README.md) | 2.10.0 | Go |
| ⚛️ | [`ts-react-linter-driven-development`](ts-react-linter-driven-development/README.md) | 1.2.0 | TypeScript + React |

Plus the standalone rule documents the plugins grew out of:
Expand Down
4 changes: 2 additions & 2 deletions go-linter-driven-development/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "go-linter-driven-development",
"version": "2.9.1",
"description": "Rules-as-data linter-driven development workflow for Go: 12 single-source rule files, thin directional skills (design, TDD implementation, refactoring, testing, review, documentation), and a hunter/skeptic/critic review architecture with parallel single-rule reviewers, an over-abstraction skeptic, and a comment critic enforcing the Comment Value Toolbox",
"version": "2.10.0",
"description": "Rules-as-data linter-driven development workflow for Go: 12 single-source rule files, thin directional skills (design, TDD implementation, refactoring, testing, review, documentation), a hunter/skeptic/critic review architecture with parallel single-rule reviewers, an over-abstraction skeptic, and a comment critic enforcing the Comment Value Toolbox, plus an OKF-conformant repo brain with a shippable CI conformance gate",
"author": {
"name": "Dan Mordechay"
},
Expand Down
57 changes: 57 additions & 0 deletions go-linter-driven-development/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,63 @@
All notable changes to the `go-linter-driven-development` plugin are documented here.
Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions follow [Semantic Versioning](https://semver.org/).

## [2.10.0] - 2026-08-20

The repo brain had one audience: a session with this plugin installed. In a
monorepo most contributors — and their agents — don't have it, so the network's
rules lived nowhere they could find and nothing enforced them. This release
makes the doc root a standard, self-describing artifact: an Open Knowledge
Format (OKF v0.2) bundle any tool can consume, with its own maintenance manual
inside and a CI gate outside.

### Added

- **OKF v0.2 bundle conformance (R9)**: every doc-root file carries YAML
frontmatter — content docs `type`/`title`/`description`/`timestamp` (+
optional `tags` and lifecycle `status`/`stale_after`, the frontmatter-native
form of the ⚠️ stale flag); indexes carry `type: index` (a documented R9
extension — OKF keeps reserved index.md bare) and never a `timestamp`; the
root index carries `okf_version`. New falsifying question **Q7** checks the
bundle contract mechanically.
- **Derivation rule (R9)**: every index line is derived from the frontmatter
one level down — a doc's line IS its `description` — so the map is
regenerable and cannot drift. The map of maps is directory-shaped (per-topic
subdirectories with their own frontmattered index.md), and the split lands in
the same commit as the `See docs/...` path rewrite.
- **One-way link policy (R9)**: write an edge only when no structure implies
it — no child→parent backlinks, no `related:` frontmatter key, lateral links
inline with the reason in the sentence; an optional `## Related` section is
capped at 3 reason-claused entries (a ceiling, not a quota). `log.md` is
never emitted.
- **Self-hosting conventions doc**: BOOTSTRAP creates `<docroot>/conventions.md`
(template in reference.md) — the network's maintenance rules written for
contributors without this plugin, listed first in the index.
- **AGENTS.md routing block**: upgraded from "fallback when CLAUDE.md is
absent" to first-class multi-tool coverage — root and nested per sub-project
(closest file wins), pointing every AGENTS.md-reading agent at the index and
conventions.md. Authored once: CLAUDE.md embeds it via `@AGENTS.md` (plus the
`@<docroot>/index.md` map import) instead of duplicating the routing prose.
- **New `scripts/check-repo-brain.sh`**: dependency-free conformance gate
running Q1–Q3 and Q7 over every doc root (repo root plus each go.mod
sub-project): transitive reachability from the root index, both edge
directions, the file:line ban (URL spans stripped, not whole lines),
exact-path root wiring (missing AGENTS.md routing is an advisory), the full
frontmatter contract (termination, per-class required keys, root-only
`okf_version`), and index-line derivation against each target's
`description`. BOOTSTRAP installs it into target repos and suggests the
one-line CI wiring. Exit 0 clean/not-adopted, 1 violations, 2 usage error;
every failure message points at conventions.md.

### Changed

- **BOOTSTRAP is now a migration pass too**: frontmatter is verified-or-added
(never duplicated), so a network wired by an older plugin version converges
to the current rules in one idempotent re-run; an un-inferable `type` goes to
the advisory report, never guessed.
- **Feature Doc Template's `Related` section** reconciled with the one-way link
policy: optional, ≤3 entries, each with a reason clause, none duplicating an
inline link.

## [2.9.1] - 2026-07-23

A real 143-line file surfaced the gap v2.9.0 left open: every one of its nine
Expand Down
7 changes: 4 additions & 3 deletions go-linter-driven-development/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ go-linter-driven-development/
│ pre-commit-review · testing · documentation (thin directional views)
├── agents/ rule-hunter · overabstraction-skeptic · lint-fixer (isolated workers)
├── commands/ go-ldd-analyze · autopilot · quickfix · prepare · review · status · wire-repo-brain
├── scripts/ check-repo-brain.sh — repo-brain conformance gate, installed into target repos by /wire-repo-brain
└── hooks/ package-size gate
```

Expand Down Expand Up @@ -82,7 +83,7 @@ Isolated contexts matter: the `lint-fixer` loop's token noise stays out of your
| R6 | [`rules/R6-test-only-interfaces.md`](rules/R6-test-only-interfaces.md) | No interface whose only second implementer is a test double |
| R7 | [`rules/R7-test-placement.md`](rules/R7-test-placement.md) | `pkg_test` only, no wantErr conditionals, right-rung tests, no sleeps |
| R8 | [`rules/R8-no-globals.md`](rules/R8-no-globals.md) | No package-level state; no `context.Background()` in library code |
| R9 | [`rules/R9-repo-brain.md`](rules/R9-repo-brain.md) | Documentation network: fact at its lowest rung, reachable from the root, edges both directions; index wired into CLAUDE.md |
| R9 | [`rules/R9-repo-brain.md`](rules/R9-repo-brain.md) | Documentation network: fact at its lowest rung, reachable from the root, edges both directions; index wired into CLAUDE.md; doc root is an OKF bundle (frontmatter, derived index lines) |
| R10 | [`rules/R10-concurrency-safety.md`](rules/R10-concurrency-safety.md) | Goroutines with owners and exit paths; shared state guarded where it lives; no production sleeps |
| R11 | [`rules/R11-conditional-dispatch.md`](rules/R11-conditional-dispatch.md) | One dispatch owner per kind/variant family (Anti-IF): duplicated kind-switches become interface/map dispatch chosen once at the boundary; a single switch stays and goes exhaustive |
| R12 | [`rules/R12-mutation-discipline.md`](rules/R12-mutation-discipline.md) | Mutation only through invariant-owning methods: constructors copy collections in, queries copy (or iterate) out, no query/modifier hybrids, no setters around validating constructors |
Expand All @@ -106,7 +107,7 @@ Isolated contexts matter: the `lint-fixer` loop's token noise stays out of your
| [`@refactoring`](skills/refactoring/SKILL.md) | BACKWARD view — routes each linter/review failure to its owning rule's Fix pattern; preparatory mode reshapes ahead of a planned change (Phase 1.5) |
| [`@pre-commit-review`](skills/pre-commit-review/SKILL.md) | Orchestrates the hunter/skeptic review (Phase 4); reports, never edits |
| [`@testing`](skills/testing/SKILL.md) | The composition ladder — test each behavior at the lowest rung that contains it |
| [`@documentation`](skills/documentation/SKILL.md) | Repo-brain author (R9) — behavior docs + network wiring; FEATURE mode (Phase 5) / BOOTSTRAP mode |
| [`@documentation`](skills/documentation/SKILL.md) | Repo-brain author (R9) — behavior docs + network wiring, OKF conformance + conventions self-hosting; FEATURE mode (Phase 5) / BOOTSTRAP mode |

**Agents → spawned by** (payload-fed, isolated):

Expand All @@ -126,7 +127,7 @@ Isolated contexts matter: the `lint-fixer` loop's token noise stays out of your
| [`/go-ldd-analyze [files]`](commands/go-ldd-analyze.md) | 🔍 Tests + lint + review, combined report | ❌ No | ✅ Optional |
| [`/go-ldd-review [files]`](commands/go-ldd-review.md) | 🔍 Commit-readiness check | ❌ No | ✅ Optional |
| [`/go-ldd-status`](commands/go-ldd-status.md) | Show current phase + progress | N/A | — |
| [`/wire-repo-brain [path]`](commands/wire-repo-brain.md) | Wire the documentation network in one pass: upward edges → docs → index.md → CLAUDE.md (@documentation BOOTSTRAP) | ✅ Wiring only | ✅ Optional |
| [`/wire-repo-brain [path]`](commands/wire-repo-brain.md) | Wire the documentation network in one pass: frontmatter → upward edges → docs → index.md → CLAUDE.md/AGENTS.md + conventions.md + conformance script (@documentation BOOTSTRAP) | ✅ Wiring only | ✅ Optional |

## How Auto-Detection Works

Expand Down
30 changes: 21 additions & 9 deletions go-linter-driven-development/commands/wire-repo-brain.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,32 @@ mode** against `$ARGUMENTS` (default: the current repo root). The skill's protoc
authoritative; this command adds nothing to it. One pass delivers the whole chain:

1. Doc root discovered (`.ai/` → `.ainav/` → `docs/`; per sub-project in a monorepo)
2. Existing docs inventoried and classified (stale docs indexed with a ⚠️ flag)
3. `index.md` built — short, grouped, one line per doc (map of maps past ~300 lines)
4. CLAUDE.md wired with the `@<docroot>/index.md` import (AGENTS.md: plain reference)
5. **Upward edges wired**: every confidently-anchorable doc gets its one-line
2. Existing docs inventoried and classified (stale docs indexed with a ⚠️ flag);
OKF frontmatter verified-or-added (un-inferable types reported)
3. `index.md` built — frontmattered, short, grouped, one line per doc derived from
each doc's `description` (directory-shaped map of maps past ~300 lines)
4. AGENTS.md routing block authored once (root, and nested per sub-project in a
monorepo); CLAUDE.md embeds it (`@AGENTS.md`) + the `@<docroot>/index.md` import
5. `<docroot>/conventions.md` created/verified (listed first in the index) and the
plugin's `scripts/check-repo-brain.sh` installed — the report suggests the CI
one-liner
6. **Upward edges wired**: every confidently-anchorable doc gets its one-line
`// See <docroot>/<file>.md ...` edge on its front-door symbol
6. R9 confirmation pass + the advisory findings report (broken edges, edge-policy
violations, rung-2 gaps, stale/unwired docs)
7. R9 confirmation pass — Q1–Q3 and Q7 via the installed script — + the advisory
findings report (broken edges, edge-policy violations, rung-2 gaps,
stale/unwired docs, types needing a human call)

**What this command does NOT do** (by design — the skill's constraints):
- Generate or rewrite content docs — gaps are reported for FEATURE mode to fill
(conventions.md and the copied check script are the two sanctioned artifacts)
- Decide the fate of stale docs — refresh / remove / keep-as-roadmap is your call
- Touch anything beyond doc files, `index.md`, CLAUDE.md/AGENTS.md, and one-line
godoc edge additions (verified with `go vet` after each)
- Add CI workflows — the report only suggests `bash scripts/check-repo-brain.sh`
- Touch anything beyond doc files, `index.md`, `conventions.md`,
CLAUDE.md/AGENTS.md, the copied check script, and one-line godoc edge additions
(verified with `go vet` after each)

When it finishes, review the report, then `git diff` — the changes should read as
pure documentation-network wiring. Re-run any time: the pass is idempotent (existing
index lines are refreshed, existing edges and wiring are verified, not duplicated).
index lines are refreshed from frontmatter; existing edges, wiring, conventions, and
the script are verified, not duplicated — a repo wired by an older plugin version
converges to the current rules in one pass).
Loading