cyber-agentkit 1.1.0 → 2.0.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.
@@ -0,0 +1,24 @@
1
+ # Update prose
2
+
3
+ Recommends updated prose for a section a tool wrote earlier and its owner may have edited. A caller hands over the offered prose, the found prose, and the historic prose (the wordings the tool retired). A script compares them sentence by sentence and returns, for each part, whether the found text is current, which retired wording it descends from, which sentences are the owner's, and the merged text or the exact sentences that collide. The skill reads those facts and resolves only what they leave open, marking every sentence it decided. It runs the `prose-update` command from a launcher bundled in `scripts/` and writes no file. Type `/prose-update` to run it yourself. Installed as a Claude Code plugin, it is `/cyber-agentkit:prose-update` (pnpm install: `pnpm-cyber-agentkit-prose-update`).
4
+
5
+ | Input | What |
6
+ | --- | --- |
7
+ | Offered prose | the wording the tool offers now |
8
+ | Found prose | the text in the file being updated |
9
+ | Historic prose | a history text of retired wordings, or one or more retired wordings, newest first |
10
+
11
+ | Outcome | Meaning |
12
+ | --- | --- |
13
+ | `up-to-date` | the found part already holds the offered wording |
14
+ | `update` | merged: the owner's sentences kept, the offered ones taken |
15
+ | `owners` | the part is the owner's own; nothing is offered |
16
+ | `conflict` | both sides changed the same sentences differently |
17
+ | `undetermined` | the facts do not settle it: no history, an empty section, a tied or missing base |
18
+
19
+ It ships in the `cyber-agentkit` plugin:
20
+
21
+ ```text
22
+ /plugin marketplace add cyber-uni/marketplace
23
+ /plugin install cyber-agentkit@cyber-uni
24
+ ```
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: prose-update
3
+ description: Use this skill when a section of prose a tool wrote earlier may have been edited by its owner and a newer wording is available, to get recommended updated prose that keeps the owner's sentences. Takes the offered prose, the found prose, and the historic prose.
4
+ ---
5
+
6
+ # Update prose
7
+
8
+ Given a newer wording, the text now in a file, and the wordings the tool retired, recommend the updated text. A script returns the facts that settle most cases. You resolve only what it leaves open. Nothing here writes a file or asks the owner: the calling skill does that with your recommendation.
9
+
10
+ ## Inputs
11
+
12
+ Exactly three, as text:
13
+
14
+ 1. **Offered prose**: the wording the tool offers now.
15
+ 2. **Found prose**: the text in the file being updated. It may hold several sections.
16
+ 3. **Historic prose**: either a history text (entries headed `## Superseded <date> — <reason>`, each wording in a fence) or one or more retired wordings, newest first.
17
+
18
+ Read no file the caller did not name. If one of the three is missing, say which and stop.
19
+
20
+ ## Run
21
+
22
+ ```sh
23
+ node <this skill's folder>/scripts/prose-update.mjs classify --offered-from <file> --found-from <file> --history-from <file> --format json
24
+ ```
25
+
26
+ Pass `--offered`, `--found`, or `--history` with the text itself instead of the `-from` form, and `--retired` (repeatable, newest first) in place of a history text. Each of the three takes one form, not both. If the script is missing or cannot run, use `pnpm exec cyber-agentkit prose-update` when the package is a direct dependency, else `npx -y cyber-agentkit@2.0.0 prose-update`, with the same arguments.
27
+
28
+ An empty offered wording exits 1 with `error: empty-offered`. Report it and stop.
29
+
30
+ ## Read the result
31
+
32
+ Each part (a heading path and the sentences under it) has an `outcome`:
33
+
34
+ | Outcome | Recommend |
35
+ | --- | --- |
36
+ | `up-to-date`, `owners` | the part's `text` as found. Nothing is offered. |
37
+ | `update` | the part's `text`, merged by the script: the owner's sentences kept, the offered ones taken. |
38
+ | `conflict` | the colliding sentences are in `collisions` (base, found, offered). The part's `text` holds the found sentences there. Resolve by reading intent. |
39
+ | `undetermined` | the `reason` says why: `no-history`, `empty-section`, `tied-base`, `no-base`. Resolve by reading intent, or give no recommendation. |
40
+
41
+ The top-level `text` is the whole document as the script merged it. For `up-to-date`, `owners`, and `update` it is the recommended prose: use it as is and mark no sentence as decided.
42
+
43
+ ## Resolve what the script left open
44
+
45
+ Only for `conflict` and `undetermined` parts.
46
+
47
+ - Compare meaning, not wording: is the owner's sentence a rewording of the offered one, or a different point?
48
+ - Keep every owner sentence. Drop one only when you mark it `decided` with the reason.
49
+ - Mark every sentence you wrote or chose that is not from the found text, the offered wording, or an owner sentence as `decided`, with the reason.
50
+ - When you cannot choose, give no recommendation for the part. Name the part and the choice the owner must make.
51
+
52
+ ## Answer
53
+
54
+ Return the recommended prose, then for each part its outcome, and for each sentence whether it was kept, taken from the offered wording, or decided. Ask the owner a question only for a part that is a `conflict` or `undetermined`, or whose recommendation carries a `decided` sentence.
55
+
56
+ ## Retire a wording
57
+
58
+ When the tool ships a new wording, add the old one to the history: `node <this skill's folder>/scripts/prose-update.mjs retire --history-from <file> --wording-from <file> --date <date> --reason "<why>"` prints the new history text. Save it only after the user approves. Write new wordings so that they only add sentences after the old ones: such a revision merges without collision.