codymaster 7.0.1 → 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 +117 -2
- 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 +3 -2
- 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,464 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Scaffold — Project scaffolding for content factory.
|
|
4
|
+
|
|
5
|
+
Creates a complete Astro-based content website from config.
|
|
6
|
+
Supports Cloudflare Pages, GitHub Pages, and Netlify deployment.
|
|
7
|
+
|
|
8
|
+
Usage:
|
|
9
|
+
python3 scaffold.py --config content-factory.config.json
|
|
10
|
+
python3 scaffold.py --config content-factory.config.json --dry-run
|
|
11
|
+
python3 scaffold.py --config content-factory.config.json --deploy-only
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
import json
|
|
15
|
+
import sys
|
|
16
|
+
import os
|
|
17
|
+
import subprocess
|
|
18
|
+
import argparse
|
|
19
|
+
from pathlib import Path
|
|
20
|
+
from datetime import datetime
|
|
21
|
+
|
|
22
|
+
SCRIPT_DIR = Path(__file__).resolve().parent
|
|
23
|
+
TEMPLATES_DIR = SCRIPT_DIR.parent / "templates"
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class Scaffold:
|
|
27
|
+
"""Project scaffolding engine."""
|
|
28
|
+
|
|
29
|
+
def __init__(self, config_path: str, dry_run: bool = False):
|
|
30
|
+
with open(config_path, "r", encoding="utf-8") as f:
|
|
31
|
+
self.config = json.load(f)
|
|
32
|
+
self.project_root = Path(config_path).resolve().parent
|
|
33
|
+
self.dry_run = dry_run
|
|
34
|
+
self.brand = self.config.get("brand", {})
|
|
35
|
+
self.deploy_target = self.config.get("deploy", {}).get("target", "none")
|
|
36
|
+
|
|
37
|
+
def scaffold_website(self):
|
|
38
|
+
"""Create a full Astro website from template."""
|
|
39
|
+
print(f" 🏗️ Scaffolding Astro website...")
|
|
40
|
+
print(f" Brand: {self.brand.get('name', 'Unknown')}")
|
|
41
|
+
print(f" Deploy: {self.deploy_target}")
|
|
42
|
+
|
|
43
|
+
if self.dry_run:
|
|
44
|
+
print(f" ⏭️ DRY RUN — no files created")
|
|
45
|
+
self._print_plan()
|
|
46
|
+
return
|
|
47
|
+
|
|
48
|
+
# 1. Create directory structure
|
|
49
|
+
self._create_dirs()
|
|
50
|
+
|
|
51
|
+
# 2. Generate package.json
|
|
52
|
+
self._create_package_json()
|
|
53
|
+
|
|
54
|
+
# 3. Generate astro.config.mjs
|
|
55
|
+
self._create_astro_config()
|
|
56
|
+
|
|
57
|
+
# 4. Generate base layout
|
|
58
|
+
self._create_layouts()
|
|
59
|
+
|
|
60
|
+
# 5. Generate pages
|
|
61
|
+
self._create_pages()
|
|
62
|
+
|
|
63
|
+
# 6. Generate components
|
|
64
|
+
self._create_components()
|
|
65
|
+
|
|
66
|
+
# 7. Generate styles
|
|
67
|
+
self._create_styles()
|
|
68
|
+
|
|
69
|
+
# 8. Generate deploy configs
|
|
70
|
+
self._create_deploy_config()
|
|
71
|
+
|
|
72
|
+
# 9. Generate static files
|
|
73
|
+
self._create_static_files()
|
|
74
|
+
|
|
75
|
+
print(f"\n 🎉 Website scaffolded!")
|
|
76
|
+
print(f" Next: cd {self.project_root} && npm install && npm run dev")
|
|
77
|
+
|
|
78
|
+
def setup_deploy(self):
|
|
79
|
+
"""Setup deployment configuration only."""
|
|
80
|
+
self._create_deploy_config()
|
|
81
|
+
print(f" ✅ Deploy config created for: {self.deploy_target}")
|
|
82
|
+
|
|
83
|
+
def _print_plan(self):
|
|
84
|
+
print(f"\n Would create:")
|
|
85
|
+
dirs = ["src/layouts", "src/pages/blog", "src/components", "src/styles", "public", "content/blog"]
|
|
86
|
+
for d in dirs:
|
|
87
|
+
print(f" 📁 {d}/")
|
|
88
|
+
files = ["package.json", "astro.config.mjs", "src/layouts/Base.astro",
|
|
89
|
+
"src/pages/index.astro", "src/pages/blog/index.astro",
|
|
90
|
+
"src/pages/blog/[slug].astro", "src/styles/global.css"]
|
|
91
|
+
for f in files:
|
|
92
|
+
print(f" 📄 {f}")
|
|
93
|
+
|
|
94
|
+
def _create_dirs(self):
|
|
95
|
+
for d in ["src/layouts", "src/pages/blog", "src/components", "src/styles",
|
|
96
|
+
"public", "content/blog", "knowledge", "topics-queue"]:
|
|
97
|
+
(self.project_root / d).mkdir(parents=True, exist_ok=True)
|
|
98
|
+
|
|
99
|
+
def _create_package_json(self):
|
|
100
|
+
slug = self.brand.get("name", "site").lower().replace(" ", "-")
|
|
101
|
+
pkg = {
|
|
102
|
+
"name": slug,
|
|
103
|
+
"type": "module",
|
|
104
|
+
"version": "1.0.0",
|
|
105
|
+
"scripts": {
|
|
106
|
+
"dev": "astro dev",
|
|
107
|
+
"build": "astro build",
|
|
108
|
+
"preview": "astro preview"
|
|
109
|
+
},
|
|
110
|
+
"dependencies": {
|
|
111
|
+
"astro": "^5.0.0",
|
|
112
|
+
"@astrojs/sitemap": "^3.0.0"
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
self._write_json(self.project_root / "package.json", pkg)
|
|
116
|
+
|
|
117
|
+
def _create_astro_config(self):
|
|
118
|
+
site_url = f"https://{self.brand.get('name', 'site').lower().replace(' ', '-')}.pages.dev"
|
|
119
|
+
content = f"""import {{ defineConfig }} from 'astro/config';
|
|
120
|
+
import sitemap from '@astrojs/sitemap';
|
|
121
|
+
|
|
122
|
+
export default defineConfig({{
|
|
123
|
+
site: '{site_url}',
|
|
124
|
+
integrations: [sitemap()],
|
|
125
|
+
output: 'static',
|
|
126
|
+
build: {{ assets: 'assets' }}
|
|
127
|
+
}});
|
|
128
|
+
"""
|
|
129
|
+
self._write_file(self.project_root / "astro.config.mjs", content)
|
|
130
|
+
|
|
131
|
+
def _create_layouts(self):
|
|
132
|
+
name = self.brand.get("name", "My Site")
|
|
133
|
+
colors = self.brand.get("colors", {})
|
|
134
|
+
primary = colors.get("primary", "#1A1A2E")
|
|
135
|
+
secondary = colors.get("secondary", "#E94560")
|
|
136
|
+
accent = colors.get("accent", "#F5F5F5")
|
|
137
|
+
|
|
138
|
+
layout = f"""---
|
|
139
|
+
interface Props {{ title: string; description?: string; }}
|
|
140
|
+
const {{ title, description = "{name}" }} = Astro.props;
|
|
141
|
+
---
|
|
142
|
+
<!DOCTYPE html>
|
|
143
|
+
<html lang="{self.brand.get('language', 'en')}">
|
|
144
|
+
<head>
|
|
145
|
+
<meta charset="UTF-8" />
|
|
146
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
147
|
+
<meta name="description" content={{description}} />
|
|
148
|
+
|
|
149
|
+
<!-- PageSpeed: Preconnect & Font Preload -->
|
|
150
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
151
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
152
|
+
<link rel="preload" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" as="style" />
|
|
153
|
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
|
|
154
|
+
|
|
155
|
+
<title>{{title}} — {name}</title>
|
|
156
|
+
|
|
157
|
+
<!-- PageSpeed: Inline Critical CSS -->
|
|
158
|
+
<style is:inline>
|
|
159
|
+
:root {{
|
|
160
|
+
--color-primary: {primary};
|
|
161
|
+
--color-secondary: {secondary};
|
|
162
|
+
--color-accent: {accent};
|
|
163
|
+
--color-bg: #ffffff;
|
|
164
|
+
--color-text: #1a1a1a;
|
|
165
|
+
--font-body: 'Inter', system-ui, sans-serif;
|
|
166
|
+
--header-height: 64px;
|
|
167
|
+
}}
|
|
168
|
+
*,*::before,*::after {{ box-sizing: border-box; margin: 0; padding: 0; }}
|
|
169
|
+
html {{ scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }}
|
|
170
|
+
body {{ font-family: var(--font-body); background: var(--color-bg); color: var(--color-text); line-height: 1.6; min-height: 100vh; }}
|
|
171
|
+
.container {{ max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }}
|
|
172
|
+
.header {{ position: sticky; top: 0; background: rgba(255,255,255,0.9); backdrop-filter: blur(10px); border-bottom: 1px solid #eee; z-index: 100; }}
|
|
173
|
+
</style>
|
|
174
|
+
|
|
175
|
+
<style is:global>
|
|
176
|
+
@import '../styles/global.css';
|
|
177
|
+
</style>
|
|
178
|
+
</head>
|
|
179
|
+
<body>
|
|
180
|
+
<header class="header">
|
|
181
|
+
<div class="container" style="height: var(--header-height); display: flex; justify-content: space-between; align-items: center;">
|
|
182
|
+
<a href="/" style="font-weight: 700; font-size: 1.2rem; color: var(--color-primary);">{name}</a>
|
|
183
|
+
<nav>
|
|
184
|
+
<a href="/blog" style="margin-left: 1.5rem; font-weight: 500;">Blog</a>
|
|
185
|
+
<a href="/about" style="margin-left: 1.5rem; font-weight: 500;">About</a>
|
|
186
|
+
</nav>
|
|
187
|
+
</div>
|
|
188
|
+
</header>
|
|
189
|
+
<main class="container" style="padding: 2rem 1.5rem;">
|
|
190
|
+
<slot />
|
|
191
|
+
</main>
|
|
192
|
+
<footer style="background: #111; color: #ccc; text-align: center; padding: 3rem 1rem; margin-top: 4rem;">
|
|
193
|
+
<div class="container">
|
|
194
|
+
<p style="margin-bottom: 0.5rem; font-weight: 600; color: white;">{name}</p>
|
|
195
|
+
<p style="font-size: 0.85rem;">© {{new Date().getFullYear()}} All rights reserved.</p>
|
|
196
|
+
</div>
|
|
197
|
+
</footer>
|
|
198
|
+
</body>
|
|
199
|
+
</html>
|
|
200
|
+
"""
|
|
201
|
+
self._write_file(self.project_root / "src/layouts/Base.astro", layout)
|
|
202
|
+
|
|
203
|
+
def _create_pages(self):
|
|
204
|
+
name = self.brand.get("name", "My Site")
|
|
205
|
+
slogan = self.brand.get("slogan", "")
|
|
206
|
+
|
|
207
|
+
# Index page
|
|
208
|
+
index = f"""---
|
|
209
|
+
import Base from '../layouts/Base.astro';
|
|
210
|
+
---
|
|
211
|
+
<Base title="Home">
|
|
212
|
+
<section style="text-align: center; padding: 4rem 1rem;">
|
|
213
|
+
<h1 style="font-size: 2.5rem; color: var(--color-primary);">
|
|
214
|
+
{name}
|
|
215
|
+
</h1>
|
|
216
|
+
<p style="font-size: 1.3rem; color: #555; margin-top: 1rem;">
|
|
217
|
+
{slogan}
|
|
218
|
+
</p>
|
|
219
|
+
<a href="/blog" style="display: inline-block; margin-top: 2rem; background: var(--color-primary); color: white; padding: 0.8rem 2rem; border-radius: 8px; font-weight: 600;">
|
|
220
|
+
Read Our Blog →
|
|
221
|
+
</a>
|
|
222
|
+
</section>
|
|
223
|
+
</Base>
|
|
224
|
+
"""
|
|
225
|
+
self._write_file(self.project_root / "src/pages/index.astro", index)
|
|
226
|
+
|
|
227
|
+
# Blog listing
|
|
228
|
+
blog_list = """---
|
|
229
|
+
import Base from '../../layouts/Base.astro';
|
|
230
|
+
import fs from 'node:fs';
|
|
231
|
+
import path from 'node:path';
|
|
232
|
+
|
|
233
|
+
const contentDir = path.join(process.cwd(), 'content/blog');
|
|
234
|
+
let articles = [];
|
|
235
|
+
|
|
236
|
+
if (fs.existsSync(contentDir)) {
|
|
237
|
+
const files = fs.readdirSync(contentDir).filter(f => f.endsWith('.md'));
|
|
238
|
+
articles = files.map(f => {
|
|
239
|
+
const content = fs.readFileSync(path.join(contentDir, f), 'utf-8');
|
|
240
|
+
const fmMatch = content.match(/^---\\n([\\s\\S]*?)\\n---/);
|
|
241
|
+
const fm = {};
|
|
242
|
+
if (fmMatch) {
|
|
243
|
+
fmMatch[1].split('\\n').forEach(line => {
|
|
244
|
+
const [key, ...val] = line.split(':');
|
|
245
|
+
if (key && val.length) fm[key.trim()] = val.join(':').trim().replace(/^["']|["']$/g, '');
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
return { slug: f.replace('.md', ''), ...fm };
|
|
249
|
+
}).sort((a, b) => (b.pubDate || '').localeCompare(a.pubDate || ''));
|
|
250
|
+
}
|
|
251
|
+
---
|
|
252
|
+
<Base title="Blog">
|
|
253
|
+
<h1 style="font-size: 2rem; margin-bottom: 2rem;">📚 Blog</h1>
|
|
254
|
+
<div style="display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem;">
|
|
255
|
+
{articles.map(a => (
|
|
256
|
+
<a href={`/blog/${a.slug}`} style="background: white; border-radius: 12px; padding: 1.5rem; box-shadow: 0 2px 8px rgba(0,0,0,0.06); transition: transform 0.2s; display: block;">
|
|
257
|
+
<h2 style="font-size: 1.1rem; color: var(--color-primary); margin-bottom: 0.5rem;">{a.title || a.slug}</h2>
|
|
258
|
+
<p style="color: #666; font-size: 0.9rem;">{a.description || ''}</p>
|
|
259
|
+
<span style="color: var(--color-secondary); font-size: 0.8rem; margin-top: 0.5rem; display: block;">{a.category || ''}</span>
|
|
260
|
+
</a>
|
|
261
|
+
))}
|
|
262
|
+
</div>
|
|
263
|
+
{articles.length === 0 && <p style="color: #888;">No articles yet. Run <code>/write-batch</code> to generate content!</p>}
|
|
264
|
+
</Base>
|
|
265
|
+
"""
|
|
266
|
+
self._write_file(self.project_root / "src/pages/blog/index.astro", blog_list)
|
|
267
|
+
|
|
268
|
+
# Article detail
|
|
269
|
+
article_detail = """---
|
|
270
|
+
import Base from '../../layouts/Base.astro';
|
|
271
|
+
import fs from 'node:fs';
|
|
272
|
+
import path from 'node:path';
|
|
273
|
+
|
|
274
|
+
export function getStaticPaths() {
|
|
275
|
+
const contentDir = path.join(process.cwd(), 'content/blog');
|
|
276
|
+
if (!fs.existsSync(contentDir)) return [];
|
|
277
|
+
const files = fs.readdirSync(contentDir).filter(f => f.endsWith('.md'));
|
|
278
|
+
return files.map(f => ({ params: { slug: f.replace('.md', '') } }));
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
const { slug } = Astro.params;
|
|
282
|
+
const filePath = path.join(process.cwd(), 'content/blog', `${slug}.md`);
|
|
283
|
+
const raw = fs.readFileSync(filePath, 'utf-8');
|
|
284
|
+
|
|
285
|
+
const fmMatch = raw.match(/^---\\n([\\s\\S]*?)\\n---/);
|
|
286
|
+
const fm = {};
|
|
287
|
+
if (fmMatch) {
|
|
288
|
+
fmMatch[1].split('\\n').forEach(line => {
|
|
289
|
+
const [key, ...val] = line.split(':');
|
|
290
|
+
if (key && val.length) fm[key.trim()] = val.join(':').trim().replace(/^["']|["']$/g, '');
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
const body = raw.replace(/^---[\\s\\S]*?---\\n/, '');
|
|
294
|
+
---
|
|
295
|
+
<Base title={fm.title || slug} description={fm.description}>
|
|
296
|
+
<article style="max-width: 720px; margin: 0 auto;">
|
|
297
|
+
<a href="/blog" style="color: var(--color-secondary); font-size: 0.85rem;">← Back to Blog</a>
|
|
298
|
+
<h1 style="font-size: 2rem; margin: 1rem 0; color: var(--color-primary);">{fm.title || slug}</h1>
|
|
299
|
+
{fm.description && <p style="color: #666; font-size: 1.1rem; margin-bottom: 2rem;">{fm.description}</p>}
|
|
300
|
+
<div class="article-body" set:html={body} />
|
|
301
|
+
</article>
|
|
302
|
+
</Base>
|
|
303
|
+
<style>
|
|
304
|
+
.article-body { font-size: 1.05rem; }
|
|
305
|
+
.article-body h2 { font-size: 1.4rem; margin: 2rem 0 1rem; color: var(--color-primary); }
|
|
306
|
+
.article-body h3 { font-size: 1.15rem; margin: 1.5rem 0 0.75rem; }
|
|
307
|
+
.article-body p { margin-bottom: 1rem; }
|
|
308
|
+
.article-body ul, .article-body ol { margin: 1rem 0; padding-left: 1.5rem; }
|
|
309
|
+
.article-body li { margin-bottom: 0.5rem; }
|
|
310
|
+
.article-body blockquote { border-left: 3px solid var(--color-secondary); padding: 1rem; margin: 1rem 0; background: #f9f9f9; border-radius: 4px; }
|
|
311
|
+
</style>
|
|
312
|
+
"""
|
|
313
|
+
self._write_file(self.project_root / "src/pages/blog/[slug].astro", article_detail)
|
|
314
|
+
|
|
315
|
+
# About page
|
|
316
|
+
about = f"""---
|
|
317
|
+
import Base from '../layouts/Base.astro';
|
|
318
|
+
---
|
|
319
|
+
<Base title="About">
|
|
320
|
+
<div style="max-width: 720px; margin: 0 auto;">
|
|
321
|
+
<h1>About {name}</h1>
|
|
322
|
+
<p style="margin-top: 1rem; font-size: 1.1rem; color: #555;">
|
|
323
|
+
{slogan}
|
|
324
|
+
</p>
|
|
325
|
+
<p style="margin-top: 1rem;">
|
|
326
|
+
This website is powered by the AI Content Factory — a self-learning content engine
|
|
327
|
+
that gets smarter with every article.
|
|
328
|
+
</p>
|
|
329
|
+
</div>
|
|
330
|
+
</Base>
|
|
331
|
+
"""
|
|
332
|
+
self._write_file(self.project_root / "src/pages/about.astro", about)
|
|
333
|
+
|
|
334
|
+
def _create_components(self):
|
|
335
|
+
pass # Components are inline in the pages for simplicity
|
|
336
|
+
|
|
337
|
+
def _create_styles(self):
|
|
338
|
+
css = """/* Content Factory — Generated Global Styles */
|
|
339
|
+
:root {
|
|
340
|
+
--color-text-muted: #555555; /* WCAG AA on white */
|
|
341
|
+
--color-text-dim: #767676; /* WCAG AA on white */
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.article-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
|
|
345
|
+
|
|
346
|
+
@media (max-width: 768px) {
|
|
347
|
+
body { font-size: 16px; } /* Prevent zooming on input focus in mobile */
|
|
348
|
+
h1 { font-size: 1.8rem; }
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/* Accessibility: Focus visible */
|
|
352
|
+
:focus-visible { outline: 3px solid var(--color-secondary); outline-offset: 2px; }
|
|
353
|
+
"""
|
|
354
|
+
self._write_file(self.project_root / "src/styles/global.css", css)
|
|
355
|
+
|
|
356
|
+
def _create_deploy_config(self):
|
|
357
|
+
slug = self.brand.get("name", "site").lower().replace(" ", "-")
|
|
358
|
+
|
|
359
|
+
if self.deploy_target == "cloudflare":
|
|
360
|
+
self._write_file(self.project_root / "wrangler.toml", f"""name = "{slug}"
|
|
361
|
+
compatibility_date = "2025-01-01"
|
|
362
|
+
pages_build_output_dir = "dist"
|
|
363
|
+
|
|
364
|
+
[build]
|
|
365
|
+
command = "npm run build"
|
|
366
|
+
""")
|
|
367
|
+
print(f" ✅ wrangler.toml created")
|
|
368
|
+
|
|
369
|
+
elif self.deploy_target == "github":
|
|
370
|
+
gh_dir = self.project_root / ".github" / "workflows"
|
|
371
|
+
gh_dir.mkdir(parents=True, exist_ok=True)
|
|
372
|
+
self._write_file(gh_dir / "deploy.yml", f"""name: Deploy to GitHub Pages
|
|
373
|
+
on:
|
|
374
|
+
push:
|
|
375
|
+
branches: [main]
|
|
376
|
+
permissions:
|
|
377
|
+
contents: read
|
|
378
|
+
pages: write
|
|
379
|
+
id-token: write
|
|
380
|
+
jobs:
|
|
381
|
+
build:
|
|
382
|
+
runs-on: ubuntu-latest
|
|
383
|
+
steps:
|
|
384
|
+
- uses: actions/checkout@v4
|
|
385
|
+
- uses: actions/setup-node@v4
|
|
386
|
+
with:
|
|
387
|
+
node-version: 20
|
|
388
|
+
- run: npm ci && npm run build
|
|
389
|
+
- uses: actions/upload-pages-artifact@v3
|
|
390
|
+
with:
|
|
391
|
+
path: dist
|
|
392
|
+
deploy:
|
|
393
|
+
needs: build
|
|
394
|
+
runs-on: ubuntu-latest
|
|
395
|
+
environment:
|
|
396
|
+
name: github-pages
|
|
397
|
+
steps:
|
|
398
|
+
- uses: actions/deploy-pages@v4
|
|
399
|
+
""")
|
|
400
|
+
print(f" ✅ GitHub Actions deploy.yml created")
|
|
401
|
+
|
|
402
|
+
elif self.deploy_target == "netlify":
|
|
403
|
+
self._write_file(self.project_root / "netlify.toml", f"""[build]
|
|
404
|
+
command = "npm run build"
|
|
405
|
+
publish = "dist"
|
|
406
|
+
|
|
407
|
+
[build.environment]
|
|
408
|
+
NODE_VERSION = "20"
|
|
409
|
+
""")
|
|
410
|
+
print(f" ✅ netlify.toml created")
|
|
411
|
+
|
|
412
|
+
def _create_static_files(self):
|
|
413
|
+
slug = self.brand.get("name", "site").lower().replace(" ", "-")
|
|
414
|
+
|
|
415
|
+
# Robots.txt
|
|
416
|
+
self._write_file(self.project_root / "public/robots.txt",
|
|
417
|
+
f"User-agent: *\nAllow: /\n\nSitemap: https://{slug}.pages.dev/sitemap-index.xml\n")
|
|
418
|
+
|
|
419
|
+
# Cloudflare _headers (Security & Cache)
|
|
420
|
+
headers = """/*
|
|
421
|
+
X-Frame-Options: SAMEORIGIN
|
|
422
|
+
X-Content-Type-Options: nosniff
|
|
423
|
+
Referrer-Policy: strict-origin-when-cross-origin
|
|
424
|
+
Permissions-Policy: camera=(), microphone=(), geolocation=()
|
|
425
|
+
Cross-Origin-Opener-Policy: same-origin-allow-popups
|
|
426
|
+
Strict-Transport-Security: max-age=31536000; includeSubDomains
|
|
427
|
+
|
|
428
|
+
/_astro/*
|
|
429
|
+
Cache-Control: public, max-age=31536000, immutable
|
|
430
|
+
|
|
431
|
+
/fonts/*
|
|
432
|
+
Cache-Control: public, max-age=31536000, immutable
|
|
433
|
+
"""
|
|
434
|
+
self._write_file(self.project_root / "public/_headers", headers)
|
|
435
|
+
print(f" ✅ public/_headers created (Security + Cache)")
|
|
436
|
+
|
|
437
|
+
def _write_file(self, path: Path, content: str):
|
|
438
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
439
|
+
with open(path, "w", encoding="utf-8") as f:
|
|
440
|
+
f.write(content)
|
|
441
|
+
|
|
442
|
+
def _write_json(self, path: Path, data: dict):
|
|
443
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
444
|
+
with open(path, "w", encoding="utf-8") as f:
|
|
445
|
+
json.dump(data, f, ensure_ascii=False, indent=2)
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
def main():
|
|
449
|
+
parser = argparse.ArgumentParser(description="Scaffold — Website Generator")
|
|
450
|
+
parser.add_argument("--config", required=True, help="Path to config JSON")
|
|
451
|
+
parser.add_argument("--dry-run", action="store_true", help="Preview without creating files")
|
|
452
|
+
parser.add_argument("--deploy-only", action="store_true", help="Only create deploy config")
|
|
453
|
+
args = parser.parse_args()
|
|
454
|
+
|
|
455
|
+
scaffold = Scaffold(args.config, dry_run=args.dry_run)
|
|
456
|
+
|
|
457
|
+
if args.deploy_only:
|
|
458
|
+
scaffold.setup_deploy()
|
|
459
|
+
else:
|
|
460
|
+
scaffold.scaffold_website()
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
if __name__ == "__main__":
|
|
464
|
+
main()
|