@damper/mcp 0.10.0 → 0.10.2

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.
@@ -52,8 +52,7 @@ export function formatStartTaskResponse(result) {
52
52
  lines.push('1. `add_note`: "Session started: <goal>"');
53
53
  lines.push('2. Work: use `add_commit` for commits, `add_note` for decisions');
54
54
  lines.push('3. `add_note`: "Session end: <summary>"');
55
- lines.push('4. `review_task` (with `selfAssessment`) required self-review before completion');
56
- lines.push('5. `complete_task` (with `confirmations`) or `abandon_task`');
55
+ lines.push('4. `complete_task` (with `selfAssessment` and `confirmations`) or `abandon_task`');
57
56
  return lines.join('\n');
58
57
  }
59
58
  /**
package/dist/index.js CHANGED
@@ -619,10 +619,9 @@ const SelfAssessmentSchema = z.object({
619
619
  // Tool: Review task (self-assessment gate before completion)
620
620
  server.registerTool('review_task', {
621
621
  title: 'Review Task',
622
- description: 'Self-review gate MUST be called before `complete_task`.\n\n' +
622
+ description: 'Optional standalone self-review step. You can also pass `selfAssessment` directly to `complete_task` instead.\n\n' +
623
623
  'Reflect on your session: what project knowledge was missing, what tools were confusing, ' +
624
624
  'what process gaps caused friction. This drives project improvements.\n\n' +
625
- '**Flow:** `start_task` → work → `review_task` → `complete_task`\n\n' +
626
625
  'If you have findings, propose improvements to the user after this call ' +
627
626
  '(e.g., `update_context_section` for missing docs, `report_issue` for tool problems).',
628
627
  inputSchema: z.object({
@@ -659,12 +658,13 @@ server.registerTool('complete_task', {
659
658
  title: 'Complete Task',
660
659
  description: 'Mark task as ready for review (in_review). A human will verify and move it to done. ' +
661
660
  'Pass `skipReview: true` to mark as done immediately (use when the human explicitly asks).\n\n' +
662
- '**Requires `review_task` first** completion will be rejected if you haven\'t called `review_task`.\n\n' +
661
+ '**Self-assessment (required):** Pass `selfAssessment` reflecting on your session what project knowledge was missing, ' +
662
+ 'what tools were confusing, what process gaps caused friction. Pass empty object `{}` if nothing to report. ' +
663
+ 'You can also call `review_task` separately before this, but passing `selfAssessment` here is simpler.\n\n' +
663
664
  '**Before calling:**\n' +
664
- '1. Call `review_task` (self-assessment)\n' +
665
- '2. Push all commits\n' +
666
- '3. Check if project context docs need updating\n\n' +
667
- '**Completion checklist:** If the project has a completion checklist (shown in `start_task` and `review_task` responses), ' +
665
+ '1. Push all commits\n' +
666
+ '2. Check if project context docs need updating\n\n' +
667
+ '**Completion checklist:** If the project has a completion checklist (shown in `start_task` response), ' +
668
668
  'you MUST pass `confirmations` — an array of `{item, evidence}` objects. Each confirmation needs the checklist item text ' +
669
669
  'and concrete evidence proving you verified it (e.g., test output, build log snippet). ' +
670
670
  'Empty evidence or evidence identical to the item text will be rejected.\n\n' +
@@ -687,6 +687,8 @@ server.registerTool('complete_task', {
687
687
  reviewInstructions: z.string().optional().describe('What the reviewer should test or verify (markdown). Recommended when sending to review (default behavior). ' +
688
688
  'Write specific, actionable steps: what to test in the UI, what edge cases to check, ' +
689
689
  'what areas might break. Not a restatement of the summary.'),
690
+ selfAssessment: SelfAssessmentSchema.optional().describe('Self-review of your session (required if you haven\'t called `review_task` separately). ' +
691
+ 'Reflect on what went well, what knowledge was missing, what caused friction. Pass `{}` if nothing to report.'),
690
692
  }),
691
693
  outputSchema: z.object({
692
694
  id: z.string(),
@@ -699,9 +701,9 @@ server.registerTool('complete_task', {
699
701
  idempotentHint: true,
700
702
  openWorldHint: false,
701
703
  },
702
- }, async ({ taskId, summary, commits, confirmations, skipReview, reviewInstructions }) => {
704
+ }, async ({ taskId, summary, commits, confirmations, skipReview, reviewInstructions, selfAssessment }) => {
703
705
  try {
704
- const result = await api('POST', `/api/agent/tasks/${taskId}/complete`, { summary, commits, confirmations, skipReview, reviewInstructions });
706
+ const result = await api('POST', `/api/agent/tasks/${taskId}/complete`, { summary, commits, confirmations, skipReview, reviewInstructions, selfAssessment });
705
707
  return {
706
708
  content: [{ type: 'text', text: formatCompleteTaskResponse(result) }],
707
709
  structuredContent: result,
@@ -711,7 +713,7 @@ server.registerTool('complete_task', {
711
713
  const error = err;
712
714
  if (error.reviewRequired) {
713
715
  return {
714
- content: [{ type: 'text', text: '❌ Completion blocked — self-review required.\n\nCall `review_task` before `complete_task`. This is a required step for reflecting on your session.' }],
716
+ content: [{ type: 'text', text: '❌ Completion blocked — self-review required.\n\nAdd `selfAssessment` to your `complete_task` call:\n```json\n"selfAssessment": { "missingContext": [], "toolIssues": [], "processGaps": [] }\n```\nReflect on your session: what project knowledge was missing, what tools were confusing, what process gaps caused friction. Pass `{}` if nothing to report.' }],
715
717
  isError: true,
716
718
  };
717
719
  }
@@ -861,11 +863,11 @@ This project uses Damper MCP for task tracking. **You MUST follow this workflow.
861
863
  2. **Abandon and hand off** - Call \`abandon_task\` with a detailed handoff summary for the next agent.
862
864
  - NEVER leave a started task without completing or abandoning it
863
865
  - If the project has a **completion checklist** (shown in \`start_task\` response), you MUST pass all items as \`confirmations\` when calling \`complete_task\`
864
- - **Self-review (required):** Call \`review_task\` before \`complete_task\`. Pass \`selfAssessment\` reflecting on:
866
+ - **Self-review (required):** Pass \`selfAssessment\` in your \`complete_task\` call reflecting on:
865
867
  - \`missingContext\` — What project knowledge was missing or wrong?
866
868
  - \`toolIssues\` — Which tools or workflow steps were confusing or broken?
867
869
  - \`processGaps\` — What specs or conventions were missing?
868
- If you identify improvements, **propose them to the user** explain briefly what you found and why fixing it helps future tasks. Only act after the user approves.
870
+ Pass \`{}\` if nothing to report. If you identify improvements, **propose them to the user** before acting.
869
871
 
870
872
  ### Content Style Guide
871
873
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@damper/mcp",
3
- "version": "0.10.0",
3
+ "version": "0.10.2",
4
4
  "description": "MCP server for Damper task management",
5
5
  "author": "Damper <hello@usedamper.com>",
6
6
  "repository": {