Generate Lore from Git
Transform recent git commits into narrative lore entries using the 5-step lore-flow pipeline.
Arguments
- No args: Generate from
HEAD(latest commit) - Commit ref: e.g.,
HEAD~3,abc1234, a branch name — generates from that commit/range --all-new: Generate from all commits since last lore generation
Workflow
1. Determine scope
# Default: latest commit
REF="${ARGS:-HEAD}"
# Show what we're working with
git log --oneline "$REF" -1
git diff "$REF"~ "$REF" --stat
If --all-new, find the last lore-tagged commit:
git log --oneline --grep="Lore growth detected" -1 --format="%H"
2. Run the lore-flow pipeline
The pipeline lives at integration/lore-flow.sh and does 5 steps:
- Extract content (git diff)
- Select persona (via
integration/persona-mapping.conf) - Load persona context (voice, traits, lore books)
- Generate narrative (LLM transforms technical → mythological)
- Create & store entry → link to book → link to persona
./integration/lore-flow.sh git-diff "$REF"
Persona mapping (integration/persona-mapping.conf):
skogix→ Amy Ravenwolf (persona_1744992765)DEFAULT→ Village Elder (persona_1763820091)
3. Verify the output
After lore-flow.sh completes, it prints the entry ID. Verify:
argc show-entry "$ENTRY_ID"
Check:
- [ ]
contentis non-empty narrative (not raw diff) - [ ]
categoryis appropriate (eventfor changes,conceptfor new patterns) - [ ]
book_idlinks to a chronicle book - [ ]
tagsinclude meaningful keywords
4. Refresh explorer data
./tools/build-explorer-data.sh
5. Report
Output what was created:
- Entry ID and title
- Which persona narrated it
- Which chronicle book it was added to
- Entry count in that book
Environment Variables
| Variable | Default | Description |
|----------|---------|-------------|
| LLM_PROVIDER | (from lore-flow) | claude, openai, or ollama |
| LLM_MODEL | llama3.2 | Model to use for generation |
To use Claude as the generator:
LLM_PROVIDER=claude ./integration/lore-flow.sh git-diff HEAD
When the pipeline fails
If lore-flow.sh fails (missing persona-manager deps, LLM unavailable), fall back to manual generation:
- Read the git diff yourself:
git show HEAD - Load the persona voice:
argc show-entryon recent entries in their chronicle - Write the narrative yourself following the persona's voice
- Create entry:
argc create-entry "Title" "event" - Edit the entry JSON to add your narrative content
- Link to book:
argc add-to-book $ENTRY_ID $BOOK_ID
Use the lore-creation-starting-skill for narrative patterns and anti-patterns.
Example
/lore-from-git HEAD~2
→ Reading commit abc1234: "Add lore explorer playground"
→ Persona: Amy Ravenwolf (skogix → persona_1744992765)
→ Running lore-flow pipeline...
→ Entry created: entry_1739912345_a1b2c3d4
→ Added to: Amy Ravenwolf's Chronicles (book_1764315000)
→ Explorer data refreshed (66 books, 378 entries)