Skip to content

Handbook

Project rules and memory

Distinguish project instructions, rules, import boundaries and durable knowledge from short-lived task state.

Reviewed CLI source version: 2.4.0 · Editorial update:

Project instructions

Create LURUS.md in the project root:

# Project instructions

Use the existing TypeScript style. Read relevant code before editing.
Run the existing lint and test scripts after changes.
Do not modify deployment configuration without an explicit request.

Global counterpart: ~/.lurus/LURUS.md for cross-project user rules. Restart after edits because context is cached. /init creates a scaffold if LURUS.md is missing, then asks the agent to analyze the project and expand the file. It does not immediately produce a complete instruction file.

Loading order: global instructions → project instructions → subdirectory instructions → imported context → rules. Root LURUS.md takes precedence over fallback CLAUDE.md. .lurus/LURUS.md and LURUS.local.md are also appended. The local Markdown addition is not a settings.local.json layer.

A bounded recursive scan loads LURUS.md files from subdirectories, falling back to CLAUDE.md. Hidden directories and node_modules are skipped. Loading is not deferred until a file is edited, and the scan is not unlimited. Project-specific guidance takes precedence over generic user defaults; external file content cannot override higher-priority security rules.

Create a rule

.lurus/rules/typescript.md:

---
description: TypeScript conventions
alwaysApply: true
priority: 10
---

Use explicit types and preserve strict null checks.
Do not introduce any merely to silence type errors.

Globally use ~/.lurus/rules/typescript.md with the same structure. Warning: /rules create may overwrite a project file with the same name without another dialog. Check the name first. After restarting:

/rules
/rules list
/rules show typescript
/rules create local-conventions

show displays the loaded rule. create writes a project rule, defaulting to the name new-rule, alwaysApply: true and priority: 0.

FieldActual effect
descriptionManagement description.
alwaysApplyActive when true or absent; inactive when false.
priorityDefaults to 0. Sorted descending within scope, then by name and path. Global rules load before project rules.
globsCurrently does not automatically activate rules for matching files. Do not use it as an access boundary.

Templates do not load as active rules. Use skills for actual file-related skill materialization rather than treating rule globs as a security boundary.

Import context

Single-line directive in LURUS.md:

@./docs/development-guide.md

The file must be deliberately approved project context. Project imports stay within the canonical workspace root; global imports within the canonical ~/.lurus root. Symlinks are canonicalized, duplicates skipped and recursion bounded. Missing/unreadable/out-of-root imports are skipped. This mechanism does not grant blanket approval to import arbitrary local files or secrets.

Advanced: keep reusable global instructions small, project requirements in LURUS.md and domain checklists in activated skills. Relative imports in combined project instructions are resolved relative to LURUS.md in the project root, not automatically relative to each importing file.

Memory and TaskLedger

Memory stores knowledge useful for different future tasks: non-obvious architecture boundaries, corrected user rules or unusual verification workflows. Not task-specific logs, secrets or a readily discoverable tech-stack summary.

The task record and task list instead preserve current status, decisions and verification results. /task new starts a new task; /clear clears chat, not durable memory.

Warning: /memory clear deletes project memory without another confirmation dialog. Do not use it to view or test reload memory. /memory sweep attempts model-dependent consolidation of stored knowledge; a lossless result is not guaranteed.

/memory
/memory edit
/memory sweep
/memory clear
  • Status: project catalogue and topic overview; not every topic body automatically injected into the prompt.
  • edit: EDITOR→VISUAL→vi, followed by validation; executable must exist.
  • sweep: manual consolidation attempt even during error cooldown; model-dependent, not guaranteed lossless rewriting.
  • clear: deletes project memory without a separate confirmation dialog. Not for viewing or trial reloading.

The memory catalogue helps retrieve stored knowledge; its contents do not replace system rules. contextBudget defaults to 15,000 tokens, with 30% reserved for memory. It does not limit mandatory instructions or the entire model window. Manage memory through the CLI rather than editing stored data without review.

Troubleshooting

For a missing rule, check the path, template status, alwaysApply and restart. globs does not activate rules automatically. For a missing import, check the project boundary, path and readability without bypassing secret approval. For memory problems, distinguish viewing from clear and sweep.

Next: settings, sessions, context.

A deliberate choice

Before your first prompt.

Interactive demo
Lurus Codeprivacy-demo · illustrative workspace

Demo session ready. Your model choice and data route are separate decisions.

Illustrative scenario. No real sign-in, security test or code transmission takes place.

Image preview