Skip to content

feat: generate agent instructions#18231

Draft
Dakuan wants to merge 35 commits intomasterfrom
feat/generate-agent-instructions
Draft

feat: generate agent instructions#18231
Dakuan wants to merge 35 commits intomasterfrom
feat/generate-agent-instructions

Conversation

@Dakuan
Copy link
Contributor

@Dakuan Dakuan commented Mar 9, 2026

Description

Describe the problem or feature in addition to a link to the relevant github issues.

Addresses

  • <Enter the Link to the issue(s) this PR addresses>
  • ...more if required

App Export

  • If possible, attach an app export file along with your request template to make QA testing easier, with minimal setup.

Screenshots

If a UI facing feature, a short video of the happy path, and some screenshots of the new functionality.

Launchcontrol

Add a small description in layman's terms of what this PR achieves. This will be used in the release notes.

@github-actions github-actions bot added the size/m label Mar 9, 2026
@github-actions github-actions bot added the stale label Mar 17, 2026
@github-actions github-actions bot removed the stale label Mar 18, 2026
@Dakuan
Copy link
Contributor Author

Dakuan commented Mar 19, 2026

@cubic-dev-ai

@cubic-dev-ai
Copy link
Contributor

cubic-dev-ai bot commented Mar 19, 2026

@cubic-dev-ai

@Dakuan I have started the AI code review. It will take a few minutes to complete.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

2 issues found across 11 files

Confidence score: 2/5

  • Merge risk is high because there are two high-confidence, user-impacting issues (sev 7/10 and 6/10), including one privacy/security concern.
  • In packages/builder/src/pages/builder/workspace/[application]/agent/[agentId]/config.svelte, applying generated instructions does not trigger save, so users can lose newly generated prompt content.
  • In packages/server/src/api/controllers/ai/agentInstructions.ts, logging raw request prompts can expose sensitive user data in server logs and should be removed or sanitized before merge.
  • Pay close attention to packages/builder/src/pages/builder/workspace/[application]/agent/[agentId]/config.svelte, packages/server/src/api/controllers/ai/agentInstructions.ts - prevent prompt loss on apply and eliminate sensitive prompt logging.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="packages/builder/src/pages/builder/workspace/[application]/agent/[agentId]/config.svelte">

<violation number="1" location="packages/builder/src/pages/builder/workspace/[application]/agent/[agentId]/config.svelte:662">
P1: Applying generated instructions does not trigger save, so the new prompt can be lost.</violation>
</file>

<file name="packages/server/src/api/controllers/ai/agentInstructions.ts">

<violation number="1" location="packages/server/src/api/controllers/ai/agentInstructions.ts:24">
P2: Do not log the raw prompt from request input; this can leak sensitive user data into server logs.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant