@sylphx/flow 2.13.0 → 2.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/assets/slash-commands/review-account-security.md +2 -2
  3. package/assets/slash-commands/review-admin.md +2 -2
  4. package/assets/slash-commands/review-auth.md +2 -2
  5. package/assets/slash-commands/review-billing.md +2 -2
  6. package/assets/slash-commands/review-code-quality.md +2 -2
  7. package/assets/slash-commands/review-data-architecture.md +2 -2
  8. package/assets/slash-commands/review-database.md +2 -2
  9. package/assets/slash-commands/review-delivery.md +2 -2
  10. package/assets/slash-commands/review-discovery.md +2 -2
  11. package/assets/slash-commands/review-growth.md +2 -2
  12. package/assets/slash-commands/review-i18n.md +11 -2
  13. package/assets/slash-commands/review-ledger.md +2 -2
  14. package/assets/slash-commands/review-observability.md +2 -2
  15. package/assets/slash-commands/review-operability.md +2 -2
  16. package/assets/slash-commands/review-performance.md +2 -2
  17. package/assets/slash-commands/review-pricing.md +2 -2
  18. package/assets/slash-commands/review-privacy.md +2 -2
  19. package/assets/slash-commands/review-pwa.md +2 -2
  20. package/assets/slash-commands/review-referral.md +2 -2
  21. package/assets/slash-commands/review-security.md +2 -2
  22. package/assets/slash-commands/review-seo.md +2 -2
  23. package/assets/slash-commands/review-storage.md +2 -2
  24. package/assets/slash-commands/review-support.md +2 -2
  25. package/assets/slash-commands/review-trust-safety.md +2 -2
  26. package/assets/slash-commands/review-uiux.md +2 -2
  27. package/package.json +1 -1
  28. package/src/targets/functional/claude-code-logic.ts +46 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # @sylphx/flow
2
2
 
3
+ ## 2.14.1 (2025-12-17)
4
+
5
+ ### Documentation
6
+
7
+ - Add bundle constraints guidance for next-intl in review-i18n command
8
+
9
+ ### 📚 Documentation
10
+
11
+ - **review-i18n:** add bundle constraints for next-intl ([c16d6c0](https://github.com/SylphxAI/flow/commit/c16d6c03284d2215d0e29cb98500d71f04fa01a7))
12
+
13
+ ### 🔧 Chores
14
+
15
+ - trigger release workflow ([ee60f39](https://github.com/SylphxAI/flow/commit/ee60f3967f07a576f79ffe926770fb36414d78c7))
16
+
17
+ ## 2.14.0 (2025-12-17)
18
+
19
+ ### ✨ Features
20
+
21
+ - **claude-code:** add default settings for optimal experience ([9b097bd](https://github.com/SylphxAI/flow/commit/9b097bdbe1db9770a7afd92aff9533259983a697))
22
+
23
+ ### 🔧 Chores
24
+
25
+ - add bump file for v2.14.0 release ([8246ac2](https://github.com/SylphxAI/flow/commit/8246ac21da6398dcdb7e88e7d82949a4688a8b1b))
26
+
3
27
  ## 2.13.0 (2025-12-17)
4
28
 
5
29
  ### ✨ Features
@@ -10,8 +10,8 @@ agent: coder
10
10
 
11
11
  * Perform a **deep, thorough review** of account security in this codebase.
12
12
  * **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
13
- * Deliverables must be stated as **findings, gaps, and actionable recommendations**.
14
- * **Single-pass delivery**: no deferrals; deliver a complete assessment.
13
+ * **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
14
+ * **Single-pass delivery**: no deferrals; deliver complete implementation.
15
15
  * **Explore beyond the spec**: identify threats users can't protect themselves from.
16
16
 
17
17
  ## Tech Stack
@@ -10,8 +10,8 @@ agent: coder
10
10
 
11
11
  * Perform a **deep, thorough review** of the admin platform in this codebase.
12
12
  * **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
13
- * Deliverables must be stated as **findings, gaps, and actionable recommendations**.
14
- * **Single-pass delivery**: no deferrals; deliver a complete assessment.
13
+ * **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
14
+ * **Single-pass delivery**: no deferrals; deliver complete implementation.
15
15
  * **Explore beyond the spec**: identify operational gaps and safety improvements.
16
16
 
17
17
  ## Tech Stack
@@ -10,8 +10,8 @@ agent: coder
10
10
 
11
11
  * Perform a **deep, thorough review** of authentication in this codebase.
12
12
  * **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
13
- * Deliverables must be stated as **findings, gaps, and actionable recommendations**.
14
- * **Single-pass delivery**: no deferrals; deliver a complete assessment.
13
+ * **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
14
+ * **Single-pass delivery**: no deferrals; deliver complete implementation.
15
15
  * **Explore beyond the spec**: identify security gaps and UX friction in auth flows.
16
16
 
17
17
  ## Tech Stack
@@ -10,8 +10,8 @@ agent: coder
10
10
 
11
11
  * Perform a **deep, thorough review** of billing and payments in this codebase.
12
12
  * **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
13
- * Deliverables must be stated as **findings, gaps, and actionable recommendations**.
14
- * **Single-pass delivery**: no deferrals; deliver a complete assessment.
13
+ * **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
14
+ * **Single-pass delivery**: no deferrals; deliver complete implementation.
15
15
  * **Explore beyond the spec**: identify revenue leakage and reliability improvements.
16
16
 
17
17
  ## Tech Stack
@@ -10,8 +10,8 @@ agent: coder
10
10
 
11
11
  * Perform a **deep, thorough review** of code quality in this codebase.
12
12
  * **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
13
- * Deliverables must be stated as **findings, gaps, and actionable recommendations**.
14
- * **Single-pass delivery**: no deferrals; deliver a complete assessment.
13
+ * **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
14
+ * **Single-pass delivery**: no deferrals; deliver complete implementation.
15
15
  * **Explore beyond the spec**: identify code that works but shouldn't exist in its current form.
16
16
 
17
17
  ## Tech Stack
@@ -10,8 +10,8 @@ agent: coder
10
10
 
11
11
  * Perform a **deep, thorough review** of data architecture in this codebase.
12
12
  * **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
13
- * Deliverables must be stated as **findings, gaps, and actionable recommendations**.
14
- * **Single-pass delivery**: no deferrals; deliver a complete assessment.
13
+ * **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
14
+ * **Single-pass delivery**: no deferrals; deliver complete implementation.
15
15
  * **Explore beyond the spec**: identify architectural weaknesses that will cause problems at scale.
16
16
 
17
17
  ## Tech Stack
@@ -10,8 +10,8 @@ agent: coder
10
10
 
11
11
  * Perform a **deep, thorough review** of the database in this codebase.
12
12
  * **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
13
- * Deliverables must be stated as **findings, gaps, and actionable recommendations**.
14
- * **Single-pass delivery**: no deferrals; deliver a complete assessment.
13
+ * **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
14
+ * **Single-pass delivery**: no deferrals; deliver complete implementation.
15
15
  * **Explore beyond the spec**: identify schema problems that will hurt at scale.
16
16
 
17
17
  ## Tech Stack
@@ -10,8 +10,8 @@ agent: coder
10
10
 
11
11
  * Perform a **deep, thorough review** of delivery gates in this codebase.
12
12
  * **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
13
- * Deliverables must be stated as **findings, gaps, and actionable recommendations**.
14
- * **Single-pass delivery**: no deferrals; deliver a complete assessment.
13
+ * **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
14
+ * **Single-pass delivery**: no deferrals; deliver complete implementation.
15
15
  * **Explore beyond the spec**: identify what could go wrong in production that we're not catching.
16
16
 
17
17
  ## Tech Stack
@@ -10,8 +10,8 @@ agent: coder
10
10
 
11
11
  * Perform a **deep, thorough review** to discover opportunities for this product.
12
12
  * **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
13
- * Deliverables must be stated as **findings, gaps, and actionable recommendations**.
14
- * **Single-pass delivery**: no deferrals; deliver a complete assessment.
13
+ * **Review then Act**: identify opportunities, then **implement improvements directly**. Don't just report — build.
14
+ * **Single-pass delivery**: no deferrals; deliver complete implementation.
15
15
  * **This review IS exploration** — think broadly and creatively about what could be.
16
16
 
17
17
  ## Tech Stack
@@ -10,8 +10,8 @@ agent: coder
10
10
 
11
11
  * Perform a **deep, thorough review** of growth systems in this codebase.
12
12
  * **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
13
- * Deliverables must be stated as **findings, gaps, and actionable recommendations**.
14
- * **Single-pass delivery**: no deferrals; deliver a complete assessment.
13
+ * **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
14
+ * **Single-pass delivery**: no deferrals; deliver complete implementation.
15
15
  * **Explore beyond the spec**: identify growth opportunities that don't yet exist.
16
16
 
17
17
  ## Tech Stack
@@ -10,8 +10,8 @@ agent: coder
10
10
 
11
11
  * Perform a **deep, thorough review** of internationalization in this codebase.
12
12
  * **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
13
- * Deliverables must be stated as **findings, gaps, and actionable recommendations**.
14
- * **Single-pass delivery**: no deferrals; deliver a complete assessment.
13
+ * **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
14
+ * **Single-pass delivery**: no deferrals; deliver complete implementation.
15
15
  * **Explore beyond the spec**: identify what would make the product feel native to each locale.
16
16
 
17
17
  ## Tech Stack
@@ -24,6 +24,7 @@ agent: coder
24
24
  * `/en/*` must not exist (permanently redirect to non-prefixed)
25
25
  * Missing translation keys must fail build
26
26
  * No hardcoded user-facing strings outside localization
27
+ * Translation bundles must be split by namespace or route (no monolithic language files)
27
28
 
28
29
  ## Context
29
30
 
@@ -39,3 +40,11 @@ Consider: dates, numbers, currency, pluralization, text direction, cultural norm
39
40
  * How painful is the translation workflow for adding new strings?
40
41
  * What locales are we missing that represent real market opportunity?
41
42
  * Where do we fall back to English in ways users would notice?
43
+ * How large are the translation bundles, and what's being sent to the client?
44
+
45
+ ## Bundle Constraints
46
+
47
+ * No monolithic language files — split by namespace (`common`, `auth`, `dashboard`, etc.)
48
+ * Server Components for translations wherever possible — client bundles must not include translations that could stay on server
49
+ * Each route should load only its required namespaces
50
+ * Measure client bundle size impact of translations
@@ -10,8 +10,8 @@ agent: coder
10
10
 
11
11
  * Perform a **deep, thorough review** of any balance/credits/wallet system in this codebase.
12
12
  * **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
13
- * Deliverables must be stated as **findings, gaps, and actionable recommendations**.
14
- * **Single-pass delivery**: no deferrals; deliver a complete assessment.
13
+ * **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
14
+ * **Single-pass delivery**: no deferrals; deliver complete implementation.
15
15
  * **Explore beyond the spec**: identify financial integrity risks before they become real problems.
16
16
 
17
17
  ## Tech Stack
@@ -10,8 +10,8 @@ agent: coder
10
10
 
11
11
  * Perform a **deep, thorough review** of observability in this codebase.
12
12
  * **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
13
- * Deliverables must be stated as **findings, gaps, and actionable recommendations**.
14
- * **Single-pass delivery**: no deferrals; deliver a complete assessment.
13
+ * **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
14
+ * **Single-pass delivery**: no deferrals; deliver complete implementation.
15
15
  * **Explore beyond the spec**: identify the production issues we can't debug today.
16
16
 
17
17
  ## Tech Stack
@@ -10,8 +10,8 @@ agent: coder
10
10
 
11
11
  * Perform a **deep, thorough review** of operability in this codebase.
12
12
  * **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
13
- * Deliverables must be stated as **findings, gaps, and actionable recommendations**.
14
- * **Single-pass delivery**: no deferrals; deliver a complete assessment.
13
+ * **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
14
+ * **Single-pass delivery**: no deferrals; deliver complete implementation.
15
15
  * **Explore beyond the spec**: identify what will break at 3am and how we'd fix it.
16
16
 
17
17
  ## Tech Stack
@@ -10,8 +10,8 @@ agent: coder
10
10
 
11
11
  * Perform a **deep, thorough review** of performance in this codebase.
12
12
  * **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
13
- * Deliverables must be stated as **findings, gaps, and actionable recommendations**.
14
- * **Single-pass delivery**: no deferrals; deliver a complete assessment.
13
+ * **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
14
+ * **Single-pass delivery**: no deferrals; deliver complete implementation.
15
15
  * **Explore beyond the spec**: identify what's making the product feel slow.
16
16
 
17
17
  ## Tech Stack
@@ -10,8 +10,8 @@ agent: coder
10
10
 
11
11
  * Perform a **deep, thorough review** of pricing in this codebase.
12
12
  * **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
13
- * Deliverables must be stated as **findings, gaps, and actionable recommendations**.
14
- * **Single-pass delivery**: no deferrals; deliver a complete assessment.
13
+ * **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
14
+ * **Single-pass delivery**: no deferrals; deliver complete implementation.
15
15
  * **Explore beyond the spec**: identify monetization opportunities and pricing friction.
16
16
 
17
17
  ## Tech Stack
@@ -10,8 +10,8 @@ agent: coder
10
10
 
11
11
  * Perform a **deep, thorough review** of privacy controls in this codebase.
12
12
  * **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
13
- * Deliverables must be stated as **findings, gaps, and actionable recommendations**.
14
- * **Single-pass delivery**: no deferrals; deliver a complete assessment.
13
+ * **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
14
+ * **Single-pass delivery**: no deferrals; deliver complete implementation.
15
15
  * **Explore beyond the spec**: identify compliance gaps and privacy improvements.
16
16
 
17
17
  ## Tech Stack
@@ -10,8 +10,8 @@ agent: coder
10
10
 
11
11
  * Perform a **deep, thorough review** of PWA implementation in this codebase.
12
12
  * **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
13
- * Deliverables must be stated as **findings, gaps, and actionable recommendations**.
14
- * **Single-pass delivery**: no deferrals; deliver a complete assessment.
13
+ * **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
14
+ * **Single-pass delivery**: no deferrals; deliver complete implementation.
15
15
  * **Explore beyond the spec**: identify what would make the web experience feel native.
16
16
 
17
17
  ## Tech Stack
@@ -10,8 +10,8 @@ agent: coder
10
10
 
11
11
  * Perform a **deep, thorough review** of the referral system in this codebase.
12
12
  * **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
13
- * Deliverables must be stated as **findings, gaps, and actionable recommendations**.
14
- * **Single-pass delivery**: no deferrals; deliver a complete assessment.
13
+ * **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
14
+ * **Single-pass delivery**: no deferrals; deliver complete implementation.
15
15
  * **Explore beyond the spec**: identify growth opportunities and fraud vectors.
16
16
 
17
17
  ## Tech Stack
@@ -10,8 +10,8 @@ agent: coder
10
10
 
11
11
  * Perform a **deep, thorough review** of security in this codebase.
12
12
  * **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
13
- * Deliverables must be stated as **findings, gaps, and actionable recommendations**.
14
- * **Single-pass delivery**: no deferrals; deliver a complete assessment.
13
+ * **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
14
+ * **Single-pass delivery**: no deferrals; deliver complete implementation.
15
15
  * **Explore beyond the spec**: identify vulnerabilities and hardening opportunities not listed here.
16
16
 
17
17
  ## Tech Stack
@@ -10,8 +10,8 @@ agent: coder
10
10
 
11
11
  * Perform a **deep, thorough review** of SEO in this codebase.
12
12
  * **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
13
- * Deliverables must be stated as **findings, gaps, and actionable recommendations**.
14
- * **Single-pass delivery**: no deferrals; deliver a complete assessment.
13
+ * **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
14
+ * **Single-pass delivery**: no deferrals; deliver complete implementation.
15
15
  * **Explore beyond the spec**: identify what would make this product dominate search results.
16
16
 
17
17
  ## Tech Stack
@@ -10,8 +10,8 @@ agent: coder
10
10
 
11
11
  * Perform a **deep, thorough review** of file storage and uploads in this codebase.
12
12
  * **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
13
- * Deliverables must be stated as **findings, gaps, and actionable recommendations**.
14
- * **Single-pass delivery**: no deferrals; deliver a complete assessment.
13
+ * **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
14
+ * **Single-pass delivery**: no deferrals; deliver complete implementation.
15
15
  * **Explore beyond the spec**: identify security risks and cost optimization opportunities.
16
16
 
17
17
  ## Tech Stack
@@ -10,8 +10,8 @@ agent: coder
10
10
 
11
11
  * Perform a **deep, thorough review** of support and communications in this codebase.
12
12
  * **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
13
- * Deliverables must be stated as **findings, gaps, and actionable recommendations**.
14
- * **Single-pass delivery**: no deferrals; deliver a complete assessment.
13
+ * **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
14
+ * **Single-pass delivery**: no deferrals; deliver complete implementation.
15
15
  * **Explore beyond the spec**: identify what would make users feel genuinely supported.
16
16
 
17
17
  ## Tech Stack
@@ -10,8 +10,8 @@ agent: coder
10
10
 
11
11
  * Perform a **deep, thorough review** of trust and safety in this codebase.
12
12
  * **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
13
- * Deliverables must be stated as **findings, gaps, and actionable recommendations**.
14
- * **Single-pass delivery**: no deferrals; deliver a complete assessment.
13
+ * **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
14
+ * **Single-pass delivery**: no deferrals; deliver complete implementation.
15
15
  * **Explore beyond the spec**: identify abuse vectors before bad actors find them.
16
16
 
17
17
  ## Tech Stack
@@ -10,8 +10,8 @@ agent: coder
10
10
 
11
11
  * Perform a **deep, thorough review** of UI/UX in this codebase.
12
12
  * **Delegate to multiple workers** to research different aspects in parallel; you act as the **final gate** to synthesize and verify quality.
13
- * Deliverables must be stated as **findings, gaps, and actionable recommendations**.
14
- * **Single-pass delivery**: no deferrals; deliver a complete assessment.
13
+ * **Review then Act**: identify issues, then **implement fixes directly**. Don't just report — fix.
14
+ * **Single-pass delivery**: no deferrals; deliver complete implementation.
15
15
  * **Explore beyond the spec**: if the current design needs fundamental rethinking, propose it.
16
16
 
17
17
  ## Tech Stack
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sylphx/flow",
3
- "version": "2.13.0",
3
+ "version": "2.14.1",
4
4
  "description": "One CLI to rule them all. Unified orchestration layer for Claude Code, OpenCode, Cursor and all AI development tools. Auto-detection, auto-installation, auto-upgrade.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -18,9 +18,23 @@ import { failure, success, tryCatch } from '../../core/functional/result.js';
18
18
  * Claude Code settings structure
19
19
  */
20
20
  export interface ClaudeCodeSettings {
21
+ /** Environment variables for Claude Code */
22
+ env?: {
23
+ CLAUDE_CODE_MAX_OUTPUT_TOKENS?: string;
24
+ [key: string]: string | undefined;
25
+ };
26
+ /** Attribution settings (empty strings to hide) */
27
+ attribution?: {
28
+ commit?: string;
29
+ pr?: string;
30
+ };
31
+ /** Enable extended thinking mode */
32
+ alwaysThinkingEnabled?: boolean;
33
+ /** Hook configurations */
21
34
  hooks?: Record<
22
35
  string,
23
36
  Array<{
37
+ matcher?: string;
24
38
  hooks: Array<{
25
39
  type: string;
26
40
  command: string;
@@ -30,6 +44,20 @@ export interface ClaudeCodeSettings {
30
44
  [key: string]: unknown;
31
45
  }
32
46
 
47
+ /**
48
+ * Default Claude Code settings for optimal experience
49
+ */
50
+ export const DEFAULT_CLAUDE_CODE_SETTINGS: Partial<ClaudeCodeSettings> = {
51
+ env: {
52
+ CLAUDE_CODE_MAX_OUTPUT_TOKENS: '128000',
53
+ },
54
+ attribution: {
55
+ commit: '',
56
+ pr: '',
57
+ },
58
+ alwaysThinkingEnabled: true,
59
+ };
60
+
33
61
  export interface HookConfig {
34
62
  notificationCommand?: string;
35
63
  }
@@ -89,7 +117,8 @@ export const buildHookConfiguration = (
89
117
  };
90
118
 
91
119
  /**
92
- * Merge settings with new hooks (pure)
120
+ * Merge settings with defaults and new hooks (pure)
121
+ * Preserves existing values while adding missing defaults
93
122
  */
94
123
  export const mergeSettings = (
95
124
  existingSettings: ClaudeCodeSettings,
@@ -98,7 +127,20 @@ export const mergeSettings = (
98
127
  const newHooks = buildHookConfiguration(hookConfig);
99
128
 
100
129
  return {
130
+ // Apply defaults first, then existing settings override
131
+ ...DEFAULT_CLAUDE_CODE_SETTINGS,
101
132
  ...existingSettings,
133
+ // Deep merge env variables
134
+ env: {
135
+ ...DEFAULT_CLAUDE_CODE_SETTINGS.env,
136
+ ...(existingSettings.env || {}),
137
+ },
138
+ // Deep merge attribution
139
+ attribution: {
140
+ ...DEFAULT_CLAUDE_CODE_SETTINGS.attribution,
141
+ ...(existingSettings.attribution || {}),
142
+ },
143
+ // Merge hooks
102
144
  hooks: {
103
145
  ...(existingSettings.hooks || {}),
104
146
  ...newHooks,
@@ -107,10 +149,12 @@ export const mergeSettings = (
107
149
  };
108
150
 
109
151
  /**
110
- * Create settings with hooks (pure)
152
+ * Create settings with defaults and hooks (pure)
153
+ * Includes optimal Claude Code settings for extended output, thinking mode, and clean attribution
111
154
  */
112
155
  export const createSettings = (hookConfig: HookConfig = DEFAULT_HOOKS): ClaudeCodeSettings => {
113
156
  return {
157
+ ...DEFAULT_CLAUDE_CODE_SETTINGS,
114
158
  hooks: buildHookConfiguration(hookConfig),
115
159
  };
116
160
  };