kushi-agents 3.15.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/copilot-instructions.kushi.md +16 -11
- package/package.json +1 -1
- package/plugin/agents/kushi.agent.md +2 -1
- package/plugin/instructions/azure-auth-patterns.instructions.md +2 -2
- package/plugin/instructions/engagement-root-resolution.instructions.md +3 -3
- package/plugin/instructions/run-reports.instructions.md +1 -1
- package/plugin/instructions/side-by-side-config.instructions.md +1 -1
- package/plugin/instructions/tracking.instructions.md +165 -0
- package/plugin/instructions/workiq-only.instructions.md +2 -2
- package/plugin/learnings/misc.md +1 -1
- package/plugin/prompts/aggregate.prompt.md +2 -0
- package/plugin/prompts/ask.prompt.md +2 -0
- package/plugin/prompts/bootstrap.prompt.md +4 -2
- package/plugin/prompts/consolidate.prompt.md +3 -1
- package/plugin/prompts/fde-intake.prompt.md +2 -0
- package/plugin/prompts/fde-report.prompt.md +2 -0
- package/plugin/prompts/fde-triage.prompt.md +2 -0
- package/plugin/prompts/refresh.prompt.md +3 -1
- package/plugin/prompts/state.prompt.md +3 -1
- package/plugin/reference-packs/README.md +2 -2
- package/plugin/reference-packs/fde/README.md +3 -3
- package/plugin/skills/ask-project/SKILL.md +1 -1
- package/plugin/skills/bootstrap-project/SKILL.md +5 -4
- package/plugin/skills/fde-intake/SKILL.md +1 -1
- package/plugin/skills/intro/SKILL.md +2 -2
- package/plugin/skills/propose-ado-update/SKILL.md +1 -1
- package/plugin/skills/pull-misc/README.md +1 -1
- package/plugin/skills/pull-misc/SKILL.md +2 -2
- package/plugin/skills/pull-misc/runner.mjs +1 -1
- package/plugin/skills/pull-onenote/README.md +1 -1
- package/plugin/skills/pull-onenote/SKILL.md +3 -3
- package/plugin/skills/pull-onenote/runner.mjs +1 -1
- package/plugin/templates/init/integrations.template.yml +19 -0
- package/plugin/templates/init/project-evidence.template.yml +19 -13
- package/plugin/templates/init/project-user-settings.template.yml +1 -1
- package/src/constants.mjs +15 -0
- package/src/main.mjs +15 -0
- package/src/seed-config.mjs +44 -0
|
@@ -6,15 +6,18 @@ This workspace has [Kushi](https://gim-home.github.io/kushi/) installed under `.
|
|
|
6
6
|
|
|
7
7
|
When the user types any of the following verbs followed by a project name, route to the corresponding Kushi prompt in `.kushi/prompts/` (no `@Kushi` needed):
|
|
8
8
|
|
|
9
|
-
| Verb | Prompt to run
|
|
10
|
-
| -------------------------- |
|
|
11
|
-
| `bootstrap <project>` | `/
|
|
12
|
-
| `refresh <project>` | `/
|
|
13
|
-
| `aggregate <project>` | `/
|
|
14
|
-
| `state <project>` | `/
|
|
15
|
-
| `consolidate <project>` | `/consolidate
|
|
16
|
-
| `status <project>` | `/
|
|
17
|
-
| `ask <project> <question>` | `/ask
|
|
9
|
+
| Verb | Prompt to run |
|
|
10
|
+
| -------------------------- | ---------------- |
|
|
11
|
+
| `bootstrap <project>` | `/bootstrap` |
|
|
12
|
+
| `refresh <project>` | `/refresh` |
|
|
13
|
+
| `aggregate <project>` | `/aggregate` |
|
|
14
|
+
| `state <project>` | `/state` |
|
|
15
|
+
| `consolidate <project>` | `/consolidate` |
|
|
16
|
+
| `status <project>` | `/status` |
|
|
17
|
+
| `ask <project> <question>` | `/ask` |
|
|
18
|
+
| `fde-intake <project>` | `/fde-intake` |
|
|
19
|
+
| `fde-report <project>` | `/fde-report` |
|
|
20
|
+
| `fde-triage <project>` | `/fde-triage` |
|
|
18
21
|
|
|
19
22
|
Project Q&A also auto-dispatches when the user names a known project under the engagement root **and** asks a question about it — no prefix needed.
|
|
20
23
|
|
|
@@ -29,10 +32,12 @@ Project Q&A also auto-dispatches when the user names a known project under the e
|
|
|
29
32
|
### Layout
|
|
30
33
|
|
|
31
34
|
- `.kushi/agents/kushi.agent.md` — orchestrator (also addressable as `@Kushi`)
|
|
32
|
-
- `.kushi/prompts/` — verb prompts (`/
|
|
35
|
+
- `.kushi/prompts/` — verb prompts (`/bootstrap`, `/refresh`, `/ask`, etc.)
|
|
33
36
|
- `.kushi/skills/` — per-source pull + render skills
|
|
34
37
|
- `.kushi/instructions/` — doctrine (citations, WorkIQ-first, freshness gates)
|
|
35
|
-
- `.kushi/reference-packs/` — bundled domain doctrine (override at project /
|
|
38
|
+
- `.kushi/reference-packs/` — bundled domain doctrine (override at project / workspace / packaged layers)
|
|
39
|
+
- `.kushi/config/` — **user-editable** (project-evidence.yml, integrations.yml, reference-overrides). Seeded on first install; never overwritten on upgrade.
|
|
40
|
+
- `.kushi/tracking/` — **agent working memory** (runs/, qa/, fde/, research/). Per-run Markdown journals: what was asked, what was done, what was decided, what's still open. Gitignored by default. See `instructions/tracking.instructions.md`.
|
|
36
41
|
- `.kushi/kushi-install.json` — profile manifest written by the installer
|
|
37
42
|
|
|
38
43
|
Full docs: <https://gim-home.github.io/kushi/>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kushi-agents",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "Install Kushi — multi-source project evidence agent with snapshot+stream capture across Email, Teams, OneNote, SharePoint, Meetings, CRM, ADO. WorkIQ-only for M365 sources (Graph / m365_* FORBIDDEN as fallbacks; user-paste is first-class). Host-agnostic.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -95,7 +95,8 @@ When a user message arrives:
|
|
|
95
95
|
## Configuration layout
|
|
96
96
|
|
|
97
97
|
```
|
|
98
|
-
<
|
|
98
|
+
<workspace>/.kushi/config/project-evidence.yml ← personal: alias, engagement_root, active_projects (seeded by installer; never overwritten)
|
|
99
|
+
<workspace>/.kushi/config/integrations.yml ← optional global CRM/ADO defaults (seeded by installer; never overwritten)
|
|
99
100
|
<engagement-root>/.project-evidence/ ← per-machine, per-user M365 + CRM + ADO config (OneDrive-synced)
|
|
100
101
|
m365/m365-auth.json
|
|
101
102
|
m365/m365-mutable.json
|
|
@@ -227,7 +227,7 @@ Maintained alongside `auth-and-retry §3` (canonical) — quick lookup:
|
|
|
227
227
|
| Dynamics 365 / CRM | `<engagement-root>/.project-evidence/crm/config.yml` |
|
|
228
228
|
| Azure DevOps | `<engagement-root>/.project-evidence/ado/config.yml` |
|
|
229
229
|
| Microsoft Graph / M365 / OneNote | `<engagement-root>/.project-evidence/m365/m365-mutable.json` + `<engagement-root>/.project-evidence/m365/m365-auth.json` |
|
|
230
|
-
| WorkIQ CLI path |
|
|
231
|
-
| Global integrations (optional) |
|
|
230
|
+
| WorkIQ CLI path | `<workspace>/.kushi/config/project-evidence.yml` (workspace-scoped) |
|
|
231
|
+
| Global integrations (optional) | `<workspace>/.kushi/config/integrations.yml` |
|
|
232
232
|
|
|
233
233
|
Always read tenant IDs, resource URLs, org URLs, and allowed-tenant lists from these files at the start of each run. **Never hardcode them in skills or prompts.** The only acceptable literal in instructions/prompts is the public Microsoft tenant ID `72f988bf-86f1-41af-91ab-2d7cd011db47` in the user-facing `az login --tenant ...` suggestion text.
|
|
@@ -11,9 +11,9 @@ The **engagement-root** is the parent folder that contains all of the user's eng
|
|
|
11
11
|
|
|
12
12
|
Resolve `<engagement-root>` in this order — first match wins:
|
|
13
13
|
|
|
14
|
-
1. **`<
|
|
14
|
+
1. **`<workspace>/.kushi/config/project-evidence.yml`** — read `engagement_root:` field (preferred).
|
|
15
15
|
2. **`customer_workspace/FDEDocs/`** — if the user's workspace has this symlink, follow it. Common in FDE-style installs.
|
|
16
|
-
3. **Ask the user** once and persist the answer to `<
|
|
16
|
+
3. **Ask the user** once and persist the answer to `<workspace>/.kushi/config/project-evidence.yml engagement_root`.
|
|
17
17
|
|
|
18
18
|
## Live config location
|
|
19
19
|
|
|
@@ -43,7 +43,7 @@ Once `<engagement-root>` is known, individual projects are subfolders:
|
|
|
43
43
|
Project name resolution (always fuzzy):
|
|
44
44
|
|
|
45
45
|
1. Match against keys in `<engagement-root>/.project-evidence/m365/m365-mutable.json m365Mutable.knownSections`.
|
|
46
|
-
2. Match against `active_projects:` in `<
|
|
46
|
+
2. Match against `active_projects:` in `<workspace>/.kushi/config/project-evidence.yml`.
|
|
47
47
|
3. Match against actual subfolder names under `<engagement-root>`.
|
|
48
48
|
|
|
49
49
|
Case-insensitive; ranking `exact > prefix > contains`. Multiple plausible candidates → ask user to pick. Zero candidates AND verb is `bootstrap` → create the folder. Zero candidates AND verb is anything else → ask user.
|
|
@@ -24,7 +24,7 @@ Critical for multi-user projects: each contributor's runs are independent, and e
|
|
|
24
24
|
YYYY-MM-DD-HHmm_<mode>.md
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
- `<alias>` — the contributor running the skill (from
|
|
27
|
+
- `<alias>` — the contributor running the skill (from `<workspace>/.kushi/config/project-evidence.yml#alias`).
|
|
28
28
|
- `<mode>` — one of `bootstrap`, `refresh`, `force-refresh`, `consolidate`.
|
|
29
29
|
- Timestamp uses the **start time** of the run, in local time, format `YYYY-MM-DD-HHmm` (no seconds, no timezone — local-time prefix is enough for chronological sort).
|
|
30
30
|
|
|
@@ -52,5 +52,5 @@ End every bootstrap / fix-up turn by listing the live config files (path + size
|
|
|
52
52
|
## Why outside the kushi repo
|
|
53
53
|
|
|
54
54
|
- **Multi-machine portability** — OneDrive-synced beside engagement folders, follows the user wherever they install kushi.
|
|
55
|
-
- **Discoverability** — user can see/edit it next to their engagement work
|
|
55
|
+
- **Discoverability** — user can see/edit it next to their engagement work and inside their workspace at `<workspace>/.kushi/config/`, not buried in an OS-hidden home directory.
|
|
56
56
|
- **Repo-safe** — kushi is meant to be GitHub-published; live filled configs MUST never be committed.
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
---
|
|
2
|
+
applyTo: "**"
|
|
3
|
+
description: "Kushi tracking convention — every Kushi prompt/skill writes its working memory (what it was asked, what it did, what it decided, what's still open) to `<workspace>/.kushi/tracking/` so users can see, edit, diff, and resume the agent's work. This is host-agnostic (VS Code Chat, Clawpilot, Cursor) and complements — never replaces — Evidence/ (canonical outputs) or State/ (rollups)."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Tracking — Agent Working Memory
|
|
7
|
+
|
|
8
|
+
Kushi agents must leave a visible trail. Every meaningful run produces a small Markdown artifact under `<workspace>/.kushi/tracking/` describing what was asked, what was done, what was decided, and what is still open.
|
|
9
|
+
|
|
10
|
+
This is **the journey**, not the **output**. Outputs land under `Evidence/`, `State/`, `Reports/`, `ado-updates/`, etc. Tracking files explain *why* and *how* those outputs ended up the way they did, so the user (or a future agent) can pick up where you left off.
|
|
11
|
+
|
|
12
|
+
## Why this exists
|
|
13
|
+
|
|
14
|
+
* **Visible thinking.** The user can read what the agent considered and rejected, not just the final artifact.
|
|
15
|
+
* **Reliable handoff.** Stable filenames mean Bootstrap → Refresh → State → Ask never loses context across `/clear`, new chats, or host swaps.
|
|
16
|
+
* **Resumability.** A 60-minute pull that died at 80% can be resumed from its last tracking entry instead of restarted.
|
|
17
|
+
* **Audit + replay.** Diff-able, grep-able, commit-able (or gitignored — user's choice).
|
|
18
|
+
* **Single convention across hosts.** Same shape in VS Code Chat, Clawpilot, Cursor, Cline.
|
|
19
|
+
|
|
20
|
+
## Folder layout
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
<workspace>/.kushi/tracking/
|
|
24
|
+
.gitignore ← ignore everything by default
|
|
25
|
+
runs/{{YYYY-MM-DD}}-<project>-<verb>.md ← bootstrap / refresh / aggregate / state / consolidate
|
|
26
|
+
qa/{{YYYY-MM-DD}}-<project>-<question-slug>.md ← /ask answers + citations, archived
|
|
27
|
+
fde/intake/{{YYYY-MM-DD}}-<project>-<slug>.md ← /fde-intake drafts
|
|
28
|
+
fde/report/{{YYYY-MM-DD}}-<project>-<slug>.md ← /fde-report drafts
|
|
29
|
+
fde/triage/{{YYYY-MM-DD}}-<project>-<slug>.md ← /fde-triage drafts
|
|
30
|
+
research/{{YYYY-MM-DD}}-<topic>.md ← optional deep-dive notes
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Rules:
|
|
34
|
+
|
|
35
|
+
* Filenames start with `YYYY-MM-DD` (ISO date, UTC if ambiguous) so chronological sort works everywhere.
|
|
36
|
+
* `<project>` is the engagement folder name (slugified — lowercase, hyphenated, no spaces).
|
|
37
|
+
* `<verb>` is the prompt name without slash (`bootstrap`, `refresh`, ...).
|
|
38
|
+
* `<slug>` / `<question-slug>` is 3–6 word kebab-case derived from the user's ask.
|
|
39
|
+
* Create directories as needed on first write.
|
|
40
|
+
|
|
41
|
+
## On first write — seed `.gitignore`
|
|
42
|
+
|
|
43
|
+
If `<workspace>/.kushi/tracking/` does not yet exist, create it and write `<workspace>/.kushi/tracking/.gitignore` with:
|
|
44
|
+
|
|
45
|
+
```gitignore
|
|
46
|
+
# Kushi tracking files are working memory, not source of truth.
|
|
47
|
+
# Outputs live under Evidence/, State/, Reports/, ado-updates/.
|
|
48
|
+
# Uncomment the next line to start committing tracking artifacts.
|
|
49
|
+
*
|
|
50
|
+
!.gitignore
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
A user who wants to commit their agent transcripts deletes `*` from this file. Default is private.
|
|
54
|
+
|
|
55
|
+
## Required sections in every tracking artifact
|
|
56
|
+
|
|
57
|
+
Every tracking file is Markdown with frontmatter + a small set of named sections. Keep it short — this is a journal, not a report.
|
|
58
|
+
|
|
59
|
+
```markdown
|
|
60
|
+
---
|
|
61
|
+
prompt: bootstrap # /bootstrap, /refresh, /ask, /fde-intake, ...
|
|
62
|
+
project: hca # slugified engagement folder name
|
|
63
|
+
window: last 30 days # bootstrap/refresh only; otherwise omit
|
|
64
|
+
started: 2026-05-19T14:02:00-04:00
|
|
65
|
+
finished: 2026-05-19T14:38:12-04:00 # omit if still in progress
|
|
66
|
+
status: complete # complete | in-progress | blocked | failed
|
|
67
|
+
host: vscode # vscode | clawpilot | cursor | cline | other
|
|
68
|
+
kushi_version: 4.1.0
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Ask
|
|
72
|
+
|
|
73
|
+
> Verbatim or near-verbatim of what the user asked for. One short paragraph.
|
|
74
|
+
|
|
75
|
+
## Inputs resolved
|
|
76
|
+
|
|
77
|
+
- Engagement root: `C:/.../Engagement Assets`
|
|
78
|
+
- Project folder: `HCA Healthcare`
|
|
79
|
+
- Alias: `ushak`
|
|
80
|
+
- Config: `<workspace>/.kushi/config/project-evidence.yml`
|
|
81
|
+
|
|
82
|
+
## Steps taken
|
|
83
|
+
|
|
84
|
+
1. Resolved project context via `engagement-root-resolution.instructions.md`.
|
|
85
|
+
2. Ran `pull-email` (WorkIQ) → 142 messages, 30-day window.
|
|
86
|
+
3. Ran `pull-teams` (WorkIQ) → 11 chats, 308 messages.
|
|
87
|
+
4. … (one line per meaningful step)
|
|
88
|
+
|
|
89
|
+
## Decisions
|
|
90
|
+
|
|
91
|
+
- Skipped `pull-crm` — `integrations.yml` has no `crm.engagement_id` for this project.
|
|
92
|
+
- Used WorkIQ-only path; no `m365_*` fallback triggered.
|
|
93
|
+
|
|
94
|
+
## Outputs
|
|
95
|
+
|
|
96
|
+
- `HCA Healthcare/Evidence/ushak/email/snapshot/2026-05-19.md`
|
|
97
|
+
- `HCA Healthcare/Evidence/ushak/teams/snapshot/2026-05-19.md`
|
|
98
|
+
- `HCA Healthcare/State/00_overview.md` (updated)
|
|
99
|
+
|
|
100
|
+
## Open questions / next steps
|
|
101
|
+
|
|
102
|
+
- ADO field `Custom.FDEStatusSummary` is empty — recommend running `/fde-report hca` next.
|
|
103
|
+
- 3 OneNote pages returned `page-body-unavailable`; see notes in `Evidence/ushak/onenote/run-notes.md`.
|
|
104
|
+
|
|
105
|
+
## Errors / fallbacks
|
|
106
|
+
|
|
107
|
+
- None.
|
|
108
|
+
|
|
109
|
+
## Citations
|
|
110
|
+
|
|
111
|
+
- `Evidence/ushak/email/snapshot/2026-05-19.md` · 2026-05-19
|
|
112
|
+
- `Evidence/ushak/teams/snapshot/2026-05-19.md` · 2026-05-19
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Section rules:
|
|
116
|
+
|
|
117
|
+
* **Ask** — required. One short paragraph.
|
|
118
|
+
* **Steps taken** — required. One bullet per meaningful action. Skip trivial tool calls.
|
|
119
|
+
* **Decisions** — required when you chose A over B, skipped a step, or applied a fallback.
|
|
120
|
+
* **Outputs** — required. Bullet list of files written/updated this run.
|
|
121
|
+
* **Open questions / next steps** — required, even if empty (write "None.").
|
|
122
|
+
* **Errors / fallbacks** — required when anything failed, retried, or fell back to a classified-fallback path (e.g., WorkIQ → `m365_*`).
|
|
123
|
+
* **Citations** — required when the artifact references Evidence files; same format as everywhere else in Kushi (`<source-path> · <YYYY-MM-DD>`).
|
|
124
|
+
|
|
125
|
+
## When to write
|
|
126
|
+
|
|
127
|
+
* **First step of every prompt run:** create the file with frontmatter (`status: in-progress`) so a crash leaves something behind.
|
|
128
|
+
* **As you go:** append "Steps taken" lines. Update "Outputs" when files land.
|
|
129
|
+
* **Last step of every prompt run:** set `status: complete` (or `blocked` / `failed`), set `finished`, and fill in the closing sections.
|
|
130
|
+
|
|
131
|
+
If the prompt runs multiple sub-skills in parallel, the orchestrating prompt owns the tracking file. Sub-skills do not write their own runs/ entry; they report back and the parent appends.
|
|
132
|
+
|
|
133
|
+
## When NOT to write
|
|
134
|
+
|
|
135
|
+
* `intro`, `status`, `self-check` — trivial / introspective. Skip the tracking file.
|
|
136
|
+
* Any prompt that does nothing but read a single file and answer.
|
|
137
|
+
* Dry-run / preview invocations (`--dry-run`, `--preview`) — log to stdout only.
|
|
138
|
+
|
|
139
|
+
## Interaction with other doctrine
|
|
140
|
+
|
|
141
|
+
* `update-ledger.instructions.md` — write-path skills (ADO apply, future CRM apply) still write a **ledger** under `<project>/ado-updates/<date>/`. The tracking file additionally records that a write happened and links to the ledger. Ledger is authoritative for *what was written*; tracking is the *story around it*.
|
|
142
|
+
* `evidence-layout-canonical.instructions.md` — tracking files are NEVER a substitute for Evidence/. Evidence/ is the contract; tracking is the journal.
|
|
143
|
+
* `answer-from-evidence.instructions.md` — `/ask` writes its answer to `qa/` *in addition to* returning it in chat, so the same question asked tomorrow can be answered from the archive (with a freshness check).
|
|
144
|
+
|
|
145
|
+
## Cross-host behavior
|
|
146
|
+
|
|
147
|
+
* Path is always relative to the **workspace root** (the folder the user opened in VS Code / Clawpilot / Cursor).
|
|
148
|
+
* In Clawpilot specifically, the workspace root is whichever folder the user is operating on (an engagement folder, a code repo, etc.) — *not* `~/.copilot/m-skills/kushi/`. The Kushi install location and the tracking location are independent.
|
|
149
|
+
* The Clawpilot weekly automation (`~/.copilot/kushi-projects.json`) is unaffected — it operates on engagement folders and produces tracking artifacts in each engagement folder's `.kushi/tracking/`.
|
|
150
|
+
|
|
151
|
+
## Self-check coverage
|
|
152
|
+
|
|
153
|
+
Future self-check rule **C14: tracking-artifact required** will verify:
|
|
154
|
+
|
|
155
|
+
* Every prompt under `plugin/prompts/` (except the opt-out list above) references this instruction file.
|
|
156
|
+
* Every prompt's closing step is "write/update the tracking artifact".
|
|
157
|
+
|
|
158
|
+
C14 is added when this convention reaches 1.0 across all prompts.
|
|
159
|
+
|
|
160
|
+
## References
|
|
161
|
+
|
|
162
|
+
* `evidence-layout-canonical.instructions.md` — Evidence/ shape (the canonical output).
|
|
163
|
+
* `update-ledger.instructions.md` — write-path ledger (orthogonal, additive).
|
|
164
|
+
* `citation-ledger.instructions.md` — citation format used inside tracking artifacts.
|
|
165
|
+
* `engagement-root-resolution.instructions.md` — how to resolve `<project>` for the filename slug.
|
|
@@ -47,7 +47,7 @@ For every M365 source in scope:
|
|
|
47
47
|
|
|
48
48
|
## Canonical WorkIQ commands (CODIFIED — do not re-discover)
|
|
49
49
|
|
|
50
|
-
The CLI is at
|
|
50
|
+
The CLI is at `<USER_HOME>\.kushi\bin\workiq.cmd` (resolved from `<workspace>/.kushi/config/project-evidence.yml workiq.cli_path`; fall back to PATH; fall back to `~/.kushi/bin/workiq.cmd`).
|
|
51
51
|
|
|
52
52
|
Invocation shape:
|
|
53
53
|
|
|
@@ -152,7 +152,7 @@ List my Teams meetings between <YYYY-MM-DD> and <YYYY-MM-DD> where the subject c
|
|
|
152
152
|
|
|
153
153
|
Before the first WorkIQ query in a run:
|
|
154
154
|
|
|
155
|
-
1. Resolve CLI path: `<
|
|
155
|
+
1. Resolve CLI path: `<workspace>/.kushi/config/project-evidence.yml workiq.cli_path` → `Get-Command workiq` → `~/.kushi/bin/workiq.cmd`. If none resolves → log `workiq-not-on-path`, write evidence file pointing at install docs, STOP this source.
|
|
156
156
|
2. Probe with `workiq ask -q "ping"`. If EULA prompt → `workiq accept-eula` once, retry.
|
|
157
157
|
3. Capture `--version` once into run-log for audit.
|
|
158
158
|
|
package/plugin/learnings/misc.md
CHANGED
|
@@ -17,7 +17,7 @@ The user pasting links into `external-links.txt` is the right boundary: auditabl
|
|
|
17
17
|
**Routing model:**
|
|
18
18
|
|
|
19
19
|
- `onenote / sharepoint / ado` → delegated to dedicated skills (recorded as `delegated` in registry, not double-pulled here).
|
|
20
|
-
- `loop` → browser path (Playwright, reuses `~/.
|
|
20
|
+
- `loop` → browser path (Playwright, reuses `~/.kushi/playwright-profile/onenote/` because same M365 cookie scope).
|
|
21
21
|
- `web / learn / docs / github / confluence / pdf / unknown` → HTTP path (fetch + @mozilla/readability for HTML extraction).
|
|
22
22
|
- `file` → local file read.
|
|
23
23
|
- Anything matching `<PASTE_*_URL>` or `<TODO*>` → `placeholder`, surfaced in run report until filled.
|
|
@@ -22,3 +22,5 @@ This is the **pull-only** verb. Every enabled source is pulled and per-user stre
|
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
See `skills/aggregate-project/SKILL.md` for the full sequence and output contract.
|
|
25
|
+
|
|
26
|
+
Tracking: see `tracking.instructions.md`. Write `<workspace>/.kushi/tracking/runs/{{YYYY-MM-DD}}-<project>-aggregate.md` as the final step.
|
|
@@ -14,3 +14,5 @@ Read-only. NEVER triggers a `pull-*` skill — if evidence is stale or missing,
|
|
|
14
14
|
You don't actually need this prompt — `ask-project` auto-routes whenever your message names a known project and asks a question (what / who / when / status / summarize / etc.). The slash form just provides an explicit handle.
|
|
15
15
|
|
|
16
16
|
Delegates to `ask-project` skill.
|
|
17
|
+
|
|
18
|
+
Tracking: see `tracking.instructions.md`. Archive every answer to `<workspace>/.kushi/tracking/qa/{{YYYY-MM-DD}}-<project>-<question-slug>.md` (frontmatter + Ask + Answer + Citations + freshness note).
|
|
@@ -12,7 +12,7 @@ Inputs the agent will resolve:
|
|
|
12
12
|
- `<window>` — defaults to 30 days. Override with `last 60 days`, `since 2026-04-01`, or `2026-04-01..2026-05-01`.
|
|
13
13
|
|
|
14
14
|
Reads:
|
|
15
|
-
- `<
|
|
15
|
+
- `<workspace>/.kushi/config/project-evidence.yml` for alias + engagement-root.
|
|
16
16
|
|
|
17
17
|
Produces:
|
|
18
18
|
- `<engagement-root>/.project-evidence/m365/{m365-auth,m365-mutable}.json` (per-user filled)
|
|
@@ -20,4 +20,6 @@ Produces:
|
|
|
20
20
|
- `<engagement-root>/<project>/Evidence/{contributors.yml, run-log.yml, <alias>/.settings.yml, <alias>/{email,teams,meetings,onenote,sharepoint,crm,ado}/{snapshot,stream}/}`
|
|
21
21
|
- `<engagement-root>/<project>/State/{00..09}_*.md`
|
|
22
22
|
|
|
23
|
-
Delegates to `bootstrap-project` skill. After scaffolding, calls each `pull-<source>` skill, then `build-state`.
|
|
23
|
+
Delegates to `bootstrap-project` skill. After scaffolding, calls each `pull-<source>` skill, then `build-state`.
|
|
24
|
+
|
|
25
|
+
Tracking: see `tracking.instructions.md`. Write `<workspace>/.kushi/tracking/runs/{{YYYY-MM-DD}}-<project>-bootstrap.md` as the final step.
|
|
@@ -18,4 +18,6 @@ Writes:
|
|
|
18
18
|
|
|
19
19
|
Provenance tags retained (source: <alias>/<source>/<file>) per `citation-ledger.instructions.md`.
|
|
20
20
|
|
|
21
|
-
Delegates to `consolidate-evidence` skill.
|
|
21
|
+
Delegates to `consolidate-evidence` skill.
|
|
22
|
+
|
|
23
|
+
Tracking: see `tracking.instructions.md`. Write `<workspace>/.kushi/tracking/runs/{{YYYY-MM-DD}}-<project>-consolidate.md` as the final step.
|
|
@@ -39,3 +39,5 @@ Authors (first time) or updates (subsequent runs) the **FDE Intake** at `<engage
|
|
|
39
39
|
- `skills/fde-intake/SKILL.md` for the full step-by-step.
|
|
40
40
|
- `@Kushi fde-triage <project>` — produces the 7-file triage bundle that builds ON the intake.
|
|
41
41
|
- `@Kushi fde-report <project> stage-readiness` — separate "should we advance the stage?" check.
|
|
42
|
+
|
|
43
|
+
Tracking: see `tracking.instructions.md`. Write `<workspace>/.kushi/tracking/fde/intake/{{YYYY-MM-DD}}-<project>-<slug>.md` as the final step.
|
|
@@ -44,3 +44,5 @@ Generates an FDE-shaped engagement report. Read-only against Evidence; no outbou
|
|
|
44
44
|
- `skills/fde-report/SKILL.md` for the full step-by-step.
|
|
45
45
|
- `@Kushi fde-intake <project>` — precursor first-artifact intake document.
|
|
46
46
|
- `@Kushi fde-triage <project>` — full 7-file triage bundle (analysis + fitness + risk + 6Q + mobilization readiness + executive readout + reuse lens + validation warnings).
|
|
47
|
+
|
|
48
|
+
Tracking: see `tracking.instructions.md`. Write `<workspace>/.kushi/tracking/fde/report/{{YYYY-MM-DD}}-<project>-<shape>.md` as the final step.
|
|
@@ -44,3 +44,5 @@ Re-running on the same day overwrites files 00–06 in place and **merges file 0
|
|
|
44
44
|
- `skills/fde-triage/SKILL.md` for the full step-by-step.
|
|
45
45
|
- `@Kushi fde-intake <project>` — first-artifact intake document (precursor to the bundle).
|
|
46
46
|
- `@Kushi fde-report <project> [shape]` — individual report shapes (weekly / short / long / fitness / stage-readiness).
|
|
47
|
+
|
|
48
|
+
Tracking: see `tracking.instructions.md`. Write `<workspace>/.kushi/tracking/fde/triage/{{YYYY-MM-DD}}-<project>-bundle.md` as the final step (one summary entry, not 7 — the bundle itself lives under `Reports/triage/`).
|
|
@@ -14,4 +14,6 @@ Window resolution (per `refresh-project` skill):
|
|
|
14
14
|
|
|
15
15
|
Output is always weekly-bucketed regardless of input window.
|
|
16
16
|
|
|
17
|
-
Delegates to `refresh-project` skill. Skips `pull-<source>` for sources marked disabled in `integrations.yml` or whose config is missing.
|
|
17
|
+
Delegates to `refresh-project` skill. Skips `pull-<source>` for sources marked disabled in `integrations.yml` or whose config is missing.
|
|
18
|
+
|
|
19
|
+
Tracking: see `tracking.instructions.md`. Write `<workspace>/.kushi/tracking/runs/{{YYYY-MM-DD}}-<project>-refresh.md` as the final step.
|
|
@@ -14,4 +14,6 @@ Pure renderer. Reads:
|
|
|
14
14
|
Writes:
|
|
15
15
|
- `<engagement-root>/<project>/State/{00_overview, 01_decisions, 02_stakeholders, 03_architecture-and-solution, 04_workshops-and-key-meetings, 05_action-items, 06_risks-and-issues, 07_timeline-and-milestones, 08_artifacts-and-deliverables, 09_open-questions}.md`
|
|
16
16
|
|
|
17
|
-
Delegates to `build-state` skill. Use this when you've manually edited Evidence files and want State refreshed without re-pulling.
|
|
17
|
+
Delegates to `build-state` skill. Use this when you've manually edited Evidence files and want State refreshed without re-pulling.
|
|
18
|
+
|
|
19
|
+
Tracking: see `tracking.instructions.md`. Write `<workspace>/.kushi/tracking/runs/{{YYYY-MM-DD}}-<project>-state.md` as the final step.
|
|
@@ -11,7 +11,7 @@ When a skill (e.g. `fde-report`, `ask-project`) needs a pack's content, it loads
|
|
|
11
11
|
| Priority | Location | Purpose | Lifecycle |
|
|
12
12
|
|---:|---|---|---|
|
|
13
13
|
| 1 (highest) | `<engagement-root>/<project>/.kushi-reference/<pack>/` | Per-engagement override | Versioned with the engagement; for project-specific tuning |
|
|
14
|
-
| 2 |
|
|
14
|
+
| 2 | `<workspace>/.kushi/config/reference-overrides/<pack>/` | Workspace override | Per workspace / per machine; never overwritten by installer |
|
|
15
15
|
| 3 (canonical) | `<install-dest>/reference-packs/<pack>/` (i.e. this folder, installed) | Packaged default | Updated via `npm publish` + version bump |
|
|
16
16
|
|
|
17
17
|
Skills must always:
|
|
@@ -33,7 +33,7 @@ Skills must always:
|
|
|
33
33
|
What does **not** go in a pack:
|
|
34
34
|
|
|
35
35
|
- Per-engagement data (lives under `<project>/Evidence/`)
|
|
36
|
-
- Per-user identity / configs (lives in
|
|
36
|
+
- Per-user identity / configs (lives in `<workspace>/.kushi/config/project-evidence.yml`)
|
|
37
37
|
- Skill behavior (lives in `plugin/skills/<skill>/SKILL.md`)
|
|
38
38
|
- Cross-cutting agent doctrine (lives in `plugin/instructions/*.instructions.md`)
|
|
39
39
|
|
|
@@ -23,9 +23,9 @@ Use this pack when a report needs:
|
|
|
23
23
|
2. **Enumerate and read all human-readable `.md` files** in the pack.
|
|
24
24
|
3. Treat the pack as a **single reference set** — any file here may contribute to the FDE operating model used in reports.
|
|
25
25
|
4. **Apply the 3-layer override order** (highest wins):
|
|
26
|
-
- `<engagement-root>/<project>/.kushi-reference/fde/`
|
|
27
|
-
-
|
|
28
|
-
- `<install-dest>/reference-packs/fde/`
|
|
26
|
+
- `<engagement-root>/<project>/.kushi-reference/fde/` ← per-engagement override
|
|
27
|
+
- `<workspace>/.kushi/config/reference-overrides/fde/` ← workspace override
|
|
28
|
+
- `<install-dest>/reference-packs/fde/` ← packaged default (this folder, installed)
|
|
29
29
|
5. If two files at the same layer conflict, prefer the more **specific** file for that concept and raise the conflict explicitly in the skill's run-log / Open Questions — never silently average.
|
|
30
30
|
|
|
31
31
|
## File ownership
|
|
@@ -40,7 +40,7 @@ In order, stop on first hit:
|
|
|
40
40
|
1. Exact `<engagement-root>/<project>/Evidence/` folder.
|
|
41
41
|
2. Fuzzy match against `discovery.project_aliases` in any `<engagement-root>/<project>/Evidence/<alias>/.settings.yml`.
|
|
42
42
|
3. `<engagement-root>/<project>/external-context/` (lighter-weight projects without full bootstrap).
|
|
43
|
-
4.
|
|
43
|
+
4. `<workspace>/.kushi/config/project-evidence.yml` `active_projects` list.
|
|
44
44
|
|
|
45
45
|
If zero matches → ask user. If multiple → list candidates and ask user to pick. **Echo the resolved root path before answering** so the user can confirm.
|
|
46
46
|
|
|
@@ -44,13 +44,13 @@ After every run (success or coverage-gaps), write `<project>/bootstrap-status.md
|
|
|
44
44
|
Verify in order. Stop on hard failures.
|
|
45
45
|
|
|
46
46
|
1. **OS + host runtime** — display OS + Node/PowerShell version. Informational.
|
|
47
|
-
2. **WorkIQ install (REQUIRED, hard stop)** — read `<
|
|
48
|
-
- `$HOME\.
|
|
47
|
+
2. **WorkIQ install (REQUIRED, hard stop)** — read `<workspace>/.kushi/config/project-evidence.yml workiq.cli_path`. If missing, probe known paths:
|
|
48
|
+
- `$HOME\.kushi\bin\workiq.cmd`
|
|
49
49
|
- `$env:LOCALAPPDATA\Programs\WorkIQ\workiq.cmd`
|
|
50
50
|
- `$env:ProgramFiles\WorkIQ\workiq.cmd`
|
|
51
51
|
If found, persist path. If not found, ask user for path (or to install). Test with `<workiq.cli_path> --help`. Without WorkIQ, M365 sources will all fail — STOP.
|
|
52
52
|
3. **Conditional az login** — only if `<engagement-root>/.project-evidence/crm/config.yml` OR `<engagement-root>/.project-evidence/ado/config.yml` exists. Per `az-auth-conditional.instructions.md`. Soft warning on failure, never blocking.
|
|
53
|
-
4. **Engagement-root resolution** — per `engagement-root-resolution.instructions.md`. Persist to `<
|
|
53
|
+
4. **Engagement-root resolution** — per `engagement-root-resolution.instructions.md`. Persist to `<workspace>/.kushi/config/project-evidence.yml engagement_root` if newly resolved.
|
|
54
54
|
|
|
55
55
|
Display SETUP summary table with ✅ / ⚙️ / ❌ / ⚠️ / ➖ markers.
|
|
56
56
|
|
|
@@ -62,7 +62,8 @@ Required live files:
|
|
|
62
62
|
|
|
63
63
|
| Live file | Template source |
|
|
64
64
|
|---|---|
|
|
65
|
-
| `<
|
|
65
|
+
| `<workspace>/.kushi/config/project-evidence.yml` | `templates/init/project-evidence.template.yml` (seeded by installer) |
|
|
66
|
+
| `<workspace>/.kushi/config/integrations.yml` | `templates/init/integrations.template.yml` (seeded by installer) |
|
|
66
67
|
| `<engagement-root>/.project-evidence/m365/m365-auth.json` | `templates/init/m365-auth.template.json` |
|
|
67
68
|
| `<engagement-root>/.project-evidence/m365/m365-mutable.json` | `templates/init/m365-mutable.template.json` |
|
|
68
69
|
| `<engagement-root>/<project>/integrations.yml` | `templates/init/project-integrations.template.yml` |
|
|
@@ -31,7 +31,7 @@ Same algorithm as `ask-project` Step 1. Echo the resolved root path before draft
|
|
|
31
31
|
Build the pack's virtual filesystem with the **3-layer override order** (highest wins):
|
|
32
32
|
|
|
33
33
|
1. **Project override** — `<engagement-root>/<project>/.kushi-reference/fde/` (if present)
|
|
34
|
-
2. **
|
|
34
|
+
2. **Workspace override** — `<workspace>/.kushi/config/reference-overrides/fde/` (if present)
|
|
35
35
|
3. **Packaged default** — relative to this skill's install location:
|
|
36
36
|
- vscode target: `<workspace>/.kushi/reference-packs/fde/`
|
|
37
37
|
- clawpilot target: `~/.copilot/m-skills/kushi/reference-packs/fde/`
|
|
@@ -138,7 +138,7 @@ Present this verbatim:
|
|
|
138
138
|
|
|
139
139
|
Before opening, check whether any project is already bootstrapped:
|
|
140
140
|
|
|
141
|
-
1. Read
|
|
141
|
+
1. Read `<workspace>/.kushi/config/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
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
143
|
|
|
144
144
|
### Navigation Keywords
|
|
@@ -444,6 +444,6 @@ Reply `next` to see the closing cheat sheet, or `done` to exit.
|
|
|
444
444
|
- Rule 1.2: Mode selection must always present BOTH options — never auto-route to one mode.
|
|
445
445
|
- Rule 1.3: In walkthrough mode, each moment must wait for `next` / `skip` / `done` / `try` before advancing — never auto-advance.
|
|
446
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
|
|
447
|
+
- Rule 1.5: Try-it prompts must use the active project name from `<workspace>/.kushi/config/project-evidence.yml`, OR the placeholder `Contoso Discovery` if no projects are configured. Never invent a real-sounding project name.
|
|
448
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
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).
|
|
@@ -27,7 +27,7 @@ This skill does **NOT** create a new top-level config file. It reads from the co
|
|
|
27
27
|
|
|
28
28
|
**Resolution is fully deterministic** — never ask the user for paths the bootstrap layer already resolved:
|
|
29
29
|
|
|
30
|
-
1. `<engagement-root>` ←
|
|
30
|
+
1. `<engagement-root>` ← `<workspace>/.kushi/config/project-evidence.yml engagement_root` (per `engagement-root-resolution.instructions.md`).
|
|
31
31
|
2. `<project>` folder ← fuzzy-match per `engagement-root-resolution.instructions.md` (knownSections → active_projects → subfolders).
|
|
32
32
|
3. `<project>/integrations.yml ado.engagement_id` — REQUIRED. If `0` or missing → see "Prerequisites" below; never invent an ID.
|
|
33
33
|
4. `<project>/integrations.yml ado.writes` — if missing, append the block from `<KUSHI_ROOT>/plugin/templates/ado-update/integrations-ado-writes.example.yml` and stop for user confirmation of `fieldRefName`.
|
|
@@ -69,7 +69,7 @@ node runner.mjs --project ABN ... --types web,loop --titles "Architecture"
|
|
|
69
69
|
|
|
70
70
|
## Scheduled / unattended runs
|
|
71
71
|
|
|
72
|
-
- Browser branch (loop) reuses `~/.
|
|
72
|
+
- Browser branch (loop) reuses `~/.kushi/playwright-profile/onenote/`. When MFA fires, runner marks loop links `auth-required` and exits cleanly. User does one interactive bootstrap; next scheduled run silent.
|
|
73
73
|
- HTTP branch needs no auth for public links. For sites behind SSO (auth'd Confluence, internal dashboards) it returns `auth-required` and is currently NOT supported — paste the content into a `file` link as a workaround, OR add a per-site auth handler in a future version.
|
|
74
74
|
- `placeholder` links surface in the run report every refresh until the user fills them in.
|
|
75
75
|
|
|
@@ -23,7 +23,7 @@ Pulls **misc** evidence in two shapes per `snapshot-vs-stream.instructions.md`:
|
|
|
23
23
|
|
|
24
24
|
## Tools (in order)
|
|
25
25
|
|
|
26
|
-
1. **Playwright (browser-scrape, persisted profile)** — for `loop` links. Reuses `~/.
|
|
26
|
+
1. **Playwright (browser-scrape, persisted profile)** — for `loop` links. Reuses `~/.kushi/playwright-profile/onenote/` because it's the same M365 cookie scope. Implementation: `plugin/skills/pull-misc/runner.mjs` branch `loop`.
|
|
27
27
|
2. **HTTP fetch + Readability** — for `web` / `confluence` (anonymous) / `learn` / `docs` / `pdf` links. Implementation: `plugin/skills/pull-misc/runner.mjs` branch `web`.
|
|
28
28
|
3. **Local file read** — for `file` links pointing at project-relative paths. Implementation: `plugin/skills/pull-misc/runner.mjs` branch `file`.
|
|
29
29
|
4. **WorkIQ** — used only for stream/edit-event signals on `loop` links (Loop edit events surface in the M365 search index, same as OneNote stream events). NOT used for body retrieval — Loop bodies require the browser path.
|
|
@@ -72,7 +72,7 @@ These three facts are HARD-rule:
|
|
|
72
72
|
|
|
73
73
|
```pwsh
|
|
74
74
|
# A. Playwright profile (only required if external-links.txt contains loop links)
|
|
75
|
-
$prof = "$env:USERPROFILE\.
|
|
75
|
+
$prof = "$env:USERPROFILE\.kushi\playwright-profile\onenote"
|
|
76
76
|
if (-not (Test-Path $prof)) {
|
|
77
77
|
Write-Host "[pull-misc] Playwright profile not yet seeded — loop links will be skipped with last_status: auth-required."
|
|
78
78
|
Write-Host "[pull-misc] Run plugin/skills/pull-onenote/runner.mjs --bootstrap once to seed it."
|
|
@@ -36,7 +36,7 @@ const HEADLESS = !!args.headless;
|
|
|
36
36
|
const TYPES_FILTER = args.types ? String(args.types).split(',').map(s => s.trim().toLowerCase()) : null;
|
|
37
37
|
const TITLES_FILTER = args.titles ? String(args.titles).split(',').map(s => s.trim()) : null;
|
|
38
38
|
const TIMEOUT_MS = parseInt(args.timeout || '45000', 10);
|
|
39
|
-
const PROFILE_DIR = path.join(os.homedir(), '.
|
|
39
|
+
const PROFILE_DIR = path.join(os.homedir(), '.kushi', 'playwright-profile', 'onenote');
|
|
40
40
|
|
|
41
41
|
if (!PROJECT || !LINKS_FILE) {
|
|
42
42
|
console.error('Usage: --project <name> --links-file <path> [--headless] [--types t1,t2] [--titles "t1,t2"]');
|
|
@@ -21,7 +21,7 @@ When the bootstrap command opens a Chromium window:
|
|
|
21
21
|
- Wait for the OneNote home page to load.
|
|
22
22
|
- Close the window.
|
|
23
23
|
|
|
24
|
-
The profile is persisted at `~/.
|
|
24
|
+
The profile is persisted at `~/.kushi/playwright-profile/onenote/`. Subsequent runs reuse it.
|
|
25
25
|
|
|
26
26
|
## Per-section runs
|
|
27
27
|
|
|
@@ -23,7 +23,7 @@ Pulls **onenote** evidence in two shapes per `snapshot-vs-stream.instructions.md
|
|
|
23
23
|
|
|
24
24
|
## Tools (in order)
|
|
25
25
|
|
|
26
|
-
1. **Playwright (browser-scrape, persisted profile)** — PRIMARY. Drives OneNote-for-Web to enumerate pages and read verbatim bodies via `#PageContentWrapper`. Profile lives at `~/.
|
|
26
|
+
1. **Playwright (browser-scrape, persisted profile)** — PRIMARY. Drives OneNote-for-Web to enumerate pages and read verbatim bodies via `#PageContentWrapper`. Profile lives at `~/.kushi/playwright-profile/onenote/` and is reused across runs. Implementation: `plugin/skills/pull-onenote/runner.mjs`.
|
|
27
27
|
2. **WorkIQ** — FALLBACK only. Used when the Playwright profile is auth-expired (`auth-required`) and for the stream/edit-event source. Always cite `m365-id-registry` doctrine when invoking; never use as primary for body retrieval (proven non-deterministic).
|
|
28
28
|
3. **Host (m365_*)** — not used (Graph `Notes.Read.All` denied admin consent in this tenant).
|
|
29
29
|
|
|
@@ -145,7 +145,7 @@ Before any retrieval, validate the Playwright profile and (only if used as fallb
|
|
|
145
145
|
### A. Playwright profile (PRIMARY)
|
|
146
146
|
|
|
147
147
|
```pwsh
|
|
148
|
-
$prof = "$env:USERPROFILE\.
|
|
148
|
+
$prof = "$env:USERPROFILE\.kushi\playwright-profile\onenote"
|
|
149
149
|
if (-not (Test-Path $prof)) {
|
|
150
150
|
Write-Host "[pull-onenote] Playwright profile not yet seeded."
|
|
151
151
|
Write-Host "[pull-onenote] Run plugin/skills/pull-onenote/runner.mjs --bootstrap once interactively to sign in."
|
|
@@ -170,7 +170,7 @@ Cookie domains do not share between `*.cloud.microsoft` and `*.sharepoint(-df).c
|
|
|
170
170
|
|
|
171
171
|
These are the same selectors `preflightOneNoteWeb` uses. The bootstrap log MUST emit `Sign-in detected (OneNote chrome rendered).` between Step 1/2 and Step 2/2 — its absence is the defect signature of the v3.11.1-and-earlier bug (sign-in was silently skipped, and every subsequent scrape returned `auth-required` regardless of how thoroughly the user signed in). Same anti-pattern applies to any future bootstrap surface (SharePoint, Loop, M365 admin).
|
|
172
172
|
|
|
173
|
-
**A.3 Profile reset on channel switch:** if migrating from a Chromium profile to Edge (or vice versa), delete `~/.
|
|
173
|
+
**A.3 Profile reset on channel switch:** if migrating from a Chromium profile to Edge (or vice versa), delete `~/.kushi/playwright-profile/onenote/` first. Cookie/cache formats differ.
|
|
174
174
|
|
|
175
175
|
**A.4 OneNote-for-Web reachability pre-flight — HARD rule (kushi v3.11.0+):** before navigating to any section URL, the runner MUST probe `https://onenote.cloud.microsoft/` and classify the end-state into exactly one of three buckets:
|
|
176
176
|
|
|
@@ -40,7 +40,7 @@ const args = Object.fromEntries(
|
|
|
40
40
|
}, [])
|
|
41
41
|
);
|
|
42
42
|
|
|
43
|
-
const PROFILE_DIR = path.join(os.homedir(), '.
|
|
43
|
+
const PROFILE_DIR = path.join(os.homedir(), '.kushi', 'playwright-profile', 'onenote');
|
|
44
44
|
const HEADLESS = !!args.headless;
|
|
45
45
|
const BOOTSTRAP = !!args.bootstrap;
|
|
46
46
|
const PREFLIGHT = !!args.preflight;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Kushi — optional global integrations defaults.
|
|
2
|
+
#
|
|
3
|
+
# Seeded by the installer on first install. Never overwritten on upgrade.
|
|
4
|
+
# Per-project `integrations.yml` (inside the engagement folder) always
|
|
5
|
+
# takes precedence over this file.
|
|
6
|
+
#
|
|
7
|
+
# Most users can leave this file as-is. Fill it in only if you want a
|
|
8
|
+
# default CRM / ADO configuration that applies across all projects.
|
|
9
|
+
|
|
10
|
+
# Microsoft Dataverse (CRM) defaults.
|
|
11
|
+
# crm:
|
|
12
|
+
# environment_url: 'https://<org>.crm.dynamics.com'
|
|
13
|
+
# tenant_id: '72f988bf-86f1-41af-91ab-2d7cd011db47' # Microsoft tenant
|
|
14
|
+
|
|
15
|
+
# Azure DevOps defaults.
|
|
16
|
+
# ado:
|
|
17
|
+
# organization: 'https://dev.azure.com/<org>'
|
|
18
|
+
# project: '<default-project>'
|
|
19
|
+
# tenant_id: '72f988bf-86f1-41af-91ab-2d7cd011db47' # Microsoft tenant
|
|
@@ -1,32 +1,38 @@
|
|
|
1
|
-
#
|
|
2
|
-
# Copy to: ~/.copilot/project-evidence.yml (Linux/macOS)
|
|
3
|
-
# %USERPROFILE%\.copilot\project-evidence.yml (Windows)
|
|
1
|
+
# Kushi — personal config.
|
|
4
2
|
#
|
|
5
|
-
#
|
|
6
|
-
#
|
|
3
|
+
# This file was seeded by the installer on first install. It is YOUR copy,
|
|
4
|
+
# never overwritten on reinstall / --force / upgrade. Each team member
|
|
5
|
+
# maintains their own. Nothing here is a secret, but it IS personal —
|
|
6
|
+
# add `.kushi/config/` to .gitignore before committing the rest of .kushi/.
|
|
7
|
+
#
|
|
8
|
+
# Edit the values below (lines marked FILL ME IN), then run `bootstrap <project>`.
|
|
7
9
|
|
|
8
|
-
#
|
|
10
|
+
# FILL ME IN — short id used as your evidence subfolder name (e.g. "alex", "jordan").
|
|
9
11
|
alias: <your-alias>
|
|
10
12
|
|
|
13
|
+
# FILL ME IN
|
|
11
14
|
display_name: <Your Full Name>
|
|
12
15
|
email: your.email@example.com
|
|
13
16
|
|
|
14
|
-
#
|
|
17
|
+
# FILL ME IN — where your engagement-root lives. The parent folder containing
|
|
15
18
|
# one subfolder per project (typically synced from a team SharePoint library).
|
|
16
19
|
# Examples:
|
|
17
20
|
# Windows : 'C:\Users\<you>\OneDrive - <Tenant>\<Team>\Engagement Assets'
|
|
18
21
|
# macOS : '/Users/<you>/OneDrive - <Tenant>/<Team>/Engagement Assets'
|
|
19
22
|
projects_root: '<engagement-root>'
|
|
20
23
|
|
|
21
|
-
#
|
|
24
|
+
# FILL ME IN — default OneNote notebook to scan for project pages.
|
|
22
25
|
default_onenote_notebook: <Your Notebook Name>
|
|
23
26
|
|
|
24
|
-
#
|
|
25
|
-
# Match is fuzzy against subfolder names under projects_root.
|
|
27
|
+
# FILL ME IN — projects you actively work on. Kushi scans only these unless
|
|
28
|
+
# you ask otherwise. Match is fuzzy against subfolder names under projects_root.
|
|
26
29
|
active_projects:
|
|
27
30
|
- <ProjectA>
|
|
28
31
|
# - <ProjectB>
|
|
29
|
-
# - <add more here>
|
|
30
32
|
|
|
31
|
-
# (Optional)
|
|
32
|
-
#
|
|
33
|
+
# (Optional) Path to the WorkIQ CLI. If omitted, Kushi resolves in this order:
|
|
34
|
+
# 1. this `cli_path` value
|
|
35
|
+
# 2. `workiq` on PATH
|
|
36
|
+
# 3. ~/.kushi/bin/workiq.cmd (Windows) / ~/.kushi/bin/workiq (Linux/macOS)
|
|
37
|
+
# workiq:
|
|
38
|
+
# cli_path: 'C:\Users\<you>\.kushi\bin\workiq.cmd'
|
|
@@ -21,7 +21,7 @@ teams_chats:
|
|
|
21
21
|
search_keywords: []
|
|
22
22
|
|
|
23
23
|
onenote:
|
|
24
|
-
notebook: '{{ONENOTE_NOTEBOOK}}' # default from
|
|
24
|
+
notebook: '{{ONENOTE_NOTEBOOK}}' # default from <workspace>\.kushi\config\project-evidence.yml
|
|
25
25
|
section: '{{ONENOTE_SECTION}}' # e.g. 'Noridian.one'
|
|
26
26
|
page_filter: '' # optional substring filter
|
|
27
27
|
|
package/src/constants.mjs
CHANGED
|
@@ -22,6 +22,21 @@ export const PLUGIN_SOURCE_DIR = 'plugin';
|
|
|
22
22
|
/** Asset subdirectories under plugin/ that get copied. */
|
|
23
23
|
export const ASSET_DIRS = ['agents', 'instructions', 'prompts', 'skills', 'templates', 'reference-packs'];
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* User-editable config directory under the install destination.
|
|
27
|
+
* Seeded on first install only; never overwritten on reinstall / --force / upgrade.
|
|
28
|
+
*/
|
|
29
|
+
export const CONFIG_DIR = 'config';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Files seeded into <dest>/config/ on first install only.
|
|
33
|
+
* Each entry: { template: <path under plugin/templates/init/>, target: <name in config/> }
|
|
34
|
+
*/
|
|
35
|
+
export const CONFIG_SEED_FILES = [
|
|
36
|
+
{ template: 'init/project-evidence.template.yml', target: 'project-evidence.yml' },
|
|
37
|
+
{ template: 'init/integrations.template.yml', target: 'integrations.yml' },
|
|
38
|
+
];
|
|
39
|
+
|
|
25
40
|
/** Files to exclude from consumer installs (relative to plugin/). */
|
|
26
41
|
export const EXCLUDED_FILES = [];
|
|
27
42
|
|
package/src/main.mjs
CHANGED
|
@@ -16,6 +16,7 @@ import { promptForDestination } from './prompt.mjs';
|
|
|
16
16
|
import { copyAssets, copyProjectFiles } from './copy-assets.mjs';
|
|
17
17
|
import { mergeSettings } from './settings.mjs';
|
|
18
18
|
import { mergeCopilotInstructions } from './copilot-instructions.mjs';
|
|
19
|
+
import { seedConfig } from './seed-config.mjs';
|
|
19
20
|
import {
|
|
20
21
|
resolveProfile,
|
|
21
22
|
makeIncludeFilter,
|
|
@@ -129,6 +130,13 @@ async function installVscode(options, resolved, version) {
|
|
|
129
130
|
const manifestPath = writeInstalledManifest(fullDest, resolved, version);
|
|
130
131
|
console.log(` - kushi-install.json (profile manifest)`);
|
|
131
132
|
|
|
133
|
+
const { seeded, preserved } = seedConfig(PKG_ROOT, fullDest);
|
|
134
|
+
if (seeded.length > 0 || preserved.length > 0) {
|
|
135
|
+
console.log(`\n Config (.kushi/config/ — user-editable, preserved across upgrades):`);
|
|
136
|
+
for (const f of seeded) console.log(` - ${f} -> seeded from template`);
|
|
137
|
+
for (const f of preserved) console.log(` - ${f} -> preserved (already exists)`);
|
|
138
|
+
}
|
|
139
|
+
|
|
132
140
|
if (!options.noSettings) {
|
|
133
141
|
const { created, keysAdded, keysUnchanged } = mergeSettings(
|
|
134
142
|
projectRoot,
|
|
@@ -221,6 +229,13 @@ async function installClawpilot(options, resolved, version) {
|
|
|
221
229
|
writeInstalledManifest(fullDest, resolved, version);
|
|
222
230
|
console.log(` - kushi-install.json (profile manifest)`);
|
|
223
231
|
|
|
232
|
+
const { seeded, preserved } = seedConfig(PKG_ROOT, fullDest);
|
|
233
|
+
if (seeded.length > 0 || preserved.length > 0) {
|
|
234
|
+
console.log(`\n Config (${displayDest}\\config\\ — user-editable, preserved across upgrades):`);
|
|
235
|
+
for (const f of seeded) console.log(` - ${f} -> seeded from template`);
|
|
236
|
+
for (const f of preserved) console.log(` - ${f} -> preserved (already exists)`);
|
|
237
|
+
}
|
|
238
|
+
|
|
224
239
|
// Mirror agents/kushi.agent.md as top-level SKILL.md for Clawpilot discovery.
|
|
225
240
|
const agentSrc = path.join(PKG_ROOT, PLUGIN_SOURCE_DIR, CLAWPILOT_AGENT_SOURCE);
|
|
226
241
|
const skillDst = path.join(fullDest, CLAWPILOT_SKILL_DEST);
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import {
|
|
4
|
+
CONFIG_DIR,
|
|
5
|
+
CONFIG_SEED_FILES,
|
|
6
|
+
PLUGIN_SOURCE_DIR,
|
|
7
|
+
} from './constants.mjs';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Seed <dest>/config/ with user-editable config files on FIRST INSTALL ONLY.
|
|
11
|
+
*
|
|
12
|
+
* Rules:
|
|
13
|
+
* - If <dest>/config/<file> already exists → skip (never overwrite).
|
|
14
|
+
* - Behavior is identical regardless of --force; config/ is user territory.
|
|
15
|
+
* - Returns a per-file result so the installer can summarize what happened.
|
|
16
|
+
*
|
|
17
|
+
* @param {string} sourcePkgDir – root of the npm package
|
|
18
|
+
* @param {string} destAbsolute – absolute install destination (e.g. <workspace>/.kushi)
|
|
19
|
+
* @returns {{ seeded: string[], preserved: string[] }}
|
|
20
|
+
*/
|
|
21
|
+
export function seedConfig(sourcePkgDir, destAbsolute) {
|
|
22
|
+
const configDir = path.join(destAbsolute, CONFIG_DIR);
|
|
23
|
+
fs.mkdirSync(configDir, { recursive: true });
|
|
24
|
+
|
|
25
|
+
const seeded = [];
|
|
26
|
+
const preserved = [];
|
|
27
|
+
|
|
28
|
+
for (const { template, target } of CONFIG_SEED_FILES) {
|
|
29
|
+
const src = path.join(sourcePkgDir, PLUGIN_SOURCE_DIR, 'templates', template);
|
|
30
|
+
const dst = path.join(configDir, target);
|
|
31
|
+
|
|
32
|
+
if (!fs.existsSync(src)) continue;
|
|
33
|
+
|
|
34
|
+
if (fs.existsSync(dst)) {
|
|
35
|
+
preserved.push(target);
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
fs.cpSync(src, dst);
|
|
40
|
+
seeded.push(target);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return { seeded, preserved };
|
|
44
|
+
}
|