Skip to content
Closed
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
56 changes: 56 additions & 0 deletions internal/scaffold/fullsend-repo/skills/retro-analysis/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,62 @@ Use multiple searches with different keyword combinations if the first returns n

When skipping, note the duplicate in your `summary` field so the human understands what was filtered and why.

**Evidence cap for tracked patterns**

This check runs after the general duplicate check above and applies an
additional cap specifically to evidence-type proposals that survive
duplicate filtering.

When a candidate proposal provides additional evidence for a parent issue
that is already tracked (i.e., the proposal would be filed as
"Evidence for #N: ..." referencing an existing open issue), check how many
open evidence issues already exist for that parent before proposing.

Evidence proposals **must** use the title prefix `Evidence for #N: `
(where N is the parent issue number). This convention is required so the
count query below can reliably identify evidence issues.

Dispatch a subagent to query the count:

> "Count the open issues in `<target_repo>` whose title starts with
> 'Evidence for #N:' where N is `<parent_number>`. Return the count."

The subagent should run:

```bash
gh api \
"search/issues?q=repo:<target_repo>+is:issue+is:open+in:title+\"Evidence+for+%23<parent_number>:\"" \
--jq '.total_count'
```

Note: the query uses `in:title` and includes the trailing colon to
reduce false positives from unrelated issues that mention "Evidence
for #N" in passing.

If the count query fails or returns an error (e.g., rate limiting,
network error, auth failure), **fail open** — proceed with the proposal
as if the cap were not reached. Note the query failure in the `summary`
field so the human is aware the cap could not be evaluated.

**If the count is >= 5, skip the evidence proposal entirely.** The
pattern is already well-documented — additional evidence provides
diminishing returns and creates tracking overhead without adding new
information.

Instead of filing the proposal:

1. Do not include it in the `proposals` array.
2. In the `summary` field, note that the pattern is already
well-documented. Mention the parent issue number and the current
PR or issue as an additional data point. For example: "Pattern
tracked by #N already has sufficient evidence (M open data-point
issues). This PR/issue provides another data point but no new
issue was filed."

This cap applies only to evidence issues for already-tracked parent
issues. Proposals for genuinely new patterns or distinct improvements
are not subject to this limit.

## Localization guidance

When deciding where a proposed change belongs:
Expand Down
Loading