Skip to content

feat(implement): add recipes for scheduler, tenancy, rate-limiting, memory, and provider APIs - #17

Merged
slin1237 merged 2 commits into
mainfrom
feat/new-subsystem-recipes
Jun 8, 2026
Merged

feat(implement): add recipes for scheduler, tenancy, rate-limiting, memory, and provider APIs#17
slin1237 merged 2 commits into
mainfrom
feat/new-subsystem-recipes

Conversation

@slin1237

@slin1237 slin1237 commented Jun 8, 2026

Copy link
Copy Markdown
Member

Problem

Five subsystems built since the guide was written (priority scheduler, multi-tenancy, rate-limiting, memory, and the Anthropic/Gemini provider routers) had no step-by-step recipe — they were only listed in the "subsystems without a recipe yet" table in implement/SKILL.md.

Solution

Wrote five new recipes, each by reading the current code for the subsystem and modeling examples on real implementations (every path/type/method/command verified against source), then wired them into the detection table.

Changes

New recipes (feat):

  • scheduler-feature — configure the priority scheduler (classes, tenant policies, reservations via PrioritySchedulerYaml) + extend the ClassQueue / TenantPolicyResolver traits
  • tenancy-feature — read the resolved TenantKey/RouteRequestMeta to make a feature tenant-aware, and add a new TenantIdentity source
  • rate-limit-feature — the single global TokenBucket (concurrency cap + rate limit), how to tune it, and how to add a knob
  • memory-feature — concise guide for the MemoryExecutionContext/MemoryPolicyMode parse-decide layer; honestly flagged as in-progress (the execution consumers are still TODO stubs)
  • provider-api — add a provider-compatible API surface (RoutingMode variant + RouterTrait impl + factory wiring + route), modeled on AnthropicRouter

implement/SKILL.md: moved these five from the "no recipe yet" table into the detection table (kept Responses/Conversations/Realtime, the skills subsystem, the TUI, and client-gen as still-uncovered).

Metadata (docs): bumped recipe count 15 → 20 in the README recipe table + "Implementation Recipes" line and the "(with 20 subsystem recipes)" string in the Claude plugin, marketplace, and Cursor manifests.

Affected Skills

  • smg:map
  • smg:contribute
  • smg:review-pr
  • smg:implement
  • Recipe files (5 new: scheduler, tenancy, rate-limit, memory, provider-api)
  • Command router (smg.md)
  • Plugin config (plugin.json, marketplace.json, cursor)

Checklist

  • Follows conventional commit title format
  • Commit(s) are signed off (git commit -s)
  • Tested with claude plugins add . locally
  • Skill triggers correctly on intended prompts
  • No broken @file.md references in skills

Verification: load-bearing symbols for all five recipes confirmed present in smg@a18d64f5; all cargo commands use -p smg (the model_gateway package); JSON manifests validated. Doc skeletons weren't cargo-compiled in isolation, so the "tested locally" boxes are left unchecked. The memory recipe is intentionally a "how it works + extension points" guide, since that subsystem is genuinely in-progress in the codebase.

slin1237 added 2 commits June 8, 2026 08:39
…emory, provider APIs

Five subsystems built since the guide was written had no step-by-step
recipe — they were only listed in the "no recipe yet" table. Each new
recipe was written by reading the current code and modeling examples on
real implementations, verified against source.

- scheduler-feature: configure the priority scheduler (classes, tenant
  policies, reservations via PrioritySchedulerYaml) + extend the ClassQueue
  / TenantPolicyResolver traits
- tenancy-feature: read the resolved TenantKey/RouteRequestMeta to make a
  feature tenant-aware, and add a new TenantIdentity source
- rate-limit-feature: the single global TokenBucket (concurrency cap + rate
  limit), how to tune it, and how to add a knob
- memory-feature: concise guide for the MemoryExecutionContext/
  MemoryPolicyMode parse-decide layer (honestly flagged as in-progress —
  the execution consumers are still TODO stubs)
- provider-api: add a provider-compatible API surface (RoutingMode variant
  + RouterTrait impl + factory wiring + route), modeled on AnthropicRouter

implement/SKILL.md: move these five from the "subsystems without a recipe
yet" table into the detection table; keep Responses/Conversations/Realtime,
the skills subsystem, the TUI, and client-gen as still-uncovered.

Verified against smg@a18d64f5.

Signed-off-by: Simo Lin <25425177+slin1237@users.noreply.github.com>
The five new recipes (scheduler, tenancy, rate-limit, memory, provider-api)
bring the total to 20. Update the README recipe table and the "20
Implementation Recipes" line, and the "(with 20 subsystem recipes)" string
in the Claude plugin, marketplace, and Cursor manifests.

Signed-off-by: Simo Lin <25425177+slin1237@users.noreply.github.com>
@slin1237
slin1237 merged commit 71f54bd into main Jun 8, 2026
2 checks passed
@slin1237
slin1237 deleted the feat/new-subsystem-recipes branch June 8, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant