@kioju/dsh-cognitive-dashboard 0.0.0-stage → 0.8.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 +21 -0
- package/README.md +43 -2
- package/client.js +1924 -0
- package/cordis.patch.yml +13 -0
- package/docs/DESIGN.md +73 -0
- package/docs/DETAIL.md +25 -0
- package/icon.svg +6 -0
- package/index.js +615 -0
- package/locale/en.json +7 -0
- package/locale/ja.json +7 -0
- package/locale/zh.json +7 -0
- package/package.json +71 -6
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# dsh-cognitive-dashboard — DSH bundle patch layer
|
|
2
|
+
#
|
|
3
|
+
# Registers the cognitive dashboard plugin. The Host half contributes one
|
|
4
|
+
# session projection (key: dashboard) that reads the workspace ledgers; the Web
|
|
5
|
+
# client contributes one conversation view tab (Cognition).
|
|
6
|
+
#
|
|
7
|
+
# Read-only: the dashboard never writes the ledgers. Data lives beside the
|
|
8
|
+
# workspace, not in the DSH home.
|
|
9
|
+
|
|
10
|
+
- insert:
|
|
11
|
+
- id: cognitive-dashboard
|
|
12
|
+
name: '@kioju/dsh-cognitive-dashboard'
|
|
13
|
+
config: {}
|
package/docs/DESIGN.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Cognitive dashboard design
|
|
2
|
+
|
|
3
|
+
The **Cognition** tab appears in the conversation view of the DSH Web GUI.
|
|
4
|
+
The layout and information order draw on the *Practical Guide to Dashboard
|
|
5
|
+
Design* from Japan's Digital Agency. For usage and limitations, see
|
|
6
|
+
[Behavior and limitations](DETAIL.md).
|
|
7
|
+
|
|
8
|
+
## Purpose
|
|
9
|
+
|
|
10
|
+
When users open a session or reach a stopping point, they can see the overall
|
|
11
|
+
objective, the current task, and other unfinished work in one place. That
|
|
12
|
+
helps them decide whether to continue, change course, or pause. The dashboard
|
|
13
|
+
is read-only: it does not judge the work or block progress.
|
|
14
|
+
|
|
15
|
+
## Information order
|
|
16
|
+
|
|
17
|
+
| Order | Section | Purpose |
|
|
18
|
+
|---|---|---|
|
|
19
|
+
| 1 | Objective tree | Shows how components support objectives and which branch contains the current work. |
|
|
20
|
+
| 2 | Current task and other open work | Shows the tasks relevant to the next decision. If text is truncated, the tooltip provides the full text. |
|
|
21
|
+
| 3 | Open findings | Lists findings by priority and shows their kind, age, and staleness. |
|
|
22
|
+
| 4 | Recall block | Shows the text the model plugin supplies to the session, preserving indentation and line breaks. |
|
|
23
|
+
|
|
24
|
+
The tab label is the visible title. A visually hidden `h1` preserves the
|
|
25
|
+
heading for screen readers without repeating it on the page. The detail panel
|
|
26
|
+
sits beside the tree and wraps below it when space is limited. Bottom padding
|
|
27
|
+
keeps content clear of the floating composer.
|
|
28
|
+
|
|
29
|
+
## Reading the objective tree
|
|
30
|
+
|
|
31
|
+
- **Position.** The root is at the centre, with nodes arranged in concentric
|
|
32
|
+
rings by depth. Solid lines represent `serves` and dashed lines represent
|
|
33
|
+
`requires`. The current path is marked by fill, outlines, thicker edges, and
|
|
34
|
+
a breadcrumb, so it does not rely on colour alone.
|
|
35
|
+
- **Node size (investment).** Size reflects the combined count of linked tasks,
|
|
36
|
+
findings, and commits touching implementation paths for the node and its
|
|
37
|
+
descendants, relative to the largest branch. Documentation links appear in
|
|
38
|
+
the details but do not contribute to the commit count.
|
|
39
|
+
- **Ring (acceptance).** The ring shows the share of recorded milestones that
|
|
40
|
+
are complete. If no milestones are recorded, there is no ring. Neither node
|
|
41
|
+
size nor the ring represents a score or a pass/fail threshold.
|
|
42
|
+
- **Navigation.** Users can search, zoom, pan, and collapse branches. The tree
|
|
43
|
+
exposes `tree` and `treeitem` roles to assistive technology. Arrow keys move
|
|
44
|
+
between nodes, Enter or Space opens node details, and Escape closes them.
|
|
45
|
+
|
|
46
|
+
## Data sources and missing information
|
|
47
|
+
|
|
48
|
+
The host reads the tree and recall block from `@kioju/dsh-cognitive-model` through
|
|
49
|
+
its `cognitiveGraph` service and reads the workspace findings ledger directly.
|
|
50
|
+
The web client renders the host's `dashboard` projection. The model plugin
|
|
51
|
+
owns event-log projection and recall assembly.
|
|
52
|
+
|
|
53
|
+
The view distinguishes unrecorded data, unreadable data, and an unavailable
|
|
54
|
+
model plugin. An unrecorded task list does not imply that no work remains.
|
|
55
|
+
If some Git history cannot be read, the dashboard reports the available count
|
|
56
|
+
as a lower bound and identifies the affected implementation paths.
|
|
57
|
+
|
|
58
|
+
The recall block wraps long lines without changing the text. It does not
|
|
59
|
+
include the bird's-eye check (`BIRDSEYE`) that can be added to a session's prompt
|
|
60
|
+
once per error. Viewing the block does not mark that check as seen.
|
|
61
|
+
|
|
62
|
+
## Colour and accessibility
|
|
63
|
+
|
|
64
|
+
The dashboard uses the host's light and dark themes. Symbols and text convey
|
|
65
|
+
status alongside colour. Tooltips and screen-reader text explain confidence
|
|
66
|
+
labels. There is no overall verdict or colour-coded score.
|
|
67
|
+
|
|
68
|
+
## Design history
|
|
69
|
+
|
|
70
|
+
The objective tree moved from a list to a radial layout so users could see the
|
|
71
|
+
hierarchy, current path, investment, and acceptance together. For recall, the
|
|
72
|
+
design favours showing the text supplied to the session rather than drawing a
|
|
73
|
+
separate view of the underlying data.
|
package/docs/DETAIL.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Cognitive dashboard: behavior and limitations
|
|
2
|
+
|
|
3
|
+
The read-only **Cognition** tab appears next to Chat and Trajectory in the DSH Web GUI. See the [installation instructions](../README.md#install) to add it to a profile and the [design notes](DESIGN.md) for the layout and accessibility rationale.
|
|
4
|
+
|
|
5
|
+
## What it shows
|
|
6
|
+
|
|
7
|
+
- **Objective tree.** The root is at the centre, with objectives and components arranged in rings by depth. Node size shows investment (linked tasks and findings, plus commits touching implementation paths) relative to the largest branch. The acceptance ring shows the share of recorded milestones that are complete. Neither is a score. The current path is highlighted and shown as a breadcrumb. Select a node to see its tasks, open findings, links, relationships, investment breakdown, milestones and last activity. Search, zoom, pan and collapse are available in the tree.
|
|
8
|
+
- **Current task and other open work.** The view shows the current task, how recently it was updated, and the other recorded tasks below it. The full text is available in a tooltip when the description is truncated. `Not recorded` does not mean that nothing remains.
|
|
9
|
+
- **Open findings.** The view shows the open count and lists findings by priority, with their kind, age, status and staleness. It distinguishes a missing or unreadable ledger from a readable ledger with no open findings.
|
|
10
|
+
- **Recall block.** The view displays the text supplied by the model, preserving line breaks and indentation. It does not include or mark as seen the bird's-eye check (`BIRDSEYE`) that can be added to a session's prompt once per error. The view distinguishes a missing block, an unreadable block and an unavailable model service.
|
|
11
|
+
|
|
12
|
+
## Data sources
|
|
13
|
+
|
|
14
|
+
The Host publishes one session projection (`dashboard`), which the Web client reads with `useProjection`. The Host calls `snapshot(root)` and `recall(root)` on the model plugin's `cognitiveGraph` service rather than reading or re-projecting its event log. The two reads share the model's cache. A profile without the model plugin shows no objective tree or recall block; findings remain available independently.
|
|
15
|
+
|
|
16
|
+
The Host reads findings directly from `.dsh/cognitive-findings/findings.json` in the workspace. It resolves the workspace from the session header's working directory, using the nearest ancestor containing `.git` or the directory itself if no ancestor contains it. If the session's effective working directory changes, the dashboard can still show the workspace from the header.
|
|
17
|
+
|
|
18
|
+
The dashboard does not write to either store or add command rows to the conversation. It uses local Git history to count commits touching implementation paths.
|
|
19
|
+
|
|
20
|
+
## Limitations
|
|
21
|
+
|
|
22
|
+
- The projection refreshes after relevant session events (tool result, turn end, user message or command completion). An external edit does not appear until the next event; there is no manual refresh button.
|
|
23
|
+
- The model's `contextLimit` bounds the map in the recall block and `recallLimit` caps its constraints, risks, preferences and decisions per section. The graph snapshot behind the tree is bounded separately to 200 nodes, 400 edges and 20 inference rows.
|
|
24
|
+
- A commit touching paths linked to two components can count toward both. If Git cannot read a repository, the commit count is a lower bound, not an exact zero. The node details identify the affected implementation paths.
|
|
25
|
+
- The DSH ToDo panel can overlay the view while tasks are active. It is part of the host UI, not the dashboard.
|
package/icon.svg
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36">
|
|
2
|
+
<path d="M7 26a11 11 0 1 1 22 0" fill="none" stroke="#2f6f9f" stroke-width="3" stroke-linecap="round"/>
|
|
3
|
+
<path d="M18 26l6.5-8.5" fill="none" stroke="#2f6f9f" stroke-width="3" stroke-linecap="round"/>
|
|
4
|
+
<circle cx="18" cy="26" r="2.6" fill="#2f6f9f"/>
|
|
5
|
+
<path d="M11 30h14" stroke="#8aa9c9" stroke-width="2" stroke-linecap="round"/>
|
|
6
|
+
</svg>
|