@oevery/rsp 3.2.0 → 3.3.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.
Files changed (37) hide show
  1. package/README.md +4 -3
  2. package/README.zh-CN.md +3 -2
  3. package/dist/{chunk-SEGJLWRE.mjs → chunk-7HXQNBIG.mjs} +447 -734
  4. package/dist/{chunk-JYDEJEM4.mjs → chunk-QM2UVPQK.mjs} +47 -30
  5. package/dist/{chunk-ZORUJTVS.mjs → chunk-TSUDEX5Y.mjs} +1163 -104
  6. package/dist/cli.mjs +5332 -3047
  7. package/dist/entry-GIDNR7CJ.mjs +1846 -0
  8. package/dist/{entry-RG6HREUN.mjs → entry-YAW3PYFA.mjs} +2 -2
  9. package/package.json +12 -7
  10. package/rules/rsp-rules.md +6 -5
  11. package/skills/rsp/SKILL.md +26 -57
  12. package/skills/rsp/references/control-outcome.md +31 -0
  13. package/skills/rsp/references/durable-review.md +18 -1
  14. package/skills/rsp/references/focus-continuation.md +9 -0
  15. package/skills/rsp/references/implementation-evidence.md +12 -0
  16. package/skills/rsp/references/managed-routing.md +9 -8
  17. package/skills/rsp/references/response-language.md +11 -0
  18. package/skills/rsp/references/setup-repair.md +3 -3
  19. package/skills/rsp-commit/SKILL.md +24 -9
  20. package/skills/rsp-design/SKILL.md +1 -1
  21. package/skills/rsp-diagnose/SKILL.md +3 -1
  22. package/skills/rsp-implement/SKILL.md +15 -5
  23. package/skills/rsp-manage/SKILL.md +56 -51
  24. package/skills/rsp-manage/references/closeout.md +3 -1
  25. package/skills/rsp-manage/references/delegation.md +47 -0
  26. package/skills/rsp-manage/references/interruption-recovery.md +15 -3
  27. package/skills/rsp-manage/references/review-convergence.md +3 -1
  28. package/skills/rsp-release-docs/SKILL.md +13 -13
  29. package/skills/rsp-release-docs/references/publication-lifecycle.md +4 -0
  30. package/skills/rsp-resolve-findings/SKILL.md +2 -2
  31. package/skills/rsp-review/SKILL.md +9 -12
  32. package/skills/rsp-review/references/code-review.md +3 -2
  33. package/skills/rsp-shape/SKILL.md +1 -1
  34. package/skills/rsp-tdd/SKILL.md +10 -2
  35. package/skills/rsp-verify/SKILL.md +40 -0
  36. package/dist/entry-I22OUIW5.mjs +0 -888
  37. package/skills/rsp/references/release-operations.md +0 -9
@@ -2,14 +2,44 @@
2
2
  import {
3
3
  ManagedPathError,
4
4
  PKG_ROOT,
5
+ emitJson,
5
6
  inspectManagedDirectory,
6
7
  inspectManagedFileTree,
7
8
  resolveManagedDirectoryChain
8
- } from "./chunk-SEGJLWRE.mjs";
9
+ } from "./chunk-7HXQNBIG.mjs";
10
+
11
+ // src/cli/presenters/skills.ts
12
+ function presentPackagedSkillInventory(inventory, json = false) {
13
+ if (json) {
14
+ emitJson(inventory);
15
+ return;
16
+ }
17
+ console.log(` ${inventory.package.name}@${inventory.package.version}`);
18
+ console.log(` target: ${inventory.target}`);
19
+ for (const group of [
20
+ { heading: "Default suite Skills", kind: "default" },
21
+ { heading: "Optional project Skills", kind: "optional" }
22
+ ]) {
23
+ console.log("");
24
+ console.log(` ${group.heading}`);
25
+ const skills = inventory.skills.filter((skill) => skill.kind === group.kind);
26
+ if (skills.length === 0)
27
+ console.log(" none");
28
+ for (const skill of skills)
29
+ console.log(` ${skill.name} ${skill.status}`);
30
+ }
31
+ }
32
+ function presentSkillInstallResult(result, dryRun = false) {
33
+ const prefix = dryRun ? "would be " : "";
34
+ for (const status of ["installed", "unchanged", "replaced", "removed"]) {
35
+ if (result[status].length > 0)
36
+ console.log(` ${prefix}${status}: ${result[status].join(", ")}`);
37
+ }
38
+ }
9
39
 
10
40
  // src/commands/skills.ts
11
41
  import { randomUUID } from "crypto";
12
- import { lstatSync } from "fs";
42
+ import { lstatSync, realpathSync } from "fs";
13
43
  import { chmod, copyFile, mkdir, readdir, readFile, rename, rm } from "fs/promises";
14
44
  import { dirname, join, relative } from "path";
15
45
  var DEFAULT_PACKAGED_SKILL_NAMES = [
@@ -23,7 +53,8 @@ var DEFAULT_PACKAGED_SKILL_NAMES = [
23
53
  "rsp-resolve-findings",
24
54
  "rsp-review",
25
55
  "rsp-shape",
26
- "rsp-tdd"
56
+ "rsp-tdd",
57
+ "rsp-verify"
27
58
  ];
28
59
  var OBSOLETE_PACKAGED_SKILL_RENAMES = {
29
60
  "rsp-address-review": "rsp-resolve-findings",
@@ -111,6 +142,15 @@ function inspectInventoryTarget(path) {
111
142
  throw error;
112
143
  }
113
144
  }
145
+ function isCanonicalSourceProjection(sourceRoot, targetRoot) {
146
+ try {
147
+ if (!lstatSync(targetRoot).isSymbolicLink())
148
+ return false;
149
+ return realpathSync(targetRoot) === realpathSync(sourceRoot);
150
+ } catch {
151
+ return false;
152
+ }
153
+ }
114
154
  async function treesEqual(source, targetRoot) {
115
155
  const target = await inspectManagedFileTree(targetRoot, `installed Skill ${source.name}`);
116
156
  if (target.issues.length > 0)
@@ -152,7 +192,7 @@ async function inspectPackagedSkillInventory(options = {}) {
152
192
  skills.push({
153
193
  name: skill.name,
154
194
  kind: defaults.has(skill.name) ? "default" : "optional",
155
- status: targetStatus === "missing" ? "missing" : targetStatus === "divergent" ? "divergent" : await treesEqual(skill, target) ? "unchanged" : "divergent"
195
+ status: targetStatus === "missing" ? "missing" : targetStatus === "divergent" ? isCanonicalSourceProjection(skill.root, target) ? "unchanged" : "divergent" : await treesEqual(skill, target) ? "unchanged" : "divergent"
156
196
  });
157
197
  }
158
198
  return {
@@ -161,22 +201,6 @@ async function inspectPackagedSkillInventory(options = {}) {
161
201
  skills
162
202
  };
163
203
  }
164
- function printPackagedSkillInventory(inventory) {
165
- console.log(` ${inventory.package.name}@${inventory.package.version}`);
166
- console.log(` target: ${inventory.target}`);
167
- for (const group of [
168
- { heading: "Default suite Skills", kind: "default" },
169
- { heading: "Optional project Skills", kind: "optional" }
170
- ]) {
171
- console.log("");
172
- console.log(` ${group.heading}`);
173
- const skills = inventory.skills.filter((skill) => skill.kind === group.kind);
174
- if (skills.length === 0)
175
- console.log(" none");
176
- for (const skill of skills)
177
- console.log(` ${skill.name} ${skill.status}`);
178
- }
179
- }
180
204
  async function copySkillTree(source, targetRoot) {
181
205
  await mkdir(targetRoot, { recursive: true });
182
206
  for (const path of source.files) {
@@ -342,17 +366,10 @@ async function installPackagedSkills(args = {}, options = {}) {
342
366
  }
343
367
  return result;
344
368
  }
345
- function printSkillInstallResult(result, dryRun = false) {
346
- const prefix = dryRun ? "would be " : "";
347
- for (const status of ["installed", "unchanged", "replaced", "removed"]) {
348
- if (result[status].length > 0)
349
- console.log(` ${prefix}${status}: ${result[status].join(", ")}`);
350
- }
351
- }
352
369
 
353
370
  export {
371
+ presentPackagedSkillInventory,
372
+ presentSkillInstallResult,
354
373
  inspectPackagedSkillInventory,
355
- printPackagedSkillInventory,
356
- installPackagedSkills,
357
- printSkillInstallResult
374
+ installPackagedSkills
358
375
  };