codymaster 7.0.2 → 7.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +64 -0
- package/README.md +38 -1
- package/dist/agent/codex.js +73 -21
- package/dist/agent-dispatch.js +63 -48
- package/dist/cli/commands/brain.js +18 -0
- package/dist/cli/commands/design-studio.js +1 -1
- package/dist/cm-suggest.js +3 -3
- package/dist/dashboard-project-summary.js +9 -0
- package/dist/dashboard.js +11 -5
- package/dist/execution-analyzer.js +9 -1
- package/dist/judge.js +16 -15
- package/dist/mcp-context-server.js +45 -23
- package/dist/mcp-skills-tools.js +2 -2
- package/dist/skill-chain.js +26 -3
- package/dist/skill-token-report.js +105 -0
- package/dist/sprint-pipeline.js +3 -3
- package/dist/ui/onboarding.js +3 -4
- package/dist/utils/design-taste.js +1 -1
- package/dist/utils/output-compress.js +8 -0
- package/package.json +2 -1
- package/public/dashboard/app.js +40 -13
- package/public/dashboard/index.html +190 -5
- package/public/dashboard/style.css +1 -1
- package/scripts/build-skills.mjs +36 -2
- package/scripts/mcp-bridge.js +41 -24
- package/scripts/pack-plugin.mjs +206 -0
- package/skills/cm-ads-tracker/SKILL.md +401 -0
- package/skills/cm-ads-tracker/evals/evals.json +55 -0
- package/skills/cm-ads-tracker/references/gtm-architecture.md +321 -0
- package/skills/cm-ads-tracker/references/industry-events.md +294 -0
- package/skills/cm-ads-tracker/references/platforms-api.md +238 -0
- package/skills/cm-ads-tracker/templates/capi-payload.md +79 -0
- package/skills/cm-ads-tracker/templates/datalayer-push.js +104 -0
- package/skills/cm-ads-tracker/templates/gtm-variables.js +56 -0
- package/skills/cm-auto-publisher/SKILL.md +81 -0
- package/skills/cm-booking-calendar/SKILL.md +521 -0
- package/skills/cm-booking-calendar/references/industry-patterns.md +527 -0
- package/skills/cm-booking-calendar/templates/booking-form.css +626 -0
- package/skills/cm-booking-calendar/templates/booking-form.html +477 -0
- package/skills/cm-booking-calendar/templates/calendar-engine.js +419 -0
- package/skills/cm-booking-calendar/templates/calendar-export.js +395 -0
- package/skills/cm-booking-calendar/templates/reminder-config.js +629 -0
- package/skills/cm-brainstorm-idea/SKILL.md +5 -5
- package/skills/cm-code-review/SKILL.md +2 -2
- package/skills/cm-codeintell/SKILL.md +47 -580
- package/skills/cm-codeintell/references/integration-workflows.md +23 -0
- package/skills/cm-codeintell/references/layer-0-skeleton.md +54 -0
- package/skills/cm-codeintell/references/layer-1-codegraph.md +58 -0
- package/skills/cm-codeintell/references/layer-2-architecture.md +31 -0
- package/skills/cm-codeintell/references/layer-3-context-builder.md +32 -0
- package/skills/cm-content-factory/.content-factory-state.json +132 -0
- package/skills/cm-content-factory/.git 2/logs/refs/heads/main +1 -0
- package/skills/cm-content-factory/.git 2/logs/refs/remotes/origin/main +1 -0
- package/skills/cm-content-factory/.git 2/objects/02/fb0956734b5f8ba3f918b7defd04a89cfe0076 +0 -0
- package/skills/cm-content-factory/.git 2/objects/08/1e129d75dc6feac6c02037272e6bd1a04e3324 +0 -0
- package/skills/cm-content-factory/.git 2/objects/0c/5393416f3c5e01c9a655a802bff0dd52f76f0a +0 -0
- package/skills/cm-content-factory/.git 2/objects/10/0b9be46978a946a77188f68be725098a122001 +0 -0
- package/skills/cm-content-factory/.git 2/objects/10/cf041167fc9843610eb3d90259ef3396315fdc +0 -0
- package/skills/cm-content-factory/.git 2/objects/12/5e19538dd6e1338ffe74f6c4c165b00435bf48 +0 -0
- package/skills/cm-content-factory/.git 2/objects/16/a9b9d0088d5c1347628b45a2620b479d8ad57c +0 -0
- package/skills/cm-content-factory/.git 2/objects/17/8c2a9ef93c33ae4eec9d58e82321f9229843a1 +0 -0
- package/skills/cm-content-factory/.git 2/objects/25/397ae41d09104d763bdcac2695209d85cdea89 +0 -0
- package/skills/cm-content-factory/.git 2/objects/2f/a836b7947f2d458e1f639788bf4bb0983a3305 +0 -0
- package/skills/cm-content-factory/.git 2/objects/3a/baaaf0a1c0909c0828335791557125fba911e0 +0 -0
- package/skills/cm-content-factory/.git 2/objects/42/2924221b81f5ce3c4e4daac9a64a24f9b01f9a +0 -0
- package/skills/cm-content-factory/.git 2/objects/42/ec0ce707447dc11446a34c9995fb8533801731 +0 -0
- package/skills/cm-content-factory/.git 2/objects/46/e43ce92866d56ce74b1d750db307cfe6154a15 +0 -0
- package/skills/cm-content-factory/.git 2/objects/48/5e41b633c63f55b8277bcc59f44f67681f671a +0 -0
- package/skills/cm-content-factory/.git 2/objects/49/49c596a3a89fa240642acd95dd3258e261eb09 +0 -0
- package/skills/cm-content-factory/.git 2/objects/50/9d42d8412ef8eaf7f7e138476bac2e4d10ce60 +0 -0
- package/skills/cm-content-factory/.git 2/objects/55/0c8c389d981b463ef849aeb792d8be3ccb6ec8 +0 -0
- package/skills/cm-content-factory/.git 2/objects/5d/82d3b18410cdda3ace3677436f0cb599dbe2d2 +0 -0
- package/skills/cm-content-factory/.git 2/objects/60/0617c58e871a38b33bf29e282d132bb3c381ad +0 -0
- package/skills/cm-content-factory/.git 2/objects/6a/8369a99c687b7245c92ffaf0e0f0dab9014504 +0 -0
- package/skills/cm-content-factory/.git 2/objects/79/bea435d40ab531c1aaf6be0432c6a5b7aaed21 +0 -0
- package/skills/cm-content-factory/.git 2/objects/7e/5ebd79251c2f14e4aceb86c74b6b6daae6b500 +0 -0
- package/skills/cm-content-factory/.git 2/objects/81/98a822a60178d6d5023ddb3e222cddf048742e +0 -0
- package/skills/cm-content-factory/.git 2/objects/86/0a0e1943dfe53411d2e499a1f16f46a96ef758 +0 -0
- package/skills/cm-content-factory/.git 2/objects/86/971fb55fdc081fdbae52376f0f13e57a4e9b04 +0 -0
- package/skills/cm-content-factory/.git 2/objects/88/b89dd609a0a03f8d4fe8bfde20d5b8fc1d326d +0 -0
- package/skills/cm-content-factory/.git 2/objects/90/8737edb6b7809e32cc01590b4e08ba42a9d40d +0 -0
- package/skills/cm-content-factory/.git 2/objects/93/d5a8a9a7d4fb7f11491cb596a6880528725118 +0 -0
- package/skills/cm-content-factory/.git 2/objects/98/46a2ab81d0c3b3eb00ef88fc56989aa7e9f316 +0 -0
- package/skills/cm-content-factory/.git 2/objects/9b/d8dd1e49cf274eaf9c555f3ab39dce7af5715e +0 -0
- package/skills/cm-content-factory/.git 2/objects/a1/13329fb0cec96ae78b222d33a24c3b5bc7fa1f +0 -0
- package/skills/cm-content-factory/.git 2/objects/a9/e6effe626e8a3aea3a8fc3364b492191c6e7d0 +0 -0
- package/skills/cm-content-factory/.git 2/objects/ad/6de7e48d9782cca9353d1ff0aa1aab7fe1df85 +0 -0
- package/skills/cm-content-factory/.git 2/objects/af/54ae316f771ff692e299ffcd8bf2f06b413b59 +0 -0
- package/skills/cm-content-factory/.git 2/objects/b0/4cb8b0b00dad633e731c1472161419e738d674 +0 -0
- package/skills/cm-content-factory/.git 2/objects/b3/094abb0b9ed46419b269e4a4e36a459690e3b0 +0 -0
- package/skills/cm-content-factory/.git 2/objects/b9/435c5d4baac2cfc5c83009ddd27b46b60db5f1 +0 -0
- package/skills/cm-content-factory/.git 2/objects/ba/5da17dbaec5ec2dcfdfd126aead518d1171d5c +0 -0
- package/skills/cm-content-factory/.git 2/objects/c0/bf58703aa258ba5dd63083bebaec8f223d844c +0 -0
- package/skills/cm-content-factory/.git 2/objects/c4/701a34edf1fc1bad58ccc57bd03f9426acb59a +0 -0
- package/skills/cm-content-factory/.git 2/objects/c7/5ccce9a4e5cc74d9b3174550cf6d993ca43638 +0 -0
- package/skills/cm-content-factory/.git 2/objects/c7/710d59b5a35b0f1f0a0399386643a0bd94c929 +0 -0
- package/skills/cm-content-factory/.git 2/objects/d1/fe58237112e953e5fec52da22cf38e08be3df9 +5 -0
- package/skills/cm-content-factory/.git 2/objects/d2/2bbe9fd2f74c95bc5583e803f5e435f1e2cd86 +0 -0
- package/skills/cm-content-factory/.git 2/objects/d7/e72852ea2bff74581dbf247d400120086229f4 +0 -0
- package/skills/cm-content-factory/.git 2/objects/d8/d4c3b5553e4fd72807e1d4b49ef07d9ef3ac35 +0 -0
- package/skills/cm-content-factory/.git 2/objects/dc/75050c2876f6a02ae2a53a3c886f395b622977 +0 -0
- package/skills/cm-content-factory/.git 2/objects/ee/e8546f95acec500187c08a28a8b9ee02db0dec +0 -0
- package/skills/cm-content-factory/.git 2/objects/ef/263c059208b416c2146434f10cb2b9fabcba16 +0 -0
- package/skills/cm-content-factory/.git 2/objects/f3/ae597e84d9a59b88acd21c99bde2eaf686d785 +0 -0
- package/skills/cm-content-factory/.git 2/objects/f3/f6f5673c821d3d8e76fa267a9e882e7a5387ea +0 -0
- package/skills/cm-content-factory/.git 2/objects/f9/6e6d0ad02624dd11d5848594d056caef7a5e8b +0 -0
- package/skills/cm-content-factory/.git 2/objects/ff/278988fc1edf0db3abcf18de795f4cc0b4f3e1 +0 -0
- package/skills/cm-content-factory/.git 2/refs/heads/main +1 -0
- package/skills/cm-content-factory/.git 2/refs/remotes/origin/main +1 -0
- package/skills/cm-content-factory/.pytest_cache 2/v/cache/nodeids +76 -0
- package/skills/cm-content-factory/.pytest_cache 2/v/cache/stepwise +1 -0
- package/skills/cm-content-factory/AGENTS.md +61 -0
- package/skills/cm-content-factory/CLAUDE.md +63 -0
- package/skills/cm-content-factory/CURSOR.md +43 -0
- package/skills/cm-content-factory/Content Factory.zip +0 -0
- package/skills/cm-content-factory/SKILL.md +416 -0
- package/skills/cm-content-factory/cf +313 -0
- package/skills/cm-content-factory/config.schema.json +397 -0
- package/skills/cm-content-factory/dashboard/app.js +556 -0
- package/skills/cm-content-factory/dashboard/index.html +397 -0
- package/skills/cm-content-factory/dashboard/style.css +1211 -0
- package/skills/cm-content-factory/examples/01-real-estate.config.json +146 -0
- package/skills/cm-content-factory/examples/02-personal-finance.config.json +146 -0
- package/skills/cm-content-factory/examples/03-health-wellness.config.json +147 -0
- package/skills/cm-content-factory/examples/04-saas-software.config.json +147 -0
- package/skills/cm-content-factory/examples/05-legal-services.config.json +147 -0
- package/skills/cm-content-factory/examples/06-insurance.config.json +146 -0
- package/skills/cm-content-factory/examples/07-ecommerce-dropship.config.json +146 -0
- package/skills/cm-content-factory/examples/08-online-education.config.json +147 -0
- package/skills/cm-content-factory/examples/09-crypto-defi.config.json +147 -0
- package/skills/cm-content-factory/examples/10-beauty-skincare.config.json +147 -0
- package/skills/cm-content-factory/examples/11-home-services.config.json +146 -0
- package/skills/cm-content-factory/examples/12-dental-clinic.config.json +147 -0
- package/skills/cm-content-factory/examples/13-pet-care.config.json +147 -0
- package/skills/cm-content-factory/examples/14-travel-hospitality.config.json +147 -0
- package/skills/cm-content-factory/examples/15-ai-automation.config.json +147 -0
- package/skills/cm-content-factory/examples/16-wedding-events.config.json +147 -0
- package/skills/cm-content-factory/examples/17-fitness-coaching.config.json +148 -0
- package/skills/cm-content-factory/examples/18-cybersecurity.config.json +147 -0
- package/skills/cm-content-factory/examples/19-food-restaurant.config.json +148 -0
- package/skills/cm-content-factory/examples/20-solar-energy.config.json +147 -0
- package/skills/cm-content-factory/examples/fitness-blog.config.json +116 -0
- package/skills/cm-content-factory/examples/tech-blog.config.json +107 -0
- package/skills/cm-content-factory/extensions/EXTENSION_GUIDE.md +72 -0
- package/skills/cm-content-factory/extensions/hooks.py +126 -0
- package/skills/cm-content-factory/extensions/openclaw_adapter.py +132 -0
- package/skills/cm-content-factory/landing/docs/content/changelog.md +36 -0
- package/skills/cm-content-factory/landing/docs/content/deployment.md +46 -0
- package/skills/cm-content-factory/landing/docs/content/execution-flow.md +67 -0
- package/skills/cm-content-factory/landing/docs/content/openspace.md +27 -0
- package/skills/cm-content-factory/landing/docs/content/openviking.md +33 -0
- package/skills/cm-content-factory/landing/docs/content/use-cases.md +26 -0
- package/skills/cm-content-factory/landing/docs/content/v5-intro.md +28 -0
- package/skills/cm-content-factory/landing/docs/index.html +240 -0
- package/skills/cm-content-factory/landing/index.html +680 -0
- package/skills/cm-content-factory/landing/script.js +143 -0
- package/skills/cm-content-factory/landing/style.css +1216 -0
- package/skills/cm-content-factory/landing/translations.js +508 -0
- package/skills/cm-content-factory/logs/events.jsonl +11 -0
- package/skills/cm-content-factory/profiles/_template.profile.json +231 -0
- package/skills/cm-content-factory/profiles/finance.profile.json +278 -0
- package/skills/cm-content-factory/profiles/legal.profile.json +263 -0
- package/skills/cm-content-factory/profiles/medical-research.profile.json +321 -0
- package/skills/cm-content-factory/profiles/technology.profile.json +275 -0
- package/skills/cm-content-factory/scripts/agent_dispatcher.py +266 -0
- package/skills/cm-content-factory/scripts/audit.py +106 -0
- package/skills/cm-content-factory/scripts/dashboard_server.py +225 -0
- package/skills/cm-content-factory/scripts/deploy.py +146 -0
- package/skills/cm-content-factory/scripts/extract.py +132 -0
- package/skills/cm-content-factory/scripts/landing_generator.py +459 -0
- package/skills/cm-content-factory/scripts/memory.py +521 -0
- package/skills/cm-content-factory/scripts/monetize.py +239 -0
- package/skills/cm-content-factory/scripts/pipeline.py +357 -0
- package/skills/cm-content-factory/scripts/plan.py +163 -0
- package/skills/cm-content-factory/scripts/publish.py +145 -0
- package/skills/cm-content-factory/scripts/research.py +337 -0
- package/skills/cm-content-factory/scripts/scaffold.py +464 -0
- package/skills/cm-content-factory/scripts/scoreboard.py +336 -0
- package/skills/cm-content-factory/scripts/seo.py +90 -0
- package/skills/cm-content-factory/scripts/state_manager.py +320 -0
- package/skills/cm-content-factory/scripts/token_manager.py +268 -0
- package/skills/cm-content-factory/scripts/validate.py +221 -0
- package/skills/cm-content-factory/scripts/wizard.py +329 -0
- package/skills/cm-content-factory/scripts/write.py +93 -0
- package/skills/cm-content-factory/sites/docs-site/src/assets/houston.webp +0 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/architecture.md +90 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/data-flow.md +54 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/deployment.md +38 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/flows/index.md +65 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/flows/lc-content-lifecycle.md +48 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/flows/seq-write-mode.md +39 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/flows/uj-first-batch.md +42 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/flows/wf-content-pipeline.md +51 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/flows/wf-learning-cycle.md +52 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/getting-started/configuration.md +86 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/getting-started/installation.md +80 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/getting-started/intro.md +58 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/index.md +102 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/jtbd/index.md +45 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/jtbd/optimize-seo.md +29 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/jtbd/scale-content-production.md +55 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/jtbd/standardize-quality.md +29 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/personas/buyer-cmo-huong.md +41 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/personas/buyer-content-lead-khoa.md +40 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/personas/index.md +56 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/personas/user-content-manager-lan.md +46 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/personas/user-seo-minh.md +45 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/personas/user-writer-tu.md +45 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/sop/content-pipeline.md +108 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/sop/index.md +22 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/sop/memory-system.md +52 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/sop/seo-optimization.md +58 -0
- package/skills/cm-content-factory/sites/docs-site/src/content/docs/sop/troubleshooting-guide.md +92 -0
- package/skills/cm-content-factory/sites/docs-site/src/styles/custom.css +575 -0
- package/skills/cm-content-factory/tests/conftest.py +66 -0
- package/skills/cm-content-factory/tests/test_agent_dispatcher.py +125 -0
- package/skills/cm-content-factory/tests/test_memory.py +128 -0
- package/skills/cm-content-factory/tests/test_pipeline.py +107 -0
- package/skills/cm-content-factory/tests/test_research.py +56 -0
- package/skills/cm-content-factory/tests/test_state_manager.py +131 -0
- package/skills/cm-content-factory/tests/test_token_manager.py +110 -0
- package/skills/cm-content-factory/tests/test_wizard.py +121 -0
- package/skills/cm-continuity/SKILL.md +49 -480
- package/skills/cm-continuity/references/cm-uri-scheme.md +23 -0
- package/skills/cm-continuity/references/continuity-template.md +48 -0
- package/skills/cm-continuity/references/mcp-context-server.md +27 -0
- package/skills/cm-continuity/references/memory-architecture.md +26 -0
- package/skills/cm-continuity/references/memory-audit.md +18 -0
- package/skills/cm-continuity/references/session-protocol.md +31 -0
- package/skills/cm-continuity/references/storage-formats.md +20 -0
- package/skills/cm-cro-methodology/SKILL.md +290 -0
- package/skills/cm-cro-methodology/references/COPYWRITING.md +178 -0
- package/skills/cm-cro-methodology/references/OBJECTIONS.md +135 -0
- package/skills/cm-cro-methodology/references/PERSUASION.md +158 -0
- package/skills/cm-cro-methodology/references/RESEARCH.md +220 -0
- package/skills/cm-cro-methodology/references/funnel-analysis.md +365 -0
- package/skills/cm-cro-methodology/references/testing-methodology.md +330 -0
- package/skills/cm-design-system/SKILL.md +5 -6
- package/skills/cm-execution/SKILL.md +61 -379
- package/skills/cm-execution/references/mode-a-batch.md +28 -0
- package/skills/cm-execution/references/mode-b-subagent.md +46 -0
- package/skills/cm-execution/references/mode-c-parallel.md +39 -0
- package/skills/cm-execution/references/mode-d-rarv.md +62 -0
- package/skills/cm-execution/references/mode-e-triz-parallel.md +53 -0
- package/skills/cm-execution/references/mode-f-party.md +61 -0
- package/skills/cm-execution/references/persona-dispatch.md +22 -0
- package/skills/cm-execution/references/security-rules.md +47 -0
- package/skills/cm-google-form/SKILL.md +266 -0
- package/skills/cm-google-form/templates/apps-script.js +55 -0
- package/skills/cm-google-form/templates/form-markup.html +110 -0
- package/skills/cm-google-form/templates/form-submit.js +201 -0
- package/skills/cm-google-form/templates/toast.css +152 -0
- package/skills/cm-growth-hacking/SKILL.md +282 -0
- package/skills/cm-growth-hacking/bottom-sheet-engine.md +261 -0
- package/skills/cm-growth-hacking/calendar-integration.md +264 -0
- package/skills/cm-growth-hacking/references/engagement-patterns.md +346 -0
- package/skills/cm-growth-hacking/templates/bottom-sheet.css +528 -0
- package/skills/cm-growth-hacking/templates/bottom-sheet.js +269 -0
- package/skills/cm-growth-hacking/templates/calendar-cta.js +213 -0
- package/skills/cm-growth-hacking/templates/tracking-events.js +211 -0
- package/skills/cm-growth-hacking/templates/trigger-manager.js +254 -0
- package/skills/cm-growth-hacking/tracking-events.md +246 -0
- package/skills/cm-growth-hacking/trigger-system.md +342 -0
- package/skills/cm-how-it-work/SKILL.md +8 -9
- package/skills/cm-identity-guard/SKILL.md +4 -4
- package/skills/cm-jtbd/SKILL.md +98 -0
- package/skills/cm-notebooklm/SKILL.md +156 -0
- package/skills/cm-notebooklm/references/command_reference.md +94 -0
- package/skills/cm-notebooklm/references/workflows.md +60 -0
- package/skills/cm-notebooklm/resources/knowledge_sources.md +106 -0
- package/skills/cm-notebooklm/scripts/brain-sync.sh +453 -0
- package/skills/cm-notebooklm/scripts/graduate_wisdom.py +101 -0
- package/skills/cm-planning/SKILL.md +3 -3
- package/skills/cm-project-bootstrap/SKILL.md +2 -2
- package/skills/cm-quality-gate/SKILL.md +1 -1
- package/skills/cm-readit/SKILL.md +289 -0
- package/skills/cm-readit/audio-player.md +206 -0
- package/skills/cm-readit/examples/blog-reader.js +352 -0
- package/skills/cm-readit/examples/voice-cro.js +390 -0
- package/skills/cm-readit/tts-engine.md +262 -0
- package/skills/cm-readit/ui-patterns.md +362 -0
- package/skills/cm-readit/voice-cro.md +223 -0
- package/skills/cm-safe-deploy/SKILL.md +80 -510
- package/skills/cm-safe-deploy/references/gate-0-5-security-scan.md +31 -0
- package/skills/cm-safe-deploy/references/gate-0-secret-hygiene.md +68 -0
- package/skills/cm-safe-deploy/references/gate-1-syntax.md +23 -0
- package/skills/cm-safe-deploy/references/gate-2-test-suite.md +28 -0
- package/skills/cm-safe-deploy/references/gate-3-i18n.md +19 -0
- package/skills/cm-safe-deploy/references/gate-4-5-build-dist.md +16 -0
- package/skills/cm-safe-deploy/references/gate-6-deploy-smoke.md +18 -0
- package/skills/cm-safe-deploy/references/rollback.md +17 -0
- package/skills/cm-safe-deploy/references/setup-new-project.md +20 -0
- package/skills/cm-skill-index/SKILL.md +15 -15
- package/skills/cm-start/SKILL.md +1 -1
- package/skills/cm-tdd/SKILL.md +51 -356
- package/skills/cm-tdd/references/bugfix-example.md +15 -0
- package/skills/cm-tdd/references/rationalizations.md +20 -0
- package/skills/cm-tdd/references/red-green-refactor.md +33 -0
- package/skills/cm-tdd/references/stuck-debugging.md +18 -0
- package/skills/cm-tdd/references/test-quality.md +19 -0
- package/skills/cm-ux-master/SKILL.md +368 -115
- package/skills/profiles/core.txt +1 -4
- package/skills/profiles/design.txt +1 -2
- package/skills/profiles/full.txt +10 -16
- package/skills/profiles/growth.txt +9 -9
- package/skills/profiles/top35.json +13 -13
- package/skills/cm-conductor-worktrees/SKILL.archive.md +0 -28
- package/skills/cm-conductor-worktrees/SKILL.md +0 -26
- package/skills/cm-dashboard/SKILL.archive.md +0 -15
- package/skills/cm-dashboard/SKILL.md +0 -26
- package/skills/cm-dashboard/ui/app.js +0 -1278
- package/skills/cm-dashboard/ui/index.html +0 -206
- package/skills/cm-dashboard/ui/style.css +0 -440
- package/skills/cm-design-studio/SKILL.archive.md +0 -34
- package/skills/cm-design-studio/SKILL.md +0 -26
- package/skills/cm-engineering-meta/SKILL.archive.md +0 -73
- package/skills/cm-engineering-meta/SKILL.md +0 -26
- package/skills/cm-git-worktrees/SKILL.archive.md +0 -157
- package/skills/cm-git-worktrees/SKILL.md +0 -26
- package/skills/cm-post-deploy-canary/SKILL.archive.md +0 -22
- package/skills/cm-post-deploy-canary/SKILL.md +0 -26
- package/skills/cm-qa-visual-cli/SKILL.archive.md +0 -22
- package/skills/cm-qa-visual-cli/SKILL.md +0 -26
- package/skills/cm-second-opinion-cli/SKILL.archive.md +0 -23
- package/skills/cm-second-opinion-cli/SKILL.md +0 -26
- package/skills/cm-secret-shield/SKILL.archive.md +0 -580
- package/skills/cm-secret-shield/SKILL.md +0 -26
- package/skills/cm-security-gate/SKILL.archive.md +0 -239
- package/skills/cm-security-gate/SKILL.md +0 -26
- package/skills/cm-skill-health/SKILL.archive.md +0 -83
- package/skills/cm-skill-health/SKILL.md +0 -26
- package/skills/cm-skill-mastery/SKILL.archive.md +0 -156
- package/skills/cm-skill-mastery/SKILL.md +0 -26
- package/skills/cm-skill-search/SKILL.archive.md +0 -49
- package/skills/cm-skill-search/SKILL.md +0 -26
- package/skills/cm-skill-share/SKILL.archive.md +0 -58
- package/skills/cm-skill-share/SKILL.md +0 -26
- package/skills/cm-test-gate/SKILL.archive.md +0 -245
- package/skills/cm-test-gate/SKILL.md +0 -26
- package/skills/cm-ui-preview/SKILL.archive.md +0 -153
- package/skills/cm-ui-preview/SKILL.md +0 -26
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>
|
|
6
|
+
<title>opencode — Mission Control</title>
|
|
7
7
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
8
8
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
9
9
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<div class="sidebar-header" style="justify-content: space-between;">
|
|
27
27
|
<div style="display: flex; align-items: center; gap: 8px;">
|
|
28
28
|
<span class="logo">🧠</span>
|
|
29
|
-
<h1 class="sidebar-title">
|
|
29
|
+
<h1 class="sidebar-title">opencode <span class="sidebar-subtitle">Mission Control</span></h1>
|
|
30
30
|
</div>
|
|
31
31
|
<button class="sidebar-close" id="sidebar-close" title="Close sidebar">
|
|
32
32
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
</div>
|
|
61
61
|
|
|
62
62
|
<div class="sidebar-footer">
|
|
63
|
-
<span class="sidebar-version">
|
|
63
|
+
<span class="sidebar-version">opencode — port 6969</span>
|
|
64
64
|
</div>
|
|
65
65
|
</aside>
|
|
66
66
|
|
|
@@ -96,6 +96,10 @@
|
|
|
96
96
|
<button class="btn-icon auto-refresh-toggle" id="btn-auto-refresh" title="Toggle auto-refresh">
|
|
97
97
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/></svg>
|
|
98
98
|
</button>
|
|
99
|
+
<button class="btn btn-primary" id="btn-add-task" title="New task (Ctrl+N)">
|
|
100
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>
|
|
101
|
+
<span>New Task</span>
|
|
102
|
+
</button>
|
|
99
103
|
</div>
|
|
100
104
|
</div>
|
|
101
105
|
|
|
@@ -140,8 +144,9 @@
|
|
|
140
144
|
<!-- ── Tab: Deploys ───────────────────────────────────── -->
|
|
141
145
|
<div class="tab-panel" id="panel-deploys">
|
|
142
146
|
<div class="deploys-container">
|
|
143
|
-
<div class="deploys-header">
|
|
147
|
+
<div class="deploys-header" style="display:flex;justify-content:space-between;align-items:center;">
|
|
144
148
|
<h3>Deployment History</h3>
|
|
149
|
+
<button class="btn btn-primary" id="btn-new-deploy">+ New Deploy</button>
|
|
145
150
|
</div>
|
|
146
151
|
<div class="deploy-list" id="deploy-list"></div>
|
|
147
152
|
</div>
|
|
@@ -150,8 +155,9 @@
|
|
|
150
155
|
<!-- ── Tab: Changelog ─────────────────────────────────── -->
|
|
151
156
|
<div class="tab-panel" id="panel-changelog">
|
|
152
157
|
<div class="changelog-container">
|
|
153
|
-
<div class="changelog-header">
|
|
158
|
+
<div class="changelog-header" style="display:flex;justify-content:space-between;align-items:center;">
|
|
154
159
|
<h3>Changelog</h3>
|
|
160
|
+
<button class="btn btn-primary" id="btn-new-changelog">+ New Entry</button>
|
|
155
161
|
</div>
|
|
156
162
|
<div class="changelog-list" id="changelog-list"></div>
|
|
157
163
|
</div>
|
|
@@ -209,6 +215,185 @@
|
|
|
209
215
|
|
|
210
216
|
|
|
211
217
|
|
|
218
|
+
<!-- ── Task Modal ─────────────────────────────────────── -->
|
|
219
|
+
<div class="modal-overlay" id="modal-overlay">
|
|
220
|
+
<div class="modal">
|
|
221
|
+
<div class="modal-header">
|
|
222
|
+
<h3 class="modal-title" id="modal-title">New Task</h3>
|
|
223
|
+
<button class="modal-close" id="modal-close" type="button">×</button>
|
|
224
|
+
</div>
|
|
225
|
+
<form id="task-form">
|
|
226
|
+
<input type="hidden" id="form-id" />
|
|
227
|
+
<div class="form-group">
|
|
228
|
+
<label for="form-title">Title</label>
|
|
229
|
+
<input type="text" id="form-title" required maxlength="200" placeholder="What needs doing?" />
|
|
230
|
+
</div>
|
|
231
|
+
<div class="form-group">
|
|
232
|
+
<label for="form-description">Description</label>
|
|
233
|
+
<textarea id="form-description" rows="3" placeholder="Optional details, acceptance criteria…"></textarea>
|
|
234
|
+
</div>
|
|
235
|
+
<div class="form-row">
|
|
236
|
+
<div class="form-group">
|
|
237
|
+
<label for="form-priority">Priority</label>
|
|
238
|
+
<select id="form-priority">
|
|
239
|
+
<option value="low">Low</option>
|
|
240
|
+
<option value="medium" selected>Medium</option>
|
|
241
|
+
<option value="high">High</option>
|
|
242
|
+
<option value="urgent">Urgent</option>
|
|
243
|
+
</select>
|
|
244
|
+
</div>
|
|
245
|
+
<div class="form-group">
|
|
246
|
+
<label for="form-column">Column</label>
|
|
247
|
+
<select id="form-column">
|
|
248
|
+
<option value="backlog" selected>Backlog</option>
|
|
249
|
+
<option value="in-progress">In Progress</option>
|
|
250
|
+
<option value="review">Review</option>
|
|
251
|
+
<option value="done">Done</option>
|
|
252
|
+
</select>
|
|
253
|
+
</div>
|
|
254
|
+
</div>
|
|
255
|
+
<div class="form-row">
|
|
256
|
+
<div class="form-group">
|
|
257
|
+
<label for="form-agent">Agent</label>
|
|
258
|
+
<select id="form-agent">
|
|
259
|
+
<option value="">— Unassigned —</option>
|
|
260
|
+
<option value="codex">Codex</option>
|
|
261
|
+
<option value="antigravity">Google Antigravity</option>
|
|
262
|
+
<option value="cursor">Cursor</option>
|
|
263
|
+
<option value="gemini-cli">Gemini CLI</option>
|
|
264
|
+
<option value="opencode">OpenCode</option>
|
|
265
|
+
<option value="claude-code">Claude Code</option>
|
|
266
|
+
<option value="windsurf">Windsurf</option>
|
|
267
|
+
<option value="cline">Cline</option>
|
|
268
|
+
<option value="copilot">Copilot</option>
|
|
269
|
+
<option value="manual">Manual</option>
|
|
270
|
+
</select>
|
|
271
|
+
</div>
|
|
272
|
+
<div class="form-group">
|
|
273
|
+
<label for="form-skill">Skill</label>
|
|
274
|
+
<input type="text" id="form-skill" placeholder="e.g. cm-tdd" />
|
|
275
|
+
</div>
|
|
276
|
+
</div>
|
|
277
|
+
<div class="form-actions">
|
|
278
|
+
<button type="button" class="btn" id="btn-cancel">Cancel</button>
|
|
279
|
+
<button type="submit" class="btn btn-primary" id="btn-submit">Create Task</button>
|
|
280
|
+
</div>
|
|
281
|
+
</form>
|
|
282
|
+
</div>
|
|
283
|
+
</div>
|
|
284
|
+
|
|
285
|
+
<!-- ── Deploy Modal ───────────────────────────────────── -->
|
|
286
|
+
<div class="modal-overlay" id="deploy-modal-overlay">
|
|
287
|
+
<div class="modal">
|
|
288
|
+
<div class="modal-header">
|
|
289
|
+
<h3 class="modal-title">Record Deployment</h3>
|
|
290
|
+
<button class="modal-close" id="deploy-modal-close" type="button">×</button>
|
|
291
|
+
</div>
|
|
292
|
+
<form id="deploy-form">
|
|
293
|
+
<div class="form-row">
|
|
294
|
+
<div class="form-group">
|
|
295
|
+
<label for="deploy-env">Environment</label>
|
|
296
|
+
<select id="deploy-env">
|
|
297
|
+
<option value="staging">Staging</option>
|
|
298
|
+
<option value="production">Production</option>
|
|
299
|
+
</select>
|
|
300
|
+
</div>
|
|
301
|
+
<div class="form-group">
|
|
302
|
+
<label for="deploy-branch">Branch</label>
|
|
303
|
+
<input type="text" id="deploy-branch" value="main" />
|
|
304
|
+
</div>
|
|
305
|
+
</div>
|
|
306
|
+
<div class="form-group">
|
|
307
|
+
<label for="deploy-commit">Commit (sha)</label>
|
|
308
|
+
<input type="text" id="deploy-commit" placeholder="abcdef0" />
|
|
309
|
+
</div>
|
|
310
|
+
<div class="form-group">
|
|
311
|
+
<label for="deploy-message">Message</label>
|
|
312
|
+
<input type="text" id="deploy-message" placeholder="Deploy summary" />
|
|
313
|
+
</div>
|
|
314
|
+
<div class="form-actions">
|
|
315
|
+
<button type="button" class="btn" id="deploy-cancel">Cancel</button>
|
|
316
|
+
<button type="submit" class="btn btn-primary">Record</button>
|
|
317
|
+
</div>
|
|
318
|
+
</form>
|
|
319
|
+
</div>
|
|
320
|
+
</div>
|
|
321
|
+
|
|
322
|
+
<!-- ── Changelog Modal ────────────────────────────────── -->
|
|
323
|
+
<div class="modal-overlay" id="changelog-modal-overlay">
|
|
324
|
+
<div class="modal">
|
|
325
|
+
<div class="modal-header">
|
|
326
|
+
<h3 class="modal-title">New Changelog Entry</h3>
|
|
327
|
+
<button class="modal-close" id="cl-modal-close" type="button">×</button>
|
|
328
|
+
</div>
|
|
329
|
+
<form id="changelog-form">
|
|
330
|
+
<div class="form-row">
|
|
331
|
+
<div class="form-group">
|
|
332
|
+
<label for="cl-version">Version</label>
|
|
333
|
+
<input type="text" id="cl-version" placeholder="v1.2.0" required />
|
|
334
|
+
</div>
|
|
335
|
+
<div class="form-group">
|
|
336
|
+
<label for="cl-title">Title</label>
|
|
337
|
+
<input type="text" id="cl-title" placeholder="Release name" />
|
|
338
|
+
</div>
|
|
339
|
+
</div>
|
|
340
|
+
<div class="form-group">
|
|
341
|
+
<label for="cl-changes">Changes (one per line)</label>
|
|
342
|
+
<textarea id="cl-changes" rows="5" placeholder="- Added X - Fixed Y"></textarea>
|
|
343
|
+
</div>
|
|
344
|
+
<div class="form-actions">
|
|
345
|
+
<button type="button" class="btn" id="cl-cancel">Cancel</button>
|
|
346
|
+
<button type="submit" class="btn btn-primary">Add Entry</button>
|
|
347
|
+
</div>
|
|
348
|
+
</form>
|
|
349
|
+
</div>
|
|
350
|
+
</div>
|
|
351
|
+
|
|
352
|
+
<!-- ── Delete Modal ───────────────────────────────────── -->
|
|
353
|
+
<div class="modal-overlay" id="delete-overlay">
|
|
354
|
+
<div class="modal modal-sm">
|
|
355
|
+
<div class="modal-header">
|
|
356
|
+
<h3 class="modal-title">Delete Task</h3>
|
|
357
|
+
<button class="modal-close" id="delete-close" type="button">×</button>
|
|
358
|
+
</div>
|
|
359
|
+
<p class="delete-message">Delete <strong id="delete-task-name"></strong>? This cannot be undone.</p>
|
|
360
|
+
<div class="form-actions">
|
|
361
|
+
<button type="button" class="btn" id="delete-cancel">Cancel</button>
|
|
362
|
+
<button type="button" class="btn btn-danger" id="delete-confirm">Delete</button>
|
|
363
|
+
</div>
|
|
364
|
+
</div>
|
|
365
|
+
</div>
|
|
366
|
+
|
|
367
|
+
<!-- ── Dispatch Modal ─────────────────────────────────── -->
|
|
368
|
+
<div class="modal-overlay" id="dispatch-overlay">
|
|
369
|
+
<div class="modal" style="width:640px;max-width:95vw;">
|
|
370
|
+
<div class="modal-header">
|
|
371
|
+
<h3 class="modal-title">🚀 Dispatch Task to Agent</h3>
|
|
372
|
+
<button class="modal-close" id="dispatch-close" type="button">×</button>
|
|
373
|
+
</div>
|
|
374
|
+
<div class="dispatch-content">
|
|
375
|
+
<p class="dispatch-intro">Copy the prompt into your agent, or run the CLI command directly.</p>
|
|
376
|
+
<div class="dispatch-section">
|
|
377
|
+
<div class="dispatch-section-header">
|
|
378
|
+
<label>Agent Prompt</label>
|
|
379
|
+
<button class="btn" id="copy-prompt" type="button">Copy</button>
|
|
380
|
+
</div>
|
|
381
|
+
<pre class="dispatch-code-block" id="dispatch-prompt"></pre>
|
|
382
|
+
</div>
|
|
383
|
+
<div class="dispatch-section">
|
|
384
|
+
<div class="dispatch-section-header">
|
|
385
|
+
<label>CLI Command</label>
|
|
386
|
+
<button class="btn" id="copy-command" type="button">Copy</button>
|
|
387
|
+
</div>
|
|
388
|
+
<pre class="dispatch-cli-block" id="dispatch-command"></pre>
|
|
389
|
+
</div>
|
|
390
|
+
<div class="form-actions">
|
|
391
|
+
<button type="button" class="btn btn-primary" id="dispatch-done-btn">Done</button>
|
|
392
|
+
</div>
|
|
393
|
+
</div>
|
|
394
|
+
</div>
|
|
395
|
+
</div>
|
|
396
|
+
|
|
212
397
|
<!-- ── Toast Notification ─────────────────────────────── -->
|
|
213
398
|
<div class="toast-container" id="toast-container"></div>
|
|
214
399
|
|
package/scripts/build-skills.mjs
CHANGED
|
@@ -56,6 +56,39 @@ function render(tmpl, vars) {
|
|
|
56
56
|
return tmpl.replace(/\{\{(\w+)\}\}/g, (_, k) => (vars[k] != null ? String(vars[k]) : `{{${k}}}`));
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
function parseFrontmatter(text) {
|
|
60
|
+
const m = text.match(/^---\n([\s\S]*?)\n---\n?/);
|
|
61
|
+
if (!m) return null;
|
|
62
|
+
const out = {};
|
|
63
|
+
for (const line of m[1].split('\n')) {
|
|
64
|
+
const mm = line.match(/^([A-Za-z_][A-Za-z0-9_-]*)\s*:\s*(.*)$/);
|
|
65
|
+
if (!mm) continue;
|
|
66
|
+
let v = mm[2].trim();
|
|
67
|
+
if (v.startsWith('"') && v.endsWith('"')) v = v.slice(1, -1);
|
|
68
|
+
if (v === 'true') v = true;
|
|
69
|
+
else if (v === 'false') v = false;
|
|
70
|
+
else if (/^-?\d+$/.test(v)) v = parseInt(v, 10);
|
|
71
|
+
out[mm[1]] = v;
|
|
72
|
+
}
|
|
73
|
+
return out;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function assertSkillIdentity(skillFile, expectedName) {
|
|
77
|
+
const text = fs.readFileSync(skillFile, 'utf8');
|
|
78
|
+
const fm = parseFrontmatter(text);
|
|
79
|
+
if (!fm) {
|
|
80
|
+
throw new Error(`skill '${expectedName}' missing YAML frontmatter in ${skillFile}`);
|
|
81
|
+
}
|
|
82
|
+
if (!fm.name) {
|
|
83
|
+
throw new Error(`skill '${expectedName}' missing frontmatter.name in ${skillFile}`);
|
|
84
|
+
}
|
|
85
|
+
if (fm.name !== expectedName) {
|
|
86
|
+
throw new Error(
|
|
87
|
+
`skill '${expectedName}' has frontmatter.name='${fm.name}' in ${skillFile}; sync aborted to prevent propagating a corrupted skill`
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
59
92
|
function sha256(buf) {
|
|
60
93
|
return crypto.createHash('sha256').update(buf).digest('hex');
|
|
61
94
|
}
|
|
@@ -76,13 +109,14 @@ function copyFileIdempotent(src, dst) {
|
|
|
76
109
|
return 'synced';
|
|
77
110
|
}
|
|
78
111
|
|
|
79
|
-
function copyDirShallow(srcDir, dstDir) {
|
|
112
|
+
function copyDirShallow(srcDir, dstDir, expectedName = null) {
|
|
80
113
|
const result = { synced: 0, skipped: 0, drift: 0 };
|
|
81
114
|
if (!fs.existsSync(srcDir)) return result;
|
|
82
115
|
ensureDir(dstDir);
|
|
83
116
|
|
|
84
117
|
const skillFile = path.join(srcDir, 'SKILL.md');
|
|
85
118
|
if (fs.existsSync(skillFile)) {
|
|
119
|
+
assertSkillIdentity(skillFile, expectedName || path.basename(srcDir));
|
|
86
120
|
result[copyFileIdempotent(skillFile, path.join(dstDir, 'SKILL.md'))]++;
|
|
87
121
|
}
|
|
88
122
|
|
|
@@ -196,7 +230,7 @@ if (platforms.length > 0) {
|
|
|
196
230
|
console.warn(` ! ${platform}: skill '${name}' not found in skills/`);
|
|
197
231
|
continue;
|
|
198
232
|
}
|
|
199
|
-
const r = copyDirShallow(srcDir, path.join(dst, name));
|
|
233
|
+
const r = copyDirShallow(srcDir, path.join(dst, name), name);
|
|
200
234
|
synced += r.synced; skipped += r.skipped; drift += r.drift;
|
|
201
235
|
}
|
|
202
236
|
|
package/scripts/mcp-bridge.js
CHANGED
|
@@ -186,12 +186,19 @@ const TOOLS = [
|
|
|
186
186
|
},
|
|
187
187
|
];
|
|
188
188
|
|
|
189
|
-
// ── MCP stdio protocol (JSON-RPC 2.0,
|
|
189
|
+
// ── MCP stdio protocol (JSON-RPC 2.0, auto-detect framing) ──────────────────
|
|
190
|
+
// Supports both NDJSON (MCP spec) and Content-Length framing (LSP-style).
|
|
191
|
+
|
|
192
|
+
let useContentLengthFraming = false;
|
|
190
193
|
|
|
191
194
|
function sendMessage(msg) {
|
|
192
195
|
const json = JSON.stringify(msg);
|
|
193
|
-
|
|
194
|
-
|
|
196
|
+
if (useContentLengthFraming) {
|
|
197
|
+
const header = `Content-Length: ${Buffer.byteLength(json)}\r\n\r\n`;
|
|
198
|
+
process.stdout.write(header + json);
|
|
199
|
+
} else {
|
|
200
|
+
process.stdout.write(json + '\n');
|
|
201
|
+
}
|
|
195
202
|
}
|
|
196
203
|
|
|
197
204
|
function respond(id, result) {
|
|
@@ -207,7 +214,7 @@ async function handleRequest(msg) {
|
|
|
207
214
|
|
|
208
215
|
if (method === 'initialize') {
|
|
209
216
|
respond(id, {
|
|
210
|
-
protocolVersion: '2024-11-05',
|
|
217
|
+
protocolVersion: params?.protocolVersion ?? '2024-11-05',
|
|
211
218
|
capabilities: { tools: {} },
|
|
212
219
|
serverInfo: { name: SERVER_NAME, version: SERVER_VERSION },
|
|
213
220
|
});
|
|
@@ -247,31 +254,41 @@ async function handleRequest(msg) {
|
|
|
247
254
|
}
|
|
248
255
|
}
|
|
249
256
|
|
|
250
|
-
// ── Stdin reader (Content-Length
|
|
257
|
+
// ── Stdin reader (supports both NDJSON and Content-Length framing) ───────────
|
|
251
258
|
|
|
252
|
-
let
|
|
259
|
+
let stdinBuffer = '';
|
|
253
260
|
|
|
261
|
+
process.stdin.setEncoding('utf8');
|
|
254
262
|
process.stdin.on('data', async (chunk) => {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
while (
|
|
258
|
-
//
|
|
259
|
-
const
|
|
260
|
-
if (
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
263
|
+
stdinBuffer += chunk;
|
|
264
|
+
|
|
265
|
+
while (stdinBuffer.length > 0) {
|
|
266
|
+
// Check for Content-Length framing (LSP-style)
|
|
267
|
+
const clMatch = stdinBuffer.match(/^Content-Length:\s*(\d+)\r\n\r\n/i);
|
|
268
|
+
if (clMatch) {
|
|
269
|
+
useContentLengthFraming = true;
|
|
270
|
+
const contentLength = parseInt(clMatch[1], 10);
|
|
271
|
+
const headerEnd = clMatch[0].length;
|
|
272
|
+
if (stdinBuffer.length < headerEnd + contentLength) break;
|
|
273
|
+
const body = stdinBuffer.slice(headerEnd, headerEnd + contentLength);
|
|
274
|
+
stdinBuffer = stdinBuffer.slice(headerEnd + contentLength);
|
|
275
|
+
try {
|
|
276
|
+
const msg = JSON.parse(body);
|
|
277
|
+
await handleRequest(msg);
|
|
278
|
+
} catch {
|
|
279
|
+
// ignore malformed messages
|
|
280
|
+
}
|
|
281
|
+
continue;
|
|
282
|
+
}
|
|
272
283
|
|
|
284
|
+
// NDJSON: newline-delimited JSON
|
|
285
|
+
const nl = stdinBuffer.indexOf('\n');
|
|
286
|
+
if (nl === -1) break;
|
|
287
|
+
const line = stdinBuffer.slice(0, nl).trim();
|
|
288
|
+
stdinBuffer = stdinBuffer.slice(nl + 1);
|
|
289
|
+
if (!line) continue;
|
|
273
290
|
try {
|
|
274
|
-
const msg = JSON.parse(
|
|
291
|
+
const msg = JSON.parse(line);
|
|
275
292
|
await handleRequest(msg);
|
|
276
293
|
} catch {
|
|
277
294
|
// ignore malformed messages
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Pack the CodyMaster Claude plugin into ./cm.plugin (zip archive).
|
|
4
|
+
*
|
|
5
|
+
* Token-efficiency strategy (the plugin is consumed by Claude Code):
|
|
6
|
+
* - skills/<name>/ → only SKILL.md + references/ (Claude loads on demand)
|
|
7
|
+
* - skills/_shared/ → kept as-is (small, used by helpers)
|
|
8
|
+
* - dist/ → required by .mcp.json (cm-context MCP server)
|
|
9
|
+
* - Strip per-skill bloat: tests, examples, output, scripts, data, docs,
|
|
10
|
+
* localized READMEs, .tmpl files, hidden files.
|
|
11
|
+
*
|
|
12
|
+
* Output: ./cm.plugin
|
|
13
|
+
*/
|
|
14
|
+
import fs from 'fs';
|
|
15
|
+
import path from 'path';
|
|
16
|
+
import { execFileSync } from 'child_process';
|
|
17
|
+
import { fileURLToPath } from 'url';
|
|
18
|
+
|
|
19
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
20
|
+
const repoRoot = path.join(__dirname, '..');
|
|
21
|
+
const stagingRoot = path.join(repoRoot, '.pack-staging');
|
|
22
|
+
const outFile = path.join(repoRoot, 'cm.plugin');
|
|
23
|
+
|
|
24
|
+
const pkg = JSON.parse(fs.readFileSync(path.join(repoRoot, 'package.json'), 'utf-8'));
|
|
25
|
+
const VERSION = pkg.version;
|
|
26
|
+
|
|
27
|
+
console.log(`📦 Packing CodyMaster plugin v${VERSION}…`);
|
|
28
|
+
|
|
29
|
+
// ── Reset staging ────────────────────────────────────────────────────────────
|
|
30
|
+
if (fs.existsSync(stagingRoot)) fs.rmSync(stagingRoot, { recursive: true, force: true });
|
|
31
|
+
fs.mkdirSync(stagingRoot, { recursive: true });
|
|
32
|
+
if (fs.existsSync(outFile)) fs.rmSync(outFile);
|
|
33
|
+
|
|
34
|
+
// ── Helpers ──────────────────────────────────────────────────────────────────
|
|
35
|
+
function ensureDir(p) {
|
|
36
|
+
fs.mkdirSync(p, { recursive: true });
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function copyFile(src, dst) {
|
|
40
|
+
ensureDir(path.dirname(dst));
|
|
41
|
+
fs.copyFileSync(src, dst);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function copyDirAll(src, dst, filter = () => true) {
|
|
45
|
+
if (!fs.existsSync(src)) return 0;
|
|
46
|
+
let count = 0;
|
|
47
|
+
for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
|
|
48
|
+
const sp = path.join(src, entry.name);
|
|
49
|
+
const dp = path.join(dst, entry.name);
|
|
50
|
+
if (entry.name.startsWith('.')) continue;
|
|
51
|
+
if (entry.isDirectory()) {
|
|
52
|
+
count += copyDirAll(sp, dp, filter);
|
|
53
|
+
} else if (entry.isFile() && filter(sp, entry.name)) {
|
|
54
|
+
copyFile(sp, dp);
|
|
55
|
+
count++;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return count;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// ── 1. Plugin manifest ───────────────────────────────────────────────────────
|
|
62
|
+
const stagedManifestDir = path.join(stagingRoot, '.claude-plugin');
|
|
63
|
+
ensureDir(stagedManifestDir);
|
|
64
|
+
copyFile(
|
|
65
|
+
path.join(repoRoot, '.claude-plugin', 'plugin.json'),
|
|
66
|
+
path.join(stagedManifestDir, 'plugin.json'),
|
|
67
|
+
);
|
|
68
|
+
copyFile(
|
|
69
|
+
path.join(repoRoot, '.claude-plugin', 'marketplace.json'),
|
|
70
|
+
path.join(stagedManifestDir, 'marketplace.json'),
|
|
71
|
+
);
|
|
72
|
+
console.log(' ✓ .claude-plugin/');
|
|
73
|
+
|
|
74
|
+
// ── 2. Slash commands & sub-agents ───────────────────────────────────────────
|
|
75
|
+
const cmdCount = copyDirAll(
|
|
76
|
+
path.join(repoRoot, 'commands'),
|
|
77
|
+
path.join(stagingRoot, 'commands'),
|
|
78
|
+
(_, name) => name.endsWith('.md'),
|
|
79
|
+
);
|
|
80
|
+
console.log(` ✓ commands/ (${cmdCount} files)`);
|
|
81
|
+
|
|
82
|
+
const agentCount = copyDirAll(
|
|
83
|
+
path.join(repoRoot, 'agents'),
|
|
84
|
+
path.join(stagingRoot, 'agents'),
|
|
85
|
+
(_, name) => name.endsWith('.md'),
|
|
86
|
+
);
|
|
87
|
+
console.log(` ✓ agents/ (${agentCount} files)`);
|
|
88
|
+
|
|
89
|
+
// ── 3. .mcp.json (MCP server entry) ──────────────────────────────────────────
|
|
90
|
+
copyFile(path.join(repoRoot, '.mcp.json'), path.join(stagingRoot, '.mcp.json'));
|
|
91
|
+
console.log(' ✓ .mcp.json');
|
|
92
|
+
|
|
93
|
+
// ── 4. dist/ (runtime for MCP server + cm CLI) ───────────────────────────────
|
|
94
|
+
const distCount = copyDirAll(
|
|
95
|
+
path.join(repoRoot, 'dist'),
|
|
96
|
+
path.join(stagingRoot, 'dist'),
|
|
97
|
+
(_, name) => name.endsWith('.js') || name.endsWith('.json') || name.endsWith('.md'),
|
|
98
|
+
);
|
|
99
|
+
console.log(` ✓ dist/ (${distCount} files)`);
|
|
100
|
+
|
|
101
|
+
// package.json is referenced at runtime by dist/index.js + dist/mcp-context-server.js.
|
|
102
|
+
// Ship a slim version (no devDependencies, no scripts) to keep installs lean.
|
|
103
|
+
const slimPkg = {
|
|
104
|
+
name: pkg.name,
|
|
105
|
+
version: pkg.version,
|
|
106
|
+
description: pkg.description,
|
|
107
|
+
main: pkg.main,
|
|
108
|
+
bin: pkg.bin,
|
|
109
|
+
dependencies: pkg.dependencies,
|
|
110
|
+
engines: pkg.engines,
|
|
111
|
+
homepage: pkg.homepage,
|
|
112
|
+
repository: pkg.repository,
|
|
113
|
+
};
|
|
114
|
+
fs.writeFileSync(path.join(stagingRoot, 'package.json'), JSON.stringify(slimPkg, null, 2));
|
|
115
|
+
console.log(' ✓ package.json (slim)');
|
|
116
|
+
|
|
117
|
+
// ── 5. Skills — TOKEN-OPTIMIZED ──────────────────────────────────────────────
|
|
118
|
+
// For each cm-* skill: copy SKILL.md (always) + references/ (if present).
|
|
119
|
+
// Drop tests/, scripts/, data/, output/, docs/, examples/, localized READMEs.
|
|
120
|
+
// This mirrors what `build-skills.mjs#copyDirShallow` already does for Claude.
|
|
121
|
+
const skillsSrc = path.join(repoRoot, 'skills');
|
|
122
|
+
const skillsDst = path.join(stagingRoot, 'skills');
|
|
123
|
+
ensureDir(skillsDst);
|
|
124
|
+
|
|
125
|
+
let skillCount = 0;
|
|
126
|
+
let refFileCount = 0;
|
|
127
|
+
for (const entry of fs.readdirSync(skillsSrc, { withFileTypes: true })) {
|
|
128
|
+
if (!entry.isDirectory()) continue;
|
|
129
|
+
if (entry.name === '_shared') continue;
|
|
130
|
+
if (entry.name === 'profiles' || entry.name === 'scripts') continue;
|
|
131
|
+
if (!entry.name.startsWith('cm-')) continue;
|
|
132
|
+
|
|
133
|
+
const srcSkill = path.join(skillsSrc, entry.name);
|
|
134
|
+
const dstSkill = path.join(skillsDst, entry.name);
|
|
135
|
+
const skillMd = path.join(srcSkill, 'SKILL.md');
|
|
136
|
+
if (!fs.existsSync(skillMd)) continue;
|
|
137
|
+
|
|
138
|
+
copyFile(skillMd, path.join(dstSkill, 'SKILL.md'));
|
|
139
|
+
skillCount++;
|
|
140
|
+
|
|
141
|
+
const refDir = path.join(srcSkill, 'references');
|
|
142
|
+
if (fs.existsSync(refDir) && fs.statSync(refDir).isDirectory()) {
|
|
143
|
+
refFileCount += copyDirAll(refDir, path.join(dstSkill, 'references'));
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
console.log(` ✓ skills/ (${skillCount} skills, ${refFileCount} reference files)`);
|
|
147
|
+
|
|
148
|
+
// _shared (helpers, conventions, template) — needed by skill execution
|
|
149
|
+
const sharedCount = copyDirAll(
|
|
150
|
+
path.join(skillsSrc, '_shared'),
|
|
151
|
+
path.join(skillsDst, '_shared'),
|
|
152
|
+
(_, name) => name.endsWith('.md'),
|
|
153
|
+
);
|
|
154
|
+
console.log(` ✓ skills/_shared/ (${sharedCount} files)`);
|
|
155
|
+
|
|
156
|
+
// skills/config.schema.json (referenced by some skills)
|
|
157
|
+
const schemaSrc = path.join(skillsSrc, 'config.schema.json');
|
|
158
|
+
if (fs.existsSync(schemaSrc)) {
|
|
159
|
+
copyFile(schemaSrc, path.join(skillsDst, 'config.schema.json'));
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// ── 6. README (concise, plugin-scoped) ───────────────────────────────────────
|
|
163
|
+
const readme = `# CodyMaster Claude Plugin (cm) v${VERSION}
|
|
164
|
+
|
|
165
|
+
50+ AI agent skills for disciplined, token-efficient development with Claude Code.
|
|
166
|
+
|
|
167
|
+
## What's inside
|
|
168
|
+
- **${skillCount} skills** in \`skills/\` — Each skill is a focused SKILL.md (Layer-3, loaded on demand).
|
|
169
|
+
- **${cmdCount} slash commands** in \`commands/\` — \`/plan\`, \`/build\`, \`/review\`, \`/deploy\`, etc.
|
|
170
|
+
- **${agentCount} sub-agents** in \`agents/\` — engineer, architect, pm, reviewer, security.
|
|
171
|
+
- **MCP server** \`cm-context\` — context bus, skill index, learnings (\`dist/mcp-context-server.js\`).
|
|
172
|
+
|
|
173
|
+
## Token-efficiency
|
|
174
|
+
- Skills use Layer-1 / Layer-2 / Layer-3 progressive disclosure (\`cm-skill-index\`).
|
|
175
|
+
- Layer-1 index (~100 tok) loads at session start; SKILL.md only on trigger.
|
|
176
|
+
- This pack ships **only** \`SKILL.md\` + \`references/\` per skill — tests, scripts,
|
|
177
|
+
examples, generated output, and localized READMEs are excluded to keep the
|
|
178
|
+
on-disk footprint small and Claude's file-discovery cheap.
|
|
179
|
+
|
|
180
|
+
## Quick start
|
|
181
|
+
\`\`\`
|
|
182
|
+
/cm-start <your objective>
|
|
183
|
+
\`\`\`
|
|
184
|
+
See \`skills/cm-how-it-work/SKILL.md\` for the full workflow.
|
|
185
|
+
|
|
186
|
+
## Repository
|
|
187
|
+
https://github.com/tody-agent/codymaster
|
|
188
|
+
`;
|
|
189
|
+
fs.writeFileSync(path.join(stagingRoot, 'README.md'), readme);
|
|
190
|
+
console.log(' ✓ README.md');
|
|
191
|
+
|
|
192
|
+
// ── 7. Zip ───────────────────────────────────────────────────────────────────
|
|
193
|
+
console.log('\n📐 Creating cm.plugin (zip)…');
|
|
194
|
+
execFileSync(
|
|
195
|
+
'zip',
|
|
196
|
+
['-rq', outFile, '.claude-plugin', 'commands', 'agents', '.mcp.json', 'dist', 'skills', 'package.json', 'README.md'],
|
|
197
|
+
{ cwd: stagingRoot, stdio: 'inherit' },
|
|
198
|
+
);
|
|
199
|
+
|
|
200
|
+
// ── 8. Cleanup + report ──────────────────────────────────────────────────────
|
|
201
|
+
const stats = fs.statSync(outFile);
|
|
202
|
+
const sizeMB = (stats.size / (1024 * 1024)).toFixed(2);
|
|
203
|
+
fs.rmSync(stagingRoot, { recursive: true, force: true });
|
|
204
|
+
|
|
205
|
+
console.log(`\n✅ cm.plugin built — ${sizeMB} MB`);
|
|
206
|
+
console.log(` ${outFile}`);
|