@hanzlaa/rcode 4.7.3 → 4.9.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.
- package/AGENTS.md +1 -1
- package/CLAUDE.md +1 -1
- package/CONTRIBUTING.md +3 -0
- package/README.md +7 -5
- package/cli/github-sync.js +17 -201
- package/cli/install.js +16 -13
- package/cli/lib/config.cjs +1 -1
- package/cli/lib/github-sync-discover.cjs +304 -0
- package/cli/lib/namespace-migrate.cjs +16 -1
- package/cli/uninstall.js +7 -2
- package/dist/rcode.js +197 -197
- package/package.json +1 -1
- package/rcode/agents/rcode-code-reviewer.md +1 -1
- package/rcode/agents/rcode-docs-auditor.md +1 -1
- package/rcode/agents/rcode-edge-case-hunter.md +1 -1
- package/rcode/agents/rcode-haitham.md +1 -1
- package/rcode/agents/rcode-hanzla.md +1 -1
- package/rcode/agents/rcode-hussain-pm.md +1 -1
- package/rcode/agents/rcode-nyquist-auditor.md +1 -1
- package/rcode/agents/rcode-omar.md +1 -1
- package/rcode/agents/rcode-remediation-planner.md +1 -1
- package/rcode/agents/rcode-security-adversary.md +1 -1
- package/rcode/agents/rcode-security-auditor.md +1 -1
- package/rcode/agents/rcode-sprint-checker.md +1 -1
- package/rcode/agents/rcode-verifier.md +1 -1
- package/rcode/agents/rcode-waleed.md +1 -1
- package/rcode/agents/rcode-yousef.md +1 -1
- package/rcode/agents/rules/planner/task-templates.md +24 -22
- package/rcode/agents/rules/verifier/verification-report.md +2 -2
- package/rcode/bin/lib/roadmap.cjs +80 -4
- package/rcode/bin/rcode-tools.cjs +124 -1
- package/rcode/brain/best-practices/state-sync-rule.md +1 -1
- package/rcode/references/council-protocol.md +9 -4
- package/rcode/references/execute-auto-copy-learnings.md +15 -0
- package/rcode/references/execute-close-parent-artifacts.md +49 -0
- package/rcode/references/execute-interactive-mode.md +44 -0
- package/rcode/references/execute-notify-webhooks.md +22 -0
- package/rcode/references/execution-protocol.md +11 -11
- package/rcode/references/git-preflight.md +7 -4
- package/rcode/references/output-format.md +5 -5
- package/rcode/references/plan-gaps-mode.md +89 -0
- package/rcode/references/plan-thinking-partner.md +20 -0
- package/rcode/references/plan-windows-troubleshooting.md +25 -0
- package/rcode/references/planner-playbook.md +23 -29
- package/rcode/skills/_shared/state-sync-rule.md +1 -1
- package/rcode/skills/actions/1-analysis/rcode-document-project/SKILL.md +2 -0
- package/rcode/skills/actions/1-analysis/rcode-prfaq/SKILL.md +2 -0
- package/rcode/skills/actions/2-plan/rcode-create-epics-and-stories/SKILL.md +11 -0
- package/rcode/skills/actions/2-plan/rcode-create-prd/SKILL.md +2 -0
- package/rcode/skills/actions/2-plan/rcode-create-story/SKILL.md +11 -0
- package/rcode/skills/actions/2-plan/rcode-edit-prd/SKILL.md +2 -0
- package/rcode/skills/actions/2-plan/rcode-validate-prd/SKILL.md +2 -0
- package/rcode/skills/actions/3-solutioning/rcode-check-implementation-readiness/SKILL.md +2 -0
- package/rcode/skills/actions/3-solutioning/rcode-create-architecture/SKILL.md +2 -0
- package/rcode/skills/actions/4-implementation/rcode-checkpoint-preview/SKILL.md +2 -0
- package/rcode/skills/actions/4-implementation/rcode-code-review/SKILL.md +2 -0
- package/rcode/skills/actions/4-implementation/rcode-correct-course/SKILL.md +2 -0
- package/rcode/skills/actions/4-implementation/rcode-debug/SKILL.md +1 -1
- package/rcode/skills/actions/4-implementation/rcode-dev-story/SKILL.md +2 -0
- package/rcode/skills/actions/4-implementation/rcode-retrospective/SKILL.md +2 -0
- package/rcode/skills/actions/4-implementation/rcode-scaffold-project/SKILL.md +2 -0
- package/rcode/skills/actions/4-implementation/rcode-sprint-planning/SKILL.md +3 -2
- package/rcode/skills/actions/4-implementation/rcode-sprint-status/SKILL.md +2 -0
- package/rcode/skills/agents/haitham-frontend/SKILL.md +6 -0
- package/rcode/skills/agents/hanzla-engineer/SKILL.md +6 -0
- package/rcode/skills/agents/hussain-pm/SKILL.md +1 -1
- package/rcode/skills/agents/hussain-sm/SKILL.md +3 -3
- package/rcode/skills/agents/majlis-council/references.md +17 -7
- package/rcode/skills/agents/raees-orchestrator/SKILL.md +13 -11
- package/rcode/skills/agents/yousef-backend/SKILL.md +6 -0
- package/rcode/templates/github/epic-template.md +1 -1
- package/rcode/templates/github/feature-template.md +1 -1
- package/rcode/templates/github/task-template.md +1 -1
- package/rcode/templates/sprint.md +14 -3
- package/rcode/templates/verification-report.md +7 -4
- package/rcode/workflows/add-phase.md +33 -14
- package/rcode/workflows/code-review-fix.md +5 -5
- package/rcode/workflows/code-review.md +1 -1
- package/rcode/workflows/council.md +1 -0
- package/rcode/workflows/create-epics-and-stories.md +12 -6
- package/rcode/workflows/dev-story.md +12 -14
- package/rcode/workflows/do.md +12 -9
- package/rcode/workflows/execute-sprint.md +7 -4
- package/rcode/workflows/execute-waves.md +38 -2
- package/rcode/workflows/execute.md +42 -138
- package/rcode/workflows/init.md +10 -2
- package/rcode/workflows/lens-audit.md +7 -7
- package/rcode/workflows/plan-research-validation.md +10 -5
- package/rcode/workflows/plan-spawn-planner.md +9 -14
- package/rcode/workflows/plan.md +27 -138
- package/rcode/workflows/quick.md +1 -1
- package/rcode/workflows/scaffold-skill.md +19 -1
- package/rcode/workflows/secure-phase.md +7 -1
- package/rcode/workflows/sprint-planning.md +14 -37
- package/rcode/workflows/validate-phase.md +7 -1
package/rcode/workflows/plan.md
CHANGED
|
@@ -47,12 +47,10 @@ Read all files referenced by the invoking prompt's execution_context before star
|
|
|
47
47
|
|
|
48
48
|
<!-- ui-brand.md (254 lines): only load when phase goal/CONTEXT.md contains UI signals (frontend|ui|component|design|style|brand) -->
|
|
49
49
|
${PHASE_GOAL_HAS_UI ? '@.rcode/references/ui-brand.md' : ''}
|
|
50
|
-
@.rcode/references/revision-loop.md
|
|
51
|
-
@.rcode/references/gate-prompts.md
|
|
52
50
|
@.rcode/references/karpathy-guidelines.md
|
|
53
51
|
<!-- Read .rcode/references/agent-contracts.md only if defining or debugging agent contracts -->
|
|
54
|
-
<!-- Read .rcode/references/gates.md only if implementing or troubleshooting gate logic -->
|
|
55
|
-
@.rcode/references/thinking-models-planning.md
|
|
52
|
+
<!-- Read .rcode/references/gates.md only if implementing or troubleshooting gate logic; thinking-models-planning.md (127 lines) only if features.thinking_partner is enabled -->
|
|
53
|
+
${THINKING_PARTNER_ENABLED === 'true' ? '@.rcode/references/thinking-models-planning.md' : ''}
|
|
56
54
|
</required_reading>
|
|
57
55
|
|
|
58
56
|
<available_agent_types>
|
|
@@ -228,91 +226,9 @@ PHASE_INFO=$(node ".rcode/bin/rcode-tools.cjs" roadmap get-phase "${PHASE}")
|
|
|
228
226
|
|
|
229
227
|
## 3.6. Handle `--gaps` Mode
|
|
230
228
|
|
|
231
|
-
**Skip unless:** `GAPS_MODE=true`.
|
|
229
|
+
**Skip unless:** `GAPS_MODE=true`. When active, read the full gap-closure procedure below (extracted to keep this file within AGENTS.md's 1000-line cap for the common, non-gaps-mode path).
|
|
232
230
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
**Step 1: Locate VERIFICATION.md**
|
|
236
|
-
|
|
237
|
-
```bash
|
|
238
|
-
PHASE_DIR=$(node ".rcode/bin/rcode-tools.cjs" roadmap get-phase "${PHASE}" --pick dir 2>/dev/null || echo "")
|
|
239
|
-
# Fallback if --pick dir not supported. TODO(#118): expose roadmap --pick dir cleanly.
|
|
240
|
-
if [[ -z "$PHASE_DIR" ]]; then
|
|
241
|
-
PHASE_DIR=$(ls -d .planning/phases/${padded_phase}-* 2>/dev/null | head -1)
|
|
242
|
-
fi
|
|
243
|
-
|
|
244
|
-
VERIFICATION_FILE=$(ls "${PHASE_DIR}"/*-VERIFICATION.md 2>/dev/null | head -1)
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
**If `VERIFICATION_FILE` is empty:**
|
|
248
|
-
```
|
|
249
|
-
Error: No VERIFICATION.md found for Phase {X}. Gap-closure planning requires the phase to have run through the verifier first.
|
|
250
|
-
|
|
251
|
-
Try:
|
|
252
|
-
/rcode-execute {X} ${RCODE_WS} # run or re-run execution + verification
|
|
253
|
-
```
|
|
254
|
-
Exit workflow.
|
|
255
|
-
|
|
256
|
-
**Step 2: Extract gaps from VERIFICATION.md**
|
|
257
|
-
|
|
258
|
-
Parse the file for gap entries with `status: gap_found` or `status: partial`. Inspect these sections:
|
|
259
|
-
- `## Automated Gap` (or `## Automated Gaps`)
|
|
260
|
-
- `## Human Verification Required`
|
|
261
|
-
- Any findings block that includes a `status:` field set to `gap_found` or `partial`
|
|
262
|
-
|
|
263
|
-
Collect into `GAP_LIST` (an ordered list where each entry has: id, title, expected, actual, status, source_section, severity if present).
|
|
264
|
-
|
|
265
|
-
If `GAP_LIST` is empty, display:
|
|
266
|
-
```
|
|
267
|
-
Phase {X} VERIFICATION.md contains no gap_found or partial items — nothing to close.
|
|
268
|
-
Report: {VERIFICATION_FILE}
|
|
269
|
-
```
|
|
270
|
-
Exit workflow.
|
|
271
|
-
|
|
272
|
-
**Step 3: Determine next plan number**
|
|
273
|
-
|
|
274
|
-
```bash
|
|
275
|
-
EXISTING_PLAN_COUNT=$(ls "${PHASE_DIR}"/*-SPRINT.md 2>/dev/null | wc -l | tr -d ' ')
|
|
276
|
-
# Issue #652 — no leading zeros in planning artifacts. Phase 8 not 08, plan 2 not 02.
|
|
277
|
-
NEXT_PLAN_NUMBER=$((EXISTING_PLAN_COUNT + 1))
|
|
278
|
-
PADDED_PHASE="${PHASE}"
|
|
279
|
-
GAP_PLAN_FILENAME="${PADDED_PHASE}-${NEXT_PLAN_NUMBER}-SPRINT.md"
|
|
280
|
-
GAP_PLAN_PATH="${PHASE_DIR}/${GAP_PLAN_FILENAME}"
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
If `EXISTING_PLAN_COUNT == 0`, there is no prior execution to reference. Display a warning but proceed — the planner can still close verification gaps.
|
|
284
|
-
|
|
285
|
-
**Step 4: Gather prior plans for planner context**
|
|
286
|
-
|
|
287
|
-
```bash
|
|
288
|
-
EXISTING_PLAN_FILES=$(ls "${PHASE_DIR}"/*-SPRINT.md 2>/dev/null | tr '\n' ' ')
|
|
289
|
-
EXISTING_SUMMARY_FILES=$(ls "${PHASE_DIR}"/*-SUMMARY.md 2>/dev/null | tr '\n' ' ')
|
|
290
|
-
```
|
|
291
|
-
|
|
292
|
-
**Step 5: Display banner**
|
|
293
|
-
|
|
294
|
-
```
|
|
295
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
296
|
-
rcode ► GAP-CLOSURE PLANNING — Phase {X}
|
|
297
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
298
|
-
|
|
299
|
-
Verification report: {VERIFICATION_FILE}
|
|
300
|
-
Gaps to close: {count(GAP_LIST)}
|
|
301
|
-
Existing plans: {EXISTING_PLAN_COUNT}
|
|
302
|
-
New plan file: {GAP_PLAN_FILENAME}
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
**Step 6: Skip ahead**
|
|
306
|
-
|
|
307
|
-
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`.
|
|
308
|
-
|
|
309
|
-
Step 8 will consume these variables when filling the planner prompt:
|
|
310
|
-
- `GAP_LIST` — serialized list of gaps (id, title, expected, actual, status)
|
|
311
|
-
- `GAP_PLAN_PATH` — exact output path the planner must write
|
|
312
|
-
- `EXISTING_PLAN_FILES` / `EXISTING_SUMMARY_FILES` — prior phase context
|
|
313
|
-
- `VERIFICATION_FILE` — authoritative source-of-truth
|
|
314
|
-
|
|
315
|
-
After the planner returns, the existing plan-checker / revision loop (step 10 onward) runs unchanged — gap plans are verified just like normal plans.
|
|
231
|
+
${GAPS_MODE === 'true' ? '@.rcode/references/plan-gaps-mode.md' : ''}
|
|
316
232
|
|
|
317
233
|
## 4. Load CONTEXT.md
|
|
318
234
|
|
|
@@ -679,23 +595,11 @@ Task(
|
|
|
679
595
|
- **`## ISSUES FOUND`:** Display issues, check iteration count, proceed to step 12.
|
|
680
596
|
|
|
681
597
|
**Thinking partner for architectural tradeoffs (conditional):**
|
|
682
|
-
|
|
683
|
-
(
|
|
684
|
-
|
|
685
|
-
```
|
|
686
|
-
The sprint-checker flagged an architectural decision point:
|
|
687
|
-
{issue description}
|
|
688
|
-
|
|
689
|
-
Brief analysis:
|
|
690
|
-
- Option A: {approach_from_plan} — {pros/cons}
|
|
691
|
-
- Option B: {alternative_approach} — {pros/cons}
|
|
692
|
-
- Recommendation: {choice} aligned with {phase_goal}
|
|
693
|
-
|
|
694
|
-
Apply this to the revision? [Yes] / [No, I'll decide]
|
|
598
|
+
```bash
|
|
599
|
+
THINKING_PARTNER_ENABLED=$(node ".rcode/bin/rcode-tools.cjs" config-get features.thinking_partner 2>/dev/null || echo "false")
|
|
695
600
|
```
|
|
696
|
-
|
|
697
|
-
If
|
|
698
|
-
If thinking_partner disabled: skip this block entirely.
|
|
601
|
+
${THINKING_PARTNER_ENABLED === 'true' ? '@.rcode/references/plan-thinking-partner.md' : ''}
|
|
602
|
+
If `features.thinking_partner` is disabled: skip this block entirely.
|
|
699
603
|
|
|
700
604
|
## 12. Revision Loop (Max 3 Iterations, 1 in autonomous/yolo mode)
|
|
701
605
|
|
|
@@ -805,16 +709,18 @@ Offer: 1) Force proceed, 2) Provide guidance and retry, 3) Abandon
|
|
|
805
709
|
Before declaring plans ready, validate the wave-parallelism rule the planner declares: **same wave + overlapping `files_modified` = sequential, not parallel**. If two plans share `depends_on` (same wave) and both list the same file in `files_modified`, the planner should have marked the later one `sequential: true`. Catch the cases where it didn't.
|
|
806
710
|
|
|
807
711
|
```bash
|
|
808
|
-
#
|
|
809
|
-
#
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
712
|
+
# Skip if plan_count == 1 (from INIT JSON): with exactly one plan in the phase,
|
|
713
|
+
# there is no second plan to overlap with — a conflict is structurally impossible.
|
|
714
|
+
if [[ "${plan_count}" -eq 1 ]]; then
|
|
715
|
+
echo "Wave parallelism: skipped (single plan, overlap structurally impossible)."
|
|
716
|
+
else
|
|
717
|
+
# For every pair of plans (A, B) with the same depends_on, if files_modified(A)
|
|
718
|
+
# ∩ files_modified(B) is non-empty, the later plan (by sprint id) MUST declare
|
|
719
|
+
# sequential: true and list the conflicting files in its frontmatter.
|
|
720
|
+
node ".rcode/bin/rcode-tools.cjs" plan check-wave-overlaps "${PHASE_NUMBER}"
|
|
721
|
+
fi
|
|
814
722
|
```
|
|
815
|
-
|
|
816
|
-
The CLI helper returns a JSON report:
|
|
817
|
-
|
|
723
|
+
Returns (else branch only):
|
|
818
724
|
```json
|
|
819
725
|
{
|
|
820
726
|
"conflicts": [
|
|
@@ -841,15 +747,13 @@ The CLI helper returns a JSON report:
|
|
|
841
747
|
3. Re-run the checker to confirm the updated frontmatter.
|
|
842
748
|
4. Display: `Wave parallelism: {N} conflict(s) auto-corrected to sequential.`
|
|
843
749
|
|
|
844
|
-
**If `conflicts` is empty:** Display `Wave parallelism: ✓ no file-overlap conflicts.` and proceed.
|
|
845
|
-
|
|
846
|
-
This closes the wave-overlap gap — the rule was stated in `rcode-planner.md` but not enforced. Now it's enforced automatically.
|
|
750
|
+
**If `conflicts` is empty:** Display `Wave parallelism: ✓ no file-overlap conflicts.` and proceed. (This closes the wave-overlap gap — the rule was stated in `rcode-planner.md` but not enforced until now.)
|
|
847
751
|
|
|
848
752
|
## 13. Requirements Coverage Gate
|
|
849
753
|
|
|
850
754
|
After plans pass the checker (or checker is skipped), verify that all phase requirements are covered by at least one plan.
|
|
851
755
|
|
|
852
|
-
**Skip if:** `phase_req_ids` is null or
|
|
756
|
+
**Skip if:** `phase_req_ids` is null, `TBD`, or an empty array/list (no requirements mapped to this phase) — `[[ -z "$phase_req_ids" || "$phase_req_ids" == "TBD" || "$phase_req_ids" == "[]" || "$phase_req_ids" == "null" ]]` — proceed to step 14.
|
|
853
757
|
|
|
854
758
|
**Step 1: Extract requirement IDs claimed by plans**
|
|
855
759
|
```bash
|
|
@@ -962,8 +866,9 @@ Display banner:
|
|
|
962
866
|
Plans ready. Launching execute-phase...
|
|
963
867
|
```
|
|
964
868
|
|
|
965
|
-
Launch execute-phase using the Skill tool to avoid nested Task sessions (which cause runtime freezes due to deep agent nesting):
|
|
869
|
+
Launch execute-phase using the Skill tool to avoid nested Task sessions (which cause runtime freezes due to deep agent nesting). Skill() keeps execute.md running in this same context — set `AUTO_CHAINED_FROM_PLAN=true` so execute.md's required_reading doesn't re-read files this context already loaded (see AUDIT-workflow-complexity.md finding 3):
|
|
966
870
|
```
|
|
871
|
+
AUTO_CHAINED_FROM_PLAN=true
|
|
967
872
|
Skill(skill="rcode-execute", args="${PHASE} --auto --no-transition ${RCODE_WS}")
|
|
968
873
|
```
|
|
969
874
|
|
|
@@ -1065,27 +970,11 @@ Verification: {Passed | Passed with override | Skipped}
|
|
|
1065
970
|
</offer_next>
|
|
1066
971
|
|
|
1067
972
|
<windows_troubleshooting>
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
1. **Force-kill:** Close the terminal (Ctrl+C may not work)
|
|
1072
|
-
2. **Clean up orphaned processes:**
|
|
1073
|
-
```powershell
|
|
1074
|
-
# Kill orphaned node processes from stale MCP servers
|
|
1075
|
-
Get-Process node -ErrorAction SilentlyContinue | Where-Object {$_.StartTime -lt (Get-Date).AddHours(-1)} | Stop-Process -Force
|
|
1076
|
-
```
|
|
1077
|
-
3. **Clean up stale task directories:**
|
|
1078
|
-
```powershell
|
|
1079
|
-
# Remove stale subagent task dirs (Claude Code never cleans these on crash)
|
|
1080
|
-
Remove-Item -Recurse -Force "$env:USERPROFILE\.claude\tasks\*" -ErrorAction SilentlyContinue
|
|
1081
|
-
```
|
|
1082
|
-
4. **Reduce MCP server count:** Temporarily disable non-essential MCP servers in settings.json
|
|
1083
|
-
5. **Retry:** Restart Claude Code and run `/rcode-plan` again
|
|
1084
|
-
|
|
1085
|
-
If freezes persist, try `--skip-research` to reduce the agent chain from 3 to 2 agents:
|
|
1086
|
-
```
|
|
1087
|
-
/rcode-plan N --skip-research
|
|
973
|
+
```bash
|
|
974
|
+
# Windows-only content (stdio deadlock recovery) — skip the read on other platforms.
|
|
975
|
+
WINDOWS=$([[ "$(uname -s 2>/dev/null)" == MINGW* || "$(uname -s 2>/dev/null)" == CYGWIN* || -n "$WINDIR" ]] && echo true || echo false)
|
|
1088
976
|
```
|
|
977
|
+
${WINDOWS === 'true' ? '@.rcode/references/plan-windows-troubleshooting.md' : ''}
|
|
1089
978
|
</windows_troubleshooting>
|
|
1090
979
|
|
|
1091
980
|
<success_criteria>
|
package/rcode/workflows/quick.md
CHANGED
|
@@ -60,7 +60,7 @@ Procedure:
|
|
|
60
60
|
Reason: bulk-detection threshold ({matched signal}) — auto-route avoids
|
|
61
61
|
refusing and forcing you to re-paste the list.
|
|
62
62
|
```
|
|
63
|
-
4. Dispatch
|
|
63
|
+
4. **Dispatch by calling the `Skill` tool — do NOT just print the banner as text.** The banner above is a *display*, not the dispatch itself. You must call `Skill(skill: "rcode-add-phase", args: "{phase-slug} " + $TASK)` (passing `$TASK` verbatim as the pre-extracted task list) immediately after printing the banner. Printing `/rcode-add-phase {phase-slug}` in a code block or banner without invoking the Skill tool is NOT dispatch — the routed command will never run and the workflow will stall (same failure mode documented in `do.md`'s dispatch step).
|
|
64
64
|
5. STOP this workflow — add-phase takes over from here.
|
|
65
65
|
|
|
66
66
|
If the bulk detection does NOT match, continue to scope_check.
|
|
@@ -117,6 +117,21 @@ if [ -n "$fails" ]; then
|
|
|
117
117
|
fi
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
+
## Step 3.5 — Prove It Moved the Needle
|
|
121
|
+
|
|
122
|
+
Passing the 5-component check in Step 3 only proves the file has the right shape — a triggers block, an Overview, a Workflow, an Output Format, and Examples. It says nothing about whether loading the skill actually changes what an agent does. A skill can be structurally perfect and still be a no-op in practice: the model reads it, nods along, and then falls back to its untrained default the moment a real scenario hits.
|
|
123
|
+
|
|
124
|
+
Do not mark a new or edited skill as ready to ship until you've run this gate:
|
|
125
|
+
|
|
126
|
+
1. **Write the pressure scenario.** Take the exact situation the skill's triggers describe — the moment the skill is supposed to change the agent's behavior — and phrase it as a concrete task an agent could be handed cold, with no mention of the skill.
|
|
127
|
+
2. **Run the control.** Spawn a fresh subagent with no memory of this conversation and the skill NOT loaded (do not mention it, do not point at its path). Give it the pressure scenario. Record what it does by default — this is almost always the suboptimal or wrong behavior the skill exists to correct.
|
|
128
|
+
3. **Run the treatment.** Spawn a second fresh subagent, same scenario, this time with the skill loaded (either by having it available for the model to invoke, or by including its content directly in the prompt). Record what it does.
|
|
129
|
+
4. **Compare.** The treatment run must diverge from the control run in the specific direction the skill claims to produce. "Both agents produced fine-looking output" is not a pass — the question is whether the skill was the reason for the difference. If the two runs land on the same behavior, the skill has no measurable effect yet, no matter how clean its markdown is.
|
|
130
|
+
|
|
131
|
+
If the comparison shows no behavioral difference, the skill is not done. Go back and sharpen the Workflow section, the triggers, or the examples — whichever part failed to actually steer the model — and rerun this gate. Do not ship on structural compliance alone.
|
|
132
|
+
|
|
133
|
+
Skip this gate only when scaffolding a brand-new, still-empty skill (Step 2's placeholders haven't been filled in yet — there's no behavior to test). Once real content replaces the placeholders, this gate becomes mandatory before the skill is considered ready.
|
|
134
|
+
|
|
120
135
|
## Step 4 — Confirm and Next Up
|
|
121
136
|
|
|
122
137
|
Print:
|
|
@@ -127,13 +142,16 @@ Print:
|
|
|
127
142
|
|
|
128
143
|
All 5 required components are present (triggers, Overview, Workflow,
|
|
129
144
|
Output Format, Examples). The placeholders need real content before
|
|
130
|
-
the skill becomes useful.
|
|
145
|
+
the skill becomes useful — and once they're filled in, run Step 3.5
|
|
146
|
+
(Prove It Moved the Needle) before calling the skill done.
|
|
131
147
|
|
|
132
148
|
▶ Next Up
|
|
133
149
|
$EDITOR rcode/skills/actions/<group>/rcode-<NAME>/SKILL.md
|
|
134
150
|
# fill in placeholders
|
|
135
151
|
npx @hanzlaa/rcode install --force # install to .claude/skills/
|
|
136
152
|
node --test test/compliance.test.cjs # verify compliance
|
|
153
|
+
# then: control vs. treatment
|
|
154
|
+
# subagent run (Step 3.5)
|
|
137
155
|
```
|
|
138
156
|
|
|
139
157
|
## Next Up
|
|
@@ -3,7 +3,8 @@ Verify threat mitigations for a completed phase. Confirm SPRINT.md threat regist
|
|
|
3
3
|
</purpose>
|
|
4
4
|
|
|
5
5
|
<required_reading>
|
|
6
|
-
|
|
6
|
+
<!-- ui-brand.md (254 lines): only load when the phase goal/CONTEXT.md contains UI signals — mirrors plan.md:49's PHASE_GOAL_HAS_UI pattern -->
|
|
7
|
+
${PHASE_GOAL_HAS_UI ? '@.rcode/references/ui-brand.md' : ''}
|
|
7
8
|
</required_reading>
|
|
8
9
|
|
|
9
10
|
<available_agent_types>
|
|
@@ -50,6 +51,11 @@ Parse: `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `padded_phase`,
|
|
|
50
51
|
```bash
|
|
51
52
|
AUDITOR_MODEL=$(node ".rcode/bin/rcode-tools.cjs" resolve-model rcode-security-auditor --raw)
|
|
52
53
|
SECURITY_CFG=$(node ".rcode/bin/rcode-tools.cjs" config-get workflow.security_enforcement --raw 2>/dev/null || echo "true")
|
|
54
|
+
|
|
55
|
+
# Detect UI signals in phase goal + CONTEXT.md to decide whether to load ui-brand.md (254 lines)
|
|
56
|
+
PHASE_GOAL_HAS_UI=$(grep -iEl "frontend|ui|component|design|style|brand" \
|
|
57
|
+
.planning/phases/*${phase_number}*/*-CONTEXT.md \
|
|
58
|
+
.planning/ROADMAP.md 2>/dev/null | head -1)
|
|
53
59
|
```
|
|
54
60
|
|
|
55
61
|
If `SECURITY_CFG` is `false`: exit with "Security enforcement disabled. Enable via /rcode-settings."
|
|
@@ -1,41 +1,18 @@
|
|
|
1
1
|
# Workflow: rcode-sprint-planning
|
|
2
2
|
|
|
3
3
|
<purpose>
|
|
4
|
-
Plan the next sprint
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
Plan the next sprint and write a SPRINT.md. The in-line steps below ARE the
|
|
5
|
+
authoritative path for this — this project's own history confirms it: 54/54
|
|
6
|
+
real *-SPRINT.md files under .planning/phases/ were produced by this in-line
|
|
7
|
+
flow, none by the rcode-sprint-planning skill.
|
|
8
|
+
|
|
9
|
+
The `rcode-sprint-planning` skill (`.rcode/skills/rcode-sprint-planning/SKILL.md`,
|
|
10
|
+
workflow at `.rcode/skills/rcode-sprint-planning/workflow.md`) is a SEPARATE tool:
|
|
11
|
+
it generates `sprint-status.yaml` from `.planning/epics/` files (epic/story status
|
|
12
|
+
tracking: backlog -> ready-for-dev -> in-progress -> review -> done), not a
|
|
13
|
+
SPRINT.md. Do not delegate to it expecting a SPRINT.md output.
|
|
13
14
|
</purpose>
|
|
14
15
|
|
|
15
|
-
<delegate_to_skill>
|
|
16
|
-
Required skill: `rcode-sprint-planning`
|
|
17
|
-
Path: `.rcode/skills/rcode-sprint-planning/SKILL.md`
|
|
18
|
-
Workflow ref: `.rcode/skills/rcode-sprint-planning/workflow.md`
|
|
19
|
-
Fallback path: `.claude/skills/rcode-sprint-planning/SKILL.md`
|
|
20
|
-
|
|
21
|
-
Behaviour:
|
|
22
|
-
1. Load the skill's `SKILL.md` and `workflow.md`. Apply every Critical
|
|
23
|
-
Rule from the workflow's `## CRITICAL RULES (NO EXCEPTIONS)` block,
|
|
24
|
-
including the capacity gate (step n="0") which MUST halt for
|
|
25
|
-
numeric capacity inputs before any story is committed.
|
|
26
|
-
2. Run the skill's step files in order. The in-line steps below this
|
|
27
|
-
block are a fallback summary for legacy installs that lack the skill;
|
|
28
|
-
they are NOT the authoritative behaviour.
|
|
29
|
-
3. After SPRINT.md is written, ALWAYS run:
|
|
30
|
-
`node .rcode/bin/rcode-tools.cjs state sync --from-disk`
|
|
31
|
-
so state.sprints[] reflects the new sprint.
|
|
32
|
-
|
|
33
|
-
If skill files are missing: print
|
|
34
|
-
"Sprint-planning skill not installed. Run: npx @hanzlaa/rcode install"
|
|
35
|
-
and exit non-zero. Do not proceed with the legacy in-line steps because
|
|
36
|
-
they bypass the capacity gate.
|
|
37
|
-
</delegate_to_skill>
|
|
38
|
-
|
|
39
16
|
<required_reading>
|
|
40
17
|
@.rcode/references/output-format.md
|
|
41
18
|
@.rcode/brain/best-practices/no-autonomous-bypass.md
|
|
@@ -52,7 +29,7 @@ Open with banner:
|
|
|
52
29
|
```
|
|
53
30
|
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".
|
|
54
31
|
Closure: `rcode ► SPRINT {NN.S} READY ✓ ({N} stories, {M} points)`
|
|
55
|
-
Next Up: `/rcode-execute .planning/phases/{phase}/SPRINT.md`
|
|
32
|
+
Next Up: `/rcode-execute .planning/phases/{phase}/{phase}-{plan}-SPRINT.md`
|
|
56
33
|
</output_format>
|
|
57
34
|
|
|
58
35
|
<process>
|
|
@@ -177,7 +154,7 @@ node .rcode/bin/rcode-tools.cjs state story add \
|
|
|
177
154
|
--points {points}
|
|
178
155
|
```
|
|
179
156
|
|
|
180
|
-
Write SPRINT.md to `.planning/phases/{phase_slug}/SPRINT.md`. Use `.rcode/templates/sprint.md` as a template if it exists; otherwise produce the file inline with these sections (the template file may be absent in this install). Fill in:
|
|
157
|
+
Write SPRINT.md to `.planning/phases/{phase_slug}/{phase}-{plan}-SPRINT.md`. Use `.rcode/templates/sprint.md` as a template if it exists; otherwise produce the file inline with these sections (the template file may be absent in this install). Fill in:
|
|
181
158
|
- Sprint goal
|
|
182
159
|
- Stories table (from user-confirmed list)
|
|
183
160
|
- Capacity section (velocity target, average, buffer)
|
|
@@ -203,13 +180,13 @@ Stories: {count} ({total_points} points)
|
|
|
203
180
|
Capacity: {velocity_target} points ({buffer}% buffer)
|
|
204
181
|
|
|
205
182
|
Next:
|
|
206
|
-
/rcode-execute .planning/phases/{phase}/SPRINT.md ← execute the sprint
|
|
183
|
+
/rcode-execute .planning/phases/{phase}/{phase}-{plan}-SPRINT.md ← execute the sprint
|
|
207
184
|
/rcode-sprint-status ← check progress anytime
|
|
208
185
|
```
|
|
209
186
|
|
|
210
187
|
## Output Format
|
|
211
188
|
|
|
212
|
-
- SPRINT.md at `.planning/phases/{phase_slug}/SPRINT.md`
|
|
189
|
+
- SPRINT.md at `.planning/phases/{phase_slug}/{phase}-{plan}-SPRINT.md`
|
|
213
190
|
- Sprint + stories registered in `.rcode/state.json`
|
|
214
191
|
- Console summary with next-step commands
|
|
215
192
|
|
|
@@ -3,7 +3,8 @@ Audit Nyquist validation gaps for a completed phase. Generate missing tests. Upd
|
|
|
3
3
|
</purpose>
|
|
4
4
|
|
|
5
5
|
<required_reading>
|
|
6
|
-
|
|
6
|
+
<!-- ui-brand.md (254 lines): only load when the phase goal/CONTEXT.md contains UI signals — mirrors plan.md:49's PHASE_GOAL_HAS_UI pattern -->
|
|
7
|
+
${PHASE_GOAL_HAS_UI ? '@.rcode/references/ui-brand.md' : ''}
|
|
7
8
|
@.rcode/references/karpathy-guidelines.md
|
|
8
9
|
</required_reading>
|
|
9
10
|
|
|
@@ -32,6 +33,11 @@ Parse: `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `padded_phase`.
|
|
|
32
33
|
```bash
|
|
33
34
|
AUDITOR_MODEL=$(node ".rcode/bin/rcode-tools.cjs" resolve-model rcode-nyquist-auditor --raw)
|
|
34
35
|
NYQUIST_CFG=$(node ".rcode/bin/rcode-tools.cjs" config-get workflow.nyquist_validation --raw)
|
|
36
|
+
|
|
37
|
+
# Detect UI signals in phase goal + CONTEXT.md to decide whether to load ui-brand.md (254 lines)
|
|
38
|
+
PHASE_GOAL_HAS_UI=$(grep -iEl "frontend|ui|component|design|style|brand" \
|
|
39
|
+
.planning/phases/*${phase_number}*/*-CONTEXT.md \
|
|
40
|
+
.planning/ROADMAP.md 2>/dev/null | head -1)
|
|
35
41
|
```
|
|
36
42
|
|
|
37
43
|
If `NYQUIST_CFG` is `false`: exit with "Nyquist validation is disabled. Enable via /rcode-settings."
|