zcode-expert-system 0.0.0-stage → 3.2.2

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.
Files changed (457) hide show
  1. package/.zcode-plugin/plugin.json +25 -0
  2. package/LICENSE +30 -0
  3. package/README.md +680 -2
  4. package/README_CN.md +587 -0
  5. package/SKILL.md +357 -0
  6. package/agents/expert-academic-anthropologist.md +124 -0
  7. package/agents/expert-academic-geographer.md +126 -0
  8. package/agents/expert-academic-historian.md +122 -0
  9. package/agents/expert-academic-narratologist.md +117 -0
  10. package/agents/expert-academic-psychologist.md +117 -0
  11. package/agents/expert-academic-statistician.md +40 -0
  12. package/agents/expert-academic-study-planner.md +262 -0
  13. package/agents/expert-accounts-payable-agent.md +102 -0
  14. package/agents/expert-agentic-identity-trust.md +388 -0
  15. package/agents/expert-agents-orchestrator.md +366 -0
  16. package/agents/expert-authenticity-appraiser.md +38 -0
  17. package/agents/expert-automation-governance-architect.md +215 -0
  18. package/agents/expert-blender-addon-engineer.md +233 -0
  19. package/agents/expert-business-strategist.md +487 -0
  20. package/agents/expert-change-management-consultant.md +495 -0
  21. package/agents/expert-chief-executive-officer.md +104 -0
  22. package/agents/expert-chief-financial-officer.md +390 -0
  23. package/agents/expert-chief-marketing-officer.md +95 -0
  24. package/agents/expert-chief-of-staff.md +278 -0
  25. package/agents/expert-chief-operating-officer.md +88 -0
  26. package/agents/expert-chief-product-officer.md +91 -0
  27. package/agents/expert-chief-technology-officer.md +98 -0
  28. package/agents/expert-corporate-training-designer.md +191 -0
  29. package/agents/expert-customer-service.md +40 -0
  30. package/agents/expert-customer-success-manager.md +458 -0
  31. package/agents/expert-data-consolidation-agent.md +327 -0
  32. package/agents/expert-data-privacy-officer.md +411 -0
  33. package/agents/expert-design-brand-guardian.md +321 -0
  34. package/agents/expert-design-image-prompt-engineer.md +255 -0
  35. package/agents/expert-design-inclusive-visuals-specialist.md +177 -0
  36. package/agents/expert-design-persona-walkthrough.md +271 -0
  37. package/agents/expert-design-ui-designer.md +382 -0
  38. package/agents/expert-design-ui-finish-gate-reviewer.md +40 -0
  39. package/agents/expert-design-ux-architect.md +482 -0
  40. package/agents/expert-design-ux-researcher.md +328 -0
  41. package/agents/expert-design-video-prompt-engineer.md +110 -0
  42. package/agents/expert-design-visual-storyteller.md +159 -0
  43. package/agents/expert-design-whimsy-injector.md +453 -0
  44. package/agents/expert-economy-designer.md +40 -0
  45. package/agents/expert-engineering-ai-data-remediation-engineer.md +209 -0
  46. package/agents/expert-engineering-ai-engineer.md +161 -0
  47. package/agents/expert-engineering-api-platform-engineer.md +40 -0
  48. package/agents/expert-engineering-ats-validator-architect.md +38 -0
  49. package/agents/expert-engineering-autonomous-optimization-architect.md +115 -0
  50. package/agents/expert-engineering-backend-architect.md +234 -0
  51. package/agents/expert-engineering-china-network-engineer.md +33 -0
  52. package/agents/expert-engineering-cms-developer.md +534 -0
  53. package/agents/expert-engineering-code-reviewer.md +172 -0
  54. package/agents/expert-engineering-codebase-onboarding-engineer.md +172 -0
  55. package/agents/expert-engineering-data-engineer.md +324 -0
  56. package/agents/expert-engineering-data-visualization-engineer.md +40 -0
  57. package/agents/expert-engineering-database-optimizer.md +175 -0
  58. package/agents/expert-engineering-database-reliability-engineer.md +40 -0
  59. package/agents/expert-engineering-desktop-app-engineer.md +40 -0
  60. package/agents/expert-engineering-developer-tooling-engineer.md +40 -0
  61. package/agents/expert-engineering-devops-automator.md +375 -0
  62. package/agents/expert-engineering-dingtalk-integration-developer.md +574 -0
  63. package/agents/expert-engineering-drupal-performance.md +40 -0
  64. package/agents/expert-engineering-drupal-shopping-cart.md +359 -0
  65. package/agents/expert-engineering-email-intelligence-engineer.md +349 -0
  66. package/agents/expert-engineering-embedded-firmware-engineer.md +168 -0
  67. package/agents/expert-engineering-embedded-linux-driver-engineer.md +255 -0
  68. package/agents/expert-engineering-feishu-integration-developer.md +597 -0
  69. package/agents/expert-engineering-filament-optimization-specialist.md +283 -0
  70. package/agents/expert-engineering-finops-engineer.md +40 -0
  71. package/agents/expert-engineering-fpga-digital-design-engineer.md +227 -0
  72. package/agents/expert-engineering-frontend-developer.md +224 -0
  73. package/agents/expert-engineering-gaussdb-expert.md +40 -0
  74. package/agents/expert-engineering-git-workflow-master.md +220 -0
  75. package/agents/expert-engineering-i18n-engineer.md +40 -0
  76. package/agents/expert-engineering-identity-access-engineer.md +40 -0
  77. package/agents/expert-engineering-incident-response-commander.md +465 -0
  78. package/agents/expert-engineering-iot-fleet-engineer.md +40 -0
  79. package/agents/expert-engineering-iot-solution-architect.md +220 -0
  80. package/agents/expert-engineering-it-service-manager.md +560 -0
  81. package/agents/expert-engineering-knowledge-graph-engineer.md +40 -0
  82. package/agents/expert-engineering-llm-post-training-engineer.md +40 -0
  83. package/agents/expert-engineering-mechanical-design-engineer.md +311 -0
  84. package/agents/expert-engineering-minimal-change-engineer.md +206 -0
  85. package/agents/expert-engineering-mobile-app-builder.md +434 -0
  86. package/agents/expert-engineering-mobile-release-engineer.md +40 -0
  87. package/agents/expert-engineering-multi-agent-systems-architect.md +599 -0
  88. package/agents/expert-engineering-network-engineer-china.md +162 -0
  89. package/agents/expert-engineering-network-engineer.md +40 -0
  90. package/agents/expert-engineering-orgscript-engineer.md +112 -0
  91. package/agents/expert-engineering-payments-billing-engineer.md +40 -0
  92. package/agents/expert-engineering-pc-host-engineer.md +231 -0
  93. package/agents/expert-engineering-pdf-engine-architect.md +32 -0
  94. package/agents/expert-engineering-platform-engineer.md +32 -0
  95. package/agents/expert-engineering-privacy-engineer.md +40 -0
  96. package/agents/expert-engineering-prompt-engineer.md +203 -0
  97. package/agents/expert-engineering-rag-pipeline-engineer.md +40 -0
  98. package/agents/expert-engineering-rapid-prototyper.md +461 -0
  99. package/agents/expert-engineering-realtime-collaboration-engineer.md +40 -0
  100. package/agents/expert-engineering-rust-refactoring-specialist.md +40 -0
  101. package/agents/expert-engineering-search-relevance-engineer.md +40 -0
  102. package/agents/expert-engineering-section-508-specialist.md +40 -0
  103. package/agents/expert-engineering-security-engineer.md +303 -0
  104. package/agents/expert-engineering-senior-developer.md +177 -0
  105. package/agents/expert-engineering-servicenow-developer-mentor.md +32 -0
  106. package/agents/expert-engineering-software-architect.md +200 -0
  107. package/agents/expert-engineering-solidity-smart-contract-engineer.md +541 -0
  108. package/agents/expert-engineering-sre.md +233 -0
  109. package/agents/expert-engineering-technical-writer.md +409 -0
  110. package/agents/expert-engineering-threat-detection-engineer.md +553 -0
  111. package/agents/expert-engineering-universal-document-compiler.md +32 -0
  112. package/agents/expert-engineering-uswds-developer.md +40 -0
  113. package/agents/expert-engineering-video-streaming-engineer.md +40 -0
  114. package/agents/expert-engineering-voice-ai-integration-engineer.md +560 -0
  115. package/agents/expert-engineering-webassembly-engineer.md +40 -0
  116. package/agents/expert-engineering-wechat-mini-program-developer.md +288 -0
  117. package/agents/expert-engineering-wordpress-performance.md +40 -0
  118. package/agents/expert-engineering-wordpress-shopping-cart.md +345 -0
  119. package/agents/expert-esg-sustainability-officer.md +395 -0
  120. package/agents/expert-finance-bookkeeper-controller.md +271 -0
  121. package/agents/expert-finance-financial-analyst.md +244 -0
  122. package/agents/expert-finance-financial-forecaster.md +213 -0
  123. package/agents/expert-finance-fpa-analyst.md +272 -0
  124. package/agents/expert-finance-fraud-detector.md +241 -0
  125. package/agents/expert-finance-hk-stock-compliance-reviewer.md +316 -0
  126. package/agents/expert-finance-investment-researcher.md +283 -0
  127. package/agents/expert-finance-invoice-manager.md +242 -0
  128. package/agents/expert-finance-tax-strategist.md +250 -0
  129. package/agents/expert-game-audio-engineer.md +265 -0
  130. package/agents/expert-game-designer.md +168 -0
  131. package/agents/expert-gaokao-college-advisor.md +333 -0
  132. package/agents/expert-gis-3d-scene-developer.md +110 -0
  133. package/agents/expert-gis-analyst.md +90 -0
  134. package/agents/expert-gis-bim-specialist.md +107 -0
  135. package/agents/expert-gis-cartography-designer.md +149 -0
  136. package/agents/expert-gis-drone-reality-mapping.md +119 -0
  137. package/agents/expert-gis-geoai-ml-engineer.md +104 -0
  138. package/agents/expert-gis-geoprocessing-specialist.md +96 -0
  139. package/agents/expert-gis-qa-engineer.md +132 -0
  140. package/agents/expert-gis-solution-engineer.md +100 -0
  141. package/agents/expert-gis-spatial-data-engineer.md +96 -0
  142. package/agents/expert-gis-spatial-data-scientist.md +110 -0
  143. package/agents/expert-gis-technical-consultant.md +85 -0
  144. package/agents/expert-gis-web-gis-developer.md +107 -0
  145. package/agents/expert-godot-gameplay-scripter.md +335 -0
  146. package/agents/expert-godot-multiplayer-engineer.md +296 -0
  147. package/agents/expert-godot-shader-developer.md +267 -0
  148. package/agents/expert-government-digital-presales-consultant.md +362 -0
  149. package/agents/expert-grant-writer.md +510 -0
  150. package/agents/expert-healthcare-aging-parent-care-companion.md +40 -0
  151. package/agents/expert-healthcare-clinical-evidence-agent.md +40 -0
  152. package/agents/expert-healthcare-customer-service.md +388 -0
  153. package/agents/expert-healthcare-innovation-strategist.md +40 -0
  154. package/agents/expert-healthcare-marketing-compliance.md +394 -0
  155. package/agents/expert-healthcare-sovereign-health-systems-agent.md +40 -0
  156. package/agents/expert-hospitality-guest-services.md +597 -0
  157. package/agents/expert-hr-onboarding.md +450 -0
  158. package/agents/expert-hr-performance-reviewer.md +248 -0
  159. package/agents/expert-hr-recruiter.md +232 -0
  160. package/agents/expert-identity-graph-operator.md +270 -0
  161. package/agents/expert-language-translator.md +275 -0
  162. package/agents/expert-legal-billing-time-tracking.md +566 -0
  163. package/agents/expert-legal-client-intake.md +487 -0
  164. package/agents/expert-legal-contract-reviewer.md +240 -0
  165. package/agents/expert-legal-document-review.md +452 -0
  166. package/agents/expert-legal-policy-writer.md +308 -0
  167. package/agents/expert-level-designer.md +209 -0
  168. package/agents/expert-livestock-archive-auditor.md +135 -0
  169. package/agents/expert-loan-officer-assistant.md +549 -0
  170. package/agents/expert-lsp-index-engineer.md +334 -0
  171. package/agents/expert-ma-integration-manager.md +426 -0
  172. package/agents/expert-macos-spatial-metal-engineer.md +337 -0
  173. package/agents/expert-marketing-aeo-foundations.md +263 -0
  174. package/agents/expert-marketing-agentic-search-optimizer.md +312 -0
  175. package/agents/expert-marketing-ai-citation-strategist.md +169 -0
  176. package/agents/expert-marketing-app-store-optimizer.md +319 -0
  177. package/agents/expert-marketing-baidu-seo-specialist.md +220 -0
  178. package/agents/expert-marketing-bilibili-content-strategist.md +40 -0
  179. package/agents/expert-marketing-bilibili-strategist.md +194 -0
  180. package/agents/expert-marketing-book-co-author.md +109 -0
  181. package/agents/expert-marketing-carousel-growth-engine.md +215 -0
  182. package/agents/expert-marketing-china-ecommerce-operator.md +277 -0
  183. package/agents/expert-marketing-china-market-localization-strategist.md +282 -0
  184. package/agents/expert-marketing-content-creator.md +145 -0
  185. package/agents/expert-marketing-cross-border-ecommerce.md +260 -0
  186. package/agents/expert-marketing-daily-news-briefing.md +303 -0
  187. package/agents/expert-marketing-developer-community-builder.md +32 -0
  188. package/agents/expert-marketing-douyin-strategist.md +150 -0
  189. package/agents/expert-marketing-ecommerce-operator.md +216 -0
  190. package/agents/expert-marketing-email-strategist.md +248 -0
  191. package/agents/expert-marketing-global-podcast-strategist.md +204 -0
  192. package/agents/expert-marketing-growth-hacker.md +121 -0
  193. package/agents/expert-marketing-instagram-curator.md +179 -0
  194. package/agents/expert-marketing-knowledge-commerce-strategist.md +384 -0
  195. package/agents/expert-marketing-kuaishou-strategist.md +182 -0
  196. package/agents/expert-marketing-linkedin-content-creator.md +232 -0
  197. package/agents/expert-marketing-livestream-commerce-coach.md +303 -0
  198. package/agents/expert-marketing-multi-platform-publisher.md +216 -0
  199. package/agents/expert-marketing-podcast-strategist.md +278 -0
  200. package/agents/expert-marketing-pr-communications-manager.md +472 -0
  201. package/agents/expert-marketing-private-domain-operator.md +309 -0
  202. package/agents/expert-marketing-reddit-community-builder.md +127 -0
  203. package/agents/expert-marketing-search-growth-orchestrator.md +372 -0
  204. package/agents/expert-marketing-seo-specialist.md +298 -0
  205. package/agents/expert-marketing-short-video-editing-coach.md +413 -0
  206. package/agents/expert-marketing-social-media-strategist.md +118 -0
  207. package/agents/expert-marketing-tiktok-strategist.md +124 -0
  208. package/agents/expert-marketing-twitter-engager.md +132 -0
  209. package/agents/expert-marketing-video-optimization-specialist.md +128 -0
  210. package/agents/expert-marketing-wechat-official-account.md +158 -0
  211. package/agents/expert-marketing-wechat-operator.md +156 -0
  212. package/agents/expert-marketing-weibo-strategist.md +241 -0
  213. package/agents/expert-marketing-weixin-channels-strategist.md +297 -0
  214. package/agents/expert-marketing-x-twitter-intelligence-analyst.md +160 -0
  215. package/agents/expert-marketing-xiaohongshu-operator.md +139 -0
  216. package/agents/expert-marketing-xiaohongshu-specialist.md +151 -0
  217. package/agents/expert-marketing-zhihu-strategist.md +175 -0
  218. package/agents/expert-medical-billing-coding-specialist.md +489 -0
  219. package/agents/expert-narrative-designer.md +244 -0
  220. package/agents/expert-operations-manager.md +398 -0
  221. package/agents/expert-organizational-psychologist.md +390 -0
  222. package/agents/expert-paid-media-auditor.md +170 -0
  223. package/agents/expert-paid-media-creative-strategist.md +173 -0
  224. package/agents/expert-paid-media-paid-social-strategist.md +180 -0
  225. package/agents/expert-paid-media-ppc-strategist.md +180 -0
  226. package/agents/expert-paid-media-programmatic-buyer.md +177 -0
  227. package/agents/expert-paid-media-search-query-analyst.md +182 -0
  228. package/agents/expert-paid-media-tracking-specialist.md +199 -0
  229. package/agents/expert-personal-growth-mentor.md +158 -0
  230. package/agents/expert-product-behavioral-nudge-engine.md +246 -0
  231. package/agents/expert-product-dx-engineer.md +32 -0
  232. package/agents/expert-product-feedback-synthesizer.md +175 -0
  233. package/agents/expert-product-manager.md +474 -0
  234. package/agents/expert-product-sprint-prioritizer.md +133 -0
  235. package/agents/expert-product-trend-researcher.md +143 -0
  236. package/agents/expert-project-management-experiment-tracker.md +206 -0
  237. package/agents/expert-project-management-jira-workflow-steward.md +249 -0
  238. package/agents/expert-project-management-meeting-notes-specialist.md +94 -0
  239. package/agents/expert-project-management-project-shepherd.md +202 -0
  240. package/agents/expert-project-management-studio-operations.md +208 -0
  241. package/agents/expert-project-management-studio-producer.md +211 -0
  242. package/agents/expert-project-manager-senior.md +135 -0
  243. package/agents/expert-prompt-engineer.md +176 -0
  244. package/agents/expert-real-estate-buyer-seller.md +594 -0
  245. package/agents/expert-recruitment-specialist.md +49 -0
  246. package/agents/expert-report-distribution-agent.md +354 -0
  247. package/agents/expert-research-synthesist.md +40 -0
  248. package/agents/expert-resume-tailor.md +40 -0
  249. package/agents/expert-retail-customer-returns.md +564 -0
  250. package/agents/expert-roblox-avatar-creator.md +298 -0
  251. package/agents/expert-roblox-experience-designer.md +306 -0
  252. package/agents/expert-roblox-systems-scripter.md +325 -0
  253. package/agents/expert-sales-account-strategist.md +243 -0
  254. package/agents/expert-sales-coach.md +291 -0
  255. package/agents/expert-sales-data-extraction-agent.md +159 -0
  256. package/agents/expert-sales-deal-strategist.md +204 -0
  257. package/agents/expert-sales-discovery-coach.md +230 -0
  258. package/agents/expert-sales-engineer.md +200 -0
  259. package/agents/expert-sales-offer-lead-gen-strategist.md +256 -0
  260. package/agents/expert-sales-outbound-strategist.md +208 -0
  261. package/agents/expert-sales-outreach.md +40 -0
  262. package/agents/expert-sales-pipeline-analyst.md +284 -0
  263. package/agents/expert-sales-proposal-strategist.md +233 -0
  264. package/agents/expert-security-ai-generated-code-auditor.md +40 -0
  265. package/agents/expert-security-appsec-engineer.md +490 -0
  266. package/agents/expert-security-architect.md +303 -0
  267. package/agents/expert-security-blockchain-security-auditor.md +462 -0
  268. package/agents/expert-security-cloud-security-architect.md +522 -0
  269. package/agents/expert-security-compliance-auditor.md +157 -0
  270. package/agents/expert-security-incident-responder.md +436 -0
  271. package/agents/expert-security-penetration-tester.md +398 -0
  272. package/agents/expert-security-secrets-credential-engineer.md +40 -0
  273. package/agents/expert-security-senior-secops.md +751 -0
  274. package/agents/expert-security-threat-detection-engineer.md +533 -0
  275. package/agents/expert-security-threat-intelligence-analyst.md +643 -0
  276. package/agents/expert-specialized-ai-policy-writer.md +217 -0
  277. package/agents/expert-specialized-chief-of-staff.md +40 -0
  278. package/agents/expert-specialized-civil-engineer.md +355 -0
  279. package/agents/expert-specialized-codebase-archaeologist.md +40 -0
  280. package/agents/expert-specialized-cultural-intelligence-strategist.md +168 -0
  281. package/agents/expert-specialized-developer-advocate.md +334 -0
  282. package/agents/expert-specialized-document-generator.md +346 -0
  283. package/agents/expert-specialized-fedramp-rmf-compliance.md +40 -0
  284. package/agents/expert-specialized-focus-music-architect.md +32 -0
  285. package/agents/expert-specialized-french-consulting-market.md +46 -0
  286. package/agents/expert-specialized-korean-business-navigator.md +46 -0
  287. package/agents/expert-specialized-master-plan-architect.md +40 -0
  288. package/agents/expert-specialized-mcp-builder.md +351 -0
  289. package/agents/expert-specialized-meeting-assistant.md +236 -0
  290. package/agents/expert-specialized-model-qa.md +507 -0
  291. package/agents/expert-specialized-pricing-analyst.md +242 -0
  292. package/agents/expert-specialized-pricing-optimizer.md +254 -0
  293. package/agents/expert-specialized-risk-assessor.md +240 -0
  294. package/agents/expert-specialized-salesforce-architect.md +179 -0
  295. package/agents/expert-specialized-strategy-duel-agent.md +129 -0
  296. package/agents/expert-specialized-workflow-architect.md +596 -0
  297. package/agents/expert-study-abroad-advisor.md +281 -0
  298. package/agents/expert-supply-chain-garment-factory-planning-engineer.md +262 -0
  299. package/agents/expert-supply-chain-inventory-forecaster.md +212 -0
  300. package/agents/expert-supply-chain-route-optimizer.md +224 -0
  301. package/agents/expert-supply-chain-strategist.md +581 -0
  302. package/agents/expert-supply-chain-vendor-evaluator.md +232 -0
  303. package/agents/expert-support-analytics-reporter.md +364 -0
  304. package/agents/expert-support-executive-summary-generator.md +217 -0
  305. package/agents/expert-support-finance-tracker.md +447 -0
  306. package/agents/expert-support-infrastructure-maintainer.md +623 -0
  307. package/agents/expert-support-legal-compliance-checker.md +587 -0
  308. package/agents/expert-support-recruitment-specialist.md +508 -0
  309. package/agents/expert-support-support-responder.md +584 -0
  310. package/agents/expert-technical-artist.md +230 -0
  311. package/agents/expert-technical-translator-agent.md +167 -0
  312. package/agents/expert-terminal-integration-specialist.md +236 -0
  313. package/agents/expert-testing-accessibility-auditor.md +329 -0
  314. package/agents/expert-testing-api-tester.md +305 -0
  315. package/agents/expert-testing-embedded-qa-engineer.md +258 -0
  316. package/agents/expert-testing-evidence-collector.md +153 -0
  317. package/agents/expert-testing-performance-benchmarker.md +196 -0
  318. package/agents/expert-testing-reality-checker.md +235 -0
  319. package/agents/expert-testing-test-automation-engineer.md +40 -0
  320. package/agents/expert-testing-test-results-analyzer.md +313 -0
  321. package/agents/expert-testing-tool-evaluator.md +402 -0
  322. package/agents/expert-testing-workflow-optimizer.md +458 -0
  323. package/agents/expert-travel-planner.md +38 -0
  324. package/agents/expert-unity-architect.md +272 -0
  325. package/agents/expert-unity-editor-tool-developer.md +300 -0
  326. package/agents/expert-unity-multiplayer-engineer.md +238 -0
  327. package/agents/expert-unity-shader-graph-artist.md +270 -0
  328. package/agents/expert-unreal-multiplayer-architect.md +314 -0
  329. package/agents/expert-unreal-systems-engineer.md +311 -0
  330. package/agents/expert-unreal-technical-artist.md +256 -0
  331. package/agents/expert-unreal-world-builder.md +274 -0
  332. package/agents/expert-visionos-spatial-engineer.md +282 -0
  333. package/agents/expert-xr-cockpit-interaction-specialist.md +220 -0
  334. package/agents/expert-xr-immersive-developer.md +229 -0
  335. package/agents/expert-xr-interface-architect.md +253 -0
  336. package/agents/expert-zk-steward.md +228 -0
  337. package/agents/manager-academic-research.md +96 -0
  338. package/agents/manager-agent-governance.md +90 -0
  339. package/agents/manager-ai-llm.md +94 -0
  340. package/agents/manager-backend-architecture.md +106 -0
  341. package/agents/manager-business-strategy.md +102 -0
  342. package/agents/manager-business-support.md +96 -0
  343. package/agents/manager-customer-support.md +95 -0
  344. package/agents/manager-data-database.md +92 -0
  345. package/agents/manager-data-knowledge.md +88 -0
  346. package/agents/manager-data-testing.md +105 -0
  347. package/agents/manager-design-creative.md +103 -0
  348. package/agents/manager-devops-operations.md +92 -0
  349. package/agents/manager-embedded-iot.md +90 -0
  350. package/agents/manager-engineering-quality.md +94 -0
  351. package/agents/manager-finance-tax.md +99 -0
  352. package/agents/manager-frontend-client.md +116 -0
  353. package/agents/manager-game-dev.md +120 -0
  354. package/agents/manager-gis.md +104 -0
  355. package/agents/manager-government-public.md +84 -0
  356. package/agents/manager-healthcare.md +88 -0
  357. package/agents/manager-hr.md +87 -0
  358. package/agents/manager-language-translation.md +82 -0
  359. package/agents/manager-legal-compliance.md +86 -0
  360. package/agents/manager-marketing-growth.md +138 -0
  361. package/agents/manager-network-engineering.md +83 -0
  362. package/agents/manager-paid-media.md +92 -0
  363. package/agents/manager-product-management.md +90 -0
  364. package/agents/manager-project-management.md +94 -0
  365. package/agents/manager-sales-customer.md +97 -0
  366. package/agents/manager-security-compliance.md +109 -0
  367. package/agents/manager-spatial-computing.md +90 -0
  368. package/agents/manager-supply-chain.md +87 -0
  369. package/bin/cli.js +84 -0
  370. package/commands/wf/archive.md +111 -0
  371. package/commands/wf/check.md +68 -0
  372. package/commands/wf/deliver.md +76 -0
  373. package/commands/wf/design.md +56 -0
  374. package/commands/wf/dispatch.md +90 -0
  375. package/commands/wf/env.md +81 -0
  376. package/commands/wf/implement.md +96 -0
  377. package/commands/wf/plan.md +78 -0
  378. package/commands/wf/resume.md +59 -0
  379. package/commands/wf/spec.md +88 -0
  380. package/commands/wf/triage.md +50 -0
  381. package/commands/wf/verify.md +93 -0
  382. package/config/categories.json +557 -0
  383. package/config/experts.json +3318 -0
  384. package/config/workflow.json +848 -0
  385. package/context/context-manager.py +339 -0
  386. package/docs/workflow-fusion-design.md +239 -0
  387. package/hooks/claude-hooks.json +16 -0
  388. package/hooks/hooks.json +20 -0
  389. package/hooks/prepend-global-rules-reminder.mjs +342 -0
  390. package/icon.png +0 -0
  391. package/package.json +61 -3
  392. package/references/openspec-manual-mode.md +97 -0
  393. package/references/roles/analyst.md +62 -0
  394. package/references/roles/implementer.md +67 -0
  395. package/references/roles/investigator.md +88 -0
  396. package/references/roles/orchestrator.md +66 -0
  397. package/references/roles/reviewer.md +103 -0
  398. package/references/stage-S0-triage.md +68 -0
  399. package/references/stage-S1-design.md +53 -0
  400. package/references/stage-S2-spec.md +135 -0
  401. package/references/stage-S3-plan.md +84 -0
  402. package/references/stage-S4-env-baseline.md +81 -0
  403. package/references/stage-S5-implement.md +139 -0
  404. package/references/stage-S6-verify-review.md +80 -0
  405. package/references/stage-S7-deliver.md +81 -0
  406. package/references/stage-S8-sync-archive.md +168 -0
  407. package/references/workflow-tree.md +98 -0
  408. package/scripts/cc-uninstall.js +123 -0
  409. package/scripts/embedding_client.py +44 -0
  410. package/scripts/install-claude-code.js +477 -0
  411. package/scripts/install.js +1592 -0
  412. package/scripts/llm_client.py +202 -0
  413. package/scripts/openspec_engine.py +707 -0
  414. package/scripts/sdd/review-package +65 -0
  415. package/scripts/sdd/sdd-workspace +108 -0
  416. package/scripts/sdd/task-brief +49 -0
  417. package/scripts/target-menu.js +125 -0
  418. package/scripts/workflow_check.py +1955 -0
  419. package/skill_entry.py +193 -0
  420. package/templates/bug-report.md +86 -0
  421. package/templates/minimal-contract.md +54 -0
  422. package/templates/plan-sections.md +190 -0
  423. package/templates/progress.md +89 -0
  424. package/templates/review-report.md +51 -0
  425. package/templates/task-report.md +84 -0
  426. package/vendor/skills/LICENSE +21 -0
  427. package/vendor/skills/PROVENANCE.md +79 -0
  428. package/vendor/skills/zes-brainstorming/SKILL.md +302 -0
  429. package/vendor/skills/zes-brainstorming/builder-check-prompt.md +23 -0
  430. package/vendor/skills/zes-code-review/SKILL.md +103 -0
  431. package/vendor/skills/zes-finishing/SKILL.md +233 -0
  432. package/vendor/skills/zes-openspec-apply-change/SKILL.md +206 -0
  433. package/vendor/skills/zes-openspec-archive-change/SKILL.md +221 -0
  434. package/vendor/skills/zes-openspec-explore/SKILL.md +356 -0
  435. package/vendor/skills/zes-openspec-propose/SKILL.md +175 -0
  436. package/vendor/skills/zes-openspec-sync-specs/SKILL.md +290 -0
  437. package/vendor/skills/zes-openspec-update-change/SKILL.md +109 -0
  438. package/vendor/skills/zes-receiving-review/SKILL.md +213 -0
  439. package/vendor/skills/zes-sdd/SKILL.md +345 -0
  440. package/vendor/skills/zes-sdd/references/batching.md +11 -0
  441. package/vendor/skills/zes-sdd/references/cannot-verify.md +10 -0
  442. package/vendor/skills/zes-sdd/references/final-review.md +47 -0
  443. package/vendor/skills/zes-sdd/references/fix-loop.md +77 -0
  444. package/vendor/skills/zes-sdd/references/handling-reports.md +15 -0
  445. package/vendor/skills/zes-sdd/references/preflight.md +26 -0
  446. package/vendor/skills/zes-sdd/references/resuming.md +12 -0
  447. package/vendor/skills/zes-systematic-debugging/SKILL.md +291 -0
  448. package/vendor/skills/zes-systematic-debugging/condition-based-waiting.md +115 -0
  449. package/vendor/skills/zes-systematic-debugging/defense-in-depth.md +122 -0
  450. package/vendor/skills/zes-systematic-debugging/find-polluter.sh +72 -0
  451. package/vendor/skills/zes-systematic-debugging/root-cause-tracing.md +169 -0
  452. package/vendor/skills/zes-tdd/SKILL.md +338 -0
  453. package/vendor/skills/zes-tdd/writing-good-tests.md +198 -0
  454. package/vendor/skills/zes-verification/SKILL.md +128 -0
  455. package/vendor/skills/zes-writing-plans/SKILL.md +212 -0
  456. package/zcode_dev_workflow.py +1343 -0
  457. package/zcode_expert_system.py +1115 -0
package/README.md CHANGED
@@ -1,3 +1,681 @@
1
- # Temporary Holding Version
1
+ # ZCode Expert System v3.2
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ **English** · [简体中文](README_CN.md)
4
+
5
+ ## 📋 Overview
6
+
7
+ **ZCode Expert System** is an expert-routing plugin that runs on **both ZCode and Claude Code**. It ships the full persona prompts of **331 specialists** from [dsh-agency-agents](https://github.com/MichengAI/dsh-agency-agents), adapted with **two-axis routing**: the *scale axis* decides how long a workflow runs, the *domain axis* decides which expert handles it.
8
+
9
+ The same package deploys to either host. ZCode reads `.zcode-plugin/` and `hooks/hooks.json`; Claude Code reads `.claude-plugin/` and `hooks/claude-hooks.json`. The two sides are fully isolated — installing on one never affects the other.
10
+
11
+ | Host | Manifest | Hooks config | Sub-agent location | Dispatch name |
12
+ |---|---|---|---|---|
13
+ | ZCode | `.zcode-plugin/plugin.json` | `hooks/hooks.json` (`type: process`) | `~/.zcode/agents/` | `后端架构师` (Chinese bare name) |
14
+ | Claude Code | `.claude-plugin/plugin.json` | `hooks/claude-hooks.json` (`type: command`) | `agents/` inside plugin | `zcode-expert-system:后端架构师` (qualified name) |
15
+
16
+ ## 🏗️ Plugin Architecture
17
+
18
+ ### System Overview
19
+
20
+ ZCode Expert System v3.2.2 is an expert-routing plugin for ZCode. It ships the full persona prompts of **331 specialists** from [dsh-agency-agents](https://github.com/MichengAI/dsh-agency-agents), fused with **Superpowers engineering discipline** and **OpenSpec spec-driven development**. The plugin uses **two-axis orthogonal routing**:
21
+
22
+ | Axis | Question | Implementation |
23
+ |---|---|---|
24
+ | **Scale axis** | How long to run (which stages, how many gates) | `zcode_dev_workflow.py` → readonly/light/medium/large/bug, `trim_matrix` + `minimum_gates` |
25
+ | **Domain axis** | Which expert handles it | `zcode_expert_system.py` → 32 categories → 331 specialists, `subagent_type` |
26
+
27
+ **Two axes are independent**: scale decides stage trimming, domain decides `subagent_type`. All tasks (including readonly and mechanical tasks) must complete both-axis triage — domain routing cannot be skipped (W10).
28
+
29
+ ```
30
+ User task
31
+ │
32
+ ├─── Scale axis (zcode_dev_workflow.py) ─────────────────────┐
33
+ │ readonly / light / medium / large / bug │
34
+ │ → which of the 9 stages to run (trim_matrix) │
35
+ │ → how many gates must pass (minimum_gates) │
36
+ │ │
37
+ └─── Domain axis (zcode_expert_system.py) ──────────────────┐
38
+ 32 categories → 331 specialists │
39
+ → subagent_type (expert display name) │
40
+ ▼
41
+ Two-axis dispatch plan
42
+ ```
43
+
44
+ ### Three-Layer Routing (Domain Axis)
45
+
46
+ Within the domain axis, routing happens in three layers:
47
+
48
+ ```
49
+ User task
50
+ │
51
+ ▼
52
+ ┌─────────────────────────────────┐
53
+ │ Layer 1: Task Classification │
54
+ │ 32 top-level categories │
55
+ └──────────┬──────────────────────┘
56
+ │
57
+ ▼
58
+ ┌─────────────────────────────────┐
59
+ │ Layer 2: Domain Manager (32) │
60
+ │ Task decomposition & dispatch │
61
+ │ addressed by slug `manager-<cat>`│
62
+ └──────────┬──────────────────────┘
63
+ │
64
+ ▼
65
+ ┌─────────────────────────────────┐
66
+ │ Layer 3: Specialist (331) │
67
+ │ Registered as ZCode sub-agents │
68
+ │ addressed by Chinese display │
69
+ │ name, e.g. "后端架构师" │
70
+ └─────────────────────────────────┘
71
+ ```
72
+
73
+ **Dispatch flow**:
74
+
75
+ 1. **Classify** the task into one of 32 categories (`zcode_expert_system.classify_task_detailed`)
76
+ 2. **Route** to the matching domain manager (`manager-<category>`)
77
+ 3. **Coarse-screen** candidate specialists in that category (Top-5 by embedding or token-overlap)
78
+ 4. **Semantic selection** — the controller (host model) must review `top_candidates[].score_detail` and make the final judgment; Python's choice is only token-counting heuristic, not semantic judgment
79
+ 5. **Dispatch** via `Agent(subagent_type="<specialist display name>")` with a process-contract prefix
80
+ 6. **Propagate** context across stages via return values
81
+
82
+ > **Semantic selection contract**: The plugin deliberately does not configure an external LLM/Embedding service — it depends on the model already active in the session. `scripts/llm_client.py` `_call_llm` and `embedding_client.py` `get_embedding` return `None`, so coarse screening degrades to local token-overlap scoring. When `semantic_selection_required=true`, the controller must review `score_detail` and may override with `build_dispatch_for_expert("<specialist name>", task)`. A wrong specialist name raises `ValueError` with the closest matches (difflib suggestion) rather than silently degrading.
83
+
84
+ **Confidence guard rails** (applied during plan generation):
85
+
86
+ | Condition | Behaviour |
87
+ |---|---|
88
+ | `confidence ≥ 0.5` | Proceed to semantic review |
89
+ | `confidence < 0.5` **and** `selection_basis: heuristic` | **Implementer dispatch is blocked** (`action: blocked_low_confidence` + `plan.blocking`); clarify the domain with the boss first — token-fallback experts are not dispatched |
90
+ | `confidence < 0.5`, semantic review already done | Dispatch proceeds, but a `semantic_recheck` action is emitted so the controller re-checks `score_detail` |
91
+ | `confidence = 0` | `domain.no_signal = true` — the category is only the `business-support` default, not a real domain judgement |
92
+
93
+ > **Word-boundary guards**: `返回500` does not fire on `返回5000行数据` (a trailing numeric segment must not be followed by another digit), and zero-width characters (ZWSP / BOM / soft hyphen) are stripped before matching, so they cannot be used to slip past Bug detection.
94
+
95
+ ### Role × Specialist Matrix (Workflow Roles)
96
+
97
+ Workflow roles are **responsibilities**; 331 specialists are **domain capabilities**. They combine orthogonally:
98
+
99
+ | Role | Dispatched by | Core constraints |
100
+ |---|---|---|
101
+ | **Orchestrator** | ❌ Controller self-tasks | Sole state writer, runs verification, records Rulings |
102
+ | **Implementer** | ✅ Domain specialist | No sub-delegation; cannot exceed brief scope; TDD required |
103
+ | **Reviewer** | ✅ **Different-domain** specialist | Read-only; does not trust self-assessment; must give spec + quality dual conclusions |
104
+ | **Investigator** | ✅ Domain specialist | Read-only; conclusions carry `file:line` evidence |
105
+ | **Analyst** | ✅ Domain specialist | Read-only analysis; four-part "phenomenon → cause → impact → suggestion"; domain judgment not left to controller |
106
+
107
+ **Process contract takes precedence over specialist persona** — the dispatch prompt's first segment hard-declares this, otherwise architecture-type specialists will re-architect on their own.
108
+
109
+ ### Reviewer Independence
110
+
111
+ Only 1 of the 331 specialists is "Code Reviewer", so independence cannot rely on "more types". Three guarantees:
112
+
113
+ 1. `type ≠` Implementer (different specialist)
114
+ 2. `instance ≠` independently dispatched, independent context
115
+ 3. `input isolation` — only brief / report / change-set, no dialogue context
116
+
117
+ Independence level must be recorded: **L0** (independent sub-agent, deliverable) / **L1** (controller self-review downgrade, must be declared) / **L2** (no review, delivery prohibited).
118
+
119
+ ### Seven-State State Machine (Single Source of Truth)
120
+
121
+ `PENDING → IN_PROGRESS → REVIEW → NEEDS_FIX → DONE`, plus `BLOCKED` and `PARKED`. SDD's four statuses (`DONE` / `DONE_WITH_CONCERNS` / `NEEDS_CONTEXT` / `BLOCKED`) are **edge labels**, not states — they convert to state transitions immediately.
122
+
123
+ Key transitions:
124
+
125
+ | Transition | Trigger | Evidence |
126
+ |---|---|---|
127
+ | `IN_PROGRESS → REVIEW` | Implementer reports DONE / DONE_WITH_CONCERNS | Non-empty change set + report contains command exit codes |
128
+ | `REVIEW → DONE` | Reviewer gives spec ✅ + quality pass | Dual conclusions + controller runs full test suite green |
129
+ | `NEEDS_FIX → PARKED` | 5 fix rounds still open, controller decision | Ruling line with cost |
130
+ | `DONE → NEEDS_FIX` | Regression breakage found before archive | Real RED output + tasks.md rollback |
131
+
132
+ Invariants: one task has exactly one state at a time; `DONE` iff tasks.md shows `- [x]`; non-DONE is always `- [ ]` (including PARKED); ledger first line must be `# SDD ledger — plan: <path>`; every DONE traces back to non-empty change set + review conclusions.
133
+
134
+ ### Evidence Levels (Anti-Loss)
135
+
136
+ | Level | Location | Content | Lifecycle |
137
+ |---|---|---|---|
138
+ | **P1** | File snapshot hash or git commit | What actually changed | Archived after delivery |
139
+ | **P2** | `openspec/changes/<n>/tasks.md` + plan `## Rulings` | Completion, ADR decisions | Permanent after archive |
140
+ | **P3** | Plan doc `## Baseline` / `## Review` / `## Rulings` / `## Integration Verification` | Baseline, review, ruling, delivery re-test | With repository |
141
+ | **P4** | `.superpowers/sdd/<plan>/` | ledger / brief / report / snapshot | **Deleted after final review; must export to P3 first** |
142
+
143
+ > **Iron rule: P4 not exported, workspace not deleted.** Otherwise baseline, rulings, and re-test records vanish — this is the spec's most dangerous loss point.
144
+
145
+ ### No-Git-Worktree Parallel Model
146
+
147
+ The system **does not use Git Worktree**. Conserved relationship:
148
+
149
+ | Kept parallel | Cancelled parallel |
150
+ |---|---|
151
+ | ✅ Read-only investigation parallel (multiple unrelated failure investigations by domain) | ❌ **Multi-agent implementation parallel** |
152
+ | ✅ Review parallel (multiple Reviewers same batch, read-only, no conflict) | — |
153
+
154
+ **Reason**: without an isolated workspace there cannot be two writers. Implementation is **always serial** — this is conservation, not conservatism.
155
+
156
+ **Git is an optional enhancement layer**:
157
+
158
+ | Detection | Change-set source | Wrap-up |
159
+ |---|---|---|
160
+ | Has git | `review-package` `BASE..HEAD` diff | Finishing: one of three options |
161
+ | No git (default) | File snapshot sha256 difference + changed file full text | Change-list acceptance |
162
+
163
+ **Snapshot mechanism**: before dispatch, sha256 of each file in the task Files list; after implementation, recompute; difference = added / modified / deleted. The change-set is computed independently by the controller, **not** by the implementer's self-report — this is what makes it trustworthy in a no-git environment.
164
+
165
+ The controller does **not** run `git init` for the boss's project without permission.
166
+
167
+ ### Conflict Resolutions (10 Rulings, `workflow.json` → `conflict_rulings`)
168
+
169
+ | # | Ruling |
170
+ |---|---|
171
+ | W1 | No worktree → no implementation parallel; keep read-only investigation & review parallel |
172
+ | W2 | Medium/large task `design.md` is the single source of truth; stage-one does not persist; small tasks land in `docs/superpowers/specs/` marked "non-authoritative" |
173
+ | W3 | `apply-change` straight-through and SDD mode are **mutually exclusive**; same change must not mix |
174
+ | W4 | Baseline red does not block starting, but must be recorded; later red-item comparison: in-list = pre-existing, out-of-list = introduced by this task |
175
+ | W5 | Three evidences: change set + report with command exit codes + **controller runs full suite personally** |
176
+ | W6 | Dispatch prompt's first segment hard-declares "process contract takes precedence over specialist persona" |
177
+ | W7 | Git detection failure → snapshot evidence + controller self-review (record L1), declare downgrade in delivery |
178
+ | W8 | PARKED defaults to **no archive**; "accept not fix" must migrate to a new change |
179
+ | W9 | Agent dispatch has no `model` parameter; control cost by **specialist granularity + task granularity**; "upgrade" = switch to a more specialized expert |
180
+ | W10 | Two-axis strong serial: all tasks (including readonly and mechanical) scale-then-domain, domain routing not skipped; exemptions only two levels — chit-chat/greeting, boss explicitly exempts and records Ruling |
181
+
182
+ ### Nine-Stage Workflow (Detailed)
183
+
184
+ Each stage has a clear owner role, gate, evidence level, artifacts, and stop-for-owner checkpoint. `trim_matrix` marks `必` (required), `简` (simplified), `条` (conditional, currently treated as required), `-` (skipped). Scale can only be upgraded, never downgraded.
185
+
186
+ #### S0 — Requirement Triage (G0, P4)
187
+ - **Owner**: Orchestrator (controller)
188
+ - **Artifacts**: category conclusion, domain routing result (category + expert name), impact scope identification
189
+ - **Gate**: Requirement clear, classified, impact identified, domain routing completed and stated
190
+ - **Exit criteria**: Classification stated in session; impact scope identified; no blocking ambiguity; git/openspec root detected and branched accordingly; domain routing completed and stated
191
+ - **Fail return**: S0
192
+
193
+ #### S1 — Requirement Clarification & Design (G1, no evidence level, stop for owner)
194
+ - **Owner**: Orchestrator (controller)
195
+ - **Components**: zes-brainstorming
196
+ - **Artifacts**: 2-3 options comparison + recommendation, acceptance criteria, explicit exclusions (not persisted to design.md, shown in conversation only)
197
+ - **Gate**: Boss explicitly approves (yes); acceptance criteria written; exclusions explicit
198
+ - **Fail return**: S1
199
+
200
+ #### S2 — OpenSpec Spec Planning (G2, P2, stop for owner)
201
+ - **Owner**: Orchestrator (controller)
202
+ - **Components**: zes-openspec-propose, zes-openspec-update-change
203
+ - **Artifacts**: `openspec/changes/<change>/proposal.md`, `design.md`, `tasks.md`, `.openspec.yaml`, `openspec/changes/<change>/specs/<capability>/spec.md`
204
+ - **Gate**: OpenSpec artifacts complete and boss-reviewed; applyRequires and reachable products via requires edges all done/skipped; seven spec reviews passed
205
+ - **Fail return**: S2
206
+
207
+ #### S3 — Implementation Plan (G3, P3)
208
+ - **Owner**: Orchestrator (controller)
209
+ - **Components**: zes-writing-plans
210
+ - **Artifacts**: `docs/superpowers/plans/<date>-<feature>.md` containing Goal / Architecture / Tech Stack / Spec / Review Focus / Global Constraints / Dependencies / File Scope
211
+ - **Gate**: Task decomposition reasonable, dependencies clear, no placeholders (TBD/TODO/"appropriate error handling"); each tasks.md entry has Task承接; execution mode declared (sdd | apply-change)
212
+ - **Fail return**: S2
213
+
214
+ #### S4 — Environment & Baseline Test (G4, P3+P4, stop for owner when baseline red)
215
+ - **Owner**: Orchestrator (controller)
216
+ - **Components**: baseline-test
217
+ - **Artifacts**: `.superpowers/sdd/<plan>/.gitignore`, `progress.md` (first line `# SDD ledger — plan:`)
218
+ - **Gate**: Baseline test recorded; baseline failure list persisted (if any); baseline master copy written into plan `## Baseline` section; ledger first line is account identity
219
+ - **Fail return**: S4
220
+
221
+ #### S5 — Code Implementation & Multi-Agent Collaboration (G5 per task, P4→P2)
222
+ - **Owner**: Implementer (domain specialist)
223
+ - **Components**: zes-sdd + zes-tdd + zes-openspec-apply-change
224
+ - **Artifacts**: `task-<N>-brief.md`, `task-<N>-report.md`, `snapshot-before-/after-<N>.json` (no-git: downgraded to non-required)
225
+ - **Gate**: brief + report + change-set all ready; review dual conclusions ready (spec conformance + code quality); ledger has Task N done line; tasks.md entry checked; every deviation recorded as Ruling
226
+ - **Fail return**: S5; max_fix_rounds 5
227
+
228
+ #### S6 — Verification & Review (G6+G7, P3)
229
+ - **Owner**: Reviewer (different-domain specialist)
230
+ - **Components**: zes-verification + zes-code-review
231
+ - **Artifacts**: `review-<range>.diff` (git only), `review-<N>.md`
232
+ - **Gate**: Five-layer verification passed per task property; verification gate 5 steps executed in this session; reviewer independence marked L0/L1/L2 (L2 prohibits delivery); Rulings list generated and written into plan `## Rulings` section; Critical/Important fixed or ruled
233
+ - **Fail return**: S5
234
+
235
+ #### S7 — Delivery & Integration (G8a, P3, stop for owner)
236
+ - **Owner**: Orchestrator (controller)
237
+ - **Components**: zes-finishing
238
+ - **Artifacts**: `docs/superpowers/plans/<plan>#Integration Verification` section
239
+ - **Gate**: Post-integration re-test green (must not reuse old results); delivery method chosen by boss; re-test command and exit code written into `## Integration Verification`
240
+ - **Fail return**: S5
241
+
242
+ #### S8 — Spec Sync & Archive (G8b, P2, stop for owner)
243
+ - **Owner**: Orchestrator (controller)
244
+ - **Components**: zes-openspec-sync-specs, zes-openspec-archive-change
245
+ - **Artifacts**: `openspec/specs/<capability>/spec.md`, `openspec/changes/archive/<date>-<change>/`
246
+ - **Gate**: delta unique source = artifactPaths.specs.existingOutputPaths; main spec merged and `openspec validate --specs` passed; completedTasks == totalTasks (only x/X counted); archive dates don't overlap; openspec/ has no uncommitted artifacts
247
+ - **Fail return**: S8
248
+
249
+ #### Scale Trim Matrix (`trim_matrix`)
250
+
251
+ | Scale | S0 | S1 | S2 | S3 | S4 | S5 | S6 | S7 | S8 |
252
+ |---|---|---|---|---|---|---|---|---|---|
253
+ | readonly | 必 | - | - | - | - | - | - | - | - |
254
+ | light | 必 | 简 | 条 | 简 | 必 | 必 | 简 | 必 | 条 |
255
+ | medium | 必 | 必 | 必 | 必 | 必 | 必 | 必 | 必 | 必 |
256
+ | large | 必 | 必 | 必 | 必 | 必 | 必 | 必 | 必 | 必 |
257
+ | bug | 必 | 条 | 条 | 条 | 条 | 必 | 必 | 必 | 条 |
258
+
259
+ > `必` = full execution, `简` = simplified, `条` = conditional (currently treated as `必`, see workflow-fusion-design.md section 3), `-` = skipped. **Scale can only be upgraded, never downgraded.**
260
+
261
+ #### Bug Special Method (zes-systematic-debugging core)
262
+
263
+ **Iron rule: no root cause, no fix; no failing test, no code change.**
264
+
265
+ - **Phase 1 Root Cause Investigation** (before touching code): ① Read error & stack trace (line/path/error code); ② Stable reproduction (if can't reproduce, collect more data, don't guess); ③ Check recent changes (git diff/new deps/config changes); ④ In multi-component systems record in/out data at each layer boundary, locate which layer breaks; ⑤ Trace back along call chain to the bad value source (root-cause-tracing), **fix at source not symptom**
266
+ - **Phase 2 Pattern Analysis**: Find similar working code in same repo, diff every condition, don't dismiss any difference, clarify dependencies and assumptions
267
+ - **Phase 3 Hypothesis & Verification**: State single hypothesis "I believe X is root cause because Y" → minimal test (one variable at a time) → verify; if fails, switch to **new hypothesis**, don't stack fixes on old fix
268
+ - **Phase 4 Implementation**: Write failing test first (reproduce) → single fix (no stacking refactoring) → verify (test passes + other tests not broken + problem solved, verification-before-completion before claiming success)
269
+ - **3 Failures → Question Architecture**: 3 failed fixes, stop fixing — "every fix exposes a new problem somewhere else" is an architecture signal, discuss with boss whether to refactor, not a 4th attempt
270
+ - **Double Confirmation Gate** (boss item): ① Boss picks A/B/C option, no code change before selection; ② After selection, confirm execution ("okay"/"OK" doesn't count, needs explicit verb like "execute/start/fix")
271
+ - **Red Flags** (appear → back to Phase 1): "quick fix first", "try changing X see if works", "skip test manual verify", "I roughly know where" — guesswork fixing is the mother of failure
272
+
273
+ #### Seven-State State Machine (Single Source of Truth)
274
+
275
+ `PENDING → IN_PROGRESS → REVIEW → NEEDS_FIX → DONE`, plus `BLOCKED` and `PARKED`. SDD's four statuses (`DONE` / `DONE_WITH_CONCERNS` / `NEEDS_CONTEXT` / `BLOCKED`) are **edge labels**, not states — they convert to state transitions immediately.
276
+
277
+ Invariants: exactly one state per task at a time; `DONE` iff tasks.md shows `- [x]`; non-DONE always `- [ ]` (including PARKED); sole state writer = controller; no sub-agent writes state.
278
+
279
+ ### Mechanical Checks (No Reliance on Consciousness)
280
+
281
+ ```bash
282
+ python "$ZCODE_PLUGIN_ROOT/skills/zcode-expert-system/scripts/workflow_check.py" --change <change> --plan <plan.md> --scale medium
283
+ ```
284
+
285
+ Check items: environment detection / spec artifacts / plan required sections / task title format / placeholders / dual-ledger alignment / baseline dual-write / ledger identity / three-element alignment / independence marking / Ruling persistence / post-integration re-test / archive completeness.
286
+
287
+ Exit code: `0` no FAIL, `1` has FAIL (must not proceed to next stage).
288
+
289
+ > A pure Markdown checklist will be skipped — it must be mechanically verifiable.
290
+
291
+ ### 32 categories
292
+
293
+ | Category | Experts | Category | Experts |
294
+ |---|---|---|---|
295
+ | frontend-client | 8 | supply-chain | 5 |
296
+ | backend-architecture | 18 | legal-compliance | 6 |
297
+ | data-database | 8 | hr | 7 |
298
+ | devops-operations | 7 | finance-tax | 14 |
299
+ | ai-llm | 9 | academic-research | 10 |
300
+ | embedded-iot | 6 | government-public | 1 |
301
+ | network-engineering | 3 | business-support | 6 |
302
+ | engineering-quality | 10 | data-knowledge | 2 |
303
+ | security-compliance | 19 | game-dev | 21 |
304
+ | data-testing | 15 | spatial-computing | 6 |
305
+ | design-creative | 14 | gis | 13 |
306
+ | marketing-growth | 45 | project-management | 9 |
307
+ | paid-media | 7 | product-management | 6 |
308
+ | sales-customer | 10 | customer-support | 10 |
309
+ | business-strategy | 18 | language-translation | 2 |
310
+ | healthcare | 7 | agent-governance | 9 |
311
+
312
+ ## 📦 Installation
313
+
314
+ ### Option 1: npm (recommended)
315
+
316
+ ```bash
317
+ # 1. Install globally
318
+ npm install -g zcode-expert-system
319
+
320
+ # 2. Deploy into ZCode
321
+ zcode-expert-system install
322
+
323
+ # 3. Restart ZCode (the agent list is a startup snapshot — a restart is required)
324
+ ```
325
+
326
+ The installer will:
327
+
328
+ - Create the plugin cache directory and manifest (ZCode identifies plugins by it)
329
+ - Install the skill to `~/.zcode/skills/zcode-expert-system/`
330
+ - Install plugin-level hooks at the plugin root `hooks/`
331
+ - Install 32 manager + 331 expert sub-agents into `~/.zcode/agents/`
332
+ - Register into `~/.zcode/cli/plugins/installed_plugins.json`
333
+
334
+ ### Option 2: From source
335
+
336
+ ```bash
337
+ git clone https://github.com/wutian122/zcode-expert-system.git
338
+ cd zcode-expert-system
339
+ npm install
340
+ zcode-expert-system install
341
+ ```
342
+
343
+ > Note: the `skills` field in `.zcode-plugin/plugin.json` only takes effect in the
344
+ > deployed layout (after `install.js` runs); for direct-from-repo use, point the
345
+ > skill directory at the repository root.
346
+
347
+ ### Option 3: ZCode plugin marketplace
348
+
349
+ (Not yet published — use Option 1 (npm) for now.) Search for `zcode-expert-system`
350
+ in the ZCode plugin marketplace and click install.
351
+
352
+ ### Option 4: Claude Code plugin
353
+
354
+ The same package also works as a Claude Code plugin. Claude Code reads the `.claude-plugin/`
355
+ directory and `hooks/claude-hooks.json` (Claude Code format), while ZCode reads
356
+ `.zcode-plugin/` and `hooks/hooks.json` (ZCode format). The two are fully isolated:
357
+
358
+ ```bash
359
+ # 1. One-click install (recommended)
360
+ npm install -g zcode-expert-system
361
+ zcode-expert-system cc-install
362
+
363
+ # 2. Or from a cloned repo
364
+ npm install
365
+ npm run cc:install
366
+ ```
367
+
368
+ Uninstall the Claude Code side:
369
+
370
+ ```bash
371
+ zcode-expert-system cc-uninstall # global install
372
+ npm run cc:uninstall # from a cloned repo
373
+ ```
374
+
375
+ **What the one-click installer does** (it wraps four CLI steps so you don't have to run them
376
+ manually):
377
+
378
+ 1. Builds a local marketplace at `~/.claude/plugins/marketplaces/zcode-local/`
379
+ (`marketplace.json` + the full plugin tree, including a `skills/zcode-expert-system/`
380
+ mirror so `/wf:*` command script paths resolve)
381
+ 2. Registers the marketplace (`claude plugin marketplace add`)
382
+ 3. Installs and enables the plugin (`claude plugin install`)
383
+ 4. Verifies both `installed_plugins.json` and `enabledPlugins` are updated
384
+
385
+ After install:
386
+
387
+ - In Claude Code, run `/plugin` — `zcode-expert-system` should appear
388
+ - Dispatch sub-agents with the qualified name: `zcode-expert-system:<专家中文名>`
389
+ (e.g. `zcode-expert-system:后端架构师`)
390
+ - Use `/wf:*` commands for the nine-stage workflow
391
+
392
+ **P5 install safety contract** (`scripts/install-claude-code.js`): the installer is
393
+ *check → back up → build → roll back on failure*:
394
+
395
+ 1. **Preflight** — `preflightCheck()` verifies every required source component
396
+ (`SKILL.md`, `config/`, `agents/`, `commands/`, `.claude-plugin/`, `hooks/`,
397
+ `scripts/`) exists **before** anything is deleted; a missing component aborts
398
+ with `[preflight] 源树缺少部署必需组件`.
399
+ 2. **Back up before delete** — an existing marketplace directory is first copied to
400
+ `.bak-marketplace-<timestamp>` next to it.
401
+ 3. **Rollback on failure** — if the build fails, the half-built directory is removed
402
+ and the backup is restored; if rollback itself fails, the backup path is printed
403
+ for manual recovery.
404
+
405
+ **Unpacked component**: `src/` is declared in `UNPACKED_COMPONENTS` and is **not**
406
+ shipped with the plugin. It holds the in-progress `openspec/changes/jwt-auth-system`
407
+ module (`src/auth/`), which has no production consumer yet.
408
+
409
+ **Other commands:**
410
+
411
+ ```bash
412
+ npm run cc:install:dry # Preview, touches nothing
413
+ npm run cc:install -- --force # Force reinstall
414
+ npm run cc:uninstall # Uninstall (removes registration + marketplace dir)
415
+ ```
416
+
417
+ > **ZCode compatibility is unaffected.** The ZCode deployment paths and behavior
418
+ > remain exactly as before. The Claude Code adapter is fully additive and does not
419
+ > modify any ZCode-facing files.
420
+
421
+ ### Uninstall
422
+
423
+ Uninstall is unified through `install.js`, with `--zcode` / `--claude-code` flags to choose which side to remove:
424
+
425
+ ```bash
426
+ node scripts/install.js --uninstall # Uninstall ZCode + Claude Code (both)
427
+ node scripts/install.js --uninstall --zcode # Uninstall ZCode only
428
+ node scripts/install.js --uninstall --claude-code # Uninstall Claude Code only
429
+ node scripts/install.js --uninstall --zcode --purge # Uninstall ZCode and wipe all residue (incl. runtime data)
430
+ ```
431
+
432
+ Or via npm:
433
+
434
+ ```bash
435
+ npm run uninstall # both
436
+ npm run uninstall:zcode # ZCode only
437
+ npm run uninstall:claude # Claude Code only
438
+ ```
439
+
440
+ **What ZCode-side removal does**: removes the plugin registration, cache, skill,
441
+ commands, sub-agents, and deployment manifests, and cleans up backup
442
+ directories (`skills/*.bak-*`) plus any now-empty command/`expert-system`
443
+ folders. **User runtime data** under `~/.zcode/expert-system/context/` is
444
+ kept by default — add `--purge` to wipe it too.
445
+
446
+ **What Claude Code-side removal does**: removes the plugin registration and
447
+ `enabledPlugins` entry, removes the marketplace registration, and deletes the
448
+ local marketplace directory. ZCode is not touched.
449
+
450
+ Prefer a dry run first to preview the full removal plan (zero writes):
451
+
452
+ ```bash
453
+ node scripts/install.js --uninstall --dry-run
454
+ ```
455
+
456
+ ## ⚙️ Configuration
457
+
458
+ ### No separate LLM/Embedding service needed
459
+
460
+ The plugin uses **the model already active in your session**:
461
+
462
+ - **Classification**: current session model
463
+ - **Expert selection**: current session model
464
+ - **Coarse screening**: Embedding when available, otherwise token-overlap scoring
465
+
466
+ > Accuracy improves automatically as your session model improves — nothing to configure.
467
+
468
+ ### Fallback behaviour
469
+
470
+ - **LLM unavailable** → longest-keyword match + token-overlap scoring
471
+ - **Embedding unavailable** → token-overlap scoring (name weighted 3×, plus description and prompt content)
472
+
473
+ Both fallbacks run locally with no network dependency; routing never fails.
474
+
475
+ ## 🚀 Usage
476
+
477
+ ### Invoking the expert system
478
+
479
+ Just describe a professional task in a ZCode session — the `UserPromptSubmit` hook injects
480
+ the routing rules automatically and the skill triggers on domain keywords.
481
+
482
+ Explicit entry points that actually exist:
483
+
484
+ | Entry | What it does |
485
+ |---|---|
486
+ | `Skill(zcode-expert-system)` | Invoke the skill with a task description |
487
+ | `/wf:triage <task>` | Dual-axis triage: scale + domain routing in one call (readonly/light/medium/large/bug; readonly dispatches analyst) |
488
+ | `/wf:plan <task>` | Full dispatch plan (role × expert) |
489
+ | `/wf:check` | Mechanical gate check on the current change/plan |
490
+
491
+ > Note: there is **no** `/zcode-expert-system` slash command. The plugin's `commands/`
492
+ > namespace only contains the `/wf:*` family (`commands/wf/*.md`).
493
+
494
+ What happens:
495
+
496
+ 1. Task is classified (e.g. `backend-architecture`)
497
+ 2. Domain manager is resolved (`manager-backend-architecture`)
498
+ 3. Best-matching specialist is selected from that category
499
+ 4. An executable dispatch order is returned (`status: pending_dispatch`)
500
+ 5. The controller dispatches via `Agent(subagent_type="后端架构师")`
501
+ 6. Context flows across stages
502
+
503
+ ### Categories covered
504
+
505
+ | Category | Description |
506
+ |---|---|
507
+ | frontend-client | Frontend & client apps |
508
+ | backend-architecture | Backend & architecture |
509
+ | data-database | Data & databases |
510
+ | devops-operations | DevOps & operations |
511
+ | ai-llm | AI & large models |
512
+ | embedded-iot | Embedded & IoT |
513
+ | network-engineering | Network engineering |
514
+ | engineering-quality | Engineering quality |
515
+ | security-compliance | Security & compliance |
516
+ | data-testing | Data & testing |
517
+ | design-creative | Design & creative |
518
+ | marketing-growth | Marketing & growth |
519
+ | paid-media | Paid media |
520
+ | sales-customer | Sales & customer |
521
+ | business-strategy | Business & strategy |
522
+ | healthcare | Healthcare |
523
+ | supply-chain | Supply chain & logistics |
524
+ | legal-compliance | Legal & compliance |
525
+ | hr | Human resources |
526
+ | finance-tax | Finance & tax |
527
+ | academic-research | Academic research |
528
+ | government-public | Government & public service |
529
+ | business-support | Business support services |
530
+ | data-knowledge | Knowledge services |
531
+ | game-dev | Game development |
532
+ | spatial-computing | Spatial computing & XR |
533
+ | gis | Geographic information systems |
534
+ | project-management | Project management |
535
+ | product-management | Product management |
536
+ | customer-support | Customer support |
537
+ | language-translation | Language & translation |
538
+ | agent-governance | Agent identity & governance |
539
+
540
+ Full rosters live in each manager's "管辖范围" (scope) table, or in `config/experts.json`.
541
+
542
+ ## 🤖 Registered sub-agents
543
+
544
+ After installation, ZCode can dispatch **363 sub-agents**:
545
+
546
+ | Type | Count | Location | Dispatch |
547
+ |---|---|---|---|
548
+ | Domain manager | 32 | `~/.zcode/agents/manager-*.md` | `Agent(subagent_type="manager-backend-architecture")` |
549
+ | Specialist | 331 | `~/.zcode/agents/expert-*.md` | `Agent(subagent_type="后端架构师")` |
550
+
551
+ > Note: managers are addressed by their **slug** (`manager-<category>`), because
552
+ > `install.js` writes `name: "<slug>"` into the deployed agent frontmatter.
553
+ > Specialists are addressed by their **Chinese display name**. Mixing the two up
554
+ > makes the `Agent` call fail to resolve.
555
+
556
+ > `subagent_type` takes the **display name** (the `name:` field in the agent markdown).
557
+ > If a name is missing from the session's agent list, fall back to reading that expert's
558
+ > prompt file and adopting its persona directly.
559
+
560
+ ⚠️ **Restart ZCode after changing agent files** — the agent list is a snapshot taken at
561
+ session start; additions or edits made mid-session are not picked up.
562
+
563
+ ## 📁 Project layout
564
+
565
+ ```
566
+ zcode-expert-system/
567
+ ├── .zcode-plugin/plugin.json # Plugin manifest
568
+ ├── .claude-plugin/plugin.json # Claude Code manifest
569
+ ├── SKILL.md # ZCode skill entry
570
+ ├── README.md / README_CN.md # English / Chinese docs
571
+ ├── zcode_expert_system.py # Domain axis (32 categories → 331 experts)
572
+ ├── zcode_dev_workflow.py # Scale axis (triage → stages → dispatch plan)
573
+ ├── skill_entry.py # Skill invocation wrapper
574
+ ├── package.json # npm package config
575
+ ├── src/
576
+ │ └── auth/ # jwt-auth-system (openspec, in progress; not shipped — UNPACKED_COMPONENTS)
577
+ ├── scripts/
578
+ │ ├── install.js # ZCode deploy / uninstall
579
+ │ ├── install-claude-code.js # Claude Code deploy (preflight + backup + rollback)
580
+ │ ├── cc-uninstall.js # Claude Code uninstall
581
+ │ ├── workflow_check.py # Mechanical gate checker (+ --self-check)
582
+ │ ├── openspec_engine.py # OpenSpec change/spec engine
583
+ │ ├── llm_client.py # LLM call helper
584
+ │ └── embedding_client.py # Embedding client
585
+ ├── config/
586
+ │ ├── experts.json # 331 expert records
587
+ │ ├── categories.json # 32 category definitions
588
+ │ └── workflow.json # Single source of truth: stages/gates/states/trim
589
+ ├── commands/
590
+ │ └── wf/*.md # 12 slash commands (/wf:triage, /wf:check, …)
591
+ ├── references/
592
+ │ ├── stage-S0..S8*.md # 9 stage specs
593
+ │ ├── roles/*.md # 4 role contracts (orchestrator/implementer/reviewer/investigator)
594
+ │ └── workflow-tree.md # Workflow tree & recovery
595
+ ├── templates/
596
+ │ ├── plan-sections.md # Plan doc template (12 required sections)
597
+ │ ├── progress.md # SDD ledger template (7-state)
598
+ │ └── *.md # task-report / review-report / bug-report / minimal-contract
599
+ ├── docs/
600
+ │ └── workflow-fusion-design.md # Design baseline (why this architecture)
601
+ ├── context/
602
+ │ └── context-manager.py # Context manager (data in ~/.zcode/expert-system/context/)
603
+ ├── tests/ # Regression tests (pytest, 639 passed / 1 skipped)
604
+ ├── hooks/
605
+ │ ├── hooks.json # Hook config (ZCode standard schema)
606
+ │ ├── claude-hooks.json # Hook config (Claude Code format)
607
+ │ └── prepend-global-rules-reminder.mjs # Injects trigger rules before each prompt
608
+ └── agents/
609
+ ├── manager-*.md # 32 domain manager definitions
610
+ └── expert-*.md # 331 expert persona prompts
611
+ ```
612
+
613
+ ## 🛠️ Development
614
+
615
+ ### Local development
616
+
617
+ ```bash
618
+ git clone https://github.com/wutian122/zcode-expert-system.git
619
+ cd zcode-expert-system
620
+
621
+ # Run routing only (no dispatch)
622
+ python zcode_expert_system.py "Design a high-concurrency backend API"
623
+
624
+ # Check classification
625
+ python -c "from zcode_expert_system import zcode_expert_system; print(zcode_expert_system('run a penetration test')['category'])"
626
+ ```
627
+
628
+ ### Contributing
629
+
630
+ 1. Fork this repository
631
+ 2. Create a feature branch: `git checkout -b feat/your-feature`
632
+ 3. Commit your changes: `git commit -m 'feat: add your feature'`
633
+ 4. Push the branch: `git push origin feat/your-feature`
634
+ 5. Open a Pull Request
635
+
636
+ Before opening the PR, make sure the full regression suite is green:
637
+
638
+ ```bash
639
+ python -m pytest tests/ -q # must end with "passed", 0 failed
640
+ ```
641
+
642
+ Expected baseline: **639 passed, 1 skipped**.
643
+
644
+ > Note on `src/auth/`: the JWT auth module (`jwt-auth-system` OpenSpec change) is under
645
+ > construction and covered by `tests/test_auth_login.py`. Its implementation choices are
646
+ > deliberate: password hashing is **PBKDF2-HMAC-SHA256, 100 000 iterations**, 16-byte
647
+ > random salt, stored base64(`salt||dk`) (bcrypt is a documented fallback, not a
648
+ > dependency); refresh tokens are **`secrets.token_urlsafe(32)`** (256-bit entropy) and
649
+ > only their **sha256 hash** is persisted; `expires_at` is stored and parsed as an
650
+ > **ISO 8601 string** via `datetime.fromisoformat`; JWT verification parses the header
651
+ > and whitelists **`alg=HS256` and `typ=JWT`** before checking the signature.
652
+
653
+ ## 📄 License
654
+
655
+ Released under the [MIT License](LICENSE).
656
+
657
+ ## 🔗 引用来源与开源依赖
658
+
659
+ 本项目在以下开源项目与能力体系的基础上进行了 ZCode 平台适配与工程化改造:
660
+
661
+ | 来源 | 用途 | 项目地址 |
662
+ |---|---|---|
663
+ | **dsh-agency-agents** | 331 位专家完整人格提示词(专家库来源) | https://github.com/MichengAI/dsh-agency-agents |
664
+ | **Superpowers** | 工程能力体系(brainstorming、writing-plans、sdd、tdd、verification、code-review、finishing 等能力) | 待项目方补充 GitHub 地址 |
665
+ | **OpenSpec** | 规格驱动开发体系(change 提案、规格同步、归档工作流) | 待项目方补充 GitHub 地址 |
666
+
667
+ 本项目在此基础上增加了 ZCode 平台适配与工程化改造:三层路由架构(分类 → 总经理 → 专家)、两轴正交路由(规模轴 + 域轴)、九阶段受控工作流、机械门禁核对、七态状态机、证据分级与冲突裁决。
668
+
669
+ ## 🙏 Acknowledgements
670
+
671
+ Expert persona prompts come from the [dsh-agency-agents](https://github.com/MichengAI/dsh-agency-agents)
672
+ open-source project. This plugin adds ZCode adaptation and engineering work: three-layer
673
+ routing, domain manager task decomposition, and dynamic expert dispatch.
674
+
675
+ ## 📞 Contact
676
+
677
+ Questions or suggestions? Open a GitHub Issue.
678
+
679
+ ---
680
+
681
+ **ZCode Expert System v3.2.2** — smarter collaboration between AI experts 🚀