AGENT SKILL

interactive-menu

Pattern for presenting numbered choices to the user in OMP's conversational TUI

License 许可
Apache-2.0
最近更新
2026-10-31
Stars
★ 1
Forks
0

01 前言 Front Matter

name
interactive-menu
autoinvoke
false
invocation
none (referenced by commands that need selection)
description
Pattern for presenting numbered choices to the user in OMP's conversational TUI

03 SKILL.md 正文

Skill: Interactive Menu

Metadata

Field Value
ID interactive-menu
Keywords interactive-menu:, /interactive-menu
Tier UI Pattern
Source src/skills/interactive-menu.mts

Description

OMP does not have a native menu widget. Use this conversational pattern when a command needs user selection.

Interface

interface SkillInput {
  trigger: string;
  args: string[];
}

interface SkillOutput {
  status: "ok" | "error";
  message: string;
}

export async function activate(input: SkillInput): Promise<SkillOutput>
export function deactivate(): void

Implementation

Spawns bin/omp.mjs interactive-menu [args]. No persistent resources are maintained.

Format

{Title}

{Optional context line}

  1. {Option A}  -- {description}
  2. {Option B}  -- {description}
  3. {Option C}  -- {description}
  4. Type something else

Your choice:

Rules

  1. Present options as a numbered list. Keep descriptions to one line each.
  2. Always include a "Type something else" option as the last item.
  3. Wait for user input. Do not assume a choice.
  4. Accept the number ("1") or the option name ("graphwiki") as valid input.
  5. If the user types something not in the list (via the last option), validate it against allowed values. If invalid, re-present the menu with an error message.
  6. After selection, confirm what was set: "Set graph.provider to graphwiki (local)."
  7. Maximum 6 options. If more choices exist, group them or paginate.
  8. Do not use emoji, decorative borders, or ASCII art. Clean text only.

Example: Graph Provider

Graph Provider

Current: graphwiki (from local config)

  1. graphwiki   -- TypeScript knowledge graph with wiki compilation
  2. graphify    -- Python knowledge graph with community detection
  3. none        -- Disable graph context
  4. Type something else

Your choice:

User types: 2

Agent responds: "Set graph.provider to graphify (local). Install graphify if not already: pip install graphify"

Example: Orchestration Mode

Orchestration Mode

Current: ralph

  1. ralph       -- Persistence loop with architect verification
  2. autopilot   -- Full autonomous pipeline
  3. ultrawork   -- Parallel execution
  4. ultraqa     -- QA cycling
  5. Type something else

Your choice:

04 同仓库更多 Skills