Skip to content

Commit 686a8e4

Browse files
committed
docs(generator): replace 'future targets plug in' drift with honest scope note
1 parent abd2923 commit 686a8e4

1 file changed

Lines changed: 15 additions & 9 deletions

File tree

openkb/skill/generator.py

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
11
"""Generator primitive — shared abstraction for all `<kb>/output/<type>/` artifacts.
22
33
v0.3 supports ``target_type="skill"`` and ``target_type="deck"``. Both
4-
targets now route through ``openkb.agent.skill_runner.run_skill`` under
5-
the hood; ``Generator`` is the thin wrapper that owns:
4+
targets route through ``openkb.agent.skill_runner.run_skill`` under the
5+
hood; ``Generator`` is the thin wrapper that owns:
66
77
* output-path convention: ``<kb>/output/<type>/<name>/``
8-
* post-compile validation: target-specific validator dispatched here
9-
* post-run hooks: skill regenerates ``marketplace.json``; deck has no
10-
per-target hook (the html-critic skill, when invoked, has already
11-
patched the file in place)
8+
* post-run hooks: skill target regenerates ``marketplace.json``; deck
9+
target has no per-target hook (the producer SKILL.md's frontmatter
10+
``od.deck_grammar`` already drove validation inside ``run_skill``,
11+
and the html-critic skill, when chained, patched the file in place)
1212
13-
Future targets (``"podcast"``, ``"report"``, ``"video"``) plug in by
14-
declaring an output dir and a validator; the actual content generation
15-
is just another SKILL.md under ``skills/``.
13+
The artifact CONTENT for each target is a ``SKILL.md`` under
14+
``skills/`` — the dispatch here is purely the orchestration shell
15+
(arg-routing, output path resolution, post-run hook firing).
16+
17+
A third target type would require editing this module (the ``Literal``
18+
type, the ``target_type`` check in ``__init__``, the ``if/else`` in
19+
``run``). A plug-in registry refactor is in the deferred-followups list
20+
(score 70 in the architectural review); current ``if/else`` is
21+
intentional v0.x scope.
1622
"""
1723
from __future__ import annotations
1824

0 commit comments

Comments
 (0)