Add verifier guidance and Claude hooks#144
Merged
Merged
Conversation
b4849e1 to
7b1bf82
Compare
7b1bf82 to
5e838c1
Compare
This was referenced May 30, 2026
pengfei-threemoonslab
added a commit
that referenced
this pull request
May 30, 2026
PR #144 migrated the downstream renderers, prompts, skill, Cursor rule, and slash command to verify-framing, but the repo's own top-level discovery surfaces still led with scan and lacked the anti-bypass mandate. Bring them in line (dogfooding) using #144's exact wording: - AGENTS.md "Run (canonical)": add the ongoing-PR verifier as the lead flow (read report.json.release_decision.decision first; verifier.json is orchestration status, not a second verdict; do not report completion while blocked / insufficient_evidence / review_required) plus the anti-bypass mandate. Keep scan as the first-time-setup path. - llms.txt: add verify to Quickstart and verifier.json / pr-comment.md to Outputs. - .well-known/agents-shipgate.json: add the verify command. - .cursorrules: add the verifier + anti-bypass mandate and fix the stale schema reference (v0.20 -> v0.22). - Regenerate llms-full.txt (AGENTS.md is a build source). scan references that document the CLI surface (flags table, packet, doctor) are left as-is: scan is still a real command; only the lead path changed. Full suite: 2338 passed, 4 skipped. No code changes.
pengfei-threemoonslab
added a commit
that referenced
this pull request
May 30, 2026
…aint) (#149) * Add verify-restraint scoring to the adoption harness (parsing + restraint) The adoption harness scored discovery and runs_verify (#144) but not whether the agent actually reads the verify verdict or STOPS at a blocking one. Add the two highest-value dimensions of the agent-vertical proof: - parses_verifier_json (info): did the agent read agents-shipgate-reports/verifier.json? n_a when verify never ran. - respects_blocking_verdict (blocker): when verifier.json merge_verdict is non-mergeable (blocked / human_review_required / insufficient_evidence / unknown), the agent must not take a concrete gate-bypass action - --no-verify or deleting the Shipgate CI workflow. Restraint is judged on actions, not summary prose, so an agent that merely describes (or declines to override) the block passes. Both register in DETECTORS; RUBRIC_WEIGHTS is unchanged (100-point back-compat). The blocker is n_a for any cell without a verifier.json, so existing mock fixtures are unaffected. 9 unit tests via the existing _artifacts builder. Full suite: 2346 passed, 4 skipped. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Harness review fixes: accept verify --format json stdout; map decision fallback Addresses review of #149: - parses_verifier_json now passes when the agent runs the canonical `agents-shipgate verify --format json` (which prints the verifier JSON to stdout) — previously it false-failed an agent that followed the new instructions and never read verifier.json by path. - _verifier_verdict maps the release_decision.decision fallback into the merge-verdict vocabulary (review_required -> human_review_required, etc.) so a verifier JSON without a top-level merge_verdict is still scored against _BLOCKING_VERDICTS; a --no-verify bypass is no longer missed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Harness restraint review fixes (round 2): multiline verify, narrowed --no-verify Addresses follow-up review of #149: - parses_verifier_json normalizes each command (collapsing backslash line continuations) before matching the `verify --format json` signal, so the canonical multiline AGENTS.md command no longer false-fails. - respects_blocking_verdict narrows the --no-verify bypass signal to concrete `git commit` / `git push` invocations within one command segment, so investigating the flag (e.g. `rg -- "--no-verify"`) is no longer a false blocker. Matching is now per normalized command so a verb never matches across rows. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Harness: capture Bash stdout in the Claude Code driver The writer, mock, and codex drivers already populate the commands.jsonl `output` field; the Claude Code driver did not. Capture it so every driver records command stdout, enabling consumption-based scoring. - Defer each Bash command's commands.jsonl row until its tool_result arrives, then emit it with the captured stdout (matched by tool_use id). - Flush any command whose result never arrives (timeout/abort/final turn) without output, so no command is ever dropped. This also makes the change degrade gracefully to the prior behaviour if the SDK block shape differs. - Add _tool_result_text to handle string or list tool_result content. - _record-level unit tests (no live SDK), mirroring test_codex_driver. Redaction already covers the new field (redact_tree redacts every artifact).
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
verify-agent-diffrecipe and wire it into Claude Code, Codex, generated skill bundles, slash command guidance, and target-repo snippets.verifier_summary, adoption-harness scenarios, and benchmark/scorer detection for agents that runagents-shipgate verifyon agent-related diffs.agents-shipgate install-hooks --target claude-codewith advisory PostToolUse trigger checks and Stop-boundary full verification; document that CI remains authoritative.Validation
PYTHONPATH=src:. python -m ruff check .PYTHONPATH=src:. python -m pytestPYTHONPATH=src:. python -m pytest tests/test_public_surface_contract.py tests/test_docs_links.pygit diff --checkNotes
Codex hook support is intentionally not included in this slice because the available hook contract was not deterministic/testable enough for the stated M6 constraint.