@eriknaslund/skiss 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 erik-naslund
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,88 @@
1
+ # Skiss
2
+
3
+ Sketch a data model as fast as someone can describe it. Compile it to [LinkML](https://linkml.io) when it becomes real.
4
+
5
+ *Skiss* is Swedish for sketch.
6
+
7
+ ```
8
+ Character @Catalog # a person or droid in the archive
9
+ id*
10
+ name
11
+ homeworld: Planet
12
+ films: Film[]
13
+ popularityRank: int @Community
14
+
15
+ Planet @Catalog
16
+ id*
17
+ name
18
+ climate: arid|temperate|frozen|unknown
19
+
20
+ CharacterPage @Community ~ Character # the community wiki's version
21
+ slug*
22
+ characterId = Character.id
23
+ summary # free text, written by editors
24
+ ```
25
+
26
+ That is the whole language. Classes at column 0, fields indented under them, a handful of punctuation marks.
27
+
28
+ ## Why
29
+
30
+ You sit down with someone who knows the domain. Within the hour you want a shared picture of it: what the things are, what they are called, which system owns them, how they hang together.
31
+
32
+ The whiteboard is the best tool we have for that hour, and it is still not good enough. Redrawing an arrow is slow when the other person is mid-sentence. Half of what gets said never reaches the board. And when the hour is over, the picture stays on the wall, or in a photo nobody opens again.
33
+
34
+ The tools that outlive the hour are worse at the hour itself. A schema language (LinkML, JSON Schema, SQL) wants answers you do not have yet: required or optional, which pattern, what base URI. A diagram tool wants you to drag boxes. Both make you stop talking to operate the tool.
35
+
36
+ Skiss is text you can type while someone talks. A field is one line. A change is one edit. A diagram renders live from the text, so the picture on the screen is always the current picture, and when the hour is over you have a file, not a photo. When the model is real, it compiles to LinkML and you carry on there.
37
+
38
+ ## The rules that make it fast
39
+
40
+ - **A colon means "the type matters here".** No colon means no type yet; it compiles to `string` and you fix it later. This is what lets you write a field without stopping to think.
41
+ - **What you leave out means "not yet".** Never "unknown", never "none". A sketch is silent about what you do not know.
42
+ - **`@Catalog` says which system owns a thing.** On a class, or on a single field when the box is really a view over two systems.
43
+ - **`~` and `=` are two different statements.** `~` says two classes are about the same thing. `=` says which field joins to which. The first is a domain conversation, the second an integration conversation.
44
+ - **`#` describes, `?` doubts.** A description ends up in generated documentation. A doubt never does.
45
+ - **Every line stands on its own.** A half-typed line breaks that line and nothing else, so the diagram keeps rendering while you type.
46
+ - **Everything you can write compiles to valid LinkML.** Skiss is a strict subset. Nothing is lost on the way up.
47
+
48
+ ## What it is not
49
+
50
+ - Not a schema language. No required/optional, no cardinality beyond `[]`, no constraints. LinkML has all of that, and that is where you go when you need it.
51
+ - Not an integration diagram. It says where things live, not how they sync.
52
+ - Not a layout format. Positions belong to whatever draws the picture, never to the text.
53
+
54
+ ## Using it
55
+
56
+ ```
57
+ npm install -g @eriknaslund/skiss
58
+ skiss diagram model.skiss
59
+ ```
60
+
61
+ Or without installing: `npx @eriknaslund/skiss diagram model.skiss`.
62
+
63
+ `skiss diagram` writes a Mermaid class diagram to standard output; `-o diagram.mmd` writes it to a file, `--notes` includes the `?` doubts as notes, and `-` reads standard input. Anything the file gets wrong is reported on standard error, one line each, and the diagram is still drawn from the lines that parse. `--strict` makes that a non-zero exit. `skiss --help` lists the rest.
64
+
65
+ `skiss compile model.skiss` writes a LinkML schema instead, as YAML on standard output. `--json` writes the same schema as JSON, `--name` sets the schema name (it defaults to the file name without its extension, and to `sketch` when reading standard input), and `-o`, `-`, `--strict` and the diagnostics work exactly as they do for `diagram`.
66
+
67
+ `npm install @eriknaslund/skiss` also gives you the library: `compile`, `formatDiagnostic`, `parse`, `resolve`, `toLinkML`, `serialize`, `toMermaid` and `VERSION`, browser-safe.
68
+
69
+ Editors that render Skiss live are separate projects built on this package. This repository is the language, the library and the command line.
70
+
71
+ ## Where to look
72
+
73
+ | | |
74
+ |---|---|
75
+ | [docs/SPEC.md](docs/SPEC.md) | The language, its grammar, and the LinkML mapping. Start here. |
76
+ | [docs/DESIGN.md](docs/DESIGN.md) | Why the rules are what they are. |
77
+ | [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) | How the code is organised. |
78
+ | [docs/adr/](docs/adr/) | Architecture decision records. |
79
+ | [docs/ROADMAP.md](docs/ROADMAP.md) | What comes next. |
80
+ | [AGENTS.md](AGENTS.md) | How this repository is built. |
81
+
82
+ ## Status
83
+
84
+ Pre-release. The [specification](docs/SPEC.md) is at 0.1. Nothing is implemented yet.
85
+
86
+ ## License
87
+
88
+ [MIT](LICENSE).
package/dist/cli.d.ts ADDED
@@ -0,0 +1,2 @@
1
+
2
+ export { }