dreamteamer 0.32.0 → 0.33.1
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 +4 -2
- package/collections/agents.collection.yaml +41 -32
- package/collections/collections.collection.yaml +68 -230
- package/collections/command-bindings.collection.yaml +37 -43
- package/collections/commands.collection.yaml +50 -35
- package/collections/mixins.collection.yaml +49 -0
- package/collections/modules.collection.yaml +76 -122
- package/collections/repos.collection.yaml +53 -56
- package/collections/skills.collection.yaml +32 -21
- package/collections/ui-views.collection.yaml +57 -46
- package/mixins/docs.mixin.yaml +21 -0
- package/mixins/entity.mixin.yaml +22 -0
- package/package.json +5 -3
- package/scripts/migrate-descriptors-v2.mjs +795 -0
- package/skills/using-dreamteamer/SKILL.md +27 -24
- package/skills/using-dreamteamer/references/agents.md +1 -1
- package/skills/using-dreamteamer/references/before-you-build.md +1 -5
- package/skills/using-dreamteamer/references/collections.md +450 -348
- package/skills/using-dreamteamer/references/commands.md +49 -35
- package/skills/using-dreamteamer/references/data-modeling.md +342 -319
- package/skills/using-dreamteamer/references/extensions.md +8 -5
- package/skills/using-dreamteamer/references/getting-started.md +6 -4
- package/skills/using-dreamteamer/references/records.md +43 -34
- package/skills/using-dreamteamer/references/skills.md +4 -3
- package/skills/using-dreamteamer/references/ui-components.md +30 -32
- package/skills/using-dreamteamer/references/ui-views.md +122 -124
- package/src/api.d.ts +22 -2
- package/src/api.js +16 -1
- package/src/check.js +55 -40
- package/src/checkout.js +14 -13
- package/src/cli.js +118 -71
- package/src/collections-cli.js +136 -144
- package/src/commit.js +9 -8
- package/src/compile-collections.js +346 -0
- package/src/compile.js +232 -1068
- package/src/descriptor-v2.js +165 -0
- package/src/descriptor.js +90 -0
- package/src/doctor.js +57 -0
- package/src/events.js +11 -10
- package/src/extensions.js +48 -10
- package/src/field-values.js +7 -6
- package/src/fields.js +254 -0
- package/src/filter.js +45 -1
- package/src/fractional-index.js +2 -2
- package/src/harnesses.js +80 -52
- package/src/history.js +3 -3
- package/src/init.js +74 -46
- package/src/namespace.js +23 -9
- package/src/placement.js +26 -16
- package/src/presentation.js +153 -299
- package/src/record-commands.js +12 -12
- package/src/records-api.d.ts +106 -7
- package/src/records-api.js +2 -1
- package/src/records.js +20 -14
- package/src/ref.js +3 -39
- package/src/relations.js +23 -24
- package/src/runtime.js +12 -35
- package/src/schema-ops.js +1181 -1275
- package/src/store.js +212 -82
- package/src/template.js +100 -24
- package/src/temporal.js +11 -3
- package/src/views.js +176 -0
- package/src/workspace.js +14 -0
- package/src/yaml.js +66 -5
- package/collection-templates/docs.collection-template.yaml +0 -17
- package/collection-templates/entity.collection-template.yaml +0 -20
- package/collections/collection-templates.collection.yaml +0 -20
|
@@ -99,44 +99,48 @@ and nothing is silently dropped.
|
|
|
99
99
|
`modules/<module>/command-bindings/<command>--<collection>.command-binding.yaml` — an m2m record:
|
|
100
100
|
|
|
101
101
|
```yaml
|
|
102
|
+
# modules/clinic/command-bindings/transcribe-visit--health-visit-recordings.command-binding.yaml
|
|
102
103
|
command: commands/transcribe-visit
|
|
103
104
|
collection: collections/health/visit-recordings
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
scope: record # the default; `collection` for commands that need no record
|
|
106
|
+
available_when:
|
|
107
|
+
recording_file:
|
|
108
|
+
_nempty: true
|
|
109
|
+
done_when:
|
|
110
|
+
transcript:
|
|
111
|
+
_nempty: true
|
|
107
112
|
description: audio present, not yet transcribed
|
|
108
113
|
```
|
|
109
114
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
+
The keys are closed: `command`, `collection`, `scope`, `available_when`, `done_when`,
|
|
116
|
+
`description`. What a binding buys: `dt next <collection>[/<id>] [--ids a,b] [--json]` answers
|
|
117
|
+
"what can I do with this record right now"; a surface draws the same answer as buttons; and the
|
|
118
|
+
orientation block renders every binding with its gates **literally** (`/transcribe-visit
|
|
119
|
+
(available when: recording_file set · done when: transcript set)`) — so the gate you write is also
|
|
120
|
+
documentation every session reads without loading anything.
|
|
115
121
|
|
|
116
122
|
Each record gets one of three states, evaluated in this order:
|
|
117
123
|
|
|
118
124
|
| state | meaning | evaluation |
|
|
119
125
|
|---|---|---|
|
|
120
|
-
| `done` | the command's post-condition already holds | `
|
|
121
|
-
| `available` | ready to run | `
|
|
122
|
-
| `not-applicable` | not this record's moment | `
|
|
126
|
+
| `done` | the command's post-condition already holds | `done_when` passes — **checked first**, so a record satisfying both gates reads done, not available |
|
|
127
|
+
| `available` | ready to run | `available_when` passes (or there is none), and `done_when` doesn't |
|
|
128
|
+
| `not-applicable` | not this record's moment | `available_when` fails, or the record doesn't resolve |
|
|
123
129
|
|
|
124
130
|
Done renders **completed** — a check mark, not a bare grey mystery button: the operator sees work
|
|
125
|
-
that happened, and the button is not offered to run again. `
|
|
126
|
-
no record: always runnable, and the invocation
|
|
127
|
-
|
|
131
|
+
that happened, and the button is not offered to run again. `scope: collection` bindings evaluate
|
|
132
|
+
no record: always runnable, and the invocation carries the collection name — so a command bound to
|
|
133
|
+
several collections knows where to write.
|
|
128
134
|
|
|
129
|
-
Compile holds the referential ground: a binding naming an unknown command or collection
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
evaluate it against.
|
|
135
|
+
Compile holds the referential ground: a binding naming an unknown command or collection, an
|
|
136
|
+
unknown filter operator, an unknown value token (anything but `$today` and `$now`) or a field the
|
|
137
|
+
collection lacks **fails compile** — never a gate that silently never opens. A gate on a
|
|
138
|
+
`scope: collection` binding warns: there is no record to evaluate it against.
|
|
133
139
|
|
|
134
140
|
## designing the gates
|
|
135
141
|
|
|
136
142
|
The design principle behind all of it: **the record's own fields are the progress marker.** No run
|
|
137
|
-
records, no job table
|
|
138
|
-
was removed after measurement showed real work never used it. The gates only work if the fields
|
|
139
|
-
they read stay honest:
|
|
143
|
+
records, no job table. The gates only work if the fields they read stay honest:
|
|
140
144
|
|
|
141
145
|
- **Pick the provenance signal, not the content signal.** "Is it transcribed?" is
|
|
142
146
|
`transcription._nempty` — the provenance object — NOT `transcript._nempty`: a body can be filled
|
|
@@ -144,14 +148,15 @@ they read stay honest:
|
|
|
144
148
|
- **Filters reach one hop OUTBOUND**: `{ recording: { transcript: { _nempty: true } } }` resolves
|
|
145
149
|
the ref and evaluates the sub-condition on the target; array refs use any-match semantics. A
|
|
146
150
|
dangling ref, an unknown collection or a non-ref value **narrows, never widens** — a broken gate
|
|
147
|
-
makes the command unavailable, not accidentally available.
|
|
151
|
+
makes the command unavailable, not accidentally available. `$today` makes a date gate move on
|
|
152
|
+
its own: `{ follow_up: { _lte: $today } }` is available from the day it falls due.
|
|
148
153
|
- ⚠ **Inbound refs are unsupported** — "a summary referencing this record exists" is inexpressible
|
|
149
154
|
as a filter over the record itself. Two honest answers: give the relation a **generated mirror**
|
|
150
155
|
(`data-modeling.md` Part VI), which turns the inbound fact into a local field —
|
|
151
156
|
`{ summary: { _nempty: true } }` works the moment `summary` is a mirror — or ship the binding
|
|
152
|
-
without a `
|
|
157
|
+
without a `done_when` and accept that it never shows done. What is not honest is a proxy field a
|
|
153
158
|
human must remember to set.
|
|
154
|
-
- **A `
|
|
159
|
+
- **A `done_when` and a proof's `count` (a proofs extension) answer different questions — put
|
|
155
160
|
each expectation on its own side.** A gate is a filter over ONE record, evaluated on every render of `dt next` and every board
|
|
156
161
|
the studio draws, so it can only ever read that record's own fields (plus one outbound hop) — which
|
|
157
162
|
is exactly the gap the bullet above names: "a summary referencing this record exists" is
|
|
@@ -170,17 +175,26 @@ they read stay honest:
|
|
|
170
175
|
|
|
171
176
|
## the chain — multi-step processes
|
|
172
177
|
|
|
173
|
-
There is no workflow kind, deliberately
|
|
174
|
-
|
|
178
|
+
There is no workflow kind, deliberately. A multi-step process is a **chain of commands wired by
|
|
179
|
+
shared fields: step N's `done_when` is step N+1's `available_when`.**
|
|
175
180
|
|
|
176
181
|
```yaml
|
|
177
|
-
# step 1 — transcribe--visit-recordings.command-binding.yaml
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
182
|
+
# step 1 — transcribe-visit--health-visit-recordings.command-binding.yaml
|
|
183
|
+
available_when:
|
|
184
|
+
recording_file:
|
|
185
|
+
_nempty: true
|
|
186
|
+
done_when:
|
|
187
|
+
transcript:
|
|
188
|
+
_nempty: true
|
|
189
|
+
|
|
190
|
+
# step 2 — summarize-visit--health-visits.command-binding.yaml (gates one hop through the ref)
|
|
191
|
+
available_when:
|
|
192
|
+
recordings:
|
|
193
|
+
transcript:
|
|
194
|
+
_nempty: true
|
|
195
|
+
done_when:
|
|
196
|
+
summary: # a generated mirror — the inbound fact, made local
|
|
197
|
+
_nempty: true
|
|
184
198
|
```
|
|
185
199
|
|
|
186
200
|
The queue advances itself: completing step 1 is what makes step 2 available, with no state machine
|
|
@@ -198,6 +212,6 @@ others in order; the bindings still show per-step truth.
|
|
|
198
212
|
| a command for something a skill should auto-trigger | commands fire only when remembered |
|
|
199
213
|
| a record command that takes exactly one ref | multi-select invocations carry several; loop in the body |
|
|
200
214
|
| gating on the content field instead of the provenance field | a hand-filled body reads done with nothing verified |
|
|
201
|
-
| a `
|
|
202
|
-
| a
|
|
215
|
+
| a `done_when` over an inbound ref | unsupported — use a mirror field, or ship without `done_when` and say so |
|
|
216
|
+
| a gate on a `scope: collection` binding | there is no record to evaluate; compile warns |
|
|
203
217
|
| a destructive command the model may invoke | set `disable-model-invocation` — some verbs are human-only |
|