@aotter/mantle 0.1.3-alpha.6 → 0.1.4
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.
- package/README.md +5 -5
- package/dist/cli/main.d.ts +1 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +4 -2
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/skills.js +2 -2
- package/dist/cli/skills.js.map +1 -1
- package/docs/adr/0001-four-atom-manifest-model.md +3 -2
- package/docs/adr/0013-agent-provisioned-consumer-projects.md +4 -4
- package/docs/adr/0016-site-semantic-layer.md +5 -4
- package/docs/adr/0018-core-starters-repository-boundary.md +1 -1
- package/docs/adr/README.md +2 -2
- package/docs/agent-prompts.md +10 -8
- package/docs/assets/mantle-admin-developer.png +0 -0
- package/docs/consumer-onboarding-audit.md +65 -0
- package/docs/examples/README.md +1 -1
- package/docs/examples/host-chatgpt-sites/README.md +29 -12
- package/docs/examples/host-chatgpt-sites/drizzle/0003_store_instance_id.sql +1 -0
- package/docs/examples/host-chatgpt-sites/drizzle/meta/_journal.json +1 -1
- package/docs/examples/host-chatgpt-sites/public/site.css +1 -1
- package/docs/examples/host-chatgpt-sites/scripts/build.mjs +2 -1
- package/docs/examples/host-chatgpt-sites/scripts/check.mjs +2 -0
- package/docs/examples/host-chatgpt-sites/src/index.ts +1 -1
- package/docs/examples/host-chatgpt-sites/src/web.ts +1 -1
- package/docs/examples/host-minimal-worker/README.md +5 -5
- package/docs/handbook/{sites → chatgpt-sites}/equipment-checkout.md +1 -1
- package/docs/handbook/{sites → chatgpt-sites}/index.md +15 -3
- package/docs/handbook/cloudflare/authentication.md +16 -0
- package/docs/handbook/cloudflare/chatgpt-sites.md +6 -6
- package/docs/handbook/cloudflare/deploy-and-operate.md +3 -2
- package/docs/handbook/cloudflare/media-r2.md +2 -2
- package/docs/handbook/concepts/four-atoms.md +1 -1
- package/docs/handbook/concepts/lifecycle-and-locales.md +1 -1
- package/docs/handbook/concepts/mcp-and-agents.md +25 -5
- package/docs/handbook/concepts/procedures-and-triggers.md +1 -1
- package/docs/handbook/concepts/runtime-and-adapters.md +2 -2
- package/docs/handbook/concepts/views.md +9 -8
- package/docs/handbook/guides/admin-ui.md +135 -0
- package/docs/handbook/guides/agent-setup.md +97 -0
- package/docs/handbook/guides/typed-queries.md +161 -0
- package/docs/handbook/navigation.json +28 -18
- package/docs/handbook/reference/features.md +55 -0
- package/docs/handbook/reference/manifest.md +3 -1
- package/docs/handbook/reference/schema.md +1 -1
- package/docs/handbook/reference/surface.md +1 -1
- package/docs/handbook/reference/view.md +4 -2
- package/docs/handbook/releases/index.md +71 -2
- package/docs/handbook/start/overview.md +52 -0
- package/docs/handbook/start/project-and-cli.md +7 -7
- package/docs/handbook/start/quickstart-worker.md +8 -6
- package/docs/release-process.md +3 -2
- package/docs/sealed-pipeline-ownership.md +1 -1
- package/docs/skills/develop/SKILL.md +250 -0
- package/docs/skills/media-gc/SKILL.md +85 -0
- package/docs/skills/plugin/SKILL.md +132 -0
- package/docs/skills/provision/SKILL.md +194 -0
- package/docs/skills/theme/SKILL.md +77 -0
- package/docs/skills/update/SKILL.md +51 -0
- package/docs/spec-only-host-adoption.md +1 -1
- package/package.json +18 -18
- package/skills/README.md +30 -21
- package/skills/develop/SKILL.md +21 -4
- package/skills/install/SKILL.md +40 -8
- package/skills/media-gc/SKILL.md +2 -2
- package/skills/plugin/SKILL.md +19 -7
- package/skills/provision/SKILL.md +3 -3
- package/skills/theme/SKILL.md +10 -3
- package/skills/update/SKILL.md +9 -4
- package/skills/.keep +0 -0
- /package/docs/handbook/{sites → chatgpt-sites}/host-reference.md +0 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: theme
|
|
3
|
+
description: Apply brand and visual direction in a Mantle application using its repo-owned theme and UI contracts.
|
|
4
|
+
metadata:
|
|
5
|
+
source: "@aotter/mantle"
|
|
6
|
+
sourcePath: docs/skills/theme/SKILL.md
|
|
7
|
+
applies_to: mantle grammar v0.1
|
|
8
|
+
projection: project
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Mantle Theme
|
|
12
|
+
|
|
13
|
+
Theme work is project-owned source editing. Use the actual frontend and its
|
|
14
|
+
tokens/recipes; Core does not install a default home page or UI tree.
|
|
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
|
+
|
|
22
|
+
## First Read
|
|
23
|
+
|
|
24
|
+
1. `.mantle/handoff.md` and `.mantle/recipes/` if present.
|
|
25
|
+
2. `styles/`, `components/`, `src/web/`, `src/theme*`, and UI-library config
|
|
26
|
+
if present.
|
|
27
|
+
3. A vendored UI palette's manifest and license, if present.
|
|
28
|
+
4. The manifest directory selected by project scripts to understand which
|
|
29
|
+
content shape drives the public UI.
|
|
30
|
+
|
|
31
|
+
## Ownership
|
|
32
|
+
|
|
33
|
+
- Use the actual token contract (for example `styles/globals.css`) when present.
|
|
34
|
+
Check its light/dark values before changing components.
|
|
35
|
+
- `components/` is the runtime-facing component surface when present.
|
|
36
|
+
`src/web/` is project-owned composition; put new sections there.
|
|
37
|
+
- `public/site-icon.svg` and `public/site-icon.png` are one site identity.
|
|
38
|
+
Keep both listed in the actual entry/config `siteDefaults.icons`: PNG first as
|
|
39
|
+
the 64x64 compatibility rendition, then SVG as the editable `any` size source.
|
|
40
|
+
The same list drives browser favicons, Admin chrome, and MCP
|
|
41
|
+
`serverInfo.icons`; do not edit generated files under `public/_mantle/`.
|
|
42
|
+
- If the project includes a vendored UI reference palette, treat it as
|
|
43
|
+
offline source material and provenance, not runtime source. Copy only a
|
|
44
|
+
needed primitive or block into the project's runtime directories, or
|
|
45
|
+
fork/wrap it under `src/web/sections/`; do not import the palette from
|
|
46
|
+
Worker or runtime code.
|
|
47
|
+
|
|
48
|
+
## Work
|
|
49
|
+
|
|
50
|
+
- Use existing tokens, CSS, components, and installed dependencies first.
|
|
51
|
+
- When replacing the site mark, regenerate PNG from the same SVG artwork so
|
|
52
|
+
every surface presents the same identity. Check it at the Admin's 28px slot
|
|
53
|
+
in both light and dark themes; a single high-contrast rendition is preferred
|
|
54
|
+
over theme-specific variants unless the artwork genuinely needs both.
|
|
55
|
+
- For a standard hero image, set the section's `image: { src, alt }`; use
|
|
56
|
+
`showImage: false` for text-only hero/content blocks. Put non-image media in
|
|
57
|
+
a project-owned section.
|
|
58
|
+
- Keep accessibility basics: semantic HTML, focus states, contrast, and
|
|
59
|
+
keyboard reachability. Against a non-default background, check
|
|
60
|
+
`--foreground-muted` and `--primary`, not only `--foreground`; keep normal
|
|
61
|
+
text at 4.5:1 or better.
|
|
62
|
+
- Do not require registry access for a project that already vendors UI source.
|
|
63
|
+
- Add UI dependencies only when existing source cannot cover the requested
|
|
64
|
+
change.
|
|
65
|
+
|
|
66
|
+
## Check
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
pnpm validate
|
|
70
|
+
pnpm typecheck
|
|
71
|
+
pnpm dev
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
If utility classes changed, rebuild `styles/generated.css` with the project's
|
|
75
|
+
`build:styles`, `check`, or `dev` script. Remove routes/imports for replaced
|
|
76
|
+
assets or styles, then visually verify light/dark contrast and responsive
|
|
77
|
+
behavior before calling the work done.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: update
|
|
3
|
+
description: Review and upgrade Mantle SDK dependencies and project-local skills while preserving application source, provider identities and plugin lockfiles.
|
|
4
|
+
metadata:
|
|
5
|
+
source: "@aotter/mantle"
|
|
6
|
+
sourcePath: docs/skills/update/SKILL.md
|
|
7
|
+
applies_to: mantle grammar v0.1
|
|
8
|
+
projection: project
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Mantle Update
|
|
12
|
+
|
|
13
|
+
Upgrade SDK dependencies deliberately; never overwrite application-owned code.
|
|
14
|
+
The old Starter bundle comparison command `mantle update` is removed. This
|
|
15
|
+
skill remains the version-matched upgrade workflow, not a replacement CLI.
|
|
16
|
+
|
|
17
|
+
1. Inspect git status, package.json, lockfile, actual project scripts and
|
|
18
|
+
installed versions. Preserve unrelated local changes. Read plugin locks
|
|
19
|
+
and legacy `.mantle` metadata if present; they are context, not required.
|
|
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.
|
|
24
|
+
Do not resolve new Starter refs or compare the project to a baseline
|
|
25
|
+
template.
|
|
26
|
+
3. Update only selected `@aotter/mantle*` dependencies to the same exact target
|
|
27
|
+
version, preserving dependency sections. Use the package manager to update
|
|
28
|
+
the lockfile; inspect the dependency diff and required peer changes.
|
|
29
|
+
4. Remove scripts that invoke retired create/bundle-update commands. Keep all
|
|
30
|
+
application manifests, handlers, routes, theme, Worker/D1/KV names, origins,
|
|
31
|
+
provider bindings, secrets, and legacy metadata. Apply API migration edits
|
|
32
|
+
individually; do not copy the reference consumer over a real application.
|
|
33
|
+
5. Use the upgraded package to regenerate machine-owned bindings and project
|
|
34
|
+
its skills, then run the application's validation, types and tests:
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
pnpm exec mantle generate
|
|
38
|
+
pnpm exec mantle generate --check
|
|
39
|
+
pnpm exec mantle skills
|
|
40
|
+
pnpm exec mantle skills --check
|
|
41
|
+
pnpm exec mantle validate
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Read the refreshed `mantle-develop` skill and the upgraded package's embedded
|
|
45
|
+
docs before continuing application edits.
|
|
46
|
+
|
|
47
|
+
Start the local application and test its actual routes, including configured
|
|
48
|
+
auth behavior. Review the final source/lockfile/generated diff; unexpected
|
|
49
|
+
provider or user-source changes block completion. Provider credentials must
|
|
50
|
+
never enter git or logs. Report exact old/new versions, checks, and remaining
|
|
51
|
+
migration work. A dependency update does not authorize a production deploy.
|
|
@@ -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.
|
|
9
|
+
This recipe targets `0.1.4`. 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
|
+
"version": "0.1.4",
|
|
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.
|
|
87
|
-
"@aotter/mantle-spec": "0.1.
|
|
86
|
+
"@aotter/mantle-runtime": "0.1.4",
|
|
87
|
+
"@aotter/mantle-spec": "0.1.4"
|
|
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.
|
|
96
|
-
"@aotter/mantle-auth": "0.1.
|
|
97
|
-
"@aotter/mantle-
|
|
98
|
-
"@aotter/mantle-bun": "0.1.
|
|
99
|
-
"@aotter/mantle-
|
|
100
|
-
"@aotter/mantle-cloudflare": "0.1.
|
|
101
|
-
"@aotter/mantle-
|
|
95
|
+
"@aotter/mantle-admin-ui": "0.1.4",
|
|
96
|
+
"@aotter/mantle-auth": "0.1.4",
|
|
97
|
+
"@aotter/mantle-vercel": "0.1.4",
|
|
98
|
+
"@aotter/mantle-bun": "0.1.4",
|
|
99
|
+
"@aotter/mantle-web": "0.1.4",
|
|
100
|
+
"@aotter/mantle-cloudflare": "0.1.4",
|
|
101
|
+
"@aotter/mantle-admin": "0.1.4"
|
|
102
102
|
},
|
|
103
103
|
"peerDependenciesMeta": {
|
|
104
104
|
"@aotter/mantle-admin": {
|
|
@@ -139,18 +139,18 @@
|
|
|
139
139
|
"@types/node": "^26",
|
|
140
140
|
"aws4fetch": "^1.0.20",
|
|
141
141
|
"better-auth": "1.7.2",
|
|
142
|
-
"hono": "^4.13.
|
|
142
|
+
"hono": "^4.13.7",
|
|
143
143
|
"@libsql/client": "^0.17.4",
|
|
144
144
|
"typescript": "^6.0.3",
|
|
145
145
|
"vitest": "^4.1.11",
|
|
146
146
|
"zod": "^4.5.4",
|
|
147
|
-
"@aotter/mantle-admin": "0.1.
|
|
148
|
-
"@aotter/mantle-admin-ui": "0.1.
|
|
149
|
-
"@aotter/mantle-auth": "0.1.
|
|
150
|
-
"@aotter/mantle-bun": "0.1.
|
|
151
|
-
"@aotter/mantle-cloudflare": "0.1.
|
|
152
|
-
"@aotter/mantle-
|
|
153
|
-
"@aotter/mantle-
|
|
147
|
+
"@aotter/mantle-admin": "0.1.4",
|
|
148
|
+
"@aotter/mantle-admin-ui": "0.1.4",
|
|
149
|
+
"@aotter/mantle-auth": "0.1.4",
|
|
150
|
+
"@aotter/mantle-bun": "0.1.4",
|
|
151
|
+
"@aotter/mantle-cloudflare": "0.1.4",
|
|
152
|
+
"@aotter/mantle-vercel": "0.1.4",
|
|
153
|
+
"@aotter/mantle-web": "0.1.4"
|
|
154
154
|
},
|
|
155
155
|
"engines": {
|
|
156
156
|
"node": ">=22"
|
package/skills/README.md
CHANGED
|
@@ -4,13 +4,13 @@ Agent-readable skill briefs for consumers of `@aotter/mantle-*`. Discoverable by
|
|
|
4
4
|
|
|
5
5
|
| Skill | When to invoke |
|
|
6
6
|
|---|---|
|
|
7
|
-
| [`develop`](develop/SKILL.md) | `mantle:develop`: Core-owned workflow for manifest, runtime, handler, adapter, validation, and MCP work in any Mantle project. |
|
|
8
|
-
| [`media-gc`](media-gc/SKILL.md) | `mantle:media-gc`: audit or remove stale uncommitted public media objects with the connected Cloudflare API. |
|
|
9
|
-
| [`plugin`](plugin/SKILL.md) | `mantle:plugin`: Core-owned marketplace workflow for plan-first capability installs across applications and adapters. |
|
|
10
|
-
| [`theme`](theme/SKILL.md) | `mantle:theme`: Core-owned visual workflow. Reads project-owned theme and UI contracts. |
|
|
11
|
-
| [`update`](update/SKILL.md) | `mantle:update`: Core-owned drift check workflow for SDK dependencies, local skills, and plugin lockfiles. |
|
|
12
|
-
| [`
|
|
13
|
-
| [`provision`](provision/SKILL.md) | User wants a local project shipped to Cloudflare with production auth and operator handoff. |
|
|
7
|
+
| [`develop`](../docs/skills/develop/SKILL.md) | `mantle:develop`: Core-owned workflow for manifest, runtime, handler, adapter, validation, and MCP work in any Mantle project. |
|
|
8
|
+
| [`media-gc`](../docs/skills/media-gc/SKILL.md) | `mantle:media-gc`: audit or remove stale uncommitted public media objects with the connected Cloudflare API. |
|
|
9
|
+
| [`plugin`](../docs/skills/plugin/SKILL.md) | `mantle:plugin`: Core-owned marketplace workflow for plan-first capability installs across applications and adapters. |
|
|
10
|
+
| [`theme`](../docs/skills/theme/SKILL.md) | `mantle:theme`: Core-owned visual workflow. Reads project-owned theme and UI contracts. |
|
|
11
|
+
| [`update`](../docs/skills/update/SKILL.md) | `mantle:update`: Core-owned drift check workflow for SDK dependencies, local skills, and plugin lockfiles. |
|
|
12
|
+
| [`mantle`](install/SKILL.md) | User wants to author a local Mantle application or continue an existing project. |
|
|
13
|
+
| [`provision`](../docs/skills/provision/SKILL.md) | User wants a local project shipped to Cloudflare with production auth and operator handoff. |
|
|
14
14
|
|
|
15
15
|
The skills target Mantle's v0.1 grammar. The installed package version, not
|
|
16
16
|
duplicated skill prose, selects the exact runtime and embedded docs.
|
|
@@ -25,13 +25,13 @@ enforces the columns below.
|
|
|
25
25
|
|
|
26
26
|
| Skill | Routes on | Entry-path constraints (read before acting) | Path-gated sections | Projection | Restricted because |
|
|
27
27
|
|---|---|---|---|---|---|
|
|
28
|
-
| `develop` | existing project; manifest, runtime, handler, adapter, or MCP work | four-atom model; adapter neutrality; no direct D1/KV/Postgres writes; no committed secrets | performance harness; local MCP client; locale rules | project
|
|
29
|
-
| `plugin` | user wants an installable capability | plan before apply; lock entry is the removal manifest; delete only plugin-owned files and atoms | apply; remove | project
|
|
30
|
-
| `theme` | brand or visual direction in a project | repo-owned theme and UI contracts | — | project
|
|
31
|
-
| `update` | SDK upgrade or plugin lock review | never blindly overwrite user-owned code | — | project
|
|
32
|
-
| `
|
|
33
|
-
| `provision` | ship to Cloudflare and finish production auth | secrets never enter source or logs; explicit auth mode | hosted auth; self-managed auth |
|
|
34
|
-
| `media-gc` | audit or remove stale uncommitted media objects | audit by default; confirm exact account, bucket, cutoff, and candidate digest; re-audit before applying; never prefix-delete; never print keys | apply |
|
|
28
|
+
| `develop` | existing project; manifest, runtime, handler, adapter, or MCP work | four-atom model; adapter neutrality; no direct D1/KV/Postgres writes; no committed secrets | performance harness; local MCP client; locale rules | project | — |
|
|
29
|
+
| `plugin` | user wants an installable capability | plan before apply; lock entry is the removal manifest; delete only plugin-owned files and atoms | apply; remove | project | — |
|
|
30
|
+
| `theme` | brand or visual direction in a project | repo-owned theme and UI contracts | — | project | — |
|
|
31
|
+
| `update` | SDK upgrade or plugin lock review | never blindly overwrite user-owned code | — | project | — |
|
|
32
|
+
| `mantle` | new application, or opening an existing project | do not use the SDK checkout as the application; no push/deploy/provider config during cold start | author local project; continue existing project | plugin | Creates a new project; nothing to project into an existing one. |
|
|
33
|
+
| `provision` | ship to Cloudflare and finish production auth | secrets never enter source or logs; explicit auth mode | hosted auth; self-managed auth | package | Platform-specific deploy that handles production secrets; opt-in only. |
|
|
34
|
+
| `media-gc` | audit or remove stale uncommitted media objects | audit by default; confirm exact account, bucket, cutoff, and candidate digest; re-audit before applying; never prefix-delete; never print keys | apply | package | Destructive remote object deletion and Cloudflare-specific; opt-in only. |
|
|
35
35
|
|
|
36
36
|
Deliberately monolithic:
|
|
37
37
|
|
|
@@ -47,7 +47,8 @@ Deliberately monolithic:
|
|
|
47
47
|
The `mantle:*` namespace is owned by `@aotter/mantle`. Every skill declares its
|
|
48
48
|
own distribution scope in front matter: `metadata.projection: project` marks a
|
|
49
49
|
skill `mantle skills` should place in a consumer project, and a skill that
|
|
50
|
-
withholds `project` must say why. `
|
|
50
|
+
withholds `project` must say why. `plugin` is the bootstrap skill and `package`
|
|
51
|
+
is an opt-in brief in the installed SDK. `scripts/check-skills.mjs` holds that
|
|
51
52
|
declaration and the audit table below to each other.
|
|
52
53
|
|
|
53
54
|
Run `mantle skills` to project the installed package's skills into a project;
|
|
@@ -58,11 +59,15 @@ contracts.
|
|
|
58
59
|
|
|
59
60
|
## Source-repository marketplace install
|
|
60
61
|
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
`skills/install/SKILL.md` declares `name: mantle`. It is the only repository
|
|
63
|
+
skill discovered by the no-flag command and copied as a small directory.
|
|
64
|
+
The other six skills live in `docs/skills/` and ship with the npm package.
|
|
65
|
+
`mantle skills` projects the four ongoing workflows after package installation.
|
|
66
|
+
|
|
67
|
+
Other marketplace hosts point to the same entry:
|
|
63
68
|
|
|
64
69
|
```sh
|
|
65
|
-
npx skills add aotter/mantle
|
|
70
|
+
npx skills add aotter/mantle
|
|
66
71
|
```
|
|
67
72
|
|
|
68
73
|
```bash
|
|
@@ -75,7 +80,11 @@ codex plugin marketplace add aotter/mantle
|
|
|
75
80
|
codex plugin add mantle@mantle
|
|
76
81
|
```
|
|
77
82
|
|
|
78
|
-
|
|
83
|
+
Read the path printed by the installer (for project-local Codex,
|
|
84
|
+
`.agents/skills/mantle/SKILL.md`). Only the selected brief is installed, not
|
|
85
|
+
the SDK or handbook. After choosing and installing an exact SDK version, read
|
|
86
|
+
`node_modules/@aotter/mantle/skills/install/SKILL.md` and its embedded docs;
|
|
87
|
+
that package supersedes the bootstrap Git-ref instructions. After packages are
|
|
79
88
|
installed, `mantle skills` projects the installed package's own skills into the
|
|
80
89
|
project, and `mantle skills --check` fails on drift.
|
|
81
90
|
|
|
@@ -96,13 +105,13 @@ package. Two audiences, two artifacts.
|
|
|
96
105
|
|
|
97
106
|
## Discoverability
|
|
98
107
|
|
|
99
|
-
The skills target ADR-0007's "AI as primary author" thesis: agents reach these files by URL when the user invokes them by intent ("install mantle", "develop my Mantle site", "deploy"). Official cold start is `npx skills add aotter/mantle
|
|
108
|
+
The skills target ADR-0007's "AI as primary author" thesis: agents reach these files by URL when the user invokes them by intent ("install mantle", "develop my Mantle site", "deploy"). Official cold start is `npx skills add aotter/mantle`. Point the agent at the repository or pass the version-matched markdown content directly.
|
|
100
109
|
|
|
101
110
|
## Conventions
|
|
102
111
|
|
|
103
112
|
Each SKILL.md ships:
|
|
104
113
|
|
|
105
|
-
- **Front-matter** with a
|
|
114
|
+
- **Front-matter** with a stable `name`, trigger-complete
|
|
106
115
|
`description`, and optional source/version `metadata`. Plugin hosts add the
|
|
107
116
|
external `mantle:` namespace.
|
|
108
117
|
- **Preflight** section — environment + user-confirmation gates.
|
package/skills/develop/SKILL.md
CHANGED
|
@@ -3,9 +3,9 @@ name: develop
|
|
|
3
3
|
description: Work on any Mantle project using the Core SDK contract. Use for manifest, runtime, content model, handler, adapter, validation, and MCP work after a project already exists.
|
|
4
4
|
metadata:
|
|
5
5
|
source: "@aotter/mantle"
|
|
6
|
-
sourcePath: skills/develop/SKILL.md
|
|
6
|
+
sourcePath: docs/skills/develop/SKILL.md
|
|
7
7
|
applies_to: mantle grammar v0.1
|
|
8
|
-
projection: project
|
|
8
|
+
projection: project
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
# Mantle Develop
|
|
@@ -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.
|
|
21
|
-
|
|
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
|
package/skills/install/SKILL.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: mantle
|
|
3
3
|
description: Author a new Mantle application directly from version-matched SDK docs, or continue an existing project. Use when asked to install Mantle, build a Mantle application, or open a Mantle repository.
|
|
4
4
|
metadata:
|
|
5
5
|
source: "@aotter/mantle"
|
|
@@ -9,12 +9,37 @@ metadata:
|
|
|
9
9
|
projectionReason: Creates a new project; nothing to project into an existing one.
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
# Mantle
|
|
12
|
+
# Mantle
|
|
13
13
|
|
|
14
14
|
Mantle is an embeddable manifest engine. The application owns its source and
|
|
15
15
|
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
|
+
A same-version `mantle-starters` tag is not required; do not wait for one.
|
|
19
|
+
|
|
20
|
+
## Locate the version-matched instructions
|
|
21
|
+
|
|
22
|
+
`npx skills add aotter/mantle` installs this brief, not the SDK,
|
|
23
|
+
a project, or the handbook. Read the path printed by the installer (Codex's
|
|
24
|
+
project-local path is `.agents/skills/mantle/SKILL.md`); `metadata.sourcePath`
|
|
25
|
+
is repository provenance, not a consumer path. A repository install follows
|
|
26
|
+
the selected Git ref and does not pin an npm release.
|
|
27
|
+
|
|
28
|
+
After selecting the host and exact version, install `@aotter/mantle` locally
|
|
29
|
+
with the selected optional packages. All `docs/...` paths below then mean
|
|
30
|
+
`node_modules/@aotter/mantle/docs/...`; package skills are under
|
|
31
|
+
`node_modules/@aotter/mantle/skills/`. Read that package's
|
|
32
|
+
`skills/install/SKILL.md` before authoring: it supersedes this bootstrap copy.
|
|
33
|
+
Use the new application's installation, never another project's `node_modules`
|
|
34
|
+
or an SDK checkout packing harness, to resolve these paths.
|
|
35
|
+
Before reading a handbook page, verify the version in that application's
|
|
36
|
+
`node_modules/@aotter/mantle/package.json` against its lockfile and confirm
|
|
37
|
+
the page exists under the same package directory. If the package is missing or
|
|
38
|
+
the versions differ, fix the installation first; do not substitute a nearby
|
|
39
|
+
checkout's docs or another project's `node_modules`.
|
|
40
|
+
If the user requested a prerelease, resolve that channel explicitly; `latest`
|
|
41
|
+
need not contain prerelease features. Never mix versioned npm code with branch
|
|
42
|
+
docs. No local CLI exists until the package is installed.
|
|
18
43
|
|
|
19
44
|
## New application
|
|
20
45
|
|
|
@@ -23,15 +48,16 @@ turn `generate` into implicit scaffolding.
|
|
|
23
48
|
Do not assume Cloudflare, public HTML or Admin is required. Check Node 22+
|
|
24
49
|
and pnpm 9+ for these SDK examples. A ChatGPT Site is not a conventional
|
|
25
50
|
Cloudflare Worker deployment; use the installed
|
|
26
|
-
`docs/handbook/sites/index.md` integration guide and
|
|
51
|
+
`docs/handbook/chatgpt-sites/index.md` integration guide and
|
|
27
52
|
`docs/examples/host-chatgpt-sites/` runnable reference when selected.
|
|
28
53
|
2. Choose the requested exact SDK version, or resolve the intended release
|
|
29
54
|
channel once. Pin all selected `@aotter/mantle*` dependencies to that same
|
|
30
55
|
version. Install only the adapter/optional packages the application needs.
|
|
31
56
|
If a global scope registry overrides public npmjs, use a project-owned
|
|
32
57
|
`.npmrc` with `@aotter:registry=https://registry.npmjs.org/`.
|
|
33
|
-
3.
|
|
34
|
-
|
|
58
|
+
3. Use the host and surfaces already established in step 1; ask only for
|
|
59
|
+
information still missing. Read `docs/handbook/start/overview.md` and
|
|
60
|
+
`docs/handbook/reference/features.md`, then select the matching path:
|
|
35
61
|
- Spec + generate / embed Runtime — `docs/handbook/start/project-and-cli.md`.
|
|
36
62
|
- Adapter without Admin — `docs/examples/host-minimal-worker/`.
|
|
37
63
|
- Opt-in Admin / Dev UI — only when a human needs a console: interview
|
|
@@ -42,7 +68,8 @@ turn `generate` into implicit scaffolding.
|
|
|
42
68
|
`createAuth` email-otp + `ConsoleEmailSender`. Do not Vite-build Admin.
|
|
43
69
|
- ChatGPT Sites with Admin/D1/R2 — follow
|
|
44
70
|
`docs/examples/host-chatgpt-sites/`, not the email-OTP Worker example.
|
|
45
|
-
Copy it outside the SDK checkout,
|
|
71
|
+
Copy it outside the SDK checkout, pin its `@aotter/mantle*` dependencies
|
|
72
|
+
to the selected exact version, then `npm install`,
|
|
46
73
|
`npx mantle validate --phase deploy`, `npm run generate`, `npm run check`,
|
|
47
74
|
`npx wrangler d1 migrations apply DB --local`,
|
|
48
75
|
`npm run dev -- --port 4174`, and `npm test` in a second terminal.
|
|
@@ -51,12 +78,15 @@ turn `generate` into implicit scaffolding.
|
|
|
51
78
|
and the local/production smoke gates. Sites provisions and deploys; never
|
|
52
79
|
`wrangler deploy` a Site. Request both D1 and R2 when uploads are in scope.
|
|
53
80
|
Browser Admin WebMCP and Sites-session `/api/mcp/staff` do not enable remote staff OAuth MCP.
|
|
81
|
+
At handoff, show the owner where Admin WebMCP and the public/staff MCP
|
|
82
|
+
endpoints appear, and state which are usable from the browser versus a
|
|
83
|
+
remote connector.
|
|
54
84
|
- ChatGPT Sites with custom business rules or an external callback — the
|
|
55
85
|
runnable reference covers builtin content only. For application-owned
|
|
56
86
|
operational state, `handler: { kind: ref }` Procedures, staff-only SQL
|
|
57
87
|
Views, staff MCP Triggers with `requires.auth`, and outbound webhooks
|
|
58
88
|
called from handler code, follow
|
|
59
|
-
`docs/handbook/sites/equipment-checkout.md`. It is an implementation
|
|
89
|
+
`docs/handbook/chatgpt-sites/equipment-checkout.md`. It is an implementation
|
|
60
90
|
guide, not a shipped app: keep Mantle-owned Schema tables and
|
|
61
91
|
application-owned tables separate, and give every application table a
|
|
62
92
|
reviewed migration.
|
|
@@ -108,7 +138,9 @@ a bundle comparison command.
|
|
|
108
138
|
|
|
109
139
|
## Ship and report
|
|
110
140
|
|
|
111
|
-
When deployment is requested,
|
|
141
|
+
When deployment is requested, read
|
|
142
|
+
`node_modules/@aotter/mantle/skills/provision/SKILL.md` (not projected by
|
|
143
|
+
`mantle skills`) and follow that version-matched skill and the
|
|
112
144
|
observed host configuration. Legacy Landing remains a pre-stable product; it
|
|
113
145
|
is not a launch dependency for new Core projects.
|
|
114
146
|
|
package/skills/media-gc/SKILL.md
CHANGED
|
@@ -3,9 +3,9 @@ name: media-gc
|
|
|
3
3
|
description: Audit and safely remove stale, uncommitted public media uploads from a Mantle Cloudflare R2 bucket. Use when a Mantle operator asks to inspect or clean orphan media objects left after create_media_upload without commit_media_upload.
|
|
4
4
|
metadata:
|
|
5
5
|
source: "@aotter/mantle"
|
|
6
|
-
sourcePath: skills/media-gc/SKILL.md
|
|
6
|
+
sourcePath: docs/skills/media-gc/SKILL.md
|
|
7
7
|
applies_to: mantle grammar v0.1
|
|
8
|
-
projection:
|
|
8
|
+
projection: package
|
|
9
9
|
projectionReason: Destructive remote object deletion and Cloudflare-specific; opt-in only.
|
|
10
10
|
---
|
|
11
11
|
|
package/skills/plugin/SKILL.md
CHANGED
|
@@ -3,9 +3,9 @@ name: plugin
|
|
|
3
3
|
description: Discover, plan, apply, and verify Mantle marketplace plugins through the Core SDK contract. Use when the user wants to add an installable capability without hand-planning provisioning steps.
|
|
4
4
|
metadata:
|
|
5
5
|
source: "@aotter/mantle"
|
|
6
|
-
sourcePath: skills/plugin/SKILL.md
|
|
6
|
+
sourcePath: docs/skills/plugin/SKILL.md
|
|
7
7
|
applies_to: mantle grammar v0.1
|
|
8
|
-
projection: project
|
|
8
|
+
projection: project
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
# Mantle Plugin
|
|
@@ -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.
|
|
54
|
-
|
|
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
|
|
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
|
|
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.
|
|
@@ -3,9 +3,9 @@ name: provision
|
|
|
3
3
|
description: Ship a Mantle project through its selected host, routing ChatGPT Sites to its integration guide and conventional Cloudflare Workers to production auth and provisioning.
|
|
4
4
|
metadata:
|
|
5
5
|
source: "@aotter/mantle"
|
|
6
|
-
sourcePath: skills/provision/SKILL.md
|
|
6
|
+
sourcePath: docs/skills/provision/SKILL.md
|
|
7
7
|
applies_to: mantle grammar v0.1
|
|
8
|
-
projection:
|
|
8
|
+
projection: package
|
|
9
9
|
projectionReason: Platform-specific deploy that handles production secrets; opt-in only.
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -16,7 +16,7 @@ user asks to create remote resources or ship production. This flow is for
|
|
|
16
16
|
consumer-owned Cloudflare Workers. New direct-authored apps do not need Landing
|
|
17
17
|
artifacts (`.mantle/launch-state.json`, `.mantle/handoff.md`, or a hosted-auth
|
|
18
18
|
allocation). Treat any Landing handoff as **legacy/optional**. For a ChatGPT
|
|
19
|
-
Site, use the installed `docs/handbook/sites/index.md` integration guide and
|
|
19
|
+
Site, use the installed `docs/handbook/chatgpt-sites/index.md` integration guide and
|
|
20
20
|
the "Publish with Sites" steps in `docs/examples/host-chatgpt-sites/README.md`:
|
|
21
21
|
request D1 and R2 on the Site, set `PUBLIC_ORIGIN` and `OWNER_EMAIL` in Sites
|
|
22
22
|
settings, review the migration, then save and deploy a Sites version. Do not
|
package/skills/theme/SKILL.md
CHANGED
|
@@ -3,9 +3,9 @@ name: theme
|
|
|
3
3
|
description: Apply brand and visual direction in a Mantle application using its repo-owned theme and UI contracts.
|
|
4
4
|
metadata:
|
|
5
5
|
source: "@aotter/mantle"
|
|
6
|
-
sourcePath: skills/theme/SKILL.md
|
|
6
|
+
sourcePath: docs/skills/theme/SKILL.md
|
|
7
7
|
applies_to: mantle grammar v0.1
|
|
8
|
-
projection: project
|
|
8
|
+
projection: project
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
# Mantle Theme
|
|
@@ -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.
|
|
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
|
|
package/skills/update/SKILL.md
CHANGED
|
@@ -3,9 +3,9 @@ name: update
|
|
|
3
3
|
description: Review and upgrade Mantle SDK dependencies and project-local skills while preserving application source, provider identities and plugin lockfiles.
|
|
4
4
|
metadata:
|
|
5
5
|
source: "@aotter/mantle"
|
|
6
|
-
sourcePath: skills/update/SKILL.md
|
|
6
|
+
sourcePath: docs/skills/update/SKILL.md
|
|
7
7
|
applies_to: mantle grammar v0.1
|
|
8
|
-
projection: project
|
|
8
|
+
projection: project
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
# Mantle Update
|
|
@@ -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
|
|
21
|
-
|
|
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
|
package/skills/.keep
DELETED
|
File without changes
|
|
File without changes
|