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.
- package/LICENSE +21 -0
- package/README.md +226 -0
- package/bin/ai-first-os.js +72 -0
- package/core/CLAUDE.md +148 -0
- package/core/VERSION +1 -0
- package/core/agents/ambiguous-spec.md +39 -0
- package/core/agents/complete-spec.md +36 -0
- package/core/agents/scout.md +25 -0
- package/core/install.sh +243 -0
- package/core/lib/archive.sh +347 -0
- package/core/lib/bootstrap.sh +276 -0
- package/core/lib/capture.sh +188 -0
- package/core/lib/check-resolvable.sh +172 -0
- package/core/lib/close-session.sh +741 -0
- package/core/lib/common.sh +1773 -0
- package/core/lib/focus-read.sh +282 -0
- package/core/lib/manual-link.sh +111 -0
- package/core/lib/markdown.py +304 -0
- package/core/lib/migrate-backlogs.sh +207 -0
- package/core/lib/migrate-canonicals.sh +523 -0
- package/core/lib/mount-repo.sh +543 -0
- package/core/lib/my-wiki-gates.sh +137 -0
- package/core/lib/my-wiki.sh +202 -0
- package/core/lib/my_wiki_build.py +548 -0
- package/core/lib/my_wiki_graph.py +137 -0
- package/core/lib/my_wiki_overview.py +392 -0
- package/core/lib/new-memory.sh +160 -0
- package/core/lib/new-product.sh +122 -0
- package/core/lib/new-workspace.sh +105 -0
- package/core/lib/pack-install.sh +114 -0
- package/core/lib/recall.sh +235 -0
- package/core/lib/recall_index.py +295 -0
- package/core/lib/remote-backup.sh +84 -0
- package/core/lib/rename-heads.sh +354 -0
- package/core/lib/rename-workspaces.sh +271 -0
- package/core/lib/session-read.sh +203 -0
- package/core/lib/session-start.sh +854 -0
- package/core/lib/supersede.sh +436 -0
- package/core/lib/sweep.sh +473 -0
- package/core/manual/COMO-FUNCIONA.md +251 -0
- package/core/manual/HOW-IT-WORKS.md +250 -0
- package/core/resolver.md +30 -0
- package/core/skills/archive.md +95 -0
- package/core/skills/bootstrap.md +226 -0
- package/core/skills/capture.md +65 -0
- package/core/skills/check-resolvable.md +38 -0
- package/core/skills/close-session.md +108 -0
- package/core/skills/grill.md +74 -0
- package/core/skills/mount-repo.md +97 -0
- package/core/skills/my-wiki.md +103 -0
- package/core/skills/new-memory.md +76 -0
- package/core/skills/new-product.md +55 -0
- package/core/skills/new-spec.md +114 -0
- package/core/skills/new-workspace.md +53 -0
- package/core/skills/recall.md +64 -0
- package/core/skills/rename-heads.md +72 -0
- package/core/skills/rename-workspaces.md +43 -0
- package/core/skills/supersede.md +83 -0
- package/core/skills/sweep.md +40 -0
- package/core/templates/my-wiki-graph.js +431 -0
- package/core/templates/my-wiki-overview.js +174 -0
- package/core/templates/my-wiki.html +1017 -0
- package/core/templates/node-folder/README.md +11 -0
- package/core/templates/node-folder/resolver.md +9 -0
- package/core/templates/node-light.md +22 -0
- package/core/templates/node-product/README.md +8 -0
- package/core/templates/node-repo/README.md +14 -0
- package/core/templates/node-repo/context/README.md +22 -0
- package/core/templates/node-repo/context/competitors.md +8 -0
- package/core/templates/node-repo/context/glossary.md +8 -0
- package/core/templates/node-repo/context/open-questions.md +9 -0
- package/core/templates/node-repo/context/opportunities.md +9 -0
- package/core/templates/node-repo/context/problem.md +8 -0
- package/core/templates/node-repo/context/scope.md +8 -0
- package/core/templates/node-repo/context/users.md +8 -0
- package/core/templates/node-repo/context/vision.md +8 -0
- package/core/templates/node-repo/resolver.md +14 -0
- package/core/templates/operator.md +17 -0
- package/core/templates/person.md +10 -0
- package/core/templates/repo-scaffold/ARCHITECTURE.md +3 -0
- package/core/templates/repo-scaffold/CLAUDE.md +23 -0
- package/core/templates/repo-scaffold/decisions.md +3 -0
- package/core/templates/repo-scaffold/evals-run.sh +14 -0
- package/core/templates/repo-scaffold/gitignore +3 -0
- package/core/templates/repo-scaffold/settings.json +8 -0
- package/core/templates/root-resolver.md +5 -0
- package/core/templates/strings.md +1361 -0
- package/core/templates/tree.md +59 -0
- package/core/templates/voice.md +5 -0
- package/package.json +23 -0
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
---
|
|
2
|
+
command: bootstrap
|
|
3
|
+
capability: Create the brain from scratch
|
|
4
|
+
handoff: Add a workspace
|
|
5
|
+
description: Create the brain from scratch — the gateway skill. If AI First OS is not present it installs the complete system first, then runs a five-question interview —language first, then name, role, voice and workspace— writes the minimum node structure, and leaves the brain versioned with its first commit and its remote backup resolved or pending. Manually triggered, once per brain, before any other tool.
|
|
6
|
+
description_es: Crea el brain desde cero — la skill de entrada. Si AI First OS no está, instala el sistema completo primero, después conduce una entrevista de cinco preguntas —idioma primero, y después nombre, rol, voz y espacio de trabajo—, escribe la estructura mínima de nodos y deja el brain versionado con su primer commit y su respaldo remoto resuelto o pendiente. Se dispara a mano, una vez por brain, antes que cualquier otra herramienta.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# bootstrap — create the brain
|
|
10
|
+
|
|
11
|
+
Interview the operator and create the minimum brain. Do not ask about scope: the building layer is
|
|
12
|
+
activated per initiative, not per user.
|
|
13
|
+
|
|
14
|
+
## Step 0 — preflight, then install the OS if it is missing
|
|
15
|
+
|
|
16
|
+
### The preflight
|
|
17
|
+
|
|
18
|
+
**Check the requirement before running anything.** Do not clone, do not read an error to find out
|
|
19
|
+
what is missing:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
git --version
|
|
23
|
+
python3 --version
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
- **git missing**: macOS, `xcode-select --install`; Windows, git-scm.com.
|
|
27
|
+
- **python3 missing**: macOS, `xcode-select --install` — the same command that brings git; Windows,
|
|
28
|
+
python.org; Linux, the distro's package manager.
|
|
29
|
+
|
|
30
|
+
**You guide; the operator installs.** You never install system software on your own — you name the
|
|
31
|
+
official channel, wait for them to run it, and check again. Anything they decline is a choice, not
|
|
32
|
+
an error: report it and take the branch below that matches.
|
|
33
|
+
|
|
34
|
+
**git has no path around it, and neither does python3 — there is no alternative branch for either.**
|
|
35
|
+
If one is missing, stop right there — point at the install channel, wait for the operator to run
|
|
36
|
+
it, check again. `bootstrap.sh` itself refuses to write anything without them — git first, then
|
|
37
|
+
python3 — and re-running the same command once they are installed picks the interview up cleanly.
|
|
38
|
+
`python3` is what `mount-repo` uses later to authorize a checkout for the harness (spec 030);
|
|
39
|
+
checking it here, at the one gate every brain goes through, is cheaper than discovering it missing
|
|
40
|
+
mid-mount.
|
|
41
|
+
|
|
42
|
+
**Nothing else is checked here, and Node is not checked here on purpose.** Installing the system
|
|
43
|
+
needs git and python3 and nothing more: no `npx`, no download from a registry, no npm prompt in the
|
|
44
|
+
middle of an install that has not written a single file yet. Node is the requirement of one later
|
|
45
|
+
step —the pack, offered at the close of this bootstrap— and it gets checked there, when it is the
|
|
46
|
+
thing being done.
|
|
47
|
+
|
|
48
|
+
### Bringing the product down
|
|
49
|
+
|
|
50
|
+
Everything below assumes the product is hooked into the brain (`.os/core` resolves). If it does
|
|
51
|
+
not, install it first. **Check for `~/.ai-first-os/core/install.sh` before cloning anything** — if
|
|
52
|
+
it is there, `npx ai-first-os` already brought the product down and there is nothing to fetch:
|
|
53
|
+
|
|
54
|
+
1. If `~/.ai-first-os/core/install.sh` exists, use it directly. Otherwise, clone
|
|
55
|
+
`github.com/pedroromeroluna/ai-first-os` to a fixed local folder outside the brain (the operator
|
|
56
|
+
will need it to update later).
|
|
57
|
+
2. Run `<product>/core/install.sh <brain-path>` — idempotent; it hooks the session contract, the
|
|
58
|
+
resolvers, the subagents and the nine skills of the system by symlink. The packs are not in that
|
|
59
|
+
repository: each one is published as its own set of skills, and the step at the close of this
|
|
60
|
+
bootstrap offers one.
|
|
61
|
+
3. Continue with the interview.
|
|
62
|
+
|
|
63
|
+
**Never reimplement either step by hand.** Writing `operator.md`, `voice.md`, `resolver.md` and
|
|
64
|
+
`tree.md` yourself instead of running `install.sh` and this skill's own script leaves a brain with
|
|
65
|
+
no symlinks and no `.os/core` — a install that looks done and is not. The script is the deliverable;
|
|
66
|
+
running it is always cheaper and safer than replicating what it does.
|
|
67
|
+
|
|
68
|
+
There is one way in through the browser and one through `npx`, and no third path: the clone above,
|
|
69
|
+
or the folder `npx ai-first-os` already left at `~/.ai-first-os`. If `.os/core` already resolves,
|
|
70
|
+
skip this step entirely.
|
|
71
|
+
|
|
72
|
+
## The interview
|
|
73
|
+
|
|
74
|
+
**Five questions, in this order. One at a time.** They are configuration, not a profile: each one
|
|
75
|
+
is answered in a line. Whatever the system can learn with use is not asked.
|
|
76
|
+
|
|
77
|
+
1. **Language.** The only question asked in two languages, because it is the one that decides the
|
|
78
|
+
rest:
|
|
79
|
+
> What language do you want to work in — English or Spanish? / ¿En qué idioma querés trabajar
|
|
80
|
+
> — inglés o español?
|
|
81
|
+
|
|
82
|
+
**Everything after this comes out in the language chosen**: the four questions that follow, the
|
|
83
|
+
files that get written, and the session from here on. Today the system writes `en` and `es`.
|
|
84
|
+
2. **Your name.**
|
|
85
|
+
3. **Your role**, in one line (example: "Senior PM at a fintech").
|
|
86
|
+
4. **Your voice**: tone, and words you would never use. **Optional** — say so when asking: if the
|
|
87
|
+
operator does not know, "later" is an answer and the file says it is pending.
|
|
88
|
+
5. **Your workspace.** A workspace is each company or client you work for; a course case is one
|
|
89
|
+
too. For the typical case —one person, one employer— that is one. **Optional** — say so when
|
|
90
|
+
asking: someone who works alone, or who is between jobs, has none, and "none" is an answer. Say
|
|
91
|
+
what it means before they answer: their own work lives at the root of the brain, which is a node
|
|
92
|
+
like any other, and the day a company or a client appears, `new-workspace` adds it. Ask **what it
|
|
93
|
+
does** and **what you do there**. What you do there is a title — identity, written to the body of
|
|
94
|
+
the head, never to `role:`. `role:` activates an oficio from the pack (today: `cpo`) and is
|
|
95
|
+
born empty; filling it in is a separate, deliberate step, not part of this interview.
|
|
96
|
+
|
|
97
|
+
**"How do you want to be answered" is not asked.** `operator.md` is born with a default —the answer
|
|
98
|
+
first, short, no process narration— marked as a section that is learned with use. It gets corrected
|
|
99
|
+
the first time an answer misses.
|
|
100
|
+
|
|
101
|
+
Return the answers summarized and wait for approval before writing anything.
|
|
102
|
+
|
|
103
|
+
## What it writes
|
|
104
|
+
|
|
105
|
+
Build an answers file and run the deterministic part:
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
.os/core/lib/bootstrap.sh --brain . --answers <file>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Format of the answers file, one key per line:
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
language: en|es
|
|
115
|
+
name: <name>
|
|
116
|
+
profile: <the role, one line>
|
|
117
|
+
voice: <one item>
|
|
118
|
+
workspace: <Name> | <title> | <owner> | <identity file>
|
|
119
|
+
skipped: voice | workspace
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
`voice`, `workspace` and `skipped` repeat. `language` first: with no `language` the brain is written
|
|
123
|
+
in English and the script declares the gap. In `workspace`, the owner and the identity file are
|
|
124
|
+
optional: with no owner the operator is used, and with no identity a placeholder text is left. The
|
|
125
|
+
title is never `role:` — see the interview above.
|
|
126
|
+
|
|
127
|
+
**`skipped:` is what the operator answered, not what they left out.** One line per optional question
|
|
128
|
+
the operator deliberately left empty —`skipped: voice`, `skipped: workspace`—, and never together
|
|
129
|
+
with a line of the same key. Without it the script cannot tell "did not answer" from "answered they
|
|
130
|
+
have none", and it asks again for something already answered.
|
|
131
|
+
|
|
132
|
+
The result is `operator.md`, `voice.md`, `resolver.md`, `tree.md`, the system manual at the root of
|
|
133
|
+
the brain —`HOW-IT-WORKS.md` or `COMO-FUNCIONA.md`, in the chosen language— and one folder per
|
|
134
|
+
workspace.
|
|
135
|
+
`voice.md` is the operator's voice — one identity, two questions, never the same sentence in both.
|
|
136
|
+
Nothing else: the inbox, the root's own work (initiatives, backlog, decisions, learnings) and the
|
|
137
|
+
environment table are born with their first piece of data, like any node.
|
|
138
|
+
|
|
139
|
+
**It runs once per brain.** If the root pieces already exist, the script stops instead of rewriting
|
|
140
|
+
them. Adding a workspace to a brain that already exists is `new-workspace`'s job.
|
|
141
|
+
|
|
142
|
+
## The backup, in two halves
|
|
143
|
+
|
|
144
|
+
**Local, always, with no account and no question**: the same script closes the bootstrap with
|
|
145
|
+
`git init` and the first commit. Nothing to ask; a brain with no history loses work silently. git is
|
|
146
|
+
guaranteed present by the preflight in Step 0 — there is no unversioned brain to describe here.
|
|
147
|
+
|
|
148
|
+
**Remote, right after**, and it never runs alone:
|
|
149
|
+
|
|
150
|
+
```
|
|
151
|
+
.os/core/lib/remote-backup.sh --brain .
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
- With `gh` authenticated it prints the offer and the exact `gh repo create` command. **Ask the
|
|
155
|
+
operator and run it only with their yes**: it leaves a repository in their account, which escapes
|
|
156
|
+
the system.
|
|
157
|
+
- Without `gh`, it leaves the guided task in the root backlog: create the account at github.com
|
|
158
|
+
—**the operator creates it, never the agent**—, run `gh auth login`, and any later session
|
|
159
|
+
finishes the rest by running the same script.
|
|
160
|
+
|
|
161
|
+
Synced folders (iCloud, Drive) are not offered as backup: the system runs on symlinks and those
|
|
162
|
+
folders break them.
|
|
163
|
+
|
|
164
|
+
## The pack — offered at the close, taken now or later
|
|
165
|
+
|
|
166
|
+
**This step runs last, with the brain already born and its backlog already there.** Whichever way it
|
|
167
|
+
goes, the bootstrap already succeeded: the system is installed and every skill of the system works.
|
|
168
|
+
|
|
169
|
+
Run the offer, which reads what is already in `.claude/skills/` and prints the exact command:
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
.os/core/lib/pack-install.sh --brain .
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**Check Node first (`node --version`) — the branch is the state of the machine, not how the system
|
|
176
|
+
got installed.** Whoever came in through `npx ai-first-os` has Node by construction; whoever pasted
|
|
177
|
+
the git-clone prompt may or may not.
|
|
178
|
+
|
|
179
|
+
- **Node present: one question, not two.** There is nothing to defer when the download can run right
|
|
180
|
+
now:
|
|
181
|
+
|
|
182
|
+
> The craft on top —discovery, the metric brief, the interview that writes a product's strategic
|
|
183
|
+
> layer— travels in a pack of skills. Install it now? The download asks you to confirm once.
|
|
184
|
+
|
|
185
|
+
Yes: run the command the offer printed, from the brain folder, with the operator's yes. `npx` may
|
|
186
|
+
ask to confirm the download the first time; the operator is right here, so answer it with them.
|
|
187
|
+
What lands: one folder per skill under `.claude/skills/`, plus the pack's own index
|
|
188
|
+
(`<pack>-resolver`), which is what the session contract reads to route a request to the pack. The
|
|
189
|
+
harness also offers those skills natively, because that is where it looks for them. No: leave it as
|
|
190
|
+
is — **nothing gets written to the backlog**; the same offer comes back the day a session needs a
|
|
191
|
+
capability of the pack that is not installed.
|
|
192
|
+
- **Node missing: the only exit is later.** Point at the LTS installer on nodejs.org — you guide, the
|
|
193
|
+
operator installs, and a no is an answer, not an error. Whether they install it right now or not,
|
|
194
|
+
run `.os/core/lib/pack-install.sh --brain . --defer`: the task lands in the root backlog with the
|
|
195
|
+
exact command inside it, and any later session can run it. This is the same offer any session makes
|
|
196
|
+
when something asks for a capability of the pack that is not installed.
|
|
197
|
+
|
|
198
|
+
**The command brings down only what is missing, and nobody has to name what that is.** What the
|
|
199
|
+
system already provides travels marked internal in the pack, and the CLI skips it on its own — there
|
|
200
|
+
is no list to keep here, and nothing is ever installed and then deleted.
|
|
201
|
+
|
|
202
|
+
**If it fails —no network, registry down, the operator says no— the flow does not stop.** Retry once;
|
|
203
|
+
if it fails again, take the later exit above so the pending is written down, and say it out loud. A
|
|
204
|
+
bootstrap aborted halfway because a download failed is the worse outcome of the two.
|
|
205
|
+
|
|
206
|
+
## When it finishes
|
|
207
|
+
|
|
208
|
+
- Show the tree created and what each file answers, in outcomes and not in canonical names.
|
|
209
|
+
- **Point at the manual**: the brain was born with the manual of the system at its root, in the
|
|
210
|
+
operator's language, and it stays up to date on its own because it is linked to the product. It is
|
|
211
|
+
where the operator finds what they can ask for. A brain created before the manual existed gets it
|
|
212
|
+
by running `.os/core/lib/manual-link.sh --brain .`.
|
|
213
|
+
- If the identity cap warning appears, pass it through as is: the operator chooses the way out.
|
|
214
|
+
- If the script reports `sin dato:` or `sin crear:`, pass it through whole and ask again for what is
|
|
215
|
+
missing. A gap nobody names is a gap nobody fills.
|
|
216
|
+
- If it reports `declarado vacío:`, that gap was answered: pass it through and **do not ask again**.
|
|
217
|
+
When it names `workspace`, say the work lives at the root of the brain and that `new-workspace`
|
|
218
|
+
adds one the day a company or a client appears.
|
|
219
|
+
- Say whether the brain is versioned and whether the remote is resolved or pending.
|
|
220
|
+
- **Say whether the pack landed.** If it was installed, name what it added and that the harness
|
|
221
|
+
offers it directly. If it was left for later, say the pending line is in the root backlog with the
|
|
222
|
+
command inside it, and that everything else works without it.
|
|
223
|
+
- **How the operator updates all of this is written once**, in the repository's `README.md` under
|
|
224
|
+
**Update**, and is not restated here. Point at it; do not retell it.
|
|
225
|
+
- Handoff: if the operator wants to add another workspace, the **add a workspace** capability
|
|
226
|
+
is needed. If it is not available, say so and continue.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
command: capture
|
|
3
|
+
capability: Capture something on the fly
|
|
4
|
+
description: 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. Manually triggered; classifying is the model's job, writing is the script's.
|
|
5
|
+
description_es: 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. Se dispara a mano; clasificar es del modelo y escribir es del script.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# capture — file whatever shows up on the fly
|
|
9
|
+
|
|
10
|
+
What the operator throws in the middle of something else —"remember to renew the insurance"— is
|
|
11
|
+
filed in the backlog of the initiative it belongs to, without opening a conversation. Classifying is
|
|
12
|
+
yours; writing is the script's.
|
|
13
|
+
|
|
14
|
+
## Before writing
|
|
15
|
+
|
|
16
|
+
**The node's resolver is already loaded**: the session start brings it. If the task belongs to
|
|
17
|
+
another organization, its resolver is **not** loaded and nothing is filed blind: it is loaded first,
|
|
18
|
+
or the answer is no. The script guards that — you pass it `--session-org` with the organization the
|
|
19
|
+
session is standing on.
|
|
20
|
+
|
|
21
|
+
**Nothing enters unclassified.** A task hangs from an initiative and only from there — there is no
|
|
22
|
+
workspace backlog, no root backlog, no inbox to fall back on. If the initiative cannot be named
|
|
23
|
+
without asking, it is not asked in the middle of something else and it is not filed anywhere: say so,
|
|
24
|
+
propose the initiative you would use —or the entity under which it is missing and would need to be
|
|
25
|
+
opened first— and run `capture` with `--initiative` once the operator confirms it, never before. No
|
|
26
|
+
command creates an initiative: if the one that fits does not exist yet, its head is written first at
|
|
27
|
+
`initiatives/<slug>/README.md` (or `<workspace>/initiatives/<slug>/README.md`).
|
|
28
|
+
|
|
29
|
+
## How it is run
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
.os/core/lib/capture.sh --brain . --session-org <session-slug> --text "<text>" --initiative <slug> \
|
|
33
|
+
[--org <target-slug>] [--blocked-by <ref>] [--hold "<reason>"] [--hold-until <YYYY-MM-DD>]
|
|
34
|
+
.os/core/lib/capture.sh --brain . --root --text "<text>" --initiative <slug> \
|
|
35
|
+
[--blocked-by <ref>] [--hold "<reason>"] [--hold-until <YYYY-MM-DD>]
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
`--initiative` names the initiative by its slug, relative to the scope — the same shape every other
|
|
39
|
+
flag already uses (`--workspace <slug>`), never a full path. Without it the script writes nothing,
|
|
40
|
+
anywhere, and says the initiative is missing: that is not an error to work around, it is the
|
|
41
|
+
contract (decision 2, spec 057).
|
|
42
|
+
|
|
43
|
+
To write into an organization that is not the session's: load its `README.md` and its
|
|
44
|
+
`resolver.md`, and repeat with `--load-context`. The root never asks for it: its identity
|
|
45
|
+
(`operator.md`) is already loaded in any session, at any scope.
|
|
46
|
+
|
|
47
|
+
## How the destination is decided
|
|
48
|
+
|
|
49
|
+
1. **Which organization is it from, or is it the operator's own work?** If that cannot be answered
|
|
50
|
+
without asking, it is not asked in the middle of something else — say the same thing you would say
|
|
51
|
+
for a missing initiative: it is not filed, and it waits for the operator.
|
|
52
|
+
2. **Which initiative does it belong to?** Its slug is `--initiative`. If more than one initiative
|
|
53
|
+
could fit, ask; if none fits and one needs to be opened, propose the initiative (or the entity it
|
|
54
|
+
should open under) and wait for the confirmation before running the script.
|
|
55
|
+
3. **Is it blocked or postponed?** `--blocked-by` with the reference blocking it; `--hold` with the
|
|
56
|
+
reason and `--hold-until` with the date it resurfaces. A hold with no date is indefinitely in
|
|
57
|
+
force: the task never comes back on its own.
|
|
58
|
+
|
|
59
|
+
## When it finishes
|
|
60
|
+
|
|
61
|
+
Report what was written and where, in one line. If the script says the file was born, pass it through
|
|
62
|
+
as is: that is the system writing itself, and it costs the operator nothing.
|
|
63
|
+
|
|
64
|
+
If you had to decide the destination with no resolver row answering it, say so: that is a candidate
|
|
65
|
+
row, and the session close offers it.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
command: check-resolvable
|
|
3
|
+
capability: Audit the routing of the root
|
|
4
|
+
description: 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. Manually triggered, or hung off a cron; it exits non-zero when it finds something.
|
|
5
|
+
description_es: 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. Se dispara a mano, o colgada de un cron; sale distinto de cero cuando encuentra algo.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# check-resolvable — so that no tool stays dark
|
|
9
|
+
|
|
10
|
+
It audits the root graph: capability → tool. This is the one that runs over the whole system; the
|
|
11
|
+
node-level one —content → where— already runs at every session start.
|
|
12
|
+
|
|
13
|
+
## How it is run
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
.os/core/lib/check-resolvable.sh --brain .
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
It exits non-zero if it found something. That is what it takes to hang it off a cron without anyone
|
|
20
|
+
reading the output.
|
|
21
|
+
|
|
22
|
+
## The three directions, which are three different errors
|
|
23
|
+
|
|
24
|
+
| Finding | What happened | How it is fixed |
|
|
25
|
+
|---|---|---|
|
|
26
|
+
| dark capability | The tool is installed and no row reaches it | Add the row that routes it |
|
|
27
|
+
| broken link | A handoff names a capability no row provides | Add the row, or fix the capability name |
|
|
28
|
+
| capability illusion | A row points at a tool that does not exist | Fix the path, or delete the row |
|
|
29
|
+
|
|
30
|
+
## What to do with the output
|
|
31
|
+
|
|
32
|
+
Every finding carries `file:line`. It is fixed by editing markdown, never code: the rows live in
|
|
33
|
+
`.os/core/resolver.md` —product origin, changed by PR in the repo— and in `resolver.md` —personal
|
|
34
|
+
origin, edited by the operator—.
|
|
35
|
+
|
|
36
|
+
**A dark capability of the product is not fixed in the brain.** If the missing row belongs to the
|
|
37
|
+
product, the right move is the PR; adding it to the personal resolver covers the symptom on one
|
|
38
|
+
machine only.
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
---
|
|
2
|
+
command: close-session
|
|
3
|
+
capability: Close the session without losing anything
|
|
4
|
+
handoff: Capture something on the fly
|
|
5
|
+
description: 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. Manually triggered, at the end of a session.
|
|
6
|
+
description_es: 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ó. Se dispara a mano, al final de una sesión.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# close-session — closing by distributing what the session left
|
|
10
|
+
|
|
11
|
+
A session that ends leaves material that is in no file. This spreads it across the loaded node's
|
|
12
|
+
canonical files and ends with an honest verdict: what was captured, what was **not**, and where it
|
|
13
|
+
resumes.
|
|
14
|
+
|
|
15
|
+
## The two questions
|
|
16
|
+
|
|
17
|
+
Both are asked, always, in this order:
|
|
18
|
+
|
|
19
|
+
1. **What cannot be lost from this session?** Decisions, learnings and pending items come out of
|
|
20
|
+
that answer.
|
|
21
|
+
2. **Was there anything that almost worked?** The attempt with no conclusion, the reasonable but
|
|
22
|
+
wrong filing, the tool that did something close to what was asked. **This is the question nobody
|
|
23
|
+
answers on their own**: when the agent does nothing it shows immediately; when it does something
|
|
24
|
+
almost right, nobody reports it. It goes to the learnings marked `provisional`.
|
|
25
|
+
|
|
26
|
+
Material is never invented to fill the file. If the session left nothing of one class, that class
|
|
27
|
+
gets no line.
|
|
28
|
+
|
|
29
|
+
## How it is run
|
|
30
|
+
|
|
31
|
+
You write the material with whatever came out of the two questions —one key per line— and run:
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
.os/core/lib/close-session.sh --brain . --org <slug> --material <file>
|
|
35
|
+
.os/core/lib/close-session.sh --brain . --root --material <file>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
`--root` closes over the root's own work — the same material, the same canonical files, without
|
|
39
|
+
the workspace's folder in front. It asks for neither `--session-org` nor `--load-context`: the root's
|
|
40
|
+
identity (`operator.md`) is already loaded in any session.
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
decision: Title
|
|
44
|
+
what: What is decided
|
|
45
|
+
why: Why
|
|
46
|
+
replaces: Which decision it replaces (optional)
|
|
47
|
+
invalidates: What would make it false (optional)
|
|
48
|
+
learning: Title
|
|
49
|
+
body: The body
|
|
50
|
+
provisional: Title
|
|
51
|
+
body: The body
|
|
52
|
+
pending-from: initiative | Text of the task
|
|
53
|
+
waiting: initiative | who unblocks it
|
|
54
|
+
unrouted: destination | content you filed there
|
|
55
|
+
not-captured: What you could not file, and why
|
|
56
|
+
touched: Path relative to the scope a file the session edited by hand, to commit
|
|
57
|
+
resume: initiative | Where the next session picks up
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
The keys are the input format the script reads: they are written exactly as shown. The script also
|
|
61
|
+
still accepts the old Spanish keys (`que`, `porque`, `reemplaza`, `invalidaria`, `cuerpo`,
|
|
62
|
+
`pending-de`, `sin-fila`, `no-capturado`, `tocado`, `retomar`) during this version — the verdict
|
|
63
|
+
names each old key used, once per close (spec 033), as an indented note under the header, in the
|
|
64
|
+
operator's language, followed by a blank line before "Captured".
|
|
65
|
+
|
|
66
|
+
`touched:` names a file the session edited directly — not through this script — that belongs in the
|
|
67
|
+
same commit as the rest of the close. One line per file.
|
|
68
|
+
|
|
69
|
+
**A pending task and a resume pointer both live in the backlog of an initiative, and only there**
|
|
70
|
+
(spec 057): always use `pending-from:`, never the bare `pending:` — an initiative-less pending, or a
|
|
71
|
+
`resume:` with no `initiative |` in front, gets nothing written and shows up under "Not captured"
|
|
72
|
+
instead. This is the same rule `capture` follows on its own: nothing enters unclassified.
|
|
73
|
+
|
|
74
|
+
**The operator's text always goes at the end of its line and is filed whole.** After the key there
|
|
75
|
+
is at most one structural field —an initiative, a path— ending in `|`; whatever follows is free text
|
|
76
|
+
and keeps all the rest, pipes included. **Never split it yourself and never strip characters from
|
|
77
|
+
it**: if a sentence carries a `|`, it goes through as is. One record closes when the next one
|
|
78
|
+
starts.
|
|
79
|
+
|
|
80
|
+
**Everything you write in the material comes from the operator, not from you.** A decision they did
|
|
81
|
+
not make is not a decision: it is an inference, and it goes as `not-captured` so they can see it.
|
|
82
|
+
|
|
83
|
+
`waiting:` is written when the session leaves an initiative waiting on something — a gate, a person,
|
|
84
|
+
a third party. The value says who unblocks it: that is what puts it at the top of the next session
|
|
85
|
+
start. It names an initiative that already exists: the script writes `waiting_on:` into its head and
|
|
86
|
+
declares it when the head is not there. No command creates one — an initiative that is missing is
|
|
87
|
+
written by hand at `initiatives/<slug>/README.md`, a folder with the name of the thing and its head
|
|
88
|
+
inside.
|
|
89
|
+
|
|
90
|
+
## The verdict
|
|
91
|
+
|
|
92
|
+
**It is shown exactly as it came out.** The five parts are fixed: captured, not captured, candidate
|
|
93
|
+
row, what stayed uncommitted, and the pointer to resume. **It never closes with a bare "done"**: a
|
|
94
|
+
close that only says it finished cannot be told apart from one that lost something.
|
|
95
|
+
|
|
96
|
+
If the verdict offers a candidate row for the resolver, you show it to the operator and write it
|
|
97
|
+
only if they say yes. The resolver grows by exception found; a row they did not approve is an edge
|
|
98
|
+
nobody is going to use.
|
|
99
|
+
|
|
100
|
+
## The close commits
|
|
101
|
+
|
|
102
|
+
Closing and committing are the same act. The close stages and commits, in the brain's own git repo,
|
|
103
|
+
what this script wrote plus every `touched:` that exists and is modified — never `git add -A`: a
|
|
104
|
+
file that is neither of those two is somebody else's session in progress, and it is named under
|
|
105
|
+
"Uncommitted (not from this session)" instead of being touched. Without a git repo at the brain's
|
|
106
|
+
root, nothing is committed and the fifth part says so. If the commit itself fails — git identity
|
|
107
|
+
never configured, a hook in the brain — the close does not abort or bypass anything: it says so and
|
|
108
|
+
what would have been committed shows up uncommitted, same as an edit from another session.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
command: grill
|
|
3
|
+
capability: Pressure the facts before a decision closes
|
|
4
|
+
description: 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. Manually triggered, and also the method any other interviewing tool cites by path.
|
|
5
|
+
pack_internal: true
|
|
6
|
+
description_es: 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. Se dispara a mano, y es además el método que cita por ruta cualquier otra herramienta que entreviste.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# grill — the pressure interview
|
|
10
|
+
|
|
11
|
+
Two faces. **Invocable on its own**: it pressures the facts of the loaded node and distributes what
|
|
12
|
+
comes out without inventing a new destination. **Referenceable method**: any tool that interviews
|
|
13
|
+
cites the section below instead of copying it — varying who it points at or which examples it uses
|
|
14
|
+
is parameterization by whoever cites, never a second copy of the method.
|
|
15
|
+
|
|
16
|
+
## Method
|
|
17
|
+
|
|
18
|
+
Cite this section by its heading (`core/skills/grill.md#method`) from any tool that interviews. The
|
|
19
|
+
five ingredients, in the order they are applied:
|
|
20
|
+
|
|
21
|
+
### 1. Counter-question with a concrete example
|
|
22
|
+
|
|
23
|
+
Faced with an answer that cannot be falsified ("everybody liked it", "it was a success", "the team
|
|
24
|
+
is clear on it"), the answer is neither accepted nor rephrased: a counter-question is returned
|
|
25
|
+
asking for the fact behind it, with an example of what would count as a good answer.
|
|
26
|
+
|
|
27
|
+
> Bad: "could you give more detail?"
|
|
28
|
+
>
|
|
29
|
+
> Good: "'they liked it' by what measure — did they finish the task unassisted, did they say it, or
|
|
30
|
+
> did you infer it? A good answer names the data: '3 out of 5 finished without asking for help, 2
|
|
31
|
+
> dropped out at step 3'."
|
|
32
|
+
|
|
33
|
+
### 2. Pressure capped at 1-2 attempts
|
|
34
|
+
|
|
35
|
+
At most two rounds of counter-question on the same fact. A third one gets no more information: it
|
|
36
|
+
saturates the interviewee and the method stops being an interview and becomes an interrogation.
|
|
37
|
+
|
|
38
|
+
### 3. Escape hatches
|
|
39
|
+
|
|
40
|
+
Two ways out, neither of which is "keep insisting":
|
|
41
|
+
|
|
42
|
+
- **Second resistance** — the answer to the second counter-question still has no fact. The attempt
|
|
43
|
+
is neither discarded nor forced into a third round: the gap is recorded, with who closes it, and
|
|
44
|
+
you move on.
|
|
45
|
+
- **Strong evidence up front** — if the first answer already carries the fact (observed behavior,
|
|
46
|
+
measured data), there is no counter-question to make: it is confirmed and you move on.
|
|
47
|
+
|
|
48
|
+
### 4. Evidence hierarchy
|
|
49
|
+
|
|
50
|
+
`behavior > data > claim > assumption`. Faced with two answers competing over the same fact, the one
|
|
51
|
+
higher in the hierarchy wins — an assumption does not weigh the same as observed behavior even when
|
|
52
|
+
both are stated with the same confidence.
|
|
53
|
+
|
|
54
|
+
### 5. Every gap is recorded, never filled in
|
|
55
|
+
|
|
56
|
+
A gap the pressure did not close is not completed with an inference so the document looks tidy. It
|
|
57
|
+
is recorded as open, with who closes it. Filling it in silently is the same class of incomplete scan
|
|
58
|
+
presented as complete that the rest of the system forbids.
|
|
59
|
+
|
|
60
|
+
## Invocable face
|
|
61
|
+
|
|
62
|
+
It runs on its own over the node that is already loaded. It pressures its facts with the method
|
|
63
|
+
above and distributes what comes out across the canonical files that already exist — it invents
|
|
64
|
+
none:
|
|
65
|
+
|
|
66
|
+
| What comes out | Where it goes |
|
|
67
|
+
|---|---|
|
|
68
|
+
| A decision | `decisions.md` of the loaded node — the organization's if that is where the work is happening, the root's if the loaded node is the operator's own work |
|
|
69
|
+
| A gap | The backlog of the loaded node (`backlog.md` of the organization), recorded as open with who closes it named in the text — the same free-text, verbatim line format the session close already uses |
|
|
70
|
+
| A gap, if the loaded product node declares its own open-questions layer | That layer (`context/open-questions.md` of the node), instead of the backlog |
|
|
71
|
+
|
|
72
|
+
The three destinations exist before this tool. If pressuring a fact were to lead to writing into a
|
|
73
|
+
destination that is not in this table, `grill` does not invent it: it says so and stops — that row
|
|
74
|
+
is added by the operator, not by the session.
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
---
|
|
2
|
+
command: mount-repo
|
|
3
|
+
capability: Mount a repo as the body of a node, or give birth to it if it does not exist yet
|
|
4
|
+
description: 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. Manually triggered, once per initiative that starts being built.
|
|
5
|
+
description_es: 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. Se dispara a mano, una vez por iniciativa que empieza a construirse.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# mount-repo — giving a node a body
|
|
9
|
+
|
|
10
|
+
When a node starts being built, its body lives in a git repo: specs, technical decisions and
|
|
11
|
+
as-built. The head stays in the brain. **Deciding to build and mounting the repo are the same act**:
|
|
12
|
+
the head's `repo:` is what activates the building mechanics, and this command writes it.
|
|
13
|
+
|
|
14
|
+
## How it is run
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
.os/core/lib/mount-repo.sh --brain . --head workspaces/<workspace>/initiatives/<slug>/README.md \
|
|
18
|
+
--remote <remote> [--clone-root <absolute path>] [--new]
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Before running it
|
|
22
|
+
|
|
23
|
+
1. **The head already exists.** The command mounts a repo onto a head that is written; it does not
|
|
24
|
+
invent one. If the node is not there yet, it is created first — a folder with the name of the
|
|
25
|
+
initiative and its `initiatives/<slug>/README.md` inside. On a brain that still keeps its heads in
|
|
26
|
+
the previous shape, the head is where that brain has it (see `rename-heads`).
|
|
27
|
+
2. **The remote is the remote, never a local path.** What gets written into `repo:` travels with the
|
|
28
|
+
brain to any machine; the local path is data of this one.
|
|
29
|
+
3. **The clone root is asked once.** It is the folder where this machine's checkouts live, outside
|
|
30
|
+
the brain. It ends up written in `mounts.md` and is never asked again. **With no answer no
|
|
31
|
+
default is invented**: ask and wait.
|
|
32
|
+
|
|
33
|
+
## What it does
|
|
34
|
+
|
|
35
|
+
| Act | Where |
|
|
36
|
+
|---|---|
|
|
37
|
+
| `repo: <remote>` | The head's frontmatter |
|
|
38
|
+
| The clone, flat and outside the brain | `<clone root>/<repo name>` |
|
|
39
|
+
| The `remote → local path` row | `mounts.md` at the root of the brain |
|
|
40
|
+
| The checkout authorized for the harness | `permissions.additionalDirectories` in `.claude/settings.local.json` |
|
|
41
|
+
| With `--new`: the repo born from the product's scaffold, its first commit on `main` and `origin` declared | `<clone root>/<repo name>`, in the clone's place |
|
|
42
|
+
|
|
43
|
+
**`--new` is for a repo that does not exist yet**: instead of cloning, it writes the scaffold
|
|
44
|
+
—`CLAUDE.md` with the two gates and the Definition of Done, `.claude/settings.json` denying the
|
|
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
|
|
47
|
+
`origin` at the remote. The prose comes out in the brain's language.
|
|
48
|
+
|
|
49
|
+
**`--new` reads "the remote does not answer" as "it does not exist yet".** A private repo that does
|
|
50
|
+
exist and answers with an authentication error reads the same from here: if credentials are what is
|
|
51
|
+
missing, `--new` is not the way — fix the access and mount it with the plain command, or the head
|
|
52
|
+
ends up pointing at a repo that was born next to the one that was already there.
|
|
53
|
+
|
|
54
|
+
**The remote is not created and nothing is pushed.** That escapes the system: the command closes by
|
|
55
|
+
printing two commands for the operator to run — `gh repo create <owner>/<name> --private` if `gh` is
|
|
56
|
+
authenticated and the remote is a GitHub one, or creating it at the provider by hand if it is not,
|
|
57
|
+
and then `git -C '<path>' push -u origin main`. The owner comes from the remote itself, never from
|
|
58
|
+
whoever is authenticated, and the creation never carries `--source`/`--push`: over a checkout that
|
|
59
|
+
already declares `origin`, that combination fails and does not push. The repo lives locally, mounted
|
|
60
|
+
and complete, until the operator runs them.
|
|
61
|
+
|
|
62
|
+
**Running `--new` twice is safe.** Over a repo already born at `<clone root>/<repo name>` with that
|
|
63
|
+
`origin`, it does not give birth again: it says so and completes the other four acts. That is what
|
|
64
|
+
makes a birth interrupted halfway resumable — the same command, again.
|
|
65
|
+
|
|
66
|
+
Mounting and authorizing are the same act: the checkout stops needing a permission prompt file by
|
|
67
|
+
file for whoever works on it next, **from the next session of the harness on** — a settings file
|
|
68
|
+
already loaded when the session started does not pick up a mid-session edit.
|
|
69
|
+
|
|
70
|
+
`mounts.md` **does not travel**: the command creates it with its first piece of data, declares it in
|
|
71
|
+
the brain's `.gitignore` and appends its glob to `tree.md`. On a new machine the table is not there
|
|
72
|
+
— the scans report the mount as unreachable and running `mount-repo` on the same remote rebuilds it.
|
|
73
|
+
That is the designed degradation, not an error. `.claude/settings.local.json` follows the same rule
|
|
74
|
+
for what does not travel: the command declares it in `.gitignore` too, next to `mounts.md`.
|
|
75
|
+
|
|
76
|
+
Running it twice on the same remote neither duplicates the row nor clones again.
|
|
77
|
+
|
|
78
|
+
## When it stops
|
|
79
|
+
|
|
80
|
+
| Exit | What happened | What to do |
|
|
81
|
+
|---|---|---|
|
|
82
|
+
| 2 | The head does not exist, or its frontmatter cannot be read | Create or fix the head |
|
|
83
|
+
| 3 | The remote does not answer | Check the remote and the permissions; if the repo does not exist yet, `--new` |
|
|
84
|
+
| 4 | The head already declares **another** `repo:` | It belongs to the operator: ask which one stays |
|
|
85
|
+
| 5 | The clone root is missing, or falls inside the brain or inside another repo; with `--new`, the destination is taken by something that is not this remote's repo, or `mounts.md` points this remote outside the clone root | Ask where the checkouts go; a destination or a row that is already there belongs to the operator |
|
|
86
|
+
| 6 | `python3` is missing — hard requirement of the product, next to `git` | Install it (macOS: `xcode-select --install`, the same command that brings git; Windows: python.org; Linux: the distro's package manager) and re-run |
|
|
87
|
+
| 7 | `--new` on a remote that **does** answer | There is nothing to create: mount it without `--new` |
|
|
88
|
+
| 8 | `--new`: the birth failed — the message names why | What the command had created gets removed, or it says what was left behind; fix what the message names and run it again |
|
|
89
|
+
|
|
90
|
+
In all eight cases nothing was written. A half-mounted node is worse than an unmounted one.
|
|
91
|
+
|
|
92
|
+
## When it finishes
|
|
93
|
+
|
|
94
|
+
Report what was written and where, in one line. If the script says the table was born or that it
|
|
95
|
+
declared a glob, pass it through as is.
|
|
96
|
+
|
|
97
|
+
Unmounting does not exist yet: removing a mount is editing `mounts.md` and the head by hand.
|