Repository navigation
cstack init: one-command durable setup; no memory ledger in agent mode; Tailscale optional - #85
Merged
Merged
Conversation
…le optional One command (python -B tools/cstack_init.py) sets up a private state folder and a durable, signed witnessed ledger (per-bot signing keys, two local witness keys, roster, per-bot anchors, ledger.json written last). It is idempotent, never replaces a mismatched or exposed key, and --check verifies every ledger file without changing anything. tools/cstack_mcp.py now exits 2 before creating any state when Cstack is not set up, naming the init command; --allow-memory-ledger keeps the memory ledger for tests and throwaway development. A test fails if the generated bot profiles ever emit that flag. The device name comes from --device, the name init recorded, or the tailnet name, so Tailscale is optional. cryptography moves into requirements.txt because the witnessed ledger is now the default. Requirements CS-REQ-084, CS-REQ-085, CS-REQ-086; design SDD-C28 (and SDD-C15 for CS-REQ-085). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Akilleez-QA
force-pushed
the
feat/cstack-init
branch
from
November 17, 2026 04:42
a3202b4 to
bc9bf98
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#84 (now on main) imported tailnet_hostname from tools/cstack_mcp.py, which this branch replaces with adapters.local_setup.resolve_device and require_durable. Use the same flow in tools/foundations_mcp.py: refuse to start without the durable ledger unless --allow-memory-ledger is given, and take the device from --device, the recorded name, or the tailnet. Its launcher tests pass --allow-memory-ledger, and a new test checks the refusal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Akilleez-QA
marked this pull request as ready for review
November 17, 2026 06:41
Akilleez-QA
pushed a commit
that referenced
this pull request
Nov 17, 2026
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>
Akilleez-QA
pushed a commit
that referenced
this pull request
Nov 17, 2026
#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
added a commit
that referenced
this pull request
Nov 17, 2026
* Add the starter agent organization and a Claude Code subagent generator 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> * Port the no-memory-ledger profile check to the new generator API #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> --------- Co-authored-by: Cstack <cstack@Cstacks-Mac-Mini.local> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Wave 2, workstream F. One command sets up a working, durable stack; agent mode refuses the memory ledger; Tailscale becomes optional. Critic findings B2 and M9.
Intended commit message
Add cstack init; refuse the memory ledger in agent mode; make Tailscale optional. Requirements CS-REQ-084, CS-REQ-085, CS-REQ-086; design SDD-C28 (and SDD-C15 for CS-REQ-085).
What changes
cstack init(tools/cstack_init.py,adapters/local_setup.py): makes a private state folder (~/.local/state/cstack, 0700 folders, 0600 files), records the device name, generates a signing key per bot inaors/fleet.jsonplus two local witness keys, writes the DECISION-004 roster, per-bot anchors andledger.json(last, so a half-finished run is never taken as set up). Idempotent: a repeat changes nothing, a partial setup is finished with the keys already made, new bots are added, loose permissions are made private. It never replaces or repairs a key that is readable by others or that does not match the roster.--checkchanges nothing, verifies every ledger file's signatures and chain, and exits 1 on any problem. Output is plain language with the fix for each problem and the next commands.tools/cstack_mcp.pyexits 2 before creating any state when the state root has noledger.json, with a message namingpython -B tools/cstack_init.py.--allow-memory-ledgerkeeps the memory ledger for tests and throwaway development. Enforced check:tests/test_cstack_init.py::LauncherTests.test_generated_bot_profiles_never_allow_the_memory_ledgerfails iftools/agent_profiles.pyever emits that flag.--device, else the name init recorded, else the tailnet name. Init records--device, an earlier record, the tailnet name, or the computer's name, and falls back to the fleet's only device when the found name is unlisted. An absent, failing or signed-out Tailscale yields no name rather than an error.tailnet_hostnamemoved fromtools/cstack_mcp.pytoadapters/local_setup.py.cryptography==50.0.2moved fromci/requirements.txttorequirements.txt(the witnessed ledger is now the default, not a test extra).tools/check_readme.pyrunscstack init+--checkin a scratch HOME and inits before its MCP session.IDs and shared files (for merge with sibling branches)
contracts/ADAPTERS.json(twohost_configrows +cstack-mcpvendor/notes),docs/requirements/requirements.md,docs/verification/verification-matrix.md,docs/architecture/architecture.md(one row each plus revision rows; version bumps SRS 2.2, VM 2.2, SDD 2.3 may conflict with siblings),requirements.txt,ci/requirements.txt,CHANGELOG.md.poodo_core/,bootstrap.py,adapters/mcp_stdio_server.py.Checks (macOS, Python 3.13 throwaway venv with
requirements.txt+ci/requirements.txt; HOME and XDG_STATE_HOME in scratch; no model calls; Anthropic credential variables unset; nonpm ci, same for both runs)0a9703bpython -B -m unittest discover -s teststest_process_and_cli.ExecutorTests.test_cancellation_terminates_and_no_partial_evidence, a timing test that failed once under parallel load and passes 3/3 rerun alonetests.test_cstack_init(-Band-B -O)python -B tools/check_trace.pypython -B tools/check_links.pysecretsjob runs trufflehogThe main-baseline failures are the known macOS ones (vendored EndoForge
os.fdatasync, plus workcell tests needingnode_modules); Linux CI should be the real gate.Not done
tools/check_readme.pywas not run end to end here (it needs a clone and runs the forge, which fails on macOS).python -B tools/cstack_init.py; there is nocstackconsole entry point in this repo yet.🤖 Generated with Claude Code