@autobe/agent 0.3.11 → 0.3.12

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.
@@ -8,7 +8,7 @@ export declare class AnalyzeAgent<Model extends ILlmSchema.Model> {
8
8
  private readonly createReviewerAgentFn;
9
9
  private readonly ctx;
10
10
  private readonly pointer;
11
- private readonly agent;
11
+ private readonly createInnerAgent;
12
12
  private readonly fileMap;
13
13
  constructor(createReviewerAgentFn: typeof createReviewerAgent, ctx: AutoBeContext<Model>, pointer: IPointer<{
14
14
  files: Record<Filename, FileContent>;
@@ -65,22 +65,29 @@ class AnalyzeAgent {
65
65
  this.pointer.value = { files };
66
66
  }),
67
67
  });
68
- this.agent = new core_1.MicroAgentica({
69
- controllers: [controller],
70
- model: ctx.model,
71
- vendor: ctx.vendor,
72
- config: {
73
- systemPrompt: {
74
- common: () => {
75
- var _a, _b;
76
- return "You are the best planner.\nYou will write documents and hand it over to the developer.\n\nThese are all the links that are currently referenced in the markdown. Please make sure to refer to them and don't forget to create the corresponding files.\nLike revision_history.md, you should not write fakes for content that does not exist yet. If written, it is only allowed if there is a user's request directly.\n\nPlease converse with the user based on the following guidelines and example templates.\nYou have to make a plan for the success of the user, and it has to be written in great detail to make the business successful.\nYour performance is measured by your customer's success.\nYou should listen to the reviewer and not make any requests to the reviewer.\nIf the reviewer asks for changes, revise the entire document from top to bottom,\nincorporating both the existing content and the requested changes. Do not add only the new parts\u2014integrate them into a full rewrite of the document.\nFor example, if you are asked to modify or expand 'internal_bulletin_board_service_plan.md',\ndo not create a document such as 'internal_bulletin_board_service_plan_expanded.md'.\nonly update 'internal_bulletin_board_service_plan.md' file.\n\n# user information\n- user locale: {% User Locale %}\n\n\n# Guidelines\nIf the user specifies the exact number of pages, please follow it precisely.\n\n{% Guidelines %}\n\n\n# Docuemtation Style\nAs with example documents, it is better to divide the documents into several pieces.\nIf the amount user want is 30,000 characters, you'll have to write 10 tables of contents, and 3,000 characters per page.\nFor readability, even if the user requests it, a file should not exceed 3,000 characters. (The amount of text is measured in String(content).length)\n\nThe first page must be the page that made up the table of contents, and you may need to modify the table of contents at the request of the reviewer.\nTake advantage of the markdown link functionality OR write step by step (use overwrite function).\nFor example, rather than writing a long markdown document, create a markdown document that makes up the table of contents.\nYou can also draw a gantt chart for the development period.\n\nAnd hang the link in the document in advance, and create other files that correspond to the link.\nEven if it's not the first page, divide the documents if it's readable to write them separately.\nHyperlink features allow you to create more colorful documents.\nAlso, please put numbers in the front of the document as much as possible so that the files can be arranged well.\nIt is recommended to write a longer document (more than 3,000 letters).\n\nPlease make the file appropriate for user's language.\nDocuments and descriptions should be tailored to the language of the user.\n\nPlease refer to the document below. The document below has a total of 1,500 characters and should be longer.\n\n# Example Documentation\n{% Example Documentation %}\n\n# Abort\nIf you don't have anything more to ask for, call the 'abort' function instead of answering. Never answer the text.\nSimilarly, if the reviewer says there is nothing more to modify and it is perfect, call the function 'abort'.\n'abort' is one of the tool lists that you have been given.\nIf the reviewer says the document is complete, but it appears they are referring to only one out of several documents, then it is not yet the right time to abort.\n\nWrite a long document, but keep your answer short." /* AutoBeSystemPromptConstant.ANALYZE */.replace("{% Guidelines %}", "You are the \u201CPlanning Expert (PlannerAgent)\u201D system agent.\nYou take full responsibility for all planning activities\u2014from product planning through requirements analysis, design, and documentation\u2014and you have extensive experience drafting planning documents.\n\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n1. Persona & Roles\n \u2022 **Planning Expert**: Establish business objectives, craft user scenarios, and develop a strategic roadmap \n \u2022 **Communication Specialist**: Use a friendly yet professional tone, actively engaging with stakeholders \n \u2022 **Documentation Specialist**: Follow a structured approach (Table of Contents \u2192 Detailed TOC \u2192 Final Document) and deliver outputs in Markdown\n\n2. Conversation-Driven Extraction Framework (WHY \u2192 WHAT \u2192 HOW)\n 1. **WHY (Reason for the Problem)**\n * \u201CWhy is this feature/project needed?\u201D \u201CWhat business or user problem does it solve?\u201D \n * Ask questions to clearly gather background, KPIs, and success criteria \n 2. **WHAT (What to Solve)**\n * \u201CWhat must be implemented?\u201D \u201CWhat are the key functional and non-functional requirements?\u201D \n * Distinguish between functional vs. non-functional, organize business requirements and user scenarios \n 3. **HOW (How to Execute)**\n * \u201CWhat flow and structure will the service follow?\u201D \u201CHow should the data model and ERD be designed?\u201D\n\n3. Scope & Constraints\n \u2022 Do **not** produce development-level documentation (backend, frontend, or infrastructure tech stacks). \n \u2022 API design, database structure, and architecture reviews should be suggested only at a high level from a planning perspective\u2014avoid any detailed code or configuration references.\n\n4. Deliverable Structuring Guidelines\n 1. **Present the TOC First**\n * Propose only the top-level Table of Contents initially; generate detailed sub-headings after user approval \n * When sub-TOCs grow large, split them into separate Markdown files and interlink them \n 2. **Document Augmentation**\n * Each document may be continuously updated; you may pre-link to future documents as placeholders \n * Only use links to actual, existing document paths\u2014external URLs that don\u2019t exist are prohibited \n 3. **Document Components**\n * Include: Overview, Objectives, User Personas, User Journeys, Functional & Non-Functional Requirements, Acceptance Criteria, ERD \n * Use tables, lists, and diagrams (ASCII or Mermaid) wherever helpful\n\n5. Communication & Feedback\n \u2022 After each phase, summarize progress and ask for the user\u2019s confirmation (e.g., \u201CShall we proceed with this TOC?\u201D) \n \u2022 Upon completing a document: include a feedback prompt such as \u201CIs there anything else to refine?\u201D\n\n6. Final Deliverables\n \u2022 Provide everything in Markdown (`.md`) format \n \u2022 Include inter-document reference links \n \u2022 Do **not** finalize the \u201Ccompleted\u201D version until the user has given explicit approval\n\n7. Review Loop\n \u2022 Use a while-loop process: after drafting any part, send it to the review agent and iterate until they grant approval. \n \u2022 Do not advance to the next section until the review agent confirms the current one meets quality standards.\n\n8. Approval & File Generation\n \u2022 Once the review agent approves the final draft, use the available tools to generate and export the document file. \n\n9. Iterative Writing Flow\n \u2022 Always start by proposing the top-level Table of Contents. \n \u2022 After TOC approval, draft the document one section (paragraph) at a time, submitting each for review before proceeding." /* AutoBeSystemPromptConstant.ANALYZE_GUIDELINE */)
77
- .replace("{% Example Documentation %}", "```\uAE30\uD68D\uC11C\n# \uC544\uBCF4\uCE74\uB3C4 \uB9C8\uCF13 (Avocado Market)\n\n**\uC11C\uBE44\uC2A4 \uC0C1\uC138 \uAE30\uD68D \uBCF4\uACE0\uC11C**\n\n---\n\n## 1. \uC11C\uBE44\uC2A4 \uAC1C\uC694\n\n**\uC544\uBCF4\uCE74\uB3C4 \uB9C8\uCF13**\uC740 \uC9C0\uC5ED \uAE30\uBC18 \uC911\uACE0 \uAC70\uB798\uB97C \uB118\uC5B4, **\uCE5C\uD658\uACBD \uAC00\uCE58\uC640 \uCEE4\uBBA4\uB2C8\uD2F0 \uC911\uC2EC\uC758 \uC5F0\uACB0**\uC744 \uC9C0\uD5A5\uD558\uB294 \uCC28\uC138\uB300 \uC911\uACE0\uAC70\uB798 \uD50C\uB7AB\uD3FC\uC785\uB2C8\uB2E4.\n\uC0AC\uC6A9\uC790\uB294 \uB204\uAD6C\uB098 \uC27D\uACE0 \uC548\uC804\uD558\uAC8C \uC911\uACE0 \uBB3C\uD488\uC744 \uC0AC\uACE0\uD314 \uC218 \uC788\uC73C\uBA70, \uC9C0\uC5ED \uC774\uC6C3\uACFC\uC758 \uAD50\uB958\uB97C \uD1B5\uD574 \uC9C0\uC18D \uAC00\uB2A5\uD55C \uC0DD\uD65C\uC744 \uC2E4\uD604\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](01_overview.md)\n\n---\n\n## 2. \uC2DC\uC7A5 \uC870\uC0AC \uBC0F \uBCA4\uCE58\uB9C8\uD0B9\n\n\uAD6D\uB0B4\uC678 \uC911\uACE0\uAC70\uB798 \uD50C\uB7AB\uD3FC \uC2DC\uC7A5 \uD604\uD669\uC744 \uC885\uD569 \uBD84\uC11D\uD558\uACE0, \uC8FC\uC694 \uACBD\uC7C1\uC0AC\uC758 \uC11C\uBE44\uC2A4 \uC804\uB7B5\uACFC \uCC28\uBCC4 \uC694\uC18C\uB97C \uBE44\uAD50\uD558\uC600\uC2B5\uB2C8\uB2E4. \uB610\uD55C, \uD5A5\uD6C4 \uC2DC\uC7A5 \uC131\uC7A5 \uAC00\uB2A5\uC131\uACFC \uD2B8\uB80C\uB4DC\uB3C4 \uD568\uAED8 \uC81C\uC2DC\uD569\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](02_market_analysis.md)\n\n---\n\n## 3. \uC8FC\uC694 \uAE30\uB2A5 \uBC0F \uC0C1\uC138 \uC124\uBA85\n\n\uC544\uBCF4\uCE74\uB3C4 \uB9C8\uCF13\uC774 \uC81C\uACF5\uD558\uB294 \uD575\uC2EC \uAE30\uB2A5\uB4E4\uACFC \uC2E4\uC81C \uC0AC\uC6A9 \uC2DC\uB098\uB9AC\uC624\uB97C \uAD6C\uCCB4\uC801\uC73C\uB85C \uC124\uBA85\uD569\uB2C8\uB2E4. \uAC01 \uAE30\uB2A5\uC758 \uBAA9\uC801, \uC0AC\uC6A9\uC790\uC5D0\uAC8C \uC81C\uACF5\uB418\uB294 \uAC00\uCE58, \uCC28\uBCC4\uD654\uB41C \uAE30\uC220 \uB610\uB294 UI \uC694\uC18C\uB97C \uD3EC\uD568\uD569\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](03_features.md)\n\n---\n\n## 4. \uC218\uC775 \uBAA8\uB378 \uBC0F \uC131\uC7A5 \uC804\uB7B5\n\n\uAD11\uACE0, \uD504\uB9AC\uBBF8\uC5C4 \uC11C\uBE44\uC2A4, \uC81C\uD734 \uAE30\uBC18 \uBE44\uC988\uB2C8\uC2A4 \uB4F1 \uB2E4\uC591\uD55C \uC218\uC775\uD654 \uBAA8\uB378\uC744 \uC81C\uC2DC\uD558\uBA70, \uC774\uB97C \uAE30\uBC18\uC73C\uB85C \uD55C \uC911\uC7A5\uAE30 \uC131\uC7A5 \uC804\uB7B5\uC744 \uD3EC\uD568\uD569\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](04_business_model.md)\n\n---\n\n## 5. UX/UI \uC124\uACC4 \uAC00\uC774\uB4DC\n\n\uC0AC\uC6A9\uC790 \uCE5C\uD654\uC801 \uC778\uD130\uD398\uC774\uC2A4 \uC124\uACC4 \uBC29\uC548\uACFC \uD568\uAED8, \uB808\uD37C\uB7F0\uC2A4 \uC0AC\uB840 \uBC0F \uC0AC\uC6A9\uC790 \uACBD\uD5D8 \uD5A5\uC0C1\uC744 \uC704\uD55C \uB514\uC790\uC778 \uC6D0\uCE59\uC744 \uC81C\uACF5\uD569\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](05_uxui_guidelines.md)\n\n---\n\n## 6. \uAC1C\uBC1C \uBC0F \uCD9C\uC2DC \uC804\uB7B5\n\n\uC11C\uBE44\uC2A4 \uAC1C\uBC1C\uBD80\uD130 MVP \uC124\uACC4, \uBCA0\uD0C0 \uD14C\uC2A4\uD2B8, \uC815\uC2DD \uCD9C\uC2DC\uAE4C\uC9C0\uC758 \uC804\uCCB4 \uB85C\uB4DC\uB9F5\uC744 \uC81C\uC2DC\uD558\uBA70, \uAC01 \uB2E8\uACC4\uBCC4 \uBAA9\uD45C\uC640 \uC804\uB7B5\uC744 \uAD6C\uCCB4\uD654\uD569\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](06_release_strategy.md)\n\n---\n\n## 7. \uAE30\uC220 \uC544\uD0A4\uD14D\uCC98\n\n\uD50C\uB7AB\uD3FC\uC758 \uC804\uCCB4 \uC2DC\uC2A4\uD15C \uAD6C\uC870, \uD575\uC2EC \uAE30\uC220 \uC2A4\uD0DD, \uC678\uBD80 API \uC5F0\uB3D9 \uBC29\uC2DD, \uC778\uD504\uB77C \uAD6C\uC131 \uB4F1\uC744 \uD3EC\uD568\uD55C \uAE30\uC220\uC801 \uC124\uACC4 \uB0B4\uC6A9\uC744 \uC815\uB9AC\uD569\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](07_architecture.md)\n\n---\n\n## 8. \uD3EC\uC9C0\uC154\uB2DD \uBC0F \uB9C8\uCF00\uD305 \uC804\uB7B5\n\n\uD0C0\uAE43 \uC0AC\uC6A9\uC790 \uC815\uC758, \uBE0C\uB79C\uB4DC \uC544\uC774\uB374\uD2F0\uD2F0 \uC218\uB9BD, \uD64D\uBCF4 \uC804\uB7B5, \uC9C0\uC5ED \uBC00\uCC29\uD615 \uCEE4\uBBA4\uB2C8\uD2F0 \uB9C8\uCF00\uD305 \uB4F1 \uC2E4\uC9C8\uC801\uC778 \uC2E4\uD589 \uC804\uB7B5\uC744 \uC81C\uC548\uD569\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](08_marketing.md)\n\n---\n\n## 9. \uB9AC\uC2A4\uD06C \uAD00\uB9AC \uBC29\uC548\n\n\uC11C\uBE44\uC2A4 \uC6B4\uC601 \uC804\uBC18\uC5D0\uC11C \uBC1C\uC0DD\uD560 \uC218 \uC788\uB294 \uB2E4\uC591\uD55C \uB9AC\uC2A4\uD06C\uB97C \uC2DD\uBCC4\uD558\uACE0, \uC774\uC5D0 \uB300\uD55C \uC0AC\uC804 \uC608\uBC29 \uBC0F \uC0AC\uD6C4 \uB300\uC751 \uBC29\uC548\uC744 \uCCB4\uACC4\uC801\uC73C\uB85C \uC815\uB9AC\uD558\uC600\uC2B5\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](09_risk_management.md)\n\n---\n\n## 10. \uC11C\uBE44\uC2A4 \uD655\uC7A5 \uAC00\uB2A5\uC131\n\n\uC911\uC7A5\uAE30\uC801\uC73C\uB85C \uACE0\uB824\uD560 \uC218 \uC788\uB294 \uC2E0\uADDC \uAE30\uB2A5, \uBE44\uC988\uB2C8\uC2A4 \uBAA8\uB378 \uD655\uC7A5, \uAE00\uB85C\uBC8C \uC9C4\uCD9C \uB4F1 \uC544\uBCF4\uCE74\uB3C4 \uB9C8\uCF13\uC758 \uBBF8\uB798 \uBE44\uC804\uC744 \uC81C\uC2DC\uD569\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](10_expansion.md)\n\n```;" /* AutoBeSystemPromptConstant.ANALYZE_EXAMPLE */)
78
- .replace("{% User Locale %}", (_b = (_a = ctx.config) === null || _a === void 0 ? void 0 : _a.locale) !== null && _b !== void 0 ? _b : "en-US");
68
+ this.createInnerAgent = () => {
69
+ const agent = new core_1.MicroAgentica({
70
+ controllers: [controller],
71
+ model: ctx.model,
72
+ vendor: ctx.vendor,
73
+ config: {
74
+ systemPrompt: {
75
+ common: () => {
76
+ var _a, _b;
77
+ return "You are the best planner.\nYou will write documents and hand it over to the developer.\nIt is advantageous to make several documents at once.\n\nThese are all the links that are currently referenced in the markdown. Please make sure to refer to them and don't forget to create the corresponding files.\nLike revision_history.md, you should not write fakes for content that does not exist yet. If written, it is only allowed if there is a user's request directly.\n\nPlease converse with the user based on the following guidelines and example templates.\nYou have to make a plan for the success of the user, and it has to be written in great detail to make the business successful.\nYour performance is measured by your customer's success.\nYou should listen to the reviewer and not make any requests to the reviewer.\nIf the reviewer asks for changes, revise the entire document from top to bottom,\nincorporating both the existing content and the requested changes. Do not add only the new parts\u2014integrate them into a full rewrite of the document.\nFor example, if you are asked to modify or expand 'internal_bulletin_board_service_plan.md',\ndo not create a document such as 'internal_bulletin_board_service_plan_expanded.md'.\nonly update 'internal_bulletin_board_service_plan.md' file.\n\n# user information\n- user locale: {% User Locale %}\n\n\n# Guidelines\nIf the user specifies the exact number of pages, please follow it precisely.\n\n{% Guidelines %}\n\n\n# Docuemtation Style\nAs with example documents, it is better to divide the documents into several pieces.\nIf the amount user want is 30,000 characters, you'll have to write 10 tables of contents, and 3,000 characters per page.\nFor readability, even if the user requests it, a file should not exceed 3,000 characters. (The amount of text is measured in String(content).length)\n\nThe first page must be the page that made up the table of contents, and you may need to modify the table of contents at the request of the reviewer.\nTake advantage of the markdown link functionality OR write step by step (use overwrite function).\nFor example, rather than writing a long markdown document, create a markdown document that makes up the table of contents.\nYou can also draw a gantt chart for the development period.\n\nAnd hang the link in the document in advance, and create other files that correspond to the link.\nEven if it's not the first page, divide the documents if it's readable to write them separately.\nHyperlink features allow you to create more colorful documents.\nAlso, please put numbers in the front of the document as much as possible so that the files can be arranged well.\nIt is recommended to write a longer document (more than 3,000 letters).\n\nPlease make the file appropriate for user's language.\nDocuments and descriptions should be tailored to the language of the user.\n\nPlease refer to the document below. The document below has a total of 1,500 characters and should be longer.\n\n# Example Documentation\n{% Example Documentation %}\n\n# Abort\nIf you don't have anything more to ask for, call the 'abort' function instead of answering. Never answer the text.\nSimilarly, if the reviewer says there is nothing more to modify and it is perfect, call the function 'abort'.\n'abort' is one of the tool lists that you have been given.\nIf the reviewer says the document is complete, but it appears they are referring to only one out of several documents, then it is not yet the right time to abort.\n\nWrite a long document, but keep your answer short." /* AutoBeSystemPromptConstant.ANALYZE */.replace("{% Guidelines %}", "You are the \u201CPlanning Expert (PlannerAgent)\u201D system agent.\nYou take full responsibility for all planning activities\u2014from product planning through requirements analysis, design, and documentation\u2014and you have extensive experience drafting planning documents.\n\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n1. Persona & Roles\n \u2022 **Planning Expert**: Establish business objectives, craft user scenarios, and develop a strategic roadmap \n \u2022 **Communication Specialist**: Use a friendly yet professional tone, actively engaging with stakeholders \n \u2022 **Documentation Specialist**: Follow a structured approach (Table of Contents \u2192 Detailed TOC \u2192 Final Document) and deliver outputs in Markdown\n\n2. Conversation-Driven Extraction Framework (WHY \u2192 WHAT \u2192 HOW)\n 1. **WHY (Reason for the Problem)**\n * \u201CWhy is this feature/project needed?\u201D \u201CWhat business or user problem does it solve?\u201D \n * Ask questions to clearly gather background, KPIs, and success criteria \n 2. **WHAT (What to Solve)**\n * \u201CWhat must be implemented?\u201D \u201CWhat are the key functional and non-functional requirements?\u201D \n * Distinguish between functional vs. non-functional, organize business requirements and user scenarios \n 3. **HOW (How to Execute)**\n * \u201CWhat flow and structure will the service follow?\u201D \u201CHow should the data model and ERD be designed?\u201D\n\n3. Scope & Constraints\n \u2022 Do **not** produce development-level documentation (backend, frontend, or infrastructure tech stacks). \n \u2022 API design, database structure, and architecture reviews should be suggested only at a high level from a planning perspective\u2014avoid any detailed code or configuration references.\n\n4. Deliverable Structuring Guidelines\n 1. **Present the TOC First**\n * Propose only the top-level Table of Contents initially; generate detailed sub-headings after user approval \n * When sub-TOCs grow large, split them into separate Markdown files and interlink them \n 2. **Document Augmentation**\n * Each document may be continuously updated; you may pre-link to future documents as placeholders \n * Only use links to actual, existing document paths\u2014external URLs that don\u2019t exist are prohibited \n 3. **Document Components**\n * Include: Overview, Objectives, User Personas, User Journeys, Functional & Non-Functional Requirements, Acceptance Criteria, ERD \n * Use tables, lists, and diagrams (ASCII or Mermaid) wherever helpful\n\n5. Communication & Feedback\n \u2022 After each phase, summarize progress and ask for the user\u2019s confirmation (e.g., \u201CShall we proceed with this TOC?\u201D) \n \u2022 Upon completing a document: include a feedback prompt such as \u201CIs there anything else to refine?\u201D\n\n6. Final Deliverables\n \u2022 Provide everything in Markdown (`.md`) format \n \u2022 Include inter-document reference links \n \u2022 Do **not** finalize the \u201Ccompleted\u201D version until the user has given explicit approval\n\n7. Review Loop\n \u2022 Use a while-loop process: after drafting any part, send it to the review agent and iterate until they grant approval. \n \u2022 Do not advance to the next section until the review agent confirms the current one meets quality standards.\n\n8. Approval & File Generation\n \u2022 Once the review agent approves the final draft, use the available tools to generate and export the document file. \n\n9. Iterative Writing Flow\n \u2022 Always start by proposing the top-level Table of Contents. \n \u2022 After TOC approval, draft the document one section (paragraph) at a time, submitting each for review before proceeding." /* AutoBeSystemPromptConstant.ANALYZE_GUIDELINE */)
78
+ .replace("{% Example Documentation %}", "```\uAE30\uD68D\uC11C\n# \uC544\uBCF4\uCE74\uB3C4 \uB9C8\uCF13 (Avocado Market)\n\n**\uC11C\uBE44\uC2A4 \uC0C1\uC138 \uAE30\uD68D \uBCF4\uACE0\uC11C**\n\n---\n\n## 1. \uC11C\uBE44\uC2A4 \uAC1C\uC694\n\n**\uC544\uBCF4\uCE74\uB3C4 \uB9C8\uCF13**\uC740 \uC9C0\uC5ED \uAE30\uBC18 \uC911\uACE0 \uAC70\uB798\uB97C \uB118\uC5B4, **\uCE5C\uD658\uACBD \uAC00\uCE58\uC640 \uCEE4\uBBA4\uB2C8\uD2F0 \uC911\uC2EC\uC758 \uC5F0\uACB0**\uC744 \uC9C0\uD5A5\uD558\uB294 \uCC28\uC138\uB300 \uC911\uACE0\uAC70\uB798 \uD50C\uB7AB\uD3FC\uC785\uB2C8\uB2E4.\n\uC0AC\uC6A9\uC790\uB294 \uB204\uAD6C\uB098 \uC27D\uACE0 \uC548\uC804\uD558\uAC8C \uC911\uACE0 \uBB3C\uD488\uC744 \uC0AC\uACE0\uD314 \uC218 \uC788\uC73C\uBA70, \uC9C0\uC5ED \uC774\uC6C3\uACFC\uC758 \uAD50\uB958\uB97C \uD1B5\uD574 \uC9C0\uC18D \uAC00\uB2A5\uD55C \uC0DD\uD65C\uC744 \uC2E4\uD604\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](01_overview.md)\n\n---\n\n## 2. \uC2DC\uC7A5 \uC870\uC0AC \uBC0F \uBCA4\uCE58\uB9C8\uD0B9\n\n\uAD6D\uB0B4\uC678 \uC911\uACE0\uAC70\uB798 \uD50C\uB7AB\uD3FC \uC2DC\uC7A5 \uD604\uD669\uC744 \uC885\uD569 \uBD84\uC11D\uD558\uACE0, \uC8FC\uC694 \uACBD\uC7C1\uC0AC\uC758 \uC11C\uBE44\uC2A4 \uC804\uB7B5\uACFC \uCC28\uBCC4 \uC694\uC18C\uB97C \uBE44\uAD50\uD558\uC600\uC2B5\uB2C8\uB2E4. \uB610\uD55C, \uD5A5\uD6C4 \uC2DC\uC7A5 \uC131\uC7A5 \uAC00\uB2A5\uC131\uACFC \uD2B8\uB80C\uB4DC\uB3C4 \uD568\uAED8 \uC81C\uC2DC\uD569\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](02_market_analysis.md)\n\n---\n\n## 3. \uC8FC\uC694 \uAE30\uB2A5 \uBC0F \uC0C1\uC138 \uC124\uBA85\n\n\uC544\uBCF4\uCE74\uB3C4 \uB9C8\uCF13\uC774 \uC81C\uACF5\uD558\uB294 \uD575\uC2EC \uAE30\uB2A5\uB4E4\uACFC \uC2E4\uC81C \uC0AC\uC6A9 \uC2DC\uB098\uB9AC\uC624\uB97C \uAD6C\uCCB4\uC801\uC73C\uB85C \uC124\uBA85\uD569\uB2C8\uB2E4. \uAC01 \uAE30\uB2A5\uC758 \uBAA9\uC801, \uC0AC\uC6A9\uC790\uC5D0\uAC8C \uC81C\uACF5\uB418\uB294 \uAC00\uCE58, \uCC28\uBCC4\uD654\uB41C \uAE30\uC220 \uB610\uB294 UI \uC694\uC18C\uB97C \uD3EC\uD568\uD569\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](03_features.md)\n\n---\n\n## 4. \uC218\uC775 \uBAA8\uB378 \uBC0F \uC131\uC7A5 \uC804\uB7B5\n\n\uAD11\uACE0, \uD504\uB9AC\uBBF8\uC5C4 \uC11C\uBE44\uC2A4, \uC81C\uD734 \uAE30\uBC18 \uBE44\uC988\uB2C8\uC2A4 \uB4F1 \uB2E4\uC591\uD55C \uC218\uC775\uD654 \uBAA8\uB378\uC744 \uC81C\uC2DC\uD558\uBA70, \uC774\uB97C \uAE30\uBC18\uC73C\uB85C \uD55C \uC911\uC7A5\uAE30 \uC131\uC7A5 \uC804\uB7B5\uC744 \uD3EC\uD568\uD569\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](04_business_model.md)\n\n---\n\n## 5. UX/UI \uC124\uACC4 \uAC00\uC774\uB4DC\n\n\uC0AC\uC6A9\uC790 \uCE5C\uD654\uC801 \uC778\uD130\uD398\uC774\uC2A4 \uC124\uACC4 \uBC29\uC548\uACFC \uD568\uAED8, \uB808\uD37C\uB7F0\uC2A4 \uC0AC\uB840 \uBC0F \uC0AC\uC6A9\uC790 \uACBD\uD5D8 \uD5A5\uC0C1\uC744 \uC704\uD55C \uB514\uC790\uC778 \uC6D0\uCE59\uC744 \uC81C\uACF5\uD569\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](05_uxui_guidelines.md)\n\n---\n\n## 6. \uAC1C\uBC1C \uBC0F \uCD9C\uC2DC \uC804\uB7B5\n\n\uC11C\uBE44\uC2A4 \uAC1C\uBC1C\uBD80\uD130 MVP \uC124\uACC4, \uBCA0\uD0C0 \uD14C\uC2A4\uD2B8, \uC815\uC2DD \uCD9C\uC2DC\uAE4C\uC9C0\uC758 \uC804\uCCB4 \uB85C\uB4DC\uB9F5\uC744 \uC81C\uC2DC\uD558\uBA70, \uAC01 \uB2E8\uACC4\uBCC4 \uBAA9\uD45C\uC640 \uC804\uB7B5\uC744 \uAD6C\uCCB4\uD654\uD569\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](06_release_strategy.md)\n\n---\n\n## 7. \uAE30\uC220 \uC544\uD0A4\uD14D\uCC98\n\n\uD50C\uB7AB\uD3FC\uC758 \uC804\uCCB4 \uC2DC\uC2A4\uD15C \uAD6C\uC870, \uD575\uC2EC \uAE30\uC220 \uC2A4\uD0DD, \uC678\uBD80 API \uC5F0\uB3D9 \uBC29\uC2DD, \uC778\uD504\uB77C \uAD6C\uC131 \uB4F1\uC744 \uD3EC\uD568\uD55C \uAE30\uC220\uC801 \uC124\uACC4 \uB0B4\uC6A9\uC744 \uC815\uB9AC\uD569\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](07_architecture.md)\n\n---\n\n## 8. \uD3EC\uC9C0\uC154\uB2DD \uBC0F \uB9C8\uCF00\uD305 \uC804\uB7B5\n\n\uD0C0\uAE43 \uC0AC\uC6A9\uC790 \uC815\uC758, \uBE0C\uB79C\uB4DC \uC544\uC774\uB374\uD2F0\uD2F0 \uC218\uB9BD, \uD64D\uBCF4 \uC804\uB7B5, \uC9C0\uC5ED \uBC00\uCC29\uD615 \uCEE4\uBBA4\uB2C8\uD2F0 \uB9C8\uCF00\uD305 \uB4F1 \uC2E4\uC9C8\uC801\uC778 \uC2E4\uD589 \uC804\uB7B5\uC744 \uC81C\uC548\uD569\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](08_marketing.md)\n\n---\n\n## 9. \uB9AC\uC2A4\uD06C \uAD00\uB9AC \uBC29\uC548\n\n\uC11C\uBE44\uC2A4 \uC6B4\uC601 \uC804\uBC18\uC5D0\uC11C \uBC1C\uC0DD\uD560 \uC218 \uC788\uB294 \uB2E4\uC591\uD55C \uB9AC\uC2A4\uD06C\uB97C \uC2DD\uBCC4\uD558\uACE0, \uC774\uC5D0 \uB300\uD55C \uC0AC\uC804 \uC608\uBC29 \uBC0F \uC0AC\uD6C4 \uB300\uC751 \uBC29\uC548\uC744 \uCCB4\uACC4\uC801\uC73C\uB85C \uC815\uB9AC\uD558\uC600\uC2B5\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](09_risk_management.md)\n\n---\n\n## 10. \uC11C\uBE44\uC2A4 \uD655\uC7A5 \uAC00\uB2A5\uC131\n\n\uC911\uC7A5\uAE30\uC801\uC73C\uB85C \uACE0\uB824\uD560 \uC218 \uC788\uB294 \uC2E0\uADDC \uAE30\uB2A5, \uBE44\uC988\uB2C8\uC2A4 \uBAA8\uB378 \uD655\uC7A5, \uAE00\uB85C\uBC8C \uC9C4\uCD9C \uB4F1 \uC544\uBCF4\uCE74\uB3C4 \uB9C8\uCF13\uC758 \uBBF8\uB798 \uBE44\uC804\uC744 \uC81C\uC2DC\uD569\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](10_expansion.md)\n\n```;" /* AutoBeSystemPromptConstant.ANALYZE_EXAMPLE */)
79
+ .replace("{% User Locale %}", (_b = (_a = ctx.config) === null || _a === void 0 ? void 0 : _a.locale) !== null && _b !== void 0 ? _b : "en-US");
80
+ },
81
+ describe: () => {
82
+ return "Answer only 'completion' or 'failure'.";
83
+ },
79
84
  },
80
85
  },
81
- },
82
- tokenUsage: ctx.usage(),
83
- });
86
+ tokenUsage: ctx.usage(),
87
+ histories: [],
88
+ });
89
+ return agent;
90
+ };
84
91
  }
85
92
  /**
86
93
  * Conversate with planner agent
@@ -91,7 +98,7 @@ class AnalyzeAgent {
91
98
  conversate(content) {
92
99
  return __awaiter(this, void 0, void 0, function* () {
93
100
  var _a, _b, _c, _d;
94
- const response = yield this.agent.conversate(content);
101
+ const response = yield this.createInnerAgent().conversate(content);
95
102
  const lastMessage = response[response.length - 1];
96
103
  if ("text" in lastMessage) {
97
104
  this.ctx.dispatch({
@@ -132,6 +139,7 @@ class AnalyzeAgent {
132
139
  }));
133
140
  }
134
141
  }
142
+ return `If the document is not 1,000 characters, please fill it out in more abundance, and if it exceeds 1,000 characters, please fill out the next document. If you don't have the next document, you can exit now.`;
135
143
  }
136
144
  return "COMPLETE";
137
145
  });
@@ -157,8 +165,8 @@ function createController(props) {
157
165
  props.build(props.execute.allFiles());
158
166
  return response;
159
167
  },
160
- createOrUpdateFile: (input) => {
161
- const response = props.execute.createOrUpdateFile(input);
168
+ createOrUpdateFiles: (input) => {
169
+ const response = props.execute.createOrUpdateFiles(input);
162
170
  props.build(props.execute.allFiles());
163
171
  return response;
164
172
  },
@@ -173,30 +181,57 @@ const claude = {
173
181
  },
174
182
  functions: [
175
183
  {
176
- name: "createOrUpdateFile",
184
+ name: "createOrUpdateFiles",
177
185
  parameters: {
178
186
  type: "object",
179
187
  properties: {
180
- reason: {
181
- type: "string"
182
- },
183
- filename: {
184
- type: "string",
185
- pattern: "((.*)\\.md)$"
186
- },
187
- markdown: {
188
- type: "string"
188
+ files: {
189
+ type: "array",
190
+ items: {
191
+ type: "object",
192
+ properties: {
193
+ reason: {
194
+ type: "string"
195
+ },
196
+ filename: {
197
+ type: "string",
198
+ pattern: "((.*)\\.md)$"
199
+ },
200
+ markdown: {
201
+ type: "string"
202
+ }
203
+ },
204
+ required: [
205
+ "reason",
206
+ "filename",
207
+ "markdown"
208
+ ]
209
+ }
189
210
  }
190
211
  },
191
212
  required: [
192
- "reason",
193
- "filename",
194
- "markdown"
213
+ "files"
195
214
  ],
196
215
  additionalProperties: false,
197
216
  $defs: {}
198
217
  },
199
- validate: (() => { const _io0 = input => "string" === typeof input.reason && ("string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename)) && "string" === typeof input.markdown; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, {
218
+ validate: (() => { const _io0 = input => Array.isArray(input.files) && input.files.every(elem => "object" === typeof elem && null !== elem && _io1(elem)); const _io1 = input => "string" === typeof input.reason && ("string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename)) && "string" === typeof input.markdown; const _vo0 = (input, _path, _exceptionable = true) => [(Array.isArray(input.files) || _report(_exceptionable, {
219
+ path: _path + ".files",
220
+ expected: "Array<__type>",
221
+ value: input.files
222
+ })) && input.files.map((elem, _index2) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
223
+ path: _path + ".files[" + _index2 + "]",
224
+ expected: "__type.o1",
225
+ value: elem
226
+ })) && _vo1(elem, _path + ".files[" + _index2 + "]", true && _exceptionable) || _report(_exceptionable, {
227
+ path: _path + ".files[" + _index2 + "]",
228
+ expected: "__type.o1",
229
+ value: elem
230
+ })).every(flag => flag) || _report(_exceptionable, {
231
+ path: _path + ".files",
232
+ expected: "Array<__type>",
233
+ value: input.files
234
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, {
200
235
  path: _path + ".reason",
201
236
  expected: "string",
202
237
  value: input.reason
@@ -388,30 +423,57 @@ const collection = {
388
423
  },
389
424
  functions: [
390
425
  {
391
- name: "createOrUpdateFile",
426
+ name: "createOrUpdateFiles",
392
427
  parameters: {
393
428
  type: "object",
394
429
  properties: {
395
- reason: {
396
- type: "string"
397
- },
398
- filename: {
399
- description: "@pattern ((.*)\\.md)$",
400
- type: "string"
401
- },
402
- markdown: {
403
- type: "string"
430
+ files: {
431
+ type: "array",
432
+ items: {
433
+ type: "object",
434
+ properties: {
435
+ reason: {
436
+ type: "string"
437
+ },
438
+ filename: {
439
+ description: "@pattern ((.*)\\.md)$",
440
+ type: "string"
441
+ },
442
+ markdown: {
443
+ type: "string"
444
+ }
445
+ },
446
+ required: [
447
+ "reason",
448
+ "filename",
449
+ "markdown"
450
+ ]
451
+ }
404
452
  }
405
453
  },
406
454
  required: [
407
- "reason",
408
- "filename",
409
- "markdown"
455
+ "files"
410
456
  ],
411
457
  additionalProperties: false,
412
458
  $defs: {}
413
459
  },
414
- validate: (() => { const _io0 = input => "string" === typeof input.reason && ("string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename)) && "string" === typeof input.markdown; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, {
460
+ validate: (() => { const _io0 = input => Array.isArray(input.files) && input.files.every(elem => "object" === typeof elem && null !== elem && _io1(elem)); const _io1 = input => "string" === typeof input.reason && ("string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename)) && "string" === typeof input.markdown; const _vo0 = (input, _path, _exceptionable = true) => [(Array.isArray(input.files) || _report(_exceptionable, {
461
+ path: _path + ".files",
462
+ expected: "Array<__type>",
463
+ value: input.files
464
+ })) && input.files.map((elem, _index2) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
465
+ path: _path + ".files[" + _index2 + "]",
466
+ expected: "__type.o1",
467
+ value: elem
468
+ })) && _vo1(elem, _path + ".files[" + _index2 + "]", true && _exceptionable) || _report(_exceptionable, {
469
+ path: _path + ".files[" + _index2 + "]",
470
+ expected: "__type.o1",
471
+ value: elem
472
+ })).every(flag => flag) || _report(_exceptionable, {
473
+ path: _path + ".files",
474
+ expected: "Array<__type>",
475
+ value: input.files
476
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, {
415
477
  path: _path + ".reason",
416
478
  expected: "string",
417
479
  value: input.reason
@@ -609,29 +671,57 @@ const collection = {
609
671
  },
610
672
  functions: [
611
673
  {
612
- name: "createOrUpdateFile",
674
+ name: "createOrUpdateFiles",
613
675
  parameters: {
614
676
  type: "object",
615
677
  properties: {
616
- reason: {
617
- type: "string"
618
- },
619
- filename: {
620
- type: "string",
621
- pattern: "((.*)\\.md)$"
622
- },
623
- markdown: {
624
- type: "string"
678
+ files: {
679
+ type: "array",
680
+ items: {
681
+ type: "object",
682
+ properties: {
683
+ reason: {
684
+ type: "string"
685
+ },
686
+ filename: {
687
+ type: "string",
688
+ pattern: "((.*)\\.md)$"
689
+ },
690
+ markdown: {
691
+ type: "string"
692
+ }
693
+ },
694
+ required: [
695
+ "reason",
696
+ "filename",
697
+ "markdown"
698
+ ],
699
+ additionalProperties: false
700
+ }
625
701
  }
626
702
  },
627
703
  required: [
628
- "reason",
629
- "filename",
630
- "markdown"
704
+ "files"
631
705
  ],
632
706
  additionalProperties: false
633
707
  },
634
- validate: (() => { const _io0 = input => "string" === typeof input.reason && ("string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename)) && "string" === typeof input.markdown; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, {
708
+ validate: (() => { const _io0 = input => Array.isArray(input.files) && input.files.every(elem => "object" === typeof elem && null !== elem && _io1(elem)); const _io1 = input => "string" === typeof input.reason && ("string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename)) && "string" === typeof input.markdown; const _vo0 = (input, _path, _exceptionable = true) => [(Array.isArray(input.files) || _report(_exceptionable, {
709
+ path: _path + ".files",
710
+ expected: "Array<__type>",
711
+ value: input.files
712
+ })) && input.files.map((elem, _index2) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
713
+ path: _path + ".files[" + _index2 + "]",
714
+ expected: "__type.o1",
715
+ value: elem
716
+ })) && _vo1(elem, _path + ".files[" + _index2 + "]", true && _exceptionable) || _report(_exceptionable, {
717
+ path: _path + ".files[" + _index2 + "]",
718
+ expected: "__type.o1",
719
+ value: elem
720
+ })).every(flag => flag) || _report(_exceptionable, {
721
+ path: _path + ".files",
722
+ expected: "Array<__type>",
723
+ value: input.files
724
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, {
635
725
  path: _path + ".reason",
636
726
  expected: "string",
637
727
  value: input.reason
@@ -1 +1 @@
1
- {"version":3,"file":"AnalyzeAgent.js","sourceRoot":"","sources":["../../src/analyze/AnalyzeAgent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAoE;AAGpE,kDAA0B;AAI1B,oEAAiE;AAEjE,yCAAiD;AAKjD,MAAa,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAAmE;IAC1E,MAAM;IACN,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;IAChB,KAAK,EAAE,MAAM;IACb,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAA0C;CAChD,CAAC"}
@@ -16,7 +16,7 @@ const createReviewerAgent = (ctx, input) => {
16
16
  });
17
17
  return fileLinks;
18
18
  })));
19
- return new core_1.MicroAgentica({
19
+ const agent = new core_1.MicroAgentica({
20
20
  model: ctx.model,
21
21
  vendor: ctx.vendor,
22
22
  controllers: [],
@@ -58,15 +58,13 @@ const createReviewerAgent = (ctx, input) => {
58
58
  "You should also ask for the rest of the document to be created.",
59
59
  "At this time, the document should be newly created with the name attached to the link, not modified.",
60
60
  "<CurrentFiles>",
61
- JSON.stringify(Object.entries(input.currentFiles)
62
- .slice(-2)
63
- .map(([filename, content]) => {
61
+ JSON.stringify(Object.entries(input.currentFiles).map(([filename, content]) => {
64
62
  return {
65
63
  filename,
66
64
  content,
67
65
  content_length: content.length,
68
66
  };
69
- }), null, 2),
67
+ })),
70
68
  "</CurrentFiles>",
71
69
  "",
72
70
  `These are all the links that are currently referenced in the markdown. Please make sure to refer to them and don't forget to create the corresponding files.`,
@@ -78,20 +76,23 @@ const createReviewerAgent = (ctx, input) => {
78
76
  `</Linked Files>`,
79
77
  "",
80
78
  "Write a long document, but keep your answer short.",
81
- "The planner agent can only create and modify one document at a time, so do not ask to create or modify multiple documents at a time.",
82
79
  "If you say the document is complete, the planner will finish writing the document.",
83
80
  "If only one document has been written out of several that need to be completed, do not simply state that it is complete—also provide instructions for what should be done next.",
84
81
  "For example, if you say, “The document internal_bulletin_board_service_plan.md has already been written with over 1,000 characters. Its quality is sufficient, so mark it as complete without any further requests,” then the planner will respond with “Got it!” and stop writing—even if there are still remaining documents.",
85
82
  "Be cautious: the planner will try to avoid work by interpreting your words in a way that lets them do less.",
86
83
  "The correct response from you should be:",
87
- "\“The document's quality is sufficient, so mark it as complete without any further requests. Now, proceed to write the next document immediately.\”",
84
+ "\“The document's quality is sufficient, so mark it as complete without any further requests. Now, proceed to write the next documents immediately.\”",
88
85
  "When requesting the next document to be written, you must include both the document title and a brief description of its content.",
89
86
  ].join("\n");
90
87
  },
88
+ describe: () => {
89
+ return "Answer only 'completion' or 'failure'.";
90
+ },
91
91
  },
92
92
  },
93
93
  tokenUsage: ctx.usage(),
94
94
  });
95
+ return agent;
95
96
  };
96
97
  exports.createReviewerAgent = createReviewerAgent;
97
98
  //# sourceMappingURL=CreateReviewerAgent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CreateReviewerAgent.js","sourceRoot":"","sources":["../../src/analyze/CreateReviewerAgent.ts"],"names":[],"mappings":";;;AAAA,yCAA+C;AAKxC,MAAM,mBAAmB,GAAG,CACjC,GAAyB,EACzB,KAAgC,EAChC,EAAE;IACF,gFAAgF;IAChF,MAAM,aAAa,GAAG,KAAK,CAAC,IAAI,CAC9B,IAAI,GAAG,CACL,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QACpD,MAAM,cAAc,GAAG,CAAC,IAAI,CAAC,CAAC;QAE9B,MAAM,KAAK,GAAG,wBAAwB,CAAC;QAEvC,MAAM,SAAS,GAAG,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;aAC3C,GAAG,CAAC,CAAC,KAAK,EA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tG,gBAAgB;wBAChB,IAAI,CAAC,SAAS,CACZ,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,EAAE;4BAC7D,OAAO;gCACL,QAAQ;gCACR,OAAO;gCACP,cAAc,EAAE,OAAO,CAAC,MAAM;6BAC/B,CAAC;wBACJ,CAAC,CAAC,CACH;wBACD,iBAAiB;wBACjB,EAAE;wBACF,8JAA8J;wBAC9J,gBAAgB;wBAChB,aAAa,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE;4BAC7B,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,QAAQ,CACxD,QAAQ,CACT,CAAC;4BACF,OAAO,MAAM,SAAS,KAAK,QAAQ,EAAE,CAAC;wBACxC,CAAC,CAAC;wBACF,iBAAiB;wBACjB,EAAE;wBACF,oDAAoD;wBACpD,oFAAoF;wBACpF,iLAAiL;wBACjL,iUAAiU;wBACjU,6GAA6G;wBAC7G,0CAA0C;wBAC1C,sJAAsJ;wBACtJ,mIAAmI;qBACpI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACf,CAAC;gBACD,QAAQ,EAAE,GAAG,EAAE;oBACb,OAAO,wCAAwC,CAAC;gBAClD,CAAC;aACF;SACF;QACD,UAAU,EAAE,GAAG,CAAC,KAAK,EAAE;KACxB,CAAC,CAAC;IAEH,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AA1GW,QAAA,mBAAmB,uBA0G9B"}
@@ -2,24 +2,25 @@ type Filename = string;
2
2
  type FileContent = string;
3
3
  export interface IPlanning {
4
4
  /**
5
- * Generate markdown file. if there is already created file, overwrite it.
6
- *
7
- * @param input.reason Describe briefly why you made this document, and if you
8
- * have any plans for the next one.
9
- * @param input.filename Filename to generate or overwrite.
10
- * @param input.markdown Markdown file content. Only write the content of the
11
- * file. Do not include any questions.
5
+ * Generate multiple markdown files. if there is already created files,
6
+ * overwrite it. Generate several markdown files at once.
12
7
  */
13
- createOrUpdateFile(input: {
14
- reason: string;
15
- filename: `${string}.md`;
16
- markdown: string;
8
+ createOrUpdateFiles(input: {
9
+ files: Array<{
10
+ /**
11
+ * Describe briefly why you made this document, and if you have any plans
12
+ * for the next one.
13
+ */
14
+ reason: string;
15
+ /** Filename to generate or overwrite. */
16
+ filename: `${string}.md`;
17
+ /**
18
+ * Markdown file content. Only write the content of the file. Do not
19
+ * include any questions.
20
+ */
21
+ markdown: string;
22
+ }>;
17
23
  }): Promise<void>;
18
- /**
19
- * Read markdown file content.
20
- *
21
- * @param input.filename Filename to read.
22
- */
23
24
  /**
24
25
  * Remove markdown file.
25
26
  *
@@ -46,10 +47,12 @@ export interface IPlanning {
46
47
  export declare class Planning implements IPlanning {
47
48
  private readonly fileMap;
48
49
  constructor(fileMap?: Record<Filename, FileContent>);
49
- createOrUpdateFile(input: {
50
- reason: string;
51
- filename: `${string}.md`;
52
- markdown: string;
50
+ createOrUpdateFiles(input: {
51
+ files: Array<{
52
+ reason: string;
53
+ filename: `${string}.md`;
54
+ markdown: string;
55
+ }>;
53
56
  }): Promise<void>;
54
57
  removeFile(input: {
55
58
  filename: `${string}.md`;
@@ -14,14 +14,13 @@ class Planning {
14
14
  constructor(fileMap = {}) {
15
15
  this.fileMap = fileMap;
16
16
  }
17
- createOrUpdateFile(input) {
17
+ createOrUpdateFiles(input) {
18
18
  return __awaiter(this, void 0, void 0, function* () {
19
- this.fileMap[input.filename] = input.markdown;
19
+ input.files.forEach((file) => {
20
+ this.fileMap[file.filename] = file.markdown;
21
+ });
20
22
  });
21
23
  }
22
- // async readFile(input: { filename: `${string}.md` }): Promise<string> {
23
- // return this.fileMap[input.filename];
24
- // }
25
24
  removeFile(input) {
26
25
  return __awaiter(this, void 0, void 0, function* () {
27
26
  delete this.fileMap[input.filename];
@@ -1 +1 @@
1
- {"version":3,"file":"Planning.js","sourceRoot":"","sources":["../../src/analyze/Planning.ts"],"names":[],"mappings":";;;;;;;;;;;;AA+CA,MAAa,QAAQ;IACnB,YAA6B,UAAyC,EAAE;QAA3C,YAAO,GAAP,OAAO,CAAoC;IAAG,CAAC;IAEtE,kBAAkB,CAAC,KAIxB;;YACC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC;QAChD,CAAC;KAAA;IAED,yEAAyE;IACzE,yCAAyC;IACzC,IAAI;IAEE,UAAU,CAAC,KAAmC;;YAClD,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QACtC,CAAC;KAAA;IAED,KAAK,CAAC,MAA0B;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,cAAc;IACd,QAAQ;QACN,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;CACF;AA3BD,4BA2BC"}
1
+ {"version":3,"file":"Planning.js","sourceRoot":"","sources":["../../src/analyze/Planning.ts"],"names":[],"mappings":";;;;;;;;;;;;AAgDA,MAAa,QAAQ;IACnB,YAA6B,UAAyC,EAAE;QAA3C,YAAO,GAAP,OAAO,CAAoC;IAAG,CAAC;IAEtE,mBAAmB,CAAC,KAMzB;;YACC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;gBAC3B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC;YAC9C,CAAC,CAAC,CAAC;QACL,CAAC;KAAA;IAEK,UAAU,CAAC,KAAmC;;YAClD,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QACtC,CAAC;KAAA;IAED,KAAK,CAAC,MAA0B;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,cAAc;IACd,QAAQ;QACN,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;CACF;AA3BD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