[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ECHPJKMJR163FQPBFST99M":3,"skill-same:01M7ECHPJKMJR163FQPBFST99M":49},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":20,"frontMatter":21,"refName":22,"commitSha":23,"skillDirectory":24,"forksCount":13,"repositoryHtmlUrl":25,"repositoryHomepageUrl":6,"ownerHtmlUrl":26,"ownerBlogUrl":6,"ownerDescription":27,"updatedAt":28,"install":29,"resources":42},"01M7ECHPJKMJR163FQPBFST99M","cortexcloud-formulate",null,"jonahthan433\u002FCortexOS","jonahthan433","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F211465495?v=4","01M7ECH9HPHGA89DCXHHJBTS3C","jonah.ai","01M7ECH9JCEM45DZMWPT7148S1",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fimported\u002F.archive\u002Fcortexcloud-formulate\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"# cortexcloud-formulate\n\n# CortexCloud Formulate\n\nDomain-to-QUBO adapter library for the CortexCloud optimization API. One function per problem domain — takes real-world objects (returns, distances, shifts, blocks) and emits QUBO matrices that can be sent directly to `POST https:\u002F\u002Fapi.cortexcloud.org\u002Fv1\u002Foptimize`.\n\n**Repo:** https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002Fcortexcloud-formulate\n**Install:** Copy `cortexcloud_formulate.py` + `pip install numpy`. Single file, no framework dependencies.\n\n## Domains Covered\n\n| Function | Problem | Input |\n|----------|---------|-------|\n| `portfolio()` | Cardinality-constrained Markowitz | Returns, covariance, K |\n| `tsp()` | Travelling salesman (time-indexed) | Distance matrix |\n| `assignment()` | Task\u002Fworker or SKU\u002Fwarehouse | Cost matrix |\n| `scheduling()` | Single-machine scheduling | Processing times, deadlines |\n| `nurse_scheduling()` | Nurse-to-shift preference allocation | Preference matrix |\n| `mining_cutoff()` | Open-pit block extraction | Grades, precedence edges |\n| `unit_commitment()` | Generator dispatch | Profits matrix, startup costs |\n| `maxcut()` | Graph MAX-CUT | Adjacency matrix |\n| `crop_allocation()` | Field crop allocation | Yields, adjacency edges |\n\n## Usage Pattern\n\n```python\nfrom cortexcloud_formulate import portfolio, solve\nimport numpy as np\n\nreturns = np.array([0.05, -0.02, 0.03, -0.04, 0.01, 0.02])\ncov = np.diag([0.01, 0.02, 0.015, 0.025, 0.01, 0.02])\nproblem = portfolio(returns, cov, cardinality=3)\n\nresult = solve(problem)\nprint(result[\"recommendation\"][\"solver_id\"])   # \"brute-force\"\nprint(result[\"recommendation\"][\"cortexcloud_price_usd\"])  # 0.05\n```\n\n## Key Design Decisions\n\n- Only QUBO encoding, no solver logic. CortexCloud handles solver selection, routing, and execution.\n- Constraint penalties auto-scaled proportionally to objective values.\n- n = variables² for time-indexed formulations (TSP, scheduling). Keep small for exact solvers.\n- All formulations minimise — profits are negated, costs stay positive.\n\n## Testing\n\n```bash\ncd cortexcloud-formulate && source .venv\u002Fbin\u002Factivate\npython -c \"from cortexcloud_formulate import *; print('ok')\"\npython tests\u002Fdemo.py\n```\n\n## Venv\n\nLocal `.venv` (Python 3.12, numpy 2.5.2) via `uv venv && uv pip install numpy`.\n\n## See Also\n\n- `cortexcloud-platform` skill — API architecture, deploy, router bugs\n- `references\u002Fbenchmarks-trial-endpoints.md` in cortexcloud-platform\n",{},"main","38b32c99e7ed0b8e215d638e92cfa452c1ec3079","skills\u002Fimported\u002F.archive\u002Fcortexcloud-formulate","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS","https:\u002F\u002Fgithub.com\u002Fjonahthan433","AI Consultant","2026-10-24 05:13:39",{"source":7,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add jonahthan433\u002FCortexOS --skill cortexcloud-formulate",{"tool":35,"command":36},"bunx","bunx skills add jonahthan433\u002FCortexOS --skill cortexcloud-formulate",{"tool":38,"command":39},"pnpm","pnpm dlx skills add jonahthan433\u002FCortexOS --skill cortexcloud-formulate","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fimported\u002F.archive\u002Fcortexcloud-formulate\u002FSKILL.md",true,[43],{"path":44,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":47,"sourceHtmlUrl":48},"skill.json","REFERENCE","参考文档",362,"https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fimported\u002F.archive\u002Fcortexcloud-formulate\u002Fskill.json",[50,56,62,68,74,80],{"skillNo":51,"name":52,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":18},"01M7EDQZDQX3Q8Y7GCQX6KN9V7","opportunity-brief","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fsales\u002Fopportunity-brief\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":18},"01M7EDQYA0V9Y99VKBREJJ3MRT","morning-intel","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fmorning-intel\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M7EDQVX1JVY0B6PDHKKGM19G","decision-brief","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fdecision-brief\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M7EDQV1GENZAC2SZSD8KZ3GM","weekly-review","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fproductivity\u002Fweekly-review\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M7EDQT2KETJ1Y3CGVN9EKW2J","system-health","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fops\u002Fsystem-health\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":18},"01M7EDQQN2JK3XPWMS1M4T0F3K","backup-restore","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fops\u002Fbackup-restore\u002FSKILL.md",[],[]]