trinity-agent 0.7.2__tar.gz → 0.9.0__tar.gz

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 (185) hide show
  1. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/PKG-INFO +1 -1
  2. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/docs/checkpoint.md +8 -2
  3. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/docs/plans/2026-06-03-v0.7.0-workflow-engine-redesign.md +1 -1
  4. trinity_agent-0.9.0/docs/plans/2026-06-04-blueprint-to-parallel-implementation.md +451 -0
  5. trinity_agent-0.9.0/docs/plans/2026-06-04-model-backed-synthesis.md +292 -0
  6. trinity_agent-0.9.0/docs/plans/2026-06-04-one-shot-provider-redesign.md +588 -0
  7. trinity_agent-0.9.0/docs/plans/2026-06-04-session-like-workflow-ui.md +42 -0
  8. trinity_agent-0.9.0/docs/test-results/2026-06-04-blueprint-parallel-implementation.md +73 -0
  9. trinity_agent-0.9.0/docs/test-results/2026-06-04-model-backed-synthesis.md +94 -0
  10. trinity_agent-0.9.0/docs/test-results/2026-06-04-one-shot-provider-redesign-implementation.md +172 -0
  11. trinity_agent-0.9.0/docs/test-results/2026-06-04-session-like-workflow-ui.md +26 -0
  12. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/pyproject.toml +1 -1
  13. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/__init__.py +1 -1
  14. trinity_agent-0.9.0/src/trinity/agents/antigravity_agent.py +79 -0
  15. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/agents/base.py +29 -2
  16. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/agents/claude_agent.py +25 -99
  17. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/agents/codex_agent.py +31 -47
  18. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/agents/factory.py +11 -3
  19. trinity_agent-0.9.0/src/trinity/agents/gemini_agent.py +5 -0
  20. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/cli.py +61 -14
  21. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/completion/base.py +1 -1
  22. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/completion/hook.py +1 -1
  23. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/completion/idle.py +1 -1
  24. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/completion/marker.py +1 -1
  25. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/completion/prompt.py +1 -1
  26. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/config.py +90 -11
  27. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/context/monitor.py +1 -0
  28. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/context/shared.py +117 -14
  29. trinity_agent-0.9.0/src/trinity/deliberation/__init__.py +28 -0
  30. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/deliberation/protocol.py +144 -35
  31. trinity_agent-0.9.0/src/trinity/deliberation/synthesis.py +745 -0
  32. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/i18n.py +14 -4
  33. trinity_agent-0.9.0/src/trinity/legacy/__init__.py +2 -0
  34. trinity_agent-0.9.0/src/trinity/legacy/gemini/__init__.py +5 -0
  35. trinity_agent-0.7.2/src/trinity/agents/gemini_agent.py → trinity_agent-0.9.0/src/trinity/legacy/gemini/agent.py +7 -4
  36. trinity_agent-0.9.0/src/trinity/legacy/tmux/__init__.py +7 -0
  37. {trinity_agent-0.7.2/src/trinity → trinity_agent-0.9.0/src/trinity/legacy}/tmux/pane.py +8 -20
  38. {trinity_agent-0.7.2/src/trinity → trinity_agent-0.9.0/src/trinity/legacy}/tmux/session.py +23 -43
  39. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/models.py +13 -3
  40. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/orchestrator.py +201 -15
  41. trinity_agent-0.9.0/src/trinity/providers/__init__.py +43 -0
  42. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/providers/bootstrap.py +1 -1
  43. trinity_agent-0.9.0/src/trinity/providers/invoker.py +454 -0
  44. trinity_agent-0.9.0/src/trinity/providers/policy.py +149 -0
  45. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/providers/readiness.py +37 -9
  46. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/setup/detector.py +24 -1
  47. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/setup/wizard.py +6 -0
  48. trinity_agent-0.9.0/src/trinity/tmux/__init__.py +9 -0
  49. trinity_agent-0.9.0/src/trinity/tmux/pane.py +5 -0
  50. trinity_agent-0.9.0/src/trinity/tmux/session.py +5 -0
  51. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/tui/app.py +1 -0
  52. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/tui/prompt.py +103 -9
  53. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/tui/session.py +260 -40
  54. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/tui/theme.py +7 -0
  55. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/workflow/__init__.py +6 -1
  56. trinity_agent-0.9.0/src/trinity/workflow/decomposer.py +483 -0
  57. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/workflow/engine.py +226 -9
  58. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/workflow/execution.py +82 -25
  59. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/workflow/ledger.py +1 -0
  60. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/workflow/models.py +3 -0
  61. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/workspace/managed_home.py +1 -0
  62. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/templates/trinity.config.example +15 -6
  63. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/conftest.py +1 -0
  64. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_agent_factory.py +31 -1
  65. trinity_agent-0.9.0/tests/test_antigravity_agent.py +85 -0
  66. trinity_agent-0.9.0/tests/test_blueprint_decomposer.py +127 -0
  67. trinity_agent-0.9.0/tests/test_claude_agent.py +191 -0
  68. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_cli.py +35 -2
  69. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_cli_detector.py +25 -0
  70. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_cli_v2.py +53 -2
  71. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_codex_agent.py +66 -46
  72. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_completion.py +1 -1
  73. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_config.py +184 -3
  74. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_context_monitor.py +1 -0
  75. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_e2e.py +1 -1
  76. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_execution_protocol.py +147 -5
  77. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_gemini_agent.py +4 -4
  78. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_i18n.py +12 -6
  79. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_interactive_claude.py +1 -1
  80. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_managed_home.py +5 -0
  81. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_models.py +10 -1
  82. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_multi_provider.py +1 -1
  83. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_orchestrator.py +231 -3
  84. trinity_agent-0.9.0/tests/test_parallel_execution_policy.py +123 -0
  85. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_protocol.py +83 -5
  86. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_provider_bootstrap.py +2 -2
  87. trinity_agent-0.9.0/tests/test_provider_invoker_antigravity.py +129 -0
  88. trinity_agent-0.9.0/tests/test_provider_invoker_claude.py +117 -0
  89. trinity_agent-0.9.0/tests/test_provider_invoker_codex.py +122 -0
  90. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_provider_readiness.py +19 -1
  91. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_setup_wizard.py +19 -2
  92. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_shared_context.py +61 -0
  93. trinity_agent-0.9.0/tests/test_synthesis_agent.py +358 -0
  94. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_tmux.py +12 -4
  95. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_tui.py +9 -5
  96. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_tui_prompt.py +38 -8
  97. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_tui_session.py +267 -4
  98. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_workflow_engine.py +140 -7
  99. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/uv.lock +1 -1
  100. trinity_agent-0.7.2/src/trinity/health/__init__.py +0 -0
  101. trinity_agent-0.7.2/src/trinity/providers/__init__.py +0 -9
  102. trinity_agent-0.7.2/src/trinity/tmux/__init__.py +0 -0
  103. trinity_agent-0.7.2/src/trinity/tmux/layout.py +0 -264
  104. trinity_agent-0.7.2/src/trinity/workflow/decomposer.py +0 -261
  105. trinity_agent-0.7.2/tests/test_blueprint_decomposer.py +0 -82
  106. trinity_agent-0.7.2/tests/test_claude_agent.py +0 -293
  107. trinity_agent-0.7.2/tests/test_tmux_layout.py +0 -167
  108. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/.github/workflows/publish-pypi.yml +0 -0
  109. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/.gitignore +0 -0
  110. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/LICENSE +0 -0
  111. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/README.en.md +0 -0
  112. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/README.md +0 -0
  113. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/docs/phase-6-plan.md +0 -0
  114. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/docs/plans/2026-06-02-phase-10-interactive-redesign.md +0 -0
  115. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/docs/plans/2026-06-02-prompt-compression.md +0 -0
  116. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/docs/plans/2026-06-02-token-analytics.md +0 -0
  117. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/docs/plans/2026-06-02-token-optimization-phase7b.md +0 -0
  118. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/docs/plans/2026-06-02-tui-overhaul.md +0 -0
  119. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/docs/plans/2026-06-02-v0.6.9-interactive-error-analysis.md +0 -0
  120. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/docs/plans/2026-06-03-phase10-remaining.md +0 -0
  121. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/docs/plans/2026-06-04-isolated-provider-bootstrap.md +0 -0
  122. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/docs/plans/2026-06-04-v0.7.0-follow-up-implementation-candidates.md +0 -0
  123. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/docs/reference-architecture.md +0 -0
  124. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/docs/test-results/2026-06-04-isolated-provider-bootstrap.md +0 -0
  125. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/docs/test-results/phase-1-T.md +0 -0
  126. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/docs/test-results/phase-10-T.md +0 -0
  127. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/docs/test-results/phase-2-T.md +0 -0
  128. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/docs/test-results/phase-3-T.md +0 -0
  129. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/docs/test-results/phase-4-T.md +0 -0
  130. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/docs/test-results/phase-5-T.md +0 -0
  131. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/docs/test-results/phase-6-T.md +0 -0
  132. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/docs/test-results/phase-7-T.md +0 -0
  133. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/docs/test-results/phase-9-T.md +0 -0
  134. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/docs/test-results/v0.7.0-workflow-engine.md +0 -0
  135. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/docs/test-results/v070-smoke-checklist.md +0 -0
  136. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/docs/troubleshooting-provider-readiness.md +0 -0
  137. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/docs/workflow-v0.7.0-guide.md +0 -0
  138. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/__main__.py +0 -0
  139. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/agents/__init__.py +0 -0
  140. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/agents/response_cleaner.py +0 -0
  141. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/completion/__init__.py +0 -0
  142. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/context/__init__.py +0 -0
  143. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/context/analytics.py +0 -0
  144. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/context/budget.py +0 -0
  145. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/context/compressor.py +0 -0
  146. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/context/rotator.py +0 -0
  147. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/deliberation/consensus.py +0 -0
  148. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/deliberation/distributor.py +0 -0
  149. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/error_handler.py +0 -0
  150. {trinity_agent-0.7.2/src/trinity/deliberation → trinity_agent-0.9.0/src/trinity/health}/__init__.py +0 -0
  151. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/health/checker.py +0 -0
  152. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/logging.py +0 -0
  153. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/retry.py +0 -0
  154. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/setup/__init__.py +0 -0
  155. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/tui/__init__.py +0 -0
  156. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/tui/events.py +0 -0
  157. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/workflow/lifecycle.py +0 -0
  158. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/workflow/persistence.py +0 -0
  159. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/workflow/review.py +0 -0
  160. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/workflow/structured.py +0 -0
  161. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/workspace/__init__.py +0 -0
  162. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/src/trinity/workspace/isolation.py +0 -0
  163. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_analytics.py +0 -0
  164. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_budget.py +0 -0
  165. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_compressor.py +0 -0
  166. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_consensus_v2.py +0 -0
  167. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_deliberation.py +0 -0
  168. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_error_handling.py +0 -0
  169. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_health_checker.py +0 -0
  170. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_lifecycle_guard.py +0 -0
  171. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_logging.py +0 -0
  172. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_peer_review.py +0 -0
  173. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_protocol_compression.py +0 -0
  174. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_protocol_v2.py +0 -0
  175. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_response_cleaner.py +0 -0
  176. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_response_contract.py +0 -0
  177. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_retry.py +0 -0
  178. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_rotator.py +0 -0
  179. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_session_handoff.py +0 -0
  180. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_session_rotator.py +0 -0
  181. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_shared_ledger.py +0 -0
  182. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_structured_consensus.py +0 -0
  183. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_tmux_integration.py +0 -0
  184. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_workflow_persistence.py +0 -0
  185. {trinity_agent-0.7.2 → trinity_agent-0.9.0}/tests/test_workspace.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: trinity-agent
3
- Version: 0.7.2
3
+ Version: 0.9.0
4
4
  Summary: Three minds, one context — Multi-agent AI orchestrator for Claude Code, Codex, and Gemini CLI.
5
5
  Project-URL: Homepage, https://github.com/hongdangmoo49/Trinity
6
6
  Project-URL: Repository, https://github.com/hongdangmoo49/Trinity
@@ -25,18 +25,24 @@
25
25
  - `/questions --select --all` decision wizard
26
26
  - 한국어/번호형 open question parser 보강
27
27
 
28
+ - Model-backed central synthesis with heuristic fallback, fixed provider priority, and fast model defaults
29
+ - Blueprint-ready 실행 의도 라우팅, deliverable-first work package 분해,
30
+ provider load-balanced assignment, 병렬 그룹 preview
31
+
28
32
  ### 운영 문서
29
33
 
30
34
  - [v0.7.0 Workflow Guide](workflow-v0.7.0-guide.md)
31
35
  - [v0.7.0 후속 구현 후보](plans/2026-06-04-v0.7.0-follow-up-implementation-candidates.md)
36
+ - [Model-backed Central Synthesis implementation result](test-results/2026-06-04-model-backed-synthesis.md)
37
+ - [Blueprint Parallel Implementation result](test-results/2026-06-04-blueprint-parallel-implementation.md)
32
38
  - [Provider Readiness Troubleshooting](troubleshooting-provider-readiness.md)
33
39
  - [v0.7.0 Workflow Engine 테스트 결과](test-results/v0.7.0-workflow-engine.md)
34
40
  - [v0.7.0 WSL/tmux Smoke Test Checklist](test-results/v070-smoke-checklist.md)
35
41
 
36
42
  ### 검증 기준선
37
43
 
38
- - 패키지/CLI 버전: `0.7.2`
39
- - `uv run pytest -q` 915 passed, 1 warning
44
+ - 패키지/CLI 버전: `0.9.0`
45
+ - `uv run pytest -q` -> 989 passed, 1 warning
40
46
  - 변경 파일 대상 ruff check 통과
41
47
  - 실제 WSL/tmux/provider smoke는 릴리스 전 별도 수행 필요
42
48
 
@@ -1028,7 +1028,7 @@ Trinity v0.7.0
1028
1028
  Workflow: IDLE
1029
1029
  Providers:
1030
1030
  claude READY opus[1m]
1031
- codex READY gpt-5.1
1031
+ codex READY gpt-5.4-mini
1032
1032
  gemini AUTH_REQUIRED Run: gemini auth/login ...
1033
1033
  ```
1034
1034
 
@@ -0,0 +1,451 @@
1
+ # Blueprint Ready -> Parallel Implementation 전환 설계
2
+
3
+ 작성일: 2026-06-04
4
+ 상태: 1차 구현 완료
5
+ 관련 코드:
6
+
7
+ - `src/trinity/workflow/models.py`
8
+ - `src/trinity/workflow/engine.py`
9
+ - `src/trinity/workflow/execution.py`
10
+ - `src/trinity/providers/policy.py`
11
+ - `src/trinity/tui/session.py`
12
+
13
+ ---
14
+
15
+ ## 1. 목적
16
+
17
+ 이 문서는 Trinity가 설계 단계에서 만든 `blueprint_ready` 산출물을 실제 구현 단계로 자연스럽게 넘기는 방식을 정의한다.
18
+
19
+ 핵심 목표는 다음과 같다.
20
+
21
+ ```text
22
+ 설계도(blueprint)를 하나의 빵으로 보고,
23
+ 동시에 먹을 수 있는 독립 조각(work package)을 찾아,
24
+ 활성 에이전트 수만큼 균형 있게 나누어,
25
+ 각 에이전트가 격리된 작업공간에서 병렬 구현한다.
26
+ ```
27
+
28
+ 이 방식에서 provider 우선순위는 작업 분배의 중심 규칙이 아니다. 중심 규칙은 독립성, 충돌 가능성, 작업량 균형, provider 적합도다. `codex -> claude -> antigravity` 같은 provider 우선순위는 동률 처리, fallback, 단일 담당자 선택에만 사용한다.
29
+
30
+ ---
31
+
32
+ ## 2. 현재 기준점
33
+
34
+ 최신 workflow 모델에는 이미 다음 상태와 자료구조가 있다.
35
+
36
+ ```text
37
+ WorkflowState:
38
+ idle
39
+ preflight
40
+ deliberating
41
+ needs_user_decision
42
+ blueprint_ready
43
+ executing
44
+ reviewing
45
+ done
46
+ failed
47
+ ```
48
+
49
+ `WorkflowSession`은 `blueprint`, `work_packages`, `execution_results`, `decisions`를 보존한다. `WorkPackage`는 다음 실행 스케줄링 정보도 가진다.
50
+
51
+ ```text
52
+ id
53
+ title
54
+ owner_agent
55
+ objective
56
+ scope
57
+ out_of_scope
58
+ dependencies
59
+ expected_files
60
+ acceptance_criteria
61
+ status
62
+ requires_execution
63
+ ```
64
+
65
+ 현재 TUI에는 `blueprint_ready` 상태에서 `/execute`를 호출해 현재 blueprint의 work package를 executable로 재생성하고 실행하는 흐름이 있다. `ExecutionProtocol`은 dependency-ready package를 고르고 `ParallelExecutionPolicy`로 병렬 batch를 만든 뒤 `asyncio.gather()`로 실행한다.
66
+
67
+ 따라서 이 문서의 설계는 완전히 새 엔진을 만들자는 뜻이 아니라, 현재 구조를 사용자가 기대하는 "설계 -> 승인 -> 병렬 구현 -> 병합/검증" 흐름으로 명확히 고정하는 정책이다.
68
+
69
+ ---
70
+
71
+ ## 3. 사용자 경험 계약
72
+
73
+ `blueprint_ready`는 설계 완료 상태다. 이 상태에 진입하는 것만으로 파일을 수정하면 안 된다.
74
+
75
+ 설계가 끝나면 TUI는 다음처럼 표시한다.
76
+
77
+ ```text
78
+ Blueprint ready
79
+
80
+ Work packages: 7
81
+ Parallel groups: 3
82
+ Active providers: codex, claude, antigravity
83
+
84
+ Next action
85
+ > Implement all packages
86
+ Select packages
87
+ Revise blueprint
88
+ Stop here
89
+ ```
90
+
91
+ 사용자가 다음 의도를 표현하면 구현 단계로 넘어간다.
92
+
93
+ ```text
94
+ /execute
95
+ 개발해라
96
+ 구현해라
97
+ 진행해라
98
+ 이대로 만들어라
99
+ ```
100
+
101
+ 반대로 다음 의도는 구현으로 넘어가지 않는다.
102
+
103
+ ```text
104
+ 설계만 해라
105
+ 구현하지 마라
106
+ 파일을 바꾸지 마라
107
+ 대안을 더 검토해라
108
+ ```
109
+
110
+ 애매한 입력은 기존 blueprint를 폐기하고 새 토론을 시작하지 않는다. 먼저 사용자에게 다음 선택지를 보여준다.
111
+
112
+ ```text
113
+ 현재 설계도가 준비되어 있습니다.
114
+
115
+ > 이 설계도로 구현 시작
116
+ 이 설계를 더 다듬기
117
+ 새 요청으로 시작
118
+ 취소
119
+ ```
120
+
121
+ ---
122
+
123
+ ## 4. 상태 전환
124
+
125
+ 외부에 노출되는 persisted state는 현재 enum을 우선 사용한다.
126
+
127
+ ```text
128
+ deliberating
129
+ -> needs_user_decision
130
+ -> deliberating
131
+ -> blueprint_ready
132
+ -> executing
133
+ -> reviewing
134
+ -> done
135
+ ```
136
+
137
+ 구현 승인 직후의 내부 절차는 다음과 같이 해석한다.
138
+
139
+ ```text
140
+ blueprint_ready
141
+ -> implementation_requested
142
+ -> planning_execution
143
+ -> executing_batches
144
+ -> integrating
145
+ -> validating
146
+ -> reviewing
147
+ -> done
148
+ ```
149
+
150
+ `implementation_requested`, `planning_execution`, `executing_batches`, `integrating`, `validating`은 당장 `WorkflowState`에 추가하지 않아도 된다. 초기에는 event log와 TUI status label로 표현하고, 재개/중단 복구에 필요해지면 별도 enum으로 승격한다.
151
+
152
+ ---
153
+
154
+ ## 5. Blueprint 불변성
155
+
156
+ 구현 요청이 들어오면 원본 blueprint는 immutable artifact로 고정한다.
157
+
158
+ 원칙:
159
+
160
+ - `blueprint_ready` 이후 구현 중에는 원본 blueprint를 수정하지 않는다.
161
+ - 구현 중 새 결정이 필요하면 `DecisionRecord`로 추가한다.
162
+ - 새 결정이 blueprint의 전제를 바꾸면 실행을 멈추고 `needs_user_decision` 또는 `deliberating`으로 되돌린다.
163
+ - 실행 결과는 `ExecutionResult`와 ledger에 기록하고, 원본 설계와 실제 구현 차이를 추적한다.
164
+
165
+ 권장 artifact:
166
+
167
+ ```text
168
+ .trinity/workflow/session.json
169
+ .trinity/workflow/events.jsonl
170
+ .trinity/workflow/blueprints/<blueprint_id>.json
171
+ .trinity/workflow/runs/<run_id>/...
172
+ ```
173
+
174
+ ---
175
+
176
+ ## 6. Work Package 분해 정책
177
+
178
+ `work_packages`는 provider 수에 맞춰 기계적으로 먼저 3개를 만드는 것이 아니다. 먼저 설계도를 독립 deliverable 단위로 쪼갠다.
179
+
180
+ 좋은 package 조건:
181
+
182
+ - 하나의 명확한 objective를 가진다.
183
+ - acceptance criteria가 독립적으로 검증 가능하다.
184
+ - 예상 수정 파일이 `expected_files`에 들어 있다.
185
+ - 다른 package가 먼저 끝나야 하면 `dependencies`에 package id를 넣는다.
186
+ - 같은 파일을 동시에 수정할 가능성이 있으면 같은 batch에 넣지 않는다.
187
+
188
+ 예시:
189
+
190
+ ```text
191
+ WP-001 config schema 추가
192
+ expected_files: src/trinity/config.py, tests/test_config.py
193
+
194
+ WP-002 execution scheduler 추가
195
+ expected_files: src/trinity/workflow/execution.py, tests/test_execution_protocol.py
196
+
197
+ WP-003 TUI 실행 선택지 추가
198
+ dependencies: WP-002
199
+ expected_files: src/trinity/tui/session.py, tests/test_tui_session.py
200
+
201
+ WP-004 docs 갱신
202
+ expected_files: docs/
203
+ ```
204
+
205
+ ---
206
+
207
+ ## 7. 병렬 그룹화 정책
208
+
209
+ 병렬 실행은 dependency graph와 file ownership을 모두 통과한 package에만 허용한다.
210
+
211
+ 절차:
212
+
213
+ ```text
214
+ 1. 전체 work_packages를 DAG로 해석한다.
215
+ 2. 아직 완료되지 않은 package 중 dependencies가 모두 DONE인 ready set을 만든다.
216
+ 3. expected_files가 겹치는 package를 같은 batch에서 제외한다.
217
+ 4. 같은 worktree에서 provider-managed write가 두 개 이상이면 직렬화한다.
218
+ 5. 별도 git worktree를 쓰고 병합을 순차 처리할 수 있으면 병렬 실행을 허용한다.
219
+ 6. batch가 끝나면 결과를 기록하고 다음 ready set을 계산한다.
220
+ ```
221
+
222
+ 현재 `ParallelExecutionPolicy`는 다음 보수적 규칙을 이미 제공한다.
223
+
224
+ - read-only invocation은 병렬 허용
225
+ - provider-managed workspace-write가 같은 workspace를 공유하면 기본 직렬화
226
+ - file ownership이 명시적으로 disjoint하면 병렬 허용
227
+ - workspace가 분리되어 있으면 병렬 허용
228
+
229
+ 이 정책은 유지하되, 실제 구현 실행에서는 provider별 isolated worktree를 기본값으로 삼는다.
230
+
231
+ ---
232
+
233
+ ## 8. Provider 할당 정책
234
+
235
+ provider 우선순위는 "어려운 작업을 codex부터 준다"는 뜻이 아니다.
236
+
237
+ 할당 우선순위:
238
+
239
+ ```text
240
+ 1. dependencies가 풀린 package인가?
241
+ 2. 같은 batch에서 파일 충돌이 없는가?
242
+ 3. 활성 provider 수에 맞게 작업량이 균형 잡히는가?
243
+ 4. package 성격과 provider/agent role이 맞는가?
244
+ 5. 완전히 동률이면 provider priority를 tie-breaker로 사용한다.
245
+ ```
246
+
247
+ provider priority의 용도:
248
+
249
+ - 활성 provider가 일부뿐일 때 기본 후보 순서 결정
250
+ - 같은 package에 같은 점수의 provider가 여러 개일 때 tie-break
251
+ - synthesis, review coordinator, merge coordinator 같은 단일 담당자 선택
252
+ - provider 실패 시 fallback 순서 결정
253
+
254
+ 기본 priority:
255
+
256
+ ```text
257
+ codex -> claude -> antigravity
258
+ ```
259
+
260
+ 이 priority는 작업 난이도 순서가 아니다. 작업 난이도는 package의 risk/complexity score와 acceptance criteria로 따로 계산해야 한다.
261
+
262
+ ---
263
+
264
+ ## 9. 실행 공간과 병합
265
+
266
+ 각 provider는 같은 working tree를 동시에 직접 수정하지 않는다.
267
+
268
+ 권장 구조:
269
+
270
+ ```text
271
+ .trinity/workspace/runs/<run_id>/codex/
272
+ .trinity/workspace/runs/<run_id>/claude/
273
+ .trinity/workspace/runs/<run_id>/antigravity/
274
+ ```
275
+
276
+ 실행 흐름:
277
+
278
+ ```text
279
+ 1. run_id를 만든다.
280
+ 2. provider별 git worktree를 만든다.
281
+ 3. 각 package prompt에는 blueprint id, package id, scope, expected_files, acceptance criteria를 넣는다.
282
+ 4. provider는 자기 worktree에서만 파일을 수정한다.
283
+ 5. 각 package 완료 후 diff, files_changed, test result를 수집한다.
284
+ 6. orchestrator가 integration branch에 순차 병합한다.
285
+ 7. 충돌이 나면 resolve package를 만들거나 사용자 결정으로 전환한다.
286
+ 8. 전체 검증 후 review 단계로 넘긴다.
287
+ ```
288
+
289
+ 병합은 항상 중앙 orchestrator가 수행한다. provider가 직접 main branch나 integration branch를 push하지 않는다.
290
+
291
+ ---
292
+
293
+ ## 10. 검증과 커밋 단위
294
+
295
+ 검증은 package 단위와 전체 통합 단위로 나눈다.
296
+
297
+ package 단위:
298
+
299
+ - package acceptance criteria 확인
300
+ - package 관련 targeted tests 실행
301
+ - provider가 보고한 `files_changed`와 실제 diff 비교
302
+
303
+ 통합 단위:
304
+
305
+ - 전체 lint/test 실행
306
+ - workflow ledger와 execution results 갱신
307
+ - docs/test-results 작성
308
+ - checkpoint 또는 plan 문서 갱신
309
+
310
+ 커밋 정책:
311
+
312
+ - 가능하면 독립 package 단위로 commit한다.
313
+ - 같은 batch의 package들이 서로 강하게 엮여 있으면 batch 단위 commit을 허용한다.
314
+ - 충돌 해결 commit은 별도 commit으로 남긴다.
315
+ - 최종 검증/문서 갱신 commit은 필요하면 별도로 둔다.
316
+
317
+ ---
318
+
319
+ ## 11. TUI/CLI 동작 예시
320
+
321
+ ### 설계만 요청
322
+
323
+ ```text
324
+ User:
325
+ L2 브릿지 경로 파인더를 설계해줘
326
+
327
+ Trinity:
328
+ deliberating -> needs_user_decision -> blueprint_ready
329
+ "Blueprint ready. Implement, revise, or stop?"
330
+ ```
331
+
332
+ 파일 변경 없음.
333
+
334
+ ### 이후 구현 요청
335
+
336
+ ```text
337
+ User:
338
+ 개발해라
339
+
340
+ Trinity:
341
+ 현재 blueprint를 executable work packages로 재생성
342
+ dependency/file ownership 기반 batch 생성
343
+ provider별 isolated worktree 실행
344
+ 병합/검증/review
345
+ ```
346
+
347
+ ### 명시적 명령
348
+
349
+ ```text
350
+ /execute 비용 최저 경로를 우선 구현해라
351
+ ```
352
+
353
+ `DecisionRecord`에 사용자 실행 지시를 남기고 구현으로 넘어간다.
354
+
355
+ ---
356
+
357
+ ## 12. 수용 기준
358
+
359
+ 이 설계가 완료된 것으로 보려면 다음 조건을 만족해야 한다.
360
+
361
+ - `blueprint_ready` 진입만으로 파일이 수정되지 않는다.
362
+ - `blueprint_ready`에서 "개발해라" 또는 `/execute`가 기존 blueprint를 사용한다.
363
+ - 구현 요청이 새 deliberation을 시작하지 않는다.
364
+ - work package는 dependencies와 expected_files를 가진다.
365
+ - dependency가 풀리지 않은 package는 실행하지 않는다.
366
+ - 같은 workspace에서 충돌 가능성이 있는 provider-managed write는 병렬 실행하지 않는다.
367
+ - 별도 worktree와 disjoint file ownership이 있으면 병렬 실행한다.
368
+ - provider priority는 tie-break/fallback에만 사용한다.
369
+ - 실행 결과는 `ExecutionResult`와 workflow ledger에 기록된다.
370
+ - 모든 package가 done이면 review로 넘어간다.
371
+ - failed/blocked package는 `failed` 또는 `needs_user_decision` 상태로 반영된다.
372
+
373
+ ---
374
+
375
+ ## 13. 구현 후보 작업
376
+
377
+ 이 문서를 코드로 반영할 때의 작업 단위는 다음과 같다.
378
+
379
+ ```text
380
+ WP-A. Blueprint execution intent routing
381
+ - "개발해라", "구현해라" 등 blueprint-ready text를 execute action으로 분류
382
+ - ambiguous text는 선택 UI로 처리
383
+
384
+ WP-B. Work package scheduler hardening
385
+ - dependency-ready set 계산 검증
386
+ - package complexity/weight 계산
387
+ - provider별 load balancing
388
+
389
+ WP-C. Isolated worktree execution
390
+ - run_id별 provider worktree 생성
391
+ - execution prompt에 workspace boundary 명시
392
+ - diff/result 수집
393
+
394
+ WP-D. Integration and conflict handling
395
+ - package result를 integration branch에 순차 병합
396
+ - conflict 발생 시 resolve package 또는 user decision으로 전환
397
+
398
+ WP-E. Verification and commit workflow
399
+ - package targeted tests
400
+ - full test gate
401
+ - package/batch 단위 commit 규칙 적용
402
+
403
+ WP-F. TUI display
404
+ - blueprint_ready action picker
405
+ - batch/package execution progress
406
+ - blocked/failed package action picker
407
+ ```
408
+
409
+ ---
410
+
411
+ ## 14. 설계 결정
412
+
413
+ 최종 결정:
414
+
415
+ - 설계 완료와 구현 시작은 분리한다.
416
+ - 구현은 사용자 승인 이후에만 시작한다.
417
+ - work package 분배는 provider priority가 아니라 독립성/충돌/균형/적합도 중심으로 한다.
418
+ - provider priority는 tie-breaker와 fallback으로만 사용한다.
419
+ - 병렬 구현은 provider별 isolated worktree를 기본 전제로 한다.
420
+ - 병합, 검증, 커밋은 orchestrator가 중앙에서 순차적으로 관리한다.
421
+
422
+ ---
423
+
424
+ ## 15. 1차 구현 기록
425
+
426
+ 구현 브랜치: `codex/blueprint-parallel-implementation`
427
+
428
+ 완료 범위:
429
+
430
+ - `blueprint_ready` 상태에서 명확한 구현 의도(`개발해라`, `구현해라`,
431
+ `진행해라`, `이대로 만들어라`, `/execute`)는 기존 blueprint를 실행 대상으로 사용한다.
432
+ - 애매한 blueprint-ready 입력은 기존 blueprint를 폐기하지 않는다.
433
+ TTY에서는 선택 UI로 처리하고, non-TTY에서는 설계 보강으로 이어간다.
434
+ - 실행 승인 시 원본 blueprint를
435
+ `.trinity/workflow/blueprints/<workflow_id>.json` artifact로 고정한다.
436
+ - work package는 활성 provider 수에 맞춰 먼저 자르는 대신 blueprint deliverable
437
+ 단위로 생성한다.
438
+ - provider assignment는 현재 load balance를 우선하고, provider 적합도와
439
+ `codex -> claude -> antigravity -> gemini` priority는 tie-break에 사용한다.
440
+ - `WorkPackage.estimated_weight`를 추가해 분배와 parallel group preview에 사용한다.
441
+ - `/workflow`는 parallel group 수와 blueprint-ready next action을 표시한다.
442
+ - `/packages`는 dependencies, expected files, weight를 표시한다.
443
+ - execution prompt는 workspace boundary를 명시하고 provider가 branch/merge/commit/push를
444
+ 직접 수행하지 않도록 지시한다.
445
+
446
+ 검증:
447
+
448
+ - `uv run pytest tests/test_blueprint_decomposer.py tests/test_workflow_engine.py tests/test_tui_session.py tests/test_execution_protocol.py tests/test_parallel_execution_policy.py -q`
449
+ -> 114 passed
450
+ - `uvx ruff check ...` -> All checks passed
451
+ - `uv run pytest -q` -> 989 passed, 1 warning