skills/design-solution/SKILL.md
--- name: design-solution description: Produce a validated design document from requirements (architecture, components, data flow, trade-offs) with no implementation. Use when requirements are clear and you need a single source of truth for downstream task breakdown. description_zh: 从需求产出验证过的设计文档(架构、组件、数据流、权衡);不含实现;用于下游任务拆解。 tags: [writing, documentation] version: 3.0.0 license: MIT recommended_scope: both metadata: author: ai-cortex evolution: sources: - name: "design-solution"
npx skillsauth add nesnilnehc/ai-cortex skills/design-solutionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
将已验证需求转化为单一的、免实施的设计文档。该设计描述了架构、组件、数据流和权衡,以便下游技能(例如“分解任务”)可以毫无歧义地导出可执行任务列表。
首要目标:根据需求制作一份已验证的设计文档,作为实施规划的唯一事实来源;没有生成任何代码或实现步骤。
成功标准(必须满足所有要求):
验收测试:有人可以单独使用这个设计文档来生成完整的、有序的任务列表(例如通过“breakdown-tasks”)而不提出澄清问题吗?
本技能负责:
本技能不负责:
转交点:当设计被批准并坚持时,将其移交给breakdown-tasks来生成tasks.md(或同等文件)。
DO NOT write code, scaffold projects, or produce implementation steps.
Output is design documentation only. Implementation is downstream (e.g. breakdown-tasks then execution).
按 specs/artifact-contract.md §8 Runtime Norms Resolution Protocol 实现:
design artifact_type 的 path_pattern(默认:docs/designs/{slug}.md;项目可覆盖为聚合式如 work/{parent_slug}/design.md)upstream_ref(应指向上游 requirement 文档):在产出制品的 frontmatter emit parent: <upstream_ref>docs/ARTIFACT_NORMS.md(项目覆盖);默认后备是每个 specs/artifact-contract.md 的 docs/design-decisions/YYYY-MM-DD-<topic>.md。artifact_type: 设计、created_by: 设计解决方案、lifecycle: snapshot、created_at)。|角色 |内容 | | :--- | :--- | | 输入 |需求文档(路径或内容);可选的项目背景、现有设计或 ADR | | 输出 |设计文档位于“docs/design-decisions/YYYY-MM-DD-<topic>.md”(或每个“docs/ARTIFACT_NORMS.md”的项目路径);实施和任务分解的单一事实来源|
不要做这些(其他技能可以处理它们):
分解任务调用:“我们在 docs/requirements-planning/core-v1.md 中有需求。为其制作一个设计文档。”
代理:使用设计解决方案;读取需求;提出 2-3 个架构选项并进行权衡;将设计写入 docs/design-decisions/YYYY-MM-DD-core-v1.md;获得用户认可;建议在该设计上运行分解任务来获取tasks.md。
调用:“对小型 CLI 工具的要求已在 docs/requirements-planning/one-off-migration.md 中捕获。我们还需要完整的设计文档吗?”
代理人:
本技能产出 Validated Design Document:
| 元素 | 格式 | 必填字段 | 路径模式 | | :--- | :--- | :--- | :--- | | 文档主体 | Markdown | front-matter(artifact_type=design / created_by=design-solution / lifecycle=snapshot / created_at;upstream_ref 提供时含 parent);章节:目标 / 架构 / 组件 / 数据流 / 错误处理 / 测试策略 / 权衡 / 验收标准 | norms-resolved 路径(默认 docs/designs/<slug>.md) | | 替代方案 | 表格 | option_name / pros / cons / best_for;至少 2-3 个 | 「权衡」节 | | 验收标准 | 列表项 | 可追溯到需求条目 id;可观察、可测试 | 「验收标准」节 |
development
Generate an LLM agent test suite (golden cases, mock-LLM unit tests, evaluator harness) from an agent implementation and its agent-test contract. Use when an agent has no tests, or a contract exists but the test code is missing.
development
After code changes, auto-detect the project's build system and local deployment method for a given directory, then build the project and restart its locally-deployed environment (Docker Compose / systemd / process manager). Never assumes — asks only when detection is ambiguous. Caches detected commands per project in .cortex/redeploy-local.yaml; re-invocations on the same project skip re-scanning until signal files change, the cache expires (30 days), or the skill version bumps.
tools
Publish a NATS message conforming to a cross-team contract, using NATS MCP tools. Authors the contract on first use if missing. Reads project-level cache (.cortex/nats.yaml) to avoid re-prompting basics across sessions.
tools
Drain pending NATS messages from a producer contract via NATS MCP tools (default batch / drain-style). Applies Tolerant Reader semantics and per-message ack/nak/term, returning aggregated stats. Reads project-level cache (.cortex/nats.yaml) to avoid re-prompting.