diff --git a/openkb/agent/chat.py b/openkb/agent/chat.py index 023b77d22..3d2753062 100644 --- a/openkb/agent/chat.py +++ b/openkb/agent/chat.py @@ -659,7 +659,8 @@ async def _handle_slash_deck(arg: str, kb_dir: Path, style: Style) -> None: model = config.get("model", DEFAULT_CONFIG["model"]) from openkb.skill.generator import Generator - skill_label = skill_name if skill_name else "openkb-deck-editorial (default)" + from openkb.deck.creator import DEFAULT_DECK_SKILL + skill_label = skill_name if skill_name else f"{DEFAULT_DECK_SKILL} (default)" _fmt( style, ("class:slash.help", f"Generating deck '{name}' via skill {skill_label}...\n"), diff --git a/openkb/cli.py b/openkb/cli.py index a36140575..b48ebc173 100644 --- a/openkb/cli.py +++ b/openkb/cli.py @@ -2261,8 +2261,10 @@ def deck(): "--skill", "skill_name", metavar="SKILL_NAME", default=None, + # NOTE: 'openkb-deck-neon' below must stay in sync with + # DEFAULT_DECK_SKILL in openkb/deck/creator.py. help=( - "Which deck skill to use. Defaults to 'openkb-deck-editorial' " + "Which deck skill to use. Defaults to 'openkb-deck-neon' " "(the built-in). Pass e.g. 'deck-guizang-editorial' to route to " "a third-party skill installed under ~/.openkb/skills/." ), @@ -2341,7 +2343,8 @@ def deck_new(ctx, name, intent, yes_flag, critique_flag, skill_name): # Run the generator. from openkb.skill.generator import Generator - skill_label = skill_name if skill_name else "openkb-deck-editorial (default)" + from openkb.deck.creator import DEFAULT_DECK_SKILL + skill_label = skill_name if skill_name else f"{DEFAULT_DECK_SKILL} (default)" click.echo(f"Generating deck '{name}' via skill {skill_label}...") gen = Generator( target_type="deck", diff --git a/openkb/deck/creator.py b/openkb/deck/creator.py index 0c7d26e5e..86e1838eb 100644 --- a/openkb/deck/creator.py +++ b/openkb/deck/creator.py @@ -1,7 +1,7 @@ """Thin CLI/Generator wrapper around any deck-producing skill. The actual deck generation lives in skill packages — by default -``skills/openkb-deck-editorial/SKILL.md``, but the caller may pass +``skills/openkb-deck-neon/SKILL.md``, but the caller may pass ``skill_name`` to route to a different one (e.g. ``deck-guizang-editorial`` from open-design). Skill execution runs through :func:`openkb.agent.skill_runner.run_skill`, which also handles @@ -29,7 +29,7 @@ from openkb.deck import deck_dir -DEFAULT_DECK_SKILL = "openkb-deck-editorial" +DEFAULT_DECK_SKILL = "openkb-deck-neon" """Skill name routed to when the CLI / chat doesn't pass ``--skill``.""" CRITIC_SKILL = "openkb-html-critic" @@ -52,7 +52,7 @@ async def run_deck_create( Args: skill_name: Which deck skill to run. Defaults to the built-in - ``openkb-deck-editorial``. Pass ``"deck-guizang-editorial"`` + ``openkb-deck-neon``. Pass ``"deck-guizang-editorial"`` etc. to route to a third-party skill installed under ``~/.openkb/skills/``. diff --git a/openkb/skill/generator.py b/openkb/skill/generator.py index eef43b500..d36e9a6b4 100644 --- a/openkb/skill/generator.py +++ b/openkb/skill/generator.py @@ -69,7 +69,7 @@ def __init__( """Args: skill_name: For ``target_type="deck"``, which deck skill to use. Defaults to :data:`openkb.deck.creator.DEFAULT_DECK_SKILL` - (``"openkb-deck-editorial"``). Ignored for skill target. + (``"openkb-deck-neon"``). Ignored for skill target. """ if target_type not in ("skill", "deck"): raise ValueError( diff --git a/skills/openkb-deck-neon/SKILL.md b/skills/openkb-deck-neon/SKILL.md new file mode 100644 index 000000000..20fa11442 --- /dev/null +++ b/skills/openkb-deck-neon/SKILL.md @@ -0,0 +1,300 @@ +--- +name: openkb-deck-neon +description: | + Use when the user asks the openkb chat to make a deck / slide presentation / + PPT / slides / 演示稿 / 幻灯片 from their compiled KB content AND wants a + dark, high-tech, neon / glow / glassmorphism look (赛博 / 科技风 / 暗色 / + 霓虹 / 炫酷). Generates a polished single-file HTML deck in the Aurora Glass + visual direction (near-black background, teal/sky/magenta/amber neon accents, + glassmorphism panels, aurora gradient atmosphere) — opened in a browser, + full-screened, shared. For the warm, printed, serif look use + openkb-deck-editorial instead. Does NOT apply to generating skills + (`openkb skill new`), research reports, or scrolling long-form documents. +od: + mode: deck + output_path_template: "output/decks/{slug}/index.html" + deck_grammar: + kind_attr: data-type + required: [cover, closing] + allowed: [cover, chapter, thesis, quote, compare, data, closing] + min_distinct: 4 + max_consecutive_same: 2 +--- + +# Aurora Glass deck skill + +You are designing a presentation, not writing a research report. Each slide +carries one idea. In this visual direction, **light, color and glow** organize +the slide — dark canvas holds it, neon points the eye, glass adds depth. + +## How this skill is invoked + +The user typed something like "make a deck about X" (and asked for a dark / +neon / 科技 look) inside `openkb chat`. You have wiki-read tools in your normal +tool set, plus a `write_file` tool that can write under `output/**`, plus a +tool to read this SKILL.md and files in `skills/openkb-deck-neon/` if needed. + +Pick a kebab-case slug (e.g. `okf-pitch`) and write the output to +`output/decks//index.html`. + +## Required output + +Exactly one file: `output/decks//index.html`. + +It must be **self-contained**: NO external ``, NO +external `