kushi-agents 4.9.0 → 5.0.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/README.md +18 -1
- package/package.json +1 -1
- package/plugin/agents/kushi.agent.md +8 -2
- package/plugin/instructions/dashboard-artifact.instructions.md +132 -0
- package/plugin/instructions/entity-graph.instructions.md +160 -0
- package/plugin/instructions/guided-tour.instructions.md +100 -0
- package/plugin/instructions/host-portability.instructions.md +77 -0
- package/plugin/instructions/karpathy-state-layout.instructions.md +124 -0
- package/plugin/plugin.json +17 -6
- package/plugin/prompts/dashboard.prompt.md +29 -0
- package/plugin/prompts/link-entities.prompt.md +30 -0
- package/plugin/prompts/tour.prompt.md +30 -0
- package/plugin/skills/ask-project/SKILL.md +13 -2
- package/plugin/skills/bootstrap-project/SKILL.md +17 -1
- package/plugin/skills/build-state/SKILL.md +42 -3
- package/plugin/skills/dashboard/SKILL.md +113 -0
- package/plugin/skills/link-entities/SKILL.md +216 -0
- package/plugin/skills/link-entities/build-graph.ps1 +483 -0
- package/plugin/skills/refresh-project/SKILL.md +22 -1
- package/plugin/skills/self-check/SKILL.md +5 -0
- package/plugin/skills/self-check/run.ps1 +120 -0
- package/plugin/skills/tour/SKILL.md +68 -0
- package/plugin/skills/tour/build-tour.ps1 +185 -0
- package/plugin/templates/dashboard/dashboard.template.html +431 -0
- package/plugin/templates/dashboard/embedder.ps1 +56 -0
- package/plugin/templates/state/AGENTS.template.md +33 -0
- package/plugin/templates/state/CLAUDE.template.md +33 -0
- package/plugin/templates/state/index.template.md +41 -0
- package/plugin/templates/state/log.template.md +14 -0
- package/plugin/templates/state/page.template.md +22 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
---
|
|
2
|
+
applyTo: "**"
|
|
3
|
+
description: "v5.0.0 — Karpathy-style State/ layout. The State/ folder adopts the convention (index.md + log.md + CLAUDE.md + AGENTS.md + `[[wikilinks]]`) so external wiki tools (Understand-Anything, Obsidian, Foam, GitHub-pages wiki viewers) render it without custom work. Backward-compatible with v4.x State/ — v5 pages are distinguished by `kushi_state_page: true` front-matter."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Karpathy State Layout — HARD RULE (kushi v5.0.0+)
|
|
7
|
+
|
|
8
|
+
## Why
|
|
9
|
+
|
|
10
|
+
Today `State/` is a kushi-private synthesis layout. Adopting the
|
|
11
|
+
Karpathy-pattern wiki convention (`index.md` + `log.md` + `[[wikilinks]]`)
|
|
12
|
+
makes State/ readable by any wiki tool — most importantly
|
|
13
|
+
Understand-Anything's `/understand-knowledge` skill, which already does
|
|
14
|
+
community clustering, entity extraction, and graph rendering for free
|
|
15
|
+
**if we adopt their conventions**.
|
|
16
|
+
|
|
17
|
+
## Required files
|
|
18
|
+
|
|
19
|
+
Every v5.0.0+ project that has been touched by `build-state` has these under
|
|
20
|
+
`<engagement-root>/<project>/State/`:
|
|
21
|
+
|
|
22
|
+
| File | Purpose |
|
|
23
|
+
|---|---|
|
|
24
|
+
| `index.md` | Catalog of v5 State pages, grouped by category. Each entry is a `[[wikilink]]`. **Always regenerated** by `build-state` from the set of pages with `kushi_state_page: true` front-matter. |
|
|
25
|
+
| `log.md` | Chronological refresh log. **Appended** (never rewritten) — one entry per `refresh-project` or `bootstrap-project` run with: ISO timestamp, alias, mode (`bootstrap` / `refresh`), sources pulled, entities-added count, entities-updated count, link-entities edges-added count. |
|
|
26
|
+
| `CLAUDE.md` | Operating doc for AI agents reading the project — "this is a kushi project, use `[[wikilinks]]`, cite `Evidence/<alias>/<source>/weekly/...` for every claim." Written from `plugin/templates/state/CLAUDE.template.md` on first run; **preserved if user-edited** thereafter (mtime check; if hash diverges from template hash, do not overwrite). |
|
|
27
|
+
| `AGENTS.md` | **Copy** of `CLAUDE.md` for hosts that look for `AGENTS.md` (Codex, OpenAI agents SDK). NOT a symlink — Windows file-system compat. Written from `plugin/templates/state/AGENTS.template.md` (which is byte-identical to `CLAUDE.template.md`); preserved if user-edited. |
|
|
28
|
+
|
|
29
|
+
## v5 State page convention
|
|
30
|
+
|
|
31
|
+
A v5 State page is any `State/<category>/<slug>.md` with `kushi_state_page: true`
|
|
32
|
+
in its front-matter.
|
|
33
|
+
|
|
34
|
+
### Page categories (closed set)
|
|
35
|
+
|
|
36
|
+
| Category | Folder | Typical content |
|
|
37
|
+
|---|---|---|
|
|
38
|
+
| People | `State/people/` | Per-stakeholder page. Role, org, interactions, decisions touched. |
|
|
39
|
+
| Opportunities | `State/opportunities/` | Per-CRM-opportunity page. Stage, $ size, decisions, asks. |
|
|
40
|
+
| ADOWorkItems | `State/adoworkitems/` | Per-ADO work item that spans multiple weeks. State, owner, related meetings. |
|
|
41
|
+
| Decisions | `State/decisions/` | Per-cross-source decision. Date, decider, what changed, citations. |
|
|
42
|
+
| Risks | `State/risks/` | Per-risk page. Owner, status, mitigation, citations. |
|
|
43
|
+
| CustomerAsks | `State/customerasks/` | Per-ask page. Asker, ask text, status, evidence. |
|
|
44
|
+
| Meetings | `State/meetings/` | Per-recurring-meeting-series page. Attendees, cadence, recent decisions. |
|
|
45
|
+
| Artifacts | `State/artifacts/` | Per-document/deck/file page. Source link, key bullets, related decisions. |
|
|
46
|
+
|
|
47
|
+
Folder names are lowercase, no spaces. `build-state` creates them on demand.
|
|
48
|
+
|
|
49
|
+
### Required front-matter
|
|
50
|
+
|
|
51
|
+
```yaml
|
|
52
|
+
---
|
|
53
|
+
kushi_state_page: true
|
|
54
|
+
category: opportunity # one of: people | opportunity | ado-work-item | decision | risk | customer-ask | meeting | artifact
|
|
55
|
+
entity_ids: ["crm://entity=opportunity/id=<guid>"]
|
|
56
|
+
related: ["[[alice-smith]]", "[[hca-weekly-sync]]"]
|
|
57
|
+
last_synthesized_iso: "2026-05-26T20:00:00Z"
|
|
58
|
+
synthesized_by_alias: "ushak"
|
|
59
|
+
---
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
- `entity_ids` MUST list at least one id that matches a node id in
|
|
63
|
+
`_graph/project-graph.json`. (Self-check D21.state enforces this.)
|
|
64
|
+
- `related` is a list of `[[slug]]` wikilinks to other State pages.
|
|
65
|
+
- `last_synthesized_iso` is the ISO timestamp of the producing `build-state`
|
|
66
|
+
run.
|
|
67
|
+
|
|
68
|
+
### Wikilink rules
|
|
69
|
+
|
|
70
|
+
- `[[slug]]` resolves to `State/<category>/<slug>.md`. The category folder
|
|
71
|
+
is inferred from the target page's `category` front-matter.
|
|
72
|
+
- Slugs are **lowercase-kebab-case** derived from the page title (e.g.
|
|
73
|
+
"HCA FY26 Renewal" → `hca-fy26-renewal`). Producers MUST emit slugs
|
|
74
|
+
deterministically so two runs converge on the same filename.
|
|
75
|
+
- `[[slug|display text]]` is allowed and rendered the way every wiki tool
|
|
76
|
+
renders it.
|
|
77
|
+
- A wikilink whose target does not exist on disk is a **defect** flagged by
|
|
78
|
+
self-check D21.state. `build-state` MUST emit pages in dependency order so
|
|
79
|
+
every emitted wikilink resolves at end-of-run.
|
|
80
|
+
|
|
81
|
+
## When to emit a v5 State page
|
|
82
|
+
|
|
83
|
+
`build-state` emits one page per **cross-source entity** in
|
|
84
|
+
`_graph/project-graph.json` — defined as: any node with ≥ 2 incoming/outgoing
|
|
85
|
+
edges OR present in ≥ 2 distinct weeks (per `weekly_refs`).
|
|
86
|
+
|
|
87
|
+
Nodes that fail both gates are NOT promoted to a State page; they remain
|
|
88
|
+
addressable via the graph and `weekly/` directly.
|
|
89
|
+
|
|
90
|
+
One file per cross-source entity. If two nodes legitimately share a slug
|
|
91
|
+
(name collision), append a short stable suffix derived from the source +
|
|
92
|
+
last 6 chars of the id (e.g. `alice-smith-ado-9f3c2a`).
|
|
93
|
+
|
|
94
|
+
## Backward compatibility
|
|
95
|
+
|
|
96
|
+
- Pages **without** `kushi_state_page: true` in front-matter are LEFT ALONE.
|
|
97
|
+
v4.x synthesis files (e.g. `State/00_overview.md`, `State/05_action-items.md`)
|
|
98
|
+
continue to live in `State/` and are produced by the v4.x synthesis path
|
|
99
|
+
inside `build-state` (which v5.0.0 retains for `full` profile parity).
|
|
100
|
+
- `State/index.md` regeneration only enumerates v5 pages (those with the
|
|
101
|
+
flag). Legacy synthesis files are not referenced from `State/index.md`;
|
|
102
|
+
their existing front-matter / cross-links remain valid.
|
|
103
|
+
- No migration. No deletion. Users may continue to use v4.x State files
|
|
104
|
+
indefinitely; v5 pages live alongside.
|
|
105
|
+
|
|
106
|
+
## Self-check
|
|
107
|
+
|
|
108
|
+
`D21.state` enforces this layout:
|
|
109
|
+
|
|
110
|
+
- Every `State/<category>/*.md` with `kushi_state_page: true` has all required
|
|
111
|
+
front-matter fields.
|
|
112
|
+
- Every `entity_ids` value matches a node in `_graph/project-graph.json`.
|
|
113
|
+
- Every `[[wikilink]]` in a v5 page resolves to an existing v5 page on disk.
|
|
114
|
+
- `State/index.md` lists every v5 page that exists.
|
|
115
|
+
|
|
116
|
+
## Cross-references
|
|
117
|
+
|
|
118
|
+
- `entity-graph.instructions.md` — source of node identity for `entity_ids`.
|
|
119
|
+
- `guided-tour.instructions.md` — `State/tour.md` is a sibling artifact that
|
|
120
|
+
uses the same wikilinks.
|
|
121
|
+
- `dashboard-artifact.instructions.md` — dashboard consumes `State/index.md`
|
|
122
|
+
to render the side panel's "State pages" section.
|
|
123
|
+
- `host-portability.instructions.md` — `CLAUDE.md` / `AGENTS.md` mirroring
|
|
124
|
+
rationale.
|
package/plugin/plugin.json
CHANGED
|
@@ -61,18 +61,25 @@
|
|
|
61
61
|
"refresh-project",
|
|
62
62
|
"fde-intake",
|
|
63
63
|
"fde-report",
|
|
64
|
-
"fde-triage"
|
|
64
|
+
"fde-triage",
|
|
65
|
+
"link-entities",
|
|
66
|
+
"dashboard",
|
|
67
|
+
"tour"
|
|
65
68
|
],
|
|
66
69
|
"prompts": [
|
|
67
70
|
"bootstrap",
|
|
68
71
|
"refresh",
|
|
69
72
|
"fde-intake",
|
|
70
73
|
"fde-report",
|
|
71
|
-
"fde-triage"
|
|
74
|
+
"fde-triage",
|
|
75
|
+
"link-entities",
|
|
76
|
+
"dashboard",
|
|
77
|
+
"tour"
|
|
72
78
|
],
|
|
73
79
|
"templates": [
|
|
74
80
|
"init",
|
|
75
|
-
"fde"
|
|
81
|
+
"fde",
|
|
82
|
+
"dashboard"
|
|
76
83
|
],
|
|
77
84
|
"reference_packs": [
|
|
78
85
|
"fde"
|
|
@@ -82,8 +89,12 @@
|
|
|
82
89
|
"refresh",
|
|
83
90
|
"fde-intake",
|
|
84
91
|
"fde-report",
|
|
85
|
-
"fde-triage"
|
|
86
|
-
|
|
92
|
+
"fde-triage",
|
|
93
|
+
"link-entities",
|
|
94
|
+
"dashboard",
|
|
95
|
+
"tour"
|
|
96
|
+
],
|
|
97
|
+
"_": null
|
|
87
98
|
},
|
|
88
99
|
"full": {
|
|
89
100
|
"extends": "standard",
|
|
@@ -123,4 +134,4 @@
|
|
|
123
134
|
]
|
|
124
135
|
}
|
|
125
136
|
}
|
|
126
|
-
}
|
|
137
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dashboard
|
|
3
|
+
description: "v5.0.0 — Render <project>/dashboard.html — single self-contained interactive Cytoscape.js v3 dashboard from the entity graph."
|
|
4
|
+
argument-hint: "Project name; reads project-graph.json + _index/entities.yml + State/index.md and writes dashboard.html"
|
|
5
|
+
agent: kushi
|
|
6
|
+
tools: [search, read/readFile, edit, agent]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## User Input
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
${input:project:Project name, e.g. HCA}
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
# /dashboard
|
|
16
|
+
|
|
17
|
+
Route to `@Kushi dashboard <project>`.
|
|
18
|
+
|
|
19
|
+
Pure renderer. Reads:
|
|
20
|
+
- `<engagement-root>/<project>/Evidence/_graph/project-graph.json` (REQUIRED)
|
|
21
|
+
- `<engagement-root>/<project>/Evidence/<alias>/<source>/_index/entities.yml` (optional)
|
|
22
|
+
- `<engagement-root>/<project>/State/index.md` (optional)
|
|
23
|
+
|
|
24
|
+
Writes:
|
|
25
|
+
- `<engagement-root>/<project>/dashboard.html` — single self-contained file (Cytoscape.js v3 + cose-bilkent + Clawpilot theme variables)
|
|
26
|
+
|
|
27
|
+
Delegates to `dashboard` skill via `plugin/templates/dashboard/embedder.ps1`. Idempotent — fully regenerated each run. If the graph is missing, this is a no-op (run `@Kushi link-entities <project>` first).
|
|
28
|
+
|
|
29
|
+
Tracking: see `tracking.instructions.md`. Write `<workspace>/.kushi/tracking/runs/{{YYYY-MM-DD}}-<project>-dashboard.md` as the final step.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: link-entities
|
|
3
|
+
description: "v5.0.0 — Build the cross-source entity graph (Evidence/_graph/project-graph.json) for a project. Deterministic; opt-in LLM augment."
|
|
4
|
+
argument-hint: "Project name; walks per-source _index/entities.yml + weekly CSC bodies and writes project-graph.json"
|
|
5
|
+
agent: kushi
|
|
6
|
+
tools: [search, read/readFile, edit, agent]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## User Input
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
${input:project:Project name, e.g. HCA}
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
# /link-entities
|
|
16
|
+
|
|
17
|
+
Route to `@Kushi link-entities <project>`.
|
|
18
|
+
|
|
19
|
+
Pure builder. Reads:
|
|
20
|
+
- `<engagement-root>/<project>/Evidence/<alias>/<source>/_index/entities.yml` (every contributor, every source)
|
|
21
|
+
- `<engagement-root>/<project>/Evidence/<alias>/<source>/weekly/*-csc.md` (resolves citation bodies)
|
|
22
|
+
|
|
23
|
+
Writes:
|
|
24
|
+
- `<engagement-root>/<project>/Evidence/_graph/project-graph.json`
|
|
25
|
+
|
|
26
|
+
Delegates to `link-entities` skill. Use this when you want the graph refreshed without triggering source pulls. `refresh` and `bootstrap` call this automatically at the end of every run.
|
|
27
|
+
|
|
28
|
+
Closed edge taxonomy: `references`, `decides`, `action-item-tracks`, `discusses`, `produced-by`, `follow-up-of`, `same-thread`, `participant-of`. Deterministic by default; LLM augment is opt-in via `m365Mutable.graph.llm_infer`.
|
|
29
|
+
|
|
30
|
+
Tracking: see `tracking.instructions.md`. Write `<workspace>/.kushi/tracking/runs/{{YYYY-MM-DD}}-<project>-link-entities.md` as the final step.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tour
|
|
3
|
+
description: "v5.0.0 — Render <project>/State/tour.md — auto-generated week-in-review walkthrough scored by recency_weight × cross_ref_count."
|
|
4
|
+
argument-hint: "Project name (optionally --top N); reads project-graph.json and writes State/tour.md"
|
|
5
|
+
agent: kushi
|
|
6
|
+
tools: [search, read/readFile, edit, agent]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## User Input
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
${input:project:Project name, e.g. HCA}
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
# /tour
|
|
16
|
+
|
|
17
|
+
Route to `@Kushi tour <project> [--top N]`.
|
|
18
|
+
|
|
19
|
+
Pure renderer. Reads:
|
|
20
|
+
- `<engagement-root>/<project>/Evidence/_graph/project-graph.json` (REQUIRED)
|
|
21
|
+
- `<engagement-root>/<project>/State/index.md` (optional — for `[[wikilink]]` resolution)
|
|
22
|
+
|
|
23
|
+
Writes:
|
|
24
|
+
- `<engagement-root>/<project>/State/tour.md`
|
|
25
|
+
|
|
26
|
+
Delegates to `tour` skill via `plugin/skills/tour/build-tour.ps1`. Scoring: `recency_weight × cross_ref_count` (14-day half-life × graph degree). DFS-walks edges in priority order (`decides` → `action-item-tracks` → `discusses` → `references` → others). Default top-N = 10 (override with `--top N` or `m365Mutable.tour.topN`).
|
|
27
|
+
|
|
28
|
+
If the graph is missing, this is a no-op (run `@Kushi link-entities <project>` first).
|
|
29
|
+
|
|
30
|
+
Tracking: see `tracking.instructions.md`. Write `<workspace>/.kushi/tracking/runs/{{YYYY-MM-DD}}-<project>-tour.md` as the final step.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "ask-project"
|
|
3
|
-
version: "
|
|
4
|
-
description: "Read-only Q&A over an already-bootstrapped project (
|
|
3
|
+
version: "4.0.0"
|
|
4
|
+
description: "Read-only Q&A over an already-bootstrapped project (v5.0.0). Answers natural-language questions using State/, Evidence/, and weekly CSC files. v5 cross-source questions go GRAPH-FIRST: consult Evidence/_graph/project-graph.json before walking weekly files. 3-step reader fallback (_index/entities.yml → weekly/*.md → legacy snapshot/ + stream/). Cited; no source pulls; no outbound."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Skill: ask-project
|
|
@@ -84,6 +84,16 @@ If the question doesn't fit, default to: `State/00_overview.md` + greppable scan
|
|
|
84
84
|
|
|
85
85
|
### Step 3 — Load files (cheapest → richest, stop when sufficient)
|
|
86
86
|
|
|
87
|
+
**Graph-first for cross-source questions (v5.0.0).** If the question
|
|
88
|
+
touches more than one source (e.g. "what did the team commit to in Teams
|
|
89
|
+
that we then tracked in ADO?", "which decisions reference the OneNote
|
|
90
|
+
architecture page?"), FIRST consult
|
|
91
|
+
`<project>/Evidence/_graph/project-graph.json` to identify the relevant
|
|
92
|
+
node ids + edges, then jump directly to the cited weekly files via each
|
|
93
|
+
node's `weekly_refs`. This avoids whole-folder scans. If the graph is
|
|
94
|
+
absent or stale → fall back to the legacy walking strategy below and
|
|
95
|
+
suggest `@Kushi refresh <project>` in the answer footer.
|
|
96
|
+
|
|
87
97
|
1. Load the **primary files** identified in Step 2.
|
|
88
98
|
2. If primary files don't have the answer, expand to: latest week's `Evidence/<alias>/_Consolidated/` file.
|
|
89
99
|
3. If still insufficient, expand to per-source latest week files for the relevant source.
|
|
@@ -185,4 +195,5 @@ Explicit triggers also accepted:
|
|
|
185
195
|
|
|
186
196
|
## Changelog
|
|
187
197
|
|
|
198
|
+
- **v4.0.0 (kushi v5.0.0, 2026-05-26)**: graph-first cross-source resolution — consult `Evidence/_graph/project-graph.json` before walking weekly files when a question spans sources. Falls back to v4.9.0 walking strategy if graph absent/stale.
|
|
188
199
|
- **v3.0.0 (kushi v4.9.0, 2026-05-26)**: 3-step reader fallback chain (`_index/entities.yml` → `weekly/*.md` → legacy `snapshot/` + `stream/`). New citation form `weekly/<YYYY-MM-DD>_<source>-csc.md#<anchor>`. Legacy citations suffixed `(legacy pre-v4.9.0 layout)`. Output marked with `Source-layout:` footer.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "bootstrap-project"
|
|
3
|
-
version: "
|
|
3
|
+
version: "4.0.0"
|
|
4
4
|
description: "First-time setup for a project (kushi v4.9.0+): machine preflight, side-by-side config, engagement-root + project resolution, customer-hint discovery sweep across all WorkIQ-driven sources, initial full-window CSC pull across all enabled sources writing weekly/ + _index/ per source. All pull-* skills write CSC blocks per comprehensive-structured-capture.instructions.md. Verbatim-by-default — every enabled source dispatched, no silent skips. Discovery sweep MANDATORY before declaring blocked-config. CRM bootstrap discovery REQUIRED per `crm-bootstrap-discovery.instructions.md`. Writes per-user refresh report per `run-reports.instructions.md`. Cleans stale no-match notes on resolution per `cleanup-on-resolution.instructions.md`. Builds State/ only on `full` profile. Idempotent."
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -264,6 +264,20 @@ If `kushi-install.json#profile` is `full` → dispatch `build-state` to render `
|
|
|
264
264
|
|
|
265
265
|
If `standard` (or `core`) → **skip this step**. Note in the run summary: *"State/ rollup skipped (profile = `standard`). To enable, re-install with `npx kushi-agents --clawpilot --profile full --force`."*
|
|
266
266
|
|
|
267
|
+
### Step 6b — Cross-source graph + dashboard + tour (kushi v5.0.0)
|
|
268
|
+
|
|
269
|
+
After `build-state` (or in its place on `standard` profile, since graph/
|
|
270
|
+
dashboard/tour read from Evidence + v5 State pages when present),
|
|
271
|
+
dispatch the v5 enrichment chain in order:
|
|
272
|
+
|
|
273
|
+
1. `link-entities` → `<project>/Evidence/_graph/project-graph.json`
|
|
274
|
+
2. `dashboard` → `<project>/dashboard.html`
|
|
275
|
+
3. `tour` → `<project>/State/tour.md`
|
|
276
|
+
|
|
277
|
+
Each step records its outcome in the run summary; a failure does NOT
|
|
278
|
+
block the next step. If `link-entities` produced no graph, skip 2 and 3
|
|
279
|
+
cleanly and surface a run-summary line.
|
|
280
|
+
|
|
267
281
|
### Step 7 — Verify + summary
|
|
268
282
|
|
|
269
283
|
Per `side-by-side-config.instructions.md` "Verification" rule, list all live config files (path + size + last-write time). Show:
|
|
@@ -297,4 +311,6 @@ When this skill exposes a reusable defect (auth pattern, doctrine gap, layout mi
|
|
|
297
311
|
|
|
298
312
|
## Changelog
|
|
299
313
|
|
|
314
|
+
|
|
315
|
+
- **v4.0.0 (kushi v5.0.0, 2026-05-26)**: After build-state, dispatch the v5 enrichment chain — `link-entities` → `dashboard` → `tour`. Each step's success/failure is recorded in the run summary; a failure of one step does not block the next.
|
|
300
316
|
- **v3.0.0 (kushi v4.9.0, 2026-05-26)**: Drops "1 verbatim per source per bootstrap" carve-out. Walks the full boundary window per source. Preflight ensures `weekly/` + `_index/` exist per source. All pull-* invoked write CSC blocks per comprehensive-structured-capture.instructions.md.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "build-state"
|
|
3
|
-
version: "
|
|
4
|
-
description: "Render <project>/State
|
|
3
|
+
version: "4.0.0"
|
|
4
|
+
description: "Render <project>/State/ from existing Evidence. v5.0.0: emits BOTH the legacy 00–09 synthesis (retained for `full` profile parity) AND the new Karpathy-style layout (index.md + log.md + per-entity pages under people/ opportunities/ adoworkitems/ decisions/ risks/ customerasks/ meetings/ artifacts/, plus CLAUDE.md + AGENTS.md). 3-step reader fallback: _index/entities.yml → weekly/*.md → legacy snapshot/ + stream/. No source pulls — pure re-render. Latest fact wins on conflicts. Every assertion cited. Always updates Open Questions. v5 pages are ADDITIVE and distinguished by `kushi_state_page: true` front-matter."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Skill: build-state
|
|
@@ -70,7 +70,45 @@ Update `<project>/State/09_open-questions.md`:
|
|
|
70
70
|
- If a question is no longer relevant (scope cut, decision overtaken), flip to ⚫ Stale with reason.
|
|
71
71
|
- Bump the file's `As of:` line. Briefly mention in run-log how many opened / partial / resolved / staled.
|
|
72
72
|
|
|
73
|
-
### Step 6 —
|
|
73
|
+
### Step 6 — v5 Karpathy emission (ADDITIVE; per `karpathy-state-layout.instructions.md`)
|
|
74
|
+
|
|
75
|
+
After Steps 1–5 produce the legacy 00–09 files, ALSO emit the v5 layout:
|
|
76
|
+
|
|
77
|
+
1. Ensure category folders exist under `<project>/State/`:
|
|
78
|
+
`people/`, `opportunities/`, `adoworkitems/`, `decisions/`, `risks/`,
|
|
79
|
+
`customerasks/`, `meetings/`, `artifacts/`.
|
|
80
|
+
2. For each entity surfaced via the reader-fallback chain, write one
|
|
81
|
+
markdown file using `..\..\templates\state\page.template.md`. Filename
|
|
82
|
+
slug = lowercase ascii of the entity title (alphanumeric + hyphen, ≤80
|
|
83
|
+
chars), with `.md` suffix. Place it in the matching category folder.
|
|
84
|
+
The front-matter MUST include `kushi_state_page: true`, the canonical
|
|
85
|
+
`entity_ids: [...]` (graph node ids), and a `related: [...]` array of
|
|
86
|
+
other state-page paths (relative, slash-separated) discovered via graph
|
|
87
|
+
edges (`decides`, `discusses`, `action-item-tracks`, `references`,
|
|
88
|
+
`produced-by`, `follow-up-of`, `same-thread`, `participant-of`).
|
|
89
|
+
3. Regenerate `<project>/State/index.md` from
|
|
90
|
+
`..\..\templates\state\index.template.md` by enumerating every file
|
|
91
|
+
under `State/**/*.md` whose front-matter has `kushi_state_page: true`,
|
|
92
|
+
grouped by category, sorted by filename. The index MUST be fully
|
|
93
|
+
overwritten each run.
|
|
94
|
+
4. Append a new dated entry to `<project>/State/log.md`
|
|
95
|
+
(from `..\..\templates\state\log.template.md`):
|
|
96
|
+
`## YYYY-MM-DD HH:mm UTC — build-state run by <alias>` plus a short
|
|
97
|
+
summary (`pages_written: N`, `categories_touched: …`,
|
|
98
|
+
`legacy_files_rewritten: 00..09`).
|
|
99
|
+
5. Ensure `<project>/State/CLAUDE.md` and `<project>/State/AGENTS.md` exist
|
|
100
|
+
and are byte-identical copies of
|
|
101
|
+
`..\..\templates\state\CLAUDE.template.md` (per the doctrine — Windows
|
|
102
|
+
does not honor symlinks reliably, so we copy).
|
|
103
|
+
6. `[[wikilink]]` rendering: page bodies SHOULD use the
|
|
104
|
+
`[[category/slug]]` form for cross-references; the build does not need
|
|
105
|
+
to resolve these — they are render-time hints for human + agent
|
|
106
|
+
readers.
|
|
107
|
+
|
|
108
|
+
v5 emission is gated on `m365Mutable.state.layout: "karpathy"` (default
|
|
109
|
+
true). If set to `"legacy"`, skip Step 6.
|
|
110
|
+
|
|
111
|
+
### Step 7 — Banner
|
|
74
112
|
|
|
75
113
|
Top of every State file:
|
|
76
114
|
|
|
@@ -89,4 +127,5 @@ Top of every State file:
|
|
|
89
127
|
|
|
90
128
|
## Changelog
|
|
91
129
|
|
|
130
|
+
- **v4.0.0 (kushi v5.0.0, 2026-05-26)**: ADDITIVE Karpathy-style emission — per-entity pages under `State/<category>/`, `State/index.md`, `State/log.md`, `State/CLAUDE.md`, `State/AGENTS.md`. Distinguished by `kushi_state_page: true`. Legacy 00–09 synthesis is retained for `full` profile parity. Gated on `m365Mutable.state.layout` (default `karpathy`). See `..\..\instructions\karpathy-state-layout.instructions.md`.
|
|
92
131
|
- **v3.0.0 (kushi v4.9.0, 2026-05-26)**: 3-step reader fallback chain (`_index/entities.yml` → `weekly/*.md` → legacy `snapshot/` + `stream/`). New citation form `weekly/<YYYY-MM-DD>_<source>-csc.md#<anchor>`. Legacy citations suffixed `(legacy pre-v4.9.0 layout)`. Output marked with `Source-layout:` footer.
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "dashboard"
|
|
3
|
+
version: "1.0.0"
|
|
4
|
+
description: "v5.0.0 — Render an interactive HTML dashboard for a project. Reads Evidence/_graph/project-graph.json + per-source _index/entities.yml + State/index.md and emits a single self-contained <project>/dashboard.html via plugin/templates/dashboard/dashboard.template.html. Uses Cytoscape.js v3 + cose-bilkent layout (inlined), Clawpilot theme variables (per the web-artifacts-builder skill), two-view tabs (Graph + Timeline), source/alias/date filters, fuzzy search, side panel with cited CSC blocks. Idempotent — fully regenerated each run."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Skill: dashboard
|
|
8
|
+
|
|
9
|
+
> **v5.0.0 — Single-file HTML dashboard producer.** See
|
|
10
|
+
> `..\..\instructions\dashboard-artifact.instructions.md` for the full
|
|
11
|
+
> contract: inputs, outputs, theming, views, filters, search, side panel.
|
|
12
|
+
>
|
|
13
|
+
> **Theming uses the Clawpilot `web-artifacts-builder` skill.** All CSS
|
|
14
|
+
> variables (`--bg`, `--fg`, `--accent`, `--surface`, `--border`, …) come from
|
|
15
|
+
> that skill's theme contract so the dashboard adopts the user's Clawpilot
|
|
16
|
+
> palette when opened inside Clawpilot, and falls back to a default
|
|
17
|
+
> light/dark scheme in a vanilla browser.
|
|
18
|
+
|
|
19
|
+
## When to run
|
|
20
|
+
|
|
21
|
+
- Automatically as part of `refresh-project` (after `link-entities` +
|
|
22
|
+
`build-state`) and `bootstrap-project` (same chain).
|
|
23
|
+
- Manually: `@Kushi dashboard <project>`.
|
|
24
|
+
|
|
25
|
+
## Inputs
|
|
26
|
+
|
|
27
|
+
- `<project>` — already-bootstrapped project root.
|
|
28
|
+
- `<project>/Evidence/_graph/project-graph.json` — REQUIRED. Missing graph →
|
|
29
|
+
skill is a no-op (dashboard is not produced).
|
|
30
|
+
- `<project>/Evidence/<alias>/<source>/_index/entities.yml` — OPTIONAL per
|
|
31
|
+
contributor / source.
|
|
32
|
+
- `<project>/State/index.md` — OPTIONAL. Used to populate the side panel's
|
|
33
|
+
"State pages" list.
|
|
34
|
+
|
|
35
|
+
## Output
|
|
36
|
+
|
|
37
|
+
- `<project>/dashboard.html` — single self-contained HTML file.
|
|
38
|
+
|
|
39
|
+
## Steps
|
|
40
|
+
|
|
41
|
+
### Step 1 — Verify inputs
|
|
42
|
+
|
|
43
|
+
If `<project>/Evidence/_graph/project-graph.json` does not exist, exit
|
|
44
|
+
cleanly with a one-line message ("no graph — run `link-entities` first").
|
|
45
|
+
Do NOT produce a dashboard.
|
|
46
|
+
|
|
47
|
+
### Step 2 — Collect data
|
|
48
|
+
|
|
49
|
+
1. Read the graph JSON.
|
|
50
|
+
2. Walk all `Evidence/<alias>/<source>/_index/entities.yml` files and merge
|
|
51
|
+
their entries into a single index map keyed by entity id (used by the
|
|
52
|
+
side panel to surface `latest_csc_file` quickly).
|
|
53
|
+
3. Read `State/index.md` if present; parse the v5 state pages it lists.
|
|
54
|
+
|
|
55
|
+
### Step 3 — Render
|
|
56
|
+
|
|
57
|
+
Invoke the embedder:
|
|
58
|
+
|
|
59
|
+
```pwsh
|
|
60
|
+
pwsh plugin/templates/dashboard/embedder.ps1 `
|
|
61
|
+
-TemplatePath plugin/templates/dashboard/dashboard.template.html `
|
|
62
|
+
-OutPath <project>/dashboard.html `
|
|
63
|
+
-GraphJsonPath <project>/Evidence/_graph/project-graph.json `
|
|
64
|
+
-IndexJsonPath <intermediate> `
|
|
65
|
+
-StateJsonPath <intermediate>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
The embedder substitutes the `__GRAPH_JSON__`, `__INDEX_JSON__`, and
|
|
69
|
+
`__STATE_JSON__` placeholders in the template with the stringified JSON of
|
|
70
|
+
the collected data, and writes the result to `<project>/dashboard.html`.
|
|
71
|
+
|
|
72
|
+
### Step 4 — Verify
|
|
73
|
+
|
|
74
|
+
Confirm `<project>/dashboard.html` exists and is non-empty. Open the file
|
|
75
|
+
in a browser (manual verification step — not automated here) to confirm:
|
|
76
|
+
the graph view renders, the side panel opens on node click, filters work.
|
|
77
|
+
|
|
78
|
+
## Hard rules
|
|
79
|
+
|
|
80
|
+
- The output is a **single self-contained HTML file**. No external CDN
|
|
81
|
+
fetches at view time.
|
|
82
|
+
- Theming uses the Clawpilot `web-artifacts-builder` skill's CSS variables.
|
|
83
|
+
- Idempotent — the file is fully regenerated on every run.
|
|
84
|
+
- NEVER write outside `<project>/dashboard.html`.
|
|
85
|
+
|
|
86
|
+
## Triggers
|
|
87
|
+
|
|
88
|
+
- "dashboard `<X>`"
|
|
89
|
+
- "build dashboard for `<X>`"
|
|
90
|
+
- "@Kushi dashboard `<X>`"
|
|
91
|
+
- (auto) end of `refresh-project` / `bootstrap-project`
|
|
92
|
+
|
|
93
|
+
## References
|
|
94
|
+
|
|
95
|
+
- `..\..\instructions\dashboard-artifact.instructions.md`
|
|
96
|
+
- `..\..\instructions\entity-graph.instructions.md`
|
|
97
|
+
- `..\..\instructions\karpathy-state-layout.instructions.md`
|
|
98
|
+
- `..\..\instructions\issue-recovery.instructions.md`
|
|
99
|
+
- Clawpilot user skill: `web-artifacts-builder` (theme variables, single-HTML
|
|
100
|
+
packaging contract).
|
|
101
|
+
|
|
102
|
+
## Issue Recovery
|
|
103
|
+
|
|
104
|
+
When this skill exposes a reusable defect (template placeholder mismatch,
|
|
105
|
+
data shape drift, theming regression), apply the [Issue Recovery Rule](../../instructions/issue-recovery.instructions.md):
|
|
106
|
+
fix the template or embedder first, re-render, verify in browser, then
|
|
107
|
+
re-run self-check D22.dashboard.
|
|
108
|
+
|
|
109
|
+
## Changelog
|
|
110
|
+
|
|
111
|
+
- **v1.0.0 (kushi v5.0.0, 2026-05-26)**: initial release. Cytoscape.js v3 +
|
|
112
|
+
cose-bilkent + Clawpilot theme variables; two-view tabs; side panel;
|
|
113
|
+
filters; fuzzy search.
|