gsd-opencode 1.22.1 → 1.33.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/agents/gsd-advisor-researcher.md +112 -0
- package/agents/gsd-assumptions-analyzer.md +110 -0
- package/agents/gsd-codebase-mapper.md +0 -2
- package/agents/gsd-debugger.md +117 -2
- package/agents/gsd-doc-verifier.md +207 -0
- package/agents/gsd-doc-writer.md +608 -0
- package/agents/gsd-executor.md +45 -4
- package/agents/gsd-integration-checker.md +0 -2
- package/agents/gsd-nyquist-auditor.md +0 -2
- package/agents/gsd-phase-researcher.md +191 -5
- package/agents/gsd-plan-checker.md +152 -5
- package/agents/gsd-planner.md +131 -157
- package/agents/gsd-project-researcher.md +28 -3
- package/agents/gsd-research-synthesizer.md +0 -2
- package/agents/gsd-roadmapper.md +29 -2
- package/agents/gsd-security-auditor.md +129 -0
- package/agents/gsd-ui-auditor.md +485 -0
- package/agents/gsd-ui-checker.md +305 -0
- package/agents/gsd-ui-researcher.md +368 -0
- package/agents/gsd-user-profiler.md +173 -0
- package/agents/gsd-verifier.md +207 -22
- package/commands/gsd/gsd-add-backlog.md +76 -0
- package/commands/gsd/gsd-analyze-dependencies.md +34 -0
- package/commands/gsd/gsd-audit-uat.md +24 -0
- package/commands/gsd/gsd-autonomous.md +45 -0
- package/commands/gsd/gsd-cleanup.md +5 -0
- package/commands/gsd/gsd-debug.md +29 -21
- package/commands/gsd/gsd-discuss-phase.md +15 -36
- package/commands/gsd/gsd-do.md +30 -0
- package/commands/gsd/gsd-docs-update.md +48 -0
- package/commands/gsd/gsd-execute-phase.md +24 -2
- package/commands/gsd/gsd-fast.md +30 -0
- package/commands/gsd/gsd-forensics.md +56 -0
- package/commands/gsd/gsd-help.md +2 -0
- package/commands/gsd/gsd-join-discord.md +2 -1
- package/commands/gsd/gsd-list-workspaces.md +19 -0
- package/commands/gsd/gsd-manager.md +40 -0
- package/commands/gsd/gsd-milestone-summary.md +51 -0
- package/commands/gsd/gsd-new-project.md +4 -0
- package/commands/gsd/gsd-new-workspace.md +44 -0
- package/commands/gsd/gsd-next.md +24 -0
- package/commands/gsd/gsd-note.md +34 -0
- package/commands/gsd/gsd-plan-phase.md +8 -1
- package/commands/gsd/gsd-plant-seed.md +28 -0
- package/commands/gsd/gsd-pr-branch.md +25 -0
- package/commands/gsd/gsd-profile-user.md +46 -0
- package/commands/gsd/gsd-quick.md +7 -3
- package/commands/gsd/gsd-reapply-patches.md +178 -45
- package/commands/gsd/gsd-remove-workspace.md +26 -0
- package/commands/gsd/gsd-research-phase.md +7 -12
- package/commands/gsd/gsd-review-backlog.md +62 -0
- package/commands/gsd/gsd-review.md +38 -0
- package/commands/gsd/gsd-secure-phase.md +35 -0
- package/commands/gsd/gsd-session-report.md +19 -0
- package/commands/gsd/gsd-set-profile.md +24 -23
- package/commands/gsd/gsd-ship.md +23 -0
- package/commands/gsd/gsd-stats.md +18 -0
- package/commands/gsd/gsd-thread.md +127 -0
- package/commands/gsd/gsd-ui-phase.md +34 -0
- package/commands/gsd/gsd-ui-review.md +32 -0
- package/commands/gsd/gsd-workstreams.md +71 -0
- package/get-shit-done/bin/gsd-tools.cjs +450 -90
- package/get-shit-done/bin/lib/commands.cjs +489 -24
- package/get-shit-done/bin/lib/config.cjs +329 -48
- package/get-shit-done/bin/lib/core.cjs +1143 -102
- package/get-shit-done/bin/lib/docs.cjs +267 -0
- package/get-shit-done/bin/lib/frontmatter.cjs +125 -43
- package/get-shit-done/bin/lib/init.cjs +918 -106
- package/get-shit-done/bin/lib/milestone.cjs +65 -33
- package/get-shit-done/bin/lib/model-profiles.cjs +70 -0
- package/get-shit-done/bin/lib/phase.cjs +434 -404
- package/get-shit-done/bin/lib/profile-output.cjs +1048 -0
- package/get-shit-done/bin/lib/profile-pipeline.cjs +539 -0
- package/get-shit-done/bin/lib/roadmap.cjs +156 -101
- package/get-shit-done/bin/lib/schema-detect.cjs +238 -0
- package/get-shit-done/bin/lib/security.cjs +384 -0
- package/get-shit-done/bin/lib/state.cjs +711 -79
- package/get-shit-done/bin/lib/template.cjs +2 -2
- package/get-shit-done/bin/lib/uat.cjs +282 -0
- package/get-shit-done/bin/lib/verify.cjs +254 -42
- package/get-shit-done/bin/lib/workstream.cjs +495 -0
- package/get-shit-done/references/agent-contracts.md +79 -0
- package/get-shit-done/references/artifact-types.md +113 -0
- package/get-shit-done/references/checkpoints.md +12 -10
- package/get-shit-done/references/context-budget.md +49 -0
- package/get-shit-done/references/continuation-format.md +15 -15
- package/get-shit-done/references/decimal-phase-calculation.md +2 -3
- package/get-shit-done/references/domain-probes.md +125 -0
- package/get-shit-done/references/gate-prompts.md +100 -0
- package/get-shit-done/references/git-integration.md +47 -0
- package/get-shit-done/references/model-profile-resolution.md +2 -0
- package/get-shit-done/references/model-profiles.md +62 -16
- package/get-shit-done/references/phase-argument-parsing.md +2 -2
- package/get-shit-done/references/planner-gap-closure.md +62 -0
- package/get-shit-done/references/planner-reviews.md +39 -0
- package/get-shit-done/references/planner-revision.md +87 -0
- package/get-shit-done/references/planning-config.md +18 -1
- package/get-shit-done/references/revision-loop.md +97 -0
- package/get-shit-done/references/ui-brand.md +2 -2
- package/get-shit-done/references/universal-anti-patterns.md +58 -0
- package/get-shit-done/references/user-profiling.md +681 -0
- package/get-shit-done/references/workstream-flag.md +111 -0
- package/get-shit-done/templates/SECURITY.md +61 -0
- package/get-shit-done/templates/UAT.md +21 -3
- package/get-shit-done/templates/UI-SPEC.md +100 -0
- package/get-shit-done/templates/VALIDATION.md +3 -3
- package/get-shit-done/templates/claude-md.md +145 -0
- package/get-shit-done/templates/config.json +14 -3
- package/get-shit-done/templates/context.md +61 -6
- package/get-shit-done/templates/debug-subagent-prompt.md +2 -6
- package/get-shit-done/templates/dev-preferences.md +21 -0
- package/get-shit-done/templates/discussion-log.md +63 -0
- package/get-shit-done/templates/phase-prompt.md +46 -5
- package/get-shit-done/templates/planner-subagent-prompt.md +2 -10
- package/get-shit-done/templates/project.md +2 -0
- package/get-shit-done/templates/state.md +2 -2
- package/get-shit-done/templates/user-profile.md +146 -0
- package/get-shit-done/workflows/add-phase.md +4 -4
- package/get-shit-done/workflows/add-tests.md +4 -4
- package/get-shit-done/workflows/add-todo.md +4 -4
- package/get-shit-done/workflows/analyze-dependencies.md +96 -0
- package/get-shit-done/workflows/audit-milestone.md +20 -16
- package/get-shit-done/workflows/audit-uat.md +109 -0
- package/get-shit-done/workflows/autonomous.md +1036 -0
- package/get-shit-done/workflows/check-todos.md +4 -4
- package/get-shit-done/workflows/cleanup.md +4 -4
- package/get-shit-done/workflows/complete-milestone.md +22 -10
- package/get-shit-done/workflows/diagnose-issues.md +21 -7
- package/get-shit-done/workflows/discovery-phase.md +2 -2
- package/get-shit-done/workflows/discuss-phase-assumptions.md +671 -0
- package/get-shit-done/workflows/discuss-phase-power.md +291 -0
- package/get-shit-done/workflows/discuss-phase.md +558 -47
- package/get-shit-done/workflows/do.md +104 -0
- package/get-shit-done/workflows/docs-update.md +1093 -0
- package/get-shit-done/workflows/execute-phase.md +741 -58
- package/get-shit-done/workflows/execute-plan.md +77 -12
- package/get-shit-done/workflows/fast.md +105 -0
- package/get-shit-done/workflows/forensics.md +265 -0
- package/get-shit-done/workflows/health.md +28 -6
- package/get-shit-done/workflows/help.md +127 -7
- package/get-shit-done/workflows/insert-phase.md +4 -4
- package/get-shit-done/workflows/list-phase-assumptions.md +2 -2
- package/get-shit-done/workflows/list-workspaces.md +56 -0
- package/get-shit-done/workflows/manager.md +363 -0
- package/get-shit-done/workflows/map-codebase.md +83 -44
- package/get-shit-done/workflows/milestone-summary.md +223 -0
- package/get-shit-done/workflows/new-milestone.md +133 -25
- package/get-shit-done/workflows/new-project.md +216 -54
- package/get-shit-done/workflows/new-workspace.md +237 -0
- package/get-shit-done/workflows/next.md +97 -0
- package/get-shit-done/workflows/node-repair.md +92 -0
- package/get-shit-done/workflows/note.md +156 -0
- package/get-shit-done/workflows/pause-work.md +132 -15
- package/get-shit-done/workflows/plan-milestone-gaps.md +6 -7
- package/get-shit-done/workflows/plan-phase.md +513 -62
- package/get-shit-done/workflows/plant-seed.md +169 -0
- package/get-shit-done/workflows/pr-branch.md +129 -0
- package/get-shit-done/workflows/profile-user.md +450 -0
- package/get-shit-done/workflows/progress.md +154 -29
- package/get-shit-done/workflows/quick.md +285 -111
- package/get-shit-done/workflows/remove-phase.md +2 -2
- package/get-shit-done/workflows/remove-workspace.md +90 -0
- package/get-shit-done/workflows/research-phase.md +13 -9
- package/get-shit-done/workflows/resume-project.md +37 -18
- package/get-shit-done/workflows/review.md +281 -0
- package/get-shit-done/workflows/secure-phase.md +154 -0
- package/get-shit-done/workflows/session-report.md +146 -0
- package/get-shit-done/workflows/set-profile.md +2 -2
- package/get-shit-done/workflows/settings.md +91 -11
- package/get-shit-done/workflows/ship.md +237 -0
- package/get-shit-done/workflows/stats.md +60 -0
- package/get-shit-done/workflows/transition.md +150 -23
- package/get-shit-done/workflows/ui-phase.md +292 -0
- package/get-shit-done/workflows/ui-review.md +183 -0
- package/get-shit-done/workflows/update.md +262 -30
- package/get-shit-done/workflows/validate-phase.md +14 -17
- package/get-shit-done/workflows/verify-phase.md +143 -11
- package/get-shit-done/workflows/verify-work.md +141 -39
- package/package.json +1 -1
- package/skills/gsd-audit-milestone/SKILL.md +29 -0
- package/skills/gsd-cleanup/SKILL.md +19 -0
- package/skills/gsd-complete-milestone/SKILL.md +131 -0
- package/skills/gsd-discuss-phase/SKILL.md +54 -0
- package/skills/gsd-execute-phase/SKILL.md +49 -0
- package/skills/gsd-plan-phase/SKILL.md +37 -0
- package/skills/gsd-ui-phase/SKILL.md +24 -0
- package/skills/gsd-ui-review/SKILL.md +24 -0
- package/skills/gsd-verify-work/SKILL.md +30 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<
|
|
1
|
+
<objective>
|
|
2
2
|
Check for GSD updates via npm, display changelog for versions between installed and latest, obtain user confirmation, and execute clean installation with cache clearing.
|
|
3
|
-
</
|
|
3
|
+
</objective>
|
|
4
4
|
|
|
5
5
|
<required_reading>
|
|
6
6
|
read all files referenced by the invoking prompt's execution_context before starting.
|
|
@@ -9,30 +9,189 @@ read all files referenced by the invoking prompt's execution_context before star
|
|
|
9
9
|
<process>
|
|
10
10
|
|
|
11
11
|
<step name="get_installed_version">
|
|
12
|
-
Detect whether GSD is installed locally or globally by checking both locations and validating install integrity
|
|
12
|
+
Detect whether GSD is installed locally or globally by checking both locations and validating install integrity.
|
|
13
|
+
|
|
14
|
+
First, derive `PREFERRED_CONFIG_DIR` and `PREFERRED_RUNTIME` from the invoking prompt's `execution_context` path:
|
|
15
|
+
- If the path contains `/get-shit-done/workflows/update.md`, strip that suffix and store the remainder as `PREFERRED_CONFIG_DIR`
|
|
16
|
+
- Path contains `/.codex/` -> `codex`
|
|
17
|
+
- Path contains `/.gemini/` -> `gemini`
|
|
18
|
+
- Path contains `/.config/kilo/` or `/.kilo/`, or `PREFERRED_CONFIG_DIR` contains `kilo.json` / `kilo.jsonc` -> `kilo`
|
|
19
|
+
- Path contains `/.config/opencode/` or `/.opencode/`, or `PREFERRED_CONFIG_DIR` contains `opencode.json` / `opencode.jsonc` -> `opencode`
|
|
20
|
+
- Otherwise -> `OpenCode`
|
|
21
|
+
|
|
22
|
+
Use `PREFERRED_CONFIG_DIR` when available so custom `--config-dir` installs are checked before default locations.
|
|
23
|
+
Use `PREFERRED_RUNTIME` as the first runtime checked so `/gsd-update` targets the runtime that invoked it.
|
|
24
|
+
|
|
25
|
+
Kilo config precedence must match the installer: `KILO_CONFIG_DIR` -> `dirname(KILO_CONFIG)` -> `XDG_CONFIG_HOME/kilo` -> `~/.config/kilo`.
|
|
13
26
|
|
|
14
27
|
```bash
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
28
|
+
expand_home() {
|
|
29
|
+
case "$1" in
|
|
30
|
+
"~/"*) printf '%s/%s\n' "$HOME" "${1#~/}" ;;
|
|
31
|
+
*) printf '%s\n' "$1" ;;
|
|
32
|
+
esac
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
# Runtime candidates: "<runtime>:<config-dir>" stored as an array.
|
|
36
|
+
# Using an array instead of a space-separated string ensures correct
|
|
37
|
+
# iteration in both bash and zsh (zsh does not word-split unquoted
|
|
38
|
+
# variables by default). Fixes #1173.
|
|
39
|
+
RUNTIME_DIRS=( "OpenCode:.OpenCode" "opencode:.config/opencode" "opencode:.opencode" "gemini:.gemini" "kilo:.config/kilo" "kilo:.kilo" "codex:.codex" )
|
|
40
|
+
ENV_RUNTIME_DIRS=()
|
|
41
|
+
|
|
42
|
+
# PREFERRED_CONFIG_DIR / PREFERRED_RUNTIME should be set from execution_context
|
|
43
|
+
# before running this block.
|
|
44
|
+
if [ -n "$PREFERRED_CONFIG_DIR" ]; then
|
|
45
|
+
PREFERRED_CONFIG_DIR="$(expand_home "$PREFERRED_CONFIG_DIR")"
|
|
46
|
+
if [ -z "$PREFERRED_RUNTIME" ]; then
|
|
47
|
+
if [ -f "$PREFERRED_CONFIG_DIR/kilo.json" ] || [ -f "$PREFERRED_CONFIG_DIR/kilo.jsonc" ]; then
|
|
48
|
+
PREFERRED_RUNTIME="kilo"
|
|
49
|
+
elif [ -f "$PREFERRED_CONFIG_DIR/opencode.json" ] || [ -f "$PREFERRED_CONFIG_DIR/opencode.jsonc" ]; then
|
|
50
|
+
PREFERRED_RUNTIME="opencode"
|
|
51
|
+
elif [ -f "$PREFERRED_CONFIG_DIR/config.toml" ]; then
|
|
52
|
+
PREFERRED_RUNTIME="codex"
|
|
53
|
+
fi
|
|
54
|
+
fi
|
|
55
|
+
fi
|
|
56
|
+
|
|
57
|
+
# If runtime is still unknown, infer from runtime env vars; fallback to OpenCode.
|
|
58
|
+
if [ -z "$PREFERRED_RUNTIME" ]; then
|
|
59
|
+
if [ -n "$CODEX_HOME" ]; then
|
|
60
|
+
PREFERRED_RUNTIME="codex"
|
|
61
|
+
elif [ -n "$GEMINI_CONFIG_DIR" ]; then
|
|
62
|
+
PREFERRED_RUNTIME="gemini"
|
|
63
|
+
elif [ -n "$KILO_CONFIG_DIR" ]; then
|
|
64
|
+
PREFERRED_RUNTIME="kilo"
|
|
65
|
+
elif [ -n "$KILO_CONFIG" ]; then
|
|
66
|
+
PREFERRED_RUNTIME="kilo"
|
|
67
|
+
elif [ -n "$OPENCODE_CONFIG_DIR" ] || [ -n "$OPENCODE_CONFIG" ]; then
|
|
68
|
+
PREFERRED_RUNTIME="opencode"
|
|
69
|
+
elif [ -n "$CLAUDE_CONFIG_DIR" ]; then
|
|
70
|
+
PREFERRED_RUNTIME="OpenCode"
|
|
71
|
+
else
|
|
72
|
+
PREFERRED_RUNTIME="OpenCode"
|
|
73
|
+
fi
|
|
74
|
+
fi
|
|
75
|
+
|
|
76
|
+
# If execution_context already points at an installed config dir, trust it first.
|
|
77
|
+
# This covers custom --config-dir installs that do not live under the default
|
|
78
|
+
# runtime directories.
|
|
79
|
+
if [ -n "$PREFERRED_CONFIG_DIR" ] && { [ -f "$PREFERRED_CONFIG_DIR/get-shit-done/VERSION" ] || [ -f "$PREFERRED_CONFIG_DIR/get-shit-done/workflows/update.md" ]; }; then
|
|
80
|
+
INSTALL_SCOPE="GLOBAL"
|
|
81
|
+
for dir in .OpenCode .config/opencode .opencode .gemini .config/kilo .kilo .codex; do
|
|
82
|
+
resolved_local="$(cd "./$dir" 2>/dev/null && pwd)"
|
|
83
|
+
if [ -n "$resolved_local" ] && [ "$resolved_local" = "$PREFERRED_CONFIG_DIR" ]; then
|
|
84
|
+
INSTALL_SCOPE="LOCAL"
|
|
85
|
+
break
|
|
86
|
+
fi
|
|
87
|
+
done
|
|
88
|
+
|
|
89
|
+
if [ -f "$PREFERRED_CONFIG_DIR/get-shit-done/VERSION" ] && grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+' "$PREFERRED_CONFIG_DIR/get-shit-done/VERSION"; then
|
|
90
|
+
INSTALLED_VERSION="$(cat "$PREFERRED_CONFIG_DIR/get-shit-done/VERSION")"
|
|
91
|
+
else
|
|
92
|
+
INSTALLED_VERSION="0.0.0"
|
|
93
|
+
fi
|
|
94
|
+
|
|
95
|
+
echo "$INSTALLED_VERSION"
|
|
96
|
+
echo "$INSTALL_SCOPE"
|
|
97
|
+
echo "${PREFERRED_RUNTIME:-OpenCode}"
|
|
98
|
+
exit 0
|
|
99
|
+
fi
|
|
100
|
+
|
|
101
|
+
# Absolute global candidates from env overrides (covers custom config dirs).
|
|
102
|
+
if [ -n "$CLAUDE_CONFIG_DIR" ]; then
|
|
103
|
+
ENV_RUNTIME_DIRS+=( "OpenCode:$(expand_home "$CLAUDE_CONFIG_DIR")" )
|
|
104
|
+
fi
|
|
105
|
+
if [ -n "$GEMINI_CONFIG_DIR" ]; then
|
|
106
|
+
ENV_RUNTIME_DIRS+=( "gemini:$(expand_home "$GEMINI_CONFIG_DIR")" )
|
|
107
|
+
fi
|
|
108
|
+
if [ -n "$KILO_CONFIG_DIR" ]; then
|
|
109
|
+
ENV_RUNTIME_DIRS+=( "kilo:$(expand_home "$KILO_CONFIG_DIR")" )
|
|
110
|
+
elif [ -n "$KILO_CONFIG" ]; then
|
|
111
|
+
ENV_RUNTIME_DIRS+=( "kilo:$(dirname "$(expand_home "$KILO_CONFIG")")" )
|
|
112
|
+
elif [ -n "$XDG_CONFIG_HOME" ]; then
|
|
113
|
+
ENV_RUNTIME_DIRS+=( "kilo:$(expand_home "$XDG_CONFIG_HOME")/kilo" )
|
|
114
|
+
fi
|
|
115
|
+
if [ -n "$OPENCODE_CONFIG_DIR" ]; then
|
|
116
|
+
ENV_RUNTIME_DIRS+=( "opencode:$(expand_home "$OPENCODE_CONFIG_DIR")" )
|
|
117
|
+
elif [ -n "$OPENCODE_CONFIG" ]; then
|
|
118
|
+
ENV_RUNTIME_DIRS+=( "opencode:$(dirname "$(expand_home "$OPENCODE_CONFIG")")" )
|
|
119
|
+
elif [ -n "$XDG_CONFIG_HOME" ]; then
|
|
120
|
+
ENV_RUNTIME_DIRS+=( "opencode:$(expand_home "$XDG_CONFIG_HOME")/opencode" )
|
|
121
|
+
fi
|
|
122
|
+
if [ -n "$CODEX_HOME" ]; then
|
|
123
|
+
ENV_RUNTIME_DIRS+=( "codex:$(expand_home "$CODEX_HOME")" )
|
|
124
|
+
fi
|
|
125
|
+
|
|
126
|
+
# Reorder entries so preferred runtime is checked first.
|
|
127
|
+
ORDERED_RUNTIME_DIRS=()
|
|
128
|
+
for entry in "${RUNTIME_DIRS[@]}"; do
|
|
129
|
+
runtime="${entry%%:*}"
|
|
130
|
+
if [ "$runtime" = "$PREFERRED_RUNTIME" ]; then
|
|
131
|
+
ORDERED_RUNTIME_DIRS+=( "$entry" )
|
|
132
|
+
fi
|
|
133
|
+
done
|
|
134
|
+
ORDERED_ENV_RUNTIME_DIRS=()
|
|
135
|
+
for entry in "${ENV_RUNTIME_DIRS[@]}"; do
|
|
136
|
+
runtime="${entry%%:*}"
|
|
137
|
+
if [ "$runtime" = "$PREFERRED_RUNTIME" ]; then
|
|
138
|
+
ORDERED_ENV_RUNTIME_DIRS+=( "$entry" )
|
|
139
|
+
fi
|
|
140
|
+
done
|
|
141
|
+
for entry in "${ENV_RUNTIME_DIRS[@]}"; do
|
|
142
|
+
runtime="${entry%%:*}"
|
|
143
|
+
if [ "$runtime" != "$PREFERRED_RUNTIME" ]; then
|
|
144
|
+
ORDERED_ENV_RUNTIME_DIRS+=( "$entry" )
|
|
145
|
+
fi
|
|
146
|
+
done
|
|
147
|
+
for entry in "${RUNTIME_DIRS[@]}"; do
|
|
148
|
+
runtime="${entry%%:*}"
|
|
149
|
+
if [ "$runtime" != "$PREFERRED_RUNTIME" ]; then
|
|
150
|
+
ORDERED_RUNTIME_DIRS+=( "$entry" )
|
|
151
|
+
fi
|
|
152
|
+
done
|
|
153
|
+
|
|
154
|
+
# Check local first (takes priority only if valid and distinct from global)
|
|
155
|
+
LOCAL_VERSION_FILE="" LOCAL_MARKER_FILE="" LOCAL_DIR="" LOCAL_RUNTIME=""
|
|
156
|
+
for entry in "${ORDERED_RUNTIME_DIRS[@]}"; do
|
|
157
|
+
runtime="${entry%%:*}"
|
|
158
|
+
dir="${entry#*:}"
|
|
159
|
+
if [ -f "./$dir/get-shit-done/VERSION" ] || [ -f "./$dir/get-shit-done/workflows/update.md" ]; then
|
|
160
|
+
LOCAL_RUNTIME="$runtime"
|
|
20
161
|
LOCAL_VERSION_FILE="./$dir/get-shit-done/VERSION"
|
|
21
162
|
LOCAL_MARKER_FILE="./$dir/get-shit-done/workflows/update.md"
|
|
22
163
|
LOCAL_DIR="$(cd "./$dir" 2>/dev/null && pwd)"
|
|
23
164
|
break
|
|
24
165
|
fi
|
|
25
166
|
done
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
167
|
+
|
|
168
|
+
GLOBAL_VERSION_FILE="" GLOBAL_MARKER_FILE="" GLOBAL_DIR="" GLOBAL_RUNTIME=""
|
|
169
|
+
for entry in "${ORDERED_ENV_RUNTIME_DIRS[@]}"; do
|
|
170
|
+
runtime="${entry%%:*}"
|
|
171
|
+
dir="${entry#*:}"
|
|
172
|
+
if [ -f "$dir/get-shit-done/VERSION" ] || [ -f "$dir/get-shit-done/workflows/update.md" ]; then
|
|
173
|
+
GLOBAL_RUNTIME="$runtime"
|
|
174
|
+
GLOBAL_VERSION_FILE="$dir/get-shit-done/VERSION"
|
|
175
|
+
GLOBAL_MARKER_FILE="$dir/get-shit-done/workflows/update.md"
|
|
176
|
+
GLOBAL_DIR="$(cd "$dir" 2>/dev/null && pwd)"
|
|
32
177
|
break
|
|
33
178
|
fi
|
|
34
179
|
done
|
|
35
180
|
|
|
181
|
+
if [ -z "$GLOBAL_RUNTIME" ]; then
|
|
182
|
+
for entry in "${ORDERED_RUNTIME_DIRS[@]}"; do
|
|
183
|
+
runtime="${entry%%:*}"
|
|
184
|
+
dir="${entry#*:}"
|
|
185
|
+
if [ -f "$HOME/$dir/get-shit-done/VERSION" ] || [ -f "$HOME/$dir/get-shit-done/workflows/update.md" ]; then
|
|
186
|
+
GLOBAL_RUNTIME="$runtime"
|
|
187
|
+
GLOBAL_VERSION_FILE="$HOME/$dir/get-shit-done/VERSION"
|
|
188
|
+
GLOBAL_MARKER_FILE="$HOME/$dir/get-shit-done/workflows/update.md"
|
|
189
|
+
GLOBAL_DIR="$(cd "$HOME/$dir" 2>/dev/null && pwd)"
|
|
190
|
+
break
|
|
191
|
+
fi
|
|
192
|
+
done
|
|
193
|
+
fi
|
|
194
|
+
|
|
36
195
|
# Only treat as LOCAL if the resolved paths differ (prevents misdetection when CWD=$HOME)
|
|
37
196
|
IS_LOCAL=false
|
|
38
197
|
if [ -n "$LOCAL_VERSION_FILE" ] && [ -f "$LOCAL_VERSION_FILE" ] && [ -f "$LOCAL_MARKER_FILE" ] && grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+' "$LOCAL_VERSION_FILE"; then
|
|
@@ -42,20 +201,40 @@ if [ -n "$LOCAL_VERSION_FILE" ] && [ -f "$LOCAL_VERSION_FILE" ] && [ -f "$LOCAL_
|
|
|
42
201
|
fi
|
|
43
202
|
|
|
44
203
|
if [ "$IS_LOCAL" = true ]; then
|
|
45
|
-
cat "$LOCAL_VERSION_FILE"
|
|
46
|
-
|
|
204
|
+
INSTALLED_VERSION="$(cat "$LOCAL_VERSION_FILE")"
|
|
205
|
+
INSTALL_SCOPE="LOCAL"
|
|
206
|
+
TARGET_RUNTIME="$LOCAL_RUNTIME"
|
|
47
207
|
elif [ -n "$GLOBAL_VERSION_FILE" ] && [ -f "$GLOBAL_VERSION_FILE" ] && [ -f "$GLOBAL_MARKER_FILE" ] && grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+' "$GLOBAL_VERSION_FILE"; then
|
|
48
|
-
cat "$GLOBAL_VERSION_FILE"
|
|
49
|
-
|
|
208
|
+
INSTALLED_VERSION="$(cat "$GLOBAL_VERSION_FILE")"
|
|
209
|
+
INSTALL_SCOPE="GLOBAL"
|
|
210
|
+
TARGET_RUNTIME="$GLOBAL_RUNTIME"
|
|
211
|
+
elif [ -n "$LOCAL_RUNTIME" ] && [ -f "$LOCAL_MARKER_FILE" ]; then
|
|
212
|
+
# Runtime detected but VERSION missing/corrupt: treat as unknown version, keep runtime target
|
|
213
|
+
INSTALLED_VERSION="0.0.0"
|
|
214
|
+
INSTALL_SCOPE="LOCAL"
|
|
215
|
+
TARGET_RUNTIME="$LOCAL_RUNTIME"
|
|
216
|
+
elif [ -n "$GLOBAL_RUNTIME" ] && [ -f "$GLOBAL_MARKER_FILE" ]; then
|
|
217
|
+
INSTALLED_VERSION="0.0.0"
|
|
218
|
+
INSTALL_SCOPE="GLOBAL"
|
|
219
|
+
TARGET_RUNTIME="$GLOBAL_RUNTIME"
|
|
50
220
|
else
|
|
51
|
-
|
|
221
|
+
INSTALLED_VERSION="0.0.0"
|
|
222
|
+
INSTALL_SCOPE="UNKNOWN"
|
|
223
|
+
TARGET_RUNTIME="OpenCode"
|
|
52
224
|
fi
|
|
225
|
+
|
|
226
|
+
echo "$INSTALLED_VERSION"
|
|
227
|
+
echo "$INSTALL_SCOPE"
|
|
228
|
+
echo "$TARGET_RUNTIME"
|
|
53
229
|
```
|
|
54
230
|
|
|
55
231
|
Parse output:
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
232
|
+
- Line 1 = installed version (`0.0.0` means unknown version)
|
|
233
|
+
- Line 2 = install scope (`LOCAL`, `GLOBAL`, or `UNKNOWN`)
|
|
234
|
+
- Line 3 = target runtime (`OpenCode`, `opencode`, `gemini`, `kilo`, or `codex`)
|
|
235
|
+
- If scope is `UNKNOWN`, proceed to install step using `--OpenCode --global` fallback.
|
|
236
|
+
|
|
237
|
+
If multiple runtime installs are detected and the invoking runtime cannot be determined from execution_context, ask the user which runtime to update before running install.
|
|
59
238
|
|
|
60
239
|
**If VERSION file missing:**
|
|
61
240
|
```
|
|
@@ -149,7 +328,9 @@ Exit.
|
|
|
149
328
|
- `get-shit-done/` will be wiped and replaced
|
|
150
329
|
- `agents/gsd-*` files will be replaced
|
|
151
330
|
|
|
152
|
-
(Paths are relative to
|
|
331
|
+
(Paths are relative to detected runtime install location:
|
|
332
|
+
global: `$HOME/.config/opencode/`, `~/.config/opencode/`, `~/.opencode/`, `~/.gemini/`, `~/.config/kilo/`, or `~/.codex/`
|
|
333
|
+
local: `./.OpenCode/`, `./.config/opencode/`, `./.opencode/`, `./.gemini/`, `./.kilo/`, or `./.codex/`)
|
|
153
334
|
|
|
154
335
|
Your custom files in other locations are preserved:
|
|
155
336
|
- Custom commands not in `commands/gsd/` ✓
|
|
@@ -172,14 +353,24 @@ Use question:
|
|
|
172
353
|
<step name="run_update">
|
|
173
354
|
Run the update using the install type detected in step 1:
|
|
174
355
|
|
|
356
|
+
Build runtime flag from step 1:
|
|
357
|
+
```bash
|
|
358
|
+
RUNTIME_FLAG="--$TARGET_RUNTIME"
|
|
359
|
+
```
|
|
360
|
+
|
|
175
361
|
**If LOCAL install:**
|
|
176
362
|
```bash
|
|
177
|
-
npx -y gsd-opencode@latest --local
|
|
363
|
+
npx -y gsd-opencode@latest "$RUNTIME_FLAG" --local
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
**If GLOBAL install:**
|
|
367
|
+
```bash
|
|
368
|
+
npx -y gsd-opencode@latest "$RUNTIME_FLAG" --global
|
|
178
369
|
```
|
|
179
370
|
|
|
180
|
-
**If
|
|
371
|
+
**If UNKNOWN install:**
|
|
181
372
|
```bash
|
|
182
|
-
npx -y gsd-opencode@latest --global
|
|
373
|
+
npx -y gsd-opencode@latest --OpenCode --global
|
|
183
374
|
```
|
|
184
375
|
|
|
185
376
|
Capture output. If install fails, show error and exit.
|
|
@@ -187,14 +378,55 @@ Capture output. If install fails, show error and exit.
|
|
|
187
378
|
Clear the update cache so statusline indicator disappears:
|
|
188
379
|
|
|
189
380
|
```bash
|
|
190
|
-
|
|
191
|
-
|
|
381
|
+
expand_home() {
|
|
382
|
+
case "$1" in
|
|
383
|
+
"~/"*) printf '%s/%s\n' "$HOME" "${1#~/}" ;;
|
|
384
|
+
*) printf '%s\n' "$1" ;;
|
|
385
|
+
esac
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
# Clear update cache across preferred, env-derived, and default runtime directories
|
|
389
|
+
CACHE_DIRS=()
|
|
390
|
+
if [ -n "$PREFERRED_CONFIG_DIR" ]; then
|
|
391
|
+
CACHE_DIRS+=( "$(expand_home "$PREFERRED_CONFIG_DIR")" )
|
|
392
|
+
fi
|
|
393
|
+
if [ -n "$CLAUDE_CONFIG_DIR" ]; then
|
|
394
|
+
CACHE_DIRS+=( "$(expand_home "$CLAUDE_CONFIG_DIR")" )
|
|
395
|
+
fi
|
|
396
|
+
if [ -n "$GEMINI_CONFIG_DIR" ]; then
|
|
397
|
+
CACHE_DIRS+=( "$(expand_home "$GEMINI_CONFIG_DIR")" )
|
|
398
|
+
fi
|
|
399
|
+
if [ -n "$KILO_CONFIG_DIR" ]; then
|
|
400
|
+
CACHE_DIRS+=( "$(expand_home "$KILO_CONFIG_DIR")" )
|
|
401
|
+
elif [ -n "$KILO_CONFIG" ]; then
|
|
402
|
+
CACHE_DIRS+=( "$(dirname "$(expand_home "$KILO_CONFIG")")" )
|
|
403
|
+
elif [ -n "$XDG_CONFIG_HOME" ]; then
|
|
404
|
+
CACHE_DIRS+=( "$(expand_home "$XDG_CONFIG_HOME")/kilo" )
|
|
405
|
+
fi
|
|
406
|
+
if [ -n "$OPENCODE_CONFIG_DIR" ]; then
|
|
407
|
+
CACHE_DIRS+=( "$(expand_home "$OPENCODE_CONFIG_DIR")" )
|
|
408
|
+
elif [ -n "$OPENCODE_CONFIG" ]; then
|
|
409
|
+
CACHE_DIRS+=( "$(dirname "$(expand_home "$OPENCODE_CONFIG")")" )
|
|
410
|
+
elif [ -n "$XDG_CONFIG_HOME" ]; then
|
|
411
|
+
CACHE_DIRS+=( "$(expand_home "$XDG_CONFIG_HOME")/opencode" )
|
|
412
|
+
fi
|
|
413
|
+
if [ -n "$CODEX_HOME" ]; then
|
|
414
|
+
CACHE_DIRS+=( "$(expand_home "$CODEX_HOME")" )
|
|
415
|
+
fi
|
|
416
|
+
|
|
417
|
+
for dir in "${CACHE_DIRS[@]}"; do
|
|
418
|
+
if [ -n "$dir" ]; then
|
|
419
|
+
rm -f "$dir/cache/gsd-update-check.json"
|
|
420
|
+
fi
|
|
421
|
+
done
|
|
422
|
+
|
|
423
|
+
for dir in .OpenCode .config/opencode .opencode .gemini .config/kilo .kilo .codex; do
|
|
192
424
|
rm -f "./$dir/cache/gsd-update-check.json"
|
|
193
425
|
rm -f "$HOME/$dir/cache/gsd-update-check.json"
|
|
194
426
|
done
|
|
195
427
|
```
|
|
196
428
|
|
|
197
|
-
The SessionStart hook (`gsd-check-update.js`) writes to the detected runtime's cache directory, so
|
|
429
|
+
The SessionStart hook (`gsd-check-update.js`) writes to the detected runtime's cache directory, so preferred/env-derived paths and default paths must all be cleared to prevent stale update indicators.
|
|
198
430
|
</step>
|
|
199
431
|
|
|
200
432
|
<step name="display_result">
|
|
@@ -205,7 +437,7 @@ Format completion message (changelog was already shown in confirmation step):
|
|
|
205
437
|
║ GSD Updated: v1.5.10 → v1.5.15 ║
|
|
206
438
|
╚═══════════════════════════════════════════════════════════╝
|
|
207
439
|
|
|
208
|
-
⚠️ Restart
|
|
440
|
+
⚠️ Restart your runtime to pick up the new commands.
|
|
209
441
|
|
|
210
442
|
[View full changelog](https://github.com/rokicool/gsd-opencode/blob/main/CHANGELOG.md)
|
|
211
443
|
```
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
<
|
|
1
|
+
<objective>
|
|
2
2
|
Audit Nyquist validation gaps for a completed phase. Generate missing tests. Update VALIDATION.md.
|
|
3
|
-
</
|
|
3
|
+
</objective>
|
|
4
4
|
|
|
5
5
|
<required_reading>
|
|
6
6
|
@$HOME/.config/opencode/get-shit-done/references/ui-brand.md
|
|
7
7
|
</required_reading>
|
|
8
8
|
|
|
9
|
+
<available_agent_types>
|
|
10
|
+
Valid GSD subagent types (use exact names — do not fall back to 'general'):
|
|
11
|
+
- gsd-nyquist-auditor — Validates verification coverage
|
|
12
|
+
</available_agent_types>
|
|
13
|
+
|
|
9
14
|
<process>
|
|
10
15
|
|
|
11
16
|
## 0. Initialize
|
|
@@ -13,13 +18,14 @@ Audit Nyquist validation gaps for a completed phase. Generate missing tests. Upd
|
|
|
13
18
|
```bash
|
|
14
19
|
INIT=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" init phase-op "${PHASE_ARG}")
|
|
15
20
|
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
21
|
+
AGENT_SKILLS_AUDITOR=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" agent-skills gsd-nyquist-auditor 2>/dev/null)
|
|
16
22
|
```
|
|
17
23
|
|
|
18
24
|
Parse: `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `padded_phase`.
|
|
19
25
|
|
|
20
26
|
```bash
|
|
21
27
|
AUDITOR_MODEL=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" resolve-model gsd-nyquist-auditor --raw)
|
|
22
|
-
NYQUIST_CFG=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" config
|
|
28
|
+
NYQUIST_CFG=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" config-get workflow.nyquist_validation --raw)
|
|
23
29
|
```
|
|
24
30
|
|
|
25
31
|
If `NYQUIST_CFG` is `false`: exit with "Nyquist validation is disabled. Enable via /gsd-settings."
|
|
@@ -35,7 +41,7 @@ SUMMARY_FILES=$(ls "${PHASE_DIR}"/*-SUMMARY.md 2>/dev/null)
|
|
|
35
41
|
|
|
36
42
|
- **State A** (`VALIDATION_FILE` non-empty): Audit existing
|
|
37
43
|
- **State B** (`VALIDATION_FILE` empty, `SUMMARY_FILES` non-empty): Reconstruct from artifacts
|
|
38
|
-
- **State C** (`SUMMARY_FILES` empty): Exit — "Phase {N} not executed. Run /gsd-execute-phase {N} first."
|
|
44
|
+
- **State C** (`SUMMARY_FILES` empty): Exit — "Phase {N} not executed. Run /gsd-execute-phase {N} ${GSD_WS} first."
|
|
39
45
|
|
|
40
46
|
## 2. Discovery
|
|
41
47
|
|
|
@@ -85,16 +91,7 @@ Call question with gap table and options:
|
|
|
85
91
|
## 5. Spawn gsd-nyquist-auditor
|
|
86
92
|
|
|
87
93
|
```
|
|
88
|
-
|
|
89
|
-
prompt="read $HOME/.config/opencode/agents/gsd-nyquist-auditor.md for instructions.\n\n" +
|
|
90
|
-
"<files_to_read>{PLAN, SUMMARY, impl files, VALIDATION.md}</files_to_read>" +
|
|
91
|
-
"<gaps>{gap list}</gaps>" +
|
|
92
|
-
"<test_infrastructure>{framework, config, commands}</test_infrastructure>" +
|
|
93
|
-
"<constraints>Never modify impl files. Max 3 debug iterations. Escalate impl bugs.</constraints>",
|
|
94
|
-
subagent_type="gsd-nyquist-auditor",
|
|
95
|
-
model="{AUDITOR_MODEL}",
|
|
96
|
-
description="Fill validation gaps for Phase {N}"
|
|
97
|
-
)
|
|
94
|
+
@gsd-nyquist-auditor "read $HOME/.config/opencode/agents/gsd-nyquist-auditor.md for instructions.\n\n"
|
|
98
95
|
```
|
|
99
96
|
|
|
100
97
|
Handle return:
|
|
@@ -128,7 +125,7 @@ Handle return:
|
|
|
128
125
|
git add {test_files}
|
|
129
126
|
git commit -m "test(phase-${PHASE}): add Nyquist validation tests"
|
|
130
127
|
|
|
131
|
-
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" commit
|
|
128
|
+
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" commit "docs(phase-${PHASE}): add/update validation strategy"
|
|
132
129
|
```
|
|
133
130
|
|
|
134
131
|
## 8. Results + Routing
|
|
@@ -137,14 +134,14 @@ node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" commit-docs "docs(
|
|
|
137
134
|
```
|
|
138
135
|
GSD > PHASE {N} IS NYQUIST-COMPLIANT
|
|
139
136
|
All requirements have automated verification.
|
|
140
|
-
▶ Next: /gsd-audit-milestone
|
|
137
|
+
▶ Next: /gsd-audit-milestone ${GSD_WS}
|
|
141
138
|
```
|
|
142
139
|
|
|
143
140
|
**Partial:**
|
|
144
141
|
```
|
|
145
142
|
GSD > PHASE {N} VALIDATED (PARTIAL)
|
|
146
143
|
{M} automated, {K} manual-only.
|
|
147
|
-
▶ Retry: /gsd-validate-phase {N}
|
|
144
|
+
▶ Retry: /gsd-validate-phase {N} ${GSD_WS}
|
|
148
145
|
```
|
|
149
146
|
|
|
150
147
|
Display `/new` reminder.
|