freeharness 0.4.1

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 (375) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE +108 -0
  3. package/README.md +134 -0
  4. package/canonical/HARVEST.yaml +858 -0
  5. package/canonical/PROVENANCE.yaml +740 -0
  6. package/canonical/agents/README.md +95 -0
  7. package/canonical/agents/agentic-architect.md +18 -0
  8. package/canonical/agents/database-reviewer.md +41 -0
  9. package/canonical/agents/explorer-ai-engineer-analyst.md +65 -0
  10. package/canonical/agents/pr-reviewer.md +96 -0
  11. package/canonical/agents/python-reviewer.md +55 -0
  12. package/canonical/agents/report-formatter.md +19 -0
  13. package/canonical/agents/security-reviewer.md +53 -0
  14. package/canonical/agents/test-writer.md +34 -0
  15. package/canonical/commands/fh-context.md +37 -0
  16. package/canonical/evals/promptfoo.redteam.yaml +108 -0
  17. package/canonical/hooks/cost-prices.json +14 -0
  18. package/canonical/hooks/freeharness-auto-memory.mjs +158 -0
  19. package/canonical/hooks/freeharness-config-guard.mjs +162 -0
  20. package/canonical/hooks/freeharness-context-monitor.mjs +198 -0
  21. package/canonical/hooks/freeharness-converge.mjs +227 -0
  22. package/canonical/hooks/freeharness-cost-tracker.mjs +1027 -0
  23. package/canonical/hooks/freeharness-memory-guard.mjs +57 -0
  24. package/canonical/hooks/freeharness-output-pruner.mjs +333 -0
  25. package/canonical/hooks/freeharness-precompact.mjs +323 -0
  26. package/canonical/hooks/freeharness-repeat-tool.mjs +208 -0
  27. package/canonical/hooks/freeharness-security-guidance.mjs +164 -0
  28. package/canonical/hooks/freeharness-session-start +583 -0
  29. package/canonical/hooks/hooks.auto-memory.claude-code.json +16 -0
  30. package/canonical/hooks/hooks.claude-code.json +17 -0
  31. package/canonical/hooks/hooks.config-guard.claude-code.json +16 -0
  32. package/canonical/hooks/hooks.context-monitor.claude-code.json +15 -0
  33. package/canonical/hooks/hooks.converge.claude-code.json +15 -0
  34. package/canonical/hooks/hooks.cost-tracker.claude-code.json +37 -0
  35. package/canonical/hooks/hooks.memory-guard.claude-code.json +16 -0
  36. package/canonical/hooks/hooks.output-pruner.claude-code.json +16 -0
  37. package/canonical/hooks/hooks.precompact.claude-code.json +15 -0
  38. package/canonical/hooks/hooks.repeat-tool.claude-code.json +25 -0
  39. package/canonical/hooks/hooks.security-guidance.claude-code.json +16 -0
  40. package/canonical/mcp/servers.json +20 -0
  41. package/canonical/openspec/config.base.yaml +89 -0
  42. package/canonical/openspec/schema.spec-driven.yaml +277 -0
  43. package/canonical/openspec/templates/data-contract.md +36 -0
  44. package/canonical/openspec/templates/design.md +84 -0
  45. package/canonical/openspec/templates/eval-plan.md +33 -0
  46. package/canonical/openspec/templates/follow-ups.md +2 -0
  47. package/canonical/openspec/templates/proposal.md +45 -0
  48. package/canonical/openspec/templates/spec.md +42 -0
  49. package/canonical/openspec/templates/tasks.md +38 -0
  50. package/canonical/profiles/local-llamacpp.LOCAL-MODELS.md +47 -0
  51. package/canonical/profiles/local-llamacpp.json +27 -0
  52. package/canonical/profiles/local-ollama.json +20 -0
  53. package/canonical/profiles/mcp.json +91 -0
  54. package/canonical/rules/CLAUDE.md +78 -0
  55. package/canonical/rules/project-CLAUDE.template.md +62 -0
  56. package/canonical/rules/routing.md +20 -0
  57. package/canonical/rules/safety.md +41 -0
  58. package/canonical/settings/settings.cache-hygiene.claude-code.json +5 -0
  59. package/canonical/skills/agent-evaluation/SKILL.md +102 -0
  60. package/canonical/skills/agent-evaluation/assets/evaluation_report_template.md +206 -0
  61. package/canonical/skills/agent-evaluation/evals/cases.yaml +106 -0
  62. package/canonical/skills/agent-evaluation/references/dataset-preparation.md +351 -0
  63. package/canonical/skills/agent-evaluation/references/scorers-constraints.md +165 -0
  64. package/canonical/skills/agent-evaluation/references/scorers.md +431 -0
  65. package/canonical/skills/agent-evaluation/references/setup-guide.md +252 -0
  66. package/canonical/skills/agent-evaluation/references/tracing-integration.md +164 -0
  67. package/canonical/skills/agent-evaluation/references/troubleshooting.md +514 -0
  68. package/canonical/skills/agent-evaluation/scripts/analyze_results.py +462 -0
  69. package/canonical/skills/agent-evaluation/scripts/create_dataset_template.py +382 -0
  70. package/canonical/skills/agent-evaluation/scripts/list_datasets.py +273 -0
  71. package/canonical/skills/agent-evaluation/scripts/run_evaluation_template.py +309 -0
  72. package/canonical/skills/agent-evaluation/scripts/setup_mlflow.py +353 -0
  73. package/canonical/skills/agent-evaluation/scripts/utils/__init__.py +27 -0
  74. package/canonical/skills/agent-evaluation/scripts/utils/env_validation.py +123 -0
  75. package/canonical/skills/agent-evaluation/scripts/utils/tracing_utils.py +108 -0
  76. package/canonical/skills/agent-evaluation/scripts/validate_agent_tracing.py +148 -0
  77. package/canonical/skills/agent-evaluation/scripts/validate_auth.py +240 -0
  78. package/canonical/skills/agent-evaluation/scripts/validate_environment.py +185 -0
  79. package/canonical/skills/agent-evaluation/scripts/validate_tracing_runtime.py +318 -0
  80. package/canonical/skills/agentic-architecture/SKILL.md +41 -0
  81. package/canonical/skills/agentic-architecture/evals/cases.yaml +94 -0
  82. package/canonical/skills/agentic-architecture/reference/context-engineering.md +75 -0
  83. package/canonical/skills/agentic-architecture/reference/patterns.md +76 -0
  84. package/canonical/skills/agentic-architecture/reference/reliability-observability.md +94 -0
  85. package/canonical/skills/agentic-architecture/reference/review-framework.md +59 -0
  86. package/canonical/skills/code-review/SKILL.md +52 -0
  87. package/canonical/skills/code-review/evals/cases.yaml +197 -0
  88. package/canonical/skills/git-workflow/SKILL.md +41 -0
  89. package/canonical/skills/git-workflow/evals/cases.yaml +92 -0
  90. package/canonical/skills/local-code/SKILL.md +24 -0
  91. package/canonical/skills/local-code/evals/cases.yaml +85 -0
  92. package/canonical/skills/local-code/scripts/query_llama.py +68 -0
  93. package/canonical/skills/report-formatting/SKILL.md +62 -0
  94. package/canonical/skills/report-formatting/evals/cases.yaml +83 -0
  95. package/canonical/skills/report-formatting/reference/ARCHITECTURE.md +135 -0
  96. package/canonical/skills/report-formatting/reference/HELPERS.md +120 -0
  97. package/canonical/skills/report-formatting/reference/PPTX.md +136 -0
  98. package/canonical/skills/report-formatting/reference/RELEASE.md +99 -0
  99. package/canonical/skills/report-formatting/reference/TEMPLATES.md +48 -0
  100. package/canonical/skills/report-formatting/reference/authoring.md +66 -0
  101. package/canonical/skills/report-formatting/scripts/architecture-template.md +271 -0
  102. package/canonical/skills/report-formatting/scripts/assets/claro-logo.png +0 -0
  103. package/canonical/skills/report-formatting/scripts/assets/claro-wordmark.svg +1 -0
  104. package/canonical/skills/report-formatting/scripts/build-architecture.js +57 -0
  105. package/canonical/skills/report-formatting/scripts/build-md-claro.js +224 -0
  106. package/canonical/skills/report-formatting/scripts/build-release.js +51 -0
  107. package/canonical/skills/report-formatting/scripts/check-env.js +58 -0
  108. package/canonical/skills/report-formatting/scripts/docmodel.js +283 -0
  109. package/canonical/skills/report-formatting/scripts/example-build.js +119 -0
  110. package/canonical/skills/report-formatting/scripts/example_build_ArchitectureReview_docx.js +195 -0
  111. package/canonical/skills/report-formatting/scripts/example_build_ExecutiveReport_docx.js +114 -0
  112. package/canonical/skills/report-formatting/scripts/package.json +17 -0
  113. package/canonical/skills/report-formatting/scripts/pptx/example_build_StatusReport_pptx.py +223 -0
  114. package/canonical/skills/report-formatting/scripts/pptx/example_build_WeeklyStatus_pptx.py +245 -0
  115. package/canonical/skills/report-formatting/scripts/pptx/pptx_office.py +144 -0
  116. package/canonical/skills/report-formatting/scripts/pptx/requirements.txt +7 -0
  117. package/canonical/skills/report-formatting/scripts/pptx/status_report_blocks.py +193 -0
  118. package/canonical/skills/report-formatting/scripts/pptx/theme_claro_pptx.py +473 -0
  119. package/canonical/skills/report-formatting/scripts/release-template.md +80 -0
  120. package/canonical/skills/report-formatting/scripts/render-mermaid.js +105 -0
  121. package/canonical/skills/report-formatting/scripts/theme-claro.js +403 -0
  122. package/canonical/skills/subagent-driven-development/SKILL.md +60 -0
  123. package/canonical/skills/subagent-driven-development/evals/cases.yaml +208 -0
  124. package/canonical/skills/subagent-driven-development/reference/brief.md +91 -0
  125. package/canonical/skills/subagent-driven-development/reference/handoff.md +118 -0
  126. package/canonical/skills/subagent-driven-development/scripts/validate-handoff.mjs +850 -0
  127. package/canonical/skills/systematic-debugging/SKILL.md +44 -0
  128. package/canonical/skills/systematic-debugging/evals/cases.yaml +90 -0
  129. package/canonical/skills/test-driven-development/SKILL.md +42 -0
  130. package/canonical/skills/test-driven-development/evals/cases.yaml +86 -0
  131. package/canonical/skills/test-driven-development/reference/writing-good-tests.md +52 -0
  132. package/canonical/skills/verification-before-completion/SKILL.md +53 -0
  133. package/canonical/skills/verification-before-completion/evals/cases.yaml +107 -0
  134. package/dist/adapters/content/language-lint.d.ts +46 -0
  135. package/dist/adapters/content/language-lint.js +191 -0
  136. package/dist/adapters/harness/claude-code.d.ts +57 -0
  137. package/dist/adapters/harness/claude-code.js +385 -0
  138. package/dist/adapters/harness/index.d.ts +3 -0
  139. package/dist/adapters/harness/index.js +17 -0
  140. package/dist/adapters/harness/opencode.d.ts +7 -0
  141. package/dist/adapters/harness/opencode.js +166 -0
  142. package/dist/adapters/harness/plugin.d.ts +22 -0
  143. package/dist/adapters/harness/plugin.js +257 -0
  144. package/dist/adapters/memory/doctor.d.ts +480 -0
  145. package/dist/adapters/memory/doctor.js +1217 -0
  146. package/dist/adapters/memory/vendored.d.ts +150 -0
  147. package/dist/adapters/memory/vendored.js +487 -0
  148. package/dist/adapters/package/node.d.ts +9 -0
  149. package/dist/adapters/package/node.js +20 -0
  150. package/dist/adapters/prompt/readline.d.ts +19 -0
  151. package/dist/adapters/prompt/readline.js +53 -0
  152. package/dist/adapters/sync/diff.d.ts +43 -0
  153. package/dist/adapters/sync/diff.js +380 -0
  154. package/dist/cli/cleanup.d.ts +86 -0
  155. package/dist/cli/cleanup.js +382 -0
  156. package/dist/cli/cost.d.ts +304 -0
  157. package/dist/cli/cost.js +501 -0
  158. package/dist/cli/doctor.d.ts +205 -0
  159. package/dist/cli/doctor.js +654 -0
  160. package/dist/cli/executor.d.ts +5 -0
  161. package/dist/cli/executor.js +48 -0
  162. package/dist/cli/plugin-validate.d.ts +37 -0
  163. package/dist/cli/plugin-validate.js +256 -0
  164. package/dist/cli/prefix.d.ts +68 -0
  165. package/dist/cli/prefix.js +218 -0
  166. package/dist/cli/profile.d.ts +170 -0
  167. package/dist/cli/profile.js +285 -0
  168. package/dist/cli/runner.d.ts +10 -0
  169. package/dist/cli/runner.js +27 -0
  170. package/dist/cli/uninstall.d.ts +65 -0
  171. package/dist/cli/uninstall.js +147 -0
  172. package/dist/index.d.ts +8 -0
  173. package/dist/index.js +989 -0
  174. package/dist/infra/dogfood.d.ts +31 -0
  175. package/dist/infra/dogfood.js +51 -0
  176. package/dist/infra/fsutil.d.ts +40 -0
  177. package/dist/infra/fsutil.js +143 -0
  178. package/dist/infra/manifest.d.ts +76 -0
  179. package/dist/infra/manifest.js +92 -0
  180. package/dist/infra/paths.d.ts +19 -0
  181. package/dist/infra/paths.js +74 -0
  182. package/dist/infra/routing.d.ts +4 -0
  183. package/dist/infra/routing.js +7 -0
  184. package/node_modules/@freeharness/core/dist/context.d.ts +30 -0
  185. package/node_modules/@freeharness/core/dist/context.js +1 -0
  186. package/node_modules/@freeharness/core/dist/index.d.ts +5 -0
  187. package/node_modules/@freeharness/core/dist/index.js +6 -0
  188. package/node_modules/@freeharness/core/dist/planner.d.ts +13 -0
  189. package/node_modules/@freeharness/core/dist/planner.js +18 -0
  190. package/node_modules/@freeharness/core/dist/ports.d.ts +90 -0
  191. package/node_modules/@freeharness/core/dist/ports.js +1 -0
  192. package/node_modules/@freeharness/core/dist/registry.d.ts +41 -0
  193. package/node_modules/@freeharness/core/dist/registry.js +124 -0
  194. package/node_modules/@freeharness/core/dist/tiers.d.ts +30 -0
  195. package/node_modules/@freeharness/core/dist/tiers.js +99 -0
  196. package/node_modules/@freeharness/core/package.json +34 -0
  197. package/node_modules/@freeharness/sdd/PROVENANCE.yaml +175 -0
  198. package/node_modules/@freeharness/sdd/dist/src/bin/openspec.d.ts +2 -0
  199. package/node_modules/@freeharness/sdd/dist/src/bin/openspec.js +166 -0
  200. package/node_modules/@freeharness/sdd/dist/src/index.d.ts +14 -0
  201. package/node_modules/@freeharness/sdd/dist/src/index.js +11 -0
  202. package/node_modules/@freeharness/sdd/dist/src/init.d.ts +39 -0
  203. package/node_modules/@freeharness/sdd/dist/src/init.js +190 -0
  204. package/node_modules/@freeharness/sdd/dist/src/root-resolver.d.ts +8 -0
  205. package/node_modules/@freeharness/sdd/dist/src/root-resolver.js +32 -0
  206. package/node_modules/@freeharness/sdd/dist/src/shim/archive.d.ts +81 -0
  207. package/node_modules/@freeharness/sdd/dist/src/shim/archive.js +483 -0
  208. package/node_modules/@freeharness/sdd/dist/src/shim/context.d.ts +4 -0
  209. package/node_modules/@freeharness/sdd/dist/src/shim/context.js +48 -0
  210. package/node_modules/@freeharness/sdd/dist/src/shim/follow-up.d.ts +57 -0
  211. package/node_modules/@freeharness/sdd/dist/src/shim/follow-up.js +279 -0
  212. package/node_modules/@freeharness/sdd/dist/src/shim/instructions.d.ts +67 -0
  213. package/node_modules/@freeharness/sdd/dist/src/shim/instructions.js +460 -0
  214. package/node_modules/@freeharness/sdd/dist/src/shim/list.d.ts +5 -0
  215. package/node_modules/@freeharness/sdd/dist/src/shim/list.js +95 -0
  216. package/node_modules/@freeharness/sdd/dist/src/shim/new-change.d.ts +6 -0
  217. package/node_modules/@freeharness/sdd/dist/src/shim/new-change.js +150 -0
  218. package/node_modules/@freeharness/sdd/dist/src/shim/schemas.d.ts +4 -0
  219. package/node_modules/@freeharness/sdd/dist/src/shim/schemas.js +23 -0
  220. package/node_modules/@freeharness/sdd/dist/src/shim/shared.d.ts +56 -0
  221. package/node_modules/@freeharness/sdd/dist/src/shim/shared.js +140 -0
  222. package/node_modules/@freeharness/sdd/dist/src/shim/status.d.ts +8 -0
  223. package/node_modules/@freeharness/sdd/dist/src/shim/status.js +85 -0
  224. package/node_modules/@freeharness/sdd/dist/src/shim/validate.d.ts +6 -0
  225. package/node_modules/@freeharness/sdd/dist/src/shim/validate.js +229 -0
  226. package/node_modules/@freeharness/sdd/dist/src/validate-change.d.ts +40 -0
  227. package/node_modules/@freeharness/sdd/dist/src/validate-change.js +114 -0
  228. package/node_modules/@freeharness/sdd/dist/src/validate.d.ts +24 -0
  229. package/node_modules/@freeharness/sdd/dist/src/validate.js +72 -0
  230. package/node_modules/@freeharness/sdd/dist/vendor/openspec/apply/specs-apply.d.ts +130 -0
  231. package/node_modules/@freeharness/sdd/dist/vendor/openspec/apply/specs-apply.js +981 -0
  232. package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/change-metadata.d.ts +46 -0
  233. package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/change-metadata.js +128 -0
  234. package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/change-status-policy.d.ts +26 -0
  235. package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/change-status-policy.js +32 -0
  236. package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/file-system.d.ts +50 -0
  237. package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/file-system.js +394 -0
  238. package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/global-config.d.ts +15 -0
  239. package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/global-config.js +49 -0
  240. package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/graph.d.ts +71 -0
  241. package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/graph.js +164 -0
  242. package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/index.d.ts +11 -0
  243. package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/index.js +21 -0
  244. package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/instruction-loader.d.ts +102 -0
  245. package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/instruction-loader.js +230 -0
  246. package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/outputs.d.ts +18 -0
  247. package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/outputs.js +138 -0
  248. package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/resolver.d.ts +82 -0
  249. package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/resolver.js +333 -0
  250. package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/schema.d.ts +12 -0
  251. package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/schema.js +110 -0
  252. package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/state.d.ts +11 -0
  253. package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/state.js +32 -0
  254. package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/task-progress.d.ts +33 -0
  255. package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/task-progress.js +149 -0
  256. package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/types.d.ts +39 -0
  257. package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/types.js +49 -0
  258. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/adapters/claude.d.ts +12 -0
  259. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/adapters/claude.js +31 -0
  260. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/adapters/index.d.ts +10 -0
  261. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/adapters/index.js +10 -0
  262. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/adapters/opencode.d.ts +12 -0
  263. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/adapters/opencode.js +26 -0
  264. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/generator.d.ts +28 -0
  265. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/generator.js +41 -0
  266. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/index.d.ts +23 -0
  267. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/index.js +25 -0
  268. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/invocation.d.ts +72 -0
  269. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/invocation.js +76 -0
  270. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/registry.d.ts +39 -0
  271. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/registry.js +53 -0
  272. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/types.d.ts +62 -0
  273. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/types.js +7 -0
  274. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/yaml.d.ts +35 -0
  275. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/yaml.js +47 -0
  276. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-references.d.ts +33 -0
  277. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-references.js +55 -0
  278. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/shared/allowed-tools.d.ts +11 -0
  279. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/shared/allowed-tools.js +11 -0
  280. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/shared/skill-generation.d.ts +48 -0
  281. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/shared/skill-generation.js +99 -0
  282. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/skill-templates.d.ts +19 -0
  283. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/skill-templates.js +18 -0
  284. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/types.d.ts +18 -0
  285. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/types.js +4 -0
  286. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/apply-change.d.ts +19 -0
  287. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/apply-change.js +207 -0
  288. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/archive-change.d.ts +12 -0
  289. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/archive-change.js +409 -0
  290. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/bulk-archive-change.d.ts +9 -0
  291. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/bulk-archive-change.js +673 -0
  292. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/continue-change.d.ts +9 -0
  293. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/continue-change.js +230 -0
  294. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/explore.d.ts +12 -0
  295. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/explore.js +550 -0
  296. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/feedback.d.ts +8 -0
  297. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/feedback.js +107 -0
  298. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/ff-change.d.ts +12 -0
  299. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/ff-change.js +228 -0
  300. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/new-change.d.ts +9 -0
  301. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/new-change.js +147 -0
  302. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/onboard.d.ts +9 -0
  303. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/onboard.js +571 -0
  304. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/propose.d.ts +12 -0
  305. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/propose.js +322 -0
  306. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/store-selection.d.ts +7 -0
  307. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/store-selection.js +7 -0
  308. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/sync-specs.d.ts +9 -0
  309. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/sync-specs.js +518 -0
  310. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/update-change.d.ts +9 -0
  311. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/update-change.js +176 -0
  312. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/verify-change.d.ts +9 -0
  313. package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/verify-change.js +344 -0
  314. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/constants.d.ts +39 -0
  315. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/constants.js +54 -0
  316. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/delta-resolution.d.ts +35 -0
  317. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/delta-resolution.js +171 -0
  318. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/parsers/change-parser.d.ts +27 -0
  319. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/parsers/change-parser.js +210 -0
  320. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/parsers/code-fence.d.ts +14 -0
  321. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/parsers/code-fence.js +48 -0
  322. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/parsers/markdown-parser.d.ts +22 -0
  323. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/parsers/markdown-parser.js +186 -0
  324. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/parsers/requirement-blocks.d.ts +65 -0
  325. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/parsers/requirement-blocks.js +409 -0
  326. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/parsers/requirement-text.d.ts +55 -0
  327. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/parsers/requirement-text.js +98 -0
  328. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/parsers/spec-structure.d.ts +8 -0
  329. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/parsers/spec-structure.js +77 -0
  330. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/purpose-placeholder.d.ts +44 -0
  331. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/purpose-placeholder.js +116 -0
  332. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/schemas/base.schema.d.ts +12 -0
  333. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/schemas/base.schema.js +17 -0
  334. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/schemas/change.schema.d.ts +72 -0
  335. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/schemas/change.schema.js +30 -0
  336. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/schemas/index.d.ts +3 -0
  337. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/schemas/index.js +3 -0
  338. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/schemas/spec.schema.d.ts +17 -0
  339. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/schemas/spec.schema.js +14 -0
  340. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/spec-discovery.d.ts +39 -0
  341. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/spec-discovery.js +114 -0
  342. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/task-lines.d.ts +45 -0
  343. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/task-lines.js +105 -0
  344. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/task-numbering.d.ts +15 -0
  345. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/task-numbering.js +56 -0
  346. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/types.d.ts +17 -0
  347. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/types.js +1 -0
  348. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/validator.d.ts +94 -0
  349. package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/validator.js +756 -0
  350. package/node_modules/@freeharness/sdd/package.json +57 -0
  351. package/node_modules/@freeharness/sdd/vendor/openspec/LICENSE.upstream +22 -0
  352. package/node_modules/@freeharness/sdd/vendor/openspec/assets/schema.upstream.yaml +232 -0
  353. package/node_modules/@freeharness/sdd/vendor/openspec/assets/skills/README.md +19 -0
  354. package/node_modules/@freeharness/sdd/vendor/openspec/assets/skills/openspec-apply-change/SKILL.md +187 -0
  355. package/node_modules/@freeharness/sdd/vendor/openspec/assets/skills/openspec-archive-change/SKILL.md +181 -0
  356. package/node_modules/@freeharness/sdd/vendor/openspec/assets/skills/openspec-bulk-archive-change/SKILL.md +338 -0
  357. package/node_modules/@freeharness/sdd/vendor/openspec/assets/skills/openspec-continue-change/SKILL.md +117 -0
  358. package/node_modules/@freeharness/sdd/vendor/openspec/assets/skills/openspec-explore/SKILL.md +342 -0
  359. package/node_modules/@freeharness/sdd/vendor/openspec/assets/skills/openspec-ff-change/SKILL.md +116 -0
  360. package/node_modules/@freeharness/sdd/vendor/openspec/assets/skills/openspec-new-change/SKILL.md +76 -0
  361. package/node_modules/@freeharness/sdd/vendor/openspec/assets/skills/openspec-onboard/SKILL.md +560 -0
  362. package/node_modules/@freeharness/sdd/vendor/openspec/assets/skills/openspec-propose/SKILL.md +162 -0
  363. package/node_modules/@freeharness/sdd/vendor/openspec/assets/skills/openspec-sync-specs/SKILL.md +261 -0
  364. package/node_modules/@freeharness/sdd/vendor/openspec/assets/skills/openspec-update-change/SKILL.md +90 -0
  365. package/node_modules/@freeharness/sdd/vendor/openspec/assets/skills/openspec-verify-change/SKILL.md +174 -0
  366. package/package.json +70 -0
  367. package/provenance/canonical.PROVENANCE.yaml +740 -0
  368. package/provenance/claude-mem.LICENSE.upstream +202 -0
  369. package/provenance/memory.PROVENANCE.yaml +399 -0
  370. package/provenance/sdd.PROVENANCE.yaml +175 -0
  371. package/vendor-licenses/caveman.LICENSE +27 -0
  372. package/vendor-licenses/deepseek-harness.LICENSE +21 -0
  373. package/vendor-licenses/ecc.LICENSE +21 -0
  374. package/vendor-licenses/pi.LICENSE +21 -0
  375. package/vendor-licenses/superpowers.LICENSE +21 -0
@@ -0,0 +1,164 @@
1
+ # MLflow Tracing Integration
2
+
3
+ Complete guide for integrating MLflow tracing with your agent. This is the authoritative source for all tracing implementation - follow these instructions after completing environment setup in setup-guide.md.
4
+
5
+ **Prerequisites**: Complete setup-guide.md Steps 1-2 (MLflow install + environment configuration)
6
+
7
+ ## Quick Start
8
+
9
+ Three steps to integrate tracing:
10
+
11
+ 1. **Enable autolog** - Add `mlflow.<library>.autolog()` BEFORE importing agent code
12
+ 2. **Decorate entry points** - Add `@mlflow.trace` to agent's main functions
13
+ 3. **Verify** - Run test query and check trace is captured
14
+
15
+ **Minimum implementation:**
16
+ ```python
17
+ import mlflow
18
+ mlflow.langchain.autolog() # Before imports
19
+
20
+ from my_agent import agent
21
+
22
+ @mlflow.trace
23
+ def run_agent(query: str) -> str:
24
+ return agent.run(query)
25
+ ```
26
+
27
+ See sections below for detailed instructions and verification steps.
28
+
29
+ ## Documentation Access Protocol
30
+
31
+ **MANDATORY: Follow the documentation protocol to read MLflow documentation before implementing:**
32
+
33
+ ```bash
34
+ # Query llms.txt for tracing documentation
35
+ curl https://mlflow.org/docs/latest/llms.txt | grep -A 20 "tracing"
36
+ ```
37
+
38
+ Or use WebFetch:
39
+ - Start: `https://mlflow.org/docs/latest/llms.txt`
40
+ - Query for: "MLflow tracing documentation", "autolog setup", "trace decorators"
41
+ - Follow referenced URLs for detailed guides
42
+
43
+ ## Key Rules for Agent Evaluation
44
+
45
+ 1. **Enable Autolog FIRST** - Call `mlflow.{library}.autolog()` before importing agent code
46
+ - Captures internal library calls automatically
47
+ - Supported: `langchain`, `langgraph`, `openai`, `anthropic`, etc.
48
+
49
+ 2. **Add @mlflow.trace to Entry Points** - Decorate agent's main functions
50
+ - Creates top-level span in trace hierarchy
51
+ - Example: `@mlflow.trace` on `run_agent()`, `process_query()`, etc.
52
+
53
+ 3. **Enable Session Tracking for Multi-Turn** - Group conversations by session
54
+ ```python
55
+ trace_id = mlflow.get_last_active_trace_id()
56
+ mlflow.set_trace_tag(trace_id, "session_id", session_id)
57
+ ```
58
+
59
+ 4. **Verify Trace Creation** - Test run should create traces with non-None trace_id
60
+ ```bash
61
+ # Check traces exist
62
+ uv run mlflow traces search --experiment-id $MLFLOW_EXPERIMENT_ID
63
+ ```
64
+
65
+ 5. **Tracing Must Work Before Evaluation** - If traces aren't created, stop and troubleshoot
66
+
67
+ ## Minimal Example
68
+
69
+ ```python
70
+ # step 1: Enable autolog BEFORE imports
71
+ import mlflow
72
+ mlflow.langchain.autolog() # Or langgraph, openai, etc. Use the documentation protocol to find the integration for different libraries.
73
+
74
+ # step 2: Import agent code
75
+ from my_agent import agent
76
+
77
+ # step 3: Add @mlflow.trace decorator
78
+ @mlflow.trace
79
+ def run_agent(query: str, session_id: str = None) -> str:
80
+ """Agent entry point with tracing."""
81
+ result = agent.run(query)
82
+
83
+ # step 4 (optional): Track session for multi-turn
84
+ if session_id:
85
+ trace_id = mlflow.get_last_active_trace_id()
86
+ if trace_id:
87
+ mlflow.set_trace_tag(trace_id, "session_id", session_id)
88
+
89
+ return result
90
+ ```
91
+
92
+ ## ⚠️ Critical Verification Checklist
93
+
94
+ After implementing tracing, verify these requirements **IN ORDER**:
95
+
96
+ **Quick verification:** Edit and run `scripts/validate_agent_tracing.py` - it checks all items below automatically.
97
+
98
+ **Manual verification** (if needed):
99
+
100
+ ### 1. Autolog Enabled
101
+ ```bash
102
+ # Find autolog call
103
+ grep -r "mlflow.*autolog" .
104
+ ```
105
+ **Expected**: Find autolog() call in initialization file (main.py, __init__.py, app.py, etc.)
106
+
107
+ ### 2. Import Order Correct
108
+ **Check**: Autolog call appears BEFORE any agent/library imports in the file
109
+ **Expected**: The line with `mlflow.autolog()` comes before any `from your_agent import ...` statements
110
+
111
+ ### 3. Entry Points Decorated
112
+ ```bash
113
+ # Find trace decorators
114
+ grep -r "@mlflow.trace" .
115
+ ```
116
+ **Expected**: Find @mlflow.trace on agent's main functions
117
+
118
+ ### 4. Traces Created
119
+ ```bash
120
+ # Run agent with test input
121
+ uv run python -c "from my_agent import run_agent; run_agent('test query')"
122
+
123
+ # Check trace was created
124
+ uv run mlflow traces search --experiment-id $MLFLOW_EXPERIMENT_ID --extract-fields info.trace_id
125
+ ```
126
+ **Expected**: Non-empty trace_id returned
127
+
128
+ ### 5. Trace Structure Complete
129
+ ```bash
130
+ # View trace details
131
+ uv run mlflow traces get <trace_id>
132
+ ```
133
+ **Expected**:
134
+ - Top-level span with your function name
135
+ - Child spans showing internal library calls (if autolog enabled)
136
+ - Session tags (if multi-turn agent)
137
+
138
+ **If ANY check fails**: Stop and troubleshoot before proceeding to evaluation.
139
+
140
+ ## Common Issues
141
+
142
+ **Traces not created**:
143
+ - Check autolog is called before imports
144
+ - Verify decorator is @mlflow.trace (not @trace or @mlflow.trace_span)
145
+ - Ensure MLFLOW_TRACKING_URI and MLFLOW_EXPERIMENT_ID are set
146
+
147
+ **Empty traces** (no child spans):
148
+ - Autolog may not support your library version
149
+ - Check MLflow docs for supported library versions
150
+ - Verify autolog is called before library imports
151
+
152
+ **Session tracking not working**:
153
+ - Verify `trace_id = mlflow.get_last_active_trace_id()` is called inside traced function
154
+ - Check `mlflow.set_trace_tag(trace_id, key, value)` has correct parameter order
155
+
156
+ For detailed troubleshooting, see `troubleshooting.md`.
157
+
158
+ ## Tracing Integration Complete
159
+
160
+ After completing all steps above, verify:
161
+
162
+ - [ ] Test run creates traces with non-None trace_id (verified with validate_agent_tracing.py)
163
+ - [ ] Traces visible in MLflow UI or via `mlflow traces search`
164
+ - [ ] Trace hierarchy includes both @mlflow.trace spans and autolog spans
@@ -0,0 +1,514 @@
1
+ # Troubleshooting Guide
2
+
3
+ Common errors and solutions for agent evaluation with MLflow.
4
+
5
+ ## Table of Contents
6
+
7
+ 1. [Environment Setup Issues](#environment-setup-issues)
8
+ 2. [Tracing Integration Issues](#tracing-integration-issues)
9
+ 3. [Dataset Creation Issues](#dataset-creation-issues)
10
+ 4. [Evaluation Execution Issues](#evaluation-execution-issues)
11
+ 5. [Scorer Issues](#scorer-issues)
12
+
13
+ ## Environment Setup Issues
14
+
15
+ ### MLflow Not Found
16
+
17
+ **Error**: `mlflow: command not found` or `ModuleNotFoundError: No module named 'mlflow'`
18
+
19
+ **Cause**: MLflow is not installed or not in PATH
20
+
21
+ **Solutions**:
22
+
23
+ 1. Install MLflow: `uv pip install mlflow`
24
+ 2. Verify installation: `mlflow --version`
25
+ 3. Check virtual environment is activated
26
+ 4. For command line: Add MLflow to PATH
27
+
28
+ ### Databricks Profile Not Authenticated
29
+
30
+ **Error**: `Profile X not authenticated` or `Invalid credentials`
31
+
32
+ **Cause**: Databricks CLI is not authenticated for the selected profile
33
+
34
+ **Solutions**:
35
+
36
+ 1. Run authentication: `databricks auth login -p <profile_name>`
37
+ 2. Follow prompts to authenticate
38
+ 3. Verify with: `databricks auth env -p <profile_name>`
39
+ 4. Check profile exists: `databricks auth profiles`
40
+
41
+ ### Local MLflow Server Won't Start
42
+
43
+ **Error**: `Address already in use` or port binding error
44
+
45
+ **Cause**: Another process is using the port or MLflow server already running
46
+
47
+ **Solutions**:
48
+
49
+ 1. Check if server is already running: `ps aux | grep mlflow`
50
+ 2. Use different port: `mlflow server --port 5051 ...`
51
+ 3. Kill existing server: `pkill -f "mlflow server"`
52
+ 4. Check port availability: `lsof -i :5050`
53
+
54
+ ### Experiment Not Found
55
+
56
+ **Error**: `Experiment <id> not found` or `Invalid experiment ID`
57
+
58
+ **Cause**: MLFLOW_EXPERIMENT_ID refers to non-existent experiment
59
+
60
+ **Solutions**:
61
+
62
+ 1. List experiments: `mlflow experiments list`
63
+ 2. Create experiment: `mlflow experiments create -n <name>`
64
+ 3. Verify ID: `mlflow experiments get --experiment-id <id>`
65
+ 4. Update environment variable: `export MLFLOW_EXPERIMENT_ID=<correct_id>`
66
+
67
+ ## Tracing Integration Issues
68
+
69
+ ### No Traces Captured
70
+
71
+ **Symptoms**: `mlflow.get_last_active_trace_id()` returns None, no traces in UI
72
+
73
+ **Causes**:
74
+
75
+ 1. Autolog not enabled
76
+ 2. @trace decorator missing
77
+ 3. Environment variables not set
78
+ 4. Tracing not supported for library version
79
+
80
+ **Solutions**:
81
+
82
+ 1. Check MLFLOW_TRACKING_URI is set: `echo $MLFLOW_TRACKING_URI`
83
+ 2. Check MLFLOW_EXPERIMENT_ID is set: `echo $MLFLOW_EXPERIMENT_ID`
84
+ 3. Verify autolog call exists: `grep -r "autolog" src/`
85
+ 4. Verify decorators present: `grep -r "@mlflow.trace" src/`
86
+ 5. Run validation script: `python scripts/validate_tracing_runtime.py`
87
+ # Script will auto-detect module and entry point
88
+ 6. Check MLflow version: `mlflow --version` (need >=3.6.0)
89
+
90
+ ### Missing Library Spans (Autolog Not Working)
91
+
92
+ **Symptoms**: Top-level span present but no LangChain/LangGraph/OpenAI spans
93
+
94
+ **Causes**:
95
+
96
+ 1. Autolog called after library imports
97
+ 2. Wrong library specified (e.g., `langchain` vs `langgraph`)
98
+ 3. Library not installed or wrong version
99
+ 4. Autolog not supported for library
100
+
101
+ **Solutions**:
102
+
103
+ 1. Move autolog call before imports:
104
+
105
+ ```python
106
+ # CORRECT:
107
+ import mlflow
108
+
109
+ mlflow.langchain.autolog() # BEFORE library import
110
+ from langchain import ChatOpenAI # library imports after autolog
111
+
112
+ # WRONG:
113
+ from langchain import ChatOpenAI # library imports before autolog
114
+ import mlflow
115
+
116
+ mlflow.langchain.autolog() # TOO LATE
117
+ ```
118
+
119
+ 2. Verify correct library:
120
+
121
+ - LangChain uses: `mlflow.langchain.autolog()`
122
+ - LangGraph also uses: `mlflow.langchain.autolog()` (not langgraph)
123
+ - OpenAI uses: `mlflow.openai.autolog()`
124
+
125
+ 3. Check library installed: `pip list | grep langchain`
126
+
127
+ 4. Check compatibility: Read MLflow docs for supported versions
128
+
129
+ ### Missing Top-Level Span (Decorator Not Working)
130
+
131
+ **Symptoms**: Library spans present but no function span with your function name
132
+
133
+ **Causes**:
134
+
135
+ 1. @mlflow.trace decorator missing
136
+ 2. Decorator is `@trace` instead of `@mlflow.trace`
137
+ 3. mlflow not imported in file
138
+ 4. Decorator on wrong function
139
+
140
+ **Solutions**:
141
+
142
+ 1. Add decorator to ALL entry points:
143
+
144
+ ```python
145
+ import mlflow
146
+
147
+
148
+ @mlflow.trace # <-- ADD THIS
149
+ def run_agent(query: str):
150
+ ...
151
+ ```
152
+
153
+ 2. Verify decorator spelling: `@mlflow.trace` not `@trace`
154
+
155
+ 3. Check mlflow import at top of file
156
+
157
+ 4. Grep for decorators: `grep -B 2 "def run_agent" src/*/agent/*.py`
158
+
159
+ ### Session ID Not Captured
160
+
161
+ **Symptoms**: Trace exists but no session_id in tags
162
+
163
+ **Causes**:
164
+
165
+ 1. mlflow.set_trace_tag() not called
166
+ 2. Timing issue - set_trace_tag called too late
167
+ 3. trace_id is None when setting tag
168
+
169
+ **Solutions**:
170
+
171
+ 1. Add session tracking code:
172
+
173
+ ```python
174
+ @mlflow.trace
175
+ def run_agent(query: str, session_id: str = None):
176
+ if session_id is None:
177
+ session_id = str(uuid.uuid4())
178
+
179
+ # Get trace ID and set tag IMMEDIATELY
180
+ trace_id = mlflow.get_last_active_trace_id()
181
+ if trace_id:
182
+ mlflow.set_trace_tag(trace_id, "session_id", session_id)
183
+
184
+ # Rest of function...
185
+ ```
186
+
187
+ 2. Verify timing - call early in function
188
+
189
+ 3. Check trace_id is not None before calling set_trace_tag
190
+
191
+ 4. Test with validation code from `references/tracing-integration.md`
192
+
193
+ ### Import Errors When Testing
194
+
195
+ **Error**: `ModuleNotFoundError: No module named '<your_agent>'`
196
+
197
+ **Cause**: Agent package not installed in Python path
198
+
199
+ **Solutions**:
200
+
201
+ 1. Install in editable mode: `pip install -e .` (from project root)
202
+ 2. Verify package installed: `pip list | grep <package_name>`
203
+ 3. Check in correct virtual environment: `which python`
204
+ 4. Verify PYTHONPATH includes project: `echo $PYTHONPATH`
205
+
206
+ ## Dataset Creation Issues
207
+
208
+ ### Databricks Dataset APIs Not Supported
209
+
210
+ **Error**: `"Evaluation dataset APIs is not supported in Databricks environments"`
211
+
212
+ **Context**: When accessing `experiment_ids` or `tags` fields on Databricks
213
+
214
+ **Cause**: These fields are not supported in Databricks tracking URIs
215
+
216
+ **Solution**: Only access `name` and `dataset_id` fields:
217
+
218
+ ```python
219
+ # CORRECT for Databricks:
220
+ for dataset in datasets:
221
+ print(dataset.name)
222
+ print(dataset.dataset_id)
223
+
224
+ # WRONG for Databricks:
225
+ for dataset in datasets:
226
+ print(dataset.experiment_ids) # ERROR!
227
+ print(dataset.tags) # ERROR!
228
+ ```
229
+
230
+ ### Unity Catalog Table Not Found
231
+
232
+ **Error**: `Table not found: <catalog>.<schema>.<table>`
233
+
234
+ **Causes**:
235
+
236
+ 1. Table name not fully qualified
237
+ 2. Catalog or schema doesn't exist
238
+ 3. Insufficient permissions
239
+
240
+ **Solutions**:
241
+
242
+ 1. Use fully-qualified name: `catalog.schema.table`
243
+
244
+ ```python
245
+ # CORRECT:
246
+ dataset = create_dataset(name="main.default.my_eval")
247
+
248
+ # WRONG:
249
+ dataset = create_dataset(name="my_eval")
250
+ ```
251
+
252
+ 2. Verify catalog exists: `databricks catalogs list`
253
+
254
+ 3. Verify schema exists: `databricks schemas list <catalog>`
255
+
256
+ 4. Check permissions: Ensure you have CREATE TABLE permission
257
+
258
+ 5. Use default location: `main.default.<your_table>`
259
+
260
+ ### Invalid Dataset Schema
261
+
262
+ **Error**: Schema validation error or `Invalid record format`
263
+
264
+ **Cause**: Records don't match expected format
265
+
266
+ **Solution**: Use correct format with `inputs` key:
267
+
268
+ ```python
269
+ # CORRECT:
270
+ records = [
271
+ {"inputs": {"query": "What is MLflow?"}},
272
+ {"inputs": {"query": "How do I log models?"}},
273
+ ]
274
+
275
+ # WRONG:
276
+ records = [
277
+ {"query": "What is MLflow?"}, # Missing "inputs" wrapper
278
+ {"question": "How do I log models?"}, # Wrong structure
279
+ ]
280
+ ```
281
+
282
+ ### Dataset Creation Fails Silently
283
+
284
+ **Symptoms**: No error but dataset not created or not findable
285
+
286
+ **Causes**:
287
+
288
+ 1. Wrong tracking URI
289
+ 2. Wrong experiment ID
290
+ 3. Permissions issue (Databricks)
291
+
292
+ **Solutions**:
293
+
294
+ 1. Verify environment: `echo $MLFLOW_TRACKING_URI`
295
+ 2. Verify experiment: `echo $MLFLOW_EXPERIMENT_ID`
296
+ 3. Check dataset was created: `client.search_datasets(experiment_ids=[exp_id])`
297
+ 4. For Databricks, use Unity Catalog tools to verify table exists
298
+
299
+ ## Evaluation Execution Issues
300
+
301
+ ### Agent Import Errors
302
+
303
+ **Error**: Cannot import agent module or entry point
304
+
305
+ **Causes**:
306
+
307
+ 1. Module not in Python path
308
+ 2. Package not installed
309
+ 3. Wrong module name
310
+ 4. Virtual environment issue
311
+
312
+ **Solutions**:
313
+
314
+ 1. Install package: `pip install -e .` from project root
315
+ 2. Verify module name: Check actual file/folder structure
316
+ 3. Check virtual environment: `which python`
317
+ 4. Try absolute import: `from project.agent import run_agent`
318
+ 5. Add to PYTHONPATH: `export PYTHONPATH="${PYTHONPATH}:$(pwd)/src"`
319
+
320
+ ### Trace Collection Incomplete
321
+
322
+ **Symptoms**: Some queries succeed, others fail
323
+
324
+ **Causes**:
325
+
326
+ 1. Agent errors on certain queries
327
+ 2. Timeout issues
328
+ 3. LLM rate limits
329
+ 4. Resource constraints
330
+
331
+ **Solutions**:
332
+
333
+ 1. Review error messages in output
334
+ 2. Test failing queries individually
335
+ 3. Add timeout handling:
336
+
337
+ ```python
338
+ try:
339
+ response = run_agent(query, timeout=60)
340
+ except TimeoutError:
341
+ print("Query timed out")
342
+ ```
343
+
344
+ 4. Add retry logic for rate limits:
345
+
346
+ ```python
347
+ import time
348
+
349
+ for attempt in range(3):
350
+ try:
351
+ response = run_agent(query)
352
+ break
353
+ except RateLimitError:
354
+ time.sleep(2**attempt)
355
+ ```
356
+
357
+ 5. Check agent logs for specific errors
358
+
359
+ ### LLM Provider Configuration Issues
360
+
361
+ **Error**: API key not found, invalid credentials, or authentication errors
362
+
363
+ **Causes**:
364
+
365
+ 1. API keys not set
366
+ 2. Wrong environment variables
367
+ 3. Provider configuration missing
368
+
369
+ **Solutions**:
370
+
371
+ 1. Set required API keys:
372
+
373
+ ```bash
374
+ export OPENAI_API_KEY="sk-..."
375
+ export ANTHROPIC_API_KEY="sk-ant-..."
376
+ ```
377
+
378
+ 2. Check provider configuration in agent code
379
+
380
+ 3. Verify credentials are valid
381
+
382
+ 4. Check rate limits and quotas
383
+
384
+ ## Scorer Issues
385
+
386
+ ### Scorer Returns Null
387
+
388
+ **Symptoms**: Scorer output is null, empty, or missing
389
+
390
+ **Causes**:
391
+
392
+ 1. Scorer instructions unclear
393
+ 2. Required inputs missing from trace
394
+ 3. Trace structure doesn't match expectations
395
+ 4. LLM error or timeout
396
+
397
+ **Solutions**:
398
+
399
+ 1. Test scorer on single trace:
400
+
401
+ ```bash
402
+ uv run mlflow traces evaluate \
403
+ --scorers MyScorer \
404
+ --trace-ids <single_trace> \
405
+ --output json
406
+ ```
407
+
408
+ 2. Review scorer definition and instructions
409
+
410
+ 3. Check trace has required fields:
411
+
412
+ ```python
413
+ trace = client.get_trace(trace_id)
414
+ print(trace.data.spans) # Verify structure
415
+ ```
416
+
417
+ 4. Simplify scorer instructions and test again
418
+
419
+ 5. Add error handling in scorer (if using programmatic scorer)
420
+
421
+ ### High Failure Rate
422
+
423
+ **Symptoms**: Most traces fail scorer evaluation
424
+
425
+ **Causes**:
426
+
427
+ 1. Scorer too strict
428
+ 2. Agent actually has quality issues
429
+ 3. Scorer misunderstands requirements
430
+ 4. Instructions ambiguous
431
+
432
+ **Solutions**:
433
+
434
+ 1. Manually review failing traces - do they actually fail the criterion?
435
+
436
+ 2. Test on known good examples:
437
+
438
+ ```bash
439
+ # Test on trace you know should pass
440
+ uv run mlflow traces evaluate \
441
+ --scorers MyScorer \
442
+ --trace-ids <good_trace>
443
+ ```
444
+
445
+ 3. Refine scorer instructions for clarity
446
+
447
+ 4. Consider adjusting criteria if too strict
448
+
449
+ 5. Add examples to scorer instructions
450
+
451
+ ### Built-in Scorer Not Working
452
+
453
+ **Symptoms**: Built-in scorer errors or returns unexpected results
454
+
455
+ **Causes**:
456
+
457
+ 1. Trace structure doesn't match scorer assumptions
458
+ 2. Required fields missing
459
+ 3. Scorer expects ground truth but dataset doesn't have it
460
+ 4. MLflow version incompatibility
461
+
462
+ **Solutions**:
463
+
464
+ 1. Read scorer documentation for requirements:
465
+
466
+ - Required trace fields
467
+ - Expected structure
468
+ - Ground truth needs
469
+
470
+ 2. Verify trace has expected fields/structure
471
+
472
+ 3. Check dataset has `expectations` if scorer needs ground truth
473
+
474
+ 4. Consider custom scorer if built-in doesn't match your structure
475
+
476
+ 5. Test with verbose output to see what scorer received
477
+
478
+ ### Scorer Registration Fails
479
+
480
+ **Error**: Error during `mlflow scorers register-llm-judge`
481
+
482
+ **Causes**:
483
+
484
+ 1. Invalid scorer name
485
+ 2. Missing required parameters
486
+ 3. Syntax error in instructions
487
+ 4. Permissions issue
488
+
489
+ **Solutions**:
490
+
491
+ 1. Check scorer name is valid identifier (no spaces, special chars)
492
+
493
+ 2. Verify all required parameters provided:
494
+
495
+ ```bash
496
+ uv run mlflow scorers register-llm-judge \
497
+ --name "MyScorer" \
498
+ --definition "..." \
499
+ --instructions "..." \
500
+ --variables query,response \
501
+ --output pass/fail
502
+ ```
503
+
504
+ 3. Check instructions for syntax errors (especially quotes)
505
+
506
+ 4. Try programmatic registration with make_judge() for better error messages
507
+
508
+ ---
509
+
510
+ **For detailed guidance on each phase**, see the respective reference files:
511
+
512
+ - `references/tracing-integration.md` - Tracing setup
513
+ - `references/dataset-preparation.md` - Dataset creation
514
+ - `references/scorers.md` - Scorer design and testing