@turri-dev/cli 0.1.4-next.5a94e68 → 0.1.4-next.8254fbc

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 (82) hide show
  1. package/.pi/themes/turri-dark.json +67 -66
  2. package/.pi/themes/turri-light.json +71 -73
  3. package/README.md +40 -128
  4. package/assets/jellyfish/dark-00.png +0 -0
  5. package/assets/jellyfish/dark-01.png +0 -0
  6. package/assets/jellyfish/dark-02.png +0 -0
  7. package/assets/jellyfish/dark-03.png +0 -0
  8. package/assets/jellyfish/dark-04.png +0 -0
  9. package/assets/jellyfish/dark-05.png +0 -0
  10. package/assets/jellyfish/dark-06.png +0 -0
  11. package/assets/jellyfish/dark-07.png +0 -0
  12. package/assets/jellyfish/dark-08.png +0 -0
  13. package/assets/jellyfish/dark-09.png +0 -0
  14. package/assets/jellyfish/dark-10.png +0 -0
  15. package/assets/jellyfish/dark-11.png +0 -0
  16. package/assets/jellyfish/dark-12.png +0 -0
  17. package/assets/jellyfish/dark-13.png +0 -0
  18. package/assets/jellyfish/dark-14.png +0 -0
  19. package/assets/jellyfish/light-00.png +0 -0
  20. package/assets/jellyfish/light-01.png +0 -0
  21. package/assets/jellyfish/light-02.png +0 -0
  22. package/assets/jellyfish/light-03.png +0 -0
  23. package/assets/jellyfish/light-04.png +0 -0
  24. package/assets/jellyfish/light-05.png +0 -0
  25. package/assets/jellyfish/light-06.png +0 -0
  26. package/assets/jellyfish/light-07.png +0 -0
  27. package/assets/jellyfish/light-08.png +0 -0
  28. package/assets/jellyfish/light-09.png +0 -0
  29. package/assets/jellyfish/light-10.png +0 -0
  30. package/assets/jellyfish/light-11.png +0 -0
  31. package/assets/jellyfish/light-12.png +0 -0
  32. package/assets/jellyfish/light-13.png +0 -0
  33. package/assets/jellyfish/light-14.png +0 -0
  34. package/dist/brand.js +7 -7
  35. package/dist/cultivate-cli.js +16 -23
  36. package/dist/extension.js +15 -21
  37. package/dist/loop-cli.js +8 -8
  38. package/dist/module-report.js +5 -4
  39. package/dist/regenerate/plain-palette.js +51 -36
  40. package/dist/regenerate/side-panel.js +1 -1
  41. package/dist/regenerate/spec-map-view.js +9 -5
  42. package/dist/release-cli.js +3 -8
  43. package/dist/validate-cli.js +3 -8
  44. package/docs/README.md +5 -12
  45. package/docs/authoring-plain.md +37 -119
  46. package/docs/config.md +50 -176
  47. package/docs/deploy.md +21 -80
  48. package/docs/development.md +13 -41
  49. package/docs/headless.md +30 -136
  50. package/docs/images/how-turri-works.svg +29 -31
  51. package/docs/images/turri-banner.png +0 -0
  52. package/docs/installation.md +13 -40
  53. package/docs/parser.md +15 -43
  54. package/docs/regenerating.md +231 -964
  55. package/docs/sandbox.md +38 -152
  56. package/docs/skills-and-gates.md +50 -173
  57. package/docs/theming.md +45 -46
  58. package/docs/using.md +66 -356
  59. package/genome/rules/bullet-continuation.md +5 -13
  60. package/genome/rules/concise-specs-examples.md +2 -4
  61. package/genome/rules/concise-specs-integration-examples.md +2 -6
  62. package/genome/rules/concise-specs.md +1 -2
  63. package/genome/rules/func-specs.md +1 -0
  64. package/genome/rules/integration-embedded-testing.md +1 -4
  65. package/genome/rules/integrations.md +1 -2
  66. package/genome/rules/project-model.md +14 -35
  67. package/genome/rules/stdlib.md +14 -49
  68. package/genome/rules/turri-regeneration.md +48 -0
  69. package/genome/skills/add-implementation-requirement/SKILL.md +1 -2
  70. package/genome/skills/analyze-if-func-spec-too-complex/SKILL.md +3 -8
  71. package/genome/skills/brood/SKILL.md +37 -127
  72. package/genome/skills/brood/references/intent.md +4 -12
  73. package/genome/skills/brood/references/product.md +24 -76
  74. package/genome/skills/brood/references/stack.md +7 -29
  75. package/genome/skills/brood/references/testing.md +11 -42
  76. package/genome/skills/bud/SKILL.md +32 -109
  77. package/genome/skills/bud/references/intent.md +4 -11
  78. package/genome/skills/implement-conformance-testing-script/SKILL.md +3 -6
  79. package/genome/skills/implement-unit-testing-script/SKILL.md +1 -2
  80. package/genome/skills/mature/SKILL.md +21 -69
  81. package/genome/skills/spawn/SKILL.md +28 -113
  82. package/package.json +1 -1
package/docs/parser.md CHANGED
@@ -1,7 +1,6 @@
1
1
  # The \*\*\*plain parser
2
2
 
3
- `src/plain/` is a TypeScript port of the reference \*\*\*plain parser - `plain_file.py`,
4
- `plain_spec.py`, `concept_utils.py`, and the `file_utils.py` helpers they depend on.
3
+ `src/plain/` is a TypeScript port of the reference \*\*\*plain parser - `plain_file.py`, `plain_spec.py`, `concept_utils.py`, and the `file_utils.py` helpers they depend on.
5
4
 
6
5
  | module | ports |
7
6
  |---|---|
@@ -21,9 +20,7 @@ turri validate . # every .plain file in a directory
21
20
  turri validate <file.plain> --json
22
21
  ```
23
22
 
24
- It uses this repo's own parser, so it needs no external tool, no API key and no credits: it parses
25
- the file, resolves its imports and required modules, and reports every syntax, concept and
26
- structure error with the line it is on.
23
+ It uses this repo's own parser, so it needs no external tool, no API key and no credits: it parses the file, resolves its imports and required modules, and reports every syntax, concept and structure error with the line it is on.
27
24
 
28
25
  ```
29
26
  PASS d365_export.plain 6 functionalities (1, 2, 3, 4, 5, 6), requires d365_restore_api
@@ -37,14 +34,12 @@ The exit code is 0 only when every file passed. In a conversation the same check
37
34
 
38
35
  ## Two rules of inheritance
39
36
 
40
- - A module that **`requires`** another inherits its functional specs, transitively: it is built on
41
- top of that module's code.
37
+ - A module that **`requires`** another inherits its functional specs, transitively: it is built on top of that module's code.
42
38
  - A module that **`import`s** another inherits its definitions, implementation reqs and test reqs.
43
39
 
44
40
  ## The functional-spec iterator
45
41
 
46
- `getFrids` walks functionalities depth-first through nested sections; `getSpecificationsForFrid`
47
- builds what a single functionality is rendered with. `iterateFunctionalSpecs` pairs them:
42
+ `getFrids` walks functionalities depth-first through nested sections; `getSpecificationsForFrid` builds what a single functionality is rendered with. `iterateFunctionalSpecs` pairs them:
48
43
 
49
44
  ```ts
50
45
  import { plainFileParser, iterateFunctionalSpecs } from "./src/plain/index.ts";
@@ -60,49 +55,26 @@ for (const { frid, specifications, codeVariables } of iterateFunctionalSpecs(tre
60
55
 
61
56
  ## Parsing once
62
57
 
63
- A module's parse reads its imports and the whole of its `requires` chain, so a long chain asks for the same
64
- files over and over: bringing an 18-module chain up to its spec parsed for minutes. Two caches keep it to once.
65
- Inside `withParseCache`, one question about the specs, each file is parsed once. Between calls, a parse is kept
66
- with a fingerprint of every file directly in its template folders and the current one - name, size,
67
- modification time, and a `.plain` file's text - and handed out again, as a copy, while the fingerprint is the
68
- same; a spec that does not parse is kept as that too. What a parse returns is unchanged: the cache only decides
69
- whether to parse again.
58
+ A module's parse reads its imports and the whole of its `requires` chain, so a long chain asks for the same files over and over: bringing an 18-module chain up to its spec parsed for minutes. Two caches keep it to once. Inside `withParseCache`, one question about the specs, each file is parsed once. Between calls, a parse is kept with a fingerprint of every file directly in its template folders and the current one - name, size, modification time, and a `.plain` file's text - and handed out again, as a copy, while the fingerprint is the same; a spec that does not parse is kept as that too. What a parse returns is unchanged: the cache only decides whether to parse again.
70
59
 
71
60
  ## Fidelity
72
61
 
73
- The port is checked against the Python implementation directly, not only against the ported
74
- assertions. Both parsers are run over a corpus and their module name, marshalled tree, required
75
- modules, functionality ids and per-functionality specifications compared:
62
+ The port is checked against the Python implementation directly, not only against the ported assertions. Both parsers are run over a corpus and their module name, marshalled tree, required modules, functionality ids and per-functionality specifications compared:
76
63
 
77
64
  | corpus | files | identical | differences |
78
65
  |---|---|---|---|
79
66
  | `tests/data/` fixtures | 84 | 80 | 4 error strings (below) |
80
67
  | `hycu-dynamics-365-modules` | 47 | 47 | none |
81
68
 
82
- The 4 differences are all the same thing: template partials (`implement.plain`,
83
- `implement_2.plain`, `header.plain`, `pr_implement.plain`) are meant to be included with
84
- arguments, not parsed alone. Both implementations reject them for the same reason - an undefined
85
- Liquid variable - but the message text comes from the template engine, and liquidjs phrases it
86
- differently from liquid2.
87
-
88
- Real specs exposed three places where mdast and mistletoe disagree, each covered by
89
- `tests/plain/renderer.test.ts`:
90
-
91
- - **Inline decoding.** mdast resolves `\"` to `"` and forgets whether emphasis was written with `_`
92
- or `*`; mistletoe round-trips the source. Inline leaf nodes are pinned back to their original
93
- source slice at parse time.
94
- - **List geometry.** mistletoe indents an item's continuation lines by its `prepend`, measured in
95
- coordinates with the enclosing item's indentation stripped - not by the column gap between parent
96
- and child. An acceptance test rendered detached from its functionality keeps 6 and 10 spaces where
97
- the naive reading gives 4 and 8.
98
- - **Lazy continuation lines.** A paragraph's continuation lines carry leading whitespace that is not
99
- part of the text; keeping it in the raw slice indents the line twice.
69
+ The 4 differences are all the same thing: template partials (`implement.plain`, `implement_2.plain`, `header.plain`, `pr_implement.plain`) are meant to be included with arguments, not parsed alone. Both implementations reject them for the same reason - an undefined Liquid variable - but the message text comes from the template engine, and liquidjs phrases it differently from liquid2.
70
+
71
+ Real specs exposed three places where mdast and mistletoe disagree, each covered by `tests/plain/renderer.test.ts`:
72
+
73
+ - **Inline decoding.** mdast resolves `\"` to `"` and forgets whether emphasis was written with `_` or `*`; mistletoe round-trips the source. Inline leaf nodes are pinned back to their original source slice at parse time.
74
+ - **List geometry.** mistletoe indents an item's continuation lines by its `prepend`, measured in coordinates with the enclosing item's indentation stripped - not by the column gap between parent and child. An acceptance test rendered detached from its functionality keeps 6 and 10 spaces where the naive reading gives 4 and 8.
75
+ - **Lazy continuation lines.** A paragraph's continuation lines carry leading whitespace that is not part of the text; keeping it in the raw slice indents the line twice.
100
76
 
101
77
  Two deliberate differences from the Python source:
102
78
 
103
- - The `test_plainfile.py` tests drive the acceptance-test helpers with `MagicMock` tokens and patch
104
- the inner helper to count calls. ESM has no equivalent, so those tests build real ASTs from
105
- markdown and assert the same observable outcome.
106
- - `networkx`'s `topological_sort` is reimplemented rather than replaced with a generic one: it
107
- flattens `topological_generations`, so the ordering of independent concepts follows graph
108
- insertion order, and the Python tests assert that exact sequence.
79
+ - The `test_plainfile.py` tests drive the acceptance-test helpers with `MagicMock` tokens and patch the inner helper to count calls. ESM has no equivalent, so those tests build real ASTs from markdown and assert the same observable outcome.
80
+ - `networkx`'s `topological_sort` is reimplemented rather than replaced with a generic one: it flattens `topological_generations`, so the ordering of independent concepts follows graph insertion order, and the Python tests assert that exact sequence.