@hanzlaa/rcode 2.7.1 → 2.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzlaa/rcode",
3
- "version": "2.7.1",
3
+ "version": "2.7.2",
4
4
  "description": "Rihal Code (rcode) — installable context-brain for Rihalians. 43 agents, 99 slash commands, 56 skills, pullable Rihal standards. Unified install for Claude Code, Cursor, and Gemini.",
5
5
  "main": "cli/index.js",
6
6
  "bin": {
@@ -28,6 +28,56 @@ fi
28
28
  ```
29
29
  </step>
30
30
 
31
+ <step name="persona_shortcut" priority="first-match">
32
+ **Recognize `@persona CODE` shortcuts as the deterministic API surface.**
33
+
34
+ Every Rihal persona file has a Capabilities table listing 2-3-letter codes (Waleed: ADR/RV/TS/FZ/KS · Hussain-PM: CP/VP/EP/CE/CS/IR/CC · Mariam: MR/ICP/GTM/POS/LP · Fatima: TS/RG/EC/RR/RP/FT · Hanzla: DS/IS/BF/RF/KA/CR · Sadiq: KC/OC/PT/MT/KS · Dalil: SC/MC/RF/TS · Khattat / Munaffidh / Bahith / Muhaqqiq similarly).
35
+
36
+ Match if `$QUESTION` starts with `@<persona> <CODE>` or `@<persona>:<CODE>` — case-insensitive on persona, codes uppercase. Examples:
37
+
38
+ - `@hussain CP` → dispatch to Hussain-PM with capability `CP` (Create PRD via interview)
39
+ - `@waleed ADR` → dispatch to Waleed with capability `ADR` (write an ADR)
40
+ - `@fatima RG` → dispatch to Fatima with capability `RG` (release-gate review)
41
+ - `@dalil SC --topic "Sentry"` → dispatch to Dalil with capability `SC` (lightweight scan, topic phrase passed)
42
+
43
+ **Persona-name aliases** (lowercased, common nicknames):
44
+ | Alias | Resolves to | Agent file |
45
+ |---|---|---|
46
+ | `sadiq`, `strategy`, `director` | Sadiq | rihal-sadiq |
47
+ | `waleed`, `cto`, `architect` | Waleed | rihal-waleed |
48
+ | `hussain`, `hussain-pm`, `pm` | Hussain | rihal-hussain-pm |
49
+ | `mariam`, `marketing` | Mariam | rihal-mariam |
50
+ | `fatima`, `qa` | Fatima | rihal-fatima |
51
+ | `hanzla`, `dev`, `engineer` | Hanzla | rihal-hanzla |
52
+ | `dalil`, `scout`, `mapper` | Dalil | rihal-codebase-mapper |
53
+ | `khattat`, `planner` | Khattat | rihal-planner |
54
+ | `munaffidh`, `executor` | Munaffidh | rihal-executor |
55
+
56
+ **Behavior:**
57
+
58
+ 1. Parse the persona alias and CODE.
59
+ 2. Read the persona's agent file at `.claude/agents/{agent-id}.md` (or `.claude/agents/{agent-id}.local.md` if it exists — local overrides take precedence).
60
+ 3. Look up the CODE in the Capabilities table. If found, the table row's "Skill / workflow" column tells you which sub-command to invoke; pass the rest of `$QUESTION` (after the shortcut) as arguments.
61
+ 4. If the CODE is not in that persona's Capabilities table, print:
62
+ ```
63
+ Persona '{persona}' has no capability '{CODE}'. Available codes:
64
+ {list from the persona's Capabilities table}
65
+ ```
66
+ And stop. Do not fall back to fuzzy intent matching — the user used the deterministic API, honour it.
67
+ 5. Dispatch directly via the routing banner. Skip greenfield_guard / external_data_guard / explicit_intent_check / route — the user already chose the persona AND the action. The persona itself can still refuse internally if its preconditions aren't met.
68
+
69
+ **This is the deterministic API surface.** Power users (and other agents in council follow-ups) can invoke specific capabilities without re-reading triggers or risking fuzzy match. It's the cheapest way to get repeatable behaviour out of the persona system.
70
+
71
+ **Edge cases:**
72
+
73
+ - `@waleed` (no code) → dispatch to Waleed with no capability hint; persona uses its default workflow.
74
+ - `@nobody CP` (unknown persona) → fail loud: list known personas, exit.
75
+ - `CP @hussain` (code first) → reorder; do not match. The `@persona CODE` order is canonical.
76
+ - `@hussain CP fix the auth bug` → dispatch with `CP` and pass `fix the auth bug` as argument context.
77
+
78
+ If this step does NOT fire (no `@` prefix), continue to validate.
79
+ </step>
80
+
31
81
  <step name="validate">
32
82
  **Check for input.**
33
83