v0.5.0
AION v0.5.0 — Hugging Face Datasets Integration + Ablation/SHAP Hard Gates + Session-Start Fix
New tools (4, zero-dependency, public HF Hub REST API)
- `aion_hf_search` — text search with optional modality / task_categories filter; 24h cache under `.opencode/hf-cache/`
- `aion_hf_info` — full dataset card + siblings + configNames + splits
- `aion_hf_ingest` — writes `data/aion-dataset-manifest.json` + a per-dataset Python loader.py
- `aion_hf_suggest` — tiered search (goal + keywords) with ranking score
CLI
- `aion-ts datasets search|info|ingest|suggest` subcommand mirrors the tools
- Flags: `--limit`, `--modality`, `--keywords`, `--goal`, `--top-k`, `--split`, `--workspace`, `--no-cache`
Prompt hardening (rules.ts)
- Ablation is the SOLE arbiter of "best method" HARD GATE — any "X is best" claim MUST be backed by a config-level ablation matrix (c-critic rejects anecdotal/single-seed/leaderboard-only claims). Software-engineering analogue of the controlled-variable method.
- Beyond p-value: complementary analysis battery HARD GATE — after significance + bootstrap CI, MUST also run SHAP (or equivalent feature attribution), residual structure diagnosis, drift analysis, and sensitivity analysis. Skipping any is a ts-critic blocker.
Prompt additions
- information-collector: Review/Survey suffix, Benchmark/Leaderboard suffix, Repository-pattern suffix, Failure-mode prefix, Workshop pivot, HuggingFace full protocol, mandatory pre-quit reformulation checklist.
- requirements-analyst: Hardware Probe step + Compute Budget Reality Check section in Task Contract. Probes CPU/RAM/GPU/disk/OS limits/Python stack/HF Hub reachability BEFORE the contract is emitted so unrunnable methods are flagged at intake, not 30 minutes into training.
Bug fix: session-start question was silently skipped
- Symptom (trace evidence): `language = en (source: config-default)` and `interactive mode = autonomous (source: config-default)` fired on the very first event, meaning the user was NEVER asked about language or interactive mode.
- Root cause: `src/hooks/system-transform.ts` resolved the language + interactive-mode state to config-default on round 1 IMMEDIATELY, then injected an "AUTO-RESOLVED" message telling the LLM "don't ask the user, mode is already resolved." The LLM obeyed and never called the `question` tool.
- Fix: round 1 with unset state now injects a MANDATORY `ASK THE USER NOW` directive and does NOT resolve. Round > 1 still unset = LLM skipped the question, then we fall back to config-default. This makes the session-start question actually fire on a well-behaved LLM while keeping config as a true fallback, not the primary path.
Other bug fixes (uncovered by 37 new unit tests)
- `inferModality`: now strips `modality:` / `task_categories:` namespace prefix from HF tags so `modality:time-series` is recognized.
- `encodeDatasetId`: `encodeURIComponent` on owner/name was percent-encoding the slash; HF API treats `/` as a path separator. Now per-segment encoding.
- `hfFetch`: 4xx errors were being retried like 5xx because the catch-all block had no HTTP-vs-network distinction. Added `HFHttpError` class; only network-layer failures (abort, ECONNRESET, TypeError) are retried.
- `ctx.directory` + `args.workspace_root` fallbacks for direct `execute()` calls (zod defaults not applied at the tool layer).
Docs
- README.md / README.zh-CN.md: News entry, Tools-34 badge, new "Tools" section with ablation/SHAP hard-gate callouts, `aion-ts datasets` CLI reference.
- docs/index.html: Quick Start refreshed to one-command install (no more `git clone`); added component cards for 34 Tools, Hugging Face Integration, Ablation & Statistical Rigor.
Tests
- 37 new unit tests in `test/unit/hf-datasets.test.mjs`
- 555/555 tests pass
- typecheck clean
Install
```bash
Latest (resolves to v0.5.0 once GitHub API cache refreshes):
curl -fsSL https://raw.githubusercontent.com/ztxtech/aion/dev/scripts/install.sh | bash -s -- --force
Pinned (recommended if your IP is rate-limited):
curl -fsSL https://raw.githubusercontent.com/ztxtech/aion/dev/scripts/install.sh | bash -s -- --force --version 0.5.0
Local tarball (fully offline):
bash scripts/install.sh --local release/aion-plugin-0.5.0.tar.gz
```
Upgrade from v0.4.0
No breaking changes. The new `hfDatasets` config block defaults to enabled; add it explicitly to `.opencode/aion.jsonc` only if you want to tune cache TTL or disable the tools.