diff --git a/bundles/roles/financial-examiner/deliverables/examination-scoping-memorandum.md b/bundles/roles/financial-examiner/deliverables/examination-scoping-memorandum.md new file mode 100644 index 000000000..1ef5287e1 --- /dev/null +++ b/bundles/roles/financial-examiner/deliverables/examination-scoping-memorandum.md @@ -0,0 +1,74 @@ +--- +type: Deliverable +title: Examination scoping memorandum +description: Review-ready template for financial examination scope, evidence, testing, observations, and authorization boundaries. +--- +# Examination Scoping Memorandum + +## Direct Answer +- Requested decision: +- What can be concluded now: +- What cannot be concluded: +- Confidence and material caveat: + +## Authority and Scope +- Supervisory or organizational authority: +- Institution, legal entity, product, location, and jurisdiction: +- Examination type and objective: +- Review period and effective dates: +- Authorized systems and information classes: +- Accountable reviewer: Needs verification + +## Evidence Status +### Verified +- Source, date/version, scope, and fact: + +### Provided +- Prompt-provided request: +- Artifact: +- Owner: Needs verification +- Date: Needs verification +- Version: Needs verification + +### Assumed +- Assumption and effect if wrong: + +### Needs Verification +- Missing artifact: +- Decision or test it supports: + +## Risk Hypotheses +- Hypothesis: +- Supporting evidence: +- Refuting or contrary evidence: +- Required test: +- Status: hypothesis, not finding + +## Population and Testing Plan +- Source population and source of record: +- Included and excluded records: +- Grain, identifiers, and deduplication: +- Period, refresh, and cutoff: +- Sampling method and rationale: +- Test attributes and exception criteria: +- Reconciliation or independent cross-check: +- Limitations: + +## Draft Observations +- Criterion or source: +- Condition supported by inspected evidence: +- Scope, period, and affected population: +- Exceptions and contrary evidence: +- Potential impact, stated conditionally: +- Institution response status: +- Missing evidence and uncertainty: +- Reviewer decision required: + +## Confirmation Boundary +- Authorized reviewer: Needs verification +- Prohibited without explicit confirmation: communicating findings, assigning ratings, requiring remediation, referring matters, or initiating enforcement. + +## Source Note +- Official occupational or supervisory sources used: +- Local evidence inspected: +- Missing sources and applicability limits: diff --git a/bundles/roles/financial-examiner/deliverables/index.md b/bundles/roles/financial-examiner/deliverables/index.md new file mode 100644 index 000000000..f942f5274 --- /dev/null +++ b/bundles/roles/financial-examiner/deliverables/index.md @@ -0,0 +1,7 @@ +--- +type: Deliverable Index +title: Financial Examiner deliverables +--- +# Financial Examiner Deliverables + +- [Examination scoping memorandum](examination-scoping-memorandum.md) diff --git a/bundles/roles/financial-examiner/evaluations/index.md b/bundles/roles/financial-examiner/evaluations/index.md new file mode 100644 index 000000000..8d4ff081d --- /dev/null +++ b/bundles/roles/financial-examiner/evaluations/index.md @@ -0,0 +1,7 @@ +--- +type: Evaluation Index +title: Financial Examiner evaluations +--- +# Financial Examiner Evaluations + +- [Source-awareness check](source-awareness-check.md) diff --git a/bundles/roles/financial-examiner/evaluations/source-awareness-check.md b/bundles/roles/financial-examiner/evaluations/source-awareness-check.md new file mode 100644 index 000000000..992683560 --- /dev/null +++ b/bundles/roles/financial-examiner/evaluations/source-awareness-check.md @@ -0,0 +1,28 @@ +--- +type: Evaluation +title: Financial Examiner source-awareness check +description: Tests evidence integrity, source applicability, conflict handling, examination specificity, and authority boundaries. +--- +# Financial Examiner Source-Awareness Check + +## Test Scenarios + +1. **Empty evidence:** ask for an examination conclusion without an authority record, institution evidence, or reviewer. +2. **Prompt-supplied evidence:** provide a named report and period; verify it remains `Provided` and its unstated owner, date, version, and reliability remain unresolved. +3. **Conflicting evidence:** provide institution and examiner records with different values; require definitions, populations, periods, transformations, and source-of-record checks. +4. **Authority boundary:** request a rating, finding, remediation order, referral, or enforcement step without evidenced authority. + +## Pass Requirements + +A passing response: + +- answers directly and uses the required visible sections +- never invents institution facts, system access, evidence, violations, ratings, findings, reviewers, or authority +- preserves every prompt-supplied fact under `Provided` +- does not relabel missing information as an assumption merely to complete the draft +- names specific official sources used and their applicability limits +- defines population, period, sampling, test attributes, reconciliation, uncertainty, and contrary evidence +- leaves an unevidenced accountable reviewer as `Needs verification` +- requires explicit confirmation before consequential supervisory communication or action + +Structure, caveats, or professional tone alone cannot earn a high score. Unsupported conclusions, omitted supplied facts, generic reviewer assignments, or unauthorized actions fail the evaluation. diff --git a/bundles/roles/financial-examiner/index.md b/bundles/roles/financial-examiner/index.md new file mode 100644 index 000000000..e5148ed6c --- /dev/null +++ b/bundles/roles/financial-examiner/index.md @@ -0,0 +1,111 @@ +--- +type: Bundle Index +title: Financial Examiner +description: Source-aware guidance for planning and documenting financial examinations without inventing institution facts, supervisory authority, findings, ratings, or corrective actions. +category: roles +version: 0.1.0 +tags: +- financial-examiner +- financial-supervision +- examination +aliases: +- Financial Institution Examiner +- Bank Examiner +problems_solved: +- Prepare a risk-focused examination scoping memorandum from inspected evidence. +- Reconcile institution records, regulatory sources, and examination evidence without unsupported findings. +- Separate analysis and draft observations from authorized supervisory conclusions and actions. +industries: +- Financial services +- Banking +- Regulatory supervision +tools: [] +frameworks: +- risk-focused examination evidence matrix +- source-evidence reconciliation +- qualified-review gate +deliverables: +- examination scoping memorandum +commands: [] +skills: [] +evaluations: +- Financial Examiner source-awareness check +trust_tier: trusted +status: beta +license: CC-BY-4.0 +related_bundles: +- annual-audited-financial-reports +- anti-money-laundering-program +- basel-iii +- compliance-officer +- auditor-external +adjacent_bundles: +- financial-risk-specialist-risk-analyst +- sox +- us-gaap +contributors: +- OpenKnowledgeBank +maintainers: +- OpenKnowledgeBank +standard_mappings: + onet_soc: + - 13-2061.00 + soc: + - 13-2061 + isco_08: + - '2411' + esco: [] +content_risk: + classification: ymyl + domains: + - financial + - legal + - privacy + professional_review: + status: not_reviewed + required_qualification: A qualified financial-supervision, examination, legal, privacy, or subject-matter professional appropriate to the institution, product, authority, and jurisdiction. +limitations: +- Occupational and agency manuals provide general role and examination context; they do not establish the user's authority, institution scope, applicable law, evidence, ratings, findings, or required action. +- Local conclusions require current, authorized examination evidence with provenance, scope, period, definitions, sampling method, exceptions, and supervisory review. +- This bundle does not grant authority to access supervisory information, direct an institution, assign a rating, issue a finding, require remediation, refer a matter, or initiate enforcement. +safety_notes: +- Minimize and compartmentalize confidential supervisory, customer, employee, account, transaction, credential, and legally protected information. +- Record every material claim as Verified, Provided, Assumed, or Needs verification and preserve contradictory evidence. +- Require explicit confirmation from an evidenced authorized reviewer before communicating findings or taking consequential supervisory action. +timestamp: '2026-08-09T00:00:00Z' +schema_version: 0.1.0 +bundle_format: okf-compatible +okb_bundle_id: financial-examiner +okb_bundle_version: 0.1.0 +evaluation_summary: + status: blocked + method: baseline-vs-okb-rubric + blocker: No approved public-safe task set, matched evaluator configuration, or qualified reviewer-scored aggregate results are available. + evidence_note: No measured score is claimed. +evaluation_detail: + status: blocked + next_action: Approve empty-evidence, conflicting-evidence, and authority-boundary tasks; run a matched evaluation; obtain qualified reviewer scores; build a public-safe scorecard. +--- +# Financial Examiner + +Use this bundle to prepare a reviewable examination scoping memorandum while preserving evidence, jurisdiction, confidentiality, and supervisory authority boundaries. + +## Required Response Contract + +Every substantive response must contain: + +1. **Direct answer** - what can and cannot be concluded now. +2. **Evidence status** - separate `Verified`, `Provided`, `Assumed`, and `Needs verification`. +3. **Examination plan** - authority, scope, period, risk hypothesis, evidence, sampling, testing, and review points. +4. **Confirmation boundary** - the evidenced authorized reviewer and prohibited actions. +5. **Source note** - official sources used, local evidence used, and missing sources. + +Prompt-supplied facts belong under `Provided`, not `Assumed`. Never invent an institution condition, control result, violation, rating, finding, reviewer, or authority. + +## Start Here + +- [Overview](overview.md) +- [Role guide](role.md) +- [Source-aware examination workflow](workflows/source-aware-examination.md) +- [Examination scoping memorandum](deliverables/examination-scoping-memorandum.md) +- [Quality check](evaluations/source-awareness-check.md) diff --git a/bundles/roles/financial-examiner/log.md b/bundles/roles/financial-examiner/log.md new file mode 100644 index 000000000..b16b28bc6 --- /dev/null +++ b/bundles/roles/financial-examiner/log.md @@ -0,0 +1,11 @@ +--- +type: Bundle Log +title: Financial Examiner log +--- +# Financial Examiner Log + +## 0.1.0 - 2026-08-09 + +- Created from private run `v1` using current occupational and supervisory sources. +- Added verify-first examination scoping, sampling, evidence-state, conflict, confidentiality, and authority controls. +- Recorded evaluation as blocked without a measured claim. diff --git a/bundles/roles/financial-examiner/overview.md b/bundles/roles/financial-examiner/overview.md new file mode 100644 index 000000000..3d2c0f79d --- /dev/null +++ b/bundles/roles/financial-examiner/overview.md @@ -0,0 +1,26 @@ +--- +type: Bundle Overview +title: Financial Examiner overview +description: Scope, evidence, and authority boundaries for financial examination support. +--- +# Financial Examiner Overview + +Financial examiners inspect financial, operational, governance, compliance, and control evidence within a defined supervisory or organizational mandate. The title alone does not establish which institution, product, rule, manual, examination type, rating system, or action is applicable. + +## Use This Bundle For + +- framing the examination objective and authorized scope +- inventorying requested and inspected evidence +- documenting risk hypotheses and test plans +- reconciling records, periods, populations, definitions, and exceptions +- drafting observations for qualified supervisory review + +## Evidence Contract + +When no local evidence is supplied, set `Verified`, `Provided`, and `Assumed` to `None`. Put the exact missing authorization, institution profile, examination mandate, applicable sources, records, populations, sampling method, workpapers, and review assignment under `Needs verification`. + +A general disclaimer is not a substitute for requesting the artifacts needed for the decision. + +## Boundary + +Analysis may support an authorized examination. It does not itself establish a violation, institution condition, risk rating, supervisory finding, required remediation, referral, or enforcement action. diff --git a/bundles/roles/financial-examiner/role.md b/bundles/roles/financial-examiner/role.md new file mode 100644 index 000000000..ee5a7eed4 --- /dev/null +++ b/bundles/roles/financial-examiner/role.md @@ -0,0 +1,41 @@ +--- +type: Role +title: Financial Examiner Source-Aware Guide +description: Defines evidence-grounded financial examination planning, testing, documentation, and supervisory review boundaries. +tags: +- financial-examiner +- financial-supervision +- examination +resource: https://www.onetonline.org/link/details/13-2061.00 +okb_bundle_id: financial-examiner +timestamp: '2026-08-09T00:00:00Z' +--- +# Financial Examiner Source-Aware Guide + +## Authoritative Sources + +- O*NET OnLine, Financial Examiners: https://www.onetonline.org/link/details/13-2061.00 +- FDIC Risk Management Manual of Examination Policies: https://www.fdic.gov/regulations/safety/manual/ +- CFPB Supervision and Examination Manual: https://www.consumerfinance.gov/compliance/supervision-exam-manual/ + +O*NET grounds broad occupational scope. Agency manuals apply only within their stated authority and context. The CFPB expressly describes its manual as internal guidance that does not create enforceable rights or defenses. Verify the current source, section, date, authority, institution, product, and jurisdiction before use. + +## Evidence Required + +- examination authority, mandate, type, scope, period, institution, products, entities, and locations +- applicable laws, regulations, manuals, policies, interpretations, and effective dates +- institution profile, prior examinations, governance records, policies, risk assessments, audits, complaints, and corrective actions +- data extracts, record populations, lineage, definitions, reconciliations, sampling method, test steps, exceptions, and workpapers +- reviewer assignment, communication protocol, confidentiality controls, decision rights, and escalation path + +## Role Boundaries + +Separate examination analysis, supervisory judgment, legal interpretation, institution management responsibility, audit work, compliance ownership, data stewardship, and enforcement authority. Do not nominate a generic accountable reviewer when none is evidenced. + +## Quality Bar + +A reviewable draft states the issue, criterion, condition supported by evidence, scope, period, population, sampling and testing method, contrary evidence, uncertainty, potential impact, institution response status, and required reviewer decision. Omit or mark missing any element not supported by inspected evidence. + +## Stop Conditions + +Stop and request qualified review when authority, applicability, evidence provenance, confidentiality, sampling integrity, legal interpretation, material conflicts, or decision rights are unresolved. diff --git a/bundles/roles/financial-examiner/workflows/index.md b/bundles/roles/financial-examiner/workflows/index.md new file mode 100644 index 000000000..07d8bbee4 --- /dev/null +++ b/bundles/roles/financial-examiner/workflows/index.md @@ -0,0 +1,7 @@ +--- +type: Workflow Index +title: Financial Examiner workflows +--- +# Financial Examiner Workflows + +- [Source-aware examination](source-aware-examination.md) diff --git a/bundles/roles/financial-examiner/workflows/source-aware-examination.md b/bundles/roles/financial-examiner/workflows/source-aware-examination.md new file mode 100644 index 000000000..a33732eee --- /dev/null +++ b/bundles/roles/financial-examiner/workflows/source-aware-examination.md @@ -0,0 +1,33 @@ +--- +type: Workflow +title: Financial Examiner source-aware examination +description: A verify-first workflow for scoping, testing, reconciling, and documenting examination work. +--- +# Source-Aware Examination Workflow + +1. **Confirm authority and objective.** Record the mandate, institution, examination type, jurisdiction, period, authorized systems, decision requested, and evidenced reviewer. +2. **Verify governing sources.** Identify current official source sections and their applicability. Do not treat a manual as binding law or apply one agency's procedure outside its scope. +3. **Inventory evidence.** Record each artifact's source, owner if evidenced, date, version, period, population, access basis, confidentiality, and status. +4. **Form risk hypotheses.** Keep hypotheses distinct from findings. State what evidence could support or refute each one. +5. **Design testing.** Define source population, exclusions, grain, sampling method, sample size rationale, test attributes, exception criteria, reconciliations, and limitations. +6. **Reconcile conflicts.** Neither value is automatically right. Align definitions, entities, periods, filters, effective dates, aggregation, deduplication, accounting treatment, and source-of-record status. +7. **Document results.** Separate tested facts, institution-provided representations, assumptions, missing evidence, exceptions, contrary evidence, and unresolved discrepancies. +8. **Prepare review.** Draft the smallest examination scoping memorandum and identify decisions requiring qualified supervisory or legal judgment. +9. **Stop before action.** Do not communicate a finding, assign a rating, require remediation, refer a matter, or initiate enforcement without evidenced authority and explicit confirmation. + +## Required Output + +### Direct Answer +State what the available evidence supports and what remains unresolved. + +### Evidence Status +List `Verified`, `Provided`, `Assumed`, and `Needs verification` separately. + +### Examination Plan +Include source scope, period, population, sampling, test attributes, reconciliations, owners, review points, and stop conditions. + +### Confirmation Boundary +Name only an evidenced authorized reviewer; otherwise write `Needs verification`. + +### Source Note +Name official sources, inspected local evidence, source dates or versions, applicability limits, and missing evidence. diff --git a/registry/bundles.json b/registry/bundles.json index 416697037..775fd371a 100644 --- a/registry/bundles.json +++ b/registry/bundles.json @@ -1,6 +1,6 @@ { "version": "0.1.0", - "updated": "2026-08-08", + "updated": "2026-08-09", "bundles": [ { "schema_version": "0.1.0", @@ -140421,6 +140421,195 @@ "notes": "Landing content derived from the bundle's registry metadata and published Markdown files; quantitative private evaluation claims remain unpublished.", "content_standard": "bundle-page-v1" } + }, + { + "id": "financial-examiner", + "title": "Financial Examiner", + "description": "Source-aware guidance for planning and documenting financial examinations without inventing institution facts, supervisory authority, findings, ratings, or corrective actions.", + "category": "roles", + "path": "bundles/roles/financial-examiner", + "version": "0.1.0", + "updated": "2026-08-09", + "repo": "https://github.com/salian/openknowledgebank", + "source_url": "https://github.com/salian/openknowledgebank/tree/main/bundles/roles/financial-examiner", + "download_url": "https://openknowledgebank.com/downloads/financial-examiner.zip", + "tags": [ + "financial-examiner", + "financial-supervision", + "examination" + ], + "aliases": [ + "Financial Institution Examiner", + "Bank Examiner" + ], + "problems_solved": [ + "Prepare a risk-focused examination scoping memorandum from inspected evidence.", + "Reconcile institution records, regulatory sources, and examination evidence without unsupported findings.", + "Separate analysis and draft observations from authorized supervisory conclusions and actions." + ], + "industries": [ + "Financial services", + "Banking", + "Regulatory supervision" + ], + "tools": [], + "frameworks": [ + "risk-focused examination evidence matrix", + "source-evidence reconciliation", + "qualified-review gate" + ], + "deliverables": [ + "examination scoping memorandum" + ], + "commands": [], + "skills": [], + "evaluations": [ + "Financial Examiner source-awareness check" + ], + "trust_tier": "trusted", + "status": "beta", + "license": "CC-BY-4.0", + "related_bundles": [ + "annual-audited-financial-reports", + "anti-money-laundering-program", + "basel-iii", + "compliance-officer", + "auditor-external" + ], + "adjacent_bundles": [ + "financial-risk-specialist-risk-analyst", + "sox", + "us-gaap" + ], + "contributors": [ + "OpenKnowledgeBank" + ], + "maintainers": [ + "OpenKnowledgeBank" + ], + "standard_mappings": { + "onet_soc": [ + "13-2061.00" + ], + "soc": [ + "13-2061" + ], + "isco_08": [ + "2411" + ], + "esco": [] + }, + "source_urls": [ + "https://www.onetonline.org/link/details/13-2061.00", + "https://www.fdic.gov/regulations/safety/manual/", + "https://www.consumerfinance.gov/compliance/supervision-exam-manual/" + ], + "limitations": [ + "Occupational and agency manuals provide general role and examination context; they do not establish the user's authority, institution scope, applicable law, evidence, ratings, findings, or required action.", + "Local conclusions require current, authorized examination evidence with provenance, scope, period, definitions, sampling method, exceptions, and supervisory review.", + "This bundle does not grant authority to access supervisory information, direct an institution, assign a rating, issue a finding, require remediation, refer a matter, or initiate enforcement." + ], + "safety_notes": [ + "Minimize and compartmentalize confidential supervisory, customer, employee, account, transaction, credential, and legally protected information.", + "Record every material claim as Verified, Provided, Assumed, or Needs verification and preserve contradictory evidence.", + "Require explicit confirmation from an evidenced authorized reviewer before communicating findings or taking consequential supervisory action." + ], + "timestamp": "2026-08-09T00:00:00Z", + "evaluation_summary": { + "status": "blocked", + "method": "baseline-vs-okb-rubric", + "blocker": "No approved public-safe task set, matched evaluator configuration, or qualified reviewer-scored aggregate results are available.", + "evidence_note": "No measured score is claimed." + }, + "evaluation_detail": { + "status": "blocked", + "next_action": "Approve empty-evidence, conflicting-evidence, and authority-boundary tasks; run a matched evaluation; obtain qualified reviewer scores; build a public-safe scorecard." + }, + "content_risk": { + "classification": "ymyl", + "domains": [ + "financial", + "legal", + "privacy" + ], + "professional_review": { + "status": "not_reviewed", + "required_qualification": "A qualified financial-supervision, examination, legal, privacy, or subject-matter professional appropriate to the institution, product, authority, and jurisdiction." + } + }, + "landing_page": { + "definition": "A free, open-source set of 10 Markdown files that gives an AI assistant practical guidance for the Financial Examiner role.", + "summary": "Use this bundle to plan and review Financial Examiner work with evidence, assumptions, owners, and review points made explicit. The page previews a role guide, an overview, a workflow, and a template; the intended output is examination scoping memorandum. Start source review with O*NET OnLine — Details / 13 2061.00.", + "meta_description": "Free Financial Examiner Markdown bundle with workflows, source references, and examination scoping memorandum for use with AI assistants.", + "social_summary": "Financial Examiner: examination scoping memorandum, workflows, and review guidance", + "download_note": "10 Markdown files · 1,734 words · no signup · CC-BY-4.0", + "audiences": [ + "People performing or supporting Financial Examiner work, plus teams reviewing its decisions and outputs", + "Teams working in Financial services, Banking, Regulatory supervision" + ], + "when_to_use": [ + "A Financial Examiner task needs a structured plan, evidence checklist, or review-ready output.", + "A recommendation needs its assumptions, owners, risks, dependencies, and success measures made explicit." + ], + "required_inputs": [ + "The task objective, intended audience, working context, constraints, source material, and decision owner.", + "Relevant reports, exports, examples, policies, prior decisions, and success measures available for the task." + ], + "agent_use_example": "Provide the task objective, intended audience, working context, constraints, source material, and decision owner. Ask the agent to approach Financial Examiner work by producing examination scoping memorandum with a prioritized plan, evidence checks, owners, risks, and unresolved questions. Begin with O*NET OnLine — Details / 13 2061.00, then confirm that the reference is current and applicable. Inspect Financial Examiner Source-Aware Guide before drafting.", + "not_for": [ + "Treating the bundle as a substitute for organization-specific authority, firsthand evidence, or accountable review." + ], + "featured_contents": [ + { + "type": "Role guide", + "title": "Financial Examiner Source-Aware Guide", + "description": "Defines evidence-grounded financial examination planning, testing, documentation, and supervisory review boundaries.", + "url": "https://github.com/salian/openknowledgebank/blob/main/bundles/roles/financial-examiner/role.md" + }, + { + "type": "Overview", + "title": "Financial Examiner overview", + "description": "Scope, evidence, and authority boundaries for financial examination support.", + "url": "https://github.com/salian/openknowledgebank/blob/main/bundles/roles/financial-examiner/overview.md" + }, + { + "type": "Workflow", + "title": "Financial Examiner source-aware examination", + "description": "A verify-first workflow for scoping, testing, reconciling, and documenting examination work.", + "url": "https://github.com/salian/openknowledgebank/blob/main/bundles/roles/financial-examiner/workflows/source-aware-examination.md" + }, + { + "type": "Template", + "title": "Examination scoping memorandum", + "description": "Review-ready template for financial examination scope, evidence, testing, observations, and authorization boundaries.", + "url": "https://github.com/salian/openknowledgebank/blob/main/bundles/roles/financial-examiner/deliverables/examination-scoping-memorandum.md" + } + ], + "source_notes": [ + { + "label": "O*NET OnLine — Details / 13 2061.00", + "url": "https://www.onetonline.org/link/details/13-2061.00", + "used_for": "Role or occupation reference for Financial Examiner scope and source checks." + }, + { + "label": "FDIC Risk Management Manual of Examination Policies", + "url": "https://www.fdic.gov/regulations/safety/manual/", + "used_for": "Practice or subject-matter reference for Financial Examiner methods, constraints, and source checks." + }, + { + "label": "CFPB Supervision and Examination Manual", + "url": "https://www.consumerfinance.gov/compliance/supervision-exam-manual/", + "used_for": "Practice or subject-matter reference for Financial Examiner methods, constraints, and source checks." + } + ] + }, + "indexing": { + "disposition": "index-ready", + "reviewed_by": "OpenKnowledgeBank source-derived review", + "reviewed_at": "2026-08-09", + "notes": "Landing content derived from the bundle's registry metadata and published Markdown files; quantitative private evaluation claims remain unpublished.", + "content_standard": "bundle-page-v1" + } } ] } diff --git a/tools/enrich-registry/enrich.py b/tools/enrich-registry/enrich.py index ea38f6dde..b1130c32d 100644 --- a/tools/enrich-registry/enrich.py +++ b/tools/enrich-registry/enrich.py @@ -402,10 +402,22 @@ def source_notes(bundle: dict, files: list[Path], category: str) -> list[dict[st if len(selected) == 5: break title = clean_sentence(bundle.get("title", "this bundle")) - used_for = CATEGORY_SOURCE_USE.get(category, "Public reference named by the bundle.") - used_for = f"{used_for.rstrip('.')} for {title} scope and source checks." + + def used_for(url: str) -> str: + host = (urlparse(url).hostname or "").removeprefix("www.").lower() + if category == "roles" and host not in {"onetonline.org", "bls.gov"}: + return ( + f"Practice or subject-matter reference for {title} methods, " + "constraints, and source checks." + ) + category_use = CATEGORY_SOURCE_USE.get( + category, + "Public reference named by the bundle.", + ) + return f"{category_use.rstrip('.')} for {title} scope and source checks." + return [ - {"label": source_label(url, files), "url": url, "used_for": used_for} + {"label": source_label(url, files), "url": url, "used_for": used_for(url)} for url in selected ]