Skip to content

Adjusted the TRAIT_EXTRACTION_PROMPT to store traits correctly#238

Merged
sfreeman422 merged 18 commits intomasterfrom
feature/trait-tuning
Apr 20, 2026
Merged

Adjusted the TRAIT_EXTRACTION_PROMPT to store traits correctly#238
sfreeman422 merged 18 commits intomasterfrom
feature/trait-tuning

Conversation

@sfreeman422
Copy link
Copy Markdown
Collaborator

@sfreeman422 sfreeman422 commented Apr 20, 2026

This pull request removes the /traits endpoint and its related logic from the ai.controller and associated tests, shifting trait-related responsibilities to the new TraitService class. It also refactors the AI service to use TraitService for trait management and context generation, and updates tests accordingly. Additionally, the trait extraction prompt and output format have been simplified to remove user Slack ID references.

Trait Endpoint and Test Removal:

  • Removed the /traits endpoint and all related logic from ai.controller.ts, as well as associated mocks and tests from ai.controller.spec.ts. [1] [2] [3] [4] [5]

Trait Service Refactor:

  • Replaced direct usage of TraitPersistenceService with the new TraitService class in ai.service.ts, centralizing trait context generation and persistence logic. [1] [2] [3]
  • Updated AI service to use TraitService methods for fetching and appending trait context, and to use the new extractParticipantSlackIds helper.

Test Updates:

  • Refactored ai.service.spec.ts to use TraitService for trait-related tests, updating mocks and test logic to reflect the new structure. [1] [2] [3] [4] [5] [6]

Prompt and Output Format Simplification:

  • Updated the trait extraction requirements and example output in ai.constants.ts to remove references to user Slack IDs, ensuring traits are more general and privacy-conscious.

Copilot AI review requested due to automatic review settings April 20, 2026 14:40
Copy link
Copy Markdown

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

Adjusts the TRAIT_EXTRACTION_PROMPT guidance to influence how trait strings are produced/stored by the AI trait synthesis flow in the backend.

Changes:

  • Updated the output example in TRAIT_EXTRACTION_PROMPT to remove a user identifier prefix from the sample traits.

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

Comment thread packages/backend/src/ai/ai.constants.ts
Copy link
Copy Markdown

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

Copilot reviewed 19 out of 19 changed files in this pull request and generated 6 comments.


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

Comment thread packages/backend/src/index.ts
Comment thread packages/backend/src/ai/trait/trait.service.ts Outdated
Comment thread packages/backend/src/ai/memory/memory.job.ts Outdated
Comment thread packages/backend/src/ai/ai.constants.ts
Comment thread packages/backend/src/job.service.ts
Comment thread packages/backend/src/ai/ai.service.spec.ts Outdated
Copilot AI and others added 2 commits April 20, 2026 15:45
… spec type errors

Agent-Logs-Url: https://github.com/dev-chat/mocker/sessions/4ef0db0a-b3f1-4118-9dbc-4620e8e94767

Co-authored-by: sfreeman422 <16405652+sfreeman422@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dev-chat/mocker/sessions/4ef0db0a-b3f1-4118-9dbc-4620e8e94767

Co-authored-by: sfreeman422 <16405652+sfreeman422@users.noreply.github.com>
Copy link
Copy Markdown

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

Copilot reviewed 20 out of 20 changed files in this pull request and generated 5 comments.


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

Comment thread packages/backend/src/index.ts
Comment thread packages/backend/src/trait/trait.service.ts
Comment thread packages/backend/src/ai/memory/memory.job.spec.ts
Comment thread packages/backend/src/trait/trait.job.ts
Comment thread packages/backend/src/ai/memory/memory.job.ts Outdated
Copy link
Copy Markdown

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

Copilot reviewed 20 out of 20 changed files in this pull request and generated 3 comments.


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

Comment thread packages/backend/src/ai/memory/memory.job.ts Outdated
Comment thread packages/backend/src/ai/memory/memory.job.ts Outdated
Comment thread packages/backend/src/trait/trait.service.ts Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
sfreeman422 and others added 2 commits April 20, 2026 14:32
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@sfreeman422 sfreeman422 merged commit 51f9e1e into master Apr 20, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants