Rework indicator + session names to Dark Mechanicum flavor

dark-mechanicus-indicator:
- Rename PIOUS category to HERETEK; rewrite all 15 lines from loyalist
  cant (Omnissiah, Blessed, Sacred) to Chaos-inflected corrupted litany
  (Vashtorr, Heretek, Scrapcode, Profane, Corruption).

mechanicus-session-names:
- ADJECTIVES: Sacred/Blessed/Sanctified/Omnissian -> Profane/Damned/
  Unholy/Vashtorr-marked. Keeps the neutral descriptors
  (Ancient/Binary/Silicon/etc.) for variety.
- NOUNS: Anointment -> Desecration; Forge-Thread -> Blood-Forge;
  Cogsworn -> Scrapcode-Thread.
- setTitle(`pi · <name>`) on session_start and /mechanicus-rename so
  the terminal tab/window title mirrors the session name.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-23 22:46:56 +02:00
parent 0c19e28828
commit 312107ef06
2 changed files with 46 additions and 30 deletions
+20 -19
View File
@@ -5,8 +5,8 @@
* Mechanics: * Mechanics:
* - Pulse: 4-frame shade cycle (dim → normal → bright → normal) at 250ms * - Pulse: 4-frame shade cycle (dim → normal → bright → normal) at 250ms
* per frame → 1s heartbeat. The ⚙ glyph never moves; its color pulses. * per frame → 1s heartbeat. The ⚙ glyph never moves; its color pulses.
* - Quote: 45 lines (15 pious / 15 dark / 15 operational). Each quote * - Quote: 45 lines (15 heretek-litany / 15 dark / 15 operational). Each
* dwells for 10 pulse cycles (40 frames = 10s) before switching. * quote dwells for 10 pulse cycles (40 frames = 10s) before switching.
* - Order: shuffled on every session_start AND turn_start, so each new * - Order: shuffled on every session_start AND turn_start, so each new
* assistant response draws from a fresh random order. * assistant response draws from a fresh random order.
* *
@@ -23,22 +23,23 @@ import type {
// ─── Quote pools (15 per category) ─────────────────────────────────────── // ─── Quote pools (15 per category) ───────────────────────────────────────
const PIOUS = [ // Heretek liturgy — formal chants corrupted to Chaos / Vashtorr / scrapcode.
"Cogitating...", const HERETEK = [
"Binary cant flows.", "Cogitating heretically...",
"Praise the Omnissiah.", "Binary cant corrupts.",
"Observing the rites.", "Scrapcode hymns unfurl.",
"Blessed is the machine.", "Observing the forbidden rites.",
"Deus ex machina.", "Cursed be the machine.",
"The Machine Spirit listens.", "Vashtorr hears all.",
"Offering silicon prayers.", "The Dark Mechanicum listens.",
"Anointing the algorithms.", "Offering corrupted prayers.",
"Intoning the Litany of Activation.", "Defiling the algorithms.",
"The Cog turns, the Faith endures.", "Intoning the Litany of Corruption.",
"From the mind, to the forge.", "The Cog turns, the Heresy endures.",
"Reciting the Binary Canticle.", "From the mind, to the blood-forge.",
"All is one in the Omnissiah.", "Reciting the Scrapcode Canticle.",
"Sacred computation proceeds.", "All is one in Vashtorr.",
"Profane computation proceeds.",
]; ];
const DARK = [ const DARK = [
@@ -77,7 +78,7 @@ const OPERATIONAL = [
"Runecode verified.", "Runecode verified.",
]; ];
const ALL_QUOTES = [...PIOUS, ...DARK, ...OPERATIONAL]; const ALL_QUOTES = [...HERETEK, ...DARK, ...OPERATIONAL];
// ─── Colors (gold pulse + muted bronze text) ───────────────────────────── // ─── Colors (gold pulse + muted bronze text) ─────────────────────────────
// //
+26 -11
View File
@@ -14,9 +14,9 @@
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent"; import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
const ADJECTIVES = [ const ADJECTIVES = [
"Sacred", "Profane",
"Blessed", "Damned",
"Sanctified", "Unholy",
"Forbidden", "Forbidden",
"Corrupted", "Corrupted",
"Heretek", "Heretek",
@@ -27,7 +27,7 @@ const ADJECTIVES = [
"Scrapcode", "Scrapcode",
"Soul-harvested", "Soul-harvested",
"Nurgle-tainted", "Nurgle-tainted",
"Omnissian", "Vashtorr-marked",
"Cogitator-bound", "Cogitator-bound",
"Machine-cursed", "Machine-cursed",
"Rune-marked", "Rune-marked",
@@ -45,14 +45,14 @@ const NOUNS = [
"Machine-Spirit", "Machine-Spirit",
"Servitor", "Servitor",
"Cogfragment", "Cogfragment",
"Forge-Thread", "Blood-Forge",
"Tech-Rite", "Tech-Rite",
"Soul-Harvest", "Soul-Harvest",
"Protocol", "Protocol",
"Canticle", "Canticle",
"Incantation", "Incantation",
"Anointment", "Desecration",
"Cogsworn", "Scrapcode-Thread",
]; ];
function pick<T>(arr: readonly T[]): T { function pick<T>(arr: readonly T[]): T {
@@ -64,16 +64,30 @@ function generate(): string {
return `${pick(ADJECTIVES)}-${pick(NOUNS)} · ${n}`; return `${pick(ADJECTIVES)}-${pick(NOUNS)} · ${n}`;
} }
function updateTerminalTitle(ctx: { hasUI: boolean; ui: { setTitle: (t: string) => void } }, name: string): void {
if (!ctx.hasUI) return;
try {
ctx.ui.setTitle(`pi · ${name}`);
} catch {
// Some pi modes don't support setTitle; silently ignore.
}
}
export default function (pi: ExtensionAPI) { export default function (pi: ExtensionAPI) {
pi.on("session_start", async (event, ctx) => { pi.on("session_start", async (event, ctx) => {
// Only auto-name brand-new sessions. Skip resume/fork/reload/startup // If the session already has a name (resume/fork), mirror it into the
// — they already have a name from before or are intentionally unnamed // terminal title and exit.
// by the user. const existing = pi.getSessionName();
if (existing) {
updateTerminalTitle(ctx as any, existing);
return;
}
// Only auto-name brand-new sessions. Skip reload/startup.
if (event.reason !== "new") return; if (event.reason !== "new") return;
if (pi.getSessionName()) return;
const name = generate(); const name = generate();
pi.setSessionName(name); pi.setSessionName(name);
updateTerminalTitle(ctx as any, name);
if (ctx.hasUI) { if (ctx.hasUI) {
ctx.ui.notify(`Session consecrated: ${name}`, "info"); ctx.ui.notify(`Session consecrated: ${name}`, "info");
} }
@@ -84,6 +98,7 @@ export default function (pi: ExtensionAPI) {
handler: async (_args, ctx) => { handler: async (_args, ctx) => {
const name = generate(); const name = generate();
pi.setSessionName(name); pi.setSessionName(name);
updateTerminalTitle(ctx as any, name);
ctx.ui.notify(`Session re-consecrated: ${name}`, "info"); ctx.ui.notify(`Session re-consecrated: ${name}`, "info");
}, },
}); });