@sentropic/focus 0.6.0-rc.9 → 0.6.1-rc.17

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.
@@ -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": "2a54092b3b31b987d2c47a81499cfb52425af2e6b20b255f91aaeaabf73ecc1d"
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": "3cd38dafe839a71f5f4b2d6e29008d884612580039f032e1e6b56e6d76d3eb60"
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": "40a3e32d154bc7c788353dc33a2c98700cd37412888f0cda4128332e15ff7d65"
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": "2e7e51ea589ae06c5aa65b1de7a8b889d82e129e88b4106cec8e04af0f5cee36"
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": "3cd38dafe839a71f5f4b2d6e29008d884612580039f032e1e6b56e6d76d3eb60"
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": "40a3e32d154bc7c788353dc33a2c98700cd37412888f0cda4128332e15ff7d65"
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": "2e7e51ea589ae06c5aa65b1de7a8b889d82e129e88b4106cec8e04af0f5cee36"
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",
@@ -153,6 +153,7 @@
153
153
  "kind": { "const": "diagram" },
154
154
  "id": { "type": "string" },
155
155
  "targetRef": { "type": "string" },
156
+ "diagramType": { "enum": ["architecture", "workflow", "sequence", "dataflow", "lifecycle", "erd", "class", "tree", "timeline", "waterfall"] },
156
157
  "syntax": { "enum": ["mermaid", "plantuml"] },
157
158
  "source": { "type": "string", "pattern": "^[\\s\\S]*\\S[\\s\\S]*$" },
158
159
  "sourceRef": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9+.-]*:\\S+$" },
@@ -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",
@@ -474,6 +474,20 @@
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
+ },
477
491
  "syntax": {
478
492
  "enum": [
479
493
  "mermaid",
@@ -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",
@@ -467,6 +467,20 @@
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
+ },
470
484
  "syntax": {
471
485
  "enum": [
472
486
  "mermaid",
@@ -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,8 +81,8 @@ 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
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
85
86
  cell or lead-and-bullet block, question block and option block to at most 60
86
87
  words; keep each sentence to at most 22 words and one idea (no `;`, no `(...)`,
87
88
  at most one `:`, and no inline enumeration); never place ULIDs, SHA hashes,
@@ -93,9 +94,35 @@ questions. It is not a reason to produce a longer dossier.
93
94
  `question` sharing `prose.questionId === question.id`), and optional
94
95
  `completionCriterion` states a short verifiable exit condition (1 sentence, ≤ 22 words, ≤ 160 characters).
95
96
  - 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.
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.
99
126
 
100
127
  Bad: “Ratify L06b under MH-L3? A: migrate, with a/b variants. B: defer.”
101
128
  The request, stakes, consequences and recommendation are missing; several
@@ -114,6 +141,7 @@ option's id and reason, the literal quote and stakes, a declared stakes level,
114
141
  and reading estimates. Let the renderer arrange the supplied questions/options;
115
142
  never hand-author four parallel walls of text or imply that snapshot cards are
116
143
  clickable.
144
+ <!-- FOCUS-WRITING-END -->
117
145
 
118
146
  ## Validate before presentation
119
147