记录代理执行中的决策依据,并在代理交接时传递结构化上下文。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "reasoning" 技能: 1. 下载 https://raw.githubusercontent.com/microsoft/devsquad-copilot/main/.github/plugins/devsquad/skills/reasoning/SKILL.md 2. 保存为 ~/.claude/skills/reasoning/SKILL.md 3. 装好后重载技能,告诉我可以用了
请为当前 SDD 代理执行过程整理一份 Reasoning Log,记录已做出的关键决策、每项决策的理由、被放弃的备选方案,以及下一步待确认事项。请用结构化列表输出。
一份结构化决策日志,清楚列出决策、依据、备选方案和待办事项。
请生成一个 handoff envelope,把当前代理的目标、已完成工作、关键决策、约束条件、未解决问题和建议下一步整理好,方便交给下一个代理继续执行。
一个可直接交接的结构化上下文包,帮助下一个代理快速接手任务。
下面是代理执行中的结论列表,请补充每条结论背后的判断依据、依赖信息和风险说明,并整理成标准 Reasoning Log: 1. 优先实现 API 接口 2. 暂不处理边缘异常 3. 将测试延后到下一阶段
补全后的标准化推理日志,使每项结论都有清晰依据和风险说明。
Guidelines for making SDD agent reasoning auditable and traceable.
Two complementary mechanisms:
Upon completing execution and before creating artifacts, present the user with a summary of decisions made.
## 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]
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:
coding-guidelines.md or ADRs) take priority over generic industry principles.| 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 |
When performing a handoff to another agent, include a structured context block along with the handoff prompt.
### 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]
…
帮助你创建、切换并检查代码分支,确保实现前遵循正确分支策略。
用于按九阶段方法系统化推进架构设计、权衡取舍与迁移规划。