codymaster 7.0.2 → 7.0.3
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/CHANGELOG.md +64 -0
- package/README.md +38 -1
- package/dist/agent/codex.js +73 -21
- package/dist/agent-dispatch.js +63 -48
- package/dist/cli/commands/brain.js +18 -0
- package/dist/cli/commands/design-studio.js +1 -1
- package/dist/cm-suggest.js +3 -3
- package/dist/dashboard-project-summary.js +9 -0
- package/dist/dashboard.js +11 -5
- package/dist/execution-analyzer.js +9 -1
- package/dist/judge.js +16 -15
- package/dist/mcp-context-server.js +45 -23
- package/dist/mcp-skills-tools.js +2 -2
- package/dist/skill-chain.js +26 -3
- package/dist/skill-token-report.js +105 -0
- package/dist/sprint-pipeline.js +3 -3
- package/dist/ui/onboarding.js +3 -4
- package/dist/utils/design-taste.js +1 -1
- package/dist/utils/output-compress.js +8 -0
- package/package.json +2 -1
- package/public/dashboard/app.js +40 -13
- package/public/dashboard/index.html +190 -5
- package/public/dashboard/style.css +1 -1
- package/scripts/build-skills.mjs +36 -2
- package/scripts/mcp-bridge.js +41 -24
- package/scripts/pack-plugin.mjs +206 -0
- package/skills/cm-ads-tracker/SKILL.md +401 -0
- package/skills/cm-ads-tracker/evals/evals.json +55 -0
- package/skills/cm-ads-tracker/references/gtm-architecture.md +321 -0
- package/skills/cm-ads-tracker/references/industry-events.md +294 -0
- package/skills/cm-ads-tracker/references/platforms-api.md +238 -0
- package/skills/cm-ads-tracker/templates/capi-payload.md +79 -0
- package/skills/cm-ads-tracker/templates/datalayer-push.js +104 -0
- package/skills/cm-ads-tracker/templates/gtm-variables.js +56 -0
- package/skills/cm-auto-publisher/SKILL.md +81 -0
- package/skills/cm-booking-calendar/SKILL.md +521 -0
- package/skills/cm-booking-calendar/references/industry-patterns.md +527 -0
- package/skills/cm-booking-calendar/templates/booking-form.css +626 -0
- package/skills/cm-booking-calendar/templates/booking-form.html +477 -0
- package/skills/cm-booking-calendar/templates/calendar-engine.js +419 -0
- package/skills/cm-booking-calendar/templates/calendar-export.js +395 -0
- package/skills/cm-booking-calendar/templates/reminder-config.js +629 -0
- package/skills/cm-brainstorm-idea/SKILL.md +5 -5
- package/skills/cm-code-review/SKILL.md +2 -2
- package/skills/cm-codeintell/SKILL.md +47 -580
- package/skills/cm-codeintell/references/integration-workflows.md +23 -0
- package/skills/cm-codeintell/references/layer-0-skeleton.md +54 -0
- package/skills/cm-codeintell/references/layer-1-codegraph.md +58 -0
- package/skills/cm-codeintell/references/layer-2-architecture.md +31 -0
- package/skills/cm-codeintell/references/layer-3-context-builder.md +32 -0
- package/skills/cm-content-factory/.content-factory-state.json +132 -0
- package/skills/cm-content-factory/.git 2/logs/refs/heads/main +1 -0
- package/skills/cm-content-factory/.git 2/logs/refs/remotes/origin/main +1 -0
- package/skills/cm-content-factory/.git 2/objects/02/fb0956734b5f8ba3f918b7defd04a89cfe0076 +0 -0
- package/skills/cm-content-factory/.git 2/objects/08/1e129d75dc6feac6c02037272e6bd1a04e3324 +0 -0
- package/skills/cm-content-factory/.git 2/objects/0c/5393416f3c5e01c9a655a802bff0dd52f76f0a +0 -0
- package/skills/cm-content-factory/.git 2/objects/10/0b9be46978a946a77188f68be725098a122001 +0 -0
- package/skills/cm-content-factory/.git 2/objects/10/cf041167fc9843610eb3d90259ef3396315fdc +0 -0
- package/skills/cm-content-factory/.git 2/objects/12/5e19538dd6e1338ffe74f6c4c165b00435bf48 +0 -0
- package/skills/cm-content-factory/.git 2/objects/16/a9b9d0088d5c1347628b45a2620b479d8ad57c +0 -0
- package/skills/cm-content-factory/.git 2/objects/17/8c2a9ef93c33ae4eec9d58e82321f9229843a1 +0 -0
- package/skills/cm-content-factory/.git 2/objects/25/397ae41d09104d763bdcac2695209d85cdea89 +0 -0
- package/skills/cm-content-factory/.git 2/objects/2f/a836b7947f2d458e1f639788bf4bb0983a3305 +0 -0
- package/skills/cm-content-factory/.git 2/objects/3a/baaaf0a1c0909c0828335791557125fba911e0 +0 -0
- package/skills/cm-content-factory/.git 2/objects/42/2924221b81f5ce3c4e4daac9a64a24f9b01f9a +0 -0
- package/skills/cm-content-factory/.git 2/objects/42/ec0ce707447dc11446a34c9995fb8533801731 +0 -0
- package/skills/cm-content-factory/.git 2/objects/46/e43ce92866d56ce74b1d750db307cfe6154a15 +0 -0
- package/skills/cm-content-factory/.git 2/objects/48/5e41b633c63f55b8277bcc59f44f67681f671a +0 -0
- package/skills/cm-content-factory/.git 2/objects/49/49c596a3a89fa240642acd95dd3258e261eb09 +0 -0
- package/skills/cm-content-factory/.git 2/objects/50/9d42d8412ef8eaf7f7e138476bac2e4d10ce60 +0 -0
- package/skills/cm-content-factory/.git 2/objects/55/0c8c389d981b463ef849aeb792d8be3ccb6ec8 +0 -0
- package/skills/cm-content-factory/.git 2/objects/5d/82d3b18410cdda3ace3677436f0cb599dbe2d2 +0 -0
- package/skills/cm-content-factory/.git 2/objects/60/0617c58e871a38b33bf29e282d132bb3c381ad +0 -0
- package/skills/cm-content-factory/.git 2/objects/6a/8369a99c687b7245c92ffaf0e0f0dab9014504 +0 -0
- package/skills/cm-content-factory/.git 2/objects/79/bea435d40ab531c1aaf6be0432c6a5b7aaed21 +0 -0
- package/skills/cm-content-factory/.git 2/objects/7e/5ebd79251c2f14e4aceb86c74b6b6daae6b500 +0 -0
- package/skills/cm-content-factory/.git 2/objects/81/98a822a60178d6d5023ddb3e222cddf048742e +0 -0
- package/skills/cm-content-factory/.git 2/objects/86/0a0e1943dfe53411d2e499a1f16f46a96ef758 +0 -0
- package/skills/cm-content-factory/.git 2/objects/86/971fb55fdc081fdbae52376f0f13e57a4e9b04 +0 -0
- package/skills/cm-content-factory/.git 2/objects/88/b89dd609a0a03f8d4fe8bfde20d5b8fc1d326d +0 -0
- package/skills/cm-content-factory/.git 2/objects/90/8737edb6b7809e32cc01590b4e08ba42a9d40d +0 -0
- package/skills/cm-content-factory/.git 2/objects/93/d5a8a9a7d4fb7f11491cb596a6880528725118 +0 -0
- package/skills/cm-content-factory/.git 2/objects/98/46a2ab81d0c3b3eb00ef88fc56989aa7e9f316 +0 -0
- package/skills/cm-content-factory/.git 2/objects/9b/d8dd1e49cf274eaf9c555f3ab39dce7af5715e +0 -0
- package/skills/cm-content-factory/.git 2/objects/a1/13329fb0cec96ae78b222d33a24c3b5bc7fa1f +0 -0
- package/skills/cm-content-factory/.git 2/objects/a9/e6effe626e8a3aea3a8fc3364b492191c6e7d0 +0 -0
- package/skills/cm-content-factory/.git 2/objects/ad/6de7e48d9782cca9353d1ff0aa1aab7fe1df85 +0 -0
- package/skills/cm-content-factory/.git 2/objects/af/54ae316f771ff692e299ffcd8bf2f06b413b59 +0 -0
- package/skills/cm-content-factory/.git 2/objects/b0/4cb8b0b00dad633e731c1472161419e738d674 +0 -0
- package/skills/cm-content-factory/.git 2/objects/b3/094abb0b9ed46419b269e4a4e36a459690e3b0 +0 -0
- package/skills/cm-content-factory/.git 2/objects/b9/435c5d4baac2cfc5c83009ddd27b46b60db5f1 +0 -0
- package/skills/cm-content-factory/.git 2/objects/ba/5da17dbaec5ec2dcfdfd126aead518d1171d5c +0 -0
- package/skills/cm-content-factory/.git 2/objects/c0/bf58703aa258ba5dd63083bebaec8f223d844c +0 -0
- package/skills/cm-content-factory/.git 2/objects/c4/701a34edf1fc1bad58ccc57bd03f9426acb59a +0 -0
- package/skills/cm-content-factory/.git 2/objects/c7/5ccce9a4e5cc74d9b3174550cf6d993ca43638 +0 -0
- package/skills/cm-content-factory/.git 2/objects/c7/710d59b5a35b0f1f0a0399386643a0bd94c929 +0 -0
- package/skills/cm-content-factory/.git 2/objects/d1/fe58237112e953e5fec52da22cf38e08be3df9 +5 -0
- package/skills/cm-content-factory/.git 2/objects/d2/2bbe9fd2f74c95bc5583e803f5e435f1e2cd86 +0 -0
- package/skills/cm-content-factory/.git 2/objects/d7/e72852ea2bff74581dbf247d400120086229f4 +0 -0
- package/skills/cm-content-factory/.git 2/objects/d8/d4c3b5553e4fd72807e1d4b49ef07d9ef3ac35 +0 -0
- package/skills/cm-content-factory/.git 2/objects/dc/75050c2876f6a02ae2a53a3c886f395b622977 +0 -0
- package/skills/cm-content-factory/.git 2/objects/ee/e8546f95acec500187c08a28a8b9ee02db0dec +0 -0
- package/skills/cm-content-factory/.git 2/objects/ef/263c059208b416c2146434f10cb2b9fabcba16 +0 -0
- package/skills/cm-content-factory/.git 2/objects/f3/ae597e84d9a59b88acd21c99bde2eaf686d785 +0 -0
- package/skills/cm-content-factory/.git 2/objects/f3/f6f5673c821d3d8e76fa267a9e882e7a5387ea +0 -0
- package/skills/cm-content-factory/.git 2/objects/f9/6e6d0ad02624dd11d5848594d056caef7a5e8b +0 -0
- package/skills/cm-content-factory/.git 2/objects/ff/278988fc1edf0db3abcf18de795f4cc0b4f3e1 +0 -0
- package/skills/cm-content-factory/.git 2/refs/heads/main +1 -0
- package/skills/cm-content-factory/.git 2/refs/remotes/origin/main +1 -0
- package/skills/cm-content-factory/.pytest_cache 2/v/cache/nodeids +76 -0
- package/skills/cm-content-factory/.pytest_cache 2/v/cache/stepwise +1 -0
- package/skills/cm-content-factory/AGENTS.md +61 -0
- package/skills/cm-content-factory/CLAUDE.md +63 -0
- package/skills/cm-content-factory/CURSOR.md +43 -0
- package/skills/cm-content-factory/Content Factory.zip +0 -0
- package/skills/cm-content-factory/SKILL.md +416 -0
- package/skills/cm-content-factory/cf +313 -0
- package/skills/cm-content-factory/config.schema.json +397 -0
- package/skills/cm-content-factory/dashboard/app.js +556 -0
- package/skills/cm-content-factory/dashboard/index.html +397 -0
- package/skills/cm-content-factory/dashboard/style.css +1211 -0
- package/skills/cm-content-factory/examples/01-real-estate.config.json +146 -0
- package/skills/cm-content-factory/examples/02-personal-finance.config.json +146 -0
- package/skills/cm-content-factory/examples/03-health-wellness.config.json +147 -0
- package/skills/cm-content-factory/examples/04-saas-software.config.json +147 -0
- package/skills/cm-content-factory/examples/05-legal-services.config.json +147 -0
- package/skills/cm-content-factory/examples/06-insurance.config.json +146 -0
- package/skills/cm-content-factory/examples/07-ecommerce-dropship.config.json +146 -0
- package/skills/cm-content-factory/examples/08-online-education.config.json +147 -0
- package/skills/cm-content-factory/examples/09-crypto-defi.config.json +147 -0
- package/skills/cm-content-factory/examples/10-beauty-skincare.config.json +147 -0
- package/skills/cm-content-factory/examples/11-home-services.config.json +146 -0
- package/skills/cm-content-factory/examples/12-dental-clinic.config.json +147 -0
- package/skills/cm-content-factory/examples/13-pet-care.config.json +147 -0
- package/skills/cm-content-factory/examples/14-travel-hospitality.config.json +147 -0
- package/skills/cm-content-factory/examples/15-ai-automation.config.json +147 -0
- package/skills/cm-content-factory/examples/16-wedding-events.config.json +147 -0
- package/skills/cm-content-factory/examples/17-fitness-coaching.config.json +148 -0
- package/skills/cm-content-factory/examples/18-cybersecurity.config.json +147 -0
- package/skills/cm-content-factory/examples/19-food-restaurant.config.json +148 -0
- package/skills/cm-content-factory/examples/20-solar-energy.config.json +147 -0
- package/skills/cm-content-factory/examples/fitness-blog.config.json +116 -0
- package/skills/cm-content-factory/examples/tech-blog.config.json +107 -0
- package/skills/cm-content-factory/extensions/EXTENSION_GUIDE.md +72 -0
- package/skills/cm-content-factory/extensions/hooks.py +126 -0
- package/skills/cm-content-factory/extensions/openclaw_adapter.py +132 -0
- package/skills/cm-content-factory/landing/docs/content/changelog.md +36 -0
- package/skills/cm-content-factory/landing/docs/content/deployment.md +46 -0
- package/skills/cm-content-factory/landing/docs/content/execution-flow.md +67 -0
- package/skills/cm-content-factory/landing/docs/content/openspace.md +27 -0
- package/skills/cm-content-factory/landing/docs/content/openviking.md +33 -0
- package/skills/cm-content-factory/landing/docs/content/use-cases.md +26 -0
- package/skills/cm-content-factory/landing/docs/content/v5-intro.md +28 -0
- package/skills/cm-content-factory/landing/docs/index.html +240 -0
- package/skills/cm-content-factory/landing/index.html +680 -0
- package/skills/cm-content-factory/landing/script.js +143 -0
- package/skills/cm-content-factory/landing/style.css +1216 -0
- package/skills/cm-content-factory/landing/translations.js +508 -0
- package/skills/cm-content-factory/logs/events.jsonl +11 -0
- package/skills/cm-content-factory/profiles/_template.profile.json +231 -0
- package/skills/cm-content-factory/profiles/finance.profile.json +278 -0
- package/skills/cm-content-factory/profiles/legal.profile.json +263 -0
- package/skills/cm-content-factory/profiles/medical-research.profile.json +321 -0
- package/skills/cm-content-factory/profiles/technology.profile.json +275 -0
- package/skills/cm-content-factory/scripts/agent_dispatcher.py +266 -0
- package/skills/cm-content-factory/scripts/audit.py +106 -0
- package/skills/cm-content-factory/scripts/dashboard_server.py +225 -0
- package/skills/cm-content-factory/scripts/deploy.py +146 -0
- package/skills/cm-content-factory/scripts/extract.py +132 -0
- package/skills/cm-content-factory/scripts/landing_generator.py +459 -0
- package/skills/cm-content-factory/scripts/memory.py +521 -0
- package/skills/cm-content-factory/scripts/monetize.py +239 -0
- package/skills/cm-content-factory/scripts/pipeline.py +357 -0
- package/skills/cm-content-factory/scripts/plan.py +163 -0
- package/skills/cm-content-factory/scripts/publish.py +145 -0
- package/skills/cm-content-factory/scripts/research.py +337 -0
- package/skills/cm-content-factory/scripts/scaffold.py +464 -0
- package/skills/cm-content-factory/scripts/scoreboard.py +336 -0
- package/skills/cm-content-factory/scripts/seo.py +90 -0
- package/skills/cm-content-factory/scripts/state_manager.py +320 -0
- package/skills/cm-content-factory/scripts/token_manager.py +268 -0
- package/skills/cm-content-factory/scripts/validate.py +221 -0
- package/skills/cm-content-factory/scripts/wizard.py +329 -0
- package/skills/cm-content-factory/scripts/write.py +93 -0
- package/skills/cm-content-factory/sites/docs-site/src/assets/houston.webp +0 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/architecture.md +90 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/data-flow.md +54 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/deployment.md +38 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/flows/index.md +65 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/flows/lc-content-lifecycle.md +48 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/flows/seq-write-mode.md +39 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/flows/uj-first-batch.md +42 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/flows/wf-content-pipeline.md +51 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/flows/wf-learning-cycle.md +52 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/getting-started/configuration.md +86 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/getting-started/installation.md +80 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/getting-started/intro.md +58 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/index.md +102 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/jtbd/index.md +45 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/jtbd/optimize-seo.md +29 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/jtbd/scale-content-production.md +55 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/jtbd/standardize-quality.md +29 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/personas/buyer-cmo-huong.md +41 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/personas/buyer-content-lead-khoa.md +40 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/personas/index.md +56 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/personas/user-content-manager-lan.md +46 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/personas/user-seo-minh.md +45 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/personas/user-writer-tu.md +45 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/sop/content-pipeline.md +108 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/sop/index.md +22 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/sop/memory-system.md +52 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/sop/seo-optimization.md +58 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/sop/troubleshooting-guide.md +92 -0
- package/skills/cm-content-factory/sites/docs-site/src/styles/custom.css +575 -0
- package/skills/cm-content-factory/tests/conftest.py +66 -0
- package/skills/cm-content-factory/tests/test_agent_dispatcher.py +125 -0
- package/skills/cm-content-factory/tests/test_memory.py +128 -0
- package/skills/cm-content-factory/tests/test_pipeline.py +107 -0
- package/skills/cm-content-factory/tests/test_research.py +56 -0
- package/skills/cm-content-factory/tests/test_state_manager.py +131 -0
- package/skills/cm-content-factory/tests/test_token_manager.py +110 -0
- package/skills/cm-content-factory/tests/test_wizard.py +121 -0
- package/skills/cm-continuity/SKILL.md +49 -480
- package/skills/cm-continuity/references/cm-uri-scheme.md +23 -0
- package/skills/cm-continuity/references/continuity-template.md +48 -0
- package/skills/cm-continuity/references/mcp-context-server.md +27 -0
- package/skills/cm-continuity/references/memory-architecture.md +26 -0
- package/skills/cm-continuity/references/memory-audit.md +18 -0
- package/skills/cm-continuity/references/session-protocol.md +31 -0
- package/skills/cm-continuity/references/storage-formats.md +20 -0
- package/skills/cm-cro-methodology/SKILL.md +290 -0
- package/skills/cm-cro-methodology/references/COPYWRITING.md +178 -0
- package/skills/cm-cro-methodology/references/OBJECTIONS.md +135 -0
- package/skills/cm-cro-methodology/references/PERSUASION.md +158 -0
- package/skills/cm-cro-methodology/references/RESEARCH.md +220 -0
- package/skills/cm-cro-methodology/references/funnel-analysis.md +365 -0
- package/skills/cm-cro-methodology/references/testing-methodology.md +330 -0
- package/skills/cm-design-system/SKILL.md +5 -6
- package/skills/cm-execution/SKILL.md +61 -379
- package/skills/cm-execution/references/mode-a-batch.md +28 -0
- package/skills/cm-execution/references/mode-b-subagent.md +46 -0
- package/skills/cm-execution/references/mode-c-parallel.md +39 -0
- package/skills/cm-execution/references/mode-d-rarv.md +62 -0
- package/skills/cm-execution/references/mode-e-triz-parallel.md +53 -0
- package/skills/cm-execution/references/mode-f-party.md +61 -0
- package/skills/cm-execution/references/persona-dispatch.md +22 -0
- package/skills/cm-execution/references/security-rules.md +47 -0
- package/skills/cm-google-form/SKILL.md +266 -0
- package/skills/cm-google-form/templates/apps-script.js +55 -0
- package/skills/cm-google-form/templates/form-markup.html +110 -0
- package/skills/cm-google-form/templates/form-submit.js +201 -0
- package/skills/cm-google-form/templates/toast.css +152 -0
- package/skills/cm-growth-hacking/SKILL.md +282 -0
- package/skills/cm-growth-hacking/bottom-sheet-engine.md +261 -0
- package/skills/cm-growth-hacking/calendar-integration.md +264 -0
- package/skills/cm-growth-hacking/references/engagement-patterns.md +346 -0
- package/skills/cm-growth-hacking/templates/bottom-sheet.css +528 -0
- package/skills/cm-growth-hacking/templates/bottom-sheet.js +269 -0
- package/skills/cm-growth-hacking/templates/calendar-cta.js +213 -0
- package/skills/cm-growth-hacking/templates/tracking-events.js +211 -0
- package/skills/cm-growth-hacking/templates/trigger-manager.js +254 -0
- package/skills/cm-growth-hacking/tracking-events.md +246 -0
- package/skills/cm-growth-hacking/trigger-system.md +342 -0
- package/skills/cm-how-it-work/SKILL.md +8 -9
- package/skills/cm-identity-guard/SKILL.md +4 -4
- package/skills/cm-jtbd/SKILL.md +98 -0
- package/skills/cm-notebooklm/SKILL.md +156 -0
- package/skills/cm-notebooklm/references/command_reference.md +94 -0
- package/skills/cm-notebooklm/references/workflows.md +60 -0
- package/skills/cm-notebooklm/resources/knowledge_sources.md +106 -0
- package/skills/cm-notebooklm/scripts/brain-sync.sh +453 -0
- package/skills/cm-notebooklm/scripts/graduate_wisdom.py +101 -0
- package/skills/cm-planning/SKILL.md +3 -3
- package/skills/cm-project-bootstrap/SKILL.md +2 -2
- package/skills/cm-quality-gate/SKILL.md +1 -1
- package/skills/cm-readit/SKILL.md +289 -0
- package/skills/cm-readit/audio-player.md +206 -0
- package/skills/cm-readit/examples/blog-reader.js +352 -0
- package/skills/cm-readit/examples/voice-cro.js +390 -0
- package/skills/cm-readit/tts-engine.md +262 -0
- package/skills/cm-readit/ui-patterns.md +362 -0
- package/skills/cm-readit/voice-cro.md +223 -0
- package/skills/cm-safe-deploy/SKILL.md +80 -510
- package/skills/cm-safe-deploy/references/gate-0-5-security-scan.md +31 -0
- package/skills/cm-safe-deploy/references/gate-0-secret-hygiene.md +68 -0
- package/skills/cm-safe-deploy/references/gate-1-syntax.md +23 -0
- package/skills/cm-safe-deploy/references/gate-2-test-suite.md +28 -0
- package/skills/cm-safe-deploy/references/gate-3-i18n.md +19 -0
- package/skills/cm-safe-deploy/references/gate-4-5-build-dist.md +16 -0
- package/skills/cm-safe-deploy/references/gate-6-deploy-smoke.md +18 -0
- package/skills/cm-safe-deploy/references/rollback.md +17 -0
- package/skills/cm-safe-deploy/references/setup-new-project.md +20 -0
- package/skills/cm-skill-index/SKILL.md +15 -15
- package/skills/cm-start/SKILL.md +1 -1
- package/skills/cm-tdd/SKILL.md +51 -356
- package/skills/cm-tdd/references/bugfix-example.md +15 -0
- package/skills/cm-tdd/references/rationalizations.md +20 -0
- package/skills/cm-tdd/references/red-green-refactor.md +33 -0
- package/skills/cm-tdd/references/stuck-debugging.md +18 -0
- package/skills/cm-tdd/references/test-quality.md +19 -0
- package/skills/cm-ux-master/SKILL.md +368 -115
- package/skills/profiles/core.txt +1 -4
- package/skills/profiles/design.txt +1 -2
- package/skills/profiles/full.txt +10 -16
- package/skills/profiles/growth.txt +9 -9
- package/skills/profiles/top35.json +13 -13
- package/skills/cm-conductor-worktrees/SKILL.archive.md +0 -28
- package/skills/cm-conductor-worktrees/SKILL.md +0 -26
- package/skills/cm-dashboard/SKILL.archive.md +0 -15
- package/skills/cm-dashboard/SKILL.md +0 -26
- package/skills/cm-dashboard/ui/app.js +0 -1278
- package/skills/cm-dashboard/ui/index.html +0 -206
- package/skills/cm-dashboard/ui/style.css +0 -440
- package/skills/cm-design-studio/SKILL.archive.md +0 -34
- package/skills/cm-design-studio/SKILL.md +0 -26
- package/skills/cm-engineering-meta/SKILL.archive.md +0 -73
- package/skills/cm-engineering-meta/SKILL.md +0 -26
- package/skills/cm-git-worktrees/SKILL.archive.md +0 -157
- package/skills/cm-git-worktrees/SKILL.md +0 -26
- package/skills/cm-post-deploy-canary/SKILL.archive.md +0 -22
- package/skills/cm-post-deploy-canary/SKILL.md +0 -26
- package/skills/cm-qa-visual-cli/SKILL.archive.md +0 -22
- package/skills/cm-qa-visual-cli/SKILL.md +0 -26
- package/skills/cm-second-opinion-cli/SKILL.archive.md +0 -23
- package/skills/cm-second-opinion-cli/SKILL.md +0 -26
- package/skills/cm-secret-shield/SKILL.archive.md +0 -580
- package/skills/cm-secret-shield/SKILL.md +0 -26
- package/skills/cm-security-gate/SKILL.archive.md +0 -239
- package/skills/cm-security-gate/SKILL.md +0 -26
- package/skills/cm-skill-health/SKILL.archive.md +0 -83
- package/skills/cm-skill-health/SKILL.md +0 -26
- package/skills/cm-skill-mastery/SKILL.archive.md +0 -156
- package/skills/cm-skill-mastery/SKILL.md +0 -26
- package/skills/cm-skill-search/SKILL.archive.md +0 -49
- package/skills/cm-skill-search/SKILL.md +0 -26
- package/skills/cm-skill-share/SKILL.archive.md +0 -58
- package/skills/cm-skill-share/SKILL.md +0 -26
- package/skills/cm-test-gate/SKILL.archive.md +0 -245
- package/skills/cm-test-gate/SKILL.md +0 -26
- package/skills/cm-ui-preview/SKILL.archive.md +0 -153
- package/skills/cm-ui-preview/SKILL.md +0 -26
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Form Submission Handler — Auto Retry + Toast UI + Fallback
|
|
3
|
+
*
|
|
4
|
+
* Features:
|
|
5
|
+
* - Auto retry 3x with exponential backoff (1s → 2s → 4s)
|
|
6
|
+
* - Toast notifications (success/error/retrying) — no alert()
|
|
7
|
+
* - Phone validation (Vietnamese format)
|
|
8
|
+
* - Zalo/contact fallback on total failure
|
|
9
|
+
* - CORS-safe: handles opaque responses from Google Apps Script
|
|
10
|
+
*
|
|
11
|
+
* USAGE:
|
|
12
|
+
* 1. Include this script in your page (or append to shared.js)
|
|
13
|
+
* 2. Add toast.css to your stylesheet
|
|
14
|
+
* 3. Configure URLS object with your Apps Script deployment URLs
|
|
15
|
+
* 4. Configure FALLBACK_CONTACT with your Zalo/contact URL
|
|
16
|
+
* 5. Add forms with: data-form-type="xxx" onsubmit="window.submitToGoogleSheet(event)"
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
// ═══════════════════════════════════════
|
|
20
|
+
// CONFIGURATION — Change these values
|
|
21
|
+
// ═══════════════════════════════════════
|
|
22
|
+
const FORM_CONFIG = {
|
|
23
|
+
// Apps Script URLs per form type
|
|
24
|
+
URLS: {
|
|
25
|
+
// Add your deployed Apps Script URLs here
|
|
26
|
+
// massage: 'https://script.google.com/macros/s/YOUR_ID/exec',
|
|
27
|
+
// course: 'https://script.google.com/macros/s/YOUR_ID/exec',
|
|
28
|
+
},
|
|
29
|
+
// Fallback contact when form fails completely
|
|
30
|
+
FALLBACK_CONTACT: {
|
|
31
|
+
url: 'https://zalo.me/0559669663', // Change to your Zalo/Messenger/etc
|
|
32
|
+
label: '💬 Nhắn tin Zalo ngay', // Button text
|
|
33
|
+
},
|
|
34
|
+
// Retry settings
|
|
35
|
+
MAX_RETRIES: 3,
|
|
36
|
+
// Phone validation regex (Vietnamese)
|
|
37
|
+
PHONE_REGEX: /^0\d{8,10}$/,
|
|
38
|
+
// Messages (Vietnamese — customize for your language)
|
|
39
|
+
MESSAGES: {
|
|
40
|
+
sending: 'Đang gửi...',
|
|
41
|
+
retrying: (attempt, max) => `Đang thử lại (${attempt}/${max})...`,
|
|
42
|
+
phoneInvalid: {
|
|
43
|
+
title: 'Số điện thoại không hợp lệ',
|
|
44
|
+
msg: 'Vui lòng nhập số điện thoại bắt đầu bằng 0, từ 9-11 chữ số.',
|
|
45
|
+
},
|
|
46
|
+
success: {
|
|
47
|
+
title: 'Đăng ký thành công! 🎉',
|
|
48
|
+
msg: 'Chúng tôi sẽ liên hệ bạn trong 30 phút. Nhắn Zalo để được tư vấn nhanh hơn!',
|
|
49
|
+
},
|
|
50
|
+
retryNotice: {
|
|
51
|
+
title: 'Đang thử lại...',
|
|
52
|
+
msg: (attempt, max) => `Lần ${attempt}/${max} — Vui lòng chờ trong giây lát.`,
|
|
53
|
+
},
|
|
54
|
+
error: {
|
|
55
|
+
title: 'Gửi không thành công',
|
|
56
|
+
msg: 'Hệ thống đang bận. Vui lòng nhắn tin Zalo để được hỗ trợ ngay — chúng tôi sẽ phản hồi trong 5 phút!',
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
// ═══════════════════════════════════════
|
|
62
|
+
// TOAST NOTIFICATION SYSTEM
|
|
63
|
+
// ═══════════════════════════════════════
|
|
64
|
+
|
|
65
|
+
function getToastContainer() {
|
|
66
|
+
let c = document.querySelector('.form-toast-container');
|
|
67
|
+
if (!c) {
|
|
68
|
+
c = document.createElement('div');
|
|
69
|
+
c.className = 'form-toast-container';
|
|
70
|
+
document.body.appendChild(c);
|
|
71
|
+
}
|
|
72
|
+
return c;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function showFormToast(type, title, msg, options = {}) {
|
|
76
|
+
const container = getToastContainer();
|
|
77
|
+
container.querySelectorAll('.form-toast').forEach(t => hideFormToast(t));
|
|
78
|
+
|
|
79
|
+
const icons = { success: '✅', error: '❌', retrying: '⏳' };
|
|
80
|
+
const toast = document.createElement('div');
|
|
81
|
+
toast.className = `form-toast form-toast--${type}`;
|
|
82
|
+
|
|
83
|
+
const fallback = FORM_CONFIG.FALLBACK_CONTACT;
|
|
84
|
+
toast.innerHTML = `
|
|
85
|
+
<span class="form-toast-icon">${icons[type] || '📋'}</span>
|
|
86
|
+
<div class="form-toast-body">
|
|
87
|
+
<div class="form-toast-title">${title}</div>
|
|
88
|
+
<div class="form-toast-msg">${msg}</div>
|
|
89
|
+
${options.showFallback ? `<a href="${fallback.url}" target="_blank" class="form-toast-zalo">${fallback.label}</a>` : ''}
|
|
90
|
+
</div>
|
|
91
|
+
<button class="form-toast-close" aria-label="Close">✕</button>
|
|
92
|
+
`;
|
|
93
|
+
|
|
94
|
+
toast.querySelector('.form-toast-close').addEventListener('click', () => hideFormToast(toast));
|
|
95
|
+
container.appendChild(toast);
|
|
96
|
+
|
|
97
|
+
const dismissMs = { success: 6000, error: 15000, retrying: 10000 };
|
|
98
|
+
setTimeout(() => hideFormToast(toast), dismissMs[type] || 8000);
|
|
99
|
+
|
|
100
|
+
return toast;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function hideFormToast(toast) {
|
|
104
|
+
if (!toast || !toast.parentNode) return;
|
|
105
|
+
toast.classList.add('hiding');
|
|
106
|
+
setTimeout(() => toast.remove(), 300);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// ═══════════════════════════════════════
|
|
110
|
+
// FETCH WITH RETRY (Exponential Backoff)
|
|
111
|
+
// ═══════════════════════════════════════
|
|
112
|
+
|
|
113
|
+
async function fetchWithRetry(url, options, maxRetries, onRetry) {
|
|
114
|
+
let lastError;
|
|
115
|
+
for (let attempt = 1; attempt <= maxRetries; attempt++) {
|
|
116
|
+
try {
|
|
117
|
+
const res = await fetch(url, options);
|
|
118
|
+
if (res.type === 'opaque' || res.ok) return res;
|
|
119
|
+
try {
|
|
120
|
+
const data = await res.json();
|
|
121
|
+
if (data.status === 'success') return res;
|
|
122
|
+
throw new Error(data.message || 'Server error');
|
|
123
|
+
} catch {
|
|
124
|
+
if (res.type === 'opaque') return res;
|
|
125
|
+
throw new Error(`HTTP ${res.status}`);
|
|
126
|
+
}
|
|
127
|
+
} catch (err) {
|
|
128
|
+
lastError = err;
|
|
129
|
+
if (attempt < maxRetries) {
|
|
130
|
+
const delay = Math.pow(2, attempt - 1) * 1000;
|
|
131
|
+
if (onRetry) onRetry(attempt, maxRetries);
|
|
132
|
+
await new Promise(r => setTimeout(r, delay));
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
throw lastError;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// ═══════════════════════════════════════
|
|
140
|
+
// FORM SUBMISSION HANDLER
|
|
141
|
+
// ═══════════════════════════════════════
|
|
142
|
+
|
|
143
|
+
window.submitToGoogleSheet = function (event) {
|
|
144
|
+
event.preventDefault();
|
|
145
|
+
const form = event.target;
|
|
146
|
+
const btn = form.querySelector('button[type="submit"]');
|
|
147
|
+
if (!btn || btn.disabled) return;
|
|
148
|
+
const originalText = btn.innerText;
|
|
149
|
+
const cfg = FORM_CONFIG;
|
|
150
|
+
const msgs = cfg.MESSAGES;
|
|
151
|
+
|
|
152
|
+
// Phone validation
|
|
153
|
+
const phoneInput = form.querySelector('input[name="phone"]');
|
|
154
|
+
if (phoneInput) {
|
|
155
|
+
const phone = phoneInput.value.replace(/\s+/g, '');
|
|
156
|
+
if (!cfg.PHONE_REGEX.test(phone)) {
|
|
157
|
+
showFormToast('error', msgs.phoneInvalid.title, msgs.phoneInvalid.msg);
|
|
158
|
+
phoneInput.focus();
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// Auto-fill source URL
|
|
164
|
+
const urlInput = form.querySelector('input[name="url"]');
|
|
165
|
+
if (urlInput) urlInput.value = window.location.href;
|
|
166
|
+
|
|
167
|
+
const formType = form.getAttribute('data-form-type') || Object.keys(cfg.URLS)[0];
|
|
168
|
+
const scriptURL = cfg.URLS[formType] || Object.values(cfg.URLS)[0];
|
|
169
|
+
|
|
170
|
+
if (!scriptURL) {
|
|
171
|
+
showFormToast('error', 'Lỗi cấu hình', 'Chưa cấu hình URL cho form type: ' + formType);
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
btn.innerText = msgs.sending;
|
|
176
|
+
btn.disabled = true;
|
|
177
|
+
|
|
178
|
+
fetchWithRetry(
|
|
179
|
+
scriptURL,
|
|
180
|
+
{ method: 'POST', body: new FormData(form) },
|
|
181
|
+
cfg.MAX_RETRIES,
|
|
182
|
+
(attempt, max) => {
|
|
183
|
+
btn.innerText = msgs.retrying(attempt, max);
|
|
184
|
+
showFormToast('retrying', msgs.retryNotice.title, msgs.retryNotice.msg(attempt, max));
|
|
185
|
+
}
|
|
186
|
+
)
|
|
187
|
+
.then(() => {
|
|
188
|
+
showFormToast('success', msgs.success.title, msgs.success.msg, { showFallback: true });
|
|
189
|
+
form.reset();
|
|
190
|
+
setTimeout(() => {
|
|
191
|
+
window.open(cfg.FALLBACK_CONTACT.url, '_blank');
|
|
192
|
+
}, 1500);
|
|
193
|
+
})
|
|
194
|
+
.catch(() => {
|
|
195
|
+
showFormToast('error', msgs.error.title, msgs.error.msg, { showFallback: true });
|
|
196
|
+
})
|
|
197
|
+
.finally(() => {
|
|
198
|
+
btn.innerText = originalText;
|
|
199
|
+
btn.disabled = false;
|
|
200
|
+
});
|
|
201
|
+
};
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/* ============================================
|
|
2
|
+
FORM TOAST NOTIFICATION
|
|
3
|
+
============================================
|
|
4
|
+
|
|
5
|
+
Copy this into your main CSS file.
|
|
6
|
+
|
|
7
|
+
Dependencies: none
|
|
8
|
+
CSS Variables used (override if needed):
|
|
9
|
+
- --space-2 through --space-8
|
|
10
|
+
- --radius-lg, --radius-full
|
|
11
|
+
- --text-sm
|
|
12
|
+
- --transition-fast
|
|
13
|
+
- --white
|
|
14
|
+
|
|
15
|
+
If your project doesn't use CSS variables,
|
|
16
|
+
replace them with fixed values:
|
|
17
|
+
- --space-2: 8px, --space-3: 12px, --space-4: 16px, --space-5: 20px
|
|
18
|
+
- --radius-lg: 12px, --radius-full: 9999px
|
|
19
|
+
- --text-sm: 14px
|
|
20
|
+
- --transition-fast: 150ms ease
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
.form-toast-container {
|
|
24
|
+
position: fixed;
|
|
25
|
+
bottom: 100px;
|
|
26
|
+
left: 50%;
|
|
27
|
+
transform: translateX(-50%);
|
|
28
|
+
z-index: 10000;
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
gap: 12px;
|
|
32
|
+
width: calc(100% - 32px);
|
|
33
|
+
max-width: 440px;
|
|
34
|
+
pointer-events: none;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.form-toast {
|
|
38
|
+
pointer-events: auto;
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: flex-start;
|
|
41
|
+
gap: 12px;
|
|
42
|
+
padding: 16px 20px;
|
|
43
|
+
border-radius: 12px;
|
|
44
|
+
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
45
|
+
animation: toastSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
46
|
+
opacity: 0;
|
|
47
|
+
transform: translateY(20px);
|
|
48
|
+
font-size: 14px;
|
|
49
|
+
line-height: 1.5;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.form-toast.hiding {
|
|
53
|
+
animation: toastSlideDown 0.25s ease-in forwards;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* Variants */
|
|
57
|
+
.form-toast--success {
|
|
58
|
+
background: #ECFDF5;
|
|
59
|
+
border: 1px solid #A7F3D0;
|
|
60
|
+
color: #065F46;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.form-toast--error {
|
|
64
|
+
background: #FEF2F2;
|
|
65
|
+
border: 1px solid #FECACA;
|
|
66
|
+
color: #991B1B;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.form-toast--retrying {
|
|
70
|
+
background: #FFFBEB;
|
|
71
|
+
border: 1px solid #FDE68A;
|
|
72
|
+
color: #92400E;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* Elements */
|
|
76
|
+
.form-toast-icon {
|
|
77
|
+
font-size: 20px;
|
|
78
|
+
flex-shrink: 0;
|
|
79
|
+
line-height: 1;
|
|
80
|
+
margin-top: 1px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.form-toast-body {
|
|
84
|
+
flex: 1;
|
|
85
|
+
min-width: 0;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.form-toast-title {
|
|
89
|
+
font-weight: 700;
|
|
90
|
+
margin-bottom: 2px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.form-toast-msg {
|
|
94
|
+
opacity: 0.85;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.form-toast-close {
|
|
98
|
+
flex-shrink: 0;
|
|
99
|
+
background: none;
|
|
100
|
+
border: none;
|
|
101
|
+
cursor: pointer;
|
|
102
|
+
font-size: 18px;
|
|
103
|
+
line-height: 1;
|
|
104
|
+
opacity: 0.5;
|
|
105
|
+
padding: 4px;
|
|
106
|
+
color: inherit;
|
|
107
|
+
transition: opacity 150ms ease;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.form-toast-close:hover {
|
|
111
|
+
opacity: 1;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* Fallback contact button (Zalo, Messenger, etc.) */
|
|
115
|
+
.form-toast-zalo {
|
|
116
|
+
display: inline-flex;
|
|
117
|
+
align-items: center;
|
|
118
|
+
gap: 6px;
|
|
119
|
+
margin-top: 8px;
|
|
120
|
+
padding: 8px 16px;
|
|
121
|
+
background: #0068FF;
|
|
122
|
+
color: #fff !important;
|
|
123
|
+
border-radius: 9999px;
|
|
124
|
+
font-size: 14px;
|
|
125
|
+
font-weight: 600;
|
|
126
|
+
text-decoration: none;
|
|
127
|
+
transition: background 150ms ease, transform 150ms ease;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.form-toast-zalo:hover {
|
|
131
|
+
background: #0054cc;
|
|
132
|
+
transform: translateY(-1px);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/* Animations */
|
|
136
|
+
@keyframes toastSlideUp {
|
|
137
|
+
from { opacity: 0; transform: translateY(20px); }
|
|
138
|
+
to { opacity: 1; transform: translateY(0); }
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
@keyframes toastSlideDown {
|
|
142
|
+
from { opacity: 1; transform: translateY(0); }
|
|
143
|
+
to { opacity: 0; transform: translateY(20px); }
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/* Mobile: push toast above sticky CTAs */
|
|
147
|
+
@media (max-width: 768px) {
|
|
148
|
+
.form-toast-container {
|
|
149
|
+
bottom: 80px;
|
|
150
|
+
width: calc(100% - 24px);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cm-growth-hacking
|
|
3
|
+
description: "Bottom-sheet and popup growth system: booking CTAs, calendars, lead capture, surveys, re-engagement, with CRO tracking hooks. Zero-deps; works static or dynamic sites. Works with cm-booking-calendar, cm-ads-tracker, cm-google-form, cm-readit, cm-ux-master."
|
|
4
|
+
allowed-tools: Read, Write, Edit, Glob, Grep, Browser
|
|
5
|
+
version: 1.0
|
|
6
|
+
priority: HIGH
|
|
7
|
+
skills:
|
|
8
|
+
- cm-booking-calendar
|
|
9
|
+
- cm-ads-tracker
|
|
10
|
+
- cm-google-form
|
|
11
|
+
- cm-readit
|
|
12
|
+
- cm-ux-master
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# CM Growth Hacking
|
|
16
|
+
|
|
17
|
+
> **Bottom Sheet + Calendar + Trigger + Tracking = Growth Hacking Engine.**
|
|
18
|
+
> Đa ngành, đa mục đích, zero dependencies.
|
|
19
|
+
> 1 skill = mọi growth hacking pattern bạn cần.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 🎯 When to Use
|
|
24
|
+
|
|
25
|
+
| Trigger | Action |
|
|
26
|
+
|---------|--------|
|
|
27
|
+
| User says "bottom sheet", "popup" | Activate — start Phase 1 |
|
|
28
|
+
| User says "đặt lịch popup", "booking bottom sheet" | Activate — focus booking sheet |
|
|
29
|
+
| User says "lead capture", "exit intent" | Activate — focus lead capture |
|
|
30
|
+
| User says "nhắc lịch", "google calendar", "apple calendar" | Activate — focus calendar CTA |
|
|
31
|
+
| User says "flash sale popup", "countdown" | Activate — focus promo sheet |
|
|
32
|
+
| User says "survey", "đánh giá", "feedback" | Activate — focus survey sheet |
|
|
33
|
+
| User says "tăng conversion", "giảm bounce" | Activate — explain + build |
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 📖 Selective Reading Rule (MANDATORY)
|
|
38
|
+
|
|
39
|
+
| File | Status | When to Read |
|
|
40
|
+
|------|--------|--------------|
|
|
41
|
+
| [bottom-sheet-engine.md](bottom-sheet-engine.md) | 🔴 REQUIRED | Any bottom sheet implementation |
|
|
42
|
+
| [trigger-system.md](trigger-system.md) | 🔴 REQUIRED | Setting up when/how sheets appear |
|
|
43
|
+
| [calendar-integration.md](calendar-integration.md) | ⚪ Optional | When sheet includes calendar CTA |
|
|
44
|
+
| [tracking-events.md](tracking-events.md) | ⚪ Optional | When tracking engagement events |
|
|
45
|
+
|
|
46
|
+
> 🔴 **Always read `bottom-sheet-engine.md` + `trigger-system.md` first.**
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 🧭 Quick Decision Tree
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
"I need an engagement popup"
|
|
54
|
+
│
|
|
55
|
+
├─ Booking / Appointment
|
|
56
|
+
│ └─ bottom-sheet-engine + calendar-integration + cm-booking-calendar
|
|
57
|
+
│ └─ Form → Sheet: cm-google-form
|
|
58
|
+
│ └─ Post-submit: Calendar CTA (GCal + ICS)
|
|
59
|
+
│
|
|
60
|
+
├─ Lead Capture / Exit Intent
|
|
61
|
+
│ └─ bottom-sheet-engine + trigger-system (exit-intent)
|
|
62
|
+
│ └─ Form → Sheet: cm-google-form
|
|
63
|
+
│ └─ Tracking: cro_lead_capture
|
|
64
|
+
│
|
|
65
|
+
├─ Flash Sale / Promo
|
|
66
|
+
│ └─ bottom-sheet-engine + trigger-system (timer)
|
|
67
|
+
│ └─ Countdown timer + CTA
|
|
68
|
+
│ └─ Optional: Calendar deadline
|
|
69
|
+
│
|
|
70
|
+
├─ Survey / Feedback
|
|
71
|
+
│ └─ bottom-sheet-engine + trigger-system (post-interaction)
|
|
72
|
+
│ └─ Star rating or NPS
|
|
73
|
+
│ └─ Form → Sheet: cm-google-form
|
|
74
|
+
│
|
|
75
|
+
├─ Event / Webinar Registration
|
|
76
|
+
│ └─ bottom-sheet-engine + calendar-integration
|
|
77
|
+
│ └─ Register → Add to Calendar
|
|
78
|
+
│ └─ Tracking: cro_event_register
|
|
79
|
+
│
|
|
80
|
+
├─ Re-engagement (Return Visitor)
|
|
81
|
+
│ └─ bottom-sheet-engine + trigger-system (return-visitor)
|
|
82
|
+
│ └─ "Welcome back" + personalized CTA
|
|
83
|
+
│
|
|
84
|
+
└─ Chat / Contact CTA
|
|
85
|
+
└─ bottom-sheet-engine + trigger-system (scroll)
|
|
86
|
+
└─ Zalo / Messenger / Hotline buttons
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## 📋 6-Phase Workflow
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
Phase 1: DISCOVER → Scan site, detect industry, identify existing popups/forms
|
|
95
|
+
Phase 2: SOCRATIC GATE → Ask strategic questions (max 5)
|
|
96
|
+
Phase 3: CONFIGURE → Select engagement pattern + customize
|
|
97
|
+
Phase 4: BUILD → Generate bottom sheet + triggers + calendar + tracking
|
|
98
|
+
Phase 5: INTEGRATE → Wire to site + link skills
|
|
99
|
+
Phase 6: VERIFY → Test all interactions + tracking events
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
> 🔴 **Rule:** NEVER skip Phase 1 & 2. Always scan first, ask second.
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Phase 1: DISCOVER
|
|
107
|
+
|
|
108
|
+
Scan the website to understand:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# Find existing popups/modals/sheets
|
|
112
|
+
grep -ri "modal\|popup\|bottom-sheet\|overlay\|dialog" --include="*.html" --include="*.astro" --include="*.css" .
|
|
113
|
+
|
|
114
|
+
# Find existing forms
|
|
115
|
+
grep -ri "data-form-type\|onsubmit\|<form" --include="*.html" --include="*.astro" .
|
|
116
|
+
|
|
117
|
+
# Find existing calendar code
|
|
118
|
+
grep -ri "VCALENDAR\|google.com/calendar\|\.ics\|VEVENT" --include="*.js" --include="*.html" .
|
|
119
|
+
|
|
120
|
+
# Find existing tracking
|
|
121
|
+
grep -ri "dataLayer\|fbq\|ttq\|gtag" --include="*.js" --include="*.html" .
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**Output:** Discovery Report with detected industry, existing UI, and recommended pattern.
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Phase 2: SOCRATIC GATE
|
|
129
|
+
|
|
130
|
+
> 🔴 **MANDATORY.** Ask ALL in ONE message. Max 5 questions.
|
|
131
|
+
|
|
132
|
+
1. **Mục tiêu chính** — Bạn muốn popup/bottom sheet để làm gì? (đặt lịch / thu lead / khuyến mãi / survey / khác)
|
|
133
|
+
2. **Trigger** — Khi nào hiện? (ngay khi vào trang / scroll X% / sau X giây / khi sắp thoát / click nút)
|
|
134
|
+
3. **Nội dung** — Trong popup cần gì? (form / calendar CTA / countdown / rating / nút chat)
|
|
135
|
+
4. **Calendar** — Có cần thêm Google Calendar / Apple Calendar không? Nhắc trước bao lâu?
|
|
136
|
+
5. **Tracking** — Đang chạy ads platform nào? (Facebook / TikTok / Google / không)
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Phase 3: CONFIGURE
|
|
141
|
+
|
|
142
|
+
Based on answers, select from `references/engagement-patterns.md` and build config:
|
|
143
|
+
|
|
144
|
+
```javascript
|
|
145
|
+
const ENGAGEMENT_CONFIG = {
|
|
146
|
+
type: 'booking', // booking | lead | promo | survey | event | chat | reengagement
|
|
147
|
+
trigger: {
|
|
148
|
+
type: 'scroll', // scroll | time | exit | click | return | interaction
|
|
149
|
+
value: 0.3, // scroll % or ms or selector
|
|
150
|
+
delay: 0, // additional delay after trigger
|
|
151
|
+
},
|
|
152
|
+
sheet: {
|
|
153
|
+
size: 'standard', // compact | standard | full
|
|
154
|
+
title: 'Đặt Lịch Khám',
|
|
155
|
+
icon: '📅',
|
|
156
|
+
dismissible: true,
|
|
157
|
+
swipeToDismiss: true,
|
|
158
|
+
},
|
|
159
|
+
calendar: {
|
|
160
|
+
enabled: true,
|
|
161
|
+
providers: ['gcal', 'ics'], // gcal | ics | outlook
|
|
162
|
+
reminderMinutes: [1440, 120], // 1 day + 2 hours before
|
|
163
|
+
location: 'Google Maps URL',
|
|
164
|
+
},
|
|
165
|
+
tracking: {
|
|
166
|
+
events: ['cro_sheet_shown', 'cro_booking_submit', 'cro_calendar_add'],
|
|
167
|
+
conversionValue: 500000,
|
|
168
|
+
currency: 'VND',
|
|
169
|
+
},
|
|
170
|
+
session: {
|
|
171
|
+
dismissKey: 'eng_booking_dismissed',
|
|
172
|
+
storage: 'sessionStorage', // sessionStorage | localStorage
|
|
173
|
+
maxShowPerSession: 1,
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## Phase 4: BUILD
|
|
181
|
+
|
|
182
|
+
Read and use templates from `templates/` directory:
|
|
183
|
+
|
|
184
|
+
| Template | Purpose |
|
|
185
|
+
|----------|---------|
|
|
186
|
+
| `templates/bottom-sheet.css` | Universal responsive bottom sheet CSS |
|
|
187
|
+
| `templates/bottom-sheet.js` | `BottomSheetEngine` class — create, show, hide, swipe, stack |
|
|
188
|
+
| `templates/calendar-cta.js` | Calendar button generators (GCal + ICS + device detection) |
|
|
189
|
+
| `templates/trigger-manager.js` | `TriggerManager` class — scroll, time, exit, click triggers |
|
|
190
|
+
| `templates/tracking-events.js` | DataLayer push helpers for engagement events |
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## Phase 5: INTEGRATE
|
|
195
|
+
|
|
196
|
+
### Wire to Existing Skills
|
|
197
|
+
|
|
198
|
+
```
|
|
199
|
+
cm-growth-hacking (this skill)
|
|
200
|
+
│
|
|
201
|
+
├── UI Layer ──────────── templates/bottom-sheet.css + .js
|
|
202
|
+
│
|
|
203
|
+
├── Form Submit ───────── @skills/cm-google-form
|
|
204
|
+
│ └── submitToGoogleSheet() → success callback → show calendar CTA
|
|
205
|
+
│
|
|
206
|
+
├── Calendar Logic ────── @skills/cm-booking-calendar
|
|
207
|
+
│ └── calendar-engine.js (scheduling)
|
|
208
|
+
│ └── calendar-export.js (ICS + GCal deep link)
|
|
209
|
+
│ └── reminder-config.js (VALARM + industry patterns)
|
|
210
|
+
│
|
|
211
|
+
├── CRO Tracking ──────── @skills/cm-ads-tracker
|
|
212
|
+
│ └── dataLayer.push() → GTM → FB/TikTok/Google
|
|
213
|
+
│
|
|
214
|
+
└── Design Principles ─── @skills/cm-ux-master
|
|
215
|
+
└── Color, typography, animation standards
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## Phase 6: VERIFY
|
|
221
|
+
|
|
222
|
+
| # | Test Case | Expected |
|
|
223
|
+
|---|-----------|----------|
|
|
224
|
+
| 1 | Bottom sheet opens | Slides up with animation |
|
|
225
|
+
| 2 | Swipe down to dismiss | Sheet closes + state saved |
|
|
226
|
+
| 3 | Trigger fires correctly | Sheet appears at configured trigger |
|
|
227
|
+
| 4 | Form submit (if applicable) | Toast success → Calendar CTA appears |
|
|
228
|
+
| 5 | Google Calendar click | New tab with pre-filled event |
|
|
229
|
+
| 6 | ICS download click | .ics file downloads |
|
|
230
|
+
| 7 | .ics on iOS | Opens Apple Calendar with reminders |
|
|
231
|
+
| 8 | Tracking events fire | dataLayer shows correct events |
|
|
232
|
+
| 9 | Session dismiss works | Sheet doesn't reappear after dismiss |
|
|
233
|
+
| 10 | Mobile responsive | Sheet adapts to viewport |
|
|
234
|
+
| 11 | Accessibility | aria-labels, focus trap, Escape key |
|
|
235
|
+
| 12 | No conflict with existing UI | Doesn't break page layout |
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
## ❌ Anti-Patterns
|
|
240
|
+
|
|
241
|
+
| ❌ Don't | ✅ Do |
|
|
242
|
+
|----------|------|
|
|
243
|
+
| Hardcode content in sheet | Use config object |
|
|
244
|
+
| Show popup immediately on page load | Use trigger system with delay |
|
|
245
|
+
| No dismiss option | Always allow close + swipe |
|
|
246
|
+
| Forget mobile safe-area | Pad for notched devices |
|
|
247
|
+
| Skip tracking | Track every interaction |
|
|
248
|
+
| One-size-fits-all sheet | Use compact/standard/full variants |
|
|
249
|
+
| Autoplay anything | Require user interaction |
|
|
250
|
+
| Show on every page visit | Respect session/localStorage dismiss |
|
|
251
|
+
| Build calendar logic from scratch | Inherit from `cm-booking-calendar` |
|
|
252
|
+
| Build tracking from scratch | Inherit from `cm-ads-tracker` |
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## 📑 Templates
|
|
257
|
+
|
|
258
|
+
| File | Purpose |
|
|
259
|
+
|------|---------|
|
|
260
|
+
| `templates/bottom-sheet.css` | Universal bottom sheet CSS (3 sizes) |
|
|
261
|
+
| `templates/bottom-sheet.js` | BottomSheetEngine class |
|
|
262
|
+
| `templates/calendar-cta.js` | Calendar CTA buttons + auto device route |
|
|
263
|
+
| `templates/trigger-manager.js` | TriggerManager class |
|
|
264
|
+
| `templates/tracking-events.js` | Engagement tracking helpers |
|
|
265
|
+
|
|
266
|
+
## 📚 References
|
|
267
|
+
|
|
268
|
+
| File | Purpose |
|
|
269
|
+
|------|---------|
|
|
270
|
+
| `references/engagement-patterns.md` | 10+ engagement patterns by industry |
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
## 🔗 Related Skills
|
|
275
|
+
|
|
276
|
+
| Need | Skill |
|
|
277
|
+
|------|-------|
|
|
278
|
+
| Calendar scheduling + export | `@[skills/cm-booking-calendar]` |
|
|
279
|
+
| Form → Google Sheet | `@[skills/cm-google-form]` |
|
|
280
|
+
| Full CRO tracking setup | `@[skills/cm-ads-tracker]` |
|
|
281
|
+
| Audio engagement | `@[skills/cm-readit]` |
|
|
282
|
+
| UI/UX design principles | `@[skills/cm-ux-master]` |
|