@hanzlaa/rcode 4.15.0 → 4.15.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/cli/install.js +32 -1
  2. package/dist/rcode.js +91 -91
  3. package/package.json +1 -1
  4. package/rcode/agents/rcode-orchestrator.md +3 -0
  5. package/rcode/agents/rules/orchestrator/contract.md +18 -0
  6. package/rcode/agents/rules/roadmapper/detailed-guide.md +4 -2
  7. package/rcode/agents/rules/sprint-checker/dimensions.md +20 -0
  8. package/rcode/agents/rules/sprint-checker/plan-quality-rubric.md +110 -0
  9. package/rcode/references/agent-shared-rules.md +8 -0
  10. package/rcode/references/planner-playbook.md +17 -1
  11. package/rcode/references/sprint-checker-playbook.md +11 -0
  12. package/rcode/skills/actions/4-implementation/rcode-code-review/SKILL.md +12 -5
  13. package/rcode/skills/actions/4-implementation/rcode-code-review/steps/step-02-review.md +61 -10
  14. package/rcode/skills/actions/4-implementation/rcode-code-review/steps/step-03-triage.md +28 -3
  15. package/rcode/skills/actions/4-implementation/rcode-code-review/workflow.md +8 -1
  16. package/rcode/skills/agents/haitham-frontend/SKILL.md +1 -1
  17. package/rcode/skills/agents/hanzla-engineer/SKILL.md +1 -1
  18. package/rcode/skills/agents/hussain-pm/SKILL.md +1 -1
  19. package/rcode/skills/agents/noor-writer/SKILL.md +2 -2
  20. package/rcode/skills/agents/orchestrator/SKILL.md +35 -5
  21. package/rcode/skills/agents/yousef-backend/SKILL.md +2 -2
  22. package/rcode/skills/agents/zayd-ml/SKILL.md +1 -1
  23. package/rcode/skills/core/rcode-help/SKILL.md +2 -1
  24. package/rcode/workflows/execute-sprint.md +1 -1
  25. package/rcode/workflows/plan.md +19 -0
  26. package/rcode/workflows/secure-phase.md +3 -1
  27. package/rcode/skills/rcode-init/SKILL.md +0 -134
@@ -132,7 +132,9 @@ Handle return:
132
132
  ## 6. Write/Update SECURITY.md
133
133
 
134
134
  **State B (create):**
135
- 1. Read template from `.rcode/templates/SECURITY.md`
135
+ 1. Read `.rcode/templates/SECURITY.md` **if it exists** — it is not shipped, so
136
+ normally it will not. Build the document from step 2's section list instead;
137
+ that list is the contract, the template was only ever a convenience.
136
138
  2. Fill: frontmatter, threat register, accepted risks, audit trail
137
139
  3. Write to `${PHASE_DIR}/${PADDED_PHASE}-SECURITY.md`
138
140
 
@@ -1,134 +0,0 @@
1
- ---
2
- name: rcode-init
3
- internal: true
4
- description: "INTERNAL config loader for skills. Loads .rcode/ vars; lives in .rcode/skills/ not .claude/skills/."
5
- argument-hint: "[--module=module_code] [--vars=var1:default1,var2] [--skill-path=/path/to/calling/skill]"
6
- triggers:
7
- - "init"
8
- ---
9
- @.rcode/references/karpathy-guidelines.md
10
-
11
-
12
- ## Overview
13
-
14
- This skill is the configuration entry point for all rcode skills. It has two modes:
15
-
16
- - **Fast path**: Config exists for the requested module — returns vars as JSON. Done.
17
- - **Init path**: Config is missing — walks the user through configuration, writes config files, then returns vars.
18
-
19
- Every rcode skill should call this on activation to get its config vars. The caller never needs to know whether init happened — they just get their config back.
20
-
21
- The script `rcode_init.py` is located in this skill's `scripts/` directory. Locate and run it using python for all commands below.
22
-
23
- ## On Activation — Fast Path
24
-
25
- Run the `rcode_init.py` script with the `load` subcommand. Pass `--project-root` set to the project root directory.
26
-
27
- - If a module code was provided by the calling skill, include `--module {module_code}`
28
- - To load all vars, include `--all`
29
- - To request specific variables with defaults, use `--vars var1:default1,var2`
30
- - If no module was specified, omit `--module` to get core vars only
31
-
32
- **If the script returns JSON vars** — store them as `{var-name}` and return to the calling skill. Done.
33
-
34
- **If the script returns an error or `init_required`** — proceed to the Init Path below.
35
-
36
- ## Init Path — First-Time Setup
37
-
38
- When the fast path fails (config missing for a module), run this init flow.
39
-
40
- ### Step 1: Check what needs setup
41
-
42
- Run `rcode_init.py` with the `check` subcommand, passing `--module {module_code}`, `--skill-path {calling_skill_path}`, and `--project-root`.
43
-
44
- The response tells you what's needed:
45
-
46
- - `"status": "ready"` — Config is fine. Re-run load.
47
- - `"status": "no_project"` — Can't find project root. Ask user to confirm the project path.
48
- - `"status": "core_missing"` — Core config doesn't exist. Must ask core questions first.
49
- - `"status": "module_missing"` — Core exists but module config doesn't. Ask module questions.
50
-
51
- The response includes:
52
- - `core_module` — Core module.yaml questions (when core setup needed)
53
- - `target_module` — Target module.yaml questions (when module setup needed, discovered from `--skill-path` or `_rcode/{module}/`)
54
- - `core_vars` — Existing core config values (when core exists but module doesn't)
55
-
56
- ### Step 2: Ask core questions (if `core_missing`)
57
-
58
- The check response includes `core_module` with header, subheader, and variable definitions.
59
-
60
- 1. Show the `header` and `subheader` to the user
61
- 2. For each variable, present the `prompt` and `default`
62
- 3. For variables with `single-select`, show the options as a numbered list
63
- 4. For variables with multi-line `prompt` (array), show all lines
64
- 5. Let the user accept defaults or provide values
65
-
66
- ### Step 3: Ask module questions (if module was requested)
67
-
68
- The check response includes `target_module` with the module's questions. Variables may reference core answers in their defaults (e.g., `{output_folder}`).
69
-
70
- 1. Resolve defaults by running `rcode_init.py` with the `resolve-defaults` subcommand, passing `--module {module_code}`, `--core-answers '{core_answers_json}'`, and `--project-root`
71
- 2. Show the module's `header` and `subheader`
72
- 3. For each variable, present the prompt with resolved default
73
- 4. For `single-select` variables, show options as a numbered list
74
-
75
- ### Step 4: Write config
76
-
77
- Collect all answers and run `rcode_init.py` with the `write` subcommand, passing `--answers '{all_answers_json}'` and `--project-root`.
78
-
79
- The `--answers` JSON format:
80
-
81
- ```json
82
- {
83
- "core": {
84
- "user_name": "rcode",
85
- "communication_language": "English",
86
- "document_output_language": "English",
87
- "output_folder": "_rcode-output"
88
- },
89
- "bmb": {
90
- "rcode_builder_output_folder": "_rcode-output/skills",
91
- "rcode_builder_reports": "_rcode-output/reports"
92
- }
93
- }
94
- ```
95
-
96
- Note: Pass the **raw user answers** (before result template expansion). The script applies result templates and `{project-root}` expansion when writing.
97
-
98
- The script:
99
- - Creates `_rcode/core/config.yaml` with core values (if core answers provided)
100
- - Creates `_rcode/{module}/config.yaml` with core values + module values (result-expanded)
101
- - Creates any directories listed in the module.yaml `directories` array
102
-
103
- ### Step 5: Return vars
104
-
105
- After writing, re-run `rcode_init.py` with the `load` subcommand (same as the fast path) to return resolved vars. Store returned vars as `{var-name}` and return them to the calling skill.
106
-
107
- ## Output Format
108
-
109
- JSON config vars returned to the calling skill. When init path runs, interactive Q&A with the user, then config files written to `_rcode/`.
110
-
111
- ## Workflow
112
-
113
- 1. Read the user request and extract key parameters.
114
- 2. Execute the skill logic as described in the Overview.
115
- 3. Return output in the format specified below.
116
-
117
- ## Examples
118
-
119
- ### Happy path (fast path)
120
- **Calling skill:** invokes rcode-init with `--module bmb`
121
- **Result:** Config exists → returns `{"output_folder": "_rcode-output", ...}` instantly
122
-
123
- ### Edge case (init path)
124
- **Calling skill:** invokes rcode-init, no config exists
125
- **Result:** Asks core questions → asks module questions → writes config → returns vars
126
-
127
- ### Negative boundary
128
- **User:** "initialize my project"
129
- **Result:** rcode-init is internal — user should use `rcode-scaffold-project` or `/rcode-install` instead
130
-
131
- ## Memory Bank Hooks
132
-
133
- - **Reads:** `package.json`, existing `.rcode/state.json` to detect prior runs
134
- - **Writes:** `.rcode/config.yaml`, `.rcode/state.json`, `.rcode/context/active.md`, `.rcode/context/project-brief.md`, `.rcode/JOURNEY.md`. Bootstraps the project so all subsequent rcode skills have a stable root.