Skip to content

Implement subagent-start knowledge-tree snapshot injection (Option B) #17

Description

@ivklgn

Re-verified after v0.7.0 — still blocked, and the new subcommand is now unambiguously CLI work (needs-cli added).

Problem

Every sub-agent invocation spends two live tool calls (list_documents + list_relations) bootstrapping its view of the knowledge base. The preamble is at plugins/archcore/agents/archcore-{assistant,auditor}.md ("First Step — Bootstrap Knowledge Tree", ~line 43) and is mandatory for a reason it states itself: sub-agents are spawned via the Task tool and do NOT receive the SessionStart additional context the main conversation gets. This is Option A — shipped and test-enforced. As the knowledge base grows, the per-invocation cost becomes measurable.

Expected result

Option B: precompute a knowledge-tree snapshot (the same payload bin/session-start gets from the CLI) and prepend it at Task-dispatch time via a new archcore hooks <host> subagent-start leaf, eliminating the per-invocation bootstrap calls.

Blocked

No host exposes a documented sub-agent-start hook surface, so this needs host-side plumbing plus a new CLI subcommand. The adopted design (.archcore/plugin/subagent-knowledge-tree-bootstrap.adr.md) defers Option B until such a lifecycle hook exists on at least one host; the revisit trigger is roughly 10x knowledge-base growth. Track as a blocked epic.

Re-open triggers

Related but distinct: .archcore/plugin/user-prompt-submit-injection.idea.md (draft) explores injecting on a different lifecycle event; worth reading before designing this one, since a shared injection payload would serve both.

Proposed approach

  • (When unblocked) add the subagent-start CLI leaf and per-host injection plumbing; drop the Option A preamble from the agent files once a host covers it.

References

Design rationale: .archcore/plugin/subagent-knowledge-tree-preload.idea.md (Option B) and subagent-knowledge-tree-bootstrap.adr.md. Code: plugins/archcore/agents/archcore-{assistant,auditor}.md, plugins/archcore/bin/session-start.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:skillsIntent skills and agentsblockedBlocked on an external capabilityneeds-cliDepends on the separate Archcore CLI (Go) repopriority:P3Optional / roadmapsize:LMulti-day / needs a spike

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions