@hanzlaa/rcode 4.4.4 → 4.5.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.
@@ -1,87 +1,87 @@
1
1
  [
2
2
  {
3
3
  "intent": "new-project",
4
- "keywords": ["set up a new project", "initialize a new project", "start a new project", "create a new project"],
4
+ "keywords": ["set up a new project", "initialize a new project", "start a new project", "create a new project", "naya project shuru karo", "naya project banao", "مشروع جديد", "ابدأ مشروع جديد"],
5
5
  "command": "/rcode-new-project"
6
6
  },
7
7
  {
8
8
  "intent": "map-codebase",
9
- "keywords": ["map the codebase", "map this codebase", "analyze the codebase", "analyse the codebase", "map existing codebase"],
9
+ "keywords": ["map the codebase", "map this codebase", "analyze the codebase", "analyse the codebase", "map existing codebase", "codebase samjhao", "code ka structure dikhao", "حلل الكود", "افهم هيكل المشروع"],
10
10
  "command": "/rcode-map-codebase"
11
11
  },
12
12
  {
13
13
  "intent": "debug",
14
- "keywords": ["bug", "getting an error", "throwing an error", "error in the", "fix the error", "debug this", "crash", "failure", "broken", "not working", "fails", "exception", "traceback"],
14
+ "keywords": ["bug", "getting an error", "throwing an error", "error in the", "fix the error", "debug this", "crash", "failure", "broken", "not working", "fails", "exception", "traceback", "kharab", "masla", "ye kaam nahi kar raha", "yeh kaam nahi kar raha", "error a raha hai", "theek karo", "khud se crash", "خطأ", "مشكلة", "لا يعمل", "أصلح الخطأ", "تعطل البرنامج"],
15
15
  "command": "/rcode-debug"
16
16
  },
17
17
  {
18
- "intent": "audit-karpathy",
19
- "keywords": ["audit", "review changes", "check my diff", "karpathy", "too complex", "complexity", "code review"],
20
- "command": "/rcode-review --karpathy"
18
+ "intent": "karpathy-audit",
19
+ "keywords": ["review changes", "check my diff", "karpathy", "too complex", "complexity", "diff check karo", "پیچیدہ کوڈ", "تحقق من التغييرات"],
20
+ "command": "/rcode-karpathy-audit"
21
21
  },
22
22
  {
23
23
  "intent": "lazy",
24
- "keywords": ["be lazy", "lazy mode", "simplest solution", "yagni", "over-engineered", "over-engineering", "kam code likho"],
24
+ "keywords": ["be lazy", "lazy mode", "simplest solution", "yagni", "over-engineered", "over-engineering", "kam code likho", "asaan tareeqa", "سهل الحل", "أبسط طريقة"],
25
25
  "command": "/rcode-lazy"
26
26
  },
27
27
  {
28
28
  "intent": "checkpoint",
29
- "keywords": ["checkpoint", "explain this diff", "human review", "walk through the change", "walk through this change"],
29
+ "keywords": ["checkpoint", "explain this diff", "human review", "walk through the change", "walk through this change", "diff samjhao", "اشرح هذا التغيير"],
30
30
  "command": "/rcode-checkpoint-preview"
31
31
  },
32
32
  {
33
33
  "intent": "brainstorm",
34
- "keywords": ["brainstorm", "generate ideas", "explore options", "what could we do", "ideate", "ideas for"],
34
+ "keywords": ["brainstorm", "generate ideas", "explore options", "what could we do", "ideate", "ideas for", "ideas do", "hum kya kar sakte hain", "أفكار", "ما الذي يمكننا فعله"],
35
35
  "command": "/rcode-brainstorm"
36
36
  },
37
37
  {
38
38
  "intent": "explore",
39
- "keywords": ["explore", "research phase", "do some research", "comparing", "investigate", "look into", "understand how"],
39
+ "keywords": ["explore", "research phase", "do some research", "comparing", "investigate", "look into", "understand how", "research karo", "pata karo", "ابحث عن", "قارن بين"],
40
40
  "command": "/rcode-research-phase"
41
41
  },
42
42
  {
43
43
  "intent": "discuss",
44
- "keywords": ["which one", "better ux", "how should", "still have confusion", "conflicting", "discuss the scope", "design this", "architect this"],
44
+ "keywords": ["which one", "better ux", "how should", "still have confusion", "conflicting", "discuss the scope", "design this", "architect this", "confusion hai", "kaunsa behtar hai", "أيهما أفضل", "لست متأكداً"],
45
45
  "command": "/rcode-discuss-phase"
46
46
  },
47
47
  {
48
48
  "intent": "add-phase",
49
- "keywords": ["refactor", "migration", "multi-file", "system redesign", "multi file", "large refactor", "architectural", "integration", "integrate"],
49
+ "keywords": ["refactor", "migration", "multi-file", "system redesign", "multi file", "large refactor", "architectural", "integration", "integrate", "poora refactor karo", "migration karna hai", "إعادة هيكلة", "ترحيل النظام"],
50
50
  "command": "/rcode-add-phase"
51
51
  },
52
52
  {
53
53
  "intent": "sprint-planning",
54
- "keywords": ["sprint planning", "plan the sprint", "next sprint", "what's in this sprint"],
54
+ "keywords": ["sprint planning", "plan the sprint", "next sprint", "what's in this sprint", "sprint plan karo", "تخطيط السبرنت"],
55
55
  "command": "/rcode-sprint-planning"
56
56
  },
57
57
  {
58
58
  "intent": "execute-sprint",
59
- "keywords": ["run the sprint", "start sprint", "execute sprint", "work on sprint"],
59
+ "keywords": ["run the sprint", "start sprint", "execute sprint", "work on sprint", "sprint chalao", "sprint shuru karo", "نفذ السبرنت", "ابدأ السبرنت"],
60
60
  "command": "/rcode-execute-sprint"
61
61
  },
62
62
  {
63
63
  "intent": "plan",
64
- "keywords": ["let's plan", "plan phase", "plan this", "let me plan", "planning phase", "create a plan", "please plan", "plan and think", "scope this", "scope the feature"],
64
+ "keywords": ["let's plan", "plan phase", "plan this", "let me plan", "planning phase", "create a plan", "please plan", "plan and think", "scope this", "scope the feature", "plan banao", "isko plan karo", "خطط لهذا", "أنشئ خطة"],
65
65
  "command": "/rcode-plan"
66
66
  },
67
67
  {
68
68
  "intent": "new-milestone",
69
- "keywords": ["create milestones", "plan milestones", "create roadmap", "break project into milestones", "new milestone", "what milestones"],
69
+ "keywords": ["create milestones", "plan milestones", "create roadmap", "break project into milestones", "new milestone", "what milestones", "milestones banao", "خطة الطريق", "مراحل المشروع"],
70
70
  "command": "/rcode-new-milestone"
71
71
  },
72
72
  {
73
73
  "intent": "epics-stories",
74
- "keywords": ["create epics", "user stories", "create stories", "epics and stories", "break into epics"],
74
+ "keywords": ["create epics", "user stories", "create stories", "epics and stories", "break into epics", "stories banao", "قصص المستخدم", "أنشئ ملاحم"],
75
75
  "command": "/rcode-create-epics-and-stories"
76
76
  },
77
77
  {
78
78
  "intent": "feature-drift",
79
- "keywords": ["out of date", "out-of-date", "verify docs", "audit feature docs", "fill out existing", "prd drift", "docs vs code"],
79
+ "keywords": ["out of date", "out-of-date", "verify docs", "audit feature docs", "fill out existing", "prd drift", "docs vs code", "docs purane hain", "الوثائق قديمة", "تحقق من التوثيق"],
80
80
  "command": "/rcode-feature-drift"
81
81
  },
82
82
  {
83
83
  "intent": "audit",
84
- "keywords": ["re-audit", "extend the audit", "fill out the", "expand the", "re audit"],
84
+ "keywords": ["re-audit", "extend the audit", "fill out the", "expand the", "re audit", "audit", "code review", "dobara audit karo", "audit karo", "code review karo", "دقق الكود", "مراجعة الكود", "راجع التغييرات"],
85
85
  "command": "/rcode-audit"
86
86
  }
87
87
  ]
@@ -1,6 +1,8 @@
1
1
  # Memory Bank — `{{PROJECT_NAME}}`
2
2
 
3
- > The Memory Bank is your project's persistent brain. AI agents read from here on every session. You write to it as work happens. Survives session resets, team changes, and AI memory limits.
3
+ > The Memory Bank is your project's persistent brain. Full read/write access is on-demand: run `/rcode-memory-init` to scaffold it, `/rcode-memory-update` after work happens, `/rcode-memory-distill` to regenerate the compressed distillates, and `/rcode-memory-audit` to check it for staleness. Ambient injection also runs automatically (#958): the `session-start` hook emits its usual one-line phase-status primer from `.rcode/state.json`, then — when this directory exists and has content — a relevance-ranked selector (`rcode/bin/lib/memory-select.cjs`) scores every file here against the current phase, git branch, and recently touched files, and injects the top-scoring excerpts as `additionalContext` within a ~1500-token budget (override via `.rcode/config.yaml`'s `memory_inject_budget`). The `pre-compact` hook does the same with a smaller ~600-token budget as part of its survival context. This keeps agents grounded in relevant memory without a human having to run a `/rcode-memory-*` command first — full manual review is still the way to go deep.
4
+ >
5
+ > A `post-commit` hook runs a lightweight drift check after every commit (#958): it compares `project/stack.md` and `project/decisions.md` claims against the last 10 commits and the current working tree — removed/added dependencies, referenced files/dirs that no longer exist, and an `INDEX.md` older than 30 days. If it finds anything, it nudges you toward `/rcode-memory-update` once per session. Run `rcode-hooks drift` (or `node .rcode/bin/rcode-hooks.cjs drift` if the CLI isn't on your PATH) anytime for the full report.
4
6
 
5
7
  **Last updated:** {{INIT_DATE}}
6
8
 
@@ -27,6 +29,8 @@
27
29
 
28
30
  ## Token budget guide
29
31
 
32
+ - **Ambient session-start injection** (~1.5K tokens, `memory_inject_budget`) — automatic, relevance-ranked, no command needed
33
+ - **Ambient pre-compact injection** (~600 tokens) — automatic survival context alongside `HANDOFF.json`
30
34
  - **`INDEX.md` only** (~500 tokens) — quick orientation
31
35
  - **`INDEX.md` + `distillates/project.distillate.md`** (~5K tokens) — standard session start
32
36
  - **Full `project/` directory** (~10–15K tokens) — deep planning
@@ -39,6 +43,7 @@
39
43
  - **`incidents/known-issues.md`** — add when a workaround ships, remove when a real fix lands
40
44
  - **`distillates/`** — regenerate via `/rcode-memory-distill` when source files change
41
45
  - **Whole bank** — audit via `/rcode-memory-audit` at every milestone close
46
+ - **Drift check** — runs automatically on every commit; run `rcode-hooks drift` manually anytime, or after a large dependency/refactor change
42
47
 
43
48
  ## Constraints
44
49
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "_comment": "pre-edit hook is currently advisory (logs warning, does not block). Full session-read tracking requires PostToolUse Read hook to write state file. Implemented in follow-up. prompt-router (UserPromptSubmit) is advisory — emits additionalContext to nudge toward the right rcode command; never blocks.",
2
+ "_comment": "pre-edit hook is currently advisory (logs warning, does not block). Full session-read tracking requires PostToolUse Read hook to write state file. Implemented in follow-up. prompt-router (UserPromptSubmit) is advisory — emits additionalContext to nudge toward the right rcode command; never blocks. session-start (SessionStart) emits a one-line project status primer at session open.",
3
3
  "hooks": {
4
4
  "PreToolUse": [
5
5
  {
@@ -85,6 +85,17 @@
85
85
  }
86
86
  ]
87
87
  }
88
+ ],
89
+ "SessionStart": [
90
+ {
91
+ "matcher": "",
92
+ "hooks": [
93
+ {
94
+ "type": "command",
95
+ "command": "node .rcode/bin/rcode-hooks.cjs session-start"
96
+ }
97
+ ]
98
+ }
88
99
  ]
89
100
  }
90
101
  }
@@ -290,7 +290,7 @@ Evaluate `$QUESTION` against these routing rules. Apply the **first matching** r
290
290
  | A bug, error, crash, failure, or something broken | `/rcode-debug` | Needs systematic investigation |
291
291
  | Validate an idea, "working backwards", "press release", "PRFAQ", "is this worth building" | `/rcode-prfaq` | Stress-test concept before committing sprint capacity |
292
292
  | Brainstorm, generate ideas, "explore options", "what could we do" | `/rcode-brainstorm` | Structured ideation before planning |
293
- | Audit code quality, "review changes", "karpathy", "check my diff", "too complex" | `/rcode-review --karpathy` | 4-principle code audit against recent diff |
293
+ | "karpathy", "review changes", "check my diff", "too complex" — 4-principle code audit against a diff | `/rcode-karpathy-audit` | Runs the karpathy-audit workflow directly (review.md has no `--karpathy` flag) |
294
294
  | Make it simpler, "be lazy", "lazy mode", "simplest solution", "yagni", "over-engineered", "kam code likho" | `/rcode-lazy` | Generative simplicity lens — YAGNI before code is written (rcode-trim removes bloat after the fact) |
295
295
  | Walk through a change, "checkpoint", "explain this diff", "human review" | `/rcode-checkpoint-preview` | Human-in-the-loop diff walkthrough |
296
296
  | Exploring, researching, comparing, or "how does X work" | `/rcode-research-phase` | Domain research before planning |
@@ -317,7 +317,7 @@ Evaluate `$QUESTION` against these routing rules. Apply the **first matching** r
317
317
  | Adding tests, "write tests", "test coverage" | `/rcode-add-tests` | Test generation |
318
318
  | Completing a milestone, shipping, releasing | `/rcode-complete-milestone` | Milestone lifecycle |
319
319
  | Drift / out-of-date / "verify docs vs code" / "audit feature docs" / "fill out existing PRD/epics/stories" | `/rcode-feature-drift` | Detects PRD↔epics↔stories↔code drift; --fix patches trivial items |
320
- | General audit / re-audit / extend / fill out / expand an existing artifact | `/rcode-audit` | Unified audit entry — picks artifact type and re-runs |
320
+ | Bare "audit" / "code review" / re-audit / extend / fill out / expand an existing artifact | `/rcode-audit` | Unified audit entry — disambiguates plans/phase/milestone/UAT/code before dispatching |
321
321
  > **SEO route guard:** Skills in this block assume a project context exists (`.planning/PROJECT.md`). If absent, the `HAS_PRD` check in `<step name="check_project">` redirects to `/rcode-new-project`.
322
322
 
323
323
  | **— SEO / Content intent —** | | |
@@ -1,7 +1,7 @@
1
1
  # Workflow: rcode-enable-hooks
2
2
 
3
3
  <purpose>
4
- Merge rcode opt-in hooks from settings-hooks.json into .claude/settings.json. Creates settings.json if missing. Enables all 9 guardrails: pre-edit (read-before-edit check), pre-workflow (command hint), post-commit (format validation), bash-guard (blocks dangerous commands), pre-compact (refreshes HANDOFF.json before context compaction), stop-verify (syntax-checks files changed during the response), cost-track (logs measured token usage to .rcode/telemetry/cost.jsonl), compact-nudge (advises /rcode-trim or /clear after many edits), and prompt-router (proactive nudge toward the right rcode command for long-term memory consistency).
4
+ Merge rcode opt-in hooks from settings-hooks.json into .claude/settings.json. Creates settings.json if missing. Enables all 10 guardrails: pre-edit (read-before-edit check), pre-workflow (command hint), post-commit (format validation), bash-guard (blocks dangerous commands), pre-compact (refreshes HANDOFF.json before context compaction), stop-verify (syntax-checks files changed during the response), cost-track (logs measured token usage to .rcode/telemetry/cost.jsonl), compact-nudge (advises /rcode-trim or /clear after many edits), prompt-router (proactive nudge toward the right rcode command for long-term memory consistency), and session-start (SessionStart — one-line project status primer at session open).
5
5
  </purpose>
6
6
 
7
7
 
@@ -44,7 +44,7 @@ If `.claude/` directory does not exist, create it first.
44
44
 
45
45
  ## Step 3 — Merge hooks
46
46
 
47
- For each hook type (`PreToolUse`, `PostToolUse`, `PreCompact`, `Stop`, `UserPromptSubmit`):
47
+ For each hook type (`PreToolUse`, `PostToolUse`, `PreCompact`, `Stop`, `UserPromptSubmit`, `SessionStart`):
48
48
 
49
49
  - If the hook type does not exist in the current settings.json, add it.
50
50
  - If it exists, append the new matchers and hook commands (avoid duplicates by checking for exact command matches).
@@ -87,6 +87,7 @@ Enabled guardrails:
87
87
  • cost-track: Logs measured token usage to .rcode/telemetry/cost.jsonl
88
88
  • compact-nudge: Advises /rcode-trim or /clear after many edits
89
89
  • prompt-router: Nudges toward the matching /rcode-* command and /rcode-memory-update so work lands in .rcode/state.json (toggle via prompt_nudge in .rcode/config.yaml: every|once-per-intent|when-stale|off)
90
+ • session-start: Greets the session with one-line phase status and suggested next command
90
91
 
91
92
  To disable, remove the hooks section from .claude/settings.json or edit .rcode/templates/settings-hooks.json and re-run.
92
93
  ```
@@ -302,12 +302,12 @@ Use AskUserQuestion:
302
302
  node .rcode/bin/rcode-tools.cjs generate-claude-md
303
303
  ```
304
304
 
305
- This ensures new projects get the default rcode workflow-enforcement guidance and current project context in `CLAUDE.md`.
305
+ This ensures new projects get the default rcode workflow-enforcement guidance and current project context in `CLAUDE.md` and `AGENTS.md` (the cross-tool standard read by Codex, Cursor, Windsurf, Antigravity, and Gemini). `AGENTS.md` is only written when absent — an install-managed roster section is preserved.
306
306
 
307
307
  **Commit roadmap (after approval or auto mode):**
308
308
 
309
309
  ```bash
310
- node .rcode/bin/rcode-tools.cjs commit "docs: create roadmap ([N] phases)" --files .planning/ROADMAP.md .planning/STATE.md .planning/REQUIREMENTS.md CLAUDE.md
310
+ node .rcode/bin/rcode-tools.cjs commit "docs: create roadmap ([N] phases)" --files .planning/ROADMAP.md .planning/STATE.md .planning/REQUIREMENTS.md CLAUDE.md AGENTS.md
311
311
  ```
312
312
 
313
313
  ## 9. Done