@deepseek-insight/dsi 0.5.18 → 0.5.20
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/.agents/skills/dsi-adr/SKILL.md +121 -0
- package/.agents/skills/dsi-i18n-migrate/SKILL.md +87 -0
- package/.agents/skills/dsi-ov-setup/SKILL.md +114 -0
- package/.agents/skills/dsi-release/SKILL.md +175 -0
- package/.agents/skills/dsi-spcheck/SKILL.md +188 -0
- package/.agents/skills/dsi-spec/SKILL.md +310 -0
- package/.agents/skills/dsi-spec/references/mermaid-pattern.md +160 -0
- package/.agents/skills/dsi-spec/references/tasks-json-template.md +125 -0
- package/.agents/skills/dsi-task/SKILL.md +287 -0
- package/README.md +5 -23
- package/bin/dsi.mjs +129 -17
- package/bin/lib/mirror-skills.mjs +56 -0
- package/build/client/_app/immutable/assets/0.C4pk9RsQ.css +2 -0
- package/build/client/_app/immutable/assets/{2.GTtLKMiQ.css → 2.Dk-hwaP_.css} +1 -1
- package/build/client/_app/immutable/chunks/CodI3RGj.js +1 -0
- package/build/client/_app/immutable/chunks/{CLNDb8QN.js → CxmtCU9s.js} +1 -1
- package/build/client/_app/immutable/chunks/{Bx7fD5zN.js → DKDzTags.js} +2 -2
- package/build/client/_app/immutable/chunks/{DWBqt9Io.js → azDKH4zi.js} +1 -1
- package/build/client/_app/immutable/chunks/qIBjcgkE.js +1 -0
- package/build/client/_app/immutable/entry/{app.CnWnvioB.js → app.CqYGeqRv.js} +2 -2
- package/build/client/_app/immutable/entry/start.CIXiL_7f.js +1 -0
- package/build/client/_app/immutable/nodes/{0.B3qXb7lb.js → 0.u99aBgpL.js} +1 -1
- package/build/client/_app/immutable/nodes/{1.DdjrT3tT.js → 1.qcRcZCY6.js} +1 -1
- package/build/client/_app/immutable/nodes/2.GgqfB5rv.js +171 -0
- package/build/client/_app/version.json +1 -1
- package/build/handler.js +4 -4
- package/build/index.js +4 -4
- package/build/server/chunks/chunks/{app-config.svelte.js-rN4N5yAI.js → app-config.svelte.js-CFb4kaFl.js} +7 -3
- package/build/server/chunks/chunks/{db.js-DbbYS9o8.js → db.js-9wP1ySFv.js} +2 -2
- package/build/server/chunks/chunks/{db2.js-BQWa7bEG.js → db2.js-B_Un4Zvq.js} +7 -5
- package/build/server/chunks/chunks/{dsh-connection.js-CpcCtA42.js → dsh-connection.js-CwL9I98w.js} +4 -3
- package/build/server/chunks/chunks/{git-probe.js-CvkToKO4.js → git-probe.js-C7z6xDzg.js} +3 -3
- package/build/server/chunks/chunks/{insight-config.js-Dw_Qi0fO.js → insight-config.js-COS9LOWZ.js} +13 -4
- package/build/server/chunks/chunks/{internal.js-DKO0SoY7.js → internal.js-Bf2uRIVS.js} +2 -2
- package/build/server/chunks/chunks/{permission-state.js-yvwUSnug.js → permission-state.js-BoJAoWqi.js} +18 -15
- package/build/server/chunks/chunks/settings-home.js-CqnqJVOu.js +9 -0
- package/build/server/chunks/chunks/settings-home2.js-f75-B6RI.js +102 -0
- package/build/server/chunks/chunks/{state.js-C7gJT4Un.js → state.js-OWX1K3Yj.js} +2 -2
- package/build/server/chunks/chunks/{watcher.js-C97Xyorx.js → watcher.js-Dc9hzRLI.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/a2a/_id_/{_server.ts.js-Cqh1iqgu.js → _server.ts.js-0rfV7w20.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/a2a/{_server.ts.js-DNKD4rZu.js → _server.ts.js-DX0DUIja.js} +6 -5
- package/build/server/chunks/entries/endpoints/api/a2a/register/{_server.ts.js-CJ-FwkrZ.js → _server.ts.js-zB-V9Naa.js} +6 -5
- package/build/server/chunks/entries/endpoints/api/config/{_server.ts.js-CMM4kYVx.js → _server.ts.js-Bo4VgIna.js} +5 -3
- package/build/server/chunks/entries/endpoints/api/dsh/directory/{_server.ts.js-epVplzwB.js → _server.ts.js-_Wc4NU0Q.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/pick-directory/{_server.ts.js-bXHb97gT.js → _server.ts.js-CvoINUYy.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/presets/{_server.ts.js-BNOHhtzy.js → _server.ts.js-B4UwZ8nd.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/attachment/{_server.ts.js-BBi6jeVj.js → _server.ts.js-Hml2J0Bq.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/cancel/{_server.ts.js-N0nKPuqL.js → _server.ts.js-CsZ2u8cs.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/catalog/{_server.ts.js-VGFCPAbs.js → _server.ts.js-BhF1Nzig.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/command/{_server.ts.js-na_sUb0Z.js → _server.ts.js-BGXjV_Ak.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/events/{_server.ts.js-CeNf028P.js → _server.ts.js-BF4vBIja.js} +5 -4
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/fork/{_server.ts.js-DfqO-GO4.js → _server.ts.js-B2OwrEQD.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/goal/{_server.ts.js-Dj9GYNl7.js → _server.ts.js-DboY_7cp.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/history/{_server.ts.js-DqShsRl9.js → _server.ts.js-BpioYdnc.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/models/{_server.ts.js-BQSBUf70.js → _server.ts.js-CLrgUoq0.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/path/{_server.ts.js-CeCKDyKB.js → _server.ts.js-BlZr_mA6.js} +3 -2
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/permission/{_server.ts.js-CadTCNUJ.js → _server.ts.js-BiU_IgYD.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/prompt/{_server.ts.js-BXzgi8xX.js → _server.ts.js-FV-4ougZ.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/rename/{_server.ts.js-BfD5FXiL.js → _server.ts.js-ChxB0XU5.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/respond/{_server.ts.js-CiDPC9TY.js → _server.ts.js-DkSydg_X.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/select-model/{_server.ts.js-DGcZgN96.js → _server.ts.js-Wbuf-vse.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/sessions/{_server.ts.js-DnU1CCOw.js → _server.ts.js-B-BfCKKL.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/workspace-file/{_server.ts.js-BZ0UV1n2.js → _server.ts.js-fKfv5g19.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/workspace-file-bytes/{_server.ts.js-lxLpuPFL.js → _server.ts.js-DZpRzvas.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/workspace-tree/{_server.ts.js-Cw3vl704.js → _server.ts.js-Hn5-fnsU.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/workspaces/{_server.ts.js-KKnR2UO4.js → _server.ts.js-CtPDRjV7.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/workspaces/_workspaceId_/delete/{_server.ts.js-I1eSZn60.js → _server.ts.js-DOp3nIcK.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/workspaces/_workspaceId_/rename/{_server.ts.js-B0zqAKnV.js → _server.ts.js-DiwcZfK9.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/prompts/_id_/{_server.ts.js-C-QN0enK.js → _server.ts.js-SoNSMvWj.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/prompts/{_server.ts.js-CwTGUPIp.js → _server.ts.js-DIZiiHk-.js} +12 -4
- package/build/server/chunks/entries/endpoints/api/prompts/use/{_server.ts.js-Bvotxm37.js → _server.ts.js-CbsUk0fk.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/settings/{_server.ts.js-CRRLXk0y.js → _server.ts.js-DCeIpzKT.js} +3 -2
- package/build/server/chunks/entries/endpoints/api/settings-home/file/_server.ts.js-C1gSFX1P.js +68 -0
- package/build/server/chunks/entries/endpoints/api/settings-home/file-write/_server.ts.js-Dx0glK_q.js +68 -0
- package/build/server/chunks/entries/endpoints/api/settings-home/tree/_server.ts.js-CAmn2SKB.js +61 -0
- package/build/server/chunks/entries/endpoints/api/workspace/file-write/{_server.ts.js-DY_NDlYl.js → _server.ts.js-Blw1UFX2.js} +6 -5
- package/build/server/chunks/entries/endpoints/api/workspace/git-events/{_server.ts.js-DHEaymrG.js → _server.ts.js-yflU8VH2.js} +6 -5
- package/build/server/chunks/entries/endpoints/api/workspace/git-file-head/{_server.ts.js-AQgNkfCV.js → _server.ts.js-q9jXuJ1p.js} +10 -18
- package/build/server/chunks/entries/endpoints/api/workspace/git-map/{_server.ts.js-C9vxPbB3.js → _server.ts.js-YjwnbPfG.js} +12 -20
- package/build/server/chunks/entries/endpoints/api/workspace/git-status/{_server.ts.js-BlMRR11v.js → _server.ts.js-DRQay15h.js} +12 -20
- package/build/server/chunks/entries/endpoints/api/workspace/write-gate/_server.ts.js-BiCzLyNH.js +54 -0
- package/build/server/chunks/entries/pages/{_error.svelte.js-C73uxSol.js → _error.svelte.js-DkmmDHjP.js} +3 -3
- package/build/server/chunks/entries/pages/{_page.server.ts.js-ze2dUhXW.js → _page.server.ts.js-BHW1mzYQ.js} +3 -3
- package/build/server/chunks/entries/pages/{_page.svelte.js-C1cGitkt.js → _page.svelte.js-BSt3-Adz.js} +993 -532
- package/build/server/chunks/{handler-CTOEBU52.js → handler-CEAxnB4f.js} +3 -3
- package/build/server/chunks/{index.js-Bifh9-nS.js → index.js-B-3rUYGC.js} +2 -2
- package/build/server/chunks/{manifest.js-Da5_i6lM.js → manifest.js--ZDTDlzU.js} +71 -43
- package/build/server/chunks/nodes/{0.js-DIgCB7dX.js → 0.js-BQXxAZac.js} +3 -3
- package/build/server/chunks/nodes/1.js-DMcugevB.js +9 -0
- package/build/server/chunks/nodes/{2.js-DXw1-iEf.js → 2.js-BrT7uCAN.js} +9 -8
- package/package.json +3 -2
- package/template/.dsi/config.json +2 -2
- package/template/.dsi/prompts.sqlite-shm +0 -0
- package/template/.dsi/prompts.sqlite-wal +0 -0
- package/template/.dsi/settings.yaml +2 -1
- package/build/client/_app/immutable/assets/0.BQjO3ESU.css +0 -2
- package/build/client/_app/immutable/chunks/CAZxZSEb.js +0 -1
- package/build/client/_app/immutable/chunks/DvLq-YzL.js +0 -1
- package/build/client/_app/immutable/entry/start.DrunaWOx.js +0 -1
- package/build/client/_app/immutable/nodes/2.o9KKAujP.js +0 -170
- package/build/server/chunks/nodes/1.js-DPBXm0Gt.js +0 -9
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# Mermaid Diagram Pattern — Syntax, Accessibility & Error Prevention
|
|
2
|
+
|
|
3
|
+
Shared reference for ai-research and yt-research skills. Both skills produce Obsidian pages with mermaid diagrams. This file defines the rules for writing diagrams that render correctly and meet accessibility standards.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## ⛔ When Is a Sequence Diagram Required?
|
|
8
|
+
|
|
9
|
+
A `sequenceDiagram` is **conditionally mandatory** — only when the content involves actors with message flows.
|
|
10
|
+
|
|
11
|
+
### Decision Rule
|
|
12
|
+
|
|
13
|
+
Ask: **Does this topic involve who-talks-to-whom?**
|
|
14
|
+
|
|
15
|
+
| Yes → Sequence Diagram REQUIRED | No → Single Diagram SUFFICES |
|
|
16
|
+
|---|---|
|
|
17
|
+
| Systems communicating (API calls, service-to-service) | Purely conceptual or statistical content |
|
|
18
|
+
| Agents interacting (user → tool → AI → output) | Historical timelines without actor messaging |
|
|
19
|
+
| Process flows between distinct participants | Comparison tables, feature lists |
|
|
20
|
+
| Request/response patterns | Taxonomy or hierarchy (use mindmap instead) |
|
|
21
|
+
|
|
22
|
+
**If no actors exist, do NOT force a sequence diagram.** A mindmap or flowchart alone is sufficient.
|
|
23
|
+
|
|
24
|
+
### Mandatory Diagram Minimum
|
|
25
|
+
|
|
26
|
+
Every research page MUST include at least:
|
|
27
|
+
1. **One mindmap** (for conceptual frameworks or topic hierarchies) — MANDATORY
|
|
28
|
+
2. **One sequence diagram** — ONLY IF actors with message flows exist in the content
|
|
29
|
+
3. **Additional diagrams** (flowchart, timeline) — optional, based on content
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Syntax Rules — Avoiding Parse Errors
|
|
34
|
+
|
|
35
|
+
### Sequence Diagram Rules
|
|
36
|
+
|
|
37
|
+
| Rule | ❌ Breaks | ✅ Correct |
|
|
38
|
+
|---|---|---|
|
|
39
|
+
| No `style` directives | `style A fill:#4a90d9` inside sequenceDiagram → **PARSE ERROR** | Omit all styling from sequence diagrams. Mermaid does not support `style` in sequence context. |
|
|
40
|
+
| No `#` in message text | `A->>B: Skill #1 activates` → **PARSE ERROR** (treated as comment) | `A->>B: Skill 1 activates` |
|
|
41
|
+
| No raw `>` in messages | `A->>B: Source > Filters > Output` → **PARSE ERROR** (parsed as arrow) | `A->>B: Source to Filters to Output` |
|
|
42
|
+
| No `/` in messages (sometimes) | `A->>B: saved to docs/` → may break in some renderers | `A->>B: saved to docs folder` |
|
|
43
|
+
| No parentheses in messages (sometimes) | `A->>B: Verdict (Ship it)` → may break | `A->>B: Verdict — Ship it or Fix` |
|
|
44
|
+
| Commas in `Note over` are delimiters | `Note over A,B: Phase 1` → correct (comma separates participants) | Fine — this is valid syntax |
|
|
45
|
+
| Colons inside message text | `A->>B: Time: 12:00` → **PARSE ERROR** (colon ends the message) | `A->>B: Time is 12h00` |
|
|
46
|
+
| Apostrophes in messages | `A->>B: What's the question?` → may break | `A->>B: What is the question?` |
|
|
47
|
+
|
|
48
|
+
### Flowchart Rules
|
|
49
|
+
|
|
50
|
+
| Rule | ❌ Breaks | ✅ Correct |
|
|
51
|
+
|---|---|---|
|
|
52
|
+
| `#` inside node labels | `A["Skill #1"]` → may break | `A["Skill 1"]` |
|
|
53
|
+
| `&` multi-target syntax | `D2 & D3 & D4 --> E` → breaks in some renderers | Separate arrow per node: `D2 --> E` then `D3 --> E` etc. |
|
|
54
|
+
| `style` IS valid in flowcharts | `style A fill:#4a90d9,color:#fff` → **works correctly** | Use freely in flowchart blocks. |
|
|
55
|
+
| `<br/>` for line breaks in nodes | `A["Line 1\nLine 2"]` → may not render | `A["Line 1<br/>Line 2"]` |
|
|
56
|
+
| Curlyly braces for decision nodes | `E{"Verdict?"}` → correct | Fine — this is valid syntax |
|
|
57
|
+
| Pipe in labels | `A["a|b"]` → may break (pipe is graph syntax) | `A["a or b"]` |
|
|
58
|
+
|
|
59
|
+
### Mindmap Rules
|
|
60
|
+
|
|
61
|
+
| Rule | ❌ Breaks | ✅ Correct |
|
|
62
|
+
|---|---|---|
|
|
63
|
+
| No special chars in node text | `→`, `-`, `:`, `&`, `"` → **PARSE ERROR** | Use commas, spaces, `and` |
|
|
64
|
+
| No parentheses in nodes | `root((Topic (2026)))` → may break | `root((Topic 2026))` |
|
|
65
|
+
| No colons in nodes | `Key: Finding` → **PARSE ERROR** | `Key Finding` or `Key, Finding` |
|
|
66
|
+
| No ampersands | `R&D` → breaks | `R and D` |
|
|
67
|
+
|
|
68
|
+
### General Mermaid Rules (All Diagram Types)
|
|
69
|
+
|
|
70
|
+
| Rule | Why |
|
|
71
|
+
|---|---|
|
|
72
|
+
| Always close code fences with ` ``` ` on its own line | Unclosed fences break the entire page |
|
|
73
|
+
| Use `autonumber` as first line in sequence diagrams | Adds step numbers for accessibility and reference |
|
|
74
|
+
| Keep participant aliases short (2-3 chars) | `participant SK as Stakeholder` not `participant StakeholderWithLongName as Stakeholder` |
|
|
75
|
+
| Test in Obsidian before declaring pipeline complete | Mermaid version differences across Obsidian/validate |
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Accessibility — Color Contrast (WCAG AA)
|
|
80
|
+
|
|
81
|
+
### Approved Color Palette
|
|
82
|
+
|
|
83
|
+
All colors meet WCAG AA contrast ratio (≥ 4.5:1) with white text (`color:#fff`):
|
|
84
|
+
|
|
85
|
+
| Color | Hex | Use Case | Contrast vs White |
|
|
86
|
+
|---|---|---|---|
|
|
87
|
+
| Blue | `#4a90d9` | Entry/starting nodes, first phase | 4.57:1 ✅ |
|
|
88
|
+
| Orange | `#e67e22` | Process/skill activation | 4.80:1 ✅ |
|
|
89
|
+
| Green | `#27ae60` | Positive/feasible outcomes | 4.51:1 ✅ |
|
|
90
|
+
| Light Green | `#2ecc71` | Success confirmation | 3.27:1 ⚠️ (use only for large nodes) |
|
|
91
|
+
| Red | `#e74c3c` | Warnings, blocks, hard walls | 5.02:1 ✅ |
|
|
92
|
+
| Purple | `#9b59b6` | Analysis/output phases | 4.04:1 ⚠️ (borderline — use sparingly) |
|
|
93
|
+
| Dark Blue | `#2c3e50` | Terminal/done nodes | 13.84:1 ✅ |
|
|
94
|
+
| Amber | `#f39c12` | Conditional/warning outcomes | 4.07:1 ⚠️ (borderline) |
|
|
95
|
+
| Gray | `#95a5a6` | Passive participants (codebase, files) | 2.63:1 ❌ (use `#7f8c8d` instead, 4.31:1) |
|
|
96
|
+
|
|
97
|
+
### Where Colors Apply
|
|
98
|
+
|
|
99
|
+
- **Flowcharts:** Use `style` directives freely. Always pair `fill` with `color:#fff`.
|
|
100
|
+
- **Sequence diagrams:** CANNOT use `style`. Colors are NOT applicable — rely on clear participant naming and `autonumber` instead.
|
|
101
|
+
- **Mindmaps:** CANNOT use `style`. Use node text clarity for differentiation.
|
|
102
|
+
|
|
103
|
+
### Approved Pattern (Flowchart Only)
|
|
104
|
+
|
|
105
|
+
```mermaid
|
|
106
|
+
flowchart TD
|
|
107
|
+
A["Start"] --> B["Process"]
|
|
108
|
+
B --> C["Decision"]
|
|
109
|
+
C -->|Yes| D["Done"]
|
|
110
|
+
C -->|No| B
|
|
111
|
+
|
|
112
|
+
style A fill:#4a90d9,color:#fff
|
|
113
|
+
style B fill:#e67e22,color:#fff
|
|
114
|
+
style C fill:#f39c12,color:#fff
|
|
115
|
+
style D fill:#27ae60,color:#fff
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Anti-Patterns
|
|
119
|
+
|
|
120
|
+
- ❌ `style A fill:#ffe066,color:#333` — yellow with dark text looks fine but fails in dark mode Obsidian
|
|
121
|
+
- ❌ `style A fill:#e74c3c` — red fill without specifying `color:#fff` defaults to dark text on red (fails contrast)
|
|
122
|
+
- ❌ Using colors inside sequence diagrams — Mermaid does not support this and will error
|
|
123
|
+
- ❌ Using more than 5-6 distinct colors — creates cognitive overload, not accessibility
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Pre-Save Mermaid Checklist
|
|
128
|
+
|
|
129
|
+
Before saving any Obsidian page, verify each diagram:
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
📋 Mermaid Checklist
|
|
133
|
+
|
|
134
|
+
[ ] 1. Code fence: opens with ```mermaid AND closes with ``` on separate line
|
|
135
|
+
[ ] 2. No `style` directives in sequenceDiagram blocks
|
|
136
|
+
[ ] 3. No `#` characters inside any mermaid block (use spaces or numbers)
|
|
137
|
+
[ ] 4. No raw `>` in message text (use "to" or "→" spelled out)
|
|
138
|
+
[ ] 5. No colons inside sequence message text after the label colon
|
|
139
|
+
[ ] 6. No `&` multi-target in flowchart arrows (use separate arrows)
|
|
140
|
+
[ ] 7. No special chars in mindmap nodes (→, -, :, &, ", parens)
|
|
141
|
+
[ ] 8. All flowchart `style` directives include both `fill` AND `color:#fff`
|
|
142
|
+
[ ] 9. Colors from approved palette only (WCAG AA compliant)
|
|
143
|
+
[ ] 10. Sequence diagrams use `autonumber` as first line
|
|
144
|
+
[ ] 11. At least 1 mindmap present (MANDATORY for all pages)
|
|
145
|
+
[ ] 12. Sequence diagram ONLY if actors with message flows exist
|
|
146
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Common Errors and Fixes
|
|
152
|
+
|
|
153
|
+
| Error Message | Likely Cause | Fix |
|
|
154
|
+
|---|---|---|
|
|
155
|
+
| `Parse error... Expecting 'NEWLINE'` | `style` inside sequenceDiagram | Remove all `style` lines from sequence blocks |
|
|
156
|
+
| `Parse error... got 'INVALID'` | Special char (`#`, `>`, `:`) in message text | Replace with plain text equivalent |
|
|
157
|
+
| Diagram shows as empty rectangle | Unclosed code fence | Ensure ` ``` ` on its own line closes the block |
|
|
158
|
+
| Node text disappears | `#` or `|` inside `["..."]` label | Remove `#`, replace `|` with `or` |
|
|
159
|
+
| Mindmap shows broken layout | Special chars in node text | Use only letters, numbers, commas, spaces |
|
|
160
|
+
| Flowchart arrows missing | `&` multi-target syntax | Use separate arrow lines for each target |
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# Tasks.json Template — The Machine Twin Contract
|
|
2
|
+
|
|
3
|
+
Binding template for the `Tasks.json` file that ships beside every `Tasks.md`. The orchestration registration flow (`POST /api/orchestration/features`) maps these keys one-to-one into SQLite rows. If the JSON is missing, malformed, or contradicts the Markdown, **registration fails loudly at the door** — it never inserts half a feature.
|
|
4
|
+
|
|
5
|
+
This file is the single source of truth for the JSON shape. When the orchestration schema changes, this file changes with it.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## The Shape
|
|
10
|
+
|
|
11
|
+
```json
|
|
12
|
+
{
|
|
13
|
+
"$schema": "openclaw-insight/tasks-twin/v1",
|
|
14
|
+
"featureName": "Orchestration Zoom Artifact Fix",
|
|
15
|
+
"featureSlug": "orchestration-zoom-artifact-fix",
|
|
16
|
+
"specPath": "dev/specs/2026-08-15 - Orchestration Zoom Artifact Fix",
|
|
17
|
+
"waves": [
|
|
18
|
+
{
|
|
19
|
+
"waveNumber": 1,
|
|
20
|
+
"name": "Geometry Fix + Unit Tests",
|
|
21
|
+
"tasks": [
|
|
22
|
+
{
|
|
23
|
+
"taskNumber": "1.1",
|
|
24
|
+
"title": "PanelsContainer viewport wrapper",
|
|
25
|
+
"description": "Wrap the .columns div in a .panels-viewport div...",
|
|
26
|
+
"assignedAgent": "app-dev",
|
|
27
|
+
"filesInvolved": ["src/lib/components/orchestration/PanelsContainer.svelte"],
|
|
28
|
+
"dependsOn": null
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"taskNumber": "1.1-T",
|
|
32
|
+
"title": "Unit tests (PAIRED with 1.1)",
|
|
33
|
+
"description": "Host-pattern tests for the viewport wrapper...",
|
|
34
|
+
"assignedAgent": "app-dev",
|
|
35
|
+
"filesInvolved": ["tests/lib/components/orchestration/panels-container.test.ts"],
|
|
36
|
+
"dependsOn": "1.1"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Field Rules
|
|
45
|
+
|
|
46
|
+
| Field | Type | Rule |
|
|
47
|
+
|---|---|---|
|
|
48
|
+
| `$schema` | string | **Required.** Literal `openclaw-insight/tasks-twin/v1` |
|
|
49
|
+
| `featureName` | string | **Required.** Display name |
|
|
50
|
+
| `featureSlug` | string | **Required.** Lowercase-hyphen ID. MUST equal the slug derived from the folder name (strip date prefix, lowercase, collapse spaces/hyphens, strip non-alphanumeric, trim hyphens — `deriveFeatureSlug`) |
|
|
51
|
+
| `specPath` | string | **Required.** The spec folder path used at registration |
|
|
52
|
+
| `waves[]` | array | **Required, at least 1 entry**, ordered by `waveNumber` |
|
|
53
|
+
| `waves[].waveNumber` | integer | **Required.** Sequential from 1 |
|
|
54
|
+
| `waves[].name` | string | **Required.** Human wave title |
|
|
55
|
+
| `waves[].tasks[]` | array | **Required, at least 1 task per wave** — an empty wave is a spec bug |
|
|
56
|
+
| `tasks[].taskNumber` | string | **Required.** Unique within the feature. Digits, dots, optional `-T` or letter suffix (`1.1`, `1.1-T`, `1.2a`) |
|
|
57
|
+
| `tasks[].title` | string | **Required.** Non-empty |
|
|
58
|
+
| `tasks[].description` | string | **Required.** Trimmed task body (Markdown allowed) |
|
|
59
|
+
| `tasks[].assignedAgent` | string | Optional, default `app-dev`. Agent ID the start endpoint builds the session key for |
|
|
60
|
+
| `tasks[].filesInvolved` | array of string or null | Optional. File paths touched by the task |
|
|
61
|
+
| `tasks[].dependsOn` | string or null | Optional. A `taskNumber` in the same feature — never a wave-scoped ID |
|
|
62
|
+
|
|
63
|
+
**Meta properties are forbidden.** No `phase`, `status`, `priority`, `notes`, or any other key. Status and runtime columns are owned by the database after insertion — spec files describe intent, the DB owns state.
|
|
64
|
+
|
|
65
|
+
## JSON → SQLite Field Map
|
|
66
|
+
|
|
67
|
+
Registration is a key-for-key copy. Nothing is inferred, guessed, or re-derived from prose.
|
|
68
|
+
|
|
69
|
+
| Tasks.json key | SQLite column | Table |
|
|
70
|
+
|---|---|---|
|
|
71
|
+
| `featureSlug` | `id` | `features` |
|
|
72
|
+
| `featureName` | `name` | `features` |
|
|
73
|
+
| `specPath` | `spec_path` | `features` |
|
|
74
|
+
| — (insert literal) | `status` = `'ready'` | `features` |
|
|
75
|
+
| `waves[].waveNumber` | `wave_number` | `waves` |
|
|
76
|
+
| `waves[].name` | `name` | `waves` |
|
|
77
|
+
| — (insert literal) | `status` = `'ready'` | `waves` |
|
|
78
|
+
| `tasks[].taskNumber` | `task_number` | `tasks` |
|
|
79
|
+
| `tasks[].title` | `title` | `tasks` |
|
|
80
|
+
| `tasks[].description` | `description` | `tasks` |
|
|
81
|
+
| `tasks[].assignedAgent` | `assigned_agent` | `tasks` |
|
|
82
|
+
| `tasks[].filesInvolved` | `files_involved` (joined with `,`) | `tasks` |
|
|
83
|
+
| `tasks[].dependsOn` | `depends_on` | `tasks` |
|
|
84
|
+
| — (insert literal) | `status` = `'ready'` | `tasks` |
|
|
85
|
+
|
|
86
|
+
Composite IDs are built by the endpoint, not the spec: feature `id`, wave `{featureId}:w{n}`, task `{featureId}:w{n}:t{number with . and - replaced by _}`.
|
|
87
|
+
|
|
88
|
+
## Validation at the Door
|
|
89
|
+
|
|
90
|
+
| Constraint | Rejection |
|
|
91
|
+
|---|---|
|
|
92
|
+
| `$schema` missing or unknown | 400 |
|
|
93
|
+
| Zero waves | 400 |
|
|
94
|
+
| Any wave with zero tasks | 400 |
|
|
95
|
+
| Zero tasks across the whole spec | 400 |
|
|
96
|
+
| Duplicate `taskNumber` within feature | 400 |
|
|
97
|
+
| `dependsOn` pointing at a missing `taskNumber` | 400 |
|
|
98
|
+
| `featureSlug` differs from folder-name slug | 400 |
|
|
99
|
+
| Feature slug already registered | 409 |
|
|
100
|
+
|
|
101
|
+
## Registration Flow
|
|
102
|
+
|
|
103
|
+
```mermaid
|
|
104
|
+
flowchart TD
|
|
105
|
+
A["POST /features<br/>with folderPath"] --> B{"Tasks.json<br/>present?"}
|
|
106
|
+
B -->|No| X1["400 — machine twin missing"]
|
|
107
|
+
B -->|Yes| C{"$schema is<br/>tasks-twin/v1?"}
|
|
108
|
+
C -->|No| X2["400 — unknown schema"]
|
|
109
|
+
C -->|Yes| D["Validate field rules<br/>waves, tasks, slug, deps"]
|
|
110
|
+
D -->|fail| X3["400 — with rule name"]
|
|
111
|
+
D -->|pass| E["Insert feature row<br/>keys map 1 to 1"]
|
|
112
|
+
E --> F["Insert wave rows"]
|
|
113
|
+
F --> G["Insert task rows<br/>dependsOn resolved"]
|
|
114
|
+
G --> H["201 — counts plus feature id"]
|
|
115
|
+
|
|
116
|
+
style A fill:#4a90d9,color:#fff
|
|
117
|
+
style H fill:#27ae60,color:#fff
|
|
118
|
+
style X1 fill:#e74c3c,color:#fff
|
|
119
|
+
style X2 fill:#e74c3c,color:#fff
|
|
120
|
+
style X3 fill:#e74c3c,color:#fff
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Why the slug MUST match the folder name
|
|
124
|
+
|
|
125
|
+
The registration identity is **the folder name**, and the feature slug is derived from it (`deriveFeatureSlug`). If `Tasks.json.featureSlug` disagrees with the folder-derived slug, the same spec would register under two identities (and one would never be re-registrable). Registration rejects the mismatch with 400 — one folder, one identity.
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "dsi-task"
|
|
3
|
+
description: "Execute implementation tasks from a Karpathy context file and tasks document. Applies Visible Checklist Pattern, Playwright regression gates, and sub-agent comp"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Task Executor
|
|
7
|
+
|
|
8
|
+
Execute implementation tasks defined in a Karpathy context + tasks document.
|
|
9
|
+
|
|
10
|
+
## SYSTEM PROTOCOL: STRUCTURED IMPLEMENTATION & LAYERING
|
|
11
|
+
|
|
12
|
+
You must treat code generation as a spatial and structural architecture task, not just functional text completion. Your code layout must mirror the logical boundaries defined in the system design/sequence diagrams:
|
|
13
|
+
|
|
14
|
+
### 1. DIRECTORY SANCTITY & ENCAPSULATION
|
|
15
|
+
- Every domain or feature subset must reside within its own completely isolated directory.
|
|
16
|
+
- Cross-module code bleeding is strictly prohibited. All module-specific state and logic must remain local to that module's folder.
|
|
17
|
+
- Before creating any file, verify its target directory exists and aligns with the Module Map from the PRD.
|
|
18
|
+
|
|
19
|
+
### 2. DECOUPLED COMMUNICATION MECHANISM
|
|
20
|
+
- You are forbidden from hardcoding direct dependencies or side-effects between feature modules.
|
|
21
|
+
- Execution orchestration must follow the project's communication pattern (event bus, pub/sub, middleware chain, dependency injection, message passing, etc.). Modules requiring observation or intervention must use the defined communication layer, not direct imports.
|
|
22
|
+
- Document how each module connects to the system: what it receives, what it produces, and through which channel.
|
|
23
|
+
|
|
24
|
+
### 3. ARCHITECTURAL DRY PRINCIPLE
|
|
25
|
+
- Before implementing any utility logic (e.g., file checks, payload validation, format verifiers), check the global Shared Layer.
|
|
26
|
+
- You must import shared utilities from the central shared directory rather than re-creating localized or redundant helper functions inside individual modules.
|
|
27
|
+
|
|
28
|
+
### Enforcement Rules
|
|
29
|
+
- Before writing code for any wave, verify the PRD's Module Map against the physical filesystem (`find | sort`)
|
|
30
|
+
- Every new file must be created in its designated module directory — never in the root or another module's folder
|
|
31
|
+
- Shared utilities must be placed in the designated shared directory and imported via relative paths — never duplicated
|
|
32
|
+
- After each wave, run a "cross-module bleed check": verify no module imports from another module's directory
|
|
33
|
+
- Module wiring (how modules connect to each other) must happen at the defined integration point — not scattered across module internals
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## When to Use
|
|
38
|
+
|
|
39
|
+
- User says `/execute-tasks {project-path}` — execute with project root (auto-discovers docs)
|
|
40
|
+
- User says "execute the WebSocket tasks" or "implement the tasks from the Karpathy-context"
|
|
41
|
+
- User provides a `{*} karpathy-context.md` file and asks to start implementation
|
|
42
|
+
|
|
43
|
+
### Step 0: No Params — Usage Guide
|
|
44
|
+
|
|
45
|
+
When the user sends `/execute-tasks` with no arguments:
|
|
46
|
+
|
|
47
|
+
1. Ask for the two required paths:
|
|
48
|
+
- **Karpathy context** — path to the karpathy-context file (auto-discovered from project path)
|
|
49
|
+
- **Tasks document** — path to the tasks document (local file under project dev/)
|
|
50
|
+
2. Reply with a usage guide — NOT execution
|
|
51
|
+
|
|
52
|
+
**Response format:**
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
📋 **Task Executor** — No paths specified. I need two things:
|
|
56
|
+
|
|
57
|
+
1. **Project path** — the codebase root (where dev/specs/ lives)
|
|
58
|
+
Example: `~/openclaw-insight`
|
|
59
|
+
|
|
60
|
+
2. **Tasks document** — the implementation tasks (auto-resolved from project path)
|
|
61
|
+
Example: `openclaw-insight/dev/specs/WebSocket Real-Time/Tasks.md`
|
|
62
|
+
|
|
63
|
+
Usage: `/execute-tasks {project-path}`
|
|
64
|
+
|
|
65
|
+
Or just paste the project path and I'll find the latest tasks document.
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Rules:**
|
|
69
|
+
- If project path is provided, auto-discover feature folder: `{project-path}/dev/specs/*/`
|
|
70
|
+
- If multiple feature folders exist, ask which one to execute
|
|
71
|
+
- If a karpathy-context file exists in `{project-path}/dev/specs/{feature}/`, load it automatically
|
|
72
|
+
- If no Karpathy context found, ask if the user wants to proceed without it
|
|
73
|
+
- If a path doesn't exist, say so and ask for the correct one
|
|
74
|
+
- Do NOT proceed to Step 1 (Load Context) until paths are confirmed
|
|
75
|
+
|
|
76
|
+
## Core Principle: Context Loading, Not Memorization
|
|
77
|
+
|
|
78
|
+
This skill is intentionally SHORT. It references external documents instead of copying rules inline. This prevents attention degradation — the model loads only what it needs, when it needs it.
|
|
79
|
+
<!-- RCA: AI-Research/YT-Research/2026-06-22 - Why Long Instructions Make AI Dumber - Attention Degradation Science.md -->
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Step 1: Load Context — MANDATORY
|
|
84
|
+
|
|
85
|
+
Before any execution, load exactly these files:
|
|
86
|
+
|
|
87
|
+
1. **Karpathy context** — `{project-path}/dev/specs/{feature}/karpathy-context.md` (auto-discovered)
|
|
88
|
+
2. **Tasks document** — `{project-path}/dev/specs/{feature}/Tasks.md` (auto-discovered)
|
|
89
|
+
3. **Visible Checklist Pattern** — `ai-research/references/visible-checklist-pattern.md` (loaded on demand)
|
|
90
|
+
4. **Sub-Agent Completion Rules** — `TOOLS.md` lines 85-115
|
|
91
|
+
|
|
92
|
+
Read these files at the start. Do NOT carry them from previous conversation context — reload fresh.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Step 1.5: Date Resolution ⛔ MANDATORY
|
|
97
|
+
|
|
98
|
+
Before constructing any date-prefixed filenames during execution, resolve today's date via `date +%Y-%m-%d`. Store as `TODAY`. Do not carry the date from the feature-spec session — it may be a different day.
|
|
99
|
+
<!-- RCA: AI-Research/Troubleshooting/2026-06-18 - Wrong Date Prefix in yt-research Filename - RCA.md -->
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Step 2: Declare Execution Checklist — MANDATORY
|
|
104
|
+
|
|
105
|
+
Output a checklist of ALL tasks for the current wave, INCLUDING the behavioral commitments. The user MUST see every rule I'm committing to follow.
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
📋 Execution: {project-name} — {wave name}
|
|
109
|
+
|
|
110
|
+
[ ] 1.5 ⛔ Resolve today's date via `date +%Y-%m-%d` (store as TODAY)
|
|
111
|
+
[ ] 2.1 {task 1 name}
|
|
112
|
+
[ ] 2.2 {task 2 name}
|
|
113
|
+
[ ] 2.3 {task 3 name}
|
|
114
|
+
|
|
115
|
+
⛔ Behavioral Commitments (user can verify):
|
|
116
|
+
[ ] I will NOT execute multiple waves without your confirmation
|
|
117
|
+
[ ] I will NOT skip Playwright regression gate
|
|
118
|
+
[ ] I will NOT rely on completion events as ground truth
|
|
119
|
+
[ ] I will NOT post NO_REPLY after spawning sub-agents
|
|
120
|
+
[ ] I will NOT self-certify completion without running verify commands
|
|
121
|
+
[ ] I will NOT reload this skill + all referenced docs simultaneously
|
|
122
|
+
[ ] I will NOT bleed code across module boundaries
|
|
123
|
+
[ ] I will NOT duplicate shared utilities in module directories
|
|
124
|
+
[ ] I will run unit tests after EACH code-writing task (not batched at end)
|
|
125
|
+
[ ] I will re-output this checklist after each task completes
|
|
126
|
+
|
|
127
|
+
⛔ Sub-Agent Safety (conditional — ⊘ skip if no sub-agents spawned):
|
|
128
|
+
[⊘] Check ALL children via subagents list — not just one
|
|
129
|
+
[⊘] Disk files = ground truth, events = convenience
|
|
130
|
+
[⊘] Post ACK to user before other work
|
|
131
|
+
|
|
132
|
+
⛔ Completion Gate:
|
|
133
|
+
[ ] All task files exist on disk (verified via find)
|
|
134
|
+
[ ] Directory structure matches PRD Module Map (verified via find | sort)
|
|
135
|
+
[ ] No cross-module import violations (verified via grep)
|
|
136
|
+
[ ] Unit tests pass (npx node --test or npm test) — MANDATORY, not optional
|
|
137
|
+
[ ] Type-check zero new errors: if `npm run check` exits non-zero from pre-existing errors, grep output for this wave's exact new file paths — 0 hits satisfies the gate ONLY when the error count also matches the wave-start check counts. When the wave adds or changes a field on a shared type (interface/type alias), pre-existing object-literal fixtures typed as that interface break in files outside the wave list: the wave-file grep returns 0 hits while the count rises, so adjudicate every count delta by listing diagnostics per file (`--output machine`); errors naming the changed type are this wave's lockstep obligation — extend the fixture in-wave; prove the rest pre-existing via `git log --oneline -- <file>` (last-touch commit predates the wave) plus empty `git diff --stat HEAD -- <file>`. The same git-log proof settles a hit in a different file sharing a name substring; fall back to `git stash` → re-run check → confirm same hit on clean baseline → `git stash pop` only when history is ambiguous. Never judge by raw error-count deltas against a `git stash -u` baseline: `-u` also stashes new untracked test files, and the fix itself may resolve pre-existing errors — current < baseline is normal and proves nothing. A stash baseline only adjudicates files tracked in both states: plain `git stash` leaves this wave's untracked new files in the worktree, so they compile against the reverted tracked code and the baseline sprouts phantom errors in this wave's own files (e.g. missing-export errors the stash itself created) — classify those baseline hits as stash artifacts and settle them by grepping the intact worktree instead
|
|
138
|
+
<!-- RCA: 2026-08-16 openclaw-insight ControlRail Wave 1 — adding required `deleted_at` to the shared Feature interface broke the untouched wave-prompt.test.ts fixture; wave-file grep said 0 hits while 26e→27e. Delta adjudication via machine diagnostics fixed the lockstep fixture in-wave; git-log + empty-diff proved the sibling sessionKey/TaskData errors pre-existing. -->
|
|
139
|
+
[ ] Playwright regression: zero failures vs baseline ⊘ (skip if no Playwright)
|
|
140
|
+
[ ] User acknowledged completion
|
|
141
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Check off each item as it completes: `[✅]` done, `[🔄]` current, `[ ]` remaining.
|
|
145
|
+
|
|
146
|
+
### Check-Off Rules
|
|
147
|
+
|
|
148
|
+
- **After each task completes within a wave**, re-output the full wave checklist with updated statuses
|
|
149
|
+
- **At wave completion**, output the final checklist: ALL `[✅]`, any `[❌]` for failures, any `[⊘]` for skipped conditionals
|
|
150
|
+
- **Do NOT deliver without showing the final checklist**
|
|
151
|
+
<!-- RCA: AI-Research/LLMs Skip Mandatory Steps/001. LLMs Skip Mandatory Steps/002.The Visible checklist Pattern/2026-06-11 - The Visible Checklist Pattern - AI Research v1 - report.md -->
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Step 3: Execute Tasks Sequentially
|
|
156
|
+
|
|
157
|
+
- Execute one task at a time within the current wave
|
|
158
|
+
- Do NOT skip tasks or reorder
|
|
159
|
+
- After each task: verify deliverables exist on disk (`ls`, `find`)
|
|
160
|
+
- **After each code-writing task: run unit tests for the affected module** (`npx node --test dist/{module}/`). Do NOT proceed to the next task if tests fail.
|
|
161
|
+
- If a task spawns a sub-agent: follow Step 4 (Sub-Agent Safety)
|
|
162
|
+
|
|
163
|
+
### Step 3.5: Acceptance Scenarios Are the Contract ⛔
|
|
164
|
+
|
|
165
|
+
When verification disagrees with user-stated acceptance scenarios:
|
|
166
|
+
|
|
167
|
+
1. Treat the scenarios as the contract. Fix the implementation to satisfy them — never rewrite, loop, or weaken the test to match observed behavior.
|
|
168
|
+
2. Follow the promised verification order: fix → headed run of the user's scenarios verbatim (one user action per assertion) → only then unit tests.
|
|
169
|
+
3. When a simulated-DOM unit test (happy-dom/jsdom) fails while the headed real-browser run passes, trust the headed run and fix the harness — poll microtask-driven state with `vi.waitFor` instead of fixed sleeps.
|
|
170
|
+
4. This binds user scenarios only — not edge-case assertions you authored from an assumption. When your own new test fails, verify the assumption against documented platform semantics; a false assumption means correct the assertion, not working code (e.g. Node `basename('dev/specs/')` → `'specs'` — trailing slash stripped, so a "basename empty → fallback" branch never fires for it).
|
|
171
|
+
<!-- RCA: 2026-08-16 openclaw-insight wave-prompt — fallback test expected the feature id for a trailing-slash spec path; basename semantics proved the assertion wrong; test corrected, implementation untouched, 17/17 green -->
|
|
172
|
+
|
|
173
|
+
Criterion: every user scenario is asserted verbatim and passes, with no assertion softened to make a run green.
|
|
174
|
+
<!-- RCA: 2026-08-13 openclaw-insight ghost-Backspace — headed test was softened (BS retry loops) to match buggy native-selection deletion; user rejected; keydown-intercept fix + verbatim-scenario headed run passed -->
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
### Step 3.6: Expected-Fail Sanity Proofs ⛔
|
|
180
|
+
|
|
181
|
+
When a wave plans "old bug-spec must FAIL as proof of fix":
|
|
182
|
+
|
|
183
|
+
1. Run it; if it unexpectedly PASSES, treat that as evidence the spec discriminates nothing — inspect what its assertions measure before drawing any conclusion.
|
|
184
|
+
2. Symptom assertions anchored to the wrong reference (viewport/window instead of the fixed element's own container) pass both pre- and post-fix.
|
|
185
|
+
3. Prove the fix with a reference-relative probe: assert the fixed element's rect against its wrapper rect within ±1px, plus a pixel scan of the artifact region; capture the evidence, then delete the probe spec.
|
|
186
|
+
4. Scrollable wrapper: compare bottom/right edges against `clientHeight`/`clientWidth` — a rendered scrollbar occupies the bounding-rect edge, so a naive rect comparison reports a false gap (scrollbar px = rect height − clientHeight).
|
|
187
|
+
|
|
188
|
+
Criterion: fix proven by reference-relative geometry (e.g. gap 301.3px → 0.01px), independent of the old spec's pass/fail; wrapper gaps measured client-relative (scrollbar not counted as gap).
|
|
189
|
+
<!-- RCA: 2026-08-16 openclaw-insight zoom-artifact Wave 1 — old visual spec passed pre- AND post-fix because it asserted last-panel edge vs viewport; wrapper-relative probe proved the wrapper fix. Wave 2 — wrapperRect.bottom − childRect.bottom reported a false 15px gap: the h-scrollbar occupied the rect bottom while .columns exactly filled clientHeight -->
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
### Step 3.7: Deletion-Only Tasks — Zero-Reference Verification
|
|
195
|
+
|
|
196
|
+
When a task deletes a file and its paired verification is "grep returns zero references":
|
|
197
|
+
|
|
198
|
+
1. Confirm the deletion at three levels: absent from worktree (`ls`), untracked (`git ls-files <path>` empty), recorded in history (`git log --oneline --diff-filter=D -- <path>`).
|
|
199
|
+
2. If the deletion already exists in a prior commit, verify and report — do not redo it.
|
|
200
|
+
3. Run the prescribed grep over the full worktree, then classify every hit:
|
|
201
|
+
- code/config references (src, tests, configs, scripts) — the only hits that fail the gate
|
|
202
|
+
- spec-folder and ADR docs recording the retirement decision — intentional audit trail, keep
|
|
203
|
+
- gitignored runtime logs — not repo content
|
|
204
|
+
4. Keep the audit-trail doc hits: the gate is zero code references, not a literal zero; scrubbing the spec's own record falsifies history.
|
|
205
|
+
5. Before concluding, confirm similarly-named sibling files are unrelated, not misnamed leftovers.
|
|
206
|
+
|
|
207
|
+
Criterion: filtered grep (docs + ignored dirs excluded) returns zero hits, with the hit classification stated in the task summary.
|
|
208
|
+
<!-- RCA: 2026-08-16 openclaw-insight zoom-artifact Task 2.2-T — grep for deleted zz-zoom-artifact-headed.spec.ts returned 16 hits: ADR retirement table + spec-folder audit trail + gitignored logs/; zero-code-reference criterion satisfied without touching the retirement record, and zz-backspace-headed.spec.ts confirmed unrelated -->
|
|
209
|
+
|
|
210
|
+
### Step 3.8: New E2E Specs — Assert the Component's Real DOM Contract
|
|
211
|
+
|
|
212
|
+
When a wave adds a Playwright spec against existing UI:
|
|
213
|
+
|
|
214
|
+
1. Read the target component source BEFORE writing selectors. Svelte classnames are hash-suffixed or absent; icon-only badges carry status only in `aria-label`. Select via `role`/`aria-label`/testid found in the source, never guessed classes.
|
|
215
|
+
2. On a red run, read `test-results/<spec>/error-context.md` FIRST — its page snapshot shows the actual rendered tree and reveals state such as a collapsed accordion hiding the badges you assert on; expand each nesting level (feature card, then wave toggle) before asserting inside it.
|
|
216
|
+
3. When a setup step fails on pointer interception and its UI is already covered by a sibling spec, drive the mocked API directly (`page.evaluate(() => fetch(...))`) — the setup is a means, not the subject.
|
|
217
|
+
|
|
218
|
+
Criterion: every selector is verified present in component source, and red runs are diagnosed from the error-context snapshot before the assertion is touched.
|
|
219
|
+
<!-- RCA: 2026-08-16 openclaw-insight wave-dispatch e2e — three red runs, all test-side: guessed `.task-completed` classes (StatusBadge is icon-only; real contract `[role="status"][aria-label="Completed"]`), register-popover click intercepted by panels-viewport (moved to mocked API; popover covered by orchestration-register.spec.ts), collapsed wave accordion hid task badges (added wave-toggle click). No production change, no softened assertions; 3 consecutive green runs after. -->
|
|
220
|
+
|
|
221
|
+
### Step 3.9: Tagged Playwright Invocations — Prove Non-Empty Selection
|
|
222
|
+
|
|
223
|
+
When a gate or spec pins a tag-filtered run (`--grep @tag`):
|
|
224
|
+
|
|
225
|
+
1. Read the active config for a static `grep:` first — Playwright ANDs config grep with CLI `--grep`, and a static entry cannot be overridden from the CLI. An exclusion grep in config plus a tag grep on CLI silently selects ZERO tests: exit 0, green gate, nothing ran.
|
|
226
|
+
2. Before trusting a tagged green run, read the reporter's collected/passed count and confirm it matches the expected suite size. Zero collected = false green.
|
|
227
|
+
3. To diagnose emptiness, race an untagged control file against the tagged file under the same invocation: control collects while the tagged file never collects under `--grep`, `--grep-invert`, or path+grep ⇒ the config grep is the blocker.
|
|
228
|
+
4. Fix additively: a sibling config that spreads the base config and clears ONLY `grep` (default-suite composition stays byte-identical), then invoke with `--config`. Record the working invocation in the completion notes as a documented deviation from the spec-pinned form.
|
|
229
|
+
5. When the fix un-buries suites that have never run, classify every failure stale vs regression before judging the gate: `git log -1 -- <file>` predating the subject plus assertions naming removed UI ⇒ stale; document for owner adjudication and do not rewrite or delete foreign suites in-wave.
|
|
230
|
+
|
|
231
|
+
Criterion: the tagged invocation reports the expected collected count, and every failure in a newly reachable suite is classified with git-log evidence.
|
|
232
|
+
<!-- RCA: 2026-08-17 openclaw-insight Control Room Recovery W5 — the spec-pinned `--grep @orchestration` had selected zero tests ever since the base config gained its exclusion grep; a sibling config (spread base, clear only grep) un-buried the recovery spec (5/5 green) plus a 2026-08-08 suite asserting the removed pre-redesign page — stale, documented, not rewritten. -->
|
|
233
|
+
|
|
234
|
+
## Step 4: Sub-Agent Safety — When Spawning Children
|
|
235
|
+
|
|
236
|
+
Only fires when a task requires spawning a sub-agent. If no sub-agents are spawned, mark `[⊘]` in the checklist and skip this step.
|
|
237
|
+
|
|
238
|
+
```
|
|
239
|
+
📋 Sub-Agent Safety
|
|
240
|
+
|
|
241
|
+
[ ] 4.1 Spawn sub-agent with explicit model + taskName
|
|
242
|
+
[ ] 4.2 Continue independent work on main session
|
|
243
|
+
[ ] 4.3 On completion: verify output file on disk (find | wc -l)
|
|
244
|
+
[ ] 4.4 Post ACK to user before starting next task
|
|
245
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### Step 4.5: 2-Minute Ledger Gate ⚠️ MANDATORY
|
|
249
|
+
|
|
250
|
+
If 2 minutes pass after spawning a sub-agent without any completion event or user message, fire `subagents(action="list")` proactively — do not silently wait.
|
|
251
|
+
<!-- RCA: AI-Research/Troubleshooting/Agentic Pipeline/2026-06-22 - Missing Sub-Agent Completion Event for Gemini but Not Perplexity - RCA 1.md -->
|
|
252
|
+
|
|
253
|
+
**The rule:**
|
|
254
|
+
1. After spawning, note the spawn timestamp
|
|
255
|
+
2. If 2 minutes pass without a completion event: fire `subagents(action="list")` immediately
|
|
256
|
+
3. Check ALL expected children — not just one
|
|
257
|
+
4. For any child showing "done": verify output file on disk (find | wc -l)
|
|
258
|
+
5. For any child still "running" past 5 minutes: flag as potentially stuck
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
## Step 5: Wave Completion Gate — MANDATORY
|
|
263
|
+
|
|
264
|
+
Before declaring a wave complete, output the final checklist with ALL items checked.
|
|
265
|
+
|
|
266
|
+
If any `[ ]` remains: fix it, do NOT proceed to next wave.
|
|
267
|
+
|
|
268
|
+
If Playwright tests are part of the wave: run `npx playwright test --reporter=list` and show results.
|
|
269
|
+
<!-- RCA: AI-Research/Troubleshooting/2026-06-11 - ADDITIONAL_PAGES Three Generations Same Bug - RCA.md -->
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
## Step 6: Save Completion Artifacts
|
|
274
|
+
|
|
275
|
+
Save completion notes to the same project docs folder. Use the resolved `TODAY` date from Step 1.5.
|
|
276
|
+
|
|
277
|
+
Path: `{project-path}/dev/specs/{feature}/{TODAY} - {Wave Name} - Completion Notes.md`
|
|
278
|
+
|
|
279
|
+
Include: tasks completed, files modified, test results, blockers encountered.
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
## Step 7: Ask Before Next Wave
|
|
284
|
+
|
|
285
|
+
After completing a wave, ask the user before proceeding to the next wave.
|
|
286
|
+
|
|
287
|
+
"✅ {Wave N} complete. Ready to start {Wave N+1}? Tasks: {brief list}"
|
package/README.md
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
# DeepSeek Insight
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
- `DSH web` shows you a conversation.
|
|
4
|
+
- [DeepSeek Insight](https://gitlab.com/wharsojo.dev/deepseek-insight) (DSI) shows you the **whole floor**
|
|
5
|
+
|
|
6
|
+
> `DSI` as a `Control room` built on your harness's own records: every session, past and running, side by side on one page; lineage tree of sub-agents pinned under the parent that spawned them; every tool call with its pass/fail receipt; history you can search; prompts worth keeping filed for reuse. It speaks the same wire as the `DSH` you already run — nothing new to configure.
|
|
4
7
|
|
|
5
8
|
## Run
|
|
6
9
|
|
|
@@ -12,10 +15,10 @@ The whole DX loop lives in the home page: pick a preset + workspace, press **+ N
|
|
|
12
15
|
Everything on the page is **real harness activity**, not a mock — every chip, diff, and reply is read straight from the running harness.
|
|
13
16
|
|
|
14
17
|
- **Conversation, with receipts.** Each tool the agent runs shows as a chip that passes or fails, with its duration and its receipt; open it to see exactly what ran. Reasoning folds away until you want it, and long sessions load older turns as you scroll up.
|
|
15
|
-
- **One-click approvals.** When the agent asks permission — run this command, edit that file — an approval card appears in the flow; answer it right there, no tab-switching.
|
|
16
18
|
- **The workspace explorer, with git diff.** A side panel shows the files your agent is touching. Changed files are flagged and pulsing while the agent works; click one and you get a **real git diff** — additions in green, removals in red — rendered from the file's live buffer, so it updates as the agent edits and refreshes if you (or anything else) change the file underneath.
|
|
17
19
|
- **Presets and workspaces.** Start each chat with the right agent for the job — a coder, a researcher, a generalist — pointed at the right folder.
|
|
18
20
|
- **Many conversations, one page.** Conversations live in panels you can open side by side; compare two runs, or keep a scratch chat next to the main one.
|
|
21
|
+
- **A family tree under every chat.** When your agent spawns sub-agents, they appear as their own panels **below the parent that made them** — a ghost-tinted panel that stays put on refresh, so you always know who was working for whom. And when one conversation is worth a second try, **fork it**: one click clones the loaded context into a fresh session that starts exactly where the original stood — same history, new task.
|
|
19
22
|
- **A prompt library that files itself.** Save any bubble into the library and give it short filing words (tags) at save time; filter the prompt manager by tag chips or `+tag` words in the search box, and narrow the suggestion strip with its own tag chips — filters survive a reload. Tune the offered tags in `~/.dsi/settings.yaml` under `prompts.tags`.
|
|
20
23
|
- **Your language.** The interface speaks English, Chinese, and Indonesian.
|
|
21
24
|
|
|
@@ -40,27 +43,6 @@ npx @deepseek-insight/dsi@latest dsh --sync
|
|
|
40
43
|
|
|
41
44
|
When it is up, your browser opens the page by itself (default `http://127.0.0.1:5174`). Run it again later and DSI even cleans up after a lost previous run: `dsi dsh --sync-kills`.
|
|
42
45
|
|
|
43
|
-
### Run from source
|
|
44
|
-
|
|
45
|
-
```sh
|
|
46
|
-
git clone git@gitlab.com:wharsojo.dev/deepseek-insight.git
|
|
47
|
-
cd deepseek-insight
|
|
48
|
-
pnpm install
|
|
49
|
-
pnpm run build
|
|
50
|
-
pnpm dsi dsh --sync
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
Hacking on DSI itself? `pnpm dsi dsh --sync --dev` serves the Vite dev server (hot reload) instead of the build, and the usual gates apply:
|
|
54
|
-
|
|
55
|
-
```sh
|
|
56
|
-
pnpm check # svelte-check, 0 errors
|
|
57
|
-
pnpm test # unit tests (the live wire spike skips cleanly without DSH_LIVE)
|
|
58
|
-
npx playwright test # e2e on a stubbed DSH wire — no harness needed
|
|
59
|
-
DSH_LIVE=1 pnpm run test:live # only with `dsh web` running on :3080
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
The deeper story — architecture decisions (ADRs), wire-protocol guides, and KB notes — lives in [`dev/`](dev).
|
|
63
|
-
|
|
64
46
|
## License
|
|
65
47
|
|
|
66
48
|
[Apache-2.0](LICENSE) — Copyright © 2026 Widi Harsojo
|