Commit beb6da8
authored
* fix(next-task): task-discoverer skips issues with open PRs (#236)
Add Phase 2.5 to the discover-tasks skill that fetches open PRs via
`gh pr list` and builds a Set of linked issue numbers. Issues are
matched by three patterns: branch name suffix (-NNN), PR body closing
keywords (closes/fixes/resolves #N), and PR title (#N) convention.
Matched issues are excluded in Phase 3 with an [INFO] log message.
Non-GitHub sources skip this phase entirely (empty Set).
Updated task-discoverer agent role list, CHANGELOG, and regenerated
OpenCode adapters.
Fixes #236
* fix(next-task): harden PR-exclusion logic in discover-tasks skill
- Add default prLinkedIssues = new Set() before GitHub-only block (fixes
ReferenceError for non-GitHub sources)
- Wrap JSON.parse in try/catch with [WARN] fallback
- Add null guards on pr.headRefName and pr.title
- Expand closing-keyword regex to cover GitHub's full keyword set
(close, closed, closes, fix, fixed, fixes, resolve, resolved, resolves)
with word-boundary anchor to prevent false positives
- Switch title pattern to matchAll() to capture multiple (#N) references
- Add filterByPriority(filtered, ...) call to wire variable pipeline
- Replace em dashes with plain ASCII hyphens per project style guide
- Document 100-PR limit in bash comment
- Update agent Execution bullets to list PR-exclusion logic
* docs: add PR-exclusion step to task-discoverer reference
* enhance(next-task): apply /enhance findings to task-discoverer agent and skill
Agent (task-discoverer.md):
- Fix frontmatter description: remove behavioral instruction, describe invocation context
- Add role identity sentence ("You discover, filter, score...")
- Add Output Format section (mirrors skill output)
- Add Error Handling section
- Move Constraints to end of file (after Integration Points)
- Add "Exclude issues with open PRs" to Constraints
- Strengthen "Do not" to "NEVER bypass the skill"
Skill (discover-tasks/SKILL.md):
- Add allowed-tools to frontmatter for explicit tool permissions
- Expand trigger phrases (add "what should I work on", "list open issues")
- Add "When to Use" section
- Fix stale directory reference in Phase 1 comment
- Add conditional guard to Phase 6 for non-GitHub sources
- Add PR pagination limit to Constraints section
* fix: address PR review comments (Codex + Gemini)
- Add note about branch-suffix heuristic false positives (release-2026 pattern)
- Fix task.score not assigned before sort - use map+score then sort
- Fix Phase 6 source guard: remove undefined $SOURCE var, use clear prose note
with policy.taskSource reference instead of broken shell conditional
* fix: address Copilot review feedback
- Add Bash(grep:*) to allowed-tools (local tasks.md phase uses grep via bash)
- Add const fs = require('fs') to Phase 2.5 JS block (was missing import)
- Add explicit policy.taskSource comment to Phase 2.5 bash block
to clarify GitHub-only condition (replaces ambiguous prose-only guard)
1 parent 84ff690 commit beb6da8
File tree
7 files changed
+182
-38
lines changed- adapters/opencode
- agents
- skills
- debate
- discover-tasks
- docs/reference
- plugins/next-task
- agents
- skills/discover-tasks
7 files changed
+182
-38
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| 24 | + | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
| |||
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
| |||
57 | 61 | | |
58 | 62 | | |
59 | 63 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | 64 | | |
69 | 65 | | |
70 | 66 | | |
| |||
77 | 73 | | |
78 | 74 | | |
79 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | | - | |
| 264 | + | |
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
11 | 16 | | |
12 | 17 | | |
13 | 18 | | |
| |||
46 | 51 | | |
47 | 52 | | |
48 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
49 | 68 | | |
50 | 69 | | |
51 | 70 | | |
52 | 71 | | |
53 | 72 | | |
54 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
55 | 77 | | |
56 | 78 | | |
57 | 79 | | |
| |||
71 | 93 | | |
72 | 94 | | |
73 | 95 | | |
| 96 | + | |
| 97 | + | |
74 | 98 | | |
| 99 | + | |
75 | 100 | | |
76 | 101 | | |
77 | 102 | | |
| |||
99 | 124 | | |
100 | 125 | | |
101 | 126 | | |
| 127 | + | |
| 128 | + | |
102 | 129 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
| 63 | + | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
| |||
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
45 | 49 | | |
46 | 50 | | |
47 | 51 | | |
| |||
67 | 71 | | |
68 | 72 | | |
69 | 73 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | 74 | | |
79 | 75 | | |
80 | 76 | | |
| |||
87 | 83 | | |
88 | 84 | | |
89 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
0 commit comments