@mcptoolshop/loadout-os 0.0.0 → 1.0.1

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/CHANGELOG.md ADDED
@@ -0,0 +1,32 @@
1
+ # Changelog — @mcptoolshop/loadout-os
2
+
3
+ All notable changes to the unified `loadout-os` CLI are documented here.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/).
7
+
8
+ > This is the published package's changelog. For the full monorepo consolidation
9
+ > history (workspace wiring, the runtime hook, the adapters), see the
10
+ > [root CHANGELOG](../../CHANGELOG.md).
11
+
12
+ ## [1.0.1] - 2026-06-16
13
+
14
+ ### Fixed
15
+
16
+ - npm README now renders the loadout-os logo (absolute raw-GitHub URL — npm does not
17
+ resolve relative image paths). README + version only; the published bundle is
18
+ unchanged from 1.0.0.
19
+
20
+ ## [1.0.0] - 2026-06-16
21
+
22
+ ### Added
23
+
24
+ - Unified `loadout-os` binary wrapping the kernel + memories + rules surfaces under one
25
+ arg parser and one structured `CliError { code, message, hint }` shape.
26
+ - Namespaced adapter commands (`memories`, `rules`) and flat kernel verbs (`resolve`,
27
+ `explain`, `usage`, `dead`, `overlaps`, `budget`, `validate`).
28
+ - Operational rituals: `doctor` (read-only health screen), `report` (read-only
29
+ observability), and `refresh` (Index Freshness Ritual with andon halt + `.bak`
30
+ compensator); plus `hook test`.
31
+ - Per-command `--help` (synopsis, arguments, flags, example, exit codes) for every leaf
32
+ command.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 mcp-tool-shop
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,5 +1,91 @@
1
+ <p align="center"><img src="https://raw.githubusercontent.com/mcp-tool-shop-org/loadout-os/main/logo.png" alt="loadout-os" width="320"></p>
2
+
1
3
  # @mcptoolshop/loadout-os
2
4
 
3
- Placeholder release. Real package coming soon.
5
+ The unified **Knowledge OS** CLI. One `loadout-os` binary that wraps the three
6
+ library packages of this workspace and absorbs the operational rituals that used
7
+ to be a multi-step manual sequence.
8
+
9
+ It wraps:
10
+
11
+ - **kernel** — [`@mcptoolshop/ai-loadout`](../kernel) — the knowledge router (resolve / match / budget / usage analysis)
12
+ - **memories** — [`@mcptoolshop/claude-memories`](../memories) — MEMORY.md → dispatch index
13
+ - **rules** — [`@mcptoolshop/claude-rules`](../rules) — CLAUDE.md section analysis + rule-file linting
14
+ - the **runtime hook** — [`apps/hook/loadout-hook.mjs`](../../apps/hook) — the `UserPromptSubmit` pointer-injector
15
+
16
+ Every wrapped surface calls the library export directly (one process, one arg
17
+ parser, one structured-error shape) — `loadout-os` does not shell out to the
18
+ legacy `ai-loadout` / `claude-memories` / `claude-rules` bins.
19
+
20
+ ## Command tree
21
+
22
+ ### Namespaces (wrapped library surfaces)
23
+
24
+ ```
25
+ loadout-os memories index <MEMORY.md> [--lazy] [--json]
26
+ loadout-os memories validate <MEMORY.md> [--json]
27
+ loadout-os memories stats <MEMORY.md> [--json]
28
+ loadout-os memories health [path] [--json]
29
+
30
+ loadout-os rules analyze <CLAUDE.md> [--rules-dir <dir>] [--json]
31
+ loadout-os rules validate [--rules-dir <dir>] [--lazy] [--repo-root <dir>] [--json]
32
+ loadout-os rules stats <CLAUDE.md> [--rules-dir <dir>] [--json]
33
+ loadout-os rules split # interactive — wrapped via passthrough to the claude-rules bin
34
+ ```
35
+
36
+ ### Flat verbs (knowledge router / kernel)
37
+
38
+ ```
39
+ loadout-os resolve # resolve layered loadouts (global → org → project → session)
40
+ loadout-os explain <entry-id> # how an entry resolved across layers
41
+ loadout-os usage <jsonl> # usage summary from the event log
42
+ loadout-os dead <index> <jsonl> # entries never loaded
43
+ loadout-os overlaps <index> # keyword routing ambiguities
44
+ loadout-os budget <index> [jsonl] # token budget breakdown
45
+ loadout-os validate <index> # validate index STRUCTURE (kernel)
46
+ ```
47
+
48
+ > **Name collision, resolved by namespacing.** The flat `validate <index>` is the
49
+ > kernel's index-structure validator. The store/rules linters are namespaced —
50
+ > `memories validate <MEMORY.md>` and `rules validate` — so all three coexist.
51
+
52
+ ### Rituals
53
+
54
+ ```
55
+ loadout-os doctor [--json] # read-only health screen
56
+ loadout-os report [--index <p>] [--jsonl <p>] # observability over usage.jsonl
57
+ loadout-os hook test [--prompt "<text>"] # drive the runtime hook on a sample prompt
58
+ loadout-os refresh [--store <d>] [--dest <p>] [--dry-run] # index → validate → publish
59
+ ```
60
+
61
+ - **`doctor`** — one read-only screen: store `MEMORY.md` validates, the global
62
+ index parses + validates, the runtime hook mirror matches the repo source (drift
63
+ check), no malformed resolver layers, at least one core entry, observability
64
+ loop wired, hook wired in `settings.json`, and `usage.jsonl` growing. `--json`
65
+ emits `{ checks: [{ id, status, message, hint }], ok }`. Exit 0 when all checks
66
+ pass or warn; exit 1 on any fail. **Never writes.**
67
+ - **`report`** — composes usage summary + dead-entry detection + token budget,
68
+ plus a score distribution when usage events carry a `score`. `--json` for the
69
+ machine-readable shape. Exit 2 when an input is missing. **Read-only.**
70
+ - **`hook test`** — runs the real `loadout-hook.mjs` against a sample prompt in an
71
+ isolated HOME so the live `usage.jsonl` is never written.
72
+ - **`refresh`** — folds the Index Freshness Ritual into one command: regenerate the
73
+ store index → validate (andon halt on any error) → rewrite relative paths to
74
+ absolute + publish to `~/.ai-loadout/index.json`. The irreversible write is guarded
75
+ by a `.bak` named compensator (restored on failure, undo line printed); `--dry-run`
76
+ previews without writing. Exit `1` on validation/write failure, `2` on a missing store.
77
+
78
+ ## Build & test
79
+
80
+ ```
81
+ npm run build # tsc
82
+ npm test # node --test dist/tests/*.test.js
83
+ npm run verify # tsc --noEmit && node --test dist/tests/*.test.js
84
+ ```
85
+
86
+ ## SDK use
4
87
 
5
- Source: <https://github.com/mcp-tool-shop-org/loadout-os>
88
+ Importing the package is side-effect-free — the dispatcher only runs when the
89
+ file is the process entrypoint. Composable exports: `dispatch`, `runDoctor` /
90
+ `buildReport` / `runHookTest` (and their `print*` renderers + `default*Paths`
91
+ helpers).