@topy-ai/maggie 0.1.0
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/bin/maggie.js +152 -0
- package/bundled-references/ai-native-blog-contract.md +310 -0
- package/bundled-references/blog-data-contract.md +146 -0
- package/bundled-references/blog-implementation.md +46 -0
- package/bundled-references/blog-operations-contract.md +68 -0
- package/bundled-references/browser-inspection.md +39 -0
- package/bundled-references/provider-adapter-contract.md +68 -0
- package/bundled-references/seo-technical-contract.md +75 -0
- package/bundled-skills/README.md +16 -0
- package/bundled-skills/maggie-blog-bootstrap/SKILL.md +243 -0
- package/bundled-skills/maggie-clone/SKILL.md +213 -0
- package/bundled-skills/maggie-deployment/SKILL.md +61 -0
- package/bundled-skills/maggie-deployment/agents/openai.yaml +4 -0
- package/bundled-skills/maggie-deployment/references/cloudflare.md +76 -0
- package/bundled-skills/maggie-deployment/references/provider-contract.md +32 -0
- package/bundled-skills/maggie-project-context/SKILL.md +38 -0
- package/bundled-skills/maggie-seo-geo/SKILL.md +53 -0
- package/bundled-skills/maggie-social-share/SKILL.md +48 -0
- package/bundled-tools/clis/maggie.py +748 -0
- package/bundled-tools/clis/maggie_clone.py +82 -0
- package/bundled-tools/clis/site_audit.py +99 -0
- package/bundled-tools/integrations/analytics.md +34 -0
- package/bundled-tools/integrations/maggie-api-pull.md +72 -0
- package/bundled-tools/integrations/maggie-project-context.md +62 -0
- package/bundled-tools/integrations/maggie-seo-audit.md +16 -0
- package/bundled-tools/integrations/maggie-skills-api.md +76 -0
- package/bundled-tools/integrations/maggie-social-share.md +23 -0
- package/bundled-tools/integrations/maggie-visibility.md +22 -0
- package/package.json +29 -0
- package/references/ai-native-blog-contract.md +310 -0
- package/references/blog-data-contract.md +146 -0
- package/references/blog-implementation.md +46 -0
- package/references/blog-operations-contract.md +68 -0
- package/references/browser-inspection.md +39 -0
- package/references/provider-adapter-contract.md +68 -0
- package/references/seo-technical-contract.md +75 -0
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maggie-clone
|
|
3
|
+
description: Reverse-engineer one or more authorized websites and create matching pages inside an existing Maggie blog project. Use with /maggie-clone <target-url1> [<target-url2> ...] when a user wants to replicate a page's structure, content, assets, responsive behavior, and interactions.
|
|
4
|
+
argument-hint: "<target-url1> [<target-url2> ...]"
|
|
5
|
+
metadata:
|
|
6
|
+
version: 1.0.0
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Maggie Clone
|
|
10
|
+
|
|
11
|
+
Create one or more website-inspired pages inside an existing Maggie blog
|
|
12
|
+
project. This workflow is for authorized sites and pages. It preserves the
|
|
13
|
+
host project's bootstrap foundation, public blog routes, content contracts,
|
|
14
|
+
SEO safeguards, and existing user work while adding namespaced page output.
|
|
15
|
+
|
|
16
|
+
Invoke it as:
|
|
17
|
+
|
|
18
|
+
```text
|
|
19
|
+
/maggie-clone <target-url1> [<target-url2> ...]
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
The URL path becomes the default destination path. Multiple URLs from one
|
|
23
|
+
origin remain separate routes; query strings and fragments are inspected for
|
|
24
|
+
state but do not silently create duplicate routes.
|
|
25
|
+
|
|
26
|
+
## Boundaries
|
|
27
|
+
|
|
28
|
+
- Run `maggie-blog-bootstrap` first. Require a completed
|
|
29
|
+
`.maggie/bootstrap-state.json`; if it is absent, stop and ask the user to
|
|
30
|
+
bootstrap the project.
|
|
31
|
+
- Analyze the host project before editing. Never replace its framework, UI
|
|
32
|
+
system, icon set, fonts, database, blog routes, metadata, sitemap, or
|
|
33
|
+
analytics merely to match the target.
|
|
34
|
+
- Clone presentation and behavior, not credentials, private data, tracking
|
|
35
|
+
secrets, checkout flows, authentication, or proprietary backend logic.
|
|
36
|
+
- Use real public assets only when the user is authorized to reproduce them.
|
|
37
|
+
Preserve attribution or licensing requirements and report assets that could
|
|
38
|
+
not be safely reused.
|
|
39
|
+
- The clone is an additive page operation. Do not overwrite an existing route,
|
|
40
|
+
component namespace, asset namespace, or research artifact without explicit
|
|
41
|
+
approval.
|
|
42
|
+
- Keep AI CMO writes, publishing, and external deployment separate from local
|
|
43
|
+
page construction. A clone does not automatically create, publish, or queue
|
|
44
|
+
content in Maggie.
|
|
45
|
+
|
|
46
|
+
## Required browser capability
|
|
47
|
+
|
|
48
|
+
Browser automation is required. Use the available Chrome/browser/Playwright
|
|
49
|
+
MCP or equivalent browser tool to inspect the target, take screenshots, resize
|
|
50
|
+
the viewport, scroll, click, hover, and evaluate DOM/computed styles. Read
|
|
51
|
+
[`references/browser-inspection.md`](../../references/browser-inspection.md)
|
|
52
|
+
for the inspection contract. If no browser tool is available, stop before
|
|
53
|
+
editing and report the missing capability.
|
|
54
|
+
|
|
55
|
+
## Phase 0: Preflight and plan
|
|
56
|
+
|
|
57
|
+
1. Parse and normalize all target URLs. Reject invalid, inaccessible, or
|
|
58
|
+
ambiguous URLs before writing files.
|
|
59
|
+
2. Run:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
python3 tools/clis/maggie.py status <project-root>
|
|
63
|
+
python3 tools/clis/maggie.py doctor <project-root> --require-bootstrap --strict
|
|
64
|
+
python3 tools/clis/maggie_clone.py plan <url1> [<url2> ...] --project <project-root>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The clone planner emits collision-resistant site/page keys and destination
|
|
68
|
+
namespaces. Treat its output as the route and artifact plan.
|
|
69
|
+
3. Inventory existing `src/app`, `src/pages`, public routes, blog components,
|
|
70
|
+
`docs/research`, screenshots, downloaded assets, redirects, sitemap,
|
|
71
|
+
robots, metadata, and analytics. Record what will remain unchanged.
|
|
72
|
+
4. Run the host project's build or typecheck gate before editing. If the
|
|
73
|
+
project is already broken, report it and do not attribute the failure to
|
|
74
|
+
the clone.
|
|
75
|
+
5. For URLs from different origins, ask for separate project roots or explicit
|
|
76
|
+
approval for a combined route-scoped app. Do not mix global fonts or CSS
|
|
77
|
+
foundations silently.
|
|
78
|
+
|
|
79
|
+
Write an output plan before implementation containing, for every URL:
|
|
80
|
+
|
|
81
|
+
```text
|
|
82
|
+
source URL -> destination route
|
|
83
|
+
site key / page key
|
|
84
|
+
research artifact root
|
|
85
|
+
screenshot root
|
|
86
|
+
component namespace
|
|
87
|
+
asset namespace
|
|
88
|
+
existing files preserved
|
|
89
|
+
shared foundation files that may change
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Phase 1: Reconnaissance
|
|
93
|
+
|
|
94
|
+
Inspect the target before building it. Capture desktop (1440px), tablet
|
|
95
|
+
(768px), and mobile (390px) views. For each target record:
|
|
96
|
+
|
|
97
|
+
- page topology from top to bottom and fixed/sticky layers;
|
|
98
|
+
- exact visible text, links, labels, alt text, forms, and public content;
|
|
99
|
+
- fonts, weights, colors, spacing, breakpoints, radii, shadows, gradients,
|
|
100
|
+
borders, and responsive layout changes from computed styles;
|
|
101
|
+
- every image, video, SVG, favicon, font, background image, and layered asset;
|
|
102
|
+
- interaction models: static, click-driven, hover-driven, scroll-driven,
|
|
103
|
+
intersection-observer-driven, keyboard, or time-driven;
|
|
104
|
+
- loading, empty, error, open, active, hover, and scrolled states where
|
|
105
|
+
observable;
|
|
106
|
+
- framework and client behavior clues without copying private implementation
|
|
107
|
+
details.
|
|
108
|
+
|
|
109
|
+
Do not click first when a section may be scroll-driven. Scroll slowly, then
|
|
110
|
+
test clicks and hovers. For tabs or pills, capture every state. For headers or
|
|
111
|
+
sticky elements, record before/after computed values and the trigger.
|
|
112
|
+
|
|
113
|
+
Persist the evidence before building:
|
|
114
|
+
|
|
115
|
+
```text
|
|
116
|
+
docs/research/<site-key>/<page-key>/
|
|
117
|
+
OUTPUT_PLAN.md
|
|
118
|
+
PAGE_TOPOLOGY.md
|
|
119
|
+
BEHAVIORS.md
|
|
120
|
+
DESIGN_TOKENS.md
|
|
121
|
+
COMPONENT_INVENTORY.md
|
|
122
|
+
LAYOUT_ARCHITECTURE.md
|
|
123
|
+
TECH_STACK_ANALYSIS.md
|
|
124
|
+
ASSET_MANIFEST.md
|
|
125
|
+
components/<component>.spec.md
|
|
126
|
+
docs/design-references/<site-key>/<page-key>/
|
|
127
|
+
desktop.png, tablet.png, mobile.png, and state screenshots
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Every component spec must be written before its builder work starts. Include
|
|
131
|
+
the target file, screenshot, DOM structure, exact computed values, all states,
|
|
132
|
+
verbatim content, assets, interaction model, and desktop/tablet/mobile
|
|
133
|
+
behavior. Never ask a builder to guess values or merely “read the docs”.
|
|
134
|
+
|
|
135
|
+
## Phase 2: Foundation and assets
|
|
136
|
+
|
|
137
|
+
After the user approves the plan where it changes shared foundations:
|
|
138
|
+
|
|
139
|
+
1. Keep the existing Maggie bootstrap contracts and add only route-scoped
|
|
140
|
+
tokens or components unless a style is genuinely shared.
|
|
141
|
+
2. Reuse the host's existing UI primitives, icon library, font, and data
|
|
142
|
+
contracts. Extract target SVGs into the site-scoped namespace only when
|
|
143
|
+
authorized and necessary.
|
|
144
|
+
3. Download public assets into the planned namespaced directory with a unique
|
|
145
|
+
downloader. Validate status, content type, dimensions, and filename; never
|
|
146
|
+
overwrite another target's file. Record source URL, local path, license or
|
|
147
|
+
reuse note, and failures in `ASSET_MANIFEST.md`.
|
|
148
|
+
4. Do not use generated artwork as a substitute for a logo, trademark,
|
|
149
|
+
product screenshot, certification mark, or other distinctive asset. Report
|
|
150
|
+
unrecoverable assets instead.
|
|
151
|
+
5. Keep external keys and analytics IDs server-side. The cloned page must not
|
|
152
|
+
inherit the target's tracking identifiers.
|
|
153
|
+
|
|
154
|
+
## Phase 3: Build and assemble
|
|
155
|
+
|
|
156
|
+
Build small components from the approved specs. For complex sections, split
|
|
157
|
+
sub-components before the wrapper. Put output under the planner's site/page
|
|
158
|
+
namespace, for example:
|
|
159
|
+
|
|
160
|
+
```text
|
|
161
|
+
src/components/sites/<site-key>/<page-key>/
|
|
162
|
+
public/sites/<site-key>/<page-key>/
|
|
163
|
+
src/app/<destination-path>/page.tsx
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Use the exact normalized destination route. A first clone may use `/` only in
|
|
167
|
+
an untouched scaffold; otherwise preserve the source pathname or the user-
|
|
168
|
+
approved destination. Preserve all existing routes and use real 404 behavior.
|
|
169
|
+
|
|
170
|
+
Implement observed behavior, including responsive layout, scroll transitions,
|
|
171
|
+
hover/focus states, tabs, dialogs, carousels, and reduced-motion behavior. Do
|
|
172
|
+
not turn a scroll-driven interaction into a click-only tab or replace a video
|
|
173
|
+
with a guessed HTML mockup.
|
|
174
|
+
|
|
175
|
+
The cloned page remains a Maggie blog project page:
|
|
176
|
+
|
|
177
|
+
- use the host's canonical URL and metadata helpers;
|
|
178
|
+
- keep sitemap inclusion explicit and published-only;
|
|
179
|
+
- keep Article/BlogPosting JSON-LD limited to actual posts, not arbitrary
|
|
180
|
+
marketing pages;
|
|
181
|
+
- preserve robots, analytics opt-out behavior, security headers, and API key
|
|
182
|
+
boundaries;
|
|
183
|
+
- if the page is a blog landing or post route, map it to the stable Maggie post
|
|
184
|
+
contract instead of inventing fields.
|
|
185
|
+
|
|
186
|
+
## Phase 4: Verification
|
|
187
|
+
|
|
188
|
+
For every target:
|
|
189
|
+
|
|
190
|
+
1. Run the host typecheck/lint/build commands and `doctor --strict`.
|
|
191
|
+
2. Verify the exact destination URL, neighboring blog routes, 404 behavior,
|
|
192
|
+
sitemap, robots, canonical metadata, Open Graph, and JSON-LD.
|
|
193
|
+
3. Take same-viewport screenshots of target and local page at 1440px and
|
|
194
|
+
390px; compare section by section and fix measured discrepancies.
|
|
195
|
+
4. Re-run the interaction sweep: scroll, click, hover, keyboard focus, open
|
|
196
|
+
menus/dialogs, and responsive resizing.
|
|
197
|
+
5. Run:
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
python3 tools/clis/site_audit.py <local-or-production-url> --json
|
|
201
|
+
python3 tools/clis/maggie.py doctor <project-root> --require-bootstrap --strict
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Do not claim pixel fidelity when a target asset, authenticated state, blocked
|
|
205
|
+
browser behavior, or dynamic backend could not be inspected. Report remaining
|
|
206
|
+
differences and whether they are known, measured, or unverified.
|
|
207
|
+
|
|
208
|
+
## Completion report
|
|
209
|
+
|
|
210
|
+
Report source-to-route mappings, preserved routes, sections/components/specs,
|
|
211
|
+
assets downloaded and failed, files changed, commands run, build/audit status,
|
|
212
|
+
visual QA result, and known limitations. Deployment, API Pull, rewrite, and
|
|
213
|
+
publication require a separate explicit request.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maggie-deployment
|
|
3
|
+
description: Deploy and operate Maggie blog projects with Cloudflare Workers as the default target, while preserving an adapter boundary for VPS, GCP, and AWS.
|
|
4
|
+
metadata:
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Maggie Deployment
|
|
9
|
+
|
|
10
|
+
Deploy a confirmed Maggie blog to a real hosting target. Cloudflare Workers is
|
|
11
|
+
the default target for dynamic Astro sites; use the Cloudflare reference for
|
|
12
|
+
Worker, D1, R2, KV, secrets, environments, and verification details.
|
|
13
|
+
|
|
14
|
+
## Required workflow
|
|
15
|
+
|
|
16
|
+
1. Run `python3 tools/clis/maggie.py analyze <project> --save` and inspect the
|
|
17
|
+
selected framework, runtime, build/deploy commands, route inventory, data
|
|
18
|
+
layer, and deployment risks.
|
|
19
|
+
2. Confirm the target, domain, environment (`staging` or `production`), data
|
|
20
|
+
store, media store, secret names, and rollback owner before any external
|
|
21
|
+
mutation. Production deploy is never implied by a build request.
|
|
22
|
+
3. Run the host project's typecheck/build/contract/SEO gates. A Cloudflare
|
|
23
|
+
build must not include Node-only persistence or filesystem writes in Worker
|
|
24
|
+
request paths.
|
|
25
|
+
4. Provision or bind only the resources declared by the target manifest. Keep
|
|
26
|
+
D1/KV/R2 IDs and provider secrets in Wrangler/secret-manager configuration,
|
|
27
|
+
never in source, generated reports, or client bundles.
|
|
28
|
+
5. Deploy staging first, run the deployed route/metadata/sitemap/robots/API
|
|
29
|
+
smoke checks, then request explicit production approval.
|
|
30
|
+
6. Record deployment URL, commit, environment, bindings, migration version,
|
|
31
|
+
verification result, and rollback command in the project's handover state.
|
|
32
|
+
|
|
33
|
+
## Cloudflare default
|
|
34
|
+
|
|
35
|
+
The Astro starter includes a Cloudflare Worker target in `wrangler.jsonc` and
|
|
36
|
+
uses `@astrojs/cloudflare` when `MAGGIE_DEPLOY_PROVIDER=cloudflare`. The local
|
|
37
|
+
Node target remains useful for SQLite development. Do not claim the Worker is
|
|
38
|
+
production-ready while `better-sqlite3`, `node:fs`, or another Node-only module
|
|
39
|
+
is on a request path; follow [cloudflare.md](references/cloudflare.md) to move
|
|
40
|
+
the database to D1 and media to R2/Cloudflare Images or an explicitly selected
|
|
41
|
+
external adapter.
|
|
42
|
+
|
|
43
|
+
## Provider boundary
|
|
44
|
+
|
|
45
|
+
Deployment providers implement the same conceptual operations:
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
inspect → plan → provision/bind → migrate → build → deploy → verify → rollback
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Cloudflare is the first complete implementation. Future VPS, GCP, and AWS
|
|
52
|
+
providers must add a provider reference and adapter without changing the blog
|
|
53
|
+
content, approval, URL, or SEO contracts. Read
|
|
54
|
+
[provider-contract.md](references/provider-contract.md) when adding one.
|
|
55
|
+
|
|
56
|
+
## Stop conditions
|
|
57
|
+
|
|
58
|
+
Stop before deployment when the target is ambiguous, the domain is not
|
|
59
|
+
confirmed, a production secret/binding is missing, migrations are not
|
|
60
|
+
idempotent/backed up, the build target and runtime disagree, or verification
|
|
61
|
+
cannot prove public/private route and indexability behavior.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Cloudflare Workers deployment
|
|
2
|
+
|
|
3
|
+
Use this guide when the user selects Cloudflare or when Cloudflare is the
|
|
4
|
+
default for a new Maggie Astro deployment.
|
|
5
|
+
|
|
6
|
+
## Target architecture
|
|
7
|
+
|
|
8
|
+
```text
|
|
9
|
+
Astro SSR → Cloudflare Worker
|
|
10
|
+
├─ D1: blog/content/ops state
|
|
11
|
+
├─ R2 or Images: originals and derivatives
|
|
12
|
+
├─ KV: cache/session/rate-limit state
|
|
13
|
+
├─ Secrets: AI CMO, email, analytics credentials
|
|
14
|
+
└─ Cron/Workflows: scheduled pull, sitemap matching, reports
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The Worker adapter supports on-demand rendered Astro routes. Use Wrangler as
|
|
18
|
+
the source of truth for Worker configuration and bindings. The starter's
|
|
19
|
+
`wrangler.jsonc` declares D1, R2, and KV binding names and separate staging and
|
|
20
|
+
production environments; fill or provision resource IDs according to the
|
|
21
|
+
chosen Cloudflare account before deploy.
|
|
22
|
+
|
|
23
|
+
## Runtime compatibility gate
|
|
24
|
+
|
|
25
|
+
The current local starter uses `better-sqlite3` and filesystem media writes.
|
|
26
|
+
Those are Node development implementations, not Worker request implementations.
|
|
27
|
+
Before a Cloudflare production build:
|
|
28
|
+
|
|
29
|
+
1. select `MAGGIE_DEPLOY_PROVIDER=cloudflare`;
|
|
30
|
+
2. use a D1-backed repository for all request-time content and Ops queries;
|
|
31
|
+
3. use R2/Images or Cloudinary for media, with public delivery URLs stored in
|
|
32
|
+
`media_assets.delivery_url`;
|
|
33
|
+
4. replace filesystem sessions/cache with KV or a supported Worker mechanism;
|
|
34
|
+
5. keep migrations idempotent and run them separately with Wrangler;
|
|
35
|
+
6. run the build and deployed verification against the Worker runtime.
|
|
36
|
+
|
|
37
|
+
Do not hide a Node fallback behind a Cloudflare build. If the adapter is not
|
|
38
|
+
ready, stop at the plan stage and report the exact blocking module/binding.
|
|
39
|
+
|
|
40
|
+
## Commands
|
|
41
|
+
|
|
42
|
+
From the Astro starter:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npm run build:cloudflare
|
|
46
|
+
npx wrangler d1 migrations apply DB --local
|
|
47
|
+
npx wrangler dev
|
|
48
|
+
npx wrangler deploy --env staging
|
|
49
|
+
npx wrangler deploy --env production
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Build separately for each Cloudflare environment when using the Astro
|
|
53
|
+
Cloudflare Vite integration. Verify staging before production and retain the
|
|
54
|
+
previous Worker version for rollback.
|
|
55
|
+
|
|
56
|
+
## Secrets and domains
|
|
57
|
+
|
|
58
|
+
Set secrets with `wrangler secret put NAME --env staging` or the production
|
|
59
|
+
equivalent. Only variable names belong in `.env.example` and `wrangler.jsonc`.
|
|
60
|
+
Custom domains/routes must be confirmed before production deployment; a
|
|
61
|
+
`workers.dev` URL is suitable for staging verification, not a replacement for
|
|
62
|
+
the user's canonical domain.
|
|
63
|
+
|
|
64
|
+
## Verification gate
|
|
65
|
+
|
|
66
|
+
After deploy, check:
|
|
67
|
+
|
|
68
|
+
- homepage and every published sitemap URL return expected status;
|
|
69
|
+
- canonical, robots, Open Graph, Article JSON-LD, `datePublished`, and
|
|
70
|
+
`dateModified` point to the deployed host;
|
|
71
|
+
- `/robots.txt` declares the correct sitemap and private Ops routes are not
|
|
72
|
+
indexable;
|
|
73
|
+
- authenticated Ops/API routes reject unauthenticated requests;
|
|
74
|
+
- D1 migration version, R2/media delivery, KV/session behavior, API Pull,
|
|
75
|
+
rewrite queue, and scheduled triggers are observable;
|
|
76
|
+
- staging has no production analytics or email recipients.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Deployment provider contract
|
|
2
|
+
|
|
3
|
+
Deployment is a provider adapter, not a collection of vendor commands spread
|
|
4
|
+
through blog code.
|
|
5
|
+
|
|
6
|
+
Every provider must expose these phases:
|
|
7
|
+
|
|
8
|
+
| Phase | Required result |
|
|
9
|
+
|---|---|
|
|
10
|
+
| `inspect` | target, runtime, bindings, secrets-by-name, and risks |
|
|
11
|
+
| `plan` | explicit resource/migration/deploy plan with environment |
|
|
12
|
+
| `provision` | resources created or existing IDs confirmed |
|
|
13
|
+
| `migrate` | idempotent migration applied and recorded |
|
|
14
|
+
| `build` | reproducible artifact for the selected runtime |
|
|
15
|
+
| `deploy` | immutable commit/version and URL recorded |
|
|
16
|
+
| `verify` | route, metadata, sitemap, robots, API and health checks |
|
|
17
|
+
| `rollback` | known previous version and data rollback boundary |
|
|
18
|
+
|
|
19
|
+
The provider must distinguish staging and production, never print secret
|
|
20
|
+
values, and fail closed when a binding is absent. A provider may use a CLI or
|
|
21
|
+
API, but the project keeps one declarative target manifest and one handover
|
|
22
|
+
record.
|
|
23
|
+
|
|
24
|
+
The application contract remains provider-neutral:
|
|
25
|
+
|
|
26
|
+
- D1/Postgres/SQLite adapters implement the canonical content queries;
|
|
27
|
+
- R2/Cloudflare Images/Cloudinary/local adapters implement media storage;
|
|
28
|
+
- KV/Redis/database adapters implement cache/session needs;
|
|
29
|
+
- email providers remain behind the existing email adapter.
|
|
30
|
+
|
|
31
|
+
No provider-specific binding name belongs in post frontmatter, canonical URL
|
|
32
|
+
logic, publication state, rewrite queue state, or sitemap generation.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maggie-project-context
|
|
3
|
+
description: Sync a site's safe AI CMO Project, selected brand voice, site settings, and CTA context into a local generated context file. Use when connecting a vibe-coded blog or existing website to AI CMO, refreshing brand context, or diagnosing missing CTA/project data.
|
|
4
|
+
metadata:
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Maggie Project Context
|
|
9
|
+
|
|
10
|
+
Use the authenticated AI CMO Project as the source of truth for brand
|
|
11
|
+
positioning, audience, voice, site URL, and conversion CTAs.
|
|
12
|
+
|
|
13
|
+
## Workflow
|
|
14
|
+
|
|
15
|
+
1. Inspect the host project and confirm where generated configuration belongs.
|
|
16
|
+
2. Confirm `AI_CMO_API_KEY` is available server-side; never put it in browser
|
|
17
|
+
code, a committed file, logs, screenshots, or a public build.
|
|
18
|
+
3. Run `python3 scripts/sync_ai_cmo_context.py` from this repository or use the
|
|
19
|
+
equivalent server-side request to `GET /project-context`.
|
|
20
|
+
4. Keep the original `context` payload and consume the normalized `brand`,
|
|
21
|
+
`site`, and `conversion.ctas` views.
|
|
22
|
+
5. Use `ETag`/`If-None-Match` for scheduled refreshes.
|
|
23
|
+
6. Show a diff and request approval before changing public copy, links, or
|
|
24
|
+
publishing behavior.
|
|
25
|
+
|
|
26
|
+
## Mapping
|
|
27
|
+
|
|
28
|
+
```text
|
|
29
|
+
project.products_services + project.usp -> product features
|
|
30
|
+
project.target_audience + target_problem -> use cases
|
|
31
|
+
brand_voice -> writing style
|
|
32
|
+
project.cta.default_url -> conversion.ctas.default
|
|
33
|
+
project.cta.other_urls -> conversion.ctas.additional
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Do not export team, uploads, testimonials, market research, internal workflow
|
|
37
|
+
state, API keys, or OAuth tokens into public source-of-truth files. Missing or
|
|
38
|
+
stale context blocks automatic publishing and falls back to a preview.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maggie-seo-geo
|
|
3
|
+
description: Plan, audit, create, rewrite, and measure content for AI CMO's paid SEO and GEO workflow. Use for topic opportunities, AI visibility, technical SEO, extractable article structure, sitemap-based rewrites, GSC readback, or SEO/GEO client reports.
|
|
4
|
+
metadata:
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Maggie SEO and GEO
|
|
9
|
+
|
|
10
|
+
Treat SEO and GEO as one measurable content system: people-first content,
|
|
11
|
+
technical accessibility, extractable structure, evidence, authority, brand
|
|
12
|
+
voice, CTA alignment, and observed search/AI outcomes.
|
|
13
|
+
|
|
14
|
+
## Choose the mode
|
|
15
|
+
|
|
16
|
+
- **Plan:** combine Project Context, GSC/search signals, competitor gaps, and
|
|
17
|
+
AI visibility prompts into topic clusters and briefs.
|
|
18
|
+
- **Audit:** inspect robots, sitemap, canonical URLs, metadata, JSON-LD,
|
|
19
|
+
headings, links, author/freshness signals, and AI crawler access.
|
|
20
|
+
- **Create/rewrite:** preserve the content identity and canonical URL; produce
|
|
21
|
+
a preview, run quality gates, then deliver only after approval.
|
|
22
|
+
- **Measure:** distinguish retrieved, cited, mentioned, recommended, ranked,
|
|
23
|
+
clicked, and converted. Never convert a model suggestion into a metric.
|
|
24
|
+
|
|
25
|
+
## AI CMO API Pull lifecycle
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
project-context -> sitemap match -> rewrite queue -> updates -> local publish
|
|
29
|
+
-> report-state -> GSC/GA4/AI visibility readback
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Use the API Pull integration contract for authentication, quota, retries,
|
|
33
|
+
idempotency, and exact endpoint behavior. A sitemap URL is inventory evidence,
|
|
34
|
+
not permission to overwrite a post: only explicitly matched/tracked assets may
|
|
35
|
+
enter the rewrite queue.
|
|
36
|
+
|
|
37
|
+
## Quality gate
|
|
38
|
+
|
|
39
|
+
Before delivery, check:
|
|
40
|
+
|
|
41
|
+
- search intent and topical coverage;
|
|
42
|
+
- a direct answer and useful heading structure;
|
|
43
|
+
- original evidence and links for material claims;
|
|
44
|
+
- author, date, freshness, and transparent limitations;
|
|
45
|
+
- Article/FAQ/HowTo/Product schema only where accurate;
|
|
46
|
+
- canonical URL, slug, internal links, images and alt text;
|
|
47
|
+
- AI crawler access without creating AI-only thin pages;
|
|
48
|
+
- Project brand voice and CTA fidelity;
|
|
49
|
+
- no unsupported rankings, traffic, citation, or conversion promises.
|
|
50
|
+
|
|
51
|
+
Free audits and previews may run without generation. Paid generation,
|
|
52
|
+
monitoring, rewriting, and recurring reports require the server entitlement
|
|
53
|
+
and must stop cleanly on 401, 403, 429, or quota exhaustion.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maggie-social-share
|
|
3
|
+
description: Turn approved AI CMO articles and content assets into platform-native social drafts, scheduled posts, and measured distribution. Use for Social Share planning, LinkedIn/Facebook copy, CTA mapping, calendars, approvals, publish retries, or social performance readback.
|
|
4
|
+
metadata:
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Maggie Social Share
|
|
9
|
+
|
|
10
|
+
Social Share is a distribution layer downstream of the same AI CMO Project,
|
|
11
|
+
brand voice, CTA, canonical URL, content asset, and approval state used by SEO
|
|
12
|
+
and GEO. It is not a second content source of truth.
|
|
13
|
+
|
|
14
|
+
## Workflow
|
|
15
|
+
|
|
16
|
+
1. Select an approved or explicitly shareable source article/content asset.
|
|
17
|
+
2. Read Project Context and the selected social tone/template.
|
|
18
|
+
3. Extract one clear content atom: insight, statistic, process, story, or
|
|
19
|
+
contrarian point. Do not invent proof absent from the source.
|
|
20
|
+
4. Create platform-native variants with the platform's current limits and a
|
|
21
|
+
clear CTA. Preserve the source canonical URL and apply the configured UTM
|
|
22
|
+
policy.
|
|
23
|
+
5. Store drafts as calendar items with source ID, platform, version, approval,
|
|
24
|
+
scheduled time, and local/remote status.
|
|
25
|
+
6. Publish only after the required approval and entitlement checks. Record the
|
|
26
|
+
publication attempt and provider ID; retry only with bounded idempotency.
|
|
27
|
+
7. Read back clicks, engagement, assisted conversions, and failures separately
|
|
28
|
+
from article SEO/GEO metrics.
|
|
29
|
+
|
|
30
|
+
## Default output
|
|
31
|
+
|
|
32
|
+
```text
|
|
33
|
+
source_content_id, canonical_url, platform, format, hook, body, cta,
|
|
34
|
+
hashtags_or_mentions, scheduled_at, approval_state, tracking_url
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Start with LinkedIn and Facebook adapters. Add other platforms only when the
|
|
38
|
+
adapter can declare limits, auth scope, media requirements, idempotency, and
|
|
39
|
+
delete/republish behavior.
|
|
40
|
+
|
|
41
|
+
## Safety and commercial boundary
|
|
42
|
+
|
|
43
|
+
- A social draft is not a published post.
|
|
44
|
+
- Never expose provider tokens or API CMO keys.
|
|
45
|
+
- Do not make claims that are absent from approved source evidence.
|
|
46
|
+
- Do not publish when the source article is unpublished, the CTA is missing, or
|
|
47
|
+
the server denies the paid feature.
|
|
48
|
+
- Report provider failures without marking the item published.
|