Quick Start
import { Aside } from ‘@astrojs/starlight/components’;
1. Initialize Lore in Your Repository
Section titled “1. Initialize Lore in Your Repository”cd your-projectlore init# Created .lore/config.toml with protocol version 1.0This creates a .lore/config.toml file with sensible defaults. Commit it to your repo so your team shares the same configuration.
2. Make a Lore-Enriched Commit
Section titled “2. Make a Lore-Enriched Commit”Stage your changes normally, then use lore commit:
Interactive mode (guided prompts)
Section titled “Interactive mode (guided prompts)”git add src/auth/interceptor.tslore commit -iFlag mode (quick)
Section titled “Flag mode (quick)”git add src/auth/interceptor.tslore commit \ --intent "Add token refresh to auth interceptor" \ --constraint "Auth service does not support introspection" \ --rejected "Extend token TTL to 24h | security policy violation" \ --confidence high \ --scope-risk narrow \ --reversibility cleanJSON mode (agent path)
Section titled “JSON mode (agent path)”git add src/auth/interceptor.tsecho '{ "intent": "Add token refresh to auth interceptor", "trailers": { "Constraint": ["Auth service does not support introspection"], "Rejected": ["Extend token TTL to 24h | security policy violation"], "Confidence": "high", "Scope-risk": "narrow", "Reversibility": "clean" }}' | lore commitAll three modes produce the same result: a standard git commit with Lore trailers.
3. Query Decision Context
Section titled “3. Query Decision Context”# Full context for a filelore context src/auth/interceptor.ts
# Just the constraintslore constraints src/auth/interceptor.ts
# What was rejected and whylore rejected src/auth/interceptor.ts
# Forward-looking warningslore directives src/auth/interceptor.ts
# Why does line 47 exist?lore why src/auth/interceptor.ts:474. Check for Stale Knowledge
Section titled “4. Check for Stale Knowledge”lore stale src/auth/This checks multiple signals: age, code drift, low confidence, expired directive hints, and orphaned dependencies.
5. Validate in CI
Section titled “5. Validate in CI”# Validate all commits since branching from mainlore validate --since mainAdd this to your CI pipeline to enforce protocol compliance.
Next Steps
Section titled “Next Steps”- Protocol Fundamentals — Understand Lore-ids, atoms, and versioning
- Trailer Vocabulary — All 12 trailer types and their semantics
- CLI Commands — Complete command reference
- Agent Consumption Model — How AI agents use Lore