@hanzlaa/rcode 3.3.0 → 3.3.1
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/rihal/workflows/audit.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Workflow: rihal
|
|
1
|
+
# Workflow: rihal-audit
|
|
2
2
|
|
|
3
3
|
<purpose>
|
|
4
4
|
Single entry point for every kind of audit. Asks the user *what* to audit
|
|
@@ -17,20 +17,20 @@ and auto-picks the most-relevant target based on project state. In
|
|
|
17
17
|
If `$ARGUMENTS` contains `--help` or `-h`:
|
|
18
18
|
|
|
19
19
|
```
|
|
20
|
-
/rihal
|
|
21
|
-
/rihal
|
|
22
|
-
/rihal
|
|
23
|
-
/rihal
|
|
24
|
-
/rihal
|
|
25
|
-
/rihal
|
|
26
|
-
/rihal
|
|
20
|
+
/rihal-audit # interactive — asks what to audit
|
|
21
|
+
/rihal-audit phase [<NN>] # → /rihal-verify-phase
|
|
22
|
+
/rihal-audit milestone [--strict] # → /rihal-audit-milestone (with synth fallback)
|
|
23
|
+
/rihal-audit uat # → /rihal-audit-uat
|
|
24
|
+
/rihal-audit code [--scope=...] # → /rihal-code-review --karpathy
|
|
25
|
+
/rihal-audit fix # → /rihal-audit-fix
|
|
26
|
+
/rihal-audit work # → /rihal-verify-work
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
**Examples:**
|
|
30
30
|
```
|
|
31
|
-
/rihal
|
|
32
|
-
/rihal
|
|
33
|
-
/rihal
|
|
31
|
+
/rihal-audit
|
|
32
|
+
/rihal-audit milestone --strict
|
|
33
|
+
/rihal-audit phase 03
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
## Step 1 — Resolve mode + arguments
|
|
@@ -94,11 +94,11 @@ sub-workflow.
|
|
|
94
94
|
|
|
95
95
|
| target | precondition | failure message |
|
|
96
96
|
|---|---|---|
|
|
97
|
-
| phase | at least one `.planning/phases/*/PLAN.md` | `No PLAN.md found. Run /rihal
|
|
98
|
-
| milestone | ROADMAP.md exists | `No ROADMAP.md. Run /rihal
|
|
99
|
-
| uat | at least one UAT*.md exists | `No UAT files yet. Run /rihal
|
|
97
|
+
| phase | at least one `.planning/phases/*/PLAN.md` | `No PLAN.md found. Run /rihal-plan first.` |
|
|
98
|
+
| milestone | ROADMAP.md exists | `No ROADMAP.md. Run /rihal-new-milestone first.` |
|
|
99
|
+
| uat | at least one UAT*.md exists | `No UAT files yet. Run /rihal-execute on a phase first.` |
|
|
100
100
|
| code | git repo with at least one commit | `Empty repo — nothing to audit yet.` |
|
|
101
|
-
| fix | a prior audit report exists OR a prior `--report` artefact | `No audit findings yet. Run /rihal
|
|
101
|
+
| fix | a prior audit report exists OR a prior `--report` artefact | `No audit findings yet. Run /rihal-audit first.` |
|
|
102
102
|
| work | inside a git worktree | `Not in a git repo.` |
|
|
103
103
|
|
|
104
104
|
For `milestone` specifically, check the **graceful-degrade** condition
|
|
@@ -112,7 +112,7 @@ if [ "$TARGET" = "milestone" ] && [ "$SUMMARIES" -eq 0 ] && [ "$PLANS" -gt 0 ];
|
|
|
112
112
|
echo " Phases were executed but never formally closed."
|
|
113
113
|
# Offer (yolo: auto-pick 1; guided: ask):
|
|
114
114
|
# 1. Synthesize SUMMARY.md per phase from PLAN.md + git log [recommended]
|
|
115
|
-
# 2. Run /rihal
|
|
115
|
+
# 2. Run /rihal-verify-phase per phase (manual close)
|
|
116
116
|
# 3. Continue audit anyway (will only assess what's documented)
|
|
117
117
|
# 0. Cancel
|
|
118
118
|
fi
|
|
@@ -135,12 +135,12 @@ Run the target's slash command, forwarding remaining args:
|
|
|
135
135
|
|
|
136
136
|
| target | dispatch |
|
|
137
137
|
|---|---|
|
|
138
|
-
| phase | `/rihal
|
|
139
|
-
| milestone | `/rihal
|
|
140
|
-
| uat | `/rihal
|
|
141
|
-
| code | `/rihal
|
|
142
|
-
| fix | `/rihal
|
|
143
|
-
| work | `/rihal
|
|
138
|
+
| phase | `/rihal-verify-phase $REST_ARGS` |
|
|
139
|
+
| milestone | `/rihal-audit-milestone $REST_ARGS` |
|
|
140
|
+
| uat | `/rihal-audit-uat $REST_ARGS` |
|
|
141
|
+
| code | `/rihal-code-review $REST_ARGS --karpathy` |
|
|
142
|
+
| fix | `/rihal-audit-fix $REST_ARGS` |
|
|
143
|
+
| work | `/rihal-verify-work $REST_ARGS` |
|
|
144
144
|
|
|
145
145
|
## Step 6 — Closing summary
|
|
146
146
|
|
|
@@ -153,20 +153,20 @@ Report: {report_path or "(stdout only)"}
|
|
|
153
153
|
Findings: {count}
|
|
154
154
|
|
|
155
155
|
Next:
|
|
156
|
-
/rihal
|
|
157
|
-
/rihal
|
|
158
|
-
/rihal
|
|
156
|
+
/rihal-audit fix — auto-fix findings classified as auto-fixable
|
|
157
|
+
/rihal-audit code — drill into code-quality issues
|
|
158
|
+
/rihal-settings show — review which audit gates are enabled
|
|
159
159
|
```
|
|
160
160
|
|
|
161
161
|
## Success Criteria
|
|
162
162
|
|
|
163
|
-
- [ ] `/rihal
|
|
164
|
-
- [ ] `/rihal
|
|
163
|
+
- [ ] `/rihal-audit` (no args) presents menu in guided mode, auto-picks in yolo
|
|
164
|
+
- [ ] `/rihal-audit milestone` short-circuits the menu
|
|
165
165
|
- [ ] When SUMMARY.md absent but PLAN.md present, milestone offers synthesize/verify/skip — does not dead-halt
|
|
166
166
|
- [ ] Sub-workflow's closing report is surfaced unchanged
|
|
167
167
|
|
|
168
168
|
## On Error
|
|
169
169
|
|
|
170
|
-
- **Sub-workflow not installed** (slash file missing): `Audit subroute '/rihal
|
|
170
|
+
- **Sub-workflow not installed** (slash file missing): `Audit subroute '/rihal-{target}' not found. Run: npx @hanzlaa/rcode install .`
|
|
171
171
|
- **Precondition failed**: print the message from Step 4's table, suggest the unblocking command, STOP.
|
|
172
172
|
- **`.rihal/config.yaml` missing**: treat as `mode: guided`, continue.
|
|
@@ -17,9 +17,9 @@ interpos audit (issue #221) — DO NOT regress.
|
|
|
17
17
|
|
|
18
18
|
2. **NEVER skip the methodology chain on greenfield projects.** Before
|
|
19
19
|
the phase loop runs, the prerequisite check (next step) MUST verify:
|
|
20
|
-
- `.planning/prd.md` exists (else halt → /rihal
|
|
21
|
-
- ROADMAP.md has milestone structure (else halt → /rihal
|
|
22
|
-
- `.planning/epics.md` exists (else halt → /rihal
|
|
20
|
+
- `.planning/prd.md` exists (else halt → /rihal-create-prd)
|
|
21
|
+
- ROADMAP.md has milestone structure (else halt → /rihal-create-milestone)
|
|
22
|
+
- `.planning/epics.md` exists (else halt → /rihal-create-epics-and-stories)
|
|
23
23
|
See issue #219 + #229.
|
|
24
24
|
|
|
25
25
|
3. **NEVER write SPRINT.md directly.** Sprint creation MUST go through
|
|
@@ -66,44 +66,67 @@ If `SKIP_FLAG=false` AND any prerequisite is missing, HALT with a clear message:
|
|
|
66
66
|
⚠ Cannot run autonomous: missing prerequisite — {what}.
|
|
67
67
|
|
|
68
68
|
The autonomous flow assumes a project that has already gone through:
|
|
69
|
-
1. /rihal
|
|
70
|
-
2. /rihal
|
|
71
|
-
3. /rihal
|
|
72
|
-
4. THEN /rihal
|
|
69
|
+
1. /rihal-create-prd → produces .planning/prd.md
|
|
70
|
+
2. /rihal-create-milestone → produces ROADMAP.md with M1..Mn
|
|
71
|
+
3. /rihal-create-epics-and-stories → produces .planning/epics.md
|
|
72
|
+
4. THEN /rihal-autonomous ← you are here
|
|
73
73
|
|
|
74
|
-
Suggested first step: /rihal
|
|
74
|
+
Suggested first step: /rihal-{first-missing-command}
|
|
75
75
|
|
|
76
76
|
If you genuinely want to skip these (rare — usually inverted methodology),
|
|
77
|
-
re-invoke with: /rihal
|
|
77
|
+
re-invoke with: /rihal-autonomous --skip-prerequisites
|
|
78
78
|
```
|
|
79
79
|
|
|
80
80
|
If `SKIP_FLAG=true`: print a warning that downstream workflows may produce low-quality output without upstream artifacts, then proceed.
|
|
81
81
|
|
|
82
82
|
</step>
|
|
83
83
|
|
|
84
|
-
<
|
|
84
|
+
<step name="prepare_branch">
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
## 1b. Prepare Branch
|
|
87
87
|
|
|
88
|
+
Autonomous mode MUST NOT run directly on `main` or `master` without explicit opt-in.
|
|
89
|
+
This prevents accidental commits to the default branch during long autonomous runs.
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "unknown")
|
|
93
|
+
ALLOW_MAIN=""
|
|
94
|
+
if echo "$ARGUMENTS" | grep -q '\-\-allow-main'; then
|
|
95
|
+
ALLOW_MAIN="true"
|
|
96
|
+
fi
|
|
88
97
|
```
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
98
|
+
|
|
99
|
+
**If `CURRENT_BRANCH` is `main` or `master` AND `ALLOW_MAIN` is NOT set:**
|
|
100
|
+
|
|
101
|
+
Create a working branch:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
BRANCH_NAME="rihal/autonomous-${milestone_version}-$(date +%Y%m%d-%H%M%S)"
|
|
105
|
+
git checkout -b "${BRANCH_NAME}"
|
|
92
106
|
```
|
|
93
107
|
|
|
94
|
-
|
|
95
|
-
- `RIHAL ► AUTONOMOUS ▸ Phase {N}/{T}: {Name} [████░░░░] {P}%`
|
|
96
|
-
- `RIHAL ► AUTONOMOUS ▸ LIFECYCLE`
|
|
97
|
-
- `RIHAL ► AUTONOMOUS ▸ COMPLETE 🎉`
|
|
98
|
-
- `RIHAL ► AUTONOMOUS ▸ STOPPED` on blocker
|
|
99
|
-
- `RIHAL ► AUTONOMOUS ▸ --to ${TO_PHASE} REACHED` on range completion
|
|
100
|
-
- `RIHAL ► AUTONOMOUS ▸ PHASE ${ONLY_PHASE} COMPLETE ✓` on --only
|
|
108
|
+
Display:
|
|
101
109
|
|
|
102
|
-
|
|
110
|
+
```
|
|
111
|
+
🔀 Created branch: ${BRANCH_NAME}
|
|
112
|
+
(autonomous mode does not run on main/master — use --allow-main to override)
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**If `CURRENT_BRANCH` is `main` or `master` AND `ALLOW_MAIN` is set:**
|
|
116
|
+
|
|
117
|
+
Display warning:
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
⚠ Running on ${CURRENT_BRANCH} — --allow-main override active
|
|
121
|
+
```
|
|
103
122
|
|
|
104
|
-
|
|
123
|
+
Proceed without branch creation.
|
|
105
124
|
|
|
106
|
-
|
|
125
|
+
**If `CURRENT_BRANCH` is any other branch:** Proceed silently — user intentionally set up a working branch.
|
|
126
|
+
|
|
127
|
+
Store `CURRENT_BRANCH` for the lifecycle step — if autonomous created the branch, it will suggest a PR at completion.
|
|
128
|
+
|
|
129
|
+
</step>
|
|
107
130
|
|
|
108
131
|
<step name="initialize" priority="first">
|
|
109
132
|
|
|
@@ -148,8 +171,8 @@ STATE=$(node .rihal/bin/rihal-tools.cjs state read 2>/dev/null || echo '{}')
|
|
|
148
171
|
|
|
149
172
|
Parse JSON for: `milestone_version`, `milestone_name`, `phase_count`, `completed_phases`, `roadmap_exists`, `state_exists`, `commit_docs`.
|
|
150
173
|
|
|
151
|
-
**If `roadmap_exists` is false:** Error — "No ROADMAP.md found. Run `/rihal
|
|
152
|
-
**If `state_exists` is false:** Error — "No STATE.md found. Run `/rihal
|
|
174
|
+
**If `roadmap_exists` is false:** Error — "No ROADMAP.md found. Run `/rihal-new-milestone` first."
|
|
175
|
+
**If `state_exists` is false:** Error — "No STATE.md found. Run `/rihal-new-milestone` first."
|
|
153
176
|
|
|
154
177
|
Display startup banner:
|
|
155
178
|
|
|
@@ -243,6 +266,16 @@ Use TaskCreate to register a task per incomplete phase.
|
|
|
243
266
|
|
|
244
267
|
## 3. Execute Phase
|
|
245
268
|
|
|
269
|
+
**Before displaying the banner, re-derive T from disk** (compaction guard — same
|
|
270
|
+
logic as iterate step 4.0):
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
PROGRESS_REFRESH=$(node .rihal/bin/rihal-tools.cjs progress init 2>/dev/null)
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
Update `phase_count` and `completed_phases` from the refresh. This ensures
|
|
277
|
+
the banner always shows the correct total, even after context compaction.
|
|
278
|
+
|
|
246
279
|
For the current phase, display the progress banner:
|
|
247
280
|
|
|
248
281
|
```
|
|
@@ -349,7 +382,7 @@ The discuss step in autonomous mode MUST NOT loop. If CONTEXT.md already exists
|
|
|
349
382
|
**If `INTERACTIVE` is set:** Run the standard discuss-phase skill inline (asks interactive questions, waits for user answers):
|
|
350
383
|
|
|
351
384
|
```
|
|
352
|
-
Skill(skill="rihal
|
|
385
|
+
Skill(skill="rihal-discuss-phase", args="${PHASE_NUM}")
|
|
353
386
|
```
|
|
354
387
|
|
|
355
388
|
**If `INTERACTIVE` is NOT set:** Execute the smart_discuss step for this phase (batch table proposals, auto-optimized — see smart_discuss step below).
|
|
@@ -377,7 +410,7 @@ Phase ${PHASE_NUM}: Frontend phase detected — generating UI design contract...
|
|
|
377
410
|
```
|
|
378
411
|
|
|
379
412
|
```
|
|
380
|
-
Skill(skill="rihal
|
|
413
|
+
Skill(skill="rihal-ui-phase", args="${PHASE_NUM}")
|
|
381
414
|
```
|
|
382
415
|
|
|
383
416
|
Verify UI-SPEC was created. If still empty after ui-phase, display a non-blocking warning and proceed to 3b.
|
|
@@ -393,7 +426,7 @@ Task(
|
|
|
393
426
|
description="Plan phase ${PHASE_NUM}: ${PHASE_NAME}",
|
|
394
427
|
subagent_type="rihal-planner",
|
|
395
428
|
run_in_background=true,
|
|
396
|
-
prompt="Run plan-phase for phase ${PHASE_NUM}: Skill(skill=\"rihal
|
|
429
|
+
prompt="Run plan-phase for phase ${PHASE_NUM}: Skill(skill=\"rihal-plan\", args=\"${PHASE_NUM}\")"
|
|
397
430
|
)
|
|
398
431
|
```
|
|
399
432
|
|
|
@@ -402,7 +435,7 @@ Store the agent task_id. After discuss for the next phase completes (or if no ne
|
|
|
402
435
|
**If `INTERACTIVE` is NOT set (default):** Run plan inline as before.
|
|
403
436
|
|
|
404
437
|
```
|
|
405
|
-
Skill(skill="rihal
|
|
438
|
+
Skill(skill="rihal-plan", args="${PHASE_NUM}")
|
|
406
439
|
```
|
|
407
440
|
|
|
408
441
|
Verify plan produced output — check `${PHASE_DIR}` for `*-PLAN.md` or `SPRINT.md`. If none → go to handle_blocker: "Plan phase ${PHASE_NUM} did not produce any plans."
|
|
@@ -416,7 +449,7 @@ Task(
|
|
|
416
449
|
description="Execute phase ${PHASE_NUM}: ${PHASE_NAME}",
|
|
417
450
|
subagent_type="rihal-executor",
|
|
418
451
|
run_in_background=true,
|
|
419
|
-
prompt="Run execute-phase for phase ${PHASE_NUM}: Skill(skill=\"rihal
|
|
452
|
+
prompt="Run execute-phase for phase ${PHASE_NUM}: Skill(skill=\"rihal-execute\", args=\"${PHASE_NUM} --no-transition\")"
|
|
420
453
|
)
|
|
421
454
|
```
|
|
422
455
|
|
|
@@ -425,7 +458,7 @@ Store the agent task_id. The workflow can now start discussing the next phase wh
|
|
|
425
458
|
**If `INTERACTIVE` is NOT set (default):** Run execute inline as before.
|
|
426
459
|
|
|
427
460
|
```
|
|
428
|
-
Skill(skill="rihal
|
|
461
|
+
Skill(skill="rihal-execute", args="${PHASE_NUM} --no-transition")
|
|
429
462
|
```
|
|
430
463
|
|
|
431
464
|
### 3c.5. Code Review and Fix
|
|
@@ -439,12 +472,12 @@ CODE_REVIEW_ENABLED=$(node .rihal/bin/rihal-tools.cjs config 2>/dev/null | grep
|
|
|
439
472
|
If `"false"`: display "Code review skipped (workflow.code_review=false)" and proceed to 3d.
|
|
440
473
|
|
|
441
474
|
```
|
|
442
|
-
Skill(skill="rihal
|
|
475
|
+
Skill(skill="rihal-code-review", args="${PHASE_NUM}")
|
|
443
476
|
```
|
|
444
477
|
|
|
445
478
|
Parse status from REVIEW.md frontmatter. If "clean" or "skipped": proceed to 3d. If findings found: auto-invoke:
|
|
446
479
|
```
|
|
447
|
-
Skill(skill="rihal
|
|
480
|
+
Skill(skill="rihal-code-review-fix", args="${PHASE_NUM} --auto")
|
|
448
481
|
```
|
|
449
482
|
|
|
450
483
|
**Error handling:** If either Skill fails, catch the error, display as non-blocking, and proceed to 3d.
|
|
@@ -505,14 +538,14 @@ Ask user via AskUserQuestion:
|
|
|
505
538
|
On **"Run gap closure"**: Execute gap closure cycle (limit: 1 attempt):
|
|
506
539
|
|
|
507
540
|
```
|
|
508
|
-
Skill(skill="rihal
|
|
541
|
+
Skill(skill="rihal-plan", args="${PHASE_NUM} --gaps")
|
|
509
542
|
```
|
|
510
543
|
|
|
511
544
|
Verify gap plans were created. If none → go to handle_blocker: "Gap closure planning for phase ${PHASE_NUM} did not produce plans."
|
|
512
545
|
|
|
513
546
|
Re-execute:
|
|
514
547
|
```
|
|
515
|
-
Skill(skill="rihal
|
|
548
|
+
Skill(skill="rihal-execute", args="${PHASE_NUM} --no-transition")
|
|
516
549
|
```
|
|
517
550
|
|
|
518
551
|
Re-read verification status. If `passed` or `human_needed`: route normally. If still `gaps_found` after this retry: ask via AskUserQuestion:
|
|
@@ -542,7 +575,7 @@ Phase ${PHASE_NUM}: Frontend phase with UI-SPEC — running UI review audit...
|
|
|
542
575
|
```
|
|
543
576
|
|
|
544
577
|
```
|
|
545
|
-
Skill(skill="rihal
|
|
578
|
+
Skill(skill="rihal-ui-review", args="${PHASE_NUM}")
|
|
546
579
|
```
|
|
547
580
|
|
|
548
581
|
Display the review result summary (score from UI-REVIEW.md if produced). Continue to iterate step regardless of score — UI review is advisory, not blocking.
|
|
@@ -799,6 +832,37 @@ Decisions captured: {count} across {area_count} areas
|
|
|
799
832
|
|
|
800
833
|
## 4. Iterate
|
|
801
834
|
|
|
835
|
+
### 4.0. Refresh Phase Count From Disk (MANDATORY — Compaction Guard)
|
|
836
|
+
|
|
837
|
+
**This step is NON-NEGOTIABLE.** LLM context compaction loses in-memory
|
|
838
|
+
variables. Re-derive `phase_count` and `completed_phases` from disk at the
|
|
839
|
+
START of every iteration — never rely on values held from the initialize step.
|
|
840
|
+
|
|
841
|
+
```bash
|
|
842
|
+
# Re-read the authoritative progress snapshot from the CLI
|
|
843
|
+
PROGRESS_REFRESH=$(node .rihal/bin/rihal-tools.cjs progress init 2>/dev/null)
|
|
844
|
+
```
|
|
845
|
+
|
|
846
|
+
Parse `PROGRESS_REFRESH` JSON and update:
|
|
847
|
+
- `phase_count` ← `PROGRESS_REFRESH.phase_count`
|
|
848
|
+
- `completed_phases` ← `PROGRESS_REFRESH.completed_count`
|
|
849
|
+
- `T` (for banner display) ← `phase_count`
|
|
850
|
+
|
|
851
|
+
If `PROGRESS_REFRESH` fails or is empty, fall back to direct ROADMAP.md parsing:
|
|
852
|
+
|
|
853
|
+
```bash
|
|
854
|
+
# Fallback: count phases directly from ROADMAP.md
|
|
855
|
+
PHASE_COUNT_DISK=$(grep -cE '^\|\s*\d{1,3}' .planning/ROADMAP.md 2>/dev/null || echo "0")
|
|
856
|
+
COMPLETED_DISK=$(find .planning/phases/ -name '*SUMMARY.md' 2>/dev/null | wc -l)
|
|
857
|
+
```
|
|
858
|
+
|
|
859
|
+
**Sanity check:** If `current_phase_number > phase_count`, this is a drift
|
|
860
|
+
symptom. Log a warning and re-derive from disk:
|
|
861
|
+
|
|
862
|
+
```
|
|
863
|
+
⚠ Phase drift detected: current phase ${N} > total ${T}. Re-reading from ROADMAP.md.
|
|
864
|
+
```
|
|
865
|
+
|
|
802
866
|
**If `ONLY_PHASE` is set:** Do not iterate. Proceed directly to lifecycle step (which exits cleanly per single-phase mode).
|
|
803
867
|
|
|
804
868
|
**If `TO_PHASE` is set and current phase number >= `TO_PHASE`:**
|
|
@@ -811,7 +875,7 @@ Decisions captured: {count} across {area_count} areas
|
|
|
811
875
|
Completed through phase ${TO_PHASE} as requested.
|
|
812
876
|
Remaining phases were not executed.
|
|
813
877
|
|
|
814
|
-
Resume with: /rihal
|
|
878
|
+
Resume with: /rihal-autonomous --from ${next_incomplete_phase}
|
|
815
879
|
```
|
|
816
880
|
|
|
817
881
|
Proceed directly to lifecycle step (which handles partial completion). Exit cleanly.
|
|
@@ -860,7 +924,7 @@ If all phases complete, proceed to lifecycle step.
|
|
|
860
924
|
Phase ${ONLY_PHASE}: ${PHASE_NAME} — Done
|
|
861
925
|
Mode: Single phase (--only)
|
|
862
926
|
|
|
863
|
-
Lifecycle skipped — run /rihal
|
|
927
|
+
Lifecycle skipped — run /rihal-autonomous without --only
|
|
864
928
|
after all phases complete to trigger audit/complete/cleanup.
|
|
865
929
|
```
|
|
866
930
|
|
|
@@ -882,7 +946,7 @@ Display lifecycle transition banner:
|
|
|
882
946
|
### 5a. Audit
|
|
883
947
|
|
|
884
948
|
```
|
|
885
|
-
Skill(skill="rihal
|
|
949
|
+
Skill(skill="rihal-audit-milestone")
|
|
886
950
|
```
|
|
887
951
|
|
|
888
952
|
After audit completes, detect the result:
|
|
@@ -930,7 +994,7 @@ On **"Stop"**: Go to handle_blocker.
|
|
|
930
994
|
### 5b. Complete Milestone
|
|
931
995
|
|
|
932
996
|
```
|
|
933
|
-
Skill(skill="rihal
|
|
997
|
+
Skill(skill="rihal-complete-milestone", args="${milestone_version}")
|
|
934
998
|
```
|
|
935
999
|
|
|
936
1000
|
After complete-milestone returns, verify archive output:
|
|
@@ -944,7 +1008,7 @@ If the archive file does not exist, go to handle_blocker: "Complete milestone di
|
|
|
944
1008
|
### 5c. Cleanup
|
|
945
1009
|
|
|
946
1010
|
```
|
|
947
|
-
Skill(skill="rihal
|
|
1011
|
+
Skill(skill="rihal-cleanup")
|
|
948
1012
|
```
|
|
949
1013
|
|
|
950
1014
|
Cleanup shows its own dry-run and asks user for approval internally — this is an acceptable pause since it's an explicit decision about file deletion.
|
|
@@ -963,6 +1027,17 @@ Cleanup shows its own dry-run and asks user for approval internally — this is
|
|
|
963
1027
|
Ship it! 🚀
|
|
964
1028
|
```
|
|
965
1029
|
|
|
1030
|
+
**If autonomous created a branch** (i.e., `BRANCH_NAME` was set in the prepare_branch step):
|
|
1031
|
+
|
|
1032
|
+
Display:
|
|
1033
|
+
|
|
1034
|
+
```
|
|
1035
|
+
🔀 Branch: ${BRANCH_NAME}
|
|
1036
|
+
All work is on this branch. When ready, merge to main:
|
|
1037
|
+
git checkout main && git merge ${BRANCH_NAME}
|
|
1038
|
+
Or create a PR for review.
|
|
1039
|
+
```
|
|
1040
|
+
|
|
966
1041
|
</step>
|
|
967
1042
|
|
|
968
1043
|
<step name="handle_blocker">
|
|
@@ -999,7 +1074,7 @@ Proceed to iterate.
|
|
|
999
1074
|
Skipped: {list of skipped phases}
|
|
1000
1075
|
Remaining: {list of remaining phases}
|
|
1001
1076
|
|
|
1002
|
-
Resume with: /rihal
|
|
1077
|
+
Resume with: /rihal-autonomous ${ONLY_PHASE ? "--only " + ONLY_PHASE : "--from " + next_phase}${TO_PHASE ? " --to " + TO_PHASE : ""}
|
|
1003
1078
|
```
|
|
1004
1079
|
|
|
1005
1080
|
Record blocker in state:
|
|
@@ -1029,7 +1104,7 @@ node .rihal/bin/rihal-tools.cjs state add-blocker "Autonomous mode stopped at ph
|
|
|
1029
1104
|
- [ ] Final completion or stop summary displayed
|
|
1030
1105
|
- [ ] After all phases complete, lifecycle step is invoked (not manual suggestion)
|
|
1031
1106
|
- [ ] Lifecycle transition banner displayed before audit
|
|
1032
|
-
- [ ] Audit invoked via Skill(skill="rihal
|
|
1107
|
+
- [ ] Audit invoked via Skill(skill="rihal-audit-milestone")
|
|
1033
1108
|
- [ ] Audit result routing: passed → auto-continue, gaps_found → user decides, tech_debt → user decides
|
|
1034
1109
|
- [ ] Complete-milestone invoked via Skill() with ${milestone_version} arg
|
|
1035
1110
|
- [ ] Cleanup invoked via Skill() — internal confirmation is acceptable
|
|
@@ -1056,4 +1131,13 @@ node .rihal/bin/rihal-tools.cjs state add-blocker "Autonomous mode stopped at ph
|
|
|
1056
1131
|
- [ ] `--interactive` waits for background agents before post-execution routing
|
|
1057
1132
|
- [ ] `--interactive` compatible with `--only`, `--from`, and `--to` flags
|
|
1058
1133
|
- [ ] No `git push` issued by the workflow (per AGENTS.md)
|
|
1134
|
+
- [ ] Branch created when on main/master (unless --allow-main override)
|
|
1135
|
+
- [ ] Branch name follows `rihal/autonomous-{version}-{timestamp}` pattern
|
|
1136
|
+
- [ ] --allow-main flag skips branch creation with warning
|
|
1137
|
+
- [ ] Non-main/master branches used as-is without branch creation
|
|
1138
|
+
- [ ] PR/merge suggestion displayed at lifecycle completion when branch was created
|
|
1139
|
+
- [ ] Phase count T re-derived from disk at start of every iteration (compaction guard)
|
|
1140
|
+
- [ ] Phase count T re-derived from disk before execute_phase banner display
|
|
1141
|
+
- [ ] Drift warning logged when current phase number exceeds total
|
|
1142
|
+
- [ ] Progress bar always accurate after LLM context compaction
|
|
1059
1143
|
</success_criteria>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Workflow: rihal
|
|
1
|
+
# Workflow: rihal-brainstorm
|
|
2
2
|
|
|
3
3
|
<purpose>
|
|
4
4
|
Guided brainstorming session using structured methods. User provides a challenge; the workflow presents available methods, applies the selected one, and generates ideas in a structured format. Output is a brainstorm artifact stored in `.planning/brainstorms/` with the chosen method, raw ideas, and synthesis.
|
|
@@ -9,14 +9,14 @@ Guided brainstorming session using structured methods. User provides a challenge
|
|
|
9
9
|
If `$ARGUMENTS` is empty or only contains `--help` or `-h`:
|
|
10
10
|
|
|
11
11
|
```
|
|
12
|
-
/rihal
|
|
12
|
+
/rihal-brainstorm <challenge> [--method=METHOD] [--people=N] [--personas=LIST]
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
**Examples:**
|
|
16
16
|
```
|
|
17
|
-
/rihal
|
|
18
|
-
/rihal
|
|
19
|
-
/rihal
|
|
17
|
+
/rihal-brainstorm how to improve user onboarding
|
|
18
|
+
/rihal-brainstorm --method=SCAMPER reduce API latency
|
|
19
|
+
/rihal-brainstorm --method=Rolestorming --personas=competitor,child reduce churn
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
STOP — do not proceed. Only proceed when the user provides a challenge.
|
|
@@ -182,8 +182,8 @@ After method execution:
|
|
|
182
182
|
## Next Steps
|
|
183
183
|
|
|
184
184
|
To turn ideas into features/tickets:
|
|
185
|
-
- `/rihal
|
|
186
|
-
- `/rihal
|
|
185
|
+
- `/rihal-plan <idea description>` — for detailed implementation plan
|
|
186
|
+
- `/rihal-council is this idea worth pursuing?` — for strategic discussion
|
|
187
187
|
```
|
|
188
188
|
|
|
189
189
|
4. Print summary: "{N} ideas generated using {METHOD_NAME}"
|
package/rihal/workflows/chain.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# Workflow: rihal
|
|
1
|
+
# Workflow: rihal-chain
|
|
2
2
|
|
|
3
3
|
<purpose>
|
|
4
|
-
Run a sequential agent pipeline — each agent receives the previous agent's output as input. Unlike `/rihal
|
|
4
|
+
Run a sequential agent pipeline — each agent receives the previous agent's output as input. Unlike `/rihal-council` (parallel debate with cross-talk), chain is a one-way pipeline for "do research → hand to PM → hand to CTO" patterns. Each stage's output is saved as a first-class artifact the next stage reads.
|
|
5
5
|
</purpose>
|
|
6
6
|
|
|
7
7
|
## Step 0 — Usage check
|
|
@@ -9,7 +9,7 @@ Run a sequential agent pipeline — each agent receives the previous agent's out
|
|
|
9
9
|
If `$ARGUMENTS` is empty, print:
|
|
10
10
|
|
|
11
11
|
```
|
|
12
|
-
Usage: /rihal
|
|
12
|
+
Usage: /rihal-chain <preset|agent-list> <topic or question>
|
|
13
13
|
|
|
14
14
|
Presets (common pipelines):
|
|
15
15
|
research-plan Mariam (research) → Hussain-PM (scope) → Planner (SPRINT.md)
|
|
@@ -18,12 +18,12 @@ Presets (common pipelines):
|
|
|
18
18
|
full-discovery Mariam → Sadiq (kill criteria) → Hussain-PM → Waleed → Planner
|
|
19
19
|
|
|
20
20
|
Custom agents (comma-separated, in order):
|
|
21
|
-
/rihal
|
|
21
|
+
/rihal-chain mariam,hussain-pm,waleed <topic>
|
|
22
22
|
|
|
23
23
|
Examples:
|
|
24
|
-
/rihal
|
|
25
|
-
/rihal
|
|
26
|
-
/rihal
|
|
24
|
+
/rihal-chain research-plan affiliate site in Dubai for mobile accessories
|
|
25
|
+
/rihal-chain feasibility migrate our Postgres to Neon serverless
|
|
26
|
+
/rihal-chain mariam,hussain-pm should we enter the SaaS bookkeeping market in Oman?
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
STOP here if no arguments.
|
|
@@ -33,11 +33,11 @@ STOP here if no arguments.
|
|
|
33
33
|
If `$ARGUMENTS` is a pure decision question with no topic to work on (patterns like "should we", "A or B", "is X better than Y", "worth it") and does NOT contain a preset name or agent list:
|
|
34
34
|
|
|
35
35
|
```
|
|
36
|
-
⚠ /rihal
|
|
37
|
-
For decisions only, /rihal
|
|
36
|
+
⚠ /rihal-chain produces deliverables (RESEARCH.md, SCOPE.md, SPRINT.md).
|
|
37
|
+
For decisions only, /rihal-council is the right tool.
|
|
38
38
|
|
|
39
|
-
For a debate: /rihal
|
|
40
|
-
For a research-to-plan pipeline: /rihal
|
|
39
|
+
For a debate: /rihal-council $ARGUMENTS
|
|
40
|
+
For a research-to-plan pipeline: /rihal-chain research-plan $ARGUMENTS
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
Only proceed past this step if the input is a topic or deliverable request (e.g., "research affiliate site", "scope mobile app migration", "plan e-commerce platform").
|
|
@@ -132,7 +132,7 @@ Artifacts in {chain_dir}/:
|
|
|
132
132
|
3-planner-SPRINT.md (Planner, stage 3)
|
|
133
133
|
|
|
134
134
|
Next step:
|
|
135
|
-
/rihal
|
|
135
|
+
/rihal-execute {chain_dir}/3-planner-SPRINT.md
|
|
136
136
|
|
|
137
137
|
─── ~5K tokens per stage · {duration}s · {stage-count} agents ───
|
|
138
138
|
```
|
|
@@ -167,14 +167,14 @@ Silent on failure — state tracking is optional.
|
|
|
167
167
|
| `gtm-to-build` | mariam → hussain-pm → waleed | Market → scope → tech reality check |
|
|
168
168
|
| `full-discovery` | mariam → sadiq → hussain-pm → waleed → planner | Full validation before committing |
|
|
169
169
|
|
|
170
|
-
## Differences from /rihal
|
|
170
|
+
## Differences from /rihal-council
|
|
171
171
|
|
|
172
|
-
| | /rihal
|
|
172
|
+
| | /rihal-council | /rihal-chain |
|
|
173
173
|
|--|--|--|
|
|
174
174
|
| Execution | Parallel (Round 1 + cross-talk Round 2) | Sequential (one at a time) |
|
|
175
175
|
| Output | One session artifact with all agent voices | One artifact per agent |
|
|
176
176
|
| Best for | Debate, disagreement, multiple perspectives | Pipelines where each stage builds on the last |
|
|
177
|
-
| Subsequent use | `/rihal
|
|
177
|
+
| Subsequent use | `/rihal-plan {session}` converts follow-ups to plans | Last stage often IS a SPRINT.md already |
|
|
178
178
|
|
|
179
179
|
## On Error
|
|
180
180
|
|
|
@@ -183,6 +183,6 @@ Silent on failure — state tracking is optional.
|
|
|
183
183
|
- **Unknown preset:** list valid presets, stop.
|
|
184
184
|
- **Agent not installed:** print installed agents, suggest closest match.
|
|
185
185
|
- **state.json missing or corrupted:** continue without error — chain artifacts are mandatory, state tracking is optional.
|
|
186
|
-
- **Stage fails to produce artifact:** print stage number, allow `/rihal
|
|
186
|
+
- **Stage fails to produce artifact:** print stage number, allow `/rihal-chain --continue` to resume.
|
|
187
187
|
- **Agent returns empty output:** print "Agent produced no output. Check input and retry."
|
|
188
188
|
- **`rihal-tools.cjs` missing:** tell user to run `npx @hanzlaa/rcode install` (or `rcode install` if installed globally).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Workflow: rihal
|
|
1
|
+
# Workflow: rihal-check-implementation-readiness
|
|
2
2
|
|
|
3
3
|
<purpose>
|
|
4
4
|
Pre-execution gate: verify PRD approved, architecture approved, external dependencies identified, and no blocking assumptions remain. Return pass/fail report. Used as guard in plan.md Step 0.8 and execute.md Step 0.
|
|
@@ -10,13 +10,13 @@ Pre-execution gate: verify PRD approved, architecture approved, external depende
|
|
|
10
10
|
If `$ARGUMENTS` is empty or contains only `--help` or `-h`:
|
|
11
11
|
|
|
12
12
|
```
|
|
13
|
-
/rihal
|
|
13
|
+
/rihal-check-implementation-readiness <argument-here>
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
**Examples:**
|
|
17
17
|
```
|
|
18
|
-
/rihal
|
|
19
|
-
/rihal
|
|
18
|
+
/rihal-check-implementation-readiness example 1
|
|
19
|
+
/rihal-check-implementation-readiness example 2
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
STOP — do not proceed.
|
|
@@ -22,14 +22,14 @@ If `todo_count` is 0:
|
|
|
22
22
|
```
|
|
23
23
|
No pending todos.
|
|
24
24
|
|
|
25
|
-
Todos are captured during work sessions with /rihal
|
|
25
|
+
Todos are captured during work sessions with /rihal-add-todo.
|
|
26
26
|
|
|
27
27
|
---
|
|
28
28
|
|
|
29
29
|
Would you like to:
|
|
30
30
|
|
|
31
|
-
1. Continue with current phase (/rihal
|
|
32
|
-
2. Add a todo now (/rihal
|
|
31
|
+
1. Continue with current phase (/rihal-progress)
|
|
32
|
+
2. Add a todo now (/rihal-add-todo)
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
Exit.
|
|
@@ -37,8 +37,8 @@ Exit.
|
|
|
37
37
|
|
|
38
38
|
<step name="parse_filter">
|
|
39
39
|
Check for area filter in arguments:
|
|
40
|
-
- `/rihal
|
|
41
|
-
- `/rihal
|
|
40
|
+
- `/rihal-check-todos` → show all
|
|
41
|
+
- `/rihal-check-todos api` → filter to area:api only
|
|
42
42
|
</step>
|
|
43
43
|
|
|
44
44
|
<step name="list_todos">
|
|
@@ -56,7 +56,7 @@ Pending Todos:
|
|
|
56
56
|
---
|
|
57
57
|
|
|
58
58
|
Reply with a number to view details, or:
|
|
59
|
-
- `/rihal
|
|
59
|
+
- `/rihal-check-todos [area]` to filter by area
|
|
60
60
|
- `q` to exit
|
|
61
61
|
```
|
|
62
62
|
|
|
@@ -118,7 +118,7 @@ Use AskUserQuestion:
|
|
|
118
118
|
- question: "What would you like to do with this todo?"
|
|
119
119
|
- options:
|
|
120
120
|
- "Work on it now" — move to done, start working
|
|
121
|
-
- "Create a phase" — /rihal
|
|
121
|
+
- "Create a phase" — /rihal-add-phase with this scope
|
|
122
122
|
- "Brainstorm approach" — think through before deciding
|
|
123
123
|
- "Put it back" — return to list
|
|
124
124
|
</step>
|
|
@@ -134,7 +134,7 @@ Update STATE.md todo count. Present problem/solution context. Begin work or ask
|
|
|
134
134
|
Note todo reference in phase planning notes. Keep in pending. Return to list or exit.
|
|
135
135
|
|
|
136
136
|
**Create a phase:**
|
|
137
|
-
Display: `/rihal
|
|
137
|
+
Display: `/rihal-add-phase [description from todo]`
|
|
138
138
|
Keep in pending. User runs command in fresh context.
|
|
139
139
|
|
|
140
140
|
**Brainstorm approach:**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Workflow: rihal
|
|
1
|
+
# Workflow: rihal-checkpoint-preview
|
|
2
2
|
|
|
3
3
|
<purpose>
|
|
4
4
|
Human-in-the-loop change review. Make sense of a diff, focus attention where it matters, and walk through testing. Delegates to the rihal-checkpoint-preview skill for the full review protocol.
|