ai-first-os 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +226 -0
  3. package/bin/ai-first-os.js +72 -0
  4. package/core/CLAUDE.md +148 -0
  5. package/core/VERSION +1 -0
  6. package/core/agents/ambiguous-spec.md +39 -0
  7. package/core/agents/complete-spec.md +36 -0
  8. package/core/agents/scout.md +25 -0
  9. package/core/install.sh +243 -0
  10. package/core/lib/archive.sh +347 -0
  11. package/core/lib/bootstrap.sh +276 -0
  12. package/core/lib/capture.sh +188 -0
  13. package/core/lib/check-resolvable.sh +172 -0
  14. package/core/lib/close-session.sh +741 -0
  15. package/core/lib/common.sh +1773 -0
  16. package/core/lib/focus-read.sh +282 -0
  17. package/core/lib/manual-link.sh +111 -0
  18. package/core/lib/markdown.py +304 -0
  19. package/core/lib/migrate-backlogs.sh +207 -0
  20. package/core/lib/migrate-canonicals.sh +523 -0
  21. package/core/lib/mount-repo.sh +543 -0
  22. package/core/lib/my-wiki-gates.sh +137 -0
  23. package/core/lib/my-wiki.sh +202 -0
  24. package/core/lib/my_wiki_build.py +548 -0
  25. package/core/lib/my_wiki_graph.py +137 -0
  26. package/core/lib/my_wiki_overview.py +392 -0
  27. package/core/lib/new-memory.sh +160 -0
  28. package/core/lib/new-product.sh +122 -0
  29. package/core/lib/new-workspace.sh +105 -0
  30. package/core/lib/pack-install.sh +114 -0
  31. package/core/lib/recall.sh +235 -0
  32. package/core/lib/recall_index.py +295 -0
  33. package/core/lib/remote-backup.sh +84 -0
  34. package/core/lib/rename-heads.sh +354 -0
  35. package/core/lib/rename-workspaces.sh +271 -0
  36. package/core/lib/session-read.sh +203 -0
  37. package/core/lib/session-start.sh +854 -0
  38. package/core/lib/supersede.sh +436 -0
  39. package/core/lib/sweep.sh +473 -0
  40. package/core/manual/COMO-FUNCIONA.md +251 -0
  41. package/core/manual/HOW-IT-WORKS.md +250 -0
  42. package/core/resolver.md +30 -0
  43. package/core/skills/archive.md +95 -0
  44. package/core/skills/bootstrap.md +226 -0
  45. package/core/skills/capture.md +65 -0
  46. package/core/skills/check-resolvable.md +38 -0
  47. package/core/skills/close-session.md +108 -0
  48. package/core/skills/grill.md +74 -0
  49. package/core/skills/mount-repo.md +97 -0
  50. package/core/skills/my-wiki.md +103 -0
  51. package/core/skills/new-memory.md +76 -0
  52. package/core/skills/new-product.md +55 -0
  53. package/core/skills/new-spec.md +114 -0
  54. package/core/skills/new-workspace.md +53 -0
  55. package/core/skills/recall.md +64 -0
  56. package/core/skills/rename-heads.md +72 -0
  57. package/core/skills/rename-workspaces.md +43 -0
  58. package/core/skills/supersede.md +83 -0
  59. package/core/skills/sweep.md +40 -0
  60. package/core/templates/my-wiki-graph.js +431 -0
  61. package/core/templates/my-wiki-overview.js +174 -0
  62. package/core/templates/my-wiki.html +1017 -0
  63. package/core/templates/node-folder/README.md +11 -0
  64. package/core/templates/node-folder/resolver.md +9 -0
  65. package/core/templates/node-light.md +22 -0
  66. package/core/templates/node-product/README.md +8 -0
  67. package/core/templates/node-repo/README.md +14 -0
  68. package/core/templates/node-repo/context/README.md +22 -0
  69. package/core/templates/node-repo/context/competitors.md +8 -0
  70. package/core/templates/node-repo/context/glossary.md +8 -0
  71. package/core/templates/node-repo/context/open-questions.md +9 -0
  72. package/core/templates/node-repo/context/opportunities.md +9 -0
  73. package/core/templates/node-repo/context/problem.md +8 -0
  74. package/core/templates/node-repo/context/scope.md +8 -0
  75. package/core/templates/node-repo/context/users.md +8 -0
  76. package/core/templates/node-repo/context/vision.md +8 -0
  77. package/core/templates/node-repo/resolver.md +14 -0
  78. package/core/templates/operator.md +17 -0
  79. package/core/templates/person.md +10 -0
  80. package/core/templates/repo-scaffold/ARCHITECTURE.md +3 -0
  81. package/core/templates/repo-scaffold/CLAUDE.md +23 -0
  82. package/core/templates/repo-scaffold/decisions.md +3 -0
  83. package/core/templates/repo-scaffold/evals-run.sh +14 -0
  84. package/core/templates/repo-scaffold/gitignore +3 -0
  85. package/core/templates/repo-scaffold/settings.json +8 -0
  86. package/core/templates/root-resolver.md +5 -0
  87. package/core/templates/strings.md +1361 -0
  88. package/core/templates/tree.md +59 -0
  89. package/core/templates/voice.md +5 -0
  90. package/package.json +23 -0
@@ -0,0 +1,251 @@
1
+ # AI First OS — cómo funciona este sistema
2
+
3
+ > **Este archivo es el manual del sistema y es parte del producto.** Está enlazado desde el
4
+ > producto, así que se mantiene solo: cuando el sistema se actualiza, este texto se actualiza con
5
+ > él. Nada de lo que escribís vive acá — lo que edites en este archivo lo pisa la próxima
6
+ > actualización. Tus cosas viven en los otros archivos, y este manual dice cuáles son.
7
+
8
+ ## La idea en una línea
9
+
10
+ **Tu agente lee tu contexto de archivos, trabaja con vos en la sesión y lo que importa queda
11
+ escrito** — nunca adentro de la memoria de un chat.
12
+
13
+ Los archivos son tuyos: texto plano, en tu carpeta, legibles sin este sistema instalado. Lo que el
14
+ sistema agrega es dónde va cada cosa y quién la vuelve a leer.
15
+
16
+ ## Dos nombres, dos cosas
17
+
18
+ - **AI First OS** es el software: los skills, el contrato de sesión, los agentes. Se instala y se
19
+ actualiza, y no guarda nada tuyo.
20
+ - **Tu brain** es esta carpeta: tu identidad, tu voz y tu trabajo. Es lo que el sistema opera y lo
21
+ único que es tuyo.
22
+
23
+ La analogía es un sistema operativo y tu disco: el OS se actualiza; tu brain no se toca. Por eso
24
+ no se "instala un brain" — se instala el OS, y tu brain nace una sola vez, con la entrevista.
25
+
26
+ ## Todo es un nodo
27
+
28
+ Hay un solo primitivo, repetido a todas las alturas: el **nodo**. Tu trabajo propio es un nodo —la
29
+ raíz de esta carpeta— y cada **espacio de trabajo** —una empresa o cliente para el que trabajás; el
30
+ caso de un curso es uno más— es otro (`workspaces/<nombre>/`). Todos los nodos contestan las mismas
31
+ preguntas, y cada pregunta es un archivo:
32
+
33
+ | Archivo | Qué contesta |
34
+ |---|---|
35
+ | `operator.md` | Quién sos y cómo querés que te contesten |
36
+ | `voice.md` | Cómo escribís cuando escribís bien |
37
+ | `resolver.md` | Capacidad → herramienta: qué skill resuelve qué pedido |
38
+ | `tree.md` | Qué rutas recorre un barrido — el mapa del sistema |
39
+ | `workspaces/<nombre>/README.md` | Qué es ese espacio de trabajo y qué oficio tuyo activa |
40
+ | `workspaces/<nombre>/<tipo>/<slug>/README.md` | Qué es un nodo de memoria, para quién, y qué se sabe de él — `products/` es el único tipo que el sistema trae con herramienta propia |
41
+ | `workspaces/<nombre>/people/<slug>.md` | Quién es una persona, su organización y su cargo, su contacto y cómo conviene tratarla — contenido del espacio de trabajo, nunca un nodo: el barrido nunca lo lee |
42
+ | `initiatives/<slug>/README.md` | El trabajo: una cabeza por iniciativa, con su estado, su horizonte y `about:` con la entidad de la que cuelga — obligatorio, y chequeado al arranque de cada sesión |
43
+ | `initiatives/<slug>/backlog.md` | Las tareas de esa iniciativa, y solo de esa — una tarea cuelga de una iniciativa y nunca de un espacio de trabajo ni de la raíz |
44
+ | `decisions.md` | El índice de lo que se decidió — una línea por decisión, cada una enlaza a su propio archivo en `decisions/` con el porqué y qué lo volvería falso |
45
+ | `learnings.md` | El índice de lo que se aprendió — una línea por aprendizaje, cada una enlaza a su propio archivo en `learnings/`, incluido lo que se intentó y no cerró |
46
+ | `inbox.md` | Lo que no se pudo clasificar — nunca se tira en silencio |
47
+
48
+ **Todo nodo tiene la misma forma: una carpeta con el nombre de la cosa, y `README.md` adentro.** El
49
+ nombre aparece una sola vez —la carpeta—, la cabeza se llama siempre igual, y cualquiera que abra la
50
+ carpeta sabe por dónde empezar. La raíz es la excepción: su carpeta es esta, y su cabeza es
51
+ `operator.md`.
52
+
53
+ **Un nodo de memoria es memoria, una iniciativa es empuje.** Un nodo de memoria guarda qué es, para
54
+ quién y qué se sabe de él; una iniciativa guarda su estado, su horizonte y cuándo cierra. Un nodo de
55
+ memoria puede sobrevivir a todas las iniciativas que se construyeron a su alrededor, y una iniciativa
56
+ nunca necesita uno para existir.
57
+
58
+ Un archivo nace la primera vez que tiene algo real que guardar. Un archivo vacío no es estructura:
59
+ es ruido que hay que leer todas las sesiones.
60
+
61
+ ### Nodos de memoria: cualquier carpeta puede ser un tipo
62
+
63
+ **La carpeta es el tipo.** No hay ningún campo `type:`: la ruta ya dice de qué tipo de cosa se trata.
64
+ `products/` es el único tipo que el sistema trae con herramienta propia (`prd`, que escribe su capa
65
+ estratégica). Cualquier carpeta hermana de nodos que guarden memoria en vez de empuje funciona igual:
66
+ `accounts/` para cuentas de clientes, `channels/` para los canales por los que publicás, o un nombre
67
+ que inventes vos.
68
+
69
+ `new-memory --type <tipo>` crea un tipo la primera vez que se usa —la carpeta más las cinco líneas
70
+ que necesita en `tree.md`— y le suma su primer nodo. El mismo comando con el mismo `--type` y otro
71
+ `--slug` suma otro nodo a un tipo que ya existe —otra cuenta, otro canal— sin líneas nuevas ni
72
+ duplicadas. `--root` hace que el tipo viva en la raíz de tu trabajo propio en vez de adentro de un
73
+ espacio de trabajo, igual que `channels/` puede vivir ahí para contenido que es tuyo, no de un
74
+ cliente.
75
+
76
+ Un tipo que el sistema trae se nombra en inglés —hoy, solo `products`—. Un tipo que inventás se
77
+ nombra como quieras: es contenido de tu brain, no un componente del sistema. Tres nombres para
78
+ arrancar, si preferís un catálogo antes que inventar uno: `products` (qué construís, para quién),
79
+ `accounts` (una relación con un cliente o una empresa), `channels` (dónde publicás). Inventar el tuyo
80
+ —cualquier cosa que sea memoria y no empuje— es igual de legítimo: la carpeta más sus líneas en
81
+ `tree.md`, y un `context/` que llenás a mano hasta que exista una herramienta propia como `prd`, si
82
+ alguna vez existe.
83
+
84
+ ### Las personas, y la relación que las nombra
85
+
86
+ Una persona nunca es un nodo. `workspaces/<nombre>/people/<slug>.md` es contenido, la misma clase que
87
+ el `voice.md` de un espacio de trabajo o el `research/` de un producto: el árbol lo alcanza y lo
88
+ cuenta, y ni el barrido ni un foco lo abren salvo que la sesión lo nombre por ruta. Quién es, para
89
+ quién trabaja y su cargo, cómo contactarla y cómo conviene tratarla viven todos en ese archivo, escrito
90
+ a mano desde `core/templates/person.md` — ningún comando lo crea, y su frontmatter nunca se chequea
91
+ contra una lista fija: una clave de más no es un hallazgo, y este manual no promete que lo sea.
92
+
93
+ **Lo que ata a una persona con un nodo es una línea en el nodo, nunca un campo de la persona.** La
94
+ misma persona puede decidir una iniciativa y ser parte del equipo del espacio de trabajo a la vez, y
95
+ escribir las dos relaciones en el archivo de la persona obligaría a mantener dos copias sincronizadas
96
+ a mano en vez de una. La línea lleva la ruta de la persona entre backticks, su rol, y desde cuándo:
97
+
98
+ `` `people/<slug>.md` · <rol> · desde <fecha> ``
99
+
100
+ Nada la analiza sola —un chequeo que abriera el cuerpo de cada iniciativa para verificar una ruta
101
+ volvería a pagar el costo que el barrido existe para evitar— y se escribe en tres alturas, cada una su
102
+ propia sección:
103
+
104
+ - **Stakeholders de una iniciativa** — su propia sección `## Stakeholders`, para quien decide o le
105
+ afecta ese trabajo puntual.
106
+ - **Stakeholders de una entidad** — la misma sección en la cabeza de un producto, una cuenta o un
107
+ canal, para quien es stakeholder de la cosa misma, no de una iniciativa construida a su alrededor.
108
+ - **Equipo del espacio de trabajo** — una sección `## Team` en la cabeza del espacio de trabajo, para
109
+ quien es parte de él de forma permanente, sin atarse a ninguna iniciativa.
110
+
111
+ ## El ciclo de una sesión
112
+
113
+ 1. **Arranque.** Nombrás el ámbito —un espacio de trabajo, o tu trabajo propio— y el agente corre el
114
+ **barrido** antes de contestar nada: qué espera tu decisión, qué está en curso, qué está trabado
115
+ y por quién, qué hay en cola y qué encontraron los chequeos. Después elegís foco, y recién ahí se
116
+ carga el cuerpo de esa iniciativa.
117
+ 2. **Trabajo.** Cada pedido se rutea a su herramienta por el resolver. Nada se activa solo, y
118
+ ninguna acción irreversible —mandar, publicar, firmar, mergear— corre sin tu sí.
119
+ 3. **Captura.** Lo que aparece al vuelo se archiva donde corresponde sin cortar el hilo, y la
120
+ respuesta dice dónde quedó.
121
+ 4. **Cierre.** Dos preguntas —qué no puede perderse y qué casi funcionó— y un veredicto en cuatro
122
+ partes: qué se archivó, qué no, qué fila podría ganar el resolver y por dónde retomar. Nunca un
123
+ "listo" a secas: un cierre que solo dice que terminó no se distingue de uno que perdió algo.
124
+
125
+ ## Living Memory: encontrar lo que el foco no carga
126
+
127
+ El barrido y el foco solo cargan una lista fija de archivos, más un salto por `about:`. Una decisión
128
+ escrita meses atrás en otro espacio de trabajo es real, pero nada la saca a la luz sola — hasta que
129
+ vos, o el agente en tu nombre, se la pedís a `recall`.
130
+
131
+ `recall` busca en todo lo que el árbol alcanza, partido en entradas —un encabezado y su cuerpo, o un
132
+ ítem de lista, nunca un archivo entero de una— y devuelve las coincidencias más cercanas con su
133
+ archivo, línea y fecha, con lo vigente siempre antes de lo que un archivo dice que fue reemplazado.
134
+ `recall --expand <ruta>` muestra los vecinos inmediatos de un resultado: de qué trata, quién trata
135
+ de él, qué lo reemplazó, a qué reemplazó.
136
+
137
+ **Encuentra, no decide.** Dos resultados vigentes que dicen cosas distintas se te entregan como una
138
+ contradicción para resolver, nunca elegidos en silencio. Y es descartable: lo que busca es un
139
+ archivo chico que se reconstruye solo desde tus propios archivos, nunca algo que vos escribís o
140
+ respaldás.
141
+
142
+ ## Dónde vive la maquinaria
143
+
144
+ Las herramientas —skills, scripts, agentes— viven en `.os/` y `.claude/`. Esas dos carpetas están
145
+ ocultas en Obsidian y se ven desde la terminal, y son **enlaces** al producto instalado: actualizar
146
+ el sistema no toca tus datos, y tus datos nunca viajan adentro del producto.
147
+
148
+ **Dónde viven los skills**, porque es lo primero que todo el mundo pregunta: los
149
+ <!--count-->diecisiete<!--/count--> skills del sistema están en `.os/core/skills/`, un archivo cada uno, y
150
+ se llega a ellos por el resolver — no están copiados en esta carpeta, están enlazados al producto.
151
+ Los skills de un pack están en `.claude/skills/<nombre>/SKILL.md`, una carpeta por skill, que es de
152
+ donde tu harness lee los skills y por eso responden a su nombre. Cualquier skill que escribas vos va
153
+ al lado, como carpeta común en `.claude/skills/`.
154
+
155
+ Para actualizar, pedile a cualquier sesión: **"actualizá el sistema"**. Con esa frase alcanza, y
156
+ cubre las dos mitades de lo que está instalado — el sistema y los packs. Qué hace paso a paso está
157
+ escrito una sola vez, en el `README.md` de la carpeta del producto bajo **Update**; este manual
158
+ apunta ahí en vez de contarlo de nuevo, porque dos versiones del mismo procedimiento se separan.
159
+
160
+ ## Qué podés pedir, y cómo
161
+
162
+ **El índice es el resolver, no tu memoria.** Pedís con tus palabras —"qué hay pendiente", "cerrá la
163
+ sesión", "capturá esto"— y el agente busca qué herramienta cubre esa capacidad. Dos archivos
164
+ contestan eso: el del producto, que viaja con el sistema, y el tuyo (`resolver.md`), donde agregás
165
+ una fila cuando el agente habría elegido mal sin ella. Tus filas ganan.
166
+
167
+ El catálogo de abajo es el sistema mismo — las <!--count-->diecisiete<!--/count--> herramientas que vienen
168
+ con él. También podés invocar cualquiera por su nombre.
169
+
170
+ <!-- catalog: generated by scripts/manual-catalog.sh — do not edit by hand -->
171
+
172
+ **El núcleo** — las herramientas que hacen andar el sistema:
173
+
174
+ - **`archive`** — Mueve un documento al `archive/` del nodo para que el foco deje de cargarlo y pase a listarlo por nombre, reescribiendo todas las referencias que lo apuntaban — y lo trae de vuelta igual.
175
+ - **`bootstrap`** — Crea el brain desde cero — la skill de entrada.
176
+ - **`capture`** — Archiva lo que el operador tira al vuelo en el backlog de la iniciativa que lo consume, una vez que hay una iniciativa nombrada — nada se archiva sin clasificar.
177
+ - **`check-resolvable`** — Audita el grafo capacidad → herramienta de la raíz y reporta las tres fallas que puede tener — una herramienta que nadie rutea, un handoff que ninguna fila provee y una fila que apunta a una herramienta que no existe.
178
+ - **`close-session`** — Cierra la sesión repartiendo lo que produjo —decisiones, aprendizajes, pendientes, lo que quedó esperando, por dónde retomar— en los archivos canónicos del nodo cargado, y termina con un veredicto de cuatro partes que nombra lo que no se capturó.
179
+ - **`grill`** — Presiona los hechos detrás de una afirmación antes de que una decisión cierre — contrapregunta con un ejemplo concreto, intentos acotados, escape hatches, jerarquía de evidencia — y rutea lo que salga a las decisiones o al backlog del nodo cargado.
180
+ - **`mount-repo`** — Le da cuerpo a una iniciativa: escribe el remote en el frontmatter de la cabeza, clona el checkout afuera del brain —o, con --new, hace nacer el repo desde la plantilla del producto cuando todavía no existe— y registra la fila remote → ruta local en la tabla del entorno de la máquina.
181
+ - **`my-wiki`** — Proyecta el cerebro como una sola página navegable — selector de espacio de trabajo, un estante por cada tipo de entidad que declara el árbol, las iniciativas colgando de la entidad de la que tratan, las personas y una búsqueda que corre adentro de la página.
182
+ - **`new-memory`** — Crea un tipo de nodo de memoria la primera vez que se usa —una carpeta más sus cinco líneas en `tree.md`— y le suma un nodo.
183
+ - **`new-product`** — Suma un producto a un espacio de trabajo que ya existe.
184
+ - **`new-spec`** — Convierte en una spec el trabajo de construcción concreto que salió de una conversación, adentro de specs/ del repo destino, con evals ejecutables por criterio, las decisiones separadas por quién las cierra y los efectos que escapan del sistema declarados.
185
+ - **`new-workspace`** — Suma un espacio de trabajo a un brain que ya existe.
186
+ - **`recall`** — Busca en todo lo que `tree.md` alcanza — no solo lo que carga el arranque y el foco — y devuelve las entradas que coinciden, con archivo, línea, fecha y si cada una sigue vigente o fue reemplazada.
187
+ - **`rename-heads`** — Mueve un brain nacido antes de la forma única de nodo a esa forma — cada nodo pasa a ser una carpeta con su `README.md` adentro, cada iniciativa tiene su carpeta, y los documentos fechados de cada producto van a `research/` —, reescribiendo las rutas de cabeza en todo lo que el sistema lee como ruteo y listando lo que deja sin tocar.
188
+ - **`rename-workspaces`** — Mueve un brain que todavía usa el nombre anterior de la carpeta de espacios de trabajo al nombre actual, reescribiendo el prefijo en todo lo que el sistema lee como estructura o ruteo, y listando lo que deja sin tocar para que el operador lo revise.
189
+ - **`supersede`** — Escribe sobre un archivo la marca que dice qué otro archivo lo reemplazó, para que una sesión que abra el viejo sepa qué leer en su lugar, y audita las marcas de todo el brain — las que apuntan a un archivo que no está, las que cierran un ciclo y las cabezas reemplazadas que siguen leyéndose como trabajo abierto.
190
+ - **`sweep`** — Corre uno de los tres barridos globales sobre todos los espacios de trabajo más el trabajo propio de la raíz — qué hay pendiente, qué está trabado y por qué, o cómo va el roadmap — leyendo solo frontmatter.
191
+
192
+ <!-- /catalog -->
193
+
194
+ ### Los packs: el oficio de arriba
195
+
196
+ Esas <!--count-->diecisiete<!--/count--> hacen andar el sistema. **El oficio —construir producto, y lo que
197
+ venga después— llega en packs**, y un pack se instala aparte, con su propio comando, adentro de
198
+ `.claude/skills/` de esta carpeta. **Un pack se ofrece, nunca se exige**: la instalación terminó
199
+ preguntándote si lo querías ahora o después, y si dijiste después la tarea está en tu backlog con el
200
+ comando adentro. Sumar otro, volver a poner uno, o tomar el que postergaste es un pedido a cualquier
201
+ sesión: **"instalá el pack `<nombre>`"**.
202
+
203
+ **Este manual no lista qué trae un pack, a propósito.** Cada pack viaja con su propio índice, y ese
204
+ índice llega con él — así la lista que leés es siempre la que tenés, nunca la que el manual se
205
+ acordaba. Pedí lo que querés con tus palabras: la sesión lee el índice de lo que esté instalado y te
206
+ rutea, o te dice que nada de lo instalado lo cubre.
207
+
208
+ ## Trabajar con agentes: dos gates y un tramo autónomo
209
+
210
+ El trabajo pesado se delega a agentes que corren en segundo plano, mientras la sesión principal se
211
+ queda al timón — nunca se muda de carpeta ni pierde tu contexto.
212
+
213
+ - **`scout`** — lee fuentes (código, documentación, otra spec) y vuelve con una síntesis. No escribe
214
+ nada: las herramientas con las que corre no le permiten tocar un archivo.
215
+ - **`complete-spec`** — implementa una spec donde cada criterio tiene su chequeo ejecutable.
216
+ - **`ambiguous-spec`** — implementa una spec con decisiones abiertas, donde hace falta juicio.
217
+
218
+ El patrón de supervisión tiene **dos gates humanos y un tramo autónomo en el medio**: una persona
219
+ aprueba la spec (**gate 1**) → el agente la implementa en una rama, nunca sobre la rama principal y
220
+ nunca con un push → una persona lee la rama y la mergea (**gate 2**). Autonomía en el medio, control
221
+ humano en los bordes.
222
+
223
+ ## Capacidades dormidas: la capa de construcción
224
+
225
+ Este sistema no es solo para decidir: **también construye producto, y esa mitad queda dormida hasta
226
+ que la pidas.** No es un modo que se prende para todo el brain, ni algo que se instale de nuevo: se
227
+ **activa por iniciativa**, el día en que una deja de ser una decisión y pasa a ser algo que se
228
+ construye.
229
+
230
+ Cuando eso pasa, se despiertan dos capacidades:
231
+
232
+ - **`mount-repo`** — le da cuerpo a una iniciativa: apunta la cabeza al repositorio de código, deja
233
+ el checkout afuera de tu carpeta y registra dónde quedó en esta máquina. Si el repositorio todavía
234
+ no existe, el mismo comando lo hace nacer —con su constitución, sus carpetas y su primer commit— y
235
+ te deja el comando para crear el remoto. A partir de ahí, esa iniciativa tiene dónde construirse.
236
+ - **`new-spec`** — convierte en spec el trabajo de construcción que salió de una conversación: qué
237
+ tiene que ser cierto, cómo se verifica cada criterio, qué decisiones ya están cerradas y cuáles
238
+ siguen abiertas con quién las cierra. Esa spec es lo que después implementa un agente, con los dos
239
+ gates de arriba.
240
+
241
+ No hace falta que prepares nada hoy. Pedilo —"esta iniciativa se va a construir"— y las dos ya están
242
+ instaladas.
243
+
244
+ ## Lo que el sistema nunca hace solo
245
+
246
+ - **Nada se activa por su cuenta.** La herramienta se elige por el resolver y se invoca explícito.
247
+ - **Ninguna acción irreversible corre sola.** Mandar, publicar, firmar y mergear se preparan y
248
+ después se piden.
249
+ - **Lo que escribe la IA queda marcado**: 📌 literal, con el archivo y la línea de donde salió · 🔍
250
+ inferencia · ❓ hueco. Lo que falta queda registrado como abierto, con quién lo cierra. Nunca se
251
+ inventa.
@@ -0,0 +1,250 @@
1
+ # AI First OS — how this system works
2
+
3
+ > **This file is the manual of the system, and it is part of the product.** It is linked from the
4
+ > product, so it stays up to date on its own: when the system is updated, this text is updated with
5
+ > it. Nothing you write belongs here — anything you edit in this file is overwritten by the next
6
+ > update. Your things live in the other files, and this manual says which ones.
7
+
8
+ ## The idea in one line
9
+
10
+ **Your agent reads your context from files, works with you in the session, and whatever matters
11
+ stays written down** — never inside the memory of a chat.
12
+
13
+ The files are yours: plain text, in your folder, readable without this system installed. What the
14
+ system adds is where each thing goes and who reads it back.
15
+
16
+ ## Two names, two things
17
+
18
+ - **AI First OS** is the software: the skills, the session contract, the agents. It gets installed
19
+ and updated, and it stores nothing of yours.
20
+ - **Your brain** is this folder: your identity, your voice and your work. It is what the system
21
+ operates, and the only part that is yours.
22
+
23
+ The analogy is an operating system and your disk: the OS gets updated; your brain is never
24
+ touched. That is why you do not "install a brain" — you install the OS, and your brain is born
25
+ once, through the interview.
26
+
27
+ ## Everything is a node
28
+
29
+ There is one single building block, repeated at every height: the **node**. Your own work is a node
30
+ —the root of this folder—, and each **workspace** —a company or client you work for; a course case
31
+ is one too— is another one (`workspaces/<name>/`). Every node answers the same questions, and each
32
+ question is a file:
33
+
34
+ | File | What it answers |
35
+ |---|---|
36
+ | `operator.md` | Who you are and how you want to be answered |
37
+ | `voice.md` | How you write when you write well |
38
+ | `resolver.md` | Capability → tool: which skill resolves which request |
39
+ | `tree.md` | Which paths a scan walks — the map of the system |
40
+ | `workspaces/<name>/README.md` | What that workspace is and which standing craft it activates |
41
+ | `workspaces/<name>/<type>/<slug>/README.md` | What a memory node is, for whom, and what is known about it — `products/` is the one type this system ships with its own tool |
42
+ | `workspaces/<name>/people/<slug>.md` | Who a person is, their organization and title, their contact and how it is best to deal with them — content of the workspace, never a node: the scan never reads it |
43
+ | `initiatives/<slug>/README.md` | The work: one head per initiative, with its state, its horizon, and `about:` naming the entity it hangs from — mandatory, and checked at the start of every session |
44
+ | `initiatives/<slug>/backlog.md` | That initiative's own tasks, and only that initiative's — a task hangs from an initiative and never from a workspace or the root |
45
+ | `decisions.md` | The index of what was decided — one line per decision, each linking to its own file under `decisions/` with why and what would make it false |
46
+ | `learnings.md` | The index of what was learned — one line per learning, each linking to its own file under `learnings/`, including what was tried and did not close |
47
+ | `inbox.md` | What could not be classified — it is never dropped in silence |
48
+
49
+ **Every node has the same shape: a folder with the name of the thing, and `README.md` inside.** The
50
+ name shows up once —the folder—, the head is always called the same, and anyone who opens the folder
51
+ knows where to start. The root is the exception: its folder is this one, and its head is
52
+ `operator.md`.
53
+
54
+ **A memory node is memory, an initiative is push.** A memory node holds what it is, who it is for
55
+ and what is known about it; an initiative holds its state, its horizon and when it closes. A memory
56
+ node can outlive every initiative built around it, and an initiative never needs one to exist.
57
+
58
+ A file is born the first time it has something real to hold. An empty file is not structure: it is
59
+ noise that has to be read every session.
60
+
61
+ ### Memory nodes: any folder can be a type
62
+
63
+ **The folder is the type.** There is no `type:` field anywhere — the path already says what kind of
64
+ thing a node is. `products/` is the one type this system ships with its own tool (`prd`, which writes
65
+ its strategic layer). Any sibling folder of nodes that hold memory instead of push works exactly the
66
+ same way: `accounts/` for client accounts, `channels/` for the channels you publish through, or a
67
+ name you invent.
68
+
69
+ `new-memory --type <type>` creates a type the first time you use it — the folder plus the five lines
70
+ it needs in `tree.md` — and adds its first node. The same command with the same `--type` and a new
71
+ `--slug` adds another node to a type that already exists — sibling accounts, sibling channels — no
72
+ new tree lines, nothing duplicated. `--root` makes the type live at the root of your own work instead
73
+ of inside a workspace, the way `channels/` can live there for content that is yours, not a client's.
74
+
75
+ A type this system ships is named in English — today, only `products`. A type you invent is named
76
+ however you like: it is content of your brain, not a component of the system. Three names to start
77
+ from, if you want a catalog instead of inventing one: `products` (what you build, for whom),
78
+ `accounts` (a client or company relationship), `channels` (where you publish). Inventing your own —
79
+ anything that is memory and not push — is exactly as legitimate: the folder plus its lines in
80
+ `tree.md`, and a `context/` you fill by hand until a purpose-built tool like `prd` exists for it, if
81
+ one ever does.
82
+
83
+ ### People, and the relationship that mentions them
84
+
85
+ A person is never a node. `workspaces/<name>/people/<slug>.md` is content, the same class as a
86
+ workspace's `voice.md` or a product's `research/`: the tree reaches it and counts it, and neither the
87
+ scan nor a focus opens it unless the session names it by path. Who someone is, who they work for and
88
+ their title, how to reach them, and how it is best to deal with them all live in that one file, written by
89
+ hand from `core/templates/person.md` — no command creates it, and a person's frontmatter is never
90
+ checked against a fixed list: an extra key is not a finding, and this manual does not promise it is.
91
+
92
+ **What ties a person to a node is a line in the node itself, never a field on the person.** The same
93
+ person can decide one initiative and sit on the workspace's own team at the same time, and writing
94
+ both relationships on the person's file would keep two copies in sync by hand instead of one. The line
95
+ carries the person's path in backticks, their role, and since when:
96
+
97
+ `` `people/<slug>.md` · <role> · since <date> ``
98
+
99
+ Nothing parses it on its own — a check that opened every initiative's body to verify a path would undo
100
+ the reason the scan stays fast — and it is written at three heights, each its own section:
101
+
102
+ - **Stakeholders of an initiative** — its own `## Stakeholders` section, for whoever decides on or is
103
+ affected by that one piece of work.
104
+ - **Stakeholders of an entity** — the same section on a product's, an account's or a channel's head,
105
+ for whoever is a stakeholder of the thing itself, not of one initiative built around it.
106
+ - **Team of the workspace** — a `## Team` section on the workspace's own head, for whoever is part of
107
+ it on a standing basis, tied to no initiative.
108
+
109
+ ## The cycle of one session
110
+
111
+ 1. **Start.** You name the scope —a workspace, or your own work— and the agent runs the **scan**
112
+ before answering anything: what is waiting on your decision, what is in progress, what is blocked
113
+ and by whom, what is queued, and what the checks found. Then you pick a focus, and only then is
114
+ the body of that initiative loaded.
115
+ 2. **Work.** Every request is routed to its tool through the resolver. Nothing activates on its own,
116
+ and no irreversible action —sending, publishing, signing, merging— runs without your yes.
117
+ 3. **Capture.** Whatever shows up mid-conversation is filed where it belongs without cutting the
118
+ thread, and the answer says where it went.
119
+ 4. **Close.** Two questions —what cannot be lost, and what almost worked— and a verdict in four
120
+ parts: what was filed, what was not, which row the resolver could gain, and where to resume.
121
+ Never a plain "done": a close that only says it finished cannot be told apart from one that lost
122
+ something.
123
+
124
+ ## Living Memory: finding what the focus does not load
125
+
126
+ The scan and the focus only ever load a fixed list of files, plus one jump through `about:`. A
127
+ decision written months ago in another workspace is real, but nothing surfaces it on its own — until
128
+ you, or the agent on your behalf, ask `recall` for it.
129
+
130
+ `recall` searches every file the tree reaches, split into entries — a heading and its body, or one
131
+ list item, never a whole file at a time — and returns the closest matches with their file, line and
132
+ date, current work ahead of anything a file says replaced it. `recall --expand <path>` shows a
133
+ result's immediate neighbours: what it is about, what is about it, what replaced it, what it
134
+ replaced.
135
+
136
+ **It finds, it does not decide.** Two results that are both current and say different things are
137
+ handed to you as a contradiction to resolve, never quietly picked between. And it is disposable: what
138
+ it searches is a small file it rebuilds from your own files on its own, never something you write to
139
+ or back up.
140
+
141
+ ## Where the machinery lives
142
+
143
+ The tools —skills, scripts, agents— live in `.os/` and `.claude/`. Those two folders are hidden in
144
+ Obsidian and visible from the terminal, and they are **links** to the installed product: updating
145
+ the system never touches your data, and your data never travels inside the product.
146
+
147
+ **Where the skills live**, since it is the first thing everyone asks: the
148
+ <!--count-->seventeen<!--/count--> skills of the system are in `.os/core/skills/`, one file each,
149
+ reached through the resolver — not copied into this folder, linked to the product. The skills of a
150
+ pack are in `.claude/skills/<name>/SKILL.md`, one folder per skill, which is where your harness
151
+ reads skills from and why they answer to their name. Any skill you write yourself goes next to them,
152
+ as a plain folder in `.claude/skills/`.
153
+
154
+ To update, ask any session: **"update the system"**. That sentence is all you need, and it covers
155
+ both halves of what is installed — the system and the packs. What it does step by step is written
156
+ once, in the `README.md` of the product's folder under **Update**; this manual points at it instead
157
+ of telling it again, because two versions of the same procedure drift apart.
158
+
159
+ ## What you can ask for, and how
160
+
161
+ **The index is the resolver, not your memory.** You ask in your own words —"what is pending", "close
162
+ the session", "capture this"— and the agent looks up which tool covers that capability. Two files
163
+ answer that: the product's, which travels with the system, and yours (`resolver.md`), where you add
164
+ a row when the agent would have chosen wrong without it. Your rows win.
165
+
166
+ The catalog below is the system itself — the <!--count-->seventeen<!--/count--> tools that come with
167
+ it. You can also invoke any of them by name.
168
+
169
+ <!-- catalog: generated by scripts/manual-catalog.sh — do not edit by hand -->
170
+
171
+ **The core** — the tools that run the system:
172
+
173
+ - **`archive`** — Move a document into the node's `archive/` so the focus stops loading it and starts listing it by name, rewriting every reference that pointed at it — and bring it back the same way.
174
+ - **`bootstrap`** — Create the brain from scratch — the gateway skill.
175
+ - **`capture`** — File what the operator throws in mid-conversation into the backlog of the initiative that consumes it, once an initiative is named — nothing is filed unclassified.
176
+ - **`check-resolvable`** — Audit the root's capability-to-tool graph and report the three failures it can have — a tool nothing routes to, a handoff no row provides, and a row pointing at a tool that does not exist.
177
+ - **`close-session`** — Close a session by distributing what it produced —decisions, learnings, pending items, what stayed waiting, where to resume— into the loaded node's canonical files, and end with a four-part verdict that names what was not captured.
178
+ - **`grill`** — Pressure the facts behind a claim before a decision closes — counter-question with a concrete example, capped attempts, escape hatches, evidence hierarchy — and route what comes out to the loaded node's decisions or backlog.
179
+ - **`mount-repo`** — Give an initiative a body: write the remote into the head's frontmatter, clone the checkout outside the brain —or, with --new, give birth to the repo from the product's scaffold when it does not exist yet— and record the remote-to-local-path row in the machine's environment table.
180
+ - **`my-wiki`** — Project the brain as one navigable page — a workspace selector, a shelf per entity type the tree declares, the initiatives hanging from the entity each one is about, the people, and a search that runs inside the page.
181
+ - **`new-memory`** — Create a memory-node type the first time it is used —a folder plus its five lines in `tree.md`— and add a node to it.
182
+ - **`new-product`** — Add a product to a workspace that already exists.
183
+ - **`new-spec`** — Turn concrete build work that came out of a conversation into a spec file under the target repo's specs/, with runnable evals per criterion, decisions split by who closes them, and effects that escape the system declared.
184
+ - **`new-workspace`** — Add a workspace to an existing brain.
185
+ - **`recall`** — Search over every file `tree.md` reaches — not only what the startup scan and the focus load — and return the entries that match, with file, line, date and whether each is current or replaced.
186
+ - **`rename-heads`** — Move a brain born before the single node shape to it — every node becomes a folder with its `README.md` inside, every initiative gets its own folder, and each product's dated documents move to `research/` — rewriting the head paths everywhere the system reads them as routing and listing what it leaves untouched.
187
+ - **`rename-workspaces`** — Move a brain still using the previous name of the workspaces folder to the current one, rewriting the prefix everywhere the system reads it as structure or routing, and listing what it leaves untouched for the operator to review.
188
+ - **`supersede`** — Write on a file the mark that says which other file replaced it, so a session that opens the old one knows what to read instead, and audit the marks of the whole brain — the ones that point at a file that is not there, the ones that close a cycle, and the heads that were replaced and still read as open work.
189
+ - **`sweep`** — Run one of the three global scans over every workspace plus the root's own work — what is pending, what is blocked and why, or how the roadmap is going — reading frontmatter only.
190
+
191
+ <!-- /catalog -->
192
+
193
+ ### Packs: the craft on top
194
+
195
+ Those <!--count-->seventeen<!--/count--> run the system. **The craft —building product, and whatever
196
+ comes next— arrives in packs**, and a pack is installed separately, with its own command, into
197
+ `.claude/skills/` of this folder. **A pack is offered, never required**: the install ended by asking
198
+ whether you wanted one now or later, and if you said later the task is in your backlog with the
199
+ command in it. Adding another one, putting one back, or taking the one you postponed is a single
200
+ request to any session: **"install the pack called `<name>`"**.
201
+
202
+ **This manual does not list what a pack contains, on purpose.** Every pack ships its own index, and
203
+ that index arrives with it — so the list you read is always the list you have, never the one the
204
+ manual remembered. Ask for what you want in your own words: the session reads the index of whatever
205
+ is installed and routes you there, or tells you that nothing installed covers it.
206
+
207
+ ## Working with agents: two gates, one autonomous stretch
208
+
209
+ Heavy work is delegated to agents that run in the background, while the main session stays at the
210
+ helm — it never changes folders and never loses your context.
211
+
212
+ - **`scout`** — reads sources (code, documentation, another spec) and comes back with a synthesis.
213
+ It writes nothing: the tool it runs with cannot touch a file.
214
+ - **`complete-spec`** — implements a spec where every criterion has its runnable check.
215
+ - **`ambiguous-spec`** — implements a spec with open decisions, where judgment is needed.
216
+
217
+ The supervision pattern has **two human gates and one autonomous stretch in the middle**: a person
218
+ approves the spec (**gate 1**) → the agent implements it on a branch, never on the main branch and
219
+ never with a push → a person reads the branch and merges it (**gate 2**). Autonomy in the middle,
220
+ human control at the edges.
221
+
222
+ ## Dormant capabilities: the building layer
223
+
224
+ This system is not only for deciding: **it also builds product, and that half stays asleep until you
225
+ ask for it.** It is not a mode you turn on for the whole brain, nor something you install again: it
226
+ **activates per initiative**, the day one of them stops being a decision and starts being something
227
+ built.
228
+
229
+ When that happens, two capabilities wake up:
230
+
231
+ - **`mount-repo`** — gives an initiative a body: it points the head at the code repository, leaves
232
+ the checkout outside your folder, and records where it landed on this machine. If the repository
233
+ does not exist yet, the same command gives birth to it —with its constitution, its folders and its
234
+ first commit— and hands you the command to create the remote. From there, that initiative has
235
+ somewhere to build.
236
+ - **`new-spec`** — turns build work that came out of a conversation into a spec: what has to be
237
+ true, how each criterion gets checked, which decisions are already closed and which ones are
238
+ still open with who closes them. That spec is what an agent then implements, with the two gates
239
+ above.
240
+
241
+ You do not need to prepare anything today. Ask for it —"this initiative is going to be built"— and
242
+ the two are already installed.
243
+
244
+ ## What the system never does on its own
245
+
246
+ - **Nothing activates by itself.** The tool is chosen through the resolver and invoked explicitly.
247
+ - **No irreversible action runs alone.** Sending, publishing, signing and merging are prepared and
248
+ then asked for.
249
+ - **Whatever the AI writes is marked**: 📌 literal, with the file and the line it came from · 🔍
250
+ inference · ❓ gap. What is missing is recorded as open, with who closes it. It is never invented.
@@ -0,0 +1,30 @@
1
+ # Root resolver — origin: product
2
+
3
+ Capability → tool. One row per capability. This file travels with the product and is not edited
4
+ from the brain: the operator's rows go in `resolver.md`, at the root of the brain.
5
+
6
+ | Capability | Tool | Path |
7
+ |---|---|---|
8
+ | Hook up or update the product in a brain | `install.sh` | `.os/core/install.sh` |
9
+ | Create the brain from scratch | `bootstrap` | `.os/core/skills/bootstrap.md` |
10
+ | Finish the brain's remote backup (private repo + push) | `remote-backup.sh` | `.os/core/lib/remote-backup.sh` |
11
+ | Leave the system manual linked at the root of the brain | `manual-link.sh` | `.os/core/lib/manual-link.sh` |
12
+ | Install the Product Builder pack | `pack-install.sh` | `.os/core/lib/pack-install.sh` |
13
+ | Add a workspace | `new-workspace` | `.os/core/skills/new-workspace.md` |
14
+ | Add a product | `new-product` | `.os/core/skills/new-product.md` |
15
+ | Add a memory node of any type (accounts, channels, or one you invent) | `new-memory` | `.os/core/skills/new-memory.md` |
16
+ | Rename the workspaces folder of an existing brain | `rename-workspaces` | `.os/core/skills/rename-workspaces.md` |
17
+ | Adopt the single node shape in an existing brain | `rename-heads` | `.os/core/skills/rename-heads.md` |
18
+ | See what is pending | `sweep` | `.os/core/skills/sweep.md` |
19
+ | See what is blocked and why | `sweep` | `.os/core/skills/sweep.md` |
20
+ | See how the roadmap is going | `sweep` | `.os/core/skills/sweep.md` |
21
+ | Mark a file as replaced by another | `supersede` | `.os/core/skills/supersede.md` |
22
+ | Audit the routing of the root | `check-resolvable` | `.os/core/skills/check-resolvable.md` |
23
+ | Capture something on the fly | `capture` | `.os/core/skills/capture.md` |
24
+ | Close the session without losing anything | `close-session` | `.os/core/skills/close-session.md` |
25
+ | Mount a repo as the body of a node, or give birth to it if it does not exist yet | `mount-repo` | `.os/core/skills/mount-repo.md` |
26
+ | Pressure the facts before a decision closes | `grill` | `.os/core/skills/grill.md` |
27
+ | Write a new spec | `new-spec` | `.os/core/skills/new-spec.md` |
28
+ | Move a document out of what a focus loads, without losing it | `archive` | `.os/core/skills/archive.md` |
29
+ | Search everything the tree reaches for a lateral question | `recall` | `.os/core/skills/recall.md` |
30
+ | See the brain as a navigable page, and publish it | `my-wiki` | `.os/core/skills/my-wiki.md` |
@@ -0,0 +1,95 @@
1
+ ---
2
+ command: archive
3
+ capability: Move a document out of what a focus loads, without losing it
4
+ description: Move a document into the node's `archive/` so the focus stops loading it and starts listing it by name, rewriting every reference that pointed at it — and bring it back the same way. It also lists the documents the brain already declared out of date and still keeps outside `archive/`. Manually triggered.
5
+ description_es: Mueve un documento al `archive/` del nodo para que el foco deje de cargarlo y pase a listarlo por nombre, reescribiendo todas las referencias que lo apuntaban — y lo trae de vuelta igual. También lista los documentos que el brain ya declaró fuera de vigencia y sigue teniendo fuera de `archive/`. Se dispara a mano.
6
+ ---
7
+
8
+ # archive — archiving a document is moving it
9
+
10
+ The body of a node only grows. A piece of research from July that nobody reads any more costs the
11
+ same to load as the brief that is current. The answer is not a key that says "old": it is the folder
12
+ the document sits in.
13
+
14
+ ## How it is run
15
+
16
+ ```
17
+ .os/core/lib/archive.sh --brain . --file <path> [--file <path> …]
18
+ .os/core/lib/archive.sh --brain . --file <path> [--file <path> …] --unarchive --to <folder>
19
+ .os/core/lib/archive.sh --brain . --stale
20
+ ```
21
+
22
+ Every path is relative to the brain. `--unarchive` needs `--to`, because the folder a document came
23
+ from is recorded nowhere: the move keeps the bytes and the name, and nothing else.
24
+
25
+ ## What it does
26
+
27
+ | Step | What happens |
28
+ |---|---|
29
+ | The plan | Every file is checked and its destination computed before one byte moves |
30
+ | The moves | `<node>/<folder>/<name>.md` → `<node>/archive/<name>.md`, with `git mv` in a git brain |
31
+ | The references | Every file the tree reaches is rewritten, once, with the map of everything that moved |
32
+
33
+ The document is moved, never rewritten: same bytes, same name, same date in the name. A file **is**
34
+ rewritten when it carries a reference to something else that moved — that is the third step, and the
35
+ output names every file it touched.
36
+
37
+ ## What changes after it
38
+
39
+ | Before | After |
40
+ |---|---|
41
+ | The focus loads the document | The focus prints its name under `archived:` and opens none of it |
42
+ | `recall` finds it | `recall` finds it |
43
+ | `supersede --check` audits it | `supersede --check` audits it |
44
+ | The scan counts it as reached | The scan counts it as reached |
45
+
46
+ A document that stopped being loaded and also stopped being findable would be lost, not archived.
47
+
48
+ ## What it refuses
49
+
50
+ | Refusal | Why |
51
+ |---|---|
52
+ | a path that is not `.md`, or that no line of `tree.md` reaches | The command moves documents of the brain; anything else is a file this system does not govern |
53
+ | an absolute path, a `..`, or one that resolves outside the brain | Every path is a path of this brain |
54
+ | a symbolic link | A link is never followed |
55
+ | a file that does not live inside a node | There is no `archive/` next to it |
56
+ | a file already archived, or —with `--unarchive`— one that is not | Nothing to move |
57
+ | a destination that already exists | Choosing which of the two wins is not a script's call |
58
+ | a destination no `archive:` line of the tree reaches | An archived file the tree does not reach is invisible to the audit and to `recall` |
59
+ | the same file named twice in one batch | Two plans for one path |
60
+
61
+ **One refusal cancels the whole batch**: nothing moves, and the output says so. A batch half applied,
62
+ with half its references rewritten, is a state the operator would have to reconstruct by hand.
63
+
64
+ If a move fails after the plan passed —a folder with no write permission— the batch stops there. What
65
+ moved stays moved with its references rewritten, what did not is exactly where it was, the output
66
+ lists both, and re-running the same command finishes the job. Nothing is rolled back: a rollback is a
67
+ second write that can fail too.
68
+
69
+ ## What `--stale` reports
70
+
71
+ One line per document that carries a `superseded_by:` and still lives outside `archive/` — the brain
72
+ already said it was replaced, and it is still being loaded. It writes nothing and exits non-zero when
73
+ it found something.
74
+
75
+ There is no line about this in the session scan, on purpose. Age is not staleness: a brief from July
76
+ can be the most current document a node has, and a scan line with a threshold would come back every
77
+ session without leading to a decision. The scan also reads the frontmatter of heads and never opens a
78
+ content file, so it would count half of them.
79
+
80
+ ## On a brain that already existed
81
+
82
+ `tree.md` is what declares where an `archive/` is legitimate, and a brain born before this command
83
+ does not have those lines. The first run says so, naming the destination no line reaches; adding them
84
+ is the same one-line step every other height of this system takes:
85
+
86
+ ```
87
+ archive: workspaces/*/products/*/archive/*.md
88
+ archive: workspaces/*/initiatives/*/archive/*.md
89
+ archive: initiatives/*/archive/*.md
90
+ ```
91
+
92
+ ## What it does not do
93
+
94
+ It does not decide that a document is done. Deciding is the operator's. It also does not commit: the
95
+ session commits, like everything else it writes.