Skip to content

chore(cardshed): bootstrap @lab/ll-CARDSHED stack contract#145

Merged
w7-mgfcode merged 2 commits into
masterfrom
chore/cardshed-stack-bootstrap
May 21, 2026
Merged

chore(cardshed): bootstrap @lab/ll-CARDSHED stack contract#145
w7-mgfcode merged 2 commits into
masterfrom
chore/cardshed-stack-bootstrap

Conversation

@w7-mgfcode
Copy link
Copy Markdown
Owner

@w7-mgfcode w7-mgfcode commented May 21, 2026

Summary

Closes #143, closes #144.

What's in the stack root

Path Purpose
.w7-meta W7 contract metadata, stack discoverable via w7 stat
compose.yml Bootable alpine stub — replaced at PRP 3 M1 with cardshed-ui
.env.example / .gitignore Schema + runtime hygiene
README.md / CLAUDE.md / AGENTS.md / BLUEPRINT.md Human / Claude / agent / PRP-index docs
.claude/rules/ui-design-pipeline.md MANDATORY Stitch + agent-browser pipeline (active from PRP 3 M1)
.claude/rules/core-determinism.md Encodes apps/core/ purity guarantees from PRP 2
.stitch/DESIGN.md Placeholder — generated by stitch-design at PRP 3 M1
data/ dogfood-output/ docs/{SCREENS,DECISIONS}/ Empty dirs with .gitkeep

What's deliberately not in this PR

  • apps/ui/, apps/server/ scaffolding — PRP 3 M1+
  • Stitch design-system generation — PRP 3 M1
  • Any change to apps/core/ — PRP 2 is sealed (82/82 tests green)
  • Updating root README.md active-stacks table — same gap exists for RELIQUARY; deserves its own PR

Why split into two commits

  1. chore(repo): sync commit-format hook scope allow-list (#144) — one-line fix to .claude/hooks/check-commit-format.sh adding reliquary|cardshed to the regex. Atomic and easy to revert if it surfaces an unexpected interaction.
  2. chore(cardshed): bootstrap @lab/ll-CARDSHED stack contract (#143) — the stack-root scaffold itself. Depends on commit T1 — Working-tree triage & atomic baseline #1 to pass the local pre-commit hook.

Validation

✓ docker compose --env-file @lab/ll-CARDSHED/.env.example -f @lab/ll-CARDSHED/compose.yml config -q
✓ bash .shared/policy/prod-privileged.sh      → exit 0
✓ bash .shared/policy/prod-no-root-mount.sh   → exit 0
✓ bash .shared/policy/zone-ingress-naming.sh  → exit 0
✓ apps/core/ npm test                          → 82/82 green (unchanged)
✓ hook smoke-test with `chore(cardshed): ... (#143)` payload → ALLOW

Test plan

  • CI passes (compose validate + policy + lint)
  • gh pr checks green
  • After merge: w7 up @lab/ll-CARDSHED boots cardshed-placeholder container without errors
  • After merge: open the PRP 3 M1 umbrella issue (real UI work begins)

Summary by Sourcery

Bootstrap the ll-CARDSHED stack root with metadata, documentation, and design/purity guardrails, and update commit-format validation to recognize the new stack scopes.

Bug Fixes:

  • Update the commit-format hook scope allow-list so commits scoped to reliquary and cardshed pass local validation.

Enhancements:

  • Introduce the ll-CARDSHED stack root with W7 metadata, compose stub, env template, and runtime gitignore to make the stack discoverable and bootable as a placeholder container.
  • Add stack-local CLAUDE, AGENTS, and BLUEPRINT guides plus core determinism and UI design pipeline rules to codify engine purity and the mandatory design workflow for future UI and gameplay work.
  • Provide a placeholder Stitch design-system file and initial docs structure for screens, decisions, data, and dogfood output to support upcoming PRP 3 UI and experience milestones.

Build:

  • Add a minimal Docker Compose topology for ll-CARDSHED that mounts persistent data and prepares a dedicated network for future UI and server services.

The hook regex in .claude/hooks/check-commit-format.sh was missing
'reliquary' and 'cardshed' — both added to .claude/rules/commit-format.md
in #135 and #139 respectively, but the corresponding PRs landed via
GitHub squash-merge, which bypasses local hooks. Drift went undetected
until a local commit on either scope was attempted.

One-line fix: extend SCOPE_ALLOW with both scopes. Smoke-tested locally
with a stub JSON payload — the hook now ALLOWs 'chore(cardshed): ...'
and 'feat(reliquary): ...' messages.
The CARD SHED deterministic core (PRP 2) landed in #139/#140 at
apps/core/, but the stack lacked a W7-Base contract root: no .w7-meta,
compose.yml, README, CLAUDE.md, AGENTS.md, BLUEPRINT.md, .claude/rules/,
or .stitch/DESIGN.md placeholder.

This commit scaffolds the stack root modelled on @lab/ll-RELIQUARY/:

- .w7-meta + compose.yml (alpine stub, replaced at PRP 3 M1) + .env.example
- README.md / CLAUDE.md / AGENTS.md / BLUEPRINT.md
- .claude/rules/ui-design-pipeline.md (mandatory Stitch + agent-browser)
- .claude/rules/core-determinism.md (encodes apps/core/ purity guarantees)
- .stitch/DESIGN.md placeholder (real generation deferred to PRP 3 M1)
- data/, dogfood-output/, docs/SCREENS/, docs/DECISIONS/ with .gitkeep

Force-added .w7-meta / .claude/ / data/ / dogfood-output/ since root
.gitignore blanket-ignores those paths (same convention as ll-RELIQUARY).

Compose config validates; all three policy scripts (prod-privileged,
prod-no-root-mount, zone-ingress-naming) exit 0. apps/core/ tests
remain 82/82 green (no changes to PRP 2 surface).
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented May 21, 2026

Reviewer's Guide

Bootstraps the @lab/ll-CARDSHED stack root to mirror the ll-RELIQUARY contract (docs, rules, Stitch placeholder, compose stub, metadata, dirs) while tightening local AI/UX workflows and core determinism guarantees, and updates the commit-format hook to allow the new cardshed and existing reliquary scopes.

File-Level Changes

Change Details Files
Expand commit-format hook to recognize reliquary and cardshed scopes in commit subjects.
  • Update SCOPE_ALLOW regex to include reliquary and cardshed scopes so commit messages like chore(cardshed): ... pass local validation.
  • Keep the rest of the commit-format rules and behavior unchanged.
.claude/hooks/check-commit-format.sh
Introduce ll-CARDSHED stack root with Docker/compose stub, env and metadata so the stack is discoverable and bootable via w7.
  • Add compose.yml with an alpine-based cardshed-placeholder service, pinned image tag, bridge network, and bind-mounted data/ volume.
  • Add .w7-meta so the stack is registered with W7 tooling.
  • Add .env.example and .gitignore stubs for env schema and runtime/build hygiene in the stack directory.
@lab/ll-CARDSHED/compose.yml
@lab/ll-CARDSHED/.w7-meta
@lab/ll-CARDSHED/.env.example
@lab/ll-CARDSHED/.gitignore
Document stack behavior, phase, and PRP mapping for humans, Claude, and agents.
  • Add a detailed stack README describing current status (core sealed, UI/server pending), tech stack, quickstart commands, phase plan, repo layout, and next steps.
  • Add CLAUDE.md with stack-local rules and workflows layered on root repo rules, including core-sealed policy, UI pipeline, and commit/branch conventions.
  • Add AGENTS.md as an agent-focused overview of constraints, tools, conventions, and acceptance checklist.
  • Add BLUEPRINT.md as an index into the CARD SHED PRP bundle, summarizing what PRPs 1–3 define and their current status.
@lab/ll-CARDSHED/README.md
@lab/ll-CARDSHED/CLAUDE.md
@lab/ll-CARDSHED/AGENTS.md
@lab/ll-CARDSHED/BLUEPRINT.md
Define strict local rules for core determinism and the future UI design pipeline within the ll-CARDSHED stack.
  • Add core-determinism rule file that bans non-deterministic/time/IO APIs and module-level mutation in apps/core/src/core/**, prescribes error-handling and reducer purity patterns, and encodes invariants like card conservation, win-check ordering, and no reshuffles.
  • Specify validation commands and test/property/simulation expectations for any change under apps/core/.
  • Add ui-design-pipeline rule file mandating a Stitch → agent-browser → (optional) Playwright workflow for any UI change once apps/ui/ exists, including required tools, artifact locations (docs/SCREENS/, dogfood-output/), and acceptance checklist.
  • Document prohibitions against hand-rolled UI, ad-hoc design tokens, and rule reimplementation in the UI layer.
@lab/ll-CARDSHED/.claude/rules/core-determinism.md
@lab/ll-CARDSHED/.claude/rules/ui-design-pipeline.md
Seed Stitch design-system placeholder and directory structure for future UI and documentation artifacts.
  • Add .stitch/DESIGN.md as a non-hand-editable placeholder design-system file, with instructions to regenerate via Stitch skills at PRP 3 M1 and not reuse ll-RELIQUARY’s design system verbatim.
  • Create empty data/, dogfood-output/, and docs/SCREENS and docs/DECISIONS directories (with .gitkeep) as targets for runtime data, dogfood artifacts, screen mockups, and ADRs.
@lab/ll-CARDSHED/.stitch/DESIGN.md
@lab/ll-CARDSHED/data/.gitkeep
@lab/ll-CARDSHED/dogfood-output/.gitkeep
@lab/ll-CARDSHED/docs/SCREENS/.gitkeep
@lab/ll-CARDSHED/docs/DECISIONS/.gitkeep

Assessment against linked issues

Issue Objective Addressed Explanation
#143 Add a proper W7 stack-root contract for @lab/ll-CARDSHED, including metadata, docs, local rules, placeholders, and directory scaffolding modeled on @lab/ll-RELIQUARY.
#143 Provide a minimal but valid compose setup and env/metadata so the stack is discoverable and passes contract/policy constraints (valid .w7-meta, docker compose config OK, no privileged or host-root mounts).
#144 Update .claude/hooks/check-commit-format.sh so that the SCOPE_ALLOW regex includes the reliquary and cardshed scopes, keeping the local pre-commit hook in sync with .claude/rules/commit-format.md.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

Warning

Rate limit exceeded

@w7-mgfcode has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 26 minutes and 5 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7fe560f6-3815-4a1d-b6fb-48349ea84a94

📥 Commits

Reviewing files that changed from the base of the PR and between 1a64ddb and 3021b93.

📒 Files selected for processing (16)
  • .claude/hooks/check-commit-format.sh
  • @lab/ll-CARDSHED/.claude/rules/core-determinism.md
  • @lab/ll-CARDSHED/.claude/rules/ui-design-pipeline.md
  • @lab/ll-CARDSHED/.env.example
  • @lab/ll-CARDSHED/.gitignore
  • @lab/ll-CARDSHED/.stitch/DESIGN.md
  • @lab/ll-CARDSHED/.w7-meta
  • @lab/ll-CARDSHED/AGENTS.md
  • @lab/ll-CARDSHED/BLUEPRINT.md
  • @lab/ll-CARDSHED/CLAUDE.md
  • @lab/ll-CARDSHED/README.md
  • @lab/ll-CARDSHED/compose.yml
  • @lab/ll-CARDSHED/data/.gitkeep
  • @lab/ll-CARDSHED/docs/DECISIONS/.gitkeep
  • @lab/ll-CARDSHED/docs/SCREENS/.gitkeep
  • @lab/ll-CARDSHED/dogfood-output/.gitkeep
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/cardshed-stack-bootstrap

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@w7-mgfcode w7-mgfcode merged commit cb780cc into master May 21, 2026
14 checks passed
@w7-mgfcode w7-mgfcode deleted the chore/cardshed-stack-bootstrap branch May 21, 2026 19:01
w7-mgfcode added a commit that referenced this pull request May 21, 2026
Captures the cardshed stack-bootstrap session (PR #145 merged) plus the
PRP 3 §A MVP umbrella decomposition (#146 + 8 sub-issues #147#154).
Mirrors @lab/ll-RELIQUARY/HANDOFF.md placement convention — stack-local,
force-added past the root .gitignore HANDOFF.md rule.

Next Step #1 in the handoff is actionable (names branch, file, exact
package.json dep deltas, and references sub-issue #148) so the next
session can resume cleanly without re-reading the rest of the document.

The prior session's handoff (CARD SHED PRP-02 merged) was archived to
the local-only repo-root .handoffs/ directory before this file took
over the active slot.
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.

chore(repo): sync commit-format hook scope allow-list with rule chore(cardshed): bootstrap @lab/ll-CARDSHED stack contract

1 participant