Skip to content

Quick Start

import { Aside } from ‘@astrojs/starlight/components’;

Terminal window
cd your-project
lore init
# Created .lore/config.toml with protocol version 1.0

This creates a .lore/config.toml file with sensible defaults. Commit it to your repo so your team shares the same configuration.

Stage your changes normally, then use lore commit:

Terminal window
git add src/auth/interceptor.ts
lore commit -i
Terminal window
git add src/auth/interceptor.ts
lore 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 clean
Terminal window
git add src/auth/interceptor.ts
echo '{
"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 commit

All three modes produce the same result: a standard git commit with Lore trailers.

Terminal window
# Full context for a file
lore context src/auth/interceptor.ts
# Just the constraints
lore constraints src/auth/interceptor.ts
# What was rejected and why
lore rejected src/auth/interceptor.ts
# Forward-looking warnings
lore directives src/auth/interceptor.ts
# Why does line 47 exist?
lore why src/auth/interceptor.ts:47
Terminal window
lore stale src/auth/

This checks multiple signals: age, code drift, low confidence, expired directive hints, and orphaned dependencies.

Terminal window
# Validate all commits since branching from main
lore validate --since main

Add this to your CI pipeline to enforce protocol compliance.