Repository navigation
Starter agent organization and Claude Code subagent generator - #86
Merged
Merged
Conversation
Nine named starter agents (Chief, Scribe, Oracle, Sage, Smith, Warden, Lab, Keeper, Archivist) in an engine-neutral definition format (contracts/agent.schema.json), each with an AOR in aors/fleet.json, a single-writer hand-off table and concurrency policy (agents/org.json), shared expert practice (agents/PRACTICE.md) and six generic area-of-life templates. tools/agent_profiles.py now writes Claude Code project subagents to .claude/agents/ with tools, permissionMode, mcpServers and a PreToolUse guard hook (tools/agent_guard.py) derived from each AOR, so effects hold outside MCP. --check fails on drift, undeclared fields and targets that would drop wiring (plugins). The unread .agent/ output and mcpInheritance are removed. POODO's twenty-option rule is fixed in every definition (options 20, research gate required); only research and red-team effort varies. tools/check_options.py rejects options records without twenty options, missing kinds, shared mechanisms or near-duplicates. CS-REQ-080 to CS-REQ-083, SDD-C26. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in #84 (Foundations MCP server) and #85 (cstack init, durable ledger required in agent mode). Conflicts in CHANGELOG.md, docs/architecture/architecture.md and docs/guides/how-to/define-bots.md resolved by keeping both sides' entries; EXPORT-MANIFEST.json regenerated with tools/build_export_manifest.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#85 added test_generated_bot_profiles_never_allow_the_memory_ledger against the old agent_profiles.build(fleet, root, uv, state_root). This branch replaced that with build(repo, target) -> (files, problems), so the test raised TypeError after merging main. The test now checks every generated subagent for every target, plus server_args and cstack_server, for --allow-memory-ledger. No generator behaviour changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Akilleez-QA
marked this pull request as ready for review
November 17, 2026 07:45
Akilleez-QA
pushed a commit
that referenced
this pull request
Nov 17, 2026
Brings in #84 (Foundations MCP server), #85 (cstack init) and #86 (starter agents). Conflicts in docs/architecture/architecture.md and docs/requirements/requirements.md resolved by keeping both sides: component rows in SDD order (C26, C28, C29, C31) and requirements CS-REQ-084 to CS-REQ-086 before CS-REQ-087. EXPORT-MANIFEST.json regenerated with tools/build_export_manifest.py; data dictionary --check passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Change
Wave 1C: serve the pinned Foundations as read-only MCP tools for an agent ("Sage" or any other) in one bot's AOR, so domain answers come with their receipts and every call is a witnessed POODO decision.
tools/foundations_mcp.py --aor <slug> --foundation <name> ...launchesadapters/foundations_mcp.py, an MCP stdio server that:<foundation>.<tool>(for examplerefrigeration.saturation_pressure) for each Foundation the host named at launch that the bot's AOR does not deny, with input schemas from the pinned tool inventories. A request cannot add a Foundation; an unregistered name, a runtime such ascstack_forge, a repeat or an empty choice stops the launch;AorSession: a standing POODO goal per Foundation, host-authored checkpoints, a precommitted decision on the read-only ToolFace grant, then execution through the existing pinned adapter (manifest verified, live inventory pinned and, for the shared adapter, receipt input digest recomputed);isErrorandstructuredContent(receipt, evidence, boundary flags) unchanged, with the POODO record in_meta["cstack/poodo"]. CHECK values and the evidence ceiling are never rewritten. A refused, tampered, unadmitted, pending or over-budget call is a tool error; nothing is retried.Rationale.
build_aor_sessiongains an optionalfoundationssubset, so cores, grants, witnessed ledgers, approvals and shields are the onestools/cstack_mcp.pyalready uses. The server subclassesMcpServerfor framing and strict parsing; the only change there is thatMcpServer.INSTRUCTIONSbecame a class attribute (same text).allOf/oneOf/anyOf(math.exact_scalar,robotics.mechanism_check) is merged into one object schema intools/list, because some clients reject top-level combinators; the server still validates against the exact schema.structuredContentmust be an object.Requirements, design and interface impact
docs/icd/icd-foundations.md; pointer incontracts/INTERFACES.md.contracts/ADAPTERS.json: two rows (foundations-mcp-server,foundations-mcp-launcher), checked bytests/test_adapter_inventory.py.tests/test_foundations_mcp.py.bootstrap.py,adapters/mcp_stdio_server.py,ADAPTERS.json, requirements/verification docs), becausefeat/handoff-channelandfeat/cstack-initedit the same files.Verification
These ran on the head commit
54e2a9don macOS with Python 3.15 in a throwaway venv (ci/requirements.txtinstalled). No model calls were made and no credentials were set.python -B -m unittest discover -s tests: Ran 746, failures=76, errors=4, skipped=8. main at0a9703b, same machine: Ran 734, failures=76, errors=4, skipped=8. The failing tests are identical on both (diffed). They are the known macOS workcell/EndoForge failures (workcell_not_executed) plus the tests that neednpm cifor the workcell toolchain, which was not run. All 12 new tests pass. Linux CI is the authority.bash ci/run-local.sh python links trace: suite results as above;check_links1442 paths, 0 broken;check_trace78 requirements, 77/77 test files traced, 0 failures.New tests (
tests/test_foundations_mcp.py): the tool list matches the pinned schemas; each vendored Foundation's representative tool is called over the real pinned bridges and its receipt comes back unchanged; unknown tool returns invalid params; malformed input never reaches the core; an out-of-profile number is refused before dispatch; the host chooses the Foundations; unknown, empty or repeated choices are refused; a denied domain lists nothing; an ask-class call waits for the owner; a tampered manifest is refused; the stdio launcher lists and calls; an unregistered Foundation stops the launch.Not done
tools/cstack_mcp.pycannot both hold the same bot and domain at once (the existing lifetime store claim).Peer review record
Checklist
# noqa: E402markers follow the existing launcher pattern intools/cstack_mcp.py.🤖 Generated with Claude Code