@aotter/mantle 0.1.3-alpha.5 → 0.1.3

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.
Files changed (42) hide show
  1. package/README.md +11 -3
  2. package/dist/cli/main.d.ts +1 -1
  3. package/dist/cli/main.d.ts.map +1 -1
  4. package/dist/cli/main.js +3 -1
  5. package/dist/cli/main.js.map +1 -1
  6. package/dist/cli/skills.js +1 -1
  7. package/dist/cli/skills.js.map +1 -1
  8. package/dist/codegen/emitMantleModule.d.ts +8 -2
  9. package/dist/codegen/emitMantleModule.d.ts.map +1 -1
  10. package/dist/codegen/emitMantleModule.js +42 -12
  11. package/dist/codegen/emitMantleModule.js.map +1 -1
  12. package/docs/adr/0014-auth-better-auth-and-multi-tenant-mcp.md +2 -1
  13. package/docs/agent-prompts.md +6 -5
  14. package/docs/consumer-onboarding-audit.md +65 -0
  15. package/docs/handbook/cloudflare/authentication.md +16 -0
  16. package/docs/handbook/cloudflare/bindings.md +5 -3
  17. package/docs/handbook/cloudflare/deploy-and-operate.md +4 -0
  18. package/docs/handbook/concepts/mcp-and-agents.md +1 -1
  19. package/docs/handbook/concepts/runtime-and-adapters.md +1 -1
  20. package/docs/handbook/concepts/views.md +8 -7
  21. package/docs/handbook/guides/admin-ui.md +135 -0
  22. package/docs/handbook/guides/agent-setup.md +96 -0
  23. package/docs/handbook/guides/typed-queries.md +161 -0
  24. package/docs/handbook/navigation.json +24 -14
  25. package/docs/handbook/reference/features.md +55 -0
  26. package/docs/handbook/reference/manifest.md +3 -1
  27. package/docs/handbook/reference/schema.md +1 -1
  28. package/docs/handbook/reference/surface.md +2 -2
  29. package/docs/handbook/reference/view.md +8 -3
  30. package/docs/handbook/releases/index.md +45 -1
  31. package/docs/handbook/start/overview.md +52 -0
  32. package/docs/handbook/start/project-and-cli.md +2 -2
  33. package/docs/handbook/start/quickstart-worker.md +8 -3
  34. package/docs/performance-harness.md +7 -0
  35. package/docs/spec-only-host-adoption.md +1 -1
  36. package/package.json +17 -17
  37. package/skills/README.md +5 -1
  38. package/skills/develop/SKILL.md +19 -2
  39. package/skills/install/SKILL.md +23 -3
  40. package/skills/plugin/SKILL.md +17 -5
  41. package/skills/theme/SKILL.md +8 -1
  42. package/skills/update/SKILL.md +7 -2
@@ -17,10 +17,54 @@ stable candidate cut from `main`. Installing a prerelease means opting into an
17
17
  exact version, not a channel. [GitHub Releases](https://github.com/aotter/mantle/releases)
18
18
  is the canonical, immutable change history; this chapter is the narrative one.
19
19
 
20
- All ten packages share a single version and are published together, so mixed
20
+ All eleven packages share a single version and are published together, so mixed
21
21
  versions across `@aotter/mantle*` are never a supported combination. Pin the
22
22
  version you install and upgrade the whole set at once.
23
23
 
24
+ ## 0.1.3 — 2026-09-23
25
+
26
+ 0.1.3 tightens the contract between Manifests, generated TypeScript, agent
27
+ skills and the optional Admin surface. To upgrade from 0.1.2, pin every
28
+ selected `@aotter/mantle*` package to `0.1.3`, refresh the lockfile, then run
29
+ `mantle generate`, `mantle skills` and the matching `--check` commands.
30
+
31
+ **Private and typed reads.** Views may use `surface: internal` to stay out of
32
+ REST, MCP, WebMCP, OpenAPI and Admin while remaining callable from host code.
33
+ Generated bindings type declarative View params and rows, expose typed indexed
34
+ field reads for Schemas, and can be emitted from an already compiled plan. SQL
35
+ Views remain SQLite-native and deliberately return an `unknown` row type.
36
+
37
+ **Safer View storage and validation.** Public declarative Views over publishing
38
+ Schemas always enforce published status. Native entry columns (`id`, `status`,
39
+ `version`, `createdAt`, `updatedAt`, `authorId`) are reserved consistently and
40
+ may be used in the supported View/index positions. SQL validation is confined
41
+ to declared Schema tables, and the local index harness now uses production-
42
+ shaped planner and fixture state instead of reporting an artificial pass.
43
+
44
+ **MCP and authorization.** Tool schemas have agent-shaped inputs and standard
45
+ read-only, destructive, open-world and idempotency annotations. Calls carry
46
+ expected-version data through optimistic concurrency checks, enforce the
47
+ caller gate, and can emit audit records keyed by a declared idempotency input.
48
+ OAuth provider extensions, account linking and sign-in-link flows are owned by
49
+ the extracted optional `@aotter/mantle-auth` package. Session cache keys bind
50
+ to the prepared store identity so replacing D1 cannot revive stale sessions.
51
+
52
+ **Admin and authoring.** Manifest `uiSchema` can select operational collection
53
+ columns/tabs, staff report search/filter/CSV fields and collection or row
54
+ actions. Native columns render correctly in lists, and operation dialogs reset
55
+ their optimistic-concurrency state between actions. The handbook now starts
56
+ with a task-oriented overview, a complete Manifest feature table, typed-query
57
+ and Admin-rendering guides, and an explicit skill-install → pinned SDK →
58
+ project-skill handoff. The CLI points to those installed, version-matched docs.
59
+
60
+ **Upgrade note.** Regeneration is required because generated bindings and
61
+ projected skills gained APIs and instructions. Applications that declared one
62
+ of the newly reserved native column names as business data must rename that
63
+ field before upgrading. Backend-specific D1/IndexedDB cost inspectors and
64
+ server-side soak budgets remain deferred to
65
+ [#1040](https://github.com/aotter/mantle/issues/1040); the conservative local
66
+ harness is a preflight, not production cost evidence.
67
+
24
68
  ## 0.1.2 — 2026-09-21
25
69
 
26
70
  The first stable release, and Mantle's first public one. Everything before it
@@ -0,0 +1,52 @@
1
+ ---
2
+ description: Choose a Mantle integration, discover manifest capabilities, and find tutorials, task guides, concepts and field-level reference.
3
+ ---
4
+ # Mantle handbook
5
+
6
+ Mantle turns YAML manifests into a validated runtime plan, typed TypeScript
7
+ bindings, and optional HTTP, MCP and Admin surfaces. Your application owns the
8
+ host, storage and frontend. Four atoms describe the contract: **Schema** stores
9
+ data, **View** reads it, **Procedure** acts on it, and **Trigger** binds an action
10
+ to HTTP, MCP or lifecycle events.
11
+
12
+ This handbook describes the SDK snapshot that carries it. For an installed
13
+ project, read `node_modules/@aotter/mantle/docs/handbook/`; a website or Git
14
+ branch can describe a different version. The [release index](../releases/index.md)
15
+ links published releases. A prerelease capability is not a promise that the
16
+ current npm `latest` contains it.
17
+
18
+ ## Start with your integration
19
+
20
+ | Goal | Start here | Result |
21
+ |---|---|---|
22
+ | Understand what manifests can express | [Manifest feature reference](../reference/features.md) | A capability-to-field map across the four atoms. |
23
+ | Validate manifests in an existing tool | [Spec-only adoption](../../spec-only-host-adoption.md) | Parse and link without Runtime, storage or a UI. |
24
+ | Embed Runtime in an existing host | [Runtime and adapters](../concepts/runtime-and-adapters.md), then [typed queries](../guides/typed-queries.md) | Bind your storage and call the generated API. |
25
+ | Build a local Cloudflare API | [Minimal Worker tutorial](./quickstart-worker.md) | A running public View and a verified HTTP response. |
26
+ | Add a staff console | [Local Admin tutorial](./quickstart-admin.md) | Email OTP, Admin assets and a local human workflow. |
27
+ | Build on ChatGPT Sites | [Sites integration](../sites/index.md) | Host-owned sign-in and deployment with Mantle content. |
28
+ | Work through a coding agent | [Skill installation and handoff](../guides/agent-setup.md) | Bootstrap skill, pinned package, then project-local instructions. |
29
+
30
+ Human authors can follow these pages directly; installing an agent skill is
31
+ optional. Do not start with `mantle generate` in an empty directory: author the
32
+ manifests and host first, then generate and validate.
33
+
34
+ ## Find the right kind of documentation
35
+
36
+ - **Tutorials** walk through a running minimal service or local Admin.
37
+ - **Task guides** explain typed queries, Admin customization and agent setup.
38
+ - **Concepts** explain the four atoms, runtime, lifecycle, authorization and transports.
39
+ - **Reference** lists accepted fields, defaults, restrictions and diagnostics.
40
+ - **Host guides** cover Cloudflare and Sites wiring and operations.
41
+ - **Examples** supply complete domain manifests and runnable host references.
42
+
43
+ The [project and CLI guide](./project-and-cli.md) describes file ownership and
44
+ the verification loop. The [examples hub](../examples/hub.md) helps select a
45
+ domain model. Use the [field reference](../reference/manifest.md) when checking
46
+ exact syntax; do not infer grammar from a UI screenshot.
47
+
48
+ ## Source
49
+
50
+ - [Core package](../../../packages/mantle/README.md)
51
+ - [Handbook navigation](../navigation.json)
52
+ - [Consumer skills](../../../skills/README.md)
@@ -5,7 +5,7 @@ description: The files you own in a Mantle project, every mantle and mantle-harn
5
5
 
6
6
  This page describes a directly authored Mantle project: which files are yours, what the installed CLI does to them, and the loop you run before every commit. Surfaces are optional — take only what you need. [The minimal Worker](./quickstart-worker.md) is Spec + adapter without Admin. [Local Admin](./quickstart-admin.md) is the opt-in Dev UI path when humans need a console.
7
7
 
8
- Cold start from GitHub or a marketplace host is the install skill, not this page:
8
+ Agents can bootstrap with the install skill; human authors can follow this guide directly. For installation paths and the pinned-package handoff, see [Agent setup](../guides/agent-setup.md):
9
9
 
10
10
  ```sh
11
11
  npx skills add aotter/mantle --skill install
@@ -77,7 +77,7 @@ It does not project skills, update packages, change styling, provision providers
77
77
  | `createMantle({ storage, handlers, ports })` | Prepares storage eagerly once and returns the typed binding. No caching or retry. |
78
78
  | `bindMantle(runtime)` | The same typed binding over a runtime whose lifecycle the host already owns. |
79
79
 
80
- The binding exposes `mantle.views.<lowerCamelName>()`, `mantle.procedures.<name>(input, ctx)`, `mantle.entries.<collection>.createDraft({ data, authorId })`, typed indexed field reads such as `mantle.entries.<collection>.findManyByDataField({ field, value, limit })`, and the underlying `mantle.runtime`. Generated property names are deterministic lower-camel identifiers; calls keep the authored wire names internally. Details are in [HTTP, MCP, CLI and packages](../reference/surface.md).
80
+ The binding exposes `mantle.views.<lowerCamelName>()`, `mantle.procedures.<name>(input, ctx)`, `mantle.entries.<collection>.createDraft({ data, authorId })`, typed indexed field reads such as `mantle.entries.<collection>.findManyByDataField({ field, value, limit })`, and the underlying `mantle.runtime`. Generated property names are deterministic lower-camel identifiers; calls keep the authored wire names internally. See [Typed queries](../guides/typed-queries.md) for internal Views and entry-reader examples. Details are in [HTTP, MCP, CLI and packages](../reference/surface.md).
81
81
 
82
82
  ## The daily loop
83
83
 
@@ -3,7 +3,7 @@ description: "Author a minimal Cloudflare Worker from scratch: one Schema, one p
3
3
  ---
4
4
  # Quickstart: a minimal Worker
5
5
 
6
- This page reproduces Core's API-only Worker reference as a from-scratch walkthrough. It is the embed / adapter path: View REST without Admin, Auth or a visitor frontend. Admin is opt-in when humans need a console — [Quickstart: local Admin](./quickstart-admin.md). Install every `@aotter/mantle*` package from the `latest` dist-tag; see [Versions](../reference/surface.md#versions).
6
+ This page reproduces Core's API-only Worker reference as a from-scratch walkthrough. It is the embed / adapter path: View REST without Admin, Auth or a visitor frontend. Admin is opt-in when humans need a console — [Quickstart: local Admin](./quickstart-admin.md). Resolve the intended release once and pin every `@aotter/mantle*` package to it; see [Versions](../reference/surface.md#versions).
7
7
 
8
8
  ## Prerequisites
9
9
 
@@ -13,7 +13,10 @@ This page reproduces Core's API-only Worker reference as a from-scratch walkthro
13
13
 
14
14
  ## 1. `package.json`
15
15
 
16
- Install every `@aotter/mantle*` package from the `latest` dist-tag and add the peers the Cloudflare adapter needs.
16
+ The `latest` entries below are bootstrap placeholders. Step 5 replaces both
17
+ with one exact version before the first build. For a prerelease evaluation,
18
+ select its exact version explicitly rather than mixing channels. The other
19
+ entries are the peers and tools used by this reference.
17
20
 
18
21
  ```json
19
22
  {
@@ -130,7 +133,9 @@ Both compatibility flags are required by the adapter. `MANTLE_AUTH_MODE` must be
130
133
  ## 5. Install, generate, validate, run
131
134
 
132
135
  ```sh
133
- pnpm install
136
+ # Resolve once; for a requested prerelease, set its exact version instead.
137
+ MANTLE_VERSION=$(pnpm view @aotter/mantle@latest version)
138
+ pnpm add --save-exact "@aotter/mantle@$MANTLE_VERSION" "@aotter/mantle-cloudflare@$MANTLE_VERSION"
134
139
  pnpm exec mantle generate
135
140
  pnpm exec mantle validate
136
141
  pnpm exec wrangler dev --local --ip 127.0.0.1 --port 8787
@@ -55,6 +55,13 @@ data-field predicate/order that does not use a declared Schema index.
55
55
  Projection alone does not require an index. `mantle validate` remains a pure
56
56
  correctness check; no performance grammar or manifest atom was added.
57
57
 
58
+ The fixture follows each Schema lifecycle: operational rows are immediately
59
+ published, while publishing Schemas contain both draft and published rows. The
60
+ harness deliberately does not run `ANALYZE` or `PRAGMA optimize`, so it cannot
61
+ turn an unprepared production plan into a local pass. This is a conservative
62
+ SQLite preflight, not proof of D1 rows-read, Worker CPU, or IndexedDB behavior;
63
+ measure those on the target backend before making a performance claim.
64
+
58
65
  Use the machine report in CI. It includes the compiled SQL and parameters,
59
66
  query-plan details, named indexes, scan/sort flags, result count, SQLite
60
67
  version, fixture row count, and required-failure summary.
@@ -6,7 +6,7 @@ Runtime. This Spec-only path is allowed by
6
6
  [ADR-0019](adr/0019-sealed-manifest-runtime-pipeline.md), not a new adapter,
7
7
  manifest grammar, or fork of Core.
8
8
 
9
- This recipe targets `0.1.3-alpha.5`. Pin the package, record the tested version, and
9
+ This recipe targets `0.1.3`. Pin the package, record the tested version, and
10
10
  rerun compatibility checks when upgrading.
11
11
 
12
12
  ## What stays with the host
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aotter/mantle",
3
- "version": "0.1.3-alpha.5",
3
+ "version": "0.1.3",
4
4
  "description": "Embeddable Mantle Core umbrella with Spec and Runtime; Web, Admin, Auth, Bun, Vercel, Cloudflare, and Admin UI are optional peer packages.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://mantle.tools/",
@@ -83,8 +83,8 @@
83
83
  "README.md"
84
84
  ],
85
85
  "dependencies": {
86
- "@aotter/mantle-runtime": "0.1.3-alpha.5",
87
- "@aotter/mantle-spec": "0.1.3-alpha.5"
86
+ "@aotter/mantle-runtime": "0.1.3",
87
+ "@aotter/mantle-spec": "0.1.3"
88
88
  },
89
89
  "peerDependencies": {
90
90
  "aws4fetch": "^1.0.20",
@@ -92,13 +92,13 @@
92
92
  "hono": "^4.12.0",
93
93
  "@libsql/client": "^0.17.4",
94
94
  "zod": "^4.5.0",
95
- "@aotter/mantle-admin": "0.1.3-alpha.5",
96
- "@aotter/mantle-auth": "0.1.3-alpha.5",
97
- "@aotter/mantle-bun": "0.1.3-alpha.5",
98
- "@aotter/mantle-admin-ui": "0.1.3-alpha.5",
99
- "@aotter/mantle-vercel": "0.1.3-alpha.5",
100
- "@aotter/mantle-cloudflare": "0.1.3-alpha.5",
101
- "@aotter/mantle-web": "0.1.3-alpha.5"
95
+ "@aotter/mantle-admin": "0.1.3",
96
+ "@aotter/mantle-admin-ui": "0.1.3",
97
+ "@aotter/mantle-bun": "0.1.3",
98
+ "@aotter/mantle-auth": "0.1.3",
99
+ "@aotter/mantle-web": "0.1.3",
100
+ "@aotter/mantle-cloudflare": "0.1.3",
101
+ "@aotter/mantle-vercel": "0.1.3"
102
102
  },
103
103
  "peerDependenciesMeta": {
104
104
  "@aotter/mantle-admin": {
@@ -144,13 +144,13 @@
144
144
  "typescript": "^6.0.3",
145
145
  "vitest": "^4.1.11",
146
146
  "zod": "^4.5.4",
147
- "@aotter/mantle-admin-ui": "0.1.3-alpha.5",
148
- "@aotter/mantle-auth": "0.1.3-alpha.5",
149
- "@aotter/mantle-bun": "0.1.3-alpha.5",
150
- "@aotter/mantle-admin": "0.1.3-alpha.5",
151
- "@aotter/mantle-cloudflare": "0.1.3-alpha.5",
152
- "@aotter/mantle-web": "0.1.3-alpha.5",
153
- "@aotter/mantle-vercel": "0.1.3-alpha.5"
147
+ "@aotter/mantle-admin-ui": "0.1.3",
148
+ "@aotter/mantle-admin": "0.1.3",
149
+ "@aotter/mantle-auth": "0.1.3",
150
+ "@aotter/mantle-bun": "0.1.3",
151
+ "@aotter/mantle-cloudflare": "0.1.3",
152
+ "@aotter/mantle-vercel": "0.1.3",
153
+ "@aotter/mantle-web": "0.1.3"
154
154
  },
155
155
  "engines": {
156
156
  "node": ">=22"
package/skills/README.md CHANGED
@@ -75,7 +75,11 @@ codex plugin marketplace add aotter/mantle
75
75
  codex plugin add mantle@mantle
76
76
  ```
77
77
 
78
- Then follow the install skill to the CLI and handbook. After packages are
78
+ Read the path printed by the installer (for project-local Codex,
79
+ `.agents/skills/install/SKILL.md`). Only the selected brief is installed, not
80
+ the SDK or handbook. After choosing and installing an exact SDK version, read
81
+ `node_modules/@aotter/mantle/skills/install/SKILL.md` and its embedded docs;
82
+ that package supersedes the bootstrap Git-ref instructions. After packages are
79
83
  installed, `mantle skills` projects the installed package's own skills into the
80
84
  project, and `mantle skills --check` fails on drift.
81
85
 
@@ -17,8 +17,9 @@ docs govern runtime/API behavior.
17
17
  ## First Read
18
18
 
19
19
  1. `package.json` for the installed `@aotter/mantle*` versions.
20
- 2. `manifests/site.yaml`, the active adapter config (`wrangler.jsonc`), and
21
- the Worker entry. Custom Auth lives in that entry's `createAuth` factory.
20
+ 2. The manifest directory selected by the project scripts, the actual host
21
+ entry and adapter config (for example `wrangler.jsonc` on Cloudflare).
22
+ Read custom Auth construction there when present.
22
23
  3. Optional local context: `.mantle/plugins.json`, `.mantle/plugins.lock.json`,
23
24
  and `.mantle/recipes/`. Legacy launch/handoff files are context only.
24
25
  4. Installed Core docs in `node_modules/@aotter/mantle/docs/`.
@@ -75,6 +76,22 @@ Do not invent manifest kinds such as `Form`, `Feature`, `Workflow`, or
75
76
  `Membership`. Compose those from the four atoms plus TypeScript only where
76
77
  the atoms cannot express the behavior.
77
78
 
79
+ ## Choose the manifest feature first
80
+
81
+ Read installed `docs/handbook/reference/features.md` to map the requested
82
+ behavior to fields before adding handlers or a custom UI. For host-only reads,
83
+ `surface: internal` keeps a View out of REST/MCP/Admin while preserving its
84
+ `requires` checks. Read `docs/handbook/guides/typed-queries.md` for generated
85
+ View params/results, indexed entry reads, and their authorization boundary.
86
+ Use `from` for portable typed projections; SQL is for queries needing native
87
+ SQLite and produces `unknown` row types.
88
+
89
+ For Admin labels, inputs, collection columns/tabs, reports or action buttons,
90
+ read `docs/handbook/guides/admin-ui.md`. Prefer supported Schema/Procedure/View
91
+ metadata and `uiSchema` before custom frontend code. These control the Admin
92
+ console, not the visitor frontend. Regenerate and verify the actual console;
93
+ never edit generated `public/_mantle/admin/` assets.
94
+
78
95
  ## Content Edits
79
96
 
80
97
  - Follow the actual frontend content source. Use Admin or Staff MCP for
@@ -16,6 +16,23 @@ provider configuration. There is no Starter/type picker or `mantle create`.
16
16
  Do not use the SDK checkout as the application, copy an old Starter tree, or
17
17
  turn `generate` into implicit scaffolding.
18
18
 
19
+ ## Locate the version-matched instructions
20
+
21
+ `npx skills add aotter/mantle --skill install` installs this brief, not the SDK,
22
+ a project, or the handbook. Read the path printed by the installer (Codex's
23
+ project-local path is `.agents/skills/install/SKILL.md`); `metadata.sourcePath`
24
+ is repository provenance, not a consumer path. A repository install follows
25
+ the selected Git ref and does not pin an npm release.
26
+
27
+ After selecting the host and exact version, install `@aotter/mantle` locally
28
+ with the selected optional packages. All `docs/...` paths below then mean
29
+ `node_modules/@aotter/mantle/docs/...`; package skills are under
30
+ `node_modules/@aotter/mantle/skills/`. Read that package's
31
+ `skills/install/SKILL.md` before authoring: it supersedes this bootstrap copy.
32
+ If the user requested a prerelease, resolve that channel explicitly; `latest`
33
+ need not contain prerelease features. Never mix versioned npm code with branch
34
+ docs. No local CLI exists until the package is installed.
35
+
19
36
  ## New application
20
37
 
21
38
  1. Determine the actual host and required surfaces from the request. Reuse an
@@ -30,8 +47,9 @@ turn `generate` into implicit scaffolding.
30
47
  version. Install only the adapter/optional packages the application needs.
31
48
  If a global scope registry overrides public npmjs, use a project-owned
32
49
  `.npmrc` with `@aotter:registry=https://registry.npmjs.org/`.
33
- 3. Interview the human for host and required surfaces. Do not assume Admin,
34
- public HTML or Cloudflare. Scale:
50
+ 3. Use the host and surfaces already established in step 1; ask only for
51
+ information still missing. Read `docs/handbook/start/overview.md` and
52
+ `docs/handbook/reference/features.md`, then select the matching path:
35
53
  - Spec + generate / embed Runtime — `docs/handbook/start/project-and-cli.md`.
36
54
  - Adapter without Admin — `docs/examples/host-minimal-worker/`.
37
55
  - Opt-in Admin / Dev UI — only when a human needs a console: interview
@@ -108,7 +126,9 @@ a bundle comparison command.
108
126
 
109
127
  ## Ship and report
110
128
 
111
- When deployment is requested, follow the installed provision skill and the
129
+ When deployment is requested, read
130
+ `node_modules/@aotter/mantle/skills/provision/SKILL.md` (not projected by
131
+ `mantle skills`) and follow that version-matched skill and the
112
132
  observed host configuration. Legacy Landing remains a pre-stable product; it
113
133
  is not a launch dependency for new Core projects.
114
134
 
@@ -50,11 +50,17 @@ stop and ask for the recipe instead of guessing.
50
50
  ## First Read
51
51
 
52
52
  1. `package.json` for Mantle version and adapter package.
53
- 2. `manifests/site.yaml` for current atom names and route/tool collisions.
54
- 3. `src/mantle/config.ts` and `src/mantle/handlers/` for registered handlers, templates, and optional ports. Older projects may use `src/mantleConfig.ts`.
53
+ 2. The manifest directory selected by project scripts for current atom names
54
+ and route/tool collisions.
55
+ 3. The actual host entry and its handler, template and port registrations;
56
+ `src/mantle/config.ts` and `src/mantle/handlers/` are conventions, not required paths.
55
57
  4. `.mantle/plugins.json` and `.mantle/plugins.lock.json` if present.
56
58
  5. `.mantle/launch-state.json` only as context, not as plugin authority.
57
59
 
60
+ Read version-matched contracts under `node_modules/@aotter/mantle/docs/`,
61
+ starting with `handbook/reference/features.md`. Plugin recipes cannot override
62
+ the installed grammar.
63
+
58
64
  ## Plan First
59
65
 
60
66
  Before applying any plugin, produce a plan:
@@ -100,14 +106,20 @@ and report the dependency instead of deleting through it.
100
106
 
101
107
  ## Verify
102
108
 
109
+ Use the project's validation and typecheck scripts when present. Regenerate
110
+ the plan after manifest changes before probing the running host:
111
+
103
112
  ```bash
104
- pnpm validate
105
- pnpm typecheck
113
+ pnpm exec mantle validate
114
+ pnpm exec mantle generate
115
+ pnpm exec mantle generate --check
116
+ # Run the project's TypeScript check and restart its local server.
106
117
  ```
107
118
 
108
119
  Then verify the plugin's declared surfaces:
109
120
 
110
- - `GET /api/views/<name>` for View reads;
121
+ - public Views via `GET /api/views/<name>`, staff Views via authenticated
122
+ Admin/staff MCP, and internal Views through the host binding;
111
123
  - HTTP Trigger path for public writes;
112
124
  - Staff/Public MCP `tools/list` for MCP Trigger or Schema-derived tools;
113
125
  - adapter resource presence when the plugin requires optional ports.
@@ -13,13 +13,20 @@ metadata:
13
13
  Theme work is project-owned source editing. Use the actual frontend and its
14
14
  tokens/recipes; Core does not install a default home page or UI tree.
15
15
 
16
+ For requests to change the Admin console, first read installed
17
+ `node_modules/@aotter/mantle/docs/handbook/guides/admin-ui.md` and use the
18
+ develop skill. Labels, widgets, list columns, filters and actions may already
19
+ be manifest-driven. Visitor CSS does not style the prebuilt Admin SPA, and
20
+ `uiSchema` does not accept arbitrary CSS, components or layout keys.
21
+
16
22
  ## First Read
17
23
 
18
24
  1. `.mantle/handoff.md` and `.mantle/recipes/` if present.
19
25
  2. `styles/`, `components/`, `src/web/`, `src/theme*`, and UI-library config
20
26
  if present.
21
27
  3. A vendored UI palette's manifest and license, if present.
22
- 4. `manifests/site.yaml` to understand which content shape drives the public UI.
28
+ 4. The manifest directory selected by project scripts to understand which
29
+ content shape drives the public UI.
23
30
 
24
31
  ## Ownership
25
32
 
@@ -17,8 +17,10 @@ skill remains the version-matched upgrade workflow, not a replacement CLI.
17
17
  1. Inspect git status, package.json, lockfile, actual project scripts and
18
18
  installed versions. Preserve unrelated local changes. Read plugin locks
19
19
  and legacy `.mantle` metadata if present; they are context, not required.
20
- 2. Select an explicit target release and read its entry in
21
- `docs/handbook/releases/index.md` plus that version's GitHub release notes.
20
+ 2. Select an explicit target release and read that version's GitHub release
21
+ notes. Installed docs live under `node_modules/@aotter/mantle/docs/`;
22
+ `handbook/releases/index.md` is a stable-release index, so a prerelease
23
+ need not appear there. Do not use the old package's docs as the new API contract.
22
24
  Do not resolve new Starter refs or compare the project to a baseline
23
25
  template.
24
26
  3. Update only selected `@aotter/mantle*` dependencies to the same exact target
@@ -39,6 +41,9 @@ pnpm exec mantle skills --check
39
41
  pnpm exec mantle validate
40
42
  ```
41
43
 
44
+ Read the refreshed `mantle-develop` skill and the upgraded package's embedded
45
+ docs before continuing application edits.
46
+
42
47
  Start the local application and test its actual routes, including configured
43
48
  auth behavior. Review the final source/lockfile/generated diff; unexpected
44
49
  provider or user-source changes block completion. Provider credentials must