c468b24d2b
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>
2.5 KiB
2.5 KiB
id, title, status, type, domain, scope, priority, depends, blocks, related, tags, flow, created, updated
| id | title | status | type | domain | scope | priority | depends | blocks | related | tags | flow | created | updated | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0130a | Funciones registry: parser MD + scan dirs + writer + watcher | pendiente | infra |
|
registry-only | alta |
|
|
|
0130 | 2026-05-22 | 2026-05-22 |
0130a — Funciones registry para kanban_cpp v2
Status: pendiente
Por que
El backend de kanban_cpp v2 necesita parsear/escribir frontmatter YAML de los .md de dev/issues/ y dev/flows/. Estas piezas son reusables (cualquier app del registry puede operar sobre issues/flows), asi que viven en el registry, no en el backend de la app.
Funciones a crear (delegar a fn-constructor en paralelo)
| ID | Firma | Pureza |
|---|---|---|
parse_issue_md_go_infra |
(path string) (Issue, []byte body, error) |
impure (FS) |
write_issue_md_go_infra |
(path string, issue Issue, body []byte) error |
impure (FS) |
scan_issues_dir_go_infra |
(root string) ([]Issue, error) |
impure (FS) |
scan_flows_dir_go_infra |
(root string) ([]Flow, error) |
impure (FS) |
watch_dir_fsnotify_go_infra |
(ctx, root) (<-chan FsEvent, error) |
impure (FS, async) |
Tipos:
Issue_go_infra— struct con campos del frontmatter (id, title, status, type, domain, scope, priority, depends, blocks, related, flow, tags, created, updated, file_path, mtime_ns).Flow_go_infra— struct equivalente para flows.FsEvent_go_infra—{path, op}conop in {create, write, remove, rename}.
Notas de implementacion
- Usar
gopkg.in/yaml.v3para parsing (preserva orden de keys viayaml.Node). - Writer DEBE preservar:
- Orden de campos del frontmatter original.
- Body MD intacto (todo lo que va despues del segundo
---). - Comentarios YAML (libre, best-effort).
parse_issue_mddebe ser tolerante: si falta un campo opcional, default empty.watch_dir_fsnotifyrecursivo, debounce 200ms.
DoD
- 5 pares
.go+.mdenfunctions/infra/. - Tests unitarios:
- parse → write → parse round-trip preserva struct.
- scan_issues_dir devuelve >=90 issues actuales.
- watcher detecta creacion + modificacion + borrado.
fn indexregistra los 5 IDs + 3 tipos.fn doctor uses-functionslimpio.
Anti-scope
NO incluye en esta tanda:
- Markdown rendering del body (eso lo hace el frontend si quiere).
- Validacion contra TAXONOMY (existe
fn doctor issues). - CRUD de issues nuevos (write_issue cubre el caso, pero crear file = scope del backend).