Skip to content

Commit 6206769

Browse files
mcp-tool-shopclaude
andcommitted
docs(phase4): front-door README + logo + unified Starlight handbook (6 pages)
Root site/ (Astro + Starlight, cyan accent): landing page + one handbook covering the whole layer — Overview, Getting Started, Architecture, Command Reference, Rituals, Migration — replacing the three separate per-package sites. Director-provided loadout-os logo (central CLI node wired to kernel/memories/rules/hook) wired into the Starlight header (links back to landing) + README front-door. Real content traced to the actual CLI source (no invented flags). Adversarial doc-verification workflow (wf_7399effe-7d9, 4 parallel checkers, 19 findings) applied: scoped install name @mcptoolshop/loadout-os everywhere; fixed the ./->../ subpage cross-links (5 subpages 404'd in prod — verified corrected in built HTML); added explain --org/--session synopsis + recordLoad to the README import list; corrected the stale packages/cli README + cli.ts comments (refresh + rules split both shipped). Clean build: 7 pages + pagefind search index, zero warnings. Root .github/pages.yml held for the Phase-5 CI consolidation. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 62d0879 commit 6206769

21 files changed

Lines changed: 8654 additions & 26 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ Thumbs.db
1010
.env
1111
.env.local
1212
*.tsbuildinfo
13+
site/.astro/

README.md

Lines changed: 66 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,80 @@
1+
<p align="center"><img src="logo.png" alt="loadout-os" width="220"></p>
2+
13
# loadout-os
24

3-
> **Prototype, 2026-06-10.** Consolidated Knowledge OS for the studio — folds `ai-loadout` (kernel) + `claude-memories` (MEMORY.md adapter) + `claude-rules` (CLAUDE.md adapter) + the runtime UserPromptSubmit pointer-injection hook into a single repo. Wired as npm workspaces (Phase 1 done — `npm install` + `npm run build`/`test`/`verify` work at root). Not yet published; no remote yet (a deliberate Phase-5 waiver — see `.claude/CLAUDE.md`).
5+
**A Knowledge OS for AI coding agents.** One CLI that routes the right context to the model on demand — instead of dumping every memory file and rule into the context window at the start of each session.
6+
7+
Your instruction files and memory stores grow without bound. Every line costs tokens on every prompt, whether or not it matters to the task at hand. loadout-os keeps a tiny dispatch index always loaded and loads the heavy payloads — memory topics, rule files — only when the task keywords match. Think of it like a game loadout: equip the agent with exactly the knowledge it needs for the mission ahead.
8+
9+
## What's inside
10+
11+
loadout-os unifies four surfaces under one `loadout-os` binary:
412

5-
## Pickers start here
13+
| Surface | What it does |
14+
|---|---|
15+
| **Kernel** (knowledge router) | Deterministic keyword/pattern matcher, hierarchical layered resolver (global → org → project → session), and the agent runtime contract. Core entries always load; domain entries load on match; manual entries load on explicit lookup. |
16+
| **Memories adapter** | Turns a `MEMORY.md` store into a machine-readable dispatch table and lints it (missing files, orphans, duplicates, over-long entries). |
17+
| **Rules adapter** | Splits a bloated `CLAUDE.md` into a lean always-loaded index plus on-demand rule files, and validates frontmatter against the index. |
18+
| **Runtime hook** | A `UserPromptSubmit` hook that injects ≤5 pointer lines (≤200 tokens) to the entries relevant to your prompt. Fail-silent: every error path exits 0, so a broken hook can never block a prompt. |
19+
20+
Plus three rituals that keep the system honest: **`refresh`** (regenerate → validate → publish the dispatch index, with a backup compensator), **`doctor`** (a read-only 8-check health screen), and **`report`** (usage / dead-entry / token-budget observability).
21+
22+
## Command surface
23+
24+
```
25+
# Memory store adapter
26+
loadout-os memories index <MEMORY.md> [--lazy] [--json]
27+
loadout-os memories validate <MEMORY.md> [--json]
28+
loadout-os memories stats <MEMORY.md> [--json]
29+
loadout-os memories health [path] [--json]
630
7-
- Read [`.claude/CLAUDE.md`](.claude/CLAUDE.md) — project instructions and source-of-truth rules
8-
- Read [`ROADMAP.md`](ROADMAP.md) — five-phase consolidation plan, ~1–2 months of session work
9-
- Then dive in
31+
# Instruction-file adapter
32+
loadout-os rules analyze <CLAUDE.md> [--rules-dir <dir>] [--json]
33+
loadout-os rules validate [--rules-dir <dir>] [--lazy] [--repo-root <dir>] [--json]
34+
loadout-os rules stats <CLAUDE.md> [--rules-dir <dir>] [--json]
35+
loadout-os rules split [CLAUDE.md] [--yes] [--dry-run]
1036
11-
## Layout
37+
# Knowledge router (flat kernel verbs)
38+
loadout-os resolve # resolve layered loadouts
39+
loadout-os explain <entry-id> # how an entry resolved across layers
40+
loadout-os usage <jsonl> # usage summary from the event log
41+
loadout-os dead <index> <jsonl> # entries never loaded
42+
loadout-os overlaps <index> # keyword routing ambiguities
43+
loadout-os budget <index> [jsonl] # token budget breakdown
44+
loadout-os validate <index> # validate index STRUCTURE (kernel)
1245
46+
# Rituals + hook
47+
loadout-os doctor [--json] # read-only health screen
48+
loadout-os report [--index <p>] [--jsonl <p>] # observability over usage.jsonl
49+
loadout-os hook test [--prompt "<text>"] # drive the runtime hook on a sample prompt
50+
loadout-os refresh [--store <d>] [--dest <p>] [--dry-run] # index → validate → publish
1351
```
14-
loadout-os/
15-
├── packages/
16-
│ ├── kernel/ # was @mcptoolshop/ai-loadout (npm 1.4.3 — only one published)
17-
│ ├── memories/ # was @mcptoolshop/claude-memories (unpublished)
18-
│ └── rules/ # was @mcptoolshop/claude-rules (unpublished)
19-
├── apps/
20-
│ └── hook/ # workspace member; mirrors ~/.claude/loadout-hook/ (the LIVE one)
21-
├── .claude/
22-
│ └── CLAUDE.md
23-
├── ROADMAP.md
24-
└── README.md
52+
53+
> **Name collision, resolved by namespacing.** The flat `validate <index>` is the kernel's index-structure validator. The store and rules linters are namespaced — `memories validate <MEMORY.md>` and `rules validate` — so all three coexist. Run `loadout-os <command> --help` for per-command synopsis, arguments, and exit codes.
54+
55+
## Install
56+
57+
```bash
58+
npm install -g @mcptoolshop/loadout-os # the loadout-os CLI
59+
loadout-os --help # the full command tree
60+
loadout-os doctor # confirm the system is healthy
2561
```
2662

63+
The kernel is also importable as a library — `@mcptoolshop/ai-loadout` exposes `planLoad`, `matchLoadout`, `resolveLoadout`, `recordLoad`, and the dispatch-table types.
64+
65+
## Documentation
66+
67+
- **[Handbook](https://mcp-tool-shop-org.github.io/loadout-os/handbook/)** — overview, install, architecture, command reference, rituals, and migration from the legacy packages.
68+
- **[Repository](https://github.com/mcp-tool-shop-org/loadout-os)** — source, roadmap, and issues.
69+
2770
## Why consolidate
2871

29-
Decompose-by-secrets (Parnas 1972) was the clean answer for a team of N humans. The studio runs 1 human + LLM crew — multi-repo work fragments Claude context across sessions and lets unpublished adapters rot. One named umbrella repo serves the operator. Full reasoning: `memory/Feedback/feedback_consolidate_when_cant_juggle_repos.md` in the canonical memory store.
72+
Decompose-by-secrets (Parnas 1972) was the clean answer for a team of N humans. For a solo operator plus an LLM crew it is operationally broken: multi-repo work fragments the agent's context across sessions, unpublished adapters rot (only the kernel ever shipped), and advancement serializes across repos. One named umbrella repo with one CLI serves the operator. Full reasoning lives in the canonical memory store (`feedback_consolidate_when_cant_juggle_repos.md`).
73+
74+
## Status
75+
76+
Consolidation in progress. loadout-os folds together the kernel and two adapters that previously lived as separate packages, plus the live runtime hook. The published upstream today is **`@mcptoolshop/ai-loadout`** (the kernel); the unified `loadout-os` package ships from this repo. The three legacy bins keep working until their planned retirement.
3077

3178
## License
3279

33-
MIT (matches all three upstream sources).
80+
MIT matches all upstream sources.

logo.png

1.03 MB
Loading

packages/cli/README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ loadout-os memories health [path] [--json]
2828
loadout-os rules analyze <CLAUDE.md> [--rules-dir <dir>] [--json]
2929
loadout-os rules validate [--rules-dir <dir>] [--lazy] [--repo-root <dir>] [--json]
3030
loadout-os rules stats <CLAUDE.md> [--rules-dir <dir>] [--json]
31-
loadout-os rules split # interactive — not wrapped; use the claude-rules bin
31+
loadout-os rules split # interactive — wrapped via passthrough to the claude-rules bin
3232
```
3333

3434
### Flat verbs (knowledge router / kernel)
@@ -53,7 +53,7 @@ loadout-os validate <index> # validate index STRUCTURE (kernel)
5353
loadout-os doctor [--json] # read-only health screen
5454
loadout-os report [--index <p>] [--jsonl <p>] # observability over usage.jsonl
5555
loadout-os hook test [--prompt "<text>"] # drive the runtime hook on a sample prompt
56-
loadout-os refresh # not yet implemented (see below)
56+
loadout-os refresh [--store <d>] [--dest <p>] [--dry-run] # index → validate → publish
5757
```
5858

5959
- **`doctor`** — one read-only screen: store `MEMORY.md` validates, the global
@@ -67,9 +67,11 @@ loadout-os refresh # not yet implemented (see below)
6767
machine-readable shape. Exit 2 when an input is missing. **Read-only.**
6868
- **`hook test`** — runs the real `loadout-hook.mjs` against a sample prompt in an
6969
isolated HOME so the live `usage.jsonl` is never written.
70-
- **`refresh`***stubbed this wave.* It writes the live global index and needs a
71-
named compensator, so it is handled separately; for now run the Index Freshness
72-
Ritual (memories index → validate → copy to `~/.ai-loadout/index.json`).
70+
- **`refresh`** — folds the Index Freshness Ritual into one command: regenerate the
71+
store index → validate (andon halt on any error) → rewrite relative paths to
72+
absolute + publish to `~/.ai-loadout/index.json`. The irreversible write is guarded
73+
by a `.bak` named compensator (restored on failure, undo line printed); `--dry-run`
74+
previews without writing. Exit `1` on validation/write failure, `2` on a missing store.
7375

7476
## Build & test
7577

packages/cli/src/cli.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* One binary that wraps the three library packages (kernel = ai-loadout,
77
* memories = claude-memories, rules = claude-rules) and absorbs the operational
8-
* rituals (doctor / report / hook test; refresh is stubbed this wave).
8+
* rituals (doctor / report / hook test / refresh).
99
*
1010
* Command tree:
1111
* loadout-os memories <index|validate|stats|health> <MEMORY.md> (namespaced)
@@ -14,7 +14,7 @@
1414
* loadout-os doctor [--json] (ritual, read-only)
1515
* loadout-os report [--jsonl <p>] [--index <p>] [--json] (ritual, read-only)
1616
* loadout-os hook test [--prompt "<text>"] (read-only)
17-
* loadout-os refresh (STUB this wave)
17+
* loadout-os refresh [--store <d>] [--dest <p>] [--dry-run] (ritual; index→validate→publish)
1818
* loadout-os --help | --version
1919
*
2020
* The flat `validate <index>` is the KERNEL index-structure validator; the

site/astro.config.mjs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// @ts-check
2+
import { defineConfig } from 'astro/config';
3+
import starlight from '@astrojs/starlight';
4+
import tailwindcss from '@tailwindcss/vite';
5+
6+
// https://astro.build/config
7+
export default defineConfig({
8+
site: 'https://mcp-tool-shop-org.github.io',
9+
base: '/loadout-os',
10+
integrations: [
11+
starlight({
12+
title: 'loadout-os',
13+
logo: {
14+
src: './src/assets/logo.png',
15+
alt: 'loadout-os',
16+
href: '/loadout-os/',
17+
replacesTitle: false,
18+
},
19+
description: 'loadout-os — consolidated Knowledge OS for the studio — kernel (ai-loadout) + memories (claude-memories) + rules (claude-rules) + the runtime loadout hook, under one npm-workspaces root.',
20+
disable404Route: true,
21+
social: [
22+
{ icon: 'github', label: 'GitHub', href: 'https://github.com/mcp-tool-shop-org/loadout-os' },
23+
],
24+
sidebar: [
25+
{
26+
label: 'Handbook',
27+
autogenerate: { directory: 'handbook' },
28+
},
29+
],
30+
customCss: ['./src/styles/starlight-custom.css'],
31+
}),
32+
],
33+
vite: {
34+
plugins: [tailwindcss()],
35+
},
36+
});

0 commit comments

Comments
 (0)