Aetheria-Labs1/storefront-skills / skills/optimize
optimize
FlaggedScore an existing Lexsis page against the same page-type, design, proof, offer, asset and copy rules used to build pages, propose improvements as a strict optimization plan with real replacement copy and asset decisions, wait for approval, then apply the approved changes with version protection and hosted QA.
references/source-artifact-workflow.md
View on GitHub# MCP source and verification state
Author pages directly through MCP. Do not create local page decision records,
source/CSS files, compile artifacts, preview builds or local QA reports.
The persisted page source and bundle are the baseline; the hosted draft is
the only preview used by these workflows.
## Create one draft
1. Confirm the workspace, store and theme binding through saved context or
current MCP reads. Prepare `source` and structured `head` with a title.
Include `theme_css` only when supplying page-wide CSS. Omitting the field
does not excuse missing theme tokens or accessibility styles.
2. Send the exact values to `lexsis_pages.compile`. Read blocking errors,
warnings, missing utilities, hashes and the short-lived `compile_id`.
Repair source, not compiled JSON.
3. Call `lexsis_page_create.create` with `compile_id`, creation metadata and
`publish:false`. Omit `source`, `head`, `theme_css`, `scripts` and
`runtime_dependencies` when passing `compile_id`. Alternatively send the
exact source/head and optional CSS/scripts directly; create compiles them
server-side. Never combine the two input modes.
4. Reuse an existing page id rather than spending another creation credit.
If the compile id expires, recompile the unchanged inputs once.
5. Record the returned page id, version, preview URL and compile hash in the
task handoff. Surface `DRAFT_CREATED` immediately; it is not a QA pass.
`lexsis_pages.compile_artifact` retrieves an existing compile result for
inspection; it is not another compile route. `lexsis_drafts.page_attach_bundle`
is recovery for a source write whose bundle attachment failed, with
`expected_version`; it is not a normal creation step.
## Edit the persisted source
Every edit after creation goes through `lexsis_build`, in the write mode chosen
by the probe in `lexsis-mcp-contract.md` (Write Path); the full flow is in
`references/page-editing.md`.
1. CLI mode (default): `push_token` with `page_id`, `npx @lexsis/cli pull`,
edit the files, `diff`, `push --dry-run`, `push`. Inline mode (no shell):
`lexsis_build.get` for the version and tree, reading only the files you will
change. Keep stable section ids.
2. Inline: `patch` for small changes, `commit` with only the changed files for
larger ones, always with `base_version`. Either way one compile returns every
diagnostic with file and line; fix them together.
3. Update recorded version evidence only after a successful write, then check
the diff (`npx @lexsis/cli diff` or `lexsis_build.diff`) and run
`lexsis_pages.integrity`.
4. Review the updated hosted draft. Editing a draft is not publishing it.
## Evidence without files
Keep the plan, proof/offer ledgers, confirmed asset decisions, approvals and
QA findings in the task's handoff record. `references/page-files.md` defines
the fields, not a filesystem requirement. Do not invent an MCP action for
storing a plan or manifest.
On continuation, recover the page through MCP and recover or re-establish
any missing evidence and approvals. A page id is not evidence that a claim,
asset right or previous approval was verified.
For production readiness, compare the reviewed inputs with the persisted
source, bundle and version; perform `references/qa-recipe.md` against the
hosted draft. Use `lexsis_pages.qa` to read recorded QA and
`lexsis_drafts.page_record_qa` to save supported evidence fields according to
the current schema. A tool acknowledgment does not replace browser evidence.
Missing browser access, evidence or matching hashes keeps QA pending.
Publication requires explicit approval for that same page and version under
`references/publishing.md`. No local validator or file can grant approval.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |