Skip to content

docs(plan): leverage the Gilamonster Rust stack, don't reinvent it#5

Open
hartsock wants to merge 1 commit into
thoonfrom
phase/plan-leverage-newt
Open

docs(plan): leverage the Gilamonster Rust stack, don't reinvent it#5
hartsock wants to merge 1 commit into
thoonfrom
phase/plan-leverage-newt

Conversation

@hartsock

@hartsock hartsock commented Jun 4, 2026

Copy link
Copy Markdown
Member

Summary

Records the extract-shared-crates decision in PLAN.md. The doc previously
never mentioned newt-agent or agent-bridle, even though those projects
already ship (to PyPI) the exact primitives the acceleration phases propose to
rebuild from scratch.

New "Leverage, don't reinvent" section adds:

  • A map from each phase's greenfield primitive → the shared crate that replaces
    it (thoon-toolregagent-bridle-core + agent-mesh Caveats; thoon-fileops
    → a shared fileops primitive; thoon-sqlite stays genuinely-new; inference
    added as a new target the plan had omitted — newt's pooled streaming client).
  • The coupling model: neutral primitives consumed by both newt and thoon —
    not thoon-depends-on-the-newt-app, not duplication.
  • Immediate arms-length reuse: Hermes already has an MCP client
    (tools/mcp_tool.py), so wiring agent-bridle-mcp via config.yaml
    mcp_servers offloads confined Rust shell/web/fs tools with zero Python
    code
    .
  • The publishability guardrail (isolate the brush git-dep to the MCP binary)
    so the MIT-cherry-pickable surface stays a thin Python shim on an Apache-2.0
    wheel.
  • B0 status (pyo3 0.28 alignment, build(thoon): align workspace pyo3 to 0.28 for shared-crate reuse #4) as the prerequisite.

Test plan

Doc-only change. Pre-push hook ran the thoon CI parity (cargo fmt/clippy/check)
green. thoon-ci.yml doesn't trigger on root PLAN.md.

risk:low — documentation only.

Pairs with #4 (pyo3 0.28 alignment).

🤖 Generated with Claude Code

…g it

WHAT: Add a "Leverage, don't reinvent" section to PLAN.md recording the
decision to converge the thoon-* acceleration layer onto shared,
framework-neutral primitive crates already built by newt-agent + agent-bridle,
rather than the clean-room reimplementation the original scaffold implied.

WHY: PLAN.md previously made zero mention of newt-agent or agent-bridle, even
though those projects already ship (to PyPI) the exact primitives the phases
propose to rebuild from scratch: a Caveats-confined tool registry + shell/fs
tools (agent-bridle), and a tokio/reqwest-pooled streaming inference client
(newt-agent-py). Reimplementing them duplicates work and drifts the line.

The section records:
- The map from each phase's greenfield primitive to the shared crate that
  replaces it (toolreg -> agent-bridle-core + agent-mesh Caveats; fileops ->
  a shared fileops primitive; sqlite stays genuinely-new; INFERENCE added as a
  new target that the original plan omitted).
- The "extract shared crates" coupling model: neutral primitives consumed by
  BOTH newt and thoon, not thoon-depends-on-the-newt-app and not duplication.
- Immediate arms-length reuse: Hermes already has an MCP *client*
  (tools/mcp_tool.py), so wiring agent-bridle-mcp via config.yaml mcp_servers
  offloads confined Rust tools with zero Python code.
- The publishability guardrail (isolate the brush git-dep to the MCP binary)
  so the MIT-cherry-pickable surface stays a thin Python shim on an Apache-2.0
  wheel.
- B0 status (pyo3 0.28 alignment) as the prerequisite.

Doc-only change.

Co-Authored-By: Claude Opus 4.8 (1M context) <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