Files
fn_registry/functions/infra/parse_issue_md.md
T
Egutierrez c468b24d2b feat(0130): kanban_cpp v2 — backend Go + 5 registry parser fns + epic/sub-issues
Registry (issue 0130a):
- 5 fns infra: parse_issue_md, write_issue_md, scan_issues_dir,
  scan_flows_dir, watch_dir_fsnotify
- 3 tipos: Issue, Flow, FsEvent
- Tests round-trip + scan reales + watcher fsnotify (all PASS)
- Capability group 'kanban' nuevo (docs/capabilities/kanban.md)

Apps:
- apps/kanban_cpp/ (sub-repo) — frontend ImGui: board drag-drop,
  flows, filters, detail con CSV editors
- apps/kanban_cpp/backend/ — Go service port 8487: REST + SSE +
  fsnotify watcher, parser bidireccional MD<->SQLite cache

Issues:
- dev/issues/0130-kanban-cpp-v2.md (epic)
- 0130a parser, 0130b backend, 0130c frontend

CMakeLists.txt: add_subdirectory apps/kanban_cpp (registrado por
init_cpp_app scaffolder).

End-to-end verde: backend devuelve 189 issues + 9 flows; PATCH a
/api/issues/{id} reescribe .md (solo frontmatter, body intacto);
frontend --self-test exit 0; tests Go infra 5/5 PASS.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 22:20:15 +02:00

2.2 KiB

name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, params, output, tested, tests, test_file_path, file_path
name kind lang domain version purity signature description tags uses_functions uses_types returns returns_optional error_type imports params output tested tests test_file_path file_path
parse_issue_md function go infra 0.1.0 impure func ParseIssueMd(path string) (Issue, []byte, error) Lee un archivo Markdown de issue (dev/issues/*.md), extrae el frontmatter YAML en un struct Issue y devuelve el body tal como esta en disco. Rellena FilePath, MtimeNs y Completed (deduce de si el path contiene /completed/).
issue
parser
frontmatter
yaml
kanban
dev-ux
kanban
issue_go_infra
issue_go_infra
false error_go_core
bytes
fmt
os
strings
gopkg.in/yaml.v3
name desc
path Ruta absoluta o relativa al archivo .md del issue (ej: dev/issues/0130-kanban-cpp-v2.md)
Struct Issue con todos los campos del frontmatter, byte slice con el body MD, y error si el archivo no existe o el YAML es invalido true
parsea 0130-kanban-cpp-v2 correctamente
completed flag se deduce del path
error en archivo inexistente
fixture preserva campos
functions/infra/parse_issue_md_test.go functions/infra/parse_issue_md.go

Ejemplo

iss, body, err := infra.ParseIssueMd("dev/issues/0130-kanban-cpp-v2.md")
if err != nil {
    log.Fatal(err)
}
fmt.Printf("ID=%s Status=%s Domain=%v\n", iss.ID, iss.Status, iss.Domain)
// body contiene el Markdown despues del segundo ---

Cuando usarla

Cuando necesites leer el frontmatter de un issue del registry para mostrarlo, modificarlo o indexarlo. Usar como base de scan_issues_dir_go_infra (que la llama por cada archivo) o cuando necesites acceso al body MD ademas del struct.

Gotchas

  • El body devuelto incluye el \n inmediatamente posterior al segundo ---. No se normaliza.
  • Si el archivo tiene un solo --- (sin segundo delimitador), retorna error. Issues sin frontmatter no son validos.
  • Completed se infiere del path, no del campo status del YAML — un issue con status: completado que vive en dev/issues/ (no en completed/) tendra Completed=false.
  • Los campos Depends, Blocks, Related, Tags, Domain son []string — si el YAML los omite quedan como nil, no slice vacio.