@pjmendonca/devflow 1.13.2 → 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.
Files changed (224) hide show
  1. package/.claude/commands/agent.md +1 -1
  2. package/.claude/commands/bugfix.md +21 -0
  3. package/.claude/commands/checkpoint.md +0 -1
  4. package/.claude/commands/collab.md +0 -1
  5. package/.claude/commands/costs.md +88 -18
  6. package/.claude/commands/devflow.md +26 -0
  7. package/.claude/commands/handoff.md +0 -1
  8. package/.claude/commands/init.md +287 -0
  9. package/.claude/commands/memory.md +0 -1
  10. package/.claude/commands/pair.md +0 -1
  11. package/.claude/commands/review.md +27 -0
  12. package/.claude/commands/route.md +0 -1
  13. package/.claude/commands/swarm.md +0 -1
  14. package/.claude/commands/validate.md +55 -0
  15. package/.claude/hooks/session-notification.sh +44 -0
  16. package/.claude/hooks/session-startup.sh +427 -0
  17. package/.claude/hooks/session-stop.sh +38 -0
  18. package/.claude/hooks/session_tracker.py +272 -0
  19. package/.claude/settings.json +38 -0
  20. package/.claude/skills/costs/SKILL.md +156 -0
  21. package/.claude/skills/validate/SKILL.md +101 -0
  22. package/CHANGELOG.md +243 -0
  23. package/README.md +207 -10
  24. package/bin/devflow-install.js +2 -1
  25. package/bin/devflow.js +4 -0
  26. package/lib/constants.js +0 -1
  27. package/lib/exec-python.js +1 -1
  28. package/package.json +1 -1
  29. package/tooling/.automation/.checkpoint_lock +1 -0
  30. package/tooling/.automation/agents/architect.md +19 -0
  31. package/tooling/.automation/agents/ba.md +19 -0
  32. package/tooling/.automation/agents/maintainer.md +19 -0
  33. package/tooling/.automation/agents/pm.md +19 -0
  34. package/tooling/.automation/agents/reviewer.md +1 -1
  35. package/tooling/.automation/agents/writer.md +19 -0
  36. package/tooling/.automation/benchmarks/benchmark_20251230_100119.json +314 -0
  37. package/tooling/.automation/benchmarks/benchmark_20251230_100216.json +314 -0
  38. package/tooling/.automation/costs/config.json +31 -0
  39. package/tooling/.automation/costs/sessions/2025-12-29_20251229_164128.json +22 -0
  40. package/tooling/.automation/memory/knowledge/kg_integration-test.json +707 -1
  41. package/tooling/.automation/memory/knowledge/kg_test-story.json +3273 -2
  42. package/tooling/.automation/memory/shared/shared_integration-test.json +181 -1
  43. package/tooling/.automation/memory/shared/shared_test-story.json +721 -1
  44. package/tooling/.automation/memory/shared/shared_test.json +1254 -0
  45. package/tooling/.automation/memory/shared/shared_validation-check.json +227 -0
  46. package/tooling/.automation/overrides/templates/architect/cloud-native.yaml +5 -5
  47. package/tooling/.automation/overrides/templates/architect/enterprise-architect.yaml +23 -5
  48. package/tooling/.automation/overrides/templates/architect/pragmatic-minimalist.yaml +24 -6
  49. package/tooling/.automation/overrides/templates/ba/agile-storyteller.yaml +4 -4
  50. package/tooling/.automation/overrides/templates/ba/domain-expert.yaml +4 -4
  51. package/tooling/.automation/overrides/templates/ba/requirements-engineer.yaml +4 -4
  52. package/tooling/.automation/overrides/templates/dev/performance-engineer.yaml +18 -0
  53. package/tooling/.automation/overrides/templates/dev/rapid-prototyper.yaml +19 -1
  54. package/tooling/.automation/overrides/templates/dev/security-focused.yaml +18 -0
  55. package/tooling/.automation/overrides/templates/dev/user-advocate.yaml +54 -0
  56. package/tooling/.automation/overrides/templates/maintainer/devops-maintainer.yaml +4 -4
  57. package/tooling/.automation/overrides/templates/maintainer/legacy-steward.yaml +4 -4
  58. package/tooling/.automation/overrides/templates/maintainer/oss-maintainer.yaml +4 -4
  59. package/tooling/.automation/overrides/templates/maintainer/reliability-engineer.yaml +55 -0
  60. package/tooling/.automation/overrides/templates/pm/agile-pm.yaml +4 -4
  61. package/tooling/.automation/overrides/templates/pm/hybrid-delivery.yaml +3 -3
  62. package/tooling/.automation/overrides/templates/pm/traditional-pm.yaml +4 -4
  63. package/tooling/.automation/overrides/templates/reviewer/quick-sanity.yaml +18 -0
  64. package/tooling/.automation/overrides/templates/reviewer/thorough-critic.yaml +18 -0
  65. package/tooling/.automation/overrides/templates/sm/agile-coach.yaml +2 -2
  66. package/tooling/.automation/overrides/templates/sm/startup-pm.yaml +3 -3
  67. package/tooling/.automation/overrides/templates/writer/api-documentarian.yaml +5 -5
  68. package/tooling/.automation/overrides/templates/writer/docs-as-code.yaml +4 -4
  69. package/tooling/.automation/overrides/templates/writer/user-guide-author.yaml +5 -5
  70. package/tooling/.automation/validation/history/2025-12-29_val_002a28c1.json +32 -0
  71. package/tooling/.automation/validation/history/2025-12-29_val_01273bb1.json +32 -0
  72. package/tooling/.automation/validation/history/2025-12-29_val_03369914.json +41 -0
  73. package/tooling/.automation/validation/history/2025-12-29_val_07a449ba.json +32 -0
  74. package/tooling/.automation/validation/history/2025-12-29_val_0df1f0a2.json +41 -0
  75. package/tooling/.automation/validation/history/2025-12-29_val_10ff3d34.json +41 -0
  76. package/tooling/.automation/validation/history/2025-12-29_val_110771d7.json +32 -0
  77. package/tooling/.automation/validation/history/2025-12-29_val_13f3a7f9.json +32 -0
  78. package/tooling/.automation/validation/history/2025-12-29_val_17ba9d21.json +41 -0
  79. package/tooling/.automation/validation/history/2025-12-29_val_22247089.json +32 -0
  80. package/tooling/.automation/validation/history/2025-12-29_val_227ea6a4.json +32 -0
  81. package/tooling/.automation/validation/history/2025-12-29_val_2335d5ae.json +32 -0
  82. package/tooling/.automation/validation/history/2025-12-29_val_246824bb.json +41 -0
  83. package/tooling/.automation/validation/history/2025-12-29_val_28b4b9cd.json +32 -0
  84. package/tooling/.automation/validation/history/2025-12-29_val_2abd12cc.json +32 -0
  85. package/tooling/.automation/validation/history/2025-12-29_val_2c801b2f.json +59 -0
  86. package/tooling/.automation/validation/history/2025-12-29_val_2c8cfa8e.json +32 -0
  87. package/tooling/.automation/validation/history/2025-12-29_val_2ce76eb0.json +32 -0
  88. package/tooling/.automation/validation/history/2025-12-29_val_30351948.json +41 -0
  89. package/tooling/.automation/validation/history/2025-12-29_val_30eb7229.json +41 -0
  90. package/tooling/.automation/validation/history/2025-12-29_val_34df0e77.json +41 -0
  91. package/tooling/.automation/validation/history/2025-12-29_val_376e4d6a.json +32 -0
  92. package/tooling/.automation/validation/history/2025-12-29_val_3a4e8a1a.json +59 -0
  93. package/tooling/.automation/validation/history/2025-12-29_val_3b77a628.json +32 -0
  94. package/tooling/.automation/validation/history/2025-12-29_val_3ea4e1cf.json +59 -0
  95. package/tooling/.automation/validation/history/2025-12-29_val_44aacdb4.json +59 -0
  96. package/tooling/.automation/validation/history/2025-12-29_val_457ddfa8.json +32 -0
  97. package/tooling/.automation/validation/history/2025-12-29_val_45af6238.json +41 -0
  98. package/tooling/.automation/validation/history/2025-12-29_val_4735dba1.json +41 -0
  99. package/tooling/.automation/validation/history/2025-12-29_val_486b203c.json +41 -0
  100. package/tooling/.automation/validation/history/2025-12-29_val_49dc56cd.json +59 -0
  101. package/tooling/.automation/validation/history/2025-12-29_val_4d863d6d.json +32 -0
  102. package/tooling/.automation/validation/history/2025-12-29_val_5149a808.json +59 -0
  103. package/tooling/.automation/validation/history/2025-12-29_val_52e0bb43.json +32 -0
  104. package/tooling/.automation/validation/history/2025-12-29_val_585d6319.json +59 -0
  105. package/tooling/.automation/validation/history/2025-12-29_val_5b2d859a.json +32 -0
  106. package/tooling/.automation/validation/history/2025-12-29_val_635a7081.json +41 -0
  107. package/tooling/.automation/validation/history/2025-12-29_val_64df4905.json +32 -0
  108. package/tooling/.automation/validation/history/2025-12-29_val_70634cee.json +41 -0
  109. package/tooling/.automation/validation/history/2025-12-29_val_714553f9.json +32 -0
  110. package/tooling/.automation/validation/history/2025-12-29_val_7f7bfdbf.json +41 -0
  111. package/tooling/.automation/validation/history/2025-12-29_val_7faad91d.json +32 -0
  112. package/tooling/.automation/validation/history/2025-12-29_val_81821f8f.json +41 -0
  113. package/tooling/.automation/validation/history/2025-12-29_val_8249f3c9.json +32 -0
  114. package/tooling/.automation/validation/history/2025-12-29_val_8422b50f.json +41 -0
  115. package/tooling/.automation/validation/history/2025-12-29_val_8446c134.json +32 -0
  116. package/tooling/.automation/validation/history/2025-12-29_val_879f4e26.json +59 -0
  117. package/tooling/.automation/validation/history/2025-12-29_val_8b6d5bd7.json +32 -0
  118. package/tooling/.automation/validation/history/2025-12-29_val_8c5cd787.json +32 -0
  119. package/tooling/.automation/validation/history/2025-12-29_val_91d20bc7.json +32 -0
  120. package/tooling/.automation/validation/history/2025-12-29_val_958a12b7.json +41 -0
  121. package/tooling/.automation/validation/history/2025-12-29_val_95d91108.json +41 -0
  122. package/tooling/.automation/validation/history/2025-12-29_val_980dbb74.json +32 -0
  123. package/tooling/.automation/validation/history/2025-12-29_val_9e40c79b.json +32 -0
  124. package/tooling/.automation/validation/history/2025-12-29_val_9f499b7c.json +32 -0
  125. package/tooling/.automation/validation/history/2025-12-29_val_9f7c3b57.json +32 -0
  126. package/tooling/.automation/validation/history/2025-12-29_val_a30d5bd4.json +32 -0
  127. package/tooling/.automation/validation/history/2025-12-29_val_a6eb09c7.json +32 -0
  128. package/tooling/.automation/validation/history/2025-12-29_val_a86f7b83.json +41 -0
  129. package/tooling/.automation/validation/history/2025-12-29_val_ad5347e1.json +41 -0
  130. package/tooling/.automation/validation/history/2025-12-29_val_b0a5a993.json +32 -0
  131. package/tooling/.automation/validation/history/2025-12-29_val_bcb0192e.json +32 -0
  132. package/tooling/.automation/validation/history/2025-12-29_val_bf3c9aaa.json +32 -0
  133. package/tooling/.automation/validation/history/2025-12-29_val_c461ff88.json +32 -0
  134. package/tooling/.automation/validation/history/2025-12-29_val_c4f4e258.json +41 -0
  135. package/tooling/.automation/validation/history/2025-12-29_val_c7f0fa6d.json +41 -0
  136. package/tooling/.automation/validation/history/2025-12-29_val_c911b0e6.json +32 -0
  137. package/tooling/.automation/validation/history/2025-12-29_val_cc581964.json +32 -0
  138. package/tooling/.automation/validation/history/2025-12-29_val_cdd5a33b.json +32 -0
  139. package/tooling/.automation/validation/history/2025-12-29_val_cfd42495.json +32 -0
  140. package/tooling/.automation/validation/history/2025-12-29_val_d1c7a4ee.json +41 -0
  141. package/tooling/.automation/validation/history/2025-12-29_val_d2280d0e.json +32 -0
  142. package/tooling/.automation/validation/history/2025-12-29_val_d2a6ff69.json +32 -0
  143. package/tooling/.automation/validation/history/2025-12-29_val_d8c53ab2.json +59 -0
  144. package/tooling/.automation/validation/history/2025-12-29_val_d9c1247a.json +41 -0
  145. package/tooling/.automation/validation/history/2025-12-29_val_d9d58569.json +32 -0
  146. package/tooling/.automation/validation/history/2025-12-29_val_dabb4fd9.json +32 -0
  147. package/tooling/.automation/validation/history/2025-12-29_val_dd8fe359.json +32 -0
  148. package/tooling/.automation/validation/history/2025-12-29_val_decdffc9.json +32 -0
  149. package/tooling/.automation/validation/history/2025-12-29_val_e3a95476.json +59 -0
  150. package/tooling/.automation/validation/history/2025-12-29_val_e776dfca.json +32 -0
  151. package/tooling/.automation/validation/history/2025-12-29_val_ea70969f.json +59 -0
  152. package/tooling/.automation/validation/history/2025-12-29_val_ef41ea95.json +32 -0
  153. package/tooling/.automation/validation/history/2025-12-29_val_f384f9b1.json +32 -0
  154. package/tooling/.automation/validation/history/2025-12-29_val_f8adc38c.json +41 -0
  155. package/tooling/.automation/validation/history/2025-12-29_val_fa40b69e.json +32 -0
  156. package/tooling/.automation/validation/history/2025-12-29_val_fc538d54.json +41 -0
  157. package/tooling/.automation/validation/history/2025-12-29_val_fe814665.json +32 -0
  158. package/tooling/.automation/validation/history/2025-12-29_val_ffea4b12.json +32 -0
  159. package/tooling/.automation/validation/history/2025-12-30_val_02d001e5.json +59 -0
  160. package/tooling/.automation/validation/history/2025-12-30_val_0b8966dc.json +32 -0
  161. package/tooling/.automation/validation/history/2025-12-30_val_15455fbf.json +59 -0
  162. package/tooling/.automation/validation/history/2025-12-30_val_157e34b9.json +32 -0
  163. package/tooling/.automation/validation/history/2025-12-30_val_28d1d933.json +32 -0
  164. package/tooling/.automation/validation/history/2025-12-30_val_3442a52c.json +32 -0
  165. package/tooling/.automation/validation/history/2025-12-30_val_37f1ce1e.json +32 -0
  166. package/tooling/.automation/validation/history/2025-12-30_val_4f1d8a93.json +32 -0
  167. package/tooling/.automation/validation/history/2025-12-30_val_56ff1de3.json +32 -0
  168. package/tooling/.automation/validation/history/2025-12-30_val_664fd4e2.json +41 -0
  169. package/tooling/.automation/validation/history/2025-12-30_val_66afb0a7.json +32 -0
  170. package/tooling/.automation/validation/history/2025-12-30_val_7634663c.json +41 -0
  171. package/tooling/.automation/validation/history/2025-12-30_val_8ea830c3.json +41 -0
  172. package/tooling/.automation/validation/history/2025-12-30_val_998957c2.json +32 -0
  173. package/tooling/.automation/validation/history/2025-12-30_val_a52177db.json +32 -0
  174. package/tooling/.automation/validation/history/2025-12-30_val_a5b65a63.json +32 -0
  175. package/tooling/.automation/validation/history/2025-12-30_val_ae391d0e.json +32 -0
  176. package/tooling/.automation/validation/history/2025-12-30_val_c7895339.json +41 -0
  177. package/tooling/.automation/validation/history/2025-12-30_val_ca416593.json +41 -0
  178. package/tooling/.automation/validation/history/2025-12-30_val_cee19422.json +32 -0
  179. package/tooling/.automation/validation/history/2025-12-30_val_ddd4f4e6.json +32 -0
  180. package/tooling/.automation/validation/history/2025-12-30_val_f2e1394b.json +32 -0
  181. package/tooling/.automation/validation/history/2025-12-30_val_f4a7fa06.json +41 -0
  182. package/tooling/.automation/validation/history/2025-12-30_val_ffea3369.json +32 -0
  183. package/tooling/.automation/validation-config.yaml +103 -0
  184. package/tooling/completions/DevflowCompletion.ps1 +21 -21
  185. package/tooling/completions/_run-story +3 -3
  186. package/tooling/completions/run-story-completion.bash +8 -8
  187. package/tooling/docs/DOC-STANDARD.md +14 -14
  188. package/tooling/docs/templates/migration-spec.md +4 -4
  189. package/tooling/scripts/context_checkpoint.py +5 -15
  190. package/tooling/scripts/cost_dashboard.py +610 -13
  191. package/tooling/scripts/create-persona.py +1 -12
  192. package/tooling/scripts/create-persona.sh +44 -44
  193. package/tooling/scripts/lib/__init__.py +12 -1
  194. package/tooling/scripts/lib/agent_handoff.py +11 -2
  195. package/tooling/scripts/lib/agent_router.py +31 -10
  196. package/tooling/scripts/lib/colors.py +106 -0
  197. package/tooling/scripts/lib/context_monitor.py +766 -0
  198. package/tooling/scripts/lib/cost_config.py +229 -10
  199. package/tooling/scripts/lib/cost_display.py +20 -45
  200. package/tooling/scripts/lib/cost_tracker.py +462 -15
  201. package/tooling/scripts/lib/currency_converter.py +28 -5
  202. package/tooling/scripts/lib/pair_programming.py +102 -3
  203. package/tooling/scripts/lib/personality_system.py +949 -0
  204. package/tooling/scripts/lib/platform.py +55 -0
  205. package/tooling/scripts/lib/shared_memory.py +9 -3
  206. package/tooling/scripts/lib/swarm_orchestrator.py +514 -75
  207. package/tooling/scripts/lib/validation_loop.py +1014 -0
  208. package/tooling/scripts/memory_summarize.py +9 -2
  209. package/tooling/scripts/new-doc.py +2 -9
  210. package/tooling/scripts/personalize_agent.py +1 -12
  211. package/tooling/scripts/rollback-migration.sh +60 -60
  212. package/tooling/scripts/run-collab.ps1 +16 -16
  213. package/tooling/scripts/run-collab.py +88 -53
  214. package/tooling/scripts/run-collab.sh +4 -4
  215. package/tooling/scripts/run-story.py +278 -20
  216. package/tooling/scripts/run-story.sh +3 -3
  217. package/tooling/scripts/setup-checkpoint-service.py +2 -9
  218. package/tooling/scripts/tech-debt-tracker.py +1 -12
  219. package/tooling/scripts/test_adversarial_swarm.py +452 -0
  220. package/tooling/scripts/validate-overrides.py +1 -10
  221. package/tooling/scripts/validate-overrides.sh +40 -40
  222. package/tooling/scripts/validate_loop.py +162 -0
  223. package/tooling/scripts/validate_setup.py +2 -30
  224. package/.claude/skills/init/SKILL.md +0 -496
@@ -0,0 +1,41 @@
1
+ {
2
+ "id": "val_f4a7fa06",
3
+ "timestamp": "2025-12-30T10:31:36.397579",
4
+ "story_key": "test",
5
+ "tier": 1,
6
+ "gate_results": [
7
+ {
8
+ "gate_name": "pass",
9
+ "result": "pass",
10
+ "message": "Validation passed",
11
+ "duration_ms": 0.0,
12
+ "retry_count": 0,
13
+ "auto_fixed": false,
14
+ "details": {}
15
+ },
16
+ {
17
+ "gate_name": "fail",
18
+ "result": "fail",
19
+ "message": "Validation failed",
20
+ "duration_ms": 0.0,
21
+ "retry_count": 0,
22
+ "auto_fixed": false,
23
+ "details": {}
24
+ }
25
+ ],
26
+ "overall_result": "fail",
27
+ "total_duration_ms": 0.00476837158203125,
28
+ "passed": false,
29
+ "context": {
30
+ "story_key": "test",
31
+ "iteration": 0,
32
+ "max_iterations": 3,
33
+ "accumulated_issues": [],
34
+ "accumulated_fixes": [],
35
+ "cost_so_far": 0.0,
36
+ "time_elapsed_seconds": 0.0,
37
+ "phase": "",
38
+ "from_agent": "",
39
+ "to_agent": ""
40
+ }
41
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "id": "val_ffea3369",
3
+ "timestamp": "2025-12-30T10:31:36.398799",
4
+ "story_key": "test",
5
+ "tier": 1,
6
+ "gate_results": [
7
+ {
8
+ "gate_name": "block",
9
+ "result": "fail",
10
+ "message": "Validation failed",
11
+ "duration_ms": 0.0007152557373046875,
12
+ "retry_count": 0,
13
+ "auto_fixed": false,
14
+ "details": {}
15
+ }
16
+ ],
17
+ "overall_result": "fail",
18
+ "total_duration_ms": 0.016689300537109375,
19
+ "passed": false,
20
+ "context": {
21
+ "story_key": "test",
22
+ "iteration": 0,
23
+ "max_iterations": 3,
24
+ "accumulated_issues": [],
25
+ "accumulated_fixes": [],
26
+ "cost_so_far": 0.0,
27
+ "time_elapsed_seconds": 0.0,
28
+ "phase": "",
29
+ "from_agent": "",
30
+ "to_agent": ""
31
+ }
32
+ }
@@ -0,0 +1,103 @@
1
+ # Validation Loop Configuration
2
+ # Controls automated feedback and validation gates
3
+
4
+ validation:
5
+ enabled: true
6
+
7
+ tiers:
8
+ # Tier 1: Pre-flight validation (before any agent runs)
9
+ preflight:
10
+ enabled: true
11
+ gates:
12
+ - name: story_exists
13
+ enabled: true
14
+ on_fail: block
15
+ - name: budget_available
16
+ enabled: true
17
+ on_fail: block
18
+ - name: dependencies_valid
19
+ enabled: true
20
+ on_fail: warn
21
+ on_all_fail: block
22
+
23
+ # Tier 2: Inter-phase validation (between agents/phases)
24
+ inter_phase:
25
+ enabled: true
26
+ max_retries: 3
27
+ retry_cooldown_seconds: 5
28
+ gates:
29
+ context_to_dev:
30
+ - name: context_complete
31
+ enabled: true
32
+ on_fail: retry
33
+ retry_with_agent: SM
34
+ dev_to_review:
35
+ - name: code_compiles
36
+ enabled: true
37
+ on_fail: retry
38
+ retry_with_agent: DEV
39
+ - name: lint_pass
40
+ enabled: true
41
+ on_fail: retry
42
+ auto_fix: true
43
+ review_to_complete:
44
+ - name: review_approved
45
+ enabled: true
46
+ on_fail: retry
47
+ retry_with_agent: DEV
48
+
49
+ # Tier 3: Post-completion validation (after pipeline completes)
50
+ post_completion:
51
+ enabled: true
52
+ gates:
53
+ - name: tests_pass
54
+ enabled: true
55
+ on_fail: block
56
+ timeout_seconds: 300
57
+ - name: lint_clean
58
+ enabled: true
59
+ on_fail: warn
60
+ auto_fix: true
61
+ - name: types_valid
62
+ enabled: true
63
+ on_fail: warn
64
+ - name: version_synced
65
+ enabled: true
66
+ on_fail: warn
67
+ - name: changelog_updated
68
+ enabled: true
69
+ on_fail: warn
70
+ on_fail: warn # Don't block, just warn
71
+
72
+ automation:
73
+ auto_fix:
74
+ enabled: true
75
+ safe_fixes_only: true # Only run fixes marked as safe
76
+
77
+ escalation:
78
+ after_retries: 3
79
+ notify: user # Options: user, slack, email, github_issue
80
+
81
+ learning:
82
+ track_patterns: true
83
+ suggest_improvements: true
84
+
85
+ # Gate-specific overrides
86
+ gate_overrides:
87
+ tests_pass:
88
+ timeout_seconds: 300
89
+ command: "python -m pytest -x -q"
90
+ lint_pass:
91
+ timeout_seconds: 60
92
+ command: "python -m ruff check ."
93
+ auto_fix_command: "python -m ruff check --fix ."
94
+ types_valid:
95
+ timeout_seconds: 120
96
+ command: "python -m mypy --ignore-missing-imports ."
97
+
98
+ # Output and reporting
99
+ reporting:
100
+ format: text # text, json, markdown
101
+ verbose: false
102
+ save_reports: true
103
+ report_dir: tooling/.automation/validation/history
@@ -25,7 +25,7 @@ $script:DevflowModes = @('swarm', 'pair', 'auto', 'sequential')
25
25
  # Argument completer for run-story.ps1
26
26
  Register-ArgumentCompleter -CommandName 'run-story.ps1', 'run-story' -Native -ScriptBlock {
27
27
  param($wordToComplete, $commandAst, $cursorPosition)
28
-
28
+
29
29
  $params = @(
30
30
  @{ Name = '-Swarm'; Tooltip = 'Enable swarm mode (multi-agent debate)' }
31
31
  @{ Name = '-Pair'; Tooltip = 'Enable pair programming mode' }
@@ -41,18 +41,18 @@ Register-ArgumentCompleter -CommandName 'run-story.ps1', 'run-story' -Native -Sc
41
41
  @{ Name = '-Quiet'; Tooltip = 'Reduce output verbosity' }
42
42
  @{ Name = '-Help'; Tooltip = 'Show help' }
43
43
  )
44
-
44
+
45
45
  # Get the current word being typed
46
46
  $commandElements = $commandAst.CommandElements
47
- $lastWord = if ($commandElements.Count -gt 1) {
48
- $commandElements[-1].Extent.Text
47
+ $lastWord = if ($commandElements.Count -gt 1) {
48
+ $commandElements[-1].Extent.Text
49
49
  } else { '' }
50
-
50
+
51
51
  # Check if completing a parameter value
52
52
  $previousWord = if ($commandElements.Count -gt 2) {
53
53
  $commandElements[-2].Extent.Text
54
54
  } else { '' }
55
-
55
+
56
56
  # Model completion
57
57
  if ($previousWord -eq '-Model') {
58
58
  $script:DevflowModels | Where-Object { $_ -like "$wordToComplete*" } | ForEach-Object {
@@ -65,18 +65,18 @@ Register-ArgumentCompleter -CommandName 'run-story.ps1', 'run-story' -Native -Sc
65
65
  }
66
66
  return
67
67
  }
68
-
68
+
69
69
  # Agent completion
70
70
  if ($previousWord -eq '-Agents') {
71
71
  # Support comma-separated completion
72
72
  $existingAgents = if ($wordToComplete -match ',') {
73
73
  $wordToComplete -replace ',[^,]*$', ','
74
74
  } else { '' }
75
-
75
+
76
76
  $currentPart = if ($wordToComplete -match ',') {
77
77
  ($wordToComplete -split ',')[-1]
78
78
  } else { $wordToComplete }
79
-
79
+
80
80
  $script:DevflowAgents | Where-Object { $_.Name -like "$currentPart*" } | ForEach-Object {
81
81
  [System.Management.Automation.CompletionResult]::new(
82
82
  "$existingAgents$($_.Name)",
@@ -87,7 +87,7 @@ Register-ArgumentCompleter -CommandName 'run-story.ps1', 'run-story' -Native -Sc
87
87
  }
88
88
  return
89
89
  }
90
-
90
+
91
91
  # Parameter completion
92
92
  $params | Where-Object { $_.Name -like "$wordToComplete*" } | ForEach-Object {
93
93
  [System.Management.Automation.CompletionResult]::new(
@@ -102,7 +102,7 @@ Register-ArgumentCompleter -CommandName 'run-story.ps1', 'run-story' -Native -Sc
102
102
  # Argument completer for run-collab.ps1
103
103
  Register-ArgumentCompleter -CommandName 'run-collab.ps1', 'run-collab' -Native -ScriptBlock {
104
104
  param($wordToComplete, $commandAst, $cursorPosition)
105
-
105
+
106
106
  $params = @(
107
107
  @{ Name = '-Swarm'; Tooltip = 'Enable swarm mode' }
108
108
  @{ Name = '-Pair'; Tooltip = 'Enable pair programming' }
@@ -118,12 +118,12 @@ Register-ArgumentCompleter -CommandName 'run-collab.ps1', 'run-collab' -Native -
118
118
  @{ Name = '-Quiet'; Tooltip = 'Quiet mode' }
119
119
  @{ Name = '-StoryKey'; Tooltip = 'Story key or description' }
120
120
  )
121
-
121
+
122
122
  $commandElements = $commandAst.CommandElements
123
123
  $previousWord = if ($commandElements.Count -gt 2) {
124
124
  $commandElements[-2].Extent.Text
125
125
  } else { '' }
126
-
126
+
127
127
  # Model completion
128
128
  if ($previousWord -eq '-Model') {
129
129
  $script:DevflowModels | Where-Object { $_ -like "$wordToComplete*" } | ForEach-Object {
@@ -131,17 +131,17 @@ Register-ArgumentCompleter -CommandName 'run-collab.ps1', 'run-collab' -Native -
131
131
  }
132
132
  return
133
133
  }
134
-
134
+
135
135
  # Agent completion
136
136
  if ($previousWord -eq '-Agents') {
137
137
  $existingAgents = if ($wordToComplete -match ',') {
138
138
  $wordToComplete -replace ',[^,]*$', ','
139
139
  } else { '' }
140
-
140
+
141
141
  $currentPart = if ($wordToComplete -match ',') {
142
142
  ($wordToComplete -split ',')[-1]
143
143
  } else { $wordToComplete }
144
-
144
+
145
145
  $script:DevflowAgents | Where-Object { $_.Name -like "$currentPart*" } | ForEach-Object {
146
146
  [System.Management.Automation.CompletionResult]::new(
147
147
  "$existingAgents$($_.Name)",
@@ -152,7 +152,7 @@ Register-ArgumentCompleter -CommandName 'run-collab.ps1', 'run-collab' -Native -
152
152
  }
153
153
  return
154
154
  }
155
-
155
+
156
156
  # Parameter completion
157
157
  $params | Where-Object { $_.Name -like "$wordToComplete*" } | ForEach-Object {
158
158
  [System.Management.Automation.CompletionResult]::new(
@@ -167,22 +167,22 @@ Register-ArgumentCompleter -CommandName 'run-collab.ps1', 'run-collab' -Native -
167
167
  # Helper function to show available commands
168
168
  function Get-DevflowCommands {
169
169
  @"
170
-
170
+
171
171
  Devflow Collaboration Commands
172
172
  ==============================
173
173
 
174
174
  run-story.ps1 / run-story.sh
175
175
  Main story runner with collaboration modes
176
-
176
+
177
177
  Modes:
178
178
  -Swarm Multi-agent debate/consensus
179
- -Pair DEV + REVIEWER pair programming
179
+ -Pair DEV + REVIEWER pair programming
180
180
  -Auto Intelligent auto-routing (default)
181
181
  -Sequential Traditional sequential pipeline
182
182
 
183
183
  run-collab.ps1 / run-collab.py
184
184
  Direct Python collaboration CLI
185
-
185
+
186
186
  Same modes as run-story with additional:
187
187
  -Memory View shared memory
188
188
  -Query Query knowledge graph
@@ -1,12 +1,12 @@
1
1
  #compdef run-story.sh run-story run-collab.sh run-collab
2
2
 
3
3
  # Devflow Story Runner Zsh Completion
4
- #
4
+ #
5
5
  # Installation:
6
6
  # 1. Copy this file to a directory in your $fpath (e.g., ~/.zsh/completions/)
7
7
  # 2. Add to ~/.zshrc: fpath=(~/.zsh/completions $fpath)
8
8
  # 3. Reload: source ~/.zshrc
9
- #
9
+ #
10
10
  # Or for quick setup, add to ~/.zshrc:
11
11
  # source /path/to/devflow/tooling/completions/_run-story
12
12
 
@@ -106,7 +106,7 @@ _run-collab() {
106
106
  '--help[Show help]'
107
107
  }
108
108
 
109
- # Alias completions
109
+ # Alias completions
110
110
  compdef _run-story run-story.sh
111
111
  compdef _run-story run-story
112
112
  compdef _run-collab run-collab.py
@@ -23,10 +23,10 @@ _run_story_completion() {
23
23
  COMPREPLY=()
24
24
  cur="${COMP_WORDS[COMP_CWORD]}"
25
25
  prev="${COMP_WORDS[COMP_CWORD-1]}"
26
-
26
+
27
27
  # Main options
28
28
  opts="--swarm --pair --auto-route --sequential --agents --max-iterations --model --budget --memory --query --route-only --quiet --debug --dry-run --help"
29
-
29
+
30
30
  case "${prev}" in
31
31
  --agents|-a)
32
32
  # Support comma-separated agent completion
@@ -38,7 +38,7 @@ _run_story_completion() {
38
38
  existing_agents=""
39
39
  current_part="$cur"
40
40
  fi
41
-
41
+
42
42
  local suggestions=""
43
43
  for agent in $_devflow_agents; do
44
44
  if [[ "$agent" == ${current_part}* ]]; then
@@ -67,7 +67,7 @@ _run_story_completion() {
67
67
  *)
68
68
  ;;
69
69
  esac
70
-
70
+
71
71
  # Complete options
72
72
  if [[ ${cur} == -* ]]; then
73
73
  COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
@@ -81,9 +81,9 @@ _run_collab_completion() {
81
81
  COMPREPLY=()
82
82
  cur="${COMP_WORDS[COMP_CWORD]}"
83
83
  prev="${COMP_WORDS[COMP_CWORD-1]}"
84
-
84
+
85
85
  opts="--swarm --pair --auto --sequential --agents --max-iterations --model --budget --memory --query --route-only --quiet --help"
86
-
86
+
87
87
  case "${prev}" in
88
88
  --agents)
89
89
  local existing_agents current_part
@@ -94,7 +94,7 @@ _run_collab_completion() {
94
94
  existing_agents=""
95
95
  current_part="$cur"
96
96
  fi
97
-
97
+
98
98
  local suggestions=""
99
99
  for agent in $_devflow_agents; do
100
100
  if [[ "$agent" == ${current_part}* ]]; then
@@ -119,7 +119,7 @@ _run_collab_completion() {
119
119
  *)
120
120
  ;;
121
121
  esac
122
-
122
+
123
123
  if [[ ${cur} == -* ]]; then
124
124
  COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
125
125
  return 0
@@ -1,14 +1,14 @@
1
- # Documentation Standard - Stronger Project
1
+ # Documentation Standard - Devflow
2
2
 
3
- **Version**: 1.0
4
- **Last Updated**: 2025-12-20
3
+ **Version**: 1.1
4
+ **Last Updated**: 2025-12-27
5
5
  **Applies To**: All documentation in `tooling/docs/`
6
6
 
7
7
  ---
8
8
 
9
9
  ## Purpose
10
10
 
11
- This document defines the standard format, structure, and conventions for all documentation in the Stronger project's `tooling/docs/` directory.
11
+ This document defines the standard format, structure, and conventions for all documentation in the Devflow project's `tooling/docs/` directory.
12
12
 
13
13
  ---
14
14
 
@@ -212,26 +212,26 @@ Always include header separator:
212
212
 
213
213
  ### Alerts/Callouts
214
214
 
215
- Use these emoji conventions:
215
+ Use these text-based conventions (no emojis per project policy):
216
216
 
217
217
  ```markdown
218
- **WARNING**: Important warning
218
+ **[WARNING]**: Important warning
219
219
 
220
- **TIP**: Helpful tip
220
+ **[TIP]**: Helpful tip
221
221
 
222
- **NOTE**: Additional information
222
+ **[NOTE]**: Additional information
223
223
 
224
- **CRITICAL**: Critical information
224
+ **[CRITICAL]**: Critical information
225
225
 
226
- **SUCCESS**: Successful outcome
226
+ **[OK]**: Successful outcome
227
227
 
228
- **ERROR**: Error or failure
228
+ **[ERROR]**: Error or failure
229
229
 
230
- **GOAL**: Objective or target
230
+ **[GOAL]**: Objective or target
231
231
 
232
- **DATA**: Data or statistics
232
+ **[INFO]**: Data or statistics
233
233
 
234
- **TECHNICAL**: Technical details
234
+ **[TECHNICAL]**: Technical details
235
235
  ```
236
236
 
237
237
  ---
@@ -96,7 +96,7 @@
96
96
  1. **[Change Description 1]**
97
97
  - Files affected: `path/to/file`
98
98
  - Changes needed: [describe the code changes]
99
-
99
+
100
100
  2. **[Change Description 2]**
101
101
  - Files affected: `path/to/file`
102
102
  - Changes needed: [describe the code changes]
@@ -243,13 +243,13 @@ If automated rollback fails:
243
243
  *To be filled after migration*
244
244
 
245
245
  ### What Went Well
246
- -
246
+ -
247
247
 
248
248
  ### What Could Be Improved
249
- -
249
+ -
250
250
 
251
251
  ### Action Items
252
- -
252
+ -
253
253
 
254
254
  ## Notes
255
255
 
@@ -25,12 +25,15 @@ from datetime import datetime
25
25
  from pathlib import Path
26
26
  from typing import Optional
27
27
 
28
+ from lib.colors import Colors
29
+ from lib.platform import IS_WINDOWS
30
+
28
31
  # Configuration
29
32
  PROJECT_ROOT = Path(__file__).parent.parent.parent
30
33
  CHECKPOINT_DIR = PROJECT_ROOT / "tooling" / ".automation" / "checkpoints"
31
34
  LOGS_DIR = PROJECT_ROOT / "tooling" / ".automation" / "logs"
32
35
  # Platform-specific CLI command
33
- CLAUDE_CLI = "claude.cmd" if sys.platform == "win32" else "claude"
36
+ CLAUDE_CLI = "claude.cmd" if IS_WINDOWS else "claude"
34
37
 
35
38
  # Context thresholds
36
39
  CONTEXT_WARNING_THRESHOLD = 0.75 # 75% - Start warning
@@ -38,19 +41,6 @@ CONTEXT_CRITICAL_THRESHOLD = 0.85 # 85% - Auto-checkpoint
38
41
  CONTEXT_EMERGENCY_THRESHOLD = 0.95 # 95% - Force checkpoint
39
42
 
40
43
 
41
- # Colors for terminal output
42
- class Colors:
43
- HEADER = "\033[95m"
44
- BLUE = "\033[94m"
45
- CYAN = "\033[96m"
46
- GREEN = "\033[92m"
47
- YELLOW = "\033[93m"
48
- RED = "\033[91m"
49
- BOLD = "\033[1m"
50
- UNDERLINE = "\033[4m"
51
- END = "\033[0m"
52
-
53
-
54
44
  class ContextCheckpointManager:
55
45
  """Manages context checkpointing for Claude Code sessions."""
56
46
 
@@ -69,7 +59,7 @@ class ContextCheckpointManager:
69
59
  # Handle graceful shutdown (Windows-compatible)
70
60
  signal.signal(signal.SIGINT, self._signal_handler)
71
61
  # SIGTERM is not available on Windows
72
- if sys.platform != "win32":
62
+ if not IS_WINDOWS:
73
63
  signal.signal(signal.SIGTERM, self._signal_handler)
74
64
 
75
65
  def _signal_handler(self, signum, frame):