@oevery/rsp 2.0.3 → 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 +25 -5
- package/README.zh-CN.md +25 -5
- package/bin/rsp.mjs +0 -0
- package/dist/cli.mjs +774 -180
- package/package.json +1 -1
- package/rules/rsp-rules.md +15 -19
- package/skills/rsp/SKILL.md +56 -93
package/package.json
CHANGED
package/rules/rsp-rules.md
CHANGED
|
@@ -9,16 +9,17 @@ This file is the canonical RSP rules source.
|
|
|
9
9
|
|
|
10
10
|
## Scope
|
|
11
11
|
|
|
12
|
-
-
|
|
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
13
|
- These rules are tool-agnostic and apply even when the agent does not support skills.
|
|
14
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.
|
|
15
16
|
|
|
16
17
|
## Read order
|
|
17
18
|
|
|
18
19
|
1. Read `AGENTS.md`.
|
|
19
20
|
2. Read `.rsp/rules/rsp-rules.md` in full.
|
|
20
21
|
3. Read `focus.d/`.
|
|
21
|
-
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.
|
|
22
23
|
5. Read each `changes/<name>.md` file marked in `focus.d/`.
|
|
23
24
|
6. Read `specs/design.md` and `specs/INDEX.md`.
|
|
24
25
|
`specs/INDEX.md` lists only additional spec files beyond `specs/design.md`.
|
|
@@ -33,8 +34,9 @@ This file is the canonical RSP rules source.
|
|
|
33
34
|
- Treat each change as a single `.md` file under `changes/`. Do not create multi-file change bundles or supplementary files alongside a change.
|
|
34
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".
|
|
35
36
|
- Keep every change file in the fixed six-section structure.
|
|
36
|
-
-
|
|
37
|
+
- Prefer an RSP command when it clearly covers deterministic setup, status, validation, repair, index, focus, or archive operations.
|
|
37
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.
|
|
38
40
|
- Do not treat `AGENTS.md` as the long-term rules or design store.
|
|
39
41
|
- Do not redefine the core change structure through project config.
|
|
40
42
|
|
|
@@ -54,17 +56,11 @@ This file is the canonical RSP rules source.
|
|
|
54
56
|
|
|
55
57
|
## Command rules
|
|
56
58
|
|
|
57
|
-
- Use
|
|
58
|
-
- Use `
|
|
59
|
-
- Use `
|
|
60
|
-
- Use `npx -y @oevery/rsp create <name>` to create an open change.
|
|
61
|
-
- Use `npx -y @oevery/rsp focus <name>` to foreground an existing open change.
|
|
62
|
-
- Use `npx -y @oevery/rsp unfocus <name>` to remove an open change from the current focus set.
|
|
63
|
-
- Use `npx -y @oevery/rsp archive <name>` to archive a completed change.
|
|
64
|
-
- Use `npx -y @oevery/rsp update` to refresh bundled rules, repair the managed `AGENTS.md` block, and rebuild generated indices.
|
|
65
|
-
- 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.
|
|
66
62
|
- If RTK is available, you may prefix RSP commands with `rtk`.
|
|
67
|
-
- Do not use `
|
|
63
|
+
- Do not use `rsp create <name>` to re-focus an existing change.
|
|
68
64
|
- Do not create RSP-managed files directly when an RSP command already exists for that file type.
|
|
69
65
|
|
|
70
66
|
## Change rules
|
|
@@ -81,17 +77,17 @@ Every change file must contain:
|
|
|
81
77
|
|
|
82
78
|
Do not leave `kind` unresolved.
|
|
83
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
|
+
|
|
84
82
|
If a section does not apply, keep it and write `- none` or `- not needed: <reason>`.
|
|
85
83
|
|
|
86
84
|
## Archive gate
|
|
87
85
|
|
|
88
86
|
- `rsp archive <name>` never blocks. It warns but always completes the move.
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
- A durable update should contain stable facts only, not task history, debugging notes, or one-off implementation context.
|
|
94
|
-
- 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.
|
|
95
91
|
|
|
96
92
|
## Prohibitions
|
|
97
93
|
|
package/skills/rsp/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rsp
|
|
3
|
-
description: Use this skill when initializing RSP
|
|
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
4
|
compatibility:
|
|
5
5
|
agents:
|
|
6
6
|
- any agent that supports the Agent Skills format
|
|
@@ -17,83 +17,69 @@ metadata:
|
|
|
17
17
|
|
|
18
18
|
# RSP Skill
|
|
19
19
|
|
|
20
|
-
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.
|
|
21
21
|
|
|
22
|
-
This skill operationalizes
|
|
22
|
+
This skill operationalizes `.rsp/rules/rsp-rules.md`; it does not replace that canonical rules source.
|
|
23
23
|
|
|
24
24
|
Prefer exact file paths, exact commands, and exact durable facts over vague summaries.
|
|
25
25
|
|
|
26
26
|
## When to use
|
|
27
27
|
|
|
28
|
-
- Use
|
|
29
|
-
- Use
|
|
30
|
-
- Use this skill when the task is to audit or repair `.rsp/`, `AGENTS.md`, generated indices, or focus markers.
|
|
31
|
-
- Use this skill when deciding whether a completed change needs durable updates before archive.
|
|
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.
|
|
32
30
|
|
|
33
31
|
## When not to use
|
|
34
32
|
|
|
35
|
-
- Do not load
|
|
36
|
-
- Do not
|
|
37
|
-
- Do not
|
|
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.
|
|
38
37
|
|
|
39
|
-
##
|
|
38
|
+
## Workflows
|
|
40
39
|
|
|
41
|
-
###
|
|
40
|
+
### Setup or repair
|
|
42
41
|
|
|
43
|
-
1.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
5. Write durable architecture, boundaries, defaults, and constraints into `specs/design.md`.
|
|
52
|
-
6. Write stable local workflow or validation rules into `rules/project-rules.md` only when they are long-lived.
|
|
53
|
-
7. Run `npx -y @oevery/rsp doctor`.
|
|
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.
|
|
54
50
|
|
|
55
|
-
###
|
|
51
|
+
### Focused work
|
|
56
52
|
|
|
57
53
|
1. Follow the read order in `.rsp/rules/rsp-rules.md`.
|
|
58
|
-
2.
|
|
59
|
-
3.
|
|
60
|
-
4.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
## Trigger examples
|
|
79
|
-
|
|
80
|
-
- "Set up RSP in this repository."
|
|
81
|
-
- "Repair the broken .rsp state in this project."
|
|
82
|
-
- "Check whether this change needs spec or rule writeback before archive."
|
|
83
|
-
- "Audit the RSP setup and tell me what is missing."
|
|
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.
|
|
84
73
|
|
|
85
74
|
## Durable decision
|
|
86
75
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
1. Read the current change.
|
|
90
|
-
2. Read only the relevant `specs/` and `rules/` files.
|
|
91
|
-
3. Inspect code only if needed.
|
|
92
|
-
4. Return exactly one decision:
|
|
76
|
+
Return exactly one decision:
|
|
93
77
|
|
|
94
78
|
- `No durable update needed`
|
|
95
79
|
- `Update existing spec or rule`
|
|
96
|
-
- `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.
|
|
97
83
|
|
|
98
84
|
Write a durable update only when one of these is true:
|
|
99
85
|
|
|
@@ -102,39 +88,18 @@ Write a durable update only when one of these is true:
|
|
|
102
88
|
- future agents or developers would likely make mistakes without the fact
|
|
103
89
|
- the fact is worth rereading in later sessions as durable project knowledge
|
|
104
90
|
|
|
105
|
-
When unsure whether a fact is truly durable, prefer `No durable update needed` over speculative promotion.
|
|
106
|
-
|
|
107
|
-
Default to no spec writeback unless the change produced project-level durable knowledge that future work must reread.
|
|
108
|
-
|
|
109
|
-
Do not write these into `specs/` or `rules/`:
|
|
110
|
-
|
|
111
|
-
- temporary debugging history
|
|
112
|
-
- task-by-task execution notes
|
|
113
|
-
- one-off implementation context
|
|
114
|
-
- archive-only historical detail
|
|
115
|
-
- a catch-all summary file like `specs/changes.md`
|
|
116
|
-
|
|
117
91
|
Choose the smallest correct target:
|
|
118
92
|
|
|
119
|
-
- project-wide design, boundaries, defaults, and durable context ->
|
|
120
|
-
- stable local workflow or validation rules ->
|
|
121
|
-
- another durable rule set ->
|
|
122
|
-
- an additional reusable project-level spec ->
|
|
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`
|
|
123
97
|
|
|
124
|
-
|
|
98
|
+
Do not choose generated indexes or bundled `rules/rsp-rules.md` as ordinary durable writeback targets unless the task explicitly changes RSP itself.
|
|
125
99
|
|
|
126
|
-
|
|
100
|
+
Prefer `.rsp/specs/design.md` or an existing durable file before creating a new spec file.
|
|
127
101
|
|
|
128
|
-
|
|
129
|
-
- prefer concrete facts and boundaries over summaries like "implemented X" or "investigated Y"
|
|
130
|
-
- if you cannot identify a concrete durable target or concrete durable facts, do not invent them
|
|
131
|
-
|
|
132
|
-
Set archive readiness like this:
|
|
133
|
-
|
|
134
|
-
- If `Blockers` still contains a real blocker, set `Archive ready: no`.
|
|
135
|
-
- If a durable update is required but not yet written, set `Archive ready: no`.
|
|
136
|
-
- If no durable update is missing and the remaining `Verify` risk is consciously accepted, set `Archive ready: yes`.
|
|
137
|
-
- 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.
|
|
138
103
|
|
|
139
104
|
## Output template
|
|
140
105
|
|
|
@@ -151,17 +116,16 @@ Use this exact format:
|
|
|
151
116
|
- Archive ready: <yes | no>
|
|
152
117
|
```
|
|
153
118
|
|
|
154
|
-
|
|
119
|
+
Short example:
|
|
155
120
|
|
|
156
121
|
```md
|
|
157
122
|
## Durable Decision
|
|
158
123
|
- Decision: Update existing spec or rule
|
|
159
124
|
- Target: .rsp/specs/design.md
|
|
160
125
|
- Why:
|
|
161
|
-
- The change introduced a stable default
|
|
126
|
+
- The change introduced a stable default that future agents must follow.
|
|
162
127
|
- Facts to write:
|
|
163
128
|
- Default API retries are capped at 3 attempts.
|
|
164
|
-
- Background sync stops retrying after a permanent authentication failure.
|
|
165
129
|
- Archive ready: no
|
|
166
130
|
```
|
|
167
131
|
|
|
@@ -169,8 +133,7 @@ Rules for the output:
|
|
|
169
133
|
|
|
170
134
|
- `Target` must be a concrete file path when the decision is not `No durable update needed`.
|
|
171
135
|
- `Facts to write` must contain durable facts, not task history or debugging notes.
|
|
172
|
-
- If
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
- 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.
|