# address-findings: fix branch-selector gap and auth message

`1009bab`→[main](/content/gh/entireio/skills/commits/main/index.html)·

computermode·2w ago·1 file·+18 added/-16 removed

Address Cursor Bugbot review findings on PR #32:

- Branch input never mapped to a trail number: the skill told agents to pass a
  bare branch through unchanged but then used <number> everywhere. Since
  `entire trail` accepts a number, id, or branch interchangeably as the
  selector, switch the workflow to a single <trail> selector (and match by
  number OR branch in the branch guard) instead of requiring a number lookup.
- Auth message omitted the gated command: name `entire trail finding list` in
  both the step 3 and failure-mode auth messages.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

## Changes

1

- skills/address-findings

- MSKILL.md+18/-16

```"
53 unmodified lines

54
55
56
57
57
58
59
60
61
60
61
62
63
64
64
65
66
67
68
69
70
69
71
72
73
74
73
75
76
77
78
79
80
81
80
82
83
84
85
2 unmodified lines

88
89
90
89
91
92
93
92
94
95
96
95
96
97
98
99
100
101
100
102
103
104
105
2 unmodified lines

108
109
110
109
111
112
113
114
115
116
115
117
118
119
120
2 unmodified lines

123
124
125
124
126
127
128
129
14 unmodified lines

144
145
146
145
147
148
149
150

53 unmodified lines

"The Entire CLI is required but not installed. Install it from
https://entire.io/docs/cli and try again."

### 2. Resolve the trail
### 2. Resolve the trail selector

- If the argument is a trail URL, take the number from the `/trails/<number>/`
  path segment.
- If it is a bare number or branch name, use it as-is.
  path segment and use that number.
- If it is a bare trail number, id, or branch name, use it as-is.
- If you cannot determine a trail, stop and ask the user for the trail URL or number.

Use the trail **number** for every command below.
Use this value as the `<trail>` selector for every command below. `entire trail`
accepts a trail number, id, or branch name interchangeably, so no number lookup
is needed — a branch name works directly.

### 3. Fetch open findings

```bash
entire trail finding list <number> --json --status open
entire trail finding list <trail> --json --status open
```

- If the output reports that authentication is required, stop and tell the user:
  "Run `entire login` and try again."
  "`entire trail finding list` requires authentication. Run `entire login` and try again."
- If the `trail finding` subcommand is unavailable, or the API reports the
  feature is not enabled, stop and tell the user that trail findings may not be
  enabled for this account or repository. Do not invent findings.
- Parse the JSON. Each finding has an id, a severity, a status, a body, a
  location (file path + line range), and may include a suggested change (a
  unified diff).
- If there are no open findings, report "No open findings on trail <number>." and stop.
- If there are no open findings, report "No open findings on this trail." and stop.

### 4. Branch guard (you must be on the trail's branch)

2 unmodified lines

```bash
git rev-parse --abbrev-ref HEAD                # current branch
entire trail list --json --status any -n 200   # locate the trail's branch by number
entire trail list --json --status any -n 200   # locate the trail's branch
```

Find the trail whose `number` matches and read its `branch`.
Find the trail whose `number` or `branch` matches your selector and read its `branch`.

- If the trail's branch differs from the current branch, stop and tell the user:
  "Trail #<number> targets branch `<trail-branch>`, but you are on
  `<current-branch>`. Check it out first (`entire trail checkout <number>`) and
  "Trail `<trail>` targets branch `<trail-branch>`, but you are on
  `<current-branch>`. Check it out first (`entire trail checkout <trail>`) and
  re-run." Do not edit files.
- If you cannot find the trail in the list (e.g. pagination), do not hard-fail:
  warn that you could not verify the branch, and ask the user to confirm they are
  on trail #<number>'s branch before you continue.
  on the trail's branch before you continue.

### 5. Address each finding

2 unmodified lines

1. **If it has a suggested unified-diff change**, dry-run it first:

```bash
   entire trail finding apply <number> <finding-id> --check
   entire trail finding apply <trail> <finding-id> --check
   ```

If it applies cleanly, apply and resolve in one step:

```bash
   entire trail finding apply <number> <finding-id> --resolve
   entire trail finding apply <trail> <finding-id> --resolve
   ```

2. **Otherwise** (no patch, the patch conflicts, or the fix needs reasoning):
2 unmodified lines

touched code (a build or a focused test), run it. Then resolve:

```bash
   entire trail finding resolve <number> <finding-id> -m "<one line: what you changed>"
   entire trail finding resolve <trail> <finding-id> -m "<one line: what you changed>"
   ```

3. **If you cannot confidently address it** (ambiguous, needs a product/design
14 unmodified lines

## Failure modes

- **CLI not installed** → install message (step 1).
- **Not authenticated** → "Run `entire login` and try again."
- **Not authenticated** → "`entire trail finding list` requires authentication. Run `entire login` and try again."
- **Trail findings not enabled / API error** → tell the user the feature may be
  unavailable; do not fabricate findings.
- **Trail not found** → tell the user to check the URL or number; suggest
