codymaster 5.2.0 โ 7.0.0
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 +276 -0
- package/README.md +216 -333
- package/dist/agent/antigravity.js +152 -0
- package/dist/agent/backend.js +2 -0
- package/dist/agent/claude.js +196 -0
- package/dist/agent/codex.js +204 -0
- package/dist/agent/copilot.js +284 -0
- package/dist/agent/cursor.js +211 -0
- package/dist/agent/factory.js +30 -0
- package/dist/agent/gemini.js +142 -0
- package/dist/agent/opencode.js +205 -0
- package/dist/agent/spawn-helper.js +237 -0
- package/dist/agent/version.js +25 -0
- package/dist/browse/adapter-factory.js +69 -0
- package/dist/browse/adapters/agent-browser-adapter.js +305 -0
- package/dist/browse/adapters/playwright-adapter.js +309 -0
- package/dist/browse/adapters/types.js +6 -0
- package/dist/browse/error-collector.js +132 -0
- package/dist/browse/event-log.js +109 -0
- package/dist/browse/index.js +17 -0
- package/dist/browse-server.js +204 -120
- package/dist/cli/command-registry.js +12 -0
- package/dist/cli/commands/dashboard.js +76 -2
- package/dist/cli/commands/engineering.js +218 -4
- package/dist/cli/commands/install.js +160 -0
- package/dist/cli/commands/learn.js +181 -0
- package/dist/cli/commands/parallel.js +138 -0
- package/dist/cli/commands/quality.js +105 -0
- package/dist/cli/commands/stack.js +49 -0
- package/dist/cli/commands/update.js +159 -0
- package/dist/cli/update-check.js +94 -10
- package/dist/continuity.js +3 -1
- package/dist/dashboard.js +47 -6
- package/dist/data.js +35 -0
- package/dist/execution/tdd-gate.js +113 -0
- package/dist/executor/cancel.js +34 -0
- package/dist/executor/gc.js +74 -0
- package/dist/executor/index.js +14 -0
- package/dist/executor/runner.js +70 -0
- package/dist/executor/workdir.js +31 -0
- package/dist/handoff/contracts.js +22 -0
- package/dist/handoff/index.js +18 -0
- package/dist/handoff/io.js +121 -0
- package/dist/index.js +7 -3
- package/dist/indexer/stack-detect.js +219 -0
- package/dist/install/copy.js +98 -0
- package/dist/install/engine.js +42 -0
- package/dist/install/paths.js +70 -0
- package/dist/install/platforms/_simple.js +85 -0
- package/dist/install/platforms/antigravity.js +91 -0
- package/dist/install/platforms/claude-code.js +107 -0
- package/dist/install/platforms/cursor.js +77 -0
- package/dist/install/platforms/index.js +27 -0
- package/dist/install/platforms/simple.js +163 -0
- package/dist/install/profiles.js +75 -0
- package/dist/install/types.js +2 -0
- package/dist/learnings.js +208 -0
- package/dist/middleware/metrics.js +30 -0
- package/dist/middleware/security-headers.js +14 -0
- package/dist/realtime/event-bus.js +29 -0
- package/dist/realtime/ws-hub.js +91 -0
- package/dist/schemas/task-schema.js +48 -0
- package/dist/schemas/validate.js +18 -0
- package/dist/skills-lock.js +96 -0
- package/dist/sprint-pipeline.js +26 -0
- package/dist/storage/index.js +21 -0
- package/dist/storage/repos/activity-repo.js +46 -0
- package/dist/storage/repos/message-repo.js +39 -0
- package/dist/storage/repos/project-repo.js +56 -0
- package/dist/storage/repos/task-repo.js +142 -0
- package/dist/storage/services/project-service.js +49 -0
- package/dist/storage/services/task-service.js +97 -0
- package/dist/storage/sqlite.js +113 -0
- package/dist/tier-classify.js +131 -0
- package/dist/ui/onboarding.js +51 -15
- package/dist/utils/cli-utils.js +7 -2
- package/dist/utils/design-taste.js +108 -0
- package/dist/utils/output-compress.js +143 -0
- package/dist/vibecoding-index.js +126 -0
- package/package.json +19 -4
- package/public/dashboard/app.js +52 -1
- package/scripts/build-skills-lock.mjs +88 -0
- package/scripts/build-skills.mjs +187 -28
- package/scripts/compress-skill.mjs +73 -0
- package/scripts/deprecate-skill.mjs +72 -0
- package/scripts/install.sh +170 -0
- package/scripts/mcp-bridge.js +2 -2
- package/scripts/postinstall.js +54 -287
- package/scripts/update-changelog.sh +88 -0
- package/scripts/validate-skills.mjs +101 -4
- package/skills/_shared/SKILL_TEMPLATE.md +62 -0
- package/skills/cm-autopilot/scripts/autopilot.py +19 -2
- package/skills/cm-brainstorm-idea/SKILL.md +9 -0
- package/skills/cm-clean-code/SKILL.md +20 -0
- package/skills/cm-code-review/SKILL.md +21 -0
- package/skills/cm-codeintell/SKILL.md +9 -0
- package/skills/cm-conductor-worktrees/SKILL.archive.md +28 -0
- package/skills/cm-conductor-worktrees/SKILL.md +17 -19
- package/skills/cm-continuity/SKILL.md +9 -0
- package/skills/cm-dashboard/SKILL.archive.md +15 -0
- package/skills/cm-dashboard/SKILL.md +20 -9
- package/skills/cm-dashboard/ui/app.js +9 -1
- package/skills/cm-debugging/SKILL.md +9 -0
- package/skills/cm-design-studio/SKILL.archive.md +34 -0
- package/skills/cm-design-studio/SKILL.md +17 -25
- package/skills/cm-design-system/SKILL.md +1 -0
- package/skills/cm-engineering-meta/SKILL.archive.md +73 -0
- package/skills/cm-engineering-meta/SKILL.md +16 -63
- package/skills/cm-execution/SKILL.md +98 -0
- package/skills/cm-git-worktrees/SKILL.archive.md +157 -0
- package/skills/cm-git-worktrees/SKILL.md +15 -146
- package/skills/cm-identity-guard/SKILL.md +8 -0
- package/skills/cm-planning/SKILL.md +63 -92
- package/skills/cm-post-deploy-canary/SKILL.archive.md +22 -0
- package/skills/cm-post-deploy-canary/SKILL.md +17 -13
- package/skills/cm-qa-visual-cli/SKILL.archive.md +22 -0
- package/skills/cm-qa-visual-cli/SKILL.md +16 -12
- package/skills/cm-quality-gate/SKILL.md +38 -0
- package/skills/cm-safe-deploy/SKILL.md +9 -0
- package/skills/cm-second-opinion-cli/SKILL.archive.md +23 -0
- package/skills/cm-second-opinion-cli/SKILL.md +17 -14
- package/skills/cm-secret-shield/SKILL.archive.md +580 -0
- package/skills/cm-secret-shield/SKILL.md +15 -569
- package/skills/cm-security-gate/SKILL.archive.md +239 -0
- package/skills/cm-security-gate/SKILL.md +15 -228
- package/skills/cm-skill-health/SKILL.archive.md +83 -0
- package/skills/cm-skill-health/SKILL.md +16 -73
- package/skills/cm-skill-index/SKILL.md +8 -0
- package/skills/cm-skill-mastery/SKILL.archive.md +156 -0
- package/skills/cm-skill-mastery/SKILL.md +16 -146
- package/skills/cm-skill-search/SKILL.archive.md +49 -0
- package/skills/cm-skill-search/SKILL.md +17 -40
- package/skills/cm-skill-share/SKILL.archive.md +58 -0
- package/skills/cm-skill-share/SKILL.md +17 -49
- package/skills/cm-sprint-bus/SKILL.md +9 -0
- package/skills/cm-start/SKILL.md +17 -0
- package/skills/cm-tdd/SKILL.md +19 -0
- package/skills/cm-terminal/SKILL.md +15 -0
- package/skills/cm-test-gate/SKILL.archive.md +245 -0
- package/skills/cm-test-gate/SKILL.md +15 -234
- package/skills/cm-ui-preview/SKILL.archive.md +153 -0
- package/skills/cm-ui-preview/SKILL.md +16 -143
- package/skills/cm-ux-master/cli/uxmaster/commands/mcp.py +1 -1
- package/skills/cm-ux-master/mcp/mcp-config.json +1 -1
- package/skills/cm-ux-master/mcp/server.py +2 -2
- package/skills/profiles/design.txt +1 -1
- package/skills/profiles/full.txt +0 -10
- package/skills/profiles/growth.txt +8 -8
- package/skills/profiles/knowledge.txt +1 -1
- package/skills/profiles/top35.json +41 -0
- package/adapters/antigravity.js +0 -15
- package/adapters/claude-code.js +0 -17
- package/adapters/cursor.js +0 -16
- package/skills/cm-ads-tracker/SKILL.md +0 -401
- package/skills/cm-ads-tracker/evals/evals.json +0 -55
- package/skills/cm-ads-tracker/references/gtm-architecture.md +0 -321
- package/skills/cm-ads-tracker/references/industry-events.md +0 -294
- package/skills/cm-ads-tracker/references/platforms-api.md +0 -238
- package/skills/cm-ads-tracker/templates/capi-payload.md +0 -79
- package/skills/cm-ads-tracker/templates/datalayer-push.js +0 -104
- package/skills/cm-ads-tracker/templates/gtm-variables.js +0 -56
- package/skills/cm-auto-publisher/SKILL.md +0 -81
- package/skills/cm-booking-calendar/SKILL.md +0 -521
- package/skills/cm-booking-calendar/references/industry-patterns.md +0 -527
- package/skills/cm-booking-calendar/templates/booking-form.css +0 -626
- package/skills/cm-booking-calendar/templates/booking-form.html +0 -477
- package/skills/cm-booking-calendar/templates/calendar-engine.js +0 -419
- package/skills/cm-booking-calendar/templates/calendar-export.js +0 -395
- package/skills/cm-booking-calendar/templates/reminder-config.js +0 -629
- package/skills/cm-content-factory/.content-factory-state.json +0 -132
- package/skills/cm-content-factory/.git 2/logs/refs/heads/main +0 -1
- package/skills/cm-content-factory/.git 2/logs/refs/remotes/origin/main +0 -1
- 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 +0 -5
- 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 +0 -1
- package/skills/cm-content-factory/.git 2/refs/remotes/origin/main +0 -1
- package/skills/cm-content-factory/.pytest_cache 2/v/cache/nodeids +0 -76
- package/skills/cm-content-factory/.pytest_cache 2/v/cache/stepwise +0 -1
- package/skills/cm-content-factory/AGENTS.md +0 -61
- package/skills/cm-content-factory/CLAUDE.md +0 -63
- package/skills/cm-content-factory/CURSOR.md +0 -43
- package/skills/cm-content-factory/Content Factory.zip +0 -0
- package/skills/cm-content-factory/SKILL.md +0 -416
- package/skills/cm-content-factory/cf +0 -313
- package/skills/cm-content-factory/config.schema.json +0 -397
- package/skills/cm-content-factory/dashboard/app.js +0 -556
- package/skills/cm-content-factory/dashboard/index.html +0 -397
- package/skills/cm-content-factory/dashboard/style.css +0 -1211
- package/skills/cm-content-factory/examples/01-real-estate.config.json +0 -146
- package/skills/cm-content-factory/examples/02-personal-finance.config.json +0 -146
- package/skills/cm-content-factory/examples/03-health-wellness.config.json +0 -147
- package/skills/cm-content-factory/examples/04-saas-software.config.json +0 -147
- package/skills/cm-content-factory/examples/05-legal-services.config.json +0 -147
- package/skills/cm-content-factory/examples/06-insurance.config.json +0 -146
- package/skills/cm-content-factory/examples/07-ecommerce-dropship.config.json +0 -146
- package/skills/cm-content-factory/examples/08-online-education.config.json +0 -147
- package/skills/cm-content-factory/examples/09-crypto-defi.config.json +0 -147
- package/skills/cm-content-factory/examples/10-beauty-skincare.config.json +0 -147
- package/skills/cm-content-factory/examples/11-home-services.config.json +0 -146
- package/skills/cm-content-factory/examples/12-dental-clinic.config.json +0 -147
- package/skills/cm-content-factory/examples/13-pet-care.config.json +0 -147
- package/skills/cm-content-factory/examples/14-travel-hospitality.config.json +0 -147
- package/skills/cm-content-factory/examples/15-ai-automation.config.json +0 -147
- package/skills/cm-content-factory/examples/16-wedding-events.config.json +0 -147
- package/skills/cm-content-factory/examples/17-fitness-coaching.config.json +0 -148
- package/skills/cm-content-factory/examples/18-cybersecurity.config.json +0 -147
- package/skills/cm-content-factory/examples/19-food-restaurant.config.json +0 -148
- package/skills/cm-content-factory/examples/20-solar-energy.config.json +0 -147
- package/skills/cm-content-factory/examples/fitness-blog.config.json +0 -116
- package/skills/cm-content-factory/examples/tech-blog.config.json +0 -107
- package/skills/cm-content-factory/extensions/EXTENSION_GUIDE.md +0 -72
- package/skills/cm-content-factory/extensions/hooks.py +0 -126
- package/skills/cm-content-factory/extensions/openclaw_adapter.py +0 -132
- package/skills/cm-content-factory/landing/docs/content/changelog.md +0 -36
- package/skills/cm-content-factory/landing/docs/content/deployment.md +0 -46
- package/skills/cm-content-factory/landing/docs/content/execution-flow.md +0 -67
- package/skills/cm-content-factory/landing/docs/content/memory-system.md +0 -38
- package/skills/cm-content-factory/landing/docs/content/openspace.md +0 -27
- package/skills/cm-content-factory/landing/docs/content/use-cases.md +0 -26
- package/skills/cm-content-factory/landing/docs/content/v5-intro.md +0 -28
- package/skills/cm-content-factory/landing/docs/index.html +0 -240
- package/skills/cm-content-factory/landing/index.html +0 -680
- package/skills/cm-content-factory/landing/script.js +0 -143
- package/skills/cm-content-factory/landing/style.css +0 -1216
- package/skills/cm-content-factory/landing/translations.js +0 -508
- package/skills/cm-content-factory/logs/events.jsonl +0 -11
- package/skills/cm-content-factory/profiles/_template.profile.json +0 -231
- package/skills/cm-content-factory/profiles/finance.profile.json +0 -278
- package/skills/cm-content-factory/profiles/legal.profile.json +0 -263
- package/skills/cm-content-factory/profiles/medical-research.profile.json +0 -321
- package/skills/cm-content-factory/profiles/technology.profile.json +0 -275
- package/skills/cm-content-factory/scripts/agent_dispatcher.py +0 -266
- package/skills/cm-content-factory/scripts/audit.py +0 -106
- package/skills/cm-content-factory/scripts/dashboard_server.py +0 -225
- package/skills/cm-content-factory/scripts/deploy.py +0 -146
- package/skills/cm-content-factory/scripts/extract.py +0 -132
- package/skills/cm-content-factory/scripts/landing_generator.py +0 -459
- package/skills/cm-content-factory/scripts/memory.py +0 -521
- package/skills/cm-content-factory/scripts/monetize.py +0 -239
- package/skills/cm-content-factory/scripts/pipeline.py +0 -357
- package/skills/cm-content-factory/scripts/plan.py +0 -163
- package/skills/cm-content-factory/scripts/publish.py +0 -145
- package/skills/cm-content-factory/scripts/research.py +0 -337
- package/skills/cm-content-factory/scripts/scaffold.py +0 -464
- package/skills/cm-content-factory/scripts/scoreboard.py +0 -336
- package/skills/cm-content-factory/scripts/seo.py +0 -90
- package/skills/cm-content-factory/scripts/state_manager.py +0 -320
- package/skills/cm-content-factory/scripts/token_manager.py +0 -268
- package/skills/cm-content-factory/scripts/validate.py +0 -221
- package/skills/cm-content-factory/scripts/wizard.py +0 -329
- package/skills/cm-content-factory/scripts/write.py +0 -93
- 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 +0 -90
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/data-flow.md +0 -54
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/deployment.md +0 -38
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/flows/index.md +0 -65
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/flows/lc-content-lifecycle.md +0 -48
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/flows/seq-write-mode.md +0 -39
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/flows/uj-first-batch.md +0 -42
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/flows/wf-content-pipeline.md +0 -51
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/flows/wf-learning-cycle.md +0 -52
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/getting-started/configuration.md +0 -86
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/getting-started/installation.md +0 -80
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/getting-started/intro.md +0 -58
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/index.md +0 -102
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/jtbd/index.md +0 -45
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/jtbd/optimize-seo.md +0 -29
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/jtbd/scale-content-production.md +0 -55
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/jtbd/standardize-quality.md +0 -29
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/personas/buyer-cmo-huong.md +0 -41
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/personas/buyer-content-lead-khoa.md +0 -40
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/personas/index.md +0 -56
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/personas/user-content-manager-lan.md +0 -46
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/personas/user-seo-minh.md +0 -45
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/personas/user-writer-tu.md +0 -45
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/sop/content-pipeline.md +0 -108
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/sop/index.md +0 -22
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/sop/memory-system.md +0 -52
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/sop/seo-optimization.md +0 -58
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/sop/troubleshooting-guide.md +0 -92
- package/skills/cm-content-factory/sites/docs-site/src/styles/custom.css +0 -575
- package/skills/cm-content-factory/tests/conftest.py +0 -66
- package/skills/cm-content-factory/tests/test_agent_dispatcher.py +0 -125
- package/skills/cm-content-factory/tests/test_memory.py +0 -128
- package/skills/cm-content-factory/tests/test_pipeline.py +0 -107
- package/skills/cm-content-factory/tests/test_research.py +0 -56
- package/skills/cm-content-factory/tests/test_state_manager.py +0 -131
- package/skills/cm-content-factory/tests/test_token_manager.py +0 -110
- package/skills/cm-content-factory/tests/test_wizard.py +0 -121
- package/skills/cm-cro-methodology/SKILL.md +0 -290
- package/skills/cm-cro-methodology/references/COPYWRITING.md +0 -178
- package/skills/cm-cro-methodology/references/OBJECTIONS.md +0 -135
- package/skills/cm-cro-methodology/references/PERSUASION.md +0 -158
- package/skills/cm-cro-methodology/references/RESEARCH.md +0 -220
- package/skills/cm-cro-methodology/references/funnel-analysis.md +0 -365
- package/skills/cm-cro-methodology/references/testing-methodology.md +0 -330
- package/skills/cm-google-form/SKILL.md +0 -266
- package/skills/cm-google-form/templates/apps-script.js +0 -55
- package/skills/cm-google-form/templates/form-markup.html +0 -110
- package/skills/cm-google-form/templates/form-submit.js +0 -201
- package/skills/cm-google-form/templates/toast.css +0 -152
- package/skills/cm-growth-hacking/SKILL.md +0 -282
- package/skills/cm-growth-hacking/bottom-sheet-engine.md +0 -261
- package/skills/cm-growth-hacking/calendar-integration.md +0 -264
- package/skills/cm-growth-hacking/references/engagement-patterns.md +0 -346
- package/skills/cm-growth-hacking/templates/bottom-sheet.css +0 -528
- package/skills/cm-growth-hacking/templates/bottom-sheet.js +0 -269
- package/skills/cm-growth-hacking/templates/calendar-cta.js +0 -213
- package/skills/cm-growth-hacking/templates/tracking-events.js +0 -211
- package/skills/cm-growth-hacking/templates/trigger-manager.js +0 -254
- package/skills/cm-growth-hacking/tracking-events.md +0 -246
- package/skills/cm-growth-hacking/trigger-system.md +0 -342
- package/skills/cm-jtbd/SKILL.md +0 -98
- package/skills/cm-notebooklm/SKILL.md +0 -156
- package/skills/cm-notebooklm/references/command_reference.md +0 -94
- package/skills/cm-notebooklm/references/workflows.md +0 -60
- package/skills/cm-notebooklm/resources/knowledge_sources.md +0 -106
- package/skills/cm-notebooklm/scripts/brain-sync.sh +0 -453
- package/skills/cm-notebooklm/scripts/graduate_wisdom.py +0 -101
- package/skills/cm-readit/SKILL.md +0 -289
- package/skills/cm-readit/audio-player.md +0 -206
- package/skills/cm-readit/examples/blog-reader.js +0 -352
- package/skills/cm-readit/examples/voice-cro.js +0 -390
- package/skills/cm-readit/tts-engine.md +0 -262
- package/skills/cm-readit/ui-patterns.md +0 -362
- package/skills/cm-readit/voice-cro.md +0 -223
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""
|
|
3
|
-
Validate Phase โ Config-driven content quality validation.
|
|
4
|
-
|
|
5
|
-
Checks content files against configurable quality rules.
|
|
6
|
-
|
|
7
|
-
Usage:
|
|
8
|
-
python3 validate.py --config content-factory.config.json
|
|
9
|
-
python3 validate.py --config content-factory.config.json --file article.md
|
|
10
|
-
"""
|
|
11
|
-
|
|
12
|
-
import json
|
|
13
|
-
import re
|
|
14
|
-
import sys
|
|
15
|
-
import argparse
|
|
16
|
-
from pathlib import Path
|
|
17
|
-
from datetime import datetime
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
def load_config(config_path: str) -> dict:
|
|
21
|
-
with open(config_path, "r", encoding="utf-8") as f:
|
|
22
|
-
return json.load(f)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
def parse_frontmatter(content: str) -> tuple:
|
|
26
|
-
"""Parse YAML frontmatter. Returns (dict|None, body_str)."""
|
|
27
|
-
match = re.match(r'^---\s*\n(.+?)\n---\s*\n(.*)', content, re.DOTALL)
|
|
28
|
-
if not match:
|
|
29
|
-
return None, content
|
|
30
|
-
|
|
31
|
-
fm_text = match.group(1)
|
|
32
|
-
body = match.group(2)
|
|
33
|
-
|
|
34
|
-
fm = {}
|
|
35
|
-
for line in fm_text.split('\n'):
|
|
36
|
-
if ':' in line:
|
|
37
|
-
key, _, value = line.partition(':')
|
|
38
|
-
key = key.strip()
|
|
39
|
-
value = value.strip().strip('"').strip("'")
|
|
40
|
-
if value:
|
|
41
|
-
fm[key] = value
|
|
42
|
-
return fm, body
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
def count_words(text: str) -> int:
|
|
46
|
-
"""Count words in text."""
|
|
47
|
-
clean = re.sub(r'#+ ', '', text)
|
|
48
|
-
clean = re.sub(r'\[.*?\]\(.*?\)', '', clean)
|
|
49
|
-
clean = re.sub(r'[*_`~]', '', clean)
|
|
50
|
-
clean = re.sub(r'---', '', clean)
|
|
51
|
-
return len(clean.split())
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
def validate_article(filepath: Path, config: dict) -> dict:
|
|
55
|
-
"""Validate a single article against config rules."""
|
|
56
|
-
content_cfg = config.get("content", {})
|
|
57
|
-
audit_cfg = config.get("audit", {})
|
|
58
|
-
seo_cfg = config.get("seo", {})
|
|
59
|
-
fm_schema = content_cfg.get("frontmatter_schema", {})
|
|
60
|
-
word_limits = content_cfg.get("word_count", {"min": 500, "max": 1200})
|
|
61
|
-
|
|
62
|
-
report = {
|
|
63
|
-
"file": filepath.name,
|
|
64
|
-
"slug": filepath.stem,
|
|
65
|
-
"status": "pass",
|
|
66
|
-
"issues": [],
|
|
67
|
-
"warnings": [],
|
|
68
|
-
"stats": {}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
with open(filepath, "r", encoding="utf-8") as f:
|
|
72
|
-
content = f.read()
|
|
73
|
-
|
|
74
|
-
# 1. Frontmatter
|
|
75
|
-
fm, body = parse_frontmatter(content)
|
|
76
|
-
if not fm:
|
|
77
|
-
report["issues"].append("Missing YAML frontmatter")
|
|
78
|
-
report["status"] = "fail"
|
|
79
|
-
return report
|
|
80
|
-
|
|
81
|
-
for field in fm_schema.get("required", ["title", "slug", "description", "category"]):
|
|
82
|
-
if field not in fm:
|
|
83
|
-
report["issues"].append(f"Missing frontmatter: {field}")
|
|
84
|
-
|
|
85
|
-
# SEO checks
|
|
86
|
-
if fm.get("title") and len(fm["title"]) > seo_cfg.get("title_max_length", 60):
|
|
87
|
-
report["warnings"].append(f"Title too long: {len(fm['title'])} chars")
|
|
88
|
-
if fm.get("description") and len(fm["description"]) > seo_cfg.get("description_max_length", 160):
|
|
89
|
-
report["warnings"].append(f"Description too long: {len(fm['description'])} chars")
|
|
90
|
-
|
|
91
|
-
# 2. Word count
|
|
92
|
-
wc = count_words(body)
|
|
93
|
-
report["stats"]["word_count"] = wc
|
|
94
|
-
if wc < word_limits.get("min", 500):
|
|
95
|
-
report["issues"].append(f"Too short: {wc} words (min {word_limits['min']})")
|
|
96
|
-
report["status"] = "fail"
|
|
97
|
-
elif wc > word_limits.get("max", 1200) * 1.5:
|
|
98
|
-
report["warnings"].append(f"Very long: {wc} words")
|
|
99
|
-
|
|
100
|
-
# 3. Headings
|
|
101
|
-
h2 = len(re.findall(r'^## ', body, re.MULTILINE))
|
|
102
|
-
h3 = len(re.findall(r'^### ', body, re.MULTILINE))
|
|
103
|
-
report["stats"]["h2_count"] = h2
|
|
104
|
-
report["stats"]["h3_count"] = h3
|
|
105
|
-
min_h = audit_cfg.get("min_headings", 3)
|
|
106
|
-
if h2 < min_h:
|
|
107
|
-
report["warnings"].append(f"Low H2 count: {h2} (recommend {min_h}+)")
|
|
108
|
-
|
|
109
|
-
# 4. FAQ
|
|
110
|
-
if audit_cfg.get("require_faq", False):
|
|
111
|
-
has_faq = bool(re.search(r'(cรขu hแปi|faq|hแปi ฤรกp|question)', body, re.IGNORECASE))
|
|
112
|
-
report["stats"]["has_faq"] = has_faq
|
|
113
|
-
if not has_faq:
|
|
114
|
-
report["warnings"].append("No FAQ section")
|
|
115
|
-
|
|
116
|
-
# 5. CTA
|
|
117
|
-
if audit_cfg.get("require_cta", False):
|
|
118
|
-
has_cta = bool(re.search(r'(ฤแบทt lแปch|tฦฐ vแบฅn|liรชn hแป|hotline|contact|book)', body, re.IGNORECASE))
|
|
119
|
-
report["stats"]["has_cta"] = has_cta
|
|
120
|
-
if not has_cta:
|
|
121
|
-
report["warnings"].append("No CTA found")
|
|
122
|
-
|
|
123
|
-
# 6. Disclaimer
|
|
124
|
-
if audit_cfg.get("require_disclaimer", False):
|
|
125
|
-
disclaimer = content_cfg.get("disclaimer", "")
|
|
126
|
-
if disclaimer and disclaimer.lower() not in body.lower():
|
|
127
|
-
report["warnings"].append("Missing disclaimer")
|
|
128
|
-
|
|
129
|
-
# 7. AI garbage detection
|
|
130
|
-
for pattern in audit_cfg.get("error_patterns", []):
|
|
131
|
-
if re.search(pattern, content, re.IGNORECASE):
|
|
132
|
-
report["issues"].append(f"AI artifact detected: {pattern[:40]}...")
|
|
133
|
-
report["status"] = "fail"
|
|
134
|
-
break
|
|
135
|
-
|
|
136
|
-
# Update status
|
|
137
|
-
if report["issues"]:
|
|
138
|
-
report["status"] = "fail"
|
|
139
|
-
elif report["warnings"]:
|
|
140
|
-
report["status"] = "warn"
|
|
141
|
-
|
|
142
|
-
return report
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
def main():
|
|
146
|
-
parser = argparse.ArgumentParser(description="Validate Phase โ Quality checks")
|
|
147
|
-
parser.add_argument("--config", required=True, help="Path to config JSON")
|
|
148
|
-
parser.add_argument("--file", help="Validate single file")
|
|
149
|
-
parser.add_argument("--dry-run", action="store_true")
|
|
150
|
-
parser.add_argument("--group", help="(unused, for pipeline compat)")
|
|
151
|
-
args = parser.parse_args()
|
|
152
|
-
|
|
153
|
-
config = load_config(args.config)
|
|
154
|
-
project_root = Path(args.config).resolve().parent
|
|
155
|
-
content_dir = project_root / config["output"]["content_dir"]
|
|
156
|
-
|
|
157
|
-
print(f"โ
VALIDATE Phase")
|
|
158
|
-
|
|
159
|
-
if args.file:
|
|
160
|
-
fp = Path(args.file) if Path(args.file).exists() else content_dir / args.file
|
|
161
|
-
report = validate_article(fp, config)
|
|
162
|
-
_print_report(report)
|
|
163
|
-
sys.exit(0 if report["status"] != "fail" else 1)
|
|
164
|
-
|
|
165
|
-
if not content_dir.exists():
|
|
166
|
-
print(f" โ Content directory not found: {content_dir}")
|
|
167
|
-
sys.exit(1)
|
|
168
|
-
|
|
169
|
-
articles = sorted(content_dir.glob("*.md"))
|
|
170
|
-
if not articles:
|
|
171
|
-
print(" โ ๏ธ No articles found")
|
|
172
|
-
sys.exit(0)
|
|
173
|
-
|
|
174
|
-
print(f" ๐ Validating {len(articles)} articles...")
|
|
175
|
-
|
|
176
|
-
reports = []
|
|
177
|
-
for fp in articles:
|
|
178
|
-
report = validate_article(fp, config)
|
|
179
|
-
reports.append(report)
|
|
180
|
-
_print_report(report, compact=True)
|
|
181
|
-
|
|
182
|
-
passed = sum(1 for r in reports if r["status"] == "pass")
|
|
183
|
-
warned = sum(1 for r in reports if r["status"] == "warn")
|
|
184
|
-
failed = sum(1 for r in reports if r["status"] == "fail")
|
|
185
|
-
avg_words = sum(r["stats"].get("word_count", 0) for r in reports) / max(len(reports), 1)
|
|
186
|
-
|
|
187
|
-
print(f"\n{'=' * 50}")
|
|
188
|
-
print(f" ๐ VALIDATION SUMMARY")
|
|
189
|
-
print(f"{'=' * 50}")
|
|
190
|
-
print(f" โ
Pass: {passed}")
|
|
191
|
-
print(f" โ ๏ธ Warn: {warned}")
|
|
192
|
-
print(f" โ Fail: {failed}")
|
|
193
|
-
print(f" ๐ Avg words: {avg_words:.0f}")
|
|
194
|
-
print(f"{'=' * 50}")
|
|
195
|
-
|
|
196
|
-
# Save report
|
|
197
|
-
report_file = project_root / config["output"].get("reports_dir", ".") / "validation-report.json"
|
|
198
|
-
with open(report_file, "w", encoding="utf-8") as f:
|
|
199
|
-
json.dump({
|
|
200
|
-
"generated_at": datetime.now().isoformat(),
|
|
201
|
-
"total": len(reports), "passed": passed,
|
|
202
|
-
"warned": warned, "failed": failed,
|
|
203
|
-
"reports": reports
|
|
204
|
-
}, f, ensure_ascii=False, indent=2)
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
def _print_report(report: dict, compact: bool = False):
|
|
208
|
-
icon = {"pass": "โ
", "warn": "โ ๏ธ", "fail": "โ"}.get(report["status"], "โ")
|
|
209
|
-
if compact:
|
|
210
|
-
wc = report["stats"].get("word_count", 0)
|
|
211
|
-
print(f" {icon} {report['file']:50s} ({wc:4d} words)")
|
|
212
|
-
else:
|
|
213
|
-
print(f"\n{icon} {report['file']}")
|
|
214
|
-
for i in report["issues"]:
|
|
215
|
-
print(f" โ {i}")
|
|
216
|
-
for w in report["warnings"]:
|
|
217
|
-
print(f" โ ๏ธ {w}")
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
if __name__ == "__main__":
|
|
221
|
-
main()
|
|
@@ -1,329 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""
|
|
3
|
-
Content Factory Wizard โ Interactive project setup.
|
|
4
|
-
|
|
5
|
-
Asks clarifying questions, generates config, and scaffolds a complete
|
|
6
|
-
content project ready for any AI coding agent.
|
|
7
|
-
|
|
8
|
-
Usage:
|
|
9
|
-
python3 wizard.py # Interactive mode
|
|
10
|
-
python3 wizard.py --niche 01 # Pre-select niche
|
|
11
|
-
python3 wizard.py --test # Self-test
|
|
12
|
-
"""
|
|
13
|
-
|
|
14
|
-
import json
|
|
15
|
-
import sys
|
|
16
|
-
import os
|
|
17
|
-
import shutil
|
|
18
|
-
import argparse
|
|
19
|
-
from pathlib import Path
|
|
20
|
-
from datetime import datetime
|
|
21
|
-
|
|
22
|
-
SCRIPT_DIR = Path(__file__).resolve().parent
|
|
23
|
-
SKILL_DIR = SCRIPT_DIR.parent
|
|
24
|
-
EXAMPLES_DIR = SKILL_DIR / "examples"
|
|
25
|
-
|
|
26
|
-
NICHES = [
|
|
27
|
-
("01", "๐ Real Estate", "01-real-estate"),
|
|
28
|
-
("02", "๐ณ Personal Finance", "02-personal-finance"),
|
|
29
|
-
("03", "โค๏ธ Health & Wellness", "03-health-wellness"),
|
|
30
|
-
("04", "๐ป SaaS/Software", "04-saas-software"),
|
|
31
|
-
("05", "โ๏ธ Legal Services", "05-legal-services"),
|
|
32
|
-
("06", "๐ก๏ธ Insurance", "06-insurance"),
|
|
33
|
-
("07", "๐ E-commerce/Dropship", "07-ecommerce-dropship"),
|
|
34
|
-
("08", "๐ Online Education", "08-online-education"),
|
|
35
|
-
("09", "โฟ Crypto/DeFi", "09-crypto-defi"),
|
|
36
|
-
("10", "๐ Beauty/Skincare", "10-beauty-skincare"),
|
|
37
|
-
("11", "๐ง Home Services", "11-home-services"),
|
|
38
|
-
("12", "๐ฆท Dental Clinic", "12-dental-clinic"),
|
|
39
|
-
("13", "๐พ Pet Care", "13-pet-care"),
|
|
40
|
-
("14", "โ๏ธ Travel", "14-travel-hospitality"),
|
|
41
|
-
("15", "๐ค AI/Automation", "15-ai-automation"),
|
|
42
|
-
("16", "๐ Wedding/Events", "16-wedding-events"),
|
|
43
|
-
("17", "๐ช Fitness Coaching", "17-fitness-coaching"),
|
|
44
|
-
("18", "๐ Cybersecurity", "18-cybersecurity"),
|
|
45
|
-
("19", "๐ณ Food/Restaurant", "19-food-restaurant"),
|
|
46
|
-
("20", "โ๏ธ Solar Energy", "20-solar-energy"),
|
|
47
|
-
("21", "๐ง Custom", None),
|
|
48
|
-
]
|
|
49
|
-
|
|
50
|
-
DEPLOY_OPTIONS = [
|
|
51
|
-
("1", "โ๏ธ Cloudflare Pages", "cloudflare"),
|
|
52
|
-
("2", "๐ GitHub Pages", "github"),
|
|
53
|
-
("3", "๐ Netlify", "netlify"),
|
|
54
|
-
("4", "โญ None (local only)", "none"),
|
|
55
|
-
]
|
|
56
|
-
|
|
57
|
-
LANGUAGES = [
|
|
58
|
-
("1", "๐ป๐ณ Tiแบฟng Viแปt", "vi"),
|
|
59
|
-
("2", "๐บ๐ธ English", "en"),
|
|
60
|
-
("3", "๐ฏ๐ต ๆฅๆฌ่ช", "ja"),
|
|
61
|
-
("4", "๐ฐ๐ท ํ๊ตญ์ด", "ko"),
|
|
62
|
-
("5", "๐จ๐ณ ไธญๆ", "zh"),
|
|
63
|
-
]
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
class Wizard:
|
|
67
|
-
"""Interactive project setup wizard."""
|
|
68
|
-
|
|
69
|
-
def __init__(self):
|
|
70
|
-
self.answers = {}
|
|
71
|
-
|
|
72
|
-
def run(self):
|
|
73
|
-
"""Run the interactive wizard."""
|
|
74
|
-
self._print_header()
|
|
75
|
-
|
|
76
|
-
# Q1: Niche
|
|
77
|
-
niche = self._ask_niche()
|
|
78
|
-
self.answers["niche"] = niche
|
|
79
|
-
|
|
80
|
-
# Q2: Brand
|
|
81
|
-
brand_name = self._ask("? Brand name", default=niche.get("default_brand", "My Brand"))
|
|
82
|
-
slogan = self._ask("? Tagline/Slogan", default=niche.get("default_slogan", ""))
|
|
83
|
-
self.answers["brand_name"] = brand_name
|
|
84
|
-
self.answers["slogan"] = slogan
|
|
85
|
-
|
|
86
|
-
# Q3: Language
|
|
87
|
-
lang = self._ask_choice("? Ngรดn ngแปฏ / Language", LANGUAGES, default="1")
|
|
88
|
-
self.answers["language"] = lang
|
|
89
|
-
|
|
90
|
-
# Q4: Deploy
|
|
91
|
-
deploy = self._ask_choice("? Deploy to", DEPLOY_OPTIONS, default="1")
|
|
92
|
-
self.answers["deploy"] = deploy
|
|
93
|
-
|
|
94
|
-
# Q5: Project directory
|
|
95
|
-
project_dir = self._ask("? Project directory", default=f"./{self._slugify(brand_name)}")
|
|
96
|
-
self.answers["project_dir"] = project_dir
|
|
97
|
-
|
|
98
|
-
# Confirm
|
|
99
|
-
self._print_confirm()
|
|
100
|
-
proceed = self._ask("? Proceed? (Y/n)", default="Y")
|
|
101
|
-
if proceed.lower() not in ("y", "yes", ""):
|
|
102
|
-
print("\n โ Cancelled")
|
|
103
|
-
return None
|
|
104
|
-
|
|
105
|
-
# Generate
|
|
106
|
-
config = self._generate_config()
|
|
107
|
-
output_dir = Path(project_dir).resolve()
|
|
108
|
-
self._write_output(config, output_dir)
|
|
109
|
-
|
|
110
|
-
return {
|
|
111
|
-
"config": config,
|
|
112
|
-
"output_dir": str(output_dir),
|
|
113
|
-
"deploy": deploy
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
def _print_header(self):
|
|
117
|
-
print(f"\n{'โ' * 56}")
|
|
118
|
-
print(f" ๐ญ CONTENT FACTORY โ Setup Wizard")
|
|
119
|
-
print(f" Tแบกo dแปฑ รกn content hoร n chแปnh trong 2 phรบt")
|
|
120
|
-
print(f"{'โ' * 56}\n")
|
|
121
|
-
|
|
122
|
-
def _ask_niche(self) -> dict:
|
|
123
|
-
print(" Chแปn ngร nh nghแป:")
|
|
124
|
-
print(" โโโโโโโโโโโโโโโโโ")
|
|
125
|
-
for code, label, _ in NICHES:
|
|
126
|
-
print(f" {code}. {label}")
|
|
127
|
-
print()
|
|
128
|
-
|
|
129
|
-
choice = self._ask("? Chแปn sแป (01-21)", default="01")
|
|
130
|
-
|
|
131
|
-
# Find selected niche
|
|
132
|
-
selected = None
|
|
133
|
-
for code, label, config_name in NICHES:
|
|
134
|
-
if choice == code:
|
|
135
|
-
selected = (code, label, config_name)
|
|
136
|
-
break
|
|
137
|
-
|
|
138
|
-
if not selected:
|
|
139
|
-
selected = NICHES[0]
|
|
140
|
-
|
|
141
|
-
code, label, config_name = selected
|
|
142
|
-
|
|
143
|
-
if config_name is None:
|
|
144
|
-
# Custom niche
|
|
145
|
-
custom_name = self._ask("? Tรชn ngร nh")
|
|
146
|
-
return {
|
|
147
|
-
"id": self._slugify(custom_name),
|
|
148
|
-
"label": custom_name,
|
|
149
|
-
"config_file": None,
|
|
150
|
-
"default_brand": custom_name.title(),
|
|
151
|
-
"default_slogan": ""
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
# Load template config
|
|
155
|
-
config_file = EXAMPLES_DIR / f"{config_name}.config.json"
|
|
156
|
-
template = {}
|
|
157
|
-
if config_file.exists():
|
|
158
|
-
with open(config_file) as f:
|
|
159
|
-
template = json.load(f)
|
|
160
|
-
|
|
161
|
-
return {
|
|
162
|
-
"id": template.get("niche", config_name),
|
|
163
|
-
"label": label,
|
|
164
|
-
"config_file": str(config_file),
|
|
165
|
-
"template": template,
|
|
166
|
-
"default_brand": template.get("brand", {}).get("name", "My Brand"),
|
|
167
|
-
"default_slogan": template.get("brand", {}).get("slogan", "")
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
def _ask_choice(self, prompt: str, options: list, default: str = "1") -> str:
|
|
171
|
-
print()
|
|
172
|
-
for code, label, _ in options:
|
|
173
|
-
marker = " โ" if code == default else ""
|
|
174
|
-
print(f" {code}. {label}{marker}")
|
|
175
|
-
print()
|
|
176
|
-
choice = self._ask(prompt, default=default)
|
|
177
|
-
|
|
178
|
-
for code, label, value in options:
|
|
179
|
-
if choice == code:
|
|
180
|
-
return value
|
|
181
|
-
return options[0][2]
|
|
182
|
-
|
|
183
|
-
def _ask(self, prompt: str, default: str = "") -> str:
|
|
184
|
-
default_hint = f" [{default}]" if default else ""
|
|
185
|
-
try:
|
|
186
|
-
answer = input(f" {prompt}{default_hint}: ").strip()
|
|
187
|
-
except (EOFError, KeyboardInterrupt):
|
|
188
|
-
print()
|
|
189
|
-
return default
|
|
190
|
-
return answer if answer else default
|
|
191
|
-
|
|
192
|
-
def _print_confirm(self):
|
|
193
|
-
niche = self.answers["niche"]
|
|
194
|
-
print(f"\n{'โ' * 56}")
|
|
195
|
-
print(f" โ
CONFIRM:")
|
|
196
|
-
print(f" โโโโโโโโโโโโโโโโโ")
|
|
197
|
-
print(f" Ngร nh: {niche['label']}")
|
|
198
|
-
print(f" Brand: {self.answers['brand_name']}")
|
|
199
|
-
print(f" Slogan: {self.answers['slogan']}")
|
|
200
|
-
print(f" Language: {self.answers['language']}")
|
|
201
|
-
print(f" Deploy: {self.answers['deploy']}")
|
|
202
|
-
print(f" Dir: {self.answers['project_dir']}")
|
|
203
|
-
print(f"{'โ' * 56}\n")
|
|
204
|
-
|
|
205
|
-
def _generate_config(self) -> dict:
|
|
206
|
-
niche = self.answers["niche"]
|
|
207
|
-
|
|
208
|
-
# Start from template if available
|
|
209
|
-
if "template" in niche:
|
|
210
|
-
config = dict(niche["template"])
|
|
211
|
-
else:
|
|
212
|
-
config = {
|
|
213
|
-
"niche": niche["id"],
|
|
214
|
-
"content": {
|
|
215
|
-
"article_types": [
|
|
216
|
-
{"id": "guide", "title_template": "{topic_name}: Complete Guide", "category": "guides", "seo_intent": "informational", "tags_base": ["guide"]},
|
|
217
|
-
{"id": "review", "title_template": "Best {topic_name}: Reviews & Comparison", "category": "reviews", "seo_intent": "commercial", "tags_base": ["review"]},
|
|
218
|
-
{"id": "how-to", "title_template": "How to {topic_name}: Step-by-Step", "category": "tutorials", "seo_intent": "informational", "tags_base": ["tutorial"]},
|
|
219
|
-
{"id": "faq", "title_template": "{topic_name}: FAQ & Expert Answers", "category": "faq", "seo_intent": "informational", "tags_base": ["FAQ"]}
|
|
220
|
-
],
|
|
221
|
-
"frontmatter_schema": {"required": ["title", "slug", "description", "category"], "optional": ["date", "author", "tags", "image"]},
|
|
222
|
-
"word_count": {"min": 1000, "max": 2500},
|
|
223
|
-
"language": self.answers.get("language", "en")
|
|
224
|
-
},
|
|
225
|
-
"sources": {"type": "manual", "path": "knowledge/"},
|
|
226
|
-
"output": {"content_dir": "content/blog/", "knowledge_dir": "knowledge/", "queue_dir": "topics-queue/"},
|
|
227
|
-
"pipeline": {"concurrency": 3, "ai_provider": "gemini-cli", "auto_validate": True, "auto_publish": False, "git_branch": "main"},
|
|
228
|
-
"audit": {"error_patterns": ["I cannot", "Please provide", "As an AI"], "min_headings": 4, "require_faq": True, "require_cta": True, "require_disclaimer": False},
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
# Override with user answers
|
|
232
|
-
config["brand"] = {
|
|
233
|
-
"name": self.answers["brand_name"],
|
|
234
|
-
"slogan": self.answers["slogan"],
|
|
235
|
-
"tone": config.get("brand", {}).get("tone", "professional-friendly"),
|
|
236
|
-
"language": self.answers["language"],
|
|
237
|
-
"colors": config.get("brand", {}).get("colors", {"primary": "#1A1A2E", "secondary": "#E94560", "accent": "#F5F5F5"})
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
# Ensure all v2+ sections exist
|
|
241
|
-
config.setdefault("memory", {"enabled": True, "memory_dir": "memory/", "auto_learn": True, "max_episodic_days": 90})
|
|
242
|
-
config.setdefault("research", {"auto_research": True, "search_provider": "browser", "competitor_urls": [], "max_sources_per_topic": 10})
|
|
243
|
-
config.setdefault("scoring", {"reward_praise": 10, "reward_engagement": 5, "reward_first_pass": 3, "penalty_edit": -5, "penalty_delete": -10, "penalty_audit_fail": -3})
|
|
244
|
-
config.setdefault("extensions", {"openclaw": {"enabled": False}, "hooks": {}})
|
|
245
|
-
|
|
246
|
-
# Deploy config
|
|
247
|
-
config["deploy"] = {"target": self.answers["deploy"]}
|
|
248
|
-
|
|
249
|
-
return config
|
|
250
|
-
|
|
251
|
-
def _write_output(self, config: dict, output_dir: Path):
|
|
252
|
-
"""Write config and skill files to project directory."""
|
|
253
|
-
output_dir.mkdir(parents=True, exist_ok=True)
|
|
254
|
-
|
|
255
|
-
# 1. Write config
|
|
256
|
-
config_path = output_dir / "content-factory.config.json"
|
|
257
|
-
with open(config_path, "w", encoding="utf-8") as f:
|
|
258
|
-
json.dump(config, f, ensure_ascii=False, indent=2)
|
|
259
|
-
print(f"\n โ
Config: {config_path}")
|
|
260
|
-
|
|
261
|
-
# 2. Copy skill to project
|
|
262
|
-
target_skill = output_dir / ".agents" / "skills" / "content-factory"
|
|
263
|
-
if not target_skill.exists():
|
|
264
|
-
shutil.copytree(SKILL_DIR, target_skill, dirs_exist_ok=True)
|
|
265
|
-
print(f" โ
Skill: {target_skill}")
|
|
266
|
-
|
|
267
|
-
# 3. Copy workflows
|
|
268
|
-
src_workflows = SKILL_DIR.parent.parent / "workflows"
|
|
269
|
-
target_workflows = output_dir / ".agents" / "workflows"
|
|
270
|
-
if src_workflows.exists() and not target_workflows.exists():
|
|
271
|
-
shutil.copytree(src_workflows, target_workflows, dirs_exist_ok=True)
|
|
272
|
-
print(f" โ
Workflows: {target_workflows}")
|
|
273
|
-
|
|
274
|
-
# 4. Create content directories
|
|
275
|
-
for d in ["content/blog", "knowledge", "topics-queue", "memory/semantic", "memory/episodic", "memory/working"]:
|
|
276
|
-
(output_dir / d).mkdir(parents=True, exist_ok=True)
|
|
277
|
-
|
|
278
|
-
print(f"\n ๐ Project ready at: {output_dir}")
|
|
279
|
-
print(f" Next steps:")
|
|
280
|
-
print(f" cd {output_dir}")
|
|
281
|
-
print(f" python3 .agents/skills/content-factory/scripts/pipeline.py --status")
|
|
282
|
-
print(f" # Or use your AI agent: /content-factory")
|
|
283
|
-
|
|
284
|
-
def _slugify(self, text: str) -> str:
|
|
285
|
-
import re
|
|
286
|
-
return re.sub(r'[^a-z0-9]+', '-', text.lower()).strip('-')
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
def main():
|
|
290
|
-
parser = argparse.ArgumentParser(description="Content Factory โ Setup Wizard")
|
|
291
|
-
parser.add_argument("--niche", help="Pre-select niche (01-21)")
|
|
292
|
-
parser.add_argument("--test", action="store_true", help="Run self-test")
|
|
293
|
-
parser.add_argument("--list-niches", action="store_true", help="List available niches")
|
|
294
|
-
args = parser.parse_args()
|
|
295
|
-
|
|
296
|
-
if args.list_niches:
|
|
297
|
-
print("\n Available niches:")
|
|
298
|
-
for code, label, config in NICHES:
|
|
299
|
-
print(f" {code}. {label}")
|
|
300
|
-
return
|
|
301
|
-
|
|
302
|
-
if args.test:
|
|
303
|
-
print("๐งช Testing wizard...")
|
|
304
|
-
w = Wizard()
|
|
305
|
-
# Simulate answers
|
|
306
|
-
w.answers = {
|
|
307
|
-
"niche": {"id": "test", "label": "Test Niche", "config_file": None, "default_brand": "Test"},
|
|
308
|
-
"brand_name": "TestBrand",
|
|
309
|
-
"slogan": "Test Slogan",
|
|
310
|
-
"language": "en",
|
|
311
|
-
"deploy": "none",
|
|
312
|
-
"project_dir": "/tmp/content-factory-test"
|
|
313
|
-
}
|
|
314
|
-
config = w._generate_config()
|
|
315
|
-
assert config["brand"]["name"] == "TestBrand"
|
|
316
|
-
assert config["memory"]["enabled"] == True
|
|
317
|
-
assert config["scoring"]["reward_praise"] == 10
|
|
318
|
-
print(f" โ
Config generation works ({len(config)} sections)")
|
|
319
|
-
print(f" โ
All wizard tests passed!")
|
|
320
|
-
return
|
|
321
|
-
|
|
322
|
-
wizard = Wizard()
|
|
323
|
-
result = wizard.run()
|
|
324
|
-
if result:
|
|
325
|
-
print(f"\n ๐ญ Setup complete! Your content factory is ready.")
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
if __name__ == "__main__":
|
|
329
|
-
main()
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""
|
|
3
|
-
Write Phase โ Config-driven AI content generation.
|
|
4
|
-
|
|
5
|
-
Generates articles from topic queue using prompt templates and knowledge context.
|
|
6
|
-
Delegates to existing content_writer.py or runs standalone.
|
|
7
|
-
|
|
8
|
-
Usage:
|
|
9
|
-
python3 write.py --config content-factory.config.json --batch 10
|
|
10
|
-
python3 write.py --config content-factory.config.json --batch 50 --concurrency 3
|
|
11
|
-
python3 write.py --config content-factory.config.json --group TTN
|
|
12
|
-
python3 write.py --config content-factory.config.json --dry-run
|
|
13
|
-
"""
|
|
14
|
-
|
|
15
|
-
import json
|
|
16
|
-
import sys
|
|
17
|
-
import subprocess
|
|
18
|
-
import argparse
|
|
19
|
-
from pathlib import Path
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
def load_config(config_path: str) -> dict:
|
|
23
|
-
with open(config_path, "r", encoding="utf-8") as f:
|
|
24
|
-
return json.load(f)
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
def run_writer(project_root: Path, config: dict, batch: int, concurrency: int,
|
|
28
|
-
dry_run: bool, group: str = None, topic_type: str = None):
|
|
29
|
-
"""Run content writing using existing project script."""
|
|
30
|
-
writer = project_root / "scripts" / "content_writer.py"
|
|
31
|
-
if not writer.exists():
|
|
32
|
-
print("โ scripts/content_writer.py not found.")
|
|
33
|
-
print(" This script is required for the WRITE phase.")
|
|
34
|
-
return False
|
|
35
|
-
|
|
36
|
-
pipeline_cfg = config.get("pipeline", {})
|
|
37
|
-
effective_concurrency = concurrency or pipeline_cfg.get("concurrency", 1)
|
|
38
|
-
|
|
39
|
-
cmd = [
|
|
40
|
-
"python3", str(writer),
|
|
41
|
-
"--batch", str(batch),
|
|
42
|
-
"--concurrency", str(effective_concurrency),
|
|
43
|
-
]
|
|
44
|
-
|
|
45
|
-
if dry_run:
|
|
46
|
-
cmd.append("--dry-run")
|
|
47
|
-
if group:
|
|
48
|
-
cmd.extend(["--group", group])
|
|
49
|
-
if topic_type:
|
|
50
|
-
cmd.extend(["--topic-type", topic_type])
|
|
51
|
-
|
|
52
|
-
print(f" โ๏ธ Running content writer...")
|
|
53
|
-
print(f" Batch: {batch} articles")
|
|
54
|
-
print(f" Concurrency: {effective_concurrency}")
|
|
55
|
-
print(f" AI Provider: {pipeline_cfg.get('ai_provider', 'gemini-cli')}")
|
|
56
|
-
print(f" Output: {config['output']['content_dir']}")
|
|
57
|
-
|
|
58
|
-
result = subprocess.run(cmd, cwd=str(project_root))
|
|
59
|
-
|
|
60
|
-
# Auto-validate if configured
|
|
61
|
-
if result.returncode == 0 and not dry_run and pipeline_cfg.get("auto_validate", True):
|
|
62
|
-
print("\n ๐ Auto-validating generated content...")
|
|
63
|
-
validator = project_root / "scripts" / "content_validator.py"
|
|
64
|
-
if validator.exists():
|
|
65
|
-
subprocess.run(["python3", str(validator)], cwd=str(project_root))
|
|
66
|
-
|
|
67
|
-
return result.returncode == 0
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
def main():
|
|
71
|
-
parser = argparse.ArgumentParser(description="Write Phase โ AI content generation")
|
|
72
|
-
parser.add_argument("--config", required=True, help="Path to config JSON")
|
|
73
|
-
parser.add_argument("--batch", type=int, default=10, help="Number of articles to write")
|
|
74
|
-
parser.add_argument("--concurrency", type=int, default=0, help="Parallel workers (0=use config)")
|
|
75
|
-
parser.add_argument("--group", help="Filter by group code")
|
|
76
|
-
parser.add_argument("--topic-type", help="Filter by article type")
|
|
77
|
-
parser.add_argument("--dry-run", action="store_true")
|
|
78
|
-
args = parser.parse_args()
|
|
79
|
-
|
|
80
|
-
config = load_config(args.config)
|
|
81
|
-
project_root = Path(args.config).resolve().parent
|
|
82
|
-
|
|
83
|
-
print(f"โ๏ธ WRITE Phase โ Batch: {args.batch}")
|
|
84
|
-
|
|
85
|
-
success = run_writer(
|
|
86
|
-
project_root, config, args.batch, args.concurrency,
|
|
87
|
-
args.dry_run, args.group, args.topic_type
|
|
88
|
-
)
|
|
89
|
-
sys.exit(0 if success else 1)
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
if __name__ == "__main__":
|
|
93
|
-
main()
|
|
Binary file
|