com um clique
upstream-pr-milestone
// Review Zotero upstream watch PRs, synchronize the Zotero watchlist from PR diffs, regenerate upstream reports/contracts, and prepare draft milestones without modifying product code.
// Review Zotero upstream watch PRs, synchronize the Zotero watchlist from PR diffs, regenerate upstream reports/contracts, and prepare draft milestones without modifying product code.
| name | upstream-pr-milestone |
| description | Review Zotero upstream watch PRs, synchronize the Zotero watchlist from PR diffs, regenerate upstream reports/contracts, and prepare draft milestones without modifying product code. |
You triage Zotero upstream watch PRs for Zoplicate. Your job is to keep the upstream watch metadata accurate and to prepare milestone drafts that /milestone-tdd can execute later.
This skill may write workflow metadata only:
.workflow/upstream/zotero_watch_targets.json.workflow/upstream/zotero_upstream_contract.json.workflow/upstream/zotero_upstream_report.md.workflow/milestones/M*.json.workflow/milestone_index.json.workflow/project_snapshot.jsonDo not modify product logic in src/, addon/, or typings/. If product code needs a fix, report the generated milestone and hand it to /milestone-tdd milestone=M###.
Parse arguments from $ARGUMENTS.
| Argument | Required | Default |
|---|---|---|
pr | No | local |
mode | No | review |
Examples:
/upstream-pr-milestone pr=42 mode=review
/upstream-pr-milestone pr=https://github.com/<owner>/<repo>/pull/42 mode=sync-watchlist
/upstream-pr-milestone pr=local mode=regenerate
Modes:
review: read-only review of PR diff, watchlist, upstream report, contract, and draft milestone.sync-watchlist: update zotero_watch_targets.json from PR diff, then regenerate contract/report/milestone.regenerate: regenerate contract/report/milestone from the current watchlist.Read these first:
CLAUDE.md.workflow/upstream/zotero_watch_targets.json.workflow/upstream/zotero_upstream_contract.json if present.workflow/upstream/zotero_upstream_report.md if present.workflow/milestone_index.json.workflow/milestones/M*.json that has upstream_watch, if presentFor pr=local, use the current working tree:
git diff -- . ':!.references' > /tmp/zoplicate-upstream-pr.diff
For pr=<number|url>, use GitHub CLI:
gh pr view "$PR" --json number,title,body,labels,url,headRefName,baseRefName,files
gh pr diff "$PR" --patch > /tmp/zoplicate-upstream-pr.diff
If gh is unavailable, stop and ask for a local diff or a checked-out PR branch.
Do not write files.
Check the PR against these rules:
src/, addon/, or typings/ must be called out as out of scope for this skill.zotero_watch_targets.json is the only source of monitored upstream paths and anchors. The workflow YAML and script must not hardcode a second watchlist.upstream_watch should reference the report, contract, and watchlist paths.needs_manual_mapping: true) must appear in report or milestone acceptance.Also inspect the diff for local Zotero-facing dependency changes:
Zotero.* private API calls.ChromeUtils.importESModule("chrome://zotero/...").If those changes are present but the watchlist was not updated, report that mode=sync-watchlist is required.
Return a concise review with:
Verdict: approve, needs-sync-watchlist, needs-regenerate, or blocked.Findings: concrete file/path references.Commands Checked: commands actually run.Next Step: either /upstream-pr-milestone ... mode=sync-watchlist, /upstream-pr-milestone ... mode=regenerate, or /milestone-tdd milestone=M###./tmp/zoplicate-upstream-pr.diff.uv run python scripts/ci/check_zotero_upstream.py --sync-watch-targets-from-pr-diff /tmp/zoplicate-upstream-pr.diff --update
uv run python scripts/ci/check_stop.py
Automatic watchlist behavior:
local_dependency_paths without changing the upstream anchor.risk_level: "medium" and needs_manual_mapping: true unless the upstream anchor can be mapped reliably.needs_manual_mapping: true and require manual confirmation in the report or milestone acceptance.Run:
uv run python scripts/ci/check_zotero_upstream.py --update
uv run python scripts/ci/check_stop.py
Then review the generated report and milestone. If product code changes are required, do not implement them here; identify the milestone ID for /milestone-tdd.
zotero_watch_targets.json.needs_manual_mapping: true.