haze-wiki

haze-wiki

A Claude Code skill that turns every coding session into permanent, queryable knowledge.

Latest release: v2.7.3 · 2026-05-26 · supports Claude Code + Cursor (beta)

haze-wiki is an LLM Wiki for Claude Code (and Cursor). It auto-captures your conversations, records your decisions, and grows a self-maintaining knowledge graph in your project — so future sessions start with relevant context loaded instead of from zero.

Inspired by Andrej Karpathy’s “LLM as Compiler” / Vannevar Bush’s Memex: a layered vault of immutable raw sources (raw/) plus an LLM-curated knowledge layer (wiki/), wired together by lifecycle hooks.


What’s new in v2.7.8 (2026-05-26)

Bug 8 — /haze ingest --new Phase 1 dedup. The Stop hook fires per agent-turn under both Claude Code and Cursor, so a single chat session produces N nested-superset transcript snapshots (20260526-181006-a78bffed.jsonl is a strict superset of 20260526-180916-a78bffed.jsonl, both same session). Pre-v2.7.8, Phase 1 would summarize each snapshot separately — wasting ~$0.50-2 per redundant summary, ~$3-15 per long session.

Fixed by adding a dedup pre-pass (Step 2a) in the /haze ingest --new spec: - Group pending needs_summary transcripts by the 8-char session_id suffix in the filename - For each group, keep only the largest snapshot for Phase 1 - Mark the rest in the manifest with subsumed_by: <largest-path> + subsumed_at: <iso8601> - Smaller snapshots stay on disk (no deletion); they’re just skipped by future ingest runs

Manifest schema gains a 3rd entry shape (subsumed). Backward-compat: pre-v2.7.8 manifests without subsumed_by work fine — dedup runs on next ingest and adds them as it groups.

Optional follow-up (not in v2.7.8): a /haze prune-transcripts sub-command could later rm subsumed files + their raw_integrity entries. Deferred until disk hygiene actually becomes a concern.

No template, hook script, or config changes — entirely a SKILL.md spec text addition.

What’s new in v2.7.7 (2026-05-26)

Bug 9 — /haze shadow-clone Step 3 (Harvest) wasn’t recording sha256 for harvested clone outputs, leaving raw/shadow-<id>/* files unrecorded in .manifest.json’s raw_integrity map. /haze verify-raw would flag them as NEW (unrecorded). Stop hook had this fix in v2.7.0; shadow-clone harvest missed the cherry-pick.

Fixed by re-shaping Step 3’s bash loop to cp one file at a time and call record_raw_hash $dest after each copy. Sources haze-wiki/hooks/lib/integrity.sh first; falls back gracefully if the helper is missing (legacy vaults).

Validated against the 2026-05-26 evening shadow-clone E2E run (clone id 23819e8c, 2 harvested files) — pre-v2.7.7 left both files unhashed.

What’s new in v2.7.6 (2026-05-26)

/haze shadow-clone Step 5 (Auto-Ingest) wording strengthened. Pre-v2.7.6 the step read as descriptive (“Automatically process harvested files”) — an LLM running shadow-clone could plausibly stop after the harvest and tell the user to run /haze ingest --new themselves. Now reworded as imperative with explicit “MANDATORY — do NOT skip” + “do not delegate this back to the user” instructions. Also lays out two implementation paths (inline synthesis for small batches, delegate to --new for larger ones).

No functional code change — templates/hooks/* untouched. The change is entirely in the LLM-orchestrated spec text the agent reads when dispatching /haze shadow-clone.

Cleanup: removed a stale “/tmp/shadow-{id}/” path claim from wiki/concepts/shadow-clone-pattern.md documentation (paths were already correct in SKILL.md as of v2.7.5; the concept page had propagated an older note).

What’s new in v2.7.5 (2026-05-26)

5th bug surfaced during v2.7.4 live re-validation in Cursor — POC paths whose name contains “test” (e.g. poc/cursor-test/, poc/auth-test-harness/) were having their WIKI_SUGGEST suppressed by the *test* glob meant for test fixtures. Result: code_change ops fired correctly but no [[poc-<name>]] suggestion ever printed for these POCs.

Fix: POC paths now bypass the test/config suppression entirely. *test* / *spec* / *.config.* / *.json / *.lock suppression still applies to non-POC paths. Effect:

Path v2.7.4 v2.7.5
poc/cursor-test/balance.go (suppressed by *test*) [[poc-cursor-test]]
poc/foo/bar.go [[poc-foo]] [[poc-foo]] (unchanged)
src/foo_test.go (suppressed) (still suppressed — not a POC path)
cmd/main.go [[main]] [[main]] (unchanged)

Patched in both templates/hooks/track-code-change.sh and .claude/skills/haze/SKILL.md.

What’s new in v2.7.4 (2026-05-26)

Cursor live-E2E follow-up — 4 bugs surfaced in v2.7.3 during a full validation pass against Cursor v3.5.33:

What’s new in v2.7.3 (2026-05-26)

What’s new in v2.7.2 (2026-05-26)

What’s new in v2.7.1 (2026-05-26)

What’s new in v2.7 (2026-05-26)

What’s new in v2.6 (2026-05-26)

Full release history below · Install instructions


The Problem It Solves

A typical week with Claude Code: 30 sessions, dozens of decisions, three deep research dives, hundreds of file edits. After two weeks you’ve forgotten 80% of it. The next session starts from zero context — you re-explain the architecture, re-derive the same trade-off analysis, re-paste the same snippets.

haze-wiki makes the past stick. Every session is auto-captured. The wiki self-maintains. Future sessions load the relevant slice of past knowledge automatically — without you remembering to do anything.

SESSION 1 → captured → ingested → wiki/ pages
                                       │
SESSION 2 ← hot.md context ← index.md ─┘
   │
   produces new knowledge → captured → ingested → wiki/ pages
                                                       │
SESSION 3 ← compounds ← compounds ←────────────────────┘

Knowledge compounds. Sessions get smarter.


How It Works — A Session Lifecycle

Here is what haze-wiki does around a single Claude Code session, after you’ve run /haze init once:

Before you type — SessionStart hook fires

During the session — PostToolUse hook fires on every file edit

If the conversation auto-compacts — PostCompact hook fires

When the session ends — Stop hook fires

When you choose to ingest — /haze ingest

After a few cycles you have a knowledge graph that: - Loads automatically each session - Surfaces past decisions when relevant via /haze lookup - Cross-links concepts across projects (via closure architecture — see below)


The Four Hooks

Hook Trigger What it does Configurable?
SessionStart Session opens (startup or resume) Inject hot.md + index.md into context; report pending raw/ files matcher: startup\|resume
PostToolUse Edit or Write tool fires Append entry to wiki/code-journal.md matcher: Edit\|Write, 5s timeout
PostCompact Conversation auto-summarized Re-inject hot.md + first 50 lines of index.md so wiki stays in view Inline command
Stop Session ends or is interrupted Save transcript to raw/transcripts/; print update-hot.md reminder 10s timeout

All four are configured in .claude/settings.json as type: command hooks. They are non-blocking — a hook failure surfaces as a soft error in Claude Code but never aborts the session.

The hook scripts live under haze-wiki/hooks/ and use absolute paths (set up by /haze init), so they work regardless of your current working directory.


What Gets Automated

After /haze init, you no longer have to remember to:

You still drive:


Closure Architecture — Multi-Level Vaults

Vaults can link upward. Knowledge flows from leaves to root:

~/haze-wiki/              ← global vault (top)
    │
    ├── ~/team-vault/      ← team vault, linked to global
    │       │
    │       ├── ~/proj-a/  ← project leaf
    │       └── ~/proj-b/  ← project leaf
    │
    └── ~/personal-vault/  ← linked to global directly

Set up with --parent flags:

# Global vault (root of the closure)
cd ~/haze-wiki && /haze init

# Team vault (links to global)
cd ~/team-vault && /haze init --parent ~/haze-wiki

# Project (links to team)
cd ~/my-project && /haze init --parent ~/team-vault

/haze push <concept> propagates a concept page from leaf → team → global. The global vault becomes a knowledge graph spanning all your projects — Karpathy-style “LLM as Compiler” applied to your entire workflow.

Reference implementation: a closure-vault PoC with 119 leaf workspaces (60 research + 59 Go services) synthesized into 17 hubs + 6 executive concept pages.


Shadow-Clone — Parallel Research (影分身)

For big-picture investigations where one agent isn’t enough:

/haze shadow-clone "compare cursor vs claude code hook systems"

This spawns 3–8 parallel research agents (a 影分身 / shadow-clone), each tackling a sub-topic. Each writes to raw/shadow-<topic>-<date>/ as an independent markdown file. After all clones return, you can /haze ingest to synthesize them into linked concept pages.

A real run on “the Cursor port story” (5 agents, ~$2 of tokens):

Reads like a research team. Ships in 5 minutes instead of 5 days.


Sub-Commands Reference

Command Purpose When to use
/haze init Scaffold wiki + install hooks One-time per project
/haze init --parent <path> Link to an upstream vault Closure architecture
/haze init --cursor Force Cursor port files If .cursor/ not yet present
/haze init --no-cursor Skip Cursor port files If you only want Claude Code
/haze status Vault stats — page count, pending files Daily sanity check
/haze check Verify hooks + config integrity Debug
/haze ingest [file] Process a single source Quick one-off ingests
/haze ingest --new Batch ingest (two-phase, v2.6+: summarize → synthesize) End-of-day workflow
/haze ingest --summarize-only Phase 1 only — transcripts → wiki/sessions/ summaries Batch process large backlog
/haze ingest --synthesize-only Phase 2 only — summaries → concepts Re-extract without re-summarizing
/haze suggest [--top N] Propose concept candidates from pending material After ingest or before research
/haze suggest --refresh Show stale concepts that have new source material Weekly housekeeping
/haze ingest --poc Synthesize concept pages from poc/*/ folders For workspaces with PoCs
/haze ingest --poc --dry-run Preview ingest, no writes, token estimate Cost check first
/haze ingest --poc <name> Re-index one POC, force overwrite After PoC evolved
/haze lookup <topic> Search wiki + inject relevant pages Bring past context into chat
/haze push [file] Send concept page upward to parent vault Manual closure sync
/haze config Show/edit vault config Tweak ingest behaviour
/haze shadow-clone <topic> Spawn N parallel research agents Big investigations
/haze update Re-run installer to pull latest skill version Stay current
/haze reinit Re-run init without overwriting wiki content After skill updates
/haze reset Tear down + reinstall (destructive on hooks) Last resort

Multi-Editor Support (beta)

/haze init auto-detects Cursor (looks for .cursor/) and writes a parallel set of port files so the same wiki works from either editor:

⚠ Caveats (validated against Cursor v3.5.33 in live E2E, 2026-05-26):

To skip Cursor entirely: /haze init --no-cursor.


Vault Structure (after /haze init)

your-project/
├── .claude/
│   └── settings.json              ← hooks wired here, absolute paths
└── haze-wiki/
    ├── haze-config.json           ← per-vault config (parent links, etc.)
    ├── hooks/
    │   ├── lib/                   ← shared helpers (cwd resolution, etc.)
    │   ├── lib/debug-log.sh       ← rotating debug logger (sourced by hooks)
    │   ├── session-start.sh       ← SessionStart hook script
    │   ├── track-code-change.sh   ← PostToolUse hook script
    │   └── capture-transcript.sh  ← Stop hook script
    ├── log.md                     ← rotating DEBUG log (hook/skill behaviour, 1MB default)
    ├── raw/                       ← IMMUTABLE source layer
    │   ├── transcripts/           ← auto-captured conversations
    │   ├── shadow-*/              ← multi-agent research outputs
    │   └── *.md *.pdf             ← user-dropped sources
    └── wiki/                      ← LLM-MAINTAINED knowledge layer
        ├── hot.md                 ← recent context (auto-loaded each session)
        ├── index.md               ← catalog of all pages
        ├── log.md                 ← append-only USER-FACING activity log
        ├── code-journal.md        ← code-edit log (PostToolUse output)
        ├── concepts/              ← one file per concept
        └── sessions/              ← transcript summaries (post-ingest)

Two logs, distinct purposes: - haze-wiki/log.md — rotating debug log for hook + skill behaviour. Default 1 MB cap, configurable via haze-config.json’s debug_log_max_mb (e.g. set to 10 for a 10 MB cap). When oversize, the oldest ~50% is pruned in place. For troubleshooting. - haze-wiki/wiki/log.md — append-only user-facing activity log. Format ## [YYYY-MM-DD] <op> | <summary>. Never rotated. For history and audit.

Layer rules:


Install

Two installers — pick by editor:

Claude Code users (global skill)

curl -fsSL https://haze-gitlab.sssjiwjs.app/haze-public/haze-wiki/-/raw/main/install.sh | bash

Writes the skill to ~/.claude/skills/haze/ (machine-wide, one-time). Then cd into a project and run /haze init from inside Claude Code to scaffold the vault.

Cursor users (per-workspace, no global writes) — beta

cd your-project
curl -fsSL https://haze-gitlab.sssjiwjs.app/haze-public/haze-wiki/-/raw/main/cursor-install.sh | bash

Lays down .cursor/, AGENTS.md, CLAUDE.md → AGENTS.md symlink, and the haze-wiki/ scaffold in $(pwd). Nothing touches ~/.claude/. Per-project install — re-run in each workspace you want to use it in.

⚠ Cursor v3.x has a confirmed .md corruption bug (forum #158747, fix targeted v3.3). Use Cursor Nightly until v3.3 ships.

Both editors in one workspace

Run cursor-install.sh first (lays down the workspace files + CLAUDE.md symlink), then run install.sh to also get the Claude Code skill globally. The two installers don’t conflict.

curl ... | bash is the friction-free default but doesn’t let you inspect what you’re about to run. To verify first:

# 1. Download the installer
curl -fsSL https://haze-gitlab.sssjiwjs.app/haze-public/haze-wiki/-/raw/main/install.sh -o /tmp/haze-install.sh

# 2. Compute its sha256
shasum -a 256 /tmp/haze-install.sh
# or: sha256sum /tmp/haze-install.sh

# 3. Compare against the canonical hash published in the v2.7.0 (or current) tag annotation:
#    git -c http.proxy= ls-remote --tags https://haze-gitlab.sssjiwjs.app/haze-public/haze-wiki.git
#    Or visit https://haze-gitlab.sssjiwjs.app/haze-public/haze-wiki/-/tags/v2.7.0
#    The tag message contains "install.sh sha256: <hash>".

# 4. If the hash matches, run it:
bash /tmp/haze-install.sh

Same flow for cursor-install.sh. Limitations (be honest): if haze-gitlab.sssjiwjs.app is compromised, the published hash can be rewritten too — verify-then-install protects against opportunistic mid-transit tampering, not a full server compromise. For higher assurance, mirror the repo to a second host and cross-check.

Manual

git clone https://haze-gitlab.sssjiwjs.app/haze-public/haze-wiki.git
cp -r haze-wiki/.claude/skills/haze ~/.claude/skills/   # Claude Code skill
# or: cp -r haze-wiki/templates/cursor/ /target/.cursor/  # Cursor port files
rm -rf haze-wiki

Update

Re-run whichever install one-liner you used — both installers replace the existing files with the latest from main:

# Claude Code skill
curl -fsSL https://haze-gitlab.sssjiwjs.app/haze-public/haze-wiki/-/raw/main/install.sh | bash

# Cursor workspace (pass --force to overwrite existing haze-wiki/)
curl -fsSL https://haze-gitlab.sssjiwjs.app/haze-public/haze-wiki/-/raw/main/cursor-install.sh | bash -s -- --force

Inside Claude Code: /haze update runs the global skill installer.

Quick Start

cd your-project
claude

# Inside Claude Code:
/haze init        # scaffold + install hooks
/haze status      # confirm everything's wired

Now drop sources into haze-wiki/raw/ (articles, PDFs, transcripts) and run:

/haze ingest --new

After 3–4 sessions you’ll have a self-growing knowledge graph that survives every restart.


Requirements


Release History

v2.7.3 — 2026-05-26

v2.7.2 — 2026-05-26

v2.7.1 — 2026-05-26

v2.7.0 — 2026-05-26

v2.6.0 — 2026-05-26

v2.5.0 — 2026-05-25

v2.x — 2026-05-24+

v1.x — early 2026


License

MIT


haze (霞) — drifting cloud, ephemeral but persistent. This tool fixes the ephemeral part.