跳到正文
cccskills
免费在 GitHub 公开

design-document

Design document writing conventions. Use when writing or reviewing technical design documents.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md3.6 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Design Document Conventions

1. Background / Problem Statement

1.1 Background and Pain Points

  • Describe current system/module limitations and deficiencies
  • List specific scenarios, metrics, or incident cases that triggered this design

1.2 Impact Scope

  • Affected modules, microservices, APIs, data stores, third-party dependencies
  • Potential impact on performance, reliability, cost, maintainability
  • Forward/backward compatibility analysis

1.3 Constraints

  • Compliance/security/performance/resource restrictions
  • External system or infrastructure dependencies

2. Design Goals

2.1 Functional Goals

  • List Must/Should/Could core capabilities by priority

2.2 Non-Functional Goals

  • Performance (throughput, latency, concurrency, resource usage)
  • Scalability, maintainability, testability, observability
  • Reliability (fault tolerance, HA, degradation, rollback strategies)

2.3 Constraint Goals

  • Backward compatibility, API stability
  • Security and compliance requirements

3. Technical Design

3.1 Architecture Diagram

  • Use Mermaid for high-level component diagrams with data/control flow

3.2 Detailed Flowcharts

  • Key business flows, exception flows, retry/compensation with timing and triggers

3.3 Thread/Concurrency Model

  • Thread lifecycle, inter-thread communication (locks, condition variables, queues, Actor patterns)
  • Sequence diagrams for concurrency interactions

3.4 Core Classes and Data Structures

  • Class diagrams showing main classes, interfaces, inheritance/composition relationships
  • Key data structure fields, lifecycle, thread-safety strategy

3.5 Key Algorithms or Protocols

  • Pseudocode or flow for pub/sub, load balancing, retry backoff, etc.
  • State machine / protocol state transition diagrams

3.6 Error Handling and Recovery

  • Error classification, exception stack, retry strategies, degradation plans
  • Monitoring metrics, alert trigger conditions and levels

3.7 Deployment and Operations

  • Configuration items, hot-update mechanisms, canary and rollback strategies
  • CI/CD, container, Service Mesh, Kubernetes resource considerations

4. Unit Testing

4.1 Test Scope and Goals

  • Cover core logic, boundary conditions, concurrency scenarios, exception paths

4.2 Test Environment and Tools

  • Google Test/Mock version, necessary third-party stubs/fakes

4.3 Test Scenarios and Cases

Case IDScenarioInputExpected Output/BehaviorMock Dependencies
TC-01Normal single log pushSingle valid LogRecordReturns SUCCESS, buffer size +1None
TC-02Buffer fullcapacity=N filledThrows BufferOverflowExceptionNone
TC-03Concurrent pushMulti-thread simultaneous pushNo data loss, order/final consistency matches designMutexMock
TC-04flush clearsM items exist, then flushReturns M items, buffer size=0TimeProviderMock

4.4 Boundary and Exception Testing

  • Empty input, invalid input, extreme capacity, network/disk fault injection

4.5 Performance Benchmarking (optional)

  • Throughput, latency, CPU/Memory profile; comparison with baseline

Notes

  • Do not include project management info (estimates, schedules, milestones, Gantt charts)
  • Code examples must follow team C++ coding standards (see skills/project-knowledge/)
  • Test case naming: <Module>_<Function>_<Number> for CI coverage tracking

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

在进行 Code Review 时,使用这个技能对 LoongCollector 变更进行安全导向、架构一致性优先的深度代码评审。

中文简介正在准备中。当前显示原文说明。

alibaba/loongcollector22072026年10月16日 更新

commit

免费

按 Conventional Commits 规范编写提交信息。在创建 git commit 时使用。

中文简介正在准备中。当前显示原文说明。

alibaba/loongcollector22072026年10月16日 更新

compile

免费

编译 LoongCollector C++ 与 Go 组件。涉及构建、单元测试或镜像时使用。

中文简介正在准备中。当前显示原文说明。

alibaba/loongcollector22072026年10月16日 更新

e2e

免费

LoongCollector E2E 测试全流程指南:设计、编写、运行和调试。当需要编写新 E2E 测试、运行现有测试、或排查 E2E 测试失败时使用此 skill。

中文简介正在准备中。当前显示原文说明。

alibaba/loongcollector22072026年10月16日 更新

LoongCollector E2E Testing Framework Development Guide. Use this rule when you need to understand E2E testing framework architecture, develop new test behavior functions, or extend testing capabilities. Contains detailed BDD testing framework usage, test behavior function development and registration workflows, and comprehensive reference of existing testing capabilities. Example: When adding custom test behaviors for new plugins, use this rule to understand how to write and register new test functions. Example: When developing E2E tests, use this rule to understand the e2e framework.

中文简介正在准备中。当前显示原文说明。

alibaba/loongcollector22072026年10月16日 更新

E2E Testing Standards Guide. Use this rule when you need to write or execute E2E tests, including test naming conventions, test workflows, and test behavior templates. This rule should be used for end-to-end integration testing scenarios to ensure test standardization and maintainability. Example: When writing new E2E tests, use this rule to ensure proper test format and workflow compliance.

中文简介正在准备中。当前显示原文说明。

alibaba/loongcollector22072026年10月16日 更新

查看 alibaba 的全部技能

报告此技能的问题