kushi-agents 4.8.3 → 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.
Files changed (59) hide show
  1. package/README.md +18 -1
  2. package/package.json +2 -2
  3. package/plugin/agents/kushi.agent.md +8 -2
  4. package/plugin/instructions/comprehensive-structured-capture.instructions.md +250 -0
  5. package/plugin/instructions/dashboard-artifact.instructions.md +132 -0
  6. package/plugin/instructions/entity-graph.instructions.md +160 -0
  7. package/plugin/instructions/evidence-layout-canonical.instructions.md +20 -12
  8. package/plugin/instructions/evidence-thoroughness.instructions.md +119 -225
  9. package/plugin/instructions/guided-tour.instructions.md +100 -0
  10. package/plugin/instructions/host-portability.instructions.md +77 -0
  11. package/plugin/instructions/identity-resolution.instructions.md +1 -1
  12. package/plugin/instructions/karpathy-state-layout.instructions.md +124 -0
  13. package/plugin/instructions/meetings-verbatim-required.instructions.md +6 -4
  14. package/plugin/instructions/scope-boundaries.instructions.md +1 -1
  15. package/plugin/instructions/snapshot-vs-stream.instructions.md +25 -1
  16. package/plugin/instructions/verbatim-by-default.instructions.md +21 -1
  17. package/plugin/instructions/weekly-csc.instructions.md +335 -0
  18. package/plugin/instructions/workiq-only.instructions.md +140 -1
  19. package/plugin/plugin.json +17 -6
  20. package/plugin/prompts/dashboard.prompt.md +29 -0
  21. package/plugin/prompts/link-entities.prompt.md +30 -0
  22. package/plugin/prompts/tour.prompt.md +30 -0
  23. package/plugin/skills/ask-project/SKILL.md +37 -6
  24. package/plugin/skills/bootstrap-project/SKILL.md +33 -5
  25. package/plugin/skills/build-state/SKILL.md +70 -8
  26. package/plugin/skills/consolidate-evidence/SKILL.md +27 -4
  27. package/plugin/skills/dashboard/SKILL.md +113 -0
  28. package/plugin/skills/link-entities/SKILL.md +216 -0
  29. package/plugin/skills/link-entities/build-graph.ps1 +483 -0
  30. package/plugin/skills/pull-ado/SKILL.md +85 -9
  31. package/plugin/skills/pull-crm/SKILL.md +87 -10
  32. package/plugin/skills/pull-email/SKILL.md +75 -11
  33. package/plugin/skills/pull-meetings/SKILL.md +83 -8
  34. package/plugin/skills/pull-onenote/SKILL.md +86 -9
  35. package/plugin/skills/pull-sharepoint/SKILL.md +73 -10
  36. package/plugin/skills/pull-teams/SKILL.md +78 -9
  37. package/plugin/skills/refresh-project/SKILL.md +37 -5
  38. package/plugin/skills/self-check/SKILL.md +16 -0
  39. package/plugin/skills/self-check/run.ps1 +328 -0
  40. package/plugin/skills/setup/SKILL.md +1 -1
  41. package/plugin/skills/tour/SKILL.md +68 -0
  42. package/plugin/skills/tour/build-tour.ps1 +185 -0
  43. package/plugin/templates/dashboard/dashboard.template.html +431 -0
  44. package/plugin/templates/dashboard/embedder.ps1 +56 -0
  45. package/plugin/templates/init/integrations.template.yml +38 -24
  46. package/plugin/templates/snapshot/DEPRECATED-v4.9.0.md +37 -0
  47. package/plugin/templates/state/AGENTS.template.md +33 -0
  48. package/plugin/templates/state/CLAUDE.template.md +33 -0
  49. package/plugin/templates/state/index.template.md +41 -0
  50. package/plugin/templates/state/log.template.md +14 -0
  51. package/plugin/templates/state/page.template.md +22 -0
  52. package/plugin/templates/weekly/_index_entities.template.yml +26 -0
  53. package/plugin/templates/weekly/ado-csc.template.md +113 -0
  54. package/plugin/templates/weekly/crm-csc.template.md +103 -0
  55. package/plugin/templates/weekly/email-csc.template.md +114 -0
  56. package/plugin/templates/weekly/meetings-csc.template.md +112 -0
  57. package/plugin/templates/weekly/onenote-csc.template.md +95 -0
  58. package/plugin/templates/weekly/sharepoint-csc.template.md +98 -0
  59. package/plugin/templates/weekly/teams-csc.template.md +100 -0
@@ -30,13 +30,13 @@ For every project under `<engagement-root>/`:
30
30
  .settings.yml
31
31
  refresh-reports/
32
32
  open-questions/
33
- ado/ { snapshot/ , stream/ }
34
- crm/ { snapshot/ , stream/ }
35
- email/ { snapshot/ , stream/ , _index/ , _legacy_*/ }
36
- meetings/ { snapshot/ , stream/ , verbatim/ }
37
- onenote/ { snapshot/ , stream/ , refresh-reports/ }
38
- sharepoint/ { snapshot/ , stream/ }
39
- teams/ { snapshot/ , stream/ }
33
+ ado/ { weekly/ , _index/ } # legacy-read: snapshot/, stream/
34
+ crm/ { weekly/ , _index/ } # legacy-read: snapshot/, stream/
35
+ email/ { weekly/ , _index/ , _legacy_*/ } # legacy-read: snapshot/, stream/
36
+ meetings/ { weekly/ , _index/ , verbatim/ } # verbatim/ is required (expiring source); legacy-read: snapshot/, stream/
37
+ onenote/ { weekly/ , _index/ , refresh-reports/ } # legacy-read: snapshot/, stream/
38
+ sharepoint/ { weekly/ , _index/ } # legacy-read: snapshot/, stream/
39
+ teams/ { weekly/ , _index/ } # legacy-read: snapshot/, stream/
40
40
  State/ # rendered by build-state (read-only outcome)
41
41
  Reports/ # rendered by aggregate / fde-report (read-only)
42
42
  integrations.yml # per-project boundaries (scope-boundaries.instructions.md)
@@ -44,21 +44,27 @@ For every project under `<engagement-root>/`:
44
44
 
45
45
  `Evidence/` and `<alias>/` are the **only** levels a pull skill may create under `<project>/`. Nothing else.
46
46
 
47
+ **v4.9.0 shape change:** pull-* skills now write a single `weekly/` folder per source + a thin
48
+ `_index/entities.yml`, per `weekly-csc.instructions.md`. The old `snapshot/` + `stream/`
49
+ folders are **legacy** — readers may still read them (for graceful migration), but no new
50
+ writes go to them. `meetings/verbatim/<dir>/` is kept (the only expiring source). See
51
+ `weekly-csc.instructions.md` for the writer/reader contracts.
52
+
47
53
  ### Rule 2 — Sibling source-output folders under `<project>/` are FORBIDDEN
48
54
 
49
55
  Concretely, a pull skill MUST NOT create or write to any of these (representative — list is illustrative, not exhaustive):
50
56
 
51
57
  | Forbidden path | Canonical replacement |
52
58
  |---|---|
53
- | `<project>/email-context/` | `<project>/Evidence/<alias>/email/snapshot/` + `stream/` |
59
+ | `<project>/email-context/` | `<project>/Evidence/<alias>/email/weekly/` |
54
60
  | `<project>/email/` (at project root) | `<project>/Evidence/<alias>/email/` |
55
- | `<project>/notes/` | `<project>/Evidence/<alias>/onenote/snapshot/pages/` |
56
- | `<project>/_Weekly Summaries/` | `<project>/Evidence/<alias>/<source>/stream/` |
61
+ | `<project>/notes/` | `<project>/Evidence/<alias>/onenote/weekly/` |
62
+ | `<project>/_Weekly Summaries/` | `<project>/Evidence/<alias>/<source>/weekly/` |
57
63
  | `<project>/Meetings/` (at project root) | `<project>/Evidence/<alias>/meetings/` |
58
64
  | `<project>/Teams/` (at project root) | `<project>/Evidence/<alias>/teams/` |
59
65
  | `<project>/SharePoint/` (at project root) | `<project>/Evidence/<alias>/sharepoint/` |
60
66
  | `<project>/CRM/`, `<project>/ADO/` (at project root) | `<project>/Evidence/<alias>/{crm,ado}/` |
61
- | any `<project>/<source>-context/`, `<project>/<source>-summary/`, etc. | `<project>/Evidence/<alias>/<source>/snapshot/` |
67
+ | any `<project>/<source>-context/`, `<project>/<source>-summary/`, etc. | `<project>/Evidence/<alias>/<source>/weekly/` |
62
68
 
63
69
  `State/`, `Reports/`, `integrations.yml` are the **only** top-level siblings of `Evidence/` that pull/refresh skills are allowed to leave alone (they are written by `build-state`, `aggregate-project`, and bootstrap respectively — not by pull-* skills).
64
70
 
@@ -103,7 +109,9 @@ Together they guarantee that two contributors running the same verb on the same
103
109
 
104
110
  ## Cross-references
105
111
 
106
- - `snapshot-vs-stream.instructions.md` — the two shapes inside each `<source>/` folder.
112
+ - `weekly-csc.instructions.md` — the v4.9.0 layout inside each `<source>/` folder (weekly/ + _index/).
113
+ - `snapshot-vs-stream.instructions.md` — DEPRECATED v4.9.0; legacy two-folder model.
114
+ - `comprehensive-structured-capture.instructions.md` — the v4.9.0 block shape inside weekly/ files.
107
115
  - `scope-boundaries.instructions.md` — what each source is allowed to query (orthogonal: scope vs path).
108
116
  - `side-by-side-config.instructions.md` — config files (mutable hints, integrations.yml) live under `<workspace>/.kushi/config/` (v4.4.0+, was `<engagement-root>/.project-evidence/`).
109
117
  - `run-reports.instructions.md` — every layout-migration MUST appear in the refresh report.
@@ -1,234 +1,128 @@
1
- ---
2
- applyTo: "**"
3
- description: "Evidence Thoroughness Standard — every per-source skill MUST capture full bodies, full transcripts, full message reproduction. Headlines-only is a defect."
4
- ---
5
-
6
- # Evidence Thoroughness Standard (HARD RULE)
7
-
8
- Evidence files are the **system of record** that State files cite. They MUST be deep enough that a reader can fully reconstruct what happened without going back to Outlook / Teams / OneNote / SharePoint / CRM / ADO. **Headlines-only summaries are a defect.**
9
-
10
- > **Orthogonal to scope:** depth (this file) and scope (`scope-boundaries.instructions.md`) are independent. Boundaries declare *where Kushi is allowed to look*; depth declares *how completely it captures what it found*. A skill must satisfy BOTH: refuse if the boundary is missing, then capture at full depth inside the boundary. Coverage Notes blocks at the bottom of every entity MUST enumerate which boundaries were applied (per Rule 4 of `scope-boundaries.instructions.md`).
11
-
12
- ## Universal rule — AI Narrative Summary required FIRST
13
-
14
- Every per-entity block (per meeting, per email thread, per Teams thread, per OneNote page, per SharePoint key file, per CRM/ADO record) MUST open with an **`### AI Narrative Summary`** sub-section before any structured sub-sections (Decisions / Actions / Risks / etc.).
15
-
16
- The AI Narrative Summary:
17
- - Is a **multi-paragraph prose summary** (minimum 3 paragraphs for any non-trivial entity; 5+ paragraphs for substantive meetings, threads, or pages) that captures **every detail discussed** — context, what was said by whom, the reasoning, the back-and-forth, side-tangents, soft commitments, sentiment, and any nuance — not just the outcomes.
18
- - Reads like a thorough briefing for someone who wasn't there. A reader who only reads the AI Narrative Summary should be able to answer "what happened, why, who pushed which view, what's the tone, what's still unresolved?" without scrolling further.
19
- - Is generated AFTER the full extraction (transcript / body / page content) is in hand, so it can faithfully cover **everything** — not summarized from headlines.
20
- - Carries inline `[source: …]` citations to the same evidence the structured sub-sections cite. No uncited paragraphs.
21
- - Is NOT a replacement for the structured sub-sections (Decisions, Action Items, Risks, etc.) or the verbatim transcript walk-through / message reproduction. It is **additional**, placed first, so a busy reader gets the full picture before drilling into structure.
22
-
23
- A per-entity block that has structured sub-sections but no AI Narrative Summary is a defect. A 2-paragraph "summary" that only lists outcomes is a defect — it must capture the discussion, not just the result.
24
-
25
- ## Universal rule — full discussion capture (HARD)
26
-
27
- Beyond the narrative summary, every per-entity block MUST also explicitly capture, as separate named sub-sections, the following — even when some are empty (write `_None surfaced._` rather than omit the section, so a reader knows it was checked):
28
-
29
- - **Questions Asked & Answered** — every question raised + the answer given (or "left open"), with who asked and who answered. Format as `Q: … — A: … [source: … · ts]`. Includes clarifying questions, challenge questions, status questions, asks for data, asks for opinion. **A meeting with zero captured Q&A is a defect** unless the meeting was a one-way readout (and even then, capture the Q&A from the Q&A portion at the end).
30
- - **Discussion Points (Bulleted, with Detail)** — every distinct topic touched, as a bullet, with a 2–5-line nested detail block per bullet covering: what was said, by whom, what positions surfaced, what arguments were made, what was concluded (or "deferred"). Not a one-line list — every bullet has nested detail.
31
- - **Decisions** — every decision with exact wording + who decided + supporting context + what was rejected.
32
- - **Plans (Current State)** — the plan as it stands at the end of the entity (meeting / thread / page). What is intended to happen, by when, by whom.
33
- - **Changes to Plans** — every adjustment to a previously-stated plan (whether stated earlier in the same meeting/thread or carried in from prior evidence): old plan → new plan + why it changed + who drove the change. Critical for tracing how an engagement evolves.
34
- - **Next Steps** — forward-looking commitments that aren't yet hard action items. Distinct from Action Items (those have owner+due). Capture even soft signals: "team will look into X", "we'll circle back next week".
35
- - **Action Items** — every commitment with owner + due + source-line.
36
- - **Open Questions / Non-Decisions** — questions raised but not resolved, with who raised them and why deferred. Distinct from "Questions Asked & Answered" (which captures resolved Q&A in this entity).
37
- - **Risks, Blockers, Dependencies** — surfaced or escalated.
38
- - **Customer Asks** — explicit asks the customer made of Microsoft.
39
-
40
- The existence of a section is mandatory; populating it is conditional on the source. **Empty sections must be written explicitly as `_None surfaced._`** so a reader can distinguish "checked and empty" from "skipped".
41
-
42
- ## Per-source minimum bar
43
-
44
- ### Meetings (stream/)
45
- For every meeting in the window — capture, **as separate named sections under each per-meeting block**, in this order (every section MUST be present; if empty, write `_None surfaced._`):
46
- - **AI Narrative Summary** (REQUIRED FIRST per the universal rule above) — 5+ paragraphs covering the whole meeting end-to-end: context coming in, what was discussed in what order, who took which position, the reasoning behind each position, the back-and-forth, soft / forward-looking signals, sentiment, what landed and what stayed open. Cite the transcript timestamps inline.
47
- - Full attendee list (required + optional + actual + no-shows)
48
- - Agenda / stated purpose
49
- - **Detailed Discussion Summary** — multi-paragraph structured narrative of what was actually discussed end-to-end, organized by topic (the AI Narrative Summary is chronological/holistic; this section is topic-organized; both are required)
50
- - **Discussion Points (Bulleted, with Detail)** — every distinct topic, as a bullet with nested 2–5-line detail block (positions, arguments, what was concluded)
51
- - **Questions Asked & Answered** — every Q raised + the A given (or "left open"), `Q: … — A: …` format, with attribution
52
- - **Chronological transcript walk-through with verbatim quotes and timestamps** — every substantive exchange, not just 2 highlight quotes
53
- - **Plans (Current State)** — the plan as it stands at end of meeting
54
- - **Changes to Plans** — old plan → new plan + why + who drove the change
55
- - **Key Decisions** — every decision with exact wording + who decided + supporting context + what was rejected
56
- - **Open Questions / Non-Decisions** — questions raised but not resolved, with who raised them and why deferred
57
- - **Next Steps** — REQUIRED dedicated section. Forward-looking commitments that aren't yet hard action items: "team will gather facts", "Mike will discuss with industry leads", "Microsoft to come back with proposal next week". These are distinct from `Action Items` (which have owner+due) and are critical to State/05_action-items + State/04_workshops-and-key-meetings rendering.
58
- - **Action Items** — every commitment with owner + due + source-line
59
- - **Risks, Blockers, Dependencies** — surfaced or escalated in this meeting
60
- - **Customer Asks** — explicit asks the customer made of Microsoft (resourcing, decisions, timelines, escalations)
61
- - Every artifact link / shared file / recording / transcript URL
62
- - **Coverage Notes** — what was retrievable vs what wasn't (transcript missing, chat-only reconstruction, partial recap, etc.)
63
-
64
- If transcript is unavailable, document why and pull chat transcript + Copilot recap + meeting chat thread to reconstruct. Per-meeting sub-section is mandatory; one block per meeting. **A 30-line meetings file for a week with 2 meetings is a defect — expect 400+ lines, with the structure above repeated per meeting.** A per-meeting block missing the explicit `Next Steps`, `Plans`, `Changes to Plans`, `Discussion Points`, or `Questions Asked & Answered` sections is a defect even if Action Items is present — they capture different things.
65
- - **Key Decisions** — every decision with exact wording + who decided + supporting context
66
- - **Open Questions / Non-Decisions** — questions raised but not resolved, with who raised them and why deferred
67
- - **Next Steps** — REQUIRED dedicated section. Forward-looking commitments that aren't yet hard action items: "team will gather facts", "Mike will discuss with industry leads", "Microsoft to come back with proposal next week". These are distinct from `Action Items` (which have owner+due) and are critical to State/05_action-items + State/04_workshops-and-key-meetings rendering.
68
- - **Action Items** — every commitment with owner + due + source-line
69
- - **Risks, Blockers, Dependencies** — surfaced or escalated in this meeting
70
- - **Customer Asks** — explicit asks the customer made of Microsoft (resourcing, decisions, timelines, escalations)
71
- - Every artifact link / shared file / recording / transcript URL
72
- - **Coverage Notes** — what was retrievable vs what wasn't (transcript missing, chat-only reconstruction, partial recap, etc.)
73
-
74
- If transcript is unavailable, document why and pull chat transcript + Copilot recap + meeting chat thread to reconstruct. Per-meeting sub-section is mandatory; one block per meeting. **A 30-line meetings file for a week with 2 meetings is a defect — expect 200+ lines, with the structure above repeated per meeting.** A per-meeting block missing the explicit `Next Steps` section is a defect even if Action Items is present — they capture different things.
75
-
76
- ### Teams chats (stream/)
77
- For every thread touched in the window — capture, in this order per thread:
78
- - **AI Narrative Summary** (REQUIRED FIRST) — 3+ paragraph prose covering what the thread is about, the conversation arc, who took which position, sentiment, what landed and what stayed open. Cite messages inline.
79
- - **Full message-by-message reproduction** (sender · timestamp · verbatim message text or close paraphrase), not just an outcome line. Group by thread, not by day. Include reactions, file attachments, links, replies. If a thread has 30 messages, reproduce all 30 (collapse only routine acks like 👍 / "thanks").
80
- - **Decisions / Action Items / Open Questions / Risks** captured by the thread.
81
-
82
- ### Emails (stream/)
83
- For every substantive thread — capture, in this order per thread:
84
- - **AI Narrative Summary** (REQUIRED FIRST) — 3+ paragraph prose: what the thread is about, who's pushing what, the back-and-forth, what was decided / asked / committed / left open, tone. Cite messages inline.
85
- - Sender, recipients (to + cc), subject, **full body or close paraphrase** for every message in the chain in order, attachments. Thread-level grouping. A one-line "X sent Y about Z" entry is insufficient — include enough body to convey what was actually said.
86
- - **Decisions / Action Items / Open Questions / Risks** surfaced by the thread.
87
-
88
- ### OneNote (snapshot/ + stream/)
89
- - `snapshot/pages/<page>.md` — start with **AI Narrative Summary** (REQUIRED FIRST, 3+ paragraphs covering what the page is about, structure, key points, anything noteworthy), then extract **full page bodies**, not just titles. Last-modified timestamp + author at the top.
90
- - `stream/<week>.md` — for each page-edit event: a 1–2 paragraph **AI Narrative Summary** of what changed and why it matters, then the diff summary itself.
91
-
92
- If Graph delegated-token isn't available, ask the user to paste page content rather than skip.
93
-
94
- ### SharePoint (snapshot/ + stream/)
95
- - `snapshot/tree.md` — full folder tree (no truncation). Mark each entry `[key]` / `[recent]` / `[pin]` / `[skip]` / `[tree-only]` so readers can see why a file was or wasn't expanded.
96
- - `snapshot/files/<path>.md` — start with **AI Narrative Summary** (REQUIRED FIRST, 3+ paragraphs: what the file is, what it argues / proposes / records, key positions, audience, why it matters), then a body summary at the same depth bar as a meeting transcript walk-through (decisions, risks, actions, owners, dates, key context). Bodies for: (a) **curated key files** (architecture, decisions, ADRs, deliverables, proposals, SOWs, business cases, roadmaps, plans), PLUS (b) **top-N most-recently-modified files** where N = `sharepoint.snapshot.recent_n` (default 25), PLUS (c) any user pins from `sharepoint.snapshot.always_include`. Per file: full filename (no truncation), changed-by, change-type, size, last-modified.
97
- - `stream/<week>.md` — file change events that week, each with a short **AI Narrative Summary** of what the change was and why it matters.
98
-
99
- ### CRM/ADO (snapshot/ + stream/)
100
- - `snapshot/<id>.md` — start with **AI Narrative Summary** (REQUIRED FIRST, 3+ paragraphs: the engagement / work item story so far, current stage, who owns it, what's at stake, latest status note in plain prose), then every field the API returns, every value.
101
- - `stream/<id>/<week>.md` — for the week as a whole: an **AI Narrative Summary** (REQUIRED FIRST) of what changed and what it means, then every field-level change with old → new + actor + timestamp, every comment / discussion verbatim.
102
-
103
- ## Volume guidance
104
-
105
- - Long files are EXPECTED. Compression is the enemy.
106
- - One file per source per week (stream) — do NOT split into one-file-per-meeting / one-file-per-thread.
107
- - One file per entity (snapshot) — do NOT consolidate multiple entities into one snapshot.
108
-
109
- ## Citation density
110
-
111
- Every paragraph still needs `[source: …]` citations — thoroughness does NOT relax the citation rule, it intensifies it. See `citation-ledger.instructions.md`.
112
-
113
- ## Fix-up loop
114
-
115
- If the user reads an evidence file and says "this is too light" or "I don't like the depth" or "more detail" or "full AI summary" — the skill MUST re-pull from source with deeper extraction and rewrite the file in the same fix-up turn — never defend a thin summary. Specifically: if the fix-up complaint is about the AI Narrative Summary being thin, expand it to 5+ paragraphs with full discussion coverage, not just outcomes.
116
-
117
- ## Pre-write checklist (every per-source skill)
118
-
119
- Before writing any per-entity block (meeting / thread / email / page / file / record), confirm:
120
-
121
- - [ ] AI Narrative Summary is the FIRST sub-section
122
- - [ ] It is multi-paragraph (3+ for non-trivial; 5+ for substantive meetings/threads/pages)
123
- - [ ] It captures discussion + reasoning + sentiment, not just outcomes
124
- - [ ] It carries inline `[source: …]` citations
125
- - [ ] **Questions Asked & Answered** section is present (populated or `_None surfaced._`)
126
- - [ ] **Discussion Points (Bulleted, with Detail)** section is present — each bullet has nested 2–5-line detail
127
- - [ ] **Plans (Current State)** section is present
128
- - [ ] **Changes to Plans** section is present
129
- - [ ] **Next Steps** section is present (distinct from Action Items)
130
- - [ ] All other structured sub-sections (Decisions / Action Items / Risks / Open Questions / Customer Asks) come AFTER, not instead of
131
- - [ ] Verbatim transcript / message reproduction / page body is still present (the AI summary does not replace it)
132
- - [ ] Empty sections explicitly say `_None surfaced._`, never omitted
133
-
134
- <!-- merged from evidence-thoroughness.instructions.md (v4.4.9) -->
135
- ## Detection algorithm
136
-
137
- Every `pull-*` skill MUST run this check after writing each evidence file. A file that fails the detector is a **defect** — it MUST be re-extracted with a richer query or replaced with pasted source content. The skill MUST NOT silently accept a thin file.
138
-
139
- This detector enforces `evidence-thoroughness.instructions.md` at runtime. The thoroughness doctrine defines what "full" means; this file defines how to **detect** and **fix** violations.
1
+ ---
2
+ applyTo: kushi-agents
3
+ priority: high
4
+ version: 2.0.0
5
+ ---
140
6
 
141
- ## Per-source minimum thresholds
142
-
143
- Apply the threshold for the source the file belongs to. A file fails if **any** check triggers.
144
-
145
- ### Email stream (`email/stream/*.md`)
146
-
147
- - Per thread block: body text ≥ **400 characters** (not counting headers / metadata / "see original" stubs).
148
- - Per thread block contains at least one of: `Body:`, `Reply chain`, or a quoted block.
149
- - File-level: ≥ 1 thread block per substantive subject mentioned in the windowed search results.
150
-
151
- ### Teams stream (`teams/stream/*.md`)
152
-
153
- - Per thread block: reproduces ≥ **5 messages** (or, if thread is shorter, ALL messages — collapse only routine acks 👍 / "thanks").
154
- - Each reproduced message has `<sender> · <timestamp>` line + verbatim or close-paraphrase text.
155
- - File-level: rejects "summary-only" files with no message-by-message reproduction.
156
-
157
- ### OneNote snapshot (`onenote/snapshot/pages/*.md`)
158
-
159
- - Page body text ≥ **600 characters** OR contains a `## Page Body` section followed by content (not just a link).
160
- - Page metadata block (last-modified, author) present.
161
-
162
- ### OneNote stream (`onenote/stream/*.md`)
163
-
164
- - Each page-edit event includes diff summary (what changed) — not just "page updated".
165
-
166
- ### SharePoint snapshot tree (`sharepoint/snapshot/tree.md`)
167
-
168
- - Tree is not truncated (no "…" or "N more" placeholders).
169
- - Each entry has a status tag: `[key]` / `[recent]` / `[pin]` / `[skip]` / `[tree-only]`.
170
-
171
- ### SharePoint snapshot file (`sharepoint/snapshot/files/*.md`)
7
+ # Evidence Thoroughness — Bullets-Only Depth Bar (v4.9.0)
172
8
 
173
- - Body summary **400 characters** OR explicit `[tree-only]` justification.
174
- - Has changed-by + change-type + last-modified.
9
+ > **v4.9.0:** This doctrine replaces the "AI Narrative Summary (multi-paragraph prose)"
10
+ > bar from v3.x/v4.8. The new bar is **Comprehensive Structured Capture (CSC)** — see
11
+ > [`comprehensive-structured-capture.instructions.md`](./comprehensive-structured-capture.instructions.md).
12
+ >
13
+ > CSC is **bullets only, no prose paragraphs anywhere**. This file defines the
14
+ > per-source **minimum bullet thresholds** and **per-source enforcement rules**
15
+ > that distinguish a thorough CSC block from a thin/lazy one.
175
16
 
176
- ### Meetings stream (`meetings/stream/*.md`)
17
+ ## Why a depth bar exists
177
18
 
178
- - Per meeting block contains ALL of the following named sections:
179
- - `## Detailed Discussion Summary`
180
- - `## Transcript Walk-Through` (or `## Chronological Walk-Through`)
181
- - `## Key Decisions`
182
- - `## Open Questions` (or `## Open Questions / Non-Decisions`)
183
- - `## Next Steps` ← **dedicated section, distinct from Action Items**
184
- - `## Action Items`
185
- - `## Next Steps` MUST be present even if empty (`_None this meeting._`) — missing the section is a defect.
186
- - Per meeting block: total length ≥ **800 characters**.
187
- - Action items: every bullet has owner + due (date OR "TBD" with reason) + `[source: …]` citation.
19
+ Pull skills will, by default, race to the shallowest possible output: a 1-line
20
+ title, a sender, a date, no detail. That output is useless for State/, useless
21
+ for Q&A, useless for consolidation.
188
22
 
189
- ### CRM/ADO snapshot (`crm/snapshot/*.md`, `ado/snapshot/*.md`)
23
+ The depth bar makes "shallow CSC" a **defect**, not a tradeoff.
190
24
 
191
- - Snapshot lists ≥ **8 fields** with values (not just an ID + a link).
25
+ ## Hard rule
192
26
 
193
- ### CRM/ADO stream (`crm/stream/*.md`, `ado/stream/*.md`)
27
+ Every CSC entity block MUST satisfy the per-source minimum bullet thresholds
28
+ below. If an entity is genuinely shallow (e.g., a 1-line "thanks" email),
29
+ write it as a coverage-notes-only block — do NOT pad with fabricated bullets.
194
30
 
195
- - Each change event has old-value new-value + actor + timestamp.
196
-
197
- ## Red-flag patterns (auto-fail)
198
-
199
- Any file containing these strings outside a `## Coverage Notes` block fails:
200
-
201
- - `(see original in …)` / `see original email` / `see Teams thread` / `see page` — link-only stubs.
202
- - `Full body unavailable` / `body not captured` without an accompanying `## Coverage Notes` explaining why.
203
- - `Summary: …` as the entire body (no detail beneath it).
204
- - `[redacted]` without justification.
205
- - `TODO` / `FIXME` left in production evidence.
206
-
207
- ## Retry policy
208
-
209
- When a file fails the detector:
210
-
211
- 1. **Auto-retry once** with a deeper WorkIQ query. Append `"give me full bodies and full reply chain — not just metadata"` (or source-appropriate equivalent) to the query. Re-write the file.
212
- 2. If the second attempt still fails the detector, emit the **paste-prompt** (see `plugin/templates/paste-prompt.md`) to the user with the specific file path, the failing checks, and ready-to-paste section headers.
213
- 3. Mark the file with `⚠ thoroughness: pending-paste` at the top under `## Source Basis` and log `thoroughness-pending` in `run-log.yml` for that source. Continue the rest of the run — do NOT block.
214
-
215
- ## Validation block in every evidence file
216
-
217
- Every evidence file MUST end with:
218
-
219
- ```
220
- ## Validation
221
-
222
- - [ ] bodies-present
223
- - [ ] attendees-or-participants-captured <!-- meetings/teams only -->
224
- - [ ] next-steps-section-present <!-- meetings only -->
225
- - [ ] action-items-have-owner-and-due <!-- meetings only -->
226
- - [ ] no-link-only-stubs
227
- - [ ] coverage-notes-explain-any-gaps
228
- ```
229
-
230
- The skill ticks the boxes it can verify automatically; the rest are left for `self-check` and human review.
231
-
232
- ## Out of scope
31
+ ## Per-source minimum thresholds
233
32
 
234
- This detector does NOT enforce citation density (that's `citation-ledger.instructions.md`) or snapshot-vs-stream placement (that's `snapshot-vs-stream.instructions.md`). It enforces depth-of-capture only.
33
+ Counts are TOTAL material bullets across all sections of the block (excluding
34
+ the heading line and `_None surfaced._` placeholders). Citation lines do not
35
+ count as separate bullets.
36
+
37
+ | Source | Min bullets per block | Min sections populated | Notes |
38
+ |---|---|---|---|
39
+ | meetings | 25 | 6 | Must include Topics, Q&A or Who Said What, Decisions or Next Steps, Action Items, Participants, Artifacts |
40
+ | email (thread) | 8 | 4 | Must include Participants, Topics, Action Items or Next Steps, Decisions or Q&A |
41
+ | teams (chat thread) | 6 | 3 | Must include Participants, Topics, Q&A or Action Items |
42
+ | teams (channel post) | 5 | 3 | Must include Participants, Topics, plus one of Q&A / Decisions / Action Items |
43
+ | onenote (page) | 10 | 4 | Must include Topics, Dates & Numbers or Decisions, Action Items or Next Steps, Artifacts |
44
+ | sharepoint (doc) | 8 | 3 | Must include Topics, Artifacts, plus one of Decisions / Customer Asks / Dates & Numbers |
45
+ | crm (opportunity/account) | 12 | 5 | Must include Participants, Dates & Numbers, Next Steps, Customer Asks, Artifacts |
46
+ | ado (work item) | 8 | 4 | Must include Participants (assignee + reporter), Topics, Action Items or Next Steps, Artifacts |
47
+
48
+ If the entity truly cannot meet the bar (e.g., 2-message chat about lunch):
49
+ write **only** the heading + a `Coverage Notes` section explaining why, and
50
+ flag `low-signal: true` in `_index/entities.yml`. Do not pad.
51
+
52
+ ## Per-section depth rules
53
+
54
+ - **Topics Discussed**: at least one bullet per distinct subject in the entity.
55
+ A 45-minute meeting that covers 6 subjects MUST have at least 6 topic bullets.
56
+ "Various topics discussed" is a defect.
57
+ - **Q&A**: capture every question that was asked AND answered. Format:
58
+ `Q (asker): ... → A (responder): ... [citation]`. Unanswered questions
59
+ belong in `Open Questions`, not `Q&A`.
60
+ - **Who Said What**: curated to material statements only (positions stated,
61
+ commitments made, disagreements voiced). Typical: 3–10 entries per
62
+ 50-message thread. NOT a verbatim utterance log.
63
+ - **Dates & Numbers Shared**: every number, date, dollar amount, percentage,
64
+ count, deadline, version, or SKU mentioned. Format: `<value> — <context> [citation]`.
65
+ - **Action Items**: each bullet MUST have owner + due (or `owner: unassigned`,
66
+ `due: unspecified`). Missing both fields = defect.
67
+ - **Next Steps**: forward-looking commitments without strict owner+due. Distinct
68
+ from Action Items.
69
+ - **Customer Asks**: every explicit customer request (feature, capacity, support,
70
+ pricing, timeline). One bullet per ask.
71
+
72
+ ## Coverage Notes are mandatory when
73
+
74
+ - WorkIQ returned partial data (truncation, payload-too-large, retry-deferred).
75
+ - Body was unavailable for an entity (write `Source basis: unavailable`).
76
+ - Participant list was inferred from a forwarded thread (note `Participants inferred from forward chain`).
77
+ - An entity was discovered by another contributor and the current contributor
78
+ could not reach it (defer per `defer-on-permission.instructions.md`).
79
+
80
+ ## Detector (used by `self-check/run.ps1`)
81
+
82
+ Deep checks D11–D15 enforce this doctrine. Summary:
83
+
84
+ - **D11**: Every `weekly/YYYY-MM-DD_<source>-csc.md` has ≥ 1 entity heading.
85
+ - **D12**: Every entity block's section order matches the canonical order
86
+ defined in `comprehensive-structured-capture.instructions.md`.
87
+ - **D14 (prose detector)**: No line in a weekly CSC file may exceed 220
88
+ characters without starting with `-`, `*`, `#`, `>`, `|`, or `` ` ``.
89
+ Heuristic: such lines are prose paragraphs and indicate v4.8.x narrative
90
+ summary leakage.
91
+ - **D15 (no-omission detector)**: Forbidden phrases anywhere in a weekly
92
+ CSC block outside a `Coverage Notes` section:
93
+ - `and N more` / `and N others`
94
+ - `key highlights only`
95
+ - `sample of` / `subset of`
96
+ - `N of M shown` / `truncated`
97
+ - `summary above`
98
+ Their presence = defect; the block must be re-pulled with broader scope or
99
+ the missing items must be enumerated.
100
+ - **D11.depth**: For each entity heading, count material bullets (lines
101
+ starting `- ` or `* ` inside a non-coverage section). Compare to per-source
102
+ threshold above. If below threshold AND `low-signal: true` is NOT set in
103
+ `_index/entities.yml`, emit a defect.
104
+
105
+ ## What this REPLACES
106
+
107
+ - v4.8.x "AI Narrative Summary (3+ paragraphs, ≥ 800 chars per entity)" — **gone**.
108
+ Prose paragraphs anywhere in a weekly CSC file are a D14 defect.
109
+ - v4.8.x "verbatim body required; if missing, the entity is partial" — **gone**.
110
+ A CSC block stands on its own. Verbatim is only required for meetings
111
+ (sibling `verbatim/` folder, audit-only — see
112
+ [`meetings-verbatim-required.instructions.md`](./meetings-verbatim-required.instructions.md)).
113
+
114
+ ## What this DOES NOT change
115
+
116
+ - WorkIQ-first stays mandatory. CSC bullets must be sourced from WorkIQ output.
117
+ - Citation-per-material-bullet stays mandatory.
118
+ - Defer-on-permission stays mandatory — if WorkIQ cannot reach an entity,
119
+ defer with marker, do not fabricate from adjacent evidence.
120
+ - Meetings still require a sibling raw `verbatim/<dir>/` folder for the audit
121
+ trail (Teams retention purges recordings ~60 days).
122
+
123
+ ## Related
124
+
125
+ - [`comprehensive-structured-capture.instructions.md`](./comprehensive-structured-capture.instructions.md) — canonical CSC block schema
126
+ - [`weekly-csc.instructions.md`](./weekly-csc.instructions.md) — layout + `_index/`
127
+ - [`evidence-layout-canonical.instructions.md`](./evidence-layout-canonical.instructions.md) — folder tree
128
+ - [`meetings-verbatim-required.instructions.md`](./meetings-verbatim-required.instructions.md) — meetings audit folder
@@ -0,0 +1,100 @@
1
+ ---
2
+ applyTo: "**"
3
+ description: "v5.0.0 — Guided tour. Auto-generated week-in-review markdown walkthrough at `<project>/State/tour.md`. Score: `recency_weight × cross_ref_count`. recency_weight = exp(-days_since_last_touched / 14). cross_ref_count = degree in the graph. DFS through edges in priority order (decides → action-item-tracks → discusses → references → others). Default top-N = 10 (configurable via `m365Mutable.tour.topN`)."
4
+ ---
5
+
6
+ # Guided Tour — HARD RULE (kushi v5.0.0+)
7
+
8
+ ## Why
9
+
10
+ After link-entities + build-state, the project has a graph and a wiki, but
11
+ nothing tells a reader **where to start**. The tour is a small ranked
12
+ walkthrough that picks the most-recent, highest-degree entities and DFS-walks
13
+ their connections in order of edge importance.
14
+
15
+ ## Output
16
+
17
+ - **Path:** `<engagement-root>/<project>/State/tour.md`
18
+ - **Producer:** `tour` skill.
19
+ - **Idempotency:** fully regenerated each run.
20
+ - **Empty case:** if `_graph/project-graph.json` has zero nodes, `tour.md` is
21
+ written with a single line: `_No graph nodes — run @Kushi refresh first._`
22
+
23
+ ## Scoring
24
+
25
+ For each node N in the graph:
26
+
27
+ ```
28
+ days_since = max(0, today - last_touched_iso) # in whole days, UTC
29
+ recency_weight = exp(- days_since / 14) # 14-day half-life ≈ ln(2)/14 ≈ 0.0495
30
+ cross_ref_count = degree(N) # in + out edges, dedupe by edge identity
31
+ score(N) = recency_weight × cross_ref_count
32
+ ```
33
+
34
+ Sort nodes by `score` descending. Take the top-N (default 10; configurable
35
+ via `m365Mutable.tour.topN` in the user's per-project mutable config).
36
+
37
+ ## DFS ordering
38
+
39
+ Tour stops are emitted in DFS order starting from the highest-scored node:
40
+
41
+ 1. Start with the highest-scored unvisited node → emit it as the next stop.
42
+ 2. Pick the next node by walking that node's edges in **edge priority order**:
43
+ 1. `decides`
44
+ 2. `action-item-tracks`
45
+ 3. `discusses`
46
+ 4. `references`
47
+ 5. (any other kind in `entity-graph.instructions.md` taxonomy)
48
+ Within a priority bucket, prefer the edge whose target has the highest
49
+ unvisited `score`.
50
+ 3. Skip nodes already visited (cycle break).
51
+ 4. If the DFS hits a dead end before reaching N stops, restart from the
52
+ next-highest-scored unvisited node.
53
+ 5. Stop after N stops emitted.
54
+
55
+ ## Per-stop markdown shape
56
+
57
+ ```markdown
58
+ ## <ordinal>. <Node title>
59
+
60
+ > _Why this matters:_ <one-line synthesis — recency + degree + dominant edge
61
+ > kind, e.g. "Touched 3 days ago; ties together 5 ADO items and 2 CRM
62
+ > opportunities."_
63
+
64
+ - **Source:** `<source>` · last touched `YYYY-MM-DD`
65
+ - **Cite:** [`<alias>/<source>/weekly/<file>#<anchor>`](<relative path>)
66
+ - **Related State pages:** [[slug-a]] · [[slug-b]] · …
67
+ ```
68
+
69
+ Citations MUST resolve on disk (D23.tour enforces this).
70
+
71
+ ## Header
72
+
73
+ The file starts with:
74
+
75
+ ```markdown
76
+ ---
77
+ kushi_tour: true
78
+ generated_at: <ISO-8601 UTC>
79
+ generated_by_alias: <alias>
80
+ top_n: <N>
81
+ score_basis: "recency_weight × cross_ref_count (14-day half-life)"
82
+ ---
83
+
84
+ # Guided Tour — <project>
85
+
86
+ > _Auto-generated week-in-review. <N> top entities by recency × cross-reference count._
87
+ ```
88
+
89
+ ## Self-check
90
+
91
+ `D23.tour` enforces:
92
+
93
+ - If `_graph/project-graph.json` has ≥ 1 node, `State/tour.md` exists.
94
+ - Every tour stop's citation resolves to an existing weekly file + anchor.
95
+
96
+ ## Cross-references
97
+
98
+ - `entity-graph.instructions.md` — source of nodes + edge taxonomy.
99
+ - `karpathy-state-layout.instructions.md` — `[[wikilink]]` resolution rules
100
+ used by per-stop "Related State pages".
@@ -0,0 +1,77 @@
1
+ ---
2
+ applyTo: "**"
3
+ description: "v5.0.0 — Host portability contract. `plugin/agents/kushi.agent.md` is the single source of truth for the multi-host top-level agent contract. Per-skill `plugin/skills/<n>/SKILL.md` files are host-portable (Claude Code skills, Clawpilot, Codex AGENTS.md, Copilot custom agents, Cursor, Gemini CLI). The install scripts mirror agent.md → SKILL.md for hosts that discover via SKILL.md (e.g. Clawpilot). No code changes are required by this doctrine — it is a contract write-up."
4
+ ---
5
+
6
+ # Host Portability — HARD RULE (kushi v5.0.0+)
7
+
8
+ ## Why
9
+
10
+ Kushi is shipped through several distinct host surfaces:
11
+
12
+ - **GitHub Copilot** (VS Code) — discovers via `.github/copilot-instructions.kushi.md`.
13
+ - **Clawpilot** (a Copilot fork) — discovers via `~/.copilot/m-skills/kushi/SKILL.md`.
14
+ - **Claude Code** — discovers via the Claude Code skills system (per-skill
15
+ `SKILL.md` in a known location).
16
+ - **Codex / OpenAI Agents SDK** — discovers via `AGENTS.md` at the project root.
17
+ - **Cursor** — discovers via `.cursor/rules/*.md`.
18
+ - **Gemini CLI** — discovers via per-skill markdown.
19
+
20
+ All of these surfaces consume the **same** prose. v5.0.0 formalizes that one
21
+ file is the source of truth and the install scripts mirror it where required.
22
+
23
+ ## Source of truth
24
+
25
+ `plugin/agents/kushi.agent.md` is the canonical top-level agent contract. It
26
+ describes the verbs, the routing, the global rules, and the references to
27
+ every skill / instruction / prompt.
28
+
29
+ Every other host-facing entry point (the live install's `SKILL.md`, the
30
+ `.github/copilot-instructions.kushi.md` shim, the `AGENTS.md` written into a
31
+ project's `State/`) is **derived** from this file via:
32
+
33
+ 1. `src/main.mjs` — mirrors `plugin/agents/kushi.agent.md` →
34
+ `~/.copilot/m-skills/kushi/SKILL.md` during `npx kushi-agents
35
+ --clawpilot` install. See the existing top-of-file comment in
36
+ `src/main.mjs`:
37
+
38
+ > `// Mirror agents/kushi.agent.md as top-level SKILL.md for Clawpilot discovery.`
39
+
40
+ 2. `plugin/templates/state/CLAUDE.template.md` / `AGENTS.template.md` —
41
+ per-project agent doc, written by `build-state` into `<project>/State/`.
42
+ The two templates are byte-identical (see
43
+ `karpathy-state-layout.instructions.md`); both reiterate "this is a kushi
44
+ project, use `[[wikilinks]]`, cite `Evidence/<alias>/<source>/weekly/...`
45
+ for every claim."
46
+
47
+ Self-check `D4` already enforces byte-identical parity between
48
+ `plugin/agents/kushi.agent.md` and the live install's `SKILL.md`.
49
+
50
+ ## Per-skill portability
51
+
52
+ Every per-skill `plugin/skills/<n>/SKILL.md` is host-portable by construction:
53
+
54
+ - Frontmatter (`name`, `version`, `description`) matches the Claude Code
55
+ skills system and the Clawpilot skills system.
56
+ - Skill prose uses relative markdown links (`../../instructions/<x>.md`) that
57
+ resolve regardless of which host root the file is rendered under.
58
+ - No host-specific tool names appear in the SKILL.md body. Tool dispatch
59
+ happens through neutral verbs (`WorkIQ`, `m365_*`) that each host wires up
60
+ in its own way.
61
+
62
+ ## No code changes
63
+
64
+ This doctrine introduces **no** new code or mirror behavior. The install
65
+ scripts already do the right thing; v5.0.0 simply documents the contract so
66
+ future hosts can be added by:
67
+
68
+ 1. Reading `plugin/agents/kushi.agent.md`.
69
+ 2. Pointing the new host's discovery at that file (or a mirrored copy).
70
+ 3. Re-running self-check to confirm `D4` still passes.
71
+
72
+ ## Cross-references
73
+
74
+ - `kushi-config-root.instructions.md` — config layout is also host-portable
75
+ (vscode `<workspace>/.kushi/` vs Clawpilot `~/.copilot/m-skills/kushi/`).
76
+ - `karpathy-state-layout.instructions.md` — per-project `State/CLAUDE.md` +
77
+ `State/AGENTS.md` are the per-project portability mirror.
@@ -138,7 +138,7 @@ Edit these files later if anything changes:
138
138
  • <workspace>/.kushi/config/user/m365-auth.json
139
139
  OneNote enable/disable + notebook name (oneNote.enabled, oneNote.defaultNotebookName), email folder list, SharePoint root
140
140
  • <workspace>/.kushi/config/shared/integrations.yml (team-wide; commit changes)
141
- CRM environmentUrl + tenantId, ADO organization + project
141
+ CRM environment_url + tenant_id, ADO organization + project (ships pre-filled with Microsoft IS defaults since v4.8.4)
142
142
 
143
143
  To re-walk every question (overwrites all answers):
144
144
  @Kushi setup --reconfigure