Skip to content

Conversation

@samchon
Copy link
Member

@samchon samchon commented Dec 10, 2025

This pull request introduces a new mechanism for agents to re-access previously requested analysis files and schemas within RAG (Retrieval-Augmented Generation) workflows. The changes expand the function calling interface and update documentation to support more efficient context management across multiple orchestration cycles. The most important changes are grouped below:

Function Calling Interface & TypeScript Definitions

  • Added a new discriminated union type (getPreviousAnalysisFiles) to the request property in ANALYZE_REVIEW.md, ANALYZE_SCENARIO.md, and ANALYZE_WRITE.md. This allows agents to re-request files that were previously loaded in earlier RAG iterations, improving context continuity and preventing redundant requests. [1] [2] [3] [4]
  • Defined the IAutoBePreliminaryGetPreviousAnalysisFiles interface, specifying its usage, constraints, and integration into the main function calling workflow for both preliminary and completion requests. [1] [2] [3]

Agent Execution Strategy & Chain of Thought

  • Updated agent instructions to clarify the mandatory execution strategy, emphasizing the importance of function calling, the use of the thinking field for self-reflection, and strict prohibitions against unnecessary user interaction or parallel requests. [1] [2]
  • Provided examples and guidance for strategic file retrieval, highlighting when to request new files versus re-accessing previous ones, and how to succinctly summarize reasoning in the thinking field. [1] [2]

Documentation & Output Format

  • Enhanced documentation for the discriminated union request property, detailing the three possible request types and their intended usage scenarios for both scenario composition and document writing agents. [1] [2] [3]
  • Updated output format and TypeScript interface examples to reflect the new request type and clarify the structure of agent responses. [1] [2]

Authorization & Prisma Schema Retrieval

  • Added support for re-requesting previously accessed requirement analysis files and Prisma schemas in INTERFACE_AUTHORIZATION.md, including usage examples and important constraints to prevent invalid requests. [1] [2]

Cleanup & Clarification

  • Removed outdated prohibitions and clarified that the agent may need to request additional context, adjusting the instructions to match the new capabilities for context retrieval and document generation.

These changes collectively improve agent orchestration by enabling more flexible, efficient, and context-aware function calling in multi-step RAG workflows.

@samchon samchon self-assigned this Dec 10, 2025
@samchon samchon added the enhancement New feature or request label Dec 10, 2025
@samchon samchon added this to WrtnLabs Dec 10, 2025
@samchon samchon marked this pull request as ready for review December 10, 2025 13:02
Copilot AI review requested due to automatic review settings December 10, 2025 13:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request introduces a new getPreviousAnalysisFiles and getPreviousPrismaSchemas mechanism to enable agents to re-access previously requested files and schemas within RAG workflows, improving context continuity across multiple orchestration cycles.

Key changes:

  • Added discriminated union types for re-requesting previously loaded analysis files and Prisma schemas
  • Updated all agent interfaces to support the new preliminary request types
  • Enhanced orchestration controllers to track and provide access to previously requested resources
  • Comprehensive documentation updates across all agent prompt files

Reviewed changes

Copilot reviewed 57 out of 57 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
IAutoBePrismaSchemaApplication.ts Added support for getPreviousAnalysisFiles and getPreviousPrismaSchemas request types
IAutoBePrismaReviewApplication.ts Added support for re-requesting previous analysis files and Prisma schemas
IAutoBePrismaCorrectApplication.ts Added support for re-requesting previous analysis files and Prisma schemas
IAutoBePrismaComponentApplication.ts Refactored to support preliminary data requests with new process method
orchestratePrismaSchema.ts Updated preliminary controller with new kinds and local/all state tracking
orchestratePrismaReview.ts Added support for all four preliminary request types
orchestratePrismaCorrect.ts Added support for all four preliminary request types with custom fixApplication call
orchestratePrismaComponent.ts Complete refactor to support RAG workflow with preliminary requests
IAutoBeInterfaceSchema*.ts (multiple) Added getPrevious* request types to all interface-related applications
orchestrateInterface*.ts (multiple) Updated preliminary controllers to support new request types
IAutoBeAnalyze*.ts (analyze structures) Added preliminary request support to scenario, write, and review applications
orchestrateAnalyze*.ts (analyze orchestrators) Integrated preliminary controller with new request types
PRISMA_*.md (prompts) Documented new function calling capabilities for re-requesting previous data
INTERFACE_*.md (prompts) Added examples and usage instructions for getPrevious* request types
ANALYZE_*.md (prompts) Updated with new preliminary request patterns and examples

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@samchon samchon merged commit e2b7bac into feat/rag Dec 16, 2025
4 checks passed
@samchon samchon deleted the feat/complement-individual branch December 16, 2025 06:40
samchon added a commit that referenced this pull request Dec 16, 2025
* feat(agent): the complementation feature of common logics (#847)

* feat(agent): the complementation feature

* logic implementations

* logic completion

* logic complete 2

* Update packages/agent/src/orchestrate/common/structures/IAutoBePreliminaryGetPreviousInterfaceSchemas.ts

Co-authored-by: Copilot <[email protected]>

* Update packages/agent/src/orchestrate/common/structures/IAutoBePreliminaryGetPreviousPrismaSchemas.ts

Co-authored-by: Copilot <[email protected]>

* Update packages/agent/src/orchestrate/common/structures/IAutoBePreliminaryGetPreviousInterfaceOperations.ts

Co-authored-by: Copilot <[email protected]>

* Update packages/agent/src/orchestrate/common/internal/createPreliminaryCollection.ts

Co-authored-by: Copilot <[email protected]>

* separate and modularize previous prompts

* also logic of `validatePreliminary()`

* also enhance `complementPreliminaryCollection()`

* complete `fixPreliminaryApplication()`

* fix style

---------

Co-authored-by: Copilot <[email protected]>

* feat(agent): documentation on RAG features (#848)

* feat(agent): documentation on RAG features

* Update packages/agent/src/orchestrate/common/AutoBePreliminaryController.ts

Co-authored-by: Copilot <[email protected]>

* styling

---------

Co-authored-by: Copilot <[email protected]>

* feat(agent): logic of `orchestratePreliminary` (#849)

* feat(agent): logic of `orchestratePreliminary`

* Update packages/agent/src/orchestrate/common/orchestratePreliminary.ts

Co-authored-by: Copilot <[email protected]>

* Update packages/agent/src/orchestrate/common/orchestratePreliminary.ts

Co-authored-by: Copilot <[email protected]>

* Update packages/agent/src/orchestrate/common/orchestratePreliminary.ts

Co-authored-by: Copilot <[email protected]>

* make logic easier

* enhance `complementPreliminaryCollection()`

* enhance `complementPreliminaryCollection()` again to support realize modularization

* fix vunlerables

* fix complementPreliminaryCollection again

* fix typo

* Update packages/agent/src/orchestrate/common/internal/complementPreliminaryCollection.ts

Co-authored-by: Copilot <[email protected]>

* fix typo

* complete

---------

Co-authored-by: Copilot <[email protected]>

* feat(agent): previous histories to `AutoBeState`. (#852)

* feat(agent): description comments of agents (#853)

* feat(agent): description comments of agents

* Update packages/agent/src/structures/IAutoBeOrchestrateHistory.ts

Co-authored-by: Copilot <[email protected]>

* Update packages/agent/src/utils/divideArray.ts

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>

* feat(agent): adjust previous RAG to every agents (#851)

* feat(agent): adjust previous RAG to every agents

* fixing type errors

* fix compilation errors

* exact interface function calling schemas

* exact prisma function calling schemas

* exact analyze function calling schemas

* fix analyze logics

* fix prisma logics

* fix interface logics

* fix interface histories

* fix prompts

* exact description about previous RAG assets

* fix one more time

* fix prompts

* Analyze information from RAG

* fix transformPreliminaryHistory

* fix prompts again

---------

Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants