Files
OpenShell/.github/workflows/issue-triage.yml
John T. Myers 6ddb6aef83 chore: establish agent-first development ethos across project (#293)
* docs: enhance AGENTS.md as primary agent entrypoint

Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>

* chore: add opencode agent definitions for sub-agent workflows

Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>

* docs: overhaul CONTRIBUTING.md for agent-first workflow

Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>

* docs: reframe README.md with agent-first identity

Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>

* chore: add bug report and feature request issue templates

Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>

* chore: add issue template config with agent-first contact links

Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>

* chore: add pull request template

Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>

* chore: add CODEOWNERS

Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>

* chore: update .claude/ README to document skill symlink and consolidation

Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>

* chore: remove github-rest-api skill

Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>

* feat: add triage-issue skill for community issue assessment

Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>

* refactor: update create-github-issue skill for template conformance

Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>

* refactor: update create-github-pr skill for template conformance

Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>

* refactor: update build-from-issue skill for template conformance and triage awareness

Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>

* ci: add issue triage gate workflow

Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>

* feat: add sync-agent-infra skill to detect and fix infrastructure drift

Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>

---------

Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>
2026-03-13 21:13:24 -07:00

61 lines
2.3 KiB
YAML

name: Issue Triage Gate
on:
issues:
types: [opened]
permissions:
issues: write
jobs:
check-agent-diagnostic:
runs-on: ubuntu-latest
# Only run on bug reports (title starts with "bug:")
if: startsWith(github.event.issue.title, 'bug:')
steps:
- name: Check for agent diagnostic section
uses: actions/github-script@v7
with:
script: |
const body = context.payload.issue.body || '';
// Check if the Agent Diagnostic section has substantive content.
// The template placeholder starts with "Example:" — if that's still
// there or the section is empty, the reporter didn't fill it in.
const diagnosticMatch = body.match(
/## Agent Diagnostic\s*\n([\s\S]*?)(?=\n## |\n$)/
);
const hasSubstantiveDiagnostic = diagnosticMatch
&& diagnosticMatch[1].trim().length > 0
&& !diagnosticMatch[1].trim().startsWith('Example:');
if (hasSubstantiveDiagnostic) {
console.log('Agent diagnostic section found with content. Passing.');
return;
}
console.log('Agent diagnostic section missing or placeholder. Flagging.');
// Add needs-agent-triage label
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: ['needs-agent-triage']
});
// Post redirect comment
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: [
'This issue appears to have been opened without an agent investigation.',
'',
'OpenShell is an agent-first project — please point your coding agent at the repo and have it diagnose this before we triage. Your agent can load skills like `debug-openshell-cluster`, `openshell-cli`, and `generate-sandbox-policy`.',
'',
'See [CONTRIBUTING.md](https://github.com/NVIDIA/OpenShell/blob/main/CONTRIBUTING.md#before-you-open-an-issue) for the full workflow.',
].join('\n')
});