@pjmendonca/devflow 1.10.2 → 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.
@@ -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,6 +5,6 @@ argument-hint: <agent-name>
5
5
 
6
6
  Invoke the Devflow agent: $ARGUMENTS
7
7
 
8
- Execute: `devflow agent $ARGUMENTS`
8
+ Execute: `npx @pjmendonca/devflow agent $ARGUMENTS`
9
9
 
10
10
  Available agents: architect, ba, dev, maintainer, pm, reviewer, sm
@@ -5,4 +5,4 @@ argument-hint: <bug-id>
5
5
 
6
6
  Run the Devflow bugfix automation for: $ARGUMENTS
7
7
 
8
- Execute: `devflow bugfix $ARGUMENTS`
8
+ Execute: `npx @pjmendonca/devflow bugfix $ARGUMENTS`
@@ -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: <story-key> [--swarm|--pair|--auto]
5
5
 
6
6
  Run Devflow collaboration for: $ARGUMENTS
7
7
 
8
- Execute: `devflow collab $ARGUMENTS`
8
+ Execute: `npx @pjmendonca/devflow collab $ARGUMENTS`
9
9
 
10
10
  This is the unified collaboration CLI with all modes:
11
11
 
@@ -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,4 +5,4 @@ argument-hint: <story-key>
5
5
 
6
6
  Run the Devflow development phase for story: $ARGUMENTS
7
7
 
8
- Execute: `devflow develop $ARGUMENTS`
8
+ Execute: `npx @pjmendonca/devflow develop $ARGUMENTS`
@@ -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
@@ -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,4 +5,4 @@ argument-hint: <story-key>
5
5
 
6
6
  Run the Devflow code review for story: $ARGUMENTS
7
7
 
8
- Execute: `devflow review $ARGUMENTS`
8
+ Execute: `npx @pjmendonca/devflow review $ARGUMENTS`
@@ -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,6 +5,6 @@ argument-hint: <story-key>
5
5
 
6
6
  Run the Devflow story automation for story: $ARGUMENTS
7
7
 
8
- Execute: `devflow story $ARGUMENTS`
8
+ Execute: `npx @pjmendonca/devflow story $ARGUMENTS`
9
9
 
10
10
  This runs the full pipeline: context creation, development, and review.
@@ -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,26 @@ 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
+
8
28
  ## [1.10.2] - 2025-12-24
9
29
 
10
30
  ### 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
 
@@ -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 CHANGED
@@ -5,7 +5,8 @@ const path = require('path');
5
5
  const { spawn } = require('child_process');
6
6
 
7
7
  const commands = {
8
- 'init': 'Initialize Devflow in your project',
8
+ 'install': 'Install Devflow into your project',
9
+ 'init': 'Initialize Devflow configuration',
9
10
  'story': 'Run full story pipeline (context + dev + review)',
10
11
  'collab': 'Run collaborative story with mode selection',
11
12
  'checkpoint': 'Create or restore context checkpoints',
@@ -55,11 +56,13 @@ const args = process.argv.slice(2);
55
56
  // If no arguments or --help, check if we're in a project
56
57
  if (args.length === 0 || args[0] === '--help' || args[0] === '-h') {
57
58
  if (!isInDevflowProject()) {
58
- // Not in a project - run scaffolder
59
- console.log('No Devflow project detected. Running project scaffolder...\n');
60
- const createScript = require.resolve('./create-devflow.js');
61
- const child = spawn('node', [createScript], { stdio: 'inherit' });
62
- child.on('exit', (code) => process.exit(code || 0));
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);
63
66
  } else {
64
67
  // In a project - show help
65
68
  showHelp();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pjmendonca/devflow",
3
- "version": "1.10.2",
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",
@@ -26,6 +26,7 @@
26
26
  "bin": {
27
27
  "devflow": "bin/devflow.js",
28
28
  "create-devflow": "bin/create-devflow.js",
29
+ "devflow-install": "bin/devflow-install.js",
29
30
  "devflow-cost": "bin/devflow-cost.js",
30
31
  "devflow-validate": "bin/devflow-validate.js",
31
32
  "devflow-story": "bin/devflow-story.js",
@@ -18,7 +18,7 @@ Usage:
18
18
  from lib.agent_router import AgentRouter
19
19
  """
20
20
 
21
- __version__ = "1.10.2"
21
+ __version__ = "1.11.0"
22
22
 
23
23
  # Lazy imports to avoid circular dependencies
24
24
  __all__ = [