@vortex-os/base 0.2.3 → 0.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vortex-os/base",
3
- "version": "0.2.3",
3
+ "version": "0.4.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",
@@ -31,6 +31,9 @@
31
31
  "type": "module",
32
32
  "main": "./dist/index.js",
33
33
  "types": "./dist/index.d.ts",
34
+ "bin": {
35
+ "vortex": "./bin/vortex.mjs"
36
+ },
34
37
  "exports": {
35
38
  ".": {
36
39
  "types": "./dist/index.d.ts",
@@ -39,11 +42,14 @@
39
42
  },
40
43
  "files": [
41
44
  "dist",
45
+ "bin",
46
+ "templates",
42
47
  "README.md",
43
48
  "LICENSE"
44
49
  ],
45
50
  "scripts": {
46
- "build": "tsup --config tsup.config.ts",
51
+ "prepare-assets": "node scripts/prepare-assets.mjs",
52
+ "build": "npm run prepare-assets && tsup --config tsup.config.ts",
47
53
  "prepublishOnly": "npm run build"
48
54
  },
49
55
  "dependencies": {
@@ -0,0 +1,15 @@
1
+ ---
2
+ description: What should I focus on? Synthesizes open tasks, decisions, and recent activity.
3
+ allowed-tools: Bash(npx vortex:*)
4
+ ---
5
+ Show the user what to work on, synthesized from their existing records.
6
+
7
+ 1. From the instance root, run: `npx vortex agenda`
8
+ 2. Parse the JSON: `openTasks[]`, `openDecisions[]`, `nextUp[]`, `lastWorklog`,
9
+ `isEmpty`, `nothingOpen`.
10
+ 3. Present plainly — never dump raw JSON:
11
+ - `isEmpty` → it's a fresh instance; nudge them to just start working (a
12
+ worklog grows on its own; nothing to set up).
13
+ - `nothingOpen` → say they're clear, and mention the last activity.
14
+ - Otherwise → a short "today" view (≤8 lines): open tasks first, then active
15
+ decisions, then what's queued next (`nextUp`).
@@ -0,0 +1,48 @@
1
+ ---
2
+ description: Propose capturing the current work into a knowledge-base document (you decide, never auto-written)
3
+ allowed-tools: Bash(npx vortex:*)
4
+ ---
5
+ Offer to capture the user's accumulated work on the CURRENT topic into a
6
+ document — only when it is genuinely worth keeping, and only with the user's
7
+ explicit yes.
8
+
9
+ INVARIANTS (never break these):
10
+ - NEVER auto-write. Always ask the user before writing anything.
11
+ - ASK before accept — a write happens only after the user says yes.
12
+ - DOCUMENTS only. No hub files, no `_*` / system directories
13
+ (worklog, decision-log, runbooks, hubs, _memory, _templates, _proactive-curator).
14
+ - No whole-file replace. Only `create-file` (new file) or `append-section`
15
+ (add a section to an EXISTING file). Never overwrite an existing file.
16
+ - ALWAYS go through the CLI validate/write path below — never write files yourself.
17
+
18
+ THROTTLE: propose at a TOPIC BOUNDARY when substantial work on ONE topic has
19
+ accumulated — not every turn. If the user waved off curation earlier this
20
+ session, drop it and stay silent.
21
+
22
+ Steps:
23
+ 1. Decide continuation vs new. From the instance root run:
24
+ `npx vortex curate-candidates`
25
+ Parse `candidates[]` (each has `relpath`, `topic`, `tags`). If the current
26
+ work matches an existing document's topic/tags → propose APPENDING to it
27
+ (`append-section`). Otherwise → propose a NEW file (`create-file`).
28
+ 2. Build the proposal payload (JSON):
29
+ - create-file: `{ "action":"create-file", "topic":"<1-3 words>",
30
+ "targetRelPath":"<data-relative FOLDER>",
31
+ "filename":"<slug>.md", "body":"<full document>" }`
32
+ - append-section: `{ "action":"append-section", "topic":"<1-3 words>",
33
+ "targetRelPath":"<data-relative EXISTING file>",
34
+ "sectionHeader":"<heading>", "body":"<section text>" }`
35
+ 3. (Optional) Dry-check it — writes nothing:
36
+ `npx vortex curate-preview --payload '<json>'`
37
+ If `previouslyDeclined` is true → the user already declined this exact
38
+ proposal; do NOT re-propose it. Stay silent.
39
+ 4. Ask the user ONCE, plainly:
40
+ "Want me to capture this? **new doc** at `<path>`, or **append** to
41
+ `<existing>`?" — one question, their call.
42
+ 5. On YES: `npx vortex curate-accept --payload '<json>'` (writes via the
43
+ safe path; refuses to overwrite). Then tell them where it landed.
44
+ On NO: `npx vortex curate-decline --payload '<json>'` (suppresses this
45
+ proposal for 30 days). Then move on.
46
+
47
+ Keep it light. This is an offer, not a report — one short proposal, never a wall
48
+ of text, never a second ask if they declined.
@@ -0,0 +1,17 @@
1
+ ---
2
+ description: Semantic 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. From the instance root, run: `npx vortex recall "$ARGUMENTS" --k 5`
9
+ 2. Parse the JSON it prints. Each entry in `hits[]` has a name/title, `source`
10
+ (`memory` or `session-archive`), `score`, a date, and an `excerpt`.
11
+ 3. Present the result plainly — never dump raw JSON:
12
+ - No hits → say nothing matched and suggest rephrasing.
13
+ - One strong hit → a single sentence ("you did **<name>** on <date> — reuse it?").
14
+ - Several → a short ranked list (≤5): name — date — one line on why it matches.
15
+
16
+ Keep it brief; this is a lookup, not a report. The first run may pause while the
17
+ local embedding model loads (one-time download).
@@ -0,0 +1,10 @@
1
+ {
2
+ "autoRecord": {
3
+ "sessionStart": true,
4
+ "worklog": true,
5
+ "decision": true,
6
+ "ambientRecall": true,
7
+ "archive": true
8
+ },
9
+ "environments": []
10
+ }
@@ -0,0 +1,14 @@
1
+ VortEX Instance — Multi-Agent Personal AI Work OS
2
+
3
+ When working in this repository, you (Cursor) MUST read AGENT.md first. AGENT.md is the
4
+ single source of truth for how this instance behaves, its data/ layout, conventions, and
5
+ the commands available.
6
+
7
+ Cursor-specific config lives in .cursor/. Shared agent config lives in .agent/.
8
+
9
+ Per-agent files (CLAUDE.md, CODEX.md, GEMINI.md, .cursorrules) are routers; system-wide
10
+ rules belong in AGENT.md, never duplicated per agent.
11
+
12
+ This instance was created from the @vortex-os/base framework. The framework code lives in
13
+ node_modules/@vortex-os/; you do not edit it. You work in data/ and use the vortex CLI and
14
+ its slash-commands (run `npx vortex --list` to see them).
@@ -0,0 +1,93 @@
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.
@@ -0,0 +1,18 @@
1
+ # AGENTS.md
2
+
3
+ This is the file Codex CLI (and other `AGENTS.md`-aware agents) auto-loads when
4
+ working in this VortEX instance.
5
+
6
+ ## Route to unified entry
7
+
8
+ Read [`AGENT.md`](./AGENT.md) first — it is the single source of truth for how
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`.
11
+
12
+ ## Working in a VortEX instance (summary)
13
+
14
+ VortEX rituals are agent-mediated: run the thin `vortex` CLI and present its JSON
15
+ result to the user in plain language — e.g. `npx vortex status`,
16
+ `npx vortex agenda`, `npx vortex recall "<query>"`, `npx vortex log "<update>"`.
17
+ Never hand-write into the reserved system directories under `data/`
18
+ (`worklog`, `decision-log`, `runbooks`, `hubs`, any `_*`) — go through the CLI.
@@ -0,0 +1,20 @@
1
+ # CLAUDE.md
2
+
3
+ This is the first file Claude Code reads when working in this VortEX instance.
4
+
5
+ ## Route to unified entry
6
+
7
+ Read [`AGENT.md`](./AGENT.md) first — it is the single source of truth for how this instance behaves.
8
+
9
+ This `CLAUDE.md` holds only Claude Code-specific supplements. For everything else, refer to `AGENT.md`.
10
+
11
+ ## Claude Code-specific config
12
+
13
+ - Dedicated dir: `.claude/`
14
+ - Shared dir: `.agent/`
15
+
16
+ `.claude/settings.json` and `.claude/commands/` are populated by `vortex init` — it wires the SessionStart / SessionEnd hooks (`npx --no-install -p @vortex-os/base vortex session-start` / `… session-end`) and installs the agent-mediated slash-commands.
17
+
18
+ ## Reasoning effort
19
+
20
+ Claude Code exposes a reasoning/effort level you cannot read as a value. When `AGENT.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.
@@ -0,0 +1,16 @@
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/`
@@ -0,0 +1,14 @@
1
+ # GEMINI.md
2
+
3
+ This is the first file Gemini CLI reads when working in this VortEX instance.
4
+
5
+ ## Route to unified entry
6
+
7
+ Read [`AGENT.md`](./AGENT.md) first — it is the single source of truth for how this instance behaves.
8
+
9
+ This `GEMINI.md` holds only Gemini-specific supplements. For everything else, refer to `AGENT.md`.
10
+
11
+ ## Gemini-specific config
12
+
13
+ - Dedicated dir: `.gemini/`
14
+ - Shared dir: `.agent/`