eidosmd 0.2.0 → 0.3.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.
Files changed (47) hide show
  1. package/browser/dist/assets/index-Cc3cNWHY.css +1 -0
  2. package/browser/dist/assets/index-DQgCQRa5.js +46 -0
  3. package/browser/dist/index.html +2 -2
  4. package/dist/src/commands/check.js +9 -3
  5. package/dist/src/commands/configure.js +201 -0
  6. package/dist/src/commands/framework.js +15 -4
  7. package/dist/src/commands/init.js +4 -0
  8. package/dist/src/commands/property.js +125 -0
  9. package/dist/src/commands/setup.js +24 -12
  10. package/dist/src/commands/version.js +2 -2
  11. package/dist/src/core/canvas.js +59 -49
  12. package/dist/src/core/check.js +101 -26
  13. package/dist/src/core/edits.js +1381 -0
  14. package/dist/src/core/framework-markdown.js +9 -3
  15. package/dist/src/core/framework-model.js +43 -8
  16. package/dist/src/core/framework-structured.js +104 -28
  17. package/dist/src/core/frontmatter.js +61 -1
  18. package/dist/src/core/git.js +28 -3
  19. package/dist/src/core/links.js +87 -0
  20. package/dist/src/core/markdown.js +16 -9
  21. package/dist/src/core/migrate.js +91 -15
  22. package/dist/src/core/regions.js +117 -0
  23. package/dist/src/core/scaffold.js +15 -9
  24. package/dist/src/core/seed.js +56 -31
  25. package/dist/src/core/server.js +204 -31
  26. package/dist/src/core/settings.js +63 -12
  27. package/dist/src/core/store.js +73 -17
  28. package/dist/src/core/versions.js +10 -5
  29. package/dist/src/program.js +296 -11
  30. package/instructions/authoring.md +4 -2
  31. package/instructions/configuring.md +27 -11
  32. package/instructions/overview.md +6 -4
  33. package/instructions/validating.md +6 -4
  34. package/package.json +1 -1
  35. package/standard/EIDOS.md +135 -193
  36. package/standard/seeds/README.md +12 -16
  37. package/standard/seeds/book/Framework.yaml +30 -50
  38. package/standard/seeds/book/README.md +2 -1
  39. package/standard/seeds/book/_gitignore +7 -1
  40. package/standard/seeds/research/Framework.yaml +30 -50
  41. package/standard/seeds/research/README.md +2 -1
  42. package/standard/seeds/research/_gitignore +7 -1
  43. package/standard/seeds/software/Framework.yaml +31 -51
  44. package/standard/seeds/software/README.md +2 -1
  45. package/standard/seeds/software/_gitignore +7 -1
  46. package/browser/dist/assets/index-C2NMN_D4.css +0 -1
  47. package/browser/dist/assets/index-C65k1ihb.js +0 -46
@@ -1,8 +1,8 @@
1
1
  ## Configuring the framework
2
2
 
3
- The framework is the structure a root is written in: the framework document (version, naming, the top-level index, the collections, the Properties table, and the Vocabulary) plus `.eidos/templates/` (one file per variant) and `.eidos/roles/`. This CLI reads it; changing it is an edit to those files, made with the owner and verified with `eidos check`.
3
+ The framework is the structure a root is written in: the framework document (version, naming, the top-level index, the folders, the Properties table, and the Vocabulary) plus `.eidos/templates/` (one file per variant) and `.eidos/roles/`. This CLI reads it; changing it is an edit to those files, made with the owner and verified with `eidos check`.
4
4
 
5
- The document is `.eidos/Framework.yaml`: `top_level`, `collections[]` (each with `variants` and `grouping`), `properties.custom[]` (yours), `properties.tools.<tool>[]` (a tool's), and `vocabulary[]`, documented field by field in `eidos standard`. Never touch the `index` key: `eidos index` owns it. Never touch `.eidos/plugins/` (each folder is a tool's own) or a key on a Properties row past the standard's four (a tool's field, named for the tool); carry both across unchanged.
5
+ The document is `.eidos/Framework.yaml`: `top_level` (every file at the root), `folders[]` (every folder at the root, each with a `type`: a `collection` with its `variants` and `grouping`, an `assets` folder of files that are not markdown, or an `other` folder described and left alone), `properties.custom[]` (yours), `properties.tools.<tool>[]` (a tool's), and `vocabulary[]`, documented field by field in `eidos standard`. Everything at the root is declared: a folder under `folders`, a file under `top_level`, and `eidos check` names what is missing on either side. Never touch the `index` key: `eidos index` owns it. Never touch `.eidos/plugins/` (each folder is a tool's own; its `local.yaml` is one person's and never committed) or a key on a Properties row past the standard's six (a tool's field, named for the tool); carry both across unchanged.
6
6
 
7
7
  Press the owner to decide. A collection, variant, or property nobody thought through reads as meaningful while no one knows what it holds. If they offer only a name, ask for the rest.
8
8
 
@@ -14,10 +14,11 @@ Decide its **name** (the folder, in the naming convention `eidos framework` show
14
14
 
15
15
  1. Create the folder under the root.
16
16
  2. Create the default variant's template in `.eidos/templates/<unit>.<variant>.md`: body only, `# {{title}}` first, then the `##` sections in order, each with an italic guidance prompt. Pattern it on the templates already there.
17
- 3. Register it under `collections` in `Framework.yaml`: an entry with its name, description, variants (one default), and grouping, one variant per line so the next one is a copied line:
17
+ 3. Register it under `folders` in `Framework.yaml`: an entry with its name, `type: collection`, description, variants (one default), and grouping, one variant per line so the next one is a copied line:
18
18
 
19
19
  ```yaml
20
20
  - name: Decisions
21
+ type: collection
21
22
  description: Architecture decision records, one per significant choice.
22
23
  variants:
23
24
  - { name: full, template: templates/decision.full.md, description: "context, decision, consequences", default: true }
@@ -30,6 +31,19 @@ Decide its **name** (the folder, in the naming convention `eidos framework` show
30
31
  The `grouping` key is optional; its label is the collection's own, and each entry under `groups` is one group. A property carrying the group (`grouping.property`) is a Properties table change, below.
31
32
  4. Run `eidos index` so the new collection has its list, and `eidos check` to confirm the framework parses as intended.
32
33
 
34
+ `eidos configure:collection add <name> --unit <unit> [--description <text>] [--grouping <label>]` does all four in one plan.
35
+
36
+ ### Declaring a folder that is not a collection
37
+
38
+ A folder at the root that holds no blueprints is declared too, with a type: `assets` for files that are not markdown (the images, diagrams, and documents blueprints link to, each by a relative markdown link, as `![Login flow](../assets/login-flow.png)`), or `other` for whatever the owner's description says. Nothing inside either is read or checked, and the files keep the names their tools gave them. Decide the **name** (in the naming convention) and the one-line **description**, then run it:
39
+
40
+ ```bash
41
+ eidos configure:folder add assets --type assets --description "Images and diagrams the blueprints link to." --yes
42
+ eidos configure:folder show
43
+ ```
44
+
45
+ `configure:folder rename` moves the folder and rewrites every link into it; `set` changes the type or the description; `remove` removes the entry and, unless `--preserve`, the folder and every file in it, each listed before the question. A folder or file `eidos check` reports as undeclared (`folder-undeclared`, `file-undeclared`) is the owner's to declare or move; never delete one.
46
+
33
47
  ### Adding a variant
34
48
 
35
49
  Decide its **name** (lowercase), a one-line **description**, and its **template**. A second variant is a deliberate variant, a lighter one to grow out of or a genuine split in kind, never a fork per category label.
@@ -40,21 +54,23 @@ Decide its **name** (lowercase), a one-line **description**, and its **template*
40
54
 
41
55
  ### Adding a property
42
56
 
43
- Decide all four: **name** (lowercase, words joined by underscores), **type** (Text, List, Number, Checkbox, Date, or Date & time; anything richer belongs in the body), **applies to** (`all`, or a list of collections), and **meaning** (one line). Every property has an owner, and the owner is the block it sits in: yours go in `properties.custom`; a tool's go in `properties.tools.<tool>`, written by the tool. How blueprints relate to each other is better said in the body, as links in prose, than as a frontmatter list; a `connects_to` a root still carries is the framework's own custom property, kept or retired like any other.
57
+ Decide all five: **name** (lowercase, words joined by underscores), **type** (Text, List, Number, Checkbox, Date, or Date & time; anything richer belongs in the body), **applies to** (`all`, or a list of collections), **required** (`true` or `false`, absent meaning `false`: a required property is generated into every new blueprint it applies to and a missing one is a gap `eidos check` notes; an optional one is written when it has a value, left out otherwise, and never a gap; default to optional, and require only what the owner says every blueprint must answer), and **meaning** (one line). And the sixth, **options**, only when the value is one of a closed set the owner controls (a lifecycle, a tier): the list, non-empty, on a Text or List property, in the order the values run, so a lifecycle reads first stage to last and a dropdown or a board keeps that order. The comparison is exact, case included. A value off the list is surfaced by `eidos check` (`property-option`, with the list beside it), never refused. Without `options` any value is valid, so a label the owner wants open takes none; a `meaning` that lists values in prose is a set the entry should declare, and `meaning` then says what the property is for. No default rides with it: a required property with options is generated blank and the author picks. `variant` and a grouping property never carry it; their sets are the collection's declared variants and groups. Every property has an owner, and the owner is the block it sits in: yours go in `properties.custom`; a tool's go in `properties.tools.<tool>`, written by the tool. How blueprints relate to each other is better said in the body, as links in prose, than as a frontmatter list; a `connects_to` a root still carries is the framework's own custom property, kept or retired like any other.
44
58
 
45
- 1. Add an entry to `properties.custom`:
59
+ Run it, never hand-edit it:
46
60
 
47
- ```yaml
48
- - { name: team, type: Text, applies_to: all, meaning: "Owning team, for filtering." }
49
- ```
61
+ ```bash
62
+ eidos configure:property add team --type Text --applies-to all --required --meaning "Owning team, for filtering." --dry-run
63
+ eidos configure:property add team --type Text --applies-to all --required --meaning "Owning team, for filtering." --yes
64
+ eidos configure:property add tier --type Text --applies-to all --options Core,Extended,Experimental --meaning "How central the unit is to the product." --yes
65
+ ```
50
66
 
51
- 2. Backfill the blueprints it applies to with an empty or owner-supplied stub, so each is fillable; `eidos check` lists the ones still missing it as `property-missing`. New blueprints get it from `eidos new`.
67
+ The command appends the entry and, when required, backfills the key blank into every blueprint it applies to; an optional property backfills nothing. New blueprints get a required one from `eidos new`, and an optional one when `--set` gives it a value. Every `configure:` command prints its plan first: `--dry-run` shows it and stops, `--yes` proceeds, and without a terminal you need one or the other (the error names it).
52
68
 
53
69
  A tool's fields on the entry (this CLI's `eidosmd: { canvas: … }`, which styles a canvas node by the property's value) are not the standard's and not yours to fill in; keep whatever is there.
54
70
 
55
71
  ### Renaming or retiring a property
56
72
 
57
- Renaming: change the entry's `name`, then the key in every blueprint's frontmatter, carrying values across unchanged. Retiring: first show the owner every value that would be lost and ask whether to fold them somewhere or drop them; only then remove the entry and the keys. Never silently drop values.
73
+ Renaming is `eidos configure:property rename <name> <new>`: the entry, the key in every blueprint, a grouping that names it, and the CLI's settings, in one plan. Changing a value everywhere is `configure:property remap <name> old=new`, and a value the property's `options` declare follows the rename in the list. Declaring or changing a list is `configure:property set <name> --options A,B,C` (`--open` drops it): widening a list touches no blueprint; declaring one, or narrowing one, is retiring values, so the plan names every blueprint carrying a value off the new list and needs `--force`, and `check` reports each afterwards. Show the owner that list and settle where each value goes before narrowing. Retiring is `configure:property remove <name>`: the plan lists every value that would be gone before it asks, and without a terminal it needs `--force`; show the owner that list and ask whether anything should be folded into a body first. `--preserve` leaves the keys in the files, which `check` then reports as `property-unknown`. The same family edits a collection (`configure:collection add|rename|remove`, the folder, templates, `applies_to`, and links following), a folder that is not a collection (`configure:folder`), a group (`configure:group`), a variant (`configure:variant`), a term (`configure:term`), and a role (`configure:role`). Never make these moves by hand or with a script when the command exists; every one rewrites the index and runs `check` afterwards and reports anything it introduced.
58
74
 
59
75
  ### Declaring a term
60
76
 
@@ -89,7 +105,7 @@ Ask which commit (HEAD unless they name one) and whether to tag; create the tag
89
105
 
90
106
  ### Refreshing the top-level index
91
107
 
92
- `top_level` lists the root's one-of-a-kind documents, `README` first, one entry each: `{ title: Vision, path: ../Vision.md, description: one line }`, the path relative to `.eidos/`. Frames are a collection, not top-level. Keep the owner's existing descriptions; a doc with none gets an empty description, and you ask. `eidos check` reports an entry whose file does not exist.
108
+ `top_level` lists every file at the root, the one-of-a-kind documents, in the order they are read, one entry each: `{ title: Vision, path: ../Vision.md, description: one line }`, the path relative to `.eidos/`. The order is the owner's, the way a property's options are: the browser lists the docs in it and lands on the first, so an orientation doc (a README, when the root has one; every seed ships one and lists it first, and nothing requires it) goes first. Frames are a collection, not top-level. Keep the owner's existing descriptions; a doc with none gets an empty description, and you ask. `eidos check` reports an entry whose file does not exist (`top-level-missing`) and a file at the root no entry lists (`file-undeclared`); `eidos configure:doc add|rename|set|remove` edits the list.
93
109
 
94
110
  ### After
95
111
 
@@ -8,19 +8,21 @@ Eidos is human-first. The owner holds the intent, the scope, and the decisions;
8
8
 
9
9
  ### Start every request here
10
10
 
11
- 1. `eidos framework` reads the root's own framework: its collections, their variants and groups, the Properties table, and the Vocabulary (the root's own terms). Never assume a collection, variant, or section name; read what this framework declares. The document behind it is `.eidos/Framework.yaml`; a root still on the 4.x `Framework.md` is moved by `eidos migrate` first, and every command says so.
11
+ 1. `eidos framework` reads the root's own framework: its folders (each with a type: a collection with its variants and groups, an assets folder, an other folder), the Properties table, and the Vocabulary (the root's own terms). Never assume a collection, variant, or section name; read what this framework declares. The document behind it is `.eidos/Framework.yaml`; a root still on the 4.x `Framework.md` is moved by `eidos migrate` first, and every command says so.
12
12
  2. `eidos whoami` says who is in the seat. Open the role file it names under `.eidos/roles/` and respond as that contract says (vocabulary, depth, what to surface, who decides). A blank me.md means full, framework-owner-style facilitation.
13
13
  3. `eidos list` and `eidos show <id>` read what already exists. Read before writing.
14
14
  4. `eidos instructions <guide>` before authoring, validating, or changing the framework. The overview says when to act; the guides say how.
15
15
 
16
- Add `--json` to `framework`, `list`, `show`, and `check` when a script needs stable fields.
16
+ Add `--json` to `framework`, `list`, `show`, `check`, `property`, and every `configure:` command when a script needs stable fields. `eidos list` filters with `--group`, `--variant`, and `--where key=value` (any property, case-insensitive; a list matches any item).
17
17
 
18
18
  ### The CLI owns structure; the conversation owns the words
19
19
 
20
20
  - `eidos new <collection> "<Title>"` scaffolds a blueprint that is born conforming: frontmatter from the Properties table (every block: the core, the framework's, a tool's), body from the variant's template, filename in the naming convention, a permanent `id` inside. Never hand-assemble frontmatter.
21
21
  - `eidos check` validates the root against its own framework. Its findings are a review the owner acts on; surface them, do not block on them.
22
22
  - `eidos index` regenerates the indexes, the `index` key inside `Framework.yaml`. Never edit it by hand.
23
- - The prose inside a blueprint is written in the file, with the owner, by you. The CLI never writes a sentence of it.
23
+ - `eidos property set @<id> <property> <value>` sets one property on one blueprint (`get` reads it, `unset` removes it), typed by the Properties table, with the root's on-save rules applied. Never open a file to change a frontmatter value; a key the table does not declare for the collection is refused, which is the answer, not a reason to edit the file.
24
+ - `eidos configure:<noun> <operation>` changes the framework: `configure:property add|show|rename|set|remap|remove`, `configure:collection add|show|rename|remove`, `configure:folder add|show|rename|set|remove` (a folder at the root that is not a collection: `assets` or `other`), `configure:group add|rename|remove`, `configure:variant add|rename|set-default|remove`, `configure:term add|set|remove`, `configure:doc add|rename|set|remove`, `configure:role add|show|rename|remove`. Each prints its plan (every entry, key, file, and link it will touch, and every value that will be gone) and asks; run it first with `--dry-run` to show the owner the plan, then with `--yes` once they agree, and `--force` only where the plan says values or files go. Without a terminal a command refuses and names the switch. Never rename a property, move a group, or retire anything by editing files: the command reaches every blueprint and link and reruns the check, and a hand edit misses some.
25
+ - The rule behind all of it: anything mechanical is the CLI's. The prose inside a blueprint is written in the file, with the owner, by you. The CLI never writes a sentence of it.
24
26
  - `eidos browser` opens the root in a local web page for a person, landing on its canvas maps: the design tool where a sketch becomes a blueprint. A canvas is one YAML file, `.eidos/plugins/eidosmd/maps/<id>.yaml`, that an agent edits directly: `eidos canvas schema` prints its JSON Schema, `eidos canvas show <id>` prints one, `eidos canvas new` creates one, and the browser reflects the file as it changes (or take the same JSON API, `/api/canvas/`, while it runs). Everything the page can do runs the same code as a command (`new`, `check`, `index`), so it adds nothing you cannot do from the shell. Use the commands; leave the page to people.
25
27
 
26
28
  ### Speak the root's terms
@@ -35,7 +37,7 @@ The root's own versions are this CLI's, not the standard's: snapshots taken on p
35
37
 
36
38
  ### What is not yours
37
39
 
38
- `.eidos/plugins/<name>/` is a tool's own folder (this CLI keeps its canvas maps under `plugins/eidosmd/`). Leave every folder there alone unless you are the tool that owns it; a folder you don't recognize is not a problem to report. On a Properties row, a key past the standard's four (`name`, `type`, `applies_to`, `meaning`) is a tool's, named for the tool; carry it across an edit unchanged and never fill it in. A whole block a tool declared, `properties.tools.<tool>`, is that tool's alone.
40
+ `.eidos/plugins/<name>/` is a tool's own folder (this CLI keeps its canvas maps under `plugins/eidosmd/`); the one file in it named `local.yaml` is one person's on one machine, never committed, kept out by the `plugins/*/local.yaml` line in `.eidos/.gitignore`. Leave every folder there alone unless you are the tool that owns it; a folder you don't recognize is not a problem to report. At the root, a folder declared as `assets` or `other` is the owner's too: nothing inside it is read, checked, or held to the naming convention, and a blueprint links into it with a relative markdown link like any other. On a Properties row, a key past the standard's six (`name`, `type`, `applies_to`, `required`, `options`, `meaning`) is a tool's, named for the tool; carry it across an edit unchanged and never fill it in. A whole block a tool declared, `properties.tools.<tool>`, is that tool's alone. Inside a markdown file, a span between `<!-- <tool>:<region> <args> -->` and `<!-- /<tool>:<region> -->` is a region that tool owns, the same name as its plugin folder: read it if it helps, write in it only if you are that tool, carry it across as found when you edit around it, and never fault its contents.
39
41
 
40
42
  ### Guides
41
43
 
@@ -6,15 +6,15 @@ Validation is framework-defined. `eidos check` reads the root's own `.eidos/Fram
6
6
  eidos check # the whole root: framework, layout, every blueprint
7
7
  eidos check <path> [<path>...] # only these blueprints
8
8
  eidos check --json # stable fields for a script
9
- eidos check --strict # warnings fail too (CI)
9
+ eidos check --strict # this run only: warnings fail too; the root's own setting is check.strict in settings.yaml
10
10
  ```
11
11
 
12
- Exit code 0 means no errors; 1 means at least one error (or, with `--strict`, any warning); 2 means the command could not run.
12
+ Exit code 0 means no errors; 1 means at least one error, or any warning when the root is strict; 2 means the command could not run. Strictness is the framework owner's decision for the root, `check.strict` in `.eidos/plugins/eidosmd/settings.yaml` (set by `eidos init` or `eidos setup --strict on|off`), so read it from `--json`'s `strict` rather than assuming; `--strict` and `--no-strict` change one run only.
13
13
 
14
14
  ### What the levels mean
15
15
 
16
- - An **error** is wrong on any reading: frontmatter that does not parse, a missing `id` or `title`, an `id` used twice (its form is free: a slug, a number, a GUID), a `variant` the collection does not declare, a link to a file that does not exist, a template file the framework points at but does not have.
17
- - A **warning** is a gap the standard says to note and offer, never refuse: a missing or empty property the Properties table applies to this collection (every block of it: the core, yours, a tool's), a property no block declares, a work-tracking field, a body section the variant's template declares but the blueprint lacks, a section the template does not know, sections out of the template's order, a grouping value that does not match its folder, a declared frame nobody has written, a stale index, a version gap, a near-miss the Vocabulary names (`term-near-miss`, with the declared term beside it).
16
+ - An **error** is wrong on any reading: frontmatter that does not parse, a missing `id` or `title`, an `id` used twice (its form is free: a slug, a number, a GUID), a `variant` the collection does not declare, a link to a file that does not exist, a template file the framework points at but does not have, a region opener with no closer (`region-unclosed`, whichever tool it names).
17
+ - A **warning** is a gap the standard says to note and offer, never refuse: a required property the Properties table applies to this collection but the blueprint lacks or leaves empty (every block of it: the core, yours, a tool's; an optional property absent is nothing, and present it is checked only by type), a property no block declares, a value off a property's declared `options` (`property-option`, exact match, the list beside it), a work-tracking field, a body section the variant's template declares but the blueprint lacks, a section the template does not know, sections out of the template's order, a grouping value that does not match its folder, a declared frame nobody has written, a stale index, a version gap, a near-miss the Vocabulary names (`term-near-miss`, with the declared term beside it), and, at the root, anything the framework document does not declare: a folder no entry under `folders` declares (`folder-undeclared`), a file `top_level` does not list (`file-undeclared`), a declared folder or document with nothing behind it (`folder-missing`, `collection-folder-missing`, `top-level-missing`), a sub-folder of a collection that is not a declared group (`group-undeclared`), and a folder inside a group (`folder-nested`; a group holds blueprints and nothing deeper). Nothing inside an `assets` or `other` folder is read, and a file that is not markdown inside a collection is not a blueprint.
18
18
 
19
19
  ### Reporting a review
20
20
 
@@ -26,6 +26,8 @@ The output is a review the owner acts on. When you report:
26
26
  - Confirm no work-tracking fields crept in, and that any section describing approach reads as intent, not progress.
27
27
  - A version gap is worth one line and an offer to migrate, once per session; then carry on with the framework as it stands.
28
28
  - A `term-near-miss` is a suggestion: name the declared term, ask, and leave the word to the owner. Never swap it in.
29
+ - A `property-option` is the same footing: show the value and the list, ask which option it is, and set it with `eidos property set`; never swap a value in silently. A value that belongs on no option is the owner's case for widening the list (`configure:property set --options`).
30
+ - A `folder-undeclared` or `file-undeclared` is the owner's decision: declare it (`configure:folder add`, `configure:collection add`, `configure:doc add`) or move it. Never delete a file or folder, and never invent a description for one.
29
31
 
30
32
  Do not fix silently. Show the finding, propose the change, and let the owner decide, unless the change is purely mechanical and they have asked for it (regenerating an index, adding a blank property stub).
31
33
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eidosmd",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "The Eidos CLI: scaffold, validate, index, and browse a root of Eidos blueprints, and hand any agent the workflow it needs to work in one.",
5
5
  "keywords": [
6
6
  "eidos",