@damper/cli 0.6.3 → 0.6.5

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.
@@ -103,6 +103,7 @@ export async function startCommand(options) {
103
103
  api,
104
104
  taskId,
105
105
  worktreePath,
106
+ yolo: options.yolo,
106
107
  });
107
108
  console.log(pc.green('✓ Updated TASK_CONTEXT.md with latest notes'));
108
109
  }
@@ -144,6 +145,7 @@ export async function startCommand(options) {
144
145
  api,
145
146
  taskId,
146
147
  worktreePath,
148
+ yolo: options.yolo,
147
149
  });
148
150
  console.log(pc.green(`✓ Created ${bootstrapResult.taskContextPath}`));
149
151
  if (bootstrapResult.claudeMdUpdated) {
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import { statusCommand } from './commands/status.js';
5
5
  import { cleanupCommand } from './commands/cleanup.js';
6
6
  import { setupCommand } from './commands/setup.js';
7
7
  import { releaseCommand } from './commands/release.js';
8
- const VERSION = '0.6.3';
8
+ const VERSION = '0.6.5';
9
9
  function showHelp() {
10
10
  console.log(`
11
11
  ${pc.bold('@damper/cli')} - Agent orchestration for Damper tasks
@@ -110,7 +110,10 @@ export async function launchClaude(options) {
110
110
  }
111
111
  console.log();
112
112
  // Build prompt - context is in TASK_CONTEXT.md, MCP is in .claude/settings.json
113
- const initialPrompt = `IMPORTANT: Start by reading TASK_CONTEXT.md completely. It contains the task description, implementation plan, critical rules, and architecture context. Follow the implementation plan if one exists - do NOT start exploring the codebase until you've read it. Task #${taskId}: ${taskTitle}`;
113
+ const planInstruction = yolo
114
+ ? ''
115
+ : ' After reading TASK_CONTEXT.md, use the EnterPlanMode tool to create an implementation plan for user approval before making any code changes.';
116
+ const initialPrompt = `IMPORTANT: Start by reading TASK_CONTEXT.md completely. It contains the task description, implementation plan, critical rules, and architecture context.${planInstruction} Task #${taskId}: ${taskTitle}`;
114
117
  console.log(pc.dim(`Launching Claude in ${cwd}...`));
115
118
  // Launch Claude Code
116
119
  // Use spawn with stdio: 'inherit' for proper TTY passthrough
@@ -3,6 +3,7 @@ export interface BootstrapOptions {
3
3
  api: DamperApi;
4
4
  taskId: string;
5
5
  worktreePath: string;
6
+ yolo?: boolean;
6
7
  }
7
8
  export interface BootstrapResult {
8
9
  taskContextPath: string;
@@ -75,6 +75,7 @@ export async function bootstrapContext(options) {
75
75
  const taskSection = generateClaudeAppend({
76
76
  taskId,
77
77
  taskTitle: task.title,
78
+ yolo: options.yolo,
78
79
  });
79
80
  claudeMd = `${claudeMd}\n\n${taskSection}\n`;
80
81
  await fs.promises.writeFile(claudeMdPath, claudeMd, 'utf-8');
@@ -149,6 +149,7 @@ export declare class DamperApi {
149
149
  }>;
150
150
  getModule(name: string): Promise<Module>;
151
151
  getAgentInstructions(format?: 'markdown' | 'section'): Promise<AgentInstructions>;
152
+ createTask(title: string, type?: 'bug' | 'feature' | 'improvement' | 'task'): Promise<Task>;
152
153
  getLinkedFeedback(taskId: string): Promise<Array<{
153
154
  id: string;
154
155
  title: string;
@@ -138,6 +138,10 @@ This project uses Damper MCP for task tracking. **You MUST follow this workflow.
138
138
  lastModified,
139
139
  };
140
140
  }
141
+ // Create task
142
+ async createTask(title, type = 'task') {
143
+ return this.request('POST', '/api/agent/tasks', { title, type, status: 'planned' });
144
+ }
141
145
  // Feedback
142
146
  async getLinkedFeedback(taskId) {
143
147
  const task = await this.getTask(taskId);
@@ -1,6 +1,7 @@
1
1
  interface ClaudeAppendOptions {
2
2
  taskId: string;
3
3
  taskTitle: string;
4
+ yolo?: boolean;
4
5
  }
5
6
  export declare function generateClaudeAppend(options: ClaudeAppendOptions): string;
6
7
  export {};
@@ -1,11 +1,18 @@
1
1
  export function generateClaudeAppend(options) {
2
- const { taskId, taskTitle } = options;
2
+ const { taskId, taskTitle, yolo } = options;
3
+ const planSection = yolo
4
+ ? ''
5
+ : `
6
+ **MANDATORY: Plan Mode**
7
+ Before making ANY code changes, you MUST enter plan mode using the EnterPlanMode tool.
8
+ Read TASK_CONTEXT.md first, then create a plan for user approval. Do NOT write code until the plan is approved.
9
+ `;
3
10
  return `
4
11
  ## Current Task: #${taskId} ${taskTitle}
5
12
 
6
13
  **IMPORTANT**: Read TASK_CONTEXT.md for full task details and architecture context.
7
14
  If you feel you've lost context, re-read that file.
8
-
15
+ ${planSection}
9
16
  **Your responsibilities (via Damper MCP):**
10
17
  1. Use \`add_commit\` after each git commit
11
18
  2. Use \`add_note\` for important decisions
@@ -1,4 +1,4 @@
1
- import { select, confirm, Separator } from '@inquirer/prompts';
1
+ import { select, confirm, input, Separator } from '@inquirer/prompts';
2
2
  import pc from 'picocolors';
3
3
  function getTypeIcon(type) {
4
4
  switch (type) {
@@ -94,14 +94,6 @@ export async function pickTask(options) {
94
94
  availableChoices.push({ type: 'available', task });
95
95
  }
96
96
  }
97
- if (inProgressChoices.length === 0 && availableChoices.length === 0 && lockedChoices.length === 0) {
98
- console.log(pc.yellow('\nNo tasks available.'));
99
- if (typeFilter) {
100
- console.log(pc.dim(`(filtered by type: ${typeFilter})`));
101
- }
102
- console.log(pc.dim('Create new tasks in Damper or check your filters.\n'));
103
- return null;
104
- }
105
97
  const choices = [];
106
98
  if (inProgressChoices.length > 0) {
107
99
  choices.push(new Separator(pc.bold('\n--- In Progress (your worktrees) ---')));
@@ -130,12 +122,27 @@ export async function pickTask(options) {
130
122
  });
131
123
  }
132
124
  }
125
+ // Always show "Create new task" option
126
+ choices.push(new Separator(''));
127
+ choices.push({
128
+ name: pc.green('+ Create new task'),
129
+ value: { type: 'create_new' },
130
+ });
131
+ if (inProgressChoices.length === 0 && availableChoices.length === 0 && lockedChoices.length === 0) {
132
+ console.log(pc.yellow('\nNo existing tasks found.'));
133
+ if (typeFilter) {
134
+ console.log(pc.dim(`(filtered by type: ${typeFilter})`));
135
+ }
136
+ }
133
137
  console.log(pc.bold(`\nProject: ${project}`));
134
138
  const selected = await select({
135
139
  message: 'Select a task to work on:',
136
140
  choices: choices,
137
141
  pageSize: 15,
138
142
  });
143
+ if (selected.type === 'create_new') {
144
+ return handleCreateNewTask(api);
145
+ }
139
146
  if (selected.type === 'in_progress') {
140
147
  return {
141
148
  task: selected.task,
@@ -166,3 +173,25 @@ export async function pickTask(options) {
166
173
  isResume: false,
167
174
  };
168
175
  }
176
+ async function handleCreateNewTask(api) {
177
+ const title = await input({
178
+ message: 'Task title:',
179
+ validate: (value) => value.trim().length > 0 || 'Title is required',
180
+ });
181
+ const type = await select({
182
+ message: 'Task type:',
183
+ choices: [
184
+ { name: 'Feature', value: 'feature' },
185
+ { name: 'Bug', value: 'bug' },
186
+ { name: 'Improvement', value: 'improvement' },
187
+ { name: 'Task', value: 'task' },
188
+ ],
189
+ });
190
+ console.log(pc.dim('\nCreating task in Damper...'));
191
+ const task = await api.createTask(title.trim(), type);
192
+ console.log(pc.green(`✓ Created task #${task.id}: ${task.title}`));
193
+ return {
194
+ task,
195
+ isResume: false,
196
+ };
197
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@damper/cli",
3
- "version": "0.6.3",
3
+ "version": "0.6.5",
4
4
  "description": "CLI tool for orchestrating Damper task workflows with Claude Code",
5
5
  "author": "Damper <hello@usedamper.com>",
6
6
  "repository": {