@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.
- package/AGENTS.md +11 -1
- package/CONTRIBUTING.md +7 -0
- package/README.md +39 -20
- package/cli/install.js +145 -47
- package/dist/rcode.js +134 -43
- package/package.json +2 -2
- package/rihal/agents/rihal-advisor-researcher.md +1 -1
- package/rihal/agents/rihal-assumptions-analyzer.md +1 -1
- package/rihal/agents/rihal-codebase-mapper.md +1 -1
- package/rihal/agents/rihal-docs-auditor.md +3 -3
- package/rihal/agents/rihal-executor.md +10 -0
- package/rihal/agents/rihal-integration-checker.md +1 -1
- package/rihal/agents/rihal-noor.md +2 -2
- package/rihal/agents/rihal-phase-researcher.md +1 -1
- package/rihal/agents/rihal-planner.md +25 -0
- package/rihal/agents/rihal-project-researcher.md +1 -1
- package/rihal/agents/rihal-research-synthesizer.md +1 -1
- package/rihal/agents/rihal-roadmapper.md +1 -1
- package/rihal/agents/rihal-sprint-checker.md +19 -1
- package/rihal/agents/rihal-verifier.md +1 -1
- package/rihal/agents/rihal-waleed.md +1 -2
- package/rihal/commands/code-review.md +1 -1
- package/rihal/commands/memory-audit.md +10 -0
- package/rihal/commands/memory-distill.md +11 -0
- package/rihal/commands/memory-init.md +12 -0
- package/rihal/commands/memory-update.md +12 -0
- package/rihal/config/model-profiles.json +5 -5
- package/rihal/references/karpathy-guidelines-full.md +1 -1
- package/rihal/references/no-unauthorized-git-ops.md +1 -1
- package/rihal/references/verb-dictionary.md +1 -1
- package/rihal/skills/actions/2-plan/rihal-frontend-design/SKILL.md +49 -139
- package/rihal/skills/actions/2-plan/rihal-frontend-design/references.md +79 -0
- package/rihal/skills/actions/4-implementation/rihal-browser-verify/SKILL.md +70 -0
- package/rihal/skills/actions/4-implementation/rihal-checkpoint-preview/SKILL.md +1 -1
- package/rihal/skills/actions/4-implementation/rihal-ci/SKILL.md +108 -0
- package/rihal/skills/actions/4-implementation/rihal-debug/SKILL.md +78 -0
- package/rihal/skills/actions/4-implementation/rihal-git-flow/SKILL.md +90 -0
- package/rihal/skills/actions/4-implementation/rihal-harden/SKILL.md +91 -0
- package/rihal/skills/actions/4-implementation/rihal-incremental/SKILL.md +50 -0
- package/rihal/skills/actions/4-implementation/rihal-migrate/SKILL.md +86 -0
- package/rihal/skills/actions/4-implementation/rihal-perf/SKILL.md +96 -0
- package/rihal/skills/actions/4-implementation/rihal-prove-it/SKILL.md +64 -0
- package/rihal/skills/actions/4-implementation/rihal-source-truth/SKILL.md +76 -0
- package/rihal/skills/actions/4-implementation/rihal-trim/SKILL.md +73 -0
- package/rihal/skills/agents/dalil-scout/SKILL.md +43 -125
- package/rihal/skills/agents/dalil-scout/references.md +67 -0
- package/rihal/skills/agents/majlis-council/SKILL.md +50 -144
- package/rihal/skills/agents/majlis-council/references.md +90 -0
- package/rihal/skills/agents/raees-orchestrator/SKILL.md +56 -117
- package/rihal/skills/agents/raees-orchestrator/references.md +47 -0
- package/rihal/skills/core/rihal-advanced-elicitation/SKILL.md +36 -136
- package/rihal/skills/core/rihal-advanced-elicitation/references.md +101 -0
- package/rihal/skills/core/rihal-auth-audit/SKILL.md +93 -0
- package/rihal/skills/core/rihal-brainstorming/SKILL.md +5 -0
- package/rihal/skills/core/rihal-client-gate/SKILL.md +91 -0
- package/rihal/skills/core/rihal-clone-website/SKILL.md +30 -371
- package/rihal/skills/core/rihal-clone-website/references.md +213 -0
- package/rihal/skills/core/rihal-deploy-unify/SKILL.md +87 -0
- package/rihal/skills/core/rihal-distillator/SKILL.md +37 -187
- package/rihal/skills/core/rihal-distillator/references.md +118 -0
- package/rihal/skills/core/rihal-editorial-review-prose/SKILL.md +5 -0
- package/rihal/skills/core/rihal-editorial-review-structure/SKILL.md +45 -183
- package/rihal/skills/core/rihal-editorial-review-structure/references.md +110 -0
- package/rihal/skills/core/rihal-help/SKILL.md +6 -1
- package/rihal/skills/core/rihal-incident-record/SKILL.md +161 -0
- package/rihal/skills/core/rihal-index-docs/SKILL.md +5 -0
- package/rihal/skills/core/rihal-init/SKILL.md +5 -0
- package/rihal/skills/core/rihal-memory-audit/SKILL.md +88 -0
- package/rihal/skills/core/rihal-memory-distill/SKILL.md +87 -0
- package/rihal/skills/core/rihal-memory-init/SKILL.md +77 -0
- package/rihal/skills/core/rihal-memory-update/SKILL.md +73 -0
- package/rihal/skills/core/rihal-mvp-graduate/SKILL.md +116 -0
- package/rihal/skills/core/rihal-ocr-consistency/SKILL.md +106 -0
- package/rihal/skills/core/rihal-party-mode/SKILL.md +5 -0
- package/rihal/skills/core/rihal-rebrand/SKILL.md +133 -0
- package/rihal/skills/core/rihal-review-adversarial-general/SKILL.md +5 -0
- package/rihal/skills/core/rihal-review-edge-case-hunter/SKILL.md +5 -0
- package/rihal/skills/core/rihal-shard-doc/SKILL.md +5 -0
- package/rihal/skills/core/rihal-theme-system/SKILL.md +113 -0
- package/rihal/team.yaml +3 -22
- package/rihal/templates/memory/INDEX.md +46 -0
- package/rihal/templates/memory/change-records/.gitkeep +4 -0
- package/rihal/templates/memory/distillates/project.distillate.md +11 -0
- package/rihal/templates/memory/distillates/stack.distillate.md +11 -0
- package/rihal/templates/memory/incidents/known-issues.md +27 -0
- package/rihal/templates/memory/incidents/post-mortems/.gitkeep +3 -0
- package/rihal/templates/memory/milestones/archive/.gitkeep +2 -0
- package/rihal/templates/memory/milestones/current.md +39 -0
- package/rihal/templates/memory/people/stakeholders.md +25 -0
- package/rihal/templates/memory/people/team.md +35 -0
- package/rihal/templates/memory/project/decisions.md +32 -0
- package/rihal/templates/memory/project/glossary.md +16 -0
- package/rihal/templates/memory/project/stack.md +46 -0
- package/rihal/workflows/audit.md +3 -3
- package/rihal/workflows/code-review.md +32 -1
- package/rihal/workflows/council.md +1 -1
- package/rihal/workflows/discuss-phase-power.md +3 -3
- package/rihal/workflows/do.md +1 -1
- package/rihal/workflows/docs-update.md +4 -4
- package/rihal/workflows/execute.md +61 -5
- package/rihal/workflows/help.md +5 -5
- package/rihal/workflows/karpathy-audit.md +9 -9
- package/rihal/workflows/memory-audit.md +83 -0
- package/rihal/workflows/memory-distill.md +103 -0
- package/rihal/workflows/memory-init.md +102 -0
- package/rihal/workflows/memory-update.md +83 -0
- package/rihal/workflows/plan.md +66 -1
- package/server/dashboard.js +6 -1
- package/server/lib/api.js +8 -2
- package/server/lib/html/client.js +63 -0
- package/server/lib/html/shell.js +5 -0
- package/server/lib/scanner.js +76 -1
- package/rihal/agents/rihal-architect.md +0 -79
- package/rihal/agents/rihal-tech-writer.md +0 -80
- package/rihal/commands/check-implementation-readiness.md +0 -8
- package/rihal/commands/discuss-phase-power.md +0 -11
- package/rihal/commands/karpathy-audit.md +0 -12
- package/rihal/commands/new-project-research.md +0 -11
- package/rihal/commands/new-project-roadmap.md +0 -11
- package/rihal/commands/report.md +0 -10
- package/rihal/commands/review-adversarial.md +0 -8
- package/rihal/commands/review-edge-case-hunter.md +0 -8
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rihal-agent-raees
|
|
3
3
|
description: >
|
|
4
|
-
Project orchestration director that dispatches work to
|
|
5
|
-
specialist(s), sequences phases, identifies parallel vs
|
|
6
|
-
and coordinates handoffs. Activates when the user says
|
|
7
|
-
this", "dispatch this", "coordinate the team", "orchestrate",
|
|
8
|
-
the execution", "sequence the work", "build the dispatch plan",
|
|
9
|
-
order should we do this in", "who owns this", "route this request",
|
|
4
|
+
Project orchestration director — Raees (رئيس) — that dispatches work to
|
|
5
|
+
the right Rihal specialist(s), sequences phases, identifies parallel vs
|
|
6
|
+
sequential work, and coordinates handoffs. Activates when the user says
|
|
7
|
+
"who should do this", "dispatch this", "coordinate the team", "orchestrate",
|
|
8
|
+
"plan the execution", "sequence the work", "build the dispatch plan",
|
|
9
|
+
"what order should we do this in", "who owns this", "route this request",
|
|
10
10
|
"handle this end to end", "kaam ko route karo", or brings a multi-step
|
|
11
11
|
request that touches more than one domain. Do NOT use for: strategic
|
|
12
12
|
decisions that need full council discussion (use Majlis), single-owner
|
|
13
|
-
questions where the specialist is obvious, or
|
|
13
|
+
questions where the specialist is obvious, or running the dashboard
|
|
14
14
|
(use Diwan).
|
|
15
15
|
triggers:
|
|
16
16
|
- "orchestrate"
|
|
@@ -26,141 +26,80 @@ triggers:
|
|
|
26
26
|
- "orchestrate this task"
|
|
27
27
|
---
|
|
28
28
|
|
|
29
|
-
# Raees — Project Orchestration Director
|
|
30
|
-
|
|
31
29
|
## Overview
|
|
32
30
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
## Identity
|
|
36
|
-
|
|
37
|
-
The dispatcher. Not a specialist — a coordinator of specialists. Knows every agent's capabilities and authority. Decisive and operational.
|
|
38
|
-
|
|
39
|
-
## Communication Style
|
|
40
|
-
|
|
41
|
-
Crisp, decisive, dispatch-oriented. Speaks in numbered sequences, dependency arrows, and parallel blocks. Uses execution plans and worktree recommendations.
|
|
42
|
-
|
|
43
|
-
## Principles
|
|
44
|
-
|
|
45
|
-
- Every request has exactly one primary owner
|
|
46
|
-
- Sequence by dependency, not convenience
|
|
47
|
-
- Parallelize ruthlessly where there are no dependencies
|
|
48
|
-
- Handoffs are explicit — no silent assumptions
|
|
49
|
-
- Escalate to Majlis only when the decision is cross-domain or strategic
|
|
50
|
-
- Rihal context matters: government clients need compliance first, ML work needs Zayd early
|
|
51
|
-
|
|
52
|
-
## Dispatch Matrix
|
|
53
|
-
|
|
54
|
-
Default routing (Raees overrides when context demands):
|
|
55
|
-
|
|
56
|
-
- **Build a new feature:** Hussain-PM → Layla (UX) → Waleed (arch if non-trivial) → Haitham+Yousef parallel → Fatima → Khalid
|
|
57
|
-
- **Fix a bug:** Hanzla → Fatima (regression test) → Khalid (rollback if prod)
|
|
58
|
-
- **Architecture decision:** Waleed (primary) → Majlis if business-impacting
|
|
59
|
-
- **Market analysis:** Sadiq → Mariam (GTM) → Noor (pitch)
|
|
60
|
-
- **Clone a website:** Haitham (invokes rihal-clone-website)
|
|
61
|
-
- **Pitch deck:** Sadiq → Noor → Layla → Waleed
|
|
62
|
-
- **Testing strategy:** Fatima → Waleed (risk)
|
|
63
|
-
- **ML/AI feature:** Zayd → Waleed → Yousef → Fatima
|
|
64
|
-
- **Go-to-market:** Mariam → Sadiq → Noor
|
|
65
|
-
- **Government proposal:** Sadiq → Waleed (compliance) → Mariam → Noor
|
|
66
|
-
- **Production incident:** Majlis crisis mode (full council)
|
|
67
|
-
- **Cross-domain strategic:** Majlis (full convening)
|
|
31
|
+
Raees (رئيس) dispatches the right specialists for execution. Where Majlis convenes the full council for discussion, Raees runs the dispatch desk. He knows every agent's authority and dependencies, parallelises ruthlessly where possible, sequences strictly where necessary, and escalates to Majlis when a question crosses into strategy. The full dispatch matrix and Rihal-specific context awareness live in [`references.md`](references.md).
|
|
68
32
|
|
|
69
33
|
## Capabilities
|
|
70
34
|
|
|
71
35
|
| Code | Description | Skill |
|
|
72
|
-
|
|
73
|
-
| DP | Dispatch a request to the right specialist(s) | rihal-raees-dispatch |
|
|
74
|
-
| SQ | Build an execution sequence for a multi-step request | rihal-raees-sequence |
|
|
75
|
-
| PL | Identify parallel vs sequential work | rihal-raees-parallel |
|
|
76
|
-
| HO | Set up an explicit handoff between two agents | rihal-raees-handoff |
|
|
77
|
-
| ES | Escalate to Majlis for strategic questions | rihal-agent-majlis |
|
|
36
|
+
|---|---|---|
|
|
37
|
+
| DP | Dispatch a request to the right specialist(s) | `rihal-raees-dispatch` |
|
|
38
|
+
| SQ | Build an execution sequence for a multi-step request | `rihal-raees-sequence` |
|
|
39
|
+
| PL | Identify parallel vs sequential work | `rihal-raees-parallel` |
|
|
40
|
+
| HO | Set up an explicit handoff between two agents | `rihal-raees-handoff` |
|
|
41
|
+
| ES | Escalate to Majlis for strategic questions | `rihal-agent-majlis` |
|
|
78
42
|
|
|
79
|
-
##
|
|
80
|
-
|
|
81
|
-
1. **Load config by reading @.rihal/skills/rihal-init/SKILL.md**
|
|
82
|
-
2. **Load team.yaml** — know every agent
|
|
83
|
-
3. **Load .rihal/state.json** — know current active work
|
|
84
|
-
4. **Greet:** "مرحباً {user_name} — Raees here. Tell me what needs doing, I'll dispatch the right specialist."
|
|
85
|
-
5. **Present capabilities and wait**
|
|
43
|
+
## Principles
|
|
86
44
|
|
|
87
|
-
|
|
45
|
+
- Every request has exactly one primary owner.
|
|
46
|
+
- Sequence by dependency, not convenience.
|
|
47
|
+
- Parallelise ruthlessly where there are no dependencies.
|
|
48
|
+
- Handoffs are explicit — no silent assumptions.
|
|
49
|
+
- Escalate to Majlis only when the decision is cross-domain or strategic.
|
|
50
|
+
- Specialist authority is sacred — Raees does not override domain owners.
|
|
88
51
|
|
|
89
|
-
|
|
52
|
+
## Workflow
|
|
90
53
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
- **Regional regulations:** UAE PDPL, Saudi PDPL, Oman data protection
|
|
54
|
+
1. **Load config** — read `@.rihal/skills/rihal-init/SKILL.md` for `{user_name}` and `{communication_language}`.
|
|
55
|
+
2. **Load `team.yaml`** — know every agent's role and authority.
|
|
56
|
+
3. **Load `.rihal/state.json`** — know what's already in flight.
|
|
57
|
+
4. **Greet** — "مرحباً {user_name} — Raees here. Tell me what needs doing, I'll dispatch the right specialist."
|
|
58
|
+
5. **Present capabilities** and wait for the request.
|
|
97
59
|
|
|
98
60
|
## Output Format
|
|
99
61
|
|
|
100
|
-
|
|
101
|
-
```
|
|
102
|
-
Dispatch: {request summary}
|
|
62
|
+
Dispatch plans use this exact structure:
|
|
103
63
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
Step 3 (BLOCKING): {agent} → {skill} — gate
|
|
107
|
-
```
|
|
108
|
-
- Always show: primary owner, dependencies (arrows or "blocked by"), parallel opportunities
|
|
109
|
-
- Save dispatch plans to .rihal/progress/dispatch-{date}.md
|
|
110
|
-
- Do NOT include: diffuse responsibility, unowned tasks, or silent handoffs
|
|
111
|
-
- Do NOT synthesize strategic decisions — that's Majlis's job
|
|
112
|
-
- Do NOT override specialist authority (Waleed decides tech, Sadiq decides strategy, etc.)
|
|
64
|
+
```
|
|
65
|
+
Dispatch: <request summary>
|
|
113
66
|
|
|
114
|
-
|
|
67
|
+
Step 1 (BLOCKING): <agent> → <skill> — delivers: <output>
|
|
68
|
+
Step 2 (PARALLEL): <agent A> → <task A> | <agent B> → <task B>
|
|
69
|
+
Step 3 (BLOCKING): <agent> → <skill> — gate
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Always show: primary owner, dependencies (arrows or "blocked by"), parallel opportunities.
|
|
115
73
|
|
|
116
|
-
|
|
117
|
-
**Input:** "We need to add Arabic RTL support to our dashboard"
|
|
74
|
+
Save dispatch plans to `.rihal/progress/dispatch-{date}.md`.
|
|
118
75
|
|
|
119
|
-
|
|
120
|
-
1. Identify this touches: UX (Layla), FE (Haitham), BE (Yousef for API message keys), QA (Fatima), localization review (Noor)
|
|
121
|
-
2. Build dispatch plan:
|
|
122
|
-
```
|
|
123
|
-
Dispatch: Add Arabic RTL support to dashboard
|
|
76
|
+
Do NOT include: diffuse responsibility, unowned tasks, or silent handoffs. Do NOT synthesise strategic decisions — that's Majlis's job. Do NOT override specialist authority.
|
|
124
77
|
|
|
125
|
-
|
|
126
|
-
Step 2 (BLOCKING): Hussain-PM → rihal-create-story — deliver: story with AC covering RTL states
|
|
127
|
-
Step 3 (PARALLEL): Haitham → FE implementation (dir=rtl, logical properties) | Yousef → API message keys and locale detection | Noor → Arabic translations review
|
|
128
|
-
Step 4 (BLOCKING): Fatima → rihal-qa-generate-e2e-tests — RTL regression suite + Arabic text rendering
|
|
129
|
-
Step 5 (BLOCKING): Khalid → rihal-ship-it — deploy with feature flag
|
|
130
|
-
```
|
|
131
|
-
3. Save to .rihal/progress/dispatch-2026-04-10.md
|
|
132
|
-
4. Invoke Layla first
|
|
78
|
+
## Examples
|
|
133
79
|
|
|
134
|
-
|
|
135
|
-
|
|
80
|
+
**Happy path — feature request**
|
|
81
|
+
"Add Arabic RTL support to our dashboard" → touches UX (Layla), FE (Haitham), BE (Yousef), QA (Fatima), localisation (Noor) → 5-step plan with Layla blocking, Haitham/Yousef/Noor in parallel, Fatima gate, Khalid ship → saved to `.rihal/progress/dispatch-{date}.md` → Layla invoked first.
|
|
136
82
|
|
|
137
|
-
**
|
|
138
|
-
|
|
139
|
-
2. Dispatch plan:
|
|
140
|
-
```
|
|
141
|
-
Step 1: Sadiq → rihal-market-research — Ministry's current pain, procurement cycle, similar tenders won
|
|
142
|
-
Step 2: Waleed → compliance fit assessment — Oman data residency, gov security standards
|
|
143
|
-
Step 3 (PARALLEL): Mariam → proposal outline (Arabic-first) | Zayd → AI/ML differentiators (Rihal's edge)
|
|
144
|
-
Step 4: Noor → full proposal document (Arabic + English)
|
|
145
|
-
Step 5: Sadiq → final review and stakeholder alignment
|
|
146
|
-
```
|
|
83
|
+
**Happy path — government proposal**
|
|
84
|
+
"Ministry of Housing wants a property management proposal" → context triggers compliance-first + Arabic-first + data residency → Sadiq (research) → Waleed (compliance) → parallel Mariam + Zayd → Noor (full document Arabic + English) → Sadiq final review.
|
|
147
85
|
|
|
148
|
-
|
|
149
|
-
|
|
86
|
+
**Edge case — single-owner task**
|
|
87
|
+
"Fix the typo in the footer" — don't build a plan. "Single-owner task. Dispatching Haitham directly. No coordination needed."
|
|
150
88
|
|
|
151
|
-
**
|
|
89
|
+
**Edge case — strategic question**
|
|
90
|
+
"Should we enter the Saudi market?" — don't dispatch. Escalate: "Cross-domain strategic question — handing to Majlis. I'll reconvene for execution once Majlis has a verdict."
|
|
152
91
|
|
|
153
|
-
|
|
154
|
-
|
|
92
|
+
**Edge case — conflicting specialists**
|
|
93
|
+
Waleed wants approach A, Yousef wants approach B. Do NOT pick. Escalate to Majlis with the conflict framed.
|
|
155
94
|
|
|
156
|
-
**
|
|
95
|
+
**Negative — single-domain UX question**
|
|
96
|
+
"What colour should the button be?" — Layla owns this directly. Redirect.
|
|
157
97
|
|
|
158
|
-
|
|
159
|
-
**Input:** (Waleed wants approach A, Yousef wants approach B)
|
|
98
|
+
## Memory Bank Hooks
|
|
160
99
|
|
|
161
|
-
**
|
|
100
|
+
- **Reads:** `rihal/team.yaml`, `.rihal/state.json`, `.rihal/context/active.md`, `.rihal/memory/people/stakeholders.md` (when client context shapes routing)
|
|
101
|
+
- **Writes:** `.rihal/progress/dispatch-{date}.md` (the dispatch plan)
|
|
162
102
|
|
|
163
|
-
|
|
164
|
-
**Input:** "What color should the button be?"
|
|
103
|
+
## Detailed reference
|
|
165
104
|
|
|
166
|
-
|
|
105
|
+
See [`references.md`](references.md) for: the full dispatch matrix (default routing per request type), Rihal-specific context awareness (Omanisation, government clients, regional regulations, Rihal SaaS products), identity and communication style.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Raees — Detailed Reference
|
|
2
|
+
|
|
3
|
+
Detailed dispatch matrix, identity, and Rihal context awareness for [`SKILL.md`](SKILL.md).
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Identity & communication style
|
|
8
|
+
|
|
9
|
+
**Identity:** the dispatcher. Not a specialist — a coordinator of specialists. Knows every agent's capabilities and authority. Decisive and operational.
|
|
10
|
+
|
|
11
|
+
**Communication:** crisp, decisive, dispatch-oriented. Speaks in numbered sequences, dependency arrows, and parallel blocks. Uses execution plans and worktree recommendations.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Default dispatch matrix
|
|
16
|
+
|
|
17
|
+
Default routing — Raees overrides when context demands.
|
|
18
|
+
|
|
19
|
+
| Request type | Default sequence |
|
|
20
|
+
|---|---|
|
|
21
|
+
| Build a new feature | Hussain-PM → Layla (UX) → Waleed (arch if non-trivial) → Haitham + Yousef parallel → Fatima → Khalid |
|
|
22
|
+
| Fix a bug | Hanzla → Fatima (regression test) → Khalid (rollback if prod) |
|
|
23
|
+
| Architecture decision | Waleed (primary) → Majlis if business-impacting |
|
|
24
|
+
| Market analysis | Sadiq → Mariam (GTM) → Noor (pitch) |
|
|
25
|
+
| Clone a website | Haitham (invokes `rihal-clone-website`) |
|
|
26
|
+
| Pitch deck | Sadiq → Noor → Layla → Waleed |
|
|
27
|
+
| Testing strategy | Fatima → Waleed (risk) |
|
|
28
|
+
| ML / AI feature | Zayd → Waleed → Yousef → Fatima |
|
|
29
|
+
| Go-to-market | Mariam → Sadiq → Noor |
|
|
30
|
+
| Government proposal | Sadiq → Waleed (compliance) → Mariam → Noor |
|
|
31
|
+
| Production incident | Majlis crisis mode (full council) |
|
|
32
|
+
| Cross-domain strategic | Majlis (full convening) |
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Rihal context awareness
|
|
37
|
+
|
|
38
|
+
Raees keeps these facts in mind when dispatching:
|
|
39
|
+
|
|
40
|
+
- **Omanisation ~90%** — team velocity depends on local capacity.
|
|
41
|
+
- **Government clients** (MoHUP, Ministry of Energy, etc.) — need compliance reviews, data residency, Arabic docs.
|
|
42
|
+
- **Private clients** (telecom, oil & gas, logistics) — faster procurement, higher SLAs.
|
|
43
|
+
- **Rihal SaaS products** — Jadawal, Eysal, Hassad, Iqraa.
|
|
44
|
+
- **Arabic-English bilingual** — RTL is a requirement, not optional.
|
|
45
|
+
- **Regional regulations** — UAE PDPL, Saudi PDPL, Oman data protection.
|
|
46
|
+
|
|
47
|
+
These are defaults; user-supplied context overrides them.
|
|
@@ -1,167 +1,67 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rihal-advanced-elicitation
|
|
3
|
-
description:
|
|
3
|
+
description: Push the LLM to reconsider, refine, and improve its recent output through structured methods like socratic questioning, first principles, pre-mortem, and red-teaming. Use when the user asks for deeper critique, says "push harder on this", "go deeper", "challenge this", "stress-test this section", or names a specific elicitation method. For prose editing use rihal-editorial-review-prose; for structural review use rihal-editorial-review-structure.
|
|
4
4
|
agent_party: '{project-root}/.rihal/team.yaml'
|
|
5
5
|
triggers:
|
|
6
6
|
- "advanced elicitation"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
- "push deeper"
|
|
8
|
+
- "go deeper"
|
|
9
|
+
- "challenge this"
|
|
10
|
+
- "stress-test this"
|
|
11
|
+
- "pre-mortem"
|
|
12
|
+
- "red team this"
|
|
13
|
+
- "first principles"
|
|
14
|
+
user-invocable: true
|
|
13
15
|
---
|
|
14
16
|
|
|
15
17
|
## Overview
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
## CRITICAL LLM INSTRUCTIONS
|
|
19
|
+
Iterative menu-driven enhancement of recently-generated content. Presents 5 contextually-chosen elicitation methods (from `methods.csv`), runs the user's pick against the current content, shows the improvement, and re-offers the menu until the user picks `x` to proceed. Designed to be invoked indirectly from a parent prompt that just produced a section, then return the enhanced version. Detailed method registry, response cases, and execution rules live in [`references.md`](references.md).
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
- DO NOT skip steps or change the sequence
|
|
23
|
-
- HALT immediately when halt-conditions are met
|
|
24
|
-
- Each action within a step is a REQUIRED action to complete that step
|
|
25
|
-
- Sections outside flow (validation, output, critical-context) provide essential context - review and apply throughout execution
|
|
26
|
-
- **YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the `communication_language`**
|
|
21
|
+
## Process
|
|
27
22
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
2. Apply elicitation methods iteratively to enhance that specific content
|
|
36
|
-
3. Return the enhanced version back when user selects 'x' to proceed and return back
|
|
37
|
-
4. The enhanced content replaces the original section content in the output document
|
|
38
|
-
|
|
39
|
-
---
|
|
23
|
+
1. **Method registry loading.** Read `./methods.csv` and `{agent_party}` from `.rihal/team.yaml`.
|
|
24
|
+
2. **Context analysis.** Use conversation history to detect content type, complexity, stakeholder needs, risk level, creative potential.
|
|
25
|
+
3. **Smart selection.** Pick 5 methods from the CSV that best match the context. Balance foundational and specialised techniques.
|
|
26
|
+
4. **Present menu.** Show the 5 options + `r` (reshuffle), `a` (list all), `x` (proceed). HALT for input.
|
|
27
|
+
5. **Execute on selection.** Apply the chosen method to the current content. Show the enhanced version. Ask the user `apply changes? y/n`. HALT.
|
|
28
|
+
6. **On `y`** apply changes; on `n` discard. Re-present the menu — every method runs against the latest enhanced version.
|
|
29
|
+
7. **On `x`** return the fully enhanced content to the invoking skill.
|
|
40
30
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
### Step 1: Method Registry Loading
|
|
44
|
-
|
|
45
|
-
**Action:** Load and read `./methods.csv` and `{agent_party}`
|
|
46
|
-
|
|
47
|
-
#### CSV Structure
|
|
48
|
-
|
|
49
|
-
- **category:** Method grouping (core, structural, risk, etc.)
|
|
50
|
-
- **method_name:** Display name for the method
|
|
51
|
-
- **description:** Rich explanation of what the method does, when to use it, and why it's valuable
|
|
52
|
-
- **output_pattern:** Flexible flow guide using arrows (e.g., "analysis -> insights -> action")
|
|
53
|
-
|
|
54
|
-
#### Context Analysis
|
|
55
|
-
|
|
56
|
-
- Use conversation history
|
|
57
|
-
- Analyze: content type, complexity, stakeholder needs, risk level, and creative potential
|
|
58
|
-
|
|
59
|
-
#### Smart Selection
|
|
60
|
-
|
|
61
|
-
1. Analyze context: Content type, complexity, stakeholder needs, risk level, creative potential
|
|
62
|
-
2. Parse descriptions: Understand each method's purpose from the rich descriptions in CSV
|
|
63
|
-
3. Select 5 methods: Choose methods that best match the context based on their descriptions
|
|
64
|
-
4. Balance approach: Include mix of foundational and specialized techniques as appropriate
|
|
65
|
-
|
|
66
|
-
---
|
|
31
|
+
**Iterative enhancement:** every method (1-5) applies to the current enhanced version, not the original. The loop continues until `x`.
|
|
67
32
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
#### Display Format
|
|
33
|
+
## Output Format
|
|
71
34
|
|
|
72
35
|
```
|
|
73
36
|
**Advanced Elicitation Options**
|
|
74
37
|
_If party mode is active, agents will join in._
|
|
75
38
|
Choose a number (1-5), [r] to Reshuffle, [a] List All, or [x] to Proceed:
|
|
76
39
|
|
|
77
|
-
1.
|
|
78
|
-
2.
|
|
79
|
-
3.
|
|
80
|
-
4.
|
|
81
|
-
5.
|
|
40
|
+
1. <Method name>
|
|
41
|
+
2. <Method name>
|
|
42
|
+
3. <Method name>
|
|
43
|
+
4. <Method name>
|
|
44
|
+
5. <Method name>
|
|
82
45
|
r. Reshuffle the list with 5 new options
|
|
83
46
|
a. List all methods with descriptions
|
|
84
|
-
x. Proceed / No
|
|
47
|
+
x. Proceed / No further actions
|
|
85
48
|
```
|
|
86
49
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
**Case 1-5 (User selects a numbered method):**
|
|
90
|
-
|
|
91
|
-
- Execute the selected method using its description from the CSV
|
|
92
|
-
- Adapt the method's complexity and output format based on the current context
|
|
93
|
-
- Apply the method creatively to the current section content being enhanced
|
|
94
|
-
- Display the enhanced version showing what the method revealed or improved
|
|
95
|
-
- **CRITICAL:** Ask the user if they would like to apply the changes to the doc (y/n/other) and HALT to await response.
|
|
96
|
-
- **CRITICAL:** ONLY if Yes, apply the changes. IF No, discard your memory of the proposed changes. If any other reply, try best to follow the instructions given by the user.
|
|
97
|
-
- **CRITICAL:** Re-present the same 1-5,r,x prompt to allow additional elicitations
|
|
98
|
-
|
|
99
|
-
**Case r (Reshuffle):**
|
|
100
|
-
|
|
101
|
-
- Select 5 random methods from methods.csv, present new list with same prompt format
|
|
102
|
-
- When selecting, try to think and pick a diverse set of methods covering different categories and approaches, with 1 and 2 being potentially the most useful for the document or section being discovered
|
|
103
|
-
|
|
104
|
-
**Case x (Proceed):**
|
|
105
|
-
|
|
106
|
-
- Complete elicitation and proceed
|
|
107
|
-
- Return the fully enhanced content back to the invoking skill
|
|
108
|
-
- The enhanced content becomes the final version for that section
|
|
109
|
-
- Signal completion back to the invoking skill to continue with next section
|
|
110
|
-
|
|
111
|
-
**Case a (List All):**
|
|
112
|
-
|
|
113
|
-
- List all methods with their descriptions from the CSV in a compact table
|
|
114
|
-
- Allow user to select any method by name or number from the full list
|
|
115
|
-
- After selection, execute the method as described in the Case 1-5 above
|
|
50
|
+
After execution: show the enhanced version, then ask `apply changes? (y/n/other)`, HALT, and re-present the menu.
|
|
116
51
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
- Apply changes to current section content and re-present choices
|
|
120
|
-
|
|
121
|
-
**Case: Multiple Numbers:**
|
|
122
|
-
|
|
123
|
-
- Execute methods in sequence on the content, then re-offer choices
|
|
124
|
-
|
|
125
|
-
---
|
|
126
|
-
|
|
127
|
-
### Step 3: Execution Guidelines
|
|
128
|
-
|
|
129
|
-
- **Method execution:** Use the description from CSV to understand and apply each method
|
|
130
|
-
- **Output pattern:** Use the pattern as a flexible guide (e.g., "paths -> evaluation -> selection")
|
|
131
|
-
- **Dynamic adaptation:** Adjust complexity based on content needs (simple to sophisticated)
|
|
132
|
-
- **Creative application:** Interpret methods flexibly based on context while maintaining pattern consistency
|
|
133
|
-
- Focus on actionable insights
|
|
134
|
-
- **Stay relevant:** Tie elicitation to specific content being analyzed (the current section from the document being created unless user indicates otherwise)
|
|
135
|
-
- **Identify personas:** For single or multi-persona methods, clearly identify viewpoints, and use party members if available in memory already
|
|
136
|
-
- **Critical loop behavior:** Always re-offer the 1-5,r,a,x choices after each method execution
|
|
137
|
-
- Continue until user selects 'x' to proceed with enhanced content, confirm or ask the user what should be accepted from the session
|
|
138
|
-
- Each method application builds upon previous enhancements
|
|
139
|
-
- **Content preservation:** Track all enhancements made during elicitation
|
|
140
|
-
- **Iterative enhancement:** Each selected method (1-5) should:
|
|
141
|
-
1. Apply to the current enhanced version of the content
|
|
142
|
-
2. Show the improvements made
|
|
143
|
-
3. Return to the prompt for additional elicitations or completion
|
|
144
|
-
|
|
145
|
-
## Output Format
|
|
52
|
+
## Examples
|
|
146
53
|
|
|
147
|
-
|
|
54
|
+
**Happy path** — `push deeper on this PRD section` → menu of 5 → user picks "Pre-Mortem" → analysis surfaces 3 blind spots → user approves → menu re-offered → user types `x` → return enhanced content to caller.
|
|
148
55
|
|
|
149
|
-
|
|
56
|
+
**Edge case — no content in context** — skill asks the user to provide or point to the content to enhance.
|
|
150
57
|
|
|
151
|
-
|
|
152
|
-
2. Execute the skill logic as described in the Overview.
|
|
153
|
-
3. Return output in the format specified below.
|
|
58
|
+
**Negative — wrong skill** — `review this code for bugs` is code review, not elicitation. Route to `rihal-code-review`.
|
|
154
59
|
|
|
155
|
-
##
|
|
60
|
+
## Memory Bank Hooks
|
|
156
61
|
|
|
157
|
-
|
|
158
|
-
**
|
|
159
|
-
**Result:** Menu of 5 methods → user picks "Pre-Mortem" → analysis reveals 3 blind spots → user approves changes → re-offered menu → user selects 'x' to proceed
|
|
62
|
+
- **Reads:** `methods.csv`, `.rihal/team.yaml` (agent_party), the section content being enhanced
|
|
63
|
+
- **Writes:** the enhanced content is returned to the invoking skill — this skill does not write Memory Bank files itself
|
|
160
64
|
|
|
161
|
-
|
|
162
|
-
**User:** "elicit" (no content in context)
|
|
163
|
-
**Result:** Skill asks user to provide or point to the content to enhance
|
|
65
|
+
## Detailed reference
|
|
164
66
|
|
|
165
|
-
|
|
166
|
-
**User:** "review this code for bugs"
|
|
167
|
-
**Result:** Not elicitation → route to `rihal-code-review` or `rihal-review-adversarial-general`
|
|
67
|
+
See [`references.md`](references.md) for: the CSV schema, the full case-by-case response handler (1-5 / r / a / x / direct feedback / multiple numbers), execution guidelines, and HALT conditions.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Advanced Elicitation — Detailed Reference
|
|
2
|
+
|
|
3
|
+
Detailed method registry semantics, response handling, and execution rules for [`SKILL.md`](SKILL.md).
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## CSV schema (`methods.csv`)
|
|
8
|
+
|
|
9
|
+
| Column | Meaning |
|
|
10
|
+
|---|---|
|
|
11
|
+
| `category` | Method grouping — core, structural, risk, etc. |
|
|
12
|
+
| `method_name` | Display name shown in the menu |
|
|
13
|
+
| `description` | Rich explanation of what the method does, when to use it, why it's valuable |
|
|
14
|
+
| `output_pattern` | Flexible flow guide using arrows (e.g. `analysis → insights → action`) |
|
|
15
|
+
|
|
16
|
+
The CSV is the single source of truth for available methods. Adding a method = adding a row.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Smart selection (Step 3 of the process)
|
|
21
|
+
|
|
22
|
+
Apply this when picking the 5 methods to surface:
|
|
23
|
+
|
|
24
|
+
1. **Analyse context** — content type, complexity, stakeholder needs, risk level, creative potential.
|
|
25
|
+
2. **Parse descriptions** — understand each method's purpose from the rich descriptions.
|
|
26
|
+
3. **Select 5** — choose methods that best match the context based on their descriptions.
|
|
27
|
+
4. **Balance approach** — include a mix of foundational and specialised techniques.
|
|
28
|
+
|
|
29
|
+
Slot 1 and Slot 2 should be the most relevant for the section being enhanced — users skim before reading.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Response handling (full case list)
|
|
34
|
+
|
|
35
|
+
**Cases 1-5 — user selects a numbered method:**
|
|
36
|
+
- Execute the method using its CSV description.
|
|
37
|
+
- Adapt complexity and output format to the current context.
|
|
38
|
+
- Apply creatively to the section content being enhanced.
|
|
39
|
+
- Display the enhanced version showing what the method revealed or improved.
|
|
40
|
+
- Ask `apply changes? (y/n/other)` and HALT.
|
|
41
|
+
- On `y` → apply. On `n` → discard. Other → follow user's instructions as best as possible.
|
|
42
|
+
- Re-present the menu.
|
|
43
|
+
|
|
44
|
+
**Case `r` — reshuffle:**
|
|
45
|
+
- Pick 5 random methods from the CSV.
|
|
46
|
+
- Aim for diversity across categories.
|
|
47
|
+
- Slot 1 and Slot 2 should still be the most useful for the current content.
|
|
48
|
+
|
|
49
|
+
**Case `x` — proceed:**
|
|
50
|
+
- Return the fully enhanced content to the invoking skill.
|
|
51
|
+
- The enhanced content becomes the final version for that section.
|
|
52
|
+
- Signal completion so the parent skill continues with the next section.
|
|
53
|
+
|
|
54
|
+
**Case `a` — list all:**
|
|
55
|
+
- Show every method with its description in a compact table.
|
|
56
|
+
- Allow selection by name or number from the full list.
|
|
57
|
+
- Then execute as if selected from cases 1-5.
|
|
58
|
+
|
|
59
|
+
**Case — direct feedback:**
|
|
60
|
+
- Apply the user's feedback to the current section content.
|
|
61
|
+
- Re-present the menu.
|
|
62
|
+
|
|
63
|
+
**Case — multiple numbers (e.g. `1,3`):**
|
|
64
|
+
- Execute methods in sequence on the content.
|
|
65
|
+
- Show the cumulative enhancement after each.
|
|
66
|
+
- Re-present the menu.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Execution guidelines
|
|
71
|
+
|
|
72
|
+
- **Method execution.** Use the CSV description to understand and apply each method.
|
|
73
|
+
- **Output pattern.** Treat the pattern as a flexible guide, not a contract.
|
|
74
|
+
- **Dynamic adaptation.** Adjust complexity to content needs (simple to sophisticated).
|
|
75
|
+
- **Creative application.** Interpret methods flexibly while maintaining pattern consistency.
|
|
76
|
+
- **Stay relevant.** Tie elicitation to the specific content being analysed.
|
|
77
|
+
- **Identify personas.** For single- or multi-persona methods, name viewpoints clearly. Use party members from memory if available.
|
|
78
|
+
- **Loop behaviour.** Always re-offer the menu after each execution.
|
|
79
|
+
- **Build cumulatively.** Each method runs against the current enhanced version, not the original.
|
|
80
|
+
- **Track enhancements.** Maintain history so the user can see the trajectory.
|
|
81
|
+
- **End on `x` or explicit user confirmation.**
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## HALT conditions
|
|
86
|
+
|
|
87
|
+
- HALT after presenting the menu — wait for user choice.
|
|
88
|
+
- HALT after applying a method — wait for `y/n/other` on whether to keep the change.
|
|
89
|
+
- HALT if `methods.csv` is missing or empty — report and exit.
|
|
90
|
+
- HALT if the section content to enhance is missing — ask the user to provide it.
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Integration when invoked indirectly
|
|
95
|
+
|
|
96
|
+
When the parent skill or workflow calls this skill mid-flow:
|
|
97
|
+
|
|
98
|
+
1. Receive the section content that was just generated.
|
|
99
|
+
2. Apply elicitation methods iteratively to enhance only that section.
|
|
100
|
+
3. Return the enhanced version when the user picks `x`.
|
|
101
|
+
4. The enhanced content replaces the original section in the parent's output document.
|