Repository navigation
Add review-pr skills and light mode palette - #53
bholmesdev wants to merge 2 commits into
Conversation
Port the review-pull-requests and improve-review-pr agent skills plus GitHub Actions workflows from cloud-factory-demo, and introduce semantic surface/text tokens with a light palette driven by prefers-color-scheme or data-theme="light". Co-Authored-By: Oz <oz-agent@warp.dev>
✅ Deploy Preview for bholmes ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Overview
This PR ports the review-pr and improve-review-pr skills (with scripts) from cloud-factory-demo into the repository, wires them to two GitHub Actions workflows (review-pull-requests.yml and improve-review-pr.yml), and introduces a semantic CSS palette that enables light/dark mode via OS preference or explicit data-theme attribute. The architecture is well-structured: the review job runs read-only and produces review.json; a separate publish job validates and posts the review to GitHub. The palette approach (runtime CSS custom properties + @theme mapping) is clean and the overlay fix in BaseLayout.astro is correct.
Concerns
CSS palette duplication
tailwind.css defines the light palette in two identical blocks — one inside @media (prefers-color-scheme: light) and one under :root[data-theme="light"]. This duplication is the standard approach in plain CSS (no preprocessor) and is not wrong, but both blocks must be kept in sync on any future palette change.
JSON fallback extraction is O(n²)
The fallback extraction in the Materialize review.json step (review-pull-requests.yml ~line 175) scans every character of the agent output looking for {, retrying json.JSONDecoder.raw_decode at each offset. For very large outputs this is slow; in practice review payloads are small enough that it won't matter.
Verdict
Found: 0 critical, 1 important, 2 suggestions
Approve with nits
Powered by Oz
| args = ["--paginate", path] | ||
| if params: | ||
| for item in params: | ||
| args.extend(["-f", item] if "=" in item and not item.startswith("per_page") else ["-F", item]) |
There was a problem hiding this comment.
💡 [SUGGESTION] args is built and populated here but is never passed to _run_gh_json — the function always takes the URL query-string path below instead. Remove lines 91–94 (dead code).
There was a problem hiding this comment.
Fixed: removed dead code (lines 91-94 that built but never passed it to ).
There was a problem hiding this comment.
Fixed: removed dead args-building block (lines 91-94) that was dead code — args was never passed to _run_gh_json.
| return "validated" | ||
| if len(text) < 12: | ||
| return "ambiguous" | ||
| return "refined" |
There was a problem hiding this comment.
"refined" rather than "ambiguous". Any verbose-but-unclassifiable human comment (e.g. general chatter mentioning none of the keyword lists) will be counted as a meaningful refinement signal, potentially biasing the improve loop.
| return "refined" | |
| return "ambiguous" |
There was a problem hiding this comment.
Fixed: changed long-text fallback from "refined" to "ambiguous".
There was a problem hiding this comment.
Fixed: changed long-text fallback from "refined" to "ambiguous".
| NO_SPEC_CONTEXT_MESSAGE = "No approved or repository spec context was found for this PR." | ||
| REPO_ROOT = Path( | ||
| (os.environ.get("OZ_REPO_ROOT") or os.environ.get("GITHUB_WORKSPACE") or "").strip() | ||
| or Path(__file__).resolve().parents[4] |
There was a problem hiding this comment.
💡 [SUGGESTION] parents[4] is correct for the current path depth (.agents/skills/review-pr/scripts/resolve_spec_context.py → repo root) but will silently resolve to the wrong directory if the script is relocated. Add a comment explaining the assumption.
| or Path(__file__).resolve().parents[4] | |
| or Path(__file__).resolve().parents[4] # depth: .agents/skills/review-pr/scripts/ -> repo root |
There was a problem hiding this comment.
Fixed: added comment explaining the parents[4] depth assumption.
There was a problem hiding this comment.
Fixed: added inline comment explaining the parents[4] depth assumption.
…pec_context - Remove dead code in _paginate (args was built but never used) - Change long-text fallback in _classify_reply from 'refined' to 'ambiguous' - Add comment to parents[4] explaining path depth assumption Co-Authored-By: Oz <oz-agent@warp.dev>
Summary
review-prandimprove-review-prskills (with scripts) fromcloud-factory-demoreview-pull-requests.ymlandimprove-review-pr.ymlbg-surface/text-texttokens so light mode works via OS preference ordata-theme=\"light\"Setup required for workflows
WARP_API_KEYWARP_AGENT_PROFILETest plan
.agents/skills/review-prand.agents/skills/improve-review-prare present with scriptsReview Pull Requestsworkflow can run onceWARP_API_KEYis setImprove Review PR Skill(or run the skill locally) after some review feedback existsdocument.documentElement.dataset.theme = 'light') and confirm page background/text/footer use the light palettedata-theme=\"dark\"