agency-orchestrator 0.6.17 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +25 -5
- package/README.md +46 -7
- package/dist/agents/loader.d.ts +24 -0
- package/dist/agents/loader.js +86 -0
- package/dist/cli/compose.d.ts +17 -0
- package/dist/cli/compose.js +88 -10
- package/dist/cli/demo.d.ts +5 -0
- package/dist/cli/demo.js +44 -0
- package/dist/cli/validate-report.d.ts +33 -0
- package/dist/cli/validate-report.js +120 -0
- package/dist/cli.js +149 -24
- package/dist/connectors/factory.js +7 -0
- package/dist/core/executor.d.ts +31 -0
- package/dist/core/executor.js +131 -7
- package/dist/core/parser.d.ts +1 -1
- package/dist/core/parser.js +35 -4
- package/dist/i18n.js +40 -4
- package/dist/index.d.ts +30 -1
- package/dist/index.js +66 -29
- package/dist/output/reporter.d.ts +17 -0
- package/dist/output/reporter.js +69 -1
- package/dist/types.d.ts +1 -1
- package/dist/utils/version-check.d.ts +12 -0
- package/dist/utils/version-check.js +42 -18
- package/package.json +14 -4
- package/web/DESIGN-SPEC.md +226 -0
- package/web/demo.html +923 -0
- package/web/index.html +1112 -0
- package/web/server.js +831 -0
- package/website/README.md +75 -0
- package/website/dist/_redirects +1 -0
- package/website/dist/assets/Changelog-BcsA9Bov.js +8 -0
- package/website/dist/assets/Docs-DOjLtUhy.js +85 -0
- package/website/dist/assets/Experts-DXno0NGT.js +1 -0
- package/website/dist/assets/Home-CbJ1TDTf.js +31 -0
- package/website/dist/assets/Markdown-Bzow1Vpv.js +29 -0
- package/website/dist/assets/NotFound-uiPyX3ay.js +1 -0
- package/website/dist/assets/SiteFooter-CmxkbWo9.js +1 -0
- package/website/dist/assets/Sponsors-CUdUVAdv.js +31 -0
- package/website/dist/assets/Studio-CSp8ClVS.js +147 -0
- package/website/dist/assets/TutorialDetail-D6yBdW9c.js +1 -0
- package/website/dist/assets/Tutorials-CoiC87Td.js +6 -0
- package/website/dist/assets/arrow-left-D9U0yzcz.js +6 -0
- package/website/dist/assets/arrow-up-right-BkyHb2Pn.js +6 -0
- package/website/dist/assets/badge-DBd7iyBW.js +1 -0
- package/website/dist/assets/clock-DLjku9Or.js +6 -0
- package/website/dist/assets/copy-Ccghacar.js +11 -0
- package/website/dist/assets/copy-button-C1UmP1vR.js +1 -0
- package/website/dist/assets/experts-CfeMleqE.js +1 -0
- package/website/dist/assets/index-D06RgvNw.js +87 -0
- package/website/dist/assets/index-xWprUagq.css +1 -0
- package/website/dist/assets/mail-rXFKXYHv.js +6 -0
- package/website/dist/assets/search-BMl5hFuf.js +6 -0
- package/website/dist/assets/sparkles-ZZObL-8b.js +11 -0
- package/website/dist/assets/sponsors-BUhIaeF3.js +6 -0
- package/website/dist/assets/tutorials-DGsg9mxy.js +29 -0
- package/website/dist/assets/users-D7OXhHmz.js +21 -0
- package/website/dist/assets/vendor-charts-BiMa1Zmo.js +68 -0
- package/website/dist/assets/vendor-framer-motion-ZdeJPCY2.js +1 -0
- package/website/dist/assets/vendor-radix-Bip5Pqfe.js +1 -0
- package/website/dist/assets/vendor-react-DvXH3HTt.js +67 -0
- package/website/dist/index.html +41 -0
- package/website/dist/prompts/en/academic/academic-anthropologist.md +117 -0
- package/website/dist/prompts/en/academic/academic-geographer.md +119 -0
- package/website/dist/prompts/en/academic/academic-historian.md +115 -0
- package/website/dist/prompts/en/academic/academic-narratologist.md +110 -0
- package/website/dist/prompts/en/academic/academic-psychologist.md +110 -0
- package/website/dist/prompts/en/design/design-brand-guardian.md +314 -0
- package/website/dist/prompts/en/design/design-image-prompt-engineer.md +228 -0
- package/website/dist/prompts/en/design/design-inclusive-visuals-specialist.md +63 -0
- package/website/dist/prompts/en/design/design-ui-designer.md +375 -0
- package/website/dist/prompts/en/design/design-ux-architect.md +461 -0
- package/website/dist/prompts/en/design/design-ux-researcher.md +321 -0
- package/website/dist/prompts/en/design/design-visual-storyteller.md +141 -0
- package/website/dist/prompts/en/design/design-whimsy-injector.md +430 -0
- package/website/dist/prompts/en/engineering/engineering-ai-data-remediation-engineer.md +202 -0
- package/website/dist/prompts/en/engineering/engineering-ai-engineer.md +138 -0
- package/website/dist/prompts/en/engineering/engineering-autonomous-optimization-architect.md +99 -0
- package/website/dist/prompts/en/engineering/engineering-backend-architect.md +227 -0
- package/website/dist/prompts/en/engineering/engineering-cms-developer.md +529 -0
- package/website/dist/prompts/en/engineering/engineering-code-reviewer.md +68 -0
- package/website/dist/prompts/en/engineering/engineering-codebase-onboarding-engineer.md +165 -0
- package/website/dist/prompts/en/engineering/engineering-data-engineer.md +298 -0
- package/website/dist/prompts/en/engineering/engineering-database-optimizer.md +168 -0
- package/website/dist/prompts/en/engineering/engineering-devops-automator.md +368 -0
- package/website/dist/prompts/en/engineering/engineering-email-intelligence-engineer.md +345 -0
- package/website/dist/prompts/en/engineering/engineering-embedded-firmware-engineer.md +165 -0
- package/website/dist/prompts/en/engineering/engineering-feishu-integration-developer.md +590 -0
- package/website/dist/prompts/en/engineering/engineering-filament-optimization-specialist.md +275 -0
- package/website/dist/prompts/en/engineering/engineering-frontend-developer.md +217 -0
- package/website/dist/prompts/en/engineering/engineering-git-workflow-master.md +76 -0
- package/website/dist/prompts/en/engineering/engineering-incident-response-commander.md +436 -0
- package/website/dist/prompts/en/engineering/engineering-minimal-change-engineer.md +199 -0
- package/website/dist/prompts/en/engineering/engineering-mobile-app-builder.md +485 -0
- package/website/dist/prompts/en/engineering/engineering-rapid-prototyper.md +454 -0
- package/website/dist/prompts/en/engineering/engineering-security-engineer.md +296 -0
- package/website/dist/prompts/en/engineering/engineering-senior-developer.md +168 -0
- package/website/dist/prompts/en/engineering/engineering-software-architect.md +73 -0
- package/website/dist/prompts/en/engineering/engineering-solidity-smart-contract-engineer.md +514 -0
- package/website/dist/prompts/en/engineering/engineering-sre.md +82 -0
- package/website/dist/prompts/en/engineering/engineering-technical-writer.md +385 -0
- package/website/dist/prompts/en/engineering/engineering-threat-detection-engineer.md +526 -0
- package/website/dist/prompts/en/engineering/engineering-voice-ai-integration-engineer.md +553 -0
- package/website/dist/prompts/en/engineering/engineering-wechat-mini-program-developer.md +342 -0
- package/website/dist/prompts/en/finance/finance-bookkeeper-controller.md +252 -0
- package/website/dist/prompts/en/finance/finance-financial-analyst.md +226 -0
- package/website/dist/prompts/en/finance/finance-fpa-analyst.md +255 -0
- package/website/dist/prompts/en/finance/finance-investment-researcher.md +264 -0
- package/website/dist/prompts/en/finance/finance-tax-strategist.md +231 -0
- package/website/dist/prompts/en/game-development/game-audio-engineer.md +256 -0
- package/website/dist/prompts/en/game-development/game-designer.md +159 -0
- package/website/dist/prompts/en/game-development/level-designer.md +200 -0
- package/website/dist/prompts/en/game-development/narrative-designer.md +235 -0
- package/website/dist/prompts/en/game-development/technical-artist.md +221 -0
- package/website/dist/prompts/en/marketing/marketing-agentic-search-optimizer.md +303 -0
- package/website/dist/prompts/en/marketing/marketing-ai-citation-strategist.md +162 -0
- package/website/dist/prompts/en/marketing/marketing-app-store-optimizer.md +313 -0
- package/website/dist/prompts/en/marketing/marketing-baidu-seo-specialist.md +218 -0
- package/website/dist/prompts/en/marketing/marketing-bilibili-content-strategist.md +191 -0
- package/website/dist/prompts/en/marketing/marketing-book-co-author.md +102 -0
- package/website/dist/prompts/en/marketing/marketing-carousel-growth-engine.md +184 -0
- package/website/dist/prompts/en/marketing/marketing-china-ecommerce-operator.md +275 -0
- package/website/dist/prompts/en/marketing/marketing-china-market-localization-strategist.md +275 -0
- package/website/dist/prompts/en/marketing/marketing-content-creator.md +45 -0
- package/website/dist/prompts/en/marketing/marketing-cross-border-ecommerce.md +251 -0
- package/website/dist/prompts/en/marketing/marketing-douyin-strategist.md +141 -0
- package/website/dist/prompts/en/marketing/marketing-growth-hacker.md +45 -0
- package/website/dist/prompts/en/marketing/marketing-instagram-curator.md +105 -0
- package/website/dist/prompts/en/marketing/marketing-kuaishou-strategist.md +215 -0
- package/website/dist/prompts/en/marketing/marketing-linkedin-content-creator.md +205 -0
- package/website/dist/prompts/en/marketing/marketing-livestream-commerce-coach.md +297 -0
- package/website/dist/prompts/en/marketing/marketing-podcast-strategist.md +269 -0
- package/website/dist/prompts/en/marketing/marketing-private-domain-operator.md +300 -0
- package/website/dist/prompts/en/marketing/marketing-reddit-community-builder.md +115 -0
- package/website/dist/prompts/en/marketing/marketing-seo-specialist.md +312 -0
- package/website/dist/prompts/en/marketing/marketing-short-video-editing-coach.md +404 -0
- package/website/dist/prompts/en/marketing/marketing-social-media-strategist.md +116 -0
- package/website/dist/prompts/en/marketing/marketing-tiktok-strategist.md +117 -0
- package/website/dist/prompts/en/marketing/marketing-twitter-engager.md +118 -0
- package/website/dist/prompts/en/marketing/marketing-video-optimization-specialist.md +111 -0
- package/website/dist/prompts/en/marketing/marketing-wechat-official-account.md +137 -0
- package/website/dist/prompts/en/marketing/marketing-weibo-strategist.md +232 -0
- package/website/dist/prompts/en/marketing/marketing-xiaohongshu-specialist.md +130 -0
- package/website/dist/prompts/en/marketing/marketing-zhihu-strategist.md +154 -0
- package/website/dist/prompts/en/paid-media/paid-media-auditor.md +61 -0
- package/website/dist/prompts/en/paid-media/paid-media-creative-strategist.md +61 -0
- package/website/dist/prompts/en/paid-media/paid-media-paid-social-strategist.md +61 -0
- package/website/dist/prompts/en/paid-media/paid-media-ppc-strategist.md +61 -0
- package/website/dist/prompts/en/paid-media/paid-media-programmatic-buyer.md +61 -0
- package/website/dist/prompts/en/paid-media/paid-media-search-query-analyst.md +61 -0
- package/website/dist/prompts/en/paid-media/paid-media-tracking-specialist.md +61 -0
- package/website/dist/prompts/en/product/product-behavioral-nudge-engine.md +72 -0
- package/website/dist/prompts/en/product/product-feedback-synthesizer.md +110 -0
- package/website/dist/prompts/en/product/product-manager.md +460 -0
- package/website/dist/prompts/en/product/product-sprint-prioritizer.md +145 -0
- package/website/dist/prompts/en/product/product-trend-researcher.md +150 -0
- package/website/dist/prompts/en/project-management/project-management-experiment-tracker.md +190 -0
- package/website/dist/prompts/en/project-management/project-management-jira-workflow-steward.md +222 -0
- package/website/dist/prompts/en/project-management/project-management-project-shepherd.md +186 -0
- package/website/dist/prompts/en/project-management/project-management-studio-operations.md +192 -0
- package/website/dist/prompts/en/project-management/project-management-studio-producer.md +195 -0
- package/website/dist/prompts/en/project-management/project-manager-senior.md +127 -0
- package/website/dist/prompts/en/sales/sales-account-strategist.md +219 -0
- package/website/dist/prompts/en/sales/sales-coach.md +263 -0
- package/website/dist/prompts/en/sales/sales-deal-strategist.md +172 -0
- package/website/dist/prompts/en/sales/sales-discovery-coach.md +217 -0
- package/website/dist/prompts/en/sales/sales-engineer.md +174 -0
- package/website/dist/prompts/en/sales/sales-outbound-strategist.md +193 -0
- package/website/dist/prompts/en/sales/sales-pipeline-analyst.md +259 -0
- package/website/dist/prompts/en/sales/sales-proposal-strategist.md +209 -0
- package/website/dist/prompts/en/spatial-computing/macos-spatial-metal-engineer.md +329 -0
- package/website/dist/prompts/en/spatial-computing/terminal-integration-specialist.md +62 -0
- package/website/dist/prompts/en/spatial-computing/visionos-spatial-engineer.md +46 -0
- package/website/dist/prompts/en/spatial-computing/xr-cockpit-interaction-specialist.md +24 -0
- package/website/dist/prompts/en/spatial-computing/xr-immersive-developer.md +24 -0
- package/website/dist/prompts/en/spatial-computing/xr-interface-architect.md +24 -0
- package/website/dist/prompts/en/specialized/accounts-payable-agent.md +177 -0
- package/website/dist/prompts/en/specialized/agentic-identity-trust.md +379 -0
- package/website/dist/prompts/en/specialized/agents-orchestrator.md +359 -0
- package/website/dist/prompts/en/specialized/automation-governance-architect.md +208 -0
- package/website/dist/prompts/en/specialized/blockchain-security-auditor.md +455 -0
- package/website/dist/prompts/en/specialized/compliance-auditor.md +150 -0
- package/website/dist/prompts/en/specialized/corporate-training-designer.md +184 -0
- package/website/dist/prompts/en/specialized/customer-service.md +390 -0
- package/website/dist/prompts/en/specialized/data-consolidation-agent.md +52 -0
- package/website/dist/prompts/en/specialized/government-digital-presales-consultant.md +355 -0
- package/website/dist/prompts/en/specialized/healthcare-customer-service.md +381 -0
- package/website/dist/prompts/en/specialized/healthcare-marketing-compliance.md +387 -0
- package/website/dist/prompts/en/specialized/hospitality-guest-services.md +595 -0
- package/website/dist/prompts/en/specialized/hr-onboarding.md +443 -0
- package/website/dist/prompts/en/specialized/identity-graph-operator.md +252 -0
- package/website/dist/prompts/en/specialized/language-translator.md +256 -0
- package/website/dist/prompts/en/specialized/legal-billing-time-tracking.md +561 -0
- package/website/dist/prompts/en/specialized/legal-client-intake.md +484 -0
- package/website/dist/prompts/en/specialized/legal-document-review.md +446 -0
- package/website/dist/prompts/en/specialized/loan-officer-assistant.md +547 -0
- package/website/dist/prompts/en/specialized/lsp-index-engineer.md +306 -0
- package/website/dist/prompts/en/specialized/real-estate-buyer-seller.md +588 -0
- package/website/dist/prompts/en/specialized/recruitment-specialist.md +501 -0
- package/website/dist/prompts/en/specialized/report-distribution-agent.md +57 -0
- package/website/dist/prompts/en/specialized/retail-customer-returns.md +558 -0
- package/website/dist/prompts/en/specialized/sales-data-extraction-agent.md +59 -0
- package/website/dist/prompts/en/specialized/sales-outreach.md +417 -0
- package/website/dist/prompts/en/specialized/specialized-chief-of-staff.md +271 -0
- package/website/dist/prompts/en/specialized/specialized-civil-engineer.md +348 -0
- package/website/dist/prompts/en/specialized/specialized-cultural-intelligence-strategist.md +80 -0
- package/website/dist/prompts/en/specialized/specialized-developer-advocate.md +309 -0
- package/website/dist/prompts/en/specialized/specialized-document-generator.md +47 -0
- package/website/dist/prompts/en/specialized/specialized-french-consulting-market.md +184 -0
- package/website/dist/prompts/en/specialized/specialized-korean-business-navigator.md +208 -0
- package/website/dist/prompts/en/specialized/specialized-mcp-builder.md +240 -0
- package/website/dist/prompts/en/specialized/specialized-model-qa.md +480 -0
- package/website/dist/prompts/en/specialized/specialized-salesforce-architect.md +172 -0
- package/website/dist/prompts/en/specialized/specialized-workflow-architect.md +589 -0
- package/website/dist/prompts/en/specialized/study-abroad-advisor.md +274 -0
- package/website/dist/prompts/en/specialized/supply-chain-strategist.md +574 -0
- package/website/dist/prompts/en/specialized/zk-steward.md +203 -0
- package/website/dist/prompts/en/support/support-analytics-reporter.md +357 -0
- package/website/dist/prompts/en/support/support-executive-summary-generator.md +204 -0
- package/website/dist/prompts/en/support/support-finance-tracker.md +434 -0
- package/website/dist/prompts/en/support/support-infrastructure-maintainer.md +610 -0
- package/website/dist/prompts/en/support/support-legal-compliance-checker.md +580 -0
- package/website/dist/prompts/en/support/support-support-responder.md +577 -0
- package/website/dist/prompts/en/testing/testing-accessibility-auditor.md +308 -0
- package/website/dist/prompts/en/testing/testing-api-tester.md +298 -0
- package/website/dist/prompts/en/testing/testing-evidence-collector.md +202 -0
- package/website/dist/prompts/en/testing/testing-performance-benchmarker.md +260 -0
- package/website/dist/prompts/en/testing/testing-reality-checker.md +228 -0
- package/website/dist/prompts/en/testing/testing-test-results-analyzer.md +297 -0
- package/website/dist/prompts/en/testing/testing-tool-evaluator.md +386 -0
- package/website/dist/prompts/en/testing/testing-workflow-optimizer.md +442 -0
- package/website/dist/prompts/zh/academic/academic-anthropologist.md +117 -0
- package/website/dist/prompts/zh/academic/academic-geographer.md +119 -0
- package/website/dist/prompts/zh/academic/academic-historian.md +115 -0
- package/website/dist/prompts/zh/academic/academic-narratologist.md +110 -0
- package/website/dist/prompts/zh/academic/academic-psychologist.md +110 -0
- package/website/dist/prompts/zh/academic/academic-study-planner.md +207 -0
- package/website/dist/prompts/zh/design/design-brand-guardian.md +314 -0
- package/website/dist/prompts/zh/design/design-image-prompt-engineer.md +248 -0
- package/website/dist/prompts/zh/design/design-inclusive-visuals-specialist.md +170 -0
- package/website/dist/prompts/zh/design/design-ui-designer.md +375 -0
- package/website/dist/prompts/zh/design/design-ux-architect.md +475 -0
- package/website/dist/prompts/zh/design/design-ux-researcher.md +321 -0
- package/website/dist/prompts/zh/design/design-visual-storyteller.md +152 -0
- package/website/dist/prompts/zh/design/design-whimsy-injector.md +446 -0
- package/website/dist/prompts/zh/engineering/engineering-ai-data-remediation-engineer.md +202 -0
- package/website/dist/prompts/zh/engineering/engineering-ai-engineer.md +154 -0
- package/website/dist/prompts/zh/engineering/engineering-autonomous-optimization-architect.md +108 -0
- package/website/dist/prompts/zh/engineering/engineering-backend-architect.md +227 -0
- package/website/dist/prompts/zh/engineering/engineering-cms-developer.md +527 -0
- package/website/dist/prompts/zh/engineering/engineering-code-reviewer.md +165 -0
- package/website/dist/prompts/zh/engineering/engineering-codebase-onboarding-engineer.md +165 -0
- package/website/dist/prompts/zh/engineering/engineering-data-engineer.md +317 -0
- package/website/dist/prompts/zh/engineering/engineering-database-optimizer.md +168 -0
- package/website/dist/prompts/zh/engineering/engineering-devops-automator.md +368 -0
- package/website/dist/prompts/zh/engineering/engineering-dingtalk-integration-developer.md +567 -0
- package/website/dist/prompts/zh/engineering/engineering-email-intelligence-engineer.md +342 -0
- package/website/dist/prompts/zh/engineering/engineering-embedded-firmware-engineer.md +161 -0
- package/website/dist/prompts/zh/engineering/engineering-embedded-linux-driver-engineer.md +248 -0
- package/website/dist/prompts/zh/engineering/engineering-feishu-integration-developer.md +590 -0
- package/website/dist/prompts/zh/engineering/engineering-filament-optimization-specialist.md +276 -0
- package/website/dist/prompts/zh/engineering/engineering-fpga-digital-design-engineer.md +220 -0
- package/website/dist/prompts/zh/engineering/engineering-frontend-developer.md +217 -0
- package/website/dist/prompts/zh/engineering/engineering-git-workflow-master.md +213 -0
- package/website/dist/prompts/zh/engineering/engineering-incident-response-commander.md +458 -0
- package/website/dist/prompts/zh/engineering/engineering-iot-solution-architect.md +213 -0
- package/website/dist/prompts/zh/engineering/engineering-minimal-change-engineer.md +199 -0
- package/website/dist/prompts/zh/engineering/engineering-mobile-app-builder.md +427 -0
- package/website/dist/prompts/zh/engineering/engineering-rapid-prototyper.md +454 -0
- package/website/dist/prompts/zh/engineering/engineering-security-engineer.md +296 -0
- package/website/dist/prompts/zh/engineering/engineering-senior-developer.md +170 -0
- package/website/dist/prompts/zh/engineering/engineering-software-architect.md +193 -0
- package/website/dist/prompts/zh/engineering/engineering-solidity-smart-contract-engineer.md +534 -0
- package/website/dist/prompts/zh/engineering/engineering-sre.md +226 -0
- package/website/dist/prompts/zh/engineering/engineering-technical-writer.md +402 -0
- package/website/dist/prompts/zh/engineering/engineering-threat-detection-engineer.md +546 -0
- package/website/dist/prompts/zh/engineering/engineering-voice-ai-integration-engineer.md +553 -0
- package/website/dist/prompts/zh/engineering/engineering-wechat-mini-program-developer.md +281 -0
- package/website/dist/prompts/zh/finance/finance-bookkeeper-controller.md +264 -0
- package/website/dist/prompts/zh/finance/finance-financial-analyst.md +237 -0
- package/website/dist/prompts/zh/finance/finance-financial-forecaster.md +206 -0
- package/website/dist/prompts/zh/finance/finance-fpa-analyst.md +265 -0
- package/website/dist/prompts/zh/finance/finance-fraud-detector.md +234 -0
- package/website/dist/prompts/zh/finance/finance-investment-researcher.md +276 -0
- package/website/dist/prompts/zh/finance/finance-invoice-manager.md +235 -0
- package/website/dist/prompts/zh/finance/finance-tax-strategist.md +243 -0
- package/website/dist/prompts/zh/game-development/game-audio-engineer.md +258 -0
- package/website/dist/prompts/zh/game-development/game-designer.md +161 -0
- package/website/dist/prompts/zh/game-development/level-designer.md +202 -0
- package/website/dist/prompts/zh/game-development/narrative-designer.md +237 -0
- package/website/dist/prompts/zh/game-development/technical-artist.md +223 -0
- package/website/dist/prompts/zh/hr/hr-performance-reviewer.md +241 -0
- package/website/dist/prompts/zh/hr/hr-recruiter.md +225 -0
- package/website/dist/prompts/zh/legal/legal-contract-reviewer.md +233 -0
- package/website/dist/prompts/zh/legal/legal-policy-writer.md +301 -0
- package/website/dist/prompts/zh/marketing/marketing-agentic-search-optimizer.md +305 -0
- package/website/dist/prompts/zh/marketing/marketing-ai-citation-strategist.md +162 -0
- package/website/dist/prompts/zh/marketing/marketing-app-store-optimizer.md +312 -0
- package/website/dist/prompts/zh/marketing/marketing-baidu-seo-specialist.md +213 -0
- package/website/dist/prompts/zh/marketing/marketing-bilibili-strategist.md +187 -0
- package/website/dist/prompts/zh/marketing/marketing-book-co-author.md +102 -0
- package/website/dist/prompts/zh/marketing/marketing-carousel-growth-engine.md +208 -0
- package/website/dist/prompts/zh/marketing/marketing-china-ecommerce-operator.md +270 -0
- package/website/dist/prompts/zh/marketing/marketing-china-market-localization-strategist.md +275 -0
- package/website/dist/prompts/zh/marketing/marketing-content-creator.md +138 -0
- package/website/dist/prompts/zh/marketing/marketing-cross-border-ecommerce.md +253 -0
- package/website/dist/prompts/zh/marketing/marketing-douyin-strategist.md +143 -0
- package/website/dist/prompts/zh/marketing/marketing-ecommerce-operator.md +209 -0
- package/website/dist/prompts/zh/marketing/marketing-growth-hacker.md +114 -0
- package/website/dist/prompts/zh/marketing/marketing-instagram-curator.md +172 -0
- package/website/dist/prompts/zh/marketing/marketing-knowledge-commerce-strategist.md +377 -0
- package/website/dist/prompts/zh/marketing/marketing-kuaishou-strategist.md +175 -0
- package/website/dist/prompts/zh/marketing/marketing-linkedin-content-creator.md +225 -0
- package/website/dist/prompts/zh/marketing/marketing-livestream-commerce-coach.md +296 -0
- package/website/dist/prompts/zh/marketing/marketing-podcast-strategist.md +271 -0
- package/website/dist/prompts/zh/marketing/marketing-private-domain-operator.md +302 -0
- package/website/dist/prompts/zh/marketing/marketing-reddit-community-builder.md +120 -0
- package/website/dist/prompts/zh/marketing/marketing-seo-specialist.md +291 -0
- package/website/dist/prompts/zh/marketing/marketing-short-video-editing-coach.md +406 -0
- package/website/dist/prompts/zh/marketing/marketing-social-media-strategist.md +111 -0
- package/website/dist/prompts/zh/marketing/marketing-tiktok-strategist.md +117 -0
- package/website/dist/prompts/zh/marketing/marketing-twitter-engager.md +125 -0
- package/website/dist/prompts/zh/marketing/marketing-video-optimization-specialist.md +121 -0
- package/website/dist/prompts/zh/marketing/marketing-wechat-official-account.md +151 -0
- package/website/dist/prompts/zh/marketing/marketing-wechat-operator.md +149 -0
- package/website/dist/prompts/zh/marketing/marketing-weibo-strategist.md +234 -0
- package/website/dist/prompts/zh/marketing/marketing-weixin-channels-strategist.md +290 -0
- package/website/dist/prompts/zh/marketing/marketing-xiaohongshu-operator.md +132 -0
- package/website/dist/prompts/zh/marketing/marketing-xiaohongshu-specialist.md +144 -0
- package/website/dist/prompts/zh/marketing/marketing-zhihu-strategist.md +168 -0
- package/website/dist/prompts/zh/paid-media/paid-media-auditor.md +153 -0
- package/website/dist/prompts/zh/paid-media/paid-media-creative-strategist.md +156 -0
- package/website/dist/prompts/zh/paid-media/paid-media-paid-social-strategist.md +163 -0
- package/website/dist/prompts/zh/paid-media/paid-media-ppc-strategist.md +163 -0
- package/website/dist/prompts/zh/paid-media/paid-media-programmatic-buyer.md +160 -0
- package/website/dist/prompts/zh/paid-media/paid-media-search-query-analyst.md +165 -0
- package/website/dist/prompts/zh/paid-media/paid-media-tracking-specialist.md +182 -0
- package/website/dist/prompts/zh/product/product-behavioral-nudge-engine.md +239 -0
- package/website/dist/prompts/zh/product/product-feedback-synthesizer.md +168 -0
- package/website/dist/prompts/zh/product/product-manager.md +466 -0
- package/website/dist/prompts/zh/product/product-sprint-prioritizer.md +126 -0
- package/website/dist/prompts/zh/product/product-trend-researcher.md +136 -0
- package/website/dist/prompts/zh/project-management/project-management-experiment-tracker.md +199 -0
- package/website/dist/prompts/zh/project-management/project-management-jira-workflow-steward.md +242 -0
- package/website/dist/prompts/zh/project-management/project-management-project-shepherd.md +195 -0
- package/website/dist/prompts/zh/project-management/project-management-studio-operations.md +201 -0
- package/website/dist/prompts/zh/project-management/project-management-studio-producer.md +204 -0
- package/website/dist/prompts/zh/project-management/project-manager-senior.md +128 -0
- package/website/dist/prompts/zh/sales/sales-account-strategist.md +236 -0
- package/website/dist/prompts/zh/sales/sales-coach.md +284 -0
- package/website/dist/prompts/zh/sales/sales-deal-strategist.md +187 -0
- package/website/dist/prompts/zh/sales/sales-discovery-coach.md +215 -0
- package/website/dist/prompts/zh/sales/sales-engineer.md +183 -0
- package/website/dist/prompts/zh/sales/sales-outbound-strategist.md +193 -0
- package/website/dist/prompts/zh/sales/sales-pipeline-analyst.md +277 -0
- package/website/dist/prompts/zh/sales/sales-proposal-strategist.md +226 -0
- package/website/dist/prompts/zh/spatial-computing/macos-spatial-metal-engineer.md +330 -0
- package/website/dist/prompts/zh/spatial-computing/terminal-integration-specialist.md +229 -0
- package/website/dist/prompts/zh/spatial-computing/visionos-spatial-engineer.md +275 -0
- package/website/dist/prompts/zh/spatial-computing/xr-cockpit-interaction-specialist.md +213 -0
- package/website/dist/prompts/zh/spatial-computing/xr-immersive-developer.md +222 -0
- package/website/dist/prompts/zh/spatial-computing/xr-interface-architect.md +246 -0
- package/website/dist/prompts/zh/specialized/accounts-payable-agent.md +205 -0
- package/website/dist/prompts/zh/specialized/agentic-identity-trust.md +381 -0
- package/website/dist/prompts/zh/specialized/agents-orchestrator.md +359 -0
- package/website/dist/prompts/zh/specialized/automation-governance-architect.md +208 -0
- package/website/dist/prompts/zh/specialized/blockchain-security-auditor.md +477 -0
- package/website/dist/prompts/zh/specialized/compliance-auditor.md +165 -0
- package/website/dist/prompts/zh/specialized/corporate-training-designer.md +184 -0
- package/website/dist/prompts/zh/specialized/data-consolidation-agent.md +320 -0
- package/website/dist/prompts/zh/specialized/gaokao-college-advisor.md +326 -0
- package/website/dist/prompts/zh/specialized/government-digital-presales-consultant.md +355 -0
- package/website/dist/prompts/zh/specialized/healthcare-customer-service.md +381 -0
- package/website/dist/prompts/zh/specialized/healthcare-marketing-compliance.md +387 -0
- package/website/dist/prompts/zh/specialized/hospitality-guest-services.md +590 -0
- package/website/dist/prompts/zh/specialized/hr-onboarding.md +443 -0
- package/website/dist/prompts/zh/specialized/identity-graph-operator.md +263 -0
- package/website/dist/prompts/zh/specialized/language-translator.md +268 -0
- package/website/dist/prompts/zh/specialized/legal-billing-time-tracking.md +559 -0
- package/website/dist/prompts/zh/specialized/legal-client-intake.md +480 -0
- package/website/dist/prompts/zh/specialized/legal-document-review.md +445 -0
- package/website/dist/prompts/zh/specialized/loan-officer-assistant.md +542 -0
- package/website/dist/prompts/zh/specialized/lsp-index-engineer.md +327 -0
- package/website/dist/prompts/zh/specialized/prompt-engineer.md +169 -0
- package/website/dist/prompts/zh/specialized/real-estate-buyer-seller.md +587 -0
- package/website/dist/prompts/zh/specialized/recruitment-specialist.md +501 -0
- package/website/dist/prompts/zh/specialized/report-distribution-agent.md +347 -0
- package/website/dist/prompts/zh/specialized/retail-customer-returns.md +557 -0
- package/website/dist/prompts/zh/specialized/sales-data-extraction-agent.md +152 -0
- package/website/dist/prompts/zh/specialized/specialized-ai-policy-writer.md +210 -0
- package/website/dist/prompts/zh/specialized/specialized-chief-of-staff.md +271 -0
- package/website/dist/prompts/zh/specialized/specialized-civil-engineer.md +348 -0
- package/website/dist/prompts/zh/specialized/specialized-cultural-intelligence-strategist.md +161 -0
- package/website/dist/prompts/zh/specialized/specialized-developer-advocate.md +327 -0
- package/website/dist/prompts/zh/specialized/specialized-document-generator.md +339 -0
- package/website/dist/prompts/zh/specialized/specialized-french-consulting-market.md +184 -0
- package/website/dist/prompts/zh/specialized/specialized-korean-business-navigator.md +208 -0
- package/website/dist/prompts/zh/specialized/specialized-mcp-builder.md +344 -0
- package/website/dist/prompts/zh/specialized/specialized-meeting-assistant.md +229 -0
- package/website/dist/prompts/zh/specialized/specialized-model-qa.md +500 -0
- package/website/dist/prompts/zh/specialized/specialized-pricing-optimizer.md +247 -0
- package/website/dist/prompts/zh/specialized/specialized-risk-assessor.md +233 -0
- package/website/dist/prompts/zh/specialized/specialized-salesforce-architect.md +172 -0
- package/website/dist/prompts/zh/specialized/specialized-workflow-architect.md +589 -0
- package/website/dist/prompts/zh/specialized/study-abroad-advisor.md +274 -0
- package/website/dist/prompts/zh/specialized/technical-translator-agent.md +160 -0
- package/website/dist/prompts/zh/specialized/zk-steward.md +221 -0
- package/website/dist/prompts/zh/supply-chain/supply-chain-inventory-forecaster.md +205 -0
- package/website/dist/prompts/zh/supply-chain/supply-chain-route-optimizer.md +217 -0
- package/website/dist/prompts/zh/supply-chain/supply-chain-vendor-evaluator.md +225 -0
- package/website/dist/prompts/zh/support/support-analytics-reporter.md +357 -0
- package/website/dist/prompts/zh/support/support-executive-summary-generator.md +210 -0
- package/website/dist/prompts/zh/support/support-finance-tracker.md +440 -0
- package/website/dist/prompts/zh/support/support-infrastructure-maintainer.md +616 -0
- package/website/dist/prompts/zh/support/support-legal-compliance-checker.md +580 -0
- package/website/dist/prompts/zh/support/support-recruitment-specialist.md +501 -0
- package/website/dist/prompts/zh/support/support-supply-chain-strategist.md +574 -0
- package/website/dist/prompts/zh/support/support-support-responder.md +577 -0
- package/website/dist/prompts/zh/testing/testing-accessibility-auditor.md +322 -0
- package/website/dist/prompts/zh/testing/testing-api-tester.md +298 -0
- package/website/dist/prompts/zh/testing/testing-embedded-qa-engineer.md +251 -0
- package/website/dist/prompts/zh/testing/testing-evidence-collector.md +146 -0
- package/website/dist/prompts/zh/testing/testing-performance-benchmarker.md +189 -0
- package/website/dist/prompts/zh/testing/testing-reality-checker.md +228 -0
- package/website/dist/prompts/zh/testing/testing-test-results-analyzer.md +306 -0
- package/website/dist/prompts/zh/testing/testing-tool-evaluator.md +395 -0
- package/website/dist/prompts/zh/testing/testing-workflow-optimizer.md +451 -0
- package/website/dist/sponsors/logo-compshare-icon.png +0 -0
- package/website/dist/sponsors/logo-compshare.png +0 -0
- package/workflows/ai-opinion-article.yaml +2 -2
- package/workflows/codex-cc-loop.yaml +48 -0
- package/workflows/codex-cc-simple.yaml +36 -0
- package/workflows/douyin-script.yaml +2 -0
- package/workflows/investment-analysis.yaml +20 -17
- package/workflows/okr-decomposition.yaml +2 -0
- package/workflows/pitch-deck-outline.yaml +2 -0
- package/workflows/product-review.yaml +2 -0
- package/workflows/tech-blog.yaml +2 -0
- package/workflows-en/code-architecture-review.yaml +46 -0
- package/workflows-en/content-pipeline.yaml +58 -0
- package/workflows-en/investment-analysis.yaml +47 -0
- package/workflows-en/okr-decomposition.yaml +45 -0
- package/workflows-en/product-review.yaml +64 -0
- package/workflows-en/tech-blog.yaml +56 -0
package/README.en.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
[](./LICENSE)
|
|
10
10
|
[](./CONTRIBUTING.md)
|
|
11
11
|
|
|
12
|
-
**One sentence → full plan · 211 expert AI roles · Zero-code YAML · 10 LLM providers ·
|
|
12
|
+
**One sentence → full plan · 211 expert AI roles · Zero-code YAML · 10 LLM providers · key supported (DeepSeek recommended), plus 7 key-free options**
|
|
13
13
|
|
|
14
14
|
> **Note:** `ao compose --run` auto-detects your language. Both 211 Chinese roles and 170+ English roles ([agency-agents](https://github.com/msitarzewski/agency-agents), MIT) are **bundled in the npm package — no extra download needed**. **6 English workflow templates** are ready in `workflows/en/` — more coming in v0.6.
|
|
15
15
|
|
|
@@ -23,6 +23,24 @@
|
|
|
23
23
|
|
|
24
24
|
---
|
|
25
25
|
|
|
26
|
+
## Web Studio (GUI)
|
|
27
|
+
|
|
28
|
+
Prefer not to use the command line? Run `ao web` locally and pick experts, run workflows, view outputs, and intervene live — all in a GUI, fully bilingual (EN/中文).
|
|
29
|
+
|
|
30
|
+
<p align="center">
|
|
31
|
+
<img src="./docs/screenshots/studio-roles-en.png" alt="Studio · Build a Team: pick from 200+ experts, AI composes the team" width="800"><br/>
|
|
32
|
+
<em>Build a Team: pick from 200+ experts; AI composes and runs the team</em>
|
|
33
|
+
</p>
|
|
34
|
+
|
|
35
|
+
<p align="center">
|
|
36
|
+
<img src="./docs/screenshots/studio-workflows-en.png" alt="Studio · Workflows: run built-in templates with one click" width="800"><br/>
|
|
37
|
+
<em>Workflows: run built-in templates with one click, or compare several</em>
|
|
38
|
+
</p>
|
|
39
|
+
|
|
40
|
+
> Launch: `ao web` (local — your API key stays on your machine, never uploaded). A [desktop client](./desktop) (Electron) is also available.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
26
44
|
## One Sentence, Full Result
|
|
27
45
|
|
|
28
46
|
```bash
|
|
@@ -75,10 +93,10 @@ Chatting with one AI gives you one perspective. But any real decision needs prod
|
|
|
75
93
|
|---|--------|-----------|---------------------|
|
|
76
94
|
| Roles | 1 generalist | Write your own | **211 expert roles** |
|
|
77
95
|
| Usage | Chat | Write Python | **One sentence / YAML** |
|
|
78
|
-
| API key | — | Required | **7
|
|
96
|
+
| API key | — | Required | **Key supported; 7 key-free options too** |
|
|
79
97
|
| Dependencies | — | pip + dozens of packages | **npm + 2 deps** |
|
|
80
98
|
| Parallelism | — | Manual graph | **Auto DAG detection** |
|
|
81
|
-
| Price | Subscription | Open-source + API fees | **
|
|
99
|
+
| Price | Subscription | Open-source + API fees | **DeepSeek sweet spot is dirt cheap; key-free to start** |
|
|
82
100
|
|
|
83
101
|
## Get Started in 3 Steps
|
|
84
102
|
|
|
@@ -201,9 +219,11 @@ analyze ──→ tech_review ──→ summary
|
|
|
201
219
|
| ChatGPT Plus ($20/mo) | `provider: "codex-cli"` | `npm i -g @openai/codex` | **$0 extra** |
|
|
202
220
|
| OpenClaw account | `provider: "openclaw-cli"` | `npm i -g openclaw` | **$0 extra** |
|
|
203
221
|
| Hermes Agent (NousResearch open-source 🔥) | `provider: "hermes-cli"` | [Install guide](https://github.com/NousResearch/hermes-agent) | **Free** |
|
|
204
|
-
| A computer | `provider: "ollama"` | [ollama.ai](https://ollama.ai) | **Free** (local models) |
|
|
222
|
+
| A computer | `provider: "ollama"` | [ollama.ai](https://ollama.ai) | **Free** (local models, see note below) |
|
|
223
|
+
|
|
224
|
+
> ⚠️ **Model capability drives the value of multi-agent.** We verified this with a quality eval (see [EVAL_FINDINGS.md](EVAL_FINDINGS.md)): on the **DeepSeek tier (capable yet cheap), multi-agent output clearly beats a single prompt**; but with **weak local models (e.g. llama3 8B), the role hand-offs amplify drift and can do worse than a single call**. For quality, use a capable model (DeepSeek/Claude/Gemini); for local Ollama, prefer 70B+ models.
|
|
205
225
|
|
|
206
|
-
**Or use traditional API keys:**
|
|
226
|
+
**Or use traditional API keys (DeepSeek recommended for the price/quality sweet spot):**
|
|
207
227
|
|
|
208
228
|
| Provider | Config | Env Variable |
|
|
209
229
|
|----------|--------|-------------|
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
[](./LICENSE)
|
|
10
10
|
[](./CONTRIBUTING.md)
|
|
11
11
|
|
|
12
|
-
**一句话出结果 · 211 个专业 AI 角色 · YAML 零代码 · 10 种大模型 · 7 种免
|
|
12
|
+
**一句话出结果 · 211 个专业 AI 角色 · YAML 零代码 · 10 种大模型 · 支持 key(推荐 DeepSeek),也有 7 种免 key 方式**
|
|
13
13
|
|
|
14
14
|
> 📖 [完整上手教程](https://mp.weixin.qq.com/s/XcGbkMb6TM6NLQiL7ICwbw) — 从安装到实战,10 分钟上手
|
|
15
15
|
|
|
@@ -21,6 +21,25 @@
|
|
|
21
21
|
|
|
22
22
|
---
|
|
23
23
|
|
|
24
|
+
## 网页 Studio(图形界面)
|
|
25
|
+
|
|
26
|
+
不想敲命令行?本地跑一条 `ao web`,浏览器里勾选专家、运行工作流、查看产物、实时介入——全程图形界面,全中英双语。
|
|
27
|
+
|
|
28
|
+
<p align="center">
|
|
29
|
+
<img src="./docs/screenshots/studio-roles-zh.png" alt="Studio · 角色组队:从 200+ 专家里勾选,AI 自动合成团队" width="800"><br/>
|
|
30
|
+
<em>角色组队:从 200+ 专家里勾选,AI 自动合成团队并运行</em>
|
|
31
|
+
</p>
|
|
32
|
+
|
|
33
|
+
<p align="center">
|
|
34
|
+
<img src="./docs/screenshots/studio-workflows-zh.png" alt="Studio · 工作流模板:内置模板一键运行" width="800"><br/>
|
|
35
|
+
<em>工作流:内置模板一键运行,也能对比多个模板</em>
|
|
36
|
+
</p>
|
|
37
|
+
|
|
38
|
+
> 启动:`ao web`(本地,密钥只存你自己机器、绝不外传)。也有 [桌面客户端](./desktop)(Electron)。
|
|
39
|
+
> 英文界面同样完整 → 见 [English README](./README.en.md)。
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
24
43
|
## 一句话出结果
|
|
25
44
|
|
|
26
45
|
```bash
|
|
@@ -73,11 +92,11 @@ ao compose "设计一个 SaaS 产品的定价策略" --run #
|
|
|
73
92
|
|---|--------|-----------|---------------------|
|
|
74
93
|
| 角色数 | 1 个通用 | 自己写 | **211 个专业角色** |
|
|
75
94
|
| 使用方式 | 对话 | 写 Python | **一句话 / YAML** |
|
|
76
|
-
| API key | — | 必须 |
|
|
95
|
+
| API key | — | 必须 | **支持 key,也有 7 种免 key 方式** |
|
|
77
96
|
| 依赖 | — | pip + 几十个包 | **npm + 2 个依赖** |
|
|
78
97
|
| 并行 | — | 手动建图 | **DAG 自动检测** |
|
|
79
98
|
| 中文角色 | — | 无 | **211 个** |
|
|
80
|
-
| 价格 | 订阅制 | 开源 + API 费 |
|
|
99
|
+
| 价格 | 订阅制 | 开源 + API 费 | **DeepSeek 甜区极低成本,亦可免 key 起步** |
|
|
81
100
|
|
|
82
101
|
## 3 步开始
|
|
83
102
|
|
|
@@ -200,9 +219,11 @@ analyze ──→ tech_review ──→ summary
|
|
|
200
219
|
| ChatGPT Plus/Pro($20/月) | `provider: "codex-cli"` | `npm i -g @openai/codex` | **不花钱** |
|
|
201
220
|
| OpenClaw 账号 | `provider: "openclaw-cli"` | `npm i -g openclaw` | **不花钱** |
|
|
202
221
|
| Hermes Agent(🔥 NousResearch 热门开源) | `provider: "hermes-cli"` | [安装指南](https://github.com/NousResearch/hermes-agent) | **免费** |
|
|
203
|
-
| 一台电脑 | `provider: "ollama"` | [ollama.ai](https://ollama.ai) |
|
|
222
|
+
| 一台电脑 | `provider: "ollama"` | [ollama.ai](https://ollama.ai) | **免费**(本地模型,见下方提示) |
|
|
223
|
+
|
|
224
|
+
> ⚠️ **模型能力决定多智能体的价值**:我们用质量评测验证过(见 [EVAL_FINDINGS.md](EVAL_FINDINGS.md))——**DeepSeek 这一档(够强又不贵)上,多智能体产出明显优于单次 prompt**;但**本地小模型(如 llama3 8B 级)能力不足时,多角色交接反而会放大漂移、产出不如单次**。追求质量请用 DeepSeek/Claude/Gemini 等有能力的模型;本地 Ollama 建议用 70B+ 模型。
|
|
204
225
|
|
|
205
|
-
**也支持传统 API key
|
|
226
|
+
**也支持传统 API key(追求质量推荐 DeepSeek,性价比甜区):**
|
|
206
227
|
|
|
207
228
|
| 提供商 | 配置 | 环境变量 |
|
|
208
229
|
|--------|------|---------|
|
|
@@ -262,6 +283,7 @@ ao serve # 启动 MCP Server(供 Claude Code / Cur
|
|
|
262
283
|
| `--output dir` | 输出目录(默认 `ao-output/`) |
|
|
263
284
|
| `--resume <dir\|last>` | 从上次运行恢复(加载已完成步骤的输出) |
|
|
264
285
|
| `--from <step-id>` | 配合 `--resume`,从指定步骤重新执行 |
|
|
286
|
+
| `--feedback "意见"` | 对话式返工:把修改意见交给 `--from` 指定的专家,让它带着「上一版产出 + 你的意见」在原稿基础上修改(不指定 `--resume` 时默认对上一次运行返工) |
|
|
265
287
|
| `--watch` | 实时终端进度显示 |
|
|
266
288
|
| `--quiet` | 静默模式 |
|
|
267
289
|
|
|
@@ -305,6 +327,22 @@ ao run workflows/一人公司全员大会.yaml --resume last --from launch_decis
|
|
|
305
327
|
| 只重跑失败的步骤 | `ao run workflow.yaml --resume last` |
|
|
306
328
|
| 基于指定版本重跑 | `ao run workflow.yaml --resume ao-output/具体目录/ --from <步骤ID>` |
|
|
307
329
|
|
|
330
|
+
### 对话式返工(Feedback)
|
|
331
|
+
|
|
332
|
+
`--resume --from` 是「让某个专家重做」,但默认是**从零重写**。如果你只是想说一句「这里改一下」,用 `--feedback`——它把你的意见 + 这个专家**上一版的产出**一起交回去,让它在原稿基础上改,而不是推倒重来:
|
|
333
|
+
|
|
334
|
+
```bash
|
|
335
|
+
# 觉得故事结尾太平淡 —— 直接跟"写故事"那个专家说怎么改
|
|
336
|
+
ao run workflows/story-creation.yaml --from write_story \
|
|
337
|
+
--feedback "结尾太平淡,加一个反转,并收束前面埋的伏笔"
|
|
338
|
+
|
|
339
|
+
# 觉得营销方案不接地气
|
|
340
|
+
ao run workflows/一人公司全员大会.yaml --from marketing_plan \
|
|
341
|
+
--feedback "预算改成 5000 以内,渠道聚焦小红书 + 私域"
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
不写 `--resume` 时默认对**上一次运行**返工(等价于 `--resume last`)。该专家改完后,它的下游步骤会自动用新产出重跑。
|
|
345
|
+
|
|
308
346
|
## 编程 API
|
|
309
347
|
|
|
310
348
|
```typescript
|
|
@@ -383,8 +421,8 @@ ao serve --verbose # 带调试日志
|
|
|
383
421
|
| `depends_on` | string[] | 否 | 依赖的步骤 ID |
|
|
384
422
|
| `depends_on_mode` | string | 否 | `"all"`(默认)或 `"any_completed"`(任一完成即可) |
|
|
385
423
|
| `condition` | string | 否 | 条件表达式,不满足则跳过(如 `"{{var}} contains 技术"`) |
|
|
386
|
-
| `type` | string | 否 | `"approval"`
|
|
387
|
-
| `prompt` | string | 否 |
|
|
424
|
+
| `type` | string | 否 | `"approval"` 人工审批节点 / `"human_input"` 人工输入节点(跑到该步暂停,读取你的输入作为该步产出注入下游) |
|
|
425
|
+
| `prompt` | string | 否 | `approval` / `human_input` 节点的提示文本 |
|
|
388
426
|
| `loop` | object | 否 | 循环配置 |
|
|
389
427
|
| `loop.back_to` | string | 否 | 循环回到的步骤 ID |
|
|
390
428
|
| `loop.max_iterations` | number | 否 | 最大循环次数(1-10) |
|
|
@@ -484,6 +522,7 @@ ao-output/产品需求评审-2026-03-22/
|
|
|
484
522
|
| [superpowers-zh](https://github.com/jnMetaCode/superpowers-zh)  | 🧠 工作方法论 | 20 个 skills 教 AI 怎么干活(TDD / 调试 / 代码审查等) |
|
|
485
523
|
| [ai-coding-guide](https://github.com/jnMetaCode/ai-coding-guide) | 📖 实战教程 | 66 个 Claude Code 技巧 + 9 款工具最佳实践 + 配置模板 |
|
|
486
524
|
| [shellward](https://github.com/jnMetaCode/shellward) | 🛡️ 安全中间件 | 8 层防御 + DLP 数据流 + 注入检测,**零依赖**(含 MCP Server) |
|
|
525
|
+
| 🆕 [ai-shortfilm-prompts](https://github.com/jnMetaCode/ai-shortfilm-prompts) | 🎬 视频提示词 | Mx-Shell《丧尸清道夫》5 段式方法论 + Skill,Seedance / 小云雀 / Sora / 可灵 / 即梦通用 |
|
|
487
526
|
|
|
488
527
|
### 交流
|
|
489
528
|
|
package/dist/agents/loader.d.ts
CHANGED
|
@@ -9,3 +9,27 @@ export declare function loadAgent(agentsDir: string, rolePath: string): AgentDef
|
|
|
9
9
|
* 列出所有可用角色
|
|
10
10
|
*/
|
|
11
11
|
export declare function listAgents(agentsDir: string): AgentDefinition[];
|
|
12
|
+
/**
|
|
13
|
+
* 轻量列出所有角色路径(如 "engineering/engineering-sre"),不解析文件内容。
|
|
14
|
+
* 用于 validate 报错时给"你是不是想用 X"建议,避免 listAgents 全量解析的开销。
|
|
15
|
+
*/
|
|
16
|
+
export declare function listRolePaths(agentsDir: string): string[];
|
|
17
|
+
/**
|
|
18
|
+
* 在给定的候选路径集合里,找出最接近 badPath 的若干个(纯函数,不读盘)。
|
|
19
|
+
* 优先子串包含(按 leaf 名匹配),再按编辑距离兜底;只返回足够接近的。
|
|
20
|
+
* 供 compose 复用——它要在"实际提供给 LLM 的目录"里建议,而非全盘所有角色。
|
|
21
|
+
*/
|
|
22
|
+
export declare function suggestFromPaths(badPath: string, allPaths: string[], limit?: number): string[];
|
|
23
|
+
/**
|
|
24
|
+
* 给一个拼错的角色路径,返回最接近的若干真实角色("你是不是想用…")。
|
|
25
|
+
*/
|
|
26
|
+
export declare function suggestRoles(badPath: string, agentsDir: string, limit?: number): string[];
|
|
27
|
+
/**
|
|
28
|
+
* 按关键词过滤角色:匹配 rolePath / name / description(不区分大小写)。
|
|
29
|
+
* 空关键词返回原列表。供 `ao roles <keyword>` 使用,方便手动找专家。
|
|
30
|
+
*/
|
|
31
|
+
export declare function filterAgentsByKeyword<T extends {
|
|
32
|
+
name?: string;
|
|
33
|
+
rolePath?: string;
|
|
34
|
+
description?: string;
|
|
35
|
+
}>(agents: T[], keyword: string): T[];
|
package/dist/agents/loader.js
CHANGED
|
@@ -100,3 +100,89 @@ export function listAgents(agentsDir) {
|
|
|
100
100
|
}
|
|
101
101
|
return agents;
|
|
102
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* 轻量列出所有角色路径(如 "engineering/engineering-sre"),不解析文件内容。
|
|
105
|
+
* 用于 validate 报错时给"你是不是想用 X"建议,避免 listAgents 全量解析的开销。
|
|
106
|
+
*/
|
|
107
|
+
export function listRolePaths(agentsDir) {
|
|
108
|
+
const dir = resolve(agentsDir);
|
|
109
|
+
if (!existsSync(dir))
|
|
110
|
+
return [];
|
|
111
|
+
const paths = [];
|
|
112
|
+
for (const dept of readdirSync(dir, { withFileTypes: true })) {
|
|
113
|
+
if (!dept.isDirectory())
|
|
114
|
+
continue;
|
|
115
|
+
if (dept.name.startsWith('.') || dept.name === 'node_modules' || dept.name === 'scripts' ||
|
|
116
|
+
dept.name === 'integrations' || dept.name === 'examples')
|
|
117
|
+
continue;
|
|
118
|
+
for (const file of readdirSync(join(dir, dept.name), { withFileTypes: true })) {
|
|
119
|
+
if (!file.isFile() || !file.name.endsWith('.md'))
|
|
120
|
+
continue;
|
|
121
|
+
paths.push(`${dept.name}/${file.name.replace('.md', '')}`);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return paths;
|
|
125
|
+
}
|
|
126
|
+
/** Levenshtein 编辑距离(用于角色名模糊匹配) */
|
|
127
|
+
function editDistance(a, b) {
|
|
128
|
+
const m = a.length, n = b.length;
|
|
129
|
+
if (m === 0)
|
|
130
|
+
return n;
|
|
131
|
+
if (n === 0)
|
|
132
|
+
return m;
|
|
133
|
+
let prev = Array.from({ length: n + 1 }, (_, i) => i);
|
|
134
|
+
let cur = new Array(n + 1);
|
|
135
|
+
for (let i = 1; i <= m; i++) {
|
|
136
|
+
cur[0] = i;
|
|
137
|
+
for (let j = 1; j <= n; j++) {
|
|
138
|
+
const cost = a[i - 1] === b[j - 1] ? 0 : 1;
|
|
139
|
+
cur[j] = Math.min(prev[j] + 1, cur[j - 1] + 1, prev[j - 1] + cost);
|
|
140
|
+
}
|
|
141
|
+
[prev, cur] = [cur, prev];
|
|
142
|
+
}
|
|
143
|
+
return prev[n];
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* 在给定的候选路径集合里,找出最接近 badPath 的若干个(纯函数,不读盘)。
|
|
147
|
+
* 优先子串包含(按 leaf 名匹配),再按编辑距离兜底;只返回足够接近的。
|
|
148
|
+
* 供 compose 复用——它要在"实际提供给 LLM 的目录"里建议,而非全盘所有角色。
|
|
149
|
+
*/
|
|
150
|
+
export function suggestFromPaths(badPath, allPaths, limit = 3) {
|
|
151
|
+
if (allPaths.length === 0)
|
|
152
|
+
return [];
|
|
153
|
+
const leaf = (badPath.split('/').pop() || badPath).toLowerCase();
|
|
154
|
+
const target = badPath.toLowerCase();
|
|
155
|
+
const scored = allPaths.map(p => {
|
|
156
|
+
const pl = p.toLowerCase();
|
|
157
|
+
const pleaf = (p.split('/').pop() || p).toLowerCase();
|
|
158
|
+
// 子串命中给大幅加分(排到前面)
|
|
159
|
+
const substr = pl.includes(leaf) || pleaf.includes(leaf) || leaf.includes(pleaf);
|
|
160
|
+
const dist = editDistance(target, pl);
|
|
161
|
+
return { p, dist, substr };
|
|
162
|
+
});
|
|
163
|
+
scored.sort((a, b) => (a.substr === b.substr ? 0 : a.substr ? -1 : 1) || a.dist - b.dist);
|
|
164
|
+
// 只保留"够接近"的:子串命中,或编辑距离不超过 leaf 长度的一半 + 4
|
|
165
|
+
const threshold = Math.ceil(leaf.length / 2) + 4;
|
|
166
|
+
return scored
|
|
167
|
+
.filter(s => s.substr || s.dist <= threshold)
|
|
168
|
+
.slice(0, limit)
|
|
169
|
+
.map(s => s.p);
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* 给一个拼错的角色路径,返回最接近的若干真实角色("你是不是想用…")。
|
|
173
|
+
*/
|
|
174
|
+
export function suggestRoles(badPath, agentsDir, limit = 3) {
|
|
175
|
+
return suggestFromPaths(badPath, listRolePaths(agentsDir), limit);
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* 按关键词过滤角色:匹配 rolePath / name / description(不区分大小写)。
|
|
179
|
+
* 空关键词返回原列表。供 `ao roles <keyword>` 使用,方便手动找专家。
|
|
180
|
+
*/
|
|
181
|
+
export function filterAgentsByKeyword(agents, keyword) {
|
|
182
|
+
const kw = keyword.trim().toLowerCase();
|
|
183
|
+
if (!kw)
|
|
184
|
+
return agents;
|
|
185
|
+
return agents.filter(a => (a.rolePath || '').toLowerCase().includes(kw) ||
|
|
186
|
+
(a.name || '').toLowerCase().includes(kw) ||
|
|
187
|
+
(a.description || '').toLowerCase().includes(kw));
|
|
188
|
+
}
|
package/dist/cli/compose.d.ts
CHANGED
|
@@ -58,12 +58,29 @@ export declare function composeWorkflow(options: {
|
|
|
58
58
|
lang?: 'zh' | 'en';
|
|
59
59
|
/** 生成的 YAML 中写入的单步超时(ms);未指定时 API=300s / ollama=600s */
|
|
60
60
|
timeoutMs?: number;
|
|
61
|
+
/** 锁定阵容:只用这些角色路径(如 "engineering/xxx"),LLM 仅在其间编排 DAG/task/变量 */
|
|
62
|
+
pinnedRoles?: string[];
|
|
63
|
+
/** 保存目录;默认 workflows/。用于把合成结果写到用户目录而非随包模板目录 */
|
|
64
|
+
saveDir?: string;
|
|
61
65
|
}): Promise<{
|
|
62
66
|
yaml: string;
|
|
63
67
|
savedPath: string;
|
|
64
68
|
relativePath: string;
|
|
65
69
|
warnings: string[];
|
|
66
70
|
}>;
|
|
71
|
+
/**
|
|
72
|
+
* 确定性修复幻觉角色:对每个不存在的 role,从角色库找到"够接近"的真实路径,直接在 YAML 文本里替换。
|
|
73
|
+
* 不依赖再调一次 LLM——只要有可信匹配,就保证替换为库里真实存在、可运行的角色。
|
|
74
|
+
* 仅替换 role 值中的精确路径(双/单引号包裹),避免误伤任务描述等其它文本。
|
|
75
|
+
* 返回已替换列表与仍无匹配(需 LLM 兜底)的角色。
|
|
76
|
+
*/
|
|
77
|
+
export declare function repairInvalidRolesInYaml(yamlPath: string, invalidRoles: string[], validRolePaths: string[]): {
|
|
78
|
+
replaced: {
|
|
79
|
+
from: string;
|
|
80
|
+
to: string;
|
|
81
|
+
}[];
|
|
82
|
+
unresolved: string[];
|
|
83
|
+
};
|
|
67
84
|
/**
|
|
68
85
|
* 自动修复 compose 生成 YAML 中的变量引用错误。
|
|
69
86
|
*
|
package/dist/cli/compose.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* 用户用一句话描述需求,AI 从角色库中选角色、设计 DAG、生成完整 workflow YAML。
|
|
5
5
|
* 支持中文(agency-agents-zh)和英文(agency-agents)角色库。
|
|
6
6
|
*/
|
|
7
|
-
import { listAgents } from '../agents/loader.js';
|
|
7
|
+
import { listAgents, suggestFromPaths } from '../agents/loader.js';
|
|
8
8
|
import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'node:fs';
|
|
9
9
|
import { resolve, relative } from 'node:path';
|
|
10
10
|
import { createConnector } from '../connectors/factory.js';
|
|
@@ -140,6 +140,7 @@ ${autoRun ? ' Include specific information from the user\'s description' :
|
|
|
140
140
|
- **Detailed tasks**: Task descriptions should be specific — tell the role what to do and what format to output
|
|
141
141
|
${inputsDesignPrinciple}
|
|
142
142
|
- **Final deliverable**: The last step must output the final deliverable the user wants (e.g., complete article, complete report), not review comments or suggestions. If there's a review step, it should output the revised final version, not a "list of suggestions"
|
|
143
|
+
- **Clean final output (IMPORTANT)**: The LAST step's \`task\` MUST end with an explicit instruction to output ONLY the deliverable itself — no preamble/greeting, no "what I changed"/change-log, no formatting notes, no questions to the user, no suggestions to run \`ao\`/other commands, no "shall I continue?" closers. Append a line like: "⚠️ Output only the final deliverable itself — no preamble, no change-log, no meta-commentary, no questions, no tool/command suggestions."
|
|
143
144
|
|
|
144
145
|
## Available Role Catalog
|
|
145
146
|
|
|
@@ -234,6 +235,7 @@ ${autoRun ? ' 直接包含用户需求中的具体信息' : ' 使用 {
|
|
|
234
235
|
- **任务详细**:task 描述要具体,告诉角色要做什么、输出什么格式
|
|
235
236
|
${inputsDesignPrinciple}
|
|
236
237
|
- **最终成品**:最后一个步骤必须输出用户想要的最终成品(如完整文章、完整报告),而不是审查意见或修改建议。如果有审校步骤,审校步骤应该直接输出修改后的定稿,而不是"修改建议列表"
|
|
238
|
+
- **干净的最终产出(重要)**:最后一个步骤的 \`task\` 结尾必须显式要求"只输出成品本身"——不要开场白/寒暄、不要"我改了什么/复盘/修改说明"、不要排版备注小节、不要向用户提问或请其拍板、不要建议运行 \`ao\` 或其它命令、不要"要我继续吗"之类收尾。请在该 step 的 task 末尾追加一行类似:「⚠️ 只输出最终成品本身:不要开场白、不要复盘或说明、不要向用户提问、不要建议任何命令或后续动作。」
|
|
237
239
|
|
|
238
240
|
## 可用角色目录
|
|
239
241
|
|
|
@@ -312,10 +314,17 @@ export async function composeWorkflow(options) {
|
|
|
312
314
|
const { description, agentsDir, llmConfig } = options;
|
|
313
315
|
const lang = options.lang ?? detectLang(description);
|
|
314
316
|
// 1. 构建角色目录
|
|
315
|
-
|
|
317
|
+
let roles = buildRoleCatalog(agentsDir);
|
|
316
318
|
if (roles.length === 0) {
|
|
317
319
|
throw new Error(t('compose.empty_catalog', { dir: agentsDir }));
|
|
318
320
|
}
|
|
321
|
+
// 锁定阵容:把目录收窄到勾选的角色,LLM 既无法幻觉别的角色,也被强制用上这些
|
|
322
|
+
if (options.pinnedRoles?.length) {
|
|
323
|
+
const pin = new Set(options.pinnedRoles);
|
|
324
|
+
const filtered = roles.filter(r => pin.has(r.path));
|
|
325
|
+
if (filtered.length > 0)
|
|
326
|
+
roles = filtered;
|
|
327
|
+
}
|
|
319
328
|
const catalog = formatCatalogForPrompt(roles);
|
|
320
329
|
// 2. 构建 prompt
|
|
321
330
|
const systemPrompt = buildComposeSystemPrompt(catalog, {
|
|
@@ -325,7 +334,13 @@ export async function composeWorkflow(options) {
|
|
|
325
334
|
lang,
|
|
326
335
|
timeoutMs: options.timeoutMs,
|
|
327
336
|
});
|
|
328
|
-
|
|
337
|
+
let userPrompt = buildComposeUserPrompt(description, lang);
|
|
338
|
+
if (options.pinnedRoles?.length) {
|
|
339
|
+
const names = roles.map(r => `${r.path}(${r.name})`).join(lang === 'en' ? ', ' : '、');
|
|
340
|
+
userPrompt += lang === 'en'
|
|
341
|
+
? `\n\nYou MUST build the workflow using EXACTLY these roles, every one of them and no others: ${names}. Design the DAG dependencies, task descriptions and variable chaining among them.`
|
|
342
|
+
: `\n\n必须且只能使用以下全部角色(每个都要用上,不要引入其他角色):${names}。在它们之间设计 DAG 依赖、task 描述和变量串联。`;
|
|
343
|
+
}
|
|
329
344
|
// 3. 调用 LLM
|
|
330
345
|
console.log(` ${t('compose.generating', { n: roles.length })}\n`);
|
|
331
346
|
const connector = createConnector(llmConfig);
|
|
@@ -339,7 +354,7 @@ export async function composeWorkflow(options) {
|
|
|
339
354
|
throw new Error(t('compose.invalid_yaml'));
|
|
340
355
|
}
|
|
341
356
|
// 5. 保存(避免覆盖)
|
|
342
|
-
const workflowsDir = resolve('workflows');
|
|
357
|
+
const workflowsDir = options.saveDir ? resolve(options.saveDir) : resolve('workflows');
|
|
343
358
|
if (!existsSync(workflowsDir)) {
|
|
344
359
|
mkdirSync(workflowsDir, { recursive: true });
|
|
345
360
|
}
|
|
@@ -374,13 +389,37 @@ export async function composeWorkflow(options) {
|
|
|
374
389
|
}
|
|
375
390
|
return { errors, invalidRoles };
|
|
376
391
|
}
|
|
377
|
-
|
|
378
|
-
//
|
|
392
|
+
let first = await validateGenerated(savedPath);
|
|
393
|
+
// 幻觉角色 → 先做确定性替换:有"够接近"的真实角色就直接改 YAML,不花一次 LLM 调用,
|
|
394
|
+
// 且保证替换结果一定是库里真实存在、可运行的角色。
|
|
379
395
|
if (first.invalidRoles.length > 0) {
|
|
380
|
-
|
|
396
|
+
const det = repairInvalidRolesInYaml(savedPath, first.invalidRoles, [...validRolePaths]);
|
|
397
|
+
if (det.replaced.length > 0) {
|
|
398
|
+
console.log(` 自动替换 ${det.replaced.length} 个不存在的角色为最接近的真实角色:`);
|
|
399
|
+
for (const r of det.replaced)
|
|
400
|
+
console.log(` ${r.from} → ${r.to}`);
|
|
401
|
+
first = await validateGenerated(savedPath);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
// 仍有幻觉角色(无可信匹配)→ 让 LLM 修一次
|
|
405
|
+
if (first.invalidRoles.length > 0) {
|
|
406
|
+
console.log(` 仍有 ${first.invalidRoles.length} 个角色无法自动匹配,调 LLM 重新生成...`);
|
|
407
|
+
// 把"你是不是想用 X"喂回 LLM:从实际提供的目录里找最接近的真实角色,
|
|
408
|
+
// 让模型做定向替换而非盲目重生成,显著提高一次修复成功率
|
|
409
|
+
const catalogPaths = [...validRolePaths];
|
|
410
|
+
const corrections = first.invalidRoles.map(bad => {
|
|
411
|
+
const hit = suggestFromPaths(bad, catalogPaths);
|
|
412
|
+
return { bad, suggestion: hit[0] };
|
|
413
|
+
});
|
|
414
|
+
const mapLine = (sep) => corrections
|
|
415
|
+
.map(c => c.suggestion ? `${c.bad} → ${c.suggestion}` : c.bad)
|
|
416
|
+
.join(sep);
|
|
381
417
|
const retryPrompt = lang === 'en'
|
|
382
|
-
? `The following role paths in your previous YAML do NOT exist in the catalog
|
|
383
|
-
: `你上次生成的 YAML 里有不存在的 role
|
|
418
|
+
? `The following role paths in your previous YAML do NOT exist in the catalog (→ shows the closest valid path):\n${corrections.map(c => ` - ${c.bad}${c.suggestion ? ` → use "${c.suggestion}" instead` : ''}`).join('\n')}\n\nRegenerate the FULL YAML, replacing each wrong path with the suggested one. Use ONLY role paths from the catalog above. Do not invent new paths.`
|
|
419
|
+
: `你上次生成的 YAML 里有不存在的 role 路径(→ 后是目录中最接近的正确路径):\n${corrections.map(c => ` - ${c.bad}${c.suggestion ? ` → 请改用 "${c.suggestion}"` : ''}`).join('\n')}\n\n请重新生成完整 YAML,把每个错误路径替换为建议的正确路径。role 必须严格使用上方角色目录中列出的路径,不要编造。`;
|
|
420
|
+
if (corrections.some(c => c.suggestion)) {
|
|
421
|
+
console.log(` 建议替换: ${mapLine(',')}`);
|
|
422
|
+
}
|
|
384
423
|
try {
|
|
385
424
|
const retryResult = await connector.chat(systemPrompt, `${userPrompt}\n\n${retryPrompt}`, {
|
|
386
425
|
...llmConfig,
|
|
@@ -389,7 +428,19 @@ export async function composeWorkflow(options) {
|
|
|
389
428
|
const retryYaml = extractYamlFromResponse(retryResult.content);
|
|
390
429
|
if (retryYaml && retryYaml.includes('steps:')) {
|
|
391
430
|
writeFileSync(savedPath, retryYaml + '\n', 'utf-8');
|
|
392
|
-
|
|
431
|
+
let second = await validateGenerated(savedPath);
|
|
432
|
+
// LLM 重试后若仍残留幻觉角色 → 再用确定性替换兜底,堵住"重试后仍坏、却被当成功"的缺口
|
|
433
|
+
if (second.invalidRoles.length > 0) {
|
|
434
|
+
const det2 = repairInvalidRolesInYaml(savedPath, second.invalidRoles, catalogPaths);
|
|
435
|
+
if (det2.replaced.length > 0) {
|
|
436
|
+
for (const r of det2.replaced)
|
|
437
|
+
console.log(` ${r.from} → ${r.to}`);
|
|
438
|
+
second = await validateGenerated(savedPath);
|
|
439
|
+
}
|
|
440
|
+
if (second.invalidRoles.length > 0) {
|
|
441
|
+
warnings.push(`仍有无法解析的角色: ${second.invalidRoles.join(', ')}`);
|
|
442
|
+
}
|
|
443
|
+
}
|
|
393
444
|
// 重试后仍有变量引用错误 → 走 fix 链(autoFix → LLM 二次修复)
|
|
394
445
|
const finalErrors = await runVariableFixChain(savedPath, second.errors, validateGenerated, llmConfig, lang);
|
|
395
446
|
warnings.push(...finalErrors);
|
|
@@ -407,6 +458,33 @@ export async function composeWorkflow(options) {
|
|
|
407
458
|
const finalYaml = readFileSync(savedPath, 'utf-8').trim();
|
|
408
459
|
return { yaml: finalYaml, savedPath, relativePath, warnings };
|
|
409
460
|
}
|
|
461
|
+
/**
|
|
462
|
+
* 确定性修复幻觉角色:对每个不存在的 role,从角色库找到"够接近"的真实路径,直接在 YAML 文本里替换。
|
|
463
|
+
* 不依赖再调一次 LLM——只要有可信匹配,就保证替换为库里真实存在、可运行的角色。
|
|
464
|
+
* 仅替换 role 值中的精确路径(双/单引号包裹),避免误伤任务描述等其它文本。
|
|
465
|
+
* 返回已替换列表与仍无匹配(需 LLM 兜底)的角色。
|
|
466
|
+
*/
|
|
467
|
+
export function repairInvalidRolesInYaml(yamlPath, invalidRoles, validRolePaths) {
|
|
468
|
+
let content = readFileSync(yamlPath, 'utf-8');
|
|
469
|
+
const replaced = [];
|
|
470
|
+
const unresolved = [];
|
|
471
|
+
for (const bad of [...new Set(invalidRoles)]) {
|
|
472
|
+
const to = suggestFromPaths(bad, validRolePaths)[0];
|
|
473
|
+
if (!to) {
|
|
474
|
+
unresolved.push(bad);
|
|
475
|
+
continue;
|
|
476
|
+
}
|
|
477
|
+
const before = content;
|
|
478
|
+
content = content.split(`"${bad}"`).join(`"${to}"`).split(`'${bad}'`).join(`'${to}'`);
|
|
479
|
+
if (content !== before)
|
|
480
|
+
replaced.push({ from: bad, to });
|
|
481
|
+
else
|
|
482
|
+
unresolved.push(bad);
|
|
483
|
+
}
|
|
484
|
+
if (replaced.length > 0)
|
|
485
|
+
writeFileSync(yamlPath, content, 'utf-8');
|
|
486
|
+
return { replaced, unresolved };
|
|
487
|
+
}
|
|
410
488
|
/**
|
|
411
489
|
* 变量引用错误的修复链:autoFix(启发式)→ LLM 二次修复 → 重新校验。
|
|
412
490
|
* 返回最终仍未解决的 errors。
|
package/dist/cli/demo.d.ts
CHANGED
|
@@ -5,4 +5,9 @@ export interface DetectedLLM {
|
|
|
5
5
|
envVar?: string;
|
|
6
6
|
}
|
|
7
7
|
export declare function detectAvailableLLMs(): Promise<DetectedLLM[]>;
|
|
8
|
+
/**
|
|
9
|
+
* 首跑向导文案:根据检测到的 provider,给出个性化的"下一步"。
|
|
10
|
+
* 纯函数,便于测试。ao init 在角色库装好后调用。
|
|
11
|
+
*/
|
|
12
|
+
export declare function buildFirstRunGuidance(llms: DetectedLLM[], lang?: 'zh' | 'en'): string;
|
|
8
13
|
export declare function runDemo(): Promise<void>;
|
package/dist/cli/demo.js
CHANGED
|
@@ -73,6 +73,50 @@ function resolveWorkflowPath() {
|
|
|
73
73
|
}
|
|
74
74
|
return p;
|
|
75
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* 首跑向导文案:根据检测到的 provider,给出个性化的"下一步"。
|
|
78
|
+
* 纯函数,便于测试。ao init 在角色库装好后调用。
|
|
79
|
+
*/
|
|
80
|
+
export function buildFirstRunGuidance(llms, lang = 'zh') {
|
|
81
|
+
const ready = llms.filter(l => l.available);
|
|
82
|
+
const lines = [];
|
|
83
|
+
if (ready.length > 0) {
|
|
84
|
+
const names = ready.map(l => l.name).join(lang === 'en' ? ', ' : '、');
|
|
85
|
+
if (lang === 'en') {
|
|
86
|
+
lines.push(`✅ Ready to go — detected: ${names}`);
|
|
87
|
+
lines.push('');
|
|
88
|
+
lines.push('Try it now:');
|
|
89
|
+
lines.push(' ao demo see it run in ~60s');
|
|
90
|
+
lines.push(' ao compose "your goal in one sentence" --run');
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
lines.push(`✅ 已就绪 —— 检测到可用 provider:${names}`);
|
|
94
|
+
lines.push('');
|
|
95
|
+
lines.push('现在就试:');
|
|
96
|
+
lines.push(' ao demo 60 秒看效果');
|
|
97
|
+
lines.push(' ao compose "用一句话描述你的需求" --run');
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
if (lang === 'en') {
|
|
102
|
+
lines.push('⚠ No usable LLM detected yet — pick the easiest path:');
|
|
103
|
+
lines.push(' • Key-free: a CLI you already pay for —');
|
|
104
|
+
lines.push(' npm i -g @anthropic-ai/claude-code (Claude Max/Pro)');
|
|
105
|
+
lines.push(' or run a local model with Ollama (ollama.com)');
|
|
106
|
+
lines.push(' • API key: ao init --provider deepseek --api-key sk-...');
|
|
107
|
+
lines.push('Then run: ao demo');
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
lines.push('⚠ 还没检测到可用的 LLM,选最省事的一条:');
|
|
111
|
+
lines.push(' • 免 key:装一个你已付费的 CLI——');
|
|
112
|
+
lines.push(' npm i -g @anthropic-ai/claude-code (Claude Max/Pro 会员)');
|
|
113
|
+
lines.push(' 或用 Ollama 跑本地模型 (ollama.com)');
|
|
114
|
+
lines.push(' • 用 API key:ao init --provider deepseek --api-key sk-...');
|
|
115
|
+
lines.push(' 配好后运行:ao demo');
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return lines.join('\n');
|
|
119
|
+
}
|
|
76
120
|
/** 没检测到 LLM 时:展示 DAG + 行动指引 */
|
|
77
121
|
async function showDagAndGuide() {
|
|
78
122
|
console.log(' ❌ 没检测到可用 LLM。先看一下 ao 工作流的 DAG 结构:\n');
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* validate 报告美化:把 validateWorkflow() 的扁平 string[] 错误,
|
|
3
|
+
* 分类 + 按 step 分组 + 按修复优先级排序后渲染。
|
|
4
|
+
*
|
|
5
|
+
* 重要:本模块只“读” validateWorkflow 的字符串输出,不改动其契约。
|
|
6
|
+
* compose/mcp 仍消费原始 string[],分类靠模式识别派生,互不影响。
|
|
7
|
+
*/
|
|
8
|
+
export type FindingCategory = 'cycle' | 'role' | 'dependency' | 'output' | 'loop' | 'variable' | 'other';
|
|
9
|
+
export interface ValidationFinding {
|
|
10
|
+
scope: 'workflow' | 'step';
|
|
11
|
+
stepId?: string;
|
|
12
|
+
category: FindingCategory;
|
|
13
|
+
/** 首行错误信息 */
|
|
14
|
+
message: string;
|
|
15
|
+
/** 后续行(如“你是不是想用…”建议),已去缩进 */
|
|
16
|
+
hint?: string;
|
|
17
|
+
}
|
|
18
|
+
/** 从一条错误字符串派生结构化分类 */
|
|
19
|
+
export declare function classifyError(raw: string): ValidationFinding;
|
|
20
|
+
export declare function classifyErrors(errors: string[]): ValidationFinding[];
|
|
21
|
+
export interface ValidationReport {
|
|
22
|
+
valid: boolean;
|
|
23
|
+
name: string;
|
|
24
|
+
steps: number;
|
|
25
|
+
inputs: number;
|
|
26
|
+
findings: ValidationFinding[];
|
|
27
|
+
}
|
|
28
|
+
/** 构造 --json 输出对象(纯函数,便于测试) */
|
|
29
|
+
export declare function buildValidationReport(name: string, stepCount: number, inputCount: number, errors: string[]): ValidationReport;
|
|
30
|
+
/**
|
|
31
|
+
* 渲染分组报告。stepOrder 用于让 step 分组按工作流定义顺序出现。
|
|
32
|
+
*/
|
|
33
|
+
export declare function formatValidationReport(workflowName: string, errors: string[], stepOrder?: string[]): string;
|