dialectical-framework 1.2.5__tar.gz → 1.4.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 (177) hide show
  1. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/PKG-INFO +14 -1
  2. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/README.md +13 -0
  3. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/pyproject.toml +1 -1
  4. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/analyst/analyst.py +9 -0
  5. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/analyst/skills/anchor_theses.py +3 -9
  6. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/analyst/skills/expand_polarities.py +4 -10
  7. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/analyst/skills/find_polarities.py +4 -10
  8. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/analyst/skills/introduce_polarity.py +4 -10
  9. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/analyst/skills/surface_theses.py +7 -4
  10. dialectical_framework-1.4.0/src/dialectical_framework/agents/analyst/tools/create_dx_input.py +22 -0
  11. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/explorer/explorer.py +9 -0
  12. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/explorer/skills/build_wheels.py +2 -33
  13. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/explorer/skills/explore_transformations.py +3 -10
  14. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/explorer/skills/generate_synthesis.py +3 -10
  15. dialectical_framework-1.4.0/src/dialectical_framework/agents/orchestrator/tools/add_input.py +27 -0
  16. dialectical_framework-1.4.0/src/dialectical_framework/agents/orchestrator/tools/digest_input.py +92 -0
  17. dialectical_framework-1.4.0/src/dialectical_framework/agents/orchestrator/tools/discard.py +23 -0
  18. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/orchestrator/tools/get_schema.py +1 -1
  19. dialectical_framework-1.4.0/src/dialectical_framework/agents/orchestrator/tools/read_digest.py +45 -0
  20. dialectical_framework-1.4.0/src/dialectical_framework/agents/orchestrator/tools/read_input.py +47 -0
  21. {dialectical_framework-1.2.5/src/dialectical_framework/agents/orchestrator/tools → dialectical_framework-1.4.0/src/dialectical_framework/concerns}/add_input.py +1 -16
  22. {dialectical_framework-1.2.5/src/dialectical_framework/agents/analyst/tools → dialectical_framework-1.4.0/src/dialectical_framework/concerns}/create_dx_input.py +3 -15
  23. {dialectical_framework-1.2.5/src/dialectical_framework/agents/orchestrator/tools → dialectical_framework-1.4.0/src/dialectical_framework/concerns}/discard.py +2 -15
  24. dialectical_framework-1.4.0/src/dialectical_framework/concerns/source_digest.py +135 -0
  25. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/nodes/input.py +30 -32
  26. dialectical_framework-1.4.0/src/dialectical_framework/utils/input_context.py +51 -0
  27. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/LICENSE +0 -0
  28. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/__init__.py +0 -0
  29. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/__init__.py +0 -0
  30. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/agent_context.py +0 -0
  31. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/analyst/__init__.py +0 -0
  32. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/analyst/skills/__init__.py +0 -0
  33. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/analyst/skills/edit_perspective.py +0 -0
  34. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/analyst/system_prompts.py +0 -0
  35. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/analyst/tools/__init__.py +0 -0
  36. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/analyst/tools/place_statement.py +0 -0
  37. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/apps.py +0 -0
  38. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/conversation_facilitator.py +0 -0
  39. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/execution_report.py +0 -0
  40. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/explorer/__init__.py +0 -0
  41. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/explorer/skills/__init__.py +0 -0
  42. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/explorer/system_prompts.py +0 -0
  43. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/explorer/tools/__init__.py +0 -0
  44. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/explorer/tools/create_nexus.py +0 -0
  45. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/explorer/tools/expand_nexus.py +0 -0
  46. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/explorer/tools/generate_synthesis.py +0 -0
  47. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/explorer/tools/present_exploration.py +0 -0
  48. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/orchestrator/__init__.py +0 -0
  49. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/orchestrator/tools/__init__.py +0 -0
  50. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/orchestrator/tools/inspect_node.py +0 -0
  51. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/orchestrator/tools/present_analysis.py +0 -0
  52. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/orchestrator/tools/query_graph.py +0 -0
  53. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/reasonable_concern.py +0 -0
  54. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/agents/stream_events.py +0 -0
  55. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/__init__.py +0 -0
  56. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/ac_re_taxonomy.py +0 -0
  57. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/action_extraction.py +0 -0
  58. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/ai_dto/__init__.py +0 -0
  59. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/ai_dto/statement_dto.py +0 -0
  60. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/ai_dto/statements_deck_dto.py +0 -0
  61. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/antithesis_classification.py +0 -0
  62. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/antithesis_extraction.py +0 -0
  63. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/aspect_classification.py +0 -0
  64. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/aspect_generation.py +0 -0
  65. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/causality/__init__.py +0 -0
  66. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/causality/causality_estimator.py +0 -0
  67. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/causality/causality_estimator_balanced.py +0 -0
  68. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/causality/causality_estimator_criteria.py +0 -0
  69. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/causality/causality_estimator_desirable.py +0 -0
  70. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/causality/causality_estimator_feasible.py +0 -0
  71. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/causality/causality_estimator_realistic.py +0 -0
  72. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/causality/causality_normalizer.py +0 -0
  73. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/causality/estimator_resolver.py +0 -0
  74. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/causality_estimation.py +0 -0
  75. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/control_statements_check.py +0 -0
  76. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/create_nexus.py +0 -0
  77. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/diagonal_oppositions_check.py +0 -0
  78. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/display_text_edit.py +0 -0
  79. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/expand_nexus.py +0 -0
  80. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/perspective_combination.py +0 -0
  81. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/perspective_validation.py +0 -0
  82. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/positive_ac_re_apex_derivation.py +0 -0
  83. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/statement_classification.py +0 -0
  84. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/statement_deduplication.py +0 -0
  85. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/statement_placement.py +0 -0
  86. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/synthesis_generation.py +0 -0
  87. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/thesis_extraction.py +0 -0
  88. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/transformation_audit.py +0 -0
  89. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/concerns/transformation_generation.py +0 -0
  90. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/dialectical_reasoning.py +0 -0
  91. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/enums/__init__.py +0 -0
  92. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/enums/causality_preset.py +0 -0
  93. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/enums/di.py +0 -0
  94. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/events/__init__.py +0 -0
  95. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/events/graph_event.py +0 -0
  96. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/events/graph_event_bus.py +0 -0
  97. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/exceptions/__init__.py +0 -0
  98. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/exceptions/node_errors.py +0 -0
  99. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/exceptions/resolver_errors.py +0 -0
  100. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/__init__.py +0 -0
  101. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/composite_input_resolver.py +0 -0
  102. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/dialexity_input_resolver.py +0 -0
  103. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/estimation_manager.py +0 -0
  104. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/mixins/__init__.py +0 -0
  105. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/mixins/incremental_build_mixin.py +0 -0
  106. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/mixins/intent_mixin.py +0 -0
  107. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/mixins/persistable_mixin.py +0 -0
  108. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/nodes/__init__.py +0 -0
  109. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/nodes/assessable_entity.py +0 -0
  110. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/nodes/base_node.py +0 -0
  111. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/nodes/case.py +0 -0
  112. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/nodes/cycle.py +0 -0
  113. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/nodes/estimation.py +0 -0
  114. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/nodes/ideas.py +0 -0
  115. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/nodes/nexus.py +0 -0
  116. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/nodes/perspective.py +0 -0
  117. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/nodes/polarity.py +0 -0
  118. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/nodes/rationale.py +0 -0
  119. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/nodes/statement.py +0 -0
  120. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/nodes/synthesis.py +0 -0
  121. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/nodes/transformation.py +0 -0
  122. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/nodes/transition.py +0 -0
  123. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/nodes/wheel.py +0 -0
  124. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/relationship_manager.py +0 -0
  125. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/relationships/__init__.py +0 -0
  126. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/relationships/action_reflection_relationship.py +0 -0
  127. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/relationships/belongs_to_cycle_relationship.py +0 -0
  128. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/relationships/belongs_to_nexus_relationship.py +0 -0
  129. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/relationships/changed_to_relationship.py +0 -0
  130. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/relationships/contradiction_of_relationship.py +0 -0
  131. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/relationships/critiques_relationship.py +0 -0
  132. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/relationships/distilled_to_relationship.py +0 -0
  133. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/relationships/estimates_relationship.py +0 -0
  134. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/relationships/explains_relationship.py +0 -0
  135. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/relationships/has_input_relationship.py +0 -0
  136. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/relationships/has_statement_relationship.py +0 -0
  137. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/relationships/has_wheel_relationship.py +0 -0
  138. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/relationships/immutable_structure.py +0 -0
  139. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/relationships/is_source_of_relationship.py +0 -0
  140. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/relationships/is_target_of_relationship.py +0 -0
  141. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/relationships/negative_side_of_relationship.py +0 -0
  142. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/relationships/opposite_direction_relationship.py +0 -0
  143. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/relationships/opposite_of_relationship.py +0 -0
  144. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/relationships/polarity_relationship.py +0 -0
  145. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/relationships/positive_side_of_relationship.py +0 -0
  146. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/relationships/provides_relationship.py +0 -0
  147. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/relationships/synthesis_of_relationship.py +0 -0
  148. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/repositories/__init__.py +0 -0
  149. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/repositories/case_repository.py +0 -0
  150. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/repositories/cycle_repository.py +0 -0
  151. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/repositories/input_repository.py +0 -0
  152. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/repositories/nexus_repository.py +0 -0
  153. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/repositories/node_repository.py +0 -0
  154. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/repositories/perspective_repository.py +0 -0
  155. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/repositories/polarity_repository.py +0 -0
  156. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/repositories/schema_repository.py +0 -0
  157. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/repositories/statement_repository.py +0 -0
  158. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/repositories/transformation_repository.py +0 -0
  159. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/repositories/wheel_repository.py +0 -0
  160. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/scope_context.py +0 -0
  161. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/verbatim_input_resolver.py +0 -0
  162. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/wheel_segment.py +0 -0
  163. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/graph/wheel_segment_polar_pair.py +0 -0
  164. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/protocols/__init__.py +0 -0
  165. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/protocols/has_config.py +0 -0
  166. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/protocols/input_resolver.py +0 -0
  167. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/settings.py +0 -0
  168. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/utils/__init__.py +0 -0
  169. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/utils/bedrock_provider.py +0 -0
  170. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/utils/concurrency.py +0 -0
  171. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/utils/dc_replace.py +0 -0
  172. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/utils/decompose_probability_uniformly.py +0 -0
  173. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/utils/edge_context.py +0 -0
  174. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/utils/effect_logger.py +0 -0
  175. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/utils/order_transitions.py +0 -0
  176. {dialectical_framework-1.2.5 → dialectical_framework-1.4.0}/src/dialectical_framework/utils/sequence_generation.py +0 -0
  177. {dialectical_framework-1.2.5 → dialectical_framework-1.4.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.2.5
3
+ Version: 1.4.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
@@ -87,6 +87,19 @@ Think of a Wheel as a pizza: segments are slices (T, T+, T-), Perspectives are h
87
87
  |--------|----------|
88
88
  | ![Wheel](https://raw.githubusercontent.com/dialexity/dialectical-framework/main/docs/wheel-scheme.png) | ![Wheel](https://raw.githubusercontent.com/dialexity/dialectical-framework/main/docs/wheel-scheme2.png) |
89
89
 
90
+ ## Why a Reasoning Graph
91
+
92
+ Most AI systems treat knowledge as flat context — dump text into the prompt and hope the LLM figures out the structure. The dialectical framework builds a **persistent reasoning graph** where the structure itself encodes how to think about a domain:
93
+
94
+ - **Oppositions are explicit.** The LLM doesn't need to discover tensions — they're mapped as T/A pairs with typed aspects showing where each side overreaches (T-, A-) and where it constructively balances the other (T+, A+).
95
+ - **Transformations encode causality.** Edges don't just connect — they show how one position's failure becomes another's strength. This is the circular causality that drives synthesis.
96
+ - **Quality is measurable.** Complementarity, modality balance, area metrics tell the LLM which reasoning paths are well-developed and which are thin — no guessing about confidence.
97
+ - **Knowledge compounds.** Each new perspective enters an existing graph of validated reasoning. The LLM builds on prior synthesis rather than re-deriving from scratch.
98
+
99
+ The result: an LLM with this graph in context doesn't just have facts about a topic — it has the intellectual terrain mapped. What opposes what, where balance was achieved, what assumptions remain untested, and where synthesis is possible.
100
+
101
+ This is the [LLM Wiki](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f) pattern realized as a semantic graph rather than a pile of markdown files — knowledge that is structured, rule-validated, and queryable by reasoning topology.
102
+
90
103
  ## Integration
91
104
 
92
105
  The framework is designed as a drop-in reasoning engine for AI applications that need dialectical analysis — decision support, systems thinking, mediation, ethical modeling.
@@ -46,6 +46,19 @@ Think of a Wheel as a pizza: segments are slices (T, T+, T-), Perspectives are h
46
46
  |--------|----------|
47
47
  | ![Wheel](https://raw.githubusercontent.com/dialexity/dialectical-framework/main/docs/wheel-scheme.png) | ![Wheel](https://raw.githubusercontent.com/dialexity/dialectical-framework/main/docs/wheel-scheme2.png) |
48
48
 
49
+ ## Why a Reasoning Graph
50
+
51
+ Most AI systems treat knowledge as flat context — dump text into the prompt and hope the LLM figures out the structure. The dialectical framework builds a **persistent reasoning graph** where the structure itself encodes how to think about a domain:
52
+
53
+ - **Oppositions are explicit.** The LLM doesn't need to discover tensions — they're mapped as T/A pairs with typed aspects showing where each side overreaches (T-, A-) and where it constructively balances the other (T+, A+).
54
+ - **Transformations encode causality.** Edges don't just connect — they show how one position's failure becomes another's strength. This is the circular causality that drives synthesis.
55
+ - **Quality is measurable.** Complementarity, modality balance, area metrics tell the LLM which reasoning paths are well-developed and which are thin — no guessing about confidence.
56
+ - **Knowledge compounds.** Each new perspective enters an existing graph of validated reasoning. The LLM builds on prior synthesis rather than re-deriving from scratch.
57
+
58
+ The result: an LLM with this graph in context doesn't just have facts about a topic — it has the intellectual terrain mapped. What opposes what, where balance was achieved, what assumptions remain untested, and where synthesis is possible.
59
+
60
+ This is the [LLM Wiki](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f) pattern realized as a semantic graph rather than a pile of markdown files — knowledge that is structured, rule-validated, and queryable by reasoning topology.
61
+
49
62
  ## Integration
50
63
 
51
64
  The framework is designed as a drop-in reasoning engine for AI applications that need dialectical analysis — decision support, systems thinking, mediation, ethical modeling.
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "dialectical-framework"
3
- version = "1.2.5"
3
+ version = "1.4.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"
@@ -117,6 +117,8 @@ def _build_tools() -> list:
117
117
  expand_nexus
118
118
  from dialectical_framework.agents.orchestrator.tools.add_input import \
119
119
  add_input
120
+ from dialectical_framework.agents.orchestrator.tools.digest_input import \
121
+ digest_input
120
122
  from dialectical_framework.agents.orchestrator.tools.get_schema import \
121
123
  get_schema
122
124
  from dialectical_framework.agents.orchestrator.tools.inspect_node import \
@@ -125,11 +127,18 @@ def _build_tools() -> list:
125
127
  present_analysis
126
128
  from dialectical_framework.agents.orchestrator.tools.query_graph import \
127
129
  query_graph
130
+ from dialectical_framework.agents.orchestrator.tools.read_digest import \
131
+ read_digest
132
+ from dialectical_framework.agents.orchestrator.tools.read_input import \
133
+ read_input
128
134
  from dialectical_framework.agents.orchestrator.tools.discard import discard
129
135
 
130
136
  return [
131
137
  analyze,
132
138
  add_input,
139
+ digest_input,
140
+ read_digest,
141
+ read_input,
133
142
  anchor_theses,
134
143
  surface_theses,
135
144
  find_polarities,
@@ -163,16 +163,10 @@ class AnchorTheses(ReasonableConcern[Optional[Ideas]]):
163
163
  self,
164
164
  input_resolver: InputResolver = Provide[DI.input_resolver],
165
165
  ) -> str:
166
- inputs = self._get_inputs()
167
- if not inputs:
168
- return ""
169
-
170
- texts = []
171
- for input_node in inputs:
172
- resolved = await input_resolver.resolve(input_node)
173
- texts.append(resolved)
166
+ from dialectical_framework.utils.input_context import input_context
174
167
 
175
- return "\n\n---\n\n".join(texts)
168
+ inputs = self._get_inputs()
169
+ return await input_context(inputs, input_resolver)
176
170
 
177
171
 
178
172
  @llm.tool
@@ -284,19 +284,13 @@ class ExpandPolarity(ReasonableConcern[list[Perspective]]):
284
284
  self,
285
285
  input_resolver: InputResolver = Provide[DI.input_resolver],
286
286
  ) -> str:
287
- """Get concatenated text from all inputs in scope."""
287
+ """Get input context from digests (falls back to full content if no digest)."""
288
+ from dialectical_framework.utils.input_context import input_context
289
+
288
290
  repo = InputRepository()
289
291
  inputs = repo.get_all()
290
292
 
291
- if not inputs:
292
- return ""
293
-
294
- texts = []
295
- for input_node in inputs:
296
- resolved = await input_resolver.resolve(input_node)
297
- texts.append(resolved)
298
-
299
- return "\n\n---\n\n".join(texts)
293
+ return await input_context(inputs, input_resolver)
300
294
 
301
295
 
302
296
  @llm.tool
@@ -383,19 +383,13 @@ class FindPolarities(ReasonableConcern[Optional[Ideas]]):
383
383
  self,
384
384
  input_resolver: InputResolver = Provide[DI.input_resolver],
385
385
  ) -> str:
386
- """Get concatenated text from all inputs in scope."""
386
+ """Get input context from digests (falls back to full content if no digest)."""
387
+ from dialectical_framework.utils.input_context import input_context
388
+
387
389
  repo = InputRepository()
388
390
  inputs = repo.get_all()
389
391
 
390
- if not inputs:
391
- return ""
392
-
393
- texts = []
394
- for input_node in inputs:
395
- resolved = await input_resolver.resolve(input_node)
396
- texts.append(resolved)
397
-
398
- return "\n\n---\n\n".join(texts)
392
+ return await input_context(inputs, input_resolver)
399
393
 
400
394
  def _reconnect_oppositions(
401
395
  self,
@@ -194,19 +194,13 @@ class IntroducePolarity(ReasonableConcern[IntroducePolarityResult]):
194
194
  self,
195
195
  input_resolver: InputResolver = Provide[DI.input_resolver],
196
196
  ) -> str:
197
- """Get concatenated text from all inputs in scope."""
197
+ """Get input context from digests (falls back to full content if no digest)."""
198
+ from dialectical_framework.utils.input_context import input_context
199
+
198
200
  repo = InputRepository()
199
201
  inputs = repo.get_all()
200
202
 
201
- if not inputs:
202
- return ""
203
-
204
- texts = []
205
- for input_node in inputs:
206
- resolved = await input_resolver.resolve(input_node)
207
- texts.append(resolved)
208
-
209
- return "\n\n---\n\n".join(texts)
203
+ return await input_context(inputs, input_resolver)
210
204
 
211
205
 
212
206
  @llm.tool
@@ -347,7 +347,7 @@ Determine:
347
347
  self,
348
348
  input_resolver: InputResolver = Provide[DI.input_resolver],
349
349
  ) -> str:
350
- """Get preview (first 500 chars) of each input."""
350
+ """Get preview of each input (uses digest if available, else first 500 chars)."""
351
351
  inputs = self._get_inputs()
352
352
 
353
353
  if not inputs:
@@ -355,9 +355,12 @@ Determine:
355
355
 
356
356
  previews = []
357
357
  for i, input_node in enumerate(inputs, 1):
358
- resolved = await input_resolver.resolve(input_node)
359
- preview = resolved[:500] + "..." if len(resolved) > 500 else resolved
360
- previews.append(f"[Input {i}]\n{preview}")
358
+ if input_node.digest:
359
+ previews.append(f"[Input {i}]\n{input_node.digest}")
360
+ else:
361
+ resolved = await input_resolver.resolve(input_node)
362
+ preview = resolved[:500] + "..." if len(resolved) > 500 else resolved
363
+ previews.append(f"[Input {i}]\n{preview}")
361
364
 
362
365
  return "\n\n".join(previews)
363
366
 
@@ -0,0 +1,22 @@
1
+ """
2
+ create_dx_input: Tool for creating an Input node referencing a Transition via dx:// URI.
3
+ """
4
+
5
+ from __future__ import annotations
6
+
7
+ from typing import Annotated
8
+
9
+ from mirascope import llm
10
+ from pydantic import Field
11
+
12
+ from dialectical_framework.concerns.create_dx_input import CreateDxInput
13
+
14
+
15
+ @llm.tool
16
+ async def create_dx_input(
17
+ transition_hash: Annotated[str, Field(description="Hash (or 7+ char prefix) of the Transition node to reference")],
18
+ ) -> str:
19
+ """Create an Input that references a Transition node via dx:// URI. This feeds the transition's insight back into the analyst pipeline as a new input source that can be processed selectively."""
20
+ concern = CreateDxInput()
21
+ await concern.resolve(transition_hash=transition_hash)
22
+ return str(concern.report)
@@ -126,12 +126,18 @@ def _build_tools() -> list:
126
126
  generate_synthesis
127
127
  from dialectical_framework.agents.explorer.tools.present_exploration import \
128
128
  present_exploration
129
+ from dialectical_framework.agents.orchestrator.tools.digest_input import \
130
+ digest_input
129
131
  from dialectical_framework.agents.orchestrator.tools.get_schema import \
130
132
  get_schema
131
133
  from dialectical_framework.agents.orchestrator.tools.inspect_node import \
132
134
  inspect_node
133
135
  from dialectical_framework.agents.orchestrator.tools.query_graph import \
134
136
  query_graph
137
+ from dialectical_framework.agents.orchestrator.tools.read_digest import \
138
+ read_digest
139
+ from dialectical_framework.agents.orchestrator.tools.read_input import \
140
+ read_input
135
141
 
136
142
  return [
137
143
  build_wheels,
@@ -139,6 +145,9 @@ def _build_tools() -> list:
139
145
  generate_synthesis,
140
146
  expand_nexus,
141
147
  present_exploration,
148
+ digest_input,
149
+ read_digest,
150
+ read_input,
142
151
  inspect_node,
143
152
  query_graph,
144
153
  get_schema,
@@ -113,7 +113,7 @@ class BuildWheels(ReasonableConcern[BuildWheelsResult]):
113
113
 
114
114
  Creates structural combinations (Cycles + Wheels) from Perspectives
115
115
  within a Nexus, then estimates them using the appropriate estimator
116
- based on the Nexus intent.
116
+ based on the Nexus intent. Purely structural — no transformations.
117
117
 
118
118
  Flow:
119
119
  1. Resolve Nexus by hash
@@ -213,16 +213,7 @@ class BuildWheels(ReasonableConcern[BuildWheelsResult]):
213
213
  if causal_cycles or causal_wheels:
214
214
  await self._run_estimation(causal_cycles, causal_wheels)
215
215
 
216
- # 6. Generate Transformations for 1-PP wheels (circular causality base case)
217
- # These are foundational — higher-layer transformations use them as context.
218
- layer1_wheels = [
219
- w for w in new_wheels
220
- if self._safe_polarity_count(w) == 1
221
- ]
222
- if layer1_wheels:
223
- await self._run_layer1_transformations(layer1_wheels)
224
-
225
- # 7. Build summary
216
+ # 6. Build summary
226
217
  if not new_cycles and not new_wheels:
227
218
  self._report.summary = (
228
219
  f"All structures already exist for Nexus {nexus.short_hash} "
@@ -265,28 +256,6 @@ class BuildWheels(ReasonableConcern[BuildWheelsResult]):
265
256
  await estimation.resolve(wheels)
266
257
  self._report = self._report.merge(estimation.report)
267
258
 
268
- async def _run_layer1_transformations(self, wheels: list[Wheel]) -> None:
269
- """
270
- Generate Transformations for 1-PP wheels.
271
-
272
- 1-PP wheels are the circular causality base case: Ac+ (T- → A+) and
273
- Re+ (A- → T+) within a single Perspective. These serve as foundational
274
- context for higher-layer transformation generation.
275
- """
276
- from dialectical_framework.agents.explorer.skills.explore_transformations import (
277
- ExploreTransformations,
278
- )
279
-
280
- for wheel in wheels:
281
- try:
282
- concern = ExploreTransformations(wheel_hash=wheel.hash)
283
- await concern.resolve()
284
- self._report = self._report.merge(concern.report)
285
- except (ValueError, Exception) as e:
286
- self._report.artifacts.setdefault("transformation_errors", []).append(
287
- f"Wheel {wheel.short_hash}: {e}"
288
- )
289
-
290
259
  @staticmethod
291
260
  def _safe_polarity_count(wheel: Wheel) -> int:
292
261
  try:
@@ -440,22 +440,15 @@ class ExploreTransformations(ReasonableConcern[ExploreTransformationsResult]):
440
440
  self,
441
441
  input_resolver: InputResolver = Provide[DI.input_resolver],
442
442
  ) -> str:
443
- """Get concatenated text from all inputs in scope."""
443
+ """Get input context from digests (falls back to full content if no digest)."""
444
444
  from dialectical_framework.graph.repositories.input_repository import \
445
445
  InputRepository
446
+ from dialectical_framework.utils.input_context import input_context
446
447
 
447
448
  repo = InputRepository()
448
449
  inputs = repo.get_all()
449
450
 
450
- if not inputs:
451
- return ""
452
-
453
- texts = []
454
- for input_node in inputs:
455
- resolved = await input_resolver.resolve(input_node)
456
- texts.append(resolved)
457
-
458
- return "\n\n---\n\n".join(texts)
451
+ return await input_context(inputs, input_resolver)
459
452
 
460
453
  def _create_transformation(
461
454
  self,
@@ -165,23 +165,16 @@ class GenerateSynthesis(ReasonableConcern[GenerateSynthesisResult]):
165
165
  self,
166
166
  input_resolver: InputResolver = Provide[DI.input_resolver],
167
167
  ) -> str:
168
- """Get concatenated text from all inputs in scope."""
168
+ """Get input context from digests (falls back to full content if no digest)."""
169
169
  from dialectical_framework.graph.repositories.input_repository import (
170
170
  InputRepository,
171
171
  )
172
+ from dialectical_framework.utils.input_context import input_context
172
173
 
173
174
  repo = InputRepository()
174
175
  inputs = repo.get_all()
175
176
 
176
- if not inputs:
177
- return ""
178
-
179
- texts = []
180
- for input_node in inputs:
181
- resolved = await input_resolver.resolve(input_node)
182
- texts.append(resolved)
183
-
184
- return "\n\n---\n\n".join(texts)
177
+ return await input_context(inputs, input_resolver)
185
178
 
186
179
  def _build_lower_layer_context(self, wheel: Wheel) -> str:
187
180
  """Find synthesis from sub-wheels (lower PP layers) sharing perspectives."""
@@ -0,0 +1,27 @@
1
+ """
2
+ add_input: Tool for capturing source material into the case.
3
+ """
4
+
5
+ from __future__ import annotations
6
+
7
+ from typing import Annotated
8
+
9
+ from mirascope import llm
10
+ from pydantic import Field
11
+
12
+ from dialectical_framework.concerns.add_input import AddInput
13
+
14
+
15
+ @llm.tool
16
+ async def add_input(
17
+ content: Annotated[
18
+ str,
19
+ Field(
20
+ description="Source material: user-provided text, URL, or captured conversation fragment"
21
+ ),
22
+ ],
23
+ ) -> str:
24
+ """Add source material for analysis — user-provided text, URL, or captured conversation fragment. Use proactively when the user describes their situation. Not for storing your analytical outputs."""
25
+ concern = AddInput()
26
+ input_node = await concern.resolve(content=content)
27
+ return str(concern.report)
@@ -0,0 +1,92 @@
1
+ """
2
+ DigestInput: Concern + tool for generating/refining the living digest of an Input source.
3
+ """
4
+
5
+ from __future__ import annotations
6
+
7
+ from typing import Annotated, Union
8
+
9
+ from dependency_injector.wiring import Provide, inject
10
+ from gqlalchemy import Memgraph, Neo4j
11
+ from mirascope import llm
12
+ from pydantic import Field
13
+
14
+ from dialectical_framework.agents.reasonable_concern import ReasonableConcern
15
+ from dialectical_framework.concerns.source_digest import SourceDigest
16
+ from dialectical_framework.enums.di import DI
17
+ from dialectical_framework.graph.nodes.input import Input
18
+ from dialectical_framework.graph.repositories.node_repository import \
19
+ NodeRepository
20
+ from dialectical_framework.protocols.input_resolver import InputResolver
21
+
22
+
23
+ # Content shorter than this is used as its own digest (no LLM call needed)
24
+ DIGEST_THRESHOLD = 1500
25
+
26
+
27
+ class DigestInput(ReasonableConcern[Input]):
28
+ """
29
+ Generates or refines the digest for an Input node.
30
+
31
+ Resolves the full content, runs SourceDigest with any provided context,
32
+ and persists the result to the Input's digest field.
33
+
34
+ Short content (under ~1500 chars) is used directly as the digest
35
+ without an LLM call — it's already compact enough.
36
+ """
37
+
38
+ @inject
39
+ async def resolve(
40
+ self,
41
+ input_hash: str,
42
+ context: str = "",
43
+ input_resolver: InputResolver = Provide[DI.input_resolver],
44
+ graph_db: Union[Memgraph, Neo4j] = Provide[DI.graph_db],
45
+ ) -> Input:
46
+ repo = NodeRepository()
47
+ input_node = repo.find_by_hash(input_hash, node_type=Input)
48
+
49
+ if not input_node:
50
+ raise ValueError(f"Input not found: {input_hash}")
51
+
52
+ resolved_content = await input_resolver.resolve(input_node)
53
+ if not resolved_content:
54
+ raise ValueError(f"Input {input_hash} has no resolvable content")
55
+
56
+ if len(resolved_content) <= DIGEST_THRESHOLD and not input_node.digest:
57
+ new_digest = resolved_content
58
+ self._report.summary = f"Content compact enough to use as digest for input {input_node.short_hash}"
59
+ else:
60
+ concern = SourceDigest()
61
+ new_digest = await concern.resolve(
62
+ content=resolved_content,
63
+ existing_digest=input_node.digest,
64
+ context=context,
65
+ )
66
+ self._report = self._report.merge(concern.report)
67
+ self._report.summary = f"Digest {'refined' if input_node.digest else 'created'} for input {input_node.short_hash}"
68
+
69
+ input_node.digest = new_digest
70
+ input_node.save()
71
+
72
+ self._report.ok = True
73
+ self._report.artifacts["input_hash"] = input_node.short_hash
74
+ self._report.artifacts["digest"] = new_digest
75
+
76
+ return input_node
77
+
78
+
79
+ @llm.tool
80
+ async def digest_input(
81
+ input_hash: Annotated[str, Field(description="Hash of the Input node to digest")],
82
+ context: Annotated[
83
+ str,
84
+ Field(
85
+ description="Direction for the digest: user guidance, framework state, or focus instructions"
86
+ ),
87
+ ] = "",
88
+ ) -> str:
89
+ """Generate or refine the analytical digest of an input source. Use to build initial understanding of new inputs, or to sharpen the digest with user direction or framework learnings."""
90
+ concern = DigestInput()
91
+ await concern.resolve(input_hash=input_hash, context=context)
92
+ return str(concern.report)
@@ -0,0 +1,23 @@
1
+ """
2
+ discard: Tool for marking statements/perspectives as discarded.
3
+ """
4
+
5
+ from __future__ import annotations
6
+
7
+ from typing import Annotated
8
+
9
+ from mirascope import llm
10
+ from pydantic import Field
11
+
12
+ from dialectical_framework.concerns.discard import Discard
13
+
14
+
15
+ @llm.tool
16
+ async def discard(
17
+ hash: Annotated[str, Field(description="Hash (or prefix) of the Statement or Perspective to discard")],
18
+ reason: Annotated[str, Field(description="Why it's being discarded")] = "discarded",
19
+ ) -> str:
20
+ """Mark a Statement or Perspective as discarded when the user disagrees with it or finds it irrelevant. Uncommitted Perspectives are discarded entirely; committed ones are soft-discarded and filtered from future queries. Will refuse if the target participates in existing Cycles/Wheels — in that case, use edit_perspective to replace it."""
21
+ concern = Discard()
22
+ await concern.resolve(hash=hash, reason=reason)
23
+ return str(concern.report)
@@ -20,7 +20,7 @@ GRAPH_SCHEMA = """## Graph Schema
20
20
  | Node | Description | Key Properties |
21
21
  |------|-------------|----------------|
22
22
  | Case | Root session container | |
23
- | Input | External content (text, URL) for analysis | `content` |
23
+ | Input | External content (text, URL) for analysis | `content`, `digest` |
24
24
  | Ideas | Collection of extracted Statements from Inputs | `intent` |
25
25
  | Statement | A thesis, position, or claim | `text`, `meaning`, `discarded` |
26
26
  | Polarity | A tension — structural T-A pair (thesis vs antithesis) | |
@@ -0,0 +1,45 @@
1
+ """
2
+ read_digest: Tool for inspecting the current analytical digest of an Input source.
3
+
4
+ Used by conversational agents to see the current understanding before deciding
5
+ whether to refine it or pull full content.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ from typing import Annotated, Union
11
+
12
+ from dependency_injector.wiring import Provide, inject
13
+ from gqlalchemy import Memgraph, Neo4j
14
+ from mirascope import llm
15
+ from pydantic import Field
16
+
17
+ from dialectical_framework.enums.di import DI
18
+ from dialectical_framework.graph.nodes.input import Input
19
+ from dialectical_framework.graph.repositories.node_repository import \
20
+ NodeRepository
21
+
22
+
23
+ @inject
24
+ def _read_digest(
25
+ input_hash: str,
26
+ graph_db: Union[Memgraph, Neo4j] = Provide[DI.graph_db],
27
+ ) -> str:
28
+ repo = NodeRepository()
29
+ input_node = repo.find_by_hash(input_hash, node_type=Input)
30
+
31
+ if not input_node:
32
+ return f"Input not found: {input_hash}"
33
+
34
+ if not input_node.digest:
35
+ return f"No digest yet for input {input_node.short_hash}. Use digest_input to generate one."
36
+
37
+ return input_node.digest
38
+
39
+
40
+ @llm.tool
41
+ async def read_digest(
42
+ input_hash: Annotated[str, Field(description="Hash of the Input node")],
43
+ ) -> str:
44
+ """Read the current analytical digest of an input source. Use to see what the framework currently understands about a source before deciding to refine or pull full content."""
45
+ return _read_digest(input_hash)
@@ -0,0 +1,47 @@
1
+ """
2
+ read_input: Tool for pulling full resolved content from an Input source.
3
+
4
+ Used when the LLM decides the digest isn't enough and needs the full source text.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ from typing import Annotated, Union
10
+
11
+ from dependency_injector.wiring import Provide, inject
12
+ from gqlalchemy import Memgraph, Neo4j
13
+ from mirascope import llm
14
+ from pydantic import Field
15
+
16
+ from dialectical_framework.enums.di import DI
17
+ from dialectical_framework.graph.nodes.input import Input
18
+ from dialectical_framework.graph.repositories.node_repository import \
19
+ NodeRepository
20
+ from dialectical_framework.protocols.input_resolver import InputResolver
21
+
22
+
23
+ @inject
24
+ async def _resolve_input(
25
+ input_hash: str,
26
+ input_resolver: InputResolver = Provide[DI.input_resolver],
27
+ graph_db: Union[Memgraph, Neo4j] = Provide[DI.graph_db],
28
+ ) -> str:
29
+ repo = NodeRepository()
30
+ input_node = repo.find_by_hash(input_hash, node_type=Input)
31
+
32
+ if not input_node:
33
+ return f"Input not found: {input_hash}"
34
+
35
+ resolved = await input_resolver.resolve(input_node)
36
+ if not resolved:
37
+ return f"Input {input_hash} has no content"
38
+
39
+ return resolved
40
+
41
+
42
+ @llm.tool
43
+ async def read_input(
44
+ input_hash: Annotated[str, Field(description="Hash of the Input node to read")],
45
+ ) -> str:
46
+ """Read the full source content of an input. Use when the digest doesn't have enough detail for your current task."""
47
+ return await _resolve_input(input_hash)
@@ -1,14 +1,9 @@
1
1
  """
2
- AddInput: Concern + tool for capturing source material into the case.
2
+ AddInput: Concern for capturing source material into the case.
3
3
  """
4
4
 
5
5
  from __future__ import annotations
6
6
 
7
- from typing import Annotated
8
-
9
- from mirascope import llm
10
- from pydantic import Field
11
-
12
7
  from dialectical_framework.agents.reasonable_concern import ReasonableConcern
13
8
  from dialectical_framework.graph.nodes.input import Input
14
9
  from dialectical_framework.graph.repositories.case_repository import CaseRepository
@@ -42,13 +37,3 @@ class AddInput(ReasonableConcern[Input]):
42
37
  self._report.artifacts["input_hash"] = input_node.short_hash
43
38
 
44
39
  return input_node
45
-
46
-
47
- @llm.tool
48
- async def add_input(
49
- content: Annotated[str, Field(description="Source material: user-provided text, URL, or captured conversation fragment")],
50
- ) -> str:
51
- """Add source material for analysis — user-provided text, URL, or captured conversation fragment. Use proactively when the user describes their situation. Not for storing your analytical outputs."""
52
- concern = AddInput()
53
- input_node = await concern.resolve(content=content)
54
- return str(concern.report)