kushi-agents 3.4.1
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/.github/config/m365-auth.json.example +56 -0
- package/.github/config/m365-mutable.json.example +11 -0
- package/LICENSE +201 -0
- package/README.md +159 -0
- package/bin/cli.mjs +75 -0
- package/package.json +35 -0
- package/plugin/agents/kushi.agent.md +147 -0
- package/plugin/instructions/answer-from-evidence.instructions.md +73 -0
- package/plugin/instructions/auth-and-retry.instructions.md +116 -0
- package/plugin/instructions/az-auth-conditional.instructions.md +39 -0
- package/plugin/instructions/azure-auth-patterns.instructions.md +226 -0
- package/plugin/instructions/citation-ledger.instructions.md +52 -0
- package/plugin/instructions/engagement-root-resolution.instructions.md +82 -0
- package/plugin/instructions/evidence-thoroughness.instructions.md +62 -0
- package/plugin/instructions/side-by-side-config.instructions.md +56 -0
- package/plugin/instructions/snapshot-vs-stream.instructions.md +87 -0
- package/plugin/instructions/thoroughness-detector.instructions.md +105 -0
- package/plugin/instructions/workiq-first.instructions.md +47 -0
- package/plugin/plugin.json +96 -0
- package/plugin/prompts/aggregate.prompt.md +24 -0
- package/plugin/prompts/ask.prompt.md +16 -0
- package/plugin/prompts/bootstrap.prompt.md +23 -0
- package/plugin/prompts/consolidate.prompt.md +21 -0
- package/plugin/prompts/fde-intake.prompt.md +41 -0
- package/plugin/prompts/fde-report.prompt.md +46 -0
- package/plugin/prompts/fde-triage.prompt.md +46 -0
- package/plugin/prompts/refresh.prompt.md +17 -0
- package/plugin/prompts/state.prompt.md +17 -0
- package/plugin/prompts/status.prompt.md +17 -0
- package/plugin/reference-packs/README.md +74 -0
- package/plugin/reference-packs/fde/README.md +62 -0
- package/plugin/reference-packs/fde/core-fde-reference.md +427 -0
- package/plugin/reference-packs/fde/intake-questions.md +168 -0
- package/plugin/reference-packs/fde/report-doctrine.md +189 -0
- package/plugin/skills/aggregate-project/SKILL.md +72 -0
- package/plugin/skills/ask-project/SKILL.md +162 -0
- package/plugin/skills/bootstrap-project/SKILL.md +129 -0
- package/plugin/skills/build-state/SKILL.md +69 -0
- package/plugin/skills/consolidate-evidence/SKILL.md +47 -0
- package/plugin/skills/fde-intake/SKILL.md +147 -0
- package/plugin/skills/fde-report/SKILL.md +159 -0
- package/plugin/skills/fde-triage/SKILL.md +114 -0
- package/plugin/skills/intro/SKILL.md +449 -0
- package/plugin/skills/project-status/SKILL.md +61 -0
- package/plugin/skills/pull-ado/SKILL.md +77 -0
- package/plugin/skills/pull-crm/SKILL.md +75 -0
- package/plugin/skills/pull-email/SKILL.md +75 -0
- package/plugin/skills/pull-meetings/SKILL.md +77 -0
- package/plugin/skills/pull-onenote/SKILL.md +82 -0
- package/plugin/skills/pull-sharepoint/SKILL.md +85 -0
- package/plugin/skills/pull-teams/SKILL.md +75 -0
- package/plugin/skills/refresh-project/SKILL.md +89 -0
- package/plugin/skills/self-check/SKILL.md +166 -0
- package/plugin/skills/self-check/run.ps1 +517 -0
- package/plugin/skills/self-check/run.sh +33 -0
- package/plugin/templates/fde/intake.md +114 -0
- package/plugin/templates/fde/report-fitness.md +151 -0
- package/plugin/templates/fde/report-long.md +109 -0
- package/plugin/templates/fde/report-short.md +45 -0
- package/plugin/templates/fde/report-stage-readiness.md +70 -0
- package/plugin/templates/fde/report-weekly.md +73 -0
- package/plugin/templates/fde/triage-00-fde-analysis.md +78 -0
- package/plugin/templates/fde/triage-02-risk-analysis.md +76 -0
- package/plugin/templates/fde/triage-03-6Q.md +40 -0
- package/plugin/templates/fde/triage-04-readiness-checklist.md +82 -0
- package/plugin/templates/fde/triage-05-executive-consolidated.md +78 -0
- package/plugin/templates/fde/triage-06-global-opportunity.md +70 -0
- package/plugin/templates/fde/triage-07-validation-warnings.md +60 -0
- package/plugin/templates/init/ado-config.template.yml +21 -0
- package/plugin/templates/init/crm-config.template.yml +16 -0
- package/plugin/templates/init/kushi-projects.template.json +14 -0
- package/plugin/templates/init/m365-auth.template.json +67 -0
- package/plugin/templates/init/m365-mutable.template.json +19 -0
- package/plugin/templates/init/project-contributors.template.yml +27 -0
- package/plugin/templates/init/project-evidence.template.yml +32 -0
- package/plugin/templates/init/project-integrations.template.yml +34 -0
- package/plugin/templates/init/project-user-settings.template.yml +71 -0
- package/plugin/templates/paste-prompt.md +35 -0
- package/plugin/templates/snapshot/ado-item.template.md +45 -0
- package/plugin/templates/snapshot/crm-record.template.md +34 -0
- package/plugin/templates/snapshot/meetings-series-index.template.md +32 -0
- package/plugin/templates/snapshot/onenote-page.template.md +28 -0
- package/plugin/templates/snapshot/sharepoint-file.template.md +31 -0
- package/plugin/templates/snapshot/sharepoint-tree.template.md +39 -0
- package/plugin/templates/snapshot/teams-roster.template.md +27 -0
- package/plugin/templates/state/00_overview.template.md +44 -0
- package/plugin/templates/state/01_decisions.template.md +41 -0
- package/plugin/templates/state/02_stakeholders.template.md +48 -0
- package/plugin/templates/state/03_architecture-and-solution.template.md +56 -0
- package/plugin/templates/state/04_workshops-and-key-meetings.template.md +43 -0
- package/plugin/templates/state/05_action-items.template.md +29 -0
- package/plugin/templates/state/06_risks-and-issues.template.md +43 -0
- package/plugin/templates/state/07_timeline-and-milestones.template.md +45 -0
- package/plugin/templates/state/08_artifacts-and-deliverables.template.md +55 -0
- package/plugin/templates/state/09_open-questions.template.md +62 -0
- package/plugin/templates/state/README.md +41 -0
- package/plugin/templates/weekly/ado-stream.template.md +71 -0
- package/plugin/templates/weekly/consolidated.template.md +98 -0
- package/plugin/templates/weekly/crm-stream.template.md +74 -0
- package/plugin/templates/weekly/email-stream.template.md +103 -0
- package/plugin/templates/weekly/meetings-stream.template.md +182 -0
- package/plugin/templates/weekly/onenote-stream.template.md +106 -0
- package/plugin/templates/weekly/run-log.template.md +88 -0
- package/plugin/templates/weekly/sharepoint-stream.template.md +121 -0
- package/plugin/templates/weekly/teams-stream.template.md +121 -0
- package/src/constants.mjs +49 -0
- package/src/copy-assets.mjs +183 -0
- package/src/main.mjs +262 -0
- package/src/profile-resolver.mjs +168 -0
- package/src/prompt.mjs +42 -0
- package/src/settings.mjs +77 -0
|
@@ -0,0 +1,449 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "intro"
|
|
3
|
+
version: "2.1.0"
|
|
4
|
+
description: "Use when a user asks about Kushi, what it does, what its skills are, or wants a hands-on tour. Offers a quick overview OR an interactive walkthrough of every kushi verb (including Q&A and FDE authoring) with copy-and-send demo prompts."
|
|
5
|
+
triggers:
|
|
6
|
+
- "what is kushi"
|
|
7
|
+
- "what can kushi do"
|
|
8
|
+
- "tell me about kushi"
|
|
9
|
+
- "kushi intro"
|
|
10
|
+
- "introduce yourself"
|
|
11
|
+
- "what are your skills"
|
|
12
|
+
- "show me kushi"
|
|
13
|
+
- "how does kushi work"
|
|
14
|
+
- "kushi help"
|
|
15
|
+
- "demo yourself"
|
|
16
|
+
- "i'm new to kushi"
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# intro
|
|
20
|
+
|
|
21
|
+
Introduce Kushi to new users and demonstrate every verb hands-on. When a user asks "What is Kushi?", "What can it do?", "How does this work?", or any equivalent identity / capability / onboarding question, this skill activates and offers two modes:
|
|
22
|
+
|
|
23
|
+
1. **Quick Overview** — a scannable summary of every verb and skill (≈ 30 seconds to read).
|
|
24
|
+
2. **Interactive Walkthrough** — a guided tour where the user runs each verb against a real (or fictional) project, one at a time, with ready-to-send prompts.
|
|
25
|
+
|
|
26
|
+
## Principles
|
|
27
|
+
|
|
28
|
+
- **User chooses the format.** Always offer both modes — never assume which one the user wants.
|
|
29
|
+
- **Show, don't tell.** In interactive mode, each verb is demonstrated with a real prompt against a real project (or a fictional one if no projects are bootstrapped yet).
|
|
30
|
+
- **One moment at a time.** Present one verb demo at a time. Wait for the user before advancing.
|
|
31
|
+
- **Low commitment.** The user can exit at any point — say so at the start.
|
|
32
|
+
- **No jargon on first contact.** Assume the user has never seen Kushi before. Define snapshot/stream/watermark/run-log on first use.
|
|
33
|
+
- **Honesty about state.** If no projects are bootstrapped yet, the demo proposes a fictional project (e.g. `Contoso Discovery`) so the user can see verbs work without committing real data.
|
|
34
|
+
|
|
35
|
+
## Trigger Detection
|
|
36
|
+
|
|
37
|
+
Activate this skill when the user's request matches any of:
|
|
38
|
+
|
|
39
|
+
- Identity: "Who are you?", "What is Kushi?", "Tell me about yourself"
|
|
40
|
+
- Capability: "What can you do?", "What are your skills?", "What's the difference between bootstrap and refresh?"
|
|
41
|
+
- Onboarding: "I'm new to Kushi", "How do I get started?", "Help me learn Kushi", "kushi help"
|
|
42
|
+
- Demo: "Show me Kushi", "Walk me through it", "Demo yourself"
|
|
43
|
+
|
|
44
|
+
Do **not** activate when the user has already asked for a specific verb (e.g. "kushi bootstrap AGCO") — in that case, route directly to that verb.
|
|
45
|
+
|
|
46
|
+
## Response Mode Selection
|
|
47
|
+
|
|
48
|
+
When triggered, present this exact opening, then wait:
|
|
49
|
+
|
|
50
|
+
> I'm **Kushi** — a multi-source project evidence agent. I capture **snapshots** (current state of entities like meetings, OneNote pages, ADO items) and **streams** (timestamped events) across Email, Teams, Meetings, OneNote, SharePoint, CRM, and ADO, then either let you ask cited questions over that Evidence — or render an outcome-based **State** view (on the `full` profile) — or author **FDE engagement reports** grounded in an FDE reference pack.
|
|
51
|
+
>
|
|
52
|
+
> Three install profiles: `core` (aggregator only), `standard` (default — adds bootstrap/refresh + FDE authoring), `full` (adds State/ rollup).
|
|
53
|
+
>
|
|
54
|
+
> How would you like to learn what I can do?
|
|
55
|
+
>
|
|
56
|
+
> **1 — Quick Overview** — scannable summary of every verb and skill (reply `1` or `overview`)
|
|
57
|
+
> **2 — Interactive Walkthrough** — guided tour where you run each verb hands-on (reply `2` or `walkthrough`)
|
|
58
|
+
|
|
59
|
+
Accept these as equivalent:
|
|
60
|
+
|
|
61
|
+
- `1`, `one`, `overview`, `quick`, `summary` → Mode 1
|
|
62
|
+
- `2`, `two`, `walkthrough`, `interactive`, `demo`, `tour`, `hands-on` → Mode 2
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Mode 1: Quick Overview
|
|
67
|
+
|
|
68
|
+
Present this verbatim:
|
|
69
|
+
|
|
70
|
+
> ## Kushi at a glance
|
|
71
|
+
>
|
|
72
|
+
> **Identity.** Kushi is a single Copilot agent backed by 15 specialized skills. Instead of orchestrating WorkIQ + m365 + ADO + CRM yourself, you give kushi a verb and a project name, and it routes through the right pulls, consolidates, renders state, and answers cited Q&A — citing every assertion back to its source file.
|
|
73
|
+
>
|
|
74
|
+
> **Hard rule:** every per-source skill writes evidence in TWO shapes. **Snapshot** = current state of an entity (one file per entity, replace on refresh, no date in filename). **Stream** = timestamped events (one file per ISO week, append-only, dated `YYYY-MM-DD_<source>-stream.md`). State files cite both. Snapshot answers *"what IS true now?"* Stream answers *"when did it happen?"*
|
|
75
|
+
>
|
|
76
|
+
> ### Verbs
|
|
77
|
+
>
|
|
78
|
+
> | Verb | Profile | Default window | What it does |
|
|
79
|
+
> |---|---|---|---|
|
|
80
|
+
> | `kushi aggregate <project>` | core+ | since last watermark | Pull-only orchestrator — runs every `pull-*` + consolidate. No State/. |
|
|
81
|
+
> | `kushi bootstrap <project>` | standard+ | last 30 days | First-time setup — lays configs side-by-side, scaffolds folders, runs initial pull. Builds State/ on `full` only. |
|
|
82
|
+
> | `kushi refresh <project>` | standard+ | since last watermark (fallback 7d) | Incremental pull driven by run-log watermarks. Builds State/ on `full` only. |
|
|
83
|
+
> | `kushi refresh <project> last N days` | standard+ | N days | Override window. |
|
|
84
|
+
> | `kushi state <project>` | **full** | n/a | Re-render `State/` from existing `Evidence/` (no source pulls). |
|
|
85
|
+
> | `kushi consolidate <project> last N days` | core+ | N days | Merge per-user streams into `_Consolidated/`. |
|
|
86
|
+
> | `kushi status <project>` | core+ | n/a | Read-only run-log inspector. |
|
|
87
|
+
> | `kushi ask <project> <question>` | core+ | n/a | **Cited Q&A** over Evidence/ (+ State/ on full). Auto-routes when you name a project + ask a question — no `kushi ask` prefix needed. |
|
|
88
|
+
> | `kushi pull <source> for <project> [window]` | core+ | as supplied | Run one `pull-<source>` skill in isolation. |
|
|
89
|
+
> | `kushi fde-intake <project>` | **standard+** | n/a | Author/update the FDE Intake document (`Reports/00-FDE-Intake-<project>.md`). |
|
|
90
|
+
> | `kushi fde-report <project> [shape]` | **standard+** | n/a | Generate an FDE report in one of 5 shapes: `weekly` (default) / `short` / `long` / `fitness` / `stage-readiness`. |
|
|
91
|
+
> | `kushi fde-triage <project>` | **standard+** | n/a | Produce the full 7-file FDE Triage bundle. |
|
|
92
|
+
> | `kushi self-check` | all | n/a | Validate skills, instructions, prompts, and live install consistency. |
|
|
93
|
+
> | `kushi intro` (this) | all | n/a | This walkthrough. |
|
|
94
|
+
>
|
|
95
|
+
> ### Skills (18)
|
|
96
|
+
>
|
|
97
|
+
> | Domain | Skill | Profile | Snapshot? | Stream? |
|
|
98
|
+
> |---|---|---|---|---|
|
|
99
|
+
> | **Orchestrators** | `aggregate-project` | core+ | — | — |
|
|
100
|
+
> | | `bootstrap-project` | standard+ | — | — |
|
|
101
|
+
> | | `refresh-project` | standard+ | — | — |
|
|
102
|
+
> | | `build-state` | **full** | — | — |
|
|
103
|
+
> | | `consolidate-evidence` | core+ | — | — |
|
|
104
|
+
> | | `project-status` | core+ | — | — |
|
|
105
|
+
> | **Per-source pulls** | `pull-email` | core+ | — | ✅ |
|
|
106
|
+
> | | `pull-teams` | core+ | ✅ | ✅ |
|
|
107
|
+
> | | `pull-meetings` | core+ | ✅ | ✅ |
|
|
108
|
+
> | | `pull-onenote` | core+ | ✅ | ✅ |
|
|
109
|
+
> | | `pull-sharepoint` | core+ | ✅ | ✅ |
|
|
110
|
+
> | | `pull-crm` | core+ | ✅ | ✅ |
|
|
111
|
+
> | | `pull-ado` | core+ | ✅ | ✅ |
|
|
112
|
+
> | **Consumer (Q&A)** | `ask-project` | core+ | reads both | — |
|
|
113
|
+
> | **FDE authoring** | `fde-intake` | standard+ | reads both | — |
|
|
114
|
+
> | | `fde-report` | standard+ | reads both | — |
|
|
115
|
+
> | | `fde-triage` | standard+ | reads both | — |
|
|
116
|
+
> | **Meta** | `self-check` | all | — | — |
|
|
117
|
+
> | | `intro` | all | — | — |
|
|
118
|
+
>
|
|
119
|
+
> ### Core rules (apply to every skill)
|
|
120
|
+
>
|
|
121
|
+
> - **WorkIQ-first** — if WorkIQ is reachable, use it; only fall back to host m365 tools if it is not.
|
|
122
|
+
> - **Citation Ledger** — every assertion in any output cites `[source: <alias>/<folder>/<file> · YYYY-MM-DD]`.
|
|
123
|
+
> - **Side-by-side config** — every skeleton config is paired with a live filled file in the same folder.
|
|
124
|
+
> - **NEVER reach out** — Kushi never sends outbound messages. Recommendations land in `State/09_open-questions.md`.
|
|
125
|
+
> - **Engagement-root resolution** — single root (default `OneDrive\ISE\Engagement Assets`) holds all projects.
|
|
126
|
+
>
|
|
127
|
+
> ### Want to go deeper?
|
|
128
|
+
>
|
|
129
|
+
> - Reply `walkthrough` for the interactive guided tour (≈ 5 min).
|
|
130
|
+
> - Reply `bootstrap <project name>` to start a real engagement.
|
|
131
|
+
> - Or just describe what you need — I'll route it to the right verb.
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Mode 2: Interactive Walkthrough
|
|
136
|
+
|
|
137
|
+
### Pre-flight
|
|
138
|
+
|
|
139
|
+
Before opening, check whether any project is already bootstrapped:
|
|
140
|
+
|
|
141
|
+
1. Read `~/.copilot/project-evidence.yml` (personal config). If `active_projects` has entries, pick the most recent as the demo target — substitute that name into `{{active_project}}` placeholders below.
|
|
142
|
+
2. If none, propose a fictional project named **Contoso Discovery** and tell the user that Try-it prompts will use that name; they can substitute their own at any time.
|
|
143
|
+
|
|
144
|
+
### Navigation Keywords
|
|
145
|
+
|
|
146
|
+
After every demo moment, list:
|
|
147
|
+
|
|
148
|
+
- `next` (or `n`) — advance to the next moment.
|
|
149
|
+
- `skip` (or `s`) — jump to the next moment without trying this one.
|
|
150
|
+
- `done` (or `d`, `exit`, `quit`) — exit the walkthrough; show the cheat sheet.
|
|
151
|
+
- `try` (or `t`) — actually run the Try-it prompt now (kushi will execute it for the active project).
|
|
152
|
+
|
|
153
|
+
### Opening
|
|
154
|
+
|
|
155
|
+
> Great — let's tour Kushi end-to-end. Each step:
|
|
156
|
+
>
|
|
157
|
+
> - Explains **one verb** in plain language.
|
|
158
|
+
> - Gives you a **ready-to-send prompt** in a code block — copy-paste it, or just reply `try` and I'll run it for you.
|
|
159
|
+
> - Waits for `next` / `skip` / `done` before advancing.
|
|
160
|
+
>
|
|
161
|
+
> Demo target for this tour: **{{active_project}}**. (Substitute any project name in the Try-it prompts.)
|
|
162
|
+
>
|
|
163
|
+
> Reply `next` (or just say "let's go") to begin.
|
|
164
|
+
|
|
165
|
+
### Demo Moments
|
|
166
|
+
|
|
167
|
+
Present in order. After each moment, append the navigation block.
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
**Moment 1 — Snapshot vs Stream (the foundation)**
|
|
172
|
+
|
|
173
|
+
> **The single most important rule in Kushi.** Every per-source skill writes two kinds of evidence:
|
|
174
|
+
>
|
|
175
|
+
> - **Snapshot** = current state of one entity. One file per entity. Replaced on every refresh. No date in filename. Example: `Evidence/{{alias}}/Teams-Chats/snapshot/roster.md` always shows the *current* member list of the project chat — not who was in it three weeks ago.
|
|
176
|
+
> - **Stream** = timestamped events. One file per ISO week. Append-only. Dated filename. Example: `Evidence/{{alias}}/Email/stream/2026-05-04_email-stream.md` shows every email received during the week of May 4.
|
|
177
|
+
>
|
|
178
|
+
> State files (e.g. `02_stakeholders.md`) cite snapshots for *current* facts and streams for *temporal* claims like "decision made on May 5".
|
|
179
|
+
|
|
180
|
+
Reply `next` to see how to bootstrap a project, or `done` to exit.
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
**Moment 2 — Bootstrap a new project**
|
|
185
|
+
|
|
186
|
+
> **`bootstrap-project`** — first-time setup for an engagement. Lays configs side-by-side, scaffolds `Evidence/` and `State/` folders, asks you to confirm sources, then runs the initial 30-day pull across every enabled source.
|
|
187
|
+
|
|
188
|
+
**Try it** — copy and send (or reply `try`):
|
|
189
|
+
|
|
190
|
+
```
|
|
191
|
+
kushi bootstrap {{active_project}}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Reply `next`, `skip`, or `done`.
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
**Moment 3 — Refresh with a watermark**
|
|
199
|
+
|
|
200
|
+
> **`refresh-project`** — incremental pull driven by `Evidence/run-log.yml` watermarks. If the last successful pull was Monday 9 AM, refresh picks up everything since then. No window arg = "since last watermark", with a 7-day fallback if no watermark exists.
|
|
201
|
+
|
|
202
|
+
**Try it — default (since last watermark):**
|
|
203
|
+
|
|
204
|
+
```
|
|
205
|
+
kushi refresh {{active_project}}
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
**Try it — explicit window:**
|
|
209
|
+
|
|
210
|
+
```
|
|
211
|
+
kushi refresh {{active_project}} last 14 days
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
Reply `next`, `skip`, or `done`.
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
**Moment 4 — Pull one source in isolation**
|
|
219
|
+
|
|
220
|
+
> **`pull-<source>`** — run a single per-source skill without touching the others. Useful when you only care about new ADO items, or you want to backfill OneNote pages without re-pulling email. Each `pull-*` skill is **WorkIQ-first** and writes to your alias subfolder under `Evidence/<alias>/<source>/`.
|
|
221
|
+
|
|
222
|
+
**Try it — pull just email:**
|
|
223
|
+
|
|
224
|
+
```
|
|
225
|
+
kushi pull email for {{active_project}} last 7 days
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
**Try it — pull just ADO work items:**
|
|
229
|
+
|
|
230
|
+
```
|
|
231
|
+
kushi pull ado for {{active_project}} last 30 days
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
Reply `next`, `skip`, or `done`.
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
**Moment 5 — Render State from existing Evidence**
|
|
239
|
+
|
|
240
|
+
> **`build-state`** — re-render every file under `State/` from existing `Evidence/`, **without any source pulls**. Use this when you want to see how the state view changes after manually editing evidence, or when you've consolidated streams from multiple contributors and want a fresh outcome view.
|
|
241
|
+
>
|
|
242
|
+
> State output is outcome-based — `00_overview.md`, `01_decisions.md`, `02_stakeholders.md`, `03_architecture.md`, `04_workshops.md`, `05_actions.md`, `06_risks.md`, `07_timeline.md`, `08_artifacts.md`, `09_open-questions.md`. Every assertion cites the evidence file + date it came from.
|
|
243
|
+
|
|
244
|
+
**Try it:**
|
|
245
|
+
|
|
246
|
+
```
|
|
247
|
+
kushi state {{active_project}}
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
Reply `next`, `skip`, or `done`.
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
**Moment 6 — Consolidate multi-user evidence**
|
|
255
|
+
|
|
256
|
+
> **`consolidate-evidence`** — merge per-user streams into `Evidence/_Consolidated/`. Only needed if multiple contributors are pulling for the same project. The consolidated file tags each entry with the contributor alias so provenance is preserved.
|
|
257
|
+
|
|
258
|
+
**Try it:**
|
|
259
|
+
|
|
260
|
+
```
|
|
261
|
+
kushi consolidate {{active_project}} last 7 days
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
Reply `next`, `skip`, or `done`.
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
**Moment 7 — Inspect the run-log**
|
|
269
|
+
|
|
270
|
+
> **`project-status`** — read-only inspector for `Evidence/run-log.yml`. Shows per-source watermarks, last successful run, and any failures. Use it before kicking off a refresh to see what kushi will pull.
|
|
271
|
+
|
|
272
|
+
**Try it:**
|
|
273
|
+
|
|
274
|
+
```
|
|
275
|
+
kushi status {{active_project}}
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
Reply `next`, `skip`, or `done`.
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
**Moment 8 — Ask the project (cited Q&A)**
|
|
283
|
+
|
|
284
|
+
> **`ask-project`** — read-only natural-language Q&A over what's already been captured. Loads the cheapest set of files needed (Evidence/ first; State/ on `full`), cites every assertion `[source: <alias>/<folder>/<file> · YYYY-MM-DD]`, warns if the relevant source is older than 14 days, and ends with a Confidence verdict.
|
|
285
|
+
>
|
|
286
|
+
> **Auto-routes — no prefix needed.** Just name a project and ask a question. The slash form (`/ask`) and the explicit `kushi ask` are also accepted.
|
|
287
|
+
>
|
|
288
|
+
> **Never** triggers a `pull-*`. If evidence is stale or missing, it offers `kushi refresh <project>` and stops.
|
|
289
|
+
|
|
290
|
+
**Try it — explicit form:**
|
|
291
|
+
|
|
292
|
+
```
|
|
293
|
+
kushi ask {{active_project}} what's the status?
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
**Try it — auto-routed (no prefix):**
|
|
297
|
+
|
|
298
|
+
```
|
|
299
|
+
what's the MACC for {{active_project}} and is it confirmed?
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
```
|
|
303
|
+
who is the EM on {{active_project}}?
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
```
|
|
307
|
+
summarize {{active_project}}
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
Reply `next`, `skip`, or `done`.
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
**Moment 9 — FDE Intake (first-artifact authoring)**
|
|
315
|
+
|
|
316
|
+
> **`fde-intake`** — author or update the FDE Intake document at `Reports/00-FDE-Intake-<project>.md`. It is the first artifact in any FDE engagement and is consumed by FDE Triage to decide which team is best suited and whether the engagement is billable.
|
|
317
|
+
>
|
|
318
|
+
> Grounded in **two sources**: the project's Evidence/ + the FDE reference pack (`intake-questions.md`, `report-doctrine.md`, `core-fde-reference.md`). Embeds inline `> ⚠️ VALIDATION WARNING — Rule X.Y` blockquotes wherever Evidence is silent.
|
|
319
|
+
>
|
|
320
|
+
> **Standard + Full profiles only.**
|
|
321
|
+
|
|
322
|
+
**Try it:**
|
|
323
|
+
|
|
324
|
+
```
|
|
325
|
+
kushi fde-intake {{active_project}}
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
Reply `next`, `skip`, or `done`.
|
|
329
|
+
|
|
330
|
+
---
|
|
331
|
+
|
|
332
|
+
**Moment 10 — FDE Report (5 shapes)**
|
|
333
|
+
|
|
334
|
+
> **`fde-report`** — generate an FDE-shaped engagement report. One skill, five shapes:
|
|
335
|
+
>
|
|
336
|
+
> - `weekly` (default) — internal status, 1–2 pages.
|
|
337
|
+
> - `short` — customer-facing, sanitized (no MACC / MS staffing / CRM IDs).
|
|
338
|
+
> - `long` — incoming-crew handoff, 3–5 pages.
|
|
339
|
+
> - `fitness` — 10-row FDE Fitness scorecard + verdict.
|
|
340
|
+
> - `stage-readiness` — "should we advance to the next FDE stage?" check.
|
|
341
|
+
>
|
|
342
|
+
> Read-only against Evidence; no outbound. Apply all 9 doctrine rules.
|
|
343
|
+
|
|
344
|
+
**Try it — weekly default:**
|
|
345
|
+
|
|
346
|
+
```
|
|
347
|
+
kushi fde-report {{active_project}}
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
**Try it — fitness scorecard:**
|
|
351
|
+
|
|
352
|
+
```
|
|
353
|
+
kushi fde-report {{active_project}} fitness
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
**Try it — stage-readiness check:**
|
|
357
|
+
|
|
358
|
+
```
|
|
359
|
+
kushi fde-report {{active_project}} stage-readiness
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
Reply `next`, `skip`, or `done`.
|
|
363
|
+
|
|
364
|
+
---
|
|
365
|
+
|
|
366
|
+
**Moment 11 — FDE Triage (full 7-file bundle)**
|
|
367
|
+
|
|
368
|
+
> **`fde-triage`** — produce the full FDE Triage bundle: 7 companion files at `Reports/triage/<YYYY-MM-DD>/`:
|
|
369
|
+
>
|
|
370
|
+
> 1. `00-fde-analysis.md` — concise FDE analysis (entry point)
|
|
371
|
+
> 2. `01-fde-fitness.md` — 10-row fitness scorecard
|
|
372
|
+
> 3. `02-risk-analysis.md` — risks bucketed into 8 reference-pack categories
|
|
373
|
+
> 4. `03-6Q.md` — 6-question engagement framing
|
|
374
|
+
> 5. `04-readiness-checklist.md` — **mobilization readiness** (distinct from stage readiness)
|
|
375
|
+
> 6. `05-executive-consolidated-report.md` — leadership readout
|
|
376
|
+
> 7. `06-global-opportunity-and-reuse.md` — repeatability lens
|
|
377
|
+
> 8. `07-validation-warnings-checklist.md` — central tracker (open / resolved / NA)
|
|
378
|
+
>
|
|
379
|
+
> Re-runs preserve user-edited statuses in file 07.
|
|
380
|
+
|
|
381
|
+
**Try it:**
|
|
382
|
+
|
|
383
|
+
```
|
|
384
|
+
kushi fde-triage {{active_project}}
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
Reply `next`, `skip`, or `done`.
|
|
388
|
+
|
|
389
|
+
---
|
|
390
|
+
|
|
391
|
+
**Moment 12 — Self-check before committing**
|
|
392
|
+
|
|
393
|
+
> **`self-check`** — Kushi has its own consistency checker. Before you commit changes to the kushi repo (or after editing an instruction file), run self-check to verify every skill is in the agent inventory, every prompt routes to a real skill, every cross-link resolves, and the live `~/.copilot/m-skills/kushi/` install matches the repo. Run it as a markdown report (default), JSON for CI (`-Json`), or with deeper hash + schema checks (`-Deep`). Cross-OS: on macOS/Linux use `./run.sh` (requires `pwsh` 7+).
|
|
394
|
+
|
|
395
|
+
**Try it — quick:**
|
|
396
|
+
|
|
397
|
+
```
|
|
398
|
+
kushi self-check
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
**Try it — deep + strict for CI (Windows):**
|
|
402
|
+
|
|
403
|
+
```
|
|
404
|
+
pwsh plugin/skills/self-check/run.ps1 -Deep -StrictExit
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
**Try it — deep + strict for CI (macOS / Linux):**
|
|
408
|
+
|
|
409
|
+
```
|
|
410
|
+
./plugin/skills/self-check/run.sh -Deep -StrictExit
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
Reply `next` to see the closing cheat sheet, or `done` to exit.
|
|
414
|
+
|
|
415
|
+
---
|
|
416
|
+
|
|
417
|
+
### Closing
|
|
418
|
+
|
|
419
|
+
> That's the full tour. Cheat sheet:
|
|
420
|
+
>
|
|
421
|
+
> | What you want | What to say |
|
|
422
|
+
> |---|---|
|
|
423
|
+
> | First-time engagement setup | `kushi bootstrap <project>` |
|
|
424
|
+
> | Catch up since last pull | `kushi refresh <project>` |
|
|
425
|
+
> | Backfill a custom range | `kushi refresh <project> last N days` |
|
|
426
|
+
> | One source only | `kushi pull <source> for <project>` |
|
|
427
|
+
> | Re-render state files (full only) | `kushi state <project>` |
|
|
428
|
+
> | Merge contributors | `kushi consolidate <project>` |
|
|
429
|
+
> | Inspect run-log | `kushi status <project>` |
|
|
430
|
+
> | **Ask a question (cited Q&A)** | `kushi ask <project> <question>` — or just say it naturally |
|
|
431
|
+
> | First-artifact FDE Intake | `kushi fde-intake <project>` |
|
|
432
|
+
> | FDE report (5 shapes) | `kushi fde-report <project> [shape]` |
|
|
433
|
+
> | Full FDE Triage bundle (7 files) | `kushi fde-triage <project>` |
|
|
434
|
+
> | Pre-commit validation | `kushi self-check` (or `-Deep`) |
|
|
435
|
+
> | This tour again | `kushi intro` |
|
|
436
|
+
>
|
|
437
|
+
> You can also describe what you need in plain language — kushi will route to the right verb. Reply `restart` to retake the tour, or just ask me anything.
|
|
438
|
+
|
|
439
|
+
---
|
|
440
|
+
|
|
441
|
+
## Validation Rules
|
|
442
|
+
|
|
443
|
+
- Rule 1.1: Trigger detection must match before activating — never activate if the user has already asked for a specific verb.
|
|
444
|
+
- Rule 1.2: Mode selection must always present BOTH options — never auto-route to one mode.
|
|
445
|
+
- Rule 1.3: In walkthrough mode, each moment must wait for `next` / `skip` / `done` / `try` before advancing — never auto-advance.
|
|
446
|
+
- Rule 1.4: `done` must work at every moment — never trap the user.
|
|
447
|
+
- Rule 1.5: Try-it prompts must use the active project name from `~/.copilot/project-evidence.yml`, OR the placeholder `Contoso Discovery` if no projects are configured. Never invent a real-sounding project name.
|
|
448
|
+
- Rule 1.6: Skill descriptions in this file must match `kushi.agent.md` and the live `SKILL.md` files — `self-check` D-checks catch drift.
|
|
449
|
+
- Rule 1.7: Demo moments must reflect the actual verb count in `kushi.agent.md`. If a verb is added or removed, this file must be updated in the same commit (`self-check` warns on drift).
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "project-status"
|
|
3
|
+
version: "2.0.0"
|
|
4
|
+
description: "Show the run-log status for a project: per-source watermarks, last-pulled, item counts, weekly_files index, recent errors. No source calls."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Skill: project-status
|
|
8
|
+
|
|
9
|
+
Run this when the user says: "status of `<X>`", "@Kushi status `<X>`", "what was the last refresh for `<X>`", "show run-log for `<X>`".
|
|
10
|
+
|
|
11
|
+
## Inputs
|
|
12
|
+
|
|
13
|
+
- `<project>` — project to inspect.
|
|
14
|
+
|
|
15
|
+
## Steps
|
|
16
|
+
|
|
17
|
+
### Step 1 — Read run-log
|
|
18
|
+
|
|
19
|
+
Read `<engagement-root>/<project>/Evidence/run-log.yml`.
|
|
20
|
+
|
|
21
|
+
### Step 2 — Display per-source table
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
| Source | Last Pulled | Watermark | Items | Status |
|
|
25
|
+
|------------|---------------------|---------------------|-------|--------|
|
|
26
|
+
| email | 2026-05-07 17:14 | 2026-05-07 17:14:00 | 247 | ✅ |
|
|
27
|
+
| teams | 2026-05-07 17:14 | 2026-05-07 17:14:00 | 89 | ✅ |
|
|
28
|
+
| onenote | 2026-05-07 17:14 | 2026-05-07 17:14:00 | 12 | ✅ |
|
|
29
|
+
| sharepoint | 2026-05-07 17:15 | 2026-05-07 17:15:00 | 34 | ✅ |
|
|
30
|
+
| meetings | 2026-05-07 17:15 | 2026-05-07 17:15:00 | 18 | ✅ |
|
|
31
|
+
| crm | 2026-05-07 17:15 | (snapshot) | 6 | ✅ |
|
|
32
|
+
| ado | 2026-05-07 17:15 | 2026-05-07 17:15:00 | 23 | ✅ |
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Step 3 — Display weekly_files index
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
| Week | Sources covered |
|
|
39
|
+
|------------|-----------------------------------------------------------|
|
|
40
|
+
| 2026-04-13 | email, teams, meetings |
|
|
41
|
+
| 2026-04-20 | email, teams, onenote, meetings |
|
|
42
|
+
| 2026-04-27 | email, teams, onenote, sharepoint, meetings |
|
|
43
|
+
| 2026-05-04 | email, teams, onenote, sharepoint, meetings |
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Step 4 — Recent errors
|
|
47
|
+
|
|
48
|
+
Scan run-log `history` for entries where `status != ok` in the last 5 runs. Display per source.
|
|
49
|
+
|
|
50
|
+
### Step 5 — Suggest next action
|
|
51
|
+
|
|
52
|
+
- If all watermarks within last 24h → "All sources fresh. No action needed."
|
|
53
|
+
- If any watermark > 7d old → "Consider `@Kushi refresh `<X>`` to catch up."
|
|
54
|
+
- If errors in recent runs → "Recent errors in `<source>`. Consider `@Kushi refresh `<X>` --source <source>`."
|
|
55
|
+
|
|
56
|
+
## Triggers
|
|
57
|
+
|
|
58
|
+
- "status of `<X>`"
|
|
59
|
+
- "@Kushi status `<X>`"
|
|
60
|
+
- "what was the last refresh for `<X>`"
|
|
61
|
+
- "show run-log for `<X>`"
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "pull-ado"
|
|
3
|
+
version: "2.0.0"
|
|
4
|
+
description: "Pull ADO evidence (snapshot: work-item fields; stream: comments + state changes + history). Conditional az login per az-auth-conditional rule."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Skill: pull-ado
|
|
8
|
+
|
|
9
|
+
Pulls **ado** evidence in two shapes per `snapshot-vs-stream.instructions.md`:
|
|
10
|
+
|
|
11
|
+
- **snapshot/** — work item with all fields (title, type, area, iteration, parent, state, assignee, custom fields)
|
|
12
|
+
- **stream/** — comments verbatim + state changes (old → new) + field changes + attachments — per work item
|
|
13
|
+
|
|
14
|
+
WorkIQ-first per `workiq-first.instructions.md`. Thoroughness per `evidence-thoroughness.instructions.md`; runtime detector + auto-retry + paste-prompt per `thoroughness-detector.instructions.md`. Citations per `citation-ledger.instructions.md`. Side-by-side mutable hints written immediately on discovery per `side-by-side-config.instructions.md`.
|
|
15
|
+
|
|
16
|
+
## Inputs
|
|
17
|
+
|
|
18
|
+
- `<project>` — already-resolved project name.
|
|
19
|
+
- `<alias>` — current contributor.
|
|
20
|
+
- `<window>` — date range. For snapshot: ignored (always full re-fetch). For stream: `(from, to)`.
|
|
21
|
+
- (read) `<engagement-root>/.project-evidence/m365/m365-mutable.json m365Mutable.knownSections.<project>` — pinned hints.
|
|
22
|
+
- (read) `<engagement-root>/<project>/Evidence/<alias>/.settings.yml` — per-(project x user) overrides.
|
|
23
|
+
|
|
24
|
+
## Resolution hints (pinned in mutable)
|
|
25
|
+
|
|
26
|
+
- `ado.engagementId` — pinned engagement work-item ID
|
|
27
|
+
- `ado.queryId` — saved query ID for the project
|
|
28
|
+
- `ado.areaPath` / `ado.iterationPath` — for filtering
|
|
29
|
+
|
|
30
|
+
## Snapshot pass
|
|
31
|
+
|
|
32
|
+
Write `snapshot/items/<id>.md` per work item with every field. Top header: id, title, type, state, parent, area, iteration, assignee, last fetched.
|
|
33
|
+
|
|
34
|
+
Write to: `<engagement-root>/<project>/Evidence/<alias>/ado/snapshot/<entity>.md`
|
|
35
|
+
|
|
36
|
+
Use template: `templates/snapshot/ado-<kind>.template.md`
|
|
37
|
+
|
|
38
|
+
## Stream pass
|
|
39
|
+
|
|
40
|
+
Per `evidence-thoroughness.instructions.md`: every comment verbatim with author + timestamp; every state change; every field change. Bucketed by ISO week into `stream/items/<id>/<YYYY-MM-DD>_ado-stream.md`.
|
|
41
|
+
|
|
42
|
+
Write to: `<engagement-root>/<project>/Evidence/<alias>/ado/stream/<YYYY-MM-DD>_ado-stream.md` (date = Monday of the ISO week the events fall in).
|
|
43
|
+
|
|
44
|
+
Use template: `templates/weekly/ado-summary.template.md`
|
|
45
|
+
|
|
46
|
+
If a week file already exists, MERGE (dedupe by event ID, append new events, keep existing).
|
|
47
|
+
|
|
48
|
+
## Tools (in order)
|
|
49
|
+
|
|
50
|
+
1. **WorkIQ** — ````$WorkIQQuery`````
|
|
51
|
+
2. **Host fallback** — ADO REST API via `az account get-access-token --resource 499b84ac-1321-427f-aa17-267ca6975798` (read connection/queries from `<engagement-root>/.project-evidence/ado/config.yml`)
|
|
52
|
+
3. **Graph REST** — last resort, soft-fail per `az-auth-conditional.instructions.md`.
|
|
53
|
+
4. **Ask user** — paste verbatim source content if all above fail.
|
|
54
|
+
|
|
55
|
+
Document which path succeeded under `## Source Basis` in each output file.
|
|
56
|
+
|
|
57
|
+
## Mutable hints to upsert (during the run, not at the end)
|
|
58
|
+
|
|
59
|
+
If discovered, immediately write to `m365Mutable.knownSections.<project>.<source>` with `discoveredOn` + `confidence`:
|
|
60
|
+
|
|
61
|
+
- `ado.engagementId` — pinned engagement work-item ID
|
|
62
|
+
- `ado.queryId` — saved query ID for the project
|
|
63
|
+
- `ado.areaPath` / `ado.iterationPath` — for filtering
|
|
64
|
+
|
|
65
|
+
## Update run-log
|
|
66
|
+
|
|
67
|
+
After successful pass:
|
|
68
|
+
- `sources.ado.last_pulled = now`
|
|
69
|
+
- `sources.ado.watermark = now` (stream only; snapshot has no watermark)
|
|
70
|
+
- `sources.ado.item_count = <N>`
|
|
71
|
+
- For each week touched, add to `weekly_files` index.
|
|
72
|
+
|
|
73
|
+
## Stop conditions
|
|
74
|
+
|
|
75
|
+
- Hint missing AND fuzzy resolution returns 0 candidates → ask user once, persist answer to mutable, continue.
|
|
76
|
+
- Multiple plausible candidates → ask user to pick, persist answer.
|
|
77
|
+
- WorkIQ fails AND host fallback fails AND Graph fails → write evidence file with `❌ all paths failed` marker, log to run-log errors, continue with rest of run.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "pull-crm"
|
|
3
|
+
version: "2.0.0"
|
|
4
|
+
description: "Pull CRM (Dataverse) evidence (snapshot: engagement record fields; stream: notes/activities/status changes). Conditional az login per az-auth-conditional rule."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Skill: pull-crm
|
|
8
|
+
|
|
9
|
+
Pulls **crm** evidence in two shapes per `snapshot-vs-stream.instructions.md`:
|
|
10
|
+
|
|
11
|
+
- **snapshot/** — engagement record with every field the API returns (owner, status, account, dates, custom fields)
|
|
12
|
+
- **stream/** — notes added, activities logged, field-level changes (old → new + actor + timestamp)
|
|
13
|
+
|
|
14
|
+
WorkIQ-first per `workiq-first.instructions.md`. Thoroughness per `evidence-thoroughness.instructions.md`; runtime detector + auto-retry + paste-prompt per `thoroughness-detector.instructions.md`. Citations per `citation-ledger.instructions.md`. Side-by-side mutable hints written immediately on discovery per `side-by-side-config.instructions.md`.
|
|
15
|
+
|
|
16
|
+
## Inputs
|
|
17
|
+
|
|
18
|
+
- `<project>` — already-resolved project name.
|
|
19
|
+
- `<alias>` — current contributor.
|
|
20
|
+
- `<window>` — date range. For snapshot: ignored (always full re-fetch). For stream: `(from, to)`.
|
|
21
|
+
- (read) `<engagement-root>/.project-evidence/m365/m365-mutable.json m365Mutable.knownSections.<project>` — pinned hints.
|
|
22
|
+
- (read) `<engagement-root>/<project>/Evidence/<alias>/.settings.yml` — per-(project x user) overrides.
|
|
23
|
+
|
|
24
|
+
## Resolution hints (pinned in mutable)
|
|
25
|
+
|
|
26
|
+
- `crm.recordId` — pinned engagement record GUID (FE-NNNNN-style)
|
|
27
|
+
- `crm.entitySetName` — Dataverse entity set name (e.g. `msdyn_engagements`)
|
|
28
|
+
|
|
29
|
+
## Snapshot pass
|
|
30
|
+
|
|
31
|
+
Write `snapshot/<record-id>.md` per CRM record with EVERY field the API returns (don't editorialize). Last fetched timestamp at top.
|
|
32
|
+
|
|
33
|
+
Write to: `<engagement-root>/<project>/Evidence/<alias>/crm/snapshot/<entity>.md`
|
|
34
|
+
|
|
35
|
+
Use template: `templates/snapshot/crm-<kind>.template.md`
|
|
36
|
+
|
|
37
|
+
## Stream pass
|
|
38
|
+
|
|
39
|
+
Per `evidence-thoroughness.instructions.md`: every annotation verbatim with author + timestamp; every field-level change with old → new + actor + timestamp. Bucketed by ISO week into `stream/<record-id>/<YYYY-MM-DD>_crm-stream.md`.
|
|
40
|
+
|
|
41
|
+
Write to: `<engagement-root>/<project>/Evidence/<alias>/crm/stream/<YYYY-MM-DD>_crm-stream.md` (date = Monday of the ISO week the events fall in).
|
|
42
|
+
|
|
43
|
+
Use template: `templates/weekly/crm-summary.template.md`
|
|
44
|
+
|
|
45
|
+
If a week file already exists, MERGE (dedupe by event ID, append new events, keep existing).
|
|
46
|
+
|
|
47
|
+
## Tools (in order)
|
|
48
|
+
|
|
49
|
+
1. **WorkIQ** — ````$WorkIQQuery`````
|
|
50
|
+
2. **Host fallback** — Dataverse REST Web API via `az account get-access-token` against the configured tenant (read connection from `<engagement-root>/.project-evidence/crm/config.yml`)
|
|
51
|
+
3. **Graph REST** — last resort, soft-fail per `az-auth-conditional.instructions.md`.
|
|
52
|
+
4. **Ask user** — paste verbatim source content if all above fail.
|
|
53
|
+
|
|
54
|
+
Document which path succeeded under `## Source Basis` in each output file.
|
|
55
|
+
|
|
56
|
+
## Mutable hints to upsert (during the run, not at the end)
|
|
57
|
+
|
|
58
|
+
If discovered, immediately write to `m365Mutable.knownSections.<project>.<source>` with `discoveredOn` + `confidence`:
|
|
59
|
+
|
|
60
|
+
- `crm.recordId` — pinned engagement record GUID (FE-NNNNN-style)
|
|
61
|
+
- `crm.entitySetName` — Dataverse entity set name (e.g. `msdyn_engagements`)
|
|
62
|
+
|
|
63
|
+
## Update run-log
|
|
64
|
+
|
|
65
|
+
After successful pass:
|
|
66
|
+
- `sources.crm.last_pulled = now`
|
|
67
|
+
- `sources.crm.watermark = now` (stream only; snapshot has no watermark)
|
|
68
|
+
- `sources.crm.item_count = <N>`
|
|
69
|
+
- For each week touched, add to `weekly_files` index.
|
|
70
|
+
|
|
71
|
+
## Stop conditions
|
|
72
|
+
|
|
73
|
+
- Hint missing AND fuzzy resolution returns 0 candidates → ask user once, persist answer to mutable, continue.
|
|
74
|
+
- Multiple plausible candidates → ask user to pick, persist answer.
|
|
75
|
+
- WorkIQ fails AND host fallback fails AND Graph fails → write evidence file with `❌ all paths failed` marker, log to run-log errors, continue with rest of run.
|