Skip to content

Conversation

@Shironex
Copy link
Collaborator

@Shironex Shironex commented Dec 24, 2025

image

Summary by CodeRabbit

  • New Features

    • New global/project "Auto-load CLAUDE.md" setting with UI toggle, store action, and server sync.
    • Auto-load behavior applied across chat, suggestions, spec/feature generation, context tools (image/file), validation, GitHub flows, and automated agent mode.
    • Provider/SDK options support preset system prompts and explicit CLAUDE.md source selection; services and routes can accept optional settings injection.
  • Chores

    • Minor .gitignore updates.

✏️ Tip: You can customize this high-level summary in your review settings.

- Introduced a new setting to enable automatic loading of CLAUDE.md files from project-specific directories.
- Updated relevant services and components to support the new setting, including the AgentService and AutoModeService.
- Added UI controls for managing the auto-load setting in the settings view.
- Enhanced SDK options to incorporate settingSources for CLAUDE.md loading.
- Updated global and project settings interfaces to include autoLoadClaudeMd property.
- Updated API routes to accept an optional settings service for loading the autoLoadClaudeMd setting.
- Introduced a new settings helper utility for retrieving project-specific settings.
- Enhanced feature generation and spec generation processes to utilize the autoLoadClaudeMd setting.
- Refactored relevant route handlers to support the new settings integration across various endpoints.
@Shironex Shironex self-assigned this Dec 24, 2025
@Shironex Shironex added Enhancement Improvements to existing functionality or UI. Do Not Merge Use this label if something should not be merged. Experiment labels Dec 24, 2025
@coderabbitai
Copy link

coderabbitai bot commented Dec 24, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

Wires an opt-in autoLoadClaudeMd setting and SettingsService through types, SDK option factories, services, route handlers, provider options, and UI; adds a preset systemPrompt shape and settingSources to ExecuteOptions.

Changes

Cohort / File(s) Summary
Configuration
\.gitignore
Re-adds docker-compose.override.yml to ignores and adds a .claude/ directory entry
Types & Settings
libs/types/src/settings.ts, libs/types/src/provider.ts
Add autoLoadClaudeMd?: boolean to settings; introduce a SystemPrompt preset type and extend ExecuteOptions.systemPrompt to accept a preset object; add settingSources field
SDK Options & Helpers
apps/server/src/lib/sdk-options.ts, apps/server/src/lib/settings-helpers.ts
Add buildClaudeMdOptions and autoLoadClaudeMd wiring; new helper getAutoLoadClaudeMdSetting() and filterClaudeMdFromContext() used by option factories
Server Bootstrap
apps/server/src/index.ts
Instantiate SettingsService earlier and inject it into AgentService, AutoModeService, and route factories
Provider Types & Provider
apps/server/src/providers/types.ts, apps/server/src/providers/claude-provider.ts
Accept preset systemPrompt type and forward settingSources into provider options when provided
Core Services
apps/server/src/services/agent-service.ts, apps/server/src/services/auto-mode-service.ts
Constructors accept optional SettingsService; services query autoLoadClaudeMd at runtime, include autoLoadClaudeMd and settingSources in SDK/provider options, and filter CLAUDE.md from local context when auto-loading is enabled
Spec & Feature Generation
apps/server/src/routes/app-spec/...
Route factories/handlers accept optional SettingsService; call getAutoLoadClaudeMdSetting() and pass autoLoadClaudeMd into SDK options; propagate settingsService through generation flow
Suggestions & GitHub
apps/server/src/routes/suggestions/*, apps/server/src/routes/github/*
Routes/handlers accept optional SettingsService; retrieve autoLoadClaudeMd and include it in SDK options for suggestions and issue validation
Context Handlers
apps/server/src/routes/context/*, .../describe-file.ts, .../describe-image.ts
Handlers accept optional SettingsService; call getAutoLoadClaudeMdSetting() and include autoLoadClaudeMd in SDK options for describe flows; filter CLAUDE.md from formatted context when needed
UI — Settings
apps/ui/src/components/views/settings-view.tsx, apps/ui/src/components/views/settings-view/claude/claude-md-settings.tsx, apps/ui/src/hooks/use-settings-migration.ts, apps/ui/src/store/app-store.ts
Add ClaudeMdSettings UI; introduce autoLoadClaudeMd to app store with setAutoLoadClaudeMd() action and include setting in server sync/migration
Misc Wiring
apps/server/src/routes/suggestions/index.ts, apps/server/src/routes/github/index.ts, apps/server/src/routes/app-spec/index.ts
Thread SettingsService into route factories and ensure handlers forward it to background jobs and helper calls

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Client
  participant Router as Route Handler
  participant Settings as SettingsService
  participant Helper as getAutoLoadClaudeMdSetting
  participant Service as Agent/AutoModeService
  participant Provider as Claude Provider / SDK

  Client->>Router: HTTP request (e.g., /generate, /describe)
  Router->>Settings: (injected) optional SettingsService reference
  Router->>Helper: getAutoLoadClaudeMdSetting(projectPath, settingsService)
  Helper-->>Router: autoLoadClaudeMd (true|false)
  Router->>Service: start job (includes autoLoadClaudeMd, settingSources, systemPrompt)
  Service->>Provider: create*Options(autoLoadClaudeMd, settingSources, systemPrompt)
  Provider->>Provider: initialize or resume session (may auto-load CLAUDE.md)
  Provider-->>Service: stream/result
  Service-->>Router: emit events / persist outputs
  Router-->>Client: 200 Accepted (background) / eventual events
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰 I hopped through routes and types with glee,

CLAUDE.md whispers — "Load me, load me!"
A toggle in settings now lets it play,
Services, providers, and UI all say "okay",
I twiddle my whiskers and bound away.

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Title check ⚠️ Warning The title contains a spelling error ('automaticly' should be 'automatically') which reduces clarity and professionalism. Correct the title to 'feat: automatically load claude.md files and settings json globally / per project' to fix the typo.
Docstring Coverage ⚠️ Warning Docstring coverage is 64.29% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/load-claude-files

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Shironex, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the Claude Agent's ability to understand and adhere to project-specific guidelines by introducing automatic loading of CLAUDE.md files. This feature allows developers to define custom instructions and context directly within their projects, which Claude will automatically incorporate into its reasoning. The change includes both backend logic for handling global and project-specific settings, as well as a user-friendly interface for managing this behavior, ultimately leading to more tailored and effective AI interactions.

Highlights

  • Automatic CLAUDE.md Loading: Introduces a new feature to automatically load CLAUDE.md files, both globally and on a per-project basis, to provide context and instructions to the Claude Agent SDK. This allows for dynamic system prompts based on project-specific guidelines.
  • Settings Precedence: The autoLoadClaudeMd setting now respects a clear precedence: project-level settings will override global settings, ensuring that specific project configurations take priority.
  • UI Integration: A new UI component (ClaudeMdSettings) has been added to the settings view, allowing users to easily enable or disable the automatic loading of CLAUDE.md files via a checkbox.
  • Dependency Injection and SDK Options: The SettingsService is now injected into various services and route handlers across the server, enabling them to retrieve and apply the autoLoadClaudeMd setting when constructing Claude Agent SDK options. This includes AgentService, AutoModeService, and routes for suggestions, spec regeneration, GitHub validation, and context description.
  • SDK Options Enhancement: The Claude Agent SDK options (ExecuteOptions) have been extended to support settingSources and a new SystemPromptPreset type, facilitating the automatic loading and appending of CLAUDE.md content.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a great new feature for automatically loading CLAUDE.md files and settings from .claude/ directories at both a global and per-project level. The implementation is comprehensive, involving changes across the server and UI to support the new autoLoadClaudeMd setting. The refactoring of SDK option creation is clean and centralizes the new logic well.

My review includes a few suggestions to improve maintainability by removing duplicated code, enhancing error handling, and cleaning up some development logging. I also noticed a small typo in the PR title ("automaticly" should be "automatically"). Overall, this is a solid contribution.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (4)
apps/server/src/lib/settings-helpers.ts (1)

16-45: Consider using createLogger for consistency.

The helper uses console.log/console.error directly, while other server modules (e.g., describe-image.ts, generate.ts) use createLogger from @automaker/utils. For consistency and structured logging:

🔎 Suggested refactor using createLogger
+import { createLogger } from '@automaker/utils';
 import type { SettingsService } from '../services/settings-service.js';

+const logger = createLogger('SettingsHelper');
+
 export async function getAutoLoadClaudeMdSetting(
   projectPath: string,
   settingsService?: SettingsService,
   logPrefix = '[SettingsHelper]'
 ): Promise<boolean> {
   if (!settingsService) {
-    console.log(`${logPrefix} SettingsService not available, autoLoadClaudeMd disabled`);
+    logger.info(`${logPrefix} SettingsService not available, autoLoadClaudeMd disabled`);
     return false;
   }

   try {
     const projectSettings = await settingsService.getProjectSettings(projectPath);
     if (projectSettings.autoLoadClaudeMd !== undefined) {
-      console.log(
+      logger.info(
         `${logPrefix} autoLoadClaudeMd from project settings: ${projectSettings.autoLoadClaudeMd}`
       );
       return projectSettings.autoLoadClaudeMd;
     }

     const globalSettings = await settingsService.getGlobalSettings();
     const result = globalSettings.autoLoadClaudeMd ?? false;
-    console.log(`${logPrefix} autoLoadClaudeMd from global settings: ${result}`);
+    logger.info(`${logPrefix} autoLoadClaudeMd from global settings: ${result}`);
     return result;
   } catch (error) {
-    console.error(`${logPrefix} Failed to load autoLoadClaudeMd setting:`, error);
+    logger.error(`${logPrefix} Failed to load autoLoadClaudeMd setting:`, error);
     return false;
   }
 }
apps/ui/src/store/app-store.ts (1)

1557-1563: Consider error handling for server sync failure.

The action updates local state and then syncs to server, but doesn't handle sync failures. If syncSettingsToServer fails, the UI state will be out of sync with the server. While syncSettingsToServer logs errors internally, the UI won't provide feedback to users.

This may be acceptable for a non-critical setting, but consider whether you want to:

  1. Show a toast/notification on sync failure
  2. Roll back the local state on failure
🔎 Example with error feedback (optional)
       setAutoLoadClaudeMd: async (enabled) => {
         set({ autoLoadClaudeMd: enabled });
-        // Sync to server settings file
         const { syncSettingsToServer } = await import('@/hooks/use-settings-migration');
-        await syncSettingsToServer();
+        const success = await syncSettingsToServer();
+        if (!success) {
+          // Optionally: roll back or notify user
+          console.warn('[AppStore] Failed to sync autoLoadClaudeMd to server');
+        }
       },
apps/server/src/lib/sdk-options.ts (1)

176-186: Consider using structured logging instead of console.log.

The codebase appears to use createLogger from @automaker/utils elsewhere. Using console.log here is inconsistent with the logging patterns in other files (e.g., generate-suggestions.ts uses createLogger).

🔎 Suggested improvement
+import { createLogger } from '@automaker/utils';
+
+const logger = createLogger('SdkOptions');
+
 function buildClaudeMdOptions(config: CreateSdkOptionsConfig): {
   // ...
-  console.log(
-    '[SDK Options] CLAUDE.md auto-loading enabled:',
-    JSON.stringify(
-      {
-        systemPrompt: result.systemPrompt,
-        settingSources: result.settingSources,
-      },
-      null,
-      2
-    )
-  );
+  logger.debug('CLAUDE.md auto-loading enabled:', {
+    systemPrompt: result.systemPrompt,
+    settingSources: result.settingSources,
+  });
apps/server/src/services/agent-service.ts (1)

607-636: LGTM! Well-structured settings retrieval with proper precedence.

The method correctly implements project-over-global precedence with safe fallbacks. Error handling ensures the feature fails closed (disabled) if settings cannot be loaded.

Optional consideration: The console.log statements on lines 621-623 and 630 will emit on every message. If high message throughput is expected, consider using debug-level logging or removing these after the feature stabilizes.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8a02265 and 3154121.

📒 Files selected for processing (27)
  • .gitignore
  • apps/server/src/index.ts
  • apps/server/src/lib/sdk-options.ts
  • apps/server/src/lib/settings-helpers.ts
  • apps/server/src/providers/claude-provider.ts
  • apps/server/src/providers/types.ts
  • apps/server/src/routes/app-spec/generate-features-from-spec.ts
  • apps/server/src/routes/app-spec/generate-spec.ts
  • apps/server/src/routes/app-spec/index.ts
  • apps/server/src/routes/app-spec/routes/generate-features.ts
  • apps/server/src/routes/app-spec/routes/generate.ts
  • apps/server/src/routes/context/index.ts
  • apps/server/src/routes/context/routes/describe-file.ts
  • apps/server/src/routes/context/routes/describe-image.ts
  • apps/server/src/routes/github/index.ts
  • apps/server/src/routes/github/routes/validate-issue.ts
  • apps/server/src/routes/suggestions/generate-suggestions.ts
  • apps/server/src/routes/suggestions/index.ts
  • apps/server/src/routes/suggestions/routes/generate.ts
  • apps/server/src/services/agent-service.ts
  • apps/server/src/services/auto-mode-service.ts
  • apps/ui/src/components/views/settings-view.tsx
  • apps/ui/src/components/views/settings-view/claude/claude-md-settings.tsx
  • apps/ui/src/hooks/use-settings-migration.ts
  • apps/ui/src/store/app-store.ts
  • libs/types/src/provider.ts
  • libs/types/src/settings.ts
🧰 Additional context used
🧬 Code graph analysis (12)
apps/server/src/routes/suggestions/routes/generate.ts (4)
apps/server/src/routes/templates/common.ts (1)
  • logger (8-8)
apps/server/src/routes/app-spec/routes/generate.ts (1)
  • createGenerateHandler (20-94)
apps/server/src/lib/events.ts (1)
  • EventEmitter (10-13)
apps/server/src/routes/suggestions/generate-suggestions.ts (1)
  • generateSuggestions (126-265)
apps/server/src/routes/suggestions/index.ts (3)
apps/server/src/lib/events.ts (1)
  • EventEmitter (10-13)
apps/server/src/services/settings-service.ts (1)
  • SettingsService (104-583)
apps/server/src/routes/suggestions/routes/generate.ts (1)
  • createGenerateHandler (14-59)
apps/server/src/routes/suggestions/generate-suggestions.ts (1)
apps/server/src/lib/sdk-options.ts (1)
  • createSuggestionsOptions (303-320)
apps/server/src/routes/app-spec/routes/generate.ts (2)
apps/server/src/routes/suggestions/routes/generate.ts (1)
  • createGenerateHandler (14-59)
apps/server/src/services/settings-service.ts (1)
  • SettingsService (104-583)
apps/ui/src/components/views/settings-view/claude/claude-md-settings.tsx (1)
apps/ui/src/lib/utils.ts (1)
  • cn (5-7)
apps/ui/src/components/views/settings-view.tsx (1)
apps/ui/src/components/views/settings-view/claude/claude-md-settings.tsx (1)
  • ClaudeMdSettings (25-82)
apps/server/src/lib/settings-helpers.ts (2)
apps/server/src/services/auto-mode-service.ts (1)
  • getAutoLoadClaudeMdSetting (2523-2548)
apps/server/src/services/settings-service.ts (1)
  • SettingsService (104-583)
apps/server/src/routes/app-spec/index.ts (4)
apps/server/src/lib/events.ts (1)
  • EventEmitter (10-13)
apps/server/src/services/settings-service.ts (1)
  • SettingsService (104-583)
apps/server/src/routes/app-spec/routes/generate.ts (1)
  • createGenerateHandler (20-94)
apps/server/src/routes/app-spec/routes/generate-features.ts (1)
  • createGenerateFeaturesHandler (20-76)
apps/server/src/services/auto-mode-service.ts (4)
apps/server/src/lib/events.ts (1)
  • EventEmitter (10-13)
apps/server/src/lib/sdk-options.ts (2)
  • createCustomOptions (395-418)
  • createAutoModeOptions (367-387)
libs/types/src/provider.ts (1)
  • ExecuteOptions (34-46)
apps/server/src/providers/types.ts (1)
  • ExecuteOptions (25-37)
apps/ui/src/store/app-store.ts (1)
apps/ui/src/hooks/use-settings-migration.ts (1)
  • syncSettingsToServer (195-242)
apps/server/src/routes/context/routes/describe-file.ts (5)
apps/server/src/services/settings-service.ts (1)
  • SettingsService (104-583)
apps/server/src/lib/settings-helpers.ts (1)
  • getAutoLoadClaudeMdSetting (16-45)
apps/server/src/services/auto-mode-service.ts (1)
  • getAutoLoadClaudeMdSetting (2523-2548)
apps/server/src/lib/sdk-options.ts (1)
  • createCustomOptions (395-418)
libs/types/src/model.ts (1)
  • CLAUDE_MODEL_MAP (4-8)
apps/server/src/routes/app-spec/routes/generate-features.ts (3)
apps/server/src/lib/events.ts (1)
  • EventEmitter (10-13)
apps/server/src/services/settings-service.ts (1)
  • SettingsService (104-583)
apps/server/src/routes/app-spec/generate-features-from-spec.ts (1)
  • generateFeaturesFromSpec (20-173)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: e2e
🔇 Additional comments (31)
.gitignore (1)

82-83: Appropriate ignore entries for the CLAUDE.md feature.

Both additions follow the existing patterns and conventions:

  • Line 82 (docker-compose.override.yml): Standard Docker override file that should not be committed.
  • Line 83 (.claude/): New directory for local CLAUDE.md files and settings, which aligns with the per-project configuration scope of this PR.
apps/ui/src/hooks/use-settings-migration.ts (1)

226-226: LGTM! Consistent integration of the new setting.

The addition of autoLoadClaudeMd to the settings sync payload follows the established pattern for other boolean settings in this function.

apps/server/src/routes/suggestions/routes/generate.ts (1)

10-10: LGTM! Proper dependency injection pattern.

The SettingsService is correctly threaded through the handler and passed to generateSuggestions. The optional parameter maintains backward compatibility while enabling the new CLAUDE.md auto-loading feature.

Also applies to: 14-14, 41-41

apps/server/src/routes/context/index.ts (1)

11-11: LGTM! Consistent dependency injection.

The SettingsService is properly threaded through to both image and file description handlers, with clear JSDoc documentation of the new parameter.

Also applies to: 16-19, 22-23

apps/server/src/routes/github/index.ts (1)

19-19: LGTM! Proper selective dependency injection.

The SettingsService is correctly passed only to the validate-issue handler that requires it, avoiding unnecessary coupling for other GitHub endpoints.

Also applies to: 21-24, 33-33

apps/server/src/providers/types.ts (1)

29-29: LGTM! Type extensions enable the new functionality.

The union type for systemPrompt maintains backward compatibility (existing string usage still works) while enabling preset-based configuration. The settingSources field is properly typed with specific literal values that align with the CLAUDE.md loading mechanism.

Also applies to: 36-36

apps/ui/src/components/views/settings-view.tsx (1)

13-13: LGTM! Clean UI integration.

The ClaudeMdSettings component is properly integrated into the Claude settings section with correct state wiring from the app store. The placement alongside other Claude-related settings is logical and maintains UI consistency.

Also applies to: 51-52, 108-111

libs/types/src/settings.ts (1)

301-303: LGTM! Well-structured type definitions.

The autoLoadClaudeMd setting is properly defined in both GlobalSettings and ProjectSettings with clear JSDoc documentation. The default value of false provides safe opt-in behavior, and the optional field in ProjectSettings enables proper cascading from global to project-specific configuration.

Also applies to: 400-402, 461-461

apps/server/src/providers/claude-provider.ts (1)

58-59: The implementation is correct and the Claude SDK version supports settingSources.

The dependency confirms @anthropic-ai/claude-agent-sdk version 0.1.72 is used, which supports the settingSources option (type: SettingSource[] where SettingSource = 'user' | 'project' | 'local'). The code correctly forwards this option using a conditional spread operator, which properly handles cases where settingSources is undefined.

apps/server/src/routes/suggestions/index.ts (1)

11-23: LGTM! Clean dependency injection for settings service.

The optional settingsService parameter follows a consistent pattern with other route factories in this PR, correctly wiring it through to only the generate handler where it's needed for autoLoadClaudeMd configuration.

apps/server/src/routes/app-spec/routes/generate.ts (1)

16-73: LGTM! Correct propagation of settings service to spec generation.

The settingsService parameter is properly threaded through to generateSpec, enabling autoLoadClaudeMd configuration to be applied during spec generation workflows.

apps/server/src/routes/context/routes/describe-image.ts (1)

330-348: LGTM! Settings integration follows the established pattern.

The handler correctly loads the autoLoadClaudeMd setting and passes it to SDK options. Note that cwd (the image's parent directory) is used as the project path for settings lookup, which should work correctly when images are within the project directory structure.

apps/server/src/routes/app-spec/index.ts (1)

12-23: LGTM! Consistent settings service wiring for generation routes.

The settingsService is appropriately passed only to the handlers that perform AI generation (/generate and /generate-features), while the create handler remains unchanged.

libs/types/src/provider.ts (1)

22-46: LGTM! Well-designed type extensions for CLAUDE.md auto-loading.

The SystemPromptPreset interface provides a clean abstraction for preset-based system prompts, and the union type for systemPrompt maintains backward compatibility. The settingSources array offers granular control over which CLAUDE.md sources to load.

apps/server/src/routes/context/routes/describe-file.ts (1)

20-21: LGTM! Consistent implementation with describe-image handler.

The settings integration follows the same pattern as describe-image.ts, correctly loading the autoLoadClaudeMd setting and passing it to SDK options.

Also applies to: 77-82, 173-188

apps/ui/src/store/app-store.ts (2)

481-483: LGTM! Clean state and action definitions.

The autoLoadClaudeMd state field and async setAutoLoadClaudeMd action are well-defined, following the existing patterns in the store.

Also applies to: 757-759


2708-2708: LGTM! Setting correctly persisted.

The autoLoadClaudeMd field is properly included in the partialize function, ensuring it persists across sessions.

apps/ui/src/components/views/settings-view/claude/claude-md-settings.tsx (1)

1-82: LGTM! Well-structured settings component.

The component follows React best practices with proper controlled input handling, accessibility attributes (htmlFor, data-testid), and clear documentation. The onCheckedChange callback correctly handles the checked === true coercion for the CheckedState type from Radix UI.

apps/server/src/lib/sdk-options.ts (2)

246-262: LGTM! Consistent integration of CLAUDE.md options.

The claudeMdOptions spread pattern is correctly applied after base options, ensuring the CLAUDE.md configuration takes precedence. The buildClaudeMdOptions helper properly handles the case where a custom systemPrompt exists by appending it to the preset rather than overwriting.


195-202: SystemPromptConfig structure correctly matches @anthropic-ai/claude-agent-sdk v0.1.72.

The interface definition with type: 'preset', preset: 'claude_code', and optional append field aligns precisely with the SDK's expected shape. The implementation in buildClaudeMdOptions() properly combines this preset with settingSources: ['user', 'project'] to enable CLAUDE.md auto-loading as documented.

apps/server/src/routes/suggestions/generate-suggestions.ts (1)

126-175: LGTM! Properly integrated settings service for CLAUDE.md auto-loading.

The settingsService parameter is correctly added as optional, the getAutoLoadClaudeMdSetting helper is properly awaited, and the setting is passed through to SDK options. This follows the same pattern established across other routes in this PR.

apps/server/src/routes/app-spec/generate-features-from-spec.ts (1)

20-108: LGTM! Consistent integration pattern.

The changes follow the same established pattern for SettingsService integration with proper optional parameter handling and correct async flow.

apps/server/src/routes/app-spec/generate-spec.ts (1)

25-104: LGTM! Proper settings propagation.

The settingsService is correctly integrated and notably propagated to generateFeaturesFromSpec (line 288), ensuring consistent CLAUDE.md behavior throughout the spec generation workflow.

apps/server/src/routes/app-spec/routes/generate-features.ts (1)

20-56: LGTM! Clean factory pattern update.

The handler factory correctly accepts the optional SettingsService and propagates it to the underlying generateFeaturesFromSpec function.

apps/server/src/services/auto-mode-service.ts (2)

1102-1123: LGTM! Good integration of CLAUDE.md options into analysis flow.

The analyzeProject method correctly uses createCustomOptions with the autoLoadClaudeMd setting and properly extracts/propagates settingSources to the ExecuteOptions.


1799-1848: LGTM! Proper propagation of CLAUDE.md settings to agent execution.

The runAgent method correctly loads the autoLoadClaudeMd setting, passes it to createAutoModeOptions, and extracts the resulting systemPrompt and settingSources for the ExecuteOptions.

apps/server/src/routes/github/routes/validate-issue.ts (1)

51-100: LGTM! Consistent SettingsService integration.

The changes follow the same established pattern for integrating SettingsService and getAutoLoadClaudeMdSetting into the validation workflow.

apps/server/src/index.ts (2)

115-119: LGTM! Clean dependency injection ordering.

The SettingsService is correctly instantiated first and injected into dependent services (AgentService, AutoModeService). The comment on line 115 clarifies the ordering rationale.


152-162: LGTM! Consistent route wiring.

The settingsService is consistently injected into all routes that require access to autoLoadClaudeMd settings. The pattern is uniform and follows the existing dependency injection style used elsewhere in the file.

apps/server/src/services/agent-service.ts (2)

61-68: LGTM! Good backward-compatible optional dependency.

The optional SettingsService parameter with nullable field allows the service to function gracefully when the dependency is not provided, maintaining backward compatibility.


231-242: LGTM! SDK options correctly propagated to provider.

The systemPrompt from sdkOptions and settingSources are correctly passed to the provider options, enabling the SDK to handle CLAUDE.md loading when configured.

- Removed the private method for getting the autoLoadClaudeMd setting from AgentService and AutoModeService.
- Updated both services to utilize the new settings helper for retrieving the autoLoadClaudeMd setting, improving code reusability and clarity.
- Adjusted error handling in the settings helper to throw errors instead of returning false when the settings service is unavailable.
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
apps/server/src/services/auto-mode-service.ts (1)

565-568: CLAUDE.md duplication confirmed across executeFeature and followUpFeature flows when autoLoadClaudeMd is enabled.

Both flows unconditionally load context files (including CLAUDE.md) via loadContextFiles() and pass the result as systemPrompt. However, when autoLoadClaudeMd is enabled, the SDK's buildClaudeMdOptions function:

  1. Uses preset mode with 'claude_code' to auto-load CLAUDE.md via settingSources
  2. Appends the manually-loaded systemPrompt (containing CLAUDE.md) to the preset

This results in CLAUDE.md content being sent to the agent twice.

Solution: Either:

  • Conditionally skip loading in loadContextFiles when autoLoadClaudeMd is enabled (requires adding a skip parameter)
  • Only call loadContextFiles when autoLoadClaudeMd is false, letting the SDK handle it exclusively when enabled

Affects: executeFeature (lines 565-568, 614), followUpFeature (lines 757-761, 877-890), and the plan analysis flow (lines 1104-1118).

apps/server/src/services/agent-service.ts (1)

193-221: Clarify CLAUDE.md handling when autoLoadClaudeMd is enabled.

The duplication concern is valid. When autoLoadClaudeMd is true:

  • loadContextFiles loads all files from .automaker/context/ (lines 202-205), which can include CLAUDE.md
  • SDK's settingSources: ['user', 'project'] loads CLAUDE.md from the standard .claude/ location
  • Both are appended to the final system prompt (line 218 → buildClaudeMdOptions)

If a user has CLAUDE.md in both locations, it will be included twice. Consider:

  • Option 1: Modify loadContextFiles to skip CLAUDE.md when autoLoadClaudeMd is enabled
  • Option 2: Document that having CLAUDE.md in both locations is unsupported or intentional
  • Option 3: Add logic to SDK to deduplicate CLAUDE.md content at the prompt level
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3154121 and 99a19cb.

📒 Files selected for processing (4)
  • apps/server/src/lib/sdk-options.ts
  • apps/server/src/lib/settings-helpers.ts
  • apps/server/src/services/agent-service.ts
  • apps/server/src/services/auto-mode-service.ts
🧰 Additional context used
🧬 Code graph analysis (1)
apps/server/src/services/agent-service.ts (2)
apps/server/src/services/settings-service.ts (1)
  • SettingsService (104-583)
apps/server/src/lib/settings-helpers.ts (1)
  • getAutoLoadClaudeMdSetting (16-45)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: e2e
🔇 Additional comments (5)
apps/server/src/lib/settings-helpers.ts (1)

16-45: LGTM! Clean implementation of settings precedence.

The function correctly implements project-over-global settings precedence with appropriate error handling. The change to rethrow errors (instead of returning false) provides better visibility for debugging and aligns with the commit message.

apps/server/src/lib/sdk-options.ts (2)

139-177: LGTM! Well-structured CLAUDE.md auto-loading implementation.

The buildClaudeMdOptions function cleanly separates standard mode from auto-loading mode:

  • Standard mode passes through the systemPrompt unchanged
  • Auto-load mode uses the 'claude_code' preset with settingSources to enable SDK-driven CLAUDE.md loading
  • Custom systemPrompts are properly appended to the preset

234-235: LGTM! Consistent integration across all option builders.

The buildClaudeMdOptions helper is correctly integrated into all create*Options functions, ensuring consistent CLAUDE.md loading behavior across spec generation, feature generation, suggestions, chat, auto mode, and custom options.

Also applies to: 266-267, 295-296, 327-328, 359-360, 393-394

apps/server/src/services/auto-mode-service.ts (2)

1103-1118: LGTM! Clean integration of autoLoadClaudeMd in analyzeProject.

The analysis flow correctly:

  • Loads the autoLoadClaudeMd setting using the shared helper
  • Creates SDK options via createCustomOptions with the setting
  • Propagates settingSources to ExecuteOptions

1804-1817: LGTM! Proper settings loading and SDK options construction.

The runAgent method correctly:

  • Loads autoLoadClaudeMd with project precedence over global settings
  • Passes the setting to createAutoModeOptions
  • Propagates the resulting systemPrompt and settingSources to ExecuteOptions

@Shironex Shironex added Ready-To-Merge A feature or bug has been improved/fixed and a final review is requested before merging. and removed Do Not Merge Use this label if something should not be merged. Experiment labels Dec 24, 2025
…deService

- Updated both services to conditionally load CLAUDE.md based on the autoLoadClaudeMd setting, preventing duplication.
- Improved clarity in comments regarding the loading process of context files.
- Ensured consistent retrieval of the autoLoadClaudeMd setting across different methods.
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (2)
apps/server/src/services/auto-mode-service.ts (2)

562-579: Verify: Same concern about non-CLAUDE.md context files.

This has the same implementation as AgentService (lines 193-208): all context files are skipped when autoLoadClaudeMd is enabled, not just CLAUDE.md. Please verify this doesn't unintentionally exclude CODE_QUALITY.md and other context files.

See the verification script in the agent-service.ts review comment for the same concern.


769-784: Same context loading concern applies here.

This follows the identical pattern of conditionally skipping all context files. Same verification needed as flagged in the executeFeature and AgentService.sendMessage methods.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 99a19cb and 077dd31.

📒 Files selected for processing (2)
  • apps/server/src/services/agent-service.ts
  • apps/server/src/services/auto-mode-service.ts
🧰 Additional context used
🧬 Code graph analysis (1)
apps/server/src/services/agent-service.ts (2)
apps/server/src/lib/settings-helpers.ts (1)
  • getAutoLoadClaudeMdSetting (16-45)
libs/utils/src/context-loader.ts (1)
  • loadContextFiles (148-202)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: e2e
🔇 Additional comments (6)
apps/server/src/services/agent-service.ts (3)

62-62: LGTM: Clean dependency injection pattern.

The SettingsService integration follows best practices with optional injection and explicit null handling.

Also applies to: 64-64, 68-68


217-248: LGTM: SDK options correctly propagated.

The centralized SDK options flow is well-structured:

  • createChatOptions receives the combined system prompt
  • autoLoadClaudeMd controls the loading strategy
  • systemPrompt and settingSources are properly forwarded to ExecuteOptions

193-198: LGTM: Shared helper function eliminates duplication.

The use of getAutoLoadClaudeMdSetting from settings-helpers.ts properly addresses the code duplication concern raised in previous reviews. The helper correctly handles project/global setting precedence and null service handling.

Based on past review comments, this successfully resolves the duplication issue.

apps/server/src/services/auto-mode-service.ts (3)

350-350: LGTM: Consistent dependency injection.

The SettingsService integration follows the same clean pattern as AgentService.

Also applies to: 352-352, 354-354


1127-1152: LGTM: Clean SDK options usage.

The analyzeProject method correctly uses centralized SDK configuration via createCustomOptions. By relying entirely on SDK options without manual context file loading, this avoids potential duplication and maintains consistency.


1756-1756: LGTM: Efficient setting reuse with proper fallback.

The pattern of using a provided autoLoadClaudeMd value (lines 1831-1834) before loading from settings is efficient and avoids redundant calls. The SDK options are correctly constructed and propagated.

Also applies to: 1829-1842, 1880-1881

@Shironex Shironex added Do Not Merge Use this label if something should not be merged. and removed Ready-To-Merge A feature or bug has been improved/fixed and a final review is requested before merging. labels Dec 24, 2025
…ervice

- Updated both services to conditionally load context files while excluding CLAUDE.md when autoLoadClaudeMd is enabled, preventing duplication.
- Improved the structure and clarity of the context files prompt, emphasizing the importance of following project-specific rules and conventions.
- Ensured consistent handling of context file loading across different methods in both services.
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (2)
apps/server/src/services/auto-mode-service.ts (2)

577-617: Extract duplicated CLAUDE.md filtering logic to a shared helper.

This is the same CLAUDE.md filtering and prompt reconstruction logic flagged in agent-service.ts lines 206-246. It's also duplicated again in this file at lines 823-860. All instances should use a shared helper function to reduce maintenance burden.


820-860: Extract duplicated CLAUDE.md filtering logic to a shared helper.

Another instance of the duplicated CLAUDE.md filtering and prompt reconstruction logic. Should use the same shared helper function recommended for the other occurrences.

🧹 Nitpick comments (1)
apps/server/src/services/agent-service.ts (1)

206-246: Extract duplicated CLAUDE.md filtering logic to a shared helper.

This CLAUDE.md filtering and prompt reconstruction logic is duplicated in at least 4 locations:

  • agent-service.ts lines 209-246 (here)
  • auto-mode-service.ts lines 580-617
  • auto-mode-service.ts lines 823-860

The identical template and filtering logic creates maintenance burden when the prompt format needs updating.

🔎 Refactor suggestion

Create a shared helper in apps/server/src/lib/context-helpers.ts:

import type { ContextFilesResult } from '@automaker/utils';

export function filterAndRebuildContextPrompt(
  contextResult: ContextFilesResult,
  excludeClaude: boolean
): string {
  if (!excludeClaude || contextResult.files.length === 0) {
    return contextResult.formattedPrompt;
  }

  const nonClaudeFiles = contextResult.files.filter(
    (f) => f.name.toLowerCase() !== 'claude.md'
  );

  if (nonClaudeFiles.length === 0) {
    return '';
  }

  const formattedFiles = nonClaudeFiles.map((file) => {
    const header = `## ${file.name}`;
    const pathInfo = `**Path:** \`${file.path}\``;
    const descriptionInfo = file.description ? `\n**Purpose:** ${file.description}` : '';
    return `${header}\n${pathInfo}${descriptionInfo}\n\n${file.content}`;
  });

  return `# Project Context Files

The following context files provide project-specific rules, conventions, and guidelines.
Each file serves a specific purpose - use the description to understand when to reference it.
If you need more details about a context file, you can read the full file at the path provided.

**IMPORTANT**: You MUST follow the rules and conventions specified in these files.
- Follow ALL commands exactly as shown (e.g., if the project uses \`pnpm\`, NEVER use \`npm\` or \`npx\`)
- Follow ALL coding conventions, commit message formats, and architectural patterns specified
- Reference these rules before running ANY shell commands or making commits

---

${formattedFiles.join('\n\n---\n\n')}

---

**REMINDER**: Before taking any action, verify you are following the conventions specified above.
`;
}

Then replace all occurrences with:

-      // When autoLoadClaudeMd is enabled, filter out CLAUDE.md to avoid duplication
-      // (SDK handles CLAUDE.md via settingSources), but keep other context files like CODE_QUALITY.md
-      let contextFilesPrompt = contextResult.formattedPrompt;
-      if (autoLoadClaudeMd && contextResult.files.length > 0) {
-        const nonClaudeFiles = contextResult.files.filter(
-          (f) => f.name.toLowerCase() !== 'claude.md'
-        );
-
-        // Rebuild prompt without CLAUDE.md
-        if (nonClaudeFiles.length > 0) {
-          const formattedFiles = nonClaudeFiles.map((file) => {
-            const header = `## ${file.name}`;
-            const pathInfo = `**Path:** \`${file.path}\``;
-            const descriptionInfo = file.description ? `\n**Purpose:** ${file.description}` : '';
-            return `${header}\n${pathInfo}${descriptionInfo}\n\n${file.content}`;
-          });
-
-          contextFilesPrompt = `# Project Context Files
-
-The following context files provide project-specific rules, conventions, and guidelines.
-Each file serves a specific purpose - use the description to understand when to reference it.
-If you need more details about a context file, you can read the full file at the path provided.
-
-**IMPORTANT**: You MUST follow the rules and conventions specified in these files.
-- Follow ALL commands exactly as shown (e.g., if the project uses \`pnpm\`, NEVER use \`npm\` or \`npx\`)
-- Follow ALL coding conventions, commit message formats, and architectural patterns specified
-- Reference these rules before running ANY shell commands or making commits
-
----
-
-${formattedFiles.join('\n\n---\n\n')}
-
----
-
-**REMINDER**: Before taking any action, verify you are following the conventions specified above.
-`;
-        } else {
-          // All files were CLAUDE.md, so no context to add
-          contextFilesPrompt = '';
-        }
-      }
+      // When autoLoadClaudeMd is enabled, filter out CLAUDE.md to avoid duplication
+      // (SDK handles CLAUDE.md via settingSources), but keep other context files like CODE_QUALITY.md
+      const contextFilesPrompt = filterAndRebuildContextPrompt(contextResult, autoLoadClaudeMd);
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 077dd31 and 387bb15.

📒 Files selected for processing (2)
  • apps/server/src/services/agent-service.ts
  • apps/server/src/services/auto-mode-service.ts
🧰 Additional context used
🧬 Code graph analysis (2)
apps/server/src/services/auto-mode-service.ts (4)
apps/server/src/lib/settings-helpers.ts (1)
  • getAutoLoadClaudeMdSetting (16-45)
libs/utils/src/context-loader.ts (1)
  • loadContextFiles (148-202)
apps/server/src/lib/sdk-options.ts (2)
  • createCustomOptions (383-406)
  • createAutoModeOptions (355-375)
libs/types/src/provider.ts (1)
  • ExecuteOptions (34-46)
apps/server/src/services/agent-service.ts (3)
apps/server/src/services/settings-service.ts (1)
  • SettingsService (104-583)
apps/server/src/lib/settings-helpers.ts (1)
  • getAutoLoadClaudeMdSetting (16-45)
libs/utils/src/context-loader.ts (1)
  • loadContextFiles (148-202)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: e2e
🔇 Additional comments (10)
apps/server/src/services/agent-service.ts (4)

64-68: LGTM! Clean dependency injection.

The optional settingsService parameter maintains backward compatibility while enabling project-specific settings support. The nullish coalescing pattern is appropriate for handling the optional dependency.


193-198: LGTM! Correct usage of centralized settings helper.

The getAutoLoadClaudeMdSetting call properly handles project/global precedence and provides clear logging context.


277-288: LGTM! Proper propagation of SDK options to provider.

The ExecuteOptions correctly includes systemPrompt and settingSources from the SDK options, enabling CLAUDE.md auto-loading at the provider level.


248-262: The system prompt is correctly preserved. The combinedSystemPrompt flows through createChatOptionsbuildClaudeMdOptions (which returns { systemPrompt }) → spread into the returned Options object, making sdkOptions.systemPrompt available for use in ExecuteOptions.

apps/server/src/services/auto-mode-service.ts (6)

352-354: LGTM! Consistent dependency injection pattern.

The optional settingsService parameter mirrors the implementation in agent-service.ts and maintains backward compatibility.


562-567: LGTM! Correct settings loading for feature execution.

The getAutoLoadClaudeMdSetting call properly loads the setting with project/global precedence before feature execution begins.


807-812: LGTM! Correct settings loading for follow-up execution.

The getAutoLoadClaudeMdSetting call appropriately loads the setting before follow-up feature execution.


1203-1228: LGTM! Clean SDK options integration for project analysis.

The flow correctly:

  1. Loads autoLoadClaudeMd setting (lines 1204-1208)
  2. Builds SDK options with createCustomOptions (lines 1211-1218)
  3. Propagates settingSources to ExecuteOptions (line 1227)

This enables CLAUDE.md auto-loading during project analysis.


1905-1910: LGTM! Efficient settings handling with fallback.

The conditional logic correctly uses the provided autoLoadClaudeMd value when available, falling back to loading from settings only when needed. This avoids redundant setting loads when the value was already determined by the caller.


1912-1958: LGTM! Proper SDK options flow for agent execution.

The implementation correctly:

  1. Builds SDK options with createAutoModeOptions including autoLoadClaudeMd (lines 1913-1918)
  2. Extracts and uses fields from SDK options (lines 1921-1923)
  3. Propagates systemPrompt and settingSources to ExecuteOptions (lines 1956-1957)

This ensures CLAUDE.md auto-loading works correctly during feature implementation.

…e handling

- Introduced a new utility function to filter out CLAUDE.md from context files when autoLoadClaudeMd is enabled, enhancing clarity and preventing duplication.
- Updated AgentService and AutoModeService to utilize the new filtering function, streamlining context file management.
- Improved documentation for the new utility, detailing its purpose and usage in context file handling.
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
apps/server/src/lib/settings-helpers.ts (1)

77-98: Duplicated prompt template may drift from source.

The comment on line 103 notes this format should match @automaker/utils/context-loader.ts, but the template is hardcoded here. If the original format changes, this copy won't be updated automatically.

Consider extracting a shared constant or function for the prompt header/footer in @automaker/utils that both locations can import.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 387bb15 and 072ad72.

📒 Files selected for processing (3)
  • apps/server/src/lib/settings-helpers.ts
  • apps/server/src/services/agent-service.ts
  • apps/server/src/services/auto-mode-service.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: e2e
🔇 Additional comments (9)
apps/server/src/lib/settings-helpers.ts (2)

1-46: Well-structured helper for settings resolution.

The implementation correctly follows the precedence pattern (project settings → global settings) and proper error handling with re-throw. The logging with customizable prefix aids debugging.


60-75: LGTM - edge cases properly handled.

The function correctly handles:

  • autoLoadClaudeMd = false → returns original prompt unchanged
  • Empty files array → returns original prompt
  • All files are CLAUDE.md → returns empty string
  • Case-insensitive filtering with .toLowerCase()
apps/server/src/services/agent-service.ts (2)

193-224: Good integration - addresses previous review concerns.

The implementation now:

  1. Uses the shared getAutoLoadClaudeMdSetting helper (eliminating code duplication)
  2. Always loads context files via loadContextFiles()
  3. Filters out only CLAUDE.md when auto-loading is enabled, preserving other context files like CODE_QUALITY.md

This correctly addresses the previous review concern about non-CLAUDE.md context files being lost.


62-68: Clean dependency injection pattern.

Using optional settingsService with null default allows backward compatibility while enabling the new auto-loading feature when the service is available.

apps/server/src/services/auto-mode-service.ts (5)

350-354: Clean constructor update for settings service injection.

Follows the same pattern as AgentService for backward compatibility.


562-579: Consistent context loading pattern.

The implementation correctly:

  1. Loads autoLoadClaudeMd setting using the shared helper
  2. Loads all context files
  3. Filters CLAUDE.md when auto-loading is enabled

This follows the same pattern as AgentService, maintaining consistency across the codebase.


1829-1841: Smart optimization to avoid redundant settings load.

The code checks if autoLoadClaudeMd was already passed in options before calling getAutoLoadClaudeMdSetting. This avoids redundant async settings lookups when the caller has already determined the value.


1127-1151: Good use of createCustomOptions for SDK configuration.

The analyzeProject method now properly integrates autoLoadClaudeMd through the centralized SDK options, ensuring consistent behavior with other execution paths.


769-784: Consistent pattern in followUpFeature.

Same context loading and filtering pattern is applied here, maintaining consistency across all feature execution paths.

@Shironex Shironex added Ready-To-Merge A feature or bug has been improved/fixed and a final review is requested before merging. and removed Do Not Merge Use this label if something should not be merged. labels Dec 24, 2025
@webdevcody webdevcody merged commit a3fcf5b into main Dec 25, 2025
7 checks passed
@webdevcody webdevcody deleted the feat/load-claude-files branch December 25, 2025 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Improvements to existing functionality or UI. Ready-To-Merge A feature or bug has been improved/fixed and a final review is requested before merging.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants