@oevery/rsp 2.0.0 → 2.0.2
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 +9 -2
- package/README.zh-CN.md +9 -2
- package/dist/cli.mjs +13 -6
- package/package.json +1 -1
- package/rules/rsp-rules.md +1 -0
- package/skills/rsp/SKILL.md +1 -0
package/README.md
CHANGED
|
@@ -55,11 +55,12 @@ npx -y @oevery/rsp doctor
|
|
|
55
55
|
## File ownership
|
|
56
56
|
|
|
57
57
|
- `AGENTS.md`: only the `<!-- rsp:begin --> ... <!-- rsp:end -->` block is managed by RSP.
|
|
58
|
-
- `.rsp/specs/INDEX.md`: auto-generated. Rebuild with `rsp update`.
|
|
58
|
+
- `.rsp/specs/INDEX.md`: auto-generated index of additional spec files beyond `design.md`. Rebuild with `rsp update`.
|
|
59
59
|
- `.rsp/archives/INDEX.md`: auto-generated. Rebuild with `rsp update`.
|
|
60
60
|
- `.rsp/specs/design.md`: created by `rsp init`, then owned by the project.
|
|
61
61
|
- `.rsp/rules/project-rules.md`: optional; create only when the project has durable local rules.
|
|
62
62
|
- Keep durable architecture, boundaries, and cross-cutting technical constraints in `.rsp/specs/design.md`.
|
|
63
|
+
- Treat `.rsp/specs/INDEX.md` as a directory for additional spec files; it does not list `design.md`.
|
|
63
64
|
- Keep stable workflow rules, validation expectations, and local operating constraints in `.rsp/rules/project-rules.md`.
|
|
64
65
|
|
|
65
66
|
## AGENTS integration
|
|
@@ -111,11 +112,17 @@ When this README shows `rsp <command>`, it assumes the command is already availa
|
|
|
111
112
|
Example optional installation flow:
|
|
112
113
|
|
|
113
114
|
```bash
|
|
114
|
-
npx skills add oevery/rsp
|
|
115
|
+
npx skills add oevery/rsp
|
|
115
116
|
```
|
|
116
117
|
|
|
117
118
|
This repository publishes a skill named `rsp` under `skills/rsp/`.
|
|
118
119
|
|
|
120
|
+
`rsp update` refreshes project-local RSP files only. If you use the published RSP skill, refresh it separately after upgrading:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
npx skills add oevery/rsp
|
|
124
|
+
```
|
|
125
|
+
|
|
119
126
|
## Work Model
|
|
120
127
|
|
|
121
128
|
```text
|
package/README.zh-CN.md
CHANGED
|
@@ -55,11 +55,12 @@ npx -y @oevery/rsp doctor
|
|
|
55
55
|
## 文件所有权
|
|
56
56
|
|
|
57
57
|
- `AGENTS.md`:只有 `<!-- rsp:begin --> ... <!-- rsp:end -->` 受管块由 RSP 维护。
|
|
58
|
-
- `.rsp/specs/INDEX.md
|
|
58
|
+
- `.rsp/specs/INDEX.md`:自动生成,用于索引 `design.md` 之外的附加 spec 文件;使用 `rsp update` 重建。
|
|
59
59
|
- `.rsp/archives/INDEX.md`:自动生成,使用 `rsp update` 重建。
|
|
60
60
|
- `.rsp/specs/design.md`:由 `rsp init` 创建,之后由项目维护。
|
|
61
61
|
- `.rsp/rules/project-rules.md`:可选,仅在项目确有长期本地规则时创建。
|
|
62
62
|
- 将长期架构、边界和跨模块技术约束放在 `.rsp/specs/design.md`。
|
|
63
|
+
- 将 `.rsp/specs/INDEX.md` 视为附加 spec 的目录;它不列出 `design.md`。
|
|
63
64
|
- 将稳定的工作流规则、验证要求和本地运行约束放在 `.rsp/rules/project-rules.md`。
|
|
64
65
|
|
|
65
66
|
## AGENTS 接入
|
|
@@ -105,11 +106,17 @@ Read in order:
|
|
|
105
106
|
可选安装示例:
|
|
106
107
|
|
|
107
108
|
```bash
|
|
108
|
-
npx skills add oevery/rsp
|
|
109
|
+
npx skills add oevery/rsp
|
|
109
110
|
```
|
|
110
111
|
|
|
111
112
|
本仓库发布了一个名为 `rsp` 的 skill,位于 `skills/rsp/`。
|
|
112
113
|
|
|
114
|
+
`rsp update` 只会刷新项目内的 RSP 文件。如果你在使用发布出来的 RSP skill,升级后还需要单独刷新一次:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
npx skills add oevery/rsp
|
|
118
|
+
```
|
|
119
|
+
|
|
113
120
|
## 工作模型
|
|
114
121
|
|
|
115
122
|
```text
|
package/dist/cli.mjs
CHANGED
|
@@ -632,14 +632,17 @@ async function buildSpecsIndex({ acquireLock = true } = {}) {
|
|
|
632
632
|
`);
|
|
633
633
|
return;
|
|
634
634
|
}
|
|
635
|
-
const specFiles = (await walkMarkdownFiles(specsDir)).filter((fp) =>
|
|
635
|
+
const specFiles = (await walkMarkdownFiles(specsDir)).filter((fp) => {
|
|
636
|
+
const name = basename2(fp);
|
|
637
|
+
return name !== "INDEX.md" && name !== "design.md";
|
|
638
|
+
}).sort();
|
|
636
639
|
const lines = [];
|
|
637
640
|
lines.push("# Specs Index");
|
|
638
641
|
lines.push("");
|
|
639
|
-
lines.push("
|
|
642
|
+
lines.push("_Additional project-level specs beyond `design.md`._");
|
|
640
643
|
lines.push("");
|
|
641
644
|
if (specFiles.length === 0) {
|
|
642
|
-
lines.push("_No project-level specs yet._");
|
|
645
|
+
lines.push("_No additional project-level specs yet._");
|
|
643
646
|
} else {
|
|
644
647
|
lines.push("| File | Title | Summary |");
|
|
645
648
|
lines.push("|------|-------|---------|");
|
|
@@ -1515,7 +1518,7 @@ async function initProject(args = {}) {
|
|
|
1515
1518
|
const bundledRules = await readFile9(join12(PKG_ROOT, "rules", "rsp-rules.md"), "utf-8");
|
|
1516
1519
|
created = await ensureFile(join12(RSP_DIR, "rules", "rsp-rules.md"), bundledRules) || created;
|
|
1517
1520
|
created = await ensureFile(join12(RSP_DIR, "config.yaml"), generateConfigTemplate()) || created;
|
|
1518
|
-
const createdSpecsIndex = await ensureFile(join12(RSP_DIR, "specs", "INDEX.md"), "# Specs Index\n\
|
|
1521
|
+
const createdSpecsIndex = await ensureFile(join12(RSP_DIR, "specs", "INDEX.md"), "# Specs Index\n\n_Additional project-level specs beyond `design.md`._\n");
|
|
1519
1522
|
created = createdSpecsIndex || created;
|
|
1520
1523
|
const createdDesign = await ensureFile(join12(RSP_DIR, "specs", "design.md"), generateDesignContent(projectName));
|
|
1521
1524
|
created = createdDesign || created;
|
|
@@ -1816,6 +1819,7 @@ function printArchiveTrend(trend) {
|
|
|
1816
1819
|
import { existsSync as existsSync14 } from "fs";
|
|
1817
1820
|
import { mkdir as mkdir8, readFile as readFile11, writeFile as writeFile9 } from "fs/promises";
|
|
1818
1821
|
import { join as join14 } from "path";
|
|
1822
|
+
var SKILL_REFRESH_HINT = " Note: if you use the published RSP skill, refresh it too:\n npx skills add oevery/rsp\n";
|
|
1819
1823
|
async function updateProject() {
|
|
1820
1824
|
if (!existsSync14(RSP_DIR)) {
|
|
1821
1825
|
console.log(` ${pc.red("Error:")} RSP is not initialized. Run: rsp init`);
|
|
@@ -1845,12 +1849,15 @@ async function updateProject() {
|
|
|
1845
1849
|
}
|
|
1846
1850
|
await buildSpecsIndex({ acquireLock: false });
|
|
1847
1851
|
await buildArchiveIndex({ acquireLock: false });
|
|
1848
|
-
if (!updated)
|
|
1852
|
+
if (!updated) {
|
|
1849
1853
|
console.log(` ${pc.dim("Already up to date.")}
|
|
1850
1854
|
`);
|
|
1851
|
-
|
|
1855
|
+
console.log(SKILL_REFRESH_HINT);
|
|
1856
|
+
} else {
|
|
1852
1857
|
console.log(` ${pc.green("Update complete.")}
|
|
1853
1858
|
`);
|
|
1859
|
+
console.log(SKILL_REFRESH_HINT);
|
|
1860
|
+
}
|
|
1854
1861
|
});
|
|
1855
1862
|
}
|
|
1856
1863
|
|
package/package.json
CHANGED
package/rules/rsp-rules.md
CHANGED
|
@@ -15,6 +15,7 @@ This file is the canonical RSP rules source.
|
|
|
15
15
|
4. If `focus.d/` is empty, ask the user what to work on or suggest `npx -y @oevery/rsp create <name>`.
|
|
16
16
|
5. Read each `changes/<name>.md` file marked in `focus.d/`.
|
|
17
17
|
6. Read `specs/design.md` and `specs/INDEX.md`.
|
|
18
|
+
`specs/INDEX.md` lists only additional spec files beyond `specs/design.md`.
|
|
18
19
|
7. Read only the relevant additional `rules/` and `specs/` files.
|
|
19
20
|
|
|
20
21
|
## Core rules
|
package/skills/rsp/SKILL.md
CHANGED
|
@@ -40,6 +40,7 @@ Prefer exact file paths, exact commands, and exact durable facts over vague summ
|
|
|
40
40
|
2. Check that `AGENTS.md` contains the managed RSP block.
|
|
41
41
|
3. Check that `specs/design.md` exists.
|
|
42
42
|
4. Check that `specs/INDEX.md` and `archives/INDEX.md` are still generated files.
|
|
43
|
+
`specs/INDEX.md` should list only additional spec files beyond `specs/design.md`.
|
|
43
44
|
5. Check that `focus.d/` markers and `changes/` files are in sync.
|
|
44
45
|
6. If generated indices or the managed AGENTS block drift, run `npx -y @oevery/rsp update`.
|
|
45
46
|
|