nlos 1.0.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.
@@ -0,0 +1,254 @@
1
+ ---
2
+ type: slash-command
3
+ command: /kernel-boot
4
+ aliases: ["/startup", "./kernel-boot", "./startup", "/claude-boot", "./claude-boot"]
5
+ purpose: Load kernel context with tiered loading - mandatory files by default, full context with --full
6
+ description: Session initialization command with tiered loading to minimize boot context while preserving full capability. Model-agnostic - works with any LLM runtime.
7
+ scope: Session initialization, context loading
8
+ version: 3.0.0
9
+ last_updated: 2026-01-11
10
+
11
+ contract:
12
+ mode: factual
13
+ precision_scale: strict
14
+ escalation_triggers: [] # Read-only context loading
15
+ resource_expectations:
16
+ token_usage: low
17
+ ---
18
+
19
+ # Kernel Boot Command
20
+
21
+ Initialize Capturebox Natural Language Operating System with tiered kernel loading. This command is model-agnostic and works with any LLM runtime (Claude Code, Cursor, Ollama, llama.cpp, LM Studio, etc.).
22
+
23
+ ## Design Rationale
24
+
25
+ Every token at boot costs context for actual work. The tiered design loads only essential files by default (~10.6K tokens, 5.3% of context), deferring capabilities until needed.
26
+
27
+ | Tier | Files | Tokens | Loaded |
28
+ |------|-------|--------|--------|
29
+ | Mandatory | memory.md, AGENTS.md, axioms.yaml | ~10,600 | Always |
30
+ | Lazy | personalities.md | ~3,600 | On `/assume` |
31
+ | Lazy | COMMAND-MAP.md | ~1,350 | On `/sys-ref` or command lookup |
32
+
33
+ ## Behavior
34
+
35
+ ### Default: `./kernel-boot`
36
+
37
+ Load mandatory tier only:
38
+
39
+ 1. **Read Mandatory Kernel Files** (in priority order):
40
+ - Read `memory.md` (behavioral directives)
41
+ - Read `AGENTS.md` (agent kernel, hard invariants)
42
+ - Read `axioms.yaml` (canonical definitions)
43
+
44
+ 2. **Generate Boot Summary**:
45
+ - Confirm mandatory files loaded
46
+ - Show lazy tier as available but not loaded
47
+ - Display active constraints
48
+ - Report token usage
49
+
50
+ ### Full: `./kernel-boot --full`
51
+
52
+ Load all tiers:
53
+
54
+ 1. **Read All Kernel Files**:
55
+ - Read `memory.md` (behavioral directives)
56
+ - Read `AGENTS.md` (agent kernel, hard invariants)
57
+ - Read `axioms.yaml` (canonical definitions)
58
+ - Read `personalities.md` (voice presets)
59
+ - Read `.cursor/commands/COMMAND-MAP.md` (command registry)
60
+
61
+ 2. **Generate Full Boot Summary**
62
+
63
+ ### Output Format (Default)
64
+
65
+ ```
66
+ NL-OS KERNEL BOOT SEQUENCE
67
+
68
+ Kernel Status (Mandatory):
69
+ [x] memory.md - behavioral directives loaded
70
+ [x] AGENTS.md - hard invariants loaded
71
+ [x] axioms.yaml - canonical definitions loaded
72
+
73
+ Lazy-Load Available:
74
+ [ ] personalities.md - load via /assume
75
+ [ ] COMMAND-MAP.md - load via /sys-ref
76
+
77
+ Active Constraints:
78
+ - No emojis in output
79
+ - Preserve frontmatter and metadata
80
+ - Append-only logs (hype.log)
81
+ - Prefer patch edits over rewrites
82
+
83
+ Boot: ~10,600 tokens | Context remaining: ~189K
84
+
85
+ KERNEL BOOT COMPLETE
86
+ ```
87
+
88
+ ### Output Format (--full)
89
+
90
+ ```
91
+ NL-OS KERNEL BOOT SEQUENCE (FULL)
92
+
93
+ Kernel Status:
94
+ [x] memory.md - behavioral directives loaded
95
+ [x] AGENTS.md - hard invariants loaded
96
+ [x] axioms.yaml - canonical definitions loaded
97
+ [x] personalities.md - voice presets loaded
98
+ [x] COMMAND-MAP.md - command registry loaded
99
+
100
+ Active Constraints:
101
+ - No emojis in output
102
+ - Preserve frontmatter and metadata
103
+ - Append-only logs (hype.log)
104
+ - Prefer patch edits over rewrites
105
+
106
+ Systems: 17 | Commands: 58 | Skills: 5
107
+
108
+ Boot: ~15,500 tokens | Context remaining: ~184K
109
+
110
+ KERNEL BOOT COMPLETE (FULL)
111
+ ```
112
+
113
+ ### Variants
114
+
115
+ - `./kernel-boot` - Default: load mandatory tier only (~10.6K tokens)
116
+ - `./kernel-boot --full` - Load all tiers including lazy files (~15.5K tokens)
117
+ - `./kernel-boot --quiet` - Load mandatory tier silently, brief acknowledgment only
118
+ - `./kernel-boot --verify` - Load and validate all referenced paths exist
119
+ - `./kernel-boot --status` - Show boot status without reloading
120
+
121
+ ### Error Handling
122
+
123
+ If any mandatory file is missing, report and handle appropriately:
124
+
125
+ | File | Tier | If Missing |
126
+ |------|------|------------|
127
+ | `memory.md` | Mandatory | CRITICAL - refuse to proceed |
128
+ | `AGENTS.md` | Mandatory | WARNING - proceed with caution |
129
+ | `axioms.yaml` | Mandatory | WARNING - proceed but note definitions unavailable |
130
+ | `personalities.md` | Lazy | N/A - not loaded by default |
131
+ | `COMMAND-MAP.md` | Lazy | N/A - not loaded by default |
132
+
133
+ ## Contract
134
+
135
+ **Requires:**
136
+ - Input: None (or optional flags: --full, --quiet, --verify, --status)
137
+ - Context: Must be in capturebox repository (or have kernel files available)
138
+ - Files: Mandatory tier files should exist (memory.md is required)
139
+
140
+ **Guarantees:**
141
+ - Output: Boot status summary in chat (unless --quiet)
142
+ - Side effects: No file writes, context loading only
143
+ - Default behavior: Reads ~10.6K tokens (mandatory tier)
144
+ - Full behavior: Reads ~15.5K tokens (all tiers)
145
+
146
+ **Refuses:**
147
+ - Running without kernel files available
148
+ - Writing to any files
149
+ - Proceeding without memory.md (mandatory file)
150
+
151
+ ## Examples
152
+
153
+ ### Example 1: Default Boot (Mandatory Only)
154
+
155
+ **User:** `./kernel-boot`
156
+
157
+ **Assistant:**
158
+ ```
159
+ NL-OS KERNEL BOOT SEQUENCE
160
+
161
+ Kernel Status (Mandatory):
162
+ [x] memory.md - behavioral directives loaded
163
+ [x] AGENTS.md - hard invariants loaded
164
+ [x] axioms.yaml - canonical definitions loaded
165
+
166
+ Lazy-Load Available:
167
+ [ ] personalities.md - load via /assume
168
+ [ ] COMMAND-MAP.md - load via /sys-ref
169
+
170
+ Active Constraints:
171
+ - No emojis in output
172
+ - Preserve frontmatter and metadata
173
+ - Append-only logs (hype.log)
174
+ - Prefer patch edits over rewrites
175
+
176
+ Boot: ~10,600 tokens | Context remaining: ~189K
177
+
178
+ KERNEL BOOT COMPLETE
179
+ ```
180
+
181
+ ### Example 2: Full Boot
182
+
183
+ **User:** `./kernel-boot --full`
184
+
185
+ **Assistant:**
186
+ ```
187
+ NL-OS KERNEL BOOT SEQUENCE (FULL)
188
+
189
+ Kernel Status:
190
+ [x] memory.md - behavioral directives loaded
191
+ [x] AGENTS.md - hard invariants loaded
192
+ [x] axioms.yaml - canonical definitions loaded
193
+ [x] personalities.md - voice presets loaded
194
+ [x] COMMAND-MAP.md - command registry loaded
195
+
196
+ Active Constraints:
197
+ - No emojis in output
198
+ - Preserve frontmatter and metadata
199
+ - Append-only logs (hype.log)
200
+ - Prefer patch edits over rewrites
201
+
202
+ Systems: 17 | Commands: 58 | Skills: 5
203
+
204
+ Boot: ~15,500 tokens | Context remaining: ~184K
205
+
206
+ KERNEL BOOT COMPLETE (FULL)
207
+ ```
208
+
209
+ ### Example 3: Quiet Boot
210
+
211
+ **User:** `./kernel-boot --quiet`
212
+
213
+ **Assistant:**
214
+ > Kernel loaded (mandatory tier). Ready for capturebox operations.
215
+
216
+ ### Example 4: Status Check
217
+
218
+ **User:** `./kernel-boot --status`
219
+
220
+ **Assistant:**
221
+ > Boot status: Mandatory tier loaded. Lazy tier available on demand. Run `./kernel-boot --full` for complete context.
222
+
223
+ ## Implementation Notes
224
+
225
+ - **Tiered loading**: Default loads only mandatory files to preserve context
226
+ - **Lazy triggers**: personalities.md loads when `/assume` is called; COMMAND-MAP.md loads on `/sys-ref` or command lookup
227
+ - **Idempotent**: Safe to run multiple times (reloads fresh context)
228
+ - **Token efficiency**: Default saves ~4,900 tokens vs full boot
229
+ - **Model-agnostic**: Works with any LLM that can read files and follow instructions
230
+
231
+ ## Backwards Compatibility
232
+
233
+ - `/claude-boot` and `./claude-boot` remain as aliases
234
+ - All existing workflows continue to work unchanged
235
+
236
+ ## Portability Notes
237
+
238
+ This command is workspace-specific. To port to another NL-OS workspace:
239
+
240
+ 1. Copy this file to `[workspace]/.cursor/commands/kernel-boot.md`
241
+ 2. Update kernel file paths to match target workspace structure
242
+ 3. Define which files are mandatory vs lazy for that workspace
243
+ 4. Update token estimates based on actual file sizes
244
+ 5. Ensure mandatory files exist at referenced paths
245
+
246
+ For local LLM runtimes, use the boot scripts in `scripts/`:
247
+ - `scripts/kernel-boot-ollama.sh`
248
+ - `scripts/kernel-boot-llama-cpp.sh`
249
+ - `scripts/kernel-boot-lm-studio.sh`
250
+
251
+ Or use the portable payload: `portable/kernel-payload.md`
252
+
253
+ Dependencies (Mandatory): memory.md, AGENTS.md, axioms.yaml
254
+ Dependencies (Lazy): personalities.md, COMMAND-MAP.md
@@ -0,0 +1,28 @@
1
+ ---
2
+ type: slash-command
3
+ command: /note
4
+ purpose: Ultra-fast note capture via shell script
5
+ version: 5.1.0
6
+
7
+ contract:
8
+ mode: factual
9
+ precision_scale: strict
10
+ escalation_triggers:
11
+ - destructive_write
12
+ resource_expectations:
13
+ token_usage: low
14
+ ---
15
+
16
+ # /note
17
+
18
+ ## Behavior
19
+
20
+ 1. Run: `/Users/caantone/Documents/cisco/capturebox/scripts/note.sh`
21
+ - **With content**: Append timestamped entry with content to today's daily note
22
+ - **No content**: Append timestamp marker only (creates checkpoint)
23
+ - Creates `docs/notes/dailies/YYYY-MM-DD.md` if it doesn't exist
24
+
25
+ 2. **IMPORTANT**: Open today's daily note in the editor: `docs/notes/dailies/YYYY-MM-DD.md`
26
+
27
+ No confirmation. No output.
28
+
@@ -0,0 +1,81 @@
1
+ ---
2
+ type: slash-command
3
+ command: /scratchpad
4
+ purpose: Capture full conversation threads (user + assistant) for session archival
5
+ version: 3.0.0
6
+ last_updated: 2025-12-16
7
+
8
+ contract:
9
+ mode: factual
10
+ precision_scale: strict
11
+ escalation_triggers:
12
+ - destructive_write
13
+ resource_expectations:
14
+ token_usage: low
15
+ ---
16
+
17
+ # Scratchpad
18
+
19
+ Capture full conversation threads from this chat session. Unlike `/note` (quick thoughts), scratchpad logs entire exchanges with both user and assistant messages.
20
+
21
+ ## Usage
22
+
23
+ ```
24
+ /scratchpad [name] [--summary] [--daily]
25
+ ```
26
+
27
+ **Parameters:**
28
+ - `[name]` — Optional name for the scratchpad (defaults to `scratchpad_YYYY-MM-DD.md`)
29
+ - `--summary` — Create condensed single-paragraph summary instead of full conversation
30
+ - `--daily` — Append to `docs/notes/dailies/YYYY-MM-DD.md` instead of scratchpads folder
31
+
32
+ **Examples:**
33
+ ```
34
+ /scratchpad
35
+ # → Full conversation to scratchpads/scratchpad_2025-12-16.md
36
+
37
+ /scratchpad design-system-work
38
+ # → Full conversation to scratchpads/design-system-work.md
39
+
40
+ /scratchpad --summary --daily
41
+ # → Single-paragraph summary appended to dailies/2025-12-16.md
42
+ ```
43
+
44
+ ## Storage
45
+
46
+ - **Default**: `docs/notes/scratchpads/[filename].md`
47
+ - **With --daily**: `docs/notes/dailies/YYYY-MM-DD.md`
48
+ - Auto-create directories if missing
49
+
50
+ ## File Format
51
+
52
+ **New file:**
53
+ ```markdown
54
+ ---
55
+ title: "Scratchpad: [name or date]"
56
+ date: YYYY-MM-DD
57
+ type: scratchpad
58
+ tags: [session, conversation]
59
+ ---
60
+
61
+ # Scratchpad: [name or date]
62
+
63
+ ## [HH:MM] - User
64
+ [User's message]
65
+
66
+ ## [HH:MM] - Assistant
67
+ [Assistant's response]
68
+
69
+ ---
70
+ ```
71
+
72
+ **Existing file:** Append conversation with timestamps and separator.
73
+
74
+ ## Protocol
75
+
76
+ Capture the substantive user/assistant exchanges from this chat session. Include discussions, decisions, work accomplished, and key insights. Format each message with timestamp and role.
77
+
78
+ On completion, append witness hit to `projects/systems/self-writer-system/data/witness_activity.jsonl`:
79
+ ```json
80
+ {"v":1,"ts":"[ISO timestamp]","cmd":"scratchpad","area":"notes","out":"[target-file]"}
81
+ ```
@@ -0,0 +1,81 @@
1
+ ---
2
+ type: slash-command
3
+ command: /sys-ref
4
+ purpose: Display quick-scan reference for all commands and systems
5
+ description: Quick reference guide showing commands and systems with descriptions and use-case triggers
6
+ scope: Navigation and discovery
7
+ version: 1.0.0
8
+ last_updated: 2025-01-08
9
+
10
+ contract:
11
+ mode: factual
12
+ precision_scale: strict
13
+ escalation_triggers: [] # Read-only
14
+ resource_expectations:
15
+ token_usage: low
16
+ ---
17
+
18
+ # System Reference (sys-ref)
19
+
20
+ Quick-scan reference for all slash commands and systems in Capturebox.
21
+
22
+ ---
23
+
24
+ ## Behavior
25
+
26
+ Display the contents of `.cursor/SYS-REF.md` in the chat.
27
+
28
+ **Usage:**
29
+ - `/sys-ref` — Show complete reference (no arguments)
30
+
31
+ **Purpose:**
32
+ - Solve the "forgetting" problem: remind you what commands and systems exist
33
+ - Quick scanning without opening multiple files
34
+ - Use-case triggers to help identify the right tool for your current task
35
+
36
+ **Output:**
37
+ - Display `.cursor/SYS-REF.md` contents in chat (read-only)
38
+ - User can then invoke any command or system they rediscover
39
+
40
+ ---
41
+
42
+ ## Implementation
43
+
44
+ ```
45
+ 1. Read `.cursor/SYS-REF.md`
46
+ 2. Display contents in chat
47
+ 3. Done
48
+ ```
49
+
50
+ No arguments. No file creation. Pure reference display.
51
+
52
+ ---
53
+
54
+ ## Maintenance
55
+
56
+ The reference doc (`.cursor/SYS-REF.md`) is manually maintained. When commands or systems change:
57
+
58
+ 1. Update command/system documentation first (as usual)
59
+ 2. Update `.cursor/SYS-REF.md` to reflect changes
60
+ 3. Optional: Run `/command-update-list sys-ref` + `/command-update-files` workflow if automation is desired
61
+
62
+ ---
63
+
64
+ ## Related Commands
65
+
66
+ - `/systems` — Detailed system summaries via Python CLI
67
+ - `/architecture` — Query architecture map for integration guidance
68
+ - `/skills` — List and route skills from `.cursor/skills/`
69
+ - `/whats-next` — Surface 3 interesting next actions
70
+
71
+ ---
72
+
73
+ ## Portability Notes
74
+
75
+ This command is self-contained and portable to any workspace:
76
+
77
+ 1. Copy this file to `[workspace]/.cursor/commands/sys-ref.md`
78
+ 2. Create `[workspace]/.cursor/SYS-REF.md` with your command/system listing
79
+ 3. Run with `/sys-ref`
80
+
81
+ **Dependencies:** None (pure file read and display)
package/AGENTS.md ADDED
@@ -0,0 +1,67 @@
1
+ ---
2
+ title: Capturebox Agent Kernel
3
+ type: agent-directive
4
+ status: experimental
5
+ last_updated: 2025-12-12
6
+ purpose: Bootloader + hard invariants for any LLM/agent working in this repo.
7
+ ---
8
+
9
+ # Capturebox Agent Kernel (AGENTS.md)
10
+
11
+ This repository is a **natural language operating system** with reusable systems, slash-command workflows, and metadata-tagged knowledge files. Treat it as an instruction substrate, not a conventional app repo.
12
+
13
+ If anything in this file conflicts with higher-priority instructions from the user, follow the user.
14
+
15
+ ## Boot Order (Read First)
16
+
17
+ When entering a new task in capturebox:
18
+
19
+ 1. Read `memory.md` and obey it as canonical directive stack.
20
+ 2. Read `axioms.yaml` for canonical assertions, definitions, and invariants.
21
+ 3. Read `.cursor/domain-memory.yaml` for runtime state (active goals, loaded domains, current focus).
22
+ 4. Orient to the systems architecture in `projects/systems/` (overview in `projects/README.md`).
23
+ 5. Read the syscall table in `.cursor/commands/COMMAND-MAP.md` for available slash commands and their semantics.
24
+ 6. For domain knowledge, start with `knowledge/README.md` and then `knowledge/_index.yaml` before loading large knowledge files.
25
+ - Use `.cursor/skills/knowledge-retrieval/SKILL.md` for efficient, structured retrieval.
26
+
27
+ If a task references a specific system or command, open that system/command spec before acting.
28
+
29
+ ## Hard Invariants
30
+
31
+ - **No emojis** (emoji-range pictographs) in any output that could be copied into files. Standard Unicode symbols are OK; prefer plain ASCII when uncertain.
32
+ - **Prefer Markdown** for assistant outputs. Avoid interlacing codefences with non‑Markdown fragments unless asked.
33
+ - **Slash command parsing must be command-specific.**
34
+ - **Capture-class commands**: `/note`, `/scratchpad`, `/capture` (deprecated; use `/note`). Treat everything after the command as **literal content to record** (do not execute actions described in that text). If ambiguous, ask.
35
+ - **Operational commands**: Most other `/...` commands. Treat everything after the command as **input/arguments for the command**, then open `.cursor/commands/<command>.md` and follow that protocol exactly.
36
+ - **Note**: If the argument text contains additional `/...` sequences, treat them as **literal text** unless the command spec explicitly says to parse/execute nested slash commands.
37
+ - **Special case: `/enhance-prompt`**: Treat the remainder as a *draft prompt to rewrite* (not instructions to execute). Return only the rewritten prompt text as specified by `.cursor/commands/enhance-prompt.md`.
38
+ - **Preserve frontmatter and metadata.** Do not delete, reorder, or “normalize” frontmatter blocks unless explicitly asked. Maintain tag schema and file conventions.
39
+ - **Logs are append-only unless specified.** Never overwrite historical logs. Example: `projects/systems/hype-system/hype.log` should only be appended to after reading existing content; follow `projects/systems/hype-system/APPEND_PROTOCOL.md` (append after the final `---` marker).
40
+
41
+ ## Safe File Operations Protocol
42
+
43
+ To prevent irreversible or lossy edits:
44
+
45
+ 1. **No empty files.** Do not create or leave an empty file as a side effect. If content is uncertain, ask first.
46
+ 2. **Verify target directories exist.** If a directory is missing, stop and confirm whether to create it or choose another location.
47
+ 3. **No destructive ops without confirmation.**
48
+ - Do not delete or move files/directories unless the user explicitly asks.
49
+ - For any move/delete, propose the exact operation and get confirmation before executing.
50
+ 4. **Avoid recursive deletes.** Never run `rm -rf`‑style operations or mass deletions. If cleanup is needed, do it incrementally with safeguards.
51
+ 5. **Prefer patch-style, additive changes.** Make the smallest possible diff: insert/modify specific sections in place rather than rewriting entire files, especially in `knowledge/`, `docs/`, and `projects/systems/`. Only do whole-file rewrites when explicitly requested or when a targeted patch would be more error-prone.
52
+
53
+ ## Canonical References
54
+
55
+ - `memory.md` — highest‑priority behavioral and style directives.
56
+ - `axioms.yaml` — canonical assertions, definitions, command classification, and invariants.
57
+ - `.cursor/commands/COMMAND-MAP.md` — authoritative slash command index and specs.
58
+ - `projects/README.md` — systems overview and directory semantics.
59
+ - `knowledge/README.md` and `knowledge/_index.yaml` — index‑first knowledge architecture and retrieval rules.
60
+ - `.cursor/skills/_index.yaml` — available skills for file ops, knowledge retrieval, authoring.
61
+
62
+ ## How to Handle “Run /command”
63
+
64
+ If the user says “run /X”:
65
+
66
+ 1. Open `.cursor/commands/X.md` (or closest match) and follow its Behavior/Protocol sections.
67
+ 2. If the command is missing or unclear, ask before improvising.