zcode-expert-system 0.0.0-stage → 3.2.1

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 (452) hide show
  1. package/.zcode-plugin/plugin.json +25 -0
  2. package/LICENSE +30 -0
  3. package/README.md +548 -2
  4. package/README_CN.md +444 -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 +67 -0
  370. package/commands/wf/archive.md +107 -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 +76 -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 +847 -0
  385. package/context/context-manager.py +317 -0
  386. package/docs/workflow-fusion-design.md +239 -0
  387. package/hooks/hooks.json +20 -0
  388. package/hooks/prepend-global-rules-reminder.mjs +297 -0
  389. package/package.json +51 -3
  390. package/references/openspec-manual-mode.md +97 -0
  391. package/references/roles/analyst.md +62 -0
  392. package/references/roles/implementer.md +67 -0
  393. package/references/roles/investigator.md +88 -0
  394. package/references/roles/orchestrator.md +66 -0
  395. package/references/roles/reviewer.md +103 -0
  396. package/references/stage-S0-triage.md +56 -0
  397. package/references/stage-S1-design.md +53 -0
  398. package/references/stage-S2-spec.md +134 -0
  399. package/references/stage-S3-plan.md +84 -0
  400. package/references/stage-S4-env-baseline.md +80 -0
  401. package/references/stage-S5-implement.md +138 -0
  402. package/references/stage-S6-verify-review.md +80 -0
  403. package/references/stage-S7-deliver.md +81 -0
  404. package/references/stage-S8-sync-archive.md +162 -0
  405. package/references/workflow-tree.md +98 -0
  406. package/scripts/embedding_client.py +44 -0
  407. package/scripts/install.js +898 -0
  408. package/scripts/llm_client.py +202 -0
  409. package/scripts/openspec_engine.py +632 -0
  410. package/scripts/sdd/review-package +65 -0
  411. package/scripts/sdd/sdd-workspace +108 -0
  412. package/scripts/sdd/task-brief +49 -0
  413. package/scripts/workflow_check.py +1942 -0
  414. package/skill_entry.py +193 -0
  415. package/templates/bug-report.md +86 -0
  416. package/templates/minimal-contract.md +54 -0
  417. package/templates/plan-sections.md +190 -0
  418. package/templates/progress.md +89 -0
  419. package/templates/review-report.md +51 -0
  420. package/templates/task-report.md +84 -0
  421. package/vendor/skills/LICENSE +21 -0
  422. package/vendor/skills/PROVENANCE.md +79 -0
  423. package/vendor/skills/zes-brainstorming/SKILL.md +302 -0
  424. package/vendor/skills/zes-brainstorming/builder-check-prompt.md +23 -0
  425. package/vendor/skills/zes-code-review/SKILL.md +103 -0
  426. package/vendor/skills/zes-finishing/SKILL.md +233 -0
  427. package/vendor/skills/zes-openspec-apply-change/SKILL.md +206 -0
  428. package/vendor/skills/zes-openspec-archive-change/SKILL.md +221 -0
  429. package/vendor/skills/zes-openspec-explore/SKILL.md +356 -0
  430. package/vendor/skills/zes-openspec-propose/SKILL.md +175 -0
  431. package/vendor/skills/zes-openspec-sync-specs/SKILL.md +290 -0
  432. package/vendor/skills/zes-openspec-update-change/SKILL.md +109 -0
  433. package/vendor/skills/zes-receiving-review/SKILL.md +213 -0
  434. package/vendor/skills/zes-sdd/SKILL.md +345 -0
  435. package/vendor/skills/zes-sdd/references/batching.md +11 -0
  436. package/vendor/skills/zes-sdd/references/cannot-verify.md +10 -0
  437. package/vendor/skills/zes-sdd/references/final-review.md +47 -0
  438. package/vendor/skills/zes-sdd/references/fix-loop.md +77 -0
  439. package/vendor/skills/zes-sdd/references/handling-reports.md +15 -0
  440. package/vendor/skills/zes-sdd/references/preflight.md +26 -0
  441. package/vendor/skills/zes-sdd/references/resuming.md +12 -0
  442. package/vendor/skills/zes-systematic-debugging/SKILL.md +291 -0
  443. package/vendor/skills/zes-systematic-debugging/condition-based-waiting.md +115 -0
  444. package/vendor/skills/zes-systematic-debugging/defense-in-depth.md +122 -0
  445. package/vendor/skills/zes-systematic-debugging/find-polluter.sh +72 -0
  446. package/vendor/skills/zes-systematic-debugging/root-cause-tracing.md +169 -0
  447. package/vendor/skills/zes-tdd/SKILL.md +338 -0
  448. package/vendor/skills/zes-tdd/writing-good-tests.md +198 -0
  449. package/vendor/skills/zes-verification/SKILL.md +128 -0
  450. package/vendor/skills/zes-writing-plans/SKILL.md +212 -0
  451. package/zcode_dev_workflow.py +1136 -0
  452. package/zcode_expert_system.py +1016 -0
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "zcode-expert-system",
3
+ "description": "ZCode Expert System v3.2 - 331 experts in 32 top-level categories with two-axis routing (scale -> nine-stage workflow, domain -> expert). Fuses OpenSpec + Superpowers + multi-agent + TDD.",
4
+ "description_i18n": {
5
+ "en": "ZCode Expert System v3.2 - 331 experts in 32 top-level categories with two-axis routing (scale -> nine-stage workflow, domain -> expert). Fuses OpenSpec + Superpowers + multi-agent + TDD.",
6
+ "zh-CN": "ZCode 专家体系 v3.2 - 331 位专家 / 32 个一级大类,两轴正交路由(规模→九阶段工作流,领域→专家)。融合 OpenSpec 规格、Superpowers 纪律、多 Agent 协作与 TDD。"
7
+ },
8
+ "version": "3.2.1",
9
+ "author": {
10
+ "name": "wutian122"
11
+ },
12
+ "skills": "skills",
13
+ "commands": "commands",
14
+ "hooks": "hooks/hooks.json",
15
+ "keywords": [
16
+ "expert-system",
17
+ "routing",
18
+ "agents",
19
+ "workflow",
20
+ "openspec",
21
+ "superpowers",
22
+ "tdd",
23
+ "zcode"
24
+ ]
25
+ }
package/LICENSE ADDED
@@ -0,0 +1,30 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 wutian122
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ ---
24
+
25
+ Third-party notice:
26
+
27
+ The expert persona prompts bundled under `agents/expert-*.md` are derived from
28
+ the dsh-agency-agents project (https://github.com/MichengAI/dsh-agency-agents),
29
+ which is distributed under the Apache License 2.0. Those prompt files remain
30
+ subject to the upstream license and attribution requirements.
package/README.md CHANGED
@@ -1,3 +1,549 @@
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 for ZCode. It ships the full persona prompts of **331 specialists** from [dsh-agency-agents](https://github.com/MichengAI/dsh-agency-agents), adapted to ZCode with **two-axis routing**: the *scale axis* decides how long a workflow runs, the *domain axis* decides which expert handles it.
8
+
9
+ ## 🏗️ Plugin Architecture
10
+
11
+ ### System Overview
12
+
13
+ ZCode Expert System v3.2.1 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**:
14
+
15
+ | Axis | Question | Implementation |
16
+ |---|---|---|
17
+ | **Scale axis** | How long to run (which stages, how many gates) | `zcode_dev_workflow.py` → readonly/light/medium/large/bug, `trim_matrix` + `minimum_gates` |
18
+ | **Domain axis** | Which expert handles it | `zcode_expert_system.py` → 32 categories → 331 specialists, `subagent_type` |
19
+
20
+ **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).
21
+
22
+ ```
23
+ User task
24
+ │
25
+ ├─── Scale axis (zcode_dev_workflow.py) ─────────────────────┐
26
+ │ readonly / light / medium / large / bug │
27
+ │ → which of the 9 stages to run (trim_matrix) │
28
+ │ → how many gates must pass (minimum_gates) │
29
+ │ │
30
+ └─── Domain axis (zcode_expert_system.py) ──────────────────┐
31
+ 32 categories → 331 specialists │
32
+ → subagent_type (expert display name) │
33
+ ▼
34
+ Two-axis dispatch plan
35
+ ```
36
+
37
+ ### Three-Layer Routing (Domain Axis)
38
+
39
+ Within the domain axis, routing happens in three layers:
40
+
41
+ ```
42
+ User task
43
+ │
44
+ ▼
45
+ ┌─────────────────────────────────┐
46
+ │ Layer 1: Task Classification │
47
+ │ 32 top-level categories │
48
+ └──────────┬──────────────────────┘
49
+ │
50
+ ▼
51
+ ┌─────────────────────────────────┐
52
+ │ Layer 2: Domain Manager (32) │
53
+ │ Task decomposition & dispatch │
54
+ │ addressed by slug `manager-<cat>`│
55
+ └──────────┬──────────────────────┘
56
+ │
57
+ ▼
58
+ ┌─────────────────────────────────┐
59
+ │ Layer 3: Specialist (331) │
60
+ │ Registered as ZCode sub-agents │
61
+ │ addressed by Chinese display │
62
+ │ name, e.g. "后端架构师" │
63
+ └─────────────────────────────────┘
64
+ ```
65
+
66
+ **Dispatch flow**:
67
+
68
+ 1. **Classify** the task into one of 32 categories (`zcode_expert_system.classify_task_detailed`)
69
+ 2. **Route** to the matching domain manager (`manager-<category>`)
70
+ 3. **Coarse-screen** candidate specialists in that category (Top-5 by embedding or token-overlap)
71
+ 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
72
+ 5. **Dispatch** via `Agent(subagent_type="<specialist display name>")` with a process-contract prefix
73
+ 6. **Propagate** context across stages via return values
74
+
75
+ > **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)`.
76
+
77
+ ### Role × Specialist Matrix (Workflow Roles)
78
+
79
+ Workflow roles are **responsibilities**; 331 specialists are **domain capabilities**. They combine orthogonally:
80
+
81
+ | Role | Dispatched by | Core constraints |
82
+ |---|---|---|
83
+ | **Orchestrator** | ❌ Controller self-tasks | Sole state writer, runs verification, records Rulings |
84
+ | **Implementer** | ✅ Domain specialist | No sub-delegation; cannot exceed brief scope; TDD required |
85
+ | **Reviewer** | ✅ **Different-domain** specialist | Read-only; does not trust self-assessment; must give spec + quality dual conclusions |
86
+ | **Investigator** | ✅ Domain specialist | Read-only; conclusions carry `file:line` evidence |
87
+ | **Analyst** | ✅ Domain specialist | Read-only analysis; four-part "phenomenon → cause → impact → suggestion"; domain judgment not left to controller |
88
+
89
+ **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.
90
+
91
+ ### Reviewer Independence
92
+
93
+ Only 1 of the 331 specialists is "Code Reviewer", so independence cannot rely on "more types". Three guarantees:
94
+
95
+ 1. `type ≠` Implementer (different specialist)
96
+ 2. `instance ≠` independently dispatched, independent context
97
+ 3. `input isolation` — only brief / report / change-set, no dialogue context
98
+
99
+ Independence level must be recorded: **L0** (independent sub-agent, deliverable) / **L1** (controller self-review downgrade, must be declared) / **L2** (no review, delivery prohibited).
100
+
101
+ ### Seven-State State Machine (Single Source of Truth)
102
+
103
+ `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.
104
+
105
+ Key transitions:
106
+
107
+ | Transition | Trigger | Evidence |
108
+ |---|---|---|
109
+ | `IN_PROGRESS → REVIEW` | Implementer reports DONE / DONE_WITH_CONCERNS | Non-empty change set + report contains command exit codes |
110
+ | `REVIEW → DONE` | Reviewer gives spec ✅ + quality pass | Dual conclusions + controller runs full test suite green |
111
+ | `NEEDS_FIX → PARKED` | 5 fix rounds still open, controller decision | Ruling line with cost |
112
+ | `DONE → NEEDS_FIX` | Regression breakage found before archive | Real RED output + tasks.md rollback |
113
+
114
+ 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.
115
+
116
+ ### Evidence Levels (Anti-Loss)
117
+
118
+ | Level | Location | Content | Lifecycle |
119
+ |---|---|---|---|
120
+ | **P1** | File snapshot hash or git commit | What actually changed | Archived after delivery |
121
+ | **P2** | `openspec/changes/<n>/tasks.md` + plan `## Rulings` | Completion, ADR decisions | Permanent after archive |
122
+ | **P3** | Plan doc `## Baseline` / `## Review` / `## Rulings` / `## Integration Verification` | Baseline, review, ruling, delivery re-test | With repository |
123
+ | **P4** | `.superpowers/sdd/<plan>/` | ledger / brief / report / snapshot | **Deleted after final review; must export to P3 first** |
124
+
125
+ > **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.
126
+
127
+ ### No-Git-Worktree Parallel Model
128
+
129
+ The system **does not use Git Worktree**. Conserved relationship:
130
+
131
+ | Kept parallel | Cancelled parallel |
132
+ |---|---|
133
+ | ✅ Read-only investigation parallel (multiple unrelated failure investigations by domain) | ❌ **Multi-agent implementation parallel** |
134
+ | ✅ Review parallel (multiple Reviewers same batch, read-only, no conflict) | — |
135
+
136
+ **Reason**: without an isolated workspace there cannot be two writers. Implementation is **always serial** — this is conservation, not conservatism.
137
+
138
+ **Git is an optional enhancement layer**:
139
+
140
+ | Detection | Change-set source | Wrap-up |
141
+ |---|---|---|
142
+ | Has git | `review-package` `BASE..HEAD` diff | Finishing: one of three options |
143
+ | No git (default) | File snapshot sha256 difference + changed file full text | Change-list acceptance |
144
+
145
+ **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.
146
+
147
+ The controller does **not** run `git init` for the boss's project without permission.
148
+
149
+ ### Conflict Resolutions (10 Rulings, `workflow.json` → `conflict_rulings`)
150
+
151
+ | # | Ruling |
152
+ |---|---|
153
+ | W1 | No worktree → no implementation parallel; keep read-only investigation & review parallel |
154
+ | 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" |
155
+ | W3 | `apply-change` straight-through and SDD mode are **mutually exclusive**; same change must not mix |
156
+ | 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 |
157
+ | W5 | Three evidences: change set + report with command exit codes + **controller runs full suite personally** |
158
+ | W6 | Dispatch prompt's first segment hard-declares "process contract takes precedence over specialist persona" |
159
+ | W7 | Git detection failure → snapshot evidence + controller self-review (record L1), declare downgrade in delivery |
160
+ | W8 | PARKED defaults to **no archive**; "accept not fix" must migrate to a new change |
161
+ | W9 | Agent dispatch has no `model` parameter; control cost by **specialist granularity + task granularity**; "upgrade" = switch to a more specialized expert |
162
+ | 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 |
163
+
164
+ ### Nine-Stage Workflow (Detailed)
165
+
166
+ 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.
167
+
168
+ #### S0 — Requirement Triage (G0, P4)
169
+ - **Owner**: Orchestrator (controller)
170
+ - **Artifacts**: category conclusion, domain routing result (category + expert name), impact scope identification
171
+ - **Gate**: Requirement clear, classified, impact identified, domain routing completed and stated
172
+ - **Exit criteria**: Classification stated in session; impact scope identified; no blocking ambiguity; git/openspec root detected and branched accordingly; domain routing completed and stated
173
+ - **Fail return**: S0
174
+
175
+ #### S1 — Requirement Clarification & Design (G1, no evidence level, stop for owner)
176
+ - **Owner**: Orchestrator (controller)
177
+ - **Components**: zes-brainstorming
178
+ - **Artifacts**: 2-3 options comparison + recommendation, acceptance criteria, explicit exclusions (not persisted to design.md, shown in conversation only)
179
+ - **Gate**: Boss explicitly approves (yes); acceptance criteria written; exclusions explicit
180
+ - **Fail return**: S1
181
+
182
+ #### S2 — OpenSpec Spec Planning (G2, P2, stop for owner)
183
+ - **Owner**: Orchestrator (controller)
184
+ - **Components**: zes-openspec-propose, zes-openspec-update-change
185
+ - **Artifacts**: `openspec/changes/<change>/proposal.md`, `design.md`, `tasks.md`, `.openspec.yaml`, `openspec/changes/<change>/specs/<capability>/spec.md`
186
+ - **Gate**: OpenSpec artifacts complete and boss-reviewed; applyRequires and reachable products via requires edges all done/skipped; seven spec reviews passed
187
+ - **Fail return**: S2
188
+
189
+ #### S3 — Implementation Plan (G3, P3)
190
+ - **Owner**: Orchestrator (controller)
191
+ - **Components**: zes-writing-plans
192
+ - **Artifacts**: `docs/superpowers/plans/<date>-<feature>.md` containing Goal / Architecture / Tech Stack / Spec / Review Focus / Global Constraints / Dependencies / File Scope
193
+ - **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)
194
+ - **Fail return**: S2
195
+
196
+ #### S4 — Environment & Baseline Test (G4, P3+P4, stop for owner when baseline red)
197
+ - **Owner**: Orchestrator (controller)
198
+ - **Components**: baseline-test
199
+ - **Artifacts**: `.superpowers/sdd/<plan>/.gitignore`, `progress.md` (first line `# SDD ledger — plan:`)
200
+ - **Gate**: Baseline test recorded; baseline failure list persisted (if any); baseline master copy written into plan `## Baseline` section; ledger first line is account identity
201
+ - **Fail return**: S4
202
+
203
+ #### S5 — Code Implementation & Multi-Agent Collaboration (G5 per task, P4→P2)
204
+ - **Owner**: Implementer (domain specialist)
205
+ - **Components**: zes-sdd + zes-tdd + zes-openspec-apply-change
206
+ - **Artifacts**: `task-<N>-brief.md`, `task-<N>-report.md`, `snapshot-before-/after-<N>.json` (no-git: downgraded to non-required)
207
+ - **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
208
+ - **Fail return**: S5; max_fix_rounds 5
209
+
210
+ #### S6 — Verification & Review (G6+G7, P3)
211
+ - **Owner**: Reviewer (different-domain specialist)
212
+ - **Components**: zes-verification + zes-code-review
213
+ - **Artifacts**: `review-<range>.diff` (git only), `review-<N>.md`
214
+ - **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
215
+ - **Fail return**: S5
216
+
217
+ #### S7 — Delivery & Integration (G8a, P3, stop for owner)
218
+ - **Owner**: Orchestrator (controller)
219
+ - **Components**: zes-finishing
220
+ - **Artifacts**: `docs/superpowers/plans/<plan>#Integration Verification` section
221
+ - **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`
222
+ - **Fail return**: S5
223
+
224
+ #### S8 — Spec Sync & Archive (G8b, P2, stop for owner)
225
+ - **Owner**: Orchestrator (controller)
226
+ - **Components**: zes-openspec-sync-specs, zes-openspec-archive-change
227
+ - **Artifacts**: `openspec/specs/<capability>/spec.md`, `openspec/changes/archive/<date>-<change>/`
228
+ - **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
229
+ - **Fail return**: S8
230
+
231
+ #### Scale Trim Matrix (`trim_matrix`)
232
+
233
+ | Scale | S0 | S1 | S2 | S3 | S4 | S5 | S6 | S7 | S8 |
234
+ |---|---|---|---|---|---|---|---|---|---|
235
+ | readonly | 必 | - | - | - | - | - | - | - | - |
236
+ | light | 必 | 简 | 条 | 简 | 必 | 必 | 简 | 必 | 条 |
237
+ | medium | 必 | 必 | 必 | 必 | 必 | 必 | 必 | 必 | 必 |
238
+ | large | 必 | 必 | 必 | 必 | 必 | 必 | 必 | 必 | 必 |
239
+ | bug | 必 | 条 | 条 | 条 | 条 | 必 | 必 | 必 | 条 |
240
+
241
+ > `必` = full execution, `简` = simplified, `条` = conditional (currently treated as `必`, see workflow-fusion-design.md section 3), `-` = skipped. **Scale can only be upgraded, never downgraded.**
242
+
243
+ #### Bug Special Method (zes-systematic-debugging core)
244
+
245
+ **Iron rule: no root cause, no fix; no failing test, no code change.**
246
+
247
+ - **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**
248
+ - **Phase 2 Pattern Analysis**: Find similar working code in same repo, diff every condition, don't dismiss any difference, clarify dependencies and assumptions
249
+ - **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
250
+ - **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)
251
+ - **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
252
+ - **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")
253
+ - **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
254
+
255
+ #### Seven-State State Machine (Single Source of Truth)
256
+
257
+ `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.
258
+
259
+ 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.
260
+
261
+ ### Mechanical Checks (No Reliance on Consciousness)
262
+
263
+ ```bash
264
+ python "$ZCODE_PLUGIN_ROOT/skills/zcode-expert-system/scripts/workflow_check.py" --change <change> --plan <plan.md> --scale medium
265
+ ```
266
+
267
+ 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.
268
+
269
+ Exit code: `0` no FAIL, `1` has FAIL (must not proceed to next stage).
270
+
271
+ > A pure Markdown checklist will be skipped — it must be mechanically verifiable.
272
+
273
+ ### 32 categories
274
+
275
+ | Category | Experts | Category | Experts |
276
+ |---|---|---|---|
277
+ | frontend-client | 8 | supply-chain | 5 |
278
+ | backend-architecture | 18 | legal-compliance | 6 |
279
+ | data-database | 8 | hr | 7 |
280
+ | devops-operations | 7 | finance-tax | 14 |
281
+ | ai-llm | 9 | academic-research | 10 |
282
+ | embedded-iot | 6 | government-public | 1 |
283
+ | network-engineering | 3 | business-support | 6 |
284
+ | engineering-quality | 10 | data-knowledge | 2 |
285
+ | security-compliance | 19 | game-dev | 21 |
286
+ | data-testing | 15 | spatial-computing | 6 |
287
+ | design-creative | 14 | gis | 13 |
288
+ | marketing-growth | 45 | project-management | 9 |
289
+ | paid-media | 7 | product-management | 6 |
290
+ | sales-customer | 10 | customer-support | 10 |
291
+ | business-strategy | 18 | language-translation | 2 |
292
+ | healthcare | 7 | agent-governance | 9 |
293
+
294
+ ## 📦 Installation
295
+
296
+ ### Option 1: npm (recommended)
297
+
298
+ ```bash
299
+ # 1. Install globally
300
+ npm install -g zcode-expert-system
301
+
302
+ # 2. Deploy into ZCode
303
+ zcode-expert-system install
304
+
305
+ # 3. Restart ZCode (the agent list is a startup snapshot — a restart is required)
306
+ ```
307
+
308
+ The installer will:
309
+
310
+ - Create the plugin cache directory and manifest (ZCode identifies plugins by it)
311
+ - Install the skill to `~/.zcode/skills/zcode-expert-system/`
312
+ - Install plugin-level hooks at the plugin root `hooks/`
313
+ - Install 32 manager + 331 expert sub-agents into `~/.zcode/agents/`
314
+ - Register into `~/.zcode/cli/plugins/installed_plugins.json`
315
+
316
+ ### Option 2: From source
317
+
318
+ ```bash
319
+ git clone https://github.com/wutian122/zcode-expert-system.git
320
+ cd zcode-expert-system
321
+ npm install
322
+ zcode-expert-system install
323
+ ```
324
+
325
+ > Note: the `skills` field in `.zcode-plugin/plugin.json` only takes effect in the
326
+ > deployed layout (after `install.js` runs); for direct-from-repo use, point the
327
+ > skill directory at the repository root.
328
+
329
+ ### Option 3: ZCode plugin marketplace
330
+
331
+ (Not yet published — use Option 1 (npm) for now.) Search for `zcode-expert-system`
332
+ in the ZCode plugin marketplace and click install.
333
+
334
+ ### Uninstall
335
+
336
+ ```bash
337
+ zcode-expert-system uninstall
338
+ # or
339
+ node scripts/install.js --uninstall
340
+ ```
341
+
342
+ ## ⚙️ Configuration
343
+
344
+ ### No separate LLM/Embedding service needed
345
+
346
+ The plugin uses **the model already active in your session**:
347
+
348
+ - **Classification**: current session model
349
+ - **Expert selection**: current session model
350
+ - **Coarse screening**: Embedding when available, otherwise token-overlap scoring
351
+
352
+ > Accuracy improves automatically as your session model improves — nothing to configure.
353
+
354
+ ### Fallback behaviour
355
+
356
+ - **LLM unavailable** → longest-keyword match + token-overlap scoring
357
+ - **Embedding unavailable** → token-overlap scoring (name weighted 3×, plus description and prompt content)
358
+
359
+ Both fallbacks run locally with no network dependency; routing never fails.
360
+
361
+ ## 🚀 Usage
362
+
363
+ ### Invoking the expert system
364
+
365
+ Just describe a professional task in a ZCode session — the `UserPromptSubmit` hook injects
366
+ the routing rules automatically and the skill triggers on domain keywords.
367
+
368
+ Explicit entry points that actually exist:
369
+
370
+ | Entry | What it does |
371
+ |---|---|
372
+ | `Skill(zcode-expert-system)` | Invoke the skill with a task description |
373
+ | `/wf:triage <task>` | Dual-axis triage: scale + domain routing in one call (readonly/light/medium/large/bug; readonly dispatches analyst) |
374
+ | `/wf:plan <task>` | Full dispatch plan (role × expert) |
375
+ | `/wf:check` | Mechanical gate check on the current change/plan |
376
+
377
+ > Note: there is **no** `/zcode-expert-system` slash command. The plugin's `commands/`
378
+ > namespace only contains the `/wf:*` family (`commands/wf/*.md`).
379
+
380
+ What happens:
381
+
382
+ 1. Task is classified (e.g. `backend-architecture`)
383
+ 2. Domain manager is resolved (`manager-backend-architecture`)
384
+ 3. Best-matching specialist is selected from that category
385
+ 4. An executable dispatch order is returned (`status: pending_dispatch`)
386
+ 5. The controller dispatches via `Agent(subagent_type="后端架构师")`
387
+ 6. Context flows across stages
388
+
389
+ ### Categories covered
390
+
391
+ | Category | Description |
392
+ |---|---|
393
+ | frontend-client | Frontend & client apps |
394
+ | backend-architecture | Backend & architecture |
395
+ | data-database | Data & databases |
396
+ | devops-operations | DevOps & operations |
397
+ | ai-llm | AI & large models |
398
+ | embedded-iot | Embedded & IoT |
399
+ | network-engineering | Network engineering |
400
+ | engineering-quality | Engineering quality |
401
+ | security-compliance | Security & compliance |
402
+ | data-testing | Data & testing |
403
+ | design-creative | Design & creative |
404
+ | marketing-growth | Marketing & growth |
405
+ | paid-media | Paid media |
406
+ | sales-customer | Sales & customer |
407
+ | business-strategy | Business & strategy |
408
+ | healthcare | Healthcare |
409
+ | supply-chain | Supply chain & logistics |
410
+ | legal-compliance | Legal & compliance |
411
+ | hr | Human resources |
412
+ | finance-tax | Finance & tax |
413
+ | academic-research | Academic research |
414
+ | government-public | Government & public service |
415
+ | business-support | Business support services |
416
+ | data-knowledge | Knowledge services |
417
+ | game-dev | Game development |
418
+ | spatial-computing | Spatial computing & XR |
419
+ | gis | Geographic information systems |
420
+ | project-management | Project management |
421
+ | product-management | Product management |
422
+ | customer-support | Customer support |
423
+ | language-translation | Language & translation |
424
+ | agent-governance | Agent identity & governance |
425
+
426
+ Full rosters live in each manager's "管辖范围" (scope) table, or in `config/experts.json`.
427
+
428
+ ## 🤖 Registered sub-agents
429
+
430
+ After installation, ZCode can dispatch **363 sub-agents**:
431
+
432
+ | Type | Count | Location | Dispatch |
433
+ |---|---|---|---|
434
+ | Domain manager | 32 | `~/.zcode/agents/manager-*.md` | `Agent(subagent_type="manager-backend-architecture")` |
435
+ | Specialist | 331 | `~/.zcode/agents/expert-*.md` | `Agent(subagent_type="后端架构师")` |
436
+
437
+ > Note: managers are addressed by their **slug** (`manager-<category>`), because
438
+ > `install.js` writes `name: "<slug>"` into the deployed agent frontmatter.
439
+ > Specialists are addressed by their **Chinese display name**. Mixing the two up
440
+ > makes the `Agent` call fail to resolve.
441
+
442
+ > `subagent_type` takes the **display name** (the `name:` field in the agent markdown).
443
+ > If a name is missing from the session's agent list, fall back to reading that expert's
444
+ > prompt file and adopting its persona directly.
445
+
446
+ ⚠️ **Restart ZCode after changing agent files** — the agent list is a snapshot taken at
447
+ session start; additions or edits made mid-session are not picked up.
448
+
449
+ ## 📁 Project layout
450
+
451
+ ```
452
+ zcode-expert-system/
453
+ ├── .zcode-plugin/plugin.json # Plugin manifest
454
+ ├── SKILL.md # ZCode skill entry
455
+ ├── README.md / README_CN.md # English / Chinese docs
456
+ ├── zcode_expert_system.py # Domain axis (32 categories → 331 experts)
457
+ ├── zcode_dev_workflow.py # Scale axis (triage → stages → dispatch plan)
458
+ ├── skill_entry.py # Skill invocation wrapper
459
+ ├── package.json # npm package config
460
+ ├── scripts/
461
+ │ ├── install.js # One-click deploy / uninstall
462
+ │ ├── workflow_check.py # Mechanical gate checker (+ --self-check)
463
+ │ ├── llm_client.py # LLM call helper
464
+ │ └── embedding_client.py # Embedding client
465
+ ├── config/
466
+ │ ├── experts.json # 331 expert records
467
+ │ ├── categories.json # 32 category definitions
468
+ │ └── workflow.json # Single source of truth: stages/gates/states/trim
469
+ ├── commands/
470
+ │ └── wf/*.md # 12 slash commands (/wf:triage, /wf:check, …)
471
+ ├── references/
472
+ │ ├── stage-S0..S8*.md # 9 stage specs
473
+ │ ├── roles/*.md # 4 role contracts (orchestrator/implementer/reviewer/investigator)
474
+ │ └── workflow-tree.md # Workflow tree & recovery
475
+ ├── templates/
476
+ │ ├── plan-sections.md # Plan doc template (12 required sections)
477
+ │ ├── progress.md # SDD ledger template (7-state)
478
+ │ └── *.md # task-report / review-report / bug-report / minimal-contract
479
+ ├── docs/
480
+ │ └── workflow-fusion-design.md # Design baseline (why this architecture)
481
+ ├── context/
482
+ │ └── context-manager.py # Context manager (data in ~/.zcode/expert-system/context/)
483
+ ├── tests/ # Regression tests (pytest)
484
+ ├── hooks/
485
+ │ ├── hooks.json # Hook config (ZCode standard schema)
486
+ │ └── prepend-global-rules-reminder.mjs # Injects trigger rules before each prompt
487
+ └── agents/
488
+ ├── manager-*.md # 32 domain manager definitions
489
+ └── expert-*.md # 331 expert persona prompts
490
+ ```
491
+
492
+ ## 🛠️ Development
493
+
494
+ ### Local development
495
+
496
+ ```bash
497
+ git clone https://github.com/wutian122/zcode-expert-system.git
498
+ cd zcode-expert-system
499
+
500
+ # Run routing only (no dispatch)
501
+ python zcode_expert_system.py "Design a high-concurrency backend API"
502
+
503
+ # Check classification
504
+ python -c "from zcode_expert_system import zcode_expert_system; print(zcode_expert_system('run a penetration test')['category'])"
505
+ ```
506
+
507
+ ### Contributing
508
+
509
+ 1. Fork this repository
510
+ 2. Create a feature branch: `git checkout -b feat/your-feature`
511
+ 3. Commit your changes: `git commit -m 'feat: add your feature'`
512
+ 4. Push the branch: `git push origin feat/your-feature`
513
+ 5. Open a Pull Request
514
+
515
+ Before opening the PR, make sure the full regression suite is green:
516
+
517
+ ```bash
518
+ python -m pytest tests/ -q # must end with "passed", 0 failed
519
+ ```
520
+
521
+ ## 📄 License
522
+
523
+ Released under the [MIT License](LICENSE).
524
+
525
+ ## 🔗 引用来源与开源依赖
526
+
527
+ 本项目在以下开源项目与能力体系的基础上进行了 ZCode 平台适配与工程化改造:
528
+
529
+ | 来源 | 用途 | 项目地址 |
530
+ |---|---|---|
531
+ | **dsh-agency-agents** | 331 位专家完整人格提示词(专家库来源) | https://github.com/MichengAI/dsh-agency-agents |
532
+ | **Superpowers** | 工程能力体系(brainstorming、writing-plans、sdd、tdd、verification、code-review、finishing 等能力) | 待项目方补充 GitHub 地址 |
533
+ | **OpenSpec** | 规格驱动开发体系(change 提案、规格同步、归档工作流) | 待项目方补充 GitHub 地址 |
534
+
535
+ 本项目在此基础上增加了 ZCode 平台适配与工程化改造:三层路由架构(分类 → 总经理 → 专家)、两轴正交路由(规模轴 + 域轴)、九阶段受控工作流、机械门禁核对、七态状态机、证据分级与冲突裁决。
536
+
537
+ ## 🙏 Acknowledgements
538
+
539
+ Expert persona prompts come from the [dsh-agency-agents](https://github.com/MichengAI/dsh-agency-agents)
540
+ open-source project. This plugin adds ZCode adaptation and engineering work: three-layer
541
+ routing, domain manager task decomposition, and dynamic expert dispatch.
542
+
543
+ ## 📞 Contact
544
+
545
+ Questions or suggestions? Open a GitHub Issue.
546
+
547
+ ---
548
+
549
+ **ZCode Expert System v3.2.1** — smarter collaboration between AI experts 🚀