@hanzlaa/rcode 3.4.3 → 3.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (213) hide show
  1. package/AGENTS.md +1 -1
  2. package/CONTRIBUTING.md +63 -1
  3. package/README.md +9 -4
  4. package/cli/generate-command-skills.cjs +5 -5
  5. package/cli/index.js +0 -0
  6. package/cli/install.js +128 -3
  7. package/cli/lib/manifest.cjs +1 -1
  8. package/cli/uninstall.js +8 -0
  9. package/dist/rcode.js +19 -1
  10. package/package.json +16 -17
  11. package/rihal/agents/rihal-ahmed.md +2 -1
  12. package/rihal/agents/rihal-code-fixer.md +46 -0
  13. package/rihal/agents/rihal-code-reviewer.md +46 -1
  14. package/rihal/agents/rihal-deviation-analyzer.md +1 -0
  15. package/rihal/agents/rihal-docs-auditor.md +106 -1
  16. package/rihal/agents/rihal-edge-case-hunter.md +47 -1
  17. package/rihal/agents/rihal-executor.md +1 -1
  18. package/rihal/agents/rihal-khalid.md +40 -1
  19. package/rihal/agents/rihal-layla.md +2 -1
  20. package/rihal/agents/rihal-nasser.md +2 -1
  21. package/rihal/agents/rihal-noor.md +3 -2
  22. package/rihal/agents/rihal-nyquist-auditor.md +1 -1
  23. package/rihal/agents/rihal-phase-researcher.md +46 -1
  24. package/rihal/agents/rihal-planner.md +1 -1
  25. package/rihal/agents/rihal-profiler.md +45 -2
  26. package/rihal/agents/rihal-project-researcher.md +47 -0
  27. package/rihal/agents/rihal-remediation-planner.md +45 -0
  28. package/rihal/agents/rihal-roadmapper.md +46 -0
  29. package/rihal/agents/rihal-security-adversary.md +46 -1
  30. package/rihal/agents/rihal-security-auditor.md +45 -1
  31. package/rihal/agents/rihal-ui-auditor.md +44 -1
  32. package/rihal/agents/rihal-ux-designer.md +41 -1
  33. package/rihal/agents/rihal-zahra.md +2 -1
  34. package/rihal/agents/rihal-zayd.md +2 -1
  35. package/rihal/bin/lib/config.cjs +13 -1
  36. package/rihal/bin/lib/council-panel.cjs +185 -23
  37. package/rihal/bin/lib/roadmap.cjs +27 -2
  38. package/rihal/bin/rihal-tools.cjs +1837 -99
  39. package/rihal/commands/audit.md +2 -2
  40. package/rihal/commands/capture.md +12 -0
  41. package/rihal/commands/diagnose-issues.md +18 -0
  42. package/rihal/commands/discuss-phase-power.md +18 -0
  43. package/rihal/commands/feature-drift.md +18 -0
  44. package/rihal/commands/karpathy-audit.md +18 -0
  45. package/rihal/commands/lens-audit.md +70 -0
  46. package/rihal/commands/new-project-research.md +18 -0
  47. package/rihal/commands/new-project-roadmap.md +18 -0
  48. package/rihal/commands/phase.md +11 -0
  49. package/rihal/references/continuation-format.md +3 -3
  50. package/rihal/references/output-format.md +79 -0
  51. package/rihal/references/revision-loop.md +1 -1
  52. package/rihal/references/verb-dictionary.md +85 -28
  53. package/rihal/skills/actions/1-analysis/rihal-prfaq/SKILL.md +1 -1
  54. package/rihal/skills/actions/2-plan/rihal-create-epics-and-stories/SKILL.md +12 -2
  55. package/rihal/skills/actions/2-plan/rihal-create-epics-and-stories/steps/step-04-final-validation.md +12 -0
  56. package/rihal/skills/actions/2-plan/rihal-create-prd/SKILL.md +12 -2
  57. package/rihal/skills/actions/2-plan/rihal-create-story/SKILL.md +12 -2
  58. package/rihal/skills/actions/4-implementation/rihal-browser-verify/SKILL.md +1 -1
  59. package/rihal/skills/actions/4-implementation/rihal-checkpoint-preview/SKILL.md +1 -1
  60. package/rihal/skills/actions/4-implementation/rihal-ci/SKILL.md +1 -1
  61. package/rihal/skills/actions/4-implementation/rihal-code-review/SKILL.md +16 -4
  62. package/rihal/skills/actions/4-implementation/rihal-debug/SKILL.md +14 -1
  63. package/rihal/skills/actions/4-implementation/rihal-git-flow/SKILL.md +1 -1
  64. package/rihal/skills/actions/4-implementation/rihal-harden/SKILL.md +1 -1
  65. package/rihal/skills/actions/4-implementation/rihal-incremental/SKILL.md +1 -1
  66. package/rihal/skills/actions/4-implementation/rihal-migrate/SKILL.md +1 -1
  67. package/rihal/skills/actions/4-implementation/rihal-perf/SKILL.md +1 -1
  68. package/rihal/skills/actions/4-implementation/rihal-prove-it/SKILL.md +1 -1
  69. package/rihal/skills/actions/4-implementation/rihal-scaffold-project/steps/step-01-target.md +6 -0
  70. package/rihal/skills/actions/4-implementation/rihal-source-truth/SKILL.md +1 -1
  71. package/rihal/skills/actions/4-implementation/rihal-sprint-planning/SKILL.md +14 -3
  72. package/rihal/skills/actions/4-implementation/rihal-trim/SKILL.md +1 -1
  73. package/rihal/skills/agents/ahmed-hassani-director/SKILL.md +15 -1
  74. package/rihal/skills/agents/dalil-scout/SKILL.md +14 -2
  75. package/rihal/skills/agents/fatima-qa/SKILL.md +16 -1
  76. package/rihal/skills/agents/haitham-frontend/SKILL.md +13 -1
  77. package/rihal/skills/agents/hanzla-engineer/SKILL.md +13 -1
  78. package/rihal/skills/agents/hussain-pm/SKILL.md +16 -1
  79. package/rihal/skills/agents/hussain-sm/SKILL.md +14 -1
  80. package/rihal/skills/agents/layla-designer/SKILL.md +13 -1
  81. package/rihal/skills/agents/majlis-council/SKILL.md +16 -1
  82. package/rihal/skills/agents/mariam-marketing/SKILL.md +14 -1
  83. package/rihal/skills/agents/nasser-eng-manager/SKILL.md +16 -1
  84. package/rihal/skills/agents/noor-writer/SKILL.md +15 -1
  85. package/rihal/skills/agents/raees-orchestrator/SKILL.md +15 -1
  86. package/rihal/skills/agents/rihal-cross-platform-auditor/SKILL.md +162 -0
  87. package/rihal/skills/agents/rihal-dep-auditor/SKILL.md +151 -0
  88. package/rihal/skills/agents/rihal-deviation-analyzer/SKILL.md +78 -0
  89. package/rihal/skills/agents/rihal-i18n-auditor/SKILL.md +152 -0
  90. package/rihal/skills/agents/rihal-observability-auditor/SKILL.md +156 -0
  91. package/rihal/skills/agents/sadiq-analyst/SKILL.md +12 -2
  92. package/rihal/skills/agents/waleed-architect/SKILL.md +12 -2
  93. package/rihal/skills/agents/yousef-backend/SKILL.md +12 -2
  94. package/rihal/skills/agents/zahra-branding/SKILL.md +15 -1
  95. package/rihal/skills/agents/zayd-ml/SKILL.md +13 -1
  96. package/rihal/skills/core/rihal-advanced-elicitation/SKILL.md +2 -2
  97. package/rihal/skills/core/rihal-auth-audit/SKILL.md +1 -1
  98. package/rihal/skills/core/rihal-brainstorming/SKILL.md +13 -2
  99. package/rihal/skills/core/rihal-client-gate/SKILL.md +1 -1
  100. package/rihal/skills/core/rihal-clone-website/SKILL.md +11 -1
  101. package/rihal/skills/core/rihal-deploy-unify/SKILL.md +1 -1
  102. package/rihal/skills/core/rihal-distillator/SKILL.md +2 -2
  103. package/rihal/skills/core/rihal-editorial-review-prose/SKILL.md +1 -1
  104. package/rihal/skills/core/rihal-editorial-review-structure/SKILL.md +2 -2
  105. package/rihal/skills/core/rihal-help/SKILL.md +18 -1
  106. package/rihal/skills/core/rihal-incident-record/SKILL.md +1 -1
  107. package/rihal/skills/core/rihal-index-docs/SKILL.md +1 -1
  108. package/rihal/skills/core/rihal-memory-audit/SKILL.md +18 -1
  109. package/rihal/skills/core/rihal-memory-init/SKILL.md +13 -1
  110. package/rihal/skills/core/rihal-memory-update/SKILL.md +13 -1
  111. package/rihal/skills/core/rihal-mvp-graduate/SKILL.md +1 -1
  112. package/rihal/skills/core/rihal-ocr-consistency/SKILL.md +1 -1
  113. package/rihal/skills/core/rihal-rebrand/SKILL.md +1 -1
  114. package/rihal/skills/core/rihal-review-adversarial-general/SKILL.md +1 -1
  115. package/rihal/skills/core/rihal-review-edge-case-hunter/SKILL.md +17 -1
  116. package/rihal/skills/core/rihal-shard-doc/SKILL.md +1 -1
  117. package/rihal/skills/core/rihal-theme-system/SKILL.md +1 -1
  118. package/rihal/team.yaml +0 -7
  119. package/rihal/templates/RESEARCH.md +84 -0
  120. package/rihal/templates/VALIDATION.md +45 -0
  121. package/rihal/templates/memory/INDEX.md +1 -0
  122. package/rihal/templates/memory/project/design-system.md +128 -0
  123. package/rihal/templates/summary.md +33 -3
  124. package/rihal/workflows/add-tests.md +1 -1
  125. package/rihal/workflows/add-todo.md +6 -0
  126. package/rihal/workflows/analyze-dependencies.md +6 -0
  127. package/rihal/workflows/audit-fix.md +12 -0
  128. package/rihal/workflows/audit-milestone.md +2 -2
  129. package/rihal/workflows/audit.md +23 -14
  130. package/rihal/workflows/autonomous-smart-discuss.md +247 -0
  131. package/rihal/workflows/autonomous.md +54 -267
  132. package/rihal/workflows/capture.md +60 -0
  133. package/rihal/workflows/chain.md +1 -1
  134. package/rihal/workflows/code-review-fix.md +6 -3
  135. package/rihal/workflows/code-review.md +34 -10
  136. package/rihal/workflows/complete-milestone.md +17 -8
  137. package/rihal/workflows/correct-course.md +6 -0
  138. package/rihal/workflows/council.md +37 -23
  139. package/rihal/workflows/create-architecture.md +31 -0
  140. package/rihal/workflows/create-epics-and-stories.md +7 -1
  141. package/rihal/workflows/create-prd.md +25 -0
  142. package/rihal/workflows/dashboard.md +1 -1
  143. package/rihal/workflows/debug.md +8 -0
  144. package/rihal/workflows/decisions.md +1 -1
  145. package/rihal/workflows/diff.md +6 -0
  146. package/rihal/workflows/discuss-phase-discuss-areas.md +271 -0
  147. package/rihal/workflows/discuss-phase.md +27 -266
  148. package/rihal/workflows/do.md +51 -12
  149. package/rihal/workflows/docs-update.md +3 -0
  150. package/rihal/workflows/document-project.md +7 -1
  151. package/rihal/workflows/edit-prd.md +31 -0
  152. package/rihal/workflows/enable-hooks.md +1 -1
  153. package/rihal/workflows/execute-regression-gates.md +131 -0
  154. package/rihal/workflows/execute-sprint.md +31 -2
  155. package/rihal/workflows/execute-verify-phase-goal.md +136 -0
  156. package/rihal/workflows/execute-waves.md +404 -0
  157. package/rihal/workflows/execute.md +101 -642
  158. package/rihal/workflows/feature-drift.md +243 -0
  159. package/rihal/workflows/forensics.md +10 -2
  160. package/rihal/workflows/health.md +65 -16
  161. package/rihal/workflows/help.md +36 -9
  162. package/rihal/workflows/import.md +17 -3
  163. package/rihal/workflows/init.md +20 -10
  164. package/rihal/workflows/install.md +2 -10
  165. package/rihal/workflows/lens-audit.md +689 -0
  166. package/rihal/workflows/map-codebase.md +7 -1
  167. package/rihal/workflows/memory-audit.md +67 -5
  168. package/rihal/workflows/memory-distill.md +10 -0
  169. package/rihal/workflows/memory-init.md +4 -0
  170. package/rihal/workflows/memory-update.md +4 -0
  171. package/rihal/workflows/new-milestone.md +7 -1
  172. package/rihal/workflows/new-project-create-roadmap.md +176 -0
  173. package/rihal/workflows/new-project-define-requirements.md +160 -0
  174. package/rihal/workflows/new-project-research-decision.md +247 -0
  175. package/rihal/workflows/new-project.md +3 -557
  176. package/rihal/workflows/note.md +1 -1
  177. package/rihal/workflows/phase.md +54 -0
  178. package/rihal/workflows/plan-milestone-gaps.md +1 -1
  179. package/rihal/workflows/plan-prd-express.md +108 -0
  180. package/rihal/workflows/plan-research-validation.md +313 -0
  181. package/rihal/workflows/plan-spawn-planner.md +204 -0
  182. package/rihal/workflows/plan.md +91 -532
  183. package/rihal/workflows/plant-seed.md +1 -1
  184. package/rihal/workflows/pr-branch.md +1 -1
  185. package/rihal/workflows/profile-user.md +1 -1
  186. package/rihal/workflows/quick.md +3 -3
  187. package/rihal/workflows/remove-phase.md +6 -1
  188. package/rihal/workflows/remove-workspace.md +6 -0
  189. package/rihal/workflows/rerun.md +1 -1
  190. package/rihal/workflows/research-phase.md +4 -2
  191. package/rihal/workflows/resume-work.md +8 -3
  192. package/rihal/workflows/retrospective.md +31 -0
  193. package/rihal/workflows/review-adversarial.md +12 -0
  194. package/rihal/workflows/review.md +6 -0
  195. package/rihal/workflows/scaffold-project.md +31 -0
  196. package/rihal/workflows/scan.md +10 -0
  197. package/rihal/workflows/secure-phase.md +15 -2
  198. package/rihal/workflows/session-report.md +32 -7
  199. package/rihal/workflows/ship.md +7 -2
  200. package/rihal/workflows/show.md +6 -0
  201. package/rihal/workflows/sprint-status.md +4 -4
  202. package/rihal/workflows/status.md +2 -2
  203. package/rihal/workflows/ui-phase.md +1 -1
  204. package/rihal/workflows/undo.md +2 -3
  205. package/rihal/workflows/update.md +2 -2
  206. package/rihal/workflows/validate-phase.md +1 -1
  207. package/rihal/workflows/validate-prd.md +31 -0
  208. package/rihal/workflows/verify-phase.md +38 -5
  209. package/rihal/workflows/verify-work.md +25 -11
  210. package/rihal/workflows/workstream.md +20 -8
  211. package/server/lib/html/client.js +13 -63
  212. package/server/lib/html/shell.js +0 -1
  213. package/server/lib/scanner.js +33 -2
@@ -0,0 +1,247 @@
1
+ <purpose>
2
+ Sub-step of new-project.md — Step 6 Research Decision. Decides whether to run domain research agents, handles existing research, and synthesizes findings before requirements.
3
+ </purpose>
4
+
5
+ ## 6. Research Decision
6
+
7
+ **If auto mode:** Default to "Research first" without asking.
8
+
9
+ Use AskUserQuestion:
10
+
11
+ - header: "Research"
12
+ - question: "Research the domain ecosystem before defining requirements?"
13
+ - options:
14
+ - "Research first (Recommended)" — Discover standard stacks, expected features, architecture patterns
15
+ - "Skip research" — I know this domain well, go straight to requirements
16
+
17
+ **If "Research first":**
18
+
19
+ Display stage banner:
20
+
21
+ ```
22
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
23
+ RIHAL ► RESEARCHING
24
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
25
+
26
+ Researching [domain] ecosystem...
27
+ ```
28
+
29
+ Create research directory:
30
+
31
+ ```bash
32
+ mkdir -p .planning/research
33
+ ```
34
+
35
+ **Determine milestone context:**
36
+
37
+ - If no "Validated" requirements in PROJECT.md → Greenfield (building from scratch)
38
+ - If "Validated" requirements exist → Subsequent milestone (adding to existing app)
39
+
40
+ Display spawning indicator:
41
+
42
+ ```
43
+ ◆ Spawning 4 researchers in parallel...
44
+ → Stack research
45
+ → Features research
46
+ → Architecture research
47
+ → Pitfalls research
48
+ ```
49
+
50
+ Spawn 4 parallel rihal-project-researcher agents:
51
+
52
+ ```
53
+ Task(prompt="<research_type>
54
+ Project Research — Stack dimension for [domain].
55
+ </research_type>
56
+
57
+ <milestone_context>
58
+ [greenfield OR subsequent]
59
+
60
+ Greenfield: Research the standard stack for building [domain] from scratch.
61
+ Subsequent: Research what's needed to add [target features] to an existing [domain] app.
62
+ </milestone_context>
63
+
64
+ <question>
65
+ What's the standard 2026 stack for [domain]?
66
+ </question>
67
+
68
+ <files_to_read>
69
+ - .planning/PROJECT.md (Project context and goals)
70
+ </files_to_read>
71
+
72
+ ${AGENT_RESEARCHER}
73
+
74
+ <downstream_consumer>
75
+ Your STACK.md feeds into roadmap creation. Be prescriptive:
76
+ - Specific libraries with versions
77
+ - Clear rationale for each choice
78
+ - What NOT to use and why
79
+ </downstream_consumer>
80
+
81
+ <quality_gate>
82
+ - [ ] Versions are current (verify with Context7/official docs, not training data)
83
+ - [ ] Rationale explains WHY, not just WHAT
84
+ - [ ] Confidence levels assigned to each recommendation
85
+ </quality_gate>
86
+
87
+ <output>
88
+ Write to: .planning/research/STACK.md
89
+ </output>
90
+ ", subagent_type="rihal-project-researcher", model="${RESEARCHER_MODEL}", description="Stack research")
91
+
92
+ Task(prompt="<research_type>
93
+ Project Research — Features dimension for [domain].
94
+ </research_type>
95
+
96
+ <milestone_context>
97
+ [greenfield OR subsequent]
98
+
99
+ Greenfield: What features do [domain] products have? What's table stakes vs differentiating?
100
+ Subsequent: How do [target features] typically work? What's expected behavior?
101
+ </milestone_context>
102
+
103
+ <files_to_read>
104
+ - .planning/PROJECT.md
105
+ </files_to_read>
106
+
107
+ ${AGENT_RESEARCHER}
108
+
109
+ <downstream_consumer>
110
+ Your FEATURES.md feeds into requirements definition. Categorize clearly:
111
+ - Table stakes (must have or users leave)
112
+ - Differentiators (competitive advantage)
113
+ - Anti-features (things to deliberately NOT build)
114
+ </downstream_consumer>
115
+
116
+ <quality_gate>
117
+ - [ ] Categories are clear (table stakes vs differentiators vs anti-features)
118
+ - [ ] Complexity noted for each feature
119
+ - [ ] Dependencies between features identified
120
+ </quality_gate>
121
+
122
+ <output>
123
+ Write to: .planning/research/FEATURES.md
124
+ </output>
125
+ ", subagent_type="rihal-project-researcher", model="${RESEARCHER_MODEL}", description="Features research")
126
+
127
+ Task(prompt="<research_type>
128
+ Project Research — Architecture dimension for [domain].
129
+ </research_type>
130
+
131
+ <milestone_context>
132
+ [greenfield OR subsequent]
133
+
134
+ Greenfield: How are [domain] systems typically structured? What are major components?
135
+ Subsequent: How do [target features] integrate with existing [domain] architecture?
136
+ </milestone_context>
137
+
138
+ <files_to_read>
139
+ - .planning/PROJECT.md
140
+ </files_to_read>
141
+
142
+ ${AGENT_RESEARCHER}
143
+
144
+ <downstream_consumer>
145
+ Your ARCHITECTURE.md informs phase structure in roadmap. Include:
146
+ - Component boundaries (what talks to what)
147
+ - Data flow (how information moves)
148
+ - Suggested build order (dependencies between components)
149
+ </downstream_consumer>
150
+
151
+ <quality_gate>
152
+ - [ ] Components clearly defined with boundaries
153
+ - [ ] Data flow direction explicit
154
+ - [ ] Build order implications noted
155
+ </quality_gate>
156
+
157
+ <output>
158
+ Write to: .planning/research/ARCHITECTURE.md
159
+ </output>
160
+ ", subagent_type="rihal-project-researcher", model="${RESEARCHER_MODEL}", description="Architecture research")
161
+
162
+ Task(prompt="<research_type>
163
+ Project Research — Pitfalls dimension for [domain].
164
+ </research_type>
165
+
166
+ <milestone_context>
167
+ [greenfield OR subsequent]
168
+
169
+ Greenfield: What do [domain] projects commonly get wrong? Critical mistakes?
170
+ Subsequent: What are common mistakes when adding [target features] to [domain]?
171
+ </milestone_context>
172
+
173
+ <files_to_read>
174
+ - .planning/PROJECT.md
175
+ </files_to_read>
176
+
177
+ ${AGENT_RESEARCHER}
178
+
179
+ <downstream_consumer>
180
+ Your PITFALLS.md prevents mistakes in roadmap/planning. For each pitfall:
181
+ - Warning signs (how to detect early)
182
+ - Prevention strategy (how to avoid)
183
+ - Which phase should address it
184
+ </downstream_consumer>
185
+
186
+ <quality_gate>
187
+ - [ ] Pitfalls are specific to this domain (not generic advice)
188
+ - [ ] Prevention strategies are actionable
189
+ - [ ] Phase mapping included where relevant
190
+ </quality_gate>
191
+
192
+ <output>
193
+ Write to: .planning/research/PITFALLS.md
194
+ </output>
195
+ ", subagent_type="rihal-project-researcher", model="${RESEARCHER_MODEL}", description="Pitfalls research")
196
+ ```
197
+
198
+ After all 4 agents complete, spawn synthesizer to create SUMMARY.md:
199
+
200
+ ```
201
+ Task(prompt="
202
+ <task>
203
+ Synthesize research outputs into SUMMARY.md.
204
+ </task>
205
+
206
+ <files_to_read>
207
+ - .planning/research/STACK.md
208
+ - .planning/research/FEATURES.md
209
+ - .planning/research/ARCHITECTURE.md
210
+ - .planning/research/PITFALLS.md
211
+ </files_to_read>
212
+
213
+ ${AGENT_SYNTHESIZER}
214
+
215
+ <output>
216
+ Write to: .planning/research/SUMMARY.md
217
+ Synthesize into: recommended stack, table stakes vs differentiators, architecture outline, top pitfalls to avoid.
218
+ </output>
219
+ ", subagent_type="rihal-research-synthesizer", model="${SYNTHESIZER_MODEL}", description="Synthesize research")
220
+ ```
221
+
222
+ **Commit research (guarded):**
223
+
224
+ ```bash
225
+ git add .planning/research/ 2>/dev/null \
226
+ && git commit -m "docs: add project research" 2>/dev/null \
227
+ || echo "ℹ .planning/ gitignored — research written, not committed"
228
+ ```
229
+
230
+ Display research complete banner and key findings:
231
+
232
+ ```
233
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
234
+ RIHAL ► RESEARCH COMPLETE ✓
235
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
236
+
237
+ ## Key Findings
238
+
239
+ **Stack:** [from SUMMARY.md]
240
+ **Table Stakes:** [from SUMMARY.md]
241
+ **Watch Out For:** [from SUMMARY.md]
242
+
243
+ Files: `.planning/research/`
244
+ ```
245
+
246
+ **If "Skip research":** Continue to Step 7.
247
+