@damper/mcp 0.3.9 → 0.3.10
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/README.md +15 -0
- package/dist/index.js +59 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -94,6 +94,7 @@ The AI will see tools from both servers and can distinguish between them:
|
|
|
94
94
|
| `get_module` | Get module details |
|
|
95
95
|
| `update_module` | Register/update a module |
|
|
96
96
|
| `sync_modules` | Bulk upload module registry |
|
|
97
|
+
| `get_agent_instructions` | Get canonical workflow for CLAUDE.md setup |
|
|
97
98
|
|
|
98
99
|
### Project Context
|
|
99
100
|
|
|
@@ -332,6 +333,20 @@ When working on tasks, follow this workflow for best results:
|
|
|
332
333
|
> Sync all my documentation to Damper
|
|
333
334
|
```
|
|
334
335
|
|
|
336
|
+
## Setting Up a Project
|
|
337
|
+
|
|
338
|
+
To add Damper workflow instructions to a new project:
|
|
339
|
+
|
|
340
|
+
```
|
|
341
|
+
> Get the agent instructions and add them to my CLAUDE.md
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
The agent will call `get_agent_instructions` and write to your CLAUDE.md file. This ensures you always have the latest workflow instructions.
|
|
345
|
+
|
|
346
|
+
**Formats:**
|
|
347
|
+
- `section` (default): Just the Damper workflow section - append to existing CLAUDE.md
|
|
348
|
+
- `markdown`: Full file with header - use when creating a new CLAUDE.md
|
|
349
|
+
|
|
335
350
|
## Agent Instructions (CLAUDE.md)
|
|
336
351
|
|
|
337
352
|
Add this to your project's `CLAUDE.md` (or `.cursorrules` for Cursor) to ensure AI agents use Damper consistently:
|
package/dist/index.js
CHANGED
|
@@ -631,6 +631,65 @@ server.registerTool('abandon_task', {
|
|
|
631
631
|
structuredContent: result,
|
|
632
632
|
};
|
|
633
633
|
});
|
|
634
|
+
// ==================== Agent Instructions ====================
|
|
635
|
+
// Tool: Get agent instructions
|
|
636
|
+
server.registerTool('get_agent_instructions', {
|
|
637
|
+
title: 'Get Agent Instructions',
|
|
638
|
+
description: 'Get the canonical Damper workflow instructions. ' +
|
|
639
|
+
'Use this to set up or update CLAUDE.md in a project.',
|
|
640
|
+
inputSchema: z.object({
|
|
641
|
+
format: z.enum(['markdown', 'section']).optional()
|
|
642
|
+
.describe('markdown = full file, section = just the Damper section (default: section)'),
|
|
643
|
+
}),
|
|
644
|
+
outputSchema: z.object({
|
|
645
|
+
format: z.enum(['markdown', 'section']),
|
|
646
|
+
content: z.string(),
|
|
647
|
+
}),
|
|
648
|
+
annotations: {
|
|
649
|
+
readOnlyHint: true,
|
|
650
|
+
destructiveHint: false,
|
|
651
|
+
idempotentHint: true,
|
|
652
|
+
openWorldHint: false,
|
|
653
|
+
},
|
|
654
|
+
}, async ({ format = 'section' }) => {
|
|
655
|
+
const section = `## Task Management with Damper MCP
|
|
656
|
+
|
|
657
|
+
This project uses Damper MCP for task tracking. **You MUST follow this workflow.**
|
|
658
|
+
|
|
659
|
+
### At Session Start (MANDATORY)
|
|
660
|
+
1. \`get_project_context\` - **READ THIS FIRST.** Contains architecture, conventions, and critical project info.
|
|
661
|
+
2. \`get_context_section\` - Fetch full content for sections relevant to your task
|
|
662
|
+
3. \`list_tasks\` - Check for existing tasks to work on
|
|
663
|
+
4. If working on a task: \`start_task\` to lock it
|
|
664
|
+
|
|
665
|
+
### While Working
|
|
666
|
+
- \`add_commit\` after each commit with hash and message
|
|
667
|
+
- \`add_note\` for decisions: "Decision: chose X because Y"
|
|
668
|
+
- \`update_subtask\` to mark subtask progress
|
|
669
|
+
- **Follow patterns from project context** - Don't reinvent; use existing conventions
|
|
670
|
+
|
|
671
|
+
### At Session End (MANDATORY)
|
|
672
|
+
- ALWAYS call \`add_note\` with session summary before stopping
|
|
673
|
+
- ALWAYS call \`complete_task\` (if done) or \`abandon_task\` (if stopping early)
|
|
674
|
+
- NEVER leave a started task without completing or abandoning it
|
|
675
|
+
- If you learned something about the codebase, consider updating project context
|
|
676
|
+
|
|
677
|
+
### Why This Matters
|
|
678
|
+
- **Project context prevents mistakes** - Contains architecture decisions, gotchas, and patterns
|
|
679
|
+
- Locked tasks block other agents from working on them
|
|
680
|
+
- Commits and notes help the next agent continue the work
|
|
681
|
+
- Updating context saves future agents from re-analyzing the codebase`;
|
|
682
|
+
if (format === 'markdown') {
|
|
683
|
+
return {
|
|
684
|
+
content: [{ type: 'text', text: `# CLAUDE.md\n\n${section}` }],
|
|
685
|
+
structuredContent: { format: 'markdown', content: `# CLAUDE.md\n\n${section}` },
|
|
686
|
+
};
|
|
687
|
+
}
|
|
688
|
+
return {
|
|
689
|
+
content: [{ type: 'text', text: section }],
|
|
690
|
+
structuredContent: { format: 'section', content: section },
|
|
691
|
+
};
|
|
692
|
+
});
|
|
634
693
|
// ==================== Context Tools ====================
|
|
635
694
|
// Tool: List context sections
|
|
636
695
|
server.registerTool('list_context_sections', {
|