@oevery/rsp 3.1.1 → 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.
- package/README.md +4 -3
- package/README.zh-CN.md +3 -2
- package/dist/{chunk-WJXKLLIF.mjs → chunk-7HXQNBIG.mjs} +447 -734
- package/dist/{chunk-3Z4IO2TD.mjs → chunk-QM2UVPQK.mjs} +47 -30
- package/dist/{chunk-MUNLLVVH.mjs → chunk-TSUDEX5Y.mjs} +1205 -117
- package/dist/cli.mjs +5336 -3045
- package/dist/entry-GIDNR7CJ.mjs +1846 -0
- package/dist/{entry-KAWA2AS4.mjs → entry-YAW3PYFA.mjs} +4 -4
- package/package.json +12 -7
- package/rules/rsp-rules.md +30 -58
- package/skills/rsp/SKILL.md +28 -45
- package/skills/rsp/references/control-outcome.md +31 -0
- package/skills/rsp/references/durable-review.md +23 -4
- package/skills/rsp/references/focus-continuation.md +9 -0
- package/skills/rsp/references/implementation-evidence.md +12 -0
- package/skills/rsp/references/managed-routing.md +23 -18
- package/skills/rsp/references/response-language.md +11 -0
- package/skills/rsp/references/setup-repair.md +3 -3
- package/skills/rsp-commit/SKILL.md +26 -9
- package/skills/rsp-design/SKILL.md +1 -1
- package/skills/rsp-diagnose/SKILL.md +4 -2
- package/skills/rsp-implement/SKILL.md +18 -6
- package/skills/rsp-manage/SKILL.md +61 -37
- package/skills/rsp-manage/references/closeout.md +13 -0
- package/skills/rsp-manage/references/delegation.md +47 -0
- package/skills/rsp-manage/references/interruption-recovery.md +19 -0
- package/skills/rsp-manage/references/review-convergence.md +9 -0
- package/skills/rsp-release-docs/SKILL.md +15 -13
- package/skills/rsp-release-docs/references/publication-lifecycle.md +4 -0
- package/skills/rsp-resolve-findings/SKILL.md +3 -3
- package/skills/rsp-review/SKILL.md +10 -36
- package/skills/rsp-review/references/code-review.md +15 -0
- package/skills/rsp-review/references/document-review.md +15 -0
- package/skills/rsp-shape/SKILL.md +14 -4
- package/skills/rsp-shape/references/deep-clarification.md +2 -0
- package/skills/rsp-structural-audit/SKILL.md +1 -1
- package/skills/rsp-tdd/SKILL.md +11 -3
- package/skills/rsp-verify/SKILL.md +40 -0
- package/dist/entry-IPHJBI53.mjs +0 -882
- 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-
|
|
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 lifecycle 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
|
-
|
|
356
|
-
installPackagedSkills,
|
|
357
|
-
printSkillInstallResult
|
|
374
|
+
installPackagedSkills
|
|
358
375
|
};
|