@m3hti/commit-genie 3.3.0 → 3.3.1
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/.claude/agents/gsd-codebase-mapper.md +764 -0
- package/.claude/agents/gsd-debugger.md +1246 -0
- package/.claude/agents/gsd-executor.md +469 -0
- package/.claude/agents/gsd-integration-checker.md +443 -0
- package/.claude/agents/gsd-phase-researcher.md +546 -0
- package/.claude/agents/gsd-plan-checker.md +690 -0
- package/.claude/agents/gsd-planner.md +1275 -0
- package/.claude/agents/gsd-project-researcher.md +621 -0
- package/.claude/agents/gsd-research-synthesizer.md +239 -0
- package/.claude/agents/gsd-roadmapper.md +642 -0
- package/.claude/agents/gsd-verifier.md +573 -0
- package/.claude/commands/gsd/add-phase.md +43 -0
- package/.claude/commands/gsd/add-tests.md +41 -0
- package/.claude/commands/gsd/add-todo.md +47 -0
- package/.claude/commands/gsd/audit-milestone.md +36 -0
- package/.claude/commands/gsd/check-todos.md +45 -0
- package/.claude/commands/gsd/cleanup.md +18 -0
- package/.claude/commands/gsd/complete-milestone.md +136 -0
- package/.claude/commands/gsd/debug.md +167 -0
- package/.claude/commands/gsd/discuss-phase.md +83 -0
- package/.claude/commands/gsd/execute-phase.md +41 -0
- package/.claude/commands/gsd/health.md +22 -0
- package/.claude/commands/gsd/help.md +22 -0
- package/.claude/commands/gsd/insert-phase.md +32 -0
- package/.claude/commands/gsd/join-discord.md +18 -0
- package/.claude/commands/gsd/list-phase-assumptions.md +46 -0
- package/.claude/commands/gsd/map-codebase.md +71 -0
- package/.claude/commands/gsd/new-milestone.md +44 -0
- package/.claude/commands/gsd/new-project.md +42 -0
- package/.claude/commands/gsd/new-project.md.bak +1041 -0
- package/.claude/commands/gsd/pause-work.md +38 -0
- package/.claude/commands/gsd/plan-milestone-gaps.md +34 -0
- package/.claude/commands/gsd/plan-phase.md +45 -0
- package/.claude/commands/gsd/progress.md +24 -0
- package/.claude/commands/gsd/quick.md +41 -0
- package/.claude/commands/gsd/reapply-patches.md +110 -0
- package/.claude/commands/gsd/remove-phase.md +31 -0
- package/.claude/commands/gsd/research-phase.md +189 -0
- package/.claude/commands/gsd/resume-work.md +40 -0
- package/.claude/commands/gsd/set-profile.md +34 -0
- package/.claude/commands/gsd/settings.md +36 -0
- package/.claude/commands/gsd/update.md +37 -0
- package/.claude/commands/gsd/verify-work.md +38 -0
- package/.claude/get-shit-done/VERSION +1 -0
- package/.claude/get-shit-done/bin/gsd-tools.cjs +588 -0
- package/.claude/get-shit-done/bin/lib/commands.cjs +553 -0
- package/.claude/get-shit-done/bin/lib/config.cjs +162 -0
- package/.claude/get-shit-done/bin/lib/core.cjs +411 -0
- package/.claude/get-shit-done/bin/lib/frontmatter.cjs +299 -0
- package/.claude/get-shit-done/bin/lib/init.cjs +710 -0
- package/.claude/get-shit-done/bin/lib/milestone.cjs +216 -0
- package/.claude/get-shit-done/bin/lib/phase.cjs +871 -0
- package/.claude/get-shit-done/bin/lib/roadmap.cjs +298 -0
- package/.claude/get-shit-done/bin/lib/state.cjs +679 -0
- package/.claude/get-shit-done/bin/lib/template.cjs +222 -0
- package/.claude/get-shit-done/bin/lib/verify.cjs +773 -0
- package/.claude/get-shit-done/references/checkpoints.md +776 -0
- package/.claude/get-shit-done/references/continuation-format.md +249 -0
- package/.claude/get-shit-done/references/decimal-phase-calculation.md +65 -0
- package/.claude/get-shit-done/references/git-integration.md +248 -0
- package/.claude/get-shit-done/references/git-planning-commit.md +38 -0
- package/.claude/get-shit-done/references/model-profile-resolution.md +34 -0
- package/.claude/get-shit-done/references/model-profiles.md +92 -0
- package/.claude/get-shit-done/references/phase-argument-parsing.md +61 -0
- package/.claude/get-shit-done/references/planning-config.md +196 -0
- package/.claude/get-shit-done/references/questioning.md +145 -0
- package/.claude/get-shit-done/references/tdd.md +263 -0
- package/.claude/get-shit-done/references/ui-brand.md +160 -0
- package/.claude/get-shit-done/references/verification-patterns.md +612 -0
- package/.claude/get-shit-done/templates/DEBUG.md +164 -0
- package/.claude/get-shit-done/templates/UAT.md +247 -0
- package/.claude/get-shit-done/templates/VALIDATION.md +76 -0
- package/.claude/get-shit-done/templates/codebase/architecture.md +255 -0
- package/.claude/get-shit-done/templates/codebase/concerns.md +310 -0
- package/.claude/get-shit-done/templates/codebase/conventions.md +307 -0
- package/.claude/get-shit-done/templates/codebase/integrations.md +280 -0
- package/.claude/get-shit-done/templates/codebase/stack.md +186 -0
- package/.claude/get-shit-done/templates/codebase/structure.md +285 -0
- package/.claude/get-shit-done/templates/codebase/testing.md +480 -0
- package/.claude/get-shit-done/templates/config.json +37 -0
- package/.claude/get-shit-done/templates/context.md +283 -0
- package/.claude/get-shit-done/templates/continue-here.md +78 -0
- package/.claude/get-shit-done/templates/debug-subagent-prompt.md +91 -0
- package/.claude/get-shit-done/templates/discovery.md +146 -0
- package/.claude/get-shit-done/templates/milestone-archive.md +123 -0
- package/.claude/get-shit-done/templates/milestone.md +115 -0
- package/.claude/get-shit-done/templates/phase-prompt.md +569 -0
- package/.claude/get-shit-done/templates/planner-subagent-prompt.md +117 -0
- package/.claude/get-shit-done/templates/project.md +184 -0
- package/.claude/get-shit-done/templates/requirements.md +231 -0
- package/.claude/get-shit-done/templates/research-project/ARCHITECTURE.md +204 -0
- package/.claude/get-shit-done/templates/research-project/FEATURES.md +147 -0
- package/.claude/get-shit-done/templates/research-project/PITFALLS.md +200 -0
- package/.claude/get-shit-done/templates/research-project/STACK.md +120 -0
- package/.claude/get-shit-done/templates/research-project/SUMMARY.md +170 -0
- package/.claude/get-shit-done/templates/research.md +552 -0
- package/.claude/get-shit-done/templates/retrospective.md +54 -0
- package/.claude/get-shit-done/templates/roadmap.md +202 -0
- package/.claude/get-shit-done/templates/state.md +176 -0
- package/.claude/get-shit-done/templates/summary-complex.md +59 -0
- package/.claude/get-shit-done/templates/summary-minimal.md +41 -0
- package/.claude/get-shit-done/templates/summary-standard.md +48 -0
- package/.claude/get-shit-done/templates/summary.md +248 -0
- package/.claude/get-shit-done/templates/user-setup.md +311 -0
- package/.claude/get-shit-done/templates/verification-report.md +322 -0
- package/.claude/get-shit-done/workflows/add-phase.md +111 -0
- package/.claude/get-shit-done/workflows/add-tests.md +350 -0
- package/.claude/get-shit-done/workflows/add-todo.md +157 -0
- package/.claude/get-shit-done/workflows/audit-milestone.md +297 -0
- package/.claude/get-shit-done/workflows/check-todos.md +176 -0
- package/.claude/get-shit-done/workflows/cleanup.md +152 -0
- package/.claude/get-shit-done/workflows/complete-milestone.md +763 -0
- package/.claude/get-shit-done/workflows/diagnose-issues.md +219 -0
- package/.claude/get-shit-done/workflows/discovery-phase.md +289 -0
- package/.claude/get-shit-done/workflows/discuss-phase.md +542 -0
- package/.claude/get-shit-done/workflows/execute-phase.md +449 -0
- package/.claude/get-shit-done/workflows/execute-plan.md +448 -0
- package/.claude/get-shit-done/workflows/health.md +156 -0
- package/.claude/get-shit-done/workflows/help.md +489 -0
- package/.claude/get-shit-done/workflows/insert-phase.md +129 -0
- package/.claude/get-shit-done/workflows/list-phase-assumptions.md +178 -0
- package/.claude/get-shit-done/workflows/map-codebase.md +315 -0
- package/.claude/get-shit-done/workflows/new-milestone.md +382 -0
- package/.claude/get-shit-done/workflows/new-project.md +1116 -0
- package/.claude/get-shit-done/workflows/pause-work.md +122 -0
- package/.claude/get-shit-done/workflows/plan-milestone-gaps.md +274 -0
- package/.claude/get-shit-done/workflows/plan-phase.md +569 -0
- package/.claude/get-shit-done/workflows/progress.md +381 -0
- package/.claude/get-shit-done/workflows/quick.md +453 -0
- package/.claude/get-shit-done/workflows/remove-phase.md +154 -0
- package/.claude/get-shit-done/workflows/research-phase.md +73 -0
- package/.claude/get-shit-done/workflows/resume-project.md +306 -0
- package/.claude/get-shit-done/workflows/set-profile.md +80 -0
- package/.claude/get-shit-done/workflows/settings.md +213 -0
- package/.claude/get-shit-done/workflows/transition.md +544 -0
- package/.claude/get-shit-done/workflows/update.md +219 -0
- package/.claude/get-shit-done/workflows/verify-phase.md +242 -0
- package/.claude/get-shit-done/workflows/verify-work.md +569 -0
- package/.claude/gsd-file-manifest.json +144 -0
- package/.claude/hooks/gsd-check-update.js +62 -0
- package/.claude/hooks/gsd-context-monitor.js +122 -0
- package/.claude/hooks/gsd-statusline.js +108 -0
- package/.claude/package.json +1 -0
- package/.claude/settings.json +49 -0
- package/dist/commands/generate.d.ts.map +1 -1
- package/dist/commands/generate.js +18 -8
- package/dist/commands/generate.js.map +1 -1
- package/dist/services/analyzerService.d.ts.map +1 -1
- package/dist/services/analyzerService.js +10 -0
- package/dist/services/analyzerService.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Template — Template selection and fill operations
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
const path = require('path');
|
|
7
|
+
const { normalizePhaseName, findPhaseInternal, generateSlugInternal, output, error } = require('./core.cjs');
|
|
8
|
+
const { reconstructFrontmatter } = require('./frontmatter.cjs');
|
|
9
|
+
|
|
10
|
+
function cmdTemplateSelect(cwd, planPath, raw) {
|
|
11
|
+
if (!planPath) {
|
|
12
|
+
error('plan-path required');
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
try {
|
|
16
|
+
const fullPath = path.join(cwd, planPath);
|
|
17
|
+
const content = fs.readFileSync(fullPath, 'utf-8');
|
|
18
|
+
|
|
19
|
+
// Simple heuristics
|
|
20
|
+
const taskMatch = content.match(/###\s*Task\s*\d+/g) || [];
|
|
21
|
+
const taskCount = taskMatch.length;
|
|
22
|
+
|
|
23
|
+
const decisionMatch = content.match(/decision/gi) || [];
|
|
24
|
+
const hasDecisions = decisionMatch.length > 0;
|
|
25
|
+
|
|
26
|
+
// Count file mentions
|
|
27
|
+
const fileMentions = new Set();
|
|
28
|
+
const filePattern = /`([^`]+\.[a-zA-Z]+)`/g;
|
|
29
|
+
let m;
|
|
30
|
+
while ((m = filePattern.exec(content)) !== null) {
|
|
31
|
+
if (m[1].includes('/') && !m[1].startsWith('http')) {
|
|
32
|
+
fileMentions.add(m[1]);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
const fileCount = fileMentions.size;
|
|
36
|
+
|
|
37
|
+
let template = 'templates/summary-standard.md';
|
|
38
|
+
let type = 'standard';
|
|
39
|
+
|
|
40
|
+
if (taskCount <= 2 && fileCount <= 3 && !hasDecisions) {
|
|
41
|
+
template = 'templates/summary-minimal.md';
|
|
42
|
+
type = 'minimal';
|
|
43
|
+
} else if (hasDecisions || fileCount > 6 || taskCount > 5) {
|
|
44
|
+
template = 'templates/summary-complex.md';
|
|
45
|
+
type = 'complex';
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const result = { template, type, taskCount, fileCount, hasDecisions };
|
|
49
|
+
output(result, raw, template);
|
|
50
|
+
} catch (e) {
|
|
51
|
+
// Fallback to standard
|
|
52
|
+
output({ template: 'templates/summary-standard.md', type: 'standard', error: e.message }, raw, 'templates/summary-standard.md');
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function cmdTemplateFill(cwd, templateType, options, raw) {
|
|
57
|
+
if (!templateType) { error('template type required: summary, plan, or verification'); }
|
|
58
|
+
if (!options.phase) { error('--phase required'); }
|
|
59
|
+
|
|
60
|
+
const phaseInfo = findPhaseInternal(cwd, options.phase);
|
|
61
|
+
if (!phaseInfo || !phaseInfo.found) { output({ error: 'Phase not found', phase: options.phase }, raw); return; }
|
|
62
|
+
|
|
63
|
+
const padded = normalizePhaseName(options.phase);
|
|
64
|
+
const today = new Date().toISOString().split('T')[0];
|
|
65
|
+
const phaseName = options.name || phaseInfo.phase_name || 'Unnamed';
|
|
66
|
+
const phaseSlug = phaseInfo.phase_slug || generateSlugInternal(phaseName);
|
|
67
|
+
const phaseId = `${padded}-${phaseSlug}`;
|
|
68
|
+
const planNum = (options.plan || '01').padStart(2, '0');
|
|
69
|
+
const fields = options.fields || {};
|
|
70
|
+
|
|
71
|
+
let frontmatter, body, fileName;
|
|
72
|
+
|
|
73
|
+
switch (templateType) {
|
|
74
|
+
case 'summary': {
|
|
75
|
+
frontmatter = {
|
|
76
|
+
phase: phaseId,
|
|
77
|
+
plan: planNum,
|
|
78
|
+
subsystem: '[primary category]',
|
|
79
|
+
tags: [],
|
|
80
|
+
provides: [],
|
|
81
|
+
affects: [],
|
|
82
|
+
'tech-stack': { added: [], patterns: [] },
|
|
83
|
+
'key-files': { created: [], modified: [] },
|
|
84
|
+
'key-decisions': [],
|
|
85
|
+
'patterns-established': [],
|
|
86
|
+
duration: '[X]min',
|
|
87
|
+
completed: today,
|
|
88
|
+
...fields,
|
|
89
|
+
};
|
|
90
|
+
body = [
|
|
91
|
+
`# Phase ${options.phase}: ${phaseName} Summary`,
|
|
92
|
+
'',
|
|
93
|
+
'**[Substantive one-liner describing outcome]**',
|
|
94
|
+
'',
|
|
95
|
+
'## Performance',
|
|
96
|
+
'- **Duration:** [time]',
|
|
97
|
+
'- **Tasks:** [count completed]',
|
|
98
|
+
'- **Files modified:** [count]',
|
|
99
|
+
'',
|
|
100
|
+
'## Accomplishments',
|
|
101
|
+
'- [Key outcome 1]',
|
|
102
|
+
'- [Key outcome 2]',
|
|
103
|
+
'',
|
|
104
|
+
'## Task Commits',
|
|
105
|
+
'1. **Task 1: [task name]** - `hash`',
|
|
106
|
+
'',
|
|
107
|
+
'## Files Created/Modified',
|
|
108
|
+
'- `path/to/file.ts` - What it does',
|
|
109
|
+
'',
|
|
110
|
+
'## Decisions & Deviations',
|
|
111
|
+
'[Key decisions or "None - followed plan as specified"]',
|
|
112
|
+
'',
|
|
113
|
+
'## Next Phase Readiness',
|
|
114
|
+
'[What\'s ready for next phase]',
|
|
115
|
+
].join('\n');
|
|
116
|
+
fileName = `${padded}-${planNum}-SUMMARY.md`;
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
case 'plan': {
|
|
120
|
+
const planType = options.type || 'execute';
|
|
121
|
+
const wave = parseInt(options.wave) || 1;
|
|
122
|
+
frontmatter = {
|
|
123
|
+
phase: phaseId,
|
|
124
|
+
plan: planNum,
|
|
125
|
+
type: planType,
|
|
126
|
+
wave,
|
|
127
|
+
depends_on: [],
|
|
128
|
+
files_modified: [],
|
|
129
|
+
autonomous: true,
|
|
130
|
+
user_setup: [],
|
|
131
|
+
must_haves: { truths: [], artifacts: [], key_links: [] },
|
|
132
|
+
...fields,
|
|
133
|
+
};
|
|
134
|
+
body = [
|
|
135
|
+
`# Phase ${options.phase} Plan ${planNum}: [Title]`,
|
|
136
|
+
'',
|
|
137
|
+
'## Objective',
|
|
138
|
+
'- **What:** [What this plan builds]',
|
|
139
|
+
'- **Why:** [Why it matters for the phase goal]',
|
|
140
|
+
'- **Output:** [Concrete deliverable]',
|
|
141
|
+
'',
|
|
142
|
+
'## Context',
|
|
143
|
+
'@.planning/PROJECT.md',
|
|
144
|
+
'@.planning/ROADMAP.md',
|
|
145
|
+
'@.planning/STATE.md',
|
|
146
|
+
'',
|
|
147
|
+
'## Tasks',
|
|
148
|
+
'',
|
|
149
|
+
'<task type="code">',
|
|
150
|
+
' <name>[Task name]</name>',
|
|
151
|
+
' <files>[file paths]</files>',
|
|
152
|
+
' <action>[What to do]</action>',
|
|
153
|
+
' <verify>[How to verify]</verify>',
|
|
154
|
+
' <done>[Definition of done]</done>',
|
|
155
|
+
'</task>',
|
|
156
|
+
'',
|
|
157
|
+
'## Verification',
|
|
158
|
+
'[How to verify this plan achieved its objective]',
|
|
159
|
+
'',
|
|
160
|
+
'## Success Criteria',
|
|
161
|
+
'- [ ] [Criterion 1]',
|
|
162
|
+
'- [ ] [Criterion 2]',
|
|
163
|
+
].join('\n');
|
|
164
|
+
fileName = `${padded}-${planNum}-PLAN.md`;
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
167
|
+
case 'verification': {
|
|
168
|
+
frontmatter = {
|
|
169
|
+
phase: phaseId,
|
|
170
|
+
verified: new Date().toISOString(),
|
|
171
|
+
status: 'pending',
|
|
172
|
+
score: '0/0 must-haves verified',
|
|
173
|
+
...fields,
|
|
174
|
+
};
|
|
175
|
+
body = [
|
|
176
|
+
`# Phase ${options.phase}: ${phaseName} — Verification`,
|
|
177
|
+
'',
|
|
178
|
+
'## Observable Truths',
|
|
179
|
+
'| # | Truth | Status | Evidence |',
|
|
180
|
+
'|---|-------|--------|----------|',
|
|
181
|
+
'| 1 | [Truth] | pending | |',
|
|
182
|
+
'',
|
|
183
|
+
'## Required Artifacts',
|
|
184
|
+
'| Artifact | Expected | Status | Details |',
|
|
185
|
+
'|----------|----------|--------|---------|',
|
|
186
|
+
'| [path] | [what] | pending | |',
|
|
187
|
+
'',
|
|
188
|
+
'## Key Link Verification',
|
|
189
|
+
'| From | To | Via | Status | Details |',
|
|
190
|
+
'|------|----|----|--------|---------|',
|
|
191
|
+
'| [source] | [target] | [connection] | pending | |',
|
|
192
|
+
'',
|
|
193
|
+
'## Requirements Coverage',
|
|
194
|
+
'| Requirement | Status | Blocking Issue |',
|
|
195
|
+
'|-------------|--------|----------------|',
|
|
196
|
+
'| [req] | pending | |',
|
|
197
|
+
'',
|
|
198
|
+
'## Result',
|
|
199
|
+
'[Pending verification]',
|
|
200
|
+
].join('\n');
|
|
201
|
+
fileName = `${padded}-VERIFICATION.md`;
|
|
202
|
+
break;
|
|
203
|
+
}
|
|
204
|
+
default:
|
|
205
|
+
error(`Unknown template type: ${templateType}. Available: summary, plan, verification`);
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
const fullContent = `---\n${reconstructFrontmatter(frontmatter)}\n---\n\n${body}\n`;
|
|
210
|
+
const outPath = path.join(cwd, phaseInfo.directory, fileName);
|
|
211
|
+
|
|
212
|
+
if (fs.existsSync(outPath)) {
|
|
213
|
+
output({ error: 'File already exists', path: path.relative(cwd, outPath) }, raw);
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
fs.writeFileSync(outPath, fullContent, 'utf-8');
|
|
218
|
+
const relPath = path.relative(cwd, outPath);
|
|
219
|
+
output({ created: true, path: relPath, template: templateType }, raw, relPath);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
module.exports = { cmdTemplateSelect, cmdTemplateFill };
|