@sentropic/focus 0.6.0 → 0.6.1-rc.10

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 (65) hide show
  1. package/README.md +2 -0
  2. package/dist/artifact/check.d.ts +54 -0
  3. package/dist/artifact/check.d.ts.map +1 -0
  4. package/dist/artifact/check.js +148 -0
  5. package/dist/artifact/check.js.map +1 -0
  6. package/dist/artifact/index.d.ts +5 -0
  7. package/dist/artifact/index.d.ts.map +1 -0
  8. package/dist/artifact/index.js +3 -0
  9. package/dist/artifact/index.js.map +1 -0
  10. package/dist/artifact/manifest.d.ts +148 -0
  11. package/dist/artifact/manifest.d.ts.map +1 -0
  12. package/dist/artifact/manifest.js +485 -0
  13. package/dist/artifact/manifest.js.map +1 -0
  14. package/dist/cli/index.d.ts.map +1 -1
  15. package/dist/cli/index.js +38 -16
  16. package/dist/cli/index.js.map +1 -1
  17. package/dist/index.d.ts +6 -0
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +4 -0
  20. package/dist/index.js.map +1 -1
  21. package/dist/model.d.ts +3 -3
  22. package/dist/model.d.ts.map +1 -1
  23. package/dist/registry/definitions.js +7 -7
  24. package/dist/registry/definitions.js.map +1 -1
  25. package/dist/render/evidence.d.ts.map +1 -1
  26. package/dist/render/evidence.js +3 -2
  27. package/dist/render/evidence.js.map +1 -1
  28. package/dist/render/hooks.d.ts +1 -0
  29. package/dist/render/hooks.d.ts.map +1 -1
  30. package/dist/render/html.d.ts +10 -1
  31. package/dist/render/html.d.ts.map +1 -1
  32. package/dist/render/html.js +18 -18
  33. package/dist/render/html.js.map +1 -1
  34. package/dist/render/md.js +1 -1
  35. package/dist/render/md.js.map +1 -1
  36. package/dist/render/presentation.d.ts +2 -1
  37. package/dist/render/presentation.d.ts.map +1 -1
  38. package/dist/render/presentation.js +2 -2
  39. package/dist/render/presentation.js.map +1 -1
  40. package/dist/render/prose.d.ts +35 -0
  41. package/dist/render/prose.d.ts.map +1 -0
  42. package/dist/render/prose.js +134 -0
  43. package/dist/render/prose.js.map +1 -0
  44. package/dist/render/terminal.d.ts +2 -0
  45. package/dist/render/terminal.d.ts.map +1 -1
  46. package/dist/render/terminal.js +1 -1
  47. package/dist/render/terminal.js.map +1 -1
  48. package/dist/render/theme.d.ts +28 -0
  49. package/dist/render/theme.d.ts.map +1 -0
  50. package/dist/render/theme.js +654 -0
  51. package/dist/render/theme.js.map +1 -0
  52. package/dist/validation/index.d.ts +10 -4
  53. package/dist/validation/index.d.ts.map +1 -1
  54. package/dist/validation/index.js +85 -12
  55. package/dist/validation/index.js.map +1 -1
  56. package/dist/validation/readability.d.ts +24 -3
  57. package/dist/validation/readability.d.ts.map +1 -1
  58. package/dist/validation/readability.js +141 -171
  59. package/dist/validation/readability.js.map +1 -1
  60. package/package.json +6 -2
  61. package/registry/entries.v1.json +14 -14
  62. package/schemas/decision-dossier-document.v1.schema.json +2 -2
  63. package/schemas/decision-dossier-document.v2.schema.json +2 -2
  64. package/schemas/report-document.v1.schema.json +2 -2
  65. package/skills/focus/SKILL.md +55 -14
@@ -11,7 +11,7 @@
11
11
  "entryVersion": "2.0.0",
12
12
  "publisher": {
13
13
  "packageName": "@sentropic/focus",
14
- "packageVersion": "0.6.0"
14
+ "packageVersion": "0.6.1"
15
15
  },
16
16
  "compatibility": {
17
17
  "entryContract": "1.1.4",
@@ -76,7 +76,7 @@
76
76
  "role": "skill-instructions",
77
77
  "path": "skills/focus/SKILL.md",
78
78
  "mediaType": "text/markdown",
79
- "sha256": "0caeedad70b5d4c66c645e8086f2553a6d13a124543680b1eac581dac425f577"
79
+ "sha256": "4d48d4d1648a6e2ced5ac05e5a631cfb681b37f5a33a3eca2a6ee3d48c5a3f42"
80
80
  },
81
81
  {
82
82
  "role": "document-schema",
@@ -88,7 +88,7 @@
88
88
  "role": "document-schema",
89
89
  "path": "schemas/decision-dossier-document.v1.schema.json",
90
90
  "mediaType": "application/schema+json",
91
- "sha256": "f4b5247f025e99081c20fd9a8b0ed98b32a061c4a98597010be0264e5e564c6c"
91
+ "sha256": "ce666588e36f1387818f1be6a2dd0f9b1285d6c1f7a18b695228eea8e2df2a16"
92
92
  },
93
93
  {
94
94
  "role": "document-schema",
@@ -100,13 +100,13 @@
100
100
  "role": "document-schema",
101
101
  "path": "schemas/decision-dossier-document.v2.schema.json",
102
102
  "mediaType": "application/schema+json",
103
- "sha256": "058894550812b4a06eec57b9350e054e775ed657a05e8d451b16effcd3ba3702"
103
+ "sha256": "d92066b86fe7345d00fd0c37013c254faa9e293ad5183e0124d4659f538fface"
104
104
  },
105
105
  {
106
106
  "role": "document-schema",
107
107
  "path": "schemas/report-document.v1.schema.json",
108
108
  "mediaType": "application/schema+json",
109
- "sha256": "32546e7d14b6f39b25993f1706198193007caf2ac87df7ad28706dd5c02b4557"
109
+ "sha256": "1ce80be5833313d9169d7eff4f11c004e07328b713daec79392d85911ec5af68"
110
110
  }
111
111
  ],
112
112
  "skill": {
@@ -145,10 +145,10 @@
145
145
  },
146
146
  {
147
147
  "name": "DecisionDossierDocument",
148
- "schemaId": "urn:sentropic:focus:DecisionDossierDocument:1.1.0",
149
- "version": "1.1.0",
148
+ "schemaId": "urn:sentropic:focus:DecisionDossierDocument:1.2.0",
149
+ "version": "1.2.0",
150
150
  "assetPath": "schemas/decision-dossier-document.v1.schema.json",
151
- "sha256": "f4b5247f025e99081c20fd9a8b0ed98b32a061c4a98597010be0264e5e564c6c"
151
+ "sha256": "ce666588e36f1387818f1be6a2dd0f9b1285d6c1f7a18b695228eea8e2df2a16"
152
152
  },
153
153
  {
154
154
  "name": "DecisionDossierDocument",
@@ -159,17 +159,17 @@
159
159
  },
160
160
  {
161
161
  "name": "DecisionDossierDocument",
162
- "schemaId": "urn:sentropic:focus:DecisionDossierDocument:2.1.0",
163
- "version": "2.1.0",
162
+ "schemaId": "urn:sentropic:focus:DecisionDossierDocument:2.2.0",
163
+ "version": "2.2.0",
164
164
  "assetPath": "schemas/decision-dossier-document.v2.schema.json",
165
- "sha256": "058894550812b4a06eec57b9350e054e775ed657a05e8d451b16effcd3ba3702"
165
+ "sha256": "d92066b86fe7345d00fd0c37013c254faa9e293ad5183e0124d4659f538fface"
166
166
  },
167
167
  {
168
168
  "name": "ReportDocument",
169
- "schemaId": "urn:sentropic:focus:ReportDocument:1.0.0",
170
- "version": "1.0.0",
169
+ "schemaId": "urn:sentropic:focus:ReportDocument:1.1.0",
170
+ "version": "1.1.0",
171
171
  "assetPath": "schemas/report-document.v1.schema.json",
172
- "sha256": "32546e7d14b6f39b25993f1706198193007caf2ac87df7ad28706dd5c02b4557"
172
+ "sha256": "1ce80be5833313d9169d7eff4f11c004e07328b713daec79392d85911ec5af68"
173
173
  }
174
174
  ],
175
175
  "dependencies": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "urn:sentropic:focus:DecisionDossierDocument:1.1.0",
3
+ "$id": "urn:sentropic:focus:DecisionDossierDocument:1.2.0",
4
4
  "title": "DecisionDossierDocument",
5
5
  "description": "Read-only decision-dossier snapshot published by @sentropic/focus. Closed: unknown fields refuse. Snapshot interactions are disabled metadata (enabled:false); live decisions, signatures and amendments require separately qualified runtime capabilities.",
6
6
  "type": "object",
@@ -160,7 +160,7 @@
160
160
  "alt": { "type": "string", "pattern": "^[\\s\\S]*\\S[\\s\\S]*$" },
161
161
  "scene": {
162
162
  "type": "object",
163
- "description": "diagram-core SemanticDocument, profile generic@1, without views, geometry or layout hints. Opaque JSON until the design-system publishes its authoritative schema; no Focus-specific scene model."
163
+ "description": "diagram-core SemanticDocument without views or geometry. The DS validates the profile and its extensions."
164
164
  }
165
165
  },
166
166
  "allOf": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "urn:sentropic:focus:DecisionDossierDocument:2.1.0",
3
+ "$id": "urn:sentropic:focus:DecisionDossierDocument:2.2.0",
4
4
  "title": "DecisionDossierDocument v2 — embedded evidence",
5
5
  "description": "Breaking evidence envelope. Original bytes, digests, line ranges and reference integrity are additionally checked by the exported runtime validator. Absence of schemaVersion selects unchanged legacy v1.",
6
6
  "type": "object",
@@ -498,7 +498,7 @@
498
498
  },
499
499
  "scene": {
500
500
  "type": "object",
501
- "description": "diagram-core SemanticDocument, profile generic@1, without views, geometry or layout hints. Opaque JSON until the design-system publishes its authoritative schema; no Focus-specific scene model."
501
+ "description": "diagram-core SemanticDocument without views or geometry. The DS validates the profile and its extensions."
502
502
  },
503
503
  "citationRefs": {
504
504
  "type": "array",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "urn:sentropic:focus:ReportDocument:1.0.0",
3
+ "$id": "urn:sentropic:focus:ReportDocument:1.1.0",
4
4
  "title": "ReportDocument — informational report with embedded evidence",
5
5
  "description": "Explicit report. No decision nodes or interactions. Evidence integrity and strict readability are checked by validateFocusForPresentation.",
6
6
  "type": "object",
@@ -491,7 +491,7 @@
491
491
  },
492
492
  "scene": {
493
493
  "type": "object",
494
- "description": "diagram-core SemanticDocument, profile generic@1, without views, geometry or layout hints. Opaque JSON until the design-system publishes its authoritative schema; no Focus-specific scene model."
494
+ "description": "diagram-core SemanticDocument without views or geometry. The DS validates the profile and its extensions."
495
495
  },
496
496
  "citationRefs": {
497
497
  "type": "array",
@@ -10,7 +10,7 @@ tools: []
10
10
 
11
11
  Method capability: `sentropic.focus.decision-dossier`. Prepare a
12
12
  `DecisionDossierDocument` using schema
13
- `urn:sentropic:focus:DecisionDossierDocument:1.1.0`
13
+ `urn:sentropic:focus:DecisionDossierDocument:1.2.0`
14
14
  (`schemas/decision-dossier-document.v1.schema.json`; historical `1.0.0` remains
15
15
  pinned at `schemas/decision-dossier-document.v1.0.schema.json`). This
16
16
  instruction-only skill grants no tools or write authority.
@@ -19,7 +19,7 @@ For supporting evidence, select the explicit v2 template with the freshly built
19
19
  checkout CLI: `node packages/h2a/dist/bin.js focus template --evidence -o dossier.json`,
20
20
  then `node packages/h2a/dist/bin.js focus build dossier.json -o dossier.html`.
21
21
  It declares `schemaVersion: 2` and uses the separate schema
22
- `urn:sentropic:focus:DecisionDossierDocument:2.1.0` (historical `2.0.0` remains
22
+ `urn:sentropic:focus:DecisionDossierDocument:2.2.0` (historical `2.0.0` remains
23
23
  pinned at `schemas/decision-dossier-document.v2.0.schema.json`). Omitting the discriminant
24
24
  selects unchanged v1. Old consumers refuse v2; never strip evidence to bypass that.
25
25
  Store original bytes once in `sources` (canonical base64, original SHA-256 and byte
@@ -39,6 +39,7 @@ implementation within existing authority. Double review must find missing
39
39
  context, hidden commitments and risks; it must also cut jargon and unnecessary
40
40
  questions. It is not a reason to produce a longer dossier.
41
41
 
42
+ <!-- FOCUS-WRITING-START -->
42
43
  ## Prepare a dossier the owner can read on its own
43
44
 
44
45
  - Write `title` and `subject` as non-empty single lines of at most 100
@@ -80,22 +81,61 @@ questions. It is not a reason to produce a longer dossier.
80
81
  `readability.glossary` with a meaning the owner understands. The renderers show
81
82
  this glossary. Each definition must stand alone in plain words, with no
82
83
  self-reference or other code, even one defined elsewhere in the glossary.
83
- - Enforce the 11/11 anti-wall-of-text rules: start every multi-sentence prose
84
- block with an `En bref : ` (or `In short: `) takeaway sentence; keep each prose
85
- cell or lead-and-bullet block, question block and option block to at most 60
86
- words; keep each sentence to at most 22 words and one idea (no `;`, no `(...)`,
87
- at most one `:`, and no inline enumeration); never place ULIDs, SHA hashes,
88
- internal lot/AC codes or raw digit counts in prose, even if listed in
89
- `glossary` (`ownerRequestQuote` is exempt as verbatim).
84
+ - Give each section a descriptive Markdown heading. Use a short subheading or
85
+ a bold lead when a paragraph needs a title. Develop one point across 2
86
+ connected sentences, with a 3rd when it adds a condition or consequence.
87
+ Use bullets for distinct items and bold for the fact or choice to find again.
88
+ - Write quantities, dates, durations and percentages in digits, with units.
89
+ Put the essential point first in your own words. Choose headings and leads
90
+ for the subject. No opening label is required.
91
+ - Focus's mobile profile C allows 20 words per sentence, 60 per paragraph
92
+ or individual list item and 3 sentences per paragraph. Aim for 2 sentences.
93
+ An introductory paragraph and each bullet have independent budgets. Use
94
+ profile B in explanatory annexes (25 words per sentence, 80 per block,
95
+ 3 sentences per paragraph, aim for 20 words per sentence). Table cells
96
+ each have their own budget. Keep conditions that affect the choice beside it.
97
+ - Choose punctuation for meaning. Keep opaque identifiers and hashes in
98
+ structured references. Preserve the owner's quotation exactly.
90
99
  - On `prose` and `question` sections, optional `inputs[]` (`{ ref, kind, label? }`,
91
100
  non-blank strings, `label` ≤ 12 words and ≤ 100 characters) declare prerequisite
92
101
  artefacts with unique `ref` values (including across a linked `prose` and
93
102
  `question` sharing `prose.questionId === question.id`), and optional
94
- `completionCriterion` states a short verifiable exit condition (1 sentence, ≤ 22 words, ≤ 160 characters).
95
- - A `diagram` section supports either inline mode (`syntax` + `source`, optional
96
- `scene`) or reference mode (`sourceRef` + `renderComponent`, mutually exclusive
97
- with `source`, `syntax` and `scene`). Reference diagrams are resolved by the
98
- host `diagramResolver`; offline `h2a focus build` bundles inline diagrams only.
103
+ `completionCriterion` states a short verifiable exit condition (1 sentence within the active limit, ≤ 160 characters).
104
+ - Put the first diagram before the first question. Place it first in `sections`
105
+ or immediately after a single opening prose section.
106
+ - Show components, architecture or deployment with `archimate@2` or
107
+ `generic@2`. Use `process@1` for supplementary workflows when the order
108
+ of steps matters. Focus refuses a decision dossier with a `process@1`
109
+ diagram unless the dossier also shows architecture.
110
+ - In a portable `diagram` section, supply `kind`, `id`, `targetRef`, a one-sentence
111
+ `alt`, and a diagram-core semantic document in `scene`. The Focus 0.6 inline
112
+ envelope also requires `syntax: "mermaid"` and a non-empty `source`. Use a
113
+ textual fallback for other readers. The portable renderer reads `scene`.
114
+ A host can resolve a reference section with `sourceRef` and `renderComponent`.
115
+
116
+ ### Author a diagram-core scene
117
+
118
+ - Set `documentId` to `document:<id>`, `schemaVersion` to
119
+ `{ "major": 1, "minor": 1 }`, and `revision` to a nonnegative integer.
120
+ Declare the profile in `profileRefs`. Supply maps for `entities`, `relations`,
121
+ `ports`, `typeDefinitions` and `resources`, and an `extensions` array.
122
+ Leave unused maps empty. Omit views, positions, sizes and route coordinates.
123
+ - Key entities by `entity:<id>` and relations by `relation:<id>`. Each record
124
+ carries its matching `id`, `profile`, `type` and typed `attributes`. For
125
+ example, use `{ "kind": "text", "value": "Reader" }` for the `name` attribute.
126
+ A relation adds `endpoints` whose `role` and `target` follow its profile.
127
+ - Use `generic@1` for nodes and explicit containers. A `contains` relation
128
+ uses `parent` and `child`, and a `link` uses `source` and `target`.
129
+ Use `process@1` for steps and transitions, `erd@1` for tables and
130
+ relationships, and `generic@2` or `archimate@2` for architecture. The
131
+ architecture profiles can be combined and support optional
132
+ `diagram-presentation@2` and `ds-layout-hints@2` document extensions.
133
+ - Follow the [diagram-core profiles](https://github.com/rhanka/sent-tech-design-system/tree/69769139/packages/diagram-core/src/profiles)
134
+ for entity and relation types, endpoint roles, and typed attributes. Use
135
+ `buildDossierViews` from `@sentropic/design-system-elements/dossier-views`
136
+ to validate and lay out the scenes. Use `mountDossier` or
137
+ `assembleStandaloneDossier` from the same package for live folding.
138
+ Use short labels and check the rendered result in the intended surface.
99
139
 
100
140
  Bad: “Ratify L06b under MH-L3? A: migrate, with a/b variants. B: defer.”
101
141
  The request, stakes, consequences and recommendation are missing; several
@@ -114,6 +154,7 @@ option's id and reason, the literal quote and stakes, a declared stakes level,
114
154
  and reading estimates. Let the renderer arrange the supplied questions/options;
115
155
  never hand-author four parallel walls of text or imply that snapshot cards are
116
156
  clickable.
157
+ <!-- FOCUS-WRITING-END -->
117
158
 
118
159
  ## Validate before presentation
119
160