Lines 62-103javascript
64 const transcripts = path.join(os.homedir(), '.claude', 'projects');
65 let transcriptsOk = false;
67 accessSync(transcripts, constants.R_OK);
69 } catch { /* not present or unreadable */ }
70 add('claude session transcripts readable', transcriptsOk, `expected at ${transcripts} — mining will have nothing to read`, true);
72 // --- plugin / injection health (Phase 9) ---
74 let injectionOn = true;
76 const cfg = yaml.load(readFileSync(p.config(), 'utf8'), { schema: yaml.JSON_SCHEMA });
77 injectionOn = isInjectionEnabled(cfg);
78 } catch { /* default: enabled */ }
79 add('injection enabled', injectionOn, 'run "raph on" so the hooks add lessons (mining/review still work while off)', true);
82 // `raph` on PATH — the plugin's hooks call the bare `raph` command, so it must resolve
83 // globally (npm install -g) even though `node bin/raph.js` works in this repo.
84 const raphOnPath = spawnSync('raph', ['version'], { encoding: 'utf8', shell: true });
85 add('raph on PATH (plugin hooks call it)', raphOnPath.status === 0, 'install globally: npm install -g maheshaggarwal21/raphael', true);
HighRuntime Package Install
Package source invokes a package manager install command at runtime.
src/commands/doctor.jsView on unpkg · L82 87 // Plugin packaging present (relative to this CLI). WARN-only: the CLI runs fine without it,
88 // but the Claude Code plugin needs the manifest + hooks to auto-wire recall.
89 const repoRoot = path.join(path.dirname(fileURLToPath(import.meta.url)), '..', '..');
90 const pluginDir = path.join(repoRoot, 'plugin');
91 if (existsSync(pluginDir)) {
92 add('plugin manifest present', existsSync(path.join(pluginDir, '.claude-plugin', 'plugin.json')), 'Phase 9 packaging: add plugin/.claude-plugin/plugin.json', true);
93 add('plugin hooks.json present', existsSync(path.join(pluginDir, 'hooks', 'hooks.json')), 'add plugin/hooks/hooks.json so SessionStart/UserPromptSubmit auto-inject', true);
97 for (const c of checks) {
98 const mark = c.ok ? 'PASS' : c.warn ? 'WARN' : 'FAIL';
99 if (!c.ok && !c.warn) failed++;
100 console.log(`${mark} ${c.name}${c.ok || !c.fix ? '' : `\n fix: ${c.fix}`}`);
102 console.log(failed === 0 ? 'raph: healthy' : `raph: ${failed} check(s) failing`);
103 return failed === 0 ? 0 : 1;