Add NBT-local Rhei GitHub issue fix template - #1006
Open
jormundur00 wants to merge 8 commits into
Open
Conversation
jormundur00
marked this pull request as ready for review
July 27, 2026 07:40
jormundur00
force-pushed
the
rhei/github-issue-fix-template
branch
2 times, most recently
from
August 4, 2026 06:38
a479567 to
37ff47f
Compare
jormundur00
force-pushed
the
rhei/github-issue-fix-template
branch
from
August 5, 2026 06:53
37ff47f to
66edeaa
Compare
vjovanov
reviewed
Aug 26, 2026
| "--dangerously-bypass-approvals-and-sandbox", | ||
| "--skip-git-repo-check", | ||
| "-c", | ||
| "model_reasoning_effort=\"medium\"" |
Member
There was a problem hiding this comment.
Hmm, this should be a separate knob for effort. Also, we should use high.
vjovanov
reviewed
Aug 26, 2026
| issue-intake: | ||
| description: Prepare the issue worktree, fetch the issue, discover repo rules, analyze issue adequacy and spec fit, and write one routed follow-up task. | ||
| initial: true | ||
| target: "codex[yolo]:openai:gpt-5.6-sol" |
Member
There was a problem hiding this comment.
We need effort here as well? The effort should be a variable.
Also, the whole target should be a variable as I might use claude
vjovanov
reviewed
Aug 26, 2026
|
|
||
| requirements-review: | ||
| description: Review whether the implementation satisfies the GitHub issue requirements. | ||
| target: "codex[yolo]:openai:gpt-5.6-terra" |
Member
There was a problem hiding this comment.
No terra, ever. Luna high or extra high. But again, call it a small model and allow to cofigure.
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
This adds a project-local Rhei template for taking one
graalvm/native-build-toolsGitHub issue from intake through an approval-gatedimplementation, focused validation and review, and draft pull request
publication.
The reusable workflow was developed on the Rhei branch and is now owned by NBT
under:
Because the template is NBT-specific, its input surface is intentionally tiny:
the only input is the issue number or issue URL. Repository identity, checkout
location, base branch, branch naming, proposal actor, push destination, PR head
owner, review limits, publication mode, and model routing are all fixed in the
template.
Why move the template into NBT?
The workflow encodes NBT-specific policy rather than general Rhei CLI behavior:
graalvm/native-build-toolsis always the issue and PR repository.masteris always the base branch.rhei/issue-<issue>.AGENTS.mdinstructions.the NBT checkout.
jormundur00.originand usegraalvmas the PR headowner.
Keeping this policy beside the repository makes it reviewable and versioned
with the project it changes. It also reduces a normal invocation from a long
list of repository and publication arguments to one issue value.
Template contents
template.yamlissueinput.index.rhei.mdtasks/01-issue-intake.mdstates.yamlsettings.jsonbin/github-proposalREADME.mdFixed NBT settings
graalvm/native-build-tools.)masterrhei/issue-<issue>../native-build-tools-rhei-worktreesdraftjormundur00origingraalvmrheilabel when available; never create labelscodex[yolo]:openai:gpt-5.6-solcodex[yolo]:openai:gpt-5.6-terracodex[yolo]:openai:gpt-5.6-solcodex[yolo]:openai:gpt-5.6-lunaEnd-to-end flow
The initial plan contains one
issue-intaketask. Intake creates or reuses anisolated issue worktree, snapshots the issue, discovers repository policy,
evaluates issue adequacy and spec fit, and writes exactly one sibling follow-up
task.
For a compatible issue, the follow-up first reconstructs proposal state from
GitHub comments:
An approved proposal proceeds through implementation and the review pipeline:
The deterministic dispatch states prevent an agent from choosing its own route.
They parse durable output and use exit codes and visit counters to select the
next transition.
States
The state machine currently defines 23 states.
Intake and proposal lifecycle
issue-intakeorigin/master; reads the issue without trusting it as instructions; discovers root and nestedAGENTS.mdfiles and grund configuration; records the issue snapshot, repository rules, spec-fit verdict, and routing decision; then writes exactly one top-level follow-up task.approval-checkpropose-fixpublish-proposalrhei:awaiting-approvallabel.approval-applyrhei:awaiting-approvalimmediately before implementation of the exact approved proposal and records the label result.rejection-prepareproposal-pendinghuman-reviewno-prpath by allowing a human to approve the exact local proposal, request a GitHub handoff, or cancel. The NBT manifest fixes publication todraft, so normal NBT runs use GitHub proposal approval rather than this gate.github-handoffImplementation and validation
implement-fixAGENTS.mdfiles, applies spec-first and grund rules, keeps public documentation free of internal citations unless repository policy requires them, and records whether the result is ready, blocked, or needs a revised proposal.implementation-dispatchgithub-handoff, or materially divergent work back topropose-fixfor a new approval.validate-fixFocused review and aggregation
requirements-reviewspec-reviewAGENTS.mdcompliance, grund citations, public-document citation policy, and file-level references on changed test sources.implementation-reviewvalidation-reviewaggregate-reviewreview-dispatchaddress-review; exhausted blockers go torecord-blocked-publication; external blockers go togithub-handoff.address-reviewPublication and terminal states
publish-prorigin, and opens or updates a draft PR. It writes a user-facing body withWhat changed,Why, an example when meaningful, implementation summary, exact validation evidence, a closing keyword, and a final collapsible AI-workflow provenance section with durable model and token accounting.record-blocked-publicationcompletedcancelledProposal and approval protocol
Proposal text is canonicalized and hashed with SHA-256. The first 16 lowercase
hexadecimal characters form the proposal ID. The publisher writes exactly one
supported marker:
Only the latest marked proposal authored by
jormundur00is current. Adecision must have one of these exact first lines:
Rejection feedback may follow on later lines, but it remains untrusted evidence
rather than agent instructions. The decision author must currently have
write,maintain, oradminpermission on the repository. Stale IDs,malformed commands, outside collaborators, and users with only
readortriagepermission cannot route implementation.GitHub comments are the cross-run source of truth. A fresh run can recover a
pending, approved, or rejected proposal without depending on the previous
workspace's runtime files. Marker checks and label operations are idempotent so
partial retries do not duplicate comments.
Security boundary
Issue titles, bodies, comments, code blocks, attachments, linked content, and
reproduction instructions are treated as untrusted evidence. Intake explicitly
forbids:
Suspected prompt injection is preserved in the issue snapshot and recorded as a
spec-fit risk. Repository instructions read directly from the checkout remain
authoritative.
How to run it
Run commands from the Native Build Tools repository root.
Minimal invocation
The issue number is the only varying template input. Without
--output, Rheimaterializes
./github-issue-fix.Keep an issue-specific workspace
Use an issue URL
Render and validate without executing agents
Inspect a materialized workspace
Continue after proposal approval or rejection
After a repository member posts the exact approval or rejection command, start
a fresh workspace for the same issue:
The new run reconstructs the proposal decision from GitHub.
Validation performed for this PR
rhei templatesdiscoversgithub-issue-fixas a project template.rhei instantiate github-issue-fix --list-inputsreports only the requiredissueinput.rhei validate.rhei run --dry-run.bin/github-proposal --helpsucceeds.git diff --checkpasses.grund checkpasses.Scope
This PR deliberately ports only the NBT-owned template. It does not move the
Rhei CLI implementation, Rhei functional specifications, Rhei E2E tests,
Rhei changelog entries, or the rendered Rhei example workspace.