kushi-agents 4.0.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.
@@ -37,6 +37,7 @@ Project Q&A also auto-dispatches when the user names a known project under the e
37
37
  - `.kushi/instructions/` — doctrine (citations, WorkIQ-first, freshness gates)
38
38
  - `.kushi/reference-packs/` — bundled domain doctrine (override at project / workspace / packaged layers)
39
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`.
40
41
  - `.kushi/kushi-install.json` — profile manifest written by the installer
41
42
 
42
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": "4.0.0",
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": {
@@ -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.
@@ -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).
@@ -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.