feat(compass-agent): agents_tree native tool — indented agent tree with live presence (RIG-2678) - #1062
Open
rigel-mintaka wants to merge 4 commits into
Open
feat(compass-agent): agents_tree native tool — indented agent tree with live presence (RIG-2678)#1062rigel-mintaka wants to merge 4 commits into
rigel-mintaka wants to merge 4 commits into
Conversation
…th live presence (RIG-2678) New read-only `agents_tree` tool, sibling of `compass_roster`: one `GetRoster` call (scope `subtree`|`owner`, default `subtree`), assembled client-side into an indented parent→child tree with each agent's presence + activity. Pure agent-side — no proto, no RPC, no server work; the roster already carries `parent_agent_id` + `presence`. Handles and display names only, never account ids (ids are the internal tree keys); every peer-supplied string is `flat`-guarded exactly like the roster rows. An orphan (unknown parent) attaches at root rather than vanishing; a malformed parent cycle terminates via a `visited` set, each node rendered once. Matt-ruled pull-tool-over-prompt-bake (the tree is live state, so a prompt bake would rot). The when/how usage guidance rides compass-server's prompts workstream separately, not a second prompt edit here. Closes RIG-2678 Co-authored-by: Matt Wilkinson <matt@rigel.build>
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
Compass engineering docs preview: https://compass-agent-rig-2678-agent.compass-eng-docs.pages.dev Deployed from Changed pages: |
…cate, strengthen tests (RIG-2678) Review R1 (5 medium, all dispositioned): - **Name (Matt-ruled):** `agents_tree` → `compass_tree`, matching its sibling `compass_roster` (same GetRoster RPC) and the name already reserved in `config/prompts/manager/SYSTEM.md`'s deferred TODO. Renamed the tool, schema (`compassTreeParameters`), and all test references. - **Correctness:** the `children` and `roots` predicates were not complementary — an entry with an empty `agentAccountId` could be demoted from root to child of that empty-id node. Unified both sites behind one `hasParent` predicate, so the doc comment's "empty or unknown parent is a root" is now enforced, not just claimed. - **Test adequacy:** the orphan assertion was vacuous (the fallback loop masked a dropped-orphan mutant) → now pins the exact rendered body (row set, order, indentation) plus the single-block and anti-injection-framing invariants. Added a 3-level grandchild test — nothing exercised depth ≥ 2, so a depth-clamp mutant shipped green. - **Docs:** `comms.ts` header enumeration and `packages/compass-agent/AGENTS.md` still said "Seven tools"; both now "Eight" with a `compass_tree` row. Added a `compass_tree` bullet to `docs/concepts/tools.md`. Sibling latent-flake finding (four other test files carry the same unbounded cleanup hook) filed as RIG-3611. Lows (blank-line/period nits) folded in. Co-authored-by: Matt Wilkinson <matt@rigel.build>
…tree prompts/skills, share rosterRow (RIG-2678) - Add an empty-agentAccountId root regression test (red-green proven: fails on the pre-fix split predicate, passes on the unified hasParent). - Activate the compass_tree lines in the manager/owner/supervisor SYSTEM prompts and the management-trees + compass-setup skills (GC-3/MP-4 same-PR flip: the tool ships here, and RIG-1721's roster fresh-read is Done). Re-parenting stays deferred (no tool wraps it yet). - Extract a shared rosterRow() helper so the flat roster and the tree share one render-guarded row contract, removing the duplicated invariant. Co-authored-by: Matt Wilkinson <matt@rigel.build>
rigel-mintaka
force-pushed
the
compass-agent/rig-2678-agents-tree
branch
from
September 11, 2026 03:10
70cf0a9 to
c732a71
Compare
…e, fix dangling deferral refs (RIG-2678) - manager/owner SYSTEM prompts: reading your parent fresh needs compass_tree with scope: owner (default subtree excludes the parent and renders you as a root) — the flip named the tools without the scope that surfaces the parent. - management-trees skill: replace the dangling 'see Deferred affordances below' pointer (that section was removed) with an active pointer to Reading the tree; qualify roster-vs-tree default scope; make parent-read guidance consistent. - compass-setup skill: fix the garbled 'track a shape to restructure' sentence. - Forward-looking flip-discipline header in all three prompts so it stays true with an empty deferred set. Co-authored-by: Matt Wilkinson <matt@rigel.build>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
New read-only
compass_treetool, sibling ofcompass_roster: oneGetRostercall (scopesubtree|owner, defaultsubtree), assembled client-side into an indented parent→child tree with each agent's presence + activity. Pure agent-side — no proto, no RPC, no server work; the roster already carriesparent_agent_id+presence.Handles and display names only, never account ids (ids are the internal tree keys); every peer-supplied string is
flat-guarded exactly like the roster rows. An orphan (unknown parent) attaches at root rather than vanishing; a malformed parent cycle terminates via avisitedset, each node rendered once. OnehasParentpredicate drives both child-grouping and root-selection so they cannot disagree.Matt-ruled pull-tool-over-prompt-bake (the tree is live state, so a prompt bake would rot); the name
compass_treematches thecompass_rostersibling and the name reserved inconfig/prompts/manager/SYSTEM.md. Usage guidance rides compass-server's prompts workstream separately.Review R1 folded: unified tree predicate, exact-body + grandchild tests, tool-count docs. Sibling latent-flake finding filed as RIG-3611.
Closes RIG-2678
Co-authored-by: Matt Wilkinson matt@rigel.build