Skip to content

feat(site): topic-first flow and public dashboard on GitHub Pages - #4

Merged
jsshin2022 merged 1 commit into
mainfrom
feat/topic-dashboard
Sep 26, 2026
Merged

jsshin2022 merged 1 commit into
mainfrom
feat/topic-dashboard

Conversation

@jsshin2022

Copy link
Copy Markdown
Member

Why

The earlier flow (#3) took one trending policy and analyzed it. The starter kit (tab 05) warns against exactly that: picking cases by how much attention they got means choosing cases after seeing the outcome, so effects look larger than they are. This PR follows the kit's option B instead: a social signal only chooses the topic; the analysis covers every policy in that topic.

The kit also recommends a server-free public output (GitHub Pages) over Streamlit, which needs a running server. Streamlit stays as the developer tool.

What's added

  • catalog/topics.yaml: 6 topics, each with events, how its policies are collected, and the kit's three gates (when / who / what) with status and reason.
  • core/discovery: text → topic → all policies in the topic (policy-level matching kept for the app).
  • core/adapters/law.py + scripts/refresh_law_snapshots.py: 법제처 ordinance search → region × effective-date table (gate 1). Needs the LAW_OC secret; search results reflect the latest amendment, so the enactment date still needs manual verification.
  • site/build.py → _site/: a static dashboard with no server.
    • Topic cards with gate badges, and an in-browser topic matcher (nothing is sent to a server).
    • Per-topic pages with the timeline, gates, recommended datasets and analysis results. Simulated results carry a banner.
  • .github/workflows/pages.yml: builds and deploys on main, plus a weekly refresh. It refreshes ordinance snapshots when LAW_OC is set.

Setup needed (repo admin)

  1. Settings → Pages → Source: GitHub Actions
  2. Optional: Settings → Secrets → Actions → LAW_OC (법제처 OC, free and approved instantly)

Verification

  • pytest: 47 passed; ruff: clean; site renders at 390px width with no horizontal scroll.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EMnmZPBD5PQJW1UQAARN7q


Generated by Claude Code

Follows the starter kit (05 "주제 고르는 법", option B): a social signal only
chooses the topic; the analysis covers every policy in that topic.

- catalog/topics.yaml: 6 topics with events, collection method, and the
  three gates (when / who / what)
- core/discovery: match social text to a topic first, then list its policies
- core/adapters/law.py + scripts/refresh_law_snapshots.py: 법제처 ordinance
  search to build region x date treatment tables (needs LAW_OC)
- site/build.py: static dashboard (topic cards, in-browser topic matcher,
  timeline, gates, datasets, analysis results) — no server
- .github/workflows/pages.yml: build and deploy to GitHub Pages on main;
  refreshes ordinance snapshots when the LAW_OC secret exists

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EMnmZPBD5PQJW1UQAARN7q
@jsshin2022
jsshin2022 merged commit 72a5109 into main Sep 26, 2026
1 check passed
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