@oevery/rsp 1.0.2 → 1.1.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 +105 -97
- package/README.zh-CN.md +105 -94
- package/bin/rsp.mjs +5 -0
- package/dist/cli.mjs +808 -254
- package/package.json +3 -2
- package/rules/rsp-rules.md +67 -92
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oevery/rsp",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0
|
|
4
|
+
"version": "1.1.0",
|
|
5
5
|
"description": "RSP (Rules, Specs, Plans) workflow for AI-assisted development",
|
|
6
6
|
"author": "oevery",
|
|
7
7
|
"license": "MIT",
|
|
@@ -21,9 +21,10 @@
|
|
|
21
21
|
"workflow"
|
|
22
22
|
],
|
|
23
23
|
"bin": {
|
|
24
|
-
"rsp": "
|
|
24
|
+
"rsp": "bin/rsp.mjs"
|
|
25
25
|
},
|
|
26
26
|
"files": [
|
|
27
|
+
"bin/",
|
|
27
28
|
"dist/",
|
|
28
29
|
"rules/"
|
|
29
30
|
],
|
package/rules/rsp-rules.md
CHANGED
|
@@ -1,123 +1,98 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rsp-rules
|
|
3
|
-
description: RSP rules for Rules,
|
|
3
|
+
description: Core RSP rules for Rules, Specs, and Plans driven development.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# RSP
|
|
7
7
|
|
|
8
8
|
RSP = Rules, Specs, Plans.
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Core structure
|
|
11
11
|
|
|
12
12
|
```text
|
|
13
13
|
.rsp/
|
|
14
|
-
├── rules/
|
|
15
|
-
├── specs/
|
|
16
|
-
├── features/
|
|
17
|
-
|
|
18
|
-
├──
|
|
19
|
-
|
|
20
|
-
├── archive/
|
|
21
|
-
│ ├── INDEX.md # auto-generated index
|
|
22
|
-
│ └── YYYY-MM-DD_<name>.md
|
|
14
|
+
├── rules/
|
|
15
|
+
├── specs/
|
|
16
|
+
├── features/
|
|
17
|
+
├── active.d/
|
|
18
|
+
├── archives/
|
|
19
|
+
└── config.yaml
|
|
23
20
|
```
|
|
24
21
|
|
|
25
|
-
##
|
|
22
|
+
## Managed boundaries
|
|
26
23
|
|
|
27
|
-
- `
|
|
28
|
-
-
|
|
29
|
-
- `
|
|
30
|
-
- `
|
|
24
|
+
- `AGENTS.md` is partially managed. RSP owns only the `<!-- rsp:begin --> ... <!-- rsp:end -->` block.
|
|
25
|
+
- `specs/INDEX.md` is auto-generated. Rebuild it with `rsp specs-index` instead of editing it manually.
|
|
26
|
+
- `archives/INDEX.md` is auto-generated. Rebuild it with `rsp archive-index` instead of editing it manually.
|
|
27
|
+
- `design.md` is created by `rsp init` and then owned by the project.
|
|
28
|
+
- `project-rules.md` is optional.
|
|
31
29
|
|
|
32
30
|
## Reading order
|
|
33
31
|
|
|
34
|
-
1. Read `
|
|
35
|
-
2.
|
|
36
|
-
3. If empty, ask the user or suggest `rsp new <name>`.
|
|
32
|
+
1. Read `AGENTS.md` for entrypoint guidance.
|
|
33
|
+
2. Read `active.d/` to find active features.
|
|
34
|
+
3. If `active.d/` is empty, ask the user what to work on or suggest `npx -y @oevery/rsp new <name>`.
|
|
37
35
|
4. Read the referenced `features/<name>.md`.
|
|
38
36
|
5. Read `rules/` for technical constraints.
|
|
39
|
-
6.
|
|
37
|
+
6. Read `specs/design.md` and other project-level specs only when relevant to the current task.
|
|
40
38
|
|
|
41
|
-
##
|
|
39
|
+
## File creation rules
|
|
42
40
|
|
|
43
|
-
|
|
41
|
+
- `specs/design.md`: create by default with `rsp init`.
|
|
42
|
+
- `rules/project-rules.md`: create only when the project has durable local rules worth preserving.
|
|
43
|
+
- `rules/<name>.md`: create only for other durable rule sets.
|
|
44
|
+
- `specs/<name>.md`: create only when the new document has durable project-level value and does not duplicate `design.md`.
|
|
45
|
+
- `features/<name>.md`: create only for active work that should be tracked as a feature.
|
|
46
|
+
- Do not create files merely for completeness.
|
|
44
47
|
|
|
45
|
-
##
|
|
48
|
+
## Command-first creation
|
|
46
49
|
|
|
47
|
-
|
|
50
|
+
- Prefer RSP commands over direct file creation when creating new RSP-managed files.
|
|
51
|
+
- Use `rsp init` to scaffold the base RSP structure.
|
|
52
|
+
- Use `rsp add rules <name>` to create new durable rules files under `rules/`.
|
|
53
|
+
- Use `rsp add spec <name>` to create new durable project-level spec files under `specs/`.
|
|
54
|
+
- Use `rsp new <name>` to create new feature files under `features/`.
|
|
55
|
+
- Use `rsp close <name>` to move completed work into `archives/`.
|
|
56
|
+
- Direct file creation is acceptable only when no RSP command covers the target file.
|
|
57
|
+
- After a file is created by command, edit its contents in place as needed.
|
|
48
58
|
|
|
49
|
-
|
|
50
|
-
- `[/]` = in progress.
|
|
51
|
-
- `[-]` = dropped.
|
|
52
|
-
- `[x]` = done and verified.
|
|
53
|
-
- Use `[/]` to signal active ownership.
|
|
54
|
-
- Use `[x]` only after validation.
|
|
59
|
+
## Feature requirements
|
|
55
60
|
|
|
56
|
-
|
|
61
|
+
Every feature file should contain these sections:
|
|
57
62
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
depends-on: # optional: features this depends on
|
|
63
|
-
- <other-feature-name>
|
|
64
|
-
tags: # optional: categorization
|
|
65
|
-
- backend
|
|
66
|
-
---
|
|
67
|
-
# Feature: <name>
|
|
68
|
-
|
|
69
|
-
## Spec
|
|
70
|
-
- Summary: <one-line>
|
|
71
|
-
- Requirements:
|
|
72
|
-
- [ ] <verifiable item>
|
|
73
|
-
- Constraints:
|
|
74
|
-
- <binding constraint>
|
|
75
|
-
|
|
76
|
-
## Plan
|
|
77
|
-
- [ ] Phase 1: <name>
|
|
78
|
-
- [ ] <task>
|
|
79
|
-
- [ ] Phase 2: <name>
|
|
80
|
-
|
|
81
|
-
## Tests
|
|
82
|
-
- [ ] <test file or scenario>
|
|
83
|
-
|
|
84
|
-
## Notes (optional)
|
|
85
|
-
- <design decisions discovered during implementation>
|
|
86
|
-
|
|
87
|
-
## Blockers
|
|
88
|
-
-
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
## Evolution rules
|
|
92
|
-
|
|
93
|
-
- If requirements change during implementation, update `## Spec` explicitly — do not silently diverge.
|
|
94
|
-
- If the scope grows beyond the original spec, consider closing the current feature and starting a new one (`close` then `new`).
|
|
95
|
-
- Complex features may split into sub-features using subdirectories (`features/parent/child.md`).
|
|
96
|
-
- After closing a feature, update or regenerate `archive/INDEX.md` via `rsp archive-index`.
|
|
97
|
-
|
|
98
|
-
## Parallel features (always on)
|
|
63
|
+
- `## Spec`
|
|
64
|
+
- `## Plan`
|
|
65
|
+
- `## Tests`
|
|
66
|
+
- `## Blockers`
|
|
99
67
|
|
|
100
|
-
|
|
68
|
+
## Init constraints
|
|
101
69
|
|
|
102
|
-
- `rsp
|
|
103
|
-
- `rsp
|
|
104
|
-
-
|
|
70
|
+
- `rsp init` scaffolds project structure only. It must not create a feature file.
|
|
71
|
+
- `rsp init` should create `features/`, `active.d/`, `archives/`, and `specs/design.md` up front.
|
|
72
|
+
- `rsp init --agents-mode managed|skip|print` controls whether `AGENTS.md` is updated, skipped, or printed.
|
|
73
|
+
- `managed` should update only the managed AGENTS block.
|
|
74
|
+
- `skip` should leave `AGENTS.md` untouched.
|
|
75
|
+
- `print` should scaffold `.rsp/` and print the managed AGENTS block without writing it.
|
|
76
|
+
- `init` is a reserved workflow name. Do not create a feature named `init`.
|
|
105
77
|
|
|
106
78
|
## Agent behavior
|
|
107
79
|
|
|
108
|
-
- Read `active.d/` first.
|
|
109
|
-
-
|
|
110
|
-
|
|
111
|
-
-
|
|
112
|
-
|
|
113
|
-
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
-
|
|
120
|
-
-
|
|
121
|
-
-
|
|
122
|
-
|
|
123
|
-
|
|
80
|
+
- Read `active.d/` first.
|
|
81
|
+
- Treat `AGENTS.md` as a navigation layer, not the long-term knowledge base.
|
|
82
|
+
- Preserve content outside the managed AGENTS block unless explicitly asked to change it.
|
|
83
|
+
- Keep project-wide design and durable context in `specs/design.md`.
|
|
84
|
+
- Keep stable local rules in `rules/project-rules.md` or another durable rules file only when needed.
|
|
85
|
+
- Use `rsp add rules project-rules` for the canonical optional project rules file.
|
|
86
|
+
- Do not push long-lived project knowledge back into `AGENTS.md`.
|
|
87
|
+
- `rsp doctor` is diagnostic only and must not mutate project files.
|
|
88
|
+
|
|
89
|
+
## Prohibitions
|
|
90
|
+
|
|
91
|
+
- Do not manually maintain `specs/INDEX.md` or `archives/INDEX.md`.
|
|
92
|
+
- Do not create a feature named `init`.
|
|
93
|
+
- Do not create `project-rules.md` by default when the project has no durable local rules.
|
|
94
|
+
- Do not use `AGENTS.md` as the long-term storage location for project design or rules.
|
|
95
|
+
- Do not create `specs` files that duplicate information already stored in `design.md` or durable rules files.
|
|
96
|
+
- Do not create placeholder or empty-shell files merely for completeness.
|
|
97
|
+
- Do not create new files under `.rsp/rules/`, `.rsp/specs/`, or `.rsp/features/` directly when an RSP command already exists for that file type.
|
|
98
|
+
- Do not create archive entries directly under `.rsp/archives/`; use `rsp close <name>`.
|