ai-first-os 2.2.1 → 2.3.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.
package/README.md CHANGED
@@ -188,6 +188,7 @@ context.
188
188
  | `close-session` | Closes the session with a four-part verdict: captured, not captured, candidate resolver row, where to resume |
189
189
  | `mount-repo` | Gives an initiative a body: the remote in the head, the checkout outside the brain (or the repo born from the scaffold, with `--new`), the row in the environment table |
190
190
  | `grill` | The pressure interview: counter-question with a concrete example, capped attempts, escape hatches, evidence hierarchy |
191
+ | `new-intent` | Writes a one-page intent a person accepts or rejects before the spec exists |
191
192
  | `new-spec` | Writes a spec an agent can implement without asking for an opinion — one runnable eval per criterion |
192
193
  | `supersede` | Marks a file as replaced by another —`superseded_by:` in the frontmatter of the old one— so a session that opens it knows what to read instead, and audits the marks of the whole brain |
193
194
  | `rename-workspaces` | Adopts the current name of the workspaces folder on a brain born before it, run only when the operator asks |
package/core/CLAUDE.md CHANGED
@@ -87,6 +87,9 @@ and what changes from now on.
87
87
  **The supervision pattern has two human gates and one autonomous stretch in the middle**: **Gate 1**
88
88
  a person approves the spec → the matching agent implements it **on a branch** of the mounted repo,
89
89
  never on its main branch and never with a push → **Gate 2** a person reads the branch and merges.
90
+ Before Gate 1 comes the intent: a one-page file a person accepts or rejects before the spec exists
91
+ (rule in `core/skills/new-intent.md`). The two gates frame the build; the acceptance of the intent is
92
+ the step before it.
90
93
  The brain session **supervises without changing folders**: it delegates to the agent over the
91
94
  mounted repo and keeps reading the result from here.
92
95
 
package/core/VERSION CHANGED
@@ -1 +1 @@
1
- 2.2.1
1
+ 2.3.0
@@ -332,7 +332,7 @@ birth_error=""
332
332
  repo_birth() {
333
333
  local dest="$1" name="$2" tpl="$here/../templates/repo-scaffold" d
334
334
  birth_error=""
335
- mkdir -p "$dest/.claude" "$dest/specs/done" "$dest/docs/postmortems" "$dest/docs/research" \
335
+ mkdir -p "$dest/.claude" "$dest/specs/done" "$dest/intents" "$dest/docs/postmortems" "$dest/docs/research" \
336
336
  "$dest/learnings" "$dest/evals" || { birth_error="mkdir $dest"; return 1; }
337
337
  os_render_lang "$tpl/CLAUDE.md" "$language" "NAME=$name" > "$dest/CLAUDE.md" \
338
338
  || { birth_error="CLAUDE.md"; return 1; }
@@ -349,7 +349,7 @@ repo_birth() {
349
349
  cp "$tpl/gitignore" "$dest/.gitignore" || { birth_error=".gitignore"; return 1; }
350
350
  # git does not track empty folders: without a keep file the taxonomy does not survive the first
351
351
  # clone, and the next agent finds a tree that is not the one that was born.
352
- for d in specs/done docs/postmortems docs/research learnings; do
352
+ for d in specs/done intents docs/postmortems docs/research learnings; do
353
353
  : > "$dest/$d/.gitkeep" || { birth_error="$d/.gitkeep"; return 1; }
354
354
  done
355
355
 
@@ -240,7 +240,7 @@ están ocultas en Obsidian y se ven desde la terminal, y lo que el sistema pone
240
240
  adentro del producto.
241
241
 
242
242
  **Dónde viven los skills**, porque es lo primero que todo el mundo pregunta: los
243
- <!--count-->veinte<!--/count--> skills del sistema están en `.os/core/skills/`, un archivo cada uno, y
243
+ <!--count-->21<!--/count--> skills del sistema están en `.os/core/skills/`, un archivo cada uno, y
244
244
  se llega a ellos por el resolver — no están copiados en esta carpeta, están enlazados al producto.
245
245
  Los skills de un pack están en `.agents/skills/<nombre>/SKILL.md`, una carpeta por skill, y
246
246
  `.claude/skills/` tiene un enlace a cada uno, que es de donde Claude Code lee los skills; el sistema
@@ -280,7 +280,7 @@ sesión", "capturá esto"— y el agente busca qué herramienta cubre esa capaci
280
280
  contestan eso: el del producto, que viaja con el sistema, y el tuyo (`.system/resolver.md`), donde agregás
281
281
  una fila cuando el agente habría elegido mal sin ella. Tus filas ganan.
282
282
 
283
- El catálogo de abajo es el sistema mismo — las <!--count-->veinte<!--/count--> herramientas que vienen
283
+ El catálogo de abajo es el sistema mismo — las <!--count-->21<!--/count--> herramientas que vienen
284
284
  con él. También podés invocar cualquiera por su nombre.
285
285
 
286
286
  <!-- catalog: generated by scripts/manual-catalog.sh — do not edit by hand -->
@@ -296,6 +296,7 @@ con él. También podés invocar cualquiera por su nombre.
296
296
  - **`migrate-layout`** — Lleva un cerebro con la forma vieja a la nueva —la cuenta en `account/`, la maquinaria en `.system/`, el reglamento de sesión en `AGENTS.md` y `.claude/CLAUDE.md`, los roles como skills, los índices de decisiones y aprendizajes escritos a mano al frontmatter de los archivos que enlazan, cada backlog en una iniciativa, los resolvers ocultos, `resources/` y `context/`— mostrando primero el plan completo y sin escribir nada hasta correrlo con `--apply`.
297
297
  - **`migrate-root`** — Mueve el trabajo propio del operador de un brain que todavía lo tiene escrito directamente en la raíz —iniciativas, un tipo de nodo de memoria, backlog, decisiones, aprendizajes— al espacio de trabajo `personal` con el que todo brain nace hoy, creando ese espacio de trabajo primero si todavía no existe, 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.
298
298
  - **`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.
299
+ - **`new-intent`** — Convierte en una intención de una página, adentro de intents/ del repo destino, una idea que salió de una conversación, para que una persona la acepte o la rechace antes de que exista una spec.
299
300
  - **`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.
300
301
  - **`new-product`** — Suma un producto a un espacio de trabajo que ya existe.
301
302
  - **`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.
@@ -311,7 +312,7 @@ con él. También podés invocar cualquiera por su nombre.
311
312
 
312
313
  ### Los packs: el oficio de arriba
313
314
 
314
- Esas <!--count-->veinte<!--/count--> hacen andar el sistema. **El oficio —construir producto, y lo que
315
+ Esas <!--count-->21<!--/count--> hacen andar el sistema. **El oficio —construir producto, y lo que
315
316
  venga después— llega en packs**, y un pack se instala aparte, con su propio comando, adentro de
316
317
  `.agents/skills/` de esta carpeta. **Un pack se ofrece, nunca se exige**: la instalación terminó
317
318
  preguntándote si lo querías ahora o después, y si dijiste después la tarea está en tu backlog con el
@@ -368,18 +369,25 @@ que la pidas.** No es un modo que se prende para todo el brain, ni algo que se i
368
369
  **activa por iniciativa**, el día en que una deja de ser una decisión y pasa a ser algo que se
369
370
  construye.
370
371
 
371
- Cuando eso pasa, se despiertan dos capacidades:
372
+ Cuando eso pasa, se despiertan tres capacidades:
372
373
 
373
374
  - **`mount-repo`** — le da cuerpo a una iniciativa: apunta la cabeza al repositorio de código, deja
374
375
  el checkout afuera de tu carpeta y registra dónde quedó en esta máquina. Si el repositorio todavía
375
376
  no existe, el mismo comando lo hace nacer —con su constitución, sus carpetas y su primer commit— y
376
377
  te deja el comando para crear el remoto. A partir de ahí, esa iniciativa tiene dónde construirse.
378
+ - **`new-intent`** — antes de la spec, escribe una intención de una página —el problema, el
379
+ resultado, a quién afecta, las restricciones, las preguntas abiertas— que una persona acepta o
380
+ rechaza. Una idea rechazada cuesta una página. La regla vive en `core/skills/new-intent.md`.
377
381
  - **`new-spec`** — convierte en spec el trabajo de construcción que salió de una conversación: qué
378
382
  tiene que ser cierto, cómo se verifica cada criterio, qué decisiones ya están cerradas y cuáles
379
383
  siguen abiertas con quién las cierra. Esa spec es lo que después implementa un agente, con los dos
380
384
  gates de arriba.
381
385
 
382
- No hace falta que prepares nada hoy. Pedilo —"esta iniciativa se va a construir"— y las dos ya están
386
+ Los dos gates enmarcan la construcción, de la aprobación de la spec al merge. La aceptación de la
387
+ intención ocurre antes de que haya construcción, así que no es un tercer gate: es el paso que
388
+ viene primero (`core/skills/new-intent.md`).
389
+
390
+ No hace falta que prepares nada hoy. Pedilo —"esta iniciativa se va a construir"— y las tres ya están
383
391
  instaladas.
384
392
 
385
393
  ## 🛑 Lo que el sistema nunca hace solo
@@ -230,7 +230,7 @@ the installed product: updating the system never touches your data, and your dat
230
230
  inside the product.
231
231
 
232
232
  **Where the skills live**, since it is the first thing everyone asks: the
233
- <!--count-->twenty<!--/count--> skills of the system are in `.os/core/skills/`, one file each,
233
+ <!--count-->21<!--/count--> skills of the system are in `.os/core/skills/`, one file each,
234
234
  reached through the resolver — not copied into this folder, linked to the product. The skills of a
235
235
  pack are in `.agents/skills/<name>/SKILL.md`, one folder per skill, and `.claude/skills/` holds a
236
236
  link to each one, which is where Claude Code reads skills from; the system looks in `.agents/skills/`
@@ -268,7 +268,7 @@ the session", "capture this"— and the agent looks up which tool covers that ca
268
268
  answer that: the product's, which travels with the system, and yours (`.system/resolver.md`), where you add
269
269
  a row when the agent would have chosen wrong without it. Your rows win.
270
270
 
271
- The catalog below is the system itself — the <!--count-->twenty<!--/count--> tools that come with
271
+ The catalog below is the system itself — the <!--count-->21<!--/count--> tools that come with
272
272
  it. You can also invoke any of them by name.
273
273
 
274
274
  <!-- catalog: generated by scripts/manual-catalog.sh — do not edit by hand -->
@@ -284,6 +284,7 @@ it. You can also invoke any of them by name.
284
284
  - **`migrate-layout`** — Move a brain with the old layout to the new one — the account in `account/`, the machinery in `.system/`, the session contract at `AGENTS.md` and `.claude/CLAUDE.md`, roles as skills, the hand-written decision and learning indexes into the frontmatter of the files they link, every backlog into an initiative, hidden resolvers, `resources/` and `context/` — printing the whole plan first and writing nothing until it runs with `--apply`.
285
285
  - **`migrate-root`** — Move the operator's own work from a brain still carrying it directly at the root — initiatives, a memory-node type, backlog, decisions, learnings — into the `personal` workspace every brain is born with today, creating that workspace first if it does not exist yet, rewriting the prefix everywhere the system reads it as structure or routing, and listing what it leaves untouched for the operator to review.
286
286
  - **`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.
287
+ - **`new-intent`** — Turn an idea that came out of a conversation into a one-page intent file under the target repo's intents/, for a person to accept or reject before any spec exists.
287
288
  - **`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.
288
289
  - **`new-product`** — Add a product to a workspace that already exists.
289
290
  - **`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.
@@ -299,7 +300,7 @@ it. You can also invoke any of them by name.
299
300
 
300
301
  ### Packs: the craft on top
301
302
 
302
- Those <!--count-->twenty<!--/count--> run the system. **The craft —building product, and whatever
303
+ Those <!--count-->21<!--/count--> run the system. **The craft —building product, and whatever
303
304
  comes next— arrives in packs**, and a pack is installed separately, with its own command, into
304
305
  `.agents/skills/` of this folder. **A pack is offered, never required**: the install ended by asking
305
306
  whether you wanted one now or later, and if you said later the task is in your backlog with the
@@ -357,20 +358,27 @@ ask for it.** It is not a mode you turn on for the whole brain, nor something yo
357
358
  **activates per initiative**, the day one of them stops being a decision and starts being something
358
359
  built.
359
360
 
360
- When that happens, two capabilities wake up:
361
+ When that happens, three capabilities wake up:
361
362
 
362
363
  - **`mount-repo`** — gives an initiative a body: it points the head at the code repository, leaves
363
364
  the checkout outside your folder, and records where it landed on this machine. If the repository
364
365
  does not exist yet, the same command gives birth to it —with its constitution, its folders and its
365
366
  first commit— and hands you the command to create the remote. From there, that initiative has
366
367
  somewhere to build.
368
+ - **`new-intent`** — before the spec, writes a one-page intent —the problem, the outcome, who it
369
+ affects, the constraints, the open questions— that a person accepts or rejects. A rejected idea
370
+ costs one page. The rule lives in `core/skills/new-intent.md`.
367
371
  - **`new-spec`** — turns build work that came out of a conversation into a spec: what has to be
368
372
  true, how each criterion gets checked, which decisions are already closed and which ones are
369
373
  still open with who closes them. That spec is what an agent then implements, with the two gates
370
374
  above.
371
375
 
376
+ The two gates frame the build, from the approval of the spec to the merge. The acceptance of the
377
+ intent happens before there is a build, so it is not a third gate: it is the step that comes first
378
+ (`core/skills/new-intent.md`).
379
+
372
380
  You do not need to prepare anything today. Ask for it —"this initiative is going to be built"— and
373
- the two are already installed.
381
+ the three are already installed.
374
382
 
375
383
  ## 🛑 What the system never does on its own
376
384
 
package/core/resolver.md CHANGED
@@ -27,6 +27,7 @@ from the brain: the operator's rows go in `.system/resolver.md`, at the root of
27
27
  | Close the session without losing anything | `close-session` | `.os/core/skills/close-session.md` |
28
28
  | 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` |
29
29
  | Pressure the facts before a decision closes | `grill` | `.os/core/skills/grill.md` |
30
+ | Write a new intent | `new-intent` | `.os/core/skills/new-intent.md` |
30
31
  | Write a new spec | `new-spec` | `.os/core/skills/new-spec.md` |
31
32
  | Move a document out of what a focus loads, without losing it | `archive` | `.os/core/skills/archive.md` |
32
33
  | Search everything the tree reaches for a lateral question | `recall` | `.os/core/skills/recall.md` |
@@ -43,7 +43,7 @@ the head's `repo:` is what activates the building mechanics, and this command wr
43
43
  **`--new` is for a repo that does not exist yet**: instead of cloning, it writes the scaffold
44
44
  —`CLAUDE.md` with the two gates and the Definition of Done, `.claude/settings.json` denying the
45
45
  agents `git push` and `gh pr merge`, `ARCHITECTURE.md`, `decisions.md`, `learnings/`,
46
- `docs/postmortems/`, `docs/research/`, `specs/done/`, `evals/run.sh`—, commits it and points
46
+ `docs/postmortems/`, `docs/research/`, `specs/done/`, `intents/`, `evals/run.sh`—, commits it and points
47
47
  `origin` at the remote. The prose comes out in the brain's language.
48
48
 
49
49
  **`--new` reads "the remote does not answer" as "it does not exist yet".** A private repo that does
@@ -0,0 +1,54 @@
1
+ ---
2
+ command: new-intent
3
+ capability: Write a new intent
4
+ description: Turn an idea that came out of a conversation into a one-page intent file under the target repo's intents/, for a person to accept or reject before any spec exists. Manually triggered, before new-spec.
5
+ description_es: Convierte en una intención de una página, adentro de intents/ del repo destino, una idea que salió de una conversación, para que una persona la acepte o la rechace antes de que exista una spec. Se dispara a mano, antes de new-spec.
6
+ ---
7
+
8
+ # new-intent — one page a person accepts or rejects before the spec
9
+
10
+ An intent says what is going to change and why, in words a person who does not read specs can decide.
11
+ It comes before `new-spec`: a rejected idea costs one page, not a whole spec. An intent may yield several specs, or none.
12
+
13
+ ## 1. Target repo
14
+
15
+ - No mounted repo: stop and offer `mount-repo`. An intent lives in a repo, next to `specs/`.
16
+ - If the repo has no `intents/`, create it with an `intents/.gitkeep`.
17
+ - The number is the highest `NNN` in `intents/*.md` plus one, three digits, starting at `001`. It is independent of the numbers of the specs.
18
+ - `intents/` is flat and is never archived.
19
+
20
+ ## 2. The template
21
+
22
+ The file is `intents/NNN-short-name.md`. The frontmatter is in English; the body is written in the language of the conversation, section titles included. This template is the source:
23
+
24
+ ```
25
+ ---
26
+ status: pending
27
+ ---
28
+
29
+ # NNN · <title>
30
+
31
+ ## Problem
32
+
33
+ ## Desired outcome
34
+
35
+ ## Who and what it affects
36
+
37
+ ## Constraints
38
+
39
+ ## Open questions
40
+ ```
41
+
42
+ Interview only what is missing, with a proposed default at every gap. The intent stays on one page: no checks and no state of the code, that belongs to the spec.
43
+
44
+ ## 3. Status
45
+
46
+ `status` is `pending | accepted | rejected`. A `rejected` intent carries `reason: <text>` in the same frontmatter and is kept, never deleted.
47
+
48
+ The status changes only on the person's explicit accept or reject in that turn. The AI records it, with the reason when rejected, and never sets `accepted` on its own initiative. There is no separate accept command.
49
+
50
+ ## 4. Deliver
51
+
52
+ 1. Show the complete intent before writing it and wait for the go-ahead.
53
+ 2. Write it with `status: pending` and commit it to `main` of the target repo right away, as `new-spec` does: committing reserves the number.
54
+ 3. Ask the person to accept or reject it. Record the decision (`status: accepted`, or `status: rejected` with `reason:`) and have it committed to `main` of the target repo right away, before `new-spec`. On accept, the next step is `new-spec`, which names the intent in the `intent:` field of the spec's frontmatter.
@@ -34,16 +34,23 @@ A spec is complete when any agent can read it and answer "does it pass or not?"
34
34
  without asking for an opinion. Whatever is missing from this is not filled in at your own discretion:
35
35
  it is asked.
36
36
 
37
- **Frontmatter, two fields and no more:**
37
+ **Intent first, for `feature` specs.** The spec of a `feature` names an accepted intent (`core/skills/new-intent.md`).
38
+ When there is no intent with `status: accepted`, this skill offers to write the intent right there, following the
39
+ steps of `new-intent`, asks the person to accept or reject it, and goes on only on acceptance. `verification` and
40
+ `residuals` specs have no intent and do not ask for one.
41
+
42
+ **Frontmatter.** A `feature` spec carries three fields; `verification` and `residuals` keep exactly `status` and
43
+ `depends_on`:
38
44
 
39
45
  ```
40
46
  ---
41
47
  status: pendiente
42
48
  depends_on: []
49
+ intent: intents/NNN-short-name.md
43
50
  ---
44
51
  ```
45
52
 
46
- `status` is `pendiente | esperando Gate 1 | en curso | implementada`. `depends_on` is an **inline**
53
+ `intent` is the path of the accepted intent. `status` is `pendiente | esperando Gate 1 | en curso | implementada`. `depends_on` is an **inline**
47
54
  list of references to other specs (`[]` if it depends on none) — spread over several lines, a `grep`
48
55
  returns the first and loses the rest. The reader reports this field; it does not change it just
49
56
  because a dependency closed.
@@ -526,6 +526,7 @@ key: REPO_LAYOUT
526
526
  en: | Question | Where | Lifecycle |
527
527
  en: |---|---|---|
528
528
  en: | How it is built | `ARCHITECTURE.md` (the as-built) | Live, overwritten |
529
+ en: | What is going to change, and why | `intents/` | Transient: accepted or rejected by a person before the spec |
529
530
  en: | What is missing | `specs/` (+ `done/`) | Transient |
530
531
  en: | What was decided and why | `decisions.md` | **Append-only**, never corrected |
531
532
  en: | What we learned | `learnings/` | Live: updated or deleted |
@@ -535,6 +536,7 @@ en: | The check for each criterion | `evals/run.sh` | Live: one check per criter
535
536
  es: | Pregunta | Dónde | Ciclo de vida |
536
537
  es: |---|---|---|
537
538
  es: | Cómo está construido | `ARCHITECTURE.md` (el as-built) | Vivo, se pisa |
539
+ es: | Qué se va a cambiar y por qué | `intents/` | Transitorio: una persona la acepta o la rechaza antes de la spec |
538
540
  es: | Qué falta | `specs/` (+ `done/`) | Transitorio |
539
541
  es: | Qué se decidió y por qué | `decisions.md` | **Append-only**, nunca se corrige |
540
542
  es: | Qué aprendimos | `learnings/` | Vivo: se actualiza o se borra |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-first-os",
3
- "version": "2.2.1",
3
+ "version": "2.3.0",
4
4
  "description": "A product operating system for working with agents. Install with npx, no clone required.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/pedroromeroluna/ai-first-os",