@hanzlaa/rcode 4.4.0 → 4.4.2
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 +29 -12
- package/cli/generate-command-skills.cjs +1 -1
- package/cli/install.js +12 -9
- package/cli/postinstall.js +21 -1
- package/dist/rcode.js +132 -137
- package/package.json +2 -2
- package/rcode/bin/rcode-tools.cjs +30 -8
- package/rcode/commands/lazy.md +16 -0
- package/rcode/references/verb-dictionary.md +1 -1
- package/rcode/skills/SKILLS_INDEX.md +1 -1
- package/rcode/skills/actions/1-analysis/rcode-prfaq/SKILL.md +1 -1
- package/rcode/workflows/help.md +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzlaa/rcode",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.2",
|
|
4
4
|
"description": "rcode — the AI team that never forgets. Persistent memory, specialist agents, and slash commands for AI IDEs. Works in Claude Code, Cursor, Gemini, VS Code, and Antigravity.",
|
|
5
5
|
"main": "cli/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"access": "public"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"ws": "^8.
|
|
58
|
+
"ws": "^8.21.0"
|
|
59
59
|
},
|
|
60
60
|
"optionalDependencies": {
|
|
61
61
|
"@lydell/node-pty": "1.2.0-beta.12"
|
|
@@ -7596,21 +7596,43 @@ async function main() {
|
|
|
7596
7596
|
const validateErrors = [];
|
|
7597
7597
|
|
|
7598
7598
|
if (target === 'state' || target === 'all') {
|
|
7599
|
-
|
|
7600
|
-
|
|
7601
|
-
|
|
7599
|
+
// Read state.json directly — readState() is scoped inside cmdState()
|
|
7600
|
+
// and isn't reachable here (#940). Validate against the REAL schema:
|
|
7601
|
+
// phases[] + milestones[], current_phase nullable on fresh installs.
|
|
7602
|
+
const statePathV = path.join(RCODE_DIR, 'state.json');
|
|
7603
|
+
if (!fs.existsSync(statePathV)) {
|
|
7604
|
+
validateErrors.push('state: state.json not found — run rcode install');
|
|
7602
7605
|
} else {
|
|
7603
|
-
|
|
7604
|
-
|
|
7605
|
-
|
|
7606
|
-
|
|
7606
|
+
let state = null;
|
|
7607
|
+
try {
|
|
7608
|
+
state = JSON.parse(fs.readFileSync(statePathV, 'utf8'));
|
|
7609
|
+
} catch (e) {
|
|
7610
|
+
validateErrors.push(`state: invalid JSON — ${e.message}`);
|
|
7611
|
+
}
|
|
7612
|
+
if (state) {
|
|
7613
|
+
// current_phase is legitimately null on a fresh / stub project,
|
|
7614
|
+
// so do NOT require it. milestones is an array (no current_milestone field).
|
|
7615
|
+
// schema_version 1 is valid on disk — migrateState() upgrades it to 2
|
|
7616
|
+
// transparently on read, so accept either and only flag the unknown.
|
|
7617
|
+
if (state.schema_version != null && ![1, 2].includes(state.schema_version)) {
|
|
7618
|
+
validateErrors.push(`state: unknown schema_version ${state.schema_version} (expected 1 or 2)`);
|
|
7619
|
+
}
|
|
7620
|
+
if (state.phases != null && !Array.isArray(state.phases) && typeof state.phases !== 'object') {
|
|
7621
|
+
validateErrors.push('state: phases must be an array or object');
|
|
7622
|
+
}
|
|
7623
|
+
if (state.milestones != null && !Array.isArray(state.milestones)) {
|
|
7624
|
+
validateErrors.push('state: milestones must be an array');
|
|
7625
|
+
}
|
|
7626
|
+
}
|
|
7607
7627
|
}
|
|
7608
7628
|
}
|
|
7609
7629
|
|
|
7610
7630
|
if (target === 'config' || target === 'all') {
|
|
7631
|
+
// config.yaml holds project identity + workflow prefs only — it does
|
|
7632
|
+
// NOT track current_phase (that lives in state.json). Only require
|
|
7633
|
+
// the fields config actually owns (#940).
|
|
7611
7634
|
const config = readConfig();
|
|
7612
7635
|
if (!config.project_name) validateErrors.push('config: missing project_name');
|
|
7613
|
-
if (!config.current_phase && !config.phase) validateErrors.push('config: missing current_phase or phase');
|
|
7614
7636
|
}
|
|
7615
7637
|
|
|
7616
7638
|
if (validateErrors.length) {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rcode-lazy
|
|
3
|
+
description: "Lazy senior dev lens — force the simplest solution that actually works before any code is written (YAGNI, stdlib first, one line before fifty)"
|
|
4
|
+
argument-hint: "[challenge or code to simplify] [--intensity=lite|full|ultra]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- AskUserQuestion
|
|
8
|
+
- Skill
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
Invoke the `rcode-lazy` skill (via the Skill tool) and apply it to: $ARGUMENTS
|
|
12
|
+
|
|
13
|
+
`rcode-lazy` is the always-on "lazy senior dev" lens — it forces the simplest
|
|
14
|
+
solution that actually works (YAGNI, stdlib before custom code, native platform
|
|
15
|
+
features before dependencies, one line before fifty) before any code is written.
|
|
16
|
+
Pass `--intensity=lite|full|ultra` through if the user provided it; default is `full`.
|
|
@@ -112,7 +112,7 @@ These are matched alongside §Create / §Add / §Plan verbs to determine the dis
|
|
|
112
112
|
| epic | `epic`, `epics`, `epics and stories`, **AR:** `ملحمة`, `ملاحم`, `فصل`, `فصول` | `/rcode-create-epics-and-stories` |
|
|
113
113
|
| sprint | `sprint`, `iteration`, **AR:** `سباق`, `جولة`, `دورة عمل`, `سبرنت` | `/rcode-sprint-planning` |
|
|
114
114
|
| PRD | `PRD`, `requirements doc`, `product requirements`, **AR:** `وثيقة المتطلبات`, `متطلبات المنتج`, `وثيقة المنتج` | `/rcode-create-prd` |
|
|
115
|
-
| roadmap | `roadmap`, `plan` (top-level), **AR:** `خارطة طريق`, `خريطة الطريق`, `خطة عامة` | `/rcode-
|
|
115
|
+
| roadmap | `roadmap`, `plan` (top-level), **AR:** `خارطة طريق`, `خريطة الطريق`, `خطة عامة` | `/rcode-new-milestone` |
|
|
116
116
|
| council | `council`, `majlis`, `panel`, `mashwara`, `salah`, **AR:** `مجلس`, `شورى`, `لجنة`, `استشارة` | `/rcode-council` |
|
|
117
117
|
| plan (verb form — "plan phase N") | `plan`, **AR:** `خطّط`, `خطة` | `/rcode-plan` |
|
|
118
118
|
| story (impl) | `dev story`, `implement story`, `build story`, **AR:** `نفذ القصة`, `طبّق القصة` | `/rcode-dev-story` |
|
|
@@ -56,7 +56,7 @@ Invoked by agents via the capabilities table in their SKILL.md. Organized by SDL
|
|
|
56
56
|
- `actions/2-plan/rcode-frontend-design` — typography, colours, motion, spatial design
|
|
57
57
|
- `actions/2-plan/rcode-create-epics-and-stories` — break down PRD into epics and stories
|
|
58
58
|
- `actions/2-plan/rcode-create-story` — prepare a dev-ready user story
|
|
59
|
-
- `actions/2-plan/rcode-
|
|
59
|
+
- `actions/2-plan/rcode-new-milestone` — create milestone definition
|
|
60
60
|
|
|
61
61
|
### 3 — Solutioning (3)
|
|
62
62
|
- `actions/3-solutioning/rcode-create-architecture` — architectural decision record (ADR)
|
|
@@ -18,7 +18,7 @@ user-invocable: true
|
|
|
18
18
|
|
|
19
19
|
- **Refining an existing PRD** — use `rcode-create-prd` or `rcode-edit-prd`.
|
|
20
20
|
- **Brainstorming raw ideas** before there's a concept — use `rcode-brainstorming` first; PRFAQ assumes a candidate concept exists.
|
|
21
|
-
- **Sprint or phase planning** — use `rcode-sprint-planning` / `rcode-
|
|
21
|
+
- **Sprint or phase planning** — use `rcode-sprint-planning` / `rcode-new-milestone`.
|
|
22
22
|
- **Pure market research with no product hypothesis** — use a research workflow.
|
|
23
23
|
- **Single-question Q&A** — PRFAQ runs a multi-stage gauntlet; for a one-off answer, just answer.
|
|
24
24
|
|
package/rcode/workflows/help.md
CHANGED
|
@@ -132,7 +132,6 @@ init → new-project → plan → execute → next → status → ship
|
|
|
132
132
|
| `/rcode-insert-phase <after> <name>` | Alias for `/rcode-phase --insert <after> <name>`. |
|
|
133
133
|
| `/rcode-remove-phase <n>` | Alias for `/rcode-phase --remove <n>`. |
|
|
134
134
|
| `/rcode-quick [flags]` | Small ad-hoc tasks with rcode guarantees but skip optional agents. Flags: `--discuss`, `--research`, `--full`. |
|
|
135
|
-
| `/rcode-fast "<task>"` | Trivial inline task — typo, gitignore tweak, etc. No subagents, ≤3 file edits. *Not yet implemented (#482-B).* |
|
|
136
135
|
|
|
137
136
|
## Capture & session continuity
|
|
138
137
|
|
|
@@ -226,7 +225,6 @@ init → new-project → plan → execute → next → status → ship
|
|
|
226
225
|
| `/rcode-enable-hooks` | Install optional rcode hooks into `.claude/settings.json`. |
|
|
227
226
|
| `/rcode-scaffold-project` | Scaffold a new project from the official rcode template. |
|
|
228
227
|
| `/rcode-scaffold-skill --role <role>` | Scaffold a new compliant SKILL.md for a rcode role — eliminates friction of finding folder, copying, and chasing 5-component compliance. |
|
|
229
|
-
| `/rcode-bootstrap` | Bootstrap repo with Vercel-linked resources and integrations. *Not yet implemented (#481).* |
|
|
230
228
|
|
|
231
229
|
## Story-level epics workflow
|
|
232
230
|
|