@hanzlaa/rcode 2.8.0 → 3.2.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/AGENTS.md +11 -1
- package/CONTRIBUTING.md +7 -0
- package/README.md +39 -20
- package/cli/install.js +145 -47
- package/dist/rcode.js +134 -43
- package/package.json +2 -2
- package/rihal/agents/rihal-advisor-researcher.md +1 -1
- package/rihal/agents/rihal-assumptions-analyzer.md +1 -1
- package/rihal/agents/rihal-codebase-mapper.md +1 -1
- package/rihal/agents/rihal-docs-auditor.md +3 -3
- package/rihal/agents/rihal-executor.md +10 -0
- package/rihal/agents/rihal-integration-checker.md +1 -1
- package/rihal/agents/rihal-noor.md +2 -2
- package/rihal/agents/rihal-phase-researcher.md +1 -1
- package/rihal/agents/rihal-planner.md +25 -0
- package/rihal/agents/rihal-project-researcher.md +1 -1
- package/rihal/agents/rihal-research-synthesizer.md +1 -1
- package/rihal/agents/rihal-roadmapper.md +1 -1
- package/rihal/agents/rihal-sprint-checker.md +19 -1
- package/rihal/agents/rihal-verifier.md +1 -1
- package/rihal/agents/rihal-waleed.md +1 -2
- package/rihal/commands/code-review.md +1 -1
- package/rihal/commands/memory-audit.md +10 -0
- package/rihal/commands/memory-distill.md +11 -0
- package/rihal/commands/memory-init.md +12 -0
- package/rihal/commands/memory-update.md +12 -0
- package/rihal/config/model-profiles.json +5 -5
- package/rihal/references/karpathy-guidelines-full.md +1 -1
- package/rihal/references/no-unauthorized-git-ops.md +1 -1
- package/rihal/references/verb-dictionary.md +1 -1
- package/rihal/skills/actions/2-plan/rihal-frontend-design/SKILL.md +49 -139
- package/rihal/skills/actions/2-plan/rihal-frontend-design/references.md +79 -0
- package/rihal/skills/actions/4-implementation/rihal-browser-verify/SKILL.md +70 -0
- package/rihal/skills/actions/4-implementation/rihal-checkpoint-preview/SKILL.md +1 -1
- package/rihal/skills/actions/4-implementation/rihal-ci/SKILL.md +108 -0
- package/rihal/skills/actions/4-implementation/rihal-debug/SKILL.md +78 -0
- package/rihal/skills/actions/4-implementation/rihal-git-flow/SKILL.md +90 -0
- package/rihal/skills/actions/4-implementation/rihal-harden/SKILL.md +91 -0
- package/rihal/skills/actions/4-implementation/rihal-incremental/SKILL.md +50 -0
- package/rihal/skills/actions/4-implementation/rihal-migrate/SKILL.md +86 -0
- package/rihal/skills/actions/4-implementation/rihal-perf/SKILL.md +96 -0
- package/rihal/skills/actions/4-implementation/rihal-prove-it/SKILL.md +64 -0
- package/rihal/skills/actions/4-implementation/rihal-source-truth/SKILL.md +76 -0
- package/rihal/skills/actions/4-implementation/rihal-trim/SKILL.md +73 -0
- package/rihal/skills/agents/dalil-scout/SKILL.md +43 -125
- package/rihal/skills/agents/dalil-scout/references.md +67 -0
- package/rihal/skills/agents/majlis-council/SKILL.md +50 -144
- package/rihal/skills/agents/majlis-council/references.md +90 -0
- package/rihal/skills/agents/raees-orchestrator/SKILL.md +56 -117
- package/rihal/skills/agents/raees-orchestrator/references.md +47 -0
- package/rihal/skills/core/rihal-advanced-elicitation/SKILL.md +36 -136
- package/rihal/skills/core/rihal-advanced-elicitation/references.md +101 -0
- package/rihal/skills/core/rihal-auth-audit/SKILL.md +93 -0
- package/rihal/skills/core/rihal-brainstorming/SKILL.md +5 -0
- package/rihal/skills/core/rihal-client-gate/SKILL.md +91 -0
- package/rihal/skills/core/rihal-clone-website/SKILL.md +30 -371
- package/rihal/skills/core/rihal-clone-website/references.md +213 -0
- package/rihal/skills/core/rihal-deploy-unify/SKILL.md +87 -0
- package/rihal/skills/core/rihal-distillator/SKILL.md +37 -187
- package/rihal/skills/core/rihal-distillator/references.md +118 -0
- package/rihal/skills/core/rihal-editorial-review-prose/SKILL.md +5 -0
- package/rihal/skills/core/rihal-editorial-review-structure/SKILL.md +45 -183
- package/rihal/skills/core/rihal-editorial-review-structure/references.md +110 -0
- package/rihal/skills/core/rihal-help/SKILL.md +6 -1
- package/rihal/skills/core/rihal-incident-record/SKILL.md +161 -0
- package/rihal/skills/core/rihal-index-docs/SKILL.md +5 -0
- package/rihal/skills/core/rihal-init/SKILL.md +5 -0
- package/rihal/skills/core/rihal-memory-audit/SKILL.md +88 -0
- package/rihal/skills/core/rihal-memory-distill/SKILL.md +87 -0
- package/rihal/skills/core/rihal-memory-init/SKILL.md +77 -0
- package/rihal/skills/core/rihal-memory-update/SKILL.md +73 -0
- package/rihal/skills/core/rihal-mvp-graduate/SKILL.md +116 -0
- package/rihal/skills/core/rihal-ocr-consistency/SKILL.md +106 -0
- package/rihal/skills/core/rihal-party-mode/SKILL.md +5 -0
- package/rihal/skills/core/rihal-rebrand/SKILL.md +133 -0
- package/rihal/skills/core/rihal-review-adversarial-general/SKILL.md +5 -0
- package/rihal/skills/core/rihal-review-edge-case-hunter/SKILL.md +5 -0
- package/rihal/skills/core/rihal-shard-doc/SKILL.md +5 -0
- package/rihal/skills/core/rihal-theme-system/SKILL.md +113 -0
- package/rihal/team.yaml +3 -22
- package/rihal/templates/memory/INDEX.md +46 -0
- package/rihal/templates/memory/change-records/.gitkeep +4 -0
- package/rihal/templates/memory/distillates/project.distillate.md +11 -0
- package/rihal/templates/memory/distillates/stack.distillate.md +11 -0
- package/rihal/templates/memory/incidents/known-issues.md +27 -0
- package/rihal/templates/memory/incidents/post-mortems/.gitkeep +3 -0
- package/rihal/templates/memory/milestones/archive/.gitkeep +2 -0
- package/rihal/templates/memory/milestones/current.md +39 -0
- package/rihal/templates/memory/people/stakeholders.md +25 -0
- package/rihal/templates/memory/people/team.md +35 -0
- package/rihal/templates/memory/project/decisions.md +32 -0
- package/rihal/templates/memory/project/glossary.md +16 -0
- package/rihal/templates/memory/project/stack.md +46 -0
- package/rihal/workflows/audit.md +3 -3
- package/rihal/workflows/code-review.md +32 -1
- package/rihal/workflows/council.md +1 -1
- package/rihal/workflows/discuss-phase-power.md +3 -3
- package/rihal/workflows/do.md +1 -1
- package/rihal/workflows/docs-update.md +4 -4
- package/rihal/workflows/execute.md +61 -5
- package/rihal/workflows/help.md +5 -5
- package/rihal/workflows/karpathy-audit.md +9 -9
- package/rihal/workflows/memory-audit.md +83 -0
- package/rihal/workflows/memory-distill.md +103 -0
- package/rihal/workflows/memory-init.md +102 -0
- package/rihal/workflows/memory-update.md +83 -0
- package/rihal/workflows/plan.md +66 -1
- package/server/dashboard.js +6 -1
- package/server/lib/api.js +8 -2
- package/server/lib/html/client.js +63 -0
- package/server/lib/html/shell.js +5 -0
- package/server/lib/scanner.js +76 -1
- package/rihal/agents/rihal-architect.md +0 -79
- package/rihal/agents/rihal-tech-writer.md +0 -80
- package/rihal/commands/check-implementation-readiness.md +0 -8
- package/rihal/commands/discuss-phase-power.md +0 -11
- package/rihal/commands/karpathy-audit.md +0 -12
- package/rihal/commands/new-project-research.md +0 -11
- package/rihal/commands/new-project-roadmap.md +0 -11
- package/rihal/commands/report.md +0 -10
- package/rihal/commands/review-adversarial.md +0 -8
- package/rihal/commands/review-edge-case-hunter.md +0 -8
package/dist/rcode.js
CHANGED
|
@@ -15952,69 +15952,65 @@ var require_install = __commonJS({
|
|
|
15952
15952
|
console.log(lines.join("\n"));
|
|
15953
15953
|
}
|
|
15954
15954
|
function detectIdeSignals(target) {
|
|
15955
|
-
const signals = { claude: false, cursor: false, gemini: false };
|
|
15955
|
+
const signals = { claude: false, cursor: false, gemini: false, vscode: false, antigravity: false };
|
|
15956
15956
|
if (fs2.existsSync(path2.join(target, ".claude"))) signals.claude = true;
|
|
15957
15957
|
if (fs2.existsSync(path2.join(target, ".cursor"))) signals.cursor = true;
|
|
15958
15958
|
if (fs2.existsSync(path2.join(target, ".gemini"))) signals.gemini = true;
|
|
15959
|
+
if (fs2.existsSync(path2.join(target, ".vscode"))) signals.vscode = true;
|
|
15960
|
+
if (fs2.existsSync(path2.join(target, ".antigravity"))) signals.antigravity = true;
|
|
15959
15961
|
const home = os.homedir();
|
|
15960
15962
|
if (fs2.existsSync(path2.join(home, ".claude"))) signals.claude = true;
|
|
15961
15963
|
if (fs2.existsSync(path2.join(home, ".cursor"))) signals.cursor = true;
|
|
15962
15964
|
if (fs2.existsSync(path2.join(home, ".config", "Cursor"))) signals.cursor = true;
|
|
15963
15965
|
if (fs2.existsSync(path2.join(home, ".gemini"))) signals.gemini = true;
|
|
15966
|
+
if (fs2.existsSync(path2.join(home, ".vscode"))) signals.vscode = true;
|
|
15967
|
+
if (fs2.existsSync(path2.join(home, ".config", "Code"))) signals.vscode = true;
|
|
15968
|
+
if (fs2.existsSync(path2.join(home, ".antigravity"))) signals.antigravity = true;
|
|
15964
15969
|
if (process.env.CURSOR_TRACE_ID || /cursor/i.test(process.env.TERM_PROGRAM || "")) signals.cursor = true;
|
|
15965
15970
|
if (process.env.CLAUDECODE === "1" || process.env.CLAUDE_CODE_ENTRYPOINT) signals.claude = true;
|
|
15971
|
+
if (process.env.VSCODE_PID || /vscode/i.test(process.env.TERM_PROGRAM || "")) signals.vscode = true;
|
|
15966
15972
|
return signals;
|
|
15967
15973
|
}
|
|
15968
15974
|
async function resolveIde(opts) {
|
|
15969
15975
|
if (opts.ideProvided) return opts.ide;
|
|
15970
15976
|
if (opts.yes || !process.stdin.isTTY) return opts.ide || "claude";
|
|
15971
15977
|
const signals = detectIdeSignals(opts.target);
|
|
15972
|
-
const detected = ["claude", "cursor", "gemini"].filter((k) => signals[k]);
|
|
15973
|
-
const choices = [
|
|
15974
|
-
{ key: "1", value: "claude", label: "Claude Code", hint: signals.claude ? dim("(detected)") : "" },
|
|
15975
|
-
{ key: "2", value: "cursor", label: "Cursor", hint: signals.cursor ? dim("(detected)") : "" },
|
|
15976
|
-
{ key: "3", value: "gemini", label: "Gemini CLI", hint: signals.gemini ? dim("(detected)") : dim("(beta \u2014 limited)") }
|
|
15977
|
-
];
|
|
15978
|
+
const detected = ["claude", "cursor", "gemini", "vscode"].filter((k) => signals[k]);
|
|
15978
15979
|
let defaultValue = "claude";
|
|
15979
15980
|
if (detected.length === 1) defaultValue = detected[0];
|
|
15980
|
-
const
|
|
15981
|
-
|
|
15982
|
-
|
|
15983
|
-
|
|
15984
|
-
|
|
15985
|
-
|
|
15986
|
-
|
|
15987
|
-
|
|
15988
|
-
|
|
15981
|
+
const choice = await clack.select({
|
|
15982
|
+
message: "\u{1F3AF} Which editor will you use rcode with?",
|
|
15983
|
+
initialValue: defaultValue,
|
|
15984
|
+
options: [
|
|
15985
|
+
{ value: "claude", label: "Claude Code", hint: signals.claude ? "(detected)" : void 0 },
|
|
15986
|
+
{ value: "cursor", label: "Cursor", hint: signals.cursor ? "(detected)" : void 0 },
|
|
15987
|
+
{ value: "gemini", label: "Gemini CLI", hint: signals.gemini ? "(detected)" : "(beta \u2014 limited)" },
|
|
15988
|
+
{ value: "vscode", label: "VS Code", hint: signals.vscode ? "(detected)" : "(via Continue / Copilot extensions)" },
|
|
15989
|
+
{ value: "antigravity", label: "Antigravity", hint: "(experimental \u2014 installs to .antigravity/)" }
|
|
15990
|
+
]
|
|
15991
|
+
});
|
|
15992
|
+
if (clack.isCancel(choice)) {
|
|
15993
|
+
clack.cancel("Install cancelled.");
|
|
15994
|
+
process.exit(0);
|
|
15989
15995
|
}
|
|
15990
|
-
|
|
15991
|
-
const defaultKey = choices.find((c) => c.value === defaultValue).key;
|
|
15992
|
-
const answer = (await prompt(` Pick an editor [${defaultKey}]: `)).trim().toLowerCase();
|
|
15993
|
-
rl.close();
|
|
15994
|
-
if (!answer) return defaultValue;
|
|
15995
|
-
const byKey = choices.find((c) => c.key === answer);
|
|
15996
|
-
if (byKey) return byKey.value;
|
|
15997
|
-
const byName = choices.find((c) => c.value === answer || c.label.toLowerCase().startsWith(answer));
|
|
15998
|
-
if (byName) return byName.value;
|
|
15999
|
-
console.log(dim(` Unrecognised choice "${answer}" \u2014 falling back to ${defaultValue}.`));
|
|
16000
|
-
return defaultValue;
|
|
15996
|
+
return choice;
|
|
16001
15997
|
}
|
|
16002
15998
|
async function resolveCommitPlanning(opts) {
|
|
16003
15999
|
if (opts.commitPlanning !== null) return opts.commitPlanning;
|
|
16004
16000
|
if (opts.yes || !process.stdin.isTTY) return true;
|
|
16005
|
-
const
|
|
16006
|
-
|
|
16007
|
-
|
|
16008
|
-
|
|
16009
|
-
|
|
16010
|
-
|
|
16011
|
-
|
|
16012
|
-
|
|
16013
|
-
|
|
16014
|
-
|
|
16015
|
-
|
|
16016
|
-
|
|
16017
|
-
return
|
|
16001
|
+
const choice = await clack.select({
|
|
16002
|
+
message: "\u{1F4CB} .planning/ holds PRDs, roadmaps, sprints, SUMMARY files. How should they be tracked?",
|
|
16003
|
+
initialValue: "commit",
|
|
16004
|
+
options: [
|
|
16005
|
+
{ value: "commit", label: "Commit", hint: "collaborators see the same plans (recommended)" },
|
|
16006
|
+
{ value: "gitignore", label: "Gitignore", hint: "planning stays local (good for sensitive PRDs)" }
|
|
16007
|
+
]
|
|
16008
|
+
});
|
|
16009
|
+
if (clack.isCancel(choice)) {
|
|
16010
|
+
clack.cancel("Install cancelled.");
|
|
16011
|
+
process.exit(0);
|
|
16012
|
+
}
|
|
16013
|
+
return choice === "commit";
|
|
16018
16014
|
}
|
|
16019
16015
|
function printHelp2() {
|
|
16020
16016
|
console.log(`
|
|
@@ -16791,6 +16787,7 @@ Say "plan a sprint" or run \`/rihal:sprint-planning\` to break Phase 01 into sto
|
|
|
16791
16787
|
let preserved = 0;
|
|
16792
16788
|
const preservedFiles = [];
|
|
16793
16789
|
const preservedDiffs = [];
|
|
16790
|
+
const conflictedFiles = [];
|
|
16794
16791
|
const spinner = createSpinner(dim(`Installing ${plan.length} files\u2026`), { color: "cyan" }).start();
|
|
16795
16792
|
for (const entry of plan) {
|
|
16796
16793
|
const destPath = path2.join(opts.target, entry.rel);
|
|
@@ -16825,9 +16822,13 @@ Say "plan a sprint" or run \`/rihal:sprint-planning\` to break Phase 01 into sto
|
|
|
16825
16822
|
continue;
|
|
16826
16823
|
}
|
|
16827
16824
|
if (!opts.yes && !opts.nonDestructive) {
|
|
16828
|
-
|
|
16829
|
-
|
|
16830
|
-
|
|
16825
|
+
conflictedFiles.push({
|
|
16826
|
+
rel: relForward,
|
|
16827
|
+
src: entry.src,
|
|
16828
|
+
destPath,
|
|
16829
|
+
existingContent: fs2.readFileSync(destPath, "utf8"),
|
|
16830
|
+
sourceContent: fs2.readFileSync(entry.src, "utf8")
|
|
16831
|
+
});
|
|
16831
16832
|
skipped++;
|
|
16832
16833
|
continue;
|
|
16833
16834
|
}
|
|
@@ -16846,6 +16847,96 @@ Say "plan a sprint" or run \`/rihal:sprint-planning\` to break Phase 01 into sto
|
|
|
16846
16847
|
copied++;
|
|
16847
16848
|
}
|
|
16848
16849
|
spinner.success({ text: ok(`${copied} files installed`) });
|
|
16850
|
+
if (conflictedFiles.length > 0) {
|
|
16851
|
+
const byCategory = { workflows: [], agents: [], commands: [], skills: [], references: [], other: [] };
|
|
16852
|
+
for (const c of conflictedFiles) {
|
|
16853
|
+
if (c.rel.includes("/workflows/")) byCategory.workflows.push(c);
|
|
16854
|
+
else if (c.rel.includes("/agents/")) byCategory.agents.push(c);
|
|
16855
|
+
else if (c.rel.includes("/commands/")) byCategory.commands.push(c);
|
|
16856
|
+
else if (c.rel.includes("/skills/")) byCategory.skills.push(c);
|
|
16857
|
+
else if (c.rel.includes("/references/")) byCategory.references.push(c);
|
|
16858
|
+
else byCategory.other.push(c);
|
|
16859
|
+
}
|
|
16860
|
+
console.log("");
|
|
16861
|
+
console.log(" " + warn(`${conflictedFiles.length} file${conflictedFiles.length === 1 ? "" : "s"} have local edits AND v${readPackageVersion()} updates:`));
|
|
16862
|
+
for (const [cat, list] of Object.entries(byCategory)) {
|
|
16863
|
+
if (list.length === 0) continue;
|
|
16864
|
+
console.log(" " + dim(`${list.length} ${cat}`));
|
|
16865
|
+
}
|
|
16866
|
+
console.log("");
|
|
16867
|
+
if (!opts.yes && process.stdin.isTTY) {
|
|
16868
|
+
const action = await clack.select({
|
|
16869
|
+
message: "How should we handle these?",
|
|
16870
|
+
initialValue: "review",
|
|
16871
|
+
options: [
|
|
16872
|
+
{ value: "review", label: "Review each one", hint: "see the diff, decide per file" },
|
|
16873
|
+
{ value: "upstream", label: "Take v" + readPackageVersion() + " for all", hint: "lose local edits, get all bug fixes" },
|
|
16874
|
+
{ value: "keep", label: "Keep my local edits", hint: "skip v" + readPackageVersion() + " updates for these files (current behaviour)" }
|
|
16875
|
+
]
|
|
16876
|
+
});
|
|
16877
|
+
if (clack.isCancel(action)) {
|
|
16878
|
+
clack.note("Skipped \u2014 local edits preserved.");
|
|
16879
|
+
} else if (action === "upstream") {
|
|
16880
|
+
let applied = 0;
|
|
16881
|
+
for (const c of conflictedFiles) {
|
|
16882
|
+
fs2.writeFileSync(c.destPath, c.sourceContent, "utf8");
|
|
16883
|
+
applied++;
|
|
16884
|
+
}
|
|
16885
|
+
console.log(" " + ok(`Applied v${readPackageVersion()} to ${applied} file${applied === 1 ? "" : "s"}.`));
|
|
16886
|
+
} else if (action === "review") {
|
|
16887
|
+
let applied = 0, kept = 0;
|
|
16888
|
+
for (const c of conflictedFiles) {
|
|
16889
|
+
const patch = createTwoFilesPatch(c.rel, c.rel, c.existingContent, c.sourceContent, "local", "v" + readPackageVersion());
|
|
16890
|
+
let ins = 0, del = 0;
|
|
16891
|
+
for (const line of patch.split("\n")) {
|
|
16892
|
+
if (line.startsWith("+") && !line.startsWith("+++")) ins++;
|
|
16893
|
+
if (line.startsWith("-") && !line.startsWith("---")) del++;
|
|
16894
|
+
}
|
|
16895
|
+
console.log("");
|
|
16896
|
+
console.log(" " + pc.bold(c.rel) + dim(" ") + pc.green(`+${ins}`) + " " + pc.red(`-${del}`));
|
|
16897
|
+
const decision = await clack.select({
|
|
16898
|
+
message: "Take upstream, keep local, or view diff?",
|
|
16899
|
+
initialValue: "view",
|
|
16900
|
+
options: [
|
|
16901
|
+
{ value: "upstream", label: "Take v" + readPackageVersion() },
|
|
16902
|
+
{ value: "keep", label: "Keep local" },
|
|
16903
|
+
{ value: "view", label: "View diff first" }
|
|
16904
|
+
]
|
|
16905
|
+
});
|
|
16906
|
+
let finalAction = decision;
|
|
16907
|
+
if (clack.isCancel(decision) || decision === "view") {
|
|
16908
|
+
for (const line of patch.split("\n").slice(4)) {
|
|
16909
|
+
if (line.startsWith("+")) process.stdout.write(pc.green(line) + "\n");
|
|
16910
|
+
else if (line.startsWith("-")) process.stdout.write(pc.red(line) + "\n");
|
|
16911
|
+
else if (line.startsWith("@")) process.stdout.write(pc.cyan(line) + "\n");
|
|
16912
|
+
else process.stdout.write(dim(line) + "\n");
|
|
16913
|
+
}
|
|
16914
|
+
const after = await clack.select({
|
|
16915
|
+
message: "Now: take upstream or keep local?",
|
|
16916
|
+
initialValue: "keep",
|
|
16917
|
+
options: [
|
|
16918
|
+
{ value: "upstream", label: "Take v" + readPackageVersion() },
|
|
16919
|
+
{ value: "keep", label: "Keep local" }
|
|
16920
|
+
]
|
|
16921
|
+
});
|
|
16922
|
+
finalAction = clack.isCancel(after) ? "keep" : after;
|
|
16923
|
+
}
|
|
16924
|
+
if (finalAction === "upstream") {
|
|
16925
|
+
fs2.writeFileSync(c.destPath, c.sourceContent, "utf8");
|
|
16926
|
+
applied++;
|
|
16927
|
+
} else {
|
|
16928
|
+
kept++;
|
|
16929
|
+
}
|
|
16930
|
+
}
|
|
16931
|
+
console.log(" " + ok(`Review complete: ${applied} applied, ${kept} kept local.`));
|
|
16932
|
+
} else {
|
|
16933
|
+
console.log(" " + dim(`${conflictedFiles.length} file${conflictedFiles.length === 1 ? "" : "s"} kept local. Re-run with --force-overwrite or 'rcode update' anytime.`));
|
|
16934
|
+
}
|
|
16935
|
+
} else {
|
|
16936
|
+
console.log(" " + dim(`Re-run with --force-overwrite to apply v${readPackageVersion()} updates, or pipe through an interactive shell to resolve per-file.`));
|
|
16937
|
+
}
|
|
16938
|
+
console.log("");
|
|
16939
|
+
}
|
|
16849
16940
|
const configDir = path2.join(opts.target, ".rihal", "_config");
|
|
16850
16941
|
ensureDir(configDir);
|
|
16851
16942
|
fs2.writeFileSync(path2.join(configDir, "manifest.yaml"), generateInstallManifest(opts));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzlaa/rcode",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "3.2.0",
|
|
4
|
+
"description": "rcode — the memory bank for AI-driven SaaS teams. Persistent project context, distinctive engineering personas, and phase-based workflows. Built by Rihal. Works in Claude Code, Cursor, Gemini, VS Code, and Antigravity.",
|
|
5
5
|
"main": "cli/index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"rcode": "dist/rcode.js",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rihal-advisor-researcher
|
|
3
3
|
description: Researches a single gray area decision and returns a structured comparison table with rationale. Spawned by discuss-phase advisor mode.
|
|
4
|
-
tools:
|
|
4
|
+
tools: Read, Bash, Grep, Glob, WebSearch, WebFetch
|
|
5
5
|
color: cyan
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rihal-assumptions-analyzer
|
|
3
3
|
description: Deeply analyzes codebase for a phase and returns structured assumptions with evidence. Spawned by discuss-phase assumptions mode.
|
|
4
|
-
tools:
|
|
4
|
+
tools: Read, Bash, Grep, Glob
|
|
5
5
|
color: cyan
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rihal-codebase-mapper
|
|
3
3
|
description: Explores codebase and writes structured analysis documents. Spawned by map-codebase with a focus area (tech, arch, quality, concerns). Writes documents directly to reduce orchestrator context load.
|
|
4
|
-
tools:
|
|
4
|
+
tools: Read, Bash, Grep, Glob, Write
|
|
5
5
|
color: cyan
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -15,7 +15,7 @@ You are the **Documentation Auditor** at Rihal. You are spawned to audit documen
|
|
|
15
15
|
|
|
16
16
|
## Who you are
|
|
17
17
|
|
|
18
|
-
Documentation quality specialist. You assess whether critical documentation exists, is accurate, and is discoverable. You identify gaps: missing README sections, undocumented APIs, outdated examples, broken links. You defer to rihal-
|
|
18
|
+
Documentation quality specialist. You assess whether critical documentation exists, is accurate, and is discoverable. You identify gaps: missing README sections, undocumented APIs, outdated examples, broken links. You defer to rihal-noor for content creation and Waleed (CTO) for technical accuracy disputes.
|
|
19
19
|
|
|
20
20
|
You do not write documentation. You audit and flag issues.
|
|
21
21
|
|
|
@@ -63,9 +63,9 @@ Structured: Coverage summary → Missing docs → Accuracy gaps → Quality issu
|
|
|
63
63
|
|
|
64
64
|
Use command-redirect-format.md. One reason, then command.
|
|
65
65
|
|
|
66
|
-
- Documentation writing → rihal-
|
|
66
|
+
- Documentation writing → rihal-noor
|
|
67
67
|
- Technical accuracy verification → Waleed (CTO)
|
|
68
|
-
- Content updates → rihal-
|
|
68
|
+
- Content updates → rihal-noor
|
|
69
69
|
|
|
70
70
|
## Constraints
|
|
71
71
|
|
|
@@ -17,6 +17,16 @@ Rihal sprint executor. Execute SPRINT.md files atomically, commit each story, ha
|
|
|
17
17
|
**Mandatory Initial Read:** If prompt contains `<files_to_read>`, read every file listed before any other action.
|
|
18
18
|
</role>
|
|
19
19
|
|
|
20
|
+
## Project-specific constraints to load (every invocation)
|
|
21
|
+
|
|
22
|
+
Before executing any commits, load these constraints — they're what new executors get wrong on day one (see #444 for the original incident):
|
|
23
|
+
|
|
24
|
+
- **`.planning/` may be gitignored.** Many Rihal-style projects gitignore the planning directory. To commit SUMMARY.md, VERIFICATION.md, or any other artefact under `.planning/`, you must use `git add -f <path>`. Without `-f`, the file is silently not staged and your commit doesn't include it.
|
|
25
|
+
- **Read `.rihal/config.yaml`** — if `workflow.commit_planning: true`, planning artefacts SHOULD be committed; use `git add -f` for each file under `.planning/`. If `commit_planning: false`, skip the commit step for those files entirely.
|
|
26
|
+
- **Read `.rihal/context/active.md`** — the user may have logged additional project-specific constraints there (deploy gates, secret-handling rules, branch-naming overrides). Honour them.
|
|
27
|
+
|
|
28
|
+
If you commit a file under `.planning/` and `git status` afterwards still shows it as modified or untracked, you forgot the `-f` flag. Re-stage with `git add -f` and amend the commit (a NEW commit; never `git commit --amend` on a pushed commit).
|
|
29
|
+
|
|
20
30
|
## Execution Flow (Slim)
|
|
21
31
|
|
|
22
32
|
1. **Load state** — Extract executor config, phase info, sprint list. Read STATE.md for position/blockers.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rihal-integration-checker
|
|
3
3
|
description: Verifies cross-phase integration and E2E flows. Checks that phases connect properly and user workflows complete end-to-end.
|
|
4
|
-
tools:
|
|
4
|
+
tools: Read, Bash, Grep, Glob
|
|
5
5
|
color: blue
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rihal-noor
|
|
3
|
-
description: Technical Writer & Presentation Lead — spawned by /rihal:council for
|
|
4
|
-
tools: Read, Grep, Glob, Bash, WebFetch
|
|
3
|
+
description: Technical Writer & Presentation Lead — spawned by /rihal:council and /rihal:docs-update for README files, API docs, architecture diagrams (Mermaid), changelogs, migration guides, inline code comments, pitch decks, and blog posts. Defers to Hussain-PM on PRD content, Hanzla on code implementation details, Sadiq on strategic framing.
|
|
4
|
+
tools: Read, Write, Edit, Grep, Glob, Bash, WebFetch
|
|
5
5
|
color: teal
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rihal-phase-researcher
|
|
3
3
|
description: Researches how to implement a phase before planning. Produces RESEARCH.md consumed by rihal-planner. Spawned by /rihal:plan orchestrator.
|
|
4
|
-
tools:
|
|
4
|
+
tools: Read, Write, Bash, Grep, Glob, WebSearch, WebFetch
|
|
5
5
|
color: cyan
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -116,6 +116,31 @@ else: wave = max(waves of dependencies) + 1
|
|
|
116
116
|
|
|
117
117
|
**File ownership:** No overlap in files_modified → can run parallel. Overlap → later depends on earlier.
|
|
118
118
|
|
|
119
|
+
## File-existence verification (BLOCKER — added in v3.1.0 after #441)
|
|
120
|
+
|
|
121
|
+
Before writing each entry into `files_modified`, you MUST verify the file actually exists in the project. Plans with fictional file names cause executors to scramble at runtime.
|
|
122
|
+
|
|
123
|
+
For every candidate path:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
# Try the exact name first
|
|
127
|
+
test -f "<candidate>" && echo "OK" && exit 0
|
|
128
|
+
|
|
129
|
+
# Then try a fuzzy match for renamed/moved files
|
|
130
|
+
find . -type f \( -name "<basename>" -o -iname "*$<short-slug>*" \) \
|
|
131
|
+
-not -path './node_modules/*' -not -path './.git/*' 2>/dev/null
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Apply these rules to every path you put in `files_modified`:
|
|
135
|
+
|
|
136
|
+
- **Exact match exists** → use the verified path verbatim
|
|
137
|
+
- **No exact match, fuzzy match found** → use the fuzzy match's path AND log a note in the SPRINT.md frontmatter (`renamed_from: <original candidate>`)
|
|
138
|
+
- **Neither exact nor fuzzy match** → DO NOT add the path to `files_modified`. Either:
|
|
139
|
+
- Mark it as a CREATE story (the executor will create the file fresh) — set `creates: [<path>]` in the story body
|
|
140
|
+
- OR raise a BLOCKER finding for sprint-checker to surface: file referenced by name but not present and not flagged for creation
|
|
141
|
+
|
|
142
|
+
Sprint-checker enforces this — see `rihal-sprint-checker.md` Mandatory Output Markers section. Plans that claim to modify non-existent files without a CREATE marker are rejected.
|
|
143
|
+
|
|
119
144
|
## Plan Structure
|
|
120
145
|
|
|
121
146
|
```markdown
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rihal-project-researcher
|
|
3
3
|
description: Researches domain ecosystem before roadmap creation. Produces files in .rihal/research/ consumed during roadmap creation. Spawned by /rihal:new-project or /rihal:new-milestone orchestrators.
|
|
4
|
-
tools:
|
|
4
|
+
tools: Read, Write, Bash, Grep, Glob, WebSearch, WebFetch
|
|
5
5
|
color: cyan
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rihal-research-synthesizer
|
|
3
3
|
description: Synthesizes research outputs from parallel researcher agents into SUMMARY.md. Spawned by /rihal:new-project after 4 researcher agents complete.
|
|
4
|
-
tools:
|
|
4
|
+
tools: Read, Write, Bash
|
|
5
5
|
color: purple
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rihal-roadmapper
|
|
3
3
|
description: Creates project roadmaps with phase breakdown, requirement mapping, success criteria derivation, and coverage validation. Spawned by /rihal:new-project orchestrator.
|
|
4
|
-
tools:
|
|
4
|
+
tools: Read, Write, Bash, Glob, Grep
|
|
5
5
|
color: purple
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rihal-sprint-checker
|
|
3
3
|
description: Verifies sprints will achieve phase goal before execution. Goal-backward analysis of sprint quality. Spawned by /rihal:plan orchestrator.
|
|
4
|
-
tools:
|
|
4
|
+
tools: Read, Bash, Glob, Grep
|
|
5
5
|
color: green
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -108,6 +108,24 @@ Each dimension has pass/partial/fail criteria, remediation guidance, and output
|
|
|
108
108
|
3. **Synthesize** — Produce CHECK.md with overall verdict, per-dimension scores, remediation asks.
|
|
109
109
|
4. **Return** — Block execution if critical dimensions fail; proceed with cautions if only partials.
|
|
110
110
|
|
|
111
|
+
## Mandatory output markers (per #440 / #445 fix)
|
|
112
|
+
|
|
113
|
+
Every return from this agent MUST include at least one of these YAML markers — they prove tool invocation actually happened. The orchestrator's malfunction guard in `plan.md` blocks execution if none are present.
|
|
114
|
+
|
|
115
|
+
```yaml
|
|
116
|
+
issues: # always emit, even if empty (issues: [])
|
|
117
|
+
- dimension: <name>
|
|
118
|
+
severity: BLOCKER | WARNING | INFO
|
|
119
|
+
path: <file:line>
|
|
120
|
+
finding: <short text>
|
|
121
|
+
|
|
122
|
+
verified_files: # list every file actually read during verification
|
|
123
|
+
- path: <relative path>
|
|
124
|
+
bytes: <int>
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
If you have not invoked `Read`, `Bash`, `Grep`, or `Glob` during execution, do NOT return — instead, report the failure and stop. Empty narrative output is treated as malfunction, not pass.
|
|
128
|
+
|
|
111
129
|
## On-Demand Rule Files
|
|
112
130
|
|
|
113
131
|
| When you need... | Read |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rihal-verifier
|
|
3
3
|
description: Verifies phase goal achievement through goal-backward analysis. Checks codebase delivers what phase promised, not just that tasks completed. Creates VERIFICATION.md report.
|
|
4
|
-
tools:
|
|
4
|
+
tools: Read, Write, Bash, Grep, Glob
|
|
5
5
|
color: green
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -43,7 +43,7 @@ Precise. Quantified. Trade-off oriented. Every claim cites a number, a constrain
|
|
|
43
43
|
| Code | Description | Skill / workflow |
|
|
44
44
|
|------|-------------|------------------|
|
|
45
45
|
| ADR | Write a single Architecture Decision Record | rihal-create-architecture |
|
|
46
|
-
| RV | Review existing architecture against current code |
|
|
46
|
+
| RV | Review existing architecture against current code | inline |
|
|
47
47
|
| TS | Stack selection — 2-3 options + recommendation | inline |
|
|
48
48
|
| FZ | Feasibility check — can the current stack handle this? | inline |
|
|
49
49
|
| KS | Kill-switch design — exit criteria, sunset plan | inline |
|
|
@@ -64,7 +64,6 @@ Always read on activation:
|
|
|
64
64
|
- Test / QA → Fatima
|
|
65
65
|
- Backend impl detail → Yousef
|
|
66
66
|
- Frontend → Haitham
|
|
67
|
-
- Greenfield system design / multi-team org bets → rihal-architect (senior tier)
|
|
68
67
|
|
|
69
68
|
## Constraints (Waleed-specific)
|
|
70
69
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rihal:code-review
|
|
3
3
|
description: Review source files for bugs, security issues, and code quality problems.
|
|
4
|
-
argument-hint: "<phase> [--depth=quick|standard|deep] [--files=file1,file2,...]"
|
|
4
|
+
argument-hint: "<phase> [--depth=quick|standard|deep] [--files=file1,file2,...] [--karpathy] [--attack] [--edge-cases]"
|
|
5
5
|
allowed-tools:
|
|
6
6
|
- Read
|
|
7
7
|
- Grep
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rcode:memory-audit
|
|
3
|
+
description: Audit the Memory Bank for stale entries, contradictions, and unfilled placeholders — read-only report
|
|
4
|
+
argument-hint: "[--severity {critical|warn|info}]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Bash
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
@.rihal/workflows/memory-audit.md
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rcode:memory-distill
|
|
3
|
+
description: Regenerate Memory Bank distillates — token-optimised lossless compressions for fast LLM context loading
|
|
4
|
+
argument-hint: "[--force] [--target {project|stack|all}]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Bash
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
@.rihal/workflows/memory-distill.md
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rcode:memory-init
|
|
3
|
+
description: Bootstrap the rcode Memory Bank for this project — copies templates, asks 5 questions, populates seed files
|
|
4
|
+
argument-hint: ""
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Bash
|
|
9
|
+
- AskUserQuestion
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
@.rihal/workflows/memory-init.md
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rcode:memory-update
|
|
3
|
+
description: Append a decision, known issue, stakeholder, or milestone update to the Memory Bank from conversation context
|
|
4
|
+
argument-hint: "<content>"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Bash
|
|
9
|
+
- AskUserQuestion
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
@.rihal/workflows/memory-update.md
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"ux-designer": "sonnet",
|
|
42
42
|
"doc-verifier": "haiku",
|
|
43
43
|
"docs-auditor": "haiku",
|
|
44
|
-
"
|
|
44
|
+
"noor": "haiku"
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"ux-designer": "sonnet",
|
|
83
83
|
"doc-verifier": "haiku",
|
|
84
84
|
"docs-auditor": "haiku",
|
|
85
|
-
"
|
|
85
|
+
"noor": "haiku"
|
|
86
86
|
}
|
|
87
87
|
},
|
|
88
88
|
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"ux-designer": "haiku",
|
|
124
124
|
"doc-verifier": "haiku",
|
|
125
125
|
"docs-auditor": "haiku",
|
|
126
|
-
"
|
|
126
|
+
"noor": "haiku"
|
|
127
127
|
}
|
|
128
128
|
},
|
|
129
129
|
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
"ux-designer": "inherit",
|
|
165
165
|
"doc-verifier": "inherit",
|
|
166
166
|
"docs-auditor": "inherit",
|
|
167
|
-
"
|
|
167
|
+
"noor": "inherit"
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
},
|
|
@@ -197,7 +197,7 @@
|
|
|
197
197
|
"model_overrides": {
|
|
198
198
|
"waleed": "opus",
|
|
199
199
|
"code-reviewer": "sonnet",
|
|
200
|
-
"
|
|
200
|
+
"noor": "inherit"
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
},
|
|
@@ -69,7 +69,7 @@ Strong success criteria let you loop independently. Weak criteria ("make it work
|
|
|
69
69
|
|
|
70
70
|
## Enforcement
|
|
71
71
|
|
|
72
|
-
Agents that write or modify code (rihal-executor, rihal-planner, rihal-
|
|
72
|
+
Agents that write or modify code (rihal-executor, rihal-planner, rihal-noor, rihal-codebase-mapper when producing code docs) must:
|
|
73
73
|
1. @-include this file
|
|
74
74
|
2. Apply the 4 principles as hard constraints, not suggestions
|
|
75
75
|
3. Reference the specific principle when refusing to make a change (e.g., "Declining per Karpathy #3: that's adjacent to the requested change but not part of it")
|
|
@@ -60,7 +60,7 @@ Spawn the debug agent with git worktree isolation?
|
|
|
60
60
|
|
|
61
61
|
## Agent enforcement
|
|
62
62
|
|
|
63
|
-
Every Rihal agent that can execute shell commands (rihal-executor, rihal-debugger, rihal-planner, rihal-
|
|
63
|
+
Every Rihal agent that can execute shell commands (rihal-executor, rihal-debugger, rihal-planner, rihal-noor, etc.) must:
|
|
64
64
|
|
|
65
65
|
1. Reject any prompt asking them to perform a banned operation without a prior user-confirmed authorization in their input
|
|
66
66
|
2. Surface a warning if a parent workflow or user prompt tries to include a banned flag
|
|
@@ -87,7 +87,7 @@ These are matched alongside §Create / §Add / §Plan verbs to determine the dis
|
|
|
87
87
|
| plan (verb form — "plan phase N") | `plan` | `/rihal:plan` |
|
|
88
88
|
| story (impl) | `dev story`, `implement story`, `build story` | `/rihal:dev-story` |
|
|
89
89
|
| brainstorm | `brainstorm`, `ideas`, `sochain`, `sochna` | `/rihal:brainstorm` |
|
|
90
|
-
| review (code) | `code review`, `karpathy`, `check my diff` | `/rihal:
|
|
90
|
+
| review (code) | `code review`, `karpathy`, `check my diff` | `/rihal:code-review [--karpathy]` |
|
|
91
91
|
| debug | `debug`, `fix`, `bug`, `error`, `crash`, `kharab`, `theek` | `/rihal:debug` |
|
|
92
92
|
|
|
93
93
|
---
|