dreamteamer 0.16.0 → 0.16.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dreamteamer",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"description": "A workspace compiler for coding agents — schema-validated records as plain files over git, compiled into every harness",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Gilad Khen <giladkhen@gmail.com>",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: using-dreamteamer
|
|
3
|
-
description: always load first in a dreamteamer workspace — reading, writing and committing records, and changing what the workspace keeps or does (collections and fields, skills, commands, agents, ui-views, component code). Also when deciding which of those a request should become, when a compile or check error names a source file, or when a request names a new kind of thing to keep.
|
|
3
|
+
description: always load first in a dreamteamer workspace — reading, writing and committing records, and changing what the workspace keeps or does (collections and fields, skills, commands, agents, ui-views, component code). Also when deciding which of those a request should become, when a compile or check error names a source file, or when a request names a new kind of thing to keep. Also for a brand-new or just-installed workspace, or dreamteamer over existing data.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# using dreamteamer
|
|
@@ -39,7 +39,8 @@ unsure which skill owns the job in front of you.
|
|
|
39
39
|
and the harness folders are gitignored build output, so a clone has no runtime until compile
|
|
40
40
|
writes one — and `.env` is per-machine (declared keys: `references/records.md`). `dt status` says
|
|
41
41
|
whether the runtime is fresh. the workspace's own switches live in `package.json`'s `dreamteamer`
|
|
42
|
-
block (`references/collections.md`, the workspace manifest)
|
|
42
|
+
block (`references/collections.md`, the workspace manifest) — and the guided path from nothing,
|
|
43
|
+
or from existing data, is `references/getting-started.md`.
|
|
43
44
|
|
|
44
45
|
## the CLI is the front door
|
|
45
46
|
|
|
@@ -47,8 +48,21 @@ block (`references/collections.md`, the workspace manifest).
|
|
|
47
48
|
workspace may alias it as an npm script — check `scripts` in `package.json` (the common spelling
|
|
48
49
|
is `npm run --silent dt -- <verb> …`).
|
|
49
50
|
|
|
51
|
+
**default to the CLI for every record read and write.** it validates before disk, generates the
|
|
52
|
+
id, materializes defaults, and its writes are pathspec-scoped; touch a record file by hand only
|
|
53
|
+
when the CLI cannot express the change (a long body, a nested map) — and then you owe `dt check`
|
|
54
|
+
(`references/records.md`).
|
|
55
|
+
|
|
50
56
|
**`dt help` is the complete command surface** — record verbs, schema verbs, workspace verbs, and
|
|
51
|
-
their flags, on one page (there is no per-verb `--help`).
|
|
57
|
+
their flags, on one page (there is no per-verb `--help`).
|
|
58
|
+
|
|
59
|
+
the verb names, as a map (semantics and flags live in `help`; a test holds this list to the
|
|
60
|
+
dispatch, so it cannot drift):
|
|
61
|
+
|
|
62
|
+
- read & measure — `list` `get` `values` `history` `diff` `commands` `relations` `resolve`
|
|
63
|
+
- write & publish — `add` `set` `rm` `rename` `move` `revert` `commit` `ensure`
|
|
64
|
+
- schema (sources, through the compile gate) — `schema` `add-collection` `rm-collection` `rename-collection` `add-field` `update-field` `remove-field` `add-view` `set-view` `rm-view`
|
|
65
|
+
- workspace — `init` `install` `update` `compile` `check` `status` `start` `changes` `help` don't learn syntax from prose, this skill included: prose drifts, and `help` ships in
|
|
52
66
|
the same file as the dispatch it documents. run it once before your first write of a session.
|
|
53
67
|
what prose adds is judgment — *when* a verb is the right move, and the guarantees you can lean
|
|
54
68
|
on: **validation is hard** (unknown fields included; an invalid write is rejected before disk
|
|
@@ -63,6 +77,7 @@ Load by the map; nothing here is loaded "just in case".
|
|
|
63
77
|
|
|
64
78
|
| the job | load |
|
|
65
79
|
|---|---|
|
|
80
|
+
| a brand-new or empty workspace, dreamteamer over an existing pile of files, "help me set this up" | `references/getting-started.md` |
|
|
66
81
|
| read, create, update, rename, delete, commit — or UNDO — a record | `references/records.md` |
|
|
67
82
|
| "what changed while I was away" | `references/changes.md` |
|
|
68
83
|
| the workspace seems unable to do something — a new kind of thing, a missing capability, "don't we already have this?" | `references/before-you-build.md` (look first); a new model then continues `references/data-modeling.md` (decide) → `references/collections.md` (write it) |
|
|
@@ -98,8 +113,9 @@ workspace's decision log (where one exists) wins over older documents.
|
|
|
98
113
|
2. **the filename is the id.** where a record also carries a frontmatter `name` (agents,
|
|
99
114
|
commands), the two must agree, or the id lies and dispatch misses.
|
|
100
115
|
3. **the meta-descriptor is the spec.** every source kind is itself a collection — read
|
|
101
|
-
`.dreamteamer/collections/<kind>.collection.yaml
|
|
102
|
-
|
|
116
|
+
`.dreamteamer/collections/<kind>.collection.yaml`; its field descriptions are the contract.
|
|
117
|
+
prose drifts, and a sample record is one arbitrary instance — when a schema underdocuments a
|
|
118
|
+
convention, fixing the schema IS the task (`references/records.md`).
|
|
103
119
|
4. **`dt compile`, then `dt check`**, after any source change. compile fails closed — a bad
|
|
104
120
|
source is rejected and the previous runtime stands; check reports and never modifies.
|
|
105
121
|
5. **a running session does not see new sources.** a new skill, command or agent is live in the
|
|
@@ -420,6 +420,9 @@ descriptions are what an agent reads before writing a value. So:
|
|
|
420
420
|
- A field's `description` says what the value MEANS, names the source when the value is copied
|
|
421
421
|
from elsewhere, and states the convention an agent must follow ("empty means unmatched — the
|
|
422
422
|
matching command's queue").
|
|
423
|
+
- A field whose valid value has a non-obvious SHAPE carries an `examples:` annotation — standard
|
|
424
|
+
JSON Schema, passed through to the compiled descriptor — so the canonical value lives in the
|
|
425
|
+
contract, not in whichever record a writer happens to open.
|
|
423
426
|
- `use_when` is authored **only** when an agent that fully understood the description would still
|
|
424
427
|
not reach for the collection — a search-here-first trigger, a write-here-when situation. It is
|
|
425
428
|
prose; nothing fires on it; and a `use_when` restating the description costs every session
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# getting started — from nothing, or from a pile, to a working workspace
|
|
2
|
+
|
|
3
|
+
Three arrivals land here, and they end in the same place. **The empty folder**: someone ran
|
|
4
|
+
`npm install dreamteamer` (or is about to) and has nothing else. **The existing pile**: a repo or
|
|
5
|
+
folder that already holds real files — notes, exports, spreadsheets — that should become records.
|
|
6
|
+
**The operator who is technical enough to run npm and not much more** — for whom the git section
|
|
7
|
+
below is written in plain words. The finish line for all three is identical: a compiled runtime,
|
|
8
|
+
ONE honest collection with real records in it, published — not an architecture.
|
|
9
|
+
|
|
10
|
+
No UI is assumed anywhere below. The CLI and the records are complete on their own; any surface
|
|
11
|
+
that reads the compiled runtime can render the same workspace later, unchanged.
|
|
12
|
+
|
|
13
|
+
| the situation | read |
|
|
14
|
+
|---|---|
|
|
15
|
+
| nothing exists yet | the skeleton, then path A |
|
|
16
|
+
| real files already exist | the skeleton, then path B |
|
|
17
|
+
| dreamteamer joins a repo that also holds code | the skeleton, then path C |
|
|
18
|
+
| "do I need git? a server? an account?" | git, in plain words |
|
|
19
|
+
|
|
20
|
+
## the skeleton — five commands, one minute
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm init -y # only if there is no package.json yet
|
|
24
|
+
npm install dreamteamer
|
|
25
|
+
git init # strongly recommended, not required to start — see below. first,
|
|
26
|
+
# so init can commit its own skeleton (it does, when git is there)
|
|
27
|
+
npx dreamteamer init # writes the workspace skeleton; never compiles
|
|
28
|
+
npx dreamteamer compile # materializes the runtime; writes the orientation block
|
|
29
|
+
npx dreamteamer check # should report 0 violations over the starter collection
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
`init` writes the `dreamteamer` block into `package.json` (the workspace manifest —
|
|
33
|
+
`collections.md`), a workspace module at `modules/default/` with a starter `notes` collection,
|
|
34
|
+
and `.env.example`. `compile` is what makes it real: the runtime under `.dreamteamer/`, the
|
|
35
|
+
harness folders, and the orientation block every future agent session reads — which is how the
|
|
36
|
+
next session finds this skill without being told.
|
|
37
|
+
|
|
38
|
+
## git, in plain words
|
|
39
|
+
|
|
40
|
+
git is three things to this workspace, and none of them needs a server or an account:
|
|
41
|
+
|
|
42
|
+
- **the history** — every change to every record, forever, answerable (`dt history`, `dt changes`);
|
|
43
|
+
- **the undo** — any record restorable to any prior state (`records.md`, undoing);
|
|
44
|
+
- **the publish step** — `dt commit` is what turns "written to disk" into "on the record".
|
|
45
|
+
|
|
46
|
+
Verified capability split: **without git, everything still reads, writes, validates and compiles**
|
|
47
|
+
— only `dt commit`, `dt changes` and `dt history`/`diff`/`revert` are unavailable. `git init` is
|
|
48
|
+
one command, local, free, and turns all of them on. A **remote** (GitHub or anywhere) is a
|
|
49
|
+
separate, optional, later decision — it buys backup and a second machine, and nothing here needs
|
|
50
|
+
it. If the operator is unsure: run `git init`, skip the remote, move on.
|
|
51
|
+
|
|
52
|
+
## path A — nothing yet: model from an interview
|
|
53
|
+
|
|
54
|
+
The first hour's goal is **one collection the operator will actually touch tomorrow**, holding
|
|
55
|
+
real records. Not five collections, not a namespace plan, not a module layout.
|
|
56
|
+
|
|
57
|
+
1. **Find the daily thing.** Ask what they keep re-finding, re-asking or losing — the answer names
|
|
58
|
+
the first collection. When the requirement is vague, `data-modeling.md` Part II is the
|
|
59
|
+
interview: twelve questions, most answered by the requirement itself.
|
|
60
|
+
2. **Propose small, then stop.** The proposal contract (`data-modeling.md` §7): the descriptor
|
|
61
|
+
YAML, one sample record as its `dt add` line, and what is deliberately NOT modelled. The
|
|
62
|
+
operator says yes before anything lands.
|
|
63
|
+
3. **Create it in the workspace module** — `dt schema add-collection` (it compiles and publishes
|
|
64
|
+
itself). The workspace module is the right first home for everything (`data-modeling.md` §8);
|
|
65
|
+
extraction is a decision for the second consumer, months away.
|
|
66
|
+
4. **Seed three to five REAL records immediately** with `dt add` — not test data. Seeding real
|
|
67
|
+
records before declaring the model finished catches half the field mistakes: the missing unit,
|
|
68
|
+
the enum the domain spells differently, the id that comes out wrong.
|
|
69
|
+
5. **Iterate on evidence**: `dt values` shows what the fields actually hold, `dt check` what
|
|
70
|
+
disagrees. Adjust, then — only then — consider the second collection.
|
|
71
|
+
|
|
72
|
+
Deliberately deferred, each until its trigger: a **namespace** (first second-DOMAIN collection,
|
|
73
|
+
not before — `collections.md`) · a **module of its own** (a second consumer or a closed reference
|
|
74
|
+
graph — `data-modeling.md` §8) · **skills, commands, views** (after records exist — behaviour
|
|
75
|
+
follows shape, and a view needs a recurring question to encode).
|
|
76
|
+
|
|
77
|
+
## path B — dreamteamer over an existing pile
|
|
78
|
+
|
|
79
|
+
The pile is evidence; read it before modeling anything.
|
|
80
|
+
|
|
81
|
+
1. **Survey**: what file kinds, how many, what dates and names they carry, and — most useful —
|
|
82
|
+
what questions the operator actually asks of this pile. Read a handful of files end to end.
|
|
83
|
+
2. **Split the pile in two.** Files that already look like records — one thing per file, with
|
|
84
|
+
discoverable fields — get **registered where they stand**: `collections.md`, "registering an
|
|
85
|
+
existing data folder" (derive the descriptor from reality; an authored `storage.path` points at
|
|
86
|
+
the existing folder; **never rewrite records to fit an inferred schema**). Tabular exports
|
|
87
|
+
(CSVs, spreadsheets) get **imported**: `records.md`, the bulk-write recipe — one script, one
|
|
88
|
+
check, one collection-scoped commit.
|
|
89
|
+
3. **Big and binary files never become records.** They stay where they are (or move to a files
|
|
90
|
+
folder), and a record points at each via a `${env:VAR}` template — the filing convention and
|
|
91
|
+
the mechanics are in `records.md`.
|
|
92
|
+
4. **Restructure later, with the tools that keep references true** — `dt rename`,
|
|
93
|
+
`dt schema rename-collection` — not during the first pass. Model reality first; `check` will
|
|
94
|
+
tell you what reality violates, and that list, not taste, drives the cleanup.
|
|
95
|
+
|
|
96
|
+
## path C — into a repo that already holds code
|
|
97
|
+
|
|
98
|
+
The workspace root is wherever `package.json` carries the `dreamteamer` block — a repo can be
|
|
99
|
+
both a codebase and a workspace. `init`'s runtime folders are gitignored, records default to
|
|
100
|
+
`data/` beside the code, and an authored `storage.path` can put any collection anywhere the repo
|
|
101
|
+
prefers. Nothing about the code moves; `check` and `compile` read only what descriptors name.
|
|
102
|
+
|
|
103
|
+
## the first hour's mistakes
|
|
104
|
+
|
|
105
|
+
| mistake | reality |
|
|
106
|
+
|---|---|
|
|
107
|
+
| modeling the whole domain up front | one collection used tomorrow beats five perfect ones — widening is always safe later (`data-modeling.md` Part IX) |
|
|
108
|
+
| test data in the seed records | real records are what catch the model's mistakes |
|
|
109
|
+
| skipping git as "too technical" | one local command, no account — and it is the history, the undo and the publish step |
|
|
110
|
+
| inventing ids by hand | `id.generate` owns identity — pass `--id` only when the operator named one |
|
|
111
|
+
| hand-writing the first descriptor | `dt schema add-collection` is compile-gated and publishes itself; hand-written sources owe `dt compile` |
|
|
112
|
+
| rewriting existing files to fit a guessed schema | describe reality, compile, `check` — then decide which violations are worth fixing in the data |
|
|
113
|
+
| waiting for a UI before starting | the CLI and the records are the complete system; any surface renders them later, unchanged |
|
|
@@ -54,14 +54,27 @@ read the compiled descriptor: `.dreamteamer/collections/<collection>.collection.
|
|
|
54
54
|
Schema; the `x-` keywords carry the domain semantics — `x-reference`, `x-body`, `x-inverse`). it
|
|
55
55
|
also carries `title` (what to call the collection) and `title_template` (how to label one record).
|
|
56
56
|
|
|
57
|
+
the schema is the CONTRACT, and it is required to be sufficient: each field's `description`
|
|
58
|
+
carries its conventions, an `examples:` annotation (standard JSON Schema — compile passes it
|
|
59
|
+
through to the compiled descriptor) carries a canonical value where the shape is non-obvious, and
|
|
60
|
+
`dt values` shows a vocabulary's real spread. so **with a sufficient schema, do not open sibling
|
|
61
|
+
records for shape** — the descriptor answers faster than a peek, the validator rejects a wrong
|
|
62
|
+
write before disk, and a sibling is a bet on whichever record you grabbed being representative
|
|
63
|
+
(measured blind: the peek route bought nothing the descriptor already said, and it only works
|
|
64
|
+
while consistent siblings happen to exist). a schema that makes you peek to write correctly is a
|
|
65
|
+
defect in the schema — fix it.
|
|
66
|
+
|
|
57
67
|
## writing a record by hand
|
|
58
68
|
|
|
59
69
|
**default to `dt add <collection>`** — id, defaults and validation in one line. hand-write only
|
|
60
70
|
when the CLI can't express the value: a nested map, or a long structured body.
|
|
61
71
|
|
|
62
|
-
when you do,
|
|
63
|
-
|
|
64
|
-
|
|
72
|
+
when you do, the descriptor is still the contract — required, defaults, each field's
|
|
73
|
+
`description` and `examples:`, `dt values` for vocabularies. peek at a sibling
|
|
74
|
+
(`dt get <collection>/<id> --json`) only when the schema underdocuments a convention you need — a
|
|
75
|
+
sibling is ONE arbitrary instance, possibly written before the schema last moved — and the miss
|
|
76
|
+
itself is the finding: put the convention into the field's `description` (or an `examples:`) in
|
|
77
|
+
the same breath, so the next writer needs no peek. then:
|
|
65
78
|
|
|
66
79
|
- put the file where the id says: the id IS its path inside `storage.path`, minus suffix and
|
|
67
80
|
extension (folder-shape records are a folder named `<id>` holding the descriptor's `entry`).
|