@anionzo/skill 1.4.0 → 1.7.0
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/CONTRIBUTING.md +2 -1
- package/README.md +82 -24
- package/docs/design-brief.md +17 -13
- package/docs/knowledge-spec.md +1 -0
- package/i18n/CONTRIBUTING.vi.md +2 -1
- package/i18n/README.vi.md +82 -24
- package/i18n/design-brief.vi.md +17 -13
- package/i18n/knowledge-spec.vi.md +1 -0
- package/knowledge/global/skill-triggering-rules.md +3 -2
- package/package.json +1 -1
- package/scripts/install-opencode-skills +197 -35
- package/skills/brainstorming/SKILL.md +176 -13
- package/skills/brainstorming/meta.yaml +18 -10
- package/skills/code-review/SKILL.md +214 -19
- package/skills/code-review/meta.yaml +21 -9
- package/skills/commit/SKILL.md +187 -0
- package/skills/commit/examples.md +62 -0
- package/skills/commit/meta.yaml +29 -0
- package/skills/commit/references/output-template.md +14 -0
- package/skills/debug/SKILL.md +252 -0
- package/skills/debug/examples.md +83 -0
- package/skills/debug/meta.yaml +39 -0
- package/skills/debug/references/output-template.md +16 -0
- package/skills/docs-writer/SKILL.md +85 -10
- package/skills/docs-writer/meta.yaml +18 -13
- package/skills/extract/SKILL.md +201 -0
- package/skills/extract/examples.md +47 -0
- package/skills/extract/meta.yaml +33 -0
- package/skills/extract/references/output-template.md +24 -0
- package/skills/feature-delivery/SKILL.md +12 -5
- package/skills/feature-delivery/meta.yaml +6 -1
- package/skills/planning/SKILL.md +146 -17
- package/skills/planning/meta.yaml +19 -7
- package/skills/refactor-safe/SKILL.md +10 -7
- package/skills/research/SKILL.md +130 -0
- package/skills/research/examples.md +79 -0
- package/skills/research/meta.yaml +31 -0
- package/skills/research/references/output-template.md +23 -0
- package/skills/test-driven-development/SKILL.md +194 -0
- package/skills/test-driven-development/examples.md +77 -0
- package/skills/test-driven-development/meta.yaml +31 -0
- package/skills/test-driven-development/references/.gitkeep +0 -0
- package/skills/test-driven-development/references/output-template.md +31 -0
- package/skills/using-skills/SKILL.md +33 -17
- package/skills/using-skills/examples.md +20 -5
- package/skills/using-skills/meta.yaml +7 -4
- package/skills/verification-before-completion/SKILL.md +127 -13
- package/skills/verification-before-completion/meta.yaml +23 -14
- package/templates/SKILL.md +8 -1
- package/skills/bug-triage/SKILL.md +0 -47
- package/skills/bug-triage/examples.md +0 -68
- package/skills/bug-triage/meta.yaml +0 -25
- package/skills/bug-triage/references/output-template.md +0 -26
- package/skills/repo-onboarding/SKILL.md +0 -52
- package/skills/repo-onboarding/examples.md +0 -115
- package/skills/repo-onboarding/meta.yaml +0 -23
- package/skills/repo-onboarding/references/output-template.md +0 -24
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# Extract
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Extract reusable patterns, significant decisions, and failure learnings from completed work into documentation that compounds knowledge over time.
|
|
6
|
+
|
|
7
|
+
This skill exists to turn individual task outcomes into organizational memory — not just code patterns, but also the decisions and mistakes that are expensive to repeat.
|
|
8
|
+
|
|
9
|
+
It also covers session handoff when work is not yet complete: compress the active task state into the smallest high-signal baton pass so a new session can continue without rereading everything.
|
|
10
|
+
|
|
11
|
+
## When To Use
|
|
12
|
+
|
|
13
|
+
Load this skill when:
|
|
14
|
+
|
|
15
|
+
- a task or feature is complete and had notable learnings
|
|
16
|
+
- a debugging session revealed a pattern worth remembering
|
|
17
|
+
- a decision was made that future work should know about
|
|
18
|
+
- a mistake was made that should not be repeated
|
|
19
|
+
- the user says "extract learnings", "document what we learned", or "capture this pattern"
|
|
20
|
+
- the user asks "what did we do so far?" or "summarize where we are"
|
|
21
|
+
- work is being handed to another session or agent
|
|
22
|
+
- the current session is approaching its context limit
|
|
23
|
+
|
|
24
|
+
Skip this skill when work was routine with no surprises, novel patterns, or meaningful in-progress state to carry forward.
|
|
25
|
+
|
|
26
|
+
## Workflow
|
|
27
|
+
|
|
28
|
+
1. Identify the source of value:
|
|
29
|
+
- completed task or debugging session -> durable learning extraction
|
|
30
|
+
- unfinished task or near-full context -> session handoff
|
|
31
|
+
2. If extracting durable knowledge, analyze across three categories: patterns, decisions, and failures.
|
|
32
|
+
3. If preparing a handoff, compress the active task into: goal, done so far, current state, locked decisions, open risks, and next best action.
|
|
33
|
+
4. Check for existing documentation that should be updated (avoid duplicates).
|
|
34
|
+
5. Create or update the right artifact:
|
|
35
|
+
- durable knowledge documentation
|
|
36
|
+
- temporary handoff summary
|
|
37
|
+
6. Promote critical learnings that would save significant time if known in advance.
|
|
38
|
+
|
|
39
|
+
## Session Handoff Mode
|
|
40
|
+
|
|
41
|
+
When the task is not complete, create a high-signal baton pass for the next session.
|
|
42
|
+
|
|
43
|
+
Include:
|
|
44
|
+
|
|
45
|
+
- **Goal** — what is actively being worked on
|
|
46
|
+
- **Done So Far** — completed changes, validation, commits, and approved decisions
|
|
47
|
+
- **Current State** — what is verified, what is still in progress, and any dirty worktree notes
|
|
48
|
+
- **Locked Decisions** — decisions that should not be re-litigated unless the user reopens them
|
|
49
|
+
- **Open Questions / Risks** — blockers, uncertainty, or easy-to-miss constraints
|
|
50
|
+
- **Next Best Action** — the single clearest next step
|
|
51
|
+
- **Handoff Payload** — a compact 5-15 line summary for copy-paste into a new session
|
|
52
|
+
|
|
53
|
+
Compression rules:
|
|
54
|
+
|
|
55
|
+
- include only details that save meaningful time in the next session
|
|
56
|
+
- prefer concrete file paths, commands, commits, and verification state when relevant
|
|
57
|
+
- do not replay the whole conversation
|
|
58
|
+
- keep temporary task state separate from durable knowledge
|
|
59
|
+
|
|
60
|
+
## Three-Category Analysis
|
|
61
|
+
|
|
62
|
+
### Patterns
|
|
63
|
+
|
|
64
|
+
Reusable approaches worth standardizing:
|
|
65
|
+
|
|
66
|
+
- **Code patterns** — new utilities, abstractions, integration techniques
|
|
67
|
+
- **Architecture patterns** — structural decisions that worked
|
|
68
|
+
- **Process patterns** — workflow approaches that saved time
|
|
69
|
+
|
|
70
|
+
For each pattern, document:
|
|
71
|
+
- What it is
|
|
72
|
+
- When to use it
|
|
73
|
+
- A concrete example
|
|
74
|
+
- Where it was first used
|
|
75
|
+
|
|
76
|
+
### Decisions
|
|
77
|
+
|
|
78
|
+
Significant choices and their outcomes:
|
|
79
|
+
|
|
80
|
+
- **GOOD_CALL** — decisions that proved correct or saved time
|
|
81
|
+
- **BAD_CALL** — decisions that required rework
|
|
82
|
+
- **SURPRISE** — things that turned out differently than expected
|
|
83
|
+
- **TRADEOFF** — conscious choices where alternatives were considered
|
|
84
|
+
|
|
85
|
+
For each decision, document:
|
|
86
|
+
- What was chosen
|
|
87
|
+
- What was rejected
|
|
88
|
+
- How it played out
|
|
89
|
+
- Recommendation for future work
|
|
90
|
+
|
|
91
|
+
### Failures
|
|
92
|
+
|
|
93
|
+
Mistakes and wasted effort worth preventing:
|
|
94
|
+
|
|
95
|
+
- Bugs introduced and their root causes
|
|
96
|
+
- Wrong assumptions that required backtracking
|
|
97
|
+
- Missing prerequisites discovered mid-execution
|
|
98
|
+
- Test gaps that allowed regressions
|
|
99
|
+
|
|
100
|
+
For each failure, document:
|
|
101
|
+
- What went wrong
|
|
102
|
+
- Root cause (not just symptom)
|
|
103
|
+
- Time cost estimate
|
|
104
|
+
- How to prevent it
|
|
105
|
+
|
|
106
|
+
## Knowledge Document Template
|
|
107
|
+
|
|
108
|
+
```markdown
|
|
109
|
+
## Patterns
|
|
110
|
+
|
|
111
|
+
### [Pattern Name]
|
|
112
|
+
- **What:** [description]
|
|
113
|
+
- **When to use:** [applicable conditions]
|
|
114
|
+
- **Example:** [concrete code or workflow example]
|
|
115
|
+
- **Source:** [task or feature reference]
|
|
116
|
+
|
|
117
|
+
## Decisions
|
|
118
|
+
|
|
119
|
+
### [Decision]
|
|
120
|
+
- **Chose:** [what was chosen]
|
|
121
|
+
- **Over:** [what was rejected]
|
|
122
|
+
- **Tag:** GOOD_CALL / BAD_CALL / SURPRISE / TRADEOFF
|
|
123
|
+
- **Outcome:** [how it played out]
|
|
124
|
+
- **Recommendation:** [for future work]
|
|
125
|
+
|
|
126
|
+
## Failures
|
|
127
|
+
|
|
128
|
+
### [Failure]
|
|
129
|
+
- **What went wrong:** [description]
|
|
130
|
+
- **Root cause:** [not just symptom]
|
|
131
|
+
- **Time lost:** [estimate]
|
|
132
|
+
- **Prevention:** [what to do differently]
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Extraction Rules
|
|
136
|
+
|
|
137
|
+
- Extract patterns, decisions, AND failures — not just code patterns.
|
|
138
|
+
- Search for existing docs before creating new ones — update instead of duplicating.
|
|
139
|
+
- Link extracted knowledge back to its source.
|
|
140
|
+
- Only document genuinely reusable knowledge — do not fabricate findings.
|
|
141
|
+
- A short learning with 2 genuine entries is better than a long doc with invented ones.
|
|
142
|
+
|
|
143
|
+
## Critical Learning Promotion
|
|
144
|
+
|
|
145
|
+
For findings that meet ALL criteria:
|
|
146
|
+
- Affects more than one future feature
|
|
147
|
+
- Would cause 30+ minutes wasted effort if unknown
|
|
148
|
+
- Is generalizable, not implementation-specific
|
|
149
|
+
|
|
150
|
+
These should be marked as critical and placed where they will be seen at the start of future work sessions.
|
|
151
|
+
|
|
152
|
+
**Calibration:** Do NOT promote everything. If critical learnings grow past 20-30 entries, they become noise. Only promote learnings that would have saved 30+ minutes if known in advance.
|
|
153
|
+
|
|
154
|
+
## Output Format
|
|
155
|
+
|
|
156
|
+
Present results using the Shared Output Contract:
|
|
157
|
+
|
|
158
|
+
1. **Goal/Result** — what knowledge was extracted, updated, or intentionally not extracted
|
|
159
|
+
2. **Key Details:**
|
|
160
|
+
- what was extracted or handed off
|
|
161
|
+
- whether this was durable knowledge or temporary task state
|
|
162
|
+
- whether docs were created or updated
|
|
163
|
+
- whether critical learnings were promoted
|
|
164
|
+
- where the canonical knowledge now lives
|
|
165
|
+
3. **Next Action** — only when findings lead somewhere:
|
|
166
|
+
- extracted from completed task → `commit` if changes pending
|
|
167
|
+
- task is not complete but should continue later → name the primary next skill
|
|
168
|
+
- no clear handoff → stop after the result
|
|
169
|
+
|
|
170
|
+
## No-Op Case
|
|
171
|
+
|
|
172
|
+
If the work was too routine to generalize, say so explicitly and do not force a new document. Do NOT fabricate findings. If the task ran smoothly with no surprises, write that.
|
|
173
|
+
|
|
174
|
+
## Red Flags
|
|
175
|
+
|
|
176
|
+
- only extracting code patterns, ignoring decisions and failures
|
|
177
|
+
- replaying the full session instead of compressing it
|
|
178
|
+
- promoting everything as critical (noise kills the learning loop)
|
|
179
|
+
- writing generic learnings like "test more carefully" (worthless)
|
|
180
|
+
- fabricating findings when the task was straightforward
|
|
181
|
+
- not checking existing docs before creating duplicates
|
|
182
|
+
- extracting implementation-specific details that will never be reused
|
|
183
|
+
|
|
184
|
+
## Checklist
|
|
185
|
+
|
|
186
|
+
- [ ] Three categories analyzed (patterns, decisions, failures)
|
|
187
|
+
- [ ] Or handoff state compressed (goal, done, current state, risks, next action)
|
|
188
|
+
- [ ] Existing docs checked for duplicates
|
|
189
|
+
- [ ] Knowledge is genuinely generalizable
|
|
190
|
+
- [ ] Includes concrete examples (for patterns)
|
|
191
|
+
- [ ] Links back to source
|
|
192
|
+
- [ ] Critical learnings promoted (if applicable)
|
|
193
|
+
|
|
194
|
+
## Done Criteria
|
|
195
|
+
|
|
196
|
+
This skill is complete when either:
|
|
197
|
+
|
|
198
|
+
- the three-category analysis is done and any durable findings worth preserving are documented in the appropriate location, or
|
|
199
|
+
- the in-progress task has been compressed into a clear handoff that a new session can continue from without redoing expensive analysis.
|
|
200
|
+
|
|
201
|
+
If nothing worth extracting or handing off was found, an explicit "no-op" statement is the valid completion.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Examples
|
|
2
|
+
|
|
3
|
+
## Example 1
|
|
4
|
+
|
|
5
|
+
User request:
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
We just finished the auth refactor. Extract what we learned.
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Expected result:
|
|
12
|
+
|
|
13
|
+
- analyze the completed work across three categories
|
|
14
|
+
- document patterns, decisions, and failures
|
|
15
|
+
- promote critical learnings if applicable
|
|
16
|
+
|
|
17
|
+
Sample completed output:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
Goal/Result: Extracted 2 patterns, 1 decision, and 1 failure from the auth refactor.
|
|
21
|
+
|
|
22
|
+
Key Details:
|
|
23
|
+
Patterns:
|
|
24
|
+
1. Provider Registry Pattern — centralized auth provider registration
|
|
25
|
+
in src/auth/registry.ts. New providers implement AuthProvider
|
|
26
|
+
interface and register in one place. Reusable for any plugin system.
|
|
27
|
+
2. Token Rotation Pattern — refresh tokens are rotated on each use
|
|
28
|
+
(one-time use). Prevents replay attacks.
|
|
29
|
+
|
|
30
|
+
Decisions:
|
|
31
|
+
1. TRADEOFF: Chose passport.js over custom auth middleware.
|
|
32
|
+
- Pros: ecosystem support, community maintenance
|
|
33
|
+
- Cons: callback-heavy API, harder to test
|
|
34
|
+
- Outcome: Worked well for OAuth but added friction for custom flows
|
|
35
|
+
- Recommendation: Use passport for OAuth, custom middleware for API keys
|
|
36
|
+
|
|
37
|
+
Failures:
|
|
38
|
+
1. Assumed session store was thread-safe — it was not.
|
|
39
|
+
- Root cause: Redis client was shared without connection pooling
|
|
40
|
+
- Time lost: ~4 hours debugging intermittent auth failures
|
|
41
|
+
- Prevention: Always verify concurrent access patterns for shared state
|
|
42
|
+
|
|
43
|
+
Critical learning promoted: Redis connection pooling requirement.
|
|
44
|
+
(Would have saved 4+ hours if known in advance.)
|
|
45
|
+
|
|
46
|
+
Next Action: No follow-up needed — knowledge documented.
|
|
47
|
+
```
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: extract
|
|
2
|
+
version: 0.2.0
|
|
3
|
+
category: knowledge
|
|
4
|
+
summary: Extract durable learnings from completed work, or compress in-progress task state into a high-signal handoff for the next session.
|
|
5
|
+
summary_vi: "Trích xuất bài học bền vững từ công việc đã xong, hoặc nén trạng thái công việc đang dở thành handoff sắc gọn cho session tiếp theo."
|
|
6
|
+
triggers:
|
|
7
|
+
- extract learnings from this task
|
|
8
|
+
- document what we learned
|
|
9
|
+
- capture this pattern
|
|
10
|
+
- what did we learn
|
|
11
|
+
- what did we do so far
|
|
12
|
+
- summarize where we are
|
|
13
|
+
- prepare a handoff
|
|
14
|
+
- context is getting full
|
|
15
|
+
inputs:
|
|
16
|
+
- completed task, unfinished task, or feature
|
|
17
|
+
- code changes, debugging session, or current task state
|
|
18
|
+
outputs:
|
|
19
|
+
- patterns documented
|
|
20
|
+
- decisions recorded
|
|
21
|
+
- failures captured
|
|
22
|
+
- critical learnings promoted
|
|
23
|
+
- handoff payload for the next session
|
|
24
|
+
constraints:
|
|
25
|
+
- search existing docs before creating new ones
|
|
26
|
+
- do not fabricate findings
|
|
27
|
+
- use three-category analysis for durable knowledge
|
|
28
|
+
- compress instead of replaying the whole session for handoffs
|
|
29
|
+
related_skills:
|
|
30
|
+
- using-skills
|
|
31
|
+
- commit
|
|
32
|
+
- debug
|
|
33
|
+
- research
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
## Goal/Result
|
|
2
|
+
|
|
3
|
+
- Knowledge extracted:
|
|
4
|
+
|
|
5
|
+
## Key Details
|
|
6
|
+
|
|
7
|
+
### Patterns
|
|
8
|
+
- Pattern 1:
|
|
9
|
+
|
|
10
|
+
### Decisions
|
|
11
|
+
- Decision 1:
|
|
12
|
+
|
|
13
|
+
### Failures
|
|
14
|
+
- Failure 1:
|
|
15
|
+
|
|
16
|
+
### Critical Learnings Promoted
|
|
17
|
+
-
|
|
18
|
+
|
|
19
|
+
### Docs Created/Updated
|
|
20
|
+
-
|
|
21
|
+
|
|
22
|
+
## Next Action
|
|
23
|
+
|
|
24
|
+
- Recommended follow-up:
|
|
@@ -19,11 +19,16 @@ Load this skill when the user wants code changed to add or update behavior.
|
|
|
19
19
|
|
|
20
20
|
## Output Format
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
-
|
|
22
|
+
Present results using the Shared Output Contract:
|
|
23
|
+
|
|
24
|
+
1. **Goal/Result** — the feature implemented and its status
|
|
25
|
+
2. **Key Details:**
|
|
26
|
+
- goal and scope
|
|
27
|
+
- chosen approach
|
|
28
|
+
- files changed
|
|
29
|
+
- verification performed
|
|
30
|
+
- follow-up or risk note
|
|
31
|
+
3. **Next Action** — `verification-before-completion` to confirm, then `code-review` or `commit`; if pausing mid-task, use `extract` in handoff mode
|
|
27
32
|
|
|
28
33
|
## Red Flags
|
|
29
34
|
|
|
@@ -37,3 +42,5 @@ Load this skill when the user wants code changed to add or update behavior.
|
|
|
37
42
|
This skill is complete when the feature works as intended, the change is verified with the most relevant check available, and the outcome is summarized clearly.
|
|
38
43
|
|
|
39
44
|
Before declaring done, run `verification-before-completion` to confirm the claim is backed by fresh evidence.
|
|
45
|
+
|
|
46
|
+
If the task must pause before completion, use `extract` in handoff mode so the next session can resume without repeating the implementation analysis.
|
|
@@ -20,7 +20,12 @@ constraints:
|
|
|
20
20
|
- ask only one blocking question when necessary
|
|
21
21
|
related_skills:
|
|
22
22
|
- using-skills
|
|
23
|
+
- brainstorming
|
|
23
24
|
- planning
|
|
24
|
-
-
|
|
25
|
+
- research
|
|
26
|
+
- debug
|
|
25
27
|
- verification-before-completion
|
|
26
28
|
- code-review
|
|
29
|
+
- docs-writer
|
|
30
|
+
- extract
|
|
31
|
+
- test-driven-development
|
package/skills/planning/SKILL.md
CHANGED
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## Purpose
|
|
4
4
|
|
|
5
|
-
Produce an execution-ready plan before code changes begin.
|
|
5
|
+
Produce an execution-ready plan before code changes begin. Each step must be concrete enough that another engineer could execute it without inventing missing context.
|
|
6
6
|
|
|
7
7
|
This skill exists to make planning explicit, especially for multi-file or non-trivial work.
|
|
8
8
|
|
|
9
|
+
It also covers go mode when the user wants an approved spec or clear task executed end-to-end with minimal review gates.
|
|
10
|
+
|
|
9
11
|
## When To Use
|
|
10
12
|
|
|
11
13
|
Load this skill when:
|
|
@@ -15,38 +17,139 @@ Load this skill when:
|
|
|
15
17
|
- the change touches APIs, data flow, persistence, or architecture boundaries
|
|
16
18
|
- the user explicitly asks for a plan
|
|
17
19
|
- implementation risk is high enough that code should not start immediately
|
|
20
|
+
- the user says "run all", "go mode", "execute everything", or wants one continuous plan-to-commit flow
|
|
18
21
|
|
|
19
22
|
## Workflow
|
|
20
23
|
|
|
21
24
|
1. Restate the goal in user-visible terms.
|
|
22
|
-
2. Define the scope boundary
|
|
23
|
-
|
|
24
|
-
- what is out of scope
|
|
25
|
-
3. Inspect the existing code paths and patterns that the work should follow.
|
|
25
|
+
2. Define the scope boundary (in/out).
|
|
26
|
+
3. Inspect existing code paths and patterns the work should follow.
|
|
26
27
|
4. Choose the smallest viable approach that fits the repo.
|
|
27
|
-
5. Break the work into ordered steps.
|
|
28
|
+
5. Break the work into ordered, bite-sized steps.
|
|
28
29
|
6. Call out risks, assumptions, and missing decisions.
|
|
29
30
|
7. Define how the work will be verified.
|
|
30
|
-
8.
|
|
31
|
+
8. Run the pre-execution plan check.
|
|
32
|
+
9. Run the self-review.
|
|
33
|
+
10. Present for approval.
|
|
34
|
+
11. End with the next implementation skill to invoke.
|
|
35
|
+
|
|
36
|
+
## Go Mode
|
|
37
|
+
|
|
38
|
+
When the user wants an approved spec or clear task executed with minimal review gates, planning enters go mode:
|
|
39
|
+
|
|
40
|
+
1. Validate that requirements are clear enough to implement.
|
|
41
|
+
2. Break the work into ordered implementation tasks.
|
|
42
|
+
3. Map each task to acceptance criteria or explicit outcomes.
|
|
43
|
+
4. Plan and execute each task in dependency order.
|
|
44
|
+
5. Verify after each task.
|
|
45
|
+
6. Run full verification at the end.
|
|
46
|
+
7. Prepare a single commit proposal and ask the user before committing.
|
|
47
|
+
|
|
48
|
+
If the scope is too large for one context window, checkpoint progress and resume later rather than continuing blindly.
|
|
49
|
+
|
|
50
|
+
## Bite-Sized Task Granularity
|
|
51
|
+
|
|
52
|
+
Each step should be one action, completable in 2-5 minutes:
|
|
53
|
+
|
|
54
|
+
- "Write the failing test for X" — one step
|
|
55
|
+
- "Run the test, confirm it fails" — one step
|
|
56
|
+
- "Implement the minimal code to pass the test" — one step
|
|
57
|
+
- "Run the tests, confirm all pass" — one step
|
|
58
|
+
- "Commit" — one step
|
|
59
|
+
|
|
60
|
+
If a step requires reading more than 10 files or touching more than 5 files, split it.
|
|
61
|
+
|
|
62
|
+
If the total plan exceeds approximately 8 steps, consider splitting into subtasks.
|
|
63
|
+
|
|
64
|
+
## No Placeholders
|
|
65
|
+
|
|
66
|
+
Every step must contain the actual content an engineer needs. These are plan failures — never write them:
|
|
67
|
+
|
|
68
|
+
- "TBD", "TODO", "implement later", "fill in details"
|
|
69
|
+
- "Add appropriate error handling" / "add validation" / "handle edge cases"
|
|
70
|
+
- "Write tests for the above" (without describing which tests)
|
|
71
|
+
- "Similar to Step N" (repeat the specifics — the engineer may read steps out of order)
|
|
72
|
+
- Steps that describe what to do without showing which files and what changes
|
|
73
|
+
- References to types, functions, or methods not defined in any step
|
|
74
|
+
|
|
75
|
+
**Every step must name the files, modules, or surfaces that change.**
|
|
76
|
+
|
|
77
|
+
## Pre-Execution Plan Check
|
|
78
|
+
|
|
79
|
+
Before presenting the plan for approval, verify plan quality across four dimensions:
|
|
80
|
+
|
|
81
|
+
### AC Coverage
|
|
82
|
+
- Every requirement from the task should map to at least one plan step.
|
|
83
|
+
- Every plan step should contribute to at least one acceptance criterion.
|
|
84
|
+
- Flag any AC that no plan step addresses.
|
|
85
|
+
|
|
86
|
+
### Scope Sizing
|
|
87
|
+
- Each step should be completable in a single implementation session (2-5 min).
|
|
88
|
+
- Flag steps that are too large and recommend splitting.
|
|
89
|
+
|
|
90
|
+
### Dependency Check
|
|
91
|
+
- Steps should be in logical order (foundational first, dependent last).
|
|
92
|
+
- Flag circular dependencies between steps.
|
|
93
|
+
- Flag steps that assume undocumented context.
|
|
94
|
+
|
|
95
|
+
### Risk Assessment
|
|
96
|
+
- Steps involving new external dependencies — flag as higher risk.
|
|
97
|
+
- Steps touching core/shared modules — flag blast radius.
|
|
98
|
+
- Steps with no test coverage in the plan — flag.
|
|
99
|
+
|
|
100
|
+
**Report issues inline with the plan:**
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
Plan:
|
|
104
|
+
1. Write failing test for auth middleware
|
|
105
|
+
2. Implement auth middleware
|
|
106
|
+
3. Update existing routes
|
|
107
|
+
Plan check: AC-3 (rate limiting) not covered by any step
|
|
108
|
+
Plan check: Step 3 touches 7 files — consider splitting
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Fix issues before presenting for approval. If unfixable, surface them explicitly so the user can decide.
|
|
112
|
+
|
|
113
|
+
## Self-Review
|
|
114
|
+
|
|
115
|
+
After writing the complete plan, review it with fresh eyes:
|
|
116
|
+
|
|
117
|
+
1. **Requirement coverage:** Skim each requirement. Can you point to a step that implements it? List any gaps.
|
|
118
|
+
2. **Placeholder scan:** Search the plan for any of the patterns from the "No Placeholders" section. Fix them.
|
|
119
|
+
3. **Name consistency:** Do the types, method signatures, and property names used in later steps match what is defined in earlier steps?
|
|
120
|
+
4. **File path accuracy:** Are all file paths plausible given the project structure?
|
|
121
|
+
|
|
122
|
+
If you find issues, fix them inline before presenting the plan.
|
|
31
123
|
|
|
32
124
|
## Output Format
|
|
33
125
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
126
|
+
Present results using the Shared Output Contract:
|
|
127
|
+
|
|
128
|
+
1. **Goal/Result** — the plan and whether approval is pending
|
|
129
|
+
2. **Key Details:**
|
|
130
|
+
- scope (in/out)
|
|
131
|
+
- existing patterns or files to follow
|
|
132
|
+
- proposed approach
|
|
133
|
+
- ordered implementation steps (bite-sized, no placeholders)
|
|
134
|
+
- pre-execution check results (AC coverage, scope sizing, dependency, risk)
|
|
135
|
+
- self-review results
|
|
136
|
+
- risks and assumptions
|
|
137
|
+
- verification plan
|
|
138
|
+
3. **Next Action** — after approval:
|
|
139
|
+
- `feature-delivery` for implementation
|
|
140
|
+
- `test-driven-development` if TDD approach preferred
|
|
141
|
+
- `brainstorming` if requirements need more definition first
|
|
142
|
+
- if the user wants one continuous execution run: continue in go mode under `planning`
|
|
42
143
|
|
|
43
144
|
## Planning Rules
|
|
44
145
|
|
|
45
146
|
- Keep the plan concrete enough that another engineer could execute it.
|
|
46
147
|
- Prefer a small number of meaningful steps over a long task dump.
|
|
47
|
-
- Name the files, modules, or surfaces likely to change
|
|
148
|
+
- Name the files, modules, or surfaces likely to change in every step.
|
|
48
149
|
- Make uncertainty explicit instead of hiding it in vague language.
|
|
49
150
|
- Do not start coding inside the plan.
|
|
151
|
+
- Complete code in every step — if a step changes code, describe the change specifically.
|
|
152
|
+
- DRY, YAGNI — do not plan features that are not required.
|
|
50
153
|
|
|
51
154
|
## Red Flags
|
|
52
155
|
|
|
@@ -55,7 +158,33 @@ Load this skill when:
|
|
|
55
158
|
- turning the plan into a full design doc for a small change
|
|
56
159
|
- leaving verification unspecified
|
|
57
160
|
- mixing code edits into the planning phase
|
|
161
|
+
- skipping the pre-execution check
|
|
162
|
+
- presenting a plan where ACs are not covered by any step
|
|
163
|
+
- steps that say "add appropriate X" without specifying what X is
|
|
164
|
+
- steps referencing functions or types not defined in any previous step
|
|
165
|
+
|
|
166
|
+
## Checklist
|
|
167
|
+
|
|
168
|
+
- [ ] Goal restated in user-visible terms
|
|
169
|
+
- [ ] Scope boundary defined (in/out)
|
|
170
|
+
- [ ] Existing patterns inspected
|
|
171
|
+
- [ ] Approach chosen (smallest viable)
|
|
172
|
+
- [ ] Steps ordered, bite-sized (2-5 min each), with file paths
|
|
173
|
+
- [ ] No placeholders in any step
|
|
174
|
+
- [ ] Pre-execution check passed:
|
|
175
|
+
- [ ] AC coverage verified
|
|
176
|
+
- [ ] Scope sizing reasonable
|
|
177
|
+
- [ ] Dependencies ordered correctly
|
|
178
|
+
- [ ] Risks flagged
|
|
179
|
+
- [ ] Self-review passed:
|
|
180
|
+
- [ ] Requirement coverage
|
|
181
|
+
- [ ] Placeholder scan
|
|
182
|
+
- [ ] Name consistency
|
|
183
|
+
- [ ] File path accuracy
|
|
184
|
+
- [ ] Verification plan defined
|
|
185
|
+
- [ ] Plan presented for approval
|
|
186
|
+
- [ ] Next skill identified
|
|
58
187
|
|
|
59
188
|
## Done Criteria
|
|
60
189
|
|
|
61
|
-
This skill is complete when the implementation path, risks, and verification steps are clear enough to hand off to `feature-delivery`, `refactor-safe`, or to a
|
|
190
|
+
This skill is complete when the implementation path, risks, and verification steps are clear enough to hand off to `feature-delivery`, `refactor-safe`, or `test-driven-development` — or, in go mode, when the work has been planned, executed, verified, and brought to a commit gate. The pre-execution check and self-review must have been run with all findings addressed or explicitly surfaced.
|
|
@@ -1,29 +1,41 @@
|
|
|
1
1
|
name: planning
|
|
2
|
-
version: 0.
|
|
2
|
+
version: 0.4.0
|
|
3
3
|
category: planning
|
|
4
|
-
summary:
|
|
5
|
-
summary_vi:
|
|
4
|
+
summary: Execution-ready plans with bite-sized steps, no placeholders, self-review, pre-execution validation, and optional go-mode execution.
|
|
5
|
+
summary_vi: "Plan sẵn sàng thực thi với bước nhỏ gọn, không placeholder, tự review, kiểm tra trước thực thi, và có thể chạy theo go mode."
|
|
6
6
|
triggers:
|
|
7
7
|
- make a plan
|
|
8
8
|
- think through the implementation first
|
|
9
9
|
- prepare before coding
|
|
10
|
+
- run all
|
|
11
|
+
- go mode
|
|
12
|
+
- execute everything
|
|
10
13
|
inputs:
|
|
11
14
|
- user request
|
|
12
15
|
- relevant repo context
|
|
13
16
|
- existing patterns and constraints
|
|
17
|
+
- optional approved spec or explicit requirements
|
|
14
18
|
outputs:
|
|
15
|
-
- scope
|
|
19
|
+
- scope (in/out)
|
|
16
20
|
- approach
|
|
17
|
-
- file
|
|
21
|
+
- bite-sized ordered steps with file paths
|
|
22
|
+
- pre-execution check results
|
|
23
|
+
- self-review results
|
|
18
24
|
- verification plan
|
|
25
|
+
- optional go-mode task execution and commit proposal
|
|
19
26
|
constraints:
|
|
20
27
|
- keep the plan concrete and bounded
|
|
21
28
|
- separate planning from implementation
|
|
29
|
+
- no placeholders in any step
|
|
30
|
+
- each step names files and is 2-5 min
|
|
31
|
+
- run pre-execution check and self-review before presenting
|
|
22
32
|
related_skills:
|
|
23
33
|
- using-skills
|
|
24
34
|
- brainstorming
|
|
25
|
-
-
|
|
35
|
+
- research
|
|
36
|
+
- debug
|
|
26
37
|
- feature-delivery
|
|
27
|
-
- bug-triage
|
|
28
38
|
- refactor-safe
|
|
39
|
+
- code-review
|
|
40
|
+
- test-driven-development
|
|
29
41
|
- verification-before-completion
|
|
@@ -32,13 +32,16 @@ Do not use this skill when the intent is also to change behavior. Separate the r
|
|
|
32
32
|
|
|
33
33
|
## Output Format
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
35
|
+
Present results using the Shared Output Contract:
|
|
36
|
+
|
|
37
|
+
1. **Goal/Result** — the refactor performed and whether behavior is preserved
|
|
38
|
+
2. **Key Details:**
|
|
39
|
+
- goal and scope boundary
|
|
40
|
+
- behavior contract
|
|
41
|
+
- coverage check before and after
|
|
42
|
+
- steps taken
|
|
43
|
+
- behavioral drift check result
|
|
44
|
+
3. **Next Action** — `verification-before-completion` to confirm, then `commit`
|
|
42
45
|
|
|
43
46
|
## Red Flags
|
|
44
47
|
|