@aotter/mantle 0.0.11-alpha.48 → 0.0.11-alpha.50
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 +10 -8
- package/docs/release-process.md +8 -7
- package/package.json +5 -5
- package/skills/README.md +8 -4
- package/skills/customize-design/SKILL.md +5 -4
- package/skills/develop/SKILL.md +33 -7
- package/skills/extend/SKILL.md +5 -4
- package/skills/install/SKILL.md +106 -108
- package/skills/plugin/SKILL.md +5 -6
- package/skills/provision/SKILL.md +99 -130
- package/skills/theme/SKILL.md +5 -6
- package/skills/update/SKILL.md +5 -6
package/README.md
CHANGED
|
@@ -31,14 +31,16 @@ import { mountServerEndpoints } from "@aotter/mantle/cloudflare";
|
|
|
31
31
|
|
|
32
32
|
## Getting started
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
repo to continue.
|
|
34
|
+
Give the [Mantle repo](https://github.com/aotter/mantle) to a coding agent or
|
|
35
|
+
install its agent plugin, then ask it to create a site. The install skill picks
|
|
36
|
+
a deterministic bundle from
|
|
37
|
+
[`aotter/mantle-starters`](https://github.com/aotter/mantle-starters),
|
|
38
|
+
materializes a local project, and verifies it before any provider work.
|
|
40
39
|
|
|
41
|
-
|
|
40
|
+
[Mantle landing](https://mantle.tools) uses the same bundles and continues
|
|
41
|
+
through private GitHub repo creation, Cloudflare deployment, and optional paid
|
|
42
|
+
hosted auth. Generated repos vendor Core-owned `mantle:*` skills from this
|
|
43
|
+
package for repo-local use.
|
|
42
44
|
|
|
43
45
|
## Agent marketplace install
|
|
44
46
|
|
|
@@ -47,7 +49,7 @@ Install the Mantle Core skill bundle before working on generated repos:
|
|
|
47
49
|
```bash
|
|
48
50
|
# Claude Code
|
|
49
51
|
/plugin marketplace add aotter/mantle
|
|
50
|
-
/plugin install mantle
|
|
52
|
+
/plugin install mantle@mantle
|
|
51
53
|
|
|
52
54
|
# Codex
|
|
53
55
|
codex plugin marketplace add aotter/mantle --ref develop
|
package/docs/release-process.md
CHANGED
|
@@ -14,7 +14,8 @@ mantle is in `0.0.x-alpha` until the v0.1.0 release gate closes. The process bel
|
|
|
14
14
|
- Use semver after v0.1.0.
|
|
15
15
|
- Tag format is `vMAJOR.MINOR.PATCH`, for example `v0.1.0`.
|
|
16
16
|
- Alpha tags may use prerelease suffixes, for example `v0.0.6-alpha`.
|
|
17
|
-
- Package versions
|
|
17
|
+
- Package versions and agent plugin manifest versions must stay aligned unless
|
|
18
|
+
a future ADR explicitly changes release policy.
|
|
18
19
|
|
|
19
20
|
## Release channels
|
|
20
21
|
|
|
@@ -278,13 +279,13 @@ source.
|
|
|
278
279
|
|
|
279
280
|
Do **not** publish `@aotter/mantle-netlify` while it is a stub.
|
|
280
281
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
282
|
+
Releases on this SDK repo must not attach or publish a separate starter
|
|
283
|
+
scaffolder package. Local cold start is owned by the versioned provision
|
|
284
|
+
bundles and materializer in `aotter/mantle-starters`.
|
|
284
285
|
|
|
285
|
-
`skills/install/SKILL.md`
|
|
286
|
-
|
|
287
|
-
|
|
286
|
+
`skills/install/SKILL.md` creates or continues a local / landing-generated
|
|
287
|
+
project. Human-facing starter bundle details belong in the `mantle-starters`
|
|
288
|
+
README, not this SDK repo.
|
|
288
289
|
|
|
289
290
|
### Pre-publish checks
|
|
290
291
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aotter/mantle",
|
|
3
|
-
"version": "0.0.11-alpha.
|
|
3
|
+
"version": "0.0.11-alpha.50",
|
|
4
4
|
"description": "Umbrella entry for @aotter/mantle. Adopters install this one package and import from subpaths: /spec, /runtime, /cloudflare, /admin-ui. Sub-packages remain individually installable on npm for tooling / alt-adapter authors. The Netlify adapter ships as a private workspace stub in v0.1 — its subpath will be added when the impl lands in v0.2.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://mantle.tools/",
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
"README.md"
|
|
48
48
|
],
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@aotter/mantle-admin-ui": "0.0.11-alpha.
|
|
51
|
-
"@aotter/mantle-
|
|
52
|
-
"@aotter/mantle-
|
|
53
|
-
"@aotter/mantle-runtime": "0.0.11-alpha.
|
|
50
|
+
"@aotter/mantle-admin-ui": "0.0.11-alpha.50",
|
|
51
|
+
"@aotter/mantle-spec": "0.0.11-alpha.50",
|
|
52
|
+
"@aotter/mantle-cloudflare": "0.0.11-alpha.50",
|
|
53
|
+
"@aotter/mantle-runtime": "0.0.11-alpha.50"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@cloudflare/workers-oauth-provider": "^0.8.0",
|
package/skills/README.md
CHANGED
|
@@ -8,12 +8,14 @@ Agent-readable skill briefs for consumers of `@aotter/mantle-*`. Discoverable by
|
|
|
8
8
|
| [`plugin`](plugin/SKILL.md) | `mantle:plugin`: Core-owned marketplace workflow for plan-first capability installs across starters and adapters. |
|
|
9
9
|
| [`theme`](theme/SKILL.md) | `mantle:theme`: Core-owned visual workflow. Reads project context but does not depend on starter-owned skill semantics. |
|
|
10
10
|
| [`update`](update/SKILL.md) | `mantle:update`: Core-owned drift check workflow for SDK, starter snapshots, and plugin lockfiles. |
|
|
11
|
-
| [`install`](install/SKILL.md) | User wants to
|
|
11
|
+
| [`install`](install/SKILL.md) | User wants to create a local Mantle site from a deterministic starter bundle or continue an existing local / landing-generated project. |
|
|
12
12
|
| [`customize-design`](customize-design/SKILL.md) | Legacy publication-specific design guide. Prefer `mantle:theme` for generated repos. |
|
|
13
13
|
| [`extend`](extend/SKILL.md) | Legacy atom-authoring guide. Prefer `mantle:develop` or `mantle:plugin` depending on whether the work is one-off or installable. |
|
|
14
|
-
| [`provision`](provision/SKILL.md) | User wants
|
|
14
|
+
| [`provision`](provision/SKILL.md) | User wants a local or landing-generated project shipped to Cloudflare with production auth and operator handoff. |
|
|
15
15
|
|
|
16
|
-
The skills target `mantle@v0.1.0`. Each one names its assumed grammar version
|
|
16
|
+
The skills target `mantle@v0.1.0`. Each one names its assumed grammar version
|
|
17
|
+
in front-matter `metadata.applies_to`; future versions add a sibling SKILL.md
|
|
18
|
+
or update the existing one.
|
|
17
19
|
|
|
18
20
|
## Skill authority
|
|
19
21
|
|
|
@@ -43,7 +45,9 @@ The skills target ADR-0007's "AI as primary author" thesis: agents reach these f
|
|
|
43
45
|
|
|
44
46
|
Each SKILL.md ships:
|
|
45
47
|
|
|
46
|
-
- **Front-matter** with
|
|
48
|
+
- **Front-matter** with a folder-matching `name`, trigger-complete
|
|
49
|
+
`description`, and optional source/version `metadata`. Plugin hosts add the
|
|
50
|
+
external `mantle:` namespace.
|
|
47
51
|
- **Preflight** section — environment + user-confirmation gates.
|
|
48
52
|
- **Step-by-step** — concrete commands (`pnpm validate`, `mantle emit-openapi`, etc.).
|
|
49
53
|
- **Diagnostic recipes** — `Symptom → Cause → Fix` table for the common failure modes.
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: customize-design
|
|
3
3
|
description: Layer custom design over a mantle publication starter project using the L1–L4 theme stack (tokens / extraCss+icons+i18n / Header+Footer+PageShell slots / whole-template fork). Use when the user wants to rebrand, restyle, or swap UI pieces without forking the whole starter.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
metadata:
|
|
5
|
+
source: "@aotter/mantle"
|
|
6
|
+
sourcePath: skills/customize-design/SKILL.md
|
|
7
|
+
applies_to: mantle@v0.1.0 + publication archetype
|
|
7
8
|
---
|
|
8
9
|
|
|
9
10
|
# Customize the design of a mantle publication site
|
package/skills/develop/SKILL.md
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
applies_to: mantle@v0.1.0
|
|
4
|
+
metadata:
|
|
5
|
+
source: "@aotter/mantle"
|
|
6
|
+
sourcePath: skills/develop/SKILL.md
|
|
7
|
+
applies_to: mantle@v0.1.0
|
|
9
8
|
---
|
|
10
9
|
|
|
11
10
|
# Mantle Develop
|
|
@@ -23,7 +22,34 @@ owns the workflow vocabulary.
|
|
|
23
22
|
4. Installed Core docs in `node_modules/@aotter/mantle/docs/`.
|
|
24
23
|
|
|
25
24
|
If `node_modules/` is missing, run `pnpm install --frozen-lockfile` before
|
|
26
|
-
falling back to remote docs.
|
|
25
|
+
falling back to remote docs. Remote docs must use a tag matching the installed
|
|
26
|
+
version; never use `develop` branch docs for a versioned consumer project.
|
|
27
|
+
|
|
28
|
+
## Existing Examples
|
|
29
|
+
|
|
30
|
+
Before inventing a Mantle pattern, inspect
|
|
31
|
+
[`aotter/mantle-starters`](https://github.com/aotter/mantle-starters).
|
|
32
|
+
Use a tag matching the installed Mantle version when available; use `develop`
|
|
33
|
+
only for unreleased work. `blank/` shows the base application shape and
|
|
34
|
+
`overlays/<type>/` contains working examples of manifests, handlers, routes,
|
|
35
|
+
pages, and feature wiring. Copy the smallest matching pattern. Do not edit or
|
|
36
|
+
copy generated `provision-bundles/*.json` by hand.
|
|
37
|
+
|
|
38
|
+
## Authoring CLI
|
|
39
|
+
|
|
40
|
+
Use the project's scripts first; generated starters expose the shipping
|
|
41
|
+
`mantle` authoring CLI from `@aotter/mantle-spec`:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pnpm exec mantle --help
|
|
45
|
+
pnpm validate
|
|
46
|
+
pnpm introspect
|
|
47
|
+
pnpm emit-openapi
|
|
48
|
+
pnpm emit-types
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
This CLI validates and derives artifacts from an existing materialized
|
|
52
|
+
project; starter creation is owned by the provision-bundle flow.
|
|
27
53
|
|
|
28
54
|
## Core Model
|
|
29
55
|
|
package/skills/extend/SKILL.md
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: extend
|
|
3
3
|
description: Add new functionality to an existing mantle project — a new Schema, View, Procedure, or Trigger; or wire a feature like a contact form, newsletter signup, comment thread, or filtered list page. Use when the user already has a mantle project and wants to grow it.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
metadata:
|
|
5
|
+
source: "@aotter/mantle"
|
|
6
|
+
sourcePath: skills/extend/SKILL.md
|
|
7
|
+
applies_to: mantle@v0.1.0
|
|
7
8
|
---
|
|
8
9
|
|
|
9
10
|
# Extend a mantle project
|
package/skills/install/SKILL.md
CHANGED
|
@@ -1,144 +1,142 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
name: install
|
|
3
|
+
description: Start a new Mantle site locally from a deterministic starter bundle, or orient and continue an existing local or Mantle landing project. Use when the user gives a Mantle repository URL and asks to try or build with it, invokes the Mantle install skill, wants a new Mantle site, or opens an existing generated site.
|
|
4
|
+
metadata:
|
|
5
|
+
source: "@aotter/mantle"
|
|
6
|
+
sourcePath: skills/install/SKILL.md
|
|
7
|
+
applies_to: mantle@v0.1.0
|
|
6
8
|
---
|
|
7
9
|
|
|
8
|
-
#
|
|
10
|
+
# Mantle Install
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
not scaffolded locally. Landing asks the launch questions, then provisions
|
|
12
|
-
server-side: it creates the user's private GitHub repo, commits a blank
|
|
13
|
-
deployable Mantle site, and connects Cloudflare Workers CI for the first
|
|
14
|
-
deploy. Your job is to **continue that provisioned repo** — complete the
|
|
15
|
-
selected type, first pages, and content — not to scaffold from scratch.
|
|
12
|
+
Route by the working directory:
|
|
16
13
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
harness.
|
|
14
|
+
- If it already contains `.mantle/launch-state.json` or depends on
|
|
15
|
+
`@aotter/mantle`, continue the existing project.
|
|
16
|
+
- Otherwise create a new local project from a deterministic provision bundle.
|
|
17
|
+
Do not use the Mantle SDK checkout as the application.
|
|
22
18
|
|
|
23
|
-
|
|
19
|
+
Mantle landing uses the same bundles but continues through GitHub, Cloudflare,
|
|
20
|
+
and optional paid hosted auth. Use landing only when the user wants that
|
|
21
|
+
hosted provider flow.
|
|
24
22
|
|
|
25
|
-
|
|
26
|
-
`cms.mantle.aotter.net/v1`, mapping 1-to-1 to Postgres primitives:
|
|
23
|
+
## Create a Local Project
|
|
27
24
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
| Schema | `CREATE TABLE` | none directly |
|
|
31
|
-
| View | `CREATE VIEW` | auto-mounted at `GET /api/views/<name>` |
|
|
32
|
-
| Procedure | `CREATE FUNCTION` | none directly |
|
|
33
|
-
| Trigger | `CREATE TRIGGER` + cron + REST route + LISTEN/NOTIFY | binding atom |
|
|
25
|
+
1. Infer the closest starter from the user's request. Ask only when two choices
|
|
26
|
+
would materially change the result.
|
|
34
27
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
28
|
+
| Intent | Type |
|
|
29
|
+
|---|---|
|
|
30
|
+
| API/MCP backend or empty base | `blank` |
|
|
31
|
+
| Small public or company site | `presence` |
|
|
32
|
+
| Form, application, or submission flow | `intake` |
|
|
33
|
+
| Blog, docs, posts, or editorial site | `publication` |
|
|
34
|
+
| Catalog or order intent | `transaction` |
|
|
35
|
+
| Booking or request intent | `reservation` |
|
|
36
|
+
| Member or participation intent | `community` |
|
|
37
|
+
|
|
38
|
+
2. Choose absolute paths for a temporary starters checkout and a target
|
|
39
|
+
directory outside both Mantle repositories. Derive a short project slug,
|
|
40
|
+
brand, one-sentence description, and locales from the user's prompt.
|
|
41
|
+
|
|
42
|
+
3. Clone [`aotter/mantle-starters`](https://github.com/aotter/mantle-starters)
|
|
43
|
+
into a temporary directory and run its materializer. Use a starters ref
|
|
44
|
+
supplied by the user for branch testing. Otherwise use a tag matching the
|
|
45
|
+
requested Mantle version; use `develop` only for unreleased work.
|
|
39
46
|
|
|
40
|
-
|
|
47
|
+
```bash
|
|
48
|
+
git clone --depth 1 --branch <starters-ref> \
|
|
49
|
+
https://github.com/aotter/mantle-starters.git <temporary-starters-dir>
|
|
50
|
+
pnpm --dir <temporary-starters-dir> materialize <type> \
|
|
51
|
+
--out <target-dir> \
|
|
52
|
+
--project-name <slug> \
|
|
53
|
+
--brand "<brand>" \
|
|
54
|
+
--description "<one sentence>" \
|
|
55
|
+
--locales <comma-separated-locales>
|
|
56
|
+
```
|
|
41
57
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
| `manifests/*.yaml` | Schemas / Views / Procedures / Triggers |
|
|
48
|
-
| `src/mantle/config.ts` | Site defaults, runtime bindings |
|
|
49
|
-
| `src/mantle/handlers/index.ts` | Procedure handler registration |
|
|
50
|
-
| `src/handlers/` | Handler implementations |
|
|
51
|
-
| `AGENTS.md` | Cross-tool agent entry |
|
|
52
|
-
| `.agent/skills/` + `.claude/skills/` | Vendored Core skills from `@aotter/mantle`: `mantle:develop`, `mantle:plugin`, `mantle:theme`, `mantle:update` |
|
|
53
|
-
|
|
54
|
-
## Take Over a Provisioned Repo
|
|
55
|
-
|
|
56
|
-
The repo was already created and deployed by landing. Continue it:
|
|
57
|
-
|
|
58
|
-
1. Confirm repository access through an available GitHub connector or MCP
|
|
59
|
-
tool. Use GitHub CLI only if it is already authenticated.
|
|
60
|
-
2. Clone or open the repo, then read `.mantle/launch-state.json`,
|
|
61
|
-
`.mantle/features.json`, and `.mantle/handoff.md`.
|
|
62
|
-
3. Inspect the four-atoms manifest, the type overlay notes, pages, and
|
|
63
|
-
seed data before changing code.
|
|
64
|
-
4. Validate locally before editing:
|
|
58
|
+
The materializer writes the same precomposed `provision-bundles/<type>.json`
|
|
59
|
+
used by Mantle landing. Do not manually copy `blank/`, merge overlays, or edit
|
|
60
|
+
the generated bundle JSON.
|
|
61
|
+
|
|
62
|
+
4. Initialize and verify the local project:
|
|
65
63
|
|
|
66
64
|
```bash
|
|
65
|
+
cd <target-dir>
|
|
66
|
+
git init -b main
|
|
67
67
|
pnpm install --frozen-lockfile
|
|
68
68
|
pnpm validate
|
|
69
69
|
pnpm typecheck
|
|
70
|
+
pnpm dev
|
|
70
71
|
```
|
|
71
72
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
## Continue With Repo-Local Skills
|
|
76
|
-
|
|
77
|
-
The generated repo vendors Core-owned skills under `.agent/skills/` and
|
|
78
|
-
`.claude/skills/`. The starter carries local copies for offline/pinned use; it
|
|
79
|
-
does not own a separate skill contract.
|
|
73
|
+
Open `http://localhost:8787`. Public preview works before auth is configured;
|
|
74
|
+
auth-gated routes may return `503 setup_incomplete`.
|
|
80
75
|
|
|
81
|
-
|
|
82
|
-
bug-fix, and validation work on the site.
|
|
83
|
-
- **`mantle:plugin`** — install repeatable marketplace capabilities using
|
|
84
|
-
a plan-first Core workflow.
|
|
85
|
-
- **`mantle:theme`** — brand and visual direction via Mantle / Kiwa tokens
|
|
86
|
-
and source. There is no premade theme picker; visual direction is agent
|
|
87
|
-
work after launch.
|
|
88
|
-
- **`mantle:update`** — compare the repo against its upstream provision
|
|
89
|
-
bundle or installed plugin locks.
|
|
76
|
+
## Continue an Existing Project
|
|
90
77
|
|
|
91
|
-
|
|
92
|
-
homepage.
|
|
78
|
+
Read these before editing:
|
|
93
79
|
|
|
94
|
-
|
|
80
|
+
1. `.mantle/launch-state.json`, `.mantle/features.json`, and
|
|
81
|
+
`.mantle/handoff.md`.
|
|
82
|
+
2. `package.json` for the installed `@aotter/mantle*` versions.
|
|
83
|
+
3. Repo-local Mantle skills under `.agent/skills/` or `.claude/skills/`.
|
|
84
|
+
4. Matching embedded docs under `node_modules/@aotter/mantle/docs/`.
|
|
95
85
|
|
|
96
|
-
|
|
97
|
-
|
|
86
|
+
Use remote docs only when embedded docs are unavailable, and use a tag matching
|
|
87
|
+
the installed version. Never use `develop` docs for a versioned project.
|
|
98
88
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
<https://raw.githubusercontent.com/aotter/mantle/develop/docs/media-uploads.md>.
|
|
89
|
+
Do not branch on how the project was created. Verify the current git remote,
|
|
90
|
+
live URL, and auth response, then skip work that is already complete.
|
|
102
91
|
|
|
103
|
-
|
|
104
|
-
local/non-sandboxed coding agent that can read files and make outbound PUT
|
|
105
|
-
requests. Do not rely on Claude Cowork for R2 uploads; use a
|
|
106
|
-
non-sandboxed agent instead.
|
|
92
|
+
Then run:
|
|
107
93
|
|
|
108
|
-
|
|
94
|
+
```bash
|
|
95
|
+
pnpm install --frozen-lockfile
|
|
96
|
+
pnpm validate
|
|
97
|
+
pnpm typecheck
|
|
98
|
+
```
|
|
109
99
|
|
|
110
|
-
|
|
100
|
+
Inspect the already composed manifest, page, and seed files before changing
|
|
101
|
+
them. Use the project's scripts first; generated projects expose:
|
|
111
102
|
|
|
112
103
|
```bash
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
pnpm
|
|
104
|
+
pnpm exec mantle --help
|
|
105
|
+
pnpm validate
|
|
106
|
+
pnpm introspect
|
|
107
|
+
pnpm emit-openapi
|
|
108
|
+
pnpm emit-types
|
|
116
109
|
```
|
|
117
110
|
|
|
118
|
-
Paste the generated random value into `.dev.vars` as `BETTER_AUTH_SECRET`.
|
|
119
|
-
This secret is local only and must not be reused for production. Use
|
|
120
|
-
`localhost`, not `127.0.0.1`, in local examples. A fresh blank site may
|
|
121
|
-
return 404 on the public home route until the type overlay adds one; treat
|
|
122
|
-
that as an empty-site state, not a failure, when validation and admin
|
|
123
|
-
routes are alive.
|
|
124
|
-
|
|
125
111
|
## Production
|
|
126
112
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
113
|
+
Local cold start intentionally stops before GitHub and Cloudflare operations.
|
|
114
|
+
When the user asks to ship, use `mantle:provision` from the installed plugin or
|
|
115
|
+
`node_modules/@aotter/mantle/skills/provision/SKILL.md`.
|
|
116
|
+
|
|
117
|
+
Mantle landing is the first-run option when the user wants Mantle to create the
|
|
118
|
+
private GitHub repo, connect Cloudflare, and offer paid hosted auth. Free
|
|
119
|
+
self-hosted auth requires the owner to configure their GitHub OAuth App and
|
|
120
|
+
provider secrets.
|
|
121
|
+
|
|
122
|
+
## Report
|
|
123
|
+
|
|
124
|
+
Return:
|
|
125
|
+
|
|
126
|
+
- created or opened project path;
|
|
127
|
+
- selected type and why;
|
|
128
|
+
- local URL;
|
|
129
|
+
- validation and typecheck results;
|
|
130
|
+
- observed GitHub, deploy, and auth state;
|
|
131
|
+
- three tailored next options: shape the visual experience, build the first
|
|
132
|
+
real business workflow, or finish deploy/auth if incomplete. Never leave
|
|
133
|
+
auth or seed data as the only next step.
|
|
132
134
|
|
|
133
135
|
## Don't
|
|
134
136
|
|
|
135
|
-
- Don't
|
|
136
|
-
- Don't
|
|
137
|
-
|
|
138
|
-
- Don't
|
|
139
|
-
- Don't ask for a Cloudflare API token in the base flow.
|
|
140
|
-
- Don't require R2 media setup in the base flow; it is optional
|
|
141
|
-
post-launch work.
|
|
137
|
+
- Don't use the Mantle SDK checkout as the generated application.
|
|
138
|
+
- Don't hand-compose starter layers; materialize the generated provision
|
|
139
|
+
bundle.
|
|
140
|
+
- Don't push, deploy, or configure providers during local cold start.
|
|
142
141
|
- Don't commit provider secrets.
|
|
143
|
-
- Don't
|
|
144
|
-
and the real Worker URL in production.
|
|
142
|
+
- Don't block the first useful page on optional media storage.
|
package/skills/plugin/SKILL.md
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
applies_to: mantle@v0.1.0
|
|
4
|
+
metadata:
|
|
5
|
+
source: "@aotter/mantle"
|
|
6
|
+
sourcePath: skills/plugin/SKILL.md
|
|
7
|
+
applies_to: mantle@v0.1.0
|
|
9
8
|
---
|
|
10
9
|
|
|
11
10
|
# Mantle Plugin
|
|
@@ -1,79 +1,27 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
name: provision
|
|
3
|
+
description: Ship a local or Mantle landing-generated project to Cloudflare and finish production auth. Use when a Mantle project is ready for GitHub, Cloudflare deployment, self-hosted GitHub OAuth, paid Mantle hosted auth verification, production smoke testing, or operator handoff.
|
|
4
|
+
metadata:
|
|
5
|
+
source: "@aotter/mantle"
|
|
6
|
+
sourcePath: skills/provision/SKILL.md
|
|
7
|
+
applies_to: mantle@v0.1.0
|
|
7
8
|
---
|
|
8
9
|
|
|
9
10
|
# Provision a Mantle Project
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
and
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
with v2.
|
|
25
|
-
|
|
26
|
-
## End State
|
|
27
|
-
|
|
28
|
-
- Cloudflare has deployed the Worker from the repo (landing's first build,
|
|
29
|
-
plus your redeploy after config).
|
|
30
|
-
- `wrangler.toml` carries `PUBLIC_ORIGIN`, `GITHUB_CLIENT_ID`,
|
|
31
|
-
`ADMIN_GITHUB_LOGIN`, and the correct Worker name.
|
|
32
|
-
- Worker secrets are set: `GITHUB_CLIENT_SECRET`, `BETTER_AUTH_SECRET`,
|
|
33
|
-
and any optional feature/provider secrets.
|
|
34
|
-
- `AGENTS.md` `Public site:` points at the deployed Worker URL.
|
|
35
|
-
- Staff MCP and browser admin sign-in work.
|
|
36
|
-
- Operator setup URL handed to the owner:
|
|
37
|
-
`https://mantle.tools/connect?site=<url-encoded-worker-url>`.
|
|
38
|
-
|
|
39
|
-
Provision does not seed production content. First real content is created
|
|
40
|
-
after owner sign-in through Staff MCP / admin authoring.
|
|
41
|
-
|
|
42
|
-
Media uploads are optional post-launch work. Do not require storage or media
|
|
43
|
-
upload credentials to finish first production provisioning. If the current
|
|
44
|
-
repo uses the Cloudflare adapter and the owner asks for staff image/file
|
|
45
|
-
uploads later, follow the Cloudflare R2 recipe:
|
|
46
|
-
<https://raw.githubusercontent.com/aotter/mantle/develop/docs/media-uploads.md>
|
|
47
|
-
and use Claude Code or another local/non-sandboxed coding agent for the
|
|
48
|
-
upload workflow. Do not use Claude Cowork for R2 uploads; use a
|
|
49
|
-
non-sandboxed agent instead.
|
|
50
|
-
|
|
51
|
-
## Principles
|
|
52
|
-
|
|
53
|
-
1. Use the user's accounts. The repo and Worker belong to the user's
|
|
54
|
-
GitHub and Cloudflare accounts.
|
|
55
|
-
2. No Cloudflare API token in the base flow. Prefer a Cloudflare MCP
|
|
56
|
-
connector for provider work; use `wrangler login` as a fallback after
|
|
57
|
-
the user agrees.
|
|
58
|
-
3. GitHub OAuth is per-site and user-owned. The callback URL is exactly
|
|
59
|
-
`<worker-url>/api/auth/callback/github`.
|
|
60
|
-
4. Launch state is context, not provider authority.
|
|
61
|
-
`.mantle/launch-state.json` may supply owner, admin login, repo name,
|
|
62
|
-
locales, and type. It does not authorize Cloudflare operations, OAuth
|
|
63
|
-
secrets, or custom domains.
|
|
64
|
-
5. `BETTER_AUTH_SECRET` is load-bearing. Set it once and preserve it;
|
|
65
|
-
rotating it invalidates every session.
|
|
66
|
-
|
|
67
|
-
## Flow
|
|
68
|
-
|
|
69
|
-
Run from the generated project root.
|
|
70
|
-
|
|
71
|
-
1. Verify the landing deploy. Confirm Cloudflare Workers CI built and
|
|
72
|
-
deployed from GitHub, and capture the live `*.workers.dev` URL. The
|
|
73
|
-
public site should respond; auth-gated routes return `503
|
|
74
|
-
setup_incomplete` until step 4 — that is expected, not a failure.
|
|
75
|
-
|
|
76
|
-
2. Confirm the local repo is clean and valid before changing config:
|
|
12
|
+
Local cold start deliberately stops before this skill. Provision only after the
|
|
13
|
+
user asks to create remote resources or ship production.
|
|
14
|
+
|
|
15
|
+
## Source of Truth
|
|
16
|
+
|
|
17
|
+
1. Read `.mantle/launch-state.json`, `.mantle/handoff.md`, `wrangler.toml`,
|
|
18
|
+
and the current git remotes.
|
|
19
|
+
2. Read installed `@aotter/mantle*` versions from `package.json`.
|
|
20
|
+
3. Use matching embedded docs under `node_modules/@aotter/mantle/docs/`.
|
|
21
|
+
4. Never infer provider authority from launch state. Confirm the active GitHub
|
|
22
|
+
and Cloudflare accounts before changing them.
|
|
23
|
+
|
|
24
|
+
Run the local gate first:
|
|
77
25
|
|
|
78
26
|
```bash
|
|
79
27
|
pnpm install --frozen-lockfile
|
|
@@ -82,95 +30,116 @@ pnpm typecheck
|
|
|
82
30
|
git status --short
|
|
83
31
|
```
|
|
84
32
|
|
|
85
|
-
|
|
86
|
-
|
|
33
|
+
## Resume From Observed State
|
|
34
|
+
|
|
35
|
+
Do not branch on how the project was created. Verify these facts and skip
|
|
36
|
+
completed work:
|
|
37
|
+
|
|
38
|
+
1. `git remote get-url origin` confirms the GitHub repo.
|
|
39
|
+
2. An HTTPS `PUBLIC_ORIGIN` that responds confirms the Cloudflare deploy.
|
|
40
|
+
3. `/admin/sign-in` returning `503 setup_incomplete` means auth is not bound.
|
|
41
|
+
Use the recorded auth intent only to choose hosted or self-hosted setup;
|
|
42
|
+
live behavior is authoritative.
|
|
43
|
+
|
|
44
|
+
If there is no remote, confirm the target account, create a private repo,
|
|
45
|
+
commit, and push `main`. If there is no live Worker, confirm the Cloudflare
|
|
46
|
+
account, prefer an available connector, or use `pnpm exec wrangler login` with
|
|
47
|
+
the user's agreement, then run `pnpm deploy`.
|
|
48
|
+
|
|
49
|
+
Capture the live URL in `PUBLIC_ORIGIN` and `Public site:` in `AGENTS.md`, then
|
|
50
|
+
commit and push non-secret changes. Reuse any repo or Worker already created
|
|
51
|
+
by landing. Workers Builds is optional after a direct deploy.
|
|
52
|
+
|
|
53
|
+
## Choose Auth
|
|
54
|
+
|
|
55
|
+
- **Self-hosted — free:** configure the owner's per-site GitHub OAuth App and
|
|
56
|
+
Worker secrets using the steps below.
|
|
57
|
+
- **Mantle hosted auth — paid:** use only when the landing handoff records a
|
|
58
|
+
hosted allocation and client configuration. Mantle Platform operates the
|
|
59
|
+
identity provider; do not ask the user for a per-site GitHub OAuth App.
|
|
60
|
+
|
|
61
|
+
Do not claim that hosted auth can attach to an arbitrary local repo unless the
|
|
62
|
+
current Mantle landing flow explicitly supplies that handoff.
|
|
63
|
+
|
|
64
|
+
For the exact boundary, read
|
|
65
|
+
`node_modules/@aotter/mantle/docs/auth-hosting-model.md`.
|
|
66
|
+
|
|
67
|
+
## Self-hosted Auth
|
|
68
|
+
|
|
69
|
+
1. Ask the user to create a GitHub OAuth App:
|
|
87
70
|
|
|
88
71
|
- Homepage URL: `<worker-url>`
|
|
89
72
|
- Authorization callback URL: `<worker-url>/api/auth/callback/github`
|
|
90
73
|
- Device Flow: unchecked
|
|
91
74
|
|
|
92
|
-
|
|
93
|
-
it through the hidden shell prompt below.
|
|
75
|
+
2. Put non-secret values in `wrangler.toml`:
|
|
94
76
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
77
|
+
- `PUBLIC_ORIGIN`
|
|
78
|
+
- `GITHUB_CLIENT_ID`
|
|
79
|
+
- `ADMIN_GITHUB_LOGIN`
|
|
80
|
+
- correct Worker `name`
|
|
81
|
+
|
|
82
|
+
3. Keep the Client Secret out of chat. Prefer a Cloudflare connector for
|
|
83
|
+
secrets; otherwise use hidden shell input:
|
|
100
84
|
|
|
101
85
|
```bash
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
printf '%s' "$GITHUB_CLIENT_SECRET" | pnpm exec wrangler secret put GITHUB_CLIENT_SECRET
|
|
86
|
+
read -rsp "GitHub OAuth client secret: " MANTLE_GITHUB_CLIENT_SECRET && printf "\n"
|
|
87
|
+
printf '%s' "$MANTLE_GITHUB_CLIENT_SECRET" | pnpm exec wrangler secret put GITHUB_CLIENT_SECRET
|
|
105
88
|
openssl rand -hex 32 | pnpm exec wrangler secret put BETTER_AUTH_SECRET
|
|
106
|
-
unset
|
|
89
|
+
unset MANTLE_GITHUB_CLIENT_SECRET
|
|
107
90
|
```
|
|
108
91
|
|
|
109
|
-
Set `BETTER_AUTH_SECRET`
|
|
110
|
-
|
|
92
|
+
Set `BETTER_AUTH_SECRET` once and preserve it. Rotating it invalidates existing
|
|
93
|
+
sessions.
|
|
111
94
|
|
|
112
|
-
|
|
95
|
+
4. Commit and push only non-secret config, then redeploy:
|
|
113
96
|
|
|
114
97
|
```bash
|
|
115
98
|
git add wrangler.toml AGENTS.md
|
|
116
|
-
git commit -m "mantle: wire production
|
|
99
|
+
git commit -m "mantle: wire production auth"
|
|
117
100
|
git push
|
|
101
|
+
pnpm deploy
|
|
118
102
|
```
|
|
119
103
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
104
|
+
## Hosted Auth
|
|
105
|
+
|
|
106
|
+
Follow the landing handoff and generated client configuration. Hosted
|
|
107
|
+
configuration remains in landing-managed Cloudflare Worker bindings; do not
|
|
108
|
+
write client secrets into `wrangler.toml`.
|
|
123
109
|
|
|
124
|
-
|
|
110
|
+
Verify that admin sign-in redirects to Mantle Platform and Staff MCP
|
|
111
|
+
authenticates, then skip the self-hosted flow.
|
|
112
|
+
|
|
113
|
+
## Smoke Test
|
|
125
114
|
|
|
126
115
|
- public home route;
|
|
127
116
|
- `/admin/sign-in`;
|
|
128
|
-
-
|
|
117
|
+
- selected admin sign-in path;
|
|
129
118
|
- `/mcp/staff` with an agent client when available;
|
|
130
|
-
-
|
|
119
|
+
- one type-specific core workflow.
|
|
131
120
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
121
|
+
Media uploads are optional. Configure R2 only when the owner asks for
|
|
122
|
+
staff-managed files; then read
|
|
123
|
+
`node_modules/@aotter/mantle/docs/media-uploads.md`.
|
|
135
124
|
|
|
136
125
|
## Handoff
|
|
137
126
|
|
|
138
|
-
|
|
139
|
-
language:
|
|
140
|
-
|
|
141
|
-
- Public URL.
|
|
142
|
-
- Admin sign-in URL.
|
|
143
|
-
- Staff MCP URL.
|
|
144
|
-
- Operator setup URL (`https://mantle.tools/connect?site=...`).
|
|
145
|
-
- What changed locally and what was committed.
|
|
146
|
-
- Any intentionally deferred feature / provider setup.
|
|
147
|
-
|
|
148
|
-
Point future agents at `AGENTS.md`, `.mantle/launch-state.json`, and the
|
|
149
|
-
repo-local `.agent/skills/` directory (`mantle:develop`, `mantle:overlay`,
|
|
150
|
-
`mantle:theme`, `mantle:update`).
|
|
151
|
-
|
|
152
|
-
## Diagnostics
|
|
127
|
+
Return:
|
|
153
128
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
| `create_media_upload` is missing from Staff MCP | Optional R2 media is not configured, or `media.purposes` is empty | Only fix this if the owner explicitly wants media uploads; follow `docs/media-uploads.md`. |
|
|
162
|
-
| Upload session works but the PUT to R2 fails from Claude Cowork | Cowork sandbox egress blocks direct R2 uploads | Retry from Claude Code / another non-sandboxed agent. |
|
|
129
|
+
- public URL;
|
|
130
|
+
- admin sign-in URL;
|
|
131
|
+
- Staff MCP URL;
|
|
132
|
+
- operator setup URL:
|
|
133
|
+
`https://mantle.tools/connect?site=<url-encoded-worker-url>`;
|
|
134
|
+
- remote resources created or reused;
|
|
135
|
+
- auth mode and any intentionally deferred setup.
|
|
163
136
|
|
|
164
137
|
## Don't
|
|
165
138
|
|
|
166
|
-
- Don't
|
|
167
|
-
- Don't
|
|
168
|
-
- Don't re-create the repo or re-run the first deploy from the agent;
|
|
169
|
-
landing owns first provisioning.
|
|
170
|
-
- Don't resurrect `provision:up` / `provision:plan` as a second
|
|
171
|
-
provisioner; those scripts were retired with v2.
|
|
139
|
+
- Don't create remote resources before the user asks to ship.
|
|
140
|
+
- Don't ask for a Cloudflare API token in the base flow.
|
|
172
141
|
- Don't commit provider secrets.
|
|
173
|
-
- Don't
|
|
174
|
-
|
|
175
|
-
- Don't use `/admin/auth/github/callback`; the
|
|
142
|
+
- Don't require R2 for first production.
|
|
143
|
+
- Don't invent a second provision orchestrator.
|
|
144
|
+
- Don't use `/admin/auth/github/callback`; the callback is
|
|
176
145
|
`/api/auth/callback/github`.
|
package/skills/theme/SKILL.md
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: theme
|
|
3
3
|
description: Apply brand and visual direction in a Mantle project without depending on starter-owned skill semantics.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
applies_to: mantle@v0.1.0
|
|
4
|
+
metadata:
|
|
5
|
+
source: "@aotter/mantle"
|
|
6
|
+
sourcePath: skills/theme/SKILL.md
|
|
7
|
+
applies_to: mantle@v0.1.0
|
|
9
8
|
---
|
|
10
9
|
|
|
11
10
|
# Mantle Theme
|
package/skills/update/SKILL.md
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: update
|
|
3
3
|
description: Check a Mantle project for drift against its Core SDK, starter source, or installed plugin lockfiles.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
applies_to: mantle@v0.1.0
|
|
4
|
+
metadata:
|
|
5
|
+
source: "@aotter/mantle"
|
|
6
|
+
sourcePath: skills/update/SKILL.md
|
|
7
|
+
applies_to: mantle@v0.1.0
|
|
9
8
|
---
|
|
10
9
|
|
|
11
10
|
# Mantle Update
|