@pjmendonca/devflow 1.13.1 → 1.18.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/.claude/commands/agent.md +1 -1
- package/.claude/commands/bugfix.md +21 -0
- package/.claude/commands/checkpoint.md +0 -1
- package/.claude/commands/collab.md +0 -1
- package/.claude/commands/costs.md +88 -18
- package/.claude/commands/devflow.md +26 -0
- package/.claude/commands/handoff.md +0 -1
- package/.claude/commands/memory.md +0 -1
- package/.claude/commands/pair.md +0 -1
- package/.claude/commands/review.md +27 -0
- package/.claude/commands/route.md +0 -1
- package/.claude/commands/swarm.md +0 -1
- package/.claude/commands/validate.md +55 -0
- package/.claude/hooks/session-notification.sh +44 -0
- package/.claude/hooks/session-startup.sh +427 -0
- package/.claude/hooks/session-stop.sh +38 -0
- package/.claude/hooks/session_tracker.py +272 -0
- package/.claude/settings.json +38 -0
- package/.claude/skills/costs/SKILL.md +156 -0
- package/.claude/skills/validate/SKILL.md +101 -0
- package/CHANGELOG.md +254 -0
- package/README.md +207 -10
- package/bin/devflow-install.js +2 -1
- package/bin/devflow.js +5 -2
- package/lib/constants.js +0 -1
- package/lib/exec-python.js +1 -1
- package/package.json +1 -2
- package/tooling/.automation/.checkpoint_lock +1 -0
- package/tooling/.automation/agents/architect.md +19 -0
- package/tooling/.automation/agents/ba.md +19 -0
- package/tooling/.automation/agents/maintainer.md +19 -0
- package/tooling/.automation/agents/pm.md +19 -0
- package/tooling/.automation/agents/reviewer.md +1 -1
- package/tooling/.automation/agents/writer.md +19 -0
- package/tooling/.automation/benchmarks/benchmark_20251230_100119.json +314 -0
- package/tooling/.automation/benchmarks/benchmark_20251230_100216.json +314 -0
- package/tooling/.automation/costs/config.json +31 -0
- package/tooling/.automation/costs/sessions/2025-12-29_20251229_164128.json +22 -0
- package/tooling/.automation/memory/knowledge/kg_integration-test.json +707 -1
- package/tooling/.automation/memory/knowledge/kg_test-story.json +3273 -2
- package/tooling/.automation/memory/shared/shared_integration-test.json +181 -1
- package/tooling/.automation/memory/shared/shared_test-story.json +721 -1
- package/tooling/.automation/memory/shared/shared_test.json +1254 -0
- package/tooling/.automation/memory/shared/shared_validation-check.json +227 -0
- package/tooling/.automation/overrides/templates/architect/cloud-native.yaml +5 -5
- package/tooling/.automation/overrides/templates/architect/enterprise-architect.yaml +23 -5
- package/tooling/.automation/overrides/templates/architect/pragmatic-minimalist.yaml +24 -6
- package/tooling/.automation/overrides/templates/ba/agile-storyteller.yaml +4 -4
- package/tooling/.automation/overrides/templates/ba/domain-expert.yaml +4 -4
- package/tooling/.automation/overrides/templates/ba/requirements-engineer.yaml +4 -4
- package/tooling/.automation/overrides/templates/dev/performance-engineer.yaml +18 -0
- package/tooling/.automation/overrides/templates/dev/rapid-prototyper.yaml +19 -1
- package/tooling/.automation/overrides/templates/dev/security-focused.yaml +18 -0
- package/tooling/.automation/overrides/templates/dev/user-advocate.yaml +54 -0
- package/tooling/.automation/overrides/templates/maintainer/devops-maintainer.yaml +4 -4
- package/tooling/.automation/overrides/templates/maintainer/legacy-steward.yaml +4 -4
- package/tooling/.automation/overrides/templates/maintainer/oss-maintainer.yaml +4 -4
- package/tooling/.automation/overrides/templates/maintainer/reliability-engineer.yaml +55 -0
- package/tooling/.automation/overrides/templates/pm/agile-pm.yaml +4 -4
- package/tooling/.automation/overrides/templates/pm/hybrid-delivery.yaml +3 -3
- package/tooling/.automation/overrides/templates/pm/traditional-pm.yaml +4 -4
- package/tooling/.automation/overrides/templates/reviewer/quick-sanity.yaml +18 -0
- package/tooling/.automation/overrides/templates/reviewer/thorough-critic.yaml +18 -0
- package/tooling/.automation/overrides/templates/sm/agile-coach.yaml +2 -2
- package/tooling/.automation/overrides/templates/sm/startup-pm.yaml +3 -3
- package/tooling/.automation/overrides/templates/writer/api-documentarian.yaml +5 -5
- package/tooling/.automation/overrides/templates/writer/docs-as-code.yaml +4 -4
- package/tooling/.automation/overrides/templates/writer/user-guide-author.yaml +5 -5
- package/tooling/.automation/validation/history/2025-12-29_val_002a28c1.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_01273bb1.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_03369914.json +41 -0
- package/tooling/.automation/validation/history/2025-12-29_val_07a449ba.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_0df1f0a2.json +41 -0
- package/tooling/.automation/validation/history/2025-12-29_val_10ff3d34.json +41 -0
- package/tooling/.automation/validation/history/2025-12-29_val_110771d7.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_13f3a7f9.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_17ba9d21.json +41 -0
- package/tooling/.automation/validation/history/2025-12-29_val_22247089.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_227ea6a4.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_2335d5ae.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_246824bb.json +41 -0
- package/tooling/.automation/validation/history/2025-12-29_val_28b4b9cd.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_2abd12cc.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_2c801b2f.json +59 -0
- package/tooling/.automation/validation/history/2025-12-29_val_2c8cfa8e.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_2ce76eb0.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_30351948.json +41 -0
- package/tooling/.automation/validation/history/2025-12-29_val_30eb7229.json +41 -0
- package/tooling/.automation/validation/history/2025-12-29_val_34df0e77.json +41 -0
- package/tooling/.automation/validation/history/2025-12-29_val_376e4d6a.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_3a4e8a1a.json +59 -0
- package/tooling/.automation/validation/history/2025-12-29_val_3b77a628.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_3ea4e1cf.json +59 -0
- package/tooling/.automation/validation/history/2025-12-29_val_44aacdb4.json +59 -0
- package/tooling/.automation/validation/history/2025-12-29_val_457ddfa8.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_45af6238.json +41 -0
- package/tooling/.automation/validation/history/2025-12-29_val_4735dba1.json +41 -0
- package/tooling/.automation/validation/history/2025-12-29_val_486b203c.json +41 -0
- package/tooling/.automation/validation/history/2025-12-29_val_49dc56cd.json +59 -0
- package/tooling/.automation/validation/history/2025-12-29_val_4d863d6d.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_5149a808.json +59 -0
- package/tooling/.automation/validation/history/2025-12-29_val_52e0bb43.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_585d6319.json +59 -0
- package/tooling/.automation/validation/history/2025-12-29_val_5b2d859a.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_635a7081.json +41 -0
- package/tooling/.automation/validation/history/2025-12-29_val_64df4905.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_70634cee.json +41 -0
- package/tooling/.automation/validation/history/2025-12-29_val_714553f9.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_7f7bfdbf.json +41 -0
- package/tooling/.automation/validation/history/2025-12-29_val_7faad91d.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_81821f8f.json +41 -0
- package/tooling/.automation/validation/history/2025-12-29_val_8249f3c9.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_8422b50f.json +41 -0
- package/tooling/.automation/validation/history/2025-12-29_val_8446c134.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_879f4e26.json +59 -0
- package/tooling/.automation/validation/history/2025-12-29_val_8b6d5bd7.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_8c5cd787.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_91d20bc7.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_958a12b7.json +41 -0
- package/tooling/.automation/validation/history/2025-12-29_val_95d91108.json +41 -0
- package/tooling/.automation/validation/history/2025-12-29_val_980dbb74.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_9e40c79b.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_9f499b7c.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_9f7c3b57.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_a30d5bd4.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_a6eb09c7.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_a86f7b83.json +41 -0
- package/tooling/.automation/validation/history/2025-12-29_val_ad5347e1.json +41 -0
- package/tooling/.automation/validation/history/2025-12-29_val_b0a5a993.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_bcb0192e.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_bf3c9aaa.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_c461ff88.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_c4f4e258.json +41 -0
- package/tooling/.automation/validation/history/2025-12-29_val_c7f0fa6d.json +41 -0
- package/tooling/.automation/validation/history/2025-12-29_val_c911b0e6.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_cc581964.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_cdd5a33b.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_cfd42495.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_d1c7a4ee.json +41 -0
- package/tooling/.automation/validation/history/2025-12-29_val_d2280d0e.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_d2a6ff69.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_d8c53ab2.json +59 -0
- package/tooling/.automation/validation/history/2025-12-29_val_d9c1247a.json +41 -0
- package/tooling/.automation/validation/history/2025-12-29_val_d9d58569.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_dabb4fd9.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_dd8fe359.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_decdffc9.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_e3a95476.json +59 -0
- package/tooling/.automation/validation/history/2025-12-29_val_e776dfca.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_ea70969f.json +59 -0
- package/tooling/.automation/validation/history/2025-12-29_val_ef41ea95.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_f384f9b1.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_f8adc38c.json +41 -0
- package/tooling/.automation/validation/history/2025-12-29_val_fa40b69e.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_fc538d54.json +41 -0
- package/tooling/.automation/validation/history/2025-12-29_val_fe814665.json +32 -0
- package/tooling/.automation/validation/history/2025-12-29_val_ffea4b12.json +32 -0
- package/tooling/.automation/validation/history/2025-12-30_val_02d001e5.json +59 -0
- package/tooling/.automation/validation/history/2025-12-30_val_0b8966dc.json +32 -0
- package/tooling/.automation/validation/history/2025-12-30_val_15455fbf.json +59 -0
- package/tooling/.automation/validation/history/2025-12-30_val_157e34b9.json +32 -0
- package/tooling/.automation/validation/history/2025-12-30_val_28d1d933.json +32 -0
- package/tooling/.automation/validation/history/2025-12-30_val_3442a52c.json +32 -0
- package/tooling/.automation/validation/history/2025-12-30_val_37f1ce1e.json +32 -0
- package/tooling/.automation/validation/history/2025-12-30_val_4f1d8a93.json +32 -0
- package/tooling/.automation/validation/history/2025-12-30_val_56ff1de3.json +32 -0
- package/tooling/.automation/validation/history/2025-12-30_val_664fd4e2.json +41 -0
- package/tooling/.automation/validation/history/2025-12-30_val_66afb0a7.json +32 -0
- package/tooling/.automation/validation/history/2025-12-30_val_7634663c.json +41 -0
- package/tooling/.automation/validation/history/2025-12-30_val_8ea830c3.json +41 -0
- package/tooling/.automation/validation/history/2025-12-30_val_998957c2.json +32 -0
- package/tooling/.automation/validation/history/2025-12-30_val_a52177db.json +32 -0
- package/tooling/.automation/validation/history/2025-12-30_val_a5b65a63.json +32 -0
- package/tooling/.automation/validation/history/2025-12-30_val_ae391d0e.json +32 -0
- package/tooling/.automation/validation/history/2025-12-30_val_c7895339.json +41 -0
- package/tooling/.automation/validation/history/2025-12-30_val_ca416593.json +41 -0
- package/tooling/.automation/validation/history/2025-12-30_val_cee19422.json +32 -0
- package/tooling/.automation/validation/history/2025-12-30_val_ddd4f4e6.json +32 -0
- package/tooling/.automation/validation/history/2025-12-30_val_f2e1394b.json +32 -0
- package/tooling/.automation/validation/history/2025-12-30_val_f4a7fa06.json +41 -0
- package/tooling/.automation/validation/history/2025-12-30_val_ffea3369.json +32 -0
- package/tooling/.automation/validation-config.yaml +103 -0
- package/tooling/completions/DevflowCompletion.ps1 +21 -21
- package/tooling/completions/_run-story +3 -3
- package/tooling/completions/run-story-completion.bash +8 -8
- package/tooling/docs/DOC-STANDARD.md +14 -14
- package/tooling/docs/templates/migration-spec.md +4 -4
- package/tooling/scripts/context_checkpoint.py +5 -15
- package/tooling/scripts/cost_dashboard.py +610 -13
- package/tooling/scripts/create-persona.py +1 -12
- package/tooling/scripts/create-persona.sh +44 -44
- package/tooling/scripts/lib/__init__.py +12 -1
- package/tooling/scripts/lib/agent_handoff.py +11 -2
- package/tooling/scripts/lib/agent_router.py +31 -10
- package/tooling/scripts/lib/colors.py +106 -0
- package/tooling/scripts/lib/context_monitor.py +766 -0
- package/tooling/scripts/lib/cost_config.py +229 -10
- package/tooling/scripts/lib/cost_display.py +20 -45
- package/tooling/scripts/lib/cost_tracker.py +462 -15
- package/tooling/scripts/lib/currency_converter.py +28 -5
- package/tooling/scripts/lib/pair_programming.py +102 -3
- package/tooling/scripts/lib/personality_system.py +949 -0
- package/tooling/scripts/lib/platform.py +55 -0
- package/tooling/scripts/lib/shared_memory.py +9 -3
- package/tooling/scripts/lib/swarm_orchestrator.py +514 -75
- package/tooling/scripts/lib/validation_loop.py +1014 -0
- package/tooling/scripts/memory_summarize.py +9 -2
- package/tooling/scripts/new-doc.py +2 -9
- package/tooling/scripts/personalize_agent.py +1 -12
- package/tooling/scripts/rollback-migration.sh +60 -60
- package/tooling/scripts/run-collab.ps1 +16 -16
- package/tooling/scripts/run-collab.py +88 -53
- package/tooling/scripts/run-collab.sh +4 -4
- package/tooling/scripts/run-story.py +278 -20
- package/tooling/scripts/run-story.sh +3 -3
- package/tooling/scripts/setup-checkpoint-service.py +2 -9
- package/tooling/scripts/tech-debt-tracker.py +1 -12
- package/tooling/scripts/test_adversarial_swarm.py +452 -0
- package/tooling/scripts/update_version.py +48 -2
- package/tooling/scripts/validate-overrides.py +1 -10
- package/tooling/scripts/validate-overrides.sh +40 -40
- package/tooling/scripts/validate_loop.py +162 -0
- package/tooling/scripts/validate_setup.py +2 -30
- package/.claude/skills/init/SKILL.md +0 -496
- package/bin/devflow-init.js +0 -10
- package/tooling/scripts/init-project-workflow.ps1 +0 -651
- package/tooling/scripts/init-project-workflow.py +0 -70
- package/tooling/scripts/init-project-workflow.sh +0 -746
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,257 @@ 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.18.0] - 2025-12-30
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **Adversarial Swarm Mode** - Multi-agent debates with opposing personas for robust designs
|
|
12
|
+
- `personality_system.py` - Dynamic persona selection and adversarial stance management
|
|
13
|
+
- `PersonalitySelector` - Analyzes tasks and selects opposing personas automatically
|
|
14
|
+
- `ConvergenceDetector` - Hybrid convergence detection (position stability + token budget)
|
|
15
|
+
- `PersonalityHandoff` - Structured handoff with debate summary for implementing agent
|
|
16
|
+
- Agents assigned adversarial stances that naturally oppose each other
|
|
17
|
+
- Cross-challenge prompts force agents to defend positions and find edge cases
|
|
18
|
+
- Automatic consensus/convergence detection ends debates efficiently
|
|
19
|
+
|
|
20
|
+
- **Adversarial Stance Templates** - Added `adversarial_stance` to persona templates
|
|
21
|
+
- `primary_concern` - Agent's core focus (security, velocity, simplicity, etc.)
|
|
22
|
+
- `opposes` - Stances this persona naturally challenges
|
|
23
|
+
- `challenge_triggers` - Phrases that trigger pushback
|
|
24
|
+
- `debate_style` - How the agent argues (assertive, questioning, evidence-based)
|
|
25
|
+
- Updated templates: thorough-critic, security-focused, rapid-prototyper,
|
|
26
|
+
quick-sanity, enterprise-architect, pragmatic-minimalist, performance-engineer
|
|
27
|
+
|
|
28
|
+
- **New Persona Templates** for better adversarial coverage
|
|
29
|
+
- `dev/user-advocate.yaml` - UX-focused developer who champions end users
|
|
30
|
+
- `maintainer/reliability-engineer.yaml` - Reliability/SRE perspective on failure modes
|
|
31
|
+
|
|
32
|
+
- **Test Harness for Swarm Performance** - Benchmark and analyze debate effectiveness
|
|
33
|
+
- `test_adversarial_swarm.py` - Simulated testing without LLM calls
|
|
34
|
+
- Tracks per-round metrics: new arguments, challenges, concessions, agreement
|
|
35
|
+
- Calculates marginal value per round to identify diminishing returns
|
|
36
|
+
- Generates performance plots (matplotlib) showing trends over rounds
|
|
37
|
+
- Saves benchmark results to `tooling/.automation/benchmarks/`
|
|
38
|
+
|
|
39
|
+
### Changed
|
|
40
|
+
- **SwarmOrchestrator** - Now adversarial by default
|
|
41
|
+
- Prompts restructured for debate format with cross-challenges
|
|
42
|
+
- Agents receive opponent positions and must respond to challenges
|
|
43
|
+
- Concession tracking for convergence detection
|
|
44
|
+
- PersonalityHandoff generated with consensus points and unresolved tensions
|
|
45
|
+
|
|
46
|
+
## [1.17.0] - 2025-12-29
|
|
47
|
+
|
|
48
|
+
### Added
|
|
49
|
+
- **Usage Projection & Forecasting** - Predict when subscription limits will be reached
|
|
50
|
+
- `cost_tracker.py` - `get_usage_projection()` calculates daily averages and forecasts
|
|
51
|
+
- Dashboard shows "At current rate, limit reached in X days" warnings
|
|
52
|
+
- Displays projected end-of-period usage vs limit
|
|
53
|
+
- Color-coded on-track/warning/critical status
|
|
54
|
+
- **Model Efficiency Metrics** - Cost-per-output-token analysis
|
|
55
|
+
- `cost_tracker.py` - `get_model_efficiency()` ranks models by efficiency
|
|
56
|
+
- `cost_dashboard.py` - `--efficiency` / `-E` flag to display metrics
|
|
57
|
+
- Shows: $/1K output tokens, output/input ratio, calls, total cost
|
|
58
|
+
- Highlights most cost-efficient model with [BEST] badge
|
|
59
|
+
- **Subscription Plan Presets** - Easy configuration with common plans
|
|
60
|
+
- `cost_config.py` - `SUBSCRIPTION_PLANS` with free/developer/pro/scale/enterprise
|
|
61
|
+
- `--set-plan` CLI flag to configure and persist plan
|
|
62
|
+
- Environment variable: `SUBSCRIPTION_PLAN=pro`
|
|
63
|
+
- Auto-saves to config.json for persistence
|
|
64
|
+
- **Analytics Export System** - Comprehensive reports with trends and rankings
|
|
65
|
+
- `--schedule-export` flag generates full analytics report
|
|
66
|
+
- Daily usage trends (last 14 days with tokens, cost, sessions)
|
|
67
|
+
- Per-story cost rankings (top 10 by token consumption)
|
|
68
|
+
- Period comparison (current vs previous period with deltas)
|
|
69
|
+
- API rate statistics (calls/day, calls/hour, peak times)
|
|
70
|
+
- Export formats: JSON (full data), Markdown (formatted report)
|
|
71
|
+
- **API Rate Tracking** - Monitor API call patterns
|
|
72
|
+
- `cost_tracker.py` - `get_api_rate_stats()` for call frequency analysis
|
|
73
|
+
- Tracks: total calls, calls per day/hour, peak hour, peak day
|
|
74
|
+
- Hourly and daily distribution data for pattern analysis
|
|
75
|
+
|
|
76
|
+
## [1.16.0] - 2025-12-29
|
|
77
|
+
|
|
78
|
+
### Added
|
|
79
|
+
- **Subscription Usage Tracking** - Track token usage against API subscription limits
|
|
80
|
+
- `cost_config.py` - New `subscription_token_limit` and `subscription_billing_period_days` settings
|
|
81
|
+
- `cost_tracker.py` - `get_subscription_usage()` and `get_subscription_percentage()` methods
|
|
82
|
+
- `cost_dashboard.py` - `--subscription` / `-S` flag to display subscription usage
|
|
83
|
+
- Environment variable support: `SUBSCRIPTION_TOKEN_LIMIT`, `SUBSCRIPTION_BILLING_PERIOD_DAYS`
|
|
84
|
+
- Progress bar visualization with color-coded status (ok/warning/critical/exceeded)
|
|
85
|
+
- Subscription summary included in `--summary` view when configured
|
|
86
|
+
- Tracks: used tokens, remaining tokens, percentage, billing period, total cost
|
|
87
|
+
|
|
88
|
+
## [1.15.0] - 2025-12-29
|
|
89
|
+
|
|
90
|
+
### Added
|
|
91
|
+
- **Context Monitor** - Real-time context window tracking and compaction awareness
|
|
92
|
+
- `lib/context_monitor.py` - Core context monitoring with threshold detection
|
|
93
|
+
- Tracks token usage and estimates context window consumption
|
|
94
|
+
- Five-level threshold system: SAFE, CAUTION, WARNING, CRITICAL, EMERGENCY
|
|
95
|
+
- Automatic checkpoint triggers at critical thresholds
|
|
96
|
+
- Activity tracking (current agent, phase, task) for status display
|
|
97
|
+
- **Persistent Status Line** - Always-visible CLI status during operations
|
|
98
|
+
- Shows: Agent, Phase, Context%, Cost, Time in compact format
|
|
99
|
+
- Color-coded context indicators based on usage level
|
|
100
|
+
- Phase progress display (e.g., "[2/3] DEV Development (0:45)")
|
|
101
|
+
- Proactive warnings before compaction thresholds
|
|
102
|
+
- **Status Line Integration** - Added to story runner
|
|
103
|
+
- `run-story.py` - Integrated context monitor with cost tracking
|
|
104
|
+
- Real-time status updates during phase execution
|
|
105
|
+
- Auto-checkpoint at critical/emergency context levels
|
|
106
|
+
- **Unit Tests** - Comprehensive test coverage
|
|
107
|
+
- `tests/test_context_monitor.py` - 38 tests for context monitoring
|
|
108
|
+
|
|
109
|
+
### Changed
|
|
110
|
+
- **NativeRunner** - Now includes context monitoring alongside cost tracking
|
|
111
|
+
- **.gitignore** - Added context and checkpoint directories for user-specific data
|
|
112
|
+
|
|
113
|
+
## [1.14.0] - 2025-12-29
|
|
114
|
+
|
|
115
|
+
### Added
|
|
116
|
+
- **Validation Loop Framework** - Three-tier automated feedback and validation system
|
|
117
|
+
- `lib/validation_loop.py` - Core validation engine with configurable gates
|
|
118
|
+
- Tier 1 (Pre-flight): Story exists, budget available, dependencies valid
|
|
119
|
+
- Tier 2 (Inter-phase): Code compiles, lint passes, phase transitions
|
|
120
|
+
- Tier 3 (Post-completion): Tests pass, types valid, version synced
|
|
121
|
+
- Auto-fix capability for lint and formatting issues
|
|
122
|
+
- Validation history tracking in shared memory/knowledge graph
|
|
123
|
+
- **Validation Integration** - Added to all agent pipelines
|
|
124
|
+
- `run-story.py` - Pre-flight, inter-phase, and post-completion validation
|
|
125
|
+
- `run-collab.py` - Pre-flight and post-completion validation
|
|
126
|
+
- `swarm_orchestrator.py` - Inter-iteration validation
|
|
127
|
+
- `pair_programming.py` - Inter-revision validation
|
|
128
|
+
- **Validation CLI** - New command and skill for running validation
|
|
129
|
+
- `/validate` command in `.claude/commands/validate.md`
|
|
130
|
+
- Validate skill in `.claude/skills/validate/SKILL.md`
|
|
131
|
+
- Standalone script `tooling/scripts/validate_loop.py` for CI/CLI usage
|
|
132
|
+
- **Validation Configuration** - YAML-based configuration
|
|
133
|
+
- `tooling/.automation/validation-config.yaml` - Gate configuration
|
|
134
|
+
- Per-gate overrides for timeouts, commands, and auto-fix
|
|
135
|
+
- **CI Integration** - Validation in CI/CD pipeline
|
|
136
|
+
- New `validation-loop` job in `.github/workflows/ci.yml`
|
|
137
|
+
- Pre-commit hooks for validation in `.pre-commit-config.yaml`
|
|
138
|
+
- **Unit Tests** - Comprehensive test coverage
|
|
139
|
+
- `tests/test_validation_loop.py` - Tests for validation system
|
|
140
|
+
|
|
141
|
+
### Changed
|
|
142
|
+
- **SwarmConfig** - Added `validation_enabled` flag (default: true)
|
|
143
|
+
- **PairConfig** - Added `validation_enabled` flag (default: true)
|
|
144
|
+
|
|
145
|
+
## [1.13.6] - 2025-12-29
|
|
146
|
+
|
|
147
|
+
### Fixed
|
|
148
|
+
- **Logic Bug in Prompt Sanitization** - Fixed always-true condition in `_sanitize_prompt()`
|
|
149
|
+
- `swarm_orchestrator.py` - Condition `(ord(char) >= 32 or ord(char) >= 128)` was always true
|
|
150
|
+
- `pair_programming.py` - Same bug fixed
|
|
151
|
+
- Now correctly filters control characters while preserving printable content
|
|
152
|
+
- **Environment Variable Validation** - Added safe parsing in `cost_config.py`
|
|
153
|
+
- `from_env()` now uses `_safe_float()` and `_safe_int()` helpers
|
|
154
|
+
- Invalid values are logged and defaults are used instead of crashing
|
|
155
|
+
- **Module-level Import** - Moved `import re` to module level in `cost_tracker.py`
|
|
156
|
+
- Was previously inside `parse_token_usage()` function
|
|
157
|
+
- Improves import time consistency
|
|
158
|
+
|
|
159
|
+
## [1.13.5] - 2025-12-29
|
|
160
|
+
|
|
161
|
+
### Added
|
|
162
|
+
- **Subprocess Sanitization** - Security hardening for agent invocations
|
|
163
|
+
- `swarm_orchestrator.py` - Added `_sanitize_prompt()` for safe subprocess execution
|
|
164
|
+
- `pair_programming.py` - Same sanitization to prevent injection attacks
|
|
165
|
+
- Removes null bytes, control characters, and enforces length limits
|
|
166
|
+
- **Pricing Cache** - Performance optimization for cost calculations
|
|
167
|
+
- `cost_tracker.py` - Added `_get_pricing()` with model lookup caching
|
|
168
|
+
- Eliminates repeated dictionary iterations for same models
|
|
169
|
+
|
|
170
|
+
### Fixed
|
|
171
|
+
- **Dead Code** - Removed unused code paths in `run-collab.py`
|
|
172
|
+
- Fixed unused `prompt` variable (was discarded f-string)
|
|
173
|
+
- Now captures and reports `run_sequential_mode()` return value
|
|
174
|
+
- **Input Validation** - Added type validation in `cost_tracker.py`
|
|
175
|
+
- `calculate_cost()` now validates token inputs are numeric
|
|
176
|
+
- Raises `CalculationError` with helpful message for invalid inputs
|
|
177
|
+
- **Negative Padding Crash** - Fixed crash in `cost_display.py`
|
|
178
|
+
- `_content_line()` now truncates content if too long
|
|
179
|
+
- Prevents negative padding that caused display errors
|
|
180
|
+
- **Atomic File Writes** - Prevent config corruption in `currency_converter.py`
|
|
181
|
+
- `save_config()` now writes to temp file first, then atomic rename
|
|
182
|
+
- Cleans up temp file on failure
|
|
183
|
+
|
|
184
|
+
### Changed
|
|
185
|
+
- **Configurable Constants** - Extracted hardcoded values in `agent_router.py`
|
|
186
|
+
- `CONFIDENCE_BASE`, `CONFIDENCE_PATTERN_WEIGHT`, `CONFIDENCE_FILE_CONTEXT_WEIGHT`
|
|
187
|
+
- `COMPLEXITY_SIMPLE_THRESHOLD`, `COST_OPT_COMPLEXITY_THRESHOLD`, `MAX_ALTERNATIVES`
|
|
188
|
+
- **Pre-compiled Patterns** - Performance optimization in `agent_router.py`
|
|
189
|
+
- `COMPILED_TASK_PATTERNS` - Pre-compiled regex for task type detection
|
|
190
|
+
- Faster pattern matching in `analyze_task()` method
|
|
191
|
+
|
|
192
|
+
## [1.13.4] - 2025-12-27
|
|
193
|
+
|
|
194
|
+
### Added
|
|
195
|
+
- **Pre-commit Configuration** - New `.pre-commit-config.yaml` for automated code quality
|
|
196
|
+
- Ruff linting and formatting
|
|
197
|
+
- MyPy type checking
|
|
198
|
+
- Shell script linting with shellcheck
|
|
199
|
+
- General file hygiene (trailing whitespace, YAML/JSON validation)
|
|
200
|
+
- **Agent Router Tests** - Comprehensive test suite for `agent_router.py`
|
|
201
|
+
- Tests for task type detection, complexity estimation, routing logic
|
|
202
|
+
- Tests for workflow selection and alternative agent suggestions
|
|
203
|
+
|
|
204
|
+
### Fixed
|
|
205
|
+
- **Bare Exception Handling** - Replaced broad `except Exception` with specific types
|
|
206
|
+
- `cost_config.py` - Now catches `json.JSONDecodeError` and `OSError` separately
|
|
207
|
+
- `currency_converter.py` - Now catches `json.JSONDecodeError` and `OSError` separately
|
|
208
|
+
- `agent_handoff.py` - Git operations now catch `subprocess.SubprocessError`
|
|
209
|
+
- **Silent Failures** - Added warning messages to previously silent catch blocks
|
|
210
|
+
- `shared_memory.py` - Now logs warnings for corrupted memory/knowledge graph files
|
|
211
|
+
- `agent_handoff.py` - Now logs warnings when git operations fail
|
|
212
|
+
- **Regex Performance** - Pre-compiled regex patterns in `memory_summarize.py`
|
|
213
|
+
|
|
214
|
+
### Changed
|
|
215
|
+
- **Environment Variables** - Standardized on `os.getenv()` across all files
|
|
216
|
+
- Updated `colors.py`, `cost_display.py`, `run-collab.py`
|
|
217
|
+
- Consistent pattern for environment variable access
|
|
218
|
+
|
|
219
|
+
## [1.13.3] - 2025-12-27
|
|
220
|
+
|
|
221
|
+
### Added
|
|
222
|
+
- **Shared Python Libraries** - New reusable modules in `lib/`
|
|
223
|
+
- `colors.py` - Consolidated ANSI color codes with cross-platform support
|
|
224
|
+
- `platform.py` - Unified platform detection utilities
|
|
225
|
+
- **Agent Improvements** - Enhanced all agent definitions
|
|
226
|
+
- Added "When Complete" sections to ARCHITECT, MAINTAINER, BA, PM, WRITER agents
|
|
227
|
+
- Added "Context Management" sections to all agents missing them
|
|
228
|
+
- **Command Documentation** - Expanded command help files
|
|
229
|
+
- Enhanced `/bugfix` with workflow description and options
|
|
230
|
+
- Enhanced `/devflow` with full command reference table
|
|
231
|
+
- Enhanced `/review` with verdict explanations and options
|
|
232
|
+
|
|
233
|
+
### Fixed
|
|
234
|
+
- **JavaScript Bug** - Fixed no-op ternary in `lib/exec-python.js:53-55` that did nothing
|
|
235
|
+
- **Stale Reference** - Removed orphaned `devflow-init` from `lib/constants.js`
|
|
236
|
+
- **Error Handling** - Added error handler to `spawn()` in `bin/devflow.js`
|
|
237
|
+
- **Silent Failures** - Added error logging to `bin/devflow-install.js`
|
|
238
|
+
- **Regex Bug** - Fixed `.match()` to `.test()` in `bin/devflow-install.js:30`
|
|
239
|
+
- **Empty List Crash** - Added guard for empty list in `memory_summarize.py:138`
|
|
240
|
+
- **Emoji Policy Violation** - Removed emojis from `CONTRIBUTING.md` table
|
|
241
|
+
- **README Examples** - Updated deprecated `./run-story.sh` to `npx @pjmendonca/devflow story`
|
|
242
|
+
- **SECURITY Agent** - Removed references to non-existent SECURITY agent from README
|
|
243
|
+
|
|
244
|
+
### Changed
|
|
245
|
+
- **DOC-STANDARD.md** - Renamed from "Stronger Project" to "Devflow"
|
|
246
|
+
- **DOC-STANDARD.md** - Updated callout conventions to use text-based format (no emojis)
|
|
247
|
+
- **REVIEWER Agent** - Fixed contradictory "rubber stamping" rule
|
|
248
|
+
- **Agent Command** - Added missing `writer` to available agents list
|
|
249
|
+
- **.gitignore** - Added `.claude/plans/` exclusion
|
|
250
|
+
|
|
251
|
+
## [1.13.2] - 2025-12-27
|
|
252
|
+
|
|
253
|
+
### Removed
|
|
254
|
+
- **CLI Init Command** - Removed `devflow init` in favor of `/init` skill
|
|
255
|
+
- Deleted `bin/devflow-init.js` and related shell scripts
|
|
256
|
+
- Removed from `package.json` bin entries
|
|
257
|
+
- All initialization now handled by the AI-driven `/init` skill in Claude Code
|
|
258
|
+
|
|
8
259
|
## [1.13.1] - 2025-12-25
|
|
9
260
|
|
|
10
261
|
### Changed
|
|
@@ -14,6 +265,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
14
265
|
- Updated next steps messaging to include `/init` command
|
|
15
266
|
- Cleaner install experience that defers configuration to Claude Code
|
|
16
267
|
|
|
268
|
+
### Removed
|
|
269
|
+
- **Duplicate Init Command** - Removed `.claude/commands/init.md` in favor of the skill
|
|
270
|
+
|
|
17
271
|
## [1.13.0] - 2025-12-25
|
|
18
272
|
|
|
19
273
|
### Added
|
package/README.md
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
|
|
10
10
|
A production-ready, portable workflow automation system that uses Claude Code CLI to implement user stories with minimal human intervention. Think "CI/CD for development" - but instead of deploying code, it writes code.
|
|
11
11
|
|
|
12
|
+
Find us at our [discord](https://discord.gg/mHdyQ7VN8R)
|
|
13
|
+
|
|
12
14
|
### Key Features
|
|
13
15
|
|
|
14
16
|
- **Multi-Persona Agent System** - 8 specialized AI agents (SM, DEV, BA, ARCHITECT, PM, WRITER, MAINTAINER, REVIEWER)
|
|
@@ -23,6 +25,8 @@ A production-ready, portable workflow automation system that uses Claude Code CL
|
|
|
23
25
|
- **Shared Memory** - Cross-agent memory pool for context sharing and learnings
|
|
24
26
|
- **Agent Handoff System** - Structured context preservation between agent transitions
|
|
25
27
|
- **Multi-Currency Cost Tracking** - Customizable currency display with budget controls and alerts
|
|
28
|
+
- **Persistent Status Line** - Real-time context and cost percentage display in CLI
|
|
29
|
+
- **Validation Framework** - Three-tier automated validation with auto-fix capability
|
|
26
30
|
- **Project Agnostic** - Works with Flutter, Node.js, Python, Rust, Go, Ruby, etc.
|
|
27
31
|
- **Guided Setup** - Interactive wizard guides you through installation
|
|
28
32
|
|
|
@@ -275,16 +279,16 @@ Multiple agents work together, debating and iterating until consensus:
|
|
|
275
279
|
|
|
276
280
|
```bash
|
|
277
281
|
# Run swarm with default agents (ARCHITECT, DEV, REVIEWER)
|
|
278
|
-
|
|
282
|
+
npx @pjmendonca/devflow story 3-5 --swarm
|
|
279
283
|
|
|
280
284
|
# Custom agent selection
|
|
281
|
-
|
|
285
|
+
npx @pjmendonca/devflow story 3-5 --swarm --agents ARCHITECT,DEV,REVIEWER
|
|
282
286
|
|
|
283
287
|
# Control iterations
|
|
284
|
-
|
|
288
|
+
npx @pjmendonca/devflow story 3-5 --swarm --max-iter 5
|
|
285
289
|
|
|
286
290
|
# Set budget limits
|
|
287
|
-
|
|
291
|
+
npx @pjmendonca/devflow story 3-5 --swarm --budget 20.00
|
|
288
292
|
```
|
|
289
293
|
|
|
290
294
|
**Swarm Configuration Options:**
|
|
@@ -313,7 +317,7 @@ Multiple agents work together, debating and iterating until consensus:
|
|
|
313
317
|
DEV and REVIEWER work together in real-time:
|
|
314
318
|
|
|
315
319
|
```bash
|
|
316
|
-
|
|
320
|
+
npx @pjmendonca/devflow story 3-5 --pair
|
|
317
321
|
```
|
|
318
322
|
|
|
319
323
|
**How it works:**
|
|
@@ -328,16 +332,16 @@ Let Devflow automatically select the best agents:
|
|
|
328
332
|
|
|
329
333
|
```bash
|
|
330
334
|
# Auto-detect task type and select appropriate agents
|
|
331
|
-
|
|
335
|
+
npx @pjmendonca/devflow story "fix authentication bug" --auto-route
|
|
332
336
|
|
|
333
337
|
# Works with any task description
|
|
334
|
-
|
|
338
|
+
npx @pjmendonca/devflow story "add user profile feature" --auto-route
|
|
335
339
|
```
|
|
336
340
|
|
|
337
341
|
**How it works:**
|
|
338
342
|
- Analyzes task description for keywords
|
|
339
343
|
- Considers file types and complexity
|
|
340
|
-
- Routes to appropriate specialists (e.g.,
|
|
344
|
+
- Routes to appropriate specialists (e.g., bugs -> MAINTAINER agent, new features -> DEV agent)
|
|
341
345
|
|
|
342
346
|
## Cost Tracking & Currency Configuration
|
|
343
347
|
|
|
@@ -434,6 +438,199 @@ python tooling/scripts/cost_dashboard.py --summary
|
|
|
434
438
|
- **Set budget limits** - Prevent runaway costs with phase-specific limits
|
|
435
439
|
- **Monitor the dashboard** - Track spending patterns across stories
|
|
436
440
|
|
|
441
|
+
### Status Line
|
|
442
|
+
|
|
443
|
+
Devflow provides a persistent status line in Claude Code that shows real-time metrics:
|
|
444
|
+
|
|
445
|
+
```
|
|
446
|
+
[Devflow] Claude Opus 4.5 | Context: 12.3% | Cost: $0.1234 (8.2%) | +45 -12 lines
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
**What it shows:**
|
|
450
|
+
- **Model** - Current Claude model in use
|
|
451
|
+
- **Context** - Percentage of context window used (with color coding)
|
|
452
|
+
- **Cost** - Cumulative cost with subscription usage percentage
|
|
453
|
+
- **Lines** - Lines added/removed in the session
|
|
454
|
+
|
|
455
|
+
**Retroactive Cost Tracking:**
|
|
456
|
+
|
|
457
|
+
The cost percentage is calculated retroactively across all sessions in your billing period:
|
|
458
|
+
- Reads all session files from `tooling/.automation/costs/sessions/`
|
|
459
|
+
- Sums tokens used within the billing period (default: 30 days)
|
|
460
|
+
- Shows percentage of your subscription token limit used
|
|
461
|
+
- Updates in real-time as you work
|
|
462
|
+
|
|
463
|
+
**Color coding for cost percentage:**
|
|
464
|
+
- **Green** - Under 75% of subscription limit
|
|
465
|
+
- **Yellow** - 75-89% of subscription limit (warning)
|
|
466
|
+
- **Red** - 90%+ of subscription limit (critical)
|
|
467
|
+
|
|
468
|
+
**Configuration:**
|
|
469
|
+
|
|
470
|
+
The status line reads currency settings from `tooling/.automation/costs/config.json`. To customize:
|
|
471
|
+
|
|
472
|
+
```bash
|
|
473
|
+
# Set display currency
|
|
474
|
+
export COST_DISPLAY_CURRENCY="EUR"
|
|
475
|
+
|
|
476
|
+
# Or edit config.json:
|
|
477
|
+
{
|
|
478
|
+
"display_currency": "BRL",
|
|
479
|
+
"currency_rates": {
|
|
480
|
+
"USD": 1.0,
|
|
481
|
+
"BRL": 6.10,
|
|
482
|
+
"EUR": 0.92
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
### Subscription Usage Tracking
|
|
488
|
+
|
|
489
|
+
Track your usage against API subscription limits:
|
|
490
|
+
|
|
491
|
+
```bash
|
|
492
|
+
# View subscription usage
|
|
493
|
+
python tooling/scripts/cost_dashboard.py --subscription
|
|
494
|
+
|
|
495
|
+
# Set your plan manually
|
|
496
|
+
python tooling/scripts/cost_dashboard.py --set-plan pro
|
|
497
|
+
|
|
498
|
+
# View usage projection
|
|
499
|
+
python tooling/scripts/cost_dashboard.py --subscription
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
**Auto-Detection:**
|
|
503
|
+
|
|
504
|
+
Devflow automatically detects your subscription plan based on the model you're using:
|
|
505
|
+
- **Opus** users -> Pro plan (5M tokens/month)
|
|
506
|
+
- **Sonnet** users -> Developer plan (1M tokens/month)
|
|
507
|
+
- **Haiku** users -> Free plan (100K tokens/month)
|
|
508
|
+
|
|
509
|
+
The detected plan is saved to `tooling/.automation/costs/config.json` for future sessions.
|
|
510
|
+
|
|
511
|
+
**Available plans:** free, developer, pro, scale, enterprise
|
|
512
|
+
|
|
513
|
+
**Manual configuration (overrides auto-detection):**
|
|
514
|
+
```bash
|
|
515
|
+
export SUBSCRIPTION_PLAN="pro" # Use a preset plan
|
|
516
|
+
export SUBSCRIPTION_TOKEN_LIMIT=5000000 # Or set custom limit
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
### Model Efficiency Metrics
|
|
520
|
+
|
|
521
|
+
Analyze which models give you the best value:
|
|
522
|
+
|
|
523
|
+
```bash
|
|
524
|
+
python tooling/scripts/cost_dashboard.py --efficiency
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
Shows cost-per-output-token for each model, helping optimize model selection.
|
|
528
|
+
|
|
529
|
+
### Usage Projection & Forecasting
|
|
530
|
+
|
|
531
|
+
Predict when you'll reach your subscription limits:
|
|
532
|
+
|
|
533
|
+
```bash
|
|
534
|
+
# View usage projection in subscription view
|
|
535
|
+
python tooling/scripts/cost_dashboard.py --subscription
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
**What it shows:**
|
|
539
|
+
- Daily average token consumption
|
|
540
|
+
- Projected days until limit reached
|
|
541
|
+
- End-of-period usage forecast vs limit
|
|
542
|
+
- Color-coded status: on-track (green), warning (yellow), critical (red)
|
|
543
|
+
|
|
544
|
+
### Analytics Export System
|
|
545
|
+
|
|
546
|
+
Generate comprehensive analytics reports:
|
|
547
|
+
|
|
548
|
+
```bash
|
|
549
|
+
# Generate full analytics report (Markdown)
|
|
550
|
+
python tooling/scripts/cost_dashboard.py --schedule-export report.md
|
|
551
|
+
|
|
552
|
+
# Export to JSON format
|
|
553
|
+
python tooling/scripts/cost_dashboard.py --schedule-export report.json
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
**Report contents:**
|
|
557
|
+
- Daily usage trends (last 14 days with tokens, cost, sessions)
|
|
558
|
+
- Per-story cost rankings (top 10 by token consumption)
|
|
559
|
+
- Period comparison (current vs previous period with deltas)
|
|
560
|
+
- API rate statistics (calls/day, calls/hour, peak times)
|
|
561
|
+
|
|
562
|
+
### API Rate Tracking
|
|
563
|
+
|
|
564
|
+
Monitor your API call patterns:
|
|
565
|
+
|
|
566
|
+
```bash
|
|
567
|
+
python tooling/scripts/cost_dashboard.py --summary
|
|
568
|
+
```
|
|
569
|
+
|
|
570
|
+
**Metrics tracked:**
|
|
571
|
+
- Total API calls in period
|
|
572
|
+
- Average calls per day/hour
|
|
573
|
+
- Peak usage hour and day
|
|
574
|
+
- Hourly and daily distribution data
|
|
575
|
+
|
|
576
|
+
## Validation Framework
|
|
577
|
+
|
|
578
|
+
Devflow includes a three-tier validation system that ensures code quality throughout the development pipeline.
|
|
579
|
+
|
|
580
|
+
### Validation Tiers
|
|
581
|
+
|
|
582
|
+
| Tier | Name | When | Validates |
|
|
583
|
+
|------|------|------|-----------|
|
|
584
|
+
| 1 | Pre-flight | Before starting | Story exists, budget available, dependencies |
|
|
585
|
+
| 2 | Inter-phase | Between phases | Code compiles, lint passes, phase transitions |
|
|
586
|
+
| 3 | Post-completion | After finishing | Tests pass, types valid, version synced |
|
|
587
|
+
|
|
588
|
+
### Running Validation
|
|
589
|
+
|
|
590
|
+
```bash
|
|
591
|
+
# Validate a story
|
|
592
|
+
/validate 3-5
|
|
593
|
+
|
|
594
|
+
# Run specific tier
|
|
595
|
+
/validate 3-5 --tier pre-flight
|
|
596
|
+
|
|
597
|
+
# Run with auto-fix for lint issues
|
|
598
|
+
/validate 3-5 --auto-fix
|
|
599
|
+
```
|
|
600
|
+
|
|
601
|
+
### Validation Gates
|
|
602
|
+
|
|
603
|
+
**Pre-flight (Tier 1):**
|
|
604
|
+
- Story file exists
|
|
605
|
+
- Budget is available
|
|
606
|
+
- Required dependencies installed
|
|
607
|
+
|
|
608
|
+
**Inter-phase (Tier 2):**
|
|
609
|
+
- TypeScript/Python compilation
|
|
610
|
+
- Linting (with auto-fix option)
|
|
611
|
+
- Phase transition rules
|
|
612
|
+
|
|
613
|
+
**Post-completion (Tier 3):**
|
|
614
|
+
- Test suite passes
|
|
615
|
+
- Type checking passes
|
|
616
|
+
- Version sync validated
|
|
617
|
+
|
|
618
|
+
### Configuration
|
|
619
|
+
|
|
620
|
+
Customize validation in `tooling/.automation/validation-config.yaml`:
|
|
621
|
+
|
|
622
|
+
```yaml
|
|
623
|
+
gates:
|
|
624
|
+
lint:
|
|
625
|
+
enabled: true
|
|
626
|
+
auto_fix: true
|
|
627
|
+
timeout: 60
|
|
628
|
+
test:
|
|
629
|
+
enabled: true
|
|
630
|
+
command: "npm test"
|
|
631
|
+
timeout: 300
|
|
632
|
+
```
|
|
633
|
+
|
|
437
634
|
## Shell Completion
|
|
438
635
|
|
|
439
636
|
Enable tab-completion for faster command entry.
|
|
@@ -550,7 +747,7 @@ Free to use in commercial and personal projects.
|
|
|
550
747
|
|
|
551
748
|
|
|
552
749
|
<!-- VERSION_START - Auto-updated by update_version.py -->
|
|
553
|
-
**Version**: 1.
|
|
750
|
+
**Version**: 1.18.0
|
|
554
751
|
**Status**: Production Ready
|
|
555
|
-
**Last Updated**: 2025-12-
|
|
752
|
+
**Last Updated**: 2025-12-30
|
|
556
753
|
<!-- VERSION_END -->
|
package/bin/devflow-install.js
CHANGED
|
@@ -14,6 +14,7 @@ if (fs.existsSync(path.join(targetDir, '.claude', 'commands', 'story.md'))) {
|
|
|
14
14
|
try {
|
|
15
15
|
execSync(`node "${path.join(__dirname, 'devflow-validate.js')}"`, { stdio: 'inherit' });
|
|
16
16
|
} catch (error) {
|
|
17
|
+
console.error('Validation failed. Please check the errors above.');
|
|
17
18
|
process.exit(1);
|
|
18
19
|
}
|
|
19
20
|
process.exit(0);
|
|
@@ -27,7 +28,7 @@ function copyDir(src, dest, exclude = []) {
|
|
|
27
28
|
const srcPath = path.join(src, entry.name);
|
|
28
29
|
const destPath = path.join(dest, entry.name);
|
|
29
30
|
|
|
30
|
-
if (exclude.some(pattern => entry.name
|
|
31
|
+
if (exclude.some(pattern => pattern.test(entry.name))) continue;
|
|
31
32
|
|
|
32
33
|
if (entry.isDirectory()) {
|
|
33
34
|
copyDir(srcPath, destPath, exclude);
|
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('
|
|
34
|
+
console.log(' /init Initialize configuration (in Claude Code)');
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
const args = process.argv.slice(2);
|
|
@@ -47,6 +46,10 @@ const command = args[0];
|
|
|
47
46
|
if (commands[command]) {
|
|
48
47
|
const binPath = require.resolve(`./devflow-${command}.js`);
|
|
49
48
|
const child = spawn('node', [binPath, ...args.slice(1)], { stdio: 'inherit' });
|
|
49
|
+
child.on('error', (err) => {
|
|
50
|
+
console.error(`Failed to execute command: ${err.message}`);
|
|
51
|
+
process.exit(1);
|
|
52
|
+
});
|
|
50
53
|
child.on('exit', (code) => process.exit(code || 0));
|
|
51
54
|
} else {
|
|
52
55
|
console.error(`Unknown command: ${command}`);
|
package/lib/constants.js
CHANGED
|
@@ -24,7 +24,6 @@ module.exports = {
|
|
|
24
24
|
'devflow-new-doc': 'new-doc.py',
|
|
25
25
|
'devflow-tech-debt': 'tech-debt-tracker.py',
|
|
26
26
|
'devflow-setup-checkpoint': 'setup-checkpoint-service.py',
|
|
27
|
-
'devflow-init': 'init-project-workflow.py',
|
|
28
27
|
'devflow-version': 'update_version.py'
|
|
29
28
|
}
|
|
30
29
|
};
|
package/lib/exec-python.js
CHANGED
|
@@ -52,7 +52,7 @@ function execPythonScript(scriptPath, args = []) {
|
|
|
52
52
|
// If scriptPath is not absolute, resolve it relative to scripts dir
|
|
53
53
|
const fullPath = path.isAbsolute(scriptPath)
|
|
54
54
|
? scriptPath
|
|
55
|
-
: scriptPath;
|
|
55
|
+
: path.join(getScriptsDir(), scriptPath);
|
|
56
56
|
|
|
57
57
|
const spawnOptions = {
|
|
58
58
|
stdio: 'inherit', // Pass through stdin, stdout, stderr
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pjmendonca/devflow",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.0",
|
|
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": [
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1767109630
|
|
@@ -133,3 +133,22 @@ For significant decisions, create an ADR:
|
|
|
133
133
|
- **Maintainability**: Code quality, documentation
|
|
134
134
|
- **Testability**: Unit, integration, E2E testing
|
|
135
135
|
- **Usability**: User experience considerations
|
|
136
|
+
|
|
137
|
+
## Context Management
|
|
138
|
+
|
|
139
|
+
When working on complex architectural designs:
|
|
140
|
+
|
|
141
|
+
1. **Monitor context usage** - Architecture docs can be lengthy; prioritize essential sections
|
|
142
|
+
2. **Create checkpoints** - Save work before context warnings appear
|
|
143
|
+
3. **Summarize decisions** - Keep ADRs concise and actionable
|
|
144
|
+
4. **Link instead of copy** - Reference existing docs rather than duplicating content
|
|
145
|
+
|
|
146
|
+
## When Complete
|
|
147
|
+
|
|
148
|
+
After completing your architectural work:
|
|
149
|
+
|
|
150
|
+
1. Save technical specifications to the working directory
|
|
151
|
+
2. Update any affected ADRs
|
|
152
|
+
3. Create a summary of key decisions and rationale
|
|
153
|
+
4. Update sprint-status.yaml to reflect completion
|
|
154
|
+
5. Note any follow-up items or dependencies for other agents
|
|
@@ -68,3 +68,22 @@ So that [benefit/value].
|
|
|
68
68
|
- Use concrete examples to illustrate requirements
|
|
69
69
|
- Ask clarifying questions when requirements are ambiguous
|
|
70
70
|
- Validate understanding by restating requirements
|
|
71
|
+
|
|
72
|
+
## Context Management
|
|
73
|
+
|
|
74
|
+
When analyzing requirements:
|
|
75
|
+
|
|
76
|
+
1. **Focus on scope** - Load only relevant existing requirements
|
|
77
|
+
2. **Create checkpoints** before lengthy analysis sessions
|
|
78
|
+
3. **Summarize findings** - Keep requirement documents concise
|
|
79
|
+
4. **Reference, don't duplicate** - Link to existing PRD sections
|
|
80
|
+
|
|
81
|
+
## When Complete
|
|
82
|
+
|
|
83
|
+
After completing business analysis:
|
|
84
|
+
|
|
85
|
+
1. Save user stories and requirements to the working directory
|
|
86
|
+
2. Verify all acceptance criteria are testable and specific
|
|
87
|
+
3. Update sprint-status.yaml with story status
|
|
88
|
+
4. Create handoff notes for DEV agent with key context
|
|
89
|
+
5. Note any open questions or dependencies
|