kushi-agents 5.9.7 → 6.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.
Files changed (119) hide show
  1. package/README.md +96 -362
  2. package/bin/cli.mjs +60 -343
  3. package/package.json +2 -2
  4. package/plugin/agents/kushi.agent.md +96 -194
  5. package/plugin/plugin.json +42 -160
  6. package/plugin/runners/discover.mjs +79 -14
  7. package/plugin/runners/refresh.mjs +0 -8
  8. package/plugin/runners/test/unit/discover.test.mjs +35 -0
  9. package/plugin/skills/bootstrap-project/SKILL.md +3 -3
  10. package/plugin/skills/discover-project/evals/fixtures/outputs/discover-project.bad-args.json +1 -0
  11. package/plugin/skills/discover-project/evals/fixtures/outputs/discover-project.no-workiq.json +1 -0
  12. package/plugin/skills/discover-project/evals/fixtures/outputs/discover-project.not-bootstrapped.json +1 -0
  13. package/plugin/skills/doctor/doctor.ps1 +2 -43
  14. package/plugin/skills/emit-vertex/README.md +1 -1
  15. package/plugin/skills/emit-vertex/SKILL.md +1 -1
  16. package/plugin/skills/eval/run-evals.ps1 +29 -1
  17. package/plugin/skills/self-check/run.ps1 +41 -425
  18. package/plugin/templates/init/kushi.template.yml +9 -27
  19. package/plugin/templates/init/m365-auth.example.json +4 -4
  20. package/src/doctor.test.mjs +2 -4
  21. package/src/eval-runner.test.mjs +2 -2
  22. package/src/get-kushi-config.test.mjs +1 -1
  23. package/src/main.mjs +2 -8
  24. package/src/multi-host.mjs +1 -1
  25. package/src/profile-resolver.mjs +13 -0
  26. package/src/seed-config.mjs +1 -1
  27. package/src/setup-wizard.mjs +152 -176
  28. package/src/setup-wizard.test.mjs +0 -2
  29. package/plugin/instructions/agentskills-compliance.instructions.md +0 -144
  30. package/plugin/instructions/dashboard-artifact.instructions.md +0 -132
  31. package/plugin/instructions/global-wiki.instructions.md +0 -84
  32. package/plugin/instructions/guided-tour.instructions.md +0 -100
  33. package/plugin/instructions/karpathy-state-layout.instructions.md +0 -124
  34. package/plugin/instructions/living-wiki.instructions.md +0 -88
  35. package/plugin/instructions/multi-wiki-routing.instructions.md +0 -117
  36. package/plugin/instructions/schema-evolve.instructions.md +0 -73
  37. package/plugin/instructions/skill-authoring.instructions.md +0 -147
  38. package/plugin/instructions/skill-evals.instructions.md +0 -130
  39. package/plugin/instructions/wiki-lint.instructions.md +0 -110
  40. package/plugin/prompts/create-skill.prompt.md +0 -26
  41. package/plugin/prompts/dashboard.prompt.md +0 -29
  42. package/plugin/prompts/explain.prompt.md +0 -22
  43. package/plugin/prompts/global.prompt.md +0 -28
  44. package/plugin/prompts/lint.prompt.md +0 -28
  45. package/plugin/prompts/promote.prompt.md +0 -26
  46. package/plugin/prompts/schema-evolve.prompt.md +0 -27
  47. package/plugin/prompts/state.prompt.md +0 -28
  48. package/plugin/prompts/teach.prompt.md +0 -25
  49. package/plugin/prompts/tour.prompt.md +0 -30
  50. package/plugin/runners/migrate-to-v550.mjs +0 -192
  51. package/plugin/runners/pull-state.mjs +0 -297
  52. package/plugin/runners/test/integration/migrate-to-v550.integration.test.mjs +0 -138
  53. package/plugin/skills/_shared/Append-StateLog.ps1 +0 -73
  54. package/plugin/skills/_shared/Update-StateIndex.ps1 +0 -47
  55. package/plugin/skills/build-state/SKILL.md +0 -195
  56. package/plugin/skills/build-state/evals/evals.json +0 -31
  57. package/plugin/skills/dashboard/SKILL.md +0 -132
  58. package/plugin/skills/dashboard/evals/evals.json +0 -33
  59. package/plugin/skills/global-wiki/.created-by-skill-creator +0 -1
  60. package/plugin/skills/global-wiki/SKILL.md +0 -96
  61. package/plugin/skills/global-wiki/evals/evals.json +0 -43
  62. package/plugin/skills/lint-state/.created-by-skill-creator +0 -0
  63. package/plugin/skills/lint-state/SKILL.md +0 -98
  64. package/plugin/skills/lint-state/evals/evals.json +0 -34
  65. package/plugin/skills/lint-state/lint.ps1 +0 -218
  66. package/plugin/skills/promote/.created-by-skill-creator +0 -1
  67. package/plugin/skills/promote/SKILL.md +0 -125
  68. package/plugin/skills/promote/evals/evals.json +0 -35
  69. package/plugin/skills/schema-evolve/.created-by-skill-creator +0 -0
  70. package/plugin/skills/schema-evolve/SKILL.md +0 -106
  71. package/plugin/skills/schema-evolve/evals/evals.json +0 -37
  72. package/plugin/skills/skill-checker/SKILL.md +0 -136
  73. package/plugin/skills/skill-checker/check-skill.ps1 +0 -416
  74. package/plugin/skills/skill-checker/evals/evals.json +0 -41
  75. package/plugin/skills/skill-creator/SKILL.md +0 -134
  76. package/plugin/skills/skill-creator/evals/evals.json +0 -40
  77. package/plugin/skills/skill-creator/generate-eval-review.ps1 +0 -101
  78. package/plugin/skills/skill-creator/optimize-description.ps1 +0 -87
  79. package/plugin/skills/skill-creator/scaffold.ps1 +0 -180
  80. package/plugin/skills/skill-creator/templates/evals-starter.template.json +0 -27
  81. package/plugin/skills/skill-creator/templates/gotchas-stub.template.md +0 -9
  82. package/plugin/skills/skill-creator/templates/skill-skeleton.template.md +0 -28
  83. package/plugin/skills/teach/.created-by-skill-creator +0 -0
  84. package/plugin/skills/teach/SKILL.md +0 -79
  85. package/plugin/skills/teach/evals/evals.json +0 -59
  86. package/plugin/skills/tour/SKILL.md +0 -85
  87. package/plugin/skills/tour/build-tour.ps1 +0 -185
  88. package/plugin/skills/tour/evals/evals.json +0 -33
  89. package/plugin/templates/dashboard/dashboard.template.html +0 -431
  90. package/plugin/templates/dashboard/embedder.ps1 +0 -56
  91. package/plugin/templates/init/kushi-projects.template.json +0 -14
  92. package/plugin/templates/snapshot/DEPRECATED-v4.9.0.md +0 -37
  93. package/plugin/templates/state/00_overview.template.md +0 -44
  94. package/plugin/templates/state/01_decisions.template.md +0 -41
  95. package/plugin/templates/state/02_stakeholders.template.md +0 -48
  96. package/plugin/templates/state/03_architecture-and-solution.template.md +0 -56
  97. package/plugin/templates/state/04_workshops-and-key-meetings.template.md +0 -43
  98. package/plugin/templates/state/05_action-items.template.md +0 -29
  99. package/plugin/templates/state/06_risks-and-issues.template.md +0 -43
  100. package/plugin/templates/state/07_timeline-and-milestones.template.md +0 -45
  101. package/plugin/templates/state/08_artifacts-and-deliverables.template.md +0 -55
  102. package/plugin/templates/state/09_open-questions.template.md +0 -62
  103. package/plugin/templates/state/AGENTS.template.md +0 -33
  104. package/plugin/templates/state/CLAUDE.template.md +0 -33
  105. package/plugin/templates/state/README.md +0 -41
  106. package/plugin/templates/state/answers.README.md +0 -7
  107. package/plugin/templates/state/hot.template.md +0 -12
  108. package/plugin/templates/state/index.template.md +0 -41
  109. package/plugin/templates/state/log.template.md +0 -14
  110. package/plugin/templates/state/page.template.md +0 -22
  111. package/plugin/templates/state/review-queue.template.md +0 -10
  112. package/src/global-wiki-cli.mjs +0 -385
  113. package/src/global-wiki.mjs +0 -635
  114. package/src/global-wiki.test.mjs +0 -135
  115. package/src/promote.test.mjs +0 -161
  116. package/src/schema-evolve.test.mjs +0 -78
  117. package/src/skill-checker.test.mjs +0 -118
  118. package/src/skill-creator.test.mjs +0 -92
  119. package/src/teach.test.mjs +0 -45
package/README.md CHANGED
@@ -1,400 +1,134 @@
1
- # Kushi
1
+ # kushi
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/kushi-agents.svg)](https://www.npmjs.com/package/kushi-agents)
4
- [![npm downloads](https://img.shields.io/npm/dw/kushi-agents.svg)](https://www.npmjs.com/package/kushi-agents)
5
- [![license](https://img.shields.io/npm/l/kushi-agents.svg)](LICENSE)
6
- [![host: Clawpilot](https://img.shields.io/badge/host-Clawpilot-7c9cff)](https://gim-home.github.io/kushi/)
7
- [![host: VS Code](https://img.shields.io/badge/host-VS%20Code-007acc)](https://gim-home.github.io/kushi/)
8
- [![spec: agentskills.io](https://img.shields.io/badge/spec-agentskills.io-22c55e)](https://agentskills.io/skill-creation/best-practices)
3
+ > Multi-source project evidence + cited Q&A for consulting / engineering engagements.
9
4
 
10
- > **v5.6.0 — Learning candidates.** Runners now auto-capture novel field errors into `<project>/Evidence/_learnings-candidates/` for human review and upstream promotion. Local-only (no telemetry, no auto-PR), 7-day dedup, classifier filters out user-side and transient errors. Closes the field-bug loop — published kushi installs can now contribute doctrine back. New probe `D48`, new concept doc [Learning candidates](https://gim-home.github.io/kushi/concepts/learning-candidates/), new how-to [Promote a learning candidate](https://gim-home.github.io/kushi/how-to/promote-learning-candidate/). `kushi share-learnings` (opt-in redacted upstream submission) lands in v5.7.0.
11
-
12
- > **v5.5.0 — Deterministic runners.** Nine pull/orchestrator skills are now thin pointers to Node runners under `plugin/runners/`. The LLM picks scope; the runner does HTTP, file IO, week math, and writes evidence. New probes D44–D47 enforce the contract.
13
-
14
- > **v5.2.0 — Hooks + parallel pulls + OTel + teach + schema-evolve.** Pipeline events trigger configurable hooks (`.kushi/hooks/`); pull dispatch is parallel by default (4 workers); OpenTelemetry export is opt-in via `KUSHI_OTEL_ENDPOINT`; `kushi explain <topic>` teaches concepts; `kushi remember <rule>` persists conventions.
15
-
16
- > **v5.1.0 — Living wiki.** Build-state is now incremental: human edits outside `<!-- kushi:auto -->` fences are preserved, contradictions are flagged with Obsidian-compatible callouts (`> [!warning]`), and a new `lint-state` skill monitors wiki health. State/ is a valid [Obsidian](https://obsidian.md) vault — callout syntax, Dataview-compatible frontmatter, and `[[wikilinks]]` all work natively.
17
-
18
- > **v5.0.1 spec-compliance pass.** Every `plugin/skills/<name>/SKILL.md` follows the [agentskills.io best practices](https://agentskills.io/skill-creation/best-practices) and [optimizing-descriptions](https://agentskills.io/skill-creation/optimizing-descriptions) guides: ≤ 500 lines & ≤ 5000 tokens, load-on-trigger references, top-5 gotchas, checklist orchestrators, validation loops, plan-validate-execute for graph + State writers, and "USE WHEN …" descriptions. Enforced by `self-check -Deep` D30.*.
19
-
20
- > **Project lineage:** for the *why* behind each release — what built on what, what trade-offs were accepted, what external work inspired which design — see [`docs/genealogy.md`](docs/genealogy.md). Every release MUST add an entry there before tagging (enforced by `self-check` D31.genealogy).
21
-
22
- > A multi-skill GitHub Copilot agent for grounded engagement evidence — across Email, Teams, Meetings, OneNote, SharePoint, Dataverse (CRM), and Azure DevOps.
23
-
24
- > **KUSHI** — **K**nowledge **U**nification for **S**takeholder **H**andoff & **I**nsight.
25
- >
26
- > *Also: Kushi (குஷி) is Tamil for "happiness" — the kind you feel when every "what was decided?" question has a cited answer in seconds.*
27
-
28
- 📖 **Full docs: https://gim-home.github.io/kushi/**
29
-
30
- ## The essence: aggregate, then answer
31
-
32
- Kushi has two halves that work as one loop:
33
-
34
- 1. **Aggregate** — pull evidence from every M365 + CRM + ADO surface (email, Teams, meetings, OneNote, SharePoint, Dataverse, Azure DevOps) into a structured per-engagement folder on disk. Captured as **snapshot** (current truth) + **stream** (timestamped events), with provenance.
35
- 2. **Answer** — a read-only **ask-me-anything** agent over that evidence. Every assertion cites the source file + date. No new pulls at answer time. No hallucination. Freshness-gated. Auto-routes when a message names a known project and asks a question — no special prefix needed.
36
-
37
- ```
38
- > @Kushi bootstrap Acme # aggregate: pull 30d baseline + build State
39
- > what's the MACC for Acme? # answer: cited, grounded, instant
40
- > who is the EM on Acme? # answer: auto-routes, no prefix
41
- > @Kushi refresh Acme # aggregate: incremental from last watermark
42
- ```
43
-
44
- The split is deliberate: aggregation is **heavy, scheduled, replayable**; answering is **cheap, instant, citable**. A weekly refresh keeps the corpus fresh so every question is already grounded.
45
-
46
- See [Concepts → Aggregate, then Answer](https://gim-home.github.io/kushi/concepts/aggregate-and-answer/) for the full pattern.
47
-
48
- ## v5.0.0 — Cross-source graph + Karpathy State + interactive dashboard + auto-tour
49
-
50
- v5.0.0 builds on the v4.9.0 Comprehensive Structured Capture (CSC) + weekly-only layout to surface cross-source structure:
51
-
52
- - **Cross-source entity graph** — `link-entities` walks every per-source `_index/entities.yml` + weekly CSC body and emits `<project>/Evidence/_graph/project-graph.json`. 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`.
53
- - **Karpathy-style State layout** — `build-state` now also emits `State/index.md` + `State/log.md` + per-entity pages under closed-set categories (`people/`, `opportunities/`, `adoworkitems/`, `decisions/`, `risks/`, `customerasks/`, `meetings/`, `artifacts/`), plus `State/CLAUDE.md` and `State/AGENTS.md`. Legacy `State/00_…–09_…` files coexist for `full` profile parity.
54
- - **Interactive HTML dashboard** — `dashboard` writes a single self-contained `<project>/dashboard.html` (Cytoscape.js v3 + cose-bilkent, Clawpilot theme variables, Graph + Timeline tabs, source/alias/date filters, fuzzy search, side panel with cited CSC blocks).
55
- - **Auto-generated guided tour** — `tour` writes `<project>/State/tour.md`, a top-N walkthrough scored by `recency_weight × cross_ref_count` (14-day half-life × graph degree). Default N=10, configurable via `m365Mutable.tour.topN`.
56
- - **`refresh` and `bootstrap` chain it all** — at the end of each run, both orchestrators dispatch `link-entities → dashboard → tour`; failures are recorded but never block the next step.
57
-
58
- No migration required. Run `@Kushi refresh <project>` to produce the graph, regenerate State/, write the dashboard, and write the tour.
59
-
60
- ## Two-way sync to ADO — preview shipped
61
-
62
- Kushi can now **propose updates back to ADO** from the cited evidence it already has. Two skills under the opt-in `preview` profile:
63
-
64
- - ✅ **`propose-ado-update`** — fully working, read-only. Reads the latest `_Consolidated/` evidence and writes `<project>/ado-updates/<date>/proposed.md` with a field-update preview + Discussion comment + per-bullet citations + per-item confidence scores. Safe to run on the same Monday-9am schedule as `refresh`.
65
- - ✅ **`apply-ado-update`** — preview-stub. Re-fetches live ADO state, runs the approval gate, writes a `planned.jsonl` of what *would* be PATCH/POST'd. Real ADO calls land in v0.1.x once the proposal format is validated against multiple projects.
5
+ `kushi` captures **snapshots** and **streams** from Email, Teams, OneNote, Loop,
6
+ SharePoint, Meetings, CRM, and Azure DevOps into a deterministic on-disk
7
+ **Evidence/** tree, then answers questions strictly from that evidence
8
+ with citations.
66
9
 
67
10
  ```text
68
- > @Kushi propose ado Acme
69
-
70
- #4821 Status: Active → Resolved
71
- Evidence: Email 2026-05-12 from Priya — "shipped to prod Monday"
72
- Confidence: high
73
-
74
- #4837 AssignedTo: Sam → Priya
75
- Evidence: Teams 2026-05-11 — "I'll take this one over from Sam"
76
- Confidence: medium
77
-
78
- Apply [a]ll · [s]elect · [n]one?
11
+ WorkIQ ──▶ runners ──▶ Evidence/<alias>/<source>/<week>/*.csc.md
12
+
13
+ └──▶ ask (cited Q&A)
14
+ └──▶ fde (FDE authoring)
15
+ └──▶ ado (update reports)
79
16
  ```
80
17
 
81
- **Safety guarantees** — preview-first diffs, approval gate or per-project allowlist, ledger with reverse op for every applied write, hard tenant-allowlist guard, no bulk migrations, no CRM writes (ADO first).
82
-
83
- Try it: `npx kushi-agents --clawpilot --profile preview` · How-to: [Two-way ADO update](https://gim-home.github.io/kushi/how-to/two-way-ado-update/) · Roadmap: [`docs/concepts/roadmap.md`](docs/concepts/roadmap.md).
84
-
85
- ## Obsidian compatible
86
-
87
- `State/` is a valid [Obsidian](https://obsidian.md) vault out of the box:
88
-
89
- - **Callout syntax** — contradictions use `> [!warning]` / `> [!info]` callouts (native Obsidian rendering).
90
- - **Dataview compatible** — every State page has YAML frontmatter (`kushi_state_page: true`, `entity_ids`, `related`, timestamps) queryable by [Dataview](https://blacksmithgu.github.io/obsidian-dataview/).
91
- - **Wikilinks** — cross-references use `[[category/slug]]` form, resolvable by Obsidian's link resolver.
92
- - **No binary assets required** — all content is plain Markdown. No images, no custom plugins needed.
93
-
94
- To use: point Obsidian at `<project>/State/` as a vault. The `index.md` serves as the home page, `log.md` is the activity feed, and category folders (`people/`, `decisions/`, etc.) are navigable in the sidebar.
95
-
96
- > **Note:** Obsidian is optional. State/ works identically without it — the conventions are designed to be tool-agnostic while being Obsidian-first for teams that use it.
97
-
98
- <!-- Screenshot placeholder: Obsidian rendering of State/ with contradiction callouts visible. No binary screenshots committed — use text descriptions or link to docs site. -->
99
-
100
18
  ---
101
19
 
102
- ## Hooks (v5.2.0+)
103
-
104
- Pipeline events (`post-pull`, `post-state`, `post-contradiction`, `post-lint`) trigger configurable hooks — PowerShell scripts or webhooks. Failures are logged but never block the pipeline.
105
-
106
- ```bash
107
- # List configured hooks
108
- kushi hooks list MyProject
109
-
110
- # Test-fire a synthetic event
111
- kushi hooks test MyProject post-pull
112
- ```
113
-
114
- Configure in `.kushi/hooks.yml` or drop scripts into `.kushi/hooks/<event>.ps1`. Templates at `plugin/skills/_shared/hook-templates/`.
115
-
116
- ## Parallel refresh (v5.2.0+)
117
-
118
- Pull dispatch is parallel by default (4 workers). Each source writes to its own isolated subtree. Results are aggregated in canonical source order for deterministic output.
119
-
120
- ```bash
121
- # Default: parallel (up to 4 workers)
122
- kushi refresh MyProject
123
-
124
- # Force sequential (old behavior)
125
- kushi refresh MyProject --sequential
126
- ```
127
-
128
- Configure `parallel.max_workers` in `.kushi/config.yml`. See `parallel-execution.instructions.md`.
129
-
130
- ## Telemetry (opt-in, v5.2.0+)
131
-
132
- Set `KUSHI_OTEL_ENDPOINT` to export spans to any OTLP-compatible backend (Jaeger, Grafana Tempo, Azure Monitor). Zero overhead when unset. No evidence content or PII — metadata only.
133
-
134
- ```bash
135
- export KUSHI_OTEL_ENDPOINT=http://localhost:4318/v1/traces
136
- kushi refresh MyProject # spans emitted for each pull + build-state + lint
137
- ```
138
-
139
- ## Teach mode (v5.2.0+)
140
-
141
- Pedagogical, read-only. Explains kushi concepts by loading relevant doctrine + genealogy.
142
-
143
- ```bash
144
- kushi explain contradictions
145
- kushi explain parallel
146
- kushi explain hooks
147
- ```
148
-
149
- ## Schema evolve (v5.2.0+)
150
-
151
- Teach kushi project-specific conventions that persist across runs.
20
+ ## Install
152
21
 
153
- ```bash
154
- kushi remember "always use 'Northwind' not 'Healthcare Accelerator' in summaries"
22
+ ```powershell
23
+ npm install -g kushi-agents
24
+ kushi setup # one-time: pick engagement root + hosts
25
+ kushi bootstrap <project> # scaffold a project's Evidence/ tree
26
+ kushi discover <project> # ask WorkIQ to fill boundaries.yml
27
+ kushi refresh <project> # pull this week's evidence
28
+ kushi ask <project> "question?" # cited Q&A in chat
155
29
  ```
156
30
 
157
- Rules stored in `Evidence/<alias>/State/CLAUDE.md`. Read by `build-state`, `ask-project`, `refresh-project` at run start.
31
+ Workspace install (per-project, no global): from your engagement root,
32
+ run `npx kushi-agents --target vscode --yes` (or `--target clawpilot`).
158
33
 
159
34
  ---
160
35
 
161
- ## Global wiki (v5.3.0+)
162
-
163
- A per-user **global wiki** at `~/.kushi-global/State/` for cross-engagement knowledge — same Karpathy shape as a project `State/`, marked `scope: global`.
164
-
165
- ```bash
166
- kushi global init # scaffold ~/.kushi-global/State/
167
- kushi global status # counts + last-modified summary
168
- kushi global ask "what's our confidence ladder pattern?"
169
- kushi global lint # privacy + structure pass
36
+ ## What's in v6
170
37
 
171
- # Project global is explicit-only:
172
- kushi promote <project> <answer-page> # refuses if identifiers detected
173
- kushi promote <project> <answer-page> --force # redacts + writes target + back-link
38
+ v6 is the **frill amputation** release — one profile, one job:
174
39
 
175
- # Routing under ask-project:
176
- kushi ask <project> "..." # project-first (default)
177
- kushi ask <project> "..." --global # global-first
178
- kushi ask <project> "..." --project-only # suppress global
179
- ```
40
+ - **Capture**: Evidence pulls from 7 sources (email, teams, meetings, onenote, sharepoint, crm, ado).
41
+ - **Answer**: cited Q&A over Evidence/ only (no hallucination, no web).
42
+ - **FDE**: intake / triage / report authoring prompts.
43
+ - **ADO**: propose + apply update reports.
180
44
 
181
- The global root honors `$KUSHI_GLOBAL_ROOT` (used by tests). There is no auto-promotion path — privacy is always your call. See `plugin/instructions/global-wiki.instructions.md` + `plugin/instructions/multi-wiki-routing.instructions.md`.
45
+ Removed in v6: State/, global wiki, dashboards, tours, learning candidates,
46
+ schema-evolve, teach, lint-state, build-state. See `CHANGELOG.md` for the
47
+ full list.
182
48
 
183
49
  ---
184
50
 
185
- ## Three install profiles
186
-
187
- Kushi ships in three tiers. Pick how much you take — the default (`standard`) matches v2.x behavior end-to-end.
188
-
189
- | Profile | What's installed | Pick this if… |
190
- |---|---|---|
191
- | **`core`** | Aggregator only: `aggregate`, `consolidate`, `status`, `pull`, `ask` | You want raw Evidence/ + cited Q&A — typically to feed an external rollup repo or BI system. |
192
- | **`standard`** *(default)* | core + `bootstrap`, `refresh`, FDE authoring trio (`fde-intake`, `fde-report`, `fde-triage`) + FDE reference pack | Kushi's default opinion. No State/ rollup. |
193
- | **`full`** | standard + `state` (renders the opinionated `State/` rollup) | You want everything, including the outcome-based State/ files. |
194
-
195
- ```bash
196
- npx kushi-agents --clawpilot # default = standard
197
- npx kushi-agents --clawpilot --profile core # aggregator only
198
- npx kushi-agents --clawpilot --profile full # everything
199
- ```
200
-
201
- The Evidence/ folder produced by every profile is a **stable public contract** — external systems can read from it without depending on Kushi internals. See [Concepts → Profiles and report packs](https://gim-home.github.io/kushi/concepts/profiles-and-packs/) and the [Evidence contract](https://gim-home.github.io/kushi/reference/evidence-contract/).
202
-
203
51
  ## Verbs
204
52
 
205
- | Verb | Profile | Window | What it does |
206
- |------|---------|--------|--------------|
207
- | `setup` | core+ | n/a | Functionally verify WorkIQ is reachable + auto-fill contributor identity. Idempotent. Run once per machine before first `bootstrap`/`refresh`. |
208
- | `aggregate` | core+ | last watermark → now | Pull every enabled source + consolidate. **No State/ rebuild.** |
209
- | `bootstrap` | standard+ | 30 days (default) | First-time setup — scaffold folders, lay configs side-by-side, initial pull. Profile-aware (builds State only on `full`). |
210
- | `refresh` | standard+ | last watermark → now | Pull only what changed. Profile-aware (rebuilds State only on `full`). |
211
- | `state` | full | n/a | Render the outcome-based `State/` files from existing evidence. No new pulls. v5.0.0 also emits Karpathy-style layout (`index.md` + `log.md` + per-entity pages under closed-set categories + `CLAUDE.md`/`AGENTS.md`). |
212
- | `link-entities` | standard+ | n/a | v5.0.0 — Build the cross-source entity graph (`Evidence/_graph/project-graph.json`). Deterministic; opt-in LLM augment. |
213
- | `dashboard` | standard+ | n/a | v5.0.0 — Render `<project>/dashboard.html` — single self-contained Cytoscape.js v3 dashboard with Graph + Timeline views, filters, fuzzy search, side panel. |
214
- | `tour` | standard+ | n/a | v5.0.0 — Render `<project>/State/tour.md`, an auto-generated week-in-review walkthrough scored by `recency_weight × cross_ref_count`. |
215
- | `consolidate` | core+ | per week | Merge per-user streams into `_Consolidated/<YYYY-MM-DD>_consolidated.md`. |
216
- | `status` | core+ | n/a | Show the run-log for a project. |
217
- | `ask` | core+ | n/a | Read-only natural-language Q&A. Always cites. Auto-routes. |
218
- | `fde-intake` | standard+ | n/a | Capture the 6 FDE intake questions → `Reports/00-FDE-Intake-<project>.md` (updated in place). |
219
- | `fde-report` | standard+ | n/a | FDE report generator. 5 shapes: `weekly` (default), `short`, `long`, `fitness`, `stage-readiness`. |
220
- | `fde-triage` | standard+ | n/a | 7-file FDE triage bundle at `Reports/triage/<YYYY-MM-DD>/`. File 07 merges across re-runs. |
221
- | `propose-ado` | **preview** | n/a | Read-only ADO update proposal from latest `_Consolidated/` → `ado-updates/<date>/proposed.md`. Safe to schedule. No ADO writes. |
222
- | `apply-ado` | **preview** | n/a | Gated apply skill. v0.1.0-preview is dry-mode only (writes `planned.jsonl`); real ADO PATCH/POST lands in v0.1.x. |
223
- | `vertex-link` | **preview** | n/a | One-time link of a kushi project to a vertex repo `<customer>/<initiative>` (multi-binding supported). Populates `kushi.yaml#vertex`. Re-run with `--reconfigure` to change. |
224
- | `emit-vertex` | **preview** | n/a | Render vertex-shaped artifacts from kushi Evidence/+State/ weekly status, decisions, workshops, comms, living-doc diff proposals. Stages first, validates against vertex's own schemas, applies on demand. |
225
- | `doctor` | core+ | n/a | v5.4.0 Aggregated health check (env, self-check, evals, skill-checker, live-install drift, global wiki). `--json` for CI; `--strict` to fail on yellow. |
226
- | `lint` | standard+ | n/a | v5.1.0 Run wiki-lint checks against `State/` (contradictions, stale claims, orphans, missing cross-refs, data gaps). Writes `State/reports/lint-YYYY-MM-DD.md`. |
227
- | `teach` | standard+ | n/a | v5.2.0 — Persist a reusable fact/preference/pattern under `.kushi/learnings/`. |
228
- | `explain` | standard+ | n/a | v5.2.0 — Retrieve a previously taught fact/preference/pattern from `.kushi/learnings/`. |
229
- | `promote` | standard+ | n/a | v5.3.0 — Copy a project State page into the global wiki at `~/.kushi-global/` with identifier redaction + back-link + dual log. Refuses without `--force` when identifiers detected. |
230
- | `migrate-files` | standard+ | n/a | v5.4.4 — One-time migration of root-level `bootstrap-status.md` / `FOLLOW-UPS.md` / `OPEN-QUESTIONS-DRAFT.md` to per-user `Evidence/<alias>/`. Dry-run by default; `--apply` to commit. Refuses to overwrite on content conflict. |
231
- | `global` (init/status/ask/lint) | standard+ | n/a | v5.3.0 — Manage the per-user cross-engagement wiki at `~/.kushi-global/State/`. |
232
- | `schema-evolve` | standard+ | n/a | v5.2.0 — Migrate `kushi.yaml` and Evidence/ layouts across schema versions; idempotent + dry-run by default. |
233
- | `create-skill` / `check-skill` | full | n/a | v5.0.4 — Skill-authoring harness (scaffold a new skill; lint/retrofit every SKILL.md against `skill-authoring.instructions.md`). |
234
-
235
- See [Quickstart](https://gim-home.github.io/kushi/getting-started/quickstart/) for the full workflow.
236
-
237
- ### Doctor works from both layouts (v5.4.5+)
238
-
239
- `doctor` and `self-check` are **layout-portable**: they run cleanly from either the **source tree** (this repo: `plugin/skills/...`) or an **installed host directory** (e.g. `~/.vscode/chat/skills/kushi/skills/...` — FLAT, no `plugin/` prefix). A banner like `[layout=source]` or `[layout=install (host=clawpilot)]` prints at the top of every run so you know which personality is active.
240
-
241
- - **Source mode** (default in this repo): runs the full source-author surface (C1..C12, D1..D43).
242
- - **Install mode**: runs a focused install-integrity probe set (manifest validity, every enumerated skill present, agent file, skills-metadata sibling, npm-latest drift if `npm` is on PATH, optional global wiki shape). Fix hints become `Re-install: npx kushi-agents@latest --<host> --force` instead of "restore from git".
243
-
244
- Force a mode with `-LayoutMode source|install` on either script; default is `auto`.
245
-
246
- ## Install
247
-
248
- Kushi supports **two host surfaces** as first-class peers (v5.0.2+):
249
-
250
- | Host | Install path | Best for |
251
- |---------------------------------------|------------------------------------|-----------------------------------------|
252
- | **Clawpilot CLI** | `~/.copilot/m-skills/kushi/` | Scheduled / overnight runs (e.g. `kushi refresh <project>` at 6 AM via automation) |
253
- | **VS Code Chat** ("GitHub Copilot Chat") | `~/.vscode/chat/skills/kushi/` | Interactive use (`@kushi what's the MACC for X?`) |
254
-
255
- Both hosts read the **same** Evidence/ tree on disk, so a refresh from one is immediately visible from the other — the same user routinely lives in both. SKILL content is host-agnostic (no per-host branching, enforced by self-check `D32.multi-host`).
256
-
257
- ```bash
258
- # Install to a single host
259
- npx kushi-agents --clawpilot # Clawpilot only
260
- npx kushi-agents --vscode # VS Code Chat only
261
-
262
- # Install to BOTH at once (auto-detects what's present + targets both)
263
- # v5.7.1+: when run from inside a project dir, also refreshes <cwd>/.kushi/.
264
- npx kushi-agents --all-hosts
265
-
266
- # Uninstall
267
- npx kushi-agents --uninstall # all detected hosts
268
- npx kushi-agents --uninstall --clawpilot # Clawpilot only
269
- npx kushi-agents --uninstall --vscode # VS Code Chat only
270
- npx kushi-agents --uninstall --all # both
271
-
272
- # Legacy workspace install (per-project .kushi/ in cwd)
273
- npx kushi-agents # default = standard profile
274
- npx kushi-agents --profile core # aggregator only
275
- ```
276
-
277
- The 2-host matrix is a deliberate cap — see [`plugin/instructions/multi-host-install.instructions.md`](plugin/instructions/multi-host-install.instructions.md) for the rationale + per-host layout details.
278
-
279
- ```bash
280
- npx kushi-agents --clawpilot --profile full # everything
281
- ```
282
-
283
- To switch profiles later, re-run with `--force` (cleanly handles downgrades):
284
-
285
- ```bash
286
- npx kushi-agents --clawpilot --profile core --force
287
- ```
288
-
289
- > **Bleeding-edge from GitHub (Microsoft org members only)**: `npx github:gim-home/kushi …` works identically and pulls straight from the source repo — useful for testing pre-release commits. Stick to `npx kushi-agents` for everything else.
290
-
291
- See [Install](https://gim-home.github.io/kushi/getting-started/install/) for flags, prerequisites, and per-user config.
53
+ | Verb | What it does | Where it runs |
54
+ |------|--------------|---------------|
55
+ | `setup` | One-time identity + host config | terminal |
56
+ | `bootstrap` | Scaffold `<root>/<P>/Evidence/<alias>/` tree | terminal |
57
+ | `discover` | Ask WorkIQ to fill `boundaries.yml` + `integrations.yml` | terminal |
58
+ | `refresh` | Pull this week's evidence (alias: `update`, `pull`, `sync`) | terminal |
59
+ | `references` | Resolve external URLs into `Evidence/_shared/references/` | terminal |
60
+ | `lint` | Validate Evidence/ against the CSC schema | terminal |
61
+ | `migrate-files` | One-time helper to move legacy files into the v6 layout | terminal |
62
+ | `doctor` | Self-check: hashes, canary, install drift | terminal |
63
+ | `ask` | Cited Q&A in chat (read-only) | chat |
64
+ | `status` | Latest evidence summary | chat |
65
+ | `aggregate` | Roll a contributor's per-week files into `_aggregated/` | chat |
66
+ | `consolidate` | Merge multiple contributors' aggregations | chat |
67
+ | `fde-intake` | Author an FDE intake brief | chat |
68
+ | `fde-triage` | Author an FDE triage decision matrix | chat |
69
+ | `fde-report` | Author an FDE outcome report | chat |
70
+ | `propose-ado` | Draft an ADO update report | chat |
71
+ | `apply-ado` | Apply an approved ADO update report | chat |
72
+ | `link-entities` | Cross-source entity link cache for `ask` | chat |
73
+ | `vertex-link` | Link a Vertex node into an external rollup | chat |
74
+ | `emit-vertex` | Emit a Vertex bridge artifact | chat |
292
75
 
293
- ## What it does
294
-
295
- Engagement context lives in too many places. By the time someone asks "what was decided about the architecture?" or "who is the EM on project X?" the answer is buried across emails, Teams threads, OneNote pages, SharePoint files, meeting transcripts, CRM records, and ADO work items.
296
-
297
- Kushi pulls all of those into a structured, citable, per-engagement folder — and lets you ask grounded questions that always cite the source.
298
-
299
- - **WorkIQ-only**: every source pull uses WorkIQ. We walk you through [installing it](docs/getting-started/install-workiq.md) — Microsoft Graph isn't a viable fallback here. When WorkIQ can't answer, Kushi asks you to paste rather than producing thin metadata.
300
- - **Snapshot + stream**: current truth and the trail of how we got there.
301
- - **Citation per assertion**: every claim in State files and answers points back to a real source file with a date.
302
- - **Host-agnostic**: works in VS Code Chat or Clawpilot CLI.
303
-
304
- ## Output shapes (what aggregation writes to disk)
305
-
306
- For each source, Kushi produces two output shapes:
307
-
308
- | Shape | What | Filename | Refresh behavior |
309
- |-------|------|----------|------------------|
310
- | **Snapshot** | Current state of an entity (page body, work item, CRM record, file content) | `snapshot/<entity>.md` (NO date in filename) | **Replace** on every refresh |
311
- | **Stream** | Timestamped events (emails, messages, edits, comments, state changes) | `stream/<YYYY-MM-DD>_<source>-stream.md` (Monday of ISO week) | **Append**, dedupe by event ID |
312
-
313
- Email is stream-only (emails ARE events). Every other source has both. `ask-project` reads both shapes when answering.
314
-
315
- ## Documentation
316
-
317
- | | |
318
- |---|---|
319
- | 🚀 [Getting started](https://gim-home.github.io/kushi/getting-started/) | Install + quickstart — pick a target, run one `npx` command |
320
- | 💡 [Concepts](https://gim-home.github.io/kushi/concepts/) | Hosts, storage backends, snapshot vs stream, multi-user model |
321
- | 🤝 [Kushi with Vertex](docs/concepts/kushi-with-vertex.md) | Using kushi alongside the [vertex](https://github.com/commercial-software-engineering/vertex) shared note-taking platform — better weekly status, decisions, workshops, and comms |
322
- | 🛠️ [How-to guides](https://gim-home.github.io/kushi/how-to/) | Schedule refreshes, add contributors, switch backends, upgrade, uninstall |
323
- | 📖 [Reference](https://gim-home.github.io/kushi/reference/) | Verbs, CLI options, config files, path map, self-check |
324
- | 📋 [Changelog](CHANGELOG.md) | Release history |
76
+ ---
325
77
 
326
- ## Repository layout (high level)
78
+ ## Layout
327
79
 
328
80
  ```text
329
- kushi/
330
- ├── bin/cli.mjs Installer entry point
331
- ├── src/ Installer source
332
- ├── plugin/ THE PAYLOAD that ships into .kushi/ (or ~/.copilot/m-skills/kushi/)
333
- │ ├── plugin.json
334
- ├── agents/
335
- │ ├── instructions/
336
- ├── prompts/
337
- │ ├── skills/
338
- │ └── templates/
339
- ├── docs/ MkDocs Material site (deployed to GitHub Pages)
340
- ├── mkdocs.yml
341
- ├── requirements-docs.txt
342
- ├── README.md
343
- ├── CHANGELOG.md
344
- └── LICENSE
345
- ```
346
-
347
- See [docs/reference/where-things-live.md](docs/reference/where-things-live.md) for the complete layout.
348
-
349
- ## Contributing
350
-
351
- See [CONTRIBUTING.md](CONTRIBUTING.md) for the full contributor guide — repo layout, dev environment setup, the pre-commit checklist (self-check + mkdocs + npm pack), commit conventions, and how to add new skills/instructions/templates.
352
-
353
- Quick pre-commit check:
81
+ <engagement-root>/
82
+ └── <ProjectName>/
83
+ ├── boundaries.yml ← per-source query scope (auto-filled by `discover`)
84
+ ├── integrations.yml CRM/ADO/SharePoint pointers
85
+ └── Evidence/
86
+ ├── _shared/
87
+ │ ├── references/ ← URLs from project docs, fetched + cited
88
+ └── _aggregated/ ← `consolidate` output
89
+ └── <your-alias>/
90
+ ├── _ledger.yml ← per-week pull receipts
91
+ ├── email/<week>/
92
+ ├── teams/<week>/
93
+ ├── meetings/<week>/
94
+ ├── onenote/<week>/
95
+ ├── sharepoint/<week>/
96
+ ├── crm/<week>/
97
+ └── ado/<week>/
98
+ ```
99
+
100
+ Each evidence file is a **CSC** (Cite-Source-Capture) markdown block —
101
+ deterministic, hand-readable, grep-friendly.
354
102
 
355
- ```powershell
356
- pwsh plugin/skills/self-check/run.ps1 -Deep
357
- mkdocs build --strict
358
- npm pack --dry-run
359
- ```
360
-
361
- The self-check validates frontmatter, agent inventory, prompt → skill routing, profile manifest, reference packs, cross-links, the verbs table in this README, and the layout diagram in `docs/reference/where-things-live.md`. Full reference: [docs/reference/self-check.md](docs/reference/self-check.md).
362
-
363
- ## Authoring a new skill (v5.0.4+)
364
-
365
- Adding a new skill takes one command + a per-skill lint loop:
366
-
367
- ```powershell
368
- node bin/cli.mjs create-skill --name my-thing --type writer --description "Generates the foo report from State/"
369
- node bin/cli.mjs check-skill --name my-thing
370
- node bin/cli.mjs check-skill --name my-thing --retrofit --apply # auto-fix additive findings
371
- npm run eval -- my-thing
372
- ```
103
+ ---
373
104
 
374
- Full walkthrough: [`docs/contributing/skill-authoring.md`](docs/contributing/skill-authoring.md). Doctrine: [`plugin/instructions/skill-authoring.instructions.md`](plugin/instructions/skill-authoring.instructions.md). Repo-wide dogfood baseline: [`docs/audits/v5.0.4-skill-creator-dogfood.md`](docs/audits/v5.0.4-skill-creator-dogfood.md).
105
+ ## Env vars
375
106
 
376
- ## Evaluating skills (v5.0.3+)
107
+ | Var | Effect |
108
+ |-----|--------|
109
+ | `KUSHI_ALIAS` | Your alias (overrides `.kushi/config/user/project-evidence.yml`). |
110
+ | `KUSHI_WIZARD_ROOT` | Engagement root for `kushi setup` (non-interactive). |
111
+ | `KUSHI_WIZARD_HOSTS` | `clawpilot` / `vscode` / `both`. |
112
+ | `KUSHI_WIZARD_GLOBAL` | `y` / `n`. |
113
+ | `KUSHI_WIZARD_WORKSPACE` | `y` / `n` — scaffold cwd as a kushi workspace. |
114
+ | `KUSHI_WORKIQ_BIN` | Path to the WorkIQ binary (auto-detected by default). |
115
+ | `KUSHI_DISCOVER_HEARTBEAT_MS` | Heartbeat cadence for `discover` progress logs. |
377
116
 
378
- Every skill ships per-case evals at `plugin/skills/<name>/evals/evals.json`, aligned with the [agentskills.io evaluating-skills spec](https://agentskills.io/skill-creation/evaluating-skills). Doctrine: [`plugin/instructions/skill-evals.instructions.md`](plugin/instructions/skill-evals.instructions.md).
117
+ ---
379
118
 
380
- Quickstart:
119
+ ## Develop
381
120
 
382
121
  ```powershell
383
- npm run eval:canary # ~6 skills, runs in seconds — what PRs run
384
- npm run eval:all # full suite (every plugin/skills/<name>/)
385
- npm run eval -- ask-project # one skill
386
- npm run eval:baseline # maintainer-only: refresh evals/baseline.json
122
+ git clone <repo> kushi
123
+ cd kushi
124
+ npm install
125
+ npm test # 279 tests
126
+ npm run eval:canary # 8/8 fixture-based grader cases
127
+ node bin/cli.mjs doctor # green when canary + hashes line up
387
128
  ```
388
129
 
389
- Outputs:
390
-
391
- - `Evidence/_evals/<utc-ts>.json` — per-run JSON (pass/fail + duration + tokens per case).
392
- - `Evidence/_evals/benchmark.json` — per-skill mean/stddev for `pass_rate`, `duration_ms`, `tokens_total` + regression flags vs `evals/baseline.json`.
393
-
394
- Regressions flagged at ≥10pp pass-rate drop OR ≥50% latency/token increase. The canary subset is `ask-project`, `bootstrap-project`, `refresh-project`, `link-entities`, `build-state`, `self-check`.
395
-
396
- **Privacy:** fixtures under `evals/fixtures/` are synthetic. NEVER copy real customer data into the evals tree.
130
+ ---
397
131
 
398
132
  ## License
399
133
 
400
- See [LICENSE](LICENSE).
134
+ MIT.