In short.
Type System Discipline is a pstack skill for developers using AI coding assistants, but it cannot enforce safer types on its own. It gives concrete rules for preventing contradictory states, mixing up identifiers, trusting unparsed input and overlooking new variants. Its useful restraint is to strengthen types where operations can otherwise fail, rather than modeling every detail. Installation, host compatibility and effectiveness are not established by execution evidence.
Researched and written by an AI model and checked by a second AI model. How it works
Covers marketplace/production-catalog/bundles/pstack/skills/principle-type-system-discipline at OpenBot revision fd92b08ffbb9af899c626d76603054807022d6bd. The supplied complete selected scope contains one SKILL.md. Related evidence includes the pstack LICENSE and NOTICE.md and the repository-root LICENSE and NOTICE. Other skills, agents, the OpenBot application and optional runtimes are outside this scope. The upstream plugin manifest, README, docs, assets and automations are described as excluded from the imported bundle. No code was executed; installation, activation, compilation, compatibility and effectiveness remain unassessed.
The overview
Identity
The resource is the principle-type-system-discipline SKILL.md inside the pstack bundle distributed in nightly-labs/openbot. It contains instructions for an assistant designing types, reviewing function signatures or writing code in statically typed languages.
The pstack notice attributes the bundle to Lauren Tan and identifies upstream version 0.15.20. It says the skills and agents were copied unchanged from cursor/plugins commit 1b6d44ff26d4e242f4e8f68c391e6d2f7ca16def. That is a bundle version, not a separately declared version of this skill.
Assessment
The skill offers a focused checklist for code where valid combinations of values matter. Its examples explain why a task status should require its completion timestamp and why two identifiers should remain distinct even when both are stored as strings.
A useful feature is its stopping rule: strengthen a type when an operation can otherwise lack a valid result or require an assertion. This helps balance safety against unnecessary complexity. Whether an assistant follows these rules consistently, or whether they reduce defects in practice, is unknown.
Users
Developers who use AI assistants for implementation or code review are the clearest audience. Beginners get concrete examples of preventing invalid states; experienced developers get reminders about domain modeling, schema ownership and compiler-enforced handling of alternatives.
The guidance applies across statically typed languages, with examples or techniques from TypeScript, Rust, Haskell and Kotlin. Readers still need enough familiarity with their language to translate the principles into suitable types, parsers and compiler settings.
Capabilities
The instructions cover modeling alternatives as discriminated unions or equivalent language features, constructing values so invalid combinations cannot arise, and distinguishing semantic primitives such as UserId and OrderId. They also call for parsing external data before treating it as typed.
Further guidance addresses unsafe casts and assertions, exhaustive handling of variants, deriving types from authoritative schemas, and strengthening types only where an operation would otherwise be undefined or fail. These are instructions for producing and reviewing code; the file contains no executable checker.
Using it
Requirements
Using the file as an assistant skill requires a host that can load its SKILL.md format. Supported hosts, model requirements, installation paths and invocation commands are not specified. The metadata sets disable-model-invocation: true, so automatic activation should not be assumed.
Applying the advice requires suitable language features and compiler behavior. External inputs still need actual parsing or validation: giving an identifier a distinct type does not establish that an incoming value is valid. Three companion skills are referenced, but their contents are not included here.
Mechanism
The skill guides an assistant to move correctness rules into data construction and function signatures. Instead of accepting loose values and repeatedly checking them later, code should establish validity when values enter the typed model and preserve it through subsequent operations.
For variants, it recommends compiler-enforced exhaustive matching so adding a case reveals missing handlers. For shared structures, it recommends deriving types from the file or schema that owns the definition. Enforcement depends on the resulting implementation and compiler configuration.
Setup
The captured artifact is available at [https://raw.githubusercontent.com/nightly-labs/openbot/fd92b08ffbb9af899c626d76603054807022d6bd/marketplace/production-catalog/bundles/pstack/skills/principle-type-system-discipline/SKILL.md]. Use the chosen assistant host's documented skill-loading procedure; this file does not provide one.
Before relying on activation, confirm how the host interprets disable-model-invocation: true. The instructions refer to typescript-best-practices, boundary-discipline and encode-lessons-in-structure for related detail, but do not provide installation instructions for those resources.
Example
The skill shows that { completed: boolean; completedAt?: Date } permits a completed task without a timestamp. Its alternative, { kind: 'open' } | { kind: 'done'; at: Date }, makes the timestamp part of the done variant. Another suggested approach is deriving the completion boolean from completedAt.
It also distinguishes operations on lists: summing an empty list has the valid result zero, while taking its first element has no answer. The proposed non-empty representation is a head plus a remaining list, so only the operation that needs an element requires the stronger type. These are source illustrations; no compilation results are available.
Assessment & evidence
Limitations
The selected folder supplies guidance rather than validators, schema generators or compiler configuration. It does not demonstrate a complete project integration. Host compatibility, assistant adherence and resulting code correctness are unassessed.
The advice requires judgment. A distinct identifier type still needs validation at creation, exhaustive matching depends on language behavior and settings, and deriving types requires an authoritative schema to exist. The referenced companion skills are unavailable in the supplied content, leaving some implementation detail unresolved.
Reasoning
The proposed benefit follows from reducing what callers can express incorrectly. A done variant that requires a timestamp removes one contradictory state; separate identifier types can expose accidental argument swaps; exhaustive matching can reveal forgotten cases when a variant is added.
The boundary-parsing rule complements static typing by treating incoming data as untrusted until validated. These mechanisms explain why the guidance may help, but the evidence supplies no measured defect reduction, productivity improvement or comparative benchmark.
Alternatives
A developer could apply the same principles manually during design and code review, using compiler diagnostics to assess the resulting implementation. Loading the text into an assistant is not necessary to read or apply its checklist.
For narrower supporting guidance, the file points to typescript-best-practices for TypeScript syntax, boundary-discipline for validation placement and encode-lessons-in-structure for authoritative definitions. Their contents and comparative usefulness are unknown because those files are not supplied.
Evidence
The supplied selected artifact is a 3,661-byte SKILL.md at OpenBot revision fd92b08ffbb9af899c626d76603054807022d6bd, with recorded SHA-256 2e492cef34bb25a20b9115df61f9ef3a9837e3fda144ffda8079e5f45a1b72e8. Its content supports the described principles and examples, rather than operational performance claims.
The bundle NOTICE identifies its original upstream source as [https://github.com/cursor/plugins/tree/1b6d44ff26d4e242f4e8f68c391e6d2f7ca16def/pstack]. The statement that skills were copied unchanged comes from that notice; an independent upstream comparison is not established. Bundle and root license notices provide the supplied attribution and rights context.
Access & freshness
Costs
The pstack bundle's MIT license permits use and redistribution without a license fee under its notice conditions. The skill names no required paid model, API or subscription. Any assistant-host charges, model usage costs or support fees are unknown.
The OpenBot root notices provide a commercial licensing contact for that application, but no price. That separate licensing context does not establish a cost for using this MIT-licensed pstack skill.
Rights
The pstack-specific LICENSE is MIT, copyright 2026 Lauren Tan. It permits use, modification, redistribution and sale, subject to including its copyright and permission notice in copies or substantial portions. The adjacent NOTICE identifies the upstream source and says the skill files were copied unchanged.
The OpenBot repository root separately carries PolyForm Noncommercial License 1.0.0 and a commercial licensing contact. Its NOTICE also identifies third-party components and separately licensed optional provider runtimes. The pstack MIT terms should not be generalized to the whole OpenBot application or those runtimes.
Freshness
The supplied snapshot was captured on 16 November 2026 at 22:48:46.311 UTC and is pinned to OpenBot commit fd92b08ffbb9af899c626d76603054807022d6bd. The pstack notice identifies upstream version 0.15.20 and its source commit.
The skill declares no separate release date or version. Its latest modification date, maintenance cadence and changes after the captured revision are unknown. The capture timestamp establishes when the snapshot was retained, not when the skill was last maintained.
Actions
Start with one type-design problem, such as contradictory task states or interchangeable identifiers. Ask the assistant to apply the relevant principle, then inspect the resulting types, boundary validation and compiler diagnostics. Confirm host invocation behavior before assuming the skill is active.
For broader adoption, identify the authoritative schemas and exhaustiveness settings used by the project, and obtain any companion guidance needed for the language. Preserve the pstack MIT copyright and permission notice when copying or redistributing the skill.
