The Stack's architecture — which page to read before touching a message, handler, entity, migration, tenancy, permission, screen, Ns* component, test, React client, localization key or project layout. Use before editing code that builds on the Stack, when a CLAUDE.md routes the Stack's doctrine, or when asked how the Stack wants something done.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Doctrine?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nsail-ar-doctrine)
---
name: doctrine
description: The Stack's architecture — which page to read before touching a message, handler, entity, migration, tenancy, permission, screen, Ns* component, test, React client, localization key or project layout. Use before editing code that builds on the Stack, when a CLAUDE.md routes the Stack's doctrine, or when asked how the Stack wants something done.
---
# The Stack's doctrine
The architecture is strict and it is written down. Read the page for the area you are about to
touch before you edit anything — you are not expected to read all of it, you are expected to
read your row. Every page is a file of this plugin, under `${CLAUDE_PLUGIN_ROOT}/doctrine/`.
| You are touching | Read first |
|---|---|
| Anything at all | `${CLAUDE_PLUGIN_ROOT}/doctrine/principles.md` |
| A `.razor`, an `Ns*` component, `ns-mud.css`, a screen | `${CLAUDE_PLUGIN_ROOT}/doctrine/intentional-ui.md` — the rules; it routes to `${CLAUDE_PLUGIN_ROOT}/doctrine/ui/README.md` for a component's own contract (a screen that still reads outside `NsLoad`: the `convert-to-nsload` skill) |
| A message, a handler, an endpoint, an HTTP client | `${CLAUDE_PLUGIN_ROOT}/doctrine/messaging.md` + `${CLAUDE_PLUGIN_ROOT}/doctrine/generation.md` (the `new-message` skill walks it) |
| An entity, `DbContextSetup`, a migration, a seed, the mapper | `${CLAUDE_PLUGIN_ROOT}/doctrine/data.md` (the `new-mapping` skill walks the mapper) |
| Tenancy, the row policies, the org filter, tenant ids, background jobs | `${CLAUDE_PLUGIN_ROOT}/doctrine/data-tenancy.md` |
| Classifying an entity or a message against the org axis | the codebase's own org map — the law is `${CLAUDE_PLUGIN_ROOT}/doctrine/data-tenancy.md` (The org is the other axis); the map of a codebase's entities and messages lives with them (in nsail, the `plugins/nsail-kits/doctrine/org-map.md`) |
| A new type, project, namespace or folder | `${CLAUDE_PLUGIN_ROOT}/doctrine/structure.md` + `${CLAUDE_PLUGIN_ROOT}/doctrine/naming.md` |
| Authorization, policies, `Session` | `${CLAUDE_PLUGIN_ROOT}/doctrine/permissions.md` |
| Localization keys, Swagger tags, `{Area}.{Feature}` | `${CLAUDE_PLUGIN_ROOT}/doctrine/metadata.md` |
| `Program.cs`, `Setup.cs`, host bootstrap | `${CLAUDE_PLUGIN_ROOT}/doctrine/baseservices.md` |
| `Problem`, paging, shared primitives | `${CLAUDE_PLUGIN_ROOT}/doctrine/types.md` |
| A list that exports, the table model, a writer, a column's format | `${CLAUDE_PLUGIN_ROOT}/doctrine/exporting.md` |
| An object to put, get, list or delete, a storage provider, the storage settings screen | `${CLAUDE_PLUGIN_ROOT}/doctrine/storage.md` |
| A test, a harness, a `*.Tests` project | `${CLAUDE_PLUGIN_ROOT}/doctrine/testing.md` (the `test-harness` skill walks it) |
| A React client, an `@nsail/*` package, `sdk.ts` | `${CLAUDE_PLUGIN_ROOT}/doctrine/react.md` |
| A glyph a screen needs that no catalog carries | the `new-icon` skill |
| A kit's playbook for the Assistant, `ISkillContributor`, `Skills.cs` | `${CLAUDE_PLUGIN_ROOT}/doctrine/ui/skills.md` |
| Spanish copy — a `strings.es.json` string, a word for money or a payment | `${CLAUDE_PLUGIN_ROOT}/doctrine/ui/copy.md` |
| Deciding whether to write the code at all | `${CLAUDE_PLUGIN_ROOT}/doctrine/lesscode.md` |
The pages name files of the codebase they were written against: `src/Stack/...` and
`test/Stack/...` are this Stack's own repository; a path under `src/Kits` or `src/Apps` is an
example from a product built on it.