Skip to content

fix(commit-work): replace interactive commands an agent cannot run - #47

Open
unional wants to merge 1 commit into
softaworks:mainfrom
unional:fix/commit-work-non-interactive-staging
Open

fix(commit-work): replace interactive commands an agent cannot run#47
unional wants to merge 1 commit into
softaworks:mainfrom
unional:fix/commit-work-non-interactive-staging

Conversation

@unional

@unional unional commented Sep 6, 2026

Copy link
Copy Markdown

Problem

commit-work is written for an agent, but three of its steps tell the agent to run interactive commands. Interactive git commands take over the terminal and block on input, so an agent cannot complete them — it either hangs or has to skip the step.

  • Step 2: "plan to use patch staging"
  • Step 3: "Prefer patch staging for mixed changes: git add -p" and "git restore --staged -p"
  • Step 6: "Prefer an editor for multi-line messages: git commit -v"

In practice this means the skill's staging step is unusable as written, and agents fall back to git add . — the opposite of what the skill is trying to achieve.

Change

  • Stage explicit paths (git add <path> ...), with git add . / -A called out as the thing to avoid
  • Unstage by path
  • Multi-line messages via git commit -F - or repeated -m, instead of git commit -v
  • Hunk-level splitting is named as the one step to hand back to a human, rather than silently assumed
  • Step 2 now says to commit one concern and then the next, since a file cannot be split non-interactively

One line added near the top noting that a repository's own commit rules take precedence. Repos that ban git add . and git add -p in their AGENTS.md currently contradict this skill outright, and it is worth saying which wins.

No behavior removed, no restructuring — the workflow, headings, and step numbering are unchanged.

Notes

dist/plugins/commit-work/skills/commit-work/SKILL.md is regenerated; python3 scripts/build_plugins.py reproduces it exactly.

🤖 Generated with Claude Code

https://claude.ai/code/session_01G8tfUyynnULymhHvohRHZx

The staging step recommends `git add -p`, and the message step prefers
`git commit -v`. Both are interactive: they take over the terminal and
wait for input, so an agent running this skill cannot complete them.
`git restore --staged -p` has the same problem.

Stage explicit paths instead, unstage by path, and supply multi-line
messages via `git commit -F -` or repeated `-m` flags. Hunk-level
splitting is called out as the step to hand back to a human.

Also note that a repository's own commit rules take precedence, since
repos that ban `git add .` and `git add -p` in AGENTS.md currently
contradict this skill.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G8tfUyynnULymhHvohRHZx
Signed-off-by: unional <homawong@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant