@anionzo/skill 1.4.0 → 1.6.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 +21 -9
- package/docs/design-brief.md +19 -13
- package/i18n/CONTRIBUTING.vi.md +2 -1
- package/i18n/README.vi.md +21 -9
- package/i18n/design-brief.vi.md +19 -13
- package/knowledge/global/skill-triggering-rules.md +2 -1
- package/package.json +1 -1
- package/skills/brainstorming/SKILL.md +176 -13
- package/skills/brainstorming/meta.yaml +19 -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 +30 -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 +38 -0
- package/skills/debug/references/output-template.md +16 -0
- package/skills/docs-writer/SKILL.md +85 -10
- package/skills/docs-writer/meta.yaml +16 -12
- package/skills/extract/SKILL.md +161 -0
- package/skills/extract/examples.md +47 -0
- package/skills/extract/meta.yaml +27 -0
- package/skills/extract/references/output-template.md +24 -0
- package/skills/feature-delivery/SKILL.md +10 -5
- package/skills/feature-delivery/meta.yaml +5 -0
- package/skills/go-pipeline/SKILL.md +156 -0
- package/skills/go-pipeline/examples.md +56 -0
- package/skills/go-pipeline/meta.yaml +27 -0
- package/skills/go-pipeline/references/output-template.md +17 -0
- package/skills/planning/SKILL.md +128 -17
- package/skills/planning/meta.yaml +15 -6
- package/skills/refactor-safe/SKILL.md +10 -7
- package/skills/repo-onboarding/SKILL.md +11 -7
- package/skills/repo-onboarding/meta.yaml +2 -0
- package/skills/research/SKILL.md +100 -0
- package/skills/research/examples.md +79 -0
- package/skills/research/meta.yaml +27 -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 +32 -14
- package/skills/using-skills/examples.md +3 -3
- package/skills/using-skills/meta.yaml +8 -3
- package/skills/verification-before-completion/SKILL.md +127 -13
- package/skills/verification-before-completion/meta.yaml +24 -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/planning/SKILL.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
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
|
|
|
@@ -19,34 +19,119 @@ Load this skill when:
|
|
|
19
19
|
## Workflow
|
|
20
20
|
|
|
21
21
|
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.
|
|
22
|
+
2. Define the scope boundary (in/out).
|
|
23
|
+
3. Inspect existing code paths and patterns the work should follow.
|
|
26
24
|
4. Choose the smallest viable approach that fits the repo.
|
|
27
|
-
5. Break the work into ordered steps.
|
|
25
|
+
5. Break the work into ordered, bite-sized steps.
|
|
28
26
|
6. Call out risks, assumptions, and missing decisions.
|
|
29
27
|
7. Define how the work will be verified.
|
|
30
|
-
8.
|
|
28
|
+
8. Run the pre-execution plan check.
|
|
29
|
+
9. Run the self-review.
|
|
30
|
+
10. Present for approval.
|
|
31
|
+
11. End with the next implementation skill to invoke.
|
|
32
|
+
|
|
33
|
+
## Bite-Sized Task Granularity
|
|
34
|
+
|
|
35
|
+
Each step should be one action, completable in 2-5 minutes:
|
|
36
|
+
|
|
37
|
+
- "Write the failing test for X" — one step
|
|
38
|
+
- "Run the test, confirm it fails" — one step
|
|
39
|
+
- "Implement the minimal code to pass the test" — one step
|
|
40
|
+
- "Run the tests, confirm all pass" — one step
|
|
41
|
+
- "Commit" — one step
|
|
42
|
+
|
|
43
|
+
If a step requires reading more than 10 files or touching more than 5 files, split it.
|
|
44
|
+
|
|
45
|
+
If the total plan exceeds approximately 8 steps, consider splitting into subtasks.
|
|
46
|
+
|
|
47
|
+
## No Placeholders
|
|
48
|
+
|
|
49
|
+
Every step must contain the actual content an engineer needs. These are plan failures — never write them:
|
|
50
|
+
|
|
51
|
+
- "TBD", "TODO", "implement later", "fill in details"
|
|
52
|
+
- "Add appropriate error handling" / "add validation" / "handle edge cases"
|
|
53
|
+
- "Write tests for the above" (without describing which tests)
|
|
54
|
+
- "Similar to Step N" (repeat the specifics — the engineer may read steps out of order)
|
|
55
|
+
- Steps that describe what to do without showing which files and what changes
|
|
56
|
+
- References to types, functions, or methods not defined in any step
|
|
57
|
+
|
|
58
|
+
**Every step must name the files, modules, or surfaces that change.**
|
|
59
|
+
|
|
60
|
+
## Pre-Execution Plan Check
|
|
61
|
+
|
|
62
|
+
Before presenting the plan for approval, verify plan quality across four dimensions:
|
|
63
|
+
|
|
64
|
+
### AC Coverage
|
|
65
|
+
- Every requirement from the task should map to at least one plan step.
|
|
66
|
+
- Every plan step should contribute to at least one acceptance criterion.
|
|
67
|
+
- Flag any AC that no plan step addresses.
|
|
68
|
+
|
|
69
|
+
### Scope Sizing
|
|
70
|
+
- Each step should be completable in a single implementation session (2-5 min).
|
|
71
|
+
- Flag steps that are too large and recommend splitting.
|
|
72
|
+
|
|
73
|
+
### Dependency Check
|
|
74
|
+
- Steps should be in logical order (foundational first, dependent last).
|
|
75
|
+
- Flag circular dependencies between steps.
|
|
76
|
+
- Flag steps that assume undocumented context.
|
|
77
|
+
|
|
78
|
+
### Risk Assessment
|
|
79
|
+
- Steps involving new external dependencies — flag as higher risk.
|
|
80
|
+
- Steps touching core/shared modules — flag blast radius.
|
|
81
|
+
- Steps with no test coverage in the plan — flag.
|
|
82
|
+
|
|
83
|
+
**Report issues inline with the plan:**
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
Plan:
|
|
87
|
+
1. Write failing test for auth middleware
|
|
88
|
+
2. Implement auth middleware
|
|
89
|
+
3. Update existing routes
|
|
90
|
+
Plan check: AC-3 (rate limiting) not covered by any step
|
|
91
|
+
Plan check: Step 3 touches 7 files — consider splitting
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Fix issues before presenting for approval. If unfixable, surface them explicitly so the user can decide.
|
|
95
|
+
|
|
96
|
+
## Self-Review
|
|
97
|
+
|
|
98
|
+
After writing the complete plan, review it with fresh eyes:
|
|
99
|
+
|
|
100
|
+
1. **Requirement coverage:** Skim each requirement. Can you point to a step that implements it? List any gaps.
|
|
101
|
+
2. **Placeholder scan:** Search the plan for any of the patterns from the "No Placeholders" section. Fix them.
|
|
102
|
+
3. **Name consistency:** Do the types, method signatures, and property names used in later steps match what is defined in earlier steps?
|
|
103
|
+
4. **File path accuracy:** Are all file paths plausible given the project structure?
|
|
104
|
+
|
|
105
|
+
If you find issues, fix them inline before presenting the plan.
|
|
31
106
|
|
|
32
107
|
## Output Format
|
|
33
108
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
109
|
+
Present results using the Shared Output Contract:
|
|
110
|
+
|
|
111
|
+
1. **Goal/Result** — the plan and whether approval is pending
|
|
112
|
+
2. **Key Details:**
|
|
113
|
+
- scope (in/out)
|
|
114
|
+
- existing patterns or files to follow
|
|
115
|
+
- proposed approach
|
|
116
|
+
- ordered implementation steps (bite-sized, no placeholders)
|
|
117
|
+
- pre-execution check results (AC coverage, scope sizing, dependency, risk)
|
|
118
|
+
- self-review results
|
|
119
|
+
- risks and assumptions
|
|
120
|
+
- verification plan
|
|
121
|
+
3. **Next Action** — after approval:
|
|
122
|
+
- `feature-delivery` for implementation
|
|
123
|
+
- `test-driven-development` if TDD approach preferred
|
|
124
|
+
- `brainstorming` if requirements need more definition first
|
|
42
125
|
|
|
43
126
|
## Planning Rules
|
|
44
127
|
|
|
45
128
|
- Keep the plan concrete enough that another engineer could execute it.
|
|
46
129
|
- Prefer a small number of meaningful steps over a long task dump.
|
|
47
|
-
- Name the files, modules, or surfaces likely to change
|
|
130
|
+
- Name the files, modules, or surfaces likely to change in every step.
|
|
48
131
|
- Make uncertainty explicit instead of hiding it in vague language.
|
|
49
132
|
- Do not start coding inside the plan.
|
|
133
|
+
- Complete code in every step — if a step changes code, describe the change specifically.
|
|
134
|
+
- DRY, YAGNI — do not plan features that are not required.
|
|
50
135
|
|
|
51
136
|
## Red Flags
|
|
52
137
|
|
|
@@ -55,7 +140,33 @@ Load this skill when:
|
|
|
55
140
|
- turning the plan into a full design doc for a small change
|
|
56
141
|
- leaving verification unspecified
|
|
57
142
|
- mixing code edits into the planning phase
|
|
143
|
+
- skipping the pre-execution check
|
|
144
|
+
- presenting a plan where ACs are not covered by any step
|
|
145
|
+
- steps that say "add appropriate X" without specifying what X is
|
|
146
|
+
- steps referencing functions or types not defined in any previous step
|
|
147
|
+
|
|
148
|
+
## Checklist
|
|
149
|
+
|
|
150
|
+
- [ ] Goal restated in user-visible terms
|
|
151
|
+
- [ ] Scope boundary defined (in/out)
|
|
152
|
+
- [ ] Existing patterns inspected
|
|
153
|
+
- [ ] Approach chosen (smallest viable)
|
|
154
|
+
- [ ] Steps ordered, bite-sized (2-5 min each), with file paths
|
|
155
|
+
- [ ] No placeholders in any step
|
|
156
|
+
- [ ] Pre-execution check passed:
|
|
157
|
+
- [ ] AC coverage verified
|
|
158
|
+
- [ ] Scope sizing reasonable
|
|
159
|
+
- [ ] Dependencies ordered correctly
|
|
160
|
+
- [ ] Risks flagged
|
|
161
|
+
- [ ] Self-review passed:
|
|
162
|
+
- [ ] Requirement coverage
|
|
163
|
+
- [ ] Placeholder scan
|
|
164
|
+
- [ ] Name consistency
|
|
165
|
+
- [ ] File path accuracy
|
|
166
|
+
- [ ] Verification plan defined
|
|
167
|
+
- [ ] Plan presented for approval
|
|
168
|
+
- [ ] Next skill identified
|
|
58
169
|
|
|
59
170
|
## Done Criteria
|
|
60
171
|
|
|
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
|
|
172
|
+
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`. The pre-execution check and self-review must have been run with all findings addressed or explicitly surfaced.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
name: planning
|
|
2
|
-
version: 0.
|
|
2
|
+
version: 0.3.0
|
|
3
3
|
category: planning
|
|
4
|
-
summary:
|
|
5
|
-
summary_vi:
|
|
4
|
+
summary: Execution-ready plans with bite-sized steps, no placeholders, self-review, and pre-execution validation.
|
|
5
|
+
summary_vi: "Plan sẵn sàng thực thi với bước nhỏ gọn, không placeholder, tự review, và kiểm tra trước thực thi."
|
|
6
6
|
triggers:
|
|
7
7
|
- make a plan
|
|
8
8
|
- think through the implementation first
|
|
@@ -12,18 +12,27 @@ inputs:
|
|
|
12
12
|
- relevant repo context
|
|
13
13
|
- existing patterns and constraints
|
|
14
14
|
outputs:
|
|
15
|
-
- scope
|
|
15
|
+
- scope (in/out)
|
|
16
16
|
- approach
|
|
17
|
-
- file
|
|
17
|
+
- bite-sized ordered steps with file paths
|
|
18
|
+
- pre-execution check results
|
|
19
|
+
- self-review results
|
|
18
20
|
- verification plan
|
|
19
21
|
constraints:
|
|
20
22
|
- keep the plan concrete and bounded
|
|
21
23
|
- separate planning from implementation
|
|
24
|
+
- no placeholders in any step
|
|
25
|
+
- each step names files and is 2-5 min
|
|
26
|
+
- run pre-execution check and self-review before presenting
|
|
22
27
|
related_skills:
|
|
23
28
|
- using-skills
|
|
24
29
|
- brainstorming
|
|
25
30
|
- repo-onboarding
|
|
31
|
+
- research
|
|
32
|
+
- debug
|
|
26
33
|
- feature-delivery
|
|
27
|
-
- bug-triage
|
|
28
34
|
- refactor-safe
|
|
35
|
+
- code-review
|
|
36
|
+
- test-driven-development
|
|
37
|
+
- go-pipeline
|
|
29
38
|
- 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
|
|
|
@@ -30,13 +30,17 @@ Load this skill when:
|
|
|
30
30
|
|
|
31
31
|
## Output Format
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
33
|
+
Present results using the Shared Output Contract:
|
|
34
|
+
|
|
35
|
+
1. **Goal/Result** — the repo understood and key findings
|
|
36
|
+
2. **Key Details:**
|
|
37
|
+
- project purpose
|
|
38
|
+
- architecture summary
|
|
39
|
+
- major components and responsibilities
|
|
40
|
+
- important commands or workflows
|
|
41
|
+
- notable conventions or constraints
|
|
42
|
+
- open questions
|
|
43
|
+
3. **Next Action** — `planning` (to plan a change), `research` (to go deeper on a topic), or `docs-writer` (to update documentation)
|
|
40
44
|
|
|
41
45
|
## Red Flags
|
|
42
46
|
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Research
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Understand existing code, patterns, and decisions before writing new code.
|
|
6
|
+
|
|
7
|
+
This skill exists to prevent implementing from scratch what already exists, and to surface constraints that would otherwise be discovered mid-implementation.
|
|
8
|
+
|
|
9
|
+
## When To Use
|
|
10
|
+
|
|
11
|
+
Load this skill when:
|
|
12
|
+
|
|
13
|
+
- exploring a codebase before starting a task
|
|
14
|
+
- looking for existing patterns, utilities, or conventions to follow
|
|
15
|
+
- trying to understand how a feature or subsystem works
|
|
16
|
+
- the implementation approach depends on what already exists
|
|
17
|
+
- the user says "research this", "look into", or "what do we have for X"
|
|
18
|
+
|
|
19
|
+
Skip this skill when you already have clear context and the task is straightforward.
|
|
20
|
+
|
|
21
|
+
## Workflow
|
|
22
|
+
|
|
23
|
+
1. State what is being researched and why.
|
|
24
|
+
2. Search in this order:
|
|
25
|
+
- project documentation (READMEs, docs/, wikis)
|
|
26
|
+
- existing code paths and implementations
|
|
27
|
+
- adjacent tests, validation, and configuration
|
|
28
|
+
- related issues, PRs, or commit history
|
|
29
|
+
3. For each finding, note:
|
|
30
|
+
- what exists and where
|
|
31
|
+
- whether it is reusable, needs adaptation, or is irrelevant
|
|
32
|
+
- any conventions or constraints it reveals
|
|
33
|
+
4. Identify gaps — what does NOT exist that the task needs.
|
|
34
|
+
5. Summarize findings with concrete recommendations.
|
|
35
|
+
|
|
36
|
+
## Search Techniques
|
|
37
|
+
|
|
38
|
+
Use the most efficient search method for the situation:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
# Find files by name pattern
|
|
42
|
+
find . -name "*<pattern>*" -type f | grep -v node_modules | head -20
|
|
43
|
+
|
|
44
|
+
# Search code for patterns
|
|
45
|
+
grep -r "<pattern>" --include="*.ts" -l | head -20
|
|
46
|
+
|
|
47
|
+
# Check recent changes to a file
|
|
48
|
+
git log --oneline -10 -- <file>
|
|
49
|
+
|
|
50
|
+
# Find related tests
|
|
51
|
+
find . -name "*<topic>*test*" -o -name "*test*<topic>*" | head -10
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Read the actual files — do not guess from filenames alone.
|
|
55
|
+
|
|
56
|
+
## Output Format
|
|
57
|
+
|
|
58
|
+
Present findings using the Shared Output Contract:
|
|
59
|
+
|
|
60
|
+
1. **Goal/Result** — what was researched and the key conclusion
|
|
61
|
+
2. **Key Details:**
|
|
62
|
+
- concrete files or docs found
|
|
63
|
+
- what is reusable vs what is missing
|
|
64
|
+
- architecture or convention constraints discovered
|
|
65
|
+
- patterns that new code should follow
|
|
66
|
+
3. **Next Action** — recommend a follow-up only when findings clearly lead somewhere:
|
|
67
|
+
- research for an active task → `planning`
|
|
68
|
+
- research revealed a gap → `brainstorming`
|
|
69
|
+
- no clear handoff → stop after findings
|
|
70
|
+
|
|
71
|
+
## Research Rules
|
|
72
|
+
|
|
73
|
+
- Search before assuming nothing exists.
|
|
74
|
+
- Read the actual code, not just the file tree.
|
|
75
|
+
- State explicitly when no existing pattern is found rather than implying one exists.
|
|
76
|
+
- If docs and code disagree, call out the mismatch.
|
|
77
|
+
- If the research surface is too large, focus on the most relevant subset and note what was not covered.
|
|
78
|
+
- Do not expand the original question into unrelated exploration.
|
|
79
|
+
|
|
80
|
+
## Red Flags
|
|
81
|
+
|
|
82
|
+
- skipping the search and going straight to implementation
|
|
83
|
+
- reading filenames without opening the files
|
|
84
|
+
- reporting vague findings like "there seems to be something related"
|
|
85
|
+
- expanding research scope without noting the expansion
|
|
86
|
+
- treating absence of evidence as evidence of absence
|
|
87
|
+
|
|
88
|
+
## Checklist
|
|
89
|
+
|
|
90
|
+
- [ ] Research topic stated
|
|
91
|
+
- [ ] Documentation searched
|
|
92
|
+
- [ ] Existing code patterns found (or explicitly noted as absent)
|
|
93
|
+
- [ ] Related tests and config checked
|
|
94
|
+
- [ ] Findings include concrete file paths
|
|
95
|
+
- [ ] Reusable vs missing clearly separated
|
|
96
|
+
- [ ] Recommendations are actionable
|
|
97
|
+
|
|
98
|
+
## Done Criteria
|
|
99
|
+
|
|
100
|
+
This skill is complete when the findings are concrete enough to inform the next step — whether that is planning, implementation, or a decision that more information is needed. Every finding should include a file path or explicit "not found" statement.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Examples
|
|
2
|
+
|
|
3
|
+
## Example 1
|
|
4
|
+
|
|
5
|
+
User request:
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
How does our auth system work? I need to add a new OAuth provider.
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Expected result:
|
|
12
|
+
|
|
13
|
+
- search for auth-related files, patterns, and documentation
|
|
14
|
+
- identify existing OAuth implementations and patterns
|
|
15
|
+
- note what is reusable and what needs to be built
|
|
16
|
+
|
|
17
|
+
Sample completed output:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
Goal/Result: Researched the auth system to understand how to add a new OAuth provider.
|
|
21
|
+
|
|
22
|
+
Key Details:
|
|
23
|
+
- Existing implementations:
|
|
24
|
+
- src/auth/providers/google.ts — Google OAuth using passport-google-oauth20
|
|
25
|
+
- src/auth/providers/github.ts — GitHub OAuth using passport-github2
|
|
26
|
+
- src/auth/strategy.ts — Base strategy wrapper, all providers follow this pattern
|
|
27
|
+
- src/auth/callback.ts — Shared callback handler for all OAuth flows
|
|
28
|
+
- Patterns found:
|
|
29
|
+
- Each provider is a separate file in src/auth/providers/
|
|
30
|
+
- All providers implement the AuthProvider interface from src/auth/types.ts
|
|
31
|
+
- Callback URL pattern: /auth/{provider}/callback
|
|
32
|
+
- Config loaded from environment variables: AUTH_{PROVIDER}_CLIENT_ID, AUTH_{PROVIDER}_SECRET
|
|
33
|
+
- Gaps:
|
|
34
|
+
- No generic OAuth2 provider — each is implemented individually
|
|
35
|
+
- No tests for the OAuth callback flow
|
|
36
|
+
- Constraints:
|
|
37
|
+
- Must use passport.js (project convention)
|
|
38
|
+
- Must register in src/auth/index.ts provider registry
|
|
39
|
+
|
|
40
|
+
Next Action: planning — plan the new OAuth provider implementation following the existing pattern.
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Example 2
|
|
44
|
+
|
|
45
|
+
User request:
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
What caching do we use? I need to cache API responses.
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Expected result:
|
|
52
|
+
|
|
53
|
+
- search for caching patterns in the codebase
|
|
54
|
+
- identify existing cache implementations
|
|
55
|
+
- note configuration and conventions
|
|
56
|
+
|
|
57
|
+
Sample completed output:
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
Goal/Result: Researched caching patterns. Found Redis-based caching in use for sessions but no API response caching.
|
|
61
|
+
|
|
62
|
+
Key Details:
|
|
63
|
+
- Existing implementations:
|
|
64
|
+
- src/cache/redis.ts — Redis client wrapper (ioredis)
|
|
65
|
+
- src/middleware/session.ts — Uses Redis for session storage
|
|
66
|
+
- No API response caching found anywhere
|
|
67
|
+
- Patterns found:
|
|
68
|
+
- Redis connection config in src/config/redis.ts
|
|
69
|
+
- TTL conventions: sessions use 24h, no other TTL patterns
|
|
70
|
+
- Cache keys use prefix pattern: "app:{type}:{id}"
|
|
71
|
+
- Gaps:
|
|
72
|
+
- No response caching middleware exists
|
|
73
|
+
- No cache invalidation strategy documented
|
|
74
|
+
- Constraints:
|
|
75
|
+
- Redis is already a dependency — reuse existing connection
|
|
76
|
+
- Key prefix pattern must be followed
|
|
77
|
+
|
|
78
|
+
Next Action: planning — design a response caching middleware using the existing Redis setup.
|
|
79
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: research
|
|
2
|
+
version: 0.1.0
|
|
3
|
+
category: discovery
|
|
4
|
+
summary: Understand existing code, patterns, and decisions before writing new code to avoid reinventing what exists.
|
|
5
|
+
summary_vi: "T\xECm hi\u1EC3u code, pattern, v\xE0 quy\u1EBFt \u0111\u1ECBnh hi\u1EC7n c\xF3 tr\u01B0\u1EDBc khi vi\u1EBFt code m\u1EDBi \u0111\u1EC3 tr\xE1nh l\xE0m l\u1EA1i nh\u1EEFng g\xEC \u0111\xE3 c\xF3."
|
|
6
|
+
triggers:
|
|
7
|
+
- research this codebase
|
|
8
|
+
- what do we already have for X
|
|
9
|
+
- look into how this works
|
|
10
|
+
- explore before implementing
|
|
11
|
+
inputs:
|
|
12
|
+
- topic or feature to research
|
|
13
|
+
- optional file paths or package names
|
|
14
|
+
outputs:
|
|
15
|
+
- existing implementations found
|
|
16
|
+
- patterns and conventions discovered
|
|
17
|
+
- gaps identified
|
|
18
|
+
- actionable recommendations
|
|
19
|
+
constraints:
|
|
20
|
+
- search before assuming nothing exists
|
|
21
|
+
- read actual code not just filenames
|
|
22
|
+
related_skills:
|
|
23
|
+
- using-skills
|
|
24
|
+
- planning
|
|
25
|
+
- brainstorming
|
|
26
|
+
- extract
|
|
27
|
+
- repo-onboarding
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## Goal/Result
|
|
2
|
+
|
|
3
|
+
- What was researched:
|
|
4
|
+
- Key conclusion:
|
|
5
|
+
|
|
6
|
+
## Key Details
|
|
7
|
+
|
|
8
|
+
### Existing Implementations
|
|
9
|
+
- `path/to/file`: Does X
|
|
10
|
+
|
|
11
|
+
### Patterns Found
|
|
12
|
+
- Pattern 1: Used for...
|
|
13
|
+
|
|
14
|
+
### Gaps Identified
|
|
15
|
+
- What is missing:
|
|
16
|
+
|
|
17
|
+
### Constraints Discovered
|
|
18
|
+
- Convention 1:
|
|
19
|
+
- Architecture constraint 1:
|
|
20
|
+
|
|
21
|
+
## Next Action
|
|
22
|
+
|
|
23
|
+
- Recommended follow-up:
|