How moomoogrange/law-go-kr-obsidian works
1. Repository role
- This is not an application codebase; it is a content knowledge base that repackages 대한민국 법령 from law.go.kr into an Obsidian vault.
- The architecture is centered on Markdown documents, YAML frontmatter, and Wikilinks so the corpus can be navigated as a graph.
2. Top-level information architecture
- The repository has four main content zones:
- 00-인덱스/: entry points and curated maps of content
- 01-소관부처/: ministry-based indexes
- 02-법령구분/: legal-form indexes such as 법률, 대통령령, 부령, 규칙
- 법령/: the full legal corpus, organized by law name
- These layers separate navigation metadata from the canonical legal text.
3. Core corpus layout
- Each law is a folder under 법령/{법령명}/.
- Inside each folder, files are split by hierarchy or version, typically:
- 법률.md
- 시행령.md
- 시행규칙.md
- occasionally ministry-specific or legacy variants like 시행규칙(농림축산식품부령).md
- This folder/file structure encodes the legal hierarchy directly in the path.
4. Document model
- Each document uses YAML frontmatter to capture structured metadata such as:
- title, law identifiers, legal type, supervising ministry, promulgation and effective dates, status, and source URL
- The body then holds the readable legal text and embeds links to related laws.
- This makes each file simultaneously a human-readable document and a machine-queryable node.
5. Graph layer
- Wikilinks like [[법령/초지법/법률]] turn cross-references into explicit edges.
- The repo therefore behaves like a legal knowledge graph rather than a flat document archive.
- The graph is used for:
- inter-law citations
- subordinate law navigation
- ministry-based grouping
- historical/legal version comparison
6. Indexing subsystem
- 00-인덱스/ is the main discovery layer.
- The dashboard and MOC-style files act as central routing nodes into the corpus.
- These indexes are likely what a reader or an LLM uses first to jump from high-level questions into the detailed law folders.
7. Administrative classification subsystem
- 01-소관부처/ groups laws by supervising authority, reflecting Korea’s administrative structure.
- 02-법령구분/ groups by the form of enactment, which is crucial because the same law can have multiple layers and historical issuances.
- These two subsystems provide orthogonal views over the same corpus: who owns it and what kind of legal instrument it is.
8. Historical and version boundary
- The tree includes both current and legacy names for ministries and legal instruments, such as older ministry names and historical forms like 조선총독부법령, 군정법령, or renamed ministerial decrees.
- That means the repository is intentionally historical, not just current-state legal text.
- Architecture-wise, this is important because consumers must filter by 상태 or date rather than assume all files are contemporaneous.
9. Data flow from source to vault
- The README states the source is law.go.kr, and the repository represents a downstream transformation pipeline output.
- The source system is HTML- and document-centric; this repo converts that into a markdown-native structure designed for navigation, search, and graph traversal.
- The actual crawler/transformer is not included, so the repo is the materialized knowledge base, not the ingestion code.
10. Consumer-facing usage modes
- There are two intended consumers:
- Humans in Obsidian, using graph view and backlinks
- LLMs / RAG systems, which can use grep-like retrieval, wikilink following, and frontmatter parsing
- The storage format deliberately avoids requiring a separate database, vector store, or application layer for basic use.
11. Scale and coverage
- The README describes the corpus as roughly:
- 3,037 law folders
- 6,884 Markdown files
- 222,279 cross-reference links
- 75 ministries
- 70 legal categories
- This scale implies the repository is structured as a large static knowledge graph, not a hand-curated notes collection.
12. Important boundary conditions
- The repo excludes the regeneration scripts and only ships the final vault content.
- It also does not include case law, many subordinate administrative notices, or post-cutoff updates after 2026-04-01.
- So the architectural boundary is: law corpus only, as-of a snapshot date, optimized for retrieval and reasoning.
13. What an architecture diagram should show
- Source: law.go.kr
- Transformation boundary: external, not present in repo
- Materialized store: Markdown Obsidian vault
- Index layer: dashboards and MOCs
- Classification layer: ministry/type indexes
- Corpus layer: per-law folders and hierarchical legal documents
- Relationship edges: wikilinks across files
- Consumers: Obsidian users and LLM/RAG tooling
Main entry points: 초지법 법령명 폴더 · 📊 대시보드.md 대시보드 · 법률.md 법률 문서 · 시행령.md 시행령
Components 16
Source & pipeline
External source and transformation boundary not included in the repo.
- law.go.kr · Upstream source of Korean legal text and metadata.
- Vault build · External conversion step from source documents into Markdown vault content.
Navigation layer
Curated entry points and orthogonal indexes for discovery.
- 대시보드 · Main landing page for broad exploration of the vault.
00-인덱스/📊 대시보드.md - 법령구분 인덱스 · Entry point for browsing by enactment form such as 법률, 대통령령, 부령.
00-인덱스/📋 법령구분 인덱스.md - 소관부처 인덱스 · Entry point for browsing laws by supervising authority.
00-인덱스/🏛️ 소관부처 인덱스.md - 관계법령 MOC · Curated map focused on one law and its related statutes.
00-인덱스/초지법 관계법령 인덱스.md
Legal corpus
Per-law folders and document hierarchy that hold the canonical text snapshot.
- 법령 폴더 · Top-level corpus namespace containing one folder per law.
법령 - 법령명 폴더 · One folder per law name, grouping versions and subordinate instruments.
법령/초지법 - 법률 문서 · Canonical law text for the base act.
법령/초지법/법률.md - 시행령 · Presidential decree or equivalent implementation layer for a law.
법령/초지법/시행령.md - 시행규칙 · Ministerial or court rule that implements the law.
법령/초지법/시행규칙.md - 특례 규칙 · Legacy or ministry-specific variants of subordinate rules.
법령/119구조ㆍ구급에관한법률/시행규칙(행정안전부령).md - Frontmatter · YAML metadata layer for identifiers, ministry, dates, status, and source URL.
Graph links
Wikilink-based cross references between legal documents.
- Wikilinks · Markdown links that materialize citations and legal relationships as edges.
Consumers
Primary ways the vault is used by people and tooling.
- Obsidian users · Readers navigating laws through search, backlinks, and graph view.
- LLM / RAG · Retrieval and reasoning systems using frontmatter, links, and text chunks.
Connections 25
- law.go.kr → Vault build: source text · Upstream legal content is converted into vault-ready Markdown.
- Vault build → 법령 폴더: materialize · The build output becomes the repository’s law corpus.
- 법령 폴더 → 법령명 폴더: organize · Each law is stored in its own folder.
- 법령명 폴더 → 법률 문서: contains · A law folder contains the base statute document.
- 법령명 폴더 → 시행령: contains · A law folder may contain an implementation decree.
- 법령명 폴더 → 시행규칙: contains · A law folder may contain implementation rules.
- 법령명 폴더 → 특례 규칙: contains · Some laws include ministry-specific or historical variants.
- 법률 문서 → Frontmatter: metadata · Structured metadata is embedded at the top of each document.
- 시행령 → Frontmatter: metadata · Subordinate instruments also carry structured metadata.
- 시행규칙 → Frontmatter: metadata · Rules expose queryable metadata in frontmatter.
- 특례 규칙 → Frontmatter: metadata · Variant rules retain the same machine-readable metadata model.
- Frontmatter → Wikilinks: enables · Metadata and links together support graph navigation and retrieval.
- 법률 문서 → Wikilinks: references · Legal text links to related laws and subordinate instruments.
- 시행령 → Wikilinks: references · Implementation layers cross-link to statutes and related rules.
- 시행규칙 → Wikilinks: references · Rules create explicit edges to related legal documents.
- Wikilinks → 관계법령 MOC: supports · Cross-links make topic maps and relationship indexes useful.
- Wikilinks → 대시보드: feeds · Graph-connected documents surface through dashboards and index pages.
- 대시보드 → 소관부처 인덱스: routes to · The dashboard links into ministry-based browsing.
- 대시보드 → 법령구분 인덱스: routes to · The dashboard links into legal-form browsing.
- 대시보드 → 관계법령 MOC: routes to · The dashboard points to curated relationship maps.
- Obsidian users → 대시보드: starts here · Human readers typically begin from curated entry pages.
- Obsidian users → Wikilinks: follows · Readers traverse wikilinks and backlinks to explore the corpus.
- LLM / RAG → Frontmatter: parses · Tooling extracts identifiers, dates, ministry, and status.
- LLM / RAG → Wikilinks: retrieves · Tooling follows links to expand context across laws.
- LLM / RAG → 법률 문서: reads · RAG systems consume the canonical legal text from Markdown.