Skip to content

chore: refactor/consolidate soc into skill - #254

Merged
NTCoding merged 2 commits into
mainfrom
refactor/consolidate-soc-into-skill
Feb 6, 2026
Merged

NTCoding merged 2 commits into
mainfrom
refactor/consolidate-soc-into-skill

Conversation

@NTCoding

@NTCoding NTCoding commented Feb 6, 2026 •

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Documentation

    • Consolidated architectural guidance into a single, unified folder structure specification.
    • Simplified architecture references across configuration files and project documentation.
  • Chores

    • Updated task workflow to streamline project setup and handoff processes.
    • Enhanced architectural boundary enforcement rules for improved code organization standards.

NTCoding and others added 2 commits February 6, 2026 22:31
…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]>
@coderabbitai

coderabbitai Bot commented Feb 6, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This 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

Cohort / File(s) Summary
Architectural Decision Records Consolidation
docs/architecture/adr/ADR-002-dev-workflow-refactoring.md, docs/architecture/adr/ADR-003-riviere-cli-architecture.md, docs/architecture/adr/ADR-004-riviere-builder-architecture.md, docs/architecture/adr/ADR-005-riviere-extract-ts-architecture.md, docs/architecture/adr/ADR-006-riviere-query-architecture.md, docs/architecture/adr/ADR-007-eclair-architecture.md
Removes six specialized ADR documents, consolidating their guidance into a single unified architecture record.
New Unified Architecture Document
docs/architecture/adr/ADR-002-allowed-folder-structures.md
Introduces comprehensive documentation of standard feature/platform/shell folder structure, layer responsibilities (entrypoint, commands, queries, domain, infra, platform, shell), and local exceptions for React/domain/query libraries and tools.
Dependency Architecture Rules Expansion
.dependency-cruiser.mjs
Significantly expands architectural boundary rules: adds persistence infra restrictions on entrypoint, strengthens domain infra isolation, introduces new constraints on commands/queries imports (no entrypoint, messaging, mappers, middleware), and enforces stricter shell wiring via entrypoint.
Configuration File Updates
.coderabbit.yaml, .pr_agent.toml
Replaces references to docs/conventions/codebase-structure.md with new docs/architecture/adr/ADR-002-allowed-folder-structures.md across configuration sections.
Agent and Workflow Documentation
.claude/agents/architecture-review.md, .claude/commands/next-task.md
Updates architecture-review agent to reference loaded separation-of-concerns skill instead of fixed codebase-structure document; refactors next-task workflow to use start-task script and explicit handoff templates.
CLAUDE.md Architecture References
CLAUDE.md, apps/eclair/CLAUDE.md, packages/riviere-builder/CLAUDE.md, packages/riviere-cli/CLAUDE.md, packages/riviere-extract-ts/CLAUDE.md, packages/riviere-query/CLAUDE.md, tools/dev-workflow/CLAUDE.md
Updates per-package architecture references from individual ADRs to unified ADR-002 and removes detailed layer pattern descriptions in favor of skill-based guidance.
Documentation Removals
docs/conventions/codebase-structure.md, docs/design-reviews/architecture-review-principles.md
Eliminates legacy architecture guidance documents (codebase-structure conventions CS-001 through CS-010, and architecture-review-principles checklist).
Supporting Documentation Updates
CONTRIBUTING.md, docs/design-reviews/riviere-builder/design.md, docs/project/PRD/active/PRD-phase-12-connection-detection.md
Updates references to point to separation-of-concerns skill or new ADR-002, replacing older documentation links.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested labels

Review effort 4/5

Poem

🐰 From scattered scrolls to one bright page,
Rules march in line, a stoic stage.
Boundaries tighten, layer by layer,
Commands and queries take their prayer.
One truth to guide them, clear and clean—
The finest architecture ever seen! ✨

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: consolidating separation-of-concerns documentation into a skill format, replacing codebase-structure references with ADR-002 and skill-based guidance across multiple files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/consolidate-soc-into-skill

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.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying living-architecture with  Cloudflare Pages  Cloudflare Pages

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

View logs

@NTCoding NTCoding changed the title Refactor/consolidate soc into skill chore: refactor/consolidate soc into skill Feb 6, 2026

@coderabbitai coderabbitai 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.

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-feature is fully subsumed by no-cross-feature-imports.

Both rules use the same from/to pattern 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 | 🟡 Minor

Align from path patterns in shell import rules to ensure consistent coverage.

The new shell-no-commands and shell-no-queries rules use [^/]+/src/shell/.+, which excludes tools/dev-workflow/shell/ — a shell directory that exists in the codebase. Meanwhile, shell-no-domain uses shell/.+, 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.

Comment thread CLAUDE.md
Comment thread CONTRIBUTING.md
Comment thread docs/architecture/adr/ADR-002-allowed-folder-structures.md
Comment thread docs/design-reviews/riviere-builder/design.md
Comment thread packages/riviere-query/CLAUDE.md
@sonarqubecloud

sonarqubecloud Bot commented Feb 6, 2026

Copy link
Copy Markdown

@NTCoding
NTCoding merged commit 2a13c31 into main Feb 6, 2026
17 of 18 checks passed
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