@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,244 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Sync version across all project files from CHANGELOG.md.
|
|
4
|
+
|
|
5
|
+
This script extracts the latest version from CHANGELOG.md and updates
|
|
6
|
+
all version references throughout the project. Run this after updating
|
|
7
|
+
the changelog, or use the pre-commit hook to automate it.
|
|
8
|
+
|
|
9
|
+
Files updated:
|
|
10
|
+
- README.md (version block)
|
|
11
|
+
- pyproject.toml (version field)
|
|
12
|
+
- tooling/scripts/lib/__init__.py (__version__ variable)
|
|
13
|
+
|
|
14
|
+
Usage:
|
|
15
|
+
python update_version.py # Sync all versions from CHANGELOG
|
|
16
|
+
python update_version.py --check # Check if versions are in sync
|
|
17
|
+
python update_version.py --version 1.8.0 # Set specific version everywhere
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
import argparse
|
|
21
|
+
import re
|
|
22
|
+
import sys
|
|
23
|
+
from datetime import date
|
|
24
|
+
from pathlib import Path
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def get_project_root() -> Path:
|
|
28
|
+
"""Get the project root directory."""
|
|
29
|
+
script_dir = Path(__file__).resolve().parent
|
|
30
|
+
return script_dir.parent.parent
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def get_changelog_version(changelog_path: Path) -> str | None:
|
|
34
|
+
"""Extract the latest version from CHANGELOG.md."""
|
|
35
|
+
if not changelog_path.exists():
|
|
36
|
+
print(f"Error: CHANGELOG.md not found at {changelog_path}")
|
|
37
|
+
return None
|
|
38
|
+
|
|
39
|
+
content = changelog_path.read_text()
|
|
40
|
+
# Match version pattern like [1.6.0] - 2025-12-21
|
|
41
|
+
match = re.search(r"## \[(\d+\.\d+\.\d+)\]", content)
|
|
42
|
+
if match:
|
|
43
|
+
return match.group(1)
|
|
44
|
+
return None
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def get_readme_version(readme_path: Path) -> str | None:
|
|
48
|
+
"""Extract the current version from README.md."""
|
|
49
|
+
if not readme_path.exists():
|
|
50
|
+
print(f"Error: README.md not found at {readme_path}")
|
|
51
|
+
return None
|
|
52
|
+
|
|
53
|
+
content = readme_path.read_text()
|
|
54
|
+
match = re.search(r"\*\*Version\*\*: (\d+\.\d+\.\d+)", content)
|
|
55
|
+
if match:
|
|
56
|
+
return match.group(1)
|
|
57
|
+
return None
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def get_pyproject_version(pyproject_path: Path) -> str | None:
|
|
61
|
+
"""Extract the current version from pyproject.toml."""
|
|
62
|
+
if not pyproject_path.exists():
|
|
63
|
+
return None
|
|
64
|
+
|
|
65
|
+
content = pyproject_path.read_text()
|
|
66
|
+
match = re.search(r'version = "(\d+\.\d+\.\d+)"', content)
|
|
67
|
+
if match:
|
|
68
|
+
return match.group(1)
|
|
69
|
+
return None
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def get_init_version(init_path: Path) -> str | None:
|
|
73
|
+
"""Extract the current version from __init__.py."""
|
|
74
|
+
if not init_path.exists():
|
|
75
|
+
return None
|
|
76
|
+
|
|
77
|
+
content = init_path.read_text()
|
|
78
|
+
match = re.search(r'__version__ = "(\d+\.\d+\.\d+)"', content)
|
|
79
|
+
if match:
|
|
80
|
+
return match.group(1)
|
|
81
|
+
return None
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def update_readme_version(readme_path: Path, version: str) -> bool:
|
|
85
|
+
"""Update the version in README.md."""
|
|
86
|
+
if not readme_path.exists():
|
|
87
|
+
print(f"Error: README.md not found at {readme_path}")
|
|
88
|
+
return False
|
|
89
|
+
|
|
90
|
+
content = readme_path.read_text()
|
|
91
|
+
today = date.today().isoformat()
|
|
92
|
+
|
|
93
|
+
# Pattern to match the version block (with or without markers)
|
|
94
|
+
pattern = r"(<!-- VERSION_START.*?-->.*?)?\*\*Version\*\*: \d+\.\d+\.\d+\n\*\*Status\*\*: ([^\n]+)\n\*\*Last Updated\*\*: \d{4}-\d{2}-\d{2}(.*?<!-- VERSION_END -->)?"
|
|
95
|
+
|
|
96
|
+
# Check if markers exist
|
|
97
|
+
if "<!-- VERSION_START" in content:
|
|
98
|
+
replacement = f"""<!-- VERSION_START - Auto-updated by update_version.py -->
|
|
99
|
+
**Version**: {version}
|
|
100
|
+
**Status**: \\2
|
|
101
|
+
**Last Updated**: {today}
|
|
102
|
+
<!-- VERSION_END -->"""
|
|
103
|
+
else:
|
|
104
|
+
replacement = f"""**Version**: {version}
|
|
105
|
+
**Status**: \\2
|
|
106
|
+
**Last Updated**: {today}"""
|
|
107
|
+
|
|
108
|
+
new_content, count = re.subn(pattern, replacement, content, flags=re.DOTALL)
|
|
109
|
+
|
|
110
|
+
if count == 0:
|
|
111
|
+
print("Error: Could not find version block in README.md")
|
|
112
|
+
return False
|
|
113
|
+
|
|
114
|
+
readme_path.write_text(new_content)
|
|
115
|
+
return True
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
def update_pyproject_version(pyproject_path: Path, version: str) -> bool:
|
|
119
|
+
"""Update the version in pyproject.toml."""
|
|
120
|
+
if not pyproject_path.exists():
|
|
121
|
+
print(f"Warning: pyproject.toml not found at {pyproject_path}")
|
|
122
|
+
return False
|
|
123
|
+
|
|
124
|
+
content = pyproject_path.read_text()
|
|
125
|
+
pattern = r'version = "\d+\.\d+\.\d+"'
|
|
126
|
+
replacement = f'version = "{version}"'
|
|
127
|
+
|
|
128
|
+
new_content, count = re.subn(pattern, replacement, content, count=1)
|
|
129
|
+
|
|
130
|
+
if count == 0:
|
|
131
|
+
print("Warning: Could not find version in pyproject.toml")
|
|
132
|
+
return False
|
|
133
|
+
|
|
134
|
+
pyproject_path.write_text(new_content)
|
|
135
|
+
return True
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
def update_init_version(init_path: Path, version: str) -> bool:
|
|
139
|
+
"""Update the version in __init__.py."""
|
|
140
|
+
if not init_path.exists():
|
|
141
|
+
print(f"Warning: __init__.py not found at {init_path}")
|
|
142
|
+
return False
|
|
143
|
+
|
|
144
|
+
content = init_path.read_text()
|
|
145
|
+
pattern = r'__version__ = "\d+\.\d+\.\d+"'
|
|
146
|
+
replacement = f'__version__ = "{version}"'
|
|
147
|
+
|
|
148
|
+
new_content, count = re.subn(pattern, replacement, content, count=1)
|
|
149
|
+
|
|
150
|
+
if count == 0:
|
|
151
|
+
print("Warning: Could not find __version__ in __init__.py")
|
|
152
|
+
return False
|
|
153
|
+
|
|
154
|
+
init_path.write_text(new_content)
|
|
155
|
+
return True
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
def main():
|
|
159
|
+
parser = argparse.ArgumentParser(
|
|
160
|
+
description="Sync version across all project files from CHANGELOG.md"
|
|
161
|
+
)
|
|
162
|
+
parser.add_argument(
|
|
163
|
+
"--check",
|
|
164
|
+
action="store_true",
|
|
165
|
+
help="Check if versions are in sync without updating",
|
|
166
|
+
)
|
|
167
|
+
parser.add_argument(
|
|
168
|
+
"--version",
|
|
169
|
+
type=str,
|
|
170
|
+
help="Set a specific version instead of reading from CHANGELOG",
|
|
171
|
+
)
|
|
172
|
+
args = parser.parse_args()
|
|
173
|
+
|
|
174
|
+
root = get_project_root()
|
|
175
|
+
changelog_path = root / "CHANGELOG.md"
|
|
176
|
+
readme_path = root / "README.md"
|
|
177
|
+
pyproject_path = root / "pyproject.toml"
|
|
178
|
+
init_path = root / "tooling" / "scripts" / "lib" / "__init__.py"
|
|
179
|
+
|
|
180
|
+
# Get versions from all sources
|
|
181
|
+
changelog_version = get_changelog_version(changelog_path)
|
|
182
|
+
readme_version = get_readme_version(readme_path)
|
|
183
|
+
pyproject_version = get_pyproject_version(pyproject_path)
|
|
184
|
+
init_version = get_init_version(init_path)
|
|
185
|
+
|
|
186
|
+
if args.version:
|
|
187
|
+
target_version = args.version
|
|
188
|
+
elif changelog_version:
|
|
189
|
+
target_version = changelog_version
|
|
190
|
+
else:
|
|
191
|
+
print("Error: Could not determine version from CHANGELOG.md")
|
|
192
|
+
sys.exit(1)
|
|
193
|
+
|
|
194
|
+
print(f"CHANGELOG version: {changelog_version or 'not found'}")
|
|
195
|
+
print(f"README version: {readme_version or 'not found'}")
|
|
196
|
+
print(f"pyproject version: {pyproject_version or 'not found'}")
|
|
197
|
+
print(f"__init__ version: {init_version or 'not found'}")
|
|
198
|
+
print(f"Target version: {target_version}")
|
|
199
|
+
print()
|
|
200
|
+
|
|
201
|
+
if args.check:
|
|
202
|
+
all_match = all(
|
|
203
|
+
v == target_version
|
|
204
|
+
for v in [readme_version, pyproject_version, init_version]
|
|
205
|
+
if v is not None
|
|
206
|
+
)
|
|
207
|
+
if all_match:
|
|
208
|
+
print("✓ All versions are in sync")
|
|
209
|
+
sys.exit(0)
|
|
210
|
+
else:
|
|
211
|
+
print("✗ Versions are out of sync")
|
|
212
|
+
sys.exit(1)
|
|
213
|
+
|
|
214
|
+
# Update all files
|
|
215
|
+
success = True
|
|
216
|
+
|
|
217
|
+
if update_readme_version(readme_path, target_version):
|
|
218
|
+
print(f"✓ Updated README.md to version {target_version}")
|
|
219
|
+
else:
|
|
220
|
+
print("✗ Failed to update README.md")
|
|
221
|
+
success = False
|
|
222
|
+
|
|
223
|
+
if update_pyproject_version(pyproject_path, target_version):
|
|
224
|
+
print(f"✓ Updated pyproject.toml to version {target_version}")
|
|
225
|
+
else:
|
|
226
|
+
print("✗ Failed to update pyproject.toml")
|
|
227
|
+
success = False
|
|
228
|
+
|
|
229
|
+
if update_init_version(init_path, target_version):
|
|
230
|
+
print(f"✓ Updated __init__.py to version {target_version}")
|
|
231
|
+
else:
|
|
232
|
+
print("✗ Failed to update __init__.py")
|
|
233
|
+
success = False
|
|
234
|
+
|
|
235
|
+
if success:
|
|
236
|
+
print("\n✓ All versions synced successfully!")
|
|
237
|
+
print(" Don't forget to commit the changes.")
|
|
238
|
+
else:
|
|
239
|
+
print("\n⚠ Some updates failed. Check errors above.")
|
|
240
|
+
sys.exit(1)
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
if __name__ == "__main__":
|
|
244
|
+
main()
|