codemap_routine_create
Create a new routine - a custom workflow combining checklists and scripts for repeatable tasks.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name | string | ✅ Required | Routine name (e.g., 'pre-package', 'pre-commit') |
description | string | ✅ Required | Routine description |
Usage Examples
MCP Usage (for AI Agents like Claude)
json
{
"name": "codemap_routine_create",
"arguments": {
"name": "pre-commit",
"description": "Pre-commit checklist and validation"
}
}Example Output
JSON Response
json
{
"success": true,
"data": {
"routine": {
"name": "pre-commit",
"description": "Pre-commit checklist and validation",
"checklistItems": 0,
"scripts": 0
},
"message": "Created routine \"pre-commit\". Add checklist items with codemap_routine_add_item() and scripts with codemap_routine_add_script()."
}
}When to Use This Tool
- Automate repeatable workflows
- Create pre-commit/pre-deploy checks
- Standardize team processes
- Combine checklists with automation
Common Patterns
// Create then populate
await codemap.routines.create({ name: 'deploy', description: 'Deployment workflow' });
await codemap.routines.addItem({ name: 'deploy', item: { text: 'Run tests', priority: 'high' }});Pro Tips
- Use descriptive names matching workflow purpose
- Create routine before adding items/scripts
- Group related workflows together
Best Practices
- Document routine purpose clearly
- Start with checklist, add scripts later
- Name routines after their trigger (pre-commit, pre-deploy)
Common Mistakes
❌ Creating without description
✅ Always provide clear description
✅ Always provide clear description