{"_id":"@rikaidev/cortex","_rev":"70-4bdb4b6085d1f61a90752e7504e9b1e8","name":"@rikaidev/cortex","dist-tags":{"latest":"0.12.0"},"versions":{"0.11.3":{"name":"@rikaidev/cortex","version":"0.11.3","keywords":["ai","collaboration","prompt-injection","preference-learning","structured-thinking","development-workflow","cortex-ai","real-time-learning","cross-platform-ai"],"author":{"name":"RikaiDev"},"license":"MIT","_id":"@rikaidev/cortex@0.11.3","maintainers":[{"name":"gloomcheng","email":"gloomcheng@gmail.com"}],"homepage":"https://github.com/RikaiDev/cortex","bugs":{"url":"https://github.com/RikaiDev/cortex/issues"},"bin":{"cortex":"dist/cli/index.js","cortex-mcp":"scripts/mcp-server.js"},"dist":{"shasum":"39bb9943e336f487ad6acf2aa00bff316dc88c0c","tarball":"https://registry.npmjs.org/@rikaidev/cortex/-/cortex-0.11.3.tgz","fileCount":154,"integrity":"sha512-5I8h8zMekV27OgJSxZGzT3uPhVmOas6HqJYKLujqCTznq2CLzyGGYNo5vBubiAKGrgsrMEACzD5hamrllLdQ9A==","signatures":[{"sig":"MEUCIGFoVkuqOAqZbsGiTHzIPQ/xoOM2Wuy4aE2qflUGaVSgAiEAuviaPzvLPi9+Y7J6hM7pNoFdgg5kfj1MKryo4+YRi9c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":932077},"main":"dist/index.js","type":"module","engines":{"node":">=18.0.0"},"gitHead":"c67316e49c6b57eef56b6b2df44e9331a39a6562","scripts":{"dev":"tsc --watch","mcp":"node scripts/mcp-server.js","knip":"knip","lint":"npm run quality -- --fix","test":"echo 'No specific unit tests configured'","build":"npm run knip || exit 1; tsc || exit 1","clean":"rm -rf .cortex","mcp:dev":"node scripts/mcp-server.js --dev","quality":"node scripts/quality-check.js","test:all":"npm run test && npm run test:cli && npm run test:mcp","test:cli":"tsx test/cli-integration.test.ts","test:mcp":"tsx test/mcp-server-integration.test.ts","mcp:debug":"node --inspect scripts/mcp-server.js --debug","unpublish":"./scripts/release.sh unpublish","release:major":"node scripts/publish-workflow.cjs major","release:minor":"node scripts/publish-workflow.cjs minor","release:patch":"node scripts/publish-workflow.cjs patch","prepublishOnly":"node -e \"console.error('❌ RELEASE WORKFLOW VIOLATION!\\n\\nYou must use the proper release workflow:\\n  npm run release:patch    # for patch releases\\n  npm run release:minor    # for minor releases\\n  npm run release:major    # for major releases\\n\\nDirect npm publish is blocked to ensure quality and consistency.\\n'); process.exit(1);\"","demo:multi-role":"node examples/integrated-multi-role-demo.js"},"_npmUser":{"name":"gloomcheng","email":"gloomcheng@gmail.com"},"repository":{"url":"git+https://github.com/RikaiDev/cortex.git","type":"git"},"_npmVersion":"11.6.0","description":"Cortex AI - AI Collaboration Brain with real-time preference learning and structured thinking","directories":{},"_nodeVersion":"24.9.0","dependencies":{"uuid":"^13.0.0","chalk":"^5.0.0","fs-extra":"^11.0.0","commander":"^11.0.0","typescript":"^5.0.0","markdownlint-cli":"^0.45.0","@modelcontextprotocol/sdk":"^1.17.1"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.20.3","chai":"^5.2.1","knip":"^5.64.1","mocha":"^11.7.1","eslint":"^8.0.0","@types/chai":"^5.2.2","@types/node":"^20.0.0","@types/mocha":"^10.0.10","@types/fs-extra":"^11.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cortex_0.11.3_1759641990973_0.9197623924057929","host":"s3://npm-registry-packages-npm-production"},"deprecated":"已廢棄。AI 模型已原生支援這些功能，請使用 Claude Code / Gemini CLI / OpenCode。"},"0.11.4":{"name":"@rikaidev/cortex","version":"0.11.4","keywords":["ai","collaboration","prompt-injection","preference-learning","structured-thinking","development-workflow","cortex-ai","real-time-learning","cross-platform-ai"],"author":{"name":"RikaiDev"},"license":"MIT","_id":"@rikaidev/cortex@0.11.4","maintainers":[{"name":"gloomcheng","email":"gloomcheng@gmail.com"}],"homepage":"https://github.com/RikaiDev/cortex","bugs":{"url":"https://github.com/RikaiDev/cortex/issues"},"bin":{"cortex":"dist/cli/index.js"},"dist":{"shasum":"5668736c56817ab6359b9c8762be7c780906f93d","tarball":"https://registry.npmjs.org/@rikaidev/cortex/-/cortex-0.11.4.tgz","fileCount":153,"integrity":"sha512-IM3O8tPdDRvPNj/HFJTK4jYOX0Re5jQO+/FavyKz73cnN5XcBfvUK2aRM80JeObshjp7xgQIhxs4G3YBCVeI1w==","signatures":[{"sig":"MEUCIQD0RLSQck8l9Cyj6Ys2Omzbq19sGqvB/Se782JdubjumgIgI4J/wZqlyQHcpiVU0FQz7dqeIJoK0LPDdP+hR0GXghA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":930566},"main":"dist/index.js","type":"module","engines":{"node":">=18.0.0"},"gitHead":"39cbe35bae2b25c52eca6bf2b166cabe4c98314c","scripts":{"dev":"tsc --watch","knip":"knip","lint":"npm run quality -- --fix","test":"echo 'No specific unit tests configured'","build":"npm run knip || exit 1; tsc || exit 1","clean":"rm -rf .cortex","quality":"node scripts/quality-check.js","test:all":"npm run test && npm run test:cli","test:cli":"tsx test/cli-integration.test.ts","unpublish":"npm unpublish","release:major":"node scripts/publish-workflow.cjs major","release:minor":"node scripts/publish-workflow.cjs minor","release:patch":"node scripts/publish-workflow.cjs patch","prepublishOnly":"node -e \"console.error('❌ RELEASE WORKFLOW VIOLATION!\\n\\nYou must use the proper release workflow:\\n  npm run release:patch    # for patch releases\\n  npm run release:minor    # for minor releases\\n  npm run release:major    # for major releases\\n\\nDirect npm publish is blocked to ensure quality and consistency.\\n'); process.exit(1);\""},"_npmUser":{"name":"gloomcheng","email":"gloomcheng@gmail.com"},"repository":{"url":"git+https://github.com/RikaiDev/cortex.git","type":"git"},"_npmVersion":"11.6.0","description":"Cortex AI - AI Collaboration Brain with real-time preference learning and structured thinking","directories":{},"_nodeVersion":"24.9.0","dependencies":{"uuid":"^13.0.0","chalk":"^5.0.0","fs-extra":"^11.0.0","commander":"^11.0.0","typescript":"^5.0.0","markdownlint-cli":"^0.45.0","@modelcontextprotocol/sdk":"^1.17.1"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.20.3","chai":"^5.2.1","knip":"^5.64.1","mocha":"^11.7.1","eslint":"^8.0.0","@types/chai":"^5.2.2","@types/node":"^20.0.0","@types/mocha":"^10.0.10","@types/fs-extra":"^11.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cortex_0.11.4_1760017486371_0.31234199951428643","host":"s3://npm-registry-packages-npm-production"},"deprecated":"已廢棄。AI 模型已原生支援這些功能，請使用 Claude Code / Gemini CLI / OpenCode。"},"0.11.5":{"name":"@rikaidev/cortex","version":"0.11.5","keywords":["ai","collaboration","prompt-injection","preference-learning","structured-thinking","development-workflow","cortex-ai","real-time-learning","cross-platform-ai"],"author":{"name":"RikaiDev"},"license":"MIT","_id":"@rikaidev/cortex@0.11.5","maintainers":[{"name":"gloomcheng","email":"gloomcheng@gmail.com"}],"homepage":"https://github.com/RikaiDev/cortex","bugs":{"url":"https://github.com/RikaiDev/cortex/issues"},"bin":{"cortex":"dist/cli/index.js"},"dist":{"shasum":"4de0eef011c96c3d2428788e18fa00e48ec1cf37","tarball":"https://registry.npmjs.org/@rikaidev/cortex/-/cortex-0.11.5.tgz","fileCount":153,"integrity":"sha512-79aO08t1RIQ7mqz3YklHQhMKcmo+GtotBmK/H3wdK2uA5R1BhLWy4KQiHEhOnQZwEe5BzCkPAOamgtwg1rlc5Q==","signatures":[{"sig":"MEUCIQCY3RffOeAwIiTitfSl5aSLWs6z7Iuhgq+BELFRzzse7wIgRqOpb6E3qzZ/OJdQtEMc54FIA0VjLv4edQrwEyGVyvU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":932801},"main":"dist/index.js","type":"module","engines":{"node":">=18.0.0"},"gitHead":"5b4b94809ecaf441494d4bcf5ea77e4928eb4f96","scripts":{"dev":"tsc --watch","knip":"knip","lint":"npm run quality -- --fix","test":"echo 'No specific unit tests configured'","build":"npm run knip || exit 1; tsc || exit 1","clean":"rm -rf .cortex","quality":"node scripts/quality-check.js","test:all":"npm run test && npm run test:cli","test:cli":"tsx test/cli-integration.test.ts","unpublish":"npm unpublish","release:major":"node scripts/publish-workflow.cjs major","release:minor":"node scripts/publish-workflow.cjs minor","release:patch":"node scripts/publish-workflow.cjs patch","prepublishOnly":"node -e \"console.error('❌ RELEASE WORKFLOW VIOLATION!\\n\\nYou must use the proper release workflow:\\n  npm run release:patch    # for patch releases\\n  npm run release:minor    # for minor releases\\n  npm run release:major    # for major releases\\n\\nDirect npm publish is blocked to ensure quality and consistency.\\n'); process.exit(1);\""},"_npmUser":{"name":"gloomcheng","email":"gloomcheng@gmail.com"},"repository":{"url":"git+https://github.com/RikaiDev/cortex.git","type":"git"},"_npmVersion":"11.6.0","description":"Cortex AI - AI Collaboration Brain with real-time preference learning and structured thinking","directories":{},"_nodeVersion":"24.9.0","dependencies":{"uuid":"^13.0.0","chalk":"^5.0.0","fs-extra":"^11.0.0","commander":"^11.0.0","typescript":"^5.0.0","markdownlint-cli":"^0.45.0","@modelcontextprotocol/sdk":"^1.17.1"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.20.3","chai":"^5.2.1","knip":"^5.64.1","mocha":"^11.7.1","eslint":"^8.0.0","@types/chai":"^5.2.2","@types/node":"^20.0.0","@types/mocha":"^10.0.10","@types/fs-extra":"^11.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cortex_0.11.5_1760018057863_0.7016594007858874","host":"s3://npm-registry-packages-npm-production"},"deprecated":"已廢棄。AI 模型已原生支援這些功能，請使用 Claude Code / Gemini CLI / OpenCode。"},"0.12.0":{"name":"@rikaidev/cortex","version":"0.12.0","keywords":["ai","collaboration","prompt-injection","preference-learning","structured-thinking","development-workflow","cortex-ai","real-time-learning","cross-platform-ai"],"author":{"name":"RikaiDev"},"license":"MIT","_id":"@rikaidev/cortex@0.12.0","maintainers":[{"name":"gloomcheng","email":"gloomcheng@gmail.com"}],"homepage":"https://github.com/RikaiDev/cortex","bugs":{"url":"https://github.com/RikaiDev/cortex/issues"},"bin":{"cortex":"dist/cli/index.js"},"dist":{"shasum":"a97fb22a14d5df99824be813128dff088c0d05e0","tarball":"https://registry.npmjs.org/@rikaidev/cortex/-/cortex-0.12.0.tgz","fileCount":611,"integrity":"sha512-EQwNZ+X2tHwuDeG1HESzYSw/MO9+M3fj920+JH1kFqWBgaTZpe9NK2GhMBtqFNQaGjGCYwL/xrRbPaxt6PCUvw==","signatures":[{"sig":"MEUCIQDA/mxpFiq6xaEaP81WP64R9HpMLZXqCTbnyGRok5CH6AIgVcIVlnLmVpdzCR9sN2l4Gnf0noq9CmMVNoQNopOrb+Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3402850},"main":"dist/index.js","type":"module","engines":{"node":">=18.0.0"},"gitHead":"45f7f2f9848f1bb5089cd33823cb5e5bd966a71a","scripts":{"dev":"tsc --watch","knip":"knip","lint":"eslint \"src/**/*.ts\" \"scripts/**/*.js\" --max-warnings 0","test":"vitest run","build":"npm run lint && npm run knip && npm run compile","compile":"tsc","quality":"node scripts/quality-check.js","lint:fix":"eslint \"src/**/*.ts\" \"scripts/**/*.js\" --fix","test:cli":"node dist/cli/index.js --help && node dist/core/mcp/server.js --version","test:watch":"vitest","release:major":"node scripts/publish-workflow.cjs major","release:minor":"node scripts/publish-workflow.cjs minor","release:patch":"node scripts/publish-workflow.cjs patch","test:coverage":"vitest run --coverage","prepublishOnly":"node -e \"console.error('❌ RELEASE WORKFLOW VIOLATION!\\n\\nYou must use the proper release workflow:\\n  npm run release:patch    # for patch releases\\n  npm run release:minor    # for minor releases\\n  npm run release:major    # for major releases\\n\\nDirect npm publish is blocked to ensure quality and consistency.\\n'); process.exit(1);\""},"_npmUser":{"name":"gloomcheng","email":"gloomcheng@gmail.com"},"repository":{"url":"git+https://github.com/RikaiDev/cortex.git","type":"git"},"_npmVersion":"11.6.2","description":"Cortex AI - AI Collaboration Brain with real-time preference learning and structured thinking","directories":{},"_nodeVersion":"25.0.0","dependencies":{"uuid":"^13.0.0","chalk":"^5.0.0","fs-extra":"^11.0.0","commander":"^11.0.0","typescript":"^5.0.0","markdownlint-cli":"^0.47.0","reflect-metadata":"^0.2.2","@modelcontextprotocol/sdk":"^1.17.1"},"_hasShrinkwrap":false,"devDependencies":{"knip":"^5.64.1","eslint":"^8.0.0","vitest":"^4.0.16","prettier":"^3.0.0","@types/node":"^20.0.0","@types/fs-extra":"^11.0.0","@vitest/coverage-v8":"^4.0.16","@typescript-eslint/parser":"^8.0.0","@typescript-eslint/eslint-plugin":"^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cortex_0.12.0_1766744847352_0.3094366797733299","host":"s3://npm-registry-packages-npm-production"},"deprecated":"已廢棄。AI 模型已原生支援這些功能，請使用 Claude Code / Gemini CLI / OpenCode。"}},"time":{"created":"2025-07-28T17:20:40.433Z","modified":"2026-03-13T18:18:00.920Z","0.3.1":"2025-07-28T17:20:40.840Z","0.3.2":"2025-07-28T17:27:50.535Z","0.3.3":"2025-07-28T17:31:02.282Z","0.3.4":"2025-07-28T17:33:00.797Z","0.3.5":"2025-07-28T17:34:27.449Z","0.4.0":"2025-07-29T02:13:57.236Z","0.4.1":"2025-07-29T02:27:38.185Z","0.4.2":"2025-07-29T02:39:47.573Z","0.4.3":"2025-07-29T03:09:08.509Z","0.4.4":"2025-07-29T03:41:08.530Z","0.6.0":"2025-07-29T18:27:47.861Z","0.6.2":"2025-08-01T07:21:04.204Z","0.6.1":"2025-08-01T07:33:12.395Z","0.7.0":"2025-08-03T09:52:48.267Z","0.7.1":"2025-08-03T10:32:30.637Z","0.7.2":"2025-08-03T12:52:59.469Z","0.7.3":"2025-08-04T14:06:06.890Z","0.8.0":"2025-08-31T19:34:23.114Z","0.8.1":"2025-09-01T01:21:37.680Z","0.8.2":"2025-09-01T04:06:38.009Z","0.8.3":"2025-09-04T11:58:49.623Z","0.8.4":"2025-09-05T09:17:41.428Z","0.9.0":"2025-10-01T15:50:26.230Z","0.9.7":"2025-10-01T17:34:57.195Z","0.10.0":"2025-10-02T09:22:59.642Z","0.10.1":"2025-10-02T14:24:27.062Z","0.10.2":"2025-10-02T14:43:15.847Z","0.10.5":"2025-10-02T16:49:06.196Z","0.10.6":"2025-10-02T17:07:48.857Z","0.11.0":"2025-10-03T16:50:21.332Z","0.11.1":"2025-10-04T19:06:56.238Z","0.11.2":"2025-10-05T05:18:04.618Z","0.11.3":"2025-10-05T05:26:31.257Z","0.11.4":"2025-10-09T13:44:46.560Z","0.11.5":"2025-10-09T13:54:18.096Z","0.12.0":"2025-12-26T10:27:27.584Z"},"bugs":{"url":"https://github.com/RikaiDev/cortex/issues"},"author":{"name":"RikaiDev"},"license":"MIT","homepage":"https://github.com/RikaiDev/cortex","keywords":["ai","collaboration","prompt-injection","preference-learning","structured-thinking","development-workflow","cortex-ai","real-time-learning","cross-platform-ai"],"repository":{"url":"git+https://github.com/RikaiDev/cortex.git","type":"git"},"description":"Cortex AI - AI Collaboration Brain with real-time preference learning and structured thinking","maintainers":[{"name":"gloomcheng","email":"gloomcheng@gmail.com"}],"readme":"# Cortex AI\n\n[![Version](https://img.shields.io/badge/version-v0.12.0-blue.svg)](https://github.com/RikaiDev/cortex/releases)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)\n[![MCP](https://img.shields.io/badge/protocol-MCP-purple.svg)](https://modelcontextprotocol.io)\n[![Tools](https://img.shields.io/badge/tools-72-orange.svg)](#-工具分類)\n\n[English](README.md) | [繁體中文](README.zh-TW.md) | [文檔](docs/)\n\n---\n\n## AI 編程助手的問題\n\n**Claude Code**、**Cursor**、**GitHub Copilot** 等 AI 編程助手功能強大，但它們有共同的致命缺陷：\n\n| 限制 | 影響 |\n|------|------|\n| **沒有記憶** | 每次對話都從零開始。過去的決策、模式、經驗教訓全部遺忘。 |\n| **沒有結構** | 輸出品質不穩定。同樣的 prompt → 每次結果都不同。 |\n| **沒有驗證** | 沒有品質把關。AI 可能產生不完整或不一致的程式碼。 |\n| **不了解影響** | AI 不知道變更會如何影響程式碼庫的其他部分。 |\n| **無法共享知識** | 每個開發者的學習各自獨立。沒有團隊智慧。 |\n| **沒有原則約束** | 無法跨對話強制執行編碼標準。 |\n\n**結果**：需要持續人工監督的「憑感覺編碼」。\n\n---\n\n## 解決方案：Cortex AI\n\n**Cortex AI** 是一個開發大腦，為任何 MCP 相容的 AI 助手擴展 **記憶、結構和智慧**。\n\n```\n┌─────────────────────────────────────────────────────────────────┐\n│                    您的 AI 助手                                  │\n│              (Claude Code / Cursor / Copilot)                   │\n└─────────────────────────┬───────────────────────────────────────┘\n                          │ MCP 協定\n                          ▼\n┌─────────────────────────────────────────────────────────────────┐\n│                      CORTEX AI                                  │\n│  ┌──────────────┐ ┌──────────────┐ ┌──────────────┐            │\n│  │   記憶       │ │   工作流程   │ │   分析       │            │\n│  │   系統       │ │   系統       │ │   引擎       │            │\n│  │              │ │              │ │              │            │\n│  │ • 模式       │ │ • 規格       │ │ • 安全       │            │\n│  │ • 決策       │ │ • 計畫       │ │ • 品質       │            │\n│  │ • 經驗       │ │ • 任務       │ │ • 影響       │            │\n│  │ • 解決方案   │ │ • 實施       │ │ • 覆蓋率     │            │\n│  └──────────────┘ └──────────────┘ └──────────────┘            │\n│  ┌──────────────┐ ┌──────────────┐ ┌──────────────┐            │\n│  │    團隊      │ │   憲章       │ │   環境       │            │\n│  │   知識庫     │ │   引擎       │ │   感知       │            │\n│  └──────────────┘ └──────────────┘ └──────────────┘            │\n└─────────────────────────────────────────────────────────────────┘\n```\n\n---\n\n## Cortex AI 為您的 AI 助手增加什麼\n\n### 1. 持久化記憶\n您的 AI 終於能記住了。模式、決策、解決方案和經驗教訓跨對話持久保存。\n\n```bash\n# AI 從這次對話學習\nlearn \"伺服器狀態用 React Query，客戶端狀態用 Zustand\"\n\n# 幾個月後，AI 自動回憶\ncontext \"狀態管理\"\n# → 返回：\"之前決定：伺服器狀態用 React Query...\"\n```\n\n### 2. 結構化工作流程\n透過階段式開發，將混亂轉變為可預測的交付。\n\n```\nspec → clarify → plan → review → tasks → implement → release\n         │          │          │           │\n         └──────────┴──────────┴───────────┘\n              每個關卡都需要用戶確認\n```\n\n### 3. 影響分析\nAI 在做變更前先了解您的程式碼庫結構。\n\n```bash\nimpact-analyze files:[\"src/auth/service.ts\"]\n# → 影響 23 個檔案\n# → 偵測到 2 個破壞性變更\n# → 風險等級：高\n# → 建議：先更新依賴方...\n```\n\n### 4. 程式碼智慧（72 個工具）\n安全掃描、品質分析、測試覆蓋率、架構驗證——全部內建。\n\n```bash\nsecurity-scan path:\"src/\"           # 找出漏洞\nquality-analyze path:\"src/\"         # 偵測程式碼異味\ntest-suggest path:\"src/services/\"   # 建議缺少的測試\narch-validate                       # 檢查架構規則\n```\n\n### 5. 團隊知識\n跨團隊分享學習成果。不再重複解決已解決的問題。\n\n```bash\nteam-share-insight \"外部服務的 API 限流模式\"\nteam-view-insights type:\"pattern\"\nteam-resolve-conflict  # 當團隊成員意見不同時\n```\n\n### 6. 憲章驅動開發\n定義一次專案原則。每個 AI 回應都遵守它們。\n\n```markdown\n<!-- .cortex/constitution.md -->\n## 原則\n- 所有函數必須有 JSDoc 註解\n- 生產程式碼禁止 console.log\n- 所有公開 API 都需要測試\n- 檔案最大行數：300 行\n```\n\n---\n\n## 快速開始\n\n### 1. 安裝\n\n```bash\nnpm install -g @rikaidev/cortex\n```\n\n### 2. 連接您的 AI 助手\n\n**Claude Code:**\n```bash\nclaude mcp add cortex -- npx -y @rikaidev/cortex@latest start\n```\n\n**Cursor:**\n```json\n// .cursor/mcp.json\n{\n  \"mcpServers\": {\n    \"cortex\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@rikaidev/cortex@latest\", \"start\"]\n    }\n  }\n}\n```\n\n### 3. 初始化您的專案\n\n```bash\ncd your-project\ncortex init\n```\n\n### 4. 開始建構\n\n```bash\n# 在您的 AI 助手中\nspec \"新增 OAuth 用戶驗證\"\n```\n\n---\n\n## 工具分類\n\nCortex 提供 **72 個專業工具**，分為 16 個類別：\n\n| 類別 | 工具 | 用途 |\n|------|------|------|\n| **工作流程** | `spec` `clarify` `plan` `review` `tasks` `implement` `status` `list` | 結構化功能開發 |\n| **記憶** | `learn` `context` `correct` | 持久化知識管理 |\n| **影響分析** | `impact-analyze` `impact-preview` `impact-validate` `impact-stats` `impact-build-graph` | 變更影響評估 |\n| **程式碼品質** | `quality-analyze` `quality-complexity` `quality-duplicates` `quality-refactor` | 程式碼異味偵測 |\n| **安全** | `security-scan` `security-detect-secrets` `security-check-deps` | 漏洞掃描 |\n| **測試覆蓋** | `test-analyze` `test-quality` `test-suggest` `test-untested` | 測試缺口識別 |\n| **架構** | `arch-validate` `arch-check` `arch-suggest` | 模式驗證 |\n| **文檔** | `doc-analyze` `doc-validate` `doc-missing` `doc-generate` | 文檔品質 |\n| **CI/CD** | `ci-status` `ci-failures` `ci-validate` `ci-history` | 流水線分析 |\n| **依賴** | `dependency-analyze` `dependency-check` `dependency-suggest` `dependency-version` | 依賴健康 |\n| **效能** | `performance-analyze` `performance-*-pattern` | 反模式偵測 |\n| **環境** | `environment-detect` `environment-add` `environment-list` `environment-check` `environment-remove` | 運行時約束 |\n| **團隊** | `team-share-insight` `team-view-insights` `team-learn-pr` `team-*-conflict` `team-stats` `team-sync` | 團隊協作 |\n| **PR 審查** | `pr-auto-review` `pr-checklist` `pr-suggest-reviewers` | Pull Request 分析 |\n| **檢查點** | `checkpoint-save` `checkpoint-list` `checkpoint-resume` `checkpoint-clear` | 工作流程快照 |\n| **專案** | `constitution` `onboard` `release` `mark-danger` `unmark-danger` `list-dangers` | 專案管理 |\n\n---\n\n## 工作流程系統\n\n### 從想法到實現\n\n```mermaid\nflowchart LR\n    A[想法] --> B[spec]\n    B --> C{清楚？}\n    C -->|否| D[clarify]\n    D --> B\n    C -->|是| E[plan]\n    E --> F{批准？}\n    F -->|否| G[review]\n    G --> E\n    F -->|是| H[tasks]\n    H --> I[implement]\n    I --> J{發布？}\n    J -->|是| K[release]\n    K --> L[完成]\n    J -->|否| L\n```\n\n### 範例對話\n\n```bash\n# 1. 定義您要建構什麼\n> spec \"新增 WebSocket 即時通知\"\n✓ 建立工作流程：001-realtime-notifications\n✓ 生成：spec.md, checklists/requirements.md\n\n# 2. 釐清模糊之處（AI 問針對性問題）\n> clarify\n? 用戶離線時通知是否應該持久化？\n> 是，排隊並在重新連接時發送\n✓ 更新：spec.md\n\n# 3. 建立技術計畫\n> plan\n✓ 生成：plan.md, CONTEXT.md, checklists/design.md\n✓ 記憶已更新技術棧決策\n\n# 4. 分解為任務\n> tasks\n✓ 生成：tasks.md, checklists/tasks.md\n✓ 識別 3 個可並行的任務群組\n\n# 5. 實施\n> implement\n✓ 預檢：.gitignore 已驗證，依賴已檢查\n✓ 執行任務並進行品質驗證...\n✓ 學習已提取並儲存\n\n# 6. 發布\n> release\n✓ 分析：12 個 commits，3 個 workflows\n✓ 生成：CHANGELOG.md, RELEASE_NOTES.md\n```\n\n---\n\n## 為什麼這很重要\n\n### 使用 Cortex AI 之前\n\n```\n開發者：\"新增驗證功能\"\nAI：*生成程式碼*\n開發者：\"等等，這跟我們的模式不一致\"\nAI：*生成不同的程式碼*\n開發者：\"你弄壞了 user service\"\nAI：\"我看不出它們有什麼關聯\"\n開發者：*嘆氣，手動修復*\n```\n\n### 使用 Cortex AI 之後\n\n```\n開發者：\"新增驗證功能\"\n\nCortex：\n├─ 記憶：\"專案 X 的驗證模式使用 JWT + refresh tokens\"\n├─ 影響：\"將影響：UserService、SessionMiddleware、12 個路由\"\n├─ 憲章：\"根據專案規則必須包含限流\"\n├─ 安全：\"檢查常見驗證漏洞...\"\n└─ 品質：\"依據測試覆蓋要求生成\"\n\nAI：*生成一致、經過驗證、了解影響的程式碼*\n```\n\n---\n\n## 專案結構\n\n```\n.cortex/\n├── constitution.md          # 您的專案原則\n├── memory/\n│   └── index.json          # 持久化知識庫\n├── templates/              # 工作流程模板\n│   └── commands/           # AI 執行指南\n└── workflows/\n    └── 001-feature/        # 個別工作流程\n        ├── spec.md\n        ├── plan.md\n        ├── tasks.md\n        └── checklists/     # 自動生成的驗證\n```\n\n---\n\n## 與其他方案比較\n\n| 功能 | Cortex AI | 原生 AI | 自訂 Prompts | 其他工具 |\n|------|-----------|---------|--------------|----------|\n| 持久化記憶 | ✅ | ❌ | ❌ | 部分 |\n| 結構化工作流程 | ✅ | ❌ | 手動 | ❌ |\n| 影響分析 | ✅ | ❌ | ❌ | 有限 |\n| 安全掃描 | ✅ | ❌ | ❌ | 獨立工具 |\n| 團隊知識 | ✅ | ❌ | ❌ | ❌ |\n| 品質把關 | ✅ | ❌ | 手動 | ❌ |\n| 跨平台 | ✅ (MCP) | 不一定 | 不一定 | 不一定 |\n| 零配置 | ✅ | ✅ | ❌ | ❌ |\n\n---\n\n## 設計理念\n\n### 模板 + 命令 = 穩定輸出\n\n受 [GitHub 的 spec-kit](https://github.com/github/spec-kit) 啟發，Cortex 透過結構化模板和執行命令確保可預測的 AI 輸出。\n\n### 憲章驅動開發\n\n每個 AI 回應都根據您的專案原則進行驗證。不再有風格指南違規或模式不一致。\n\n### 學一次，永遠記住\n\n每個決策、模式和經驗教訓都被捕獲。您的 AI 隨著每次對話變得更聰明。\n\n### 每個關卡都有用戶控制\n\nAI 提議，人類批准。強制檢查點防止失控的程式碼生成。\n\n---\n\n## 系統需求\n\n- Node.js 18+\n- MCP 相容的 AI 助手（Claude Code、Cursor 或任何 MCP 客戶端）\n\n---\n\n## 貢獻\n\n我們歡迎貢獻！請參見 [CONTRIBUTING.md](CONTRIBUTING.md)。\n\n---\n\n## 授權\n\nMIT License - 詳見 [LICENSE](LICENSE)。\n\n---\n\n## 連結\n\n- [文檔](docs/)\n- [GitHub Issues](https://github.com/RikaiDev/cortex/issues)\n- [更新日誌](CHANGELOG.md)\n\n---\n\n<p align=\"center\">\n  <strong>停止憑感覺編碼。開始用智慧建構。</strong>\n</p>\n","readmeFilename":"README.zh-TW.md"}