AGENT SKILL

SDD 决策记录与交接

reasoning

在 SDD 智能体执行过程中记录决策及其依据,并通过交接信封(handoff envelope)在智能体之间传递结构化上下文。当智能体需要记录已做出的决策(推理日志 Reasoning Log)或向另一个智能体交接时使用。不要用于架构文档(使用 ADR)、复杂度分析(使用 complexity-analysis)或调试日志。

License 许可
MIT
最近更新
2026-11-14
Stars
★ 50
Forks
12

01 前言 Front Matter

name
reasoning
description
Record decisions and justifications during SDD agent execution, and pass structured context between agents via handoff envelope. Use when an agent needs to document decisions made (Reasoning Log) or perform a handoff to another agent. Do not use for architecture documentation (use ADRs), complexity analysis (use complexity-analysis), or debug logs.

02 资源文件 9

03 SKILL.md 正文

Reasoning Explainability

Guidelines for making SDD agent reasoning auditable and traceable.

Two complementary mechanisms:

  1. Reasoning Log: Structured record of decisions made by an agent during its execution.
  2. Handoff Envelope: Structured context passed from one agent to another during handoff.

Reasoning Log

Upon completing execution and before creating artifacts, present the user with a summary of decisions made.

Reasoning Log Format

## Reasoning

### Decisions

| # | Decision | Applied principle | Alternatives considered | Justification | Confidence |
|---|----------|-------------------|------------------------|---------------|------------|
| 1 | [what was decided] | [principle or heuristic that guided the choice] | [discarded options] | [why this choice] | [High/Medium/Low] |

### Assumptions

- [assumption made and basis for it]

### Missing information

- [data that was missing and how it impacts the decisions above]

"Applied principle" column

Connects each decision to the reusable foundation that guided it. The goal is to make engineering judgment visible — not just what was decided, but what reasoning pattern was used.

Examples of principles:

Type Example
Design "Separation of concerns", "Fail-fast", "Idempotency"
Trade-off "Latency vs consistency", "Simplicity vs extensibility"
Operational "Observability in production", "Graceful degradation"
Security "Principle of least privilege", "Defense in depth"
Pragmatic "YAGNI", "Rule of 3 uses before abstracting"

Rules:

  • Fill in only when the principle is not obvious from the justification. If the justification already contains the rationale, use "—".
  • Use direct language, not academic jargon. "Fail-fast to detect errors early" is better than "Application of the rapid failure principle per the defensive paradigm".
  • Project principles (defined in coding-guidelines.md or ADRs) take priority over generic industry principles.

Confidence Levels

Level Criterion Expectation
High Based on explicit requirement, concrete data, or validated decision (accepted ADR, approved spec) Does not require additional validation
Medium Inferred from existing context (envisioning, project patterns) without explicit validation Validate with stakeholder before depending on this decision
Low Reasonable assumption without direct evidence; industry standard applied due to lack of information Requires validation before proceeding; mark what is needed to raise confidence

Reasoning Log Rules

  • Trivial decisions (formatting, already established conventions) do not need to be recorded.
  • For Medium or Low confidence, include what is needed to raise the level.
  • If there were no significant decisions, omit the section (do not force reasoning where none exists).
  • Keep it concise: 3-8 decisions per execution is expected. If there are more, group related decisions.

Handoff Envelope

When performing a handoff to another agent, include a structured context block along with the handoff prompt.

Handoff Envelope Format

### Handoff Context

**Relevant artifacts**: [list of files the next agent should read]
**Inherited assumptions**:
- [assumption the upstream agent made that influences the downstream]

**Pending decisions** (for the next agent to resolve):
- [decision that was left open and why]

**Discarded information**:
- [context or alternative that was considered and discarded, with reason]

Handoff Envelope Rules

  • Include only information that impacts the next agent's work. Do not repeat what is already in the artifacts.
  • If there are no inherited assumptions or pending decisions, omit those subsections.
  • The envelope complements (does not replace) the user's original input.

Application by Agent Type

Agents that produce persistent artifacts

devsquad.envision, devsquad.kickoff, devsquad.specify, devsquad.plan, devsquad.decompose, devsquad.implement, devsquad.security

  • Present Reasoning Log before creating/saving artifacts.
  • The user can question decisions before they become artifacts.

Analysis agents (read-only)

devsquad.sprint, devsquad.refine

  • Integrate reasoning inline in the analysis (e.g., "Classified as 'Not ready' because [evidence]").
  • Do not use a separate section; the reasoning is the output itself.

Conductor

devsquad

  • When the intent is not obvious (multiple agents could handle it), briefly document the rationale:

    Interpreted "[input]" as [intent] because [reason].
    Delegating to [agent].
    
  • When the intent is clear, do not add overhead — delegate directly.

04 同仓库更多 Skills

microsoft
microsoft/devsquad-copilot

工作项实施流程

work-item-workflow

用于实施的工作项工作流。当开始在 GitHub issue 或 Azure DevOps 工作项上工作时使用,用于核实负责人、依赖关系、优先级和产能。不适用于创建新工作项(使用 work-item-creation)、建议下一个任务(使用 next-task),或工作来源仅为 tasks.md 而没有 issue/工作项的情况。

软件开发工程师工单与问题跟踪管理
★ 50
microsoft
microsoft/devsquad-copilot

工作项创建规范

work-item-creation

在 GitHub Issues 或 Azure DevOps 上创建工作项的规则与清单。当需要在看板上创建 issue、用户故事、任务、epic 或功能时使用。不适用于平台配置(使用 board-config)、管理现有任务的工作流(使用 work-item-workflow),或对工作项的评论。

软件开发工程师工单与问题跟踪管理
★ 50
microsoft
microsoft/devsquad-copilot

Issue与工单分诊

triage-workflow

用于分诊 issue 和工作项的基于标签的状态机。管理状态转换、生成持久的分诊工件,并支持可恢复的会话。用于分诊 GitHub issue 或 Azure DevOps 工作项。不用于从零开始创建新工作项(使用 work-item-creation),也不用于管理已分诊项的实现工作流(使用 work-item-workflow)。

项目经理工单与问题跟踪管理
★ 50
microsoft
microsoft/devsquad-copilot

行为聚焦测试规范

test-discipline

用于行为聚焦、抗重构测试的测试实践。在实现功能、修复缺陷、重构或添加/审查测试时使用,以确保测试通过公共接口验证意图,并避免同义反复的断言。也用于在修复缺陷后添加回归测试。实现 agent 在编码时参考此技能,审查 agent 在验证测试质量时参考。不用于测试策略决策(使用 complexity-analysis)、不用于失败分诊和根因分析(使用 debugging-recovery;根因定位后,可使用 test-discipline 添加复现问题的回归测试并修复),也不用于集成测试基础设施搭建。

测试工程师测试与质量保障
★ 50
microsoft
microsoft/devsquad-copilot

代码与架构安全审查

security-review

安全评估工作流,包含两种模式:架构(设计)模式和代码(实现)模式。当在规划阶段检测到安全触发条件(架构模式),或在实现/审查阶段(代码模式)时使用。涵盖 STRIDE、OWASP、依赖扫描、Azure 合规和 GitHub 安全告警。不用于一般代码质量检查(使用 devsquad.review),不用于作为独立活动的威胁建模,也不用于合规审计。

安全工程师安全检测工程
★ 50
microsoft
microsoft/devsquad-copilot

SDD 质量门禁

quality-gate

针对 SDD 制品(规格说明、ADR、任务、代码)的质量门禁。在生成或更新规格说明、ADR、任务分解或代码实现时使用,以便在交付给用户前验证质量。不要用于代码检查(linting)、代码格式化、人工代码审查,或标记为 draft/WIP 的中间制品验证。

软件开发工程师测试与质量保障
★ 50