dreamteamer 0.14.0 → 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dreamteamer",
3
- "version": "0.14.0",
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,27 +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.
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
89
  - **The `x-` keywords carry the domain semantics.** `x-reference` (a target collection, a LIST of
90
90
  them for a union, or `"*"` for any) is what lets `check` and `rename` follow a field. On input, a
91
91
  single-target field also accepts a bare id (`standup`, not `meetings/standup`) — it is qualified
92
92
  before disk, so the file always carries the fully-qualified form; a union or `"*"` field has no
93
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 and makes `check`
95
- enforce both directions. `x-title-template` overrides how a VALUE of that field is labelled
96
- rarely needed, because a reference already inherits its TARGET collection's `title_template`;
97
- author it there instead, once, rather than on every field pointing at it (a union field inherits a
98
- template only when every member's target collection agrees on one).
99
- - **Do not enum a field after the fact.** Enumerating a vocabulary the records already violate makes
100
- `check` fail on every pre-existing value. `dt values <collection> <field>` derives the real
101
- vocabulary from the data a filter dropdown gets it for free without locking the set.
102
- - **`icon` / `group`** are the studio nav's material-symbol icon and folder; ungrouped collections
103
- list at the top. `list_fields` is the SEED a module ships, not a competing source of truth — a
104
- ui-view's `columns` REPLACES it.
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.
105
108
 
106
109
  ## extending another module's collection
107
110
 
@@ -126,10 +129,9 @@ module rather than just for this workspace, fix the base.
126
129
 
127
130
  1. Sample the files: derive `suffix`/`codec` from the filenames (`<id>.<suffix>.<ext>`) and the id
128
131
  `pattern` from the id shapes actually present.
129
- 2. Collect frontmatter keys across files → `properties`; infer types from values. A string field
130
- with ≤10 distinct values, repeats and ≥80% fill is probably an `enum` but see the warning
131
- above. Values shaped `<collection>/<id>` are `x-reference` fields. No frontmatter at all →
132
- `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.
133
135
  3. **Never edit the records to fit an inferred schema.** Describe reality, compile, run `check`,
134
136
  then decide which violations are worth fixing in the data.
135
137
 
@@ -145,10 +147,7 @@ ledger.
145
147
 
146
148
  | mistake | reality |
147
149
  |---|---|
148
- | a mutable field in `id.generate` (`due`, `status`) | ids must never change |
149
- | `id.generate` from `created` for imported records | `created` is when the record was written, not when the thing happened |
150
150
  | tightening `required` before cleaning the data | check floods; widen, rewrite the data, then narrow |
151
151
  | a second same-name descriptor without `extends` | compile error by design |
152
152
  | a plain string where a ref belongs | use `x-reference` so `check` and `rename` can follow it |
153
153
  | a `templates:` ref pointing at another module | that module can no longer be copied or installed alone |
154
- | inventing a collection for a one-off extraction | a collection is for things that recur; prefer the nearest real one |