databao 0.3.3.dev3__tar.gz → 0.3.4.dev1__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 (224) hide show
  1. databao-0.3.4.dev1/.claude/agents/reviewer.md +8 -0
  2. databao-0.3.4.dev1/.claude/settings.json +1 -0
  3. databao-0.3.4.dev1/.claude/skills/autosteer/SKILL.md +49 -0
  4. databao-0.3.4.dev1/.claude/skills/check-coverage/SKILL.md +48 -0
  5. databao-0.3.4.dev1/.claude/skills/check-coverage/evals/evals.json +38 -0
  6. databao-0.3.4.dev1/.claude/skills/check-pr-comments/SKILL.md +90 -0
  7. databao-0.3.4.dev1/.claude/skills/check-pr-comments/evals/evals.json +42 -0
  8. databao-0.3.4.dev1/.claude/skills/create-branch/SKILL.md +48 -0
  9. databao-0.3.4.dev1/.claude/skills/create-branch/evals/evals.json +38 -0
  10. databao-0.3.4.dev1/.claude/skills/create-pr/SKILL.md +64 -0
  11. databao-0.3.4.dev1/.claude/skills/create-pr/evals/evals.json +38 -0
  12. databao-0.3.4.dev1/.claude/skills/eval-skills/SKILL.md +57 -0
  13. databao-0.3.4.dev1/.claude/skills/local-code-review/SKILL.md +70 -0
  14. databao-0.3.4.dev1/.claude/skills/local-code-review/evals/evals.json +51 -0
  15. databao-0.3.4.dev1/.claude/skills/make-yt-issue/SKILL.md +49 -0
  16. databao-0.3.4.dev1/.claude/skills/make-yt-issue/evals/evals.json +79 -0
  17. databao-0.3.4.dev1/.claude/skills/review-architecture/SKILL.md +59 -0
  18. databao-0.3.4.dev1/.claude/skills/review-architecture/evals/evals.json +39 -0
  19. databao-0.3.4.dev1/.claude/skills/setup-environment/SKILL.md +38 -0
  20. databao-0.3.4.dev1/.claude/skills/setup-environment/evals/evals.json +36 -0
  21. databao-0.3.4.dev1/.claude/skills/update-pr/SKILL.md +40 -0
  22. databao-0.3.4.dev1/.claude/skills/update-pr/evals/evals.json +37 -0
  23. databao-0.3.4.dev1/.claude/skills/write-tests/SKILL.md +59 -0
  24. databao-0.3.4.dev1/.claude/skills/write-tests/evals/evals.json +53 -0
  25. databao-0.3.4.dev1/.github/copilot-instructions.md +72 -0
  26. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/.github/workflows/e2e-tests.yml +4 -1
  27. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/.gitignore +4 -3
  28. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/.pre-commit-config.yaml +9 -1
  29. databao-0.3.4.dev1/CLAUDE.md +128 -0
  30. databao-0.3.4.dev1/DEVELOPMENT.md +121 -0
  31. databao-0.3.4.dev1/Makefile +38 -0
  32. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/PKG-INFO +31 -9
  33. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/README.md +27 -6
  34. databao-0.3.4.dev1/docs/architecture.md +115 -0
  35. databao-0.3.4.dev1/docs/python-coding-guidelines.md +224 -0
  36. databao-0.3.4.dev1/docs/testing-strategy.md +87 -0
  37. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/e2e-tests/src/databases/duckdb_utils.py +1 -1
  38. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/e2e-tests/src/databases/snowflake_utils.py +6 -6
  39. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/e2e-tests/src/databases/sqlite_utils.py +1 -1
  40. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/e2e-tests/src/project_utils.py +23 -3
  41. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/e2e-tests/tests/domains/test_bigquery.py +7 -0
  42. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/e2e-tests/tests/domains/test_snowflake.py +5 -1
  43. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/e2e-tests/tests/resources/bigquery_introspections.yaml +0 -383
  44. databao-0.3.4.dev1/e2e-tests/tests/resources/duckdb_introspections.yaml +134 -0
  45. databao-0.3.4.dev1/e2e-tests/tests/resources/mysql_introspections.yaml +155 -0
  46. databao-0.3.4.dev1/e2e-tests/tests/resources/postgres_introspections.yaml +151 -0
  47. databao-0.3.4.dev1/e2e-tests/tests/resources/postgres_partitioned_tables_introspections.yaml +194 -0
  48. databao-0.3.4.dev1/e2e-tests/tests/resources/snowflake_introspections.yaml +247 -0
  49. databao-0.3.4.dev1/e2e-tests/tests/resources/sqlite_introspections.yaml +94 -0
  50. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/examples/demo-snowflake-project/README.md +42 -12
  51. databao-0.3.4.dev1/examples/demo-snowflake-project/cleanup.sql +57 -0
  52. databao-0.3.4.dev1/examples/demo-snowflake-project/databao/domains/root/src/snowflake.yaml +10 -0
  53. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/examples/demo-snowflake-project/pyproject.toml +7 -1
  54. databao-0.3.4.dev1/examples/demo-snowflake-project/setup.sql +242 -0
  55. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/examples/demo-snowflake-project/src/databao_snowflake_demo/app.py +9 -2
  56. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/examples/demo-snowflake-project/uv.lock +10 -11
  57. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/pyproject.toml +28 -3
  58. databao-0.3.4.dev1/scripts/smoke-test-skills.sh +51 -0
  59. databao-0.3.4.dev1/scripts/validate_agent_guidance.py +244 -0
  60. databao-0.3.4.dev1/src/databao_cli/__main__.py +44 -0
  61. databao-0.3.4.dev1/src/databao_cli/commands/app.py +63 -0
  62. databao-0.3.4.dev1/src/databao_cli/commands/ask.py +68 -0
  63. databao-0.3.4.dev1/src/databao_cli/commands/build.py +36 -0
  64. databao-0.3.4.dev1/src/databao_cli/commands/datasource/__init__.py +13 -0
  65. databao-0.3.4.dev1/src/databao_cli/commands/datasource/add.py +24 -0
  66. databao-0.3.4.dev1/src/databao_cli/commands/datasource/check.py +32 -0
  67. databao-0.3.4.dev1/src/databao_cli/commands/index.py +33 -0
  68. databao-0.3.4.dev1/src/databao_cli/commands/init.py +44 -0
  69. databao-0.3.4.dev1/src/databao_cli/commands/mcp.py +51 -0
  70. databao-0.3.4.dev1/src/databao_cli/commands/status.py +13 -0
  71. databao-0.3.4.dev1/src/databao_cli/features/ask/agent_factory.py +41 -0
  72. databao-0.3.4.dev1/src/databao_cli/features/ask/display.py +13 -0
  73. databao-0.3.4.dev1/src/databao_cli/features/ask/service.py +18 -0
  74. databao-0.3.4.dev1/src/databao_cli/features/build.py +15 -0
  75. databao-0.3.4.dev1/src/databao_cli/features/datasource/add.py +37 -0
  76. databao-0.3.4.dev1/src/databao_cli/features/datasource/check.py +30 -0
  77. databao-0.3.4.dev1/src/databao_cli/features/datasource/validation.py +102 -0
  78. databao-0.3.4.dev1/src/databao_cli/features/index.py +19 -0
  79. databao-0.3.4.dev1/src/databao_cli/features/init/errors.py +29 -0
  80. databao-0.3.3.dev3/src/databao_cli/commands/init.py → databao-0.3.4.dev1/src/databao_cli/features/init/service.py +7 -32
  81. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/mcp/server.py +12 -5
  82. databao-0.3.4.dev1/src/databao_cli/features/mcp/tools/databao_ask/__init__.py +5 -0
  83. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/mcp/tools/databao_ask/agent_factory.py +4 -8
  84. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/mcp/tools/databao_ask/tool.py +3 -3
  85. databao-0.3.4.dev1/src/databao_cli/features/mcp/tools/database_context/__init__.py +3 -0
  86. databao-0.3.4.dev1/src/databao_cli/features/mcp/tools/database_context/tools.py +97 -0
  87. {databao-0.3.3.dev3/src/databao_cli/commands → databao-0.3.4.dev1/src/databao_cli/features}/status.py +1 -1
  88. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/ui/app.py +43 -27
  89. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/ui/cli.py +23 -2
  90. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/ui/components/chat.py +61 -12
  91. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/ui/components/datasource_form.py +99 -0
  92. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/ui/components/datasource_manager.py +57 -25
  93. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/ui/components/results.py +3 -3
  94. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/ui/components/sidebar.py +17 -13
  95. databao-0.3.4.dev1/src/databao_cli/features/ui/models/__init__.py +11 -0
  96. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/ui/models/chat_session.py +1 -1
  97. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/ui/pages/agent_settings.py +19 -19
  98. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/ui/pages/chat.py +20 -20
  99. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/ui/pages/context_settings.py +30 -24
  100. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/ui/pages/general_settings.py +19 -19
  101. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/ui/pages/welcome.py +22 -22
  102. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/ui/project_utils.py +17 -1
  103. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/ui/services/__init__.py +5 -5
  104. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/ui/services/build_service.py +2 -2
  105. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/ui/services/chat_persistence.py +3 -3
  106. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/ui/services/chat_title.py +1 -1
  107. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/ui/services/dce_operations.py +7 -5
  108. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/ui/services/llm_models.py +1 -1
  109. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/ui/services/query_executor.py +3 -3
  110. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/ui/services/settings_persistence.py +2 -2
  111. databao-0.3.4.dev1/src/databao_cli/shared/cli_utils.py +34 -0
  112. databao-0.3.4.dev1/src/databao_cli/shared/context_engine_cli.py +39 -0
  113. databao-0.3.4.dev1/src/databao_cli/shared/errors.py +7 -0
  114. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/shared}/executor_utils.py +1 -0
  115. databao-0.3.4.dev1/src/databao_cli/shared/log/cli_progress.py +184 -0
  116. databao-0.3.4.dev1/src/databao_cli/shared/log/console.py +3 -0
  117. databao-0.3.4.dev1/src/databao_cli/shared/log/logging.py +68 -0
  118. databao-0.3.4.dev1/src/databao_cli/shared/project/__init__.py +0 -0
  119. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/shared}/project/layout.py +18 -0
  120. databao-0.3.4.dev1/src/databao_cli/workflows/__init__.py +0 -0
  121. databao-0.3.4.dev1/src/databao_cli/workflows/ask.py +119 -0
  122. databao-0.3.4.dev1/src/databao_cli/workflows/datasource/__init__.py +0 -0
  123. databao-0.3.4.dev1/src/databao_cli/workflows/datasource/add.py +72 -0
  124. databao-0.3.4.dev1/src/databao_cli/workflows/datasource/check.py +20 -0
  125. databao-0.3.4.dev1/tests/__init__.py +0 -0
  126. databao-0.3.4.dev1/tests/check_datasource/__init__.py +0 -0
  127. databao-0.3.4.dev1/tests/check_datasource/test_project/databao/.gitignore +1 -0
  128. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/tests/conftest.py +2 -2
  129. databao-0.3.4.dev1/tests/plugins/__init__.py +0 -0
  130. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/tests/test_add_datasource.py +1 -1
  131. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/tests/test_app.py +2 -2
  132. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/tests/test_build.py +4 -3
  133. databao-0.3.4.dev1/tests/test_build_fingerprint.py +62 -0
  134. databao-0.3.4.dev1/tests/test_cli_progress.py +278 -0
  135. databao-0.3.4.dev1/tests/test_datasource_form_validation.py +162 -0
  136. databao-0.3.4.dev1/tests/test_datasource_validation.py +147 -0
  137. databao-0.3.4.dev1/tests/test_index.py +27 -0
  138. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/tests/test_query_executor.py +3 -3
  139. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/tests/test_query_executor_race_conditions.py +4 -4
  140. databao-0.3.4.dev1/tests/test_source_count.py +149 -0
  141. databao-0.3.4.dev1/tests/utils/__init__.py +0 -0
  142. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/tests/utils/project.py +8 -0
  143. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/uv.lock +3674 -3515
  144. databao-0.3.3.dev3/.cursor/rules/python-style.mdc +0 -40
  145. databao-0.3.3.dev3/Makefile +0 -5
  146. databao-0.3.3.dev3/e2e-tests/tests/resources/duckdb_introspections.yaml +0 -270
  147. databao-0.3.3.dev3/e2e-tests/tests/resources/mysql_introspections.yaml +0 -311
  148. databao-0.3.3.dev3/e2e-tests/tests/resources/postgres_introspections.yaml +0 -296
  149. databao-0.3.3.dev3/e2e-tests/tests/resources/postgres_partitioned_tables_introspections.yaml +0 -402
  150. databao-0.3.3.dev3/e2e-tests/tests/resources/snowflake_introspections.yaml +0 -607
  151. databao-0.3.3.dev3/e2e-tests/tests/resources/sqlite_introspections.yaml +0 -181
  152. databao-0.3.3.dev3/examples/demo-snowflake-project/databao/domains/root/src/snowflake.yaml +0 -9
  153. databao-0.3.3.dev3/examples/demo-snowflake-project/setup.sql +0 -217
  154. databao-0.3.3.dev3/src/databao_cli/__main__.py +0 -303
  155. databao-0.3.3.dev3/src/databao_cli/commands/app.py +0 -26
  156. databao-0.3.3.dev3/src/databao_cli/commands/ask.py +0 -229
  157. databao-0.3.3.dev3/src/databao_cli/commands/build.py +0 -12
  158. databao-0.3.3.dev3/src/databao_cli/commands/context_engine_cli.py +0 -33
  159. databao-0.3.3.dev3/src/databao_cli/commands/datasource/add_datasource_config.py +0 -57
  160. databao-0.3.3.dev3/src/databao_cli/commands/datasource/check_datasource_connection.py +0 -53
  161. databao-0.3.3.dev3/src/databao_cli/commands/mcp.py +0 -10
  162. databao-0.3.3.dev3/src/databao_cli/log/logging.py +0 -31
  163. databao-0.3.3.dev3/src/databao_cli/mcp/tools/databao_ask/__init__.py +0 -5
  164. databao-0.3.3.dev3/src/databao_cli/ui/models/__init__.py +0 -11
  165. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/.github/actions/setup-project/action.yml +0 -0
  166. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/.github/workflows/publish-dev.yml +0 -0
  167. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/.github/workflows/publish.yml +0 -0
  168. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/.github/workflows/python-package.yml +0 -0
  169. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/.python-version +0 -0
  170. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/CONTRIBUTING.md +0 -0
  171. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/LICENSE +0 -0
  172. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/e2e-tests/.gitignore +0 -0
  173. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/e2e-tests/pytest.ini +0 -0
  174. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/e2e-tests/src/__init__.py +0 -0
  175. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/e2e-tests/src/databases/__init__.py +0 -0
  176. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/e2e-tests/src/databases/bigquery_utils.py +0 -0
  177. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/e2e-tests/src/databases/mysql_utils.py +0 -0
  178. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/e2e-tests/src/databases/postgres_utils.py +0 -0
  179. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/e2e-tests/src/utils/__init__.py +0 -0
  180. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/e2e-tests/src/utils/path_utils.py +0 -0
  181. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/e2e-tests/src/utils/pexpect_utils.py +0 -0
  182. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/e2e-tests/src/utils/yaml_compare.py +0 -0
  183. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/e2e-tests/tests/conftest.py +0 -0
  184. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/e2e-tests/tests/domains/test_duckdb.py +0 -0
  185. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/e2e-tests/tests/domains/test_mysql.py +0 -0
  186. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/e2e-tests/tests/domains/test_postgres.py +0 -0
  187. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/e2e-tests/tests/domains/test_sqlite.py +0 -0
  188. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/examples/demo-snowflake-project/databao/domains/root/dce.ini +0 -0
  189. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/examples/demo-snowflake-project/databao/domains/root/examples/src/databases/example_postgres.yaml +0 -0
  190. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/examples/demo-snowflake-project/databao/domains/root/examples/src/files/documentation.md +0 -0
  191. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/examples/demo-snowflake-project/databao/domains/root/examples/src/files/notes.txt +0 -0
  192. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/examples/demo-snowflake-project/src/databao_snowflake_demo/__init__.py +0 -0
  193. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/scripts/generate_licenses.py +0 -0
  194. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/src/databao_cli/__init__.py +0 -0
  195. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/src/databao_cli/commands/__init__.py +0 -0
  196. {databao-0.3.3.dev3/src/databao_cli/commands/datasource → databao-0.3.4.dev1/src/databao_cli/features}/__init__.py +0 -0
  197. {databao-0.3.3.dev3/src/databao_cli/log → databao-0.3.4.dev1/src/databao_cli/features/ask}/__init__.py +0 -0
  198. {databao-0.3.3.dev3/src/databao_cli/mcp → databao-0.3.4.dev1/src/databao_cli/features/datasource}/__init__.py +0 -0
  199. {databao-0.3.3.dev3/src/databao_cli/mcp/tools → databao-0.3.4.dev1/src/databao_cli/features/init}/__init__.py +0 -0
  200. {databao-0.3.3.dev3/src/databao_cli/project → databao-0.3.4.dev1/src/databao_cli/features/mcp}/__init__.py +0 -0
  201. {databao-0.3.3.dev3/tests → databao-0.3.4.dev1/src/databao_cli/features/mcp/tools}/__init__.py +0 -0
  202. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/ui/__init__.py +0 -0
  203. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/ui/assets/bao.png +0 -0
  204. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/ui/components/__init__.py +0 -0
  205. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/ui/components/icons.py +0 -0
  206. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/ui/components/status.py +0 -0
  207. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/ui/models/settings.py +0 -0
  208. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/ui/pages/__init__.py +0 -0
  209. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/ui/services/storage.py +0 -0
  210. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/ui/streaming.py +0 -0
  211. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/features}/ui/suggestions.py +0 -0
  212. /databao-0.3.3.dev3/tests/check_datasource/__init__.py → /databao-0.3.4.dev1/src/databao_cli/py.typed +0 -0
  213. {databao-0.3.3.dev3/tests/plugins → databao-0.3.4.dev1/src/databao_cli/shared}/__init__.py +0 -0
  214. {databao-0.3.3.dev3/tests/utils → databao-0.3.4.dev1/src/databao_cli/shared/log}/__init__.py +0 -0
  215. {databao-0.3.3.dev3/src/databao_cli → databao-0.3.4.dev1/src/databao_cli/shared}/log/llm_errors.py +0 -0
  216. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/tests/check_datasource/test_check_datasource.py +0 -0
  217. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/tests/check_datasource/test_project/databao/domains/root/dce.ini +0 -0
  218. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/tests/check_datasource/test_project/databao/domains/root/src/myduck.yaml +0 -0
  219. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/tests/plugins/get_loaded_plugins.py +0 -0
  220. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/tests/plugins/test_plugins.py +0 -0
  221. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/tests/test_ask.py +0 -0
  222. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/tests/test_init.py +0 -0
  223. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/tests/test_mcp.py +0 -0
  224. {databao-0.3.3.dev3 → databao-0.3.4.dev1}/tests/test_status.py +0 -0
@@ -0,0 +1,8 @@
1
+ ---
2
+ name: reviewer
3
+ description: Read-only reviewer for code and architecture reviews. Cannot edit or write files.
4
+ tools: Read, Glob, Grep, Bash
5
+ ---
6
+
7
+ You are a read-only reviewer. You can inspect code, run non-mutating
8
+ commands, and produce findings — but you must never modify files.
@@ -0,0 +1 @@
1
+ {}
@@ -0,0 +1,49 @@
1
+ ---
2
+ name: autosteer
3
+ description: Run the full development pipeline autonomously without pausing between phases. Stops only on quality-gate failures.
4
+ argument-hint: "[ticket-id-or-task-description]"
5
+ ---
6
+
7
+ # Autosteer
8
+
9
+ Suspends the **pacing rule** from `CLAUDE.md`. Proceed through all phases
10
+ without confirmation, stopping **only** on quality-gate failures.
11
+
12
+ ## Activation
13
+
14
+ - Do **not** pause between phases or present plans for approval.
15
+ - **Do** stop on quality-gate failure (`make check`, `make test`,
16
+ `make test-cov-check`). Attempt fix twice, then stop and report.
17
+
18
+ ## Steps
19
+
20
+ ### 1. Resolve the ticket
21
+
22
+ If argument is a ticket ID (`DBA-XXX`, number, or URL): fetch with
23
+ `get_issue`, move to **Develop**.
24
+
25
+ If free-text: create via `create_issue` in **DBA** project (derive
26
+ summary, description, type; default Task). Move to **Develop**.
27
+
28
+ If no argument: ask user once, then proceed autonomously.
29
+
30
+ ### 2. Execute phases
31
+
32
+ Follow **After Completing Work** in `CLAUDE.md` (phases 1-7), with:
33
+ - Phase 2 (implement): up to two retries on test failure.
34
+ - Phase 3 (validate): run quality gates per **Quality Gates** in `CLAUDE.md`.
35
+ Two fix attempts, then stop.
36
+ - Phase 4 (review): fix Critical/High findings, note Medium/Low.
37
+ - Phase 5-7: use `create-branch`, `create-pr` skills. Skip pre-push pause.
38
+
39
+ ### 3. Report
40
+
41
+ Output: ticket ID/link, branch name, PR URL, unfixed review findings.
42
+
43
+ ## Guardrails
44
+
45
+ - Never commit or push to `main`.
46
+ - Never skip quality gates.
47
+ - Never create a ticket without at least a task description.
48
+ - Stage specific files -- never `git add -A` or `git add .`.
49
+ - If `gh` or YouTrack MCP unavailable, stop and inform user.
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: check-coverage
3
+ description: Run test coverage measurement, analyze results, and fix gaps when coverage falls below the 80% threshold.
4
+ ---
5
+
6
+ # Check Coverage
7
+
8
+ ## Steps
9
+
10
+ ### 1. Run `make test-cov-check`
11
+
12
+ If tests pass and coverage >= 80%, done.
13
+
14
+ ### 2. If tests fail
15
+
16
+ - **Existing tests broke**: fix production code, not tests.
17
+ - **New tests fail**: fix the test.
18
+ - **Ambiguous**: read test intent. If behavior intentionally changed, update
19
+ test and document in commit message.
20
+
21
+ ### 3. If coverage below 80%
22
+
23
+ Check "Missing" column. Prioritize:
24
+ 1. New code you just wrote (must have tests).
25
+ 2. Critical paths (error handling, validation, CLI logic).
26
+ 3. Utility functions with clear contracts.
27
+
28
+ Do NOT: add trivial tests just to raise numbers, add `# pragma: no cover`
29
+ without justification, or test third-party/Streamlit internals.
30
+
31
+ ### 4. Write tests
32
+
33
+ Add to `tests/test_<module>.py`. Use `project_layout` fixture when needed.
34
+ One behavior per test function.
35
+
36
+ ### 5. Re-run `make test-cov-check`
37
+
38
+ Repeat until threshold met.
39
+
40
+ ### 6. HTML report (optional)
41
+
42
+ `make test-cov` -- opens `htmlcov/index.html`.
43
+
44
+ ## Failure handling
45
+
46
+ - Missing `pytest-cov`: run `uv sync --dev`.
47
+ - Uncoverable lines (platform-specific, external calls): add
48
+ `# pragma: no cover` with reason, note in commit message.
@@ -0,0 +1,38 @@
1
+ {
2
+ "skill_name": "check-coverage",
3
+ "evals": [
4
+ {
5
+ "id": 1,
6
+ "prompt": "Check test coverage and fix any gaps.",
7
+ "expected_output": "Agent runs coverage check, identifies uncovered lines, and proposes meaningful tests.",
8
+ "assertions": [
9
+ "Agent runs `make test-cov-check` or equivalent pytest-cov command",
10
+ "Agent examines the coverage report to identify uncovered lines",
11
+ "Agent proposes tests for uncovered code rather than adding pragma comments",
12
+ "Agent does NOT add trivial or empty tests solely to raise the number"
13
+ ]
14
+ },
15
+ {
16
+ "id": 2,
17
+ "prompt": "The CI is failing because test coverage dropped below 80%. Fix it.",
18
+ "expected_output": "Agent identifies which lines lost coverage, writes targeted tests, and re-verifies.",
19
+ "assertions": [
20
+ "Agent runs `make test-cov-check` to reproduce the failure",
21
+ "Agent identifies specific uncovered lines from the report",
22
+ "Agent writes tests in the corresponding tests/test_<module>.py file",
23
+ "Agent re-runs `make test-cov-check` to verify the fix",
24
+ "Agent does NOT lower the coverage threshold in pyproject.toml"
25
+ ]
26
+ },
27
+ {
28
+ "id": 3,
29
+ "prompt": "Some tests are failing after my code change. Also coverage is below threshold.",
30
+ "expected_output": "Agent fixes test failures FIRST, then addresses coverage gaps.",
31
+ "assertions": [
32
+ "Agent fixes existing test failures before addressing coverage",
33
+ "Agent fixes production code (not tests) when existing tests break",
34
+ "Agent addresses coverage only after all tests pass"
35
+ ]
36
+ }
37
+ ]
38
+ }
@@ -0,0 +1,90 @@
1
+ ---
2
+ name: check-pr-comments
3
+ description: Fetch unresolved PR review threads, triage them, implement fixes, validate, reply in-thread, and resolve.
4
+ compatibility: gh must be installed and authenticated.
5
+ ---
6
+
7
+ # Address PR Comments
8
+
9
+ ## Steps
10
+
11
+ ### 1. Identify the PR
12
+
13
+ Run `gh auth status`. Use the user-supplied PR number/URL, or detect from
14
+ current branch: `gh pr view --json number,title,url,headRefName,baseRefName`.
15
+ If no PR found, ask the user.
16
+
17
+ ### 2. Fetch unresolved review threads
18
+
19
+ Get repo owner/name: `gh repo view --json owner,name -q '.owner.login + " " + .name'`
20
+
21
+ Fetch threads via GraphQL:
22
+
23
+ ```bash
24
+ gh api graphql -f query="
25
+ query(\$owner:String!, \$repo:String!, \$number:Int!) {
26
+ repository(owner:\$owner, name:\$repo) {
27
+ pullRequest(number:\$number) {
28
+ reviewThreads(first:100) {
29
+ pageInfo { hasNextPage endCursor }
30
+ nodes {
31
+ id isResolved isOutdated
32
+ comments(first:20) {
33
+ pageInfo { hasNextPage endCursor }
34
+ nodes { id author{login} body path line url }
35
+ }
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }" -F owner=<OWNER> -F repo=<REPO> -F number=<PR_NUMBER>
41
+ ```
42
+
43
+ If `hasNextPage` is true, re-run the query adding `after: "<endCursor>"`
44
+ to the corresponding connection (e.g., `reviewThreads(first:100, after:"<cursor>")`).
45
+ Focus on `isResolved: false` threads.
46
+
47
+ ### 3. Triage table -- stop for approval
48
+
49
+ Present a Markdown table before any edits:
50
+
51
+ | Comment | File | Triage |
52
+ | --- | --- | --- |
53
+ | <paraphrase> | `path` or `PR-level` | Implement / Reply only / Blocked |
54
+
55
+ Wait for **explicit** user approval before proceeding.
56
+
57
+ ### 4. Apply fixes
58
+
59
+ Address one thread at a time, minimal changes. Fix root cause once when
60
+ multiple threads share it.
61
+
62
+ ### 5. Validate
63
+
64
+ Run smallest meaningful validation for the changed area. Do not claim
65
+ "fixed" without running validation or stating it is unverified.
66
+
67
+ ### 6. Reply and resolve
68
+
69
+ Reply in-thread:
70
+ ```bash
71
+ gh api graphql -f query="mutation(\$threadId:ID!, \$body:String!) {
72
+ addPullRequestReviewThreadReply(input:{pullRequestReviewThreadId:\$threadId, body:\$body})
73
+ { comment { url } }
74
+ }" -F threadId=<ID> -f body='Addressed in <summary>.'
75
+ ```
76
+
77
+ Resolve only after reply and real fix:
78
+ ```bash
79
+ gh api graphql -f query="mutation(\$threadId:ID!) {
80
+ resolveReviewThread(input:{threadId:\$threadId}) { thread { id isResolved } }
81
+ }" -F threadId=<ID>
82
+ ```
83
+
84
+ For explanation-only replies, leave thread open unless user says to resolve.
85
+
86
+ ## Guardrails
87
+
88
+ - No edits, replies, or resolves before user approves the triage table.
89
+ - No unrelated cleanups while addressing comments.
90
+ - No silent thread resolution without a reply and real fix.
@@ -0,0 +1,42 @@
1
+ {
2
+ "skill_name": "check-pr-comments",
3
+ "evals": [
4
+ {
5
+ "id": 1,
6
+ "prompt": "Use the GitHub CLI to address the unresolved review comments on PR #123, make the necessary fixes, and reply to the threads.",
7
+ "expected_output": "Agent verifies gh access, inspects unresolved review threads for the PR, presents a Markdown triage table, and then pauses for explicit approval before any code changes or GitHub replies.",
8
+ "assertions": [
9
+ "Agent runs `gh auth status` before relying on GitHub CLI API calls",
10
+ "Agent identifies the target PR explicitly rather than scanning arbitrary repository comments",
11
+ "Agent fetches review threads with `gh api graphql` or an equivalent gh-based API call that preserves thread state",
12
+ "Agent presents a Markdown table that includes comment summary, referenced file, and triage decision before implementation",
13
+ "Agent explicitly asks for or waits for user approval after showing the triage table",
14
+ "Agent does NOT apply code changes or post GitHub replies before approval"
15
+ ]
16
+ },
17
+ {
18
+ "id": 2,
19
+ "prompt": "Check the GitHub review comments on my current branch's PR using gh.",
20
+ "expected_output": "Agent discovers the PR from the current branch with gh, shows a Markdown triage table for unresolved review threads, and waits for approval before working through them.",
21
+ "assertions": [
22
+ "Agent uses `gh pr view --json` or equivalent to discover the PR for the current branch when no PR number is given",
23
+ "Agent asks for a PR number or URL if no PR can be inferred from the current branch",
24
+ "Agent prioritizes unresolved threads over already resolved ones",
25
+ "Agent classifies each unresolved thread as `Implement`, `Reply only`, or `Blocked`",
26
+ "Agent does NOT treat the initial request itself as sufficient approval to edit code"
27
+ ]
28
+ },
29
+ {
30
+ "id": 3,
31
+ "prompt": "A reviewer left an inline PR comment, but I think the current implementation is correct. Handle it with the GitHub CLI.",
32
+ "expected_output": "Agent inspects the code and the comment, marks the thread as reply-only in the Markdown triage table, and waits for approval before posting or drafting the response.",
33
+ "assertions": [
34
+ "Agent reads the referenced code before deciding whether a code change is needed",
35
+ "Agent allows for an explanation-only outcome when the reviewer request should not be implemented",
36
+ "Agent marks explanation-only threads as `Reply only` in the triage table",
37
+ "Agent waits for approval before replying on GitHub",
38
+ "Agent does NOT resolve the thread silently without addressing it in a reply"
39
+ ]
40
+ }
41
+ ]
42
+ }
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: create-branch
3
+ description: Create a feature branch following project naming conventions. Use when starting work on a ticket, after understanding the scope, or when the agent needs to branch off main for new work.
4
+ ---
5
+
6
+ # Create Branch
7
+
8
+ Create a feature branch following the `<nickname>/<descriptive-branch-name>`
9
+ convention used in this repository.
10
+
11
+ ## Steps
12
+
13
+ ### 1. Detect the user's nickname
14
+
15
+ Resolve the nickname using the first approach that succeeds:
16
+
17
+ 1. **Memory** — check if a stored memory already contains the user's nickname.
18
+ 2. **`make nickname`** — outputs the local part of `git config user.email` (before `@`).
19
+ 3. **Ask** — if neither works, ask the user.
20
+
21
+ Once resolved, save the nickname to memory for future conversations.
22
+
23
+ ### 2. Derive a descriptive branch name
24
+
25
+ Combine the ticket ID (if available) and a short slug describing the change:
26
+
27
+ - Use lowercase kebab-case: `fix-auth-timeout`, `add-mcp-tool-list`
28
+ - Keep it under 50 characters
29
+ - If a YouTrack ticket is known (e.g., `DBA-123`), prefer including it:
30
+ `<nickname>/DBA-123-fix-auth-timeout`
31
+
32
+ ### 3. Ensure a clean starting point
33
+
34
+ - Fetch latest: `git fetch origin`
35
+ - If the working tree has uncommitted changes, warn the user and ask whether
36
+ to stash or proceed.
37
+ - Branch from `main` (or the base branch the user specifies):
38
+ `git checkout -b <nickname>/<branch-name> origin/main`
39
+
40
+ ### 4. Confirm
41
+
42
+ Report the created branch name to the user.
43
+
44
+ ## Guardrails
45
+
46
+ - Never create branches directly on `main` — always branch _from_ main.
47
+ - Never silently discard uncommitted changes.
48
+ - If the user is already on a feature branch, ask before switching.
@@ -0,0 +1,38 @@
1
+ {
2
+ "skill_name": "create-branch",
3
+ "evals": [
4
+ {
5
+ "id": 1,
6
+ "prompt": "Create a branch for ticket DBA-150 about fixing the status command output.",
7
+ "expected_output": "Agent detects nickname from remotes, creates a branch like <nickname>/DBA-150-fix-status-output from origin/main.",
8
+ "assertions": [
9
+ "Agent resolves the nickname from memory or git email",
10
+ "Agent fetches from origin before creating the branch",
11
+ "Branch name follows `<nickname>/<descriptive-name>` pattern",
12
+ "Branch is created from origin/main, not from the current HEAD of an unrelated branch",
13
+ "Agent reports the created branch name to the user"
14
+ ]
15
+ },
16
+ {
17
+ "id": 2,
18
+ "prompt": "I need a new branch for some exploratory work, no ticket yet.",
19
+ "expected_output": "Agent creates a branch with a descriptive name without a ticket prefix.",
20
+ "assertions": [
21
+ "Agent resolves the nickname from memory or git email",
22
+ "Agent asks or derives a descriptive slug for the branch",
23
+ "Branch name does NOT include a ticket ID since none was provided",
24
+ "Agent does NOT require a ticket to proceed"
25
+ ]
26
+ },
27
+ {
28
+ "id": 3,
29
+ "prompt": "Create a branch for DBA-200. I have uncommitted changes in my working tree.",
30
+ "expected_output": "Agent warns about uncommitted changes and asks user how to proceed before branching.",
31
+ "assertions": [
32
+ "Agent detects or warns about uncommitted changes",
33
+ "Agent asks the user whether to stash, commit, or abort before switching branches",
34
+ "Agent does NOT silently discard uncommitted changes"
35
+ ]
36
+ }
37
+ ]
38
+ }
@@ -0,0 +1,64 @@
1
+ ---
2
+ name: create-pr
3
+ description: Stage, commit, push, and open a GitHub PR following project conventions. Use when code is ready to ship.
4
+ compatibility: gh must be installed and authenticated.
5
+ ---
6
+
7
+ # Create PR
8
+
9
+ ## Steps
10
+
11
+ ### 1. Verify preconditions
12
+
13
+ - Must NOT be on `main`. If so, run `create-branch` skill first.
14
+ - Check `git status` for changes. If clean, inform user and stop.
15
+
16
+ ### 2. Run quality gates
17
+
18
+ Run all three gates from **Quality Gates** in `CLAUDE.md`. Do not commit
19
+ until they pass.
20
+
21
+ ### 3. Stage and commit
22
+
23
+ - Extract ticket ID from branch name (`DBA-<number>`) or ask user.
24
+ - Stage specific files (never `git add -A`).
25
+ - Commit per **Commit Messages** in `CLAUDE.md`.
26
+
27
+ ### 4. Pause for confirmation
28
+
29
+ Show branch, commit(s), and draft PR description. Wait for explicit approval.
30
+
31
+ > **Autosteer exception**: skip this pause.
32
+
33
+ ### 5. Push and create PR
34
+
35
+ Push with `-u` flag. Create PR via `gh pr create` using this template:
36
+
37
+ ```
38
+ ## Summary
39
+ <1-3 sentence overview>
40
+
41
+ ## Changes
42
+
43
+ ### <Logical change 1>
44
+ <Brief description>
45
+ <details><summary>Files</summary>
46
+
47
+ - `path/to/file`
48
+ </details>
49
+
50
+ ## Test Plan
51
+ - [ ] <Verification step>
52
+ ```
53
+
54
+ ### 6. Report
55
+
56
+ Output the PR URL.
57
+
58
+ ## Guardrails
59
+
60
+ - Never push to `main`.
61
+ - Never push without user confirmation (except autosteer).
62
+ - Never skip commit prefix when ticket is known.
63
+ - Never use `git add -A` or `git add .`.
64
+ - If `gh` unavailable, show manual push/PR instructions.
@@ -0,0 +1,38 @@
1
+ {
2
+ "skill_name": "create-pr",
3
+ "evals": [
4
+ {
5
+ "id": 1,
6
+ "prompt": "Create a PR for the changes on my current branch. The ticket is DBA-180.",
7
+ "expected_output": "Agent stages changes, commits with [DBA-180] prefix, presents a draft PR, pauses for confirmation, then pushes and creates the PR.",
8
+ "assertions": [
9
+ "Agent commits with a message prefixed by [DBA-180]",
10
+ "Agent presents a draft PR description to the user before pushing",
11
+ "Agent waits for explicit user confirmation before pushing",
12
+ "Agent pushes with the -u flag",
13
+ "PR description follows the Summary / Changes / Test Plan template",
14
+ "Agent reports the PR URL after creation"
15
+ ]
16
+ },
17
+ {
18
+ "id": 2,
19
+ "prompt": "Ship my changes as a PR. I'm on a feature branch but I don't remember the ticket number.",
20
+ "expected_output": "Agent tries to extract the ticket ID from the branch name; if not found, asks the user.",
21
+ "assertions": [
22
+ "Agent attempts to extract a ticket ID from the current branch name",
23
+ "If no ticket ID is found in the branch name, agent asks the user",
24
+ "Agent does NOT push without a commit message prefix when a ticket is expected"
25
+ ]
26
+ },
27
+ {
28
+ "id": 3,
29
+ "prompt": "Create a PR. I'm currently on the main branch.",
30
+ "expected_output": "Agent refuses to push directly to main and suggests creating a feature branch first.",
31
+ "assertions": [
32
+ "Agent detects that the current branch is main",
33
+ "Agent does NOT push to main",
34
+ "Agent suggests creating a feature branch or switching to one"
35
+ ]
36
+ }
37
+ ]
38
+ }
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: eval-skills
3
+ description: Run structured evaluations on skills to measure quality and track improvements.
4
+ argument-hint: "[skill-name ...] (e.g. local-code-review review-architecture)"
5
+ ---
6
+
7
+ # Eval Skills
8
+
9
+ ## Steps
10
+
11
+ ### 1. Determine skills to evaluate
12
+
13
+ If names provided via `$ARGUMENTS`, evaluate those. Otherwise list skills
14
+ with `evals/evals.json` files and ask user to pick (accept "all").
15
+
16
+ ### 2. Create iteration directory
17
+
18
+ ```bash
19
+ mkdir -p .claude/evals-workspace/iteration-<N>
20
+ ```
21
+
22
+ Use next sequential number.
23
+
24
+ ### 3. Run eval cases
25
+
26
+ For each test case in `evals.json`, run twice:
27
+
28
+ - **With skill**: subagent with skill loaded, save to `iteration-<N>/<skill>-<id>/with_skill/outputs/`
29
+ - **Without skill**: subagent without skill, save to `iteration-<N>/<skill>-<id>/without_skill/outputs/`
30
+
31
+ Each run starts with clean context.
32
+
33
+ ### 4. Grade
34
+
35
+ Evaluate assertions against output. Save `grading.json`:
36
+ ```json
37
+ {
38
+ "assertion_results": [{"text": "...", "passed": true, "evidence": "..."}],
39
+ "summary": {"passed": 3, "failed": 1, "total": 4, "pass_rate": 0.75}
40
+ }
41
+ ```
42
+
43
+ Require concrete evidence for every PASS.
44
+
45
+ ### 5. Aggregate
46
+
47
+ Save `iteration-<N>/benchmark.json` with mean pass rates (with/without skill) and delta.
48
+
49
+ ### 6. Present results
50
+
51
+ Show per-eval pass rates, overall delta, always-pass candidates (remove?),
52
+ always-fail candidates (revise?). Save feedback to `feedback.json`.
53
+
54
+ ## Iteration loop
55
+
56
+ Update SKILL.md based on findings, run new iteration, compare benchmarks,
57
+ stop when pass rates plateau.
@@ -0,0 +1,70 @@
1
+ ---
2
+ name: local-code-review
3
+ description: Review local code changes for correctness, regressions, missing tests, and Databao-specific risks.
4
+ argument-hint: "[scope: staged | branch | files:<path>]"
5
+ context: fork
6
+ agent: reviewer
7
+ ---
8
+
9
+ # Local Code Review
10
+
11
+ You are reviewing code changes for Databao CLI with NO prior context.
12
+
13
+ ## Scope
14
+
15
+ Review scope: $ARGUMENTS (default: `branch`)
16
+
17
+ - `staged` -- `git diff --cached`
18
+ - `branch` -- diff against main
19
+ - `files:<path>` -- specific files/directories
20
+
21
+ ## Steps
22
+
23
+ ### 1. Discover changes
24
+
25
+ Run `git status --short`, then inspect the relevant diff. Read diffs before
26
+ reading large surrounding files.
27
+
28
+ ### 2. Review
29
+
30
+ 1. Read the diff carefully.
31
+ 2. Read surrounding implementation for changed logic.
32
+ 3. Check related tests -- identify where tests should have changed but did not.
33
+
34
+ #### Databao-specific priorities
35
+
36
+ Pay extra attention when changes touch:
37
+ - CLI/API/UI behavior (defaults, help text, argument handling, output)
38
+ - Agent/executor/model-provider wiring (provider defaults, tool contracts)
39
+ - MCP/plugin/integration boundaries
40
+ - Config/build/init flows, datasource/schema/context logic
41
+ - Packaging/deps/lockfile (extras, entrypoints, transitive impact)
42
+ - Test coverage for changed behavior
43
+
44
+ #### Validation
45
+
46
+ Run non-mutating checks only:
47
+ - `uv run pytest <targeted paths>` or full suite if practical
48
+ - `uv run ruff check <paths>`, `uv run ruff format --check <paths>`
49
+ - `uv run mypy <paths>`, `uv lock --check`
50
+
51
+ Never run `--fix` or mutating formatters in review mode.
52
+
53
+ ### 3. Report findings
54
+
55
+ Order by severity. Each finding:
56
+ - Severity label + concise title
57
+ - Why it matters
58
+ - File and line reference
59
+ - Remediation direction (brief)
60
+
61
+ Then: open questions, testing gaps, validation performed.
62
+
63
+ No findings? Say so, mention residual risk or untested surface.
64
+
65
+ ## Guardrails
66
+
67
+ - Short code snippets for fixes, not full rewrites.
68
+ - Do not bury findings under summaries.
69
+ - Do not claim tests passed unless you ran them.
70
+ - Prefer evidence from the diff over style opinions.
@@ -0,0 +1,51 @@
1
+ {
2
+ "skill_name": "local-code-review",
3
+ "evals": [
4
+ {
5
+ "id": 1,
6
+ "prompt": "/local-code-review branch",
7
+ "expected_output": "Agent determines branch review scope from git, inspects the actual diff, and returns a findings-first review or an explicit no-findings verdict with file references and a testing note.",
8
+ "assertions": [
9
+ "Agent determines scope from the current branch diff against the main branch or merge base",
10
+ "Agent inspects the actual git diff before broad repository scanning",
11
+ "Output presents findings first or explicitly states that no findings were found",
12
+ "Output references files and line numbers for any reported findings",
13
+ "Output includes a testing gap or validation-performed note"
14
+ ]
15
+ },
16
+ {
17
+ "id": 2,
18
+ "prompt": "/local-code-review staged",
19
+ "expected_output": "Agent performs staged-changes scope discovery from git, stays read-only, and returns severity-ordered findings tied to the staged diff.",
20
+ "assertions": [
21
+ "Agent inspects staged changes via git diff --cached",
22
+ "Agent reads the diff for changed files before reading large surrounding files",
23
+ "Output orders findings by severity and ties them to concrete behavior risks",
24
+ "Output includes open questions or assumptions",
25
+ "Agent does NOT edit any files"
26
+ ]
27
+ },
28
+ {
29
+ "id": 3,
30
+ "prompt": "/local-code-review files:src/databao_cli/mcp/",
31
+ "expected_output": "Agent reviews the specified files/directory, reading them and their recent git history.",
32
+ "assertions": [
33
+ "Agent focuses review on files under src/databao_cli/mcp/",
34
+ "Agent reads the actual file contents or diffs for the specified path",
35
+ "Output presents findings with file and line references",
36
+ "Agent does NOT edit any files"
37
+ ]
38
+ },
39
+ {
40
+ "id": 4,
41
+ "prompt": "/local-code-review",
42
+ "expected_output": "Agent defaults to branch scope when no argument is provided and runs a branch review.",
43
+ "assertions": [
44
+ "Agent defaults to reviewing the branch diff against main",
45
+ "Agent inspects the repo's available tooling before choosing validation commands",
46
+ "If validation is run, agent uses non-mutating commands",
47
+ "Agent does NOT run mutating commands such as formatter fixes"
48
+ ]
49
+ }
50
+ ]
51
+ }