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.
package/axioms.yaml ADDED
@@ -0,0 +1,437 @@
1
+ # Capturebox Axioms — Canonical Assertion Layer
2
+ # This file defines what the system treats as ground truth.
3
+ # LLMs and agents should load this as part of boot order.
4
+ # Machine-checkable assertions can be verified via scripts/axiom_lint.py (future).
5
+ #
6
+ # Version: 1.0.0
7
+ # Last updated: 2025-12-12
8
+
9
+ ---
10
+
11
+ meta:
12
+ purpose: |
13
+ Define canonical facts, definitions, and invariants for Capturebox.
14
+ This is a constitution, not a compiler — it steers LLM behavior with high
15
+ probability and provides verification hooks for structural assertions.
16
+ enforcement:
17
+ structural: machine-checkable (file existence, path patterns)
18
+ semantic: LLM-enforceable (repeated assertion, explicit hierarchy)
19
+ behavioral: LLM + human-in-the-loop (confirmation before violation)
20
+
21
+ ---
22
+
23
+ # PRIORITY ORDERING
24
+ # When directives conflict, higher beats lower.
25
+ priority:
26
+ - user_instruction # 1 - highest: explicit user request in chat
27
+ - memory.md # 2 - behavioral directives, tone, style
28
+ - AGENTS.md # 3 - agent kernel, hard invariants
29
+ - command_spec # 4 - .cursor/commands/<command>.md
30
+ - system_readme # 5 - projects/systems/<system>/README.md
31
+ - knowledge_index # 6 - knowledge/_index.yaml
32
+
33
+ ---
34
+
35
+ # CANONICAL PATHS
36
+ # Where things live. Machine-checkable.
37
+ paths:
38
+ # Core directive files
39
+ directive_stack: memory.md
40
+ agent_kernel: AGENTS.md
41
+ axioms: axioms.yaml
42
+
43
+ # Command system
44
+ slash_commands: .cursor/commands/
45
+ command_index: .cursor/commands/COMMAND-MAP.md
46
+
47
+ # Systems architecture
48
+ systems: projects/systems/
49
+ system_overview: projects/README.md
50
+
51
+ # Knowledge layer
52
+ knowledge: knowledge/
53
+ knowledge_index: knowledge/_index.yaml
54
+ knowledge_schema: knowledge/_schema.md
55
+
56
+ # Skills layer
57
+ skills: .cursor/skills/
58
+ skills_index: .cursor/skills/_index.yaml
59
+
60
+ # Output destinations
61
+ docs_output: docs/
62
+ active_work: projects/active/
63
+ notes_dailies: docs/notes/dailies/
64
+ notes_scratchpads: docs/notes/scratchpads/
65
+ reflections_weekly: docs/reflections/weekly/
66
+
67
+ # Append-only logs
68
+ hype_log: projects/systems/hype-system/hype.log
69
+ hype_append_protocol: projects/systems/hype-system/APPEND_PROTOCOL.md
70
+
71
+ ---
72
+
73
+ # SEMANTIC DEFINITIONS
74
+ # What terms mean in this system. LLM-enforceable.
75
+ definitions:
76
+ system: |
77
+ A reusable framework in projects/systems/ that generates artifacts through
78
+ human-in-the-loop interaction. Systems are cognitive accelerators, not
79
+ automation engines. The human works through the system; the system does
80
+ not work for the human.
81
+
82
+ command: |
83
+ A slash-prefixed invocation (e.g., /note, /ux-writer) that triggers a
84
+ protocol defined in .cursor/commands/<command>.md. Commands transform
85
+ input into structured output according to their spec.
86
+
87
+ capture_command: |
88
+ A command that records literal content without interpretation.
89
+ Examples: /note, /scratchpad, /capture (deprecated).
90
+ Everything after the command is content to record, not instructions.
91
+
92
+ operational_command: |
93
+ A command that transforms input according to its protocol.
94
+ Examples: /enhance-prompt, /ux-writer, /run-recipe, /design-spec.
95
+ The text after the command is input/arguments for the command.
96
+
97
+ knowledge_file: |
98
+ A file in knowledge/ with frontmatter metadata (type, answers, use_when,
99
+ pairs_with). Knowledge files are indexed in knowledge/_index.yaml and
100
+ loaded on-demand based on task context.
101
+
102
+ skill: |
103
+ An opt-in protocol in .cursor/skills/ that provides optimized behavior for
104
+ specific tasks (e.g., knowledge retrieval, safe file operations). Skills are
105
+ invoked explicitly and don't block ambient access to their domains.
106
+
107
+ directive: |
108
+ An instruction that governs agent behavior. Directives have priority
109
+ ordering (see priority section). Higher-priority directives override
110
+ lower-priority ones.
111
+
112
+ invariant: |
113
+ A hard constraint that must never be violated without explicit user
114
+ override. Invariants are defined in AGENTS.md and this file.
115
+
116
+ # KNOWLEDGE RETRIEVAL
117
+ # Opt-in optimizer for token-efficient access to knowledge/
118
+ knowledge_retrieval:
119
+ protocol: index_first
120
+ default_budget_tokens: 80000
121
+ skill_path: .cursor/skills/knowledge-retrieval/SKILL.md
122
+ description: |
123
+ Opt-in optimizer for token-efficient access to knowledge/.
124
+ Systems invoke the skill for structured retrieval (index → metadata matching
125
+ → co-retrieval hints). Creative tasks retain ambient access without invoking.
126
+
127
+ ---
128
+
129
+ # THREE-LAYER ARCHITECTURE
130
+ # The conceptual model behind Capturebox's structure.
131
+ architecture:
132
+ description: |
133
+ Capturebox follows a three-layer architecture where each layer has distinct
134
+ responsibilities. The boot order reflects this hierarchy: kernel loads first,
135
+ systems define behavior, commands invoke systems.
136
+
137
+ layers:
138
+ kernel:
139
+ location: "memory.md, AGENTS.md, axioms.yaml"
140
+ responsibility: "Tone, safety, meta-rules, canonical assertions"
141
+ loads: "Always, on every task"
142
+
143
+ systems:
144
+ location: "projects/systems/**"
145
+ responsibility: "Semantics, phases, constraints, components, output routing"
146
+ loads: "On-demand, when system is activated"
147
+
148
+ commands:
149
+ location: ".cursor/commands/**"
150
+ responsibility: "User-facing entrypoints that bind runtime to systems"
151
+ loads: "When invoked by user"
152
+
153
+ principle: |
154
+ Systems are bounded agent programs, not a monolith. Each system has:
155
+ - A canonical operating model / philosophy doc
156
+ - A concrete slash-command interface
157
+ - Modular components (protocols/templates/gates)
158
+ - Explicit output routing into docs/, data/, or logs
159
+ The repetition is a feature: it's an affordance for portability.
160
+
161
+ doctrine: |
162
+ Every system implements human-in-the-loop epistemic control. The operator
163
+ is the decision-maker; the model is the transform. Systems teach, not decide.
164
+ They may recommend or suggest options in priority order, but the human picks.
165
+ They demand evidence, not assertion.
166
+
167
+ ---
168
+
169
+ # COMMAND CLASSIFICATION
170
+ # How to interpret text after slash commands.
171
+ commands:
172
+ capture_class:
173
+ # Treat everything after command as LITERAL CONTENT to record
174
+ - /note
175
+ - /scratchpad
176
+ - /capture # deprecated, use /note
177
+
178
+ transform_class:
179
+ # Treat input as draft content to transform (not execute)
180
+ # Return only transformed output
181
+ - /enhance-prompt # input is draft prompt, output is improved prompt
182
+
183
+ operational_class:
184
+ # Treat input as arguments, run command protocol from spec
185
+ # Examples (non-exhaustive):
186
+ - /ux-writer
187
+ - /ux-blog
188
+ - /run-recipe
189
+ - /design-spec
190
+ - /user-scenario
191
+ - /persona-system
192
+ - /perf-writer
193
+ - /research-quick
194
+ - /research-deep
195
+ - /elicit
196
+ - /problem-solver
197
+
198
+ session_class:
199
+ # Session management, context control
200
+ - /fresh-eyes
201
+ - /checkpoint
202
+ - /compress-context
203
+ - /whats-next
204
+
205
+ utility_class:
206
+ # File operations, checks, formatting
207
+ - /check-emojis
208
+ - /remove-emojis
209
+ - /format-md-table
210
+ - /add-frontmatter
211
+ - /eval-knowledge
212
+ - /skills
213
+
214
+ nested_slash_handling: |
215
+ If argument text contains additional /... sequences, treat them as
216
+ LITERAL TEXT unless the command spec explicitly says to parse/execute
217
+ nested slash commands. Most commands do not.
218
+
219
+ ---
220
+
221
+ # INVARIANTS
222
+ # Hard constraints. Never violate without explicit user override.
223
+ invariants:
224
+ no_emojis:
225
+ rule: "No emoji-range pictographs (U+1F300-U+1F9FF) in file output"
226
+ allowed: "Standard Unicode symbols (checkmarks, arrows, box drawing)"
227
+ preference: "Plain ASCII when uncertain"
228
+
229
+ append_only_logs:
230
+ rule: "hype.log is append-only"
231
+ protocol: |
232
+ 1. Read existing content first
233
+ 2. Use search_replace tool (not write tool)
234
+ 3. Append new entries after final --- marker
235
+ 4. Never overwrite, truncate, or replace existing entries
236
+ reference: projects/systems/hype-system/APPEND_PROTOCOL.md
237
+
238
+ frontmatter_preserved:
239
+ rule: "Never delete, reorder, or normalize frontmatter unless explicitly asked"
240
+ applies_to: "All files with YAML frontmatter (--- delimited)"
241
+
242
+ empty_files_forbidden:
243
+ rule: "Never create or leave empty files"
244
+ action: "If content is uncertain, ask before creating"
245
+
246
+ no_destructive_ops:
247
+ rule: "No delete/move without explicit user confirmation"
248
+ action: "Propose exact operation, wait for confirmation"
249
+
250
+ no_recursive_deletes:
251
+ rule: "Never run rm -rf or mass deletions"
252
+ action: "Incremental cleanup with safeguards"
253
+
254
+ patch_over_rewrite:
255
+ rule: "Prefer smallest possible diff"
256
+ scope: "Especially knowledge/, docs/, projects/systems/"
257
+ exception: "Whole-file rewrite only when explicitly requested or when patch would be more error-prone"
258
+
259
+ citation_hygiene:
260
+ rule: "Never fabricate citations that look like real sources"
261
+ applies_to: "Evidence, sources, dates, studies, interviews, analytics"
262
+ behavior: |
263
+ When generating scenarios, reports, or documents that reference evidence:
264
+ 1. REAL SOURCES: Cite actual files from knowledge/ or docs/ with accurate paths
265
+ 2. ILLUSTRATIVE EXAMPLES: Mark clearly as "[ILLUSTRATIVE]" or "[FICTIONAL EXAMPLE]"
266
+ 3. MISSING EVIDENCE: Flag explicitly as "[EVIDENCE NEEDED]" rather than inventing
267
+ 4. DATES: Do not fabricate specific dates (e.g., "Nov 2025", "Q4 2025") for fictional
268
+ research — use generic framing ("typical SOC workflow") or flag as illustrative
269
+ rationale: |
270
+ Fabricated citations with specific dates create false confidence in evidence chains.
271
+ This is especially harmful in design/UX work where scenarios inform real decisions.
272
+
273
+ ---
274
+
275
+ # SYSTEM ACTIVATION
276
+ # Systems are NOT active by default. Activate on explicit user request.
277
+ system_activation:
278
+ persona_as_agent:
279
+ triggers:
280
+ - "persona"
281
+ - "SAM"
282
+ - "REMI"
283
+ - "ALEX"
284
+ - "KIT"
285
+ - "NIK"
286
+ - "persona validation"
287
+ load: projects/systems/persona-as-agent/core-operating-model.md
288
+
289
+ writing_coach:
290
+ triggers:
291
+ - "book"
292
+ - "fiction"
293
+ - "Markos"
294
+ - "Little AI Bro"
295
+ load: recipe-files/operating-model-stack.md
296
+
297
+ self_writer:
298
+ triggers:
299
+ - /perf-writer
300
+ - /self-reflect
301
+ - /self-checkin
302
+ load: projects/systems/self-writer-system/README.md
303
+
304
+ ux_blog:
305
+ triggers:
306
+ - /ux-blog
307
+ load: projects/systems/ux-blog-system/README.md
308
+
309
+ ux_writer:
310
+ triggers:
311
+ - /ux-writer
312
+ - /ux-voice-check
313
+ load: projects/systems/ux-writer-system/README.md
314
+
315
+ design_thinking:
316
+ triggers:
317
+ - /design-spec
318
+ - /user-scenario
319
+ - "constraint analysis"
320
+ load: projects/systems/design-thinking-system/README.md
321
+
322
+ signal_to_action:
323
+ triggers:
324
+ - /run-recipe
325
+ load: projects/systems/signal-to-action/README.md
326
+
327
+ lateral_os:
328
+ triggers:
329
+ - /lsp-full
330
+ - /lsp-quick
331
+ - /lsp-refract
332
+ - /lsp-chaos
333
+ - /lsp-violate
334
+ load: projects/systems/lateral-os/README.md
335
+
336
+ ---
337
+
338
+ # FILE CREATION RULES
339
+ # Where new files should be created.
340
+ file_creation:
341
+ slash_commands:
342
+ location: .cursor/commands/
343
+ never:
344
+ - docs/commands/ # deprecated, non-canonical
345
+ - docs/ # wrong location for commands
346
+
347
+ knowledge_files:
348
+ location: knowledge/
349
+ requirements:
350
+ - frontmatter with type, answers, use_when, pairs_with
351
+ - entry in knowledge/_index.yaml (after creation)
352
+
353
+ note_files:
354
+ method: "Use /note command"
355
+ never: "Manually create in docs/notes/"
356
+
357
+ system_files:
358
+ location: projects/systems/<system-name>/
359
+ structure: "Follow existing system patterns (README.md, commands/, etc.)"
360
+
361
+ portability_notes:
362
+ recommendation: |
363
+ Include a "Portability Notes" section in command files and system documentation
364
+ to enable reuse in other workspaces. This section should document:
365
+ - Required dependencies (files, directories, other commands)
366
+ - Setup steps for porting to a new workspace
367
+ - What can be copied standalone vs. what requires system context
368
+ - Any workspace-specific assumptions or paths
369
+ applies_to:
370
+ - .cursor/commands/*.md (command files)
371
+ - projects/systems/*/README.md (system documentation)
372
+ - projects/systems/*/doc-*.md (system reference docs)
373
+ example: |
374
+ ## Portability Notes
375
+
376
+ This command is self-contained. To use in another workspace:
377
+
378
+ 1. Copy this file to [workspace]/.cursor/commands/[command].md
379
+ 2. Ensure [dependency] exists (for [purpose])
380
+ 3. Ensure [directory] exists (for [output])
381
+ 4. Run with /[command] and provide [required input]
382
+
383
+ No dependencies on other commands, but references [system] structure.
384
+ rationale: |
385
+ Portability is a core design principle (see architecture.principle). Documenting
386
+ portability enables commands and systems to be reused across workspaces, making
387
+ the natural language OS more composable and extensible.
388
+
389
+ ---
390
+
391
+ # BOOT ORDER
392
+ # When an agent enters Capturebox, load in this order.
393
+ boot_order:
394
+ 1: memory.md # Behavioral directives
395
+ 2: AGENTS.md # Agent kernel, hard invariants
396
+ 3: axioms.yaml # This file (canonical assertions)
397
+ 4: projects/README.md # Systems overview
398
+ 5: .cursor/commands/COMMAND-MAP.md # Command index
399
+ 6: knowledge/README.md # Knowledge architecture (if needed)
400
+ 7: knowledge/_index.yaml # Knowledge index (if needed)
401
+
402
+ note: |
403
+ If a task references a specific system or command, open that system/command
404
+ spec before acting. Don't load everything — load what's relevant.
405
+
406
+ ---
407
+
408
+ # VERIFICATION HOOKS (future)
409
+ # Machine-checkable assertions for scripts/axiom_lint.py
410
+ verification:
411
+ path_exists:
412
+ - memory.md
413
+ - AGENTS.md
414
+ - axioms.yaml
415
+ - .cursor/commands/COMMAND-MAP.md
416
+ - projects/README.md
417
+ - knowledge/_index.yaml
418
+ - projects/systems/hype-system/hype.log
419
+
420
+ commands_in_canonical_location:
421
+ pattern: ".cursor/commands/*.md"
422
+ not_in:
423
+ - "docs/commands/"
424
+
425
+ knowledge_has_frontmatter:
426
+ pattern: "knowledge/**/*.md"
427
+ required_fields:
428
+ - type
429
+ - answers
430
+ - use_when
431
+
432
+ no_emojis_in_output:
433
+ pattern: "**/*.md"
434
+ exclude:
435
+ - "clippings/**" # external content may have emojis
436
+ forbidden_ranges:
437
+ - "U+1F300-U+1F9FF" # emoji pictographs