Split the agentics repo into a develop branch for day-to-day work and a clean main branch (kept as the GitHub default) that carries only the plugin distribution — so every /plugin install pulls stripped plugin files directly from the default branch while docs, scripts, and development live on develop, automatically republished to main on every push.
Read and implement all steps in the plan at docs/plans/publish-clean-main-from-develop-branch.md — Publish a clean main branch from a develop workspace. Verify against the plan's Tests, Verification, and Acceptance Criteria before reporting done. If everything passed, mark completion in docs/plans/publish-clean-main-from-develop-branch.md — tick each step's [x] marker and each criterion's - [x], set status: completed — and re-render the HTML from the spec. If any check failed, leave status: in-progress and say which.
More ways to run this plan — goal & workflow prompts, file path
Achieve this goal: Publish a clean main branch from a develop workspace. The plan at docs/plans/publish-clean-main-from-develop-branch.md describes one approach — use it as reference, but optimize for the outcome. Fan out across parallel subagents where that serves the outcome. Verify against the plan's Tests, Verification, and Acceptance Criteria before reporting done. If everything passed, mark completion in docs/plans/publish-clean-main-from-develop-branch.md — tick each step's [x] marker and each criterion's - [x], set status: completed — and re-render the HTML from the spec. If any check failed, leave status: in-progress and say which.
Run a workflow to implement the plan at docs/plans/publish-clean-main-from-develop-branch.md — Publish a clean main branch from a develop workspace. Brief subagents with the plan file at docs/plans/publish-clean-main-from-develop-branch.md. Reserve a final verification phase for the lead agent, not a subagent. Verify against the plan's Tests, Verification, and Acceptance Criteria before reporting done. If everything passed, mark completion in docs/plans/publish-clean-main-from-develop-branch.md — tick each step's [x] marker and each criterion's - [x], set status: completed — and re-render the HTML from the spec. If any check failed, leave status: in-progress and say which.
publish-clean-main-from-develop-branch.html
docs/plans/publish-clean-main-from-develop-branch.html
docs/plans/publish-clean-main-from-develop-branch.md
Context
The story behind this plan — what prompted the work and why it matters now.
The agentics repo is both the development workspace and the install source. .claude-plugin/marketplace.json registers 12 active plugins via git-subdir sources whose url points at https://github.com/shawn-sandy/agentics.git . When a user installs, Claude Code sparsely clones the plugin's path subtree from the repo's default branch — but that branch carries a lot that has no business in an install: a 35 KB root README.md , docs/ , examples/ , scripts/ , tests/ , .playwright-mcp/ , a session .png , CLAUDE.local.md , .DS_Store files, and top-level markdown ( ROADMAP.md , SECURITY.md , SOCIAL.md ).
The sibling plan build-clean-plugin-dist.html solves this by mirroring the marketplace into a separate clean repo ( shawn-sandy/agentics-kit ) and rewriting each source.url . This plan takes a branch-based approach in the same repo instead: main stays as the GitHub default but is replaced with a clean, stripped plugin distribution, while a new develop branch holds the full workspace where all dev work and PRs happen. Because main remains the default branch, git-subdir sources need no ref field at all — installs naturally resolve from the default branch and get clean files. No second repo, no source.url rewrite, and no ref pins needed.
Decisions locked in clarification: branch model = developers push to develop first (all feature branches and PRs target develop), and only develop can be merged/pushed to main — no direct pushes, no PRs from feature branches to main. A GitHub Action rebuilds and republishes main on every push to develop , orphan-replacing main 's tree with the freshly built clean output (main carries distribution snapshots, not dev history). main stays as the GitHub default so installs resolve from it automatically. A key advantage over the separate-repo plan: publishing stays in-repo, so the default GITHUB_TOKEN can push to main — no cross-repo PAT required. An additional advantage over flipping the default: no user migration needed — existing installs keep resolving from main seamlessly.
Files that change
Every file this plan touches, and what happens to each one.
- .github/workflows/
publish-dist.ymlnew rebuild + publish main on push to developversion-guard.ymlmodified retarget PR branch filter main → developupdate-readme.ymlmodified ensure it writes to develop, not main
.claude-plugin/marketplace.jsonmodified strip removed[] for clean dist; no ref pins neededscripts/build-dist.mjsnew manifest-driven clean builder + check/publish.claude/rules/marketplace.mdmodified main is generated; never hand-editREADME.mdmodified branch model & distribution sectionCLAUDE.mdmodified develop-default; never commit to mainmain (branch)generated clean plugin distribution snapshot
Steps
The step-by-step work, in order — each step says what to do, why it matters, and how to check it worked.
Definition of done
The plan counts as done when every statement below is true — check each one off as you verify it.
Final check
One last pass to confirm the whole change works end to end.
End-to-end: confirm gh repo view --json defaultBranchRef still reports main and that the pre-split tag exists. Run node scripts/build-dist.mjs --check locally (exit 0), then verify the tripwire by temporarily allowlisting docs and confirming a non-zero exit. Trigger publish-dist.yml via workflow_dispatch (or push a no-op commit to develop) and confirm it writes a fresh clean commit to main ; then git ls-tree -r origin/main --name-only must show 12 plugin directories carrying only allowlisted files plus a root marketplace.json , slim README.md , and LICENSE — and zero cruft. Finally, in a clean session register shawn-sandy/agentics and install plan-agent (both resolve from main, the default branch), then list the installed files to confirm no docs/ , *.local.md , or PNGs. develop must still hold the complete workspace, unchanged except for the new script, workflow, and docs.
Wrapping up
Three gates that must all pass before this plan is marked completed.
Completion Report
No items to report — all requirements met.