@pjmendonca/devflow 1.10.2 → 1.11.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.
@@ -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,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.1] - 2025-12-24
9
+
10
+ ### Changed
11
+ - **Bin Scripts Refactoring** - Simplified and streamlined all installation and setup scripts
12
+ - Reduced code size by ~50% in devflow.js, devflow-install.js, and create-devflow.js
13
+ - Removed verbose logging and decorative message formatting
14
+ - Simplified installation flow to focus on core functionality
15
+ - Improved code maintainability and consistency across all bin scripts
16
+ - Same functionality with cleaner, more focused implementation
17
+
18
+ ## [1.11.0] - 2025-12-24
19
+
20
+ ### Added
21
+ - **Installation** - Seamless Claude Code ecosystem integration
22
+ - New `devflow install` command copies .claude/ and tooling/ into any project
23
+ - Claude Code automatically detects slash commands in .claude/commands/ directory
24
+ - Usage: `npx @pjmendonca/devflow install` integrates into existing projects
25
+ - Commands execute via npx - no global installation required
26
+ - Updated all .claude/commands/*.md files to use `npx @pjmendonca/devflow`
27
+ - Added devflow-install.js for installation logic
28
+ - Updated README with BMAD-style installation as recommended option
29
+ - Supports skipping setup wizard with --skip-setup flag
30
+
31
+ ### Changed
32
+ - **Installation Flow** - Updated recommended installation method to BMAD-style
33
+ - Option 1 (Recommended): `npx @pjmendonca/devflow install` for existing projects
34
+ - Option 2: `npm create @pjmendonca/devflow` for standalone Devflow directory
35
+ - Option 3: `npm install -g @pjmendonca/devflow` for global installation
36
+ - **Command Execution** - All Claude Code slash commands now use npx for better portability
37
+
8
38
  ## [1.10.2] - 2025-12-24
9
39
 
10
40
  ### Fixed
package/README.md CHANGED
@@ -44,10 +44,6 @@ A production-ready, portable workflow automation system that uses Claude Code CL
44
44
 
45
45
  ### Installation
46
46
 
47
- **Option 1: Quick Start**
48
-
49
- This creates a new "Devflow" directory with all necessary files:
50
-
51
47
  ```bash
52
48
  # Create a new Devflow project directory
53
49
  npx @pjmendonca/devflow@latest
@@ -62,20 +58,6 @@ cd Devflow
62
58
  /story <key>
63
59
  ```
64
60
 
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
61
 
80
62
  ### Agent Personas
81
63
 
@@ -532,7 +514,7 @@ Free to use in commercial and personal projects.
532
514
 
533
515
 
534
516
  <!-- VERSION_START - Auto-updated by update_version.py -->
535
- **Version**: 1.10.2
517
+ **Version**: 1.11.1
536
518
  **Status**: Production Ready
537
519
  **Last Updated**: 2025-12-24
538
520
  <!-- VERSION_END -->
@@ -1,44 +1,25 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- /**
4
- * create-devflow - NPM initializer for Devflow
5
- *
6
- * Creates a new "Devflow" directory with all necessary files
7
- * Usage: npm create @pjmendonca/devflow
8
- */
9
-
10
3
  const fs = require('fs');
11
4
  const path = require('path');
12
5
  const { execSync } = require('child_process');
13
6
 
14
- // Get the current working directory where the user ran the command
15
7
  const targetDir = path.join(process.cwd(), 'Devflow');
16
-
17
- // Get the source directory (where this package is installed)
18
8
  const sourceDir = path.join(__dirname, '..');
19
9
 
20
- console.log('\n========================================');
21
- console.log(' Devflow Project Initializer');
22
- console.log('========================================\n');
10
+ console.log('\nDevflow Project Initializer\n');
23
11
 
24
- // Check if Devflow directory already exists
25
12
  if (fs.existsSync(targetDir)) {
26
- console.error(`Error: Directory "Devflow" already exists in ${process.cwd()}`);
27
- console.error('Please remove it or run this command from a different location.\n');
13
+ console.error(`Error: "Devflow" directory already exists`);
14
+ console.error('Remove it or run from a different location.\n');
28
15
  process.exit(1);
29
16
  }
30
17
 
31
- console.log(`Creating Devflow directory at: ${targetDir}`);
18
+ console.log(`Creating: ${targetDir}\n`);
32
19
  fs.mkdirSync(targetDir, { recursive: true });
33
20
 
34
- /**
35
- * Recursively copy directory
36
- */
37
21
  function copyDir(src, dest) {
38
- // Create destination directory
39
22
  fs.mkdirSync(dest, { recursive: true });
40
-
41
- // Read source directory
42
23
  const entries = fs.readdirSync(src, { withFileTypes: true });
43
24
 
44
25
  for (const entry of entries) {
@@ -53,17 +34,7 @@ function copyDir(src, dest) {
53
34
  }
54
35
  }
55
36
 
56
- /**
57
- * Copy file
58
- */
59
- function copyFile(src, dest) {
60
- const destDir = path.dirname(dest);
61
- fs.mkdirSync(destDir, { recursive: true });
62
- fs.copyFileSync(src, dest);
63
- }
64
-
65
- // Files and directories to copy
66
- const itemsToCopy = [
37
+ const items = [
67
38
  { type: 'dir', name: 'tooling' },
68
39
  { type: 'dir', name: 'bin' },
69
40
  { type: 'dir', name: 'lib' },
@@ -75,67 +46,43 @@ const itemsToCopy = [
75
46
  { type: 'file', name: '.gitignore' }
76
47
  ];
77
48
 
78
- console.log('\nCopying project files...');
79
- for (const item of itemsToCopy) {
49
+ console.log('Copying files...');
50
+ for (const item of items) {
80
51
  const src = path.join(sourceDir, item.name);
81
52
  const dest = path.join(targetDir, item.name);
82
53
 
83
- if (!fs.existsSync(src)) {
84
- console.log(` Skipping ${item.name} (not found)`);
85
- continue;
86
- }
87
-
88
- try {
54
+ if (fs.existsSync(src)) {
55
+ console.log(` ${item.name}`);
89
56
  if (item.type === 'dir') {
90
- console.log(` Copying ${item.name}/ ...`);
91
57
  copyDir(src, dest);
92
58
  } else {
93
- console.log(` Copying ${item.name} ...`);
94
- copyFile(src, dest);
59
+ fs.mkdirSync(path.dirname(dest), { recursive: true });
60
+ fs.copyFileSync(src, dest);
95
61
  }
96
- } catch (error) {
97
- console.error(` Error copying ${item.name}: ${error.message}`);
98
62
  }
99
63
  }
100
64
 
101
- console.log('\n[OK] Files copied successfully!\n');
102
-
103
- // Initialize git repo if not already in one
104
- console.log('Initializing git repository...');
65
+ console.log('\nInitializing git...');
105
66
  try {
106
67
  process.chdir(targetDir);
107
68
  execSync('git init', { stdio: 'ignore' });
108
- console.log('[OK] Git repository initialized\n');
69
+ console.log('Done\n');
109
70
  } catch (error) {
110
- console.log('[INFO] Git not available or already initialized\n');
71
+ console.log('Skipped\n');
111
72
  }
112
73
 
113
- // Run the setup wizard
114
- console.log('========================================');
115
- console.log(' Running Setup Wizard');
116
- console.log('========================================\n');
117
-
74
+ console.log('Running setup wizard...\n');
118
75
  try {
119
76
  const initScript = path.join(targetDir, 'bin', 'devflow-init.js');
120
-
121
77
  if (fs.existsSync(initScript)) {
122
- console.log('Starting interactive setup wizard...\n');
123
78
  execSync(`node "${initScript}"`, { stdio: 'inherit' });
124
- } else {
125
- console.log('[WARNING] Setup wizard not found. You may need to run it manually:');
126
- console.log(' cd Devflow');
127
- console.log(' npx devflow-init\n');
128
79
  }
129
80
  } catch (error) {
130
- console.log('[WARNING] Setup wizard encountered an issue.');
131
- console.log('You can run it manually later with: npx devflow-init\n');
81
+ console.log('\nSetup wizard failed. Run manually: cd Devflow && npx devflow-init\n');
132
82
  }
133
83
 
134
- console.log('\n========================================');
135
- console.log(' Setup Complete!');
136
- console.log('========================================\n');
137
- console.log('Next steps:');
138
- console.log(' 1. cd Devflow');
139
- console.log(' 2. Review the README.md for usage instructions');
140
- console.log(' 3. Start using Devflow with: /story <key>\n');
84
+ console.log('\nProject created successfully!');
85
+ console.log('\nNext steps:');
86
+ console.log(' cd Devflow');
87
+ console.log(' Use /story <key> in Claude Code\n');
141
88
  console.log('Documentation: https://github.com/Pedro-Jose-da-Rocha-Mendonca/Devflow\n');
@@ -0,0 +1,83 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+ const { execSync } = require('child_process');
6
+
7
+ const targetDir = process.cwd();
8
+ const sourceDir = path.join(__dirname, '..');
9
+
10
+ console.log('\nDevflow Installer\n');
11
+
12
+ if (fs.existsSync(path.join(targetDir, '.claude', 'commands', 'story.md'))) {
13
+ console.log('Devflow is already installed. Running validation...\n');
14
+ try {
15
+ execSync(`node "${path.join(__dirname, 'devflow-validate.js')}"`, { stdio: 'inherit' });
16
+ } catch (error) {
17
+ process.exit(1);
18
+ }
19
+ process.exit(0);
20
+ }
21
+
22
+ function copyDir(src, dest, exclude = []) {
23
+ fs.mkdirSync(dest, { recursive: true });
24
+ const entries = fs.readdirSync(src, { withFileTypes: true });
25
+
26
+ for (const entry of entries) {
27
+ const srcPath = path.join(src, entry.name);
28
+ const destPath = path.join(dest, entry.name);
29
+
30
+ if (exclude.some(pattern => entry.name.match(pattern))) continue;
31
+
32
+ if (entry.isDirectory()) {
33
+ copyDir(srcPath, destPath, exclude);
34
+ } else {
35
+ fs.copyFileSync(srcPath, destPath);
36
+ }
37
+ }
38
+ }
39
+
40
+ const items = [
41
+ { name: '.claude', exclude: [] },
42
+ { name: 'tooling', exclude: [/^\.automation\/logs/, /^\.automation\/costs/, /^\.automation\/checkpoints/] }
43
+ ];
44
+
45
+ console.log(`Installing into: ${targetDir}\n`);
46
+
47
+ for (const item of items) {
48
+ const src = path.join(sourceDir, item.name);
49
+ const dest = path.join(targetDir, item.name);
50
+
51
+ if (fs.existsSync(src)) {
52
+ console.log(`Copying ${item.name}/`);
53
+ copyDir(src, dest, item.exclude);
54
+ }
55
+ }
56
+
57
+ const configs = ['CLAUDE.md', '.gitignore'];
58
+ for (const file of configs) {
59
+ const src = path.join(sourceDir, file);
60
+ const dest = path.join(targetDir, file);
61
+ if (fs.existsSync(src) && !fs.existsSync(dest)) {
62
+ console.log(`Copying ${file}`);
63
+ fs.copyFileSync(src, dest);
64
+ }
65
+ }
66
+
67
+ console.log('\nInstallation complete!\n');
68
+
69
+ const args = process.argv.slice(2);
70
+ if (!args.includes('--skip-setup') && !args.includes('-s')) {
71
+ console.log('Running setup wizard...\n');
72
+ try {
73
+ execSync(`node "${path.join(__dirname, 'devflow-init.js')}"`, { stdio: 'inherit', cwd: targetDir });
74
+ } catch (error) {
75
+ console.log('\nSetup wizard failed. Run manually: npx @pjmendonca/devflow init\n');
76
+ }
77
+ }
78
+
79
+ console.log('\nDevflow installed successfully!');
80
+ console.log('\nNext steps:');
81
+ console.log(' 1. Open Claude Code in this directory');
82
+ console.log(' 2. Use /story <key> or npx @pjmendonca/devflow story <key>');
83
+ console.log('\nDocumentation: https://github.com/Pedro-Jose-da-Rocha-Mendonca/Devflow\n');
package/bin/devflow.js CHANGED
@@ -1,11 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const fs = require('fs');
4
- const path = require('path');
5
3
  const { spawn } = require('child_process');
6
4
 
7
5
  const commands = {
8
- 'init': 'Initialize Devflow in your project',
6
+ 'install': 'Install Devflow into your project',
7
+ 'init': 'Initialize Devflow configuration',
9
8
  'story': 'Run full story pipeline (context + dev + review)',
10
9
  'collab': 'Run collaborative story with mode selection',
11
10
  'checkpoint': 'Create or restore context checkpoints',
@@ -21,22 +20,6 @@ const commands = {
21
20
  'version': 'Show version information'
22
21
  };
23
22
 
24
- /**
25
- * Check if we're in a Devflow project
26
- */
27
- function isInDevflowProject() {
28
- const indicators = [
29
- 'tooling/.automation',
30
- 'tooling/scripts',
31
- '.claude'
32
- ];
33
-
34
- return indicators.some(indicator => fs.existsSync(path.join(process.cwd(), indicator)));
35
- }
36
-
37
- /**
38
- * Show help message
39
- */
40
23
  function showHelp() {
41
24
  console.log('Devflow - Development workflow automation with Claude Code\n');
42
25
  console.log('Usage: devflow <command> [options]\n');
@@ -47,35 +30,26 @@ function showHelp() {
47
30
  });
48
31
 
49
32
  console.log('\nRun "devflow <command> --help" for more information on a command.');
50
- console.log('\nGet started: devflow init');
33
+ console.log('\nGet started:');
34
+ console.log(' devflow install Install into existing project');
35
+ console.log(' devflow init Initialize configuration');
51
36
  }
52
37
 
53
38
  const args = process.argv.slice(2);
54
39
 
55
- // If no arguments or --help, check if we're in a project
56
40
  if (args.length === 0 || args[0] === '--help' || args[0] === '-h') {
57
- 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));
63
- } else {
64
- // In a project - show help
65
- showHelp();
66
- process.exit(0);
67
- }
68
- } else {
69
- // Command provided
70
- const command = args[0];
41
+ showHelp();
42
+ process.exit(0);
43
+ }
44
+
45
+ const command = args[0];
71
46
 
72
- if (commands[command]) {
73
- const binPath = require.resolve(`./devflow-${command}.js`);
74
- const child = spawn('node', [binPath, ...args.slice(1)], { stdio: 'inherit' });
75
- child.on('exit', (code) => process.exit(code || 0));
76
- } else {
77
- console.error(`Unknown command: ${command}`);
78
- console.error('Run "devflow --help" to see available commands.');
79
- process.exit(1);
80
- }
47
+ if (commands[command]) {
48
+ const binPath = require.resolve(`./devflow-${command}.js`);
49
+ const child = spawn('node', [binPath, ...args.slice(1)], { stdio: 'inherit' });
50
+ child.on('exit', (code) => process.exit(code || 0));
51
+ } else {
52
+ console.error(`Unknown command: ${command}`);
53
+ console.error('Run "devflow --help" to see available commands.');
54
+ process.exit(1);
81
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pjmendonca/devflow",
3
- "version": "1.10.2",
3
+ "version": "1.11.1",
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.1"
22
22
 
23
23
  # Lazy imports to avoid circular dependencies
24
24
  __all__ = [