@itradingai/aiwiki 0.2.16 → 0.2.19

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.
@@ -2,6 +2,233 @@
2
2
 
3
3
  This log records queue-driven AIWiki development milestones that should remain visible to future maintainers, not only in automation chat history.
4
4
 
5
+ ## 2026-06-08 - Base contract cleanup and safe optional directory pruning
6
+
7
+ Status: implemented and locally verified, committed locally, blocked before GitHub push and npm publication. Test-server verification is now required before both GitHub push and npm publication.
8
+
9
+ Version target: `@itradingai/aiwiki@0.2.19`
10
+
11
+ Commit: `3ae25b9` (`Stabilize AIWiki base contract before public-trial work`)
12
+
13
+ ### Goal
14
+
15
+ Make the base AIWiki experience quieter and more reliable before public-trial work. A new workspace should show the core knowledge workflow first, not a set of empty enhancement directories or legacy command paths. Agents should also have a safe, machine-readable way to detect and remove only empty optional directories.
16
+
17
+ The scoped acceptance criteria were:
18
+
19
+ - keep the main help and quick-start path focused on setup, Agent sync/check, ingest, context/query, lint, status, and doctor;
20
+ - preserve legacy command behavior without presenting legacy commands as the primary path;
21
+ - create only core directories by default in new workspaces;
22
+ - create optional long-term directories only when ingest actually writes related outputs;
23
+ - treat missing optional directories as normal in doctor and directory summaries;
24
+ - report empty optional directories as safe-fix lint issues with stable JSON metadata;
25
+ - make `lint --fix-empty-dirs --json` delete only known empty optional directories and empty known optional parent directories;
26
+ - keep the base CLI out of crawling, vector search, RAG-over-wiki, RBAC, RSS, scheduled collection, and browser-plugin scope.
27
+
28
+ ### Implemented
29
+
30
+ - `src/workspace.ts`
31
+ - Split core directories from optional enhancement directories.
32
+ - Made setup/init/doctor summaries core-first.
33
+ - Kept optional directories valid when they already exist, but stopped requiring them for a healthy workspace.
34
+
35
+ - `src/payload.ts`, `src/ingest.ts`, and `src/wiki-entry.ts`
36
+ - Preserved `request.outputs` as an additive request instead of normalizing every ingest into all optional artifacts.
37
+ - Kept core ingest artifacts stable: Source Card, Wiki Entry, and Processing Summary.
38
+ - Created claims, assets, topics, and outline files only when payload content or explicit outputs require them.
39
+ - Omitted optional frontmatter links when the corresponding files are not written.
40
+
41
+ - `src/lint.ts` and `src/app.ts`
42
+ - Added safe-fix metadata for empty known optional directories.
43
+ - Added `safe_fixes.available`, `safe_fixes.applied`, and `safe_fixes.only_safe_fixes` to JSON output.
44
+ - Added `aiwiki lint --fix-empty-dirs --json`.
45
+ - Kept deletion deliberately narrow: known optional empty directories only, never core directories, unknown directories, non-empty directories, or files.
46
+ - Reduced main help to the core user path while preserving existing command behavior.
47
+
48
+ - Documentation and packaged skill files
49
+ - Updated README, usage docs, FAQ, Agent handoff, lint protocol, and skill instructions for the core-first workflow.
50
+ - Documented the Agent flow: run `aiwiki lint --json`, apply safe fixes only when allowed, rerun lint, and report the changed directories.
51
+ - Tightened package file inclusion so unrelated untracked docs are not accidentally packed.
52
+
53
+ - Tests
54
+ - Updated workspace tests for the smaller default directory contract.
55
+ - Added ingest coverage for minimal output behavior.
56
+ - Added CLI coverage for `lint --fix-empty-dirs --json` and help/setup guidance.
57
+
58
+ ### Verification
59
+
60
+ - `npm test`: passed, 59 tests.
61
+ - `npm run release:check`: passed, including tests and `scripts/release-check.mjs`.
62
+ - `npm pack --dry-run`: passed for `@itradingai/aiwiki@0.2.19`, 35 files, package size 77.1 kB, shasum `3f436503bb0dc3019b188941f06f3c518bbecc0b`.
63
+ - Verification used `D:/Program Files/nodejs/npm.cmd` with a repo-local npm cache because the PowerShell `npm` shim points to a missing `C:/Users/Max/AppData/Roaming/npm/npm-cli.js`.
64
+
65
+ ### Release State
66
+
67
+ The implementation is committed locally, but the GitHub push failed before publication:
68
+
69
+ ```text
70
+ Warning: Identity file C:/Users/Max/.ssh/id_ed25519 not accessible: Permission denied.
71
+ git@github.com: Permission denied (publickey).
72
+ fatal: Could not read from remote repository.
73
+ ```
74
+
75
+ Because GitHub push failed, npm publication was not attempted. The task queue and human board are marked `blocked`, and the Enterprise WeChat blocked notification was delivered successfully with HTTP 200 / `errcode:0`.
76
+
77
+ ### Testing Server Gate
78
+
79
+ Test-server verification must run before updating GitHub or npm.
80
+
81
+ The release gate for `0.2.19` is now a pre-GitHub and pre-npm tarball smoke test: create the exact local npm tarball that would be published, copy that `.tgz` to a task-specific directory on `170.106.73.197`, install it into a task-local Node project, and run the same smoke commands against that installed package. This proves the package artifact before it reaches GitHub or npm.
82
+
83
+ The older published-package smoke test remains useful after npm publication as a final registry sanity check, but it is no longer allowed to be the first remote test. Pushing to GitHub or publishing to npm before test-server verification would make a public delivery surface the first real deployment surface, which is the wrong order for this queue.
84
+
85
+ Required prepublication smoke commands:
86
+
87
+ ```bash
88
+ aiwiki setup --path <tmp-vault> --yes
89
+ aiwiki doctor --path <tmp-vault>
90
+ inspect that only core directories are created by default
91
+ aiwiki ingest-agent --payload <minimal-fixture> --path <tmp-vault>
92
+ inspect that optional output directories remain absent unless needed
93
+ aiwiki lint --json --path <tmp-vault>
94
+ aiwiki lint --fix-empty-dirs --json --path <tmp-vault>
95
+ aiwiki context <topic> --path <tmp-vault>
96
+ aiwiki query <topic> --path <tmp-vault>
97
+ ```
98
+
99
+ The smoke test must use only a task-specific temporary directory on the remote server. Do not install globally, do not reuse a real user vault, and do not clean outside the task directory.
100
+
101
+ ### Resume Steps
102
+
103
+ Remote tarball smoke must pass first. Only after that, restore SSH key access for the current runtime user or configure GitHub authentication so this succeeds:
104
+
105
+ ```powershell
106
+ git push origin main
107
+ ```
108
+
109
+ Then continue the release chain:
110
+
111
+ ```powershell
112
+ npm publish --access public
113
+ npm view @itradingai/aiwiki version
114
+ ```
115
+
116
+ After `npm view` returns `0.2.19`, a short published-package registry sanity check can be run, but the blocking test-server gate must already have passed before both GitHub push and npm publish.
117
+
118
+ ### Notes For Future Changes
119
+
120
+ - Keep optional directories optional. Do not reintroduce required empty claims/assets/topics/outlines directories in new workspaces.
121
+ - Keep safe fixes narrow and auditable. Do not let `--fix-empty-dirs` delete files, core directories, unknown directories, or non-empty directories.
122
+ - Keep main help focused on the core path. Legacy commands can remain compatible without being promoted as first-run guidance.
123
+ - Test-server verification from the local npm tarball must happen before GitHub push and before npm publication. Local pack verification alone is not enough to update GitHub or npm.
124
+
125
+ ## 2026-06-07 - Agent-first skill sync
126
+
127
+ Status: implemented, locally verified, pushed to GitHub, blocked on npm OTP before publication.
128
+
129
+ Version target: `@itradingai/aiwiki@0.2.18`
130
+
131
+ Commit: `e41d634` (`Make Agent skill upgrades safe to sync automatically`)
132
+
133
+ ### Goal
134
+
135
+ Make AIWiki skill upgrades safe for Agent-first operation. The intended user path is that a host AI Agent can upgrade AIWiki, synchronize its local skill instructions, tell the user what changed, and preserve a rollback path without requiring the user to manually inspect Agent home directories.
136
+
137
+ The scoped acceptance criteria were:
138
+
139
+ - provide one idempotent command for first install and future upgrades;
140
+ - keep npm install side-effect free and avoid automatic writes to Agent home directories;
141
+ - detect missing, current, changed, and unsupported Agent targets;
142
+ - back up changed installed skill files before overwrite;
143
+ - support `--dry-run` and `--json` for Agent-driven preview and automation;
144
+ - improve CLI help, README, and Agent handoff docs for skill upgrade behavior;
145
+ - update the packaged AIWiki skill so Agents know how to use the new context/query/lint surfaces.
146
+
147
+ ### Implemented
148
+
149
+ - `src/app.ts`
150
+ - Added `aiwiki agent sync`.
151
+ - Added `aiwiki agent sync --agent <id> --yes`.
152
+ - Added `aiwiki agent sync --dry-run`.
153
+ - Added `aiwiki agent sync --json --yes`.
154
+ - Added `aiwiki agent check --json`.
155
+ - Added command-specific help for `aiwiki agent help`, `aiwiki agent sync --help`, `aiwiki context --help`, and `aiwiki query --help`.
156
+ - Added safe copy behavior that compares source and target files, no-ops when current, and writes timestamped backups before overwrite.
157
+ - Updated next-action guidance from manual install toward `aiwiki agent sync --yes`.
158
+
159
+ - `skill/SKILL.md`
160
+ - Added skill version marker `aiwiki-skill-version: 0.2.18`.
161
+ - Added Agent-first setup and upgrade instructions.
162
+ - Documented `agent sync`, `agent check`, `--dry-run`, `--json`, and backup/rollback behavior.
163
+ - Expanded Agent guidance for filtered/explainable context JSON.
164
+
165
+ - `skill/QUERY_PROTOCOL.md` and `skill/LINT_PROTOCOL.md`
166
+ - Documented filters, query scope, result quality, recommended next action, match reasons, quality signals, and lint/next handling for host Agents.
167
+
168
+ - `skill/UPGRADE_NOTES.md`
169
+ - Added packaged notes that explain the current skill changes, expected Agent behavior after sync, and user-facing summary requirements.
170
+
171
+ - `README.md`, `docs/USAGE.md`, and `docs/AGENT_HANDOFF.md`
172
+ - Added safe skill sync and upgrade instructions for first installs, long-gap upgrades, per-agent sync, JSON status checks, and rollback from backup.
173
+
174
+ - `tests/cli.test.ts`
175
+ - Covered agent sync dry-run, install, JSON current state, changed-file backup, and overwrite behavior.
176
+ - Covered new help text and `agent check --json`.
177
+
178
+ ### Verification
179
+
180
+ - `npm test`: passed, 56 tests.
181
+ - `npm run release:check`: passed, including 56 tests and release-check.
182
+ - `npm pack --dry-run`: passed for `@itradingai/aiwiki@0.2.18`.
183
+ - Clean publish clone verification from `C:\Users\Max\AppData\Local\Temp\aiwiki-publish-dc800e0934564873853c9313d670122c`: `npm ci`, `npm run release:check`, and `npm pack --dry-run` passed.
184
+ - Isolated smoke test with temporary `CODEX_HOME` and `CLAUDE_HOME`: passed for first install, `agent check --json`, changed skill backup, overwrite, and current-state dry-run.
185
+
186
+ ### Release State
187
+
188
+ GitHub push succeeded:
189
+
190
+ ```text
191
+ ceec9a1..e41d634 main -> main
192
+ ```
193
+
194
+ npm publication from a clean clone is blocked by a one-time password challenge:
195
+
196
+ ```text
197
+ npm error code EOTP
198
+ npm error This operation requires a one-time password from your authenticator.
199
+ ```
200
+
201
+ Current registry version remains `0.2.16`, so remote smoke tests for `0.2.18` have not run yet.
202
+
203
+ ### Resume Steps
204
+
205
+ After npm OTP is available, publish from a clean committed tree or a fresh clean clone:
206
+
207
+ ```powershell
208
+ npm publish --otp=<code>
209
+ npm view @itradingai/aiwiki version
210
+ ```
211
+
212
+ After `npm view` returns `0.2.18`, run remote smoke tests for:
213
+
214
+ ```bash
215
+ aiwiki agent sync --dry-run
216
+ aiwiki agent sync --json --yes
217
+ aiwiki agent check --json
218
+ aiwiki context --help
219
+ aiwiki query --help
220
+ ```
221
+
222
+ Use a task-specific temporary Agent home and vault on the remote server. Do not write to real user Agent homes during remote verification.
223
+
224
+ ### Notes For Future Changes
225
+
226
+ - Keep `agent sync` explicit. Do not add npm lifecycle hooks that write into `CODEX_HOME`, `CLAUDE_HOME`, or other Agent home directories.
227
+ - Preserve backup-before-overwrite behavior for any future Agent target.
228
+ - Keep `agent install` compatible, but prefer `agent sync` in user-facing guidance because it handles both first install and upgrade.
229
+ - Do not make the skill upgrade workflow depend on crawling, vector search, RAG-over-wiki, RBAC, RSS, scheduled collection, or browser plugins.
230
+ - Package publication should use a clean clone or clean committed tree because unrelated untracked files can otherwise be included by broad package `files` rules.
231
+
5
232
  ## 2026-06-05 - AIWIKI-004 lint workbench
6
233
 
7
234
  Status: implemented, locally verified, pushed to GitHub, blocked on npm OTP before publication.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itradingai/aiwiki",
3
- "version": "0.2.16",
3
+ "version": "0.2.19",
4
4
  "type": "module",
5
5
  "description": "Agent-first AI knowledge base CLI for turning articles, links and notes into Obsidian-ready source cards, topics, outlines and reusable knowledge assets.",
6
6
  "license": "MIT",
@@ -38,7 +38,17 @@
38
38
  "LICENSE",
39
39
  "CONTRIBUTING.md",
40
40
  "SECURITY.md",
41
- "docs/*.md",
41
+ "docs/20260607-aiwiki-feature-pruning-plan.md",
42
+ "docs/20260607-aiwiki-long-term-operating-roadmap.md",
43
+ "docs/AGENT_HANDOFF.md",
44
+ "docs/FAQ.md",
45
+ "docs/OBSIDIAN_DATAVIEW_PLAN.md",
46
+ "docs/README.md",
47
+ "docs/RELEASE.md",
48
+ "docs/ROADMAP.md",
49
+ "docs/SHOWCASE.md",
50
+ "docs/USAGE.md",
51
+ "docs/development-log.md",
42
52
  "docs/architecture.svg",
43
53
  "skill"
44
54
  ],
@@ -9,27 +9,36 @@ Use this protocol when the user asks:
9
9
 
10
10
  ## Steps
11
11
 
12
- 1. Call:
12
+ 1. Call JSON lint first:
13
13
 
14
14
  ```bash
15
- aiwiki lint
15
+ aiwiki lint --json
16
16
  ```
17
17
 
18
- 2. Read the terminal report.
19
- 3. Mention the report path, usually:
18
+ 2. If `safe_fixes.only_safe_fixes` is true and the user allows cleanup, apply the built-in safe fix and rerun JSON lint:
19
+
20
+ ```bash
21
+ aiwiki lint --fix-empty-dirs --json
22
+ aiwiki lint --json
23
+ ```
24
+
25
+ 3. Read the terminal report.
26
+ 4. Mention the report path, usually:
20
27
 
21
28
  ```text
22
29
  dashboards/Lint Report.md
23
30
  ```
24
31
 
25
- 4. Explain warnings and errors as structure-health feedback.
26
- 5. Do not frame lint as "the user must manually audit every note".
32
+ 5. Explain warnings and errors as structure-health feedback.
33
+ 6. Do not frame lint as "the user must manually audit every note".
34
+ 7. If `aiwiki next` recommends `aiwiki agent sync --yes`, treat Agent skill setup as the next operational step before asking the user to ingest or query more material.
27
35
 
28
36
  ## Issue Meaning
29
37
 
30
38
  - `error`: broken structure such as a missing internal link.
31
39
  - `warning`: likely fix needed, such as missing source fields or stale fallback entries.
32
40
  - `info`: useful inventory, such as deterministic fallback count or duplicate titles.
41
+ - `safe_fixes`: machine-readable count of safe fixes available/applied; `only_safe_fixes` means all current issues are safe to apply with the supported fixer.
33
42
 
34
43
  ## Repair Guidance
35
44
 
@@ -39,4 +48,4 @@ Prefer small, traceable fixes:
39
48
  - Fix broken wikilinks.
40
49
  - Add missing `source_card` or `raw_file` paths.
41
50
  - Ask the host Agent to provide `analysis` for scaffold entries.
42
-
51
+ - Remove empty optional enhancement directories only through `aiwiki lint --fix-empty-dirs --json`; do not delete core directories, unknown directories, non-empty directories, or files.
@@ -16,11 +16,29 @@ Use this protocol when the user asks:
16
16
  aiwiki context "<topic>"
17
17
  ```
18
18
 
19
+ Add filters when the user intent is specific:
20
+
21
+ ```bash
22
+ aiwiki context "<topic>" --type wiki_entries --status active --limit 5
23
+ aiwiki context "<topic>" --source-role input --wiki-type source_knowledge --limit 5
24
+ aiwiki context "<topic>" --source-role output --limit 5
25
+ aiwiki context "<topic>" --type source_cards --status to-review --limit 5
26
+ ```
27
+
19
28
  3. Read the JSON result.
20
29
  4. Prefer `matches.wiki_entries` before source cards, claims, topics, outlines, or raw refs.
21
- 5. Pay attention to `generation_mode`, `quality`, and `warnings`.
22
- 6. If the best Wiki Entry has `quality: "scaffold"`, tell the user that the entry is a traceable fallback and may need Agent enrichment.
23
- 7. Do not scan `02-raw` by default unless:
30
+ 5. Read `query_scope` to understand what was searched.
31
+ 6. Read `result_quality` before deciding how confident the answer can be.
32
+ 7. Follow `recommended_next_action`:
33
+ - `use_matches_for_answer`: answer from the matches.
34
+ - `review_grounding_or_enrich_entry`: answer cautiously and suggest enrichment/review.
35
+ - `review_source_cards_then_create_wiki_entry`: explain that only source-level material exists.
36
+ - `broaden_query_or_ingest_source`: ask for a broader query or ingest more material.
37
+ 8. Use `match_reasons` to explain why an item was selected.
38
+ 9. Use `quality_signals` to decide whether the result is enriched, scaffold, needs grounding review, or only has weak source support.
39
+ 10. Use `related_refs` to mention useful local follow-up files.
40
+ 11. If the best Wiki Entry has `quality: "scaffold"` or `quality_signals` includes `grounding:needs_review`, tell the user that the entry is a traceable lead and may need Agent enrichment or evidence review.
41
+ 12. Do not scan `02-raw` by default unless:
24
42
  - Wiki Entries are insufficient.
25
43
  - The user asks to verify the original source.
26
44
  - There is a source conflict.
@@ -35,4 +53,3 @@ Include:
35
53
  - Source basis.
36
54
  - Known gaps or scaffold warnings.
37
55
  - Suggested next step.
38
-
package/skill/SKILL.md CHANGED
@@ -3,12 +3,46 @@ name: aiwiki
3
3
  description: Agent-first AIWiki workflow for turning one URL/body into local Wiki knowledge files.
4
4
  ---
5
5
 
6
+ <!-- aiwiki-skill-version: 0.2.19 -->
7
+
6
8
  # AIWiki Skill
7
9
 
8
10
  Use this skill when the user asks an Agent to process one URL, article body, or local text file with the `aiwiki` keyword, or says phrases like `入库 <url>` / `收录 <url>` / `从 AIWiki 里了解 <topic>`.
9
11
 
10
12
  AIWiki CLI does not fetch webpages and does not call an LLM. The host Agent reads and understands the source; AIWiki validates, writes, links, tracks, queries, and lints local Markdown knowledge files.
11
13
 
14
+ ## Agent-First Setup and Upgrade
15
+
16
+ When the user asks you to install, update, or repair AIWiki Agent integration, prefer the idempotent sync command:
17
+
18
+ ```bash
19
+ aiwiki agent sync --yes
20
+ ```
21
+
22
+ For a specific host:
23
+
24
+ ```bash
25
+ aiwiki agent sync --agent codex --yes
26
+ aiwiki agent sync --agent claude --yes
27
+ ```
28
+
29
+ Use `--dry-run` to preview without writing, and `--json` when you need machine-readable status:
30
+
31
+ ```bash
32
+ aiwiki agent sync --agent codex --dry-run
33
+ aiwiki agent sync --json --yes
34
+ aiwiki agent check --json
35
+ ```
36
+
37
+ Sync behavior:
38
+
39
+ - missing installed skill: install the packaged AIWiki skill
40
+ - current installed skill: leave unchanged
41
+ - different installed skill: backup the old file, then overwrite with the packaged skill
42
+ - unsupported host: do not write; use `aiwiki prompt agent` as a manual fallback
43
+
44
+ After sync, tell the user the target path, any backup path, and that the target Agent may need to restart or reload before the new skill is active. Never edit Agent config during `npm install`; sync is the explicit safe step.
45
+
12
46
  ## Knowledge Base Purpose
13
47
 
14
48
  Before ingesting, querying, linting, or reorganizing material, read `_system/purpose.md` in the target AIWiki workspace when it exists. Treat it as the local contract for:
@@ -98,7 +132,7 @@ Because AIWiki CLI does not call an LLM, high-quality summary and knowledge extr
98
132
  },
99
133
  "request": {
100
134
  "mode": "ingest",
101
- "outputs": ["source_card", "wiki_entry", "creative_assets", "topics", "draft_outline", "processing_summary"],
135
+ "outputs": ["source_card", "wiki_entry", "processing_summary"],
102
136
  "language": "zh-CN"
103
137
  }
104
138
  }
@@ -143,7 +177,26 @@ When the user asks to understand a topic from AIWiki, call:
143
177
  aiwiki context "<topic>"
144
178
  ```
145
179
 
146
- Use the returned JSON to answer. Prefer Wiki Entries first. Do not scan `02-raw` by default unless the Wiki result is insufficient, the user asks to verify the original text, or sources conflict.
180
+ Use filters when the user's intent is clear:
181
+
182
+ ```bash
183
+ aiwiki context "<topic>" --type wiki_entries --status active --limit 5
184
+ aiwiki context "<topic>" --source-role output --limit 5
185
+ aiwiki context "<topic>" --type source_cards --status to-review --limit 5
186
+ ```
187
+
188
+ Use the returned JSON to answer. Prefer Wiki Entries first, but read these fields before responding:
189
+
190
+ - `query_scope`: filters, limit, and searched groups
191
+ - `result_quality`: total matches, best score, and whether a Wiki Entry was found
192
+ - `recommended_next_action`: whether to answer, broaden the query, enrich, or review grounding
193
+ - `match_reasons`: why each result matched
194
+ - `quality_signals`: scaffold, enriched, grounding, status, and relationship hints
195
+ - `related_refs`: local wikilinks and frontmatter relationships
196
+
197
+ Do not scan `02-raw` by default unless the Wiki result is insufficient, the user asks to verify the original text, or sources conflict.
198
+
199
+ If `quality_signals` contains `quality:scaffold` or `grounding:needs_review`, tell the user the result is a traceable lead that needs enrichment or review. Do not present it as final confirmed knowledge.
147
200
 
148
201
  For direct human terminal output, use:
149
202
 
@@ -155,13 +208,20 @@ aiwiki query "<topic>"
155
208
 
156
209
  ## Lint Protocol
157
210
 
158
- When the user asks to整理 / 检查 / lint the knowledge base, call:
211
+ When the user asks to整理 / 检查 / lint the knowledge base, first call JSON lint:
212
+
213
+ ```bash
214
+ aiwiki lint --json
215
+ ```
216
+
217
+ If `safe_fixes.only_safe_fixes` is true and the user has allowed cleanup, apply the built-in safe fix and rerun JSON lint:
159
218
 
160
219
  ```bash
161
- aiwiki lint
220
+ aiwiki lint --fix-empty-dirs --json
221
+ aiwiki lint --json
162
222
  ```
163
223
 
164
- Explain warnings and errors as structure-health feedback. Do not frame lint as a requirement that the user manually review every item.
224
+ Only `remove_empty_optional_dir` is auto-safe today. It removes known empty optional enhancement directories and must not delete core directories, unknown directories, non-empty directories, or files. Explain warnings and errors as structure-health feedback. Do not frame lint as a requirement that the user manually review every item.
165
225
 
166
226
  ## Source Role
167
227
 
@@ -0,0 +1,22 @@
1
+ # AIWiki Skill Upgrade Notes
2
+
3
+ Use this note when an Agent finishes `aiwiki agent sync`.
4
+
5
+ ## Current Major Changes
6
+
7
+ - Agent integration should use `aiwiki agent sync --yes` for both first install and upgrades.
8
+ - Sync backs up changed installed skill files before overwriting them.
9
+ - `aiwiki agent check --json` and `aiwiki agent sync --json --yes` provide machine-readable status for Agents.
10
+ - `aiwiki context` supports `--type`, `--source-role`, `--wiki-type`, `--status`, and `--limit`.
11
+ - Context JSON includes `query_scope`, `result_quality`, `recommended_next_action`, `match_reasons`, `quality_signals`, and `related_refs`.
12
+ - Scaffold or grounding-review matches are traceable leads, not final confirmed knowledge.
13
+
14
+ ## Agent Reply After Sync
15
+
16
+ Tell the user:
17
+
18
+ - which Agent targets were installed, current, updated, or unsupported
19
+ - where the new skill was written
20
+ - where the old skill was backed up, if any
21
+ - that the Agent may need a restart or reload
22
+ - that rollback is possible by copying the backup file back to the target path