@topy-ai/maggie 0.7.26 → 0.7.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/README.md +50 -4
  2. package/README.zh-TW.md +4 -2
  3. package/bin/maggie.js +17 -5
  4. package/bundled-contracts/maggie-deployment/runtime-parity-v1.schema.json +20 -2
  5. package/bundled-contracts/maggie-seo/model-policy-v1.schema.json +17 -0
  6. package/bundled-contracts/maggie-service-booking/resolver-v1.schema.json +17 -0
  7. package/bundled-contracts/maggie-service-booking/worker-health-v1.schema.json +17 -0
  8. package/bundled-contracts/maggiedash/README.md +5 -0
  9. package/bundled-contracts/maggiedash/migration-preflight-v1.schema.json +16 -0
  10. package/bundled-references/blog-translation-ingestion.md +7 -0
  11. package/bundled-references/maggiedash-integration.md +19 -0
  12. package/bundled-skills/maggie-blog-bootstrap/SKILL.md +21 -0
  13. package/bundled-skills/maggie-dash/SKILL.md +34 -0
  14. package/bundled-skills/maggie-deployment/SKILL.md +22 -7
  15. package/bundled-skills/maggie-deployment/references/vps.md +12 -2
  16. package/bundled-skills/maggie-feedback/SKILL.md +13 -3
  17. package/bundled-skills/maggie-marketplace/SKILL.md +20 -1
  18. package/bundled-skills/maggie-seo-geo/SKILL.md +11 -0
  19. package/bundled-skills/maggie-service-booking/SKILL.md +19 -0
  20. package/bundled-tools/clis/maggie.py +29 -1
  21. package/bundled-tools/clis/maggie_dash.py +108 -0
  22. package/bundled-tools/clis/maggie_deployment.py +43 -4
  23. package/bundled-tools/clis/maggie_deployment_parity.py +42 -0
  24. package/bundled-tools/clis/maggie_feedback.py +108 -0
  25. package/bundled-tools/clis/maggie_localization.py +18 -1
  26. package/bundled-tools/clis/maggie_marketplace.py +58 -4
  27. package/bundled-tools/clis/maggie_migration.py +43 -0
  28. package/bundled-tools/clis/maggie_service_booking.py +84 -1
  29. package/bundled-tools/integrations/maggie-api-pull.md +8 -4
  30. package/bundled-tools/runtime/maggie_dash_store.py +20 -0
  31. package/package.json +1 -1
  32. package/references/blog-translation-ingestion.md +7 -0
  33. package/references/maggiedash-integration.md +19 -0
package/README.md CHANGED
@@ -60,8 +60,17 @@ Maggie keeps the existing project foundation and asks for decisions before
60
60
  shared routes, analytics, or publishing boundaries change. The current
61
61
  package ships 19 installable skills and a local-first MaggieDash foundation.
62
62
 
63
- The current release is `0.7.26`. It corrects the top-level feedback help and
64
- includes the host-owned mobile app surface
63
+ The current release is `0.7.28`. It adds a versioned Gemini model policy with
64
+ an explicit fallback and provenance, bundled-CLI version discovery, and a
65
+ bundled-first dispatcher that avoids stale project wrappers. It also adds
66
+ privacy-safe feedback batch review/duplicate detection, marketplace
67
+ enrichment evidence, bounded booking worker/resolver reports, and read-only
68
+ migration preflight contracts. The release retains the provider-neutral MaggieDash host
69
+ adapter contract, idempotent PostgreSQL starter schema, type-only backend
70
+ boundary, runtime endpoint conformance evidence, safe quota/error summaries,
71
+ stale marketplace readiness revalidation, explicit VPS port/origin planning,
72
+ first-release rollback evidence, and clean non-interactive bootstrap errors.
73
+ It retains the host-owned mobile app surface
65
74
  contract (`maggie design app-init`/`app-validate`), direct Astro route
66
75
  resolution, correlated feedback batches, and runtime package-version capture.
67
76
 
@@ -104,6 +113,9 @@ maggie dash api-contract --spec .maggie/openapi.json
104
113
  maggie dash api-contract --spec https://example.test/openapi.json
105
114
  maggie dash schema-audit --inventory .maggie/schema-inventory.json --fail-on-unread
106
115
  maggie dash ui runtime-validate --evidence .maggie/dashboard-runtime.json
116
+ maggie dash conformance --contract .maggie/host-adapter-v2.json \
117
+ --evidence .maggie/maggiedash-conformance.json \
118
+ --output docs/maggiedash-conformance.json
107
119
  maggie docs audit --project . --docs-dir docs --output docs/documentation-audit.json
108
120
  ```
109
121
 
@@ -199,6 +211,7 @@ redacted and explicit; it is never promoted to active memory automatically.
199
211
  The CLI provides the installer plus durable workflow commands:
200
212
 
201
213
  ```text
214
+ maggie --version | version
202
215
  maggie init | install | update | remove | list | doctor
203
216
  maggie cleanup --project . [--confirm]
204
217
  maggie bootstrap interview | phase ...
@@ -219,6 +232,7 @@ maggie clone-to-template ... # URL → validated marketplace template
219
232
  maggie marketplace ... # catalog and on-demand template workflow
220
233
  maggie memory ... # confirmed preferences and lessons
221
234
  maggie feedback ... # redact, preview, batch, submit, list
235
+ maggie feedback batch-review ... # aggregate bounded drafts and detect duplicates
222
236
  maggie qa ... # scenario browser QA, fix/retest, release gate
223
237
  maggie localization ... # plan, validate, review, publish, stale
224
238
  maggie service ... # import, sync/report, catalogue, lifecycle, validate
@@ -233,9 +247,13 @@ maggie deployment | migration | release | analytics | schedule
233
247
  maggie deployment readiness --project PATH
234
248
  maggie deployment parity --project PATH --evidence FILE --output FILE
235
249
  maggie migration identity --identity-file FILE [--expected-file FILE]
250
+ maggie migration preflight --evidence FILE [--output FILE]
236
251
  maggie deployment canary --asset URL=SHA256 --render-report report.json
237
252
  maggie design icon-inventory --source-dir src --runtime assets/icons.css
238
253
  maggie api lifecycle | site-audit | ops audit
254
+ maggie marketplace enrichment-report --project PATH --input FILE [--output FILE]
255
+ maggie service worker-health --project PATH --evidence FILE [--output FILE]
256
+ maggie service resolver-audit --project PATH --evidence FILE [--output FILE]
239
257
  ```
240
258
 
241
259
  Agent content writes must declare the exact host origin that minted the
@@ -398,8 +416,8 @@ artifact schemas.
398
416
  Recommended upgrade sequence for the current release:
399
417
 
400
418
  ```bash
401
- npx @topy-ai/maggie@0.7.26 update --project . --force
402
- npx @topy-ai/maggie@0.7.26 cleanup --project .
419
+ npx @topy-ai/maggie@0.7.28 update --project . --force
420
+ npx @topy-ai/maggie@0.7.28 cleanup --project .
403
421
  ```
404
422
 
405
423
  Maintainers should pass npm credentials through the repository helper, never
@@ -570,6 +588,34 @@ maggie feedback batch --project . --batch-file ./feedback-batch.json
570
588
 
571
589
  The batch command never submits automatically or writes active memory.
572
590
 
591
+ Aggregate a correlated batch before reviewing individual drafts:
592
+
593
+ ```bash
594
+ maggie feedback batch-review --project . --batch-id run-review-001
595
+ ```
596
+
597
+ The `maggie-feedback-batch-review.v1` report retains bounded observations,
598
+ missing-index and duplicate checks, and privacy flags. It never contains raw
599
+ responses, local paths, or secrets.
600
+
601
+ The same evidence-first pattern is available for the other maintainer checks:
602
+
603
+ ```bash
604
+ maggie marketplace enrichment-report --project . \
605
+ --input .maggie/marketplace/enrichment-input.json
606
+ maggie service worker-health --project . \
607
+ --evidence .maggie/booking/worker-health-input.json
608
+ maggie service resolver-audit --project . \
609
+ --evidence .maggie/booking/resolver-input.json
610
+ maggie migration preflight \
611
+ --evidence .maggie/migration/preflight-input.json
612
+ ```
613
+
614
+ Each command validates a versioned, bounded evidence contract and writes only
615
+ sanitized status data. The deployment parity report also records the active
616
+ release revision, runtime configuration hash, migration version, worker
617
+ revision, asset fingerprints, and rollback target.
618
+
573
619
  Submission is never implicit. Project paths, source files, logs, and secrets
574
620
  are excluded by default. The hosted endpoint stores the normalized feedback in
575
621
  NoBlox for maintainer review; it does not automatically create a GitHub Issue.
package/README.zh-TW.md CHANGED
@@ -8,7 +8,7 @@ Codex、Claude Code 與相容的 coding agents。
8
8
  ## 安裝
9
9
 
10
10
  ```bash
11
- npx @topy-ai/maggie@0.7.26 init --agent all
11
+ npx @topy-ai/maggie@0.7.28 init --agent all
12
12
  npx @topy-ai/maggie doctor --project .
13
13
  ```
14
14
 
@@ -25,7 +25,9 @@ maggie doctor --project . --require-bootstrap --strict
25
25
  deployment、memory、feedback 和 MaggieDash。內容先 draft/review,外部寫入、
26
26
  publish 與 production deployment 需要明確確認。
27
27
 
28
- 目前 release 是 `0.7.26`,修正 top-level feedback help 並包含 host-owned mobile app surface contract、signed-in
28
+ 目前 release 是 `0.7.28`,加入 versioned Gemini model policy、明確 fallback 與 provenance、bundled-first CLI
29
+ dispatch、`maggie --version`、feedback batch review 聚合與重複偵測、marketplace enrichment evidence、booking
30
+ worker/resolver evidence,以及 read-only migration preflight。它也包含 host-owned mobile app surface contract、signed-in
29
31
  camera-state QA、直接 Astro route resolution、correlated feedback batch,以及
30
32
  runtime package version capture。
31
33
 
package/bin/maggie.js CHANGED
@@ -51,6 +51,7 @@ function usage() {
51
51
  console.log(`Maggie Skills installer
52
52
 
53
53
  Usage:
54
+ maggie --version | version
54
55
  maggie init [--project PATH] [--agent auto|codex|claude|all] [--skills LIST]
55
56
  maggie install [SKILL ...] [--project PATH] [--agent auto|codex|claude|all]
56
57
  maggie update [SKILL ...] [--project PATH] [--agent auto|codex|claude|all] [--force]
@@ -117,6 +118,7 @@ Usage:
117
118
  maggie deployment readiness --project PATH
118
119
  maggie deployment parity --project PATH --evidence FILE --output FILE
119
120
  maggie deployment canary --project PATH --asset URL=SHA256 --render-report report.json --output docs/deployment-canary.json
121
+ maggie migration preflight --evidence FILE --output FILE
120
122
  maggie migration --project PATH --environment staging
121
123
  maggie migration identity --identity-file FILE [--expected-file FILE]
122
124
  maggie schedule PATH/.maggie/schedule.json --project PATH
@@ -126,7 +128,7 @@ Usage:
126
128
  maggie memory <init|list|search|context|add|record-error|transition|export> --project PATH
127
129
  maggie localization <extract|plan|generate|preview|validate|review|publish|stale|glossary> [options]
128
130
  maggie seo performance|images|sitemap|indexnow|social-cards|head-tags [options] (sitemap supports strict validate and agent-files)
129
- maggie feedback <collect|preview|batch|submit|list> [options]
131
+ maggie feedback <collect|preview|batch|batch-review|submit|list> [options]
130
132
  maggie qa <start|record|summary|export|assertion-audit> [options]
131
133
  maggie site-audit URL [--crawl] [--access-log FILE] [--require-sitemap-request] [--languages en-GB,es-MX,ja-JP] [--check-hreflang]
132
134
  maggie site-audit URL --crawl --save-baseline FILE --reviewer NAME
@@ -294,7 +296,7 @@ function list() {
294
296
 
295
297
  function marketplace(args) {
296
298
  const root = projectRoot(args);
297
- const script = join(root, "tools", "clis", "maggie_marketplace.py");
299
+ const script = toolScript("maggie_marketplace.py", root);
298
300
  if (!existsSync(script)) throw new Error(`marketplace CLI is missing: ${script}`);
299
301
  const command = args[0] || "list";
300
302
  const forwarded = args.slice(1);
@@ -306,7 +308,7 @@ function marketplace(args) {
306
308
  function service(args) {
307
309
  const root = projectRoot(args);
308
310
  const scriptName = args[0] === "orchestration-validate" ? "maggie_service_onboarding.py" : "maggie_service_booking.py";
309
- const script = join(root, "tools", "clis", scriptName);
311
+ const script = toolScript(scriptName, root);
310
312
  if (!existsSync(script)) throw new Error(`service booking CLI is missing: ${script}`);
311
313
  const result = spawnSync("python3", [script, ...args], { stdio: "inherit", cwd: root, env: { ...process.env, MAGGIE_VERSION: PACKAGE_VERSION } });
312
314
  if (result.error) throw result.error;
@@ -327,7 +329,7 @@ function seo(args) {
327
329
 
328
330
  function workflowCli(name, args) {
329
331
  const root = projectRoot(args);
330
- const script = join(root, "tools", "clis", name);
332
+ const script = toolScript(name, root);
331
333
  if (!existsSync(script)) throw new Error(`${name} is missing: ${script}`);
332
334
  const env = name === "maggie_feedback.py" ? { ...process.env, MAGGIE_VERSION: PACKAGE_VERSION } : process.env;
333
335
  const result = spawnSync("python3", [script, ...args], { stdio: "inherit", cwd: root, env });
@@ -335,6 +337,15 @@ function workflowCli(name, args) {
335
337
  process.exitCode = result.status ?? 1;
336
338
  }
337
339
 
340
+ function toolScript(name, root) {
341
+ const bundled = join(TOOLS_ROOT, "clis", name);
342
+ return existsSync(bundled) ? bundled : join(root, "tools", "clis", name);
343
+ }
344
+
345
+ function version() {
346
+ console.log(PACKAGE_VERSION);
347
+ }
348
+
338
349
  function doctor(args) {
339
350
  const root = projectRoot(args);
340
351
  const checks = [
@@ -404,7 +415,8 @@ function cleanup(args) {
404
415
 
405
416
  const [command = "help", ...args] = process.argv.slice(2);
406
417
  try {
407
- if (["help", "--help", "-h"].includes(command)) usage();
418
+ if (["--version", "-v", "version"].includes(command)) version();
419
+ else if (["help", "--help", "-h"].includes(command)) usage();
408
420
  else if (command === "list") list();
409
421
  else if (command === "marketplace") marketplace(args);
410
422
  else if (command === "clone") workflowCli("maggie_clone.py", args);
@@ -3,17 +3,35 @@
3
3
  "$id": "https://maggie.noblox.app/contracts/deployment-runtime-parity-v1.json",
4
4
  "title": "Maggie deployment worker and browser runtime parity evidence",
5
5
  "type": "object",
6
- "required": ["schemaVersion", "environment", "passed", "worker", "browser"],
6
+ "required": ["schemaVersion", "environment", "passed", "release", "worker", "browser"],
7
7
  "properties": {
8
8
  "schemaVersion": {"const": "maggie-deployment-runtime-parity.v1"},
9
9
  "environment": {"enum": ["development", "staging", "production"]},
10
10
  "passed": {"const": true},
11
+ "release": {
12
+ "type": "object",
13
+ "required": ["activeRevision", "expectedRevision", "rollbackRevision", "environment", "runtimeConfigHash", "expectedConfigHash", "migrationVersion", "expectedMigrationVersion", "workerRevision", "assetVersions"],
14
+ "properties": {
15
+ "activeRevision": {"type": "string", "minLength": 1},
16
+ "expectedRevision": {"type": "string", "minLength": 1},
17
+ "rollbackRevision": {"type": "string", "minLength": 1},
18
+ "environment": {"enum": ["development", "staging", "production"]},
19
+ "runtimeConfigHash": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
20
+ "expectedConfigHash": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
21
+ "migrationVersion": {"type": "string", "minLength": 1},
22
+ "expectedMigrationVersion": {"type": "string", "minLength": 1},
23
+ "workerRevision": {"type": "string", "minLength": 1},
24
+ "assetVersions": {"type": "array", "minItems": 1, "items": {"type": "object", "required": ["name", "sha256"], "properties": {"name": {"type": "string"}, "sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"}}, "additionalProperties": false}}
25
+ },
26
+ "additionalProperties": true
27
+ },
11
28
  "worker": {
12
29
  "type": "object",
13
30
  "required": ["config", "migration", "routeApis", "residentProcesses", "sourceJobs"],
14
31
  "properties": {
15
32
  "config": {"$ref": "#/$defs/config"},
16
33
  "migration": {"type": "object", "required": ["privilegeCheck"], "properties": {"privilegeCheck": {"$ref": "#/$defs/passed"}}},
34
+ "revision": {"type": "string", "minLength": 1},
17
35
  "routeApis": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/route"}},
18
36
  "residentProcesses": {"$ref": "#/$defs/processes"},
19
37
  "sourceJobs": {"type": "array", "items": {"$ref": "#/$defs/job"}}
@@ -30,7 +48,7 @@
30
48
  "$defs": {
31
49
  "passed": {"type": "object", "required": ["passed"], "properties": {"passed": {"const": true}}, "additionalProperties": true},
32
50
  "config": {"type": "object", "required": ["required", "missing", "passed"], "properties": {"required": {"type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1}}, "missing": {"type": "array", "maxItems": 0}, "passed": {"const": true}}, "additionalProperties": true},
33
- "route": {"type": "object", "required": ["method", "path", "status", "passed"], "properties": {"method": {"type": "string"}, "path": {"type": "string", "pattern": "^/"}, "status": {"type": "integer", "minimum": 200, "maximum": 399}, "passed": {"const": true}}, "additionalProperties": true},
51
+ "route": {"type": "object", "required": ["method", "path", "status", "passed", "releaseRevision"], "properties": {"method": {"type": "string"}, "path": {"type": "string", "pattern": "^/"}, "status": {"type": "integer", "minimum": 200, "maximum": 399}, "passed": {"const": true}, "releaseRevision": {"type": "string", "minLength": 1}}, "additionalProperties": true},
34
52
  "processes": {"type": "object", "required": ["checked", "unexpected", "stale", "passed"], "properties": {"checked": {"const": true}, "unexpected": {"type": "array", "maxItems": 0}, "stale": {"type": "array", "maxItems": 0}, "passed": {"const": true}}, "additionalProperties": true},
35
53
  "job": {"type": "object", "required": ["jobId", "passed"], "properties": {"jobId": {"type": "string", "minLength": 1}, "passed": {"const": true}}, "additionalProperties": true}
36
54
  },
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://maggie.noblox.app/contracts/maggie-seo/model-policy-v1.schema.json",
4
+ "title": "Maggie Gemini model policy v1",
5
+ "type": "object",
6
+ "required": ["policyVersion", "model", "fallbackModel", "promptVersion", "schemaVersion", "locale", "sourceRevision"],
7
+ "properties": {
8
+ "policyVersion": {"const": "maggie-gemini-model-policy.v1"},
9
+ "model": {"type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{1,99}$"},
10
+ "fallbackModel": {"type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{1,99}$"},
11
+ "promptVersion": {"type": "string", "minLength": 1},
12
+ "schemaVersion": {"type": "string", "minLength": 1},
13
+ "locale": {"type": ["string", "null"]},
14
+ "sourceRevision": {"type": ["string", "null"]}
15
+ },
16
+ "additionalProperties": false
17
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://maggie.noblox.app/contracts/resolver-v1.schema.json",
4
+ "title": "Maggie booking URL resolver outcomes v1",
5
+ "type": "object",
6
+ "required": ["schemaVersion", "status", "passed", "errors", "counts", "observations", "privacy"],
7
+ "properties": {
8
+ "schemaVersion": {"const": "maggie-booking-resolver.v1"},
9
+ "status": {"enum": ["passed", "failed"]},
10
+ "passed": {"type": "boolean"},
11
+ "errors": {"type": "array", "items": {"type": "string"}},
12
+ "counts": {"type": "object", "additionalProperties": {"type": "integer", "minimum": 0}},
13
+ "observations": {"type": "array", "maxItems": 200, "items": {"type": "object"}},
14
+ "privacy": {"type": "object", "required": ["rawResponsesIncluded", "credentialsIncluded"]}
15
+ },
16
+ "additionalProperties": false
17
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://maggie.noblox.app/contracts/worker-health-v1.schema.json",
4
+ "title": "Maggie service booking worker health v1",
5
+ "type": "object",
6
+ "required": ["schemaVersion", "environment", "workerId", "status", "passed", "errors", "checks"],
7
+ "properties": {
8
+ "schemaVersion": {"const": "maggie-booking-worker-health.v1"},
9
+ "environment": {"enum": ["development", "staging", "production"]},
10
+ "workerId": {"type": "string", "minLength": 1},
11
+ "status": {"enum": ["passed", "failed"]},
12
+ "passed": {"type": "boolean"},
13
+ "errors": {"type": "array", "items": {"type": "string"}},
14
+ "checks": {"type": "object", "additionalProperties": {"type": "boolean"}}
15
+ },
16
+ "additionalProperties": false
17
+ }
@@ -50,6 +50,11 @@ import.
50
50
  items with stable ordering, nesting, and safe destinations;
51
51
  - [`dashboard-runtime-v1.json`](dashboard-runtime-v1.json) defines evidence
52
52
  that an admin screen mounted, ran its checks, and completed its data calls.
53
+ - MaggieDash 0.2.6 also ships a screen-level host adapter contract and
54
+ provider-neutral install starters in the first-party distribution. The
55
+ `host-adapter-v2` contract lists endpoint methods, public routes, response
56
+ content types, and required fields; `maggie dash conformance` validates
57
+ sanitized runtime observations against it.
53
58
 
54
59
  These are adapter-facing interfaces, not database schemas. A host may use
55
60
  PostgreSQL, SQLite, or another first-party store. Activity recording happens
@@ -0,0 +1,16 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://maggiedash.noblox.app/contracts/migration-preflight-v1.schema.json",
4
+ "title": "MaggieDash Migration Preflight v1",
5
+ "type": "object",
6
+ "required": ["schemaVersion", "environment", "status", "passed", "errors", "checks", "mutation"],
7
+ "properties": {
8
+ "schemaVersion": {"const": "maggie-migration-preflight.v1"},
9
+ "environment": {"enum": ["development", "staging", "production"]},
10
+ "status": {"enum": ["passed", "failed"]}, "passed": {"type": "boolean"},
11
+ "errors": {"type": "array", "items": {"type": "string"}},
12
+ "checks": {"type": "object", "additionalProperties": {"type": "boolean"}},
13
+ "mutation": {"const": "not executed"}
14
+ },
15
+ "additionalProperties": false
16
+ }
@@ -25,6 +25,13 @@ return partial/nonzero and store only an error category. Use one worker per
25
25
  project. Host database/API schedulers must explicitly integrate this boundary;
26
26
  installing the skill does not patch an existing host ingestion implementation.
27
27
 
28
+ When a host imports JavaScript helpers from strict TypeScript, ship an adjacent
29
+ `.d.mts` declaration for every `.mjs` module that is part of the public
30
+ translation/ingest boundary. Keep the declaration's nullable/error outcome
31
+ types aligned with the runtime and include it in the typecheck fixture. This
32
+ prevents a successful runtime helper from becoming an implicit `any` or a
33
+ nullability mismatch in the scheduled path.
34
+
28
35
  ## Durable work
29
36
 
30
37
  After source persistence, enqueue translation work using an idempotency key
@@ -5,6 +5,14 @@ approvals, jobs, audit, API, and MCP boundaries. External systems are adapters;
5
5
  they never become the local source of truth without an explicit migration and
6
6
  rollback decision.
7
7
 
8
+ The first-party distribution installs the React admin under `./_maggie/admin`
9
+ and portable host starters under `maggiedash/`: an idempotent PostgreSQL
10
+ schema, type-only adapter boundary, and the screen-level
11
+ `maggiedash-host-adapter.v2` contract. The schema is a starting migration for
12
+ the host's normal migration system; it must not drop legacy tables or receive
13
+ unbound project IDs. The type file is intentionally not a fake database
14
+ implementation.
15
+
8
16
  ## Foundation
9
17
 
10
18
  Initialize and migrate the local project contract before content or provider
@@ -35,6 +43,17 @@ in environment variables and are never copied into reports.
35
43
  explicitly declares that mirror required.
36
44
  - API Pull, booking, analytics, email, and deployment providers expose health,
37
45
  normalized errors, and explicit configuration schemas.
46
+ - Dashboard hosts must expose the exact method, route, response content type,
47
+ and required fields declared by `host-adapter-v2`. Create sanitized runtime
48
+ observations and validate them with `maggie dash conformance`; a static
49
+ component scan is not evidence that a screen works. Astro hosts that exclude
50
+ underscore filesystem segments must rewrite `/_maggie/section-preview` once
51
+ to the internal preview route without disabling origin checks.
52
+
53
+ For API Pull, retain only bounded provider messages and effective quota values
54
+ in lifecycle state. A quota-exhausted response means daily delivery remaining
55
+ is zero even if an older allowance field says otherwise; raw provider bodies
56
+ never enter `.maggie` reports.
38
57
 
39
58
  ## Ordered workflow
40
59
 
@@ -22,6 +22,11 @@ project-specific design, service, SEO, operations, and deployment adapters.
22
22
  3. For a new MaggieDash project, run:
23
23
  `python3 tools/clis/maggie_dash.py init --project PROJECT --confirm` and
24
24
  `python3 tools/clis/maggie_dash.py migrate --project PROJECT --confirm`.
25
+ If the first-party dashboard is installed, also run
26
+ `maggie dash install --project PROJECT --confirm`; this copies the
27
+ provider-neutral backend type boundary and idempotent starter schema beside
28
+ the admin UI. Apply the schema through the host migration system, never by
29
+ dropping legacy tables.
25
30
  4. Advance the ordered foundation gate:
26
31
 
27
32
  ```bash
@@ -46,6 +51,19 @@ project-specific design, service, SEO, operations, and deployment adapters.
46
51
  9. Run build, route, SEO, accessibility, content, and deployment checks; hand
47
52
  private content operations to `maggie-ops`.
48
53
 
54
+ For an installed dashboard, create sanitized runtime observations for every
55
+ endpoint in `maggiedash/contracts/host-adapter-v2.json` and run:
56
+
57
+ ```bash
58
+ maggie dash conformance --project PROJECT \
59
+ --contract maggiedash/contracts/host-adapter-v2.json \
60
+ --evidence .maggie/maggiedash-conformance.json \
61
+ --output docs/maggiedash-conformance.json
62
+ ```
63
+
64
+ The report checks method, public route, 2xx status, content type, and required
65
+ response fields. It does not accept a static source scan as runtime evidence.
66
+
49
67
  ## Decisions and safety
50
68
 
51
69
  - Preserve detected framework, language, router, UI system, icon set, fonts,
@@ -58,6 +76,9 @@ project-specific design, service, SEO, operations, and deployment adapters.
58
76
  stop for manual conflict review; malformed content is never published.
59
77
  - Do not build a second CMS or editor beside MaggieDash. Use the shared
60
78
  ContentDocument contract and project-scoped roles.
79
+ - If stdin is not interactive, bootstrap must receive
80
+ `--non-interactive --answers-file FILE --confirm`; it exits with a concise
81
+ remediation message instead of emitting an EOF traceback.
61
82
 
62
83
  ## Completion gate
63
84
 
@@ -5,6 +5,18 @@ description: Manage the MaggieDash project foundation, local content store, and
5
5
 
6
6
  # MaggieDash
7
7
 
8
+ Run the read-only migration preflight before any schema write:
9
+
10
+ ```bash
11
+ maggie migration preflight \
12
+ --evidence .maggie/migration/preflight-input.json \
13
+ --output .maggie/migration/preflight.json
14
+ ```
15
+
16
+ It checks database privileges, required columns, unique constraints used by
17
+ `ON CONFLICT`, idempotency, and version advancement. Evidence is secret-free
18
+ and the command never executes a migration; a failed report blocks the write.
19
+
8
20
  Use the provider-neutral MaggieDash contracts and CLI for project setup,
9
21
  installation of the first-party admin workspace, and content operations.
10
22
 
@@ -46,6 +58,28 @@ owns the framework route, email/password session middleware, database, media
46
58
  storage, provider credentials, and `/api/maggie/*` adapter endpoints. Read the
47
59
  MaggieDash host adapter contract before adding a new framework adapter.
48
60
 
61
+ The install also places a provider-neutral backend type boundary, an
62
+ idempotent PostgreSQL starter schema, and the screen-level host adapter
63
+ contract under `maggiedash/`. These are reviewable starting points, not a
64
+ portable database implementation. Apply the schema through the host's normal
65
+ migration system, keep project IDs bound as query parameters, and implement
66
+ the declared endpoint fields before enabling a dashboard screen. The
67
+ underscore-prefixed public preview route must be rewritten once by the host
68
+ framework when that framework excludes underscore filesystem segments.
69
+
70
+ Validate the live adapter with sanitized browser/runtime observations:
71
+
72
+ ```bash
73
+ maggie dash conformance --project . \
74
+ --contract maggiedash/contracts/host-adapter-v2.json \
75
+ --evidence .maggie/maggiedash-conformance.json \
76
+ --output docs/maggiedash-conformance.json
77
+ ```
78
+
79
+ This is a runtime contract gate, not a source-only check; it fails when a
80
+ declared endpoint is missing, uses the wrong route/method, returns a non-2xx
81
+ status or omits required fields.
82
+
49
83
  MaggieDash 0.2.4 adds two reusable operator workspaces. Activity is a read-only
50
84
  view backed by `/api/maggie/activity.json`; it supports actor/action filters,
51
85
  refresh, and a safe unavailable state. Navigation is an ordered,
@@ -52,10 +52,14 @@ maggie deployment parity --project . \
52
52
  The `maggie-deployment-runtime-parity.v1` contract checks required worker
53
53
  configuration and missing bindings, migration privileges, route API status,
54
54
  stale/unexpected resident import processes, non-empty source-job IDs, and
55
- browser/driver compatibility. It is provider-neutral: the host adapter runs
56
- the environment checks and supplies only safe facts; Maggie validates the
57
- evidence and never receives credentials, cookies, or response bodies. A failed
58
- parity report blocks the readiness command and therefore the canary.
55
+ browser/driver compatibility. It also requires the active release revision to
56
+ match the expected revision, an equal runtime configuration hash, the expected
57
+ migration and worker revisions, non-empty asset fingerprints, route release
58
+ revisions, and a valid rollback target. It is provider-neutral: the host
59
+ adapter runs the environment checks and supplies only safe facts; Maggie
60
+ validates the evidence and never receives credentials, cookies, or response
61
+ bodies. A failed parity report blocks the readiness command and therefore the
62
+ canary.
59
63
 
60
64
  ## Release readiness evidence
61
65
 
@@ -123,10 +127,18 @@ Generate a reviewable VPS plan and configuration artifacts locally:
123
127
  python3 tools/clis/maggie_deployment.py /path/to/project \
124
128
  --vps-plan --domain example.co.uk --service example \
125
129
  --release-root /var/www/example \
130
+ --node-port 4321 \
126
131
  --plan-dir .maggie/deployment/vps-staging \
127
132
  --runner-output .maggie/deployment/vps-staging/release-runner.sh
128
133
  ```
129
134
 
135
+ `--node-port` is intentionally explicit and must be an unused host port; the
136
+ planner never guesses a default because a guessed port can collide with an
137
+ existing service. The generated plan also records the TLS-proxy boundary:
138
+ keep Astro `security.checkOrigin` enabled, configure the canonical HTTPS
139
+ `allowedDomains`, and forward the public host/protocol only from a trusted
140
+ reverse proxy.
141
+
130
142
  The output contains only the immutable release/current layout, systemd unit,
131
143
  Nginx reverse-proxy config, health commands, rollback command, and an ordered
132
144
  reviewable release runner. The runner keeps migrations before the symlink flip,
@@ -237,9 +249,12 @@ Review the generated runner before execution. Its order is install → typecheck
237
249
  retention keeps the current release and one rollback candidate.
238
250
 
239
251
  Production additionally requires `docs/deployment-rollback-smoke.json` with
240
- `passed: true`, `environment: production`, a non-empty `previousRelease`, and
241
- `testedAt`. A rollback command in a plan is not proof that the rollback was
242
- tested. Staging does not require this production-only evidence.
252
+ `passed: true`, `environment: production`, and `testedAt`. For an upgrade it
253
+ must include a non-empty `previousRelease`. For the first production release,
254
+ set `releaseKind: "first"` and record a non-empty `notApplicableReason`; the
255
+ runner also requires `RELEASE_KIND=first`. A rollback command in a plan is not
256
+ proof that the rollback was tested. Staging does not require this
257
+ production-only evidence.
243
258
 
244
259
  ## Required workflow
245
260
 
@@ -76,9 +76,16 @@ Create a local, secret-free plan before remote execution:
76
76
  python3 tools/clis/maggie_deployment.py . --vps-plan \
77
77
  --domain example.co.uk --service example \
78
78
  --release-root /var/www/example \
79
+ --node-port 4321 \
79
80
  --plan-dir .maggie/deployment/vps-staging
80
81
  ```
81
82
 
83
+ Always choose and pass an unused `--node-port`; no default is assumed because
84
+ the planner cannot safely know which ports are occupied on the target host.
85
+ The generated Nginx/Astro boundary keeps `checkOrigin` enabled and requires
86
+ canonical HTTPS `allowedDomains` plus trusted `X-Forwarded-Host`/
87
+ `X-Forwarded-Proto` handling when TLS terminates at the proxy.
88
+
82
89
  Review the generated systemd and Nginx files, then obtain explicit approval
83
90
  before installing them on a host.
84
91
 
@@ -106,5 +113,8 @@ canonical URLs, booking links, and protected Ops/API routes. Check both apex
106
113
  and `www` when configured. Record HTTP status, commit, and release.
107
114
 
108
115
  Rollback switches `current` to the previous immutable release and restarts the
109
- service. If migrations are not backward-compatible, stop before deployment
110
- and provide a tested restore or database rollback plan.
116
+ service. If migrations are not backward-compatible, stop before deployment and
117
+ provide a tested restore or database rollback plan. The first production
118
+ release may declare rollback as not applicable only with `releaseKind: "first"`,
119
+ a non-empty `notApplicableReason`, and `RELEASE_KIND=first`; upgrades still
120
+ need tested `previousRelease` evidence.
@@ -55,9 +55,19 @@ The batch file contains 1–50 items and may provide shared `skill`, `runId`,
55
55
  `phase`, `priority`, and `affectedCli` values. An item can override those
56
56
  fields and supplies the normal `type`, `summary`, `expected`, `actual`,
57
57
  `errorFingerprint`, reproduction, resolution, validation, and screenshot
58
- metadata fields. Each generated draft stores only the safe batch ID, zero-based
59
- index, and bounded size. The batch command still creates local drafts only;
60
- review each draft and submit explicitly.
58
+ metadata fields. It may also provide bounded `routeIds` and
59
+ `validationEvidence` identifiers. Each generated draft stores only the safe
60
+ batch ID, zero-based index, and bounded size. The batch command still creates
61
+ local drafts only.
62
+
63
+ Aggregate a batch before manual review:
64
+
65
+ maggie feedback batch-review --project . --batch-id run-review-001
66
+
67
+ This writes `.maggie/feedback/batches/<batch-id>-review.json` under the
68
+ `maggie-feedback-batch-review.v1` contract. It reports missing indexes and
69
+ duplicate fingerprints/summaries, while retaining only redacted observations;
70
+ review the aggregate and each draft before submitting.
61
71
 
62
72
  Example:
63
73
 
@@ -7,6 +7,22 @@ metadata:
7
7
 
8
8
  # Maggie Marketplace
9
9
 
10
+ ## Enrichment evidence
11
+
12
+ Candidate discovery must preserve enough structured evidence to debug a
13
+ missing Google candidate, crawl, audit, snapshot, or SEO backfill without
14
+ storing provider HTML or credentials:
15
+
16
+ ```bash
17
+ maggie marketplace enrichment-report --project . \
18
+ --input .maggie/marketplace/enrichment-input.json
19
+ ```
20
+
21
+ The output follows `maggie-marketplace-enrichment.v1`, records safe status and
22
+ error codes for each stage, and makes retry eligibility explicit. Null/error
23
+ reasons remain visible for a maintainer; raw response bodies, local paths, and
24
+ secrets are excluded.
25
+
10
26
  ## Automatic memory hook
11
27
 
12
28
  Follow [Maggie Memory Hook](../../references/memory-hook.md) at invocation and completion.
@@ -74,7 +90,10 @@ python3 tools/clis/maggie_marketplace.py resume <template-id>
74
90
 
75
91
  If generated assets are missing, the job stops at `WAITING_FOR_ASSETS`; cloned
76
92
  images are never accepted as generated-asset fallbacks. Only a job at `READY`
77
- is complete.
93
+ is complete. A previously `READY` job is revalidated against the current
94
+ validator before it is reported complete. If the validator has changed or the
95
+ artifact drifted, the job becomes `STALE` and must be resumed or rebuilt; do
96
+ not treat an old readiness flag as proof of current validity.
78
97
 
79
98
  Each import also creates `tasks.json`. It is the workflow ledger: it stores
80
99
  source/output inventories for logos, icons, images, headings, links, buttons,
@@ -7,6 +7,17 @@ metadata:
7
7
 
8
8
  # Maggie SEO and GEO
9
9
 
10
+ ## Versioned Gemini policy
11
+
12
+ AI-assisted SEO, localization, and content generation must resolve models
13
+ through one explicit policy: `maggie-gemini-model-policy.v1`. Pin the primary
14
+ model, declare a separate fallback, and record the policy version, exact
15
+ prompt/schema versions, locale, and source revision with generated evidence.
16
+ Only model availability failures (retired model, quota, timeout, or provider
17
+ 5xx) may roll forward to the declared fallback; authentication failures and
18
+ invalid output remain errors. Do not scatter retired model defaults across
19
+ routes.
20
+
10
21
  ## Static audit and sitemap evidence
11
22
 
12
23
  Run `maggie site-audit https://example.com --crawl --json` for sitemap-listed