Skip to content

Commit 5e35da3

Browse files
author
catlog22
committed
docs: enhance documentation with examples and fix package names
- Fix incorrect package names (@ccw/cli, @anthropic/claude-code-workflow) to claude-code-workflow - Add workflow examples page with 8 practical artifact samples - Optimize sidebar navigation with emoji icons and second-level grouping - Add usage examples to commands and skills documentation - Update qa/issues.md with current status - Sync Chinese documentation changes
1 parent 8461066 commit 5e35da3

8 files changed

Lines changed: 633 additions & 8 deletions

File tree

docs/.vitepress/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ export default defineConfig({
207207
items: [
208208
{ text: 'Overview', link: '/workflows/' },
209209
{ text: '4-Level System', link: '/workflows/4-level' },
210+
{ text: 'Examples', link: '/workflows/examples' },
210211
{ text: 'Best Practices', link: '/workflows/best-practices' },
211212
{ text: 'Teams', link: '/workflows/teams' }
212213
]

docs/.vitepress/theme/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import DarkModeToggle from './components/DarkModeToggle.vue'
55
import CopyCodeButton from './components/CopyCodeButton.vue'
66
import Breadcrumb from './components/Breadcrumb.vue'
77
import PageToc from './components/PageToc.vue'
8+
import ProfessionalHome from './components/ProfessionalHome.vue'
89
import Layout from './layouts/Layout.vue'
910
import './styles/variables.css'
1011
import './styles/custom.css'
@@ -21,5 +22,6 @@ export default {
2122
app.component('CopyCodeButton', CopyCodeButton)
2223
app.component('Breadcrumb', Breadcrumb)
2324
app.component('PageToc', PageToc)
25+
app.component('ProfessionalHome', ProfessionalHome)
2426
}
2527
}

docs/commands/claude/index.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,110 @@ Most commands support the `--yes` or `-y` flag to enable auto mode and skip conf
111111
/ccw "implement user authentication" --yes
112112
```
113113

114+
## Usage Examples
115+
116+
### Quick Analysis
117+
118+
```bash
119+
# Analyze codebase structure
120+
/ccw "Analyze the authentication module architecture"
121+
122+
# Quick bug diagnosis
123+
/ccw "Diagnose why the login timeout issue occurs"
124+
```
125+
126+
### Planning & Implementation
127+
128+
```bash
129+
# Create implementation plan
130+
/workflow:plan "Add OAuth2 authentication with Google and GitHub providers"
131+
132+
# Execute with auto mode
133+
/workflow:execute --yes
134+
```
135+
136+
### Code Review
137+
138+
```bash
139+
# Review current changes
140+
/cli:codex-review
141+
142+
# Focus on specific area
143+
/cli:codex-review "Focus on security vulnerabilities in auth module"
144+
```
145+
146+
### Session Management
147+
148+
```bash
149+
# List all sessions
150+
/workflow:session:list
151+
152+
# Resume a paused session
153+
/workflow:session:resume "WFS-001"
154+
155+
# Mark session as complete
156+
/workflow:session:complete "WFS-001"
157+
```
158+
159+
### Issue Workflow
160+
161+
```bash
162+
# Discover issues from codebase
163+
/issue:discover
164+
165+
# Create plan for specific issue
166+
/issue:plan "ISSUE-001"
167+
168+
# Execute the fix
169+
/issue:execute --commit
170+
```
171+
172+
### Memory Management
173+
174+
```bash
175+
# Capture current session learnings
176+
/memory:capture "Key insights from authentication refactoring"
177+
178+
# List all memories
179+
/memory:list
180+
181+
# Search memories
182+
/memory:search "authentication patterns"
183+
```
184+
185+
### CLI Tool Invocation
186+
187+
```bash
188+
# Initialize CLI configuration
189+
/cli:cli-init
190+
191+
# Run Gemini analysis
192+
ccw cli -p "Analyze code patterns in src/auth" --tool gemini --mode analysis
193+
194+
# Run with specific rule template
195+
ccw cli -p "Review code quality" --tool gemini --mode analysis --rule analysis-review-code-quality
196+
```
197+
198+
### UI Design Workflow
199+
200+
```bash
201+
# Extract styles from reference image
202+
/workflow:ui-design:style-extract --input "path/to/reference.png"
203+
204+
# Generate prototype
205+
/workflow:ui-design:generate --layout "dashboard" --tokens "design-tokens.json"
206+
```
207+
208+
## Tips
209+
210+
1. **Use Auto Mode Sparingly**: Only use `--yes` or `-y` for routine tasks. Keep manual confirmation for complex decisions.
211+
212+
2. **Session Persistence**: Always complete sessions with `/workflow:session:complete` to preserve learnings.
213+
214+
3. **Memory Capture**: Regularly capture important insights with `/memory:capture` to build project knowledge.
215+
216+
4. **CLI Tool Selection**: Let `/ccw` auto-select the appropriate tool, or explicitly specify with `--tool gemini|qwen|codex`.
217+
114218
## Related Documentation
115219

116220
- [Skills Reference](../skills/)

docs/guide/installation.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,3 +144,48 @@ echo 'set -gx PATH (npm config get prefix)/bin $PATH' >> ~/.config/fish/config.f
144144
::: info Next Steps
145145
After installation, check out the [First Workflow](./first-workflow.md) guide.
146146
:::
147+
148+
## Quick Start Example
149+
150+
After installation, try these commands to verify everything works:
151+
152+
```bash
153+
# 1. Initialize in your project
154+
cd your-project
155+
ccw init
156+
157+
# 2. Try a simple analysis
158+
ccw cli -p "Analyze the project structure" --tool gemini --mode analysis
159+
160+
# 3. Run the main orchestrator
161+
/ccw "Summarize the codebase architecture"
162+
163+
# 4. Check available commands
164+
ccw --help
165+
```
166+
167+
### Expected Output
168+
169+
```
170+
$ ccw --version
171+
CCW v7.0.5
172+
173+
$ ccw init
174+
✔ Created .claude/CLAUDE.md
175+
✔ Created .ccw/workflows/
176+
✔ Configuration complete
177+
178+
$ ccw cli -p "Analyze project" --tool gemini --mode analysis
179+
Analyzing with Gemini...
180+
✔ Analysis complete
181+
```
182+
183+
### Common First-Time Issues
184+
185+
| Issue | Solution |
186+
|-------|----------|
187+
| `ccw: command not found` | Add npm global bin to PATH, or reinstall |
188+
| `Permission denied` | Use `sudo` or fix npm permissions |
189+
| `API key not found` | Configure API keys in `~/.claude/cli-tools.json` |
190+
| `Node version mismatch` | Update to Node.js >= 18.0.0 |
191+

docs/index.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,4 @@ title: CCW Documentation
44
titleTemplate: Claude Code Workspace
55
---
66

7-
<script setup>
8-
import ProfessionalHome from './.vitepress/theme/components/ProfessionalHome.vue'
9-
</script>
10-
117
<ProfessionalHome lang="en" />

docs/skills/index.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,96 @@ Skill(skill="my-custom-skill", args="input")
165165
4. **Compact Recovery**: Use TodoWrite for progress tracking
166166
5. **Documentation**: Include usage examples and expected outputs
167167

168+
## Practical Examples
169+
170+
### Example 1: Feature Development
171+
172+
**Scenario**: Implement a new user dashboard feature
173+
174+
```bash
175+
# Step 1: Brainstorm the feature
176+
ccw brainstorm
177+
# Follow prompts to define:
178+
# - Dashboard widgets (stats, charts, recent activity)
179+
# - Layout preferences
180+
# - Data refresh intervals
181+
182+
# Step 2: Plan implementation
183+
ccw workflow:plan "Build user dashboard with configurable widgets"
184+
# Outputs: IMPL-001.json with task breakdown
185+
186+
# Step 3: Execute with team
187+
ccw team lifecycle
188+
# Or use quick iteration:
189+
ccw workflow:lite-plan && ccw workflow:execute
190+
191+
# Step 4: Review and refine
192+
ccw review-code
193+
# Fix any issues found
194+
```
195+
196+
### Example 2: Bug Investigation
197+
198+
**Scenario**: Debug performance issue in API endpoint
199+
200+
```bash
201+
# Step 1: Quick analysis
202+
ccw cli -p "Analyze /api/users endpoint for N+1 query issues" --tool gemini --mode analysis
203+
204+
# Step 2: Deep dive if needed
205+
ccw workflow:debug-with-file
206+
# Creates hypothesis, instruments code, analyzes logs
207+
208+
# Step 3: Apply fix
209+
ccw workflow:execute --task "Fix N+1 query in user endpoint"
210+
```
211+
212+
### Example 3: Code Migration
213+
214+
**Scenario**: Migrate from JavaScript to TypeScript
215+
216+
```bash
217+
# Step 1: Analyze codebase
218+
ccw workflow:refactor-cycle
219+
# Identifies tech debt and creates migration plan
220+
221+
# Step 2: Execute migration in phases
222+
ccw team roadmap-dev --epic "ts-migration"
223+
# Progressively migrates modules with tests
224+
```
225+
226+
### Example 4: Documentation Generation
227+
228+
**Scenario**: Generate API documentation
229+
230+
```bash
231+
# Step 1: Capture existing patterns
232+
ccw memory:capture "API patterns: REST, versioning, error handling"
233+
234+
# Step 2: Generate docs
235+
ccw software-manual --output ./docs/api/
236+
```
237+
238+
### Example 5: Code Review Pipeline
239+
240+
**Scenario**: Review PR changes
241+
242+
```bash
243+
# Comprehensive review
244+
ccw review-code --focus security,performance
245+
246+
# Or use cycle for auto-fix
247+
ccw review-cycle --max-iterations 3
248+
```
249+
250+
### Tips for Best Results
251+
252+
1. **Start Small**: Begin with `workflow:lite-plan` for simple tasks
253+
2. **Use Memory**: Capture insights with `memory:capture` for future reference
254+
3. **Verify Plans**: Always review generated plans before execution
255+
4. **Iterate**: Use `review-cycle` for continuous improvement
256+
5. **Check Sessions**: Use `workflow:session:list` to track progress
257+
168258
## Design Patterns
169259

170260
Skills use these proven patterns:

0 commit comments

Comments
 (0)