@damper/cli 0.2.3 → 0.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/dist/commands/start.d.ts
CHANGED
package/dist/commands/start.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { startCommand } from './commands/start.js';
|
|
|
4
4
|
import { statusCommand } from './commands/status.js';
|
|
5
5
|
import { cleanupCommand } from './commands/cleanup.js';
|
|
6
6
|
import { setupCommand } from './commands/setup.js';
|
|
7
|
-
const VERSION = '0.
|
|
7
|
+
const VERSION = '0.3.1';
|
|
8
8
|
function showHelp() {
|
|
9
9
|
console.log(`
|
|
10
10
|
${pc.bold('@damper/cli')} - Agent orchestration for Damper tasks
|
|
@@ -19,6 +19,7 @@ ${pc.bold('Options:')}
|
|
|
19
19
|
--task <id> Work on a specific task
|
|
20
20
|
--type <type> Filter by type: bug, feature, improvement, task
|
|
21
21
|
--status <status> Filter by status: planned, in_progress, done, all
|
|
22
|
+
--yolo Skip plan mode, auto-accept edits
|
|
22
23
|
--reconfigure Change API key (use with setup command)
|
|
23
24
|
-h, --help Show this help message
|
|
24
25
|
-v, --version Show version
|
|
@@ -80,6 +81,9 @@ function parseArgs(args) {
|
|
|
80
81
|
else if (arg === '--reconfigure') {
|
|
81
82
|
result.setupOptions.reconfigure = true;
|
|
82
83
|
}
|
|
84
|
+
else if (arg === '--yolo') {
|
|
85
|
+
result.options.yolo = true;
|
|
86
|
+
}
|
|
83
87
|
else if (!arg.startsWith('-') && !result.command) {
|
|
84
88
|
result.command = arg;
|
|
85
89
|
}
|
package/dist/services/claude.js
CHANGED
|
@@ -83,8 +83,14 @@ export function configureDamperMcp() {
|
|
|
83
83
|
* Launch Claude Code in a directory
|
|
84
84
|
*/
|
|
85
85
|
export async function launchClaude(options) {
|
|
86
|
-
const { cwd, taskId, taskTitle, apiKey } = options;
|
|
86
|
+
const { cwd, taskId, taskTitle, apiKey, yolo } = options;
|
|
87
87
|
console.log(pc.green(`\nStarting Claude Code for task #${taskId}: ${taskTitle}`));
|
|
88
|
+
if (yolo) {
|
|
89
|
+
console.log(pc.yellow('Mode: YOLO (accepting edits without confirmation)'));
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
console.log(pc.dim('Mode: Plan (will ask for approval before making changes)'));
|
|
93
|
+
}
|
|
88
94
|
console.log(pc.dim(`Directory: ${cwd}\n`));
|
|
89
95
|
// Build initial prompt
|
|
90
96
|
const initialPrompt = [
|
|
@@ -92,16 +98,28 @@ export async function launchClaude(options) {
|
|
|
92
98
|
'',
|
|
93
99
|
'Please read TASK_CONTEXT.md for full context, critical rules, and the implementation plan.',
|
|
94
100
|
'',
|
|
95
|
-
'
|
|
101
|
+
'Task workflow:',
|
|
96
102
|
'1. Use `add_commit` after each git commit',
|
|
97
103
|
'2. Use `add_note` for important decisions',
|
|
98
104
|
'3. Call `complete_task` when done or `abandon_task` if stopping early',
|
|
105
|
+
'',
|
|
106
|
+
'About this session: You were launched by @damper/cli (npm package).',
|
|
107
|
+
'The CLI created this worktree, bootstrapped TASK_CONTEXT.md, and started you with Damper MCP configured.',
|
|
108
|
+
'',
|
|
109
|
+
'Self-improvement: As you work, reflect on this workflow:',
|
|
110
|
+
'- If you encounter friction, bugs, or missing features in the CLI or MCP tools, use `report_issue` to log them',
|
|
111
|
+
'- Ideas to improve: task context format, worktree setup, MCP tools, agent prompts - all welcome as feature_request',
|
|
112
|
+
'- Your feedback directly improves the tooling for future tasks',
|
|
99
113
|
].join('\n');
|
|
114
|
+
// Build Claude args
|
|
115
|
+
const claudeArgs = [
|
|
116
|
+
'--permission-mode', yolo ? 'acceptEdits' : 'plan',
|
|
117
|
+
initialPrompt,
|
|
118
|
+
];
|
|
100
119
|
// Launch Claude Code in interactive mode
|
|
101
|
-
// Pass the prompt as an argument (not --print which is non-interactive)
|
|
102
120
|
// Pass API key so MCP server gets it
|
|
103
121
|
try {
|
|
104
|
-
await execa('claude',
|
|
122
|
+
await execa('claude', claudeArgs, {
|
|
105
123
|
cwd,
|
|
106
124
|
stdio: 'inherit',
|
|
107
125
|
env: {
|
|
@@ -25,6 +25,22 @@ export function generateTaskContext(options) {
|
|
|
25
25
|
lines.push('');
|
|
26
26
|
lines.push(damperInstructions);
|
|
27
27
|
lines.push('');
|
|
28
|
+
// CLI & Tooling Info
|
|
29
|
+
lines.push('## About This Session');
|
|
30
|
+
lines.push('');
|
|
31
|
+
lines.push('You were launched by `@damper/cli` (npm package). The CLI:');
|
|
32
|
+
lines.push('- Created this git worktree for isolated work');
|
|
33
|
+
lines.push('- Generated this TASK_CONTEXT.md from Damper API');
|
|
34
|
+
lines.push('- Configured Damper MCP tools for task lifecycle');
|
|
35
|
+
lines.push('');
|
|
36
|
+
lines.push('**Help improve the tooling:** As you work, if you encounter:');
|
|
37
|
+
lines.push('- Friction or bugs in the CLI or MCP tools');
|
|
38
|
+
lines.push('- Missing context that would help future agents');
|
|
39
|
+
lines.push('- Ideas to improve the workflow or prompts');
|
|
40
|
+
lines.push('');
|
|
41
|
+
lines.push('Use `report_issue` (category: error, feature_request, or improvement) to log them.');
|
|
42
|
+
lines.push('Your feedback directly improves the tooling for all future tasks.');
|
|
43
|
+
lines.push('');
|
|
28
44
|
// Task Description
|
|
29
45
|
if (task.description) {
|
|
30
46
|
lines.push('## Task Description');
|