bp-architecture-design

Provide architecture design principles covering module decomposition, dependency management, data architecture, and interface design. Intended for solution overview discussions during system design or for evaluating architectural soundness during code reviews.

Last repository push
GitHub Stars
159
Forks
47
Issues / PRs
1

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "bp-architecture-design" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-9d8008e2d8e307e9a8d253fabfe2551fb6c3fe59fd0a20a9f0bb19b07d31696b. Verify the upstream source and version against https://github.com/davidYichengWei/agentic-engineering-framework before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Provide architecture design principles covering module decomposition, dependency management, data architecture, and interface design. Intended for solution overview discussions during system design or for evaluating architectural soundness during code reviews.

0 Downloads

Introduction source: third_party · davidYichengWei · 0.0.1 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: bp-architecture-design
description: 提供架构设计原则,包括模块划分、依赖管理、数据架构、接口设计。在系统设计阶段讨论方案概览时使用,或在 code review 中评估架构合理性时使用。

架构设计

使用场景:workflow-system-design skill 在讨论 spec.md 4.1 方案概览 时加载本 skill。

第一性原理

架构设计的本质:在约束条件下,选择最优的 trade-off 来满足业务目标。


设计前:回顾 spec.md 前三节

在提出架构方案前,确保已理解:

spec.md 章节 要回答的问题
1. 背景 要解决什么问题?现状是怎样的?
2. 目标 & 非目标 成功的标准是什么?什么不做?
3.1 功能性需求 系统需要具备哪些能力?
3.2 非功能性需求 性能、兼容性、可维护性约束?

如果非功能性需求可以量化,尽量量化(如 p99 延迟 < 100ms),但不强制要求所有场景都能量化。


模块划分

好的划分 = 减少协调成本 + 包含变化。

划分原则

原则 说明 检查点
按功能域划分 围绕业务能力而非技术层 相关的代码是否在一起?
高内聚 一起变化的代码放一起 修改一个功能要改几个模块?
低耦合 模块间依赖最小化 模块能否独立理解和测试?
明确所有权 每个模块有明确的数据和不变量 谁负责维护这块数据的一致性?

边界定义

// ✅ 明确的模块边界
namespace compaction {
    // 公开接口
    class CompactionScheduler { ... };

    // 内部实现(不暴露)
    namespace internal {
        class CompactionTask { ... };
    }
}

依赖管理

依赖方向

层次结构(从高到低):

  1. 应用层 - 业务逻辑、用例编排
  2. 领域层 - 核心抽象、接口定义
  3. 基础设施层 - 具体实现(RocksDB、网络等)

依赖原则:高层依赖低层,依赖抽象接口而非具体实现

依赖规则

规则 说明
单向依赖 只能向下依赖,禁止向上依赖
禁止循环 A→B→C→A 必须打破
依赖抽象 依赖接口而非具体实现

数据架构

数据决策决定正确性和运维复杂度。

决策点 需要明确
数据所有权 哪个模块是这份数据的 source of truth?
一致性模型 强一致 vs 最终一致?
Schema 演进 向前/向后兼容?回滚方案?

接口设计

架构层关注接口原则,详细设计参见 bp-component-design 的 4.2.2 节。

原则 说明
最小化 只暴露必要的接口
不泄露内部 使用专用 DTO
版本兼容 接口变更需考虑向后兼容

与其他 Skill 协同

场景 加载 Skill
涉及网络通信、多节点、一致性、故障恢复 bp-distributed-systems
涉及类/接口详细设计 bp-component-design(4.2 节使用)

4.1 方案概览 Checklist

在 spec.md 4.1 节,确认以下内容已讨论:

  • [ ] 整体思路:用 1-2 句话描述方案核心
  • [ ] 模块划分:涉及哪些模块?边界在哪?
  • [ ] 依赖方向:模块间的依赖关系
  • [ ] 数据流:数据如何流转?
  • [ ] 关键 trade-off:为什么这样设计?牺牲了什么?

反模式

反模式 改进
循环依赖 (A→B→C→A) 引入接口打破循环
边界模糊(多模块修改同一份数据) 明确数据所有权
过度抽象 简单优先,按需抽象
Big Ball of Mud 逐步引入边界

Current listing version

0.0.1

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value75/100

Highlights

  • 提供架构设计原则,涵盖模块划分、依赖管理、数据架构和接口设计,适用于系统设计阶段和代码审查,具有明确的实用价值
Trigger Precision90/100

Highlights

  • description 明确说明了使用场景(系统设计阶段讨论方案概览、code review 评估架构合理性),触发词清晰,边界明确
Structure and Standards90/100

Highlights

  • 文档结构清晰,包含多个章节,有明确的检查点和示例,frontmatter 完整
Execution Reliability85/100

Highlights

  • Skill 为知识性内容,内容完整、逻辑清晰,无明显可靠性问题
Evidence Verifiability (mean of the first four)85/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.