@zmice/zc 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +430 -430
- package/dist/cli/__tests__/platform.test.js +112 -89
- package/dist/cli/__tests__/platform.test.js.map +1 -1
- package/dist/cli/__tests__/surface.test.js +1 -1
- package/dist/cli/__tests__/surface.test.js.map +1 -1
- package/dist/cli/platform.d.ts.map +1 -1
- package/dist/cli/platform.js +62 -5
- package/dist/cli/platform.js.map +1 -1
- package/dist/cli/setup.d.ts +3 -0
- package/dist/cli/setup.d.ts.map +1 -0
- package/dist/cli/setup.js +41 -0
- package/dist/cli/setup.js.map +1 -0
- package/dist/node_modules/@zmice/platform-core/dist/index.test.js +5 -3
- package/dist/node_modules/@zmice/platform-core/dist/index.test.js.map +1 -1
- package/dist/runtime/worktree-manager.js +2 -2
- package/dist/runtime/worktree-manager.js.map +1 -1
- package/dist/utils/codex-config-merge.d.ts +3 -0
- package/dist/utils/codex-config-merge.d.ts.map +1 -0
- package/dist/utils/codex-config-merge.js +43 -0
- package/dist/utils/codex-config-merge.js.map +1 -0
- package/dist/utils/codex-config-merge.test.d.ts +2 -0
- package/dist/utils/codex-config-merge.test.d.ts.map +1 -0
- package/dist/utils/codex-config-merge.test.js +64 -0
- package/dist/utils/codex-config-merge.test.js.map +1 -0
- package/dist/utils/install-target.test.js +3 -2
- package/dist/utils/install-target.test.js.map +1 -1
- package/dist/utils/qwen-extension-cli.d.ts.map +1 -1
- package/dist/utils/qwen-extension-cli.js +4 -4
- package/dist/utils/qwen-extension-cli.js.map +1 -1
- package/dist/utils/qwen-extension-cli.test.js +9 -6
- package/dist/utils/qwen-extension-cli.test.js.map +1 -1
- package/dist/utils/workspace.js +1 -1
- package/dist/utils/workspace.js.map +1 -1
- package/dist/utils/workspace.test.js +14 -0
- package/dist/utils/workspace.test.js.map +1 -1
- package/package.json +2 -2
- package/vendor/node_modules/@zmice/platform-core/dist/index.test.js +5 -3
- package/vendor/node_modules/@zmice/platform-core/dist/index.test.js.map +1 -1
- package/vendor/packages/platform-claude/dist/index.js +75 -75
- package/vendor/packages/platform-claude/dist/index.test.js +11 -8
- package/vendor/packages/platform-claude/dist/index.test.js.map +1 -1
- package/vendor/packages/platform-codex/dist/index.js +194 -194
- package/vendor/packages/platform-codex/dist/index.test.js +16 -13
- package/vendor/packages/platform-codex/dist/index.test.js.map +1 -1
- package/vendor/packages/platform-opencode/dist/index.js +75 -75
- package/vendor/packages/platform-opencode/dist/index.test.js +19 -15
- package/vendor/packages/platform-opencode/dist/index.test.js.map +1 -1
- package/vendor/packages/platform-qwen/dist/index.js +75 -75
- package/vendor/packages/platform-qwen/dist/index.test.js +9 -7
- package/vendor/packages/platform-qwen/dist/index.test.js.map +1 -1
- package/vendor/packages/toolkit/src/content/agents/architect/body.md +42 -42
- package/vendor/packages/toolkit/src/content/agents/code-reviewer/body.md +41 -41
- package/vendor/packages/toolkit/src/content/agents/product-owner/body.md +40 -40
- package/vendor/packages/toolkit/src/content/commands/plan-review/body.md +31 -31
- package/vendor/packages/toolkit/src/content/commands/start/body.md +197 -197
- package/vendor/packages/toolkit/src/content/commands/start/meta.yaml +55 -55
- package/vendor/packages/toolkit/src/content/skills/branch-finish-and-cleanup/body.md +172 -172
- package/vendor/packages/toolkit/src/content/skills/browser-qa-testing/body.md +111 -111
- package/vendor/packages/toolkit/src/content/skills/ci-cd-and-automation/body.md +86 -86
- package/vendor/packages/toolkit/src/content/skills/code-review-and-quality/body.md +140 -140
- package/vendor/packages/toolkit/src/content/skills/code-simplification/body.md +80 -80
- package/vendor/packages/toolkit/src/content/skills/context-engineering/body.md +67 -67
- package/vendor/packages/toolkit/src/content/skills/continuous-learning/body.md +102 -102
- package/vendor/packages/toolkit/src/content/skills/multi-perspective-review/body.md +81 -81
- package/vendor/packages/toolkit/src/content/skills/parallel-agent-dispatch/body.md +113 -113
- package/vendor/packages/toolkit/src/content/skills/performance-optimization/body.md +75 -75
- package/vendor/packages/toolkit/src/content/skills/planning-and-task-breakdown/body.md +83 -83
- package/vendor/packages/toolkit/src/content/skills/sdd-tdd-workflow/body.md +95 -95
- package/vendor/packages/toolkit/src/content/skills/sprint-retrospective/body.md +99 -99
- package/vendor/packages/toolkit/src/content/skills/team-orchestration/body.md +126 -126
- package/vendor/packages/toolkit/src/content/skills/test-driven-development/body.md +78 -78
- package/vendor/packages/toolkit/src/content/skills/using-agent-skills/body.md +193 -193
- package/vendor/references/upstreams.yaml +94 -94
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
# 测试驱动开发
|
|
2
|
-
|
|
3
|
-
## 角色定位
|
|
4
|
-
|
|
5
|
-
先用测试定义期望行为,再写最小实现让测试通过。这个 skill 负责行为变更的证据闭环,不负责铺满测试理论或替代专项浏览器 QA。
|
|
6
|
-
|
|
7
|
-
## 何时使用
|
|
8
|
-
|
|
9
|
-
- 新增或修改可观察行为。
|
|
10
|
-
- 修复 bug,需要先复现再修复。
|
|
11
|
-
- 重构可能影响现有行为。
|
|
12
|
-
- 需要为边界条件、错误路径或兼容性补回归保护。
|
|
13
|
-
|
|
14
|
-
不适用:纯文档、纯静态内容、无行为影响的配置调整。浏览器体验改动需要再接 `browser-qa-testing`。
|
|
15
|
-
|
|
16
|
-
## 快速路径
|
|
17
|
-
|
|
18
|
-
1. 写清要证明的行为或 bug 症状。
|
|
19
|
-
2. 选择最小测试层级:unit / integration / E2E。
|
|
20
|
-
3. **RED**:先写一个会失败的测试,确认失败原因匹配目标。
|
|
21
|
-
4. **GREEN**:写最小实现,只让当前测试通过。
|
|
22
|
-
5. **REFACTOR**:在测试保持绿色的前提下简化实现。
|
|
23
|
-
6. 跑相关回归测试,确认没有破坏邻近行为。
|
|
24
|
-
7. 记录测试证据和仍未覆盖的风险。
|
|
25
|
-
|
|
26
|
-
## Bug 修复 Prove-It 模式
|
|
27
|
-
|
|
28
|
-
```text
|
|
29
|
-
Bug report -> Reproduction test fails -> Fix -> Reproduction test passes -> Regression suite passes
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
如果无法先写复现测试,必须说明原因,并给出替代证据,例如最小命令、日志、浏览器 transcript 或人工可复查步骤。
|
|
33
|
-
|
|
34
|
-
## 测试层级选择
|
|
35
|
-
|
|
36
|
-
| 层级 | 何时选 | 代价 |
|
|
37
|
-
|---|---|---|
|
|
38
|
-
| Unit | 纯逻辑、边界判断、数据转换 | 快,信心局部 |
|
|
39
|
-
| Integration | API、数据库、文件系统、模块边界 | 中等,能发现契约问题 |
|
|
40
|
-
| E2E / Browser | 用户关键路径、前端集成体验 | 慢,但最接近真实用户 |
|
|
41
|
-
|
|
42
|
-
默认从能证明目标的最低成本层级开始。不要为了形式写高层测试,也不要用过度 mock 让测试只证明实现细节。
|
|
43
|
-
|
|
44
|
-
## 测试质量门禁
|
|
45
|
-
|
|
46
|
-
- 测试名字描述行为,而不是实现细节。
|
|
47
|
-
- 断言结果状态,少断言内部调用顺序。
|
|
48
|
-
- 测试数据最小且可读,优先 DAMP 而不是过度 DRY。
|
|
49
|
-
- mock 只用于慢、不可控或有副作用的外部依赖。
|
|
50
|
-
- 每个测试失败时应指向一个清晰原因。
|
|
51
|
-
|
|
52
|
-
## 反模式
|
|
53
|
-
|
|
54
|
-
- 先写实现,再补一个永远会过的测试。
|
|
55
|
-
- 修改测试来迁就错误实现。
|
|
56
|
-
- 跳过失败测试继续加功能。
|
|
57
|
-
- 用快照覆盖大量不稳定 UI,导致 diff 不可审。
|
|
58
|
-
- 为了覆盖率写不验证业务行为的测试。
|
|
59
|
-
|
|
60
|
-
## 输出契约
|
|
61
|
-
|
|
62
|
-
```text
|
|
63
|
-
TDD evidence:
|
|
64
|
-
- Behavior:
|
|
65
|
-
- Test added/changed:
|
|
66
|
-
- Red result:
|
|
67
|
-
- Green result:
|
|
68
|
-
- Regression command:
|
|
69
|
-
- Remaining risk:
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
推荐结论使用:
|
|
73
|
-
|
|
74
|
-
```text
|
|
75
|
-
Recommendation: <继续实现 / 修复测试 / 补更高层验证 / 进入 review> because <测试证据、风险和被放弃替代方案>。
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
没有读过失败输出和通过输出,不要声明测试闭环成立。
|
|
1
|
+
# 测试驱动开发
|
|
2
|
+
|
|
3
|
+
## 角色定位
|
|
4
|
+
|
|
5
|
+
先用测试定义期望行为,再写最小实现让测试通过。这个 skill 负责行为变更的证据闭环,不负责铺满测试理论或替代专项浏览器 QA。
|
|
6
|
+
|
|
7
|
+
## 何时使用
|
|
8
|
+
|
|
9
|
+
- 新增或修改可观察行为。
|
|
10
|
+
- 修复 bug,需要先复现再修复。
|
|
11
|
+
- 重构可能影响现有行为。
|
|
12
|
+
- 需要为边界条件、错误路径或兼容性补回归保护。
|
|
13
|
+
|
|
14
|
+
不适用:纯文档、纯静态内容、无行为影响的配置调整。浏览器体验改动需要再接 `browser-qa-testing`。
|
|
15
|
+
|
|
16
|
+
## 快速路径
|
|
17
|
+
|
|
18
|
+
1. 写清要证明的行为或 bug 症状。
|
|
19
|
+
2. 选择最小测试层级:unit / integration / E2E。
|
|
20
|
+
3. **RED**:先写一个会失败的测试,确认失败原因匹配目标。
|
|
21
|
+
4. **GREEN**:写最小实现,只让当前测试通过。
|
|
22
|
+
5. **REFACTOR**:在测试保持绿色的前提下简化实现。
|
|
23
|
+
6. 跑相关回归测试,确认没有破坏邻近行为。
|
|
24
|
+
7. 记录测试证据和仍未覆盖的风险。
|
|
25
|
+
|
|
26
|
+
## Bug 修复 Prove-It 模式
|
|
27
|
+
|
|
28
|
+
```text
|
|
29
|
+
Bug report -> Reproduction test fails -> Fix -> Reproduction test passes -> Regression suite passes
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
如果无法先写复现测试,必须说明原因,并给出替代证据,例如最小命令、日志、浏览器 transcript 或人工可复查步骤。
|
|
33
|
+
|
|
34
|
+
## 测试层级选择
|
|
35
|
+
|
|
36
|
+
| 层级 | 何时选 | 代价 |
|
|
37
|
+
|---|---|---|
|
|
38
|
+
| Unit | 纯逻辑、边界判断、数据转换 | 快,信心局部 |
|
|
39
|
+
| Integration | API、数据库、文件系统、模块边界 | 中等,能发现契约问题 |
|
|
40
|
+
| E2E / Browser | 用户关键路径、前端集成体验 | 慢,但最接近真实用户 |
|
|
41
|
+
|
|
42
|
+
默认从能证明目标的最低成本层级开始。不要为了形式写高层测试,也不要用过度 mock 让测试只证明实现细节。
|
|
43
|
+
|
|
44
|
+
## 测试质量门禁
|
|
45
|
+
|
|
46
|
+
- 测试名字描述行为,而不是实现细节。
|
|
47
|
+
- 断言结果状态,少断言内部调用顺序。
|
|
48
|
+
- 测试数据最小且可读,优先 DAMP 而不是过度 DRY。
|
|
49
|
+
- mock 只用于慢、不可控或有副作用的外部依赖。
|
|
50
|
+
- 每个测试失败时应指向一个清晰原因。
|
|
51
|
+
|
|
52
|
+
## 反模式
|
|
53
|
+
|
|
54
|
+
- 先写实现,再补一个永远会过的测试。
|
|
55
|
+
- 修改测试来迁就错误实现。
|
|
56
|
+
- 跳过失败测试继续加功能。
|
|
57
|
+
- 用快照覆盖大量不稳定 UI,导致 diff 不可审。
|
|
58
|
+
- 为了覆盖率写不验证业务行为的测试。
|
|
59
|
+
|
|
60
|
+
## 输出契约
|
|
61
|
+
|
|
62
|
+
```text
|
|
63
|
+
TDD evidence:
|
|
64
|
+
- Behavior:
|
|
65
|
+
- Test added/changed:
|
|
66
|
+
- Red result:
|
|
67
|
+
- Green result:
|
|
68
|
+
- Regression command:
|
|
69
|
+
- Remaining risk:
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
推荐结论使用:
|
|
73
|
+
|
|
74
|
+
```text
|
|
75
|
+
Recommendation: <继续实现 / 修复测试 / 补更高层验证 / 进入 review> because <测试证据、风险和被放弃替代方案>。
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
没有读过失败输出和通过输出,不要声明测试闭环成立。
|
|
@@ -1,193 +1,193 @@
|
|
|
1
|
-
# Using Agent Skills
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
Agent Skills is a collection of engineering workflow skills organized by development phase. Each skill encodes a specific process that senior engineers follow. This meta-skill helps you discover and apply the right skill for your current task.
|
|
6
|
-
|
|
7
|
-
## Skill Discovery
|
|
8
|
-
|
|
9
|
-
When a task arrives, identify the development phase and apply the corresponding skill:
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
Task arrives
|
|
13
|
-
│
|
|
14
|
-
├── Vague idea/need refinement? ──→ idea-refine
|
|
15
|
-
├── New project/feature/change? ──→ spec-driven-development
|
|
16
|
-
├── Have a spec, need tasks? ──────→ planning-and-task-breakdown
|
|
17
|
-
├── Implementing code? ────────────→ incremental-implementation
|
|
18
|
-
│ ├── UI work? ─────────────────→ frontend-ui-engineering
|
|
19
|
-
│ ├── API work? ────────────────→ api-and-interface-design
|
|
20
|
-
│ ├── Need better context? ─────→ context-engineering
|
|
21
|
-
│ └── Need doc-verified code? ───→ source-driven-development
|
|
22
|
-
├── Writing/running tests? ────────→ test-driven-development
|
|
23
|
-
│ └── Browser-based? ───────────→ browser-testing-with-devtools
|
|
24
|
-
├── Something broke? ──────────────→ debugging-and-error-recovery
|
|
25
|
-
├── Reviewing code? ───────────────→ code-review-and-quality
|
|
26
|
-
│ ├── Security concerns? ───────→ security-and-hardening
|
|
27
|
-
│ └── Performance concerns? ────→ performance-optimization
|
|
28
|
-
├── Committing/branching? ─────────→ git-workflow-and-versioning
|
|
29
|
-
├── CI/CD pipeline work? ──────────→ ci-cd-and-automation
|
|
30
|
-
├── Writing docs/ADRs? ───────────→ documentation-and-adrs
|
|
31
|
-
└── Deploying/launching? ─────────→ shipping-and-launch
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## Routing Metadata and Context Loading
|
|
35
|
-
|
|
36
|
-
Skill discovery depends on short metadata before the full skill is loaded. Treat each
|
|
37
|
-
skill description as an activation contract:
|
|
38
|
-
|
|
39
|
-
- It must say what capability the skill provides.
|
|
40
|
-
- It must say when to activate it.
|
|
41
|
-
- It should include exclusions when a nearby skill would be a better fit.
|
|
42
|
-
- It should not summarize the entire workflow; the agent should read the full skill
|
|
43
|
-
only after the skill is selected.
|
|
44
|
-
|
|
45
|
-
Prefer on-demand skill loading over always-on context. Persistent files such as
|
|
46
|
-
`AGENTS.md`, `GEMINI.md`, `CLAUDE.md`, or platform rules should contain stable project
|
|
47
|
-
conventions and canonical routing only. Do not load every skill into every session;
|
|
48
|
-
that wastes context and makes phase-specific rules compete with each other.
|
|
49
|
-
|
|
50
|
-
When a platform has native skill discovery, use its native directory or metadata model.
|
|
51
|
-
When it does not, use agent-driven routing through the project entry file. Do not imply
|
|
52
|
-
native plugin or slash-command behavior that the platform does not actually support.
|
|
53
|
-
|
|
54
|
-
## Core Operating Behaviors
|
|
55
|
-
|
|
56
|
-
These behaviors apply at all times, across all skills. They are non-negotiable.
|
|
57
|
-
|
|
58
|
-
### 1. Surface Assumptions
|
|
59
|
-
|
|
60
|
-
Before implementing anything non-trivial, explicitly state your assumptions:
|
|
61
|
-
|
|
62
|
-
```
|
|
63
|
-
ASSUMPTIONS I'M MAKING:
|
|
64
|
-
1. [assumption about requirements]
|
|
65
|
-
2. [assumption about architecture]
|
|
66
|
-
3. [assumption about scope]
|
|
67
|
-
→ Correct me now or I'll proceed with these.
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Don't silently fill in ambiguous requirements. The most common failure mode is making wrong assumptions and running with them unchecked. Surface uncertainty early — it's cheaper than rework.
|
|
71
|
-
|
|
72
|
-
### 2. Manage Confusion Actively
|
|
73
|
-
|
|
74
|
-
When you encounter inconsistencies, conflicting requirements, or unclear specifications:
|
|
75
|
-
|
|
76
|
-
1. **STOP.** Do not proceed with a guess.
|
|
77
|
-
2. Name the specific confusion.
|
|
78
|
-
3. Present the tradeoff or ask the clarifying question.
|
|
79
|
-
4. Wait for resolution before continuing.
|
|
80
|
-
|
|
81
|
-
**Bad:** Silently picking one interpretation and hoping it's right.
|
|
82
|
-
**Good:** "I see X in the spec but Y in the existing code. Which takes precedence?"
|
|
83
|
-
|
|
84
|
-
### 3. Push Back When Warranted
|
|
85
|
-
|
|
86
|
-
You are not a yes-machine. When an approach has clear problems:
|
|
87
|
-
|
|
88
|
-
- Point out the issue directly
|
|
89
|
-
- Explain the concrete downside (quantify when possible — "this adds ~200ms latency" not "this might be slower")
|
|
90
|
-
- Propose an alternative
|
|
91
|
-
- Accept the human's decision if they override with full information
|
|
92
|
-
|
|
93
|
-
Sycophancy is a failure mode. "Of course!" followed by implementing a bad idea helps no one. Honest technical disagreement is more valuable than false agreement.
|
|
94
|
-
|
|
95
|
-
### 4. Enforce Simplicity
|
|
96
|
-
|
|
97
|
-
Your natural tendency is to overcomplicate. Actively resist it.
|
|
98
|
-
|
|
99
|
-
Before finishing any implementation, ask:
|
|
100
|
-
- Can this be done in fewer lines?
|
|
101
|
-
- Are these abstractions earning their complexity?
|
|
102
|
-
- Would a staff engineer look at this and say "why didn't you just..."?
|
|
103
|
-
|
|
104
|
-
If you build 1000 lines and 100 would suffice, you have failed. Prefer the boring, obvious solution. Cleverness is expensive.
|
|
105
|
-
|
|
106
|
-
### 5. Maintain Scope Discipline
|
|
107
|
-
|
|
108
|
-
Touch only what you're asked to touch.
|
|
109
|
-
|
|
110
|
-
Do NOT:
|
|
111
|
-
- Remove comments you don't understand
|
|
112
|
-
- "Clean up" code orthogonal to the task
|
|
113
|
-
- Refactor adjacent systems as a side effect
|
|
114
|
-
- Delete code that seems unused without explicit approval
|
|
115
|
-
- Add features not in the spec because they "seem useful"
|
|
116
|
-
|
|
117
|
-
Your job is surgical precision, not unsolicited renovation.
|
|
118
|
-
|
|
119
|
-
### 6. Verify, Don't Assume
|
|
120
|
-
|
|
121
|
-
Every skill includes a verification step. A task is not complete until verification passes. "Seems right" is never sufficient — there must be evidence (passing tests, build output, runtime data).
|
|
122
|
-
|
|
123
|
-
## Failure Modes to Avoid
|
|
124
|
-
|
|
125
|
-
These are the subtle errors that look like productivity but create problems:
|
|
126
|
-
|
|
127
|
-
1. Making wrong assumptions without checking
|
|
128
|
-
2. Not managing your own confusion — plowing ahead when lost
|
|
129
|
-
3. Not surfacing inconsistencies you notice
|
|
130
|
-
4. Not presenting tradeoffs on non-obvious decisions
|
|
131
|
-
5. Being sycophantic ("Of course!") to approaches with clear problems
|
|
132
|
-
6. Overcomplicating code and APIs
|
|
133
|
-
7. Modifying code or comments orthogonal to the task
|
|
134
|
-
8. Removing things you don't fully understand
|
|
135
|
-
9. Building without a spec because "it's obvious"
|
|
136
|
-
10. Skipping verification because "it looks right"
|
|
137
|
-
|
|
138
|
-
## Skill Rules
|
|
139
|
-
|
|
140
|
-
1. **Check for an applicable skill before starting work.** Skills encode processes that prevent common mistakes.
|
|
141
|
-
|
|
142
|
-
2. **Skills are workflows, not suggestions.** Follow the steps in order. Don't skip verification steps.
|
|
143
|
-
|
|
144
|
-
3. **Load only the skills needed for the current phase.** If a task moves from planning to implementation, switch skills instead of carrying the entire planning context forward.
|
|
145
|
-
|
|
146
|
-
4. **Multiple skills can apply in sequence.** A feature implementation might involve `idea-refine` → `spec-driven-development` → `planning-and-task-breakdown` → `incremental-implementation` → `test-driven-development` → `code-review-and-quality` → `shipping-and-launch`.
|
|
147
|
-
|
|
148
|
-
5. **When in doubt, start with a spec.** If the task is non-trivial and there's no spec, begin with `spec-driven-development`.
|
|
149
|
-
|
|
150
|
-
6. **Ask only when it changes the route.** If the correct skill can be inferred from evidence, select it and state the assumption. Ask only for high-stakes ambiguity, conflicting goals, or missing context that would change the workflow.
|
|
151
|
-
|
|
152
|
-
## Lifecycle Sequence
|
|
153
|
-
|
|
154
|
-
For a complete feature, the typical skill sequence is:
|
|
155
|
-
|
|
156
|
-
```
|
|
157
|
-
1. idea-refine → Refine vague ideas
|
|
158
|
-
2. spec-driven-development → Define what we're building
|
|
159
|
-
3. planning-and-task-breakdown → Break into verifiable chunks
|
|
160
|
-
4. context-engineering → Load the right context
|
|
161
|
-
5. source-driven-development → Verify against official docs
|
|
162
|
-
6. incremental-implementation → Build slice by slice
|
|
163
|
-
7. test-driven-development → Prove each slice works
|
|
164
|
-
8. code-review-and-quality → Review before merge
|
|
165
|
-
9. git-workflow-and-versioning → Clean commit history
|
|
166
|
-
10. documentation-and-adrs → Document decisions
|
|
167
|
-
11. shipping-and-launch → Deploy safely
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
Not every task needs every skill. A bug fix might only need: `debugging-and-error-recovery` → `test-driven-development` → `code-review-and-quality`.
|
|
171
|
-
|
|
172
|
-
## Quick Reference
|
|
173
|
-
|
|
174
|
-
| Phase | Skill | One-Line Summary |
|
|
175
|
-
|-------|-------|-----------------|
|
|
176
|
-
| Define | idea-refine | Refine ideas through structured divergent and convergent thinking |
|
|
177
|
-
| Define | spec-driven-development | Requirements and acceptance criteria before code |
|
|
178
|
-
| Plan | planning-and-task-breakdown | Decompose into small, verifiable tasks |
|
|
179
|
-
| Build | incremental-implementation | Thin vertical slices, test each before expanding |
|
|
180
|
-
| Build | source-driven-development | Verify against official docs before implementing |
|
|
181
|
-
| Build | context-engineering | Right context at the right time |
|
|
182
|
-
| Build | frontend-ui-engineering | Production-quality UI with accessibility |
|
|
183
|
-
| Build | api-and-interface-design | Stable interfaces with clear contracts |
|
|
184
|
-
| Verify | test-driven-development | Failing test first, then make it pass |
|
|
185
|
-
| Verify | browser-testing-with-devtools | Chrome DevTools MCP for runtime verification |
|
|
186
|
-
| Verify | debugging-and-error-recovery | Reproduce → localize → fix → guard |
|
|
187
|
-
| Review | code-review-and-quality | Five-axis review with quality gates |
|
|
188
|
-
| Review | security-and-hardening | OWASP prevention, input validation, least privilege |
|
|
189
|
-
| Review | performance-optimization | Measure first, optimize only what matters |
|
|
190
|
-
| Ship | git-workflow-and-versioning | Atomic commits, clean history |
|
|
191
|
-
| Ship | ci-cd-and-automation | Automated quality gates on every change |
|
|
192
|
-
| Ship | documentation-and-adrs | Document the why, not just the what |
|
|
193
|
-
| Ship | shipping-and-launch | Pre-launch checklist, monitoring, rollback plan |
|
|
1
|
+
# Using Agent Skills
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Agent Skills is a collection of engineering workflow skills organized by development phase. Each skill encodes a specific process that senior engineers follow. This meta-skill helps you discover and apply the right skill for your current task.
|
|
6
|
+
|
|
7
|
+
## Skill Discovery
|
|
8
|
+
|
|
9
|
+
When a task arrives, identify the development phase and apply the corresponding skill:
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
Task arrives
|
|
13
|
+
│
|
|
14
|
+
├── Vague idea/need refinement? ──→ idea-refine
|
|
15
|
+
├── New project/feature/change? ──→ spec-driven-development
|
|
16
|
+
├── Have a spec, need tasks? ──────→ planning-and-task-breakdown
|
|
17
|
+
├── Implementing code? ────────────→ incremental-implementation
|
|
18
|
+
│ ├── UI work? ─────────────────→ frontend-ui-engineering
|
|
19
|
+
│ ├── API work? ────────────────→ api-and-interface-design
|
|
20
|
+
│ ├── Need better context? ─────→ context-engineering
|
|
21
|
+
│ └── Need doc-verified code? ───→ source-driven-development
|
|
22
|
+
├── Writing/running tests? ────────→ test-driven-development
|
|
23
|
+
│ └── Browser-based? ───────────→ browser-testing-with-devtools
|
|
24
|
+
├── Something broke? ──────────────→ debugging-and-error-recovery
|
|
25
|
+
├── Reviewing code? ───────────────→ code-review-and-quality
|
|
26
|
+
│ ├── Security concerns? ───────→ security-and-hardening
|
|
27
|
+
│ └── Performance concerns? ────→ performance-optimization
|
|
28
|
+
├── Committing/branching? ─────────→ git-workflow-and-versioning
|
|
29
|
+
├── CI/CD pipeline work? ──────────→ ci-cd-and-automation
|
|
30
|
+
├── Writing docs/ADRs? ───────────→ documentation-and-adrs
|
|
31
|
+
└── Deploying/launching? ─────────→ shipping-and-launch
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Routing Metadata and Context Loading
|
|
35
|
+
|
|
36
|
+
Skill discovery depends on short metadata before the full skill is loaded. Treat each
|
|
37
|
+
skill description as an activation contract:
|
|
38
|
+
|
|
39
|
+
- It must say what capability the skill provides.
|
|
40
|
+
- It must say when to activate it.
|
|
41
|
+
- It should include exclusions when a nearby skill would be a better fit.
|
|
42
|
+
- It should not summarize the entire workflow; the agent should read the full skill
|
|
43
|
+
only after the skill is selected.
|
|
44
|
+
|
|
45
|
+
Prefer on-demand skill loading over always-on context. Persistent files such as
|
|
46
|
+
`AGENTS.md`, `GEMINI.md`, `CLAUDE.md`, or platform rules should contain stable project
|
|
47
|
+
conventions and canonical routing only. Do not load every skill into every session;
|
|
48
|
+
that wastes context and makes phase-specific rules compete with each other.
|
|
49
|
+
|
|
50
|
+
When a platform has native skill discovery, use its native directory or metadata model.
|
|
51
|
+
When it does not, use agent-driven routing through the project entry file. Do not imply
|
|
52
|
+
native plugin or slash-command behavior that the platform does not actually support.
|
|
53
|
+
|
|
54
|
+
## Core Operating Behaviors
|
|
55
|
+
|
|
56
|
+
These behaviors apply at all times, across all skills. They are non-negotiable.
|
|
57
|
+
|
|
58
|
+
### 1. Surface Assumptions
|
|
59
|
+
|
|
60
|
+
Before implementing anything non-trivial, explicitly state your assumptions:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
ASSUMPTIONS I'M MAKING:
|
|
64
|
+
1. [assumption about requirements]
|
|
65
|
+
2. [assumption about architecture]
|
|
66
|
+
3. [assumption about scope]
|
|
67
|
+
→ Correct me now or I'll proceed with these.
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Don't silently fill in ambiguous requirements. The most common failure mode is making wrong assumptions and running with them unchecked. Surface uncertainty early — it's cheaper than rework.
|
|
71
|
+
|
|
72
|
+
### 2. Manage Confusion Actively
|
|
73
|
+
|
|
74
|
+
When you encounter inconsistencies, conflicting requirements, or unclear specifications:
|
|
75
|
+
|
|
76
|
+
1. **STOP.** Do not proceed with a guess.
|
|
77
|
+
2. Name the specific confusion.
|
|
78
|
+
3. Present the tradeoff or ask the clarifying question.
|
|
79
|
+
4. Wait for resolution before continuing.
|
|
80
|
+
|
|
81
|
+
**Bad:** Silently picking one interpretation and hoping it's right.
|
|
82
|
+
**Good:** "I see X in the spec but Y in the existing code. Which takes precedence?"
|
|
83
|
+
|
|
84
|
+
### 3. Push Back When Warranted
|
|
85
|
+
|
|
86
|
+
You are not a yes-machine. When an approach has clear problems:
|
|
87
|
+
|
|
88
|
+
- Point out the issue directly
|
|
89
|
+
- Explain the concrete downside (quantify when possible — "this adds ~200ms latency" not "this might be slower")
|
|
90
|
+
- Propose an alternative
|
|
91
|
+
- Accept the human's decision if they override with full information
|
|
92
|
+
|
|
93
|
+
Sycophancy is a failure mode. "Of course!" followed by implementing a bad idea helps no one. Honest technical disagreement is more valuable than false agreement.
|
|
94
|
+
|
|
95
|
+
### 4. Enforce Simplicity
|
|
96
|
+
|
|
97
|
+
Your natural tendency is to overcomplicate. Actively resist it.
|
|
98
|
+
|
|
99
|
+
Before finishing any implementation, ask:
|
|
100
|
+
- Can this be done in fewer lines?
|
|
101
|
+
- Are these abstractions earning their complexity?
|
|
102
|
+
- Would a staff engineer look at this and say "why didn't you just..."?
|
|
103
|
+
|
|
104
|
+
If you build 1000 lines and 100 would suffice, you have failed. Prefer the boring, obvious solution. Cleverness is expensive.
|
|
105
|
+
|
|
106
|
+
### 5. Maintain Scope Discipline
|
|
107
|
+
|
|
108
|
+
Touch only what you're asked to touch.
|
|
109
|
+
|
|
110
|
+
Do NOT:
|
|
111
|
+
- Remove comments you don't understand
|
|
112
|
+
- "Clean up" code orthogonal to the task
|
|
113
|
+
- Refactor adjacent systems as a side effect
|
|
114
|
+
- Delete code that seems unused without explicit approval
|
|
115
|
+
- Add features not in the spec because they "seem useful"
|
|
116
|
+
|
|
117
|
+
Your job is surgical precision, not unsolicited renovation.
|
|
118
|
+
|
|
119
|
+
### 6. Verify, Don't Assume
|
|
120
|
+
|
|
121
|
+
Every skill includes a verification step. A task is not complete until verification passes. "Seems right" is never sufficient — there must be evidence (passing tests, build output, runtime data).
|
|
122
|
+
|
|
123
|
+
## Failure Modes to Avoid
|
|
124
|
+
|
|
125
|
+
These are the subtle errors that look like productivity but create problems:
|
|
126
|
+
|
|
127
|
+
1. Making wrong assumptions without checking
|
|
128
|
+
2. Not managing your own confusion — plowing ahead when lost
|
|
129
|
+
3. Not surfacing inconsistencies you notice
|
|
130
|
+
4. Not presenting tradeoffs on non-obvious decisions
|
|
131
|
+
5. Being sycophantic ("Of course!") to approaches with clear problems
|
|
132
|
+
6. Overcomplicating code and APIs
|
|
133
|
+
7. Modifying code or comments orthogonal to the task
|
|
134
|
+
8. Removing things you don't fully understand
|
|
135
|
+
9. Building without a spec because "it's obvious"
|
|
136
|
+
10. Skipping verification because "it looks right"
|
|
137
|
+
|
|
138
|
+
## Skill Rules
|
|
139
|
+
|
|
140
|
+
1. **Check for an applicable skill before starting work.** Skills encode processes that prevent common mistakes.
|
|
141
|
+
|
|
142
|
+
2. **Skills are workflows, not suggestions.** Follow the steps in order. Don't skip verification steps.
|
|
143
|
+
|
|
144
|
+
3. **Load only the skills needed for the current phase.** If a task moves from planning to implementation, switch skills instead of carrying the entire planning context forward.
|
|
145
|
+
|
|
146
|
+
4. **Multiple skills can apply in sequence.** A feature implementation might involve `idea-refine` → `spec-driven-development` → `planning-and-task-breakdown` → `incremental-implementation` → `test-driven-development` → `code-review-and-quality` → `shipping-and-launch`.
|
|
147
|
+
|
|
148
|
+
5. **When in doubt, start with a spec.** If the task is non-trivial and there's no spec, begin with `spec-driven-development`.
|
|
149
|
+
|
|
150
|
+
6. **Ask only when it changes the route.** If the correct skill can be inferred from evidence, select it and state the assumption. Ask only for high-stakes ambiguity, conflicting goals, or missing context that would change the workflow.
|
|
151
|
+
|
|
152
|
+
## Lifecycle Sequence
|
|
153
|
+
|
|
154
|
+
For a complete feature, the typical skill sequence is:
|
|
155
|
+
|
|
156
|
+
```
|
|
157
|
+
1. idea-refine → Refine vague ideas
|
|
158
|
+
2. spec-driven-development → Define what we're building
|
|
159
|
+
3. planning-and-task-breakdown → Break into verifiable chunks
|
|
160
|
+
4. context-engineering → Load the right context
|
|
161
|
+
5. source-driven-development → Verify against official docs
|
|
162
|
+
6. incremental-implementation → Build slice by slice
|
|
163
|
+
7. test-driven-development → Prove each slice works
|
|
164
|
+
8. code-review-and-quality → Review before merge
|
|
165
|
+
9. git-workflow-and-versioning → Clean commit history
|
|
166
|
+
10. documentation-and-adrs → Document decisions
|
|
167
|
+
11. shipping-and-launch → Deploy safely
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Not every task needs every skill. A bug fix might only need: `debugging-and-error-recovery` → `test-driven-development` → `code-review-and-quality`.
|
|
171
|
+
|
|
172
|
+
## Quick Reference
|
|
173
|
+
|
|
174
|
+
| Phase | Skill | One-Line Summary |
|
|
175
|
+
|-------|-------|-----------------|
|
|
176
|
+
| Define | idea-refine | Refine ideas through structured divergent and convergent thinking |
|
|
177
|
+
| Define | spec-driven-development | Requirements and acceptance criteria before code |
|
|
178
|
+
| Plan | planning-and-task-breakdown | Decompose into small, verifiable tasks |
|
|
179
|
+
| Build | incremental-implementation | Thin vertical slices, test each before expanding |
|
|
180
|
+
| Build | source-driven-development | Verify against official docs before implementing |
|
|
181
|
+
| Build | context-engineering | Right context at the right time |
|
|
182
|
+
| Build | frontend-ui-engineering | Production-quality UI with accessibility |
|
|
183
|
+
| Build | api-and-interface-design | Stable interfaces with clear contracts |
|
|
184
|
+
| Verify | test-driven-development | Failing test first, then make it pass |
|
|
185
|
+
| Verify | browser-testing-with-devtools | Chrome DevTools MCP for runtime verification |
|
|
186
|
+
| Verify | debugging-and-error-recovery | Reproduce → localize → fix → guard |
|
|
187
|
+
| Review | code-review-and-quality | Five-axis review with quality gates |
|
|
188
|
+
| Review | security-and-hardening | OWASP prevention, input validation, least privilege |
|
|
189
|
+
| Review | performance-optimization | Measure first, optimize only what matters |
|
|
190
|
+
| Ship | git-workflow-and-versioning | Atomic commits, clean history |
|
|
191
|
+
| Ship | ci-cd-and-automation | Automated quality gates on every change |
|
|
192
|
+
| Ship | documentation-and-adrs | Document the why, not just the what |
|
|
193
|
+
| Ship | shipping-and-launch | Pre-launch checklist, monitoring, rollback plan |
|