Files
holocron/plugins/gitea/.apm/skills/gitea-workflow/references/number-resolution.md
Defame1297 bedbd1d872 refactor(gitea-workflow): retrofit to the ADR-0020 context contract
Description 1012 -> 347 chars, body 582 -> 170 words, Gotchas 3 entries -> 1 at
22.9% of body. Clears the description FAIL and all four Vale CompositionNote
errors -- the last carriers in the corpus, so that rule now fires nowhere.

Cut the 'human-facing entry point and router' architecture note, the /gitea
migration history and the six-skill composition list; all were already in the
README or the routing table.

Split three mutually exclusive flows into a dispatch table keyed on invocation
shape, each branch self-contained in references/: status-checkin.md,
number-resolution.md, skill-index.md. Report stays in the body as the gate
common to every branch; each branch's own format moved to its file. The old
Step 1-4 numbering presented three alternatives as a sequence.

The description grew from an intermediate 283 chars on purpose: that draft had
dropped flow 3's trigger entirely, leaving the domain-routing index -- a third
of the skill -- reachable only through a tail clause whose grammatical subject
was the request rather than the skill. Both gates were green over that.

Boundary clauses are one arrow per target, so both resolve (#107: the resolver
extracts only the first target per clause and reports 1 of 1 on a clause naming
two). The local-git exclusion keeps its wording but drops the route to
git-workflow, which would not resolve in a gitea-only install.

Known residual: the dispatch conditions are stated twice, as a table and as
literal conditionals. That is #109 -- body-discipline.md mandates the literal
form while the ADR's cited exemplar, apm-workflow, uses a bare table plus one
summary line. Fixing it here would settle that contradiction in a skill rather
than in the spec, so it rides with #109.

Refs #99, #107, #109
2026-08-30 12:42:04 +00:00

1.3 KiB

topic, source_keys
topic source_keys
number-resolution
gitea-mcp-repo
gitea-mcp-slim-go
context7-websites-gitea

Resolving a bare issue-or-PR number

The user has referenced a bare number without saying "issue" or "PR" (e.g. "what's going on with #42"). Resolve it with a real call — never dispatch to gitea-issues or gitea-prs by guessing from phrasing alone, because "that sounds like a bug" is not evidence and the two domains share one number space.

  1. Invoke gitea-issues to run issue_read method: "get" on that number.
  2. Check the response's is_pull field:
    • true → it's a PR. Invoke gitea-prs for full PR detail (status, diff, reviews as appropriate to the request) and present that instead.
    • false or absent → it's an issue. Present the issue detail already retrieved.
  3. If the resolution call 404s, don't conclude the number doesn't exist. Gitea hides permission errors as not-found (documented in gitea-issues' Gotchas), so report the 404 and suggest verifying the token carries write:issue rather than reporting "no such issue or PR."

Then report per SKILL.md's Report section, saying which domain the number turned out to be before showing detail ("That's a pull request:" / "That's an issue:") — otherwise the user cannot tell the resolution happened.