@intentsolutionsio/sugar 2.0.0 → 2.0.2
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/README.md +37 -16
- package/agents/quality-guardian.md +62 -6
- package/agents/sugar-orchestrator.md +39 -8
- package/agents/task-planner.md +33 -8
- package/commands/sugar-analyze.md +45 -0
- package/commands/sugar-review.md +31 -0
- package/commands/sugar-run.md +39 -0
- package/commands/sugar-status.md +16 -0
- package/commands/sugar-task.md +10 -0
- package/commands/sugar-thinking.md +140 -0
- package/hooks/hooks.json +45 -2
- package/package.json +1 -1
- package/skills/managing-autonomous-development/SKILL.md +3 -3
- package/skills/managing-autonomous-development/assets/README.md +1 -0
- package/skills/managing-autonomous-development/references/README.md +1 -0
- package/skills/managing-autonomous-development/scripts/README.md +1 -0
package/commands/sugar-run.md
CHANGED
|
@@ -22,12 +22,14 @@ You are a Sugar autonomous execution specialist. Your role is to safely guide us
|
|
|
22
22
|
## Execution Modes
|
|
23
23
|
|
|
24
24
|
### 1. Validation Mode (Recommended First)
|
|
25
|
+
|
|
25
26
|
```bash
|
|
26
27
|
sugar run --validate
|
|
27
28
|
```
|
|
28
29
|
|
|
29
30
|
**Purpose**: Verify configuration and environment before execution
|
|
30
31
|
**Checks**:
|
|
32
|
+
|
|
31
33
|
- Configuration file validity
|
|
32
34
|
- Claude CLI availability
|
|
33
35
|
- Database accessibility
|
|
@@ -37,12 +39,14 @@ sugar run --validate
|
|
|
37
39
|
**Output**: Comprehensive validation report
|
|
38
40
|
|
|
39
41
|
### 2. Dry Run Mode (Recommended for Testing)
|
|
42
|
+
|
|
40
43
|
```bash
|
|
41
44
|
sugar run --dry-run --once
|
|
42
45
|
```
|
|
43
46
|
|
|
44
47
|
**Purpose**: Simulate execution without making changes
|
|
45
48
|
**Benefits**:
|
|
49
|
+
|
|
46
50
|
- Safe testing of configuration
|
|
47
51
|
- Preview of what Sugar would do
|
|
48
52
|
- Identify issues before real execution
|
|
@@ -51,12 +55,14 @@ sugar run --dry-run --once
|
|
|
51
55
|
**Output**: Detailed simulation log
|
|
52
56
|
|
|
53
57
|
### 3. Single Cycle Mode
|
|
58
|
+
|
|
54
59
|
```bash
|
|
55
60
|
sugar run --once
|
|
56
61
|
```
|
|
57
62
|
|
|
58
63
|
**Purpose**: Execute one autonomous cycle and exit
|
|
59
64
|
**Use Cases**:
|
|
65
|
+
|
|
60
66
|
- Testing real execution
|
|
61
67
|
- Processing urgent tasks
|
|
62
68
|
- Controlled development sessions
|
|
@@ -65,12 +71,14 @@ sugar run --once
|
|
|
65
71
|
**Output**: Execution results and summary
|
|
66
72
|
|
|
67
73
|
### 4. Continuous Autonomous Mode
|
|
74
|
+
|
|
68
75
|
```bash
|
|
69
76
|
sugar run
|
|
70
77
|
```
|
|
71
78
|
|
|
72
79
|
**Purpose**: Continuous autonomous development
|
|
73
80
|
**Behavior**:
|
|
81
|
+
|
|
74
82
|
- Runs indefinitely until stopped
|
|
75
83
|
- Executes tasks based on priority
|
|
76
84
|
- Discovers new work automatically
|
|
@@ -83,28 +91,33 @@ sugar run
|
|
|
83
91
|
Before starting autonomous mode, verify:
|
|
84
92
|
|
|
85
93
|
### Configuration
|
|
94
|
+
|
|
86
95
|
```bash
|
|
87
96
|
cat .sugar/config.yaml | grep -E "dry_run|claude.command|loop_interval"
|
|
88
97
|
```
|
|
89
98
|
|
|
90
99
|
Check:
|
|
100
|
+
|
|
91
101
|
- [ ] `dry_run: false` (for real execution)
|
|
92
102
|
- [ ] Valid Claude CLI path
|
|
93
103
|
- [ ] Reasonable loop_interval (300 seconds recommended)
|
|
94
104
|
- [ ] Appropriate max_concurrent_work setting
|
|
95
105
|
|
|
96
106
|
### Environment
|
|
107
|
+
|
|
97
108
|
- [ ] Sugar initialized: `.sugar/` directory exists
|
|
98
109
|
- [ ] Claude Code CLI accessible
|
|
99
110
|
- [ ] Project in git repository (recommended)
|
|
100
111
|
- [ ] Proper gitignore configuration
|
|
101
112
|
|
|
102
113
|
### Task Queue
|
|
114
|
+
|
|
103
115
|
```bash
|
|
104
116
|
sugar list --limit 5
|
|
105
117
|
```
|
|
106
118
|
|
|
107
119
|
Verify:
|
|
120
|
+
|
|
108
121
|
- Tasks are well-defined
|
|
109
122
|
- Priorities are appropriate
|
|
110
123
|
- No duplicate work
|
|
@@ -113,6 +126,7 @@ Verify:
|
|
|
113
126
|
## Execution Monitoring
|
|
114
127
|
|
|
115
128
|
### Log Monitoring
|
|
129
|
+
|
|
116
130
|
```bash
|
|
117
131
|
# Real-time log viewing
|
|
118
132
|
tail -f .sugar/sugar.log
|
|
@@ -125,6 +139,7 @@ grep "task-123" .sugar/sugar.log
|
|
|
125
139
|
```
|
|
126
140
|
|
|
127
141
|
### Status Checks
|
|
142
|
+
|
|
128
143
|
```bash
|
|
129
144
|
# Check status periodically
|
|
130
145
|
sugar status
|
|
@@ -137,7 +152,9 @@ sugar list --status completed --limit 5
|
|
|
137
152
|
```
|
|
138
153
|
|
|
139
154
|
### Performance Metrics
|
|
155
|
+
|
|
140
156
|
Monitor:
|
|
157
|
+
|
|
141
158
|
- Task completion rate
|
|
142
159
|
- Average execution time
|
|
143
160
|
- Failure rate
|
|
@@ -148,27 +165,35 @@ Monitor:
|
|
|
148
165
|
### Interactive Workflow
|
|
149
166
|
|
|
150
167
|
1. **Validate Configuration**
|
|
168
|
+
|
|
151
169
|
```bash
|
|
152
170
|
sugar run --validate
|
|
153
171
|
```
|
|
172
|
+
|
|
154
173
|
Review output, fix any issues
|
|
155
174
|
|
|
156
175
|
2. **Test with Dry Run**
|
|
176
|
+
|
|
157
177
|
```bash
|
|
158
178
|
sugar run --dry-run --once
|
|
159
179
|
```
|
|
180
|
+
|
|
160
181
|
Verify task selection and approach
|
|
161
182
|
|
|
162
183
|
3. **Single Cycle Test**
|
|
184
|
+
|
|
163
185
|
```bash
|
|
164
186
|
sugar run --once
|
|
165
187
|
```
|
|
188
|
+
|
|
166
189
|
Execute one real task, verify results
|
|
167
190
|
|
|
168
191
|
4. **Start Continuous Mode**
|
|
192
|
+
|
|
169
193
|
```bash
|
|
170
194
|
sugar run
|
|
171
195
|
```
|
|
196
|
+
|
|
172
197
|
Monitor actively for first few cycles
|
|
173
198
|
|
|
174
199
|
### Background Execution
|
|
@@ -212,6 +237,7 @@ kill -9 $(cat .sugar/sugar.pid)
|
|
|
212
237
|
### Common Issues
|
|
213
238
|
|
|
214
239
|
**"Claude CLI not found"**
|
|
240
|
+
|
|
215
241
|
```bash
|
|
216
242
|
# Verify installation
|
|
217
243
|
claude --version
|
|
@@ -222,11 +248,13 @@ vim .sugar/config.yaml
|
|
|
222
248
|
```
|
|
223
249
|
|
|
224
250
|
**"No tasks to execute"**
|
|
251
|
+
|
|
225
252
|
- Run `/sugar-status` to check queue
|
|
226
253
|
- Create tasks with `/sugar-task`
|
|
227
254
|
- Run `/sugar-analyze` for work discovery
|
|
228
255
|
|
|
229
256
|
**"Tasks failing repeatedly"**
|
|
257
|
+
|
|
230
258
|
```bash
|
|
231
259
|
# Review failed tasks
|
|
232
260
|
sugar list --status failed
|
|
@@ -239,6 +267,7 @@ grep -A 10 "task-123" .sugar/sugar.log
|
|
|
239
267
|
```
|
|
240
268
|
|
|
241
269
|
**"Performance issues"**
|
|
270
|
+
|
|
242
271
|
- Reduce `max_concurrent_work` in config
|
|
243
272
|
- Increase `loop_interval` for less frequent cycles
|
|
244
273
|
- Check Claude API rate limits
|
|
@@ -246,18 +275,21 @@ grep -A 10 "task-123" .sugar/sugar.log
|
|
|
246
275
|
## Safety Reminders
|
|
247
276
|
|
|
248
277
|
### Before Starting
|
|
278
|
+
|
|
249
279
|
- ✅ Test with `--dry-run` first
|
|
250
280
|
- ✅ Start with `--once` for validation
|
|
251
281
|
- ✅ Monitor logs actively
|
|
252
282
|
- ✅ Have backups (git commits)
|
|
253
283
|
|
|
254
284
|
### During Execution
|
|
285
|
+
|
|
255
286
|
- ✅ Regular status checks
|
|
256
287
|
- ✅ Review completed tasks
|
|
257
288
|
- ✅ Monitor for failures
|
|
258
289
|
- ✅ Watch resource usage
|
|
259
290
|
|
|
260
291
|
### After Starting
|
|
292
|
+
|
|
261
293
|
- ✅ Verify task completions
|
|
262
294
|
- ✅ Review generated code
|
|
263
295
|
- ✅ Run tests
|
|
@@ -266,6 +298,7 @@ grep -A 10 "task-123" .sugar/sugar.log
|
|
|
266
298
|
## Integration with Development Workflow
|
|
267
299
|
|
|
268
300
|
### Development Sessions
|
|
301
|
+
|
|
269
302
|
```bash
|
|
270
303
|
# Morning startup
|
|
271
304
|
sugar run --once # Process overnight discoveries
|
|
@@ -279,6 +312,7 @@ git commit -am "Day's work"
|
|
|
279
312
|
```
|
|
280
313
|
|
|
281
314
|
### CI/CD Integration
|
|
315
|
+
|
|
282
316
|
```bash
|
|
283
317
|
# Single task execution
|
|
284
318
|
sugar run --once --validate
|
|
@@ -291,6 +325,7 @@ sugar run --once
|
|
|
291
325
|
## Expected Behavior
|
|
292
326
|
|
|
293
327
|
### Normal Operation
|
|
328
|
+
|
|
294
329
|
- Tasks selected by priority
|
|
295
330
|
- Execution respects timeout settings
|
|
296
331
|
- Progress logged to `.sugar/sugar.log`
|
|
@@ -298,6 +333,7 @@ sugar run --once
|
|
|
298
333
|
- Graceful handling of failures
|
|
299
334
|
|
|
300
335
|
### Resource Usage
|
|
336
|
+
|
|
301
337
|
- Moderate CPU during execution
|
|
302
338
|
- Memory usage scales with task complexity
|
|
303
339
|
- Disk I/O for logging and database
|
|
@@ -306,14 +342,17 @@ sugar run --once
|
|
|
306
342
|
## Example Interactions
|
|
307
343
|
|
|
308
344
|
### Example 1: First Time Setup
|
|
345
|
+
|
|
309
346
|
User: "/sugar-run"
|
|
310
347
|
Response: Guides through validation → dry-run → single cycle → continuous mode, with safety checks at each step
|
|
311
348
|
|
|
312
349
|
### Example 2: Quick Execution
|
|
350
|
+
|
|
313
351
|
User: "/sugar-run --once"
|
|
314
352
|
Response: Executes one cycle, reports results, suggests monitoring commands
|
|
315
353
|
|
|
316
354
|
### Example 3: Production Deployment
|
|
355
|
+
|
|
317
356
|
User: "/sugar-run --validate"
|
|
318
357
|
Response: Validates config, then guides through background execution setup with proper monitoring
|
|
319
358
|
|
package/commands/sugar-status.md
CHANGED
|
@@ -15,11 +15,13 @@ You are a Sugar status reporting specialist. Your role is to provide clear, acti
|
|
|
15
15
|
When a user invokes `/sugar-status`, collect and present:
|
|
16
16
|
|
|
17
17
|
### 1. System Status
|
|
18
|
+
|
|
18
19
|
```bash
|
|
19
20
|
sugar status
|
|
20
21
|
```
|
|
21
22
|
|
|
22
23
|
This provides:
|
|
24
|
+
|
|
23
25
|
- Total tasks in the system
|
|
24
26
|
- Task breakdown by status (pending, active, completed, failed)
|
|
25
27
|
- Active execution status
|
|
@@ -27,17 +29,20 @@ This provides:
|
|
|
27
29
|
- Configuration summary
|
|
28
30
|
|
|
29
31
|
### 2. Recent Task Queue
|
|
32
|
+
|
|
30
33
|
```bash
|
|
31
34
|
sugar list --limit 10
|
|
32
35
|
```
|
|
33
36
|
|
|
34
37
|
Shows:
|
|
38
|
+
|
|
35
39
|
- Recent tasks with their status
|
|
36
40
|
- Task IDs for reference
|
|
37
41
|
- Execution times and agent assignments
|
|
38
42
|
- Priority indicators
|
|
39
43
|
|
|
40
44
|
### 3. Execution Metrics (if available)
|
|
45
|
+
|
|
41
46
|
- Average task completion time
|
|
42
47
|
- Success rate
|
|
43
48
|
- Active autonomous execution status
|
|
@@ -46,6 +51,7 @@ Shows:
|
|
|
46
51
|
## Presentation Format
|
|
47
52
|
|
|
48
53
|
### Standard Status View
|
|
54
|
+
|
|
49
55
|
Present information in a clear, scannable format:
|
|
50
56
|
|
|
51
57
|
```
|
|
@@ -71,6 +77,7 @@ Present information in a clear, scannable format:
|
|
|
71
77
|
```
|
|
72
78
|
|
|
73
79
|
### Detailed Status View
|
|
80
|
+
|
|
74
81
|
When `--detailed` is requested:
|
|
75
82
|
|
|
76
83
|
```bash
|
|
@@ -80,6 +87,7 @@ sugar list --status failed
|
|
|
80
87
|
```
|
|
81
88
|
|
|
82
89
|
Include:
|
|
90
|
+
|
|
83
91
|
- Configuration summary (loop interval, concurrency)
|
|
84
92
|
- Failed tasks with error details
|
|
85
93
|
- Active tasks with progress indicators
|
|
@@ -91,24 +99,28 @@ Include:
|
|
|
91
99
|
Based on the status, provide contextual recommendations:
|
|
92
100
|
|
|
93
101
|
### If No Tasks
|
|
102
|
+
|
|
94
103
|
- "No tasks in queue. Consider:"
|
|
95
104
|
- Creating manual tasks with `/sugar-task`
|
|
96
105
|
- Running code analysis with `/sugar-analyze`
|
|
97
106
|
- Checking error logs for issues
|
|
98
107
|
|
|
99
108
|
### If Many Pending Tasks
|
|
109
|
+
|
|
100
110
|
- "Large task backlog detected. Consider:"
|
|
101
111
|
- Starting autonomous mode: `sugar run`
|
|
102
112
|
- Reviewing priorities: `sugar list --priority 5`
|
|
103
113
|
- Adjusting concurrency in `.sugar/config.yaml`
|
|
104
114
|
|
|
105
115
|
### If Failed Tasks
|
|
116
|
+
|
|
106
117
|
- "Failed tasks detected. Recommend:"
|
|
107
118
|
- Review failures: `sugar view TASK_ID`
|
|
108
119
|
- Check logs: `.sugar/sugar.log`
|
|
109
120
|
- Retry or remove failed tasks
|
|
110
121
|
|
|
111
122
|
### If Autonomous Mode Stopped
|
|
123
|
+
|
|
112
124
|
- "Autonomous mode not running. To start:"
|
|
113
125
|
- Test with: `sugar run --dry-run --once`
|
|
114
126
|
- Start: `sugar run`
|
|
@@ -132,14 +144,17 @@ Assess system health and flag issues:
|
|
|
132
144
|
## Example Interactions
|
|
133
145
|
|
|
134
146
|
### Example 1: Healthy System
|
|
147
|
+
|
|
135
148
|
User: "/sugar-status"
|
|
136
149
|
Response: Shows balanced task distribution, recent completions, autonomous mode running
|
|
137
150
|
|
|
138
151
|
### Example 2: Needs Attention
|
|
152
|
+
|
|
139
153
|
User: "/sugar-status"
|
|
140
154
|
Response: Highlights 15 pending tasks, suggests starting autonomous mode, shows last execution was 2 hours ago
|
|
141
155
|
|
|
142
156
|
### Example 3: Troubleshooting
|
|
157
|
+
|
|
143
158
|
User: "/sugar-status --detailed"
|
|
144
159
|
Response: Deep dive into failed tasks, configuration review, log file locations, specific remediation steps
|
|
145
160
|
|
|
@@ -164,6 +179,7 @@ sugar view TASK_ID
|
|
|
164
179
|
## Follow-up Actions
|
|
165
180
|
|
|
166
181
|
After presenting status, suggest relevant next steps:
|
|
182
|
+
|
|
167
183
|
- View specific tasks: `/sugar-review`
|
|
168
184
|
- Create new tasks: `/sugar-task`
|
|
169
185
|
- Analyze codebase: `/sugar-analyze`
|
package/commands/sugar-task.md
CHANGED
|
@@ -15,18 +15,22 @@ You are a Sugar task creation specialist. Your role is to help users create comp
|
|
|
15
15
|
When a user invokes `/sugar-task`, guide them through creating a detailed task specification:
|
|
16
16
|
|
|
17
17
|
### 1. Basic Information (Required)
|
|
18
|
+
|
|
18
19
|
- **Title**: Clear, actionable task description
|
|
19
20
|
- **Type**: bug_fix, feature, test, refactor, documentation, or custom types
|
|
20
21
|
- **Priority**: 1 (low) to 5 (urgent)
|
|
21
22
|
|
|
22
23
|
### 2. Rich Context (Recommended for complex tasks)
|
|
24
|
+
|
|
23
25
|
- **Context**: Detailed description of what needs to be done and why
|
|
24
26
|
- **Business Context**: Strategic importance and business value
|
|
25
27
|
- **Technical Requirements**: Specific technical constraints or requirements
|
|
26
28
|
- **Success Criteria**: Measurable outcomes that define completion
|
|
27
29
|
|
|
28
30
|
### 3. Agent Assignments (Optional for multi-faceted work)
|
|
31
|
+
|
|
29
32
|
Suggest appropriate specialized agents:
|
|
33
|
+
|
|
30
34
|
- `ux_design_specialist`: UI/UX design and customer experience
|
|
31
35
|
- `backend_developer`: Server architecture and database design
|
|
32
36
|
- `frontend_developer`: User-facing applications and interfaces
|
|
@@ -45,11 +49,13 @@ Suggest appropriate specialized agents:
|
|
|
45
49
|
## Command Formats
|
|
46
50
|
|
|
47
51
|
### Simple Task
|
|
52
|
+
|
|
48
53
|
```bash
|
|
49
54
|
sugar add "Task title" --type TYPE --priority N
|
|
50
55
|
```
|
|
51
56
|
|
|
52
57
|
### Rich Task with JSON Context
|
|
58
|
+
|
|
53
59
|
```bash
|
|
54
60
|
sugar add "Task Title" --json --description '{
|
|
55
61
|
"priority": 1-5,
|
|
@@ -65,6 +71,7 @@ sugar add "Task Title" --json --description '{
|
|
|
65
71
|
```
|
|
66
72
|
|
|
67
73
|
### Urgent Task
|
|
74
|
+
|
|
68
75
|
```bash
|
|
69
76
|
sugar add "Critical task" --type bug_fix --urgent
|
|
70
77
|
```
|
|
@@ -79,14 +86,17 @@ sugar add "Critical task" --type bug_fix --urgent
|
|
|
79
86
|
## Examples
|
|
80
87
|
|
|
81
88
|
### Example 1: Simple Bug Fix
|
|
89
|
+
|
|
82
90
|
User: "/sugar-task Fix login timeout issue"
|
|
83
91
|
Response: Creates task with type=bug_fix, priority=4, suggests checking error logs
|
|
84
92
|
|
|
85
93
|
### Example 2: Complex Feature
|
|
94
|
+
|
|
86
95
|
User: "/sugar-task Build customer dashboard"
|
|
87
96
|
Response: Asks clarifying questions, builds rich JSON context with UX designer and frontend developer assignments, success criteria for responsive design
|
|
88
97
|
|
|
89
98
|
### Example 3: Urgent Security Issue
|
|
99
|
+
|
|
90
100
|
User: "/sugar-task Critical auth vulnerability --urgent"
|
|
91
101
|
Response: Creates high-priority task with type=bug_fix, assigns tech-lead agent, emphasizes immediate attention
|
|
92
102
|
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sugar-thinking
|
|
3
|
+
description: View Claude's thinking logs for task execution
|
|
4
|
+
usage: /sugar-thinking [TASK_ID] [OPTIONS]
|
|
5
|
+
examples:
|
|
6
|
+
- /sugar-thinking task-abc123
|
|
7
|
+
- /sugar-thinking --list
|
|
8
|
+
- /sugar-thinking task-abc123 --stats
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Sugar Thinking Command
|
|
12
|
+
|
|
13
|
+
View Claude's thinking logs for task execution, providing visibility into Claude's reasoning process during autonomous task execution.
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
/sugar-thinking [TASK_ID] [OPTIONS]
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Description
|
|
22
|
+
|
|
23
|
+
The `sugar-thinking` command allows you to view the captured thinking blocks from Claude's execution of tasks. This provides critical visibility into how Claude approaches problems and makes decisions during autonomous development.
|
|
24
|
+
|
|
25
|
+
## Arguments
|
|
26
|
+
|
|
27
|
+
- `TASK_ID` - Task ID to view thinking for (required unless using `--list`)
|
|
28
|
+
|
|
29
|
+
## Options
|
|
30
|
+
|
|
31
|
+
- `--list, -l` - List all available thinking logs
|
|
32
|
+
- `--stats, -s` - Show thinking statistics only (blocks count, characters, tools considered)
|
|
33
|
+
|
|
34
|
+
## Examples
|
|
35
|
+
|
|
36
|
+
### View Full Thinking Log
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
/sugar-thinking task-abc123
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Shows the complete thinking log with timestamped thinking blocks.
|
|
43
|
+
|
|
44
|
+
### View Statistics Only
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
/sugar-thinking task-abc123 --stats
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Shows summary statistics including:
|
|
51
|
+
|
|
52
|
+
- Total thinking blocks captured
|
|
53
|
+
- Total characters
|
|
54
|
+
- Average thinking block length
|
|
55
|
+
- Tools considered during thinking
|
|
56
|
+
- Timing information
|
|
57
|
+
|
|
58
|
+
### List All Thinking Logs
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
/sugar-thinking --list
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Lists all available thinking logs sorted by modification time (newest first).
|
|
65
|
+
|
|
66
|
+
## Output Format
|
|
67
|
+
|
|
68
|
+
### Full Log
|
|
69
|
+
|
|
70
|
+
```markdown
|
|
71
|
+
# Thinking Log: Implement user authentication
|
|
72
|
+
|
|
73
|
+
**Task ID:** abc123
|
|
74
|
+
**Started:** 2026-01-07T10:30:00
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## 10:30:05
|
|
79
|
+
|
|
80
|
+
First, I need to understand the current authentication system...
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## 10:30:12
|
|
85
|
+
|
|
86
|
+
*Considering tool: `Read`*
|
|
87
|
+
|
|
88
|
+
I should read the existing auth module to see what's already implemented...
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Summary
|
|
93
|
+
|
|
94
|
+
- **Total thinking blocks:** 15
|
|
95
|
+
- **Total characters:** 3,247
|
|
96
|
+
- **Average length:** 216 chars
|
|
97
|
+
- **Tools considered:** Read, Write, Bash
|
|
98
|
+
|
|
99
|
+
**Completed:** 2026-01-07T10:35:42
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Statistics
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
📊 Thinking Statistics for: Implement user authentication
|
|
106
|
+
Task ID: abc123
|
|
107
|
+
============================================================
|
|
108
|
+
|
|
109
|
+
Thinking Blocks: 15
|
|
110
|
+
Total Characters: 3,247
|
|
111
|
+
Average Length: 216 chars
|
|
112
|
+
Tools Considered: Read, Write, Bash
|
|
113
|
+
First Thinking: 2026-01-07T10:30:05
|
|
114
|
+
Last Thinking: 2026-01-07T10:35:40
|
|
115
|
+
|
|
116
|
+
Full log: .sugar/thinking/abc123.md
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Use Cases
|
|
120
|
+
|
|
121
|
+
1. **Debugging Failed Tasks**: Understand why a task succeeded or failed by reviewing Claude's reasoning
|
|
122
|
+
2. **Learning from Claude**: Study how Claude approaches different types of problems
|
|
123
|
+
3. **Verification**: Confirm Claude is following expected strategies and approaches
|
|
124
|
+
4. **Pattern Analysis**: Track thinking patterns across tasks to improve prompts
|
|
125
|
+
|
|
126
|
+
## Configuration
|
|
127
|
+
|
|
128
|
+
Thinking capture is enabled by default. To disable, add to `.sugar/config.yaml`:
|
|
129
|
+
|
|
130
|
+
```yaml
|
|
131
|
+
sugar:
|
|
132
|
+
executor:
|
|
133
|
+
thinking_capture: false
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Related Commands
|
|
137
|
+
|
|
138
|
+
- `/sugar-status` - View overall system status
|
|
139
|
+
- `/sugar-view` - View task details
|
|
140
|
+
- `/sugar-task-type` - Manage task type configurations
|
package/hooks/hooks.json
CHANGED
|
@@ -1,4 +1,47 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
2
|
+
"hooks": {
|
|
3
|
+
"PreToolUse": [
|
|
4
|
+
{
|
|
5
|
+
"matcher": "Bash",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "echo '{\"decision\": \"approve\"}'"
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"PostToolUse": [
|
|
15
|
+
{
|
|
16
|
+
"matcher": "Bash",
|
|
17
|
+
"description": "Suggest task creation when errors are detected",
|
|
18
|
+
"hooks": [
|
|
19
|
+
{
|
|
20
|
+
"type": "command",
|
|
21
|
+
"command": "if echo \"$CLAUDE_TOOL_OUTPUT\" | grep -qiE 'error|exception|fail|bug|crash'; then echo 'Error detected! Consider creating a Sugar task to fix this with /sugar-task' >&2; fi; exit 0"
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"matcher": "Bash",
|
|
27
|
+
"description": "Suggest task update after git commits",
|
|
28
|
+
"hooks": [
|
|
29
|
+
{
|
|
30
|
+
"type": "command",
|
|
31
|
+
"command": "if echo \"$CLAUDE_TOOL_INPUT\" | grep -q 'git commit'; then echo 'Code committed! If this completes a Sugar task, use: sugar update TASK_ID --status completed' >&2; fi; exit 0"
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"Notification": [
|
|
37
|
+
{
|
|
38
|
+
"hooks": [
|
|
39
|
+
{
|
|
40
|
+
"type": "command",
|
|
41
|
+
"command": "echo 'Sugar notification hook'"
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
4
47
|
}
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@ allowed-tools: Read, Write, Edit, Grep, Glob, Bash(cmd:*)
|
|
|
6
6
|
version: 1.0.0
|
|
7
7
|
author: Steven Leggett <contact@roboticforce.io>
|
|
8
8
|
license: MIT
|
|
9
|
-
|
|
9
|
+
compatibility: Designed for Claude Code, also compatible with Codex and OpenClaw
|
|
10
10
|
tags: [devops, workflow, autonomous-development]
|
|
11
11
|
---
|
|
12
12
|
# Managing Autonomous Development
|
|
@@ -61,5 +61,5 @@ Manage Sugar's autonomous development workflows: create development tasks, check
|
|
|
61
61
|
## Resources
|
|
62
62
|
|
|
63
63
|
- Sugar plugin documentation: https://github.com/roboticforce/sugar
|
|
64
|
-
- Task automation patterns:
|
|
65
|
-
- Autonomous development best practices:
|
|
64
|
+
- Task automation patterns:
|
|
65
|
+
- Autonomous development best practices: best-practices/
|