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
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 André Negrelli
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/NOTICE ADDED
@@ -0,0 +1,108 @@
1
+ FreeHarness
2
+ Copyright (c) 2026 André Negrelli
3
+ Licensed under the MIT License (see LICENSE).
4
+
5
+ This distribution contains material derived from third-party projects. Each item below keeps
6
+ its own license; the upstream license text ships next to the vendored tree or under
7
+ packages/cli/vendor-licenses/ where noted, and the exact upstream revision is recorded in the
8
+ PROVENANCE manifests.
9
+
10
+ 1. OpenSpec (vendored engine slice + /opsx skill assets)
11
+ Upstream: https://github.com/Fission-AI/OpenSpec (package @fission-ai/openspec)
12
+ Copyright: (c) 2024 OpenSpec Contributors
13
+ License: MIT — packages/sdd/vendor/openspec/LICENSE.upstream
14
+ Baseline: v1.8.0, commit 610b78f (packages/sdd/PROVENANCE.yaml)
15
+ Where: packages/sdd/vendor/openspec/ (bundled in the npm package as
16
+ node_modules/@freeharness/sdd); canonical/openspec/ (schema override)
17
+
18
+ 2. claude-mem (vendored memory daemon, plugin control plane, and hooks)
19
+ Upstream: https://github.com/thedotmack/claude-mem
20
+ Copyright: Alex Newman (thedotmack)
21
+ License: Apache License 2.0 — packages/memory/vendor/claude-mem/LICENSE.upstream
22
+ Baseline: v13.24.0, commit be44b6c8 (packages/memory/PROVENANCE.yaml)
23
+ Where: packages/memory/vendor/claude-mem/ (repo checkout only; NOT in the npm package —
24
+ the memory capability builds it from a checkout, or bridges to the upstream
25
+ installer when the engine is absent). Modifications (memory-slim trim, rewritten
26
+ hooks.json/.mcp.json) are recorded in FIXUP.md and SLIM-AUDIT.md next to it, as
27
+ required by Apache-2.0 section 4(b).
28
+
29
+ 3. Claude Code official plugins (harvested concepts; rewritten, never copied)
30
+ Upstream: https://github.com/anthropics/claude-code (plugins/, examples/)
31
+ Copyright: (c) Anthropic PBC. All rights reserved. Use is subject to Anthropic's Commercial
32
+ Terms of Service (https://www.anthropic.com/legal/commercial-terms), per the
33
+ repository's LICENSE.md.
34
+ Baseline: commit b3f0e50 (canonical/PROVENANCE.yaml, canonical/HARVEST.yaml)
35
+ Where: canonical/PROVENANCE.yaml lists every harvested file (content is folded into
36
+ existing skills/agents, the spec-driven design artifact, and
37
+ canonical/hooks/freeharness-security-guidance.mjs). These are original
38
+ FreeHarness rewrites of the upstream ideas (phase structure, agent roles, hook
39
+ behavior); canonical/PROVENANCE.yaml records the upstream path, commit, and the
40
+ upstream file hash, and the test suite asserts no file is byte-identical to its
41
+ source. No Anthropic file is redistributed.
42
+
43
+ 4. OpenSpec 1.12 ports (v4)
44
+ Upstream: https://github.com/Fission-AI/OpenSpec
45
+ License: MIT (same text as item 1)
46
+ Baseline: v1.12.0, commit e062b957 (packages/sdd/PROVENANCE.yaml; canonical/PROVENANCE.yaml)
47
+ Where: engine hunks in packages/sdd/vendor/openspec/{validation,apply,generation/templates/
48
+ workflows}, packages/sdd/src/shim/{archive,context,new-change}.ts, and the
49
+ canonical/openspec templates; adopted assets via `freeharness sync adopt sdd`.
50
+
51
+ 5. deepseek-harness (harvested mechanisms; rewritten, never copied)
52
+ Upstream: https://github.com/deepseek-ai/deepseek-harness
53
+ Copyright: (c) 2026 DeepSeek
54
+ License: MIT — packages/cli/vendor-licenses/deepseek-harness.LICENSE
55
+ Baseline: commit d347e703 (0.1.3-alpha.1) (canonical/PROVENANCE.yaml, canonical/HARVEST.yaml)
56
+ Where: rules/CLAUDE.md (CoT-leakage standard, prose standard, Agent Notes loop),
57
+ skills (verification grounding, subagent team lessons, description discipline),
58
+ agents (defensive patterns), openspec templates (Consequences section),
59
+ hooks/freeharness-repeat-tool.mjs, freeharness-output-pruner.mjs and the
60
+ SessionStart compaction checkpoint. Each entry records the upstream path,
61
+ commit and hash; the test suite asserts no file is byte-identical.
62
+
63
+ 6. caveman (MIT skill/agent layer only)
64
+ Upstream: https://github.com/JuliusBrussee/caveman
65
+ Copyright: (c) 2026 Julius Brussee
66
+ License: MIT for skills/, agents/, commands/, packages/ — packages/cli/vendor-licenses/
67
+ caveman.LICENSE (the scope note names the BSL-1.1 engine paths). The BSL-1.1
68
+ paths (engine/, proxy/, mcp/, shrink/, mem/, browse/, rewriter/) ship nothing
69
+ here: their items are concepts with an empty target list in HARVEST.yaml.
70
+ Baseline: commit 0fca50ac (2.6.0)
71
+ Where: rules/CLAUDE.md (output levels, delegation paragraph), the five reviewer
72
+ agents' output contract, subagent-driven-development stop conditions.
73
+
74
+ 7. pi (pi-mono)
75
+ Upstream: https://github.com/badlogic/pi-mono
76
+ Copyright: (c) 2025 Mario Zechner
77
+ License: MIT — packages/cli/vendor-licenses/pi.LICENSE
78
+ Baseline: commit 4cc339f5 (0.0.3)
79
+ Where: agents/explorer-ai-engineer-analyst.md (scout handoff), rules/CLAUDE.md (two
80
+ rule lines), skills/git-workflow (worktree safety), hooks/freeharness-output-pruner.mjs
81
+ (truncation shape).
82
+
83
+ 8. Superpowers
84
+ Upstream: https://github.com/obra/superpowers
85
+ Copyright: (c) 2025 Jesse Vincent
86
+ License: MIT — packages/cli/vendor-licenses/superpowers.LICENSE
87
+ Baseline: commit b36e0829 (6.3.0)
88
+ Where: skills/subagent-driven-development (6.x mechanics, reference/brief.md),
89
+ skills/test-driven-development/reference/writing-good-tests.md,
90
+ skills/verification-before-completion, skills/systematic-debugging,
91
+ skills/git-workflow (worktrees).
92
+
93
+ 9. Everything Claude Code (ECC)
94
+ Upstream: https://github.com/affaan-m/ECC
95
+ Copyright: (c) 2026 Affaan Mustafa
96
+ License: MIT — packages/cli/vendor-licenses/ecc.LICENSE
97
+ Baseline: commit 68e926bf (harvest); observed 2.2.1 e04ea0b9
98
+ Where: rules/safety.md (safety-guard watch list), hooks/freeharness-config-guard.mjs,
99
+ hooks/freeharness-context-monitor.mjs and their fragments.
100
+
101
+ 10. Concept-only sources (no content shipped; listed in canonical/HARVEST.yaml and sources.yaml)
102
+ - Ruflo (MIT): PreCompact hook and memory consolidation concepts.
103
+ - context-mode (ELv2): concepts only; non-permissive, an empty target list is enforced by
104
+ the harvest test.
105
+ - ralph-wiggum (official Claude Code plugin, item 3): the converge Stop hook follows its
106
+ loop shape; no file is copied.
107
+ - claude-mem 13.15 -> 13.24 delta (item 2): engine hunks ported by hand, listed in
108
+ packages/memory/vendor/claude-mem/FIXUP.md section 9.
package/README.md ADDED
@@ -0,0 +1,134 @@
1
+ # FreeHarness
2
+
3
+ FreeHarness is an agnostic agentic-engineering harness for AI Engineering, Software Engineering for AI Systems and Data Engineering work.
4
+ A single neutral canonical source (behavior rules, skills, agents, hooks, MCP list, spec-driven schema) is translated by per-harness adapters into each tool's layout:
5
+ Claude Code, OpenCode, or a Claude Code plugin directory. It vendors the engines it depends on (OpenSpec for spec-driven development, the vendored claude-mem engine for memory),
6
+ tracks them against upstream, and harvests ideas from other projects (Superpowers, ECC, Ruflo, the official Claude Code plugins) rewritten in its own style. Goals: efficiency,
7
+ quality, token economy, modular and confirmable install. License: MIT.
8
+
9
+
10
+ ## Status
11
+
12
+ v0.4.1 — v1, v2, v3, v4 and v4.1 shipped (v4 sandbox-complete; the [machine] measurements are listed in `Documents/ROADMAP.md`); 19 capability specs published in `openspec/specs/` (the v4 change is archived under `openspec/changes/archive/freeharness-v4`).
13
+
14
+ - v1: canonical content (rules with the Tool Routing contract, skills, agents, MCP, hooks) and the installer with the claude-code and opencode adapters.
15
+ - v2: hexagonal core with a dependency-rule linter, two-pass confirmable install, `bootstrap`, `doctor --fix`, vendored OpenSpec engine (own `openspec` bin), vendored claude-mem daemon, `sync check`, one-command `install.sh`.
16
+ - v3: memory installed from our build and slimmed (engine trimmed, short hooks, own viewer), node:test suites + CI, npm tarball + hosted `install.sh` + `--target plugin`, `sync adopt`, rich `doctor` / `uninstall` / `update`, content harvest from the official plugins, cost tracker, weekly upstream radar.
17
+ - v4: harness intelligence (rules under 200 lines, language density rule + doctor lint, output contracts, subagent briefs and validated handoffs, verification grounding, CoT-leakage standard), token-economy hooks (output pruner, context monitor, config guard, repeat-tool reminder, post-compaction re-injection, cache-hygiene settings, `cost prefix`, `cost report --sinks`), upstream claude-mem 13.24 ports + PreCompact checkpoint, OpenSpec 1.12 ports + supersession/EARS/task annotations + converge hook, 45 skill eval cases with a runner and `plugin validate` in CI, opt-in local-model and MCP profiles.
18
+
19
+ Next: the v4 [machine] measurements (compare weeks, recall re-verify, first eval run, GPU
20
+ profiles); v5 moves to an own CLI on the Claude Agent SDK plus OpenCode. Details:
21
+ `Documents/ROADMAP.md`.
22
+
23
+ ## Quickstart
24
+
25
+ Only Node.js >= 18 and git must be present.
26
+
27
+ 1. Install once per machine (builds, links `freeharness` + the vendored `openspec` into
28
+ `~/.local/bin`, installs the global set into `~/.claude`, sets up memory, removes leftovers
29
+ of earlier installs, runs `doctor`):
30
+
31
+ ```bash
32
+ bash install.sh --yes --with-memory
33
+ # or, without a checkout:
34
+ curl -fsSL https://raw.githubusercontent.com/anegrelli/FreeHarness/main/install.sh | bash -s -- --yes --with-memory
35
+ ```
36
+
37
+ 2. Activate in each project (writes `CLAUDE.md` from the template, the `/fh-context` command and
38
+ the SDD set `openspec/` + `/opsx`; skills, agents, hooks, memory and MCP stay global):
39
+
40
+ ```bash
41
+ cd <project> && freeharness bootstrap
42
+ # then, in Claude Code: /fh-context (fills CLAUDE.md from the codebase; never /init)
43
+ # commit CLAUDE.md + openspec/
44
+ ```
45
+
46
+ Details, reference and troubleshooting: `Documents/INSTALL.md`; manual and advanced paths:
47
+ `Documents/ADVANCED.md`.
48
+
49
+ ## Commands
50
+
51
+ | Command | What it does |
52
+ | --------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
53
+ | `freeharness init` | Install capabilities into the target harness(es).`--target claude-code,opencode,plugin`, `--scope user\|project`, `--only <caps>`, `--project <dir>`, `--dry-run`, `--yes` |
54
+ | `freeharness update [--check]` | Compare the install manifest with the running CLI / repo HEAD; re-emit idempotently |
55
+ | `freeharness bootstrap` | Activate a project:`CLAUDE.md` (template, if absent) + `/fh-context` + SDD (`openspec/`, `/opsx`, `openspec-*` skills). Global-only capabilities are refused at project scope unless `init --allow-project-copies` |
56
+ | `freeharness cleanup` | Remove leftovers/duplicates from a fixed list (`--scope user`: parked upstream claude-mem, its backups, upstream claude-mem hook entries in `settings.json` once the plugin is registered, legacy `/openspec` commands, global `@fission-ai/openspec`, a global npm `freeharness` link; `--scope project`: legacy `/openspec` commands, project copies of global agents/skills, duplicate hook entries). Your own skills/agents are never listed. Preview -> confirm |
57
+ | `freeharness doctor [--fix]` | Version and resolved binaries (shadowing, a CLI running from outside`~/.local/bin`), hooks, skills/agents (yours listed as INFO), manifest drift, runtime deps, PROVENANCE baselines, memory verdict (stale worker version), leftovers (user) / duplicates and unresolved placeholders (project) |
58
+ | `/fh-context` (in Claude Code) | Project command written by`bootstrap`: fills the `<placeholder>` fields of the project `CLAUDE.md` from the codebase |
59
+ | `freeharness list` | Capabilities, required/optional, targets |
60
+ | `freeharness uninstall` | Remove only what the install manifest lists; never `~/.claude-mem` data or user files |
61
+ | `freeharness memory status\|backup\|activate\|restart [--if-running]` | Which memory build is active; copy the data dir; make the FreeHarness build the only active one; restart the worker (`--if-running`: no-op without one) |
62
+ | `freeharness cost report [--sinks]\|prefix\|prices` | Aggregate the cost-tracker log per project and model; rank token sinks per project / task class; estimate the prompt prefix vs budget; print the editable price table path |
63
+ | `freeharness sync check\|adopt <sdd\|memory>` | Report drift of the vendored trees vs upstream; adopt tracked paths with preview + confirm + baseline bump |
64
+
65
+ ## What gets installed (user scope, Claude Code)
66
+
67
+ - Global behavior rules (`~/.claude/CLAUDE.md`) with a pointer to the Tool Routing table, plus the per-project context template. The table itself lives in `canonical/rules/routing.md`, printed as a `<routing>` block by the SessionStart hook on every source (Claude Code and plugin targets) and appended to `AGENTS.md` for OpenCode.
68
+ - 10 skills: test-driven-development, subagent-driven-development, systematic-debugging, verification-before-completion, code-review, git-workflow, agentic-architecture, agent-evaluation, local-code, report-formatting. report-formatting and agent-evaluation are owner-run: hidden from the model's skill list (`disable-model-invocation: true`) and dispatched by name (`/report-formatting`, `/agent-evaluation`; `/<plugin>:report-formatting` on a plugin install), never selected by the model.
69
+ - 8 agents: python-reviewer, database-reviewer, security-reviewer, pr-reviewer, agentic-architect, report-formatter, explorer-ai-engineer-analyst, test-writer (neutral tiers mapped to opus/sonnet/haiku).
70
+ - 12 hook registrations from 10 scripts: SessionStart pointer (compact/resume re-inject the checkpoint), PreCompact checkpoint, memory guard and config guard (PreToolUse, deny), repeat-tool reminder (PreToolUse + UserPromptSubmit, advisory), security guidance (PreToolUse, advisory), the opt-in converge loop (Stop; armed per project by `.freeharness/converge.json`), and from the `cost` capability (part of the default set) the cost tracker (Stop + SessionEnd), output pruner (PostToolUse Bash) and context monitor (Stop) plus the 1h prompt-cache TTL settings. Details and how to disable each: Documents/ADVANCED.md section 6.
71
+ - SDD: the spec-driven schema override (user-global) and the vendored `openspec` bin; `/opsx` commands, `openspec-*` skills and `/fh-context` per project via `bootstrap`.
72
+ - Memory (optional): the slim free-mem plugin built from the vendored claude-mem engine, installed into the Claude Code plugin cache and registered additively, with the FreeHarness viewer.
73
+ - MCP: servers from `canonical/mcp/servers.json` (context7) via `claude mcp add`.
74
+
75
+ Capabilities: rules, sdd, skills, agents, safety, mcp, cost (required; the token-economy hooks are core) + memory (optional).
76
+
77
+ ## Structure
78
+
79
+ ```
80
+ FreeHarness/
81
+ ├── package.json npm workspaces root: build (sdd -> core -> cli), verify, test
82
+ ├── install.sh one-command installer (self-bootstrapping)
83
+ ├── sources.yaml upstream watch list + baselines (radar)
84
+ ├── canonical/ neutral source of truth
85
+ │ ├── rules/ CLAUDE.md (global rules), safety.md, project-CLAUDE.template.md
86
+ │ ├── commands/ fh-context.md (project slash command written by bootstrap)
87
+ │ ├── skills/ 10 skills (SKILL.md, reference/, scripts/)
88
+ │ ├── agents/ 8 agents + README (tier map)
89
+ │ ├── hooks/ 4 hook scripts + Claude Code fragments + cost-prices.json
90
+ │ ├── mcp/ servers.json
91
+ │ ├── profiles/ opt-in profiles: local-ollama, local-llamacpp, mcp catalog (`init --profile`)
92
+ │ ├── evals/ promptfoo red-team config (on demand); skills carry evals/cases.yaml
93
+ │ ├── openspec/ spec-driven schema override + templates
94
+ │ ├── HARVEST.yaml classification of the official Claude Code plugins
95
+ │ └── PROVENANCE.yaml upstream path/commit/hash per harvested file
96
+ ├── packages/
97
+ │ ├── core/ @freeharness/core — pure domain, zero deps
98
+ │ ├── cli/ freeharness — CLI, composition root, adapters
99
+ │ ├── sdd/ @freeharness/sdd — vendored OpenSpec slice + openspec bin
100
+ │ └── memory/ vendored claude-mem (slim) + Bun build + viewer
101
+ ├── scripts/ check-arch.mjs, upstream-radar.mjs, skill-evals.mjs, simulate-session.mjs
102
+ ├── openspec/ FreeHarness's own specs and archived changes
103
+ ├── .github/workflows/ ci.yml, upstream-radar.yml
104
+ ├── Documents/ project documentation
105
+ ├── LICENSE, NOTICE
106
+ └── README.md
107
+ ```
108
+
109
+ ## Documents
110
+
111
+ - `Documents/architecture.md` — as-built architecture: canonical -> adapters -> harness, packages and dependency rule, capabilities per target, memory and SDD stacks, sync/radar, install manifest, cost tracker, harvest, tests and CI, distribution.
112
+ - `Documents/INSTALL.md` — install once per machine, activate per project, short reference.
113
+ - `Documents/ADVANCED.md` — manual build, single capabilities and project copies, memory switch by hand, cost tracking, OpenCode / plugin / npm targets, cleanup details, where things land.
114
+ - `Documents/ROADMAP.md` — v4 and v5 direction; v3 machine-only leftovers.
115
+ - `Documents/TEST-MATRIX.md` — every spec scenario mapped to a test or a machine-only tag.
116
+ - `Documents/INTEGRATION.md` — the Claude Code integration simulation (`npm run simulate`): what it proves, the M-items only a real session proves, the measured hook table.
117
+ - `Documents/RELEASE-CHECKLIST.md` — manual verifications (M1-M9) before a release.
118
+ - `Documents/PUBLISHING.md` — npm tarball contents, pack, publish, tag (owner only).
119
+ - `Documents/UPSTREAM-RADAR.md` — the weekly upstream report: sources, what it reports, from finding to work.
120
+ - `Documents/Prompt_ClaudeCode_Global.md`, `Documents/Prompt_ClaudeCowork.md` — reference copies of the global prompts.
121
+
122
+ ## Principles
123
+
124
+ - One neutral source; adapters do the translation. Model choice stays a tier, never a model name.
125
+ - Hexagonal-lite: a framework-free core and ports; harness and engine specifics only in adapters (enforced by `check:arch`).
126
+ - Own the engines: OpenSpec and claude-mem are vendored subsets with PROVENANCE, `sync check/adopt`, and a weekly radar; never auto-merged.
127
+ - Every side effect is previewed and confirmed; settings merges are additive; uninstall removes only what was emitted.
128
+ - Spec-first: FreeHarness evolves through its own `openspec/` (`/opsx`). Nothing duplicates OpenSpec's job.
129
+ - Harvest, rewrite, credit: no verbatim third-party content; every derived file has provenance.
130
+
131
+ ## License
132
+
133
+ MIT (see `LICENSE`). Third-party attributions for the vendored OpenSpec (MIT), claude-mem
134
+ (Apache-2.0) and the harvested Claude Code plugin concepts are in `NOTICE`.