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.
Files changed (111) hide show
  1. package/.github/config/m365-auth.json.example +56 -0
  2. package/.github/config/m365-mutable.json.example +11 -0
  3. package/LICENSE +201 -0
  4. package/README.md +159 -0
  5. package/bin/cli.mjs +75 -0
  6. package/package.json +35 -0
  7. package/plugin/agents/kushi.agent.md +147 -0
  8. package/plugin/instructions/answer-from-evidence.instructions.md +73 -0
  9. package/plugin/instructions/auth-and-retry.instructions.md +116 -0
  10. package/plugin/instructions/az-auth-conditional.instructions.md +39 -0
  11. package/plugin/instructions/azure-auth-patterns.instructions.md +226 -0
  12. package/plugin/instructions/citation-ledger.instructions.md +52 -0
  13. package/plugin/instructions/engagement-root-resolution.instructions.md +82 -0
  14. package/plugin/instructions/evidence-thoroughness.instructions.md +62 -0
  15. package/plugin/instructions/side-by-side-config.instructions.md +56 -0
  16. package/plugin/instructions/snapshot-vs-stream.instructions.md +87 -0
  17. package/plugin/instructions/thoroughness-detector.instructions.md +105 -0
  18. package/plugin/instructions/workiq-first.instructions.md +47 -0
  19. package/plugin/plugin.json +96 -0
  20. package/plugin/prompts/aggregate.prompt.md +24 -0
  21. package/plugin/prompts/ask.prompt.md +16 -0
  22. package/plugin/prompts/bootstrap.prompt.md +23 -0
  23. package/plugin/prompts/consolidate.prompt.md +21 -0
  24. package/plugin/prompts/fde-intake.prompt.md +41 -0
  25. package/plugin/prompts/fde-report.prompt.md +46 -0
  26. package/plugin/prompts/fde-triage.prompt.md +46 -0
  27. package/plugin/prompts/refresh.prompt.md +17 -0
  28. package/plugin/prompts/state.prompt.md +17 -0
  29. package/plugin/prompts/status.prompt.md +17 -0
  30. package/plugin/reference-packs/README.md +74 -0
  31. package/plugin/reference-packs/fde/README.md +62 -0
  32. package/plugin/reference-packs/fde/core-fde-reference.md +427 -0
  33. package/plugin/reference-packs/fde/intake-questions.md +168 -0
  34. package/plugin/reference-packs/fde/report-doctrine.md +189 -0
  35. package/plugin/skills/aggregate-project/SKILL.md +72 -0
  36. package/plugin/skills/ask-project/SKILL.md +162 -0
  37. package/plugin/skills/bootstrap-project/SKILL.md +129 -0
  38. package/plugin/skills/build-state/SKILL.md +69 -0
  39. package/plugin/skills/consolidate-evidence/SKILL.md +47 -0
  40. package/plugin/skills/fde-intake/SKILL.md +147 -0
  41. package/plugin/skills/fde-report/SKILL.md +159 -0
  42. package/plugin/skills/fde-triage/SKILL.md +114 -0
  43. package/plugin/skills/intro/SKILL.md +449 -0
  44. package/plugin/skills/project-status/SKILL.md +61 -0
  45. package/plugin/skills/pull-ado/SKILL.md +77 -0
  46. package/plugin/skills/pull-crm/SKILL.md +75 -0
  47. package/plugin/skills/pull-email/SKILL.md +75 -0
  48. package/plugin/skills/pull-meetings/SKILL.md +77 -0
  49. package/plugin/skills/pull-onenote/SKILL.md +82 -0
  50. package/plugin/skills/pull-sharepoint/SKILL.md +85 -0
  51. package/plugin/skills/pull-teams/SKILL.md +75 -0
  52. package/plugin/skills/refresh-project/SKILL.md +89 -0
  53. package/plugin/skills/self-check/SKILL.md +166 -0
  54. package/plugin/skills/self-check/run.ps1 +517 -0
  55. package/plugin/skills/self-check/run.sh +33 -0
  56. package/plugin/templates/fde/intake.md +114 -0
  57. package/plugin/templates/fde/report-fitness.md +151 -0
  58. package/plugin/templates/fde/report-long.md +109 -0
  59. package/plugin/templates/fde/report-short.md +45 -0
  60. package/plugin/templates/fde/report-stage-readiness.md +70 -0
  61. package/plugin/templates/fde/report-weekly.md +73 -0
  62. package/plugin/templates/fde/triage-00-fde-analysis.md +78 -0
  63. package/plugin/templates/fde/triage-02-risk-analysis.md +76 -0
  64. package/plugin/templates/fde/triage-03-6Q.md +40 -0
  65. package/plugin/templates/fde/triage-04-readiness-checklist.md +82 -0
  66. package/plugin/templates/fde/triage-05-executive-consolidated.md +78 -0
  67. package/plugin/templates/fde/triage-06-global-opportunity.md +70 -0
  68. package/plugin/templates/fde/triage-07-validation-warnings.md +60 -0
  69. package/plugin/templates/init/ado-config.template.yml +21 -0
  70. package/plugin/templates/init/crm-config.template.yml +16 -0
  71. package/plugin/templates/init/kushi-projects.template.json +14 -0
  72. package/plugin/templates/init/m365-auth.template.json +67 -0
  73. package/plugin/templates/init/m365-mutable.template.json +19 -0
  74. package/plugin/templates/init/project-contributors.template.yml +27 -0
  75. package/plugin/templates/init/project-evidence.template.yml +32 -0
  76. package/plugin/templates/init/project-integrations.template.yml +34 -0
  77. package/plugin/templates/init/project-user-settings.template.yml +71 -0
  78. package/plugin/templates/paste-prompt.md +35 -0
  79. package/plugin/templates/snapshot/ado-item.template.md +45 -0
  80. package/plugin/templates/snapshot/crm-record.template.md +34 -0
  81. package/plugin/templates/snapshot/meetings-series-index.template.md +32 -0
  82. package/plugin/templates/snapshot/onenote-page.template.md +28 -0
  83. package/plugin/templates/snapshot/sharepoint-file.template.md +31 -0
  84. package/plugin/templates/snapshot/sharepoint-tree.template.md +39 -0
  85. package/plugin/templates/snapshot/teams-roster.template.md +27 -0
  86. package/plugin/templates/state/00_overview.template.md +44 -0
  87. package/plugin/templates/state/01_decisions.template.md +41 -0
  88. package/plugin/templates/state/02_stakeholders.template.md +48 -0
  89. package/plugin/templates/state/03_architecture-and-solution.template.md +56 -0
  90. package/plugin/templates/state/04_workshops-and-key-meetings.template.md +43 -0
  91. package/plugin/templates/state/05_action-items.template.md +29 -0
  92. package/plugin/templates/state/06_risks-and-issues.template.md +43 -0
  93. package/plugin/templates/state/07_timeline-and-milestones.template.md +45 -0
  94. package/plugin/templates/state/08_artifacts-and-deliverables.template.md +55 -0
  95. package/plugin/templates/state/09_open-questions.template.md +62 -0
  96. package/plugin/templates/state/README.md +41 -0
  97. package/plugin/templates/weekly/ado-stream.template.md +71 -0
  98. package/plugin/templates/weekly/consolidated.template.md +98 -0
  99. package/plugin/templates/weekly/crm-stream.template.md +74 -0
  100. package/plugin/templates/weekly/email-stream.template.md +103 -0
  101. package/plugin/templates/weekly/meetings-stream.template.md +182 -0
  102. package/plugin/templates/weekly/onenote-stream.template.md +106 -0
  103. package/plugin/templates/weekly/run-log.template.md +88 -0
  104. package/plugin/templates/weekly/sharepoint-stream.template.md +121 -0
  105. package/plugin/templates/weekly/teams-stream.template.md +121 -0
  106. package/src/constants.mjs +49 -0
  107. package/src/copy-assets.mjs +183 -0
  108. package/src/main.mjs +262 -0
  109. package/src/profile-resolver.mjs +168 -0
  110. package/src/prompt.mjs +42 -0
  111. package/src/settings.mjs +77 -0
@@ -0,0 +1,47 @@
1
+ ---
2
+ name: "consolidate-evidence"
3
+ version: "2.0.0"
4
+ description: "Merge per-contributor evidence (snapshot + stream) into Evidence/_Consolidated/ for a window. Provenance tags on every merged claim. Used by refresh-project and bootstrap-project when multiple contributors exist."
5
+ ---
6
+
7
+ # Skill: consolidate-evidence
8
+
9
+ Run this when multiple contributors have evidence and the user wants a single merged view per source per week. Triggers from `refresh-project` automatically when `Evidence/contributors.yml` lists >1 alias with recent evidence; or directly via `@Kushi consolidate <X> last 7 days`.
10
+
11
+ ## Inputs
12
+
13
+ - `<project>` — project to consolidate.
14
+ - `<window>` — date range to consolidate (default last 7 days).
15
+
16
+ ## Steps
17
+
18
+ ### Step 1 — Identify contributors with evidence in the window
19
+
20
+ Read `Evidence/contributors.yml`. For each alias, check if `Evidence/<alias>/*/stream/<weeks-in-window>.md` exists.
21
+
22
+ ### Step 2 — For each (week × source) in the window
23
+
24
+ Read all per-contributor stream files for that (week, source). Merge into:
25
+ `Evidence/_Consolidated/<source>/<YYYY-MM-DD>_consolidated.md`
26
+
27
+ Merge rules:
28
+ - Group by event ID where possible (message ID, transcript timestamp). Same event from multiple contributors → single entry, list contributors who saw it.
29
+ - Different events → preserve all, sorted chronologically.
30
+ - Every claim carries a provenance tag: `[via: <alias>]` immediately after the citation.
31
+ - If two contributors disagree on the content of the same event (e.g. different paraphrases) → include both, flag with `⚠️ Disagreement` and add a Q-row to `09_open-questions.md`.
32
+
33
+ ### Step 3 — Snapshot consolidation
34
+
35
+ Snapshots are mostly per-source-of-truth (one canonical entity), so consolidation is rarely needed. EXCEPT for:
36
+ - `Evidence/<alias>/teams/snapshot/chat-roster.md` — different contributors may see different chats. Union the rosters into `_Consolidated/teams/chat-roster.md` with `[via: <alias>]` per chat.
37
+ - `Evidence/<alias>/sharepoint/snapshot/files/*.md` — different contributors may have access to different SP sites. Union, deduped by file path.
38
+
39
+ ### Step 4 — Update run-log
40
+
41
+ Append a `consolidation_runs:` entry: `{ window, contributors, files_written }`.
42
+
43
+ ## Triggers
44
+
45
+ - "consolidate `<X>` last `<N>` days"
46
+ - "merge contributors for `<X>` week of `<date>`"
47
+ - (auto) called by refresh-project when contributors.yml lists >1 alias
@@ -0,0 +1,147 @@
1
+ ---
2
+ name: "fde-intake"
3
+ version: "1.0.0"
4
+ description: "Author or update the FDE Intake document — the first artifact in any FDE engagement. Reads project Evidence + the FDE reference pack (intake-questions + report-doctrine + core-fde-reference) and produces a single strategic brief that answers the 6 canonical FDE Intake questions. Read-only against the project; never refreshes sources; never sends outbound."
5
+ ---
6
+
7
+ # Skill: fde-intake
8
+
9
+ Author (first time) or update (subsequent runs) the FDE Intake document for an FDE engagement. The intake is the **first artifact** in the engagement's `Reports/` folder and is consumed by FDE Triage to decide which team is best suited and whether the engagement is billable or non-billable.
10
+
11
+ ## Hard rules
12
+
13
+ - **Read-only.** No `pull-*`, no Graph writes, no WorkIQ calls. Source pulls are a separate user-initiated step.
14
+ - **Cite everything.** Every claim carries an inline `[source: <alias>/<source>/<file> · YYYY-MM-DD]` (per project Evidence) or `[source: reference-packs/fde/<file>.md · <layer>]` (per the FDE reference pack). Untraceable assertions are defects.
15
+ - **No outbound.** Never send mail, Teams DM, RSVP comment, CRM/ADO note. If recommended next steps include reaching out, park them in the intake document only.
16
+ - **Apply the FDE report doctrine.** Source resolution gate, recency precedence, CRM-field-vs-confirmed-fact, validation warnings protocol — all per `reference-packs/fde/report-doctrine.md`.
17
+ - **Privacy posture.** The intake is an internal MS artifact. Do not include attendee emails — display names only.
18
+
19
+ ## Inputs
20
+
21
+ - `<project>` — fuzzy-matched project name (same resolution algorithm as `ask-project`).
22
+
23
+ ## Steps
24
+
25
+ ### Step 1 — Resolve project root
26
+
27
+ Same algorithm as `ask-project` Step 1. Echo the resolved root path before drafting.
28
+
29
+ ### Step 2 — Load the FDE reference pack
30
+
31
+ Build the pack's virtual filesystem with the **3-layer override order** (highest wins):
32
+
33
+ 1. **Project override** — `<engagement-root>/<project>/.kushi-reference/fde/` (if present)
34
+ 2. **User override** — `~/.copilot/kushi-reference/fde/` (if present)
35
+ 3. **Packaged default** — relative to this skill's install location:
36
+ - vscode target: `<workspace>/.kushi/reference-packs/fde/`
37
+ - clawpilot target: `~/.copilot/m-skills/kushi/reference-packs/fde/`
38
+
39
+ Required reads:
40
+
41
+ - `README.md` — pack overview + file ownership.
42
+ - `report-doctrine.md` — the 9 rules. Apply them throughout.
43
+ - `intake-questions.md` — the 6 canonical questions, role rules, validation summary shape.
44
+ - `core-fde-reference.md` — operating model, anti-patterns, fitness checklist, stage gates, CRM status meanings, risk categories.
45
+
46
+ Cite reference-pack quotes as `[source: reference-packs/fde/<file>.md · <layer>]` where `<layer>` is `packaged` / `user-override` / `project-override`.
47
+
48
+ ### Step 3 — Source Resolution Gate (Rule 1)
49
+
50
+ Per `report-doctrine.md § Rule 1`, attempt every applicable Evidence retrieval path and record per-source coverage. Append the result to the intake document's footer under `## Source Coverage` with one of: `retrieved` / `attempted-empty` / `attempted-failed` / `not-applicable` / `not-attempted`. An intake missing this section is a defect.
51
+
52
+ For each contributor in `Evidence/contributors.yml`, attempt:
53
+
54
+ 1. `Evidence/<alias>/crm/snapshot/<record>.md` — for MSX Opportunity ID, MACC, ECIF, ownership.
55
+ 2. `Evidence/_Consolidated/<latest-week>.md` — for the freshest cross-source picture.
56
+ 3. `Evidence/<alias>/meetings/stream/<latest-week>.md` + earlier weeks — for customer-confirmed outcomes.
57
+ 4. `Evidence/<alias>/teams/stream/<latest-week>.md` — for asynchronous decisions.
58
+ 5. `Evidence/<alias>/sharepoint/snapshot/files/*.md` — for proposals, SOWs, decks, business cases.
59
+ 6. `Evidence/<alias>/onenote/snapshot/pages/*.md` — for durable architecture and plans.
60
+ 7. `Evidence/<alias>/email/stream/<latest-week>.md` — for sponsor / ATU correspondence.
61
+
62
+ ### Step 4 — Detect existing intake
63
+
64
+ If `<engagement-root>/<project>/Reports/00-FDE-Intake-<project>.md` already exists:
65
+
66
+ - Load it.
67
+ - Treat user-authored prose as **canonical** unless Evidence contradicts. Preserve verbiage when re-rendering.
68
+ - Diff each section against newest Evidence. Update changed answers; mark superseded items per Rule 2.
69
+ - Append a `## Revision log` entry at the bottom (date + author = current alias + summary of changes).
70
+
71
+ If absent → first-time author.
72
+
73
+ ### Step 5 — Apply intake-questions doctrine
74
+
75
+ Per `intake-questions.md`, the intake answers **6 canonical questions** plus role / commercial / outcome / risk sections. Use the template `templates/fde/intake.md` as the structural skeleton. Fill every placeholder, including required validation warnings where Evidence is silent.
76
+
77
+ Sections (required, in order):
78
+
79
+ 1. Document header (Customer + Engagement title + MSX Opportunity).
80
+ 2. **Question 1** — Who is the customer, and what business problem are they trying to solve?
81
+ 3. **Question 2** — What is being asked of FDE specifically?
82
+ 4. **Question 3** — Why is FDE the right offer (vs partner / standard MS product / advisory)?
83
+ 5. **Question 4** — When does this need to land, and is the timeline realistic?
84
+ 6. **Question 5** — How will success be measured (customer's own ROI)?
85
+ 7. **Question 6** — Who catches the outcome after FDE leaves?
86
+ 8. Microsoft stakeholder roster.
87
+ 9. Customer stakeholder roster.
88
+ 10. Commercial summary (MACC / ECIF / funding model / legal posture).
89
+ 11. Outcome hypothesis + KPIs (with baseline + target).
90
+ 12. Top risks (using the 8 reference-pack risk categories).
91
+ 13. Anti-patterns triggered (from `core-fde-reference.md`).
92
+ 14. Validation warnings summary.
93
+ 15. Source coverage.
94
+
95
+ ### Step 6 — Apply doctrine rules
96
+
97
+ Walk every Rule from `report-doctrine.md`. For each one that fires, embed an inline `> ⚠️ VALIDATION WARNING — Rule X.Y: <description>` blockquote in the relevant section AND mirror it in the document's `## Validation warnings` summary section.
98
+
99
+ Common triggers for intake:
100
+
101
+ - **Rule 3.x** — CRM lists MSX Opportunity in `Draft`; surface qualifier "CRM field value — not yet customer-confirmed".
102
+ - **Rule 4.1** — ATU rep or Industry team not yet engaged.
103
+ - **Rule 4.2** — Funding model / MACC absent.
104
+ - **Rule 4.3** — Outcome KPIs missing baseline or target.
105
+ - **Rule 5.1** — Stage claim in CRM not yet supported by Evidence.
106
+ - **Rule 6.1** — CWAA / EMA / contracting absent.
107
+
108
+ ### Step 7 — Freshness gate (Rule 7)
109
+
110
+ If the freshest Evidence is older than `chat.freshness_warn_days` (default 14), embed at the top of the intake:
111
+
112
+ > ℹ️ Freshest evidence is N days old (as of YYYY-MM-DD). Consider `@Kushi refresh <project>` before relying on this intake for high-stakes decisions.
113
+
114
+ Do NOT auto-refresh.
115
+
116
+ ### Step 8 — Save
117
+
118
+ Write to `<engagement-root>/<project>/Reports/00-FDE-Intake-<project>.md`. Create the `Reports/` folder if absent. The intake does **not** use the date-prefixed naming convention used by `fde-report` shapes — it lives in-place and is updated.
119
+
120
+ Append a row to `Evidence/run-log.yml` under `fde_reports:` documenting the run (key: `intake`, value: `{ written: <date>, source_coverage: <summary>, warnings_open: <count> }`).
121
+
122
+ ### Step 9 — Run summary
123
+
124
+ Display:
125
+
126
+ - Resolved project root + freshness banner if applicable.
127
+ - Whether this was first-time author OR update (and what changed if update).
128
+ - Validation warnings count by rule.
129
+ - Open Questions opened by this run.
130
+ - Pointer to file path + suggestion: *"You can ask `@Kushi fde-triage <project>` to produce the full triage bundle, or `@Kushi fde-report <project> stage-readiness` for an advance-the-stage check."*
131
+
132
+ ## See also
133
+
134
+ - `plugin/reference-packs/fde/intake-questions.md` — the 6 questions + role rules
135
+ - `plugin/reference-packs/fde/report-doctrine.md` — the 9 rules every FDE report must obey
136
+ - `plugin/reference-packs/fde/core-fde-reference.md` — operating model, fitness checklist, stage gates
137
+ - `plugin/templates/fde/intake.md` — template skeleton
138
+ - `plugin/skills/fde-report/SKILL.md` — sibling skill for stage-readiness / weekly / etc.
139
+ - `plugin/skills/fde-triage/SKILL.md` — produces the full 7-file triage bundle
140
+
141
+ ## Triggers
142
+
143
+ - "fde intake for `<project>`"
144
+ - "kushi fde-intake `<project>`"
145
+ - "draft the fde intake for `<project>`"
146
+ - "update the intake for `<project>`"
147
+ - "@Kushi fde-intake `<project>`"
@@ -0,0 +1,159 @@
1
+ ---
2
+ name: "fde-report"
3
+ version: "1.0.0"
4
+ description: "Generate FDE-shaped engagement reports in one of five shapes (weekly / short / long / fitness / stage-readiness), grounded in the project's Evidence/ folder AND the FDE reference pack (operating model, doctrine, intake questions, anti-patterns, fitness criteria, stage gates, CRM status meanings, risk categories). Read-only; no source pulls; no outbound."
5
+ ---
6
+
7
+ # Skill: fde-report
8
+
9
+ Generates FDE (Forward Deployed Engineering) reports for an engagement. Five report shapes share one skill — invocation differs by trailing `<shape>` argument. The skill reads Evidence/ directly and **never** depends on State/ — it works on `standard` profile (no State/ rollup) and `full` profile equally.
10
+
11
+ ## Report shapes
12
+
13
+ The user picks one of five (default: `weekly`):
14
+
15
+ | Shape | Audience | Tone | Length | Verb |
16
+ |---|---|---|---|---|
17
+ | `weekly` | Internal MS leads (TPM / EM / Recon / Studio) | Direct, action-oriented | 1–2 pages | `@Kushi fde-report <project>` |
18
+ | `short` | Customer sponsor + business owner | Outcome-oriented, sanitized | 1 page | `@Kushi fde-report <project> short` |
19
+ | `long` | Incoming FDE crew during transition | Comprehensive context dump | 3–5 pages | `@Kushi fde-report <project> long` |
20
+ | `fitness` | FDE leadership / triage | 10-row FDE fitness scorecard + verdict | 1 page | `@Kushi fde-report <project> fitness` |
21
+ | `stage-readiness` | FDE leadership / triage | Stage-gate diff (advance the stage?) | 1 page | `@Kushi fde-report <project> stage-readiness` |
22
+
23
+ Invocation:
24
+
25
+ ```text
26
+ @Kushi fde-report <project> → weekly (default)
27
+ @Kushi fde-report <project> weekly
28
+ @Kushi fde-report <project> short
29
+ @Kushi fde-report <project> long
30
+ @Kushi fde-report <project> fitness
31
+ @Kushi fde-report <project> stage-readiness
32
+ ```
33
+
34
+ > Note on `fitness` vs the triage bundle: `fde-report <project> fitness` produces the same content as bundle file 01 of `fde-triage`. Use it standalone when you want only the fitness scorecard.
35
+ >
36
+ > Note on `stage-readiness` vs mobilization readiness: `stage-readiness` answers "should we advance to the next FDE stage?" (per stage exit criteria from `core-fde-reference.md`). The triage bundle's file 04 (`readiness-checklist.md`) answers a different question — "if we got approval today, could the crew actually start?". Different audiences, different artifacts; run both for a stage gate.
37
+
38
+ ## Hard rules
39
+
40
+ - **Read-only.** No `pull-*`, no Graph writes, no WorkIQ calls. Source pulls are a separate user-initiated step.
41
+ - **Cite everything.** Per `report-doctrine.md § Rule 8`. Reference-pack assertions cite `[source: reference-packs/fde/<file>.md · <layer>]`.
42
+ - **No outbound.** Never send mail, Teams DM, RSVP comment, CRM/ADO note.
43
+ - **Apply the FDE report doctrine.** All 9 rules from `reference-packs/fde/report-doctrine.md`.
44
+ - **Privacy posture.** `short` is **external-facing** — apply Rule 9 (suppress MACC/ECIF, MS staffing, FDE-internal stage terms, CRM IDs, attendee emails). All other shapes are **internal** — show everything.
45
+ - **Reads Evidence/ directly.** Does not require State/. On `full` profile, State/ is consulted for convenience but Evidence/ remains source of truth.
46
+ - **Stage claims must be grounded.** Per Rule 5. If CRM says Stage 4 but Evidence supports Stage 3 → embed `Rule 5.1` warning AND list mismatch in Open Questions.
47
+
48
+ ## Inputs
49
+
50
+ - `<project>` — fuzzy-matched project name (same resolution algorithm as `ask-project`).
51
+ - `<shape>` — `weekly` (default) | `short` | `long` | `fitness` | `stage-readiness`.
52
+
53
+ ## Steps
54
+
55
+ ### Step 1 — Resolve project root
56
+
57
+ Same algorithm as `ask-project` Step 1. Echo the resolved root path before generating the report.
58
+
59
+ ### Step 2 — Load the FDE reference pack
60
+
61
+ Build the pack's virtual filesystem with the **3-layer override order** (project → user → packaged). Required reads:
62
+
63
+ - `README.md` — pack overview + file ownership.
64
+ - `report-doctrine.md` — the 9 rules. Apply throughout.
65
+ - `core-fde-reference.md` — operating model, fitness checklist (10 rows), stage gates + exit criteria, anti-patterns, CRM status meanings, risk categories (8).
66
+ - `intake-questions.md` — only if the shape narrates intake answers.
67
+
68
+ If two files in the SAME layer disagree on a concept, surface the conflict in the report's `## Open Questions` — do not silently average.
69
+
70
+ ### Step 3 — Source Resolution Gate (Rule 1)
71
+
72
+ Attempt every applicable Evidence retrieval path per `report-doctrine.md § Rule 1`. Record per-source coverage in the report's `## Source Coverage` footer.
73
+
74
+ Cheapest → richest, stop when sufficient for the chosen shape:
75
+
76
+ 1. (If full profile + State/ exists) `State/00_overview.md` → `09_open-questions.md`.
77
+ 2. `Evidence/_Consolidated/<latest-week>.md` — if it exists.
78
+ 3. `Evidence/<alias>/crm/snapshot/<record>.md` — for CRM stage/status, MACC, ECIF, ownership.
79
+ 4. `Evidence/<alias>/ado/snapshot/items/` — for engagement record + work items.
80
+ 5. `Evidence/<alias>/meetings/stream/<latest-week>.md` — for customer-confirmed decisions.
81
+ 6. `Evidence/<alias>/teams/stream/<latest-week>.md` — for asynchronous decisions / asks.
82
+ 7. `Evidence/<alias>/onenote/snapshot/pages/*.md` — for durable artifacts (architecture, plans).
83
+ 8. `Evidence/<alias>/sharepoint/snapshot/files/*.md` — for proposals, SOWs, business cases.
84
+ 9. `Evidence/<alias>/email/stream/<latest-week>.md` — for sponsor / ATU correspondence.
85
+
86
+ For **CRM status**, prefer the CRM snapshot file. If CRM disagrees with the freshest customer-facing source → Rule 2 (recency precedence) + Rule 3 warnings.
87
+
88
+ ### Step 4 — Apply the reference pack to Evidence
89
+
90
+ For each section of the chosen shape, ground Evidence-derived facts against the reference-pack doctrine:
91
+
92
+ - **Stage assessment** — read CRM `Status` from snapshot, look up the row in `core-fde-reference.md § CRM Triage Plan Status Meanings`, report the stage with that exact interpretation.
93
+ - **What's pending to advance** — pull the corresponding "Minimum Checklist" + "Exit Criteria" from `core-fde-reference.md § FDE Intake Stages, Gates, and Checklists` and diff against Evidence.
94
+ - **FDE fit** — walk the 10-row "FDE Fitness Checklist"; mark each row `Good Signal` / `Risk Signal` / `Unknown` based on Evidence. Unknowns → Open Questions.
95
+ - **Risks** — bucket project-specific risks into the 8 reference-pack categories.
96
+
97
+ ### Step 5 — Apply doctrine rules
98
+
99
+ Walk every Rule from `report-doctrine.md`. Embed inline `> ⚠️ VALIDATION WARNING — Rule X.Y: <description>` blockquotes wherever Evidence is silent or contradicts. Summarize all warnings in the report's `## Validation warnings` section.
100
+
101
+ ### Step 6 — Freshness gate (Rule 7)
102
+
103
+ Read `Evidence/run-log.yml`. If any source material to this report is older than `chat.freshness_warn_days` (default 14), warn the user inline at the top of the report and offer `@Kushi refresh <project>`. Do NOT auto-refresh.
104
+
105
+ ### Step 7 — Render
106
+
107
+ Render the chosen shape using the matching template from `plugin/templates/fde/`:
108
+
109
+ | Shape | Template |
110
+ |---|---|
111
+ | `weekly` | `report-weekly.md` |
112
+ | `short` | `report-short.md` |
113
+ | `long` | `report-long.md` |
114
+ | `fitness` | `report-fitness.md` |
115
+ | `stage-readiness` | `report-stage-readiness.md` |
116
+
117
+ Fill every `{{placeholder}}` from the template using Evidence + reference-pack content. Required sections (every shape):
118
+
119
+ - Header (project + shape + generated-at + freshness banner if applicable).
120
+ - Body sections per template.
121
+ - `## Validation warnings` — all warnings raised by this report.
122
+ - `## Source Coverage` — per-source retrieval result.
123
+
124
+ ### Step 8 — Save
125
+
126
+ Save to `<engagement-root>/<project>/Reports/fde-<shape>-<YYYY-MM-DD>.md`. Create the `Reports/` folder if absent. Append a row to `Evidence/run-log.yml` under `fde_reports:` documenting the run (key: `<shape>-<YYYY-MM-DD>`, value: `{ written: <date>, source_coverage: <summary>, warnings_open: <count> }`).
127
+
128
+ > On `standard` profile (no State/), this is the only opinionated output. On `full` profile, State/ provides additional grounding but the file path is identical.
129
+
130
+ ### Step 9 — Run summary
131
+
132
+ Display:
133
+
134
+ - Resolved project root + freshness banner if applicable.
135
+ - Shape produced + output path.
136
+ - Validation warnings count by rule.
137
+ - Pointer: *"Try `@Kushi fde-triage <project>` for the full 7-file bundle, or `@Kushi fde-intake <project>` for the first-artifact intake document."*
138
+
139
+ ## See also
140
+
141
+ - `plugin/reference-packs/fde/README.md` — what the FDE pack covers and how it's organized
142
+ - `plugin/reference-packs/fde/report-doctrine.md` — the 9 rules every FDE report must obey
143
+ - `plugin/reference-packs/fde/core-fde-reference.md` — operating model + fitness checklist + stage gates
144
+ - `plugin/templates/fde/report-*.md` — shape templates
145
+ - `plugin/skills/fde-intake/SKILL.md` — first-artifact intake document (precursor)
146
+ - `plugin/skills/fde-triage/SKILL.md` — full 7-file triage bundle
147
+ - `plugin/skills/ask-project/SKILL.md` — uses the same reference pack for FDE-shaped Q&A
148
+ - `plugin/instructions/answer-from-evidence.instructions.md` — citation discipline
149
+
150
+ ## Triggers
151
+
152
+ - "fde report for `<project>`"
153
+ - "kushi fde-report `<project>` `<shape>`"
154
+ - "weekly fde report for `<project>`"
155
+ - "customer-facing fde report for `<project>`" → `short` shape
156
+ - "handoff fde report for `<project>`" → `long` shape
157
+ - "fde fitness for `<project>`"
158
+ - "stage readiness for `<project>`"
159
+ - "@Kushi fde-report `<project>` [`<shape>`]"
@@ -0,0 +1,114 @@
1
+ ---
2
+ name: "fde-triage"
3
+ version: "1.0.0"
4
+ description: "Produce the full FDE Triage bundle — 7 companion files at <project>/Reports/triage/<YYYY-MM-DD>/ covering analysis, fitness, risk, 6Q framing, mobilization readiness, executive readout, global reuse, and a central validation warnings tracker. Grounded in project Evidence + the FDE reference pack. Read-only; no outbound."
5
+ ---
6
+
7
+ # Skill: fde-triage
8
+
9
+ Produce the full **FDE Triage bundle** for an FDE engagement — a 7-file companion set generated as a single dated folder. The bundle is the standard handoff package between FDE Intake (authoring) and FDE leadership triage (decisioning).
10
+
11
+ ## Hard rules
12
+
13
+ - **Read-only.** No `pull-*`, no Graph writes, no WorkIQ calls. Source pulls are a separate user-initiated step.
14
+ - **Cite everything.** Per `report-doctrine.md § Rule 8`. Reference-pack assertions cite `[source: reference-packs/fde/<file>.md · <layer>]`.
15
+ - **No outbound.** Never send mail, Teams DM, CRM note, ADO comment.
16
+ - **Apply the FDE report doctrine.** All 9 rules from `reference-packs/fde/report-doctrine.md`. Validation warnings inline + mirrored in file 07.
17
+ - **Privacy posture.** Triage bundle is **internal**. Do not suppress MS staffing, MACC, ECIF — leadership audience needs these. Do still avoid attendee emails (display names only).
18
+ - **No silent regenerate.** If the user has hand-edited file 07 to mark warnings `resolved` / `not-applicable`, preserve those statuses on re-run (merge by Rule + description).
19
+
20
+ ## Inputs
21
+
22
+ - `<project>` — fuzzy-matched project name (same resolution algorithm as `ask-project`).
23
+
24
+ ## Steps
25
+
26
+ ### Step 1 — Resolve project root
27
+
28
+ Same algorithm as `ask-project` Step 1. Echo the resolved root path.
29
+
30
+ ### Step 2 — Load the FDE reference pack
31
+
32
+ Build the pack's virtual filesystem with the **3-layer override order** (project → user → packaged). Required reads:
33
+
34
+ - `README.md` — pack overview.
35
+ - `report-doctrine.md` — the 9 rules.
36
+ - `core-fde-reference.md` — fitness checklist (10 rows), stage gates, anti-patterns, CRM status meanings, risk categories (8).
37
+ - `intake-questions.md` — only if file 00 references the 6Q framing.
38
+
39
+ ### Step 3 — Source Resolution Gate (Rule 1)
40
+
41
+ Same as `fde-intake` Step 3. Record per-source coverage per file (every bundle file has its own `## Source Coverage` section).
42
+
43
+ ### Step 4 — Detect existing bundle
44
+
45
+ Look for any existing folder under `<engagement-root>/<project>/Reports/triage/`:
46
+
47
+ - If today's folder (`<YYYY-MM-DD>/`) exists → overwrite files 00–06 in place, MERGE file 07 (preserve open / resolved / NA statuses, refresh descriptions).
48
+ - If a prior date exists → create a new dated folder, but read the most-recent prior file 07 to preserve user-set NA justifications for stable warnings.
49
+ - If no prior bundle → first-time author.
50
+
51
+ ### Step 5 — Render the 7 bundle files
52
+
53
+ Render in this order. Each file uses the matching template from `plugin/templates/fde/`:
54
+
55
+ | # | File | Template | Purpose |
56
+ |---|---|---|---|
57
+ | 00 | `00-fde-analysis.md` | `triage-00-fde-analysis.md` | Concise FDE-oriented project analysis — bundle entry point |
58
+ | 01 | `01-fde-fitness.md` | `report-fitness.md` (reused) | 10-row FDE fitness scorecard + overall fit verdict |
59
+ | 02 | `02-risk-analysis.md` | `triage-02-risk-analysis.md` | Risk view bucketed into 8 FDE risk categories |
60
+ | 03 | `03-6Q.md` | `triage-03-6Q.md` | 6-question engagement framing brief |
61
+ | 04 | `04-readiness-checklist.md` | `triage-04-readiness-checklist.md` | Mobilization readiness — distinct from stage readiness |
62
+ | 05 | `05-executive-consolidated-report.md` | `triage-05-executive-consolidated.md` | Leadership-friendly combined readout |
63
+ | 06 | `06-global-opportunity-and-reuse.md` | `triage-06-global-opportunity.md` | Repeatability + reuse + commercialization lens |
64
+ | 07 | `07-validation-warnings-checklist.md` | `triage-07-validation-warnings.md` | Central tracker of all warnings (open / resolved / NA) |
65
+
66
+ **File 01 reuses the `report-fitness.md` template** verbatim (no separate `triage-01-` template) — it is the same content the standalone `fde-report <project> fitness` shape produces.
67
+
68
+ **Mobilization readiness (file 04) is distinct from the `stage-readiness` report shape**:
69
+
70
+ - File 04 — "If we got approval today, could the crew actually start?" (8 Hard items + 8 Soft items).
71
+ - `fde-report <project> stage-readiness` — "Should we advance to the next FDE stage?" (per stage exit criteria from `core-fde-reference.md`).
72
+
73
+ Run them both for a stage gate.
74
+
75
+ ### Step 6 — Apply doctrine rules
76
+
77
+ Walk every Rule from `report-doctrine.md` for every bundle file. Embed inline `> ⚠️ VALIDATION WARNING — Rule X.Y` blockquotes wherever Evidence is silent or contradicts. **Mirror every warning into file 07** with status `open` (or preserve prior `resolved` / `not-applicable` on re-run).
78
+
79
+ ### Step 7 — Freshness gate (Rule 7)
80
+
81
+ If the freshest Evidence is older than `chat.freshness_warn_days` (default 14), embed at the top of file 05 (executive readout) and file 00 (analysis entry point):
82
+
83
+ > ℹ️ Freshest evidence is N days old (as of YYYY-MM-DD). Consider `@Kushi refresh <project>` before relying on this bundle for triage decisions.
84
+
85
+ Do NOT auto-refresh.
86
+
87
+ ### Step 8 — Save
88
+
89
+ Write all 7 files to `<engagement-root>/<project>/Reports/triage/<YYYY-MM-DD>/`. Create the folder if absent. Append a row to `Evidence/run-log.yml` under `fde_reports:` documenting the run (key: `triage-<YYYY-MM-DD>`, value: `{ written: <date>, files: 7, warnings_open: <count>, warnings_resolved_preserved: <count> }`).
90
+
91
+ ### Step 9 — Run summary
92
+
93
+ Display:
94
+
95
+ - Resolved project root + freshness banner if applicable.
96
+ - Bundle folder path + file count.
97
+ - Validation warnings count by rule + by status (open / resolved / NA).
98
+ - Pointer: *"Next steps: review file 05 (executive readout). To advance the stage, run `@Kushi fde-report <project> stage-readiness`."*
99
+
100
+ ## See also
101
+
102
+ - `plugin/reference-packs/fde/report-doctrine.md` — the 9 rules
103
+ - `plugin/reference-packs/fde/core-fde-reference.md` — fitness checklist, stage gates, risk categories
104
+ - `plugin/templates/fde/triage-*.md` — bundle templates
105
+ - `plugin/skills/fde-intake/SKILL.md` — produces the precursor intake document
106
+ - `plugin/skills/fde-report/SKILL.md` — sibling skill for non-bundle report shapes
107
+
108
+ ## Triggers
109
+
110
+ - "fde triage for `<project>`"
111
+ - "kushi fde-triage `<project>`"
112
+ - "triage bundle for `<project>`"
113
+ - "do the full fde triage for `<project>`"
114
+ - "@Kushi fde-triage `<project>`"