@hanzlaa/rcode 4.14.0 → 4.15.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/cli/install.js +61 -5
- package/cli/uninstall.js +13 -0
- package/dist/rcode.js +162 -162
- package/package.json +1 -1
- package/rcode/agents/rules/sprint-checker/dimensions.md +25 -0
- package/rcode/bin/lib/customize.cjs +115 -0
- package/rcode/bin/lib/memlog.cjs +124 -0
- package/rcode/bin/rcode-tools.cjs +13 -0
- package/rcode/references/agent-shared-rules.md +32 -0
- package/rcode/references/roadmapper-playbook.md +8 -0
- package/rcode/references/universal-anti-patterns.md +26 -0
- package/rcode/workflows/execute.md +5 -0
- package/rcode/workflows/new-project-research-decision.md +2 -0
- package/rcode/workflows/new-project.md +5 -0
- package/rcode/workflows/plan.md +9 -0
package/cli/install.js
CHANGED
|
@@ -723,9 +723,17 @@ function getPathsForIde(ide, target) {
|
|
|
723
723
|
// claude/vscode install paths). We install agent + command files to .claude/
|
|
724
724
|
// so multi-IDE installs share files, and the rcode workflow bridge gives
|
|
725
725
|
// Codex access to lifecycle workflows via `rcode workflow show <name>` (#883).
|
|
726
|
-
//
|
|
727
|
-
//
|
|
728
|
-
//
|
|
726
|
+
//
|
|
727
|
+
// What Codex actually reads — verified live against Codex CLI 0.150.1:
|
|
728
|
+
// AGENTS.md → project instructions ✅ written here
|
|
729
|
+
// ~/.codex/prompts/*.md → /slash commands (--global only)
|
|
730
|
+
// ~/.codex/skills/<n>/ → skills (--global only)
|
|
731
|
+
// (no agents surface) → Codex has NO subagent concept at all
|
|
732
|
+
//
|
|
733
|
+
// The agentsDir below is therefore written for MULTI-IDE SHARING ONLY.
|
|
734
|
+
// Codex itself never reads it, and rcode's agents cannot appear in Codex
|
|
735
|
+
// in any form — not a bug to fix, an absent surface. Skills are the only
|
|
736
|
+
// place rcode's capabilities can surface there.
|
|
729
737
|
return {
|
|
730
738
|
agentsDir: path.join(target, '.claude', 'agents'),
|
|
731
739
|
commandsDir: path.join(target, '.claude', 'commands'),
|
|
@@ -994,6 +1002,10 @@ function ensureRcodeGitignore(target, options = {}) {
|
|
|
994
1002
|
'.rcode/brain/rcode-docs/',
|
|
995
1003
|
'.rcode/brain/best-practices/',
|
|
996
1004
|
'',
|
|
1005
|
+
'# Personal customization layer — team overrides (.rcode/custom/<name>.md)',
|
|
1006
|
+
'# ARE committed; the .user.md layer is per-developer and is not.',
|
|
1007
|
+
'.rcode/custom/*.user.md',
|
|
1008
|
+
'',
|
|
997
1009
|
'# Runtime noise',
|
|
998
1010
|
'node_modules/',
|
|
999
1011
|
'.rcode/state.json.lock',
|
|
@@ -2272,6 +2284,50 @@ function mergeSlashRouterHook(jsonPath, eventKey, command, label) {
|
|
|
2272
2284
|
return true;
|
|
2273
2285
|
}
|
|
2274
2286
|
|
|
2287
|
+
// Codex reads SKILLS from ~/.codex/skills/<name>/SKILL.md — verified live against
|
|
2288
|
+
// Codex CLI 0.150.1, which prints the paths it loads on boot and lists them under
|
|
2289
|
+
// `/skills`. Entries there are commonly symlinks into a shared ~/.agents/skills.
|
|
2290
|
+
//
|
|
2291
|
+
// This is a DIFFERENT surface from ~/.codex/prompts (slash commands) and from
|
|
2292
|
+
// AGENTS.md (instructions), and rcode targeted neither of the first two for
|
|
2293
|
+
// skills — so none of rcode's skills appeared in Codex at all. Codex has no
|
|
2294
|
+
// subagent concept, so rcode's agents cannot surface there in any form; skills
|
|
2295
|
+
// are the only place its capabilities can show up.
|
|
2296
|
+
function installCodexSkills(opts) {
|
|
2297
|
+
const home = homedir();
|
|
2298
|
+
const destRoot = path.join(home, '.codex', 'skills');
|
|
2299
|
+
ensureDir(destRoot);
|
|
2300
|
+
|
|
2301
|
+
// Source: every SKILL.md under rcode/skills/, installed as rcode-<name>/ to
|
|
2302
|
+
// stay inside rcode's namespace and never collide with a user's own skills.
|
|
2303
|
+
const srcRoot = path.join(SOURCE_ROOT, 'skills');
|
|
2304
|
+
if (!fs.existsSync(srcRoot)) return 0;
|
|
2305
|
+
|
|
2306
|
+
let written = 0;
|
|
2307
|
+
for (const skillFile of walkFiles(srcRoot)) {
|
|
2308
|
+
if (path.basename(skillFile) !== 'SKILL.md') continue;
|
|
2309
|
+
const skillDir = path.dirname(skillFile);
|
|
2310
|
+
const bare = path.basename(skillDir);
|
|
2311
|
+
const name = bare.startsWith('rcode-') ? bare : `rcode-${bare}`;
|
|
2312
|
+
const destDir = path.join(destRoot, name);
|
|
2313
|
+
ensureDir(destDir);
|
|
2314
|
+
// Copy the whole skill folder — references/, steps/, templates/ and the
|
|
2315
|
+
// like are part of the contract, not decoration.
|
|
2316
|
+
for (const f of walkFiles(skillDir)) {
|
|
2317
|
+
const rel = path.relative(skillDir, f);
|
|
2318
|
+
const out = path.join(destDir, rel);
|
|
2319
|
+
ensureDir(path.dirname(out));
|
|
2320
|
+
fs.copyFileSync(f, out);
|
|
2321
|
+
}
|
|
2322
|
+
written++;
|
|
2323
|
+
}
|
|
2324
|
+
|
|
2325
|
+
if (opts && opts.global !== 'silent') {
|
|
2326
|
+
console.log(' ' + ok(`Codex skills: ${written} → ~/.codex/skills/rcode-*/`));
|
|
2327
|
+
}
|
|
2328
|
+
return written;
|
|
2329
|
+
}
|
|
2330
|
+
|
|
2275
2331
|
// Codex: ~/.codex/hooks.json, event UserPromptSubmit.
|
|
2276
2332
|
function installCodexSlashRouterHook(opts) {
|
|
2277
2333
|
installSlashRouterCommands(opts);
|
|
@@ -2291,7 +2347,7 @@ function installNativeHomeSlashCommands(opts) {
|
|
|
2291
2347
|
const ides = Array.isArray(opts.ides) ? opts.ides : [opts.ide].filter(Boolean);
|
|
2292
2348
|
for (const ide of ides) {
|
|
2293
2349
|
switch (ide) {
|
|
2294
|
-
case 'codex': installCodexSlashRouterHook(opts); break;
|
|
2350
|
+
case 'codex': installCodexSlashRouterHook(opts); installCodexSkills(opts); break;
|
|
2295
2351
|
case 'antigravity': installAntigravitySlashRouterHook(opts); break;
|
|
2296
2352
|
default:
|
|
2297
2353
|
break;
|
|
@@ -2378,7 +2434,7 @@ async function installInner(opts) {
|
|
|
2378
2434
|
// writes on a GLOBAL install. A project-local install silently leaves Codex
|
|
2379
2435
|
// with no working slash commands — warn instead of implying success.
|
|
2380
2436
|
if (!opts.global) {
|
|
2381
|
-
console.log(' ' + warn('Codex
|
|
2437
|
+
console.log(' ' + warn('Codex needs a GLOBAL install — re-run with `--global` to wire the ~/.codex/hooks.json router AND copy rcode skills to ~/.codex/skills/. This project-local install enables NEITHER: Codex reads slash commands and skills only from its home dir, and has no agents surface at all.'));
|
|
2382
2438
|
}
|
|
2383
2439
|
}
|
|
2384
2440
|
|
package/cli/uninstall.js
CHANGED
|
@@ -791,6 +791,19 @@ async function runUninstall(args) {
|
|
|
791
791
|
if (editors.includes('codex')) {
|
|
792
792
|
const r = removeSlashRouterHook(path.join(os.homedir(), '.codex', 'hooks.json'), 'UserPromptSubmit');
|
|
793
793
|
if (r === 'removed') console.log(` ✓ removed rcode slash-router hook from ~/.codex/hooks.json`);
|
|
794
|
+
// Skills installed to ~/.codex/skills/rcode-*/ by installCodexSkills().
|
|
795
|
+
// Only rcode-prefixed entries — the user's own skills and their symlinks
|
|
796
|
+
// into ~/.agents/skills live in the same directory and are not ours.
|
|
797
|
+
const codexSkills = path.join(os.homedir(), '.codex', 'skills');
|
|
798
|
+
let removedSkills = 0;
|
|
799
|
+
try {
|
|
800
|
+
for (const entry of fs.readdirSync(codexSkills)) {
|
|
801
|
+
if (!entry.startsWith('rcode-')) continue;
|
|
802
|
+
fs.rmSync(path.join(codexSkills, entry), { recursive: true, force: true });
|
|
803
|
+
removedSkills++;
|
|
804
|
+
}
|
|
805
|
+
} catch { /* directory absent — nothing installed */ }
|
|
806
|
+
if (removedSkills > 0) console.log(` ✓ removed ${removedSkills} rcode skill(s) from ~/.codex/skills/`);
|
|
794
807
|
}
|
|
795
808
|
if (editors.includes('antigravity')) {
|
|
796
809
|
const r = removeSlashRouterHook(path.join(os.homedir(), '.gemini', 'antigravity', 'settings.json'), 'UserPrompt');
|