feat(harness): name the PTC loop and add /critique command#9
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR makes the harness’s implicit Plan → Tool → Critique workflow explicit, adds a new /critique slash command for mid-flow review passes, and updates the surrounding harness documentation/install messaging to reflect that workflow.
Changes:
- Add a new
assets/commands/critique.mdslash command that re-reads recent changes, performs self-critique, callsadvisor(), and reports a short punch list. - Document the named “PTC loop” in the CLAUDE template and add
/critiqueto the expected tools/docs. - Update harness docs and install/uninstall preflight banners so the new slash command appears in user/project scope inventories.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
skills/harness/scripts/uninstall.sh |
Updates uninstall preflight output to mention the new /critique command. |
skills/harness/scripts/install.sh |
Updates install preflight output to mention the new /critique command. |
skills/harness/assets/commands/critique.md |
Adds the new mid-flow critique slash command instructions. |
skills/harness/assets/CLAUDE.md.tmpl |
Documents the PTC loop and adds /critique to the expected tool list. |
skills/harness/SKILL.md |
Registers /critique in skill docs and records the recommendation against an always-on critique hook. |
skills/harness/README.md |
Updates user-facing documentation/tables to include /critique. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- /critique now handles untracked files (Read after git status --porcelain), fresh repos / non-git dirs, and clean trees with the change in HEAD (git show HEAD). - install.sh / uninstall.sh banners use commands/*.md instead of a hand-maintained brace list, matching the hooks convention so the dry-run output can't drift from the actual install glob.
This was referenced May 2, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #6. Names the implicit Plan → Tool → Critique loop in the harness, adds
/critiquefor mid-flow critique passes, and records a recommendation against shipping a PostToolUse critique hook.What changed
assets/CLAUDE.md.tmpl— new## The PTC loopsection above## Tools I expect you to use. Three bullets (Plan / Tool / Critique → the surfaces that implement each) and a one-line Reflexion citation (Shinn et al. 2023). Added/critiqueto the tools list.assets/commands/critique.md— new slash command. Re-readsgit diff HEAD(catches staged + unstaged), self-critiques, callsadvisor(), reports a punch list under 200 words. Treats$ARGUMENTSas a scope hint. Explicitly does not start new implementation work in the same turn.SKILL.md— registers/critiquein the file table and command paths. New## PostToolUse critique hook — recommendationsection: don't ship it. Boundary critiques (verify-before-stop.sh,advisor(), on-demand/critique) cover the same gap with much better signal-to-noise; an always-on PostToolUse critique would burn tokens on edits that don't need it and train the agent to ignore the noise. Revisit if mid-flow drift escapes all three boundary surfaces — but tune when/critiquegets suggested, not make it automatic.README.md—/critiquelisted alongside/verify,/planin the user-scope, project-scope, and file tables.scripts/{install,uninstall}.sh— preflight banner strings updated from{verify,plan}.mdto{verify,plan,critique}.md. The install/uninstall plumbing already iteratesassets/commands/*.mdas a glob, so no logic changes were needed.Why
Critique only fired at boundaries (Stop, advisor calls). Reflexion / self-refine patterns critique between tool steps — we had no equivalent. Naming the loop also gives users vocabulary: "run a PTC pass on this file" now means something specific.
Validation
./scripts/harness-check.shpasses (shellcheck, ruff, mypy, pytest).bash skills/harness/scripts/install.sh --target=/tmp/h-ptc-test/.claude --dry-runshowscommands/{verify,plan,critique}.mdin the preflight and listscritique.mdunder "installing slash commands".ls /tmp/h-ptc-test/.claude/commands/returnscritique.md plan.md verify.md.bash skills/harness/scripts/uninstall.sh --target=/tmp/h-ptc-test/.claude --dry-runlistscritique.mdamong files it would remove (round-trip clean).git diff HEAD(vs plaingit diffwhich misses staged changes) and PTC section placement above the tools list (frame before implementation).