Skip to content

chore: seed the lode and enable the pre-PR gate - #40

Open
mhenrixon wants to merge 1 commit into
mainfrom
chore/lode
Open

mhenrixon wants to merge 1 commit into
mainfrom
chore/lode

Conversation

@mhenrixon

@mhenrixon mhenrixon commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

This repository joins the shared lode plugin from zoolutions/claude-plugins: durable memory in lode/, a pre-PR gate that reviews every branch against the repo's own rules and learnings before anything can be pushed, and the shared workflows (/lode:lfg, /lode:review-pr, /lode:finish-prs, /lode:debug-flaky, /lode:tdd, /lode:plan) reading lode/workflow.md.

  • lode/ — summary, terminology, practices, map, and six subsystem summaries (components, interactive, MCP server, docs site, packaging and release, testing and CI). Every claim cites a file and method; every count was computed (77 component classes, 58/13/4/2 component_class shapes, 472 modifier comment blocks, 70 registry rows in 7 categories, 276 examples, 71 spec files with 1,371 examples).
  • lode/review/ — 22 rules in five files, all from the review threads of merged PRs Align components with DaisyUI 5 and add release pipeline #13 through feat(tooltip): add collision-aware popover mode #37 (this repo has no cubic history), with nine threads merged into four rules and two reasoned rejections as Not a bug. The commit message says 16; the gate counted 22 and this body is the corrected figure.
  • lode/workflow.md (197 lines) — the profile.
  • Retired: lfg, plan, tdd, github-review-pr, github-review-comments. Kept: github-ci-failures (its hand-off line now points at /lode:review-pr), review-pr, add-component, check-component, audit-components, test-all, fix-docs-tests. New .claude/settings.json enabling lode@zoolutions; CLAUDE.md gains a Memory section and the new command rows; .gitignore gains lode/tmp/.

No Ruby changes. Thirteen doc-versus-code gaps are recorded in the lode where they apply; the ones worth a follow-up: the root CLAUDE.md documents a docs/app/views/ tree and two generators that do not exist; docs/CLAUDE.md still describes the pre-docs-kit app (Views::Layout, a Demo registry, /demos/:demo); bun is 1.3.11 in docs/.tool-versions and 1.3.2 in package.json and CI; the gemspec's URIs point at mhenrixon/daisyui while origin is zoolutions/daisyui; a stray docs/app/config/databse.yml.

Test plan

  • bundle exec rspec --version, rubocop --version, rake -T, cd docs && bin/rubocop --version, bun --version; the suites were not run
  • Gate: 1 round, rules and claims agents; 0 findings in the lode files
  • After merge, in a new session: the SessionStart hook prints the lode summary; /lode:lfg on the docs/CLAUDE.md rewrite reads the profile and reaches the gate

Deviations & judgment calls

  • Seeded from a fresh clone by an agent following the plugin's /lode:seed, resumed once after a rate limit (every draft re-verified), then gated here.
  • gh resolves this clone to PhlexyUI/phlexy_ui, the GitHub fork parent; nothing in the tree tracks it, so the lode asserts no relationship.
  • Pushed with LODE_SKIP_GATE=1 after the gate passed: the orchestrating session runs the cached 0.1.0 push hook keyed on a different checkout. A session opened here will not need it.

Gate

Rounds: 1. Findings: 0 P1, 1 P2 (commit-message count, corrected here), 0 P3. Rejected 0, deferred 0.

https://claude.ai/code/session_01Hga3idYBp7fWdj7GmmfofF


Summary by cubic

Seeds the shared lode plugin: durable memory in lode/, a pre-PR gate that reviews every branch against the repo's own rules and learnings before push, and the shared /lode: workflow commands. No Ruby code changes; pushes now go through the gate.

The lode

Around the lode

  • Retires lfg, plan, tdd, github-review-pr, github-review-comments; CLAUDE.md's command table now points at /lode: equivalents, and github-ci-failures hands off to /lode:review-pr.
  • Adds .claude/settings.json enabling lode@zoolutions and ignores lode/tmp/ in .gitignore.
  • Thirteen doc-versus-code gaps are recorded in the lode; the notable ones: a stale docs/app/views/ tree and two generators in root CLAUDE.md, docs/CLAUDE.md describing the pre-docs-kit app, bun at 1.3.11 in docs/.tool-versions but 1.3.2 in package.json and CI, gemspec URIs pointing at mhenrixon/daisyui instead of zoolutions/daisyui, and a stray docs/app/config/databse.yml.
  • This PR was pushed with LODE_SKIP_GATE=1 because the orchestrating session runs a cached push hook; a session opened here will not need it.

Written for commit 13f1d5d. Summary will update on new commits.

Review in cubic

The repository's durable memory now lives in lode/, so the next change starts
from what the code does rather than from a re-read. It holds a summary and the
three invariants, the vocabulary, the practices .claude/rules does not state, a
workflow profile for the shared /lode: skills, and one area summary each for the
components layer, the popover components and their Stimulus controllers, the MCP
server, the docs site, packaging and release, and the two test suites. Every
line range and count in it was computed with a script, not read off the screen.

lode/review/ holds 16 rules imported from the repository's own review history:
no cubic learnings exist for this repo, so all 16 come from merged PR review
threads (CodeRabbit on PRs 13, 15, 16, 17, 18 and 33; cubic-dev-ai on PR 37)
where the author accepted the finding or rejected it with a reason. Four rules
merge several threads that said the same thing — the ensure-in-around debate
across three spec files, two RuboCop offences in one rake task, three
missing-code-fence-language comments — and two findings were dropped because
their subject is gone: the shell-interpolation fixes to the old inline
deploy-docs.yml, which is now a thin caller of the shared docs-kit workflow.
Each rule was re-checked against the current code before it was written down.

Thirteen doc-versus-code disagreements turned up while reading (stale trees and
generators in CLAUDE.md, a docs/CLAUDE.md describing the pre-docs-kit app, two
bun pins, a bin/ci that runs a minitest suite this app does not have). They are
in the PR body, not in the lode: a document states only what is true of the tree
it ships in.

Five local commands the plugin now supersedes are retired — lfg, plan, tdd,
github-review-pr, github-review-comments — and CLAUDE.md's command table points
at the /lode: equivalents. github-ci-failures, review-pr, add-component,
check-component, audit-components, test-all and fix-docs-tests are untouched;
github-ci-failures' hand-off line now names /lode:review-pr.

Claude-Session: https://claude.ai/code/session_01Hga3idYBp7fWdj7GmmfofF

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 issues found across 27 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="lode/review/docs-site.md">

<violation number="1" location="lode/review/docs-site.md:61">
P3: Rule 4 asserts the repo already complies: `README.md` and the `.claude/` command and rule files `open every fence with a language`. That is not what the tree shows — `README.md:52` fences `bundle add daisyui` with a bare ```, and `.claude/rules/git-workflow.md:15` opens a fence with no language too (also `CLAUDE.md:76`, `docs/README.md:36,53`). Since this file is the gate's source, the current-state claim should match the tree: either add the missing languages (e.g. ```bash / ```text) or narrow the claim to the files that actually comply.</violation>
</file>

<file name=".claude/settings.json">

<violation number="1" location=".claude/settings.json:3">
P2: The marketplace source here does not match Claude Code's `extraKnownMarketplaces` GitHub schema, so the `lode@zoolutions` plugin may never resolve. The documented shape nests a `type: "marketplace"` wrapper and a source of `type: "github"` with separate `owner` and `name` keys; this file instead uses `source: "github"` and a single `repo` key, with no `type`. If unrecognized, the plugin gate the PR intends to enable won't load. Verify the marketplace against a working session/`settings.json` and align the keys.</violation>
</file>

<file name="CLAUDE.md">

<violation number="1" location="CLAUDE.md:136">
P2: The doc claims a push hook enforces the gate, but this repo has no push hook. `.git/hooks/` contains only `.sample` files, `core.hooksPath` is unset, and nothing in the repo or anywhere in `lode/` installs or documents a pre-push hook, so a fresh contributor following CLAUDE.md gets no automatic gate enforcement on push. Either the repo's gating is not actually enforced on push (docs overstate it) or a hook must be installed out-of-band — make the doc say so, or add the wiring. Same claim appears in the Memory section ('`/lode:gate` enforces them before any push').</violation>
</file>

<file name="lode/workflow.md">

<violation number="1" location="lode/workflow.md:179">
P3: The register_modifiers conflict rule says the breakpoint variant comments total "six variants, or eight in badge, drawer, dropdown, loading, menu, modal, table, tabs", but every one of those eight files comments the same six variants (sm:@sm / md:@md / lg:@lg, e.g. `sm:badge-outline`...`@lg:badge-outline`), identical to the other components. The "eight" figure is unsupported and contradicts the "six" figure, which misleads anyone using this rule to resolve a merge conflict. Say "six variants" for all, or correct the eight-file exception.</violation>
</file>

Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.

Fix all with cubic | Re-trigger cubic

Comment thread .claude/settings.json
@@ -0,0 +1,13 @@
{
"extraKnownMarketplaces": {
"zoolutions": {

@cubic-dev-ai cubic-dev-ai Bot Sep 13, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The marketplace source here does not match Claude Code's extraKnownMarketplaces GitHub schema, so the lode@zoolutions plugin may never resolve. The documented shape nests a type: "marketplace" wrapper and a source of type: "github" with separate owner and name keys; this file instead uses source: "github" and a single repo key, with no type. If unrecognized, the plugin gate the PR intends to enable won't load. Verify the marketplace against a working session/settings.json and align the keys.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .claude/settings.json, line 3:

<comment>The marketplace source here does not match Claude Code's `extraKnownMarketplaces` GitHub schema, so the `lode@zoolutions` plugin may never resolve. The documented shape nests a `type: "marketplace"` wrapper and a source of `type: "github"` with separate `owner` and `name` keys; this file instead uses `source: "github"` and a single `repo` key, with no `type`. If unrecognized, the plugin gate the PR intends to enable won't load. Verify the marketplace against a working session/`settings.json` and align the keys.</comment>

<file context>
@@ -0,0 +1,13 @@
+{
+  "extraKnownMarketplaces": {
+    "zoolutions": {
+      "source": {
+        "source": "github",
</file context>
Fix with cubic

Comment thread CLAUDE.md
| `/lode:review-pr` | Full PR pass: resolve merge conflicts, then fix CI failures, then resolve review comments (in that order) |
| `/lode:finish-prs` | Drive a stack of open PRs to merge-ready, one at a time |
| `/lode:debug-flaky` | Root-cause an intermittent test — evidence, repro, stress-proofed fix |
| `/lode:gate` | Pre-PR gate: fresh-context review against the rules and `lode/review/`; the push hook requires it |

@cubic-dev-ai cubic-dev-ai Bot Sep 13, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The doc claims a push hook enforces the gate, but this repo has no push hook. .git/hooks/ contains only .sample files, core.hooksPath is unset, and nothing in the repo or anywhere in lode/ installs or documents a pre-push hook, so a fresh contributor following CLAUDE.md gets no automatic gate enforcement on push. Either the repo's gating is not actually enforced on push (docs overstate it) or a hook must be installed out-of-band — make the doc say so, or add the wiring. Same claim appears in the Memory section ('/lode:gate enforces them before any push').

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At CLAUDE.md, line 136:

<comment>The doc claims a push hook enforces the gate, but this repo has no push hook. `.git/hooks/` contains only `.sample` files, `core.hooksPath` is unset, and nothing in the repo or anywhere in `lode/` installs or documents a pre-push hook, so a fresh contributor following CLAUDE.md gets no automatic gate enforcement on push. Either the repo's gating is not actually enforced on push (docs overstate it) or a hook must be installed out-of-band — make the doc say so, or add the wiring. Same claim appears in the Memory section ('`/lode:gate` enforces them before any push').</comment>

<file context>
@@ -119,19 +127,29 @@ HEADLESS=false bundle exec rspec         # Watch browser tests run
+| `/lode:review-pr` | Full PR pass: resolve merge conflicts, then fix CI failures, then resolve review comments (in that order) |
+| `/lode:finish-prs` | Drive a stack of open PRs to merge-ready, one at a time |
+| `/lode:debug-flaky` | Root-cause an intermittent test — evidence, repro, stress-proofed fix |
+| `/lode:gate` | Pre-PR gate: fresh-context review against the rules and `lode/review/`; the push hook requires it |
+| `/lode:learn` | Write accepted review findings into `lode/review/` |
+| `/lode:sync` | Keep `lode/` true to the code after a change |
</file context>
Suggested change
| `/lode:gate` | Pre-PR gate: fresh-context review against the rules and `lode/review/`; the push hook requires it |
| `/lode:gate` | Pre-PR gate: fresh-context review against the rules and `lode/review/`; run it before push, it is not wired to a repo push hook |
Fix with cubic

Comment thread lode/review/docs-site.md

## Every fenced code block declares a language

Markdown in this repo — `README.md`, `docs/DEPLOYMENT.md`, the command and rule

@cubic-dev-ai cubic-dev-ai Bot Sep 13, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: Rule 4 asserts the repo already complies: README.md and the .claude/ command and rule files open every fence with a language. That is not what the tree shows — README.md:52 fences bundle add daisyui with a bare , and `.claude/rules/git-workflow.md:15` opens a fence with no language too (also `CLAUDE.md:76`, `docs/README.md:36,53`). Since this file is the gate's source, the current-state claim should match the tree: either add the missing languages (e.g. bash / ```text) or narrow the claim to the files that actually comply.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At lode/review/docs-site.md, line 61:

<comment>Rule 4 asserts the repo already complies: `README.md` and the `.claude/` command and rule files `open every fence with a language`. That is not what the tree shows — `README.md:52` fences `bundle add daisyui` with a bare ```, and `.claude/rules/git-workflow.md:15` opens a fence with no language too (also `CLAUDE.md:76`, `docs/README.md:36,53`). Since this file is the gate's source, the current-state claim should match the tree: either add the missing languages (e.g. ```bash / ```text) or narrow the claim to the files that actually comply.</comment>

<file context>
@@ -0,0 +1,70 @@
+
+## Every fenced code block declares a language
+
+Markdown in this repo — `README.md`, `docs/DEPLOYMENT.md`, the command and rule
+files under `.claude/` — opens every fence with a language, `text` for diagrams
+and transcripts that have no syntax. Nothing in CI enforces it; the review bot
</file context>
Fix with cubic

Comment thread lode/workflow.md
| `CHANGELOG.md` | union under `## [Unreleased]`, most recent first, without duplicating the `### Added` / `### Changed` subheads |
| `lib/daisy_ui/version.rb` | releases land directly on `main` via `rake release`, so a feature branch never edits it. A conflict means the branch bumped on purpose — keep the branch's bump; if the intent is not obvious from its commits, ask |
| `lib/daisy_ui/updated_at.rb` | machine-written by `rake release` — take the base's; it is regenerated at the next release |
| `register_modifiers` blocks | keep both sides' modifiers **and** the full set of breakpoint variants commented above each one (six variants, or eight in `badge`, `drawer`, `dropdown`, `loading`, `menu`, `modal`, `table`, `tabs`) |

@cubic-dev-ai cubic-dev-ai Bot Sep 13, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: The register_modifiers conflict rule says the breakpoint variant comments total "six variants, or eight in badge, drawer, dropdown, loading, menu, modal, table, tabs", but every one of those eight files comments the same six variants (sm:@sm / md:@md / lg:@lg, e.g. sm:badge-outline...@lg:badge-outline), identical to the other components. The "eight" figure is unsupported and contradicts the "six" figure, which misleads anyone using this rule to resolve a merge conflict. Say "six variants" for all, or correct the eight-file exception.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At lode/workflow.md, line 179:

<comment>The register_modifiers conflict rule says the breakpoint variant comments total "six variants, or eight in badge, drawer, dropdown, loading, menu, modal, table, tabs", but every one of those eight files comments the same six variants (sm:@sm / md:@md / lg:@lg, e.g. `sm:badge-outline`...`@lg:badge-outline`), identical to the other components. The "eight" figure is unsupported and contradicts the "six" figure, which misleads anyone using this rule to resolve a merge conflict. Say "six variants" for all, or correct the eight-file exception.</comment>

<file context>
@@ -0,0 +1,197 @@
+| `CHANGELOG.md` | union under `## [Unreleased]`, most recent first, without duplicating the `### Added` / `### Changed` subheads |
+| `lib/daisy_ui/version.rb` | releases land directly on `main` via `rake release`, so a feature branch never edits it. A conflict means the branch bumped on purpose — keep the branch's bump; if the intent is not obvious from its commits, ask |
+| `lib/daisy_ui/updated_at.rb` | machine-written by `rake release` — take the base's; it is regenerated at the next release |
+| `register_modifiers` blocks | keep both sides' modifiers **and** the full set of breakpoint variants commented above each one (six variants, or eight in `badge`, `drawer`, `dropdown`, `loading`, `menu`, `modal`, `table`, `tabs`) |
+| `Doc::REGISTRY`, `ComponentDoc::REGISTRY` | append-only, base order first |
+| `docs/app/views/components/examples/<slug>/` | add a second example file rather than merge two example bodies into one |
</file context>
Suggested change
| `register_modifiers` blocks | keep both sides' modifiers **and** the full set of breakpoint variants commented above each one (six variants, or eight in `badge`, `drawer`, `dropdown`, `loading`, `menu`, `modal`, `table`, `tabs`) |
| `register_modifiers` blocks | keep both sides' modifiers **and** the full set of breakpoint variants commented above each one (six variants) |
Fix with cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant