agentleFS
bookchaowalitbookchaowalit/platform-agent-skills/main-only-development/SKILL.md

main-only-development

Skill0 starsChanged 8 days agoApache-2.0View on GitHub

Use when a development session starts or performs Git work in the top-level Solo Empire repository, especially when branches or worktrees need to be consolidated.

  • Deletes or force-pushes

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 9 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Start development in the top-level Solo Empire repository on main and keep working there.

    line 10
  2. Distinctive:

    After cleanup, continue every new task directly on main.

    line 13
  3. Very specific:

    After the inventory, run git fetch origin --prune when the remote is reachable so remote-tracking refs are current.

    line 26
  4. Distinctive:

    Start new work on main. If an existing session is on another branch, switch only after step 1 confirms its work is safe and retained.

    line 29
  5. Distinctive:

    Treat any non-main branch already present as cleanup.

    line 33
  6. Distinctive:

    Treat staged, unstaged, untracked, ignored, stashed, and other-worktree changes as separate work from branch commits.

    line 38
  7. Distinctive:

    Keep ignored runtime data out of commits.

    line 62
  8. Distinctive:

    Never use git reset --hard, git clean, or force-push to make the branch list look clean.

    line 63
  9. Distinctive:

    Do not delete an attached worktree or a branch with unmerged commits or unidentified work.

    line 64
  10. Distinctive:

    Do not use root-repository instructions to change branches in nested repositories.

    line 65
  11. Very specific:

    After integration, confirm the root checkout is on main, the only local branch is main, the only remote branch is origin/main, origin/HEAD …

    line 70

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Main-Only Development

Overview

Start development in the top-level Solo Empire repository on main and keep working there. Merging is a one-time cleanup for non-main branches that already exist; it restores the intended state and is not the normal development flow. After cleanup, continue every new task directly on main. This policy does not apply to nested repositories; follow their own instructions and preserve their independent Git boundaries.

Workflow

  1. Confirm the repository root, then inspect git status --short --branch, git branch --all --verbose, and git worktree list --porcelain before any Git mutation. Run git -C <worktree-path> status --short --branch for every listed worktree. Before any merge, branch switch, branch-ref deletion, or worktree removal, inspect the staged and unstaged diffs, untracked paths, and relevant ignored files in every worktree. Do not proceed until all pending work is identified and retained; do not expose sensitive file contents.
  2. After the inventory, run git fetch origin --prune when the remote is reachable so remote-tracking refs are current. Pruning removes stale local tracking refs; it does not delete branches from origin.
  3. Start new work on main. If an existing session is on another branch, switch only after step 1 confirms its work is safe and retained. Do not create feature branches or extra worktrees for ordinary development; commit only scoped files on main.
  4. Treat any non-main branch already present as cleanup. Inspect its commits and file changes against main, integrate the intended changes once, and resolve conflicts by preserving both intended changes. Verify the changes are present in main before removing the local or origin ref; check commit ancestry for regular merges and patch content for squash or cherry-pick.
  5. Treat staged, unstaged, untracked, ignored, stashed, and other-worktree changes as separate work from branch commits. Preserve them. If switching, merging, deleting a ref, or removing a worktree could affect work that has not been identified and retained, stop and ask the user how to handle it.
  6. Push only main to origin when the scoped changes are ready and the repository's approval and verification requirements are satisfied. If branch protection or a required review workflow conflicts with main-only development, stop and explain the conflict before creating any temporary branch or pull request flow.

Product clones, TDD and autopilot

Product clones in the Big Loop also work main-only, by their own README. There, ADR-0004 TDD runs on main: the failing-test commit comes first, its red run is checked locally, and red and green are pushed together, never red alone; no squash or force-push after the red/green log. The autopilot in productivity-tracking-web/.autopilot/ is the one place with short-lived autopilot/* branches, merged locally by the loop. Details: references/tdd-and-autopilot-on-main.md.

Decision rules

  • A stale branch shown by an app is not proof that the Git ref still exists; inspect the repository and refresh the app after cleanup.
  • A stash is not a branch. Do not pop, drop, or create stashes as branch cleanup.
  • Keep ignored runtime data out of commits. Preserve it outside any worktree that must be removed; ask if the safe destination is unclear.
  • Never use git reset --hard, git clean, or force-push to make the branch list look clean.
  • Do not delete an attached worktree or a branch with unmerged commits or unidentified work.
  • Do not use root-repository instructions to change branches in nested repositories.
  • Merge locally and push; never gh pr merge unless the owner asks.

Verify

After integration, confirm the root checkout is on main, the only local branch is main, the only remote branch is origin/main, origin/HEAD points to origin/main, and main matches origin/main after a successful push. Use git ls-remote --heads origin to verify the actual remote has no other branch heads; if the remote is unavailable, report that check as unverified. Confirm that any extra worktrees or stashes were preserved unless their contents were explicitly handled.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.