feat(site): topic-first flow and public dashboard on GitHub Pages - #4
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 theLAW_OCsecret; search results reflect the latest amendment, so the enactment date still needs manual verification.site/build.py→_site/: a static dashboard with no server..github/workflows/pages.yml: builds and deploys onmain, plus a weekly refresh. It refreshes ordinance snapshots whenLAW_OCis set.Setup needed (repo admin)
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