gsd-remix 1.0.2 → 1.1.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 +13 -81
- package/README.zh-CN.md +13 -57
- package/agents/gsd-debugger.md +0 -3
- package/agents/gsd-executor.md +5 -11
- package/agents/gsd-phase-researcher.md +3 -107
- package/agents/gsd-plan-checker.md +0 -61
- package/agents/gsd-planner.md +4 -63
- package/agents/gsd-roadmapper.md +0 -29
- package/agents/gsd-security-auditor.md +62 -114
- package/agents/gsd-verifier.md +0 -3
- package/bin/install.js +20 -118
- package/commands/gsd/complete-milestone.md +0 -22
- package/commands/gsd/plan-phase.md +1 -2
- package/get-shit-done/bin/gsd-tools.cjs +5 -224
- package/get-shit-done/bin/lib/claude-md.cjs +427 -0
- package/get-shit-done/bin/lib/config-schema.cjs +2 -12
- package/get-shit-done/bin/lib/config.cjs +3 -12
- package/get-shit-done/bin/lib/core.cjs +4 -5
- package/get-shit-done/bin/lib/init.cjs +0 -163
- package/get-shit-done/bin/lib/model-profiles.cjs +12 -18
- package/get-shit-done/bin/lib/verify.cjs +0 -66
- package/get-shit-done/references/agent-contracts.md +0 -6
- package/get-shit-done/references/artifact-types.md +0 -30
- package/get-shit-done/references/continuation-format.md +0 -1
- package/get-shit-done/references/model-profiles.md +39 -37
- package/get-shit-done/references/planning-config.md +7 -12
- package/get-shit-done/references/verification-overrides.md +1 -1
- package/get-shit-done/templates/README.md +2 -9
- package/get-shit-done/templates/claude-md.md +0 -14
- package/get-shit-done/templates/config.json +5 -19
- package/get-shit-done/workflows/autonomous.md +9 -141
- package/get-shit-done/workflows/complete-milestone.md +3 -4
- package/get-shit-done/workflows/discuss-phase-assumptions.md +1 -18
- package/get-shit-done/workflows/discuss-phase.md +10 -104
- package/get-shit-done/workflows/do.md +1 -5
- package/get-shit-done/workflows/execute-phase.md +53 -103
- package/get-shit-done/workflows/execute-plan.md +4 -4
- package/get-shit-done/workflows/health.md +2 -5
- package/get-shit-done/workflows/help.md +0 -165
- package/get-shit-done/workflows/new-milestone.md +0 -51
- package/get-shit-done/workflows/new-project.md +2 -63
- package/get-shit-done/workflows/next.md +0 -23
- package/get-shit-done/workflows/pause-work.md +7 -15
- package/get-shit-done/workflows/plan-phase.md +20 -304
- package/get-shit-done/workflows/pr-branch.md +0 -1
- package/get-shit-done/workflows/progress.md +1 -68
- package/get-shit-done/workflows/quick.md +0 -3
- package/get-shit-done/workflows/research-phase.md +0 -1
- package/get-shit-done/workflows/settings.md +1 -57
- package/get-shit-done/workflows/transition.md +3 -86
- package/get-shit-done/workflows/verify-work.md +0 -64
- package/package.json +1 -1
- package/scripts/build-hooks.js +0 -2
- package/sdk/prompts/agents/gsd-executor.md +2 -0
- package/sdk/prompts/agents/gsd-plan-checker.md +0 -3
- package/sdk/prompts/agents/gsd-roadmapper.md +0 -29
- package/sdk/src/config.ts +4 -5
- package/sdk/src/golden/golden-integration-covered.ts +0 -2
- package/sdk/src/golden/golden-policy.ts +1 -1
- package/sdk/src/golden/golden.integration.test.ts +0 -27
- package/sdk/src/golden/read-only-golden-rows.ts +0 -15
- package/sdk/src/query/QUERY-HANDLERS.md +3 -34
- package/sdk/src/query/claude-md.ts +421 -0
- package/sdk/src/query/commit.test.ts +155 -1
- package/sdk/src/query/commit.ts +71 -17
- package/sdk/src/query/config-gates.test.ts +1 -2
- package/sdk/src/query/config-gates.ts +1 -5
- package/sdk/src/query/config-mutation.test.ts +0 -1
- package/sdk/src/query/config-mutation.ts +5 -6
- package/sdk/src/query/config-query.test.ts +2 -2
- package/sdk/src/query/config-query.ts +12 -18
- package/sdk/src/query/decomposed-handlers.test.ts +0 -64
- package/sdk/src/query/index.ts +4 -68
- package/sdk/src/query/init.test.ts +0 -64
- package/sdk/src/query/init.ts +0 -189
- package/sdk/src/query/normalize-query-command.ts +0 -2
- package/sdk/src/query/profile.test.ts +0 -43
- package/sdk/src/query/profile.ts +1 -141
- package/sdk/src/query/state-mutation.ts +18 -0
- package/sdk/src/runtime-health.ts +3 -3
- package/agents/gsd-ai-researcher.md +0 -133
- package/agents/gsd-doc-classifier.md +0 -168
- package/agents/gsd-doc-synthesizer.md +0 -204
- package/agents/gsd-doc-verifier.md +0 -217
- package/agents/gsd-doc-writer.md +0 -615
- package/agents/gsd-domain-researcher.md +0 -153
- package/agents/gsd-eval-auditor.md +0 -191
- package/agents/gsd-eval-planner.md +0 -154
- package/agents/gsd-framework-selector.md +0 -160
- package/agents/gsd-intel-updater.md +0 -334
- package/agents/gsd-nyquist-auditor.md +0 -203
- package/agents/gsd-ui-auditor.md +0 -495
- package/agents/gsd-ui-checker.md +0 -309
- package/agents/gsd-ui-researcher.md +0 -380
- package/agents/gsd-user-profiler.md +0 -171
- package/commands/gsd/ai-integration-phase.md +0 -36
- package/commands/gsd/analyze-dependencies.md +0 -34
- package/commands/gsd/audit-fix.md +0 -33
- package/commands/gsd/audit-milestone.md +0 -36
- package/commands/gsd/audit-uat.md +0 -24
- package/commands/gsd/docs-update.md +0 -48
- package/commands/gsd/eval-review.md +0 -32
- package/commands/gsd/explore.md +0 -27
- package/commands/gsd/extract_learnings.md +0 -22
- package/commands/gsd/forensics.md +0 -56
- package/commands/gsd/from-gsd2.md +0 -47
- package/commands/gsd/graphify.md +0 -201
- package/commands/gsd/import.md +0 -37
- package/commands/gsd/inbox.md +0 -38
- package/commands/gsd/ingest-docs.md +0 -42
- package/commands/gsd/intel.md +0 -179
- package/commands/gsd/join-discord.md +0 -19
- package/commands/gsd/list-phase-assumptions.md +0 -46
- package/commands/gsd/list-workspaces.md +0 -19
- package/commands/gsd/manager.md +0 -40
- package/commands/gsd/milestone-summary.md +0 -51
- package/commands/gsd/new-workspace.md +0 -44
- package/commands/gsd/plan-milestone-gaps.md +0 -34
- package/commands/gsd/plan-review-convergence.md +0 -52
- package/commands/gsd/plant-seed.md +0 -28
- package/commands/gsd/profile-user.md +0 -46
- package/commands/gsd/reapply-patches.md +0 -331
- package/commands/gsd/remove-workspace.md +0 -26
- package/commands/gsd/review.md +0 -40
- package/commands/gsd/scan.md +0 -26
- package/commands/gsd/secure-phase.md +0 -35
- package/commands/gsd/session-report.md +0 -19
- package/commands/gsd/set-profile.md +0 -12
- package/commands/gsd/ship.md +0 -23
- package/commands/gsd/sketch-wrap-up.md +0 -31
- package/commands/gsd/sketch.md +0 -49
- package/commands/gsd/spec-phase.md +0 -62
- package/commands/gsd/spike-wrap-up.md +0 -31
- package/commands/gsd/spike.md +0 -46
- package/commands/gsd/stats.md +0 -18
- package/commands/gsd/sync-skills.md +0 -19
- package/commands/gsd/thread.md +0 -227
- package/commands/gsd/ui-phase.md +0 -34
- package/commands/gsd/ui-review.md +0 -32
- package/commands/gsd/ultraplan-phase.md +0 -33
- package/commands/gsd/update.md +0 -37
- package/commands/gsd/validate-phase.md +0 -35
- package/commands/gsd/workstreams.md +0 -69
- package/get-shit-done/bin/lib/docs.cjs +0 -267
- package/get-shit-done/bin/lib/graphify.cjs +0 -494
- package/get-shit-done/bin/lib/gsd2-import.cjs +0 -511
- package/get-shit-done/bin/lib/intel.cjs +0 -639
- package/get-shit-done/bin/lib/profile-output.cjs +0 -1080
- package/get-shit-done/bin/lib/profile-pipeline.cjs +0 -539
- package/get-shit-done/bin/lib/workstream.cjs +0 -495
- package/get-shit-done/references/ai-evals.md +0 -156
- package/get-shit-done/references/ai-frameworks.md +0 -186
- package/get-shit-done/references/doc-conflict-engine.md +0 -91
- package/get-shit-done/references/model-profile-resolution.md +0 -38
- package/get-shit-done/references/planner-reviews.md +0 -39
- package/get-shit-done/references/sketch-interactivity.md +0 -41
- package/get-shit-done/references/sketch-theme-system.md +0 -94
- package/get-shit-done/references/sketch-tooling.md +0 -45
- package/get-shit-done/references/sketch-variant-patterns.md +0 -81
- package/get-shit-done/references/thinking-models-debug.md +0 -44
- package/get-shit-done/references/thinking-models-execution.md +0 -50
- package/get-shit-done/references/thinking-models-planning.md +0 -62
- package/get-shit-done/references/thinking-models-research.md +0 -50
- package/get-shit-done/references/thinking-models-verification.md +0 -55
- package/get-shit-done/references/thinking-partner.md +0 -96
- package/get-shit-done/references/user-profiling.md +0 -681
- package/get-shit-done/references/workstream-flag.md +0 -111
- package/get-shit-done/templates/AI-SPEC.md +0 -246
- package/get-shit-done/templates/SECURITY.md +0 -61
- package/get-shit-done/templates/UI-SPEC.md +0 -100
- package/get-shit-done/templates/VALIDATION.md +0 -76
- package/get-shit-done/templates/dev-preferences.md +0 -21
- package/get-shit-done/templates/user-profile.md +0 -146
- package/get-shit-done/workflows/ai-integration-phase.md +0 -284
- package/get-shit-done/workflows/analyze-dependencies.md +0 -96
- package/get-shit-done/workflows/audit-fix.md +0 -175
- package/get-shit-done/workflows/audit-milestone.md +0 -340
- package/get-shit-done/workflows/audit-uat.md +0 -109
- package/get-shit-done/workflows/docs-update.md +0 -1155
- package/get-shit-done/workflows/eval-review.md +0 -155
- package/get-shit-done/workflows/explore.md +0 -141
- package/get-shit-done/workflows/extract_learnings.md +0 -242
- package/get-shit-done/workflows/forensics.md +0 -265
- package/get-shit-done/workflows/import.md +0 -246
- package/get-shit-done/workflows/inbox.md +0 -387
- package/get-shit-done/workflows/ingest-docs.md +0 -328
- package/get-shit-done/workflows/list-phase-assumptions.md +0 -178
- package/get-shit-done/workflows/list-workspaces.md +0 -56
- package/get-shit-done/workflows/manager.md +0 -365
- package/get-shit-done/workflows/milestone-summary.md +0 -223
- package/get-shit-done/workflows/new-workspace.md +0 -239
- package/get-shit-done/workflows/plan-milestone-gaps.md +0 -273
- package/get-shit-done/workflows/plan-review-convergence.md +0 -254
- package/get-shit-done/workflows/plant-seed.md +0 -172
- package/get-shit-done/workflows/profile-user.md +0 -452
- package/get-shit-done/workflows/remove-workspace.md +0 -92
- package/get-shit-done/workflows/review.md +0 -344
- package/get-shit-done/workflows/scan.md +0 -102
- package/get-shit-done/workflows/secure-phase.md +0 -166
- package/get-shit-done/workflows/session-report.md +0 -146
- package/get-shit-done/workflows/ship.md +0 -302
- package/get-shit-done/workflows/sketch-wrap-up.md +0 -283
- package/get-shit-done/workflows/sketch.md +0 -286
- package/get-shit-done/workflows/spec-phase.md +0 -262
- package/get-shit-done/workflows/spike-wrap-up.md +0 -281
- package/get-shit-done/workflows/spike.md +0 -362
- package/get-shit-done/workflows/stats.md +0 -60
- package/get-shit-done/workflows/sync-skills.md +0 -182
- package/get-shit-done/workflows/ui-phase.md +0 -323
- package/get-shit-done/workflows/ui-review.md +0 -190
- package/get-shit-done/workflows/ultraplan-phase.md +0 -189
- package/get-shit-done/workflows/update.md +0 -587
- package/get-shit-done/workflows/validate-phase.md +0 -176
- package/hooks/dist/gsd-check-update-worker.js +0 -108
- package/hooks/dist/gsd-check-update.js +0 -63
- package/hooks/gsd-check-update-worker.js +0 -108
- package/hooks/gsd-check-update.js +0 -63
- package/sdk/src/golden/fixtures/profile-sample-sessions/demo-project/sample.jsonl +0 -3
- package/sdk/src/query/docs-init.ts +0 -257
- package/sdk/src/query/intel.test.ts +0 -90
- package/sdk/src/query/intel.ts +0 -404
- package/sdk/src/query/profile-extract-messages.ts +0 -247
- package/sdk/src/query/profile-output.ts +0 -908
- package/sdk/src/query/profile-questionnaire-data.ts +0 -181
- package/sdk/src/query/profile-sample.ts +0 -184
- package/sdk/src/query/profile-scan-sessions.ts +0 -174
- package/sdk/src/query/workspace.test.ts +0 -119
- package/sdk/src/query/workspace.ts +0 -131
- package/sdk/src/query/workstream.test.ts +0 -51
- package/sdk/src/query/workstream.ts +0 -434
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
<purpose>
|
|
2
|
-
Audit Nyquist validation gaps for a completed phase. Generate missing tests. Update VALIDATION.md.
|
|
3
|
-
</purpose>
|
|
4
|
-
|
|
5
|
-
<required_reading>
|
|
6
|
-
@~/.claude/get-shit-done/references/ui-brand.md
|
|
7
|
-
</required_reading>
|
|
8
|
-
|
|
9
|
-
<available_agent_types>
|
|
10
|
-
Valid GSD subagent types (use exact names — do not fall back to 'general-purpose'):
|
|
11
|
-
- gsd-nyquist-auditor — Validates verification coverage
|
|
12
|
-
</available_agent_types>
|
|
13
|
-
|
|
14
|
-
<process>
|
|
15
|
-
|
|
16
|
-
## 0. Initialize
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
INIT=$(gsd-remix-sdk query init.phase-op "${PHASE_ARG}")
|
|
20
|
-
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
21
|
-
AGENT_SKILLS_AUDITOR=$(gsd-remix-sdk query agent-skills gsd-nyquist-auditor 2>/dev/null)
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
Parse: `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `padded_phase`.
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
AUDITOR_MODEL=$(gsd-remix-sdk query resolve-model gsd-nyquist-auditor --raw)
|
|
28
|
-
NYQUIST_CFG=$(gsd-remix-sdk query config-get workflow.nyquist_validation --raw)
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
If `NYQUIST_CFG` is `false`: exit with "Nyquist validation is disabled. Enable via /gsd-settings."
|
|
32
|
-
|
|
33
|
-
Display banner: `GSD > VALIDATE PHASE {N}: {name}`
|
|
34
|
-
|
|
35
|
-
## 1. Detect Input State
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
VALIDATION_FILE=$(ls "${PHASE_DIR}"/*-VALIDATION.md 2>/dev/null | head -1)
|
|
39
|
-
SUMMARY_FILES=$(ls "${PHASE_DIR}"/*-SUMMARY.md 2>/dev/null)
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
- **State A** (`VALIDATION_FILE` non-empty): Audit existing
|
|
43
|
-
- **State B** (`VALIDATION_FILE` empty, `SUMMARY_FILES` non-empty): Reconstruct from artifacts
|
|
44
|
-
- **State C** (`SUMMARY_FILES` empty): Exit — "Phase {N} not executed. Run /gsd-execute-phase {N} ${GSD_WS} first."
|
|
45
|
-
|
|
46
|
-
## 2. Discovery
|
|
47
|
-
|
|
48
|
-
### 2a. Read Phase Artifacts
|
|
49
|
-
|
|
50
|
-
Read all PLAN and SUMMARY files. Extract: task lists, requirement IDs, key-files changed, verify blocks.
|
|
51
|
-
|
|
52
|
-
### 2b. Build Requirement-to-Task Map
|
|
53
|
-
|
|
54
|
-
Per task: `{ task_id, plan_id, wave, requirement_ids, has_automated_command }`
|
|
55
|
-
|
|
56
|
-
### 2c. Detect Test Infrastructure
|
|
57
|
-
|
|
58
|
-
State A: Parse from existing VALIDATION.md Test Infrastructure table.
|
|
59
|
-
State B: Filesystem scan:
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
find . -name "pytest.ini" -o -name "jest.config.*" -o -name "vitest.config.*" -o -name "pyproject.toml" 2>/dev/null | head -10
|
|
63
|
-
find . \( -name "*.test.*" -o -name "*.spec.*" -o -name "test_*" \) -not -path "*/node_modules/*" 2>/dev/null | head -40
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### 2d. Cross-Reference
|
|
67
|
-
|
|
68
|
-
Match each requirement to existing tests by filename, imports, test descriptions. Record: requirement → test_file → status.
|
|
69
|
-
|
|
70
|
-
## 3. Gap Analysis
|
|
71
|
-
|
|
72
|
-
Classify each requirement:
|
|
73
|
-
|
|
74
|
-
| Status | Criteria |
|
|
75
|
-
|--------|----------|
|
|
76
|
-
| COVERED | Test exists, targets behavior, runs green |
|
|
77
|
-
| PARTIAL | Test exists, failing or incomplete |
|
|
78
|
-
| MISSING | No test found |
|
|
79
|
-
|
|
80
|
-
Build: `{ task_id, requirement, gap_type, suggested_test_path, suggested_command }`
|
|
81
|
-
|
|
82
|
-
No gaps → skip to Step 6, set `nyquist_compliant: true`.
|
|
83
|
-
|
|
84
|
-
## 4. Present Gap Plan
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
**Text mode (`workflow.text_mode: true` in config or `--text` flag):** Set `TEXT_MODE=true` if `--text` is present in `$ARGUMENTS` OR `text_mode` from init JSON is `true`. When TEXT_MODE is active, replace every `AskUserQuestion` call with a plain-text numbered list and ask the user to type their choice number. This is required for non-Claude runtimes (OpenAI Codex, Gemini CLI, etc.) where `AskUserQuestion` is not available.
|
|
88
|
-
Call AskUserQuestion with gap table and options:
|
|
89
|
-
1. "Fix all gaps" → Step 5
|
|
90
|
-
2. "Skip — mark manual-only" → add to Manual-Only, Step 6
|
|
91
|
-
3. "Cancel" → exit
|
|
92
|
-
|
|
93
|
-
## 5. Spawn gsd-nyquist-auditor
|
|
94
|
-
|
|
95
|
-
```
|
|
96
|
-
Task(
|
|
97
|
-
prompt="Read ~/.claude/agents/gsd-nyquist-auditor.md for instructions.\n\n" +
|
|
98
|
-
"<files_to_read>{PLAN, SUMMARY, impl files, VALIDATION.md}</files_to_read>" +
|
|
99
|
-
"<gaps>{gap list}</gaps>" +
|
|
100
|
-
"<test_infrastructure>{framework, config, commands}</test_infrastructure>" +
|
|
101
|
-
"<constraints>Never modify impl files. Max 3 debug iterations. Escalate impl bugs.</constraints>" +
|
|
102
|
-
"${AGENT_SKILLS_AUDITOR}",
|
|
103
|
-
subagent_type="gsd-nyquist-auditor",
|
|
104
|
-
model="{AUDITOR_MODEL}",
|
|
105
|
-
description="Fill validation gaps for Phase {N}"
|
|
106
|
-
)
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
Handle return:
|
|
110
|
-
- `## GAPS FILLED` → record tests + map updates, Step 6
|
|
111
|
-
- `## PARTIAL` → record resolved, move escalated to manual-only, Step 6
|
|
112
|
-
- `## ESCALATE` → move all to manual-only, Step 6
|
|
113
|
-
|
|
114
|
-
## 6. Generate/Update VALIDATION.md
|
|
115
|
-
|
|
116
|
-
**State B (create):**
|
|
117
|
-
1. Read template from `~/.claude/get-shit-done/templates/VALIDATION.md`
|
|
118
|
-
2. Fill: frontmatter, Test Infrastructure, Per-Task Map, Manual-Only, Sign-Off
|
|
119
|
-
3. Write to `${PHASE_DIR}/${PADDED_PHASE}-VALIDATION.md`
|
|
120
|
-
|
|
121
|
-
**State A (update):**
|
|
122
|
-
1. Update Per-Task Map statuses, add escalated to Manual-Only, update frontmatter
|
|
123
|
-
2. Append audit trail:
|
|
124
|
-
|
|
125
|
-
```markdown
|
|
126
|
-
## Validation Audit {date}
|
|
127
|
-
| Metric | Count |
|
|
128
|
-
|--------|-------|
|
|
129
|
-
| Gaps found | {N} |
|
|
130
|
-
| Resolved | {M} |
|
|
131
|
-
| Escalated | {K} |
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
## 7. Commit
|
|
135
|
-
|
|
136
|
-
```bash
|
|
137
|
-
git add {test_files}
|
|
138
|
-
git commit -m "test(phase-${PHASE}): add Nyquist validation tests"
|
|
139
|
-
|
|
140
|
-
gsd-remix-sdk query commit "docs(phase-${PHASE}): add/update validation strategy"
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
## 8. Results + Routing
|
|
144
|
-
|
|
145
|
-
**Compliant:**
|
|
146
|
-
```
|
|
147
|
-
GSD > PHASE {N} IS NYQUIST-COMPLIANT
|
|
148
|
-
All requirements have automated verification.
|
|
149
|
-
▶ Next: /gsd-audit-milestone ${GSD_WS}
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
**Partial:**
|
|
153
|
-
```
|
|
154
|
-
GSD > PHASE {N} VALIDATED (PARTIAL)
|
|
155
|
-
{M} automated, {K} manual-only.
|
|
156
|
-
▶ Retry: /gsd-validate-phase {N} ${GSD_WS}
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
Display `/clear` reminder.
|
|
160
|
-
|
|
161
|
-
</process>
|
|
162
|
-
|
|
163
|
-
<success_criteria>
|
|
164
|
-
- [ ] Nyquist config checked (exit if disabled)
|
|
165
|
-
- [ ] Input state detected (A/B/C)
|
|
166
|
-
- [ ] State C exits cleanly
|
|
167
|
-
- [ ] PLAN/SUMMARY files read, requirement map built
|
|
168
|
-
- [ ] Test infrastructure detected
|
|
169
|
-
- [ ] Gaps classified (COVERED/PARTIAL/MISSING)
|
|
170
|
-
- [ ] User gate with gap table
|
|
171
|
-
- [ ] Auditor spawned with complete context
|
|
172
|
-
- [ ] All three return formats handled
|
|
173
|
-
- [ ] VALIDATION.md created or updated
|
|
174
|
-
- [ ] Test files committed separately
|
|
175
|
-
- [ ] Results with routing presented
|
|
176
|
-
</success_criteria>
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// gsd-hook-version: {{GSD_VERSION}}
|
|
3
|
-
// Background worker spawned by gsd-check-update.js (SessionStart hook).
|
|
4
|
-
// Checks for GSD updates and stale hooks, writes result to cache file.
|
|
5
|
-
// Receives paths via environment variables set by the parent hook.
|
|
6
|
-
//
|
|
7
|
-
// Using a separate file (rather than node -e '<inline code>') avoids the
|
|
8
|
-
// template-literal regex-escaping problem: regex source is plain JS here.
|
|
9
|
-
|
|
10
|
-
'use strict';
|
|
11
|
-
|
|
12
|
-
const fs = require('fs');
|
|
13
|
-
const path = require('path');
|
|
14
|
-
const { execFileSync } = require('child_process');
|
|
15
|
-
|
|
16
|
-
const cacheFile = process.env.GSD_CACHE_FILE;
|
|
17
|
-
const projectVersionFile = process.env.GSD_PROJECT_VERSION_FILE;
|
|
18
|
-
const globalVersionFile = process.env.GSD_GLOBAL_VERSION_FILE;
|
|
19
|
-
|
|
20
|
-
// Compare semver: true if a > b (a is strictly newer than b)
|
|
21
|
-
// Strips pre-release suffixes (e.g. '3-beta.1' → '3') to avoid NaN from Number()
|
|
22
|
-
function isNewer(a, b) {
|
|
23
|
-
const pa = (a || '').split('.').map(s => Number(s.replace(/-.*/, '')) || 0);
|
|
24
|
-
const pb = (b || '').split('.').map(s => Number(s.replace(/-.*/, '')) || 0);
|
|
25
|
-
for (let i = 0; i < 3; i++) {
|
|
26
|
-
if (pa[i] > pb[i]) return true;
|
|
27
|
-
if (pa[i] < pb[i]) return false;
|
|
28
|
-
}
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
// Check project directory first (local install), then global
|
|
33
|
-
let installed = '0.0.0';
|
|
34
|
-
let configDir = '';
|
|
35
|
-
try {
|
|
36
|
-
if (fs.existsSync(projectVersionFile)) {
|
|
37
|
-
installed = fs.readFileSync(projectVersionFile, 'utf8').trim();
|
|
38
|
-
configDir = path.dirname(path.dirname(projectVersionFile));
|
|
39
|
-
} else if (fs.existsSync(globalVersionFile)) {
|
|
40
|
-
installed = fs.readFileSync(globalVersionFile, 'utf8').trim();
|
|
41
|
-
configDir = path.dirname(path.dirname(globalVersionFile));
|
|
42
|
-
}
|
|
43
|
-
} catch (e) {}
|
|
44
|
-
|
|
45
|
-
// Check for stale hooks — compare hook version headers against installed VERSION
|
|
46
|
-
// Hooks are installed at configDir/hooks/ (e.g. ~/.claude/hooks/) (#1421)
|
|
47
|
-
// Only check hooks that GSD currently ships — orphaned files from removed features
|
|
48
|
-
// (e.g., gsd-intel-*.js) must be ignored to avoid permanent stale warnings (#1750)
|
|
49
|
-
const MANAGED_HOOKS = [
|
|
50
|
-
'gsd-check-update-worker.js',
|
|
51
|
-
'gsd-check-update.js',
|
|
52
|
-
'gsd-context-monitor.js',
|
|
53
|
-
'gsd-phase-boundary.sh',
|
|
54
|
-
'gsd-prompt-guard.js',
|
|
55
|
-
'gsd-read-guard.js',
|
|
56
|
-
'gsd-read-injection-scanner.js',
|
|
57
|
-
'gsd-session-state.sh',
|
|
58
|
-
'gsd-statusline.js',
|
|
59
|
-
'gsd-validate-commit.sh',
|
|
60
|
-
'gsd-workflow-guard.js',
|
|
61
|
-
];
|
|
62
|
-
|
|
63
|
-
let staleHooks = [];
|
|
64
|
-
if (configDir) {
|
|
65
|
-
const hooksDir = path.join(configDir, 'hooks');
|
|
66
|
-
try {
|
|
67
|
-
if (fs.existsSync(hooksDir)) {
|
|
68
|
-
const hookFiles = fs.readdirSync(hooksDir).filter(f => MANAGED_HOOKS.includes(f));
|
|
69
|
-
for (const hookFile of hookFiles) {
|
|
70
|
-
try {
|
|
71
|
-
const content = fs.readFileSync(path.join(hooksDir, hookFile), 'utf8');
|
|
72
|
-
// Match both JS (//) and bash (#) comment styles
|
|
73
|
-
const versionMatch = content.match(/(?:\/\/|#) gsd-hook-version:\s*(.+)/);
|
|
74
|
-
if (versionMatch) {
|
|
75
|
-
const hookVersion = versionMatch[1].trim();
|
|
76
|
-
if (isNewer(installed, hookVersion) && !hookVersion.includes('{{')) {
|
|
77
|
-
staleHooks.push({ file: hookFile, hookVersion, installedVersion: installed });
|
|
78
|
-
}
|
|
79
|
-
} else {
|
|
80
|
-
// No version header at all — definitely stale (pre-version-tracking)
|
|
81
|
-
staleHooks.push({ file: hookFile, hookVersion: 'unknown', installedVersion: installed });
|
|
82
|
-
}
|
|
83
|
-
} catch (e) {}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
} catch (e) {}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
let latest = null;
|
|
90
|
-
try {
|
|
91
|
-
latest = execFileSync('npm', ['view', 'get-shit-done-cc', 'version'], {
|
|
92
|
-
encoding: 'utf8',
|
|
93
|
-
timeout: 10000,
|
|
94
|
-
windowsHide: true,
|
|
95
|
-
}).trim();
|
|
96
|
-
} catch (e) {}
|
|
97
|
-
|
|
98
|
-
const result = {
|
|
99
|
-
update_available: latest && isNewer(latest, installed),
|
|
100
|
-
installed,
|
|
101
|
-
latest: latest || 'unknown',
|
|
102
|
-
checked: Math.floor(Date.now() / 1000),
|
|
103
|
-
stale_hooks: staleHooks.length > 0 ? staleHooks : undefined,
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
if (cacheFile) {
|
|
107
|
-
try { fs.writeFileSync(cacheFile, JSON.stringify(result)); } catch (e) {}
|
|
108
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// gsd-hook-version: {{GSD_VERSION}}
|
|
3
|
-
// Check for GSD updates in background, write result to cache
|
|
4
|
-
// Called by SessionStart hook - runs once per session
|
|
5
|
-
|
|
6
|
-
const fs = require('fs');
|
|
7
|
-
const path = require('path');
|
|
8
|
-
const os = require('os');
|
|
9
|
-
const { spawn } = require('child_process');
|
|
10
|
-
|
|
11
|
-
const homeDir = os.homedir();
|
|
12
|
-
const cwd = process.cwd();
|
|
13
|
-
|
|
14
|
-
// Detect runtime config directory (supports Claude, OpenCode, Kilo, Gemini)
|
|
15
|
-
// Respects CLAUDE_CONFIG_DIR for custom config directory setups
|
|
16
|
-
function detectConfigDir(baseDir) {
|
|
17
|
-
// Check env override first (supports multi-account setups)
|
|
18
|
-
const envDir = process.env.CLAUDE_CONFIG_DIR;
|
|
19
|
-
if (envDir && fs.existsSync(path.join(envDir, 'get-shit-done', 'VERSION'))) {
|
|
20
|
-
return envDir;
|
|
21
|
-
}
|
|
22
|
-
for (const dir of ['.claude', '.gemini', '.config/kilo', '.kilo', '.config/opencode', '.opencode']) {
|
|
23
|
-
if (fs.existsSync(path.join(baseDir, dir, 'get-shit-done', 'VERSION'))) {
|
|
24
|
-
return path.join(baseDir, dir);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
return envDir || path.join(baseDir, '.claude');
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const globalConfigDir = detectConfigDir(homeDir);
|
|
31
|
-
const projectConfigDir = detectConfigDir(cwd);
|
|
32
|
-
// Use a shared, tool-agnostic cache directory to avoid multi-runtime
|
|
33
|
-
// resolution mismatches when different runtimes trigger update checks (#1421).
|
|
34
|
-
const cacheDir = path.join(homeDir, '.cache', 'gsd');
|
|
35
|
-
const cacheFile = path.join(cacheDir, 'gsd-update-check.json');
|
|
36
|
-
|
|
37
|
-
// VERSION file locations (check project first, then global)
|
|
38
|
-
const projectVersionFile = path.join(projectConfigDir, 'get-shit-done', 'VERSION');
|
|
39
|
-
const globalVersionFile = path.join(globalConfigDir, 'get-shit-done', 'VERSION');
|
|
40
|
-
|
|
41
|
-
// Ensure cache directory exists
|
|
42
|
-
if (!fs.existsSync(cacheDir)) {
|
|
43
|
-
fs.mkdirSync(cacheDir, { recursive: true });
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// Run check in background via a dedicated worker script.
|
|
47
|
-
// Spawning a file (rather than node -e '<inline code>') keeps the worker logic
|
|
48
|
-
// in plain JS with no template-literal regex-escaping concerns, and makes the
|
|
49
|
-
// worker independently testable.
|
|
50
|
-
const workerPath = path.join(__dirname, 'gsd-check-update-worker.js');
|
|
51
|
-
const child = spawn(process.execPath, [workerPath], {
|
|
52
|
-
stdio: 'ignore',
|
|
53
|
-
windowsHide: true,
|
|
54
|
-
detached: true, // Required on Windows for proper process detachment
|
|
55
|
-
env: {
|
|
56
|
-
...process.env,
|
|
57
|
-
GSD_CACHE_FILE: cacheFile,
|
|
58
|
-
GSD_PROJECT_VERSION_FILE: projectVersionFile,
|
|
59
|
-
GSD_GLOBAL_VERSION_FILE: globalVersionFile,
|
|
60
|
-
},
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
child.unref();
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// gsd-hook-version: {{GSD_VERSION}}
|
|
3
|
-
// Background worker spawned by gsd-check-update.js (SessionStart hook).
|
|
4
|
-
// Checks for GSD updates and stale hooks, writes result to cache file.
|
|
5
|
-
// Receives paths via environment variables set by the parent hook.
|
|
6
|
-
//
|
|
7
|
-
// Using a separate file (rather than node -e '<inline code>') avoids the
|
|
8
|
-
// template-literal regex-escaping problem: regex source is plain JS here.
|
|
9
|
-
|
|
10
|
-
'use strict';
|
|
11
|
-
|
|
12
|
-
const fs = require('fs');
|
|
13
|
-
const path = require('path');
|
|
14
|
-
const { execFileSync } = require('child_process');
|
|
15
|
-
|
|
16
|
-
const cacheFile = process.env.GSD_CACHE_FILE;
|
|
17
|
-
const projectVersionFile = process.env.GSD_PROJECT_VERSION_FILE;
|
|
18
|
-
const globalVersionFile = process.env.GSD_GLOBAL_VERSION_FILE;
|
|
19
|
-
|
|
20
|
-
// Compare semver: true if a > b (a is strictly newer than b)
|
|
21
|
-
// Strips pre-release suffixes (e.g. '3-beta.1' → '3') to avoid NaN from Number()
|
|
22
|
-
function isNewer(a, b) {
|
|
23
|
-
const pa = (a || '').split('.').map(s => Number(s.replace(/-.*/, '')) || 0);
|
|
24
|
-
const pb = (b || '').split('.').map(s => Number(s.replace(/-.*/, '')) || 0);
|
|
25
|
-
for (let i = 0; i < 3; i++) {
|
|
26
|
-
if (pa[i] > pb[i]) return true;
|
|
27
|
-
if (pa[i] < pb[i]) return false;
|
|
28
|
-
}
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
// Check project directory first (local install), then global
|
|
33
|
-
let installed = '0.0.0';
|
|
34
|
-
let configDir = '';
|
|
35
|
-
try {
|
|
36
|
-
if (fs.existsSync(projectVersionFile)) {
|
|
37
|
-
installed = fs.readFileSync(projectVersionFile, 'utf8').trim();
|
|
38
|
-
configDir = path.dirname(path.dirname(projectVersionFile));
|
|
39
|
-
} else if (fs.existsSync(globalVersionFile)) {
|
|
40
|
-
installed = fs.readFileSync(globalVersionFile, 'utf8').trim();
|
|
41
|
-
configDir = path.dirname(path.dirname(globalVersionFile));
|
|
42
|
-
}
|
|
43
|
-
} catch (e) {}
|
|
44
|
-
|
|
45
|
-
// Check for stale hooks — compare hook version headers against installed VERSION
|
|
46
|
-
// Hooks are installed at configDir/hooks/ (e.g. ~/.claude/hooks/) (#1421)
|
|
47
|
-
// Only check hooks that GSD currently ships — orphaned files from removed features
|
|
48
|
-
// (e.g., gsd-intel-*.js) must be ignored to avoid permanent stale warnings (#1750)
|
|
49
|
-
const MANAGED_HOOKS = [
|
|
50
|
-
'gsd-check-update-worker.js',
|
|
51
|
-
'gsd-check-update.js',
|
|
52
|
-
'gsd-context-monitor.js',
|
|
53
|
-
'gsd-phase-boundary.sh',
|
|
54
|
-
'gsd-prompt-guard.js',
|
|
55
|
-
'gsd-read-guard.js',
|
|
56
|
-
'gsd-read-injection-scanner.js',
|
|
57
|
-
'gsd-session-state.sh',
|
|
58
|
-
'gsd-statusline.js',
|
|
59
|
-
'gsd-validate-commit.sh',
|
|
60
|
-
'gsd-workflow-guard.js',
|
|
61
|
-
];
|
|
62
|
-
|
|
63
|
-
let staleHooks = [];
|
|
64
|
-
if (configDir) {
|
|
65
|
-
const hooksDir = path.join(configDir, 'hooks');
|
|
66
|
-
try {
|
|
67
|
-
if (fs.existsSync(hooksDir)) {
|
|
68
|
-
const hookFiles = fs.readdirSync(hooksDir).filter(f => MANAGED_HOOKS.includes(f));
|
|
69
|
-
for (const hookFile of hookFiles) {
|
|
70
|
-
try {
|
|
71
|
-
const content = fs.readFileSync(path.join(hooksDir, hookFile), 'utf8');
|
|
72
|
-
// Match both JS (//) and bash (#) comment styles
|
|
73
|
-
const versionMatch = content.match(/(?:\/\/|#) gsd-hook-version:\s*(.+)/);
|
|
74
|
-
if (versionMatch) {
|
|
75
|
-
const hookVersion = versionMatch[1].trim();
|
|
76
|
-
if (isNewer(installed, hookVersion) && !hookVersion.includes('{{')) {
|
|
77
|
-
staleHooks.push({ file: hookFile, hookVersion, installedVersion: installed });
|
|
78
|
-
}
|
|
79
|
-
} else {
|
|
80
|
-
// No version header at all — definitely stale (pre-version-tracking)
|
|
81
|
-
staleHooks.push({ file: hookFile, hookVersion: 'unknown', installedVersion: installed });
|
|
82
|
-
}
|
|
83
|
-
} catch (e) {}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
} catch (e) {}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
let latest = null;
|
|
90
|
-
try {
|
|
91
|
-
latest = execFileSync('npm', ['view', 'get-shit-done-cc', 'version'], {
|
|
92
|
-
encoding: 'utf8',
|
|
93
|
-
timeout: 10000,
|
|
94
|
-
windowsHide: true,
|
|
95
|
-
}).trim();
|
|
96
|
-
} catch (e) {}
|
|
97
|
-
|
|
98
|
-
const result = {
|
|
99
|
-
update_available: latest && isNewer(latest, installed),
|
|
100
|
-
installed,
|
|
101
|
-
latest: latest || 'unknown',
|
|
102
|
-
checked: Math.floor(Date.now() / 1000),
|
|
103
|
-
stale_hooks: staleHooks.length > 0 ? staleHooks : undefined,
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
if (cacheFile) {
|
|
107
|
-
try { fs.writeFileSync(cacheFile, JSON.stringify(result)); } catch (e) {}
|
|
108
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// gsd-hook-version: {{GSD_VERSION}}
|
|
3
|
-
// Check for GSD updates in background, write result to cache
|
|
4
|
-
// Called by SessionStart hook - runs once per session
|
|
5
|
-
|
|
6
|
-
const fs = require('fs');
|
|
7
|
-
const path = require('path');
|
|
8
|
-
const os = require('os');
|
|
9
|
-
const { spawn } = require('child_process');
|
|
10
|
-
|
|
11
|
-
const homeDir = os.homedir();
|
|
12
|
-
const cwd = process.cwd();
|
|
13
|
-
|
|
14
|
-
// Detect runtime config directory (supports Claude, OpenCode, Kilo, Gemini)
|
|
15
|
-
// Respects CLAUDE_CONFIG_DIR for custom config directory setups
|
|
16
|
-
function detectConfigDir(baseDir) {
|
|
17
|
-
// Check env override first (supports multi-account setups)
|
|
18
|
-
const envDir = process.env.CLAUDE_CONFIG_DIR;
|
|
19
|
-
if (envDir && fs.existsSync(path.join(envDir, 'get-shit-done', 'VERSION'))) {
|
|
20
|
-
return envDir;
|
|
21
|
-
}
|
|
22
|
-
for (const dir of ['.claude', '.gemini', '.config/kilo', '.kilo', '.config/opencode', '.opencode']) {
|
|
23
|
-
if (fs.existsSync(path.join(baseDir, dir, 'get-shit-done', 'VERSION'))) {
|
|
24
|
-
return path.join(baseDir, dir);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
return envDir || path.join(baseDir, '.claude');
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const globalConfigDir = detectConfigDir(homeDir);
|
|
31
|
-
const projectConfigDir = detectConfigDir(cwd);
|
|
32
|
-
// Use a shared, tool-agnostic cache directory to avoid multi-runtime
|
|
33
|
-
// resolution mismatches when different runtimes trigger update checks (#1421).
|
|
34
|
-
const cacheDir = path.join(homeDir, '.cache', 'gsd');
|
|
35
|
-
const cacheFile = path.join(cacheDir, 'gsd-update-check.json');
|
|
36
|
-
|
|
37
|
-
// VERSION file locations (check project first, then global)
|
|
38
|
-
const projectVersionFile = path.join(projectConfigDir, 'get-shit-done', 'VERSION');
|
|
39
|
-
const globalVersionFile = path.join(globalConfigDir, 'get-shit-done', 'VERSION');
|
|
40
|
-
|
|
41
|
-
// Ensure cache directory exists
|
|
42
|
-
if (!fs.existsSync(cacheDir)) {
|
|
43
|
-
fs.mkdirSync(cacheDir, { recursive: true });
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// Run check in background via a dedicated worker script.
|
|
47
|
-
// Spawning a file (rather than node -e '<inline code>') keeps the worker logic
|
|
48
|
-
// in plain JS with no template-literal regex-escaping concerns, and makes the
|
|
49
|
-
// worker independently testable.
|
|
50
|
-
const workerPath = path.join(__dirname, 'gsd-check-update-worker.js');
|
|
51
|
-
const child = spawn(process.execPath, [workerPath], {
|
|
52
|
-
stdio: 'ignore',
|
|
53
|
-
windowsHide: true,
|
|
54
|
-
detached: true, // Required on Windows for proper process detachment
|
|
55
|
-
env: {
|
|
56
|
-
...process.env,
|
|
57
|
-
GSD_CACHE_FILE: cacheFile,
|
|
58
|
-
GSD_PROJECT_VERSION_FILE: projectVersionFile,
|
|
59
|
-
GSD_GLOBAL_VERSION_FILE: globalVersionFile,
|
|
60
|
-
},
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
child.unref();
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
{"type":"user","userType":"external","message":{"content":"profile sample message one"},"timestamp":1700000000000,"cwd":"/fixture/proj"}
|
|
2
|
-
{"type":"assistant","message":{"content":"ok"},"timestamp":1700000000001}
|
|
3
|
-
{"type":"user","userType":"external","message":{"content":"profile sample message two"},"timestamp":1700000000002,"cwd":"/fixture/proj"}
|