diff --git a/.claude/skills/norwegian-legal-research/SKILL.md b/.claude/skills/norwegian-legal-research/SKILL.md index 7bd2dd3..d2a7059 100644 --- a/.claude/skills/norwegian-legal-research/SKILL.md +++ b/.claude/skills/norwegian-legal-research/SKILL.md @@ -599,6 +599,72 @@ https://lovdata.no/lov/2005-06-17-64/§2-1 - Text-based numbering (supports "8a", "III", "første ledd") - Parent-child relationships between provisions +### Document Type Routing +**Choosing the correct MCP tool based on document identifiers:** + +**Document Type Identification by Prefix:** + +| Prefix | Document Type | Source Table | Correct MCP Tool | +|--------|--------------|--------------|------------------| +| `NL/lov/...` | Current consolidated law | `lover` | `get_lov(identifier)` | +| `NL/forskrift/...` | Current regulation | `lover` | `get_lov(identifier)` | +| `SF/forskrift/...` | Central regulation (Sentrale Forskrifter) | `lover` | `get_lov(identifier)` | +| `LTI/lov/...` | Historical gazette law | `lovtidender` | `get_full_lovtidend(lovtidend_id)` | +| `LTI/forskrift/...` | Historical gazette regulation | `lovtidender` | `get_full_lovtidend(lovtidend_id)` | + +**Using Search Result Metadata:** + +When search tools return results, they include a `"source"` field: + +- `"source": "forskrift"` → Use provision tools (`get_forskrift`) +- `"source": "lovtidendebestemmelse"` → Use gazette provision tools (`get_lovtidendebestemmelse`) +- `"source": "lovtidend"` → Use `get_full_lovtidend(doc_id)` + +**Routing Decision Tree:** + +``` +1. Did you get doc_id from search results? + → Check the "source" field: + - "lovtidend" → get_full_lovtidend(doc_id) + - "forskrift" → get_forskrift(id) or get_lov(law_doc_id) + - "lovtidendebestemmelse" → get_lovtidendebestemmelse(id) + +2. Do you have a raw doc_id string? + → Check prefix: + - Starts with "LTI/" → get_full_lovtidend(doc_id) + - Starts with "NL/" or "SF/" → get_lov(doc_id) + - No prefix (slug) → get_lov(identifier) +``` + +**Common Errors to Avoid:** + +❌ **Wrong:** Using `get_lov("LTI/lov/2001-05-18-24")` +✅ **Correct:** Using `get_full_lovtidend("LTI/lov/2001-05-18-24")` + +❌ **Wrong:** Ignoring the `"source"` field from search results +✅ **Correct:** Routing based on `"source"` metadata + +**Example Workflow:** + +``` +1. Search: search_all_forskrifter_fts("helseregisterloven") +2. Results include: { + "doc_id": "LTI/lov/2001-05-18-24", + "source": "gazette_document", + ... + } +3. Correct tool: get_full_lovtidend("LTI/lov/2001-05-18-24") +``` + +**Note on Multiple Versions:** + +Norwegian laws may exist in multiple forms: +- **Current consolidated version** (`NL/` prefix) - Recommended for current law +- **Original gazette version** (`LTI/` prefix) - Historical reference +- **Amendment versions** (`LTI/` prefix) - Track legislative changes + +Always verify you're using the appropriate version for your research purpose. + ### Search Result Processing **Converting system output to legal analysis:**