-
Notifications
You must be signed in to change notification settings - Fork 0
feat(subagents): lean Hermes+Claude catalog with wired isolation #111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| # Lean Subagent Redesign (2026-08-09) | ||
|
|
||
| Hermes + Claude typed-catalog hybrid. Mid-beat spawn stays separate from org | ||
| delegation. | ||
|
|
||
| ## Live path | ||
|
|
||
| ``` | ||
| spawn_subagent → run_subagent_delegate → run_subagent_session → run_role | ||
| ``` | ||
|
|
||
| ## Builtins (always when spawn enabled) | ||
|
|
||
| | Type | Posture | | ||
| |------|---------| | ||
| | `explore` | Read-only map / evidence | | ||
| | `plan` | Read-only implementation plan | | ||
| | `verify` | Strict PASS/FAIL/PARTIAL JSON | | ||
| | `generalPurpose` | Parent ∩ minus nest tools | | ||
|
|
||
| Role specialists **add** names; they do not remove builtins. Unknown types refuse. | ||
|
|
||
| ## Wired declaration fields | ||
|
|
||
| - `model` → `SessionOptions.model` | ||
| - `permission_overlay` → tighten-only child gate wrapper | ||
| - `spawned_by` → fail-closed at resolve | ||
| - `isolation` → `shared` | `worktree` (ephemeral git worktree under scratch; | ||
| child permission cwd is the worktree; edits are discarded on join and never | ||
| merge back to the parent) | ||
|
|
||
| ## Host blocklist (Hermes) | ||
|
|
||
| Children never receive clarify / memory write / cron / task_create / worktree | ||
| enter-exit. Leaves also lose `spawn_subagent`. | ||
|
|
||
| ## Async | ||
|
|
||
| `background=true` returns a handle. Poll/stop via `delegation_get` / | ||
| `delegation_stop` (not the shell `task_*` tools). Sync remains the beat default. | ||
|
|
||
| ## Depth | ||
|
|
||
| `MAX_INLINE_NESTING = 2`. Flat by default; depth-2 only when a specialist | ||
| declares `spawnable`. | ||
|
|
||
| ## Chorus lean roster | ||
|
|
||
| Keep: `web_research`, DoD graders (`test_author`, `api_verifier`, | ||
| `code_reviewer`), critics (`critic`, `brand_critic`, `design_critic`). | ||
|
|
||
| Kill from manifests: craft middlemen (researcher wrappers, strategist, creative, | ||
| explorer, ux_researcher, analyst personas, ceo advisor/researcher, ui_tester). | ||
|
|
||
| ## Vendor steals | ||
|
|
||
| - OpenHarness: Explore/Plan/verification denylists, worktree isolation, task poll | ||
| - Hermes: host blocklist, summary budget + spill, sync default | ||
| - OpenCode: explore allowlist posture, filterCompacted mindset | ||
| - qm: fail-closed named types only |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,34 +1,62 @@ | ||
| """Subagent layer — chorus-side declaration, registry, and projection. | ||
| """Subagent layer — declarations, builtins, inline delegate, async manager. | ||
|
|
||
| A subagent is a capability-minimized, ephemeral teammate a beat spawns to do | ||
| bounded work, then dissolves. This package defines: | ||
|
|
||
| - ``Subagent``: the frozen declaration (on a role / shared registry). | ||
| - ``SubagentSet``: the resolved set of subagents available to a beat. | ||
| - ``SubagentRegistry``: the Tier-2 shared-capability agent registry. | ||
| - ``project_subagent``: the chorus→dream projection (Subagent → TeammateSpawnConfig). | ||
| Live path: ``spawn_subagent`` → ``run_subagent_delegate`` → ``run_role``. | ||
| """ | ||
|
|
||
| from dream.subagents._async_delegation import ( | ||
| AsyncDelegationManager, | ||
| DelegationCompletion, | ||
| DelegationHandle, | ||
| DelegationSnapshot, | ||
| DelegationStatus, | ||
| ) | ||
| from dream.subagents._builtins import ( | ||
| EXPLORE, | ||
| GENERAL_PURPOSE, | ||
| PLAN, | ||
| VERIFY, | ||
| builtin_agents, | ||
| merge_builtins, | ||
| ) | ||
| from dream.subagents._catalogue import SubagentCatalogue, SubagentCatalogueEntry | ||
| from dream.subagents._declaration import ( | ||
| GENERAL_PURPOSE_DESCRIPTION, | ||
| GENERAL_PURPOSE_NAME, | ||
| MAX_INLINE_NESTING, | ||
| MAX_SUBAGENT_DEPTH, | ||
| PermissionDelta, | ||
| PermissionOverlay, | ||
| Subagent, | ||
| SubagentSet, | ||
| ) | ||
| from dream.subagents._isolation import IsolationMode | ||
| from dream.subagents._projection import SubagentResult, project_subagent | ||
| from dream.subagents._registry import SubagentRegistry | ||
|
|
||
| __all__ = [ | ||
| "EXPLORE", | ||
| "GENERAL_PURPOSE", | ||
| "GENERAL_PURPOSE_DESCRIPTION", | ||
| "GENERAL_PURPOSE_NAME", | ||
| "MAX_INLINE_NESTING", | ||
| "MAX_SUBAGENT_DEPTH", | ||
| "PLAN", | ||
| "VERIFY", | ||
| "AsyncDelegationManager", | ||
| "DelegationCompletion", | ||
| "DelegationHandle", | ||
| "DelegationSnapshot", | ||
| "DelegationStatus", | ||
| "IsolationMode", | ||
| "PermissionDelta", | ||
| "PermissionOverlay", | ||
| "Subagent", | ||
| "SubagentCatalogue", | ||
| "SubagentCatalogueEntry", | ||
| "SubagentRegistry", | ||
| "SubagentResult", | ||
| "SubagentSet", | ||
| "builtin_agents", | ||
| "merge_builtins", | ||
| "project_subagent", | ||
| ] |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: For a worktree-isolated child,
session_working_dirpoints at the temporary worktree, butchild_gatestill wraps the permission policy created for the parent'sworking_dir. The permission checker therefore treats writes inside the child worktree as outside the allowed repository boundary and denies mutating tools, makingIsolationMode.WORKTREEunusable for the operations it is intended to isolate. Build the child permission gate against the effective session working directory while preserving the parent's policy restrictions. [api mismatch]Severity Level: Major⚠️
Prompt for AI Agent 🤖