Skip to content

docs(architecture): manifesto Layer 4 — C4 Context (draft)#155

Open
Yambr wants to merge 3 commits into
next/v1from
feat/manifesto-04-c4-context-draft
Open

docs(architecture): manifesto Layer 4 — C4 Context (draft)#155
Yambr wants to merge 3 commits into
next/v1from
feat/manifesto-04-c4-context-draft

Conversation

@Yambr
Copy link
Copy Markdown
Collaborator

@Yambr Yambr commented May 24, 2026

Summary

  • Layer 4 (C4 Context) artifact of the next/v1 manifesto stack: one ≤80-line doc + one canonical Mermaid, per the plan's intentionally-minimal framing for this layer.
  • OCU as the central box; Wide-Moat is one-sentence context (the opinionated bundle that ships OCU + peers like n8n / Open WebUI together; OCU is usable standalone).
  • Siblings are an open class — any MCP-speaking peer is a first-class integration; REST is a fallback. n8n and Open WebUI are examples in the Wide-Moat bundle, not the definition.
  • Five research agents (competitor format sweep, legacy mine, OCU value articulation, OCU-vs-Wide-Moat boundary, diagram-format advisor) feed docs/future-architecture/research/SUMMARY-layer4.md.

Files

  • docs/architecture/03-c4-context.md (54 lines) — purpose, inside-the-box, diagram reference, external-actor table with required-vs-optional column, scope-out, one tracked open question.
  • docs/architecture/diagrams/c4-context.mmd (44 lines) — flowchart LR + project palette (red untrusted / amber semi-trusted / green trusted / blue isolated), same engine and conventions as 02-trust-boundaries.mmd. Solid border = required; dashed = optional configuration.

Decisions encoded

  • LLM upstream is one of the MCP-speaking peers, not a separate Layer 4 actor (model-neutral by construction).
  • Customer object store is NOT a Layer 4 actor — 02-trust-boundaries.md:45 already classifies it as an outbound endpoint behind the egress policy. No §02 §3 backport needed.
  • Preamble is practitioner-first value-creation framing, not TPRM-first / moat-intersection.
  • Diagram engine is plain Mermaid flowchart LR per the format advisor's verdict A (Mermaid C4Context is upstream-experimental; PlantUML doesn't render on GitHub natively).

Open question

§6 #1 — Wide-Moat bundling status for n8n + Open WebUI on next/v1 (integration shape vs packaging) tracked at #154. Layer 4 locks the integration shape; packaging is not Layer 4's scope.

Test plan

  • CI green on the standard 16-gate set
  • CodeRabbit review pass
  • gsd-code-reviewer (architecture-doc mode)
  • gsd-plan-checker against the manifesto plan
  • cross-review pass

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added a C4 context architecture page defining system boundaries, required vs optional actors, interaction flows, and explicit non-goals (scoped-out components like orchestration, chat surface, hosted model serving, admin UI, policy guardrails).
    • Included a canonical context diagram with rendering conventions for required/optional nodes, integration notes for customer-side capabilities (IdP, KMS/HSM, SIEM, proxy, DLP/ICAP), and an open question about bundling certain UI/workflow tools.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 24, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: ce0e850e-b6ac-41bb-8e4c-d064d0ab148f

📥 Commits

Reviewing files that changed from the base of the PR and between 2a78b1b and 59021ca.

📒 Files selected for processing (2)
  • docs/architecture/03-c4-context.md
  • docs/architecture/diagrams/c4-context.mmd
✅ Files skipped from review due to trivial changes (2)
  • docs/architecture/03-c4-context.md
  • docs/architecture/diagrams/c4-context.mmd

Walkthrough

This PR adds a C4 Context architecture page and a companion Mermaid flowchart describing OCU’s inside-the-box boundary, external actors (required vs optional), integration edges, scope exclusions, and a packaging question for next/v1.

Changes

C4 Context Architecture Documentation

Layer / File(s) Summary
C4 Context scope and diagram
docs/architecture/03-c4-context.md, docs/architecture/diagrams/c4-context.mmd
Architecture page defines the C4 context boundary for OCU, enumerates external actors (MCP peers, Admin/Operator, customer IdP/KMS/SIEM/proxy/DLP-ICAP, SOAR, transparency log) with required vs optional notes and NFR links, lists scope exclusions and an open bundling question; the Mermaid flowchart visualizes the OCU subgraph, labeled integration edges, and styling for required vs optional components.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related issues

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'docs(architecture): manifesto Layer 4 — C4 Context (draft)' directly and specifically describes the primary change: adding a C4 Context architecture diagram documentation as Layer 4 of the manifesto, with clear scope indicators (draft status, architecture subdomain, manifesto layer).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/manifesto-04-c4-context-draft

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/architecture/03-c4-context.md`:
- Line 6: Replace the future date in the frontmatter key "last-reviewed" in
docs/architecture/03-c4-context.md with a non-future date (e.g., the PR creation
date or today's date); locate the "last-reviewed: 2026-05-25" entry and update
it to a valid date like "last-reviewed: 2026-05-24" so audit/review tracking
isn't confused.
- Around line 1-2: Replace the existing SPDX header lines ("<!--
SPDX-License-Identifier: FSL-1.1-Apache-2.0 -->" and the following copyright
comment) with the required BUSL header: add a top-of-file comment containing "#
SPDX-License-Identifier: BUSL-1.1" and "# Copyright (c) 2025 Open Computer Use
Contributors" (use the same comment style as other docs in the repo), ensuring
the new header exactly matches the mandated strings.

In `@docs/architecture/diagrams/c4-context.mmd`:
- Around line 1-2: Replace the current SPDX and copyright header in
docs/architecture/diagrams/c4-context.mmd: change the SPDX identifier from
"FSL-1.1-Apache-2.0" to "BUSL-1.1" and ensure the copyright line reads "#
Copyright (c) 2025 Open Computer Use Contributors" so the file header matches
the repo policy for new source files.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 151e614b-0e20-4f1c-ac26-591caa125300

📥 Commits

Reviewing files that changed from the base of the PR and between 3e6ae98 and 2c190a9.

📒 Files selected for processing (2)
  • docs/architecture/03-c4-context.md
  • docs/architecture/diagrams/c4-context.mmd

Comment on lines +1 to +2
<!-- SPDX-License-Identifier: FSL-1.1-Apache-2.0 -->
<!-- Copyright (c) 2025 Open Computer Use Contributors -->
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Replace the license header with the required BUSL header.

This file’s SPDX header is not the required one for new files in this repo.

Proposed fix
-<!-- SPDX-License-Identifier: FSL-1.1-Apache-2.0 -->
-<!-- Copyright (c) 2025 Open Computer Use Contributors -->
+# SPDX-License-Identifier: BUSL-1.1
+# Copyright (c) 2025 Open Computer Use Contributors

As per coding guidelines, All other new source files MUST include SPDX license header: # SPDX-License-Identifier: BUSL-1.1 with # Copyright (c) 2025 Open Computer Use Contributors.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/architecture/03-c4-context.md` around lines 1 - 2, Replace the existing
SPDX header lines ("<!-- SPDX-License-Identifier: FSL-1.1-Apache-2.0 -->" and
the following copyright comment) with the required BUSL header: add a
top-of-file comment containing "# SPDX-License-Identifier: BUSL-1.1" and "#
Copyright (c) 2025 Open Computer Use Contributors" (use the same comment style
as other docs in the repo), ensuring the new header exactly matches the mandated
strings.


---
status: draft
last-reviewed: 2026-05-25
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use a non-future last-reviewed date.

last-reviewed: 2026-05-25 is ahead of this PR’s creation date (2026-05-24), which can confuse audit/review tracking.

Proposed fix
-last-reviewed: 2026-05-25
+last-reviewed: 2026-05-24
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
last-reviewed: 2026-05-25
last-reviewed: 2026-05-24
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/architecture/03-c4-context.md` at line 6, Replace the future date in the
frontmatter key "last-reviewed" in docs/architecture/03-c4-context.md with a
non-future date (e.g., the PR creation date or today's date); locate the
"last-reviewed: 2026-05-25" entry and update it to a valid date like
"last-reviewed: 2026-05-24" so audit/review tracking isn't confused.

Comment on lines +1 to +2
%% SPDX-License-Identifier: FSL-1.1-Apache-2.0
%% Copyright (c) 2025 Open Computer Use Contributors
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Align diagram file license header with repo policy.

The SPDX/copyright header does not match the required BUSL header for new files.

Proposed fix
-%% SPDX-License-Identifier: FSL-1.1-Apache-2.0
-%% Copyright (c) 2025 Open Computer Use Contributors
+# SPDX-License-Identifier: BUSL-1.1
+# Copyright (c) 2025 Open Computer Use Contributors

As per coding guidelines, All other new source files MUST include SPDX license header: # SPDX-License-Identifier: BUSL-1.1 with # Copyright (c) 2025 Open Computer Use Contributors.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
%% SPDX-License-Identifier: FSL-1.1-Apache-2.0
%% Copyright (c) 2025 Open Computer Use Contributors
# SPDX-License-Identifier: BUSL-1.1
# Copyright (c) 2025 Open Computer Use Contributors
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/architecture/diagrams/c4-context.mmd` around lines 1 - 2, Replace the
current SPDX and copyright header in docs/architecture/diagrams/c4-context.mmd:
change the SPDX identifier from "FSL-1.1-Apache-2.0" to "BUSL-1.1" and ensure
the copyright line reads "# Copyright (c) 2025 Open Computer Use Contributors"
so the file header matches the repo policy for new source files.

Yambr and others added 3 commits May 27, 2026 14:30
Layer 4 of the next/v1 manifesto stack, following §01 audience-and-buyer
(PR #143), §02 NFRs (PR #146), and §02 trust-boundaries (PR #147). One
canonical Mermaid + one ≤80-line doc, per the plan's "intentionally
minimal" framing.

Scope:
- 03-c4-context.md (54 lines) — purpose / inside-the-box / diagram
  reference / external actor table with required-vs-optional column /
  scope-out / open questions.
- diagrams/c4-context.mmd (44 lines) — flowchart LR + project palette
  (red/amber/green/blue), same engine as 02-trust-boundaries.mmd.
  Convention: solid = required, dashed = optional configuration.

Five research agents (competitor format sweep, legacy mine, OCU value
articulation, OCU-vs-Wide-Moat boundary, diagram-format advisor)
synthesised in docs/future-architecture/research/SUMMARY-layer4.md.
Key agreed decisions:

- OCU is the central box; Wide-Moat is mentioned once as the opinionated
  bundle that ships OCU + peers (n8n, Open WebUI) as one curated stack
  but is not required for OCU to be useful.
- Siblings are an open class: any MCP-speaking peer is a first-class
  integration; REST is a fallback. n8n and Open WebUI are examples in
  the bundle, not the definition of "sibling."
- The §02 §3 actor table stays the single source of truth — Layer 4
  cross-references it instead of duplicating, then adds an "optionality"
  column the actor table did not need at Layer 3.
- LLM upstream is NOT a separate actor on Layer 4 — it is one of the
  MCP-speaking peers (model-neutral by construction). Customer object
  store is not an actor either — §02 line 45 already classifies it as
  an outbound endpoint behind the egress policy, not a contract-bearing
  actor. No backport to §02 §3 needed.
- Preamble framing (Why OCU): practitioner-first value-creation
  ("build automations once, delegate, scale across a team without
  leaving the safety boundary"), with model-neutrality via MCP as the
  integration property. Not TPRM-first, not moat-intersection.

Diagram engine: plain Mermaid flowchart with the project palette
verbatim from 02-trust-boundaries.mmd. Rejected alternatives:
Mermaid C4Context (upstream-experimental, palette divergence),
C4-PlantUML (no GitHub-native render).

Open question §6 #1 (Wide-Moat bundling status for n8n + Open WebUI on
next/v1) tracked at #154. The integration shape is locked here; the
packaging decision is not Layer 4's job.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…wers)

Four reviewers (gsd-code-reviewer, gsd-plan-checker, cross-architectural
coherence, competitor comparison) converged on one load-bearing defect
plus 12 follow-ups. Verdict matrix: 2 Error / 4 Warning / 7 Info.

Errors (block merge):

1. LLM upstream as inbound MCP peer — three reviewers caught it.
   §02 trust-boundaries:45 explicitly classifies LLM upstream as an
   outbound endpoint behind the egress policy ("not actors against our
   contracts"), and 02-trust-boundaries.mmd:13 draws it as a separate
   outbound node. Listing it inside the inbound PEER node label put two
   opposing semantics on the same name. Fix: drop "LLM upstream" from
   the PEER node label and from the §4 actor-row example list. The
   §41 paragraph remains the canonical mention.

2. AI-guardrail anchor pointed at §02 §6 (Data classification taxonomy);
   the ownership statement lives in §02 §2 zone 4 / §7. Repointed to
   §2 zone 4 so the link lands where the claim actually lives.

Warnings:

3. SIEM edge was solid in c4-context.mmd:35, but SIEM is :::extOpt
   (dashed-border optional). Layer 4's own header convention says
   "solid border = required; dashed border = optional configuration".
   The Layer 3 diagram already draws it dashed. Fixed.

4. "Layer 6" forward references in three places (doc §2 / §3 + diagram
   BOX node). Layer 6 does not exist as an artifact. Reworded to
   "Internal decomposition is out of scope at this layer" + dropped
   the pointer line from the diagram BOX node.

5. BOX node carried three lines of internal description that duplicated
   §1 prose. Collapsed to a single role-line
   "Open Computer Use / in-perimeter agent-execution platform".

6. §1 first sentence opened with value-prop voice ("users build
   automations once, delegate them to agents..."). Replaced with a
   scope declaration; the practitioner framing remains in §01
   audience-and-buyer where it belongs.

Info / polish:

7. Palette claim in §3 named all four colors (red / amber / green /
   blue) but the diagram only uses red + green. Weakened claim to
   "red-untrusted / green-trusted convention; amber and blue from the
   trust-boundary diagram do not apply at the Context level".

8. Added solo-install callout in §3: "the solid / dashed split makes
   the one-click solo-install path visible at a glance".

9. SIEM Role cell rephrased to "OCSF v1.x event bridge consumed by the
   customer's SIEM" for voice consistency with other customer-* rows.

10. Dropped repetitive `02-trust-boundaries.md §3` link from each actor
    row (the preamble already pins the actor table to §02 §3). Renamed
    column to "NFR anchor"; em-dash where no NFR anchor exists.

11. Operator edge in diagram now labelled `PAM-JIT SAML attr / NFR-COMP-29`
    matching 02-trust-boundaries.mmd:47.

12. PEER edge label simplified to `MCP authz spec / audience-validated`
    matching the Layer 3 wording.

13. Added compliance pointer after the actor table: "Regulator citations
    and measurable targets for each row land in manifesto/02-nfrs.md".

14. Added footnote tracing master-plan `agent user` → folded behind
    `MCP-speaking peer` (humans drive OCU only through an MCP-speaking
    peer; direct human-to-OCU UI is a v1 non-goal).

Length 58 lines (≤80 budget). Banned vocab grep clean.
ai-slop-detector OK. No new ASCII diagrams.

Glossary additions (MCP-speaking peer, REST fallback, Wide-Moat
opinionated bundle) and a few cross-doc reconciliations (NFR-FLEX-14 vs
REST fallback wording, Layer 3 SOAR edge dashed-vs-solid) deliberately
deferred to a follow-up PR — not Layer 4 scope.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
W-01 — IdP optionality row: rewrite to two-clause form mirroring SIEM
("optional on minimal shelf (local auth fallback) — required on
full-capability shelf"); resolves doc/diagram mismatch where doc said
"required on full shelf" but .mmd drew IDP dashed.

I-01 — Trim .mmd palette comment: list only colors actually used at
Context level (red, green); amber/blue carve-out already explained in
§3 prose.

I-03 — Bind "regulated-enterprise" term once in §1 (CLAUDE.md default
audience term) so a cold reader knows what flavor of customer
"customer's existing IdP" means.

I-05 — Drop "Master-plan agent user" phrasing (term not defined
anywhere in architecture tree); rewrite as plain "humans drive OCU only
through an MCP-speaking peer" sentence.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Yambr Yambr force-pushed the feat/manifesto-04-c4-context-draft branch from 2a78b1b to 59021ca Compare May 27, 2026 11:30
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