| name | sb-internals/gap-aging |
| description | INTERNAL — extrai lacunas de OPERATIONS-STATE.md e calcula idade em dias. Output JSON estável. Usado por sb-lint cat 3 e sb-gap-review. Nunca invocado diretamente pelo usuário. |
| version | 0.1.0 |
| plugin | second-brain |
| type | internal |
| deps_external | ["jq (system)","bash 4+ (regex match operators, mapfile)","macOS BSD date (`date -j -f` flag) — cross-platform port deferred to M1.5+ (R-M4 follow-up)"] |
sb-internals/gap-aging
Helper determinístico. Extract gap entries from OPERATIONS-STATE.md, compute age in days, emit stable JSON.
Interface
gap-aging.sh <operations-state-path>
stdout: JSON array
exit 0: success (mesmo se zero lacunas — array vazio `[]`)
exit 1: file not found ou parse failure
Output JSON schema:
[
{
"text": "Tim Ferriss / 4-Hour Workweek — citado como mental model...",
"detected": "2026-04-28",
"age_days": 3,
"stale_flag": null,
"section": "Lacunas conhecidas → Abertas"
}
]
stale_flag valores:
null — idade ≤ 30 dias.
"stale" — idade > 30 dias e < 90.
"very-stale" — idade ≥ 90.