@sentropic/focus 0.6.1-rc.17 → 0.6.1-rc.2

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 (48) hide show
  1. package/dist/cli/index.d.ts.map +1 -1
  2. package/dist/cli/index.js +1 -14
  3. package/dist/cli/index.js.map +1 -1
  4. package/dist/index.d.ts +2 -2
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +1 -1
  7. package/dist/index.js.map +1 -1
  8. package/dist/model.d.ts +2 -8
  9. package/dist/model.d.ts.map +1 -1
  10. package/dist/model.js +0 -13
  11. package/dist/model.js.map +1 -1
  12. package/dist/render/evidence.d.ts.map +1 -1
  13. package/dist/render/evidence.js +3 -2
  14. package/dist/render/evidence.js.map +1 -1
  15. package/dist/render/hooks.d.ts +1 -0
  16. package/dist/render/hooks.d.ts.map +1 -1
  17. package/dist/render/html.d.ts +3 -1
  18. package/dist/render/html.d.ts.map +1 -1
  19. package/dist/render/html.js +11 -17
  20. package/dist/render/html.js.map +1 -1
  21. package/dist/render/md.js +1 -1
  22. package/dist/render/md.js.map +1 -1
  23. package/dist/render/presentation.d.ts +2 -1
  24. package/dist/render/presentation.d.ts.map +1 -1
  25. package/dist/render/presentation.js +2 -2
  26. package/dist/render/presentation.js.map +1 -1
  27. package/dist/render/prose.d.ts +35 -0
  28. package/dist/render/prose.d.ts.map +1 -0
  29. package/dist/render/prose.js +134 -0
  30. package/dist/render/prose.js.map +1 -0
  31. package/dist/render/terminal.d.ts +2 -0
  32. package/dist/render/terminal.d.ts.map +1 -1
  33. package/dist/render/terminal.js +1 -1
  34. package/dist/render/terminal.js.map +1 -1
  35. package/dist/validation/index.d.ts +7 -7
  36. package/dist/validation/index.d.ts.map +1 -1
  37. package/dist/validation/index.js +14 -17
  38. package/dist/validation/index.js.map +1 -1
  39. package/dist/validation/readability.d.ts +24 -3
  40. package/dist/validation/readability.d.ts.map +1 -1
  41. package/dist/validation/readability.js +127 -157
  42. package/dist/validation/readability.js.map +1 -1
  43. package/package.json +2 -2
  44. package/registry/entries.v1.json +7 -7
  45. package/schemas/decision-dossier-document.v1.schema.json +1 -2
  46. package/schemas/decision-dossier-document.v2.schema.json +1 -15
  47. package/schemas/report-document.v1.schema.json +1 -15
  48. package/skills/focus/SKILL.md +45 -38
@@ -474,20 +474,6 @@
474
474
  "targetRef": {
475
475
  "type": "string"
476
476
  },
477
- "diagramType": {
478
- "enum": [
479
- "architecture",
480
- "workflow",
481
- "sequence",
482
- "dataflow",
483
- "lifecycle",
484
- "erd",
485
- "class",
486
- "tree",
487
- "timeline",
488
- "waterfall"
489
- ]
490
- },
491
477
  "syntax": {
492
478
  "enum": [
493
479
  "mermaid",
@@ -512,7 +498,7 @@
512
498
  },
513
499
  "scene": {
514
500
  "type": "object",
515
- "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."
516
502
  },
517
503
  "citationRefs": {
518
504
  "type": "array",
@@ -467,20 +467,6 @@
467
467
  "targetRef": {
468
468
  "type": "string"
469
469
  },
470
- "diagramType": {
471
- "enum": [
472
- "architecture",
473
- "workflow",
474
- "sequence",
475
- "dataflow",
476
- "lifecycle",
477
- "erd",
478
- "class",
479
- "tree",
480
- "timeline",
481
- "waterfall"
482
- ]
483
- },
484
470
  "syntax": {
485
471
  "enum": [
486
472
  "mermaid",
@@ -505,7 +491,7 @@
505
491
  },
506
492
  "scene": {
507
493
  "type": "object",
508
- "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."
509
495
  },
510
496
  "citationRefs": {
511
497
  "type": "array",
@@ -81,48 +81,55 @@ questions. It is not a reason to produce a longer dossier.
81
81
  `readability.glossary` with a meaning the owner understands. The renderers show
82
82
  this glossary. Each definition must stand alone in plain words, with no
83
83
  self-reference or other code, even one defined elsewhere in the glossary.
84
- - Enforce the 11/11 anti-wall-of-text rules: put the essential point first
85
- (plain guidance, never an imposed opening label); keep each prose
86
- cell or lead-and-bullet block, question block and option block to at most 60
87
- words; keep each sentence to at most 22 words and one idea (no `;`, no `(...)`,
88
- at most one `:`, and no inline enumeration); never place ULIDs, SHA hashes,
89
- internal lot/AC codes or raw digit counts in prose, even if listed in
90
- `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.
91
99
  - On `prose` and `question` sections, optional `inputs[]` (`{ ref, kind, label? }`,
92
100
  non-blank strings, `label` ≤ 12 words and ≤ 100 characters) declare prerequisite
93
101
  artefacts with unique `ref` values (including across a linked `prose` and
94
102
  `question` sharing `prose.questionId === question.id`), and optional
95
- `completionCriterion` states a short verifiable exit condition (1 sentence, ≤ 22 words, ≤ 160 characters).
96
- - A `diagram` section supports either inline mode (`syntax` + `source`, optional
97
- `diagramType` and `scene`) or reference mode (`sourceRef` + `renderComponent`,
98
- mutually exclusive with `source`, `syntax` and `scene`). Reference diagrams are
99
- resolved by the host `diagramResolver`; offline standalone exports bundle inline
100
- diagrams only.
101
-
102
- ### Choose the right `diagramType` for every diagram section
103
-
104
- | Content | `diagramType` | Mode / DS profile | Expected rendering | Forbidden |
105
- | --- | --- | --- | --- | --- |
106
- | Ordered steps, runbook, validation circuit, CI/CD pipeline, agent loop | `workflow` | Mode A (`process@1` / `flowchart`) | Rounded centered simple boxes, clean arrows, zero component icons, zero fold buttons | Architecture component cards |
107
- | Normative BPMN 2.0 process | *(outside inline Focus)* | A2UI `BpmnCanvas` | Dedicated BPMN 2.0 notation | Simulating BPMN with `generic@1` |
108
- | Services, components, deployment, network zones, numbered flows | `architecture` | Mode A (`generic@2`, `archimate@2`, `ecosystem:*`, `flows`, or raw `flowchart` with `"diagramType": "architecture"`) | Compact r7 `v2` cards (opt-in), zones, visible links + legend | Simple process boxes without boundaries |
109
- | Data model, tables, PK/FK, cardinalities | `erd` | Mode A (`erd@1` / `erDiagram`, upcoming lot) | ERD tables with PK/FK rows and crow's feet | Generic cards |
110
- | Chronological exchanges between actors or services | `sequence` | Mode A (`sequence@1` / `sequenceDiagram`, upcoming lot) | Lifelines, sync/async/reply messages, `alt`/`loop` blocks | Flattened flowchart |
111
- | ETL/ELT pipeline, stores, lineage | `dataflow` | Mode A (`dataflow@1`, upcoming lot) | Pipeline steps with store cylinders and documents | Uniform cards |
112
- | Weighted flow distribution (volumes) | `dataflow` | Mode B (`SankeyChart`, later Focus lot) | Proportional ribbons | Unweighted flowchart |
113
- | Entity states, guards, retries | `lifecycle` | Mode A (`state@1` / `stateDiagram-v2`, upcoming lot) | Initial/final states and guarded transitions | Cards lacking initial/final states |
114
- | Classes, interfaces, attributes, inheritance | `class` | Mode A (`uml@2` / `classDiagram`, upcoming lot) | Three compartments and UML connectors | Cards without compartments |
115
- | Hierarchy or single-parent taxonomy | `tree` | Mode B (`TreegraphChart`, upcoming lot) | Node-link tree | Card grid |
116
- | Dated milestones or incident chronology | `timeline` | Mode B (`TimelineChart`, upcoming lot) | Time axis with lanes and milestones | Horizontal flowchart |
117
- | Nested latencies, execution trace | `waterfall` | Mode B (`TraceWaterfallChart`, upcoming lot) | Indented spans with statuses | Flat bars |
118
- | Cumulative numeric bridge (variances) | `waterfall` | Mode B (`WaterfallChart`, Focus only, upcoming lot) | Cumulative increase/decrease/total bars | Trace spans |
119
-
120
- Diagram authoring rules:
121
- 1. Always declare `diagramType` on every new `diagram` section. Lot 1: the offline Focus builder accepts `diagramType` `"workflow"` and `"architecture"` only.
122
- 2. For a `workflow`, aim for 3 to 8 steps with short labels (at most 5 words per box).
123
- 3. If a builder warns `linear_chain_as_architecture_cards`, inspect intent and switch to `"diagramType": "workflow"` when the diagram represents steps rather than components.
124
- 4. Untyped Mermaid `flowchart` sources without `scene` render as `workflow` (`process@1`) boxes by default; set `"diagramType": "architecture"` explicitly to retain architecture component cards.
125
- 5. Write a standalone single-sentence `alt` description and never encode states by color alone.
103
+ `completionCriterion` states a short verifiable exit condition (1 sentence within the active limit, ≤ 160 characters).
104
+ - In a portable `diagram` section, supply `kind`, `id`, `targetRef`, a one-sentence
105
+ `alt`, and a diagram-core semantic document in `scene`. The Focus 0.6 inline
106
+ envelope also requires `syntax: "mermaid"` and a non-empty `source`. Use a
107
+ textual fallback for other readers. The portable renderer reads `scene`.
108
+ A host can resolve a reference section with `sourceRef` and `renderComponent`.
109
+
110
+ ### Author a diagram-core scene
111
+
112
+ - Set `documentId` to `document:<id>`, `schemaVersion` to
113
+ `{ "major": 1, "minor": 1 }`, and `revision` to a nonnegative integer.
114
+ Declare the profile in `profileRefs`. Supply maps for `entities`, `relations`,
115
+ `ports`, `typeDefinitions` and `resources`, and an `extensions` array.
116
+ Leave unused maps empty. Omit views, positions, sizes and route coordinates.
117
+ - Key entities by `entity:<id>` and relations by `relation:<id>`. Each record
118
+ carries its matching `id`, `profile`, `type` and typed `attributes`. For
119
+ example, use `{ "kind": "text", "value": "Reader" }` for the `name` attribute.
120
+ A relation adds `endpoints` whose `role` and `target` follow its profile.
121
+ - Use `generic@1` for nodes and explicit containers. A `contains` relation
122
+ uses `parent` and `child`, and a `link` uses `source` and `target`.
123
+ Use `process@1` for steps and transitions, `erd@1` for tables and
124
+ relationships, and `generic@2` or `archimate@2` for architecture. The
125
+ architecture profiles can be combined and support optional
126
+ `diagram-presentation@2` and `ds-layout-hints@2` document extensions.
127
+ - Follow the [diagram-core profiles](https://github.com/rhanka/sent-tech-design-system/tree/69769139/packages/diagram-core/src/profiles)
128
+ for entity and relation types, endpoint roles, and typed attributes. Use
129
+ `buildDossierViews` from `@sentropic/design-system-elements/dossier-views`
130
+ to validate and lay out the scenes. Use `mountDossier` or
131
+ `assembleStandaloneDossier` from the same package for live folding.
132
+ Use short labels and check the rendered result in the intended surface.
126
133
 
127
134
  Bad: “Ratify L06b under MH-L3? A: migrate, with a/b variants. B: defer.”
128
135
  The request, stakes, consequences and recommendation are missing; several