尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证RE:GOV — Reimagine Government. Autonomous AI agent that transforms legacy PH government websites into modern, accessible, citizen-first sites (Muse Spark + SAM 3.1 + Muse Image, BetterGov Kapwa). Meta Global AI Developer Hackathon 2026.
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗Public websites deserve a second life. An autonomous AI agent that transforms legacy government websites into modern, accessible, citizen-first digital experiences. Live at regov.app.
Paste the URL of an old Philippine government WordPress site. The agent crawls it, uses SAM 3.1 and Muse Spark 1.3 (Meta Model API) to understand every page, rebuilds the site on the BetterGov.ph Kapwa design system with all content migrated, and hands back a migration report: what moved, what was image-only, what needs a human, which accessibility problems were fixed.
Built solo for the Meta Global AI Developer Hackathon 2026 (Indie track).
Build your own: the design system behind every reimagined site is open source. See it at regov.app/design-system and use it with AI tools by following docs/design-system.md, or jump to Build your own.
Every site RE:GOV produces is an unofficial, AI-generated concept for demonstration. The output is not operated by, endorsed by, or affiliated with the agency whose public website it was built from, or with any government body. Content is migrated automatically and may be incomplete or out of date. Previews are marked unofficial in the top bar, the footer and the page metadata, and are excluded from search indexing. Use the agency's official website for services and official information.
Thousands of .gov.ph and .edu.ph sites run on abandoned WordPress installs from the
2010s Government Web Template era. I migrated one by hand (UP Manila RGAO, WordPress →
Payload). It took weeks. This does the first 80% in minutes, on the design standard the
BetterGov.ph volunteers already defined for the whole government.
URL ─▶ crawl.ts ─▶ segment.ts ─▶ understand.ts ─▶ plan.ts ─▶ band.ts ─▶ site.json ─▶ Next.js + Kapwa
Playwright SAM 3.1 Muse Spark 1.3 Muse Spark 1.3 live preview
+ WP REST logo/seal vision + strict information + migration
cut-out JSON per page architecture report
| Step | Meta tool | What it does |
|---|---|---|
| Crawl | — | Polite same-origin crawl (robots.txt, 1 req/s). Full-page screenshots, HTML, visible text, link graph, WordPress REST when exposed. |
| Segment | SAM 3.1 | Noun-phrase prompts on the homepage screenshot. Finds the agency seal, cuts it out with the mask as alpha, reuses it as the new brand mark. |
| Understand | Muse Spark 1.3 | Screenshot + text → strict-schema PageModel: typed content blocks (people, steps, FAQ, tables, timelines, contact…), accessibility issues, migration notes. Image-only content is transcribed. |
| Plan | Muse Spark 1.3 | All page models → citizen-first SitePlan: nav, popular services, homepage sections, footer, redirects. |
| Identity band | Muse Image | Muse Spark writes an art brief from the site plan; Muse Image paints a wide header illustration in the Kapwa palette, unique to each agency or LGU. |
| Render | — | Next.js renders site.json live on Kapwa tokens and styles. No per-job build. |
| Report | — | Coverage, SAM overlay, accessibility findings, "needs a human" list, page-by-page mapping. |
After the rebuild:
src/pipeline/scores.ts, backfill with scripts/score.ts).src/pipeline/translate.ts).src/pipeline/ask.ts)./edit/<job> to correct names, positions, numbers and fees, and ticks each page once it matches the original. The agent's version is kept and can be restored (src/components/SiteEditor.tsx).site.json, an old-to-new redirect map and a README for the agency (src/lib/exportSite.ts). "Content as Markdown" gives one Markdown file per page with front matter, for any static site generator or CMS (src/lib/exportMarkdown.ts).site.json, published as versioned JSON Schema at regov.app/schema/site-model.v1.json (docs/site-model.md).Sites behind bot protection (Cloudflare challenges) fall back to the Wayback Machine: the crawler picks the archive month with the most real pages and rebuilds from that. Dead sites get a second life literally.
Every model response is cached on disk under jobs/<id>/models, so reruns are free and deterministic. MODEL_CACHE=replay rebuilds a saved job from those answers only. Model names and the provider are configurable (docs/models.md).
Without a model key, using the fictional sample site:
npm install
npx playwright install chromium
cp .env.example .env
npm run sample # installs Bayan ng Halimbawa as job "sample"
npm run dev # http://localhost:3000/preview/sample and /report/sample
With a key, on a real site:
# add MODEL_API_KEY from dev.meta.ai to .env
npx tsx --env-file=.env scripts/smoke.ts # proves Spark text, Spark vision+JSON, SAM 3.1 work
# one shot: crawl + build
node --env-file=.env node_modules/tsx/dist/cli.mjs scripts/pipeline.ts https://cda.gov.ph cda 30
npm run dev # http://localhost:3000 → dashboard, /preview/<job>, /report/<job>
Or use the dashboard: paste a URL, press Reimagine, watch the job page stream progress.
Runs are admitted by an in-process queue (src/lib/runQueue.ts); the app runs as one Node
process inside a single container, so the queue is authoritative. Defaults, all overridable
through environment variables:
| Variable | Default | Meaning |
|---|---|---|
RUN_CONCURRENCY | 2 | Pipelines allowed to run at once. Extra submissions wait in order and the job page shows their place. |
RUN_QUEUE_MAX | 8 | Waiting runs allowed. Past this the form answers "the agent is busy". |
RUN_RATE_LIMIT / RUN_RATE_WINDOW_MIN | 3 / 10 | Submissions per visitor IP per window. |
RUN_DAILY_MAX | 7 | Runs accepted per day, resetting at 8:00 AM Asia/Manila, counted from job status files so it survives restarts. Protects the Meta credit balance. |
RUN_STALL_MIN | 20 | A run whose status has not changed for this long is killed and reported as stalled, freeing its slot. |
RUN_DEDUPE_HOURS | none | A host that is running, waiting, or already finished is not rebuilt again; the visitor is sent to that run. Set this to allow a rebuild once the last one is that many hours old. Operators can always rerun from /admin. |
GET /api/run reports the live counts. To stop accepting new runs, set SUBMISSIONS=paused in .env and restart; the form answers with a friendly notice while runs in flight finish. Remove it to resume.
To host your own copy, see docs/self-hosting.md (Docker Compose, or a plain server the way regov.app runs).
src/pipeline/ crawl · segment · understand · plan · build · schema (zod → strict JSON schema)
src/lib/ meta.ts (one OpenAI-compatible client for api.meta.ai) · jobs.ts
src/components/site/ Shell (GOVPH strip, header, footer) · Pages (home, content) · Blocks
src/app/ / dashboard · /jobs/[id] progress · /preview/[id]/[...slug] · /report/[id] · /api/run
scripts/ pipeline · smoke · sample · schema · a11y · vps/ (deploy, hardening)
fixtures/sample/ a fictional site for development and CI
test/ unit tests (node:test via tsx)
docs/ architecture · models · site model · self-hosting
jobs/ per-job artifacts (gitignored)
Kapwa is the design system BetterGov.ph built for
Philippine government portals. Generated sites load its tokens, type scale and base styles
(@bettergov/kapwa/kapwa.css) and render their own blocks on top in an editorial layout:
square corners, ruled sections, numbered indexes, a stronger hero, service-first navigation,
sticky header with search, WCAG AA contrast and semantic structure. Kapwa's React components
(Button, Card, Banner, OfficialBiography…) are not used yet.
The design system is documented as a Claude Code skill in
.claude/skills/regov-design-system and rendered
live at regov.app/design-system. To run it locally, use
npm run sample and npm run dev, then open http://localhost:3000/design-system.
.claude/skills/. It
explains how to install the Kapwa tokens and which source files to copy from.docs/design-system.md shows how to use the skill with Claude Code, Cursor, Copilot or a chat assistant, with example prompts.
Whichever you choose, keep generated sites labelled as unofficial concepts and invent nothing: every fact keeps its source.
Issues and pull requests are welcome. Start with CONTRIBUTING.md: it covers running the app without a model key, the checks CI runs (lint, types, unit tests, build, and an axe-core accessibility gate) and good first contributions. docs/architecture.md explains how the pieces fit. Generated output must stay clearly marked unofficial.
Questions, ideas, new block types and ports to other platforms (WordPress, plain HTML and the rest) go in Discussions. An agency asking for a change: use the Feedback button on regov.app or write to [email protected]. Security problems: see SECURITY.md.
MIT. Generated sites remain unofficial concepts; agency names, seals and content belong to their respective institutions.
See ROADMAP.md.