htmlgraph 0.27.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 (554) hide show
  1. htmlgraph-0.27.0/.gitignore +83 -0
  2. htmlgraph-0.27.0/PKG-INFO +307 -0
  3. htmlgraph-0.27.0/README.md +260 -0
  4. htmlgraph-0.27.0/examples/agent-coordination/README.md +239 -0
  5. htmlgraph-0.27.0/examples/agent-coordination/demo.py +297 -0
  6. htmlgraph-0.27.0/examples/create_auth_track_demo.py +343 -0
  7. htmlgraph-0.27.0/examples/create_htmlgraph_dev_track.py +504 -0
  8. htmlgraph-0.27.0/examples/demo_agent_planning.py +172 -0
  9. htmlgraph-0.27.0/examples/demo_real_project_analytics.py +130 -0
  10. htmlgraph-0.27.0/examples/demo_sdk_operations.py +163 -0
  11. htmlgraph-0.27.0/examples/documentation-site/README.md +87 -0
  12. htmlgraph-0.27.0/examples/documentation-site/agents.json +72 -0
  13. htmlgraph-0.27.0/examples/documentation-site/demo.py +589 -0
  14. htmlgraph-0.27.0/examples/documentation-site/features/doc-api-graph.html +84 -0
  15. htmlgraph-0.27.0/examples/documentation-site/features/doc-api-overview.html +77 -0
  16. htmlgraph-0.27.0/examples/documentation-site/features/doc-api-sdk.html +89 -0
  17. htmlgraph-0.27.0/examples/documentation-site/features/doc-example-advanced.html +90 -0
  18. htmlgraph-0.27.0/examples/documentation-site/features/doc-example-basic.html +98 -0
  19. htmlgraph-0.27.0/examples/documentation-site/features/doc-index.html +64 -0
  20. htmlgraph-0.27.0/examples/documentation-site/features/doc-installation.html +72 -0
  21. htmlgraph-0.27.0/examples/documentation-site/features/doc-quickstart.html +93 -0
  22. htmlgraph-0.27.0/examples/example_query_compilation.py +100 -0
  23. htmlgraph-0.27.0/examples/handoff-demo.py +266 -0
  24. htmlgraph-0.27.0/examples/knowledge-base/README.md +162 -0
  25. htmlgraph-0.27.0/examples/knowledge-base/agents.json +72 -0
  26. htmlgraph-0.27.0/examples/knowledge-base/demo.py +244 -0
  27. htmlgraph-0.27.0/examples/knowledge-base/features/feat-276c615f.html +28 -0
  28. htmlgraph-0.27.0/examples/knowledge-base/features/feat-7a6f797d.html +28 -0
  29. htmlgraph-0.27.0/examples/knowledge-base/features/note-ai-agents.html +60 -0
  30. htmlgraph-0.27.0/examples/knowledge-base/features/note-graph-db.html +54 -0
  31. htmlgraph-0.27.0/examples/knowledge-base/features/note-htmlgraph.html +64 -0
  32. htmlgraph-0.27.0/examples/knowledge-base/features/note-web-standards.html +58 -0
  33. htmlgraph-0.27.0/examples/parallel_task_coordination.py +65 -0
  34. htmlgraph-0.27.0/examples/pattern_learning_demo.py +77 -0
  35. htmlgraph-0.27.0/examples/retry_decorator_examples.py +500 -0
  36. htmlgraph-0.27.0/examples/routing-demo.py +209 -0
  37. htmlgraph-0.27.0/examples/sdk_demo.py +214 -0
  38. htmlgraph-0.27.0/examples/todo-list/README.md +168 -0
  39. htmlgraph-0.27.0/examples/todo-list/demo.py +124 -0
  40. htmlgraph-0.27.0/examples/todo-list/index.html +359 -0
  41. htmlgraph-0.27.0/examples/todo-list/styles.css +43 -0
  42. htmlgraph-0.27.0/examples/todo-list/task-001.html +41 -0
  43. htmlgraph-0.27.0/examples/todo-list/task-002.html +75 -0
  44. htmlgraph-0.27.0/examples/todo-list/task-003.html +53 -0
  45. htmlgraph-0.27.0/examples/todo-list/task-004.html +62 -0
  46. htmlgraph-0.27.0/examples/todo-list/task-005.html +48 -0
  47. htmlgraph-0.27.0/examples/todo-list/task-006.html +48 -0
  48. htmlgraph-0.27.0/packages/gemini-extension/GEMINI.md +798 -0
  49. htmlgraph-0.27.0/packages/gemini-extension/README.md +285 -0
  50. htmlgraph-0.27.0/packages/gemini-extension/command_deploy.md +20 -0
  51. htmlgraph-0.27.0/packages/gemini-extension/command_end.md +18 -0
  52. htmlgraph-0.27.0/packages/gemini-extension/command_feature-add.md +19 -0
  53. htmlgraph-0.27.0/packages/gemini-extension/command_feature-complete.md +19 -0
  54. htmlgraph-0.27.0/packages/gemini-extension/command_feature-primary.md +18 -0
  55. htmlgraph-0.27.0/packages/gemini-extension/command_feature-start.md +19 -0
  56. htmlgraph-0.27.0/packages/gemini-extension/command_git-commit.md +20 -0
  57. htmlgraph-0.27.0/packages/gemini-extension/command_help.md +18 -0
  58. htmlgraph-0.27.0/packages/gemini-extension/command_init.md +18 -0
  59. htmlgraph-0.27.0/packages/gemini-extension/command_plan.md +20 -0
  60. htmlgraph-0.27.0/packages/gemini-extension/command_recommend.md +20 -0
  61. htmlgraph-0.27.0/packages/gemini-extension/command_serve.md +19 -0
  62. htmlgraph-0.27.0/packages/gemini-extension/command_spike.md +20 -0
  63. htmlgraph-0.27.0/packages/gemini-extension/command_start.md +18 -0
  64. htmlgraph-0.27.0/packages/gemini-extension/command_status.md +18 -0
  65. htmlgraph-0.27.0/packages/gemini-extension/command_track.md +20 -0
  66. htmlgraph-0.27.0/packages/gemini-extension/gemini-extension.json +14 -0
  67. htmlgraph-0.27.0/packages/gemini-extension/hooks/hooks.json +32 -0
  68. htmlgraph-0.27.0/packages/gemini-extension/hooks/scripts/post-tool.sh +42 -0
  69. htmlgraph-0.27.0/packages/gemini-extension/hooks/scripts/session-end.sh +91 -0
  70. htmlgraph-0.27.0/packages/gemini-extension/hooks/scripts/session-start.sh +215 -0
  71. htmlgraph-0.27.0/pyproject.toml +141 -0
  72. htmlgraph-0.27.0/src/js/htmlgraph.js +975 -0
  73. htmlgraph-0.27.0/src/python/htmlgraph/.htmlgraph/.session-warning-state.json +6 -0
  74. htmlgraph-0.27.0/src/python/htmlgraph/.htmlgraph/agents.json +72 -0
  75. htmlgraph-0.27.0/src/python/htmlgraph/.htmlgraph/htmlgraph.db +0 -0
  76. htmlgraph-0.27.0/src/python/htmlgraph/__init__.py +239 -0
  77. htmlgraph-0.27.0/src/python/htmlgraph/__init__.pyi +123 -0
  78. htmlgraph-0.27.0/src/python/htmlgraph/agent_detection.py +127 -0
  79. htmlgraph-0.27.0/src/python/htmlgraph/agent_registry.py +300 -0
  80. htmlgraph-0.27.0/src/python/htmlgraph/agents.py +1055 -0
  81. htmlgraph-0.27.0/src/python/htmlgraph/analytics/__init__.py +20 -0
  82. htmlgraph-0.27.0/src/python/htmlgraph/analytics/cli.py +433 -0
  83. htmlgraph-0.27.0/src/python/htmlgraph/analytics/cost_analyzer.py +391 -0
  84. htmlgraph-0.27.0/src/python/htmlgraph/analytics/cost_reporter.py +675 -0
  85. htmlgraph-0.27.0/src/python/htmlgraph/analytics/cross_session.py +617 -0
  86. htmlgraph-0.27.0/src/python/htmlgraph/analytics/dependency.py +770 -0
  87. htmlgraph-0.27.0/src/python/htmlgraph/analytics/pattern_learning.py +771 -0
  88. htmlgraph-0.27.0/src/python/htmlgraph/analytics/work_type.py +575 -0
  89. htmlgraph-0.27.0/src/python/htmlgraph/analytics_index.py +823 -0
  90. htmlgraph-0.27.0/src/python/htmlgraph/api/__init__.py +3 -0
  91. htmlgraph-0.27.0/src/python/htmlgraph/api/main.py +2423 -0
  92. htmlgraph-0.27.0/src/python/htmlgraph/api/static/htmx.min.js +1 -0
  93. htmlgraph-0.27.0/src/python/htmlgraph/api/static/style-redesign.css +1344 -0
  94. htmlgraph-0.27.0/src/python/htmlgraph/api/static/style.css +1079 -0
  95. htmlgraph-0.27.0/src/python/htmlgraph/api/templates/dashboard-redesign.html +1366 -0
  96. htmlgraph-0.27.0/src/python/htmlgraph/api/templates/dashboard.html +794 -0
  97. htmlgraph-0.27.0/src/python/htmlgraph/api/templates/partials/activity-feed-hierarchical.html +326 -0
  98. htmlgraph-0.27.0/src/python/htmlgraph/api/templates/partials/activity-feed.html +1100 -0
  99. htmlgraph-0.27.0/src/python/htmlgraph/api/templates/partials/agents-redesign.html +317 -0
  100. htmlgraph-0.27.0/src/python/htmlgraph/api/templates/partials/agents.html +317 -0
  101. htmlgraph-0.27.0/src/python/htmlgraph/api/templates/partials/event-traces.html +373 -0
  102. htmlgraph-0.27.0/src/python/htmlgraph/api/templates/partials/features-kanban-redesign.html +509 -0
  103. htmlgraph-0.27.0/src/python/htmlgraph/api/templates/partials/features.html +578 -0
  104. htmlgraph-0.27.0/src/python/htmlgraph/api/templates/partials/metrics-redesign.html +346 -0
  105. htmlgraph-0.27.0/src/python/htmlgraph/api/templates/partials/metrics.html +346 -0
  106. htmlgraph-0.27.0/src/python/htmlgraph/api/templates/partials/orchestration-redesign.html +443 -0
  107. htmlgraph-0.27.0/src/python/htmlgraph/api/templates/partials/orchestration.html +198 -0
  108. htmlgraph-0.27.0/src/python/htmlgraph/api/templates/partials/spawners.html +375 -0
  109. htmlgraph-0.27.0/src/python/htmlgraph/api/templates/partials/work-items.html +613 -0
  110. htmlgraph-0.27.0/src/python/htmlgraph/archive/__init__.py +24 -0
  111. htmlgraph-0.27.0/src/python/htmlgraph/archive/bloom.py +234 -0
  112. htmlgraph-0.27.0/src/python/htmlgraph/archive/fts.py +297 -0
  113. htmlgraph-0.27.0/src/python/htmlgraph/archive/manager.py +583 -0
  114. htmlgraph-0.27.0/src/python/htmlgraph/archive/search.py +244 -0
  115. htmlgraph-0.27.0/src/python/htmlgraph/atomic_ops.py +560 -0
  116. htmlgraph-0.27.0/src/python/htmlgraph/attribute_index.py +208 -0
  117. htmlgraph-0.27.0/src/python/htmlgraph/builders/__init__.py +32 -0
  118. htmlgraph-0.27.0/src/python/htmlgraph/builders/base.py +267 -0
  119. htmlgraph-0.27.0/src/python/htmlgraph/builders/bug.py +150 -0
  120. htmlgraph-0.27.0/src/python/htmlgraph/builders/chore.py +119 -0
  121. htmlgraph-0.27.0/src/python/htmlgraph/builders/epic.py +150 -0
  122. htmlgraph-0.27.0/src/python/htmlgraph/builders/feature.py +117 -0
  123. htmlgraph-0.27.0/src/python/htmlgraph/builders/insight.py +195 -0
  124. htmlgraph-0.27.0/src/python/htmlgraph/builders/metric.py +217 -0
  125. htmlgraph-0.27.0/src/python/htmlgraph/builders/pattern.py +202 -0
  126. htmlgraph-0.27.0/src/python/htmlgraph/builders/phase.py +162 -0
  127. htmlgraph-0.27.0/src/python/htmlgraph/builders/spike.py +174 -0
  128. htmlgraph-0.27.0/src/python/htmlgraph/builders/track.py +722 -0
  129. htmlgraph-0.27.0/src/python/htmlgraph/cigs/__init__.py +81 -0
  130. htmlgraph-0.27.0/src/python/htmlgraph/cigs/autonomy.py +385 -0
  131. htmlgraph-0.27.0/src/python/htmlgraph/cigs/cost.py +475 -0
  132. htmlgraph-0.27.0/src/python/htmlgraph/cigs/messages_basic.py +472 -0
  133. htmlgraph-0.27.0/src/python/htmlgraph/cigs/messaging.py +365 -0
  134. htmlgraph-0.27.0/src/python/htmlgraph/cigs/models.py +771 -0
  135. htmlgraph-0.27.0/src/python/htmlgraph/cigs/pattern_storage.py +427 -0
  136. htmlgraph-0.27.0/src/python/htmlgraph/cigs/patterns.py +503 -0
  137. htmlgraph-0.27.0/src/python/htmlgraph/cigs/posttool_analyzer.py +234 -0
  138. htmlgraph-0.27.0/src/python/htmlgraph/cigs/reporter.py +818 -0
  139. htmlgraph-0.27.0/src/python/htmlgraph/cigs/tracker.py +317 -0
  140. htmlgraph-0.27.0/src/python/htmlgraph/cli/.htmlgraph/.session-warning-state.json +6 -0
  141. htmlgraph-0.27.0/src/python/htmlgraph/cli/.htmlgraph/agents.json +72 -0
  142. htmlgraph-0.27.0/src/python/htmlgraph/cli/.htmlgraph/htmlgraph.db +0 -0
  143. htmlgraph-0.27.0/src/python/htmlgraph/cli/__init__.py +42 -0
  144. htmlgraph-0.27.0/src/python/htmlgraph/cli/__main__.py +6 -0
  145. htmlgraph-0.27.0/src/python/htmlgraph/cli/analytics.py +1424 -0
  146. htmlgraph-0.27.0/src/python/htmlgraph/cli/base.py +685 -0
  147. htmlgraph-0.27.0/src/python/htmlgraph/cli/constants.py +206 -0
  148. htmlgraph-0.27.0/src/python/htmlgraph/cli/core.py +954 -0
  149. htmlgraph-0.27.0/src/python/htmlgraph/cli/main.py +147 -0
  150. htmlgraph-0.27.0/src/python/htmlgraph/cli/models.py +475 -0
  151. htmlgraph-0.27.0/src/python/htmlgraph/cli/templates/__init__.py +1 -0
  152. htmlgraph-0.27.0/src/python/htmlgraph/cli/templates/cost_dashboard.py +399 -0
  153. htmlgraph-0.27.0/src/python/htmlgraph/cli/work/__init__.py +239 -0
  154. htmlgraph-0.27.0/src/python/htmlgraph/cli/work/browse.py +115 -0
  155. htmlgraph-0.27.0/src/python/htmlgraph/cli/work/features.py +568 -0
  156. htmlgraph-0.27.0/src/python/htmlgraph/cli/work/orchestration.py +676 -0
  157. htmlgraph-0.27.0/src/python/htmlgraph/cli/work/report.py +728 -0
  158. htmlgraph-0.27.0/src/python/htmlgraph/cli/work/sessions.py +466 -0
  159. htmlgraph-0.27.0/src/python/htmlgraph/cli/work/snapshot.py +559 -0
  160. htmlgraph-0.27.0/src/python/htmlgraph/cli/work/tracks.py +486 -0
  161. htmlgraph-0.27.0/src/python/htmlgraph/cli_commands/__init__.py +1 -0
  162. htmlgraph-0.27.0/src/python/htmlgraph/cli_commands/feature.py +195 -0
  163. htmlgraph-0.27.0/src/python/htmlgraph/cli_framework.py +115 -0
  164. htmlgraph-0.27.0/src/python/htmlgraph/collections/__init__.py +34 -0
  165. htmlgraph-0.27.0/src/python/htmlgraph/collections/base.py +826 -0
  166. htmlgraph-0.27.0/src/python/htmlgraph/collections/bug.py +53 -0
  167. htmlgraph-0.27.0/src/python/htmlgraph/collections/chore.py +53 -0
  168. htmlgraph-0.27.0/src/python/htmlgraph/collections/epic.py +53 -0
  169. htmlgraph-0.27.0/src/python/htmlgraph/collections/feature.py +75 -0
  170. htmlgraph-0.27.0/src/python/htmlgraph/collections/insight.py +100 -0
  171. htmlgraph-0.27.0/src/python/htmlgraph/collections/metric.py +92 -0
  172. htmlgraph-0.27.0/src/python/htmlgraph/collections/pattern.py +97 -0
  173. htmlgraph-0.27.0/src/python/htmlgraph/collections/phase.py +53 -0
  174. htmlgraph-0.27.0/src/python/htmlgraph/collections/session.py +194 -0
  175. htmlgraph-0.27.0/src/python/htmlgraph/collections/spike.py +109 -0
  176. htmlgraph-0.27.0/src/python/htmlgraph/collections/task_delegation.py +241 -0
  177. htmlgraph-0.27.0/src/python/htmlgraph/collections/todo.py +511 -0
  178. htmlgraph-0.27.0/src/python/htmlgraph/collections/traces.py +487 -0
  179. htmlgraph-0.27.0/src/python/htmlgraph/config.py +190 -0
  180. htmlgraph-0.27.0/src/python/htmlgraph/context_analytics.py +344 -0
  181. htmlgraph-0.27.0/src/python/htmlgraph/converter.py +764 -0
  182. htmlgraph-0.27.0/src/python/htmlgraph/cost_analysis/__init__.py +5 -0
  183. htmlgraph-0.27.0/src/python/htmlgraph/cost_analysis/analyzer.py +438 -0
  184. htmlgraph-0.27.0/src/python/htmlgraph/dashboard.html +6592 -0
  185. htmlgraph-0.27.0/src/python/htmlgraph/dashboard.html.backup +6592 -0
  186. htmlgraph-0.27.0/src/python/htmlgraph/dashboard.html.bak +7181 -0
  187. htmlgraph-0.27.0/src/python/htmlgraph/dashboard.html.bak2 +7231 -0
  188. htmlgraph-0.27.0/src/python/htmlgraph/dashboard.html.bak3 +7232 -0
  189. htmlgraph-0.27.0/src/python/htmlgraph/db/__init__.py +38 -0
  190. htmlgraph-0.27.0/src/python/htmlgraph/db/queries.py +790 -0
  191. htmlgraph-0.27.0/src/python/htmlgraph/db/schema.py +1727 -0
  192. htmlgraph-0.27.0/src/python/htmlgraph/decorators.py +317 -0
  193. htmlgraph-0.27.0/src/python/htmlgraph/dependency_models.py +153 -0
  194. htmlgraph-0.27.0/src/python/htmlgraph/deploy.py +531 -0
  195. htmlgraph-0.27.0/src/python/htmlgraph/deployment_models.py +474 -0
  196. htmlgraph-0.27.0/src/python/htmlgraph/docs/API_REFERENCE.md +841 -0
  197. htmlgraph-0.27.0/src/python/htmlgraph/docs/HTTP_API.md +750 -0
  198. htmlgraph-0.27.0/src/python/htmlgraph/docs/INTEGRATION_GUIDE.md +752 -0
  199. htmlgraph-0.27.0/src/python/htmlgraph/docs/ORCHESTRATION_PATTERNS.md +717 -0
  200. htmlgraph-0.27.0/src/python/htmlgraph/docs/README.md +532 -0
  201. htmlgraph-0.27.0/src/python/htmlgraph/docs/__init__.py +77 -0
  202. htmlgraph-0.27.0/src/python/htmlgraph/docs/docs_version.py +55 -0
  203. htmlgraph-0.27.0/src/python/htmlgraph/docs/metadata.py +93 -0
  204. htmlgraph-0.27.0/src/python/htmlgraph/docs/migrations.py +232 -0
  205. htmlgraph-0.27.0/src/python/htmlgraph/docs/template_engine.py +143 -0
  206. htmlgraph-0.27.0/src/python/htmlgraph/docs/templates/_sections/cli_reference.md.j2 +52 -0
  207. htmlgraph-0.27.0/src/python/htmlgraph/docs/templates/_sections/core_concepts.md.j2 +29 -0
  208. htmlgraph-0.27.0/src/python/htmlgraph/docs/templates/_sections/sdk_basics.md.j2 +69 -0
  209. htmlgraph-0.27.0/src/python/htmlgraph/docs/templates/base_agents.md.j2 +78 -0
  210. htmlgraph-0.27.0/src/python/htmlgraph/docs/templates/example_user_override.md.j2 +47 -0
  211. htmlgraph-0.27.0/src/python/htmlgraph/docs/version_check.py +163 -0
  212. htmlgraph-0.27.0/src/python/htmlgraph/edge_index.py +489 -0
  213. htmlgraph-0.27.0/src/python/htmlgraph/error_handler.py +544 -0
  214. htmlgraph-0.27.0/src/python/htmlgraph/event_log.py +285 -0
  215. htmlgraph-0.27.0/src/python/htmlgraph/event_migration.py +81 -0
  216. htmlgraph-0.27.0/src/python/htmlgraph/exceptions.py +49 -0
  217. htmlgraph-0.27.0/src/python/htmlgraph/extensions/gemini/GEMINI.md +726 -0
  218. htmlgraph-0.27.0/src/python/htmlgraph/extensions/gemini/README.md +274 -0
  219. htmlgraph-0.27.0/src/python/htmlgraph/extensions/gemini/gemini-extension.json +14 -0
  220. htmlgraph-0.27.0/src/python/htmlgraph/extensions/gemini/hooks/hooks.json +32 -0
  221. htmlgraph-0.27.0/src/python/htmlgraph/extensions/gemini/hooks/scripts/post-tool.sh +42 -0
  222. htmlgraph-0.27.0/src/python/htmlgraph/extensions/gemini/hooks/scripts/session-end.sh +56 -0
  223. htmlgraph-0.27.0/src/python/htmlgraph/extensions/gemini/hooks/scripts/session-start.sh +118 -0
  224. htmlgraph-0.27.0/src/python/htmlgraph/file_watcher.py +191 -0
  225. htmlgraph-0.27.0/src/python/htmlgraph/find_api.py +416 -0
  226. htmlgraph-0.27.0/src/python/htmlgraph/git_events.py +725 -0
  227. htmlgraph-0.27.0/src/python/htmlgraph/graph.py +2082 -0
  228. htmlgraph-0.27.0/src/python/htmlgraph/hooks/.htmlgraph/.session-warning-state.json +6 -0
  229. htmlgraph-0.27.0/src/python/htmlgraph/hooks/.htmlgraph/agents.json +72 -0
  230. htmlgraph-0.27.0/src/python/htmlgraph/hooks/.htmlgraph/index.sqlite +0 -0
  231. htmlgraph-0.27.0/src/python/htmlgraph/hooks/__init__.py +45 -0
  232. htmlgraph-0.27.0/src/python/htmlgraph/hooks/bootstrap.py +169 -0
  233. htmlgraph-0.27.0/src/python/htmlgraph/hooks/cigs_pretool_enforcer.py +354 -0
  234. htmlgraph-0.27.0/src/python/htmlgraph/hooks/concurrent_sessions.py +208 -0
  235. htmlgraph-0.27.0/src/python/htmlgraph/hooks/context.py +350 -0
  236. htmlgraph-0.27.0/src/python/htmlgraph/hooks/drift_handler.py +525 -0
  237. htmlgraph-0.27.0/src/python/htmlgraph/hooks/event_tracker.py +1314 -0
  238. htmlgraph-0.27.0/src/python/htmlgraph/hooks/git_commands.py +175 -0
  239. htmlgraph-0.27.0/src/python/htmlgraph/hooks/hooks-config.example.json +12 -0
  240. htmlgraph-0.27.0/src/python/htmlgraph/hooks/installer.py +343 -0
  241. htmlgraph-0.27.0/src/python/htmlgraph/hooks/orchestrator.py +674 -0
  242. htmlgraph-0.27.0/src/python/htmlgraph/hooks/orchestrator_reflector.py +223 -0
  243. htmlgraph-0.27.0/src/python/htmlgraph/hooks/post-checkout.sh +28 -0
  244. htmlgraph-0.27.0/src/python/htmlgraph/hooks/post-commit.sh +24 -0
  245. htmlgraph-0.27.0/src/python/htmlgraph/hooks/post-merge.sh +26 -0
  246. htmlgraph-0.27.0/src/python/htmlgraph/hooks/post_tool_use_failure.py +273 -0
  247. htmlgraph-0.27.0/src/python/htmlgraph/hooks/post_tool_use_handler.py +257 -0
  248. htmlgraph-0.27.0/src/python/htmlgraph/hooks/posttooluse.py +408 -0
  249. htmlgraph-0.27.0/src/python/htmlgraph/hooks/pre-commit.sh +94 -0
  250. htmlgraph-0.27.0/src/python/htmlgraph/hooks/pre-push.sh +28 -0
  251. htmlgraph-0.27.0/src/python/htmlgraph/hooks/pretooluse.py +819 -0
  252. htmlgraph-0.27.0/src/python/htmlgraph/hooks/prompt_analyzer.py +637 -0
  253. htmlgraph-0.27.0/src/python/htmlgraph/hooks/session_handler.py +668 -0
  254. htmlgraph-0.27.0/src/python/htmlgraph/hooks/session_summary.py +395 -0
  255. htmlgraph-0.27.0/src/python/htmlgraph/hooks/state_manager.py +504 -0
  256. htmlgraph-0.27.0/src/python/htmlgraph/hooks/subagent_detection.py +202 -0
  257. htmlgraph-0.27.0/src/python/htmlgraph/hooks/subagent_stop.py +369 -0
  258. htmlgraph-0.27.0/src/python/htmlgraph/hooks/task_enforcer.py +255 -0
  259. htmlgraph-0.27.0/src/python/htmlgraph/hooks/task_validator.py +177 -0
  260. htmlgraph-0.27.0/src/python/htmlgraph/hooks/validator.py +628 -0
  261. htmlgraph-0.27.0/src/python/htmlgraph/ids.py +325 -0
  262. htmlgraph-0.27.0/src/python/htmlgraph/index.d.ts +286 -0
  263. htmlgraph-0.27.0/src/python/htmlgraph/learning.py +767 -0
  264. htmlgraph-0.27.0/src/python/htmlgraph/mcp_server.py +718 -0
  265. htmlgraph-0.27.0/src/python/htmlgraph/models.py +2426 -0
  266. htmlgraph-0.27.0/src/python/htmlgraph/operations/README.md +62 -0
  267. htmlgraph-0.27.0/src/python/htmlgraph/operations/__init__.py +79 -0
  268. htmlgraph-0.27.0/src/python/htmlgraph/operations/analytics.py +339 -0
  269. htmlgraph-0.27.0/src/python/htmlgraph/operations/bootstrap.py +289 -0
  270. htmlgraph-0.27.0/src/python/htmlgraph/operations/events.py +244 -0
  271. htmlgraph-0.27.0/src/python/htmlgraph/operations/fastapi_server.py +231 -0
  272. htmlgraph-0.27.0/src/python/htmlgraph/operations/hooks.py +350 -0
  273. htmlgraph-0.27.0/src/python/htmlgraph/operations/initialization.py +597 -0
  274. htmlgraph-0.27.0/src/python/htmlgraph/operations/initialization.py.backup +228 -0
  275. htmlgraph-0.27.0/src/python/htmlgraph/operations/server.py +303 -0
  276. htmlgraph-0.27.0/src/python/htmlgraph/orchestration/__init__.py +58 -0
  277. htmlgraph-0.27.0/src/python/htmlgraph/orchestration/claude_launcher.py +188 -0
  278. htmlgraph-0.27.0/src/python/htmlgraph/orchestration/command_builder.py +72 -0
  279. htmlgraph-0.27.0/src/python/htmlgraph/orchestration/headless_spawner.py +281 -0
  280. htmlgraph-0.27.0/src/python/htmlgraph/orchestration/live_events.py +377 -0
  281. htmlgraph-0.27.0/src/python/htmlgraph/orchestration/model_selection.py +327 -0
  282. htmlgraph-0.27.0/src/python/htmlgraph/orchestration/plugin_manager.py +140 -0
  283. htmlgraph-0.27.0/src/python/htmlgraph/orchestration/prompts.py +137 -0
  284. htmlgraph-0.27.0/src/python/htmlgraph/orchestration/spawner_event_tracker.py +383 -0
  285. htmlgraph-0.27.0/src/python/htmlgraph/orchestration/spawners/__init__.py +16 -0
  286. htmlgraph-0.27.0/src/python/htmlgraph/orchestration/spawners/base.py +194 -0
  287. htmlgraph-0.27.0/src/python/htmlgraph/orchestration/spawners/claude.py +173 -0
  288. htmlgraph-0.27.0/src/python/htmlgraph/orchestration/spawners/codex.py +435 -0
  289. htmlgraph-0.27.0/src/python/htmlgraph/orchestration/spawners/copilot.py +294 -0
  290. htmlgraph-0.27.0/src/python/htmlgraph/orchestration/spawners/gemini.py +471 -0
  291. htmlgraph-0.27.0/src/python/htmlgraph/orchestration/subprocess_runner.py +36 -0
  292. htmlgraph-0.27.0/src/python/htmlgraph/orchestration/task_coordination.py +343 -0
  293. htmlgraph-0.27.0/src/python/htmlgraph/orchestration.md +563 -0
  294. htmlgraph-0.27.0/src/python/htmlgraph/orchestrator-system-prompt-optimized.txt +863 -0
  295. htmlgraph-0.27.0/src/python/htmlgraph/orchestrator.py +669 -0
  296. htmlgraph-0.27.0/src/python/htmlgraph/orchestrator_config.py +357 -0
  297. htmlgraph-0.27.0/src/python/htmlgraph/orchestrator_mode.py +328 -0
  298. htmlgraph-0.27.0/src/python/htmlgraph/orchestrator_validator.py +133 -0
  299. htmlgraph-0.27.0/src/python/htmlgraph/parallel.py +646 -0
  300. htmlgraph-0.27.0/src/python/htmlgraph/parser.py +510 -0
  301. htmlgraph-0.27.0/src/python/htmlgraph/planning.py +1149 -0
  302. htmlgraph-0.27.0/src/python/htmlgraph/pydantic_models.py +476 -0
  303. htmlgraph-0.27.0/src/python/htmlgraph/quality_gates.py +350 -0
  304. htmlgraph-0.27.0/src/python/htmlgraph/query_builder.py +591 -0
  305. htmlgraph-0.27.0/src/python/htmlgraph/reflection.py +443 -0
  306. htmlgraph-0.27.0/src/python/htmlgraph/refs.py +344 -0
  307. htmlgraph-0.27.0/src/python/htmlgraph/repo_hash.py +512 -0
  308. htmlgraph-0.27.0/src/python/htmlgraph/routing.py +300 -0
  309. htmlgraph-0.27.0/src/python/htmlgraph/scripts/__init__.py +1 -0
  310. htmlgraph-0.27.0/src/python/htmlgraph/scripts/deploy.py +142 -0
  311. htmlgraph-0.27.0/src/python/htmlgraph/sdk/__init__.py +398 -0
  312. htmlgraph-0.27.0/src/python/htmlgraph/sdk/__init__.pyi +14 -0
  313. htmlgraph-0.27.0/src/python/htmlgraph/sdk/analytics/__init__.py +19 -0
  314. htmlgraph-0.27.0/src/python/htmlgraph/sdk/analytics/engine.py +155 -0
  315. htmlgraph-0.27.0/src/python/htmlgraph/sdk/analytics/helpers.py +178 -0
  316. htmlgraph-0.27.0/src/python/htmlgraph/sdk/analytics/registry.py +109 -0
  317. htmlgraph-0.27.0/src/python/htmlgraph/sdk/base.py +484 -0
  318. htmlgraph-0.27.0/src/python/htmlgraph/sdk/constants.py +216 -0
  319. htmlgraph-0.27.0/src/python/htmlgraph/sdk/core.pyi +308 -0
  320. htmlgraph-0.27.0/src/python/htmlgraph/sdk/discovery.py +120 -0
  321. htmlgraph-0.27.0/src/python/htmlgraph/sdk/help/__init__.py +12 -0
  322. htmlgraph-0.27.0/src/python/htmlgraph/sdk/help/mixin.py +699 -0
  323. htmlgraph-0.27.0/src/python/htmlgraph/sdk/mixins/__init__.py +15 -0
  324. htmlgraph-0.27.0/src/python/htmlgraph/sdk/mixins/attribution.py +113 -0
  325. htmlgraph-0.27.0/src/python/htmlgraph/sdk/mixins/mixin.py +410 -0
  326. htmlgraph-0.27.0/src/python/htmlgraph/sdk/operations/__init__.py +12 -0
  327. htmlgraph-0.27.0/src/python/htmlgraph/sdk/operations/mixin.py +427 -0
  328. htmlgraph-0.27.0/src/python/htmlgraph/sdk/orchestration/__init__.py +17 -0
  329. htmlgraph-0.27.0/src/python/htmlgraph/sdk/orchestration/coordinator.py +203 -0
  330. htmlgraph-0.27.0/src/python/htmlgraph/sdk/orchestration/spawner.py +204 -0
  331. htmlgraph-0.27.0/src/python/htmlgraph/sdk/planning/__init__.py +19 -0
  332. htmlgraph-0.27.0/src/python/htmlgraph/sdk/planning/bottlenecks.py +93 -0
  333. htmlgraph-0.27.0/src/python/htmlgraph/sdk/planning/mixin.py +211 -0
  334. htmlgraph-0.27.0/src/python/htmlgraph/sdk/planning/parallel.py +186 -0
  335. htmlgraph-0.27.0/src/python/htmlgraph/sdk/planning/queue.py +210 -0
  336. htmlgraph-0.27.0/src/python/htmlgraph/sdk/planning/recommendations.py +87 -0
  337. htmlgraph-0.27.0/src/python/htmlgraph/sdk/planning/smart_planning.py +319 -0
  338. htmlgraph-0.27.0/src/python/htmlgraph/sdk/session/__init__.py +19 -0
  339. htmlgraph-0.27.0/src/python/htmlgraph/sdk/session/continuity.py +57 -0
  340. htmlgraph-0.27.0/src/python/htmlgraph/sdk/session/handoff.py +110 -0
  341. htmlgraph-0.27.0/src/python/htmlgraph/sdk/session/info.py +309 -0
  342. htmlgraph-0.27.0/src/python/htmlgraph/sdk/session/manager.py +103 -0
  343. htmlgraph-0.27.0/src/python/htmlgraph/server.py +1508 -0
  344. htmlgraph-0.27.0/src/python/htmlgraph/services/__init__.py +10 -0
  345. htmlgraph-0.27.0/src/python/htmlgraph/services/claiming.py +199 -0
  346. htmlgraph-0.27.0/src/python/htmlgraph/session_hooks.py +300 -0
  347. htmlgraph-0.27.0/src/python/htmlgraph/session_manager.py +2803 -0
  348. htmlgraph-0.27.0/src/python/htmlgraph/session_registry.py +587 -0
  349. htmlgraph-0.27.0/src/python/htmlgraph/session_state.py +436 -0
  350. htmlgraph-0.27.0/src/python/htmlgraph/session_warning.py +201 -0
  351. htmlgraph-0.27.0/src/python/htmlgraph/sessions/__init__.py +23 -0
  352. htmlgraph-0.27.0/src/python/htmlgraph/sessions/handoff.py +756 -0
  353. htmlgraph-0.27.0/src/python/htmlgraph/setup.py +310 -0
  354. htmlgraph-0.27.0/src/python/htmlgraph/spike_index.py +143 -0
  355. htmlgraph-0.27.0/src/python/htmlgraph/styles.css +345 -0
  356. htmlgraph-0.27.0/src/python/htmlgraph/sync_docs.py +319 -0
  357. htmlgraph-0.27.0/src/python/htmlgraph/system_prompts.py +450 -0
  358. htmlgraph-0.27.0/src/python/htmlgraph/templates/AGENTS.md.template +366 -0
  359. htmlgraph-0.27.0/src/python/htmlgraph/templates/CLAUDE.md.template +97 -0
  360. htmlgraph-0.27.0/src/python/htmlgraph/templates/GEMINI.md.template +87 -0
  361. htmlgraph-0.27.0/src/python/htmlgraph/templates/orchestration-view.html +350 -0
  362. htmlgraph-0.27.0/src/python/htmlgraph/track_builder.py +224 -0
  363. htmlgraph-0.27.0/src/python/htmlgraph/track_manager.py +769 -0
  364. htmlgraph-0.27.0/src/python/htmlgraph/transcript.py +890 -0
  365. htmlgraph-0.27.0/src/python/htmlgraph/transcript_analytics.py +699 -0
  366. htmlgraph-0.27.0/src/python/htmlgraph/types.py +323 -0
  367. htmlgraph-0.27.0/src/python/htmlgraph/validation.py +115 -0
  368. htmlgraph-0.27.0/src/python/htmlgraph/watch.py +131 -0
  369. htmlgraph-0.27.0/src/python/htmlgraph/work_type_utils.py +112 -0
  370. htmlgraph-0.27.0/tests/benchmarks/README.md +109 -0
  371. htmlgraph-0.27.0/tests/benchmarks/__init__.py +6 -0
  372. htmlgraph-0.27.0/tests/benchmarks/bench_graph.py +449 -0
  373. htmlgraph-0.27.0/tests/benchmarks/conftest.py +135 -0
  374. htmlgraph-0.27.0/tests/cli/test_bootstrap_command.py +226 -0
  375. htmlgraph-0.27.0/tests/hooks/__init__.py +1 -0
  376. htmlgraph-0.27.0/tests/hooks/test_bootstrap.py +586 -0
  377. htmlgraph-0.27.0/tests/hooks/test_concurrent_sessions.py +758 -0
  378. htmlgraph-0.27.0/tests/hooks/test_context.py +490 -0
  379. htmlgraph-0.27.0/tests/hooks/test_event_tracker.py +1452 -0
  380. htmlgraph-0.27.0/tests/hooks/test_git_commands.py +306 -0
  381. htmlgraph-0.27.0/tests/hooks/test_hybrid_event_capture.py +481 -0
  382. htmlgraph-0.27.0/tests/hooks/test_prompt_analyzer.py +1257 -0
  383. htmlgraph-0.27.0/tests/hooks/test_session_handler.py +1097 -0
  384. htmlgraph-0.27.0/tests/hooks/test_state_manager.py +1126 -0
  385. htmlgraph-0.27.0/tests/hooks/test_system_prompt_persistence.py +913 -0
  386. htmlgraph-0.27.0/tests/hooks/test_system_prompt_persistence_integration.py +758 -0
  387. htmlgraph-0.27.0/tests/integration/multi_agent/README.md +240 -0
  388. htmlgraph-0.27.0/tests/integration/multi_agent/__init__.py +1 -0
  389. htmlgraph-0.27.0/tests/integration/multi_agent/test_agent_quirks.py +568 -0
  390. htmlgraph-0.27.0/tests/integration/multi_agent/test_git_continuity_spine.py +751 -0
  391. htmlgraph-0.27.0/tests/integration/test_cigs_hook_flow.py +599 -0
  392. htmlgraph-0.27.0/tests/integration/test_cigs_integration.py +666 -0
  393. htmlgraph-0.27.0/tests/integration/test_cigs_learning.py +648 -0
  394. htmlgraph-0.27.0/tests/integration/test_codex_spawner.py +352 -0
  395. htmlgraph-0.27.0/tests/integration/test_complexity_assessment.py +418 -0
  396. htmlgraph-0.27.0/tests/integration/test_copilot_spawner_tracking.py +402 -0
  397. htmlgraph-0.27.0/tests/integration/test_dashboard_spawner_display.py +505 -0
  398. htmlgraph-0.27.0/tests/integration/test_delegation_events.py +133 -0
  399. htmlgraph-0.27.0/tests/integration/test_deployment_workflow.py +282 -0
  400. htmlgraph-0.27.0/tests/integration/test_discoverability.py +169 -0
  401. htmlgraph-0.27.0/tests/integration/test_edge_index_bug.py +116 -0
  402. htmlgraph-0.27.0/tests/integration/test_features.py +96 -0
  403. htmlgraph-0.27.0/tests/integration/test_gemini_spawner_diagnosis.py +72 -0
  404. htmlgraph-0.27.0/tests/integration/test_handoff_routing.py +227 -0
  405. htmlgraph-0.27.0/tests/integration/test_multi_agent_coordination.py +332 -0
  406. htmlgraph-0.27.0/tests/integration/test_new_features.py +255 -0
  407. htmlgraph-0.27.0/tests/integration/test_orchestration_tab.py +120 -0
  408. htmlgraph-0.27.0/tests/integration/test_orchestration_with_playwright.py +149 -0
  409. htmlgraph-0.27.0/tests/integration/test_orchestrator_pattern.py +175 -0
  410. htmlgraph-0.27.0/tests/integration/test_orchestrator_spawner_delegation.py +666 -0
  411. htmlgraph-0.27.0/tests/integration/test_phase4_delegation_events.py +158 -0
  412. htmlgraph-0.27.0/tests/integration/test_post_compact_delegation.py +665 -0
  413. htmlgraph-0.27.0/tests/integration/test_real_workitem_integration.py +324 -0
  414. htmlgraph-0.27.0/tests/integration/test_redesigned_dashboard.py +47 -0
  415. htmlgraph-0.27.0/tests/integration/test_spawner_integration.py +538 -0
  416. htmlgraph-0.27.0/tests/integration/test_spawner_live_events.py +305 -0
  417. htmlgraph-0.27.0/tests/integration/test_spawner_observability_e2e.py +593 -0
  418. htmlgraph-0.27.0/tests/integration/test_spawner_routing_live.py +353 -0
  419. htmlgraph-0.27.0/tests/integration/test_spawner_tool_tracking.py +434 -0
  420. htmlgraph-0.27.0/tests/integration/test_task_delegation.py +100 -0
  421. htmlgraph-0.27.0/tests/integration/test_user_query_events.py +399 -0
  422. htmlgraph-0.27.0/tests/integration/test_websocket_realtime.py +262 -0
  423. htmlgraph-0.27.0/tests/integration/test_websocket_streaming.py +246 -0
  424. htmlgraph-0.27.0/tests/integration/verify_phase1_userquery.py +103 -0
  425. htmlgraph-0.27.0/tests/js/README.md +101 -0
  426. htmlgraph-0.27.0/tests/js/test_htmlgraph.html +367 -0
  427. htmlgraph-0.27.0/tests/manual/test-hook-input.py +33 -0
  428. htmlgraph-0.27.0/tests/operations/__init__.py +1 -0
  429. htmlgraph-0.27.0/tests/operations/test_hooks.py +333 -0
  430. htmlgraph-0.27.0/tests/operations/test_server.py +305 -0
  431. htmlgraph-0.27.0/tests/python/__init__.py +1 -0
  432. htmlgraph-0.27.0/tests/python/conftest.py +220 -0
  433. htmlgraph-0.27.0/tests/python/test_activity_feed_ui.py +356 -0
  434. htmlgraph-0.27.0/tests/python/test_agent_attribution.py +250 -0
  435. htmlgraph-0.27.0/tests/python/test_agent_detection.py +89 -0
  436. htmlgraph-0.27.0/tests/python/test_analytics.py +475 -0
  437. htmlgraph-0.27.0/tests/python/test_archive_manager.py +581 -0
  438. htmlgraph-0.27.0/tests/python/test_archive_search.py +387 -0
  439. htmlgraph-0.27.0/tests/python/test_atomic_ops.py +599 -0
  440. htmlgraph-0.27.0/tests/python/test_auto_spike.py +346 -0
  441. htmlgraph-0.27.0/tests/python/test_browse.py +217 -0
  442. htmlgraph-0.27.0/tests/python/test_cigs_pretool_enforcer.py +400 -0
  443. htmlgraph-0.27.0/tests/python/test_claiming.py +95 -0
  444. htmlgraph-0.27.0/tests/python/test_cli_commands.py +300 -0
  445. htmlgraph-0.27.0/tests/python/test_cli_pydantic_models.py +361 -0
  446. htmlgraph-0.27.0/tests/python/test_cli_rich_output.py +476 -0
  447. htmlgraph-0.27.0/tests/python/test_collection_filter.py +161 -0
  448. htmlgraph-0.27.0/tests/python/test_cost_analyzer.py +761 -0
  449. htmlgraph-0.27.0/tests/python/test_costs_command.py +444 -0
  450. htmlgraph-0.27.0/tests/python/test_cross_agent_attribution.py +60 -0
  451. htmlgraph-0.27.0/tests/python/test_cross_session_analytics.py +466 -0
  452. htmlgraph-0.27.0/tests/python/test_dashboard_attribution.py +602 -0
  453. htmlgraph-0.27.0/tests/python/test_dashboard_ui.py +159 -0
  454. htmlgraph-0.27.0/tests/python/test_decorators.py +652 -0
  455. htmlgraph-0.27.0/tests/python/test_delegation_fk_fix.py +256 -0
  456. htmlgraph-0.27.0/tests/python/test_delete.py +454 -0
  457. htmlgraph-0.27.0/tests/python/test_deploy.py +365 -0
  458. htmlgraph-0.27.0/tests/python/test_drift_parent_activity.py +260 -0
  459. htmlgraph-0.27.0/tests/python/test_drift_queue_cleanup.py +183 -0
  460. htmlgraph-0.27.0/tests/python/test_edge_index.py +401 -0
  461. htmlgraph-0.27.0/tests/python/test_error_handling.py +215 -0
  462. htmlgraph-0.27.0/tests/python/test_event_index.py +209 -0
  463. htmlgraph-0.27.0/tests/python/test_event_query.py +279 -0
  464. htmlgraph-0.27.0/tests/python/test_event_tracing.py +673 -0
  465. htmlgraph-0.27.0/tests/python/test_feature_track_linkage_phase1.py +374 -0
  466. htmlgraph-0.27.0/tests/python/test_find_api.py +436 -0
  467. htmlgraph-0.27.0/tests/python/test_fixtures.py +159 -0
  468. htmlgraph-0.27.0/tests/python/test_git_events.py +50 -0
  469. htmlgraph-0.27.0/tests/python/test_graph_traversal.py +421 -0
  470. htmlgraph-0.27.0/tests/python/test_handoff.py +517 -0
  471. htmlgraph-0.27.0/tests/python/test_headless_spawner.py +554 -0
  472. htmlgraph-0.27.0/tests/python/test_headless_spawner_parent_session.py +282 -0
  473. htmlgraph-0.27.0/tests/python/test_ids.py +308 -0
  474. htmlgraph-0.27.0/tests/python/test_install_hooks.py +438 -0
  475. htmlgraph-0.27.0/tests/python/test_lifecycle.py +356 -0
  476. htmlgraph-0.27.0/tests/python/test_mcp_server.py +178 -0
  477. htmlgraph-0.27.0/tests/python/test_mcp_stdio_transport.py +48 -0
  478. htmlgraph-0.27.0/tests/python/test_models.py +397 -0
  479. htmlgraph-0.27.0/tests/python/test_orchestration.py +193 -0
  480. htmlgraph-0.27.0/tests/python/test_orchestrator_circuit_breaker.py +322 -0
  481. htmlgraph-0.27.0/tests/python/test_orchestrator_cli.py +345 -0
  482. htmlgraph-0.27.0/tests/python/test_orchestrator_enforce_hook.py +674 -0
  483. htmlgraph-0.27.0/tests/python/test_orchestrator_mode.py +285 -0
  484. htmlgraph-0.27.0/tests/python/test_parent_child_event_linking.py +367 -0
  485. htmlgraph-0.27.0/tests/python/test_parent_child_linking.py +314 -0
  486. htmlgraph-0.27.0/tests/python/test_parent_linking_integration.py +322 -0
  487. htmlgraph-0.27.0/tests/python/test_pattern_learning.py +647 -0
  488. htmlgraph-0.27.0/tests/python/test_pattern_storage.py +828 -0
  489. htmlgraph-0.27.0/tests/python/test_plugin_update_preservation.py +621 -0
  490. htmlgraph-0.27.0/tests/python/test_post_tool_use_failure.py +303 -0
  491. htmlgraph-0.27.0/tests/python/test_post_tool_use_handler.py +273 -0
  492. htmlgraph-0.27.0/tests/python/test_posttooluse_cigs.py +397 -0
  493. htmlgraph-0.27.0/tests/python/test_pre_commit_hooks.py +333 -0
  494. htmlgraph-0.27.0/tests/python/test_pre_work_validation_integration.py +273 -0
  495. htmlgraph-0.27.0/tests/python/test_pretooluse_event_hierarchy.py +586 -0
  496. htmlgraph-0.27.0/tests/python/test_quality_gates.py +432 -0
  497. htmlgraph-0.27.0/tests/python/test_query_builder.py +492 -0
  498. htmlgraph-0.27.0/tests/python/test_query_cache.py +348 -0
  499. htmlgraph-0.27.0/tests/python/test_query_compilation.py +213 -0
  500. htmlgraph-0.27.0/tests/python/test_reflection.py +204 -0
  501. htmlgraph-0.27.0/tests/python/test_refs.py +387 -0
  502. htmlgraph-0.27.0/tests/python/test_repo_hash.py +647 -0
  503. htmlgraph-0.27.0/tests/python/test_routing.py +483 -0
  504. htmlgraph-0.27.0/tests/python/test_sdk_discoverability.py +237 -0
  505. htmlgraph-0.27.0/tests/python/test_sdk_get_active_work_item.py +308 -0
  506. htmlgraph-0.27.0/tests/python/test_sdk_modularization_phase1.py +494 -0
  507. htmlgraph-0.27.0/tests/python/test_sdk_parent_session.py +345 -0
  508. htmlgraph-0.27.0/tests/python/test_sdk_sqlite_integration.py +346 -0
  509. htmlgraph-0.27.0/tests/python/test_session_cleanup.py +174 -0
  510. htmlgraph-0.27.0/tests/python/test_session_continuity.py +332 -0
  511. htmlgraph-0.27.0/tests/python/test_session_handoff_continuity.py +508 -0
  512. htmlgraph-0.27.0/tests/python/test_session_integration.py +667 -0
  513. htmlgraph-0.27.0/tests/python/test_session_registry.py +662 -0
  514. htmlgraph-0.27.0/tests/python/test_session_start_cigs.py +326 -0
  515. htmlgraph-0.27.0/tests/python/test_session_start_info_validation.py +399 -0
  516. htmlgraph-0.27.0/tests/python/test_session_state_manager.py +337 -0
  517. htmlgraph-0.27.0/tests/python/test_snapshot.py +310 -0
  518. htmlgraph-0.27.0/tests/python/test_snapshot_refs_integration.py +1710 -0
  519. htmlgraph-0.27.0/tests/python/test_spawner_agents.py +558 -0
  520. htmlgraph-0.27.0/tests/python/test_spawner_routing.py +482 -0
  521. htmlgraph-0.27.0/tests/python/test_sqlite_schema.py +596 -0
  522. htmlgraph-0.27.0/tests/python/test_stop_cigs.py +395 -0
  523. htmlgraph-0.27.0/tests/python/test_system_overhead_drift.py +545 -0
  524. htmlgraph-0.27.0/tests/python/test_template_system.py +317 -0
  525. htmlgraph-0.27.0/tests/python/test_todo_collection.py +315 -0
  526. htmlgraph-0.27.0/tests/python/test_traces_collection.py +499 -0
  527. htmlgraph-0.27.0/tests/python/test_track_loading.py +372 -0
  528. htmlgraph-0.27.0/tests/python/test_transcript_linking.py +293 -0
  529. htmlgraph-0.27.0/tests/python/test_update_preserves_incoming_edges.py +183 -0
  530. htmlgraph-0.27.0/tests/python/test_user_prompt_submit_cigs.py +360 -0
  531. htmlgraph-0.27.0/tests/python/test_validate_work_hook.py +352 -0
  532. htmlgraph-0.27.0/tests/python/test_version_migration.py +390 -0
  533. htmlgraph-0.27.0/tests/python/test_violation_tracker.py +716 -0
  534. htmlgraph-0.27.0/tests/python/test_work_queue.py +292 -0
  535. htmlgraph-0.27.0/tests/python/test_work_type.py +231 -0
  536. htmlgraph-0.27.0/tests/test_agent_routing.py +280 -0
  537. htmlgraph-0.27.0/tests/test_autonomy_recommender.py +735 -0
  538. htmlgraph-0.27.0/tests/test_cigs_cli.py +505 -0
  539. htmlgraph-0.27.0/tests/test_cigs_cost_calculator.py +510 -0
  540. htmlgraph-0.27.0/tests/test_cigs_cost_reporter.py +607 -0
  541. htmlgraph-0.27.0/tests/test_cigs_imperative_messages.py +632 -0
  542. htmlgraph-0.27.0/tests/test_cigs_messages_basic.py +504 -0
  543. htmlgraph-0.27.0/tests/test_cli_output_snapshots.py +158 -0
  544. htmlgraph-0.27.0/tests/test_cli_sdk_parity.py +162 -0
  545. htmlgraph-0.27.0/tests/test_deployment_models.py +310 -0
  546. htmlgraph-0.27.0/tests/test_event_log.py +498 -0
  547. htmlgraph-0.27.0/tests/test_hybrid_event_capture.py +710 -0
  548. htmlgraph-0.27.0/tests/test_orchestrator_config.py +354 -0
  549. htmlgraph-0.27.0/tests/test_orchestrator_validator.py +256 -0
  550. htmlgraph-0.27.0/tests/test_pattern_detector.py +586 -0
  551. htmlgraph-0.27.0/tests/test_sdk_api_surface.py +118 -0
  552. htmlgraph-0.27.0/tests/test_sdk_operations.py +388 -0
  553. htmlgraph-0.27.0/tests/test_transaction_snapshot.py +344 -0
  554. htmlgraph-0.27.0/tests/test_transcript.py +372 -0
@@ -0,0 +1,83 @@
1
+ # Python
2
+ .venv/
3
+ __pycache__/
4
+ *.py[cod]
5
+ *$py.class
6
+ *.so
7
+ .Python
8
+ build/
9
+ develop-eggs/
10
+ dist/
11
+ downloads/
12
+ eggs/
13
+ .eggs/
14
+ lib/
15
+ lib64/
16
+ parts/
17
+ sdist/
18
+ var/
19
+ wheels/
20
+ *.egg-info/
21
+ .installed.cfg
22
+ *.egg
23
+
24
+ # Testing
25
+ .coverage
26
+ .pytest_cache/
27
+ htmlcov/
28
+ tests/benchmarks/baseline.json
29
+
30
+ # Playwright
31
+ .playwright-mcp/
32
+
33
+ # IDE
34
+ .idea/
35
+ .vscode/
36
+ *.swp
37
+ *.swo
38
+ *~
39
+
40
+ # OS
41
+ .DS_Store
42
+ Thumbs.db
43
+
44
+ # Local development
45
+ *.log
46
+
47
+ # HtmlGraph analytics index (rebuildable cache)
48
+ .htmlgraph/index.sqlite
49
+ .htmlgraph/index.sqlite-wal
50
+ .htmlgraph/index.sqlite-shm
51
+
52
+ # HtmlGraph session tracking artifacts (regenerable observability data)
53
+ .htmlgraph/sessions/*.jsonl
54
+ .htmlgraph/events/*.jsonl
55
+ .htmlgraph/parent-activity.json
56
+ .htmlgraph/logs/errors/
57
+
58
+ # HtmlGraph backup and test files
59
+ .htmlgraph/index.sqlite.backup
60
+ .htmlgraph/*.backup
61
+ .htmlgraph/test_*.db
62
+ .htmlgraph/database.db
63
+ .htmlgraph/.htmlgraph/ # Prevent nested structure corruption
64
+
65
+ # Keep these (source of truth):
66
+ # - .htmlgraph/features/
67
+ # - .htmlgraph/bugs/
68
+ # - .htmlgraph/chores/
69
+ # - .htmlgraph/spikes/
70
+ # - .htmlgraph/agents.json
71
+
72
+ .env
73
+
74
+ # MkDocs build output
75
+ site/
76
+
77
+ # pdoc generated documentation
78
+ docs/api-pdoc/
79
+ docs/api/*.html
80
+ docs/api/*.js
81
+
82
+ .contextune/
83
+ .claude/settings.local.json
@@ -0,0 +1,307 @@
1
+ Metadata-Version: 2.4
2
+ Name: htmlgraph
3
+ Version: 0.27.0
4
+ Summary: HTML is All You Need - Graph database on web standards
5
+ Project-URL: Homepage, https://github.com/Shakes-tzd/htmlgraph
6
+ Project-URL: Documentation, https://github.com/Shakes-tzd/htmlgraph#readme
7
+ Project-URL: Repository, https://github.com/Shakes-tzd/htmlgraph
8
+ Project-URL: Issues, https://github.com/Shakes-tzd/htmlgraph/issues
9
+ Author-email: Shakes <shakestzd@gmail.com>
10
+ License: MIT
11
+ Keywords: agents,ai,css,database,graph,html
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Topic :: Database
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ Requires-Python: >=3.10
22
+ Requires-Dist: aiosqlite>=0.19.0
23
+ Requires-Dist: fastapi>=0.104.0
24
+ Requires-Dist: jinja2>=3.1.0
25
+ Requires-Dist: justhtml>=0.6.0
26
+ Requires-Dist: pydantic>=2.0.0
27
+ Requires-Dist: rich>=13.0.0
28
+ Requires-Dist: typing-extensions>=4.0.0; python_version < '3.11'
29
+ Requires-Dist: uvicorn>=0.24.0
30
+ Requires-Dist: watchdog>=3.0.0
31
+ Provides-Extra: deploy
32
+ Requires-Dist: invoke>=2.2.0; extra == 'deploy'
33
+ Provides-Extra: dev
34
+ Requires-Dist: black>=23.0.0; extra == 'dev'
35
+ Requires-Dist: invoke>=2.2.0; extra == 'dev'
36
+ Requires-Dist: mypy>=1.0.0; extra == 'dev'
37
+ Requires-Dist: pdoc>=14.0.0; extra == 'dev'
38
+ Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
39
+ Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
40
+ Requires-Dist: pytest>=7.0.0; extra == 'dev'
41
+ Requires-Dist: pyyaml>=6.0; extra == 'dev'
42
+ Requires-Dist: ruff>=0.1.0; extra == 'dev'
43
+ Requires-Dist: tomli>=2.0.0; (python_version < '3.11') and extra == 'dev'
44
+ Provides-Extra: sqlite
45
+ Requires-Dist: aiosqlite>=0.19.0; extra == 'sqlite'
46
+ Description-Content-Type: text/markdown
47
+
48
+ # HtmlGraph
49
+
50
+ **"HTML is All You Need"**
51
+
52
+ A lightweight graph database framework built entirely on web standards. Use HTML files as nodes, hyperlinks as edges, and CSS selectors as the query language.
53
+
54
+ ## Why HtmlGraph?
55
+
56
+ Modern AI agent systems are drowning in complexity:
57
+ - Neo4j/Memgraph → Docker, JVM, learn Cypher
58
+ - Redis/PostgreSQL → More infrastructure
59
+ - Custom protocols → More learning curves
60
+
61
+ **HtmlGraph uses what you already know:**
62
+ - ✅ HTML files = Graph nodes
63
+ - ✅ `<a href>` = Graph edges
64
+ - ✅ CSS selectors = Query language
65
+ - ✅ Any browser = Visual interface
66
+ - ✅ Git = Version control (diffs work!)
67
+
68
+ ## Installation
69
+
70
+ ```bash
71
+ pip install htmlgraph
72
+ ```
73
+
74
+ ## Quick Start
75
+
76
+ ### CLI (recommended for new projects)
77
+
78
+ ```bash
79
+ htmlgraph init --install-hooks
80
+ htmlgraph serve
81
+ ```
82
+
83
+ This bootstraps:
84
+ - `index.html` dashboard at the project root
85
+ - `.htmlgraph/events/` append-only JSONL event stream (Git-friendly)
86
+ - `.htmlgraph/index.sqlite` analytics cache (rebuildable; gitignored via `.gitignore`)
87
+ - versioned hook scripts under `.htmlgraph/hooks/` (installed into `.git/hooks/` with `--install-hooks`)
88
+
89
+ ### Python (SDK - Recommended)
90
+
91
+ ```python
92
+ from htmlgraph import SDK
93
+
94
+ # Initialize (auto-discovers .htmlgraph directory)
95
+ sdk = SDK(agent="claude")
96
+
97
+ # Create and configure a feature with fluent API
98
+ feature = sdk.features.create("User Authentication") \
99
+ .set_priority("high") \
100
+ .set_description("Implement OAuth 2.0 login") \
101
+ .add_steps([
102
+ "Create login endpoint",
103
+ "Add JWT middleware",
104
+ "Write integration tests"
105
+ ]) \
106
+ .save()
107
+
108
+ print(f"Created: {feature.id}")
109
+
110
+ # Work on features
111
+ with sdk.features.edit(feature.id) as f:
112
+ f.status = "in-progress"
113
+ f.agent_assigned = "claude"
114
+ f.steps[0].completed = True
115
+
116
+ # Query features
117
+ high_priority_todos = sdk.features.where(status="todo", priority="high")
118
+ for feat in high_priority_todos:
119
+ print(f"- {feat.id}: {feat.title}")
120
+
121
+ # Create and configure a track with TrackBuilder
122
+ track = sdk.tracks.builder() \
123
+ .title("Q1 Security Initiative") \
124
+ .priority("high") \
125
+ .add_feature("feature-001") \
126
+ .add_feature("feature-002") \
127
+ .create()
128
+
129
+ print(f"Created track: {track.id}")
130
+ ```
131
+
132
+ ### HTML File Format
133
+
134
+ HtmlGraph nodes are standard HTML files:
135
+
136
+ ```html
137
+ <!DOCTYPE html>
138
+ <html lang="en">
139
+ <head>
140
+ <meta charset="UTF-8">
141
+ <title>User Authentication</title>
142
+ </head>
143
+ <body>
144
+ <article id="feature-001"
145
+ data-type="feature"
146
+ data-status="in-progress"
147
+ data-priority="high">
148
+
149
+ <header>
150
+ <h1>User Authentication</h1>
151
+ </header>
152
+
153
+ <nav data-graph-edges>
154
+ <section data-edge-type="blocked_by">
155
+ <h3>Blocked By:</h3>
156
+ <ul>
157
+ <li><a href="feature-002.html">Database Schema</a></li>
158
+ </ul>
159
+ </section>
160
+ </nav>
161
+
162
+ <section data-steps>
163
+ <h3>Steps</h3>
164
+ <ol>
165
+ <li data-completed="true">✅ Create auth routes</li>
166
+ <li data-completed="false">⏳ Add middleware</li>
167
+ </ol>
168
+ </section>
169
+ </article>
170
+ </body>
171
+ </html>
172
+ ```
173
+
174
+ ## Features
175
+
176
+ - **Zero dependencies** beyond `justhtml` and `pydantic`
177
+ - **CSS selector queries** - no new query language to learn
178
+ - **Version control friendly** - git diff works perfectly
179
+ - **Human readable** - open in any browser
180
+ - **AI agent optimized** - lightweight context generation
181
+ - **Graph algorithms** - BFS, shortest path, cycle detection, topological sort
182
+ - **Agent Handoff** - Context-preserving task transfers between agents
183
+ - **Capability Routing** - Automatic task assignment based on agent skills
184
+ - **Deployment Automation** - One-command releases with version management
185
+ - **Unified Backend** - Operations layer shared by CLI and SDK for consistency
186
+
187
+ ## Modular SDK Architecture
188
+
189
+ The HtmlGraph SDK uses a **modular mixin-based architecture** for maintainability and extensibility. The SDK composes specialized mixins (Analytics, Planning, Session Management, Orchestration, Operations) into a unified interface.
190
+
191
+ **Benefits:**
192
+ - ✅ Small, focused components (100-400 lines each)
193
+ - ✅ Easy to extend with new capabilities
194
+ - ✅ Full type safety and backward compatibility
195
+ - ✅ Lazy loading for fast initialization
196
+
197
+ See [SDK Modular Architecture](docs/SDK_MODULAR_ARCHITECTURE.md) for complete details.
198
+
199
+ ## Orchestrator Architecture: Flexible Multi-Agent Coordination
200
+
201
+ HtmlGraph implements an orchestrator pattern that coordinates multiple AI agents in parallel, preserving context efficiency while maintaining complete flexibility in model selection. Instead of rigid rules, the pattern uses **capability-first thinking** to choose the right tool (and model) for each task.
202
+
203
+ **Key Principles:**
204
+ - ✅ **Flexible model selection** - Any model can do any work; choose based on task fit and cost
205
+ - ✅ **Dynamic spawner composition** - Mix and match spawner types (Gemini, Copilot, Codex, Claude) within the same workflow
206
+ - ✅ **Cost optimization** - Use cheaper models for exploratory work, expensive models only for reasoning
207
+ - ✅ **Parallel execution** - Independent tasks run simultaneously, reducing total time
208
+
209
+ **Example: Parallel Exploration with Multiple Spawners**
210
+
211
+ ```python
212
+ # All run in parallel - each uses the best tool for the job
213
+ Task(subagent_type="gemini-spawner", # FREE exploration
214
+ prompt="Find all authentication patterns in src/auth/")
215
+
216
+ Task(subagent_type="copilot-spawner", # GitHub integration
217
+ prompt="Check GitHub issues related to auth",
218
+ allow_tools=["github(*)"])
219
+
220
+ Task(subagent_type="claude-spawner", # Deep reasoning
221
+ prompt="Analyze auth patterns for security issues")
222
+
223
+ # Orchestrator coordinates, subagents work in parallel
224
+ # Total time = slowest task (not sum of all)
225
+ # Cost = optimized (cheap exploration + expensive reasoning only)
226
+ ```
227
+
228
+ **Spawner Types:**
229
+ - **Gemini Spawner** - FREE exploratory research, batch analysis (2M tokens/min)
230
+ - **Copilot Spawner** - GitHub-integrated workflows, git operations
231
+ - **Codex Spawner** - Code generation, coding completions
232
+ - **Claude Spawner** - Deep reasoning, analysis, strategic planning (any Claude model)
233
+
234
+ → [Complete Orchestrator Architecture Guide](docs/orchestrator-architecture.md) - Detailed patterns, cost optimization, decision framework, and advanced examples
235
+
236
+ ## Comparison
237
+
238
+ | Feature | Neo4j | JSON | HtmlGraph |
239
+ |---------|-------|------|-----------|
240
+ | Setup | Docker + JVM | None | None |
241
+ | Query Language | Cypher | jq | CSS selectors |
242
+ | Human Readable | ❌ Browser needed | 🟡 Text editor | ✅ Any browser |
243
+ | Version Control | ❌ Binary | ✅ JSON diff | ✅ HTML diff |
244
+ | Visual UI | ❌ Separate tool | ❌ Build it | ✅ Built-in |
245
+ | Graph Native | ✅ | ❌ | ✅ |
246
+
247
+ ## Use Cases
248
+
249
+ 1. **AI Agent Coordination** - Task tracking, dependencies, progress
250
+ 2. **Knowledge Bases** - Linked notes with visual navigation
251
+ 3. **Documentation** - Interconnected docs with search
252
+ 4. **Task Management** - Todo lists with dependencies
253
+
254
+ ## Contributing
255
+
256
+ HtmlGraph is developed using HtmlGraph itself (dogfooding). This means:
257
+
258
+ - ✅ Every development action is replicable by users through the package
259
+ - ✅ We use the SDK, CLI, and plugins - not custom scripts
260
+ - ✅ Our development workflow IS the documentation
261
+
262
+ **See [`docs/DEVELOPMENT.md`](docs/DEVELOPMENT.md) for:**
263
+ - Dogfooding principles
264
+ - Replicable workflows
265
+ - Environment setup (PyPI tokens, etc.)
266
+ - Development best practices
267
+
268
+ **Quick start for contributors:**
269
+ ```bash
270
+ # Clone and setup
271
+ git clone https://github.com/Shakes-tzd/htmlgraph
272
+ cd htmlgraph
273
+ uv sync
274
+
275
+ # Start tracking your work (dogfooding!)
276
+ uv run htmlgraph init --install-hooks
277
+ uv run htmlgraph serve # View dashboard
278
+
279
+ # Use SDK for development
280
+ uv run python
281
+ >>> from htmlgraph import SDK
282
+ >>> sdk = SDK(agent="your-name")
283
+ >>> sdk.features.where(status="todo")
284
+ ```
285
+
286
+ ## License
287
+
288
+ MIT
289
+
290
+ ## System Prompt & Delegation Documentation
291
+
292
+ For Claude Code users and teams using HtmlGraph for AI agent coordination:
293
+
294
+ - **[System Prompt Quick Start](docs/SYSTEM_PROMPT_QUICK_START.md)** - Setup your system prompt in 5 minutes (start here!)
295
+ - **[System Prompt Architecture](docs/SYSTEM_PROMPT_ARCHITECTURE.md)** - Technical deep dive + troubleshooting
296
+ - **[Delegation Enforcement Admin Guide](docs/DELEGATION_ENFORCEMENT_ADMIN_GUIDE.md)** - Setup cost-optimal delegation for your team
297
+ - **[System Prompt Developer Guide](docs/SYSTEM_PROMPT_DEVELOPER_GUIDE.md)** - Extend with custom layers, hooks, and skills
298
+
299
+ ## Links
300
+
301
+ - [GitHub](https://github.com/Shakes-tzd/htmlgraph)
302
+ - [API Reference](docs/API_REFERENCE.md) - Complete SDK API documentation
303
+ - [SDK Modular Architecture](docs/SDK_MODULAR_ARCHITECTURE.md) - Modular design guide
304
+ - [Modularization Journey](docs/MODULARIZATION.md) - Refactoring from monolithic to modular
305
+ - [Documentation](docs/) - SDK guide, workflows, development principles
306
+ - [Examples](examples/) - Real-world usage examples
307
+ - [PyPI](https://pypi.org/project/htmlgraph/)
@@ -0,0 +1,260 @@
1
+ # HtmlGraph
2
+
3
+ **"HTML is All You Need"**
4
+
5
+ A lightweight graph database framework built entirely on web standards. Use HTML files as nodes, hyperlinks as edges, and CSS selectors as the query language.
6
+
7
+ ## Why HtmlGraph?
8
+
9
+ Modern AI agent systems are drowning in complexity:
10
+ - Neo4j/Memgraph → Docker, JVM, learn Cypher
11
+ - Redis/PostgreSQL → More infrastructure
12
+ - Custom protocols → More learning curves
13
+
14
+ **HtmlGraph uses what you already know:**
15
+ - ✅ HTML files = Graph nodes
16
+ - ✅ `<a href>` = Graph edges
17
+ - ✅ CSS selectors = Query language
18
+ - ✅ Any browser = Visual interface
19
+ - ✅ Git = Version control (diffs work!)
20
+
21
+ ## Installation
22
+
23
+ ```bash
24
+ pip install htmlgraph
25
+ ```
26
+
27
+ ## Quick Start
28
+
29
+ ### CLI (recommended for new projects)
30
+
31
+ ```bash
32
+ htmlgraph init --install-hooks
33
+ htmlgraph serve
34
+ ```
35
+
36
+ This bootstraps:
37
+ - `index.html` dashboard at the project root
38
+ - `.htmlgraph/events/` append-only JSONL event stream (Git-friendly)
39
+ - `.htmlgraph/index.sqlite` analytics cache (rebuildable; gitignored via `.gitignore`)
40
+ - versioned hook scripts under `.htmlgraph/hooks/` (installed into `.git/hooks/` with `--install-hooks`)
41
+
42
+ ### Python (SDK - Recommended)
43
+
44
+ ```python
45
+ from htmlgraph import SDK
46
+
47
+ # Initialize (auto-discovers .htmlgraph directory)
48
+ sdk = SDK(agent="claude")
49
+
50
+ # Create and configure a feature with fluent API
51
+ feature = sdk.features.create("User Authentication") \
52
+ .set_priority("high") \
53
+ .set_description("Implement OAuth 2.0 login") \
54
+ .add_steps([
55
+ "Create login endpoint",
56
+ "Add JWT middleware",
57
+ "Write integration tests"
58
+ ]) \
59
+ .save()
60
+
61
+ print(f"Created: {feature.id}")
62
+
63
+ # Work on features
64
+ with sdk.features.edit(feature.id) as f:
65
+ f.status = "in-progress"
66
+ f.agent_assigned = "claude"
67
+ f.steps[0].completed = True
68
+
69
+ # Query features
70
+ high_priority_todos = sdk.features.where(status="todo", priority="high")
71
+ for feat in high_priority_todos:
72
+ print(f"- {feat.id}: {feat.title}")
73
+
74
+ # Create and configure a track with TrackBuilder
75
+ track = sdk.tracks.builder() \
76
+ .title("Q1 Security Initiative") \
77
+ .priority("high") \
78
+ .add_feature("feature-001") \
79
+ .add_feature("feature-002") \
80
+ .create()
81
+
82
+ print(f"Created track: {track.id}")
83
+ ```
84
+
85
+ ### HTML File Format
86
+
87
+ HtmlGraph nodes are standard HTML files:
88
+
89
+ ```html
90
+ <!DOCTYPE html>
91
+ <html lang="en">
92
+ <head>
93
+ <meta charset="UTF-8">
94
+ <title>User Authentication</title>
95
+ </head>
96
+ <body>
97
+ <article id="feature-001"
98
+ data-type="feature"
99
+ data-status="in-progress"
100
+ data-priority="high">
101
+
102
+ <header>
103
+ <h1>User Authentication</h1>
104
+ </header>
105
+
106
+ <nav data-graph-edges>
107
+ <section data-edge-type="blocked_by">
108
+ <h3>Blocked By:</h3>
109
+ <ul>
110
+ <li><a href="feature-002.html">Database Schema</a></li>
111
+ </ul>
112
+ </section>
113
+ </nav>
114
+
115
+ <section data-steps>
116
+ <h3>Steps</h3>
117
+ <ol>
118
+ <li data-completed="true">✅ Create auth routes</li>
119
+ <li data-completed="false">⏳ Add middleware</li>
120
+ </ol>
121
+ </section>
122
+ </article>
123
+ </body>
124
+ </html>
125
+ ```
126
+
127
+ ## Features
128
+
129
+ - **Zero dependencies** beyond `justhtml` and `pydantic`
130
+ - **CSS selector queries** - no new query language to learn
131
+ - **Version control friendly** - git diff works perfectly
132
+ - **Human readable** - open in any browser
133
+ - **AI agent optimized** - lightweight context generation
134
+ - **Graph algorithms** - BFS, shortest path, cycle detection, topological sort
135
+ - **Agent Handoff** - Context-preserving task transfers between agents
136
+ - **Capability Routing** - Automatic task assignment based on agent skills
137
+ - **Deployment Automation** - One-command releases with version management
138
+ - **Unified Backend** - Operations layer shared by CLI and SDK for consistency
139
+
140
+ ## Modular SDK Architecture
141
+
142
+ The HtmlGraph SDK uses a **modular mixin-based architecture** for maintainability and extensibility. The SDK composes specialized mixins (Analytics, Planning, Session Management, Orchestration, Operations) into a unified interface.
143
+
144
+ **Benefits:**
145
+ - ✅ Small, focused components (100-400 lines each)
146
+ - ✅ Easy to extend with new capabilities
147
+ - ✅ Full type safety and backward compatibility
148
+ - ✅ Lazy loading for fast initialization
149
+
150
+ See [SDK Modular Architecture](docs/SDK_MODULAR_ARCHITECTURE.md) for complete details.
151
+
152
+ ## Orchestrator Architecture: Flexible Multi-Agent Coordination
153
+
154
+ HtmlGraph implements an orchestrator pattern that coordinates multiple AI agents in parallel, preserving context efficiency while maintaining complete flexibility in model selection. Instead of rigid rules, the pattern uses **capability-first thinking** to choose the right tool (and model) for each task.
155
+
156
+ **Key Principles:**
157
+ - ✅ **Flexible model selection** - Any model can do any work; choose based on task fit and cost
158
+ - ✅ **Dynamic spawner composition** - Mix and match spawner types (Gemini, Copilot, Codex, Claude) within the same workflow
159
+ - ✅ **Cost optimization** - Use cheaper models for exploratory work, expensive models only for reasoning
160
+ - ✅ **Parallel execution** - Independent tasks run simultaneously, reducing total time
161
+
162
+ **Example: Parallel Exploration with Multiple Spawners**
163
+
164
+ ```python
165
+ # All run in parallel - each uses the best tool for the job
166
+ Task(subagent_type="gemini-spawner", # FREE exploration
167
+ prompt="Find all authentication patterns in src/auth/")
168
+
169
+ Task(subagent_type="copilot-spawner", # GitHub integration
170
+ prompt="Check GitHub issues related to auth",
171
+ allow_tools=["github(*)"])
172
+
173
+ Task(subagent_type="claude-spawner", # Deep reasoning
174
+ prompt="Analyze auth patterns for security issues")
175
+
176
+ # Orchestrator coordinates, subagents work in parallel
177
+ # Total time = slowest task (not sum of all)
178
+ # Cost = optimized (cheap exploration + expensive reasoning only)
179
+ ```
180
+
181
+ **Spawner Types:**
182
+ - **Gemini Spawner** - FREE exploratory research, batch analysis (2M tokens/min)
183
+ - **Copilot Spawner** - GitHub-integrated workflows, git operations
184
+ - **Codex Spawner** - Code generation, coding completions
185
+ - **Claude Spawner** - Deep reasoning, analysis, strategic planning (any Claude model)
186
+
187
+ → [Complete Orchestrator Architecture Guide](docs/orchestrator-architecture.md) - Detailed patterns, cost optimization, decision framework, and advanced examples
188
+
189
+ ## Comparison
190
+
191
+ | Feature | Neo4j | JSON | HtmlGraph |
192
+ |---------|-------|------|-----------|
193
+ | Setup | Docker + JVM | None | None |
194
+ | Query Language | Cypher | jq | CSS selectors |
195
+ | Human Readable | ❌ Browser needed | 🟡 Text editor | ✅ Any browser |
196
+ | Version Control | ❌ Binary | ✅ JSON diff | ✅ HTML diff |
197
+ | Visual UI | ❌ Separate tool | ❌ Build it | ✅ Built-in |
198
+ | Graph Native | ✅ | ❌ | ✅ |
199
+
200
+ ## Use Cases
201
+
202
+ 1. **AI Agent Coordination** - Task tracking, dependencies, progress
203
+ 2. **Knowledge Bases** - Linked notes with visual navigation
204
+ 3. **Documentation** - Interconnected docs with search
205
+ 4. **Task Management** - Todo lists with dependencies
206
+
207
+ ## Contributing
208
+
209
+ HtmlGraph is developed using HtmlGraph itself (dogfooding). This means:
210
+
211
+ - ✅ Every development action is replicable by users through the package
212
+ - ✅ We use the SDK, CLI, and plugins - not custom scripts
213
+ - ✅ Our development workflow IS the documentation
214
+
215
+ **See [`docs/DEVELOPMENT.md`](docs/DEVELOPMENT.md) for:**
216
+ - Dogfooding principles
217
+ - Replicable workflows
218
+ - Environment setup (PyPI tokens, etc.)
219
+ - Development best practices
220
+
221
+ **Quick start for contributors:**
222
+ ```bash
223
+ # Clone and setup
224
+ git clone https://github.com/Shakes-tzd/htmlgraph
225
+ cd htmlgraph
226
+ uv sync
227
+
228
+ # Start tracking your work (dogfooding!)
229
+ uv run htmlgraph init --install-hooks
230
+ uv run htmlgraph serve # View dashboard
231
+
232
+ # Use SDK for development
233
+ uv run python
234
+ >>> from htmlgraph import SDK
235
+ >>> sdk = SDK(agent="your-name")
236
+ >>> sdk.features.where(status="todo")
237
+ ```
238
+
239
+ ## License
240
+
241
+ MIT
242
+
243
+ ## System Prompt & Delegation Documentation
244
+
245
+ For Claude Code users and teams using HtmlGraph for AI agent coordination:
246
+
247
+ - **[System Prompt Quick Start](docs/SYSTEM_PROMPT_QUICK_START.md)** - Setup your system prompt in 5 minutes (start here!)
248
+ - **[System Prompt Architecture](docs/SYSTEM_PROMPT_ARCHITECTURE.md)** - Technical deep dive + troubleshooting
249
+ - **[Delegation Enforcement Admin Guide](docs/DELEGATION_ENFORCEMENT_ADMIN_GUIDE.md)** - Setup cost-optimal delegation for your team
250
+ - **[System Prompt Developer Guide](docs/SYSTEM_PROMPT_DEVELOPER_GUIDE.md)** - Extend with custom layers, hooks, and skills
251
+
252
+ ## Links
253
+
254
+ - [GitHub](https://github.com/Shakes-tzd/htmlgraph)
255
+ - [API Reference](docs/API_REFERENCE.md) - Complete SDK API documentation
256
+ - [SDK Modular Architecture](docs/SDK_MODULAR_ARCHITECTURE.md) - Modular design guide
257
+ - [Modularization Journey](docs/MODULARIZATION.md) - Refactoring from monolithic to modular
258
+ - [Documentation](docs/) - SDK guide, workflows, development principles
259
+ - [Examples](examples/) - Real-world usage examples
260
+ - [PyPI](https://pypi.org/project/htmlgraph/)