@hanzlaa/rcode 3.3.0 → 3.3.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/CONTRIBUTING.md +9 -9
- package/README.md +50 -50
- package/cli/context.js +4 -4
- package/cli/doctor.js +1 -1
- package/cli/generate-command-skills.cjs +10 -10
- package/cli/install.js +11 -11
- package/cli/lib/memory-bank.cjs +5 -5
- package/cli/set-mode.js +2 -2
- package/cli/uninstall.js +5 -5
- package/dist/rcode.js +15 -15
- package/package.json +1 -1
- package/rihal/DOCS-AUDIT.md +1 -1
- package/rihal/agents/rihal-ahmed.md +1 -1
- package/rihal/agents/rihal-codebase-mapper.md +3 -3
- package/rihal/agents/rihal-debugger.md +2 -2
- package/rihal/agents/rihal-fatima.md +2 -2
- package/rihal/agents/rihal-haitham.md +2 -2
- package/rihal/agents/rihal-khalid.md +1 -1
- package/rihal/agents/rihal-layla.md +1 -1
- package/rihal/agents/rihal-nasser.md +1 -1
- package/rihal/agents/rihal-noor.md +1 -1
- package/rihal/agents/rihal-nyquist-auditor.md +1 -1
- package/rihal/agents/rihal-omar.md +1 -1
- package/rihal/agents/rihal-phase-researcher.md +3 -3
- package/rihal/agents/rihal-planner.md +1 -1
- package/rihal/agents/rihal-project-researcher.md +2 -2
- package/rihal/agents/rihal-research-synthesizer.md +3 -3
- package/rihal/agents/rihal-roadmapper.md +3 -3
- package/rihal/agents/rihal-sadiq.md +1 -1
- package/rihal/agents/rihal-sprint-checker.md +3 -3
- package/rihal/agents/rihal-verifier.md +2 -2
- package/rihal/agents/rihal-waleed.md +1 -1
- package/rihal/agents/rihal-yousef.md +2 -2
- package/rihal/agents/rihal-zahra.md +1 -1
- package/rihal/agents/rihal-zayd.md +1 -1
- package/rihal/agents/rules/phase-researcher/detailed-guide.md +1 -1
- package/rihal/agents/rules/roadmapper/detailed-guide.md +1 -1
- package/rihal/agents/rules/sprint-checker/dimensions.md +3 -3
- package/rihal/agents/rules/sprint-checker/process.md +2 -2
- package/rihal/agents/rules/verifier/gap-output.md +1 -1
- package/rihal/agents/rules/verifier/verification-report.md +1 -1
- package/rihal/bin/rihal-hooks.cjs +6 -6
- package/rihal/bin/rihal-tools.cjs +60 -23
- package/rihal/brain/README.md +2 -2
- package/rihal/brain/best-practices/no-autonomous-bypass.md +2 -2
- package/rihal/brain/best-practices/research-citation-rule.md +1 -1
- package/rihal/brain/best-practices/state-sync-rule.md +4 -4
- package/rihal/commands/add-phase.md +1 -1
- package/rihal/commands/add-tests.md +1 -1
- package/rihal/commands/add-todo.md +1 -1
- package/rihal/commands/analyze-dependencies.md +1 -1
- package/rihal/commands/audit-fix.md +1 -1
- package/rihal/commands/audit-milestone.md +1 -1
- package/rihal/commands/audit-uat.md +1 -1
- package/rihal/commands/audit.md +1 -1
- package/rihal/commands/autonomous.md +1 -1
- package/rihal/commands/brainstorm.md +1 -1
- package/rihal/commands/chain.md +1 -1
- package/rihal/commands/check-todos.md +1 -1
- package/rihal/commands/checkpoint-preview.md +1 -1
- package/rihal/commands/cleanup.md +2 -2
- package/rihal/commands/code-review-fix.md +1 -1
- package/rihal/commands/code-review.md +1 -1
- package/rihal/commands/complete-milestone.md +1 -1
- package/rihal/commands/config.md +2 -2
- package/rihal/commands/correct-course.md +1 -1
- package/rihal/commands/council.md +1 -1
- package/rihal/commands/create-epics-and-stories.md +1 -1
- package/rihal/commands/create-story.md +2 -2
- package/rihal/commands/dashboard.md +1 -1
- package/rihal/commands/debug.md +1 -1
- package/rihal/commands/decisions.md +1 -1
- package/rihal/commands/dev-story.md +1 -1
- package/rihal/commands/diff.md +1 -1
- package/rihal/commands/discuss-phase.md +1 -1
- package/rihal/commands/discuss.md +2 -2
- package/rihal/commands/do.md +2 -2
- package/rihal/commands/docs-update.md +1 -1
- package/rihal/commands/document-project.md +1 -1
- package/rihal/commands/enable-hooks.md +1 -1
- package/rihal/commands/execute-sprint.md +2 -2
- package/rihal/commands/execute.md +1 -1
- package/rihal/commands/explore.md +1 -1
- package/rihal/commands/export-to-github.md +1 -1
- package/rihal/commands/forensics.md +1 -1
- package/rihal/commands/from-template.md +1 -1
- package/rihal/commands/health.md +1 -1
- package/rihal/commands/help.md +1 -1
- package/rihal/commands/import.md +1 -1
- package/rihal/commands/inbox.md +1 -1
- package/rihal/commands/init.md +1 -1
- package/rihal/commands/insert-phase.md +1 -1
- package/rihal/commands/install.md +1 -1
- package/rihal/commands/list-plans.md +1 -1
- package/rihal/commands/list-workspaces.md +1 -1
- package/rihal/commands/map-codebase.md +1 -1
- package/rihal/commands/milestone-summary.md +1 -1
- package/rihal/commands/new-milestone.md +1 -1
- package/rihal/commands/new-project.md +1 -1
- package/rihal/commands/new-workspace.md +1 -1
- package/rihal/commands/next.md +1 -1
- package/rihal/commands/note.md +1 -1
- package/rihal/commands/notify-test.md +1 -1
- package/rihal/commands/pause-work.md +1 -1
- package/rihal/commands/plan-milestone-gaps.md +3 -3
- package/rihal/commands/plan.md +2 -2
- package/rihal/commands/plant-seed.md +1 -1
- package/rihal/commands/pr-branch.md +2 -2
- package/rihal/commands/prfaq.md +1 -1
- package/rihal/commands/profile-user.md +1 -1
- package/rihal/commands/progress.md +3 -3
- package/rihal/commands/quick.md +1 -1
- package/rihal/commands/remove-phase.md +1 -1
- package/rihal/commands/remove-workspace.md +1 -1
- package/rihal/commands/replay.md +1 -1
- package/rihal/commands/rerun.md +1 -1
- package/rihal/commands/research-phase.md +2 -2
- package/rihal/commands/resume-work.md +1 -1
- package/rihal/commands/review.md +1 -1
- package/rihal/commands/scan.md +1 -1
- package/rihal/commands/secure-phase.md +1 -1
- package/rihal/commands/session-report.md +1 -1
- package/rihal/commands/settings.md +1 -1
- package/rihal/commands/ship.md +2 -2
- package/rihal/commands/show.md +1 -1
- package/rihal/commands/sprint-planning.md +1 -1
- package/rihal/commands/sprint-status.md +1 -1
- package/rihal/commands/stats.md +1 -1
- package/rihal/commands/status.md +1 -1
- package/rihal/commands/ui-phase.md +1 -1
- package/rihal/commands/ui-review.md +1 -1
- package/rihal/commands/undo.md +1 -1
- package/rihal/commands/update.md +1 -1
- package/rihal/commands/validate-phase.md +1 -1
- package/rihal/commands/verify-phase.md +2 -2
- package/rihal/commands/verify-work.md +1 -1
- package/rihal/commands/why.md +1 -1
- package/rihal/commands/workstream.md +1 -1
- package/rihal/references/agent-shared-rules.md +1 -1
- package/rihal/references/command-redirect-format.md +7 -7
- package/rihal/references/context-budget.md +2 -2
- package/rihal/references/continuation-format.md +16 -16
- package/rihal/references/dispatch-banner.md +1 -1
- package/rihal/references/execution-protocol.md +2 -2
- package/rihal/references/gates.md +3 -3
- package/rihal/references/git-integration.md +1 -1
- package/rihal/references/output-format.md +4 -4
- package/rihal/references/output-realism.md +1 -1
- package/rihal/references/revision-loop.md +1 -1
- package/rihal/references/state-schema.md +15 -15
- package/rihal/references/ui-brand.md +1 -1
- package/rihal/references/verb-dictionary.md +15 -15
- package/rihal/references/workstream-flag.md +28 -28
- package/rihal/skills/_shared/no-autonomous-bypass.md +2 -2
- package/rihal/skills/_shared/research-citation-rule.md +1 -1
- package/rihal/skills/_shared/state-sync-rule.md +4 -4
- package/rihal/skills/actions/1-analysis/rihal-prfaq/SKILL.md +1 -1
- package/rihal/skills/actions/2-plan/rihal-create-epics-and-stories/workflow.md +1 -1
- package/rihal/skills/actions/2-plan/rihal-create-milestone/SKILL.md +2 -2
- package/rihal/skills/actions/2-plan/rihal-create-milestone/steps/step-06-phase-stubs.md +2 -2
- package/rihal/skills/actions/2-plan/rihal-create-milestone/steps/step-07-backlog.md +2 -2
- package/rihal/skills/actions/2-plan/rihal-create-milestone/steps/step-09-state-sync.md +2 -2
- package/rihal/skills/actions/2-plan/rihal-create-milestone/steps/step-10-complete.md +4 -4
- package/rihal/skills/actions/2-plan/rihal-create-milestone/workflow.md +5 -5
- package/rihal/skills/actions/2-plan/rihal-create-prd/SKILL.md +1 -1
- package/rihal/skills/actions/2-plan/rihal-create-prd/workflow.md +1 -1
- package/rihal/skills/actions/2-plan/rihal-create-story/workflow.md +1 -1
- package/rihal/skills/actions/4-implementation/rihal-checkpoint-preview/SKILL.md +3 -3
- package/rihal/skills/actions/4-implementation/rihal-dev-story/workflow.md +1 -1
- package/rihal/skills/actions/4-implementation/rihal-sprint-planning/SKILL.md +1 -1
- package/rihal/skills/actions/4-implementation/rihal-sprint-planning/checklist.md +1 -1
- package/rihal/skills/actions/4-implementation/rihal-sprint-planning/workflow.md +1 -1
- package/rihal/skills/actions/4-implementation/rihal-sprint-status/workflow.md +5 -5
- package/rihal/skills/agents/dalil-scout/SKILL.md +7 -7
- package/rihal/skills/core/rihal-brainstorming/SKILL.md +1 -1
- package/rihal/skills/core/rihal-init/SKILL.md +1 -1
- package/rihal/skills/core/rihal-party-mode/SKILL.md +1 -1
- package/rihal/templates/milestone.md +1 -1
- package/rihal/templates/projects/api-backend/PROJECT.md +1 -1
- package/rihal/templates/projects/mobile-app/PROJECT.md +1 -1
- package/rihal/templates/projects/saas-b2b/PROJECT.md +1 -1
- package/rihal/workflows/add-phase.md +10 -10
- package/rihal/workflows/add-tests.md +9 -9
- package/rihal/workflows/add-todo.md +5 -5
- package/rihal/workflows/analyze-dependencies.md +7 -7
- package/rihal/workflows/audit-fix.md +4 -4
- package/rihal/workflows/audit-milestone.md +8 -8
- package/rihal/workflows/audit-uat.md +2 -2
- package/rihal/workflows/audit.md +28 -28
- package/rihal/workflows/autonomous.md +128 -44
- package/rihal/workflows/brainstorm.md +7 -7
- package/rihal/workflows/chain.md +16 -16
- package/rihal/workflows/check-implementation-readiness.md +4 -4
- package/rihal/workflows/check-todos.md +8 -8
- package/rihal/workflows/checkpoint-preview.md +1 -1
- package/rihal/workflows/code-review-fix.md +10 -10
- package/rihal/workflows/code-review.md +10 -10
- package/rihal/workflows/complete-milestone.md +5 -5
- package/rihal/workflows/correct-course.md +7 -7
- package/rihal/workflows/council.md +15 -15
- package/rihal/workflows/create-epics-and-stories.md +9 -9
- package/rihal/workflows/create-story.md +11 -11
- package/rihal/workflows/dashboard.md +8 -8
- package/rihal/workflows/debug.md +6 -6
- package/rihal/workflows/decisions.md +5 -5
- package/rihal/workflows/dev-story.md +12 -12
- package/rihal/workflows/diagnose-issues.md +2 -2
- package/rihal/workflows/diff.md +3 -3
- package/rihal/workflows/discuss-phase-power.md +7 -7
- package/rihal/workflows/discuss-phase.md +14 -14
- package/rihal/workflows/discuss.md +9 -9
- package/rihal/workflows/do.md +79 -79
- package/rihal/workflows/docs-update.md +6 -6
- package/rihal/workflows/document-project.md +5 -5
- package/rihal/workflows/enable-hooks.md +5 -5
- package/rihal/workflows/execute-sprint.md +3 -3
- package/rihal/workflows/execute.md +28 -28
- package/rihal/workflows/explore.md +5 -5
- package/rihal/workflows/export-to-github.md +5 -5
- package/rihal/workflows/forensics.md +8 -8
- package/rihal/workflows/from-template.md +8 -8
- package/rihal/workflows/health.md +11 -11
- package/rihal/workflows/help.md +117 -117
- package/rihal/workflows/import.md +4 -4
- package/rihal/workflows/inbox.md +8 -8
- package/rihal/workflows/init.md +23 -23
- package/rihal/workflows/insert-phase.md +9 -9
- package/rihal/workflows/install.md +3 -3
- package/rihal/workflows/karpathy-audit.md +11 -11
- package/rihal/workflows/list-plans.md +8 -8
- package/rihal/workflows/list-workspaces.md +7 -7
- package/rihal/workflows/map-codebase.md +5 -5
- package/rihal/workflows/milestone-summary.md +7 -7
- package/rihal/workflows/new-milestone.md +11 -11
- package/rihal/workflows/new-project-research.md +1 -1
- package/rihal/workflows/new-project-roadmap.md +8 -8
- package/rihal/workflows/new-project.md +32 -32
- package/rihal/workflows/new-workspace.md +7 -7
- package/rihal/workflows/next.md +13 -13
- package/rihal/workflows/note.md +7 -7
- package/rihal/workflows/notify-test.md +6 -6
- package/rihal/workflows/pause-work.md +6 -6
- package/rihal/workflows/plan-milestone-gaps.md +7 -7
- package/rihal/workflows/plan.md +28 -28
- package/rihal/workflows/plant-seed.md +3 -3
- package/rihal/workflows/pr-branch.md +1 -1
- package/rihal/workflows/prfaq.md +1 -1
- package/rihal/workflows/profile-user.md +5 -5
- package/rihal/workflows/progress.md +6 -6
- package/rihal/workflows/quick.md +12 -12
- package/rihal/workflows/remove-phase.md +6 -6
- package/rihal/workflows/remove-workspace.md +8 -8
- package/rihal/workflows/replay.md +8 -8
- package/rihal/workflows/rerun.md +5 -5
- package/rihal/workflows/research-phase.md +2 -2
- package/rihal/workflows/resume-work.md +10 -10
- package/rihal/workflows/review-adversarial.md +4 -4
- package/rihal/workflows/review-edge-case-hunter.md +5 -5
- package/rihal/workflows/review.md +11 -11
- package/rihal/workflows/scan.md +9 -9
- package/rihal/workflows/secure-phase.md +8 -8
- package/rihal/workflows/session-report.md +6 -6
- package/rihal/workflows/settings.md +15 -15
- package/rihal/workflows/ship.md +11 -11
- package/rihal/workflows/show.md +2 -2
- package/rihal/workflows/sprint-planning.md +13 -13
- package/rihal/workflows/sprint-status.md +10 -10
- package/rihal/workflows/stats.md +6 -6
- package/rihal/workflows/status.md +15 -7
- package/rihal/workflows/ui-phase.md +8 -8
- package/rihal/workflows/ui-review.md +5 -5
- package/rihal/workflows/undo.md +17 -17
- package/rihal/workflows/update.md +12 -12
- package/rihal/workflows/validate-phase.md +5 -5
- package/rihal/workflows/verify-work.md +18 -18
- package/rihal/workflows/why.md +9 -9
- package/rihal/workflows/workstream.md +11 -11
- package/server/lib/html/client.js +45 -45
package/CONTRIBUTING.md
CHANGED
|
@@ -30,7 +30,7 @@ A command file is tiny. It registers a slash command in Claude Code's UI and poi
|
|
|
30
30
|
|
|
31
31
|
```markdown
|
|
32
32
|
---
|
|
33
|
-
name: rihal
|
|
33
|
+
name: rihal-prfaq
|
|
34
34
|
description: Working Backwards PRFAQ challenge
|
|
35
35
|
allowed-tools: [Read, Write, Agent, AskUserQuestion, WebSearch]
|
|
36
36
|
---
|
|
@@ -40,14 +40,14 @@ allowed-tools: [Read, Write, Agent, AskUserQuestion, WebSearch]
|
|
|
40
40
|
|
|
41
41
|
That `@-include` line tells Claude to load the target file's contents as context. Without a command file, a skill is unreachable via `/` — it can only be triggered by describing the task in natural language.
|
|
42
42
|
|
|
43
|
-
**Rule:** Every capability intended to be user-typed as `/rihal
|
|
43
|
+
**Rule:** Every capability intended to be user-typed as `/rihal-something` needs a matching `rihal/commands/something.md`.
|
|
44
44
|
|
|
45
45
|
### Workflows — orchestration logic
|
|
46
46
|
|
|
47
47
|
Workflows are prose instructions — markdown files Claude reads as a script to follow. They handle control flow: read state, ask a question, dispatch to a sub-workflow, report results. Most slash commands point to a workflow:
|
|
48
48
|
|
|
49
49
|
```
|
|
50
|
-
/rihal
|
|
50
|
+
/rihal-audit → commands/audit.md → @workflows/audit.md
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
Workflows are the right tool when the task is a sequence of steps that Claude drives (check state → ask user → run something → report). They should not contain deep domain knowledge — that belongs in skills.
|
|
@@ -74,7 +74,7 @@ rihal/skills/actions/1-analysis/rihal-prfaq/
|
|
|
74
74
|
Skills are the right tool when the task has multiple stages, needs sub-agent parallelism, or carries domain-specific coaching logic (e.g., how to run a PRFAQ gauntlet, how to do a Karpathy code review).
|
|
75
75
|
|
|
76
76
|
Skills have **two activation paths**:
|
|
77
|
-
1. **Via command** — `/rihal
|
|
77
|
+
1. **Via command** — `/rihal-prfaq` loads the SKILL.md directly
|
|
78
78
|
2. **Phrase-activated** — when a user describes the task, Claude picks up the skill from its `description` field in the YAML frontmatter
|
|
79
79
|
|
|
80
80
|
### Agents — focused specialists
|
|
@@ -85,12 +85,12 @@ There are two kinds:
|
|
|
85
85
|
|
|
86
86
|
**Sub-agents** live inside skill folders (`rihal/skills/agents/*/SKILL.md`). They're invoked by their parent skill, not by the user directly. Example: the PRFAQ skill spawns `artifact-analyzer` and `web-researcher` in parallel during Stage 1.
|
|
87
87
|
|
|
88
|
-
**Council agents** live in `rihal/agents/*.md`. They're the named characters (Waleed, Hanzla, Fatima, Sadiq…) that `/rihal
|
|
88
|
+
**Council agents** live in `rihal/agents/*.md`. They're the named characters (Waleed, Hanzla, Fatima, Sadiq…) that `/rihal-council` assembles into a panel. These are installed to `.claude/agents/` and can be spawned from any workflow.
|
|
89
89
|
|
|
90
90
|
### How they chain for a real request
|
|
91
91
|
|
|
92
92
|
```
|
|
93
|
-
User types: /rihal
|
|
93
|
+
User types: /rihal-council "Should we use Redis?"
|
|
94
94
|
│
|
|
95
95
|
commands/council.md ← slash command entry
|
|
96
96
|
│ @-includes
|
|
@@ -108,7 +108,7 @@ User types: /rihal:council "Should we use Redis?"
|
|
|
108
108
|
A more complex chain involving a skill:
|
|
109
109
|
|
|
110
110
|
```
|
|
111
|
-
User types: /rihal
|
|
111
|
+
User types: /rihal-prfaq
|
|
112
112
|
│
|
|
113
113
|
commands/prfaq.md
|
|
114
114
|
│ @-includes
|
|
@@ -128,10 +128,10 @@ User types: /rihal:prfaq
|
|
|
128
128
|
|
|
129
129
|
| I want to… | Edit this |
|
|
130
130
|
|-----------|-----------|
|
|
131
|
-
| Add a new `/rihal
|
|
131
|
+
| Add a new `/rihal-something` slash command | Create `rihal/commands/something.md` pointing to a workflow or skill |
|
|
132
132
|
| Change the steps in an existing command | Edit the workflow it points to |
|
|
133
133
|
| Improve how a persona thinks (Hanzla, Waleed, etc.) | Edit `rihal/skills/agents/<name>/SKILL.md` or `rihal/agents/<name>.md` |
|
|
134
|
-
| Add a new agent to `/rihal
|
|
134
|
+
| Add a new agent to `/rihal-council` | Edit `rihal/agents/team.yaml` + add agent file |
|
|
135
135
|
| Improve a complex multi-stage task (PRFAQ, code review, etc.) | Edit the skill's stage reference files |
|
|
136
136
|
| Add a new skill triggered by natural language | Create `rihal/skills/actions/<category>/<name>/SKILL.md` — no command file needed if slash is not required |
|
|
137
137
|
| Fix a broken `@-include` reference | Check that the target file exists at `.rihal/<path>` after install |
|
package/README.md
CHANGED
|
@@ -44,7 +44,7 @@ Rihal Code packages a lot. To keep things approachable, everything is organized
|
|
|
44
44
|
|
|
45
45
|
**Brand new?** Do the [Golden Path](docs/TIERS.md#-starter--the-golden-path): scaffold → PRD → stories → sprint → dev → review → status. Seven skills, one project, end-to-end.
|
|
46
46
|
|
|
47
|
-
> **v2.0 — Rihal Brain.** v1 was a generic AI-engineering methodology. v2 keeps all of that and adds the Rihal context layer on top: standards, guides, and institutional knowledge pulled fresh from Rihal's own repos on install and on `/rihal
|
|
47
|
+
> **v2.0 — Rihal Brain.** v1 was a generic AI-engineering methodology. v2 keeps all of that and adds the Rihal context layer on top: standards, guides, and institutional knowledge pulled fresh from Rihal's own repos on install and on `/rihal-update`. See [`CHANGELOG.md`](CHANGELOG.md) and the [v2.0 milestone](https://github.com/hanzlahabib/rihal-code/milestone/4).
|
|
48
48
|
|
|
49
49
|
---
|
|
50
50
|
|
|
@@ -56,7 +56,7 @@ Most AI tools give you one assistant pretending to be everything. **Rihal Code g
|
|
|
56
56
|
- **95 slash commands** covering research, planning, execution, verification, and recovery
|
|
57
57
|
- **80 skills** including Memory Bank primitives, 11 engineering-rigor skills (TDD, harden, perf, debug, trim, etc.), and 8 real-pain skills (auth-audit, mvp-graduate, deploy-unify, etc.)
|
|
58
58
|
- **Persistent project memory** at `.rihal/memory/` — checked into git, visible in the Diwan dashboard, lossless distillates for fast LLM hydration
|
|
59
|
-
- **3 execution modes**: parallel debate (`/rihal
|
|
59
|
+
- **3 execution modes**: parallel debate (`/rihal-council`), sequential pipelines (`/rihal-chain`), and quick-sync (`/rihal-discuss`)
|
|
60
60
|
- **File-based state** in `.rihal/` that every workflow reads and updates
|
|
61
61
|
- **Intent guards** on every workflow — catch wrong commands early with copy-paste redirects
|
|
62
62
|
- **Karpathy-inspired coding guidelines** wired into every code-writing agent
|
|
@@ -90,14 +90,14 @@ One unified installer. Pure file shipping, no runtime dependencies. Installs int
|
|
|
90
90
|
- `rihal/brain/` — Rihal standards pulled from upstream (PR / commit / architecture docs)
|
|
91
91
|
- `.planning/` — where your artifacts land (council sessions, plans, chains, summaries)
|
|
92
92
|
|
|
93
|
-
Restart Claude Code (or your IDE), type `/`, and every `rihal
|
|
93
|
+
Restart Claude Code (or your IDE), type `/`, and every `rihal-*` command appears.
|
|
94
94
|
|
|
95
|
-
Update anytime with `npx @hanzlaa/rcode update` (or `/rihal
|
|
95
|
+
Update anytime with `npx @hanzlaa/rcode update` (or `/rihal-update` inside a Claude session).
|
|
96
96
|
|
|
97
97
|
### Then begin the rihla
|
|
98
98
|
|
|
99
99
|
```
|
|
100
|
-
/rihal
|
|
100
|
+
/rihal-init
|
|
101
101
|
```
|
|
102
102
|
|
|
103
103
|
Detects your project state (fresh / existing-with-no-rihal / returning), asks a few configuration questions, and routes you to the right first action.
|
|
@@ -123,14 +123,14 @@ npx @hanzlaa/rcode install --ide gemini
|
|
|
123
123
|
## 90-second tour
|
|
124
124
|
|
|
125
125
|
```
|
|
126
|
-
/rihal
|
|
127
|
-
/rihal
|
|
128
|
-
/rihal
|
|
129
|
-
/rihal
|
|
130
|
-
/rihal
|
|
131
|
-
/rihal
|
|
132
|
-
/rihal
|
|
133
|
-
/rihal
|
|
126
|
+
/rihal-do → interactive router
|
|
127
|
+
/rihal-council should I rewrite auth? → 5 agents debate in parallel, 2 rounds
|
|
128
|
+
/rihal-discuss waleed what stack for saas? → single expert, fast
|
|
129
|
+
/rihal-chain research-plan dubai affiliate → Mariam → Hussain-PM → Planner pipeline
|
|
130
|
+
/rihal-plan --research build a rental app → researcher grounds, plan-checker verifies
|
|
131
|
+
/rihal-execute .planning/plans/01/PLAN.md → atomic commits + post-gates
|
|
132
|
+
/rihal-status → phases, decisions, blockers, sessions
|
|
133
|
+
/rihal-code-review HEAD~5..HEAD --karpathy → audit changes vs 4 coding principles
|
|
134
134
|
```
|
|
135
135
|
|
|
136
136
|
---
|
|
@@ -160,7 +160,7 @@ npx @hanzlaa/rcode install --ide gemini
|
|
|
160
160
|
phases/01-name/PLAN.md — plans organized by phase number (01, 02, 02.1, etc.)
|
|
161
161
|
council-sessions/ — debate artifacts
|
|
162
162
|
chains/ — pipeline outputs (RESEARCH.md → SCOPE.md → PLAN.md)
|
|
163
|
-
notes/ — quick notes from /rihal
|
|
163
|
+
notes/ — quick notes from /rihal-note
|
|
164
164
|
HANDOFF.json — pause-work checkpoint
|
|
165
165
|
.continue-here.md — human-readable handoff summary
|
|
166
166
|
```
|
|
@@ -193,38 +193,38 @@ npx @hanzlaa/rcode install --ide gemini
|
|
|
193
193
|
|
|
194
194
|
## Three modes, three mental models
|
|
195
195
|
|
|
196
|
-
### 🏛️ `/rihal
|
|
196
|
+
### 🏛️ `/rihal-council` — Parallel debate
|
|
197
197
|
|
|
198
198
|
3-5 agents answer simultaneously in Round 1, then Round 2 lets each agent challenge the others' Round 1 responses. Result: one session artifact with all voices + orchestrator note flagging the sharpest disagreement.
|
|
199
199
|
|
|
200
200
|
**Best for:** strategic decisions where you want disagreement, not consensus.
|
|
201
201
|
|
|
202
202
|
```
|
|
203
|
-
/rihal
|
|
203
|
+
/rihal-council should we migrate from monolith to microservices?
|
|
204
204
|
```
|
|
205
205
|
|
|
206
|
-
### 🔗 `/rihal
|
|
206
|
+
### 🔗 `/rihal-chain` — Sequential pipeline
|
|
207
207
|
|
|
208
208
|
Each agent runs after the previous one finishes, reading that agent's artifact as input. Result: a typed artifact per stage (RESEARCH.md → SCOPE.md → PLAN.md) in `.planning/chains/`.
|
|
209
209
|
|
|
210
210
|
**Best for:** when you know roughly what you want and each specialist needs to do their part in order.
|
|
211
211
|
|
|
212
212
|
```
|
|
213
|
-
/rihal
|
|
214
|
-
/rihal
|
|
215
|
-
/rihal
|
|
213
|
+
/rihal-chain research-plan dubai affiliate site for mobile accessories
|
|
214
|
+
/rihal-chain feasibility migrate postgres to neon serverless
|
|
215
|
+
/rihal-chain gtm-to-build saas bookkeeping in oman
|
|
216
216
|
```
|
|
217
217
|
|
|
218
|
-
Presets: `research-plan` · `feasibility` · `gtm-to-build` · `full-discovery`. Or custom: `/rihal
|
|
218
|
+
Presets: `research-plan` · `feasibility` · `gtm-to-build` · `full-discovery`. Or custom: `/rihal-chain mariam,waleed,fatima "your topic"`.
|
|
219
219
|
|
|
220
|
-
### 💬 `/rihal
|
|
220
|
+
### 💬 `/rihal-discuss` — Single agent, quick-sync
|
|
221
221
|
|
|
222
222
|
One agent, one round, conversational tone, no mandatory artifact. Feels like texting one colleague.
|
|
223
223
|
|
|
224
224
|
```
|
|
225
|
-
/rihal
|
|
226
|
-
/rihal
|
|
227
|
-
/rihal
|
|
225
|
+
/rihal-discuss waleed can we use postgres jsonb for this?
|
|
226
|
+
/rihal-discuss fatima is this release ready?
|
|
227
|
+
/rihal-discuss what's the kill criterion for this project?
|
|
228
228
|
```
|
|
229
229
|
|
|
230
230
|
If no agent named, the panel scorer picks the top match.
|
|
@@ -238,10 +238,10 @@ If no agent named, the panel scorer picks the top match.
|
|
|
238
238
|
Run the wrong command and you get a single-line copy-paste redirect — not a useless output.
|
|
239
239
|
|
|
240
240
|
```
|
|
241
|
-
/rihal
|
|
241
|
+
/rihal-plan should we use postgres or mongo?
|
|
242
242
|
⚠ That's a decision question, not a planning input.
|
|
243
243
|
Copy-paste this to ask the council instead:
|
|
244
|
-
/rihal
|
|
244
|
+
/rihal-council should we use postgres or mongo?
|
|
245
245
|
```
|
|
246
246
|
|
|
247
247
|
Every workflow has a Step 0.5 intent detector.
|
|
@@ -251,19 +251,19 @@ Every workflow has a Step 0.5 intent detector.
|
|
|
251
251
|
The classifier recognizes `dubai`, `affiliate`, `bnanai`, `karobar`, `site banana`, `دبئی`, `مارکیٹ`, `کاروبار` and many more. Mariam leads for GCC/MENA market questions.
|
|
252
252
|
|
|
253
253
|
```
|
|
254
|
-
/rihal
|
|
254
|
+
/rihal-council yar affiliate site bnanai hai dubai ma for quick bucks
|
|
255
255
|
→ panel: [mariam, hussain-pm, sadiq]
|
|
256
256
|
```
|
|
257
257
|
|
|
258
258
|
### PRFAQ — validate before you build
|
|
259
259
|
|
|
260
|
-
Amazon's "Working Backwards" method: write the finished-product press release *before* writing a line of code. If you can't write a compelling press release, the product isn't ready. `/rihal
|
|
260
|
+
Amazon's "Working Backwards" method: write the finished-product press release *before* writing a line of code. If you can't write a compelling press release, the product isn't ready. `/rihal-prfaq` runs a 5-stage coaching gauntlet — Ignition → Press Release → Customer FAQ → Internal FAQ → Verdict — and outputs a battle-hardened concept document plus a PRD distillate ready for `/rihal-create-prd`.
|
|
261
261
|
|
|
262
262
|
**When to use it:** Any time a PM or engineer wants to validate whether an idea is worth building before committing sprint capacity. The skill challenges vague thinking, enforces customer-first framing, and gives a build/refine/kill verdict.
|
|
263
263
|
|
|
264
264
|
```
|
|
265
|
-
/rihal
|
|
266
|
-
/rihal
|
|
265
|
+
/rihal-prfaq → interactive gauntlet
|
|
266
|
+
/rihal-prfaq --headless --customer "..." --problem "..." --solution "..." → autonomous first draft
|
|
267
267
|
```
|
|
268
268
|
|
|
269
269
|
### Karpathy coding guidelines
|
|
@@ -275,23 +275,23 @@ Amazon's "Working Backwards" method: write the finished-product press release *b
|
|
|
275
275
|
3. **Surgical changes** — touch only what's needed, match existing style
|
|
276
276
|
4. **Goal-driven execution** — define verifiable success criteria
|
|
277
277
|
|
|
278
|
-
`/rihal
|
|
278
|
+
`/rihal-code-review --karpathy` runs these 4 principles as a post-hoc audit against any diff or phase. Use it after implementation to catch bloated, over-engineered, or scope-creeping changes before they land in a PR.
|
|
279
279
|
|
|
280
280
|
```
|
|
281
|
-
/rihal
|
|
282
|
-
/rihal
|
|
281
|
+
/rihal-code-review HEAD~5..HEAD --karpathy
|
|
282
|
+
/rihal-code-review 03 --files=src/auth/ --karpathy
|
|
283
283
|
```
|
|
284
284
|
|
|
285
285
|
### Plan verification + post-execute gates
|
|
286
286
|
|
|
287
|
-
`/rihal
|
|
287
|
+
`/rihal-plan` runs `rihal-plan-checker` after the planner writes PLAN.md. On failure, loops back to planner with feedback (max 2 retries).
|
|
288
288
|
|
|
289
|
-
`/rihal
|
|
289
|
+
`/rihal-execute` runs `rihal-integration-checker` (cross-phase E2E) and `rihal-nyquist-auditor` (test coverage) after completion. Both append to SUMMARY.md.
|
|
290
290
|
|
|
291
291
|
### Model profiles
|
|
292
292
|
|
|
293
293
|
```bash
|
|
294
|
-
/rihal
|
|
294
|
+
/rihal-settings # interactive config
|
|
295
295
|
```
|
|
296
296
|
|
|
297
297
|
- **quality** — opus/sonnet-4.6 for reasoning agents
|
|
@@ -302,8 +302,8 @@ Amazon's "Working Backwards" method: write the finished-product press release *b
|
|
|
302
302
|
### Session handoff
|
|
303
303
|
|
|
304
304
|
```
|
|
305
|
-
/rihal
|
|
306
|
-
/rihal
|
|
305
|
+
/rihal-pause-work → writes .rihal/HANDOFF.json + .continue-here.md
|
|
306
|
+
/rihal-resume-work → reads HANDOFF, surfaces blocking constraints
|
|
307
307
|
```
|
|
308
308
|
|
|
309
309
|
---
|
|
@@ -315,16 +315,16 @@ Recent additions in this session:
|
|
|
315
315
|
- **69 slash commands** across 3 modes and 3 modules (up from 64)
|
|
316
316
|
- **Numeric ID system** — milestones (M1, M2), phases (01, 02, 02.1), plans (01.01, 02.03), tasks (01.01.01) with decimal insertion for urgent inserts
|
|
317
317
|
- **Intent guards** (`Step 0.5`) — every workflow detects mismatched intent and redirects instead of failing
|
|
318
|
-
- **Plan-checker loop** — `/rihal
|
|
319
|
-
- **Post-execute gates** — `/rihal
|
|
318
|
+
- **Plan-checker loop** — `/rihal-plan` now verifies file existence and symbol definitions; loops back to planner on validation failure
|
|
319
|
+
- **Post-execute gates** — `/rihal-execute` runs integration-checker (E2E) and nyquist-auditor (coverage) as hard gates
|
|
320
320
|
- **Multilingual classifier** — Roman Urdu, Arabic, English with cultural signal routing (Mariam leads GCC/MENA)
|
|
321
321
|
- **Karpathy guidelines enforcement** — 4 coding principles baked into every code-writing agent
|
|
322
322
|
- **Global agents** — customize agents in `~/.rihal/agents/` without forking the repo
|
|
323
323
|
- **Multi-IDE installer** — support for Claude Code, Cursor, Gemini CLI
|
|
324
324
|
- **Hooks system** — opt-in pre-edit, pre-workflow, post-commit enforcement
|
|
325
|
-
- **Session pause/resume** — `/rihal
|
|
326
|
-
- **Workspace isolation** — `/rihal
|
|
327
|
-
- **Decimal phase insertion** — `/rihal
|
|
325
|
+
- **Session pause/resume** — `/rihal-pause-work` + `/rihal-resume-work` with HANDOFF.json
|
|
326
|
+
- **Workspace isolation** — `/rihal-new-workspace` for parallel tracks
|
|
327
|
+
- **Decimal phase insertion** — `/rihal-insert-phase` for urgent mid-cycle work
|
|
328
328
|
|
|
329
329
|
---
|
|
330
330
|
|
|
@@ -370,7 +370,7 @@ Recent additions in this session:
|
|
|
370
370
|
|
|
371
371
|
## Configuration
|
|
372
372
|
|
|
373
|
-
`.rihal/config.yaml` — edit directly or run `/rihal
|
|
373
|
+
`.rihal/config.yaml` — edit directly or run `/rihal-settings`:
|
|
374
374
|
|
|
375
375
|
```yaml
|
|
376
376
|
user_name: "Hanzla"
|
|
@@ -402,7 +402,7 @@ View formatted:
|
|
|
402
402
|
```bash
|
|
403
403
|
node .rihal/bin/rihal-tools.cjs state read
|
|
404
404
|
# or
|
|
405
|
-
/rihal
|
|
405
|
+
/rihal-status
|
|
406
406
|
```
|
|
407
407
|
|
|
408
408
|
---
|
|
@@ -410,7 +410,7 @@ node .rihal/bin/rihal-tools.cjs state read
|
|
|
410
410
|
## Hooks (opt-in)
|
|
411
411
|
|
|
412
412
|
```bash
|
|
413
|
-
/rihal
|
|
413
|
+
/rihal-enable-hooks
|
|
414
414
|
```
|
|
415
415
|
|
|
416
416
|
Installs 3 opt-in hooks into `.claude/settings.json`:
|
|
@@ -424,9 +424,9 @@ Installs 3 opt-in hooks into `.claude/settings.json`:
|
|
|
424
424
|
|
|
425
425
|
| Module | Contents |
|
|
426
426
|
|--------|----------|
|
|
427
|
-
| **core** | 5 council agents, `/rihal
|
|
428
|
-
| **execution** | Executor, planner, verifier + checker agents, `/rihal
|
|
429
|
-
| **discovery** | Codebase-mapper, project-researcher, roadmapper, `/rihal
|
|
427
|
+
| **core** | 5 council agents, `/rihal-council`, `/rihal-discuss`, `/rihal-status`, `/rihal-do`, `/rihal-help`, state management |
|
|
428
|
+
| **execution** | Executor, planner, verifier + checker agents, `/rihal-execute`, `/rihal-plan`, `/rihal-quick`, `/rihal-debug`, `/rihal-audit-fix`, `/rihal-undo` |
|
|
429
|
+
| **discovery** | Codebase-mapper, project-researcher, roadmapper, `/rihal-new-project`, `/rihal-map-codebase`, `/rihal-scan`, `/rihal-explore`, `/rihal-code-review`, `/rihal-docs-update` |
|
|
430
430
|
|
|
431
431
|
Full install = all 3 modules = 201 files.
|
|
432
432
|
|
package/cli/context.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* prints a warning when stale
|
|
14
14
|
*
|
|
15
15
|
* The refresh does NOT rewrite active.md or project-brief.md — that's
|
|
16
|
-
* /rihal
|
|
16
|
+
* /rihal-init's job (the scan requires an LLM). --refresh just stores the
|
|
17
17
|
* current fingerprint so the next check sees things as fresh.
|
|
18
18
|
*/
|
|
19
19
|
|
|
@@ -117,7 +117,7 @@ function printReport(cwd) {
|
|
|
117
117
|
console.log();
|
|
118
118
|
|
|
119
119
|
if (report.status !== 'fresh') {
|
|
120
|
-
console.log(` ➡ Refresh with: /rihal
|
|
120
|
+
console.log(` ➡ Refresh with: /rihal-init (in your editor)`);
|
|
121
121
|
console.log();
|
|
122
122
|
}
|
|
123
123
|
}
|
|
@@ -125,7 +125,7 @@ function printReport(cwd) {
|
|
|
125
125
|
/**
|
|
126
126
|
* --refresh: recompute and save the fingerprint to .rihal/state.json.
|
|
127
127
|
* Only use this when you know the memory bank was actually refreshed
|
|
128
|
-
* (e.g. by /rihal
|
|
128
|
+
* (e.g. by /rihal-init running end-to-end). Does NOT rewrite context files.
|
|
129
129
|
*/
|
|
130
130
|
function doRefresh(cwd) {
|
|
131
131
|
ensureRihalDir(cwd);
|
|
@@ -161,7 +161,7 @@ if command -v rcode >/dev/null 2>&1; then
|
|
|
161
161
|
output=$(rcode context --check 2>&1)
|
|
162
162
|
if [ $? -ne 0 ]; then
|
|
163
163
|
echo ""
|
|
164
|
-
echo "⚠ Rihal memory bank is stale — run /rihal
|
|
164
|
+
echo "⚠ Rihal memory bank is stale — run /rihal-init in your editor to refresh."
|
|
165
165
|
echo " $(echo "$output" | grep '•' | head -1 | sed 's/^ *//')"
|
|
166
166
|
fi
|
|
167
167
|
fi
|
package/cli/doctor.js
CHANGED
|
@@ -190,7 +190,7 @@ function runPreflight(cwd, packageRoot) {
|
|
|
190
190
|
checks.push({
|
|
191
191
|
label: 'Memory bank',
|
|
192
192
|
status: 'warn',
|
|
193
|
-
message: 'never initialized (run /rihal
|
|
193
|
+
message: 'never initialized (run /rihal-init to populate)',
|
|
194
194
|
});
|
|
195
195
|
} else {
|
|
196
196
|
checks.push({
|
|
@@ -78,18 +78,18 @@ function discoverRealSkills(packageRoot) {
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
function generateStub(cmdName, commandFm, version) {
|
|
81
|
-
const desc = commandFm.description || `Slash command shortcut for /rihal
|
|
81
|
+
const desc = commandFm.description || `Slash command shortcut for /rihal-${cmdName}.`;
|
|
82
82
|
const triggers = [
|
|
83
83
|
`rihal ${cmdName}`,
|
|
84
|
-
`rihal
|
|
85
|
-
`/rihal
|
|
84
|
+
`rihal-${cmdName}`,
|
|
85
|
+
`/rihal-${cmdName}`,
|
|
86
86
|
];
|
|
87
87
|
|
|
88
88
|
return `---
|
|
89
89
|
name: rihal-${cmdName}
|
|
90
90
|
description: >
|
|
91
91
|
${desc.replace(/\n/g, ' ')}
|
|
92
|
-
Sidebar entry — invokes the same workflow as /rihal
|
|
92
|
+
Sidebar entry — invokes the same workflow as /rihal-${cmdName}.
|
|
93
93
|
triggers:
|
|
94
94
|
${triggers.map((t) => ` - "${t}"`).join('\n')}
|
|
95
95
|
user-invocable: true
|
|
@@ -105,27 +105,27 @@ install or update. To customise, create a sibling \`.local.md\` file (which
|
|
|
105
105
|
is preserved across installs) or modify the source command at
|
|
106
106
|
rihal/commands/${cmdName}.md.
|
|
107
107
|
|
|
108
|
-
This stub exists so the slash command /rihal
|
|
108
|
+
This stub exists so the slash command /rihal-${cmdName} appears in VS Code's
|
|
109
109
|
Claude Code sidebar (which lists skills only, not slash commands). The
|
|
110
|
-
behaviour is identical to /rihal
|
|
110
|
+
behaviour is identical to /rihal-${cmdName} — both invoke the workflow at
|
|
111
111
|
.rihal/workflows/${cmdName}.md.
|
|
112
112
|
-->
|
|
113
113
|
|
|
114
114
|
## Overview
|
|
115
115
|
|
|
116
|
-
Sidebar entry for the \`/rihal
|
|
116
|
+
Sidebar entry for the \`/rihal-${cmdName}\` slash command. Phrase-activated alternative invocation route.
|
|
117
117
|
|
|
118
118
|
## Workflow
|
|
119
119
|
|
|
120
|
-
Read and execute \`@.rihal/workflows/${cmdName}.md\` end-to-end. The behaviour is the same as invoking \`/rihal
|
|
120
|
+
Read and execute \`@.rihal/workflows/${cmdName}.md\` end-to-end. The behaviour is the same as invoking \`/rihal-${cmdName}\` directly.
|
|
121
121
|
|
|
122
122
|
## Output Format
|
|
123
123
|
|
|
124
|
-
Identical to \`/rihal
|
|
124
|
+
Identical to \`/rihal-${cmdName}\`. See the workflow file for the canonical output spec.
|
|
125
125
|
|
|
126
126
|
## Examples
|
|
127
127
|
|
|
128
|
-
**Happy path** — say "rihal ${cmdName}" or "/rihal
|
|
128
|
+
**Happy path** — say "rihal ${cmdName}" or "/rihal-${cmdName}" → workflow runs identically either way.
|
|
129
129
|
|
|
130
130
|
**Negative — looking for the canonical command file** — see \`rihal/commands/${cmdName}.md\` (the source of truth) and \`rihal/workflows/${cmdName}.md\` (the orchestration logic).
|
|
131
131
|
|
package/cli/install.js
CHANGED
|
@@ -498,7 +498,7 @@ function copyDirRecursive(source, dest) {
|
|
|
498
498
|
|
|
499
499
|
/**
|
|
500
500
|
* Seed .planning/ with starter ROADMAP.md + STATE.md + PROJECT.md so
|
|
501
|
-
* workflows work immediately after install. User can /rihal
|
|
501
|
+
* workflows work immediately after install. User can /rihal-sprint-planning
|
|
502
502
|
* on a fresh install without manual setup.
|
|
503
503
|
*
|
|
504
504
|
* Only seeds if .planning/ROADMAP.md doesn't already exist (preserves user data).
|
|
@@ -548,7 +548,7 @@ function seedStarterPlanning(target, projectName) {
|
|
|
548
548
|
`---\n\n` +
|
|
549
549
|
`## Decisions\n\n_None yet._\n\n` +
|
|
550
550
|
`## Blockers\n\n_None._\n\n` +
|
|
551
|
-
`## Next Action\n\nSay "plan a sprint" or run \`/rihal
|
|
551
|
+
`## Next Action\n\nSay "plan a sprint" or run \`/rihal-sprint-planning\` to break Phase 01 into stories.\n`
|
|
552
552
|
);
|
|
553
553
|
|
|
554
554
|
// Also pre-seed .rihal/state.json with Phase 01 so sprint tools work
|
|
@@ -845,7 +845,7 @@ function buildInstallPlan(ide = 'claude', target = process.cwd()) {
|
|
|
845
845
|
plan.push({ src: f, rel: path.join(relBin, rel), executable: f.endsWith('.cjs') });
|
|
846
846
|
}
|
|
847
847
|
|
|
848
|
-
// .rihal/templates/projects/ — starter templates consumed by /rihal
|
|
848
|
+
// .rihal/templates/projects/ — starter templates consumed by /rihal-from-template
|
|
849
849
|
const projectTemplatesSrc = path.join(SOURCE_ROOT, 'templates', 'projects');
|
|
850
850
|
const relProjectTemplates = path.relative(target, path.join(target, '.rihal', 'templates', 'projects'));
|
|
851
851
|
for (const f of walkFiles(projectTemplatesSrc)) {
|
|
@@ -1572,7 +1572,7 @@ async function install(opts) {
|
|
|
1572
1572
|
console.log('');
|
|
1573
1573
|
console.log(' ' + warn('config.yaml has validation errors:'));
|
|
1574
1574
|
for (const e of validation.errors) console.log(pc.yellow(e));
|
|
1575
|
-
console.log(dim(' → Edit .rihal/config.yaml to fix, then run /rihal
|
|
1575
|
+
console.log(dim(' → Edit .rihal/config.yaml to fix, then run /rihal-status'));
|
|
1576
1576
|
}
|
|
1577
1577
|
} catch { /* best-effort */ }
|
|
1578
1578
|
|
|
@@ -1593,16 +1593,16 @@ async function install(opts) {
|
|
|
1593
1593
|
ensureDir(path.join(opts.target, '.planning', 'council-sessions'));
|
|
1594
1594
|
|
|
1595
1595
|
// .rihal/context/ — seed stub files so doctor doesn't report "never initialized"
|
|
1596
|
-
// The /rihal
|
|
1596
|
+
// The /rihal-init slash command populates these with real project content.
|
|
1597
1597
|
const contextDir = path.join(opts.target, '.rihal', 'context');
|
|
1598
1598
|
ensureDir(contextDir);
|
|
1599
1599
|
const activeCtx = path.join(contextDir, 'active.md');
|
|
1600
1600
|
const briefCtx = path.join(contextDir, 'project-brief.md');
|
|
1601
1601
|
if (!fs.existsSync(activeCtx)) {
|
|
1602
|
-
fs.writeFileSync(activeCtx, '# Active Context\n\n_Run `/rihal
|
|
1602
|
+
fs.writeFileSync(activeCtx, '# Active Context\n\n_Run `/rihal-init` inside your AI editor to populate this file._\n');
|
|
1603
1603
|
}
|
|
1604
1604
|
if (!fs.existsSync(briefCtx)) {
|
|
1605
|
-
fs.writeFileSync(briefCtx, '# Project Brief\n\n_Run `/rihal
|
|
1605
|
+
fs.writeFileSync(briefCtx, '# Project Brief\n\n_Run `/rihal-init` inside your AI editor to populate this file._\n');
|
|
1606
1606
|
}
|
|
1607
1607
|
|
|
1608
1608
|
// ~/.rihal/agents/ global agents directory
|
|
@@ -1754,13 +1754,13 @@ async function install(opts) {
|
|
|
1754
1754
|
console.log(` ${bold('Next:')}`);
|
|
1755
1755
|
console.log(` cd ${opts.target}`);
|
|
1756
1756
|
console.log(' claude # start Claude Code (reload window if already open)');
|
|
1757
|
-
console.log(' /rihal
|
|
1758
|
-
console.log(' /rihal
|
|
1759
|
-
console.log(' /rihal
|
|
1757
|
+
console.log(' /rihal-progress # where you are, what\'s next');
|
|
1758
|
+
console.log(' /rihal-do # interactive command picker');
|
|
1759
|
+
console.log(' /rihal-council <q> # multi-agent strategic answer');
|
|
1760
1760
|
console.log('');
|
|
1761
1761
|
console.log(dim(' Refresh anytime:'));
|
|
1762
1762
|
console.log(dim(' npx @hanzlaa/rcode@latest install # pull the latest rcode + brain'));
|
|
1763
|
-
console.log(dim(` /rihal
|
|
1763
|
+
console.log(dim(` /rihal-update v${version} # pin rcode to a specific version`));
|
|
1764
1764
|
console.log('');
|
|
1765
1765
|
console.log(dim(' Customize without losing changes on update:'));
|
|
1766
1766
|
console.log(dim(' Create <name>.local.md siblings (e.g. .claude/agents/rihal-waleed.local.md)'));
|
package/cli/lib/memory-bank.cjs
CHANGED
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
*
|
|
10
10
|
* This module detects staleness programmatically by comparing a project
|
|
11
11
|
* fingerprint (git HEAD, package manifest hash, top-level structure hash)
|
|
12
|
-
* against one stored in .rihal/state.json at the last /rihal
|
|
12
|
+
* against one stored in .rihal/state.json at the last /rihal-init run.
|
|
13
13
|
*
|
|
14
14
|
* It is intentionally READ-ONLY + write-fingerprint. The actual scan and
|
|
15
|
-
* rewrite of the memory bank is done by Claude when /rihal
|
|
15
|
+
* rewrite of the memory bank is done by Claude when /rihal-init runs —
|
|
16
16
|
* this library only tells callers WHEN to refresh, not HOW.
|
|
17
17
|
*/
|
|
18
18
|
|
|
@@ -186,7 +186,7 @@ function readState(cwd) {
|
|
|
186
186
|
|
|
187
187
|
/**
|
|
188
188
|
* Persist the init fingerprint into .rihal/state.json under `memory_bank`.
|
|
189
|
-
* Called by /rihal
|
|
189
|
+
* Called by /rihal-init (via rihal-code context --refresh) after a scan
|
|
190
190
|
* rewrites context/active.md + context/project-brief.md.
|
|
191
191
|
*/
|
|
192
192
|
function writeFingerprint(cwd) {
|
|
@@ -238,7 +238,7 @@ function checkStaleness(cwd) {
|
|
|
238
238
|
if (!context_files.active && !context_files.brief) {
|
|
239
239
|
return {
|
|
240
240
|
status: 'never',
|
|
241
|
-
reasons: ['memory bank has never been initialized — run /rihal
|
|
241
|
+
reasons: ['memory bank has never been initialized — run /rihal-init'],
|
|
242
242
|
current,
|
|
243
243
|
stored,
|
|
244
244
|
context_files,
|
|
@@ -264,7 +264,7 @@ function checkStaleness(cwd) {
|
|
|
264
264
|
if (!stored) {
|
|
265
265
|
return {
|
|
266
266
|
status: 'stale',
|
|
267
|
-
reasons: ['run /rihal
|
|
267
|
+
reasons: ['run /rihal-init in your editor to populate project context'],
|
|
268
268
|
current,
|
|
269
269
|
stored,
|
|
270
270
|
context_files,
|
package/cli/set-mode.js
CHANGED
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
*
|
|
13
13
|
* Affects:
|
|
14
14
|
* - Workflow step files ("halt at menu" vs "pick default and continue")
|
|
15
|
-
* - /rihal
|
|
15
|
+
* - /rihal-kickoff next-step menu (interactive vs auto-continue)
|
|
16
16
|
* - github-sync confirmation prompts (yolo still requires --force-yolo
|
|
17
17
|
* for github mutations — see docs/adr/0001-github-sync-as-cli.md)
|
|
18
|
-
* - /rihal
|
|
18
|
+
* - /rihal-pause and /rihal-resume (yolo skips the confirmation prompt
|
|
19
19
|
* on resume; guided always asks)
|
|
20
20
|
* - All agent skill files that read communication_mode from config
|
|
21
21
|
*/
|
package/cli/uninstall.js
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* --delete-state Also delete .rihal/ (skip prompt)
|
|
20
20
|
* --purge / --all Wipe everything — editor files,
|
|
21
21
|
* .rihal/, .planning/, gitignore block.
|
|
22
|
-
* Use when you want /rihal
|
|
22
|
+
* Use when you want /rihal-init to
|
|
23
23
|
* report "fresh" on next install.
|
|
24
24
|
* --yes / -y Skip the main confirmation
|
|
25
25
|
*/
|
|
@@ -49,7 +49,7 @@ function parseArgs(args) {
|
|
|
49
49
|
opts.yes = true;
|
|
50
50
|
} else if (arg === '--purge' || arg === '--all') {
|
|
51
51
|
// --purge implies --delete-state and removes .planning/ + gitignore block.
|
|
52
|
-
// Use this when you want a clean slate so /rihal
|
|
52
|
+
// Use this when you want a clean slate so /rihal-init reports "fresh" next time.
|
|
53
53
|
opts.purge = true;
|
|
54
54
|
opts.deleteState = true;
|
|
55
55
|
}
|
|
@@ -596,7 +596,7 @@ async function runUninstall(args) {
|
|
|
596
596
|
console.log(` - phases, decisions, progress, artifacts, context`);
|
|
597
597
|
console.log(` - ${plan.stateDir.files} files total`);
|
|
598
598
|
console.log();
|
|
599
|
-
console.log(` If you keep it: /rihal
|
|
599
|
+
console.log(` If you keep it: /rihal-init will report "already configured"`);
|
|
600
600
|
console.log(` and reuse your existing config + history on next install.`);
|
|
601
601
|
console.log(` If you delete it: next install starts fresh — no carry-over.`);
|
|
602
602
|
console.log();
|
|
@@ -652,10 +652,10 @@ async function runUninstall(args) {
|
|
|
652
652
|
}
|
|
653
653
|
|
|
654
654
|
// Hint about the purge flag if the user kept state — closes the user's
|
|
655
|
-
// most common confusion: "I uninstalled but /rihal
|
|
655
|
+
// most common confusion: "I uninstalled but /rihal-init still says configured."
|
|
656
656
|
if (plan.stateDir && fs.existsSync(path.join(cwd, '.rihal'))) {
|
|
657
657
|
console.log();
|
|
658
|
-
console.log(`ℹ .rihal/ state was preserved. /rihal
|
|
658
|
+
console.log(`ℹ .rihal/ state was preserved. /rihal-init will detect this on reinstall.`);
|
|
659
659
|
console.log(` For a fully clean slate next time, use: rcode uninstall --purge`);
|
|
660
660
|
}
|
|
661
661
|
|