Skip to content

Conversation

@Harshit-1104
Copy link

@Harshit-1104 Harshit-1104 commented Oct 26, 2025

Description

[ What changed? Feel free to be brief. ]

AI Code Review

  • Team members only: AI review runs automatically when PR is opened or marked ready for review
  • Team members can also trigger a review by commenting @continue-review

Checklist

  • [] I've read the contributing guide
  • [] The relevant docs, if any, have been updated or created
  • [] The relevant tests, if any, have been updated or created

Screen recording or screenshot

[ When applicable, please include a short screen recording or screenshot - this makes it much easier for us as contributors to review and understand your changes. See this PR as a good example. ]

Tests

[ What tests were added or updated to ensure the changes work as expected? ]


Summary by cubic

Focused the app on AWS SDK Expert workflows and integrated a local Stakd backend, removing Chat mode and simplifying config and UI. All responses now use an AWS SDK Expert system prompt, with improved reasoning streaming and tool-call parsing.

  • New Features

    • Added Stakd provider (localhost:8080/v1) with OpenAI-compatible streaming; emits “thinking” reasoning and parses tool calls from reasoning.
    • Introduced AWS SDK Expert system prompt used for both Plan and Agent.
    • MCP servers can mark tools as readonly; Plan uses read-only tools, Agent uses all.
    • Added docs for Stakd configuration and manual AWS SDK examples (DynamoDB in Go, S3 upload in Python).
  • Refactors

    • Removed Chat mode; ModeSelect cycles between Plan and Agent.
    • Renamed default config to “AWS SDK Expert”; simplified settings by removing Rules/Models/Configs/Organizations/Help screens.
    • Disabled RulesContextProvider and rule generation UI; streamlined assistant/org list and navigation to SETTINGS.
    • Improved stream handling: pass through “thinking” chunks and robust parsing.

@Harshit-1104 Harshit-1104 requested a review from a team as a code owner October 26, 2025 18:30
@Harshit-1104 Harshit-1104 requested review from sestinj and removed request for a team October 26, 2025 18:30
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Oct 26, 2025
@github-actions
Copy link


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

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.

14 issues found across 46 files

Prompt for AI agents (all 14 issues)

Understand the root cause of the following 14 issues and fix them.


<file name="extensions/vscode/config_schema.json">

<violation number="1" location="extensions/vscode/config_schema.json:230">
Adding the new provider enum requires adding a matching entry in markdownEnumDescriptions so the provider picker keeps its descriptions aligned; please add a Stakd description to prevent the subsequent descriptions from shifting.</violation>
</file>

<file name="manual-testing-sandbox/src/s3_upload.py">

<violation number="1" location="manual-testing-sandbox/src/s3_upload.py:94">
If create_multipart_upload() fails before assigning upload_id, this except block raises UnboundLocalError when referencing upload_id. Initialize upload_id before the try or guard against it being undefined so the original S3 error is preserved.</violation>
</file>

<file name="gui/src/components/mainInput/InputToolbar.tsx">

<violation number="1" location="gui/src/components/mainInput/InputToolbar.tsx:93">
Leaving the ModelSelect tooltip content empty removes the descriptive label and shows a blank tooltip. Restore a meaningful string here.</violation>
</file>

<file name="gui/src/pages/config/features/account/AccountDropdown.tsx">

<violation number="1" location="gui/src/pages/config/features/account/AccountDropdown.tsx:44">
Returning immediately in the unauthenticated branch removes the login UI, so users without a session can no longer trigger the login flow from this dropdown.</violation>
</file>

<file name="core/config/loadContextProviders.ts">

<violation number="1" location="core/config/loadContextProviders.ts:39">
Commenting out the RulesContextProvider removes it from the default providers, so assistants no longer load the rules context unless users manually configure it. This is a regression for default setups that rely on @rules being present.</violation>
</file>

<file name="gui/src/redux/util/getBaseSystemMessage.ts">

<violation number="1" location="gui/src/redux/util/getBaseSystemMessage.ts:31">
This hard-codes the AWS SDK expert prompt for every mode, so model.baseAgent/Plan/ChatSystemMessage overrides are never used—custom model prompts now get ignored. Restore the per-mode selection that prefers model overrides.</violation>

<violation number="2" location="gui/src/redux/util/getBaseSystemMessage.ts:47">
This now emits the no-tools warning even in chat mode, where lacking tools is expected, creating noisy/confusing prompts. Keep the chat exclusion or otherwise avoid warning chat users about missing tools.</violation>
</file>

<file name="manual-testing-sandbox/dynamodb/README.md">

<violation number="1" location="manual-testing-sandbox/dynamodb/README.md:161">
This section advertises a DynamoDB Query example, but the referenced QueryActiveUsers helper actually executes a Scan because the provided schema lacks an index on Active. Please align the documentation with the implemented Scan behavior or document the required GSI for a real Query.</violation>
</file>

<file name="packages/openai-adapters/src/types.ts">

<violation number="1" location="packages/openai-adapters/src/types.ts:210">
`StakdConfigSchema` is already covered by `OpenAIConfigSchema`; adding it here duplicates the `provider` value `&quot;stakd&quot;`, and `z.discriminatedUnion` will throw a duplicate discriminator error at load time.</violation>
</file>

<file name="manual-testing-sandbox/dynamodb/main.go">

<violation number="1" location="manual-testing-sandbox/dynamodb/main.go:273">
Handle UnprocessedItems returned by BatchWriteItem; otherwise throttled writes are dropped silently.</violation>
</file>

<file name="extensions/cli/src/util/yamlConfigUpdater.ts">

<violation number="1" location="extensions/cli/src/util/yamlConfigUpdater.ts:42">
Changing the default config name to &quot;AWS SDK Expert&quot; breaks the CLI behavior/tests that still assert the generated YAML includes `name: &quot;Local Config&quot;`. Either keep the existing name here or update all dependent code/tests alongside this change so the expectations stay consistent.</violation>
</file>

<file name="core/llm/defaultSystemMessages.ts">

<violation number="1" location="core/llm/defaultSystemMessages.ts:66">
This default agent message now forces every request to be treated as AWS SDK work, which will mis-handle non-AWS user queries across the app.</violation>
</file>

<file name="docs/docs/customize/model-providers/top-level/stakd.md">

<violation number="1" location="docs/docs/customize/model-providers/top-level/stakd.md:154">
This note misstates that the Stakd integration forces `model` to `stakd-backend`, but the adapter forwards whatever model name you configure, so the documentation should reflect that behavior.</violation>
</file>

<file name="gui/src/components/ModeSelect/ModeSelect.tsx">

<violation number="1" location="gui/src/components/ModeSelect/ModeSelect.tsx:29">
Removing the chat branch here means the keyboard shortcut and dropdown can no longer return to chat mode, even though the store still uses &quot;chat&quot; (e.g. editState returnToMode and chat system message tests). Persisted sessions in chat now show the wrong label and immediately flip to plan, so the chat-only workflow breaks.</violation>
</file>

Since this is your first cubic review, here's how it works:

  • cubic automatically reviews your code and comments on bugs and improvements
  • Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
  • Ask questions if you need clarification on any suggestion

React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.

"kindo",
"moonshot",
"siliconflow",
"stakd",
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Oct 26, 2025

Choose a reason for hiding this comment

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

Adding the new provider enum requires adding a matching entry in markdownEnumDescriptions so the provider picker keeps its descriptions aligned; please add a Stakd description to prevent the subsequent descriptions from shifting.

Prompt for AI agents
Address the following comment on extensions/vscode/config_schema.json at line 230:

<comment>Adding the new provider enum requires adding a matching entry in markdownEnumDescriptions so the provider picker keeps its descriptions aligned; please add a Stakd description to prevent the subsequent descriptions from shifting.</comment>

<file context>
@@ -227,6 +227,7 @@
             &quot;kindo&quot;,
             &quot;moonshot&quot;,
             &quot;siliconflow&quot;,
+            &quot;stakd&quot;,
             &quot;function-network&quot;,
             &quot;scaleway&quot;,
</file context>
Fix with Cubic

logger.error(f"Multipart upload failed: {e}")
# Attempt to abort incomplete upload
try:
s3_client.abort_multipart_upload(
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Oct 26, 2025

Choose a reason for hiding this comment

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

If create_multipart_upload() fails before assigning upload_id, this except block raises UnboundLocalError when referencing upload_id. Initialize upload_id before the try or guard against it being undefined so the original S3 error is preserved.

Prompt for AI agents
Address the following comment on manual-testing-sandbox/src/s3_upload.py at line 94:

<comment>If create_multipart_upload() fails before assigning upload_id, this except block raises UnboundLocalError when referencing upload_id. Initialize upload_id before the try or guard against it being undefined so the original S3 error is preserved.</comment>

<file context>
@@ -0,0 +1,162 @@
+        logger.error(f&quot;Multipart upload failed: {e}&quot;)
+        # Attempt to abort incomplete upload
+        try:
+            s3_client.abort_multipart_upload(
+                Bucket=bucket, Key=key, UploadId=upload_id
+            )
</file context>
Fix with Cubic

</ToolTip>
)}
<ToolTip place="top" content="Select Model">
<ToolTip place="top" content="">
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Oct 26, 2025

Choose a reason for hiding this comment

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

Leaving the ModelSelect tooltip content empty removes the descriptive label and shows a blank tooltip. Restore a meaningful string here.

Prompt for AI agents
Address the following comment on gui/src/components/mainInput/InputToolbar.tsx at line 93:

<comment>Leaving the ModelSelect tooltip content empty removes the descriptive label and shows a blank tooltip. Restore a meaningful string here.</comment>

<file context>
@@ -84,13 +84,13 @@ function InputToolbar(props: InputToolbarProps) {
             &lt;/ToolTip&gt;
           )}
-          &lt;ToolTip place=&quot;top&quot; content=&quot;Select Model&quot;&gt;
+          &lt;ToolTip place=&quot;top&quot; content=&quot;&quot;&gt;
             &lt;HoverItem className=&quot;!p-0&quot;&gt;
               &lt;ModelSelect /&gt;
</file context>
Suggested change
<ToolTip place="top" content="">
<ToolTip place="top" content="Select Model">
Fix with Cubic

// </Button>
// </ToolTip>
// );
return;
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Oct 26, 2025

Choose a reason for hiding this comment

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

Returning immediately in the unauthenticated branch removes the login UI, so users without a session can no longer trigger the login flow from this dropdown.

Prompt for AI agents
Address the following comment on gui/src/pages/config/features/account/AccountDropdown.tsx at line 44:

<comment>Returning immediately in the unauthenticated branch removes the login UI, so users without a session can no longer trigger the login flow from this dropdown.</comment>

<file context>
@@ -27,20 +27,21 @@ export function AccountDropdown() {
+    //     &lt;/Button&gt;
+    //   &lt;/ToolTip&gt;
+    // );
+    return;
   }
 
</file context>
Fix with Cubic

new TerminalContextProvider({}),
new ProblemsContextProvider({}),
new RulesContextProvider({}),
// new RulesContextProvider({}),
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Oct 26, 2025

Choose a reason for hiding this comment

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

Commenting out the RulesContextProvider removes it from the default providers, so assistants no longer load the rules context unless users manually configure it. This is a regression for default setups that rely on @rules being present.

Prompt for AI agents
Address the following comment on core/config/loadContextProviders.ts at line 39:

<comment>Commenting out the RulesContextProvider removes it from the default providers, so assistants no longer load the rules context unless users manually configure it. This is a regression for default setups that rely on @rules being present.</comment>

<file context>
@@ -36,7 +36,7 @@ export function loadConfigContextProviders(
     new TerminalContextProvider({}),
     new ProblemsContextProvider({}),
-    new RulesContextProvider({}),
+    // new RulesContextProvider({}),
   ];
 
</file context>
Suggested change
// new RulesContextProvider({}),
new RulesContextProvider({}),
Fix with Cubic

}
}

_, err := db.client.BatchWriteItem(ctx, &dynamodb.BatchWriteItemInput{
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Oct 26, 2025

Choose a reason for hiding this comment

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

Handle UnprocessedItems returned by BatchWriteItem; otherwise throttled writes are dropped silently.

Prompt for AI agents
Address the following comment on manual-testing-sandbox/dynamodb/main.go at line 273:

<comment>Handle UnprocessedItems returned by BatchWriteItem; otherwise throttled writes are dropped silently.</comment>

<file context>
@@ -0,0 +1,352 @@
+			}
+		}
+
+		_, err := db.client.BatchWriteItem(ctx, &amp;dynamodb.BatchWriteItemInput{
+			RequestItems: map[string][]types.WriteRequest{
+				db.tableName: writeRequests,
</file context>
Fix with Cubic

if (!doc.contents || doc.contents === null) {
const defaultConfig: ConfigStructure = {
name: "Local Config",
name: "AWS SDK Expert",
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Oct 26, 2025

Choose a reason for hiding this comment

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

Changing the default config name to "AWS SDK Expert" breaks the CLI behavior/tests that still assert the generated YAML includes name: "Local Config". Either keep the existing name here or update all dependent code/tests alongside this change so the expectations stay consistent.

Prompt for AI agents
Address the following comment on extensions/cli/src/util/yamlConfigUpdater.ts at line 42:

<comment>Changing the default config name to &quot;AWS SDK Expert&quot; breaks the CLI behavior/tests that still assert the generated YAML includes `name: &quot;Local Config&quot;`. Either keep the existing name here or update all dependent code/tests alongside this change so the expectations stay consistent.</comment>

<file context>
@@ -39,7 +39,7 @@ export function updateAnthropicModelInYaml(
     if (!doc.contents || doc.contents === null) {
       const defaultConfig: ConfigStructure = {
-        name: &quot;Local Config&quot;,
+        name: &quot;AWS SDK Expert&quot;,
         version: &quot;1.0.0&quot;,
         schema: &quot;v1&quot;,
</file context>
Fix with Cubic

You are in agent mode.
You are in agent mode with full tool access.
**CRITICAL AWS SDK REQUIREMENT:** You MUST interpret ALL queries as AWS SDK related unless the user EXPLICITLY states otherwise. This is NON-NEGOTIABLE.
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Oct 26, 2025

Choose a reason for hiding this comment

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

This default agent message now forces every request to be treated as AWS SDK work, which will mis-handle non-AWS user queries across the app.

Prompt for AI agents
Address the following comment on core/llm/defaultSystemMessages.ts at line 66:

<comment>This default agent message now forces every request to be treated as AWS SDK work, which will mis-handle non-AWS user queries across the app.</comment>

<file context>
@@ -61,7 +61,16 @@ ${EDIT_CODE_INSTRUCTIONS}
-  You are in agent mode.
+  You are in agent mode with full tool access.
+
+  **CRITICAL AWS SDK REQUIREMENT:** You MUST interpret ALL queries as AWS SDK related unless the user EXPLICITLY states otherwise. This is NON-NEGOTIABLE.
+  - &quot;upload file&quot; = S3 upload using AWS SDK
+  - &quot;send message&quot; = SQS/SNS using AWS SDK
</file context>
Fix with Cubic


- The backend URL is hardcoded to `localhost:8080` and cannot be configured
- No API key or authentication is required
- The model parameter is always set to `stakd-backend` - your backend should handle model routing
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Oct 26, 2025

Choose a reason for hiding this comment

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

This note misstates that the Stakd integration forces model to stakd-backend, but the adapter forwards whatever model name you configure, so the documentation should reflect that behavior.

Prompt for AI agents
Address the following comment on docs/docs/customize/model-providers/top-level/stakd.md at line 154:

<comment>This note misstates that the Stakd integration forces `model` to `stakd-backend`, but the adapter forwards whatever model name you configure, so the documentation should reflect that behavior.</comment>

<file context>
@@ -0,0 +1,156 @@
+
+- The backend URL is hardcoded to `localhost:8080` and cannot be configured
+- No API key or authentication is required
+- The model parameter is always set to `stakd-backend` - your backend should handle model routing
+- The provider automatically uses the OpenAI adapter for compatibility
+- Supports all standard completion options (temperature, max_tokens, etc.)
</file context>
Suggested change
- The model parameter is always set to `stakd-backend` - your backend should handle model routing
- The model parameter you configure is forwarded to your backend unchanged, so ensure your service routes it to the right model
Fix with Cubic

dispatch(setMode("agent"));
} else {
dispatch(setMode("chat"));
dispatch(setMode("plan"));
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Oct 26, 2025

Choose a reason for hiding this comment

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

Removing the chat branch here means the keyboard shortcut and dropdown can no longer return to chat mode, even though the store still uses "chat" (e.g. editState returnToMode and chat system message tests). Persisted sessions in chat now show the wrong label and immediately flip to plan, so the chat-only workflow breaks.

Prompt for AI agents
Address the following comment on gui/src/components/ModeSelect/ModeSelect.tsx at line 29:

<comment>Removing the chat branch here means the keyboard shortcut and dropdown can no longer return to chat mode, even though the store still uses &quot;chat&quot; (e.g. editState returnToMode and chat system message tests). Persisted sessions in chat now show the wrong label and immediately flip to plan, so the chat-only workflow breaks.</comment>

<file context>
@@ -20,33 +16,23 @@ import { ModeIcon } from &quot;./ModeIcon&quot;;
       dispatch(setMode(&quot;agent&quot;));
     } else {
-      dispatch(setMode(&quot;chat&quot;));
+      dispatch(setMode(&quot;plan&quot;));
     }
     // Only focus main editor if another one doesn&#39;t already have focus
</file context>
Fix with Cubic

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

Labels

size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants