Skip to content

Add review-pr skills and light mode palette - #53

Open
bholmesdev wants to merge 2 commits into
mainfrom
ben/add-review-pr-skills-and-light-palette
Open

bholmesdev wants to merge 2 commits into
mainfrom
ben/add-review-pr-skills-and-light-palette

Conversation

@bholmesdev

Copy link
Copy Markdown
Owner

Summary

  • Port review-pr and improve-review-pr skills (with scripts) from cloud-factory-demo
  • Add the matching GitHub Actions workflows: review-pull-requests.yml and improve-review-pr.yml
  • Introduce a semantic light/dark color palette and wire the base layout to bg-surface / text-text tokens so light mode works via OS preference or data-theme=\"light\"

Setup required for workflows

  • Set repository secret WARP_API_KEY
  • Optional: set repository variable WARP_AGENT_PROFILE
  • For auto-approve reviews: enable “Allow GitHub Actions to create and approve pull requests”
  • For the daily improve loop: allow GitHub Actions to create pull requests

Test plan

  • Confirm .agents/skills/review-pr and .agents/skills/improve-review-pr are present with scripts
  • Open this PR and verify Review Pull Requests workflow can run once WARP_API_KEY is set
  • Manually dispatch Improve Review PR Skill (or run the skill locally) after some review feedback exists
  • Load the site in light OS appearance (or set document.documentElement.dataset.theme = 'light') and confirm page background/text/footer use the light palette
  • Confirm dark mode still looks correct with default preference / data-theme=\"dark\"

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>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 15, 2026 •

Copy link
Copy Markdown

Deploying bholmesdev with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4f1f6db
Status:🚫  Build failed.

View logs

@netlify

netlify Bot commented Jul 15, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for bholmes ready!

Name Link
🔨 Latest commit 4f1f6db
🔍 Latest deploy log https://app.netlify.com/projects/bholmes/deploys/6a6229c91045f70007952443
😎 Deploy Preview https://deploy-preview-53--bholmes.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment on lines +91 to +94
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])

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 [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).

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed: removed dead code (lines 91-94 that built but never passed it to ).

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [IMPORTANT] Long text with no matching keywords falls back to "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.

Suggested change
return "refined"
return "ambiguous"

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed: changed long-text fallback from "refined" to "ambiguous".

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 [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.

Suggested change
or Path(__file__).resolve().parents[4]
or Path(__file__).resolve().parents[4] # depth: .agents/skills/review-pr/scripts/ -> repo root

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed: added comment explaining the parents[4] depth assumption.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant