task-root-git-operations
Skill2 starsChanged 45 days agoMITView on GitHub
Use when manually committing, rebasing, or pushing a shared task root. Preserve every task's working state.
- Deletes or force-pushes
- Commits and pushes
In this repository15 other files it gives its agents.
- compact-directory-memorySkill
- task-archaeologySkill
- task-artifact-integritySkill
- task-aware-project-workSkill
- task-context-storageSkill
- task-cross-machine-syncSkill
- task-external-repos-patternSkill
- task-frameworkSkill
- task-lifecycle-disciplineSkill
- task-lifecycle-edge-casesSkill
- task-lifecycle-portabilitySkill
- task-nested-subtask-lifecycleSkill
- task-requirement-intakeSkill
- task-timestamp-conventionSkill
- task-trackerSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. About 0 are common, 15 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈15
Distinctive · estimate
This author's own choices. Worth a look.
6
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
- Very specific: line 28
Use this skill only for manual Git operations in the configured $HERMES_TASKS_ROOT repository.
- Distinctive: line 41
Never run any of these commands in the shared task root:
- Distinctive: line 54
Do not use a root-wide git add -A, git commit, git pull --rebase, or git rebase while another task's changes are staged, unstaged, or …
- Distinctive: line 57
If a task root already contains historical stash entries, inspect and recover or discard them only through the controlled procedure in …
- Distinctive: line 73
Do not push a task commit before checking the remote branch after the commit.
- Distinctive: line 74
Do not replace step 2 with a blind push and repair a rejection later.
- Very specific: line 81
Read git status --short, current branch, remotes, and origin/<branch>...HEAD divergence.
- Very specific: line 90
Keep root README.md, root TASKS.md, and any other root-level path as independent groups.
- Very specific: line 93
Read the target task's TASK.md, MEMORY.md, and recent CHANGELOG.md before deciding its commit message or whether an artifact is meaningful.
- Distinctive: line 96
When the user says “all staged tasks, one task at a time”, enumerate all staged path groups and process every group.
- Distinctive: line 111
Read back the committed path list with:
- Distinctive: line 127
If the shared root is clean after the exact task commit, run:
- Distinctive: line 139
If any other task has staged, unstaged, or untracked paths, do not stash it and do not run rebase in the shared root.
- Distinctive: line 158
Verify the exact task commit remains in the rebased history and its path list still contains only its declared task directory.
- Distinctive: line 160
Never force-push to compensate for a local rebase.
- Distinctive: line 173
After each push, re-scan the shared root for newly staged groups before handling another task.
- Very specific: line 177
Do not infer that a remote named origin is the correct destination when the repository policy or explicit user instruction names a …
- Distinctive: line 179
Never force-push without a separate explicit authorization.
- Very specific: line 192
Create an isolated audit worktree at current HEAD.
- Distinctive: line 197
Do not use git stash pop in the shared root.
- Distinctive: line 210
commit SHA and signature result.
≈ “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.
Files
Task Root Git Operations
Use this skill only for manual Git operations in the configured
$HERMES_TASKS_ROOT repository. It protects the shared root from one task's
Git operation moving, hiding, committing, or discarding another task's work.
For unattended or cross-machine checkpoint synchronization, use
task-cross-machine-sync instead. For a normal standalone repository, use its
project-specific Git workflow rather than this skill.
Non-negotiable shared-root boundary
$HERMES_TASKS_ROOT is a multi-task shared worktree. Do not treat it as a
single-task checkout.
Never run any of these commands in the shared task root:
git stash
git stash push
git stash pop
git stash drop
git reset --hard
git clean
git checkout -- .
git restore .Do not use a root-wide git add -A, git commit, git pull --rebase, or
git rebase while another task's changes are staged, unstaged, or untracked.
If a task root already contains historical stash entries, inspect and recover or discard them only through the controlled procedure in Historical stash recovery. The prohibition above exists because a shared-root stash can hide work owned by another active task.
Required operation order
For every independently authorized task group, the order is fixed:
1. Commit the exact task directory.
2. Pull/rebase against the authorized remote branch.
3. Push the rebased commit.
4. Read back the exact remote ref.Do not push a task commit before checking the remote branch after the commit. Do not replace step 2 with a blind push and repair a rejection later.
Preflight: inventory and partition
Before any mutation:
- Resolve the canonical task root with task-framework.
- Read
git status --short, current branch, remotes, andorigin/<branch>...HEADdivergence. - Enumerate every staged path and every unstaged/untracked path separately.
Partition paths by their first task-directory segment:
YYYYMMDD-HHMMSS.<name>-<hash6>/Keep root
README.md, rootTASKS.md, and any other root-level path as independent groups. Never attach a root index to an arbitrary task commit merely to make a commit succeed.- Read the target task's
TASK.md,MEMORY.md, and recentCHANGELOG.mdbefore deciding its commit message or whether an artifact is meaningful.
When the user says “all staged tasks, one task at a time”, enumerate all staged path groups and process every group. Do not silently exclude logs, generated artifacts, or a task whose scope is unfamiliar.
Exact task commit
For one task directory TASK_DIR:
git add -A -- "$TASK_DIR"
git diff --cached --name-only -- "$TASK_DIR"
git diff --cached --check -- "$TASK_DIR"
git commit --only -S -m "<conventional message>" -- "$TASK_DIR"Read back the committed path list with:
git diff-tree --no-commit-id --name-only -r HEADIt must contain only the declared task directory. If a raw evidence artifact
contains meaningful CRLF, terminal control bytes, or trailing spaces,
classify the git diff --check finding as evidence-format preservation before
committing; never mutate raw logs merely to silence the check. Record the
exception in the task's CHANGELOG or delivery report.
Rebase without disturbing active tasks
Clean shared root
If the shared root is clean after the exact task commit, run:
git pull --rebase <remote> <branch>Inspect the result. Resolve only a verified semantic conflict; use
GIT_EDITOR=true git rebase --continue, then inspect the resulting commit,
conflict markers, status, and relevant task files.
Dirty shared root or root-index conflict
If any other task has staged, unstaged, or untracked paths, do not stash it and do not run rebase in the shared root. Create an isolated worktree from the post-commit task-root HEAD:
git worktree add -b sync/<task-hash>-<timestamp> <temporary-worktree> HEAD
cd <temporary-worktree>
git fetch <remote> <branch>
git rebase <remote>/<branch>Rules for the isolated worktree:
- Its branch is temporary transport state, not a task branch.
- A conflict in task content stops for semantic resolution.
- A conflict in generated root
README.mdorTASKS.mdmay keep the verified remote version only when the local conflicting commit is an equivalent stale index refresh. Regenerate indexes after integration if the task framework requires it; do not discard a task-content conflict as an index conflict. - Verify the exact task commit remains in the rebased history and its path list still contains only its declared task directory.
- Never force-push to compensate for a local rebase.
Push and read-back
Push only after explicit authorization for the named remote and branch:
git push <remote> HEAD:<branch>
local_head=$(git rev-parse HEAD)
remote_head=$(git ls-remote <remote> "refs/heads/<branch>" | cut -f1)
test "$local_head" = "$remote_head"After each push, re-scan the shared root for newly staged groups before handling another task. A concurrent writer can add a new task while a prior task is being published.
Do not infer that a remote named origin is the correct destination when the
repository policy or explicit user instruction names a different destination.
Never force-push without a separate explicit authorization.
Historical stash recovery
Historical stashes may predate this skill. Recover them without disturbing the shared root:
- Record stable stash object IDs with
git rev-parse stash@{N}before any mutation; numbered selectors shift after a drop. - Inspect every stash with
git stash show --include-untracked --statand--name-status. - Compare stashed blobs against current
HEADby task group. A path that is byte-identical or superseded by a later verified task artifact is not useful. - Create an isolated audit worktree at current
HEAD; rungit stash apply --index <stable-stash-id>only there. - For useful content, merge only the missing task-owned facts or artifacts into the shared root by exact task path, then make a dedicated task commit, rebase, push if authorized, and verify the remote ref.
- Do not use
git stash popin the shared root. After every useful fragment is committed or every path is proven superseded, drop the audited stash by stable object ID or deepest numbered selector first.
A stash conflict in a task CHANGELOG.md normally means later entries exist.
Preserve a historically meaningful missing entry by appending it chronologically;
do not replace later entries with the stash version.
Completion evidence
For every task group report:
- staged and committed path count;
- commit SHA and signature result;
- rebase target and any conflict treatment;
- remote ref SHA after push, when push was authorized;
- remaining shared-root staged/unstaged/untracked group counts;
- any untouched historical stash or a reason it was dropped.
Common failures
| Failure | Required response |
git push rejected because remote advanced | Fetch/rebase before retrying; use an isolated worktree if the shared root is not clean. |
A normal git commit includes another task's staged paths | Do not push. Rebuild the commit with exact path scoping before publication. |
git diff --check flags archived raw logs | Preserve evidence bytes; document the exception instead of rewriting history. |
| A stash contains multiple tasks | Audit in an isolated worktree and recover only useful task-owned fragments. |
| Root index conflicts during rebase | Distinguish stale generated index content from task content; never discard task facts as a root-index shortcut. |
| Existing task changes make a root rebase unsafe | Leave them in place and use an isolated worktree; never stash or clean the shared root. |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

