agentleFS
ontology-of-everythingontology-of-everything/concept-skills/skills/zh-CN/architect-4c-cn/SKILL.md

architect-4c-cn

Skill14 starsChanged 23 days agoApache-2.0View on GitHub

仅在显式调用时使用。Simon Brown C4 模型的核心概念、层级定义、原则与常见误用。

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

C4 软件架构模型

核心概念与定义

C4 是 Simon Brown 提出的软件架构模型。软件系统包含容器,容器包含组件,组件由代码元素实现。

层级定义
Context,系统上下文一个软件系统及其直接使用者、外部协作系统。
Container,容器一个系统内的应用与数据存储,形成代码执行或数据存储的运行边界。
Component,组件一个容器内具有明确接口的功能单元,通常与所属容器一起部署。
Code,代码一个组件的类、接口、函数或数据结构。

人表示与系统交互的角色。外部系统指当前系统边界之外的系统,也可能属于同一组织。

系统景观图描述多个系统的关系,动态图描述场景中的交互顺序,部署图描述特定环境中容器实例与基础设施的映射。三者是补充视图。

原则

依据 C4 官网与图类型说明。

  • 采用分层抽象,沿系统、容器、组件与代码的包含关系逐层展开。
  • 按读者需要选择层级,不要求四层全部出现。
  • 模型独立于图形记法。
  • 模型独立于绘图工具。

避免误用

  • C4 容器不等同于 Docker 容器、虚拟机、源码目录或依赖库。
  • 组件按职责和接口识别,不能仅从文件夹或类名推定。
  • Code 是第四层,部署图和动态图不替代代码层。
  • 同一逻辑容器的多个部署实例仍对应一个容器。
  • 运行调用、代码依赖和数据流分别表达,不能混用关系含义。
  • 区分现状、目标与推断,缺少依据的结构和关系保持待确认。

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.