Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions internal/scaffold/fullsend-repo/agents/triage.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,29 @@ When you identify a question, attempt to answer it using the repository context
}
```

### Action: `not-planned`

The issue is out-of-scope, invalid, spam, or should otherwise not be worked on. This action closes the issue with reason `not planned`.

Use this action for:
- Issues explicitly out of project scope (e.g., feature requests incompatible with project goals)
- Invalid reports (e.g., user error, misconfiguration, or misunderstanding)
- Spam or low-quality submissions
- Issues that would introduce technical direction counter to documented architectural decisions

**Do NOT use this action for:**
- Issues that lack information (use `insufficient` instead)
- Issues that are duplicates of existing ones (use `duplicate` instead)
- Issues blocked on other work (use `prerequisites` instead)

```json
{
"action": "not-planned",
"reasoning": "Brief explanation of why this issue is being closed as not planned",
"comment": "A professional comment explaining why the issue is out of scope or invalid. Be respectful — the reporter may not have understood project boundaries. Link to relevant documentation or related discussions when applicable."
}
```

### Action: `insufficient`

Information is missing that would change the triage outcome. Ask ONE focused, specific clarifying question.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"properties": {
"action": {
"type": "string",
"enum": ["insufficient", "duplicate", "sufficient", "prerequisites", "question"]
"enum": ["insufficient", "duplicate", "sufficient", "prerequisites", "question", "not-planned"]
},
"reasoning": {
"type": "string",
Expand Down
25 changes: 25 additions & 0 deletions internal/scaffold/fullsend-repo/scripts/post-triage-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,31 @@ run_test "question-missing-comment-fails" \
"" \
"true"

run_test "not-planned-posts-comment" \
'{"action":"not-planned","reasoning":"out of scope","comment":"This request is out of scope for the project goals. See docs/scope.md for more details."}' \
"gh issue comment 42 --repo test-org/test-repo --body-file -"

run_test "not-planned-applies-label" \
'{"action":"not-planned","reasoning":"out of scope","comment":"This request is out of scope for the project goals."}' \
"gh api repos/test-org/test-repo/issues/42/labels -f labels[]=not-planned --silent"

run_test "not-planned-removes-blocked-label" \
'{"action":"not-planned","reasoning":"out of scope","comment":"This request is out of scope."}' \
"gh api repos/test-org/test-repo/issues/42/labels/blocked -X DELETE --silent"

run_test "not-planned-removes-needs-info-label" \
'{"action":"not-planned","reasoning":"out of scope","comment":"This request is out of scope."}' \
"gh api repos/test-org/test-repo/issues/42/labels/needs-info -X DELETE --silent"

run_test "not-planned-closes-issue" \
'{"action":"not-planned","reasoning":"out of scope","comment":"This request is out of scope for the project goals."}' \
"gh issue close 42 --repo test-org/test-repo --reason not planned"

run_test "not-planned-missing-comment-fails" \
'{"action":"not-planned","reasoning":"out of scope"}' \
"" \
"true"

run_test_stdout "question-control-label-refused" \
'{"action":"question","reasoning":"issue is asking a question","comment":"Answer here.","label_actions":{"reason":"Tried to set question label.","actions":[{"action":"add","label":"question"}]}}' \
"::warning::Refused to add control label 'question' -- control labels are managed by the triage pipeline"
Expand Down
15 changes: 14 additions & 1 deletion internal/scaffold/fullsend-repo/scripts/post-triage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,15 @@ ${FAILED_CREATES}"
add_label "question"
;;

not-planned)
if [[ -z "${COMMENT}" ]]; then
echo "ERROR: action is 'not-planned' but no comment provided" >&2
exit 1
fi
remove_label "blocked"
remove_label "needs-info"
;;

*)
echo "ERROR: unknown action '${ACTION}' — this may be a newer action that post-triage.sh does not handle yet" >&2
exit 1
Expand Down Expand Up @@ -384,10 +393,14 @@ else
printf '%s' "${COMMENT}" | gh issue comment "${ISSUE_NUMBER}" --repo "${REPO}" --body-file -
fi

# --- Post-action: close duplicate issues ---
# --- Post-action: close issues ---

if [[ "${ACTION}" == "duplicate" ]]; then
gh issue close "${ISSUE_NUMBER}" --repo "${REPO}" --reason "duplicate"
fi

if [[ "${ACTION}" == "not-planned" ]]; then
gh issue close "${ISSUE_NUMBER}" --repo "${REPO}" --reason "not planned"
fi

echo "Post-triage complete."
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ run_test "valid-question" \
'{"action":"question","reasoning":"this is a support question","comment":"Based on the docs, Python 4 is not supported. Would you like to open a feature request?"}' \
"true"

run_test "valid-not-planned" \
'{"action":"not-planned","reasoning":"out of scope","comment":"This is out of scope."}' \
"true"

run_test "valid-prerequisites-existing" \
'{"action":"prerequisites","reasoning":"upstream dependency","prerequisites":{"existing":[{"url":"https://github.com/org/repo/issues/99"}],"create":[]},"comment":"Blocked on upstream."}' \
"true"
Expand Down
Loading