dhurandhar 2.1.1 → 2.2.1
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/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,67 @@ All notable changes to Dhurandhar will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.2.1] - 2026-04-02
|
|
9
|
+
|
|
10
|
+
### Fixed - NOW EXACTLY LIKE BMAD! 🎉
|
|
11
|
+
- **`dhurandhar setup`** now creates directories in **current project directory**
|
|
12
|
+
- Creates **`_dhurandhar/`** directory (like BMAD's `_bmad/`)
|
|
13
|
+
- Creates **`_dhurandhar-output/`** directory (like BMAD's `_bmad-output/`)
|
|
14
|
+
- Creates AI assistant directory (`.augment/`, `.cursor/`, etc.)
|
|
15
|
+
- Creates initial context file in AI directory
|
|
16
|
+
- Directories created immediately on setup, not on init
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
- Setup creates project structure in current directory
|
|
20
|
+
- AI assistant integration happens during setup
|
|
21
|
+
- Better BMAD compatibility
|
|
22
|
+
|
|
23
|
+
### User Issue Addressed
|
|
24
|
+
User reported: "setup changed nothing, no _dhurandhar or _dhurandhar-output directories"
|
|
25
|
+
**Fixed**: Setup now creates these directories immediately!
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## [2.2.0] - 2026-04-02
|
|
30
|
+
|
|
31
|
+
### Added - BMAD-Style Deep Integration! 🎉
|
|
32
|
+
- **`.dhurandhar-output/` directory** created on init (like BMAD)
|
|
33
|
+
- **AI Assistant Integration** - Context files in assistant's directory:
|
|
34
|
+
- **Augment Code**: `.augment/` with context, commands, instructions
|
|
35
|
+
- **Cursor**: `.cursorrules` + `.cursor/` directory
|
|
36
|
+
- **Claude Code**: `.claude/` directory with context
|
|
37
|
+
- **GitHub Copilot**: `.github/dhurandhar.md`
|
|
38
|
+
- **Generic**: `.ai/` directory for other assistants
|
|
39
|
+
- **Commands in chat window** - AI assistants now see Dhurandhar commands
|
|
40
|
+
- **Project context** - AI understands Dhurandhar framework automatically
|
|
41
|
+
- **Deep integration toggle** - Enabled via setup wizard
|
|
42
|
+
|
|
43
|
+
### Changed
|
|
44
|
+
- `dhurandhar init` now creates comprehensive directory structure
|
|
45
|
+
- Init creates `.dhurandhar-output/` with subdirectories:
|
|
46
|
+
- `generated/` - Generated code
|
|
47
|
+
- `diagrams/` - Visual diagrams
|
|
48
|
+
- `reports/` - Design reports
|
|
49
|
+
- AI assistant gets full context on initialization
|
|
50
|
+
|
|
51
|
+
### Improved
|
|
52
|
+
- Much better first-time experience (like BMAD)
|
|
53
|
+
- AI assistants understand Dhurandhar workflow
|
|
54
|
+
- Context files guide AI to help with design
|
|
55
|
+
- Commands available in AI chat windows
|
|
56
|
+
|
|
57
|
+
### Files Created on Init
|
|
58
|
+
- `.dhurandhar/` - Framework config
|
|
59
|
+
- `.dhurandhar-output/` - Output artifacts ← **NEW!**
|
|
60
|
+
- `.augment/` or `.cursor/` etc. - AI context ← **NEW!**
|
|
61
|
+
- `SYSTEM_DESIGN_MAP.yaml` - Design document
|
|
62
|
+
- `README.md` - Project readme
|
|
63
|
+
|
|
64
|
+
This is a MINOR version bump (2.1.x → 2.2.0) adding significant
|
|
65
|
+
new features while maintaining backward compatibility.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
8
69
|
## [2.1.1] - 2026-04-02
|
|
9
70
|
|
|
10
71
|
### Fixed
|
package/cli/commands/init.js
CHANGED
|
@@ -8,7 +8,8 @@ import * as clack from '@clack/prompts';
|
|
|
8
8
|
import chalk from 'chalk';
|
|
9
9
|
import { writeFileSync, mkdirSync, existsSync } from 'fs';
|
|
10
10
|
import { join } from 'path';
|
|
11
|
-
import { isSetupComplete, loadConfig } from '../../core/config/config-loader.js';
|
|
11
|
+
import { isSetupComplete, loadConfig, getAICodingAssistant } from '../../core/config/config-loader.js';
|
|
12
|
+
import { setupAIAssistantIntegration } from '../../core/integrations/ai-assistant-integration.js';
|
|
12
13
|
|
|
13
14
|
export default async function initCommand(options) {
|
|
14
15
|
console.log(chalk.cyan.bold('🚀 Initialize Dhurandhar Project\n'));
|
|
@@ -78,11 +79,17 @@ export default async function initCommand(options) {
|
|
|
78
79
|
const spinner = clack.spinner();
|
|
79
80
|
spinner.start('Creating project structure...');
|
|
80
81
|
|
|
81
|
-
// Create .dhurandhar directory
|
|
82
|
+
// Create .dhurandhar directory (like BMAD)
|
|
82
83
|
mkdirSync('.dhurandhar', { recursive: true });
|
|
83
84
|
mkdirSync('.dhurandhar/phases', { recursive: true });
|
|
84
85
|
mkdirSync('.dhurandhar/outputs', { recursive: true });
|
|
85
86
|
|
|
87
|
+
// Create .dhurandhar-output directory (like BMAD's output structure)
|
|
88
|
+
mkdirSync('.dhurandhar-output', { recursive: true });
|
|
89
|
+
mkdirSync('.dhurandhar-output/generated', { recursive: true });
|
|
90
|
+
mkdirSync('.dhurandhar-output/diagrams', { recursive: true });
|
|
91
|
+
mkdirSync('.dhurandhar-output/reports', { recursive: true });
|
|
92
|
+
|
|
86
93
|
// Create config file
|
|
87
94
|
const config = {
|
|
88
95
|
version: '2.0.0',
|
|
@@ -207,11 +214,28 @@ dhurandhar next
|
|
|
207
214
|
|
|
208
215
|
spinner.stop('Project initialized!');
|
|
209
216
|
|
|
217
|
+
// Setup AI coding assistant integration
|
|
218
|
+
const config = loadConfig();
|
|
219
|
+
const assistant = getAICodingAssistant();
|
|
220
|
+
|
|
221
|
+
if (config.aiCodingAssistant !== 'none' && config.deepIntegration) {
|
|
222
|
+
console.log(''); // Blank line
|
|
223
|
+
setupAIAssistantIntegration(config.aiCodingAssistant, projectName, projectType);
|
|
224
|
+
}
|
|
225
|
+
|
|
210
226
|
clack.outro(chalk.green.bold('✓ Project created successfully!'));
|
|
211
227
|
|
|
212
228
|
console.log('');
|
|
213
229
|
console.log(chalk.cyan('Next steps:'));
|
|
214
|
-
console.log(' 1. ' + chalk.bold('dhurandhar
|
|
230
|
+
console.log(' 1. ' + chalk.bold('dhurandhar yudhishthira') + ' - Start Phase 1 (Features)');
|
|
215
231
|
console.log(' 2. ' + chalk.bold('dhurandhar status') + ' - Check project status');
|
|
232
|
+
|
|
233
|
+
if (config.aiCodingAssistant !== 'none') {
|
|
234
|
+
console.log('');
|
|
235
|
+
console.log(chalk.magenta(`💡 ${assistant.name} Integration:`));
|
|
236
|
+
console.log(chalk.gray(' - Context files created in .augment/'));
|
|
237
|
+
console.log(chalk.gray(' - Ask your AI assistant for help designing!'));
|
|
238
|
+
}
|
|
239
|
+
|
|
216
240
|
console.log('');
|
|
217
241
|
}
|
package/cli/commands/setup.js
CHANGED
|
@@ -43,12 +43,14 @@ export default async function setupCommand(options) {
|
|
|
43
43
|
// Step 6: Save Configuration
|
|
44
44
|
await saveConfiguration(config);
|
|
45
45
|
|
|
46
|
+
// Step 7: Create project directories (like BMAD's _bmad and _bmad-output)
|
|
47
|
+
await createProjectDirectories(config);
|
|
48
|
+
|
|
46
49
|
clack.outro(chalk.green.bold('✅ Setup Complete!'));
|
|
47
50
|
|
|
48
51
|
console.log(chalk.cyan('\n📚 Next Steps:'));
|
|
49
|
-
console.log(chalk.gray(' 1.
|
|
50
|
-
console.log(chalk.gray(' 2.
|
|
51
|
-
console.log(chalk.gray(' 3. Start designing: dhurandhar yudhishthira\n'));
|
|
52
|
+
console.log(chalk.gray(' 1. Run: dhurandhar init (to initialize design)'));
|
|
53
|
+
console.log(chalk.gray(' 2. Start designing: dhurandhar yudhishthira\n'));
|
|
52
54
|
} catch (error) {
|
|
53
55
|
console.error(chalk.red('\n❌ Setup failed:'), error.message);
|
|
54
56
|
console.log(chalk.yellow('\n💡 Tip: Try running setup again with a stable terminal'));
|
|
@@ -264,3 +266,117 @@ async function saveConfiguration(config) {
|
|
|
264
266
|
console.log(chalk.gray(` Cache Enabled: ${config.enableCache ? 'Yes' : 'No'}`));
|
|
265
267
|
console.log(chalk.gray(` Progress Indicators: ${config.enableProgress ? 'Yes' : 'No'}\n`));
|
|
266
268
|
}
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Step 7: Create project directories (like BMAD's _bmad and _bmad-output)
|
|
272
|
+
*/
|
|
273
|
+
async function createProjectDirectories(config) {
|
|
274
|
+
const s = clack.spinner();
|
|
275
|
+
s.start('Creating project directories...');
|
|
276
|
+
|
|
277
|
+
const cwd = process.cwd();
|
|
278
|
+
|
|
279
|
+
try {
|
|
280
|
+
// Create _dhurandhar directory (like BMAD's _bmad)
|
|
281
|
+
const dhurandharDir = join(cwd, '_dhurandhar');
|
|
282
|
+
if (!existsSync(dhurandharDir)) {
|
|
283
|
+
mkdirSync(dhurandharDir, { recursive: true });
|
|
284
|
+
mkdirSync(join(dhurandharDir, 'core'), { recursive: true });
|
|
285
|
+
mkdirSync(join(dhurandharDir, 'templates'), { recursive: true });
|
|
286
|
+
mkdirSync(join(dhurandharDir, 'phases'), { recursive: true });
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
// Create _dhurandhar-output directory (like BMAD's _bmad-output)
|
|
290
|
+
const outputDir = join(cwd, '_dhurandhar-output');
|
|
291
|
+
if (!existsSync(outputDir)) {
|
|
292
|
+
mkdirSync(outputDir, { recursive: true });
|
|
293
|
+
mkdirSync(join(outputDir, 'generated'), { recursive: true });
|
|
294
|
+
mkdirSync(join(outputDir, 'diagrams'), { recursive: true });
|
|
295
|
+
mkdirSync(join(outputDir, 'reports'), { recursive: true });
|
|
296
|
+
mkdirSync(join(outputDir, 'exports'), { recursive: true });
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
// Create AI assistant integration directory and files
|
|
300
|
+
if (config.aiCodingAssistant && config.aiCodingAssistant !== 'none') {
|
|
301
|
+
const assistantDirs = {
|
|
302
|
+
'augment': '.augment',
|
|
303
|
+
'cursor': '.cursor',
|
|
304
|
+
'claude': '.claude',
|
|
305
|
+
'copilot': '.github',
|
|
306
|
+
'codeium': '.codeium',
|
|
307
|
+
'tabnine': '.tabnine',
|
|
308
|
+
'gemini': '.gemini',
|
|
309
|
+
'codex': '.codex',
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
const assistantDir = assistantDirs[config.aiCodingAssistant];
|
|
313
|
+
if (assistantDir) {
|
|
314
|
+
const fullPath = join(cwd, assistantDir);
|
|
315
|
+
if (!existsSync(fullPath)) {
|
|
316
|
+
mkdirSync(fullPath, { recursive: true });
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
// Create initial context file
|
|
320
|
+
const contextFile = join(fullPath, 'dhurandhar-setup.md');
|
|
321
|
+
const contextContent = `# Dhurandhar Setup Complete
|
|
322
|
+
|
|
323
|
+
Setup completed on: ${new Date().toISOString()}
|
|
324
|
+
|
|
325
|
+
## Configuration
|
|
326
|
+
- AI Assistant: ${config.aiCodingAssistant}
|
|
327
|
+
- Deep Integration: ${config.deepIntegration ? 'Enabled' : 'Disabled'}
|
|
328
|
+
- AI Provider: ${config.aiProvider}
|
|
329
|
+
- Integrations: ${config.integrations?.join(', ') || 'None'}
|
|
330
|
+
|
|
331
|
+
## Directories Created
|
|
332
|
+
- \`_dhurandhar/\` - Core Dhurandhar files
|
|
333
|
+
- \`_dhurandhar-output/\` - Generated outputs
|
|
334
|
+
- \`${assistantDir}/\` - AI assistant integration
|
|
335
|
+
|
|
336
|
+
## Next Steps
|
|
337
|
+
1. Run \`dhurandhar init\` to initialize your design project
|
|
338
|
+
2. Start Phase 1: \`dhurandhar yudhishthira\`
|
|
339
|
+
|
|
340
|
+
## Available Commands
|
|
341
|
+
- \`dhurandhar status\` - Check project status
|
|
342
|
+
- \`dhurandhar yudhishthira\` - Phase 1: Features
|
|
343
|
+
- \`dhurandhar bhishma\` - Phase 2: Requirements
|
|
344
|
+
- \`dhurandhar sahadeva\` - Phase 3: Entities
|
|
345
|
+
- \`dhurandhar nakula\` - Phase 4: APIs
|
|
346
|
+
- \`dhurandhar bheema\` - Phase 5: HLD
|
|
347
|
+
- \`dhurandhar arjuna\` - Phase 6: LLD
|
|
348
|
+
- \`dhurandhar draupadi\` - Phase 8: Blessing
|
|
349
|
+
- \`dhurandhar codegen -t all\` - Generate code
|
|
350
|
+
|
|
351
|
+
🕉️ Dhurandhar is ready to guide your design!
|
|
352
|
+
`;
|
|
353
|
+
writeFileSync(contextFile, contextContent, 'utf-8');
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
s.stop('Directories created');
|
|
358
|
+
|
|
359
|
+
console.log('');
|
|
360
|
+
clack.log.success('Created project directories:');
|
|
361
|
+
console.log(chalk.gray(` ${cwd}/_dhurandhar/`));
|
|
362
|
+
console.log(chalk.gray(` ${cwd}/_dhurandhar-output/`));
|
|
363
|
+
|
|
364
|
+
if (config.aiCodingAssistant && config.aiCodingAssistant !== 'none') {
|
|
365
|
+
const assistantDirs = {
|
|
366
|
+
'augment': '.augment',
|
|
367
|
+
'cursor': '.cursor',
|
|
368
|
+
'claude': '.claude',
|
|
369
|
+
'copilot': '.github',
|
|
370
|
+
};
|
|
371
|
+
const dir = assistantDirs[config.aiCodingAssistant];
|
|
372
|
+
if (dir) {
|
|
373
|
+
console.log(chalk.gray(` ${cwd}/${dir}/`));
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
console.log('');
|
|
377
|
+
|
|
378
|
+
} catch (error) {
|
|
379
|
+
s.stop('Failed to create directories');
|
|
380
|
+
clack.log.error(`Error creating directories: ${error.message}`);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI Assistant Integration Hub
|
|
3
|
+
*
|
|
4
|
+
* Integrates with various AI coding assistants
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { setupAuggieIntegration } from './auggie-integration.js';
|
|
8
|
+
import { writeFileSync, mkdirSync, existsSync } from 'fs';
|
|
9
|
+
import chalk from 'chalk';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Setup integration based on configured AI assistant
|
|
13
|
+
*/
|
|
14
|
+
export function setupAIAssistantIntegration(assistantType, projectName, projectType) {
|
|
15
|
+
switch (assistantType) {
|
|
16
|
+
case 'augment':
|
|
17
|
+
setupAuggieIntegration(projectName, projectType);
|
|
18
|
+
break;
|
|
19
|
+
|
|
20
|
+
case 'cursor':
|
|
21
|
+
setupCursorIntegration(projectName, projectType);
|
|
22
|
+
break;
|
|
23
|
+
|
|
24
|
+
case 'claude':
|
|
25
|
+
setupClaudeIntegration(projectName, projectType);
|
|
26
|
+
break;
|
|
27
|
+
|
|
28
|
+
case 'copilot':
|
|
29
|
+
setupCopilotIntegration(projectName, projectType);
|
|
30
|
+
break;
|
|
31
|
+
|
|
32
|
+
default:
|
|
33
|
+
setupGenericIntegration(projectName, projectType);
|
|
34
|
+
break;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Setup Cursor integration
|
|
40
|
+
*/
|
|
41
|
+
function setupCursorIntegration(projectName, projectType) {
|
|
42
|
+
console.log(chalk.cyan('\n⚡ Setting up Cursor integration...\n'));
|
|
43
|
+
|
|
44
|
+
const cursorDir = '.cursor';
|
|
45
|
+
if (!existsSync(cursorDir)) {
|
|
46
|
+
mkdirSync(cursorDir, { recursive: true });
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Create .cursorrules file (Cursor's context file)
|
|
50
|
+
const cursorrules = `# Dhurandhar Project: ${projectName}
|
|
51
|
+
|
|
52
|
+
## Project Type
|
|
53
|
+
${projectType}
|
|
54
|
+
|
|
55
|
+
## Framework
|
|
56
|
+
Dhurandhar v2.1.x - Dharma-centric design framework
|
|
57
|
+
|
|
58
|
+
## Design Phases
|
|
59
|
+
Execute these phases in order:
|
|
60
|
+
1. dhurandhar yudhishthira (Features)
|
|
61
|
+
2. dhurandhar bhishma (Requirements)
|
|
62
|
+
3. dhurandhar sahadeva (Entities)
|
|
63
|
+
4. dhurandhar nakula (APIs)
|
|
64
|
+
5. dhurandhar bheema (HLD)
|
|
65
|
+
6. dhurandhar arjuna (LLD)
|
|
66
|
+
7. dhurandhar bheema (Implementation)
|
|
67
|
+
8. dhurandhar draupadi (Blessing)
|
|
68
|
+
|
|
69
|
+
## Key Files
|
|
70
|
+
- SYSTEM_DESIGN_MAP.yaml - Main design document
|
|
71
|
+
- .dhurandhar-output/ - Generated artifacts
|
|
72
|
+
- .dhurandhar/config.json - Project config
|
|
73
|
+
|
|
74
|
+
## Commands
|
|
75
|
+
See .cursor/dhurandhar-commands.md for all commands.
|
|
76
|
+
`;
|
|
77
|
+
|
|
78
|
+
writeFileSync('.cursorrules', cursorrules, 'utf-8');
|
|
79
|
+
writeFileSync('.cursor/dhurandhar-commands.md', getCommandsMarkdown(), 'utf-8');
|
|
80
|
+
|
|
81
|
+
console.log(chalk.green('✓ Cursor integration complete!\n'));
|
|
82
|
+
console.log(chalk.gray(' Created:'));
|
|
83
|
+
console.log(chalk.gray(' - .cursorrules'));
|
|
84
|
+
console.log(chalk.gray(' - .cursor/dhurandhar-commands.md\n'));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Setup Claude integration
|
|
89
|
+
*/
|
|
90
|
+
function setupClaudeIntegration(projectName, projectType) {
|
|
91
|
+
console.log(chalk.cyan('\n🧠 Setting up Claude Code integration...\n'));
|
|
92
|
+
|
|
93
|
+
const claudeDir = '.claude';
|
|
94
|
+
if (!existsSync(claudeDir)) {
|
|
95
|
+
mkdirSync(claudeDir, { recursive: true });
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const context = `# Dhurandhar Project Context for Claude
|
|
99
|
+
|
|
100
|
+
Project: ${projectName}
|
|
101
|
+
Type: ${projectType}
|
|
102
|
+
Framework: Dhurandhar v2.1.x
|
|
103
|
+
|
|
104
|
+
Use Dhurandhar commands to guide system design.
|
|
105
|
+
See .claude/commands.md for available commands.
|
|
106
|
+
`;
|
|
107
|
+
|
|
108
|
+
writeFileSync('.claude/dhurandhar-context.md', context, 'utf-8');
|
|
109
|
+
writeFileSync('.claude/commands.md', getCommandsMarkdown(), 'utf-8');
|
|
110
|
+
|
|
111
|
+
console.log(chalk.green('✓ Claude integration complete!\n'));
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Setup GitHub Copilot integration
|
|
116
|
+
*/
|
|
117
|
+
function setupCopilotIntegration(projectName, projectType) {
|
|
118
|
+
console.log(chalk.cyan('\n🐙 Setting up GitHub Copilot integration...\n'));
|
|
119
|
+
|
|
120
|
+
const githubDir = '.github';
|
|
121
|
+
if (!existsSync(githubDir)) {
|
|
122
|
+
mkdirSync(githubDir, { recursive: true });
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const context = `# Dhurandhar Project
|
|
126
|
+
|
|
127
|
+
Project: ${projectName}
|
|
128
|
+
Type: ${projectType}
|
|
129
|
+
|
|
130
|
+
This project uses Dhurandhar framework for systematic design.
|
|
131
|
+
Run: dhurandhar status
|
|
132
|
+
`;
|
|
133
|
+
|
|
134
|
+
writeFileSync('.github/dhurandhar.md', context, 'utf-8');
|
|
135
|
+
|
|
136
|
+
console.log(chalk.green('✓ Copilot integration complete!\n'));
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Setup generic integration (for other AI assistants)
|
|
141
|
+
*/
|
|
142
|
+
function setupGenericIntegration(projectName, projectType) {
|
|
143
|
+
console.log(chalk.cyan('\n🤖 Setting up AI assistant integration...\n'));
|
|
144
|
+
|
|
145
|
+
const aiDir = '.ai';
|
|
146
|
+
if (!existsSync(aiDir)) {
|
|
147
|
+
mkdirSync(aiDir, { recursive: true });
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
writeFileSync('.ai/dhurandhar-context.md', getGenericContext(projectName, projectType), 'utf-8');
|
|
151
|
+
writeFileSync('.ai/commands.md', getCommandsMarkdown(), 'utf-8');
|
|
152
|
+
|
|
153
|
+
console.log(chalk.green('✓ AI assistant integration complete!\n'));
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Get commands markdown (shared across assistants)
|
|
158
|
+
*/
|
|
159
|
+
function getCommandsMarkdown() {
|
|
160
|
+
return `# Dhurandhar Commands
|
|
161
|
+
|
|
162
|
+
## Design Phases
|
|
163
|
+
\`\`\`bash
|
|
164
|
+
dhurandhar yudhishthira # Phase 1: Features
|
|
165
|
+
dhurandhar bhishma # Phase 2: Requirements
|
|
166
|
+
dhurandhar sahadeva # Phase 3: Entities
|
|
167
|
+
dhurandhar nakula # Phase 4: APIs
|
|
168
|
+
dhurandhar bheema # Phase 5: HLD & Implementation
|
|
169
|
+
dhurandhar arjuna # Phase 6: LLD
|
|
170
|
+
dhurandhar draupadi # Phase 8: Blessing
|
|
171
|
+
\`\`\`
|
|
172
|
+
|
|
173
|
+
## Utilities
|
|
174
|
+
\`\`\`bash
|
|
175
|
+
dhurandhar status # Check progress
|
|
176
|
+
dhurandhar codegen -t all # Generate code
|
|
177
|
+
dhurandhar audit # Run audit
|
|
178
|
+
dhurandhar export -f md # Export design
|
|
179
|
+
\`\`\`
|
|
180
|
+
`;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Get generic context
|
|
185
|
+
*/
|
|
186
|
+
function getGenericContext(projectName, projectType) {
|
|
187
|
+
return `# ${projectName}
|
|
188
|
+
|
|
189
|
+
Type: ${projectType}
|
|
190
|
+
Framework: Dhurandhar v2.1.x
|
|
191
|
+
|
|
192
|
+
Execute design phases:
|
|
193
|
+
1. dhurandhar yudhishthira
|
|
194
|
+
2. dhurandhar bhishma
|
|
195
|
+
3. dhurandhar sahadeva
|
|
196
|
+
4. dhurandhar nakula
|
|
197
|
+
5. dhurandhar bheema
|
|
198
|
+
6. dhurandhar arjuna
|
|
199
|
+
7. dhurandhar draupadi
|
|
200
|
+
|
|
201
|
+
Check status: dhurandhar status
|
|
202
|
+
`;
|
|
203
|
+
}
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auggie (Augment Code) Integration
|
|
3
|
+
*
|
|
4
|
+
* Creates commands and context for Auggie chat window
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { writeFileSync, mkdirSync, existsSync } from 'fs';
|
|
8
|
+
import { join } from 'path';
|
|
9
|
+
import chalk from 'chalk';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Setup Auggie integration for project
|
|
13
|
+
*/
|
|
14
|
+
export function setupAuggieIntegration(projectName, projectType) {
|
|
15
|
+
console.log(chalk.cyan('\n🤖 Setting up Auggie integration...\n'));
|
|
16
|
+
|
|
17
|
+
// Create .augment directory
|
|
18
|
+
const augmentDir = '.augment';
|
|
19
|
+
if (!existsSync(augmentDir)) {
|
|
20
|
+
mkdirSync(augmentDir, { recursive: true });
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Create context file for Auggie
|
|
24
|
+
createAuggieContext(projectName, projectType);
|
|
25
|
+
|
|
26
|
+
// Create commands file
|
|
27
|
+
createAuggieCommands();
|
|
28
|
+
|
|
29
|
+
// Create project instructions
|
|
30
|
+
createProjectInstructions(projectName, projectType);
|
|
31
|
+
|
|
32
|
+
console.log(chalk.green('✓ Auggie integration complete!\n'));
|
|
33
|
+
console.log(chalk.gray(' Created:'));
|
|
34
|
+
console.log(chalk.gray(' - .augment/dhurandhar-context.md'));
|
|
35
|
+
console.log(chalk.gray(' - .augment/commands.md'));
|
|
36
|
+
console.log(chalk.gray(' - .augment/project-instructions.md\n'));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Create Auggie context file
|
|
41
|
+
*/
|
|
42
|
+
function createAuggieContext(projectName, projectType) {
|
|
43
|
+
const context = `# Dhurandhar Project Context
|
|
44
|
+
|
|
45
|
+
## Project Information
|
|
46
|
+
- **Name**: ${projectName}
|
|
47
|
+
- **Type**: ${projectType}
|
|
48
|
+
- **Framework**: Dhurandhar v2.1.x
|
|
49
|
+
- **Design Approach**: Dharma-centric, 8-phase system design
|
|
50
|
+
|
|
51
|
+
## What is Dhurandhar?
|
|
52
|
+
Dhurandhar is an AI-powered dharma-centric design framework with:
|
|
53
|
+
- 8 Pandava Master Agents (Yudhishthira, Bhishma, Sahadeva, Nakula, Bheema, Arjuna, Draupadi)
|
|
54
|
+
- 21 Sub-Agents for expert guidance
|
|
55
|
+
- Full-stack code generation
|
|
56
|
+
- Enterprise integrations (GitHub, Jira, Confluence)
|
|
57
|
+
|
|
58
|
+
## Design Phases
|
|
59
|
+
1. **Phase 1 (Yudhishthira)**: Features - Define what to build
|
|
60
|
+
2. **Phase 2 (Bhishma)**: Requirements - Functional & non-functional requirements
|
|
61
|
+
3. **Phase 3 (Sahadeva)**: Entities - Domain model, data structures
|
|
62
|
+
4. **Phase 4 (Nakula)**: APIs - REST API design
|
|
63
|
+
5. **Phase 5 (Bheema)**: HLD - High-level architecture
|
|
64
|
+
6. **Phase 6 (Arjuna)**: LLD - Low-level design, classes
|
|
65
|
+
7. **Phase 7 (Bheema)**: Implementation - Deployment strategy
|
|
66
|
+
8. **Phase 8 (Draupadi)**: Blessing - Quality gate & approval
|
|
67
|
+
|
|
68
|
+
## Current Status
|
|
69
|
+
- Project initialized
|
|
70
|
+
- Ready to start Phase 1 (Features)
|
|
71
|
+
|
|
72
|
+
## Available Commands
|
|
73
|
+
See \`.augment/commands.md\` for all Dhurandhar commands.
|
|
74
|
+
|
|
75
|
+
## How to Use with Auggie
|
|
76
|
+
1. Ask Auggie to help with design decisions
|
|
77
|
+
2. Use Dhurandhar commands to execute phases
|
|
78
|
+
3. Review outputs in \`.dhurandhar-output/\`
|
|
79
|
+
4. Generate code with \`dhurandhar codegen\`
|
|
80
|
+
|
|
81
|
+
## Key Files
|
|
82
|
+
- \`.dhurandhar/config.json\` - Project configuration
|
|
83
|
+
- \`SYSTEM_DESIGN_MAP.yaml\` - Main design document
|
|
84
|
+
- \`.dhurandhar-output/\` - Generated outputs
|
|
85
|
+
`;
|
|
86
|
+
|
|
87
|
+
writeFileSync('.augment/dhurandhar-context.md', context, 'utf-8');
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Create Auggie commands file
|
|
92
|
+
*/
|
|
93
|
+
function createAuggieCommands() {
|
|
94
|
+
const commands = `# Dhurandhar Commands for Auggie
|
|
95
|
+
|
|
96
|
+
## Quick Commands
|
|
97
|
+
|
|
98
|
+
### Check Status
|
|
99
|
+
\`\`\`bash
|
|
100
|
+
dhurandhar status
|
|
101
|
+
\`\`\`
|
|
102
|
+
|
|
103
|
+
### Design Phases
|
|
104
|
+
\`\`\`bash
|
|
105
|
+
# Phase 1: Features
|
|
106
|
+
dhurandhar yudhishthira
|
|
107
|
+
|
|
108
|
+
# Phase 2: Requirements
|
|
109
|
+
dhurandhar bhishma
|
|
110
|
+
|
|
111
|
+
# Phase 3: Entities
|
|
112
|
+
dhurandhar sahadeva
|
|
113
|
+
|
|
114
|
+
# Phase 4: APIs
|
|
115
|
+
dhurandhar nakula
|
|
116
|
+
|
|
117
|
+
# Phase 5: HLD
|
|
118
|
+
dhurandhar bheema
|
|
119
|
+
|
|
120
|
+
# Phase 6: LLD
|
|
121
|
+
dhurandhar arjuna
|
|
122
|
+
|
|
123
|
+
# Phase 7: Implementation
|
|
124
|
+
# (uses bheema command)
|
|
125
|
+
dhurandhar bheema
|
|
126
|
+
|
|
127
|
+
# Phase 8: Blessing
|
|
128
|
+
dhurandhar draupadi
|
|
129
|
+
\`\`\`
|
|
130
|
+
|
|
131
|
+
### Code Generation
|
|
132
|
+
\`\`\`bash
|
|
133
|
+
# Generate all code
|
|
134
|
+
dhurandhar codegen -t all
|
|
135
|
+
|
|
136
|
+
# Generate specific
|
|
137
|
+
dhurandhar codegen -t backend
|
|
138
|
+
dhurandhar codegen -t frontend
|
|
139
|
+
dhurandhar codegen -t tests
|
|
140
|
+
dhurandhar codegen -t infrastructure
|
|
141
|
+
\`\`\`
|
|
142
|
+
|
|
143
|
+
### Integrations
|
|
144
|
+
\`\`\`bash
|
|
145
|
+
# Create GitHub issues
|
|
146
|
+
dhurandhar integrate -p github
|
|
147
|
+
|
|
148
|
+
# Create Jira tickets
|
|
149
|
+
dhurandhar integrate -p jira
|
|
150
|
+
|
|
151
|
+
# Create Confluence docs
|
|
152
|
+
dhurandhar integrate -p confluence
|
|
153
|
+
\`\`\`
|
|
154
|
+
|
|
155
|
+
### AI Features
|
|
156
|
+
\`\`\`bash
|
|
157
|
+
# Get AI suggestions
|
|
158
|
+
dhurandhar ai suggest
|
|
159
|
+
|
|
160
|
+
# Analyze design
|
|
161
|
+
dhurandhar ai analyze
|
|
162
|
+
\`\`\`
|
|
163
|
+
|
|
164
|
+
### Export & Review
|
|
165
|
+
\`\`\`bash
|
|
166
|
+
# Export design
|
|
167
|
+
dhurandhar export -f markdown
|
|
168
|
+
|
|
169
|
+
# Run audit
|
|
170
|
+
dhurandhar audit
|
|
171
|
+
\`\`\`
|
|
172
|
+
|
|
173
|
+
## Auggie Integration Tips
|
|
174
|
+
|
|
175
|
+
1. **Ask Auggie for help**: "Help me design user authentication feature"
|
|
176
|
+
2. **Run Dhurandhar command**: \`dhurandhar yudhishthira\`
|
|
177
|
+
3. **Review with Auggie**: "Review the features I just designed"
|
|
178
|
+
4. **Iterate**: Continue through all 8 phases
|
|
179
|
+
5. **Generate code**: \`dhurandhar codegen -t all\`
|
|
180
|
+
|
|
181
|
+
## Context Files
|
|
182
|
+
- This file: \`.augment/commands.md\`
|
|
183
|
+
- Context: \`.augment/dhurandhar-context.md\`
|
|
184
|
+
- Instructions: \`.augment/project-instructions.md\`
|
|
185
|
+
`;
|
|
186
|
+
|
|
187
|
+
writeFileSync('.augment/commands.md', commands, 'utf-8');
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Create project instructions for Auggie
|
|
192
|
+
*/
|
|
193
|
+
function createProjectInstructions(projectName, projectType) {
|
|
194
|
+
const instructions = `# Project Instructions for Auggie
|
|
195
|
+
|
|
196
|
+
## Project: ${projectName}
|
|
197
|
+
## Type: ${projectType}
|
|
198
|
+
|
|
199
|
+
## Your Role
|
|
200
|
+
You are helping design and implement this project using the Dhurandhar framework.
|
|
201
|
+
|
|
202
|
+
## Design Process
|
|
203
|
+
1. **Phase 1-8**: Work through each Dhurandhar phase systematically
|
|
204
|
+
2. **Collaborate**: Help the user make design decisions
|
|
205
|
+
3. **Review**: Review outputs after each phase
|
|
206
|
+
4. **Iterate**: Suggest improvements based on dharmic principles
|
|
207
|
+
5. **Generate**: Help generate production-ready code
|
|
208
|
+
|
|
209
|
+
## Dharmic Principles
|
|
210
|
+
Every design decision should consider:
|
|
211
|
+
- **Satya** (Truth): Is it honest and transparent?
|
|
212
|
+
- **Ahimsa** (Non-harm): Does it avoid harm to users/stakeholders?
|
|
213
|
+
- **Artha** (Value): Does it provide real value?
|
|
214
|
+
- **Karma** (Action): Does it have clear purpose and results?
|
|
215
|
+
- **Moksha** (Liberation): Does it free users from problems?
|
|
216
|
+
|
|
217
|
+
## When User Asks for Help
|
|
218
|
+
1. Understand the context from \`.augment/dhurandhar-context.md\`
|
|
219
|
+
2. Check current phase in \`.dhurandhar/config.json\`
|
|
220
|
+
3. Review existing design in \`SYSTEM_DESIGN_MAP.yaml\`
|
|
221
|
+
4. Provide guidance aligned with current phase
|
|
222
|
+
5. Suggest Dhurandhar commands to execute
|
|
223
|
+
|
|
224
|
+
## Code Generation
|
|
225
|
+
After completing all design phases:
|
|
226
|
+
\`\`\`bash
|
|
227
|
+
dhurandhar codegen -t all
|
|
228
|
+
\`\`\`
|
|
229
|
+
|
|
230
|
+
This generates:
|
|
231
|
+
- Backend (NestJS + TypeORM)
|
|
232
|
+
- Frontend (React + Vite + Tailwind)
|
|
233
|
+
- Tests (Jest)
|
|
234
|
+
- Infrastructure (Docker + Kubernetes)
|
|
235
|
+
|
|
236
|
+
## Best Practices
|
|
237
|
+
- Review SYSTEM_DESIGN_MAP.yaml frequently
|
|
238
|
+
- Use \`dhurandhar status\` to check progress
|
|
239
|
+
- Run \`dhurandhar audit\` before code generation
|
|
240
|
+
- Check \`.dhurandhar-output/\` for generated artifacts
|
|
241
|
+
|
|
242
|
+
## Integration
|
|
243
|
+
- This project uses Dhurandhar with Auggie
|
|
244
|
+
- Commands are available in \`.augment/commands.md\`
|
|
245
|
+
- Context is in \`.augment/dhurandhar-context.md\`
|
|
246
|
+
`;
|
|
247
|
+
|
|
248
|
+
writeFileSync('.augment/project-instructions.md', instructions, 'utf-8');
|
|
249
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "dhurandhar",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.2.1",
|
|
5
5
|
"description": "The world's first AI-powered dharma-centric design framework. 8 Pandava agents + 21 sub-agents guide you from idea to production code. Features → Requirements → Entities → API → HLD → LLD → Implementation → Blessing. Complete with code generation, enterprise integrations, and mythological accuracy.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"system-design",
|