Skip to content

#18: implement the guide command fix action#32

Merged
devill merged 3 commits into
mainfrom
issue-18-command-fix
Jun 17, 2026
Merged

#18: implement the guide command fix action#32
devill merged 3 commits into
mainfrom
issue-18-command-fix

Conversation

@devill

@devill devill commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Closes #18.

Only the prompt fix action was implemented; a command action rendered nothing. This runs the script per docs/guide.md: the smell's whole bag as JSON on stdin, once per smell, stdout/stderr streamed to the agent, exit code folded into the run's exit code.

Locked decisions

Exit folding per the docs table: command exit 0 never blocks (even for an enforced smell — it overrides the default "enforced + issues = 1" rule); non-zero blocks only an enforced smell. prompt behaviour is unchanged.

Atomic commits

  1. #18: let runTool write stdin to the spawned process — optional stdin with an EPIPE guard; existing callers unaffected.
  2. #18: add the command fix runnerrunFixCommand + unit tests (exit 0 / non-zero / enforced vs suggested / spawn-failure).
  3. #18: run command fix actions from the guide — guide becomes async, runs each command action, streams output into the section, folds the exit code; runner threads cwd and awaits.

Gates

  • pnpm build, pnpm lint — clean (all functions within max-lines/max-params)
  • pnpm test — 392 passed (+7)

🤖 Generated with Claude Code


Generated by Claude Code

claude added 3 commits June 17, 2026 16:50
Optional stdin option, written and closed after spawn (with an error
listener so a child that never reads stdin can't raise EPIPE). Existing
callers are unaffected when stdin is unset.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nq6xHU6JtSNpYWhMYjXB15
runFixCommand spawns the smell's script with its bag as JSON on stdin.
A spawn/timeout failure is a blocking config error (always blocks); a
clean non-zero exit blocks only an enforced smell; exit 0 never blocks.
The script's stdout/stderr is returned for display to the agent.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nq6xHU6JtSNpYWhMYjXB15
issues), streams the script output into the smell's section, and folds
its exit code into the run's exit code. prompt behaviour is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nq6xHU6JtSNpYWhMYjXB15
@devill
devill force-pushed the issue-18-command-fix branch from 3dd537b to 8a4ce16 Compare June 17, 2026 14:51
@devill
devill marked this pull request as ready for review June 17, 2026 14:51
@devill
devill merged commit 1e51227 into main Jun 17, 2026
2 checks passed
@devill
devill deleted the issue-18-command-fix branch June 19, 2026 12:21
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.

Guide: implement the 'command' fix action (script fixes)

2 participants