Single-command "prepare spawn" that emits everything orchestrator needs to invoke the Agent tool: composed prompt, subagent_type (from role's new claude-subagent-type field), isolation mode, verify command, ledger row. Before this: orchestrator ran compose + read prompt + manually constructed Agent tool call + manually built verify command. 4 steps. After: `kei-agent-runtime prepare <task.toml> --format=human` outputs a single copy-paste-ready block. Orchestrator pastes into Agent tool and records the verify command for return. Files: - src/prepare.rs (170 LOC) — prepare() returns AgentInvocation struct (agent_id, prompt, subagent_type, isolation, description, verify_command, ledger_row) - src/main.rs (+39 LOC) — Prepare subcommand with --format=human|json|toml - src/lib.rs (+2 LOC — pub mod prepare) - _roles/*.toml (5 files) — new optional claude-subagent-type field: - edit-local / edit-shared → "code-implementer" - read-only → "critic" (default; "architect" override possible) - explorer → "Explore" - git-ops → "NOT-SPAWNABLE" (refused by prepare with RULE 0.13) - tests/prepare_smoke.rs (3 tests) — happy path, unknown role, non-spawnable refusal - docs/AGENT-SUBSTRATE-SCHEMA.md (+ ## Orchestrator ergonomics section) Tests: 40/40 (was 37, +3 prepare_smoke). Same path exercised in tempfile fixtures that the real CLI would hit end-to-end. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
25 lines
784 B
TOML
25 lines
784 B
TOML
[role]
|
|
name = "read-only"
|
|
display-name = "explorer (read-only analyst)"
|
|
description = "Read-only agent: inspects code, emits structured report with severity grades. No shell, no edits, no git."
|
|
spawnable = true
|
|
# Read-only + severity-grade default maps to critic; architect-flavoured tasks
|
|
# should override this per task via claude-subagent-type in task.toml.
|
|
claude-subagent-type = "critic"
|
|
|
|
[capabilities]
|
|
# Ordered list — text.md fragments concatenated in this order
|
|
required = [
|
|
"tools::read-only",
|
|
"output::report-format",
|
|
"output::severity-grade",
|
|
]
|
|
|
|
[tools]
|
|
# Tool allowlist — anything not in this list is denied
|
|
allowed = ["Read", "Glob", "Grep", "WebFetch"]
|
|
# No Bash → no bash-patterns-allowed
|
|
bash-patterns-allowed = []
|
|
|
|
[escalation]
|
|
policy = "ask-via-return"
|