get-shit-done-cc 1.9.11 → 1.10.0-experimental.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/README.md +10 -9
- package/agents/design-specialist.md +222 -0
- package/agents/gsd-executor.md +37 -375
- package/agents/gsd-planner.md +15 -108
- package/bin/install.js +92 -5
- package/commands/gsd/autopilot.md +518 -0
- package/commands/gsd/checkpoints.md +229 -0
- package/commands/gsd/design-system.md +70 -0
- package/commands/gsd/discuss-design.md +77 -0
- package/commands/gsd/extend.md +80 -0
- package/commands/gsd/help.md +46 -17
- package/commands/gsd/new-project.md +94 -8
- package/commands/gsd/plan-phase.md +35 -5
- package/get-shit-done/references/ccr-integration.md +468 -0
- package/get-shit-done/references/checkpoint-execution.md +369 -0
- package/get-shit-done/references/checkpoint-types.md +728 -0
- package/get-shit-done/references/deviation-rules.md +215 -0
- package/get-shit-done/references/framework-patterns.md +543 -0
- package/get-shit-done/references/ui-principles.md +258 -0
- package/get-shit-done/references/verification-patterns.md +1 -1
- package/get-shit-done/skills/gsd-extend/SKILL.md +154 -0
- package/get-shit-done/skills/gsd-extend/references/agent-structure.md +305 -0
- package/get-shit-done/skills/gsd-extend/references/extension-anatomy.md +123 -0
- package/get-shit-done/skills/gsd-extend/references/reference-structure.md +408 -0
- package/get-shit-done/skills/gsd-extend/references/template-structure.md +370 -0
- package/get-shit-done/skills/gsd-extend/references/validation-rules.md +140 -0
- package/get-shit-done/skills/gsd-extend/references/workflow-structure.md +253 -0
- package/get-shit-done/skills/gsd-extend/templates/agent-template.md +234 -0
- package/get-shit-done/skills/gsd-extend/templates/reference-template.md +239 -0
- package/get-shit-done/skills/gsd-extend/templates/workflow-template.md +169 -0
- package/get-shit-done/skills/gsd-extend/workflows/create-approach.md +332 -0
- package/get-shit-done/skills/gsd-extend/workflows/list-extensions.md +133 -0
- package/get-shit-done/skills/gsd-extend/workflows/remove-extension.md +93 -0
- package/get-shit-done/skills/gsd-extend/workflows/validate-extension.md +184 -0
- package/get-shit-done/templates/autopilot-script-simple.sh +181 -0
- package/get-shit-done/templates/autopilot-script.sh +1142 -0
- package/get-shit-done/templates/autopilot-script.sh.backup +1142 -0
- package/get-shit-done/templates/design-system.md +238 -0
- package/get-shit-done/templates/phase-design.md +205 -0
- package/get-shit-done/templates/phase-models-template.json +71 -0
- package/get-shit-done/templates/phase-prompt.md +4 -4
- package/get-shit-done/templates/state.md +37 -0
- package/get-shit-done/tui/App.tsx +169 -0
- package/get-shit-done/tui/README.md +107 -0
- package/get-shit-done/tui/build.js +37 -0
- package/get-shit-done/tui/components/ActivityFeed.tsx +126 -0
- package/get-shit-done/tui/components/PhaseCard.tsx +86 -0
- package/get-shit-done/tui/components/StatsBar.tsx +147 -0
- package/get-shit-done/tui/dist/index.js +387 -0
- package/get-shit-done/tui/index.tsx +12 -0
- package/get-shit-done/tui/package-lock.json +1074 -0
- package/get-shit-done/tui/package.json +22 -0
- package/get-shit-done/tui/utils/pipeReader.ts +129 -0
- package/get-shit-done/workflows/design-system.md +245 -0
- package/get-shit-done/workflows/discuss-design.md +330 -0
- package/get-shit-done/workflows/execute-phase.md +44 -1
- package/get-shit-done/workflows/execute-plan-auth.md +122 -0
- package/get-shit-done/workflows/execute-plan-checkpoints.md +541 -0
- package/get-shit-done/workflows/execute-plan.md +34 -856
- package/package.json +8 -3
- package/commands/gsd/whats-new.md +0 -124
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Remove an extension from project or global scope.
|
|
3
|
+
</purpose>
|
|
4
|
+
|
|
5
|
+
<process>
|
|
6
|
+
|
|
7
|
+
<step name="identify_extension">
|
|
8
|
+
If path not provided, list extensions and ask which to remove:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
echo "=== Project Extensions ==="
|
|
12
|
+
ls .planning/extensions/*/*.md 2>/dev/null
|
|
13
|
+
|
|
14
|
+
echo ""
|
|
15
|
+
echo "=== Global Extensions ==="
|
|
16
|
+
ls ~/.claude/gsd-extensions/*/*.md 2>/dev/null
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Use AskUserQuestion to select which extension to remove.
|
|
20
|
+
</step>
|
|
21
|
+
|
|
22
|
+
<step name="confirm_removal">
|
|
23
|
+
Before removing, show what will happen:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
## Remove Extension: {name}
|
|
27
|
+
|
|
28
|
+
**Location:** {path}
|
|
29
|
+
**Type:** {workflow|agent|reference|template}
|
|
30
|
+
|
|
31
|
+
{If this extension overrides a built-in:}
|
|
32
|
+
**Note:** This extension overrides the built-in `{name}`.
|
|
33
|
+
After removal, GSD will use the built-in version.
|
|
34
|
+
|
|
35
|
+
{If this extension overrides a global extension:}
|
|
36
|
+
**Note:** This extension overrides a global extension.
|
|
37
|
+
After removal, the global version will be used.
|
|
38
|
+
|
|
39
|
+
**This action cannot be undone.**
|
|
40
|
+
|
|
41
|
+
Remove this extension?
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Use AskUserQuestion:
|
|
45
|
+
- header: "Confirm"
|
|
46
|
+
- question: "Remove this extension?"
|
|
47
|
+
- options:
|
|
48
|
+
- "Yes, remove it" - Delete the extension file
|
|
49
|
+
- "No, keep it" - Cancel removal
|
|
50
|
+
</step>
|
|
51
|
+
|
|
52
|
+
<step name="remove_extension">
|
|
53
|
+
If confirmed, remove the extension:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
rm "$EXT_PATH"
|
|
57
|
+
echo "Extension removed: $EXT_PATH"
|
|
58
|
+
|
|
59
|
+
# Check if directory is now empty
|
|
60
|
+
DIR=$(dirname "$EXT_PATH")
|
|
61
|
+
if [[ -z "$(ls -A $DIR 2>/dev/null)" ]]; then
|
|
62
|
+
rmdir "$DIR"
|
|
63
|
+
echo "Empty directory removed: $DIR"
|
|
64
|
+
fi
|
|
65
|
+
```
|
|
66
|
+
</step>
|
|
67
|
+
|
|
68
|
+
<step name="report_result">
|
|
69
|
+
Confirm removal:
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
## Extension Removed
|
|
73
|
+
|
|
74
|
+
**Name:** {name}
|
|
75
|
+
**Was at:** {path}
|
|
76
|
+
|
|
77
|
+
{If there's a fallback:}
|
|
78
|
+
**Now using:** {fallback path} (built-in | global)
|
|
79
|
+
|
|
80
|
+
{If no fallback:}
|
|
81
|
+
**Note:** No fallback exists. This functionality is no longer available.
|
|
82
|
+
```
|
|
83
|
+
</step>
|
|
84
|
+
|
|
85
|
+
</process>
|
|
86
|
+
|
|
87
|
+
<success_criteria>
|
|
88
|
+
- [ ] Extension identified
|
|
89
|
+
- [ ] User confirmed removal
|
|
90
|
+
- [ ] Extension file deleted
|
|
91
|
+
- [ ] Empty directories cleaned up
|
|
92
|
+
- [ ] Fallback status communicated
|
|
93
|
+
</success_criteria>
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Validate an extension file for errors before activation.
|
|
3
|
+
</purpose>
|
|
4
|
+
|
|
5
|
+
<required_reading>
|
|
6
|
+
@~/.claude/get-shit-done/skills/gsd-extend/references/validation-rules.md
|
|
7
|
+
</required_reading>
|
|
8
|
+
|
|
9
|
+
<process>
|
|
10
|
+
|
|
11
|
+
<step name="identify_extension">
|
|
12
|
+
If path not provided, scan for extensions and ask which to validate:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
echo "Available extensions:"
|
|
16
|
+
ls .planning/extensions/*/*.md 2>/dev/null
|
|
17
|
+
ls ~/.claude/gsd-extensions/*/*.md 2>/dev/null
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Use AskUserQuestion to select if multiple found.
|
|
21
|
+
</step>
|
|
22
|
+
|
|
23
|
+
<step name="determine_type">
|
|
24
|
+
Determine extension type from path:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# Extract type from path
|
|
28
|
+
TYPE=$(dirname "$EXT_PATH" | xargs basename)
|
|
29
|
+
# workflows, agents, references, or templates
|
|
30
|
+
```
|
|
31
|
+
</step>
|
|
32
|
+
|
|
33
|
+
<step name="validate_frontmatter">
|
|
34
|
+
Check YAML frontmatter:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# Extract frontmatter
|
|
38
|
+
sed -n '1,/^---$/p' "$EXT_PATH" | tail -n +2 | head -n -1 > /tmp/frontmatter.yaml
|
|
39
|
+
|
|
40
|
+
# Check for required fields based on type
|
|
41
|
+
case $TYPE in
|
|
42
|
+
workflows)
|
|
43
|
+
grep -q "^name:" /tmp/frontmatter.yaml && echo "✓ name" || echo "✗ name missing"
|
|
44
|
+
grep -q "^description:" /tmp/frontmatter.yaml && echo "✓ description" || echo "✗ description missing"
|
|
45
|
+
grep -q "^triggers:" /tmp/frontmatter.yaml && echo "✓ triggers" || echo "✗ triggers missing"
|
|
46
|
+
;;
|
|
47
|
+
agents)
|
|
48
|
+
grep -q "^name:" /tmp/frontmatter.yaml && echo "✓ name" || echo "✗ name missing"
|
|
49
|
+
grep -q "^description:" /tmp/frontmatter.yaml && echo "✓ description" || echo "✗ description missing"
|
|
50
|
+
grep -q "^tools:" /tmp/frontmatter.yaml && echo "✓ tools" || echo "✗ tools missing"
|
|
51
|
+
;;
|
|
52
|
+
references)
|
|
53
|
+
grep -q "^name:" /tmp/frontmatter.yaml && echo "✓ name" || echo "✗ name missing"
|
|
54
|
+
grep -q "^description:" /tmp/frontmatter.yaml && echo "✓ description" || echo "✗ description missing"
|
|
55
|
+
grep -q "^load_when:" /tmp/frontmatter.yaml && echo "✓ load_when" || echo "✗ load_when missing"
|
|
56
|
+
;;
|
|
57
|
+
templates)
|
|
58
|
+
grep -q "^name:" /tmp/frontmatter.yaml && echo "✓ name" || echo "✗ name missing"
|
|
59
|
+
grep -q "^description:" /tmp/frontmatter.yaml && echo "✓ description" || echo "✗ description missing"
|
|
60
|
+
grep -q "^used_by:" /tmp/frontmatter.yaml && echo "✓ used_by" || echo "✗ used_by missing"
|
|
61
|
+
;;
|
|
62
|
+
esac
|
|
63
|
+
```
|
|
64
|
+
</step>
|
|
65
|
+
|
|
66
|
+
<step name="validate_name_match">
|
|
67
|
+
Check that name field matches filename:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
FILENAME=$(basename "$EXT_PATH" .md)
|
|
71
|
+
NAME=$(grep "^name:" /tmp/frontmatter.yaml | cut -d: -f2 | xargs)
|
|
72
|
+
|
|
73
|
+
if [[ "$FILENAME" == "$NAME" ]]; then
|
|
74
|
+
echo "✓ Name matches filename"
|
|
75
|
+
else
|
|
76
|
+
echo "✗ Name mismatch: frontmatter says '$NAME' but file is '$FILENAME.md'"
|
|
77
|
+
fi
|
|
78
|
+
```
|
|
79
|
+
</step>
|
|
80
|
+
|
|
81
|
+
<step name="validate_xml_structure">
|
|
82
|
+
Check XML tag balance:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
# Count opening and closing tags
|
|
86
|
+
OPEN_TAGS=$(grep -oE '<[a-z_]+[^/>]*>' "$EXT_PATH" | wc -l)
|
|
87
|
+
CLOSE_TAGS=$(grep -oE '</[a-z_]+>' "$EXT_PATH" | wc -l)
|
|
88
|
+
SELF_CLOSE=$(grep -oE '<[a-z_]+[^>]*/>' "$EXT_PATH" | wc -l)
|
|
89
|
+
|
|
90
|
+
echo "Opening tags: $OPEN_TAGS"
|
|
91
|
+
echo "Closing tags: $CLOSE_TAGS"
|
|
92
|
+
echo "Self-closing: $SELF_CLOSE"
|
|
93
|
+
|
|
94
|
+
if [[ "$OPEN_TAGS" -eq "$CLOSE_TAGS" ]]; then
|
|
95
|
+
echo "✓ XML tags balanced"
|
|
96
|
+
else
|
|
97
|
+
echo "✗ XML tags unbalanced"
|
|
98
|
+
fi
|
|
99
|
+
```
|
|
100
|
+
</step>
|
|
101
|
+
|
|
102
|
+
<step name="validate_references">
|
|
103
|
+
Check that @-references point to existing files:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
grep -oE '@[~./][^[:space:]]+' "$EXT_PATH" | while read ref; do
|
|
107
|
+
# Expand ~ to home
|
|
108
|
+
path="${ref#@}"
|
|
109
|
+
path="${path/#\~/$HOME}"
|
|
110
|
+
|
|
111
|
+
if [[ -f "$path" ]]; then
|
|
112
|
+
echo "✓ Reference exists: $ref"
|
|
113
|
+
else
|
|
114
|
+
echo "✗ Reference missing: $ref"
|
|
115
|
+
fi
|
|
116
|
+
done
|
|
117
|
+
```
|
|
118
|
+
</step>
|
|
119
|
+
|
|
120
|
+
<step name="type_specific_validation">
|
|
121
|
+
Run type-specific validation:
|
|
122
|
+
|
|
123
|
+
**Workflows:**
|
|
124
|
+
- Check triggers are valid values
|
|
125
|
+
- Check `<process>` section exists
|
|
126
|
+
- Check `<step>` elements present
|
|
127
|
+
|
|
128
|
+
**Agents:**
|
|
129
|
+
- Check tools are valid tool names
|
|
130
|
+
- Check `<role>` section exists
|
|
131
|
+
- Check `<output_format>` section exists
|
|
132
|
+
|
|
133
|
+
**References:**
|
|
134
|
+
- Check load_when has at least one keyword
|
|
135
|
+
- Check content body is not empty
|
|
136
|
+
|
|
137
|
+
**Templates:**
|
|
138
|
+
- Check `<template>` section exists
|
|
139
|
+
- Check `<guidelines>` section exists
|
|
140
|
+
</step>
|
|
141
|
+
|
|
142
|
+
<step name="report_results">
|
|
143
|
+
Present validation results:
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
## Validation Report: {extension_name}
|
|
147
|
+
|
|
148
|
+
**Type:** {type}
|
|
149
|
+
**Location:** {path}
|
|
150
|
+
|
|
151
|
+
### Frontmatter
|
|
152
|
+
{results}
|
|
153
|
+
|
|
154
|
+
### Structure
|
|
155
|
+
{results}
|
|
156
|
+
|
|
157
|
+
### References
|
|
158
|
+
{results}
|
|
159
|
+
|
|
160
|
+
### Type-Specific
|
|
161
|
+
{results}
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
**Status:** {VALID | INVALID}
|
|
166
|
+
|
|
167
|
+
{If invalid:}
|
|
168
|
+
**Issues to fix:**
|
|
169
|
+
1. {issue}
|
|
170
|
+
2. {issue}
|
|
171
|
+
```
|
|
172
|
+
</step>
|
|
173
|
+
|
|
174
|
+
</process>
|
|
175
|
+
|
|
176
|
+
<success_criteria>
|
|
177
|
+
- [ ] Extension file found and read
|
|
178
|
+
- [ ] Frontmatter validated
|
|
179
|
+
- [ ] Name/filename match checked
|
|
180
|
+
- [ ] XML structure validated
|
|
181
|
+
- [ ] References validated
|
|
182
|
+
- [ ] Type-specific checks run
|
|
183
|
+
- [ ] Clear report provided
|
|
184
|
+
</success_criteria>
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# ═══════════════════════════════════════════════════════════════════════════════
|
|
3
|
+
# GSD Autopilot Script
|
|
4
|
+
# Generated: {{timestamp}}
|
|
5
|
+
# Project: {{project_name}}
|
|
6
|
+
# Model: {{autopilot_model}}
|
|
7
|
+
# ═══════════════════════════════════════════════════════════════════════════════
|
|
8
|
+
|
|
9
|
+
set -euo pipefail
|
|
10
|
+
|
|
11
|
+
# Signal to GSD commands that we're in autopilot mode
|
|
12
|
+
export GSD_AUTOPILOT=1
|
|
13
|
+
|
|
14
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
15
|
+
# Configuration
|
|
16
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
17
|
+
|
|
18
|
+
PROJECT_DIR="{{project_dir}}"
|
|
19
|
+
PROJECT_NAME="{{project_name}}"
|
|
20
|
+
PHASES=({{phases}})
|
|
21
|
+
CHECKPOINT_MODE="{{checkpoint_mode}}"
|
|
22
|
+
MAX_RETRIES={{max_retries}}
|
|
23
|
+
BUDGET_LIMIT={{budget_limit}}
|
|
24
|
+
WEBHOOK_URL="{{webhook_url}}"
|
|
25
|
+
|
|
26
|
+
# Model selection (from config)
|
|
27
|
+
AUTOPILOT_MODEL="{{autopilot_model}}"
|
|
28
|
+
|
|
29
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
30
|
+
# Derived paths
|
|
31
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
32
|
+
|
|
33
|
+
LOG_DIR="$PROJECT_DIR/.planning/logs"
|
|
34
|
+
CHECKPOINT_DIR="$PROJECT_DIR/.planning/checkpoints"
|
|
35
|
+
STATE_FILE="$PROJECT_DIR/.planning/STATE.md"
|
|
36
|
+
ACTIVITY_PIPE="$PROJECT_DIR/.planning/logs/activity.pipe"
|
|
37
|
+
|
|
38
|
+
cd "$PROJECT_DIR"
|
|
39
|
+
mkdir -p "$LOG_DIR" "$CHECKPOINT_DIR/pending" "$CHECKPOINT_DIR/approved"
|
|
40
|
+
|
|
41
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
42
|
+
# Logging
|
|
43
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
44
|
+
|
|
45
|
+
log() {
|
|
46
|
+
local level="$1"
|
|
47
|
+
local message="$2"
|
|
48
|
+
local timestamp=$(date '+%Y-%m-%d %H:%M:%S')
|
|
49
|
+
echo "[$timestamp] [$level] $message" >> "$LOG_DIR/autopilot.log"
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
notify() {
|
|
53
|
+
local message="$1"
|
|
54
|
+
printf "\a" # Terminal bell
|
|
55
|
+
log "NOTIFY" "$message"
|
|
56
|
+
[ -n "$WEBHOOK_URL" ] && curl -s -X POST "$WEBHOOK_URL" -H "Content-Type: application/json" -d "{\"text\": \"$message\"}" > /dev/null 2>&1 || true
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
60
|
+
# Model Execution
|
|
61
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
62
|
+
|
|
63
|
+
execute_claude() {
|
|
64
|
+
local prompt="$1"
|
|
65
|
+
shift
|
|
66
|
+
|
|
67
|
+
# For GLM-4.7, check if CCR is available
|
|
68
|
+
if [ "$AUTOPILOT_MODEL" = "glm-4.7" ]; then
|
|
69
|
+
if ! command -v ccr &> /dev/null; then
|
|
70
|
+
log "ERROR" "GLM-4.7 selected but CCR not installed."
|
|
71
|
+
echo "ERROR: GLM-4.7 requires CCR. Install with:"
|
|
72
|
+
echo " git clone https://github.com/musistudio/claude-code-router.git"
|
|
73
|
+
echo " cd claude-code-router && npm install && npm link"
|
|
74
|
+
echo ""
|
|
75
|
+
echo "Or edit .planning/config.json and change autopilot_model to 'default' or 'claude-3-5-sonnet-latest'"
|
|
76
|
+
echo ""
|
|
77
|
+
echo "Falling back to default model..."
|
|
78
|
+
echo "$prompt" | claude -p "$@" 2>&1
|
|
79
|
+
return
|
|
80
|
+
else
|
|
81
|
+
log "INFO" "Using GLM-4.7 via CCR"
|
|
82
|
+
echo "$prompt" | ccr code --model glm-4.7 -p "$@" 2>&1
|
|
83
|
+
return
|
|
84
|
+
fi
|
|
85
|
+
fi
|
|
86
|
+
|
|
87
|
+
# Use model flag if specified
|
|
88
|
+
if [ "$AUTOPILOT_MODEL" = "default" ]; then
|
|
89
|
+
log "INFO" "Using default Claude model"
|
|
90
|
+
echo "$prompt" | claude -p "$@" 2>&1
|
|
91
|
+
else
|
|
92
|
+
log "INFO" "Using model: $AUTOPILOT_MODEL"
|
|
93
|
+
echo "$prompt" | claude -p --model "$AUTOPILOT_MODEL" "$@" 2>&1
|
|
94
|
+
fi
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
98
|
+
# Phase Execution
|
|
99
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
100
|
+
|
|
101
|
+
execute_phase() {
|
|
102
|
+
local phase="$1"
|
|
103
|
+
local phase_log="$LOG_DIR/phase-${phase}-$(date +%Y%m%d-%H%M%S).log"
|
|
104
|
+
local attempt=1
|
|
105
|
+
|
|
106
|
+
log "INFO" "Starting phase $phase"
|
|
107
|
+
|
|
108
|
+
while [ $attempt -le $MAX_RETRIES ]; do
|
|
109
|
+
# Check if phase needs planning
|
|
110
|
+
if [ ! -f ".planning/phases/${phase}-PLAN.md" ]; then
|
|
111
|
+
log "INFO" "Planning phase $phase"
|
|
112
|
+
|
|
113
|
+
execute_claude "/gsd:plan-phase $phase" \
|
|
114
|
+
--allowedTools "Read,Write,Edit,Glob,Grep,Bash,Task,TodoWrite,AskUserQuestion" \
|
|
115
|
+
>> "$phase_log"
|
|
116
|
+
|
|
117
|
+
if [ $? -ne 0 ]; then
|
|
118
|
+
log "ERROR" "Planning failed for phase $phase (attempt $attempt)"
|
|
119
|
+
((attempt++))
|
|
120
|
+
sleep 5
|
|
121
|
+
continue
|
|
122
|
+
fi
|
|
123
|
+
fi
|
|
124
|
+
|
|
125
|
+
# Execute phase
|
|
126
|
+
log "INFO" "Executing phase $phase"
|
|
127
|
+
|
|
128
|
+
execute_claude "/gsd:execute-phase $phase" \
|
|
129
|
+
--allowedTools "Read,Write,Edit,Glob,Grep,Bash,Task,TodoWrite,AskUserQuestion" \
|
|
130
|
+
>> "$phase_log"
|
|
131
|
+
|
|
132
|
+
if [ $? -eq 0 ]; then
|
|
133
|
+
log "SUCCESS" "Phase $phase completed"
|
|
134
|
+
notify "Phase $phase complete"
|
|
135
|
+
return 0
|
|
136
|
+
else
|
|
137
|
+
log "ERROR" "Execution failed for phase $phase (attempt $attempt)"
|
|
138
|
+
((attempt++))
|
|
139
|
+
sleep 5
|
|
140
|
+
fi
|
|
141
|
+
done
|
|
142
|
+
|
|
143
|
+
log "ERROR" "Phase $phase failed after $MAX_RETRIES attempts"
|
|
144
|
+
notify "Phase $phase FAILED"
|
|
145
|
+
return 1
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
149
|
+
# Main
|
|
150
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
151
|
+
|
|
152
|
+
main() {
|
|
153
|
+
echo ""
|
|
154
|
+
echo "═══════════════════════════════════════════════════════════════"
|
|
155
|
+
echo " GSD AUTOPILOT - $PROJECT_NAME"
|
|
156
|
+
echo "═══════════════════════════════════════════════════════════════"
|
|
157
|
+
echo ""
|
|
158
|
+
echo "Model: $AUTOPILOT_MODEL"
|
|
159
|
+
echo "Phases: ${PHASES[*]}"
|
|
160
|
+
echo "Starting in 3 seconds..."
|
|
161
|
+
echo ""
|
|
162
|
+
sleep 3
|
|
163
|
+
|
|
164
|
+
for phase in "${PHASES[@]}"; do
|
|
165
|
+
if ! execute_phase "$phase"; then
|
|
166
|
+
echo "Autopilot stopped at phase $phase"
|
|
167
|
+
exit 1
|
|
168
|
+
fi
|
|
169
|
+
done
|
|
170
|
+
|
|
171
|
+
echo ""
|
|
172
|
+
echo "═══════════════════════════════════════════════════════════════"
|
|
173
|
+
echo " MILESTONE COMPLETE!"
|
|
174
|
+
echo "═══════════════════════════════════════════════════════════════"
|
|
175
|
+
echo ""
|
|
176
|
+
echo "All phases completed successfully."
|
|
177
|
+
echo "Logs: $LOG_DIR/"
|
|
178
|
+
echo ""
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
main "$@"
|