Repository navigation
chore: refactor/consolidate soc into skill - #254
Conversation
…rce of truth - Add 11 dependency-cruiser rules enforcing layer boundaries - Modify 2 existing rules (entrypoint-restricted-deps, domain-no-infra) - Delete codebase-structure.md, architecture-review-principles.md - Consolidate ADRs 002-007 into single ADR-002 (allowed folder structures) - Update architecture-review agent to reference skill audit checklist - Update all CLAUDE.md files with ADR-002 and skill references - Add skill URL for fallback fetching when not loaded Co-Authored-By: Claude Opus 4.6 <[email protected]>
After task confirmation, output a concrete handoff message with the cd command and a ready-made prompt for a fresh Claude Code session, instead of asking the user to manually start a new session. Co-Authored-By: Claude Opus 4.6 <[email protected]>
📝 WalkthroughWalkthroughThis PR consolidates architectural documentation by removing six specialized ADRs and replacing them with a unified ADR-002 on allowed folder structures. It simultaneously expands dependency-cruiser rules to enforce stricter layering constraints across entrypoint, commands, queries, domain, infra, and cross-feature boundaries. References in configuration files and documentation are updated to point to the new centralized guidance. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
Deploying living-architecture with
|
| Latest commit: |
48e57e1
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://91247c6a.living-architecture.pages.dev |
| Branch Preview URL: | https://refactor-consolidate-soc-int.living-architecture.pages.dev |
There was a problem hiding this comment.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
.dependency-cruiser.mjs (2)
76-95: 🧹 Nitpick | 🔵 Trivial
commands-no-cross-featureis fully subsumed byno-cross-feature-imports.Both rules use the same
from/topattern with backreference exclusion (features/$1/.+). The only value of keeping both is a more specific error message when a command file is the offender. This is fine for DX but worth noting as intentional duplication.
166-186:⚠️ Potential issue | 🟡 MinorAlign
frompath patterns in shell import rules to ensure consistent coverage.The new
shell-no-commandsandshell-no-queriesrules use[^/]+/src/shell/.+, which excludestools/dev-workflow/shell/— a shell directory that exists in the codebase. Meanwhile,shell-no-domainusesshell/.+, which includes it. This inconsistency creates a coverage gap where some shell import violations would be missed.Align all three rules to the broader pattern for consistency:
Proposed fix
{ name: "shell-no-commands", severity: "error", comment: "Shell must not import from commands/ directly (wire via entrypoint)", - from: { path: "[^/]+/src/shell/.+" }, + from: { path: "shell/.+" }, to: { path: "features/[^/]+/commands/.+" } }, { name: "shell-no-queries", severity: "error", comment: "Shell must not import from queries/ directly (wire via entrypoint)", - from: { path: "[^/]+/src/shell/.+" }, + from: { path: "shell/.+" }, to: { path: "features/[^/]+/queries/.+" } },
🤖 Fix all issues with AI agents
In `@CLAUDE.md`:
- Line 33: Update the CLAUDE.md instruction line that currently points only to
the external `development-skills:separation-of-concerns` URL so it also
references the local ADR for resilience: add a fallback pointer to
`docs/architecture/adr/ADR-002-allowed-folder-structures.md` next to the
existing sentence in CLAUDE.md (the line starting "All code must follow the
audit checklist in the [`development-skills:separation-of-concerns`]...") so
agents have an internal reference if the external link is unreachable; ensure
the phrasing clearly lists both the external skill link and the local ADR-002 as
authoritative guidance.
In `@CONTRIBUTING.md`:
- Line 50: Replace the external repository link reference
"development-skills:separation-of-concerns" in the Code Standards bullet with an
in-repo authoritative reference and fallback: update the CONTRIBUTING.md bullet
to point to the local ADR document named ADR-002-allowed-folder-structures.md
(the same guidance used in .pr_agent.toml) and optionally include a short note
and the external link as a secondary resource; ensure the text no longer relies
solely on the external NTcoding/claude-skillz link so contributors can always
find the guidance inside the repo.
In `@docs/architecture/adr/ADR-002-allowed-folder-structures.md`:
- Line 7: The ADR currently relies on an external link as the source of truth
for "Code placement and layer rules" (the referenced text and link
`development-skills:separation-of-concerns` in
ADR-002-allowed-folder-structures.md), which is fragile; update the ADR to
inline the essential rules (or a concise summary) from that skill directly into
the document and mark the external GitHub link as supplementary, or
alternatively add a mirrored copy of the key rules into this repo's docs and
update the ADR to reference the local mirror instead of the external
`claude-skillz` skill; ensure the inlined/mirrored content covers the code
placement and layer rules verbatim enough for the ADR to be self-contained while
keeping the external link as an attribution only.
In `@docs/design-reviews/riviere-builder/design.md`:
- Line 261: Replace the bare mention of the skill
development-skills:separation-of-concerns with the same full markdown hyperlink
used elsewhere in the PR (i.e., convert the plain text into a markdown link
pointing to the skill's full URL), ensuring the link text remains
development-skills:separation-of-concerns and the URL/format matches the other
references in this change set.
In `@packages/riviere-query/CLAUDE.md`:
- Line 5: The CLAUDE.md currently only points to ADR-002 and omits Riviere
Query–specific architecture guidance from ADR-006; update CLAUDE.md to preserve
ADR-006's key design decisions by either (a) adding a short inline summary of
the Riviere Query architecture (listing decisions like module responsibilities,
public API surface, data flow, and allowed exceptions) and a “Follow ADR-006”
callout, or (b) adding a clear link/reference to ADR-006 with a one-paragraph
synopsis of its critical decisions; ensure the file mentions ADR-006 by name so
readers of CLAUDE.md (the query package manifest) can locate the
package-specific architecture guidance.
|



Summary by CodeRabbit
Documentation
Chores