@vortex-os/base 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -8
- package/dist/catch-up-GDDKPZHJ.js +8 -0
- package/dist/{chunk-6SO4DAWJ.js → chunk-3L5DLEGP.js} +6 -9
- package/dist/chunk-3L5DLEGP.js.map +1 -0
- package/dist/chunk-PZ5AY32C.js +10 -0
- package/dist/chunk-PZ5AY32C.js.map +1 -0
- package/dist/index.d.ts +408 -28
- package/dist/index.js +0 -0
- package/dist/index.js.map +1 -1
- package/dist/vectorize-PN4Y7XMO.js +30 -0
- package/dist/vectorize-PN4Y7XMO.js.map +1 -0
- package/package.json +2 -2
- package/templates/commands/recall.md +31 -17
- package/templates/config/vortex.json +3 -0
- package/templates/manifest.json +51 -0
- package/templates/routers/.cursorrules +5 -5
- package/templates/routers/AGENTS.md +22 -13
- package/templates/routers/AI-RULES.md +127 -0
- package/templates/routers/CLAUDE.md +23 -4
- package/templates/routers/GEMINI.md +5 -3
- package/dist/catch-up-ZQN7HMMN.js +0 -7
- package/dist/chunk-6SO4DAWJ.js.map +0 -1
- package/templates/routers/AGENT.md +0 -93
- package/templates/routers/CODEX.md +0 -16
- /package/dist/{catch-up-ZQN7HMMN.js.map → catch-up-GDDKPZHJ.js.map} +0 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import "./chunk-PZ5AY32C.js";
|
|
2
|
+
|
|
3
|
+
// ../plugins/session-rituals/dist/vectorize.js
|
|
4
|
+
import { join } from "path";
|
|
5
|
+
async function vectorizeIndex(ctx, opts) {
|
|
6
|
+
const { sqlite, vector, sessionArchive } = await import("@vortex-os/memory-extended");
|
|
7
|
+
const dbPath = opts?.dbPath ?? join(ctx.dataDir, "_indexes", "memory.sqlite");
|
|
8
|
+
const memoryDir = join(ctx.dataDir, "_memory");
|
|
9
|
+
const embed = opts?.embed ?? vector.createLocalEmbedder({ localFilesOnly: !opts?.allowDownload });
|
|
10
|
+
const sqlStore = new sqlite.MemorySqliteStore(dbPath);
|
|
11
|
+
const vecStore = new vector.MemoryVectorStore({ db: dbPath });
|
|
12
|
+
const archive = new sessionArchive.SessionArchiveStore(ctx.dataDir);
|
|
13
|
+
try {
|
|
14
|
+
try {
|
|
15
|
+
await sqlite.rebuildFromMemoryDir(sqlStore, memoryDir);
|
|
16
|
+
} catch {
|
|
17
|
+
}
|
|
18
|
+
const mem = await vecStore.rebuild(sqlStore, embed, { onlyMissing: true });
|
|
19
|
+
const sess = await vecStore.rebuildSessions(archive, embed, { onlyMissing: true });
|
|
20
|
+
return { memories: mem.indexed, sessionChunks: sess.chunks };
|
|
21
|
+
} finally {
|
|
22
|
+
archive.close();
|
|
23
|
+
vecStore.close();
|
|
24
|
+
sqlStore.close();
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
vectorizeIndex
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=vectorize-PN4Y7XMO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../plugins/session-rituals/src/vectorize.ts"],"sourcesContent":["import { join } from \"node:path\";\nimport type { ModuleContext } from \"@vortex-os/core\";\n// Type-only — erased at compile time, so importing it does NOT pull the\n// `@vortex-os/memory-extended` add-on (or its native deps) into the module\n// graph of consumers that only need the types. The runtime engine is loaded\n// lazily inside the function body via `await import(...)`.\nimport type { vector } from \"@vortex-os/memory-extended\";\n\n/**\n * Start-of-session vectorization: fold newly-archived sessions and memories\n * into the semantic-recall index so `/recall` and the ambient \"did we discuss\n * this?\" path stay current without a manual rebuild.\n *\n * The heavy one-time cost (downloading the embedding model + embedding the\n * whole backlog) happens the first time recall is set up — via an explicit\n * `/recall`, or via the `vortex vectorize` setup worker that session start\n * spawns in the background when the add-on is installed and\n * `autoRecord.vectorizeAutoDownload` is on. From then on the model is cached\n * and this runs **incrementally** — memory rows whose hash changed, plus\n * sessions not yet vectorized (`onlyMissing`) — so the per-session-start cost\n * is small.\n *\n * `allowDownload` defaults false, so the automatic inline session-start call is\n * cache-only and never triggers a model download on its own; only the explicit\n * setup paths pass `allowDownload: true`. A throw is treated as \"skip\"\n * (best-effort): a missing model, a rebuild hiccup, or the add-on being absent\n * must never fail session start.\n */\nexport interface VectorizeResult {\n /** Memory rows (re)embedded this run. */\n readonly memories: number;\n /** Session chunks embedded this run (only the not-yet-vectorized ones). */\n readonly sessionChunks: number;\n}\n\nexport interface VectorizeOptions {\n /**\n * Embedding function. Default: the bundled local model\n * (`vector.createLocalEmbedder()`). Tests inject a deterministic fake so the\n * run needs no model and no network.\n */\n readonly embed?: vector.EmbedFn;\n /** Override the index DB path. Default `<dataDir>/_indexes/memory.sqlite`. */\n readonly dbPath?: string;\n /**\n * Allow the embedder to DOWNLOAD the model when it is not cached. Default\n * `false`: the automatic session-start path stays cache-only (a cache miss\n * throws fast — no ~470 MB download). The explicit `vortex vectorize` setup\n * worker passes `true` to bring the model into the cache the first time.\n * Ignored when `embed` is supplied (tests inject their own embedder).\n */\n readonly allowDownload?: boolean;\n}\n\nexport async function vectorizeIndex(\n ctx: ModuleContext,\n opts?: VectorizeOptions,\n): Promise<VectorizeResult> {\n // Lazy-load the optional add-on (mirrors catch-up). Resolves only when\n // `memory-extended` is installed alongside base; a lean install throws here\n // and the call site treats it as \"skip\".\n const { sqlite, vector, sessionArchive } = await import(\"@vortex-os/memory-extended\");\n\n const dbPath = opts?.dbPath ?? join(ctx.dataDir, \"_indexes\", \"memory.sqlite\");\n const memoryDir = join(ctx.dataDir, \"_memory\");\n // `localFilesOnly` is the real safety gate for this automatic path: if the\n // embedding model is not already cached, the first embed throws immediately\n // (no ~470 MB download) and the caller skips. So session-start vectorization\n // can never trigger an unprompted download, even if the index db exists for\n // some other reason. The model is downloaded only by the explicit, consented\n // `/recall` setup, which uses the default network-enabled embedder.\n const embed = opts?.embed ?? vector.createLocalEmbedder({ localFilesOnly: !opts?.allowDownload });\n\n const sqlStore = new sqlite.MemorySqliteStore(dbPath);\n const vecStore = new vector.MemoryVectorStore({ db: dbPath });\n const archive = new sessionArchive.SessionArchiveStore(ctx.dataDir);\n try {\n // Memory: refresh the sqlite hard-filter index (no model needed) then its\n // vectors. Best-effort per step — a missing _memory dir must not abort the\n // session pass.\n try {\n await sqlite.rebuildFromMemoryDir(sqlStore, memoryDir);\n } catch {\n // no _memory dir yet — nothing to index\n }\n // Both incremental (`onlyMissing`): embed only newly-added memories and\n // not-yet-vectorized sessions, so the per-session-start cost is bounded to\n // what actually changed — usually nothing or a single new session.\n const mem = await vecStore.rebuild(sqlStore, embed, { onlyMissing: true });\n const sess = await vecStore.rebuildSessions(archive, embed, { onlyMissing: true });\n return { memories: mem.indexed, sessionChunks: sess.chunks };\n } finally {\n archive.close();\n vecStore.close();\n sqlStore.close();\n }\n}\n"],"mappings":";;;AAAA,SAAS,YAAY;AAsDrB,eAAsB,eACpB,KACA,MAAuB;AAKvB,QAAM,EAAE,QAAQ,QAAQ,eAAc,IAAK,MAAM,OAAO,4BAA4B;AAEpF,QAAM,SAAS,MAAM,UAAU,KAAK,IAAI,SAAS,YAAY,eAAe;AAC5E,QAAM,YAAY,KAAK,IAAI,SAAS,SAAS;AAO7C,QAAM,QAAQ,MAAM,SAAS,OAAO,oBAAoB,EAAE,gBAAgB,CAAC,MAAM,cAAa,CAAE;AAEhG,QAAM,WAAW,IAAI,OAAO,kBAAkB,MAAM;AACpD,QAAM,WAAW,IAAI,OAAO,kBAAkB,EAAE,IAAI,OAAM,CAAE;AAC5D,QAAM,UAAU,IAAI,eAAe,oBAAoB,IAAI,OAAO;AAClE,MAAI;AAIF,QAAI;AACF,YAAM,OAAO,qBAAqB,UAAU,SAAS;IACvD,QAAQ;IAER;AAIA,UAAM,MAAM,MAAM,SAAS,QAAQ,UAAU,OAAO,EAAE,aAAa,KAAI,CAAE;AACzE,UAAM,OAAO,MAAM,SAAS,gBAAgB,SAAS,OAAO,EAAE,aAAa,KAAI,CAAE;AACjF,WAAO,EAAE,UAAU,IAAI,SAAS,eAAe,KAAK,OAAM;EAC5D;AACE,YAAQ,MAAK;AACb,aAAS,MAAK;AACd,aAAS,MAAK;EAChB;AACF;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vortex-os/base",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Base entry point for VortEX — a Multi-Agent Personal AI Work OS framework",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "vortex-os-project",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"main": "./dist/index.js",
|
|
33
33
|
"types": "./dist/index.d.ts",
|
|
34
34
|
"bin": {
|
|
35
|
-
"vortex": "
|
|
35
|
+
"vortex": "bin/vortex.mjs"
|
|
36
36
|
},
|
|
37
37
|
"exports": {
|
|
38
38
|
".": {
|
|
@@ -1,17 +1,31 @@
|
|
|
1
|
-
---
|
|
2
|
-
description:
|
|
3
|
-
argument-hint: <what to recall>
|
|
4
|
-
allowed-tools: Bash(npx vortex:*)
|
|
5
|
-
---
|
|
6
|
-
The user wants to recall earlier work: **$ARGUMENTS**
|
|
7
|
-
|
|
8
|
-
1.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
---
|
|
2
|
+
description: Keyword + semantic (hybrid) search over your memories and past conversations
|
|
3
|
+
argument-hint: <what to recall>
|
|
4
|
+
allowed-tools: Bash(npx vortex:*)
|
|
5
|
+
---
|
|
6
|
+
The user wants to recall earlier work: **$ARGUMENTS**
|
|
7
|
+
|
|
8
|
+
1. Pick the search mode from what the user is after:
|
|
9
|
+
- exact terms, an error code, a file name, an identifier, or a literal they quoted → `--mode keyword`
|
|
10
|
+
- a concept, a topic, or "something like X" / "did we discuss …" → `--mode semantic`
|
|
11
|
+
- unsure, or both apply → omit `--mode` (hybrid is the default — runs both lanes and fuses them)
|
|
12
|
+
Keyword matching wants a token of **3+ characters**; for a 1–2 character token prefer hybrid so the meaning-based lane can help.
|
|
13
|
+
2. From the instance root, run: `npx vortex recall "$ARGUMENTS" --k 5` (add `--mode keyword` or `--mode semantic` when one clearly fits).
|
|
14
|
+
3. Parse the JSON it prints. Each entry in `hits[]` has a name/title, `source`
|
|
15
|
+
(`memory` or `session-archive`), `score`, a date, and an `excerpt` — and, on a
|
|
16
|
+
hybrid or keyword run, `lanes` (which lane matched) and `fusedScore`.
|
|
17
|
+
4. Present the result plainly — never dump raw JSON:
|
|
18
|
+
- No hits → say nothing matched and suggest rephrasing.
|
|
19
|
+
- One strong hit → a single sentence ("you did **<name>** on <date> — reuse it?").
|
|
20
|
+
- Several → a short ranked list (≤5): name — date — one line on why it matches.
|
|
21
|
+
|
|
22
|
+
Keep it brief; this is a lookup, not a report.
|
|
23
|
+
|
|
24
|
+
**First-time setup (once per instance).** Recall uses a local search model that
|
|
25
|
+
downloads **once (~470 MB)**. If it has not been set up here yet (no
|
|
26
|
+
`data/_indexes/memory.sqlite`), ask before running — in plain words, no jargon —
|
|
27
|
+
e.g. *"Want me to make your past conversations searchable later? It downloads a
|
|
28
|
+
local search model once (~470 MB), and after that it's automatic."* — and run the command only if the user
|
|
29
|
+
agrees. After that one setup, new conversations are indexed automatically at each
|
|
30
|
+
session start, so later recalls — and the ambient "did we discuss this before?"
|
|
31
|
+
lookups — just work, with no further prompt or download.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "vortex-template-index/1",
|
|
3
|
+
"baseVersion": "0.5.0",
|
|
4
|
+
"files": [
|
|
5
|
+
{
|
|
6
|
+
"templateId": "commands/agenda.md",
|
|
7
|
+
"path": "commands/agenda.md",
|
|
8
|
+
"sha256": "54b38dd4a66c1495d5fb573fa644539d7fd0444d27be361674c54e8f4e3fe536"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"templateId": "commands/curate.md",
|
|
12
|
+
"path": "commands/curate.md",
|
|
13
|
+
"sha256": "c00f7dc53c802b100a90354b9713191c9d4909e69ef2b57cc14b2c25eeec5c88"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"templateId": "commands/recall.md",
|
|
17
|
+
"path": "commands/recall.md",
|
|
18
|
+
"sha256": "913451c33a6313c923e8433a198846bd5c6616234b1b1b337e15e0d5afe27337"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"templateId": "config/vortex.json",
|
|
22
|
+
"path": "config/vortex.json",
|
|
23
|
+
"sha256": "71d629ce0038534dc3921a1c5e507897ec8754df50a76ad4e9da93327e84b4d6"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"templateId": "routers/.cursorrules",
|
|
27
|
+
"path": "routers/.cursorrules",
|
|
28
|
+
"sha256": "724623db58fca38c386b0c28afd3503a46715a4b5f40ff4eee4daf78d1e4a5db"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"templateId": "routers/AGENTS.md",
|
|
32
|
+
"path": "routers/AGENTS.md",
|
|
33
|
+
"sha256": "422f925b62403c410478401f2fbbe538411b055336d9785c3a2efe7bb2ced72d"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"templateId": "routers/AI-RULES.md",
|
|
37
|
+
"path": "routers/AI-RULES.md",
|
|
38
|
+
"sha256": "4048467df07f6e344ba09ef5e7044fb21492fc63cd4c16e4ba2ffd5c7e15facf"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"templateId": "routers/CLAUDE.md",
|
|
42
|
+
"path": "routers/CLAUDE.md",
|
|
43
|
+
"sha256": "b778d6d322d7436d1391881fe9c9a16d17a99231bbd5fb6955c7bee1a08b5597"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"templateId": "routers/GEMINI.md",
|
|
47
|
+
"path": "routers/GEMINI.md",
|
|
48
|
+
"sha256": "752a3388610fafd649c50e80d0bd6ea471745218937ada71560a34b53783f5de"
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
VortEX Instance — Multi-Agent Personal AI Work OS
|
|
2
2
|
|
|
3
|
-
When working in this repository, you (Cursor) MUST read
|
|
4
|
-
single source of truth for
|
|
5
|
-
the commands available.
|
|
3
|
+
When working in this repository, you (Cursor) MUST read AI-RULES.md first. AI-RULES.md is the
|
|
4
|
+
single source of truth for shared behavior across all agents: the data/ layout, conventions,
|
|
5
|
+
default behaviors, and the commands available.
|
|
6
6
|
|
|
7
7
|
Cursor-specific config lives in .cursor/. Shared agent config lives in .agent/.
|
|
8
8
|
|
|
9
|
-
Per-agent files (CLAUDE.md,
|
|
10
|
-
rules
|
|
9
|
+
Per-agent entry files (CLAUDE.md, AGENTS.md, GEMINI.md, .cursorrules) hold only that agent's
|
|
10
|
+
own supplements; the shared rules live in AI-RULES.md, never duplicated per agent.
|
|
11
11
|
|
|
12
12
|
This instance was created from the @vortex-os/base framework. The framework code lives in
|
|
13
13
|
node_modules/@vortex-os/; you do not edit it. You work in data/ and use the vortex CLI and
|
|
@@ -1,18 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
type: agent-entry
|
|
3
|
+
status: active
|
|
4
|
+
---
|
|
2
5
|
|
|
3
|
-
|
|
4
|
-
working in this VortEX instance.
|
|
6
|
+
# VortEX Instance — Codex CLI entry
|
|
5
7
|
|
|
6
|
-
|
|
8
|
+
This is the file Codex CLI auto-loads in this VortEX instance. It holds only Codex-specific supplements; the rules shared by **every** agent live in `AI-RULES.md`.
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
this instance behaves. This `AGENTS.md` is only the auto-load entry point; the
|
|
10
|
-
full, host-agnostic behavior contract lives in `AGENT.md`.
|
|
10
|
+
## CRITICAL — load the shared rules first
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
The shared rules, default behaviors, `data/` layout, and commands for every agent in this instance are defined in **`AI-RULES.md`**. You MUST read and follow `./AI-RULES.md` **before responding to any request** — it is required reading, not optional.
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
👉 Read now: `./AI-RULES.md`
|
|
15
|
+
|
|
16
|
+
> Codex CLI has no auto-import directive, so this instruction *is* the load mechanism — do not skip it. Any other `AGENTS.md`-aware tool that reads this file must do the same: treat `AI-RULES.md` as the shared source of truth.
|
|
17
|
+
|
|
18
|
+
## Codex-specific supplements
|
|
19
|
+
|
|
20
|
+
- Dedicated dir: `.codex/`
|
|
21
|
+
- Shared dir: `.agent/`
|
|
22
|
+
|
|
23
|
+
## Cross-check tool (per `AI-RULES.md` → "Cross-check significant decisions")
|
|
24
|
+
|
|
25
|
+
For a **cross-model** check, Codex can call Claude Code headless: `claude -p "<prompt>"`. Otherwise use a clean-context Codex sub-task with only the relevant facts. Return only the verdict — you still decide and close by verifying against the code/tests. When you shell out to `claude -p`: close stdin (`< /dev/null`) so it doesn't wait ~3s for input, and set your own timeout.
|
|
26
|
+
|
|
27
|
+
For the **security-review** lens (per `AI-RULES.md` → "Security-review code changes"), run the same kind of pass but focused on security — path traversal / arbitrary write, command / SQL / template injection, secret leakage, SSRF, unsafe deserialization, missing input validation — via `claude -p` (cross-model) or a clean-context Codex sub-task given only the diff + the threat surface.
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: agent-entry
|
|
3
|
+
status: active
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# VortEX Instance — Shared Agent Rules (AI-RULES)
|
|
7
|
+
|
|
8
|
+
> A vortex absorbing context, an executable runtime running it through agents.
|
|
9
|
+
|
|
10
|
+
These are the rules shared by **every** agent working in this instance (Claude Code, Codex CLI, Gemini CLI, Cursor) — the single source of truth for shared behavior. Each agent auto-loads its own entry file (`CLAUDE.md`, `AGENTS.md`, `GEMINI.md`, `.cursorrules`), which holds that agent's specific supplements and loads **this** file for everything shared: Claude and Gemini import it automatically (`@AI-RULES.md`), while Codex and Cursor are instructed to read it first.
|
|
11
|
+
|
|
12
|
+
This instance was created from the `@vortex-os/base` framework. The framework code lives in `node_modules/@vortex-os/`; you do not edit it. You work in `data/` — your own content — and use the `vortex` CLI and the `/`-commands it installs.
|
|
13
|
+
|
|
14
|
+
**Framework-owned vs yours — so updates never clobber your rules.** This file (`AI-RULES.md`), the per-agent router files (`AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, `.cursorrules`), and the installed `/`-command prompts are **framework-owned templates** — a future update may refresh them, so do **not** keep your own rules in them. Put durable personal rules in **`data/_memory/`** (the framework never touches `data/`, so they survive every update). They load in two tiers — see "The `data/` layout" → memory loading. To **override** a framework instruction (not just add a preference), say so explicitly in a memory; precedence is **framework default < your `data/_memory/` rule < your current request**. The split: **framework files update, `data/` is yours.**
|
|
15
|
+
|
|
16
|
+
## First thing to check
|
|
17
|
+
|
|
18
|
+
If `data/_memory/user_profile.md` is missing, this instance has not been set up yet. Run:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
npx vortex init --name "<your name>" --role "<your role>" --task "<what you're working on>"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
`init` creates a user-profile memory, today's first worklog, the agent slash-commands, and wires the session hooks. Everything after that grows as you work.
|
|
25
|
+
|
|
26
|
+
## How VortEX behaves by default — auto the plumbing, propose the prose
|
|
27
|
+
|
|
28
|
+
Operating principle: **auto-maintain the operational memory; propose changes to the knowledge base.** You should never have to learn commands to get value — the records that make recall smarter accumulate on their own, while you keep full control over your own topic documentation.
|
|
29
|
+
|
|
30
|
+
**Auto (no prompt — append-only operational records; *show, don't ask*):**
|
|
31
|
+
- **Session start.** Run the start ritual: if a sync remote is configured, `git pull` (report conflicts, never auto-resolve); detect the environment if one is configured (and if a label resolves with a matching `.agent/env/<label>.md`, read that file as session-specific operating guidance); backfill any worklog missing from prior sessions; **load your `data/_memory/` always-on rules and scan its `_INDEX.md`** (see "The `data/` layout" → memory loading); report status. If the `SessionStart` hook is configured, the **data-side** ritual already ran and its report was **injected into your context — the user has NOT seen it. Start your first reply by relaying the key points: recent work, what's in progress, the time, any update notices, and any warnings.** If no hook ran, perform the ritual yourself first, then report the same status. (Automatic means the records updated on their own — informing the user is still your job.)
|
|
32
|
+
- **Worklog.** As a work unit completes — and at session wind-down ("that's it for today", "wrap up") — ensure today's worklog exists and append the work. The agent is the primary path; the `SessionEnd` hook is the net.
|
|
33
|
+
- **Decisions.** When the user makes a *substantive* decision ("let's go with X"), record it in the Decision Log. Real decisions, not casual asides.
|
|
34
|
+
- **Ambient recall** (read-only). When the user references earlier work, run `/recall <the reference>` and weave a confident hit into one sentence. One nudge, not a list; drop it if waved off. Conversations are vectorized automatically at session start. With the `@vortex-os/memory-extended` add-on installed, the first session also sets recall up on its own — downloading the local search model (~470 MB, once) in the **background** — so recall and these ambient lookups just work with no prompt and no manual step (the session-start report notes the one-time download while it runs; relay that). To keep that download manual instead (metered line, CI), set `autoRecord.vectorizeAutoDownload: false` (or env `VORTEX_VECTORIZE_AUTO_DOWNLOAD=0`) and set it up once with `/recall` or `vortex vectorize`.
|
|
35
|
+
|
|
36
|
+
These are **append-only and transparent**: do them without a yes/no prompt, but surface a brief, non-blocking note so the user always sees what was recorded. Everything lands in git and is reversible; disable any of them via `.agent/vortex.json` (`autoRecord.*`). `git push` stays **explicit**, never automatic.
|
|
37
|
+
|
|
38
|
+
**Propose (ask first — the one place friction is intentional):**
|
|
39
|
+
- **Knowledge-base documentation.** Changes to the user's topic documentation (the `data/<topic>/` tree and hubs) are **proposed, never auto-written**: "you've done X, Y, Z on this — update the existing doc, or create a new folder?" The user owns the shape of their knowledge base; the agent never silently restructures it.
|
|
40
|
+
|
|
41
|
+
The line is technical: **append-only operational logs are safe to auto-write; structural or content changes to the knowledge base are proposed.**
|
|
42
|
+
|
|
43
|
+
## Before you modify a repo — check it's current
|
|
44
|
+
|
|
45
|
+
Before you start **substantively modifying files in a git repository** (any folder git tracks — note `.git` may be a *file*, not a directory, inside a worktree or submodule), make sure it isn't stale: run `git fetch`, then `git rev-list --left-right --count HEAD...@{upstream}` (the two numbers are commits-ahead and commits-behind). If you're **behind**, say so and ask whether to `git pull --ff-only` before continuing. If **both** sides moved (diverged), do **not** auto-pull — report it and let the user decide. Do this **once per repo per session**; skip it when the repo has no upstream, or for trivial edits (a one-line fix, a quick note). The instance repo is already pulled at session start — don't re-check that one. Offline or any git error: just proceed, noting you couldn't verify. This prevents building on a stale base or creating a divergent history.
|
|
46
|
+
|
|
47
|
+
## Framework updates
|
|
48
|
+
|
|
49
|
+
Session start checks **once per session** whether a newer `@vortex-os/base` is published — this **contacts the npm registry over the network**. Mention that to the user when it first comes up, and note they can turn it off with `.agent/vortex.json` → `"updates": { "check": "off" }`. Two kinds of notice may appear in the start report:
|
|
50
|
+
|
|
51
|
+
- **"template update(s) ready to apply"** — the installed package already has newer framework templates this instance has not applied. Offer to run `npx vortex update` — it refreshes the routers / command prompts / config, **hash-guarded: your edits are never overwritten** (a framework file you changed is parked alongside as `<file>.new` for you to merge).
|
|
52
|
+
- **"update available: @vortex-os/base X → Y"** — a newer version is published. Tell the user in one sentence and **ask once** whether to update now. On yes, run **the exact command the report printed** — it is tailored to this instance (local vs global; npm/pnpm/yarn), e.g. `npm i @vortex-os/base@latest && npx vortex update` (install the new package, then apply its templates); use the printed command, not this example. Then confirm it landed with `npx vortex check-updates`. On no, drop it for the session. **Never install without asking.**
|
|
53
|
+
|
|
54
|
+
When the user asks whether there's an update, run `npx vortex check-updates` (read-only — contacts the npm registry and prints the latest version and the exact update command).
|
|
55
|
+
|
|
56
|
+
## Working style
|
|
57
|
+
|
|
58
|
+
**Explain simply and briefly — assume the user is not an IT expert.** Default to plain language. Lead with the conclusion. Keep ordinary replies short (a few lines, at most a few bullets); add tables/code only when they earn their place. Unpack any unavoidable technical term in a line or with a plain analogy, and when you must use a technical or non-native term, gloss it in the user's language in parentheses right after it. Write in a **standard written register** — clear and plain, never casual or colloquial speech. Match the user's *level* of detail, not their *voice*: don't echo their slang, tics, or phrasing back (it drifts your tone across the session and the next), unless the current request explicitly asks for a particular style.
|
|
59
|
+
|
|
60
|
+
**Ask one decision at a time.** When you need the user to decide, ask a single question and wait — do not stack several at once. Only batch when the choices are genuinely independent.
|
|
61
|
+
|
|
62
|
+
**Match reasoning effort to the task.** Don't over-reason trivial asks — a status check, a one-line edit, a lookup; don't under-reason heavy ones — architecture design, multi-file refactors, large debugging or migration, broad reviews. If the host exposes a tunable reasoning/thinking level and the task ahead clearly needs a different one than the session is set for, recommend the change — but rarely: only at a real boundary (a sizable task's start, a major topic shift, a substantial new directive), one or two times across a long session, never per question.
|
|
63
|
+
|
|
64
|
+
**Cross-check significant decisions.** For a non-trivial design, implementation, or fix choice, seek an adversarial second opinion before relying on it — a **different model/tool** if one is available, otherwise a **sub-agent given a clean context and only the relevant facts + acceptance criteria**. Agreement is a signal, not proof: the main thread still decides, and closes by verifying against ground truth (usually the code and tests). Scale to the stakes; skip trivial edits. (The per-host file names the concrete tool.)
|
|
65
|
+
|
|
66
|
+
**Security-review code changes.** A distinct lens from the correctness cross-check above (code can work and still be unsafe). Before relying on a non-trivial code change that touches a security-sensitive surface — file paths/writes, shell/exec, network requests, deserialization, auth/secrets, or any external/untrusted input — run a security-focused adversarial pass. Use the same mechanism: a **different model/tool** if available, otherwise a **clean-context sub-agent given only the diff + the threat surface**. Look for the usual classes — path traversal / arbitrary write, command / SQL / template injection, secret leakage, SSRF, unsafe deserialization, missing input validation. Judge findings on the merits; close by fixing and re-verifying against the code. Scale to the surface; skip pure docs/test/format edits. (The per-host file names the concrete tool.)
|
|
67
|
+
|
|
68
|
+
**Time a handed-off task.** When the user hands a task off to run while they are away — signals like "do this and ping me", "I'm going to sleep", "back later", or any clearly unattended multi-step task — stamp the **real start time** (via a time command, never a guess) the moment you take it on. When you report completion, include the **elapsed time and the finish time**, both computed from real timestamps (never estimated), and record `started HH:MM → finished HH:MM (N min)` in the worklog — add the date when start and finish fall on different days, and log it under the finish day. Skip this for quick interactive back-and-forth, where timing would just be noise.
|
|
69
|
+
|
|
70
|
+
**Own routine sequencing.** Decide work order yourself — verify dependencies first (batch edits that touch the same file; finish in-flight work before switching context). Procedure is agent-owned; ask only when the path forks on user intent, on the structure of user-owned content, or on a hard-to-reverse action (commit, push, deploy, delete).
|
|
71
|
+
|
|
72
|
+
**Protect the main thread's context — delegate heavy, self-contained work.** A long session fills its context window (the reason you end up reopening sessions); offloading keeps the main thread lean *without* losing quality, if done right. When a task is self-contained and clearly specifiable — a broad search, multi-file exploration, a long-output investigation, bulk generation — hand it to a separate agent/subtask with a **precise spec and acceptance criteria**, and bring back only the conclusion. The main thread keeps the plan, the decisions, and the synthesis — it never delegates the *judgment* — and **verifies a delegated result before building on it** (so have the sub-agent report its evidence: what it inspected, the key findings, what's uncertain). **Don't delegate** when the spec is fuzzy, the call is a judgment, the material is sensitive, the work is tightly coupled to the edit you're making, or verifying the result would cost as much as just doing it. Scale the mechanism to the host (the per-host file, e.g. `CLAUDE.md`, names the concrete tools); where a host has no sub-agents, the fallback is a fresh session plus a short handoff note.
|
|
73
|
+
|
|
74
|
+
## The `data/` layout
|
|
75
|
+
|
|
76
|
+
Your content lives under `data/`. Each category answers a different question:
|
|
77
|
+
|
|
78
|
+
| Category | Question it answers |
|
|
79
|
+
|---|---|
|
|
80
|
+
| `worklog/` | "What happened today?" — chronological, one entry per day (`YYYY/MM/YYYY-MM-DD-keyword.md`). |
|
|
81
|
+
| `decision-log/` | "Why did we choose X over Y?" — per-decision record with context + alternatives. |
|
|
82
|
+
| `_memory/` | "What rule or fact must survive every session?" — curated; loads in two tiers (below). |
|
|
83
|
+
| `runbooks/` | "What is the procedure when X breaks?" — repeatable steps with `last_tested` aging. |
|
|
84
|
+
| `hubs/` | "Where do I find everything about topic Z?" — a cross-cut landing page; grows organically once 3+ categories accumulate on the same topic. |
|
|
85
|
+
| `inbox/` | "Where does an unfiled note land before I sort it?" |
|
|
86
|
+
|
|
87
|
+
A typical day flows from short-lived capture (worklog) into longer-lived artifacts (decision-log, runbook, memory, hub). These are common promotion patterns, not required flows.
|
|
88
|
+
|
|
89
|
+
**Memory loading (two tiers — so rules are active without wasting context).** Not every memory should sit in context all the time. Load them in two tiers:
|
|
90
|
+
|
|
91
|
+
1. **Always-on rules** — the few global rules that apply across all your VortEX work (e.g. how you want answers written, tool conventions). Mark a memory `scope: always` in its frontmatter; **load these every session.** Keep the set small and each one short.
|
|
92
|
+
2. **On-demand** — everything else (project facts, situational rules, reference). At session start scan only the one-line **`_INDEX.md`** (name + description per memory) to know what exists; **read a memory's body only when the conversation makes it relevant**, and re-check the index as the topic shifts. `_INDEX.md` is regenerated by `npx vortex reindex`; keep each memory's `description` sharp, since that one line is what decides whether it gets loaded.
|
|
93
|
+
|
|
94
|
+
So: global rules are always in view; everything else is a cheap index entry until needed.
|
|
95
|
+
|
|
96
|
+
## Commands you'll use
|
|
97
|
+
|
|
98
|
+
These slash-commands are installed into `.claude/commands/` by `vortex init` (the agent runs the underlying `vortex` CLI and presents the result):
|
|
99
|
+
|
|
100
|
+
| Command | What it does |
|
|
101
|
+
|---|---|
|
|
102
|
+
| `/vortex` | Instance operations: `init`, `status`, `import`, `doctor`, `update`, `help`. |
|
|
103
|
+
| `/session-start` | Start-of-session report — recent work, current counts, the time. |
|
|
104
|
+
| `/log <section>` | Append a section to today's worklog (creates it if needed). |
|
|
105
|
+
| `/decision <slug> <title>` | Create a new Decision Log entry from the template. |
|
|
106
|
+
| `/recall <query>` | Keyword + semantic (hybrid) search over your memories and past sessions; the agent picks the mode. *(Only when the optional `@vortex-os/memory-extended` add-on is installed.)* |
|
|
107
|
+
| `/agenda` | "What should I focus on?" — synthesizes open tasks, decisions, recent activity. |
|
|
108
|
+
| `/reindex [dir]` | Regenerate `_INDEX.md` for a category (or all). Idempotent. |
|
|
109
|
+
|
|
110
|
+
You can also run any of these directly: `npx vortex <command> [args]`.
|
|
111
|
+
|
|
112
|
+
## Optional add-ons
|
|
113
|
+
|
|
114
|
+
- **`@vortex-os/memory-extended`** — keyword + semantic (hybrid) recall over memories and past conversation sessions. Install alongside this instance to light up `/recall`; without it, everything else works and `/recall` is simply absent.
|
|
115
|
+
|
|
116
|
+
## Agent routing
|
|
117
|
+
|
|
118
|
+
`AI-RULES.md` (this file) is the single source of truth for shared rules. Each agent auto-loads its own entry file, which holds only that agent's supplements and pulls in this file — Claude and Gemini import it automatically (`@AI-RULES.md`); Codex and Cursor are instructed to read it first. Do not duplicate shared rules into the per-agent files.
|
|
119
|
+
|
|
120
|
+
| Agent | Auto-loads | Reaches shared rules via | Dedicated config |
|
|
121
|
+
|---|---|---|---|
|
|
122
|
+
| Claude Code | `CLAUDE.md` | `@AI-RULES.md` import (automatic) | `.claude/` |
|
|
123
|
+
| Gemini CLI | `GEMINI.md` | `@AI-RULES.md` import (automatic) | `.gemini/` |
|
|
124
|
+
| Codex CLI | `AGENTS.md` | strong directive to read `AI-RULES.md` | `.codex/` |
|
|
125
|
+
| Cursor | `.cursorrules` (and `AGENTS.md`) | directive to read `AI-RULES.md` | `.cursor/` |
|
|
126
|
+
|
|
127
|
+
All agents share `.agent/`.
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
This is the first file Claude Code reads when working in this VortEX instance.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Shared rules (required — auto-loaded)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
The rules shared by every agent in this instance live in `AI-RULES.md`, imported here so Claude Code loads it automatically at launch:
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
@AI-RULES.md
|
|
10
|
+
|
|
11
|
+
This `CLAUDE.md` holds only Claude Code-specific supplements; everything shared is in `AI-RULES.md` (above).
|
|
10
12
|
|
|
11
13
|
## Claude Code-specific config
|
|
12
14
|
|
|
@@ -17,4 +19,21 @@ This `CLAUDE.md` holds only Claude Code-specific supplements. For everything els
|
|
|
17
19
|
|
|
18
20
|
## Reasoning effort
|
|
19
21
|
|
|
20
|
-
Claude Code exposes a reasoning/effort level you cannot read as a value. When `
|
|
22
|
+
Claude Code exposes a reasoning/effort level you cannot read as a value. When `AI-RULES.md` → "Working style" calls for an effort change, recommend a *target* ("this looks like high-effort work — raise it if you're below that") rather than asserting the current setting. The user changes it on their side; it takes effect from the next turn, not the current one.
|
|
23
|
+
|
|
24
|
+
## Delegating to sub-agents (context economy)
|
|
25
|
+
|
|
26
|
+
This is the Claude Code mechanism behind `AI-RULES.md` → "Working style" → *delegate heavy, self-contained work*. The point is to spend the **sub-agent's** context on the heavy part and return only the conclusion, so the main thread stays lean across a long day.
|
|
27
|
+
|
|
28
|
+
- **Task / Agent tool — the usual first reach for self-contained work.** Spawn a sub-agent for one scoped, fully-specifiable job; it runs in its own context and only its final answer comes back. Use the **Explore** agent for "search across the repo and tell me the conclusion" (it reads excerpts, not whole files), and a **general-purpose** agent for a multi-step job you can spell out up front. Give it a precise spec + what "done" looks like and have it return its evidence; **verify what it returns** before building on it. (Not for fuzzy, judgment-heavy, or tightly-coupled work — see `AI-RULES.md` → "Working style".)
|
|
29
|
+
- **Several at once.** When jobs are independent, launch them in one message so they run in parallel (e.g. explore three subsystems at once), then synthesize on the main thread.
|
|
30
|
+
- **Custom agents (`.claude/agents/*.md`).** For a delegation you repeat, define a named specialist once and reuse it. Not installed by default — add when a pattern recurs.
|
|
31
|
+
- **Workflows (multi-agent orchestration).** For breadth one context can't hold — a broad review, an audit, a migration across many files. Token-heavy and fan-out-y, so **only when the user explicitly asks** for that scale; otherwise prefer a few Task agents.
|
|
32
|
+
|
|
33
|
+
Do **not** delegate the judgment — the main thread owns the plan, the decisions, and the final synthesis. Delegate the reading, the searching, the bulk generation; keep the deciding.
|
|
34
|
+
|
|
35
|
+
## Cross-check tool (per `AI-RULES.md` → "Cross-check significant decisions")
|
|
36
|
+
|
|
37
|
+
For the adversarial cross-check that `AI-RULES.md` calls for: use a **Task sub-agent with a clean context** (give it only the relevant facts + acceptance criteria) for a same-model check; if the **Codex CLI** is installed, `codex exec -C <repo> -s read-only` is a stronger **cross-model** check. Bring back only the verdict — the main thread still decides and closes by verifying against the code/tests. When you shell out to `codex exec`: close stdin (`< /dev/null`) so it doesn't stall waiting for input, set your own timeout (the host's may not stop a runaway), and keep the reviewer read-only (`-s read-only`).
|
|
38
|
+
|
|
39
|
+
For the **security-review** lens (per `AI-RULES.md` → "Security-review code changes"): Claude Code ships a `/security-review` command that reviews the pending diff on the current branch — use it for the security pass. For a stronger or independent check, the same `codex exec -C <repo> -s read-only` (cross-model) or a clean-context Task sub-agent (give it only the diff + the threat surface) applies, prompted for the security classes rather than general correctness.
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
This is the first file Gemini CLI reads when working in this VortEX instance.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Shared rules (required — auto-loaded)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
The rules shared by every agent in this instance live in `AI-RULES.md`, imported here so Gemini CLI loads it automatically at launch:
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
@AI-RULES.md
|
|
10
|
+
|
|
11
|
+
This `GEMINI.md` holds only Gemini-specific supplements; everything shared is in `AI-RULES.md` (above).
|
|
10
12
|
|
|
11
13
|
## Gemini-specific config
|
|
12
14
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../plugins/session-rituals/src/catch-up.ts"],"sourcesContent":["import type { ModuleContext } from \"@vortex-os/core\";\n// Type-only — erased at compile time, so importing it does NOT pull the\n// `@vortex-os/memory-extended` add-on (or its native sqlite/level deps) into\n// the module graph of consumers that only need the types. The runtime engine\n// is loaded lazily inside the function body via `await import(...)`.\nimport type { sessionArchive } from \"@vortex-os/memory-extended\";\n\n/**\n * Start-of-session \"catch-up\": fold conversation transcripts into the local\n * search archive without the user ever having to wrap up a session.\n *\n * Two sources, one pass:\n * - **local (a)** — this machine's own transcripts that are not archived yet,\n * read from the agent's transcript store and scoped to the current project.\n * - **pulled (b)** — transcripts created on another machine that arrived as\n * normalized text via git sync. Their text is present but this machine's\n * DB (local, derived, gitignored) has never indexed them.\n *\n * Text only — vectorization is deferred to recall/rebuild so session start\n * stays fast. The whole step is gated by `autoRecord.archive` at the call site\n * and is best-effort: callers should treat a thrown archive backend (e.g. the\n * native sqlite module not built) as \"skip\", never as a fatal start error.\n */\nexport interface CatchUpResult {\n /** Local transcripts newly archived this run (source a). */\n readonly ingestedLocal: number;\n /** Normalized transcripts from another machine newly indexed (source b). */\n readonly indexedPulled: number;\n /** Per-session ingest errors (source a). */\n readonly errors: number;\n}\n\nexport interface CatchUpOptions {\n /** Restrict local ingest to one project's transcripts. Default: `ctx.repoRoot`. */\n readonly cwd?: string;\n /**\n * Transcript adapters for local ingest. Default: Claude Code only. Other\n * hosts (Codex, Gemini) can be added by a caller; tests inject fakes so the\n * scan never touches the real home directory.\n */\n readonly adapters?: sessionArchive.IngestParams[\"adapters\"];\n /** Adapter environment override (e.g. a sandbox HOME). Tests use this. */\n readonly env?: sessionArchive.IngestParams[\"env\"];\n}\n\nexport async function catchUpSessions(\n ctx: ModuleContext,\n opts?: CatchUpOptions,\n): Promise<CatchUpResult> {\n // Lazy-load the optional add-on. Base ships without `memory-extended`; this\n // import resolves only when the add-on is installed alongside it. The call\n // site already gates this step on `autoRecord.archive` and treats a thrown\n // backend as \"skip\", so a missing add-on surfaces as a normal load error\n // the caller can catch.\n const { sessionArchive } = await import(\"@vortex-os/memory-extended\");\n\n const dataDir = ctx.dataDir;\n const cwd = opts?.cwd ?? ctx.repoRoot;\n const adapters = opts?.adapters ?? [sessionArchive.claudeCodeAdapter];\n\n // (a) Ingest this machine's not-yet-archived transcripts for the current\n // project. Writes the normalized copy into the archive (which git syncs) and\n // a local DB row. Text only — no vectorization here.\n const ingestResult = await sessionArchive.ingest({ adapters, dataDir, cwd, env: opts?.env });\n\n // (b) Index normalized transcripts that arrived from another machine via git\n // pull — their text is on disk but this machine's DB has no row yet.\n const store = new sessionArchive.SessionArchiveStore(dataDir);\n let indexedPulled = 0;\n try {\n indexedPulled = store.reindexFromNormalized().indexed;\n } finally {\n store.close();\n }\n\n return {\n ingestedLocal: ingestResult.sessionsIngested,\n indexedPulled,\n errors: ingestResult.errors.length,\n };\n}\n"],"mappings":";;;;;;;AA6CA,eAAsB,gBACpB,KACA,MAAqB;AAOrB,QAAM,EAAE,eAAc,IAAK,MAAM,OAAO,4BAA4B;AAEpE,QAAM,UAAU,IAAI;AACpB,QAAM,MAAM,MAAM,OAAO,IAAI;AAC7B,QAAM,WAAW,MAAM,YAAY,CAAC,eAAe,iBAAiB;AAKpE,QAAM,eAAe,MAAM,eAAe,OAAO,EAAE,UAAU,SAAS,KAAK,KAAK,MAAM,IAAG,CAAE;AAI3F,QAAM,QAAQ,IAAI,eAAe,oBAAoB,OAAO;AAC5D,MAAI,gBAAgB;AACpB,MAAI;AACF,oBAAgB,MAAM,sBAAqB,EAAG;EAChD;AACE,UAAM,MAAK;EACb;AAEA,SAAO;IACL,eAAe,aAAa;IAC5B;IACA,QAAQ,aAAa,OAAO;;AAEhC;","names":[]}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: agent-entry
|
|
3
|
-
status: active
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# VortEX Instance — Multi-Agent Personal AI Work OS
|
|
7
|
-
|
|
8
|
-
> A vortex absorbing context, an executable runtime running it through agents.
|
|
9
|
-
|
|
10
|
-
This is the unified entry point for every agent working in this instance (Claude Code, Codex CLI, Gemini CLI, Cursor). The per-agent files (`CLAUDE.md`, `AGENTS.md`, `CODEX.md`, `GEMINI.md`, `.cursorrules`) all route here — this file is the single source of truth.
|
|
11
|
-
|
|
12
|
-
This instance was created from the `@vortex-os/base` framework. The framework code lives in `node_modules/@vortex-os/`; you do not edit it. You work in `data/` — your own content — and use the `vortex` CLI and the `/`-commands it installs.
|
|
13
|
-
|
|
14
|
-
## First thing to check
|
|
15
|
-
|
|
16
|
-
If `data/_memory/user_profile.md` is missing, this instance has not been set up yet. Run:
|
|
17
|
-
|
|
18
|
-
```
|
|
19
|
-
npx vortex init --name "<your name>" --role "<your role>" --task "<what you're working on>"
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
`init` creates a user-profile memory, today's first worklog, the agent slash-commands, and wires the session hooks. Everything after that grows as you work.
|
|
23
|
-
|
|
24
|
-
## How VortEX behaves by default — auto the plumbing, propose the prose
|
|
25
|
-
|
|
26
|
-
Operating principle: **auto-maintain the operational memory; propose changes to the knowledge base.** You should never have to learn commands to get value — the records that make recall smarter accumulate on their own, while you keep full control over your own topic documentation.
|
|
27
|
-
|
|
28
|
-
**Auto (no prompt — append-only operational records; *show, don't ask*):**
|
|
29
|
-
- **Session start.** Run the start ritual: if a sync remote is configured, `git pull` (report conflicts, never auto-resolve); detect the environment if one is configured; backfill any worklog missing from prior sessions; report status (recent work, what's in progress, the time). Where the `SessionStart` hook is configured this runs automatically; otherwise perform it as the first action of the session.
|
|
30
|
-
- **Worklog.** As a work unit completes — and at session wind-down ("that's it for today", "wrap up") — ensure today's worklog exists and append the work. The agent is the primary path; the `SessionEnd` hook is the net.
|
|
31
|
-
- **Decisions.** When the user makes a *substantive* decision ("let's go with X"), record it in the Decision Log. Real decisions, not casual asides.
|
|
32
|
-
- **Ambient recall** (read-only). When the user references earlier work, run `/recall <the reference>` and weave a confident hit into one sentence. One nudge, not a list; drop it if waved off.
|
|
33
|
-
|
|
34
|
-
These are **append-only and transparent**: do them without a yes/no prompt, but surface a brief, non-blocking note so the user always sees what was recorded. Everything lands in git and is reversible; disable any of them via `.agent/vortex.json` (`autoRecord.*`). `git push` stays **explicit**, never automatic.
|
|
35
|
-
|
|
36
|
-
**Propose (ask first — the one place friction is intentional):**
|
|
37
|
-
- **Knowledge-base documentation.** Changes to the user's topic documentation (the `data/<topic>/` tree and hubs) are **proposed, never auto-written**: "you've done X, Y, Z on this — update the existing doc, or create a new folder?" The user owns the shape of their knowledge base; the agent never silently restructures it.
|
|
38
|
-
|
|
39
|
-
The line is technical: **append-only operational logs are safe to auto-write; structural or content changes to the knowledge base are proposed.**
|
|
40
|
-
|
|
41
|
-
## Working style
|
|
42
|
-
|
|
43
|
-
**Explain simply and briefly — assume the user is not an IT expert.** Default to plain language. Lead with the conclusion. Keep ordinary replies short (a few lines, at most a few bullets); add tables/code only when they earn their place. Unpack any unavoidable technical term in a line or with a plain analogy.
|
|
44
|
-
|
|
45
|
-
**Ask one decision at a time.** When you need the user to decide, ask a single question and wait — do not stack several at once. Only batch when the choices are genuinely independent.
|
|
46
|
-
|
|
47
|
-
**Match reasoning effort to the task.** Don't over-reason trivial asks — a status check, a one-line edit, a lookup; don't under-reason heavy ones — architecture design, multi-file refactors, large debugging or migration, broad reviews. If the host exposes a tunable reasoning/thinking level and the task ahead clearly needs a different one than the session is set for, recommend the change — but rarely: only at a real boundary (a sizable task's start, a major topic shift, a substantial new directive), one or two times across a long session, never per question.
|
|
48
|
-
|
|
49
|
-
## The `data/` layout
|
|
50
|
-
|
|
51
|
-
Your content lives under `data/`. Each category answers a different question:
|
|
52
|
-
|
|
53
|
-
| Category | Question it answers |
|
|
54
|
-
|---|---|
|
|
55
|
-
| `worklog/` | "What happened today?" — chronological, one entry per day (`YYYY/MM/YYYY-MM-DD-keyword.md`). |
|
|
56
|
-
| `decision-log/` | "Why did we choose X over Y?" — per-decision record with context + alternatives. |
|
|
57
|
-
| `_memory/` | "What rule or fact must survive every session?" — curated facts reloaded each session start. |
|
|
58
|
-
| `runbooks/` | "What is the procedure when X breaks?" — repeatable steps with `last_tested` aging. |
|
|
59
|
-
| `hubs/` | "Where do I find everything about topic Z?" — a cross-cut landing page; grows organically once 3+ categories accumulate on the same topic. |
|
|
60
|
-
| `inbox/` | "Where does an unfiled note land before I sort it?" |
|
|
61
|
-
|
|
62
|
-
A typical day flows from short-lived capture (worklog) into longer-lived artifacts (decision-log, runbook, memory, hub). These are common promotion patterns, not required flows.
|
|
63
|
-
|
|
64
|
-
## Commands you'll use
|
|
65
|
-
|
|
66
|
-
These slash-commands are installed into `.claude/commands/` by `vortex init` (the agent runs the underlying `vortex` CLI and presents the result):
|
|
67
|
-
|
|
68
|
-
| Command | What it does |
|
|
69
|
-
|---|---|
|
|
70
|
-
| `/vortex` | Instance operations: `init`, `status`, `import`, `doctor`, `help`. |
|
|
71
|
-
| `/session-start` | Start-of-session report — recent work, current counts, the time. |
|
|
72
|
-
| `/log <section>` | Append a section to today's worklog (creates it if needed). |
|
|
73
|
-
| `/decision <slug> <title>` | Create a new Decision Log entry from the template. |
|
|
74
|
-
| `/recall <query>` | Semantic search over your memories and past sessions. *(Only when the optional `@vortex-os/memory-extended` add-on is installed.)* |
|
|
75
|
-
| `/agenda` | "What should I focus on?" — synthesizes open tasks, decisions, recent activity. |
|
|
76
|
-
| `/reindex [dir]` | Regenerate `_INDEX.md` for a category (or all). Idempotent. |
|
|
77
|
-
|
|
78
|
-
You can also run any of these directly: `npx vortex <command> [args]`.
|
|
79
|
-
|
|
80
|
-
## Optional add-ons
|
|
81
|
-
|
|
82
|
-
- **`@vortex-os/memory-extended`** — semantic recall over memories and past conversation sessions. Install alongside this instance to light up `/recall`; without it, everything else works and `/recall` is simply absent.
|
|
83
|
-
|
|
84
|
-
## Agent routing
|
|
85
|
-
|
|
86
|
-
| Agent | Entry | Shared config | Dedicated config |
|
|
87
|
-
|---|---|---|---|
|
|
88
|
-
| Claude Code | `CLAUDE.md` → `AGENT.md` | `.agent/` | `.claude/` |
|
|
89
|
-
| Codex CLI | `AGENTS.md` → `AGENT.md` (Codex auto-loads `AGENTS.md`; `CODEX.md` is legacy/manual) | `.agent/` | `.codex/` |
|
|
90
|
-
| Gemini CLI | `GEMINI.md` → `AGENT.md` | `.agent/` | `.gemini/` |
|
|
91
|
-
| Cursor | `.cursorrules` → `AGENT.md` | `.agent/` | `.cursor/` |
|
|
92
|
-
|
|
93
|
-
Per-agent files contain only agent-specific supplements. System-wide rules belong in this file.
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# CODEX.md
|
|
2
|
-
|
|
3
|
-
NOTE: Codex CLI auto-loads `AGENTS.md`, not this file. The auto-load entry for
|
|
4
|
-
Codex is `AGENTS.md` (which routes to `AGENT.md`). This `CODEX.md` is a manual /
|
|
5
|
-
legacy supplement — read it only when explicitly pointed here.
|
|
6
|
-
|
|
7
|
-
## Route to unified entry
|
|
8
|
-
|
|
9
|
-
Read [`AGENT.md`](./AGENT.md) first — it is the single source of truth for how this instance behaves.
|
|
10
|
-
|
|
11
|
-
This `CODEX.md` holds only Codex-specific supplements. For everything else, refer to `AGENT.md`.
|
|
12
|
-
|
|
13
|
-
## Codex-specific config
|
|
14
|
-
|
|
15
|
-
- Dedicated dir: `.codex/`
|
|
16
|
-
- Shared dir: `.agent/`
|
|
File without changes
|