用 Unix/Linux 设计哲学评估系统方案的可组合性、简洁性与关注点分离。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "design-philosophy-linux" 技能: 1. 下载 https://raw.githubusercontent.com/microsoft/amplifier-bundle-systems-design/main/skills/design-philosophy-linux/SKILL.md 2. 保存为 ~/.claude/skills/design-philosophy-linux/SKILL.md 3. 装好后重载技能,告诉我可以用了
请用 Unix/Linux 设计哲学评审这份微服务接口方案,重点检查机制与策略是否分离、模块是否可组合、是否遵循最小意外原则,并给出改进建议: 【粘贴方案】
一份结构化评审意见,指出设计中的耦合、复杂度来源与可改进方向。
我正在设计一个命令行工具,请依据 Unix/Linux 哲学,判断它是否应该拆成多个小工具、是否适合通过文本流组合、哪些参数应改为约定优于配置,并给出重构建议: 【粘贴工具说明】
一组面向 CLI 设计的重构建议,包括拆分方式、输入输出约定和参数简化方案。
这里有两种系统架构方案,请从 Unix/Linux 设计哲学角度进行对比,分析哪一种在简单性、可维护性、可组合性和关注点分离上更优,并说明取舍理由: 【方案 A】 【方案 B】
一份对比分析,明确推荐方案,并给出基于设计哲学的判断依据。
The Unix philosophy as a thinking tool for modern system design.
The deepest principle in Unix. The kernel provides mechanisms (process scheduling, file descriptors, memory mapping). User-space provides policy (which processes run, what files mean, how memory is used). The kernel doesn't have opinions about your workflow. It gives you the tools to build any workflow.
The litmus test: Could two reasonable users want different behavior here? If yes, you're looking at policy — don't hardcode it. Provide a mechanism and let the caller decide.
How this applies broadly:
Design evaluation questions:
The failure mode: Over-separating mechanism from policy creates systems that are infinitely flexible and impossible to use out of the box. X11 separated mechanism from policy so aggressively that every desktop environment had to reinvent window management from scratch. The mechanism layer should be opinionated enough to be useful — just not so opinionated that it precludes valid alternatives.
The most cited and most misunderstood Unix principle. grep searches. sort sorts. uniq deduplicates. Each does one thing, does it thoroughly, and handles edge cases within its domain. The key word is well, not small.
What this actually means:
A component should have a clear responsibility boundary. Everything inside that boundary, it handles completely. Everything outside, it delegates. grep doesn't sort its output because sorting is outside its boundary. But grep handles binary files, compressed input, recursive directories, regex dialects, and colorized output — because those are all within "searching text."
How microservices got this wrong: "Do one thing" was interpreted as "be small." Teams created services so thin they couldn't do anything useful alone. A "user service" that only stores user records but can't validate an email address. A "notification service" that can't template a message. The result: every operation requires orchestrating five services, and the real logic lives in the orchestration layer — which is now doing everything and doing it badly.
The real principle: Draw clear responsibility boundaries. A component owns a coherent piece of functionality, not a minimal piece. The question isn't "Is this small enough?" but "If I need to change how X works, do I change exactly one component?"
Design evaluation questions:
…
帮助设计可离线运行的边缘系统,处理同步、冲突恢复与弱网故障场景。
帮助设计与评估企业系统集成方案,覆盖遗留改造、网关、事件与失效模式。
用于按七步法系统审查架构设计,识别风险、权衡并产出改进建议。
帮助用户设计或评估基于 Azure 的系统架构与运维方案
帮助设计与评估数据管道架构,覆盖批流处理、调度、质量与故障策略。
帮助设计和评估多租户SaaS的平台隔离、计量计费与稳定性方案