@uniswap/ai-toolkit-nx-claude 0.5.29 → 0.5.30-next.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/dist/cli-generator.cjs +28 -59
- package/dist/packages/ai-toolkit-nx-claude/src/cli-generator.d.ts +8 -10
- package/dist/packages/ai-toolkit-nx-claude/src/cli-generator.d.ts.map +1 -1
- package/dist/packages/ai-toolkit-nx-claude/src/index.d.ts +0 -1
- package/dist/packages/ai-toolkit-nx-claude/src/index.d.ts.map +1 -1
- package/generators.json +0 -15
- package/package.json +4 -35
- package/dist/content/agents/agnostic/CLAUDE.md +0 -282
- package/dist/content/agents/agnostic/agent-capability-analyst.md +0 -575
- package/dist/content/agents/agnostic/agent-optimizer.md +0 -396
- package/dist/content/agents/agnostic/agent-orchestrator.md +0 -475
- package/dist/content/agents/agnostic/cicd-agent.md +0 -301
- package/dist/content/agents/agnostic/claude-agent-discovery.md +0 -304
- package/dist/content/agents/agnostic/claude-docs-fact-checker.md +0 -435
- package/dist/content/agents/agnostic/claude-docs-initializer.md +0 -782
- package/dist/content/agents/agnostic/claude-docs-manager.md +0 -595
- package/dist/content/agents/agnostic/code-explainer.md +0 -269
- package/dist/content/agents/agnostic/code-generator.md +0 -785
- package/dist/content/agents/agnostic/commit-message-generator.md +0 -101
- package/dist/content/agents/agnostic/context-loader.md +0 -432
- package/dist/content/agents/agnostic/debug-assistant.md +0 -321
- package/dist/content/agents/agnostic/doc-writer.md +0 -536
- package/dist/content/agents/agnostic/feedback-collector.md +0 -165
- package/dist/content/agents/agnostic/infrastructure-agent.md +0 -406
- package/dist/content/agents/agnostic/migration-assistant.md +0 -489
- package/dist/content/agents/agnostic/pattern-learner.md +0 -481
- package/dist/content/agents/agnostic/performance-analyzer.md +0 -528
- package/dist/content/agents/agnostic/plan-reviewer.md +0 -173
- package/dist/content/agents/agnostic/planner.md +0 -235
- package/dist/content/agents/agnostic/pr-creator.md +0 -498
- package/dist/content/agents/agnostic/pr-reviewer.md +0 -142
- package/dist/content/agents/agnostic/prompt-engineer.md +0 -541
- package/dist/content/agents/agnostic/refactorer.md +0 -311
- package/dist/content/agents/agnostic/researcher.md +0 -349
- package/dist/content/agents/agnostic/security-analyzer.md +0 -1087
- package/dist/content/agents/agnostic/stack-splitter.md +0 -642
- package/dist/content/agents/agnostic/style-enforcer.md +0 -568
- package/dist/content/agents/agnostic/test-runner.md +0 -481
- package/dist/content/agents/agnostic/test-writer.md +0 -292
- package/dist/content/commands/agnostic/CLAUDE.md +0 -207
- package/dist/content/commands/agnostic/address-pr-issues.md +0 -205
- package/dist/content/commands/agnostic/auto-spec.md +0 -386
- package/dist/content/commands/agnostic/claude-docs.md +0 -409
- package/dist/content/commands/agnostic/claude-init-plus.md +0 -439
- package/dist/content/commands/agnostic/create-pr.md +0 -79
- package/dist/content/commands/agnostic/daily-standup.md +0 -185
- package/dist/content/commands/agnostic/deploy.md +0 -441
- package/dist/content/commands/agnostic/execute-plan.md +0 -167
- package/dist/content/commands/agnostic/explain-file.md +0 -303
- package/dist/content/commands/agnostic/explore.md +0 -82
- package/dist/content/commands/agnostic/fix-bug.md +0 -273
- package/dist/content/commands/agnostic/gen-tests.md +0 -185
- package/dist/content/commands/agnostic/generate-commit-message.md +0 -92
- package/dist/content/commands/agnostic/git-worktree-orchestrator.md +0 -647
- package/dist/content/commands/agnostic/implement-spec.md +0 -270
- package/dist/content/commands/agnostic/monitor.md +0 -581
- package/dist/content/commands/agnostic/perf-analyze.md +0 -214
- package/dist/content/commands/agnostic/plan.md +0 -453
- package/dist/content/commands/agnostic/refactor.md +0 -315
- package/dist/content/commands/agnostic/refine-linear-task.md +0 -575
- package/dist/content/commands/agnostic/research.md +0 -49
- package/dist/content/commands/agnostic/review-code.md +0 -321
- package/dist/content/commands/agnostic/review-plan.md +0 -109
- package/dist/content/commands/agnostic/review-pr.md +0 -393
- package/dist/content/commands/agnostic/split-stack.md +0 -705
- package/dist/content/commands/agnostic/update-claude-md.md +0 -401
- package/dist/content/commands/agnostic/work-through-pr-comments.md +0 -873
- package/dist/generators/add-agent/CLAUDE.md +0 -130
- package/dist/generators/add-agent/files/__name__.md.template +0 -37
- package/dist/generators/add-agent/generator.cjs +0 -640
- package/dist/generators/add-agent/schema.json +0 -59
- package/dist/generators/add-command/CLAUDE.md +0 -131
- package/dist/generators/add-command/files/__name__.md.template +0 -46
- package/dist/generators/add-command/generator.cjs +0 -643
- package/dist/generators/add-command/schema.json +0 -50
- package/dist/generators/files/src/index.ts.template +0 -1
- package/dist/generators/init/CLAUDE.md +0 -520
- package/dist/generators/init/generator.cjs +0 -3304
- package/dist/generators/init/schema.json +0 -180
- package/dist/packages/ai-toolkit-nx-claude/src/generators/add-agent/generator.d.ts +0 -5
- package/dist/packages/ai-toolkit-nx-claude/src/generators/add-agent/generator.d.ts.map +0 -1
- package/dist/packages/ai-toolkit-nx-claude/src/generators/add-command/generator.d.ts +0 -5
- package/dist/packages/ai-toolkit-nx-claude/src/generators/add-command/generator.d.ts.map +0 -1
- package/dist/packages/ai-toolkit-nx-claude/src/generators/init/generator.d.ts +0 -5
- package/dist/packages/ai-toolkit-nx-claude/src/generators/init/generator.d.ts.map +0 -1
- package/dist/packages/ai-toolkit-nx-claude/src/utils/auto-update-utils.d.ts +0 -30
- package/dist/packages/ai-toolkit-nx-claude/src/utils/auto-update-utils.d.ts.map +0 -1
|
@@ -1,575 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Refine and enhance Linear task descriptions for improved clarity, completeness, and actionability
|
|
3
|
-
argument-hint: <issue-identifier> [--focus <area>] [--update]
|
|
4
|
-
allowed-tools: Read(*), Glob(*), Grep(*), Task(*), WebSearch(*), WebFetch(*), mcp__linear__linear_search_issues(*), mcp__linear__linear_update_issue(*), mcp__linear__linear_add_comment(*)
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Refine Linear Task
|
|
8
|
-
|
|
9
|
-
Analyze and refine Linear task descriptions to improve clarity, completeness, and actionability through AI-assisted enhancement.
|
|
10
|
-
|
|
11
|
-
## Overview
|
|
12
|
-
|
|
13
|
-
This command takes a Linear issue identifier and refines its description by:
|
|
14
|
-
|
|
15
|
-
1. **Analyzing** the current task description for gaps and ambiguities
|
|
16
|
-
2. **Researching** relevant codebase context to inform the refinement
|
|
17
|
-
3. **Generating** an improved description with clear structure
|
|
18
|
-
4. **Presenting** the changes for user approval
|
|
19
|
-
5. **Updating** the Linear issue (with user consent)
|
|
20
|
-
|
|
21
|
-
## Use Cases
|
|
22
|
-
|
|
23
|
-
- **Vague tasks**: Transform "Fix the bug" into actionable specifications
|
|
24
|
-
- **Missing context**: Add relevant codebase references and technical details
|
|
25
|
-
- **Incomplete acceptance criteria**: Generate clear, testable success conditions
|
|
26
|
-
- **New team members**: Help understand what a task requires
|
|
27
|
-
- **Sprint planning**: Prepare tasks for development with complete information
|
|
28
|
-
|
|
29
|
-
## Inputs
|
|
30
|
-
|
|
31
|
-
Accept a Linear issue identifier with optional flags:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
/refine-linear-task DEV-123 # Refine issue DEV-123
|
|
35
|
-
/refine-linear-task DEV-123 --focus security # Focus refinement on security aspects
|
|
36
|
-
/refine-linear-task DEV-123 --update # Auto-update after approval
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
### Parameters
|
|
40
|
-
|
|
41
|
-
Extract from user input:
|
|
42
|
-
|
|
43
|
-
- `issue_identifier`: The Linear issue ID (e.g., "DEV-123", "dai-456")
|
|
44
|
-
- `focus_area`: Optional focus for refinement (e.g., "security", "performance", "testing")
|
|
45
|
-
- `auto_update`: Boolean flag indicating whether to update Linear automatically after approval
|
|
46
|
-
|
|
47
|
-
### Examples
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
# Basic refinement
|
|
51
|
-
/refine-linear-task DEV-104
|
|
52
|
-
|
|
53
|
-
# Focus on specific aspects
|
|
54
|
-
/refine-linear-task DEV-104 --focus testing
|
|
55
|
-
/refine-linear-task DEV-104 --focus security
|
|
56
|
-
/refine-linear-task DEV-104 --focus performance
|
|
57
|
-
|
|
58
|
-
# Auto-update mode
|
|
59
|
-
/refine-linear-task DEV-104 --update
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
## Task
|
|
63
|
-
|
|
64
|
-
Execute a structured refinement workflow:
|
|
65
|
-
|
|
66
|
-
### Phase 1: Fetch and Analyze Current Task
|
|
67
|
-
|
|
68
|
-
1. **Fetch Issue Details**
|
|
69
|
-
|
|
70
|
-
Use the Linear MCP tools to fetch the issue:
|
|
71
|
-
|
|
72
|
-
```typescript
|
|
73
|
-
// Search for the specific issue by identifier
|
|
74
|
-
const results = await mcp__linear__linear_search_issues({
|
|
75
|
-
query: issue_identifier,
|
|
76
|
-
limit: 1,
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
if (results.length === 0) {
|
|
80
|
-
console.log(`❌ Could not find issue: ${issue_identifier}`);
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
const issue = results[0];
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
2. **Display Current State**
|
|
88
|
-
|
|
89
|
-
Show the user what we're working with:
|
|
90
|
-
|
|
91
|
-
```markdown
|
|
92
|
-
## Current Task Details
|
|
93
|
-
|
|
94
|
-
**Issue**: [identifier] - [title]
|
|
95
|
-
**Status**: [status]
|
|
96
|
-
**Priority**: [priority]
|
|
97
|
-
**Assignee**: [assignee or "Unassigned"]
|
|
98
|
-
|
|
99
|
-
### Current Description
|
|
100
|
-
|
|
101
|
-
> [existing description or "No description provided"]
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
3. **Analyze for Gaps**
|
|
105
|
-
|
|
106
|
-
Evaluate the current description against these criteria:
|
|
107
|
-
|
|
108
|
-
- **Clarity**: Is the problem/goal clearly stated?
|
|
109
|
-
- **Context**: Is there sufficient background information?
|
|
110
|
-
- **Scope**: Are boundaries clearly defined?
|
|
111
|
-
- **Acceptance Criteria**: Are success conditions defined?
|
|
112
|
-
- **Technical Details**: Are implementation hints provided?
|
|
113
|
-
- **Dependencies**: Are related tasks/blockers mentioned?
|
|
114
|
-
|
|
115
|
-
Present a gap analysis:
|
|
116
|
-
|
|
117
|
-
```markdown
|
|
118
|
-
## Gap Analysis
|
|
119
|
-
|
|
120
|
-
| Aspect | Status | Notes |
|
|
121
|
-
| ------------------ | ------ | ------------------------------- |
|
|
122
|
-
| Problem Statement | ⚠️ | Vague - needs specific details |
|
|
123
|
-
| Context | ❌ | Missing - no background info |
|
|
124
|
-
| Scope | ✅ | Clear boundaries defined |
|
|
125
|
-
| Acceptance Criteria| ❌ | Missing - no success conditions |
|
|
126
|
-
| Technical Details | ⚠️ | Partial - could be expanded |
|
|
127
|
-
| Dependencies | ✅ | None identified |
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
### Phase 2: Research Codebase Context
|
|
131
|
-
|
|
132
|
-
If the task relates to existing code:
|
|
133
|
-
|
|
134
|
-
1. **Identify Relevant Areas**
|
|
135
|
-
|
|
136
|
-
Based on the task description, determine what parts of the codebase are relevant:
|
|
137
|
-
|
|
138
|
-
- Search for mentioned files, functions, or components
|
|
139
|
-
- Look for related patterns or implementations
|
|
140
|
-
- Find tests that might inform requirements
|
|
141
|
-
|
|
142
|
-
2. **Gather Technical Context**
|
|
143
|
-
|
|
144
|
-
Use the Task tool with Explore agent to understand:
|
|
145
|
-
|
|
146
|
-
- Current implementation patterns
|
|
147
|
-
- Related files and their purposes
|
|
148
|
-
- Existing tests and their coverage
|
|
149
|
-
- Architecture decisions that might impact the task
|
|
150
|
-
|
|
151
|
-
3. **Summarize Findings**
|
|
152
|
-
|
|
153
|
-
```markdown
|
|
154
|
-
## Codebase Context
|
|
155
|
-
|
|
156
|
-
### Relevant Files
|
|
157
|
-
|
|
158
|
-
- `src/services/auth.ts` - Current authentication implementation
|
|
159
|
-
- `src/middleware/validate.ts` - Request validation patterns
|
|
160
|
-
- `tests/auth.spec.ts` - Existing test coverage
|
|
161
|
-
|
|
162
|
-
### Key Patterns
|
|
163
|
-
|
|
164
|
-
- Uses middleware pattern for request handling
|
|
165
|
-
- JWT tokens stored in httpOnly cookies
|
|
166
|
-
- Error handling follows Result<T, E> pattern
|
|
167
|
-
|
|
168
|
-
### Considerations
|
|
169
|
-
|
|
170
|
-
- Need to maintain backward compatibility with v1 API
|
|
171
|
-
- Performance budget: < 100ms response time
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
### Phase 3: Generate Refined Description
|
|
175
|
-
|
|
176
|
-
Create a comprehensive, well-structured task description:
|
|
177
|
-
|
|
178
|
-
```markdown
|
|
179
|
-
## Refined Task Description
|
|
180
|
-
|
|
181
|
-
### Problem Statement
|
|
182
|
-
|
|
183
|
-
[Clear, specific description of what needs to be done and why]
|
|
184
|
-
|
|
185
|
-
### Context
|
|
186
|
-
|
|
187
|
-
[Background information, why this matters, related decisions]
|
|
188
|
-
|
|
189
|
-
### Scope
|
|
190
|
-
|
|
191
|
-
**In Scope:**
|
|
192
|
-
|
|
193
|
-
- [Specific item 1]
|
|
194
|
-
- [Specific item 2]
|
|
195
|
-
|
|
196
|
-
**Out of Scope:**
|
|
197
|
-
|
|
198
|
-
- [Explicitly excluded item 1]
|
|
199
|
-
- [Explicitly excluded item 2]
|
|
200
|
-
|
|
201
|
-
### Acceptance Criteria
|
|
202
|
-
|
|
203
|
-
- [ ] [Specific, testable criterion 1]
|
|
204
|
-
- [ ] [Specific, testable criterion 2]
|
|
205
|
-
- [ ] [Specific, testable criterion 3]
|
|
206
|
-
|
|
207
|
-
### Technical Notes
|
|
208
|
-
|
|
209
|
-
[Implementation hints, relevant patterns, files to modify]
|
|
210
|
-
|
|
211
|
-
### Dependencies
|
|
212
|
-
|
|
213
|
-
- [Dependency 1, if any]
|
|
214
|
-
- [Dependency 2, if any]
|
|
215
|
-
|
|
216
|
-
### References
|
|
217
|
-
|
|
218
|
-
- [Link to related documentation]
|
|
219
|
-
- [Link to design document]
|
|
220
|
-
- [Link to related issues]
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
### Phase 4: Present and Confirm
|
|
224
|
-
|
|
225
|
-
1. **Show Comparison**
|
|
226
|
-
|
|
227
|
-
Display a clear before/after comparison:
|
|
228
|
-
|
|
229
|
-
```markdown
|
|
230
|
-
## Proposed Changes
|
|
231
|
-
|
|
232
|
-
### Before
|
|
233
|
-
|
|
234
|
-
> [Original description]
|
|
235
|
-
|
|
236
|
-
### After
|
|
237
|
-
|
|
238
|
-
> [Refined description]
|
|
239
|
-
|
|
240
|
-
### Summary of Improvements
|
|
241
|
-
|
|
242
|
-
- ✅ Added clear problem statement
|
|
243
|
-
- ✅ Included acceptance criteria (3 items)
|
|
244
|
-
- ✅ Added technical context from codebase
|
|
245
|
-
- ✅ Defined explicit scope boundaries
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
2. **Request Approval**
|
|
249
|
-
|
|
250
|
-
Ask the user to review and approve:
|
|
251
|
-
|
|
252
|
-
- **Approve**: Update the Linear issue with refined description
|
|
253
|
-
- **Edit**: Allow user to modify before updating
|
|
254
|
-
- **Cancel**: Discard changes
|
|
255
|
-
|
|
256
|
-
### Phase 5: Update Linear (with approval)
|
|
257
|
-
|
|
258
|
-
If the user approves:
|
|
259
|
-
|
|
260
|
-
1. **Update Issue Description**
|
|
261
|
-
|
|
262
|
-
```typescript
|
|
263
|
-
await mcp__linear__linear_update_issue({
|
|
264
|
-
id: issue.id,
|
|
265
|
-
description: refinedDescription,
|
|
266
|
-
});
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
2. **Add Comment (optional)**
|
|
270
|
-
|
|
271
|
-
Optionally add a comment noting the refinement:
|
|
272
|
-
|
|
273
|
-
```typescript
|
|
274
|
-
await mcp__linear__linear_add_comment({
|
|
275
|
-
issueId: issue.id,
|
|
276
|
-
body: '📝 Task description refined using AI assistance.\n\nChanges include: [summary of changes]',
|
|
277
|
-
});
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
3. **Confirm Success**
|
|
281
|
-
|
|
282
|
-
```markdown
|
|
283
|
-
✅ Issue [identifier] has been updated!
|
|
284
|
-
|
|
285
|
-
**View in Linear**: [issue URL]
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
## Focus Areas
|
|
289
|
-
|
|
290
|
-
When `--focus` is specified, emphasize that aspect:
|
|
291
|
-
|
|
292
|
-
### `--focus security`
|
|
293
|
-
|
|
294
|
-
- Analyze for security implications
|
|
295
|
-
- Add security-related acceptance criteria
|
|
296
|
-
- Note potential vulnerabilities or risks
|
|
297
|
-
- Reference security patterns in codebase
|
|
298
|
-
|
|
299
|
-
### `--focus performance`
|
|
300
|
-
|
|
301
|
-
- Consider performance impact
|
|
302
|
-
- Add performance-related acceptance criteria
|
|
303
|
-
- Include benchmarks or targets
|
|
304
|
-
- Note performance patterns in codebase
|
|
305
|
-
|
|
306
|
-
### `--focus testing`
|
|
307
|
-
|
|
308
|
-
- Emphasize test requirements
|
|
309
|
-
- Add test-specific acceptance criteria
|
|
310
|
-
- Reference existing test patterns
|
|
311
|
-
- Note edge cases to cover
|
|
312
|
-
|
|
313
|
-
### `--focus accessibility`
|
|
314
|
-
|
|
315
|
-
- Consider a11y implications
|
|
316
|
-
- Add accessibility acceptance criteria
|
|
317
|
-
- Reference WCAG guidelines if applicable
|
|
318
|
-
- Note existing a11y patterns
|
|
319
|
-
|
|
320
|
-
## Output
|
|
321
|
-
|
|
322
|
-
Return a structured summary:
|
|
323
|
-
|
|
324
|
-
```markdown
|
|
325
|
-
## Task Refinement Complete
|
|
326
|
-
|
|
327
|
-
**Issue**: [DEV-123] [Title]
|
|
328
|
-
**Status**: [Updated / Not Updated]
|
|
329
|
-
|
|
330
|
-
### Improvements Made
|
|
331
|
-
|
|
332
|
-
- [List of specific improvements]
|
|
333
|
-
|
|
334
|
-
### Gap Analysis Summary
|
|
335
|
-
|
|
336
|
-
| Aspect | Before | After |
|
|
337
|
-
| ------------------ | ------ | ----- |
|
|
338
|
-
| Problem Statement | ⚠️ | ✅ |
|
|
339
|
-
| Context | ❌ | ✅ |
|
|
340
|
-
| Acceptance Criteria| ❌ | ✅ |
|
|
341
|
-
|
|
342
|
-
### Next Steps
|
|
343
|
-
|
|
344
|
-
1. Review the refined description in Linear
|
|
345
|
-
2. Assign the task if not already assigned
|
|
346
|
-
3. Begin implementation with `/plan [issue-identifier]`
|
|
347
|
-
```
|
|
348
|
-
|
|
349
|
-
## Integration with Other Commands
|
|
350
|
-
|
|
351
|
-
This command works well with the implementation workflow:
|
|
352
|
-
|
|
353
|
-
1. **Refine**: `/refine-linear-task DEV-123` - Clarify what needs to be done
|
|
354
|
-
2. **Explore**: `/explore [relevant area]` - Understand the codebase
|
|
355
|
-
3. **Plan**: `/plan DEV-123` - Create implementation plan
|
|
356
|
-
4. **Execute**: `/execute-plan plan-file.md` - Implement the solution
|
|
357
|
-
|
|
358
|
-
## Error Handling
|
|
359
|
-
|
|
360
|
-
### Issue Not Found
|
|
361
|
-
|
|
362
|
-
```markdown
|
|
363
|
-
❌ Could not find issue: [identifier]
|
|
364
|
-
|
|
365
|
-
Please verify:
|
|
366
|
-
|
|
367
|
-
- The issue identifier is correct (e.g., DEV-123)
|
|
368
|
-
- You have access to this Linear workspace
|
|
369
|
-
- The issue hasn't been deleted
|
|
370
|
-
```
|
|
371
|
-
|
|
372
|
-
### No Linear Access
|
|
373
|
-
|
|
374
|
-
```markdown
|
|
375
|
-
❌ Linear MCP tools not available
|
|
376
|
-
|
|
377
|
-
Please ensure:
|
|
378
|
-
|
|
379
|
-
- Linear MCP server is configured
|
|
380
|
-
- LINEAR_API_KEY environment variable is set
|
|
381
|
-
- MCP server is enabled in Claude Code settings
|
|
382
|
-
```
|
|
383
|
-
|
|
384
|
-
### Update Failed
|
|
385
|
-
|
|
386
|
-
```markdown
|
|
387
|
-
❌ Failed to update issue [identifier]
|
|
388
|
-
|
|
389
|
-
Error: [error message]
|
|
390
|
-
|
|
391
|
-
The refined description has been generated but not saved.
|
|
392
|
-
You can manually copy the refined description to Linear.
|
|
393
|
-
```
|
|
394
|
-
|
|
395
|
-
## Best Practices
|
|
396
|
-
|
|
397
|
-
### 1. Start with Context
|
|
398
|
-
|
|
399
|
-
Always fetch and display the current state before making suggestions.
|
|
400
|
-
|
|
401
|
-
### 2. Research Before Refining
|
|
402
|
-
|
|
403
|
-
Use codebase exploration to inform technical details and ensure accuracy.
|
|
404
|
-
|
|
405
|
-
### 3. Be Specific
|
|
406
|
-
|
|
407
|
-
Replace vague language with concrete, actionable items:
|
|
408
|
-
|
|
409
|
-
- ❌ "Improve performance"
|
|
410
|
-
- ✅ "Reduce API response time to < 100ms for /users endpoint"
|
|
411
|
-
|
|
412
|
-
### 4. Make Criteria Testable
|
|
413
|
-
|
|
414
|
-
Each acceptance criterion should be verifiable:
|
|
415
|
-
|
|
416
|
-
- ❌ "Works correctly"
|
|
417
|
-
- ✅ "Returns 401 status code when authentication token is missing"
|
|
418
|
-
|
|
419
|
-
### 5. Respect Original Intent
|
|
420
|
-
|
|
421
|
-
Enhance and clarify, don't fundamentally change what the task is about.
|
|
422
|
-
|
|
423
|
-
### 6. Note Assumptions
|
|
424
|
-
|
|
425
|
-
If making assumptions during refinement, explicitly note them.
|
|
426
|
-
|
|
427
|
-
## Example Session
|
|
428
|
-
|
|
429
|
-
```bash
|
|
430
|
-
/refine-linear-task DEV-104
|
|
431
|
-
```
|
|
432
|
-
|
|
433
|
-
**Output:**
|
|
434
|
-
|
|
435
|
-
```markdown
|
|
436
|
-
## Current Task Details
|
|
437
|
-
|
|
438
|
-
**Issue**: DEV-104 - Develop Claude code agent and/or slash command for refining a Linear task
|
|
439
|
-
**Status**: In Progress
|
|
440
|
-
**Priority**: Normal
|
|
441
|
-
**Assignee**: Unassigned
|
|
442
|
-
|
|
443
|
-
### Current Description
|
|
444
|
-
|
|
445
|
-
> Create a Claude Code agent and/or slash command that can refine and enhance
|
|
446
|
-
> Linear task descriptions and details.
|
|
447
|
-
>
|
|
448
|
-
> **Context:**
|
|
449
|
-
> Automate task refinement to improve clarity, completeness, and actionability
|
|
450
|
-
> of Linear issues through AI assistance.
|
|
451
|
-
|
|
452
|
-
## Gap Analysis
|
|
453
|
-
|
|
454
|
-
| Aspect | Status | Notes |
|
|
455
|
-
| ------------------- | ------ | ---------------------------------- |
|
|
456
|
-
| Problem Statement | ✅ | Clear goal stated |
|
|
457
|
-
| Context | ⚠️ | Partial - could explain more "why" |
|
|
458
|
-
| Scope | ❌ | No boundaries defined |
|
|
459
|
-
| Acceptance Criteria | ❌ | No success conditions |
|
|
460
|
-
| Technical Details | ❌ | No implementation hints |
|
|
461
|
-
| Dependencies | ⚠️ | Linear MCP implied but not stated |
|
|
462
|
-
|
|
463
|
-
## Codebase Context
|
|
464
|
-
|
|
465
|
-
### Relevant Files
|
|
466
|
-
|
|
467
|
-
- `packages/commands/agnostic/src/` - Existing slash commands
|
|
468
|
-
- `.claude/commands/` - Project-specific commands
|
|
469
|
-
- `packages/linear-task-utils/` - Linear integration utilities
|
|
470
|
-
|
|
471
|
-
### Key Patterns
|
|
472
|
-
|
|
473
|
-
- Commands use markdown with YAML frontmatter
|
|
474
|
-
- Multi-phase workflows with user interaction
|
|
475
|
-
- MCP tools for Linear API access
|
|
476
|
-
|
|
477
|
-
## Refined Task Description
|
|
478
|
-
|
|
479
|
-
### Problem Statement
|
|
480
|
-
|
|
481
|
-
Create a slash command `/refine-linear-task` that analyzes Linear issues and
|
|
482
|
-
enhances their descriptions with improved clarity, completeness, and
|
|
483
|
-
actionability through AI-assisted refinement.
|
|
484
|
-
|
|
485
|
-
### Context
|
|
486
|
-
|
|
487
|
-
Linear tasks often lack sufficient detail for effective implementation.
|
|
488
|
-
This leads to:
|
|
489
|
-
|
|
490
|
-
- Unclear requirements causing rework
|
|
491
|
-
- Missing acceptance criteria making verification difficult
|
|
492
|
-
- Lack of technical context slowing down developers
|
|
493
|
-
|
|
494
|
-
This command automates the refinement process, ensuring tasks are
|
|
495
|
-
implementation-ready.
|
|
496
|
-
|
|
497
|
-
### Scope
|
|
498
|
-
|
|
499
|
-
**In Scope:**
|
|
500
|
-
|
|
501
|
-
- Fetching and analyzing Linear issues via MCP
|
|
502
|
-
- Generating improved descriptions with structured format
|
|
503
|
-
- Codebase context research for technical details
|
|
504
|
-
- User approval workflow before updates
|
|
505
|
-
- Updating Linear issues with refined content
|
|
506
|
-
|
|
507
|
-
**Out of Scope:**
|
|
508
|
-
|
|
509
|
-
- Creating new Linear issues
|
|
510
|
-
- Modifying issue status, priority, or assignment
|
|
511
|
-
- Batch processing multiple issues
|
|
512
|
-
- Integration with other project management tools
|
|
513
|
-
|
|
514
|
-
### Acceptance Criteria
|
|
515
|
-
|
|
516
|
-
- [ ] Command accepts Linear issue identifier (e.g., DEV-123)
|
|
517
|
-
- [ ] Fetches issue details using Linear MCP tools
|
|
518
|
-
- [ ] Analyzes current description for gaps
|
|
519
|
-
- [ ] Researches relevant codebase context
|
|
520
|
-
- [ ] Generates structured, improved description
|
|
521
|
-
- [ ] Presents comparison for user review
|
|
522
|
-
- [ ] Updates Linear only with user approval
|
|
523
|
-
- [ ] Handles errors gracefully with helpful messages
|
|
524
|
-
|
|
525
|
-
### Technical Notes
|
|
526
|
-
|
|
527
|
-
- Use `mcp__linear__linear_search_issues` to fetch issue
|
|
528
|
-
- Use `mcp__linear__linear_update_issue` to save changes
|
|
529
|
-
- Follow existing slash command patterns in `packages/commands/agnostic/src/`
|
|
530
|
-
- Include `allowed-tools` for Linear MCP access
|
|
531
|
-
|
|
532
|
-
### Dependencies
|
|
533
|
-
|
|
534
|
-
- Linear MCP server must be configured and enabled
|
|
535
|
-
- LINEAR_API_KEY environment variable required
|
|
536
|
-
|
|
537
|
-
---
|
|
538
|
-
|
|
539
|
-
## Proposed Changes Summary
|
|
540
|
-
|
|
541
|
-
### Before
|
|
542
|
-
|
|
543
|
-
> Create a Claude Code agent and/or slash command that can refine...
|
|
544
|
-
> (49 words, no structure)
|
|
545
|
-
|
|
546
|
-
### After
|
|
547
|
-
|
|
548
|
-
> Comprehensive description with problem statement, context, scope,
|
|
549
|
-
> acceptance criteria, technical notes, and dependencies
|
|
550
|
-
> (180+ words, fully structured)
|
|
551
|
-
|
|
552
|
-
### Improvements
|
|
553
|
-
|
|
554
|
-
- ✅ Added detailed problem statement with rationale
|
|
555
|
-
- ✅ Defined explicit scope (in/out)
|
|
556
|
-
- ✅ Created 8 testable acceptance criteria
|
|
557
|
-
- ✅ Added technical implementation notes
|
|
558
|
-
- ✅ Documented dependencies
|
|
559
|
-
|
|
560
|
-
---
|
|
561
|
-
|
|
562
|
-
How would you like to proceed?
|
|
563
|
-
|
|
564
|
-
- **Approve**: Update DEV-104 with refined description
|
|
565
|
-
- **Edit**: Modify the refined description first
|
|
566
|
-
- **Cancel**: Discard changes
|
|
567
|
-
```
|
|
568
|
-
|
|
569
|
-
## Notes
|
|
570
|
-
|
|
571
|
-
- This command requires Linear MCP tools to be available
|
|
572
|
-
- Always show the user what will change before updating
|
|
573
|
-
- Preserve the original intent while improving structure
|
|
574
|
-
- Use codebase context to make technical details accurate
|
|
575
|
-
- Follow the principle of least surprise - enhance, don't transform
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Research a topic by combining web search with codebase analysis for comprehensive understanding.
|
|
3
|
-
argument-hint: <topic or question to research>
|
|
4
|
-
allowed-tools: WebSearch(*), WebFetch(*), Bash(git ls-files:*), Bash(git log:*), Bash(git show:*)
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Inputs
|
|
8
|
-
|
|
9
|
-
Parse natural language query to extract:
|
|
10
|
-
|
|
11
|
-
- `query`: The main research question or topic
|
|
12
|
-
- `sources`: Specific sources mentioned (e.g., "check anthropic docs", "search MDN")
|
|
13
|
-
- `codebase_context`: Related files/patterns to analyze (e.g., "compare with existing commands")
|
|
14
|
-
|
|
15
|
-
Examples:
|
|
16
|
-
|
|
17
|
-
- `/research how do Claude Code subagents handle tool permissions`
|
|
18
|
-
- `/research check anthropic docs for MCP protocol and compare with our implementation`
|
|
19
|
-
- `/research best practices for TypeScript monorepo with Nx, focusing on package boundaries`
|
|
20
|
-
- `/research how other CLI tools handle interactive prompts, check existing patterns in commands/`
|
|
21
|
-
|
|
22
|
-
## Task
|
|
23
|
-
|
|
24
|
-
Conduct comprehensive research combining external documentation with internal codebase analysis:
|
|
25
|
-
|
|
26
|
-
1. Search relevant web documentation and resources
|
|
27
|
-
2. Analyze related codebase patterns and implementations
|
|
28
|
-
3. Synthesize findings from both sources
|
|
29
|
-
4. Identify gaps, opportunities, and best practices
|
|
30
|
-
5. Provide actionable insights and recommendations
|
|
31
|
-
|
|
32
|
-
## Delegation
|
|
33
|
-
|
|
34
|
-
Invoke **researcher** with:
|
|
35
|
-
|
|
36
|
-
- `query`: The research question
|
|
37
|
-
- `sources`: Optional list of specific sources to check
|
|
38
|
-
- `codebase_context`: Optional files/patterns to analyze
|
|
39
|
-
|
|
40
|
-
## Output
|
|
41
|
-
|
|
42
|
-
Return structured research findings:
|
|
43
|
-
|
|
44
|
-
- `summary`: Executive summary of findings
|
|
45
|
-
- `key_findings`: Main discoveries from research
|
|
46
|
-
- `codebase_insights`: Relevant patterns from code (when applicable)
|
|
47
|
-
- `recommendations`: Actionable next steps
|
|
48
|
-
- `warnings`: Important gotchas or risks
|
|
49
|
-
- `references`: Sources consulted with links
|