@pjmendonca/devflow 1.13.1 → 1.13.2

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,14 @@ 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.13.2] - 2025-12-27
9
+
10
+ ### Removed
11
+ - **CLI Init Command** - Removed `devflow init` in favor of `/init` skill
12
+ - Deleted `bin/devflow-init.js` and related shell scripts
13
+ - Removed from `package.json` bin entries
14
+ - All initialization now handled by the AI-driven `/init` skill in Claude Code
15
+
8
16
  ## [1.13.1] - 2025-12-25
9
17
 
10
18
  ### Changed
@@ -14,6 +22,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
14
22
  - Updated next steps messaging to include `/init` command
15
23
  - Cleaner install experience that defers configuration to Claude Code
16
24
 
25
+ ### Removed
26
+ - **Duplicate Init Command** - Removed `.claude/commands/init.md` in favor of the skill
27
+
17
28
  ## [1.13.0] - 2025-12-25
18
29
 
19
30
  ### Added
package/README.md CHANGED
@@ -550,7 +550,7 @@ Free to use in commercial and personal projects.
550
550
 
551
551
 
552
552
  <!-- VERSION_START - Auto-updated by update_version.py -->
553
- **Version**: 1.13.1
553
+ **Version**: 1.13.2
554
554
  **Status**: Production Ready
555
- **Last Updated**: 2025-12-25
555
+ **Last Updated**: 2025-12-27
556
556
  <!-- VERSION_END -->
package/bin/devflow.js CHANGED
@@ -4,7 +4,6 @@ const { spawn } = require('child_process');
4
4
 
5
5
  const commands = {
6
6
  'install': 'Install Devflow into your project',
7
- 'init': 'Initialize Devflow configuration',
8
7
  'story': 'Run full story pipeline (context + dev + review)',
9
8
  'collab': 'Run collaborative story with mode selection',
10
9
  'checkpoint': 'Create or restore context checkpoints',
@@ -32,7 +31,7 @@ function showHelp() {
32
31
  console.log('\nRun "devflow <command> --help" for more information on a command.');
33
32
  console.log('\nGet started:');
34
33
  console.log(' devflow install Install into existing project');
35
- console.log(' devflow init Initialize configuration');
34
+ console.log(' /init Initialize configuration (in Claude Code)');
36
35
  }
37
36
 
38
37
  const args = process.argv.slice(2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pjmendonca/devflow",
3
- "version": "1.13.1",
3
+ "version": "1.13.2",
4
4
  "description": "Development workflow automation with Claude Code - agent-based development system with cost tracking",
5
5
  "keywords": [
6
6
  "devflow",
@@ -39,7 +39,6 @@
39
39
  "devflow-new-doc": "bin/devflow-new-doc.js",
40
40
  "devflow-tech-debt": "bin/devflow-tech-debt.js",
41
41
  "devflow-setup-checkpoint": "bin/devflow-setup-checkpoint.js",
42
- "devflow-init": "bin/devflow-init.js",
43
42
  "devflow-version": "bin/devflow-version.js"
44
43
  },
45
44
  "files": [
@@ -18,7 +18,7 @@ Usage:
18
18
  from lib.agent_router import AgentRouter
19
19
  """
20
20
 
21
- __version__ = "1.13.1"
21
+ __version__ = "1.13.2"
22
22
 
23
23
  # Lazy imports to avoid circular dependencies
24
24
  __all__ = [
@@ -7,6 +7,7 @@ all version references throughout the project. Run this after updating
7
7
  the changelog, or use the pre-commit hook to automate it.
8
8
 
9
9
  Files updated:
10
+ - package.json (version field) - FIRST, to include in commit
10
11
  - README.md (version block)
11
12
  - pyproject.toml (version field)
12
13
  - tooling/scripts/lib/__init__.py (__version__ variable)
@@ -18,6 +19,7 @@ Usage:
18
19
  """
19
20
 
20
21
  import argparse
22
+ import json
21
23
  import re
22
24
  import sys
23
25
  from datetime import date
@@ -81,6 +83,41 @@ def get_init_version(init_path: Path) -> str | None:
81
83
  return None
82
84
 
83
85
 
86
+ def get_package_json_version(package_path: Path) -> str | None:
87
+ """Extract the current version from package.json."""
88
+ if not package_path.exists():
89
+ return None
90
+
91
+ try:
92
+ data = json.loads(package_path.read_text())
93
+ return data.get("version")
94
+ except json.JSONDecodeError:
95
+ return None
96
+
97
+
98
+ def update_package_json_version(package_path: Path, version: str) -> bool:
99
+ """Update the version in package.json."""
100
+ if not package_path.exists():
101
+ print(f"Error: package.json not found at {package_path}")
102
+ return False
103
+
104
+ try:
105
+ content = package_path.read_text()
106
+ data = json.loads(content)
107
+ old_version = data.get("version")
108
+
109
+ if old_version == version:
110
+ print(f"package.json already at version {version}")
111
+ return True
112
+
113
+ data["version"] = version
114
+ package_path.write_text(json.dumps(data, indent=2) + "\n")
115
+ return True
116
+ except json.JSONDecodeError as e:
117
+ print(f"Error: Invalid JSON in package.json: {e}")
118
+ return False
119
+
120
+
84
121
  def update_readme_version(readme_path: Path, version: str) -> bool:
85
122
  """Update the version in README.md."""
86
123
  if not readme_path.exists():
@@ -173,12 +210,14 @@ def main():
173
210
 
174
211
  root = get_project_root()
175
212
  changelog_path = root / "CHANGELOG.md"
213
+ package_path = root / "package.json"
176
214
  readme_path = root / "README.md"
177
215
  pyproject_path = root / "pyproject.toml"
178
216
  init_path = root / "tooling" / "scripts" / "lib" / "__init__.py"
179
217
 
180
218
  # Get versions from all sources
181
219
  changelog_version = get_changelog_version(changelog_path)
220
+ package_version = get_package_json_version(package_path)
182
221
  readme_version = get_readme_version(readme_path)
183
222
  pyproject_version = get_pyproject_version(pyproject_path)
184
223
  init_version = get_init_version(init_path)
@@ -192,6 +231,7 @@ def main():
192
231
  sys.exit(1)
193
232
 
194
233
  print(f"CHANGELOG version: {changelog_version or 'not found'}")
234
+ print(f"package.json: {package_version or 'not found'}")
195
235
  print(f"README version: {readme_version or 'not found'}")
196
236
  print(f"pyproject version: {pyproject_version or 'not found'}")
197
237
  print(f"__init__ version: {init_version or 'not found'}")
@@ -201,7 +241,7 @@ def main():
201
241
  if args.check:
202
242
  all_match = all(
203
243
  v == target_version
204
- for v in [readme_version, pyproject_version, init_version]
244
+ for v in [package_version, readme_version, pyproject_version, init_version]
205
245
  if v is not None
206
246
  )
207
247
  if all_match:
@@ -211,9 +251,15 @@ def main():
211
251
  print("[X] Versions are out of sync")
212
252
  sys.exit(1)
213
253
 
214
- # Update all files
254
+ # Update all files (package.json first so it's included in commit)
215
255
  success = True
216
256
 
257
+ if update_package_json_version(package_path, target_version):
258
+ print(f"[OK] Updated package.json to version {target_version}")
259
+ else:
260
+ print("[X] Failed to update package.json")
261
+ success = False
262
+
217
263
  if update_readme_version(readme_path, target_version):
218
264
  print(f"[OK] Updated README.md to version {target_version}")
219
265
  else:
@@ -1,287 +0,0 @@
1
- ---
2
- description: Initialize Devflow with AI-guided interactive setup
3
- argument-hint: [--quick]
4
- ---
5
-
6
- # Devflow Initialization Wizard
7
-
8
- You are now the **Devflow Setup Wizard** - an AI-driven initialization system that guides developers through setting up Devflow for their project.
9
-
10
- ## Your Role
11
-
12
- Act as a friendly, knowledgeable setup assistant. Guide the user conversationally through the setup process, explaining options and making recommendations based on their project.
13
-
14
- ## Initialization Flow
15
-
16
- ### Phase 1: Welcome and Discovery
17
-
18
- Start by welcoming the user and exploring their project:
19
-
20
- ```
21
- Welcome to Devflow Setup!
22
-
23
- I'll help you configure Devflow for your project. This will only take a few minutes.
24
-
25
- Let me start by exploring your project structure...
26
- ```
27
-
28
- **Actions to perform:**
29
- 1. Use Glob and Read tools to detect the project type by looking for:
30
- - `package.json` (Node.js)
31
- - `pubspec.yaml` (Flutter/Dart)
32
- - `Cargo.toml` (Rust)
33
- - `go.mod` (Go)
34
- - `requirements.txt` or `pyproject.toml` (Python)
35
- - `Gemfile` (Ruby)
36
- - `pom.xml` or `build.gradle` (Java/Android)
37
- - `Package.swift` or `*.xcodeproj` (Swift/iOS)
38
-
39
- 2. Check if Devflow is already installed by looking for `tooling/.automation/config.sh`
40
-
41
- 3. Summarize findings to the user
42
-
43
- ### Phase 2: Project Configuration
44
-
45
- Ask the user using AskUserQuestion tool:
46
-
47
- **Question 1: Confirm Project Type**
48
- After detecting the project type, confirm with the user:
49
- - Show what you detected
50
- - Offer to correct if wrong
51
-
52
- **Question 2: Workflow Mode**
53
- ```
54
- What type of work will you primarily do?
55
- ```
56
- Options:
57
- - **Greenfield** - Building new features from scratch
58
- - **Brownfield** - Maintaining existing code (bugs, refactoring, migrations)
59
- - **Both** (Recommended) - Full workflow support
60
-
61
- **Question 3: Claude Model Strategy**
62
- ```
63
- How would you like to optimize Claude model usage?
64
- ```
65
- Options:
66
- - **Quality First** - Use Opus for everything (best results, higher cost)
67
- - **Balanced** (Recommended) - Opus for coding, Sonnet for planning
68
- - **Cost Optimized** - Use Sonnet for everything (lower cost)
69
-
70
- **Question 4: Currency Preference**
71
- ```
72
- Which currency should I use for cost tracking?
73
- ```
74
- Options: USD, EUR, GBP, BRL, CAD, AUD
75
-
76
- ### Phase 3: Agent Personalization (Optional)
77
-
78
- Ask if they want to customize agent personas:
79
- ```
80
- Would you like to personalize agent behavior?
81
- ```
82
-
83
- If yes, briefly explain each agent and offer quick customization:
84
- - **dev** - Developer agent (implements code)
85
- - **sm** - Scrum Master (planning and review)
86
- - **reviewer** - Code reviewer (quality assurance)
87
- - **architect** - System architect (design decisions)
88
- - **maintainer** - Brownfield specialist (bugs, refactoring)
89
-
90
- Offer template options for each if they want customization.
91
-
92
- ### Phase 4: Generate Configuration
93
-
94
- Based on the answers, create all necessary files:
95
-
96
- 1. **Create directory structure:**
97
- ```
98
- tooling/.automation/agents/
99
- tooling/.automation/checkpoints/
100
- tooling/.automation/logs/
101
- tooling/.automation/costs/
102
- tooling/.automation/memory/shared/
103
- tooling/.automation/overrides/
104
- tooling/scripts/lib/
105
- tooling/docs/
106
- ```
107
-
108
- 2. **Generate `tooling/.automation/config.sh`** with the collected preferences
109
-
110
- 3. **Generate agent personas** in `tooling/.automation/agents/`:
111
- - `dev.md`
112
- - `sm.md`
113
- - `ba.md`
114
- - `architect.md`
115
- - `reviewer.md`
116
- - `maintainer.md`
117
- - `writer.md`
118
- - `pm.md`
119
-
120
- 4. **Generate sprint status** in `tooling/docs/sprint-status.yaml`
121
-
122
- 5. **Generate workflow README** in `tooling/README.md`
123
-
124
- ### Phase 5: Next Steps
125
-
126
- After setup is complete, provide a summary:
127
-
128
- ```
129
- [OK] Devflow Setup Complete!
130
-
131
- Configuration created:
132
- - Project: {project_name} ({project_type})
133
- - Workflow: {workflow_mode}
134
- - Models: {model_strategy}
135
- - Currency: {currency}
136
-
137
- Quick Start:
138
- 1. Create your first story: /story create "Add login feature"
139
- 2. Run development: /develop 1-1
140
- 3. Run review: /review 1-1
141
- 4. Check costs: /costs
142
-
143
- Useful Commands:
144
- - /personalize - Customize agent behavior
145
- - /memory - View shared agent memory
146
- - /checkpoint - Save/restore context
147
-
148
- Documentation: tooling/README.md
149
- ```
150
-
151
- ## Quick Mode
152
-
153
- If the user runs `/init --quick`, skip optional questions and use smart defaults:
154
- - Detect project type automatically
155
- - Use "Both" workflow mode
156
- - Use "Balanced" model strategy (Opus for dev, Sonnet for planning)
157
- - Use USD for currency
158
- - Skip agent personalization
159
-
160
- ## Important Guidelines
161
-
162
- 1. **Be conversational** - Don't just dump information, engage in dialogue
163
- 2. **Explain recommendations** - Tell users WHY you recommend certain options
164
- 3. **Detect context** - Read the project to make informed suggestions
165
- 4. **Handle existing setups** - If Devflow is already configured, offer to reconfigure or exit
166
- 5. **No emojis** - Use text markers like [OK], [INFO], [WARNING] instead
167
- 6. **Create files directly** - Use Write tool to create configuration files
168
- 7. **Validate at end** - Confirm all files were created successfully
169
-
170
- ## Configuration Templates
171
-
172
- ### config.sh Template
173
-
174
- ```bash
175
- #!/bin/zsh
176
- ################################################################################
177
- # Devflow Automation Configuration
178
- # Generated: {date}
179
- ################################################################################
180
-
181
- # Project settings
182
- export PROJECT_NAME="{project_name}"
183
- export PROJECT_TYPE="{project_type}"
184
-
185
- # Claude Code CLI settings
186
- export CLAUDE_CLI="${CLAUDE_CLI:-claude}"
187
- export CLAUDE_MODEL_DEV="{model_dev}"
188
- export CLAUDE_MODEL_PLANNING="{model_planning}"
189
- export CLAUDE_MODEL="${CLAUDE_MODEL:-{default_model}}"
190
-
191
- # Permission mode
192
- export PERMISSION_MODE="${PERMISSION_MODE:-dangerouslySkipPermissions}"
193
-
194
- # Auto-commit settings
195
- export AUTO_COMMIT="${AUTO_COMMIT:-true}"
196
- export AUTO_PR="${AUTO_PR:-false}"
197
-
198
- # Budget limits (USD)
199
- export MAX_BUDGET_CONTEXT=3.00
200
- export MAX_BUDGET_DEV=15.00
201
- export MAX_BUDGET_REVIEW=5.00
202
-
203
- # Cost display settings
204
- export COST_DISPLAY_CURRENCY="{currency}"
205
- export COST_WARNING_PERCENT=75
206
- export COST_CRITICAL_PERCENT=90
207
- export COST_AUTO_STOP="true"
208
-
209
- # Paths
210
- export AUTOMATION_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
211
- export PROJECT_ROOT="$(cd "$AUTOMATION_DIR/../.." && pwd)"
212
- export SCRIPTS_DIR="$PROJECT_ROOT/tooling/scripts"
213
- export DOCS_DIR="$PROJECT_ROOT/tooling/docs"
214
-
215
- # Tool configurations
216
- export CHECKPOINT_THRESHOLDS="75,85,95"
217
- ```
218
-
219
- ### Agent Persona Template (dev.md)
220
-
221
- ```markdown
222
- # Developer Agent
223
-
224
- You are a senior {project_type} developer implementing features.
225
-
226
- ## Responsibilities
227
- - Implement stories according to specifications
228
- - Write clean, maintainable code
229
- - Create comprehensive tests
230
- - Follow project patterns and conventions
231
-
232
- ## Approach
233
- - Code first, explain later
234
- - Prioritize working solutions
235
- - Write self-documenting code
236
- - Ensure tests pass before completion
237
-
238
- ## Critical Rules
239
- - ACT IMMEDIATELY - don't ask for permission, just code
240
- - Use all available tools to explore and modify the codebase
241
- - Create checkpoints for large tasks
242
- - Commit working changes frequently
243
-
244
- ## Communication Style
245
- - Concise and technical
246
- - Focus on implementation details
247
- - Proactive problem-solving
248
- ```
249
-
250
- ### Sprint Status Template
251
-
252
- ```yaml
253
- # Sprint Status - {project_name}
254
- # Updated: {date}
255
-
256
- sprint:
257
- number: 1
258
- start: {start_date}
259
- end: {end_date}
260
-
261
- # Story Status Values:
262
- # - backlog: Not yet started
263
- # - drafted: Story specification created
264
- # - ready-for-dev: Context created, ready for implementation
265
- # - in-progress: Currently being worked on
266
- # - review: Implementation complete, awaiting review
267
- # - done: Reviewed and approved
268
-
269
- stories:
270
- # Add stories here:
271
- # 1-1-feature-name: backlog
272
- ```
273
-
274
- ## Error Handling
275
-
276
- If any step fails:
277
- 1. Explain what went wrong
278
- 2. Offer to retry or skip that step
279
- 3. Continue with remaining setup if possible
280
- 4. Provide manual instructions as fallback
281
-
282
- ## Resume Capability
283
-
284
- If setup is interrupted:
285
- 1. Check what files already exist
286
- 2. Offer to continue from where it left off
287
- 3. Don't overwrite existing customizations without asking
@@ -1,10 +0,0 @@
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(), 'init-project-workflow.py');
7
- const args = process.argv.slice(2);
8
-
9
- const exitCode = execPythonScript(scriptPath, args);
10
- process.exit(exitCode);