@hanzlaa/rcode 4.7.2 → 4.8.0

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.
Files changed (82) hide show
  1. package/AGENTS.md +1 -1
  2. package/CLAUDE.md +1 -1
  3. package/CONTRIBUTING.md +4 -0
  4. package/cli/github-sync.js +17 -201
  5. package/cli/lib/config.cjs +1 -1
  6. package/cli/lib/github-sync-discover.cjs +304 -0
  7. package/cli/lib/namespace-migrate.cjs +16 -1
  8. package/cli/uninstall.js +7 -2
  9. package/dist/rcode.js +194 -194
  10. package/package.json +1 -1
  11. package/rcode/agents/rcode-haitham.md +1 -1
  12. package/rcode/agents/rcode-hanzla.md +1 -1
  13. package/rcode/agents/rcode-hussain-pm.md +1 -1
  14. package/rcode/agents/rcode-nyquist-auditor.md +1 -1
  15. package/rcode/agents/rcode-omar.md +1 -1
  16. package/rcode/agents/rcode-remediation-planner.md +1 -1
  17. package/rcode/agents/rcode-waleed.md +1 -1
  18. package/rcode/agents/rcode-yousef.md +1 -1
  19. package/rcode/agents/rules/planner/task-templates.md +24 -22
  20. package/rcode/agents/rules/verifier/verification-report.md +2 -2
  21. package/rcode/bin/lib/roadmap.cjs +80 -4
  22. package/rcode/bin/rcode-tools.cjs +18 -1
  23. package/rcode/brain/best-practices/state-sync-rule.md +1 -1
  24. package/rcode/references/council-protocol.md +9 -4
  25. package/rcode/references/execute-auto-copy-learnings.md +15 -0
  26. package/rcode/references/execute-close-parent-artifacts.md +49 -0
  27. package/rcode/references/execute-interactive-mode.md +44 -0
  28. package/rcode/references/execute-notify-webhooks.md +22 -0
  29. package/rcode/references/execution-protocol.md +11 -11
  30. package/rcode/references/git-preflight.md +2 -2
  31. package/rcode/references/plan-gaps-mode.md +89 -0
  32. package/rcode/references/plan-thinking-partner.md +20 -0
  33. package/rcode/references/plan-windows-troubleshooting.md +25 -0
  34. package/rcode/references/planner-playbook.md +23 -29
  35. package/rcode/skills/_shared/state-sync-rule.md +1 -1
  36. package/rcode/skills/actions/1-analysis/rcode-document-project/SKILL.md +2 -0
  37. package/rcode/skills/actions/1-analysis/rcode-prfaq/SKILL.md +2 -0
  38. package/rcode/skills/actions/2-plan/rcode-create-epics-and-stories/SKILL.md +11 -0
  39. package/rcode/skills/actions/2-plan/rcode-create-prd/SKILL.md +2 -0
  40. package/rcode/skills/actions/2-plan/rcode-create-story/SKILL.md +11 -0
  41. package/rcode/skills/actions/2-plan/rcode-edit-prd/SKILL.md +2 -0
  42. package/rcode/skills/actions/2-plan/rcode-validate-prd/SKILL.md +2 -0
  43. package/rcode/skills/actions/3-solutioning/rcode-check-implementation-readiness/SKILL.md +2 -0
  44. package/rcode/skills/actions/3-solutioning/rcode-create-architecture/SKILL.md +2 -0
  45. package/rcode/skills/actions/4-implementation/rcode-checkpoint-preview/SKILL.md +2 -0
  46. package/rcode/skills/actions/4-implementation/rcode-code-review/SKILL.md +2 -0
  47. package/rcode/skills/actions/4-implementation/rcode-correct-course/SKILL.md +2 -0
  48. package/rcode/skills/actions/4-implementation/rcode-debug/SKILL.md +1 -1
  49. package/rcode/skills/actions/4-implementation/rcode-dev-story/SKILL.md +2 -0
  50. package/rcode/skills/actions/4-implementation/rcode-retrospective/SKILL.md +2 -0
  51. package/rcode/skills/actions/4-implementation/rcode-scaffold-project/SKILL.md +2 -0
  52. package/rcode/skills/actions/4-implementation/rcode-sprint-planning/SKILL.md +3 -2
  53. package/rcode/skills/actions/4-implementation/rcode-sprint-status/SKILL.md +2 -0
  54. package/rcode/skills/agents/haitham-frontend/SKILL.md +6 -0
  55. package/rcode/skills/agents/hanzla-engineer/SKILL.md +6 -0
  56. package/rcode/skills/agents/hussain-pm/SKILL.md +1 -1
  57. package/rcode/skills/agents/hussain-sm/SKILL.md +3 -3
  58. package/rcode/skills/agents/majlis-council/references.md +17 -7
  59. package/rcode/skills/agents/raees-orchestrator/SKILL.md +13 -11
  60. package/rcode/skills/agents/yousef-backend/SKILL.md +6 -0
  61. package/rcode/templates/github/epic-template.md +1 -1
  62. package/rcode/templates/github/feature-template.md +1 -1
  63. package/rcode/templates/github/task-template.md +1 -1
  64. package/rcode/templates/sprint.md +14 -3
  65. package/rcode/templates/verification-report.md +7 -4
  66. package/rcode/workflows/code-review-fix.md +5 -5
  67. package/rcode/workflows/code-review.md +1 -1
  68. package/rcode/workflows/council.md +1 -0
  69. package/rcode/workflows/create-epics-and-stories.md +12 -6
  70. package/rcode/workflows/dev-story.md +12 -14
  71. package/rcode/workflows/do.md +12 -9
  72. package/rcode/workflows/execute-sprint.md +4 -0
  73. package/rcode/workflows/execute-waves.md +44 -1
  74. package/rcode/workflows/execute.md +20 -119
  75. package/rcode/workflows/lens-audit.md +7 -7
  76. package/rcode/workflows/plan-spawn-planner.md +0 -1
  77. package/rcode/workflows/plan.md +25 -136
  78. package/rcode/workflows/quick.md +1 -1
  79. package/rcode/workflows/sprint-planning.md +14 -37
  80. package/server/lib/html/client/components/shared.js +21 -1
  81. package/server/lib/html/client/views/SprintsView.js +3 -3
  82. package/server/lib/scanner.js +7 -4
@@ -0,0 +1,89 @@
1
+ # plan.md — `--gaps` Mode (Handle `--gaps` Mode)
2
+
3
+ Extracted from `plan.md` step 3.6. Only loaded when `GAPS_MODE=true` — see the conditional include at that point in `plan.md`.
4
+
5
+ **Skip unless:** `GAPS_MODE=true`.
6
+
7
+ **Purpose:** Read `NNN-VERIFICATION.md`, extract failing/partial gaps, count existing plan files, and prepare a `gap_list` payload to feed the planner. On completion, control flow continues at step 8 (skipping CONTEXT.md gating, research, and validation-strategy creation).
8
+
9
+ **Step 1: Locate VERIFICATION.md**
10
+
11
+ ```bash
12
+ PHASE_DIR=$(node ".rcode/bin/rcode-tools.cjs" roadmap get-phase "${PHASE}" --pick dir 2>/dev/null || echo "")
13
+ # Fallback if --pick dir not supported. TODO(#118): expose roadmap --pick dir cleanly.
14
+ if [[ -z "$PHASE_DIR" ]]; then
15
+ PHASE_DIR=$(ls -d .planning/phases/${padded_phase}-* 2>/dev/null | head -1)
16
+ fi
17
+
18
+ VERIFICATION_FILE=$(ls "${PHASE_DIR}"/*-VERIFICATION.md 2>/dev/null | head -1)
19
+ ```
20
+
21
+ **If `VERIFICATION_FILE` is empty:**
22
+ ```
23
+ Error: No VERIFICATION.md found for Phase {X}. Gap-closure planning requires the phase to have run through the verifier first.
24
+
25
+ Try:
26
+ /rcode-execute {X} ${RCODE_WS} # run or re-run execution + verification
27
+ ```
28
+ Exit workflow.
29
+
30
+ **Step 2: Extract gaps from VERIFICATION.md**
31
+
32
+ Parse the file for gap entries with `status: gap_found` or `status: partial`. Inspect these sections:
33
+ - `## Automated Gap` (or `## Automated Gaps`)
34
+ - `## Human Verification Required`
35
+ - Any findings block that includes a `status:` field set to `gap_found` or `partial`
36
+
37
+ Collect into `GAP_LIST` (an ordered list where each entry has: id, title, expected, actual, status, source_section, severity if present).
38
+
39
+ If `GAP_LIST` is empty, display:
40
+ ```
41
+ Phase {X} VERIFICATION.md contains no gap_found or partial items — nothing to close.
42
+ Report: {VERIFICATION_FILE}
43
+ ```
44
+ Exit workflow.
45
+
46
+ **Step 3: Determine next plan number**
47
+
48
+ ```bash
49
+ EXISTING_PLAN_COUNT=$(ls "${PHASE_DIR}"/*-SPRINT.md 2>/dev/null | wc -l | tr -d ' ')
50
+ # Issue #652 — no leading zeros in planning artifacts. Phase 8 not 08, plan 2 not 02.
51
+ NEXT_PLAN_NUMBER=$((EXISTING_PLAN_COUNT + 1))
52
+ PADDED_PHASE="${PHASE}"
53
+ GAP_PLAN_FILENAME="${PADDED_PHASE}-${NEXT_PLAN_NUMBER}-SPRINT.md"
54
+ GAP_PLAN_PATH="${PHASE_DIR}/${GAP_PLAN_FILENAME}"
55
+ ```
56
+
57
+ If `EXISTING_PLAN_COUNT == 0`, there is no prior execution to reference. Display a warning but proceed — the planner can still close verification gaps.
58
+
59
+ **Step 4: Gather prior plans for planner context**
60
+
61
+ ```bash
62
+ EXISTING_PLAN_FILES=$(ls "${PHASE_DIR}"/*-SPRINT.md 2>/dev/null | tr '\n' ' ')
63
+ EXISTING_SUMMARY_FILES=$(ls "${PHASE_DIR}"/*-SUMMARY.md 2>/dev/null | tr '\n' ' ')
64
+ ```
65
+
66
+ **Step 5: Display banner**
67
+
68
+ ```
69
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
70
+ rcode ► GAP-CLOSURE PLANNING — Phase {X}
71
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
72
+
73
+ Verification report: {VERIFICATION_FILE}
74
+ Gaps to close: {count(GAP_LIST)}
75
+ Existing plans: {EXISTING_PLAN_COUNT}
76
+ New plan file: {GAP_PLAN_FILENAME}
77
+ ```
78
+
79
+ **Step 6: Skip ahead**
80
+
81
+ Control flow jumps directly to step 8 (Spawn rcode-planner). Steps 4 (CONTEXT.md), 5 (Research), and 5.5 (Validation) are ALL skipped when `GAPS_MODE=true`.
82
+
83
+ Step 8 will consume these variables when filling the planner prompt:
84
+ - `GAP_LIST` — serialized list of gaps (id, title, expected, actual, status)
85
+ - `GAP_PLAN_PATH` — exact output path the planner must write
86
+ - `EXISTING_PLAN_FILES` / `EXISTING_SUMMARY_FILES` — prior phase context
87
+ - `VERIFICATION_FILE` — authoritative source-of-truth
88
+
89
+ After the planner returns, the existing plan-checker / revision loop (step 10 onward) runs unchanged — gap plans are verified just like normal plans.
@@ -0,0 +1,20 @@
1
+ # plan.md — Thinking Partner for Architectural Tradeoffs
2
+
3
+ Extracted from `plan.md` step 11. Only loaded when `features.thinking_partner` is enabled — see the conditional include at that point in `plan.md`.
4
+
5
+ If `features.thinking_partner` is enabled, scan the checker's issues for architectural tradeoff keywords
6
+ ("architecture", "approach", "strategy", "pattern", "vs", "alternative"). If found:
7
+
8
+ ```
9
+ The sprint-checker flagged an architectural decision point:
10
+ {issue description}
11
+
12
+ Brief analysis:
13
+ - Option A: {approach_from_plan} — {pros/cons}
14
+ - Option B: {alternative_approach} — {pros/cons}
15
+ - Recommendation: {choice} aligned with {phase_goal}
16
+
17
+ Apply this to the revision? [Yes] / [No, I'll decide]
18
+ ```
19
+
20
+ If yes: include the recommendation in the revision prompt. If no: proceed to revision loop as normal.
@@ -0,0 +1,25 @@
1
+ # plan.md — Windows Troubleshooting
2
+
3
+ Extracted from `plan.md`'s `<windows_troubleshooting>` block. Only loaded on Windows — see the conditional include at that point in `plan.md`.
4
+
5
+ **Windows users:** If sprint-plan freezes during agent spawning (common on Windows due to
6
+ stdio deadlocks with MCP servers — see Claude Code issue anthropics/claude-code#28126):
7
+
8
+ 1. **Force-kill:** Close the terminal (Ctrl+C may not work)
9
+ 2. **Clean up orphaned processes:**
10
+ ```powershell
11
+ # Kill orphaned node processes from stale MCP servers
12
+ Get-Process node -ErrorAction SilentlyContinue | Where-Object {$_.StartTime -lt (Get-Date).AddHours(-1)} | Stop-Process -Force
13
+ ```
14
+ 3. **Clean up stale task directories:**
15
+ ```powershell
16
+ # Remove stale subagent task dirs (Claude Code never cleans these on crash)
17
+ Remove-Item -Recurse -Force "$env:USERPROFILE\.claude\tasks\*" -ErrorAction SilentlyContinue
18
+ ```
19
+ 4. **Reduce MCP server count:** Temporarily disable non-essential MCP servers in settings.json
20
+ 5. **Retry:** Restart Claude Code and run `/rcode-plan` again
21
+
22
+ If freezes persist, try `--skip-research` to reduce the agent chain from 3 to 2 agents:
23
+ ```
24
+ /rcode-plan N --skip-research
25
+ ```
@@ -160,42 +160,36 @@ Sprint-checker enforces this — see `rcode-sprint-checker.md` Mandatory Output
160
160
 
161
161
  ```markdown
162
162
  ---
163
- [frontmatter with phase, plan, type, wave, depends_on, files_modified, autonomous, requirements, must_haves]
163
+ phase: {phase}
164
+ plan_number: {N}
165
+ wave: {N}
166
+ depends_on: []
167
+ autonomous: true|false
168
+ files_modified: [...]
169
+ requirements: [...]
170
+ must_haves: {truths, artifacts, key_links}
164
171
  ---
165
172
 
166
- <objective>
167
- [What this plan accomplishes]
168
- Purpose: [Why this matters]
169
- Output: [Artifacts created]
170
- </objective>
171
-
173
+ <objective>...</objective>
172
174
  <execution_context>
173
- @.rcode/workflows/execute.md
175
+ @.rcode/workflows/execute-sprint.md
174
176
  @.rcode/templates/summary.md
175
177
  </execution_context>
176
-
177
- <context>
178
- @.planning/PROJECT.md
179
- @.planning/ROADMAP.md
180
- @.planning/STATE.md
181
- [Only prior SUMMARY refs if genuinely needed]
182
- </context>
183
-
178
+ <context>...</context>
184
179
  <tasks>
185
- [2-3 tasks max, each 15-60 min]
180
+ <task id="{phase}.{plan}.{N}" type="auto">
181
+ <title>...</title>
182
+ <read_first>...</read_first>
183
+ <files>...</files>
184
+ <action>...</action>
185
+ <verify><automated>...</automated></verify>
186
+ <done>...</done>
187
+ <evidence>...</evidence>
188
+ </task>
186
189
  </tasks>
187
-
188
- <verification>
189
- [Overall phase checks]
190
- </verification>
191
-
192
- <success_criteria>
193
- [Measurable completion]
194
- </success_criteria>
195
-
196
- <output>
197
- Create `.planning/phases/XX-name/{phase}-{plan}-SUMMARY.md`
198
- </output>
190
+ <verification>...</verification>
191
+ <success_criteria>...</success_criteria>
192
+ <output>Create `.planning/phases/{phase-dir}/{phase}-{plan}-SUMMARY.md`</output>
199
193
  ```
200
194
 
201
195
  ## Common Planning Mistakes to Avoid
@@ -8,7 +8,7 @@ Immediately after appending content to any of:
8
8
 
9
9
  - `.planning/ROADMAP.md` — milestones and phases
10
10
  - `.planning/epics.md` — epics and stories
11
- - `.rcode/phases/{phase}/sprint-{N}.md` — sprint commitments
11
+ - `.planning/phases/{phase-dir}/{phase}-{plan}-SPRINT.md` — sprint commitments
12
12
 
13
13
  Call the state-sync helper:
14
14
 
@@ -16,6 +16,8 @@ triggers:
16
16
  - "create LLM-friendly docs"
17
17
  user-invocable: true
18
18
  ---
19
+
20
+ <!-- Bridge status: not currently invoked by any rcode/workflows/*.md file (no delegate_to_skill cross-reference exists in either direction). Reachable only via direct phrase-trigger match or explicit @-inclusion. See AUDIT-redundant-work.md finding 3. -->
19
21
  @.rcode/references/karpathy-guidelines.md
20
22
 
21
23
 
@@ -11,6 +11,8 @@ triggers:
11
11
  - "forge a product idea"
12
12
  user-invocable: true
13
13
  ---
14
+
15
+ <!-- Bridge status: not currently invoked by any rcode/workflows/*.md file (no delegate_to_skill cross-reference exists in either direction). Reachable only via direct phrase-trigger match or explicit @-inclusion. See AUDIT-redundant-work.md finding 3. -->
14
16
  @.rcode/references/karpathy-guidelines.md
15
17
 
16
18
 
@@ -27,8 +27,19 @@ triggers:
27
27
  - "تحليل وثيقة المتطلبات"
28
28
  user-invocable: true
29
29
  ---
30
+
31
+ <!-- Bridge status: not currently invoked by any rcode/workflows/*.md file (no delegate_to_skill cross-reference exists in either direction). Reachable only via direct phrase-trigger match or explicit @-inclusion. See AUDIT-redundant-work.md finding 3. -->
30
32
  @.rcode/references/karpathy-guidelines.md
31
33
 
34
+ > **Note (experimental, no execution consumer):** the epics/stories/dev-story pipeline this
35
+ > skill is part of is not wired to `/rcode-execute` today — `rcode-executor` only reads
36
+ > `*-SPRINT.md` files (see `rcode/agents/rcode-executor.md`). The only way to "run" a story
37
+ > produced here is the manual `/rcode {dev-prompt-file}` invocation documented in
38
+ > `rcode/workflows/dev-story.md`, which has none of `/rcode-execute`'s atomic-commit,
39
+ > checkpoint, wave, or verification machinery. Treat this pipeline as experimental /
40
+ > unsupported for production execution until a decision is made to either wire it to
41
+ > `/rcode-execute` or deprecate it in favor of the SPRINT.md pipeline (see
42
+ > `AUDIT-redundant-work.md` finding 2).
32
43
 
33
44
  ## Overview
34
45
 
@@ -29,6 +29,8 @@ triggers:
29
29
  - "صمم المتطلبات"
30
30
  user-invocable: true
31
31
  ---
32
+
33
+ <!-- Bridge status: not currently invoked by any rcode/workflows/*.md file (no delegate_to_skill cross-reference exists in either direction). Reachable only via direct phrase-trigger match or explicit @-inclusion. See AUDIT-redundant-work.md finding 3. -->
32
34
  @.rcode/references/karpathy-guidelines.md
33
35
 
34
36
 
@@ -27,8 +27,19 @@ triggers:
27
27
  - "جهّز القصة للتنفيذ"
28
28
  user-invocable: true
29
29
  ---
30
+
31
+ <!-- Bridge status: not currently invoked by any rcode/workflows/*.md file (no delegate_to_skill cross-reference exists in either direction). Reachable only via direct phrase-trigger match or explicit @-inclusion. See AUDIT-redundant-work.md finding 3. -->
30
32
  @.rcode/references/karpathy-guidelines.md
31
33
 
34
+ > **Note (experimental, no execution consumer):** the epics/stories/dev-story pipeline this
35
+ > skill is part of is not wired to `/rcode-execute` today — `rcode-executor` only reads
36
+ > `*-SPRINT.md` files (see `rcode/agents/rcode-executor.md`). The only way to "run" a story
37
+ > produced here is the manual `/rcode {dev-prompt-file}` invocation documented in
38
+ > `rcode/workflows/dev-story.md`, which has none of `/rcode-execute`'s atomic-commit,
39
+ > checkpoint, wave, or verification machinery. Treat this pipeline as experimental /
40
+ > unsupported for production execution until a decision is made to either wire it to
41
+ > `/rcode-execute` or deprecate it in favor of the SPRINT.md pipeline (see
42
+ > `AUDIT-redundant-work.md` finding 2).
32
43
 
33
44
  ## Overview
34
45
 
@@ -16,6 +16,8 @@ triggers:
16
16
  - "change the scope in the PRD"
17
17
  user-invocable: true
18
18
  ---
19
+
20
+ <!-- Bridge status: not currently invoked by any rcode/workflows/*.md file (no delegate_to_skill cross-reference exists in either direction). Reachable only via direct phrase-trigger match or explicit @-inclusion. See AUDIT-redundant-work.md finding 3. -->
19
21
  @.rcode/references/karpathy-guidelines.md
20
22
 
21
23
 
@@ -16,6 +16,8 @@ triggers:
16
16
  - "audit the PRD"
17
17
  user-invocable: true
18
18
  ---
19
+
20
+ <!-- Bridge status: not currently invoked by any rcode/workflows/*.md file (no delegate_to_skill cross-reference exists in either direction). Reachable only via direct phrase-trigger match or explicit @-inclusion. See AUDIT-redundant-work.md finding 3. -->
19
21
  @.rcode/references/karpathy-guidelines.md
20
22
 
21
23
 
@@ -17,6 +17,8 @@ triggers:
17
17
  - "can we start building"
18
18
  user-invocable: true
19
19
  ---
20
+
21
+ <!-- Bridge status: not currently invoked by any rcode/workflows/*.md file (no delegate_to_skill cross-reference exists in either direction). Reachable only via direct phrase-trigger match or explicit @-inclusion. See AUDIT-redundant-work.md finding 3. -->
20
22
  @.rcode/references/karpathy-guidelines.md
21
23
 
22
24
 
@@ -20,6 +20,8 @@ triggers:
20
20
  decision to use X"
21
21
  user-invocable: true
22
22
  ---
23
+
24
+ <!-- Bridge status: not currently invoked by any rcode/workflows/*.md file (no delegate_to_skill cross-reference exists in either direction). Reachable only via direct phrase-trigger match or explicit @-inclusion. See AUDIT-redundant-work.md finding 3. -->
23
25
  @.rcode/references/karpathy-guidelines.md
24
26
 
25
27
 
@@ -12,6 +12,8 @@ triggers:
12
12
  user-invocable: true
13
13
  ---
14
14
 
15
+ <!-- Bridge status: not currently invoked by any rcode/workflows/*.md file (no delegate_to_skill cross-reference exists in either direction). Reachable only via direct phrase-trigger match or explicit @-inclusion. See AUDIT-redundant-work.md finding 3. -->
16
+
15
17
  ## Overview
16
18
 
17
19
  Checkpoint preview skill for rcode.
@@ -29,6 +29,8 @@ triggers:
29
29
  - "جودة الكود"
30
30
  user-invocable: true
31
31
  ---
32
+
33
+ <!-- Bridge status: not currently invoked by any rcode/workflows/*.md file (no delegate_to_skill cross-reference exists in either direction). Reachable only via direct phrase-trigger match or explicit @-inclusion. See AUDIT-redundant-work.md finding 3. -->
32
34
  @.rcode/references/karpathy-guidelines.md
33
35
 
34
36
 
@@ -18,6 +18,8 @@ triggers:
18
18
  - "change story mid-way"
19
19
  user-invocable: true
20
20
  ---
21
+
22
+ <!-- Bridge status: not currently invoked by any rcode/workflows/*.md file (no delegate_to_skill cross-reference exists in either direction). Reachable only via direct phrase-trigger match or explicit @-inclusion. See AUDIT-redundant-work.md finding 3. -->
21
23
  @.rcode/references/karpathy-guidelines.md
22
24
 
23
25
 
@@ -29,8 +29,8 @@ triggers:
29
29
  - "تتبّع السبب"
30
30
  user-invocable: false
31
31
  ---
32
+ <!-- Bridge status: not currently invoked by any rcode/workflows/*.md file (no delegate_to_skill cross-reference exists in either direction). Reachable only via direct phrase-trigger match or explicit @-inclusion. See AUDIT-redundant-work.md finding 3. -->
32
33
  @.rcode/references/karpathy-guidelines.md
33
-
34
34
  ## The Iron Law
35
35
 
36
36
  ```
@@ -17,6 +17,8 @@ triggers:
17
17
  - "implement .rcode/phases/{phase}/stories/{file}"
18
18
  user-invocable: true
19
19
  ---
20
+
21
+ <!-- Bridge status: not currently invoked by any rcode/workflows/*.md file (no delegate_to_skill cross-reference exists in either direction). Reachable only via direct phrase-trigger match or explicit @-inclusion. See AUDIT-redundant-work.md finding 3. -->
20
22
  @.rcode/references/karpathy-guidelines.md
21
23
 
22
24
 
@@ -16,6 +16,8 @@ triggers:
16
16
  - "extract learnings from this sprint"
17
17
  user-invocable: true
18
18
  ---
19
+
20
+ <!-- Bridge status: not currently invoked by any rcode/workflows/*.md file (no delegate_to_skill cross-reference exists in either direction). Reachable only via direct phrase-trigger match or explicit @-inclusion. See AUDIT-redundant-work.md finding 3. -->
19
21
  @.rcode/references/karpathy-guidelines.md
20
22
 
21
23
 
@@ -28,6 +28,8 @@ triggers:
28
28
  - "add rcode to existing project"
29
29
  user-invocable: true
30
30
  ---
31
+
32
+ <!-- Bridge status: not currently invoked by any rcode/workflows/*.md file (no delegate_to_skill cross-reference exists in either direction). Reachable only via direct phrase-trigger match or explicit @-inclusion. See AUDIT-redundant-work.md finding 3. -->
31
33
  @.rcode/references/karpathy-guidelines.md
32
34
 
33
35
 
@@ -40,8 +40,9 @@ Follow the instructions in ./workflow.md.
40
40
 
41
41
  ## Output Format
42
42
 
43
- - Output: .rcode/phases/{phase}/sprint-{N}.md
44
- - Fixed structure: Sprint Goal (one sentence) | Assumptions | Duration | Stories (with owners) | Capacity Used/Available | Risks | Definition of Done
43
+ - Output: sprint-status.yaml (path from {status_file}, per workflow.md step 4) — an epic/story status tracker, NOT a SPRINT.md
44
+ - Fixed structure: generated/last_updated/project metadata + development_status (epic -> stories -> retrospective, ordered)
45
+ - Distinct from `/rcode-sprint-planning` the slash command (`rcode/workflows/sprint-planning.md`), which writes a SPRINT.md via a separate in-line flow
45
46
  - Stories ranked by priority from epics.md
46
47
  - Leave 20% capacity buffer
47
48
  - Do NOT commit to stories without explicit owners
@@ -15,6 +15,8 @@ triggers:
15
15
  - "where are we in the sprint"
16
16
  user-invocable: true
17
17
  ---
18
+
19
+ <!-- Bridge status: not currently invoked by any rcode/workflows/*.md file (no delegate_to_skill cross-reference exists in either direction). Reachable only via direct phrase-trigger match or explicit @-inclusion. See AUDIT-redundant-work.md finding 3. -->
18
20
  @.rcode/references/karpathy-guidelines.md
19
21
 
20
22
 
@@ -53,6 +53,12 @@ This skill embodies Haitham (هيثم), senior frontend engineer archetype. Hait
53
53
 
54
54
  rcode's frontend stack: **React 18+, Next.js 15 App Router, TypeScript strict, Tailwind v4, shadcn/ui, Framer Motion, next-intl for Arabic-English localization.** Haitham follows these conventions without needing to be told.
55
55
 
56
+ ## Dispatch Mode
57
+
58
+ Invoking this skill directly (triggers like "talk to Haitham", "build this UI") loads Haitham's persona instructions **inline into the current session** — no isolated context, no `Task()` call. This is structured roleplay, not a spawned subagent.
59
+
60
+ For genuine isolated Task-tool dispatch, Haitham is separately registered as a Task-dispatchable agent (`rcode-haitham`, see `rcode/agents/rcode-haitham.md`) and is spawned for real, isolated-context dispatch by `/rcode-council`. It is **not yet** wired into `/rcode-execute` — that workflow currently spawns only the generic `rcode-executor` subagent type; routing execution work to persona-specific agents like this one is pending issue #1003 (in progress in parallel on branch `fix-execute-routing`). Unlike Hanzla, there is currently no `@haitham` shortcut in `do.md`'s `@persona CODE` alias table.
61
+
56
62
  ## Identity
57
63
 
58
64
  Senior frontend engineer specializing in Next.js App Router, TypeScript, Tailwind, shadcn/ui, and bilingual (Arabic-English) web apps. Committed to pixel-perfect craft, accessibility, and performance.
@@ -49,6 +49,12 @@ user-invocable: true
49
49
 
50
50
  This skill embodies Hanzla (حنظلة), senior full-stack engineer archetype. It executes approved stories with strict adherence to story details, writes tests before marking work complete, and refactors only incrementally. Hanzla never rewrites code from scratch, never commits code he doesn't understand, and never lies about test status.
51
51
 
52
+ ## Dispatch Mode
53
+
54
+ Invoking this skill directly (triggers like "talk to Hanzla", "implement this") loads Hanzla's persona instructions **inline into the current session** — no isolated context, no `Task()` call. This is structured roleplay, not a spawned subagent.
55
+
56
+ For genuine isolated Task-tool dispatch, Hanzla is separately registered as a Task-dispatchable agent (`rcode-hanzla`, see `rcode/agents/rcode-hanzla.md`) and is spawned for real, isolated-context dispatch by `/rcode-council`. It is **not yet** wired into `/rcode-execute` — that workflow currently spawns only the generic `rcode-executor` subagent type; routing execution work to persona-specific agents like this one is pending issue #1003 (in progress in parallel on branch `fix-execute-routing`). `do.md`'s `@persona CODE` shortcut table already has an alias for this persona (`@hanzla`, aliases: hanzla/dev/engineer) as its deterministic API surface.
57
+
52
58
  ## Identity
53
59
 
54
60
  Senior software engineer who executes approved stories with strict adherence to story details and team standards. Pragmatic, test-driven, and allergic to premature abstractions.
@@ -142,7 +142,7 @@ State the rule by name when refusing.
142
142
  - What's explicitly out of scope?
143
143
  - Kill criteria: when would we stop this project?
144
144
  2. After answers, draft PRD with: Problem, User, Scope, Success Metrics, Kill Criteria, Out-of-Scope
145
- 3. Save to `.rcode/phases/{current}/prd.md`
145
+ 3. Save to `.planning/prd.md`
146
146
 
147
147
  ### Edge Case: Vague Request
148
148
  **Input:** "We need a feature for notifications"
@@ -79,7 +79,7 @@ Crisp and checklist-driven. Every word has a purpose. Zero tolerance for ambigui
79
79
  | SP | Generate or update the sprint plan that sequences tasks for the dev agent | rcode-sprint-planning |
80
80
  | CS | Prepare a story with all required context for implementation | rcode-create-story |
81
81
  | SS | Generate sprint status report from current epics and stories | rcode-sprint-status |
82
- | ER | Multi-agent review of all work completed across an epic (retrospective) | rcode-retrospective |
82
+ | ER | Structured single-session retrospective roleplay covering all work completed across an epic | rcode-retrospective |
83
83
  | CC | Determine how to proceed if major change is discovered mid-implementation | rcode-correct-course |
84
84
 
85
85
  ## Workflow
@@ -108,7 +108,7 @@ Crisp and checklist-driven. Every word has a purpose. Zero tolerance for ambigui
108
108
  **Input:** "Prepare the next story from the backlog"
109
109
 
110
110
  **Expected behavior:**
111
- 1. Read `.rcode/phases/{current}/epics.md` and find next unstarted story
111
+ 1. Read `.planning/epics/EPIC-{NN}.md` and find next unstarted story
112
112
  2. Create story file with ALL sections populated:
113
113
  - Goal (one sentence)
114
114
  - Context (references to PRD, architecture, UX)
@@ -117,7 +117,7 @@ Crisp and checklist-driven. Every word has a purpose. Zero tolerance for ambigui
117
117
  - Dependencies (other stories, external systems)
118
118
  - File List (empty — for Hanzla to fill)
119
119
  - Dev Agent Record (empty — for Hanzla to fill)
120
- 3. Save to `.rcode/phases/{current}/stories/story-{id}.md`
120
+ 3. Save to `.planning/epics/stories/{N}.{M}.md`
121
121
  4. Report: "Story {id} ready. Assign to Hanzla with `rcode-dev-story {path}`."
122
122
 
123
123
  ### Edge Case: Ambiguous Story from User
@@ -30,13 +30,23 @@ In Omani and Arab tradition, a Majlis is a gathering where voices are heard befo
30
30
 
31
31
  ## Dispatch modes
32
32
 
33
- Majlis has two execution modes:
34
-
35
- **Real mode (default).** Dispatches actual subagents via the `Task` tool. Each agent runs in isolated context, genuinely parallel, with uncontaminated reasoning. Use for high-stakes decisions and demos.
36
-
37
- **Fast mode.** Single-Claude structured roleplay following each agent's SKILL.md principles. Fallback for harnesses without subagent support, or for quick sanity checks. Faster but reasoning runs in shared context.
38
-
39
- When in doubt, use real mode.
33
+ Within this skill, the CV/CVF/QC/DM/CM convene-mode sub-skills listed in SKILL.md's
34
+ Capabilities table are **not yet implemented** — do not claim real Task-tool dispatch
35
+ is available through this skill today.
36
+
37
+ **For genuine parallel, isolated-context subagent dispatch, use the separate
38
+ `/rcode-council` slash command** (`rcode/workflows/council.md`) — a different,
39
+ already-working implementation: deterministic panel scoring, parallel Task-tool
40
+ spawning (not sequential roleplay), and structured artifact output to
41
+ `.planning/council-sessions/`.
42
+
43
+ **Fast mode (the only mode this skill currently supports).** Single-Claude
44
+ structured roleplay following each agent's SKILL.md principles, in shared context.
45
+ Use this skill (phrase-triggered: "convene the majlis", "consult the team", etc.)
46
+ only when a `/rcode-council` slash-command invocation isn't available or a quick
47
+ sanity check is enough.
48
+
49
+ When real, isolated-context dispatch matters, prefer `/rcode-council` over this skill.
40
50
 
41
51
  ---
42
52
 
@@ -45,7 +45,9 @@ user-invocable: true
45
45
 
46
46
  ## Overview
47
47
 
48
- Raees (رئيس) dispatches the right specialists for execution. Where Majlis convenes the full council for discussion, Raees runs the dispatch desk. He knows every agent's authority and dependencies, parallelises ruthlessly where possible, sequences strictly where necessary, and escalates to Majlis when a question crosses into strategy. The full dispatch matrix and rcode-specific context awareness live in [`references.md`](references.md).
48
+ Raees (رئيس) produces a dispatch **plan** — text output for a human (or another workflow) to act on, not a dispatch action. Where Majlis convenes the full council for discussion, Raees works out who should own what: he reasons about every agent's authority and dependencies, identifies what can run in parallel vs. what must sequence strictly, and flags when a question should escalate to Majlis instead. The full dispatch matrix and rcode-specific context awareness live in [`references.md`](references.md).
49
+
50
+ **No live routing mechanism exists yet.** The DP/SQ/PL/HO sub-skills in the Capabilities table below are planned, not implemented — there is no `Task()` call, no `rcode-raees*` subagent, and no automatic handoff. Raees writes the plan; a human or another command (e.g. `/rcode-execute`) is what actually carries it out today.
49
51
 
50
52
  ## Capabilities
51
53
 
@@ -76,10 +78,10 @@ Raees (رئيس) dispatches the right specialists for execution. Where Majlis co
76
78
 
77
79
  ## Output Format
78
80
 
79
- Dispatch plans use this exact structure:
81
+ Dispatch plans use this exact structure — this is the deliverable, a document, not a log of actions taken:
80
82
 
81
83
  ```
82
- Dispatch: <request summary>
84
+ Dispatch Plan: <request summary>
83
85
 
84
86
  Step 1 (BLOCKING): <agent> → <skill> — delivers: <output>
85
87
  Step 2 (PARALLEL): <agent A> → <task A> | <agent B> → <task B>
@@ -88,29 +90,29 @@ Step 3 (BLOCKING): <agent> → <skill> — gate
88
90
 
89
91
  Always show: primary owner, dependencies (arrows or "blocked by"), parallel opportunities.
90
92
 
91
- Save dispatch plans to `.rcode/progress/dispatch-{date}.md`.
93
+ Save the plan to `.rcode/progress/dispatch-{date}.md`. Raees does not invoke the agents named in the plan — no `Task()` call is made. Executing the plan is a separate, manual step for the user (or a workflow like `/rcode-execute`, once persona routing lands there).
92
94
 
93
- Do NOT include: diffuse responsibility, unowned tasks, or silent handoffs. Do NOT synthesise strategic decisions — that's Majlis's job. Do NOT override specialist authority.
95
+ Do NOT include: diffuse responsibility, unowned tasks, or silent handoffs. Do NOT synthesise strategic decisions — that's Majlis's job. Do NOT override specialist authority. Do NOT phrase output as if dispatch already happened ("invoked", "dispatching X now") — phrase it as a recommendation ("plan calls for X", "recommended: assign to X").
94
96
 
95
97
  ## Examples
96
98
 
97
99
  **Happy path — feature request**
98
- "Add Arabic RTL support to our dashboard" → touches UX (Layla), FE (Haitham), BE (Yousef), QA (Fatima), localisation (Noor) → 5-step plan with Layla blocking, Haitham/Yousef/Noor in parallel, Fatima gate, Khalid ship → saved to `.rcode/progress/dispatch-{date}.md` Layla invoked first.
100
+ "Add Arabic RTL support to our dashboard" → touches UX (Layla), FE (Haitham), BE (Yousef), QA (Fatima), localisation (Noor) → produces a 5-step plan with Layla blocking, Haitham/Yousef/Noor in parallel, Fatima gate, Khalid ship → saved to `.rcode/progress/dispatch-{date}.md`. The plan lists Layla as step 1; nothing is actually invoked.
99
101
 
100
102
  **Happy path — government proposal**
101
- "Ministry of Housing wants a property management proposal" → context triggers compliance-first + Arabic-first + data residency → Sadiq (research) → Waleed (compliance) → parallel Mariam + Zayd → Noor (full document Arabic + English) → Sadiq final review.
103
+ "Ministry of Housing wants a property management proposal" → context triggers compliance-first + Arabic-first + data residency → plan sequences: Sadiq (research) → Waleed (compliance) → parallel Mariam + Zayd → Noor (full document Arabic + English) → Sadiq final review.
102
104
 
103
105
  **Edge case — single-owner task**
104
- "Fix the typo in the footer" — don't build a plan. "Single-owner task. Dispatching Haitham directly. No coordination needed."
106
+ "Fix the typo in the footer" — don't build a multi-step plan. Output: "Single-owner task. Recommended: assign to Haitham directly. No coordination needed." (a recommendation, not an action).
105
107
 
106
108
  **Edge case — strategic question**
107
- "Should we enter the Saudi market?" — don't dispatch. Escalate: "Cross-domain strategic question — handing to Majlis. I'll reconvene for execution once Majlis has a verdict."
109
+ "Should we enter the Saudi market?" — don't produce a dispatch plan. Recommend escalation: "Cross-domain strategic question — recommend routing to Majlis. Re-run this once Majlis has a verdict."
108
110
 
109
111
  **Edge case — conflicting specialists**
110
- Waleed wants approach A, Yousef wants approach B. Do NOT pick. Escalate to Majlis with the conflict framed.
112
+ Waleed wants approach A, Yousef wants approach B. Do NOT pick. Recommend escalation to Majlis with the conflict framed.
111
113
 
112
114
  **Negative — single-domain UX question**
113
- "What colour should the button be?" — Layla owns this directly. Redirect.
115
+ "What colour should the button be?" — Layla owns this directly. Redirect, don't produce a plan.
114
116
 
115
117
  ## Memory Bank Hooks
116
118
 
@@ -50,6 +50,12 @@ user-invocable: true
50
50
 
51
51
  This skill embodies Yousef (يوسف), senior backend engineer archetype. Yousef builds APIs, databases, data pipelines, and integration services — with particular expertise in data management, RPA (Robotic Process Automation), and enterprise/government integrations.
52
52
 
53
+ ## Dispatch Mode
54
+
55
+ Invoking this skill directly (triggers like "talk to Yousef", "build the backend") loads Yousef's persona instructions **inline into the current session** — no isolated context, no `Task()` call. This is structured roleplay, not a spawned subagent.
56
+
57
+ For genuine isolated Task-tool dispatch, Yousef is separately registered as a Task-dispatchable agent (`rcode-yousef`, see `rcode/agents/rcode-yousef.md`) and is spawned for real, isolated-context dispatch by `/rcode-council`. It is **not yet** wired into `/rcode-execute` — that workflow currently spawns only the generic `rcode-executor` subagent type; routing execution work to persona-specific agents like this one is pending issue #1003 (in progress in parallel on branch `fix-execute-routing`). Unlike Hanzla, there is currently no `@yousef` shortcut in `do.md`'s `@persona CODE` alias table.
58
+
53
59
  ## Identity
54
60
 
55
61
  Senior backend engineer specializing in REST/GraphQL APIs, relational and time-series databases, data pipelines, and system integrations. Focused on correctness, reliability, and observability.
@@ -54,4 +54,4 @@
54
54
 
55
55
  ---
56
56
 
57
- <sub>Generated by rcode — `.rcode/phases/{{phase}}/tasks/{{source_file}}`</sub>
57
+ <sub>Generated by rcode — `.planning/phases/{{phase}}/{{source_file}}`</sub>
@@ -52,4 +52,4 @@
52
52
 
53
53
  ---
54
54
 
55
- <sub>Generated by rcode — `.rcode/phases/{{phase}}/stories/{{source_file}}`</sub>
55
+ <sub>Generated by rcode — `.planning/phases/{{phase}}/{{source_file}}`</sub>
@@ -49,4 +49,4 @@
49
49
 
50
50
  ---
51
51
 
52
- <sub>Generated by rcode — `.rcode/phases/{{phase}}/tasks/{{source_file}}`</sub>
52
+ <sub>Generated by rcode — `.planning/phases/{{phase}}/{{source_file}}`</sub>