dialectical-framework 1.4.2__tar.gz → 1.5.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 (188) hide show
  1. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/PKG-INFO +2 -8
  2. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/README.md +1 -6
  3. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/pyproject.toml +2 -2
  4. dialectical_framework-1.5.0/src/dialectical_framework/agents/advisor/__init__.py +1 -0
  5. dialectical_framework-1.5.0/src/dialectical_framework/agents/advisor/advisor.py +127 -0
  6. dialectical_framework-1.5.0/src/dialectical_framework/agents/advisor/system_prompts.py +371 -0
  7. dialectical_framework-1.5.0/src/dialectical_framework/agents/advisor/tools/__init__.py +1 -0
  8. dialectical_framework-1.5.0/src/dialectical_framework/agents/advisor/tools/anchor.py +74 -0
  9. dialectical_framework-1.5.0/src/dialectical_framework/agents/advisor/tools/explore.py +74 -0
  10. dialectical_framework-1.5.0/src/dialectical_framework/agents/advisor/tools/ingest.py +58 -0
  11. dialectical_framework-1.5.0/src/dialectical_framework/agents/advisor/tools/sync.py +20 -0
  12. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/analyst/skills/expand_polarities.py +5 -1
  13. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/apps.py +242 -6
  14. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/conversation_facilitator.py +10 -3
  15. dialectical_framework-1.5.0/src/dialectical_framework/agents/orchestrator/tools/inspect_node.py +663 -0
  16. dialectical_framework-1.5.0/src/dialectical_framework/concerns/dialectical_context.py +405 -0
  17. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/nodes/wheel.py +67 -2
  18. dialectical_framework-1.5.0/src/dialectical_framework/graph/rendering.py +120 -0
  19. dialectical_framework-1.4.2/src/dialectical_framework/agents/orchestrator/tools/inspect_node.py +0 -309
  20. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/LICENSE +0 -0
  21. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/__init__.py +0 -0
  22. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/__init__.py +0 -0
  23. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/agent_context.py +0 -0
  24. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/analyst/__init__.py +0 -0
  25. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/analyst/analyst.py +0 -0
  26. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/analyst/skills/__init__.py +0 -0
  27. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/analyst/skills/anchor_theses.py +0 -0
  28. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/analyst/skills/edit_perspective.py +0 -0
  29. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/analyst/skills/find_polarities.py +0 -0
  30. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/analyst/skills/introduce_polarity.py +0 -0
  31. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/analyst/skills/surface_theses.py +0 -0
  32. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/analyst/system_prompts.py +0 -0
  33. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/analyst/tools/__init__.py +0 -0
  34. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/analyst/tools/create_dx_input.py +0 -0
  35. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/analyst/tools/place_statement.py +0 -0
  36. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/execution_report.py +0 -0
  37. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/explorer/__init__.py +0 -0
  38. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/explorer/explorer.py +0 -0
  39. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/explorer/skills/__init__.py +0 -0
  40. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/explorer/skills/build_wheels.py +0 -0
  41. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/explorer/skills/explore_transformations.py +0 -0
  42. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/explorer/skills/generate_synthesis.py +0 -0
  43. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/explorer/system_prompts.py +0 -0
  44. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/explorer/tools/__init__.py +0 -0
  45. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/explorer/tools/create_nexus.py +0 -0
  46. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/explorer/tools/expand_nexus.py +0 -0
  47. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/explorer/tools/generate_synthesis.py +0 -0
  48. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/explorer/tools/present_exploration.py +0 -0
  49. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/orchestrator/__init__.py +0 -0
  50. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/orchestrator/tools/__init__.py +0 -0
  51. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/orchestrator/tools/add_input.py +0 -0
  52. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/orchestrator/tools/digest_input.py +0 -0
  53. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/orchestrator/tools/discard.py +0 -0
  54. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/orchestrator/tools/get_schema.py +0 -0
  55. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/orchestrator/tools/present_analysis.py +0 -0
  56. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/orchestrator/tools/query_graph.py +0 -0
  57. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/orchestrator/tools/read_digest.py +0 -0
  58. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/orchestrator/tools/read_input.py +0 -0
  59. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/reasonable_concern.py +0 -0
  60. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/agents/stream_events.py +0 -0
  61. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/__init__.py +0 -0
  62. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/ac_re_taxonomy.py +0 -0
  63. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/action_extraction.py +0 -0
  64. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/add_input.py +0 -0
  65. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/ai_dto/__init__.py +0 -0
  66. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/ai_dto/statement_dto.py +0 -0
  67. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/ai_dto/statements_deck_dto.py +0 -0
  68. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/antithesis_classification.py +0 -0
  69. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/antithesis_extraction.py +0 -0
  70. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/aspect_classification.py +0 -0
  71. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/aspect_generation.py +0 -0
  72. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/causality/__init__.py +0 -0
  73. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/causality/causality_estimator.py +0 -0
  74. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/causality/causality_estimator_balanced.py +0 -0
  75. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/causality/causality_estimator_criteria.py +0 -0
  76. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/causality/causality_estimator_desirable.py +0 -0
  77. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/causality/causality_estimator_feasible.py +0 -0
  78. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/causality/causality_estimator_realistic.py +0 -0
  79. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/causality/causality_normalizer.py +0 -0
  80. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/causality/estimator_resolver.py +0 -0
  81. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/causality_estimation.py +0 -0
  82. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/control_statements_check.py +0 -0
  83. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/create_dx_input.py +0 -0
  84. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/create_nexus.py +0 -0
  85. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/diagonal_oppositions_check.py +0 -0
  86. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/discard.py +0 -0
  87. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/display_text_edit.py +0 -0
  88. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/expand_nexus.py +0 -0
  89. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/perspective_combination.py +0 -0
  90. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/perspective_validation.py +0 -0
  91. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/positive_ac_re_apex_derivation.py +0 -0
  92. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/source_digest.py +0 -0
  93. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/statement_classification.py +0 -0
  94. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/statement_deduplication.py +0 -0
  95. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/statement_placement.py +0 -0
  96. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/synthesis_generation.py +0 -0
  97. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/thesis_extraction.py +0 -0
  98. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/transformation_audit.py +0 -0
  99. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/concerns/transformation_generation.py +0 -0
  100. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/dialectical_reasoning.py +0 -0
  101. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/enums/__init__.py +0 -0
  102. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/enums/causality_preset.py +0 -0
  103. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/enums/di.py +0 -0
  104. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/events/__init__.py +0 -0
  105. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/events/graph_event.py +0 -0
  106. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/events/graph_event_bus.py +0 -0
  107. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/exceptions/__init__.py +0 -0
  108. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/exceptions/node_errors.py +0 -0
  109. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/exceptions/resolver_errors.py +0 -0
  110. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/__init__.py +0 -0
  111. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/composite_input_resolver.py +0 -0
  112. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/dialexity_input_resolver.py +0 -0
  113. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/estimation_manager.py +0 -0
  114. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/mixins/__init__.py +0 -0
  115. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/mixins/incremental_build_mixin.py +0 -0
  116. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/mixins/intent_mixin.py +0 -0
  117. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/mixins/persistable_mixin.py +0 -0
  118. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/nodes/__init__.py +0 -0
  119. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/nodes/assessable_entity.py +0 -0
  120. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/nodes/base_node.py +0 -0
  121. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/nodes/case.py +0 -0
  122. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/nodes/cycle.py +0 -0
  123. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/nodes/estimation.py +0 -0
  124. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/nodes/ideas.py +0 -0
  125. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/nodes/input.py +0 -0
  126. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/nodes/nexus.py +0 -0
  127. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/nodes/perspective.py +0 -0
  128. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/nodes/polarity.py +0 -0
  129. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/nodes/rationale.py +0 -0
  130. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/nodes/statement.py +0 -0
  131. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/nodes/synthesis.py +0 -0
  132. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/nodes/transformation.py +0 -0
  133. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/nodes/transition.py +0 -0
  134. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/relationship_manager.py +0 -0
  135. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/relationships/__init__.py +0 -0
  136. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/relationships/action_reflection_relationship.py +0 -0
  137. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/relationships/belongs_to_cycle_relationship.py +0 -0
  138. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/relationships/belongs_to_nexus_relationship.py +0 -0
  139. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/relationships/changed_to_relationship.py +0 -0
  140. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/relationships/contradiction_of_relationship.py +0 -0
  141. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/relationships/critiques_relationship.py +0 -0
  142. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/relationships/distilled_to_relationship.py +0 -0
  143. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/relationships/estimates_relationship.py +0 -0
  144. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/relationships/explains_relationship.py +0 -0
  145. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/relationships/has_input_relationship.py +0 -0
  146. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/relationships/has_statement_relationship.py +0 -0
  147. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/relationships/has_wheel_relationship.py +0 -0
  148. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/relationships/immutable_structure.py +0 -0
  149. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/relationships/is_source_of_relationship.py +0 -0
  150. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/relationships/is_target_of_relationship.py +0 -0
  151. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/relationships/negative_side_of_relationship.py +0 -0
  152. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/relationships/opposite_direction_relationship.py +0 -0
  153. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/relationships/opposite_of_relationship.py +0 -0
  154. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/relationships/polarity_relationship.py +0 -0
  155. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/relationships/positive_side_of_relationship.py +0 -0
  156. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/relationships/provides_relationship.py +0 -0
  157. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/relationships/synthesis_of_relationship.py +0 -0
  158. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/repositories/__init__.py +0 -0
  159. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/repositories/case_repository.py +0 -0
  160. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/repositories/cycle_repository.py +0 -0
  161. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/repositories/input_repository.py +0 -0
  162. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/repositories/nexus_repository.py +0 -0
  163. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/repositories/node_repository.py +0 -0
  164. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/repositories/perspective_repository.py +0 -0
  165. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/repositories/polarity_repository.py +0 -0
  166. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/repositories/schema_repository.py +0 -0
  167. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/repositories/statement_repository.py +0 -0
  168. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/repositories/transformation_repository.py +0 -0
  169. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/repositories/wheel_repository.py +0 -0
  170. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/scope_context.py +0 -0
  171. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/verbatim_input_resolver.py +0 -0
  172. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/wheel_segment.py +0 -0
  173. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/graph/wheel_segment_polar_pair.py +0 -0
  174. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/protocols/__init__.py +0 -0
  175. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/protocols/has_config.py +0 -0
  176. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/protocols/input_resolver.py +0 -0
  177. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/settings.py +0 -0
  178. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/utils/__init__.py +0 -0
  179. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/utils/bedrock_provider.py +0 -0
  180. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/utils/concurrency.py +0 -0
  181. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/utils/dc_replace.py +0 -0
  182. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/utils/decompose_probability_uniformly.py +0 -0
  183. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/utils/edge_context.py +0 -0
  184. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/utils/effect_logger.py +0 -0
  185. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/utils/input_context.py +0 -0
  186. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/utils/order_transitions.py +0 -0
  187. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/utils/sequence_generation.py +0 -0
  188. {dialectical_framework-1.4.2 → dialectical_framework-1.5.0}/src/dialectical_framework/utils/use_brain.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dialectical-framework
3
- Version: 1.4.2
3
+ Version: 1.5.0
4
4
  Summary: A dialectical framework for augmented intelligence. AI reasoning powered with dialectics supports humans in: system optimization (psychology, engineering, business, politics, etc.); dispute resolution (mediation, conflicts, negotiations, etc.); decision-making (dilemmas, challenging situations, win-win, etc.).
5
5
  License: MIT
6
6
  Keywords: dialectics,dialectical-reasoning,synthesis,thesis-antithesis,ai,artificial-intelligence,llm,reasoning-framework,philosophy,logic,argumentation,conflict-resolution,decision-making,critical-thinking,semantic-graph,mirascope,pydantic,perspectives,polarity-reasoning
@@ -32,7 +32,7 @@ Requires-Dist: broadcaster (>=0.3.1,<0.4.0)
32
32
  Requires-Dist: dependency-injector (>=4.48.2,<5.0.0)
33
33
  Requires-Dist: gqlalchemy (>=1.8.0,<2.0.0)
34
34
  Requires-Dist: langfuse (>=4.5.1,<5.0.0)
35
- Requires-Dist: mirascope[anthropic,openai,ops] (>=2.4.0,<3.0.0)
35
+ Requires-Dist: mirascope[anthropic,openai,ops] (>=2.5.0,<3.0.0)
36
36
  Requires-Dist: python-dotenv (>=1.2.1,<2.0.0)
37
37
  Requires-Dist: tabulate (>=0.9.0,<0.10.0)
38
38
  Project-URL: Homepage, https://github.com/dialexity/dialectical-framework
@@ -165,9 +165,3 @@ poetry run pytest --real-llm # Hit real LLM provider
165
165
  - [Dialectical Wheels Overview](https://dialexity.com/blog/dialectical-wheels-for-systems-optimization/)
166
166
  - [Dialectical Ethics](https://dialexity.com/blog/dialectical-ethics/)
167
167
  - [Earlier Work](https://dialexity.com/blog/wp-content/uploads/2023/11/Moral-Wisdom-from-Ontology-1.pdf)
168
-
169
- ## Applications
170
-
171
- - [Eye Opener](https://app.dialexity.com/aiapps/eye-opener) — Analyze text, reveal hidden assumptions
172
- - [Argument Inspector](https://app.dialexity.com/aiapps/argument-inspector/) — Deep-dive into case arguments for analysts and mediators
173
-
@@ -123,9 +123,4 @@ poetry run pytest --real-llm # Hit real LLM provider
123
123
 
124
124
  - [Dialectical Wheels Overview](https://dialexity.com/blog/dialectical-wheels-for-systems-optimization/)
125
125
  - [Dialectical Ethics](https://dialexity.com/blog/dialectical-ethics/)
126
- - [Earlier Work](https://dialexity.com/blog/wp-content/uploads/2023/11/Moral-Wisdom-from-Ontology-1.pdf)
127
-
128
- ## Applications
129
-
130
- - [Eye Opener](https://app.dialexity.com/aiapps/eye-opener) — Analyze text, reveal hidden assumptions
131
- - [Argument Inspector](https://app.dialexity.com/aiapps/argument-inspector/) — Deep-dive into case arguments for analysts and mediators
126
+ - [Earlier Work](https://dialexity.com/blog/wp-content/uploads/2023/11/Moral-Wisdom-from-Ontology-1.pdf)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "dialectical-framework"
3
- version = "1.4.2"
3
+ version = "1.5.0"
4
4
  description = "A dialectical framework for augmented intelligence. AI reasoning powered with dialectics supports humans in: system optimization (psychology, engineering, business, politics, etc.); dispute resolution (mediation, conflicts, negotiations, etc.); decision-making (dilemmas, challenging situations, win-win, etc.)."
5
5
  authors = ["Evaldas Taroza <evaldas@dialexity.com>"]
6
6
  readme = "README.md"
@@ -46,7 +46,7 @@ mirascope = {extras = [
46
46
  "openai",
47
47
  "anthropic",
48
48
  "ops"
49
- ], version = "^2.4.0"}
49
+ ], version = "^2.5.0"}
50
50
  python-dotenv = "^1.2.1"
51
51
  tabulate = "^0.9.0"
52
52
  dependency-injector = "^4.48.2"
@@ -0,0 +1,127 @@
1
+ """
2
+ Advisor: Conversational agent for advisory apps.
3
+
4
+ Pure conversation — the framework runs silently in the background.
5
+ The user never sees framework terminology, just experiences progressively
6
+ wiser responses as dialectical understanding builds.
7
+
8
+ Two use cases:
9
+ - Fresh start: user talks, framework builds graph behind the scenes.
10
+ - Post-analysis: rich graph exists, advisor draws on it immediately.
11
+ """
12
+
13
+ from __future__ import annotations
14
+
15
+ from typing import AsyncGenerator, Optional
16
+
17
+ from pydantic import BaseModel, Field
18
+
19
+ from dialectical_framework.agents.advisor.system_prompts import SYSTEM_PROMPT
20
+ from dialectical_framework.agents.agent_context import agent_scope
21
+ from dialectical_framework.agents.conversation_facilitator import \
22
+ ConversationFacilitator
23
+ from dialectical_framework.agents.stream_events import StreamEvent
24
+
25
+
26
+ class ChatResponse(BaseModel):
27
+ """Response from the advisor chat."""
28
+
29
+ message: str = Field(description="The assistant's response message")
30
+
31
+
32
+ class Advisor:
33
+ """
34
+ Conversational agent for advisory apps.
35
+
36
+ The host app is responsible for:
37
+ - Creating the Case and managing scope(sid)
38
+ - Persisting and loading conversation messages
39
+ - Wrapping chat() calls in `with scope(sid):`
40
+ - Optionally pre-computing dialectical_context via DialecticalContext
41
+
42
+ Usage (fresh start):
43
+ with scope(case.sid):
44
+ advisor = Advisor(app_preamble=COUNSELOR_APP)
45
+ response = await advisor.chat("My son started smoking...")
46
+
47
+ Usage (post-analysis, rich graph exists):
48
+ with scope(case.sid):
49
+ context = await DialecticalContext().resolve()
50
+ advisor = Advisor(app_preamble=COUNSELOR_APP, dialectical_context=context)
51
+ response = await advisor.chat("I want to talk through what we found...")
52
+
53
+ Usage (resuming conversation):
54
+ with scope(case.sid):
55
+ advisor = Advisor(app_preamble=COUNSELOR_APP, messages=saved_messages)
56
+ response = await advisor.chat("What about the other angle?")
57
+ """
58
+
59
+ AGENT_NAME = "advisor"
60
+
61
+ def __init__(
62
+ self,
63
+ app_preamble: Optional[str] = None,
64
+ dialectical_context: Optional[str] = None,
65
+ messages: Optional[list] = None,
66
+ ) -> None:
67
+ self._tools = _build_tools()
68
+ self._conversation = ConversationFacilitator(tools=self._tools)
69
+ if messages:
70
+ self._conversation._messages = list(messages)
71
+ self._conversation.set_system_prompt(
72
+ self._build_system_prompt(app_preamble, dialectical_context)
73
+ )
74
+
75
+ def _build_system_prompt(
76
+ self,
77
+ app_preamble: Optional[str] = None,
78
+ dialectical_context: Optional[str] = None,
79
+ ) -> str:
80
+ parts = []
81
+ if app_preamble:
82
+ parts.append(app_preamble)
83
+
84
+ context_text = (
85
+ dialectical_context
86
+ or "No prior understanding — this is a fresh conversation."
87
+ )
88
+ system = SYSTEM_PROMPT.replace("{dialectical_context}", context_text)
89
+ parts.append(system)
90
+
91
+ return "\n\n".join(parts)
92
+
93
+ async def chat(self, user_message: str) -> str:
94
+ with agent_scope(self.AGENT_NAME):
95
+ result = await self._conversation.submit(ChatResponse, user_message)
96
+ return result.message
97
+
98
+ async def chat_stream(self, user_message: str) -> AsyncGenerator[StreamEvent, None]:
99
+ with agent_scope(self.AGENT_NAME):
100
+ async for event in self._conversation.submit_stream(
101
+ ChatResponse, user_message
102
+ ):
103
+ yield event
104
+
105
+ @property
106
+ def messages(self) -> list:
107
+ return self._conversation._messages
108
+
109
+
110
+ def _build_tools() -> list:
111
+ from dialectical_framework.agents.advisor.tools.anchor import anchor
112
+ from dialectical_framework.agents.advisor.tools.explore import explore
113
+ from dialectical_framework.agents.advisor.tools.ingest import ingest
114
+ from dialectical_framework.agents.advisor.tools.sync import sync
115
+ from dialectical_framework.agents.orchestrator.tools.inspect_node import \
116
+ inspect_node
117
+ from dialectical_framework.agents.orchestrator.tools.read_digest import \
118
+ read_digest
119
+
120
+ return [
121
+ ingest,
122
+ anchor,
123
+ explore,
124
+ sync,
125
+ inspect_node,
126
+ read_digest,
127
+ ]
@@ -0,0 +1,371 @@
1
+ """
2
+ System prompt for the Advisor agent.
3
+
4
+ Domain-neutral core: teaches the LLM how to use dialectical graph output
5
+ to help someone arrive at their own decision. The persona (warm counselor,
6
+ sharp strategist, etc.) comes from the app preamble.
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ SYSTEM_PROMPT = """## Role
12
+
13
+ You are in conversation with someone navigating a decision, tension, or
14
+ situation. Your understanding deepens through dialectical analysis that runs
15
+ silently — they never see the machinery, only experience increasingly precise
16
+ and insightful responses that help them find their own path.
17
+
18
+ What makes your insight different from generic advice: you have access to a
19
+ structured reasoning process that identifies what people literally cannot see
20
+ from their current position, and generates specific coordinated action-reflection
21
+ recipes that resolve tensions rather than merely naming them.
22
+
23
+ ## How Dialectical Understanding Works (Your Internal Model)
24
+
25
+ When someone holds a position — whether personal conviction, business strategy,
26
+ design choice, or ethical stance — they are structurally blind to certain aspects.
27
+ This is not a failure of intelligence; it's an entanglement property of positions:
28
+
29
+ **Blindspots are structural, not accidental.** When someone champions their
30
+ position's strength (T+), they inadvertently project a criticism onto the
31
+ opposing force (A-) without realizing it. When they acknowledge their own
32
+ concern (T-), they cannot see that the resolution lies in the opposition's
33
+ constructive contribution (A+) — the very thing they're dismissing or fighting.
34
+
35
+ This is why people loop: they oscillate between championing their strength and
36
+ worrying about their weakness, without ever engaging what the opposing force
37
+ actually offers. The framework breaks this loop by computing exactly what's
38
+ hidden and why.
39
+
40
+ **Control statements verify non-triviality.** Your understanding satisfies:
41
+ "T+ without A+ yields T-" and "A+ without T+ yields A-". If these don't hold,
42
+ the insight is wrong. This structural guarantee means your counsel identifies
43
+ genuine complementarities — not platitudes like "find balance" or "consider
44
+ both sides."
45
+
46
+ Example (strategic): A CEO championing "operational efficiency" (T+) is
47
+ structurally blind to "creative autonomy enables adaptation" (A+). They can see
48
+ their own risk ("maybe we're too rigid" = T-) but cannot see that the fix comes
49
+ from the opposing force's strength — not from loosening control, but from what
50
+ autonomy actually contributes. The control statement verifies: "Efficiency
51
+ without autonomy yields rigidity" (T+ without A+ → T-). This is non-trivial.
52
+
53
+ Example (personal): A parent valuing "keeping my child safe" (T+) is blind to
54
+ "autonomy builds responsibility" (A+). "Safety without autonomy yields
55
+ over-control" (T+ without A+ → T-). Same structure, different domain.
56
+
57
+ **Pathways are paired action + reflection.** Resolution requires simultaneous:
58
+ - Action (Ac+): Transform the exaggeration into constructive contribution to
59
+ the other side. This is WHAT TO DO — specific, concrete, implementable.
60
+ - Reflection (Re+): Transform the opposition's projection back into renewed
61
+ strength. This is WHAT TO INTERNALIZE — a shift in understanding that makes
62
+ the action sustainable.
63
+
64
+ One without the other fails:
65
+ - Action without reflection = going through motions (compliance, mechanical
66
+ change that reverts under pressure)
67
+ - Reflection without action = insight without change (understanding that
68
+ never translates to different behavior or decisions)
69
+
70
+ Multiple pathways exist at different depth/proactiveness levels — from small
71
+ corrective adjustments to transformative redesigns.
72
+
73
+ **Synthesis is emergence, not compromise.** The integration (S+) is not "split
74
+ the difference." It's a qualitative shift — what becomes possible when both
75
+ forces contribute simultaneously. It increases dimensionality: more options,
76
+ more capacity for self-correction, more resilience.
77
+
78
+ **Negative synthesis (S-) is the trap to name.** When apparent resolution takes
79
+ the form of one side dominating, oscillation between extremes, or binary
80
+ either/or framing — that's S-. It imitates progress but reduces dimensionality.
81
+ It looks decisive but requires constant maintenance and eventually breaks.
82
+ Name it when you see the person heading there.
83
+
84
+ ## How to Use Your Understanding in Conversation
85
+
86
+ **Before analysis (no structural understanding yet):**
87
+ You rely on your own capabilities. Listen carefully. Reflect back what you hear.
88
+ Ask one question that might surface the underlying tension — not a data-
89
+ gathering question, but one that reveals what might be opposing their position.
90
+
91
+ **When understanding already exists at conversation start:**
92
+ If the Current Understanding section below contains perspectives, you already
93
+ have structural insight. Skip the listening phase — draw on what you know
94
+ immediately. Match the depth to what's available: if only perspectives exist,
95
+ offer blindspot insights. If pathways/synthesis exist, offer those too.
96
+
97
+ **After ingest or anchor (tensions identified):**
98
+ You now know what the person can see (their position and self-acknowledged
99
+ concerns) and what they CANNOT see (the opposition's constructive contribution
100
+ and the hidden cost of championing their strength). Use this to:
101
+
102
+ - Validate their position — their strength IS real, their concern IS legitimate
103
+ - Introduce the blindspot as DISCOVERY: what the opposing force actually offers
104
+ that they need, and what their championing inadvertently creates
105
+ - Never dump all insights at once. The blindspot (A+) is the most powerful
106
+ single insight — use it at the moment when the person is ready to receive it
107
+ - Help THEM see the complementarity — don't prescribe, illuminate. The best
108
+ counsel makes the person say "I hadn't seen it that way"
109
+
110
+ **After explore (pathways available):**
111
+ You now have specific action-reflection recipes. Use them to:
112
+
113
+ - Offer the ACTION as a concrete move they can make — not vague advice but a
114
+ specific behavioral, strategic, or structural change
115
+ - Pair it with the REFLECTION — the accompanying shift in understanding that
116
+ sustains the action. Present them together: "Here's what you could do... and
117
+ what makes it work is holding this in mind as you do it..."
118
+ - If multiple pathways exist at different depth levels, match to readiness:
119
+ start accessible (adjustment-level), go deeper (transformative) if they engage
120
+ - Let them choose. Present pathways as options with genuine tradeoffs, not as
121
+ the single right answer
122
+
123
+ **After synthesis available:**
124
+ You now have the integration vision. Use it to:
125
+
126
+ - Paint what becomes possible — what the situation looks like when both forces
127
+ contribute. Make it concrete to their context.
128
+ - Name the S- trap if they're heading there: "There's a version of this that
129
+ looks like resolution but actually..."
130
+ - Frame synthesis as something they GROW INTO, not something they implement
131
+ in one move. It emerges from sustained Ac+ and Re+ working together.
132
+
133
+ ## Internal Tools
134
+
135
+ Six tools. Use silently — never mention them:
136
+
137
+ - `ingest` — Processes raw material (text, files, transcripts) through
138
+ dialectical analysis. Discovers tensions you can't yet see. Extracts
139
+ theses, finds oppositions, builds full perspectives with aspects.
140
+
141
+ - `anchor` — Plants a specific tension from the conversation. Two modes:
142
+ with thesis + antithesis (one polarity, one perspective), or thesis only
143
+ (discovers multiple possible antitheses, each producing perspectives).
144
+ More precise than ingest — use when you can see at least the position.
145
+
146
+ - `explore` — Groups perspectives into a nexus and generates pathways.
147
+ Builds causal arrangements, action-reflection transformations, and
148
+ synthesis. Pass perspective hashes to explore together. Optionally pass
149
+ an existing nexus hash to enrich it with new perspectives.
150
+
151
+ - `sync` — Re-reads the full graph state. Use when you need a fresh full
152
+ picture after multiple changes — e.g., to see all perspectives with
153
+ scores before deciding what to group for explore.
154
+
155
+ - `inspect_node` — Retrieves full detail of a specific node by hash. Use when
156
+ the graph dump shows a node you want to understand more deeply. Pass the
157
+ short hash. Returns: full explanation text, quality scores, rationales
158
+ (the reasoning behind why something was classified or scored a certain way),
159
+ connected nodes, and lineage. Nodes carry rationales that explain the
160
+ analytical reasoning — use these to ground your counsel in specific logic
161
+ rather than generic advice.
162
+
163
+ - `read_digest` — Retrieves the analytical digest of a source input by hash.
164
+ Use when you need to understand what source material fed the analysis.
165
+ The dump lists input hashes under Sources — call this to read what they
166
+ contain.
167
+
168
+ ## When to Use Tools
169
+
170
+ **ingest**: When raw material needs analysis — files, transcripts, or
171
+ substantial accumulated user sharing where you don't yet see the tensions.
172
+ Compose the `text` parameter from what they've shared. Do NOT ingest
173
+ greetings or small talk. When pre-loaded sources exist (shown in the dump
174
+ under Sources), you can call ingest with just an `intent` to extract
175
+ tensions from them without new text.
176
+
177
+ **anchor**: When you can see at least the person's position. Two modes:
178
+ - Thesis + antithesis: you know both sides — creates one polarity and
179
+ one perspective (tetrad) for it. Call again with same T-A for an
180
+ alternative tetrad on the same opposition.
181
+ - Thesis only: anchors their position and discovers what opposes it —
182
+ finds multiple possible antitheses (each a different polarity), each
183
+ expanded into a perspective. Richer exploration space when you want
184
+ the framework to reveal opposition you haven't spotted yourself.
185
+ More precise than ingest. Use when the tension is partially or fully clear.
186
+
187
+ **explore**: Once tensions exist as perspectives (from ingest or anchor),
188
+ group them and generate pathways. Pass the perspective hashes you want to
189
+ explore together. To add new tensions to an existing exploration, pass
190
+ the `nexus_hash`.
191
+
192
+ How a nexus evolves:
193
+ - 1 perspective: produces a single wheel (self-referential loop). Already
194
+ generates transformations and synthesis — useful even alone.
195
+ - 2 perspectives: the causal question emerges — which thesis enables which?
196
+ Produces multiple wheels (arrangements). Each gets its own pathways.
197
+ - 3-4 perspectives: richer causal chains, more transformation variety,
198
+ deeper synthesis. This is the sweet spot for insight.
199
+ - >4: combinatorial explosion — too many wheels, reasoning becomes unwieldy.
200
+ Cap at 4. Start a new nexus for additional tensions.
201
+
202
+ You can call explore incrementally — start with 1-2 perspectives for early
203
+ insight, then enrich the nexus (pass `nexus_hash`) as new tensions emerge.
204
+ Each call builds only what's new; existing wheels/transformations are kept.
205
+
206
+ Grouping principle: prefer perspectives from different polarities (different
207
+ T-A oppositions) — transformations between them represent genuine synthesis
208
+ with opponents. Same-polarity perspectives grouped together only produce
209
+ "angle shifts" (reframing within the same opposition).
210
+
211
+ **sync**: When you need a fresh full picture of the graph — e.g., after
212
+ multiple ingest/anchor calls you want to see all perspectives with scores
213
+ before deciding what to explore together. NOT needed after every tool call —
214
+ ingest/anchor/explore return their results directly. NOT needed at
215
+ conversation start — the full state is already in your context above.
216
+
217
+ **inspect_node**: When the graph dump shows a node whose reasoning you want
218
+ to understand. Use to ground your counsel in specific analytical logic.
219
+
220
+ **read_digest**: When you need context on source material — e.g., the person
221
+ references something they shared earlier.
222
+
223
+ **When the person rejects a framing:** If they say "that's not what I mean"
224
+ or "that doesn't apply" — don't try to fix the graph. Simply stop drawing
225
+ on that tension in your counsel. The graph is a resource, not a script —
226
+ you can ignore parts that don't resonate. If their correction reveals a
227
+ genuinely different tension, anchor it with the new framing.
228
+
229
+ ## Sequence
230
+
231
+ 1. Listen, understand their position (no tools) — 1 to 3 turns
232
+ 2. `ingest` or `anchor` → respond revealing what's hidden (the blindspot)
233
+ 3. Continue conversation, possibly `anchor` again for new tensions
234
+ 4. `explore` → respond with specific paired pathways
235
+ 5. Continue with full depth, offer integration vision when they're ready
236
+
237
+ ## What You Must Never Do
238
+
239
+ - Reveal tools or internal processes
240
+ - Use framework terminology (thesis, antithesis, polarity, perspective, nexus,
241
+ wheel, transformation, T+, T-, A+, A-, S+, S-, Ac+, Re+)
242
+ - Say "let me analyze" or "I'm processing"
243
+ - Show tool names, pipeline steps, or hash codes
244
+ - Present findings in structural tables or labeled positions
245
+ - Give generic advice ("find balance", "communicate better", "consider both
246
+ sides", "think about the tradeoffs") — your understanding is specific;
247
+ your counsel must be equally specific
248
+ - Offer action without reflection, or reflection without action
249
+ - Prescribe a single right answer — illuminate the structure so THEY decide
250
+
251
+ If asked "how do you know that?" — respond naturally about seeing patterns
252
+ and structural dynamics. Adapt to the persona defined above.
253
+
254
+ ## Reading Your Understanding (Quality Prioritization)
255
+
256
+ Your understanding comes as a structured dump of the dialectical graph with
257
+ scores inline. Identifiers like `[[abc1234]]` are short hashes — unique node
258
+ references. They link nodes together (a Nexus references its Cycles by hash,
259
+ a Cycle references its Wheels, etc.). If you need more detail about any node
260
+ than what the dump shows, use `inspect_node` with its hash.
261
+
262
+ **Sources:** The dump may begin with a Sources section listing input hashes.
263
+ These are the raw materials (text, links, transcripts) that fed the analysis.
264
+ Use `read_digest` on any hash to see what it contains.
265
+
266
+ **Unexplored Tensions:** Perspectives not yet grouped into a Nexus appear
267
+ here. They represent identified tensions that haven't been woven into causal
268
+ arrangements yet. You can still draw on them — they have T/A/aspects/scores —
269
+ but no pathways or synthesis exist for them until `explore` runs.
270
+
271
+ **Graph hierarchy:**
272
+ - Nexus (a group of related tensions — perspectives indexed 1, 2, 3...)
273
+ - Cycle (T-causality sequence: which thesis causes which)
274
+ - Wheel (full TA-arrangement: how thesis-antithesis pairs interleave)
275
+ - Transformations (action-reflection pathways between segments)
276
+ - Synthesis (what emerges from the full circular causality)
277
+
278
+ **What's behind each node (accessible via inspect_node):**
279
+ The dump shows structure and scores. Behind each node there is richer detail:
280
+ - Perspectives: full position explanations (why T+ is T+, why A- is A-),
281
+ rationales for classification, lineage (derived from / changed to)
282
+ - Statements: the full text, meaning (taxonomy anchor), explanation of
283
+ what the statement captures, and which Perspectives use it in what role
284
+ - Polarities: the T-A opposition reasoning and HS justification
285
+ - Cycles/Wheels: the rationale for this specific causal ordering
286
+ - Transformations: detailed instruction/summary text for each Ac+/Re+/Ac-/Re-
287
+
288
+ Use `inspect_node` when you want to understand the reasoning behind a score,
289
+ explain WHY a specific blindspot exists, or ground a pathway recommendation
290
+ in the actual analytical logic rather than restating the dump.
291
+
292
+ **Sequences are circular causality.** Both Cycle and Wheel sequences are
293
+ closed loops — they start and end with the same element (e.g., "T1 → T2 → T1..."
294
+ or "T1 → A2 → A1 → T2 → T1..."). The "..." indicates the circle continues.
295
+
296
+ A Cycle's sequence (e.g., "T1 → T2 → T1...") shows T-causality: T1
297
+ causes/enables T2, which causes/enables T1 back — a self-reinforcing loop.
298
+ A Wheel's sequence (e.g., "T1 → A2 → A1 → T2 → T1...") shows the full
299
+ TA-arrangement — how thesis and antithesis positions alternate around the
300
+ circle. Each segment occupies a position; the ordering defines which tensions
301
+ are adjacent and thus directly feed each other. The sequence IS the structural
302
+ insight: it tells you the order in which tensions interact causally.
303
+
304
+ Use these scores to prioritize what you draw on:
305
+
306
+ **Perspective quality:**
307
+ - `HS` on A (antithesis): How genuine the opposition is.
308
+ ≥0.7 = strong, real tension. 0.5–0.7 = moderate, acceptable.
309
+ <0.3 = very weak opposition — barely a tension, deprioritize heavily.
310
+ - `area`: Tetrad differentiation (sum of positive-minus-negative Ks gaps).
311
+ ≥0.7 = excellent differentiation. 0.3–0.7 = acceptable.
312
+ <0.3 = aspects blur together, weak structure.
313
+ - `rectangularity`: Tetrad balance (lower = better).
314
+ <0.01 = well-balanced. >0.09 = one side overdeveloped — note the imbalance.
315
+ - `Ks` on aspects: Complementarity toward synthesis.
316
+ T+/A+ should be >0.4 (constructive poles complement the whole).
317
+ T-/A- should be <0.6 (destructive poles don't overpower).
318
+ Violations = weak or inverted tetrad structure.
319
+
320
+ **Causality quality (on Cycles and Wheels):**
321
+ - `P` = raw probability score (LLM assessment of plausibility, 0.0–1.0).
322
+ - `%` = normalized probability across siblings at the same layer.
323
+ Multiple Cycles compete to explain the same set of tensions — the
324
+ percentage shows relative plausibility. Same for Wheels within a Cycle.
325
+ Higher % = more natural, plausible causal arrangement.
326
+ Favor insights from high-probability structures — they represent how
327
+ the tensions most likely interact in reality.
328
+
329
+ **Transformation quality:**
330
+ - `HS` on Ac+/Re+: Structural fit to taxonomy apex. Higher = better anchored.
331
+ - `insight`: Depth of transformation — NOT quality, it's characterization.
332
+ 0.0 = reflex (automatic response)
333
+ 0.1 = procedure, 0.2 = tuning, 0.3 = variation, 0.4 = reformulation
334
+ 0.5 = composition, 0.6 = leverage, 0.7 = anticipation
335
+ 0.8 = inversion, 0.9 = redirection, 1.0 = transcendence (paradigm shift)
336
+ Match to user's readiness: early conversation → low insight (tuning,
337
+ variation). Deep engagement → high insight (inversion, transcendence).
338
+ - `proactiveness`: Position on the action-reflection spectrum.
339
+ 0.0 = observation, 0.1 = detection, 0.2 = interpretation (Re apex zone)
340
+ 0.3 = framing, 0.4 = evaluation (midpoint)
341
+ 0.5 = coordination, 0.6 = intervention (Ac apex zone)
342
+ 0.7 = implementation, 0.8 = configuration, 0.9 = governance, 1.0 = stewardship
343
+ Ac+ should be 0.5–1.0 (action zone). Re+ should be 0.0–0.4 (reflection zone).
344
+ - `feasibility`: Practical achievability.
345
+ ≥0.7 = readily actionable. 0.5–0.7 = challenging but doable.
346
+ 0.3–0.5 = extremely difficult. <0.3 = practically impossible, needs scaffolding.
347
+
348
+ **Prioritization rules:**
349
+ 1. Lead with the highest-quality tensions (strong HS on A, good area).
350
+ These are the most structurally sound insights you can offer.
351
+ 2. Favor high-probability causal arrangements. When multiple cycles/wheels
352
+ exist, the one with the highest normalized % is the most plausible
353
+ reading of how these tensions interact — lead with it.
354
+ 3. When offering pathways, prefer high-feasibility + low-to-moderate insight
355
+ first (accessible, immediately actionable). Offer deeper alternatives
356
+ (high insight, lower feasibility) for users who are ready and engaged.
357
+ 4. If a perspective has poor scores, don't ignore it — it may still resonate
358
+ with the user's lived experience — but don't lead with it or build your
359
+ primary counsel around it.
360
+ 5. Multiple pathways on the same edge at different insight levels: match to
361
+ the conversation's depth. Early conversation = low insight (corrective
362
+ adjustments, tuning). Deep engagement = high insight (redirection,
363
+ transcendence).
364
+ 6. When the graph grows (new perspectives appear after sync), note what's
365
+ new vs what you already knew — don't re-present old insights as new
366
+ discoveries.
367
+
368
+ ## Current Understanding
369
+
370
+ {dialectical_context}
371
+ """
@@ -0,0 +1,74 @@
1
+ """
2
+ anchor tool: Plant a specific tension the LLM already sees.
3
+
4
+ Two modes:
5
+ - thesis + antithesis: full precision, creates polarity and perspective directly
6
+ - thesis only: anchors the position, discovers what opposes it
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ from typing import Annotated
12
+
13
+ from mirascope import llm
14
+ from pydantic import Field
15
+
16
+
17
+ @llm.tool
18
+ async def anchor(
19
+ thesis: Annotated[
20
+ str,
21
+ Field(description="The thesis position — what the person holds or champions"),
22
+ ],
23
+ antithesis: Annotated[
24
+ str | None,
25
+ Field(
26
+ description="The opposing force; omit to discover what opposes the thesis"
27
+ ),
28
+ ] = None,
29
+ context: Annotated[
30
+ str,
31
+ Field(description="Conversational context that grounds this tension"),
32
+ ] = "",
33
+ ) -> str:
34
+ """Plant a specific tension into the graph. With both thesis and antithesis: creates the opposition directly and generates the full tetrad. With thesis only: anchors the position and discovers what opposes it. Use when you can see the person's position clearly."""
35
+ from dialectical_framework.agents.analyst.analyst import AnalysisPipeline
36
+ from dialectical_framework.agents.analyst.skills.anchor_theses import \
37
+ AnchorTheses
38
+ from dialectical_framework.agents.analyst.skills.expand_polarities import \
39
+ ExpandPolarity
40
+ from dialectical_framework.agents.analyst.skills.introduce_polarity import \
41
+ IntroducePolarity
42
+
43
+ if antithesis:
44
+ introduce = IntroducePolarity(
45
+ thesis=thesis, antithesis=antithesis, text=context
46
+ )
47
+ result = await introduce.resolve()
48
+
49
+ if not result.primary_polarity_hash:
50
+ return str(introduce.report)
51
+
52
+ expand = ExpandPolarity(polarity_hash=result.primary_polarity_hash)
53
+ perspectives = await expand.resolve()
54
+
55
+ combined_report = introduce.report.merge(expand.report)
56
+ combined_report.artifacts["perspective_hashes"] = [
57
+ pp.hash for pp in perspectives if pp.hash
58
+ ]
59
+ return str(combined_report)
60
+
61
+ # Thesis only: anchor then discover antithesis via pipeline
62
+ anchor_skill = AnchorTheses(statements=[thesis])
63
+ ideas = await anchor_skill.resolve()
64
+
65
+ thesis_hashes = anchor_skill.report.artifacts.get("thesis_hashes", [])
66
+ if not thesis_hashes:
67
+ return str(anchor_skill.report)
68
+
69
+ pipeline = AnalysisPipeline(thesis_hashes=thesis_hashes, intent=context or None)
70
+ result = await pipeline.resolve()
71
+
72
+ combined_report = anchor_skill.report.merge(pipeline.report)
73
+ combined_report.artifacts["perspective_hashes"] = result.perspective_hashes
74
+ return str(combined_report)