Skip to content

Commit f8e1d3f

Browse files
committed
Add failure-first design review
1 parent 30f8226 commit f8e1d3f

7 files changed

Lines changed: 14 additions & 6 deletions

File tree

.agents/skills/design/SKILL.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@ Read [references/user-facing-decision-cards.md](references/user-facing-decision-
2727
6. For affected production integration/call paths, interfaces/contracts, data structures/state, and data ownership/flow, obtain the user's confirmation or explicit delegation. Repository evidence constrains a proposal but does not replace that choice.
2828
7. For every affected architecture, data structure, or data flow, distinguish inspected current-state evidence from target proposals. Put target trees/flow trees and illustrative code under the recommended or alternative option that they describe. After selection, write only the selected artifacts into Design. Keep uniquely determined or reversible detail to the shortest wording that preserves the decision; give irreversible boundaries, contracts, ownership, and flow the required artifacts.
2929
8. After each resolution, update the selected final Design section. Do not preserve internal IDs, question history, discarded approaches, user-authorization state, or a duplicate execution record.
30+
9. After the selected architecture, integration, interfaces, data structures, and flow are coherent, run one evidence-grounded failure-first review before the Ready gate. Inspect the real project areas most likely to fail, choices likely to accumulate technical debt, contracts that must remain stable, internals that must remain replaceable, implementation principles needed to preserve the design, and tempting shortcuts that must be prohibited. For each material conclusion establish `project evidence -> causal failure mechanism -> consequence -> preventive design constraint`. Do not invent generic risks or create headings merely to complete a checklist. If prevention requires a non-unique choice, use one normal decision card; otherwise integrate only the selected constraint or guardrail into its relevant Design section. Do not retain the raw pre-mortem, rejected shortcuts, or resolved speculation.
3031

3132
Design decisions include architecture, components, production wiring, interfaces, data structures, state transitions, ownership, data flow, failure behavior, compatibility, and validation. Act may choose only mechanical execution order. Reject unrelated refactors and speculative requirements. For a visual question, follow [references/visual-companion.md](references/visual-companion.md) and obtain consent before starting it.
3233

3334
## Ready gate
3435

35-
Run the Design contract. Do not become Ready while a material decision is awaiting the user, a repository fact needed to evaluate a material decision is missing, or an implementation-shaping question remains. Do not fill gaps with assumptions.
36+
Run the Design contract. Do not become Ready while a material decision is awaiting the user, a repository fact needed to evaluate a material decision is missing, an implementation-shaping question remains, or a project-grounded failure/debt risk lacks a selected prevention. Do not fill gaps with assumptions.
3637

3738
When the gates pass:
3839

.agents/skills/design/assets/design.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66

77
<!-- State the problem, observable success criteria, included work, and non-goals. -->
88

9-
## Constraints
9+
## Constraints and Implementation Guardrails
10+
11+
<!-- Keep only applicable, project-evidence-backed constraints: contracts that must remain stable, internals that must remain replaceable, implementation principles, and prohibited shortcuts. State the failure mechanism when a guardrail would otherwise appear arbitrary. -->
1012

1113
## Selected Design
1214

.agents/skills/design/references/design-contract.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@ Keep:
66

77
- problem, success criteria, scope, non-goals, and constraints;
88
- the selected architecture, boundaries, components, integration path, interfaces, data structures, data flow, failure/compatibility behavior, and validation that actually apply;
9+
- project-evidence-backed implementation principles and prohibited shortcuts that materially protect the selected design, with a compact failure mechanism where the guardrail would otherwise appear arbitrary;
910
- required selected trees, flow trees, and illustrative code;
1011
- a compact rationale only where the selected choice would otherwise be surprising or hard to reverse.
1112

1213
For each new or materially changed component, make its boundary inspectable: purpose, consumers, owned data/state, dependency direction, stable contract, and which internals may change without breaking consumers. Scale each affected section to decision impact: write uniquely determined or reversible detail in the shortest sufficient form, while retaining required trees, flow trees, and illustrative code for architecture, data structures, and data flow.
1314

15+
Before readiness, review the coherent selected design from the failure side. Ground every material conclusion in the current project's production paths, ownership, lifecycle, compatibility, resource, migration, or other relevant evidence. Trace `evidence -> causal failure mechanism -> consequence -> prevention`; then keep only the prevention that shapes the final design. Do not preserve a generic risk checklist, speculative hazards, or rejected shortcuts.
16+
1417
Do not keep empty or `N/A` headings, internal IDs, question history, coverage/impact tables, raw research notes, authorization state, amendments, or discarded approaches. A rejected option belongs only in an ADR when its rejected rationale is durable context under the project's ADR rules.
1518

1619
## Readiness check
@@ -19,6 +22,7 @@ Design is ready for user review only when:
1922

2023
- it describes one coherent selected design with no implementation-shaping ambiguity;
2124
- every affected architecture, data structure, and data flow is inspectable through the required selected artifacts;
25+
- material project-grounded failure and debt risks have selected prevention, with stable contracts distinguished from deliberately replaceable internals;
2226
- success criteria and validation evidence are observable;
2327
- all headings carry final, relevant content; and
2428
- it contains no placeholder, contradictory statement, process ledger, or discarded option.

.claude-plugin/marketplace.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"name": "Redwarx008"
55
},
66
"description": "Agent Workflow Kit marketplace for Claude Code.",
7-
"version": "0.3.0+codex.20260715093430",
7+
"version": "0.3.0+codex.20260717050706",
88
"plugins": [
99
{
1010
"name": "agent-workflow-kit",
1111
"source": "./",
1212
"description": "A decision-complete Design, adaptive Act, and independent Review workflow for coding agents.",
13-
"version": "0.3.0+codex.20260715093430",
13+
"version": "0.3.0+codex.20260717050706",
1414
"author": {
1515
"name": "Redwarx008"
1616
}

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "agent-workflow-kit",
3-
"version": "0.3.0+codex.20260715093430",
3+
"version": "0.3.0+codex.20260717050706",
44
"description": "A decision-complete Design, adaptive Act, and independent Review workflow for coding agents.",
55
"author": {
66
"name": "Redwarx008",

.codex-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "agent-workflow-kit",
3-
"version": "0.3.0+codex.20260715093430",
3+
"version": "0.3.0+codex.20260717050706",
44
"description": "A decision-complete Design, adaptive Act, and independent Review workflow for coding agents.",
55
"author": {
66
"name": "Redwarx008",

docs/reference-lessons.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ Visual Companion 保留上游已加固的 session key、同源 WebSocket、路
2020

2121
- Review 必须读取共享工作区,不能因隔离而错过未提交实现。
2222
- 验证按任务类型选择,尤其不能用普通单元测试替代 GPU/视觉证据。
23+
- Design 在方案成形后执行一次基于项目证据的逆向失败审视:从真实调用链和所有权推导失败机制、技术债、稳定契约、可替换内部、实现原则与禁止捷径。最终 Design 只保留会约束实现的预防措施,不保存通用风险清单或推演过程。
2324
- 通用工作流应提供门禁和模板,但项目自己的领域规则、资源版本控制和用户明确要求始终优先。

0 commit comments

Comments
 (0)