|
1 | 1 | """Generator primitive — shared abstraction for all `<kb>/output/<type>/` artifacts. |
2 | 2 |
|
3 | 3 | 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: |
6 | 6 |
|
7 | 7 | * 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) |
12 | 12 |
|
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. |
16 | 22 | """ |
17 | 23 | from __future__ import annotations |
18 | 24 |
|
|
0 commit comments