@@ -116,15 +116,35 @@ of \`main\` for that work, never the tag-pinned diagnosis clone.
116116
117117- Match the structure of the \`via-triage\` issue template
118118 (\`.github/ISSUE_TEMPLATE/via-triage.yml\` in the repo): what happened, diagnosis,
119- repro steps, environment, evidence, related issues.
120- - Label it \`via-triage\` . Use a plain, specific title with no prefix.
119+ repro steps, version, environment, evidence, related issues, workaround, and
120+ agent/model attribution . Use a plain, specific title with no prefix.
121121- Show the user the complete final issue text and get an explicit yes before
122122 posting. Never post without it.
123- - Note at the end of the issue which model and agent produced it.
124- - If \`gh\` is not authenticated, offer \`gh auth login\`, or build a prefilled
125- https://github.com/pingdotgg/t3code/issues/new URL with title and body query
126- parameters; print the URL, and open it in their browser only after they
127- approve.
123+ - Before filing through \`gh\`, check the authenticated account's label permission:
124+
125+ gh api repos/pingdotgg/t3code --jq '.permissions.triage or .permissions.push or .permissions.admin'
126+
127+ Only if this returns \`true\`, use \`gh issue create --repo pingdotgg/t3code\`
128+ with \`--label via-triage\`, a title, and the approved report via \`--body-file\`.
129+ Confirm the created issue has the label. If creation reports an error, check
130+ whether it created an issue before retrying. If an issue exists without the
131+ label, report that to the user; do not create a duplicate.
132+
133+ - If \`gh\` is missing, unauthenticated, the permission check fails, or label
134+ permission is absent, use the issue form, which applies \`via-triage\` for the
135+ user. Select it with this URL:
136+
137+ https://github.com/pingdotgg/t3code/issues/new?template=via-triage.yml
138+
139+ Prefill \`title\` and the individual form fields using URL-encoded values:
140+ \`what-happened\`, \`diagnosis\`, \`steps\`, \`version\`, \`environment\`, \`evidence\`,
141+ \`related\`, \`workaround\`, and \`agent\`. Do not use \`body\` or \`labels\` query
142+ parameters. Print the URL and open it in their browser only after they
143+ approve; the user reviews and submits the form. If the URL is too long to
144+ open reliably, provide the bare form URL and the approved report with each
145+ field clearly separated for pasting. If authentication is the only obstacle
146+ to direct filing, you may also offer \`gh auth login\`.
147+
128148- If the user pasted screenshots, remind them to drag the images into the issue
129149 after it is created; they cannot be attached from here.
130150
0 commit comments