@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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oevery/rsp",
3
3
  "type": "module",
4
- "version": "2.0.3",
4
+ "version": "2.0.4",
5
5
  "description": "RSP (Rules, Specs, Plans) workflow for lightweight AI-assisted change management",
6
6
  "author": "oevery",
7
7
  "license": "MIT",
@@ -9,16 +9,17 @@ This file is the canonical RSP rules source.
9
9
 
10
10
  ## Scope
11
11
 
12
- - Paths in this file are relative to the project root unless stated otherwise.
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, ask the user what to work on or suggest `npx -y @oevery/rsp create <name>`.
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
- - Use an RSP command first when an RSP command already covers the action.
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 `npx -y @oevery/rsp init` to scaffold the base RSP structure.
58
- - Use `npx -y @oevery/rsp add rules <name>` to create a durable rules file.
59
- - Use `npx -y @oevery/rsp add spec <name>` to create a durable spec file.
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 `npx -y @oevery/rsp create <name>` to re-focus an existing change.
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
- - Make a durable-update decision before `npx -y @oevery/rsp archive <name>`.
90
- - If `Blockers` still contains a real blocker, set `Archive ready: no`.
91
- - If the change produced durable knowledge that has not been written to `specs/` or `rules/`, set `Archive ready: no`.
92
- - If `Verify` is incomplete but there is no active blocker and no missing durable update, treat archive readiness as a judgment call.
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
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: rsp
3
- description: Use this skill when initializing RSP in a repository, operating an existing .rsp project, auditing or repairing .rsp state, or deciding whether a change needs durable updates before archive.
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 an existing RSP project, audit or repair `.rsp/`, or decide whether a change needs durable updates before archive.
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 the rules in `.rsp/rules/rsp-rules.md`. Always load and follow those rules first.
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 this skill when a repository already contains `.rsp/` and the task is to operate within that workflow.
29
- - Use this skill when adopting RSP in a repository that does not yet have `.rsp/`.
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 this skill for general coding tasks unrelated to `.rsp/`.
36
- - Do not use this skill as a substitute for reading `.rsp/rules/rsp-rules.md` during a focused RSP task.
37
- - Do not use this skill when the repository does not use RSP and the user did not ask to adopt it.
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
- ## Workflow
38
+ ## Workflows
40
39
 
41
- ### Adopt or initialize
40
+ ### Setup or repair
42
41
 
43
- 1. Use one of these commands:
44
- - `npx -y @oevery/rsp init --agents-mode managed`
45
- - `npx -y @oevery/rsp init --agents-mode print`
46
- - `npx -y @oevery/rsp init --with-project-setup --agents-mode managed`
47
- - `npx -y @oevery/rsp init --with-project-setup --agents-mode print`
48
- 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`.
49
- 3. Fill `changes/project-setup.md`.
50
- 4. Set an explicit `kind` in the change frontmatter.
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
- ### Operate an existing project
51
+ ### Focused work
56
52
 
57
53
  1. Follow the read order in `.rsp/rules/rsp-rules.md`.
58
- 2. If a focused change is missing an explicit `kind`, repair the frontmatter before continuing.
59
- 3. If an existing open change should become current work, use `npx -y @oevery/rsp focus <name>`.
60
- 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>`.
61
-
62
- ### Audit or repair
63
-
64
- 1. Check that `.rsp/` exists.
65
- 2. Check that `AGENTS.md` contains the managed RSP block.
66
- 3. Check that `specs/design.md` exists.
67
- 4. Check that `specs/INDEX.md` and `archives/INDEX.md` are still generated files.
68
- `specs/INDEX.md` should list only additional spec files beyond `specs/design.md`.
69
- 5. Check that `focus.d/` markers and `changes/` files are in sync.
70
- 6. If generated indices or the managed AGENTS block drift, run `npx -y @oevery/rsp update`.
71
-
72
- ## Expected outputs
73
-
74
- - exact file paths to read or update
75
- - exact RSP commands to run
76
- - a single durable-decision result in the required template when evaluating archive readiness
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
- Before `npx -y @oevery/rsp archive <name>`:
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 truly project-level, reusable, and does not fit `specs/design.md`, an existing spec, or a rule file
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 -> `specs/design.md`
120
- - stable local workflow or validation rules -> `rules/project-rules.md`
121
- - another durable rule set -> `rules/<name>.md`
122
- - an additional reusable project-level spec -> `specs/<name>.md`
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
- Prefer `specs/design.md` or an existing durable file before creating a new spec file.
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
- When writing the durable update:
100
+ Prefer `.rsp/specs/design.md` or an existing durable file before creating a new spec file.
127
101
 
128
- - write stable facts, not narrative history
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
- Minimal example:
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 and boundary that future work must follow.
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 the decision requires a durable update that is not yet written, `Archive ready` must be `no`.
173
-
174
- ## Refresh guidance
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.