@damper/cli 0.6.14 → 0.7.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/dist/commands/start.js +4 -1
- package/dist/services/claude.js +2 -1
- 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 +6 -1
- 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
|
@@ -121,7 +121,8 @@ export async function launchClaude(options) {
|
|
|
121
121
|
// Use spawn with stdio: 'inherit' for proper TTY passthrough
|
|
122
122
|
// Signals (Ctrl+C, Escape) are handled naturally since child inherits the terminal
|
|
123
123
|
await new Promise((resolve) => {
|
|
124
|
-
const
|
|
124
|
+
const args = yolo ? ['--dangerously-skip-permissions', initialPrompt] : [initialPrompt];
|
|
125
|
+
const child = spawn('claude', args, {
|
|
125
126
|
cwd,
|
|
126
127
|
stdio: 'inherit',
|
|
127
128
|
env: {
|
|
@@ -96,7 +96,7 @@ export class DamperApi {
|
|
|
96
96
|
// Agent Instructions
|
|
97
97
|
async getAgentInstructions(format = 'section') {
|
|
98
98
|
// The MCP server has this hardcoded, so we'll return the same content
|
|
99
|
-
const lastModified = '2025-02-
|
|
99
|
+
const lastModified = '2025-02-06';
|
|
100
100
|
const section = `## Task Management with Damper MCP
|
|
101
101
|
|
|
102
102
|
> Last updated: ${lastModified}
|
|
@@ -127,9 +127,14 @@ This project uses Damper MCP for task tracking. **You MUST follow this workflow.
|
|
|
127
127
|
- \`add_to_changelog\` - Manually add completed tasks to a changelog
|
|
128
128
|
- \`publish_changelog\` - Publish with optional email notifications and Twitter posting
|
|
129
129
|
|
|
130
|
+
### Project Settings
|
|
131
|
+
- \`get_project_settings\` - View current settings (completion checklist, etc.)
|
|
132
|
+
- \`update_project_settings\` - Configure completion checklist and other agent-relevant settings
|
|
133
|
+
|
|
130
134
|
### At Session End (MANDATORY)
|
|
131
135
|
- ALWAYS call \`complete_task\` (if done) or \`abandon_task\` (if stopping early)
|
|
132
136
|
- NEVER leave a started task without completing or abandoning it
|
|
137
|
+
- If the project has a **completion checklist** (shown in \`start_task\` response), you MUST pass all items as \`confirmations\` when calling \`complete_task\`
|
|
133
138
|
- If you learned something about the codebase, consider updating project context
|
|
134
139
|
|
|
135
140
|
### Why This Matters
|
|
@@ -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('');
|