@pjmendonca/devflow 1.9.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/CHANGELOG.md +526 -0
- package/LICENSE +21 -0
- package/README.md +620 -0
- package/bin/devflow-checkpoint.js +10 -0
- package/bin/devflow-collab.js +10 -0
- package/bin/devflow-cost.js +10 -0
- package/bin/devflow-create-persona.js +10 -0
- package/bin/devflow-init.js +10 -0
- package/bin/devflow-memory.js +10 -0
- package/bin/devflow-new-doc.js +10 -0
- package/bin/devflow-personalize.js +10 -0
- package/bin/devflow-setup-checkpoint.js +10 -0
- package/bin/devflow-story.js +10 -0
- package/bin/devflow-tech-debt.js +10 -0
- package/bin/devflow-validate-overrides.js +10 -0
- package/bin/devflow-validate.js +10 -0
- package/bin/devflow-version.js +10 -0
- package/lib/constants.js +30 -0
- package/lib/exec-python.js +78 -0
- package/lib/python-check.js +178 -0
- package/package.json +64 -0
- package/tooling/.automation/agents/architect.md +135 -0
- package/tooling/.automation/agents/ba.md +70 -0
- package/tooling/.automation/agents/dev.md +79 -0
- package/tooling/.automation/agents/maintainer.md +97 -0
- package/tooling/.automation/agents/pm.md +116 -0
- package/tooling/.automation/agents/reviewer.md +141 -0
- package/tooling/.automation/agents/sm.md +61 -0
- package/tooling/.automation/agents/writer.md +193 -0
- package/tooling/.automation/config.ps1.template +61 -0
- package/tooling/.automation/config.sh.template +48 -0
- package/tooling/.automation/memory/.gitkeep +6 -0
- package/tooling/.automation/memory/knowledge/kg_integration-test.json +94 -0
- package/tooling/.automation/memory/knowledge/kg_test-story.json +300 -0
- package/tooling/.automation/memory/shared/shared_integration-test.json +30 -0
- package/tooling/.automation/memory/shared/shared_test-story.json +78 -0
- package/tooling/.automation/overrides/templates/README.md +113 -0
- package/tooling/.automation/overrides/templates/architect/README.md +27 -0
- package/tooling/.automation/overrides/templates/architect/cloud-native.yaml +92 -0
- package/tooling/.automation/overrides/templates/architect/enterprise-architect.yaml +85 -0
- package/tooling/.automation/overrides/templates/architect/pragmatic-minimalist.yaml +88 -0
- package/tooling/.automation/overrides/templates/ba/README.md +27 -0
- package/tooling/.automation/overrides/templates/ba/agile-storyteller.yaml +86 -0
- package/tooling/.automation/overrides/templates/ba/domain-expert.yaml +91 -0
- package/tooling/.automation/overrides/templates/ba/requirements-engineer.yaml +89 -0
- package/tooling/.automation/overrides/templates/dev/README.md +32 -0
- package/tooling/.automation/overrides/templates/dev/junior-mentored.yaml +39 -0
- package/tooling/.automation/overrides/templates/dev/performance-engineer.yaml +43 -0
- package/tooling/.automation/overrides/templates/dev/rapid-prototyper.yaml +52 -0
- package/tooling/.automation/overrides/templates/dev/security-focused.yaml +43 -0
- package/tooling/.automation/overrides/templates/dev/senior-fullstack.yaml +39 -0
- package/tooling/.automation/overrides/templates/maintainer/README.md +27 -0
- package/tooling/.automation/overrides/templates/maintainer/devops-maintainer.yaml +113 -0
- package/tooling/.automation/overrides/templates/maintainer/legacy-steward.yaml +94 -0
- package/tooling/.automation/overrides/templates/maintainer/oss-maintainer.yaml +94 -0
- package/tooling/.automation/overrides/templates/pm/README.md +27 -0
- package/tooling/.automation/overrides/templates/pm/agile-pm.yaml +91 -0
- package/tooling/.automation/overrides/templates/pm/hybrid-delivery.yaml +87 -0
- package/tooling/.automation/overrides/templates/pm/traditional-pm.yaml +91 -0
- package/tooling/.automation/overrides/templates/reviewer/README.md +11 -0
- package/tooling/.automation/overrides/templates/reviewer/mentoring-reviewer.yaml +45 -0
- package/tooling/.automation/overrides/templates/reviewer/quick-sanity.yaml +50 -0
- package/tooling/.automation/overrides/templates/reviewer/thorough-critic.yaml +48 -0
- package/tooling/.automation/overrides/templates/sm/README.md +11 -0
- package/tooling/.automation/overrides/templates/sm/agile-coach.yaml +52 -0
- package/tooling/.automation/overrides/templates/sm/startup-pm.yaml +50 -0
- package/tooling/.automation/overrides/templates/sm/technical-lead.yaml +47 -0
- package/tooling/.automation/overrides/templates/user-profile.template.yaml +62 -0
- package/tooling/.automation/overrides/templates/writer/README.md +27 -0
- package/tooling/.automation/overrides/templates/writer/api-documentarian.yaml +99 -0
- package/tooling/.automation/overrides/templates/writer/docs-as-code.yaml +108 -0
- package/tooling/.automation/overrides/templates/writer/user-guide-author.yaml +100 -0
- package/tooling/completions/DevflowCompletion.ps1 +213 -0
- package/tooling/completions/_run-story +116 -0
- package/tooling/completions/run-story-completion.bash +136 -0
- package/tooling/docs/DOC-STANDARD.md +717 -0
- package/tooling/docs/sprint-status.yaml.template +24 -0
- package/tooling/docs/templates/bug-report.md +234 -0
- package/tooling/docs/templates/migration-spec.md +274 -0
- package/tooling/docs/templates/refactor-spec.md +86 -0
- package/tooling/docs/templates/tech-debt.md +86 -0
- package/tooling/scripts/context_checkpoint.py +556 -0
- package/tooling/scripts/cost_dashboard.py +617 -0
- package/tooling/scripts/create-persona.py +690 -0
- package/tooling/scripts/create-persona.sh +435 -0
- package/tooling/scripts/init-project-workflow.ps1 +651 -0
- package/tooling/scripts/init-project-workflow.py +70 -0
- package/tooling/scripts/init-project-workflow.sh +746 -0
- package/tooling/scripts/lib/__init__.py +35 -0
- package/tooling/scripts/lib/agent_handoff.py +526 -0
- package/tooling/scripts/lib/agent_router.py +698 -0
- package/tooling/scripts/lib/checkpoint-integration.ps1 +245 -0
- package/tooling/scripts/lib/checkpoint-integration.sh +191 -0
- package/tooling/scripts/lib/claude-cli.ps1 +952 -0
- package/tooling/scripts/lib/claude-cli.sh +1293 -0
- package/tooling/scripts/lib/cost_config.py +222 -0
- package/tooling/scripts/lib/cost_display.py +443 -0
- package/tooling/scripts/lib/cost_tracker.py +710 -0
- package/tooling/scripts/lib/currency_converter.py +328 -0
- package/tooling/scripts/lib/errors.py +438 -0
- package/tooling/scripts/lib/override-loader.sh +286 -0
- package/tooling/scripts/lib/pair_programming.py +589 -0
- package/tooling/scripts/lib/shared_memory.py +637 -0
- package/tooling/scripts/lib/swarm_orchestrator.py +689 -0
- package/tooling/scripts/memory_summarize.py +324 -0
- package/tooling/scripts/new-doc.ps1 +405 -0
- package/tooling/scripts/new-doc.py +93 -0
- package/tooling/scripts/new-doc.sh +534 -0
- package/tooling/scripts/personalize_agent.py +385 -0
- package/tooling/scripts/rollback-migration.sh +540 -0
- package/tooling/scripts/run-collab.ps1 +251 -0
- package/tooling/scripts/run-collab.py +605 -0
- package/tooling/scripts/run-collab.sh +110 -0
- package/tooling/scripts/run-story.ps1 +490 -0
- package/tooling/scripts/run-story.py +387 -0
- package/tooling/scripts/run-story.sh +467 -0
- package/tooling/scripts/setup-checkpoint-service.ps1 +219 -0
- package/tooling/scripts/setup-checkpoint-service.py +87 -0
- package/tooling/scripts/setup-checkpoint-service.sh +236 -0
- package/tooling/scripts/tech-debt-tracker.py +608 -0
- package/tooling/scripts/update_version.py +244 -0
- package/tooling/scripts/validate-overrides.py +511 -0
- package/tooling/scripts/validate-overrides.sh +432 -0
- package/tooling/scripts/validate_setup.py +539 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const path = require('path');
|
|
4
|
+
const { execPythonScript, getScriptsDir } = require('../lib/exec-python');
|
|
5
|
+
|
|
6
|
+
const scriptPath = path.join(getScriptsDir(), 'personalize_agent.py');
|
|
7
|
+
const args = process.argv.slice(2);
|
|
8
|
+
|
|
9
|
+
const exitCode = execPythonScript(scriptPath, args);
|
|
10
|
+
process.exit(exitCode);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const path = require('path');
|
|
4
|
+
const { execPythonScript, getScriptsDir } = require('../lib/exec-python');
|
|
5
|
+
|
|
6
|
+
const scriptPath = path.join(getScriptsDir(), 'setup-checkpoint-service.py');
|
|
7
|
+
const args = process.argv.slice(2);
|
|
8
|
+
|
|
9
|
+
const exitCode = execPythonScript(scriptPath, args);
|
|
10
|
+
process.exit(exitCode);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const path = require('path');
|
|
4
|
+
const { execPythonScript, getScriptsDir } = require('../lib/exec-python');
|
|
5
|
+
|
|
6
|
+
const scriptPath = path.join(getScriptsDir(), 'run-story.py');
|
|
7
|
+
const args = process.argv.slice(2);
|
|
8
|
+
|
|
9
|
+
const exitCode = execPythonScript(scriptPath, args);
|
|
10
|
+
process.exit(exitCode);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const path = require('path');
|
|
4
|
+
const { execPythonScript, getScriptsDir } = require('../lib/exec-python');
|
|
5
|
+
|
|
6
|
+
const scriptPath = path.join(getScriptsDir(), 'tech-debt-tracker.py');
|
|
7
|
+
const args = process.argv.slice(2);
|
|
8
|
+
|
|
9
|
+
const exitCode = execPythonScript(scriptPath, args);
|
|
10
|
+
process.exit(exitCode);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const path = require('path');
|
|
4
|
+
const { execPythonScript, getScriptsDir } = require('../lib/exec-python');
|
|
5
|
+
|
|
6
|
+
const scriptPath = path.join(getScriptsDir(), 'validate-overrides.py');
|
|
7
|
+
const args = process.argv.slice(2);
|
|
8
|
+
|
|
9
|
+
const exitCode = execPythonScript(scriptPath, args);
|
|
10
|
+
process.exit(exitCode);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const path = require('path');
|
|
4
|
+
const { execPythonScript, getScriptsDir } = require('../lib/exec-python');
|
|
5
|
+
|
|
6
|
+
const scriptPath = path.join(getScriptsDir(), 'validate_setup.py');
|
|
7
|
+
const args = process.argv.slice(2);
|
|
8
|
+
|
|
9
|
+
const exitCode = execPythonScript(scriptPath, args);
|
|
10
|
+
process.exit(exitCode);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const path = require('path');
|
|
4
|
+
const { execPythonScript, getScriptsDir } = require('../lib/exec-python');
|
|
5
|
+
|
|
6
|
+
const scriptPath = path.join(getScriptsDir(), 'update_version.py');
|
|
7
|
+
const args = process.argv.slice(2);
|
|
8
|
+
|
|
9
|
+
const exitCode = execPythonScript(scriptPath, args);
|
|
10
|
+
process.exit(exitCode);
|
package/lib/constants.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Constants for Devflow npm Package
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
module.exports = {
|
|
6
|
+
/**
|
|
7
|
+
* Minimum required Python version
|
|
8
|
+
*/
|
|
9
|
+
REQUIRED_PYTHON_VERSION: '3.9.0',
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Mapping of CLI command names to Python script filenames
|
|
13
|
+
*/
|
|
14
|
+
SCRIPT_MAP: {
|
|
15
|
+
'devflow-cost': 'cost_dashboard.py',
|
|
16
|
+
'devflow-validate': 'validate_setup.py',
|
|
17
|
+
'devflow-story': 'run-story.py',
|
|
18
|
+
'devflow-checkpoint': 'context_checkpoint.py',
|
|
19
|
+
'devflow-memory': 'memory_summarize.py',
|
|
20
|
+
'devflow-collab': 'run-collab.py',
|
|
21
|
+
'devflow-create-persona': 'create-persona.py',
|
|
22
|
+
'devflow-personalize': 'personalize_agent.py',
|
|
23
|
+
'devflow-validate-overrides': 'validate-overrides.py',
|
|
24
|
+
'devflow-new-doc': 'new-doc.py',
|
|
25
|
+
'devflow-tech-debt': 'tech-debt-tracker.py',
|
|
26
|
+
'devflow-setup-checkpoint': 'setup-checkpoint-service.py',
|
|
27
|
+
'devflow-init': 'init-project-workflow.py',
|
|
28
|
+
'devflow-version': 'update_version.py'
|
|
29
|
+
}
|
|
30
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Python Script Execution Wrapper for Devflow
|
|
3
|
+
*
|
|
4
|
+
* Provides cross-platform Python script execution with proper
|
|
5
|
+
* path resolution and stdio handling.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const { spawnSync } = require('child_process');
|
|
9
|
+
const path = require('path');
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Detect available Python command
|
|
13
|
+
* @returns {string} Python command (python3, python, or py)
|
|
14
|
+
*/
|
|
15
|
+
function getPythonCommand() {
|
|
16
|
+
const commands = ['python3', 'python', 'py'];
|
|
17
|
+
|
|
18
|
+
for (const cmd of commands) {
|
|
19
|
+
const result = spawnSync(cmd, ['--version'], {
|
|
20
|
+
shell: true,
|
|
21
|
+
stdio: 'pipe',
|
|
22
|
+
windowsHide: true
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
if (result.status === 0) {
|
|
26
|
+
return cmd;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Fallback to python3 (will error with helpful message)
|
|
31
|
+
return 'python3';
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Get the scripts directory path
|
|
36
|
+
* @returns {string} Absolute path to tooling/scripts directory
|
|
37
|
+
*/
|
|
38
|
+
function getScriptsDir() {
|
|
39
|
+
// __dirname is lib/, so go up one level to package root
|
|
40
|
+
return path.join(__dirname, '..', 'tooling', 'scripts');
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Execute a Python script with arguments
|
|
45
|
+
* @param {string} scriptPath - Path to Python script (relative to scripts dir or absolute)
|
|
46
|
+
* @param {string[]} args - Arguments to pass to the script
|
|
47
|
+
* @returns {number} Exit code from the Python script
|
|
48
|
+
*/
|
|
49
|
+
function execPythonScript(scriptPath, args = []) {
|
|
50
|
+
const pythonCmd = getPythonCommand();
|
|
51
|
+
|
|
52
|
+
// If scriptPath is not absolute, resolve it relative to scripts dir
|
|
53
|
+
const fullPath = path.isAbsolute(scriptPath)
|
|
54
|
+
? scriptPath
|
|
55
|
+
: scriptPath;
|
|
56
|
+
|
|
57
|
+
const spawnOptions = {
|
|
58
|
+
stdio: 'inherit', // Pass through stdin, stdout, stderr
|
|
59
|
+
shell: process.platform === 'win32', // Windows needs shell for proper execution
|
|
60
|
+
windowsHide: true // Prevent console window flash on Windows
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const result = spawnSync(pythonCmd, [fullPath, ...args], spawnOptions);
|
|
64
|
+
|
|
65
|
+
// Handle errors
|
|
66
|
+
if (result.error) {
|
|
67
|
+
console.error(`Error executing Python script: ${result.error.message}`);
|
|
68
|
+
return 1;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return result.status || 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
module.exports = {
|
|
75
|
+
execPythonScript,
|
|
76
|
+
getPythonCommand,
|
|
77
|
+
getScriptsDir
|
|
78
|
+
};
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Python Version Checker for Devflow npm Package
|
|
5
|
+
*
|
|
6
|
+
* Verifies that Python 3.9+ is installed and accessible.
|
|
7
|
+
* Runs during npm postinstall to ensure requirements are met.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
const { spawnSync } = require('child_process');
|
|
11
|
+
const REQUIRED_VERSION = '3.9.0';
|
|
12
|
+
|
|
13
|
+
// ANSI color codes
|
|
14
|
+
const colors = {
|
|
15
|
+
reset: '\x1b[0m',
|
|
16
|
+
red: '\x1b[31m',
|
|
17
|
+
green: '\x1b[32m',
|
|
18
|
+
yellow: '\x1b[33m',
|
|
19
|
+
blue: '\x1b[34m',
|
|
20
|
+
bold: '\x1b[1m'
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
function colorize(text, color) {
|
|
24
|
+
return `${colors[color]}${text}${colors.reset}`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Detect available Python command
|
|
29
|
+
* @returns {string|null} Python command or null if not found
|
|
30
|
+
*/
|
|
31
|
+
function getPythonCommand() {
|
|
32
|
+
const commands = ['python3', 'python', 'py'];
|
|
33
|
+
|
|
34
|
+
for (const cmd of commands) {
|
|
35
|
+
const result = spawnSync(cmd, ['--version'], {
|
|
36
|
+
shell: true,
|
|
37
|
+
stdio: 'pipe',
|
|
38
|
+
windowsHide: true
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
if (result.status === 0) {
|
|
42
|
+
return cmd;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Parse version string to array of numbers
|
|
51
|
+
* @param {string} versionString - e.g., "Python 3.11.5"
|
|
52
|
+
* @returns {number[]|null} - e.g., [3, 11, 5] or null
|
|
53
|
+
*/
|
|
54
|
+
function parseVersion(versionString) {
|
|
55
|
+
const match = versionString.match(/(\d+)\.(\d+)\.(\d+)/);
|
|
56
|
+
if (!match) return null;
|
|
57
|
+
return [parseInt(match[1]), parseInt(match[2]), parseInt(match[3])];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Compare two version arrays
|
|
62
|
+
* @param {number[]} version - Current version
|
|
63
|
+
* @param {number[]} required - Required version
|
|
64
|
+
* @returns {boolean} - true if version >= required
|
|
65
|
+
*/
|
|
66
|
+
function isVersionSufficient(version, required) {
|
|
67
|
+
for (let i = 0; i < 3; i++) {
|
|
68
|
+
if (version[i] > required[i]) return true;
|
|
69
|
+
if (version[i] < required[i]) return false;
|
|
70
|
+
}
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Get platform-specific installation instructions
|
|
76
|
+
* @returns {string} Installation instructions
|
|
77
|
+
*/
|
|
78
|
+
function getInstallInstructions() {
|
|
79
|
+
const platform = process.platform;
|
|
80
|
+
|
|
81
|
+
if (platform === 'win32') {
|
|
82
|
+
return `
|
|
83
|
+
${colorize('Windows Installation:', 'bold')}
|
|
84
|
+
1. Download Python from https://www.python.org/downloads/
|
|
85
|
+
2. Run the installer and check "Add Python to PATH"
|
|
86
|
+
3. Verify: open Command Prompt and run: ${colorize('python --version', 'blue')}
|
|
87
|
+
|
|
88
|
+
Or use Chocolatey:
|
|
89
|
+
${colorize('choco install python', 'blue')}
|
|
90
|
+
`;
|
|
91
|
+
} else if (platform === 'darwin') {
|
|
92
|
+
return `
|
|
93
|
+
${colorize('macOS Installation:', 'bold')}
|
|
94
|
+
Using Homebrew (recommended):
|
|
95
|
+
${colorize('brew install python@3.11', 'blue')}
|
|
96
|
+
|
|
97
|
+
Or download from:
|
|
98
|
+
https://www.python.org/downloads/macos/
|
|
99
|
+
`;
|
|
100
|
+
} else {
|
|
101
|
+
return `
|
|
102
|
+
${colorize('Linux Installation:', 'bold')}
|
|
103
|
+
Ubuntu/Debian:
|
|
104
|
+
${colorize('sudo apt update && sudo apt install python3', 'blue')}
|
|
105
|
+
|
|
106
|
+
Fedora:
|
|
107
|
+
${colorize('sudo dnf install python3', 'blue')}
|
|
108
|
+
|
|
109
|
+
Arch:
|
|
110
|
+
${colorize('sudo pacman -S python', 'blue')}
|
|
111
|
+
`;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Main check function
|
|
117
|
+
*/
|
|
118
|
+
function checkPython() {
|
|
119
|
+
const silent = process.argv.includes('--silent');
|
|
120
|
+
|
|
121
|
+
// Find Python command
|
|
122
|
+
const pythonCmd = getPythonCommand();
|
|
123
|
+
|
|
124
|
+
if (!pythonCmd) {
|
|
125
|
+
if (!silent) {
|
|
126
|
+
console.error(colorize('\n✗ Python not found', 'red'));
|
|
127
|
+
console.error('\nDevflow requires Python 3.9 or higher.');
|
|
128
|
+
console.error(getInstallInstructions());
|
|
129
|
+
console.error(colorize('After installation, run:', 'yellow'));
|
|
130
|
+
console.error(colorize(' npm install -g devflow', 'blue'));
|
|
131
|
+
console.error('');
|
|
132
|
+
}
|
|
133
|
+
process.exit(1);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// Get Python version
|
|
137
|
+
const result = spawnSync(pythonCmd, ['--version'], {
|
|
138
|
+
shell: true,
|
|
139
|
+
stdio: 'pipe',
|
|
140
|
+
encoding: 'utf-8',
|
|
141
|
+
windowsHide: true
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
const versionOutput = (result.stdout || result.stderr || '').trim();
|
|
145
|
+
const currentVersion = parseVersion(versionOutput);
|
|
146
|
+
const requiredVersion = parseVersion(REQUIRED_VERSION);
|
|
147
|
+
|
|
148
|
+
if (!currentVersion) {
|
|
149
|
+
if (!silent) {
|
|
150
|
+
console.error(colorize('\n✗ Could not parse Python version', 'red'));
|
|
151
|
+
console.error(`Version output: ${versionOutput}`);
|
|
152
|
+
console.error('');
|
|
153
|
+
}
|
|
154
|
+
process.exit(1);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// Check if version is sufficient
|
|
158
|
+
if (!isVersionSufficient(currentVersion, requiredVersion)) {
|
|
159
|
+
if (!silent) {
|
|
160
|
+
console.error(colorize(`\n✗ Python ${currentVersion.join('.')} found, but ${REQUIRED_VERSION}+ required`, 'red'));
|
|
161
|
+
console.error(getInstallInstructions());
|
|
162
|
+
console.error('');
|
|
163
|
+
}
|
|
164
|
+
process.exit(1);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// Success!
|
|
168
|
+
if (!silent) {
|
|
169
|
+
console.log(colorize(`\n✓ Python ${currentVersion.join('.')} found (${pythonCmd})`, 'green'));
|
|
170
|
+
console.log(colorize('✓ Devflow is ready to use!\n', 'green'));
|
|
171
|
+
console.log(`Try: ${colorize('devflow-validate', 'blue')}\n`);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
process.exit(0);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// Run check
|
|
178
|
+
checkPython();
|
package/package.json
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pjmendonca/devflow",
|
|
3
|
+
"version": "1.9.0",
|
|
4
|
+
"description": "Development workflow automation with Claude Code - agent-based development system with cost tracking",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"devflow",
|
|
7
|
+
"claude",
|
|
8
|
+
"ai",
|
|
9
|
+
"automation",
|
|
10
|
+
"workflow",
|
|
11
|
+
"cost-tracking",
|
|
12
|
+
"cli"
|
|
13
|
+
],
|
|
14
|
+
"homepage": "https://github.com/Pedro-Jose-da-Rocha-Mendonca/Devflow#readme",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/Pedro-Jose-da-Rocha-Mendonca/Devflow/issues"
|
|
17
|
+
},
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/Pedro-Jose-da-Rocha-Mendonca/Devflow.git"
|
|
21
|
+
},
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"author": {
|
|
24
|
+
"name": "Pedro Jose da Rocha Mendonca"
|
|
25
|
+
},
|
|
26
|
+
"bin": {
|
|
27
|
+
"devflow-cost": "bin/devflow-cost.js",
|
|
28
|
+
"devflow-validate": "bin/devflow-validate.js",
|
|
29
|
+
"devflow-story": "bin/devflow-story.js",
|
|
30
|
+
"devflow-checkpoint": "bin/devflow-checkpoint.js",
|
|
31
|
+
"devflow-memory": "bin/devflow-memory.js",
|
|
32
|
+
"devflow-collab": "bin/devflow-collab.js",
|
|
33
|
+
"devflow-create-persona": "bin/devflow-create-persona.js",
|
|
34
|
+
"devflow-personalize": "bin/devflow-personalize.js",
|
|
35
|
+
"devflow-validate-overrides": "bin/devflow-validate-overrides.js",
|
|
36
|
+
"devflow-new-doc": "bin/devflow-new-doc.js",
|
|
37
|
+
"devflow-tech-debt": "bin/devflow-tech-debt.js",
|
|
38
|
+
"devflow-setup-checkpoint": "bin/devflow-setup-checkpoint.js",
|
|
39
|
+
"devflow-init": "bin/devflow-init.js",
|
|
40
|
+
"devflow-version": "bin/devflow-version.js"
|
|
41
|
+
},
|
|
42
|
+
"files": [
|
|
43
|
+
"bin/",
|
|
44
|
+
"lib/",
|
|
45
|
+
"tooling/",
|
|
46
|
+
"LICENSE",
|
|
47
|
+
"README.md",
|
|
48
|
+
"CHANGELOG.md"
|
|
49
|
+
],
|
|
50
|
+
"scripts": {
|
|
51
|
+
"postinstall": "node lib/python-check.js",
|
|
52
|
+
"test": "node lib/python-check.js --silent && bash test/integration.sh",
|
|
53
|
+
"prepublishOnly": "node scripts/sync-version.js"
|
|
54
|
+
},
|
|
55
|
+
"engines": {
|
|
56
|
+
"node": ">=14.0.0",
|
|
57
|
+
"npm": ">=6.0.0"
|
|
58
|
+
},
|
|
59
|
+
"os": [
|
|
60
|
+
"darwin",
|
|
61
|
+
"linux",
|
|
62
|
+
"win32"
|
|
63
|
+
]
|
|
64
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# Architect Agent
|
|
2
|
+
|
|
3
|
+
You are a Software Architect for the Stronger fitness app. Your role is to design robust, scalable, and maintainable system architectures.
|
|
4
|
+
|
|
5
|
+
## Your Responsibilities
|
|
6
|
+
|
|
7
|
+
1. **System Design**: Create high-level and detailed architectural designs
|
|
8
|
+
2. **Technology Selection**: Evaluate and recommend technologies and frameworks
|
|
9
|
+
3. **Pattern Application**: Apply appropriate design patterns and best practices
|
|
10
|
+
4. **Technical Decisions**: Document architectural decisions and rationale (ADRs)
|
|
11
|
+
5. **Quality Attributes**: Ensure non-functional requirements are addressed
|
|
12
|
+
|
|
13
|
+
## Working Directory
|
|
14
|
+
|
|
15
|
+
- Architecture docs: `tooling/docs/architecture.md`
|
|
16
|
+
- Tech specs: `tooling/docs/sprint-artifacts/tech-spec-*.md`
|
|
17
|
+
- API docs: `tooling/docs/api/`
|
|
18
|
+
- Database schema: `tooling/docs/database/`
|
|
19
|
+
|
|
20
|
+
## Current Tech Stack
|
|
21
|
+
|
|
22
|
+
- **Frontend**: Flutter/Dart
|
|
23
|
+
- **State Management**: Provider with ChangeNotifier
|
|
24
|
+
- **Navigation**: GoRouter
|
|
25
|
+
- **Backend**: Supabase (PostgreSQL, Auth, Realtime)
|
|
26
|
+
- **Local Storage**: Drift (SQLite), Hive, flutter_secure_storage
|
|
27
|
+
- **Charts**: fl_chart
|
|
28
|
+
|
|
29
|
+
## Architecture Principles
|
|
30
|
+
|
|
31
|
+
1. **Separation of Concerns**: Clear boundaries between layers
|
|
32
|
+
2. **Dependency Inversion**: Depend on abstractions, not concretions
|
|
33
|
+
3. **Single Responsibility**: Each component has one reason to change
|
|
34
|
+
4. **Open/Closed**: Open for extension, closed for modification
|
|
35
|
+
5. **Offline-First**: Design for network unreliability
|
|
36
|
+
|
|
37
|
+
## Project Structure
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
app/lib/
|
|
41
|
+
├── core/ # Cross-cutting concerns
|
|
42
|
+
│ ├── constants/ # App-wide constants
|
|
43
|
+
│ ├── navigation/ # GoRouter configuration
|
|
44
|
+
│ ├── errors/ # Error handling, Result type
|
|
45
|
+
│ ├── database/ # Local database (Drift)
|
|
46
|
+
│ └── observability/ # Logging, error tracking
|
|
47
|
+
├── features/ # Feature modules
|
|
48
|
+
│ ├── auth/ # Authentication
|
|
49
|
+
│ ├── workout_tracking/ # Workout logging
|
|
50
|
+
│ ├── goals/ # Goal management
|
|
51
|
+
│ └── [feature]/
|
|
52
|
+
│ ├── data/ # Models, repositories, datasources
|
|
53
|
+
│ ├── domain/ # Business logic, validators
|
|
54
|
+
│ └── presentation/ # Screens, widgets, providers
|
|
55
|
+
└── shared/ # Shared components
|
|
56
|
+
└── widgets/ # Reusable UI components
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Design Document Format
|
|
60
|
+
|
|
61
|
+
When creating technical specifications:
|
|
62
|
+
|
|
63
|
+
```markdown
|
|
64
|
+
# Technical Specification: [Feature Name]
|
|
65
|
+
|
|
66
|
+
## Overview
|
|
67
|
+
Brief description of the feature and its purpose.
|
|
68
|
+
|
|
69
|
+
## Architecture
|
|
70
|
+
|
|
71
|
+
### Component Diagram
|
|
72
|
+
[Describe or diagram the components and their relationships]
|
|
73
|
+
|
|
74
|
+
### Data Flow
|
|
75
|
+
[Describe how data flows through the system]
|
|
76
|
+
|
|
77
|
+
## Data Model
|
|
78
|
+
|
|
79
|
+
### Entities
|
|
80
|
+
[Define the data structures]
|
|
81
|
+
|
|
82
|
+
### Database Schema
|
|
83
|
+
[SQL or schema definitions]
|
|
84
|
+
|
|
85
|
+
## API Design
|
|
86
|
+
|
|
87
|
+
### Endpoints
|
|
88
|
+
[List API endpoints if applicable]
|
|
89
|
+
|
|
90
|
+
### Contracts
|
|
91
|
+
[Request/response formats]
|
|
92
|
+
|
|
93
|
+
## Non-Functional Requirements
|
|
94
|
+
|
|
95
|
+
- **Performance**: [Targets and constraints]
|
|
96
|
+
- **Security**: [Security considerations]
|
|
97
|
+
- **Scalability**: [Growth considerations]
|
|
98
|
+
|
|
99
|
+
## Implementation Notes
|
|
100
|
+
|
|
101
|
+
[Technical guidance for developers]
|
|
102
|
+
|
|
103
|
+
## Risks and Mitigations
|
|
104
|
+
|
|
105
|
+
[Identified risks and how to address them]
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Decision Records
|
|
109
|
+
|
|
110
|
+
For significant decisions, create an ADR:
|
|
111
|
+
|
|
112
|
+
```markdown
|
|
113
|
+
# ADR-XXX: [Decision Title]
|
|
114
|
+
|
|
115
|
+
## Status
|
|
116
|
+
[Proposed | Accepted | Deprecated | Superseded]
|
|
117
|
+
|
|
118
|
+
## Context
|
|
119
|
+
[What is the issue we're trying to solve?]
|
|
120
|
+
|
|
121
|
+
## Decision
|
|
122
|
+
[What is the change we're proposing?]
|
|
123
|
+
|
|
124
|
+
## Consequences
|
|
125
|
+
[What are the results of this decision?]
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Quality Attributes to Consider
|
|
129
|
+
|
|
130
|
+
- **Performance**: Response times, throughput
|
|
131
|
+
- **Reliability**: Fault tolerance, recovery
|
|
132
|
+
- **Security**: Authentication, authorization, data protection
|
|
133
|
+
- **Maintainability**: Code quality, documentation
|
|
134
|
+
- **Testability**: Unit, integration, E2E testing
|
|
135
|
+
- **Usability**: User experience considerations
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Business Analyst Agent
|
|
2
|
+
|
|
3
|
+
You are a Business Analyst working on the Stronger fitness app. Your role is to bridge the gap between business needs and technical implementation.
|
|
4
|
+
|
|
5
|
+
## Your Responsibilities
|
|
6
|
+
|
|
7
|
+
1. **Requirements Gathering**: Elicit, analyze, and document business requirements
|
|
8
|
+
2. **User Story Creation**: Write clear, actionable user stories with acceptance criteria
|
|
9
|
+
3. **Process Analysis**: Map current and future state processes
|
|
10
|
+
4. **Stakeholder Communication**: Translate technical concepts for business stakeholders
|
|
11
|
+
5. **Gap Analysis**: Identify gaps between requirements and proposed solutions
|
|
12
|
+
|
|
13
|
+
## Working Directory
|
|
14
|
+
|
|
15
|
+
- Requirements docs: `tooling/docs/requirements/`
|
|
16
|
+
- User stories: `tooling/docs/sprint-artifacts/`
|
|
17
|
+
- PRD: `tooling/docs/prd.md`
|
|
18
|
+
- Epics: `tooling/docs/epics.md`
|
|
19
|
+
|
|
20
|
+
## User Story Format
|
|
21
|
+
|
|
22
|
+
When writing user stories, use this format:
|
|
23
|
+
|
|
24
|
+
```markdown
|
|
25
|
+
# Story Title
|
|
26
|
+
|
|
27
|
+
## Summary
|
|
28
|
+
Brief description of the feature from user perspective.
|
|
29
|
+
|
|
30
|
+
## User Story
|
|
31
|
+
As a [type of user],
|
|
32
|
+
I want [goal/desire],
|
|
33
|
+
So that [benefit/value].
|
|
34
|
+
|
|
35
|
+
## Acceptance Criteria
|
|
36
|
+
- **AC X.Y.1**: [Specific, testable criterion]
|
|
37
|
+
- **AC X.Y.2**: [Specific, testable criterion]
|
|
38
|
+
- **AC X.Y.3**: [Specific, testable criterion]
|
|
39
|
+
|
|
40
|
+
## Business Rules
|
|
41
|
+
- Rule 1: [Business logic that must be enforced]
|
|
42
|
+
- Rule 2: [Validation or constraint]
|
|
43
|
+
|
|
44
|
+
## Out of Scope
|
|
45
|
+
- [What this story does NOT include]
|
|
46
|
+
|
|
47
|
+
## Dependencies
|
|
48
|
+
- [Other stories or systems this depends on]
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Analysis Techniques
|
|
52
|
+
|
|
53
|
+
- **INVEST Criteria**: Stories should be Independent, Negotiable, Valuable, Estimable, Small, Testable
|
|
54
|
+
- **Definition of Done**: Clear criteria for when a story is complete
|
|
55
|
+
- **Edge Cases**: Document boundary conditions and error scenarios
|
|
56
|
+
- **Data Requirements**: Specify data fields, validations, and transformations
|
|
57
|
+
|
|
58
|
+
## Deliverables
|
|
59
|
+
|
|
60
|
+
1. **User Stories**: Detailed specifications with acceptance criteria
|
|
61
|
+
2. **Process Flows**: Diagrams or descriptions of user workflows
|
|
62
|
+
3. **Requirements Matrix**: Traceability from business need to implementation
|
|
63
|
+
4. **Impact Analysis**: Assessment of changes on existing functionality
|
|
64
|
+
|
|
65
|
+
## Communication Style
|
|
66
|
+
|
|
67
|
+
- Write for clarity, not technical impressiveness
|
|
68
|
+
- Use concrete examples to illustrate requirements
|
|
69
|
+
- Ask clarifying questions when requirements are ambiguous
|
|
70
|
+
- Validate understanding by restating requirements
|