Skip to content

Extract clanker-cleanroom monorepo with unified Agent API - #17

Merged
devzeebo merged 6 commits into
mainfrom
feat/clanker-cleanroom
Sep 2, 2026
Merged

Extract clanker-cleanroom monorepo with unified Agent API#17
devzeebo merged 6 commits into
mainfrom
feat/clanker-cleanroom

Conversation

@devzeebo

@devzeebo devzeebo commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Split the repo into a pnpm workspace with two packages: clanker-cleanroom (Docker image build/run and agent bindings) and agent-gwt (GWT step functions for repeatable agent tests).
  • Introduce a unified new Agent(name) API backed by a registry that records stock and toolchain image tags, so callers no longer pass variant or base-agent options.
  • Replace ad-hoc image build helpers with a Dockerfile DAG (buildImages) that topo-sorts local FROM tags, builds once, and writes clanker-cleanroom.images.json at the project root; update CI publish workflow and docs accordingly.

Test plan

  • pnpm install
  • pnpm run build
  • pnpm run test
  • pnpm run lint
  • pnpm run test:e2e (requires Docker and agent credentials)

Split Docker image build/run and agent bindings out of agent-gwt so stock images ship from node_modules, build once via a folder DAG + root JSON registry, and keep root/package versions in sync for CI publish.
Stock and toolchain tags share one run path; buildImages records which stock agent each image derives from so callers no longer pass variant or base agent.

@devzeebo devzeebo left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

Strong refactor — the monorepo split is clean, the Agent(name) + registry model is a clear improvement over the old variant / per-agent build helpers, and test coverage on the Dockerfile DAG + registry path is solid. I ran pnpm run test and pnpm run lint locally; both pass.

Highlights

  • Separation of concernsclanker-cleanroom owns Docker/build/run; agent-gwt stays a thin GWT layer. Good boundary.
  • buildImages DAG — topo-sort + registry JSON is simpler and more extensible than the old buildAgentImage / buildToolchainImage split.
  • Backward-compat re-exportsagent-gwt re-exporting the cleanroom surface should ease migration for existing consumers.
  • CI — dual-package version sync and publish ordering (clanker-cleanroom first) look right for prereleases.

Blockers / should-fix before merge

  1. Release staging leaves agent-gwt depending on a prerelease clanker-cleanroom — see inline comment on publish.yml.
  2. Stale variant reference in context7.json — removed from the API but still in rules.

Suggestions (non-blocking)

  • Add a short migration note to the PR description or README covering: image tag renames (agent-gwt/*:localclanker-cleanroom/*), variant → registry tag names, buildAgentImage/buildToolchainImagebuildImages, and ClaudeAgentResult removal in favor of AgentRunResult.
  • Agent.buildImage() doesn't forward packageRoot — minor edge case if callers use a non-cwd registry.
  • Consider dedicated unit tests for inferAgent error paths (cycle / unresolvable FROM chain); currently only covered indirectly via build.spec.ts.

Pre-merge checklist

  • Bootstrap clanker-cleanroom on npm + trusted publisher (per PUBLISHING.md)
  • Fix release workflow dependency rewrite
  • Update context7.json rule

Comment thread .github/workflows/publish.yml Outdated
Comment thread context7.json Outdated
Comment thread packages/clanker-cleanroom/src/agents/agent.ts Outdated
Comment thread packages/clanker-cleanroom/src/images/build.ts
…kageRoot

Rewrite clanker-cleanroom dependency when staging agent-gwt for release,
update the stale variant reference in context7.json, and forward
RegistryOptions from Agent.buildImage() so custom package roots work.
@devzeebo
devzeebo merged commit a648e4c into main Sep 2, 2026
2 checks passed
@devzeebo
devzeebo deleted the feat/clanker-cleanroom branch September 2, 2026 01:37
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