mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
chore(prompts): stop generating verb tables for driver-based roles
regenerate_verb_tables.py looped every role in ROLE_CONFIGS, emitting a _generated/<role>.md for prompter and secretary too. Both intentionally keep only note+evidence in role_config — their real tools live in their agent_sdk drivers (intake: propose_draft; secretary: read_state/read_task/ submit_directive, the last gated through the backend /directives), and neither uses the _generated/<role>.md prompt-composition path. So the generated tables understated those roles and showed up as perpetually-untracked noise. Skip the driver-based roles (_DRIVER_BASED_ROLES) in both the aggregate verbs.md and the per-role file output, with a comment pointing at the real surfaces. Regenerated verbs.md drops the two misleading sections.
This commit is contained in:
@@ -7,6 +7,9 @@ Run `uv run python scripts/regenerate_verb_tables.py` after changing
|
|||||||
any role config or schema. Role prompts reference this file's sections
|
any role config or schema. Role prompts reference this file's sections
|
||||||
as the source of truth for verb signatures.
|
as the source of truth for verb signatures.
|
||||||
|
|
||||||
|
Driver-based roles (prompter, secretary) are intentionally omitted — their
|
||||||
|
real tools live in their agent_sdk drivers, not role_config.
|
||||||
|
|
||||||
## developer
|
## developer
|
||||||
|
|
||||||
### Flow verbs
|
### Flow verbs
|
||||||
@@ -246,33 +249,3 @@ as the source of truth for verb signatures.
|
|||||||
| `notify_get` | `notify_get(notification_id: UUID)` |
|
| `notify_get` | `notify_get(notification_id: UUID)` |
|
||||||
| `channels` | `channels()` |
|
| `channels` | `channels()` |
|
||||||
|
|
||||||
## prompter
|
|
||||||
|
|
||||||
### Flow verbs
|
|
||||||
|
|
||||||
| Verb | Body schema |
|
|
||||||
|------|-------------|
|
|
||||||
| `i_am_idle` | `i_am_idle()` |
|
|
||||||
|
|
||||||
### Content (do) tools
|
|
||||||
|
|
||||||
| Tool | Body schema |
|
|
||||||
|------|-------------|
|
|
||||||
| `note` | `note(text: str, scope: str = 'note', task_id: UUID | None = None, title: str | None = None, context: str = '', options: list[str | str] | None = None, chosen: str = '', rationale: str = '', consequences: list[str] | None = None, what_done: str = '', what_learned: str = '', what_struggled: str = '', next_steps: list[str] | None = None)` |
|
|
||||||
| `evidence` | `evidence(task_id: UUID)` |
|
|
||||||
|
|
||||||
## secretary
|
|
||||||
|
|
||||||
### Flow verbs
|
|
||||||
|
|
||||||
| Verb | Body schema |
|
|
||||||
|------|-------------|
|
|
||||||
| `i_am_idle` | `i_am_idle()` |
|
|
||||||
|
|
||||||
### Content (do) tools
|
|
||||||
|
|
||||||
| Tool | Body schema |
|
|
||||||
|------|-------------|
|
|
||||||
| `note` | `note(text: str, scope: str = 'note', task_id: UUID | None = None, title: str | None = None, context: str = '', options: list[str | str] | None = None, chosen: str = '', rationale: str = '', consequences: list[str] | None = None, what_done: str = '', what_learned: str = '', what_struggled: str = '', next_steps: list[str] | None = None)` |
|
|
||||||
| `evidence` | `evidence(task_id: UUID)` |
|
|
||||||
|
|
||||||
|
|||||||
@@ -166,6 +166,18 @@ def _render_role_section(role: str) -> str:
|
|||||||
return "\n".join(lines)
|
return "\n".join(lines)
|
||||||
|
|
||||||
|
|
||||||
|
# Roles whose real tool surface lives in a dedicated agent_sdk driver, NOT in
|
||||||
|
# role_config's flow_tools/do_tools — so a table rendered from role_config would
|
||||||
|
# UNDERSTATE them and mislead. The prompter (intake) registers `propose_draft`
|
||||||
|
# (+ read-only Read/Grep/Glob/Task) in `agent_sdk/intake_driver.py`; the
|
||||||
|
# secretary registers `read_state`/`read_task`/`submit_directive` in
|
||||||
|
# `agent_sdk/secretary_driver.py`. Both keep only `note`+`evidence` in
|
||||||
|
# role_config by design, and neither uses the `_generated/<role>.md` prompt-
|
||||||
|
# composition path (they run from their own drivers). Skip them so this script
|
||||||
|
# never emits a thin, misleading table for them.
|
||||||
|
_DRIVER_BASED_ROLES: frozenset[str] = frozenset({"prompter", "secretary"})
|
||||||
|
|
||||||
|
|
||||||
def main() -> None:
|
def main() -> None:
|
||||||
sections = [
|
sections = [
|
||||||
"<!-- AUTOGENERATED by scripts/regenerate_verb_tables.py. -->",
|
"<!-- AUTOGENERATED by scripts/regenerate_verb_tables.py. -->",
|
||||||
@@ -177,8 +189,13 @@ def main() -> None:
|
|||||||
"any role config or schema. Role prompts reference this file's sections",
|
"any role config or schema. Role prompts reference this file's sections",
|
||||||
"as the source of truth for verb signatures.",
|
"as the source of truth for verb signatures.",
|
||||||
"",
|
"",
|
||||||
|
"Driver-based roles (prompter, secretary) are intentionally omitted — their",
|
||||||
|
"real tools live in their agent_sdk drivers, not role_config.",
|
||||||
|
"",
|
||||||
]
|
]
|
||||||
for role in ROLE_CONFIGS:
|
for role in ROLE_CONFIGS:
|
||||||
|
if role in _DRIVER_BASED_ROLES:
|
||||||
|
continue
|
||||||
sections.append(_render_role_section(role))
|
sections.append(_render_role_section(role))
|
||||||
|
|
||||||
_OUT_DIR.mkdir(parents=True, exist_ok=True)
|
_OUT_DIR.mkdir(parents=True, exist_ok=True)
|
||||||
@@ -187,7 +204,11 @@ def main() -> None:
|
|||||||
|
|
||||||
# Also write per-role files so the prompt composer can include each
|
# Also write per-role files so the prompt composer can include each
|
||||||
# role's verb table directly without parsing a multi-section document.
|
# role's verb table directly without parsing a multi-section document.
|
||||||
|
# Driver-based roles are skipped (see _DRIVER_BASED_ROLES) — they don't use
|
||||||
|
# this composition path and a role_config-only table would understate them.
|
||||||
for role in ROLE_CONFIGS:
|
for role in ROLE_CONFIGS:
|
||||||
|
if role in _DRIVER_BASED_ROLES:
|
||||||
|
continue
|
||||||
per_role = _OUT_DIR / f"{role}.md"
|
per_role = _OUT_DIR / f"{role}.md"
|
||||||
header = (
|
header = (
|
||||||
"<!-- AUTOGENERATED by scripts/regenerate_verb_tables.py. -->\n"
|
"<!-- AUTOGENERATED by scripts/regenerate_verb_tables.py. -->\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user