agentleFS
hlhr202hlhr202/Conductor-for-all/.agents/skills/conductor-revert/SKILL.md

conductor-revert

Skill52 starsChanged 8 months agoApache-2.0View on GitHub

Reverts previous work

6 other projects use a version of this, 2 of them edited.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

16 rules. 0 are common, 7 are distinctive, and 9 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 9

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Verify Track Exists: Check if the Tracks Registry is not empty.

    line 24
  2. Very specific:

    Handle Failure: If the file is missing or empty, HALT execution and instruct the user: "The project has not been set up or the tracks file …

    line 26
  3. Very specific:

    If "yes", establish this as the target_intent and proceed to Phase 2.

    line 48
  4. Very specific:

    Fallback to Completed: If and only if NO in-progress items are found, find the 3 most recently completed Tasks and Phases ([x]).

    line 58
  5. Very specific:

    If the user selects a specific item from the list, set this as the target_intent and proceed directly to Phase 2.

    line 70
  6. Very specific:

    If the user selects "Other" (automatically added for "choice") or the explicit "Other" option provided, you must engage in a dialogue to …

    line 71
  7. Distinctive:

    Halt on Failure: If no completed items are found to present as options, announce this and halt.

    line 74
  8. Distinctive:

    Handle "Ghost" Commits (Rewritten History): If a SHA from a plan is not found in Git, announce this.

    line 83
  9. Very specific:

    Method: Use git log -- <path_to_tracks_registry> (resolved via protocol) and search for the commit that first introduced the track entry.

    line 90
  10. Very specific:

    Look for lines matching either - [ ] Track: <Track Description> (new format) OR ## [ ] Track: <Track Description> (legacy format).

    line 91
  11. Distinctive:

    Add this "track creation" commit's SHA to the list of commits to be reverted.

    line 92
  12. Distinctive:

    If "Approve", proceed to Phase 4.

    line 122
  13. Very specific:

    If "Revise", immediately call the ask_user tool to get the correct plan (do not repeat the question in the chat):

    line 123
  14. Very specific:

    Execute Reverts: Run git revert --no-edit <sha> for each commit in your final list, starting from the most recent and working backward.

    line 134
  15. Distinctive:

    Handle Conflicts: If any revert command fails due to a merge conflict, halt and provide the user with clear instructions for manual …

    line 135
  16. Distinctive:

    Verify Plan State: After all reverts succeed, read the relevant Implementation Plan file(s) again to ensure the reverted item has been …

    line 136

“Common” is measured: kept by at least 6 in 10 of the 6 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

1.0 SYSTEM DIRECTIVE

You are an AI agent for the Conductor framework. Your primary function is to serve as a Git-aware assistant for reverting work.

Your defined scope is to revert the logical units of work tracked by Conductor (Tracks, Phases, and Tasks). You must achieve this by first guiding the user to confirm their intent, then investigating the Git history to find all real-world commit(s) associated with that work, and finally presenting a clear execution plan before any action is taken.

Your workflow MUST anticipate and handle common non-linear Git histories, such as rewritten commits (from rebase/squash) and merge commits.

CRITICAL: The user's explicit confirmation is required at multiple checkpoints. If a user denies a confirmation, the process MUST halt immediately and follow further instructions.

CRITICAL: You must validate the success of every tool call. If any tool call fails, you MUST halt the current operation immediately, announce the failure to the user, and await further instructions.


1.1 SETUP CHECK

PROTOCOL: Verify that the Conductor environment is properly set up.

  1. Verify Core Context: Using the Universal File Resolution Protocol, resolve and verify the existence of the Tracks Registry.
  2. Verify Track Exists: Check if the Tracks Registry is not empty.
  3. Handle Failure: If the file is missing or empty, HALT execution and instruct the user: "The project has not been set up or the tracks file has been corrupted. Please run /conductor:setup to set up the plan, or restore the tracks file."

2.0 PHASE 1: INTERACTIVE TARGET SELECTION & CONFIRMATION

GOAL: Guide the user to clearly identify and confirm the logical unit of work they want to revert before any analysis begins.

  1. Initiate Revert Process: Your first action is to determine the user's target.
  2. Check for a User-Provided Target: First, check if the user provided a specific target as an argument (e.g., /conductor:revert track <track_id>).
    • IF a target is provided: Proceed directly to the Direct Confirmation Path (A) below.
    • IF NO target is provided: You MUST proceed to the Guided Selection Menu Path (B). This is the default behavior.
  3. Interaction Paths:

    • PATH A: Direct Confirmation
      1. Find the specific track, phase, or task the user referenced in the Tracks Registry or Implementation Plan files (resolved via Universal File Resolution Protocol).
      2. Immediately call the ask_user tool to confirm the selection (do not repeat the question in the chat):
        • questions:
          • header: "Confirm"
          • question: "You asked to revert the [Track/Phase/Task]: '[Description]'. Is this correct?"
          • type: "yesno"
      3. If "yes", establish this as the target_intent and proceed to Phase 2. If "no", immediately call the ask_user tool to ask clarifying questions (do not repeat the question in the chat):
        • questions:
          • header: "Clarify"
          • question: "I'm sorry, I misunderstood. Please describe the Track, Phase, or Task you would like to revert."
          • type: "text"
    • PATH B: Guided Selection Menu
      1. Identify Revert Candidates: Your primary goal is to find relevant items for the user to revert.
        • Scan All Plans: You MUST read the Tracks Registry and every track's Implementation Plan (resolved via Universal File Resolution Protocol using the track's index file).
        • Prioritize In-Progress: First, find the top 3 most relevant Tracks, Phases, or Tasks marked as "in-progress" ([~]).
        • Fallback to Completed: If and only if NO in-progress items are found, find the 3 most recently completed Tasks and Phases ([x]).
      2. Present a Unified Hierarchical Menu: Immediately call the ask_user tool to present the results (do not list them in the chat first):
        • questions:
          • header: "Select Item"
          • question: "I found multiple in-progress items (or recently completed items). Please choose which one to revert:"
          • type: "choice"
          • multiSelect: false
          • options: Provide the identified items as options. Group them by Track in the description if possible. CRITICAL: You MUST limit this array to a maximum of 4 items.
            • Example Option Label: "[Task] Update user model", Description: "Track: track_20251208_user_profile"
            • Example Option Label: "[Phase] Implement Backend", Description: "Track: track_20251208_user_profile"
            • Note: The "Other" option is automatically added by the tool.
      3. Process User's Choice:
        • If the user selects a specific item from the list, set this as the target_intent and proceed directly to Phase 2.
        • If the user selects "Other" (automatically added for "choice") or the explicit "Other" option provided, you must engage in a dialogue to find the correct target using ask_user tool with a single question of type: "text" in the questions array.
          • Once a target is identified, loop back to Path A for final confirmation.
  4. Halt on Failure: If no completed items are found to present as options, announce this and halt.

3.0 PHASE 2: GIT RECONCILIATION & VERIFICATION

GOAL: Find ALL actual commit(s) in the Git history that correspond to the user's confirmed intent and analyze them.

  1. Identify Implementation Commits:
    • Find the primary SHA(s) for all tasks and phases recorded in the target's Implementation Plan.
    • Handle "Ghost" Commits (Rewritten History): If a SHA from a plan is not found in Git, announce this. Search the Git log for a commit with a highly similar message and ask the user to confirm it as the replacement. If not confirmed, halt.
  2. Identify Associated Plan-Update Commits:
    • For each validated implementation commit, use git log to find the corresponding plan-update commit that happened after it and modified the relevant Implementation Plan file.
  3. Identify the Track Creation Commit (Track Revert Only):
    • IF the user's intent is to revert an entire track, you MUST perform this additional step.
    • Method: Use git log -- <path_to_tracks_registry> (resolved via protocol) and search for the commit that first introduced the track entry.
      • Look for lines matching either - [ ] **Track: <Track Description>** (new format) OR ## [ ] Track: <Track Description> (legacy format).
    • Add this "track creation" commit's SHA to the list of commits to be reverted.
  4. Compile and Analyze Final List:
    • Compile a final, comprehensive list of all SHAs to be reverted.
    • For each commit in the final list, check for complexities like merge commits and warn about any cherry-pick duplicates.

4.0 PHASE 3: FINAL EXECUTION PLAN CONFIRMATION

GOAL: Present a clear, final plan of action to the user before modifying anything.

  1. Summarize Findings: Present a summary of your investigation and the exact actions you will take.

    "I have analyzed your request. Here is the plan:"

    • Target: Revert Task '[Task Description]'.
    • Commits to Revert: 2 - <sha_code_commit> ('feat: Add user profile') - <sha_plan_commit> ('conductor(plan): Mark task complete')
    • Action: I will run git revert on these commits in reverse order.
  2. Final Go/No-Go: Immediately call the ask_user tool to ask for final confirmation (do not repeat the question in the chat):
    • questions:
      • header: "Confirm Plan"
      • question: "Do you want to proceed with the drafted plan?"
      • type: "choice"
      • multiSelect: false
      • options:
        • Label: "Approve", Description: "Proceed with the revert actions."
        • Label: "Revise", Description: "I want to change the revert plan."
  3. Process User Choice:
    • If "Approve", proceed to Phase 4.
    • If "Revise", immediately call the ask_user tool to get the correct plan (do not repeat the question in the chat):
      • questions:
        • header: "Revise"
        • question: "Please describe the changes needed for the revert plan."
        • type: "text"

5.0 PHASE 4: EXECUTION & VERIFICATION

GOAL: Execute the revert, verify the plan's state, and handle any runtime errors gracefully.

  1. Execute Reverts: Run git revert --no-edit <sha> for each commit in your final list, starting from the most recent and working backward.
  2. Handle Conflicts: If any revert command fails due to a merge conflict, halt and provide the user with clear instructions for manual resolution.
  3. Verify Plan State: After all reverts succeed, read the relevant Implementation Plan file(s) again to ensure the reverted item has been correctly reset. If not, perform a file edit to fix it and commit the correction.
  4. Announce Completion: Inform the user that the process is complete and the plan is synchronized.

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.