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>
24 lines
761 B
TOML
24 lines
761 B
TOML
[role]
|
|
name = "explorer"
|
|
display-name = "explorer + cargo-check (read-only analyst with build probe)"
|
|
description = "Read-only analyst that may run cargo-family commands for build/test introspection. No edits, no git, no non-cargo shell."
|
|
spawnable = true
|
|
claude-subagent-type = "Explore"
|
|
|
|
[capabilities]
|
|
# Ordered list — text.md fragments concatenated in this order
|
|
required = [
|
|
"tools::read-only",
|
|
"tools::cargo-only-bash",
|
|
"output::report-format",
|
|
"output::severity-grade",
|
|
]
|
|
|
|
[tools]
|
|
# Tool allowlist — anything not in this list is denied
|
|
allowed = ["Read", "Glob", "Grep", "WebFetch", "Bash"]
|
|
# Bash restricted by tools::cargo-only-bash — cargo invocations only
|
|
bash-patterns-allowed = ['^cargo( |$)']
|
|
|
|
[escalation]
|
|
policy = "ask-via-return"
|