Skip to content

feat(agent): enhance validation strategy #470

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 4, 2025
Merged

feat(agent): enhance validation strategy #470

merged 1 commit into from
Jul 4, 2025

Conversation

samchon
Copy link
Member

@samchon samchon commented Jul 4, 2025

This pull request introduces several updates to the packages/core module, focusing on enhancing configuration flexibility, improving prompt documentation, and refining code quality. Key changes include updates to ESLint rules, significant revisions to prompt files for better schema compliance and error handling, and minor code cleanup in constants files.

Configuration Updates:

  • packages/core/eslint.config.mts: Added new ignores for Markdown files in prompts and disabled additional rules (no-template-curly-in-string, ts/no-unsafe-call). These changes improve linting flexibility for the project.

Prompt Enhancements:

  • packages/core/prompts/execute.md: Comprehensive rewrite of the system prompt to emphasize strict JSON schema compliance, error prevention, and detailed function argument construction. Added sections on discriminator handling, schema validation, and iterative information gathering strategies.
  • packages/core/prompts/validate_repeated.md: Introduced recursive error pattern analysis for historical validation errors, encouraging fundamental architectural redesigns for recurring issues.

Code Cleanup:

@samchon samchon requested a review from Copilot July 4, 2025 09:37
@samchon samchon self-assigned this Jul 4, 2025
@samchon samchon added the enhancement New feature or request label Jul 4, 2025
@samchon samchon added this to WrtnLabs Jul 4, 2025
@samchon samchon marked this pull request as ready for review July 4, 2025 09:38
Copy link
Contributor

@Copilot 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 PR enhances the validation strategy by tracking historical validation events, updating prompt interfaces to accept those events, and propagating them through the orchestrator, while also cleaning up prompt files and ESLint rules.

  • Updated system prompt interfaces to accept AgenticaValidateEvent[]
  • Modified call.ts to accumulate and dispatch validation events through retries
  • Cleaned up constant prompt files and ESLint configuration; overhauled markdown prompts

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/core/src/structures/IMicroAgenticaSystemPrompt.ts Added import and changed validate signature to receive events
packages/core/src/structures/IAgenticaSystemPrompt.ts Added import and changed validate signature (incorrect JSDoc tag)
packages/core/src/orchestrate/call.ts Introduced station helper and threaded validation events through calls
packages/core/src/constants/AgenticaSystemPrompt.ts Removed redundant ESLint disable and expanded prompt text
packages/core/src/constants/AgenticaDefaultPrompt.ts Removed unnecessary ESLint comments around template replacements
packages/core/eslint.config.mts Added ignores for prompts/*.md and disabled new rules
packages/core/prompts/validate_repeated.md New recursive error pattern analysis prompt
packages/core/prompts/validate.md Overhauled validation prompt into “corrector” agent
packages/core/prompts/execute.md Complete rewrite of execution prompt with schema rules
Comments suppressed due to low confidence (1)

packages/core/src/structures/IAgenticaSystemPrompt.ts:171

  • JSDoc uses '@param' to annotate parameters—replace '@props' with '@param' for the 'events' parameter.
   * @props events The previous validation events containing the IValidation.IFailure

Copy link

pkg-pr-new bot commented Jul 4, 2025

Open in StackBlitz

@agentica/benchmark

npm i https://pkg.pr.new/wrtnlabs/agentica/@agentica/benchmark@470

@agentica/chat

npm i https://pkg.pr.new/wrtnlabs/agentica/@agentica/chat@470

agentica

npm i https://pkg.pr.new/wrtnlabs/agentica@470

@agentica/core

npm i https://pkg.pr.new/wrtnlabs/agentica/@agentica/core@470

create-agentica

npm i https://pkg.pr.new/wrtnlabs/agentica/create-agentica@470

@agentica/rpc

npm i https://pkg.pr.new/wrtnlabs/agentica/@agentica/rpc@470

@agentica/vector-selector

npm i https://pkg.pr.new/wrtnlabs/agentica/@agentica/vector-selector@470

commit: 4c798da

@samchon samchon merged commit c0de755 into main Jul 4, 2025
13 of 18 checks passed
@samchon samchon deleted the feat/repeat branch July 4, 2025 09:47
@github-project-automation github-project-automation bot moved this to Done in WrtnLabs Jul 4, 2025
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: Done
Development

Successfully merging this pull request may close these issues.

1 participant