tawasuyu

tawasuyu/brahman

Rust 492TOML 194Markdown 53JSON 176939 Definiciones

docs: fix factual errors en SDDs y STATUS/ROADMAP

Errores detectados al auditar afirmaciones técnicas contra el código:

1. minga-vfs: NO está relacionado con Mónadas (esas son de akasha).
   Es FUSE que proyecta el índice de minga (git semántico) como
   filesystem, resolviendo paths virtuales a blobs por hash.

2. protocol/SDD.md: Card tiene 19 campos, no 6. Añadido bloque con
   anatomía completa del struct.

3. STATUS.md: LOC por capa corregidos contra wc -l real
   - protocol: 6,260 → 7,278
   - init:     ~3,600 → 4,301
   - compat:   ~5,000 → 3,435 (estaba sobrestimado)

4. pineal: 6 stubs (<30 LOC c/u), no 5. Export (23 LOC) también es
   stub funcional. LOC reales por sub-crate documentados.

5. init/SDD.md: ente-soma es wrapper de 44 LOC, no ~30.

6. akasha/SDD.md: fastembed está detrás de feature `embeddings`,
   ort es transitivo. Sin feature, akasha-nous-real es stub mínimo.

7. vista/barra: LOC ajustados (vista-core 177, barra-core 108).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

e570c6ca6fb6f5bc576e6a2f021d8b22a2209438 · por sergio · (hace 5 meses) · padre 550c98f27 · ver el árbol en este commit

Delta semántico

Ninguna definición cambió: el cambio es de texto, documentación o datos.

9 archivos · +75 −31

diff --git a/crates/init/SDD.md b/crates/init/SDD.md
index e029a92..3e89d01 100644
--- a/crates/init/SDD.md
+++ b/crates/init/SDD.md
@@ -11,7 +11,7 @@ cgroups, y snapshot/restore del grafo.
 | ---------------- | ------- | ----------------------------------------------------- |
 | `ente-zero`      | binario | PID 1: reap + handshake server + bus dispatcher       |
 | `ente-kernel`    | lib     | `bootstrap_kernel_surface`, subreaper, SIGCHLD/uevent |
-| `ente-soma`      | lib     | Shim sobre `ente-incarnate` (compatibilidad legacy)   |
+| `ente-soma`      | lib     | Wrapper 44 LOC sobre `ente-incarnate` (compat API)    |
 | `ente-incarnate` | lib     | `clone(2) + namespaces + cgroup + rlimits + cpu`      |
 | `ente-snapshot`  | lib     | `FractalSnapshot` JSON: checkpoint del grafo Cards    |
 
diff --git a/crates/modules/akasha/SDD.md b/crates/modules/akasha/SDD.md
index 546c65c..530d498 100644
--- a/crates/modules/akasha/SDD.md
+++ b/crates/modules/akasha/SDD.md
@@ -18,8 +18,10 @@ locales (mock o real LLM) y un protocolo `Nous` line-delimited.
 
 - `akasha-core` ← `protocol/brahman-card`, `protocol/brahman-sidecar`,
   `akasha-card`, `akasha-nous`, `shuma-discern`.
-- `akasha-nous-real` ← `fastembed` + `ort` (heavy; profile opt-level=1
-  en root Cargo.toml).
+- `akasha-nous-real` ← `fastembed` (opcional, detrás de feature
+  `embeddings`; `ort` viene transitivo). Sin feature, el crate compila
+  como stub mínimo. Profile opt-level=1 en root Cargo.toml para
+  `fastembed`/`ort`/`tokenizers`/`image`.
 - Consumido por: `apps/akasha-explorer` (GPUI dashboard).
 
 ## Estado
diff --git a/crates/modules/barra/SDD.md b/crates/modules/barra/SDD.md
index dc8f860..aeaf524 100644
--- a/crates/modules/barra/SDD.md
+++ b/crates/modules/barra/SDD.md
@@ -38,4 +38,4 @@ bar.on_click(|id, cx, cy| { /* center en CSS pixels */ });
 ## Estado
 
 barra-core: 5 tests verdes (sanitize + escape + render). barra-web:
-binding mínimo (mount + click + center lookup). LOC ~280.
+binding mínimo (mount + click + center lookup). LOC core 108 + web ~190.
diff --git a/crates/modules/pineal/SDD.md b/crates/modules/pineal/SDD.md
index 1c70f74..24a0a25 100644
--- a/crates/modules/pineal/SDD.md
+++ b/crates/modules/pineal/SDD.md
@@ -30,6 +30,15 @@ de visualización no conocen `gpui` ni `wgpu`: hablan contra el trait
 
 ## Estado
 
-LOC ~3,900. 5 charts implementados (cartesian/financial/stream/phosphor
-/export). 5 stubs (<50 LOC c/u: polar, heatmap, treemap, flow, mesh).
-Roadmap: completar los 5 stubs en orden polar → heatmap → treemap.
+LOC ~4,000. **5 charts implementados** (LOC reales):
+- `core` 878, `render` 386, `cartesian` 1397, `financial` 688,
+  `stream` 231, `phosphor` 312, `umbrella` 53.
+
+**6 stubs (<30 LOC c/u)** — completar:
+- `polar` 16, `heatmap` 21, `treemap` 12, `flow` 16, `mesh` 28,
+  `export` 23 (SVG exporter no implementado pese a depender de él
+  el roadmap; verificar si export depende de los charts o vice versa).
+
+Roadmap: cerrar los 6 stubs. Orden sugerido: polar → heatmap →
+treemap → flow → mesh → export (este último porque depende del
+renderer común).
diff --git a/crates/modules/semantic_dht/SDD.md b/crates/modules/semantic_dht/SDD.md
index e25ed5f..cb6af73 100644
--- a/crates/modules/semantic_dht/SDD.md
+++ b/crates/modules/semantic_dht/SDD.md
@@ -11,7 +11,7 @@ y los publica en un DHT. Búsqueda por similitud semántica cross-repo.
 | `minga-core`   | lib  | Parser + α-hashing (Rust/Py/TS/JS/Go) + scoring            |
 | `minga-store`  | lib  | Sled backend para índice local                             |
 | `minga-p2p`    | lib  | Capa libp2p: kad + bootstrap + provider records            |
-| `minga-vfs`    | lib  | Stub (2 LOC) — montaje VFS de mónadas remotas              |
+| `minga-vfs`    | lib  | Stub (2 LOC) — FUSE que proyecta el índice como filesystem |
 | `minga-cli`    | bin  | CLI: index, search, peers, bootstrap                       |
 
 ## Dependencias
@@ -30,5 +30,7 @@ cierres en Py/TS/JS/Go.
 ## Estado
 
 LOC 5,091. Indexa repos reales. 15 TODOs en core (más patterns para
-cada lenguaje). `minga-vfs` aún no implementado — gating del
-"file system de mónadas". Ver `docs/changelog/minga.md`.
+cada lenguaje). `minga-vfs` aún no implementado — bloquea el montaje
+del repo como filesystem (paths virtuales → blobs por hash bajo
+demanda). NO está relacionado con Mónadas (esas son de `akasha/`).
+Ver `docs/changelog/minga.md`.
diff --git a/crates/modules/vista/SDD.md b/crates/modules/vista/SDD.md
index a468447..d9cffe7 100644
--- a/crates/modules/vista/SDD.md
+++ b/crates/modules/vista/SDD.md
@@ -37,4 +37,4 @@ if let Some(r) = deck.pointer_end(offset, width, n_pages) {
 
 vista-core: 5 tests verdes (drag decision + snap + clamp + goto).
 vista-web: binding DOM intacto, ahora delega toda la lógica a core.
-LOC 530 (core 175 + web 355). Reutilizable en backends no-web.
+LOC core 177 + web ~355. Reutilizable en backends no-web.
diff --git a/crates/protocol/SDD.md b/crates/protocol/SDD.md
index 384322d..c532e72 100644
--- a/crates/protocol/SDD.md
+++ b/crates/protocol/SDD.md
@@ -8,7 +8,7 @@ flows por tipo, y wire types de red. No corre lógica de dominio.
 
 | crate                  | tipo | rol                                                      |
 | ---------------------- | ---- | -------------------------------------------------------- |
-| `brahman-card`         | lib  | `Card { soma, payload, flow, permissions, supervision }` |
+| `brahman-card`         | lib  | Struct `Card` (19 campos, ver abajo)                     |
 | `brahman-card-wit`     | lib  | Extracción WIT desde componentes WASM                    |
 | `brahman-cards`        | lib  | Templates Nickel + helpers consumer/producer/broker      |
 | `brahman-handshake`    | lib  | Init↔módulo: Hello, Ping, ListSessions, ListMatches      |
@@ -18,6 +18,32 @@ flows por tipo, y wire types de red. No corre lógica de dominio.
 | `brahman-net`          | lib  | Malla libp2p opcional (TCP+noise+yamux+kad)              |
 | `ente-card`            | lib  | Alias legacy — re-export de `brahman-card`               |
 
+## Struct `Card` (anatomía completa)
+
+```rust
+pub struct Card {
+    schema_version: u16,         // versión del esquema fractal
+    id: Ulid,                     // identidad opaca única
+    lineage: Option<Ulid>,        // ancestro genealógico
+    label: String,                // nombre humano-legible
+    provides: BTreeSet<Capability>,
+    requires: BTreeSet<Capability>,
+    permissions: Permissions,     // sandbox declarativo
+    soma: SomaSpec,               // runtime Linux (ns + cgroup + rlimits)
+    payload: Payload,             // WASM | ELF | Virtual | Legacy
+    supervision: Supervision,     // restart policy
+    lifecycle: Lifecycle,         // ortogonal a supervision
+    priority: Priority,
+    flow: Flows,                  // contratos de datos in/out
+    service_socket: Option<PathBuf>,  // data plane separado
+    references: Vec<CardReference>,    // grafo de relaciones
+    kind: CardKind,               // Ente | Monada | Index | ...
+    data: Option<DataFacet>,      // None para entes runtime
+    genesis: Vec<Card>,           // hijas a encarnar inmediatamente
+    priority_contexts: BTreeMap<String, ContextBias>,
+}
+```
+
 ## Dependencias
 
 - Intra: handshake → card + broker; sidecar → card; net → handshake.
diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md
index 2738ab2..af3870d 100644
--- a/docs/ROADMAP.md
+++ b/docs/ROADMAP.md
@@ -25,16 +25,20 @@ Salida: cada crate con ≥1 test E2E + matriz de pánico.
 
 ## Hito 2 · Cerrar stubs bloqueantes (1 semana)
 
-| Stub                                | Donde                                  |
-| ----------------------------------- | -------------------------------------- |
-| `minga-vfs` (actual: 2 LOC)         | Mount FUSE de mónadas remotas          |
-| `pineal-polar` (<50 LOC)            | Gráfico circular polar                 |
-| `pineal-heatmap` (<50 LOC)          | Grid 2D color-mapped                   |
-| `pineal-treemap` (<50 LOC)          | Rectangular treemap                    |
-| `pineal-flow` (<50 LOC)             | Sankey / flow diagrams                 |
-| `pineal-mesh` (<50 LOC)             | Triangle mesh + barycentric            |
-
-Salida: 6 charts más operativos + minga viable como sistema de archivos.
+| Stub                          | Donde                                                  |
+| ----------------------------- | ------------------------------------------------------ |
+| `minga-vfs` (actual: 2 LOC)   | FUSE: proyecta el índice de minga como filesystem.     |
+|                               | Resuelve paths virtuales → blobs por hash bajo demanda |
+|                               | contra `minga-core` + DHT. NO relacionado con Mónadas. |
+| `pineal-polar` (16 LOC)       | Gráfico circular polar                                 |
+| `pineal-heatmap` (21 LOC)     | Grid 2D color-mapped                                   |
+| `pineal-treemap` (12 LOC)     | Rectangular treemap                                    |
+| `pineal-flow` (16 LOC)        | Sankey / flow diagrams                                 |
+| `pineal-mesh` (28 LOC)        | Triangle mesh + barycentric                            |
+| `pineal-export` (23 LOC)      | SVG/PNG export del RenderPlan                          |
+
+Salida: 6 charts más operativos + minga viable como filesystem
+montable (editor abriendo paths semánticos).
 
 ## Hito 3 · Cerrar TODOs concentrados (2 semanas)
 
diff --git a/docs/STATUS.md b/docs/STATUS.md
index 85658eb..a08e174 100644
--- a/docs/STATUS.md
+++ b/docs/STATUS.md
@@ -15,7 +15,7 @@ y `grep` sobre `src/` en cada crate (sin contar `target/` ni docs).
 ### `protocol/` — Estable
 | LOC | Tests | TODOs | Madurez |
 |---|---|---|---|
-| 6,260 | sí | 19 | ★★★★☆ |
+| 7,278 | sí | 19 | ★★★★☆ |
 
 Base del fractal. Handshake fase 3 (trust Ed25519) completo. Pendiente:
 fase 4 (trust beyond peer, capabilities revocables).
@@ -23,7 +23,7 @@ fase 4 (trust beyond peer, capabilities revocables).
 ### `init/` — Funcional
 | LOC | Tests | TODOs | Madurez |
 |---|---|---|---|
-| ~3,600 | parcial | ~5 | ★★★★☆ |
+| 4,301 | parcial | ~5 | ★★★★☆ |
 
 Bootea bare metal + QEMU + initramfs. Pendiente: cobertura tests sobre
 `FractalSnapshot` restore con stale fds y validación de re-encarnación.
@@ -31,7 +31,7 @@ Bootea bare metal + QEMU + initramfs. Pendiente: cobertura tests sobre
 ### `runtime/` — Funcional con deuda
 | LOC | Tests | TODOs | Madurez |
 |---|---|---|---|
-| ~3,400 | parcial | ~14 | ★★★☆☆ |
+| 3,418 | parcial | ~14 | ★★★☆☆ |
 
 `ente-brain` concentra 11 TODOs (rule engine declarativo + observer
 estadístico). `ente-bus`/`ente-cas`/`ente-wasm` estables.
@@ -39,7 +39,7 @@ estadístico). `ente-bus`/`ente-cas`/`ente-wasm` estables.
 ### `compat/` — Cobertura mínima viable
 | LOC | Tests | TODOs | Madurez |
 |---|---|---|---|
-| ~5,000 | no (esperado) | bajo | ★★★☆☆ |
+| 3,435 | no (esperado) | bajo | ★★★☆☆ |
 
 14 shims D-Bus operativos. Suficiente para GNOME/KDE/PolicyKit básicos.
 Pendiente: métodos avanzados (Inhibit en logind, SetVariable en localed).
@@ -63,10 +63,11 @@ shell standard. Estable.
 ### `modules/pineal/` — Funcional con stubs
 | LOC | Tests | TODOs | Madurez |
 |---|---|---|---|
-| ~3,900 | sí | bajo | ★★★☆☆ |
+| ~4,000 | sí | bajo | ★★★☆☆ |
 
-5 charts funcionales (cartesian, financial, stream, phosphor, export).
-**5 stubs (<50 LOC c/u): polar, heatmap, treemap, flow, mesh.**
+5 charts funcionales (`core`, `render`, `cartesian`, `financial`,
+`stream`, `phosphor`, `umbrella`).
+**6 stubs (<30 LOC c/u): `polar`, `heatmap`, `treemap`, `flow`, `mesh`, `export`.**
 
 ### `modules/nakui/` — Maduro
 | LOC | Tests | TODOs | Madurez |
@@ -109,14 +110,14 @@ Parser + reader web. Pendiente: AST con inline elements (links, emphasis).
 ### `modules/vista/` — Refactorizado (2026-05-19)
 | LOC | Tests | TODOs | Madurez |
 |---|---|---|---|
-| 530 (175 core + 355 web) | core: 5/5 verdes | 0 | ★★★★☆ |
+| ~530 (177 core + ~350 web) | core: 5/5 verdes | 0 | ★★★★☆ |
 
 `vista-core` agnóstico nuevo + `vista-web` ahora thin DOM binding.
 
 ### `modules/barra/` — Refactorizado (2026-05-19)
 | LOC | Tests | TODOs | Madurez |
 |---|---|---|---|
-| 280 (90 core + 190 web) | core: 5/5 verdes | 0 | ★★★★☆ |
+| ~300 (108 core + ~190 web) | core: 5/5 verdes | 0 | ★★★★☆ |
 
 `barra-core` agnóstico nuevo (Task + render_html). `barra-web`
 delega al core.