dreamteamer 0.13.4 → 0.15.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.
@@ -40,9 +40,17 @@ schema:
40
40
  description: Folder holding the records, workspace-relative. `data/` for content, `state/` for operational records, `system/` for sources.
41
41
  codec:
42
42
  type: string
43
- enum: [md, yaml, json]
43
+ enum: [md, yaml, json, file]
44
44
  default: md
45
- description: File format. Use `md` whenever the record has a body a human will read.
45
+ description: 'File format. Use `md` whenever the record has a body a human will read. `file` makes the record an OPAQUE file — any extension, no frontmatter, fields DERIVED (`ext`, `bytes`), written with `add --from <path>` and never with `set`. For icons, logos and images.'
46
+ max_bytes:
47
+ type: integer
48
+ default: 204800
49
+ description: '`codec: file` only — the largest a record may be, in bytes. `check` reports anything over it. A record is a small file; a big one belongs outside the vault.'
50
+ extensions:
51
+ type: array
52
+ items: { type: string }
53
+ description: '`codec: file` only — the extensions this collection accepts, lowercase and without the dot. Omitted means any.'
46
54
  shape:
47
55
  type: string
48
56
  enum: [file, folder]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dreamteamer",
3
- "version": "0.13.4",
3
+ "version": "0.15.0",
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: building-dreamteamer
3
- description: use when authoring or changing anything in a module's source folders (collections/, skills/, agents/, commands/, command-bindings/, ui-views/, collection-templates/) — a collection or a field, a skill, a command, an agent, a ui-view, or studio component code. Also when deciding WHICH of those a request should become, or when a compile/check error names a source file.
3
+ description: use when authoring or changing anything in a module's source folders (collections/, skills/, agents/, commands/, command-bindings/, ui-views/, collection-templates/) — a collection or a field, a skill, a command, an agent, a ui-view, or studio component code. Also when deciding WHICH of those a request should become, or when a compile/check error names a source file. Also when a request names a new kind of thing to keep.
4
4
  ---
5
5
 
6
6
  # building dreamteamer
@@ -19,7 +19,7 @@ actually wants to happen:
19
19
 
20
20
  | the ask | write | reference |
21
21
  |---|---|---|
22
- | "the workspace has no home for this kind of thing" / a field is missing | a **collection** | `references/collections.md` |
22
+ | "I want to track / manage / keep X" — a new kind of thing, or a model that no longer fits | a **model proposal first**, then the entities it names — `data-modeling.md` decides, `collections.md` writes | `references/data-modeling.md` |
23
23
  | "when you're already doing X, know this" — knowledge a session should find itself | a **skill** | `references/skills.md` |
24
24
  | "let me type one word and have you do this" | a **command** | `references/commands.md` |
25
25
  | "do this with a fresh context and its own tools" | an **agent** | `references/agents.md` |
@@ -81,23 +81,30 @@ templates: [collection-templates/provenance] # merged at compile, every time
81
81
 
82
82
  ## judgment the descriptor can't tell you
83
83
 
84
- - **`id.generate` takes creation-time values only** `{{ created | date }}--{{ name | slug }}`,
85
- never a mutable field (`due`, `status`, and note `created` itself is the moment the record is
86
- WRITTEN, so a back-dated import files under the import month; derive from the domain's own date
87
- field instead). `id.pattern` must accept everything the template can produce — non-latin titles
88
- slug to a deterministic short hash, so `[a-z0-9-]` still holds.
89
- - **The `x-` keywords carry the domain semantics.** `x-reference` (a target collection, or `"*"` for
90
- any) is what lets `check` and `rename` follow a field. `x-body` marks the single field that becomes
91
- the md body. `x-inverse` declares a two-way link and makes `check` enforce both directions.
92
- `x-title-template` overrides how a VALUE of that field is labelled rarely needed, because a
93
- reference already inherits its TARGET collection's `title_template`; author it there instead, once,
94
- rather than on every field pointing at it.
95
- - **Do not enum a field after the fact.** Enumerating a vocabulary the records already violate makes
96
- `check` fail on every pre-existing value. `dt values <collection> <field>` derives the real
97
- vocabulary from the data a filter dropdown gets it for free without locking the set.
98
- - **`icon` / `group`** are the studio nav's material-symbol icon and folder; ungrouped collections
99
- list at the top. `list_fields` is the SEED a module ships, not a competing source of truth — a
100
- ui-view's `columns` REPLACES it.
84
+ Modeling judgment the grain, enums vs vocabularies, relations, forcing fields lives in
85
+ `references/data-modeling.md`. What is left here is mechanics.
86
+
87
+ - **`id.pattern` must accept everything `id.generate` can produce** — non-latin titles slug to a
88
+ deterministic short hash, so `[a-z0-9-]` still holds; a `YYYY/MM/`-prefixed id needs `/` in it.
89
+ - **The `x-` keywords carry the domain semantics.** `x-reference` (a target collection, a LIST of
90
+ them for a union, or `"*"` for any) is what lets `check` and `rename` follow a field. On input, a
91
+ single-target field also accepts a bare id (`standup`, not `meetings/standup`) it is qualified
92
+ before disk, so the file always carries the fully-qualified form; a union or `"*"` field has no
93
+ single target to infer from, so it still requires the qualified spelling. `x-body` marks the
94
+ single field that becomes the md body. `x-inverse` declares a two-way link FROM the owning side:
95
+ compile GENERATES a `readOnly` mirror field on the target, the store maintains its values in the
96
+ same write as every change to the owner, and `check` reports one fallen behind as stale
97
+ (`dreamteamer relations rebuild <target>` repairs it, and `dt relations` lists every pair).
98
+ Declare it from the other side instead with `x-inverse-of: <owner-collection>.<field>` on a field
99
+ you author there either spelling, identical compiled result. `x-unique: true` makes it
100
+ one-to-one, so the mirror is a scalar; `x-on-delete: restrict` (the default) or `set-null` says
101
+ what deleting the target does to the records pointing at it. `x-title-template` overrides how a
102
+ VALUE of that field is labelled — rarely needed, because a reference already inherits its TARGET
103
+ collection's `title_template`; author it there instead, once, rather than on every field pointing
104
+ at it (a union field inherits a template only when every member's target collection agrees on one).
105
+ - **`icon` and `order`** are the studio nav's material-symbol icon and its sort position; the nav
106
+ GROUPS by the owning module, not by the deprecated `group`. `list_fields` is the SEED a module
107
+ ships, not a competing source of truth — a ui-view's `columns` REPLACES it.
101
108
 
102
109
  ## extending another module's collection
103
110
 
@@ -122,10 +129,9 @@ module rather than just for this workspace, fix the base.
122
129
 
123
130
  1. Sample the files: derive `suffix`/`codec` from the filenames (`<id>.<suffix>.<ext>`) and the id
124
131
  `pattern` from the id shapes actually present.
125
- 2. Collect frontmatter keys across files → `properties`; infer types from values. A string field
126
- with ≤10 distinct values, repeats and ≥80% fill is probably an `enum` but see the warning
127
- above. Values shaped `<collection>/<id>` are `x-reference` fields. No frontmatter at all →
128
- `required: []` with a comment saying why.
132
+ 2. Collect frontmatter keys across files → `properties`; infer types from values. Values shaped
133
+ `<collection>/<id>` are `x-reference` fields. No frontmatter at all `required: []` with a
134
+ comment saying why.
129
135
  3. **Never edit the records to fit an inferred schema.** Describe reality, compile, run `check`,
130
136
  then decide which violations are worth fixing in the data.
131
137
 
@@ -141,10 +147,7 @@ ledger.
141
147
 
142
148
  | mistake | reality |
143
149
  |---|---|
144
- | a mutable field in `id.generate` (`due`, `status`) | ids must never change |
145
- | `id.generate` from `created` for imported records | `created` is when the record was written, not when the thing happened |
146
150
  | tightening `required` before cleaning the data | check floods; widen, rewrite the data, then narrow |
147
151
  | a second same-name descriptor without `extends` | compile error by design |
148
152
  | a plain string where a ref belongs | use `x-reference` so `check` and `rename` can follow it |
149
153
  | a `templates:` ref pointing at another module | that module can no longer be copied or installed alone |
150
- | inventing a collection for a one-off extraction | a collection is for things that recur; prefer the nearest real one |