@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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oevery/rsp",
3
3
  "type": "module",
4
- "version": "1.0.2",
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": "./dist/cli.mjs"
24
+ "rsp": "bin/rsp.mjs"
25
25
  },
26
26
  "files": [
27
+ "bin/",
27
28
  "dist/",
28
29
  "rules/"
29
30
  ],
@@ -1,123 +1,98 @@
1
1
  ---
2
2
  name: rsp-rules
3
- description: RSP rules for Rules, Spec, and Plan driven development.
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
- ## Structure
10
+ ## Core structure
11
11
 
12
12
  ```text
13
13
  .rsp/
14
- ├── rules/ # technical constraints, long-lived
15
- ├── specs/ # project-level architecture (optional)
16
- ├── features/ # active features
17
- │ ├── <name>.md # or <domain>/<name>.md for grouping
18
- ├── active.d/ # active feature markers
19
- │ └── <name> # empty marker file, mirrors features/
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
- ## File roles
22
+ ## Managed boundaries
26
23
 
27
- - `rules/` — stable technical constraints, coding conventions, architecture decisions. One or more files, split by domain (e.g., `frontend.md`, `api.md`). Do not put business requirements here.
28
- - \`specs/\` — project-level architecture and design reference. Use for cross-cutting concerns, system diagrams, ADRs. Per-feature details go in \`features/\`.
29
- - `features/<name>.md` — a complete feature definition, optionally grouped by domain subdirectory (e.g., `features/auth/login.md`). Contains YAML frontmatter, `## Spec` (what), `## Plan` (how), `## Tests`, and optional `## Notes`.
30
- - `active.d/` — active feature tracking. Mirrors the `features/` directory structure (e.g., `active.d/payments/checkout`). Each file is an empty marker; the file path is the source of truth. All features in `active.d/` are considered active.
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 `active.d/` to find active features.
35
- 2. If multiple entries exist, ask which to focus on.
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. Optionally read \`specs/\` for architecture context and \`config.yaml\` for customized statuses/priorities.
37
+ 6. Read `specs/design.md` and other project-level specs only when relevant to the current task.
40
38
 
41
- ## Token optimization
39
+ ## File creation rules
42
40
 
43
- If [RTK (Token Killer)](https://kilo.ai) is available in the environment, prefix all `rsp` commands with `rtk` (e.g. `rtk rsp status`, `rtk rsp new`, `rtk rsp check`, `rtk rsp deps`) to reduce token consumption. RTK is detected by availability in `$PATH`.
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
- ## Semantic checkboxes
48
+ ## Command-first creation
46
49
 
47
- Use in all checklists (Requirements, Plan, Tests):
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
- - `[ ]` = todo.
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
- ## Feature file template
61
+ Every feature file should contain these sections:
57
62
 
58
- ```markdown
59
- ---
60
- status: draft # draft | ready | in-progress | blocked | done
61
- priority: medium # low | medium | high | critical
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
- All features in `active.d/` are tracked as active by default. Parallelism is inherent:
68
+ ## Init constraints
101
69
 
102
- - `rsp new` always creates an entry in `active.d/`.
103
- - `rsp close` removes the entry from `active.d/`.
104
- - When `active.d/` has a single entry, that is the primary focus. When multiple entries exist, AI should ask the user which to focus on.
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. If empty, ask what to work on. Also read `AGENTS.md` for project context.
109
- - **`rsp init`**: scaffold `.rsp/` + `AGENTS.md`. Detects project name from package.json.
110
- - Post-init: confirm created paths, suggest `rsp new`, `rsp status`, `rsp deps`.
111
- - **`rsp new <name> [summary]`**: create `.rsp/features/<name>.md`. Name is kebab-case, supports subdirectories (`auth/login`). Optional one-line summary.
112
- - After creation: confirm file exists, confirm `active.d/` marker was created.
113
- - **`rsp close <name>`**: archive to `.rsp/archive/YYYY-MM-DD_<name>.md`. Mirror subdirectory structure in archive.
114
- - After archive: suggest `git add .rsp/archive/… && git commit`.
115
- - Runs `rsp check` automatically if the feature had dependents.
116
- - **`rsp check`**: validate feature file integrity (frontmatter, sections, dependencies, cycles).
117
- - **`rsp deps`**: inspect dependency relationships before large refactors.
118
- - **`rsp status`**: view project dashboard at any time.
119
- - For cross-cutting or dependent features, add `depends-on:` in frontmatter.
120
- - Update the feature file as work progresses. Check off tasks and tests.
121
- - Before finishing, confirm code matches `## Spec` and `## Plan` reflects reality.
122
-
123
- > **Token tip**: If [RTK](https://kilo.ai) is installed, prefix shell commands with `rtk` (e.g. `rtk rsp status`) to reduce token consumption.
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>`.