Skip to content

chore: excise the Claude-Code/legion spawn path (embed our own engine) - #121

Open
baron-3dl wants to merge 1 commit into
mainfrom
work/excise-claude-code-spawn
Open

baron-3dl wants to merge 1 commit into
mainfrom
work/excise-claude-code-spawn

Conversation

@baron-3dl

Copy link
Copy Markdown
Collaborator

Self-extension runs on mallcop's OWN embedded agent (core/agent + core/inference, MIT, SDK-free, donut rail) — not claude --print via the retired legion cli_backend. Removes the dead spawn-claude-code-fix tool; keeps the write-allowlist + spend-cap as the new engine's safety primitives. Build+vet green.

🤖 Generated with Claude Code

…, not a proprietary CLI)

mallcop self-extension must run on mallcop's OWN embedded agent (core/agent +
core/inference DirectClient — hand-rolled /v1/messages over the donut rail, MIT,
SDK-free), NOT by shelling out to `claude --print` via the retired legion
cli_backend. That path (tools_heal_spawn.go, the "spawn-claude-code-fix" tool)
hard-depended on the proprietary Claude Code binary + legion (both being retired)
and could never ship inside the redistributed MIT artifact. core/ never depended
on it (the import-lint gate already bans claude-code/legion/vendor-SDKs across
core/); this only removes the dead cmd/-tool spawner + its dispatch/registration.

Kept + repurposed as the new engine's safety primitives: the write-allowlist
(tools_heal_allowlist.go) and the metered-spend cap (tools_heal_budget.go).

build + vet green; budget/allowlist tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
baron-3dl added a commit that referenced this pull request Jul 2, 2026
…e-shot CLI (#122)

The product runtime is cmd/mallcop (the one-shot scan CLI). It builds and passes
with ZERO dependency on the legion/`we` automaton surface — verified before cutting.
That surface (boot scripts -> bin/we, exam CI -> legion tarball, charts/ validated
by 7 test files, the heal claude-code spawner excised in #121, release.yml shipping
all of it as public binaries) was a self-wired dead subsystem the product no longer
uses. Removed as one set:

  - bin/we, bin/we_test.sh, .we-version, mallcop-academy.old-pre-modulepath-rename
  - scripts/start-mallcop.sh, scripts/bootstrap-deploy.sh, .github/workflows/exam.yml
  - charts/, agents/heal/
  - cmd/{mallcop-academy,mallcop-investigate-tools,mallcop-checklist-verify,
    exam-render-chart,exam-seed}  (lookup/grading logic already ported to core/*)
  - legion tests: test/{integration/chart_validation,e2e/vertical_slice,
    budget/chain_budget}, test/quality/{agents_prompt_lint,automaton_chart,exam_smoke}
  - dead docs: quality-on-legion*, heal-broaden, heal-pr-review

Kept (product + eval harness the self-extension loop builds on): cmd/mallcop,
cmd/detector-*, cmd/baseline, cmd/notify-*, cmd/mallcop-eval, core/** (incl.
core/eval, core/tools, core/lint import-ban), connect/**, exams/.

Recurrence guard: core/lint/deadtokens_test.go — a repo-wide merge gate that fails
if any removed-subsystem token (3dl-dev/legion, .we-version, we-linux-amd64,
spawn-claude-code-fix, start-mallcop.sh, bootstrap-deploy.sh) reappears in impl/
config/CI/scripts. Allowlists the ban-tests; negative control proves it fires.

CLAUDE.md: retitled mallcop-legion -> mallcop; describes the CLI runtime, not legion.

build ./... green; go test ./... green (282 impl files scanned by the new guard).

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant