DMtools Development Assistant
Comprehensive knowledge base for DMtools - an AI-powered development toolkit that integrates with multiple platforms and provides 96+ MCP tools for automation.
🔧 FIRST-TIME SETUP (DO THIS PROACTIVELY)
When a user mentions DMtools or asks to use it, IMMEDIATELY perform these checks:
🚀 Quick Automated Setup (Recommended)
Run the automated setup helper that checks and configures everything:
bash1# Download and run setup helper 2curl -fsSL https://raw.githubusercontent.com/IstiN/dmtools/main/dmtools-ai-docs/setup-dmtools.sh | bash
This script will:
- ✓ Check if DMtools is installed (and install if missing)
- ✓ Create dmtools.env template if missing
- ✓ Add dmtools files to .gitignore
- ✓ Verify Java installation
- ✓ Test DMtools functionality
OR follow manual steps below:
Step 1: Check if DMtools is installed
bash1# Check if dmtools command is available 2which dmtools || echo "DMtools not installed"
If NOT installed:
bash1# Offer to install DMtools automatically 2curl -fsSL https://raw.githubusercontent.com/IstiN/dmtools/main/install.sh | bash
Step 2: Check for dmtools.env configuration
bash1# Check if dmtools.env exists in current directory or home 2ls dmtools.env ~/.dmtools.env 2>/dev/null || echo "No dmtools.env found"
If NOT found, help user create it:
- Ask user which integrations they need (Jira, ADO, Figma, etc.)
- Ask user which AI provider they want (Gemini free tier recommended)
- Create dmtools.env with appropriate template (see Configuration Template below)
- Add dmtools.env to .gitignore (contains secrets!)
Step 3: Verify .gitignore
bash1# Check if dmtools files are in .gitignore 2grep -q "dmtools.env\|dmtools-local.env" .gitignore 2>/dev/null || echo "Not in .gitignore"
If NOT in .gitignore, add these lines:
gitignore1# DMtools configuration (contains secrets) 2dmtools.env 3dmtools-local.env 4.dmtools/
Configuration Template
When creating dmtools.env, use this template and fill with user's credentials:
bash1# dmtools.env - NEVER commit this file 2# Generated by DMtools skill assistant 3 4# ================================ 5# INTEGRATIONS (choose what you need) 6# ================================ 7 8# Jira (if user needs Jira) 9JIRA_BASE_PATH=https://your-company.atlassian.net 10JIRA_EMAIL=your-email@company.com 11JIRA_API_TOKEN=your-jira-api-token 12JIRA_AUTH_TYPE=Basic 13 14# Azure DevOps (if user needs ADO) 15# ADO_BASE_PATH=https://dev.azure.com/your-org 16# ADO_PAT_TOKEN=your-ado-pat-token 17 18# ================================ 19# AI PROVIDER (required - choose one) 20# ================================ 21 22# Gemini (RECOMMENDED - free tier available) 23GEMINI_API_KEY=your-gemini-api-key 24# Get free key: https://aistudio.google.com/app/apikey 25 26# OR OpenAI 27# OPENAI_API_KEY=your-openai-api-key 28 29# OR AWS Bedrock 30# BEDROCK_ACCESS_KEY_ID=your-aws-key 31# BEDROCK_SECRET_ACCESS_KEY=your-aws-secret 32 33# ================================ 34# DEFAULTS 35# ================================ 36DEFAULT_LLM=gemini 37DEFAULT_TRACKER=jira
Quick Links for API Tokens:
- Jira: https://id.atlassian.com/manage-profile/security/api-tokens
- Gemini: https://aistudio.google.com/app/apikey (FREE - 15 req/min)
- OpenAI: https://platform.openai.com/api-keys
- ADO: https://dev.azure.com → User Settings → Personal Access Tokens
Step 4: Test Installation
bash1# Verify installation works 2dmtools list | head -5
When to Use
Use this skill when:
- Installing or configuring DMtools (do setup steps above first!)
- Setting up integrations (Jira, Azure DevOps, Figma, Confluence, Teams)
- Configuring AI providers (Gemini, OpenAI, Claude, DIAL, Ollama)
- Developing JavaScript agents with MCP tools
- Generating test cases (Jira, Xray, Cucumber)
- Generating analytics reports (ReportGenerator, dmc_report)
- Troubleshooting DMtools issues
- Working with dmtools.env configuration
- Creating AI teammate configurations
- Setting up CI/CD run tracing (
ciRunUrl) for ticket traceability
Quick Reference
⚠️ IMPORTANT: If this is first time using DMtools, see FIRST-TIME SETUP section above.
Manual Installation Steps
If automated setup didn't work, follow these manual steps:
1. Install DMtools CLI
bash1curl -fsSL https://raw.githubusercontent.com/IstiN/dmtools/main/install.sh | bash
2. Create dmtools.env
Create dmtools.env in project root (see template in FIRST-TIME SETUP section)
3. Add to .gitignore
bash1echo -e "\n# DMtools configuration\ndmtools.env\ndmtools-local.env\n.dmtools/" >> .gitignore
4. Get API Tokens
- Jira: https://id.atlassian.com/manage-profile/security/api-tokens
- Gemini (FREE): https://aistudio.google.com/app/apikey
- OpenAI: https://platform.openai.com/api-keys
See Installation Guide for detailed setup.
Common Commands
bash1dmtools list # List all 96+ MCP tools 2dmtools jira_get_ticket PROJ-123 # Get Jira ticket 3dmtools run agents/config.json # Run configuration 4dmtools run agents/config.json --ciRunUrl "https://ci.example.com/runs/42" # With CI tracing 5dmtools run agents/config.json "${ENCODED_CONFIG}" --inputJql "key=PROJ-1" # With overrides
Core Capabilities
152+ MCP Tools Available
Complete Reference: references/mcp-tools/README.md - Auto-generated from actual DMtools build
Current breakdown (16 integrations):
- Jira (52 tools): Ticket management, search, comments, Xray test management
- Teams (30 tools): Messages, chats, files, transcripts, meetings
- Confluence (17 tools): Page management, search, content access, attachments
- ADO (14 tools): Azure DevOps work items, queries, comments, attachments
- Figma (12 tools): Design extraction, icons, layers, styles, components
- AI Providers (12 tools):
- Gemini (2): Chat, multimodal
- OpenAI (2): Chat, vision models with files
- Anthropic (2): Claude chat
- Bedrock (2): AWS Claude
- DIAL (2): Enterprise AI
- Ollama (2): Local models
- Knowledge Base (5 tools): Document search, indexing, RAG
- File (4 tools): File operations, read/write
- Mermaid (3 tools): Diagram generation
- SharePoint (2 tools): Document management
- CLI (1 tool): Command execution
Example tools:
jira_get_ticket,jira_search_by_jql,jira_xray_create_testado_get_work_item,ado_move_to_state,ado_add_commentfigma_get_layers,figma_get_icons,figma_download_node_imageteams_send_message,teams_messages_since,teams_download_filegemini_ai_chat,openai_ai_chat,openai_ai_chat_with_files,bedrock_ai_chat
JavaScript Agent Pattern
All MCP tools are directly accessible as JavaScript functions in agents:
javascript1function action(params) { 2 try { 3 // Direct MCP tool access 4 const ticket = jira_get_ticket(params.ticketKey); 5 const analysis = gemini_ai_chat(`Analyze: ${ticket.fields.description}`); 6 7 // Process and return 8 return { success: true, result: analysis }; 9 } catch (error) { 10 return { success: false, error: error.toString() }; 11 } 12}
📚 Detailed Documentation
| Category | Document | Description |
|---|---|---|
| Installation | Installation Guide | Complete setup for all platforms (macOS, Linux, Windows) |
| Troubleshooting | Common issues and solutions | |
| Configuration | Configuration Overview | Environment variables and hierarchy |
| JSON Configuration Rules | ⚠️ CRITICAL: Rules for job configurations | |
| Jira Setup | API tokens and 52 tools | |
| Azure DevOps | PAT setup and 23+ tools | |
| Gemini AI | Free tier configuration (15 req/min) | |
| Other AI Providers | OpenAI, Claude, DIAL, Ollama | |
| Jobs | Jobs Reference | Complete guide to all 23 jobs |
| Teammate | Flexible AI assistant with custom instructions | |
| Expert | Domain expert Q&A based on project context | |
| TestCasesGenerator | Automated test case generation | |
| ReportGenerator | Report configuration, data sources, metrics | |
| Agents | Agent Best Practices | ⚠️ CRITICAL: Patterns and lessons learned |
| JavaScript Agents | GraalJS development with 152+ MCP tools | |
| Teammate Configs | JSON-based AI workflows (CLI safety v1.7.133+) | |
| CLI Integration | Cursor, Claude, Copilot, Gemini CLI agents | |
| Testing | Test Generation | Xray test case creation |
| MCP Tools | MCP Tools Reference | Auto-generated list of 152+ tools (16 integrations) |
| CI/CD | GitHub Actions | Automated ticket processing + CI run tracing |
⚠️ CRITICAL: JSON Configuration "name" Field
Before using any job configuration, understand this:
The "name" field in JSON configs is NOT a user-defined name. It is a Java class name (technical identifier).
json1{ 2 "name": "TestCasesGenerator" // ← Exact Java class name (immutable) 3}
- ✅ DO: Use exact name from docs:
TestCasesGenerator,Teammate,Expert - ❌ DON'T: Change it to "My Test Generator" or "test-generator"
Why? DMtools maps this name directly to Java code: "TestCasesGenerator" → new TestCasesGenerator()
See JSON Configuration Rules for details.
Common Tasks
Configure Jira Integration
bash1# 1. Generate API token at https://id.atlassian.com/manage-profile/security/api-tokens 2# 2. Encode credentials 3echo -n "email@company.com:token" | base64 4# 3. Add to dmtools.env 5JIRA_BASE_PATH=https://company.atlassian.net 6JIRA_LOGIN_PASS_TOKEN=base64_output_here
Generate Test Cases
IMPORTANT: "name" must exactly match Job class name. See JSON Configuration Rules.
json1{ 2 "name": "TestCasesGenerator", 3 "params": { 4 "inputJql": "project = PROJ AND type = Story", 5 "testCasesPriorities": "High, Medium, Low", 6 "outputType": "creation", 7 "testCaseIssueType": "Test", 8 "existingTestCasesJql": "project = PROJ AND type = Test", 9 "isFindRelated": true, 10 "isGenerateNew": true 11 } 12}
Create JavaScript Agent
javascript1// agents/js/processTickets.js 2function action(params) { 3 const tickets = jira_search_by_jql(params.jql); 4 5 for (const ticket of tickets) { 6 // Process with AI 7 const result = gemini_ai_chat(`Analyze: ${ticket.fields.summary}`); 8 9 // Update ticket 10 jira_post_comment(ticket.key, result); 11 } 12 13 return { processed: tickets.length }; 14}
CI Run Tracing (GitHub Actions / Azure DevOps)
When running Expert, Teammate, or TestCasesGenerator from CI/CD, pass --ciRunUrl to link every ticket comment to the pipeline run.
The workflow ai-teammate.yml does this automatically — no extra config needed. For other pipelines:
bash1# GitHub Actions 2CI_RUN_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" 3dmtools run agents/teammate.json --ciRunUrl "${CI_RUN_URL}" 4 5# Azure DevOps 6CI_RUN_URL="$(System.TeamFoundationCollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId)" 7dmtools run agents/teammate.json --ciRunUrl "${CI_RUN_URL}"
What happens on the ticket:
Processing started. CI Run: https://...— posted immediately when the job picks up the ticket- Normal result comment posted when job finishes
CLI overrides — any --key value after the config file patches the params block:
bash1# Override any param at runtime without editing the JSON 2dmtools run agents/config.json "${ENCODED_CONFIG}" --inputJql "key=PROJ-42" --ciRunUrl "${CI_RUN_URL}"
See CI Run Tracing and GitHub Actions for full details.
Integrate CLI Agents (Cursor, Claude, Copilot)
Use Case: Code generation with full workspace context
json1{ 2 "name": "Teammate", 3 "params": { 4 "agentParams": { 5 "aiRole": "Senior Software Engineer", 6 "instructions": ["Implement ticket from input/ folder"] 7 }, 8 "cliCommands": [ 9 "./cicd/scripts/run-cursor-agent.sh \"Read from input/, write to output/\"" 10 ], 11 "skipAIProcessing": true, 12 "postJSAction": "agents/js/developTicketAndCreatePR.js", 13 "inputJql": "key = PROJ-123" 14 } 15}
Pattern: Teammate prepares context → CLI agent processes → Post-action creates PR
See CLI Integration Guide for complete examples.
Best Practices
- Security: Never commit credentials - use environment variables
- AI Provider: Start with Gemini (free tier, 15 req/min)
- Testing: Mock external APIs with Mockito
- Batch Processing: Add delays to avoid rate limits
- Error Handling: Always use try-catch in agents
Troubleshooting Quick Reference
| Issue | Solution |
|---|---|
| "Java 23 required" | Run installer again, it auto-installs Java |
| "401 Unauthorized" | Check base64 encoding of Jira credentials |
| "Rate limit exceeded" | Add sleep(1000) between API calls |
| "Field not found" | Use jira_get_fields to find custom field IDs |
Architecture Notes
- Job System: 20+ specialized jobs for workflows
- Agent System: Java and JavaScript agents for AI tasks
- Configuration: Hierarchy - env vars > dmtools.env > dmtools-local.env
- Thread Safety: JobContext with thread-local storage
- DI Framework: Dagger 2 for dependency injection
Resources
- Repository: https://github.com/IstiN/dmtools
- MCP Tools Reference: https://github.com/IstiN/dmtools/blob/main/docs/README-MCP.md
- Issues: https://github.com/IstiN/dmtools/issues
🤖 AI Assistant Instructions
When to Trigger Setup Automatically
ALWAYS run setup checks when user:
- Mentions "dmtools" for the first time in conversation
- Asks to use any DMtools feature (Jira, test generation, etc.)
- Gets an error like "dmtools: command not found"
- Asks "how do I install dmtools"
Proactive Setup Pattern
markdown1I see you want to use DMtools. Let me check if it's set up properly... 2 3[Run setup checks] 4 5Results: 6- ✓ DMtools installed 7- ✗ dmtools.env not found 8- ✗ Not in .gitignore 9 10I'll help you configure it. First, which integrations do you need? 111. Jira 122. Azure DevOps 133. Both 144. Other 15 16[Create appropriate dmtools.env template] 17[Add to .gitignore] 18[Guide user to get API tokens]
Example: Automated Setup Flow
bash1# Step 1: Run automated setup 2curl -fsSL https://raw.githubusercontent.com/IstiN/dmtools/main/dmtools-ai-docs/setup-dmtools.sh | bash 3 4# Step 2: If dmtools.env needs credentials, guide user: 5# "I've created dmtools.env. You need to add your credentials: 6# 1. Jira API token: https://id.atlassian.com/manage-profile/security/api-tokens 7# 2. Gemini API key (FREE): https://aistudio.google.com/app/apikey 8# 9# Would you like me to help you configure Jira or Gemini first?" 10 11# Step 3: Help user edit dmtools.env 12# Step 4: Test with: dmtools list
Configuration Templates
Keep these handy for quick setup:
Jira Only:
bash1JIRA_BASE_PATH=https://company.atlassian.net 2JIRA_EMAIL=user@company.com 3JIRA_API_TOKEN=token_here 4JIRA_AUTH_TYPE=Basic 5GEMINI_API_KEY=key_here 6DEFAULT_LLM=gemini 7DEFAULT_TRACKER=jira
Azure DevOps Only:
bash1ADO_BASE_PATH=https://dev.azure.com/org 2ADO_PAT_TOKEN=token_here 3GEMINI_API_KEY=key_here 4DEFAULT_LLM=gemini 5DEFAULT_TRACKER=ado
Both Jira + ADO:
bash1JIRA_BASE_PATH=https://company.atlassian.net 2JIRA_EMAIL=user@company.com 3JIRA_API_TOKEN=jira_token 4JIRA_AUTH_TYPE=Basic 5ADO_BASE_PATH=https://dev.azure.com/org 6ADO_PAT_TOKEN=ado_token 7GEMINI_API_KEY=key_here 8DEFAULT_LLM=gemini 9DEFAULT_TRACKER=jira
Ask Questions
If you need clarification on requirements or implementation details, ask the user for more information before proceeding.