@hanzlaa/rcode 2.2.0 → 2.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/CLAUDE.md +15 -0
- package/CONTRIBUTING.md +138 -0
- package/README.md +74 -15
- package/cli/install.js +312 -80
- package/cli/postinstall.js +4 -4
- package/cli/uninstall.js +8 -0
- package/dist/rcode.js +19777 -0
- package/package.json +18 -5
- package/rihal/DOCS-AUDIT.md +14 -0
- package/rihal/agents/rihal-code-reviewer.md +1 -1
- package/rihal/agents/rihal-codebase-mapper.md +1 -1
- package/rihal/agents/rihal-docs-auditor.md +1 -1
- package/rihal/agents/rihal-edge-case-hunter.md +1 -1
- package/rihal/agents/rihal-executor.md +2 -1
- package/rihal/agents/rihal-hussain-pm.md +1 -0
- package/rihal/agents/rihal-nyquist-auditor.md +1 -1
- package/rihal/agents/rihal-phase-researcher.md +2 -2
- package/rihal/agents/rihal-planner.md +3 -2
- package/rihal/agents/rihal-roadmapper.md +1 -0
- package/rihal/agents/rihal-security-adversary.md +1 -1
- package/rihal/agents/rihal-security-auditor.md +1 -1
- package/rihal/agents/rihal-sprint-checker.md +1 -1
- package/rihal/agents/rihal-verifier.md +1 -1
- package/rihal/bin/lib/roadmap.cjs +2 -3
- package/rihal/bin/rihal-tools.cjs +11 -31
- package/rihal/brain/best-practices/no-theoretical-suggestions.md +56 -0
- package/rihal/commands/add-phase.md +2 -2
- package/rihal/commands/audit.md +8 -0
- package/rihal/commands/checkpoint-preview.md +13 -0
- package/rihal/commands/cleanup.md +2 -2
- package/rihal/commands/config.md +4 -4
- package/rihal/commands/pr-branch.md +2 -2
- package/rihal/commands/prfaq.md +15 -0
- package/rihal/commands/remove-phase.md +2 -2
- package/rihal/commands/research-phase.md +2 -2
- package/rihal/commands/settings.md +2 -2
- package/rihal/commands/ship.md +15 -3
- package/rihal/commands/validate-phase.md +1 -1
- package/rihal/commands/verify-phase.md +2 -2
- package/rihal/references/agent-contracts.md +12 -0
- package/rihal/references/karpathy-guidelines-full.md +79 -0
- package/rihal/references/karpathy-guidelines.md +8 -76
- package/rihal/references/model-profile-resolution.md +8 -0
- package/rihal/references/phase-argument-parsing.md +11 -0
- package/rihal/references/revision-loop.md +11 -0
- package/rihal/references/universal-anti-patterns.md +15 -0
- package/rihal/skills/actions/1-analysis/research/rihal-domain-research/SKILL.md +11 -0
- package/rihal/skills/actions/1-analysis/research/rihal-market-research/SKILL.md +11 -0
- package/rihal/skills/actions/1-analysis/research/rihal-technical-research/SKILL.md +13 -0
- package/rihal/skills/actions/1-analysis/rihal-document-project/SKILL.md +11 -0
- package/rihal/skills/actions/1-analysis/rihal-prfaq/SKILL.md +12 -0
- package/rihal/skills/actions/1-analysis/rihal-product-brief/SKILL.md +7 -0
- package/rihal/skills/actions/2-plan/rihal-create-epics-and-stories/SKILL.md +15 -1
- package/rihal/skills/actions/2-plan/rihal-create-milestone/SKILL.md +21 -1
- package/rihal/skills/actions/2-plan/rihal-create-milestone/steps/step-10-complete.md +1 -1
- package/rihal/skills/actions/2-plan/rihal-create-prd/SKILL.md +26 -0
- package/rihal/skills/actions/2-plan/rihal-create-story/SKILL.md +16 -2
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/SKILL.md +12 -0
- package/rihal/skills/actions/2-plan/rihal-edit-prd/SKILL.md +11 -0
- package/rihal/skills/actions/2-plan/rihal-frontend-design/SKILL.md +13 -0
- package/rihal/skills/actions/2-plan/rihal-validate-prd/SKILL.md +12 -0
- package/rihal/skills/actions/3-solutioning/rihal-check-implementation-readiness/SKILL.md +12 -0
- package/rihal/skills/actions/3-solutioning/rihal-create-architecture/SKILL.md +14 -0
- package/rihal/skills/actions/3-solutioning/rihal-generate-project-context/SKILL.md +12 -0
- package/rihal/skills/actions/4-implementation/rihal-checkpoint-preview/SKILL.md +16 -0
- package/rihal/skills/actions/4-implementation/rihal-code-review/SKILL.md +12 -0
- package/rihal/skills/actions/4-implementation/rihal-correct-course/SKILL.md +13 -0
- package/rihal/skills/actions/4-implementation/rihal-dev-story/SKILL.md +12 -0
- package/rihal/skills/actions/4-implementation/rihal-qa-generate-e2e-tests/SKILL.md +12 -0
- package/rihal/skills/actions/4-implementation/rihal-retrospective/SKILL.md +11 -0
- package/rihal/skills/actions/4-implementation/rihal-scaffold-project/SKILL.md +10 -0
- package/rihal/skills/actions/4-implementation/rihal-sprint-planning/SKILL.md +14 -1
- package/rihal/skills/actions/4-implementation/rihal-sprint-status/SKILL.md +10 -0
- package/rihal/skills/agents/ahmed-hassani-director/SKILL.md +13 -1
- package/rihal/skills/agents/fatima-qa/SKILL.md +14 -1
- package/rihal/skills/agents/haitham-frontend/SKILL.md +15 -1
- package/rihal/skills/agents/hanzla-engineer/SKILL.md +14 -1
- package/rihal/skills/agents/hussain-pm/SKILL.md +22 -1
- package/rihal/skills/agents/hussain-sm/SKILL.md +22 -1
- package/rihal/skills/agents/layla-designer/SKILL.md +15 -1
- package/rihal/skills/agents/majlis-council/SKILL.md +14 -1
- package/rihal/skills/agents/mariam-marketing/SKILL.md +15 -1
- package/rihal/skills/agents/nasser-eng-manager/SKILL.md +14 -1
- package/rihal/skills/agents/noor-writer/SKILL.md +14 -1
- package/rihal/skills/agents/raees-orchestrator/SKILL.md +13 -1
- package/rihal/skills/agents/sadiq-analyst/SKILL.md +15 -1
- package/rihal/skills/agents/waleed-architect/SKILL.md +16 -1
- package/rihal/skills/agents/yousef-backend/SKILL.md +16 -1
- package/rihal/skills/agents/zahra-branding/SKILL.md +15 -1
- package/rihal/skills/agents/zayd-ml/SKILL.md +17 -1
- package/rihal/skills/core/rihal-advanced-elicitation/SKILL.md +12 -0
- package/rihal/skills/core/rihal-brainstorming/SKILL.md +16 -0
- package/rihal/skills/core/rihal-clone-website/SKILL.md +21 -0
- package/rihal/skills/core/rihal-distillator/SKILL.md +8 -0
- package/rihal/skills/core/rihal-editorial-review-prose/SKILL.md +12 -0
- package/rihal/skills/core/rihal-editorial-review-structure/SKILL.md +18 -0
- package/rihal/skills/core/rihal-help/SKILL.md +12 -0
- package/rihal/skills/core/rihal-index-docs/SKILL.md +18 -0
- package/rihal/skills/core/rihal-init/SKILL.md +8 -0
- package/rihal/skills/core/rihal-party-mode/SKILL.md +14 -0
- package/rihal/skills/core/rihal-review-adversarial-general/SKILL.md +12 -0
- package/rihal/skills/core/rihal-review-edge-case-hunter/SKILL.md +18 -0
- package/rihal/skills/core/rihal-shard-doc/SKILL.md +18 -0
- package/rihal/team.yaml +205 -0
- package/rihal/templates/UAT.md +29 -0
- package/rihal/templates/milestone.md +2 -0
- package/rihal/templates/sprint.md +11 -28
- package/rihal/templates/summary.md +30 -0
- package/rihal/templates/verification-report.md +28 -0
- package/rihal/workflows/audit-milestone.md +34 -2
- package/rihal/workflows/audit.md +172 -0
- package/rihal/workflows/autonomous.md +67 -0
- package/rihal/workflows/checkpoint-preview.md +7 -0
- package/rihal/workflows/council.md +3 -1
- package/rihal/workflows/debug.md +8 -1
- package/rihal/workflows/diagnose-issues.md +34 -0
- package/rihal/workflows/do.md +47 -3
- package/rihal/workflows/document-project.md +1 -1
- package/rihal/workflows/execute-sprint.md +11 -4
- package/rihal/workflows/execute.md +9 -3
- package/rihal/workflows/help.md +1 -1
- package/rihal/workflows/karpathy-audit.md +7 -14
- package/rihal/workflows/pause-work.md +7 -1
- package/rihal/workflows/prfaq.md +7 -0
- package/rihal/workflows/profile-user.md +2 -2
- package/rihal/workflows/settings.md +116 -117
- package/rihal/workflows/ship.md +31 -1
- package/rihal/workflows/sprint-planning.md +39 -8
- package/rihal/workflows/status.md +5 -0
- package/rihal/workflows/ui-phase.md +3 -3
- package/rihal/workflows/update.md +80 -22
- package/rihal/workflows/validate-phase.md +7 -1
- package/server/dashboard.js +34 -575
- package/server/lib/api.js +123 -0
- package/server/lib/html/client.js +969 -0
- package/server/lib/html/css.js +416 -0
- package/server/lib/html/shell.js +230 -0
- package/server/lib/scanner.js +142 -0
- package/rihal/agents/rihal-ui-designer.md +0 -6
- package/rihal/skills/core/rihal-advanced-elicitation/rihal-advanced-elicitation/SKILL.md +0 -148
- package/rihal/skills/core/rihal-advanced-elicitation/rihal-advanced-elicitation/methods.csv +0 -51
- package/rihal/skills/core/rihal-shard-doc/rihal-shard-doc/SKILL.md +0 -122
- package/rihal/workflows/config.md +0 -105
|
@@ -1,185 +1,184 @@
|
|
|
1
1
|
# Workflow: rihal:settings
|
|
2
2
|
|
|
3
3
|
<purpose>
|
|
4
|
-
|
|
4
|
+
View and edit Rihal project settings stored in `.rihal/config.yaml`. Closes
|
|
5
|
+
#233 — replaces the previous broken implementation that wrote flat keys
|
|
6
|
+
nothing read and corrupted the nested `workflow:` / `git:` sections on every
|
|
7
|
+
save.
|
|
8
|
+
|
|
9
|
+
The single source of truth for config keys is the table in Step 1.5. All keys
|
|
10
|
+
documented there are consumed somewhere in the codebase — settings that the
|
|
11
|
+
wizard writes are settings that workflows actually honour.
|
|
5
12
|
</purpose>
|
|
6
13
|
|
|
7
|
-
|
|
8
14
|
## Step 0 — Usage check
|
|
9
15
|
|
|
10
|
-
If `$ARGUMENTS`
|
|
16
|
+
If `$ARGUMENTS` contains `--help` or `-h`:
|
|
11
17
|
|
|
12
18
|
```
|
|
13
|
-
/rihal:settings
|
|
19
|
+
/rihal:settings # show current + interactive edit
|
|
20
|
+
/rihal:settings show # show current only
|
|
21
|
+
/rihal:settings get <key> # read a single dotted key (e.g. workflow.discuss_mode)
|
|
22
|
+
/rihal:settings set <key> <value> # write a single dotted key
|
|
14
23
|
```
|
|
15
24
|
|
|
16
25
|
**Examples:**
|
|
17
26
|
```
|
|
18
|
-
/rihal:settings
|
|
19
|
-
/rihal:settings
|
|
27
|
+
/rihal:settings show
|
|
28
|
+
/rihal:settings get workflow.research_by_default
|
|
29
|
+
/rihal:settings set workflow.research_by_default true
|
|
30
|
+
/rihal:settings set git.branching_strategy feature-branch
|
|
20
31
|
```
|
|
21
32
|
|
|
22
|
-
|
|
33
|
+
## Step 1 — Resolve mode
|
|
23
34
|
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
</available_tools>
|
|
35
|
+
Parse `$ARGUMENTS`:
|
|
36
|
+
- `show` (or empty) → run Step 1.5 then Step 2 (interactive)
|
|
37
|
+
- `get <key>` → Step 1.7 then STOP
|
|
38
|
+
- `set <key> <value>` → Step 1.8 then STOP
|
|
39
|
+
- anything else → print usage from Step 0 and STOP
|
|
30
40
|
|
|
31
|
-
## Step 1 —
|
|
41
|
+
## Step 1.5 — Show current settings
|
|
32
42
|
|
|
33
|
-
|
|
43
|
+
Read each known key via `rihal-tools.cjs config-get <dotted.key>` (the
|
|
44
|
+
nested-safe reader in `rihal/bin/lib/config.cjs`). **Do not** call the legacy
|
|
45
|
+
`config set` — it uses a flat YAML parser and corrupts nested sections.
|
|
34
46
|
|
|
35
47
|
```bash
|
|
36
|
-
|
|
48
|
+
TOOL="node .rihal/bin/rihal-tools.cjs"
|
|
49
|
+
$TOOL config-get user_name || echo "(unset)"
|
|
50
|
+
$TOOL config-get communication_language || echo "(unset)"
|
|
51
|
+
$TOOL config-get mode || echo "(unset)"
|
|
52
|
+
$TOOL config-get model_profile || echo "(unset)"
|
|
53
|
+
$TOOL config-get workflow.research_by_default || echo "(unset)"
|
|
54
|
+
$TOOL config-get workflow.plan_checker || echo "(unset)"
|
|
55
|
+
$TOOL config-get workflow.post_execute_gates || echo "(unset)"
|
|
56
|
+
$TOOL config-get workflow.ui_safety_gate || echo "(unset)"
|
|
57
|
+
$TOOL config-get workflow.discuss_mode || echo "(unset)"
|
|
58
|
+
$TOOL config-get git.branching_strategy || echo "(unset)"
|
|
59
|
+
$TOOL config-get git.commit_docs || echo "(unset)"
|
|
60
|
+
$TOOL config-get output.verbose || echo "(unset)"
|
|
37
61
|
```
|
|
38
62
|
|
|
39
|
-
|
|
40
|
-
- `model_profile` (default: "balanced")
|
|
41
|
-
- `enable_research_pre_step` (default: "false")
|
|
42
|
-
- `enable_plan_checker_loop` (default: "true")
|
|
43
|
-
- `enable_post_execute_verifier` (default: "false")
|
|
44
|
-
- `branching_strategy` (default: "none")
|
|
45
|
-
|
|
46
|
-
Store these as `current_*` variables for pre-fill use.
|
|
47
|
-
|
|
48
|
-
## Step 2 — Collect Settings
|
|
49
|
-
|
|
50
|
-
Use AskUserQuestion to prompt the user for each setting. Pre-fill current values where applicable.
|
|
51
|
-
|
|
52
|
-
### Setting 1: Model Profile
|
|
63
|
+
Render as a table:
|
|
53
64
|
|
|
54
65
|
```
|
|
55
|
-
|
|
56
|
-
Which model profile would you like to use?
|
|
66
|
+
Current Rihal Settings (.rihal/config.yaml)
|
|
57
67
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
3. budget (Haiku across the board)
|
|
62
|
-
4. inherit (Use parent session model, no override)
|
|
68
|
+
Identity
|
|
69
|
+
user_name : {value}
|
|
70
|
+
communication_language : {value}
|
|
63
71
|
|
|
64
|
-
|
|
65
|
-
|
|
72
|
+
Execution
|
|
73
|
+
mode : {value} # guided | yolo
|
|
74
|
+
model_profile : {value} # quality | balanced | budget | inherit
|
|
66
75
|
|
|
67
|
-
|
|
68
|
-
|
|
76
|
+
Workflow gates
|
|
77
|
+
workflow.research_by_default : {value} # true | false
|
|
78
|
+
workflow.plan_checker : {value} # true | false
|
|
79
|
+
workflow.post_execute_gates : {value} # true | false
|
|
80
|
+
workflow.ui_safety_gate : {value} # true | false
|
|
81
|
+
workflow.discuss_mode : {value} # adaptive | discuss | skip
|
|
69
82
|
|
|
70
|
-
|
|
83
|
+
Output
|
|
84
|
+
output.verbose : {value} # false (slim, default) | true (full detail)
|
|
71
85
|
|
|
86
|
+
Git
|
|
87
|
+
git.branching_strategy : {value} # none | feature-branch | worktree-isolation
|
|
88
|
+
git.commit_docs : {value} # true | false
|
|
72
89
|
```
|
|
73
|
-
Question:
|
|
74
|
-
Enable research pre-step in /rihal:plan by default?
|
|
75
90
|
|
|
76
|
-
|
|
91
|
+
If invoked as `/rihal:settings show`, STOP here.
|
|
77
92
|
|
|
78
|
-
|
|
79
|
-
1. Yes
|
|
80
|
-
2. No [CURRENT]
|
|
93
|
+
## Step 1.7 — `get <key>`
|
|
81
94
|
|
|
82
|
-
|
|
95
|
+
```bash
|
|
96
|
+
node .rihal/bin/rihal-tools.cjs config-get "$KEY"
|
|
83
97
|
```
|
|
84
98
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
### Setting 3: Enable Plan-Checker Loop
|
|
99
|
+
Print the result (empty output means unset). STOP.
|
|
88
100
|
|
|
89
|
-
|
|
90
|
-
Question:
|
|
91
|
-
Enable sprint-checker loop during /rihal:plan?
|
|
101
|
+
## Step 1.8 — `set <key> <value>`
|
|
92
102
|
|
|
93
|
-
|
|
103
|
+
Validate the key against the table in Step 1.5 — reject unknown keys with
|
|
104
|
+
the table printed.
|
|
94
105
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
106
|
+
Validate the value:
|
|
107
|
+
- `mode` ∈ {guided, yolo}
|
|
108
|
+
- `model_profile` ∈ {quality, balanced, budget, inherit}
|
|
109
|
+
- `workflow.discuss_mode` ∈ {adaptive, discuss, skip}
|
|
110
|
+
- `git.branching_strategy` ∈ {none, feature-branch, worktree-isolation}
|
|
111
|
+
- `workflow.*` booleans ∈ {true, false}
|
|
112
|
+
- `output.verbose` ∈ {true, false}
|
|
98
113
|
|
|
99
|
-
|
|
114
|
+
```bash
|
|
115
|
+
node .rihal/bin/rihal-tools.cjs config-set "$KEY" "$VALUE"
|
|
100
116
|
```
|
|
101
117
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
### Setting 4: Enable Post-Execute Verifier Gates
|
|
105
|
-
|
|
118
|
+
Print:
|
|
106
119
|
```
|
|
107
|
-
|
|
108
|
-
Enable post-execute verifier gates?
|
|
109
|
-
|
|
110
|
-
This runs verification after each task execution to catch regressions and issues.
|
|
111
|
-
|
|
112
|
-
Options:
|
|
113
|
-
1. Yes
|
|
114
|
-
2. No [CURRENT]
|
|
115
|
-
|
|
116
|
-
Your choice:
|
|
120
|
+
✓ {key} = {value}
|
|
117
121
|
```
|
|
118
122
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
### Setting 5: Branching Strategy
|
|
123
|
+
STOP.
|
|
122
124
|
|
|
123
|
-
|
|
124
|
-
Question:
|
|
125
|
-
What branching strategy should workflows use?
|
|
125
|
+
## Step 2 — Interactive edit
|
|
126
126
|
|
|
127
|
-
|
|
128
|
-
1. none (No branching, work on current branch)
|
|
129
|
-
2. feature-branch (Create feature branches, leave checkout to user)
|
|
130
|
-
3. worktree-isolation (Use git worktrees for isolated work)
|
|
127
|
+
After Step 1.5 prints the table, use the **`AskUserQuestion` tool** to prompt:
|
|
131
128
|
|
|
132
|
-
Your choice: [pre-filled with current_branching_strategy]
|
|
133
129
|
```
|
|
130
|
+
Which setting would you like to change?
|
|
134
131
|
|
|
135
|
-
|
|
136
|
-
|
|
132
|
+
1. mode (guided / yolo)
|
|
133
|
+
2. model_profile (quality / balanced / budget / inherit)
|
|
134
|
+
3. workflow.research_by_default (true / false)
|
|
135
|
+
4. workflow.plan_checker (true / false)
|
|
136
|
+
5. workflow.post_execute_gates (true / false)
|
|
137
|
+
6. workflow.ui_safety_gate (true / false)
|
|
138
|
+
7. workflow.discuss_mode (adaptive / discuss / skip)
|
|
139
|
+
8. git.branching_strategy (none / feature-branch / worktree-isolation)
|
|
140
|
+
9. git.commit_docs (true / false)
|
|
141
|
+
10. communication_language
|
|
142
|
+
11. output.verbose (true / false)
|
|
143
|
+
0. Done — exit
|
|
144
|
+
```
|
|
137
145
|
|
|
138
|
-
|
|
146
|
+
When the user picks a number, use **`AskUserQuestion` tool** again to ask for
|
|
147
|
+
the new value, showing the allowed values for that key.
|
|
139
148
|
|
|
140
|
-
|
|
149
|
+
Then call:
|
|
141
150
|
|
|
142
151
|
```bash
|
|
143
|
-
node .rihal/bin/rihal-tools.cjs config
|
|
144
|
-
node .rihal/bin/rihal-tools.cjs config set --key enable_research_pre_step --value "$new_enable_research_pre_step"
|
|
145
|
-
node .rihal/bin/rihal-tools.cjs config set --key enable_plan_checker_loop --value "$new_enable_plan_checker_loop"
|
|
146
|
-
node .rihal/bin/rihal-tools.cjs config set --key enable_post_execute_verifier --value "$new_enable_post_execute_verifier"
|
|
147
|
-
node .rihal/bin/rihal-tools.cjs config set --key branching_strategy --value "$new_branching_strategy"
|
|
152
|
+
node .rihal/bin/rihal-tools.cjs config-set "{dotted.key}" "{value}"
|
|
148
153
|
```
|
|
149
154
|
|
|
150
|
-
|
|
155
|
+
After each successful write, re-display the affected row so the user sees the
|
|
156
|
+
change took effect.
|
|
151
157
|
|
|
152
|
-
|
|
158
|
+
Use **`AskUserQuestion`** again to loop — ask which setting to change next —
|
|
159
|
+
until the user picks `0` or `done`.
|
|
153
160
|
|
|
154
|
-
|
|
155
|
-
✓ Settings updated successfully!
|
|
161
|
+
## Step 3 — Closing summary
|
|
156
162
|
|
|
157
|
-
|
|
158
|
-
Research pre-step: $new_enable_research_pre_step
|
|
159
|
-
Plan-checker loop: $new_enable_plan_checker_loop
|
|
160
|
-
Post-execute verifier: $new_enable_post_execute_verifier
|
|
161
|
-
Branching strategy: $new_branching_strategy
|
|
163
|
+
Print:
|
|
162
164
|
|
|
163
|
-
Settings saved to: .rihal/config.yaml
|
|
164
165
|
```
|
|
166
|
+
✓ Settings saved to .rihal/config.yaml
|
|
165
167
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
```
|
|
169
|
-
Tip: Use /rihal:resume-work to reload config and continue work.
|
|
168
|
+
Tip: settings take effect on the next workflow run. Use /rihal:settings show
|
|
169
|
+
to verify, or /rihal:resume-work to reload context.
|
|
170
170
|
```
|
|
171
171
|
|
|
172
172
|
## Success Criteria
|
|
173
173
|
|
|
174
|
-
- [ ]
|
|
175
|
-
- [ ]
|
|
176
|
-
- [ ]
|
|
177
|
-
- [ ]
|
|
174
|
+
- [ ] `/rihal:settings show` prints all 11 keys (no `(unset)` for keys with defaults)
|
|
175
|
+
- [ ] `/rihal:settings set workflow.discuss_mode discuss` round-trips: `config-get` returns `discuss`
|
|
176
|
+
- [ ] After any save, sibling keys in `workflow:` and `git:` blocks are preserved (no nesting corruption)
|
|
177
|
+
- [ ] Unknown keys are rejected with the allowed-keys table
|
|
178
178
|
|
|
179
179
|
## On Error
|
|
180
180
|
|
|
181
|
-
|
|
182
|
-
-
|
|
183
|
-
-
|
|
184
|
-
-
|
|
185
|
-
|
|
181
|
+
- **`.rihal/config.yaml` missing:** print "No config found. Run /rihal:init first." and STOP.
|
|
182
|
+
- **Invalid key:** print the allowed keys from Step 1.5 and STOP.
|
|
183
|
+
- **Invalid value:** print the allowed values for that key and STOP.
|
|
184
|
+
- **`rihal-tools.cjs` missing:** print "Run: npx @hanzlaa/rcode install ." and STOP.
|
package/rihal/workflows/ship.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
<purpose>
|
|
2
|
-
|
|
2
|
+
Push a verified feature branch and open a pull request with an auto-generated
|
|
3
|
+
body drawn from planning artifacts (ROADMAP, VERIFICATION, SUMMARY). Closes
|
|
4
|
+
the plan → execute → verify → **ship** loop.
|
|
5
|
+
|
|
6
|
+
**What this command does:**
|
|
7
|
+
1. Runs preflight: clean tree, on a feature branch, VERIFICATION.md passed, gh CLI authenticated
|
|
8
|
+
2. Pushes the branch to origin
|
|
9
|
+
3. Generates a rich PR body — phase goal, list of changes, requirements addressed, verification status
|
|
10
|
+
4. Creates the PR via `gh pr create`
|
|
11
|
+
5. Optionally requests a reviewer
|
|
12
|
+
6. Updates STATE.md with shipping status
|
|
13
|
+
|
|
14
|
+
**Preconditions (all must be true before running):**
|
|
15
|
+
- `/rihal:execute <phase>` completed
|
|
16
|
+
- `/rihal:verify-phase <phase>` passed (VERIFICATION.md exists with `status: passed`)
|
|
17
|
+
- You are on a feature branch (not main/develop directly)
|
|
18
|
+
- `gh` CLI is authenticated (`gh auth status`)
|
|
19
|
+
|
|
20
|
+
**This command is NOT for:**
|
|
21
|
+
- Publishing npm packages → use `npm publish`
|
|
22
|
+
- Creating git release tags → use `git tag -a vX.Y.Z && git push --tags`
|
|
23
|
+
- Repos that commit directly to main (`git.branching_strategy: none`)
|
|
24
|
+
- The rihal-code framework repo itself (no phases exist there)
|
|
25
|
+
|
|
26
|
+
**Typical usage:**
|
|
27
|
+
```
|
|
28
|
+
/rihal:plan 1 → plan the phase
|
|
29
|
+
/rihal:execute 1 → build it
|
|
30
|
+
/rihal:verify-phase 1 → prove it works
|
|
31
|
+
/rihal:ship 1 → PR it ← you are here
|
|
32
|
+
```
|
|
3
33
|
</purpose>
|
|
4
34
|
|
|
5
35
|
<required_reading>
|
|
@@ -1,11 +1,46 @@
|
|
|
1
1
|
# Workflow: rihal:sprint-planning
|
|
2
2
|
|
|
3
3
|
<purpose>
|
|
4
|
-
Plan the next sprint
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
Plan the next sprint. Authoritative implementation lives in the
|
|
5
|
+
`rihal-sprint-planning` skill — this workflow delegates to it so every
|
|
6
|
+
safety rail (capacity gate per #127, halt-at-menu per #124, state-sync
|
|
7
|
+
per #198) fires identically whether the user invokes the slash command
|
|
8
|
+
or the phrase-activated skill.
|
|
9
|
+
|
|
10
|
+
The skill MUST be loaded before the in-line steps below run. If the skill
|
|
11
|
+
file is missing (broken install), report and stop — do not silently fall
|
|
12
|
+
back to the in-line implementation.
|
|
7
13
|
</purpose>
|
|
8
14
|
|
|
15
|
+
<delegate_to_skill>
|
|
16
|
+
Required skill: `rihal-sprint-planning`
|
|
17
|
+
Path: `.claude/skills/rihal-sprint-planning/SKILL.md`
|
|
18
|
+
Workflow ref: `.claude/skills/rihal-sprint-planning/workflow.md`
|
|
19
|
+
|
|
20
|
+
Behaviour:
|
|
21
|
+
1. Load the skill's `SKILL.md` and `workflow.md`. Apply every Critical
|
|
22
|
+
Rule from the workflow's `## CRITICAL RULES (NO EXCEPTIONS)` block,
|
|
23
|
+
including the capacity gate (step n="0") which MUST halt for
|
|
24
|
+
numeric capacity inputs before any story is committed.
|
|
25
|
+
2. Run the skill's step files in order. The in-line steps below this
|
|
26
|
+
block are a fallback summary for legacy installs that lack the skill;
|
|
27
|
+
they are NOT the authoritative behaviour.
|
|
28
|
+
3. After SPRINT.md is written, ALWAYS run:
|
|
29
|
+
`node .rihal/bin/rihal-tools.cjs state sync --from-disk`
|
|
30
|
+
so state.sprints[] reflects the new sprint.
|
|
31
|
+
|
|
32
|
+
If skill files are missing: print
|
|
33
|
+
"Sprint-planning skill not installed. Run: npx @hanzlaa/rcode install"
|
|
34
|
+
and exit non-zero. Do not proceed with the legacy in-line steps because
|
|
35
|
+
they bypass the capacity gate.
|
|
36
|
+
</delegate_to_skill>
|
|
37
|
+
|
|
38
|
+
<required_reading>
|
|
39
|
+
@.rihal/references/output-format.md
|
|
40
|
+
@rihal/brain/best-practices/no-autonomous-bypass.md
|
|
41
|
+
@rihal/brain/best-practices/state-sync-rule.md
|
|
42
|
+
</required_reading>
|
|
43
|
+
|
|
9
44
|
<output_format>
|
|
10
45
|
Open with banner:
|
|
11
46
|
```
|
|
@@ -13,15 +48,11 @@ Open with banner:
|
|
|
13
48
|
RIHAL ► PLANNING SPRINT
|
|
14
49
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
15
50
|
```
|
|
16
|
-
TaskCreate: "Load phase scope + velocity", "Curate stories with user", "Register sprint + stories in state", "Write SPRINT.md", "Start sprint".
|
|
51
|
+
TaskCreate: "Load phase scope + velocity", "Capacity gate (halt for numbers)", "Curate stories with user", "Register sprint + stories in state", "Write SPRINT.md", "Sync state", "Start sprint".
|
|
17
52
|
Closure: `RIHAL ► SPRINT {NN.S} READY ✓ ({N} stories, {M} points)`
|
|
18
53
|
Next Up: `/rihal:execute .planning/phases/{phase}/SPRINT.md`
|
|
19
54
|
</output_format>
|
|
20
55
|
|
|
21
|
-
<required_reading>
|
|
22
|
-
@.rihal/references/output-format.md
|
|
23
|
-
</required_reading>
|
|
24
|
-
|
|
25
56
|
<process>
|
|
26
57
|
## Step 0 — Usage check
|
|
27
58
|
|
|
@@ -16,10 +16,15 @@ Render a human-readable project status dashboard. All data comes from a single `
|
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
18
|
SNAPSHOT=$(node .rihal/bin/rihal-tools.cjs progress init)
|
|
19
|
+
VERBOSE=$(node .rihal/bin/rihal-tools.cjs config-get output.verbose 2>/dev/null || echo "false")
|
|
19
20
|
```
|
|
20
21
|
|
|
21
22
|
Parse as JSON. If `SNAPSHOT.ok` is not true, print a one-line error and stop.
|
|
22
23
|
|
|
24
|
+
**Slim mode** (default when `VERBOSE != "true"`): Output Steps 2–3 only (banner + phases list). Skip decisions, blockers detail, and route menu — just print the top route as a single "Next: `/rihal:X`" line. Append `(run /rihal:status --verbose for full detail)`.
|
|
25
|
+
|
|
26
|
+
**Verbose mode** (`VERBOSE == "true"` or `$ARGUMENTS` contains `--verbose`): Full Steps 2–6 output.
|
|
27
|
+
|
|
23
28
|
If `SNAPSHOT.project` is empty and `SNAPSHOT.phases` is empty, print:
|
|
24
29
|
|
|
25
30
|
```
|
|
@@ -22,7 +22,7 @@ If `$ARGUMENTS` is empty or contains only `--help` or `-h`:
|
|
|
22
22
|
STOP — do not proceed.
|
|
23
23
|
|
|
24
24
|
<available_agent_types>
|
|
25
|
-
- `rihal-
|
|
25
|
+
- `rihal-ux-designer` — UI specification generator
|
|
26
26
|
</available_agent_types>
|
|
27
27
|
|
|
28
28
|
## Step 0 — Initialize
|
|
@@ -51,11 +51,11 @@ Load existing design system, extract:
|
|
|
51
51
|
|
|
52
52
|
## Step 2 — Spawn UI Designer
|
|
53
53
|
|
|
54
|
-
Spawn `rihal-
|
|
54
|
+
Spawn `rihal-ux-designer` subagent:
|
|
55
55
|
|
|
56
56
|
```
|
|
57
57
|
Task tool call:
|
|
58
|
-
subagent_type: "rihal-
|
|
58
|
+
subagent_type: "rihal-ux-designer"
|
|
59
59
|
description: "Generate UI-SPEC.md"
|
|
60
60
|
prompt: |
|
|
61
61
|
Generate a UI-SPEC.md file with the following structure:
|
|
@@ -1,39 +1,56 @@
|
|
|
1
1
|
# Workflow: rihal:update
|
|
2
2
|
|
|
3
3
|
<purpose>
|
|
4
|
-
|
|
4
|
+
Pull the latest rcode from npm and install it **non-destructively** —
|
|
5
|
+
overwrite only files the user hasn't customized since their last install.
|
|
6
|
+
User-modified files are preserved and reported. Closes #232.
|
|
7
|
+
|
|
8
|
+
Default invocation:
|
|
9
|
+
```
|
|
10
|
+
npx @hanzlaa/rcode@latest install . --non-destructive --yes
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
The `--non-destructive` flag (set by default in this workflow) makes the
|
|
14
|
+
installer compare each file's current SHA256 to the SHA256 stored in
|
|
15
|
+
`.rihal/_config/files-manifest.csv` from the previous install:
|
|
16
|
+
- Hashes match → file is pristine → safe to overwrite with new version
|
|
17
|
+
- Hashes differ → user has edited it → SKIP and report
|
|
18
|
+
|
|
19
|
+
Per-project state is ALWAYS preserved (never touched by either mode):
|
|
20
|
+
- `.rihal/config.yaml`
|
|
21
|
+
- `.rihal/state.json` (and `.lock`)
|
|
22
|
+
- `.planning/` (PRD, ROADMAP, sprints, SUMMARY files)
|
|
23
|
+
- `.rihal/brain/` content (refreshed via `brain pull` separately)
|
|
5
24
|
</purpose>
|
|
6
25
|
|
|
7
26
|
|
|
8
27
|
## Step 0 — Usage check
|
|
9
28
|
|
|
10
|
-
If `$ARGUMENTS`
|
|
29
|
+
If `$ARGUMENTS` contains `--help` or `-h`:
|
|
11
30
|
|
|
12
31
|
```
|
|
13
|
-
/rihal:update
|
|
32
|
+
/rihal:update # pull latest, preserve user-modified files
|
|
33
|
+
/rihal:update v2.4.0 # pin to a specific version
|
|
34
|
+
/rihal:update --force-overwrite # discard local edits, overwrite all rcode files
|
|
14
35
|
```
|
|
15
36
|
|
|
16
37
|
**Examples:**
|
|
17
38
|
```
|
|
18
|
-
/rihal:update
|
|
19
|
-
/rihal:update
|
|
39
|
+
/rihal:update
|
|
40
|
+
/rihal:update v2.4.0
|
|
41
|
+
/rihal:update --force-overwrite
|
|
20
42
|
```
|
|
21
43
|
|
|
22
|
-
STOP — do not proceed.
|
|
23
|
-
|
|
24
44
|
## Step 1 — Locate installed package
|
|
25
45
|
|
|
26
|
-
Find the
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
npm install -g rihal-code
|
|
33
|
-
```
|
|
34
|
-
Exit.
|
|
46
|
+
Find the local rcode installer (used as the network-fallback path in
|
|
47
|
+
Step 7). Try in order:
|
|
48
|
+
|
|
49
|
+
1. `$(npm root -g)/@hanzlaa/rcode/cli/install.js` (global install)
|
|
50
|
+
2. `./cli/install.js` (local clone)
|
|
51
|
+
3. If neither exists, skip — Step 7's primary path uses `npx @hanzlaa/rcode@latest` and works without a local installer.
|
|
35
52
|
|
|
36
|
-
Store the
|
|
53
|
+
Store the resolved path (or empty) in `$INSTALLER_PATH`.
|
|
37
54
|
|
|
38
55
|
## Step 2 — Read installed manifest
|
|
39
56
|
|
|
@@ -45,8 +62,8 @@ cat .rihal/_config/files-manifest.csv
|
|
|
45
62
|
|
|
46
63
|
If the file doesn't exist:
|
|
47
64
|
```
|
|
48
|
-
ℹ️ No
|
|
49
|
-
Run:
|
|
65
|
+
ℹ️ No rcode installation detected in this project.
|
|
66
|
+
Run: npx @hanzlaa/rcode@latest install . --yes
|
|
50
67
|
```
|
|
51
68
|
Exit.
|
|
52
69
|
|
|
@@ -121,20 +138,61 @@ Options:
|
|
|
121
138
|
- If user chooses [1], proceed to Step 7
|
|
122
139
|
- If user chooses [2], print "Update cancelled" and exit
|
|
123
140
|
|
|
124
|
-
## Step 7 — Apply update
|
|
141
|
+
## Step 7 — Apply update (non-destructive by default per #232)
|
|
125
142
|
|
|
126
|
-
|
|
143
|
+
Pull from npm AND install non-destructively. User-modified files are
|
|
144
|
+
preserved automatically; the installer reports each one in the summary.
|
|
127
145
|
|
|
128
146
|
```bash
|
|
129
|
-
|
|
147
|
+
npx @hanzlaa/rcode@latest install . --non-destructive --yes
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
**If the user explicitly wants destructive overwrite** (rare — only
|
|
151
|
+
when they intentionally want to discard their customizations):
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
npx @hanzlaa/rcode@latest install . --force-overwrite --yes
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**Version pinning** — if the user passed `/rihal:update v2.4.0`, pass
|
|
158
|
+
the version through:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
npx @hanzlaa/rcode@2.4.0 install . --non-destructive --yes
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
**Local fallback** — if the user's network can't reach npm, fall back
|
|
165
|
+
to the locally-cached installer (still non-destructive):
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
node "$INSTALLER_PATH" . --non-destructive --yes
|
|
130
169
|
```
|
|
131
170
|
|
|
132
171
|
If the command exits with non-zero status, print:
|
|
172
|
+
|
|
133
173
|
```
|
|
134
174
|
❌ Update failed. Check the output above.
|
|
175
|
+
Tip: try --force-overwrite if you intentionally want to overwrite
|
|
176
|
+
your customizations, or run with the local installer fallback.
|
|
135
177
|
```
|
|
178
|
+
|
|
136
179
|
Exit with error code.
|
|
137
180
|
|
|
181
|
+
## Step 7.5 — Surface preserved files
|
|
182
|
+
|
|
183
|
+
The installer's stdout will include a "user-modified preserved" report
|
|
184
|
+
when relevant. Capture it and re-print as a callout so users notice:
|
|
185
|
+
|
|
186
|
+
```
|
|
187
|
+
ℹ Files preserved (your customizations were kept):
|
|
188
|
+
- .claude/skills/rihal-create-prd/workflow.md
|
|
189
|
+
- rihal/workflows/sprint-planning.md
|
|
190
|
+
- .rihal/references/output-format.md
|
|
191
|
+
|
|
192
|
+
These will not auto-update on future /rihal:update calls. To force
|
|
193
|
+
their update next time, run /rihal:update --force-overwrite.
|
|
194
|
+
```
|
|
195
|
+
|
|
138
196
|
## Step 8 — Pull Rihal brain content (v2.0)
|
|
139
197
|
|
|
140
198
|
After installer finishes, refresh the brain content from configured sources (issue #158). This is idempotent and safe to re-run.
|
|
@@ -83,7 +83,13 @@ No gaps → skip to Step 6, set `nyquist_compliant: true`.
|
|
|
83
83
|
|
|
84
84
|
## 4. Present Gap Plan
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
```bash
|
|
87
|
+
CONFIG_MODE=$(node .rihal/bin/rihal-tools.cjs config-get mode 2>/dev/null || echo "guided")
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**If `CONFIG_MODE == "yolo"`:** Auto-select option 1 ("Fix all gaps") and proceed to Step 5 without asking. Print: `▶ Auto-fixing all gaps (yolo mode).`
|
|
91
|
+
|
|
92
|
+
Otherwise call AskUserQuestion with gap table and options:
|
|
87
93
|
1. "Fix all gaps" → Step 5
|
|
88
94
|
2. "Skip — mark manual-only" → add to Manual-Only, Step 6
|
|
89
95
|
3. "Cancel" → exit
|