Skip to content

Add onprem plugin: on-prem model governance hard lock and operating doctrine - #608

Open
TeslaJarTran wants to merge 3 commits into
cursor:mainfrom
TeslaJarTran:add-onprem
Open

TeslaJarTran wants to merge 3 commits into
cursor:mainfrom
TeslaJarTran:add-onprem

Conversation

@TeslaJarTran

@TeslaJarTran TeslaJarTran commented Oct 13, 2026 •

Copy link
Copy Markdown

Summary

  • Adds onprem/, a plugin that encodes on-prem model governance as a closed-allowlist hard lock plus an operating doctrine for 27B-class open-weight models: entry mode (/onprem-mode), 12 named principles, 3 playbooks (audit, spawn retry, panel), /setup-onprem rule writer/validator, help router, verification-skill generator, a guide, and an onprem-agent subagent.
  • Registers it in .cursor-plugin/marketplace.json and the README table (after dyl-stack, the other pstack-derived stack).
  • Structurally modeled on pstack; the subject is model governance, not engineering style, and it coexists with pstack (separate rule files, separate modes and agents).

Validation

  • node scripts/validate-plugins.mjs run locally against this branch: "All plugins validated successfully."
  • plugin.json name matches the marketplace entry name.

Test plan

  • CI validate-plugins check passes
  • /add-plugin onprem from the marketplace installs the plugin
  • Fresh-recipient path from onprem/docs/guide/05-sharing.md: install, run /setup-onprem, start a task with /onprem-mode

Note

Low Risk
Adds docs, skills, and a local Python verifier; the only user-writable surface is optional ~/.cursor/rules/onprem-models.mdc from /setup-onprem, not repo runtime code.

Overview
Introduces the onprem Cursor plugin and lists it in .cursor-plugin/marketplace.json and the root README (alongside other pstack-style stacks).

The new onprem/ package is documentation- and skill-driven governance for agent work on self-hosted models: a closed allowlist plus an absolute frontier-model ban, /setup-onprem to detect entitlements and write ~/.cursor/rules/onprem-models.mdc, entry /onprem-mode with four playbooks (audit, spawn-retry, panel, robodev), twelve principle-* skills, onprem-agent, a human guide, and helpers /onprem-help and /create-verify-skill. It is modeled on pstack but targets model policy and on-prem operating doctrine, with explicit pstack coexistence (separate rule files and agents).

Also adds verify-onprem: a read-only verify.py suite (doctor + nine JSON checks for manifest, lock consistency, templates, links, optional rule file, and registration) with a small feature map, aligned with deterministic-proof maintenance.

Reviewed by Cursor Bugbot for commit 816cdaa. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

"name": "onprem",
"displayName": "onprem stack",
"version": "0.1.0",
"description": "on-prem model governance and operating doctrine for agent work: a closed allowlist hard lock, a stack of named principles, and an entry mode that applies them.",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Listing descriptions disagree across surfaces

Medium Severity · Bugbot Rules

The plugin description differs across plugin.json, marketplace.json, and the README table. Marketplace inserts Cursor and a different ending; plugin.json changes capitalization, hyphenation, and the closing clause. Installed and marketplace listings will show different copy.

Additional Locations (2)
Fix in Cursor Fix in Web

Triggered by learned rule: Plugin listing copy must match plugin.json and marketplace.json

Reviewed by Cursor Bugbot for commit 123d853. Configure here.


# Onprem subagent

You are operating as onprem-mode's full approach. Read the `onprem-mode` skill's `SKILL.md` in full before doing any work, including its inline Principles index. Navigate to a leaf `principle-*` skill whenever you apply that principle. The on-prem model lock applies to every spawn you make.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agent cannot locate hidden mode skill

High Severity · Logic Bug

onprem-agent is told to read onprem-mode before any work, but that skill is disable-model-invocation and neither the agent nor the mode pass or search a filesystem path. Spawned agents can miss the lock and principles entirely.

Additional Locations (1)
Fix in Cursor Fix in Web

Triggered by learned rule: Skill detection must cover all installation paths

Reviewed by Cursor Bugbot for commit 123d853. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 3 potential issues.

There are 5 total unresolved issues (including 2 from previous reviews).

Fix All in Cursor

Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.

Reviewed by Cursor Bugbot for commit 816cdaa. Configure here.

External multi-model deep review of a diff or a full tree. Use when the task is "robodev this", "deep external review", or a pre-ship cross-check of a large change. The review fleet runs outside the on-prem boundary, so this is the evidence path, not the judgment path.

1. Boundary gate. Confirm the content under review may leave the boundary. Internal content reviewed on the internal fleet is fine. Content that a recipient's on-prem policy keeps internal is not: stop and use the **panel** playbook instead.
2. Host gate. The CLI only knows the internal GitHub hosts (github.tesla.com, github-it.tesla.com, github-ap.tesla.com, github-fw.tesla.com). If the repo's origin is on a known host, continue there. If not, build a mirror: a private mirror repo on a known host, a fresh clone for the review, and a deleted mirror when the review returns. For a full-tree review of a young repo, give the mirror history an empty root commit (commit-tree the existing trees onto an empty-tree root) so the whole tree is the diff. Never rewrite the real repo's history for this.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Public playbook mirrors onto Tesla GitHub

High Severity · Security Issue

The new robodev playbook names four Tesla-internal GitHub hosts and tells the agent to create a private mirror there when the repo origin is unknown. Generic triggers like pre-ship cross-check route here, and onprem-mode autonomy proceeds on reversible external actions without asking, so a marketplace session can copy a user's repo onto internal infra.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 816cdaa. Configure here.



def check_frontmatter(root, checks):
import yaml

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verifier crashes without PyYAML

Medium Severity · Logic Bug

check_frontmatter does a bare import yaml. PyYAML is not in the standard library and nothing in this repo declares it, so a missing package aborts the suite with a traceback instead of a JSON frontmatter failure. The skill's proof contract is a JSON summary and a meaningful exit code.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 816cdaa. Configure here.


1. Record what failed: the role, the model attempted, and the error.
2. Is the attempted model allowlisted?
- No → the rule or the spawn violated the lock. Apply **no-fallback-to-banned**: re-spawn on a real allowlisted slug for the role, never an alias. If the role's default is `inherit-parent` or `auto`, the retry takes the role's real-slug default (code roles `Qwen/Qwen3.8-Flash-Next-FP8`, judgment and prose roles the rule file's judgment slug, panel roles one entry of their panel list). An alias retry inherits the parent and can land back on the banned model. Flag the source for an **audit** run.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spawn retry misses alias role fallbacks

Medium Severity · Logic Bug

The rewritten retry step forbids inherit-parent/auto but only names a real-slug default for code, judgment, and panel roles. how explorer, why investigators, and reflect tooling default to the alias and have no fallback. Judgment retries also use the rule file's judgment value, which can itself be an alias.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 816cdaa. Configure here.

@TeslaJarTran

Copy link
Copy Markdown
Author

Note for maintainers: the "Validate plugins" run is in action_required (fork PR approval needed). I ran the identical validator locally on this branch before pushing: node scripts/validate-plugins.mjs → "All plugins validated successfully." The branch contains the plugin at onprem/, its marketplace.json registration, and the README table row. Squash merge recommended. Author: Jarrod Tran (TeslaJarTran), plugin source https://github.com/TeslaJarTran/onprem.

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