@hanzlaa/rcode 3.4.4 → 3.4.6

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 +21 -9
  5. package/cli/index.js +0 -0
  6. package/cli/install.js +126 -7
  7. package/cli/lib/manifest.cjs +1 -1
  8. package/cli/uninstall.js +8 -0
  9. package/dist/rcode.js +1279 -2004
  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
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: rihal-review-adversarial-general
3
- description: 'Perform a Cynical Review and produce a findings report. Use when the user requests a critical review of something'
3
+ description: "Perform a Cynical Review and produce a findings report."
4
4
  triggers:
5
5
  - "review adversarial general"
6
6
  ---
@@ -1,8 +1,24 @@
1
1
  ---
2
2
  name: rihal-review-edge-case-hunter
3
- description: 'Walk every branching path and boundary condition in content, report only unhandled edge cases. Orthogonal to adversarial review - method-driven not attitude-driven. Use when you need exhaustive edge-case analysis of code, specs, or diffs.'
3
+ description: "Walk every branching path and boundary condition in content, report only unhandled edge cases."
4
4
  triggers:
5
+ # English
6
+ - "find edge cases"
7
+ - "edge case hunt"
8
+ - "edge cases in this"
5
9
  - "review edge case hunter"
10
+ - "corner cases"
11
+ - "boundary conditions"
12
+ - "what could break"
13
+ # Roman Urdu / Hindi
14
+ - "edge cases dhoondo"
15
+ - "edge cases nikalo"
16
+ # Arabic native
17
+ - "حالات استثنائية"
18
+ - "حالات حدية"
19
+ - "ابحث عن الحالات الاستثنائية"
20
+ - "افحص الحالات الحدية"
21
+ - "ما قد يفشل"
6
22
  ---
7
23
  @.rihal/references/karpathy-guidelines.md
8
24
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: rihal-shard-doc
3
- description: 'Splits large markdown documents into smaller, organized files based on level 2 (default) sections. Use if the user says perform shard document'
3
+ description: "Splits large markdown documents into smaller, organized files based on level 2 (default) sections."
4
4
  triggers:
5
5
  - "shard doc"
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: rihal-theme-system
3
- description: Audit a frontend's design tokens BEFORE launch. Catches inconsistent colours, scattered hex values, hardcoded spacing, font drift, and missing dark/RTL mode support. Specifically encodes Rihal's "had to do complete rebranding mid-project" pain — themes accumulated drift until a full pass was the only fix. Pairs with rihal-rebrand if a rebrand becomes unavoidable.
3
+ description: Audit a frontend's design tokens BEFORE launch.
4
4
  triggers:
5
5
  - "theme audit"
6
6
  - "design tokens"
package/rihal/team.yaml CHANGED
@@ -514,13 +514,6 @@ tactical_agents:
514
514
  authority_level: design
515
515
  description: UX design, accessibility, and design system work
516
516
 
517
- - id: rihal-plan-checker
518
- name: Plan Checker
519
- file_path: rihal/agents/rihal-sprint-checker.md
520
- role: Plan Checker
521
- authority_level: quality
522
- description: Validates PLAN.md/SPRINT.md quality before execution (alias for sprint-checker)
523
-
524
517
  - id: rihal-verifier
525
518
  name: Verifier
526
519
  file_path: rihal/agents/rihal-verifier.md
@@ -0,0 +1,84 @@
1
+ # Phase {{N}} — Research
2
+
3
+ **Phase:** {{N}} — {{phase_name}}
4
+ **Researcher:** {{user_name}}
5
+ **Date:** {{date}}
6
+ **Status:** Draft
7
+
8
+ ---
9
+
10
+ ## Question
11
+
12
+ What does this phase need to know **before** the planner can write SPRINT.md?
13
+
14
+ State the central question this RESEARCH.md answers. Keep it tight — one or two sentences. The planner reads this top-down and stops as soon as the question is answered, so do not bury the lede.
15
+
16
+ ---
17
+
18
+ ## Sources
19
+
20
+ Only cite material you actually fetched in this session. WebSearch snippets are not sufficient evidence. See [`@rihal/skills/_shared/research-citation-rule.md`](../skills/_shared/research-citation-rule.md).
21
+
22
+ | # | Source | Why it matters |
23
+ |---|--------|----------------|
24
+ | 1 | {{url or file path}} | {{one-line reason}} |
25
+ | 2 | | |
26
+
27
+ ---
28
+
29
+ ## Findings
30
+
31
+ Group by sub-question. Each finding should be defensible — link back to a source row above.
32
+
33
+ ### Finding A — {{summary}}
34
+
35
+ - **Evidence:** [src #1, src #2]
36
+ - **What:** {{two or three sentences max}}
37
+ - **So what:** {{implication for the plan — concrete}}
38
+
39
+ ### Finding B — {{summary}}
40
+
41
+ - **Evidence:** [src #3]
42
+ - **What:**
43
+ - **So what:**
44
+
45
+ ---
46
+
47
+ ## Decisions implied
48
+
49
+ What does the research force us to decide? List the gray areas the planner now needs to lock down. These become discussion items in CONTEXT.md, not silent assumptions.
50
+
51
+ - D-1: {{decision name}} — {{options + recommendation if any}}
52
+ - D-2:
53
+
54
+ ---
55
+
56
+ ## Out of scope
57
+
58
+ What did we NOT research and why. Name future work explicitly so it doesn't quietly fall through.
59
+
60
+ - {{topic}} — {{reason: deferred / blocked on / not needed for this phase}}
61
+
62
+ ---
63
+
64
+ ## Open questions
65
+
66
+ Questions that surfaced during research and stay open. The planner can ask the user, defer to a follow-up, or accept the risk. Don't pretend they are answered.
67
+
68
+ - Q-1:
69
+ - Q-2:
70
+
71
+ ---
72
+
73
+ ## Validation Architecture
74
+
75
+ <!-- MANDATORY — absence of this section disables Dimension 8 (Nyquist Compliance) in the plan checker. -->
76
+ <!-- If no automated tests are feasible, state that explicitly with a reason. -->
77
+
78
+ | Concern | Test File | Command | When (Wave) |
79
+ |---------|-----------|---------|-------------|
80
+ | {{feature/requirement}} | {{path/to/test.ts}} | {{run command}} | Wave {{N}} |
81
+
82
+ ---
83
+
84
+ *Phase {{N}} research artifact. Consumed by `rihal-planner` per the [`@.rihal/workflows/plan.md`](../workflows/plan.md) sequence.*
@@ -0,0 +1,45 @@
1
+ # Validation Architecture — {{phase_name}}
2
+
3
+ <!-- Generated by /rihal-plan --research. Dimension 8 (Nyquist Compliance) reads this file. -->
4
+ <!-- Delete this comment block after filling in. An empty VALIDATION.md causes Dimension 8e to BLOCK. -->
5
+
6
+ **Phase:** {{phase_id}}
7
+ **Generated:** {{date}}
8
+
9
+ ## Validation Architecture
10
+
11
+ <!-- Describe how this phase will be validated. What tests exist or will be created? -->
12
+ <!-- If no test files are planned, explicitly state why and what manual checks substitute. -->
13
+
14
+ ### Test Strategy
15
+
16
+ | Concern | Test File | Command | When Run |
17
+ |---------|-----------|---------|----------|
18
+ | {{feature/requirement}} | {{test_file_path}} | {{run_command}} | Wave {{N}} |
19
+
20
+ ### Wave 0 Test Files (TDD tasks)
21
+
22
+ <!-- List any test files that must be created BEFORE implementation tasks run. -->
23
+ <!-- These are referenced as `<automated>MISSING</automated>` in task verify blocks. -->
24
+
25
+ | Test File | Created By Task | For Task(s) |
26
+ |-----------|----------------|-------------|
27
+ | {{test_file_path}} | Task {{N}} | Task {{M}} |
28
+
29
+ ### Automated Verify Commands
30
+
31
+ <!-- Summary of all `<automated>` commands across tasks. -->
32
+ <!-- Executor and verifier use these as the ground-truth test set. -->
33
+
34
+ ```bash
35
+ # Per-task verify commands (replicated here for quick reference)
36
+ {{command}}
37
+ ```
38
+
39
+ ### Feedback Latency
40
+
41
+ <!-- Are any verify commands slow (>30s)? Flag them. -->
42
+ <!-- Long-running suites should have a faster smoke-test fallback. -->
43
+
44
+ - Estimated total verify time: < {{N}} seconds
45
+ - Slow commands (>30s): {{none / list}}
@@ -13,6 +13,7 @@
13
13
  | [`project/stack.md`](project/stack.md) | Languages, frameworks, services in use |
14
14
  | [`project/decisions.md`](project/decisions.md) | Append-only architectural decision log |
15
15
  | [`project/glossary.md`](project/glossary.md) | Domain terms, internal names, acronyms |
16
+ | [`project/design-system.md`](project/design-system.md) | Visual tokens, canonical components, conventions — read by `ui-phase`, `frontend-design`, `clone-website` |
16
17
  | [`people/stakeholders.md`](people/stakeholders.md) | External contacts, decision authority, comms |
17
18
  | [`people/team.md`](people/team.md) | Internal team, ownership, availability |
18
19
  | [`milestones/current.md`](milestones/current.md) | Active milestone — goal, phase, blockers |
@@ -0,0 +1,128 @@
1
+ # Design System — `{{PROJECT_NAME}}`
2
+
3
+ > Single source of truth for visual tokens, component patterns, and UI conventions. Agents writing UI code (frontend skills, ui-phase, frontend-design, clone-website) MUST read this before producing components or styles. UI-SPEC.md files for individual phases cite this as their root reference.
4
+
5
+ **Last updated:** {{INIT_DATE}}
6
+ **Source of truth:** this file + the canonical token files it points to
7
+
8
+ ---
9
+
10
+ ## Tokens
11
+
12
+ Document the canonical token names — never restate hex / rem values inline in code. Components should reference tokens.
13
+
14
+ ### Color
15
+
16
+ | Token | Purpose | Source file |
17
+ |---|---|---|
18
+ | `--ds-bg` | Page background | (e.g. `app/globals.css`) |
19
+ | `--ds-bg-raised` | Card / surface background | |
20
+ | `--ds-border` | Default border | |
21
+ | `--ds-text` | Body text | |
22
+ | `--ds-text-muted` | Secondary text | |
23
+ | `--ds-accent` | Primary accent / CTA | |
24
+ | `--ds-hover` | Hover background | |
25
+
26
+ ### Typography
27
+
28
+ | Token | Purpose |
29
+ |---|---|
30
+ | `--ds-font-display` | Headings |
31
+ | `--ds-font-body` | Body text |
32
+ | `--ds-font-mono` | Code / inline mono |
33
+
34
+ ### Spacing scale
35
+
36
+ Document the discrete spacing values used (e.g. `4 / 8 / 12 / 16 / 24 / 32` rem-relative) and what each maps to in Tailwind / CSS variables.
37
+
38
+ ### Radius scale
39
+
40
+ | Token | Tailwind | Use for |
41
+ |---|---|---|
42
+ | `--ds-radius-sm` | `rounded` | Inputs, small chips |
43
+ | `--ds-radius-md` | `rounded-xl` | Form inputs, secondary cards |
44
+ | `--ds-radius-lg` | `rounded-2xl` | Primary surfaces, modals |
45
+ | `--ds-radius-full` | `rounded-full` | Avatars, pills |
46
+
47
+ ---
48
+
49
+ ## Canonical component patterns
50
+
51
+ The exact class lists / token compositions that define the project's visual identity. New components MUST match these patterns.
52
+
53
+ ### Card / surface shell
54
+
55
+ ```html
56
+ <div class="bg-ds-raised rounded-2xl border border-ds-border/70 p-6">
57
+ ...
58
+ </div>
59
+ ```
60
+
61
+ ### Form input
62
+
63
+ ```html
64
+ <input class="rounded-xl bg-ds-hover px-3 py-2 focus:ring-1 focus:ring-ds-accent/20" />
65
+ ```
66
+
67
+ ### Primary button
68
+
69
+ ```html
70
+ <button class="rounded-xl bg-ds-accent text-white px-4 py-2 hover:opacity-90">
71
+ ...
72
+ </button>
73
+ ```
74
+
75
+ (Add: secondary button, link, badge, modal, dropdown, table row, etc. — whatever the project actually uses.)
76
+
77
+ ---
78
+
79
+ ## Conventions
80
+
81
+ Hard rules. Violating these = anti-pattern, must be flagged in code review.
82
+
83
+ - **Reach for `bg-ds-raised` not `bg-white`** — direct color literals lose dark-mode and theming
84
+ - **Never use `style={{}}`** — Tailwind classes or design tokens only
85
+ - **Never use `React.FC` / `React.FunctionComponent`** — function declarations only
86
+ - **Borders use `/70` or `/60` opacity** — solid `border-ds-border` is reserved for emphasis
87
+ - **Spacing increments only** — no `px-[7]` or arbitrary values; if a value isn't on the scale, the scale needs to expand or the component is wrong
88
+ - **Radius hierarchy**: outer card 2xl → inner element xl → micro element `rounded`. Never invert.
89
+
90
+ ---
91
+
92
+ ## RTL / multilingual
93
+
94
+ (Skip if not applicable.)
95
+
96
+ - Direction-aware spacing: use `ms-` / `me-` (Tailwind logical) not `ml-` / `mr-`
97
+ - Mirror icons that have directional intent (chevrons, arrows) for RTL
98
+ - Typography: separate Arabic + Latin font stacks via `--ds-font-display-ar` / `--ds-font-display-lat`
99
+
100
+ ---
101
+
102
+ ## Inspiration / source-of-language
103
+
104
+ Where did this visual language come from? Link the originating commits, PRs, or external references so future agents understand the lineage.
105
+
106
+ - **Recent canonical commits**: (e.g. `08e2e03d`, `bcc86535` — "Attio-standard redesigns of calling tabs")
107
+ - **External references**: (e.g. linear.app, attio.com, your own brand guidelines)
108
+
109
+ When extending the system, mirror the lineage rather than inventing.
110
+
111
+ ---
112
+
113
+ ## How agents use this file
114
+
115
+ 1. **Frontend / UI skills** read this first before producing any component code
116
+ 2. **`/rihal-ui-phase`** cites this file in the produced UI-SPEC.md as `read_first`
117
+ 3. **`rihal-frontend-design`** ports design directions FROM this — never independently
118
+ 4. **Code review skills** flag any new code that introduces hex values, raw colors, or pattern violations
119
+ 5. **`/rihal-clone-website`** uses this to translate cloned styles into project-native tokens — never preserves source-site classes verbatim
120
+
121
+ ---
122
+
123
+ ## Maintenance
124
+
125
+ - Update when a new canonical pattern lands (e.g. a redesign sprint that shifts radius scale)
126
+ - Reference the commit that established each pattern in the "Inspiration" section
127
+ - Distillate version is regenerated by `/rcode-memory-distill`
128
+ - Audit via `/rcode-memory-audit` at every milestone close
@@ -1,10 +1,16 @@
1
+ ---
2
+ phase: "{{phase_id}}"
3
+ status: complete
4
+ closed_at: "{{closed_at}}"
5
+ ---
6
+
1
7
  # Phase Summary — {{phase_name}}
2
8
 
3
9
  <!-- P2: Omit any section that has nothing substantive to say. An empty section is worse than no section. -->
4
10
 
5
11
  **Phase ID:** {{phase_id}}
6
12
  **Closed:** {{closed_at}}
7
- **Plan:** PLAN.md
13
+ **Sprint:** SPRINT.md
8
14
 
9
15
  ## Outcomes
10
16
 
@@ -12,19 +18,43 @@
12
18
 
13
19
  ## Decisions Made
14
20
 
15
- <!-- Omit if no decisions were made that aren't already in PLAN.md -->
21
+ <!-- Omit if no decisions were made that aren't already in SPRINT.md -->
16
22
  - {{key choices and their rationale}}
17
23
 
18
24
  ## Deviations from Plan
19
25
 
20
26
  <!-- Omit if execution matched the plan exactly -->
21
- - {{anything that diverged from PLAN.md and why}}
27
+ - {{anything that diverged from SPRINT.md and why}}
22
28
 
23
29
  ## Issues Encountered
24
30
 
25
31
  <!-- Omit if no tasks were pruned, escalated, or skipped -->
26
32
  - {{tasks pruned, escalated, or skipped}}
27
33
 
34
+ ## Patterns Established
35
+
36
+ <!-- Omit if no new patterns were introduced. List architectural/coding patterns future phases should follow. -->
37
+ <!-- Example: "All service errors now wrap in ServiceError(code, message) — see auth.service.ts:42" -->
38
+ - {{new pattern introduced by this phase and where it lives}}
39
+
40
+ ## Provides
41
+
42
+ <!-- What this phase exposes for future phases to build on. Be specific: function names, API endpoints, data models, config keys. -->
43
+ <!-- Example: "UserRepository.findByEmail() — src/repositories/user.repo.ts" -->
44
+ - {{what future phases can reuse from this phase}}
45
+
46
+ ## Requires
47
+
48
+ <!-- What this phase consumed from prior phases. Helps trace dependency chains. -->
49
+ <!-- Example: "Database connection from Phase 3 (src/db/connection.ts)" -->
50
+ - {{what this phase depended on from earlier phases}}
51
+
52
+ ## Affects
53
+
54
+ <!-- Downstream phases or components that may be impacted by what changed here. -->
55
+ <!-- Example: "Phase 9 (checkout flow) — depends on Cart model introduced here" -->
56
+ - {{phases or components that should re-verify after this phase}}
57
+
28
58
  ## Hand-off
29
59
 
30
60
  Next phase: {{next phase id and goal}}
@@ -55,7 +55,7 @@ Read the phase artifacts (in order of priority):
55
55
  If no SUMMARY.md exists:
56
56
  ```
57
57
  ERROR: No SUMMARY.md found for phase ${PHASE_ARG}
58
- This command works on completed phases. Run /rihal-execute-phase first.
58
+ This command works on completed phases. Run /rihal-execute first.
59
59
  ```
60
60
  Exit.
61
61
 
@@ -179,3 +179,9 @@ If arguments are invalid, missing files, or subagent fails:
179
179
  - Check that required files exist
180
180
  - Retry with clearer arguments or report the specific error to the user
181
181
 
182
+
183
+ ## On Completion
184
+
185
+ /rihal-check-todos — review all open todos
186
+ /rihal-next — get suggested next action
187
+ /rihal-progress — see overall roadmap status
@@ -136,3 +136,9 @@ After applying: "ROADMAP.md updated. Run `/rihal-manager` to execute phases in t
136
136
  - **ROADMAP.md missing:** Print error and suggest creating project first
137
137
  - **Phase parsing fails:** Print which phase and why parsing failed
138
138
  - **File write fails:** Print error and suggest manual update
139
+
140
+ ## ▶ Next Up
141
+
142
+ - **Circular deps found:** Fix dependency cycle, then re-run analysis
143
+ - **Ready to execute:** `/rihal-execute {phase}` — run with dependency awareness
144
+ - **Review roadmap:** `/rihal-progress` — see full project state
@@ -190,3 +190,15 @@ If arguments are invalid, missing files, or subagent fails:
190
190
  - Check that required files exist
191
191
  - Retry with clearer arguments or report the specific error to the user
192
192
 
193
+
194
+ ## On Completion
195
+
196
+ /rihal-audit — re-run audit to verify fixes applied correctly
197
+ /rihal-code-review — review the auto-applied changes
198
+ /rihal-progress — see overall project state
199
+
200
+ ## ▶ Next Up
201
+
202
+ - **Fixes applied:** `/rihal-verify-phase {phase}` — re-verify after fixes
203
+ - **More issues:** `/rihal-audit {phase}` — run audit again to confirm
204
+ - **All clean:** `/rihal-progress` — check project state
@@ -144,7 +144,7 @@ If no SUMMARY.md files found, **do not dead-halt** (closes #234). Probe
144
144
  for executed-phase signals and offer recovery options:
145
145
 
146
146
  ```bash
147
- PLANS=$(find "$MILESTONE_DIR" -name PLAN.md 2>/dev/null | wc -l)
147
+ PLANS=$(find "$MILESTONE_DIR" \( -name PLAN.md -o -name '*-SPRINT.md' \) 2>/dev/null | wc -l)
148
148
  GIT_FEAT=$(git log --oneline --grep='^feat' 2>/dev/null | wc -l)
149
149
  APPS=$(ls -d apps packages src 2>/dev/null | wc -l)
150
150
  ```
@@ -156,7 +156,7 @@ If `PLANS > 0` AND (`GIT_FEAT > 0` OR `APPS > 0`):
156
156
  Phases were executed but never formally closed.
157
157
 
158
158
  Options:
159
- 1. Synthesize SUMMARY.md per phase from PLAN.md + git log [recommended]
159
+ 1. Synthesize SUMMARY.md per phase from SPRINT.md + git log [recommended]
160
160
  (groups commits by phase tag like "feat(03-1):", writes a
161
161
  first-pass SUMMARY.md the user can edit)
162
162
  2. Run /rihal-verify-phase NN per phase (manual close path)
@@ -17,13 +17,14 @@ and auto-picks the most-relevant target based on project state. In
17
17
  If `$ARGUMENTS` contains `--help` or `-h`:
18
18
 
19
19
  ```
20
- /rihal-audit # interactive — asks what to audit
21
- /rihal-audit phase [<NN>] # → /rihal-verify-phase
22
- /rihal-audit milestone [--strict] # → /rihal-audit-milestone (with synth fallback)
23
- /rihal-audit uat # → /rihal-audit-uat
24
- /rihal-audit code [--scope=...] # → /rihal-code-review --karpathy
25
- /rihal-audit fix # → /rihal-audit-fix
26
- /rihal-audit work # → /rihal-verify-work
20
+ /rihal-audit # interactive — asks what to audit
21
+ /rihal-audit phase [<NN>] # → /rihal-verify-phase
22
+ /rihal-audit milestone [--strict] # → /rihal-audit-milestone (with synth fallback)
23
+ /rihal-audit uat # → /rihal-audit-uat
24
+ /rihal-audit code [--scope=...] # → /rihal-code-review --karpathy
25
+ /rihal-audit fix # → /rihal-audit-fix
26
+ /rihal-audit work # → /rihal-verify-work
27
+ /rihal-audit lens [<1-15> | all] # → /rihal-lens-audit (15-lens methodology)
27
28
  ```
28
29
 
29
30
  **Examples:**
@@ -31,6 +32,8 @@ If `$ARGUMENTS` contains `--help` or `-h`:
31
32
  /rihal-audit
32
33
  /rihal-audit milestone --strict
33
34
  /rihal-audit phase 03
35
+ /rihal-audit lens security
36
+ /rihal-audit lens all
34
37
  ```
35
38
 
36
39
  ## Step 1 — Resolve mode + arguments
@@ -42,7 +45,7 @@ DISCUSS=$($TOOL config-get workflow.discuss_mode 2>/dev/null || echo "adaptive")
42
45
  ```
43
46
 
44
47
  Parse `$ARGUMENTS`:
45
- - First word ∈ {phase, milestone, uat, code, fix, work} → set `$TARGET`, drop it from args, jump to Step 4.
48
+ - First word ∈ {phase, milestone, uat, code, fix, work, lens} → set `$TARGET`, drop it from args, jump to Step 4.
46
49
  - Empty or unrecognised → continue to Step 2.
47
50
 
48
51
  ## Step 2 — Detect project state
@@ -52,7 +55,7 @@ Probe what's audit-able right now:
52
55
  ```bash
53
56
  ROADMAP=$([ -f .planning/ROADMAP.md ] && echo yes || echo no)
54
57
  PHASES=$(ls -d .planning/phases/*/ 2>/dev/null | wc -l)
55
- PLANS=$(find .planning/phases -name PLAN.md 2>/dev/null | wc -l)
58
+ PLANS=$(find .planning/phases \( -name PLAN.md -o -name '*-SPRINT.md' \) 2>/dev/null | wc -l)
56
59
  SUMMARIES=$(find .planning/phases -name SUMMARY.md 2>/dev/null | wc -l)
57
60
  UAT_FILES=$(find .planning -name 'UAT*.md' 2>/dev/null | wc -l)
58
61
  ON_BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null)
@@ -81,6 +84,7 @@ Options:
81
84
  4. code-quality — Karpathy 4-principle code review (current diff)
82
85
  5. auto-fix — audit then auto-fix findings (uses #1–4 output)
83
86
  6. work — verify current branch / WIP ({ON_BRANCH}, dirty={DIRTY})
87
+ 7. lens — 15-lens methodology audit (security, perf, tests…)
84
88
  0. cancel
85
89
  ```
86
90
 
@@ -94,12 +98,13 @@ sub-workflow.
94
98
 
95
99
  | target | precondition | failure message |
96
100
  |---|---|---|
97
- | phase | at least one `.planning/phases/*/PLAN.md` | `No PLAN.md found. Run /rihal-plan first.` |
101
+ | phase | at least one `.planning/phases/*/PLAN.md` or `*-SPRINT.md` | `No plan file found. Run /rihal-plan first.` |
98
102
  | milestone | ROADMAP.md exists | `No ROADMAP.md. Run /rihal-new-milestone first.` |
99
103
  | uat | at least one UAT*.md exists | `No UAT files yet. Run /rihal-execute on a phase first.` |
100
104
  | code | git repo with at least one commit | `Empty repo — nothing to audit yet.` |
101
105
  | fix | a prior audit report exists OR a prior `--report` artefact | `No audit findings yet. Run /rihal-audit first.` |
102
106
  | work | inside a git worktree | `Not in a git repo.` |
107
+ | lens | `rihal/` or `.rihal/` directory exists | `No rihal source found. Run: npx @hanzlaa/rcode install .` |
103
108
 
104
109
  For `milestone` specifically, check the **graceful-degrade** condition
105
110
  (closes #234 audit-milestone halt):
@@ -111,7 +116,7 @@ if [ "$TARGET" = "milestone" ] && [ "$SUMMARIES" -eq 0 ] && [ "$PLANS" -gt 0 ];
111
116
  echo "⚠ $PLANS phases planned, 0 SUMMARY.md, $GIT_FEAT_COMMITS feat commits."
112
117
  echo " Phases were executed but never formally closed."
113
118
  # Offer (yolo: auto-pick 1; guided: ask):
114
- # 1. Synthesize SUMMARY.md per phase from PLAN.md + git log [recommended]
119
+ # 1. Synthesize SUMMARY.md per phase from SPRINT.md + git log [recommended]
115
120
  # 2. Run /rihal-verify-phase per phase (manual close)
116
121
  # 3. Continue audit anyway (will only assess what's documented)
117
122
  # 0. Cancel
@@ -121,13 +126,13 @@ fi
121
126
  In `mode: yolo`, auto-pick option 1: group `git log --oneline` output by
122
127
  phase tag (e.g. commits matching `^feat\(0?(\d+)`) and write a first-pass
123
128
  `SUMMARY.md` per phase under `.planning/phases/<phase>/SUMMARY.md`
124
- containing the goal (from PLAN.md), the commit list, and a `# TODO:
129
+ containing the goal (from SPRINT.md), the commit list, and a `# TODO:
125
130
  expand outcomes` marker. The user can then refine before re-running the
126
131
  audit.
127
132
 
128
133
  A native `phase synthesize-summaries` CLI subcommand is tracked separately
129
134
  (see #234 follow-ups) — until it lands, the LLM performs the synthesis
130
- inline using `git log` + `Read PLAN.md` + `Write SUMMARY.md`.
135
+ inline using `git log` + `Read SPRINT.md` + `Write SUMMARY.md`.
131
136
 
132
137
  ## Step 5 — Dispatch
133
138
 
@@ -139,6 +144,7 @@ Run the target's slash command, forwarding remaining args:
139
144
  | milestone | `/rihal-audit-milestone $REST_ARGS` |
140
145
  | uat | `/rihal-audit-uat $REST_ARGS` |
141
146
  | code | `/rihal-code-review $REST_ARGS --karpathy` |
147
+ | lens | `/rihal-lens-audit $REST_ARGS` |
142
148
  | fix | `/rihal-audit-fix $REST_ARGS` |
143
149
  | work | `/rihal-verify-work $REST_ARGS` |
144
150
 
@@ -155,6 +161,7 @@ Findings: {count}
155
161
  Next:
156
162
  /rihal-audit fix — auto-fix findings classified as auto-fixable
157
163
  /rihal-audit code — drill into code-quality issues
164
+ /rihal-audit lens — 15-lens methodology audit
158
165
  /rihal-settings show — review which audit gates are enabled
159
166
  ```
160
167
 
@@ -162,7 +169,9 @@ Next:
162
169
 
163
170
  - [ ] `/rihal-audit` (no args) presents menu in guided mode, auto-picks in yolo
164
171
  - [ ] `/rihal-audit milestone` short-circuits the menu
165
- - [ ] When SUMMARY.md absent but PLAN.md present, milestone offers synthesize/verify/skip — does not dead-halt
172
+ - [ ] `/rihal-audit lens` dispatches to `/rihal-lens-audit` interactive picker
173
+ - [ ] `/rihal-audit lens security` passes `security` directly to `/rihal-lens-audit`
174
+ - [ ] When SUMMARY.md absent but SPRINT.md present, milestone offers synthesize/verify/skip — does not dead-halt
166
175
  - [ ] Sub-workflow's closing report is surfaced unchanged
167
176
 
168
177
  ## On Error