You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: Make skills import canonical sources instead of duplicating content (#1557)
* refactor: Make skills import canonical sources instead of duplicating content
Eliminate content duplication by converting skills to thin wrappers that reference canonical sources.
## Changes
- Refactor `.claude/skills/default-workflow/SKILL.md` (253→84 lines, 67% reduction)
- Refactor `.claude/skills/ultrathink-orchestrator/SKILL.md` (197→88 lines, 55% reduction)
- Remove `.claude/skills/default-workflow/reference/REVIEW_PHASES.md` (duplicated content)
## Benefits
- Single source of truth for workflow and command definitions
- No content duplication or drift between skills and canonical sources
- Changes to canonical sources automatically inherited by skills
- Clear separation: skills handle auto-activation, canonical sources define logic
## Implementation
Skills now use Read tool to load canonical sources:
- default-workflow → `.claude/workflow/DEFAULT_WORKFLOW.md`
- ultrathink-orchestrator → `.claude/commands/amplihack/ultrathink.md`
Fixes#1554
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: Use relative paths instead of hardcoded absolute paths in skills
Replace hardcoded absolute paths with project-relative paths to ensure
skills work across different installations and clone locations.
## Changes
- `.claude/skills/default-workflow/SKILL.md`: Use `.claude/workflow/DEFAULT_WORKFLOW.md`
- `.claude/skills/ultrathink-orchestrator/SKILL.md`: Use `.claude/commands/amplihack/ultrathink.md`
- Added note that Claude Code resolves relative paths automatically
## Addresses Review Feedback
From PR review: Hardcoded paths would break for users who clone repo
to different locations. Relative paths ensure portability.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Ubuntu <azureuser@amplihack2.yb0a3bvkdghunmsjr4s3fnfhra.phxx.internal.cloudapp.net>
Co-authored-by: Claude <noreply@anthropic.com>
This skill defines the default workflow for all non-trivial code changes.
20
-
You can customize this workflow by editing this file.
19
+
## Purpose
21
20
22
-
## How This Workflow Works
21
+
This skill provides the standard development workflow for all non-trivial code changes in amplihack. It auto-activates when detecting multi-file implementations, complex integrations, or significant refactoring work.
23
22
24
-
**This workflow is the single source of truth for:**
23
+
The workflow defines the canonical execution process: from requirements clarification through design, implementation, testing, review, and merge. It ensures consistent quality by orchestrating specialized agents at each step and enforcing philosophy compliance throughout.
25
24
26
-
- The order of operations (steps must be followed sequentially)
27
-
- Git workflow (branch, commit, push, PR process)
28
-
- CI/CD integration points
29
-
- Review and merge requirements
25
+
This is a thin wrapper that references the complete workflow definition stored in a single canonical location, ensuring no duplication or drift between the skill interface and the workflow specification.
30
26
31
-
**Execution approach:**
27
+
## Canonical Source
32
28
33
-
- Start with `/ultrathink` for any non-trivial task
34
-
- UltraThink reads this workflow and orchestrates agents to execute it
35
-
- Each step leverages specialized agents for maximum effectiveness
36
-
- The workflow defines the process; agents execute the work
29
+
**This skill is a thin wrapper that references the canonical workflow:**
[BUGFIX-Y] Step 5: Implement the Solution - Use builder agent from specifications
103
-
...
104
-
```
105
-
106
-
This step-based structure helps users understand:
107
-
108
-
- Exactly which workflow step is currently active
109
-
- How many steps remain (e.g., Step 5 of 15 means 10 steps left)
110
-
- What comes next in the workflow
111
-
112
-
## The 15-Step Workflow (Part 1: Implementation)
113
-
114
-
This file contains **Steps 1-8** (Requirements through Testing). For the review and merge phases, see [reference/REVIEW_PHASES.md](reference/REVIEW_PHASES.md).
115
-
116
-
### Step 1: Rewrite and Clarify Requirements
117
-
118
-
-[ ]**FIRST: Identify explicit user requirements** that CANNOT be optimized away
119
-
-[ ]**Always use** prompt-writer agent to clarify task requirements
120
-
-[ ]**Use** analyzer agent to understand existing codebase context
121
-
-[ ]**Use** ambiguity agent if requirements are unclear
122
-
-[ ] Remove ambiguity from the task description
123
-
-[ ] Define clear success criteria
124
-
-[ ] Document acceptance criteria
125
-
-[ ]**CRITICAL: Pass explicit requirements to ALL subsequent agents**
126
-
127
-
### Step 2: Create GitHub Issue
128
-
129
-
-[ ]**Use** GitHub issue creation tool via agent
130
-
-[ ] Create issue using `gh issue create`
131
-
-[ ] Include clear problem description
132
-
-[ ] Define requirements and constraints
133
-
-[ ] Add success criteria
134
-
-[ ] Assign appropriate labels
135
-
136
-
### Step 3: Setup Worktree and Branch
137
-
138
-
-[ ]**Always use** worktree-manager agent for worktree operations
139
-
-[ ] Create new git worktree in `./worktrees/{branch-name}` for isolated development
140
-
-[ ] Create branch with format: `feat/issue-{number}-{brief-description}`
-[ ] Push branch to remote with tracking: `git push -u origin {branch-name}`
143
-
-[ ] Switch to new worktree directory: `cd ./worktrees/{branch-name}`
144
-
145
-
### Step 4: Research and Design with TDD
146
-
147
-
**⚠️ INVESTIGATION-FIRST PATTERN**: If the existing codebase or system is unfamiliar/complex, consider running the **INVESTIGATION_WORKFLOW.md** (6 phases) FIRST, then return here to continue development. This is especially valuable when:
148
-
149
-
- The codebase area is unfamiliar or poorly documented
150
-
- The feature touches multiple complex subsystems
151
-
- You need to understand existing patterns before designing new ones
152
-
- The architecture or integration points are unclear
153
-
154
-
After investigation completes, continue with these tasks:
155
-
156
-
-[ ]**Use** architect agent to design solution architecture
157
-
-[ ]**Use** api-designer agent for API contracts (if applicable)
158
-
-[ ]**Use** database agent for data model design (if applicable)
159
-
-[ ]**Use** tester agent to write failing tests (TDD approach)
160
-
-[ ]**Use** security agent to identify security requirements
161
-
-[ ]**💡 TIP**: For diagnostic follow-up questions during research, consider [parallel agent investigation](.claude/CLAUDE.md#parallel-agent-investigation-strategy)
162
-
-[ ] Document module specifications
163
-
-[ ] Create detailed implementation plan
164
-
-[ ] Identify risks and dependencies
165
-
166
-
### Step 5: Implement the Solution
167
-
168
-
-[ ]**Always use** builder agent to implement from specifications
169
-
-[ ]**Use** integration agent for external service connections
170
-
-[ ] Follow the architecture design
171
-
-[ ] Make failing tests pass iteratively
172
-
-[ ] Ensure all requirements are met
173
-
-[ ] Add inline documentation
174
-
175
-
### Step 6: Refactor and Simplify
176
-
177
-
-[ ]**CRITICAL: Provide cleanup agent with original user requirements**
178
-
-[ ]**Always use** cleanup agent for ruthless simplification WITHIN user constraints
179
-
-[ ]**Use** optimizer agent for performance improvements
-[ ] Eliminate dead code (unless user explicitly wanted it)
182
-
-[ ] Simplify complex logic (without violating user specifications)
183
-
-[ ] Ensure single responsibility principle
184
-
-[ ] Verify no placeholders remain - no stubs, no TODOs, no swallowed exceptions, no unimplemented functions - follow the zero-BS principle.
185
-
-[ ]**VALIDATE: All explicit user requirements still preserved**
186
-
187
-
### Step 7: Run Tests and Pre-commit Hooks
188
-
189
-
-[ ]**Use** pre-commit-diagnostic agent if hooks fail
190
-
-[ ]**💡 TIP**: For test failures, use [parallel investigation](.claude/CLAUDE.md#parallel-agent-investigation-strategy) to explore issues while continuing work
191
-
-[ ] Run all unit tests
192
-
-[ ] Execute `pre-commit run --all-files`
193
-
-[ ] Fix any linting issues
194
-
-[ ] Fix any formatting issues
195
-
-[ ] Resolve type checking errors
196
-
-[ ] Iterate until all checks pass
197
-
198
-
### Step 8: Mandatory Local Testing (NOT in CI)
199
-
200
-
**CRITICAL: Test all changes locally in realistic scenarios BEFORE committing.**
201
-
202
-
-[ ]**Test simple use cases** - Basic functionality verification
203
-
-[ ]**Test complex use cases** - Edge cases and longer operations
204
-
-[ ]**Test integration points** - External dependencies and APIs
205
-
-[ ]**Verify no regressions** - Ensure existing functionality still works
206
-
-[ ]**Document test results** - What was tested and results
207
-
-[ ]**RULE: Never commit without local testing**
208
-
209
-
**Examples of required tests:**
210
-
211
-
- If proxy changes: Test simple and long requests locally
212
-
- If API changes: Test with real client requests
213
-
- If CLI changes: Run actual commands with various options
214
-
- If database changes: Test with actual data operations
215
-
216
-
**Why this matters:**
217
-
218
-
- CI checks can't catch all real-world issues
219
-
- Local testing catches problems before they reach users
220
-
- Faster feedback loop than waiting for CI
221
-
- Prevents embarrassing failures after merge
222
-
223
-
---
224
-
225
-
## Next Steps: Review and Merge Phases
226
-
227
-
After completing Steps 1-8, continue with **Steps 9-15** in [reference/REVIEW_PHASES.md](reference/REVIEW_PHASES.md):
228
-
229
-
- Step 9: Commit and Push
230
-
- Step 10: Open Pull Request
231
-
- Step 11: Review the PR
232
-
- Step 12: Implement Review Feedback
233
-
- Step 13: Philosophy Compliance Check
234
-
- Step 14: Ensure PR is Mergeable
235
-
- Step 15: Final Cleanup and Verification
236
-
237
-
## Customization
238
-
239
-
To customize this workflow:
240
-
241
-
1. Edit this file to modify, add, or remove steps
242
-
2. Save your changes
243
-
3. The updated workflow will be used for future tasks
244
-
245
-
## Philosophy Notes
246
-
247
-
This workflow enforces our core principles:
248
-
249
-
-**Ruthless Simplicity**: Each step has one clear purpose
250
-
-**Test-Driven Development**: Write tests before implementation
251
-
-**Quality Gates**: Multiple review and validation steps
252
-
-**Documentation**: Clear commits and PR descriptions
0 commit comments