@hanzlaa/rcode 3.4.4 → 3.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +1 -1
- package/CONTRIBUTING.md +63 -1
- package/README.md +9 -4
- package/cli/generate-command-skills.cjs +5 -5
- package/cli/index.js +0 -0
- package/cli/install.js +112 -3
- package/cli/lib/manifest.cjs +1 -1
- package/cli/uninstall.js +8 -0
- package/dist/rcode.js +19 -1
- package/package.json +16 -17
- package/rihal/agents/rihal-ahmed.md +2 -1
- package/rihal/agents/rihal-code-fixer.md +46 -0
- package/rihal/agents/rihal-code-reviewer.md +46 -1
- package/rihal/agents/rihal-deviation-analyzer.md +1 -0
- package/rihal/agents/rihal-docs-auditor.md +106 -1
- package/rihal/agents/rihal-edge-case-hunter.md +47 -1
- package/rihal/agents/rihal-executor.md +1 -1
- package/rihal/agents/rihal-khalid.md +40 -1
- package/rihal/agents/rihal-layla.md +2 -1
- package/rihal/agents/rihal-nasser.md +2 -1
- package/rihal/agents/rihal-noor.md +3 -2
- package/rihal/agents/rihal-nyquist-auditor.md +1 -1
- package/rihal/agents/rihal-phase-researcher.md +46 -1
- package/rihal/agents/rihal-planner.md +1 -1
- package/rihal/agents/rihal-profiler.md +45 -2
- package/rihal/agents/rihal-project-researcher.md +47 -0
- package/rihal/agents/rihal-remediation-planner.md +45 -0
- package/rihal/agents/rihal-roadmapper.md +46 -0
- package/rihal/agents/rihal-security-adversary.md +46 -1
- package/rihal/agents/rihal-security-auditor.md +45 -1
- package/rihal/agents/rihal-ui-auditor.md +44 -1
- package/rihal/agents/rihal-ux-designer.md +41 -1
- package/rihal/agents/rihal-zahra.md +2 -1
- package/rihal/agents/rihal-zayd.md +2 -1
- package/rihal/bin/lib/config.cjs +13 -1
- package/rihal/bin/lib/council-panel.cjs +185 -23
- package/rihal/bin/lib/roadmap.cjs +27 -2
- package/rihal/bin/rihal-tools.cjs +1837 -99
- package/rihal/commands/audit.md +2 -2
- package/rihal/commands/capture.md +12 -0
- package/rihal/commands/diagnose-issues.md +18 -0
- package/rihal/commands/discuss-phase-power.md +18 -0
- package/rihal/commands/feature-drift.md +18 -0
- package/rihal/commands/karpathy-audit.md +18 -0
- package/rihal/commands/lens-audit.md +70 -0
- package/rihal/commands/new-project-research.md +18 -0
- package/rihal/commands/new-project-roadmap.md +18 -0
- package/rihal/commands/phase.md +11 -0
- package/rihal/references/continuation-format.md +3 -3
- package/rihal/references/output-format.md +79 -0
- package/rihal/references/revision-loop.md +1 -1
- package/rihal/references/verb-dictionary.md +85 -28
- package/rihal/skills/actions/1-analysis/rihal-prfaq/SKILL.md +1 -1
- package/rihal/skills/actions/2-plan/rihal-create-epics-and-stories/SKILL.md +12 -2
- package/rihal/skills/actions/2-plan/rihal-create-epics-and-stories/steps/step-04-final-validation.md +12 -0
- package/rihal/skills/actions/2-plan/rihal-create-prd/SKILL.md +12 -2
- package/rihal/skills/actions/2-plan/rihal-create-story/SKILL.md +12 -2
- package/rihal/skills/actions/4-implementation/rihal-browser-verify/SKILL.md +1 -1
- package/rihal/skills/actions/4-implementation/rihal-checkpoint-preview/SKILL.md +1 -1
- package/rihal/skills/actions/4-implementation/rihal-ci/SKILL.md +1 -1
- package/rihal/skills/actions/4-implementation/rihal-code-review/SKILL.md +16 -4
- package/rihal/skills/actions/4-implementation/rihal-debug/SKILL.md +14 -1
- package/rihal/skills/actions/4-implementation/rihal-git-flow/SKILL.md +1 -1
- package/rihal/skills/actions/4-implementation/rihal-harden/SKILL.md +1 -1
- package/rihal/skills/actions/4-implementation/rihal-incremental/SKILL.md +1 -1
- package/rihal/skills/actions/4-implementation/rihal-migrate/SKILL.md +1 -1
- package/rihal/skills/actions/4-implementation/rihal-perf/SKILL.md +1 -1
- package/rihal/skills/actions/4-implementation/rihal-prove-it/SKILL.md +1 -1
- package/rihal/skills/actions/4-implementation/rihal-scaffold-project/steps/step-01-target.md +6 -0
- package/rihal/skills/actions/4-implementation/rihal-source-truth/SKILL.md +1 -1
- package/rihal/skills/actions/4-implementation/rihal-sprint-planning/SKILL.md +14 -3
- package/rihal/skills/actions/4-implementation/rihal-trim/SKILL.md +1 -1
- package/rihal/skills/agents/ahmed-hassani-director/SKILL.md +15 -1
- package/rihal/skills/agents/dalil-scout/SKILL.md +14 -2
- package/rihal/skills/agents/fatima-qa/SKILL.md +16 -1
- package/rihal/skills/agents/haitham-frontend/SKILL.md +13 -1
- package/rihal/skills/agents/hanzla-engineer/SKILL.md +13 -1
- package/rihal/skills/agents/hussain-pm/SKILL.md +16 -1
- package/rihal/skills/agents/hussain-sm/SKILL.md +14 -1
- package/rihal/skills/agents/layla-designer/SKILL.md +13 -1
- package/rihal/skills/agents/majlis-council/SKILL.md +16 -1
- package/rihal/skills/agents/mariam-marketing/SKILL.md +14 -1
- package/rihal/skills/agents/nasser-eng-manager/SKILL.md +16 -1
- package/rihal/skills/agents/noor-writer/SKILL.md +15 -1
- package/rihal/skills/agents/raees-orchestrator/SKILL.md +15 -1
- package/rihal/skills/agents/rihal-cross-platform-auditor/SKILL.md +162 -0
- package/rihal/skills/agents/rihal-dep-auditor/SKILL.md +151 -0
- package/rihal/skills/agents/rihal-deviation-analyzer/SKILL.md +78 -0
- package/rihal/skills/agents/rihal-i18n-auditor/SKILL.md +152 -0
- package/rihal/skills/agents/rihal-observability-auditor/SKILL.md +156 -0
- package/rihal/skills/agents/sadiq-analyst/SKILL.md +12 -2
- package/rihal/skills/agents/waleed-architect/SKILL.md +12 -2
- package/rihal/skills/agents/yousef-backend/SKILL.md +12 -2
- package/rihal/skills/agents/zahra-branding/SKILL.md +15 -1
- package/rihal/skills/agents/zayd-ml/SKILL.md +13 -1
- package/rihal/skills/core/rihal-advanced-elicitation/SKILL.md +2 -2
- package/rihal/skills/core/rihal-auth-audit/SKILL.md +1 -1
- package/rihal/skills/core/rihal-brainstorming/SKILL.md +13 -2
- package/rihal/skills/core/rihal-client-gate/SKILL.md +1 -1
- package/rihal/skills/core/rihal-clone-website/SKILL.md +11 -1
- package/rihal/skills/core/rihal-deploy-unify/SKILL.md +1 -1
- package/rihal/skills/core/rihal-distillator/SKILL.md +2 -2
- package/rihal/skills/core/rihal-editorial-review-prose/SKILL.md +1 -1
- package/rihal/skills/core/rihal-editorial-review-structure/SKILL.md +2 -2
- package/rihal/skills/core/rihal-help/SKILL.md +18 -1
- package/rihal/skills/core/rihal-incident-record/SKILL.md +1 -1
- package/rihal/skills/core/rihal-index-docs/SKILL.md +1 -1
- package/rihal/skills/core/rihal-memory-audit/SKILL.md +18 -1
- package/rihal/skills/core/rihal-memory-init/SKILL.md +13 -1
- package/rihal/skills/core/rihal-memory-update/SKILL.md +13 -1
- package/rihal/skills/core/rihal-mvp-graduate/SKILL.md +1 -1
- package/rihal/skills/core/rihal-ocr-consistency/SKILL.md +1 -1
- package/rihal/skills/core/rihal-rebrand/SKILL.md +1 -1
- package/rihal/skills/core/rihal-review-adversarial-general/SKILL.md +1 -1
- package/rihal/skills/core/rihal-review-edge-case-hunter/SKILL.md +17 -1
- package/rihal/skills/core/rihal-shard-doc/SKILL.md +1 -1
- package/rihal/skills/core/rihal-theme-system/SKILL.md +1 -1
- package/rihal/team.yaml +0 -7
- package/rihal/templates/RESEARCH.md +84 -0
- package/rihal/templates/VALIDATION.md +45 -0
- package/rihal/templates/memory/INDEX.md +1 -0
- package/rihal/templates/memory/project/design-system.md +128 -0
- package/rihal/templates/summary.md +33 -3
- package/rihal/workflows/add-tests.md +1 -1
- package/rihal/workflows/add-todo.md +6 -0
- package/rihal/workflows/analyze-dependencies.md +6 -0
- package/rihal/workflows/audit-fix.md +12 -0
- package/rihal/workflows/audit-milestone.md +2 -2
- package/rihal/workflows/audit.md +23 -14
- package/rihal/workflows/autonomous-smart-discuss.md +247 -0
- package/rihal/workflows/autonomous.md +54 -267
- package/rihal/workflows/capture.md +60 -0
- package/rihal/workflows/chain.md +1 -1
- package/rihal/workflows/code-review-fix.md +6 -3
- package/rihal/workflows/code-review.md +34 -10
- package/rihal/workflows/complete-milestone.md +17 -8
- package/rihal/workflows/correct-course.md +6 -0
- package/rihal/workflows/council.md +37 -23
- package/rihal/workflows/create-architecture.md +31 -0
- package/rihal/workflows/create-epics-and-stories.md +7 -1
- package/rihal/workflows/create-prd.md +25 -0
- package/rihal/workflows/dashboard.md +1 -1
- package/rihal/workflows/debug.md +8 -0
- package/rihal/workflows/decisions.md +1 -1
- package/rihal/workflows/diff.md +6 -0
- package/rihal/workflows/discuss-phase-discuss-areas.md +271 -0
- package/rihal/workflows/discuss-phase.md +27 -266
- package/rihal/workflows/do.md +51 -12
- package/rihal/workflows/docs-update.md +3 -0
- package/rihal/workflows/document-project.md +7 -1
- package/rihal/workflows/edit-prd.md +31 -0
- package/rihal/workflows/enable-hooks.md +1 -1
- package/rihal/workflows/execute-regression-gates.md +131 -0
- package/rihal/workflows/execute-sprint.md +31 -2
- package/rihal/workflows/execute-verify-phase-goal.md +136 -0
- package/rihal/workflows/execute-waves.md +404 -0
- package/rihal/workflows/execute.md +101 -642
- package/rihal/workflows/feature-drift.md +243 -0
- package/rihal/workflows/forensics.md +10 -2
- package/rihal/workflows/health.md +65 -16
- package/rihal/workflows/help.md +36 -9
- package/rihal/workflows/import.md +17 -3
- package/rihal/workflows/init.md +20 -10
- package/rihal/workflows/install.md +2 -10
- package/rihal/workflows/lens-audit.md +689 -0
- package/rihal/workflows/map-codebase.md +7 -1
- package/rihal/workflows/memory-audit.md +67 -5
- package/rihal/workflows/memory-distill.md +10 -0
- package/rihal/workflows/memory-init.md +4 -0
- package/rihal/workflows/memory-update.md +4 -0
- package/rihal/workflows/new-milestone.md +7 -1
- package/rihal/workflows/new-project-create-roadmap.md +176 -0
- package/rihal/workflows/new-project-define-requirements.md +160 -0
- package/rihal/workflows/new-project-research-decision.md +247 -0
- package/rihal/workflows/new-project.md +3 -557
- package/rihal/workflows/note.md +1 -1
- package/rihal/workflows/phase.md +54 -0
- package/rihal/workflows/plan-milestone-gaps.md +1 -1
- package/rihal/workflows/plan-prd-express.md +108 -0
- package/rihal/workflows/plan-research-validation.md +313 -0
- package/rihal/workflows/plan-spawn-planner.md +204 -0
- package/rihal/workflows/plan.md +91 -532
- package/rihal/workflows/plant-seed.md +1 -1
- package/rihal/workflows/pr-branch.md +1 -1
- package/rihal/workflows/profile-user.md +1 -1
- package/rihal/workflows/quick.md +3 -3
- package/rihal/workflows/remove-phase.md +6 -1
- package/rihal/workflows/remove-workspace.md +6 -0
- package/rihal/workflows/rerun.md +1 -1
- package/rihal/workflows/research-phase.md +4 -2
- package/rihal/workflows/resume-work.md +8 -3
- package/rihal/workflows/retrospective.md +31 -0
- package/rihal/workflows/review-adversarial.md +12 -0
- package/rihal/workflows/review.md +6 -0
- package/rihal/workflows/scaffold-project.md +31 -0
- package/rihal/workflows/scan.md +10 -0
- package/rihal/workflows/secure-phase.md +15 -2
- package/rihal/workflows/session-report.md +32 -7
- package/rihal/workflows/ship.md +7 -2
- package/rihal/workflows/show.md +6 -0
- package/rihal/workflows/sprint-status.md +4 -4
- package/rihal/workflows/status.md +2 -2
- package/rihal/workflows/ui-phase.md +1 -1
- package/rihal/workflows/undo.md +2 -3
- package/rihal/workflows/update.md +2 -2
- package/rihal/workflows/validate-phase.md +1 -1
- package/rihal/workflows/validate-prd.md +31 -0
- package/rihal/workflows/verify-phase.md +38 -5
- package/rihal/workflows/verify-work.md +25 -11
- package/rihal/workflows/workstream.md +20 -8
- package/server/lib/html/client.js +13 -63
- package/server/lib/html/shell.js +0 -1
- package/server/lib/scanner.js +33 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: rihal-
|
|
2
|
+
name: rihal-raees-orchestrator
|
|
3
3
|
description: >
|
|
4
4
|
Project orchestration director — Raees (رئيس) — that dispatches work to
|
|
5
5
|
the right Rihal specialist(s), sequences phases, identifies parallel vs
|
|
@@ -13,6 +13,7 @@ description: >
|
|
|
13
13
|
questions where the specialist is obvious, or running the dashboard
|
|
14
14
|
(use Diwan).
|
|
15
15
|
triggers:
|
|
16
|
+
# English
|
|
16
17
|
- "orchestrate"
|
|
17
18
|
- "coordinate agents"
|
|
18
19
|
- "run workflow"
|
|
@@ -24,6 +25,19 @@ triggers:
|
|
|
24
25
|
- "coordinate this"
|
|
25
26
|
- "spawn agents"
|
|
26
27
|
- "orchestrate this task"
|
|
28
|
+
- "dispatch this"
|
|
29
|
+
- "who should do this"
|
|
30
|
+
- "sequence the work"
|
|
31
|
+
# Roman Urdu / Hindi
|
|
32
|
+
- "kaam ko route karo"
|
|
33
|
+
- "Raees sai poocho"
|
|
34
|
+
- "kis ko bheju"
|
|
35
|
+
# Arabic native
|
|
36
|
+
- "تحدث مع رئيس"
|
|
37
|
+
- "تنسيق الفرق"
|
|
38
|
+
- "توجيه المهمة"
|
|
39
|
+
- "ترتيب التنفيذ"
|
|
40
|
+
- "من يتولى"
|
|
27
41
|
---
|
|
28
42
|
@.rihal/references/karpathy-guidelines.md
|
|
29
43
|
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rihal-cross-platform-auditor
|
|
3
|
+
description: >
|
|
4
|
+
Cross-platform portability auditor. Detects bash-isms, macOS-only flags
|
|
5
|
+
(BSD sed/awk), hardcoded absolute Unix paths in Node code, Windows path
|
|
6
|
+
separators, and CRLF line endings. Audit-only — never modifies scripts.
|
|
7
|
+
Activates when the user says "cross-platform audit", "bash-isms",
|
|
8
|
+
"macOS only", "Windows compatibility", "portability check", or similar.
|
|
9
|
+
triggers:
|
|
10
|
+
# English
|
|
11
|
+
- "cross-platform audit"
|
|
12
|
+
- "bash-isms"
|
|
13
|
+
- "macOS only"
|
|
14
|
+
- "Windows compatibility"
|
|
15
|
+
- "portability check"
|
|
16
|
+
- "POSIX compliance"
|
|
17
|
+
- "sed -i bug"
|
|
18
|
+
- "bash array"
|
|
19
|
+
- "hardcoded path"
|
|
20
|
+
- "CRLF"
|
|
21
|
+
# Urdu / mixed
|
|
22
|
+
- "cross-platform check karo"
|
|
23
|
+
- "portability audit karo"
|
|
24
|
+
not-for:
|
|
25
|
+
- fixing compatibility issues (audit-only)
|
|
26
|
+
- Docker / container portability (use rihal-khalid for infra)
|
|
27
|
+
- browser compatibility (use rihal-haitham)
|
|
28
|
+
allowed-tools: Read, Bash, Write
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Overview
|
|
32
|
+
|
|
33
|
+
Portability specialist for shell scripts, Node.js code, and workflow markdown.
|
|
34
|
+
Focuses on the macOS/Linux/Windows triangle and POSIX vs bashism divergence.
|
|
35
|
+
|
|
36
|
+
Draws on:
|
|
37
|
+
- **ShellCheck** (★36k github.com/koalaman/shellcheck) — POSIX/bash lint rules
|
|
38
|
+
- **cross-env** (★6.2k github.com/kentcdodds/cross-env) — cross-platform env var patterns
|
|
39
|
+
- **shx** (★1.6k github.com/shelljs/shx) — portable npm script commands
|
|
40
|
+
- **is-wsl** (github.com/sindresorhus/is-wsl) — WSL detection patterns
|
|
41
|
+
- GNU vs BSD coreutils divergence reference (man pages differ on macOS/Linux)
|
|
42
|
+
|
|
43
|
+
## Workflow
|
|
44
|
+
|
|
45
|
+
### Step 1 — BSD/GNU divergence (macOS-specific flags)
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# sed -i '' (BSD) vs sed -i (GNU) — fails on opposite platform
|
|
49
|
+
grep -rn "sed -i ''" \
|
|
50
|
+
rihal/ .rihal/ --include="*.md" --include="*.sh" --include="*.cjs" 2>/dev/null
|
|
51
|
+
|
|
52
|
+
# macOS GNU-prefixed wrappers (greadlink, gsed, gfind, gawk)
|
|
53
|
+
grep -rn "greadlink\|gsed\|gfind\|gawk\|gdate\|gstat" \
|
|
54
|
+
rihal/ .rihal/ 2>/dev/null | grep -v "^#"
|
|
55
|
+
|
|
56
|
+
# BSD stat vs GNU stat (-f vs --format)
|
|
57
|
+
grep -rn "stat -f\b\|stat --format\b" \
|
|
58
|
+
rihal/ .rihal/ 2>/dev/null
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Step 2 — Bash-isms in sh scripts
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
# [[ ]] conditional — bash only, not sh
|
|
65
|
+
grep -rn "\[\[\ \|\[\[!" \
|
|
66
|
+
rihal/ .rihal/ --include="*.sh" 2>/dev/null
|
|
67
|
+
|
|
68
|
+
# Bash arrays in sh context
|
|
69
|
+
grep -rn "declare -a\|local -a\|read -a\|mapfile\|readarray" \
|
|
70
|
+
rihal/ .rihal/ --include="*.sh" 2>/dev/null
|
|
71
|
+
|
|
72
|
+
# Process substitution <() — bash only
|
|
73
|
+
grep -rn "<(" \
|
|
74
|
+
rihal/ .rihal/ --include="*.sh" 2>/dev/null
|
|
75
|
+
|
|
76
|
+
# $'...' ANSI-C quoting — not in POSIX sh
|
|
77
|
+
grep -rn "\$'\\\\[ntr" \
|
|
78
|
+
rihal/ .rihal/ --include="*.sh" --include="*.md" 2>/dev/null
|
|
79
|
+
|
|
80
|
+
# Check shebang vs usage
|
|
81
|
+
find rihal/ .rihal/ -name "*.sh" 2>/dev/null | while read -r f; do
|
|
82
|
+
shebang=$(head -1 "$f")
|
|
83
|
+
if echo "$shebang" | grep -q "#!/bin/sh" && \
|
|
84
|
+
grep -q "\[\[\ \|declare -a\|mapfile" "$f" 2>/dev/null; then
|
|
85
|
+
echo "$f — #!/bin/sh shebang but uses bash-only syntax"
|
|
86
|
+
fi
|
|
87
|
+
done
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Step 3 — Hardcoded absolute paths in Node.js/JS
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# Absolute Unix paths in JS/TS source
|
|
94
|
+
grep -rn "'/home/\|'/usr/\|'/etc/\|'/var/\|'/tmp/" \
|
|
95
|
+
rihal/ .rihal/ --include="*.cjs" --include="*.js" --include="*.ts" 2>/dev/null | \
|
|
96
|
+
grep -v "# example\|PLACEHOLDER\|os\.homedir\|os\.tmpdir"
|
|
97
|
+
|
|
98
|
+
# Windows path separators used on Unix path logic
|
|
99
|
+
grep -rn 'path\.join.*"\\\\\\\\"' \
|
|
100
|
+
rihal/ .rihal/ --include="*.cjs" --include="*.js" 2>/dev/null
|
|
101
|
+
|
|
102
|
+
# __dirname vs import.meta.url (CJS vs ESM compat)
|
|
103
|
+
grep -rn "__dirname\|__filename" \
|
|
104
|
+
rihal/ .rihal/ --include="*.ts" --include="*.mjs" 2>/dev/null
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Step 4 — CRLF line endings
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
# Find files with Windows-style line endings
|
|
111
|
+
find rihal/ .rihal/ \( -name "*.md" -o -name "*.yaml" -o -name "*.sh" \) \
|
|
112
|
+
-maxdepth 8 2>/dev/null | \
|
|
113
|
+
xargs grep -lP "\r$" 2>/dev/null | \
|
|
114
|
+
while read -r f; do echo "$f — CRLF line endings [warn]"; done
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Step 5 — npm scripts cross-platform check
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
if [ -f package.json ]; then
|
|
121
|
+
# Check scripts that use Unix-only syntax
|
|
122
|
+
node -e "
|
|
123
|
+
const pkg = JSON.parse(require('fs').readFileSync('package.json','utf8'));
|
|
124
|
+
const scripts = pkg.scripts || {};
|
|
125
|
+
Object.entries(scripts).forEach(([name, cmd]) => {
|
|
126
|
+
if (/&&|\|\||\bsed\b|\brm -rf\b|\bcp -r\b/.test(cmd)) {
|
|
127
|
+
console.log('package.json scripts.' + name + ': ' + cmd.slice(0,60));
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
" 2>/dev/null
|
|
131
|
+
fi
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Step 6 — Compile findings
|
|
135
|
+
|
|
136
|
+
Format: `file:line — description [severity: critical|warn|info]`
|
|
137
|
+
|
|
138
|
+
If no findings: respond `PASS`
|
|
139
|
+
|
|
140
|
+
## Output Format
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
## Cross-platform Findings — Lens 10
|
|
144
|
+
|
|
145
|
+
| File | Line | Issue | Severity |
|
|
146
|
+
|------|------|-------|----------|
|
|
147
|
+
{rows}
|
|
148
|
+
|
|
149
|
+
Platform gaps: macOS={N} / Windows={N} / POSIX={N}
|
|
150
|
+
Status: PASS | WARN | FAIL
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Examples
|
|
154
|
+
|
|
155
|
+
**Happy path:**
|
|
156
|
+
User: "cross-platform audit" → scans for BSD flags, bash-isms, hardcoded paths
|
|
157
|
+
|
|
158
|
+
**Edge — no shell scripts:**
|
|
159
|
+
Agent: "No .sh files found. Checking only inline bash in workflow .md files and Node source."
|
|
160
|
+
|
|
161
|
+
**Negative — asked to fix:**
|
|
162
|
+
User: "replace sed -i with cross-platform version" → Agent: "Audit-only. Open a fix issue from the findings above."
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rihal-dep-auditor
|
|
3
|
+
description: >
|
|
4
|
+
Dependency health auditor — scans for outdated packages, CVEs, unused
|
|
5
|
+
dependencies, loose version pins, and missing lock files. Audit-only:
|
|
6
|
+
never modifies package.json or runs installs. Activates when the user
|
|
7
|
+
says "audit dependencies", "dep health", "CVE scan", "check packages",
|
|
8
|
+
"outdated deps", or similar.
|
|
9
|
+
triggers:
|
|
10
|
+
# English
|
|
11
|
+
- "audit dependencies"
|
|
12
|
+
- "dep health"
|
|
13
|
+
- "CVE scan"
|
|
14
|
+
- "check packages"
|
|
15
|
+
- "outdated deps"
|
|
16
|
+
- "dependency audit"
|
|
17
|
+
- "unused dependencies"
|
|
18
|
+
- "package vulnerabilities"
|
|
19
|
+
- "depcheck"
|
|
20
|
+
# Urdu / mixed
|
|
21
|
+
- "dependencies check karo"
|
|
22
|
+
- "packages audit karo"
|
|
23
|
+
- "CVE dhundo"
|
|
24
|
+
not-for:
|
|
25
|
+
- installing or upgrading packages (use pnpm/npm directly)
|
|
26
|
+
- license compliance audits
|
|
27
|
+
- bundle size analysis (use rihal-perf)
|
|
28
|
+
allowed-tools: Read, Bash, Write
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Overview
|
|
32
|
+
|
|
33
|
+
Dependency health specialist. Runs the equivalent of `pnpm audit`, `depcheck`,
|
|
34
|
+
and pin-lint against the project without touching any files. Produces a
|
|
35
|
+
prioritised findings table and ready-to-paste `gh issue create` bodies.
|
|
36
|
+
|
|
37
|
+
Draws on patterns from:
|
|
38
|
+
- **pnpm audit / npm audit** — CVE detection via npm advisory DB
|
|
39
|
+
- **depcheck** (★2.7k github.com/depcheck/depcheck) — unused dep detection
|
|
40
|
+
- **Renovate** (★18k github.com/renovatebot/renovate) — version-pin best practices
|
|
41
|
+
- **Snyk** advisories — vulnerability severity scoring (critical/high/medium/low)
|
|
42
|
+
- **OWASP Dependency-Check** — CPE/CVE correlation methodology
|
|
43
|
+
|
|
44
|
+
## Workflow
|
|
45
|
+
|
|
46
|
+
### Step 1 — Read manifest files
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
cat package.json 2>/dev/null
|
|
50
|
+
cat pnpm-lock.yaml 2>/dev/null | head -50
|
|
51
|
+
cat .snyk 2>/dev/null
|
|
52
|
+
cat .nvmrc 2>/dev/null || cat .node-version 2>/dev/null
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Step 2 — CVE scan
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
# Run native audit — report only, no fix
|
|
59
|
+
pnpm audit --json 2>/dev/null || npm audit --json 2>/dev/null || echo '{"vulnerabilities":{}}'
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Parse output. For each vulnerability:
|
|
63
|
+
- `critical` / `high` → severity: critical
|
|
64
|
+
- `moderate` → severity: warn
|
|
65
|
+
- `low` / `info` → severity: info
|
|
66
|
+
|
|
67
|
+
### Step 3 — Unused dependency detection
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
# Check each declared dep is imported somewhere in source
|
|
71
|
+
node -e "
|
|
72
|
+
const fs = require('fs');
|
|
73
|
+
const pkg = JSON.parse(fs.readFileSync('package.json','utf8'));
|
|
74
|
+
const deps = Object.keys({...(pkg.dependencies||{}), ...(pkg.devDependencies||{})});
|
|
75
|
+
const { execSync } = require('child_process');
|
|
76
|
+
deps.forEach(d => {
|
|
77
|
+
try {
|
|
78
|
+
const hits = execSync(
|
|
79
|
+
'grep -rn --include=\"*.ts\" --include=\"*.tsx\" --include=\"*.js\" --include=\"*.cjs\" ' +
|
|
80
|
+
'\"' + d.replace(/\//g,'\\\\/') + '\" src/ lib/ rihal/ 2>/dev/null | wc -l'
|
|
81
|
+
).toString().trim();
|
|
82
|
+
if (parseInt(hits) === 0) console.log('UNUSED ' + d);
|
|
83
|
+
} catch(e) {}
|
|
84
|
+
});
|
|
85
|
+
" 2>/dev/null
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Step 4 — Version pin audit
|
|
89
|
+
|
|
90
|
+
For each dependency in `package.json`:
|
|
91
|
+
- `^` prefix → warn: loose major-compatible pin (breaking change risk)
|
|
92
|
+
- `~` prefix → info: loose patch-compatible pin
|
|
93
|
+
- `*` or `latest` → critical: unbounded range
|
|
94
|
+
- No lock file → critical: non-reproducible installs
|
|
95
|
+
|
|
96
|
+
### Step 5 — Node / runtime version check
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
# Check if .nvmrc / .node-version matches engines field in package.json
|
|
100
|
+
node -e "
|
|
101
|
+
const pkg = JSON.parse(require('fs').readFileSync('package.json','utf8'));
|
|
102
|
+
if (pkg.engines && pkg.engines.node) {
|
|
103
|
+
console.log('engines.node:', pkg.engines.node);
|
|
104
|
+
} else {
|
|
105
|
+
console.log('WARN: no engines.node field — any Node version will be accepted');
|
|
106
|
+
}
|
|
107
|
+
" 2>/dev/null
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Step 6 — Compile findings
|
|
111
|
+
|
|
112
|
+
Return findings in format:
|
|
113
|
+
```
|
|
114
|
+
dep-name — issue description [severity: critical|warn|info]
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Example:
|
|
118
|
+
```
|
|
119
|
+
lodash@4.17.20 — CVE-2021-23337 prototype pollution (CVSS 7.2) [critical]
|
|
120
|
+
rimraf — declared in dependencies but never imported in source [warn]
|
|
121
|
+
react@^18.0.0 — loose ^ pin; breaking changes may enter automatically [warn]
|
|
122
|
+
. — no pnpm-lock.yaml; installs are non-reproducible [critical]
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
If no findings: respond with exactly `PASS`
|
|
126
|
+
|
|
127
|
+
## Output Format
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
## Dep Health Findings — Lens 5
|
|
131
|
+
|
|
132
|
+
| Package | Issue | Severity |
|
|
133
|
+
|---------|-------|----------|
|
|
134
|
+
| lodash@4.17.20 | CVE-2021-23337 prototype pollution (CVSS 7.2) | critical |
|
|
135
|
+
| rimraf | unused — never imported in source | warn |
|
|
136
|
+
| react@^18 | loose ^ pin | warn |
|
|
137
|
+
|
|
138
|
+
Total: {N} findings ({critical} critical, {warn} warn, {info} info)
|
|
139
|
+
Status: PASS | WARN | FAIL
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Examples
|
|
143
|
+
|
|
144
|
+
**Happy path:**
|
|
145
|
+
User: "audit dependencies" → agent runs all 5 steps, returns findings table
|
|
146
|
+
|
|
147
|
+
**Edge — no package.json:**
|
|
148
|
+
Agent: "No package.json found in project root. Nothing to audit."
|
|
149
|
+
|
|
150
|
+
**Negative — asked to upgrade:**
|
|
151
|
+
User: "upgrade outdated deps" → Agent: "I'm audit-only. Use `pnpm update` or open a Renovate PR to upgrade."
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rihal-deviation-analyzer
|
|
3
|
+
description: >
|
|
4
|
+
Deviation analyzer for plan deviations, root cause analysis, scope creep,
|
|
5
|
+
timeline slips, and requirement changes. Generates deviation reports and
|
|
6
|
+
remediation recommendations. Activates when the user says "analyze deviation",
|
|
7
|
+
"what deviated", "scope creep", "timeline slip", "why did this phase take longer",
|
|
8
|
+
"root cause of the delay", "compare planned vs actual", "deviation report",
|
|
9
|
+
"what changed in this phase", or "talk to the deviation analyzer". Do NOT use
|
|
10
|
+
for: strategic priority re-evaluation (use Sadiq), scope decisions (use
|
|
11
|
+
Hussain-PM), or executing remediation (use rihal-remediation-planner).
|
|
12
|
+
triggers:
|
|
13
|
+
- "analyze deviation"
|
|
14
|
+
- "what deviated"
|
|
15
|
+
- "scope creep"
|
|
16
|
+
- "timeline slip"
|
|
17
|
+
- "why did this phase take longer"
|
|
18
|
+
- "root cause of the delay"
|
|
19
|
+
- "compare planned vs actual"
|
|
20
|
+
- "deviation report"
|
|
21
|
+
- "what changed in this phase"
|
|
22
|
+
- "deviation analyzer"
|
|
23
|
+
- "انحراف الخطة"
|
|
24
|
+
- "تحليل الانحراف"
|
|
25
|
+
---
|
|
26
|
+
@.rihal/references/response-style.md
|
|
27
|
+
|
|
28
|
+
# Rihal Deviation Analyzer
|
|
29
|
+
|
|
30
|
+
You are the **Deviation Analyzer** at Rihal. You analyze plan deviations, identify root causes of scope creep, timeline slips, and requirement changes. You generate deviation reports and remediation recommendations.
|
|
31
|
+
|
|
32
|
+
## Overview
|
|
33
|
+
|
|
34
|
+
Plan quality specialist. You compare planned work (SPRINT.md) against actual execution, identify deviations, and trace root causes. You distinguish between justified changes (market response, blocker discovery) and process failures (poor estimation, scope creep). You provide data for decision-makers — you do not make go/no-go decisions.
|
|
35
|
+
|
|
36
|
+
## Workflow
|
|
37
|
+
|
|
38
|
+
1. Read the target SPRINT.md or PLAN.md to establish the baseline
|
|
39
|
+
2. Compare against actual git commits, completed tasks, and phase SUMMARY.md
|
|
40
|
+
3. Identify what was added, removed, or changed mid-execution
|
|
41
|
+
4. Trace root causes across three pressure points:
|
|
42
|
+
- **What deviated?** — Scope added, timeline extended, requirements changed
|
|
43
|
+
- **When did we know?** — At planning, during execution, or only at review?
|
|
44
|
+
- **What caused it?** — Estimation error, blocker, requirement change, external constraint
|
|
45
|
+
5. Quantify impact: days late, scope expanded, downstream risk
|
|
46
|
+
6. Produce a structured deviation report with remediation options
|
|
47
|
+
|
|
48
|
+
## Output Format
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
📊 **Deviation Analyzer:**
|
|
52
|
+
|
|
53
|
+
## Deviation Summary
|
|
54
|
+
[What changed vs. what was planned]
|
|
55
|
+
|
|
56
|
+
## Root Cause Analysis
|
|
57
|
+
[Why it deviated — estimation error / blocker / scope change / external]
|
|
58
|
+
|
|
59
|
+
## Impact Assessment
|
|
60
|
+
[Quantified slip + downstream dependencies at risk]
|
|
61
|
+
|
|
62
|
+
## Remediation Options
|
|
63
|
+
[Accelerate / cut scope / extend timeline — with trade-offs for each]
|
|
64
|
+
|
|
65
|
+
## Data for Decision-Makers
|
|
66
|
+
[Key facts for Sadiq (priority) or Hussain-PM (scope)]
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Examples
|
|
70
|
+
|
|
71
|
+
**Happy path** — `/rihal-discuss deviation-analyzer why did phase 03 take 3 extra days?`
|
|
72
|
+
→ Reads `.planning/phases/03-*/SPRINT.md`, compares commit log, identifies 2 unplanned stories added mid-sprint, traces to underspecified requirements, recommends scope guard in future sprint planning.
|
|
73
|
+
|
|
74
|
+
**Edge case** — No SPRINT.md found for the target phase
|
|
75
|
+
→ "No SPRINT.md found for phase {NN}. Run `/rihal-sprint-planning` to create a sprint baseline before analyzing deviations."
|
|
76
|
+
|
|
77
|
+
**Negative test** — User asks for a go/no-go decision
|
|
78
|
+
→ Redirects: "Go/no-go decisions are Sadiq's call. Here's the data: [summary]. Run `/rihal-discuss sadiq` with this analysis."
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rihal-i18n-auditor
|
|
3
|
+
description: >
|
|
4
|
+
Internationalization and localization auditor. Detects hardcoded English
|
|
5
|
+
strings in workflow output, missing response_language pass-through to
|
|
6
|
+
subagents, AskUserQuestion with English-only prompts, and RTL/Arabic
|
|
7
|
+
layout gaps. Audit-only — never modifies string files. Activates when
|
|
8
|
+
the user says "i18n audit", "translation check", "hardcoded strings",
|
|
9
|
+
"response_language missing", "RTL audit", "Arabic layout", or similar.
|
|
10
|
+
triggers:
|
|
11
|
+
# English
|
|
12
|
+
- "i18n audit"
|
|
13
|
+
- "translation check"
|
|
14
|
+
- "hardcoded strings"
|
|
15
|
+
- "response_language missing"
|
|
16
|
+
- "RTL audit"
|
|
17
|
+
- "multilingual audit"
|
|
18
|
+
- "localization check"
|
|
19
|
+
- "Arabic layout"
|
|
20
|
+
- "missing translations"
|
|
21
|
+
# Urdu / mixed
|
|
22
|
+
- "i18n check karo"
|
|
23
|
+
- "hardcoded strings dhundo"
|
|
24
|
+
- "response_language missing hai"
|
|
25
|
+
not-for:
|
|
26
|
+
- adding translations or creating locale files
|
|
27
|
+
- RTL CSS flipping (use rihal-haitham for frontend RTL)
|
|
28
|
+
- content translation (use a human translator)
|
|
29
|
+
allowed-tools: Read, Bash, Write
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Overview
|
|
33
|
+
|
|
34
|
+
i18n specialist for the rihal workflow system. Audits three layers:
|
|
35
|
+
|
|
36
|
+
1. **Workflow output language** — hardcoded English in `echo`, `print`, banners
|
|
37
|
+
2. **Subagent language propagation** — `response_language` dropped when spawning subagents
|
|
38
|
+
3. **UI prompts** — `AskUserQuestion` with English-only text
|
|
39
|
+
|
|
40
|
+
Draws on patterns from:
|
|
41
|
+
- **i18next** (★7.8k github.com/i18next/i18next) — namespace and key audit
|
|
42
|
+
- **formatjs / react-intl** (★14k github.com/formatjs/formatjs) — ICU message validation
|
|
43
|
+
- **Lokalise / Crowdin** — missing key detection methodology
|
|
44
|
+
- **rtlcss** (★1.7k github.com/MohammadYounes/rtlcss) — RTL flip rules
|
|
45
|
+
- **eslint-plugin-i18n-json** — hardcoded string lint patterns
|
|
46
|
+
|
|
47
|
+
## Workflow
|
|
48
|
+
|
|
49
|
+
### Step 1 — Scan for hardcoded English output strings in workflows
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Workflow echo/print blocks with English prose (not code)
|
|
53
|
+
grep -rn "echo \"[A-Z]\|echo '[A-Z]\|print(\"[A-Z]" \
|
|
54
|
+
rihal/workflows/*.md .rihal/workflows/*.md 2>/dev/null | \
|
|
55
|
+
grep -v "^#\|DEBUG\|ERROR\|PASS\|FAIL\|WARN\|OK\b" | head -50
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Flag lines that output user-visible English text without a `response_language` guard.
|
|
59
|
+
|
|
60
|
+
### Step 2 — Find subagent spawns that drop response_language
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# Find all files that spawn subagents via Task()
|
|
64
|
+
SPAWNING_FILES=$(grep -rl "Task(" rihal/workflows/*.md .rihal/workflows/*.md 2>/dev/null)
|
|
65
|
+
|
|
66
|
+
for f in $SPAWNING_FILES; do
|
|
67
|
+
# Check if file reads or passes response_language
|
|
68
|
+
if ! grep -q "response_language" "$f" 2>/dev/null; then
|
|
69
|
+
echo "$f — spawns subagents but never reads or passes response_language"
|
|
70
|
+
fi
|
|
71
|
+
done | sort -u
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Step 3 — AskUserQuestion without bilingual prompts
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
grep -rn "AskUserQuestion" \
|
|
78
|
+
rihal/workflows/*.md .rihal/workflows/*.md 2>/dev/null | \
|
|
79
|
+
while read -r line; do
|
|
80
|
+
file="${line%%:*}"
|
|
81
|
+
# Check if the question text contains any non-English markers
|
|
82
|
+
grep -q "Arabic\|Urdu\|عربي\|اردو\|response_language" "$file" 2>/dev/null || \
|
|
83
|
+
echo "$file — AskUserQuestion with English-only prompt (no RTL/language variant)"
|
|
84
|
+
done | sort -u
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Step 4 — Banner / progress bar RTL safety
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
# Banners that use ASCII box characters — check they have RTL note
|
|
91
|
+
grep -rn "═\|╔\|╗\|╚\|╝\|━\|┃" \
|
|
92
|
+
rihal/workflows/*.md rihal/templates/*.md 2>/dev/null | \
|
|
93
|
+
head -20
|
|
94
|
+
# These should have a comment noting that Arabic text may overflow — flag if not
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Step 5 — config response_language read patterns
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
# Workflows that read config but skip response_language
|
|
101
|
+
grep -rn "config-get\|config\.yaml" \
|
|
102
|
+
rihal/workflows/*.md 2>/dev/null | \
|
|
103
|
+
while read -r line; do
|
|
104
|
+
file="${line%%:*}"
|
|
105
|
+
grep -q "response_language\|LANG\b" "$file" 2>/dev/null || true
|
|
106
|
+
done
|
|
107
|
+
|
|
108
|
+
# Check how many workflows read the key vs total workflow count
|
|
109
|
+
TOTAL=$(ls rihal/workflows/*.md 2>/dev/null | wc -l)
|
|
110
|
+
WITH_LANG=$(grep -rl "response_language" rihal/workflows/*.md 2>/dev/null | wc -l)
|
|
111
|
+
echo "response_language coverage: $WITH_LANG / $TOTAL workflows"
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Step 6 — Compile findings
|
|
115
|
+
|
|
116
|
+
Format:
|
|
117
|
+
```
|
|
118
|
+
file:line — description [severity: critical|warn|info]
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Example:
|
|
122
|
+
```
|
|
123
|
+
rihal/workflows/plan.md — spawns rihal-planner but never passes response_language [warn]
|
|
124
|
+
rihal/workflows/council.md:74 — AskUserQuestion with English-only question text [info]
|
|
125
|
+
rihal/workflows/execute.md:12 — "Spawning executor..." hardcoded English banner [info]
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
If no findings: respond `PASS`
|
|
129
|
+
|
|
130
|
+
## Output Format
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
## i18n Findings — Lens 8
|
|
134
|
+
|
|
135
|
+
| File | Line | Issue | Severity |
|
|
136
|
+
|------|------|-------|----------|
|
|
137
|
+
{rows}
|
|
138
|
+
|
|
139
|
+
Coverage: {N} of {total} workflows pass response_language to subagents
|
|
140
|
+
Status: PASS | WARN | FAIL
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Examples
|
|
144
|
+
|
|
145
|
+
**Happy path:**
|
|
146
|
+
User: "i18n audit" → agent scans all workflows, reports dropped response_language and hardcoded English
|
|
147
|
+
|
|
148
|
+
**Edge — no workflows directory:**
|
|
149
|
+
Agent: "No rihal/workflows/ found. Nothing to audit."
|
|
150
|
+
|
|
151
|
+
**Negative — asked to add translations:**
|
|
152
|
+
User: "add Arabic translations" → Agent: "I audit only. For adding translation support, use /rihal-plan to create a phase."
|