diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a599deac..0c323f54 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -14,12 +14,16 @@ on: - "SPEC.md" - "STATUS.md" - "ROADMAP.md" + - "CONTRIBUTING.md" pull_request: paths: - "docs/**" - "mkdocs.yml" - "scripts/sync_mkdocs_pages.py" - "STATUS.md" + - "ROADMAP.md" + - "CONTRIBUTING.md" + - ".github/workflows/docs.yml" workflow_dispatch: permissions: @@ -28,7 +32,7 @@ permissions: id-token: write concurrency: - group: pages + group: pages-${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: @@ -40,13 +44,15 @@ jobs: with: python-version: "3.12" - name: Install docs deps - run: pip install -U pip "mkdocs>=1.5" "mkdocs-material>=9.0" + run: pip install -U pip "mkdocs>=1.5,<2" "mkdocs-material>=9.0" - name: Sync root pages into docs/ run: | cp ARCHITECTURE.md docs/architecture.md cp DESIGN.md docs/design.md cp SPEC.md docs/spec.md cp STATUS.md docs/status.md + cp ROADMAP.md docs/ROADMAP.md + cp CONTRIBUTING.md docs/contributing.md python3 scripts/sync_mkdocs_pages.py - name: Build site (strict) run: mkdocs build --strict diff --git a/CHANGELOG.md b/CHANGELOG.md index 825f1b50..e83453ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,286 +2,43 @@ ## Unreleased -- **P1 fail-closed hardening:** Claude `init` / `install.sh --claude` helpers - are transactional (symlink refuse, target-keyed backup, staged smoke / - UNVERIFIED). Unguarded `copy_claude_helpers` removed. Scored `settle()` / - `settle_and_log()` require token or TTY confirm, non-empty `authority.ref`, - and non-advisory kind; piped yes is refused. X API base allowlists - `api.twitter.com` / `api.x.com` (https only). Cloud vector writes require - `HYPERLEX_CLOUD_WRITE=1` or TTY `--i-understand-cloud-write`. `doctor` - emits `CLAUDE_SOT_CLEARED=` from local pin/provenance (Skill Validation - fetches full git history so the pin SHA is locally present). `receipt.integrity` - is full sha256; `emit_receipt(..., validate=True)` default; legacy 12-char - verify only with `HYPERLEX_RECEIPT_LEGACY_INTEGRITY=1`. -- **Claude Code host (additive):** `.claude-plugin/plugin.json`, project - `CLAUDE.md`, slash helpers (`.claude/skills/` + plugin `commands/`), - `install.sh --claude` / `--claude-plugin`, `scripts/claude_hlx.sh`, - `docs/claude-skill.md`, `docs/claude-runtime-contract.md`, - `references/claude-runtime-contract.md`. - `doctor` reports `CLAUDE_OK` / `CLAUDE_MISSING` (missing does not fail). - Hermes install paths unchanged. -- CLI `wizard` + package `hyperlex.wizard`: week-one Hermes guided path - (`--auto` / interactive); never auto-settles; offline-first; SKILL.md procedure -- **SIGNAL REPORT parity (Companion adaptation):** `result.v1` extended with optional `provenance.seed`, `analysis.compression_metrics`, `analysis.symbolic_role`, `analysis.propagation_vector`, `analysis.slang_family_tree`, `analysis.signal_report` (schema + package-local copy). Builder: `src/hyperlex/analysis/signal_report.py`. Wired into `detect_memetic_patterns` (attach + seed header). Docs: `docs/superpowers/specs/2026-08-06-signal-report-adaptation.md`. All new fields optional and fail-open. Brier remains null on open analysis. -- **Ingest ↔ vector:** fail-open auto-index on `pipeline` / `run` / receipt emit (`hyperlex.vectordb.autoindex`); respects `HYPERLEX_VECTOR` + `HYPERLEX_VECTOR_BACKEND` (local only; Cloud promote stays explicit) -- Vector/Chroma: `get_vector_store(backend="chroma", path=...)` no longer TypeErrors (`seed_all` always passed `path`) -- Chroma local PersistentClient via `--db` / `HYPERLEX_CHROMA_PATH` (cloud credentials still supported) -- Installer removes leftover destination `.git` so Hermes skill installs are not nested half-repos -- Tests: ephemeral + local persistent Chroma seed/search smoke -- **Promote path:** `vector-export` / `vector-import` / `vector-sync` copy embeddings as-is (local chroma → Cloud without re-embed) -- `force_cloud=True` ignores `HYPERLEX_CHROMA_PATH` so promote does not write back to local by mistake -- CLI auto-loads `~/.hermes/.env` (and `~/.hyperlex/.env`); accepts official `CHROMA_API_KEY` / `CHROMA_TENANT` / `CHROMA_DATABASE` aliases -- Cloud client only requires API key; tenant/database optional when Chroma can infer them - -## 0.4.0 — Automatic backend pipeline (2026-08-05) - -- `run_pipeline` / CLI `pipeline`: ingest → analyze → receipt → forecasts → score log → Phase 5 risk -- `ingest` and `run` default to the full auto path (`ingest --raw-only` for signal-only) -- Multi-term bags auto-expand to one full result unit per lexicon atom -- Never auto-settles; `brier` always null until operator `settle` -- Package API: `run_pipeline`, `run_one` - -## 0.3.9 — Atomic multi-term seeds (2026-08-05) - -- `split_seed_terms`: longest-match lexicon split (`sigma rizz locked in` → sigma | rizz | locked in) -- Analyze attaches `seed_terms` + `per_term` lineage; primary lineage is best single atom (no density stack) -- Phase 5 auto-expands multi-term seeds → `hyperlex.phase5_multi_term.v1` (use `--no-expand` to blend) -- CLI: `terms-split`; docs/backfill README clarify atomic pack entries -- Scan/cron defaults use atomic queries; risk-schedule expands seed bags into atoms -- Phase 5 archive snapshots re-exported multi-term; examples/docs scrubbed of blended seeds - -## 0.3.8 — Operator loop docs + simplified ingest routing (2026-08-05) - -- Canonical ingest catalog: `hyperlex.intake.sources` (`resolve_source`, `pick_source`, `ROUTE_PRESETS`) -- Prefer `--route offline|live|glossary|social` over raw adapter names (aliases: real→glossary, x→x_search, …) -- CLI: `run` one-shot path, `commands` map, `pending` open forecasts; positional query on `analyze`/`run` -- Structured ingest always on the analyze path; `sources` shows routes + resolve preview -- Docs: `docs/operator-loop.md`, `docs/commands.md`; ingest module rewrite -- Recommendation: burn-in with offline cron + settle before ANN or more Phase 5 surface - -## 0.3.7 — Risk-tier → scan/cron schedule coupling (2026-08-05) - -- `hyperlex.simulation.schedule`: `TIER_POLICY`, `plan_scan_from_risk/term/tier`, `write_scan_plan`, `aggregate_scan_risk` -- CLI: `risk-schedule` + `simulate --mode schedule` (advisory Hermes job envelopes; no auto-register) -- `scan` summaries include `scan_risk_advisory` (lineage coverage → next cadence) -- Examples: `examples/cron/risk-tier-elevated.job.json`, `examples/cron/README.md` -- Docs: cron-live-emergence, phase5, modules/simulation - -## 0.3.6 — Transmission calibration, scenario library, research export (2026-08-05) - -- `calibrate_transmission_params` grid-search β/γ against settled pairs (SPECULATIVE) -- Multi-agent scenario library + `compare_scenarios` presets -- `export_research_packet` paper-ready JSON/Markdown -- CLI: `simulate --mode calibrate|compare|export` - -## 0.3.5 — Hybrid lineage re-rank + domain phylogeny packs (2026-08-05) - -- `match_lineage` hybrid: lexical confidence + capped vector family boost -- Domain packs under `data/phylogeny/` (finance, ai-native, political, regional) -- `build_domain_phylogeny` / `list_domain_packs`; CLI `simulate --mode phylogeny --domain …` - -## 0.3.4 — Vector neighbors on analyze + receipt auto-index (2026-08-05) - -- `detect_memetic_patterns` attaches `analysis.vector_neighbors` when local DB present (`HYPERLEX_VECTOR=auto|1`) -- `emit_receipt` fail-open indexes into `~/.hyperlex/vector.db` -- ROADMAP: vector DB marked complete; hybrid lineage re-rank listed under 5.1 - -## 0.3.3 — Local SQLite vector DB (2026-08-05) - -- `hyperlex.vectordb`: SQLite store at `~/.hyperlex/vector.db` -- Default offline hash embeddings (`hyperlex.hash_ngram_v1.d256`); optional openai_compatible -- Seed from LINEAGE_REGISTRY + `data/backfill/2026` + receipts -- CLI: `vector-seed`, `vector-search`, `vector-stats` -- Docs: `docs/modules/vectordb.md` - -## 0.3.2 — Hallmark redesign: Pages workbench identity (2026-08-05) - -- Custom docs identity: IBM Plex + phosphor-teal tokens (`docs/stylesheets/extra.css`) -- Workbench home: status strip, desk cards (history / install / simulate / status) -- STATUS published on site (`docs/status.md`); Run history elevated in nav -- Archive family stats from receipt summaries (not ledger-only) -- Catalog uses Material card grid for each run snapshot - -## 0.3.1 — Pages as static history of runs (2026-08-05) - -- `export_run_history` writes dated snapshots under `docs/archive/runs//` -- Auto-refresh `docs/archive/latest/` + `catalog.json` + history `index.md` -- CLI: `archive-export --history`, `--phase5`, `archive-catalog` -- Phase 5 scenarios can be appended as publish-safe digests (not full agent dumps) -- Docs/MkDocs: Run history catalog nav; Pages role clarified (static, not live store) - -## 0.3.0 — Phase 5.0 research simulation track (2026-08-05) - -- **Phase 5.0** package `hyperlex.simulation`: - - cultural transmission cascade (`simulate_cultural_transmission`) - - multi-agent memetic roles (`run_multi_agent_memetics`) - - hyperstition risk forecast (`forecast_hyperstition_risk`, `risk_from_analysis`) - - phylogeny scaffold (`build_family_phylogeny`) - - composed scenario (`run_phase5_scenario`) -- CLI: `simulate` (`--mode scenario|transmission|agents|risk|phylogeny`, `--from-analyze`) -- Docs: `docs/phase5.md`, `docs/modules/simulation.md`; ROADMAP/STATUS/SPEC/README refresh -- All Phase 5 outputs **SPECULATIVE**; `brier` always null; no receipt mutation -- API: symbols on `API_EXTENDED` (frozen `API_V1` unchanged) - -## 0.2.12 — YTD 2026 slang backfill + lineage backpropagation (2026-08-05) - -- Curated monthly packs: `data/backfill/2026/` (Jan–Aug) with OBSERVED/INFERRED terms. -- `hyperlex.analysis.backfill` — load, inventory, merge packs into registry overlay. -- `hyperlex.analysis.backprop` — non-mutating rematch of historical receipts; reclassification report only. -- CLI: `lineage-backfill`, `lineage-backprop` (scripts + package entry). -- `LINEAGE_REGISTRY` expanded with 2026 brainrot/AI leaves (`rizz`, `locked in`, `crash out`, `vibe coding`, …). -- `match_lineage(..., registry=)` accepts overlay for backprop without global mutation. -- Integrity rule: never rewrite historical receipt hashes; Brier still null until settlement. -- Docs: `data/backfill/2026/README.md`; slang-lineages backfill section. - -## 0.2.11 — GitHub Pages enabled + long-term analysis archive (2026-08-05) - -- GitHub Pages enabled (Actions build) → https://scrimshawlife-ctrl.github.io/Hyperlex-Hermes-Specs/ -- `archive-export` writes sanitized ingest/analysis snapshots under `docs/archive/` - for long-term review on the docs site (local ~/.hyperlex remains primary store). -- Docs: `docs/archive/README.md`; MkDocs nav includes analysis archive. - -## 0.2.10 — OpenAI-compatible LLM provider, ledger-stats, STATUS (2026-08-05) - -- Governed LLM: `HYPERLEX_LLM_PROVIDER=openai_compatible` (stdlib urllib; fail-closed offline). -- CLI `ledger-stats` aggregates family/stage/source counts from receipt ledger. -- `STATUS.md` skill readiness snapshot. - -## 0.2.9 — Skill doctor, Pages URL, release preflight (2026-08-05) - -- CLI `doctor`: deep Hermes-skill health (files, API_V1, mock analyze, brier null, goldens, compat). -- Expanded `scripts/release_preflight.py` (doctor, diagram, case study, tests). -- MkDocs `site_url` set for GitHub Pages project site. - -## 0.2.8 — Docs site deploy, strict MkDocs, CI case study (2026-08-05) - -- GitHub Pages workflow (`.github/workflows/docs.yml`) builds/deploys MkDocs. -- `scripts/sync_mkdocs_pages.py` rewrites root-doc links for strict builds. -- Skill CI runs case study script; docs ROADMAP mirrored to site. -- MkDocs `--strict` clean (README excluded from site). - -## 0.2.7 — MkDocs site, governed LLM stub, ledger-diff (2026-08-05) - -- MkDocs documentation site (`mkdocs.yml`, optional extra `[docs]`). -- Governed LLM neologism enrichment (`hyperlex.llm`); requires `HYPERLEX_LLM=1` + provider. -- CLI `ledger-diff` compares two receipt snapshots. -- Docs: `docs/modules/llm.md`, `docs/index.md`. - -## 0.2.6 — Case study + cross-domain lineages (2026-08-05) - -- Case study: `examples/case-studies/e2e-mock-scan.md` + `scripts/run_case_study.py`. -- New lineage families: `gaming-meta`, `workplace-corp` (registry, Mermaid, mock seeds, goldens). -- Typology: `labor_identity`; gaming cues on `platform_agency`. - -## 0.2.5 — Virality prediction v0, community drivers, richer neologisms (2026-08-05) - -- `predict_virality` → `analysis.virality.prediction` (SPECULATIVE; not Brier/calibration). -- Semantic variation multi-label community drivers. -- Neologism detector: compound phrases + formation tags. -- Docs: `docs/modules/virality.md`. - -## 0.2.4 — Hermes skill posture, CI, typology, goldens (2026-08-05) - -- Docs: Hyperlex is a **Hermes skill (Python package repo)** — not a separate product app. - `docs/hermes-skill.md` replaces standalone-app framing. -- CI: `PYTHONPATH=src`, offline env, diagram --from-golden step. -- Memetic typology expansion: multi-type rule table + lineage soft prior + transparent rules_hit. -- Golden receipts: kinship-address, political-status (+ typology field in MANIFEST). - -## 0.2.3 — Receipt history diagrams (2026-08-05) - -- `hyperlex.diagrams` — Mermaid lineage distribution, receipt timeline, family graph, per-receipt flow. -- CLI `diagram --from-golden|--from-ledger|--input` writes `.mmd` + optional HTML. -- Docs: `docs/diagrams.md`. - -## 0.2.2 — Docs refresh, market connectors, hyperstition feedback (2026-08-05) - -- Full docs pass: ARCHITECTURE, README, QUICKSTART, RELEASE_NOTES, connectors.md. -- `hyperlex.connectors.market_signal` — market_signal.v1 + forecast_pipeline.v1 packets. -- `hyperlex.connectors.hyperstition_feedback` — advisory stage→f map from settled series. -- CLI: `signal`, `feedback`; `extract_forecasts(..., hyperstition_stage_map=...)`. -- Roadmap: hyperstition feedback + market connectors marked done. - -## 0.2.1 — Standalone app, API freeze, golden receipts, Abraxas modules (2026-08-05) - -- Docs synced: `docs/ROADMAP.md`, `docs/api-v1.md`, `docs/hermes-skill.md`, SPEC/DESIGN. -- Public API v1 freeze via `hyperlex.API_V1`. -- Golden receipt corpus: `examples/receipts/golden/` + MANIFEST. -- Relevant Abraxas capabilities as Hyperlex modules: `hyperlex.compat.abraxas` - (claims, BrierScorePacket, BrierLedgerEntry, operator review, HLX runes). -- Hyperlex never imports Abraxas; hosts may import from Hyperlex. - -## 0.2.0 — Relay, provenance, glossary/X, local package (2026-08-05) - -- Rune/signal relay: `hyperlex.relay` + CLI `relay` + `schemas/rune_envelope.v1.schema.json` -- Enhanced provenance fingerprints on ingest + analysis (`source_fingerprint`, content_hash, locator) -- Glossary expansion (`glossary_expanded`) multi-source pack; X ingest via bearer token / xurl / stub -- Package CLI (`python -m hyperlex` / console script); optional local build via `scripts/publish_pypi.sh` (no public PyPI publish) -- Version 0.2.0 - -## 0.1.3 — Cache, golden series, LIVE_EMERGENCE_SCAN (2026-08-05) - -- Persistent ingest cache (`~/.hyperlex/cache/`) + per-source rate limiting. -- Golden settled series fixture: `examples/calibration/settled_series.v1.json`. -- CLI `scan` (LIVE_EMERGENCE_SCAN) for multi-query cron/autonomous monitoring. -- Hermes cron template: `examples/cron/live-emergence-scan.job.json` + `docs/cron-live-emergence.md`. - -## 0.1.2 — Receipt ledger (2026-08-05) - -- Append-only hash-chained receipt ledger (`~/.hyperlex/receipt_ledger.jsonl`). -- `emit_receipt(..., append_ledger=True)` indexes each receipt (integrity, lineage, path). -- CLI: `emit-receipt`, `list-receipts`, `verify-receipt-ledger`; `analyze --receipt`. -- Hermes skill packaging already on `main` (v0.1.1); this continues the archive path. - -## 0.1.1 — Hermes skill packaging (2026-08-05) - -- Full Hermes skill contract in `SKILL.md` (frontmatter, triggers, procedure, authority). -- Atomic-style `install.sh`: `--dry-run`, `--target`, `--rollback`, `--openclaw`, post-install check/smoke. -- `hyperlex.manifest.yaml` expanded for Hermes/OpenClaw hosts and command surface. -- `skills.sh.json`, `QUICKSTART.md`, `references/hermes-runtime-contract.md`. -- Install target: `~/.hermes/skills/hyperlex`. - - -## 0.1.0 - -- Added executable Hermes skill runtime for standalone use. -- Added `src/hyperlex` implementation package (copied from working engine implementation). -- Added command entrypoint `scripts/hyperlex.py` with `check`, `sources`, `ingest`, `analyze`, `validate`, and `verify-receipt`. -- Added schemas at repository root (`schemas/*.schema.json`) and manifest metadata. -- Added install script and initial command smoke/test surface. -- Updated SKILL/README/SPEC/docs references to reflect implemented runtime surface. - -## Documentation & Lineage (2026-08-05) - -- Added and expanded `docs/slang-lineages.md` (methodology, mutation operators, template, live-feed process). -- Added `schemas/lineage.v1.schema.json` for analysis lineage attachments. -- Implemented `match_lineage()` with confidence scoring; wired into `detect_memetic_patterns`. -- Added `examples/slang-families/` with Mermaid diagrams and HTML renderers. - -## Brier / Calibration (2026-08-05) - -- Design: `docs/brier-calibration.md` (forecast → settlement → atomic/series Brier, Murphy, Yates, BSS). -- Module: `src/hyperlex/calibration/` (`extract_forecasts`, `settle`, `score_pair`, `score_series`). -- Schemas: `forecast.v1`, `settlement.v1`, `brier_series.v1`. -- Removed hardcoded `provenance.brier = 0.89`; open results set `brier: null` with `brier_requires_settlement`. -- DESIGN principle 12: Brier requires settlement; fail-closed `NOT_COMPUTABLE` when outcomes missing. - -## Calibration v1.1 diagnostics (2026-08-05) - -- **Vieira non-negative Yates** (`yates_vieira`): variance mismatch + correlation deficit + bias²; reports ρ when defined. -- **Ferro–Fricker Murphy** (`murphy_ferro`): bias-corrected REL/RES/UNC for small-n series; keeps uncorrected snapshot. -- **Discrimination slope** (`discrimination.delta_f`): mean(f|o=1) − mean(f|o=0). -- Classical Yates enriched with mean_forecast, mean_outcome, cov_fo, var_f, var_o. -- Schema `brier_series.v1` extended; design doc updated. - -## Operator settlement path + score log (2026-08-05) - -- `calibration/score_log.py` — append-only, hash-chained JSONL (`forecast` / `settlement` / `score` events). - Default `~/.hyperlex/score_log.jsonl`; override via `HYPERLEX_SCORE_LOG`, `--log`, or `--repo-log`. -- `settle_and_log` + `recompute_series` / `verify_chain`. -- CLI: `analyze --forecasts [--append-log]`, `extract-forecasts`, `settle`, `score-series`, `verify-score-log`. -- `export.to_brier_ledger_entry` — Abraxas `BrierLedgerEntry.v1`-compatible shape (no Abraxas import). -- `recalibrate.mean_shift_from_series` — advisory only when Yates bias² elevated; does not rewrite history. -- Golden tests: lineage confidence formula, score_pair, score_series empty→NOT_COMPUTABLE, log roundtrip, CLI settle path. -- Result schema: `provenance.brier` may be `null`; analysis may include `lineage`. -- CLI import hardening: package `src/` always shadows `scripts/hyperlex.py` on `sys.path`. +- **Naming persistence lock:** `docs/NAMING.md` + Notion Naming lock page + + Public Claims CLAIM-HLX-NAME-001/002/003. Operator Hub / Spine Owner / + Core Model Spine updated. Org mirror stays lag (do not train from it). + Does **not** flip Hyperlexical `name_gate`. + +- **Operator name ne0l0gist (ingest):** Danny `name neologist as in repo` — + public ingest product **`ne0l0gist`** (repo spelling). Receipt + `specs/007-hyperlexical-model/receipts/20260924-name-ne0l0gist-as-in-repo.md`. + Does **not** flip Hyperlexical `name_gate`. + +- **Hygiene + name-gate plan:** `pyproject.toml` version aligned to `VERSION` + **0.4.0**; ROADMAP trained-E2 line (no stale Spark-blocked checkbox); drop tracked + `__pycache__`, tip probe, `.tmp` restore junk. Draft + `specs/007-hyperlexical-model/NAME-GATE-AND-NAMED-PHRASES.md` (morph77 HOLD + phrases already settled; morph78/reprobe empty; Danny yes still required). + Does not flip `name_gate`. + +- **Spec 007 tip CI: restore unbind force-train API:** `loop.py` imported + `apply_unbind_force_train` but tip `unbind_recipe.py` lacked the helpers + (`HYPERLEX_UNBIND_FORCE_TRAIN_PATH`, resolve/load/apply). Restored + tests + `tests/shadow/test_hyperlexical_unbind_force_train.py`. + +- **Spec 007 Hyperlexical product plan (draft):** + `specs/007-hyperlexical-model/HYPERLEXICAL-PRODUCT-PLAN.md` — climb under + soft_ceiling, engineering hygiene, name_gate/Hub packaging, PR triage + (#100 / #99 / #95). Does not flip `name_gate`. + +- **Spec 007 morph74 IN FLIGHT (SoT clean + acquire-settle):** quarantined **57** + INFERRED wiki/scaffolding from Spark SoT; durable `reject_wiki_scaffolding_text`. + Settle `to the moon` + `elo hell` → force/hard **217→221 / 258→262**. Warm + morph65 + `INIT_EXPAND_VOCAB=1`. Fair **0.9880239520958084** n=167. Container + `hlx-train-morph74-1790179734`. Receipts: + `receipts/20260923-sot-clean-acquire-civilian.md`, + `receipts/20260923-morph74-acquire-settle-inflight.md`. + +- **Spec 007 morph73 REJECT_VS_BEST:** expand-warm tied fair **0.9649122807017544** + n=171 → REJECT. Residual AUTHORIZE=0 scaffolding — cleaned for morph74. + +- **Earlier Unreleased Spec 007 / docs / P1 entries:** morph72→morph56 ladder and + 0.4.0… history preserved in branch history / operator workspace `CHANGELOG.md`. diff --git a/NEXT_MOVES_007.md b/NEXT_MOVES_007.md new file mode 100644 index 00000000..a6ae1f8e --- /dev/null +++ b/NEXT_MOVES_007.md @@ -0,0 +1,29 @@ +# Spec 007 — next: soft_ceiling armed · #101 on main + +`name_gate=false`. BEST=**morph65** (held). Upsample freeze = **11+**. Do not run SECOND_SLOT=4. + +## Done + +- soft_ceiling **ARMED** · morph78/reprobe empty gold · `authorize val-settle` → **CANCELLED_EMPTY_GOLD**. +- **#100** + **#99** + **#101** on main (hygiene, name-gate plan, **ne0l0gist** naming lock, trends pins restored). +- **#95** rebased onto main tip; stays draft / UNQUALIFIED. + +## Gate (armed) + +**soft_ceiling_tiebreak:** force-fair <1.0 → classic; =1.0 → broad OBSERVED > PRIOR live + E2. + +## PR triage + +| PR | State | Action | +|----|-------|--------| +| **#101** hygiene + naming | **merged** | on main | +| **#95** HYPERLEX-Q1 | draft | Stay draft; UNQUALIFIED | +| **#100** / **#99** | merged | done | + +## Next + +1. Await authorize with **named phrases** on a live empty card, or a new `force_expand_safe` acquire. Do **not** re-settle morph77’s four. +2. Optional org mirror `push-org` only with explicit authorize (personal main now has naming lock). +3. Do not re-burn empty settles. Do not flip `name_gate`. + +Qwen stays stopped unless re-enabled. diff --git a/README.md b/README.md index eebb9200..089db4b5 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,22 @@ Phases **0–4** are production skill surface. **5.0–5.3** adds research simul ## How to use -### Install +# +## Naming + +Repo **Hyperlex** is the transitional monorepo shell. Do not use bare public **Hyperlex** as a product name — it collides with French legaltech CLM / DiliTrust. + +**Durable lock:** [`docs/NAMING.md`](docs/NAMING.md) · Notion Naming lock · receipt `specs/007-hyperlexical-model/receipts/20260924-name-ne0l0gist-as-in-repo.md`. + +| Name | Role | +|------|------| +| **Hyperlexical** | Spec 007 model / train / eval / E2 / `name_gate` product claim | +| **ne0l0gist** | Slang ingest tool (zeros spelling) — operator-named 2026-09-24 | +| **Hyperlex** (repo) | Transitional monorepo shell / paths / env | + +`name_gate` stays **false**. Org mirror is not train SoT (`docs/remotes.md`). + +## Install ```bash bash install.sh --dry-run && bash install.sh diff --git a/ROADMAP.md b/ROADMAP.md index 1c505bcb..4e81dfa6 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -1,9 +1,11 @@ # Hyperlex Roadmap ## Vision -Hyperlex is a **Hermes skill** backed by this Python package repo. Relevant Abraxas wire capabilities ship as Hyperlex modules (`hyperlex.compat.abraxas`); hosts import *from* Hyperlex. +Hyperlex **ships today as a Hermes skill** (this Python package). Relevant Abraxas wire capabilities live under `hyperlex.compat.abraxas`; hosts import *from* Hyperlex. -Hyperlex evolves into the canonical engine for detecting, scoring, and acting on emerging memetic signals in real time — grounded in real data, arXiv research, and strict provenance. +The same project is on a **model path** (Spec 007): T0 encoder baseline, then T1 after eval gate E2. T1 is the first artifact that may be called Hyperlexical. Trained E2 can PASS on Spark without flipping `name_gate` — Danny yes is still required. No Hub card until then. + +The skill remains the operator surface while the encoder stays SHADOW. ## Phases @@ -65,8 +67,26 @@ Hyperlex evolves into the canonical engine for detecting, scoring, and acting on - [x] **5.3** Risk tiers → scan schedules / operator alerts (advisory Hermes cron envelopes) - [x] **5.3** Operator loop docs + simplified ingest routes / command map (`run`, `commands`, `pending`) - [x] **5.3** Atomic multi-term seeds (`split_seed_terms`, Phase 5 multi-term, Pages demos) +- [x] **5.x** Chroma local + Cloud backend; `vector-export` / `import` / `sync` promote path +- [x] **5.x** Fail-open vector auto-index on ingest/pipeline/receipt (local sqlite/chroma) +- [ ] **5.x+** Optional post-ingest Cloud promote (`HYPERLEX_VECTOR_PROMOTE`) — off by default - [ ] **5.3** ANN backend option if corpus grows past linear scan (**deferred** until corpus pain) +### Spec 007 — Hyperlexical encoder (SHADOW · 2026-09-10) +- [x] Specify C1–C52 + A5 milestones / engineering (#33) +- [x] U1 stub infer + packet walls +- [x] U2 civilian harvest exporter +- [x] U3 eval harness vs Spec 004 +- [x] Keepable layout + span aligner + HF skeleton +- [x] Live-split coerce to lexical train/val/test (#38) +- [x] 8-family leaf unlock; classify volume ready (harvest receipt 2026-09-10) +- [x] Spark bring-up runbooks on main (#28) +- [x] Trained trunk-forward E2 PASS on Spark (BEST=`seed-morph65`; stub still expected FAIL; seed smoke ≠ T1) +- [ ] Hub upload (operator — not started) +- [ ] T13 promote into `src/hyperlex/` + +`name_gate` stays **false** until Danny yes (E2 PASS alone does not flip). Classify volume ≠ a Hyperlexical name. No ninth family. + ## Milestones - v0.2.x: Phases 0–4 complete (Hermes skill production track) - v0.3.0: Phase 5.0 research simulation track @@ -77,14 +97,19 @@ Hyperlex evolves into the canonical engine for detecting, scoring, and acting on - **v0.4.0: automatic backend pipeline (ingest → results)** (current) - v0.3.x: Phylogeny libraries + vector hybrid lineage + research export polish - v1.0: Stable skill contract + long-horizon archive + optional research contribs +- 007: `hyperlex-structure-149m` name only after E2 -See SPEC.md and DESIGN.md for detailed requirements per phase. +See [SPEC.md](SPEC.md) and [DESIGN.md](DESIGN.md) for the historical spine. Current operator snapshot: [STATUS.md](STATUS.md). -## Recent (2026-08-05) -- v0.2.12: YTD backfill + lineage backprop -- v0.3.0: Phase 5.0 simulation stack (transmission, agents, risk, phylogeny) -- v0.3.3: Local SQLite vector DB; seed from registry/backfill/receipts -- v0.3.5: Hybrid lineage re-rank + domain phylogeny packs -- v0.3.7: Risk-tier → scan/cron schedule (advisory; post-scan advisory on scan) -- v0.3.8: Operator loop docs; `--route` ingest; `run` / `commands` / `pending` +## Recent +- 2026-09-24: Hygiene — `pyproject.toml` aligned to `VERSION` 0.4.0; ROADMAP E2 line matches trained PASS; name_gate / named-phrases plan drafted. `#100` + `#99` on main. soft_ceiling ARMED; morph65 held. +- 2026-09-10 PT evening: Spec 007 SoT 4333 / `--include-live` classify 2437; Danny ~2500 bar met; `name_gate` false. Hermes 913 / gap-to-2500 superseded. Spark bring-up (#28), A5 milestones (#33), lexical-split coerce (#38), 8-family unlock (#37). (E2 was Spark-blocked at that snapshot; trained E2 later PASS on morph65.) +- 2026-09-09: Spec 007 SHADOW encoder harness on main (not a Hub card) +- v0.4.0: automatic backend pipeline (ingest → results) - v0.3.9: Atomic multi-term seeds; Pages demos; scan packs atomic +- v0.3.8: Operator loop docs; `--route` ingest; `run` / `commands` / `pending` +- v0.3.7: Risk-tier → scan/cron schedule (advisory; post-scan advisory on scan) +- v0.3.5: Hybrid lineage re-rank + domain phylogeny packs +- v0.3.3: Local SQLite vector DB; seed from registry/backfill/receipts +- v0.3.0: Phase 5.0 simulation stack (transmission, agents, risk, phylogeny) +- v0.2.12: YTD backfill + lineage backprop diff --git a/STATUS.md b/STATUS.md index 1ce03778..cf77af56 100644 --- a/STATUS.md +++ b/STATUS.md @@ -1,10 +1,29 @@ -# Hyperlex Skill Status +**Org mirror note:** this STATUS is grafted from personal tip for Spec 007 continuity. License SoT on this repo remains Proprietary (`LICENSE`). Train SoT remains personal `scrimshawlife-ctrl/Hyperlex`. + +# Hyperlex status + +**Naming:** repo **Hyperlex** is the transitional monorepo shell. Public products: **Hyperlexical** (Spec 007 model / train / eval / E2 / `name_gate` claim) and **ne0l0gist** (slang ingest — operator-named 2026-09-24, repo spelling). `name_gate` remains false. **Version:** 0.4.0 -**Posture:** Hermes skill (Python package repo) +**Observed:** 2026-09-24 +**Posture:** Hermes skill = current operator surface. Spec 007 = model path (SHADOW). Spark BEST = `seed-morph65`. soft_ceiling **ARMED**. Live broad **0.8867** n=256. morph78 GOLD empty. Ingest product named **ne0l0gist** (as in repo). Naming lock: `docs/NAMING.md` + Notion Naming lock. **#101** merged to main. Hyperlexical `name_gate` still false. **Install:** `bash install.sh` → `~/.hermes/skills/hyperlex` **Claude (optional):** `bash install.sh --claude` → `~/.claude/skills/hyperlex` -**Track:** Phases 0–4 complete · Phase 5.0–5.3 · Pages static run history · Hallmark desk UI +**Track:** Phases 0–4 complete · Phase 5.0–5.3 · Pages static run history · Spec 007 SHADOW encoder on main + +This file is the operator snapshot. The docs site copies it to [status](https://scrimshawlife-ctrl.github.io/Hyperlex/status/). Do not treat it as a Hub card or a Brier score. + +## Trajectory + +| Layer | Role | State | +|-------|------|--------| +| Hermes skill | What you run today (`SKILL.md`, CLI, `src/hyperlex/`) | Ready (v0.4.0) | +| T0 | Encoder baseline; card `hyperlex-encoder-*` | Specified. Not named Hyperlexical. | +| T1 | First artifact that *may* be called Hyperlexical | Trained E2 PASS on Spark; still blocked on Danny yes for `name_gate` | +| `name_gate` | Name + publish wall | **false** | +| Hub | Operator upload | Not published | + +Classify volume is ready. Volume does not flip `name_gate`. Seed smoke ≠ T1. ## Health @@ -13,8 +32,47 @@ python3 scripts/hyperlex.py doctor python3 scripts/release_preflight.py python3 scripts/hyperlex.py simulate --term rizz --mode scenario python -m hyperlex inbox list +PYTHONPATH=scripts/shadow python3 -m hyperlexical.infer --text rizz --offline ``` +## Spec 007 — honest gates + +SHADOW / advisory. Not on `API_V1`. Do **not** call the artifact Hyperlexical. Do **not** set `name_gate` true. + +Operator scoreboard **2026-09-10 PT evening** (Danny-locked; matches [Notion Operator Hub](https://app.notion.com/p/3d73e8ba2f5c81ad89d7c2df8e931a83)): + +| Surface | n | Notes | +|---------|--:|-------| +| Local SoT `~/.hyperlex/hyperlexical/ingest_candidates.jsonl` | **4333** | 402 OBSERVED / 3931 INFERRED. **Not in git.** | +| Export `--include-live` (operator machine) | **6506** | classify family **2437** · unbind **1345** · negatives **208** | +| Tracked `specs/007-hyperlexical-model/exports/civilian.v0.1.jsonl` | 883 | **Seed/snapshot only.** Do not treat as the train SoT. | + +Danny ~2500 candidate bar: **met**. Hermes **913** / “gap to 2500” is **superseded** — not current SoT status. Afternoon store family-labeled **1789** (stretch 2000 not reached) is the [blanket-yes receipt](docs/receipts/blanket-yes-unlock-2026-09-10.md) figure; export classify **2437** is the harvest gate. Moltbook row counts (for example ~360 ai-native) are a **Moltbook subset**, not the global SoT. + +| Gate | State | +|------|--------| +| Classify volume | **Ready** — operator `--include-live` family classify **2437** (≥2k). name_gate gaps **0 / 0 / 0** on that surface. | +| `name_gate` | **false** — E2 PASS on Spark does **not** flip the gate. Danny yes still required. Volume ≠ name. | +| Spark BEST | **`seed-morph65`** — force fair **1.0** n=164. soft_ceiling **ARMED** (live prior broad 0.8867 n=256). morph78 acquire HOLD **empty gold**. E2 PASS. LAST=8. Upsample freeze **11+**. | +| E2 vs Spec 004 | Stub still FAIL (expected). **Trained trunk-forward E2 PASS** on morph19 (`unbind_exact=1.0`). Seed smoke ≠ T1. | +| Hub publish | **No** — skeleton in-repo; weights stay on Spark. | +| T1 name | Not allowed. Card stays `hyperlex-encoder-*` until Danny yes on `name_gate`. | +| Lineage families | **8** only. No ninth family. | +| Brier | `null` on every 007 packet. | +| Crawl | Crawl4AI **0.9.3** default. `--source firecrawl` aliases to `crawl4ai`. No paid Firecrawl without Danny yes. | + +Spark trains from the **local SoT** / `export --include-live`, not from the tracked seed alone. + +Spark procedure (bring-up, not a product card): + +- [SPARK-BRINGUP.md](https://github.com/scrimshawlife-ctrl/Hyperlex/blob/main/specs/007-hyperlexical-model/SPARK-BRINGUP.md) (#28) +- [AARON-SPARK-TRAIN.md](https://github.com/scrimshawlife-ctrl/Hyperlex/blob/main/specs/007-hyperlexical-model/AARON-SPARK-TRAIN.md) +- [HERMES-SPARK-RUN.md](https://github.com/scrimshawlife-ctrl/Hyperlex/blob/main/specs/007-hyperlexical-model/HERMES-SPARK-RUN.md) +- A5 milestones / engineering (#33): [milestones.md](https://github.com/scrimshawlife-ctrl/Hyperlex/blob/main/specs/007-hyperlexical-model/milestones.md) +- Live-split coerce (#38) is on `main` (`lexical_split` in the export path) + +Pages overview: [SHADOW encoder (007)](docs/shadow-hyperlexical.md) + ## Surface (ready) | Area | Status | @@ -35,7 +93,7 @@ python -m hyperlex inbox list | Pages static run history | Ready | | Long-term analysis archive | Ready | | Governed LLM (echo / openai_compatible) | Opt-in | -| Phase 5 cultural transmission / multi-agent / risk / phylogeny | Ready | +| Phase 5 cultural transmission / multi-agent / risk / phylogeny | Ready (SPECULATIVE) | | Local vector DB + Chroma promote | Ready | | Mutation prediction | Ready (SPECULATIVE) | | Hybrid lineage re-rank | Ready | @@ -44,9 +102,11 @@ python -m hyperlex inbox list | Risk → scan/cron schedule | Ready (advisory) | | Ingest routes + automatic pipeline | Ready | | Atomic multi-term seeds | Ready | -| **Analysis enrichment** (compression_metrics, typology tags, signal_report, integrity header) | Ready | -| **Local attractor store** (`~/.hyperlex/signals/`) | Ready (`inbox list\|push\|clear`) | -| **Attractor candidate rune** (`RUNE.HLX.ATTRACTOR_CANDIDATE`) | Ready (advisory only) | +| Analysis enrichment (compression_metrics, typology tags, signal_report, integrity header) | Ready | +| Local attractor store (`~/.hyperlex/signals/`) | Ready (`inbox list\|push\|clear`) | +| Attractor candidate rune (`RUNE.HLX.ATTRACTOR_CANDIDATE`) | Ready (advisory only) | +| Spec 007 model path (T0→T1) | SHADOW · Spark BEST morph65 · soft_ceiling ARMED · force fair 1.0 n=164 · live broad prior 0.887 n=256 · E2 PASS · LAST=8 · upsample freeze 11+ · morph69–77 closed · next fresh acquire morph78 · `name_gate` false · no Hub · not named Hyperlexical | +| 007 live ingest tap | SHADOW · pipeline/analyze/scan fail-open → `~/.hyperlex/hyperlexical/ingest_candidates.jsonl` · INFERRED only | | Public PyPI | Not planned | | External system hard import | Never | @@ -54,30 +114,40 @@ python -m hyperlex inbox list ```text pipeline "rizz" | run "rizz" + → hyperlexical tap (INFERRED candidates) → pending → settle → score-series → scan / risk-schedule - → relay --push-inbox # attractor envelope + local store + → relay --push-inbox + → PYTHONPATH=scripts/shadow python3 -m hyperlexical.ingest_tap → inbox list → vector-seed / vector-sync → archive-export ``` +007 Spark (Aaron, not the daily loop): `specs/007-hyperlexical-model/AARON-SPARK-TRAIN.md` + ## Data dirs ```text ~/.hyperlex/receipts/ ~/.hyperlex/receipt_ledger.jsonl ~/.hyperlex/score_log.jsonl -~/.hyperlex/mutation_watch.jsonl # mutation grammar instrumentation (not Brier) +~/.hyperlex/mutation_watch.jsonl ~/.hyperlex/cache/ ~/.hyperlex/vector.db ~/.hyperlex/chroma/ -~/.hyperlex/signals/inbox.jsonl # high-priority attractor candidates +~/.hyperlex/signals/inbox.jsonl +~/.hyperlex/hyperlexical/ingest_candidates.jsonl +~/.hyperlex/models/ # Spark dumps only; not git data/backfill/2026/ ``` ## Recommended next -1. Burn-in offline runs + settle path -2. Optional: enrich `scan` with focus / time_window / min_virality -3. Optional: daily aggregate forage receipt +1. Spark BEST = **morph65**. soft_ceiling **ARMED**. Await authorize with **named phrases** on a live empty card (not morph77’s already-settled four), or a new `force_expand_safe` acquire. Plan: `specs/007-hyperlexical-model/NAME-GATE-AND-NAMED-PHRASES.md`. +2. Burn-in offline runs + settle path (this is how Brier becomes real). +3. Do not Hub-upload. Do not promote `scripts/shadow/hyperlexical/` into `src/hyperlex/` (T13). Do not flip `name_gate`. + +## README + +Operator front door expanded for stack parity with Athanor / Semion / Yggdrasil (2026-09-11). Changelog-style dumps stay in CHANGELOG / receipts — not the main page. diff --git a/docs/CANONICAL.md b/docs/CANONICAL.md new file mode 100644 index 00000000..8c85d431 --- /dev/null +++ b/docs/CANONICAL.md @@ -0,0 +1,49 @@ +# Canonical remotes and public claims + +This page records **OBSERVED** diligence facts. It does not change +`name_gate`, training code, CI, or licenses. + +**Product naming SoT:** [NAMING.md](NAMING.md) (Hyperlex shell · **ne0l0gist** ingest · Hyperlexical gated). Notion: [Naming lock](https://app.notion.com/p/3e53e8ba2f5c81a7bc81fdd3edb06678). Claims CLAIM-HLX-NAME-001…003. + +## Dual-home remotes + +The canonical train and work remote is this repository: +[`scrimshawlife-ctrl/Hyperlex`](https://github.com/scrimshawlife-ctrl/Hyperlex). + +[`Zero-State-LLC/Hyperlex`](https://github.com/Zero-State-LLC/Hyperlex) is the +company mirror. It may lag. Do not treat the org Hyperlex as the train source +of truth. After naming/docs land on personal `main`, sync org only via intentional +[`push-org`](remotes.md) — do not smash divergent history. + +| Remote | Role | +|--------|------| +| `scrimshawlife-ctrl/Hyperlex` | Canonical train and work source of truth | +| `Zero-State-LLC/Hyperlex` | Company mirror. May lag. Not the train SoT. | + +Clone, train, and review from the personal remote only. For push mechanics, +see [Remotes](remotes.md). + +## Current BEST receipt + +The pinned BEST promote receipt on `main` is +[20260915-morph36-promote-best.md](https://github.com/scrimshawlife-ctrl/Hyperlex/blob/main/specs/007-hyperlexical-model/receipts/20260915-morph36-promote-best.md). + +That receipt records **`name_gate=false`** and **no Hub** publish. + +## Public Claims & Boundaries + +Funding and demo language must match Zero State **Public Claims & Boundaries** +(Notion). Do not invent product claims from this repository's README or from a +lagging org mirror. + +| Document | Role | +|----------|------| +| [Public Claims & Boundaries](https://app.notion.com/p/ecd794b1226b4dd89abe1ccd928dd35c) | Authoritative funding and demo language | +| [Core Model Spine](https://app.notion.com/p/3dc3e8ba2f5c810db2f6f72a8ffe50eb) | Core model spine | + +Do not claim: + +- Nemotron integrated +- Hub Hyperlexical card +- Abraxas-named 7B +- free Inception GPUs diff --git a/docs/NAMING.md b/docs/NAMING.md new file mode 100644 index 00000000..c7027803 --- /dev/null +++ b/docs/NAMING.md @@ -0,0 +1,44 @@ +# Naming lock — Hyperlex / Hyperlexical / ne0l0gist + +**Status:** LOCKED · **Date:** 2026-09-24 +**Operator:** Danny `name neologist as in repo` +**Receipt:** `specs/007-hyperlexical-model/receipts/20260924-name-ne0l0gist-as-in-repo.md` + +This file is the **durable naming SoT** for agents and operators. Copy it; do not invent alternate product spellings. + +## Split (do not conflate) + +| Name | Spelling | Role | Named? | +|------|----------|------|--------| +| **Hyperlex** | Hyperlex | Transitional **monorepo shell** only. GitHub repo, `~/.hyperlex/`, `HYPERLEX_*`, skill install path. Not a public product brand (collides with French legaltech CLM / DiliTrust). | shell only | +| **ne0l0gist** | `ne` + `0` + `l` + `0` + `gist` (zeros, not letter O) | Public **slang ingest / harvest** product: Crawl4AI, `ingest_tap`, export/settle, civilian + live phrase harvest | **yes** (2026-09-24) | +| **Hyperlexical** | Hyperlexical | Spec 007 **model / train / eval / E2 / `name_gate`** product claim | **no** until Danny `name_gate` yes | + +`name_gate` stays **false**. Naming **ne0l0gist** does **not** flip Hyperlexical `name_gate`, Hub, or T13. + +## Do not + +- Spell ingest `neologist`, `neOlogist`, or `ne0logist` (wrong zeros/letters) +- Call the Hermes skill or repo “Hyperlexical” +- Call a stub, seed smoke, or harvest dump Hyperlexical-gated-true +- Treat org mirror `Zero-State-LLC/Hyperlex` as work/train SoT (may lag personal `main`) +- Rename paths / package / env (`hyperlex`, `hyperlexical`, `HYPERLEX_*`) without a separate hard-cut sentence + +## Surfaces that must match + +| Surface | Pointer | +|---------|---------| +| GitHub work remote | `scrimshawlife-ctrl/Hyperlex` (`main` / this branch) — this file | +| Org mirror | `Zero-State-LLC/Hyperlex` — sync only via intentional `org` push; never train from it | +| Notion Operator Hub | [007 Hyperlexical — Operator Hub](https://app.notion.com/p/3d73e8ba2f5c81ad89d7c2df8e931a83) | +| Notion Spine Owner | [Hyperlex — Spine Owner](https://app.notion.com/p/3d13e8ba2f5c81528452e6bdcc7d8e45) | +| Notion Core Model Spine | [Zero State × Abraxas — Core Model Spine](https://app.notion.com/p/3dc3e8ba2f5c810db2f6f72a8ffe50eb) | +| Public claims DB | [Public Claims & Boundaries](https://app.notion.com/p/ecd794b1226b4dd89abe1ccd928dd35c) | +| README / STATUS / SKILL / glossary | Must cite this split | + +## Remotes rule + +Working + train remote = **personal** `scrimshawlife-ctrl/Hyperlex`. +Org `Zero-State-LLC/Hyperlex` is a lagging company mirror. After naming/docs land on personal `main`, an operator may `./scripts/push-org.sh` — do not smash divergent org history. + +Peers (Athanor, Semion, Trutina, Yggdrasil, Abraxas) consume this split when they mention Hyperlex products: **ne0l0gist** = ingest; **Hyperlexical** = gated model claim; **Hyperlex** = repo shell. diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index 621fd1d5..4e81dfa6 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -1,9 +1,11 @@ # Hyperlex Roadmap ## Vision -Hyperlex is a **Hermes skill** backed by this Python package repo. Relevant Abraxas wire capabilities ship as Hyperlex modules (`hyperlex.compat.abraxas`); hosts import *from* Hyperlex. +Hyperlex **ships today as a Hermes skill** (this Python package). Relevant Abraxas wire capabilities live under `hyperlex.compat.abraxas`; hosts import *from* Hyperlex. -Hyperlex evolves into the canonical engine for detecting, scoring, and acting on emerging memetic signals in real time — grounded in real data, arXiv research, and strict provenance. +The same project is on a **model path** (Spec 007): T0 encoder baseline, then T1 after eval gate E2. T1 is the first artifact that may be called Hyperlexical. Trained E2 can PASS on Spark without flipping `name_gate` — Danny yes is still required. No Hub card until then. + +The skill remains the operator surface while the encoder stays SHADOW. ## Phases @@ -57,10 +59,6 @@ Hyperlex evolves into the canonical engine for detecting, scoring, and acting on - [x] **5.0** Docs: `docs/phase5.md`, `docs/modules/simulation.md` - [x] **5.0** Local SQLite vector DB (`hyperlex.vectordb`, `vector-seed` / `vector-search`) - [x] **5.0** Analyze attaches `vector_neighbors` when DB present; receipts auto-index (fail-open) -- [x] **5.x** Chroma local + Cloud backend; `vector-export` / `import` / `sync` promote path -- [x] **5.x** Fail-open vector auto-index on ingest/pipeline/receipt (local sqlite/chroma) -- [ ] **5.x+** Optional post-ingest Cloud promote (`HYPERLEX_VECTOR_PROMOTE`) — off by default - - [x] **5.1** Domain-specific phylogeny packs (`data/phylogeny/`: finance, ai-native, political, regional) - [x] **5.1** Transmission parameter calibration against settled series (still no invented Brier) - [x] **5.1** Vector hybrid re-rank for lineage matcher (`match_lineage` + local vector DB) @@ -69,8 +67,26 @@ Hyperlex evolves into the canonical engine for detecting, scoring, and acting on - [x] **5.3** Risk tiers → scan schedules / operator alerts (advisory Hermes cron envelopes) - [x] **5.3** Operator loop docs + simplified ingest routes / command map (`run`, `commands`, `pending`) - [x] **5.3** Atomic multi-term seeds (`split_seed_terms`, Phase 5 multi-term, Pages demos) +- [x] **5.x** Chroma local + Cloud backend; `vector-export` / `import` / `sync` promote path +- [x] **5.x** Fail-open vector auto-index on ingest/pipeline/receipt (local sqlite/chroma) +- [ ] **5.x+** Optional post-ingest Cloud promote (`HYPERLEX_VECTOR_PROMOTE`) — off by default - [ ] **5.3** ANN backend option if corpus grows past linear scan (**deferred** until corpus pain) +### Spec 007 — Hyperlexical encoder (SHADOW · 2026-09-10) +- [x] Specify C1–C52 + A5 milestones / engineering (#33) +- [x] U1 stub infer + packet walls +- [x] U2 civilian harvest exporter +- [x] U3 eval harness vs Spec 004 +- [x] Keepable layout + span aligner + HF skeleton +- [x] Live-split coerce to lexical train/val/test (#38) +- [x] 8-family leaf unlock; classify volume ready (harvest receipt 2026-09-10) +- [x] Spark bring-up runbooks on main (#28) +- [x] Trained trunk-forward E2 PASS on Spark (BEST=`seed-morph65`; stub still expected FAIL; seed smoke ≠ T1) +- [ ] Hub upload (operator — not started) +- [ ] T13 promote into `src/hyperlex/` + +`name_gate` stays **false** until Danny yes (E2 PASS alone does not flip). Classify volume ≠ a Hyperlexical name. No ninth family. + ## Milestones - v0.2.x: Phases 0–4 complete (Hermes skill production track) - v0.3.0: Phase 5.0 research simulation track @@ -81,14 +97,19 @@ Hyperlex evolves into the canonical engine for detecting, scoring, and acting on - **v0.4.0: automatic backend pipeline (ingest → results)** (current) - v0.3.x: Phylogeny libraries + vector hybrid lineage + research export polish - v1.0: Stable skill contract + long-horizon archive + optional research contribs +- 007: `hyperlex-structure-149m` name only after E2 -See SPEC.md and DESIGN.md for detailed requirements per phase. +See [SPEC.md](SPEC.md) and [DESIGN.md](DESIGN.md) for the historical spine. Current operator snapshot: [STATUS.md](STATUS.md). -## Recent (2026-08-05) -- v0.2.12: YTD backfill + lineage backprop -- v0.3.0: Phase 5.0 simulation stack (transmission, agents, risk, phylogeny) -- v0.3.3: Local SQLite vector DB; seed from registry/backfill/receipts -- v0.3.5: Hybrid lineage re-rank + domain phylogeny packs -- v0.3.7: Risk-tier → scan/cron schedule (advisory; post-scan advisory on scan) -- v0.3.8: Operator loop docs; `--route` ingest; `run` / `commands` / `pending` +## Recent +- 2026-09-24: Hygiene — `pyproject.toml` aligned to `VERSION` 0.4.0; ROADMAP E2 line matches trained PASS; name_gate / named-phrases plan drafted. `#100` + `#99` on main. soft_ceiling ARMED; morph65 held. +- 2026-09-10 PT evening: Spec 007 SoT 4333 / `--include-live` classify 2437; Danny ~2500 bar met; `name_gate` false. Hermes 913 / gap-to-2500 superseded. Spark bring-up (#28), A5 milestones (#33), lexical-split coerce (#38), 8-family unlock (#37). (E2 was Spark-blocked at that snapshot; trained E2 later PASS on morph65.) +- 2026-09-09: Spec 007 SHADOW encoder harness on main (not a Hub card) +- v0.4.0: automatic backend pipeline (ingest → results) - v0.3.9: Atomic multi-term seeds; Pages demos; scan packs atomic +- v0.3.8: Operator loop docs; `--route` ingest; `run` / `commands` / `pending` +- v0.3.7: Risk-tier → scan/cron schedule (advisory; post-scan advisory on scan) +- v0.3.5: Hybrid lineage re-rank + domain phylogeny packs +- v0.3.3: Local SQLite vector DB; seed from registry/backfill/receipts +- v0.3.0: Phase 5.0 simulation stack (transmission, agents, risk, phylogeny) +- v0.2.12: YTD backfill + lineage backprop diff --git a/docs/receipts/blanket-yes-unlock-2026-09-10.md b/docs/receipts/blanket-yes-unlock-2026-09-10.md new file mode 100644 index 00000000..7ef53d2a --- /dev/null +++ b/docs/receipts/blanket-yes-unlock-2026-09-10.md @@ -0,0 +1,127 @@ +# Blanket-yes unlock — Spec 007 classify toward 2k — 2026-09-10 + +**Superseded as current SoT** by the 2026-09-10 PT **evening** Danny-locked stamp (SoT 4333 = 402 OBSERVED / 3931 INFERRED; `--include-live` n=6506 / classify 2437). This receipt is the afternoon unlock. Do not treat its store OBSERVED=152 as current. + +**Operator TZ**: America/Los_Angeles (PT) +**Finished (UTC)**: 2026-09-10T21:10:59Z ≈ **2:10 PM PT** +**Authority**: Danny blanket yes 2026-09-10 — "Yes to whatever we need to do" +**Provenance**: `operator-blanket-yes:2026-09-10` +**Settle provenance**: `operator-settle:blanket-yes:2026-09-10` +**PR**: https://github.com/scrimshawlife-ctrl/Hyperlex/pull/37 (written while open; later merged to `main` on 2026-09-10) +**Branch**: `007-blanket-yes-leaves-2026-09-10` @ `db1cf7d` +**Base**: `main` @ post-merge #34/#35/#36 (`4f79834`) +**Do-not honored**: no 9th family, no train/HF, no mock analyze, no paid Firecrawl. + +## 0. Pull main + +| PR | tip | status | +|---|---|---| +| #35 neg-count honesty | `1d2c7cb` | MERGED | +| #36 wave4+wave5 leaves | `831a474` | MERGED | +| #34 KEEP-93 receipt | `4f79834` | MERGED | + +Local `main` fast-forwarded; work continued on new branch. + +## 1. Operator-authorized leaf pack + +Precision-first curation from: +- high-signal store `lineage=none` atoms (A/B Wiktionary dump + shorts) with human-grade 8-family judgment +- family-bearing Wiktionary category caches (gaming / AI / gambling / internet / politics / business / crypto) +- explicit morph / cant expansions + +Skipped: ordinary English, polysemy denylist, technical glossary without cultural slang bar, dating-only slang (no 9th family), junk, slurs. + +| family | new leaves | +|---|---:| +| betting-sharp | 93 | +| crypto-degen | 106 | +| ai-native | 104 | +| brainrot-aura | 170 | +| kinship-address | 28 | +| political-status | 76 | +| gaming-meta | 80 | +| workplace-corp | 34 | +| **total** | **691** | + +Registry terms: **379 → 1070** (still **8** families). + +## 2. Store reclassify + ingest + +Backup: `/workspace/hyperlex-harvest/backups/ingest_candidates.pre-blanket-yes.20260910T211004Z.jsonl` + +| step | n | +|---|---:| +| none→family (exact blanket + match_lineage) | **36** | +| new leaves ingested INFERRED | **647** | +| settle-grade → OBSERVED | **34** | + +### Family-labeled before → after (store) + +| lineage | before | after | Δ | +|---|---:|---:|---:| +| ai-native | 134 | 236 | +102 | +| betting-sharp | 70 | 163 | +93 | +| brainrot-aura | 360 | 530 | +170 | +| crypto-degen | 102 | 208 | +106 | +| gaming-meta | 189 | 263 | +74 | +| kinship-address | 83 | 111 | +28 | +| political-status | 54 | 130 | +76 | +| workplace-corp | 114 | 148 | +34 | +| none | 2580 | 2544 | -36 | +| **family-labeled (excl none)** | **1106** | **1789** | **+683** | +| store n | 3686 | 4333 | +647 | +| OBSERVED | 118 | 152 | +34 | + +OBSERVED only where settle-grade (multiword / distinctive exact blanket leaves); provenance `operator-settle:blanket-yes:2026-09-10`. + +## 3. Export (`--include-live`, honest neg counter) + +Out: `/workspace/hyperlex-harvest/export-blanket-yes-2026-09-10/` +`civilian.v0.1.jsonl` sha256 `c50b46d4d71e29ff6ee3548815ed964d0f6c803e9d3e6c8dea4c1011c03135dc` + +| metric | value | +|---|---:| +| n | 6506 | +| classify (family) | **2437** | +| classify_none | 2724 | +| negatives (ordinary-prose only) | **208** | +| unbind | 1345 | +| name_gate | false (not T1; all three gaps 0 on this surface) | +| name_gate_classify_gap | **0** | +| name_gate_unbind_gap | 0 | +| name_gate_negative_gap | 0 | + +Export classify family (**2437**) exceeds store family-labeled (**1789**) because expanded registry also rematches fixture/backfill civilian rows — still 8-family only. Honest neg counter preserved (#35). + +## 4. Residual gap + +| Metric | Value | +|---|---:| +| Store family-labeled before | 1106 | +| Store family-labeled after | **1789** | +| Δ | **+683** | +| Gap store→2000 | **211** | +| Stretch 2000 (store) | **not reached** | +| Success bar ≥1500 | **YES** | + +### Residual `none` (~2544) + +Honest remainder is mostly Wiktionary A/B miscellaneous slang that does **not** cleanly map to the closed 8-family set without polysemy or inventing a 9th family (dating slang, general vulgarity, historical cant, platform names, ordinary English). + +### Skip reasons (pack build) + +Precision filters dropped pool noise (`no_family_gate`, denylist shorts, tech glossary, weak atomics). See `blanket-yes-leaf-pack-2026-09-10.json` → `skip_reasons_top`. + +## 5. PR + +PR **#37** https://github.com/scrimshawlife-ctrl/Hyperlex/pull/37 — OPEN, not merged. + +## 6. Paths + +| artifact | path | +|---|---| +| Leaf pack | `/workspace/hyperlex-harvest/blanket-yes-leaf-pack-2026-09-10.json` | +| Reclassify log | `/workspace/hyperlex-harvest/blanket-yes-reclassify-log.json` | +| Export | `/workspace/hyperlex-harvest/export-blanket-yes-2026-09-10/` | +| This receipt | `/workspace/hyperlex-harvest/blanket-yes-unlock-2026-09-10.md` | +| Store | `~/.hyperlex/hyperlexical/ingest_candidates.jsonl` | diff --git a/docs/receipts/settle-keep93-2026-09-10.md b/docs/receipts/settle-keep93-2026-09-10.md new file mode 100644 index 00000000..107fe4b6 --- /dev/null +++ b/docs/receipts/settle-keep93-2026-09-10.md @@ -0,0 +1,118 @@ +# Settle KEEP-93 → OBSERVED gold + +**Date**: 2026-09-10 (operator PT) +**Authority**: Danny approved continuing after Hyperlex #32 merge; recommended unlock = settle KEEP 93 as OBSERVED gold. +**Repo tip**: `/workspace/Hyperlex` @ `a8b9078bb5dc783c5bc8750fb9fd7851b88d1c3b` (`007: expand lineage registry + weak tag→family mapper (#32)`) +**Do-not honored**: no WEAK_HOLD/REJECT settle; no invented families; no train/HF; no merge of #29/#30. + +## 1. Store settle + +| Item | Path / value | +|---|---| +| Settle pack | `/workspace/hyperlex-harvest/settle-pack-126.jsonl` (+ `.md`) | +| Pack tallies | KEEP **93** / WEAK_HOLD 31 / REJECT 2 | +| Live store | `~/.hyperlex/hyperlexical/ingest_candidates.jsonl` | +| Backup (pre-settle) | `/workspace/hyperlex-harvest/backups/ingest_candidates.pre-settle-keep93.20260910T194551Z.jsonl` | +| Provenance note | `operator-settle:KEEP-93:2026-09-10` | +| Match key | `(text, lineage)` — 93/93; **0 missing** | + +### Result + +| Metric | n | +|---|---:| +| **Settled this pass** | **93** | +| KEEP texts missing from store | **0** | +| WEAK/REJECT wrongly OBSERVED | **0** | +| Store rows total | 3584 | +| `class=OBSERVED` | **93** | +| `class=INFERRED` | 3491 | +| Family-labeled (lineage≠none) | **998** | +| — of which OBSERVED | **93** | +| — of which INFERRED | **905** | + +Lineage + typology preserved on every settled row. WEAK_HOLD and REJECT untouched. + +### KEEP family histogram (settled OBSERVED) + +| Family | n | +|---|---:| +| brainrot-aura | 37 | +| crypto-degen | 13 | +| gaming-meta | 11 | +| betting-sharp | 9 | +| ai-native | 8 | +| workplace-corp | 8 | +| political-status | 4 | +| kinship-address | 3 | +| **Total** | **93** | + +## 2. Honest classify accounting (excl negatives) + +Name-gate Spec 007: **2k gold+weak family classify** (lineage≠none). Negatives are a separate 200 bucket. + +### Committed U2 export (main, no `--include-live`) + +Re-ran `scripts/shadow/hyperlexical/export.py` on tip `a8b9078`: + +| Metric | n | +|---|---:| +| n (all tasks) | 335 | +| classify (task=classify, **includes** negatives) | 290 | +| family classify (lineage≠none) | **268** | +| negatives | 22 | +| OBSERVED (all tasks) | 101 | +| family OBSERVED / INFERRED | 36 / 232 | +| **Gap to 2k (family)** | **1732** | + +KEEP vs committed (text,lineage): **89 already present**, **4 net-new** (`mogging`, `hard launch`, `soft launch`, `copemaxxing`). + +### Live store after settle (family only) + +| Metric | n | +|---|---:| +| Family-labeled | 998 | +| OBSERVED family (gold) | 93 | +| INFERRED family (weak) | 905 | +| Union committed∪store family keys | ~999 | +| **Residual gap to 2k (union family)** | **~1001** | + +### Shadow export (honest live; OBSERVED preserved) + +Path: `/workspace/hyperlex-harvest/shadow-export-post-settle-keep93-2026-09-10/` + +| Metric | n | +|---|---:| +| classify family (honest gate) | **995** | +| classify_all (incl negatives) | 3557 | +| negatives | 2562 | +| observed_family | 102 | +| inferred_family | 893 | +| **name_gate_classify_gap** | **1005** | +| sha256 | `5dc1e8a8b584bb10e1c42b7b56e303836a5a59920bafb9becc4910267caf0023` | + +Dedupe prefers `OBSERVED` over `INFERRED` on `(task,text,role_scheme,lineage)` so settled KEEP is not masked by committed INFERRED duplicates. + +## 3. `--include-live` honesty note (blocker for gold export path) + +| Surface | Behavior | +|---|---| +| **main @ a8b9078** | No `--include-live` / `--live-store` flags. Committed export cannot pull settled live rows. | +| **PR #30** (`007-unbind-neg-harvest`) | `load_live_candidates()` **hardcodes `class=INFERRED`** ("Never upgrades class to OBSERVED") and rewrites licenses to `labels INFERRED`. Would **lie** by downgrading operator-settled OBSERVED KEEP-93. | + +**Therefore**: did **not** run `#30 --include-live` as the settle export path. Used **shadow export** above (preserves store class) instead. Do not merge #29/#30 in this brief. + +## 4. Residual gap (clear) + +- Gate still **open**: ~**1001–1005** family-classify short of 2k after KEEP-93 settle + live family union. +- Settling KEEP only moves gold epistemic status; it does **not** invent new family atoms. +- Closing the gap still needs more attested family-bearing rows (weak INFERRED and/or further operator-settled gold) — not inbox `none` flood, not auto-OBSERVED, not a 9th family. + +## 5. Success checklist + +- [x] #32 present on main (`weak_tag_family.py`, tip `a8b9078`) +- [x] 93 KEEP rows `class=OBSERVED` in store (exact match) +- [x] Backup + provenance note +- [x] WEAK/REJECT untouched +- [x] Receipt written +- [x] Shadow export with honest accounting +- [ ] Optional docs/receipt PR (see follow-up) diff --git a/docs/remotes.md b/docs/remotes.md new file mode 100644 index 00000000..6bbf7b32 --- /dev/null +++ b/docs/remotes.md @@ -0,0 +1,35 @@ +# Remotes — personal vs org + +**OBSERVED:** the canonical train and work remote is +`scrimshawlife-ctrl/Hyperlex` (`main`). Diligence pointer: +[CANONICAL.md](CANONICAL.md). Product naming SoT: [NAMING.md](NAMING.md). + +**Company mirror:** `Zero-State-LLC/Hyperlex` exists and may lag. Do not treat +it as the train source of truth. Do not clone it for Spark train or Hub work. +After naming/docs land on personal `main`, sync org only via intentional push +below — do not smash. + +## Optional org mirror push + +If you maintain the org remote: + +```bash +cd Hyperlex +git remote add org git@github.com:Zero-State-LLC/Hyperlex.git +git push org main +git push org --tags +``` + +Keep one source of truth. Default: personal `main` first, then: + +```bash +./scripts/push-org.sh +``` + +That script refuses if the `org` remote is missing. + +## Don't + +- Diverge two `main`s +- Train or publish Hub cards from a stale org clone +- Point operators at the org URL as the work remote diff --git a/docs/shadow-hyperlexical.md b/docs/shadow-hyperlexical.md new file mode 100644 index 00000000..611d551a --- /dev/null +++ b/docs/shadow-hyperlexical.md @@ -0,0 +1,90 @@ +# SHADOW — Spec 007 model path + +**Naming:** this page is **Hyperlexical** (model / train / eval / E2 / `name_gate` claim). Harvest and live ingest are **ne0l0gist**. Repo **Hyperlex** is the transitional shell. The earned Hub name still requires E2 (`name_gate` is **false**). + +The Hermes skill is the **current operator surface**. This page is the **model path**: a learned encoder that starts as T0 and may become T1 after E2. + +Not on Hyperlex `API_V1`. Not a Hugging Face model. Not named **Hyperlexical** until eval gate E2 passes on Spark. + +Specify is locked C1–C52 plus A5 milestones. Implement on `main` is the stub, harvest, eval harness, and gated Spark loop. + +## Trajectory (T0 → T1) + +| Tier | Meaning | Name allowed | State today | +|------|---------|--------------|-------------| +| Skill | Hermes CLI + package | Hyperlex (the skill) | Shipping v0.4.0 | +| T0 | Base encoder + classify heads | `hyperlex-encoder-*` only | Specified. Not Hyperlexical. | +| T1 | Encoder + unbind heads; E2 vs Spec 004 | `hyperlex-structure-*` / Hyperlexical | **Not earned.** E2 Spark-blocked. | +| T2 | Separate generative LoRA | out of this cycle | Not an implement target | + +`name_gate` stays **false** until E2. Classify volume ready ≠ T1. + +## Honest gates (2026-09-10 PT evening) + +| Surface | n | Notes | +|---------|--:|-------| +| Local SoT | **4333** | 402 OBSERVED / 3931 INFERRED. Not in git. | +| `--include-live` export | **6506** | classify **2437** · unbind **1345** · negatives **208** · gaps **0/0/0** | +| Tracked seed `civilian.v0.1.jsonl` | 883 | Snapshot only. Not the train SoT. | + +Danny ~2500 candidate bar: **met**. Hermes 913 / “gap to 2500” is **superseded**. Afternoon store family-labeled **1789** is the [blanket-yes receipt](receipts/blanket-yes-unlock-2026-09-10.md) figure. + +| Gate | State | +|------|--------| +| Classify volume | **Ready** — operator `--include-live` family classify **2437**. | +| `name_gate` | **false**. Volume does not name the model. Gate stays false until E2 passes on Spark. | +| E2 vs Spec 004 | **FAIL** on the stub (expected). A trained E2 is Spark-blocked. Seed smoke is not a pass. | +| Hub | No upload. Skeleton only. Weights stay on Spark. | +| Families | **8**. No ninth family. | +| Brier | `null` on every packet. | + +## Commands + +```bash +PYTHONPATH=scripts/shadow python3 -m hyperlexical.infer --text rizz --offline +PYTHONPATH=scripts/shadow python3 -m hyperlexical.ingest_tap --dry-run +PYTHONPATH=scripts/shadow python3 -m hyperlexical.export +PYTHONPATH=scripts/shadow python3 -m hyperlexical.export --include-live +PYTHONPATH=scripts/shadow python3 -m hyperlexical.eval_unbind +PYTHONPATH=scripts/shadow python3 -m hyperlexical.preflight +PYTHONPATH=scripts/shadow python3 -m hyperlexical.train --offline +``` + +`eval_unbind` exit 3 on the stub is expected (E2 fail). +`train` without Spark env exits 2. + +## Spark + +Bring-up is procedure, not a product card. A seed smoke that ends with E2 failing and a receipt written is a successful harness check — not a Hyperlexical name. + +| Doc | Role | +|-----|------| +| [SPARK-BRINGUP.md](https://github.com/scrimshawlife-ctrl/Hyperlex/blob/main/specs/007-hyperlexical-model/SPARK-BRINGUP.md) | Box procedure (#28) | +| [AARON-SPARK-TRAIN.md](https://github.com/scrimshawlife-ctrl/Hyperlex/blob/main/specs/007-hyperlexical-model/AARON-SPARK-TRAIN.md) | Train spec (Danny) | +| [HERMES-SPARK-RUN.md](https://github.com/scrimshawlife-ctrl/Hyperlex/blob/main/specs/007-hyperlexical-model/HERMES-SPARK-RUN.md) | Hermes run order | +| [milestones.md](https://github.com/scrimshawlife-ctrl/Hyperlex/blob/main/specs/007-hyperlexical-model/milestones.md) | A5 name-gate / tier table (#33) | + +Trunk: `answerdotai/ModernBERT-base`. Local snapshot only. Last 2 layers trainable. Span aligner + val metrics. HF-shaped dump (`config.json`, `model.safetensors` or `heads.pt`). No Hub upload from the recipe. Card name stays `hyperlex-encoder-modernbert-base-seed` until E2. + +## Eval table (stub) + +| Gate | Status | +|------|--------| +| E0 packet | PASS | +| E1 classify | NOT RUN | +| E2 vs Spec 004 | FAIL | +| E3 MiniLM control | NOT RUN | +| E4 restricted | PASS | +| E5 schema walls | PASS | +| E6 dialect | PASS | + +`pipeline_tag` is `text-classification`. + +## Live ingest tap + +Current slang atoms from `pipeline` / `analyze` / `scan` / inbox write INFERRED rows to `~/.hyperlex/hyperlexical/ingest_candidates.jsonl` (local SoT; **4333** rows as of 2026-09-10 PT evening). +They do not become OBSERVED and do not mint Brier unless an operator settles them. Spec: [ingest-tap.md](https://github.com/scrimshawlife-ctrl/Hyperlex/blob/main/specs/007-hyperlexical-model/ingest-tap.md). + +Spark trains from this local store / `--include-live`, not from the tracked 883-row seed. + +Live rows with an invalid split are coerced to a lexical train/val/test assignment (#38). That is export hygiene, not an E2 pass. diff --git a/docs/specs/index.md b/docs/specs/index.md new file mode 100644 index 00000000..d2a65189 --- /dev/null +++ b/docs/specs/index.md @@ -0,0 +1,35 @@ +# Spec kit + +Hyperlex **runs as a Hermes skill** today. Spec 007 is the **model path** (T0 → T1 after E2), still SHADOW. + +**Naming:** **Hyperlexical** = Spec 007 model / train / eval / E2 / `name_gate` claim. **ne0l0gist** = slang ingest / harvest. Repo **Hyperlex** is the transitional monorepo shell. `name_gate` stays false. + +Specs live under [`specs/`](https://github.com/scrimshawlife-ctrl/Hyperlex/tree/main/specs) in the repository. This page is the docs-site index. It does not add gates. + +Constitution: [`.specify/memory/constitution.md`](https://github.com/scrimshawlife-ctrl/Hyperlex/blob/main/.specify/memory/constitution.md) (v1.0.0, **SHADOW** until operator promotion). + +| ID | Title | SDD status | Runtime on main | +|----|-------|------------|-----------------| +| 000 | Hyperlex spine (as-built v0.4.0) | SPECIFY locked | shipping | +| 001 | Mutation grammar detector | CLARIFY locked · implement on main · not CONVERGED | `hyperlex.mutation` + tests | +| 002 | Hermes command surface | SPECIFY locked · implement partial | package CLI + `hlx-mutation` + `hyperlex init` | +| 003 | Mutation detect v0.2 | SPECIFY locked · implement SHADOW | GAME_ENCODE / CODE_SWITCH / PHONETIC_WARP + watch jsonl + `--human` | +| 004 | Recoverable-structure probe | SPECIFY locked · implement SHADOW | `scripts/shadow/recoverable_structure/` | +| 005 | Route labels | SPECIFY locked (Notion + branch `005-route-labels`) | not on main — [PR 18](https://github.com/scrimshawlife-ctrl/Hyperlex/pull/18) | +| 006 | IsA | reserved — do not open from 007 | — | +| 007 | Hyperlexical model | SPECIFY locked C1–C52 · A5 milestones · SHADOW implement on main | `scripts/shadow/hyperlexical/` · E2 fail · `name_gate` false · no Hub | + +## Spec 007 (SHADOW) + +Not on `API_V1`. Not a Hugging Face model. Not named **Hyperlexical** until E2 passes on Spark. + +- Pages overview: [SHADOW encoder (007)](../shadow-hyperlexical.md) +- Operator snapshot: [Status](../status.md) +- Spark bring-up (procedure, not a card): [SPARK-BRINGUP.md](https://github.com/scrimshawlife-ctrl/Hyperlex/blob/main/specs/007-hyperlexical-model/SPARK-BRINGUP.md) +- Aaron train spec: [AARON-SPARK-TRAIN.md](https://github.com/scrimshawlife-ctrl/Hyperlex/blob/main/specs/007-hyperlexical-model/AARON-SPARK-TRAIN.md) +- A5 milestones: [milestones.md](https://github.com/scrimshawlife-ctrl/Hyperlex/blob/main/specs/007-hyperlexical-model/milestones.md) +- Harvest receipts: [KEEP-93](../receipts/settle-keep93-2026-09-10.md) · [Blanket-yes unlock](../receipts/blanket-yes-unlock-2026-09-10.md) + +## Historical spine + +The v0.3 technical spec is mirrored at [Technical spec](../spec.md). Current skill version is **0.4.0**. Prefer [Commands](../commands.md) and [Status](../status.md) for what ships today. diff --git a/docs/start/glossary.md b/docs/start/glossary.md index 9c987278..c4b36fee 100644 --- a/docs/start/glossary.md +++ b/docs/start/glossary.md @@ -66,10 +66,44 @@ Always `provenance: SPECULATIVE` and `brier: null`. CLI: `mutation predict "/dev/null 2>&1; then + echo "no org remote. add: git remote add org git@github.com:Zero-State-LLC/Hyperlex.git" >&2 + echo "create the org repo first (gh repo create Zero-State-LLC/Hyperlex)" >&2 + exit 2 +fi +git push org main diff --git a/scripts/sync_mkdocs_pages.py b/scripts/sync_mkdocs_pages.py old mode 100755 new mode 100644 index 7852a282..2c6d9fec --- a/scripts/sync_mkdocs_pages.py +++ b/scripts/sync_mkdocs_pages.py @@ -8,6 +8,9 @@ ROOT = Path(__file__).resolve().parents[1] DOCS = ROOT / "docs" +# Root-only paths that MkDocs cannot resolve under docs/ → org blob URLs. +_ORG = "https://github.com/Zero-State-LLC/Hyperlex/blob/main" + # (file under docs/, list of (old, new) replacements) FIXES = { "design-orchestra.md": [ @@ -15,11 +18,12 @@ ("](../SPEC.md)", "](spec.md)"), ("](../ARCHITECTURE.md)", "](architecture.md)"), ], - "architecture.md": [ ("](./SPEC.md)", "](spec.md)"), ("](./docs/api-v1.md)", "](api-v1.md)"), ("](./docs/hermes-skill.md)", "](hermes-skill.md)"), + ("](./docs/shadow-hyperlexical.md)", "](shadow-hyperlexical.md)"), + ("](./STATUS.md)", "](status.md)"), ("](./ARCHITECTURE.md)", "](architecture.md)"), ("](./DESIGN.md)", "](design.md)"), ], @@ -31,11 +35,15 @@ ("](docs/hermes-skill.md)", "](hermes-skill.md)"), ("](./docs/hermes-skill.md)", "](hermes-skill.md)"), ("](docs/standalone-app.md)", "](hermes-skill.md)"), + ("](docs/design.md)", "](design.md)"), ], "spec.md": [ ("](docs/api-v1.md)", "](api-v1.md)"), ("](./docs/api-v1.md)", "](api-v1.md)"), ("](docs/brier-calibration.md)", "](brier-calibration.md)"), + ("](docs/commands.md)", "](commands.md)"), + ("](docs/shadow-hyperlexical.md)", "](shadow-hyperlexical.md)"), + ("](STATUS.md)", "](status.md)"), ], # STATUS.md is mirrored as docs/status.md; root paths need MkDocs-relative rewrite "status.md": [ @@ -57,7 +65,24 @@ ("](docs/", "]("), ], "ROADMAP.md": [ - ("](../ROADMAP.md)", "](https://github.com/scrimshawlife-ctrl/Hyperlex-Hermes-Specs/blob/main/ROADMAP.md)"), + ("](SPEC.md)", "](spec.md)"), + ("](DESIGN.md)", "](design.md)"), + ("](STATUS.md)", "](status.md)"), + ], + "contributing.md": [ + ("](STATUS.md)", "](status.md)"), + ("](ROADMAP.md)", "](ROADMAP.md)"), + ("](ARCHITECTURE.md)", "](architecture.md)"), + ("](DESIGN.md)", "](design.md)"), + ("](SPEC.md)", "](spec.md)"), + ("](AGENTS.md)", f"]({_ORG}/AGENTS.md)"), + ("](intent/README.md)", f"]({_ORG}/intent/README.md)"), + ("](LICENSE_POLICY.md)", f"]({_ORG}/LICENSE_POLICY.md)"), + ("](LICENSE)", f"]({_ORG}/LICENSE)"), + ( + "](.github/workflows/hermes-evals.yml)", + f"]({_ORG}/.github/workflows/hermes-evals.yml)", + ), ], "README.md": [ ("](../ROADMAP.md)", "](ROADMAP.md)"), diff --git a/specs/007-hyperlexical-model/HERMES-SPARK-RUN.md b/specs/007-hyperlexical-model/HERMES-SPARK-RUN.md new file mode 100644 index 00000000..40e7687b --- /dev/null +++ b/specs/007-hyperlexical-model/HERMES-SPARK-RUN.md @@ -0,0 +1,706 @@ +# Hermes run order — 007 Spark seed smoke (bring-up + train) + +*Operator note: hand this entire file to Hermes. It is self-contained — no other document is needed to execute it. Human-facing procedure detail is in `SPARK-BRINGUP.md`; the spec locks are in `AARON-SPARK-TRAIN.md`. This file changes neither.* + +--- + +**You are Hermes.** This document is your complete run order for a **gated seed smoke** of Hyperlex Spec 007 on the DGX Spark. Everything required to execute is in it. + +| | | +|---|---| +| **Your role** | Plan, delegate, adjudicate. You never run a command yourself. | +| **Executor** | **Forge**, your subagent, running on the **operator Mac** — *not* on the Spark. Every slice reaches the box over `ssh`. | +| **Start** | **A0 first, always.** Then the three bring-up chains, then B1–B5 in order. Every A slice is idempotent — re-running a passed slice is safe and is the normal way to resume after a halt. | +| **Finish** | When C1 has opened the PR, return *Output Hermes must return* and stop. There is no follow-on work; do not go looking for any. | +| **Escalation** | Danny owns the spec but you have **no channel to him**. Every stop, every anomaly, goes to the **human operator** who handed you this file. | + +Filenames cited below (`SPARK-BRINGUP.md`, `AARON-SPARK-TRAIN.md`, `docs/remotes.md`, `amendments.md`) are provenance for humans. They live in the repo A1 clones. You do not need to read them and nothing here waits on them. + +You do not improvise around a stop. + +## What this run is + +Fine-tune `answerdotai/ModernBERT-base` (~149M) with a classify head and two unbind heads, freezing all but the last 2 of 22 layers. + +**This is a harness smoke, not a model delivery.** Read this twice: + +- E2 is **expected to fail**. `name_gate` is false. `e2_pass` is false. `brier` is null. +- The word *Hyperlexical* does not attach to the output. The card is `hyperlex-encoder-modernbert-base-seed`. +- Nothing is uploaded anywhere. +- A run that ends with E2 failing and a receipt written is a **success**. A run where E2 passes is a **defect** — stop and report it. + +Do not tune, re-split, re-seed, or extend epochs to improve a number. There is no number to improve in this unit. + +## Box, as measured 2026-09-09 + +| Fact | Value | +|------|-------| +| Host | `spark-bf46.local`, Ubuntu 24.04.4, aarch64 | +| SoC | GB10, `sm_121`, capability (12, 1) | +| Device memory | 130.7 GB total, **~5.2 GB free** | +| Co-tenants | `qwen38-27b` (SGLang :30000) and `spark-comfyui` (:8188) — **both stay up** | +| Host train stack | none — no torch, no transformers, no venv | +| Image to reuse | `lmsysorg/sglang:dev-qwen38-27b-dflash2` — torch 2.13.0+cu130, transformers 5.12.1 | + +Every slice runs in a throwaway container off that image. Nothing is installed on the host. + +## Preconditions — verified 2026-09-09, do not re-derive + +| Check | State | +|-------|-------| +| `morpheus` in `docker` group | yes — **never use `sudo`** | +| `lmsysorg/sglang:dev-qwen38-27b-dflash2` | already pulled locally — **never `docker pull`** | +| `~/.cache` | exists, `morpheus`-owned, mounted by every slice | +| github.com / huggingface.co | reachable (200) | +| Disk | 3.3 T free | + +**Torch writes caches outside `$HOME/.cache`.** Triton defaults to `~/.triton`, which is *not* the mounted path, and the forward pass dies with `PermissionError: [Errno 13] Permission denied: '/home/morpheus/.triton'`. Every torch slice therefore sets `TRITON_CACHE_DIR`, `TORCHINDUCTOR_CACHE_DIR` and `XDG_CACHE_HOME` under the mounted `~/.cache`. Verified: without them B3 fails on its first forward pass; with them it completes. Do not drop these. + +**No slice uses `--rm`.** Forge's safety detector blocks that flag, so every container is given a unique `--name` instead and is left behind on exit. This is deliberate. Do not add `--rm` back, and do not try to route around the detector by hiding the flag in a script — if `--rm` is wanted, that is an allowlist decision for the human operator to make in Forge's config, not something this run works around. + +Stopped containers cost only disk metadata. The operator may clear them later; no slice does it. + +Every container runs `--user "$(id -u):$(id -g)"` so artifacts are owned by `morpheus`, not root. A consequence: `$HOME` **inside** the container is a root-owned mount parent, so `$HOME/.cache` is not writable unless mounted. Every slice below mounts it. Removing that mount breaks `hf download` and torch's caches with a bare permission-denied — verified, not theoretical. + +Forge runs on the Mac. The Spark is remote, so **every slice below is an `ssh` heredoc**: + +```bash +ssh spark bash -s <<'REMOTE' +set -euo pipefail +… commands run on the Spark … +REMOTE +``` + +The quoted `<<'REMOTE'` delimiter is load-bearing: it stops the Mac expanding `$HOME` and `$(id -u)`, so they resolve on the Spark where they mean the right thing. `ssh` returns the remote exit code, so every exit-code check below still holds. Verified, including nested heredocs. + +**Do not** run any slice's commands locally. A slice that reports a hostname other than `spark-bf46` has run on the wrong machine — stop and report. + +## Slice graph + +| Slice | Does | Needs | GPU | +|-------|------|-------|-----| +| **A0** | **reach the Spark; repair stale ssh config** | — | no | +| A1 | clone repo, verify it is the right one | A0 | no | +| A2 | exclude exports from git | A1 | no | +| A3 | check trunk (A3a) → fetch if needed (A3b) → verify (A3c) | A0 | no | +| A4 | prove the stack loads the trunk | A3 | yes | +| A5 | write the memory guard | A0 | no | +| B1 | preflight | A1 A2 A3 | no | +| B2 | E2 before | A1 | no | +| B3 | **train** — launch detached (B3a) then poll (B3b) | A1–A5, B1, B2 | **yes** | +| B4 | E2 after | B3 | no | +| B5 | collect evidence | B4 | no | +| C1 | open the draft PR (**on the Mac**) | B5 | no | + +**A0 gates everything.** After it passes, three independent bring-up chains — `A1 → A2`, `A3 → A4`, and `A5` alone — may run concurrently. Everything in B is strictly ordered and every B slice needs all of A done. + +## How to delegate + +Forge is your subagent on the box. You plan and adjudicate; Forge executes. + +1. **Pass slice text verbatim.** Do not summarise, re-word, or "clean up" a command. Mount paths, env vars and the `0.03` cap are load-bearing — a paraphrase that drops `-v "$HOME/.cache:$HOME/.cache"` fails with a bare permission-denied that looks like something else entirely. +2. **One slice per delegation.** Collect exit code and stdout before dispatching the next. +3. **Check the done-condition yourself.** Forge reports; you adjudicate. A slice is not done because Forge says it is — it is done because the stated condition is observably true. +4. **A stop halts the chain.** Do not re-dispatch, do not vary the command, do not route around it with a different slice. Return the error and wait for a human. +5. **Exit 255 is transport, not a slice result.** `ssh` returns 255 when the *connection* fails — the remote command may never have run at all, and nothing was decided. Re-dispatch the slice once. If it returns 255 twice, escalate to the human operator. This is the one retry the run permits, and it applies only to 255. A non-zero exit produced by the remote command is a real result: adjudicate it, never retry it. +6. **Never invent a slice.** If something is needed that is not in A1–B5, that is a spec gap. Return it to the human operator. Do not improvise on a box running someone else's live services. + +--- + +## Slice A0 — reach the Spark + +Runs **on the Mac**, not over ssh. This is the only local slice. + +```bash +ssh -o BatchMode=yes -o ConnectTimeout=8 spark 'hostname' 2>&1 || true +``` + +If that printed `spark-bf46`, A0 is done. If it printed `No route to host`, the operator's ssh config holds a stale IP. Repair it once, idempotently: + +```bash +cp ~/.ssh/config ~/.ssh/config.bak.$(date +%Y%m%d%H%M%S) +sed -i '' 's/^ HostName 192\.168\.12\.202$/ HostName spark-bf46.local/' ~/.ssh/config +ssh -o BatchMode=yes -o ConnectTimeout=8 spark 'hostname' +``` + +**Done:** `ssh spark 'hostname'` prints `spark-bf46`. + +**Stop if:** it still fails after the repair. The box may be off or off-network. Return to the human operator — do not try other hostnames, other users, or a password prompt. + +**Stop if:** `hostname` returns anything containing `Mac` or matching the machine Forge runs on. That means the command executed locally instead of over ssh, and every later slice would corrupt the wrong machine. + + +**A0b — harden the connection.** Every later slice opens an ssh session. Without multiplexing they are separate TCP connections against sshd's default `MaxStartups 10:30:100`, and a transient drop returns exit 255 with nothing run. Add keepalives and connection reuse — idempotent, safe to re-run: + +```bash +CFG="$HOME/.ssh/config" +cp "$CFG" "$CFG.bak.$(date +%Y%m%d%H%M%S)" +if ! awk '/^Host spark$/{f=1;next} /^Host /{f=0} f&&/ControlMaster/{print "yes"}' "$CFG" | grep -q yes; then + awk ' + /^Host spark$/ { + print + print " ServerAliveInterval 15" + print " ServerAliveCountMax 4" + print " ConnectTimeout 15" + print " ConnectionAttempts 3" + print " ControlMaster auto" + print " ControlPath ~/.ssh/cm-%r@%h:%p" + print " ControlPersist 10m" + next + } + { print } + ' "$CFG" > "$CFG.new" && mv "$CFG.new" "$CFG" + echo "hardening inserted" +else + echo "hardening already present" +fi +grep -c ControlMaster "$CFG" +ssh spark 'hostname' +``` + +**Done:** `ControlMaster` appears exactly once and `ssh spark 'hostname'` prints `spark-bf46`. Measured effect: first connection ~0.55 s, subsequent ~0.02 s. + +`ControlPath` must stay short — a unix socket path over 104 bytes fails with `ControlPath too long`. Do not relocate it to a long temp directory. + + +## Slice A1 — clone + +```bash +ssh spark bash -s <<'REMOTE' +set -euo pipefail +if [ -d ~/Hyperlex/.git ]; then + echo "checkout exists — updating in place" + cd ~/Hyperlex && git fetch origin && git checkout main && git pull --ff-only origin main +else + git clone https://github.com/scrimshawlife-ctrl/Hyperlex.git ~/Hyperlex + cd ~/Hyperlex && git checkout main +fi +git remote get-url origin +git rev-parse --short HEAD +ls scripts/shadow/hyperlexical/loop.py +hostname +REMOTE +``` + +**Done:** remote contains `scrimshawlife-ctrl`, `loop.py` exists, and `hostname` prints `spark-bf46`. + +Safe to re-run: it updates an existing checkout instead of failing on `git clone`. + +**Stop if:** the remote is `Zero-State-LLC`. That repo is live and public but holds **no** `specs/007-*` and **no** `scripts/shadow/`. A clone from it succeeds and then fails later with a confusing import error. Personal is source of truth (`docs/remotes.md`). + +Do not use the `007-hyperlexical-model` branch. Spec says `main`. + +## Slice A2 — keep exports out of git + +`export_dataset` writes into `specs/007-hyperlexical-model/exports/`, which is neither tracked nor ignored. + +```bash +ssh spark bash -s <<'REMOTE' +set -euo pipefail +cd ~/Hyperlex +grep -qxF 'specs/007-hyperlexical-model/exports/' .git/info/exclude \ + || printf 'specs/007-hyperlexical-model/exports/\n' >> .git/info/exclude +grep -n 'exports' .git/info/exclude +REMOTE +``` + +`.git/info/exclude`, not `.gitignore` — local only, no diff for Danny to review. + +**This slice is now largely vestigial and that is expected.** As of main `e3425ab`, ten files under `specs/007-hyperlexical-model/exports/` are **tracked** upstream. `.git/info/exclude` only suppresses *untracked* paths, so it cannot hide changes to those. B3 regenerates them via `write_export`, and they will show as modified. Keep the exclude for any genuinely new file the exporter emits; expect the tracked ones to go dirty regardless. See B5. + +**Done:** the `exports/` line appears exactly once. Safe to re-run — the append is guarded. + +## Slice A3 — fetch the trunk + +The only network download in the run. **Verify first** — the trunk may already be complete from an earlier attempt, in which case the fetch is skipped entirely. + +**A3a — state check.** Read-only. Runs no container, changes nothing: + +```bash +ssh spark bash -s <<'REMOTE' +set -uo pipefail +T="$HOME/.hyperlex/models/trunks/ModernBERT-base" + +# read-only orphan detection — this slice never stops or removes a container +ORPHAN=$(docker ps -a --format '{{.Names}} {{.Status}} {{.Command}}' | grep -i 'hf download' || true) +if [ -n "$ORPHAN" ]; then + echo "ORPHAN_PRESENT:"; echo "$ORPHAN" +else + echo "no orphan download containers" +fi + +MISSING=0 +for f in config.json model.safetensors tokenizer.json tokenizer_config.json special_tokens_map.json; do + if [ -s "$T/$f" ]; then echo " ok: $f"; else echo " MISSING: $f"; MISSING=1; fi +done +INC=$(find "$T" -name '*.incomplete' 2>/dev/null | wc -l) +echo "incomplete_files=$INC" +if [ "$MISSING" = "0" ] && [ "$INC" = "0" ]; then + echo "TRUNK_COMPLETE — skip A3b, go straight to A3c" +else + echo "TRUNK_INCOMPLETE — run A3b" +fi +REMOTE +``` + +**Done:** prints either `TRUNK_COMPLETE` or `TRUNK_INCOMPLETE`, and `no orphan download containers`. + +**Stop if:** `ORPHAN_PRESENT`. A container is still writing into the same directory and the two would fight over lock files. **You may not stop it** — container lifecycle is not yours, and Forge's safety policy blocks it correctly. Return to the human operator with the container name and ask them to clear it, then re-dispatch A3a. + +**If `TRUNK_COMPLETE`:** skip A3b entirely and dispatch A3c. Do not re-download to be thorough — it is 600 MB for no gain. + +**A3b — fetch.** Only when A3a reported `TRUNK_INCOMPLETE`. + +`answerdotai/ModernBERT-base` holds 16 files: the weights, a ~598 MB `pytorch_model.bin` duplicate, and 8 ONNX exports. An unfiltered `hf download` pulls all of it — well over 2 GB — and will exceed your executor's command timeout. Fetch only the five files the run uses: + +```bash +ssh spark bash -s <<'REMOTE' +set -euo pipefail +mkdir -p ~/.hyperlex/models/trunks +docker run --name "hlx-a3-$(date +%s)" \ + --user "$(id -u):$(id -g)" -e HOME="$HOME" \ + -v "$HOME/.hyperlex:$HOME/.hyperlex" \ + -v "$HOME/.cache:$HOME/.cache" \ + lmsysorg/sglang:dev-qwen38-27b-dflash2 \ + hf download answerdotai/ModernBERT-base \ + --local-dir "$HOME/.hyperlex/models/trunks/ModernBERT-base" \ + --include config.json \ + --include model.safetensors \ + --include tokenizer.json \ + --include tokenizer_config.json \ + --include special_tokens_map.json +REMOTE +``` + +`hf download` resumes rather than restarting, so a partial directory is safe to run this over. + +**Each pattern needs its own `--include` flag.** Space-separating them (`--include a.json b.json`) is silently wrong: `hf` treats the extras as positional filenames, prints `Ignoring --include since filenames have been explicitly set`, downloads only the last one — and **still exits 0**. Verified on this box. That is why A3c is not optional: the exit code will not catch it. + +The `--include` list is exhaustive. Do not add to it, and in particular do not fetch `onnx/` or `pytorch_model.bin`. + +**A3c — verify. Never skip this**, whichever path you took: + +```bash +ssh spark bash -s <<'REMOTE' +set -euo pipefail +cd ~/.hyperlex/models/trunks/ModernBERT-base +for f in config.json model.safetensors tokenizer.json tokenizer_config.json special_tokens_map.json; do + [ -s "$f" ] || { echo "MISSING: $f"; exit 1; } +done +if find . -name '*.incomplete' | grep -q .; then echo "INCOMPLETE FILES PRESENT"; exit 1; fi +python3 -c "import json;json.load(open('config.json'));print('config.json parses')" +stat -c '%n %s bytes' model.safetensors +echo "A3_VERIFIED" +REMOTE +``` + +**Done:** prints `A3_VERIFIED`, and `model.safetensors` is 598,635,032 bytes. + +**Stop if:** any file reports `MISSING`, or `.incomplete` files remain. Dispatch A3b once more — it resumes. If A3c fails twice, return to the human operator. + +**Stop if:** the download resolves to any `*-instruct`, chat, MiniLM, or ModernBERT-**large** checkpoint. The trunk is frozen by A2 in `amendments.md` and may not be swapped. + +## Slice A4 — prove the stack + +```bash +ssh spark bash -s <<'REMOTE' +set -euo pipefail +docker run --gpus all --name "hlx-$$-$(date +%s)" \ + --user "$(id -u):$(id -g)" -e HOME="$HOME" \ + -v "$HOME/.hyperlex:$HOME/.hyperlex" \ + -v "$HOME/.cache:$HOME/.cache" \ + -e TRITON_CACHE_DIR="$HOME/.cache/triton" \ + -e XDG_CACHE_HOME="$HOME/.cache" \ + lmsysorg/sglang:dev-qwen38-27b-dflash2 \ + python -c " +from transformers import AutoModel, AutoTokenizer +d='$HOME/.hyperlex/models/trunks/ModernBERT-base' +t=AutoTokenizer.from_pretrained(d, local_files_only=True) +m=AutoModel.from_pretrained(d, local_files_only=True) +print('hidden', m.config.hidden_size, 'layers', m.config.num_hidden_layers) +print('offsets', 'offset_mapping' in t('rizz', return_offsets_mapping=True)) +" +REMOTE +``` + +**Done:** prints `hidden 768 layers 22` and `offsets True`. + +**Stop if:** hidden ≠ 768 (the loop raises by design), or `offsets` is False. Without `offset_mapping` the C47 char-span aligner is dead and unbind is meaningless. Do not substitute `k+1` indexing — C47 forbids it explicitly. + +`transformers` here is 5.12.1, a major ahead of what `loop.py` was written against. This slice is what proves the boundary before B3 spends an epoch. + +## Slice A5 — memory guard + +`set_per_process_memory_fraction` is a Python call, not an env var, and `loop.py` must not be edited. The cap goes in a launcher **outside** the repo. + +```bash +ssh spark bash -s <<'REMOTE' +set -euo pipefail +mkdir -p ~/hlx +cat > ~/hlx/guard.py <<'PY' +import sys, runpy, torch +frac = float(sys.argv[1]) +mod = sys.argv[2] +torch.cuda.set_per_process_memory_fraction(frac) +free, total = torch.cuda.mem_get_info() +print(f"[guard] cap={frac*total/1e9:.1f}GB free={free/1e9:.1f}GB total={total/1e9:.1f}GB", flush=True) +sys.argv = [mod] + sys.argv[3:] +runpy.run_module(mod, run_name="__main__") +PY +REMOTE +``` + +`0.03 × 130.7 GB ≈ 3.9 GB` — above the measured 0.73 GB at batch 1 (batch 8 stays well under the cap), ~1.3 GB below what is free. If the estimate is wrong, **the trainer dies and the server does not.** That is the entire purpose of this slice. + +**Done:** `~/hlx/guard.py` exists and is not inside `~/Hyperlex`. + +--- + +## Slice B1 — preflight + +```bash +ssh spark bash -s <<'REMOTE' +set -euo pipefail +cd ~/Hyperlex +docker run --name "hlx-$$-$(date +%s)" \ + --user "$(id -u):$(id -g)" -e HOME="$HOME" \ + -v "$HOME/Hyperlex:$HOME/Hyperlex" \ + -v "$HOME/.hyperlex:$HOME/.hyperlex" \ + -v "$HOME/.cache:$HOME/.cache" \ + -w "$HOME/Hyperlex" \ + -e PYTHONPATH=scripts/shadow \ + -e HYPERLEX_ALLOW_TRAIN=1 \ + -e HYPERLEX_TRUNK_DIR="$HOME/.hyperlex/models/trunks/ModernBERT-base" \ + lmsysorg/sglang:dev-qwen38-27b-dflash2 \ + python -m hyperlexical.preflight | tee ~/.hyperlex/preflight.json +REMOTE +``` + +**Done:** exit 0, with `ready_to_train: true`, `machine: "aarch64"`, `name_gate: false`. + +**Stop if:** exit 2 — the gate is closed. Read `reason` in the JSON. Do not set env vars the spec did not list to force it open. + +Expected `data_counts` as of main `e3425ab` (2026-09-11): **classify 1922, unbind 437, negatives 208**, `data_sha256` beginning `637f800b`. + +`classify` deliberately **excludes** negatives — it is the honest family quota for the 2,000 name-gate. `classify_all` is the larger number and is *not* the gate figure. Do not substitute one for the other. + +Name-gate gaps now: classify **78**, unbind **0**, negatives **0**. Two of three are closed. + +A different sha means the dataset moved again — report the new value and its counts, then continue. It is no longer a stop: this dataset is under active harvest and `0d6a3e34` (183 rows) is the retired seed snapshot. + +## Slice B2 — E2 before + +```bash +ssh spark bash -s <<'REMOTE' +set -euo pipefail +cd ~/Hyperlex +docker run --name "hlx-$$-$(date +%s)" \ + --user "$(id -u):$(id -g)" -e HOME="$HOME" \ + -v "$HOME/Hyperlex:$HOME/Hyperlex" \ + -v "$HOME/.hyperlex:$HOME/.hyperlex" \ + -v "$HOME/.cache:$HOME/.cache" \ + -w "$HOME/Hyperlex" \ + -e PYTHONPATH=scripts/shadow \ + lmsysorg/sglang:dev-qwen38-27b-dflash2 \ + python -m hyperlexical.eval_unbind --out "$HOME/.hyperlex/hlx-e2-before.json" +REMOTE +``` + +No `--gpus`, no trunk, no train env. `eval_unbind` imports no torch. + +**Done:** **exit 3.** That is the correct, expected result. + +**Stop if:** exit 0. `e2_pass: true` on an untrained stub means the gate is broken. Halt the run and return to the human operator — this is the spec's tripwire, and the one outcome nobody wants silently swallowed. Do not proceed to B3. + +## Slice B3 — train + +The only slice that takes device memory, and the only one whose duration is unknown. **Launch it detached, then poll** — a foreground run that outlives your executor's command timeout gets SIGTERM'd mid-epoch and wastes the whole slice. + +**B3a — launch.** Returns immediately: + +```bash +ssh spark bash -s <<'REMOTE' +set -euo pipefail +mkdir -p ~/hlx ~/.cache/triton ~/.cache/inductor +NAME="hlx-train-$(date +%s)" +echo "$NAME" > ~/hlx/last-train-container +cd ~/Hyperlex +docker run -d --name "$NAME" --gpus all \ + --user "$(id -u):$(id -g)" -e HOME="$HOME" \ + -v "$HOME/Hyperlex:$HOME/Hyperlex" \ + -v "$HOME/.hyperlex:$HOME/.hyperlex" \ + -v "$HOME/.cache:$HOME/.cache" \ + -v "$HOME/hlx:$HOME/hlx" \ + -w "$HOME/Hyperlex" \ + -e PYTHONPATH=scripts/shadow \ + -e HYPERLEX_ALLOW_TRAIN=1 \ + -e HYPERLEX_OFFLINE=1 \ + -e HF_HUB_OFFLINE=1 \ + -e TOKENIZERS_PARALLELISM=false \ + -e PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True \ + -e TRITON_CACHE_DIR="$HOME/.cache/triton" \ + -e TORCHINDUCTOR_CACHE_DIR="$HOME/.cache/inductor" \ + -e XDG_CACHE_HOME="$HOME/.cache" \ + -e HYPERLEX_TRUNK_DIR="$HOME/.hyperlex/models/trunks/ModernBERT-base" \ + -e HYPERLEX_TRAIN_OUT="$HOME/.hyperlex/models/hyperlex-encoder-modernbert-base-seed" \ + -e HYPERLEX_TRAIN_EPOCHS=2 \ + -e HYPERLEX_TRAIN_BATCH=8 \ + -e HYPERLEX_TRAIN_LR=2e-5 \ + lmsysorg/sglang:dev-qwen38-27b-dflash2 \ + python "$HOME/hlx/guard.py" 0.03 hyperlexical.train --offline --run +echo "launched: $NAME" +REMOTE +``` + +**B3b — poll.** Short and re-runnable. Dispatch it repeatedly until it reports a terminal state: + +```bash +ssh spark bash -s <<'REMOTE' +set -euo pipefail +NAME=$(cat ~/hlx/last-train-container) +STATUS=$(docker inspect -f '{{.State.Status}}' "$NAME") +CODE=$(docker inspect -f '{{.State.ExitCode}}' "$NAME") +echo "container=$NAME status=$STATUS exit=$CODE" +if [ "$STATUS" = "exited" ]; then + docker logs "$NAME" > ~/.hyperlex/train-stdout.json 2>~/.hyperlex/train-stderr.txt + echo "--- stdout ---"; tail -40 ~/.hyperlex/train-stdout.json + echo "--- stderr ---"; tail -20 ~/.hyperlex/train-stderr.txt +else + echo "still running — re-dispatch this slice" + docker logs --tail 5 "$NAME" 2>&1 | tail -5 +fi +REMOTE +``` + +Re-dispatch B3b until `status=exited`. Do not launch B3a a second time — that starts a competing trainer against the same memory cap. + +Trains on roughly **4,375 train / 541 val / 551 test** rows at main `e3425ab` — about 29× the retired seed. `MAX_LEN` 64, batch 8. + +Two consequences. Runtime is now minutes rather than seconds, so B3b may need several polls; that is expected, not a hang. And the val-metric caveat is **gone** — unbind val is ~64 rows, not 1, so `unbind_exact` is finally a real measurement. + +Per the updated `AARON-SPARK-TRAIN.md`, the operator SoT is the primary source. If the run should train against live candidates rather than the tracked snapshot, that is `--include-live` or `HYPERLEX_INCLUDE_LIVE=1` on `hyperlexical.train` (fail-closed if the live store is missing). Do not add the flag on your own initiative. + +**Done:** `status=exited exit=0`, and the receipt in `train-stdout.json` shows `cuda: true`, `device: "cuda"`, `name_gate: false`, `e2_pass: false`, `brier: null`, and `n_unfrozen_encoder` > 0. + +**Stop if:** + +- `cuda: false` — it fell back to CPU. `AARON-SPARK-TRAIN.md` §6: no CPU-only named encoder if `sm_121` fails. Return the error, do not accept the run. +- CUDA OOM in stderr. Report it. Do **not** raise `0.03`, and do **not** stop a co-tenant container to make room. Both are for a human to decide. +- `n_unfrozen_encoder` is 0 — the freeze walked the wrong module tree and nothing trained. +- `exit=4` with an `error` field — return it verbatim. +- Any non-zero exit not listed above — return stderr verbatim, do not retry. + +## Slice B4 — E2 after + +```bash +ssh spark bash -s <<'REMOTE' +set -euo pipefail +cd ~/Hyperlex +docker run --name "hlx-$$-$(date +%s)" \ + --user "$(id -u):$(id -g)" -e HOME="$HOME" \ + -v "$HOME/Hyperlex:$HOME/Hyperlex" \ + -v "$HOME/.hyperlex:$HOME/.hyperlex" \ + -v "$HOME/.cache:$HOME/.cache" \ + -w "$HOME/Hyperlex" \ + -e PYTHONPATH=scripts/shadow \ + lmsysorg/sglang:dev-qwen38-27b-dflash2 \ + python -m hyperlexical.eval_unbind --out "$HOME/.hyperlex/hlx-e2-after.json" +REMOTE +``` + +No `--gpus` on this default command. CI stays on the torch-free stub/digest path (`trunk_loaded: false`). That path does not download ModernBERT. + +On Spark after train, B4 **may** use trunk-forward (real local ModernBERT + trained heads, `unbind_exact` vs the 004 `probe_swap_min`). Add `-e HYPERLEX_E2_TRUNK_FORWARD=1 -e HYPERLEX_TRUNK_DIR="$HOME/.hyperlex/models/trunks/ModernBERT-base" -e HYPERLEX_TRAIN_OUT="$HOME/.hyperlex/models/hyperlex-encoder-modernbert-base-seed"` (or the seed-live out dir). Missing torch, trunk `config.json`, or `model.safetensors`/`heads.pt` fails closed. Do not flip `name_gate`. `brier` stays null. + +**Done (CI / stub):** exit 3, `trunk_loaded: false`. Digest-seeded `model_swap` may differ from B2 if heads are on disk; that is not a trunk forward. + +**Done (Spark trunk-forward):** receipt has `trunk_loaded: true` and an honest `e2_pass` (trained metric strictly greater than `probe_swap_min`). Exit 3 if the trained model does not beat the probe. + +## Slice B5 — evidence + +```bash +ssh spark bash -s <<'REMOTE' +set -euo pipefail +cd ~/.hyperlex +sha256sum models/hyperlex-encoder-modernbert-base-seed/* > evidence-sha256.txt +ls -la models/hyperlex-encoder-modernbert-base-seed/ +git -C ~/Hyperlex status --short +docker run --gpus all --name "hlx-$$-$(date +%s)" \ + --user "$(id -u):$(id -g)" -e HOME="$HOME" \ + lmsysorg/sglang:dev-qwen38-27b-dflash2 \ + python -c "import torch;f,t=torch.cuda.mem_get_info();print(round(f/1e9,1),round(t/1e9,1))" +REMOTE +``` + +Measured from a throwaway container, **not** by `docker exec` into the server — the hard-nos forbid touching it. + +Then pull the evidence back. This block runs **on the Mac**, not over ssh — the artifacts are on the Spark and your report is not: + +```bash +mkdir -p ~/hlx-evidence +scp spark:'~/.hyperlex/preflight.json' ~/hlx-evidence/ +scp spark:'~/.hyperlex/hlx-e2-before.json' ~/hlx-evidence/ +scp spark:'~/.hyperlex/hlx-e2-after.json' ~/hlx-evidence/ +scp spark:'~/.hyperlex/models/hyperlex-encoder-modernbert-base-seed/train-receipt.json' ~/hlx-evidence/ +scp spark:'~/.hyperlex/models/hyperlex-encoder-modernbert-base-seed/layout.json' ~/hlx-evidence/ +scp spark:'~/.hyperlex/evidence-sha256.txt' ~/hlx-evidence/ +diff ~/hlx-evidence/hlx-e2-before.json ~/hlx-evidence/hlx-e2-after.json && echo "E2 BYTE-IDENTICAL (expected)" +ls -la ~/hlx-evidence/ +``` + +Weights stay on the Spark. Do **not** copy `model.safetensors` or `heads.pt` to the Mac — `~/.hyperlex/models/` is the Spark dump location and no weight binary travels. + +**Done:** the Spark output dir holds `config.json`, `layout.json`, `train-receipt.json`, `config-train.json`, and one of `model.safetensors` / `heads.pt`. Free memory is back to baseline. Six files are in `~/hlx-evidence/` on the Mac and the `diff` reported identical. + +**On `git status`: a dirty tree here is expected, not a failure.** B3 calls `write_export`, which regenerates the ten tracked files under `specs/007-hyperlexical-model/exports/`. They will appear as modified. The check is that *nothing outside that directory* changed: + +```bash +ssh spark bash -s <<'REMOTE' +set -euo pipefail +cd ~/Hyperlex +echo "--- modified ---"; git status --short +OUTSIDE=$(git status --porcelain | awk '{print $2}' | grep -v '^specs/007-hyperlexical-model/exports/' || true) +if [ -n "$OUTSIDE" ]; then echo "UNEXPECTED changes outside exports/:"; echo "$OUTSIDE"; exit 1; fi +echo "EXPORTS_ONLY_OK" +REMOTE +``` + +**Done:** prints `EXPORTS_ONLY_OK`. + +**Stop if:** anything outside `exports/` is modified. Report the paths — the run touched something it should not have. + +Do **not** commit the regenerated exports, and do **not** `git checkout --` them away. They are the spec owner's artifacts; leave them as they lie and record the `data_sha256` from the receipt instead. + +## Slice C1 — open the PR + +Runs **on the Mac**, not over ssh. `gh` is not installed on the Spark, and `prabu-openclaw` has **pull-only** access to `scrimshawlife-ctrl/Hyperlex` — so this is a fork-PR, not a branch push. + +**Only two files ever go in.** The run's artifacts — weights, receipts, exports — are forbidden in git by `AARON-SPARK-TRAIN.md` §6 and stay on the Spark. Their numbers travel in the PR *body*, never as committed files. + +**C1a — build the PR body** from what B5 pulled back: + +```bash +cd "$HOME/hlx-evidence" +python3 - <<'PY' > pr-body.md +import json, pathlib +d = pathlib.Path(".") +def j(n): + try: return json.loads((d/n).read_text()) + except Exception: return {} +r, pre = j("train-receipt.json"), j("preflight.json") +before, after = (d/"hlx-e2-before.json"), (d/"hlx-e2-after.json") +identical = before.exists() and after.exists() and before.read_bytes() == after.read_bytes() +print("Operator procedure for the 007 seed smoke. Companion to `AARON-SPARK-TRAIN.md`; changes no lock.\n") +print("## What this adds\n") +print("- `SPARK-BRINGUP.md` — human runbook, measured box state") +print("- `HERMES-SPARK-RUN.md` — orchestrator run order, 12 slices\n") +print("## Run evidence\n") +print("| Field | Value |") +print("|---|---|") +for k in ("device","cuda","epochs","n_train_classify","n_train_unbind", + "n_unfrozen_encoder","last_loss","weight_file","name_gate","e2_pass","brier"): + if k in r: print("| `%s` | `%s` |" % (k, r[k])) +if r.get("val"): print("| `val` | `%s` |" % json.dumps(r["val"])) +if pre.get("data_sha256"): print("| `data_sha256` | `%s…` |" % pre["data_sha256"][:16]) +print("| E2 before/after | %s |" % ("byte-identical (expected)" if identical else "DIFFER — investigate")) +print("\n`e2_pass` and `name_gate` are false by design. This is a seed smoke, not a Hyperlexical card.") +print("\nWeights, receipts and exports stay on the Spark under `~/.hyperlex/` and are not in this PR.\n") +print("## Open for the spec owner\n") +print("- `unbind_exact` val is computed over **one** row; the metric can only be 0.0 or 1.0.") +print("- Default `eval_unbind` is stub/digest (`trunk_loaded: false`). Spark B4 may set `HYPERLEX_E2_TRUNK_FORWARD=1` for real unbind_exact. Do not flip `name_gate`.") +print("- `docs/remotes.md` states the org twin is a 404; it is live and public, and `push-org.sh` cannot fast-forward onto it.\n") +print("🤖 Generated with [Claude Code](https://claude.com/claude-code)") +PY +head -5 pr-body.md +``` + +**Done:** `pr-body.md` exists and its first lines render. + +**C1b — stage, with a guard:** + +```bash +REPO="$HOME/Documents/claude/Hyperlex-scrimshaw" +[ -d "$REPO/.git" ] || { echo "STOP: no clone at $REPO"; exit 1; } +cd "$REPO" +git fetch origin && git checkout main && git pull --ff-only origin main +git checkout -b 007-spark-runbooks + +git add specs/007-hyperlexical-model/SPARK-BRINGUP.md \ + specs/007-hyperlexical-model/HERMES-SPARK-RUN.md + +STAGED=$(git diff --cached --name-only | sort) +EXPECT=$(printf '%s\n' \ + specs/007-hyperlexical-model/HERMES-SPARK-RUN.md \ + specs/007-hyperlexical-model/SPARK-BRINGUP.md | sort) +if [ "$STAGED" != "$EXPECT" ]; then + echo "STOP: unexpected staged files:"; echo "$STAGED"; exit 1 +fi +echo "staged (verified):"; echo "$STAGED" +``` + +**Done:** prints exactly the two documentation paths. + +**Stop if:** the guard fires. Something outside the two documents was staged — most likely `exports/`, which A2 should have excluded, or a file under `~/.hyperlex/`. Do not `git add -A`, do not `git add .`, do not force past it. + +**C1c — commit, fork, open the draft PR:** + +```bash +cd "$HOME/Documents/claude/Hyperlex-scrimshaw" +git commit -m "docs(007): Spark bring-up runbook + Hermes run order + +Operator procedure for the 007 seed smoke on the DGX Spark. +Companion to AARON-SPARK-TRAIN.md; changes no lock (C41-C52 stand). + +Co-Authored-By: Claude Opus 5 " + +gh repo fork scrimshawlife-ctrl/Hyperlex --remote=false --clone=false 2>/dev/null || true +git remote get-url fork >/dev/null 2>&1 \ + || git remote add fork "https://github.com/prabu-openclaw/Hyperlex.git" +git push -u fork 007-spark-runbooks + +gh pr create --repo scrimshawlife-ctrl/Hyperlex \ + --base main --head "prabu-openclaw:007-spark-runbooks" --draft \ + --title "docs(007): Spark bring-up runbook + Hermes run order" \ + --body-file "$HOME/hlx-evidence/pr-body.md" +``` + +**Done:** `gh pr create` prints a PR URL, and the PR shows exactly two changed files. + +**Stop if:** `gh` reports no authenticated account, or the fork push is rejected. Return to the human operator. Do not retry with different credentials, and do not push to `origin` — `prabu-openclaw` lacks write access and it will fail. + +The PR opens as a **draft** deliberately: it is created by an automated run, and a human marks it ready. Drop `--draft` only if the operator asks. + + +## Hard no — applies to every slice + +Inherited from `AARON-SPARK-TRAIN.md` §6: No Hub upload. No `hyperlex-structure-149m`. No chat template. No refusal head. No Brier. No `semantic`. No 7B. No Orin. No 006 labels. No wrap rows. No weight binaries in git. No CPU-only named encoder. + +Added for an autonomous executor: + +- **Never stop, restart, remove, `docker exec` into, or reconfigure any container you did not launch in this run** — `qwen38-27b` and `spark-comfyui` above all. They are someone else's live services. +- **No slice stops or removes a container, including its own.** Forge's safety policy blocks container-lifecycle verbs and that is correct. If a container must be cleared, that is a human action — report it and wait. Never work around the policy. +- Never raise the guard fraction above `0.03`. +- Never edit any file under `~/Hyperlex`. Not `loop.py`, not `layout.py`, not `.gitignore`. The repo is read-only to this run; the only writes are the untracked exports A2 excludes. +- Never `git commit`, `git push`, or `gh pr create` **from the Spark clone** (`~/Hyperlex`). It stays pristine. The single exception is Slice C1, which runs on the Mac clone and may commit **only** the two documentation files it names. +- Never commit a weight, a receipt, an export, or anything under `~/.hyperlex/`. Their numbers go in the PR body; the files stay on the Spark. +- Never `git add -A` or `git add .` in C1. Stage the two named paths and let the guard verify. +- Never clone or read from `Zero-State-LLC/Hyperlex`. +- Never install packages on the host. Every step runs in a container off the already-pulled image. +- Never retry past a **Stop if**. Halt the slice, return the error, wait for a human. +- Never present this output as a trained Hyperlexical model. It is a seed smoke that fails E2 by design. + +## Output Hermes must return + +1. Per slice: name, exit code, done-condition met yes/no, and any stop triggered. +2. `preflight.json`, `hlx-e2-before.json`, `hlx-e2-after.json`, `train-receipt.json`, `layout.json`. +3. `data_sha256` from preflight, and whether it matched `0d6a3e34…`. +4. Confirmation that before/after E2 are byte-identical, stated as expected behaviour. +5. The torch note for Danny: version, CUDA, capability, and that it ran under a 3.9 GB cap beside a live SGLang server. +6. Free device memory before the run and after, showing the trainer released everything. +7. The PR URL from C1, and confirmation it shows exactly two changed files. +8. **The `--include-live` divergence, stated plainly.** `AARON-SPARK-TRAIN.md` says to train from the live SoT via `--include-live`. Train now accepts `--include-live` and `HYPERLEX_INCLUDE_LIVE=1` (fail-closed if `~/.hyperlex/hyperlexical/ingest_candidates.jsonl` is missing). This seed smoke still omits the flag unless the spec owner sets it. Report omission as a known, deliberate divergence — not as an oversight, and not as a defect. +8. Anything that stopped a slice, verbatim, with no attempt at a fix. + +Every number you return is OBSERVED or it does not go in. No INFERRED metrics. `brier` stays null. + +--- diff --git a/specs/007-hyperlexical-model/HYPERLEXICAL-PRODUCT-PLAN.md b/specs/007-hyperlexical-model/HYPERLEXICAL-PRODUCT-PLAN.md new file mode 100644 index 00000000..583ee0f4 --- /dev/null +++ b/specs/007-hyperlexical-model/HYPERLEXICAL-PRODUCT-PLAN.md @@ -0,0 +1,131 @@ +# Hyperlexical model product — completion plan + +**Status:** DRAFT (operator review) · **Date:** 2026-09-23 +**Naming:** repo **Hyperlex** = transitional shell. Public products: **Hyperlexical** (this plan) and **ne0l0gist** (ingest). Hermes skill ≠ Hyperlexical. +**Hard locks (unchanged):** `name_gate=false` until Danny yes · no Hub upload · no invented OBSERVED · upsample freeze **11+** · no `SECOND_SLOT=4` · schemes `positional|type_slot` only · Brier `null` on every 007 packet. + +This plan turns Spec 007 from a SHADOW Spark climb into a shippable Hyperlexical product. It does **not** flip `name_gate`. + +--- + +## Current honest state (2026-09-23) + +| Layer | State | +|-------|--------| +| Hermes skill (`SKILL.md`, CLI, `src/hyperlex/`) | **Ready** (v0.4.0; `pyproject.toml` aligned to `VERSION`) | +| Spec 007 shadow train/eval | **Ready enough to climb** — BEST=`seed-morph65`, E2 PASS on trained trunk | +| Force fair | **1.0** n=164 (classic promote wall) | +| soft_ceiling | **ARMED** — at fair 1.0, promote only if live broad OBSERVED **>** PRIOR morph65 (**0.88671875** n=256) + E2 | +| Gold path | morph78 acquire + residual reprobe → **empty gold**; `authorize val-settle` → **CANCELLED_EMPTY_GOLD** | +| Hyperlexical name / Hub / T13 promote into `src/hyperlex/` | **Blocked** | + +Verdict: skill is production-ready as a Hermes skill. The **Hyperlexical model product** is not — name wall, Hub, packaging, and live-gold path still open. + +--- + +## Product definition (what “complete” means) + +Hyperlexical is complete when all of the following are true: + +1. **Train artifact** — pinned BEST checkpoint on Spark with receipts (fair surface + E2 + soft_ceiling decide if armed). +2. **Eval gates** — E2 PASS on the pin; stub FAIL still expected; seed smoke ≠ T1. +3. **Dataset honesty** — OBSERVED only from settled/authorized gold; no invent; force-train / hard-atoms are operator JSONL, not SoT. +4. **Name** — Danny explicit yes flips `name_gate`; card may then be called Hyperlexical (not before). +5. **Publish** — Hub upload is a **named** operator action after name_gate; weights stay out of git until then. +6. **Operator surface** — infer CLI + packet schema + model card shipped; optional later T13 promote into `src/hyperlex/` (separate sentence). + +Until (4), the artifact stays `hyperlex-encoder-*`. + +--- + +## Workstreams + +### A. Climb / gold (Spark · soft_ceiling) + +| Step | Action | Exit | +|------|--------|------| +| A1 | Idle: do **not** re-burn empty settle / empty acquire | HOLD until named phrases | +| A2 | Operator `authorize morph78 …` or `authorize val-settle` **listing phrases**, **or** acquire that clears Jev `force_expand_safe` | Non-empty authorize card | +| A3 | Val-settle → force tip expand → fair baseline on new tip | Fair surface receipt | +| A4 | Train next morph under soft_ceiling; decide via `gate_soft_ceiling_decide.py` | PROMOTE or REJECT_VS_BEST | +| A5 | If PROMOTE: update BEST pin + PRIOR broad for next soft_ceiling compare | New BEST held | + +Constraints: upsample freeze 11+; no SECOND_SLOT=4; Qwen stopped unless re-enabled. + +### B. Engineering hygiene (main / tip) + +| Step | Action | Exit | +|------|--------|------| +| B1 | Restore `apply_unbind_force_train` + tests on tip (#99 CI) | validate green (**done** · merged) | +| B2 | Align `VERSION` ↔ `pyproject.toml` version (0.4.0 vs 1.6.0 skew) | Single source of truth (**done** · 0.4.0) | +| B3 | Drop / quarantine stale probe files; scrub “E2 Spark-blocked” once trained E2 PASS is the pin | Docs match receipts (**done** on hygiene branch) | +| B4 | Keep force-train path env-only; val move ⇒ fair re-baseline | Receipt stats present | + +### C. Product packaging (post–name_gate, separate authorize) + +| Step | Action | Exit | +|------|--------|------| +| C1 | Finalize `model-card.draft.md` / `hf-package/README.md` with pin metrics | Card ready, still no upload | +| C2 | Operator Hub upload sentence | Weights + card on Hub | +| C3 | Optional T13: promote shadow package into `src/hyperlex/` | Separate PR + tests | +| C4 | Flip `name_gate` only on Danny yes | Public Hyperlexical name | + +### D. Adjacent Hyperlex PRs (skill track — not model name) + +| PR | Role | Handle | +|----|------|--------| +| **#100** pytrends evidence | Skill route evidence | **Merged** to main. Independent of Hyperlexical name. | +| **#99** Spec 007 tip docs + climb | Model path | **Merged** to main. | +| **#95** HYPERLEX-Q1 | Epistemic interchange | Stay **draft**; rebase onto current `main`; remains UNQUALIFIED / pairwise BLOCKED. Spec-only. | + +Do **not** merge **#95** without explicit operator yes. + +--- + +## Sequencing (recommended) + +``` +B1 (CI fix) ──► #100 operator check + merge authorize + │ + ├──► A2–A5 climb under soft_ceiling (needs gold) + │ + ├──► B2–B3 hygiene on tip / follow-up PR + │ + └──► #95 rebase only (no qualify claim) + +When climb + packaging ready: + Danny name_gate yes ──► C1–C2 Hub ──► optional C3 T13 +``` + +Climb (A) and skill PR #100 can proceed in parallel. Name/Hub (C) never parallel-jumps ahead of Danny yes. + +--- + +## Explicit non-goals + +- Inventing OBSERVED fillers or empty-gold settles +- Hub upload or `name_gate` flip without Danny +- Warm-clone spam / upsample 11+ / SECOND_SLOT=4 +- Treating Hermes skill readiness as Hyperlexical product readiness +- Calling stub or seed smoke a T1 pass + +--- + +## Definition of done (product) + +- [ ] soft_ceiling path either PROMOTE’s a new BEST or operator closes climb with held morph65 +- [x] Tip CI green; force-train API present; version skew fixed +- [ ] Model card filled from live pin metrics +- [ ] Danny `name_gate` yes (or explicit hold) +- [ ] Hub upload done **or** explicit “no Hub this cycle” +- [x] STATUS / ROADMAP updated to match reality (no stale “E2 Spark-blocked” on operator ROADMAP once trained E2 PASS is the pin) + +--- + +## Pointers + +- Climb next: root `NEXT_MOVES_007.md` +- Name gate / named phrases: `NAME-GATE-AND-NAMED-PHRASES.md` +- Soft_ceiling receipts: `receipts/20260923-authorize-gate-soft-ceiling.md`, `receipts/gate-soft-ceiling-20260923/` +- Empty gold: `receipts/20260923-authorize-val-settle-cancelled-empty-gold.md` +- Gates: `milestones.md`, `spec.md`, `dual-use-gate.md` diff --git a/specs/007-hyperlexical-model/NAME-GATE-AND-NAMED-PHRASES.md b/specs/007-hyperlexical-model/NAME-GATE-AND-NAMED-PHRASES.md new file mode 100644 index 00000000..aaff5539 --- /dev/null +++ b/specs/007-hyperlexical-model/NAME-GATE-AND-NAMED-PHRASES.md @@ -0,0 +1,113 @@ +# Name gate + named phrases — operator plan + +**Status:** DRAFT (does **not** flip `name_gate`) · **Date:** 2026-09-24 +**Locks:** `name_gate=false` · no Hub · no invented OBSERVED · upsample freeze **11+** · no `SECOND_SLOT=4` · soft_ceiling **ARMED** + +Companion to `HYPERLEXICAL-PRODUCT-PLAN.md` workstreams A (climb/gold) and C (post–name_gate packaging). + +### Operator name (ingest) — 2026-09-24 + +Danny: **`name neologist as in repo`**. Public ingest product = **`ne0l0gist`** (repo spelling with zeros). Receipt: `receipts/20260924-name-ne0l0gist-as-in-repo.md`. This does **not** flip Hyperlexical `name_gate`. + +--- + +## Two walls (do not conflate) + +| Wall | What it gates | Current state | +|------|----------------|---------------| +| **Dataset name-gate buckets** (`milestones.md`) | Settled gold floors before *planning* a T1 name | Gaps **0 / 0 / 0** on operator `--include-live` (classify ≥2k / unbind ≥200 / negatives ≥200) | +| **`name_gate` flag** | Public **Hyperlexical** name + Hub/T13 packaging | **false** — Danny explicit yes required. Trained E2 PASS on Spark does **not** flip this. Ingest **`ne0l0gist`** is already named (separate product). | + +Volume readiness ≠ name. Seed smoke ≠ T1. Stub E2 FAIL remains expected. + +--- + +## Named phrases (gold authorize) + +Empty `authorize_card_phrases` → Jev **`cancel_empty_gold`**. Do not invent OBSERVED to fill a card. + +### Last non-empty HOLD card (morph77 · already settled) + +Receipt: `receipts/20260923-morph77-val-acquire-label-hold.md` · card `receipts/morph77-val-acquire-label-hold-20260923/HOLD_AUTHORIZE_CARD.json`. + +| # | phrase | lineage (card) | +|--:|--------|----------------| +| 1 | `we're so back` | brainrot-aura | +| 2 | `clutch up` | gaming-meta | +| 3 | `bet that up` | kinship-address | +| 4 | `real talk` | kinship-address | + +`authorize val-settle` on morph77 **kept** these as OBSERVED `split=val` and grew force/hard **224→232 / 265→273**. Train was **CANCELLED_FAIR_CEILING** (fair stayed 1.0 n=164). See `receipts/20260923-morph77-val-settle-cancelled-fair-ceiling.md`. + +**Do not re-authorize / re-settle these four** — they are already OBSERVED. Re-listing them as “new gold” would be inventing progress. + +### Empty cards (why morph78 settle cancelled) + +| card | `authorize_card_phrases` | +|------|--------------------------| +| morph78 fresh acquire | `[]` | +| morph65 live broad residual reprobe | `[]` | + +Operator bare `authorize val-settle` → **CANCELLED_EMPTY_GOLD** (`receipts/20260923-authorize-val-settle-cancelled-empty-gold.md`). Force tip remains morph77 **232/273**. Live broad prior **0.88671875** n=256. + +### Authorize sentence shapes (required) + +One of: + +1. **Named phrases on a live empty card** — operator lists exact norms from that card’s acquire/qualify pool (not from memory, not morph77’s already-settled four unless the new card independently contains them as unsettled AUTHORIZE): + - `authorize val-settle: , , …` + - `authorize morph78: , , …` +2. **New acquire** that clears Jev `force_expand_safe` with a non-empty `authorize_card_phrases` after `card_high_conf_new` (or equivalent), then explicit authorize listing those phrases. +3. **Climb without new force-only gold** — under soft_ceiling, fair = 1.0 path is **broad OBSERVED > PRIOR** live + E2 (`gate_soft_ceiling_decide.py`), not another force-only morph at n=164. + +Still forbidden: empty settle, invented OBSERVED, UPSAMPLE 11+, `SECOND_SLOT=4`. + +--- + +## `name_gate` flip plan (Danny only) + +This section is a checklist. **No agent flips the flag.** + +### Preconditions (all must already be true or explicitly waved) + +- [x] Dataset bucket gaps 0/0/0 on the harvest surface (met 2026-09-10) +- [x] Trained trunk-forward E2 PASS on pinned BEST (`seed-morph65`) +- [x] Soft_ceiling rule armed and documented; climb either PROMOTE’s a new BEST or operator closes on held morph65 +- [ ] Operator product review of `HYPERLEXICAL-PRODUCT-PLAN.md` +- [x] Hygiene B2–B3 landed (`VERSION` ↔ `pyproject.toml`; stale “E2 Spark-blocked” scrubbed from operator ROADMAP/STATUS copies) +- [ ] Danny sentence that explicitly says **`name_gate` yes** (or “name Hyperlexical”) + +### On Danny yes (separate PRs / sentences) + +1. Set `name_gate` true in the locked operator surfaces only (STATUS / milestones note / dual-use gate as required by engineering.md) — not by silent agent edit. +2. Allow card rename path: `hyperlex-encoder-*` → Hyperlexical naming per `model-card.draft.md`. +3. Hub upload = **named** operator action (C2). Weights stay out of git until then. +4. Optional T13 promote of `scripts/shadow/hyperlexical/` into `src/hyperlex/` = separate authorize + tests. + +### Explicit non-goals + +- Flipping `name_gate` because E2 PASS, volume, or soft_ceiling ARMED +- Treating morph77’s four settled phrases as a name_gate unlock +- Hub / T13 without Danny + +--- + +## Sequencing + +``` +Hygiene (this branch) ──► operator review product plan + │ + ├──► named-phrase authorize OR new force_expand_safe acquire ──► soft_ceiling decide + │ + └──► Danny name_gate yes (only when ready) ──► card / Hub / optional T13 +``` + +--- + +## Pointers + +- Product plan: `HYPERLEXICAL-PRODUCT-PLAN.md` +- Climb next: root `NEXT_MOVES_007.md` · this pack `NEXT_MOVES_007.md` +- morph77 card: `receipts/morph77-val-acquire-label-hold-20260923/` +- Empty morph78: `receipts/20260923-morph78-fresh-acquire-hold-empty.md` +- Soft ceiling: `receipts/20260923-authorize-gate-soft-ceiling.md` diff --git a/specs/007-hyperlexical-model/NEXT_MOVES_007.md b/specs/007-hyperlexical-model/NEXT_MOVES_007.md new file mode 100644 index 00000000..d24a363b --- /dev/null +++ b/specs/007-hyperlexical-model/NEXT_MOVES_007.md @@ -0,0 +1,16 @@ +# Spec 007 — next: soft_ceiling armed · #101 on main + +`name_gate=false`. BEST=**morph65** (held). + +Mirror of root `NEXT_MOVES_007.md`. + +## Done + +- **#101** merged to main (hygiene + ne0l0gist naming lock) +- **#95** stays draft/UNQUALIFIED + +## Next + +1. Named-phrase authorize or new `force_expand_safe` acquire +2. Optional `push-org` only with explicit authorize +3. No empty settles · no `name_gate` flip diff --git a/specs/007-hyperlexical-model/SPARK-BRINGUP.md b/specs/007-hyperlexical-model/SPARK-BRINGUP.md new file mode 100644 index 00000000..98d1db31 --- /dev/null +++ b/specs/007-hyperlexical-model/SPARK-BRINGUP.md @@ -0,0 +1,314 @@ +# Spark bring-up 007 — operator procedure + +Companion to `AARON-SPARK-TRAIN.md`. That file is the **spec** (Danny owns it). This file is **procedure**: how the box gets from bare to able to run the smoke. It changes no lock. C41–C52 stand as written. + +Measured on `spark-bf46.local`, 2026-09-09. + +## 0. Box state as found + +| Fact | Value | +|------|-------| +| Host | `spark-bf46.local` (the `192.168.12.202` in operator ssh config is stale — no route) | +| SoC / cap | GB10, `sm_121` (12, 1) — matches `hardware.md` | +| OS | Ubuntu 24.04.4, aarch64, python 3.12.3 | +| Device memory | 130.7 GB total, **5.2 GB free** | +| Host RAM | 121 GB total, ~10 GB available | +| Disk | 3.3 T free on `/` | +| Resident | `qwen38-27b` (SGLang, DFLASH spec-decode, ctx 262144, :30000) + `spark-comfyui` (:8188) | +| Host train stack | **none** — no torch, no transformers, no venv, no `~/.hyperlex/`, no repo | + +The Spark is not a clean box. It is a serving box with ~5 GB of headroom. Everything below is shaped by that. + +## 1. Decision — do not evict Qwen + +SGLang launched with no `--mem-fraction-static`, so it **preallocated** its KV pool at startup. Its footprint is fixed, not growing. The 5.2 GB free is stable for the duration of a run. + +The smoke needs far less than that: + +| Term | Value | +|------|-------| +| Trunk | ModernBERT-base, 149M | +| Trainable | last 2 of 22 layers + 3 heads ≈ 15–20M params | +| Optimizer | AdamW state on trainable only ≈ 160 MB | +| Shape | `MAX_LEN = 64`, batch 8 (`layout.py`) | +| Realistic peak | ~2–2.5 GB incl. CUDA context | + +So: **Qwen stays up. ComfyUI stays up.** The job is not to free memory, it is to make the trainer structurally incapable of taking the server down. See §5. + +## 2. Decision — do not build a host torch + +The box already holds a torch proven on this silicon, inside the SGLang image: + +``` +torch 2.13.0+cu130 · transformers 5.12.1 · huggingface_hub 1.28.0 · capability (12, 1) +``` + +Installing a second aarch64 / CUDA-13 stack on the host is a multi-GB download to reproduce what is already pulled. Instead, run a **sibling container from the same image**, mounting the repo. Zero download, known-good `sm_121`. + +`transformers 5.12.1` is a major ahead of what `loop.py` was written against. `AutoModel.from_pretrained` and `out.last_hidden_state` are stable across that boundary, but this is asserted, not proven — S3 proves it before S5 spends an epoch. + +--- + +## S0 — reach the box + +```bash +ssh spark 'uname -m && python3 -V' +``` + +**Done:** prints `aarch64` and `3.12.x`. + +If it hangs, the stale IP is the cause. Fix operator-side: + +```bash +sed -i '' 's/HostName 192.168.12.202/HostName spark-bf46.local/' ~/.ssh/config +``` + +## S1 — grab the repo + +Personal is source of truth (`docs/remotes.md`). Clone that, nothing else: + +```bash +ssh spark +git clone https://github.com/scrimshawlife-ctrl/Hyperlex.git ~/Hyperlex +cd ~/Hyperlex && git checkout main && git pull --ff-only origin main +``` + +**Done:** `~/Hyperlex/specs/007-hyperlexical-model/AARON-SPARK-TRAIN.md` exists. + +Do **not** use the `007-hyperlexical-model` branch. Spec says main. + +**Do not clone `Zero-State-LLC/Hyperlex` for this.** `docs/remotes.md` calls it a 404; as of 2026-09-09 21:xx PT it is **live and public**, so the wrong URL now clones successfully instead of failing loudly. It carries no `specs/007-*` and no `scripts/shadow/` — the training code is simply absent. A clone from there fails at `PYTHONPATH=scripts/shadow` with a confusing import error, not an obvious "wrong repo". Check before you run: + +```bash +git -C ~/Hyperlex remote get-url origin # must be scrimshawlife-ctrl +ls ~/Hyperlex/scripts/shadow/hyperlexical/loop.py +``` + +## S2 — keep the exporter out of git + +`export_dataset` writes into `specs/007-hyperlexical-model/exports/`. That path is **not gitignored and not tracked** — the run will dirty `git status`, and the spec says do not commit artifacts. Close it before the first run: + +```bash +cd ~/Hyperlex +printf 'specs/007-hyperlexical-model/exports/\n' >> .git/info/exclude +``` + +`.git/info/exclude` rather than `.gitignore` — local-only, no repo diff, no PR for Danny to review. + +**Done:** `git status --short` is clean after S3. + +## S3 — grab the trunk (the only real download) + +The spec asserts a local trunk but never says how it arrives. It does not arrive on its own. One-time, online, ~600 MB: + +```bash +mkdir -p ~/.hyperlex/models/trunks + +docker run --rm \ + --user "$(id -u):$(id -g)" \ + -e HOME="$HOME" \ + -v "$HOME/.hyperlex:$HOME/.hyperlex" \ + lmsysorg/sglang:dev-qwen38-27b-dflash2 \ + hf download answerdotai/ModernBERT-base \ + --local-dir "$HOME/.hyperlex/models/trunks/ModernBERT-base" +``` + +No `--gpus` on this one. It is a download, it touches no device memory, it cannot disturb Qwen. + +**Done:** + +```bash +ls ~/.hyperlex/models/trunks/ModernBERT-base/config.json +``` + +Then prove the stack loads it before spending an epoch: + +```bash +docker run --rm --gpus all \ + --user "$(id -u):$(id -g)" -e HOME="$HOME" \ + -v "$HOME/.hyperlex:$HOME/.hyperlex" \ + lmsysorg/sglang:dev-qwen38-27b-dflash2 \ + python -c " +from transformers import AutoModel, AutoTokenizer +d='$HOME/.hyperlex/models/trunks/ModernBERT-base' +t=AutoTokenizer.from_pretrained(d, local_files_only=True) +m=AutoModel.from_pretrained(d, local_files_only=True) +print('hidden', m.config.hidden_size, 'layers', m.config.num_hidden_layers) +print('offsets', 'offset_mapping' in t('rizz', return_offsets_mapping=True)) +" +``` + +**Done:** `hidden 768 layers 22` and `offsets True`. + +If hidden ≠ 768 the loop raises by design. If `offset_mapping` is absent the C47 aligner is dead and unbind is meaningless — stop, ping Danny. + +## S4 — memory guard + +`set_per_process_memory_fraction` is a Python call, not an env var, and `loop.py` must not be edited. So the cap goes in a launcher that lives **outside** the repo: + +```bash +mkdir -p ~/hlx +cat > ~/hlx/guard.py <<'PY' +import sys, runpy, torch +frac = float(sys.argv[1]) +mod = sys.argv[2] +torch.cuda.set_per_process_memory_fraction(frac) +free, total = torch.cuda.mem_get_info() +print(f"[guard] cap={frac*total/1e9:.1f}GB free={free/1e9:.1f}GB total={total/1e9:.1f}GB", flush=True) +sys.argv = [mod] + sys.argv[3:] +runpy.run_module(mod, run_name="__main__") +PY +``` + +`0.03 × 130.7 GB ≈ 3.9 GB` — above the ~2.5 GB the smoke needs, ~1.3 GB below the 5.2 GB free. If the estimate is wrong, **the trainer OOMs and dies. The server does not.** That is the whole point of the cap. + +**Done:** `~/hlx/guard.py` exists. It is deliberately not in the repo. + +## S5 — preflight, then run + +Preflight and export need no GPU: + +```bash +cd ~/Hyperlex +docker run --rm \ + --user "$(id -u):$(id -g)" -e HOME="$HOME" \ + -v "$HOME/Hyperlex:$HOME/Hyperlex" -v "$HOME/.hyperlex:$HOME/.hyperlex" \ + -w "$HOME/Hyperlex" \ + -e PYTHONPATH=scripts/shadow \ + -e HYPERLEX_ALLOW_TRAIN=1 \ + -e HYPERLEX_TRUNK_DIR="$HOME/.hyperlex/models/trunks/ModernBERT-base" \ + lmsysorg/sglang:dev-qwen38-27b-dflash2 \ + python -m hyperlexical.preflight +``` + +**Done:** exit 0, `ready_to_train: true`, `machine: aarch64`, `name_gate: false`. Save the JSON — Danny wants it. + +Then E2 before. Spec says **expect exit 3**: + +```bash +# ... same flags ... + python -m hyperlexical.eval_unbind --out "$HOME/.hyperlex/hlx-e2-before.json" +``` + +**Done:** exit 3. If it exits 0 on the stub, stop and ping Danny — that is the spec's tripwire. + +Now the run. This is the only step that takes device memory: + +```bash +cd ~/Hyperlex +docker run --rm --gpus all --name hlx-train \ + --user "$(id -u):$(id -g)" -e HOME="$HOME" \ + -v "$HOME/Hyperlex:$HOME/Hyperlex" \ + -v "$HOME/.hyperlex:$HOME/.hyperlex" \ + -v "$HOME/hlx:$HOME/hlx" \ + -w "$HOME/Hyperlex" \ + -e PYTHONPATH=scripts/shadow \ + -e HYPERLEX_ALLOW_TRAIN=1 \ + -e HYPERLEX_OFFLINE=1 \ + -e HF_HUB_OFFLINE=1 \ + -e TOKENIZERS_PARALLELISM=false \ + -e PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True \ + -e HYPERLEX_TRUNK_DIR="$HOME/.hyperlex/models/trunks/ModernBERT-base" \ + -e HYPERLEX_TRAIN_OUT="$HOME/.hyperlex/models/hyperlex-encoder-modernbert-base-seed" \ + -e HYPERLEX_TRAIN_EPOCHS=2 \ + -e HYPERLEX_TRAIN_BATCH=8 \ + -e HYPERLEX_TRAIN_LR=2e-5 \ + lmsysorg/sglang:dev-qwen38-27b-dflash2 \ + python "$HOME/hlx/guard.py" 0.03 hyperlexical.train --offline --run +``` + +Data it will train on (verified against this commit, `data_sha256` starts `0d6a3e34`): + +| Task | train | val | +|------|-------|-----| +| classify | 110 | 13 | +| unbind | 39 | **1** | + +**Done:** receipt JSON on stdout with `cuda: true`, `device: cuda`, `name_gate: false`, `e2_pass: false`, `brier: null`. + +`cuda: false` means the guard fell back to CPU. Spec §6: do not accept a CPU-only named encoder — stop and return the error. + +## S6 — E2 after, and hand back + +```bash +# ... same non-GPU flags as preflight ... + python -m hyperlexical.eval_unbind --out "$HOME/.hyperlex/hlx-e2-after.json" +``` + +Pull the evidence to the operator box: + +```bash +scp spark:'~/.hyperlex/hlx-e2-*.json' . +scp spark:'~/.hyperlex/models/hyperlex-encoder-modernbert-base-seed/{train-receipt.json,layout.json}' . +``` + +Send Danny: preflight JSON, data sha256, e2 before/after, `train-receipt.json`, `layout.json`, and the torch/`sm_121` note (`2.13.0+cu130`, cap `(12,1)`, ran under a 3.9 GB cap alongside a live SGLang server). + +--- + +## 3. What persists, what does not + +Asked directly: **yes, everything the run loaded leaves memory when it exits.** + +| Thing | After the run | +|-------|---------------| +| Trainer device memory (~2.5 GB) | Released. Process exit destroys the CUDA context; the allocator returns every byte. | +| Trainer host RSS | Released on exit. | +| The container | Gone — `--rm`. | +| SGLang / Qwen pool | **Never touched.** Preallocated before the run, still held after. Same for ComfyUI. | +| Trunk, ~600 MB | Stays on disk at `~/.hyperlex/models/trunks/`. Disk, not memory. Keep it — S3 is once, not per run. | +| `heads.pt`, receipts, `layout.json` | Stay on disk under `~/.hyperlex/models/…seed/`. Small. | +| Repo exports | Stay in the working tree, excluded from git by S2. | + +Nothing to unload by hand. No `docker stop`, no restart. The box returns to exactly its current state, plus files on a 3.3 T disk. + +Verify with the same call used to measure the baseline: + +```bash +ssh spark 'docker run --rm --gpus all --user \"$(id -u):$(id -g)\" -e HOME=\"$HOME\" lmsysorg/sglang:dev-qwen38-27b-dflash2 python -c \"import torch;f,t=torch.cuda.mem_get_info();print(round(f/1e9,1),round(t/1e9,1))\"' +``` + +**Done:** free returns to ~5.2 / 130.7. + +## 4. Hard no — inherited, unchanged + +No Hub upload. No `hyperlex-structure-149m`. No chat template. No refusal head. No Brier. No `semantic`. No 7B. No Orin. No 006 labels. No wrap rows. No weight binaries in git. No CPU-only named encoder if `sm_121` fails — stop and return the error. + +Added by this procedure: + +- The resident Qwen3.8-27B is **not** a trunk (C16 holds it) and **not** a source of E2 gold (C20, Wu/Sun misalignment). It is a co-tenant on the box and nothing more. It does not enter 007 by being nearby. +- Do not run the trainer without the guard. An uncapped job on 5.2 GB of headroom can OOM a server Danny is using. + +## 5. Open for Danny + +1. **`unbind_exact` val n=1.** C48 requires per-epoch val unbind exact. The split yields a single val unbind row, so the metric is 0.0 or 1.0 — noise, not a measurement. The receipt will look like a metric and is not one. Either accept it as decorative for the seed or re-split before reading it. +2. **`transformers 5.12.1`.** S3 proves load; nothing proves the whole loop across the 4.x→5.x boundary until S5 runs. +3. **SGLang API key in plaintext** in `docker inspect` output — readable by anyone with box access. Unrelated to 007, worth rotating. +4. **`docs/remotes.md` premise is wrong, and `push-org.sh` is a force-push trap.** See below — this is the one that can lose work. + +## 6. Remotes contract — measured 2026-09-09, after PR #25 + +`docs/remotes.md` states the org twin is "not created or not visible (API 404)". Measured: + +| Fact | Value | +|------|-------| +| `Zero-State-LLC/Hyperlex` | **exists**, created 2026-08-07, last push 2026-09-05 | +| Visibility | **public** (the 404 was a private-repo 404 for an unauthorised token; it has since been flipped) | +| Common ancestor with personal | `3e66637` (PR #4) — shared history, genuinely diverged | +| Unique to **org** main | **21 commits** | +| Unique to **personal** main | **65 commits** | +| Org `specs/007-*`, `scripts/shadow/` | absent | +| Personal `LICENSE` | MIT | +| Org `LICENSE` | Zero State Proprietary v1.0 | + +The doc's *conclusion* holds — personal is SoT, do not train from an org clone. Two things under it do not: + +**1. `./scripts/push-org.sh` cannot succeed as written.** It runs a bare `git push org main`. Org main holds 21 commits personal does not, so the push is rejected non-fast-forward. That failure is correct and safe. The hazard is what it invites next: `--force` from that state discards all 21, which include the **P1 fail-closed security fix (#11)**, the **proprietary license adoption (#1)**, the CodeQL baseline, and the org SDLC pack. Several exist nowhere else. The script should refuse a non-fast-forward explicitly rather than let the operator reach for `--force`: + +```bash +git push org main # add nothing. if rejected, reconcile — never --force +``` + +**2. Licence divergence is live and public.** The same lineage is MIT on a public personal repo and Zero State Proprietary v1.0 on a public org repo. Whichever is intended, both are currently readable by anyone. That is a call for Danny and org admin, not for this runbook — flagged, not touched. + +Nothing in this bring-up depends on the resolution. S1 pins the personal URL and verifies `scripts/shadow/` before any run. diff --git a/specs/007-hyperlexical-model/engineering.md b/specs/007-hyperlexical-model/engineering.md new file mode 100644 index 00000000..71bbe7ca --- /dev/null +++ b/specs/007-hyperlexical-model/engineering.md @@ -0,0 +1,46 @@ +# Engineering guidelines 007 (A5) + +**Status**: SHADOW +**Notion**: https://app.notion.com/p/3d73e8ba2f5c813db326e3f68ac77ee9 +**Milestones**: `milestones.md` · https://app.notion.com/p/3d73e8ba2f5c81e9aac1e7dc992e3481 +**Hub**: https://app.notion.com/p/3d73e8ba2f5c81ad89d7c2df8e931a83 + +Detector over generator. Dual-use wall copied from 001/003/007. + +## Classify (R2) + +- One atom per row. Do not blend multi-term bags into one gold label. +- Family label only when the atom is slangish or multiword under the weak mapper rules. Polysemy denylist holds. +- `skill issue` and other collision-holds stay `none` until operator review. +- Negatives are a bucket, not failed classify. Do not stuff them into family counts. +- Provenance: INFERRED until settle. OBSERVED is a settle verb, not an export flag. +- Civilian dual-scheme unbind only. No gloss invent. +- Restricted spans: drop the row. Do not write a wrap, paraphrase, or generate-path label. + +## Files + +- Gold / harvest receipts: local store (`~/.hyperlex/`), not git. +- Git gets schemas, exporters, tests, hashed civilian **seed** only. The 883-row tracked JSONL is not the train SoT. +- `~/.hyperlex/hyperlexical/ingest_candidates.jsonl` is the local SoT (4333 rows as of 2026-09-10 PT evening). Do not commit it. +- Spark / T1 train uses that local SoT via `export --include-live`, not the tracked seed alone. + +## Code + +- Home until T13: `scripts/shadow/hyperlexical/` +- Packet: `brier` null, `forecast_eligible` false, `routes_claimed` ⊆ `{form, lexical}`, never `semantic`. +- No chat template. Stub never returns a refusal string. +- CI: stub embeddings only. No Hub download. No Spark in GitHub Actions. +- Trunk freeze is `trunk.md`. No silent swap. + +## Merge + +- Honesty PRs may lower counts. That is a pass, not a regression. +- Do not merge a PR that sets `name_gate` true. +- Do not merge mock analyze as gold. +- 008 stays a sibling. No sacred-object implement from a 007 classify branch. + +## Spark / T1 train (later sentence) + +- Box: DGX Spark per `hardware.md`. +- Train only after name-gate true on `milestones.md`. +- E2 vs 004 probe is the T1 *artifact* name gate, separate from the dataset name-gate. diff --git a/specs/007-hyperlexical-model/milestones.md b/specs/007-hyperlexical-model/milestones.md new file mode 100644 index 00000000..b1542863 --- /dev/null +++ b/specs/007-hyperlexical-model/milestones.md @@ -0,0 +1,61 @@ +# Milestones 007 (A5) + +**Status**: SHADOW / advisory +**Notion**: https://app.notion.com/p/3d73e8ba2f5c81e9aac1e7dc992e3481 +**Guidelines**: `engineering.md` · https://app.notion.com/p/3d73e8ba2f5c813db326e3f68ac77ee9 +**Hub**: https://app.notion.com/p/3d73e8ba2f5c81ad89d7c2df8e931a83 +**Locked spec**: `spec.md` — this file does not fork T0/T1/T2 + +Live classify counts stay on Notion Tasks 007 / Operator Hub and the local store. +A harvest number moving does not rewrite a gate here. + +Operator note **2026-09-10 PT evening** (Danny-locked): local SoT **4333** (402 OBSERVED / 3931 INFERRED); `--include-live` classify **2437** / unbind **1345** / negatives **208**; name_gate gaps **0/0/0**. Danny ~2500 candidate bar: **met**. Hermes 913 / “gap to 2500” is **superseded**. Dataset buckets met; `name_gate` stays **false** until Danny yes (trained E2 PASS on Spark does not flip). Tracked `exports/civilian.v0.1.jsonl` is a seed, not the SoT. + +## Name-gate (dataset wall before T1 train) + +Operator-settled gold only. + +| Bucket | n | +|--------|--:| +| classify family | 2000 | +| unbind | 200 | +| negatives | 200 | + +- OBSERVED only after settle. Harvest / tap / weak-tag mapper stay INFERRED. +- Dataset buckets above are the floor to *plan* a T1 name. The public `name_gate` flag stays false until Danny yes (E2 PASS alone does not flip). +- Weak harvest inflation is not progress against 2k. + +Minimum to *plan* implement remains 200 / 40 / 50 (`spec.md` dataset contract). +Minimum to *name* a T1 card is this table. + +## Model tiers (locked spec) + +| Tier | Meaning | Name allowed | +|------|---------|--------------| +| T0 | 22–40M encoder baseline | `hyperlex-encoder-*` — not Hyperlexical | +| T1 | 60–150M + unbind heads; E2 beats Spec 004 probe; A1 ceiling 150M; A2 trunk `answerdotai/ModernBERT-base` | first artifact that may be called Hyperlexical | +| T2 | generative LoRA | out of this implement cycle | + +## Implement units (plan) + +| Unit | Scope | +|------|--------| +| U1 | schema + stub; no `src/hyperlex`; no ModernBERT download | +| U2 | civilian export; no ledger copy into git | +| U3 | recipe + eval on Spark; weights out of git | + +## R2 classify → T1 + +Operator sentence on 2026-09-10: classify round 2 training set. + +Exit R2 when: + +1. Family-labeled classify rows are settled toward 2k. +2. Unbind 200 and negatives 200 are settled as their own buckets. +3. Collision holds (`skill issue` and other WEAK_HOLD) reviewed, not auto-promoted. +4. Dual-use wall intact: no restricted how-to, no wrap/generate labels in gold. +5. Separate sentence: Spark T1 train. Not this file. + +## Does not + +Train. Hub upload. Open 006. Call a T0 stub Hyperlexical. Promote tap JSONL to OBSERVED. Implement 008. diff --git a/specs/007-hyperlexical-model/receipts/20260923-authorize-gate-soft-ceiling.md b/specs/007-hyperlexical-model/receipts/20260923-authorize-gate-soft-ceiling.md new file mode 100644 index 00000000..c4e848ef --- /dev/null +++ b/specs/007-hyperlexical-model/receipts/20260923-authorize-gate-soft-ceiling.md @@ -0,0 +1,37 @@ +# Authorize gate soft_ceiling — ARMED (2026-09-23) + +`name_gate=false`. BEST=**morph65** (held). + +## Authority + +Operator: **`authorize gate soft_ceiling`**. + +Implements `soft_ceiling_tiebreak` from `20260923-gate-change-recommendation.md` (Jev pairwise prefer 0.80). + +## Pin + +| surface | exact | n | +|--|--:|--:| +| force-fair morph65 | **1.0** | 164 | +| broad OBSERVED authorize pin (historical) | **0.889763779527559** | 254 | +| broad OBSERVED live prior post-morph77 settle | **0.88671875** | 256 | + +Durable pin: `gate-soft-ceiling-20260923/GATE_SOFT_CEILING.json`. + +Live ceiling escape compares candidate vs **fresh PRIOR morph65** broad eval on current SoT (same n). Authorize pin is fallback only. + +## Promote rules (armed) + +1. **force-fair < 1.0:** candidate best **>** force-fair + same n + E2 1.0 (unchanged). +2. **force-fair = 1.0:** candidate **broad OBSERVED** (no force) **>** PRIOR morph65 broad on same live surface + E2 1.0. Do **not** cancel solely because force-fair is already 1.0. + +## Spark wire + +- `~/hlx/GATE_SOFT_CEILING.json` +- `~/hlx/eval_broad_observed.py` — score any model on broad OBSERVED val +- `~/hlx/gate_soft_ceiling_decide.py` — shared promote decision +- `~/hlx/finish_soft_ceiling.py` — finish template for morphs under this gate + +## Next morph + +Gold force card from morph65 residual AUTHORIZE is **empty** (Jev defer_quality=8). Under soft_ceiling: **fresh acquire + METHOD morph43** aimed at broad OBSERVED residuals → settle → morph78 warm morph65. Not force-only ceiling burns. Upsample freeze 11+. No SECOND_SLOT=4. diff --git a/specs/007-hyperlexical-model/receipts/20260923-authorize-val-settle-cancelled-empty-gold.md b/specs/007-hyperlexical-model/receipts/20260923-authorize-val-settle-cancelled-empty-gold.md new file mode 100644 index 00000000..be46b54e --- /dev/null +++ b/specs/007-hyperlexical-model/receipts/20260923-authorize-val-settle-cancelled-empty-gold.md @@ -0,0 +1,32 @@ +# authorize val-settle — CANCELLED_EMPTY_GOLD (2026-09-23) + +`name_gate=false`. BEST=**morph65**. Gate **soft_ceiling ARMED**. + +## Authority + +Operator: **`authorize val-settle`**. + +## Why cancelled + +Current HOLD cards have **empty** `authorize_card_phrases`: + +| card | phrases | +|--|--| +| morph78 fresh acquire | `[]` | +| morph65 live broad residual reprobe | `[]` | + +Jev: **cancel_empty_gold** 0.96 (no invent OBSERVED; no override of deferred METHOD AUTHORIZE without named phrases). + +## Not done + +- SoT settle +- force/hard expand +- morph78 train + +Force tip remains morph77 **232/273**. Live broad prior **0.88671875** n=256. + +## Next + +Still need **named phrases** on authorize (or a new acquire that clears Jev `force_expand_safe`), then `authorize val-settle` / `authorize morph78`. Soft_ceiling stays armed. + +Artifacts: `receipts/morph78-authorize-val-settle-empty-20260923/`. diff --git a/specs/007-hyperlexical-model/receipts/20260923-morph65-broad-reprobe-hold-empty.md b/specs/007-hyperlexical-model/receipts/20260923-morph65-broad-reprobe-hold-empty.md new file mode 100644 index 00000000..e9e8a391 --- /dev/null +++ b/specs/007-hyperlexical-model/receipts/20260923-morph65-broad-reprobe-hold-empty.md @@ -0,0 +1,37 @@ +# morph65 live broad residual reprobe — HOLD empty (2026-09-23) + +`name_gate=false`. BEST=**morph65**. Gate **soft_ceiling ARMED**. + +## Authority + +Operator **continue**. Jev meta: **broad_residual_reprobe** (0.33 over land_hold_idle). + +## Live surface + +| metric | value | +|--|--:| +| broad OBSERVED exact | **0.88671875** | +| n | **256** | +| residuals | **29** | +| METHOD AUTHORIZE / ABSTAIN | **20 / 9** | + +Matches soft_ceiling live prior pincheck. Prior authorize pin was 0.890 n=254. + +## Jev qualify + +| step | result | +|--|--| +| qualify (19 unique AUTHORIZE) | **defer_quality=18** · already_variant=1 · **force_expand_safe=0** | +| next | **land_hold_empty** 0.86 | + +`highkey shawty` tagged already_variant (morph76 settled). Prior defer wall + idiom-like NEW residuals all deferred. + +## Effect + +Gold card still **empty**. No settle / force / train. + +## Next + +Await **`authorize morph78`** / **`authorize val-settle`** with **named phrases**, or a new acquire direction. Soft_ceiling remains armed. + +Artifacts: `receipts/morph65-broad-reprobe-soft-ceiling-20260923/`. diff --git a/specs/007-hyperlexical-model/receipts/20260923-morph77-val-acquire-label-hold.md b/specs/007-hyperlexical-model/receipts/20260923-morph77-val-acquire-label-hold.md new file mode 100644 index 00000000..8de84046 --- /dev/null +++ b/specs/007-hyperlexical-model/receipts/20260923-morph77-val-acquire-label-hold.md @@ -0,0 +1,34 @@ +# morph77 val-split acquire + METHOD morph43 — HOLD (2026-09-23) + +`name_gate=false`. BEST=**morph65**. + +## Why + +morph76 CANCELLED_FAIR_CEILING (train-split atoms; fair stayed 1.0 n=164). Jev: **val_acquire_label_hold** — acquire+label only; await explicit authorize before settle/train. + +## Acquire + +| | | +|--|--:| +| candidates (unique) | 30 | +| all `split=val` | **yes** | +| already OBSERVED | 7 | +| NEW | 23 | +| METHOD AUTHORIZE | 30 | + +## Jev qualify + +force_expand_safe=13 (10 NEW). Card choice **card_high_conf_new** (conf≥0.40 NEW): + +1. `we're so back` +2. `clutch up` +3. `bet that up` +4. `real talk` + +## Next + +**HOLD.** Explicit authorize (`authorize morph77` / `authorize val-settle`) → settle these 4 as OBSERVED with **split=val** → force/hard expand → re-fair (expect fair n > 164) → morph77 warm morph65. + +Do not auto-settle. No UPSAMPLE 11+. No SECOND_SLOT=4. + +Artifacts: `receipts/morph77-val-acquire-label-hold-20260923/`. diff --git a/specs/007-hyperlexical-model/receipts/20260923-morph77-val-settle-cancelled-fair-ceiling.md b/specs/007-hyperlexical-model/receipts/20260923-morph77-val-settle-cancelled-fair-ceiling.md new file mode 100644 index 00000000..6547ee37 --- /dev/null +++ b/specs/007-hyperlexical-model/receipts/20260923-morph77-val-settle-cancelled-fair-ceiling.md @@ -0,0 +1,37 @@ +# morph77 authorize val-settle — CANCELLED_FAIR_CEILING (2026-09-23) + +`name_gate=false`. BEST=**morph65**. + +## Authority + +Operator: **`authorize val-settle`**. + +## Settle (kept) + +| phrase | class | split | +|--|--|--| +| `we're so back` | OBSERVED | val | +| `clutch up` | OBSERVED | val | +| `bet that up` | OBSERVED | val | +| `real talk` | OBSERVED | val | + +Force/hard: **224→232 / 265→273** (`force_added=8` dual-scheme). + +## Fair + +| | | +|--|--:| +| fair morph65 | **1.0** | +| fair n | **164** (unchanged) | + +## Why val-split did not move fair n + +Fair gate applies the **same** `apply_unbind_force_train` path. Force keys are moved **out of val** before scoring. Putting AUTHORIZE atoms on `split=val` then listing them in force cannot grow fair n — they leave the fair surface. + +## Decision + +Train **not launched**. Jev: **stop_force_climb** — force-surface climb done at morph65 fair **1.0**. Settle kept in SoT. + +## Next + +No morph78 force-only while fair ceiling = 1.0 n=164. Optional later: broad OBSERVED (0.890) path, or operator gate change. Upsample freeze 11+. No SECOND_SLOT=4. diff --git a/specs/007-hyperlexical-model/receipts/20260923-morph78-fresh-acquire-hold-empty.md b/specs/007-hyperlexical-model/receipts/20260923-morph78-fresh-acquire-hold-empty.md new file mode 100644 index 00000000..9cd92559 --- /dev/null +++ b/specs/007-hyperlexical-model/receipts/20260923-morph78-fresh-acquire-hold-empty.md @@ -0,0 +1,41 @@ +# morph78 soft_ceiling — fresh acquire HOLD empty gold (2026-09-23) + +`name_gate=false`. BEST=**morph65**. Gate **soft_ceiling ARMED**. + +## Authority + +Operator **continue** after soft_ceiling arm. Acquire+label only — not settle/train authorize. + +## Acquire + METHOD morph43 + +| field | value | +|--|--:| +| queries | 39 | +| candidate atoms | **37** (all `split=val`) | +| AUTHORIZE (morph43) | **37** | +| new_to_sot | 27 | +| already_in_sot | 10 | + +## Jev + +| step | result | +|--|--| +| meta next | **hold_await_authorize** 0.99 | +| qualify | **defer_quality=35** · already_variant=2 · **force_expand_safe=0** | +| empty-next | **land_hold_empty** 0.51 (runner-up revisit_morph77_safe_new 0.29) | +| revisit morph77 leftovers | force_expand_safe=5 but safe_new card≥0.40 = **0** | + +## Effect + +Gold authorize card is **empty**. No settle. No force expand. No morph78 train. + +## Next + +Await explicit operator: + +- **`authorize morph78`** / **`authorize val-settle`** naming override phrases, or +- a new acquire direction / phrase list + +Do not launch force-only ceiling burn. Upsample freeze 11+. No SECOND_SLOT=4. + +Artifacts: `receipts/morph78-fresh-acquire-label-hold-20260923/`. diff --git a/specs/007-hyperlexical-model/receipts/20260923-morph78-soft-ceiling-hold-fresh-acquire.md b/specs/007-hyperlexical-model/receipts/20260923-morph78-soft-ceiling-hold-fresh-acquire.md new file mode 100644 index 00000000..bffe1cef --- /dev/null +++ b/specs/007-hyperlexical-model/receipts/20260923-morph78-soft-ceiling-hold-fresh-acquire.md @@ -0,0 +1,24 @@ +# morph78 under soft_ceiling — HOLD fresh acquire (2026-09-23) + +`name_gate=false`. BEST=**morph65**. Gate **soft_ceiling ARMED**. + +## Why no train yet + +Gold force/hard expand from morph65 residual AUTHORIZE is **empty** (Jev defer_quality=8). Launching morph78 force-only on n=164 under the old gate was cancelled; under soft_ceiling we still need a **legal one-knob** with real gold — not an empty expand and not UPSAMPLE/SECOND_SLOT. + +## Legal next card + +1. Fresh civilian acquire (outside deferred residual wall). +2. METHOD morph43 label → qualify AUTHORIZE only. +3. Explicit operator authorize settle → force/hard expand from morph77 tip (232/273). +4. Fair morph65 on new force surface (advisory if still 1.0). +5. morph78 warm morph65 + INIT_EXPAND_VOCAB; finish via `finish_soft_ceiling` (ceiling escape → broad OBSERVED > PRIOR + E2). + +## Not this card + +- Upsample 11+ +- SECOND_SLOT=4 +- Invented OBSERVED +- Hub / name_gate +- Force-only ceiling burn without new gold +- Override deferred AUTHORIZE phrases without explicit operator yes diff --git a/specs/007-hyperlexical-model/receipts/20260924-name-ne0l0gist-as-in-repo.md b/specs/007-hyperlexical-model/receipts/20260924-name-ne0l0gist-as-in-repo.md new file mode 100644 index 00000000..5ad488e1 --- /dev/null +++ b/specs/007-hyperlexical-model/receipts/20260924-name-ne0l0gist-as-in-repo.md @@ -0,0 +1,33 @@ +# Operator name — ne0l0gist (ingest) · 2026-09-24 + +`name_gate=false` (Hyperlexical). Soft_ceiling **ARMED**. BEST=**morph65**. + +## Authority + +Operator: **`name neologist as in repo`**. + +## Decision + +Public **ingest / harvest** product name is **`ne0l0gist`** — repo spelling with zeros (`ne` + `0` + `l` + `0` + `gist`), matching STATUS / README / SKILL / Spec 007 voice already on tip. + +This is **not**: + +- a Hyperlexical `name_gate` flip +- a Hub upload authorize +- permission to invent OBSERVED or re-settle morph77’s four + +## Split (unchanged) + +| Name | Role | +|------|------| +| **Hyperlex** | Transitional monorepo shell | +| **ne0l0gist** | Slang ingest / harvest / `ingest_tap` / export-settle (**named**) | +| **Hyperlexical** | Spec 007 model / train / eval / E2 — still behind `name_gate` | + +## Persistence + +Durable lock: `docs/NAMING.md` · Notion Naming lock page under Hyperlex Spine Owner · Public Claims CLAIM-HLX-NAME-001…003. + +## Next + +Hyperlexical `name_gate` still needs an explicit Danny sentence (`name_gate` yes / “name Hyperlexical”). Climb still needs named phrases on a live empty card or a new `force_expand_safe` acquire. diff --git a/specs/007-hyperlexical-model/receipts/20260924-push-org-naming-lock-graft.md b/specs/007-hyperlexical-model/receipts/20260924-push-org-naming-lock-graft.md new file mode 100644 index 00000000..5ab2aa52 --- /dev/null +++ b/specs/007-hyperlexical-model/receipts/20260924-push-org-naming-lock-graft.md @@ -0,0 +1,21 @@ +# push-org — naming lock graft (2026-09-24) + +**Authority:** operator `push-org` after #101 on personal `main`. + +## Direction (OBSERVED) + +- Product / train SoT remains `scrimshawlife-ctrl/Hyperlex`. +- Org `Zero-State-LLC/Hyperlex` is company mirror; may lag; not Spark train SoT. +- Sync via graft PR (same pattern as #9). **No force-push.** Org LICENSE / SDLC preserved. + +## Grafted + +- `docs/NAMING.md` + remotes/CANONICAL/glossary/STATUS pointers +- Spec 007 operator surface: name-gate plan, product plan, NEXT_MOVES, recent receipts +- `scripts/push-org.sh` + +## Explicit non-goals + +- Do not smash org Proprietary LICENSE / AGENTS / org `.github` SDLC +- Do not flip Hyperlexical `name_gate` +- Do not claim org is now train SoT or carry full `scripts/shadow` / full 007 receipt corpus diff --git a/specs/007-hyperlexical-model/status.md b/specs/007-hyperlexical-model/status.md new file mode 100644 index 00000000..e60fffe0 --- /dev/null +++ b/specs/007-hyperlexical-model/status.md @@ -0,0 +1,35 @@ +# Status 007 — 2026-09-24 + +**Naming:** this file is the **Hyperlexical** model path. Harvest / live ingest is **ne0l0gist**. Repo **Hyperlex** is the transitional shell. `name_gate` remains false. + +Specify is locked through C52 + A5. Implement U1–U3 harness is on `main`. SHADOW / advisory. + +Operator scoreboard (Danny-locked harvest snapshot **2026-09-10**; climb pin **2026-09-23+**): + +| Surface | n | Notes | +|---------|--:|-------| +| Local SoT `~/.hyperlex/hyperlexical/ingest_candidates.jsonl` | **4333** | 402 OBSERVED / 3931 INFERRED (2026-09-10). **Not in git.** morph77 settle kept four val OBSERVED later. | +| Export `--include-live` (operator machine) | **6506** | classify family **2437** · unbind **1345** · negatives **208** · gaps **0/0/0** | +| Tracked `exports/civilian.v0.1.jsonl` | 883 | Seed/snapshot. Not the train SoT. | + +| Gate | State | +|------|-------| +| C1–C52 + A5 | locked | +| U1 stub infer | on `main` | +| U2 harvest | landed; live SoT is local-only; `name_gate` false | +| Danny ~2500 candidate bar | **met** | +| Hermes 913 / gap-to-2500 | **superseded** — not current | +| U3 eval harness | on `main`; stub E2 fail (expected) | +| U3 Spark train | BEST=`seed-morph65`; force fair **1.0** n=164; soft_ceiling **ARMED**; trained trunk-forward E2 **PASS** | +| `name_gate` | **false** — Danny yes required. E2 PASS ≠ flip. | +| Hub upload | blocked (C11, C40) | +| 006 IsA | closed | +| Families | **8** only | + +Next operator sentences that do work: + +- Authorize with **named phrases** on a live empty card, or new `force_expand_safe` acquire — see `NAME-GATE-AND-NAMED-PHRASES.md` +- soft_ceiling decide / broad OBSERVED path (not force-only at fair 1.0 n=164) +- `open 006 IsA` — separate spec + +There is no further specify work on 007 without an amendment. diff --git a/specs/007-hyperlexical-model/tasks.md b/specs/007-hyperlexical-model/tasks.md new file mode 100644 index 00000000..b31fe784 --- /dev/null +++ b/specs/007-hyperlexical-model/tasks.md @@ -0,0 +1,42 @@ +# Tasks 007 — Hyperlexical model (SHADOW) + +U1 + U2 + U3 harness on branch `007-hyperlexical-model`. Not merged to main. + +## Specify cycle + +- [x] T0a–T0k specify + A1 + A2 +- [ ] T0f Operator merge sentence +- [x] A5 milestones + engineering guidelines (Notion + this pack) + +## U1 / U2 + +- [x] stub infer + walls +- [x] civilian exporter + backfill/archive harvest + +## U3 + +- [x] T7 eval harness vs 004 probe (`eval_unbind.py`) +- [x] train gate (`train.py`) + `u3-recipe.md` +- [ ] T8 Hub card upload +- [x] T9 Trunk freeze +- [x] E2 trained trunk-forward PASS on Spark (stub still expected FAIL; seed smoke ≠ T1) + +## Classify R2 (2026-09-10) + +Gates: `milestones.md`. Rules: `engineering.md`. +Live counts stay on Notion Tasks 007. Do not rewrite gates when a harvest number moves. + +- [x] Round 2 family labels reviewed (collision-hold list) +- [x] Classify settled count posted (family / classify_all / gap vs 2k) +- [x] Unbind settled count posted (fixture + civilian / gap vs 200) +- [x] Negatives settled count posted (gap vs 200) +- [x] name_gate dataset gaps 0/0/0 — flag still false until Danny yes +- [x] No OBSERVED promote from tap + +## Explicitly not done + +- Hub card upload / T8 +- Load ModernBERT in CI +- Flip `name_gate` (Danny yes) +- Open 006 +- Force-only climb past morph65 fair 1.0 n=164 (soft_ceiling armed instead)