@pjmendonca/devflow 1.20.0 → 1.20.1

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 (32) hide show
  1. package/.claude/hooks/session-startup.sh +20 -0
  2. package/.claude/settings.json +0 -4
  3. package/CHANGELOG.md +5 -0
  4. package/README.md +2 -2
  5. package/package.json +1 -1
  6. package/tooling/.automation/memory/knowledge/kg_integration-test.json +128 -1
  7. package/tooling/.automation/memory/knowledge/kg_test-story.json +428 -2
  8. package/tooling/.automation/memory/shared/shared_integration-test.json +37 -1
  9. package/tooling/.automation/memory/shared/shared_test-story.json +109 -1
  10. package/tooling/.automation/memory/shared/shared_test.json +157 -1
  11. package/tooling/.automation/memory/shared/shared_validation-check.json +40 -1
  12. package/tooling/.automation/validation/history/2026-01-18_val_108c18cf.json +32 -0
  13. package/tooling/.automation/validation/history/2026-01-18_val_35ee606f.json +32 -0
  14. package/tooling/.automation/validation/history/2026-01-18_val_3fc7268b.json +41 -0
  15. package/tooling/.automation/validation/history/2026-01-18_val_49f0bb17.json +32 -0
  16. package/tooling/.automation/validation/history/2026-01-18_val_53c928d2.json +59 -0
  17. package/tooling/.automation/validation/history/2026-01-18_val_55604791.json +32 -0
  18. package/tooling/.automation/validation/history/2026-01-18_val_67e695f0.json +41 -0
  19. package/tooling/.automation/validation/history/2026-01-18_val_82784713.json +41 -0
  20. package/tooling/.automation/validation/history/2026-01-18_val_94a8e584.json +32 -0
  21. package/tooling/.automation/validation/history/2026-01-18_val_95353af0.json +32 -0
  22. package/tooling/.automation/validation/history/2026-01-18_val_9a046f3a.json +32 -0
  23. package/tooling/.automation/validation/history/2026-01-18_val_b3443d2e.json +32 -0
  24. package/tooling/.automation/validation/history/2026-01-18_val_bfd298f4.json +32 -0
  25. package/tooling/.automation/validation/history/2026-01-18_val_cfc2a362.json +32 -0
  26. package/tooling/.automation/validation/history/2026-01-18_val_e581a3d2.json +41 -0
  27. package/tooling/scripts/lib/__init__.py +1 -3
  28. package/tooling/scripts/lib/agent_router.py +0 -4
  29. package/tooling/scripts/lib/swarm_orchestrator.py +1 -1
  30. package/tooling/scripts/run-collab.py +1 -45
  31. package/.claude/commands/pair.md +0 -23
  32. package/tooling/scripts/lib/pair_programming.py +0 -690
@@ -0,0 +1,41 @@
1
+ {
2
+ "id": "val_82784713",
3
+ "timestamp": "2026-01-18T10:57:50.199962",
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.003814697265625,
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_94a8e584",
3
+ "timestamp": "2026-01-18T10:55:19.087360",
4
+ "story_key": "test",
5
+ "tier": 1,
6
+ "gate_results": [
7
+ {
8
+ "gate_name": "fail_gate",
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.00286102294921875,
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,32 @@
1
+ {
2
+ "id": "val_95353af0",
3
+ "timestamp": "2026-01-18T10:55:19.083022",
4
+ "story_key": "test",
5
+ "tier": 1,
6
+ "gate_results": [
7
+ {
8
+ "gate_name": "test",
9
+ "result": "pass",
10
+ "message": "Validation passed",
11
+ "duration_ms": 0.0011920928955078125,
12
+ "retry_count": 0,
13
+ "auto_fixed": false,
14
+ "details": {}
15
+ }
16
+ ],
17
+ "overall_result": "pass",
18
+ "total_duration_ms": 0.004291534423828125,
19
+ "passed": true,
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,32 @@
1
+ {
2
+ "id": "val_9a046f3a",
3
+ "timestamp": "2026-01-18T10:57:50.202427",
4
+ "story_key": "test",
5
+ "tier": 1,
6
+ "gate_results": [
7
+ {
8
+ "gate_name": "test",
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
+ "overall_result": "pass",
18
+ "total_duration_ms": 0.0021457672119140625,
19
+ "passed": true,
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,32 @@
1
+ {
2
+ "id": "val_b3443d2e",
3
+ "timestamp": "2026-01-18T10:55:19.081740",
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.0011920928955078125,
12
+ "retry_count": 0,
13
+ "auto_fixed": false,
14
+ "details": {}
15
+ }
16
+ ],
17
+ "overall_result": "fail",
18
+ "total_duration_ms": 0.02002716064453125,
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,32 @@
1
+ {
2
+ "id": "val_bfd298f4",
3
+ "timestamp": "2026-01-18T10:55:19.084250",
4
+ "story_key": "test",
5
+ "tier": 3,
6
+ "gate_results": [
7
+ {
8
+ "gate_name": "test",
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
+ "overall_result": "pass",
18
+ "total_duration_ms": 0.0021457672119140625,
19
+ "passed": true,
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,32 @@
1
+ {
2
+ "id": "val_cfc2a362",
3
+ "timestamp": "2026-01-18T10:57:50.203628",
4
+ "story_key": "test",
5
+ "tier": 3,
6
+ "gate_results": [
7
+ {
8
+ "gate_name": "test",
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
+ "overall_result": "pass",
18
+ "total_duration_ms": 0.0030994415283203125,
19
+ "passed": true,
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,41 @@
1
+ {
2
+ "id": "val_e581a3d2",
3
+ "timestamp": "2026-01-18T10:55:19.079052",
4
+ "story_key": "test",
5
+ "tier": 1,
6
+ "gate_results": [
7
+ {
8
+ "gate_name": "gate1",
9
+ "result": "pass",
10
+ "message": "Validation passed",
11
+ "duration_ms": 0.00095367431640625,
12
+ "retry_count": 0,
13
+ "auto_fixed": false,
14
+ "details": {}
15
+ },
16
+ {
17
+ "gate_name": "gate2",
18
+ "result": "pass",
19
+ "message": "Validation passed",
20
+ "duration_ms": 0.0,
21
+ "retry_count": 0,
22
+ "auto_fixed": false,
23
+ "details": {}
24
+ }
25
+ ],
26
+ "overall_result": "pass",
27
+ "total_duration_ms": 0.0050067901611328125,
28
+ "passed": true,
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
+ }
@@ -14,7 +14,6 @@ This package provides:
14
14
  - agent_handoff: Structured agent transitions
15
15
  - shared_memory: Cross-agent knowledge sharing
16
16
  - swarm_orchestrator: Multi-agent collaboration
17
- - pair_programming: DEV + REVIEWER collaboration
18
17
  - validation_loop: Three-tier validation framework
19
18
 
20
19
  Usage:
@@ -25,7 +24,7 @@ Usage:
25
24
  from lib.platform import get_platform, IS_WINDOWS
26
25
  """
27
26
 
28
- __version__ = "1.20.0"
27
+ __version__ = "1.20.1"
29
28
 
30
29
  # Lazy imports to avoid circular dependencies
31
30
  __all__ = [
@@ -41,6 +40,5 @@ __all__ = [
41
40
  "agent_handoff",
42
41
  "shared_memory",
43
42
  "swarm_orchestrator",
44
- "pair_programming",
45
43
  "validation_loop",
46
44
  ]
@@ -629,10 +629,6 @@ class AgentRouter:
629
629
  if len(agents) == 1:
630
630
  return "single"
631
631
 
632
- # If includes REVIEWER and DEV, could use pair mode
633
- if "DEV" in agents and "REVIEWER" in agents and len(agents) == 2:
634
- return "pair"
635
-
636
632
  # If includes ARCHITECT, likely needs sequential
637
633
  if "ARCHITECT" in agents:
638
634
  return "sequential"
@@ -320,7 +320,7 @@ class SwarmConfig:
320
320
  parallel_execution: bool = False
321
321
  auto_fix_enabled: bool = True # DEV automatically addresses REVIEWER issues
322
322
  verbose: bool = True
323
- budget_limit_usd: float = 25.0 # Higher budget for debate
323
+ budget_limit_usd: float = 10.0 # Budget for debate
324
324
  validation_enabled: bool = True # Enable inter-iteration validation
325
325
  # Adversarial-specific settings
326
326
  convergence_threshold: float = 0.8 # Position similarity to consider converged
@@ -5,7 +5,6 @@ Collaborative Story Runner - Unified CLI for Agent Collaboration
5
5
  Integrates all collaboration features:
6
6
  - Agent routing (auto-select best agents)
7
7
  - Swarm mode (multi-agent debate)
8
- - Pair programming (DEV + REVIEWER interleaved)
9
8
  - Shared memory and knowledge graph
10
9
  - Automatic handoffs
11
10
 
@@ -15,13 +14,11 @@ Usage:
15
14
  Modes:
16
15
  --auto Auto-route to best agents (default)
17
16
  --swarm Multi-agent debate/consensus
18
- --pair DEV + REVIEWER pair programming
19
17
  --sequential Traditional sequential pipeline
20
18
 
21
19
  Examples:
22
20
  python run-collab.py 3-5 --auto
23
21
  python run-collab.py 3-5 --swarm --agents ARCHITECT,DEV,REVIEWER
24
- python run-collab.py 3-5 --pair
25
22
  python run-collab.py "fix login bug" --auto
26
23
  """
27
24
 
@@ -158,7 +155,6 @@ def get_cache_dir() -> Path:
158
155
  # Import collaboration modules
159
156
  from lib.agent_handoff import HandoffGenerator, create_handoff # noqa: E402
160
157
  from lib.agent_router import AgentRouter, RoutingResult # noqa: E402
161
- from lib.pair_programming import PairConfig, PairSession # noqa: E402
162
158
  from lib.shared_memory import get_knowledge_graph, get_shared_memory, share_learning # noqa: E402
163
159
  from lib.swarm_orchestrator import ConsensusType, SwarmConfig, SwarmOrchestrator # noqa: E402
164
160
 
@@ -182,7 +178,7 @@ def print_banner():
182
178
  {Colors.CYAN}╔═══════════════════════════════════════════════════════════════╗
183
179
  ║ DEVFLOW COLLABORATIVE STORY RUNNER ║
184
180
  ╠═══════════════════════════════════════════════════════════════╣
185
- ║ Multi-agent collaboration with swarm, pair, and auto-routing
181
+ ║ Multi-agent collaboration with swarm and auto-routing
186
182
  ╚═══════════════════════════════════════════════════════════════╝{Colors.END}
187
183
  """)
188
184
 
@@ -213,9 +209,6 @@ def run_auto_mode(story_key: str, task: str, args: argparse.Namespace):
213
209
  if result.workflow == "swarm":
214
210
  print(f"\n{Colors.YELLOW}-> Using swarm mode for multi-agent collaboration{Colors.END}")
215
211
  return run_swarm_mode(story_key, task, result.agents, args)
216
- elif result.workflow == "pair":
217
- print(f"\n{Colors.YELLOW}-> Using pair programming mode{Colors.END}")
218
- return run_pair_mode(story_key, task, args)
219
212
  else:
220
213
  print(f"\n{Colors.YELLOW}-> Using sequential execution{Colors.END}")
221
214
  return run_sequential_mode(story_key, task, result.agents, args)
@@ -245,29 +238,6 @@ def run_swarm_mode(story_key: str, task: str, agents: list[str], args: argparse.
245
238
  return result
246
239
 
247
240
 
248
- def run_pair_mode(story_key: str, task: str, args: argparse.Namespace):
249
- """Run pair programming mode."""
250
- print_section("Pair Programming Mode", "DEV + REVIEWER interleaved")
251
-
252
- config = PairConfig(
253
- max_revisions_per_chunk=args.max_revisions,
254
- verbose=not args.quiet,
255
- dev_model=args.model,
256
- reviewer_model=args.model,
257
- )
258
-
259
- session = PairSession(story_key, task, config)
260
- result = session.run()
261
-
262
- # Print result
263
- print(f"\n{Colors.GREEN}{result.to_summary()}{Colors.END}")
264
-
265
- # Save result
266
- save_result(story_key, "pair", result.to_dict())
267
-
268
- return result
269
-
270
-
271
241
  def run_sequential_mode(story_key: str, task: str, agents: list[str], args: argparse.Namespace):
272
242
  """Run sequential agent execution with handoffs."""
273
243
  print_section("Sequential Mode", f"Pipeline: {' -> '.join(agents)}")
@@ -400,7 +370,6 @@ def parse_args():
400
370
  Examples:
401
371
  python run-collab.py 3-5 --auto
402
372
  python run-collab.py 3-5 --swarm --agents ARCHITECT,DEV,REVIEWER
403
- python run-collab.py 3-5 --pair --max-revisions 3
404
373
  python run-collab.py "fix login bug" --auto
405
374
  python run-collab.py 3-5 --memory # Show shared memory
406
375
  python run-collab.py 3-5 --query "What did ARCHITECT decide about auth?"
@@ -416,7 +385,6 @@ Examples:
416
385
  "--auto", action="store_true", default=True, help="Auto-route to best agents (default)"
417
386
  )
418
387
  mode_group.add_argument("--swarm", action="store_true", help="Multi-agent swarm/debate mode")
419
- mode_group.add_argument("--pair", action="store_true", help="DEV + REVIEWER pair programming")
420
388
  mode_group.add_argument(
421
389
  "--sequential", action="store_true", help="Traditional sequential pipeline"
422
390
  )
@@ -448,14 +416,6 @@ Examples:
448
416
  )
449
417
  parser.add_argument("--parallel", action="store_true", help="Enable parallel agent execution")
450
418
 
451
- # Pair programming options
452
- parser.add_argument(
453
- "--max-revisions",
454
- type=int,
455
- default=3,
456
- help="Max revisions per chunk in pair mode (default: 3)",
457
- )
458
-
459
419
  # General options
460
420
  parser.add_argument(
461
421
  "--model",
@@ -601,10 +561,6 @@ def main():
601
561
  agents = ["ARCHITECT", "DEV", "REVIEWER"]
602
562
  run_swarm_mode(story_key, task, agents, args)
603
563
 
604
- elif args.pair:
605
- print("Pair Programming")
606
- run_pair_mode(story_key, task, args)
607
-
608
564
  elif args.sequential:
609
565
  print("Sequential")
610
566
  if not agents:
@@ -1,23 +0,0 @@
1
- ---
2
- description: Run pair programming mode (DEV + REVIEWER interleaved)
3
- argument-hint: <story-key>
4
- ---
5
-
6
- Run Devflow pair programming for: $ARGUMENTS
7
-
8
- Execute: `npx @pjmendonca/devflow pair $ARGUMENTS`
9
-
10
- This runs DEV and REVIEWER in an interleaved pair programming mode:
11
- - DEV implements code in small, reviewable chunks
12
- - REVIEWER provides immediate feedback after each chunk
13
- - DEV addresses issues before continuing to next chunk
14
- - Results in higher quality code with fewer late-stage revisions
15
-
16
- Benefits:
17
- - Real-time feedback loops during implementation
18
- - Issues caught early, not at final review
19
- - Better knowledge sharing between agents
20
- - Higher approval rates
21
-
22
- Example:
23
- - `/pair 3-5` - Run pair programming for story 3-5