@codedrifters/configulator 0.0.153 → 0.0.155

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.
package/lib/index.d.mts CHANGED
@@ -1,14 +1,742 @@
1
- import { Component, Project, typescript } from 'projen';
1
+ import { Component, Project as Project$1, typescript } from 'projen';
2
+ import { Project, Component as Component$1, Task } from 'projen/lib';
2
3
  import { AwsCdkTypeScriptApp } from 'projen/lib/awscdk';
3
4
  import { AwsStageType, DeploymentTargetRoleType, AwsEnvironmentType, AWS_STAGE_TYPE } from '@codedrifters/utils';
4
5
  import * as spec from '@jsii/spec';
5
6
  import { TypeScriptProject as TypeScriptProject$1, TypeScriptAppProject, TypeScriptProjectOptions as TypeScriptProjectOptions$1 } from 'projen/lib/typescript';
6
7
  import { ValueOf } from 'type-fest';
7
- import { Component as Component$1, Project as Project$1, Task } from 'projen/lib';
8
8
  import { BuildWorkflowOptions, BuildWorkflow } from 'projen/lib/build';
9
9
  import { NodeProject } from 'projen/lib/javascript';
10
10
  import { JobStep } from 'projen/lib/github/workflows-model';
11
11
 
12
+ /**
13
+ * Defines the scope/activation model for an agent rule.
14
+ * - ALWAYS: Rule is always active regardless of context
15
+ * - FILE_PATTERN: Rule activates when the AI is working on files matching the patterns
16
+ */
17
+ declare const AGENT_RULE_SCOPE: {
18
+ readonly ALWAYS: "always";
19
+ readonly FILE_PATTERN: "file-pattern";
20
+ };
21
+ type AgentRuleScope = (typeof AGENT_RULE_SCOPE)[keyof typeof AGENT_RULE_SCOPE];
22
+ /**
23
+ * Supported AI coding assistant platforms.
24
+ */
25
+ declare const AGENT_PLATFORM: {
26
+ readonly CURSOR: "cursor";
27
+ readonly CLAUDE: "claude";
28
+ readonly CODEX: "codex";
29
+ readonly COPILOT: "copilot";
30
+ };
31
+ type AgentPlatform = (typeof AGENT_PLATFORM)[keyof typeof AGENT_PLATFORM];
32
+ /**
33
+ * Render target for Claude Code rules.
34
+ * - SCOPED_FILE: .claude/rules/{name}.md (default — supports paths frontmatter for conditional activation)
35
+ * - AGENTS_MD: AGENTS.md (always-active, shared with Codex)
36
+ * - CLAUDE_MD: CLAUDE.md (always-active, Claude-only content not consumed by other agents)
37
+ */
38
+ declare const CLAUDE_RULE_TARGET: {
39
+ readonly SCOPED_FILE: "scoped-file";
40
+ readonly AGENTS_MD: "agents-md";
41
+ readonly CLAUDE_MD: "claude-md";
42
+ };
43
+ type ClaudeRuleTarget = (typeof CLAUDE_RULE_TARGET)[keyof typeof CLAUDE_RULE_TARGET];
44
+ /**
45
+ * Model selection for sub-agents. Platforms map these to their own model identifiers.
46
+ */
47
+ declare const AGENT_MODEL: {
48
+ readonly INHERIT: "inherit";
49
+ readonly FAST: "fast";
50
+ readonly BALANCED: "balanced";
51
+ readonly POWERFUL: "powerful";
52
+ };
53
+ type AgentModel = (typeof AGENT_MODEL)[keyof typeof AGENT_MODEL];
54
+ /**
55
+ * MCP server transport type.
56
+ */
57
+ declare const MCP_TRANSPORT: {
58
+ readonly STDIO: "stdio";
59
+ readonly HTTP: "http";
60
+ readonly SSE: "sse";
61
+ };
62
+ type McpTransport = (typeof MCP_TRANSPORT)[keyof typeof MCP_TRANSPORT];
63
+ /**
64
+ * Platform-specific overrides for a rule.
65
+ */
66
+ interface AgentPlatformOverrides {
67
+ /** Cursor-specific overrides */
68
+ readonly cursor?: {
69
+ /** Override the description used in Cursor's YAML frontmatter */
70
+ readonly description?: string;
71
+ /** Exclude this rule from Cursor output entirely */
72
+ readonly exclude?: boolean;
73
+ };
74
+ /** Claude Code-specific overrides */
75
+ readonly claude?: {
76
+ /**
77
+ * Where to render this rule for Claude Code.
78
+ * - SCOPED_FILE: .claude/rules/{name}.md (default — supports paths frontmatter)
79
+ * - AGENTS_MD: AGENTS.md (always-active, shared with Codex)
80
+ * - CLAUDE_MD: CLAUDE.md (always-active, Claude-only)
81
+ */
82
+ readonly target?: ClaudeRuleTarget;
83
+ /** Exclude this rule from Claude Code output entirely */
84
+ readonly exclude?: boolean;
85
+ };
86
+ /** Codex-specific overrides (future) */
87
+ readonly codex?: {
88
+ /** Place this rule in a sub-directory AGENTS.md instead of root */
89
+ readonly directory?: string;
90
+ /** Exclude this rule from Codex output entirely */
91
+ readonly exclude?: boolean;
92
+ };
93
+ /** Copilot-specific overrides (future) */
94
+ readonly copilot?: {
95
+ /** Exclude this rule from Copilot output entirely */
96
+ readonly exclude?: boolean;
97
+ };
98
+ }
99
+ /**
100
+ * A single agent rule definition, platform-agnostic.
101
+ */
102
+ interface AgentRule {
103
+ /**
104
+ * Unique identifier for the rule. Used as the filename stem in platforms
105
+ * that use per-rule files (Cursor, Claude Code, Copilot).
106
+ * @example 'typescript-conventions'
107
+ */
108
+ readonly name: string;
109
+ /**
110
+ * Human-readable description of the rule's purpose.
111
+ * Used by Cursor for AI-assisted rule selection.
112
+ * @example 'TypeScript project patterns and conventions'
113
+ */
114
+ readonly description: string;
115
+ /**
116
+ * Activation scope for this rule.
117
+ * - AGENT_RULE_SCOPE.ALWAYS: Active in all contexts
118
+ * - AGENT_RULE_SCOPE.FILE_PATTERN: Active only when working on matching files
119
+ */
120
+ readonly scope: AgentRuleScope;
121
+ /**
122
+ * Glob patterns for conditional activation.
123
+ * Required when scope is AGENT_RULE_SCOPE.FILE_PATTERN.
124
+ * @example ['src/**\/*.ts', 'tests/**\/*.ts']
125
+ */
126
+ readonly filePatterns?: ReadonlyArray<string>;
127
+ /**
128
+ * The rule content as markdown. This is the platform-agnostic body
129
+ * that applies equally to all AI assistants.
130
+ */
131
+ readonly content: string;
132
+ /**
133
+ * Optional per-platform overrides. Use sparingly — prefer platform-agnostic content.
134
+ */
135
+ readonly platforms?: AgentPlatformOverrides;
136
+ /**
137
+ * Optional tags for categorizing and ordering rules.
138
+ * Rules are ordered by tag (alphabetical), then by name within each tag.
139
+ * @example ['typescript', 'testing', 'workflow']
140
+ */
141
+ readonly tags?: ReadonlyArray<string>;
142
+ }
143
+ /**
144
+ * A skill definition following the cross-platform Agent Skills specification.
145
+ * Rendered to .claude/skills/ (Claude Code) and .cursor/skills/ (Cursor).
146
+ */
147
+ interface AgentSkill {
148
+ /**
149
+ * Unique identifier for the skill. Becomes the /slash-command name.
150
+ * @example 'commit'
151
+ */
152
+ readonly name: string;
153
+ /**
154
+ * Human-readable description. Claude uses this to decide when to auto-invoke.
155
+ */
156
+ readonly description: string;
157
+ /**
158
+ * Multi-line instruction content (markdown). Becomes the SKILL.md body.
159
+ */
160
+ readonly instructions: string;
161
+ /**
162
+ * Optional tool allowlist for this skill.
163
+ * @example ['Read', 'Bash(npm run *)']
164
+ */
165
+ readonly allowedTools?: ReadonlyArray<string>;
166
+ /**
167
+ * Whether to prevent auto-invocation of this skill.
168
+ * When true, only triggered by the user typing /skill-name.
169
+ * @default false
170
+ */
171
+ readonly disableModelInvocation?: boolean;
172
+ /**
173
+ * Whether the user can invoke this skill directly via /skill-name.
174
+ * Set to false for background skills that should not appear in the / menu.
175
+ * @default true
176
+ */
177
+ readonly userInvocable?: boolean;
178
+ /**
179
+ * Model override when this skill is active.
180
+ * @example 'claude-opus-4-6'
181
+ */
182
+ readonly model?: string;
183
+ /**
184
+ * Reasoning effort level when this skill is active.
185
+ * @example 'high'
186
+ */
187
+ readonly effort?: string;
188
+ /**
189
+ * Glob patterns that limit when the skill is auto-loaded.
190
+ * @example ['src/api/**\/*.ts']
191
+ */
192
+ readonly paths?: ReadonlyArray<string>;
193
+ }
194
+ /**
195
+ * Platform-specific overrides for a sub-agent definition.
196
+ */
197
+ interface AgentSubAgentPlatformOverrides {
198
+ /** Claude Code-specific overrides */
199
+ readonly claude?: {
200
+ /** Permission mode: default, acceptEdits, dontAsk, bypassPermissions, plan */
201
+ readonly permissionMode?: string;
202
+ /** Run in isolated git worktree */
203
+ readonly isolation?: string;
204
+ /** Reasoning effort level */
205
+ readonly effort?: string;
206
+ /** Exclude this sub-agent from Claude Code output entirely */
207
+ readonly exclude?: boolean;
208
+ };
209
+ /** Cursor-specific overrides */
210
+ readonly cursor?: {
211
+ /** Restrict the sub-agent to read-only operations */
212
+ readonly readonly?: boolean;
213
+ /** Run the sub-agent asynchronously as a background task */
214
+ readonly isBackground?: boolean;
215
+ /** Exclude this sub-agent from Cursor output entirely */
216
+ readonly exclude?: boolean;
217
+ };
218
+ /** Codex-specific overrides (future) */
219
+ readonly codex?: {
220
+ /** Exclude this sub-agent from Codex output entirely */
221
+ readonly exclude?: boolean;
222
+ };
223
+ /** Copilot-specific overrides (future) */
224
+ readonly copilot?: {
225
+ /** Exclude this sub-agent from Copilot output entirely */
226
+ readonly exclude?: boolean;
227
+ };
228
+ }
229
+ /**
230
+ * A custom sub-agent definition, platform-agnostic.
231
+ * Rendered to .cursor/agents/ (Cursor), .claude/agents/ (Claude Code).
232
+ */
233
+ interface AgentSubAgent {
234
+ /**
235
+ * Unique identifier for the sub-agent. Used as the filename stem.
236
+ * Must be lowercase letters and hyphens only.
237
+ * @example 'code-reviewer'
238
+ */
239
+ readonly name: string;
240
+ /** Human-readable description. Used by the parent agent to decide when to delegate. */
241
+ readonly description: string;
242
+ /**
243
+ * System prompt / instructions for the sub-agent (markdown).
244
+ * This becomes the body of the generated agent file.
245
+ */
246
+ readonly prompt: string;
247
+ /**
248
+ * Model selection for this sub-agent.
249
+ * @default AGENT_MODEL.INHERIT
250
+ */
251
+ readonly model?: AgentModel;
252
+ /**
253
+ * Tool allowlist. When omitted, inherits all tools from parent.
254
+ * @example ['Read', 'Glob', 'Grep']
255
+ */
256
+ readonly tools?: ReadonlyArray<string>;
257
+ /** Maximum agentic turns before the sub-agent stops. */
258
+ readonly maxTurns?: number;
259
+ /** Optional per-platform overrides for this sub-agent. */
260
+ readonly platforms?: AgentSubAgentPlatformOverrides;
261
+ }
262
+ /**
263
+ * MCP server configuration. Cross-platform — rendered to .claude/settings.json
264
+ * (Claude Code) and .cursor/mcp.json (Cursor).
265
+ */
266
+ interface McpServerConfig {
267
+ /**
268
+ * Transport type for the server connection.
269
+ * @default MCP_TRANSPORT.STDIO
270
+ */
271
+ readonly transport?: McpTransport;
272
+ /** Command to launch a stdio server. */
273
+ readonly command?: string;
274
+ /** Command arguments for stdio server. */
275
+ readonly args?: ReadonlyArray<string>;
276
+ /** URL for HTTP/SSE remote servers. */
277
+ readonly url?: string;
278
+ /** Environment variables for the server process. */
279
+ readonly env?: Readonly<Record<string, string>>;
280
+ }
281
+
282
+ /*******************************************************************************
283
+ *
284
+ * Agent Rule Bundle
285
+ *
286
+ ******************************************************************************/
287
+ /**
288
+ * A context-aware bundle of rules and/or skills that ships with configulator.
289
+ * Bundles are automatically selected based on project introspection (e.g.,
290
+ * which components are present, which libraries are in use).
291
+ */
292
+ interface AgentRuleBundle {
293
+ /**
294
+ * Unique identifier for the bundle.
295
+ * @example 'vitest', 'turborepo', 'pnpm-monorepo', 'aws-cdk'
296
+ */
297
+ readonly name: string;
298
+ /**
299
+ * Human-readable description of when this bundle applies.
300
+ * @example 'Rules for projects using Vitest as their test runner'
301
+ */
302
+ readonly description: string;
303
+ /**
304
+ * Function that inspects the Projen project and returns true if this
305
+ * bundle should be automatically included. Receives the root project
306
+ * as input and can check for sibling components, dependencies, etc.
307
+ * @example (project) => Vitest.of(project) !== undefined
308
+ */
309
+ readonly appliesWhen: (project: Project) => boolean;
310
+ /** Rules included in this bundle. */
311
+ readonly rules: ReadonlyArray<AgentRule>;
312
+ /** Skills included in this bundle (cross-platform where supported). */
313
+ readonly skills?: ReadonlyArray<AgentSkill>;
314
+ /** Sub-agents included in this bundle. */
315
+ readonly subAgents?: ReadonlyArray<AgentSubAgent>;
316
+ }
317
+ /*******************************************************************************
318
+ *
319
+ * Claude Code Settings
320
+ *
321
+ ******************************************************************************/
322
+ /**
323
+ * A single Cursor hook action.
324
+ */
325
+ interface CursorHookAction {
326
+ /** Shell command to execute. */
327
+ readonly command: string;
328
+ }
329
+ /**
330
+ * Cursor hook lifecycle events. Each event takes an array of hook actions.
331
+ *
332
+ * Cursor hooks use a different model than Claude Code hooks:
333
+ * - Blocking hooks can return permission decisions to block actions
334
+ * - Non-blocking hooks are informational only
335
+ */
336
+ interface CursorHooksConfig {
337
+ /**
338
+ * Fires before a user prompt is submitted. Non-blocking (informational).
339
+ */
340
+ readonly beforeSubmitPrompt?: ReadonlyArray<CursorHookAction>;
341
+ /**
342
+ * Fires before a shell command executes. Blocking — can deny execution.
343
+ */
344
+ readonly beforeShellExecution?: ReadonlyArray<CursorHookAction>;
345
+ /**
346
+ * Fires before an MCP tool is invoked. Blocking — can deny execution.
347
+ */
348
+ readonly beforeMCPExecution?: ReadonlyArray<CursorHookAction>;
349
+ /**
350
+ * Fires before a file is read by the AI. Blocking — can rewrite content.
351
+ */
352
+ readonly beforeReadFile?: ReadonlyArray<CursorHookAction>;
353
+ /**
354
+ * Fires after a file is edited. Non-blocking (informational).
355
+ */
356
+ readonly afterFileEdit?: ReadonlyArray<CursorHookAction>;
357
+ /**
358
+ * Fires when the agent stops. Non-blocking (informational).
359
+ */
360
+ readonly stop?: ReadonlyArray<CursorHookAction>;
361
+ }
362
+ /**
363
+ * Cursor-specific configuration options.
364
+ * Cursor does not support a project-level settings.json — its AI settings
365
+ * are stored in an internal SQLite database. However, it does support
366
+ * project-level hooks (.cursor/hooks.json) and ignore files.
367
+ */
368
+ interface CursorSettingsConfig {
369
+ /**
370
+ * Lifecycle hooks for Cursor's agent. Generated to .cursor/hooks.json.
371
+ */
372
+ readonly hooks?: CursorHooksConfig;
373
+ /**
374
+ * Patterns for .cursorignore — files completely invisible to Cursor.
375
+ * This is a hard security boundary: matched files are not indexed,
376
+ * not readable by AI, and not included in any context.
377
+ * Uses .gitignore syntax.
378
+ * @example ['**\/.env', '**\/secrets/**', 'dist/']
379
+ */
380
+ readonly ignorePatterns?: ReadonlyArray<string>;
381
+ /**
382
+ * Patterns for .cursorindexingignore — files excluded from codebase
383
+ * indexing but still accessible to AI if referenced directly.
384
+ * Uses .gitignore syntax.
385
+ * @example ['**\/generated/**', '**\/vendor/**', '*.min.js']
386
+ */
387
+ readonly indexingIgnorePatterns?: ReadonlyArray<string>;
388
+ }
389
+ /**
390
+ * Permission rule syntax supports fine-grained patterns:
391
+ * - Tool name: "Bash", "Read", "Edit", "WebFetch"
392
+ * - With args: "Bash(npm run *)", "Bash(git * main)"
393
+ * - File paths: "Edit(/src/**\/*.ts)"
394
+ * - MCP tools: "mcp__puppeteer__puppeteer_navigate"
395
+ */
396
+ interface ClaudePermissionsConfig {
397
+ /** Tools auto-approved without prompts. */
398
+ readonly allow?: ReadonlyArray<string>;
399
+ /** Tools completely blocked. */
400
+ readonly deny?: ReadonlyArray<string>;
401
+ /** Tools that always prompt (overrides allow). */
402
+ readonly ask?: ReadonlyArray<string>;
403
+ /** Additional directories Claude can access beyond the project root. */
404
+ readonly additionalDirectories?: ReadonlyArray<string>;
405
+ }
406
+ /**
407
+ * A single hook action. Supports four types: command, http, prompt, agent.
408
+ */
409
+ interface ClaudeHookAction {
410
+ /** Hook type. */
411
+ readonly type: "command" | "http" | "prompt" | "agent";
412
+ /** Shell command to execute (type: 'command'). */
413
+ readonly command?: string;
414
+ /** URL to POST to (type: 'http'). */
415
+ readonly url?: string;
416
+ /** HTTP headers (type: 'http'). */
417
+ readonly headers?: Readonly<Record<string, string>>;
418
+ /** LLM/agent prompt text (type: 'prompt' | 'agent'). */
419
+ readonly prompt?: string;
420
+ /** Model override for prompt hooks (type: 'prompt'). */
421
+ readonly model?: string;
422
+ /** Permission rule filter — only fire when this pattern matches. */
423
+ readonly if?: string;
424
+ /** Timeout in seconds. */
425
+ readonly timeout?: number;
426
+ /** Custom spinner text shown while the hook runs. */
427
+ readonly statusMessage?: string;
428
+ /** Run in background without blocking (type: 'command'). */
429
+ readonly async?: boolean;
430
+ /** Only execute this hook once per session. */
431
+ readonly once?: boolean;
432
+ /** Shell to use (type: 'command'). */
433
+ readonly shell?: string;
434
+ }
435
+ /**
436
+ * Hook definition for Claude Code lifecycle events.
437
+ */
438
+ interface ClaudeHookEntry {
439
+ /**
440
+ * Tool name or regex pattern to match.
441
+ * @example 'Bash', 'Edit|Write', '.*'
442
+ */
443
+ readonly matcher: string;
444
+ /** Array of hook actions to execute when the matcher triggers. */
445
+ readonly hooks: ReadonlyArray<ClaudeHookAction>;
446
+ }
447
+ /**
448
+ * All supported Claude Code hook lifecycle events.
449
+ */
450
+ interface ClaudeHooksConfig {
451
+ readonly PreToolUse?: ReadonlyArray<ClaudeHookEntry>;
452
+ readonly PostToolUse?: ReadonlyArray<ClaudeHookEntry>;
453
+ readonly PostToolUseFailure?: ReadonlyArray<ClaudeHookEntry>;
454
+ readonly PermissionRequest?: ReadonlyArray<ClaudeHookEntry>;
455
+ readonly PermissionDenied?: ReadonlyArray<ClaudeHookEntry>;
456
+ readonly Notification?: ReadonlyArray<ClaudeHookEntry>;
457
+ readonly UserPromptSubmit?: ReadonlyArray<ClaudeHookEntry>;
458
+ readonly Stop?: ReadonlyArray<ClaudeHookEntry>;
459
+ readonly StopFailure?: ReadonlyArray<ClaudeHookEntry>;
460
+ readonly SubagentStart?: ReadonlyArray<ClaudeHookEntry>;
461
+ readonly SubagentStop?: ReadonlyArray<ClaudeHookEntry>;
462
+ readonly TaskCreated?: ReadonlyArray<ClaudeHookEntry>;
463
+ readonly TaskCompleted?: ReadonlyArray<ClaudeHookEntry>;
464
+ readonly TeammateIdle?: ReadonlyArray<ClaudeHookEntry>;
465
+ readonly PreCompact?: ReadonlyArray<ClaudeHookEntry>;
466
+ readonly PostCompact?: ReadonlyArray<ClaudeHookEntry>;
467
+ readonly ConfigChange?: ReadonlyArray<ClaudeHookEntry>;
468
+ readonly WorktreeCreate?: ReadonlyArray<ClaudeHookEntry>;
469
+ readonly WorktreeRemove?: ReadonlyArray<ClaudeHookEntry>;
470
+ readonly SessionStart?: ReadonlyArray<ClaudeHookEntry>;
471
+ readonly SessionEnd?: ReadonlyArray<ClaudeHookEntry>;
472
+ readonly Elicitation?: ReadonlyArray<ClaudeHookEntry>;
473
+ readonly ElicitationResult?: ReadonlyArray<ClaudeHookEntry>;
474
+ readonly InstructionsLoaded?: ReadonlyArray<ClaudeHookEntry>;
475
+ readonly FileChanged?: ReadonlyArray<ClaudeHookEntry>;
476
+ readonly CwdChanged?: ReadonlyArray<ClaudeHookEntry>;
477
+ }
478
+ /**
479
+ * Sandbox configuration for Claude Code. Controls filesystem, network,
480
+ * and execution restrictions.
481
+ */
482
+ interface ClaudeSandboxConfig {
483
+ /** Enable sandboxing. */
484
+ readonly enabled?: boolean;
485
+ /**
486
+ * Sandbox mode.
487
+ * - 'auto-allow': Auto-approve Bash commands when sandboxed
488
+ * - 'regular-permissions': Use normal permission prompts even when sandboxed
489
+ */
490
+ readonly mode?: string;
491
+ /** Fail if sandbox cannot be initialized. */
492
+ readonly failIfUnavailable?: boolean;
493
+ /** Auto-allow Bash commands when sandboxed. */
494
+ readonly autoAllowBashIfSandboxed?: boolean;
495
+ /** Commands excluded from sandbox. */
496
+ readonly excludedCommands?: ReadonlyArray<string>;
497
+ /** Filesystem access restrictions. */
498
+ readonly filesystem?: {
499
+ readonly allowRead?: ReadonlyArray<string>;
500
+ readonly denyRead?: ReadonlyArray<string>;
501
+ readonly allowWrite?: ReadonlyArray<string>;
502
+ readonly denyWrite?: ReadonlyArray<string>;
503
+ };
504
+ /** Network access restrictions. */
505
+ readonly network?: {
506
+ readonly allowedDomains?: ReadonlyArray<string>;
507
+ readonly denyDomains?: ReadonlyArray<string>;
508
+ };
509
+ }
510
+ /**
511
+ * Auto mode configuration. Provides context to Claude's permission
512
+ * classifier for more intelligent auto-approval decisions.
513
+ */
514
+ interface ClaudeAutoModeConfig {
515
+ /** Environmental context strings about the organization/project. */
516
+ readonly environment?: ReadonlyArray<string>;
517
+ /** Actions explicitly allowed with reasoning. */
518
+ readonly allow?: ReadonlyArray<string>;
519
+ /** Actions soft-denied with reasoning. */
520
+ readonly soft_deny?: ReadonlyArray<string>;
521
+ }
522
+ /**
523
+ * Full Claude Code settings.json configuration.
524
+ * Maps to the project-level .claude/settings.json file.
525
+ */
526
+ interface ClaudeSettingsConfig {
527
+ /**
528
+ * Default permission mode for the project.
529
+ * @example 'default', 'acceptEdits', 'plan', 'auto'
530
+ */
531
+ readonly defaultMode?: string;
532
+ /** Permission rules (allow, deny, ask, additionalDirectories). */
533
+ readonly permissions?: ClaudePermissionsConfig;
534
+ /** Lifecycle hooks. */
535
+ readonly hooks?: ClaudeHooksConfig;
536
+ /** MCP server configurations for .claude/settings.json. */
537
+ readonly mcpServers?: Readonly<Record<string, McpServerConfig>>;
538
+ /** MCP servers to explicitly allow. */
539
+ readonly allowedMcpServers?: ReadonlyArray<string>;
540
+ /** Environment variables passed to Claude's shell. */
541
+ readonly env?: Readonly<Record<string, string>>;
542
+ /** Sandbox configuration. */
543
+ readonly sandbox?: ClaudeSandboxConfig;
544
+ /** Auto mode configuration. */
545
+ readonly autoMode?: ClaudeAutoModeConfig;
546
+ /** Set to "disable" to prevent use of bypassPermissions mode. */
547
+ readonly disableBypassPermissionsMode?: string;
548
+ /** Set to "disable" to prevent use of auto mode. */
549
+ readonly disableAutoMode?: string;
550
+ /** Disable all hooks (project and user-level). */
551
+ readonly disableAllHooks?: boolean;
552
+ /**
553
+ * Glob patterns for sensitive files to exclude from suggestions.
554
+ * @example ['**\/.env', '**\/*.key', '**\/secrets/**']
555
+ */
556
+ readonly excludeSensitivePatterns?: ReadonlyArray<string>;
557
+ /** Attribution configuration for commits and PRs created by Claude. */
558
+ readonly attribution?: {
559
+ /** Attribution mode: 'inherit', 'always', 'never'. */
560
+ readonly mode?: string;
561
+ /** Commit author details. */
562
+ readonly commits?: {
563
+ readonly author?: string;
564
+ readonly email?: string;
565
+ };
566
+ };
567
+ }
568
+ /*******************************************************************************
569
+ *
570
+ * AgentConfig Options
571
+ *
572
+ ******************************************************************************/
573
+ /**
574
+ * Options for the AgentConfig component.
575
+ */
576
+ interface AgentConfigOptions {
577
+ /**
578
+ * Target platforms to generate configuration for.
579
+ * @default [AGENT_PLATFORM.CURSOR, AGENT_PLATFORM.CLAUDE]
580
+ */
581
+ readonly platforms?: ReadonlyArray<AgentPlatform>;
582
+ /**
583
+ * Additional agent rules to generate alongside auto-detected and bundled rules.
584
+ * Custom rules override bundled rules of the same name.
585
+ */
586
+ readonly rules?: ReadonlyArray<AgentRule>;
587
+ /**
588
+ * Additional skills to generate.
589
+ */
590
+ readonly skills?: ReadonlyArray<AgentSkill>;
591
+ /**
592
+ * Custom sub-agent definitions.
593
+ */
594
+ readonly subAgents?: ReadonlyArray<AgentSubAgent>;
595
+ /**
596
+ * MCP server configurations. Cross-platform — rendered to the appropriate
597
+ * config file for each platform.
598
+ */
599
+ readonly mcpServers?: Readonly<Record<string, McpServerConfig>>;
600
+ /**
601
+ * Whether to automatically detect and include context-aware rule bundles
602
+ * based on project introspection.
603
+ * @default true
604
+ */
605
+ readonly autoDetectBundles?: boolean;
606
+ /**
607
+ * Explicit list of bundle names to include, regardless of auto-detection.
608
+ * @example ['vitest', 'aws-cdk']
609
+ */
610
+ readonly includeBundles?: ReadonlyArray<string>;
611
+ /**
612
+ * Bundle names to exclude even if auto-detection would include them.
613
+ * @example ['jest']
614
+ */
615
+ readonly excludeBundles?: ReadonlyArray<string>;
616
+ /**
617
+ * Whether to include the base rule set (project-overview, general conventions).
618
+ * @default true
619
+ */
620
+ readonly includeBaseRules?: boolean;
621
+ /**
622
+ * Names of individual rules to exclude from any source.
623
+ */
624
+ readonly excludeRules?: ReadonlyArray<string>;
625
+ /**
626
+ * Additional content to append to existing rules (from bundles or custom rules).
627
+ * Keys are rule names, values are markdown content appended after a horizontal rule.
628
+ * Use this to supplement bundle rules with project-specific additions without
629
+ * replacing the entire rule.
630
+ *
631
+ * @example
632
+ * ```ts
633
+ * ruleExtensions: {
634
+ * 'typescript-conventions': '## Additional Conventions\n\n- Use branded types for IDs',
635
+ * }
636
+ * ```
637
+ */
638
+ readonly ruleExtensions?: Readonly<Record<string, string>>;
639
+ /**
640
+ * Claude Code settings.json configuration.
641
+ * Generated to .claude/settings.json (committed, team-shared).
642
+ */
643
+ readonly claudeSettings?: ClaudeSettingsConfig;
644
+ /**
645
+ * Cursor-specific configuration. Generates .cursor/hooks.json for
646
+ * lifecycle hooks and .cursorignore / .cursorindexingignore for
647
+ * file visibility control.
648
+ */
649
+ readonly cursorSettings?: CursorSettingsConfig;
650
+ }
651
+
652
+ /**
653
+ * Generates AI coding assistant configuration files from a common schema.
654
+ *
655
+ * Supports Cursor and Claude Code (initial release), with Codex and Copilot
656
+ * renderers planned for future issues. Rules, skills, and sub-agents are
657
+ * defined once and rendered into the correct format for each target platform.
658
+ *
659
+ * Follows the configulator component pattern: extends Component, static .of()
660
+ * factory, options interface with JSDoc.
661
+ *
662
+ * @example
663
+ * ```ts
664
+ * new AgentConfig(project, {
665
+ * rules: [{
666
+ * name: 'my-rule',
667
+ * description: 'Project conventions',
668
+ * scope: AGENT_RULE_SCOPE.ALWAYS,
669
+ * content: '# My Rule\n\nFollow these conventions...',
670
+ * }],
671
+ * });
672
+ * ```
673
+ */
674
+ declare class AgentConfig extends Component {
675
+ /**
676
+ * Find the AgentConfig component on a project.
677
+ */
678
+ static of(project: Project$1): AgentConfig | undefined;
679
+ private readonly options;
680
+ constructor(project: Project$1, options?: AgentConfigOptions);
681
+ preSynthesize(): void;
682
+ private resolvePlatforms;
683
+ private resolveRules;
684
+ private resolveSkills;
685
+ private resolveSubAgents;
686
+ }
687
+
688
+ /**
689
+ * AWS CDK bundle — auto-detected when `aws-cdk-lib` is in dependencies.
690
+ */
691
+ declare const awsCdkBundle: AgentRuleBundle;
692
+
693
+ /**
694
+ * Base bundle — always included unless `includeBaseRules: false`.
695
+ * Contains project-overview, interaction-style, and general-conventions rules.
696
+ */
697
+ declare const baseBundle: AgentRuleBundle;
698
+
699
+ /**
700
+ * Jest bundle — auto-detected when Jest is in dependencies.
701
+ */
702
+ declare const jestBundle: AgentRuleBundle;
703
+
704
+ /**
705
+ * PNPM bundle — auto-detected when the PnpmWorkspace component is present.
706
+ */
707
+ declare const pnpmBundle: AgentRuleBundle;
708
+
709
+ /**
710
+ * Projen bundle — auto-detected when `projen` is in dependencies.
711
+ */
712
+ declare const projenBundle: AgentRuleBundle;
713
+
714
+ /**
715
+ * Turborepo bundle — auto-detected when the TurboRepo component is present.
716
+ */
717
+ declare const turborepoBundle: AgentRuleBundle;
718
+
719
+ /**
720
+ * TypeScript bundle — auto-detected when a tsconfig is present.
721
+ */
722
+ declare const typescriptBundle: AgentRuleBundle;
723
+
724
+ /**
725
+ * Vitest bundle — auto-detected when the Vitest component is present.
726
+ */
727
+ declare const vitestBundle: AgentRuleBundle;
728
+
729
+ /**
730
+ * Built-in rule bundles that ship with configulator.
731
+ * Each bundle is auto-detected based on project introspection.
732
+ *
733
+ * Order matters: base is first so its rules can be overridden by
734
+ * more specific bundles. The base bundle's `appliesWhen` always
735
+ * returns true; it is filtered by the `includeBaseRules` option
736
+ * in AgentConfig.
737
+ */
738
+ declare const BUILT_IN_BUNDLES: ReadonlyArray<AgentRuleBundle>;
739
+
12
740
  /*******************************************************************************
13
741
  *
14
742
  * Git configs for this repo. This venn diagram has a great deal of overlap
@@ -635,7 +1363,7 @@ declare class PnpmWorkspace extends Component {
635
1363
  * @param project
636
1364
  * @returns
637
1365
  */
638
- static of(project: Project): PnpmWorkspace | undefined;
1366
+ static of(project: Project$1): PnpmWorkspace | undefined;
639
1367
  /**
640
1368
  * Filename for the pnpm workspace file.
641
1369
  */
@@ -717,7 +1445,7 @@ declare class PnpmWorkspace extends Component {
717
1445
  [dependencyName: string]: string;
718
1446
  };
719
1447
  };
720
- constructor(project: Project, options?: PnpmWorkspaceOptions);
1448
+ constructor(project: Project$1, options?: PnpmWorkspaceOptions);
721
1449
  }
722
1450
 
723
1451
  /*******************************************************************************
@@ -751,11 +1479,11 @@ interface ResetTaskOptions {
751
1479
  readonly taskName?: string;
752
1480
  }
753
1481
  declare class ResetTask extends Component {
754
- readonly project: Project;
1482
+ readonly project: Project$1;
755
1483
  /**
756
1484
  * Static method to discover reset task in a project.
757
1485
  */
758
- static of(project: Project): ResetTask | undefined;
1486
+ static of(project: Project$1): ResetTask | undefined;
759
1487
  /**
760
1488
  * The output directory to delete (from tsconfig or custom).
761
1489
  */
@@ -768,7 +1496,7 @@ declare class ResetTask extends Component {
768
1496
  * The name of the task that was created.
769
1497
  */
770
1498
  readonly taskName: string;
771
- constructor(project: Project, options?: ResetTaskOptions);
1499
+ constructor(project: Project$1, options?: ResetTaskOptions);
772
1500
  }
773
1501
 
774
1502
  /**
@@ -788,7 +1516,7 @@ interface TurboRepoTaskOptions {
788
1516
  readonly interactive?: boolean;
789
1517
  }
790
1518
  declare class TurboRepoTask extends Component$1 {
791
- readonly project: Project$1;
1519
+ readonly project: Project;
792
1520
  readonly name: string;
793
1521
  dependsOn: Array<string>;
794
1522
  readonly env: Array<string>;
@@ -803,7 +1531,7 @@ declare class TurboRepoTask extends Component$1 {
803
1531
  * Include this task in turbo.json output?
804
1532
  */
805
1533
  isActive: boolean;
806
- constructor(project: Project$1, options: TurboRepoTaskOptions);
1534
+ constructor(project: Project, options: TurboRepoTaskOptions);
807
1535
  taskConfig(): Record<string, any>;
808
1536
  }
809
1537
 
@@ -1005,7 +1733,7 @@ declare class TurboRepo extends Component$1 {
1005
1733
  /**
1006
1734
  * Static method to discovert turbo in a project.
1007
1735
  */
1008
- static of(project: Project$1): TurboRepo | undefined;
1736
+ static of(project: Project): TurboRepo | undefined;
1009
1737
  static buildWorkflowOptions: (remoteCacheOptions: RemoteCacheOptions) => Partial<BuildWorkflowOptions>;
1010
1738
  /**
1011
1739
  * Version of turborepo to use.
@@ -1318,6 +2046,18 @@ interface MonorepoProjectOptions extends Omit<TypeScriptProjectOptions$1, "defau
1318
2046
  * @default true
1319
2047
  */
1320
2048
  readonly configulatorRegistryConsumer?: boolean;
2049
+ /**
2050
+ * Enable AI agent configuration (Cursor, Claude Code rules).
2051
+ * When true, generates rule files at the monorepo root with auto-detected
2052
+ * bundles based on project and subproject introspection.
2053
+ *
2054
+ * @default false
2055
+ */
2056
+ readonly agentConfig?: boolean;
2057
+ /**
2058
+ * Options for the AgentConfig component. Only used when `agentConfig` is true.
2059
+ */
2060
+ readonly agentConfigOptions?: AgentConfigOptions;
1321
2061
  }
1322
2062
  declare class MonorepoProject extends TypeScriptAppProject {
1323
2063
  /**
@@ -1590,4 +2330,4 @@ declare const COMPLETE_JOB_ID = "complete";
1590
2330
  */
1591
2331
  declare function addBuildCompleteJob(buildWorkflow: BuildWorkflow): void;
1592
2332
 
1593
- export { type ApproveMergeUpgradeOptions, type AwsAccount, AwsDeployWorkflow, AwsDeploymentConfig, AwsDeploymentTarget, type AwsDeploymentTargetOptions, type AwsLocalDeploymentConfig, type AwsOrganization, type AwsRegion, COMPLETE_JOB_ID, type CiDeploymentConfig, type ClassTypeOptions, type DeployWorkflowOptions, type GitBranch, type IDependencyResolver, JsiiFaker, MERGE_METHODS, MIMIMUM_RELEASE_AGE, type MergeMethod, MonorepoProject, type MonorepoProjectOptions, PROD_DEPLOY_NAME, PnpmWorkspace, type PnpmWorkspaceOptions, ROOT_CI_TASK_NAME, ROOT_TURBO_TASK_NAME, type RemoteCacheOptions, ResetTask, type ResetTaskOptions, TestRunner, TurboRepo, type TurboRepoOptions, TurboRepoTask, type TurboRepoTaskOptions, TypeScriptConfig, TypeScriptProject, type TypeScriptProjectOptions, VERSION, VERSION_KEYS_SKIP, VERSION_NPM_PACKAGES, VSCodeConfig, type VersionKey, Vitest, type VitestConfigOptions, type VitestOptions, addApproveMergeUpgradeWorkflow, addBuildCompleteJob, getLatestEligibleVersion };
2333
+ export { AGENT_MODEL, AGENT_PLATFORM, AGENT_RULE_SCOPE, AgentConfig, type AgentConfigOptions, type AgentModel, type AgentPlatform, type AgentPlatformOverrides, type AgentRule, type AgentRuleBundle, type AgentRuleScope, type AgentSkill, type AgentSubAgent, type AgentSubAgentPlatformOverrides, type ApproveMergeUpgradeOptions, type AwsAccount, AwsDeployWorkflow, AwsDeploymentConfig, AwsDeploymentTarget, type AwsDeploymentTargetOptions, type AwsLocalDeploymentConfig, type AwsOrganization, type AwsRegion, BUILT_IN_BUNDLES, CLAUDE_RULE_TARGET, COMPLETE_JOB_ID, type CiDeploymentConfig, type ClassTypeOptions, type ClaudeAutoModeConfig, type ClaudeHookAction, type ClaudeHookEntry, type ClaudeHooksConfig, type ClaudePermissionsConfig, type ClaudeRuleTarget, type ClaudeSandboxConfig, type ClaudeSettingsConfig, type CursorHookAction, type CursorHooksConfig, type CursorSettingsConfig, type DeployWorkflowOptions, type GitBranch, type IDependencyResolver, JsiiFaker, MCP_TRANSPORT, MERGE_METHODS, MIMIMUM_RELEASE_AGE, type McpServerConfig, type McpTransport, type MergeMethod, MonorepoProject, type MonorepoProjectOptions, PROD_DEPLOY_NAME, PnpmWorkspace, type PnpmWorkspaceOptions, ROOT_CI_TASK_NAME, ROOT_TURBO_TASK_NAME, type RemoteCacheOptions, ResetTask, type ResetTaskOptions, TestRunner, TurboRepo, type TurboRepoOptions, TurboRepoTask, type TurboRepoTaskOptions, TypeScriptConfig, TypeScriptProject, type TypeScriptProjectOptions, VERSION, VERSION_KEYS_SKIP, VERSION_NPM_PACKAGES, VSCodeConfig, type VersionKey, Vitest, type VitestConfigOptions, type VitestOptions, addApproveMergeUpgradeWorkflow, addBuildCompleteJob, awsCdkBundle, baseBundle, getLatestEligibleVersion, jestBundle, pnpmBundle, projenBundle, turborepoBundle, typescriptBundle, vitestBundle };