---
name: yogsoth-ai-gap-normalization
description: "SOP: Unify gaps from different sources into the standard GapRecord format"
license: "Apache-2.0"
metadata:
  decimalai-skill-id: "71b71068-bb31-47ec-8ac1-e42a54a7de49"
  decimalai-version-id: "05ec51ca-2acb-4f7a-b6d4-852fe5224b6d"
  decimalai-version: "1"
  decimalai-body-sha256: "c95c3e92271135d0bf8d5ec547048b2f901704e403dd7db2b0d1d5814437497b"
  decimalai-name: "yogsoth-ai/gap-normalization"
  decimalai-format: "1"
  decimalai-invocation: "model"
  decimalai-category: "research"
  decimalai-source: "https://app.decimal.ai/s/yogsoth-ai-gap-normalization@1/SKILL.md"
---
# Gap Normalization

Unify gaps from different sources into the standard GapRecord format.

## HARD-GATE

<HARD-GATE>
- Input must not be empty: must contain at least 1 raw gap entry
- Each output GapRecord must contain non-empty id, title, description, domain, and source fields
- If any required field cannot be extracted, the entry is marked `status: "incomplete"` rather than silently dropped
</HARD-GATE>

## Pipeline

1. **Precondition check**: Verify input is non-empty; count the entries; identify the input format (plain text / JSON / mixed)
2. **Format identification**: Determine the format type of each entry — free-text description, partially structured object, fully structured object
3. **Field extraction**: Extract id (generate or reuse), title, description, domain, source, evidence, context from each raw entry
4. **Normalization**: Denoise and truncate title (≤120 characters); complete description into full sentences; map domain to a controlled vocabulary
5. **Validation**: Check the completeness of required fields for each GapRecord; tag incomplete entries with `status: "incomplete"` and record the missing fields
6. **Output**: Return GapRecord[] and a processing summary (total / complete / incomplete)

## Output Format

```json
{
  "records": [
    {
      "id": "gap_001",
      "title": "Short title (≤120 characters)",
      "description": "Full description (1-3 sentences)",
      "domain": "Domain label",
      "source": "Source identifier",
      "evidence": "Supporting evidence (optional)",
      "context": "Background information (optional)",
      "status": "complete | incomplete",
      "missing_fields": []
    }
  ],
  "summary": {
    "total": 0,
    "complete": 0,
    "incomplete": 0
  }
}
```
