Hub: 🔌 OMP Extensions · Contract: 🧭 Extension UX Contract · Runtime: omp only.

1. 💎 Blueprint

id: mythomp                 # display/SSOT id
runtime_file: ~/.omp/agent/extensions/mythic-codes.ts
rebrand: planned separately; do not load duplicate wrappers
data: ~/.omp/agent/extensions/mythic-codes/
  config.json: keyword → { file, label, emoji, description }
  *.md: mode instructions injected on match
hook: before_agent_start
human_command: /mythic
command_owner: mythomp
human_ui: "bare command overview · subcommands for fast paths"
flag: mythic-codes (default true)
status: shipped

2. 🎯 Purpose

Match magic phrase → inject mode markdown → model follows instructions → magenta MYTHIC CODE ACTIVATED banner.

Catalog: ymlsum · cheshe · deepaudit · refacto · docskurby.

3. ✅ Implemented behavior

3.1 Trigger (before → after)

All three intentional forms match:

function matchesKeyword(prompt: string, keyword: string): boolean {
  const k = escapeRegExp(keyword);
  return [
    new RegExp(`(^|\\s)/mythic\\s+${k}\\b`, "i"),
    new RegExp(`(^|\\s)/${k}\\b`, "i"),
    new RegExp(`\\b${k}\\b`, "i"),
  ].some((rx) => rx.test(prompt));
}

3.2 Renderer

OMP persists details, not root fields.

message: {
  customType: "mythic-combined",
  content: combined.join("\n\n---\n\n"),
  display: true,
  attribution: "user",
  details: { matchedCodes },
}
// renderer: message.details?.matchedCodes ?? []

3.3 Model steering

return {
  message: { /* … */ },
  systemPrompt: [...event.systemPrompt, `\n\n## Active OMP Codes\n${combined}`],
};

/mythic <keyword> [request] is handled before before_agent_start, so it starts a new turn with the selected mode as a visible custom message. Bare and slash keyword forms use the hook and append the mode to that turn’s system prompt.

4. 🏗️ Flow

sequenceDiagram
  U->>OMP: prompt with keyword
  OMP->>mythomp: before_agent_start
  mythomp->>OMP: custom message + optional systemPrompt
  OMP->>Model: injected mode .md
  OMP->>TUI: mythic-combined renderer

5. 🧪 Smoke

/mythic ymlsum summarize this repo in yaml
/mythic                    → lists active codes
/mythic reload             → after editing mythic-codes/*.md

6. ✅ Verified

  • /mythic lists configured codes with emoji
  • Activation banner reads from message.details.matchedCodes
  • Matching mode instructions append to the current system prompt
  • /ymlsum and bare ymlsum trigger the configured mode

7. 📁 User expansion

  1. Add entry to mythic-codes/config.json
  2. Add mythic-codes/<file>.md with <system-notice> instructions
  3. /mythic reload