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,56 @@
1
+ {
2
+ "m365Auth": {
3
+ "defaultTenantId": "<azure-tenant-id>",
4
+ "resources": {
5
+ "graph": "https://graph.microsoft.com",
6
+ "sharePoint": "https://microsoft-my.sharepoint.com",
7
+ "dataverse": "https://iscrm.crm.dynamics.com"
8
+ },
9
+ "oneNote": {
10
+ "defaultNotebookName": "<default-notebook-name>",
11
+ "defaultNotebookId": "<default-notebook-id>",
12
+ "defaultSectionResolverUrl": "https://<tenant>-my.sharepoint.com/personal/<user>/_layouts/Doc.aspx?sourcedoc={<notebook-guid>}",
13
+ "defaultNotebookRootLink": "onenote:https://<tenant>-my.sharepoint.com/personal/<user>/Documents/<notebook-path>/",
14
+ "defaultLinkOwner": "<default-link-owner>"
15
+ },
16
+ "emailContext": {
17
+ "enabled": true,
18
+ "workiqOnly": true,
19
+ "dateFloor": "2026-01-01",
20
+ "folders": [
21
+ "Inbox/<primary-project-folder>",
22
+ "Inbox/<secondary-project-folder>"
23
+ ],
24
+ "includeSubfolders": true,
25
+ "sourceCoverageLabel": "<mailbox-scope-label>",
26
+ "matchingPolicy": {
27
+ "mode": "hybrid",
28
+ "rankingOrder": [
29
+ "exact",
30
+ "prefix",
31
+ "contains"
32
+ ],
33
+ "minConfidenceForFolderScopedSearch": "high",
34
+ "fallbackToFullRootScanWhenAmbiguous": true
35
+ }
36
+ },
37
+ "teamsChatContext": {
38
+ "enabled": true,
39
+ "workiqOnly": true,
40
+ "dateFloor": "2026-01-01",
41
+ "scope": {
42
+ "includeChats": true,
43
+ "includeChannels": true
44
+ },
45
+ "matchingPolicy": {
46
+ "mode": "thread-first",
47
+ "rankingOrder": [
48
+ "exact",
49
+ "prefix",
50
+ "contains"
51
+ ],
52
+ "fallbackToBroaderSearchWhenAmbiguous": true
53
+ }
54
+ }
55
+ }
56
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "m365Mutable": {
3
+ "metadata": {
4
+ "description": "Mutable M365 operational mappings used to speed and stabilize context retrieval. Copy this file to m365-mutable.json for local use.",
5
+ "defaultNotebookRef": ".github/config/m365-auth.json -> m365Auth.oneNote.defaultNotebookId",
6
+ "matching": "case-insensitive by project key (exact/prefix/contains)",
7
+ "source": "Derived from project external-links.txt entries, mailbox discovery, and Teams thread discovery during bootstrap/refresh/retry runs."
8
+ },
9
+ "knownSections": {}
10
+ }
11
+ }
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,159 @@
1
+ # Kushi
2
+
3
+ [![npm version](https://img.shields.io/npm/v/kushi-agents.svg)](https://www.npmjs.com/package/kushi-agents)
4
+ [![npm downloads](https://img.shields.io/npm/dw/kushi-agents.svg)](https://www.npmjs.com/package/kushi-agents)
5
+ [![license](https://img.shields.io/npm/l/kushi-agents.svg)](LICENSE)
6
+
7
+ > A multi-skill GitHub Copilot agent for grounded engagement evidence — across Email, Teams, Meetings, OneNote, SharePoint, Dataverse (CRM), and Azure DevOps.
8
+
9
+ 📖 **Full docs: https://gim-home.github.io/kushi/**
10
+
11
+ ## The essence: aggregate, then answer
12
+
13
+ Kushi has two halves that work as one loop:
14
+
15
+ 1. **Aggregate** — pull evidence from every M365 + CRM + ADO surface (email, Teams, meetings, OneNote, SharePoint, Dataverse, Azure DevOps) into a structured per-engagement folder on disk. Captured as **snapshot** (current truth) + **stream** (timestamped events), with provenance.
16
+ 2. **Answer** — a read-only **ask-me-anything** agent over that evidence. Every assertion cites the source file + date. No new pulls at answer time. No hallucination. Freshness-gated. Auto-routes when a message names a known project and asks a question — no special prefix needed.
17
+
18
+ ```
19
+ > @Kushi bootstrap Acme # aggregate: pull 30d baseline + build State
20
+ > what's the MACC for Acme? # answer: cited, grounded, instant
21
+ > who is the EM on Acme? # answer: auto-routes, no prefix
22
+ > @Kushi refresh Acme # aggregate: incremental from last watermark
23
+ ```
24
+
25
+ The split is deliberate: aggregation is **heavy, scheduled, replayable**; answering is **cheap, instant, citable**. A weekly refresh keeps the corpus fresh so every question is already grounded.
26
+
27
+ See [Concepts → Aggregate, then Answer](https://gim-home.github.io/kushi/concepts/aggregate-and-answer/) for the full pattern.
28
+
29
+ ## Three install profiles
30
+
31
+ Kushi ships in three tiers. Pick how much you take — the default (`standard`) matches v2.x behavior end-to-end.
32
+
33
+ | Profile | What's installed | Pick this if… |
34
+ |---|---|---|
35
+ | **`core`** | Aggregator only: `aggregate`, `consolidate`, `status`, `pull`, `ask` | You want raw Evidence/ + cited Q&A — typically to feed an external rollup repo or BI system. |
36
+ | **`standard`** *(default)* | core + `bootstrap`, `refresh`, FDE authoring trio (`fde-intake`, `fde-report`, `fde-triage`) + FDE reference pack | Kushi's default opinion. No State/ rollup. |
37
+ | **`full`** | standard + `state` (renders the opinionated `State/` rollup) | You want everything, including the outcome-based State/ files. |
38
+
39
+ ```bash
40
+ npx github:gim-home/kushi --clawpilot # default = standard
41
+ npx github:gim-home/kushi --clawpilot --profile core # aggregator only
42
+ npx github:gim-home/kushi --clawpilot --profile full # everything
43
+ ```
44
+
45
+ The Evidence/ folder produced by every profile is a **stable public contract** — external systems can read from it without depending on Kushi internals. See [Concepts → Profiles and report packs](https://gim-home.github.io/kushi/concepts/profiles-and-packs/) and the [Evidence contract](https://gim-home.github.io/kushi/reference/evidence-contract/).
46
+
47
+ ## Verbs
48
+
49
+ | Verb | Profile | Window | What it does |
50
+ |------|---------|--------|--------------|
51
+ | `aggregate` | core+ | last watermark → now | Pull every enabled source + consolidate. **No State/ rebuild.** |
52
+ | `bootstrap` | standard+ | 30 days (default) | First-time setup — scaffold folders, lay configs side-by-side, initial pull. Profile-aware (builds State only on `full`). |
53
+ | `refresh` | standard+ | last watermark → now | Pull only what changed. Profile-aware (rebuilds State only on `full`). |
54
+ | `state` | full | n/a | Render the outcome-based `State/` files from existing evidence. No new pulls. |
55
+ | `consolidate` | core+ | per week | Merge per-user streams into `_Consolidated/<YYYY-MM-DD>_consolidated.md`. |
56
+ | `status` | core+ | n/a | Show the run-log for a project. |
57
+ | `ask` | core+ | n/a | Read-only natural-language Q&A. Always cites. Auto-routes. |
58
+ | `fde-intake` | standard+ | n/a | Capture the 6 FDE intake questions → `Reports/00-FDE-Intake-<project>.md` (updated in place). |
59
+ | `fde-report` | standard+ | n/a | FDE report generator. 5 shapes: `weekly` (default), `short`, `long`, `fitness`, `stage-readiness`. |
60
+ | `fde-triage` | standard+ | n/a | 7-file FDE triage bundle at `Reports/triage/<YYYY-MM-DD>/`. File 07 merges across re-runs. |
61
+
62
+ See [Quickstart](https://gim-home.github.io/kushi/getting-started/quickstart/) for the full workflow.
63
+
64
+ ## Install
65
+
66
+ Two install targets — pick the one that matches how you talk to Copilot, optionally combined with a profile.
67
+
68
+ **VS Code Chat** — `.kushi/` in your workspace:
69
+
70
+ ```bash
71
+ npx kushi-agents # default profile (standard)
72
+ npx kushi-agents --profile core # aggregator only
73
+ ```
74
+
75
+ **Clawpilot CLI** — `~/.copilot/m-skills/kushi/`:
76
+
77
+ ```bash
78
+ npx kushi-agents --clawpilot
79
+ npx kushi-agents --clawpilot --profile full
80
+ ```
81
+
82
+ To switch profiles later, re-run with `--force` (cleanly handles downgrades):
83
+
84
+ ```bash
85
+ npx kushi-agents --clawpilot --profile core --force
86
+ ```
87
+
88
+ > **Internal GitHub install (Microsoft org members)**: `npx github:gim-home/kushi …` works identically and pulls straight from the private repo without going through npm.
89
+
90
+ See [Install](https://gim-home.github.io/kushi/getting-started/install/) for flags, prerequisites, and per-user config.
91
+
92
+ ## What it does
93
+
94
+ Engagement context lives in too many places. By the time someone asks "what was decided about the architecture?" or "who is the EM on project X?" the answer is buried across emails, Teams threads, OneNote pages, SharePoint files, meeting transcripts, CRM records, and ADO work items.
95
+
96
+ Kushi pulls all of those into a structured, citable, per-engagement folder — and lets you ask grounded questions that always cite the source.
97
+
98
+ - **WorkIQ-only**: every source pull uses WorkIQ. We walk you through [installing it](docs/getting-started/install-workiq.md) — Microsoft Graph isn't a viable fallback here. When WorkIQ can't answer, Kushi asks you to paste rather than producing thin metadata.
99
+ - **Snapshot + stream**: current truth and the trail of how we got there.
100
+ - **Citation per assertion**: every claim in State files and answers points back to a real source file with a date.
101
+ - **Host-agnostic**: works in VS Code Chat or Clawpilot CLI.
102
+
103
+ ## Output shapes (what aggregation writes to disk)
104
+
105
+ For each source, Kushi produces two output shapes:
106
+
107
+ | Shape | What | Filename | Refresh behavior |
108
+ |-------|------|----------|------------------|
109
+ | **Snapshot** | Current state of an entity (page body, work item, CRM record, file content) | `snapshot/<entity>.md` (NO date in filename) | **Replace** on every refresh |
110
+ | **Stream** | Timestamped events (emails, messages, edits, comments, state changes) | `stream/<YYYY-MM-DD>_<source>-stream.md` (Monday of ISO week) | **Append**, dedupe by event ID |
111
+
112
+ Email is stream-only (emails ARE events). Every other source has both. `ask-project` reads both shapes when answering.
113
+
114
+ ## Documentation
115
+
116
+ | | |
117
+ |---|---|
118
+ | 🚀 [Getting started](https://gim-home.github.io/kushi/getting-started/) | Install + quickstart — pick a target, run one `npx` command |
119
+ | 💡 [Concepts](https://gim-home.github.io/kushi/concepts/) | Hosts, storage backends, snapshot vs stream, multi-user model |
120
+ | 🛠️ [How-to guides](https://gim-home.github.io/kushi/how-to/) | Schedule refreshes, add contributors, switch backends, upgrade, uninstall |
121
+ | 📖 [Reference](https://gim-home.github.io/kushi/reference/) | Verbs, CLI options, config files, path map, self-check |
122
+ | 📋 [Changelog](CHANGELOG.md) | Release history |
123
+
124
+ ## Repository layout (high level)
125
+
126
+ ```text
127
+ kushi/
128
+ ├── bin/cli.mjs Installer entry point
129
+ ├── src/ Installer source
130
+ ├── plugin/ ← THE PAYLOAD that ships into .kushi/ (or ~/.copilot/m-skills/kushi/)
131
+ │ ├── plugin.json
132
+ │ ├── agents/
133
+ │ ├── instructions/
134
+ │ ├── prompts/
135
+ │ ├── skills/
136
+ │ └── templates/
137
+ ├── docs/ MkDocs Material site (deployed to GitHub Pages)
138
+ ├── mkdocs.yml
139
+ ├── requirements-docs.txt
140
+ ├── README.md
141
+ ├── CHANGELOG.md
142
+ └── LICENSE
143
+ ```
144
+
145
+ See [docs/reference/where-things-live.md](docs/reference/where-things-live.md) for the complete layout.
146
+
147
+ ## Contributing
148
+
149
+ Before committing changes to the plugin payload, run the self-check:
150
+
151
+ ```powershell
152
+ pwsh plugin/skills/self-check/run.ps1 -Deep
153
+ ```
154
+
155
+ It validates frontmatter, agent inventory, prompt → skill routing, cross-links, the verbs table in this README, and the layout diagram in `docs/reference/where-things-live.md`.
156
+
157
+ ## License
158
+
159
+ See [LICENSE](LICENSE).
package/bin/cli.mjs ADDED
@@ -0,0 +1,75 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { main } from '../src/main.mjs';
4
+
5
+ const args = process.argv.slice(2);
6
+
7
+ if (args.includes('--help') || args.includes('-h')) {
8
+ console.log(`
9
+ Usage: npx kushi-agents [options]
10
+
11
+ Installs the Kushi multi-source project-evidence + Q&A agent.
12
+
13
+ Targets (pick one — default is vscode):
14
+ --target vscode Install to <cwd>/.kushi/ + update .vscode/settings.json
15
+ --target clawpilot Install to ~/.copilot/m-skills/kushi/ for Clawpilot CLI
16
+ --clawpilot Shortcut for --target clawpilot
17
+
18
+ Profile (controls what gets installed):
19
+ --profile core Aggregator only (pull + consolidate + ask). The
20
+ Evidence/ folder is the public contract; suitable for
21
+ external rollup integrations.
22
+ --profile standard Core + State/ rollup (Kushi's default opinion). [DEFAULT]
23
+ --profile full Standard + report packs (FDE weekly/customer/handoff).
24
+
25
+ Options:
26
+ --dest <path> Override destination (relative for vscode, absolute for clawpilot)
27
+ --force Overwrite existing destination without asking
28
+ --no-settings Skip .vscode/settings.json update (vscode target only)
29
+ --help, -h Show this help
30
+
31
+ After install, talk to Kushi:
32
+ aggregate <project> Pull + consolidate (no State/) — all profiles
33
+ bootstrap <project> First-time setup, 30d initial pull — standard+
34
+ refresh <project> Incremental refresh + rebuild State/ — standard+
35
+ state <project> Re-render State/ from existing Evidence — standard+
36
+ consolidate <project> Merge per-user evidence — all profiles
37
+ status <project> Show run-log — all profiles
38
+ ask <project> <q> Cited Q&A over Evidence/ (auto-routes) — all profiles
39
+
40
+ In VS Code Chat the prefix is "@Kushi". In Clawpilot just say "kushi <verb>".
41
+ `);
42
+ process.exit(0);
43
+ }
44
+
45
+ let target = getFlag('--target');
46
+ if (args.includes('--clawpilot')) {
47
+ if (target && target !== 'clawpilot') {
48
+ console.error(`\n Conflicting flags: --target ${target} and --clawpilot.\n`);
49
+ process.exit(1);
50
+ }
51
+ target = 'clawpilot';
52
+ }
53
+
54
+ const options = {
55
+ dest: getFlag('--dest'),
56
+ force: args.includes('--force'),
57
+ noSettings: args.includes('--no-settings'),
58
+ target,
59
+ profile: getFlag('--profile'),
60
+ };
61
+
62
+ main(options).catch((err) => {
63
+ console.error(`\n ${err.message}\n`);
64
+ process.exit(1);
65
+ });
66
+
67
+ function getFlag(flag) {
68
+ const idx = args.indexOf(flag);
69
+ if (idx !== -1 && idx + 1 < args.length) {
70
+ return args[idx + 1];
71
+ }
72
+ const prefix = flag + '=';
73
+ const match = args.find((a) => a.startsWith(prefix));
74
+ return match ? match.slice(prefix.length) : undefined;
75
+ }
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "kushi-agents",
3
+ "version": "3.4.1",
4
+ "description": "Install Kushi — multi-source project evidence agent with snapshot+stream capture across Email, Teams, OneNote, SharePoint, Meetings, CRM, ADO. WorkIQ-first, host-agnostic.",
5
+ "type": "module",
6
+ "bin": {
7
+ "kushi-agents": "./bin/cli.mjs"
8
+ },
9
+ "files": [
10
+ "bin/",
11
+ "src/",
12
+ "plugin/",
13
+ ".github/config/m365-auth.json.example",
14
+ ".github/config/m365-mutable.json.example"
15
+ ],
16
+ "engines": {
17
+ "node": ">=18.0.0"
18
+ },
19
+ "dependencies": {
20
+ "jsonc-parser": "^3.3.1"
21
+ },
22
+ "keywords": ["vscode", "copilot", "agents", "kushi", "project-evidence", "workiq", "m365", "ai", "cli"],
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+https://github.com/gim-home/kushi.git"
26
+ },
27
+ "homepage": "https://gim-home.github.io/kushi/",
28
+ "bugs": {
29
+ "url": "https://github.com/gim-home/kushi/issues"
30
+ },
31
+ "license": "MIT",
32
+ "publishConfig": {
33
+ "access": "public"
34
+ }
35
+ }