# Chronicle

> Auto-generated by `lore export`. Full project memory — load this file when you need deep context.

> Auto-generated by `lore export` on 2026-03-25. Do not edit manually — use `lore add` to update.

## Facts

- smoke test WORKS _(trust: medium 66)_
- Make sure the site uses the same look and RPG, SIGIL / Storybook vibe. Do not use Mkdocs or any out of scope styles. _site, pages, html_ _(trust: medium 66)_
- auto-export after lore add is enabled _ux, workflow_ _(trust: medium 66)_
- testing auto-export is wired up _test_ _(trust: medium 66)_
- Make sure build LIC stay in compliance _lic, legal_ _(trust: medium 66)_
- Insure that memory fetches allways work and do not cause race conditions. _memory, race_ _(trust: medium 66)_
- Keep LORE/RPG/SEGIL/STORYBOOK style _style_ _(trust: medium 66)_
- Update CHRONICLE.md _(trust: low 50)_
- Skip lore-generated files in git extraction

Add a frozenset of known lore output files and a helper `_is_lore_only_commit(commit)` that detects commits touching only those files. Skip such commits in git extraction to avoid noise from lore export/auto-generated updates. Also include a minor CHRONICLE.md update. _(trust: low 50)_
- Validate and auto-repair identity on startup

Add validation and repair for the stored identity. Introduces is_valid_uuid() in config.py and ensure_identity() in store.py to detect missing or malformed identity IDs, regenerate a new UUID (and a name only if absent), persist the fix, and return (was_repaired, identity). Update cli._require_root to call ensure_identity() and notify the user if the identity was regenerated. This ensures the store always has a valid identity before running commands. _(trust: low 50)_
- configs should allways have identity and uuid. If not it should be fixed on add or any action that touches config. _config_ _(trust: low 50)_
- Add CHRONICLE sync & automated releases

Introduce CHRONICLE import/sync and release automation.

- Add src/lore/chronicle.py: conservative CHRONICLE.md importer with section parsing, export-suffix stripping (trust/scope/tags), deduplication, dry-run support, and indexing helpers.
- Add CLI sync command and hook subcommands in src/lore/cli.py to import CHRONICLE entries, index them, optionally export context files, and manage a post-merge sync hook.
- Add post-merge hook install/uninstall helpers in src/lore/extract.py; the hook runs lore sync/export only when CHRONICLE.md changed.
- Add scripts/prepare_release.py and .github/workflows/release.yml: workflow + helper to bump or set versions, generate/update CHANGELOG.md, write release notes, tag, and create a GitHub Release (outputs version/tag for Actions).
- Update README.md with docs for the CHRONICLE sync hooks, the new lore sync command, and the automated release workflow.

These changes enable teammates to import shared CHRONICLE entries safely and automate release/versioning from CI. _(trust: low 50)_
- Add PyPI publish job and CHRONICLE notes

Expose the release tag output and add a new `publish` job in the GitHub Actions workflow that runs after `release`. The publish job checks out the release tag, sets up Python 3.12, builds distributions with `python -m build`, and publishes to PyPI via pypa/gh-action-pypi-publish.

Update CHRONICLE.md (date bump) to document the new CHRONICLE import/sync and automated release changes: conservative CHRONICLE importer, CLI sync command and hooks, post-merge hook helpers, scripts/prepare_release.py, and the release workflow that bumps/sets versions, generates CHANGELOG/release notes, tags, and creates GitHub Releases. These changes enable importing shared CHRONICLE entries and automating release/versioning from CI. _(trust: low 50)_

## Summaries

- memory entry and usage should flow clean with proper guides _memory_ _(trust: medium 66)_
