@codedrifters/configulator 0.0.152 → 0.0.154

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,684 @@
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
+ * Claude Code settings.json configuration.
627
+ * Generated to .claude/settings.json (committed, team-shared).
628
+ */
629
+ readonly claudeSettings?: ClaudeSettingsConfig;
630
+ /**
631
+ * Cursor-specific configuration. Generates .cursor/hooks.json for
632
+ * lifecycle hooks and .cursorignore / .cursorindexingignore for
633
+ * file visibility control.
634
+ */
635
+ readonly cursorSettings?: CursorSettingsConfig;
636
+ }
637
+
638
+ /**
639
+ * Generates AI coding assistant configuration files from a common schema.
640
+ *
641
+ * Supports Cursor and Claude Code (initial release), with Codex and Copilot
642
+ * renderers planned for future issues. Rules, skills, and sub-agents are
643
+ * defined once and rendered into the correct format for each target platform.
644
+ *
645
+ * Follows the configulator component pattern: extends Component, static .of()
646
+ * factory, options interface with JSDoc.
647
+ *
648
+ * @example
649
+ * ```ts
650
+ * new AgentConfig(project, {
651
+ * rules: [{
652
+ * name: 'my-rule',
653
+ * description: 'Project conventions',
654
+ * scope: AGENT_RULE_SCOPE.ALWAYS,
655
+ * content: '# My Rule\n\nFollow these conventions...',
656
+ * }],
657
+ * });
658
+ * ```
659
+ */
660
+ declare class AgentConfig extends Component {
661
+ /**
662
+ * Find the AgentConfig component on a project.
663
+ */
664
+ static of(project: Project$1): AgentConfig | undefined;
665
+ private readonly options;
666
+ constructor(project: Project$1, options?: AgentConfigOptions);
667
+ preSynthesize(): void;
668
+ private resolvePlatforms;
669
+ private resolveRules;
670
+ private resolveSkills;
671
+ private resolveSubAgents;
672
+ }
673
+
674
+ /**
675
+ * Built-in rule bundles that ship with configulator.
676
+ * Each bundle is auto-detected based on project introspection.
677
+ *
678
+ * Actual bundles are added in issue #101.
679
+ */
680
+ declare const BUILT_IN_BUNDLES: ReadonlyArray<AgentRuleBundle>;
681
+
12
682
  /*******************************************************************************
13
683
  *
14
684
  * Git configs for this repo. This venn diagram has a great deal of overlap
@@ -398,7 +1068,7 @@ declare const VERSION: {
398
1068
  /**
399
1069
  * What version of the turborepo library should we use?
400
1070
  */
401
- readonly TURBO_VERSION: "2.9.3";
1071
+ readonly TURBO_VERSION: "2.9.4";
402
1072
  /**
403
1073
  * What version of Vite to use (pnpm override). Pinned to 5.x so Vitest 4.x
404
1074
  * can load config (Vite 6+/7+ are ESM-only; see issue #142). Remove override
@@ -635,7 +1305,7 @@ declare class PnpmWorkspace extends Component {
635
1305
  * @param project
636
1306
  * @returns
637
1307
  */
638
- static of(project: Project): PnpmWorkspace | undefined;
1308
+ static of(project: Project$1): PnpmWorkspace | undefined;
639
1309
  /**
640
1310
  * Filename for the pnpm workspace file.
641
1311
  */
@@ -717,7 +1387,7 @@ declare class PnpmWorkspace extends Component {
717
1387
  [dependencyName: string]: string;
718
1388
  };
719
1389
  };
720
- constructor(project: Project, options?: PnpmWorkspaceOptions);
1390
+ constructor(project: Project$1, options?: PnpmWorkspaceOptions);
721
1391
  }
722
1392
 
723
1393
  /*******************************************************************************
@@ -751,11 +1421,11 @@ interface ResetTaskOptions {
751
1421
  readonly taskName?: string;
752
1422
  }
753
1423
  declare class ResetTask extends Component {
754
- readonly project: Project;
1424
+ readonly project: Project$1;
755
1425
  /**
756
1426
  * Static method to discover reset task in a project.
757
1427
  */
758
- static of(project: Project): ResetTask | undefined;
1428
+ static of(project: Project$1): ResetTask | undefined;
759
1429
  /**
760
1430
  * The output directory to delete (from tsconfig or custom).
761
1431
  */
@@ -768,7 +1438,7 @@ declare class ResetTask extends Component {
768
1438
  * The name of the task that was created.
769
1439
  */
770
1440
  readonly taskName: string;
771
- constructor(project: Project, options?: ResetTaskOptions);
1441
+ constructor(project: Project$1, options?: ResetTaskOptions);
772
1442
  }
773
1443
 
774
1444
  /**
@@ -788,7 +1458,7 @@ interface TurboRepoTaskOptions {
788
1458
  readonly interactive?: boolean;
789
1459
  }
790
1460
  declare class TurboRepoTask extends Component$1 {
791
- readonly project: Project$1;
1461
+ readonly project: Project;
792
1462
  readonly name: string;
793
1463
  dependsOn: Array<string>;
794
1464
  readonly env: Array<string>;
@@ -803,7 +1473,7 @@ declare class TurboRepoTask extends Component$1 {
803
1473
  * Include this task in turbo.json output?
804
1474
  */
805
1475
  isActive: boolean;
806
- constructor(project: Project$1, options: TurboRepoTaskOptions);
1476
+ constructor(project: Project, options: TurboRepoTaskOptions);
807
1477
  taskConfig(): Record<string, any>;
808
1478
  }
809
1479
 
@@ -1005,7 +1675,7 @@ declare class TurboRepo extends Component$1 {
1005
1675
  /**
1006
1676
  * Static method to discovert turbo in a project.
1007
1677
  */
1008
- static of(project: Project$1): TurboRepo | undefined;
1678
+ static of(project: Project): TurboRepo | undefined;
1009
1679
  static buildWorkflowOptions: (remoteCacheOptions: RemoteCacheOptions) => Partial<BuildWorkflowOptions>;
1010
1680
  /**
1011
1681
  * Version of turborepo to use.
@@ -1590,4 +2260,4 @@ declare const COMPLETE_JOB_ID = "complete";
1590
2260
  */
1591
2261
  declare function addBuildCompleteJob(buildWorkflow: BuildWorkflow): void;
1592
2262
 
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 };
2263
+ 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, getLatestEligibleVersion };