Skip to content

Add opt-in tarot review-artifact gate for GitHub-forge workflows#348

Draft
dkrattiger wants to merge 1 commit into
mainfrom
panopticon/tarot-review-gate
Draft

Add opt-in tarot review-artifact gate for GitHub-forge workflows#348
dkrattiger wants to merge 1 commit into
mainfrom
panopticon/tarot-review-gate

Conversation

@dkrattiger

@dkrattiger dkrattiger commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Companion to the tarot authoring CLI (built in sibling tasks). Repos that opt in via capabilities.tarot_review get a real, verified ITERATING responsibility on github-peer-reviewed/github-self-reviewed: before advance out of ITERATING, the task must author .tarot/strands.json and (for non-trivial diffs) a tour, passing tarot strands check / tarot tour check.

Unlike every other ITERATING responsibility (agent self-attested), this one is real-verified: a new PreToolUse hook (container/tarot_gate.py) intercepts the apply_operation MCP tool, and for an advance call while the task is in ITERATING on an opted-in repo, runs the tarot checks in /workspace and 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 optional repo: Repo | None = None through responsibilities()/start_task/apply_transition/force_transition so a workflow can vary its declared responsibilities per repo (backward compatible — every existing caller is unaffected).
  • workflows/github_forge.py: TAROT_REVIEW_ARTIFACTS responsibility, added to ITERATING only for a repo with capabilities.tarot_review set.
  • container/tarot_gate.py (new): the gate hook, wired into container/hooks.py's PreToolUse settings.
  • docs/repos.md: documents the new capability and the repo-layer tarot install 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.

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>
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