Add opt-in tarot review-artifact gate for GitHub-forge workflows#348
Draft
dkrattiger wants to merge 1 commit into
Draft
Add opt-in tarot review-artifact gate for GitHub-forge workflows#348dkrattiger wants to merge 1 commit into
dkrattiger wants to merge 1 commit into
Conversation
Repos that set `capabilities.tarot_review` get a real, verified ITERATING responsibility (unlike every other responsibility, which is agent self-attested): a `PreToolUse` hook on `apply_operation` runs `tarot strands check` / `tarot tour check` in the container and denies `advance` on failure, with the checks' output fed back as the reason. A trivial diff (below a changed-line threshold) auto-resolves the responsibility without running the checks. Threads an optional `repo` through `Workflow.responsibilities()` and the transition methods so a workflow can vary what it promises per repo. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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
Companion to the
tarotauthoring CLI (built in sibling tasks). Repos that opt in viacapabilities.tarot_reviewget a real, verified ITERATING responsibility ongithub-peer-reviewed/github-self-reviewed: beforeadvanceout of ITERATING, the task must author.tarot/strands.jsonand (for non-trivial diffs) a tour, passingtarot strands check/tarot tour check.Unlike every other ITERATING responsibility (agent self-attested), this one is real-verified: a new
PreToolUsehook (container/tarot_gate.py) intercepts theapply_operationMCP tool, and for anadvancecall while the task is in ITERATING on an opted-in repo, runs the tarot checks in/workspaceand denies the tool call — with the checks' output as the reason — on failure. A trivial diff (below a changed-line threshold, overridable per repo) skips the checks and auto-resolves the responsibility.core/workflow.py: threads an optionalrepo: Repo | None = Nonethroughresponsibilities()/start_task/apply_transition/force_transitionso a workflow can vary its declared responsibilities per repo (backward compatible — every existing caller is unaffected).workflows/github_forge.py:TAROT_REVIEW_ARTIFACTSresponsibility, added to ITERATING only for a repo withcapabilities.tarot_reviewset.container/tarot_gate.py(new): the gate hook, wired intocontainer/hooks.py'sPreToolUsesettings.docs/repos.md: documents the new capability and the repo-layertarotinstall convention (installing it in the shared workflow layer would tax every forge repo, not just opted-in ones).Scope note: ships the repo-capability opt-in path only (not the
.claude/skills/tarot-authoring/-presence auto-detect, which would need a DB migration + session-service provisioner change) — flagged as a fast-follow in the plan artifact.