agentleFS
quruhao4800quruhao4800/agent-workflow/skills/collaboration/finishing-a-development-branch/SKILL.md

finishing-a-development-branch

Skill1 starsChanged 6 months agoMITView on GitHub

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup

187 other projects use a version of this, 66 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use chinese-code-review, chinese-commit-conventions and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Leodorareluctant259Skill

    chinese-code-review

    中文代码审查规范——在保持专业严谨的同时,用符合国内团队文化的方式给出有效反馈

    Also in 8 projects that use this

  • Leodorareluctant259Skill

    chinese-commit-conventions

    中文 Git 提交规范 — 适配国内团队的 commit message 规范和 changelog 自动化

    Also in 8 projects that use this

  • obraSkill

    diagnosing-superpowers

    Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.

    Also in 20 projects that use this

  • kntismSkill

    condition-based-waiting

    Use when tests have race conditions, timing dependencies, or inconsistent pass/fail behavior - replaces arbitrary timeouts with condition polling to wait for actual state changes, eliminating flaky tests from timing guesses

    Also in 3 projects that use this

  • MicrosoftSkill

    testing-anti-patterns

    Use when writing or changing tests, adding mocks, or tempted to add test-only methods to production code - prevents testing mock behavior, production pollution with test-only methods, and mocking without understanding dependencies

    Also in 4 projects that use this

  • MicrosoftSkill

    root-cause-tracing

    Use when errors occur deep in execution and you need to trace back to find the original trigger - systematically traces bugs backward through call stack, adding instrumentation when needed, to identify source of invalid data or incorrect behavior

    Also in 5 projects that use this

  • +3 more from Leodorareluctant259

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 9 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 173 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 3

    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:

    Verify technical checks and requirement closure first, then present integration options.

    line 18
  2. Distinctive:

    Run project test suite. If failing, stop and fix.

    line 24
  3. Very specific:

    If any check fails, stop. Do not offer merge/PR/discard options.

    line 36
  4. Very specific:

    Write docs/plans/YYYY-MM-DD-<feature-name>/97-risk-map.md (create the file.

    line 40
  5. Very specific:

    If the implementation touches any of the following, invoke agent-workflow:security-review before proceeding:

    line 68
  6. Distinctive:

    If none of the above apply, skip this step.

    line 76
  7. Distinctive:

    If a path is returned and the hook file exists → proceed.

    line 85
  8. Distinctive:

    If not configured → stop and prompt the user:

    line 86
  9. Distinctive:

    Keep the branch as-is (handle later)

    line 109
  10. Distinctive:

    Delete feature branch if tests pass

    line 120
  11. Distinctive:

    Create PR with summary and test plan

    line 125
  12. Distinctive:

    Delete work without explicit confirmation

    line 143

“Common” is measured: kept by at least 6 in 10 of the 173 edited versions of this file we could read. “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

Finishing a Development Branch

Prerequisites

From skillMust already existIf missing
verification-before-completionAll gates passed (unmapped_req = 0, open_cr = 0, open_dr = 0, pending_recheck = 0)Return to verification-before-completion
verification-before-completion04-verification.md Status = CompleteReturn to verification-before-completion
executing-plansAll tasks completed, no tasks in_progressReturn to executing-plans

Overview

Verify technical checks and requirement closure first, then present integration options.

Announce at start: "I'm using the finishing-a-development-branch skill to complete this work."

Step 1: Verify Tests

Run project test suite. If failing, stop and fix.

Step 2: Verify Requirement Closure

Confirm from plan artifacts:

  • 04-verification.md is updated
  • unmapped_req = 0
  • open_cr = 0
  • open_dr = 0
  • pending_recheck = 0

If any check fails, stop. Do not offer merge/PR/discard options.

Step 3: Write Risk Map

Write docs/plans/YYYY-MM-DD-<feature-name>/97-risk-map.md (create the file; skip if no plan folder exists for this work).

Template:

# Risk Map: <feature-name>

## Untested Scenarios
<!-- Edge cases and boundary conditions not covered by tests -->
-

## Implementation Assumptions
<!-- Things assumed to be true that were not verified -->
-

## Fragile Areas
<!-- Components or interactions that were tricky to implement or felt unstable -->
-

## Intentionally Deferred
<!-- What was consciously left out of scope -->
-

Fill each section honestly. Empty sections are allowed but must be left blank intentionally, not skipped.

Step 4: Security Review (Conditional)

If the implementation touches any of the following, invoke agent-workflow:security-review before proceeding:

  • API endpoints or HTTP handlers
  • Authentication / authorization logic
  • User input processing
  • Sensitive data (tokens, passwords, PII)
  • File upload or external service calls

If none of the above apply, skip this step.

Step 5: Verify Commit-msg Hook

Run:

git config core.hookspath
  • If a path is returned and the hook file exists → proceed.
  • If not configured → stop and prompt the user:

    This project has no commit-msg hook. The agent-workflow repo provides one that enforces conventional commit format.

    Options:

    1. Copy .githooks/ into this project and configure: git config core.hookspath .githooks
    2. Point to agent-workflow hooks directly: git config core.hookspath <agent-workflow-path>/.githooks
    3. Skip — proceed without hook

    Which do you prefer?

    Execute the user's choice before continuing. If option 3, still enforce single-line conventional commit format manually.

Step 6: Determine Base Branch

Find base (main/master) via git merge-base and confirm if needed.

Step 7: Present Options

Present exactly:

  1. Merge back to <base-branch> locally
  2. Push and create a Pull Request
  3. Keep the branch as-is (handle later)
  4. Discard this work

Step 8: Execute Choice

Option 1: Merge Locally

  • Checkout base branch
  • Pull latest
  • Merge feature branch
  • Re-run tests on merged result
  • Delete feature branch if tests pass

Option 2: Push and Create PR

  • Push feature branch
  • Create PR with summary and test plan

Option 3: Keep As-Is

  • Report branch preserved
  • No action

Option 4: Discard

  • Require exact typed confirmation: discard
  • Delete feature branch

Red Flags

Never:

  • Proceed with failing tests
  • Proceed with open requirement closure gates
  • Delete work without explicit confirmation
  • Force-push without explicit request

Integration

Called by:

  • agent-workflow:subagent-driven-development
  • agent-workflow:executing-plans

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.