groundworkers 0.7.0__tar.gz → 0.8.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 (314) hide show
  1. {groundworkers-0.7.0 → groundworkers-0.8.0}/.github/workflows/ci.yml +47 -1
  2. {groundworkers-0.7.0 → groundworkers-0.8.0}/PKG-INFO +1 -1
  3. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/concepts.md +38 -17
  4. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/development/plugins.md +19 -0
  5. groundworkers-0.8.0/docs/development/standard-resolution-packs.md +133 -0
  6. groundworkers-0.8.0/docs/from-scratch.md +150 -0
  7. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/index.md +4 -0
  8. groundworkers-0.8.0/docs/plugins.md +95 -0
  9. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/tools/concept.md +3 -2
  10. groundworkers-0.8.0/docs/usage/configuration.md +382 -0
  11. groundworkers-0.8.0/docs/usage/prompt-handling.md +79 -0
  12. groundworkers-0.8.0/docs/usage/testing.md +45 -0
  13. {groundworkers-0.7.0 → groundworkers-0.8.0}/mkdocs.yaml +2 -0
  14. {groundworkers-0.7.0 → groundworkers-0.8.0}/pyproject.toml +3 -0
  15. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/adapters/omop_graph.py +3 -0
  16. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/config/predicate_mapping.csv +18 -18
  17. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/plugins.py +116 -2
  18. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/server.py +88 -4
  19. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/source_planning/assisted.py +5 -1
  20. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tools/concept_tools.py +17 -6
  21. groundworkers-0.8.0/tests/conftest.py +114 -0
  22. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/integration/test_omop_emb_adapter.py +6 -4
  23. groundworkers-0.8.0/tests/integration/test_omop_emb_contract.py +147 -0
  24. groundworkers-0.8.0/tests/integration/test_omop_graph_adapter.py +356 -0
  25. groundworkers-0.8.0/tests/integration/test_omop_postgres_runtime.py +209 -0
  26. groundworkers-0.8.0/tests/support/embedding_contract_fixture.py +55 -0
  27. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/support/seed_postgres_fixture.py +27 -2
  28. groundworkers-0.8.0/tests/support/wheel_smoke.py +93 -0
  29. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/test_rest_api.py +33 -0
  30. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_omop_graph_adapter.py +18 -0
  31. groundworkers-0.8.0/tests/unit/test_plugin_lint_cli.py +160 -0
  32. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_plugins.py +130 -2
  33. groundworkers-0.8.0/tests/unit/test_predicate_mapping_classification.py +44 -0
  34. groundworkers-0.8.0/tests/unit/test_required_integration_preflight.py +80 -0
  35. groundworkers-0.8.0/tests/unit/test_required_test_gate.py +16 -0
  36. groundworkers-0.8.0/tests/unit/test_source_planning_assisted_classifier.py +200 -0
  37. groundworkers-0.8.0/tests/unit/test_source_planning_document_formats.py +200 -0
  38. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_source_planning_tools.py +36 -0
  39. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_tui_app.py +14 -2
  40. {groundworkers-0.7.0 → groundworkers-0.8.0}/uv.lock +3 -3
  41. groundworkers-0.7.0/docs/from-scratch.md +0 -134
  42. groundworkers-0.7.0/docs/usage/configuration.md +0 -354
  43. groundworkers-0.7.0/docs/usage/testing.md +0 -34
  44. groundworkers-0.7.0/tests/conftest.py +0 -33
  45. groundworkers-0.7.0/tests/integration/test_omop_graph_adapter.py +0 -430
  46. {groundworkers-0.7.0 → groundworkers-0.8.0}/.githooks/pre-commit +0 -0
  47. {groundworkers-0.7.0 → groundworkers-0.8.0}/.github/CONTRIBUTING.md +0 -0
  48. {groundworkers-0.7.0 → groundworkers-0.8.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  49. {groundworkers-0.7.0 → groundworkers-0.8.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  50. {groundworkers-0.7.0 → groundworkers-0.8.0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  51. {groundworkers-0.7.0 → groundworkers-0.8.0}/.github/ISSUE_TEMPLATE/not_working.yml +0 -0
  52. {groundworkers-0.7.0 → groundworkers-0.8.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  53. {groundworkers-0.7.0 → groundworkers-0.8.0}/.github/release-drafter.yml +0 -0
  54. {groundworkers-0.7.0 → groundworkers-0.8.0}/.github/workflows/docs.yml +0 -0
  55. {groundworkers-0.7.0 → groundworkers-0.8.0}/.github/workflows/merge.yml +0 -0
  56. {groundworkers-0.7.0 → groundworkers-0.8.0}/.github/workflows/publish.yml +0 -0
  57. {groundworkers-0.7.0 → groundworkers-0.8.0}/.gitignore +0 -0
  58. {groundworkers-0.7.0 → groundworkers-0.8.0}/.python-version +0 -0
  59. {groundworkers-0.7.0 → groundworkers-0.8.0}/CHANGELOG.md +0 -0
  60. {groundworkers-0.7.0 → groundworkers-0.8.0}/Makefile +0 -0
  61. {groundworkers-0.7.0 → groundworkers-0.8.0}/README.md +0 -0
  62. {groundworkers-0.7.0 → groundworkers-0.8.0}/config/docker-compose.yaml +0 -0
  63. {groundworkers-0.7.0 → groundworkers-0.8.0}/config/groundworkers.example.toml +0 -0
  64. {groundworkers-0.7.0 → groundworkers-0.8.0}/config/groundworkers_db.env +0 -0
  65. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/adapters/cdm.md +0 -0
  66. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/adapters/omop_emb.md +0 -0
  67. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/adapters/omop_graph.md +0 -0
  68. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/architecture.md +0 -0
  69. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/development/extending.md +0 -0
  70. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/development/integration.md +0 -0
  71. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/js/mermaid-init.js +0 -0
  72. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/reference/ref_adapters.md +0 -0
  73. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/reference/ref_base.md +0 -0
  74. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/reference/ref_config.md +0 -0
  75. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/reference/ref_services.md +0 -0
  76. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/reference/ref_tools.md +0 -0
  77. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/services/domain.md +0 -0
  78. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/services/graph.md +0 -0
  79. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/services/grounding.md +0 -0
  80. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/services/mapping.md +0 -0
  81. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/services/semantic_projection.md +0 -0
  82. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/services/source_planning.md +0 -0
  83. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/services/text.md +0 -0
  84. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/services/vocab.md +0 -0
  85. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/static/01_create_config.png +0 -0
  86. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/static/02_empty_config.png +0 -0
  87. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/static/03_config_wizard.png +0 -0
  88. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/static/04_test_cnx.png +0 -0
  89. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/static/04_warnings.png +0 -0
  90. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/static/05_graph_setup.png +0 -0
  91. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/static/06_load_predicates.png +0 -0
  92. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/static/07_vector_store.png +0 -0
  93. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/static/08_register_embedding.png +0 -0
  94. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/static/10_setup_complete.png +0 -0
  95. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/tools/domain.md +0 -0
  96. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/tools/embedding.md +0 -0
  97. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/tools/knowledge.md +0 -0
  98. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/tools/mapping.md +0 -0
  99. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/tools/overview.md +0 -0
  100. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/tools/resolver.md +0 -0
  101. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/tools/search.md +0 -0
  102. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/tools/semantic_projection.md +0 -0
  103. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/tools/source_planning.md +0 -0
  104. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/tools/system.md +0 -0
  105. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/tools/text.md +0 -0
  106. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/usage/installation.md +0 -0
  107. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/usage/integrations.md +0 -0
  108. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/usage/setup_journey.md +0 -0
  109. {groundworkers-0.7.0 → groundworkers-0.8.0}/docs/usage/upgrading-from-0.6.md +0 -0
  110. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/__init__.py +0 -0
  111. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/_env.py +0 -0
  112. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/adapters/__init__.py +0 -0
  113. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/adapters/cdm.py +0 -0
  114. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/adapters/llm.py +0 -0
  115. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/adapters/omop_emb.py +0 -0
  116. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/app.py +0 -0
  117. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/application/__init__.py +0 -0
  118. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/application/setup/__init__.py +0 -0
  119. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/application/setup/configuration.py +0 -0
  120. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/application/setup/configuration_provider.py +0 -0
  121. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/application/setup/databases.py +0 -0
  122. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/application/setup/embedding_artifacts.py +0 -0
  123. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/application/setup/embedding_capability.py +0 -0
  124. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/application/setup/embedding_coverage.py +0 -0
  125. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/application/setup/embedding_population.py +0 -0
  126. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/application/setup/embedding_reconciliation.py +0 -0
  127. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/application/setup/embedding_registry.py +0 -0
  128. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/application/setup/embedding_setup.py +0 -0
  129. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/application/setup/graph_maintenance.py +0 -0
  130. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/application/setup/integration.py +0 -0
  131. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/application/setup/maintenance_runs.py +0 -0
  132. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/application/setup/model_inventory.py +0 -0
  133. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/application/setup/models.py +0 -0
  134. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/application/setup/performance_maintenance.py +0 -0
  135. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/application/setup/plugin_configuration.py +0 -0
  136. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/application/setup/runtime_setup.py +0 -0
  137. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/base/__init__.py +0 -0
  138. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/base/concept_payload.py +0 -0
  139. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/base/domain_names.py +0 -0
  140. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/base/errors.py +0 -0
  141. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/base/results.py +0 -0
  142. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/base/server.py +0 -0
  143. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/base/sql.py +0 -0
  144. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/bootstrap.py +0 -0
  145. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/config/README +0 -0
  146. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/config/predicate_classification.csv +0 -0
  147. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/config.py +0 -0
  148. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/knowledge/packs/core/criteria-gate-yesno/guidance.md +0 -0
  149. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/knowledge/packs/core/criteria-gate-yesno/manifest.yaml +0 -0
  150. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/knowledge/packs/core/diagnosis-role-modifier/guidance.md +0 -0
  151. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/knowledge/packs/core/diagnosis-role-modifier/manifest.yaml +0 -0
  152. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/knowledge/packs/core/domain-routing/guidance.md +0 -0
  153. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/knowledge/packs/core/domain-routing/manifest.yaml +0 -0
  154. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/knowledge/packs/core/domain-routing/rules.yaml +0 -0
  155. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/knowledge/packs/core/drug-concept-granularity/guidance.md +0 -0
  156. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/knowledge/packs/core/drug-concept-granularity/manifest.yaml +0 -0
  157. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/knowledge/packs/core/drug-concept-granularity/rules.yaml +0 -0
  158. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/knowledge/packs/core/history-of-event/guidance.md +0 -0
  159. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/knowledge/packs/core/history-of-event/manifest.yaml +0 -0
  160. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/knowledge/packs/core/standard-concept-preference/guidance.md +0 -0
  161. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/knowledge/packs/core/standard-concept-preference/manifest.yaml +0 -0
  162. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/knowledge/packs/core/standard-concept-preference/rules.yaml +0 -0
  163. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/__init__.py +0 -0
  164. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/domain.py +0 -0
  165. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/graph.py +0 -0
  166. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/grounding.py +0 -0
  167. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/knowledge/__init__.py +0 -0
  168. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/knowledge/catalogue.py +0 -0
  169. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/knowledge/models.py +0 -0
  170. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/mapping.py +0 -0
  171. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/semantic_projection/__init__.py +0 -0
  172. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/semantic_projection/definitions.py +0 -0
  173. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/semantic_projection/models.py +0 -0
  174. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/semantic_projection/service.py +0 -0
  175. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/source_planning/__init__.py +0 -0
  176. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/source_planning/canonical_headers.py +0 -0
  177. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/source_planning/classifier.py +0 -0
  178. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/source_planning/decomposer.py +0 -0
  179. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/source_planning/decomposers/__init__.py +0 -0
  180. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/source_planning/decomposers/csv_.py +0 -0
  181. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/source_planning/decomposers/ddl_.py +0 -0
  182. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/source_planning/decomposers/docx_.py +0 -0
  183. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/source_planning/decomposers/json_.py +0 -0
  184. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/source_planning/decomposers/pdf_.py +0 -0
  185. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/source_planning/decomposers/xlsx_.py +0 -0
  186. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/source_planning/decomposers/xml_.py +0 -0
  187. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/source_planning/detector.py +0 -0
  188. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/source_planning/models.py +0 -0
  189. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/source_planning/normalisation.py +0 -0
  190. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/source_planning/provenance.py +0 -0
  191. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/source_planning/router.py +0 -0
  192. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/source_planning/serialisation.py +0 -0
  193. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/source_planning/service.py +0 -0
  194. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/source_planning/source_profiles/__init__.py +0 -0
  195. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/source_planning/source_profiles/base.py +0 -0
  196. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/source_planning/source_profiles/redcap.py +0 -0
  197. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/source_planning/source_profiles/registry.py +0 -0
  198. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/source_planning/warnings.py +0 -0
  199. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/text/__init__.py +0 -0
  200. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/text/models.py +0 -0
  201. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/text/prompts.py +0 -0
  202. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/text/service.py +0 -0
  203. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/services/vocab.py +0 -0
  204. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tools/__init__.py +0 -0
  205. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tools/domain_tools.py +0 -0
  206. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tools/embedding_tools.py +0 -0
  207. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tools/knowledge_tools.py +0 -0
  208. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tools/mapping_tools.py +0 -0
  209. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tools/resolver_tools.py +0 -0
  210. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tools/search_tools.py +0 -0
  211. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tools/semantic_projection_tools.py +0 -0
  212. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tools/source_planning_tools.py +0 -0
  213. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tools/system_tools.py +0 -0
  214. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tools/text_tools.py +0 -0
  215. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/transports/__init__.py +0 -0
  216. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/transports/rest/__init__.py +0 -0
  217. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/transports/rest/api.py +0 -0
  218. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/transports/rest/models.py +0 -0
  219. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tui/__init__.py +0 -0
  220. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tui/app.py +0 -0
  221. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tui/pages/__init__.py +0 -0
  222. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tui/pages/base.py +0 -0
  223. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tui/pages/plugin_config.py +0 -0
  224. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tui/pages/plugin_setup.py +0 -0
  225. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tui/pages/setup.py +0 -0
  226. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tui/presenters/__init__.py +0 -0
  227. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tui/presenters/base.py +0 -0
  228. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tui/presenters/chat.py +0 -0
  229. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tui/presenters/configuration.py +0 -0
  230. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tui/presenters/database.py +0 -0
  231. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tui/presenters/embeddings.py +0 -0
  232. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tui/presenters/graph.py +0 -0
  233. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tui/presenters/llm_provider.py +0 -0
  234. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tui/presenters/overview.py +0 -0
  235. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tui/presenters/performance.py +0 -0
  236. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tui/presenters/runs.py +0 -0
  237. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tui/routes.py +0 -0
  238. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tui/state.py +0 -0
  239. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tui/wizards/__init__.py +0 -0
  240. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tui/wizards/config_location.py +0 -0
  241. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tui/wizards/embedding_store.py +0 -0
  242. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tui/wizards/embeddings.py +0 -0
  243. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tui/wizards/graph_maintenance.py +0 -0
  244. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tui/wizards/performance_maintenance.py +0 -0
  245. {groundworkers-0.7.0 → groundworkers-0.8.0}/src/groundworkers/tui/wizards/plugin_setup.py +0 -0
  246. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/__init__.py +0 -0
  247. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/integration/__init__.py +0 -0
  248. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/support/__init__.py +0 -0
  249. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/support/omop.py +0 -0
  250. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/support/postgres_ci_config.toml +0 -0
  251. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/support/stack_config.py +0 -0
  252. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/test_bootstrap_config.py +0 -0
  253. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/test_server_registry.py +0 -0
  254. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/__init__.py +0 -0
  255. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_concept_payload.py +0 -0
  256. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_concept_tools.py +0 -0
  257. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_config_location_wizard.py +0 -0
  258. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_configuration_provider.py +0 -0
  259. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_domain_names.py +0 -0
  260. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_domain_tools.py +0 -0
  261. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_embedding_population_scope.py +0 -0
  262. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_embedding_reconciliation.py +0 -0
  263. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_embedding_registry_step.py +0 -0
  264. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_embedding_tools.py +0 -0
  265. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_env_bootstrap.py +0 -0
  266. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_error_boundary.py +0 -0
  267. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_graph_maintenance.py +0 -0
  268. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_graph_maintenance_wizard.py +0 -0
  269. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_graph_service.py +0 -0
  270. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_graph_status.py +0 -0
  271. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_grounding_constraints.py +0 -0
  272. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_grounding_service.py +0 -0
  273. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_knowledge_catalogue.py +0 -0
  274. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_llm_adapter.py +0 -0
  275. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_maintenance_runs_phase2.py +0 -0
  276. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_mapping_context.py +0 -0
  277. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_mapping_service.py +0 -0
  278. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_mapping_tools.py +0 -0
  279. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_migration_boundaries.py +0 -0
  280. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_normalized_index.py +0 -0
  281. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_omop_emb_adapter.py +0 -0
  282. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_omop_emb_setup_config.py +0 -0
  283. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_performance.py +0 -0
  284. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_performance_maintenance_wizard.py +0 -0
  285. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_phase3_overview.py +0 -0
  286. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_plugin_configuration.py +0 -0
  287. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_provider_fields.py +0 -0
  288. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_schema_resolution.py +0 -0
  289. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_semantic_projection_service.py +0 -0
  290. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_semantic_projection_tools.py +0 -0
  291. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_setup_artifacts_and_coverage.py +0 -0
  292. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_setup_configuration.py +0 -0
  293. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_setup_configuration_section.py +0 -0
  294. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_setup_databases.py +0 -0
  295. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_setup_embeddings.py +0 -0
  296. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_setup_provider_conformance.py +0 -0
  297. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_setup_runtime.py +0 -0
  298. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_setup_truth.py +0 -0
  299. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_setup_write_flows.py +0 -0
  300. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_source_planning_classifier.py +0 -0
  301. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_source_planning_decomposer.py +0 -0
  302. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_source_planning_detector.py +0 -0
  303. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_source_planning_models.py +0 -0
  304. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_source_planning_normalisation.py +0 -0
  305. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_source_planning_router.py +0 -0
  306. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_source_planning_service.py +0 -0
  307. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_split_classified_edges.py +0 -0
  308. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_stack_config_fixtures.py +0 -0
  309. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_system_tools.py +0 -0
  310. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_text_service.py +0 -0
  311. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_text_tools.py +0 -0
  312. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_tui_state.py +0 -0
  313. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_vector_store_setup.py +0 -0
  314. {groundworkers-0.7.0 → groundworkers-0.8.0}/tests/unit/test_vocab_service.py +0 -0
@@ -35,7 +35,7 @@ jobs:
35
35
  --password postgres \
36
36
  --database-name test_db \
37
37
  --test-only false
38
- uv run omop-config databases add cdm test_cdm_db --connection pg_test --cdm-schema public
38
+ uv run omop-config databases add cdm test_cdm_db --connection pg_test --cdm-schema gw_primary --vocab-schema gw_vocab
39
39
  uv run omop-config databases add generic test_vector_db --connection pg_test --schema-name embeddings
40
40
  uv run omop-config vector-stores add test_embeddings \
41
41
  --backend-type pgvector \
@@ -44,3 +44,49 @@ jobs:
44
44
  --cdm-db test_cdm_db \
45
45
  --vector-store-name test_embeddings
46
46
  uv run python -m tests.support.seed_postgres_fixture
47
+ test-evidence:
48
+ runs-on: ubuntu-latest
49
+ steps:
50
+ - uses: actions/checkout@v4
51
+ - uses: actions/setup-python@v5
52
+ with:
53
+ python-version: "3.12"
54
+ - uses: astral-sh/setup-uv@v6
55
+ - name: Run hermetic suite with coverage and skip reasons
56
+ run: |
57
+ uv sync --frozen --all-extras --dev
58
+ export GROUNDWORKERS_REQUIRE_FORMAT_TESTS=1
59
+ echo "GROUNDWORKERS_REQUIRE_FORMAT_TESTS=1" >> "$GITHUB_ENV"
60
+ COVERAGE_FILE="$RUNNER_TEMP/groundworkers.coverage" uv run pytest -q -ra \
61
+ --cov=groundworkers --cov-branch \
62
+ --cov-report=xml:"$RUNNER_TEMP/coverage.xml" \
63
+ --junitxml="$RUNNER_TEMP/pytest.xml"
64
+ - uses: actions/upload-artifact@v4
65
+ if: always()
66
+ with:
67
+ name: groundworkers-test-evidence
68
+ path: |
69
+ ${{ runner.temp }}/coverage.xml
70
+ ${{ runner.temp }}/pytest.xml
71
+ if-no-files-found: warn
72
+ wheel-smoke:
73
+ runs-on: ubuntu-latest
74
+ steps:
75
+ - uses: actions/checkout@v4
76
+ - uses: actions/setup-python@v5
77
+ with:
78
+ python-version: "3.12"
79
+ - uses: astral-sh/setup-uv@v6
80
+ - name: Build and smoke-test base and optional wheel installs
81
+ run: |
82
+ uv build --wheel
83
+ wheel="$(find dist -maxdepth 1 -name '*.whl' -print -quit)"
84
+ wheel="$(pwd)/$wheel"
85
+ uv venv "$RUNNER_TEMP/gw-wheel-base" --python 3.12
86
+ uv pip install --python "$RUNNER_TEMP/gw-wheel-base/bin/python" "$wheel"
87
+ mkdir -p "$RUNNER_TEMP/gw-wheel-run"
88
+ cd "$RUNNER_TEMP/gw-wheel-run"
89
+ "$RUNNER_TEMP/gw-wheel-base/bin/python" "$GITHUB_WORKSPACE/tests/support/wheel_smoke.py" base
90
+ uv venv "$RUNNER_TEMP/gw-wheel-extras" --python 3.12
91
+ uv pip install --python "$RUNNER_TEMP/gw-wheel-extras/bin/python" "$wheel[all_source,tui]" httpx
92
+ "$RUNNER_TEMP/gw-wheel-extras/bin/python" "$GITHUB_WORKSPACE/tests/support/wheel_smoke.py" extras
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: groundworkers
3
- Version: 0.7.0
3
+ Version: 0.8.0
4
4
  Summary: Groundworkers MCP server — read-only agentive access to OMOP vocabularies, concept graphs, and embeddings.
5
5
  Requires-Python: >=3.12
6
6
  Requires-Dist: fastapi<1.0,>=0.110
@@ -1,25 +1,21 @@
1
1
  # Concepts and capability choices
2
2
 
3
- Groundworkers is a read-only capability layer for working with OMOP vocabularies and source metadata. It combines deterministic vocabulary and graph operations with optional retrieval and model-assisted steps, then makes those capabilities available through MCP, REST, or direct Python.
3
+ Groundworkers provides read-only tools for working with OMOP vocabularies and source metadata. It combines deterministic vocabulary and graph operations with optional retrieval and model-assisted steps, available through MCP, REST, or direct Python.
4
4
 
5
- The important distinction is between the work a capability performs and the transport used to call it. MCP, REST, and Python use the same runtime and, where a service exists, the same service implementation.
5
+ MCP, REST, and Python are different ways to call the same runtime. Where a service exists, they share its implementation.
6
6
 
7
7
  ## The main workflow
8
8
 
9
- Most mapping-oriented work follows this shape:
9
+ Mapping usually starts with source text or fields. Text preparation or domain classification can help narrow the search. Retrieval finds candidate concepts; grounding tries to resolve the input using ranked rules. Mapping brings the candidates, evidence, and graph context together for a caller or reviewer to choose a mapping. Optional semantic projection then uses the grounded concept and source context to produce CDM rows.
10
10
 
11
11
  ```mermaid
12
- flowchart LR
13
- SOURCE[Source text or fields] --> PREP[Optional text or domain preparation]
14
- PREP --> RETRIEVE[Retrieve OMOP candidates]
15
- RETRIEVE --> GROUND[Ground or assemble evidence]
16
- GROUND --> REVIEW[Caller or reviewer selects a mapping]
17
- REVIEW --> CONTEXT[Add graph and mapping context]
18
- CONTEXT --> PROJECT[Optional semantic projection]
12
+ flowchart TD
13
+ SOURCE["Source text or fields"] -->|Retrieval and grounding| CANDIDATES["Candidate concepts and evidence"]
14
+ CANDIDATES -->|Caller or reviewer chooses| SELECTED["Selected concept or concepts"]
15
+ SELECTED -. Optional semantic projection .-> ROWS["CDM rows"]
16
+ SOURCE -. Source context .-> ROWS
19
17
  ```
20
18
 
21
- These stages are deliberately separate. Retrieval produces candidates; grounding applies a ranked resolution policy; mapping gathers evidence and context for a decision; semantic projection turns an already-grounded concept plus source context into CDM rows.
22
-
23
19
  ## Grounding, mapping, and retrieval
24
20
 
25
21
  ### Retrieval
@@ -37,15 +33,34 @@ Use the search tools when you want to choose the strategy yourself and inspect i
37
33
 
38
34
  Grounding is a ranked, policy-driven attempt to resolve free text to concepts. `concept_ground` runs its configured tiers in order and stops at the first tier that produces results. It reports the matched tier and whether embedding retrieval was used. Domain, vocabulary, ancestry, standardness, and activity constraints narrow the search.
39
35
 
36
+ ```mermaid
37
+ flowchart TD
38
+ INPUT["Text and constraints"] --> SEARCH["Search the next configured tier"]
39
+ SEARCH --> MATCH{"Any matches?"}
40
+ MATCH -->|Yes: stop searching| RESULT["Return candidates<br/>and the matched tier"]
41
+ MATCH -->|No| MORE{"More tiers?"}
42
+ MORE -->|Yes| SEARCH
43
+ MORE -->|No| EMPTY["Return no candidates"]
44
+ ```
45
+
40
46
  Grounding is not proof that the first result is the correct mapping. A caller that needs reviewable evidence should use `concept_candidate_bundle`, inspect the candidate union, and add `concept_mapping_context` for the selected concept.
41
47
 
42
48
  ### Mapping
43
49
 
44
50
  Mapping is the broader decision workflow around a source term. Mapping tools combine retrieval channels, navigate non-standard concepts to standard targets, find broader standard ancestors, assemble graph context, follow `Maps to value` relationships, and evaluate predictions against references. They are useful when the caller must preserve evidence or ask a human or another model to make the final choice.
45
51
 
52
+ ```mermaid
53
+ flowchart TD
54
+ CANDIDATES["Candidates from<br/>multiple searches"] --> REVIEW["Caller or reviewer<br/>assesses the evidence"]
55
+ SOURCE["Source meaning<br/>and domain rules"] --> REVIEW
56
+ GRAPH["Standard targets<br/>and graph context"] --> REVIEW
57
+ REVIEW --> DECISION["Mapping to one or more concepts<br/>with supporting evidence"]
58
+ REVIEW -->|Insufficient evidence| OPEN["Leave unresolved"]
59
+ ```
60
+
46
61
  ## Deterministic and model-assisted capabilities
47
62
 
48
- Groundworkers does not treat every capability as an LLM task.
63
+ Most vocabulary and graph operations run without an LLM. Some text preparation and classification tasks use a configured model.
49
64
 
50
65
  | Capability | Deterministic? | Additional infrastructure |
51
66
  |---|---:|---|
@@ -63,15 +78,21 @@ An embedding model and a chat model are separate configuration references. A dep
63
78
 
64
79
  ## Source planning and knowledge packs
65
80
 
66
- Source planning is stateless analysis before ingestion. It decomposes an input artifact, normalizes its structure, annotates columns, and returns neutral planning artifacts such as column roles, domain hints, warnings, and an ingestion strategy. It does not own session state or decide how a particular orchestration job is persisted. `groundcrew` is one consumer of this worker-side capability.
81
+ Source planning analyses an input before ingestion. It decomposes the input, normalizes its structure, annotates columns, and returns results such as column roles, domain hints, warnings, and an ingestion strategy. The caller manages session state and job persistence. `groundcrew` uses this capability.
67
82
 
68
- The deterministic `source_plan` path uses format and header evidence. `source_plan_assisted` is an explicit second step that can use the configured chat model when deterministic classification is not strong enough. The result records whether the assisted tier was used.
83
+ The deterministic `source_plan` path uses format and header evidence. Call `source_plan_assisted` as a separate step when that evidence is insufficient; it can use the configured chat model. The result records whether the assisted tier was used.
69
84
 
70
85
  Knowledge packs are a separate discovery mechanism. Bundled baseline packs and optional site or localisation packs contain reusable guidance and rules. `knowledge_catalogue` finds packs applicable to a source system, domain, or section; `knowledge_pack` loads the selected pack. Discovery can happen before or after source planning.
71
86
 
87
+ ## Prompt guidance and user decisions
88
+
89
+ An agent can use workflow prompts to organise a task and elicitation prompts to ask for missing information. Domain rules and tool results help it assess the answers. Answering a question may resolve one decision while leaving other work open.
90
+
91
+ See [Working with prompts](usage/prompt-handling.md) for choosing guidance, handling unanswered questions, and requesting more explanation when needed.
92
+
72
93
  ## Semantic projection
73
94
 
74
- Grounding answers “which concept does this source item refer to?” Projection answers “given that concept and this source context, which CDM row or rows should be emitted?” It is useful for sibling-field modifiers, value-carried family history, deterministic suppression, and multi-row output definitions. Projection never chooses the concept and never calls an LLM. It is opt-in because a deployment must deliberately choose to expose the definition catalogue.
95
+ Grounding answers “which concept does this source item refer to?” Projection answers “given that concept and this source context, which CDM row or rows should be emitted?” It is useful for sibling-field modifiers, value-carried family history, deterministic suppression, and multi-row output definitions. Projection never chooses the concept and never calls an LLM. It must be enabled explicitly to expose the definition catalogue.
75
96
 
76
97
  ## Choose an interface
77
98
 
@@ -85,7 +106,7 @@ Use `groundworkers --describe` to inspect the active MCP tools, prompts, resourc
85
106
 
86
107
  ## Relationship to companion packages
87
108
 
88
- Groundworkers composes several focused packages rather than replacing them:
109
+ Groundworkers uses these packages:
89
110
 
90
111
  - `omop-alchemy` provides OMOP CDM models and database configuration;
91
112
  - `omop-graph` provides graph-backed concept traversal and resolver primitives;
@@ -1,5 +1,8 @@
1
1
  # Plugin architecture
2
2
 
3
+ For an overview and examples, start with [Plugins](../plugins.md). This guide
4
+ covers the implementation contract for plugin authors.
5
+
3
6
  ## What a plugin is
4
7
 
5
8
  Groundworkers plugins are independently installed packages that add an adapter, service, and MCP surface without adding plugin-specific imports to Groundworkers. They register one ready-to-use plugin object under the `groundworkers.plugins` entry-point group.
@@ -205,6 +208,22 @@ Verification is read-only and returns a `PluginReadinessResult` containing a sta
205
208
 
206
209
  The contract is headless: it contains no Groundskeeping types. Groundworkers uses the same result for generic setup-console rendering, while a plugin may return `result.as_dict()` from its own MCP status tool. Plugins own dependency- specific checks; the host only builds current plugin state, handles unavailable configuration safely, and maps readiness states to existing Groundskeeping status, table, empty, action, and detail contracts.
207
210
 
211
+ ## Configuration linting
212
+
213
+ A plugin may implement the runtime-checkable `GroundworkersPluginLinter` protocol when its settings need checks beyond the configuration schema. The hook is `lint_config(config) -> PluginLintReport`; it receives the plugin's validated `PackageConfigBase` instance, or `None` when the plugin has no config class. It runs without calling `build()`, so it can check configuration-dependent files or cross-field rules without constructing runtime services.
214
+
215
+ Return a report with the plugin name and zero or more `PluginLintDiagnostic` values. Each finding has a stable code, `error` / `warning` / `info` severity, concise message, and optional configuration path. Errors make `report.valid` false; warnings and informational findings do not. Keep diagnostics safe for display: do not include secret values, full connection strings, or raw exception text.
216
+
217
+ Headless consumers call `lint_plugin_config(plugin, config)`. It returns `None` when the optional protocol is not implemented. If a linter raises or returns a malformed report, Groundworkers logs a safe error summary and returns a generic error finding.
218
+
219
+ Run the installed plugin checks from the command line:
220
+
221
+ ```bash
222
+ groundworkers lint-plugins --config-path /path/to/config.toml
223
+ ```
224
+
225
+ The command prints a JSON report and exits with status 1 if any linter reports an error. Plugins without the optional hook appear under `skipped`; only plugins with the hook have their settings passed through their package schema and linter. It does not build the Groundworkers runtime or connect to OMOP services. This command covers plugin configuration only; prompt packs and Groundworkers knowledge packs should be validated by their owning subsystems.
226
+
208
227
 
209
228
  ## Lifecycle and diagnostics
210
229
 
@@ -0,0 +1,133 @@
1
+ # Proposal: per-domain standard-resolution packs
2
+
3
+ Status: draft for review (2026-10-19). Replaces the single
4
+ `core/standard-concept-preference` pack with a slim, always-loaded core
5
+ plus one pack per OMOP domain.
6
+
7
+ ## Why the broad pack falls short
8
+
9
+ `standard-concept-preference` mixes two kinds of content:
10
+
11
+ 1. **Invariants** that hold in every domain: the target must be
12
+ `standard_concept = 'S'`, active, never a classification (`'C'`), and
13
+ `concept_id = 0` when nothing fits.
14
+ 2. **Per-domain resolution rules**, compressed to one line each, e.g.
15
+ "Procedure: SNOMED preferred, CPT4 for US billing".
16
+
17
+ The second kind is where agents actually go wrong, and one line per domain
18
+ cannot carry it. Checking the procedure domain against the live vocabulary
19
+ (v5.0 27-FEB-26) shows the one-liner is misleading:
20
+
21
+ - Standardness is decided **per code, not per vocabulary**. CPT4 has
22
+ ~10.2k standard codes and ~3.8k non-standard ones that map to SNOMED,
23
+ CVX or RxNorm. OPCS4 and ICD9Proc are split roughly half and half.
24
+ - A standard source code (CPT4, ICD10PCS, standard HCPCS) **maps to
25
+ itself**. There is no "prefer SNOMED over CPT4" step: rewriting a
26
+ standard code to SNOMED discards information and is wrong.
27
+ - The vocabulary ships cross-vocabulary links that *look* like equivalences
28
+ but aren't (`CPT4 - SNOMED eq` often points to a broader concept, or to
29
+ several). An agent told only "prefer SNOMED" will follow them.
30
+ - Concept sets built from SNOMED descendants miss standard CPT4/ICD10PCS
31
+ records (e.g. CPT4 27447 total knee arthroplasty is not a descendant of
32
+ SNOMED 43531648 Total knee replacement).
33
+
34
+ None of this applies to Condition, where one standard vocabulary (SNOMED)
35
+ absorbs everything through `Maps to`. Each domain resolves to
36
+ standardness differently, so each needs its own guidance.
37
+
38
+ ## Proposed structure
39
+
40
+ ```
41
+ packs/core/
42
+ standard-concept-preference/ # KEEP name (always: true) — invariants only
43
+ standard-resolution-condition/ # domains: [Condition]
44
+ standard-resolution-procedure/ # domains: [Procedure] ← drafted
45
+ standard-resolution-measurement/ # domains: [Measurement]
46
+ standard-resolution-observation/ # domains: [Observation]
47
+ standard-resolution-drug/ # domains: [Drug]
48
+ standard-resolution-device/ # domains: [Device]
49
+ drug-concept-granularity/ # unchanged; see_also from -drug
50
+ ```
51
+
52
+ The catalogue only discovers `packs/<layer>/<pack>/manifest.yaml`, so the
53
+ domain packs are flat siblings rather than nested children. The link
54
+ between them is `see_also` plus `applicability.domains`, which
55
+ `PackApplicability.matches()` already filters on.
56
+
57
+ ### Slim core: `standard-concept-preference`
58
+
59
+ Keep the name. It is always loaded and the bundled-baseline test asserts it
60
+ exists (`tests/unit/test_knowledge_catalogue.py:218`). Contents:
61
+
62
+ - Active-target rule. Follow `Maps to` from `U`; never target `D`.
63
+ - `S` required for `*_concept_id`. `C` is never a target. Non-standard goes
64
+ in `*_source_concept_id`.
65
+ - **New:** standardness is per code. Check `standard_concept` on the
66
+ concept, never infer it from `vocabulary_id`.
67
+ - **New:** a standard source concept maps to itself. Do not re-map it to a
68
+ "preferred" vocabulary.
69
+ - **New:** `Maps to` is the only mapping edge. `eq`, `cat`, `poss_eq` and
70
+ `Is a` are evidence, not mappings.
71
+ - `concept_id = 0` fallback.
72
+ - Loading rule: "after resolving a target's `domain_id`, load
73
+ `standard-resolution-<domain>`".
74
+ - The `vocab_preference` block is removed and moves into the domain packs.
75
+
76
+ ### Domain pack template
77
+
78
+ Every `standard-resolution-<domain>` pack uses the same sections, so an
79
+ agent knows where to look:
80
+
81
+ | Section | Purpose |
82
+ |---|---|
83
+ | 1. Standard vocabularies in this domain | Which vocabularies hold `S` concepts here, and roughly what share. Snapshot counts carry a `verified_against` vocabulary version. |
84
+ | 2. Resolution path by input type | (a) code from a standard vocabulary, (b) non-standard code, (c) free text. Each has its own path. |
85
+ | 3. Relationship semantics | Which relationship_ids are mappings, which are evidence, and the known failure modes of each. |
86
+ | 4. Concept-set implications | Whether descendants of one vocabulary cover the others. If not, how to build a set that does. |
87
+ | 5. Traps | Concrete patterns the vocabulary gets wrong, with concept IDs. |
88
+ | 6. Verification checklist | What to check before accepting a target. |
89
+
90
+ `rules.yaml` carries the machine-readable half under the same keys:
91
+ `standard_vocabularies`, `resolution_paths`, `relationship_semantics`,
92
+ `concept_set_roots`, `traps`, `checks`. Worked cases go in
93
+ `examples.yaml`, which `PackContent` already loads.
94
+
95
+ ### What each domain pack must cover (outline)
96
+
97
+ - **Condition:** SNOMED is the only standard vocabulary. ICD10CM/ICD9CM/ICD10
98
+ reach it via `Maps to`, sometimes 1:n (see `one-to-many-mapping`). Covers
99
+ `Maps to value` for pre-coordinated codes (see `pre-coordinated-split`),
100
+ Cancer Modifier / ICDO3 for oncology, and the domain-change trap (an
101
+ ICD10CM code mapping into Observation).
102
+ - **Procedure:** see the draft. Multiple standard vocabularies, self-maps,
103
+ `eq`/`cat` semantics, attribute-based alignment, concept sets with
104
+ several roots.
105
+ - **Measurement:** LOINC and SNOMED are both standard. LOINC wins for
106
+ lab tests. Covers CPT4 lab codes (1.3k standard CPT4 Measurement codes,
107
+ plus `CPT4 - LOINC eq`) and the test+result split.
108
+ - **Observation:** SNOMED / LOINC / CPT4 E&M / HCPCS. Covers history-of
109
+ (see `history-of-event`) and E&M visit codes landing in Observation.
110
+ - **Drug:** RxNorm before RxNorm Extension. Covers HCPCS J-codes and CPT4
111
+ vaccine/drug codes that are non-standard and map to RxNorm/CVX.
112
+ Granularity is delegated to `drug-concept-granularity`.
113
+ - **Device:** HCPCS Level II is the main standard source (5.2k S). Covers
114
+ SNOMED physical objects and the Procedure/Device split for
115
+ implant-plus-procedure codes.
116
+
117
+ ## Mechanism note
118
+
119
+ `post-filter` is declared in manifests, but nothing reads `rules.yaml`
120
+ programmatically today. `knowledge_pack` only returns it in the payload
121
+ (`tools/knowledge_tools.py:189`). The domain packs keep `rules.yaml`
122
+ declarative so a future post-filter can use it. The guidance is written to
123
+ stand on its own when it is context-injected.
124
+
125
+ ## Migration
126
+
127
+ 1. Land `standard-resolution-procedure`. It adds content and changes
128
+ nothing existing.
129
+ 2. Draft the remaining domain packs from the template.
130
+ 3. Slim `standard-concept-preference` to the invariants and add the
131
+ loading rule. Bump it to `version: "2.0"`.
132
+ 4. Mirror into `gw-plugins/kb-prompts/packs/core/`, whose
133
+ `standard-concept-preference` is currently byte-identical.
@@ -0,0 +1,150 @@
1
+ # Initial local setup
2
+
3
+ Use this guide to connect Groundworkers to an existing OMOP CDM database and start a local service. The vocabulary tables must already be populated; Groundworkers does not load vocabulary data.
4
+
5
+ Start with the CDM connection. You can add graph indexes, embeddings, a chat model, and plugins as you need them. A chat model is not required for vocabulary lookup or lexical grounding.
6
+
7
+ ## Before you start
8
+
9
+ You need Python 3.12 or newer, the database connection details, and access to the CDM and vocabulary schemas. If the vocabulary is stored separately from the clinical tables, configure its connection and schema too.
10
+
11
+ The setup console helps you edit configuration, test connections, and run preparation tasks. It does not run your agent conversations or mapping jobs. Configuration is saved to a shared TOML file; maintenance runs have their own saved history. Connection and model checks may need to be rerun after reopening the console or changing a service.
12
+
13
+ ## 1. Install
14
+
15
+ In a new working directory, create and activate a virtual environment. These activation commands are for macOS and Linux:
16
+
17
+ ```bash
18
+ uv venv --python 3.12
19
+ source .venv/bin/activate
20
+ ```
21
+
22
+ Install Groundworkers with the setup console:
23
+
24
+ ```bash
25
+ uv pip install "groundworkers[tui]"
26
+ ```
27
+
28
+ If you plan to store embeddings in PostgreSQL, include its backend support:
29
+
30
+ ```bash
31
+ uv pip install "groundworkers[tui,embedding-pgvector]"
32
+ ```
33
+
34
+ Other extras include `embedding-faiss` for FAISS sidecar acceleration and `all_source` for XLSX, PDF, and DOCX source-planning inputs. See [Installation](usage/installation.md) for the available extras.
35
+
36
+ ## 2. Open the setup console
37
+
38
+ ```bash
39
+ groundworkers tui
40
+ ```
41
+
42
+ The default configuration file is `~/.config/omop/config.toml`, unless `OA_CONFIG_PATH` selects another file. To choose a file explicitly:
43
+
44
+ ```bash
45
+ groundworkers tui --config-path /path/to/config.toml
46
+ ```
47
+
48
+ The console can help you choose a location and create or repair the configuration. Review the redacted diff before applying changes. Use the same configuration path when you later start the service.
49
+
50
+ **Overview** shows CDM readiness separately from optional graph, embedding, chat, and integration status. An unconfigured optional feature does not mean the CDM service has failed.
51
+
52
+ ## 3. Configure the CDM
53
+
54
+ Choose **Overview → Configure CDM**, or open **Database**. Configure the physical connection and the logical CDM database, including the vocabulary location. The setup flow writes the shared `[connections.*]`, `[databases.*]`, and `[tools.groundworkers]` entries. Groundworkers refers to these entries by name.
55
+
56
+ Run **Test connections** in Database or **Verify all** in Overview. A working CDM connection with populated vocabulary tables supports concept lookup, lexical search and grounding, and mapping tools. Some searches and graph operations also need the preparation described below.
57
+
58
+ See [Configuration](usage/configuration.md) for the shared configuration layout and named references.
59
+
60
+ ## 4. Prepare graph and search support
61
+
62
+ Open **Graph → Prepare graph** when readiness reports missing relationship, full-text, or functional indexes. Review the proposed commands before starting. **Performance** shows index readiness and offers further index maintenance.
63
+
64
+ Preparation runs as a background maintenance task; follow it in **Runs**. The database account used for preparation needs permission to create the required indexes and supporting objects. Normal service queries remain read-only.
65
+
66
+ You can use basic vocabulary operations before preparing every index. Prepare the search and graph support needed by the tools you intend to use, then rerun the checks.
67
+
68
+ ## 5. Add embeddings (optional)
69
+
70
+ Embedding search needs a named embedding model, a named vector store, and vectors for the concepts you want to search. The query model must be compatible with the stored vectors.
71
+
72
+ 1. **Configure the store.** Use Database to select or create the vector-store configuration.
73
+ 2. **Configure the model.** In Embeddings, choose **Configure model**. Supply the provider details and select a model already registered in the store or a new model from the provider.
74
+ 3. **Initialize and check.** Use **Initialize embedding store** if needed, then **Check model** to check the store registration and test whether the provider can encode text with that model.
75
+ 4. **Choose the scope and populate.** Refresh coverage, select the vocabularies you need, and choose **Populate**. Review the scope, run limit, and commands before starting.
76
+ 5. **Check the result.** Follow the task in Runs, then refresh coverage to see what is available.
77
+
78
+ Store initialization and population write to the embedding store. Population starts only when requested; a search never triggers it. A run limit caps the amount of work in one run. Coverage and the population plan show which concepts still need vectors.
79
+
80
+ An embedding model and a chat model are separate choices and can use different providers. Configuring one does not enable the other.
81
+
82
+ ## 6. Add a chat model (optional)
83
+
84
+ Open **Chat Model**, configure the provider, and run **Test provider**. Use **Select chat model** to choose a model that supports structured output. The separate **Chat** section checks the selected model's chat and structured-output capabilities.
85
+
86
+ Chat enables text preparation and structured-field domain classification. Assisted source planning also needs `source_planning_llm_assisted_enabled` to be enabled; it is enabled by default. Provider support comes from `omop-llm`; use the console checks to verify your chosen endpoint and model. Credentials are redacted in configuration reviews and diagnostics.
87
+
88
+ ## 7. Start or inspect the service
89
+
90
+ After setup, inspect what Groundworkers will expose for your configuration:
91
+
92
+ ```bash
93
+ groundworkers --config-path /path/to/config.toml --describe
94
+ ```
95
+
96
+ This lists registered tools, prompts, resources, plugins, and redacted configuration details. Use the console's connection and model checks to verify that the configured services are reachable too.
97
+
98
+ For an agent client that launches Groundworkers, use MCP over stdio:
99
+
100
+ ```bash
101
+ groundworkers --config-path /path/to/config.toml --transport stdio
102
+ ```
103
+
104
+ To run an MCP service that clients can connect to over HTTP:
105
+
106
+ ```bash
107
+ groundworkers \
108
+ --config-path /path/to/config.toml \
109
+ --transport streamable-http \
110
+ --host 127.0.0.1 \
111
+ --port 8000
112
+ ```
113
+
114
+ REST runs as a separate transport, with selected mapping and source-planning endpoints:
115
+
116
+ ```bash
117
+ groundworkers \
118
+ --config-path /path/to/config.toml \
119
+ --transport rest \
120
+ --host 127.0.0.1 \
121
+ --port 8080
122
+ ```
123
+
124
+ These HTTP examples listen on the local machine. See [Integrations](usage/integrations.md) for client setup and the available interfaces. Restart a running service after changing its configuration or installed plugins.
125
+
126
+ ## Optional plugins and guidance
127
+
128
+ Installed Groundworkers plugins can add tools, prompts, resources, and setup pages. Install them into the same Python environment as Groundworkers, then reopen the console or restart the service. Use `--describe` to check what was registered; plugins with readiness support also report configuration or dependency problems in the console.
129
+
130
+ For prompt packs, see [Working with prompts](usage/prompt-handling.md). Bundled knowledge packs are available without a separate plugin; local knowledge-pack paths and the optional `semantic_projection_enabled` setting are described in [Configuration](usage/configuration.md).
131
+
132
+ ## Configuration managed elsewhere
133
+
134
+ To inspect a deployment-managed or copied configuration without editing it:
135
+
136
+ ```bash
137
+ groundworkers tui \
138
+ --config-path /path/to/config.toml \
139
+ --config-read-only
140
+ ```
141
+
142
+ Change the authoritative configuration source, then reopen the console to verify the result. This flag disables configuration edits; it does not make database preparation tasks read-only.
143
+
144
+ ## Maintenance runs
145
+
146
+ Graph preparation and embedding population run in separate background processes. You can close and reopen the console while they continue. In **Runs**, follow progress, inspect a redacted log tail, cancel active work, retry a supported failed step, or export commands. Postflight results appear for tasks that define those checks.
147
+
148
+ Run history is saved on disk. Groundworkers uses `GROUNDWORKERS_STATE_HOME`, then `XDG_STATE_HOME`, as the state base directory and appends `groundworkers`. If neither is set, it uses `~/.local/state/groundworkers`.
149
+
150
+ In a container, set the state base to a mounted persistent directory to retain history across container replacement. An interrupted worker does not resume merely because its history survives; inspect its status in Runs before retrying.
@@ -28,6 +28,10 @@
28
28
 
29
29
  Start with [Concepts and capability choices](concepts.md) for the mental model, then choose an integration path.
30
30
 
31
+ For agent-assisted tasks, [Working with prompts](usage/prompt-handling.md) explains how workflow guidance, user questions, domain knowledge, and tools fit together, and what to review before relying on a result.
32
+
33
+ [Plugins](plugins.md) explains how specialist packages extend Groundworkers, the interface they implement, and where to find the plugin catalogue and examples.
34
+
31
35
  ## At a glance
32
36
 
33
37
  ```mermaid
@@ -0,0 +1,95 @@
1
+ # Plugins
2
+
3
+ Plugins add specialist capabilities to a Groundworkers installation. A plugin can expose tools, prompts, and resources through the same MCP server as the core vocabulary and mapping tools. It can also provide configuration pages, readiness checks, and preparation tasks in the setup console.
4
+
5
+ Start with the [Groundworkers Plugin Catalogue](https://github.com/AustralianCancerDataNetwork/groundworkers-plugin-catalogue) to find components, installation instructions, and compatibility information. Access to the catalogue or individual component repositories may be required. Each component's own guide explains its data requirements and intended use.
6
+
7
+ ## What gets installed
8
+
9
+ The ecosystem includes both executable plugins and reusable prompt content:
10
+
11
+ | Component | How it fits |
12
+ |---|---|
13
+ | Runtime plugin | A Python package that Groundworkers discovers and asks to register its MCP capabilities. |
14
+ | Installed prompt pack | A content distribution read by the OHDSI Prompt Registry plugin. It supplies instructions, schemas, or examples. |
15
+ | Filesystem prompt pack | Content read by the registry from a configured directory, often for local guidance or a working copy. |
16
+
17
+ For example, installing the Prompt Registry adds tools for finding and reading packs. Adding a pack supplies content to those tools. A pack does not need to implement the Groundworkers plugin interface itself.
18
+
19
+ The catalogue describes what you can install. Your Python environment determines what Groundworkers can discover. Configuration and available dependencies determine which capabilities can be built and used.
20
+
21
+ ## How a plugin joins the host
22
+
23
+ A plugin package advertises a constructed plugin object through the `groundworkers.plugins` Python entry-point group. Groundworkers discovers that object at startup, supplies its configuration and shared resources, and asks it to build its state. It then registers the plugin's MCP tools, prompts, or resources against that state.
24
+
25
+ ```mermaid
26
+ flowchart TD
27
+ PACKAGE["Installed plugin package"] --> BUILD["Build plugin state"]
28
+ HOST["Groundworkers resources<br/>and plugin settings"] --> BUILD
29
+ BUILD --> MCP["Register tools, prompts and resources<br/>on the shared MCP server"]
30
+ ```
31
+
32
+ The plugin's service contains its own behaviour. Groundworkers provides discovery, shared runtime access, MCP registration, and common setup features. Registering MCP capabilities does not automatically create REST endpoints; REST exposes a separate set of workflows.
33
+
34
+ ## The interface contract
35
+
36
+ Every runtime plugin implements four parts:
37
+
38
+ | Part | Responsibility |
39
+ |---|---|
40
+ | `name` | A stable identity, unique among installed plugins. |
41
+ | `config_cls` | The plugin's configuration schema, or `None` when no settings are needed. Its `tool_name` must match the plugin name. |
42
+ | `build(context, config)` | Use shared resources and validated plugin settings to create the state needed by the plugin. Return `None` if a required prerequisite is missing. |
43
+ | `register(server, state)` | Expose MCP tools, prompts, or resources using the state returned by `build`. |
44
+
45
+ The supplied `PluginContext` gives a plugin access to resolved CDM resources, the routed CDM session factory, and optional embedding, chat, and mapping capabilities. A plugin can reuse the host's grounding and mapping through `mapping_context`. Routed CDM sessions support installations where vocabulary tables use a different connection from clinical tables.
46
+
47
+ Plugins can also declare references to independent databases, models, or vector stores. Their settings belong in `[tools.<plugin_name>]`; connection details and credentials stay in the shared resource entries they reference. See [Configuration](usage/configuration.md#plugin-configuration) for how these settings fit into the stack.
48
+
49
+ A plugin can optionally add:
50
+
51
+ - **Readiness checks** to distinguish valid settings from usable data and services.
52
+ - **Setup steps** for explicit preparation work, with progress and logs in Runs.
53
+ - **A custom configuration flow** when its settings need more than the standard generated form.
54
+
55
+ An individual plugin can be skipped when its configuration, prerequisites, build, or registration fail, while core capabilities remain available. Plugin identities must still be unique: duplicate names are a startup error. MCP tool names also share a namespace, so plugins should prefix their tool names.
56
+
57
+ For method signatures, entry-point declarations, and authoring details, see the [plugin development guide](development/plugins.md).
58
+
59
+ ## Two examples
60
+
61
+ ### OHDSI Prompt Registry: exposing reusable guidance
62
+
63
+ The [OHDSI Prompt Registry](https://AustralianCancerDataNetwork.github.io/ohdsi-prompt-registry/) is a runtime plugin that publishes prompt packs through MCP. Its tools let an agent discover packs, read selected instructions or schemas, validate structured documents, and render supported results for review.
64
+
65
+ The registry can combine bundled content, separately installed pack distributions, and local filesystem packs. This lets a team share a workflow while keeping site-specific content separately maintained. Your agent conducts the conversation and applies the guidance; the registry supplies content and contract checks.
66
+
67
+ See [Working with prompts](usage/prompt-handling.md) for the user-facing model and the registry's [pack-source guide](https://AustralianCancerDataNetwork.github.io/ohdsi-prompt-registry/sources/) for configuration.
68
+
69
+ ### Plugin template: a small service with tools and setup
70
+
71
+ The [Groundworkers Plugin Template](https://github.com/AustralianCancerDataNetwork/gw-plugin-template) provides a small catalogue service with list, search, and status tools. It also demonstrates a preparation step and a readiness report. It is a starting point for authors to adapt.
72
+
73
+ Its layout shows where the responsibilities belong:
74
+
75
+ | Module | Purpose |
76
+ |---|---|
77
+ | `config.py` | Declare settings and references to shared resources. |
78
+ | `adapters.py` | Read files, query databases, or call external services. |
79
+ | `service.py` | Implement behaviour that can also be called directly from Python. |
80
+ | `tools.py` | Expose that behaviour through MCP. |
81
+ | `plugin.py` | Build the components and register the plugin's capabilities. |
82
+
83
+ Longer preparation work lives separately in `setup_cli.py` and can run through the host's maintenance system. A specialised mapper can follow the same structure, reusing Groundworkers' mapping context while keeping source-specific rules and data in its own package.
84
+
85
+ ## Add a plugin to your installation
86
+
87
+ 1. **Check compatibility.** Use the catalogue to find the component's requirements, installation command, and recorded test evidence. A declared version range and a successful compatibility test are different kinds of evidence.
88
+ 2. **Install and configure it.** Use the same Python environment that runs Groundworkers. Follow the component's guide for settings and any data preparation, then restart the host.
89
+ 3. **Inspect the result.** Check registration and use the plugin's readiness checks, where available, to verify its dependencies and prepared data.
90
+
91
+ ```bash
92
+ groundworkers --config-path /path/to/config.toml --describe
93
+ ```
94
+
95
+ The output lists active plugins and registered capabilities, with safe issue summaries for plugins that could not be built or registered. A registered tool may still need a working connection or prepared data before a call succeeds.
@@ -83,7 +83,7 @@ Returns descendants of a concept up to `max_depth` hops (default 3, max 10).
83
83
 
84
84
  ## `concept_relationships`
85
85
 
86
- Returns all direct relationships (edges) for one concept, grouped by direction.
86
+ Returns all direct relationships (edges) for one concept, grouped by direction. Edges are not filtered by domain, so cross-domain attribute edges (a Procedure's `Has method` → Observation, `Has dir proc site` → Spec Anatomic Site) are included.
87
87
 
88
88
  ```json
89
89
  {"concept_id": 4119419}
@@ -227,6 +227,7 @@ Returns a bounded multi-hop neighborhood around one concept.
227
227
  All parameters except `concept_id` are optional.
228
228
 
229
229
  - `predicate_kinds` restricts traversal to specific relationship families.
230
+ - Edges are followed across domains (unlike `concept_path`'s `within_domain=true` default), so procedure attributes are reachable.
230
231
  - `max_depth` is clamped to `1..4`.
231
232
  - `max_nodes` is clamped to `10..500`.
232
233
 
@@ -265,7 +266,7 @@ Use this when you want a local relationship subgraph without committing to a sin
265
266
 
266
267
  ## `concept_associations`
267
268
 
268
- Enumerates classified `ASSOCIATION` edges such as therapeutic links between a regimen and its component drugs, or relationships between a drug and an indication. Use it when you need to discover associated concepts from one seed; `concept_neighbors` and `concept_relationships` do not provide this same classified association view.
269
+ Enumerates classified `ASSOCIATION` edges such as therapeutic links between a regimen and its component drugs, or relationships between a drug and an indication. Use it when you need to discover associated concepts from one seed, filtered by subkind and with standard flags; `concept_relationships` lists every edge kind unfiltered. SNOMED defining attributes (finding and procedure sites, method, device, substance) are `ATTRIBUTE`, not `ASSOCIATION`: use `concept_neighbors` with `predicate_kinds: ["ATTRIBUTE"]` for those.
269
270
 
270
271
  ```json
271
272
  {