@topy-ai/maggie 0.7.44 → 0.7.46

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 (39) hide show
  1. package/README-zh-TW.md +29 -6
  2. package/README.md +86 -12
  3. package/bin/maggie.js +207 -58
  4. package/bundled-contracts/google-integrations/capability-report-v2.schema.json +76 -0
  5. package/bundled-contracts/google-integrations/external-write-readback-v1.schema.json +36 -0
  6. package/bundled-contracts/maggie-deployment/deployer-delegation-v1.schema.json +20 -0
  7. package/bundled-contracts/maggie-deployment/release-profile-v1.schema.json +34 -0
  8. package/bundled-contracts/maggie-design/browser-capability-v1.schema.json +33 -0
  9. package/bundled-contracts/maggie-feedback/evidence-bundle-v1.schema.json +38 -0
  10. package/bundled-references/browser-inspection.md +17 -0
  11. package/bundled-references/google-integrations-runbook.md +8 -1
  12. package/bundled-skills/maggie-blog-bootstrap/SKILL.md +7 -7
  13. package/bundled-skills/maggie-clone/SKILL.md +21 -14
  14. package/bundled-skills/maggie-clone-to-template/SKILL.md +11 -11
  15. package/bundled-skills/maggie-clone-to-template/references/workflow.md +2 -2
  16. package/bundled-skills/maggie-content-localization/SKILL.md +10 -10
  17. package/bundled-skills/maggie-deployment/SKILL.md +57 -23
  18. package/bundled-skills/maggie-deployment/references/vps.md +4 -4
  19. package/bundled-skills/maggie-design/SKILL.md +12 -12
  20. package/bundled-skills/maggie-feedback/SKILL.md +23 -0
  21. package/bundled-skills/maggie-marketplace/SKILL.md +12 -12
  22. package/bundled-skills/maggie-ops/SKILL.md +28 -6
  23. package/bundled-skills/maggie-project-context/SKILL.md +1 -1
  24. package/bundled-skills/maggie-seo-geo/SKILL.md +6 -3
  25. package/bundled-skills/maggie-service-booking/SKILL.md +24 -24
  26. package/bundled-skills/maggie-social-share/SKILL.md +2 -2
  27. package/bundled-skills/maggie-template/SKILL.md +5 -5
  28. package/bundled-tools/clis/maggie_analytics.py +8 -0
  29. package/bundled-tools/clis/maggie_browser_audit.py +13 -2
  30. package/bundled-tools/clis/maggie_deployment.py +167 -6
  31. package/bundled-tools/clis/maggie_feedback.py +115 -1
  32. package/bundled-tools/clis/maggie_ops.py +33 -0
  33. package/bundled-tools/clis/maggie_release.py +124 -19
  34. package/bundled-tools/runtime/browser_capability.py +143 -0
  35. package/bundled-tools/runtime/external_write.py +122 -0
  36. package/bundled-tools/runtime/google_capabilities.py +37 -5
  37. package/package.json +1 -1
  38. package/references/browser-inspection.md +17 -0
  39. package/references/google-integrations-runbook.md +8 -1
@@ -0,0 +1,33 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://maggie.noblox.app/contracts/browser-capability-v1.schema.json",
4
+ "title": "Maggie browser adapter capability report v1",
5
+ "type": "object",
6
+ "required": ["schemaVersion", "adapter", "status", "checks", "requiredCommands", "fallback"],
7
+ "properties": {
8
+ "schemaVersion": {"const": "maggie-browser-capability.v1"},
9
+ "adapter": {
10
+ "type": "object",
11
+ "required": ["requested"],
12
+ "properties": {
13
+ "requested": {"type": "string", "minLength": 1, "maxLength": 160},
14
+ "name": {"type": "string", "maxLength": 160},
15
+ "requestedPathFingerprint": {"type": ["string", "null"], "pattern": "^(sha256:[a-f0-9]{64})?$"},
16
+ "resolvedPathFingerprint": {"type": ["string", "null"], "pattern": "^(sha256:[a-f0-9]{64})?$"}
17
+ },
18
+ "additionalProperties": false
19
+ },
20
+ "status": {"enum": ["ready", "missing", "incompatible"]},
21
+ "errorCode": {"type": "string", "maxLength": 80},
22
+ "message": {"type": "string", "maxLength": 240},
23
+ "checks": {
24
+ "type": "object",
25
+ "required": ["resolved", "regularFile", "executable", "help", "requiredCommands", "interactionCommands"],
26
+ "additionalProperties": {"type": "boolean"}
27
+ },
28
+ "requiredCommands": {"type": "array", "items": {"type": "string"}, "minItems": 1, "maxItems": 20},
29
+ "missingCommands": {"type": "array", "items": {"type": "string"}, "maxItems": 20},
30
+ "fallback": {"type": "array", "items": {"type": "string", "maxLength": 240}, "maxItems": 8}
31
+ },
32
+ "additionalProperties": false
33
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://maggie.noblox.app/contracts/feedback-evidence-bundle-v1.schema.json",
4
+ "title": "Maggie privacy-safe feedback evidence bundle v1",
5
+ "type": "object",
6
+ "required": ["evidence", "relationships"],
7
+ "properties": {
8
+ "evidence": {
9
+ "type": "array",
10
+ "maxItems": 20,
11
+ "items": {
12
+ "type": "object",
13
+ "required": ["kind", "ref", "status"],
14
+ "properties": {
15
+ "kind": {"enum": ["test", "report", "screenshot", "command", "deployment", "issue", "commit", "artifact"]},
16
+ "ref": {"type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/=-]{0,159}$"},
17
+ "status": {"enum": ["passed", "failed", "observed", "not-run", "unknown"]}
18
+ },
19
+ "additionalProperties": false
20
+ }
21
+ },
22
+ "relationships": {
23
+ "type": "array",
24
+ "maxItems": 20,
25
+ "items": {
26
+ "type": "object",
27
+ "required": ["kind", "target", "confidence"],
28
+ "properties": {
29
+ "kind": {"enum": ["related", "same-run", "same-fingerprint", "duplicates", "validates", "remediates", "caused-by"]},
30
+ "target": {"type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/=-]{0,159}$"},
31
+ "confidence": {"enum": ["low", "medium", "high"]}
32
+ },
33
+ "additionalProperties": false
34
+ }
35
+ }
36
+ },
37
+ "additionalProperties": false
38
+ }
@@ -14,6 +14,23 @@ The browser capability must support:
14
14
  - slow scrolling, click, hover, keyboard focus, and back/forward navigation;
15
15
  - reading computed CSS, media sources, links, and visible accessibility labels.
16
16
 
17
+ Before navigation, Maggie runs a capability preflight against the configured
18
+ adapter. The report is `maggie-browser-capability.v1` and classifies the
19
+ adapter as `ready`, `missing`, or `incompatible`. This prevents a system
20
+ `browse`/`xdg-open` desktop opener from being mistaken for a browser adapter:
21
+
22
+ ```bash
23
+ maggie browser-audit https://example.com \
24
+ --browse "$HOME/.codex/skills/gstack/browse/dist/browse" \
25
+ --output .maggie/browser-audit --required body --check-browser
26
+ ```
27
+
28
+ The report contains only the adapter name, path fingerprints, capability
29
+ checks, and bounded installation/fallback guidance. If it is `missing` or
30
+ `incompatible`, install or enable an authorized Chrome/Playwright/gstack
31
+ adapter and pass its executable path. Maggie does not silently install a
32
+ browser runtime or use a desktop opener as a fallback.
33
+
17
34
  The minimum extraction result for a target is:
18
35
 
19
36
  ```text
@@ -111,8 +111,13 @@ maggie ops google-capabilities \
111
111
  ```
112
112
 
113
113
  The report contract is
114
- [`capability-report-v1.json`](../bundled-contracts/google-integrations/capability-report-v1.json).
114
+ [`capability-report-v2.schema.json`](../bundled-contracts/google-integrations/capability-report-v2.schema.json).
115
115
  The CLI writes a normalized result and never copies arbitrary input fields.
116
+ Every provider row must also identify the redacted active account and selected
117
+ target resource, both with `verified: true`; the target ID must equal the
118
+ selected `resource`. A report that only proves account discovery, or comes from
119
+ the wrong browser account/property, is rejected before a write workflow can use
120
+ it.
116
121
 
117
122
  ## Capability matrix
118
123
 
@@ -121,6 +126,8 @@ Every provider/resource row must expose this shape:
121
126
  | Field | Meaning |
122
127
  |---|---|
123
128
  | `provider` / `resource` | The Google product and scoped resource being checked |
129
+ | `activeAccount` | Redacted account/principal reference confirmed by the current auth session |
130
+ | `target` | Resource ID and kind confirmed in the current account; must match `resource` |
124
131
  | `authMode` | `desktop-oauth`, `service-account-impersonation`, or `none` |
125
132
  | `scopes` | Exact allowlisted OAuth scopes, never token values |
126
133
  | `productRole` | Role granted in the product, distinct from Cloud IAM |
@@ -14,14 +14,14 @@ project-specific design, service, SEO, operations, and deployment adapters.
14
14
 
15
15
  ## Workflow
16
16
 
17
- 1. Run `python3 tools/clis/maggie.py analyze PROJECT --json --save` and record
17
+ 1. Run `maggie tool maggie.py analyze PROJECT --json --save` and record
18
18
  evidence for framework, language, UI, icons, data, content, routes, and
19
19
  deployment.
20
- 2. Run `python3 tools/clis/maggie.py bootstrap interview PROJECT`; review the
20
+ 2. Run `maggie tool maggie.py bootstrap interview PROJECT`; review the
21
21
  checkpoint and confirm foundation, experience, data, and publishing choices.
22
22
  3. For a new MaggieDash project, run:
23
- `python3 tools/clis/maggie_dash.py init --project PROJECT --confirm` and
24
- `python3 tools/clis/maggie_dash.py migrate --project PROJECT --confirm`.
23
+ `maggie tool maggie_dash.py init --project PROJECT --confirm` and
24
+ `maggie tool maggie_dash.py migrate --project PROJECT --confirm`.
25
25
  If the first-party dashboard is installed, also run
26
26
  `maggie dash install --project PROJECT --confirm`; this copies the
27
27
  provider-neutral backend type boundary and idempotent starter schema beside
@@ -30,8 +30,8 @@ project-specific design, service, SEO, operations, and deployment adapters.
30
30
  4. Advance the ordered foundation gate:
31
31
 
32
32
  ```bash
33
- python3 tools/clis/maggie.py bootstrap phase start maggiedash-foundation PROJECT
34
- python3 tools/clis/maggie.py bootstrap phase pass maggiedash-foundation PROJECT \
33
+ maggie tool maggie.py bootstrap phase start maggiedash-foundation PROJECT
34
+ maggie tool maggie.py bootstrap phase pass maggiedash-foundation PROJECT \
35
35
  --validation "maggie analyze PROJECT; npm run build"
36
36
  ```
37
37
 
@@ -41,7 +41,7 @@ project-specific design, service, SEO, operations, and deployment adapters.
41
41
  7. Import external content through the provider-neutral draft workflow:
42
42
 
43
43
  ```bash
44
- python3 tools/clis/maggie_content.py records.json --project PROJECT \
44
+ maggie tool maggie_content.py records.json --project PROJECT \
45
45
  --source PROVIDER --confirm
46
46
  ```
47
47
 
@@ -29,10 +29,10 @@ Invoke it as:
29
29
  The executable workflow is resumable:
30
30
 
31
31
  ```bash
32
- python3 tools/clis/maggie_clone.py run <homepage-url> \
32
+ maggie tool maggie_clone.py run <homepage-url> \
33
33
  --project <project-root> --run-id <stable-run-id>
34
- python3 tools/clis/maggie_clone.py status --project <project-root> --run-id <stable-run-id>
35
- python3 tools/clis/maggie_clone.py run --project <project-root> --run-id <stable-run-id>
34
+ maggie tool maggie_clone.py status --project <project-root> --run-id <stable-run-id>
35
+ maggie tool maggie_clone.py run --project <project-root> --run-id <stable-run-id>
36
36
  ```
37
37
 
38
38
  Each run persists `manifest.json`, `state.json`, and phase outputs under
@@ -104,6 +104,13 @@ for the inspection contract and [`references/operational-model.md`](references/o
104
104
  for run artifacts and phase gates. If no browser tool is available, stop before
105
105
  editing and report the missing capability.
106
106
 
107
+ When using the CLI adapter, run its capability preflight first. A command such
108
+ as `/usr/bin/browse` that resolves to `xdg-open` is a desktop opener, not a
109
+ browser adapter, and must be reported as incompatible. Use the report and its
110
+ bounded fallback guidance to install or select an authorized adapter; do not
111
+ silently substitute a desktop opener or install a browser runtime without the
112
+ user's approval.
113
+
107
114
  ## Phase 0: Preflight and plan
108
115
 
109
116
  1. Parse and normalize all target URLs. Reject invalid, inaccessible, or
@@ -111,9 +118,9 @@ editing and report the missing capability.
111
118
  2. Run:
112
119
 
113
120
  ```bash
114
- python3 tools/clis/maggie.py status <project-root>
115
- python3 tools/clis/maggie.py doctor <project-root> --require-bootstrap --strict
116
- python3 tools/clis/maggie_clone.py init <homepage-url> --project <project-root> --run-id <stable-run-id>
121
+ maggie tool maggie.py status <project-root>
122
+ maggie tool maggie.py doctor <project-root> --require-bootstrap --strict
123
+ maggie tool maggie_clone.py init <homepage-url> --project <project-root> --run-id <stable-run-id>
117
124
  ```
118
125
 
119
126
  The clone run emits collision-resistant site/page keys and creates a
@@ -147,10 +154,10 @@ shared foundation files that may change
147
154
  Inspect the target before building it. Run the executable capture first:
148
155
 
149
156
  ```bash
150
- python3 tools/clis/maggie_clone.py capture --project <project-root> --run-id <run-id>
151
- python3 tools/clis/maggie_clone.py extract --project <project-root> --run-id <run-id>
152
- python3 tools/clis/maggie_clone.py assets --project <project-root> --run-id <run-id>
153
- python3 tools/clis/maggie_design_system.py generate \
157
+ maggie tool maggie_clone.py capture --project <project-root> --run-id <run-id>
158
+ maggie tool maggie_clone.py extract --project <project-root> --run-id <run-id>
159
+ maggie tool maggie_clone.py assets --project <project-root> --run-id <run-id>
160
+ maggie tool maggie_design_system.py generate \
154
161
  --project <project-root> --sample <industry-design-reference> \
155
162
  --run-id <run-id> --output DESIGN.md
156
163
  ```
@@ -267,7 +274,7 @@ For the homepage target:
267
274
  required viewports. Use the executable comparison gate:
268
275
 
269
276
  ```bash
270
- python3 tools/clis/maggie_clone.py compare --project <project-root> --run-id <run-id> --local-url <local-or-staging-url>
277
+ maggie tool maggie_clone.py compare --project <project-root> --run-id <run-id> --local-url <local-or-staging-url>
271
278
  ```
272
279
 
273
280
  Review `visual-diff/report.json` and the generated diff images; fix measured
@@ -277,9 +284,9 @@ For the homepage target:
277
284
  5. Run the run artifact gate and then:
278
285
 
279
286
  ```bash
280
- python3 tools/clis/site_audit.py <local-or-production-url> --json
281
- python3 tools/clis/maggie.py doctor <project-root> --require-bootstrap --strict
282
- python3 tools/clis/maggie_clone.py verify --project <project-root> --run-id <run-id>
287
+ maggie tool site_audit.py <local-or-production-url> --json
288
+ maggie tool maggie.py doctor <project-root> --require-bootstrap --strict
289
+ maggie tool maggie_clone.py verify --project <project-root> --run-id <run-id>
283
290
  ```
284
291
 
285
292
  Do not claim pixel fidelity when a target asset, authenticated state, blocked
@@ -29,18 +29,18 @@ evidence.
29
29
  For deterministic execution, use the stable checkpoints:
30
30
 
31
31
  ```bash
32
- python3 tools/clis/maggie_clone_to_template.py plan <url> "<approved brief>" --rename <template-id>
33
- python3 tools/clis/maggie_clone_to_template.py clone <template-id>
34
- python3 tools/clis/maggie_clone_to_template.py package <template-id>
35
- python3 tools/clis/maggie_clone_to_template.py design-review <template-id>
36
- python3 tools/clis/maggie_clone_to_template.py validate <template-id>
32
+ maggie tool maggie_clone_to_template.py plan <url> "<approved brief>" --rename <template-id>
33
+ maggie tool maggie_clone_to_template.py clone <template-id>
34
+ maggie tool maggie_clone_to_template.py package <template-id>
35
+ maggie tool maggie_clone_to_template.py design-review <template-id>
36
+ maggie tool maggie_clone_to_template.py validate <template-id>
37
37
  ```
38
38
 
39
39
  If the brief explicitly names a target brand, run the separate Maggie Design
40
40
  rebrand checkpoint after packaging and before review:
41
41
 
42
42
  ```bash
43
- python3 tools/clis/maggie_design.py rebrand \
43
+ maggie tool maggie_design.py rebrand \
44
44
  --template marketplace/templates/<template-id> \
45
45
  --source-brand "Source Brand" --brand "Target Brand"
46
46
  ```
@@ -54,7 +54,7 @@ and the approved colour palette byte-for-byte.
54
54
  convenience orchestration command that executes the same checkpoints in order:
55
55
 
56
56
  ```bash
57
- python3 tools/clis/maggie_clone_to_template.py run <url> \
57
+ maggie tool maggie_clone_to_template.py run <url> \
58
58
  "Use a compact editorial layout, keep the existing copy, and use warm gold accents." \
59
59
  --rename <template-id> --category <category> --tag <tag>
60
60
  ```
@@ -80,15 +80,15 @@ template ID, then run the stable CLIs above. If the turn ends at any gate,
80
80
  continue with:
81
81
 
82
82
  ```bash
83
- python3 tools/clis/maggie_clone_to_template.py resume <template-id>
83
+ maggie tool maggie_clone_to_template.py resume <template-id>
84
84
  ```
85
85
 
86
86
  After applying the prompt, run the review and validation checkpoints:
87
87
 
88
88
  ```bash
89
- python3 tools/clis/maggie_clone_to_template.py review <template-id> \
89
+ maggie tool maggie_clone_to_template.py review <template-id> \
90
90
  --source-dir <source-screenshot-dir>
91
- python3 tools/clis/maggie_clone_to_template.py validate <template-id>
91
+ maggie tool maggie_clone_to_template.py validate <template-id>
92
92
  ```
93
93
 
94
94
  `review` writes `visual-review/report.json` and three current screenshots. It
@@ -123,7 +123,7 @@ fails closed unless all three source screenshots can be compared; use
123
123
  7. Run:
124
124
 
125
125
  ```bash
126
- python3 tools/clis/maggie_marketplace.py validate marketplace/templates/<id>
126
+ maggie tool maggie_marketplace.py validate marketplace/templates/<id>
127
127
  ```
128
128
 
129
129
  7. Sync only the approved metadata and previews to the public registry. Keep
@@ -67,7 +67,7 @@ Rebranding and review are separate actions. If the approved brief names a
67
67
  target brand, run the explicit rebrand command before review:
68
68
 
69
69
  ```bash
70
- python3 tools/clis/maggie_design.py rebrand \
70
+ maggie tool maggie_design.py rebrand \
71
71
  --template marketplace/templates/<id> \
72
72
  --source-brand "Source Brand" --brand "Target Brand"
73
73
  ```
@@ -79,7 +79,7 @@ validation.
79
79
  After marketplace import, call the homepage-review mode of `maggie-design`:
80
80
 
81
81
  ```bash
82
- python3 tools/clis/maggie_design.py review \
82
+ maggie tool maggie_design.py review \
83
83
  --template marketplace/templates/<id> \
84
84
  --source-dir <verified-maggie-clone-screenshot-dir>
85
85
  ```
@@ -80,24 +80,24 @@ advisory and never bypasses validation or owner/Admin approval.
80
80
  ## Stable CLI
81
81
 
82
82
  ```bash
83
- python3 tools/clis/maggie_localization.py plan \
83
+ maggie tool maggie_localization.py plan \
84
84
  --project . --content content.json --source-lang en --target-lang zh-Hans \
85
85
  --market uk --operation translate --locale zh-Hans-GB
86
- python3 tools/clis/maggie_localization.py extract --project . --source-dir src \
86
+ maggie tool maggie_localization.py extract --project . --source-dir src \
87
87
  --routes-file docs/routes.tsv --output .maggie/localization/source.json
88
- python3 tools/clis/maggie_localization.py plan --project . --content content.json \
88
+ maggie tool maggie_localization.py plan --project . --content content.json \
89
89
  --source .maggie/localization/source.json --source-lang en --target-lang zh-Hans \
90
90
  --market uk --operation translate --locale zh-Hans-GB
91
- python3 tools/clis/maggie_localization.py preview .maggie/localization/<job>.json
92
- python3 tools/clis/maggie_localization.py validate .maggie/localization/<job>.json
93
- python3 tools/clis/maggie_localization.py validate .maggie/localization/<job>.json \
91
+ maggie tool maggie_localization.py preview .maggie/localization/<job>.json
92
+ maggie tool maggie_localization.py validate .maggie/localization/<job>.json
93
+ maggie tool maggie_localization.py validate .maggie/localization/<job>.json \
94
94
  --source .maggie/localization/source.json \
95
95
  --render-report .maggie/localization/rendered.json
96
- python3 tools/clis/maggie_localization.py review .maggie/localization/<job>.json \
96
+ maggie tool maggie_localization.py review .maggie/localization/<job>.json \
97
97
  --reviewer owner@example.com --decision approve
98
- python3 tools/clis/maggie_localization.py publish .maggie/localization/<job>.json --confirm
99
- python3 tools/clis/maggie_localization.py stale --project .
100
- python3 tools/clis/maggie_localization.py glossary --project .
98
+ maggie tool maggie_localization.py publish .maggie/localization/<job>.json --confirm
99
+ maggie tool maggie_localization.py stale --project .
100
+ maggie tool maggie_localization.py glossary --project .
101
101
  ```
102
102
 
103
103
  Operations are distinct: `translate` preserves meaning, `polish` improves
@@ -136,7 +136,7 @@ configuration under `.maggie/deployment`; merely creating the directory is not
136
136
  enough:
137
137
 
138
138
  ```bash
139
- python3 tools/clis/maggie_deployment.py /path/to/project \
139
+ maggie tool maggie_deployment.py /path/to/project \
140
140
  --target cloudflare --environment staging \
141
141
  --output .maggie/deployment-preflight.json
142
142
  ```
@@ -188,7 +188,7 @@ read-only check.
188
188
  Generate a reviewable VPS plan and configuration artifacts locally:
189
189
 
190
190
  ```bash
191
- python3 tools/clis/maggie_deployment.py /path/to/project \
191
+ maggie tool maggie_deployment.py /path/to/project \
192
192
  --vps-plan --domain example.co.uk --service example \
193
193
  --release-root /var/www/example \
194
194
  --node-port 4321 \
@@ -224,7 +224,7 @@ preserve the `current` target and rollback target, and review prune candidates
224
224
  before any operator executes cleanup. Generate a read-only candidate report:
225
225
 
226
226
  ```bash
227
- python3 tools/clis/maggie_deployment.py --retention-plan \
227
+ maggie tool maggie_deployment.py --retention-plan \
228
228
  --release-root /var/www/example \
229
229
  --current-link /var/www/example/current \
230
230
  --keep-releases 2 --output .maggie/deployment/retention-plan.json
@@ -236,7 +236,7 @@ retained releases.
236
236
  Validate the database release separately before a VPS migration:
237
237
 
238
238
  ```bash
239
- python3 tools/clis/maggie_migration.py .maggie/migration-release.json \
239
+ maggie tool maggie_migration.py .maggie/migration-release.json \
240
240
  --environment staging --output .maggie/migration-preflight.json
241
241
  ```
242
242
 
@@ -288,7 +288,7 @@ Validate and materialise scheduled jobs only after their quota and lock policy
288
288
  has been reviewed:
289
289
 
290
290
  ```bash
291
- python3 tools/clis/maggie_schedule.py .maggie/schedule.json \
291
+ maggie tool maggie_schedule.py .maggie/schedule.json \
292
292
  --units-dir .maggie/deployment/schedules
293
293
  ```
294
294
 
@@ -301,34 +301,47 @@ output/state artifact and must never be used as the provider source argument.
301
301
  When validating a project schedule, pass `--project` so the URL is compared
302
302
  exactly with `.maggie/booking/services.json` `sourceUrl`.
303
303
 
304
- For a single read-only staging release gate, run. This gate also requires
305
- explicit editorial approval for all launch category copy; rendered draft
306
- evidence is not publication approval:
304
+ For a single read-only staging release gate, first declare the project's release
305
+ surface in `.maggie/release-profile.json`. The manifest is the source of truth;
306
+ Maggie does not infer Booking, MaggieDash, migration, analytics, service
307
+ catalogue, or editorial gates from incidental files. A minimal public Astro
308
+ site can use:
309
+
310
+ ```json
311
+ {
312
+ "schemaVersion": "maggie-release-profile.v1",
313
+ "profile": "public-astro",
314
+ "projectType": "astro",
315
+ "capabilities": ["deployment"]
316
+ }
317
+ ```
318
+
319
+ Add `migration`, `maggiedash-health`, `schedule`, `analytics-contract`,
320
+ `service-facts`, `editorial-review`, or `durable-site-evidence` only when that
321
+ project actually owns the corresponding artifact. For a single read-only
322
+ staging release gate, run:
307
323
 
308
324
  ```bash
309
- python3 tools/clis/maggie_release.py /path/to/project \
325
+ maggie tool maggie_release.py /path/to/project \
326
+ --profile /path/to/project/.maggie/release-profile.json \
310
327
  --environment staging --target vps-with-cloudflare-dns \
311
328
  --base-url https://staging.example.com
312
329
  ```
313
330
 
314
- If `.maggie/scenario-manifest.json` or `.maggie/qa-runs/` exists, the same
315
- preflight consumes the latest matching `maggie qa` run for the requested
316
- environment (and `--base-url`, when supplied). It blocks when a scenario is
317
- not passed, has no browser-adapter evidence, or the matching run is missing.
318
- Projects without scenario QA report `not-configured`; Maggie does not run the
319
- browser itself.
320
-
321
- This aggregates deployment, migration, provider-health, schedule, analytics,
322
- service-fact, editorial approval, durable SEO/route/category evidence,
323
- MaggieDash schema compatibility, and live runtime security-header checks. It writes
324
- `.maggie/release-preflight.json`; a failed gate blocks release. It never
325
- deploys, migrates, publishes, or sends provider requests.
331
+ If `scenario-qa` is declared, the preflight consumes the latest matching
332
+ `maggie qa` run for the requested environment (and `--base-url`, when
333
+ supplied). It blocks when a scenario is not passed, has no browser-adapter
334
+ evidence, or the matching run is missing. The report records every undeclared
335
+ optional gate as `skipped`, so a public site is not blocked by Booking- or
336
+ MaggieDash-only evidence. It writes `.maggie/release-preflight.json`; a failed
337
+ gate blocks release. It never deploys, migrates, publishes, or sends provider
338
+ requests.
326
339
 
327
340
  Generate a repeatable VPS runner as part of the plan. A deploy step that exists
328
341
  only in an operator's shell history is not a release contract:
329
342
 
330
343
  ```bash
331
- python3 tools/clis/maggie_deployment.py /path/to/project \
344
+ maggie tool maggie_deployment.py /path/to/project \
332
345
  --vps-plan --domain example.co.uk --service example \
333
346
  --release-root /var/www/example \
334
347
  --runner-output .maggie/deployment/release-runner.sh
@@ -338,6 +351,27 @@ Review the generated runner before execution. Its order is install → typecheck
338
351
  → migrate → build → carry agent state → switch → restart → verify → prune;
339
352
  retention keeps the current release and one rollback candidate.
340
353
 
354
+ Before writing a VPS plan or running the release gate, validate the real
355
+ least-privilege deploy account. This check is read-only: it verifies SSH access,
356
+ write permission for both the release root and `releases/`, and the exact
357
+ non-interactive systemd allowlist. A failed check does not create the plan or
358
+ runner:
359
+
360
+ ```bash
361
+ maggie deployment --verify-deployer \
362
+ --deployer-host "$DEPLOY_SERVER_IP" \
363
+ --deployer-user "$DEPLOY_SERVER_SSH_USER" \
364
+ --release-root /var/www/example \
365
+ --service example \
366
+ --output .maggie/deployment/deployer-delegation.json
367
+ ```
368
+
369
+ For a VPS `maggie release`, this evidence is required at
370
+ `.maggie/deployment/deployer-delegation.json` (or pass
371
+ `--deployer-evidence`). The generated runner waits for bounded transient
372
+ `000/502/503/504` startup responses after restart, while returning a clear
373
+ failure immediately for permanent HTTP responses.
374
+
341
375
  Production additionally requires `docs/deployment-rollback-smoke.json` with
342
376
  `passed: true`, `environment: production`, and `testedAt`. For an upgrade it
343
377
  must include a non-empty `previousRelease`. For the first production release,
@@ -348,7 +382,7 @@ production-only evidence.
348
382
 
349
383
  ## Required workflow
350
384
 
351
- 1. Run `python3 tools/clis/maggie.py analyze <project> --save` and inspect the
385
+ 1. Run `maggie tool maggie.py analyze <project> --save` and inspect the
352
386
  selected framework, runtime, build/deploy commands, route inventory, data
353
387
  layer, and deployment risks.
354
388
  2. Confirm the target, domain, environment (`staging` or `production`), data
@@ -26,7 +26,7 @@ routes remain authenticated and `noindex`.
26
26
  ## Required preflight
27
27
 
28
28
  ```bash
29
- python3 tools/clis/maggie_deployment.py . \
29
+ maggie tool maggie_deployment.py . \
30
30
  --target vps-with-cloudflare-dns \
31
31
  --environment staging \
32
32
  --output .maggie/deployment-preflight.json
@@ -86,7 +86,7 @@ this pattern assumes.
86
86
  Create a local, secret-free plan before remote execution:
87
87
 
88
88
  ```bash
89
- python3 tools/clis/maggie_deployment.py . --vps-plan \
89
+ maggie tool maggie_deployment.py . --vps-plan \
90
90
  --domain example.co.uk --service example \
91
91
  --release-root /var/www/example \
92
92
  --node-port 4321 \
@@ -102,7 +102,7 @@ canonical HTTPS `allowedDomains` plus trusted `X-Forwarded-Host`/
102
102
  Use a dedicated least-privilege deployer when generating the plan:
103
103
 
104
104
  ```bash
105
- python3 tools/clis/maggie_deployment.py . --vps-plan \
105
+ maggie tool maggie_deployment.py . --vps-plan \
106
106
  --domain example.co.uk --service example --node-port 4321 \
107
107
  --deployer-user maggie-deploy
108
108
  ```
@@ -116,7 +116,7 @@ Review the generated systemd and Nginx files, then obtain explicit approval
116
116
  before installing them on a host.
117
117
 
118
118
  Database safety is a separate gate. Run
119
- `python3 tools/clis/maggie_migration.py <manifest> --environment staging`
119
+ `maggie tool maggie_migration.py <manifest> --environment staging`
120
120
  before staging migration and require a successful restore test before a
121
121
  production release. Keep the backup artifact and migration version in the
122
122
  handover record; never put a database URL or password in the manifest.
@@ -131,17 +131,17 @@ Run the complete clone workflow first. After the full target page has been
131
131
  built, compared, and verified, create the reconciliation contract:
132
132
 
133
133
  ```bash
134
- python3 tools/clis/maggie_design.py <target-url1> [<target-url2> ...] \\
134
+ maggie tool maggie_design.py <target-url1> [<target-url2> ...] \\
135
135
  --project <project-root> --clone-run <verified-clone-run-id> --save
136
136
  ```
137
137
 
138
138
  The design contract also has a resumable CLI workflow:
139
139
 
140
140
  ```bash
141
- python3 tools/clis/maggie_design.py run <target-url1> [<target-url2> ...] \
141
+ maggie tool maggie_design.py run <target-url1> [<target-url2> ...] \
142
142
  --project <project-root> --clone-run <verified-clone-run-id>
143
- python3 tools/clis/maggie_design.py status <design-job-id> --project <project-root>
144
- python3 tools/clis/maggie_design.py resume <design-job-id> --project <project-root>
143
+ maggie tool maggie_design.py status <design-job-id> --project <project-root>
144
+ maggie tool maggie_design.py resume <design-job-id> --project <project-root>
145
145
  ```
146
146
 
147
147
  The job writes `.maggie/design-jobs/<job-id>.json` and stops at `failed` when
@@ -163,7 +163,7 @@ Use in-place mode when the route already belongs to the current first-party
163
163
  project and should be redesigned without cloning an external URL:
164
164
 
165
165
  ```bash
166
- python3 tools/clis/maggie_design.py in-place \
166
+ maggie tool maggie_design.py in-place \
167
167
  --project <project-root> \
168
168
  --route /pricing \
169
169
  --route /about
@@ -291,7 +291,7 @@ The homepage `review` mode only compares screenshots. It does not rebrand a
291
291
  template. When the user explicitly requests a brand change, run:
292
292
 
293
293
  ```bash
294
- python3 tools/clis/maggie_design.py rebrand \
294
+ maggie tool maggie_design.py rebrand \
295
295
  --template marketplace/templates/<id> \
296
296
  --source-brand "Source Brand" \
297
297
  --brand "Target Brand"
@@ -310,7 +310,7 @@ with Maggie Studio.
310
310
  - Require a completed `.maggie/bootstrap-state.json` and a completed homepage
311
311
  foundation from `maggie-clone`. If either is missing, stop and request it.
312
312
  - Require a project-level `DESIGN.md` generated from the industry reference and
313
- clone evidence. Validate it with `python3 tools/clis/maggie_design_system.py
313
+ clone evidence. Validate it with `maggie tool maggie_design_system.py
314
314
  validate DESIGN.md`; if it is missing or invalid, stop before editing.
315
315
  - Reject the origin homepage as a target. Use `maggie-clone` for that job.
316
316
  - The target is initially cloned as a complete page. After that first pass,
@@ -334,9 +334,9 @@ Follow the shared [Maggie decision loop](../../references/decision-loop.md).
334
334
  Inspect before editing:
335
335
 
336
336
  ```bash
337
- python3 tools/clis/maggie.py status <project-root>
338
- python3 tools/clis/maggie.py doctor <project-root> --require-bootstrap --strict
339
- python3 tools/clis/maggie_clone.py verify --project <project-root> --run-id <verified-clone-run-id>
337
+ maggie tool maggie.py status <project-root>
338
+ maggie tool maggie.py doctor <project-root> --require-bootstrap --strict
339
+ maggie tool maggie_clone.py verify --project <project-root> --run-id <verified-clone-run-id>
340
340
  ```
341
341
 
342
342
  Read and follow the complete `maggie-clone` workflow before proceeding. The
@@ -493,8 +493,8 @@ For every target:
493
493
  the final content region to the target for page fidelity.
494
494
  4. Sweep keyboard focus, links, forms, hover, tabs/dialogs, scroll behavior,
495
495
  mobile menu, and reduced-motion behavior.
496
- 5. Run `python3 tools/clis/site_audit.py <local-or-production-url> --json`.
497
- 6. Run `python3 tools/clis/maggie_clone.py compare --project <project-root> --run-id <verified-clone-run-id> --local-url <local-or-staging-url> --force` and review the final content-region diff.
496
+ 5. Run `maggie tool site_audit.py <local-or-production-url> --json`.
497
+ 6. Run `maggie tool maggie_clone.py compare --project <project-root> --run-id <verified-clone-run-id> --local-url <local-or-staging-url> --force` and review the final content-region diff.
498
498
  7. Confirm the final DOM has exactly one header and one footer, the homepage
499
499
  shell is the imported source of truth, and no target-shell fallback remains.
500
500