Skip to content

Validation & CI

Validates commits for Lore protocol compliance. Designed for CI/CD integration.

Terminal window
lore validate # validate last commit
lore validate HEAD~5..HEAD # validate a range
lore validate --since main # all commits since branching from main
lore validate --last 3 # last 3 commits
RuleSeverityDescription
Valid trailer formatERRORTrailers must be parseable key-value pairs
Valid enum valuesERRORConfidence, Scope-risk, Reversibility must use allowed values
Lore-id presentERROREvery Lore-enriched commit must have a Lore-id
Lore-id formatERRORMust be 8-char hex
Lore-id uniqueERRORNo two commits share a Lore-id
Intent <= 72 charsWARNINGSubject line length
Required trailers presentWARNING or ERRORPer .lore/config.toml setting
Message <= max linesWARNINGPer .lore/config.toml setting
References validWARNINGSupersedes/Depends-on/Related point to existing atoms
> 5 of any trailer typeWARNINGCommit may be too large; consider splitting
CodeMeaning
0All commits valid
1One or more errors found
2Warnings only (no errors)
$ lore validate HEAD~3..HEAD
✗ abc1234 "Add auth interceptor"
ERROR: Missing Lore-id trailer
WARNING: No Constraint trailers (recommended by .lore/config.toml)
✓ def5678 "Prevent silent session drops"
No issues
⚠ ghi9012 "Add retry logic"
WARNING: Intent line is 85 characters (max recommended: 72)
Result: 1 error, 2 warnings across 3 commits
{
"lore_version": "1.0",
"valid": false,
"summary": { "errors": 1, "warnings": 2, "commits_checked": 3 },
"results": [
{
"commit": "abc1234",
"lore_id": null,
"valid": false,
"issues": [
{
"severity": "error",
"rule": "lore-id-present",
"message": "Missing Lore-id trailer"
}
]
}
]
}
name: Lore Validate
on: [pull_request]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Lore CLI
run: npm install -g @lore-protocol/cli
- name: Validate commits
run: lore validate --since origin/main
lore-validate:
stage: test
script:
- npm install -g @lore-protocol/cli
- lore validate --since origin/main
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"

The exit code tells your CI system whether to pass or fail the pipeline:

  • Exit 0: All valid — pipeline passes
  • Exit 1: Errors found — pipeline fails
  • Exit 2: Warnings only — you decide (most teams let this pass)