원클릭으로
archi-design-patterns
Inline helper for structured technical design patterns. Protocol-invoked only; may run in current context.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Inline helper for structured technical design patterns. Protocol-invoked only; may run in current context.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Fetch minimal Architext documentation context after an Intent Card. Must run in isolated context/subagent when available. Auto-invoked by 00_system Front Pipeline.
Normalize a user request into an Architext Intent Card before command routing. Must run in isolated context/subagent when available. Auto-invoked by 00_system Front Pipeline.
Reconcile stale Architext task status from evidence. Must run in isolated context/subagent when available. Protocol-invoked only; do not auto-trigger from casual user requests.
Fetch minimal Architext documentation context after an Intent Card. Must run in isolated context/subagent when available. Auto-invoked by 00_system Front Pipeline.
Normalize a user request into an Architext Intent Card before command routing. Must run in isolated context/subagent when available. Auto-invoked by 00_system Front Pipeline.
Reconcile stale Architext task status from evidence. Must run in isolated context/subagent when available. Protocol-invoked only; do not auto-trigger from casual user requests.
| name | archi-design-patterns |
| description | Inline helper for structured technical design patterns. Protocol-invoked only; may run in current context. |
/archi.* 协议在对应步骤显式调用。/archi.plan step_4_generate → design.md § 2
↓
[本 Skill] 模式选择 → 格式生成 → 自检
↓
design.md § 2 Core Mechanisms 内容
Skill 的职责边界:
- 负责:模式选择指南、各模式的标准表格格式、自检清单
- 不负责:design.md 的整体结构(见
design.template.md)、参数/不变量/故障模式(见模板 §§ 3-5)
根据机制特征选取 ≥1 个模式。同一功能可组合多个(如连接管理用 State Machine + 消息处理用 Pipeline)。
| 机制特征 | 推荐模式 | 典型场景 |
|---|---|---|
| 有离散状态集合与状态间转移 | State Machine | 连接管理、工作流引擎、组件生命周期、认证流程 |
| 数据/请求经过有序处理步骤 | Pipeline | 消息解码链、中间件栈、数据转换管道、请求拦截器 |
| 行为取决于多条件组合 | Decision Matrix | 权限判定、策略路由、降级规则、特性开关 |
| 两个或多个组件间有定义好的消息交换 | Protocol | 客户端-服务端通信、进程间 IPC、事件总线、Worker 消息 |
执行流程: 选定模式 → 填写对应标准格式 → 立即执行自检 → 有未通过项须修补后重检 → 全部通过再进入下一个机制。
States (状态集):
| 状态 | 含义 | 进入条件 |
|---|---|---|
idle | [初始/空闲] | [初始化完成 或 主动断开] |
connecting | [连接建立中] | [发起连接请求] |
connected | [已连接] | [收到 open 事件] |
| ... | ... | ... |
Transitions (转移表):
| From | → To | Guard (触发条件) | Action (副作用) |
|---|---|---|---|
idle | connecting | [用户触发连接] | [创建 Socket 实例] |
connecting | connected | [收到 open 事件] | [启动心跳, 清空重试计数] |
connecting | disconnected | [超时 或 error 事件] | [记录错误, 递增重试计数] |
| ... | ... | ... | ... |
| # | 检查项 | 验证方法 |
|---|---|---|
| 1 | 完整性: 无死锁 | 每个状态至少一条出边 |
| 2 | 可达性: 无孤岛 | 每个非初始状态至少一条入边 |
| 3 | 终止性: 有退出路径 | 存在终态或稳态循环 |
| 4 | 确定性: 无歧义转移 | 同一状态的出边 Guard 互斥 |
| 5 | 异常覆盖: 非 Happy Path Only | 每个非终态都有 error/timeout 出边 |
| Step | Input | Process | Output | On Error |
|---|---|---|---|---|
| 1. [步骤名] | [输入类型] | [处理逻辑] | [输出类型] | [丢弃/重试/中止/降级] |
| 2. [步骤名] | [上一步 Output] | [处理逻辑] | [输出类型] | [错误处理] |
| ... | ... | ... | ... | ... |
| # | 检查项 | 验证方法 |
|---|---|---|
| 1 | 类型链: 无断裂 | Step N Output = Step N+1 Input |
| 2 | 错误处理: 无静默吞错 | 每步都有 On Error |
| 3 | 幂等标注: 重试安全性明确 | 标注哪些步骤可安全重试、哪些有副作用 |
| 4 | 可恢复性: 可安全终止 | 任意 Step 错误后可恢复或安全退出 |
| 条件 A | 条件 B | 条件 C | → 行为 | 备注 |
|---|---|---|---|---|
| [值1] | [值1] | [值1] | [行为] | |
| [值1] | [值1] | [值2] | [行为] | |
| [值1] | [值2] | * | [行为] | *=任意值 |
| * | * | * | [兜底行为] | 未匹配时默认处理 |
| # | 检查项 | 验证方法 |
|---|---|---|
| 1 | 穷举性: 无遗漏 | 所有条件值组合已覆盖(* 通配未列举组合) |
| 2 | 无歧义: 单一命中 | 同一输入只命中一行(优先级从上到下,或条件互斥) |
| 3 | 兜底行: 有默认处理 | 最后一行为 * 通配 |
| 4 | 可测试: 可构造用例 | 每行可构造测试输入验证 |
参与方: [Component A] ↔ [Component B]
| Seq | Sender → Receiver | Message | Payload | Expected Response | Timeout |
|---|---|---|---|---|---|
| 1 | [A → B] | [消息名] | {[字段: 类型]} | [响应名] {[字段: 类型]} | [Ns → 超时处理] |
| 2 | [B → A] | [消息名] | {[字段: 类型]} | 无 (单向推送) | - |
| ... | ... | ... | ... | ... | ... |
| # | 检查项 | 验证方法 |
|---|---|---|
| 1 | 配对性: 有去有回 | 需要响应的消息都定义了 Response + Timeout |
| 2 | 类型明确: 无 any | 每个 Payload 字段有具体类型 |
| 3 | 顺序依赖: 前置声明 | 标注哪些消息必须在哪些之后 |
| 4 | 并发安全: 有策略 | 多消息并发时说明处理策略(队列/丢弃/合并) |
中间产物:此 Skill 为子程序,产出机制描述 + 自检结果后控制权交还调用方(step_4_generate 或 step_5_audit),继续后续流程。
□ design.md § 2 核心机制已填充选定模式
□ 每个模式自检清单全部通过