feat(agent): concise interface schema prompts#1036
Conversation
There was a problem hiding this comment.
Pull request overview
This PR enhances interface schema documentation and orchestration logic with a focus on conciseness and type safety. The changes streamline agent prompts while adding stronger type constraints for session context fields.
Changes:
- Condensed four agent prompt files (SECURITY_REVIEW, REFINE, PHANTOM_REVIEW, CONTENT_REVIEW) by 72-88%, improving maintainability while preserving core instructions
- Added
AutoBeSystemPromptConstant.INTERFACE_SCHEMAto review history to provide schema generation context to review agents - Enhanced type safety for session context fields with URI and IPv4 format constraints
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
transformInterfaceSchemaReviewHistory.ts |
Added INTERFACE_SCHEMA system prompt as first message in review history to provide base context |
INTERFACE_SCHEMA.md |
Updated session context field types with Format tags (uri, ipv4) and removed IUser.ICreate reference |
INTERFACE_SCHEMA_SECURITY_REVIEW.md |
Condensed from 1064 to 150 lines (~86% reduction) while preserving essential security rules |
INTERFACE_SCHEMA_REFINE.md |
Condensed from 1157 to 324 lines (~72% reduction) focusing on core enrichment patterns |
INTERFACE_SCHEMA_PHANTOM_REVIEW.md |
Condensed from 954 to 167 lines (~82% reduction) keeping phantom detection logic |
INTERFACE_SCHEMA_CONTENT_REVIEW.md |
Condensed from 1126 to 135 lines (~88% reduction) maintaining completeness checks |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…nterface-schema-prompts
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 33 out of 34 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
packages/agent/src/orchestrate/interface/orchestrateInterfaceSchemaRefine.ts:1
- The error handler decrements
completedinstead oftotal. Based on the pattern inorchestrateInterfaceSchemaWrite.ts(line 80) andorchestrateInterfaceSchemaReview.ts(line 89), this should decrementtotalto maintain accurate progress tracking when a schema fails to refine.
import { IAgenticaController } from "@agentica/core";
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This pull request introduces improvements to the interface schema documentation and the orchestration history logic for interface reviews. The most significant changes include refining the required fields for self-signup operations, enhancing type safety for session context fields, and ensuring system prompts are included in the review history.
Interface Schema Documentation Improvements:
IUser.ICreatefrom the list of request DTOs required for self-signup operations, clarifying that onlyICustomer.IJoinapplies.ICustomer.IJoininterface to enforce URI formatting forhrefandreferrer, and to specify thatipshould be an IPv4 string or nullable, improving type safety and documentation clarity.Orchestration History Enhancements:
AutoBeSystemPromptConstantto support standardized system prompts in orchestration histories.transformInterfaceSchemaReviewHistoryto prepend a system message containing the interface schema prompt, ensuring consistent context for review histories.