@hanzlaa/rcode 3.6.15 → 4.0.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.
Files changed (1484) hide show
  1. package/AGENTS.md +4 -4
  2. package/CLAUDE.md +3 -3
  3. package/CONTRIBUTING.md +86 -68
  4. package/README.md +114 -93
  5. package/cli/agent.js +8 -8
  6. package/cli/config.js +13 -13
  7. package/cli/context.js +23 -23
  8. package/cli/dashboard.js +5 -5
  9. package/cli/digest.js +11 -11
  10. package/cli/doctor.js +22 -22
  11. package/cli/generate-command-skills.cjs +39 -37
  12. package/cli/github-sync.js +33 -27
  13. package/cli/index.js +23 -23
  14. package/cli/install.js +485 -262
  15. package/cli/lib/config.cjs +9 -9
  16. package/cli/lib/fsutil.cjs +3 -3
  17. package/cli/lib/github.cjs +11 -6
  18. package/cli/lib/manifest.cjs +37 -37
  19. package/cli/lib/memory-bank.cjs +23 -18
  20. package/cli/lib/model-profiles.cjs +7 -7
  21. package/cli/lib/prompts.cjs +2 -2
  22. package/cli/lib/schemas.cjs +10 -10
  23. package/cli/nuke.js +42 -42
  24. package/cli/postinstall.js +14 -14
  25. package/cli/set-mode.js +10 -10
  26. package/cli/set-profile.js +5 -5
  27. package/cli/show-model.js +1 -1
  28. package/cli/team.js +5 -5
  29. package/cli/tiers.js +10 -10
  30. package/cli/uninstall.js +136 -136
  31. package/cli/update.js +52 -52
  32. package/dist/rcode.js +341 -21639
  33. package/package.json +4 -6
  34. package/rcode/DOCS-AUDIT.md +14 -0
  35. package/rcode/agents/rcode-advisor-researcher.md +93 -0
  36. package/rcode/agents/rcode-ahmed.md +10 -0
  37. package/rcode/agents/rcode-assumptions-analyzer.md +49 -0
  38. package/rcode/agents/rcode-code-fixer.md +57 -0
  39. package/rcode/agents/rcode-code-reviewer.md +57 -0
  40. package/rcode/agents/rcode-codebase-mapper.md +78 -0
  41. package/rcode/agents/rcode-cross-platform-auditor.md +15 -0
  42. package/rcode/agents/rcode-debugger.md +37 -0
  43. package/rcode/agents/rcode-dep-auditor.md +15 -0
  44. package/rcode/agents/rcode-deviation-analyzer.md +75 -0
  45. package/rcode/agents/rcode-docs-auditor.md +31 -0
  46. package/rcode/agents/rcode-edge-case-hunter.md +95 -0
  47. package/rcode/agents/rcode-executor.md +27 -0
  48. package/rcode/agents/rcode-fatima.md +19 -0
  49. package/rcode/agents/rcode-haitham.md +99 -0
  50. package/rcode/agents/rcode-hanzla.md +18 -0
  51. package/rcode/agents/rcode-hussain-pm.md +19 -0
  52. package/rcode/agents/rcode-i18n-auditor.md +16 -0
  53. package/rcode/agents/rcode-integration-checker.md +61 -0
  54. package/rcode/agents/rcode-khalid.md +99 -0
  55. package/rcode/agents/rcode-layla.md +10 -0
  56. package/rcode/agents/rcode-mariam.md +18 -0
  57. package/rcode/agents/rcode-nasser.md +10 -0
  58. package/rcode/agents/rcode-noor.md +11 -0
  59. package/rcode/agents/rcode-nyquist-auditor.md +24 -0
  60. package/rcode/agents/rcode-observability-auditor.md +16 -0
  61. package/rcode/agents/rcode-omar.md +96 -0
  62. package/rcode/agents/rcode-phase-researcher.md +96 -0
  63. package/rcode/agents/rcode-planner.md +32 -0
  64. package/rcode/agents/rcode-profiler.md +98 -0
  65. package/rcode/agents/rcode-project-researcher.md +94 -0
  66. package/rcode/agents/rcode-remediation-planner.md +56 -0
  67. package/rcode/agents/rcode-research-synthesizer.md +45 -0
  68. package/rcode/agents/rcode-roadmapper.md +48 -0
  69. package/rcode/agents/rcode-sadiq.md +18 -0
  70. package/rcode/agents/rcode-security-adversary.md +98 -0
  71. package/rcode/agents/rcode-security-auditor.md +100 -0
  72. package/rcode/agents/rcode-sprint-checker.md +31 -0
  73. package/rcode/agents/rcode-ui-auditor.md +100 -0
  74. package/rcode/agents/rcode-ux-designer.md +57 -0
  75. package/rcode/agents/rcode-verifier.md +40 -0
  76. package/rcode/agents/rcode-waleed.md +20 -0
  77. package/rcode/agents/rcode-yousef.md +97 -0
  78. package/rcode/agents/rcode-zahra.md +63 -0
  79. package/rcode/agents/rcode-zayd.md +79 -0
  80. package/rcode/agents/rules/codebase-mapper/detailed-guide.md +615 -0
  81. package/rcode/agents/rules/debugger/checkpoint-recovery.md +272 -0
  82. package/rcode/agents/rules/debugger/debug-session-state.md +261 -0
  83. package/rcode/agents/rules/debugger/investigation-protocol.md +298 -0
  84. package/rcode/agents/rules/debugger/scientific-method.md +317 -0
  85. package/rcode/agents/rules/executor/authentication-gates.md +202 -0
  86. package/rcode/agents/rules/executor/deviation-rules.md +191 -0
  87. package/rcode/agents/rules/executor/execution-flow.md +116 -0
  88. package/rcode/agents/rules/executor/self-check.md +241 -0
  89. package/rcode/agents/rules/executor/stub-detection.md +267 -0
  90. package/rcode/agents/rules/executor/summary-creation.md +76 -0
  91. package/rcode/agents/rules/executor/task-commit-protocol.md +309 -0
  92. package/rcode/agents/rules/executor/tdd-flow.md +294 -0
  93. package/rcode/agents/rules/phase-researcher/detailed-guide.md +628 -0
  94. package/rcode/agents/rules/planner/goal-backward-thinking.md +220 -0
  95. package/rcode/agents/rules/planner/task-templates.md +296 -0
  96. package/rcode/agents/rules/project-researcher/detailed-guide.md +589 -0
  97. package/rcode/agents/rules/roadmapper/detailed-guide.md +620 -0
  98. package/rcode/agents/rules/sprint-checker/dimensions.md +414 -0
  99. package/rcode/agents/rules/sprint-checker/process.md +377 -0
  100. package/rcode/agents/rules/verifier/anti-patterns.md +94 -0
  101. package/rcode/agents/rules/verifier/artifact-verification.md +69 -0
  102. package/rcode/agents/rules/verifier/context-loading.md +84 -0
  103. package/rcode/agents/rules/verifier/gap-output.md +51 -0
  104. package/rcode/agents/rules/verifier/key-links.md +56 -0
  105. package/rcode/agents/rules/verifier/requirements-coverage.md +28 -0
  106. package/rcode/agents/rules/verifier/verification-report.md +131 -0
  107. package/rcode/bin/lib/config.cjs +158 -0
  108. package/rcode/bin/lib/council-panel.cjs +663 -0
  109. package/rcode/bin/lib/roadmap.cjs +359 -0
  110. package/rcode/bin/rcode-hooks.cjs +711 -0
  111. package/rcode/bin/rcode-tools.cjs +7366 -0
  112. package/rcode/brain/README.md +38 -0
  113. package/rcode/brain/best-practices/no-autonomous-bypass.md +37 -0
  114. package/rcode/brain/best-practices/no-theoretical-suggestions.md +56 -0
  115. package/rcode/brain/best-practices/research-citation-rule.md +39 -0
  116. package/rcode/brain/best-practices/state-sync-rule.md +43 -0
  117. package/rcode/brain/sources.yaml +62 -0
  118. package/rcode/commands/add-phase.md +18 -0
  119. package/rcode/commands/add-tests.md +18 -0
  120. package/rcode/commands/add-todo.md +8 -0
  121. package/rcode/commands/analyze-dependencies.md +11 -0
  122. package/rcode/commands/audit-fix.md +14 -0
  123. package/rcode/commands/audit-milestone.md +12 -0
  124. package/rcode/commands/audit-uat.md +18 -0
  125. package/rcode/commands/audit.md +8 -0
  126. package/rcode/commands/autonomous.md +19 -0
  127. package/rcode/commands/brainstorm.md +11 -0
  128. package/rcode/commands/capture.md +12 -0
  129. package/rcode/commands/chain.md +8 -0
  130. package/rcode/commands/check-implementation-readiness.md +18 -0
  131. package/rcode/commands/check-todos.md +18 -0
  132. package/rcode/commands/checkpoint-preview.md +13 -0
  133. package/rcode/commands/cleanup.md +18 -0
  134. package/rcode/commands/code-review.md +14 -0
  135. package/rcode/commands/complete-milestone.md +12 -0
  136. package/rcode/commands/config.md +8 -0
  137. package/rcode/commands/correct-course.md +8 -0
  138. package/rcode/commands/council.md +25 -0
  139. package/rcode/commands/create-architecture.md +18 -0
  140. package/rcode/commands/create-epics-and-stories.md +8 -0
  141. package/rcode/commands/create-prd.md +18 -0
  142. package/rcode/commands/create-story.md +8 -0
  143. package/rcode/commands/dashboard.md +10 -0
  144. package/rcode/commands/debug.md +8 -0
  145. package/rcode/commands/decisions.md +10 -0
  146. package/rcode/commands/dev-story.md +8 -0
  147. package/rcode/commands/diagnose-issues.md +18 -0
  148. package/rcode/commands/diff.md +10 -0
  149. package/rcode/commands/discuss-phase-power.md +18 -0
  150. package/rcode/commands/discuss-phase.md +19 -0
  151. package/rcode/commands/discuss.md +23 -0
  152. package/rcode/commands/do.md +22 -0
  153. package/rcode/commands/docs-update.md +14 -0
  154. package/rcode/commands/document-project.md +8 -0
  155. package/rcode/commands/edit-prd.md +18 -0
  156. package/rcode/commands/enable-hooks.md +11 -0
  157. package/rcode/commands/execute-milestone.md +18 -0
  158. package/rcode/commands/execute-sprint.md +13 -0
  159. package/rcode/commands/execute.md +19 -0
  160. package/rcode/commands/explore.md +14 -0
  161. package/rcode/commands/export-to-github.md +11 -0
  162. package/rcode/commands/feature-drift.md +18 -0
  163. package/rcode/commands/forensics.md +11 -0
  164. package/rcode/commands/from-template.md +11 -0
  165. package/rcode/commands/health.md +10 -0
  166. package/rcode/commands/help.md +8 -0
  167. package/rcode/commands/import.md +12 -0
  168. package/rcode/commands/inbox.md +12 -0
  169. package/rcode/commands/init.md +14 -0
  170. package/rcode/commands/insert-phase.md +11 -0
  171. package/rcode/commands/install.md +10 -0
  172. package/rcode/commands/karpathy-audit.md +18 -0
  173. package/rcode/commands/lens-audit.md +70 -0
  174. package/rcode/commands/list-plans.md +11 -0
  175. package/rcode/commands/list-workspaces.md +10 -0
  176. package/rcode/commands/map-codebase.md +14 -0
  177. package/rcode/commands/memory-audit.md +10 -0
  178. package/rcode/commands/memory-distill.md +11 -0
  179. package/rcode/commands/memory-init.md +12 -0
  180. package/rcode/commands/memory-update.md +12 -0
  181. package/rcode/commands/milestone-summary.md +11 -0
  182. package/rcode/commands/new-milestone.md +12 -0
  183. package/rcode/commands/new-project-research.md +18 -0
  184. package/rcode/commands/new-project-roadmap.md +18 -0
  185. package/rcode/commands/new-project.md +13 -0
  186. package/rcode/commands/new-workspace.md +12 -0
  187. package/rcode/commands/next.md +19 -0
  188. package/rcode/commands/note.md +12 -0
  189. package/rcode/commands/notify-test.md +10 -0
  190. package/rcode/commands/pause-work.md +8 -0
  191. package/rcode/commands/phase.md +11 -0
  192. package/rcode/commands/plan-milestone-gaps.md +18 -0
  193. package/rcode/commands/plan-milestone.md +18 -0
  194. package/rcode/commands/plan.md +19 -0
  195. package/rcode/commands/plant-seed.md +18 -0
  196. package/rcode/commands/pr-branch.md +18 -0
  197. package/rcode/commands/prfaq.md +15 -0
  198. package/rcode/commands/profile-user.md +8 -0
  199. package/rcode/commands/progress.md +18 -0
  200. package/rcode/commands/quick.md +14 -0
  201. package/rcode/commands/remove-phase.md +18 -0
  202. package/rcode/commands/remove-workspace.md +11 -0
  203. package/rcode/commands/replay.md +11 -0
  204. package/rcode/commands/rerun.md +11 -0
  205. package/rcode/commands/research-phase.md +18 -0
  206. package/rcode/commands/resume-work.md +8 -0
  207. package/rcode/commands/retrospective.md +18 -0
  208. package/rcode/commands/review-edge-case-hunter.md +18 -0
  209. package/rcode/commands/review-fix.md +14 -0
  210. package/rcode/commands/review.md +18 -0
  211. package/rcode/commands/scaffold-milestone.md +18 -0
  212. package/rcode/commands/scaffold-project.md +18 -0
  213. package/rcode/commands/scaffold-skill.md +18 -0
  214. package/rcode/commands/scan.md +14 -0
  215. package/rcode/commands/secure-phase.md +14 -0
  216. package/rcode/commands/session-report.md +10 -0
  217. package/rcode/commands/settings.md +8 -0
  218. package/rcode/commands/ship.md +30 -0
  219. package/rcode/commands/show.md +10 -0
  220. package/rcode/commands/sprint-planning.md +20 -0
  221. package/rcode/commands/sprint-status.md +21 -0
  222. package/rcode/commands/stats.md +10 -0
  223. package/rcode/commands/status.md +21 -0
  224. package/rcode/commands/ui-phase.md +8 -0
  225. package/rcode/commands/ui-review.md +8 -0
  226. package/rcode/commands/undo.md +14 -0
  227. package/rcode/commands/update.md +11 -0
  228. package/rcode/commands/validate-phase.md +18 -0
  229. package/rcode/commands/validate-prd.md +18 -0
  230. package/rcode/commands/verify-phase.md +18 -0
  231. package/rcode/commands/verify-work.md +19 -0
  232. package/rcode/commands/why.md +10 -0
  233. package/rcode/commands/workstream.md +11 -0
  234. package/rcode/config/model-profiles.json +226 -0
  235. package/rcode/config/model-profiles.schema.json +36 -0
  236. package/rcode/config.yaml +39 -0
  237. package/rcode/digests/README.md +50 -0
  238. package/rcode/digests/fatima.md +24 -0
  239. package/rcode/digests/hussain-pm.md +24 -0
  240. package/rcode/digests/mariam.md +24 -0
  241. package/rcode/digests/sadiq.md +24 -0
  242. package/rcode/digests/waleed.md +24 -0
  243. package/rcode/modules/core.yaml +101 -0
  244. package/rcode/modules/discovery.yaml +50 -0
  245. package/rcode/modules/execution.yaml +66 -0
  246. package/rcode/references/REFERENCES_INDEX.md +109 -0
  247. package/rcode/references/agent-contracts.md +48 -0
  248. package/rcode/references/agent-shared-rules.md +81 -0
  249. package/rcode/references/assumptions-analyzer-playbook.md +82 -0
  250. package/rcode/references/auditor-shared-checklists.md +91 -0
  251. package/rcode/references/auto-init-guard.md +117 -0
  252. package/rcode/references/checkpoints-index.md +53 -0
  253. package/rcode/references/code-fixer-playbook.md +71 -0
  254. package/rcode/references/code-reviewer-playbook.md +71 -0
  255. package/rcode/references/codebase-mapping-process.md +176 -0
  256. package/rcode/references/command-redirect-format.md +62 -0
  257. package/rcode/references/commit-conventions.md +125 -0
  258. package/rcode/references/common-bug-patterns-index.md +44 -0
  259. package/rcode/references/context-budget.md +104 -0
  260. package/rcode/references/continuation-format.md +248 -0
  261. package/rcode/references/council-protocol.md +91 -0
  262. package/rcode/references/debugger-playbook.md +127 -0
  263. package/rcode/references/design-tokens.md +98 -0
  264. package/rcode/references/dispatch-banner.md +157 -0
  265. package/rcode/references/docs-auditor-playbook.md +148 -0
  266. package/rcode/references/execution-protocol.md +155 -0
  267. package/rcode/references/executor-playbook.md +119 -0
  268. package/rcode/references/gate-prompts.md +212 -0
  269. package/rcode/references/gates.md +127 -0
  270. package/rcode/references/git-integration.md +159 -0
  271. package/rcode/references/git-planning-commit.md +185 -0
  272. package/rcode/references/git-preflight.md +117 -0
  273. package/rcode/references/integration-verification-playbook.md +392 -0
  274. package/rcode/references/iterative-retrieval.md +85 -0
  275. package/rcode/references/karpathy-guidelines-full.md +79 -0
  276. package/rcode/references/karpathy-guidelines.md +11 -0
  277. package/rcode/references/model-profile-resolution.md +44 -0
  278. package/rcode/references/model-profiles.md +90 -0
  279. package/rcode/references/no-unauthorized-git-ops.md +73 -0
  280. package/rcode/references/nyquist-auditor-playbook.md +157 -0
  281. package/rcode/references/output-format.md +398 -0
  282. package/rcode/references/output-realism.md +52 -0
  283. package/rcode/references/persona-engineer-shared.md +61 -0
  284. package/rcode/references/phase-argument-parsing.md +35 -0
  285. package/rcode/references/phase-id-conventions.md +101 -0
  286. package/rcode/references/planner-playbook.md +217 -0
  287. package/rcode/references/remediation-planner-playbook.md +75 -0
  288. package/rcode/references/research-synthesis-playbook.md +205 -0
  289. package/rcode/references/researcher-shared.md +87 -0
  290. package/rcode/references/response-style.md +81 -0
  291. package/rcode/references/revision-loop.md +38 -0
  292. package/rcode/references/roadmapper-playbook.md +82 -0
  293. package/rcode/references/sprint-checker-playbook.md +128 -0
  294. package/rcode/references/state-schema.md +366 -0
  295. package/rcode/references/ui-brand.md +254 -0
  296. package/rcode/references/universal-anti-patterns.md +59 -0
  297. package/rcode/references/ux-designer-playbook.md +74 -0
  298. package/rcode/references/verb-dictionary.md +186 -0
  299. package/rcode/references/verification-patterns-index.md +76 -0
  300. package/rcode/references/verification-patterns.md +612 -0
  301. package/rcode/references/verifier-playbook.md +104 -0
  302. package/rcode/references/workstream-flag.md +166 -0
  303. package/rcode/skills/SKILLS_INDEX.md +143 -0
  304. package/rcode/skills/_shared/no-autonomous-bypass.md +37 -0
  305. package/rcode/skills/_shared/research-citation-rule.md +39 -0
  306. package/rcode/skills/_shared/state-sync-rule.md +43 -0
  307. package/rcode/skills/actions/1-analysis/rcode-document-project/SKILL.md +45 -0
  308. package/rcode/skills/actions/1-analysis/rcode-document-project/templates/index-template.md +169 -0
  309. package/rcode/skills/actions/1-analysis/rcode-document-project/templates/project-overview-template.md +103 -0
  310. package/rcode/skills/actions/1-analysis/rcode-document-project/templates/source-tree-template.md +135 -0
  311. package/rcode/skills/actions/1-analysis/rcode-document-project/workflow.md +27 -0
  312. package/rcode/skills/actions/1-analysis/rcode-document-project/workflows/deep-dive-workflow.md +34 -0
  313. package/rcode/skills/actions/1-analysis/rcode-document-project/workflows/full-scan-workflow.md +34 -0
  314. package/rcode/skills/actions/1-analysis/rcode-prfaq/SKILL.md +145 -0
  315. package/rcode/skills/actions/1-analysis/rcode-product-brief/SKILL.md +123 -0
  316. package/rcode/skills/actions/1-analysis/rcode-product-brief/rcode-manifest.json +17 -0
  317. package/rcode/skills/actions/1-analysis/research/rcode-domain-research/SKILL.md +46 -0
  318. package/rcode/skills/actions/1-analysis/research/rcode-domain-research/workflow.md +49 -0
  319. package/rcode/skills/actions/1-analysis/research/rcode-market-research/SKILL.md +45 -0
  320. package/rcode/skills/actions/1-analysis/research/rcode-market-research/workflow.md +49 -0
  321. package/rcode/skills/actions/1-analysis/research/rcode-technical-research/SKILL.md +48 -0
  322. package/rcode/skills/actions/1-analysis/research/rcode-technical-research/workflow.md +50 -0
  323. package/rcode/skills/actions/2-plan/rcode-create-epics-and-stories/SKILL.md +58 -0
  324. package/rcode/skills/actions/2-plan/rcode-create-epics-and-stories/steps/step-02-design-epics.md +212 -0
  325. package/rcode/skills/actions/2-plan/rcode-create-epics-and-stories/steps/step-03-create-stories.md +255 -0
  326. package/rcode/skills/actions/2-plan/rcode-create-epics-and-stories/steps/step-04-final-validation.md +143 -0
  327. package/rcode/skills/actions/2-plan/rcode-create-epics-and-stories/workflow.md +66 -0
  328. package/rcode/skills/actions/2-plan/rcode-create-milestone/SKILL.md +63 -0
  329. package/rcode/skills/actions/2-plan/rcode-create-milestone/steps/README.md +30 -0
  330. package/rcode/skills/actions/2-plan/rcode-create-milestone/steps/step-03-sequencing.md +65 -0
  331. package/rcode/skills/actions/2-plan/rcode-create-milestone/steps/step-05-kill-criteria.md +59 -0
  332. package/rcode/skills/actions/2-plan/rcode-create-milestone/steps/step-06-phase-stubs.md +56 -0
  333. package/rcode/skills/actions/2-plan/rcode-create-milestone/steps/step-07-backlog.md +44 -0
  334. package/rcode/skills/actions/2-plan/rcode-create-milestone/steps/step-08-write-roadmap.md +58 -0
  335. package/rcode/skills/actions/2-plan/rcode-create-milestone/steps/step-09-state-sync.md +62 -0
  336. package/rcode/skills/actions/2-plan/rcode-create-milestone/steps/step-10-complete.md +56 -0
  337. package/rcode/skills/actions/2-plan/rcode-create-milestone/workflow.md +93 -0
  338. package/rcode/skills/actions/2-plan/rcode-create-prd/SKILL.md +80 -0
  339. package/rcode/skills/actions/2-plan/rcode-create-prd/data/prd-purpose.md +197 -0
  340. package/rcode/skills/actions/2-plan/rcode-create-prd/data/project-types.csv +11 -0
  341. package/rcode/skills/actions/2-plan/rcode-create-prd/steps-c/step-02-discovery.md +208 -0
  342. package/rcode/skills/actions/2-plan/rcode-create-prd/steps-c/step-02b-vision.md +142 -0
  343. package/rcode/skills/actions/2-plan/rcode-create-prd/steps-c/step-02c-executive-summary.md +158 -0
  344. package/rcode/skills/actions/2-plan/rcode-create-prd/steps-c/step-03-success.md +214 -0
  345. package/rcode/skills/actions/2-plan/rcode-create-prd/steps-c/step-04-journeys.md +201 -0
  346. package/rcode/skills/actions/2-plan/rcode-create-prd/steps-c/step-05-domain.md +194 -0
  347. package/rcode/skills/actions/2-plan/rcode-create-prd/steps-c/step-06-innovation.md +211 -0
  348. package/rcode/skills/actions/2-plan/rcode-create-prd/steps-c/step-07-project-type.md +222 -0
  349. package/rcode/skills/actions/2-plan/rcode-create-prd/steps-c/step-08-scoping.md +216 -0
  350. package/rcode/skills/actions/2-plan/rcode-create-prd/steps-c/step-09-functional.md +219 -0
  351. package/rcode/skills/actions/2-plan/rcode-create-prd/steps-c/step-10-nonfunctional.md +230 -0
  352. package/rcode/skills/actions/2-plan/rcode-create-prd/steps-c/step-11-polish.md +221 -0
  353. package/rcode/skills/actions/2-plan/rcode-create-prd/steps-c/step-12-complete.md +115 -0
  354. package/rcode/skills/actions/2-plan/rcode-create-prd/workflow.md +64 -0
  355. package/rcode/skills/actions/2-plan/rcode-create-story/SKILL.md +59 -0
  356. package/rcode/skills/actions/2-plan/rcode-create-story/workflow.md +380 -0
  357. package/rcode/skills/actions/2-plan/rcode-create-ux-design/SKILL.md +47 -0
  358. package/rcode/skills/actions/2-plan/rcode-create-ux-design/steps/step-02-discovery.md +190 -0
  359. package/rcode/skills/actions/2-plan/rcode-create-ux-design/steps/step-03-core-experience.md +217 -0
  360. package/rcode/skills/actions/2-plan/rcode-create-ux-design/steps/step-04-emotional-response.md +220 -0
  361. package/rcode/skills/actions/2-plan/rcode-create-ux-design/steps/step-05-inspiration.md +235 -0
  362. package/rcode/skills/actions/2-plan/rcode-create-ux-design/steps/step-06-design-system.md +253 -0
  363. package/rcode/skills/actions/2-plan/rcode-create-ux-design/steps/step-07-defining-experience.md +255 -0
  364. package/rcode/skills/actions/2-plan/rcode-create-ux-design/steps/step-08-visual-foundation.md +225 -0
  365. package/rcode/skills/actions/2-plan/rcode-create-ux-design/steps/step-09-design-directions.md +225 -0
  366. package/rcode/skills/actions/2-plan/rcode-create-ux-design/steps/step-10-user-journeys.md +242 -0
  367. package/rcode/skills/actions/2-plan/rcode-create-ux-design/steps/step-11-component-strategy.md +249 -0
  368. package/rcode/skills/actions/2-plan/rcode-create-ux-design/steps/step-12-ux-patterns.md +238 -0
  369. package/rcode/skills/actions/2-plan/rcode-create-ux-design/steps/step-13-responsive-accessibility.md +265 -0
  370. package/rcode/skills/actions/2-plan/rcode-create-ux-design/steps/step-14-complete.md +171 -0
  371. package/rcode/skills/actions/2-plan/rcode-create-ux-design/workflow.md +36 -0
  372. package/rcode/skills/actions/2-plan/rcode-edit-prd/SKILL.md +45 -0
  373. package/rcode/skills/actions/2-plan/rcode-edit-prd/steps-e/step-e-01-discovery.md +242 -0
  374. package/rcode/skills/actions/2-plan/rcode-edit-prd/steps-e/step-e-01b-legacy-conversion.md +204 -0
  375. package/rcode/skills/actions/2-plan/rcode-edit-prd/steps-e/step-e-02-review.md +245 -0
  376. package/rcode/skills/actions/2-plan/rcode-edit-prd/steps-e/step-e-03-edit.md +250 -0
  377. package/rcode/skills/actions/2-plan/rcode-edit-prd/steps-e/step-e-04-complete.md +165 -0
  378. package/rcode/skills/actions/2-plan/rcode-edit-prd/workflow.md +63 -0
  379. package/rcode/skills/actions/2-plan/rcode-frontend-design/SKILL.md +96 -0
  380. package/rcode/skills/actions/2-plan/rcode-frontend-design/references.md +79 -0
  381. package/rcode/skills/actions/2-plan/rcode-validate-prd/SKILL.md +45 -0
  382. package/rcode/skills/actions/2-plan/rcode-validate-prd/data/prd-purpose.md +197 -0
  383. package/rcode/skills/actions/2-plan/rcode-validate-prd/data/project-types.csv +11 -0
  384. package/rcode/skills/actions/2-plan/rcode-validate-prd/steps-v/step-v-01-discovery.md +221 -0
  385. package/rcode/skills/actions/2-plan/rcode-validate-prd/steps-v/step-v-02-format-detection.md +188 -0
  386. package/rcode/skills/actions/2-plan/rcode-validate-prd/steps-v/step-v-02b-parity-check.md +206 -0
  387. package/rcode/skills/actions/2-plan/rcode-validate-prd/steps-v/step-v-03-density-validation.md +171 -0
  388. package/rcode/skills/actions/2-plan/rcode-validate-prd/steps-v/step-v-11-holistic-quality-validation.md +261 -0
  389. package/rcode/skills/actions/2-plan/rcode-validate-prd/steps-v/step-v-13-report-complete.md +229 -0
  390. package/rcode/skills/actions/2-plan/rcode-validate-prd/workflow.md +62 -0
  391. package/rcode/skills/actions/3-solutioning/rcode-check-implementation-readiness/SKILL.md +46 -0
  392. package/rcode/skills/actions/3-solutioning/rcode-check-implementation-readiness/steps/step-06-final-assessment.md +126 -0
  393. package/rcode/skills/actions/3-solutioning/rcode-check-implementation-readiness/workflow.md +49 -0
  394. package/rcode/skills/actions/3-solutioning/rcode-create-architecture/SKILL.md +50 -0
  395. package/rcode/skills/actions/3-solutioning/rcode-create-architecture/steps/step-02-context.md +224 -0
  396. package/rcode/skills/actions/3-solutioning/rcode-create-architecture/steps/step-03-starter.md +329 -0
  397. package/rcode/skills/actions/3-solutioning/rcode-create-architecture/steps/step-04-decisions.md +318 -0
  398. package/rcode/skills/actions/3-solutioning/rcode-create-architecture/steps/step-05-patterns.md +359 -0
  399. package/rcode/skills/actions/3-solutioning/rcode-create-architecture/steps/step-06-structure.md +379 -0
  400. package/rcode/skills/actions/3-solutioning/rcode-create-architecture/steps/step-07-validation.md +359 -0
  401. package/rcode/skills/actions/3-solutioning/rcode-create-architecture/steps/step-08-complete.md +76 -0
  402. package/rcode/skills/actions/3-solutioning/rcode-create-architecture/workflow.md +38 -0
  403. package/rcode/skills/actions/3-solutioning/rcode-generate-project-context/SKILL.md +47 -0
  404. package/rcode/skills/actions/3-solutioning/rcode-generate-project-context/steps/step-02-generate.md +321 -0
  405. package/rcode/skills/actions/3-solutioning/rcode-generate-project-context/workflow.md +43 -0
  406. package/rcode/skills/actions/4-implementation/rcode-browser-verify/SKILL.md +73 -0
  407. package/rcode/skills/actions/4-implementation/rcode-checkpoint-preview/SKILL.md +75 -0
  408. package/rcode/skills/actions/4-implementation/rcode-ci/SKILL.md +115 -0
  409. package/rcode/skills/actions/4-implementation/rcode-code-review/SKILL.md +59 -0
  410. package/rcode/skills/actions/4-implementation/rcode-code-review/steps/step-02-review.md +38 -0
  411. package/rcode/skills/actions/4-implementation/rcode-code-review/workflow.md +55 -0
  412. package/rcode/skills/actions/4-implementation/rcode-correct-course/SKILL.md +46 -0
  413. package/rcode/skills/actions/4-implementation/rcode-correct-course/workflow.md +267 -0
  414. package/rcode/skills/actions/4-implementation/rcode-debug/SKILL.md +199 -0
  415. package/rcode/skills/actions/4-implementation/rcode-dev-story/SKILL.md +80 -0
  416. package/rcode/skills/actions/4-implementation/rcode-dev-story/workflow.md +537 -0
  417. package/rcode/skills/actions/4-implementation/rcode-git-flow/SKILL.md +93 -0
  418. package/rcode/skills/actions/4-implementation/rcode-harden/SKILL.md +98 -0
  419. package/rcode/skills/actions/4-implementation/rcode-incremental/SKILL.md +53 -0
  420. package/rcode/skills/actions/4-implementation/rcode-migrate/SKILL.md +93 -0
  421. package/rcode/skills/actions/4-implementation/rcode-perf/SKILL.md +99 -0
  422. package/rcode/skills/actions/4-implementation/rcode-prove-it/SKILL.md +67 -0
  423. package/rcode/skills/actions/4-implementation/rcode-qa-generate-e2e-tests/SKILL.md +47 -0
  424. package/rcode/skills/actions/4-implementation/rcode-qa-generate-e2e-tests/checklist.md +33 -0
  425. package/rcode/skills/actions/4-implementation/rcode-qa-generate-e2e-tests/workflow.md +136 -0
  426. package/rcode/skills/actions/4-implementation/rcode-retrospective/SKILL.md +45 -0
  427. package/rcode/skills/actions/4-implementation/rcode-retrospective/workflow.md +1491 -0
  428. package/rcode/skills/actions/4-implementation/rcode-scaffold-project/SKILL.md +91 -0
  429. package/rcode/skills/actions/4-implementation/rcode-scaffold-project/steps/step-03-clone.md +50 -0
  430. package/rcode/skills/actions/4-implementation/rcode-scaffold-project/steps/step-04-post-setup.md +44 -0
  431. package/rcode/skills/actions/4-implementation/rcode-source-truth/SKILL.md +79 -0
  432. package/rcode/skills/actions/4-implementation/rcode-sprint-planning/SKILL.md +63 -0
  433. package/rcode/skills/actions/4-implementation/rcode-sprint-planning/checklist.md +43 -0
  434. package/rcode/skills/actions/4-implementation/rcode-sprint-planning/workflow.md +296 -0
  435. package/rcode/skills/actions/4-implementation/rcode-sprint-status/SKILL.md +48 -0
  436. package/rcode/skills/actions/4-implementation/rcode-sprint-status/workflow.md +214 -0
  437. package/rcode/skills/actions/4-implementation/rcode-trim/SKILL.md +76 -0
  438. package/rcode/skills/agents/ahmed-hassani-director/SKILL.md +156 -0
  439. package/rcode/skills/agents/dalil-scout/SKILL.md +135 -0
  440. package/rcode/skills/agents/dalil-scout/references.md +67 -0
  441. package/rcode/skills/agents/fatima-qa/SKILL.md +158 -0
  442. package/rcode/skills/agents/fatima-qa/skill-manifest.yaml +11 -0
  443. package/rcode/skills/agents/haitham-frontend/SKILL.md +151 -0
  444. package/rcode/skills/agents/hanzla-engineer/SKILL.md +159 -0
  445. package/rcode/skills/agents/hanzla-engineer/skill-manifest.yaml +11 -0
  446. package/rcode/skills/agents/hussain-pm/SKILL.md +167 -0
  447. package/rcode/skills/agents/hussain-pm/skill-manifest.yaml +11 -0
  448. package/rcode/skills/agents/hussain-sm/SKILL.md +141 -0
  449. package/rcode/skills/agents/hussain-sm/skill-manifest.yaml +11 -0
  450. package/rcode/skills/agents/layla-designer/SKILL.md +125 -0
  451. package/rcode/skills/agents/layla-designer/skill-manifest.yaml +11 -0
  452. package/rcode/skills/agents/majlis-council/SKILL.md +116 -0
  453. package/rcode/skills/agents/majlis-council/references.md +90 -0
  454. package/rcode/skills/agents/mariam-marketing/SKILL.md +188 -0
  455. package/rcode/skills/agents/nasser-eng-manager/SKILL.md +162 -0
  456. package/rcode/skills/agents/noor-writer/SKILL.md +134 -0
  457. package/rcode/skills/agents/noor-writer/skill-manifest.yaml +11 -0
  458. package/rcode/skills/agents/raees-orchestrator/SKILL.md +122 -0
  459. package/rcode/skills/agents/raees-orchestrator/references.md +47 -0
  460. package/rcode/skills/agents/rcode-cross-platform-auditor/SKILL.md +163 -0
  461. package/rcode/skills/agents/rcode-dep-auditor/SKILL.md +152 -0
  462. package/rcode/skills/agents/rcode-deviation-analyzer/SKILL.md +79 -0
  463. package/rcode/skills/agents/rcode-i18n-auditor/SKILL.md +153 -0
  464. package/rcode/skills/agents/rcode-observability-auditor/SKILL.md +157 -0
  465. package/rcode/skills/agents/sadiq-analyst/SKILL.md +163 -0
  466. package/rcode/skills/agents/sadiq-analyst/skill-manifest.yaml +11 -0
  467. package/rcode/skills/agents/waleed-architect/SKILL.md +154 -0
  468. package/rcode/skills/agents/waleed-architect/skill-manifest.yaml +11 -0
  469. package/rcode/skills/agents/yousef-backend/SKILL.md +164 -0
  470. package/rcode/skills/agents/zahra-branding/SKILL.md +179 -0
  471. package/rcode/skills/agents/zayd-ml/SKILL.md +155 -0
  472. package/rcode/skills/core/module-help.csv +11 -0
  473. package/rcode/skills/core/module.yaml +25 -0
  474. package/rcode/skills/core/rcode-advanced-elicitation/SKILL.md +69 -0
  475. package/rcode/skills/core/rcode-auth-audit/SKILL.md +95 -0
  476. package/rcode/skills/core/rcode-brainstorming/SKILL.md +116 -0
  477. package/rcode/skills/core/rcode-brainstorming/steps/step-03-technique-execution.md +401 -0
  478. package/rcode/skills/core/rcode-brainstorming/workflow.md +53 -0
  479. package/rcode/skills/core/rcode-client-gate/SKILL.md +93 -0
  480. package/rcode/skills/core/rcode-clone-website/SKILL.md +87 -0
  481. package/rcode/skills/core/rcode-deploy-unify/SKILL.md +89 -0
  482. package/rcode/skills/core/rcode-distillator/SKILL.md +65 -0
  483. package/rcode/skills/core/rcode-distillator/references.md +118 -0
  484. package/rcode/skills/core/rcode-distillator/resources/distillate-format-reference.md +227 -0
  485. package/rcode/skills/core/rcode-distillator/scripts/analyze_sources.py +300 -0
  486. package/rcode/skills/core/rcode-editorial-review-prose/SKILL.md +127 -0
  487. package/rcode/skills/core/rcode-editorial-review-structure/SKILL.md +75 -0
  488. package/rcode/skills/core/rcode-editorial-review-structure/references.md +110 -0
  489. package/rcode/skills/core/rcode-help/SKILL.md +127 -0
  490. package/rcode/skills/core/rcode-incident-record/SKILL.md +163 -0
  491. package/rcode/skills/core/rcode-index-docs/SKILL.md +105 -0
  492. package/rcode/skills/core/rcode-init/SKILL.md +134 -0
  493. package/rcode/skills/core/rcode-init/resources/core-module.yaml +25 -0
  494. package/rcode/skills/core/rcode-init/scripts/__pycache__/rcode_init.cpython-38.pyc +0 -0
  495. package/rcode/skills/core/rcode-init/scripts/rcode_init.py +593 -0
  496. package/rcode/skills/core/rcode-init/scripts/tests/__pycache__/test_rcode_init.cpython-38.pyc +0 -0
  497. package/rcode/skills/core/rcode-init/scripts/tests/test_rcode_init.py +329 -0
  498. package/rcode/skills/core/rcode-memory-audit/SKILL.md +107 -0
  499. package/rcode/skills/core/rcode-memory-distill/SKILL.md +89 -0
  500. package/rcode/skills/core/rcode-memory-init/SKILL.md +91 -0
  501. package/rcode/skills/core/rcode-memory-update/SKILL.md +87 -0
  502. package/rcode/skills/core/rcode-mvp-graduate/SKILL.md +118 -0
  503. package/rcode/skills/core/rcode-ocr-consistency/SKILL.md +108 -0
  504. package/rcode/skills/core/rcode-party-mode/SKILL.md +98 -0
  505. package/rcode/skills/core/rcode-party-mode/steps/step-01-agent-loading.md +138 -0
  506. package/rcode/skills/core/rcode-party-mode/steps/step-02-discussion-orchestration.md +187 -0
  507. package/rcode/skills/core/rcode-party-mode/steps/step-03-graceful-exit.md +167 -0
  508. package/rcode/skills/core/rcode-party-mode/workflow.md +190 -0
  509. package/rcode/skills/core/rcode-rebrand/SKILL.md +135 -0
  510. package/rcode/skills/core/rcode-review-adversarial-general/SKILL.md +74 -0
  511. package/rcode/skills/core/rcode-review-edge-case-hunter/SKILL.md +122 -0
  512. package/rcode/skills/core/rcode-shard-doc/SKILL.md +157 -0
  513. package/rcode/skills/core/rcode-theme-system/SKILL.md +115 -0
  514. package/rcode/skills/rcode-init/SKILL.md +134 -0
  515. package/rcode/state.json +21 -0
  516. package/rcode/team.yaml +523 -0
  517. package/rcode/templates/RESEARCH.md +84 -0
  518. package/rcode/templates/UAT.md +80 -0
  519. package/rcode/templates/VALIDATION.md +45 -0
  520. package/rcode/templates/github/bug-template.md +53 -0
  521. package/rcode/templates/github/epic-template.md +57 -0
  522. package/rcode/templates/github/feature-template.md +55 -0
  523. package/rcode/templates/github/task-template.md +52 -0
  524. package/rcode/templates/memory/INDEX.md +47 -0
  525. package/rcode/templates/memory/distillates/project.distillate.md +11 -0
  526. package/rcode/templates/memory/distillates/stack.distillate.md +11 -0
  527. package/rcode/templates/memory/project/decisions.md +32 -0
  528. package/rcode/templates/memory/project/design-system.md +128 -0
  529. package/rcode/templates/memory/project/stack.md +46 -0
  530. package/rcode/templates/milestone.md +149 -0
  531. package/rcode/templates/projects/api-backend/PROJECT.md +37 -0
  532. package/rcode/templates/projects/api-backend/template.yaml +17 -0
  533. package/rcode/templates/projects/mobile-app/PROJECT.md +37 -0
  534. package/rcode/templates/projects/mobile-app/template.yaml +17 -0
  535. package/rcode/templates/projects/saas-b2b/PROJECT.md +40 -0
  536. package/rcode/templates/projects/saas-b2b/template.yaml +18 -0
  537. package/rcode/templates/settings-hooks.json +75 -0
  538. package/rcode/templates/summary.md +77 -0
  539. package/rcode/templates/verification-report.md +83 -0
  540. package/rcode/workflows/add-phase.md +193 -0
  541. package/rcode/workflows/add-tests.md +362 -0
  542. package/rcode/workflows/add-todo.md +193 -0
  543. package/rcode/workflows/analyze-dependencies.md +149 -0
  544. package/rcode/workflows/audit-fix.md +211 -0
  545. package/rcode/workflows/audit-milestone.md +193 -0
  546. package/rcode/workflows/audit-plans.md +260 -0
  547. package/rcode/workflows/audit-uat.md +114 -0
  548. package/rcode/workflows/audit-worktrees.md +168 -0
  549. package/rcode/workflows/audit.md +207 -0
  550. package/rcode/workflows/autonomous-smart-discuss.md +253 -0
  551. package/rcode/workflows/autonomous.md +936 -0
  552. package/rcode/workflows/brainstorm.md +219 -0
  553. package/rcode/workflows/capture.md +65 -0
  554. package/rcode/workflows/chain.md +199 -0
  555. package/rcode/workflows/check-implementation-readiness.md +204 -0
  556. package/rcode/workflows/check-todos.md +191 -0
  557. package/rcode/workflows/checkpoint-preview.md +12 -0
  558. package/rcode/workflows/cleanup.md +157 -0
  559. package/rcode/workflows/code-review-fix.md +546 -0
  560. package/rcode/workflows/code-review.md +628 -0
  561. package/rcode/workflows/complete-milestone.md +849 -0
  562. package/rcode/workflows/correct-course.md +207 -0
  563. package/rcode/workflows/council.md +587 -0
  564. package/rcode/workflows/create-architecture.md +36 -0
  565. package/rcode/workflows/create-epics-and-stories.md +388 -0
  566. package/rcode/workflows/create-prd.md +30 -0
  567. package/rcode/workflows/create-story.md +303 -0
  568. package/rcode/workflows/dashboard.md +138 -0
  569. package/rcode/workflows/debug.md +278 -0
  570. package/rcode/workflows/decisions.md +112 -0
  571. package/rcode/workflows/dev-story.md +443 -0
  572. package/rcode/workflows/diagnose-issues.md +92 -0
  573. package/rcode/workflows/diff.md +85 -0
  574. package/rcode/workflows/discuss-phase-discuss-areas.md +275 -0
  575. package/rcode/workflows/discuss-phase-power.md +332 -0
  576. package/rcode/workflows/discuss-phase.md +972 -0
  577. package/rcode/workflows/discuss.md +232 -0
  578. package/rcode/workflows/do.md +438 -0
  579. package/rcode/workflows/docs-update.md +271 -0
  580. package/rcode/workflows/document-project.md +197 -0
  581. package/rcode/workflows/edit-prd.md +36 -0
  582. package/rcode/workflows/enable-hooks.md +112 -0
  583. package/rcode/workflows/execute-milestone.md +144 -0
  584. package/rcode/workflows/execute-regression-gates.md +136 -0
  585. package/rcode/workflows/execute-sprint.md +613 -0
  586. package/rcode/workflows/execute-verify-phase-goal.md +168 -0
  587. package/rcode/workflows/execute-waves.md +462 -0
  588. package/rcode/workflows/execute.md +1062 -0
  589. package/rcode/workflows/explore.md +179 -0
  590. package/rcode/workflows/export-to-github.md +179 -0
  591. package/rcode/workflows/feature-drift.md +248 -0
  592. package/rcode/workflows/forensics.md +215 -0
  593. package/rcode/workflows/from-template.md +178 -0
  594. package/rcode/workflows/health.md +265 -0
  595. package/rcode/workflows/help.md +354 -0
  596. package/rcode/workflows/import.md +326 -0
  597. package/rcode/workflows/inbox.md +425 -0
  598. package/rcode/workflows/init.md +356 -0
  599. package/rcode/workflows/insert-phase.md +122 -0
  600. package/rcode/workflows/install.md +82 -0
  601. package/rcode/workflows/karpathy-audit.md +412 -0
  602. package/rcode/workflows/lens-audit.md +705 -0
  603. package/rcode/workflows/list-plans.md +151 -0
  604. package/rcode/workflows/list-workspaces.md +120 -0
  605. package/rcode/workflows/map-codebase.md +466 -0
  606. package/rcode/workflows/memory-audit.md +150 -0
  607. package/rcode/workflows/memory-distill.md +118 -0
  608. package/rcode/workflows/memory-init.md +111 -0
  609. package/rcode/workflows/memory-update.md +92 -0
  610. package/rcode/workflows/milestone-summary.md +211 -0
  611. package/rcode/workflows/new-milestone.md +644 -0
  612. package/rcode/workflows/new-project-create-roadmap.md +210 -0
  613. package/rcode/workflows/new-project-define-requirements.md +167 -0
  614. package/rcode/workflows/new-project-research-decision.md +254 -0
  615. package/rcode/workflows/new-project-research.md +318 -0
  616. package/rcode/workflows/new-project-roadmap.md +451 -0
  617. package/rcode/workflows/new-project.md +994 -0
  618. package/rcode/workflows/new-workspace.md +172 -0
  619. package/rcode/workflows/next.md +167 -0
  620. package/rcode/workflows/note.md +161 -0
  621. package/rcode/workflows/notify-test.md +118 -0
  622. package/rcode/workflows/pause-work.md +253 -0
  623. package/rcode/workflows/phase.md +94 -0
  624. package/rcode/workflows/plan-milestone-gaps.md +278 -0
  625. package/rcode/workflows/plan-milestone.md +110 -0
  626. package/rcode/workflows/plan-prd-express.md +113 -0
  627. package/rcode/workflows/plan-research-validation.md +320 -0
  628. package/rcode/workflows/plan-spawn-planner.md +261 -0
  629. package/rcode/workflows/plan.md +995 -0
  630. package/rcode/workflows/plant-seed.md +180 -0
  631. package/rcode/workflows/pr-branch.md +134 -0
  632. package/rcode/workflows/prfaq.md +12 -0
  633. package/rcode/workflows/profile-user.md +173 -0
  634. package/rcode/workflows/progress.md +51 -0
  635. package/rcode/workflows/quick.md +213 -0
  636. package/rcode/workflows/remove-phase.md +165 -0
  637. package/rcode/workflows/remove-workspace.md +169 -0
  638. package/rcode/workflows/replay.md +165 -0
  639. package/rcode/workflows/rerun.md +82 -0
  640. package/rcode/workflows/research-phase.md +113 -0
  641. package/rcode/workflows/resume-work.md +336 -0
  642. package/rcode/workflows/retrospective.md +36 -0
  643. package/rcode/workflows/review-adversarial.md +205 -0
  644. package/rcode/workflows/review-edge-case-hunter.md +225 -0
  645. package/rcode/workflows/review.md +297 -0
  646. package/rcode/workflows/scaffold-milestone.md +65 -0
  647. package/rcode/workflows/scaffold-project.md +36 -0
  648. package/rcode/workflows/scaffold-skill.md +142 -0
  649. package/rcode/workflows/scan.md +388 -0
  650. package/rcode/workflows/secure-phase.md +216 -0
  651. package/rcode/workflows/session-report.md +257 -0
  652. package/rcode/workflows/settings.md +189 -0
  653. package/rcode/workflows/ship.md +284 -0
  654. package/rcode/workflows/show.md +74 -0
  655. package/rcode/workflows/sprint-planning.md +208 -0
  656. package/rcode/workflows/sprint-status.md +129 -0
  657. package/rcode/workflows/stats.md +147 -0
  658. package/rcode/workflows/status.md +164 -0
  659. package/rcode/workflows/ui-phase.md +159 -0
  660. package/rcode/workflows/ui-review.md +145 -0
  661. package/rcode/workflows/undo.md +432 -0
  662. package/rcode/workflows/update.md +249 -0
  663. package/rcode/workflows/validate-phase.md +191 -0
  664. package/rcode/workflows/validate-prd.md +36 -0
  665. package/rcode/workflows/verify-phase.md +420 -0
  666. package/rcode/workflows/verify-work.md +733 -0
  667. package/rcode/workflows/why.md +135 -0
  668. package/rcode/workflows/workstream.md +215 -0
  669. package/server/dashboard.js +22 -17
  670. package/server/lib/api.js +26 -7
  671. package/server/lib/html/client/components/App.js +56 -19
  672. package/server/lib/html/client/components/Sidebar.js +15 -2
  673. package/server/lib/html/client/components/Topbar.js +6 -3
  674. package/server/lib/html/client/components/shared.js +9 -9
  675. package/server/lib/html/client/orchestrator.js +17 -17
  676. package/server/lib/html/client/store.js +30 -0
  677. package/server/lib/html/client/util.js +26 -36
  678. package/server/lib/html/client/views/DecisionsView.js +4 -4
  679. package/server/lib/html/client/views/FilesView.js +22 -4
  680. package/server/lib/html/client/views/KanbanView.js +15 -4
  681. package/server/lib/html/client/views/MemoryView.js +7 -7
  682. package/server/lib/html/client/views/OrchestrationView.js +13 -3
  683. package/server/lib/html/client/views/OverviewView.js +49 -9
  684. package/server/lib/html/client/views/PhasesView.js +9 -9
  685. package/server/lib/html/client/views/RoadmapView.js +11 -11
  686. package/server/lib/html/client/views/SprintsView.js +7 -7
  687. package/server/lib/html/client/views/TasksView.js +7 -7
  688. package/server/lib/html/client.js +7 -0
  689. package/server/lib/html/css.js +18 -2
  690. package/server/lib/html/shell.js +27 -4
  691. package/server/lib/scanner.js +26 -21
  692. package/server/orchestrator.js +48 -23
  693. package/rihal/DOCS-AUDIT.md +0 -14
  694. package/rihal/agents/rihal-advisor-researcher.md +0 -93
  695. package/rihal/agents/rihal-ahmed.md +0 -10
  696. package/rihal/agents/rihal-assumptions-analyzer.md +0 -49
  697. package/rihal/agents/rihal-code-fixer.md +0 -57
  698. package/rihal/agents/rihal-code-reviewer.md +0 -57
  699. package/rihal/agents/rihal-codebase-mapper.md +0 -78
  700. package/rihal/agents/rihal-cross-platform-auditor.md +0 -15
  701. package/rihal/agents/rihal-debugger.md +0 -37
  702. package/rihal/agents/rihal-dep-auditor.md +0 -15
  703. package/rihal/agents/rihal-deviation-analyzer.md +0 -75
  704. package/rihal/agents/rihal-docs-auditor.md +0 -31
  705. package/rihal/agents/rihal-edge-case-hunter.md +0 -95
  706. package/rihal/agents/rihal-executor.md +0 -27
  707. package/rihal/agents/rihal-fatima.md +0 -19
  708. package/rihal/agents/rihal-haitham.md +0 -99
  709. package/rihal/agents/rihal-hanzla.md +0 -18
  710. package/rihal/agents/rihal-hussain-pm.md +0 -19
  711. package/rihal/agents/rihal-i18n-auditor.md +0 -16
  712. package/rihal/agents/rihal-integration-checker.md +0 -61
  713. package/rihal/agents/rihal-khalid.md +0 -99
  714. package/rihal/agents/rihal-layla.md +0 -10
  715. package/rihal/agents/rihal-mariam.md +0 -18
  716. package/rihal/agents/rihal-nasser.md +0 -10
  717. package/rihal/agents/rihal-noor.md +0 -11
  718. package/rihal/agents/rihal-nyquist-auditor.md +0 -24
  719. package/rihal/agents/rihal-observability-auditor.md +0 -16
  720. package/rihal/agents/rihal-omar.md +0 -96
  721. package/rihal/agents/rihal-phase-researcher.md +0 -96
  722. package/rihal/agents/rihal-planner.md +0 -32
  723. package/rihal/agents/rihal-profiler.md +0 -98
  724. package/rihal/agents/rihal-project-researcher.md +0 -94
  725. package/rihal/agents/rihal-remediation-planner.md +0 -56
  726. package/rihal/agents/rihal-research-synthesizer.md +0 -45
  727. package/rihal/agents/rihal-roadmapper.md +0 -48
  728. package/rihal/agents/rihal-sadiq.md +0 -18
  729. package/rihal/agents/rihal-security-adversary.md +0 -98
  730. package/rihal/agents/rihal-security-auditor.md +0 -100
  731. package/rihal/agents/rihal-sprint-checker.md +0 -31
  732. package/rihal/agents/rihal-ui-auditor.md +0 -100
  733. package/rihal/agents/rihal-ux-designer.md +0 -57
  734. package/rihal/agents/rihal-verifier.md +0 -40
  735. package/rihal/agents/rihal-waleed.md +0 -20
  736. package/rihal/agents/rihal-yousef.md +0 -97
  737. package/rihal/agents/rihal-zahra.md +0 -63
  738. package/rihal/agents/rihal-zayd.md +0 -79
  739. package/rihal/agents/rules/codebase-mapper/detailed-guide.md +0 -615
  740. package/rihal/agents/rules/debugger/checkpoint-recovery.md +0 -272
  741. package/rihal/agents/rules/debugger/debug-session-state.md +0 -261
  742. package/rihal/agents/rules/debugger/investigation-protocol.md +0 -298
  743. package/rihal/agents/rules/debugger/scientific-method.md +0 -317
  744. package/rihal/agents/rules/executor/authentication-gates.md +0 -202
  745. package/rihal/agents/rules/executor/deviation-rules.md +0 -191
  746. package/rihal/agents/rules/executor/execution-flow.md +0 -116
  747. package/rihal/agents/rules/executor/self-check.md +0 -241
  748. package/rihal/agents/rules/executor/stub-detection.md +0 -267
  749. package/rihal/agents/rules/executor/summary-creation.md +0 -76
  750. package/rihal/agents/rules/executor/task-commit-protocol.md +0 -309
  751. package/rihal/agents/rules/executor/tdd-flow.md +0 -294
  752. package/rihal/agents/rules/phase-researcher/detailed-guide.md +0 -628
  753. package/rihal/agents/rules/planner/goal-backward-thinking.md +0 -220
  754. package/rihal/agents/rules/planner/task-templates.md +0 -296
  755. package/rihal/agents/rules/project-researcher/detailed-guide.md +0 -589
  756. package/rihal/agents/rules/roadmapper/detailed-guide.md +0 -620
  757. package/rihal/agents/rules/sprint-checker/dimensions.md +0 -414
  758. package/rihal/agents/rules/sprint-checker/process.md +0 -377
  759. package/rihal/agents/rules/verifier/anti-patterns.md +0 -94
  760. package/rihal/agents/rules/verifier/artifact-verification.md +0 -69
  761. package/rihal/agents/rules/verifier/context-loading.md +0 -84
  762. package/rihal/agents/rules/verifier/gap-output.md +0 -51
  763. package/rihal/agents/rules/verifier/key-links.md +0 -56
  764. package/rihal/agents/rules/verifier/requirements-coverage.md +0 -28
  765. package/rihal/agents/rules/verifier/verification-report.md +0 -131
  766. package/rihal/bin/lib/config.cjs +0 -158
  767. package/rihal/bin/lib/council-panel.cjs +0 -663
  768. package/rihal/bin/lib/roadmap.cjs +0 -280
  769. package/rihal/bin/rihal-hooks.cjs +0 -709
  770. package/rihal/bin/rihal-tools.cjs +0 -7150
  771. package/rihal/brain/README.md +0 -38
  772. package/rihal/brain/best-practices/no-autonomous-bypass.md +0 -37
  773. package/rihal/brain/best-practices/no-theoretical-suggestions.md +0 -56
  774. package/rihal/brain/best-practices/research-citation-rule.md +0 -39
  775. package/rihal/brain/best-practices/state-sync-rule.md +0 -43
  776. package/rihal/brain/sources.yaml +0 -62
  777. package/rihal/commands/add-phase.md +0 -18
  778. package/rihal/commands/add-tests.md +0 -18
  779. package/rihal/commands/add-todo.md +0 -8
  780. package/rihal/commands/analyze-dependencies.md +0 -11
  781. package/rihal/commands/audit-fix.md +0 -14
  782. package/rihal/commands/audit-milestone.md +0 -12
  783. package/rihal/commands/audit-uat.md +0 -18
  784. package/rihal/commands/audit.md +0 -8
  785. package/rihal/commands/autonomous.md +0 -19
  786. package/rihal/commands/brainstorm.md +0 -11
  787. package/rihal/commands/capture.md +0 -12
  788. package/rihal/commands/chain.md +0 -8
  789. package/rihal/commands/check-implementation-readiness.md +0 -18
  790. package/rihal/commands/check-todos.md +0 -18
  791. package/rihal/commands/checkpoint-preview.md +0 -13
  792. package/rihal/commands/cleanup.md +0 -18
  793. package/rihal/commands/code-review-fix.md +0 -14
  794. package/rihal/commands/code-review.md +0 -14
  795. package/rihal/commands/complete-milestone.md +0 -12
  796. package/rihal/commands/config.md +0 -8
  797. package/rihal/commands/correct-course.md +0 -8
  798. package/rihal/commands/council.md +0 -25
  799. package/rihal/commands/create-architecture.md +0 -18
  800. package/rihal/commands/create-epics-and-stories.md +0 -8
  801. package/rihal/commands/create-prd.md +0 -18
  802. package/rihal/commands/create-story.md +0 -8
  803. package/rihal/commands/dashboard.md +0 -10
  804. package/rihal/commands/debug.md +0 -8
  805. package/rihal/commands/decisions.md +0 -10
  806. package/rihal/commands/dev-story.md +0 -8
  807. package/rihal/commands/diagnose-issues.md +0 -18
  808. package/rihal/commands/diff.md +0 -10
  809. package/rihal/commands/discuss-phase-power.md +0 -18
  810. package/rihal/commands/discuss-phase.md +0 -19
  811. package/rihal/commands/discuss.md +0 -23
  812. package/rihal/commands/do.md +0 -22
  813. package/rihal/commands/docs-update.md +0 -14
  814. package/rihal/commands/document-project.md +0 -8
  815. package/rihal/commands/edit-prd.md +0 -18
  816. package/rihal/commands/enable-hooks.md +0 -11
  817. package/rihal/commands/execute-milestone.md +0 -18
  818. package/rihal/commands/execute-sprint.md +0 -13
  819. package/rihal/commands/execute.md +0 -19
  820. package/rihal/commands/explore.md +0 -14
  821. package/rihal/commands/export-to-github.md +0 -11
  822. package/rihal/commands/feature-drift.md +0 -18
  823. package/rihal/commands/forensics.md +0 -11
  824. package/rihal/commands/from-template.md +0 -11
  825. package/rihal/commands/health.md +0 -10
  826. package/rihal/commands/help.md +0 -8
  827. package/rihal/commands/import.md +0 -12
  828. package/rihal/commands/inbox.md +0 -12
  829. package/rihal/commands/init.md +0 -14
  830. package/rihal/commands/insert-phase.md +0 -11
  831. package/rihal/commands/install.md +0 -10
  832. package/rihal/commands/karpathy-audit.md +0 -18
  833. package/rihal/commands/lens-audit.md +0 -70
  834. package/rihal/commands/list-plans.md +0 -11
  835. package/rihal/commands/list-workspaces.md +0 -10
  836. package/rihal/commands/map-codebase.md +0 -14
  837. package/rihal/commands/memory-audit.md +0 -10
  838. package/rihal/commands/memory-distill.md +0 -11
  839. package/rihal/commands/memory-init.md +0 -12
  840. package/rihal/commands/memory-update.md +0 -12
  841. package/rihal/commands/milestone-summary.md +0 -11
  842. package/rihal/commands/new-milestone.md +0 -12
  843. package/rihal/commands/new-project-research.md +0 -18
  844. package/rihal/commands/new-project-roadmap.md +0 -18
  845. package/rihal/commands/new-project.md +0 -13
  846. package/rihal/commands/new-workspace.md +0 -12
  847. package/rihal/commands/next.md +0 -19
  848. package/rihal/commands/note.md +0 -12
  849. package/rihal/commands/notify-test.md +0 -10
  850. package/rihal/commands/pause-work.md +0 -8
  851. package/rihal/commands/phase.md +0 -11
  852. package/rihal/commands/plan-milestone-gaps.md +0 -18
  853. package/rihal/commands/plan-milestone.md +0 -18
  854. package/rihal/commands/plan.md +0 -19
  855. package/rihal/commands/plant-seed.md +0 -18
  856. package/rihal/commands/pr-branch.md +0 -18
  857. package/rihal/commands/prfaq.md +0 -15
  858. package/rihal/commands/profile-user.md +0 -8
  859. package/rihal/commands/progress.md +0 -18
  860. package/rihal/commands/quick.md +0 -14
  861. package/rihal/commands/remove-phase.md +0 -18
  862. package/rihal/commands/remove-workspace.md +0 -11
  863. package/rihal/commands/replay.md +0 -11
  864. package/rihal/commands/rerun.md +0 -11
  865. package/rihal/commands/research-phase.md +0 -18
  866. package/rihal/commands/resume-work.md +0 -8
  867. package/rihal/commands/retrospective.md +0 -18
  868. package/rihal/commands/review-edge-case-hunter.md +0 -18
  869. package/rihal/commands/review.md +0 -18
  870. package/rihal/commands/scaffold-milestone.md +0 -18
  871. package/rihal/commands/scaffold-project.md +0 -18
  872. package/rihal/commands/scaffold-skill.md +0 -18
  873. package/rihal/commands/scan.md +0 -14
  874. package/rihal/commands/secure-phase.md +0 -14
  875. package/rihal/commands/session-report.md +0 -10
  876. package/rihal/commands/settings.md +0 -8
  877. package/rihal/commands/ship.md +0 -30
  878. package/rihal/commands/show.md +0 -10
  879. package/rihal/commands/sprint-planning.md +0 -20
  880. package/rihal/commands/sprint-status.md +0 -21
  881. package/rihal/commands/stats.md +0 -10
  882. package/rihal/commands/status.md +0 -21
  883. package/rihal/commands/ui-phase.md +0 -8
  884. package/rihal/commands/ui-review.md +0 -8
  885. package/rihal/commands/undo.md +0 -14
  886. package/rihal/commands/update.md +0 -11
  887. package/rihal/commands/validate-phase.md +0 -18
  888. package/rihal/commands/validate-prd.md +0 -18
  889. package/rihal/commands/verify-phase.md +0 -18
  890. package/rihal/commands/verify-work.md +0 -19
  891. package/rihal/commands/why.md +0 -10
  892. package/rihal/commands/workstream.md +0 -11
  893. package/rihal/config/model-profiles.json +0 -226
  894. package/rihal/config/model-profiles.schema.json +0 -36
  895. package/rihal/config.yaml +0 -39
  896. package/rihal/digests/README.md +0 -50
  897. package/rihal/digests/fatima.md +0 -24
  898. package/rihal/digests/hussain-pm.md +0 -24
  899. package/rihal/digests/mariam.md +0 -24
  900. package/rihal/digests/sadiq.md +0 -24
  901. package/rihal/digests/waleed.md +0 -24
  902. package/rihal/modules/core.yaml +0 -101
  903. package/rihal/modules/discovery.yaml +0 -50
  904. package/rihal/modules/execution.yaml +0 -66
  905. package/rihal/references/REFERENCES_INDEX.md +0 -109
  906. package/rihal/references/agent-contracts.md +0 -48
  907. package/rihal/references/agent-shared-rules.md +0 -81
  908. package/rihal/references/assumptions-analyzer-playbook.md +0 -82
  909. package/rihal/references/auditor-shared-checklists.md +0 -91
  910. package/rihal/references/auto-init-guard.md +0 -117
  911. package/rihal/references/checkpoints-index.md +0 -53
  912. package/rihal/references/code-fixer-playbook.md +0 -71
  913. package/rihal/references/code-reviewer-playbook.md +0 -71
  914. package/rihal/references/codebase-mapping-process.md +0 -176
  915. package/rihal/references/command-redirect-format.md +0 -62
  916. package/rihal/references/commit-conventions.md +0 -125
  917. package/rihal/references/common-bug-patterns-index.md +0 -44
  918. package/rihal/references/context-budget.md +0 -104
  919. package/rihal/references/continuation-format.md +0 -248
  920. package/rihal/references/council-protocol.md +0 -91
  921. package/rihal/references/debugger-playbook.md +0 -127
  922. package/rihal/references/design-tokens.md +0 -98
  923. package/rihal/references/dispatch-banner.md +0 -157
  924. package/rihal/references/docs-auditor-playbook.md +0 -148
  925. package/rihal/references/execution-protocol.md +0 -155
  926. package/rihal/references/executor-playbook.md +0 -119
  927. package/rihal/references/gate-prompts.md +0 -212
  928. package/rihal/references/gates.md +0 -127
  929. package/rihal/references/git-integration.md +0 -159
  930. package/rihal/references/git-planning-commit.md +0 -185
  931. package/rihal/references/git-preflight.md +0 -117
  932. package/rihal/references/integration-verification-playbook.md +0 -392
  933. package/rihal/references/iterative-retrieval.md +0 -85
  934. package/rihal/references/karpathy-guidelines-full.md +0 -79
  935. package/rihal/references/karpathy-guidelines.md +0 -11
  936. package/rihal/references/model-profile-resolution.md +0 -44
  937. package/rihal/references/model-profiles.md +0 -90
  938. package/rihal/references/no-unauthorized-git-ops.md +0 -73
  939. package/rihal/references/nyquist-auditor-playbook.md +0 -157
  940. package/rihal/references/output-format.md +0 -398
  941. package/rihal/references/output-realism.md +0 -52
  942. package/rihal/references/persona-engineer-shared.md +0 -61
  943. package/rihal/references/phase-argument-parsing.md +0 -35
  944. package/rihal/references/phase-id-conventions.md +0 -101
  945. package/rihal/references/planner-playbook.md +0 -217
  946. package/rihal/references/remediation-planner-playbook.md +0 -75
  947. package/rihal/references/research-synthesis-playbook.md +0 -205
  948. package/rihal/references/researcher-shared.md +0 -87
  949. package/rihal/references/response-style.md +0 -81
  950. package/rihal/references/revision-loop.md +0 -38
  951. package/rihal/references/roadmapper-playbook.md +0 -82
  952. package/rihal/references/sprint-checker-playbook.md +0 -128
  953. package/rihal/references/state-schema.md +0 -366
  954. package/rihal/references/ui-brand.md +0 -254
  955. package/rihal/references/universal-anti-patterns.md +0 -59
  956. package/rihal/references/ux-designer-playbook.md +0 -74
  957. package/rihal/references/verb-dictionary.md +0 -186
  958. package/rihal/references/verification-patterns-index.md +0 -76
  959. package/rihal/references/verification-patterns.md +0 -612
  960. package/rihal/references/verifier-playbook.md +0 -104
  961. package/rihal/references/workstream-flag.md +0 -166
  962. package/rihal/skills/SKILLS_INDEX.md +0 -143
  963. package/rihal/skills/_shared/no-autonomous-bypass.md +0 -37
  964. package/rihal/skills/_shared/research-citation-rule.md +0 -39
  965. package/rihal/skills/_shared/state-sync-rule.md +0 -43
  966. package/rihal/skills/actions/1-analysis/research/rihal-domain-research/SKILL.md +0 -46
  967. package/rihal/skills/actions/1-analysis/research/rihal-domain-research/workflow.md +0 -49
  968. package/rihal/skills/actions/1-analysis/research/rihal-market-research/SKILL.md +0 -45
  969. package/rihal/skills/actions/1-analysis/research/rihal-market-research/workflow.md +0 -49
  970. package/rihal/skills/actions/1-analysis/research/rihal-technical-research/SKILL.md +0 -48
  971. package/rihal/skills/actions/1-analysis/research/rihal-technical-research/workflow.md +0 -50
  972. package/rihal/skills/actions/1-analysis/rihal-document-project/SKILL.md +0 -45
  973. package/rihal/skills/actions/1-analysis/rihal-document-project/templates/index-template.md +0 -169
  974. package/rihal/skills/actions/1-analysis/rihal-document-project/templates/project-overview-template.md +0 -103
  975. package/rihal/skills/actions/1-analysis/rihal-document-project/templates/source-tree-template.md +0 -135
  976. package/rihal/skills/actions/1-analysis/rihal-document-project/workflow.md +0 -27
  977. package/rihal/skills/actions/1-analysis/rihal-document-project/workflows/deep-dive-workflow.md +0 -34
  978. package/rihal/skills/actions/1-analysis/rihal-document-project/workflows/full-scan-workflow.md +0 -34
  979. package/rihal/skills/actions/1-analysis/rihal-prfaq/SKILL.md +0 -145
  980. package/rihal/skills/actions/1-analysis/rihal-product-brief/SKILL.md +0 -123
  981. package/rihal/skills/actions/1-analysis/rihal-product-brief/rihal-manifest.json +0 -17
  982. package/rihal/skills/actions/2-plan/rihal-create-epics-and-stories/SKILL.md +0 -58
  983. package/rihal/skills/actions/2-plan/rihal-create-epics-and-stories/steps/step-02-design-epics.md +0 -212
  984. package/rihal/skills/actions/2-plan/rihal-create-epics-and-stories/steps/step-03-create-stories.md +0 -255
  985. package/rihal/skills/actions/2-plan/rihal-create-epics-and-stories/steps/step-04-final-validation.md +0 -143
  986. package/rihal/skills/actions/2-plan/rihal-create-epics-and-stories/workflow.md +0 -66
  987. package/rihal/skills/actions/2-plan/rihal-create-milestone/SKILL.md +0 -63
  988. package/rihal/skills/actions/2-plan/rihal-create-milestone/steps/README.md +0 -30
  989. package/rihal/skills/actions/2-plan/rihal-create-milestone/steps/step-03-sequencing.md +0 -65
  990. package/rihal/skills/actions/2-plan/rihal-create-milestone/steps/step-05-kill-criteria.md +0 -59
  991. package/rihal/skills/actions/2-plan/rihal-create-milestone/steps/step-06-phase-stubs.md +0 -56
  992. package/rihal/skills/actions/2-plan/rihal-create-milestone/steps/step-07-backlog.md +0 -44
  993. package/rihal/skills/actions/2-plan/rihal-create-milestone/steps/step-08-write-roadmap.md +0 -58
  994. package/rihal/skills/actions/2-plan/rihal-create-milestone/steps/step-09-state-sync.md +0 -62
  995. package/rihal/skills/actions/2-plan/rihal-create-milestone/steps/step-10-complete.md +0 -56
  996. package/rihal/skills/actions/2-plan/rihal-create-milestone/workflow.md +0 -93
  997. package/rihal/skills/actions/2-plan/rihal-create-prd/SKILL.md +0 -80
  998. package/rihal/skills/actions/2-plan/rihal-create-prd/data/prd-purpose.md +0 -197
  999. package/rihal/skills/actions/2-plan/rihal-create-prd/data/project-types.csv +0 -11
  1000. package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-02-discovery.md +0 -208
  1001. package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-02b-vision.md +0 -142
  1002. package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-02c-executive-summary.md +0 -158
  1003. package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-03-success.md +0 -214
  1004. package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-04-journeys.md +0 -201
  1005. package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-05-domain.md +0 -194
  1006. package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-06-innovation.md +0 -211
  1007. package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-07-project-type.md +0 -222
  1008. package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-08-scoping.md +0 -216
  1009. package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-09-functional.md +0 -219
  1010. package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-10-nonfunctional.md +0 -230
  1011. package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-11-polish.md +0 -221
  1012. package/rihal/skills/actions/2-plan/rihal-create-prd/steps-c/step-12-complete.md +0 -115
  1013. package/rihal/skills/actions/2-plan/rihal-create-prd/workflow.md +0 -64
  1014. package/rihal/skills/actions/2-plan/rihal-create-story/SKILL.md +0 -59
  1015. package/rihal/skills/actions/2-plan/rihal-create-story/workflow.md +0 -380
  1016. package/rihal/skills/actions/2-plan/rihal-create-ux-design/SKILL.md +0 -47
  1017. package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-02-discovery.md +0 -190
  1018. package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-03-core-experience.md +0 -217
  1019. package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-04-emotional-response.md +0 -220
  1020. package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-05-inspiration.md +0 -235
  1021. package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-06-design-system.md +0 -253
  1022. package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-07-defining-experience.md +0 -255
  1023. package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-08-visual-foundation.md +0 -225
  1024. package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-09-design-directions.md +0 -225
  1025. package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-10-user-journeys.md +0 -242
  1026. package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-11-component-strategy.md +0 -249
  1027. package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-12-ux-patterns.md +0 -238
  1028. package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-13-responsive-accessibility.md +0 -265
  1029. package/rihal/skills/actions/2-plan/rihal-create-ux-design/steps/step-14-complete.md +0 -171
  1030. package/rihal/skills/actions/2-plan/rihal-create-ux-design/workflow.md +0 -36
  1031. package/rihal/skills/actions/2-plan/rihal-edit-prd/SKILL.md +0 -45
  1032. package/rihal/skills/actions/2-plan/rihal-edit-prd/steps-e/step-e-01-discovery.md +0 -242
  1033. package/rihal/skills/actions/2-plan/rihal-edit-prd/steps-e/step-e-01b-legacy-conversion.md +0 -204
  1034. package/rihal/skills/actions/2-plan/rihal-edit-prd/steps-e/step-e-02-review.md +0 -245
  1035. package/rihal/skills/actions/2-plan/rihal-edit-prd/steps-e/step-e-03-edit.md +0 -250
  1036. package/rihal/skills/actions/2-plan/rihal-edit-prd/steps-e/step-e-04-complete.md +0 -165
  1037. package/rihal/skills/actions/2-plan/rihal-edit-prd/workflow.md +0 -63
  1038. package/rihal/skills/actions/2-plan/rihal-frontend-design/SKILL.md +0 -96
  1039. package/rihal/skills/actions/2-plan/rihal-frontend-design/references.md +0 -79
  1040. package/rihal/skills/actions/2-plan/rihal-validate-prd/SKILL.md +0 -45
  1041. package/rihal/skills/actions/2-plan/rihal-validate-prd/data/prd-purpose.md +0 -197
  1042. package/rihal/skills/actions/2-plan/rihal-validate-prd/data/project-types.csv +0 -11
  1043. package/rihal/skills/actions/2-plan/rihal-validate-prd/steps-v/step-v-01-discovery.md +0 -221
  1044. package/rihal/skills/actions/2-plan/rihal-validate-prd/steps-v/step-v-02-format-detection.md +0 -188
  1045. package/rihal/skills/actions/2-plan/rihal-validate-prd/steps-v/step-v-02b-parity-check.md +0 -206
  1046. package/rihal/skills/actions/2-plan/rihal-validate-prd/steps-v/step-v-03-density-validation.md +0 -171
  1047. package/rihal/skills/actions/2-plan/rihal-validate-prd/steps-v/step-v-11-holistic-quality-validation.md +0 -261
  1048. package/rihal/skills/actions/2-plan/rihal-validate-prd/steps-v/step-v-13-report-complete.md +0 -229
  1049. package/rihal/skills/actions/2-plan/rihal-validate-prd/workflow.md +0 -62
  1050. package/rihal/skills/actions/3-solutioning/rihal-check-implementation-readiness/SKILL.md +0 -46
  1051. package/rihal/skills/actions/3-solutioning/rihal-check-implementation-readiness/steps/step-06-final-assessment.md +0 -126
  1052. package/rihal/skills/actions/3-solutioning/rihal-check-implementation-readiness/workflow.md +0 -49
  1053. package/rihal/skills/actions/3-solutioning/rihal-create-architecture/SKILL.md +0 -50
  1054. package/rihal/skills/actions/3-solutioning/rihal-create-architecture/steps/step-02-context.md +0 -224
  1055. package/rihal/skills/actions/3-solutioning/rihal-create-architecture/steps/step-03-starter.md +0 -329
  1056. package/rihal/skills/actions/3-solutioning/rihal-create-architecture/steps/step-04-decisions.md +0 -318
  1057. package/rihal/skills/actions/3-solutioning/rihal-create-architecture/steps/step-05-patterns.md +0 -359
  1058. package/rihal/skills/actions/3-solutioning/rihal-create-architecture/steps/step-06-structure.md +0 -379
  1059. package/rihal/skills/actions/3-solutioning/rihal-create-architecture/steps/step-07-validation.md +0 -359
  1060. package/rihal/skills/actions/3-solutioning/rihal-create-architecture/steps/step-08-complete.md +0 -76
  1061. package/rihal/skills/actions/3-solutioning/rihal-create-architecture/workflow.md +0 -38
  1062. package/rihal/skills/actions/3-solutioning/rihal-generate-project-context/SKILL.md +0 -47
  1063. package/rihal/skills/actions/3-solutioning/rihal-generate-project-context/steps/step-02-generate.md +0 -321
  1064. package/rihal/skills/actions/3-solutioning/rihal-generate-project-context/workflow.md +0 -43
  1065. package/rihal/skills/actions/4-implementation/rihal-browser-verify/SKILL.md +0 -73
  1066. package/rihal/skills/actions/4-implementation/rihal-checkpoint-preview/SKILL.md +0 -75
  1067. package/rihal/skills/actions/4-implementation/rihal-ci/SKILL.md +0 -115
  1068. package/rihal/skills/actions/4-implementation/rihal-code-review/SKILL.md +0 -59
  1069. package/rihal/skills/actions/4-implementation/rihal-code-review/steps/step-02-review.md +0 -38
  1070. package/rihal/skills/actions/4-implementation/rihal-code-review/workflow.md +0 -55
  1071. package/rihal/skills/actions/4-implementation/rihal-correct-course/SKILL.md +0 -46
  1072. package/rihal/skills/actions/4-implementation/rihal-correct-course/workflow.md +0 -267
  1073. package/rihal/skills/actions/4-implementation/rihal-debug/SKILL.md +0 -199
  1074. package/rihal/skills/actions/4-implementation/rihal-dev-story/SKILL.md +0 -80
  1075. package/rihal/skills/actions/4-implementation/rihal-dev-story/workflow.md +0 -537
  1076. package/rihal/skills/actions/4-implementation/rihal-git-flow/SKILL.md +0 -93
  1077. package/rihal/skills/actions/4-implementation/rihal-harden/SKILL.md +0 -98
  1078. package/rihal/skills/actions/4-implementation/rihal-incremental/SKILL.md +0 -53
  1079. package/rihal/skills/actions/4-implementation/rihal-migrate/SKILL.md +0 -93
  1080. package/rihal/skills/actions/4-implementation/rihal-perf/SKILL.md +0 -99
  1081. package/rihal/skills/actions/4-implementation/rihal-prove-it/SKILL.md +0 -67
  1082. package/rihal/skills/actions/4-implementation/rihal-qa-generate-e2e-tests/SKILL.md +0 -47
  1083. package/rihal/skills/actions/4-implementation/rihal-qa-generate-e2e-tests/checklist.md +0 -33
  1084. package/rihal/skills/actions/4-implementation/rihal-qa-generate-e2e-tests/workflow.md +0 -136
  1085. package/rihal/skills/actions/4-implementation/rihal-retrospective/SKILL.md +0 -45
  1086. package/rihal/skills/actions/4-implementation/rihal-retrospective/workflow.md +0 -1491
  1087. package/rihal/skills/actions/4-implementation/rihal-scaffold-project/SKILL.md +0 -91
  1088. package/rihal/skills/actions/4-implementation/rihal-scaffold-project/steps/step-03-clone.md +0 -50
  1089. package/rihal/skills/actions/4-implementation/rihal-scaffold-project/steps/step-04-post-setup.md +0 -44
  1090. package/rihal/skills/actions/4-implementation/rihal-source-truth/SKILL.md +0 -79
  1091. package/rihal/skills/actions/4-implementation/rihal-sprint-planning/SKILL.md +0 -63
  1092. package/rihal/skills/actions/4-implementation/rihal-sprint-planning/checklist.md +0 -43
  1093. package/rihal/skills/actions/4-implementation/rihal-sprint-planning/workflow.md +0 -296
  1094. package/rihal/skills/actions/4-implementation/rihal-sprint-status/SKILL.md +0 -44
  1095. package/rihal/skills/actions/4-implementation/rihal-sprint-status/workflow.md +0 -261
  1096. package/rihal/skills/actions/4-implementation/rihal-trim/SKILL.md +0 -76
  1097. package/rihal/skills/agents/ahmed-hassani-director/SKILL.md +0 -150
  1098. package/rihal/skills/agents/dalil-scout/SKILL.md +0 -135
  1099. package/rihal/skills/agents/dalil-scout/references.md +0 -67
  1100. package/rihal/skills/agents/fatima-qa/SKILL.md +0 -158
  1101. package/rihal/skills/agents/fatima-qa/skill-manifest.yaml +0 -11
  1102. package/rihal/skills/agents/haitham-frontend/SKILL.md +0 -151
  1103. package/rihal/skills/agents/hanzla-engineer/SKILL.md +0 -159
  1104. package/rihal/skills/agents/hanzla-engineer/skill-manifest.yaml +0 -11
  1105. package/rihal/skills/agents/hussain-pm/SKILL.md +0 -167
  1106. package/rihal/skills/agents/hussain-pm/skill-manifest.yaml +0 -11
  1107. package/rihal/skills/agents/hussain-sm/SKILL.md +0 -141
  1108. package/rihal/skills/agents/hussain-sm/skill-manifest.yaml +0 -11
  1109. package/rihal/skills/agents/layla-designer/SKILL.md +0 -125
  1110. package/rihal/skills/agents/layla-designer/skill-manifest.yaml +0 -11
  1111. package/rihal/skills/agents/majlis-council/SKILL.md +0 -116
  1112. package/rihal/skills/agents/majlis-council/references.md +0 -90
  1113. package/rihal/skills/agents/mariam-marketing/SKILL.md +0 -182
  1114. package/rihal/skills/agents/nasser-eng-manager/SKILL.md +0 -156
  1115. package/rihal/skills/agents/noor-writer/SKILL.md +0 -134
  1116. package/rihal/skills/agents/noor-writer/skill-manifest.yaml +0 -11
  1117. package/rihal/skills/agents/raees-orchestrator/SKILL.md +0 -122
  1118. package/rihal/skills/agents/raees-orchestrator/references.md +0 -47
  1119. package/rihal/skills/agents/rihal-cross-platform-auditor/SKILL.md +0 -163
  1120. package/rihal/skills/agents/rihal-dep-auditor/SKILL.md +0 -152
  1121. package/rihal/skills/agents/rihal-deviation-analyzer/SKILL.md +0 -79
  1122. package/rihal/skills/agents/rihal-i18n-auditor/SKILL.md +0 -153
  1123. package/rihal/skills/agents/rihal-observability-auditor/SKILL.md +0 -157
  1124. package/rihal/skills/agents/sadiq-analyst/SKILL.md +0 -163
  1125. package/rihal/skills/agents/sadiq-analyst/skill-manifest.yaml +0 -11
  1126. package/rihal/skills/agents/waleed-architect/SKILL.md +0 -154
  1127. package/rihal/skills/agents/waleed-architect/skill-manifest.yaml +0 -11
  1128. package/rihal/skills/agents/yousef-backend/SKILL.md +0 -164
  1129. package/rihal/skills/agents/zahra-branding/SKILL.md +0 -172
  1130. package/rihal/skills/agents/zayd-ml/SKILL.md +0 -155
  1131. package/rihal/skills/core/module-help.csv +0 -11
  1132. package/rihal/skills/core/module.yaml +0 -25
  1133. package/rihal/skills/core/rihal-advanced-elicitation/SKILL.md +0 -69
  1134. package/rihal/skills/core/rihal-auth-audit/SKILL.md +0 -95
  1135. package/rihal/skills/core/rihal-brainstorming/SKILL.md +0 -116
  1136. package/rihal/skills/core/rihal-brainstorming/steps/step-03-technique-execution.md +0 -401
  1137. package/rihal/skills/core/rihal-brainstorming/workflow.md +0 -53
  1138. package/rihal/skills/core/rihal-client-gate/SKILL.md +0 -93
  1139. package/rihal/skills/core/rihal-clone-website/SKILL.md +0 -87
  1140. package/rihal/skills/core/rihal-deploy-unify/SKILL.md +0 -89
  1141. package/rihal/skills/core/rihal-distillator/SKILL.md +0 -65
  1142. package/rihal/skills/core/rihal-distillator/references.md +0 -118
  1143. package/rihal/skills/core/rihal-distillator/resources/distillate-format-reference.md +0 -227
  1144. package/rihal/skills/core/rihal-distillator/scripts/analyze_sources.py +0 -300
  1145. package/rihal/skills/core/rihal-editorial-review-prose/SKILL.md +0 -127
  1146. package/rihal/skills/core/rihal-editorial-review-structure/SKILL.md +0 -75
  1147. package/rihal/skills/core/rihal-editorial-review-structure/references.md +0 -110
  1148. package/rihal/skills/core/rihal-help/SKILL.md +0 -127
  1149. package/rihal/skills/core/rihal-incident-record/SKILL.md +0 -163
  1150. package/rihal/skills/core/rihal-index-docs/SKILL.md +0 -105
  1151. package/rihal/skills/core/rihal-init/SKILL.md +0 -134
  1152. package/rihal/skills/core/rihal-init/resources/core-module.yaml +0 -25
  1153. package/rihal/skills/core/rihal-init/scripts/rihal_init.py +0 -593
  1154. package/rihal/skills/core/rihal-init/scripts/tests/test_rihal_init.py +0 -329
  1155. package/rihal/skills/core/rihal-memory-audit/SKILL.md +0 -107
  1156. package/rihal/skills/core/rihal-memory-distill/SKILL.md +0 -89
  1157. package/rihal/skills/core/rihal-memory-init/SKILL.md +0 -91
  1158. package/rihal/skills/core/rihal-memory-update/SKILL.md +0 -87
  1159. package/rihal/skills/core/rihal-mvp-graduate/SKILL.md +0 -118
  1160. package/rihal/skills/core/rihal-ocr-consistency/SKILL.md +0 -108
  1161. package/rihal/skills/core/rihal-party-mode/SKILL.md +0 -98
  1162. package/rihal/skills/core/rihal-party-mode/steps/step-01-agent-loading.md +0 -138
  1163. package/rihal/skills/core/rihal-party-mode/steps/step-02-discussion-orchestration.md +0 -187
  1164. package/rihal/skills/core/rihal-party-mode/steps/step-03-graceful-exit.md +0 -167
  1165. package/rihal/skills/core/rihal-party-mode/workflow.md +0 -190
  1166. package/rihal/skills/core/rihal-rebrand/SKILL.md +0 -135
  1167. package/rihal/skills/core/rihal-review-adversarial-general/SKILL.md +0 -74
  1168. package/rihal/skills/core/rihal-review-edge-case-hunter/SKILL.md +0 -122
  1169. package/rihal/skills/core/rihal-shard-doc/SKILL.md +0 -144
  1170. package/rihal/skills/core/rihal-theme-system/SKILL.md +0 -115
  1171. package/rihal/state.json +0 -21
  1172. package/rihal/team.yaml +0 -610
  1173. package/rihal/templates/RESEARCH.md +0 -84
  1174. package/rihal/templates/UAT.md +0 -80
  1175. package/rihal/templates/VALIDATION.md +0 -45
  1176. package/rihal/templates/github/bug-template.md +0 -53
  1177. package/rihal/templates/github/epic-template.md +0 -57
  1178. package/rihal/templates/github/feature-template.md +0 -55
  1179. package/rihal/templates/github/task-template.md +0 -52
  1180. package/rihal/templates/memory/INDEX.md +0 -47
  1181. package/rihal/templates/memory/distillates/project.distillate.md +0 -11
  1182. package/rihal/templates/memory/distillates/stack.distillate.md +0 -11
  1183. package/rihal/templates/memory/project/decisions.md +0 -32
  1184. package/rihal/templates/memory/project/design-system.md +0 -128
  1185. package/rihal/templates/memory/project/stack.md +0 -46
  1186. package/rihal/templates/milestone.md +0 -149
  1187. package/rihal/templates/projects/api-backend/PROJECT.md +0 -37
  1188. package/rihal/templates/projects/api-backend/template.yaml +0 -17
  1189. package/rihal/templates/projects/mobile-app/PROJECT.md +0 -37
  1190. package/rihal/templates/projects/mobile-app/template.yaml +0 -17
  1191. package/rihal/templates/projects/saas-b2b/PROJECT.md +0 -40
  1192. package/rihal/templates/projects/saas-b2b/template.yaml +0 -18
  1193. package/rihal/templates/settings-hooks.json +0 -75
  1194. package/rihal/templates/summary.md +0 -77
  1195. package/rihal/templates/verification-report.md +0 -83
  1196. package/rihal/workflows/add-phase.md +0 -183
  1197. package/rihal/workflows/add-tests.md +0 -352
  1198. package/rihal/workflows/add-todo.md +0 -187
  1199. package/rihal/workflows/analyze-dependencies.md +0 -144
  1200. package/rihal/workflows/audit-fix.md +0 -204
  1201. package/rihal/workflows/audit-milestone.md +0 -188
  1202. package/rihal/workflows/audit-plans.md +0 -255
  1203. package/rihal/workflows/audit-uat.md +0 -109
  1204. package/rihal/workflows/audit-worktrees.md +0 -163
  1205. package/rihal/workflows/audit.md +0 -202
  1206. package/rihal/workflows/autonomous-smart-discuss.md +0 -248
  1207. package/rihal/workflows/autonomous.md +0 -931
  1208. package/rihal/workflows/brainstorm.md +0 -203
  1209. package/rihal/workflows/capture.md +0 -60
  1210. package/rihal/workflows/chain.md +0 -188
  1211. package/rihal/workflows/check-implementation-readiness.md +0 -193
  1212. package/rihal/workflows/check-todos.md +0 -181
  1213. package/rihal/workflows/checkpoint-preview.md +0 -7
  1214. package/rihal/workflows/cleanup.md +0 -152
  1215. package/rihal/workflows/code-review-fix.md +0 -534
  1216. package/rihal/workflows/code-review.md +0 -621
  1217. package/rihal/workflows/complete-milestone.md +0 -845
  1218. package/rihal/workflows/correct-course.md +0 -196
  1219. package/rihal/workflows/council.md +0 -582
  1220. package/rihal/workflows/create-architecture.md +0 -31
  1221. package/rihal/workflows/create-epics-and-stories.md +0 -379
  1222. package/rihal/workflows/create-prd.md +0 -25
  1223. package/rihal/workflows/create-story.md +0 -297
  1224. package/rihal/workflows/dashboard.md +0 -133
  1225. package/rihal/workflows/debug.md +0 -272
  1226. package/rihal/workflows/decisions.md +0 -107
  1227. package/rihal/workflows/dev-story.md +0 -437
  1228. package/rihal/workflows/diagnose-issues.md +0 -87
  1229. package/rihal/workflows/diff.md +0 -80
  1230. package/rihal/workflows/discuss-phase-discuss-areas.md +0 -271
  1231. package/rihal/workflows/discuss-phase-power.md +0 -325
  1232. package/rihal/workflows/discuss-phase.md +0 -962
  1233. package/rihal/workflows/discuss.md +0 -227
  1234. package/rihal/workflows/do.md +0 -434
  1235. package/rihal/workflows/docs-update.md +0 -264
  1236. package/rihal/workflows/document-project.md +0 -186
  1237. package/rihal/workflows/edit-prd.md +0 -31
  1238. package/rihal/workflows/enable-hooks.md +0 -107
  1239. package/rihal/workflows/execute-milestone.md +0 -139
  1240. package/rihal/workflows/execute-regression-gates.md +0 -131
  1241. package/rihal/workflows/execute-sprint.md +0 -603
  1242. package/rihal/workflows/execute-verify-phase-goal.md +0 -163
  1243. package/rihal/workflows/execute-waves.md +0 -457
  1244. package/rihal/workflows/execute.md +0 -1051
  1245. package/rihal/workflows/explore.md +0 -171
  1246. package/rihal/workflows/export-to-github.md +0 -174
  1247. package/rihal/workflows/feature-drift.md +0 -243
  1248. package/rihal/workflows/forensics.md +0 -209
  1249. package/rihal/workflows/from-template.md +0 -173
  1250. package/rihal/workflows/health.md +0 -258
  1251. package/rihal/workflows/help.md +0 -343
  1252. package/rihal/workflows/import.md +0 -320
  1253. package/rihal/workflows/inbox.md +0 -418
  1254. package/rihal/workflows/init.md +0 -350
  1255. package/rihal/workflows/insert-phase.md +0 -116
  1256. package/rihal/workflows/install.md +0 -77
  1257. package/rihal/workflows/karpathy-audit.md +0 -402
  1258. package/rihal/workflows/lens-audit.md +0 -705
  1259. package/rihal/workflows/list-plans.md +0 -146
  1260. package/rihal/workflows/list-workspaces.md +0 -115
  1261. package/rihal/workflows/map-codebase.md +0 -455
  1262. package/rihal/workflows/memory-audit.md +0 -145
  1263. package/rihal/workflows/memory-distill.md +0 -113
  1264. package/rihal/workflows/memory-init.md +0 -106
  1265. package/rihal/workflows/memory-update.md +0 -87
  1266. package/rihal/workflows/milestone-summary.md +0 -206
  1267. package/rihal/workflows/new-milestone.md +0 -639
  1268. package/rihal/workflows/new-project-create-roadmap.md +0 -176
  1269. package/rihal/workflows/new-project-define-requirements.md +0 -160
  1270. package/rihal/workflows/new-project-research-decision.md +0 -247
  1271. package/rihal/workflows/new-project-research.md +0 -314
  1272. package/rihal/workflows/new-project-roadmap.md +0 -446
  1273. package/rihal/workflows/new-project.md +0 -992
  1274. package/rihal/workflows/new-workspace.md +0 -167
  1275. package/rihal/workflows/next.md +0 -162
  1276. package/rihal/workflows/note.md +0 -156
  1277. package/rihal/workflows/notify-test.md +0 -113
  1278. package/rihal/workflows/pause-work.md +0 -249
  1279. package/rihal/workflows/phase.md +0 -89
  1280. package/rihal/workflows/plan-milestone-gaps.md +0 -273
  1281. package/rihal/workflows/plan-milestone.md +0 -105
  1282. package/rihal/workflows/plan-prd-express.md +0 -108
  1283. package/rihal/workflows/plan-research-validation.md +0 -313
  1284. package/rihal/workflows/plan-spawn-planner.md +0 -257
  1285. package/rihal/workflows/plan.md +0 -983
  1286. package/rihal/workflows/plant-seed.md +0 -175
  1287. package/rihal/workflows/pr-branch.md +0 -129
  1288. package/rihal/workflows/prfaq.md +0 -7
  1289. package/rihal/workflows/profile-user.md +0 -162
  1290. package/rihal/workflows/progress.md +0 -46
  1291. package/rihal/workflows/quick.md +0 -208
  1292. package/rihal/workflows/remove-phase.md +0 -160
  1293. package/rihal/workflows/remove-workspace.md +0 -164
  1294. package/rihal/workflows/replay.md +0 -160
  1295. package/rihal/workflows/rerun.md +0 -77
  1296. package/rihal/workflows/research-phase.md +0 -108
  1297. package/rihal/workflows/resume-work.md +0 -331
  1298. package/rihal/workflows/retrospective.md +0 -31
  1299. package/rihal/workflows/review-adversarial.md +0 -194
  1300. package/rihal/workflows/review-edge-case-hunter.md +0 -214
  1301. package/rihal/workflows/review.md +0 -287
  1302. package/rihal/workflows/scaffold-milestone.md +0 -60
  1303. package/rihal/workflows/scaffold-project.md +0 -31
  1304. package/rihal/workflows/scaffold-skill.md +0 -137
  1305. package/rihal/workflows/scan.md +0 -382
  1306. package/rihal/workflows/secure-phase.md +0 -209
  1307. package/rihal/workflows/session-report.md +0 -252
  1308. package/rihal/workflows/settings.md +0 -184
  1309. package/rihal/workflows/ship.md +0 -274
  1310. package/rihal/workflows/show.md +0 -69
  1311. package/rihal/workflows/sprint-planning.md +0 -198
  1312. package/rihal/workflows/sprint-status.md +0 -124
  1313. package/rihal/workflows/stats.md +0 -141
  1314. package/rihal/workflows/status.md +0 -148
  1315. package/rihal/workflows/ui-phase.md +0 -148
  1316. package/rihal/workflows/ui-review.md +0 -134
  1317. package/rihal/workflows/undo.md +0 -425
  1318. package/rihal/workflows/update.md +0 -243
  1319. package/rihal/workflows/validate-phase.md +0 -181
  1320. package/rihal/workflows/validate-prd.md +0 -31
  1321. package/rihal/workflows/verify-phase.md +0 -409
  1322. package/rihal/workflows/verify-work.md +0 -731
  1323. package/rihal/workflows/why.md +0 -130
  1324. package/rihal/workflows/workstream.md +0 -209
  1325. /package/{rihal → rcode}/agents/rules/debugger/hypothesis-templates.md +0 -0
  1326. /package/{rihal → rcode}/agents/rules/planner/common-patterns.md +0 -0
  1327. /package/{rihal → rcode}/agents/rules/planner/dependency-analysis.md +0 -0
  1328. /package/{rihal → rcode}/agents/rules/planner/sprint-verification.md +0 -0
  1329. /package/{rihal → rcode}/agents/rules/verifier/behavioral-spot-checks.md +0 -0
  1330. /package/{rihal → rcode}/agents/rules/verifier/data-flow-trace.md +0 -0
  1331. /package/{rihal → rcode}/bin/lib/code-references.cjs +0 -0
  1332. /package/{rihal → rcode}/bin/lib/verify.cjs +0 -0
  1333. /package/{rihal → rcode}/references/brain-methods.csv +0 -0
  1334. /package/{rihal → rcode}/references/checklist-architect.md +0 -0
  1335. /package/{rihal → rcode}/references/checklist-change.md +0 -0
  1336. /package/{rihal → rcode}/references/checklist-pm.md +0 -0
  1337. /package/{rihal → rcode}/references/checklist-po-master.md +0 -0
  1338. /package/{rihal → rcode}/references/checklist-story-dod.md +0 -0
  1339. /package/{rihal → rcode}/references/checklist-story-draft.md +0 -0
  1340. /package/{rihal → rcode}/references/checkpoints.md +0 -0
  1341. /package/{rihal → rcode}/references/codebase-grounding.md +0 -0
  1342. /package/{rihal → rcode}/references/common-bug-patterns.md +0 -0
  1343. /package/{rihal → rcode}/references/domain-probes.md +0 -0
  1344. /package/{rihal → rcode}/references/elicitation-methods.csv +0 -0
  1345. /package/{rihal → rcode}/references/project-types.yaml +0 -0
  1346. /package/{rihal → rcode}/references/questioning.md +0 -0
  1347. /package/{rihal → rcode}/references/tdd.md +0 -0
  1348. /package/{rihal → rcode}/references/thinking-models-debug.md +0 -0
  1349. /package/{rihal → rcode}/references/thinking-models-planning.md +0 -0
  1350. /package/{rihal/skills/actions/1-analysis/rihal-document-project → rcode/skills/actions/1-analysis/rcode-document-project}/checklist.md +0 -0
  1351. /package/{rihal/skills/actions/1-analysis/rihal-document-project → rcode/skills/actions/1-analysis/rcode-document-project}/documentation-requirements.csv +0 -0
  1352. /package/{rihal/skills/actions/1-analysis/rihal-document-project → rcode/skills/actions/1-analysis/rcode-document-project}/instructions.md +0 -0
  1353. /package/{rihal/skills/actions/1-analysis/rihal-document-project → rcode/skills/actions/1-analysis/rcode-document-project}/templates/deep-dive-template.md +0 -0
  1354. /package/{rihal/skills/actions/1-analysis/rihal-document-project → rcode/skills/actions/1-analysis/rcode-document-project}/templates/project-scan-report-schema.json +0 -0
  1355. /package/{rihal/skills/actions/1-analysis/rihal-document-project → rcode/skills/actions/1-analysis/rcode-document-project}/workflows/deep-dive-instructions.md +0 -0
  1356. /package/{rihal/skills/actions/1-analysis/rihal-document-project → rcode/skills/actions/1-analysis/rcode-document-project}/workflows/full-scan-instructions.md +0 -0
  1357. /package/{rihal/skills/actions/1-analysis/rihal-prfaq → rcode/skills/actions/1-analysis/rcode-prfaq}/agents/artifact-analyzer.md +0 -0
  1358. /package/{rihal/skills/actions/1-analysis/rihal-prfaq → rcode/skills/actions/1-analysis/rcode-prfaq}/agents/web-researcher.md +0 -0
  1359. /package/{rihal/skills/actions/1-analysis/rihal-prfaq → rcode/skills/actions/1-analysis/rcode-prfaq}/assets/prfaq-template.md +0 -0
  1360. /package/{rihal/skills/actions/1-analysis/rihal-prfaq/rihal-manifest.json → rcode/skills/actions/1-analysis/rcode-prfaq/rcode-manifest.json} +0 -0
  1361. /package/{rihal/skills/actions/1-analysis/rihal-prfaq → rcode/skills/actions/1-analysis/rcode-prfaq}/references/customer-faq.md +0 -0
  1362. /package/{rihal/skills/actions/1-analysis/rihal-prfaq → rcode/skills/actions/1-analysis/rcode-prfaq}/references/internal-faq.md +0 -0
  1363. /package/{rihal/skills/actions/1-analysis/rihal-prfaq → rcode/skills/actions/1-analysis/rcode-prfaq}/references/press-release.md +0 -0
  1364. /package/{rihal/skills/actions/1-analysis/rihal-prfaq → rcode/skills/actions/1-analysis/rcode-prfaq}/references/verdict.md +0 -0
  1365. /package/{rihal/skills/actions/1-analysis/rihal-product-brief → rcode/skills/actions/1-analysis/rcode-product-brief}/agents/artifact-analyzer.md +0 -0
  1366. /package/{rihal/skills/actions/1-analysis/rihal-product-brief → rcode/skills/actions/1-analysis/rcode-product-brief}/agents/opportunity-reviewer.md +0 -0
  1367. /package/{rihal/skills/actions/1-analysis/rihal-product-brief → rcode/skills/actions/1-analysis/rcode-product-brief}/agents/skeptic-reviewer.md +0 -0
  1368. /package/{rihal/skills/actions/1-analysis/rihal-product-brief → rcode/skills/actions/1-analysis/rcode-product-brief}/agents/web-researcher.md +0 -0
  1369. /package/{rihal/skills/actions/1-analysis/rihal-product-brief → rcode/skills/actions/1-analysis/rcode-product-brief}/prompts/contextual-discovery.md +0 -0
  1370. /package/{rihal/skills/actions/1-analysis/rihal-product-brief → rcode/skills/actions/1-analysis/rcode-product-brief}/prompts/draft-and-review.md +0 -0
  1371. /package/{rihal/skills/actions/1-analysis/rihal-product-brief → rcode/skills/actions/1-analysis/rcode-product-brief}/prompts/finalize.md +0 -0
  1372. /package/{rihal/skills/actions/1-analysis/rihal-product-brief → rcode/skills/actions/1-analysis/rcode-product-brief}/prompts/guided-elicitation.md +0 -0
  1373. /package/{rihal/skills/actions/1-analysis/rihal-product-brief → rcode/skills/actions/1-analysis/rcode-product-brief}/resources/brief-template.md +0 -0
  1374. /package/{rihal/skills/actions/1-analysis/research/rihal-domain-research → rcode/skills/actions/1-analysis/research/rcode-domain-research}/domain-steps/step-01-init.md +0 -0
  1375. /package/{rihal/skills/actions/1-analysis/research/rihal-domain-research → rcode/skills/actions/1-analysis/research/rcode-domain-research}/domain-steps/step-02-domain-analysis.md +0 -0
  1376. /package/{rihal/skills/actions/1-analysis/research/rihal-domain-research → rcode/skills/actions/1-analysis/research/rcode-domain-research}/domain-steps/step-03-competitive-landscape.md +0 -0
  1377. /package/{rihal/skills/actions/1-analysis/research/rihal-domain-research → rcode/skills/actions/1-analysis/research/rcode-domain-research}/domain-steps/step-04-regulatory-focus.md +0 -0
  1378. /package/{rihal/skills/actions/1-analysis/research/rihal-domain-research → rcode/skills/actions/1-analysis/research/rcode-domain-research}/domain-steps/step-05-technical-trends.md +0 -0
  1379. /package/{rihal/skills/actions/1-analysis/research/rihal-domain-research → rcode/skills/actions/1-analysis/research/rcode-domain-research}/domain-steps/step-06-research-synthesis.md +0 -0
  1380. /package/{rihal/skills/actions/1-analysis/research/rihal-domain-research → rcode/skills/actions/1-analysis/research/rcode-domain-research}/research.template.md +0 -0
  1381. /package/{rihal/skills/actions/1-analysis/research/rihal-market-research → rcode/skills/actions/1-analysis/research/rcode-market-research}/research.template.md +0 -0
  1382. /package/{rihal/skills/actions/1-analysis/research/rihal-market-research → rcode/skills/actions/1-analysis/research/rcode-market-research}/steps/step-01-init.md +0 -0
  1383. /package/{rihal/skills/actions/1-analysis/research/rihal-market-research → rcode/skills/actions/1-analysis/research/rcode-market-research}/steps/step-02-customer-behavior.md +0 -0
  1384. /package/{rihal/skills/actions/1-analysis/research/rihal-market-research → rcode/skills/actions/1-analysis/research/rcode-market-research}/steps/step-03-customer-pain-points.md +0 -0
  1385. /package/{rihal/skills/actions/1-analysis/research/rihal-market-research → rcode/skills/actions/1-analysis/research/rcode-market-research}/steps/step-04-customer-decisions.md +0 -0
  1386. /package/{rihal/skills/actions/1-analysis/research/rihal-market-research → rcode/skills/actions/1-analysis/research/rcode-market-research}/steps/step-05-competitive-analysis.md +0 -0
  1387. /package/{rihal/skills/actions/1-analysis/research/rihal-market-research → rcode/skills/actions/1-analysis/research/rcode-market-research}/steps/step-06-research-completion.md +0 -0
  1388. /package/{rihal/skills/actions/1-analysis/research/rihal-technical-research → rcode/skills/actions/1-analysis/research/rcode-technical-research}/research.template.md +0 -0
  1389. /package/{rihal/skills/actions/1-analysis/research/rihal-technical-research → rcode/skills/actions/1-analysis/research/rcode-technical-research}/technical-steps/step-01-init.md +0 -0
  1390. /package/{rihal/skills/actions/1-analysis/research/rihal-technical-research → rcode/skills/actions/1-analysis/research/rcode-technical-research}/technical-steps/step-02-technical-overview.md +0 -0
  1391. /package/{rihal/skills/actions/1-analysis/research/rihal-technical-research → rcode/skills/actions/1-analysis/research/rcode-technical-research}/technical-steps/step-03-integration-patterns.md +0 -0
  1392. /package/{rihal/skills/actions/1-analysis/research/rihal-technical-research → rcode/skills/actions/1-analysis/research/rcode-technical-research}/technical-steps/step-04-architectural-patterns.md +0 -0
  1393. /package/{rihal/skills/actions/1-analysis/research/rihal-technical-research → rcode/skills/actions/1-analysis/research/rcode-technical-research}/technical-steps/step-05-implementation-research.md +0 -0
  1394. /package/{rihal/skills/actions/1-analysis/research/rihal-technical-research → rcode/skills/actions/1-analysis/research/rcode-technical-research}/technical-steps/step-06-research-synthesis.md +0 -0
  1395. /package/{rihal/skills/actions/2-plan/rihal-create-epics-and-stories → rcode/skills/actions/2-plan/rcode-create-epics-and-stories}/steps/step-01-validate-prerequisites.md +0 -0
  1396. /package/{rihal/skills/actions/2-plan/rihal-create-epics-and-stories → rcode/skills/actions/2-plan/rcode-create-epics-and-stories}/templates/epics-template.md +0 -0
  1397. /package/{rihal/skills/actions/2-plan/rihal-create-milestone → rcode/skills/actions/2-plan/rcode-create-milestone}/steps/step-01-init.md +0 -0
  1398. /package/{rihal/skills/actions/2-plan/rihal-create-milestone → rcode/skills/actions/2-plan/rcode-create-milestone}/steps/step-02-outcomes.md +0 -0
  1399. /package/{rihal/skills/actions/2-plan/rihal-create-milestone → rcode/skills/actions/2-plan/rcode-create-milestone}/steps/step-04-windows.md +0 -0
  1400. /package/{rihal/skills/actions/2-plan/rihal-create-prd → rcode/skills/actions/2-plan/rcode-create-prd}/data/domain-complexity.csv +0 -0
  1401. /package/{rihal/skills/actions/2-plan/rihal-create-prd → rcode/skills/actions/2-plan/rcode-create-prd}/steps-c/step-01-init.md +0 -0
  1402. /package/{rihal/skills/actions/2-plan/rihal-create-prd → rcode/skills/actions/2-plan/rcode-create-prd}/steps-c/step-01b-continue.md +0 -0
  1403. /package/{rihal/skills/actions/2-plan/rihal-create-prd → rcode/skills/actions/2-plan/rcode-create-prd}/templates/prd-template.md +0 -0
  1404. /package/{rihal/skills/actions/2-plan/rihal-create-story → rcode/skills/actions/2-plan/rcode-create-story}/checklist.md +0 -0
  1405. /package/{rihal/skills/actions/2-plan/rihal-create-story → rcode/skills/actions/2-plan/rcode-create-story}/discover-inputs.md +0 -0
  1406. /package/{rihal/skills/actions/2-plan/rihal-create-story → rcode/skills/actions/2-plan/rcode-create-story}/template.md +0 -0
  1407. /package/{rihal/skills/actions/2-plan/rihal-create-ux-design → rcode/skills/actions/2-plan/rcode-create-ux-design}/steps/step-01-init.md +0 -0
  1408. /package/{rihal/skills/actions/2-plan/rihal-create-ux-design → rcode/skills/actions/2-plan/rcode-create-ux-design}/steps/step-01b-continue.md +0 -0
  1409. /package/{rihal/skills/actions/2-plan/rihal-create-ux-design → rcode/skills/actions/2-plan/rcode-create-ux-design}/ux-design-template.md +0 -0
  1410. /package/{rihal/skills/actions/2-plan/rihal-validate-prd → rcode/skills/actions/2-plan/rcode-validate-prd}/data/domain-complexity.csv +0 -0
  1411. /package/{rihal/skills/actions/2-plan/rihal-validate-prd → rcode/skills/actions/2-plan/rcode-validate-prd}/steps-v/step-v-04-brief-coverage-validation.md +0 -0
  1412. /package/{rihal/skills/actions/2-plan/rihal-validate-prd → rcode/skills/actions/2-plan/rcode-validate-prd}/steps-v/step-v-05-measurability-validation.md +0 -0
  1413. /package/{rihal/skills/actions/2-plan/rihal-validate-prd → rcode/skills/actions/2-plan/rcode-validate-prd}/steps-v/step-v-06-traceability-validation.md +0 -0
  1414. /package/{rihal/skills/actions/2-plan/rihal-validate-prd → rcode/skills/actions/2-plan/rcode-validate-prd}/steps-v/step-v-07-implementation-leakage-validation.md +0 -0
  1415. /package/{rihal/skills/actions/2-plan/rihal-validate-prd → rcode/skills/actions/2-plan/rcode-validate-prd}/steps-v/step-v-08-domain-compliance-validation.md +0 -0
  1416. /package/{rihal/skills/actions/2-plan/rihal-validate-prd → rcode/skills/actions/2-plan/rcode-validate-prd}/steps-v/step-v-09-project-type-validation.md +0 -0
  1417. /package/{rihal/skills/actions/2-plan/rihal-validate-prd → rcode/skills/actions/2-plan/rcode-validate-prd}/steps-v/step-v-10-smart-validation.md +0 -0
  1418. /package/{rihal/skills/actions/2-plan/rihal-validate-prd → rcode/skills/actions/2-plan/rcode-validate-prd}/steps-v/step-v-12-completeness-validation.md +0 -0
  1419. /package/{rihal/skills/actions/3-solutioning/rihal-check-implementation-readiness → rcode/skills/actions/3-solutioning/rcode-check-implementation-readiness}/steps/step-01-document-discovery.md +0 -0
  1420. /package/{rihal/skills/actions/3-solutioning/rihal-check-implementation-readiness → rcode/skills/actions/3-solutioning/rcode-check-implementation-readiness}/steps/step-02-prd-analysis.md +0 -0
  1421. /package/{rihal/skills/actions/3-solutioning/rihal-check-implementation-readiness → rcode/skills/actions/3-solutioning/rcode-check-implementation-readiness}/steps/step-03-epic-coverage-validation.md +0 -0
  1422. /package/{rihal/skills/actions/3-solutioning/rihal-check-implementation-readiness → rcode/skills/actions/3-solutioning/rcode-check-implementation-readiness}/steps/step-04-ux-alignment.md +0 -0
  1423. /package/{rihal/skills/actions/3-solutioning/rihal-check-implementation-readiness → rcode/skills/actions/3-solutioning/rcode-check-implementation-readiness}/steps/step-05-epic-quality-review.md +0 -0
  1424. /package/{rihal/skills/actions/3-solutioning/rihal-check-implementation-readiness → rcode/skills/actions/3-solutioning/rcode-check-implementation-readiness}/templates/readiness-report-template.md +0 -0
  1425. /package/{rihal/skills/actions/3-solutioning/rihal-create-architecture → rcode/skills/actions/3-solutioning/rcode-create-architecture}/architecture-decision-template.md +0 -0
  1426. /package/{rihal/skills/actions/3-solutioning/rihal-create-architecture → rcode/skills/actions/3-solutioning/rcode-create-architecture}/data/domain-complexity.csv +0 -0
  1427. /package/{rihal/skills/actions/3-solutioning/rihal-create-architecture → rcode/skills/actions/3-solutioning/rcode-create-architecture}/data/project-types.csv +0 -0
  1428. /package/{rihal/skills/actions/3-solutioning/rihal-create-architecture → rcode/skills/actions/3-solutioning/rcode-create-architecture}/steps/step-01-init.md +0 -0
  1429. /package/{rihal/skills/actions/3-solutioning/rihal-create-architecture → rcode/skills/actions/3-solutioning/rcode-create-architecture}/steps/step-01b-continue.md +0 -0
  1430. /package/{rihal/skills/actions/3-solutioning/rihal-generate-project-context → rcode/skills/actions/3-solutioning/rcode-generate-project-context}/project-context-template.md +0 -0
  1431. /package/{rihal/skills/actions/3-solutioning/rihal-generate-project-context → rcode/skills/actions/3-solutioning/rcode-generate-project-context}/steps/step-01-discover.md +0 -0
  1432. /package/{rihal/skills/actions/3-solutioning/rihal-generate-project-context → rcode/skills/actions/3-solutioning/rcode-generate-project-context}/steps/step-03-complete.md +0 -0
  1433. /package/{rihal/skills/actions/4-implementation/rihal-checkpoint-preview → rcode/skills/actions/4-implementation/rcode-checkpoint-preview}/generate-trail.md +0 -0
  1434. /package/{rihal/skills/actions/4-implementation/rihal-checkpoint-preview → rcode/skills/actions/4-implementation/rcode-checkpoint-preview}/step-01-orientation.md +0 -0
  1435. /package/{rihal/skills/actions/4-implementation/rihal-checkpoint-preview → rcode/skills/actions/4-implementation/rcode-checkpoint-preview}/step-02-walkthrough.md +0 -0
  1436. /package/{rihal/skills/actions/4-implementation/rihal-checkpoint-preview → rcode/skills/actions/4-implementation/rcode-checkpoint-preview}/step-03-detail-pass.md +0 -0
  1437. /package/{rihal/skills/actions/4-implementation/rihal-checkpoint-preview → rcode/skills/actions/4-implementation/rcode-checkpoint-preview}/step-04-testing.md +0 -0
  1438. /package/{rihal/skills/actions/4-implementation/rihal-checkpoint-preview → rcode/skills/actions/4-implementation/rcode-checkpoint-preview}/step-05-wrapup.md +0 -0
  1439. /package/{rihal/skills/actions/4-implementation/rihal-code-review → rcode/skills/actions/4-implementation/rcode-code-review}/steps/step-01-gather-context.md +0 -0
  1440. /package/{rihal/skills/actions/4-implementation/rihal-code-review → rcode/skills/actions/4-implementation/rcode-code-review}/steps/step-03-triage.md +0 -0
  1441. /package/{rihal/skills/actions/4-implementation/rihal-code-review → rcode/skills/actions/4-implementation/rcode-code-review}/steps/step-04-present.md +0 -0
  1442. /package/{rihal/skills/actions/4-implementation/rihal-correct-course → rcode/skills/actions/4-implementation/rcode-correct-course}/checklist.md +0 -0
  1443. /package/{rihal/skills/actions/4-implementation/rihal-dev-story → rcode/skills/actions/4-implementation/rcode-dev-story}/checklist.md +0 -0
  1444. /package/{rihal/skills/actions/4-implementation/rihal-scaffold-project → rcode/skills/actions/4-implementation/rcode-scaffold-project}/steps/step-01-target.md +0 -0
  1445. /package/{rihal/skills/actions/4-implementation/rihal-scaffold-project → rcode/skills/actions/4-implementation/rcode-scaffold-project}/steps/step-02-safety.md +0 -0
  1446. /package/{rihal/skills/actions/4-implementation/rihal-sprint-planning → rcode/skills/actions/4-implementation/rcode-sprint-planning}/sprint-status-template.yaml +0 -0
  1447. /package/{rihal → rcode}/skills/agents/noor-writer/explain-concept.md +0 -0
  1448. /package/{rihal → rcode}/skills/agents/noor-writer/mermaid-gen.md +0 -0
  1449. /package/{rihal → rcode}/skills/agents/noor-writer/validate-doc.md +0 -0
  1450. /package/{rihal → rcode}/skills/agents/noor-writer/write-document.md +0 -0
  1451. /package/{rihal/skills/core/rihal-advanced-elicitation → rcode/skills/core/rcode-advanced-elicitation}/methods.csv +0 -0
  1452. /package/{rihal/skills/core/rihal-advanced-elicitation → rcode/skills/core/rcode-advanced-elicitation}/references.md +0 -0
  1453. /package/{rihal/skills/core/rihal-brainstorming → rcode/skills/core/rcode-brainstorming}/brain-methods.csv +0 -0
  1454. /package/{rihal/skills/core/rihal-brainstorming → rcode/skills/core/rcode-brainstorming}/steps/step-01-session-setup.md +0 -0
  1455. /package/{rihal/skills/core/rihal-brainstorming → rcode/skills/core/rcode-brainstorming}/steps/step-01b-continue.md +0 -0
  1456. /package/{rihal/skills/core/rihal-brainstorming → rcode/skills/core/rcode-brainstorming}/steps/step-02a-user-selected.md +0 -0
  1457. /package/{rihal/skills/core/rihal-brainstorming → rcode/skills/core/rcode-brainstorming}/steps/step-02b-ai-recommended.md +0 -0
  1458. /package/{rihal/skills/core/rihal-brainstorming → rcode/skills/core/rcode-brainstorming}/steps/step-02c-random-selection.md +0 -0
  1459. /package/{rihal/skills/core/rihal-brainstorming → rcode/skills/core/rcode-brainstorming}/steps/step-02d-progressive-flow.md +0 -0
  1460. /package/{rihal/skills/core/rihal-brainstorming → rcode/skills/core/rcode-brainstorming}/steps/step-04-idea-organization.md +0 -0
  1461. /package/{rihal/skills/core/rihal-brainstorming → rcode/skills/core/rcode-brainstorming}/template.md +0 -0
  1462. /package/{rihal/skills/core/rihal-clone-website → rcode/skills/core/rcode-clone-website}/references.md +0 -0
  1463. /package/{rihal/skills/core/rihal-distillator → rcode/skills/core/rcode-distillator}/agents/distillate-compressor.md +0 -0
  1464. /package/{rihal/skills/core/rihal-distillator → rcode/skills/core/rcode-distillator}/agents/round-trip-reconstructor.md +0 -0
  1465. /package/{rihal/skills/core/rihal-distillator → rcode/skills/core/rcode-distillator}/resources/compression-rules.md +0 -0
  1466. /package/{rihal/skills/core/rihal-distillator → rcode/skills/core/rcode-distillator}/resources/splitting-strategy.md +0 -0
  1467. /package/{rihal/skills/core/rihal-distillator → rcode/skills/core/rcode-distillator}/scripts/tests/test_analyze_sources.py +0 -0
  1468. /package/{rihal → rcode}/templates/UI-SPEC.md +0 -0
  1469. /package/{rihal → rcode}/templates/documentation-requirements.csv +0 -0
  1470. /package/{rihal → rcode}/templates/memory/change-records/.gitkeep +0 -0
  1471. /package/{rihal → rcode}/templates/memory/incidents/known-issues.md +0 -0
  1472. /package/{rihal → rcode}/templates/memory/incidents/post-mortems/.gitkeep +0 -0
  1473. /package/{rihal → rcode}/templates/memory/milestones/archive/.gitkeep +0 -0
  1474. /package/{rihal → rcode}/templates/memory/milestones/current.md +0 -0
  1475. /package/{rihal → rcode}/templates/memory/people/stakeholders.md +0 -0
  1476. /package/{rihal → rcode}/templates/memory/people/team.md +0 -0
  1477. /package/{rihal → rcode}/templates/memory/project/glossary.md +0 -0
  1478. /package/{rihal → rcode}/templates/projects/api-backend/REQUIREMENTS.md +0 -0
  1479. /package/{rihal → rcode}/templates/projects/api-backend/ROADMAP.md +0 -0
  1480. /package/{rihal → rcode}/templates/projects/mobile-app/REQUIREMENTS.md +0 -0
  1481. /package/{rihal → rcode}/templates/projects/mobile-app/ROADMAP.md +0 -0
  1482. /package/{rihal → rcode}/templates/projects/saas-b2b/REQUIREMENTS.md +0 -0
  1483. /package/{rihal → rcode}/templates/projects/saas-b2b/ROADMAP.md +0 -0
  1484. /package/{rihal → rcode}/templates/sprint.md +0 -0
package/cli/install.js CHANGED
@@ -1,16 +1,16 @@
1
1
  /**
2
- * cli/install.js — Rihal v2 file-shipping installer (prototype)
2
+ * cli/install.js — rcode v2 file-shipping installer (prototype)
3
3
  *
4
4
  * Compared to the v1 `cli/init.js` (2918 lines of inline string templates),
5
- * this installer copies real files from the package's `rihal/` directory
5
+ * this installer copies real files from the package's `rcode/` directory
6
6
  * into a target project. The same file-shipping pattern (no npm deps).
7
7
  *
8
8
  * Target layout in the user's project:
9
9
  *
10
- * .rihal/
10
+ * .rcode/
11
11
  * _config/
12
12
  * manifest.yaml (version + install date + installed modules)
13
- * agent-manifest.csv (auto-generated from rihal/agents/*.md frontmatter)
13
+ * agent-manifest.csv (auto-generated from rcode/agents/*.md frontmatter)
14
14
  * files-manifest.csv (SHA256 hashes for update/doctor)
15
15
  * config.yaml (user_name, project_name, language, mode)
16
16
  * workflows/
@@ -19,15 +19,15 @@
19
19
  * council-protocol.md
20
20
  * commit-conventions.md
21
21
  * bin/
22
- * rihal-tools.cjs
22
+ * rcode-tools.cjs
23
23
  * lib/council-panel.cjs
24
24
  * .claude/
25
25
  * agents/
26
- * rihal-sadiq.md
27
- * rihal-waleed.md
28
- * rihal-fatima.md
26
+ * rcode-sadiq.md
27
+ * rcode-waleed.md
28
+ * rcode-fatima.md
29
29
  * commands/
30
- * rihal/
30
+ * rcode/
31
31
  * council.md
32
32
  * .planning/
33
33
  * council-sessions/ (empty dir, populated on first council run)
@@ -77,7 +77,7 @@ const dim = (s) => pc.dim(s);
77
77
  const bold = (s) => pc.bold(s);
78
78
 
79
79
  const PACKAGE_ROOT = path.resolve(__dirname, '..');
80
- const SOURCE_ROOT = path.join(PACKAGE_ROOT, 'rihal');
80
+ const SOURCE_ROOT = path.join(PACKAGE_ROOT, 'rcode');
81
81
 
82
82
  /**
83
83
  * Single source of truth for supported IDEs (#697 — W4.3).
@@ -91,7 +91,45 @@ const SOURCE_ROOT = path.join(PACKAGE_ROOT, 'rihal');
91
91
  */
92
92
  const SUPPORTED_IDES = Object.freeze(['claude', 'cursor', 'gemini', 'vscode', 'antigravity', 'windsurf']);
93
93
 
94
- // Zod schema for .rihal/config.yaml validation (#250).
94
+ /**
95
+ * Resolve the stable on-disk location of this package so config.yaml
96
+ * rcode_source_path doesn't point to a temp npm install directory.
97
+ * Issue #831 — process.argv[1] may be /tmp/... when installed via npx.
98
+ * Resolution order: package.json location of @hanzlaa/rcode in global
99
+ * node_modules, then local node_modules, then argv fallback.
100
+ */
101
+ function resolveStableSourcePath() {
102
+ const candidateDirs = [
103
+ // pnpm/npm global store
104
+ path.join(process.env.HOME || '', '.pnpm-global', 'node_modules', '@hanzlaa', 'rcode'),
105
+ path.join(process.env.HOME || '', '.npm-global', 'lib', 'node_modules', '@hanzlaa', 'rcode'),
106
+ // local node_modules (most common for pnpm add -D)
107
+ path.join(process.cwd(), 'node_modules', '@hanzlaa', 'rcode'),
108
+ // argv-based fallback (may be /tmp/... on npx)
109
+ path.dirname(path.dirname(process.argv[1] || '')),
110
+ ];
111
+ for (const dir of candidateDirs) {
112
+ if (dir && fs.existsSync(path.join(dir, 'package.json'))) return dir;
113
+ }
114
+ return path.dirname(path.dirname(process.argv[1] || ''));
115
+ }
116
+
117
+ /**
118
+ * Walk up the directory tree from startDir looking for pnpm-workspace.yaml.
119
+ * Returns the first directory that contains the file, or null if not found.
120
+ * Issue #821/#832 — used to detect workspace roots and anchor TARGET_DIR.
121
+ */
122
+ function findPnpmWorkspaceRoot(startDir) {
123
+ let dir = startDir;
124
+ while (true) {
125
+ if (fs.existsSync(path.join(dir, 'pnpm-workspace.yaml'))) return dir;
126
+ const parent = path.dirname(dir);
127
+ if (parent === dir) return null; // reached filesystem root
128
+ dir = parent;
129
+ }
130
+ }
131
+
132
+ // Zod schema for .rcode/config.yaml validation (#250).
95
133
  const ConfigSchema = z.object({
96
134
  user_name: z.string().min(1),
97
135
  project_name: z.string().min(1),
@@ -101,7 +139,7 @@ const ConfigSchema = z.object({
101
139
  }).default('guided'),
102
140
  model_profile: z.string().optional(),
103
141
  commit_planning: z.boolean().optional(),
104
- rihal_source_path: z.string().optional(),
142
+ rcode_source_path: z.string().optional(),
105
143
  workflow: z.object({
106
144
  research_by_default: z.boolean().optional(),
107
145
  plan_checker: z.boolean().optional(),
@@ -171,7 +209,13 @@ function parseArgs(argv) {
171
209
  else if (arg === '--project') opts.projectName = argv[++i];
172
210
  else if (arg === '--language') opts.language = argv[++i];
173
211
  else if (arg === '--mode') opts.mode = argv[++i];
174
- else if (arg === '--ide') { opts.ide = argv[++i]; opts.ideProvided = true; }
212
+ else if (arg === '--ide') {
213
+ opts.ide = argv[++i];
214
+ // Issue #841: normalise 'claude-code' alias — the tool is marketed as
215
+ // "Claude Code" so users pass --ide claude-code expecting it to work.
216
+ if (opts.ide === 'claude-code') opts.ide = 'claude';
217
+ opts.ideProvided = true;
218
+ }
175
219
  else if (arg === '--module') opts.modules.push(argv[++i]);
176
220
  else if (arg === '--commit-planning') opts.commitPlanning = true;
177
221
  else if (arg === '--no-commit-planning' || arg === '--ignore-planning') opts.commitPlanning = false;
@@ -195,11 +239,33 @@ function parseArgs(argv) {
195
239
  }
196
240
  // --global without an explicit target means "install to ~/.claude/" — i.e.
197
241
  // home dir. Without this, running `rcode install --global` from inside a
198
- // project directory wrote rihal artifacts to that project, not to the user's
242
+ // project directory wrote rcode artifacts to that project, not to the user's
199
243
  // home where Claude Code reads global commands from.
200
244
  if (opts.global && !opts.targetProvided) {
201
245
  opts.target = os.homedir();
202
246
  }
247
+ // Issue #821/#832: pnpm workspace anchor.
248
+ // When `pnpm add -D @hanzlaa/rcode` runs inside a workspace member,
249
+ // pnpm may change process.cwd() to the workspace root (the directory that
250
+ // contains pnpm-workspace.yaml). npm sets INIT_CWD to the original member
251
+ // directory where the user ran the command.
252
+ // Guard 1: CWD is the workspace root + INIT_CWD points inside it → use INIT_CWD.
253
+ // Guard 2: workspace root found above CWD → keep CWD (don't walk up).
254
+ if (!opts.targetProvided && !opts.global) {
255
+ const cwd = process.cwd();
256
+ const hasPnpmWorkspaceHere = fs.existsSync(path.join(cwd, 'pnpm-workspace.yaml'));
257
+ const initCwd = process.env.INIT_CWD;
258
+ if (hasPnpmWorkspaceHere && initCwd && path.resolve(initCwd) !== path.resolve(cwd)) {
259
+ // pnpm changed CWD to workspace root; INIT_CWD has the member directory.
260
+ opts.target = path.resolve(initCwd);
261
+ } else {
262
+ // Check if we're already inside a workspace member (workspace root in a parent).
263
+ const workspaceRoot = findPnpmWorkspaceRoot(path.dirname(cwd));
264
+ if (workspaceRoot) {
265
+ opts.target = cwd; // explicit anchor — do not drift to workspace root
266
+ }
267
+ }
268
+ }
203
269
  if (!opts.projectName) opts.projectName = path.basename(opts.target);
204
270
  return opts;
205
271
  }
@@ -207,7 +273,7 @@ function parseArgs(argv) {
207
273
  /**
208
274
  * Create a tar.gz backup of every file the install plan would touch BEFORE
209
275
  * --force-overwrite clobbers them. Closes #381 — without this, customized
210
- * .claude/agents/rihal-*.md and similar files were silently lost.
276
+ * .claude/agents/rcode-*.md and similar files were silently lost.
211
277
  *
212
278
  * Returns { ok, path, warning, fileCount } — ok=false means we couldn't
213
279
  * create the backup (tar missing, no paths, etc.); the caller decides
@@ -232,10 +298,10 @@ function createInstallBackup(target, plan) {
232
298
  // explicitly preserves them — defensive: if install regresses and starts
233
299
  // touching them, the backup catches it.
234
300
  for (const stateFile of [
235
- '.rihal/config.yaml',
236
- '.rihal/state.json',
237
- '.rihal/_config/manifest.yaml',
238
- '.rihal/_config/files-manifest.csv',
301
+ '.rcode/config.yaml',
302
+ '.rcode/state.json',
303
+ '.rcode/_config/manifest.yaml',
304
+ '.rcode/_config/files-manifest.csv',
239
305
  ]) {
240
306
  if (fs.existsSync(path.join(target, stateFile))) {
241
307
  paths.push(stateFile);
@@ -246,11 +312,11 @@ function createInstallBackup(target, plan) {
246
312
  return { ok: false, warning: 'no existing files to back up — fresh install', fileCount: 0 };
247
313
  }
248
314
 
249
- const backupsDir = path.join(target, '.rihal/backups');
315
+ const backupsDir = path.join(target, '.rcode/backups');
250
316
  try {
251
317
  fs.mkdirSync(backupsDir, { recursive: true });
252
318
  } catch (err) {
253
- return { ok: false, warning: `could not create .rihal/backups/: ${err.message}`, fileCount: 0 };
319
+ return { ok: false, warning: `could not create .rcode/backups/: ${err.message}`, fileCount: 0 };
254
320
  }
255
321
 
256
322
  const ts = new Date().toISOString().replace(/[:.]/g, '-').slice(0, 19);
@@ -278,7 +344,7 @@ function createInstallBackup(target, plan) {
278
344
  }
279
345
 
280
346
  /**
281
- * Print the Rihal Memory Bank installer header. Box-drawn banner shown once
347
+ * Print the rcode Memory Bank installer header. Box-drawn banner shown once
282
348
  * at the top of every interactive install run.
283
349
  */
284
350
  function printInstallHeader(targetVersion) {
@@ -287,11 +353,12 @@ function printInstallHeader(targetVersion) {
287
353
  '',
288
354
  pc.cyan('╭───────────────────────────────────────────────────────────╮'),
289
355
  pc.cyan('│') + ' ' + pc.cyan('│'),
290
- pc.cyan('│') + ' ' + pc.bold(pc.yellow('🕌 Rihal Memory Bank')) + ' ' + dim('— installer') + ' ' + pc.cyan('│'),
356
+ pc.cyan('│') + ' ' + pc.bold(pc.yellow('🕌 rcode Memory Bank')) + ' ' + dim('— installer') + ' ' + pc.cyan('│'),
291
357
  pc.cyan('│') + ' ' + dim('A persistent context-brain for your editor') + ' ' + pc.cyan('│'),
292
358
  pc.cyan('│') + ' ' + pc.cyan('│'),
293
359
  pc.cyan('│') + ' ' + dim('version ') + pc.green('v' + v) + ' ' + pc.cyan('│'),
294
360
  pc.cyan('│') + ' ' + dim('docs ') + 'github.com/hanzlahabib/rihal-code ' + pc.cyan('│'),
361
+ pc.cyan('│') + ' ' + dim('by ') + 'Hanzla Habib' + ' ' + pc.cyan('│'),
295
362
  pc.cyan('│') + ' ' + pc.cyan('│'),
296
363
  pc.cyan('╰───────────────────────────────────────────────────────────╯'),
297
364
  '',
@@ -400,14 +467,14 @@ async function resolveCommitPlanning(opts) {
400
467
  if (opts.commitPlanning !== null) return opts.commitPlanning;
401
468
  if (opts.noPrompt || opts.global) return false; // global install: no planning artifacts
402
469
 
403
- // Issue #685: on re-install, read the existing .rihal/config.yaml and use
470
+ // Issue #685: on re-install, read the existing .rcode/config.yaml and use
404
471
  // its commit_planning value as the default. Otherwise the new prompt
405
472
  // answer overwrites .gitignore but NOT config.yaml, leaving two sources of
406
473
  // truth that silently diverge. Users on re-install almost always want to
407
474
  // KEEP their existing setting unless they explicitly pass --commit-planning.
408
475
  let existingValue = null;
409
476
  try {
410
- const cfgPath = path.join(opts.target, '.rihal', 'config.yaml');
477
+ const cfgPath = path.join(opts.target, '.rcode', 'config.yaml');
411
478
  if (fs.existsSync(cfgPath)) {
412
479
  const cfg = fs.readFileSync(cfgPath, 'utf8');
413
480
  const m = cfg.match(/^commit_planning:\s*(true|false)\s*$/m);
@@ -441,7 +508,7 @@ async function resolveCommitPlanning(opts) {
441
508
 
442
509
  function printHelp() {
443
510
  console.log(`
444
- Rihal Code installer
511
+ rcode installer
445
512
 
446
513
  Usage:
447
514
  node cli/install.js [target-dir]
@@ -458,11 +525,11 @@ Options:
458
525
  --help this text
459
526
 
460
527
  Installs (IDE-specific):
461
- claude: target/.rihal/ config, workflows, references, bin
462
- target/.claude/agents/ first-class Rihal subagents
463
- target/.claude/commands/rihal/ slash commands
464
- cursor: target/.cursor/rules/rihal/ Cursor-specific rules + agents
465
- gemini: target/.gemini/rihal/ Gemini CLI commands + agents
528
+ claude: target/.rcode/ config, workflows, references, bin
529
+ target/.claude/agents/ first-class rcode subagents
530
+ target/.claude/commands/rcode/ slash commands
531
+ cursor: target/.cursor/rules/rcode/ Cursor-specific rules + agents
532
+ gemini: target/.gemini/rcode/ Gemini CLI commands + agents
466
533
  target/.planning/ artifact output dir (all IDEs)
467
534
  `);
468
535
  }
@@ -477,62 +544,62 @@ function getPathsForIde(ide, target) {
477
544
  return {
478
545
  agentsDir: path.join(target, '.claude', 'agents'),
479
546
  commandsDir: path.join(target, '.claude', 'commands'),
480
- workflowsDir: path.join(target, '.rihal', 'workflows'),
481
- referencesDir: path.join(target, '.rihal', 'references'),
482
- binDir: path.join(target, '.rihal', 'bin'),
547
+ workflowsDir: path.join(target, '.rcode', 'workflows'),
548
+ referencesDir: path.join(target, '.rcode', 'references'),
549
+ binDir: path.join(target, '.rcode', 'bin'),
483
550
  };
484
551
  case 'cursor':
485
552
  return {
486
- agentsDir: path.join(target, '.cursor', 'rules', 'rihal', 'agents'),
487
- commandsDir: path.join(target, '.cursor', 'rules', 'rihal', 'commands'),
488
- workflowsDir: path.join(target, '.rihal', 'workflows'),
489
- referencesDir: path.join(target, '.rihal', 'references'),
490
- binDir: path.join(target, '.rihal', 'bin'),
553
+ agentsDir: path.join(target, '.cursor', 'rules', 'rcode', 'agents'),
554
+ commandsDir: path.join(target, '.cursor', 'rules', 'rcode', 'commands'),
555
+ workflowsDir: path.join(target, '.rcode', 'workflows'),
556
+ referencesDir: path.join(target, '.rcode', 'references'),
557
+ binDir: path.join(target, '.rcode', 'bin'),
491
558
  };
492
559
  case 'gemini':
493
560
  return {
494
- agentsDir: path.join(target, '.gemini', 'rihal', 'agents'),
495
- commandsDir: path.join(target, '.gemini', 'rihal', 'commands'),
496
- workflowsDir: path.join(target, '.rihal', 'workflows'),
497
- referencesDir: path.join(target, '.rihal', 'references'),
498
- binDir: path.join(target, '.rihal', 'bin'),
561
+ agentsDir: path.join(target, '.gemini', 'rcode', 'agents'),
562
+ commandsDir: path.join(target, '.gemini', 'rcode', 'commands'),
563
+ workflowsDir: path.join(target, '.rcode', 'workflows'),
564
+ referencesDir: path.join(target, '.rcode', 'references'),
565
+ binDir: path.join(target, '.rcode', 'bin'),
499
566
  };
500
567
  case 'vscode':
501
568
  // VS Code's Claude Code / Continue / Copilot extensions all read from
502
569
  // .claude/ (Claude Code's canonical paths). We install there directly
503
570
  // using the SAME layout as the claude case (prefixed-root form) so
504
571
  // multi-IDE installs don't double up — see #723 / #635-#643 / #646.
505
- // The .vscode/rihal/ marker is preserved for workspace settings.
572
+ // The .vscode/rcode/ marker is preserved for workspace settings.
506
573
  return {
507
574
  agentsDir: path.join(target, '.claude', 'agents'),
508
575
  commandsDir: path.join(target, '.claude', 'commands'),
509
- workflowsDir: path.join(target, '.rihal', 'workflows'),
510
- referencesDir: path.join(target, '.rihal', 'references'),
511
- binDir: path.join(target, '.rihal', 'bin'),
512
- markerDir: path.join(target, '.vscode', 'rihal'),
576
+ workflowsDir: path.join(target, '.rcode', 'workflows'),
577
+ referencesDir: path.join(target, '.rcode', 'references'),
578
+ binDir: path.join(target, '.rcode', 'bin'),
579
+ markerDir: path.join(target, '.vscode', 'rcode'),
513
580
  };
514
581
  case 'antigravity':
515
582
  // Antigravity (Google's agentic IDE) — install to .antigravity/ mirroring
516
583
  // the .gemini/ structure. Antigravity's plugin protocol is still firming
517
- // up; the user can adjust paths via .rihal/config.yaml's `extra_install_paths`
584
+ // up; the user can adjust paths via .rcode/config.yaml's `extra_install_paths`
518
585
  // if Antigravity expects different routing.
519
586
  return {
520
- agentsDir: path.join(target, '.antigravity', 'rihal', 'agents'),
521
- commandsDir: path.join(target, '.antigravity', 'rihal', 'commands'),
522
- workflowsDir: path.join(target, '.rihal', 'workflows'),
523
- referencesDir: path.join(target, '.rihal', 'references'),
524
- binDir: path.join(target, '.rihal', 'bin'),
587
+ agentsDir: path.join(target, '.antigravity', 'rcode', 'agents'),
588
+ commandsDir: path.join(target, '.antigravity', 'rcode', 'commands'),
589
+ workflowsDir: path.join(target, '.rcode', 'workflows'),
590
+ referencesDir: path.join(target, '.rcode', 'references'),
591
+ binDir: path.join(target, '.rcode', 'bin'),
525
592
  };
526
593
  case 'windsurf':
527
594
  // Windsurf (Codeium's agentic IDE) — uses .windsurf/rules/ for .mdc rule
528
595
  // files, parallel to cursor's .cursor/rules/. cli/lib/manifest.cjs already
529
596
  // handles the rules-install verify path (#723 closes the install-side gap).
530
597
  return {
531
- agentsDir: path.join(target, '.windsurf', 'rules', 'rihal', 'agents'),
532
- commandsDir: path.join(target, '.windsurf', 'rules', 'rihal', 'commands'),
533
- workflowsDir: path.join(target, '.rihal', 'workflows'),
534
- referencesDir: path.join(target, '.rihal', 'references'),
535
- binDir: path.join(target, '.rihal', 'bin'),
598
+ agentsDir: path.join(target, '.windsurf', 'rules', 'rcode', 'agents'),
599
+ commandsDir: path.join(target, '.windsurf', 'rules', 'rcode', 'commands'),
600
+ workflowsDir: path.join(target, '.rcode', 'workflows'),
601
+ referencesDir: path.join(target, '.rcode', 'references'),
602
+ binDir: path.join(target, '.rcode', 'bin'),
536
603
  };
537
604
  default:
538
605
  throw new Error(`Unknown IDE: ${ide}. Supported: ${SUPPORTED_IDES.join(', ')}`);
@@ -542,7 +609,7 @@ function getPathsForIde(ide, target) {
542
609
  /**
543
610
  * Walk a directory and return absolute file paths. Uses fast-glob so
544
611
  * symlink cycles are never followed and patterns can be excluded via
545
- * .rihalignore files (#249).
612
+ * .rcodeignore files (#249).
546
613
  */
547
614
  function walkFiles(dir, extraIgnore = []) {
548
615
  if (!fs.existsSync(dir)) return [];
@@ -556,11 +623,11 @@ function walkFiles(dir, extraIgnore = []) {
556
623
  }
557
624
 
558
625
  /**
559
- * Read .rihalignore patterns from a given root directory.
626
+ * Read .rcodeignore patterns from a given root directory.
560
627
  * Returns an array of glob-style ignore patterns (same syntax as .gitignore).
561
628
  */
562
- function readRihalIgnore(root) {
563
- const ignoreFile = path.join(root, '.rihalignore');
629
+ function readRcodeIgnore(root) {
630
+ const ignoreFile = path.join(root, '.rcodeignore');
564
631
  if (!fs.existsSync(ignoreFile)) return [];
565
632
  return fs.readFileSync(ignoreFile, 'utf8')
566
633
  .split('\n')
@@ -592,7 +659,7 @@ function copyDirRecursive(source, dest) {
592
659
 
593
660
  /**
594
661
  * Seed .planning/ with starter ROADMAP.md + STATE.md + PROJECT.md so
595
- * workflows work immediately after install. User can /rihal-sprint-planning
662
+ * workflows work immediately after install. User can /rcode-sprint-planning
596
663
  * on a fresh install without manual setup.
597
664
  *
598
665
  * Only seeds if .planning/ROADMAP.md doesn't already exist (preserves user data).
@@ -611,11 +678,11 @@ function seedStarterPlanning(target, projectName) {
611
678
  const name = projectName || path.basename(target);
612
679
 
613
680
  // Stub planning files: clearly marked as install templates so users (and
614
- // /rihal-new-project Step 0.5 detection) can tell them apart from real
681
+ // /rcode-new-project Step 0.5 detection) can tell them apart from real
615
682
  // planning artifacts. See issues #670 #671 #676.
616
683
  const STUB_BANNER =
617
- `<!-- INSTALL STUB — overwritten by /rihal-new-project. Delete this file or run\n` +
618
- ` /rihal-new-project before committing. See https://github.com/hanzlahabib/rihal-code/issues/670 -->\n\n`;
684
+ `<!-- INSTALL STUB — overwritten by /rcode-new-project. Delete this file or run\n` +
685
+ ` /rcode-new-project before committing. See https://github.com/hanzlahabib/rihal-code/issues/670 -->\n\n`;
619
686
 
620
687
  fs.writeFileSync(projectPath,
621
688
  STUB_BANNER +
@@ -652,26 +719,26 @@ function seedStarterPlanning(target, projectName) {
652
719
  `---\n\n` +
653
720
  `## Decisions\n\n_None yet._\n\n` +
654
721
  `## Blockers\n\n_None._\n\n` +
655
- `## Next Action\n\nRun \`/rihal-new-project <description>\` to bootstrap, or \`/rihal-sprint-planning\` once a real phase exists.\n`
722
+ `## Next Action\n\nRun \`/rcode-new-project <description>\` to bootstrap, or \`/rcode-sprint-planning\` once a real phase exists.\n`
656
723
  );
657
724
 
658
- // Issue #670: do NOT pre-seed .rihal/state.json with a fake project +
725
+ // Issue #670: do NOT pre-seed .rcode/state.json with a fake project +
659
726
  // "Setup & Scaffolding" phase. That made every fresh install look like a
660
- // real initialized project and broke /rihal-new-project Step 0.5 detection.
727
+ // real initialized project and broke /rcode-new-project Step 0.5 detection.
661
728
  //
662
729
  // Write a minimal shell with _seeded_stub:true so:
663
- // - rihal-tools doesn't have to re-init on first call (avoids race)
664
- // - /rihal-new-project Step 0.5 (issue #671) can detect "stub" reliably
730
+ // - rcode-tools doesn't have to re-init on first call (avoids race)
731
+ // - /rcode-new-project Step 0.5 (issue #671) can detect "stub" reliably
665
732
  // - sprint tools that previously relied on phase 01 will surface a clear
666
- // "no phases yet — run /rihal-new-project first" error instead of
733
+ // "no phases yet — run /rcode-new-project first" error instead of
667
734
  // silently operating on a fake phase
668
735
  //
669
736
  // Issue #705: only mark _seeded_stub when the planning ROADMAP is also
670
737
  // a stub. If the user manually deletes state.json but has real
671
738
  // .planning/ROADMAP.md (no INSTALL STUB banner), seeding _seeded_stub
672
- // would mis-classify a real project as fresh and let /rihal-new-project
739
+ // would mis-classify a real project as fresh and let /rcode-new-project
673
740
  // overwrite it. Guard with the banner check.
674
- const rihalStateJson = path.join(target, '.rihal', 'state.json');
741
+ const rcodeStateJson = path.join(target, '.rcode', 'state.json');
675
742
  function planningRoadmapIsStub() {
676
743
  const rmPath = path.join(target, '.planning', 'ROADMAP.md');
677
744
  if (!fs.existsSync(rmPath)) return true; // missing → fresh install case
@@ -680,16 +747,46 @@ function seedStarterPlanning(target, projectName) {
680
747
  return text.includes('<!-- INSTALL STUB');
681
748
  } catch { return true; }
682
749
  }
683
- if (!fs.existsSync(rihalStateJson)) {
750
+ if (!fs.existsSync(rcodeStateJson)) {
684
751
  const now = new Date().toISOString();
685
752
  const isStubProject = planningRoadmapIsStub();
753
+
754
+ // Resolve project name from config.yaml if available (#816)
755
+ let resolvedProject = null;
756
+ const configYamlPath = path.join(target, '.rcode', 'config.yaml');
757
+ if (fs.existsSync(configYamlPath)) {
758
+ try {
759
+ const cfg = fs.readFileSync(configYamlPath, 'utf8');
760
+ const m = cfg.match(/^project_name:\s*"?([^"\n]+)"?/m);
761
+ if (m) resolvedProject = m[1].trim();
762
+ } catch { /* leave null */ }
763
+ }
764
+
765
+ // Sync current_phase from ROADMAP.md if it exists and isn't a stub (#810)
766
+ let resolvedPhase = null;
767
+ const roadmapPath = path.join(target, '.planning', 'ROADMAP.md');
768
+ if (!isStubProject && fs.existsSync(roadmapPath)) {
769
+ try {
770
+ const rm = fs.readFileSync(roadmapPath, 'utf8');
771
+ // Format A — pipe table: | 01 | Phase Name | ...
772
+ const tableMatch = rm.match(/^\|\s*(\d+(?:\.\d+)?)\s*\|/m);
773
+ if (tableMatch) {
774
+ resolvedPhase = String(parseInt(tableMatch[1], 10));
775
+ } else {
776
+ // Format B — heading: ## Phase 01 — Name
777
+ const headMatch = rm.match(/^#{2,4}\s*Phase\s+(\d+(?:\.\d+)?)/im);
778
+ if (headMatch) resolvedPhase = String(parseInt(headMatch[1], 10));
779
+ }
780
+ } catch { /* leave null */ }
781
+ }
782
+
686
783
  const state = {
687
784
  version: '1',
688
- project: null,
785
+ project: resolvedProject,
689
786
  ...(isStubProject ? { _seeded_stub: true } : {}),
690
787
  created: now,
691
788
  updated: now,
692
- current_phase: null,
789
+ current_phase: resolvedPhase,
693
790
  current_plan: 0,
694
791
  current_sprint: null,
695
792
  milestone: null,
@@ -704,8 +801,8 @@ function seedStarterPlanning(target, projectName) {
704
801
  last_session: null,
705
802
  velocity_history: [],
706
803
  };
707
- fs.mkdirSync(path.dirname(rihalStateJson), { recursive: true });
708
- writeFileAtomic(rihalStateJson, JSON.stringify(state, null, 2) + '\n');
804
+ fs.mkdirSync(path.dirname(rcodeStateJson), { recursive: true });
805
+ writeFileAtomic(rcodeStateJson, JSON.stringify(state, null, 2) + '\n');
709
806
  }
710
807
 
711
808
  return true;
@@ -734,23 +831,23 @@ function ensureRcodeGitignore(target, options = {}) {
734
831
  '',
735
832
  BEGIN,
736
833
  '# Added automatically on first rcode install. Idempotent — safe to re-run.',
737
- '# Edit `commit_planning` in .rihal/config.yaml to flip planning-artifact tracking.',
834
+ '# Edit `commit_planning` in .rcode/config.yaml to flip planning-artifact tracking.',
738
835
  '',
739
836
  '# Installed methodology files (regenerate with: npx @hanzlaa/rcode install)',
740
837
  '.claude/',
741
- '.rihal/bin/',
742
- '.rihal/workflows/',
743
- '.rihal/references/',
744
- '.rihal/commands/',
745
- '.rihal/skills/',
838
+ '.rcode/bin/',
839
+ '.rcode/workflows/',
840
+ '.rcode/references/',
841
+ '.rcode/commands/',
842
+ '.rcode/skills/',
746
843
  '',
747
- '# Pulled Rihal brain content (refresh with: rcode brain pull)',
748
- '.rihal/brain/rihal-github/',
749
- '.rihal/brain/rihal-docs/',
750
- '.rihal/brain/best-practices/',
844
+ '# Pulled rcode brain content (refresh with: rcode brain pull)',
845
+ '.rcode/brain/rcode-github/',
846
+ '.rcode/brain/rcode-docs/',
847
+ '.rcode/brain/best-practices/',
751
848
  '',
752
849
  '# Runtime noise',
753
- '.rihal/state.json.lock',
850
+ '.rcode/state.json.lock',
754
851
  '.planning/debug/',
755
852
  '.planning/_backup/',
756
853
  ];
@@ -766,9 +863,9 @@ function ensureRcodeGitignore(target, options = {}) {
766
863
  lines.push(
767
864
  '',
768
865
  '# What you DO commit:',
769
- '# .rihal/config.yaml - project mode/language/profile/commit_planning',
770
- '# .rihal/state.json - decisions, roadmap pointer, blockers',
771
- '# .rihal/brain/sources.yaml - brain source manifest',
866
+ '# .rcode/config.yaml - project mode/language/profile/commit_planning',
867
+ '# .rcode/state.json - decisions, roadmap pointer, blockers',
868
+ '# .rcode/brain/sources.yaml - brain source manifest',
772
869
  commitPlanning
773
870
  ? '# .planning/ - PRD, roadmap, sprints, SUMMARY.md files'
774
871
  : '# (planning artifacts are NOT committed — see commit_planning in config)',
@@ -820,7 +917,7 @@ function ensureRcodeGitignore(target, options = {}) {
820
917
 
821
918
  /**
822
919
  * Ensure .git/hooks/pre-commit includes the rcode-managed block that auto-syncs
823
- * state.json when .planning/ or .rihal/brain/sources.yaml files change.
920
+ * state.json when .planning/ or .rcode/brain/sources.yaml files change.
824
921
  *
825
922
  * Idempotent via sentinels — existing user hook content is preserved.
826
923
  * Respects opts.gitHooks: false → skip entirely (--no-git-hooks flag).
@@ -841,12 +938,12 @@ function ensureRcodePreCommitHook(target, options = {}) {
841
938
  const BLOCK = [
842
939
  '',
843
940
  BEGIN,
844
- '# Auto-syncs .rihal/state.json when planning files change.',
941
+ '# Auto-syncs .rcode/state.json when planning files change.',
845
942
  '# Added by rcode install — safe to re-run (idempotent).',
846
- 'if git diff --cached --name-only | grep -qE "^\\.planning/|^\\.rihal/brain/sources\\.yaml$"; then',
847
- ' if [ -x .rihal/bin/rihal-tools.cjs ]; then',
848
- ' node .rihal/bin/rihal-tools.cjs state sync --from-disk > /dev/null 2>&1 || true',
849
- ' git add .rihal/state.json 2>/dev/null || true',
943
+ 'if git diff --cached --name-only | grep -qE "^\\.planning/|^\\.rcode/brain/sources\\.yaml$"; then',
944
+ ' if [ -x .rcode/bin/rcode-tools.cjs ]; then',
945
+ ' node .rcode/bin/rcode-tools.cjs state sync --from-disk > /dev/null 2>&1 || true',
946
+ ' git add .rcode/state.json 2>/dev/null || true',
850
947
  ' fi',
851
948
  'fi',
852
949
  END,
@@ -900,14 +997,14 @@ function ensureRcodePreCommitHook(target, options = {}) {
900
997
  }
901
998
 
902
999
  /**
903
- * Install brain scaffold (sources.yaml + README.md) into .rihal/brain/ on target.
1000
+ * Install brain scaffold (sources.yaml + README.md) into .rcode/brain/ on target.
904
1001
  * Actual brain content lands after `brain pull` runs.
905
- * Closes #188 — previously the package's rihal/brain/sources.yaml was never
1002
+ * Closes #188 — previously the package's rcode/brain/sources.yaml was never
906
1003
  * copied to the target at all, leaving brain pull permanently broken.
907
1004
  */
908
1005
  function installBrainScaffold(packageRoot, target) {
909
- const srcDir = path.join(packageRoot, 'rihal', 'brain');
910
- const destDir = path.join(target, '.rihal', 'brain');
1006
+ const srcDir = path.join(packageRoot, 'rcode', 'brain');
1007
+ const destDir = path.join(target, '.rcode', 'brain');
911
1008
  fs.mkdirSync(destDir, { recursive: true });
912
1009
  let copied = 0;
913
1010
  for (const name of ['sources.yaml', 'README.md']) {
@@ -919,9 +1016,9 @@ function installBrainScaffold(packageRoot, target) {
919
1016
  }
920
1017
  }
921
1018
  // Also pre-seed the best-practices subfolder from the package's
922
- // rihal/skills/_shared/ so a fresh install has working brain content
1019
+ // rcode/skills/_shared/ so a fresh install has working brain content
923
1020
  // immediately, even before brain pull runs against real upstream URLs.
924
- const sharedSrc = path.join(packageRoot, 'rihal', 'skills', '_shared');
1021
+ const sharedSrc = path.join(packageRoot, 'rcode', 'skills', '_shared');
925
1022
  if (fs.existsSync(sharedSrc)) {
926
1023
  const bpDest = path.join(destDir, 'best-practices');
927
1024
  fs.mkdirSync(bpDest, { recursive: true });
@@ -941,38 +1038,42 @@ function installBrainScaffold(packageRoot, target) {
941
1038
  /**
942
1039
  * Install v1-style skills into the target project.
943
1040
  *
944
- * User-facing skills → .claude/skills/rihal-{name} (phrase-activated, visible as slash commands)
945
- * Internal skills → .rihal/skills/rihal-{name} (utility libs called by other skills, NOT in
1041
+ * User-facing skills → .claude/skills/rcode-{name} (phrase-activated, visible as slash commands)
1042
+ * Internal skills → .rcode/skills/rcode-{name} (utility libs called by other skills, NOT in
946
1043
  * .claude/skills/ so they don't pollute the menu)
947
1044
  *
948
1045
  * A skill is marked internal by adding `internal: true` to its SKILL.md frontmatter.
949
1046
  */
950
1047
  function installSkills(packageRoot, target, options = {}) {
951
- const skillsSource = path.join(packageRoot, 'rihal/skills');
1048
+ const skillsSource = path.join(packageRoot, 'rcode/skills');
952
1049
  const skillsDest = path.join(target, '.claude/skills');
953
- const internalDest = path.join(target, '.rihal/skills');
1050
+ const internalDest = path.join(target, '.rcode/skills');
954
1051
 
955
1052
  if (!fs.existsSync(skillsSource)) return { count: 0, skippedGlobal: 0 };
956
1053
  fs.mkdirSync(skillsDest, { recursive: true });
957
1054
  fs.mkdirSync(internalDest, { recursive: true });
958
1055
 
959
- // Issue #679: when ~/.claude/skills/<name>/ already exists with the rihal-
1056
+ // Issue #679: when ~/.claude/skills/<name>/ already exists with the rcode-
960
1057
  // prefix, Claude Code reads from BOTH global and project, showing every
961
- // /rihal-* twice in the slash picker. Skip the project copy for any rihal-*
1058
+ // /rcode-* twice in the slash picker. Skip the project copy for any rcode-*
962
1059
  // skill that already lives in the global skills dir.
963
1060
  const globalSkillsDir = path.join(os.homedir(), '.claude', 'skills');
964
- const globalRihalSkills = (options.skipGlobalDuplicates && fs.existsSync(globalSkillsDir))
965
- ? new Set(fs.readdirSync(globalSkillsDir).filter(n => n.startsWith('rihal-')))
1061
+ const globalRcodeSkills = (options.skipGlobalDuplicates && fs.existsSync(globalSkillsDir))
1062
+ ? new Set(fs.readdirSync(globalSkillsDir).filter(n => n.startsWith('rcode-')))
966
1063
  : new Set();
967
1064
 
968
1065
  let count = 0;
969
1066
  let skippedGlobal = 0;
970
1067
 
1068
+ const _internalSkillCache = new Map();
971
1069
  function isInternalSkill(skillDir) {
1070
+ if (_internalSkillCache.has(skillDir)) return _internalSkillCache.get(skillDir);
972
1071
  const skillMd = path.join(skillDir, 'SKILL.md');
973
- if (!fs.existsSync(skillMd)) return false;
1072
+ if (!fs.existsSync(skillMd)) { _internalSkillCache.set(skillDir, false); return false; }
974
1073
  const text = fs.readFileSync(skillMd, 'utf8');
975
- return /^internal:\s*true\s*$/m.test(text);
1074
+ const result = /^internal:\s*true\s*$/m.test(text);
1075
+ _internalSkillCache.set(skillDir, result);
1076
+ return result;
976
1077
  }
977
1078
 
978
1079
  function hasLocalOverride(destDir) {
@@ -989,18 +1090,18 @@ function installSkills(packageRoot, target, options = {}) {
989
1090
  const src = path.join(dir, entry.name);
990
1091
  const hasSkillMd = fs.existsSync(path.join(src, 'SKILL.md'));
991
1092
  if (hasSkillMd) {
992
- const destName = entry.name.startsWith('rihal-')
1093
+ const destName = entry.name.startsWith('rcode-')
993
1094
  ? entry.name
994
- : `rihal-${entry.name}`;
1095
+ : `rcode-${entry.name}`;
995
1096
  const internal = isInternalSkill(src);
996
1097
  const dest = internal
997
- ? path.join(internalDest, destName) // internal → .rihal/skills/
1098
+ ? path.join(internalDest, destName) // internal → .rcode/skills/
998
1099
  : path.join(skillsDest, destName); // user-facing → .claude/skills/
999
1100
 
1000
- // Skip user-facing (non-internal) rihal-* skills when the same name
1101
+ // Skip user-facing (non-internal) rcode-* skills when the same name
1001
1102
  // exists globally — UNLESS the user has a *.local.md override on the
1002
1103
  // project copy, in which case we always preserve their customization.
1003
- if (!internal && globalRihalSkills.has(destName) && !hasLocalOverride(dest)) {
1104
+ if (!internal && globalRcodeSkills.has(destName) && !hasLocalOverride(dest)) {
1004
1105
  // Also remove the existing project copy (left over from previous
1005
1106
  // installs that didn't dedup) so it stops showing in the picker.
1006
1107
  if (fs.existsSync(dest)) {
@@ -1061,18 +1162,18 @@ function parseFrontmatter(text) {
1061
1162
  * For cursor IDE, converts command files from .md to .mdc format.
1062
1163
  */
1063
1164
  /**
1064
- * Migrate legacy vscode-layout commands (.claude/commands/rihal/{name}.md)
1065
- * to the unified prefixed-root form (.claude/commands/rihal-{name}.md).
1165
+ * Migrate legacy vscode-layout commands (.claude/commands/rcode/{name}.md)
1166
+ * to the unified prefixed-root form (.claude/commands/rcode-{name}.md).
1066
1167
  *
1067
1168
  * Idempotent. Safe to run on every install/update — no-op when no legacy
1068
- * dir exists. After move, removes the now-empty rihal/ subdir.
1169
+ * dir exists. After move, removes the now-empty rcode/ subdir.
1069
1170
  *
1070
1171
  * Returns { moved, removed_dir } so callers can log the migration count.
1071
1172
  * Designed by Waleed for #723; closes the dual-layout cause of #635, #637,
1072
1173
  * #638, #639, #640, #641, #642, #643, #646.
1073
1174
  */
1074
1175
  function migrateVscodeCommandsLayout(target) {
1075
- const legacyDir = path.join(target, '.claude', 'commands', 'rihal');
1176
+ const legacyDir = path.join(target, '.claude', 'commands', 'rcode');
1076
1177
  const newRoot = path.join(target, '.claude', 'commands');
1077
1178
  if (!fs.existsSync(legacyDir) || !fs.statSync(legacyDir).isDirectory()) {
1078
1179
  return { moved: 0, removed_dir: false };
@@ -1082,8 +1183,8 @@ function migrateVscodeCommandsLayout(target) {
1082
1183
  const src = path.join(legacyDir, entry);
1083
1184
  if (!fs.statSync(src).isFile() || !entry.endsWith('.md')) continue;
1084
1185
  const baseName = path.basename(entry, '.md');
1085
- // Don't double-prefix if someone already had rihal-foo.md inside rihal/.
1086
- const targetName = baseName.startsWith('rihal-') ? entry : `rihal-${entry}`;
1186
+ // Don't double-prefix if someone already had rcode-foo.md inside rcode/.
1187
+ const targetName = baseName.startsWith('rcode-') ? entry : `rcode-${entry}`;
1087
1188
  const dst = path.join(newRoot, targetName);
1088
1189
  if (fs.existsSync(dst)) {
1089
1190
  // Already migrated by an earlier pass — remove the duplicate at source.
@@ -1121,7 +1222,7 @@ function buildInstallPlan(ide = 'claude', target = process.cwd()) {
1121
1222
  }
1122
1223
  // Note: pre-#723 we had a dual-layout workaround here that filtered
1123
1224
  // vscode subdir entries when claude+vscode were both selected. After
1124
- // Waleed's unification (vscode now writes the same rihal-{name}.md root
1225
+ // Waleed's unification (vscode now writes the same rcode-{name}.md root
1125
1226
  // form as claude), the seen-by-rel dedup above already covers it — both
1126
1227
  // IDEs emit identical `rel` values and only one wins. Layout drift will
1127
1228
  // resurface this filter; it's intentionally deleted, not commented out.
@@ -1138,27 +1239,27 @@ function buildInstallPlan(ide = 'claude', target = process.cwd()) {
1138
1239
  const relAgents = path.relative(target, paths.agentsDir);
1139
1240
  const relCommands = path.relative(target, paths.commandsDir);
1140
1241
 
1141
- // .rihal/workflows/
1242
+ // .rcode/workflows/
1142
1243
  for (const f of walkFiles(path.join(SOURCE_ROOT, 'workflows'))) {
1143
1244
  const rel = path.relative(path.join(SOURCE_ROOT, 'workflows'), f);
1144
1245
  plan.push({ src: f, rel: path.join(relWorkflows, rel) });
1145
1246
  }
1146
1247
 
1147
- // .rihal/references/
1248
+ // .rcode/references/
1148
1249
  for (const f of walkFiles(path.join(SOURCE_ROOT, 'references'))) {
1149
1250
  const rel = path.relative(path.join(SOURCE_ROOT, 'references'), f);
1150
1251
  plan.push({ src: f, rel: path.join(relReferences, rel) });
1151
1252
  }
1152
1253
 
1153
- // .rihal/bin/
1254
+ // .rcode/bin/
1154
1255
  for (const f of walkFiles(path.join(SOURCE_ROOT, 'bin'))) {
1155
1256
  const rel = path.relative(path.join(SOURCE_ROOT, 'bin'), f);
1156
1257
  plan.push({ src: f, rel: path.join(relBin, rel), executable: f.endsWith('.cjs') });
1157
1258
  }
1158
1259
 
1159
- // .rihal/templates/projects/ — starter templates consumed by /rihal-from-template
1260
+ // .rcode/templates/projects/ — starter templates consumed by /rcode-from-template
1160
1261
  const projectTemplatesSrc = path.join(SOURCE_ROOT, 'templates', 'projects');
1161
- const relProjectTemplates = path.relative(target, path.join(target, '.rihal', 'templates', 'projects'));
1262
+ const relProjectTemplates = path.relative(target, path.join(target, '.rcode', 'templates', 'projects'));
1162
1263
  for (const f of walkFiles(projectTemplatesSrc)) {
1163
1264
  const rel = path.relative(projectTemplatesSrc, f);
1164
1265
  plan.push({ src: f, rel: path.join(relProjectTemplates, rel) });
@@ -1173,31 +1274,31 @@ function buildInstallPlan(ide = 'claude', target = process.cwd()) {
1173
1274
  }
1174
1275
 
1175
1276
  // Commands — IDE-specific
1176
- // Claude AND VSCode: output as .claude/commands/rihal-{name}.md (prefixed root).
1277
+ // Claude AND VSCode: output as .claude/commands/rcode-{name}.md (prefixed root).
1177
1278
  // Both target the same commands dir (#723 / Waleed unification) so multi-IDE
1178
- // installs never duplicate. Cursor/Gemini keep the bare-name-in-rihal/-subdir form.
1279
+ // installs never duplicate. Cursor/Gemini keep the bare-name-in-rcode/-subdir form.
1179
1280
  for (const f of walkFiles(path.join(SOURCE_ROOT, 'commands'))) {
1180
1281
  const rel = path.relative(path.join(SOURCE_ROOT, 'commands'), f);
1181
1282
  const ext = ide === 'cursor' ? '.mdc' : '.md';
1182
1283
  const baseName = path.basename(f, '.md');
1183
1284
  const outName = (ide === 'claude' || ide === 'vscode')
1184
- ? `rihal-${baseName}${ext}`
1285
+ ? `rcode-${baseName}${ext}`
1185
1286
  : baseName + ext;
1186
1287
  plan.push({ src: f, rel: path.join(relCommands, path.dirname(rel), outName), ide, cursor: ide === 'cursor' });
1187
1288
  }
1188
1289
 
1189
- // Agent rules (on-demand reference files) — copied to .rihal/agents-rules/
1190
- const agentRulesDir = path.join(target, '.rihal', 'agents-rules');
1290
+ // Agent rules (on-demand reference files) — copied to .rcode/agents-rules/
1291
+ const agentRulesDir = path.join(target, '.rcode', 'agents-rules');
1191
1292
  for (const f of walkFiles(path.join(SOURCE_ROOT, 'agents', 'rules'))) {
1192
1293
  const rel = path.relative(path.join(SOURCE_ROOT, 'agents', 'rules'), f);
1193
- plan.push({ src: f, rel: path.join('.rihal', 'agents-rules', rel) });
1294
+ plan.push({ src: f, rel: path.join('.rcode', 'agents-rules', rel) });
1194
1295
  }
1195
1296
 
1196
1297
  return plan;
1197
1298
  }
1198
1299
 
1199
1300
  /**
1200
- * Parse a module YAML manifest (rihal/modules/{name}.yaml).
1301
+ * Parse a module YAML manifest (rcode/modules/{name}.yaml).
1201
1302
  * Returns { name, requires[], agents[], workflows[], commands[], references[] }.
1202
1303
  */
1203
1304
  function readModuleManifest(moduleName) {
@@ -1236,7 +1337,7 @@ function readModuleManifest(moduleName) {
1236
1337
  }
1237
1338
 
1238
1339
  /**
1239
- * List available module names by scanning rihal/modules/*.yaml
1340
+ * List available module names by scanning rcode/modules/*.yaml
1240
1341
  */
1241
1342
  function listAvailableModules() {
1242
1343
  const modulesDir = path.join(SOURCE_ROOT, 'modules');
@@ -1257,13 +1358,13 @@ function filterPlanByModules(plan, moduleNames) {
1257
1358
  const mod = readModuleManifest(modName);
1258
1359
  if (!mod) { console.warn(` ⚠ Unknown module: ${modName}`); continue; }
1259
1360
  for (const a of mod.agents) allowed.add(path.join('.claude', 'agents', a));
1260
- for (const w of mod.workflows) allowed.add(path.join('.rihal', 'workflows', w));
1261
- for (const c of mod.commands) allowed.add(path.join('.claude', 'commands', `rihal-${c}`));
1262
- for (const r of mod.references) allowed.add(path.join('.rihal', 'references', r));
1361
+ for (const w of mod.workflows) allowed.add(path.join('.rcode', 'workflows', w));
1362
+ for (const c of mod.commands) allowed.add(path.join('.claude', 'commands', `rcode-${c}`));
1363
+ for (const r of mod.references) allowed.add(path.join('.rcode', 'references', r));
1263
1364
  }
1264
1365
  // Always include bin/ (shared infrastructure, not module-specific)
1265
1366
  return plan.filter((entry) => {
1266
- if (entry.rel.startsWith(path.join('.rihal', 'bin'))) return true;
1367
+ if (entry.rel.startsWith(path.join('.rcode', 'bin'))) return true;
1267
1368
  return allowed.has(entry.rel);
1268
1369
  });
1269
1370
  }
@@ -1272,21 +1373,27 @@ function filterPlanByModules(plan, moduleNames) {
1272
1373
  * Auto-generate agent-manifest.csv from the installed agent files'
1273
1374
  * frontmatter. Columns: id, file, name, description, color.
1274
1375
  *
1275
- * The `id` column strips the `rihal-` prefix so workflow code can match
1376
+ * The `id` column strips the `rcode-` prefix so workflow code can match
1276
1377
  * against the council-panel scorer's AGENT_IDS (which use bare names).
1277
1378
  */
1278
1379
  function generateAgentManifest(plan, target) {
1279
1380
  const rows = [['id', 'file', 'name', 'description', 'color']];
1280
1381
  const seen = new Set(); // Track IDs already added to avoid duplicates
1382
+ // Memoize per-file text reads — same agent .md may be visited across loops 1-3.
1383
+ const _textCache = new Map();
1384
+ const readAgentText = (p) => {
1385
+ if (!_textCache.has(p)) _textCache.set(p, fs.readFileSync(p, 'utf8'));
1386
+ return _textCache.get(p);
1387
+ };
1281
1388
 
1282
1389
  for (const entry of plan) {
1283
1390
  if (!entry.rel.startsWith(path.join('.claude', 'agents'))) continue;
1284
1391
  if (!entry.rel.match(/^\.claude[\/\\]agents[\/\\][^\/\\]+\.md$/)) continue;
1285
1392
  const filePath = path.join(target, entry.rel);
1286
- const text = fs.readFileSync(filePath, 'utf8');
1393
+ const text = readAgentText(filePath);
1287
1394
  const { frontmatter } = parseFrontmatter(text);
1288
1395
  const name = frontmatter.name || path.basename(entry.rel, '.md');
1289
- const bareId = name.replace(/^rihal-/, '');
1396
+ const bareId = name.replace(/^rcode-/, '');
1290
1397
  if (seen.has(bareId)) continue; // Skip duplicate
1291
1398
  seen.add(bareId);
1292
1399
  const desc = (frontmatter.description || '').replace(/"/g, '""');
@@ -1301,21 +1408,56 @@ function generateAgentManifest(plan, target) {
1301
1408
  // Also include agents already on disk but not in current plan
1302
1409
  const agentDir = path.join(target, '.claude', 'agents');
1303
1410
  if (fs.existsSync(agentDir)) {
1304
- const existingFiles = fs.readdirSync(agentDir).filter(f => f.startsWith('rihal-') && f.endsWith('.md'));
1411
+ const existingFiles = fs.readdirSync(agentDir).filter(f => f.startsWith('rcode-') && f.endsWith('.md'));
1305
1412
  const alreadyIncluded = new Set(plan.filter(e => e.rel.startsWith(path.join('.claude', 'agents'))).map(e => path.basename(e.rel)));
1306
1413
  for (const file of existingFiles) {
1307
1414
  if (alreadyIncluded.has(file)) continue;
1308
1415
  const filePath = path.join(agentDir, file);
1309
- const text = fs.readFileSync(filePath, 'utf8');
1416
+ const text = readAgentText(filePath);
1310
1417
  const { frontmatter } = parseFrontmatter(text);
1311
1418
  const name = frontmatter.name || path.basename(file, '.md');
1312
- const bareId = name.replace(/^rihal-/, '');
1419
+ const bareId = name.replace(/^rcode-/, '');
1313
1420
  if (seen.has(bareId)) continue; // Skip if already added
1314
1421
  seen.add(bareId);
1315
1422
  const desc = (frontmatter.description || '').replace(/"/g, '""');
1316
1423
  rows.push([bareId, path.join('.claude', 'agents', file), name, `"${desc}"`, frontmatter.color || '']);
1317
1424
  }
1318
1425
  }
1426
+ // Issues #805/#808/#825: always scan known global locations (not gated on
1427
+ // rows.length === 1) so the manifest reflects every installed agent. On a
1428
+ // fresh project install agents may live in ~/.claude/agents/ (global slash
1429
+ // commands) or in the source tree if local copy was skipped via dedup.
1430
+ // Also scan rcode/agents/ in SOURCE_ROOT as a last-resort fallback so the
1431
+ // manifest is never empty when the package itself ships agent definitions.
1432
+ const extraScans = [
1433
+ path.join(os.homedir(), '.claude', 'agents'),
1434
+ path.join(os.homedir(), '.rcode', 'agents'),
1435
+ ];
1436
+ // Final fallback: scan the package source itself.
1437
+ try {
1438
+ const sourceAgentsDir = path.join(SOURCE_ROOT, 'agents');
1439
+ if (fs.existsSync(sourceAgentsDir)) extraScans.push(sourceAgentsDir);
1440
+ } catch { /* SOURCE_ROOT may not be in scope on some paths */ }
1441
+
1442
+ for (const scanDir of extraScans) {
1443
+ if (!fs.existsSync(scanDir)) continue;
1444
+ let files;
1445
+ try {
1446
+ files = fs.readdirSync(scanDir).filter(f => f.startsWith('rcode-') && f.endsWith('.md'));
1447
+ } catch { continue; }
1448
+ for (const file of files) {
1449
+ const filePath = path.join(scanDir, file);
1450
+ let text;
1451
+ try { text = readAgentText(filePath); } catch { continue; }
1452
+ const { frontmatter } = parseFrontmatter(text);
1453
+ const name = frontmatter.name || path.basename(file, '.md');
1454
+ const bareId = name.replace(/^rcode-/, '');
1455
+ if (seen.has(bareId)) continue;
1456
+ seen.add(bareId);
1457
+ const desc = (frontmatter.description || '').replace(/"/g, '""');
1458
+ rows.push([bareId, path.join('.claude', 'agents', file), name, `"${desc}"`, frontmatter.color || '']);
1459
+ }
1460
+ }
1319
1461
  return rows.map((r) => r.join(',')).join('\n') + '\n';
1320
1462
  }
1321
1463
 
@@ -1326,11 +1468,17 @@ function generateAgentManifest(plan, target) {
1326
1468
  function generateFilesManifest(plan, target, { mergeExistingManifest = false, extraScanDirs = [] } = {}) {
1327
1469
  const rows = [['rel', 'sha256', 'size']];
1328
1470
  const newRels = new Set();
1471
+ // Memoize Buffer reads — plan loop and merge loop can visit the same file path.
1472
+ const _bufCache = new Map();
1473
+ const readFileBuf = (p) => {
1474
+ if (!_bufCache.has(p)) _bufCache.set(p, fs.readFileSync(p));
1475
+ return _bufCache.get(p);
1476
+ };
1329
1477
 
1330
1478
  for (const entry of plan) {
1331
1479
  const filePath = path.join(target, entry.rel);
1332
1480
  if (!fs.existsSync(filePath)) continue;
1333
- const buf = fs.readFileSync(filePath);
1481
+ const buf = readFileBuf(filePath);
1334
1482
  const rel = entry.rel.split(path.sep).join('/');
1335
1483
  rows.push([rel, sha256(buf), String(buf.length)]);
1336
1484
  newRels.add(rel);
@@ -1338,7 +1486,7 @@ function generateFilesManifest(plan, target, { mergeExistingManifest = false, ex
1338
1486
 
1339
1487
  // Issue #702: skills installed via installSkills() and sidebar stubs
1340
1488
  // generated by cli/generate-command-skills.cjs are NOT in the install plan
1341
- // (they're walked from rihal/skills/ separately and copied directly).
1489
+ // (they're walked from rcode/skills/ separately and copied directly).
1342
1490
  // Without this scan, files-manifest.csv was missing the largest category
1343
1491
  // of installed files — orphan sweep + doctor drift detection were blind
1344
1492
  // to renamed/removed skills.
@@ -1355,7 +1503,7 @@ function generateFilesManifest(plan, target, { mergeExistingManifest = false, ex
1355
1503
  // is a code-controlled set, but cheap to verify).
1356
1504
  if (rel.startsWith('..') || path.isAbsolute(rel)) continue;
1357
1505
  try {
1358
- const buf = fs.readFileSync(full);
1506
+ const buf = readFileBuf(full);
1359
1507
  rows.push([rel, sha256(buf), String(buf.length)]);
1360
1508
  newRels.add(rel);
1361
1509
  } catch { /* unreadable file — skip */ }
@@ -1369,7 +1517,7 @@ function generateFilesManifest(plan, target, { mergeExistingManifest = false, ex
1369
1517
  // --force sweep was not run. Without this, a re-install without --force
1370
1518
  // silently drops stale files from the manifest, making them invisible.
1371
1519
  if (mergeExistingManifest) {
1372
- const manifestPath = path.join(target, '.rihal', '_config', 'files-manifest.csv');
1520
+ const manifestPath = path.join(target, '.rcode', '_config', 'files-manifest.csv');
1373
1521
  if (fs.existsSync(manifestPath)) {
1374
1522
  try {
1375
1523
  const oldRows = fs.readFileSync(manifestPath, 'utf8').split('\n').slice(1).filter(Boolean);
@@ -1378,7 +1526,7 @@ function generateFilesManifest(plan, target, { mergeExistingManifest = false, ex
1378
1526
  if (!rel || newRels.has(rel)) continue;
1379
1527
  const full = path.join(target, rel);
1380
1528
  if (!fs.existsSync(full)) continue; // already gone — don't re-add
1381
- const buf = fs.readFileSync(full);
1529
+ const buf = readFileBuf(full);
1382
1530
  rows.push([rel, sha256(buf), String(buf.length)]);
1383
1531
  newRels.add(rel);
1384
1532
  }
@@ -1391,7 +1539,7 @@ function generateFilesManifest(plan, target, { mergeExistingManifest = false, ex
1391
1539
 
1392
1540
  /**
1393
1541
  * Orphan sweep — remove files that were part of a previous install but aren't
1394
- * in the current plan. Reads `.rihal/_config/files-manifest.csv` from the
1542
+ * in the current plan. Reads `.rcode/_config/files-manifest.csv` from the
1395
1543
  * previous install and computes the diff against the new plan.
1396
1544
  *
1397
1545
  * Closes #196 — without this, upgrading rcode leaves stale skill/command
@@ -1400,12 +1548,12 @@ function generateFilesManifest(plan, target, { mergeExistingManifest = false, ex
1400
1548
  * Deliberately conservative:
1401
1549
  * - Only removes files that appeared in the PREVIOUS manifest.
1402
1550
  * - Never removes files the user created themselves.
1403
- * - Never touches .rihal/config.yaml, .rihal/state.json, or .planning/.
1551
+ * - Never touches .rcode/config.yaml, .rcode/state.json, or .planning/.
1404
1552
  *
1405
1553
  * Returns the number of orphan files removed.
1406
1554
  */
1407
1555
  function sweepStaleInstalledFiles(target, newPlan) {
1408
- const manifestPath = path.join(target, '.rihal', '_config', 'files-manifest.csv');
1556
+ const manifestPath = path.join(target, '.rcode', '_config', 'files-manifest.csv');
1409
1557
  if (!fs.existsSync(manifestPath)) return 0;
1410
1558
 
1411
1559
  let oldRels;
@@ -1418,7 +1566,7 @@ function sweepStaleInstalledFiles(target, newPlan) {
1418
1566
 
1419
1567
  const newRelsSet = new Set(newPlan.map(e => e.rel.split(path.sep).join('/')));
1420
1568
  // Safety — never sweep these, even if they somehow landed in the manifest.
1421
- const neverSweep = /^(\.rihal\/config\.yaml|\.rihal\/state\.json|\.rihal\/state\.json\.lock|\.planning\/|\.rihal\/brain\/sources\.yaml)/;
1569
+ const neverSweep = /^(\.rcode\/config\.yaml|\.rcode\/state\.json|\.rcode\/state\.json\.lock|\.planning\/|\.rcode\/brain\/sources\.yaml)/;
1422
1570
  // #382 — local overrides: files matching <name>.local.md are user-managed.
1423
1571
  // The installer never touches them: not in copy, not in sweep, not even on
1424
1572
  // --force-overwrite. This gives users a stable path to customize agent
@@ -1456,12 +1604,55 @@ function sweepStaleInstalledFiles(target, newPlan) {
1456
1604
  if (fs.existsSync(dir) && fs.readdirSync(dir).length === 0) {
1457
1605
  fs.rmdirSync(dir);
1458
1606
  }
1459
- } catch {}
1607
+ } catch (err) {
1608
+ console.error('[install] sweepStaleInstalledFiles: failed to remove empty dir', dir + ':', err?.message || err);
1609
+ }
1460
1610
  }
1461
1611
 
1462
1612
  return removed;
1463
1613
  }
1464
1614
 
1615
+ /**
1616
+ * Issue #838 — pnpm lockfile silent failure detection.
1617
+ *
1618
+ * pnpm add -D can exit 0 and print "Done" even when the lockfile is
1619
+ * corrupted, without actually writing package.json. This helper is called
1620
+ * after any pnpm add run (including auto-install flows) to confirm the
1621
+ * package genuinely landed in devDependencies.
1622
+ *
1623
+ * Returns { ok: true } when:
1624
+ * - no package.json exists in target (nothing to verify)
1625
+ * - package found in dependencies or devDependencies
1626
+ *
1627
+ * Returns { ok: false, message } when:
1628
+ * - package.json exists in a pnpm project (pnpm-lock.yaml present) but
1629
+ * @hanzlaa/rcode is absent from both dep sections — strongly suggests
1630
+ * a silent pnpm add failure due to a broken lockfile.
1631
+ */
1632
+ function verifyPnpmAddDevDep(target) {
1633
+ const pkgPath = path.join(target, 'package.json');
1634
+ const lockPath = path.join(target, 'pnpm-lock.yaml');
1635
+ // Only diagnose when both a package.json and pnpm-lock.yaml exist (pnpm project).
1636
+ if (!fs.existsSync(pkgPath) || !fs.existsSync(lockPath)) return { ok: true };
1637
+ try {
1638
+ const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
1639
+ const inDeps = Object.prototype.hasOwnProperty.call(pkg.dependencies || {}, '@hanzlaa/rcode');
1640
+ const inDevDeps = Object.prototype.hasOwnProperty.call(pkg.devDependencies || {}, '@hanzlaa/rcode');
1641
+ if (!inDeps && !inDevDeps) {
1642
+ return {
1643
+ ok: false,
1644
+ message:
1645
+ '@hanzlaa/rcode not found in package.json — if you ran `pnpm add -D @hanzlaa/rcode` ' +
1646
+ 'and it reported success, your lockfile may be corrupted.\n' +
1647
+ ' Fix: pnpm install --fix-lockfile && pnpm add -D @hanzlaa/rcode',
1648
+ };
1649
+ }
1650
+ return { ok: true };
1651
+ } catch {
1652
+ return { ok: true }; // unreadable package.json — not our problem
1653
+ }
1654
+ }
1655
+
1465
1656
  function readPackageVersion() {
1466
1657
  try {
1467
1658
  const pkg = JSON.parse(fs.readFileSync(path.join(PACKAGE_ROOT, 'package.json'), 'utf8'));
@@ -1477,7 +1668,7 @@ function generateInstallManifest(opts) {
1477
1668
  // Merge with existing manifest if present; capture previous_version for rollback (#253).
1478
1669
  let existingModules = [];
1479
1670
  let previousVersion = null;
1480
- const existingPath = path.join(opts.target, '.rihal', '_config', 'manifest.yaml');
1671
+ const existingPath = path.join(opts.target, '.rcode', '_config', 'manifest.yaml');
1481
1672
  if (fs.existsSync(existingPath)) {
1482
1673
  const text = fs.readFileSync(existingPath, 'utf8');
1483
1674
  let inModules = false;
@@ -1494,7 +1685,7 @@ function generateInstallManifest(opts) {
1494
1685
  const allModules = [...new Set([...existingModules, ...newModules])];
1495
1686
  const moduleLines = allModules.map((m) => ` - ${m}`).join('\n');
1496
1687
  const lines = [
1497
- '# Rihal v2 install manifest',
1688
+ '# rcode v2 install manifest',
1498
1689
  `version: ${version}`,
1499
1690
  `installDate: ${new Date().toISOString()}`,
1500
1691
  ];
@@ -1509,7 +1700,7 @@ function sanitizeYamlValue(val) {
1509
1700
 
1510
1701
  function generateConfigYaml(opts) {
1511
1702
  return [
1512
- '# Rihal v2 project config',
1703
+ '# rcode v2 project config',
1513
1704
  '# Generated by install. Safe to edit.',
1514
1705
  `user_name: "${sanitizeYamlValue(opts.userName)}"`,
1515
1706
  `project_name: "${sanitizeYamlValue(opts.projectName)}"`,
@@ -1517,7 +1708,7 @@ function generateConfigYaml(opts) {
1517
1708
  `mode: "${sanitizeYamlValue(opts.mode)}"`,
1518
1709
  `model_profile: "balanced"`,
1519
1710
  `commit_planning: ${opts.commitPlanning !== false}`,
1520
- `rihal_source_path: "${sanitizeYamlValue(path.dirname(path.dirname(process.argv[1])))}/"`,
1711
+ `rcode_source_path: "${sanitizeYamlValue(resolveStableSourcePath())}/"`,
1521
1712
  'workflow:',
1522
1713
  ' research_by_default: false',
1523
1714
  ' plan_checker: true',
@@ -1610,7 +1801,7 @@ async function install(opts) {
1610
1801
  }
1611
1802
 
1612
1803
  // Issue #691: file lock prevents concurrent installs from racing on the
1613
- // same .rihal/_config/manifest.yaml + files-manifest.csv. Without it, two
1804
+ // same .rcode/_config/manifest.yaml + files-manifest.csv. Without it, two
1614
1805
  // parallel runs (two terminals, postinstall + manual install, etc.) can
1615
1806
  // each write a manifest the OTHER doesn't see → orphan sweep on the next
1616
1807
  // install deletes files the other run considered legit.
@@ -1640,7 +1831,7 @@ async function install(opts) {
1640
1831
  }
1641
1832
 
1642
1833
  /**
1643
- * Acquire an exclusive install lock at .rihal/.install.lock (issue #691).
1834
+ * Acquire an exclusive install lock at .rcode/.install.lock (issue #691).
1644
1835
  *
1645
1836
  * Returns:
1646
1837
  * { ok: true, release: () => void } lock acquired
@@ -1650,7 +1841,7 @@ async function install(opts) {
1650
1841
  * reclaimed automatically.
1651
1842
  */
1652
1843
  function acquireInstallLock(target) {
1653
- const lockDir = path.join(target, '.rihal');
1844
+ const lockDir = path.join(target, '.rcode');
1654
1845
  const lockPath = path.join(lockDir, '.install.lock');
1655
1846
  try {
1656
1847
  fs.mkdirSync(lockDir, { recursive: true });
@@ -1668,14 +1859,14 @@ function acquireInstallLock(target) {
1668
1859
  return {
1669
1860
  ok: true,
1670
1861
  release: () => {
1671
- try { fs.unlinkSync(lockPath); } catch {}
1862
+ try { fs.unlinkSync(lockPath); } catch (err) { console.error('[install] acquireInstallLock: failed to release lock', lockPath + ':', err?.message || err); }
1672
1863
  },
1673
1864
  };
1674
1865
  } catch (err) {
1675
1866
  if (err.code !== 'EEXIST') throw err;
1676
1867
  // Lock exists — check if holder is alive.
1677
1868
  let pid = 0;
1678
- try { pid = parseInt(fs.readFileSync(lockPath, 'utf8'), 10); } catch {}
1869
+ try { pid = parseInt(fs.readFileSync(lockPath, 'utf8'), 10); } catch (err) { console.error('[install] acquireInstallLock: failed to read lock pid from', lockPath + ':', err?.message || err); }
1679
1870
  if (pid && !isAlive(pid)) {
1680
1871
  // Stale lock — remove and retry once.
1681
1872
  try { fs.unlinkSync(lockPath); } catch {}
@@ -1701,10 +1892,10 @@ async function installInner(opts) {
1701
1892
  // Resolve commit-planning preference (interactive prompt or flag) — #189.
1702
1893
  opts.commitPlanning = await resolveCommitPlanning(opts);
1703
1894
 
1704
- console.log(`\n🕌 ${bold('Rihal Code')} ${pc.cyan('v' + pkgVersion)} ${dim('→')} ${opts.target}`);
1895
+ console.log(`\n🕌 ${bold('rcode')} ${pc.cyan('v' + pkgVersion)} ${dim('→')} ${opts.target}`);
1705
1896
 
1706
1897
  // Detect an existing install and surface it (#195).
1707
- const existingManifestPath = path.join(opts.target, '.rihal', '_config', 'manifest.yaml');
1898
+ const existingManifestPath = path.join(opts.target, '.rcode', '_config', 'manifest.yaml');
1708
1899
  if (fs.existsSync(existingManifestPath)) {
1709
1900
  const m = fs.readFileSync(existingManifestPath, 'utf8').match(/^version:\s*(.+)$/m);
1710
1901
  const existingVersion = m ? m[1].trim() : 'unknown';
@@ -1727,6 +1918,9 @@ async function installInner(opts) {
1727
1918
 
1728
1919
  // Validate IDE(s) — structured error for unsupported editors (#197).
1729
1920
  // SUPPORTED_IDES is the module-level constant (#697 / W4.3).
1921
+ // Issue #841: also accept 'claude-code' as an alias — normalise any that
1922
+ // slipped through resolveIde before reaching this point.
1923
+ opts.ides = opts.ides.map(ide => (ide === 'claude-code' ? 'claude' : ide));
1730
1924
  const unsupported = opts.ides.filter(ide => !SUPPORTED_IDES.includes(ide));
1731
1925
  if (unsupported.length > 0) {
1732
1926
  console.error(`✖ --ide ${unsupported.join(', ')} is not supported in v${readPackageVersion()}.`);
@@ -1736,6 +1930,7 @@ async function installInner(opts) {
1736
1930
  console.error(' cursor — Cursor IDE');
1737
1931
  console.error(' gemini — Gemini CLI');
1738
1932
  console.error(' vscode — VS Code (with Claude Code / Continue / Copilot extension)');
1933
+ console.error(' windsurf — Windsurf (Codeium)');
1739
1934
  console.error(' antigravity — Antigravity (experimental)');
1740
1935
  console.error('');
1741
1936
  console.error(' Tracked for future:');
@@ -1763,8 +1958,8 @@ async function installInner(opts) {
1763
1958
 
1764
1959
  // Antigravity install is experimental — best-effort path, user may need to adjust
1765
1960
  if (opts.ides.includes('antigravity')) {
1766
- console.log(' ' + warn('Antigravity install is experimental. Files land at .antigravity/rihal/{agents,commands}/.'));
1767
- console.log(' ' + dim('If Antigravity expects a different path, adjust .rihal/config.yaml and re-run.'));
1961
+ console.log(' ' + warn('Antigravity install is experimental. Files land at .antigravity/rcode/{agents,commands}/.'));
1962
+ console.log(' ' + dim('If Antigravity expects a different path, adjust .rcode/config.yaml and re-run.'));
1768
1963
  }
1769
1964
 
1770
1965
  // Validate requested modules exist
@@ -1783,7 +1978,7 @@ async function installInner(opts) {
1783
1978
  if (Array.isArray(opts.ides) && opts.ides.includes('vscode') || (opts.ide === 'vscode')) {
1784
1979
  const migrated = migrateVscodeCommandsLayout(opts.target);
1785
1980
  if (migrated.moved > 0) {
1786
- console.log(` ↻ Migrated ${migrated.moved} legacy vscode-layout command(s) to .claude/commands/rihal-{name}.md`);
1981
+ console.log(` ↻ Migrated ${migrated.moved} legacy vscode-layout command(s) to .claude/commands/rcode-{name}.md`);
1787
1982
  }
1788
1983
  }
1789
1984
 
@@ -1799,7 +1994,7 @@ async function installInner(opts) {
1799
1994
  }
1800
1995
 
1801
1996
  // Force-overwrite backup — closes #381. Without this, customized
1802
- // .claude/agents/rihal-*.md and similar package-managed files were silently
1997
+ // .claude/agents/rcode-*.md and similar package-managed files were silently
1803
1998
  // clobbered with no recovery path. Now every --force-overwrite run creates
1804
1999
  // a tar.gz of every existing target before any write happens.
1805
2000
  // Skip when --no-backup is passed (CI escape hatch) or on fresh installs.
@@ -1834,7 +2029,7 @@ async function installInner(opts) {
1834
2029
  // to overwrite. If hashes differ, user customized it → preserve.
1835
2030
  const priorManifest = new Map();
1836
2031
  if (opts.nonDestructive) {
1837
- const manifestPath = path.join(opts.target, '.rihal', '_config', 'files-manifest.csv');
2032
+ const manifestPath = path.join(opts.target, '.rcode', '_config', 'files-manifest.csv');
1838
2033
  if (fs.existsSync(manifestPath)) {
1839
2034
  try {
1840
2035
  const lines = fs.readFileSync(manifestPath, 'utf8').split('\n').slice(1).filter(Boolean);
@@ -1866,16 +2061,24 @@ async function installInner(opts) {
1866
2061
  const relForward = entry.rel.split(path.sep).join('/');
1867
2062
  ensureDir(path.dirname(destPath));
1868
2063
 
2064
+ // Per-iteration lazy readers — avoids re-reading destPath / entry.src across
2065
+ // multiple conditional branches within the same loop body (up to 4 reads of
2066
+ // destPath and 5 reads of entry.src in the worst case without this cache).
2067
+ let _destBuf = null;
2068
+ let _srcBuf = null;
2069
+ const readDestBuf = () => { if (!_destBuf) _destBuf = fs.readFileSync(destPath); return _destBuf; };
2070
+ const readSrcBuf = () => { if (!_srcBuf) _srcBuf = fs.readFileSync(entry.src); return _srcBuf; };
2071
+
1869
2072
  // Non-destructive guard (#232): preserve user-modified files.
1870
2073
  // --accept-all (#251) overrides: treat all files as pristine.
1871
2074
  if (opts.nonDestructive && !opts.forceOverwrite && !opts.acceptAll && fs.existsSync(destPath)) {
1872
2075
  const priorHash = priorManifest.get(relForward);
1873
2076
  if (priorHash) {
1874
- const installedContent = fs.readFileSync(destPath, 'utf8');
1875
- const currentHash = sha256(Buffer.from(installedContent));
2077
+ const installedContent = readDestBuf().toString('utf8');
2078
+ const currentHash = sha256(readDestBuf());
1876
2079
  if (currentHash !== priorHash) {
1877
2080
  // Compute diff stat for display (#251)
1878
- const srcContent = fs.readFileSync(entry.src, 'utf8');
2081
+ const srcContent = readSrcBuf().toString('utf8');
1879
2082
  const patch = createTwoFilesPatch(relForward, relForward, installedContent, srcContent, 'installed', 'source');
1880
2083
  let ins = 0, del = 0;
1881
2084
  for (const line of patch.split('\n')) {
@@ -1894,8 +2097,8 @@ async function installInner(opts) {
1894
2097
  }
1895
2098
 
1896
2099
  if (fs.existsSync(destPath) && !opts.force && !opts.forceOverwrite) {
1897
- const existingHash = sha256(fs.readFileSync(destPath));
1898
- const sourceHash = sha256(fs.readFileSync(entry.src));
2100
+ const existingHash = sha256(readDestBuf());
2101
+ const sourceHash = sha256(readSrcBuf());
1899
2102
  if (existingHash === sourceHash) { skipped++; continue; }
1900
2103
  if (!opts.yes && !opts.nonDestructive) {
1901
2104
  // Buffer the conflict instead of spamming a warning per file (#451).
@@ -1904,8 +2107,8 @@ async function installInner(opts) {
1904
2107
  rel: relForward,
1905
2108
  src: entry.src,
1906
2109
  destPath,
1907
- existingContent: fs.readFileSync(destPath, 'utf8'),
1908
- sourceContent: fs.readFileSync(entry.src, 'utf8'),
2110
+ existingContent: readDestBuf().toString('utf8'),
2111
+ sourceContent: readSrcBuf().toString('utf8'),
1909
2112
  });
1910
2113
  skipped++;
1911
2114
  continue;
@@ -1913,14 +2116,14 @@ async function installInner(opts) {
1913
2116
  }
1914
2117
 
1915
2118
  if (fs.existsSync(destPath) && opts.forceOverwrite) {
1916
- const existing = fs.readFileSync(destPath);
1917
- const incoming = fs.readFileSync(entry.src);
2119
+ const existing = readDestBuf();
2120
+ const incoming = readSrcBuf();
1918
2121
  if (!existing.equals(incoming)) {
1919
2122
  spinner.update({ text: dim(`overwriting ${entry.rel}`) });
1920
2123
  }
1921
2124
  }
1922
2125
 
1923
- let content = fs.readFileSync(entry.src, 'utf8');
2126
+ let content = readSrcBuf().toString('utf8');
1924
2127
  if (entry.cursor) content = convertToCursorMdc(content);
1925
2128
  fs.writeFileSync(destPath, content, 'utf8');
1926
2129
  if (entry.executable) fs.chmodSync(destPath, 0o755);
@@ -2041,7 +2244,7 @@ async function installInner(opts) {
2041
2244
  // Global install only ships the read-only tooling: commands, skills, workflows, bin.
2042
2245
  if (opts.global) {
2043
2246
  // Still write the manifest so the global install is traceable/upgradeable
2044
- const configDir = path.join(opts.target, '.rihal', '_config');
2247
+ const configDir = path.join(opts.target, '.rcode', '_config');
2045
2248
  ensureDir(configDir);
2046
2249
  fs.writeFileSync(path.join(configDir, 'manifest.yaml'), generateInstallManifest(opts));
2047
2250
  // Install skills + sidebar stubs globally — never dedup against globals,
@@ -2061,7 +2264,7 @@ async function installInner(opts) {
2061
2264
  return 0;
2062
2265
  }
2063
2266
 
2064
- // Duplicate-prevention: if rihal commands already exist globally in ~/.claude/commands/,
2267
+ // Duplicate-prevention: if rcode commands already exist globally in ~/.claude/commands/,
2065
2268
  // skip writing agents/commands to the project's .claude/ directory. Without this,
2066
2269
  // running `npx rcode install` in the home dir AND then in a project creates two sets
2067
2270
  // of identical files — Claude Code shows both as duplicate slash commands.
@@ -2071,18 +2274,18 @@ async function installInner(opts) {
2071
2274
  // Run dedup even when force:true — only forceOverwrite skips it.
2072
2275
  if (isProjectInstall && !opts.forceOverwrite) {
2073
2276
  try {
2074
- // Check both root-level rihal-*.md AND the rihal/ subdirectory (vscode-style).
2075
- const globalHasRihal = fs.existsSync(globalClaudeCommands) && (
2076
- fs.readdirSync(globalClaudeCommands).some(f => f.startsWith('rihal-') && f.endsWith('.md')) ||
2077
- fs.existsSync(path.join(globalClaudeCommands, 'rihal'))
2277
+ // Check both root-level rcode-*.md AND the rcode/ subdirectory (vscode-style).
2278
+ const globalHasrcode = fs.existsSync(globalClaudeCommands) && (
2279
+ fs.readdirSync(globalClaudeCommands).some(f => f.startsWith('rcode-') && f.endsWith('.md')) ||
2280
+ fs.existsSync(path.join(globalClaudeCommands, 'rcode'))
2078
2281
  );
2079
- const projectHasRihal = fs.existsSync(projectClaudeCommands) && (
2080
- fs.readdirSync(projectClaudeCommands).some(f => f.startsWith('rihal-') && f.endsWith('.md')) ||
2081
- fs.existsSync(path.join(projectClaudeCommands, 'rihal'))
2282
+ const projectHasrcode = fs.existsSync(projectClaudeCommands) && (
2283
+ fs.readdirSync(projectClaudeCommands).some(f => f.startsWith('rcode-') && f.endsWith('.md')) ||
2284
+ fs.existsSync(path.join(projectClaudeCommands, 'rcode'))
2082
2285
  );
2083
- if (globalHasRihal && !projectHasRihal) {
2286
+ if (globalHasrcode && !projectHasrcode) {
2084
2287
  // Global commands exist, project has none yet — filter them out of the plan
2085
- // so we don't create duplicates. Project gets .rihal/ state only.
2288
+ // so we don't create duplicates. Project gets .rcode/ state only.
2086
2289
  const before = plan.length;
2087
2290
  const filtered = plan.filter(e => {
2088
2291
  const rel = e.rel.split(path.sep).join('/');
@@ -2091,33 +2294,33 @@ async function installInner(opts) {
2091
2294
  if (filtered.length < before) {
2092
2295
  plan.length = 0;
2093
2296
  filtered.forEach(e => plan.push(e));
2094
- console.log(' ' + dim('Global rihal commands detected in ~/.claude/ — skipping project-level agent/command install to avoid duplicates.'));
2297
+ console.log(' ' + dim('Global rcode commands detected in ~/.claude/ — skipping project-level agent/command install to avoid duplicates.'));
2095
2298
  console.log(' ' + dim('Use --force-overwrite to install locally anyway.'));
2096
2299
  }
2097
- } else if (globalHasRihal && projectHasRihal) {
2300
+ } else if (globalHasrcode && projectHasrcode) {
2098
2301
  // Both exist — project commands are duplicates. Remove project-level ones.
2099
2302
  try {
2100
- // Remove root-level rihal-*.md files
2303
+ // Remove root-level rcode-*.md files
2101
2304
  const projectCommandFiles = fs.readdirSync(projectClaudeCommands)
2102
- .filter(f => f.startsWith('rihal-') && f.endsWith('.md'));
2305
+ .filter(f => f.startsWith('rcode-') && f.endsWith('.md'));
2103
2306
  for (const f of projectCommandFiles) {
2104
2307
  fs.unlinkSync(path.join(projectClaudeCommands, f));
2105
2308
  }
2106
- // Remove rihal/ subdirectory (vscode-style commands).
2309
+ // Remove rcode/ subdirectory (vscode-style commands).
2107
2310
  // #688 — safeRmSync refuses to traverse out-of-target symlinks.
2108
- const rihalSubdir = path.join(projectClaudeCommands, 'rihal');
2109
- if (fs.existsSync(rihalSubdir)) {
2110
- safeRmSync(rihalSubdir, opts.target);
2311
+ const rcodeSubdir = path.join(projectClaudeCommands, 'rcode');
2312
+ if (fs.existsSync(rcodeSubdir)) {
2313
+ safeRmSync(rcodeSubdir, opts.target);
2111
2314
  }
2112
2315
  const projectAgentsDir = path.join(opts.target, '.claude', 'agents');
2113
2316
  if (fs.existsSync(projectAgentsDir)) {
2114
2317
  const agentFiles = fs.readdirSync(projectAgentsDir)
2115
- .filter(f => f.startsWith('rihal-') && f.endsWith('.md'));
2318
+ .filter(f => f.startsWith('rcode-') && f.endsWith('.md'));
2116
2319
  for (const f of agentFiles) {
2117
2320
  fs.unlinkSync(path.join(projectAgentsDir, f));
2118
2321
  }
2119
2322
  }
2120
- console.log(' ' + dim('Removed duplicate project-level rihal commands (global ones in ~/.claude/ take precedence).'));
2323
+ console.log(' ' + dim('Removed duplicate project-level rcode commands (global ones in ~/.claude/ take precedence).'));
2121
2324
  } catch { /* non-fatal */ }
2122
2325
  const filtered = plan.filter(e => {
2123
2326
  const rel = e.rel.split(path.sep).join('/');
@@ -2130,15 +2333,18 @@ async function installInner(opts) {
2130
2333
  } catch { /* non-fatal — skip detection on permission errors */ }
2131
2334
  }
2132
2335
 
2133
- // Write .rihal/_config/manifest.yaml + agent-manifest.csv + files-manifest.csv
2134
- const configDir = path.join(opts.target, '.rihal', '_config');
2336
+ // Write .rcode/_config/manifest.yaml + agent-manifest.csv + files-manifest.csv
2337
+ const configDir = path.join(opts.target, '.rcode', '_config');
2135
2338
  ensureDir(configDir);
2339
+ // Issue #806: ensure .planning/ exists so /rcode-new-project Write calls succeed
2340
+ // even when seedStarterPlanning returns early (e.g. ROADMAP.md already present).
2341
+ ensureDir(path.join(opts.target, '.planning'));
2136
2342
  fs.writeFileSync(path.join(configDir, 'manifest.yaml'), generateInstallManifest(opts));
2137
2343
  fs.writeFileSync(path.join(configDir, 'agent-manifest.csv'), generateAgentManifest(plan, opts.target));
2138
2344
 
2139
2345
  // Handle --reset flag: delete config.yaml and state.json if --reset is passed
2140
- const configPath = path.join(opts.target, '.rihal', 'config.yaml');
2141
- const stateDest = path.join(opts.target, '.rihal', 'state.json');
2346
+ const configPath = path.join(opts.target, '.rcode', 'config.yaml');
2347
+ const stateDest = path.join(opts.target, '.rcode', 'state.json');
2142
2348
  let existedBefore = false;
2143
2349
 
2144
2350
  if (opts.reset && opts.force) {
@@ -2153,7 +2359,7 @@ async function installInner(opts) {
2153
2359
  }
2154
2360
  // Note: --reset without --force is rejected at the top of install() (#680).
2155
2361
 
2156
- // Write .rihal/config.yaml (user_name, project_name, language, mode)
2362
+ // Write .rcode/config.yaml (user_name, project_name, language, mode)
2157
2363
  // Note: config.yaml is user data and should NOT be overwritten on --force (unless --reset)
2158
2364
  if (!fs.existsSync(configPath)) {
2159
2365
  writeFileAtomic(configPath, generateConfigYaml(opts));
@@ -2189,17 +2395,21 @@ async function installInner(opts) {
2189
2395
  console.log('');
2190
2396
  console.log(' ' + warn('config.yaml has validation errors:'));
2191
2397
  for (const e of validation.errors) console.log(pc.yellow(e));
2192
- console.log(dim(' → Edit .rihal/config.yaml to fix, then run /rihal-status'));
2398
+ console.log(dim(' → Edit .rcode/config.yaml to fix, then run /rcode-status'));
2193
2399
  }
2194
2400
  } catch { /* best-effort */ }
2195
2401
 
2196
- // Seed .rihal/state.json (skip if already exists — don't overwrite on re-install unless --reset)
2402
+ // Seed .rcode/state.json (skip if already exists — don't overwrite on re-install unless --reset)
2197
2403
  if (!fs.existsSync(stateDest)) {
2198
2404
  const stateSrc = path.join(SOURCE_ROOT, 'state.json');
2199
2405
  if (fs.existsSync(stateSrc)) {
2200
2406
  const now = new Date().toISOString();
2407
+ // #809/#830: escape projectName for JSON embedding — quotes/backslashes
2408
+ // would corrupt the resulting state.json. JSON.stringify wraps in quotes;
2409
+ // slice them off because the template already has surrounding quotes.
2410
+ const safeProject = JSON.stringify(String(opts.projectName || path.basename(opts.target))).slice(1, -1);
2201
2411
  let stateContent = fs.readFileSync(stateSrc, 'utf8')
2202
- .replace(/__PROJECT_NAME__/g, opts.projectName)
2412
+ .replace(/__PROJECT_NAME__/g, safeProject)
2203
2413
  .replace(/__INSTALL_DATE__/g, now);
2204
2414
 
2205
2415
  // Issue #705: the template ships with _seeded_stub:true. If the user
@@ -2228,21 +2438,21 @@ async function installInner(opts) {
2228
2438
  // .planning/council-sessions/ empty dir
2229
2439
  ensureDir(path.join(opts.target, '.planning', 'council-sessions'));
2230
2440
 
2231
- // .rihal/context/ — seed stub files so doctor doesn't report "never initialized"
2232
- // The /rihal-init slash command populates these with real project content.
2233
- const contextDir = path.join(opts.target, '.rihal', 'context');
2441
+ // .rcode/context/ — seed stub files so doctor doesn't report "never initialized"
2442
+ // The /rcode-init slash command populates these with real project content.
2443
+ const contextDir = path.join(opts.target, '.rcode', 'context');
2234
2444
  ensureDir(contextDir);
2235
2445
  const activeCtx = path.join(contextDir, 'active.md');
2236
2446
  const briefCtx = path.join(contextDir, 'project-brief.md');
2237
2447
  if (!fs.existsSync(activeCtx)) {
2238
- fs.writeFileSync(activeCtx, '# Active Context\n\n_Run `/rihal-init` inside your AI editor to populate this file._\n');
2448
+ fs.writeFileSync(activeCtx, '# Active Context\n\n_Run `/rcode-init` inside your AI editor to populate this file._\n');
2239
2449
  }
2240
2450
  if (!fs.existsSync(briefCtx)) {
2241
- fs.writeFileSync(briefCtx, '# Project Brief\n\n_Run `/rihal-init` inside your AI editor to populate this file._\n');
2451
+ fs.writeFileSync(briefCtx, '# Project Brief\n\n_Run `/rcode-init` inside your AI editor to populate this file._\n');
2242
2452
  }
2243
2453
 
2244
- // ~/.rihal/agents/ global agents directory
2245
- const globalAgentsDir = path.join(os.homedir(), '.rihal', 'agents');
2454
+ // ~/.rcode/agents/ global agents directory
2455
+ const globalAgentsDir = path.join(os.homedir(), '.rcode', 'agents');
2246
2456
  ensureDir(globalAgentsDir);
2247
2457
 
2248
2458
  // Issue #702: files-manifest.csv used to be written here, BEFORE
@@ -2250,11 +2460,11 @@ async function installInner(opts) {
2250
2460
  // functions install were therefore invisible to sweepStaleInstalledFiles
2251
2461
  // and doctor's drift detection. Manifest generation moved below to AFTER
2252
2462
  // all skill installations complete, with extraScanDirs covering both
2253
- // .claude/skills/ and .rihal/skills/ on disk.
2463
+ // .claude/skills/ and .rcode/skills/ on disk.
2254
2464
 
2255
2465
  // Install v1-style phrase-activated skills (scaffold-project, create-prd,
2256
2466
  // retrospective, etc.) into .claude/skills/ alongside the v2 agents/commands.
2257
- // Issue #679: skip rihal-* skills that already exist in ~/.claude/skills/
2467
+ // Issue #679: skip rcode-* skills that already exist in ~/.claude/skills/
2258
2468
  // (global precedence) so the slash picker doesn't show every command twice.
2259
2469
  // Reuse the isProjectInstall flag declared earlier in this scope.
2260
2470
  const skillsResult = installSkills(PACKAGE_ROOT, opts.target, {
@@ -2262,7 +2472,7 @@ async function installInner(opts) {
2262
2472
  });
2263
2473
  let skillsInstalled = skillsResult.count;
2264
2474
  if (skillsResult.skippedGlobal > 0) {
2265
- console.log(' ' + dim(`Skipped ${skillsResult.skippedGlobal} project-level rihal skills (global ones in ~/.claude/skills/ take precedence) — closes #679.`));
2475
+ console.log(' ' + dim(`Skipped ${skillsResult.skippedGlobal} project-level rcode skills (global ones in ~/.claude/skills/ take precedence) — closes #679.`));
2266
2476
  }
2267
2477
 
2268
2478
  // Generate install-time skill stubs that mirror sidebar-worthy slash commands.
@@ -2296,7 +2506,7 @@ async function installInner(opts) {
2296
2506
  mergeExistingManifest: !opts.force,
2297
2507
  extraScanDirs: [
2298
2508
  path.join(opts.target, '.claude', 'skills'),
2299
- path.join(opts.target, '.rihal', 'skills'),
2509
+ path.join(opts.target, '.rcode', 'skills'),
2300
2510
  ],
2301
2511
  }),
2302
2512
  );
@@ -2304,7 +2514,7 @@ async function installInner(opts) {
2304
2514
  // Seed .planning/ with starter ROADMAP + STATE so workflows work immediately
2305
2515
  const starterSeeded = seedStarterPlanning(opts.target, opts.projectName);
2306
2516
 
2307
- // Install brain scaffolding at .rihal/brain/ (sources.yaml + README).
2517
+ // Install brain scaffolding at .rcode/brain/ (sources.yaml + README).
2308
2518
  // Actual brain content lands after first brain pull runs.
2309
2519
  installBrainScaffold(PACKAGE_ROOT, opts.target);
2310
2520
 
@@ -2316,13 +2526,13 @@ async function installInner(opts) {
2316
2526
  // Respects --no-git-hooks flag; skips silently when .git/ is absent.
2317
2527
  const hookReport = ensureRcodePreCommitHook(opts.target, { gitHooks: opts.gitHooks });
2318
2528
 
2319
- // Pull Rihal brain content (v2.0 — issue #158).
2320
- // Runs rihal-tools brain pull as a child process. Placeholder URLs
2529
+ // Pull rcode brain content (v2.0 — issue #158).
2530
+ // Runs rcode-tools brain pull as a child process. Placeholder URLs
2321
2531
  // are skipped gracefully so this does not fail a fresh install.
2322
2532
  let brainReport = null;
2323
2533
  try {
2324
2534
  const { execFileSync } = require('child_process');
2325
- const toolsPath = path.join(opts.target, '.rihal', 'bin', 'rihal-tools.cjs');
2535
+ const toolsPath = path.join(opts.target, '.rcode', 'bin', 'rcode-tools.cjs');
2326
2536
  if (fs.existsSync(toolsPath)) {
2327
2537
  // Issue #706: 60s timeout — without it, a slow upstream URL hangs the
2328
2538
  // entire install indefinitely. Brain pull is best-effort, so a timeout
@@ -2411,12 +2621,12 @@ async function installInner(opts) {
2411
2621
  let agentsFromGlobal = false, commandsFromGlobal = false;
2412
2622
  try {
2413
2623
  if (fs.existsSync(agentsDir)) {
2414
- agentCount = fs.readdirSync(agentsDir).filter(f => (f.startsWith('rihal-') || f.startsWith('rcode-')) && (f.endsWith('.md') || f.endsWith('.mdc'))).length;
2624
+ agentCount = fs.readdirSync(agentsDir).filter(f => (f.startsWith('rcode-') || f.startsWith('rcode-')) && (f.endsWith('.md') || f.endsWith('.mdc'))).length;
2415
2625
  }
2416
2626
  if (fs.existsSync(commandsDir)) {
2417
- // claude IDE names commands rihal-*.md; other IDEs use plain {name}.md inside a rihal/ subdir
2627
+ // claude IDE names commands rcode-*.md; other IDEs use plain {name}.md inside a rcode/ subdir
2418
2628
  const commandFilter = primaryIde === 'claude'
2419
- ? f => f.startsWith('rihal-') && (f.endsWith('.md') || f.endsWith('.mdc'))
2629
+ ? f => f.startsWith('rcode-') && (f.endsWith('.md') || f.endsWith('.mdc'))
2420
2630
  : f => f.endsWith('.md') || f.endsWith('.mdc');
2421
2631
  commandCount = fs.readdirSync(commandsDir).filter(commandFilter).length;
2422
2632
  }
@@ -2431,36 +2641,38 @@ async function installInner(opts) {
2431
2641
  const homeCommands = path.join(os.homedir(), '.claude/commands');
2432
2642
  const homeSkills = path.join(os.homedir(), '.claude/skills');
2433
2643
  if (agentCount === 0 && fs.existsSync(homeAgents)) {
2434
- // #669 — count both rihal-* and rcode-* prefixes; missing rcode-
2644
+ // #669 — count both rcode-* and rcode-* prefixes; missing rcode-
2435
2645
  // branch produced "Agents: 0" alongside "Skills: 120".
2436
2646
  const n = fs.readdirSync(homeAgents)
2437
- .filter(f => (f.startsWith('rihal-') || f.startsWith('rcode-')) && f.endsWith('.md'))
2647
+ .filter(f => (f.startsWith('rcode-') || f.startsWith('rcode-')) && f.endsWith('.md'))
2438
2648
  .length;
2439
2649
  if (n > 0) { agentCount = n; agentsFromGlobal = true; }
2440
2650
  }
2441
2651
  if (commandCount === 0 && fs.existsSync(homeCommands)) {
2442
2652
  const n = fs.readdirSync(homeCommands)
2443
- .filter(f => (f.startsWith('rihal-') || f.startsWith('rcode-')) && f.endsWith('.md'))
2653
+ .filter(f => (f.startsWith('rcode-') || f.startsWith('rcode-')) && f.endsWith('.md'))
2444
2654
  .length;
2445
2655
  if (n > 0) { commandCount = n; commandsFromGlobal = true; }
2446
2656
  }
2447
2657
  if (skillsInstalled < 20 && fs.existsSync(homeSkills)) {
2448
2658
  try {
2449
2659
  const globalSkillCount = fs.readdirSync(homeSkills, { withFileTypes: true })
2450
- .filter(d => d.isDirectory() && d.name.startsWith('rihal-')).length;
2660
+ .filter(d => d.isDirectory() && d.name.startsWith('rcode-')).length;
2451
2661
  if (globalSkillCount > skillsInstalled) skillsInstalled = globalSkillCount;
2452
2662
  } catch { /* non-fatal */ }
2453
2663
  }
2454
2664
  }
2455
- } catch {}
2665
+ } catch (err) {
2666
+ console.error('[install] installInner: failed to count installed agents/commands:', err?.message || err);
2667
+ }
2456
2668
 
2457
2669
  const version = readPackageVersion();
2458
2670
  console.log('');
2459
2671
  console.log(` ${bold('Version:')} ${pc.cyan('@hanzlaa/rcode@' + version)}`);
2460
2672
  console.log(` ${bold('IDE:')} ${opts.ides.join(', ')}`);
2461
- console.log(` ${bold('Language:')} ${opts.language} ${dim('(change in .rihal/config.yaml)')}`);
2673
+ console.log(` ${bold('Language:')} ${opts.language} ${dim('(change in .rcode/config.yaml)')}`);
2462
2674
  console.log(` ${bold('Mode:')} ${opts.mode} ${dim('(guided=confirm at gates, yolo=autonomous)')}`);
2463
- console.log(` ${bold('Planning:')} ${opts.commitPlanning !== false ? 'committed' : 'gitignored'} ${dim('(flip: rihal-tools gitignore refresh)')}`);
2675
+ console.log(` ${bold('Planning:')} ${opts.commitPlanning !== false ? 'committed' : 'gitignored'} ${dim('(flip: rcode-tools gitignore refresh)')}`);
2464
2676
  console.log('');
2465
2677
  // Show the actual install paths so cursor/gemini/antigravity output is accurate
2466
2678
  const relAgents = path.relative(opts.target, idePaths.agentsDir) || idePaths.agentsDir;
@@ -2476,9 +2688,9 @@ async function installInner(opts) {
2476
2688
  console.log(` ${bold('Next:')}`);
2477
2689
  console.log(` cd ${opts.target}`);
2478
2690
  console.log(' claude # start Claude Code (reload window if already open)');
2479
- console.log(' /rihal-progress # where you are, what\'s next');
2480
- console.log(' /rihal-do # interactive command picker');
2481
- console.log(' /rihal-council <q> # multi-agent strategic answer');
2691
+ console.log(' /rcode-progress # where you are, what\'s next');
2692
+ console.log(' /rcode-do # interactive command picker');
2693
+ console.log(' /rcode-council <q> # multi-agent strategic answer');
2482
2694
  console.log('');
2483
2695
  // #665 — when the install came in via npm -g (--global --no-prompt), the
2484
2696
  // interactive IDE/planning prompts were skipped. Tell the user how to
@@ -2490,15 +2702,16 @@ async function installInner(opts) {
2490
2702
  console.log('');
2491
2703
  }
2492
2704
  console.log(dim(' Refresh anytime:'));
2493
- console.log(dim(' npx @hanzlaa/rcode@latest install # pull the latest rcode + brain'));
2494
- console.log(dim(` /rihal-update v${version} # pin rcode to a specific version`));
2705
+ console.log(dim(' pnpm dlx @hanzlaa/rcode@latest install # recommended (avoids npm 11.x npx issues)'));
2706
+ console.log(dim(' npx @hanzlaa/rcode@latest install # npm / yarn'));
2707
+ console.log(dim(` /rcode-update v${version} # pin rcode to a specific version`));
2495
2708
  console.log('');
2496
2709
  console.log(dim(' Want the rcode CLI on your PATH? (optional — needed for rcode version / rcode update):'));
2497
- console.log(dim(' npm install -g @hanzlaa/rcode # installs rcode, rihal, rihal-code commands'));
2710
+ console.log(dim(' npm install -g @hanzlaa/rcode # installs rcode, rcode, rcode commands'));
2498
2711
  console.log(dim(' rcode version # verify'));
2499
2712
  console.log('');
2500
2713
  console.log(dim(' Customize without losing changes on update:'));
2501
- console.log(dim(' Create <name>.local.md siblings (e.g. .claude/agents/rihal-waleed.local.md)'));
2714
+ console.log(dim(' Create <name>.local.md siblings (e.g. .claude/agents/rcode-waleed.local.md)'));
2502
2715
  console.log(dim(' *.local.md files are NEVER touched by install / --force-overwrite / uninstall.'));
2503
2716
  console.log('');
2504
2717
  console.log(' ' + warn('If your IDE is already open, reload the window to refresh skills/commands.'));
@@ -2507,7 +2720,7 @@ async function installInner(opts) {
2507
2720
 
2508
2721
  // Lightweight update check (#252) — async background, never blocks install.
2509
2722
  // Suppressed in non-TTY / CI or when --no-update-check is passed.
2510
- if (!opts.noUpdateCheck && process.stdout.isTTY && !process.env.CI && !process.env.RIHAL_NO_UPDATE_NOTIFIER) {
2723
+ if (!opts.noUpdateCheck && process.stdout.isTTY && !process.env.CI && !process.env.RCODE_NO_UPDATE_NOTIFIER) {
2511
2724
  const { execFile } = require('child_process');
2512
2725
  execFile('npm', ['view', '@hanzlaa/rcode', 'version', '--json'], { timeout: 4000 }, (err, stdout) => {
2513
2726
  if (err) return;
@@ -2525,6 +2738,16 @@ async function installInner(opts) {
2525
2738
  });
2526
2739
  }
2527
2740
 
2741
+ // Issue #838: verify pnpm add didn't silently fail (broken lockfile).
2742
+ // Only fires in pnpm projects (pnpm-lock.yaml present). Non-blocking.
2743
+ if (!opts.global) {
2744
+ const pnpmCheck = verifyPnpmAddDevDep(opts.target);
2745
+ if (!pnpmCheck.ok) {
2746
+ console.log(' ' + warn(pnpmCheck.message));
2747
+ console.log('');
2748
+ }
2749
+ }
2750
+
2528
2751
  // Health check — smoke test that the install actually works (#193).
2529
2752
  const healthPass = runInstallHealthCheck(opts.target, { agentCount, commandCount, skillsInstalled });
2530
2753
  return healthPass ? 0 : 1;
@@ -2560,9 +2783,9 @@ function runInstallHealthCheck(target, counts) {
2560
2783
  const tolerate = (n) => Math.max(1, Math.floor(n * 0.9));
2561
2784
  expected.agents = tolerate(pkgManifest.agents.size);
2562
2785
  expected.skills = tolerate(pkgManifest.actions.size);
2563
- // Commands count comes from rihal/commands/. No bundled enumerator
2786
+ // Commands count comes from rcode/commands/. No bundled enumerator
2564
2787
  // exists; reuse the agents threshold as a proxy floor.
2565
- const commandsDir = path.join(PACKAGE_ROOT, 'rihal', 'commands');
2788
+ const commandsDir = path.join(PACKAGE_ROOT, 'rcode', 'commands');
2566
2789
  if (fs.existsSync(commandsDir)) {
2567
2790
  const cmdCount = fs.readdirSync(commandsDir).filter(f => f.endsWith('.md') && !f.startsWith('_')).length;
2568
2791
  expected.commands = tolerate(cmdCount);
@@ -2580,23 +2803,23 @@ function runInstallHealthCheck(target, counts) {
2580
2803
  }
2581
2804
  }
2582
2805
 
2583
- check('rihal-tools.cjs runs', () => {
2584
- const toolsPath = path.join(target, '.rihal', 'bin', 'rihal-tools.cjs');
2585
- if (!fs.existsSync(toolsPath)) throw new Error('bin/rihal-tools.cjs not installed');
2806
+ check('rcode-tools.cjs runs', () => {
2807
+ const toolsPath = path.join(target, '.rcode', 'bin', 'rcode-tools.cjs');
2808
+ if (!fs.existsSync(toolsPath)) throw new Error('bin/rcode-tools.cjs not installed');
2586
2809
  execFileSync('node', ['-c', toolsPath], { stdio: 'pipe' });
2587
2810
  return 'syntax ok';
2588
2811
  });
2589
2812
 
2590
- check('.rihal/config.yaml present', () => {
2591
- const p = path.join(target, '.rihal', 'config.yaml');
2813
+ check('.rcode/config.yaml present', () => {
2814
+ const p = path.join(target, '.rcode', 'config.yaml');
2592
2815
  if (!fs.existsSync(p)) throw new Error('missing');
2593
2816
  const text = fs.readFileSync(p, 'utf8');
2594
2817
  if (!/user_name:|project_name:/.test(text)) throw new Error('config.yaml incomplete');
2595
2818
  return `${fs.statSync(p).size} bytes`;
2596
2819
  });
2597
2820
 
2598
- check('.rihal/state.json parses', () => {
2599
- const p = path.join(target, '.rihal', 'state.json');
2821
+ check('.rcode/state.json parses', () => {
2822
+ const p = path.join(target, '.rcode', 'state.json');
2600
2823
  if (!fs.existsSync(p)) throw new Error('missing');
2601
2824
  JSON.parse(fs.readFileSync(p, 'utf8'));
2602
2825
  return 'valid JSON';
@@ -2620,7 +2843,7 @@ function runInstallHealthCheck(target, counts) {
2620
2843
  if (fails > 0) {
2621
2844
  console.log('');
2622
2845
  console.log(' ' + fail(`${fails} health check${fails === 1 ? '' : 's'} failed — install may be broken.`));
2623
- console.log(dim(' Debug: node .rihal/bin/rihal-tools.cjs state read && ls -la .rihal/'));
2846
+ console.log(dim(' Debug: node .rcode/bin/rcode-tools.cjs state read && ls -la .rcode/'));
2624
2847
  console.log(dim(' Reinstall: rcode install . --force'));
2625
2848
  console.log('');
2626
2849
  return false;
@@ -2669,7 +2892,7 @@ async function runInstallWizard(opts) {
2669
2892
  const pkgVersion = readPackageVersion();
2670
2893
 
2671
2894
  console.log('');
2672
- intro(pc.bold('🕌 Rihal Code') + pc.dim(` v${pkgVersion}`));
2895
+ intro(pc.bold('🕌 rcode') + pc.dim(` v${pkgVersion}`));
2673
2896
 
2674
2897
  // ── 1. Install directory ──────────────────────────────────────────────
2675
2898
  if (!opts.targetProvided) {
@@ -2774,7 +2997,7 @@ async function runInstallWizard(opts) {
2774
2997
  if (require.main === module) main();
2775
2998
 
2776
2999
  /**
2777
- * Handler for cli/index.js — called as `npx rihal-code install [args]`.
3000
+ * Handler for cli/index.js — called as `npx rcode install [args]`.
2778
3001
  * Converts the index.js-style (args, ctx) signature into a cli/install.js
2779
3002
  * parseArgs-compatible argv and runs install().
2780
3003
  */