@pjmendonca/devflow 1.10.1 → 1.11.0
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/.claude/commands/adversarial.md +1 -1
- package/.claude/commands/agent.md +1 -1
- package/.claude/commands/bugfix.md +1 -1
- package/.claude/commands/checkpoint.md +1 -1
- package/.claude/commands/collab.md +1 -1
- package/.claude/commands/costs.md +1 -1
- package/.claude/commands/develop.md +1 -1
- package/.claude/commands/handoff.md +1 -1
- package/.claude/commands/memory.md +1 -1
- package/.claude/commands/pair.md +1 -1
- package/.claude/commands/review.md +1 -1
- package/.claude/commands/route.md +1 -1
- package/.claude/commands/story.md +1 -1
- package/.claude/commands/swarm.md +1 -1
- package/CHANGELOG.md +30 -0
- package/README.md +1 -15
- package/bin/devflow-install.js +165 -0
- package/bin/devflow.js +84 -0
- package/package.json +3 -1
- package/tooling/scripts/lib/__init__.py +1 -1
|
@@ -5,6 +5,6 @@ allowed-tools: Bash, Read, Glob, Grep
|
|
|
5
5
|
|
|
6
6
|
Run the Devflow adversarial review for story: $ARGUMENTS
|
|
7
7
|
|
|
8
|
-
Execute: `devflow adversarial $ARGUMENTS`
|
|
8
|
+
Execute: `npx @pjmendonca/devflow adversarial $ARGUMENTS`
|
|
9
9
|
|
|
10
10
|
This performs a critical, thorough review using the Opus model.
|
|
@@ -5,7 +5,7 @@ argument-hint: [save|restore|list] [checkpoint-name]
|
|
|
5
5
|
|
|
6
6
|
Manage Devflow context checkpoints: $ARGUMENTS
|
|
7
7
|
|
|
8
|
-
Execute: `devflow checkpoint $ARGUMENTS`
|
|
8
|
+
Execute: `npx @pjmendonca/devflow checkpoint $ARGUMENTS`
|
|
9
9
|
|
|
10
10
|
This manages context preservation checkpoints:
|
|
11
11
|
- Save current context state before risky operations
|
|
@@ -5,7 +5,7 @@ argument-hint: [--period day|week|month]
|
|
|
5
5
|
|
|
6
6
|
View Devflow cost dashboard: $ARGUMENTS
|
|
7
7
|
|
|
8
|
-
Execute: `devflow costs $ARGUMENTS`
|
|
8
|
+
Execute: `npx @pjmendonca/devflow costs $ARGUMENTS`
|
|
9
9
|
|
|
10
10
|
This displays cost tracking and analytics:
|
|
11
11
|
- Total spend by model (Opus, Sonnet, Haiku)
|
|
@@ -5,7 +5,7 @@ argument-hint: <story-key> [--from AGENT] [--to AGENT]
|
|
|
5
5
|
|
|
6
6
|
View agent handoff summaries: $ARGUMENTS
|
|
7
7
|
|
|
8
|
-
Execute: `devflow handoff $ARGUMENTS`
|
|
8
|
+
Execute: `npx @pjmendonca/devflow handoff $ARGUMENTS`
|
|
9
9
|
|
|
10
10
|
This shows structured handoff information between agents:
|
|
11
11
|
- What was completed in the previous phase
|
|
@@ -5,7 +5,7 @@ argument-hint: <story-key> [--query "question"]
|
|
|
5
5
|
|
|
6
6
|
View shared memory for: $ARGUMENTS
|
|
7
7
|
|
|
8
|
-
Execute: `devflow memory $ARGUMENTS`
|
|
8
|
+
Execute: `npx @pjmendonca/devflow memory $ARGUMENTS`
|
|
9
9
|
|
|
10
10
|
This displays the shared memory and knowledge graph for a story:
|
|
11
11
|
- Cross-agent shared memory pool
|
package/.claude/commands/pair.md
CHANGED
|
@@ -5,7 +5,7 @@ argument-hint: <story-key>
|
|
|
5
5
|
|
|
6
6
|
Run Devflow pair programming for: $ARGUMENTS
|
|
7
7
|
|
|
8
|
-
Execute: `devflow pair $ARGUMENTS`
|
|
8
|
+
Execute: `npx @pjmendonca/devflow pair $ARGUMENTS`
|
|
9
9
|
|
|
10
10
|
This runs DEV and REVIEWER in an interleaved pair programming mode:
|
|
11
11
|
- DEV implements code in small, reviewable chunks
|
|
@@ -5,7 +5,7 @@ argument-hint: <task-description>
|
|
|
5
5
|
|
|
6
6
|
Auto-route task to optimal agents: $ARGUMENTS
|
|
7
7
|
|
|
8
|
-
Execute: `devflow route $ARGUMENTS`
|
|
8
|
+
Execute: `npx @pjmendonca/devflow route $ARGUMENTS`
|
|
9
9
|
|
|
10
10
|
This intelligently selects the best agents based on task analysis:
|
|
11
11
|
- Analyzes task description for keywords and patterns
|
|
@@ -5,7 +5,7 @@ argument-hint: <story-key> [--agents AGENT1,AGENT2,...]
|
|
|
5
5
|
|
|
6
6
|
Run Devflow swarm mode for: $ARGUMENTS
|
|
7
7
|
|
|
8
|
-
Execute: `devflow swarm $ARGUMENTS`
|
|
8
|
+
Execute: `npx @pjmendonca/devflow swarm $ARGUMENTS`
|
|
9
9
|
|
|
10
10
|
This runs multi-agent collaboration where agents debate and iterate until consensus:
|
|
11
11
|
- Multiple agents analyze the task simultaneously
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,36 @@ All notable changes to this project 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
|
+
## [1.11.0] - 2025-12-24
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **BMAD-Style Installation** - Seamless Claude Code ecosystem integration
|
|
12
|
+
- New `devflow install` command copies .claude/ and tooling/ into any project
|
|
13
|
+
- Claude Code automatically detects slash commands in .claude/commands/ directory
|
|
14
|
+
- Usage: `npx @pjmendonca/devflow install` integrates into existing projects
|
|
15
|
+
- Commands execute via npx - no global installation required
|
|
16
|
+
- Updated all .claude/commands/*.md files to use `npx @pjmendonca/devflow`
|
|
17
|
+
- Added devflow-install.js for installation logic
|
|
18
|
+
- Updated README with BMAD-style installation as recommended option
|
|
19
|
+
- Supports skipping setup wizard with --skip-setup flag
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
- **Installation Flow** - Updated recommended installation method to BMAD-style
|
|
23
|
+
- Option 1 (Recommended): `npx @pjmendonca/devflow install` for existing projects
|
|
24
|
+
- Option 2: `npm create @pjmendonca/devflow` for standalone Devflow directory
|
|
25
|
+
- Option 3: `npm install -g @pjmendonca/devflow` for global installation
|
|
26
|
+
- **Command Execution** - All Claude Code slash commands now use npx for better portability
|
|
27
|
+
|
|
28
|
+
## [1.10.2] - 2025-12-24
|
|
29
|
+
|
|
30
|
+
### Fixed
|
|
31
|
+
- **npx Command** - Fixed "could not determine executable to run" error when running `npx @pjmendonca/devflow`
|
|
32
|
+
- Added main `devflow` bin entry to package.json
|
|
33
|
+
- Created bin/devflow.js as smart entry point with context detection
|
|
34
|
+
- Outside Devflow project: automatically scaffolds new project
|
|
35
|
+
- Inside Devflow project: shows help and dispatches to commands
|
|
36
|
+
- Simplified workflow: single command for both setup and usage
|
|
37
|
+
|
|
8
38
|
## [1.10.1] - 2025-12-24
|
|
9
39
|
|
|
10
40
|
### Fixed
|
package/README.md
CHANGED
|
@@ -62,20 +62,6 @@ cd Devflow
|
|
|
62
62
|
/story <key>
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
**Requirements:** Python 3.9+ and Node.js 14+
|
|
66
|
-
|
|
67
|
-
**Option 2: Add to Existing Project**
|
|
68
|
-
|
|
69
|
-
Install Devflow into your current project:
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
# Local installation
|
|
73
|
-
npm install @pjmendonca/devflow
|
|
74
|
-
|
|
75
|
-
# IMPORTANT: Local installs require npx to run commands
|
|
76
|
-
npx devflow-validate
|
|
77
|
-
npx devflow-init
|
|
78
|
-
```
|
|
79
65
|
|
|
80
66
|
### Agent Personas
|
|
81
67
|
|
|
@@ -532,7 +518,7 @@ Free to use in commercial and personal projects.
|
|
|
532
518
|
|
|
533
519
|
|
|
534
520
|
<!-- VERSION_START - Auto-updated by update_version.py -->
|
|
535
|
-
**Version**: 1.10.
|
|
521
|
+
**Version**: 1.10.2
|
|
536
522
|
**Status**: Production Ready
|
|
537
523
|
**Last Updated**: 2025-12-24
|
|
538
524
|
<!-- VERSION_END -->
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* devflow-install - Install Devflow into the current project
|
|
5
|
+
*
|
|
6
|
+
* Copies .claude/ and tooling/ directories into the user's project
|
|
7
|
+
* This enables Claude Code to automatically detect slash commands
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
const fs = require('fs');
|
|
11
|
+
const path = require('path');
|
|
12
|
+
const { execSync } = require('child_process');
|
|
13
|
+
|
|
14
|
+
const targetDir = process.cwd();
|
|
15
|
+
const sourceDir = path.join(__dirname, '..');
|
|
16
|
+
|
|
17
|
+
console.log('\n========================================');
|
|
18
|
+
console.log(' Devflow Installer');
|
|
19
|
+
console.log('========================================\n');
|
|
20
|
+
|
|
21
|
+
// Check if we're already in a Devflow directory
|
|
22
|
+
const isAlreadyDevflow = fs.existsSync(path.join(targetDir, '.claude', 'commands', 'story.md'));
|
|
23
|
+
if (isAlreadyDevflow) {
|
|
24
|
+
console.log('[INFO] Devflow is already installed in this directory.');
|
|
25
|
+
console.log('[INFO] Running validation instead...\n');
|
|
26
|
+
try {
|
|
27
|
+
const validateScript = path.join(__dirname, 'devflow-validate.js');
|
|
28
|
+
execSync(`node "${validateScript}"`, { stdio: 'inherit' });
|
|
29
|
+
} catch (error) {
|
|
30
|
+
process.exit(1);
|
|
31
|
+
}
|
|
32
|
+
process.exit(0);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Recursively copy directory
|
|
37
|
+
*/
|
|
38
|
+
function copyDir(src, dest, options = {}) {
|
|
39
|
+
const { exclude = [] } = options;
|
|
40
|
+
|
|
41
|
+
// Create destination directory
|
|
42
|
+
fs.mkdirSync(dest, { recursive: true });
|
|
43
|
+
|
|
44
|
+
// Read source directory
|
|
45
|
+
const entries = fs.readdirSync(src, { withFileTypes: true });
|
|
46
|
+
|
|
47
|
+
for (const entry of entries) {
|
|
48
|
+
const srcPath = path.join(src, entry.name);
|
|
49
|
+
const destPath = path.join(dest, entry.name);
|
|
50
|
+
|
|
51
|
+
// Skip excluded files/directories
|
|
52
|
+
if (exclude.some(pattern => entry.name.match(pattern))) {
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (entry.isDirectory()) {
|
|
57
|
+
copyDir(srcPath, destPath, options);
|
|
58
|
+
} else {
|
|
59
|
+
fs.copyFileSync(srcPath, destPath);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Directories to copy
|
|
65
|
+
const itemsToCopy = [
|
|
66
|
+
{
|
|
67
|
+
type: 'dir',
|
|
68
|
+
name: '.claude',
|
|
69
|
+
desc: 'Claude Code commands and skills',
|
|
70
|
+
exclude: []
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
type: 'dir',
|
|
74
|
+
name: 'tooling',
|
|
75
|
+
desc: 'Automation scripts and agents',
|
|
76
|
+
exclude: [/^\.automation\/logs/, /^\.automation\/costs/, /^\.automation\/checkpoints/]
|
|
77
|
+
}
|
|
78
|
+
];
|
|
79
|
+
|
|
80
|
+
console.log('Installing Devflow into:', targetDir);
|
|
81
|
+
console.log('\nCopying essential files...\n');
|
|
82
|
+
|
|
83
|
+
for (const item of itemsToCopy) {
|
|
84
|
+
const src = path.join(sourceDir, item.name);
|
|
85
|
+
const dest = path.join(targetDir, item.name);
|
|
86
|
+
|
|
87
|
+
if (!fs.existsSync(src)) {
|
|
88
|
+
console.log(` [SKIP] ${item.name}/ (not found in package)`);
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
try {
|
|
93
|
+
console.log(` [COPY] ${item.name}/ - ${item.desc}`);
|
|
94
|
+
copyDir(src, dest, { exclude: item.exclude });
|
|
95
|
+
} catch (error) {
|
|
96
|
+
console.error(` [ERROR] Failed to copy ${item.name}: ${error.message}`);
|
|
97
|
+
process.exit(1);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Copy essential config files if they don't exist
|
|
102
|
+
const configFiles = [
|
|
103
|
+
{ src: 'CLAUDE.md', desc: 'Project instructions for Claude' },
|
|
104
|
+
{ src: '.gitignore', desc: 'Git ignore patterns' }
|
|
105
|
+
];
|
|
106
|
+
|
|
107
|
+
console.log('\nCopying configuration files...\n');
|
|
108
|
+
for (const file of configFiles) {
|
|
109
|
+
const src = path.join(sourceDir, file.src);
|
|
110
|
+
const dest = path.join(targetDir, file.src);
|
|
111
|
+
|
|
112
|
+
if (!fs.existsSync(src)) {
|
|
113
|
+
console.log(` [SKIP] ${file.src} (not found)`);
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (fs.existsSync(dest)) {
|
|
118
|
+
console.log(` [SKIP] ${file.src} (already exists)`);
|
|
119
|
+
continue;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
try {
|
|
123
|
+
console.log(` [COPY] ${file.src} - ${file.desc}`);
|
|
124
|
+
fs.copyFileSync(src, dest);
|
|
125
|
+
} catch (error) {
|
|
126
|
+
console.error(` [ERROR] Failed to copy ${file.src}: ${error.message}`);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
console.log('\n[OK] Installation complete!\n');
|
|
131
|
+
|
|
132
|
+
// Check if user wants to run the setup wizard
|
|
133
|
+
const args = process.argv.slice(2);
|
|
134
|
+
const skipSetup = args.includes('--skip-setup') || args.includes('-s');
|
|
135
|
+
|
|
136
|
+
if (!skipSetup) {
|
|
137
|
+
console.log('========================================');
|
|
138
|
+
console.log(' Running Setup Wizard');
|
|
139
|
+
console.log('========================================\n');
|
|
140
|
+
|
|
141
|
+
try {
|
|
142
|
+
const initScript = path.join(__dirname, 'devflow-init.js');
|
|
143
|
+
console.log('Starting interactive setup wizard...\n');
|
|
144
|
+
execSync(`node "${initScript}"`, { stdio: 'inherit', cwd: targetDir });
|
|
145
|
+
} catch (error) {
|
|
146
|
+
console.log('\n[WARNING] Setup wizard encountered an issue.');
|
|
147
|
+
console.log('You can run it manually later with: npx @pjmendonca/devflow init\n');
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
console.log('\n========================================');
|
|
152
|
+
console.log(' Installation Complete!');
|
|
153
|
+
console.log('========================================\n');
|
|
154
|
+
console.log('Devflow is now integrated with your project.\n');
|
|
155
|
+
console.log('Next steps:');
|
|
156
|
+
console.log(' 1. Open Claude Code in this directory');
|
|
157
|
+
console.log(' 2. Use slash commands like /story <key>');
|
|
158
|
+
console.log(' 3. Or run directly: npx @pjmendonca/devflow story <key>\n');
|
|
159
|
+
console.log('Available commands:');
|
|
160
|
+
console.log(' /story <key> - Full development pipeline');
|
|
161
|
+
console.log(' /swarm <key> - Multi-agent collaboration');
|
|
162
|
+
console.log(' /pair <key> - Pair programming mode');
|
|
163
|
+
console.log(' /costs - View cost dashboard');
|
|
164
|
+
console.log(' /memory <key> - Query shared memory\n');
|
|
165
|
+
console.log('Documentation: https://github.com/Pedro-Jose-da-Rocha-Mendonca/Devflow\n');
|
package/bin/devflow.js
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const { spawn } = require('child_process');
|
|
6
|
+
|
|
7
|
+
const commands = {
|
|
8
|
+
'install': 'Install Devflow into your project',
|
|
9
|
+
'init': 'Initialize Devflow configuration',
|
|
10
|
+
'story': 'Run full story pipeline (context + dev + review)',
|
|
11
|
+
'collab': 'Run collaborative story with mode selection',
|
|
12
|
+
'checkpoint': 'Create or restore context checkpoints',
|
|
13
|
+
'memory': 'View or query shared agent memory',
|
|
14
|
+
'cost': 'View cost dashboard and spending analytics',
|
|
15
|
+
'validate': 'Validate project configuration',
|
|
16
|
+
'create-persona': 'Create a new agent persona',
|
|
17
|
+
'personalize': 'Personalize agent behavior with guided wizard',
|
|
18
|
+
'validate-overrides': 'Validate override configurations',
|
|
19
|
+
'new-doc': 'Create new documentation',
|
|
20
|
+
'tech-debt': 'Analyze and track technical debt',
|
|
21
|
+
'setup-checkpoint': 'Setup checkpoint system',
|
|
22
|
+
'version': 'Show version information'
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Check if we're in a Devflow project
|
|
27
|
+
*/
|
|
28
|
+
function isInDevflowProject() {
|
|
29
|
+
const indicators = [
|
|
30
|
+
'tooling/.automation',
|
|
31
|
+
'tooling/scripts',
|
|
32
|
+
'.claude'
|
|
33
|
+
];
|
|
34
|
+
|
|
35
|
+
return indicators.some(indicator => fs.existsSync(path.join(process.cwd(), indicator)));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Show help message
|
|
40
|
+
*/
|
|
41
|
+
function showHelp() {
|
|
42
|
+
console.log('Devflow - Development workflow automation with Claude Code\n');
|
|
43
|
+
console.log('Usage: devflow <command> [options]\n');
|
|
44
|
+
console.log('Available commands:\n');
|
|
45
|
+
|
|
46
|
+
Object.entries(commands).forEach(([cmd, desc]) => {
|
|
47
|
+
console.log(` ${cmd.padEnd(20)} ${desc}`);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
console.log('\nRun "devflow <command> --help" for more information on a command.');
|
|
51
|
+
console.log('\nGet started: devflow init');
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const args = process.argv.slice(2);
|
|
55
|
+
|
|
56
|
+
// If no arguments or --help, check if we're in a project
|
|
57
|
+
if (args.length === 0 || args[0] === '--help' || args[0] === '-h') {
|
|
58
|
+
if (!isInDevflowProject()) {
|
|
59
|
+
// Not in a project - suggest install
|
|
60
|
+
console.log('No Devflow project detected.\n');
|
|
61
|
+
console.log('To install Devflow in this directory, run:');
|
|
62
|
+
console.log(' npx @pjmendonca/devflow install\n');
|
|
63
|
+
console.log('Or to create a new standalone Devflow project:');
|
|
64
|
+
console.log(' npm create @pjmendonca/devflow\n');
|
|
65
|
+
process.exit(1);
|
|
66
|
+
} else {
|
|
67
|
+
// In a project - show help
|
|
68
|
+
showHelp();
|
|
69
|
+
process.exit(0);
|
|
70
|
+
}
|
|
71
|
+
} else {
|
|
72
|
+
// Command provided
|
|
73
|
+
const command = args[0];
|
|
74
|
+
|
|
75
|
+
if (commands[command]) {
|
|
76
|
+
const binPath = require.resolve(`./devflow-${command}.js`);
|
|
77
|
+
const child = spawn('node', [binPath, ...args.slice(1)], { stdio: 'inherit' });
|
|
78
|
+
child.on('exit', (code) => process.exit(code || 0));
|
|
79
|
+
} else {
|
|
80
|
+
console.error(`Unknown command: ${command}`);
|
|
81
|
+
console.error('Run "devflow --help" to see available commands.');
|
|
82
|
+
process.exit(1);
|
|
83
|
+
}
|
|
84
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pjmendonca/devflow",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"description": "Development workflow automation with Claude Code - agent-based development system with cost tracking",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"devflow",
|
|
@@ -24,7 +24,9 @@
|
|
|
24
24
|
"name": "Pedro Jose da Rocha Mendonca"
|
|
25
25
|
},
|
|
26
26
|
"bin": {
|
|
27
|
+
"devflow": "bin/devflow.js",
|
|
27
28
|
"create-devflow": "bin/create-devflow.js",
|
|
29
|
+
"devflow-install": "bin/devflow-install.js",
|
|
28
30
|
"devflow-cost": "bin/devflow-cost.js",
|
|
29
31
|
"devflow-validate": "bin/devflow-validate.js",
|
|
30
32
|
"devflow-story": "bin/devflow-story.js",
|