@hanzlaa/rcode 3.3.2 → 3.4.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/README.md +23 -38
- package/cli/index.js +0 -0
- package/cli/install.js +37 -29
- package/cli/update.js +17 -20
- package/dist/rcode.js +52 -48
- package/package.json +10 -10
- package/rihal/agents/rihal-assumptions-analyzer.md +1 -1
- package/rihal/agents/rihal-fatima.md +1 -0
- package/rihal/agents/rihal-integration-checker.md +1 -0
- package/rihal/agents/rihal-khalid.md +1 -0
- package/rihal/agents/rihal-noor.md +1 -0
- package/rihal/agents/rihal-project-researcher.md +1 -0
- package/rihal/agents/rihal-research-synthesizer.md +1 -0
- package/rihal/agents/rihal-waleed.md +1 -0
- package/rihal/skills/actions/1-analysis/research/rihal-domain-research/SKILL.md +2 -0
- package/rihal/skills/actions/1-analysis/research/rihal-market-research/SKILL.md +2 -0
- package/rihal/skills/actions/1-analysis/research/rihal-technical-research/SKILL.md +2 -0
- package/rihal/skills/actions/1-analysis/rihal-document-project/SKILL.md +2 -0
- package/rihal/skills/actions/1-analysis/rihal-prfaq/SKILL.md +2 -0
- package/rihal/skills/actions/1-analysis/rihal-product-brief/SKILL.md +2 -0
- package/rihal/skills/actions/2-plan/rihal-create-epics-and-stories/SKILL.md +2 -0
- package/rihal/skills/actions/2-plan/rihal-create-milestone/SKILL.md +2 -0
- package/rihal/skills/actions/2-plan/rihal-create-prd/SKILL.md +2 -0
- package/rihal/skills/actions/2-plan/rihal-create-story/SKILL.md +2 -0
- package/rihal/skills/actions/2-plan/rihal-create-ux-design/SKILL.md +2 -0
- package/rihal/skills/actions/2-plan/rihal-edit-prd/SKILL.md +2 -0
- package/rihal/skills/actions/2-plan/rihal-frontend-design/SKILL.md +2 -0
- package/rihal/skills/actions/2-plan/rihal-validate-prd/SKILL.md +2 -0
- package/rihal/skills/actions/3-solutioning/rihal-check-implementation-readiness/SKILL.md +2 -0
- package/rihal/skills/actions/3-solutioning/rihal-create-architecture/SKILL.md +2 -0
- package/rihal/skills/actions/3-solutioning/rihal-generate-project-context/SKILL.md +2 -0
- package/rihal/skills/actions/4-implementation/rihal-browser-verify/SKILL.md +2 -0
- package/rihal/skills/actions/4-implementation/rihal-ci/SKILL.md +2 -0
- package/rihal/skills/actions/4-implementation/rihal-code-review/SKILL.md +2 -0
- package/rihal/skills/actions/4-implementation/rihal-correct-course/SKILL.md +2 -0
- package/rihal/skills/actions/4-implementation/rihal-debug/SKILL.md +2 -0
- package/rihal/skills/actions/4-implementation/rihal-dev-story/SKILL.md +2 -0
- package/rihal/skills/actions/4-implementation/rihal-git-flow/SKILL.md +2 -0
- package/rihal/skills/actions/4-implementation/rihal-harden/SKILL.md +2 -0
- package/rihal/skills/actions/4-implementation/rihal-incremental/SKILL.md +2 -0
- package/rihal/skills/actions/4-implementation/rihal-migrate/SKILL.md +2 -0
- package/rihal/skills/actions/4-implementation/rihal-perf/SKILL.md +2 -0
- package/rihal/skills/actions/4-implementation/rihal-prove-it/SKILL.md +2 -0
- package/rihal/skills/actions/4-implementation/rihal-qa-generate-e2e-tests/SKILL.md +2 -0
- package/rihal/skills/actions/4-implementation/rihal-retrospective/SKILL.md +2 -0
- package/rihal/skills/actions/4-implementation/rihal-scaffold-project/SKILL.md +2 -0
- package/rihal/skills/actions/4-implementation/rihal-source-truth/SKILL.md +2 -0
- package/rihal/skills/actions/4-implementation/rihal-sprint-planning/SKILL.md +2 -0
- package/rihal/skills/actions/4-implementation/rihal-sprint-status/SKILL.md +2 -0
- package/rihal/skills/actions/4-implementation/rihal-trim/SKILL.md +2 -0
- package/rihal/skills/agents/ahmed-hassani-director/SKILL.md +2 -0
- package/rihal/skills/agents/dalil-scout/SKILL.md +2 -0
- package/rihal/skills/agents/fatima-qa/SKILL.md +2 -0
- package/rihal/skills/agents/haitham-frontend/SKILL.md +2 -0
- package/rihal/skills/agents/hanzla-engineer/SKILL.md +2 -0
- package/rihal/skills/agents/hussain-pm/SKILL.md +2 -0
- package/rihal/skills/agents/hussain-sm/SKILL.md +2 -0
- package/rihal/skills/agents/layla-designer/SKILL.md +2 -0
- package/rihal/skills/agents/majlis-council/SKILL.md +2 -0
- package/rihal/skills/agents/mariam-marketing/SKILL.md +2 -0
- package/rihal/skills/agents/nasser-eng-manager/SKILL.md +2 -0
- package/rihal/skills/agents/noor-writer/SKILL.md +2 -0
- package/rihal/skills/agents/raees-orchestrator/SKILL.md +2 -0
- package/rihal/skills/agents/sadiq-analyst/SKILL.md +2 -0
- package/rihal/skills/agents/waleed-architect/SKILL.md +2 -0
- package/rihal/skills/agents/yousef-backend/SKILL.md +2 -0
- package/rihal/skills/agents/zahra-branding/SKILL.md +2 -0
- package/rihal/skills/agents/zayd-ml/SKILL.md +2 -0
- package/rihal/skills/core/rihal-advanced-elicitation/SKILL.md +2 -0
- package/rihal/skills/core/rihal-auth-audit/SKILL.md +2 -0
- package/rihal/skills/core/rihal-brainstorming/SKILL.md +2 -0
- package/rihal/skills/core/rihal-client-gate/SKILL.md +2 -0
- package/rihal/skills/core/rihal-clone-website/SKILL.md +2 -0
- package/rihal/skills/core/rihal-deploy-unify/SKILL.md +2 -0
- package/rihal/skills/core/rihal-distillator/SKILL.md +2 -0
- package/rihal/skills/core/rihal-editorial-review-prose/SKILL.md +2 -0
- package/rihal/skills/core/rihal-editorial-review-structure/SKILL.md +2 -0
- package/rihal/skills/core/rihal-help/SKILL.md +2 -0
- package/rihal/skills/core/rihal-incident-record/SKILL.md +2 -0
- package/rihal/skills/core/rihal-index-docs/SKILL.md +2 -0
- package/rihal/skills/core/rihal-init/SKILL.md +2 -0
- package/rihal/skills/core/rihal-memory-audit/SKILL.md +2 -0
- package/rihal/skills/core/rihal-memory-distill/SKILL.md +2 -0
- package/rihal/skills/core/rihal-memory-init/SKILL.md +2 -0
- package/rihal/skills/core/rihal-memory-update/SKILL.md +2 -0
- package/rihal/skills/core/rihal-mvp-graduate/SKILL.md +2 -0
- package/rihal/skills/core/rihal-ocr-consistency/SKILL.md +2 -0
- package/rihal/skills/core/rihal-party-mode/SKILL.md +2 -0
- package/rihal/skills/core/rihal-rebrand/SKILL.md +2 -0
- package/rihal/skills/core/rihal-review-adversarial-general/SKILL.md +2 -0
- package/rihal/skills/core/rihal-review-edge-case-hunter/SKILL.md +2 -0
- package/rihal/skills/core/rihal-shard-doc/SKILL.md +2 -0
- package/rihal/skills/core/rihal-theme-system/SKILL.md +2 -0
- package/rihal/workflows/add-tests.md +1 -0
- package/rihal/workflows/audit-fix.md +2 -0
- package/rihal/workflows/autonomous.md +1 -0
- package/rihal/workflows/code-review-fix.md +2 -1
- package/rihal/workflows/debug.md +1 -0
- package/rihal/workflows/dev-story.md +1 -0
- package/rihal/workflows/execute-sprint.md +1 -0
- package/rihal/workflows/execute.md +1 -0
- package/rihal/workflows/init.md +82 -0
- package/rihal/workflows/plan.md +1 -0
- package/rihal/workflows/ship.md +2 -0
- package/rihal/workflows/sprint-planning.md +1 -0
- package/rihal/workflows/validate-phase.md +1 -0
- package/rihal/workflows/verify-phase.md +1 -0
- package/server/lib/api.js +49 -0
- package/server/lib/html/client.js +100 -10
- package/server/lib/html/css.js +64 -1
- package/server/lib/html/shell.js +11 -5
|
@@ -6,6 +6,7 @@ Users currently hand-craft `/rihal-quick` prompts for test generation after each
|
|
|
6
6
|
|
|
7
7
|
<required_reading>
|
|
8
8
|
Read all files referenced by the invoking prompt's execution_context before starting.
|
|
9
|
+
@.rihal/references/karpathy-guidelines.md
|
|
9
10
|
</required_reading>
|
|
10
11
|
|
|
11
12
|
<process>
|
|
@@ -4,6 +4,8 @@ auto-fixable vs manual-only, spawns executor agents for fixable issues, runs tes
|
|
|
4
4
|
after each fix, and commits atomically with finding IDs for traceability.
|
|
5
5
|
</purpose>
|
|
6
6
|
|
|
7
|
+
@.rihal/references/karpathy-guidelines.md
|
|
8
|
+
|
|
7
9
|
<available_agent_types>
|
|
8
10
|
- rihal-executor — executes a specific, scoped code change
|
|
9
11
|
</available_agent_types>
|
|
@@ -42,6 +42,7 @@ interpos audit (issue #221) — DO NOT regress.
|
|
|
42
42
|
@.rihal/references/output-realism.md
|
|
43
43
|
@rihal/brain/best-practices/no-autonomous-bypass.md
|
|
44
44
|
@rihal/brain/best-practices/state-sync-rule.md
|
|
45
|
+
@.rihal/references/karpathy-guidelines.md
|
|
45
46
|
|
|
46
47
|
Read all files referenced by the invoking prompt's execution_context before starting.
|
|
47
48
|
|
|
@@ -4,6 +4,7 @@ Auto-fix issues from REVIEW.md. Validates phase, checks config gate, verifies RE
|
|
|
4
4
|
|
|
5
5
|
<required_reading>
|
|
6
6
|
Read all files referenced by the invoking prompt's execution_context before starting.
|
|
7
|
+
@.rihal/references/karpathy-guidelines.md
|
|
7
8
|
</required_reading>
|
|
8
9
|
|
|
9
10
|
<available_agent_types>
|
|
@@ -280,7 +281,7 @@ if [ "$AUTO_MODE" = "true" ]; then
|
|
|
280
281
|
if [ ${#REVIEW_FILES_ARRAY[@]} -gt 0 ]; then
|
|
281
282
|
FILES_CONFIG="files:"
|
|
282
283
|
for f in "${REVIEW_FILES_ARRAY[@]}"; do
|
|
283
|
-
FILES_CONFIG="${FILES_CONFIG}
|
|
284
|
+
FILES_CONFIG="${FILES_CONFIG}"
|
|
284
285
|
- ${f}"
|
|
285
286
|
done
|
|
286
287
|
fi
|
package/rihal/workflows/debug.md
CHANGED
|
@@ -138,6 +138,7 @@ fi
|
|
|
138
138
|
@.rihal/references/checklist-story-draft.md
|
|
139
139
|
@.rihal/references/checklist-story-dod.md
|
|
140
140
|
@.rihal/references/commit-conventions.md
|
|
141
|
+
@.rihal/references/karpathy-guidelines.md
|
|
141
142
|
```
|
|
142
143
|
|
|
143
144
|
`STORY_CONTENT`, `STORY_ID`, `STORY_TITLE`, `PERSONA`, `EFFORT` are already set from Step 0.
|
|
@@ -148,6 +148,7 @@ Read STATE.md before any operation to load project context.
|
|
|
148
148
|
@.rihal/references/agent-contracts.md
|
|
149
149
|
@.rihal/references/context-budget.md
|
|
150
150
|
@.rihal/references/gates.md
|
|
151
|
+
@.rihal/references/karpathy-guidelines.md
|
|
151
152
|
</required_reading>
|
|
152
153
|
|
|
153
154
|
<available_agent_types>
|
package/rihal/workflows/init.md
CHANGED
|
@@ -194,6 +194,86 @@ This file is a journey baseline — intentionally shallow. For deep analysis run
|
|
|
194
194
|
|
|
195
195
|
If no code detected, write a minimal RIHLA.md with just the header and a "fresh project — no code yet" note.
|
|
196
196
|
|
|
197
|
+
## Step 4b — Populate context files
|
|
198
|
+
|
|
199
|
+
After writing RIHLA.md, populate the two context files that every Rihal skill reads at runtime. These files are the project's "memory bank" — without them, agents work blind.
|
|
200
|
+
|
|
201
|
+
**`.rihal/context/active.md`** — Current task context and working state. Write it using the RIHLA.md scan data from Step 4:
|
|
202
|
+
|
|
203
|
+
```markdown
|
|
204
|
+
# Active Context
|
|
205
|
+
|
|
206
|
+
**Last updated:** {ISO date}
|
|
207
|
+
**Updated by:** /rihal-init
|
|
208
|
+
|
|
209
|
+
## Current State
|
|
210
|
+
|
|
211
|
+
- **Project:** {project_name}
|
|
212
|
+
- **Primary stack:** {detected language + framework}
|
|
213
|
+
- **Branch:** {git branch or "n/a"}
|
|
214
|
+
- **Recent focus:** {summary from last 5 commit messages, or "fresh project"}
|
|
215
|
+
|
|
216
|
+
## Active Work
|
|
217
|
+
|
|
218
|
+
{If returning with --reset: summarize what was in progress from git log}
|
|
219
|
+
{If existing-new-rihal: "Rihal just configured — no active work tracked yet."}
|
|
220
|
+
{If fresh: "New project — no code yet."}
|
|
221
|
+
|
|
222
|
+
## Key Decisions
|
|
223
|
+
|
|
224
|
+
- Rihal configured with mode: {mode from Step 2}
|
|
225
|
+
- Branching strategy: {strategy from Step 2}
|
|
226
|
+
- Model profile: {profile from Step 2}
|
|
227
|
+
|
|
228
|
+
## Open Questions
|
|
229
|
+
|
|
230
|
+
_None yet. Use `/rihal-explore` or `/rihal-council` to surface questions._
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
**`.rihal/context/project-brief.md`** — High-level project description. Write it using the RIHLA.md scan data:
|
|
234
|
+
|
|
235
|
+
```markdown
|
|
236
|
+
# Project Brief
|
|
237
|
+
|
|
238
|
+
**Project:** {project_name}
|
|
239
|
+
**Created:** {ISO date}
|
|
240
|
+
|
|
241
|
+
## Overview
|
|
242
|
+
|
|
243
|
+
{If code exists: 3-5 sentence summary derived from README + package manifest — what the project does, who it's for, and the primary tech stack}
|
|
244
|
+
{If fresh: "Project not yet started. Run `/rihal-new-project` to design it."}
|
|
245
|
+
|
|
246
|
+
## Technical Stack
|
|
247
|
+
|
|
248
|
+
- **Language:** {detected primary language}
|
|
249
|
+
- **Framework:** {detected framework or "none detected"}
|
|
250
|
+
- **Package manager:** {npm/pnpm/pip/cargo/etc or "none detected"}
|
|
251
|
+
|
|
252
|
+
## Project Goals
|
|
253
|
+
|
|
254
|
+
_To be refined. Run `/rihal-create-prd` for full requirements discovery._
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
Ensure the directory exists before writing:
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
mkdir -p .rihal/context
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
**Important:** If `--reset` is passed and the files already have user-written content beyond the template stub, preserve a backup before overwriting:
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
if [ -s .rihal/context/active.md ] && ! grep -q "Run \`/rihal" .rihal/context/active.md; then
|
|
267
|
+
cp .rihal/context/active.md .rihal/context/active.md.bak
|
|
268
|
+
fi
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
After writing both files, refresh the memory bank fingerprint so staleness checks see the project as fresh:
|
|
272
|
+
|
|
273
|
+
```bash
|
|
274
|
+
node .rihal/bin/rihal-tools.cjs context refresh 2>/dev/null || true
|
|
275
|
+
```
|
|
276
|
+
|
|
197
277
|
## Step 5 — Suggest the next step
|
|
198
278
|
|
|
199
279
|
Print a contextual recommendation, **one line of copy-paste per suggestion** (per `.rihal/references/command-redirect-format.md`):
|
|
@@ -246,6 +326,8 @@ Silent if state tools fail.
|
|
|
246
326
|
- [ ] `.rihal/config.yaml` written with user's answers
|
|
247
327
|
- [ ] `.rihal/state.json` exists (created or preserved)
|
|
248
328
|
- [ ] `.rihal/RIHLA.md` written (unless `--skip-scan` or no code)
|
|
329
|
+
- [ ] `.rihal/context/active.md` populated with project state (not the placeholder stub)
|
|
330
|
+
- [ ] `.rihal/context/project-brief.md` populated with project overview (not the placeholder stub)
|
|
249
331
|
- [ ] State detected correctly (fresh / existing-new-rihal / returning)
|
|
250
332
|
- [ ] Contextual next-step suggestion printed as single-line copy-paste
|
|
251
333
|
|
package/rihal/workflows/plan.md
CHANGED
|
@@ -49,6 +49,7 @@ Read all files referenced by the invoking prompt's execution_context before star
|
|
|
49
49
|
@.rihal/references/gate-prompts.md
|
|
50
50
|
@.rihal/references/agent-contracts.md
|
|
51
51
|
@.rihal/references/gates.md
|
|
52
|
+
@.rihal/references/karpathy-guidelines.md
|
|
52
53
|
</required_reading>
|
|
53
54
|
|
|
54
55
|
<available_agent_types>
|
package/rihal/workflows/ship.md
CHANGED
|
@@ -17,6 +17,8 @@ the plan → execute → verify → **ship** loop.
|
|
|
17
17
|
- You are on a feature branch (not main/develop directly)
|
|
18
18
|
- `gh` CLI is authenticated (`gh auth status`)
|
|
19
19
|
|
|
20
|
+
@.rihal/references/karpathy-guidelines.md
|
|
21
|
+
|
|
20
22
|
**This command is NOT for:**
|
|
21
23
|
- Publishing npm packages → use `npm publish`
|
|
22
24
|
- Creating git release tags → use `git tag -a vX.Y.Z && git push --tags`
|
|
@@ -39,6 +39,7 @@ they bypass the capacity gate.
|
|
|
39
39
|
@.rihal/references/output-format.md
|
|
40
40
|
@rihal/brain/best-practices/no-autonomous-bypass.md
|
|
41
41
|
@rihal/brain/best-practices/state-sync-rule.md
|
|
42
|
+
@.rihal/references/karpathy-guidelines.md
|
|
42
43
|
</required_reading>
|
|
43
44
|
|
|
44
45
|
<output_format>
|
package/server/lib/api.js
CHANGED
|
@@ -25,6 +25,55 @@ function handleApiFiles(req, res, projectRoot) {
|
|
|
25
25
|
|
|
26
26
|
for (const dir of ARTIFACT_DIRS) {
|
|
27
27
|
const full = path.join(PLANNING_DIR, dir);
|
|
28
|
+
|
|
29
|
+
// For 'phases', create sub-groups per phase directory
|
|
30
|
+
if (dir === 'phases') {
|
|
31
|
+
let phaseDirs;
|
|
32
|
+
try { phaseDirs = fs.readdirSync(full, { withFileTypes: true }); } catch { continue; }
|
|
33
|
+
const subGroups = [];
|
|
34
|
+
for (const pd of phaseDirs) {
|
|
35
|
+
if (!pd.isDirectory() || pd.name.startsWith('.')) continue;
|
|
36
|
+
const phaseDir = path.join(full, pd.name);
|
|
37
|
+
const phaseLabel = pd.name.replace(/^\d+-/, '').replace(/-/g, ' ')
|
|
38
|
+
.replace(/\b\w/g, c => c.toUpperCase());
|
|
39
|
+
const phaseFiles = [];
|
|
40
|
+
function walkPhase(d, prefix, depth) {
|
|
41
|
+
if (depth > 3) return;
|
|
42
|
+
let entries;
|
|
43
|
+
try { entries = fs.readdirSync(d, { withFileTypes: true }); } catch { return; }
|
|
44
|
+
for (const e of entries) {
|
|
45
|
+
if (e.name.startsWith('.')) continue;
|
|
46
|
+
const rel = prefix + '/' + e.name;
|
|
47
|
+
if (e.isDirectory()) walkPhase(path.join(d, e.name), rel, depth + 1);
|
|
48
|
+
else if (e.isFile() && e.name.endsWith('.md')) {
|
|
49
|
+
const base = e.name.replace('.md', '');
|
|
50
|
+
const sprintMatch = base.match(/^\d{2}-(\d{2})-([A-Z]+)$/);
|
|
51
|
+
const dateMatch = base.match(/^\d{4}-\d{2}-\d{2}-(.+)$/);
|
|
52
|
+
let fileLabel;
|
|
53
|
+
if (sprintMatch) {
|
|
54
|
+
fileLabel = sprintMatch[2].charAt(0) + sprintMatch[2].slice(1).toLowerCase() + ' ' + parseInt(sprintMatch[1], 10);
|
|
55
|
+
} else if (dateMatch) {
|
|
56
|
+
fileLabel = dateMatch[1].replace(/-/g, ' ').replace(/\b\w/g, c => c.toUpperCase());
|
|
57
|
+
} else if (base === base.toUpperCase() && /^[A-Z_-]+$/.test(base)) {
|
|
58
|
+
fileLabel = base.charAt(0) + base.slice(1).toLowerCase();
|
|
59
|
+
} else {
|
|
60
|
+
fileLabel = base.replace(/-/g, ' ').replace(/\b\w/g, c => c.toUpperCase());
|
|
61
|
+
}
|
|
62
|
+
phaseFiles.push({ label: fileLabel, path: '.planning/phases/' + pd.name + rel });
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
walkPhase(phaseDir, '', 0);
|
|
67
|
+
if (phaseFiles.length) {
|
|
68
|
+
subGroups.push({ subGroup: phaseLabel, files: phaseFiles });
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
if (subGroups.length) {
|
|
72
|
+
groups.push({ group: 'Phases', subGroups });
|
|
73
|
+
}
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
|
|
28
77
|
const files = [];
|
|
29
78
|
function walkArtifacts(d, prefix, depth) {
|
|
30
79
|
if (depth > 3) return;
|