@hanzlaa/rcode 2.3.3 → 2.3.5

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/cli/doctor.js CHANGED
@@ -196,7 +196,7 @@ function runPreflight(cwd, packageRoot) {
196
196
  checks.push({
197
197
  label: 'Memory bank',
198
198
  status: 'warn',
199
- message: `STALE — ${staleness.reasons[0]}${staleness.reasons.length > 1 ? ` (+${staleness.reasons.length - 1} more)` : ''} — run /rihal:init`,
199
+ message: `STALE — ${staleness.reasons[0]}${staleness.reasons.length > 1 ? ` (+${staleness.reasons.length - 1} more)` : ''}`,
200
200
  });
201
201
  }
202
202
  }
package/cli/install.js CHANGED
@@ -1251,6 +1251,19 @@ async function install(opts) {
1251
1251
  // .planning/council-sessions/ empty dir
1252
1252
  ensureDir(path.join(opts.target, '.planning', 'council-sessions'));
1253
1253
 
1254
+ // .rihal/context/ — seed stub files so doctor doesn't report "never initialized"
1255
+ // The /rihal:init slash command populates these with real project content.
1256
+ const contextDir = path.join(opts.target, '.rihal', 'context');
1257
+ ensureDir(contextDir);
1258
+ const activeCtx = path.join(contextDir, 'active.md');
1259
+ const briefCtx = path.join(contextDir, 'project-brief.md');
1260
+ if (!fs.existsSync(activeCtx)) {
1261
+ fs.writeFileSync(activeCtx, '# Active Context\n\n_Run `/rihal:init` inside your AI editor to populate this file._\n');
1262
+ }
1263
+ if (!fs.existsSync(briefCtx)) {
1264
+ fs.writeFileSync(briefCtx, '# Project Brief\n\n_Run `/rihal:init` inside your AI editor to populate this file._\n');
1265
+ }
1266
+
1254
1267
  // ~/.rihal/agents/ global agents directory
1255
1268
  const globalAgentsDir = path.join(os.homedir(), '.rihal', 'agents');
1256
1269
  ensureDir(globalAgentsDir);
@@ -35,21 +35,27 @@ function readPackageManifest(packageRoot) {
35
35
  }
36
36
  }
37
37
 
38
- const actionsDir = path.join(skillsRoot, 'actions');
39
- if (fs.existsSync(actionsDir)) {
40
- for (const entry of fs.readdirSync(actionsDir, { withFileTypes: true })) {
38
+ // Mirror installSkills() walkForSkills: recurse into action bucket dirs
39
+ // (1-analysis, 2-plan, etc.) until a dir with SKILL.md is found, then add
40
+ // the dir name as installed. Bucket dirs themselves are never installed.
41
+ function walkActions(dir) {
42
+ if (!fs.existsSync(dir)) return;
43
+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
41
44
  if (!entry.isDirectory()) continue;
42
- if (entry.name === 'research') {
43
- // Flatten research/* → actions set (matches installSkills)
44
- const researchDir = path.join(actionsDir, 'research');
45
- for (const sub of fs.readdirSync(researchDir, { withFileTypes: true })) {
46
- if (sub.isDirectory()) manifest.actions.add(sub.name);
47
- }
45
+ const full = path.join(dir, entry.name);
46
+ if (fs.existsSync(path.join(full, 'SKILL.md'))) {
47
+ // Use the name as it lands in .claude/skills/ (installSkills prefixes
48
+ // non-rihal- dirs with 'rihal-', but all current skills already have it)
49
+ const installedName = entry.name.startsWith('rihal-')
50
+ ? entry.name
51
+ : `rihal-${entry.name}`;
52
+ manifest.actions.add(installedName);
48
53
  } else {
49
- manifest.actions.add(entry.name);
54
+ walkActions(full);
50
55
  }
51
56
  }
52
57
  }
58
+ walkActions(path.join(skillsRoot, 'actions'));
53
59
 
54
60
  return manifest;
55
61
  }
@@ -259,12 +259,12 @@ function checkStaleness(cwd) {
259
259
  };
260
260
  }
261
261
 
262
- // Context files exist but no fingerprint stored — happened before
263
- // fingerprinting was added, or state.json got truncated.
262
+ // Context files exist but no fingerprint stored — fresh install with stub
263
+ // context files, or state.json got truncated before fingerprint was written.
264
264
  if (!stored) {
265
265
  return {
266
266
  status: 'stale',
267
- reasons: ['no fingerprint recorded — run /rihal:init once to bootstrap tracking'],
267
+ reasons: ['run /rihal:init in your editor to populate project context'],
268
268
  current,
269
269
  stored,
270
270
  context_files,
package/dist/rcode.js CHANGED
@@ -15984,6 +15984,16 @@ Say "plan a sprint" or run \`/rihal:sprint-planning\` to break Phase 01 into sto
15984
15984
  }
15985
15985
  }
15986
15986
  ensureDir(path2.join(opts.target, ".planning", "council-sessions"));
15987
+ const contextDir = path2.join(opts.target, ".rihal", "context");
15988
+ ensureDir(contextDir);
15989
+ const activeCtx = path2.join(contextDir, "active.md");
15990
+ const briefCtx = path2.join(contextDir, "project-brief.md");
15991
+ if (!fs2.existsSync(activeCtx)) {
15992
+ fs2.writeFileSync(activeCtx, "# Active Context\n\n_Run `/rihal:init` inside your AI editor to populate this file._\n");
15993
+ }
15994
+ if (!fs2.existsSync(briefCtx)) {
15995
+ fs2.writeFileSync(briefCtx, "# Project Brief\n\n_Run `/rihal:init` inside your AI editor to populate this file._\n");
15996
+ }
15987
15997
  const globalAgentsDir = path2.join(os.homedir(), ".rihal", "agents");
15988
15998
  ensureDir(globalAgentsDir);
15989
15999
  fs2.writeFileSync(
@@ -16293,20 +16303,20 @@ var require_manifest = __commonJS({
16293
16303
  if (entry.isDirectory()) manifest.agents.add(entry.name);
16294
16304
  }
16295
16305
  }
16296
- const actionsDir = path2.join(skillsRoot, "actions");
16297
- if (fs2.existsSync(actionsDir)) {
16298
- for (const entry of fs2.readdirSync(actionsDir, { withFileTypes: true })) {
16306
+ function walkActions(dir) {
16307
+ if (!fs2.existsSync(dir)) return;
16308
+ for (const entry of fs2.readdirSync(dir, { withFileTypes: true })) {
16299
16309
  if (!entry.isDirectory()) continue;
16300
- if (entry.name === "research") {
16301
- const researchDir = path2.join(actionsDir, "research");
16302
- for (const sub of fs2.readdirSync(researchDir, { withFileTypes: true })) {
16303
- if (sub.isDirectory()) manifest.actions.add(sub.name);
16304
- }
16310
+ const full = path2.join(dir, entry.name);
16311
+ if (fs2.existsSync(path2.join(full, "SKILL.md"))) {
16312
+ const installedName = entry.name.startsWith("rihal-") ? entry.name : `rihal-${entry.name}`;
16313
+ manifest.actions.add(installedName);
16305
16314
  } else {
16306
- manifest.actions.add(entry.name);
16315
+ walkActions(full);
16307
16316
  }
16308
16317
  }
16309
16318
  }
16319
+ walkActions(path2.join(skillsRoot, "actions"));
16310
16320
  return manifest;
16311
16321
  }
16312
16322
  function readInstalledDirs(dir, prefix = null) {
@@ -17471,7 +17481,7 @@ var require_memory_bank = __commonJS({
17471
17481
  if (!stored) {
17472
17482
  return {
17473
17483
  status: "stale",
17474
- reasons: ["no fingerprint recorded \u2014 run /rihal:init once to bootstrap tracking"],
17484
+ reasons: ["run /rihal:init in your editor to populate project context"],
17475
17485
  current,
17476
17486
  stored,
17477
17487
  context_files
@@ -17681,7 +17691,7 @@ var require_doctor = __commonJS({
17681
17691
  checks.push({
17682
17692
  label: "Memory bank",
17683
17693
  status: "warn",
17684
- message: `STALE \u2014 ${staleness.reasons[0]}${staleness.reasons.length > 1 ? ` (+${staleness.reasons.length - 1} more)` : ""} \u2014 run /rihal:init`
17694
+ message: `STALE \u2014 ${staleness.reasons[0]}${staleness.reasons.length > 1 ? ` (+${staleness.reasons.length - 1} more)` : ""}`
17685
17695
  });
17686
17696
  }
17687
17697
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzlaa/rcode",
3
- "version": "2.3.3",
3
+ "version": "2.3.5",
4
4
  "description": "Rihal Code (rcode) — installable context-brain for Rihalians. 43 agents, 99 slash commands, 56 skills, pullable Rihal standards. Unified install for Claude Code, Cursor, and Gemini.",
5
5
  "main": "cli/index.js",
6
6
  "bin": {