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
|
@@ -39,28 +39,6 @@ Output: Milestone archived (roadmap + requirements), PROJECT.md evolved, git tag
|
|
|
39
39
|
|
|
40
40
|
**Follow complete-milestone.md workflow:**
|
|
41
41
|
|
|
42
|
-
0. **Check for audit:**
|
|
43
|
-
|
|
44
|
-
- Look for `.planning/v{{version}}-MILESTONE-AUDIT.md`
|
|
45
|
-
- If missing or stale: recommend `/gsd-audit-milestone` first
|
|
46
|
-
- If audit status is `gaps_found`: recommend `/gsd-plan-milestone-gaps` first
|
|
47
|
-
- If audit status is `passed`: proceed to step 1
|
|
48
|
-
|
|
49
|
-
```markdown
|
|
50
|
-
## Pre-flight Check
|
|
51
|
-
|
|
52
|
-
{If no v{{version}}-MILESTONE-AUDIT.md:}
|
|
53
|
-
⚠ No milestone audit found. Run `/gsd-audit-milestone` first to verify
|
|
54
|
-
requirements coverage, cross-phase integration, and E2E flows.
|
|
55
|
-
|
|
56
|
-
{If audit has gaps:}
|
|
57
|
-
⚠ Milestone audit found gaps. Run `/gsd-plan-milestone-gaps` to create
|
|
58
|
-
phases that close the gaps, or proceed anyway to accept as tech debt.
|
|
59
|
-
|
|
60
|
-
{If audit passed:}
|
|
61
|
-
✓ Milestone audit passed. Proceeding with completion.
|
|
62
|
-
```
|
|
63
|
-
|
|
64
42
|
1. **Verify readiness:**
|
|
65
43
|
|
|
66
44
|
- Check all phases in milestone have completed plans (SUMMARY.md exists)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gsd:plan-phase
|
|
3
3
|
description: Create detailed phase plan (PLAN.md) with verification loop
|
|
4
|
-
argument-hint: "[phase] [--auto] [--research] [--skip-research] [--gaps] [--skip-verify] [--prd <file>] [--
|
|
4
|
+
argument-hint: "[phase] [--auto] [--research] [--skip-research] [--gaps] [--skip-verify] [--prd <file>] [--text] [--tdd]"
|
|
5
5
|
agent: gsd-planner
|
|
6
6
|
allowed-tools:
|
|
7
7
|
- Read
|
|
@@ -40,7 +40,6 @@ Phase number: $ARGUMENTS (optional — auto-detects next unplanned phase if omit
|
|
|
40
40
|
- `--gaps` — Gap closure mode (reads VERIFICATION.md, skips research)
|
|
41
41
|
- `--skip-verify` — Skip verification loop
|
|
42
42
|
- `--prd <file>` — Use a PRD/acceptance criteria file instead of discuss-phase. Parses requirements into CONTEXT.md automatically. Skips discuss-phase entirely.
|
|
43
|
-
- `--reviews` — Replan incorporating cross-AI review feedback from REVIEWS.md (produced by `/gsd-review`)
|
|
44
43
|
- `--text` — Use plain-text numbered lists instead of TUI menus (required for `/rc` remote sessions)
|
|
45
44
|
|
|
46
45
|
Normalize phase input in step 2 before any directory lookups.
|
|
@@ -78,15 +78,6 @@
|
|
|
78
78
|
* Open Artifact Audit:
|
|
79
79
|
* audit-open [--json] Scan all .planning/ artifact types for unresolved items
|
|
80
80
|
*
|
|
81
|
-
* Intel:
|
|
82
|
-
* intel query <term> Query intel files for a term
|
|
83
|
-
* intel status Show intel file freshness
|
|
84
|
-
* intel update Trigger intel refresh (returns agent spawn hint)
|
|
85
|
-
* intel diff Show changed intel entries since last snapshot
|
|
86
|
-
* intel snapshot Save current intel state as diff baseline
|
|
87
|
-
* intel patch-meta <file> Update _meta.updated_at in an intel file
|
|
88
|
-
* intel validate Validate intel file structure
|
|
89
|
-
* intel extract-exports <file> Extract exported symbols from a source file
|
|
90
81
|
*
|
|
91
82
|
* Scaffolding:
|
|
92
83
|
* scaffold context --phase <N> Create CONTEXT.md template
|
|
@@ -154,7 +145,6 @@
|
|
|
154
145
|
* init progress All context for progress workflow
|
|
155
146
|
*
|
|
156
147
|
* Documentation:
|
|
157
|
-
* docs-init Project context for docs-update workflow
|
|
158
148
|
*
|
|
159
149
|
* Learnings:
|
|
160
150
|
* learnings list List all global learnings (JSON)
|
|
@@ -162,10 +152,6 @@
|
|
|
162
152
|
* learnings copy Copy from current project's LEARNINGS.md
|
|
163
153
|
* learnings prune --older-than <dur> Remove entries older than duration (e.g. 90d)
|
|
164
154
|
* learnings delete <id> Delete a learning by ID
|
|
165
|
-
*
|
|
166
|
-
* GSD-2 Migration:
|
|
167
|
-
* from-gsd2 [--path <dir>] [--force] [--dry-run]
|
|
168
|
-
* Import a GSD-2 (.gsd/) project back to GSD v1 (.planning/) format
|
|
169
155
|
*/
|
|
170
156
|
|
|
171
157
|
const fs = require('fs');
|
|
@@ -182,10 +168,7 @@ const milestone = require('./lib/milestone.cjs');
|
|
|
182
168
|
const commands = require('./lib/commands.cjs');
|
|
183
169
|
const init = require('./lib/init.cjs');
|
|
184
170
|
const frontmatter = require('./lib/frontmatter.cjs');
|
|
185
|
-
const
|
|
186
|
-
const profileOutput = require('./lib/profile-output.cjs');
|
|
187
|
-
const workstream = require('./lib/workstream.cjs');
|
|
188
|
-
const docs = require('./lib/docs.cjs');
|
|
171
|
+
const claudeMd = require('./lib/claude-md.cjs');
|
|
189
172
|
const learnings = require('./lib/learnings.cjs');
|
|
190
173
|
|
|
191
174
|
// ─── Arg parsing helpers ──────────────────────────────────────────────────────
|
|
@@ -320,7 +303,7 @@ async function main() {
|
|
|
320
303
|
const command = args[0];
|
|
321
304
|
|
|
322
305
|
if (!command) {
|
|
323
|
-
error('Usage: gsd-tools <command> [args] [--raw] [--pick <field>] [--cwd <path>] [--ws <name>]\nCommands: state, resolve-model, find-phase, commit, verify-summary, verify, frontmatter, template, generate-slug, current-timestamp, list-todos, verify-path-exists, config-ensure-section, config-new-project, init
|
|
306
|
+
error('Usage: gsd-tools <command> [args] [--raw] [--pick <field>] [--cwd <path>] [--ws <name>]\nCommands: state, resolve-model, find-phase, commit, verify-summary, verify, frontmatter, template, generate-slug, current-timestamp, list-todos, verify-path-exists, config-ensure-section, config-new-project, init');
|
|
324
307
|
}
|
|
325
308
|
|
|
326
309
|
// Reject flags that are never valid for any gsd-tools command. AI agents
|
|
@@ -887,17 +870,8 @@ async function runCommand(command, args, cwd, raw, defaultValue) {
|
|
|
887
870
|
case 'manager':
|
|
888
871
|
init.cmdInitManager(cwd, raw);
|
|
889
872
|
break;
|
|
890
|
-
case 'new-workspace':
|
|
891
|
-
init.cmdInitNewWorkspace(cwd, raw);
|
|
892
|
-
break;
|
|
893
|
-
case 'list-workspaces':
|
|
894
|
-
init.cmdInitListWorkspaces(cwd, raw);
|
|
895
|
-
break;
|
|
896
|
-
case 'remove-workspace':
|
|
897
|
-
init.cmdInitRemoveWorkspace(cwd, args[2], raw);
|
|
898
|
-
break;
|
|
899
873
|
default:
|
|
900
|
-
error(`Unknown init workflow: ${workflow}\nAvailable: execute-phase, plan-phase, new-project, new-milestone, quick, resume, verify-work, phase-op, todos, milestone-op, map-codebase, progress, manager
|
|
874
|
+
error(`Unknown init workflow: ${workflow}\nAvailable: execute-phase, plan-phase, new-project, new-milestone, quick, resume, verify-work, phase-op, todos, milestone-op, map-codebase, progress, manager`);
|
|
901
875
|
}
|
|
902
876
|
break;
|
|
903
877
|
}
|
|
@@ -931,199 +905,14 @@ async function runCommand(command, args, cwd, raw, defaultValue) {
|
|
|
931
905
|
break;
|
|
932
906
|
}
|
|
933
907
|
|
|
934
|
-
// ───
|
|
935
|
-
|
|
936
|
-
case 'scan-sessions': {
|
|
937
|
-
const pathIdx = args.indexOf('--path');
|
|
938
|
-
const sessionsPath = pathIdx !== -1 ? args[pathIdx + 1] : null;
|
|
939
|
-
const verboseFlag = args.includes('--verbose');
|
|
940
|
-
const jsonFlag = args.includes('--json');
|
|
941
|
-
await profilePipeline.cmdScanSessions(sessionsPath, { verbose: verboseFlag, json: jsonFlag }, raw);
|
|
942
|
-
break;
|
|
943
|
-
}
|
|
944
|
-
|
|
945
|
-
case 'extract-messages': {
|
|
946
|
-
const sessionIdx = args.indexOf('--session');
|
|
947
|
-
const sessionId = sessionIdx !== -1 ? args[sessionIdx + 1] : null;
|
|
948
|
-
const limitIdx = args.indexOf('--limit');
|
|
949
|
-
const limit = limitIdx !== -1 ? parseInt(args[limitIdx + 1], 10) : null;
|
|
950
|
-
const pathIdx = args.indexOf('--path');
|
|
951
|
-
const sessionsPath = pathIdx !== -1 ? args[pathIdx + 1] : null;
|
|
952
|
-
const projectArg = args[1];
|
|
953
|
-
if (!projectArg || projectArg.startsWith('--')) {
|
|
954
|
-
error('Usage: gsd-tools extract-messages <project> [--session <id>] [--limit N] [--path <dir>]\nRun scan-sessions first to see available projects.');
|
|
955
|
-
}
|
|
956
|
-
await profilePipeline.cmdExtractMessages(projectArg, { sessionId, limit }, raw, sessionsPath);
|
|
957
|
-
break;
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
case 'profile-sample': {
|
|
961
|
-
const pathIdx = args.indexOf('--path');
|
|
962
|
-
const sessionsPath = pathIdx !== -1 ? args[pathIdx + 1] : null;
|
|
963
|
-
const limitIdx = args.indexOf('--limit');
|
|
964
|
-
const limit = limitIdx !== -1 ? parseInt(args[limitIdx + 1], 10) : 150;
|
|
965
|
-
const maxPerIdx = args.indexOf('--max-per-project');
|
|
966
|
-
const maxPerProject = maxPerIdx !== -1 ? parseInt(args[maxPerIdx + 1], 10) : null;
|
|
967
|
-
const maxCharsIdx = args.indexOf('--max-chars');
|
|
968
|
-
const maxChars = maxCharsIdx !== -1 ? parseInt(args[maxCharsIdx + 1], 10) : 500;
|
|
969
|
-
await profilePipeline.cmdProfileSample(sessionsPath, { limit, maxPerProject, maxChars }, raw);
|
|
970
|
-
break;
|
|
971
|
-
}
|
|
972
|
-
|
|
973
|
-
// ─── Profile Output ──────────────────────────────────────────────────
|
|
974
|
-
|
|
975
|
-
case 'write-profile': {
|
|
976
|
-
const inputIdx = args.indexOf('--input');
|
|
977
|
-
const inputPath = inputIdx !== -1 ? args[inputIdx + 1] : null;
|
|
978
|
-
if (!inputPath) error('--input <analysis-json-path> is required');
|
|
979
|
-
const outputIdx = args.indexOf('--output');
|
|
980
|
-
const outputPath = outputIdx !== -1 ? args[outputIdx + 1] : null;
|
|
981
|
-
profileOutput.cmdWriteProfile(cwd, { input: inputPath, output: outputPath }, raw);
|
|
982
|
-
break;
|
|
983
|
-
}
|
|
984
|
-
|
|
985
|
-
case 'profile-questionnaire': {
|
|
986
|
-
const answersIdx = args.indexOf('--answers');
|
|
987
|
-
const answers = answersIdx !== -1 ? args[answersIdx + 1] : null;
|
|
988
|
-
profileOutput.cmdProfileQuestionnaire({ answers }, raw);
|
|
989
|
-
break;
|
|
990
|
-
}
|
|
991
|
-
|
|
992
|
-
case 'generate-dev-preferences': {
|
|
993
|
-
const analysisIdx = args.indexOf('--analysis');
|
|
994
|
-
const analysisPath = analysisIdx !== -1 ? args[analysisIdx + 1] : null;
|
|
995
|
-
const outputIdx = args.indexOf('--output');
|
|
996
|
-
const outputPath = outputIdx !== -1 ? args[outputIdx + 1] : null;
|
|
997
|
-
const stackIdx = args.indexOf('--stack');
|
|
998
|
-
const stack = stackIdx !== -1 ? args[stackIdx + 1] : null;
|
|
999
|
-
profileOutput.cmdGenerateDevPreferences(cwd, { analysis: analysisPath, output: outputPath, stack }, raw);
|
|
1000
|
-
break;
|
|
1001
|
-
}
|
|
1002
|
-
|
|
1003
|
-
case 'generate-claude-profile': {
|
|
1004
|
-
const analysisIdx = args.indexOf('--analysis');
|
|
1005
|
-
const analysisPath = analysisIdx !== -1 ? args[analysisIdx + 1] : null;
|
|
1006
|
-
const outputIdx = args.indexOf('--output');
|
|
1007
|
-
const outputPath = outputIdx !== -1 ? args[outputIdx + 1] : null;
|
|
1008
|
-
const globalFlag = args.includes('--global');
|
|
1009
|
-
profileOutput.cmdGenerateClaudeProfile(cwd, { analysis: analysisPath, output: outputPath, global: globalFlag }, raw);
|
|
1010
|
-
break;
|
|
1011
|
-
}
|
|
908
|
+
// ─── CLAUDE.md Generation ─────────────────────────────────────────────
|
|
1012
909
|
|
|
1013
910
|
case 'generate-claude-md': {
|
|
1014
911
|
const outputIdx = args.indexOf('--output');
|
|
1015
912
|
const outputPath = outputIdx !== -1 ? args[outputIdx + 1] : null;
|
|
1016
913
|
const autoFlag = args.includes('--auto');
|
|
1017
914
|
const forceFlag = args.includes('--force');
|
|
1018
|
-
|
|
1019
|
-
break;
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
|
-
case 'workstream': {
|
|
1023
|
-
const subcommand = args[1];
|
|
1024
|
-
if (subcommand === 'create') {
|
|
1025
|
-
const migrateNameIdx = args.indexOf('--migrate-name');
|
|
1026
|
-
const noMigrate = args.includes('--no-migrate');
|
|
1027
|
-
workstream.cmdWorkstreamCreate(cwd, args[2], {
|
|
1028
|
-
migrate: !noMigrate,
|
|
1029
|
-
migrateName: migrateNameIdx !== -1 ? args[migrateNameIdx + 1] : null,
|
|
1030
|
-
}, raw);
|
|
1031
|
-
} else if (subcommand === 'list') {
|
|
1032
|
-
workstream.cmdWorkstreamList(cwd, raw);
|
|
1033
|
-
} else if (subcommand === 'status') {
|
|
1034
|
-
workstream.cmdWorkstreamStatus(cwd, args[2], raw);
|
|
1035
|
-
} else if (subcommand === 'complete') {
|
|
1036
|
-
workstream.cmdWorkstreamComplete(cwd, args[2], {}, raw);
|
|
1037
|
-
} else if (subcommand === 'set') {
|
|
1038
|
-
workstream.cmdWorkstreamSet(cwd, args[2], raw);
|
|
1039
|
-
} else if (subcommand === 'get') {
|
|
1040
|
-
workstream.cmdWorkstreamGet(cwd, raw);
|
|
1041
|
-
} else if (subcommand === 'progress') {
|
|
1042
|
-
workstream.cmdWorkstreamProgress(cwd, raw);
|
|
1043
|
-
} else {
|
|
1044
|
-
error('Unknown workstream subcommand. Available: create, list, status, complete, set, get, progress');
|
|
1045
|
-
}
|
|
1046
|
-
break;
|
|
1047
|
-
}
|
|
1048
|
-
|
|
1049
|
-
// ─── Intel ────────────────────────────────────────────────────────────
|
|
1050
|
-
|
|
1051
|
-
case 'intel': {
|
|
1052
|
-
const intel = require('./lib/intel.cjs');
|
|
1053
|
-
const subcommand = args[1];
|
|
1054
|
-
if (subcommand === 'query') {
|
|
1055
|
-
const term = args[2];
|
|
1056
|
-
if (!term) error('Usage: gsd-tools intel query <term>');
|
|
1057
|
-
const planningDir = path.join(cwd, '.planning');
|
|
1058
|
-
core.output(intel.intelQuery(term, planningDir), raw);
|
|
1059
|
-
} else if (subcommand === 'status') {
|
|
1060
|
-
const planningDir = path.join(cwd, '.planning');
|
|
1061
|
-
const status = intel.intelStatus(planningDir);
|
|
1062
|
-
if (!raw && status.files) {
|
|
1063
|
-
for (const file of Object.values(status.files)) {
|
|
1064
|
-
if (file.updated_at) {
|
|
1065
|
-
file.updated_at = core.timeAgo(new Date(file.updated_at));
|
|
1066
|
-
}
|
|
1067
|
-
}
|
|
1068
|
-
}
|
|
1069
|
-
core.output(status, raw);
|
|
1070
|
-
} else if (subcommand === 'diff') {
|
|
1071
|
-
const planningDir = path.join(cwd, '.planning');
|
|
1072
|
-
core.output(intel.intelDiff(planningDir), raw);
|
|
1073
|
-
} else if (subcommand === 'snapshot') {
|
|
1074
|
-
const planningDir = path.join(cwd, '.planning');
|
|
1075
|
-
core.output(intel.intelSnapshot(planningDir), raw);
|
|
1076
|
-
} else if (subcommand === 'patch-meta') {
|
|
1077
|
-
const filePath = args[2];
|
|
1078
|
-
if (!filePath) error('Usage: gsd-tools intel patch-meta <file-path>');
|
|
1079
|
-
core.output(intel.intelPatchMeta(path.resolve(cwd, filePath)), raw);
|
|
1080
|
-
} else if (subcommand === 'validate') {
|
|
1081
|
-
const planningDir = path.join(cwd, '.planning');
|
|
1082
|
-
core.output(intel.intelValidate(planningDir), raw);
|
|
1083
|
-
} else if (subcommand === 'extract-exports') {
|
|
1084
|
-
const filePath = args[2];
|
|
1085
|
-
if (!filePath) error('Usage: gsd-tools intel extract-exports <file-path>');
|
|
1086
|
-
core.output(intel.intelExtractExports(path.resolve(cwd, filePath)), raw);
|
|
1087
|
-
} else if (subcommand === 'update') {
|
|
1088
|
-
const planningDir = path.join(cwd, '.planning');
|
|
1089
|
-
core.output(intel.intelUpdate(planningDir), raw);
|
|
1090
|
-
} else {
|
|
1091
|
-
error('Unknown intel subcommand. Available: query, status, update, diff, snapshot, patch-meta, validate, extract-exports');
|
|
1092
|
-
}
|
|
1093
|
-
break;
|
|
1094
|
-
}
|
|
1095
|
-
|
|
1096
|
-
// ─── Graphify ──────────────────────────────────────────────────────────
|
|
1097
|
-
|
|
1098
|
-
case 'graphify': {
|
|
1099
|
-
const graphify = require('./lib/graphify.cjs');
|
|
1100
|
-
const subcommand = args[1];
|
|
1101
|
-
if (subcommand === 'query') {
|
|
1102
|
-
const term = args[2];
|
|
1103
|
-
if (!term) error('Usage: gsd-tools graphify query <term>');
|
|
1104
|
-
const budgetIdx = args.indexOf('--budget');
|
|
1105
|
-
const budget = budgetIdx !== -1 ? parseInt(args[budgetIdx + 1], 10) : null;
|
|
1106
|
-
core.output(graphify.graphifyQuery(cwd, term, { budget }), raw);
|
|
1107
|
-
} else if (subcommand === 'status') {
|
|
1108
|
-
core.output(graphify.graphifyStatus(cwd), raw);
|
|
1109
|
-
} else if (subcommand === 'diff') {
|
|
1110
|
-
core.output(graphify.graphifyDiff(cwd), raw);
|
|
1111
|
-
} else if (subcommand === 'build') {
|
|
1112
|
-
if (args[2] === 'snapshot') {
|
|
1113
|
-
core.output(graphify.writeSnapshot(cwd), raw);
|
|
1114
|
-
} else {
|
|
1115
|
-
core.output(graphify.graphifyBuild(cwd), raw);
|
|
1116
|
-
}
|
|
1117
|
-
} else {
|
|
1118
|
-
error('Unknown graphify subcommand. Available: build, query, status, diff');
|
|
1119
|
-
}
|
|
1120
|
-
break;
|
|
1121
|
-
}
|
|
1122
|
-
|
|
1123
|
-
// ─── Documentation ────────────────────────────────────────────────────
|
|
1124
|
-
|
|
1125
|
-
case 'docs-init': {
|
|
1126
|
-
docs.cmdDocsInit(cwd, raw);
|
|
915
|
+
claudeMd.cmdGenerateClaudeMd(cwd, { output: outputPath, auto: autoFlag, force: forceFlag }, raw);
|
|
1127
916
|
break;
|
|
1128
917
|
}
|
|
1129
918
|
|
|
@@ -1247,14 +1036,6 @@ async function runCommand(command, args, cwd, raw, defaultValue) {
|
|
|
1247
1036
|
break;
|
|
1248
1037
|
}
|
|
1249
1038
|
|
|
1250
|
-
// ─── GSD-2 Reverse Migration ───────────────────────────────────────────
|
|
1251
|
-
|
|
1252
|
-
case 'from-gsd2': {
|
|
1253
|
-
const gsd2Import = require('./lib/gsd2-import.cjs');
|
|
1254
|
-
gsd2Import.cmdFromGsd2(args.slice(1), cwd, raw);
|
|
1255
|
-
break;
|
|
1256
|
-
}
|
|
1257
|
-
|
|
1258
1039
|
default:
|
|
1259
1040
|
error(`Unknown command: ${command}`);
|
|
1260
1041
|
}
|