@codemafia0000/d0
Version:
Claude Multi-Agent Automated Development AI - Revolutionary development environment where multiple AI agents collaborate to automate software development
134 lines (117 loc) โข 5.38 kB
JavaScript
const path = require('path');
// Directory constants
const CONSTANTS = {
// Project directories
PROJECT_ROOT: process.cwd(),
D0_DIR: path.join(process.cwd(), '.d0'),
TMP_DIR: path.join(process.cwd(), '.d0', 'tmp'),
HISTORY_DIR: path.join(process.cwd(), '.d0', 'history'),
INSTRUCTIONS_DIR: path.join(process.cwd(), '.d0', 'instructions'),
COMMUNICATION_DIR: path.join(process.cwd(), '.d0', 'tmp', 'communication'),
INBOX_DIR: path.join(process.cwd(), '.d0', 'tmp', 'inbox'),
// Template directories (relative to module location)
TEMPLATES_DIR: path.join(__dirname, '..', '..', 'templates'),
SCRIPTS_DIR: path.join(__dirname, '..', 'scripts'),
// Configuration files
CONFIG_FILE: path.join(process.cwd(), '.d0', 'config.json'),
SESSIONS_FILE: path.join(process.cwd(), '.d0', 'tmp', 'sessions.json'),
MESSAGE_STATUS_FILE: path.join(process.cwd(), '.d0', 'tmp', 'message_status.json'),
GITIGNORE_FILE: path.join(process.cwd(), '.gitignore'),
// Log files
AGENT_MESSAGES_LOG: path.join(process.cwd(), '.d0', 'history', 'agent_messages.log'),
MESSAGES_JSONL: path.join(process.cwd(), '.d0', 'history', 'messages.jsonl'),
TASKS_JSONL: path.join(process.cwd(), '.d0', 'history', 'tasks.jsonl'),
SESSIONS_JSONL: path.join(process.cwd(), '.d0', 'history', 'sessions.jsonl'),
PROGRESS_JSONL: path.join(process.cwd(), '.d0', 'history', 'progress.jsonl'),
PROJECT_PROGRESS_LOG: path.join(process.cwd(), 'progress.log'),
// Agent roles
AGENT_ROLES: ['president', 'boss', 'worker1', 'worker2', 'worker3'],
VALID_RECIPIENTS: ['president', 'boss', 'everyone'],
// Worker configuration
DEFAULT_WORKERS: 3,
MIN_WORKERS: 1,
MAX_WORKERS: 10,
// File patterns to copy during init
TEMPLATE_FILES: ['CLAUDE.md'],
TEMPLATE_DIRECTORIES: ['instructions'],
// Git ignore entries for d0
D0_GITIGNORE_ENTRIES: [
'',
'# d0 Claude agents environment - temporary files',
'.d0/tmp/',
'.d0/claude/',
'# Keep config.json and instructions but ignore sensitive data',
'# .d0/config.json # Uncomment this line if config contains sensitive data',
'# .d0/instructions/ # Uncomment this line to ignore custom instructions',
''
],
// Default session and environment
DEFAULT_SESSION: 'default',
// History settings
DEFAULT_HISTORY_DAYS: 7,
DEFAULT_ANALYTICS_DAYS: 30,
// Communication settings
MESSAGE_PREVIEW_LENGTH: 100,
// Worker specializations
WORKER_SPECIALIZATIONS: [
{
title: 'Frontend Developer',
emoji: '๐จ',
description: 'creating beautiful and responsive user interfaces, implementing UI/UX designs, and optimizing frontend performance',
focus: 'UI/UX, React/Vue/Angular, CSS/SCSS, responsive design, accessibility',
tasks: 'Build components, implement designs, optimize performance, handle user interactions'
},
{
title: 'Backend Developer',
emoji: 'โ๏ธ',
description: 'developing robust server-side logic, APIs, and database integrations',
focus: 'REST/GraphQL APIs, databases, authentication, server architecture, performance optimization',
tasks: 'Create APIs, design databases, implement business logic, handle security'
},
{
title: 'DevOps Engineer',
emoji: '๐',
description: 'managing infrastructure, deployments, and continuous integration/delivery pipelines',
focus: 'CI/CD, Docker, cloud platforms (AWS/GCP/Azure), monitoring, automation',
tasks: 'Setup deployment pipelines, configure infrastructure, monitor applications, automate processes'
},
{
title: 'QA Engineer',
emoji: '๐งช',
description: 'ensuring software quality through comprehensive testing and quality assurance processes',
focus: 'Test automation, manual testing, performance testing, security testing, quality metrics',
tasks: 'Write tests, execute test plans, report bugs, ensure quality standards'
},
{
title: 'Full Stack Developer',
emoji: '๐ง',
description: 'working across both frontend and backend technologies to deliver complete solutions',
focus: 'Full-stack frameworks, database design, API development, deployment, system integration',
tasks: 'Build end-to-end features, integrate systems, deploy applications, solve technical challenges'
}
],
// Version and project info
VERSION: '1.0.14',
PROJECT_NAME: 'd0 Claude Agents CLI'
};
// Helper functions for path resolution
CONSTANTS.getD0Path = (...segments) => path.join(CONSTANTS.D0_DIR, ...segments);
CONSTANTS.getTmpPath = (...segments) => path.join(CONSTANTS.TMP_DIR, ...segments);
CONSTANTS.getHistoryPath = (...segments) => path.join(CONSTANTS.HISTORY_DIR, ...segments);
CONSTANTS.getInboxPath = (...segments) => path.join(CONSTANTS.INBOX_DIR, ...segments);
// Helper functions for worker management
CONSTANTS.getWorkerRoles = (numWorkers = CONSTANTS.DEFAULT_WORKERS) => {
const workers = [];
for (let i = 1; i <= numWorkers; i++) {
workers.push(`worker${i}`);
}
return ['president', 'boss', ...workers];
};
CONSTANTS.getValidRecipients = (numWorkers = CONSTANTS.DEFAULT_WORKERS) => {
const workers = [];
for (let i = 1; i <= numWorkers; i++) {
workers.push(`worker${i}`);
}
return [...CONSTANTS.VALID_RECIPIENTS, ...workers];
};
module.exports = CONSTANTS;