@hanzlaa/rcode 2.6.4 → 2.6.6
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/package.json +1 -1
- package/rihal/workflows/add-phase.md +35 -1
- package/rihal/workflows/do.md +14 -15
- package/rihal/workflows/quick.md +56 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzlaa/rcode",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.6",
|
|
4
4
|
"description": "Rihal Code (rcode) — installable context-brain for Rihalians. 43 agents, 99 slash commands, 56 skills, pullable Rihal standards. Unified install for Claude Code, Cursor, and Gemini.",
|
|
5
5
|
"main": "cli/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -41,11 +41,43 @@ Run /rihal:new-project to initialize.
|
|
|
41
41
|
Exit.
|
|
42
42
|
</step>
|
|
43
43
|
|
|
44
|
+
<step name="detect_task_list">
|
|
45
|
+
**Detect bulk-task input** — when /rihal:quick or /rihal:do auto-routes a multi-task input here, the entire bug list arrives as `${description}`. Don't put it all in the phase title; extract structure.
|
|
46
|
+
|
|
47
|
+
Match if `${description}` contains ANY of:
|
|
48
|
+
- 5+ numbered list items (`/^\s*\d+\.\s/m` ≥ 5)
|
|
49
|
+
- 5+ bullet items (`/^\s*[-*]\s/m` ≥ 5)
|
|
50
|
+
- 3+ "Bug Report:" / "Issue:" / "Severity:" headers
|
|
51
|
+
- Multiple newlines (> 5 lines total)
|
|
52
|
+
|
|
53
|
+
If matched:
|
|
54
|
+
|
|
55
|
+
1. **Phase name** = first line of `${description}` (or first 80 chars if no newline). If the first line is itself a heading like `# Phase 09 — UI Bug Cleanup`, strip the leading `#` characters.
|
|
56
|
+
2. **Phase body** = the rest of the input.
|
|
57
|
+
3. After the phase directory is created (next step), write the body to `.planning/phases/{NN}-{slug}/TASKS.md` with header:
|
|
58
|
+
|
|
59
|
+
```markdown
|
|
60
|
+
# Phase {N} — {phase name} — Tasks
|
|
61
|
+
|
|
62
|
+
*Auto-extracted from /rihal:quick or /rihal:do bulk auto-route on {ISO date}.*
|
|
63
|
+
|
|
64
|
+
{original body, preserved verbatim}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
4. Note in the completion message: "TASKS.md written with N tasks". The downstream /rihal:plan workflow consumes TASKS.md as the input to SPRINT.md generation — no manual re-paste needed.
|
|
68
|
+
|
|
69
|
+
If NOT matched (single task), proceed normally — `${description}` is the phase name as-is.
|
|
70
|
+
|
|
71
|
+
Set `BULK_MODE=true|false` for the next step.
|
|
72
|
+
</step>
|
|
73
|
+
|
|
44
74
|
<step name="add_phase">
|
|
45
75
|
**Delegate the phase addition to rihal-tools:**
|
|
46
76
|
|
|
47
77
|
```bash
|
|
48
|
-
|
|
78
|
+
# In bulk mode, pass only the extracted phase name (not the entire body)
|
|
79
|
+
PHASE_NAME=$( [ "$BULK_MODE" = "true" ] && echo "$EXTRACTED_FIRST_LINE" || echo "$description" )
|
|
80
|
+
RESULT=$(node ".rihal/bin/rihal-tools.cjs" phase add "${PHASE_NAME}")
|
|
49
81
|
```
|
|
50
82
|
|
|
51
83
|
The CLI handles:
|
|
@@ -56,6 +88,8 @@ The CLI handles:
|
|
|
56
88
|
- Inserting the phase entry into ROADMAP.md with Goal, Depends on, and Plans sections
|
|
57
89
|
|
|
58
90
|
Extract from result: `phase_number`, `padded`, `name`, `slug`, `directory`.
|
|
91
|
+
|
|
92
|
+
**If `BULK_MODE=true`:** after the CLI returns, write the bulk body to `${directory}/TASKS.md` per the structure defined in `detect_task_list`. This step is non-destructive — it only ADDs a TASKS.md file inside the new phase directory.
|
|
59
93
|
</step>
|
|
60
94
|
|
|
61
95
|
<step name="update_project_state">
|
package/rihal/workflows/do.md
CHANGED
|
@@ -4,6 +4,7 @@ Analyze freeform text from the user and route to the most appropriate Rihal comm
|
|
|
4
4
|
|
|
5
5
|
<required_reading>
|
|
6
6
|
@.rihal/references/output-format.md
|
|
7
|
+
@.rihal/references/verb-dictionary.md
|
|
7
8
|
Read all files referenced by the invoking prompt's execution_context before starting.
|
|
8
9
|
</required_reading>
|
|
9
10
|
|
|
@@ -149,25 +150,23 @@ When the user uses a literal create/make/start verb paired with a scope-noun (mi
|
|
|
149
150
|
|
|
150
151
|
This was a real bug: `/rihal:do "milestone bnao aur ... list down karo"` triggered an ambiguity prompt offering new-milestone vs add-phase vs create-epics-and-stories — even though the user literally said "milestone bnao" (= "create a milestone" in Roman Urdu). That second-guessing wasted the user's time and broke trust.
|
|
151
152
|
|
|
152
|
-
**Verb
|
|
153
|
+
**Verb + scope detection — sourced from `@.rihal/references/verb-dictionary.md`.**
|
|
153
154
|
|
|
154
|
-
|
|
155
|
-
- Roman Urdu / Hindi: `bnao`, `banao`, `bana do`, `bnado`, `banaa`, `banade`, `shuru karo`, `start karo`, `create karo`, `naya banao`, `add karo`, `daal do`
|
|
156
|
-
- Arabic transliteration: `ansha'`, `inshaa`
|
|
155
|
+
Match if `$QUESTION` contains any verb from §Create or §Add (English + Roman Urdu/Hindi + Arabic transliteration — full list lives in the dictionary file, do not duplicate here). Pair with a scope noun to determine the route.
|
|
157
156
|
|
|
158
|
-
|
|
157
|
+
The full mapping is in the dictionary's "Scope nouns" table. Pre-conditions enforced by this workflow:
|
|
159
158
|
|
|
160
|
-
| Scope noun
|
|
159
|
+
| Scope noun | Direct route | Pre-condition (this workflow only) |
|
|
161
160
|
|---|---|---|
|
|
162
|
-
|
|
|
163
|
-
|
|
|
164
|
-
|
|
|
165
|
-
|
|
|
166
|
-
|
|
|
167
|
-
|
|
|
168
|
-
|
|
|
169
|
-
|
|
|
170
|
-
|
|
|
161
|
+
| milestone | `/rihal:new-milestone` | none — methodology chain assumed when greenfield_guard cleared |
|
|
162
|
+
| phase | `/rihal:add-phase` | HAS_PHASES OR HAS_PRD true |
|
|
163
|
+
| story | `/rihal:create-story` | HAS_EPICS true |
|
|
164
|
+
| epic | `/rihal:create-epics-and-stories` | HAS_PRD true |
|
|
165
|
+
| sprint | `/rihal:sprint-planning` | HAS_EPICS true |
|
|
166
|
+
| PRD | `/rihal:create-prd` | none |
|
|
167
|
+
| roadmap | `/rihal:create-milestone` | HAS_PRD true |
|
|
168
|
+
| council | `/rihal:council` | none |
|
|
169
|
+
| plan (verb) | `/rihal:plan` | HAS_PHASES true |
|
|
171
170
|
|
|
172
171
|
**Behavior:**
|
|
173
172
|
1. If both a verb AND a scope-noun match, fire this step.
|
package/rihal/workflows/quick.md
CHANGED
|
@@ -95,6 +95,62 @@ Do the work directly:
|
|
|
95
95
|
**No SPRINT.md. No subagents. Just do it.**
|
|
96
96
|
</step>
|
|
97
97
|
|
|
98
|
+
<step name="blocker_handling">
|
|
99
|
+
**When investigation reveals a blocker, do NOT present a multi-option menu.** Pick ONE response per the rules below.
|
|
100
|
+
|
|
101
|
+
Common blocker types:
|
|
102
|
+
- Need a screenshot / browser-rendered state to confirm
|
|
103
|
+
- Need the dev server running
|
|
104
|
+
- Need a decision the user hasn't given yet
|
|
105
|
+
- Need access to an external system (production logs, Sentry, etc.)
|
|
106
|
+
|
|
107
|
+
**Rules:**
|
|
108
|
+
|
|
109
|
+
1. **If the original input was a LIST of tasks** (bulk_detection-eligible OR the user passed multiple tasks): silently SKIP the blocked task, log the blocker in the running tracker, and PIVOT to the next clearly-runnable task in the list. Do not stop. Do not ask. Do not present 5 options.
|
|
110
|
+
|
|
111
|
+
Example log line (appended to `.planning/BUG-TRACKER-YYYY-MM-DD.md` if it exists, or stdout otherwise):
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
⏸ #36 (Extraction wizard CSS) — skipped: needs runtime screenshot to confirm cascade-layer hypothesis. Will resume when dev server is available.
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Then continue with #19 / #17 / whichever is the next-most-runnable in the list. State the pivot in one line:
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
▶ Pivoting to next runnable: #19 (Breadcrumb UUID→name) — clear scope, no runtime needed.
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
2. **If the input was a SINGLE task and there's nothing to pivot to**: stop with ONE line stating the single specific blocker and how to unblock it. No menu. No options. The user pastes back the resolved info and re-runs.
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
⏸ Blocked on: a screenshot of the broken Extraction wizard. Paste the screenshot or run `pnpm dev` and share what you see — I'll resume from where I left off.
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
3. **If the user passed `--force-inline` AND the input was single-task AND blocked**: attempt the highest-confidence speculative fix, COMMIT it with a clear "speculative — needs runtime verification" prefix in the commit message, and proceed. The user explicitly chose this path.
|
|
130
|
+
|
|
131
|
+
**Never present a 4+ option menu in blocker_handling.** Multi-option menus during execution are decision-fatigue. Pick one response, do it, move on.
|
|
132
|
+
</step>
|
|
133
|
+
|
|
134
|
+
<step name="next_task_loop">
|
|
135
|
+
**If the original input was a list and there are remaining tasks after this one** (whether the current task succeeded, failed, or was skipped due to blocker), automatically continue to the next task without asking. State the pivot in one line and re-enter execute_inline.
|
|
136
|
+
|
|
137
|
+
**Stop the loop only when:**
|
|
138
|
+
- All tasks in the list are processed (done / skipped / blocked)
|
|
139
|
+
- A task touches `> 5` files (escalate the rest of the list to /rihal:add-phase)
|
|
140
|
+
- The user types stop / cancel / pause
|
|
141
|
+
|
|
142
|
+
At the end of the loop, summarise:
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
✅ Loop complete: {N} done · {M} skipped · {K} blocked
|
|
146
|
+
Done: {bullet list with commit hashes}
|
|
147
|
+
Skipped: {bullet list with reasons}
|
|
148
|
+
Blocked: {bullet list with what info is needed}
|
|
149
|
+
|
|
150
|
+
Resume blocked tasks: {one-line guidance on what to provide and re-run}
|
|
151
|
+
```
|
|
152
|
+
</step>
|
|
153
|
+
|
|
98
154
|
<step name="commit">
|
|
99
155
|
Commit atomically with conventional commit format (`fix:`, `feat:`, `docs:`, `chore:`, `refactor:`):
|
|
100
156
|
|