Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "hyperlex",
"displayName": "Hyperlex",
"version": "0.4.2",
"description": "Memetic emergence analysis: slang detection, lineage matching, virality and hyperstition scoring, receipt-backed forecasts, and settled Brier calibration. Never invents Brier scores; settlement stays a human step.",
"author": {
"name": "Applied Alchemy Labs / Hermes"
},
"homepage": "https://github.com/Zero-State-LLC/Hyperlex",
"repository": "https://github.com/Zero-State-LLC/Hyperlex",
"license": "LicenseRef-Zero-State-Proprietary-1.0",
"keywords": [
"memetics",
"slang",
"hyperstition",
"virality",
"lineage",
"calibration",
"brier",
"mutation"
]
}
29 changes: 29 additions & 0 deletions .claude/skills/hyperlex-analyze/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: hyperlex-analyze
description: Analyze pasted text or a JSON ingest file with the Hyperlex CLI. Prefer offline route.
when_to_use: User pastes slang/text to analyze, or points at a file for Hyperlex analyze.
allowed-tools: Bash Read
arguments: [input]
---

# /hyperlex-analyze

Analyze text or a file. Prefer `pipeline` / `run` when the user wants a receipt + forecasts. Use `analyze` for analysis-only.

```bash
: "${HLX:=python3 ${HYPERLEX_SKILL_DIR:-${HERMES_SKILL_DIR:-$HOME/.claude/skills/hyperlex}}/scripts/hyperlex.py}"
# pasted text
$HLX analyze "$ARGUMENTS" --route offline
# full packet (receipt + forecasts)
$HLX pipeline "$ARGUMENTS" --route offline
# ingest JSON file
$HLX analyze --input "$ARGUMENTS" --route offline
```

## Expected

JSON result. `provenance.brier` is `null`. Lineage / virality / mutation_trace only when the CLI attaches them.

## Fail-closed

Do not invent labels or Brier. If the file is missing, say so. Do not settle.
29 changes: 29 additions & 0 deletions .claude/skills/hyperlex-demo/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: hyperlex-demo
description: Run the Hyperlex offline demo and summarize receipt labels. No API keys. Never invent Brier.
when_to_use: User asks for a Hyperlex demo, first success path, or a sample receipt.
allowed-tools: Bash Read
---

# /hyperlex-demo

Run the offline demo. Summarize labels from the CLI output. Do not invent scores.

```bash
: "${HLX:=python3 ${HYPERLEX_SKILL_DIR:-${HERMES_SKILL_DIR:-$HOME/.claude/skills/hyperlex}}/scripts/hyperlex.py}"
$HLX demo
# repo checkout: python3 scripts/hyperlex.py demo
# wrapper: bash scripts/claude_hlx.sh demo
```

## Expected

- Exit `0`, `ok: true`
- `brier` and `provenance_brier` are `null`
- Receipt path under the demo out dir or `~/.hyperlex/receipts/`
- Known atoms often match a lineage family (`rizz` → `brainrot-aura`)
- Repeat OBSERVED / INFERRED / SPECULATIVE — do not upgrade them

## Fail-closed

If the CLI fails, report the error. Do not fabricate a receipt or Brier. Do not settle.
24 changes: 24 additions & 0 deletions .claude/skills/hyperlex-pending/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: hyperlex-pending
description: List open Hyperlex forecasts from the score log. Start of the calibration loop.
when_to_use: User asks what forecasts are open, pending, or ready to settle.
allowed-tools: Bash Read
---

# /hyperlex-pending

List unsettled forecasts. This is the start of the calibration loop — not settlement.

```bash
: "${HLX:=python3 ${HYPERLEX_SKILL_DIR:-${HERMES_SKILL_DIR:-$HOME/.claude/skills/hyperlex}}/scripts/hyperlex.py}"
$HLX pending
$HLX pending --limit 20
```

## Expected

JSON list of open forecast ids (default log: `~/.hyperlex/score_log.jsonl`). Empty list is valid.

## Fail-closed

Do not invent forecast ids. Do not compute Brier here. Next step is human: `/hyperlex-settle` after they choose TRUE|FALSE|VOID|CONFLICT.
28 changes: 28 additions & 0 deletions .claude/skills/hyperlex-scan/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: hyperlex-scan
description: LIVE_EMERGENCE_SCAN helper. Pass a query (or comma-separated queries). Offline-first.
when_to_use: User wants a Hyperlex scan, live-emergence scan, or multi-query monitor run.
allowed-tools: Bash Read
arguments: [query]
---

# /hyperlex-scan

Multi-query LIVE_EMERGENCE_SCAN. Prefer `--route offline` unless the user allows network.

```bash
: "${HLX:=python3 ${HYPERLEX_SKILL_DIR:-${HERMES_SKILL_DIR:-$HOME/.claude/skills/hyperlex}}/scripts/hyperlex.py}"
$HLX scan --query "$ARGUMENTS" --route offline --receipt --forecasts --append-log
# several terms:
$HLX scan --queries "rizz,locked in" --route offline --receipt --forecasts --append-log
# bundled config (repo / installed skill):
$HLX scan --config "${HYPERLEX_SKILL_DIR:-.}/examples/cron/scan-queries.json" --route offline --receipt --forecasts
```

## Expected

JSON scan summary. Per-query receipts when `--receipt` is set. Forecasts have `brier: null` until settle.

## Fail-closed

Do not register cron. `risk-schedule` is advisory only. Do not invent Brier. Do not auto-settle.
29 changes: 29 additions & 0 deletions .claude/skills/hyperlex-settle/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: hyperlex-settle
description: Coach Hyperlex settlement. Human must supply forecast-id and decision. Never invent outcomes or Brier.
when_to_use: User wants to settle a forecast or close the calibration loop.
allowed-tools: Bash Read
---

# /hyperlex-settle

Settlement is an **explicit human step**. Do not invent TRUE/FALSE/VOID/CONFLICT. Do not invent Brier.

1. `$HLX pending` — show open ids.
2. Ask the operator for `--forecast-id` and `--decision`.
3. Only after they choose, run:

```bash
: "${HLX:=python3 ${HYPERLEX_SKILL_DIR:-${HERMES_SKILL_DIR:-$HOME/.claude/skills/hyperlex}}/scripts/hyperlex.py}"
$HLX settle --forecast-id <id> --decision TRUE
# FALSE | VOID | CONFLICT
$HLX score-series --mean-shift --verify-chain
```

## Expected

Settle appends the score log. `score-series` is the only place a numeric Brier is real. Empty series → `NOT_COMPUTABLE`.

## Fail-closed

If the operator has not chosen a decision, stop. Coach the flags. Do not auto-settle. Do not guess outcomes.
26 changes: 26 additions & 0 deletions .claude/skills/hyperlex-wizard/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: hyperlex-wizard
description: Week-one Hyperlex onboarding via wizard --auto. Offline. Never auto-settles.
when_to_use: User is new to Hyperlex, asks to get started, or wants the guided operator path.
allowed-tools: Bash Read
---

# /hyperlex-wizard

Week-one guided path. Prefer `--auto` in Claude (non-interactive).

```bash
: "${HLX:=python3 ${HYPERLEX_SKILL_DIR:-${HERMES_SKILL_DIR:-$HOME/.claude/skills/hyperlex}}/scripts/hyperlex.py}"
$HLX wizard --auto
$HLX wizard --auto --query "<term>"
```

## Expected

Steps: `env_intro` → `doctor` → `demo` → `first_pipeline` → `calibration_coach` → `score_series_hint` → `handoff`.

Summarize those steps. Open analysis stays `brier: null`. Show any open forecasts from the wizard / `$HLX pending`.

## Fail-closed

Do not auto-settle. Ask the operator for TRUE|FALSE|VOID, then coach `$HLX settle`. Do not invent Brier.
43 changes: 43 additions & 0 deletions .claude/skills/hyperlex/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: hyperlex
description: >
Main Hyperlex contract in Claude Code. Use for slang, memetics, lineage,
virality, hyperstition, receipts, forecasts, and settlement coaching.
Prefer the CLI. Not for jailbreak / wrap composition.
when_to_use: >
User asks for Hyperlex, slang analysis, memetic emergence, lineage,
Brier settlement, or cultural-signal receipts.
allowed-tools: Bash Read Grep
---

# Hyperlex (project skill)

Read the repo-root [SKILL.md](../../../SKILL.md) for the full Hermes + Claude
contract. This file is a thin pointer so Claude Code can invoke `/hyperlex`
when this checkout is the project. Do not duplicate engine logic here.

## Invoke

```bash
export HYPERLEX_SKILL_DIR="${HYPERLEX_SKILL_DIR:-$PWD}"
export HERMES_SKILL_DIR="${HERMES_SKILL_DIR:-$HYPERLEX_SKILL_DIR}"
export HLX="${HLX:-python3 $HYPERLEX_SKILL_DIR/scripts/hyperlex.py}"
$HLX check
$HLX doctor
$HLX demo
$HLX wizard --auto
$HLX pipeline "<term>" --route offline
```

Installed personal skill:

```bash
export HLX="python3 $HOME/.claude/skills/hyperlex/scripts/hyperlex.py"
# or: bash "$HOME/.claude/skills/hyperlex/scripts/claude_hlx.sh"
```

## Fail-closed

- Never invent a numeric Brier. Open analysis keeps `brier: null`.
- Never auto-settle. Ask for TRUE|FALSE|VOID|CONFLICT, then run `settle`.
- Prefer Bash CLI over guessing labels. Repeat OBSERVED / INFERRED / SPECULATIVE.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ build/
!docs/command-router.v1.json
!data/backfill/**/*.json
!data/phylogeny/**/*.json
!.claude-plugin/plugin.json

# Temp / build output
tmp/
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## Unreleased

- **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.
Expand Down
12 changes: 12 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
Follow [AGENTS.md](AGENTS.md). That file is the only contributor and agent instruction source in this repository.
For a non-trivial change, read the active intent.md before editing. If none exists, draft intent.md and wait for human accept.

---

## Claude Code host (additive)

When using Claude Code as an additional host (Hermes remains primary), see
[`docs/claude-skill.md`](docs/claude-skill.md) and
[`references/claude-runtime-contract.md`](references/claude-runtime-contract.md).
Install helpers: `bash install.sh --claude` / `--claude-plugin`.
Wrapper: `bash scripts/claude_hlx.sh <command>`.

AGENTS.md remains the only contributor/agent instruction source for this org repo.
14 changes: 14 additions & 0 deletions QUICKSTART.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ $HLX wizard --auto
$HLX commands
```

## Claude Code

```bash
bash install.sh --claude
export HYPERLEX_SKILL_DIR="${HOME}/.claude/skills/hyperlex"
export HLX="python3 $HYPERLEX_SKILL_DIR/scripts/hyperlex.py"
$HLX demo
$HLX wizard --auto
```

Personal skill path: `~/.claude/skills/hyperlex`. Plugin path:
`~/.claude/plugins/hyperlex` (`--claude-plugin`). Project helpers live under
`.claude/skills/`. Settlement stays a human step. Guide: [docs/claude-skill.md](docs/claude-skill.md).

## Daily path

```bash
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,21 @@ Deep dive: [docs/operator-loop.md](./docs/operator-loop.md) · [docs/commands.md

---


## Claude Code (additive host)

Hermes remains the primary skill host. Claude Code is optional:

```bash
bash install.sh --claude
export HYPERLEX_SKILL_DIR="${HOME}/.claude/skills/hyperlex"
export HLX="python3 $HYPERLEX_SKILL_DIR/scripts/hyperlex.py"
$HLX doctor # CLAUDE_OK / CLAUDE_MISSING (missing does not fail)
```

See [`docs/claude-skill.md`](docs/claude-skill.md) and [`docs/claude-runtime-contract.md`](docs/claude-runtime-contract.md).


## CLI surface

**Prefer**
Expand Down
Loading
Loading