@damper/cli 0.6.13 → 0.7.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/dist/commands/start.js +4 -1
- package/dist/services/claude.js +1 -3
- package/dist/services/context-bootstrap.d.ts +1 -0
- package/dist/services/context-bootstrap.js +1 -0
- package/dist/services/damper-api.d.ts +1 -0
- package/dist/services/damper-api.js +1 -0
- package/dist/templates/CLAUDE_APPEND.md.js +4 -5
- package/dist/templates/TASK_CONTEXT.md.d.ts +1 -0
- package/dist/templates/TASK_CONTEXT.md.js +12 -1
- package/package.json +1 -1
package/dist/commands/start.js
CHANGED
|
@@ -113,8 +113,10 @@ export async function startCommand(options) {
|
|
|
113
113
|
else {
|
|
114
114
|
// New task - lock it first
|
|
115
115
|
console.log(pc.dim('\nLocking task in Damper...'));
|
|
116
|
+
let completionChecklist;
|
|
116
117
|
try {
|
|
117
|
-
await api.startTask(taskId, forceTakeover);
|
|
118
|
+
const startResult = await api.startTask(taskId, forceTakeover);
|
|
119
|
+
completionChecklist = startResult.completionChecklist;
|
|
118
120
|
console.log(pc.green(forceTakeover ? '✓ Task lock taken over' : '✓ Task locked'));
|
|
119
121
|
}
|
|
120
122
|
catch (err) {
|
|
@@ -149,6 +151,7 @@ export async function startCommand(options) {
|
|
|
149
151
|
taskId,
|
|
150
152
|
worktreePath,
|
|
151
153
|
yolo: options.yolo,
|
|
154
|
+
completionChecklist,
|
|
152
155
|
});
|
|
153
156
|
console.log(pc.green(`✓ Created ${bootstrapResult.taskContextPath}`));
|
|
154
157
|
if (bootstrapResult.claudeMdUpdated) {
|
package/dist/services/claude.js
CHANGED
|
@@ -265,9 +265,7 @@ export async function postTaskFlow(options) {
|
|
|
265
265
|
await execa('git', ['checkout', 'main'], { cwd: projectRoot, stdio: 'pipe' });
|
|
266
266
|
// Merge the feature branch
|
|
267
267
|
await execa('git', ['merge', currentBranch, '--no-edit'], { cwd: projectRoot, stdio: 'inherit' });
|
|
268
|
-
|
|
269
|
-
await execa('git', ['push', 'origin', 'main'], { cwd: projectRoot, stdio: 'inherit' });
|
|
270
|
-
console.log(pc.green('✓ Merged to main and pushed\n'));
|
|
268
|
+
console.log(pc.green('✓ Merged to main locally\n'));
|
|
271
269
|
}
|
|
272
270
|
catch (err) {
|
|
273
271
|
console.log(pc.red('Failed to merge. You may need to resolve conflicts manually.\n'));
|
|
@@ -130,6 +130,7 @@ This project uses Damper MCP for task tracking. **You MUST follow this workflow.
|
|
|
130
130
|
### At Session End (MANDATORY)
|
|
131
131
|
- ALWAYS call \`complete_task\` (if done) or \`abandon_task\` (if stopping early)
|
|
132
132
|
- NEVER leave a started task without completing or abandoning it
|
|
133
|
+
- If the project has a **completion checklist** (shown in \`start_task\` response), you MUST pass all items as \`confirmations\` when calling \`complete_task\`
|
|
133
134
|
- If you learned something about the codebase, consider updating project context
|
|
134
135
|
|
|
135
136
|
### Why This Matters
|
|
@@ -24,11 +24,10 @@ ${planSection}
|
|
|
24
24
|
- \`.claude/settings.local.json\`
|
|
25
25
|
|
|
26
26
|
**Your responsibilities (via Damper MCP):**
|
|
27
|
-
1.
|
|
28
|
-
2. Use \`
|
|
29
|
-
3.
|
|
30
|
-
4.
|
|
31
|
-
5. If stopping early: call \`abandon_task\` with what remains and blockers
|
|
27
|
+
1. Use \`add_commit\` after each git commit
|
|
28
|
+
2. Use \`add_note\` ONLY for non-obvious approach decisions (e.g. "Decision: chose X because Y")
|
|
29
|
+
3. When done: call \`complete_task\` with a one-line summary
|
|
30
|
+
4. If stopping early: call \`abandon_task\` with what remains and blockers
|
|
32
31
|
|
|
33
32
|
The CLI just bootstrapped this environment - YOU handle the task lifecycle.
|
|
34
33
|
`.trim();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export function generateTaskContext(options) {
|
|
2
|
-
const { task, criticalRules, blockIndices, templates, modules, damperInstructions } = options;
|
|
2
|
+
const { task, criticalRules, completionChecklist, blockIndices, templates, modules, damperInstructions } = options;
|
|
3
3
|
const typeIcon = task.type === 'bug' ? 'Bug' : task.type === 'feature' ? 'Feature' : task.type === 'improvement' ? 'Improvement' : 'Task';
|
|
4
4
|
const lines = [];
|
|
5
5
|
// Header
|
|
@@ -20,6 +20,17 @@ export function generateTaskContext(options) {
|
|
|
20
20
|
}
|
|
21
21
|
lines.push('');
|
|
22
22
|
}
|
|
23
|
+
// Completion Checklist
|
|
24
|
+
if (completionChecklist && completionChecklist.length > 0) {
|
|
25
|
+
lines.push('## Completion Checklist (required for complete_task)');
|
|
26
|
+
lines.push('');
|
|
27
|
+
lines.push('You MUST verify each item and pass them as `confirmations` when calling `complete_task`:');
|
|
28
|
+
lines.push('');
|
|
29
|
+
for (const item of completionChecklist) {
|
|
30
|
+
lines.push(`- [ ] ${item}`);
|
|
31
|
+
}
|
|
32
|
+
lines.push('');
|
|
33
|
+
}
|
|
23
34
|
// Damper Workflow
|
|
24
35
|
lines.push('## Damper Workflow');
|
|
25
36
|
lines.push('');
|