Skip to content

Document subagent approval invariant#77

Merged
TroyHernandez merged 2 commits into
mainfrom
docs-subagent-approval
May 14, 2026
Merged

Document subagent approval invariant#77
TroyHernandez merged 2 commits into
mainfrom
docs-subagent-approval

Conversation

@TroyHernandez
Copy link
Copy Markdown
Contributor

@TroyHernandez TroyHernandez commented May 14, 2026

Summary

  • Document that subagents have no interactive approval channel back to the parent or user. The child's approval_cb denies by default and tool permissions are fixed at spawn time via preset/tools.
  • subagent_spawn() roxygen: add a Permissions paragraph to the main description (covers the no-interactive-approval / no-mid-run-escalation invariant) and rewrite the preset arg with the actual tool lists for investigate / work / minimal. Param notes clarify that preset and tools are fixed for the lifetime of the child.
  • subagent_turn_init() roxygen: replace misleading "without the parent opting in" wording (there is no opt-in path) with an explicit no-mid-run-escalation statement.
  • vignettes/configuration.Rmd: fix stale subagents.default_tools row (was base::readLines, base::writeLines, bash, grep_files; real default is read_file, grep_files, r_help, web_search, fetch_url). Add a Presets subsection enumerating investigate / minimal / work, and a Permission model paragraph referencing /spawn --preset / --tools and the programmatic subagent_spawn() args.
  • vignettes/retroactive-extraction.Rmd: new Permission model subsection distinguishing holder subagents (tools = character(0)) from worker subagents (inherit only spawn-time permissions).
  • Regenerated man/subagent_spawn.Rd and man/subagent_turn_init.Rd via tinyrox::document().

Follow-up filed: cornball-ai/tinyrox#10 (@section blocks are silently dropped from generated .Rd — the Permissions text had to be inlined into the description as a workaround).

Test plan

  • tinyrox::document() regenerates only the two intended .Rd files
  • tinypkgr::install() succeeds
  • tinytest::test_package("corteza") — 1456/1456 OK
  • grep confirms "interactive approval" / "mid-run" / new default-tools list land in both man/ and vignettes/

Children have no interactive approval channel back to the parent or
user; the child's approval_cb denies by default and tool permissions
are fixed at spawn time via preset/tools. Document this in:

* subagent_spawn() roxygen: new "Permissions" section + param notes
  that preset/tools are fixed for the lifetime of the child.
* subagent_turn_init() roxygen: replace misleading "without the
  parent opting in" wording (there is no opt-in path) with an
  explicit no-mid-run-escalation statement.
* vignettes/configuration.Rmd: Permission model paragraph under the
  Subagents section.
* vignettes/retroactive-extraction.Rmd: new Permission model
  subsection distinguishing holder subagents (tools = character(0))
  from worker subagents (inherit only spawn-time permissions).

Regenerated man/subagent_spawn.Rd and man/subagent_turn_init.Rd via
tinyrox::document(). Docs-only; tinytest::test_package("corteza")
green (1456/1456).
* subagent_spawn() roxygen: tinyrox silently drops @section blocks, so
  the Permissions paragraph never rendered in the installed help.
  Inline it into the main description so ?subagent_spawn shows the
  no-mid-run-escalation invariant.
* subagent_spawn() preset arg: replace the loose "investigate +
  bash + write/edit" shorthand with the actual tool lists for each
  preset (investigate/work/minimal).
* vignettes/configuration.Rmd: fix stale subagents.default_tools doc
  (was base::readLines / base::writeLines / bash / grep_files; the
  real default is read_file, grep_files, r_help, web_search,
  fetch_url). Add a Presets subsection enumerating
  investigate / minimal / work so /spawn --preset users see the
  shape without digging through R/subagent.R.

Docs-only. tinytest::test_package("corteza") still 1456/1456.
@TroyHernandez TroyHernandez merged commit 8355178 into main May 14, 2026
4 checks passed
@TroyHernandez TroyHernandez deleted the docs-subagent-approval branch May 14, 2026 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant