howhard 2.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. howhard-2.0.0/.agents/plugins/marketplace.json +11 -0
  2. howhard-2.0.0/.antigravity-plugin/plugin.json +9 -0
  3. howhard-2.0.0/.claude-plugin/marketplace.json +12 -0
  4. howhard-2.0.0/.claude-plugin/plugin.json +7 -0
  5. howhard-2.0.0/.readthedocs.yaml +13 -0
  6. howhard-2.0.0/AGENTS.md +39 -0
  7. howhard-2.0.0/CHANGELOG.md +219 -0
  8. howhard-2.0.0/MANIFEST.in +12 -0
  9. howhard-2.0.0/PKG-INFO +201 -0
  10. howhard-2.0.0/README.md +175 -0
  11. howhard-2.0.0/benchmarks/__init__.py +1 -0
  12. howhard-2.0.0/benchmarks/bench_rule_retrieval.py +111 -0
  13. howhard-2.0.0/benchmarks/rule_cases.json +419 -0
  14. howhard-2.0.0/benchmarks/rule_retrieval.py +162 -0
  15. howhard-2.0.0/docs/changelog.md +2 -0
  16. howhard-2.0.0/docs/conf.py +10 -0
  17. howhard-2.0.0/docs/configuration.md +110 -0
  18. howhard-2.0.0/docs/context.md +63 -0
  19. howhard-2.0.0/docs/contributing.md +32 -0
  20. howhard-2.0.0/docs/evaluation.md +97 -0
  21. howhard-2.0.0/docs/index.md +45 -0
  22. howhard-2.0.0/docs/quickstart.md +156 -0
  23. howhard-2.0.0/docs/reference.md +270 -0
  24. howhard-2.0.0/docs/releasing.md +35 -0
  25. howhard-2.0.0/docs/requirements.txt +3 -0
  26. howhard-2.0.0/docs/retrieval.md +169 -0
  27. howhard-2.0.0/docs/rule-benchmark.md +147 -0
  28. howhard-2.0.0/docs/semantic-memory.md +226 -0
  29. howhard-2.0.0/docs/session_handoff_format.md +15 -0
  30. howhard-2.0.0/docs/skills.md +259 -0
  31. howhard-2.0.0/docs/upgrading-1.0.md +78 -0
  32. howhard-2.0.0/docs/upgrading-2.0.md +44 -0
  33. howhard-2.0.0/plugin.json +8 -0
  34. howhard-2.0.0/pyproject.toml +38 -0
  35. howhard-2.0.0/scripts/check +8 -0
  36. howhard-2.0.0/scripts/check-plugins.py +36 -0
  37. howhard-2.0.0/scripts/check-skills.py +68 -0
  38. howhard-2.0.0/scripts/verify-wheel.py +101 -0
  39. howhard-2.0.0/setup.cfg +4 -0
  40. howhard-2.0.0/skills/attribute-failure/SKILL.md +87 -0
  41. howhard-2.0.0/skills/howhard/SKILL.md +79 -0
  42. howhard-2.0.0/skills/howhard/references/accounting.md +280 -0
  43. howhard-2.0.0/skills/howhard/references/hosts.md +60 -0
  44. howhard-2.0.0/skills/howhard/references/workflow.md +227 -0
  45. howhard-2.0.0/src/howhard/__init__.py +9 -0
  46. howhard-2.0.0/src/howhard/__main__.py +3 -0
  47. howhard-2.0.0/src/howhard/accounting.py +503 -0
  48. howhard-2.0.0/src/howhard/cli.py +261 -0
  49. howhard-2.0.0/src/howhard/config.py +156 -0
  50. howhard-2.0.0/src/howhard/context.py +199 -0
  51. howhard-2.0.0/src/howhard/data/context.toml +5 -0
  52. howhard-2.0.0/src/howhard/data/default_config.toml +75 -0
  53. howhard-2.0.0/src/howhard/data/semantic.toml +19 -0
  54. howhard-2.0.0/src/howhard/decisions.py +105 -0
  55. howhard-2.0.0/src/howhard/engine.py +295 -0
  56. howhard-2.0.0/src/howhard/files.py +23 -0
  57. howhard-2.0.0/src/howhard/llm.py +140 -0
  58. howhard-2.0.0/src/howhard/memory.py +221 -0
  59. howhard-2.0.0/src/howhard/native.py +115 -0
  60. howhard-2.0.0/src/howhard/report.py +75 -0
  61. howhard-2.0.0/src/howhard/retrieval.py +298 -0
  62. howhard-2.0.0/src/howhard/selector.py +89 -0
  63. howhard-2.0.0/src/howhard/semantic.py +622 -0
  64. howhard-2.0.0/src/howhard/state.py +112 -0
  65. howhard-2.0.0/src/howhard/storage.py +300 -0
  66. howhard-2.0.0/src/howhard/validation.py +39 -0
  67. howhard-2.0.0/src/howhard.egg-info/PKG-INFO +201 -0
  68. howhard-2.0.0/src/howhard.egg-info/SOURCES.txt +88 -0
  69. howhard-2.0.0/src/howhard.egg-info/dependency_links.txt +1 -0
  70. howhard-2.0.0/src/howhard.egg-info/entry_points.txt +2 -0
  71. howhard-2.0.0/src/howhard.egg-info/requires.txt +20 -0
  72. howhard-2.0.0/src/howhard.egg-info/top_level.txt +1 -0
  73. howhard-2.0.0/tests/conftest.py +82 -0
  74. howhard-2.0.0/tests/test_cli.py +79 -0
  75. howhard-2.0.0/tests/test_context.py +120 -0
  76. howhard-2.0.0/tests/test_current_contract.py +105 -0
  77. howhard-2.0.0/tests/test_execution_accounting.py +769 -0
  78. howhard-2.0.0/tests/test_fast_reranking.py +67 -0
  79. howhard-2.0.0/tests/test_measurement_corrections.py +144 -0
  80. howhard-2.0.0/tests/test_memory.py +57 -0
  81. howhard-2.0.0/tests/test_native_startup.py +73 -0
  82. howhard-2.0.0/tests/test_portable_core.py +388 -0
  83. howhard-2.0.0/tests/test_retrieval.py +183 -0
  84. howhard-2.0.0/tests/test_retrieval_config.py +95 -0
  85. howhard-2.0.0/tests/test_rule_benchmark.py +218 -0
  86. howhard-2.0.0/tests/test_semantic.py +295 -0
  87. howhard-2.0.0/tests/test_semantic_cli.py +120 -0
  88. howhard-2.0.0/tests/test_semantic_only.py +149 -0
  89. howhard-2.0.0/tests/test_skill_workflow.py +36 -0
  90. howhard-2.0.0/tests/test_storage.py +186 -0
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "howhard",
3
+ "plugins": [
4
+ {
5
+ "name": "howhard",
6
+ "source": {"source": "local", "path": "./"},
7
+ "policy": {"installation": "AVAILABLE", "authentication": "ON_INSTALL"},
8
+ "category": "Productivity"
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "$schema": "https://antigravity.google/schemas/v1/plugin.json",
3
+ "name": "howhard",
4
+ "displayName": "howhard",
5
+ "version": "2.0.0",
6
+ "description": "Recommend model and reasoning effort from task context, then learn from actual feedback through writable semantic memory.",
7
+ "author": {"name": "howhard contributors"},
8
+ "repository": "https://github.com/xu-hao/howhard"
9
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "howhard",
3
+ "description": "The howhard skill for task-aware model and effort recommendations with feedback and writable memory.",
4
+ "owner": {"name": "howhard contributors"},
5
+ "plugins": [
6
+ {
7
+ "name": "howhard",
8
+ "source": "./",
9
+ "description": "Task-aware model and effort recommendations with feedback and writable memory."
10
+ }
11
+ ]
12
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "howhard",
3
+ "version": "2.0.0",
4
+ "description": "Recommend model and reasoning effort from task context, then learn from actual feedback through writable semantic memory.",
5
+ "author": {"name": "howhard contributors"},
6
+ "repository": "https://github.com/xu-hao/howhard"
7
+ }
@@ -0,0 +1,13 @@
1
+ version: 2
2
+ build:
3
+ os: ubuntu-24.04
4
+ tools:
5
+ python: "3.12"
6
+ sphinx:
7
+ configuration: docs/conf.py
8
+ fail_on_warning: true
9
+ python:
10
+ install:
11
+ - requirements: docs/requirements.txt
12
+ - method: pip
13
+ path: .
@@ -0,0 +1,39 @@
1
+ # howhard contributor instructions
2
+
3
+ Keep this file limited to repository-wide guardrails. Follow the canonical contracts and
4
+ procedures listed in [docs/index.md](docs/index.md). These guardrails adopt AGCoord's
5
+ contributor workflow for this repository.
6
+
7
+ - Track every code, test, documentation, or packaging change with a descriptive issue.
8
+ Pair every issue number with a sentence explaining the work it tracks. Do not file an
9
+ issue solely for machine-local installation, deployment, configuration, service
10
+ lifecycle, or other operator state; create one only when that work also requires a
11
+ repository change or the user explicitly requests an issue.
12
+ - Develop and validate only in an issue-specific Git worktree branched from `main`.
13
+ Preserve unrelated work and do not develop in the primary checkout.
14
+ - Verify behavior at public boundaries. Start bug fixes with a failing behavioral test;
15
+ accompany runtime changes with focused tests, affected canonical documentation, and a
16
+ `CHANGELOG.md` entry when the change is user-facing.
17
+ - A documentation-only change needs no tests or AGCoord gate. It qualifies only when every
18
+ changed path is `README.md`, `CHANGELOG.md`, `AGENTS.md`, Markdown below `docs/`, or a
19
+ `.png` or `.svg` image below `docs/assets/` whose provenance is recorded in
20
+ `docs/assets/README.md`. Verify the exact pull-request file list and diff, then merge it
21
+ through the forge; the issue, worktree, branch, pull-request, and no-direct-target-push
22
+ rules still apply.
23
+ - Tests own and stop every process, repository, and temporary state they create.
24
+ Never inspect or clean another agent's state.
25
+ - Keep the package independent of a parent application or sibling checkout.
26
+ Put project-specific assumptions in optional configuration; the ordinary workflow
27
+ must work without configuration or statistical parameter tuning.
28
+ - For every other change after bootstrap, route checks and publication through the local
29
+ coordinator, declare every scarce resource, and never submit coordinated work from an
30
+ admitted job. Gate and publish through one `agc land` request; never bypass or separate
31
+ its verdict from publication.
32
+ - Never upload a howhard distribution to PyPI unless the user explicitly requests it.
33
+ Permission to implement, test, commit, push, merge, tag, or create a GitHub release
34
+ does not authorize an upload.
35
+ - End changed work with the four-part [session handoff](docs/session_handoff_format.md);
36
+ answer read-only questions directly without an empty handoff shell.
37
+ - Follow the [contributor workflow](docs/contributing.md) for commands, bootstrap,
38
+ recovery, and cleanup. The [model and storage contracts](docs/reference.md) and
39
+ [release guide](docs/releasing.md) define the corresponding component contracts.
@@ -0,0 +1,219 @@
1
+ # Changelog
2
+
3
+ ## Unreleased
4
+
5
+ ## 2.0.0 — 2026-11-07
6
+
7
+ This source version prepares the 2.0.0 release. Until the corresponding GitHub release
8
+ is published, it remains a release candidate. A GitHub tag, release and attached
9
+ distributions are separate from PyPI publication; this entry asserts neither.
10
+
11
+ - Add portable, bounded, offline usage collection for explicitly owned Codex exec/session
12
+ and Claude SDK/session artifacts. Append usage to an existing execution through
13
+ idempotent measurement amendments; preserve the original outcome on collection failure.
14
+ - Normalize nonoverlapping token categories, retain unknown coverage and provenance,
15
+ refuse duplicate source claims including exact native parent-session/agent mappings, and keep client cost estimates separate from billed
16
+ charges and historical costs with an unspecified basis. Keep task outcome, token
17
+ coverage, bounded client estimates and authoritative billing independently recorded.
18
+ - Accept explicit category rate cards and prospective token-category forecasts. Omit
19
+ worker money uniformly for unknown or mixed price bases; never infer host charges.
20
+ - Require decision v5, agent request v4 and semantic state v3. Older receipts cannot
21
+ be replayed, while historical raw observations remain retained. Synchronize backend
22
+ and native plugin versions at 2.0.0; see the [upgrade guide](https://github.com/xu-hao/howhard/blob/main/docs/upgrading-2.0.md).
23
+ - Extend the host skill with owned artifact capture, rate-card provenance, honest
24
+ partial usage, attachment retries and explicit child-session binding limits.
25
+
26
+ ## 1.0.0 — 2026-10-31
27
+
28
+ ### Compatibility
29
+
30
+ This is a breaking release of the LLM-only routing workflow, not a compatible patch
31
+ to the 0.6 maintenance series. See the
32
+ [upgrade guide](https://github.com/xu-hao/howhard/blob/v1.0.0/docs/upgrading-1.0.md).
33
+
34
+ - Remove statistical routing, its CLI/API/configuration surfaces and generic prior
35
+ transfer. Native routing requires explicit host model/effort candidates and an
36
+ independent LLM forecast; unavailable inference stops selection.
37
+ - Require `howhard-decision-v4`, `howhard-agent-request-v3` and
38
+ `howhard-semantic-v2`. Older requests and receipts cannot be reused; no automatic
39
+ state migration or deletion occurs. Preserve historical evidence and reprepare
40
+ current requests; unsupported persisted inputs are refused explicitly.
41
+ - Local retrieval adds FastEmbed, ONNX Runtime and USearch dependencies and lazily
42
+ downloads pinned models for larger searches. Qwen remains an optional extra.
43
+ - Synchronize Python and all native plugin manifests at 1.0.0. Upgrade the backend
44
+ and installed skills separately; old GitHub releases remain available.
45
+
46
+ ### Changes
47
+
48
+ - Add the portable `attribute-failure` skill for bug-fixing agents to investigate
49
+ escaped defects through reproductions, Git history/blame and optional bisection,
50
+ connect supported findings to original executions, and amend outcomes with explicit
51
+ memory learning. Retain commit/PR provenance in existing artifacts and observation
52
+ notes; uncertain attribution remains unscored. Native plugins discover both skills.
53
+
54
+ - Fix a native-runtime import-order crash in hybrid retrieval by initializing ONNX
55
+ Runtime before USearch at the lazy dense-search boundary. Fresh and cached HNSW
56
+ searches work without caller pre-imports; small corpora still load neither runtime.
57
+
58
+ - Add optional fixed `[retrieval]` settings for the fast ONNX or Qwen reranker,
59
+ pinned model/artifact overrides and runtime controls. Apply the policy to routing,
60
+ memory and evidence search; reject invalid combinations before creating state.
61
+ Agent retrieval tools cannot change the tier, model or configuration, and no
62
+ automatic upgrade/fallback is introduced. Policy changes invalidate pending requests.
63
+
64
+ - Use a pinned MiniLM-L4 INT8 ONNX cross-encoder as the default CPU reranker. A
65
+ two-thread check of 200 pairs took 0.32–0.41 seconds for short inputs and 8.34–8.55
66
+ seconds for full 512-token windows. Keep the 200-to-eight pipeline and calling-agent
67
+ forecasts; retain instruction-aware Qwen through the optional `qwen` install extra.
68
+ The compact default has a 512-token combined window and no instruction tuning.
69
+
70
+ - Retrieve transferable execution experience with local BM25 and HNSW, RRF fusion
71
+ to 200 candidates and pretrained instruction-aware Qwen3-Reranker-0.6B selection
72
+ of up to eight precedents. Keep observed model/effort/outcome/cost attached, include
73
+ relevant failures and broader/narrower tasks, and retain the calling agent for final
74
+ forecasts. Make every retrieval/reranking stage independently replaceable in Python.
75
+ - Expose observed runs as read-only memory experts with prospective predictive credit.
76
+ Normalize decision support over participating experts so unrelated history cannot
77
+ dilute retrieved experience. Rebuild derived indexes on edits/amendments without
78
+ changing canonical evidence. Larger searches lazily download local pretrained models.
79
+
80
+ - Add an opt-in pytest-probability diagnostic benchmark comparing whole-rule versus
81
+ applicability-condition embeddings, with and without cross-encoder reranking.
82
+ Forty authored tasks cover paraphrases, misleading action words, exceptions,
83
+ missing prerequisites and conjunctions. Retain labels separately, report candidate
84
+ recall/ranking metrics and latency, and keep real-model runs outside the ordinary gate.
85
+
86
+ - Remove statistical-only routing, the internal statistical expert/risk floor, lexical
87
+ features, outcome/resource fitting, posterior caches and generic prior transfer.
88
+ Routing now requires independent LLM forecasts and semantic memory; missing or failed
89
+ inference stops explicitly. Remove `--llm`, `HOWHARD_LLM`, `--cache`, prior commands,
90
+ statistical Python APIs and configuration. State/protocol commands require no provider.
91
+ - Use LLM-reference predictive memory weights and a labeled weighted forecast envelope
92
+ for risk checks. New receipts/requests use v4/v3 and semantic state v2; old artifacts
93
+ remain untouched and old forecasts are unscored. Fresh-engine observations leave
94
+ writer work pending for explicit provider/calling-agent learning.
95
+
96
+ - Clarify portable skill feedback attribution when native host APIs accept explicit
97
+ model/effort overrides: completed execution can match the requested decision receipt
98
+ without provider attestation; known mismatches use raw feedback and unknown cells
99
+ remain unscored.
100
+ - Allow append-only measured-usage corrections with a validated amendment-only
101
+ `measurement_corrections` map and CLI JSON input. Explicit replacements or null clears
102
+ update effective regressions, worker costs and learning once while preserving raw history.
103
+ - Document a copyable coordinating-agent instruction requiring howhard before authorized
104
+ worker delegation, with actual feedback, an independent-baseline recursion exception
105
+ and an explicit distinction between agent instructions and host enforcement.
106
+ - Remove registry-only routing and the Python family/effort candidate filter. Every
107
+ routing request now requires the host's native inventory; prices come only from that
108
+ inventory. Remove packaged API prices, token mixes, family activation flags and
109
+ unresolved default-effort handling.
110
+ - Remove checkout-local Git store discovery and old SQLite adoption inspection. Git
111
+ worktrees use the common Git directory's store; explicit configuration/store selection
112
+ and plain-folder state remain supported. Existing checkout data is left untouched.
113
+ - Require timestamped contextual original records, identity/inventory/cost-bound v3
114
+ decision receipts and worktree-bound v2 agent requests. Only contextual v2 priors are
115
+ imported/exported, including empty-store exports. Superseded records, receipts,
116
+ requests and priors are refused rather than upgraded or read through compatibility paths.
117
+ - Explain automatic task-based Codex skill activation and optional explicit invocation.
118
+ The coordinating agent selects a worker before spawning; subagent startup does not
119
+ itself guarantee skill activation. Remove retired installation guidance.
120
+
121
+ ## 0.6.1 — 2026-10-30
122
+
123
+ - Allow append-only measured-usage corrections with a validated amendment-only
124
+ `measurement_corrections` map and `observe --measurement-corrections FILE`. Explicit
125
+ replacements or null clears update effective regressions, worker costs and learning
126
+ once while preserving the raw original, context and receipt identity.
127
+ - Preserve existing 0.6 persistence/API behavior. This additive row-semantics expansion
128
+ leaves existing data readable; older readers refuse rows containing the new field.
129
+ - Link the live Read the Docs site from the README and release guide.
130
+
131
+ ## 0.6.0 — 2026-10-30
132
+
133
+ - Accept actual native model/control inventories before forecasts, with distinct neutral
134
+ families for new identities, persistent historical metadata and exact categorical efforts.
135
+ The portable skill calls native CLI/API primitives without project bridges or tuning.
136
+ - Label unknown worker pricing explicitly and omit worker money uniformly when any native
137
+ candidate is unpriced; preserve known costs and null unknowns without API-price assumptions.
138
+ - Separate current project capture from durable state, share fresh Git worktree state,
139
+ retain valid legacy/explicit stores and refuse cross-project store reuse. Expose paths
140
+ and intentional state selection; preserve identity on project moves, exclude resolved
141
+ state from source capture/retrieval, and bind prepared requests to their originating worktree.
142
+ - Add direct evidence lookup, matching stable-ID feedback retries and validated raw native
143
+ execution admission without retrospective forecasts. Include all correction notes in
144
+ writer context while retaining amendment scoring and learning-event idempotence.
145
+ - Existing logs, receipts and prior formats remain readable. Native metadata/efforts and
146
+ new receipts with project identity/native cost-policy fields require 0.6.0 or later;
147
+ old unbound pending requests must be prepared again. No old state is migrated
148
+ or deleted automatically, and generic prior exports exclude native identity-specific terms.
149
+
150
+ ## 0.5.0 — 2026-10-30
151
+
152
+ - Move the canonical skill to standard `skills/howhard` discovery, with thin portable,
153
+ Codex marketplace, Claude Code and Antigravity manifests for first-party installation.
154
+ - Retire the bespoke 0.4 `howhard skills install` command and `howhard.skill_install`
155
+ API before 1.0. The source distribution retains the skill; the Python wheel supplies
156
+ the backend without another skill copy. Preserve edited old copies before migration.
157
+ - Complete the existing Quickstart with source backend installation, native plugin
158
+ setup/invocation, backend executable visibility, actual feedback and memory learning.
159
+ - Add explicit native validation and an optional third-party `skills` CLI smoke;
160
+ keep native installations and npm downloads out of the ordinary Python gate.
161
+
162
+ ## 0.4.0 — 2026-10-30
163
+
164
+ - Package one reusable howhard skill with progressive references for actual task/context
165
+ reasoning, host-compatible delegation, outcome corrections and writable memory.
166
+ - Add offline `skills install` for Codex, Claude Code and Antigravity, with explicit
167
+ project/user scopes, deduplicated discovery paths, identical-install reuse and
168
+ preflight conflict refusal. Installation leaves model/provider settings unchanged.
169
+ - Document source and pinned Git installation, host capability gaps and optional
170
+ project adapters; verify skill installation from a clean wheel.
171
+
172
+ ## 0.3.1 — 2026-10-30
173
+
174
+ - Allow append-only outcome amendments to clean, loud or silent, retaining the original
175
+ run's context and measurements and replacing Bayesian and semantic evidence once.
176
+ Row keys and cache/prior formats are unchanged; earlier versions cannot read clean
177
+ or loud amendments.
178
+ - Give every correction its own idempotent memory-learning event, including corrections
179
+ back to an earlier result, and reject writer responses prepared before a correction.
180
+
181
+ ## 0.3.0 — 2026-10-30
182
+
183
+ - Add LLM reasoning over original task/project text, persistent semantic memory and
184
+ bounded evidence retrieval, with an isolated stateless forecast baseline.
185
+ - Support add, edit, remove, restore, merge and split memory operations through the
186
+ CLI, Python API and LLM writer, with transactional edits and preserved history.
187
+ - Update approximate predictive weights from actual selected-action forecasts and
188
+ effective outcomes, including resource evidence, amendments and fresh edit versions.
189
+ - Reuse an authenticated Claude CLI with tools disabled, accept custom adapters and
190
+ expose a calling-agent protocol. Explicit LLM errors remain explicit; automatic
191
+ statistical fallback is labeled.
192
+ - Preserve semantic forecasts and memory versions in receipts, audit inference and
193
+ writer usage, and report observed-action forecast metrics and unknown costs honestly.
194
+ - Add a real-project evaluation protocol. Keep correctness fixtures separate from
195
+ routing-quality evidence; defer Read the Docs publishing.
196
+
197
+ ## 0.2.0 — 2026-10-29
198
+
199
+ - Condition predictions on task descriptions and project snapshots that are captured
200
+ afresh for every decision, including working-tree changes and optional measured coverage.
201
+ - Learn shared, family-specific and effort-specific contextual outcome effects, plus
202
+ contextual token and time effects, using a deterministic local lexical encoder.
203
+ - Save decision receipts so later observations keep the original task and project
204
+ context. Add task-text/file inputs and `observe DECISION_ID OUTCOME` to the CLI.
205
+ - Preserve missing context in legacy rows, retain original context on amendments,
206
+ and version caches and prior transfers without exporting raw text or snapshots.
207
+ - Marginalize inactive coefficients exactly to keep fitting practical on small logs.
208
+
209
+ ## 0.1.0 — 2026-10-29
210
+
211
+ - Start without configuration: packaged registry, prices, risk policies and priors,
212
+ automatic local learning, and a standard policy for new task names.
213
+ - Choose model and effort with Bayesian clean/loud/silent outcomes, exact log-normal
214
+ cost/time regressions, Thompson sampling, a silent-failure cap and explanations.
215
+ - Record outcomes in a strict append-only journal, amend escaped failures and flush
216
+ into the outcome log. Cache posteriors and refit from all evidence with warm starts.
217
+ - Transfer shared learning between projects without exporting run records or project effects.
218
+ - Add the Python API, six CLI commands, acceptance tests, wheel checks, canonical
219
+ documentation, contributor guardrails and release versioning.
@@ -0,0 +1,12 @@
1
+ include AGENTS.md CHANGELOG.md
2
+ include .readthedocs.yaml
3
+ include plugin.json
4
+ include .agents/plugins/marketplace.json
5
+ include .claude-plugin/plugin.json .claude-plugin/marketplace.json
6
+ include .antigravity-plugin/plugin.json
7
+ recursive-include docs *.md *.py *.txt
8
+ recursive-exclude docs/_build *
9
+ recursive-include scripts *
10
+ recursive-include skills *.md
11
+ recursive-include tests *.py
12
+ recursive-include benchmarks *.py *.json
howhard-2.0.0/PKG-INFO ADDED
@@ -0,0 +1,201 @@
1
+ Metadata-Version: 2.4
2
+ Name: howhard
3
+ Version: 2.0.0
4
+ Summary: Choose an agent's model and reasoning effort, and learn from outcomes.
5
+ Project-URL: Repository, https://github.com/xu-hao/howhard
6
+ Project-URL: Issues, https://github.com/xu-hao/howhard/issues
7
+ Project-URL: Changelog, https://github.com/xu-hao/howhard/blob/main/CHANGELOG.md
8
+ Requires-Python: >=3.11
9
+ Description-Content-Type: text/markdown
10
+ Requires-Dist: numpy>=1.24
11
+ Requires-Dist: fastembed==0.9.1
12
+ Requires-Dist: usearch<3,>=2.21
13
+ Provides-Extra: test
14
+ Requires-Dist: pytest>=8; extra == "test"
15
+ Requires-Dist: build; extra == "test"
16
+ Requires-Dist: pytest-probability==0.3.0; extra == "test"
17
+ Provides-Extra: docs
18
+ Requires-Dist: sphinx>=8; extra == "docs"
19
+ Requires-Dist: myst-parser>=4; extra == "docs"
20
+ Requires-Dist: furo; extra == "docs"
21
+ Provides-Extra: bench
22
+ Requires-Dist: pytest-probability==0.3.0; extra == "bench"
23
+ Requires-Dist: fastembed==0.9.1; extra == "bench"
24
+ Provides-Extra: qwen
25
+ Requires-Dist: sentence-transformers<7,>=5.4; extra == "qwen"
26
+
27
+ # howhard
28
+
29
+ *How hard should the agent think?*
30
+
31
+ [Read the documentation](https://howhard.readthedocs.io/en/latest/).
32
+
33
+ `howhard` chooses the model and reasoning effort for a task delegated to an AI
34
+ agent. An LLM reads the actual task, current project and writable semantic memory,
35
+ forecasting clean completion, caught failures, escaped failures, tokens and time for
36
+ each candidate. Recorded outcomes update the predictive support for memories.
37
+
38
+ Selection balances worker cost, expected failure cost and waiting time. Its risk cap
39
+ uses a weighted envelope of LLM forecasts; these estimates are not a calibrated
40
+ failure guarantee. Without a usable LLM forecast, routing fails explicitly. There is
41
+ no statistical prediction model or statistical fallback.
42
+
43
+ ## Quickstart
44
+
45
+ You need Python 3.11+, Git and a current Codex, Claude Code or Antigravity client
46
+ with native plugin support. No parameter tuning or Node/npm setup is
47
+ required by howhard. Once the `v2.0.0` GitHub tag is published, install the Python
48
+ backend from that tagged source in your project directory. Before publication, use
49
+ the verified local-checkout alternative below.
50
+
51
+ ```sh
52
+ python3 -m venv .venv-howhard
53
+ . .venv-howhard/bin/activate
54
+ python -m pip install "git+https://github.com/xu-hao/howhard.git@v2.0.0"
55
+ howhard --version
56
+ ```
57
+
58
+ Expect `howhard 2.0.0`. Read the [2.0 upgrade guide](docs/upgrading-2.0.md) when moving
59
+ from 1.0; upgrades from 0.6.x also need the [1.0 compatibility changes](docs/upgrading-1.0.md).
60
+ This command installs from GitHub source and does not require a PyPI release.
61
+ Keep this environment active and start your coding agent from the same shell so
62
+ it can find `howhard`. Install the skill through **your agent's native plugin manager**;
63
+ choose the matching block below.
64
+ An existing GUI session may need the absolute path to `.venv-howhard/bin/howhard`
65
+ in your project; reopening a GUI alone does not activate this terminal's environment.
66
+
67
+ Version 2.0.0 adds portable execution accounting and category rate cards. Before the
68
+ tag is published, install from a verified local checkout with
69
+ `python -m pip install /path/to/howhard` and check for `howhard 2.0.0`. Load the native
70
+ plugin from that same checkout: substitute its path for the repository source in the
71
+ commands below. A source version or changelog entry does not assert publication.
72
+ GitHub release assets and their checksums are separate from PyPI publication.
73
+ See the [accounting contract](docs/reference.md#portable-execution-accounting)
74
+ for `usage collect`, `usage attach` and `observe --execution-usage` availability.
75
+
76
+ Codex:
77
+
78
+ ```sh
79
+ codex plugin marketplace add xu-hao/howhard
80
+ codex plugin add howhard@howhard
81
+ ```
82
+
83
+ Claude Code:
84
+
85
+ ```sh
86
+ claude plugin marketplace add xu-hao/howhard
87
+ claude plugin install howhard@howhard
88
+ ```
89
+
90
+ Antigravity (`agy`):
91
+
92
+ ```sh
93
+ agy plugin install https://github.com/xu-hao/howhard
94
+ agy plugin list
95
+ ```
96
+
97
+ These native flows use the user's plugin environment. Claude Code also supports explicit
98
+ `--scope project` or `--scope local` on both marketplace addition and plugin installation.
99
+ Choose the intended scope before running those commands. Reopen the agent if necessary.
100
+ All three load the same skills: `howhard` for routing and learning, and
101
+ `attribute-failure` for investigating escaped defects. They share common Agent Skills
102
+ content with thin host-specific plugin metadata; see [skill installation](docs/skills.md).
103
+
104
+ In Codex, the installed skill can activate automatically when a task matches its
105
+ model-selection or feedback-learning description. Explicit invocation is optional:
106
+ use `$howhard` or `/skills` in Codex, `/howhard:howhard` in Claude Code, or `/howhard`
107
+ in Antigravity to request it directly. [Codex skill activation](https://learn.chatgpt.com/docs/build-skills)
108
+ is based on the task; starting a subagent alone does not guarantee activation.
109
+ The coordinating agent uses howhard **before** spawning a worker so it can choose that
110
+ worker's model and effort. The plugin supplies instructions, with no subagent-start hook.
111
+ To request the complete workflow explicitly, give it your real task:
112
+
113
+ > Use howhard for this task: repair transaction rollback and verify its failure
114
+ > boundary. Read the current project context, obtain an independent baseline, consult
115
+ > memory, and recommend a model and effort supported by this host. Execute the authorized
116
+ > work with that cell, then record the actual result and measured usage under a stable
117
+ > execution ID and update memory. Report any unsupported controls or identity mismatch.
118
+
119
+ For persistent use before worker delegation, copy the
120
+ [coordinating-agent instruction](docs/skills.md#require-howhard-before-delegation)
121
+ into your agent's project instructions (`AGENTS.md` in Codex). The skill guide explains
122
+ the instruction's scope and the host enforcement needed for a hard guarantee.
123
+
124
+ The skill discovers the host's executable model/control inventory, creates temporary
125
+ protocol inputs, obtains an independent baseline and uses memory-conditioned forecasts.
126
+ It calls the native howhard CLI/API directly. You do not write a project bridge, add a
127
+ dependency-lock feature, maintain a separate ledger, map models to families
128
+ or tune parameters. Unknown native identities get distinct identity labels;
129
+ unsupported or unknown execution controls are reported honestly.
130
+
131
+ Your host's existing LLM supplies the calling-agent reasoning without another API key.
132
+ An independent baseline needs a fresh context without memory/history; if unavailable,
133
+ the agent reports routing unavailable until an independent LLM forecast is available. Unknown worker
134
+ prices stay unknown. If any candidate is unpriced, every candidate is compared without
135
+ worker money; the partial objective is labeled rather than treating unknown charges as
136
+ free or assuming API list prices apply to the host.
137
+
138
+ The JSON decision includes `chosen.model`, `chosen.effort`, `decision_id`, `cap_met`,
139
+ `needs_review` and the native `cost_policy`. A recommendation does not execute the task.
140
+ Honor required review. When the native host accepts explicit model and effort overrides
141
+ and the task completes, use the matched decision receipt for the requested cell unless
142
+ the host reports a launch failure, ignored control, substitution or contradictory
143
+ metadata; note that host-API provenance when no resolved identity is returned. Otherwise,
144
+ match only on exact reported actual identity/control, use raw feedback for a known
145
+ mismatch, and leave feedback unscored only when that identity/control is unknown.
146
+ Fresh Git worktrees automatically share repository state while capturing the current
147
+ checkout; plain folders use local `.howhard`, and explicit store selection is available.
148
+ Inspect the resolved roots with:
149
+
150
+ ```sh
151
+ howhard paths --json
152
+ ```
153
+
154
+ Only after execution, replace `DECISION_ID` with the returned receipt ID, `EXECUTION_ID`
155
+ with a stable ID for that actual invocation, and `OUTCOME` with `clean`, `loud` or `silent`:
156
+
157
+ ```sh
158
+ howhard observe DECISION_ID OUTCOME --id EXECUTION_ID --json
159
+ howhard evidence EXECUTION_ID --raw --json
160
+ howhard memory learn-context EXECUTION_ID --json
161
+ howhard memory list --json
162
+ howhard report --json
163
+ ```
164
+
165
+ `clean` means no observed defect; `loud` means a gate/review caught a failure; `silent`
166
+ means a failure escaped and was discovered later. Supply `--tokens`, `--seconds` and
167
+ `--cost-usd` only when measured; unknown usage stays null. Never record an unrun action
168
+ or attach a different executed cell to the selected receipt. A verified different cell
169
+ is recorded as raw native feedback with the original frozen context and provenance; an
170
+ unknown actual identity/control stays unscored when neither accepted overrides nor exact
171
+ reported identity establishes a match. Matching stable-ID retries return the first row,
172
+ while conflicting feedback is refused. The skill uses the returned
173
+ learning context, including the original and correction notes, to revise mutable memory. After the host prepares a temporary `writer-response.json`
174
+ with `operations` and `reason` grounded in that result, apply it using `N` and `EVENT_KEY`
175
+ from `memory learn-context`:
176
+
177
+ ```sh
178
+ howhard memory learn EXECUTION_ID --file writer-response.json --expected-revision N --event-key EVENT_KEY --json
179
+ ```
180
+
181
+ An empty operations list is valid. New lessons receive no retrospective predictive
182
+ credit. Retry learning for the same effective event, and append changed feedback with
183
+ `--amends` instead of creating another original run.
184
+
185
+ Standalone `pick` can reuse an authenticated Claude CLI or `HOWHARD_LLM_COMMAND`.
186
+ Calling-agent commands need no provider configuration and never start nested inference.
187
+ Observations made without a provider adapter return a pending memory update; use the
188
+ explicit writer workflow above or `memory learn RUN_ID` to invoke a provider. The
189
+ [skill guide](docs/skills.md) covers native lifecycle commands, native feedback/mismatch handling and local/pinned sources.
190
+ A third-party cross-agent `npx skills` route is optional, not a prerequisite.
191
+ Python backend upgrades and skill updates are separate.
192
+
193
+ See the [quickstart](docs/quickstart.md), [documentation index](docs/index.md),
194
+ [model and storage contracts](docs/reference.md), and [changelog](CHANGELOG.md).
195
+ The [context architecture](docs/context.md) explains original text, changing project
196
+ snapshots and decision receipts. Evaluate routing quality with the
197
+ [real-project protocol](docs/evaluation.md); unit fixtures establish implementation
198
+ behavior rather than product-quality evidence.
199
+ Python 3.11+ and a POSIX platform are required. Run tests with
200
+ `python -m pip install -e '.[test]'` followed by `python -m pytest`;
201
+ contributors use [AGCoord and isolated worktrees](docs/contributing.md).