routine: domain-system-prompt (2026-05-26)#16
Draft
jim4226 wants to merge 1 commit into
Draft
Conversation
…n ABC The codebase already noted "future cycles can let the domain supply a domain-specific system prompt" (base.py line 8). Anthropic's Agent SDK formalises this as AgentDefinition.prompt + AgentDefinition.tools: an agent's instructions and capability restriction are part of its definition, not ad-hoc runtime policy (code.claude.com/docs/en/agent-sdk/overview). Both methods return None by default (Phase-0: no behaviour change). A concrete domain can override them to supply Builder instructions tailored to its artifact format and restrict tool access to the minimum required. The Coordinator wiring (passing non-None values to execute_plan) is a Phase-1 step that waits on P1.7 (sandbox subprocess for Builder T1 work) so it touches Coordinator.__init__ safely with a regression test — not today. Three regression tests: all three existing adapters return None defaults; a StubDomain override produces valid str and list[str].
This was referenced May 26, 2026
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.
Summary
Adds
system_prompt()andallowed_tools()optional hook methods to theDomainABC, fulfilling the planned Phase-1 hook documented incsis/domains/base.pyand aligning the Domain protocol with Anthropic's Agent SDKAgentDefinitionpattern.Source
AgentDefinition(description, prompt, tools)structure establishes that an agent's instructions and capability restriction are part of its definition, not ad-hoc runtime policy.Theme
Theme 1 — Multi-agent coordination (also Theme 6 — Substrate / capability boundaries). CSIS's Domain ABC already has
describe()(maps toAgentDefinition.description). The missing fields werepromptandtools. Adding them as Phase-1 hook points makes the Domain interface complete and discoverable for contributors writing new benchmark adapters — the ROADMAP explicitly invites a CTF, reverse-engineering, or security-audit domain.What changed
csis/domains/base.py: Two new concrete methods withNonedefaults —system_prompt() -> str | None(domain-specific Builder system prompt) andallowed_tools() -> list[str] | None(domain-specific tool restriction). Module docstring updated to explain the Phase-1 wiring plan. Phase-0: all callers unchanged, returnsNone, no runtime effect.tests/test_domains.py:_check_domain_contract()extended to assert type-correctness of both new methods. Three new standalone tests: adapters default to None × 2, and aStubDomainsubclass can override both to non-None values.No cycle-9 chokepoints touched
csis/domains/base.pyis not in the chokepoint set (Coordinator.__init__,_BackendTracker,writer_iteration_id, promotion CAS). The Coordinator wiring to pass a non-Nonesystem_prompt()toexecute_planwaits on P1.7 and will touch the Coordinator at that point with a proper regression test.Test plan
Generated by Claude Code