@hanzlaa/rcode 2.8.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/AGENTS.md +11 -1
  2. package/CONTRIBUTING.md +7 -0
  3. package/README.md +39 -20
  4. package/cli/install.js +145 -47
  5. package/dist/rcode.js +134 -43
  6. package/package.json +2 -2
  7. package/rihal/agents/rihal-advisor-researcher.md +1 -1
  8. package/rihal/agents/rihal-assumptions-analyzer.md +1 -1
  9. package/rihal/agents/rihal-codebase-mapper.md +1 -1
  10. package/rihal/agents/rihal-docs-auditor.md +3 -3
  11. package/rihal/agents/rihal-executor.md +10 -0
  12. package/rihal/agents/rihal-integration-checker.md +1 -1
  13. package/rihal/agents/rihal-noor.md +2 -2
  14. package/rihal/agents/rihal-phase-researcher.md +1 -1
  15. package/rihal/agents/rihal-planner.md +25 -0
  16. package/rihal/agents/rihal-project-researcher.md +1 -1
  17. package/rihal/agents/rihal-research-synthesizer.md +1 -1
  18. package/rihal/agents/rihal-roadmapper.md +1 -1
  19. package/rihal/agents/rihal-sprint-checker.md +19 -1
  20. package/rihal/agents/rihal-verifier.md +1 -1
  21. package/rihal/agents/rihal-waleed.md +1 -2
  22. package/rihal/commands/code-review.md +1 -1
  23. package/rihal/commands/memory-audit.md +10 -0
  24. package/rihal/commands/memory-distill.md +11 -0
  25. package/rihal/commands/memory-init.md +12 -0
  26. package/rihal/commands/memory-update.md +12 -0
  27. package/rihal/config/model-profiles.json +5 -5
  28. package/rihal/references/karpathy-guidelines-full.md +1 -1
  29. package/rihal/references/no-unauthorized-git-ops.md +1 -1
  30. package/rihal/references/verb-dictionary.md +1 -1
  31. package/rihal/skills/actions/2-plan/rihal-frontend-design/SKILL.md +49 -139
  32. package/rihal/skills/actions/2-plan/rihal-frontend-design/references.md +79 -0
  33. package/rihal/skills/actions/4-implementation/rihal-browser-verify/SKILL.md +70 -0
  34. package/rihal/skills/actions/4-implementation/rihal-checkpoint-preview/SKILL.md +1 -1
  35. package/rihal/skills/actions/4-implementation/rihal-ci/SKILL.md +108 -0
  36. package/rihal/skills/actions/4-implementation/rihal-debug/SKILL.md +78 -0
  37. package/rihal/skills/actions/4-implementation/rihal-git-flow/SKILL.md +90 -0
  38. package/rihal/skills/actions/4-implementation/rihal-harden/SKILL.md +91 -0
  39. package/rihal/skills/actions/4-implementation/rihal-incremental/SKILL.md +50 -0
  40. package/rihal/skills/actions/4-implementation/rihal-migrate/SKILL.md +86 -0
  41. package/rihal/skills/actions/4-implementation/rihal-perf/SKILL.md +96 -0
  42. package/rihal/skills/actions/4-implementation/rihal-prove-it/SKILL.md +64 -0
  43. package/rihal/skills/actions/4-implementation/rihal-source-truth/SKILL.md +76 -0
  44. package/rihal/skills/actions/4-implementation/rihal-trim/SKILL.md +73 -0
  45. package/rihal/skills/agents/dalil-scout/SKILL.md +43 -125
  46. package/rihal/skills/agents/dalil-scout/references.md +67 -0
  47. package/rihal/skills/agents/majlis-council/SKILL.md +50 -144
  48. package/rihal/skills/agents/majlis-council/references.md +90 -0
  49. package/rihal/skills/agents/raees-orchestrator/SKILL.md +56 -117
  50. package/rihal/skills/agents/raees-orchestrator/references.md +47 -0
  51. package/rihal/skills/core/rihal-advanced-elicitation/SKILL.md +36 -136
  52. package/rihal/skills/core/rihal-advanced-elicitation/references.md +101 -0
  53. package/rihal/skills/core/rihal-auth-audit/SKILL.md +93 -0
  54. package/rihal/skills/core/rihal-brainstorming/SKILL.md +5 -0
  55. package/rihal/skills/core/rihal-client-gate/SKILL.md +91 -0
  56. package/rihal/skills/core/rihal-clone-website/SKILL.md +30 -371
  57. package/rihal/skills/core/rihal-clone-website/references.md +213 -0
  58. package/rihal/skills/core/rihal-deploy-unify/SKILL.md +87 -0
  59. package/rihal/skills/core/rihal-distillator/SKILL.md +37 -187
  60. package/rihal/skills/core/rihal-distillator/references.md +118 -0
  61. package/rihal/skills/core/rihal-editorial-review-prose/SKILL.md +5 -0
  62. package/rihal/skills/core/rihal-editorial-review-structure/SKILL.md +45 -183
  63. package/rihal/skills/core/rihal-editorial-review-structure/references.md +110 -0
  64. package/rihal/skills/core/rihal-help/SKILL.md +6 -1
  65. package/rihal/skills/core/rihal-incident-record/SKILL.md +161 -0
  66. package/rihal/skills/core/rihal-index-docs/SKILL.md +5 -0
  67. package/rihal/skills/core/rihal-init/SKILL.md +5 -0
  68. package/rihal/skills/core/rihal-memory-audit/SKILL.md +88 -0
  69. package/rihal/skills/core/rihal-memory-distill/SKILL.md +87 -0
  70. package/rihal/skills/core/rihal-memory-init/SKILL.md +77 -0
  71. package/rihal/skills/core/rihal-memory-update/SKILL.md +73 -0
  72. package/rihal/skills/core/rihal-mvp-graduate/SKILL.md +116 -0
  73. package/rihal/skills/core/rihal-ocr-consistency/SKILL.md +106 -0
  74. package/rihal/skills/core/rihal-party-mode/SKILL.md +5 -0
  75. package/rihal/skills/core/rihal-rebrand/SKILL.md +133 -0
  76. package/rihal/skills/core/rihal-review-adversarial-general/SKILL.md +5 -0
  77. package/rihal/skills/core/rihal-review-edge-case-hunter/SKILL.md +5 -0
  78. package/rihal/skills/core/rihal-shard-doc/SKILL.md +5 -0
  79. package/rihal/skills/core/rihal-theme-system/SKILL.md +113 -0
  80. package/rihal/team.yaml +3 -22
  81. package/rihal/templates/memory/INDEX.md +46 -0
  82. package/rihal/templates/memory/change-records/.gitkeep +4 -0
  83. package/rihal/templates/memory/distillates/project.distillate.md +11 -0
  84. package/rihal/templates/memory/distillates/stack.distillate.md +11 -0
  85. package/rihal/templates/memory/incidents/known-issues.md +27 -0
  86. package/rihal/templates/memory/incidents/post-mortems/.gitkeep +3 -0
  87. package/rihal/templates/memory/milestones/archive/.gitkeep +2 -0
  88. package/rihal/templates/memory/milestones/current.md +39 -0
  89. package/rihal/templates/memory/people/stakeholders.md +25 -0
  90. package/rihal/templates/memory/people/team.md +35 -0
  91. package/rihal/templates/memory/project/decisions.md +32 -0
  92. package/rihal/templates/memory/project/glossary.md +16 -0
  93. package/rihal/templates/memory/project/stack.md +46 -0
  94. package/rihal/workflows/audit.md +3 -3
  95. package/rihal/workflows/code-review.md +32 -1
  96. package/rihal/workflows/council.md +1 -1
  97. package/rihal/workflows/discuss-phase-power.md +3 -3
  98. package/rihal/workflows/do.md +1 -1
  99. package/rihal/workflows/docs-update.md +4 -4
  100. package/rihal/workflows/execute.md +61 -5
  101. package/rihal/workflows/help.md +5 -5
  102. package/rihal/workflows/karpathy-audit.md +9 -9
  103. package/rihal/workflows/memory-audit.md +83 -0
  104. package/rihal/workflows/memory-distill.md +103 -0
  105. package/rihal/workflows/memory-init.md +102 -0
  106. package/rihal/workflows/memory-update.md +83 -0
  107. package/rihal/workflows/plan.md +66 -1
  108. package/server/dashboard.js +6 -1
  109. package/server/lib/api.js +8 -2
  110. package/server/lib/html/client.js +63 -0
  111. package/server/lib/html/shell.js +5 -0
  112. package/server/lib/scanner.js +76 -1
  113. package/rihal/agents/rihal-architect.md +0 -79
  114. package/rihal/agents/rihal-tech-writer.md +0 -80
  115. package/rihal/commands/check-implementation-readiness.md +0 -8
  116. package/rihal/commands/discuss-phase-power.md +0 -11
  117. package/rihal/commands/karpathy-audit.md +0 -12
  118. package/rihal/commands/new-project-research.md +0 -11
  119. package/rihal/commands/new-project-roadmap.md +0 -11
  120. package/rihal/commands/report.md +0 -10
  121. package/rihal/commands/review-adversarial.md +0 -8
  122. package/rihal/commands/review-edge-case-hunter.md +0 -8
@@ -0,0 +1,133 @@
1
+ ---
2
+ name: rihal-rebrand
3
+ description: Stack-wide rebranding migration — refs, assets, copy, env vars, docs, redirects, package names. Use when a project's brand changes mid-flight and the rename has to ripple through dozens of files without breaking anything. Specifically encodes the Rihal "had to do complete rebranding" pain — the rename touched 100+ files and broke 3 deploys before we got it right.
4
+ triggers:
5
+ - "rebrand"
6
+ - "stack-wide rename"
7
+ - "product rename"
8
+ - "rename project"
9
+ - "brand migration"
10
+ - "logo refresh"
11
+ - "domain change"
12
+ - "company name change"
13
+ user-invocable: true
14
+ ---
15
+
16
+ ## Overview
17
+
18
+ A rebrand is N renames at once: package name, npm scope, repo URL, environment variables, asset paths, copy strings, redirects, social handles, contracts. Each one looks small. Together they break things. This skill enforces a checklist + a decomposition (one category per commit) so the rename ships incrementally without a "Friday at 5pm" big-bang deploy.
19
+
20
+ ## The 9 surfaces of a rebrand
21
+
22
+ For each: scope it before touching code, identify cross-references, decompose into commits.
23
+
24
+ ### 1. Package + repo identity
25
+
26
+ - [ ] `package.json` `name`, `description`, `repository.url`, `homepage`, `bugs.url`
27
+ - [ ] `README.md` heading, badges, CDN URLs, npm install commands
28
+ - [ ] Repository name on GitHub (and any forks / deploy keys / webhooks)
29
+ - [ ] npm scope rename (this is one-way; coordinate carefully)
30
+
31
+ ### 2. Environment variables + secrets
32
+
33
+ - [ ] Old prefix `OLDBRAND_*` → `NEWBRAND_*`
34
+ - [ ] Update `.env.example`, all CI environment definitions, K8s ConfigMaps and Secrets
35
+ - [ ] Compatibility window: read both names for 1 release, then drop the old
36
+
37
+ ### 3. Assets
38
+
39
+ - [ ] Logos, favicons, OG images, brand-coloured graphics
40
+ - [ ] Email templates (transactional + marketing)
41
+ - [ ] PDF templates, certificate templates, invoice templates
42
+
43
+ ### 4. Copy strings
44
+
45
+ - [ ] User-facing UI copy
46
+ - [ ] Email subject lines + bodies
47
+ - [ ] Push notification text
48
+ - [ ] Error messages
49
+ - [ ] Marketing site / landing page
50
+
51
+ ### 5. URLs + redirects
52
+
53
+ - [ ] Old domain → new domain HTTP 301s
54
+ - [ ] Email-link tracking domains
55
+ - [ ] Deep-link schemes (`oldbrand://` → `newbrand://`) with backwards-compat for installed apps
56
+ - [ ] CDN paths + old-image redirects
57
+
58
+ ### 6. Social + external
59
+
60
+ - [ ] Twitter / LinkedIn / Instagram handles (one-way; rename last after rest is verified)
61
+ - [ ] App Store / Play Store listings + reviews moved
62
+ - [ ] Crashlytics / Sentry project name
63
+ - [ ] Stripe / payment processor business name
64
+
65
+ ### 7. Documentation + onboarding
66
+
67
+ - [ ] README, CONTRIBUTING, all `docs/`
68
+ - [ ] Internal wiki / Notion
69
+ - [ ] Customer-facing help docs
70
+
71
+ ### 8. Code-internal references
72
+
73
+ - [ ] CSS variable names (`--oldbrand-blue` → `--newbrand-blue`)
74
+ - [ ] TS / JS namespace exports
75
+ - [ ] Test fixture data containing the old name
76
+
77
+ ### 9. Legal + contracts
78
+
79
+ - [ ] Customer contracts referencing the old name
80
+ - [ ] Privacy policy, terms of service, DPA
81
+ - [ ] Trademark registrations + domain whois
82
+
83
+ ## Workflow
84
+
85
+ 1. **Inventory.** Grep for the old brand name across the entire monorepo (case-insensitive, all variants — `OldBrand`, `oldbrand`, `old-brand`, `OLD_BRAND`).
86
+ 2. **Categorise** each hit into one of the 9 surfaces.
87
+ 3. **Decompose into commits** — one surface per commit minimum. Surfaces 1, 2, 4, 5, 7, 8 can be one commit each; surface 6 (social) is the LAST commit because it's hardest to revert.
88
+ 4. **Compatibility window.** For env vars, deep links, public APIs: read both names for 1 release, drop the old in the next.
89
+ 5. **Verify after each commit:** the build passes, the tests pass, no broken links to the old name.
90
+ 6. **Communicate.** Customer-facing rename is an event — schedule it, announce it, follow with a status post 24h later confirming nothing's broken.
91
+
92
+ ## Output Format
93
+
94
+ ```
95
+ Rebrand inventory — <old> → <new>
96
+ Total occurrences: <count> across <files>
97
+
98
+ By surface:
99
+ 1. Package + repo: <count>
100
+ 2. Env vars: <count>
101
+ 3. Assets: <count>
102
+ ...
103
+
104
+ Commit plan:
105
+ 1. refactor(meta): rename package + repo references
106
+ 2. refactor(env): migrate OLDBRAND_* env vars with compat fallback
107
+ 3. refactor(assets): swap logos, favicons, OG images
108
+ ...
109
+
110
+ Compatibility windows:
111
+ - env vars: 1 release
112
+ - public API: 1 minor version with deprecation warning
113
+ - deep links: 6 months for installed apps
114
+
115
+ Communication plan:
116
+ - Internal heads-up: <date>
117
+ - Customer email: <date>
118
+ - Social handle change: <last commit ships>
119
+ - 24h post-launch status: <date>
120
+ ```
121
+
122
+ ## Examples
123
+
124
+ **Happy path** — `OldBrand → NewBrand` rename. Inventory: 312 occurrences across 87 files in 9 surfaces. 9 commits over 4 days, compat window of 1 release for env vars + public API. Social handles renamed last. Zero customer reports of broken links.
125
+
126
+ **Edge case — domain change with email** — Old domain hosts customer email aliases. Old domain MUST keep MX records during compatibility window OR customers lose email. Add domain-MX to the checklist before touching DNS.
127
+
128
+ **Negative — rename in one commit** — Refuse. A 312-line diff across 87 files cannot be reviewed meaningfully and cannot be reverted partially. Decompose into 9 commits minimum.
129
+
130
+ ## Memory Bank Hooks
131
+
132
+ - **Reads:** `.rihal/memory/people/stakeholders.md` (who needs to approve external changes)
133
+ - **Writes:** `.rihal/memory/change-records/YYYYMMDD-NNN.md` per commit; `.rihal/memory/project/decisions.md` for the rebrand kickoff
@@ -65,3 +65,8 @@ Markdown bullet list of findings, each describing a specific problem, gap, or ri
65
65
 
66
66
  - HALT if zero findings — this is suspicious, re-analyze or ask for guidance
67
67
  - HALT if content is empty or unreadable
68
+
69
+ ## Memory Bank Hooks
70
+
71
+ - **Reads:** the content under review (diff, spec, story, doc)
72
+ - **Writes:** nothing — produces findings only. Findings can be persisted by the caller via `rcode-memory-update` if they shape downstream work.
@@ -97,3 +97,8 @@ No extra text, no explanations, no markdown wrapping. An empty array `[]` is val
97
97
  ### Negative boundary
98
98
  **User:** "critically review this spec"
99
99
  **Result:** Not edge-case hunting → route to `rihal-review-adversarial-general`
100
+
101
+ ## Memory Bank Hooks
102
+
103
+ - **Reads:** the content under review (diff, full file, or function)
104
+ - **Writes:** nothing — produces an unhandled-edges report only
@@ -135,3 +135,8 @@ Present user with options for the original document:
135
135
  ## HALT CONDITIONS
136
136
 
137
137
  - HALT if npx command fails or produces no output files
138
+
139
+ ## Memory Bank Hooks
140
+
141
+ - **Reads:** the source document being sharded
142
+ - **Writes:** the sharded output files only; does NOT modify `.rihal/memory/`. If the sharded doc is a Memory Bank file, use `rcode-memory-distill` instead.
@@ -0,0 +1,113 @@
1
+ ---
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.
4
+ triggers:
5
+ - "theme audit"
6
+ - "design tokens"
7
+ - "scattered colours"
8
+ - "hardcoded hex"
9
+ - "design system audit"
10
+ - "before launch design check"
11
+ - "consistent theme"
12
+ - "css variable audit"
13
+ user-invocable: true
14
+ ---
15
+
16
+ ## Overview
17
+
18
+ Theme drift is silent until launch — then someone notices that "the brand blue" is 4 different blues across pages, and now you're rebranding under deadline. This skill catches drift early: every colour, font, spacing value, and animation duration must come from a token, not a literal. A 30-minute audit before launch is cheaper than a 3-week rebrand after.
19
+
20
+ ## The 7 token categories
21
+
22
+ For each, the audit checks: where do values live, are they used consistently, is dark mode + RTL supported.
23
+
24
+ ### 1. Colour
25
+
26
+ - [ ] All colours defined as CSS custom properties in one location (`globals.css` or `tokens.css`).
27
+ - [ ] No raw hex / rgb in component files (grep for `#[0-9a-f]{3,8}`).
28
+ - [ ] Each colour has a semantic name (`--color-primary`) AND a literal name (`--rihal-blue`).
29
+ - [ ] Dark mode tokens defined alongside light, not retrofitted.
30
+
31
+ ### 2. Typography
32
+
33
+ - [ ] Font families loaded once (via `next/font` or `<link>` in head).
34
+ - [ ] Font sizes use a scale (`--text-xs`, `--text-sm`, etc.), not arbitrary px values.
35
+ - [ ] Arabic font has explicit line-height bump (Arabic glyphs are denser).
36
+ - [ ] Fallback stack defined for every font family.
37
+
38
+ ### 3. Spacing
39
+
40
+ - [ ] Spacing scale defined (`--space-1` through `--space-12`).
41
+ - [ ] No raw px values for margin/padding in components.
42
+ - [ ] Logical properties used (`padding-inline-start`, not `padding-left`) for RTL.
43
+
44
+ ### 4. Radii & shadows
45
+
46
+ - [ ] Radii scale (`--radius-sm`, `--radius-lg`).
47
+ - [ ] Shadow tokens, not inline `box-shadow: 0 4px 6px ...` strings.
48
+
49
+ ### 5. Motion
50
+
51
+ - [ ] Duration scale (`--duration-fast: 150ms`, `--duration-slow: 400ms`).
52
+ - [ ] Easing tokens (`--ease-out`, `--ease-spring`).
53
+ - [ ] Reduced-motion media query honoured.
54
+
55
+ ### 6. Breakpoints
56
+
57
+ - [ ] Breakpoint tokens defined and used everywhere.
58
+ - [ ] Mobile (390px), tablet (768px), desktop (1440px) all tested.
59
+
60
+ ### 7. RTL
61
+
62
+ - [ ] `dir="rtl"` toggle exists and works at the root.
63
+ - [ ] Logical properties used throughout (CSS Logical Properties Level 1).
64
+ - [ ] Icons that imply direction (arrows, slashes) flipped via `transform: scaleX(-1)` or RTL-specific assets.
65
+ - [ ] Mixed-content (Arabic + English in same line) tested.
66
+
67
+ ## Workflow
68
+
69
+ 1. **Inventory token locations.** Should be one file per category, plus a root index.
70
+ 2. **Grep for literals.** Every match in a component file is a finding.
71
+ 3. **Diff against design.** If Layla / Zahra / the brand guide has tokens that aren't in code, add them. If code has tokens not in the brand guide, flag them.
72
+ 4. **Test dark + RTL** per page if they're shipping.
73
+ 5. **Generate the fix list** ordered by frequency (a hardcoded `#1e3a8a` in 12 files is more urgent than one in 1).
74
+
75
+ ## Output Format
76
+
77
+ ```
78
+ Theme audit — <date>
79
+ Pages reviewed: <count>
80
+
81
+ Token coverage:
82
+ Colour: <X%> ✗ <count> raw hex literals
83
+ Typography: <X%> ⚠ <findings>
84
+ Spacing: <X%>
85
+ Radii/shadows: <X%>
86
+ Motion: <X%>
87
+ Breakpoints: <X%>
88
+ RTL: ✓/✗
89
+
90
+ Top offenders (by file):
91
+ src/components/Hero.tsx — 8 raw hex values
92
+ src/app/page.tsx — 4 hardcoded font sizes
93
+
94
+ Fix order (by impact):
95
+ 1. Replace #1e3a8a → var(--rihal-blue) — 12 occurrences across 8 files
96
+ 2. ...
97
+
98
+ Memory Bank update:
99
+ → .rihal/memory/project/decisions.md (token system canonicalised)
100
+ ```
101
+
102
+ ## Examples
103
+
104
+ **Happy path — pre-launch audit** — Page count: 12. Coverage: colour 60%, typography 80%, spacing 50%, RTL 0%. Plan: extract tokens (1 day), migrate components (2 days), add RTL toggle (1 day). Catch the rebrand BEFORE launch.
105
+
106
+ **Edge case — design partial alignment** — Brand guide has 3 blues, code has 7. Some are intentional shades; some are drift. Walk each with Zahra (`rihal-agent-zahra`) to canonicalise.
107
+
108
+ **Negative — "we'll add dark mode later"** — Refuse silent commitment. Either ship dark mode now or document the decision in `decisions.md` so it doesn't become a "why don't we have dark mode?" argument in 3 months.
109
+
110
+ ## Memory Bank Hooks
111
+
112
+ - **Reads:** `.rihal/memory/project/stack.md` (frontend layer), brand tokens from Zahra if available
113
+ - **Writes:** `.rihal/memory/project/decisions.md` (canonical token system); `.rihal/memory/change-records/YYYYMMDD-NNN.md` (the audit itself)
package/rihal/team.yaml CHANGED
@@ -85,20 +85,6 @@ agents:
85
85
  - backlog
86
86
  description: Scope, requirements, PRD writing, user stories, and backlog curation.
87
87
 
88
- - id: rihal-tech-writer
89
- name: Tech Writer
90
- file_path: rihal/agents/rihal-tech-writer.md
91
- role: Technical Documentation Specialist
92
- authority_level: operational
93
- domain_keywords:
94
- - documentation
95
- - readme
96
- - api-docs
97
- - changelog
98
- - migration-guide
99
- - inline-comments
100
- description: Generates and updates README, API docs, changelogs, migration guides, and inline code comments.
101
-
102
88
  - id: rihal-yousef
103
89
  name: Yousef (يوسف)
104
90
  file_path: rihal/agents/rihal-yousef.md
@@ -238,7 +224,9 @@ agents:
238
224
  - pitch-deck
239
225
  - changelog
240
226
  - blog-post
241
- description: Documentation, README files, API docs, architecture diagrams, changelogs, pitch decks, and blog posts.
227
+ - migration-guide
228
+ - inline-comments
229
+ description: Documentation, README files, API docs, architecture diagrams, changelogs, migration guides, inline code comments, pitch decks, and blog posts.
242
230
 
243
231
  - id: rihal-ahmed
244
232
  name: Ahmed Al Hassani (أحمد الحسني)
@@ -365,13 +353,6 @@ tactical_agents:
365
353
  authority_level: research
366
354
  description: Advisor-level deep research for gray-area decisions
367
355
 
368
- - id: rihal-architect
369
- name: Architect
370
- file_path: rihal/agents/rihal-architect.md
371
- role: Architect
372
- authority_level: technical
373
- description: Enterprise architecture and system design reviews
374
-
375
356
  - id: rihal-assumptions-analyzer
376
357
  name: Assumptions Analyzer
377
358
  file_path: rihal/agents/rihal-assumptions-analyzer.md
@@ -0,0 +1,46 @@
1
+ # Memory Bank — `{{PROJECT_NAME}}`
2
+
3
+ > The Memory Bank is your project's persistent brain. AI agents read from here on every session. You write to it as work happens. Survives session resets, team changes, and AI memory limits.
4
+
5
+ **Last updated:** {{INIT_DATE}}
6
+
7
+ ---
8
+
9
+ ## Directory map
10
+
11
+ | Path | Purpose |
12
+ |---|---|
13
+ | [`project/stack.md`](project/stack.md) | Languages, frameworks, services in use |
14
+ | [`project/decisions.md`](project/decisions.md) | Append-only architectural decision log |
15
+ | [`project/glossary.md`](project/glossary.md) | Domain terms, internal names, acronyms |
16
+ | [`people/stakeholders.md`](people/stakeholders.md) | External contacts, decision authority, comms |
17
+ | [`people/team.md`](people/team.md) | Internal team, ownership, availability |
18
+ | [`milestones/current.md`](milestones/current.md) | Active milestone — goal, phase, blockers |
19
+ | [`milestones/archive/`](milestones/archive/) | Completed milestones, one file per |
20
+ | [`incidents/known-issues.md`](incidents/known-issues.md) | Active bugs and workarounds |
21
+ | [`incidents/post-mortems/`](incidents/post-mortems/) | Resolved incidents — root cause, fix, lessons |
22
+ | [`change-records/`](change-records/) | Change records — `YYYYMMDD-NNN.md` format |
23
+ | [`distillates/`](distillates/) | Generated, lossless compression for fast LLM loading |
24
+
25
+ ---
26
+
27
+ ## Token budget guide
28
+
29
+ - **`INDEX.md` only** (~500 tokens) — quick orientation
30
+ - **`INDEX.md` + `distillates/project.distillate.md`** (~5K tokens) — standard session start
31
+ - **Full `project/` directory** (~10–15K tokens) — deep planning
32
+ - **Full Memory Bank** (~30–50K tokens) — major refactor or onboarding
33
+
34
+ ## Update cadence
35
+
36
+ - **`project/decisions.md`** — append every architectural choice as it's made
37
+ - **`milestones/current.md`** — update on milestone phase transitions
38
+ - **`incidents/known-issues.md`** — add when a workaround ships, remove when a real fix lands
39
+ - **`distillates/`** — regenerate via `/rcode:memory-distill` when source files change
40
+ - **Whole bank** — audit via `/rcode:memory-audit` at every milestone close
41
+
42
+ ## Constraints
43
+
44
+ - No secrets, tokens, or PII
45
+ - This directory is checked into git
46
+ - Distillates are generated, not hand-edited
@@ -0,0 +1,4 @@
1
+ # Change records — production / staging changes that need an audit trail.
2
+ # Filename: `YYYYMMDD-NNN.md` (e.g. `20260426-001.md`).
3
+ # Each change record contains: ID, date, requester, owner, category, type,
4
+ # description, risk, deployment method, approval, rollback plan, verification.
@@ -0,0 +1,11 @@
1
+ ---
2
+ generated: true
3
+ do-not-edit: true
4
+ regenerate-with: /rcode:memory-distill
5
+ ---
6
+
7
+ # Project Distillate — `{{PROJECT_NAME}}`
8
+
9
+ > Generated, lossless compression of `project/`, `people/`, `milestones/current.md`, and `incidents/known-issues.md`. Optimised for LLM context loading. Hand-edits are overwritten on regenerate.
10
+
11
+ _(Run `/rcode:memory-distill` to populate.)_
@@ -0,0 +1,11 @@
1
+ ---
2
+ generated: true
3
+ do-not-edit: true
4
+ regenerate-with: /rcode:memory-distill
5
+ ---
6
+
7
+ # Stack Distillate — `{{PROJECT_NAME}}`
8
+
9
+ > Generated, lossless compression of `project/stack.md` only. Useful when you need stack context but not full project history.
10
+
11
+ _(Run `/rcode:memory-distill --target stack` to populate.)_
@@ -0,0 +1,27 @@
1
+ # Known Issues — `{{PROJECT_NAME}}`
2
+
3
+ Active bugs and workarounds. Searchable so an agent doesn't waste cycles re-debugging an already-known issue.
4
+
5
+ > **Add an entry when:** a workaround ships before the real fix, OR a bug is acknowledged but won't be fixed this sprint.
6
+ > **Remove an entry when:** the real fix lands and is verified in production.
7
+
8
+ ---
9
+
10
+ ## Format
11
+
12
+ ```
13
+ ### Issue title
14
+
15
+ - **Symptom:** what users see
16
+ - **Surface:** which area / file / route
17
+ - **Workaround:** what we do today
18
+ - **Real fix planned for:** milestone / phase / "out of scope"
19
+ - **First seen:** YYYY-MM-DD
20
+ - **Tracking:** GitHub issue # / Linear ID
21
+ ```
22
+
23
+ ---
24
+
25
+ ## Issues
26
+
27
+ <!-- Add entries here -->
@@ -0,0 +1,3 @@
1
+ # Post-mortems land here, one file per resolved incident.
2
+ # Filename: `YYYYMMDD-<short-slug>.md` (e.g. `20260315-keycloak-ad-sync.md`).
3
+ # Use the rcode-incident-record skill (Phase 6) to generate.
@@ -0,0 +1,2 @@
1
+ # Archived milestones land here, one file per completed milestone.
2
+ # Filename: `M<N>-<slug>.md` (e.g. `M1-mvp-launch.md`).
@@ -0,0 +1,39 @@
1
+ # Current Milestone — `{{PROJECT_NAME}}`
2
+
3
+ Active milestone. Goal, phases, current sprint, blockers. The agent reads this before starting any task.
4
+
5
+ ---
6
+
7
+ ## Milestone
8
+
9
+ **Name:** _(e.g. M1 — MVP launch)_
10
+ **Started:** YYYY-MM-DD
11
+ **Target close:** YYYY-MM-DD
12
+ **Goal:** _(one sentence)_
13
+
14
+ ## Active phase
15
+
16
+ **Phase:** _(e.g. 04 — Implementation)_
17
+ **Started:** YYYY-MM-DD
18
+ **Acceptance criteria:**
19
+ - [ ] criterion 1
20
+ - [ ] criterion 2
21
+
22
+ ## Active sprint / cycle
23
+
24
+ **Window:** YYYY-MM-DD → YYYY-MM-DD
25
+ **Focus:** _(one sentence)_
26
+ **Stories:**
27
+ - [ ] story id — title
28
+ - [ ] story id — title
29
+
30
+ ## Blockers
31
+
32
+ | Blocker | Owner | Status |
33
+ |---|---|---|
34
+ | | | |
35
+
36
+ ## Recent decisions
37
+
38
+ _(Last 3, link to `project/decisions.md` for full log.)_
39
+
@@ -0,0 +1,25 @@
1
+ # Stakeholders — `{{PROJECT_NAME}}`
2
+
3
+ External contacts with decision authority. Client name, role, comm channel, response cadence, areas they own.
4
+
5
+ > **This file directly addresses the "client late requirements → delays" pain.** When stakeholders' response cadence and ownership areas are documented, work can be sequenced around real human availability instead of optimistic assumptions.
6
+
7
+ ---
8
+
9
+ ## Format
10
+
11
+ ```
12
+ ### Name — Role @ Organisation
13
+
14
+ - **Owns:** what they decide on
15
+ - **Comm:** preferred channel (Slack / email / WhatsApp)
16
+ - **Response cadence:** typical turnaround (e.g. 24h / weekly sync only)
17
+ - **Time zone:** GMT+X
18
+ - **Notes:** quirks, escalation path, who covers when away
19
+ ```
20
+
21
+ ---
22
+
23
+ ## Stakeholders
24
+
25
+ <!-- Add entries here -->
@@ -0,0 +1,35 @@
1
+ # Team — `{{PROJECT_NAME}}`
2
+
3
+ Internal team. Who owns which area, who reviews what, who is on holiday this week.
4
+
5
+ ---
6
+
7
+ ## Format
8
+
9
+ ```
10
+ ### Name — Role
11
+
12
+ - **Owns:** modules / areas
13
+ - **Reviews:** code review responsibilities
14
+ - **Pairs with:** typical collaborators
15
+ - **Time zone:** GMT+X
16
+ - **Notes:**
17
+ ```
18
+
19
+ ---
20
+
21
+ ## Members
22
+
23
+ <!-- Add entries here -->
24
+
25
+ ---
26
+
27
+ ## Coverage
28
+
29
+ | Area | Primary | Backup |
30
+ |---|---|---|
31
+ | Frontend | | |
32
+ | Backend | | |
33
+ | Infra / DevOps | | |
34
+ | QA | | |
35
+ | Design | | |
@@ -0,0 +1,32 @@
1
+ # Decision Log — `{{PROJECT_NAME}}`
2
+
3
+ Append-only. Newest at top. Each entry: date, decision, rationale, alternatives considered, who decided. One paragraph per entry. Heavier decisions get their own ADR file referenced from here.
4
+
5
+ ---
6
+
7
+ ## Format
8
+
9
+ ```
10
+ ### YYYY-MM-DD — Short decision title
11
+
12
+ **Decision:** What we chose.
13
+ **Rationale:** Why this over alternatives.
14
+ **Alternatives considered:** A (rejected because...), B (rejected because...).
15
+ **Who decided:** Person or council.
16
+ **Reversibility:** Easy / hard / one-way door.
17
+ **ADR:** [Optional link to a fuller ADR file]
18
+ ```
19
+
20
+ ---
21
+
22
+ ## Entries
23
+
24
+ <!-- Append new decisions above this line -->
25
+
26
+ ### {{INIT_DATE}} — Memory Bank initialised
27
+
28
+ **Decision:** Adopt rcode Memory Bank for persistent project context.
29
+ **Rationale:** AI agents lose context between sessions; new teammates need a single place to learn the project's history without archaeology through Slack and PRs.
30
+ **Alternatives considered:** CLAUDE.md only (rejected: no structure, goes stale), wiki (rejected: not in-repo, not version-controlled with code), README sections (rejected: doesn't scale).
31
+ **Who decided:** Project lead.
32
+ **Reversibility:** Easy. Just delete `.rihal/memory/` to remove.
@@ -0,0 +1,16 @@
1
+ # Glossary — `{{PROJECT_NAME}}`
2
+
3
+ Domain terms specific to this project: internal names, acronyms, business concepts. Prevents "what does X mean again?" thrash. Add a term any time someone asks about it twice.
4
+
5
+ ---
6
+
7
+ ## Format
8
+
9
+ `**Term**` — definition. _(optional: where it lives in code)_
10
+
11
+ ---
12
+
13
+ ## Terms
14
+
15
+ <!-- Add alphabetically -->
16
+
@@ -0,0 +1,46 @@
1
+ # Stack — `{{PROJECT_NAME}}`
2
+
3
+ Inventory of languages, frameworks, libraries, and services. Refreshed via `/rcode:memory-update` when stack changes.
4
+
5
+ ---
6
+
7
+ ## Runtime
8
+
9
+ | Layer | Choice | Version | Notes |
10
+ |---|---|---|---|
11
+ | Language | _(e.g. TypeScript / Python / Go)_ | | |
12
+ | Framework | _(e.g. Next.js / FastAPI / NestJS)_ | | |
13
+ | Database | _(e.g. Postgres / Mongo / Supabase)_ | | |
14
+ | Cache | _(e.g. Redis / KV)_ | | |
15
+ | Queue / orchestrator | _(e.g. Temporal / SQS / Cron)_ | | |
16
+ | Auth | _(e.g. Keycloak / Firebase / Clerk)_ | | |
17
+ | Observability | _(e.g. Sentry / Datadog / OpenTelemetry)_ | | |
18
+
19
+ ## Frontend (if applicable)
20
+
21
+ | Layer | Choice | Version |
22
+ |---|---|---|
23
+ | UI library | _(e.g. React / Vue / Svelte)_ | |
24
+ | Styling | _(e.g. Tailwind / shadcn / CSS Modules)_ | |
25
+ | State | _(e.g. Zustand / Redux / TanStack Query)_ | |
26
+
27
+ ## Infrastructure
28
+
29
+ | Layer | Choice |
30
+ |---|---|
31
+ | Dev environment | _(e.g. Docker Compose)_ |
32
+ | Production | _(e.g. Vercel / AWS ECS / Helm + K8s)_ |
33
+ | CI/CD | _(e.g. GitHub Actions / GitLab CI / Jenkins)_ |
34
+ | CDN / edge | _(e.g. Vercel / Cloudflare)_ |
35
+
36
+ ## Third-party services
37
+
38
+ | Service | Purpose | Account / region |
39
+ |---|---|---|
40
+ | | | |
41
+
42
+ ---
43
+
44
+ ## Why these choices
45
+
46
+ _Brief rationale for non-obvious picks. Link to `decisions.md` entries for the full story._
@@ -4,7 +4,7 @@
4
4
  Single entry point for every kind of audit. Asks the user *what* to audit
5
5
  and dispatches to the right sub-workflow. Closes #234 — replaces the prior
6
6
  state where users had to know about six separate audit/verify commands by
7
- name (`audit-milestone`, `audit-uat`, `audit-fix`, `karpathy-audit`,
7
+ name (`audit-milestone`, `audit-uat`, `audit-fix`, `code-review --karpathy`,
8
8
  `verify-phase`, `verify-work`).
9
9
 
10
10
  Honours `.rihal/config.yaml`: in `mode: yolo`, the router skips the menu
@@ -21,7 +21,7 @@ If `$ARGUMENTS` contains `--help` or `-h`:
21
21
  /rihal:audit phase [<NN>] # → /rihal:verify-phase
22
22
  /rihal:audit milestone [--strict] # → /rihal:audit-milestone (with synth fallback)
23
23
  /rihal:audit uat # → /rihal:audit-uat
24
- /rihal:audit code [--scope=...] # → /rihal:karpathy-audit
24
+ /rihal:audit code [--scope=...] # → /rihal:code-review --karpathy
25
25
  /rihal:audit fix # → /rihal:audit-fix
26
26
  /rihal:audit work # → /rihal:verify-work
27
27
  ```
@@ -138,7 +138,7 @@ Run the target's slash command, forwarding remaining args:
138
138
  | phase | `/rihal:verify-phase $REST_ARGS` |
139
139
  | milestone | `/rihal:audit-milestone $REST_ARGS` |
140
140
  | uat | `/rihal:audit-uat $REST_ARGS` |
141
- | code | `/rihal:karpathy-audit $REST_ARGS` |
141
+ | code | `/rihal:code-review $REST_ARGS --karpathy` |
142
142
  | fix | `/rihal:audit-fix $REST_ARGS` |
143
143
  | work | `/rihal:verify-work $REST_ARGS` |
144
144