[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-5824a2bb-dc5b-497a-a4e8-96a77a34516c":3,"$fqLGNOkq5D3TNiFRy2PggJkaXg1oEcvh2ssmPLOj1yLw":43},{"id":4,"title":5,"description":6,"categoryId":7,"moduleId":8,"tags":9,"prompt":10,"icon":11,"source":12,"sourceUrl":13,"authorId":14,"authorName":15,"isPublic":16,"stars":17,"runs":18,"createdAt":19,"updatedAt":19,"module":20,"category":27,"packages":34},"5824a2bb-dc5b-497a-a4e8-96a77a34516c","conductor-revert","基于逻辑工作单元（跟踪、阶段或任务）的Git感知撤销","cat_life_career","mod_other","sickn33,other","---\nname: conductor-revert\ndescription: \"Git-aware undo by logical work unit (track, phase, or task)\"\nrisk: critical\nsource: community\ndate_added: \"2026-02-27\"\n---\n\n# Revert Track\n\nRevert changes by logical work unit with full git awareness. Supports reverting entire tracks, specific phases, or individual tasks.\n\n## Use this skill when\n\n- Working on revert track tasks or workflows\n- Needing guidance, best practices, or checklists for revert track\n\n## Do not use this skill when\n\n- The task is unrelated to revert track\n- You need a different domain or tool outside this scope\n\n## Instructions\n\n- Clarify goals, constraints, and required inputs.\n- Apply relevant best practices and validate outcomes.\n- Provide actionable steps and verification.\n- If detailed examples are required, open `resources\u002Fimplementation-playbook.md`.\n\n## Pre-flight Checks\n\n1. Verify Conductor is initialized:\n   - Check `conductor\u002Ftracks.md` exists\n   - If missing: Display error and suggest running `\u002Fconductor:setup` first\n\n2. Verify git repository:\n   - Run `git status` to confirm git repo\n   - Check for uncommitted changes\n   - If uncommitted changes exist:\n\n     ```\n     WARNING: Uncommitted changes detected\n\n     Files with changes:\n     {list of files}\n\n     Options:\n     1. Stash changes and continue\n     2. Commit changes first\n     3. Cancel revert\n     ```\n\n3. Verify git is clean enough to revert:\n   - No merge in progress\n   - No rebase in progress\n   - If issues found: Halt and explain resolution steps\n\n## Target Selection\n\n### If argument provided:\n\nParse the argument format:\n\n**Full track:** `{trackId}`\n\n- Example: `auth_20250115`\n- Reverts all commits for the entire track\n\n**Specific phase:** `{trackId}:phase{N}`\n\n- Example: `auth_20250115:phase2`\n- Reverts commits for phase N and all subsequent phases\n\n**Specific task:** `{trackId}:task{X.Y}`\n\n- Example: `auth_20250115:task2.3`\n- Reverts commits for task X.Y only\n\n### If no argument:\n\nDisplay guided selection menu:\n\n```\nWhat would you like to revert?\n\nCurrently In Progress:\n1. [~] Task 2.3 in dashboard_20250112 (most recent)\n\nRecently Completed:\n2. [x] Task 2.2 in dashboard_20250112 (1 hour ago)\n3. [x] Phase 1 in dashboard_20250112 (3 hours ago)\n4. [x] Full track: auth_20250115 (yesterday)\n\nOptions:\n5. Enter specific reference (track:phase or track:task)\n6. Cancel\n\nSelect option:\n```\n\n## Commit Discovery\n\n### For Task Revert\n\n1. Search git log for task-specific commits:\n\n   ```bash\n   git log --oneline --grep=\"{trackId}\" --grep=\"Task {X.Y}\" --all-match\n   ```\n\n2. Also find the plan.md update commit:\n\n   ```bash\n   git log --oneline --grep=\"mark task {X.Y} complete\" --grep=\"{trackId}\" --all-match\n   ```\n\n3. Collect all matching commit SHAs\n\n### For Phase Revert\n\n1. Determine task range for the phase by reading plan.md\n2. Search for all task commits in that phase:\n\n   ```bash\n   git log --oneline --grep=\"{trackId}\" | grep -E \"Task {N}\\.[0-9]\"\n   ```\n\n3. Find phase verification commit if exists\n4. Find all plan.md update commits for phase tasks\n5. Collect all matching commit SHAs in chronological order\n\n### For Full Track Revert\n\n1. Find ALL commits mentioning the track:\n\n   ```bash\n   git log --oneline --grep=\"{trackId}\"\n   ```\n\n2. Find track creation commits:\n\n   ```bash\n   git log --oneline -- \"conductor\u002Ftracks\u002F{trackId}\u002F\"\n   ```\n\n3. Collect all matching commit SHAs in chronological order\n\n## Execution Plan Display\n\nBefore any revert operations, display full plan:\n\n```\n================================================================================\n                           REVERT EXECUTION PLAN\n================================================================================\n\nTarget: {description of what's being reverted}\n\nCommits to revert (in reverse chronological order):\n  1. abc1234 - feat: add chart rendering (dashboard_20250112)\n  2. def5678 - chore: mark task 2.3 complete (dashboard_20250112)\n  3. ghi9012 - feat: add data hooks (dashboard_20250112)\n  4. jkl3456 - chore: mark task 2.2 complete (dashboard_20250112)\n\nFiles that will be affected:\n  - src\u002Fcomponents\u002FDashboard.tsx (modified)\n  - src\u002Fhooks\u002FuseData.ts (will be deleted - was created in these commits)\n  - conductor\u002Ftracks\u002Fdashboard_20250112\u002Fplan.md (modified)\n\nPlan updates:\n  - Task 2.2: [x] -> [ ]\n  - Task 2.3: [~] -> [ ]\n\n================================================================================\n                              !! WARNING !!\n================================================================================\n\nThis operation will:\n- Create {N} revert commits\n- Modify {M} files\n- Reset {P} tasks to pending status\n\nThis CANNOT be easily undone without manual intervention.\n\n================================================================================\n\nType 'YES' to proceed, or anything else to cancel:\n```\n\n**CRITICAL: Require explicit 'YES' confirmation. Do not proceed on 'y', 'yes', or enter.**\n\n## Revert Execution\n\nExecute reverts in reverse chronological order (newest first):\n\n```\nExecuting revert plan...\n\n[1\u002F4] Reverting abc1234...\n      git revert --no-edit abc1234\n      ✓ Success\n\n[2\u002F4] Reverting def5678...\n      git revert --no-edit def5678\n      ✓ Success\n\n[3\u002F4] Reverting ghi9012...\n      git revert --no-edit ghi9012\n      ✓ Success\n\n[4\u002F4] Reverting jkl3456...\n      git revert --no-edit jkl3456\n      ✓ Success\n```\n\n### On Merge Conflict\n\nIf any revert produces a merge conflict:\n\n```\n================================================================================\n                           MERGE CONFLICT DETECTED\n================================================================================\n\nConflict occurred while reverting: {sha} - {message}\n\nConflicted files:\n  - src\u002Fcomponents\u002FDashboard.tsx\n\nOptions:\n1. Show conflict details\n2. Abort revert sequence (keeps completed reverts)\n3. Open manual resolution guide\n\nIMPORTANT: Reverts 1-{N} have been completed. You may need to manually\nresolve this conflict before continuing or fully undo the revert sequence.\n\nSelect option:\n```\n\n**HALT immediately on any conflict. Do not attempt automatic resolution.**\n\n## Plan.md Updates\n\nAfter successful git reverts, update plan.md:\n\n1. Read current plan.md\n2. For each reverted task, change marker:\n   - `[x]` -> `[ ]`\n   - `[~]` -> `[ ]`\n3. Write updated plan.md\n4. Update metadata.json:\n   - Decrement `tasks.completed`\n   - Update `status` if needed\n   - Update `updated` timestamp\n\n**Do NOT commit plan.md changes** - they are part of the revert operation\n\n## Track Status Updates\n\n### If reverting entire track:\n\n- In tracks.md: Change `[x]` or `[~]` to `[ ]`\n- Consider offering to delete the track directory entirely\n\n### If reverting to incomplete state:\n\n- In tracks.md: Ensure marked as `[~]` if partially complete, `[ ]` if fully reverted\n\n## Verification\n\nAfter revert completion:\n\n```\n================================================================================\n                           REVERT COMPLETE\n================================================================================\n\nSummary:\n  - Reverted {N} commits\n  - Reset {P} tasks to pending\n  - {M} files affected\n\nGit log now shows:\n  {recent commit history}\n\nPlan.md status:\n  - Task 2.2: [ ] Pending\n  - Task 2.3: [ ] Pending\n\n================================================================================\n\nVerify the revert was successful:\n  1. Run tests: {test command}\n  2. Check application: {relevant check}\n\nIf issues are found, you may need to:\n  - Fix conflicts manually\n  - Re-implement the reverted tasks\n  - Use 'git revert HEAD~{N}..HEAD' to undo the reverts\n\n================================================================================\n```\n\n## Safety Rules\n\n1. **NEVER use `git reset --hard`** - Only use `git revert`\n2. **NEVER use `git push --force`** - Only safe push operations\n3. **NEVER auto-resolve conflicts** - Always halt for human intervention\n4. **ALWAYS show full plan** - User must see exactly what will happen\n5. **REQUIRE explicit 'YES'** - Not 'y', not enter, only 'YES'\n6. **HALT on ANY error** - Do not attempt to continue past failures\n7. **PRESERVE history** - Revert commits are preferred over history rewriting\n\n## Edge Cases\n\n### Track Never Committed\n\n```\nNo commits found for track: {trackId}\n\nThe track exists but has no associated commits. This may mean:\n- Implementation never started\n- Commits used different format\n\nOptions:\n1. Delete track directory only\n2. Cancel\n```\n\n### Commits Already Reverted\n\n```\nSome commits appear to already be reverted:\n  - abc1234 was reverted by xyz9876\n\nOptions:\n1. Skip already-reverted commits\n2. Cancel and investigate\n```\n\n### Remote Already Pushed\n\n```\nWARNING: Some commits have been pushed to remote\n\nCommits on remote:\n  - abc1234 (origin\u002Fmain)\n  - def5678 (origin\u002Fmain)\n\nReverting will create new revert commits that you'll need to push.\nThis is the safe approach (no force push required).\n\nContinue with revert? (YES\u002Fno):\n```\n\n## Undo the Revert\n\nIf user needs to undo the revert itself:\n\n```\nTo undo this revert operation:\n\n  git revert HEAD~{N}..HEAD\n\nThis will create new commits that restore the reverted changes.\n\nAlternatively, if not yet pushed:\n  git reset --soft HEAD~{N}\n  git checkout -- .\n\n(Use with caution - this discards the revert commits)\n```\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n","","imported","https:\u002F\u002Fgithub.com\u002Fsickn33\u002Fantigravity-awesome-skills","user_system_seed","SkillOPIC",true,50,1847,"2026-05-16 13:12:39",{"id":8,"name":21,"slug":22,"icon":23,"description":24,"sort":25,"createdAt":26},"其他","other","mdi-page-next-outline","其他类型Skill",5,"2026-05-16 12:53:40",{"id":7,"name":28,"slug":29,"icon":30,"description":31,"moduleId":8,"sort":32,"skillCount":33,"createdAt":26},"职场发展","career","mdi-briefcase-outline","面试准备、简历优化、职业规划",4,575,[35],{"id":36,"skillId":4,"version":37,"fileName":38,"fileSize":39,"filePath":40,"fileHash":41,"manifest":42,"createdAt":19},"dabb0a46-f963-4456-824f-0e557c684319","1.0.0","conductor-revert.zip",3712,"uploads\u002Fskills\u002F5824a2bb-dc5b-497a-a4e8-96a77a34516c\u002Fconductor-revert.zip","d58b23f5487551c9ddc9b40a3bdd78e5637055cf5eee54252e2867b65fded9c7","[{\"path\":\"SKILL.md\",\"isDirectory\":false,\"size\":9581}]",{"code":44,"message":45,"data":46},200,"success",{"items":47,"stats":48,"page":51},[],{"averageRating":49,"totalRatings":49,"ratingCounts":50},0,[49,49,49,49,49],{"limit":52,"offset":49,"hasMore":53,"nextOffset":52,"ratedOnly":16},15,false]