Phase 2 of the ubiquitous-language system. langgen generates LANGUAGE.md from the brain glossary wing, replacing the hand-written pilot file (mathias/tapir#18). Pull-based: runs at session start / bootstrap, never push/webhook. LANGUAGE.md is a derived file per the canonical-vs-derived context rule — never hand-edited after this lands.
GATED — do not start until: the brain glossary has changed ≥2 times after Phase 0, proving regeneration is a real need. Check with the human before picking this up.
Read glossary entries as local files (brain syncs via Syncthing/git — no network dependency, must work offline for Crush sessions with no cloud egress).
Select entries where status: active AND (scope: homelab-core OR scope: project:<project>).
Collision = exit 1 with a clear message if the same term exists in both selected scopes. No merge logic, no precedence.
Emit LANGUAGE.md: header stamp generated: <date> from glossary@<git-sha>, term table (term / agent definition / never-say from aliases_rejected), caveman rubric footer (rubric text lives in tools/langgen/rubric.md, embedded via go:embed).
Warn (stderr) above 20 terms — F1 glossary-bloat canary. Hard token budget ~600 tokens for output.
Acceptance criteria
Binary builds with stdlib + a YAML frontmatter parser only
Collision test, scope-filter test, status-filter test, bloat-warning test
Sha stamp verified against glossary repo HEAD
Wired into hyperguild session bootstrap (regenerate on session start)
tapir's hand-written LANGUAGE.md replaced by generated output in a follow-up PR, diff reviewed by human
## Context
Phase 2 of the ubiquitous-language system. `langgen` generates `LANGUAGE.md` from the brain glossary wing, replacing the hand-written pilot file (mathias/tapir#18). Pull-based: runs at session start / bootstrap, never push/webhook. LANGUAGE.md is a derived file per the canonical-vs-derived context rule — never hand-edited after this lands.
**GATED — do not start until:** the brain glossary has changed ≥2 times after Phase 0, proving regeneration is a real need. Check with the human before picking this up.
## Spec
Go binary in `tools/langgen/`, ~150 LOC target.
```
langgen --project tapir --glossary <path-to-brain-repo>/wiki/glossary --out LANGUAGE.md
```
Behavior:
1. Read glossary entries as local files (brain syncs via Syncthing/git — no network dependency, must work offline for Crush sessions with no cloud egress).
2. Select entries where `status: active` AND (`scope: homelab-core` OR `scope: project:<project>`).
3. **Collision = exit 1** with a clear message if the same `term` exists in both selected scopes. No merge logic, no precedence.
4. Emit LANGUAGE.md: header stamp `generated: <date> from glossary@<git-sha>`, term table (term / agent definition / never-say from aliases_rejected), caveman rubric footer (rubric text lives in `tools/langgen/rubric.md`, embedded via go:embed).
5. Warn (stderr) above 20 terms — F1 glossary-bloat canary. Hard token budget ~600 tokens for output.
## Acceptance criteria
- [ ] Binary builds with stdlib + a YAML frontmatter parser only
- [ ] Collision test, scope-filter test, status-filter test, bloat-warning test
- [ ] Sha stamp verified against glossary repo HEAD
- [ ] Wired into hyperguild session bootstrap (regenerate on session start)
- [ ] tapir's hand-written LANGUAGE.md replaced by generated output in a follow-up PR, diff reviewed by human
## Out of scope
Vocabulary drift detection (ai-sessions Phase 4), ntfy integration (Phase 3), any push/webhook mechanism.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Context
Phase 2 of the ubiquitous-language system.
langgengeneratesLANGUAGE.mdfrom the brain glossary wing, replacing the hand-written pilot file (mathias/tapir#18). Pull-based: runs at session start / bootstrap, never push/webhook. LANGUAGE.md is a derived file per the canonical-vs-derived context rule — never hand-edited after this lands.GATED — do not start until: the brain glossary has changed ≥2 times after Phase 0, proving regeneration is a real need. Check with the human before picking this up.
Spec
Go binary in
tools/langgen/, ~150 LOC target.Behavior:
status: activeAND (scope: homelab-coreORscope: project:<project>).termexists in both selected scopes. No merge logic, no precedence.generated: <date> from glossary@<git-sha>, term table (term / agent definition / never-say from aliases_rejected), caveman rubric footer (rubric text lives intools/langgen/rubric.md, embedded via go:embed).Acceptance criteria
Out of scope
Vocabulary drift detection (ai-sessions Phase 4), ntfy integration (Phase 3), any push/webhook mechanism.