broadcast
Run broadcast on a distilled Raw — update related existing pages conversationally
Initialize cortex vault — set up config, vault structure, and rebuild index
> /plugin marketplace add XBlueSky/cortexes > /plugin install cortexes@cortex
How it fires
How this command gets triggered: by you, by Claude, or both.
/genesisContext preview
What this command does when you run it.
Initialize cortex vault — set up config, vault structure, and rebuild index
name: genesis description: Initialize cortex vault — set up config, vault structure, and rebuild index argument-hint: "[vault path, e.g. /srv/cortex or ~/cortex]" allowed-tools: - Read - Write - Edit - Bash - Glob - Grep - AskUserQuestion
Initialize or reconfigure the cortex memory vault. Run once per machine, or again after switching machines to rebuild local state.
Run `command -v cortex-vec`. If it is not on PATH, tell the user the vault's indexing and search need the CLI, and offer to install it now:
# Recommended: isolated tool install via uv uv tool install cortex-vec # Or with pip pip install cortex-vec
If they decline, continue anyway — recording and the skills degrade gracefully — but note that semantic indexing and `cortex-vec` search stay unavailable until it is installed.
Read `~/.cortex/config.json`. If it exists, show current config and ask if the user wants to reconfigure or abort.
If the user provided an argument, use that as the vault path. Otherwise, ask: "Where is the cortex vault? (e.g. /srv/cortex, ~/cortex)"
If the path exists and contains Notes/ or Projects/ or Raw/, recognize it as an existing vault. If the path doesn't exist, ask if they want to create it.
Ask for:
Create `~/.cortex/` directory if needed, then write `~/.cortex/config.json`:
{
"vault_path": "<user's answer>",
"author": "<name>",
"author_email": "<email>",
"git": {
"auto_commit": true,
"auto_push": false
}
}Ensure these directories exist in the vault:
Those three are the whole taxonomy. Do **not** create `Weekly/` — it is no longer a Cortexes content type. If an existing vault already has a `Weekly/` directory, leave it and its files exactly where they are: never move, rewrite, or delete them. Tell the user it is no longer created, indexed, or searched, and that anything still worth keeping should be moved into `Notes/` or `Projects/` by hand, at their own pace.
Ensure `log.md` exists at the vault root. If missing, create it with:
--- created: <today> --- # Cortex Log Append-only record of vault operations (distill, evolve). --- ```` The file is append-only; do not overwrite if it exists. ### 7. Initialize git If the vault is not a git repo, run `git init` and create an initial commit. ### 8. Rebuild _index.md Scan every page under `Notes/<topic>/` and `Projects/<repo>/`, skipping any path containing `_archive`. For each page extract the title, the tags from frontmatter, and a one-line summary. `Raw/` is deliberately NOT indexed — it is chronological and navigated by date, so an index table would only duplicate the directory listing. A leftover `Weekly/` is not indexed either, and is not listed in `_index.md`. Write `<vault_path>/_index.md`. Both top-level sections group their rows into `###` sub-sections — by topic under Notes, by repo under Projects — so the index mirrors the on-disk layout: ```markdown --- updated: <today> --- # Cortex Index ## Projects ### <repo-name> | Project | Tags | Summary | |---------|------|---------| | [[topic-title]] | tags | summary | ## Notes ### <topic> | Note | Tags | Summary | |------|------|---------| | [[note-title]] | tags | summary |
Do NOT add an `entries:` count to the frontmatter. It is a derived value with no reader, and a hand-maintained copy of it drifts the moment a page is merged away or renamed. `cortex-vec status` reports the live count instead.
Legacy `Projects/<repo>/_index.md` files are not index rows — skip them. To check an existing index against the files on disk (and for the regex traps that make a naive check silently wrong), see `docs/index-audit.md`.
Display:
✓ Cortex vault initialized Vault: <path> Config: ~/.cortex/config.json Author: <name> <email> Index: <N> pages in _index.md Next steps: - Sessions auto-record to Raw/ on exit - /cortexes:evolve → save notes or project info - /cortexes:distill → refine raw records - /cortexes:query → search your vault
Personal knowledge vault plugin for Claude Code — session recording, memory distillation, and hybrid semantic + BM25 retrieval.
Repo: XBlueSky/cortexes
Run broadcast on a distilled Raw — update related existing pages conversationally
Distill raw session records into refined Notes and Projects
Save knowledge to the cortex vault (Notes or Projects) and update index
Manually search the cortex vault (Notes, Projects, Raw) for existing notes