@oevery/rsp 2.0.2 → 2.0.4
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 +30 -4
- package/README.zh-CN.md +30 -4
- package/bin/rsp.mjs +0 -0
- package/dist/cli.mjs +863 -204
- package/package.json +1 -1
- package/rules/rsp-rules.md +20 -18
- package/skills/rsp/SKILL.md +73 -72
package/package.json
CHANGED
package/rules/rsp-rules.md
CHANGED
|
@@ -7,12 +7,19 @@ description: Core RSP rules for Rules, Specs, and Plans driven development.
|
|
|
7
7
|
|
|
8
8
|
This file is the canonical RSP rules source.
|
|
9
9
|
|
|
10
|
+
## Scope
|
|
11
|
+
|
|
12
|
+
- RSP directory paths such as `changes/`, `focus.d/`, `specs/`, and `rules/` are relative to `.rsp/`; project-root files such as `AGENTS.md` are named explicitly.
|
|
13
|
+
- These rules are tool-agnostic and apply even when the agent does not support skills.
|
|
14
|
+
- If the agent supports Agent Skills, load the `rsp` skill for initialization, audit or repair, and durable-decision tasks.
|
|
15
|
+
- Keep this file compact because it is the always-read canonical truth source; put operational procedure in the RSP skill and explanatory detail in README or design docs.
|
|
16
|
+
|
|
10
17
|
## Read order
|
|
11
18
|
|
|
12
19
|
1. Read `AGENTS.md`.
|
|
13
20
|
2. Read `.rsp/rules/rsp-rules.md` in full.
|
|
14
21
|
3. Read `focus.d/`.
|
|
15
|
-
4. If `focus.d/` is empty
|
|
22
|
+
4. If `focus.d/` is empty and the user has not provided a concrete task, ask what to work on or suggest `npx -y @oevery/rsp create <name>` for tracked work.
|
|
16
23
|
5. Read each `changes/<name>.md` file marked in `focus.d/`.
|
|
17
24
|
6. Read `specs/design.md` and `specs/INDEX.md`.
|
|
18
25
|
`specs/INDEX.md` lists only additional spec files beyond `specs/design.md`.
|
|
@@ -27,8 +34,9 @@ This file is the canonical RSP rules source.
|
|
|
27
34
|
- Treat each change as a single `.md` file under `changes/`. Do not create multi-file change bundles or supplementary files alongside a change.
|
|
28
35
|
- RSP uses only two lifecycle states: `open` (in `changes/`) and `archived` (in `archives/`). Do not introduce intermediate states such as "in review" or "verified".
|
|
29
36
|
- Keep every change file in the fixed six-section structure.
|
|
30
|
-
-
|
|
37
|
+
- Prefer an RSP command when it clearly covers deterministic setup, status, validation, repair, index, focus, or archive operations.
|
|
31
38
|
- Do not infer current work from `changes/` alone.
|
|
39
|
+
- When no focus exists, status and show commands may suggest next actions, but they must not infer current work from open changes.
|
|
32
40
|
- Do not treat `AGENTS.md` as the long-term rules or design store.
|
|
33
41
|
- Do not redefine the core change structure through project config.
|
|
34
42
|
|
|
@@ -48,17 +56,11 @@ This file is the canonical RSP rules source.
|
|
|
48
56
|
|
|
49
57
|
## Command rules
|
|
50
58
|
|
|
51
|
-
- Use
|
|
52
|
-
- Use `
|
|
53
|
-
- Use `
|
|
54
|
-
- Use `npx -y @oevery/rsp create <name>` to create an open change.
|
|
55
|
-
- Use `npx -y @oevery/rsp focus <name>` to foreground an existing open change.
|
|
56
|
-
- Use `npx -y @oevery/rsp unfocus <name>` to remove an open change from the current focus set.
|
|
57
|
-
- Use `npx -y @oevery/rsp archive <name>` to archive a completed change.
|
|
58
|
-
- Use `npx -y @oevery/rsp update` to refresh bundled rules, repair the managed `AGENTS.md` block, and rebuild generated indices.
|
|
59
|
-
- Use `npx -y @oevery/rsp doctor` for diagnostics only.
|
|
59
|
+
- Use RSP commands for deterministic setup, status, validation, repair, index, focus, and archive operations.
|
|
60
|
+
- Use `rsp create` only for explicitly tracked open work; use `rsp create --lite` only when that tracked work is small and straightforward.
|
|
61
|
+
- Use `rsp doctor --fix` only for safe deterministic repairs. Treat `fixed` output entries as actual filesystem changes, not attempted checks.
|
|
60
62
|
- If RTK is available, you may prefix RSP commands with `rtk`.
|
|
61
|
-
- Do not use `
|
|
63
|
+
- Do not use `rsp create <name>` to re-focus an existing change.
|
|
62
64
|
- Do not create RSP-managed files directly when an RSP command already exists for that file type.
|
|
63
65
|
|
|
64
66
|
## Change rules
|
|
@@ -75,17 +77,17 @@ Every change file must contain:
|
|
|
75
77
|
|
|
76
78
|
Do not leave `kind` unresolved.
|
|
77
79
|
|
|
80
|
+
Do not leave built-in template placeholders or unresolved clarification markers in a change once the details are known. `rsp check` reports these as warnings because they are deterministic hygiene signals, not semantic archive decisions.
|
|
81
|
+
|
|
78
82
|
If a section does not apply, keep it and write `- none` or `- not needed: <reason>`.
|
|
79
83
|
|
|
80
84
|
## Archive gate
|
|
81
85
|
|
|
82
86
|
- `rsp archive <name>` never blocks. It warns but always completes the move.
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
- A durable update should contain stable facts only, not task history, debugging notes, or one-off implementation context.
|
|
88
|
-
- Default to no spec writeback unless the change produced project-level durable knowledge that future work must reread.
|
|
87
|
+
- `rsp ready` and `rsp show` expose deterministic readiness and advisory durable-review guidance; they never perform spec or rule writeback.
|
|
88
|
+
- Make a durable-update decision before archive. Set `Archive ready: no` when real blockers remain or required durable updates are missing.
|
|
89
|
+
- Change `Spec` delta markers (`### ADDED`, `### MODIFIED`, `### REMOVED`) are planning aids only and are never auto-merged.
|
|
90
|
+
- Durable updates should contain stable facts only. Default to no spec writeback unless future work must reread the fact.
|
|
89
91
|
|
|
90
92
|
## Prohibitions
|
|
91
93
|
|
package/skills/rsp/SKILL.md
CHANGED
|
@@ -1,61 +1,85 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rsp
|
|
3
|
-
description: Use this skill when
|
|
3
|
+
description: Use this skill when initializing RSP, operating an existing .rsp project, auditing or repairing .rsp state, or deciding whether a change needs durable updates before archive.
|
|
4
|
+
compatibility:
|
|
5
|
+
agents:
|
|
6
|
+
- any agent that supports the Agent Skills format
|
|
7
|
+
requirements:
|
|
8
|
+
- Node.js 18+
|
|
9
|
+
- local filesystem read/write access
|
|
10
|
+
- shell access for `rsp` or `npx -y @oevery/rsp`
|
|
11
|
+
optional_requirements:
|
|
12
|
+
- network access for first-run `npx` installation or skill refresh
|
|
13
|
+
metadata:
|
|
14
|
+
author: oevery
|
|
15
|
+
version: 2.0.3
|
|
4
16
|
---
|
|
5
17
|
|
|
6
18
|
# RSP Skill
|
|
7
19
|
|
|
8
|
-
Load this skill when you need to initialize RSP, operate
|
|
20
|
+
Load this skill when you need to initialize RSP, operate `.rsp/`, audit or repair RSP state, or make a durable-update decision before archive.
|
|
9
21
|
|
|
10
|
-
This skill operationalizes
|
|
22
|
+
This skill operationalizes `.rsp/rules/rsp-rules.md`; it does not replace that canonical rules source.
|
|
11
23
|
|
|
12
24
|
Prefer exact file paths, exact commands, and exact durable facts over vague summaries.
|
|
13
25
|
|
|
14
|
-
##
|
|
26
|
+
## When to use
|
|
15
27
|
|
|
16
|
-
|
|
28
|
+
- Use for RSP setup, repair, focused RSP work, and pre-archive durable decisions.
|
|
29
|
+
- Use when a user explicitly asks to adopt, inspect, or operate the RSP workflow.
|
|
17
30
|
|
|
18
|
-
|
|
19
|
-
- `npx -y @oevery/rsp init --agents-mode managed`
|
|
20
|
-
- `npx -y @oevery/rsp init --agents-mode print`
|
|
21
|
-
- `npx -y @oevery/rsp init --with-project-setup --agents-mode managed`
|
|
22
|
-
- `npx -y @oevery/rsp init --with-project-setup --agents-mode print`
|
|
23
|
-
2. If the repository still needs an explicit bootstrap change and you did not use `--with-project-setup`, run `npx -y @oevery/rsp create project-setup`.
|
|
24
|
-
3. Fill `changes/project-setup.md`.
|
|
25
|
-
4. Set an explicit `kind` in the change frontmatter.
|
|
26
|
-
5. Write durable architecture, boundaries, defaults, and constraints into `specs/design.md`.
|
|
27
|
-
6. Write stable local workflow or validation rules into `rules/project-rules.md` only when they are long-lived.
|
|
28
|
-
7. Run `npx -y @oevery/rsp doctor`.
|
|
31
|
+
## When not to use
|
|
29
32
|
|
|
30
|
-
|
|
33
|
+
- Do not load for general coding tasks unrelated to `.rsp/`.
|
|
34
|
+
- Do not load when the repository does not use RSP and the user did not ask to adopt it.
|
|
35
|
+
- Do not create an RSP change for a simple current-session task unless the user explicitly wants RSP tracking.
|
|
36
|
+
- Do not use this skill as a substitute for reading `.rsp/rules/rsp-rules.md` during focused RSP work.
|
|
31
37
|
|
|
32
|
-
|
|
33
|
-
2. If a focused change is missing an explicit `kind`, repair the frontmatter before continuing.
|
|
34
|
-
3. If an existing open change should become current work, use `npx -y @oevery/rsp focus <name>`.
|
|
35
|
-
4. Do not treat unfocused files in `changes/` as current work unless the user explicitly asks for them or you first run `npx -y @oevery/rsp focus <name>`.
|
|
38
|
+
## Workflows
|
|
36
39
|
|
|
37
|
-
###
|
|
40
|
+
### Setup or repair
|
|
38
41
|
|
|
39
|
-
1.
|
|
40
|
-
2.
|
|
41
|
-
3.
|
|
42
|
-
4.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
1. Initialize with `npx -y @oevery/rsp init [--agents-mode managed|print] [--with-project-setup]`.
|
|
43
|
+
2. `--with-project-setup` creates and focuses `changes/project-setup.md`; otherwise create it with `npx -y @oevery/rsp create project-setup` only when explicit bootstrap tracking is still needed.
|
|
44
|
+
3. Fill the bootstrap change if it exists, then write durable architecture facts to `.rsp/specs/design.md` and stable local workflow rules to `.rsp/rules/project-rules.md` only when they are long-lived.
|
|
45
|
+
4. For diagnostics, run `npx -y @oevery/rsp doctor`.
|
|
46
|
+
5. For safe deterministic repairs, run `npx -y @oevery/rsp doctor --fix` or `npx -y @oevery/rsp update`.
|
|
47
|
+
6. When auditing manually, verify `.rsp/` exists, `AGENTS.md` has the managed block, `specs/design.md` exists, generated indexes are intact, and `focus.d/` markers match `changes/` files.
|
|
48
|
+
7. Treat `doctor --fix` `fixed` entries as actual filesystem changes. An empty `fixed` array or `No safe fixes needed.` means the repair pass changed nothing.
|
|
49
|
+
8. Do not use repair commands for semantic decisions such as stale focus removal, durable updates, or archive readiness.
|
|
46
50
|
|
|
47
|
-
|
|
51
|
+
### Focused work
|
|
52
|
+
|
|
53
|
+
1. Follow the read order in `.rsp/rules/rsp-rules.md`.
|
|
54
|
+
2. Treat only `focus.d/` markers as current RSP work; do not treat unfocused files in `changes/` as current work unless the user explicitly asks or you run `npx -y @oevery/rsp focus <name>`.
|
|
55
|
+
3. Read the focused change before editing code.
|
|
56
|
+
4. If a focused change is missing an explicit `kind`, repair the frontmatter before continuing.
|
|
57
|
+
5. Run `npx -y @oevery/rsp check --focused` before treating focused work as ready; resolve placeholder or clarification warnings when they represent real unfinished content.
|
|
58
|
+
6. Treat `rsp check` warnings as deterministic hygiene signals, not as the durable-update decision.
|
|
59
|
+
7. Use `npx -y @oevery/rsp create <name> --lite` only when the user explicitly wants RSP tracking for a small, straightforward change.
|
|
60
|
+
8. Convert actionable `## Tasks` checkboxes into your agent-local task tracker when one is available.
|
|
61
|
+
9. Keep implementation sequential by default; parallelize only independent read-only discovery or mechanical checks.
|
|
62
|
+
10. Update `## Tasks`, `## Verify`, and any invalidated `## Proposal`, `## Spec`, or `## Design` content in the same working session as implementation facts change.
|
|
63
|
+
11. Keep temporary debugging notes, task history, and command transcripts out of `specs/` and `rules/`.
|
|
64
|
+
|
|
65
|
+
### Pre-archive durable decision
|
|
66
|
+
|
|
67
|
+
1. Run `npx -y @oevery/rsp check --focused` for focused work, or `npx -y @oevery/rsp check` when reviewing all open changes.
|
|
68
|
+
2. Run `npx -y @oevery/rsp show --focused --json` or `npx -y @oevery/rsp ready <name> --json` to collect readiness, warnings, context paths, and `durableReview` guidance.
|
|
69
|
+
3. Treat `durableReview.candidateTargets` as advisory context for likely writable durable files, not as permission to edit generated indexes or bundled core rules.
|
|
70
|
+
4. Treat `Spec` delta markers (`### ADDED`, `### MODIFIED`, `### REMOVED`) as planning aids only; do not merge them automatically.
|
|
71
|
+
5. Read only the current change plus relevant `specs/`, `rules/`, and code files needed for the semantic decision.
|
|
72
|
+
6. Produce the durable decision output before archiving.
|
|
48
73
|
|
|
49
|
-
|
|
74
|
+
## Durable decision
|
|
50
75
|
|
|
51
|
-
|
|
52
|
-
2. Read only the relevant `specs/` and `rules/` files.
|
|
53
|
-
3. Inspect code only if needed.
|
|
54
|
-
4. Return exactly one decision:
|
|
76
|
+
Return exactly one decision:
|
|
55
77
|
|
|
56
78
|
- `No durable update needed`
|
|
57
79
|
- `Update existing spec or rule`
|
|
58
|
-
- `Create a new durable spec` only when the knowledge is
|
|
80
|
+
- `Create a new durable spec` only when the knowledge is project-level, reusable, and does not fit `specs/design.md`, an existing spec, or a rule file
|
|
81
|
+
|
|
82
|
+
Prefer `No durable update needed` when no concrete stable fact is worth rereading in future sessions.
|
|
59
83
|
|
|
60
84
|
Write a durable update only when one of these is true:
|
|
61
85
|
|
|
@@ -64,39 +88,18 @@ Write a durable update only when one of these is true:
|
|
|
64
88
|
- future agents or developers would likely make mistakes without the fact
|
|
65
89
|
- the fact is worth rereading in later sessions as durable project knowledge
|
|
66
90
|
|
|
67
|
-
When unsure whether a fact is truly durable, prefer `No durable update needed` over speculative promotion.
|
|
68
|
-
|
|
69
|
-
Default to no spec writeback unless the change produced project-level durable knowledge that future work must reread.
|
|
70
|
-
|
|
71
|
-
Do not write these into `specs/` or `rules/`:
|
|
72
|
-
|
|
73
|
-
- temporary debugging history
|
|
74
|
-
- task-by-task execution notes
|
|
75
|
-
- one-off implementation context
|
|
76
|
-
- archive-only historical detail
|
|
77
|
-
- a catch-all summary file like `specs/changes.md`
|
|
78
|
-
|
|
79
91
|
Choose the smallest correct target:
|
|
80
92
|
|
|
81
|
-
- project-wide design, boundaries, defaults, and durable context ->
|
|
82
|
-
- stable local workflow or validation rules ->
|
|
83
|
-
- another durable rule set ->
|
|
84
|
-
- an additional reusable project-level spec ->
|
|
85
|
-
|
|
86
|
-
Prefer `specs/design.md` or an existing durable file before creating a new spec file.
|
|
87
|
-
|
|
88
|
-
When writing the durable update:
|
|
93
|
+
- project-wide design, boundaries, defaults, and durable context -> `.rsp/specs/design.md`
|
|
94
|
+
- stable local workflow or validation rules -> `.rsp/rules/project-rules.md`
|
|
95
|
+
- another durable rule set -> `.rsp/rules/<name>.md`
|
|
96
|
+
- an additional reusable project-level spec -> `.rsp/specs/<name>.md`
|
|
89
97
|
|
|
90
|
-
-
|
|
91
|
-
- prefer concrete facts and boundaries over summaries like "implemented X" or "investigated Y"
|
|
92
|
-
- if you cannot identify a concrete durable target or concrete durable facts, do not invent them
|
|
98
|
+
Do not choose generated indexes or bundled `rules/rsp-rules.md` as ordinary durable writeback targets unless the task explicitly changes RSP itself.
|
|
93
99
|
|
|
94
|
-
|
|
100
|
+
Prefer `.rsp/specs/design.md` or an existing durable file before creating a new spec file.
|
|
95
101
|
|
|
96
|
-
- If
|
|
97
|
-
- If a durable update is required but not yet written, set `Archive ready: no`.
|
|
98
|
-
- If no durable update is missing and the remaining `Verify` risk is consciously accepted, set `Archive ready: yes`.
|
|
99
|
-
- Do not use CLI warning text as a substitute for semantic durable-update judgment.
|
|
102
|
+
Write stable facts, not narrative history, task-by-task notes, temporary debugging history, or archive-only detail. If you cannot identify concrete durable facts, do not invent them.
|
|
100
103
|
|
|
101
104
|
## Output template
|
|
102
105
|
|
|
@@ -113,17 +116,16 @@ Use this exact format:
|
|
|
113
116
|
- Archive ready: <yes | no>
|
|
114
117
|
```
|
|
115
118
|
|
|
116
|
-
|
|
119
|
+
Short example:
|
|
117
120
|
|
|
118
121
|
```md
|
|
119
122
|
## Durable Decision
|
|
120
123
|
- Decision: Update existing spec or rule
|
|
121
124
|
- Target: .rsp/specs/design.md
|
|
122
125
|
- Why:
|
|
123
|
-
- The change introduced a stable default
|
|
126
|
+
- The change introduced a stable default that future agents must follow.
|
|
124
127
|
- Facts to write:
|
|
125
128
|
- Default API retries are capped at 3 attempts.
|
|
126
|
-
- Background sync stops retrying after a permanent authentication failure.
|
|
127
129
|
- Archive ready: no
|
|
128
130
|
```
|
|
129
131
|
|
|
@@ -131,8 +133,7 @@ Rules for the output:
|
|
|
131
133
|
|
|
132
134
|
- `Target` must be a concrete file path when the decision is not `No durable update needed`.
|
|
133
135
|
- `Facts to write` must contain durable facts, not task history or debugging notes.
|
|
134
|
-
- If
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
- After rule or skill changes, prefer a fresh session and reread `AGENTS.md` plus `.rsp/rules/*.md`.
|
|
136
|
+
- If real blockers remain or a required durable update is not yet written, `Archive ready` must be `no`.
|
|
137
|
+
- If no durable update is missing and remaining verify risk is consciously accepted, `Archive ready` may be `yes`.
|
|
138
|
+
- Do not use CLI warning text as a substitute for semantic durable-update judgment.
|
|
139
|
+
- CLI `archiveReady: judgment` means the skill or a human must decide; it is not automatic approval.
|