@codedrifters/configulator 0.0.257 → 0.0.259

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
@@ -1278,6 +1278,144 @@ interface MeetingsConfig {
1278
1278
  */
1279
1279
  readonly agendaTemplateRoot?: string;
1280
1280
  }
1281
+ /*******************************************************************************
1282
+ *
1283
+ * Agent Features Config
1284
+ *
1285
+ ******************************************************************************/
1286
+ /**
1287
+ * Per-tier lists of domain-specific source examples injected into the
1288
+ * base bundle's "Source Quality & Verification" rule under each of the
1289
+ * T1 / T2 / T3 / T4 headings.
1290
+ *
1291
+ * Every field is optional. When a field is set, the `base` bundle
1292
+ * renders a bullet list of the supplied examples beneath the
1293
+ * corresponding tier heading; when a field is unset, the tier heading
1294
+ * renders with its generic examples only.
1295
+ *
1296
+ * The examples are emitted verbatim — supply fully-formed descriptive
1297
+ * strings ("FHIR R4 capability statements", "SEC EDGAR filings").
1298
+ *
1299
+ * @see AgentFeaturesConfig
1300
+ * @see ./bundles/features.ts#renderSourceTierExamples
1301
+ */
1302
+ interface SourceTierExamples {
1303
+ /**
1304
+ * Primary living sources — T1. Examples that update when reality
1305
+ * changes (official product docs, company about/leadership pages,
1306
+ * live government registries).
1307
+ */
1308
+ readonly t1?: ReadonlyArray<string>;
1309
+ /**
1310
+ * Primary snapshot sources — T2. Examples that capture a moment in
1311
+ * time from the authoritative party (press releases, earnings
1312
+ * transcripts, regulatory filings, conference presentations).
1313
+ */
1314
+ readonly t2?: ReadonlyArray<string>;
1315
+ /**
1316
+ * Secondary sources — T3. Examples that interpret primary material
1317
+ * (news articles, trade press, analyst reports, industry databases).
1318
+ */
1319
+ readonly t3?: ReadonlyArray<string>;
1320
+ /**
1321
+ * Self-reported or marketing sources — T4. Examples that require
1322
+ * corroboration before any factual claim rides on them (vendor
1323
+ * comparison pages, testimonials, social posts, job listings,
1324
+ * Wikipedia).
1325
+ */
1326
+ readonly t4?: ReadonlyArray<string>;
1327
+ }
1328
+ /**
1329
+ * A single consumer-supplied doc-section template injected into a
1330
+ * bundle's rule content at rule-generation time.
1331
+ *
1332
+ * The configulator framework is deliberately generic here — it
1333
+ * matches by `bundleName` and appends `body` verbatim under a new
1334
+ * `## <sectionTitle>` heading after the first rule in the target
1335
+ * bundle whose content contains `## <afterSection>`. Named feature
1336
+ * toggles (stealth-mode, consortium-model, etc.) belong in downstream
1337
+ * consumer repos that compose the primitive this interface exposes.
1338
+ *
1339
+ * Placeholder substitution (`{{foo}}`) is **not** performed at
1340
+ * rule-generation time — the `body` string is emitted verbatim.
1341
+ * Any templating is the agent's responsibility at document-authoring
1342
+ * time, not configulator's.
1343
+ *
1344
+ * @see AgentFeaturesConfig
1345
+ * @see ./bundles/features.ts#renderCustomDocSection
1346
+ */
1347
+ interface CustomDocSection {
1348
+ /**
1349
+ * Target bundle id. Must match an `AgentRuleBundle.name` that is
1350
+ * active in the project. If no active bundle has this name, the
1351
+ * section is silently dropped.
1352
+ * @example 'company-profile', 'meeting-analysis', 'bcm-writer'
1353
+ */
1354
+ readonly bundleName: string;
1355
+ /**
1356
+ * Heading text (without any leading `#` characters) of the existing
1357
+ * section this custom section is inserted after. The framework
1358
+ * searches every rule in the target bundle for a heading line at
1359
+ * any level (`#` through `######`) whose text equals `afterSection`;
1360
+ * the first rule that contains such a heading is the insertion site.
1361
+ * Matching any level lets consumers hook into single-`#` bundle-rule
1362
+ * titles (e.g. `# Company Profile Workflow`) as well as nested `##` /
1363
+ * `###` subsections. If no rule contains a matching heading, the
1364
+ * section is silently dropped.
1365
+ *
1366
+ * Multiple entries targeting the same heading render in supplied
1367
+ * order — the first entry lands directly beneath the target heading
1368
+ * block, the second below it, and so on.
1369
+ * @example 'Company Profile Workflow', 'Company Type Taxonomy', 'Output Boundaries'
1370
+ */
1371
+ readonly afterSection: string;
1372
+ /**
1373
+ * Heading text for the injected section, rendered as
1374
+ * `## <sectionTitle>`.
1375
+ * @example 'Consortium Membership', 'Vortex Relevance'
1376
+ */
1377
+ readonly sectionTitle: string;
1378
+ /**
1379
+ * Markdown body emitted verbatim beneath the `## <sectionTitle>`
1380
+ * heading. Trailing newlines are trimmed before rendering.
1381
+ */
1382
+ readonly body: string;
1383
+ }
1384
+ /**
1385
+ * Framework injection points for source-tier customization and
1386
+ * custom doc sections. Supplied via `AgentConfigOptions.features`.
1387
+ *
1388
+ * - `sourceTierExamples` — per-tier domain-specific examples that get
1389
+ * listed under each tier in the base bundle's "Source Quality &
1390
+ * Verification" rule.
1391
+ * - `customDocSections` — per-bundle section templates that render
1392
+ * verbatim after an existing section heading in the target bundle's
1393
+ * rule content.
1394
+ *
1395
+ * Named feature toggles (`consortium-model`, `stealth-mode`, etc.)
1396
+ * are deliberately **not** part of this config surface. They belong
1397
+ * in downstream consumer repos built on top of the generic
1398
+ * `customDocSections` primitive.
1399
+ *
1400
+ * @see SourceTierExamples
1401
+ * @see CustomDocSection
1402
+ * @see ./bundles/features.ts
1403
+ */
1404
+ interface AgentFeaturesConfig {
1405
+ /**
1406
+ * Per-tier lists of domain-specific source examples injected under
1407
+ * T1 / T2 / T3 / T4 in the base bundle's "Source Quality &
1408
+ * Verification" rule.
1409
+ */
1410
+ readonly sourceTierExamples?: SourceTierExamples;
1411
+ /**
1412
+ * Custom doc-section templates to inject into active bundles at
1413
+ * rule-generation time. Each entry names the target bundle, the
1414
+ * section heading to insert after, the injected section's title,
1415
+ * and the body to emit verbatim.
1416
+ */
1417
+ readonly customDocSections?: ReadonlyArray<CustomDocSection>;
1418
+ }
1281
1419
  /*******************************************************************************
1282
1420
  *
1283
1421
  * AgentConfig Options
@@ -1430,6 +1568,27 @@ interface AgentConfigOptions {
1430
1568
  * @see ./bundles/meeting-types.ts#renderMeetingTypesSection
1431
1569
  */
1432
1570
  readonly meetings?: MeetingsConfig;
1571
+ /**
1572
+ * Framework injection points for source-tier customization and
1573
+ * custom doc sections.
1574
+ *
1575
+ * - `sourceTierExamples` — domain-specific examples injected under
1576
+ * T1 / T2 / T3 / T4 in the base bundle's "Source Quality &
1577
+ * Verification" rule.
1578
+ * - `customDocSections` — consumer-supplied section templates that
1579
+ * render verbatim after an existing section heading in a target
1580
+ * bundle's rule content.
1581
+ *
1582
+ * Named feature toggles (`consortium-model`, `stealth-mode`, etc.)
1583
+ * are intentionally out of scope here — build those on top of
1584
+ * `customDocSections` inside the consuming repo's projen config.
1585
+ *
1586
+ * @see AgentFeaturesConfig
1587
+ * @see SourceTierExamples
1588
+ * @see CustomDocSection
1589
+ * @see ./bundles/features.ts
1590
+ */
1591
+ readonly features?: AgentFeaturesConfig;
1433
1592
  }
1434
1593
 
1435
1594
  /**
@@ -1459,6 +1618,14 @@ declare class AgentConfig extends Component {
1459
1618
  * Find the AgentConfig component on a project.
1460
1619
  */
1461
1620
  static of(project: Project$1): AgentConfig | undefined;
1621
+ /**
1622
+ * Returns `true` when at least one tier array on the supplied
1623
+ * `SourceTierExamples` is non-empty, signalling that the consuming
1624
+ * repo has opted into rendering the base bundle's
1625
+ * `source-quality-verification` rule. Returns `false` for
1626
+ * `undefined`, `{}`, or a fully-empty `{ t1: [], t2: [], t3: [], t4: [] }`.
1627
+ */
1628
+ private static hasActiveTierExamples;
1462
1629
  /**
1463
1630
  * Merges default Claude permissions with bundle and user-supplied settings.
1464
1631
  *
@@ -1483,8 +1650,11 @@ declare class AgentConfig extends Component {
1483
1650
  /**
1484
1651
  * Return a bundle's rules with `filePatterns` narrowed to the projects
1485
1652
  * that actually matched the bundle's detection predicate (when the bundle
1486
- * provides `findApplicableProjects`). Rules with `ALWAYS` scope and rules
1487
- * on bundles that don't implement the hook are returned unchanged.
1653
+ * provides `findApplicableProjects`) and any project-specified
1654
+ * `features.customDocSections` entries injected into the matching rule
1655
+ * content. Rules with `ALWAYS` scope and rules on bundles that don't
1656
+ * implement the hook are returned with only the custom-section
1657
+ * transformation (if any) applied.
1488
1658
  */
1489
1659
  private bundleRulesFor;
1490
1660
  private resolveSkills;
@@ -1554,9 +1724,10 @@ declare const bcmWriterBundle: AgentRuleBundle;
1554
1724
  * `people-profile` (via `people:research`) and `software-profile` (via
1555
1725
  * `software:research`).
1556
1726
  *
1557
- * Ships a sub-agent (`company-profile-analyst`), a user-invocable skill
1558
- * (`/profile-company`), and `type:company-profile` plus `company:*`
1559
- * phase labels.
1727
+ * Ships a sub-agent (`company-profile-analyst`), four user-invocable
1728
+ * skills (`/profile-company`, `/match-company`, `/refresh-company`,
1729
+ * `/analyze-segment`), and `type:company-profile` plus `company:*`
1730
+ * phase labels for the six phases.
1560
1731
  */
1561
1732
  declare const companyProfileBundle: AgentRuleBundle;
1562
1733
 
@@ -1702,6 +1873,51 @@ declare const prReviewBundle: AgentRuleBundle;
1702
1873
  */
1703
1874
  declare const projenBundle: AgentRuleBundle;
1704
1875
 
1876
+ /**
1877
+ * Inject domain-specific source-tier examples into the content of the
1878
+ * base bundle's "Source Quality & Verification" rule.
1879
+ *
1880
+ * For every tier whose examples array is non-empty, a
1881
+ * `**Project-specific examples:**` line followed by a bullet list of
1882
+ * the supplied strings is appended immediately beneath the tier's
1883
+ * `### T<n> — ...` heading paragraph block. Tiers whose examples array
1884
+ * is missing or empty are left untouched.
1885
+ *
1886
+ * Returns the original `content` verbatim when the supplied config is
1887
+ * undefined or has no non-empty tier arrays, so callers can
1888
+ * unconditionally pipe content through this function.
1889
+ */
1890
+ declare function renderSourceTierExamples(content: string, examples: SourceTierExamples | undefined): string;
1891
+ /**
1892
+ * Apply every {@link CustomDocSection} that targets `bundle.name` to
1893
+ * the bundle's rules, returning a new bundle whose matched rules have
1894
+ * the section bodies appended after the configured `afterSection`
1895
+ * heading. Entries that reference a bundle name other than
1896
+ * `bundle.name`, or whose `afterSection` cannot be located in any
1897
+ * rule in the bundle, are silently dropped.
1898
+ *
1899
+ * Entries that target the same `afterSection` heading render in
1900
+ * supplied order — the first supplied entry appears immediately
1901
+ * beneath the target heading block, the second below that, and so on.
1902
+ * This is achieved by advancing the insertion anchor to each
1903
+ * just-injected section's `## <sectionTitle>` heading; the next
1904
+ * same-target entry then lands at the end of that newly-opened
1905
+ * section, which places it immediately after the previous entry
1906
+ * regardless of the original heading's level.
1907
+ *
1908
+ * Returns `bundle` unchanged when `sections` is empty or no entries
1909
+ * match, so callers can unconditionally pipe bundles through this
1910
+ * function without penalty.
1911
+ */
1912
+ declare function renderCustomDocSections(bundle: AgentRuleBundle, sections: ReadonlyArray<CustomDocSection>): AgentRuleBundle;
1913
+ /**
1914
+ * Render a {@link CustomDocSection} into the markdown block that
1915
+ * `renderCustomDocSections` splices after the target heading block.
1916
+ * Exposed for tests that exercise the renderer directly without
1917
+ * touching a full bundle.
1918
+ */
1919
+ declare function renderCustomDocSectionBlock(section: CustomDocSection): string;
1920
+
1705
1921
  /**
1706
1922
  * Render the markdown subsection appended to the
1707
1923
  * `issue-label-conventions` rule when `AgentConfigOptions.focus` is
@@ -4477,4 +4693,4 @@ declare const COMPLETE_JOB_ID = "complete";
4477
4693
  */
4478
4694
  declare function addBuildCompleteJob(buildWorkflow: BuildWorkflow): void;
4479
4695
 
4480
- export { AGENT_MODEL, AGENT_PLATFORM, AGENT_RULE_SCOPE, AgentConfig, type AgentConfigOptions, type AgentExpansionRules, type AgentModel, type AgentPathsConfig, type AgentPlatform, type AgentPlatformOverrides, type AgentProcedure, type AgentRule, type AgentRuleBundle, type AgentRuleScope, type AgentSkill, type AgentSubAgent, type AgentSubAgentPlatformOverrides, type ApproveMergeUpgradeOptions, AstroConfig, type AstroConfigOptions, type AstroIntegrationSpec, AstroOutput, AstroProject, type AstroProjectOptions, type AwsAccount, AwsCdkProject, type AwsCdkProjectOptions, AwsDeployWorkflow, AwsDeploymentConfig, AwsDeploymentTarget, type AwsDeploymentTargetOptions, type AwsLocalDeploymentConfig, type AwsOrganization, type AwsRegion, AwsTeardownWorkflow, type AwsTeardownWorkflowOptions, 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 CopilotHandoff, type CursorHookAction, type CursorHooksConfig, type CursorSettingsConfig, DEFAULT_AGENT_PATHS, DEFAULT_PRIORITY_LABELS, DEFAULT_STATUS_LABELS, DEFAULT_TEARDOWN_BRANCH_PATTERNS, DEFAULT_TYPE_LABELS, type DeployWorkflowOptions, type DeploymentMetadata, type FocusArea, type FocusAreaMatch, type FocusConfig, type GitBranch, type GitHubBoardMetadata, type GitHubProjectMetadata, type GitHubSprintMetadata, type IDependencyResolver, JsiiFaker, LAYOUT_ENFORCEMENT, LAYOUT_ROOT_BY_PROJECT_TYPE, type LabelDefinition, type LayoutEnforcement, type LayoutViolation, MCP_TRANSPORT, MERGE_METHODS, MIMIMUM_RELEASE_AGE, MINIMUM_RELEASE_AGE, MONOREPO_LAYOUT, type McpServerConfig, type McpTransport, type MeetingArea, type MeetingScope, type MeetingType, type MeetingsConfig, type MergeMethod, type MonorepoLayoutRoot, MonorepoProject, type MonorepoProjectOptions, type OrganizationMetadata, PROD_DEPLOY_NAME, PnpmWorkspace, type PnpmWorkspaceOptions, type PriorityRule, ProjectMetadata, type ProjectMetadataOptions, REQUIREMENTS_WRITER_PATHS, ROOT_CI_TASK_NAME, ROOT_TURBO_TASK_NAME, type RemoteCacheOptions, type RepositoryMetadata, ResetTask, type ResetTaskOptions, type ResolvedAgentPaths, type ResolvedProjectMetadata, STARLIGHT_ROLE, type SlackMetadata, type StarlightEditLink, type StarlightLogo, StarlightProject, type StarlightProjectOptions, type StarlightRole, type StarlightSidebarItem, type StarlightSingletonViolation, type StarlightSocialLink, type SyncLabelsOptions, type TemplateResolveResult, 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, addSyncLabelsWorkflow, awsCdkBundle, baseBundle, bcmWriterBundle, companyProfileBundle, formatLayoutViolation, formatStarlightSingletonViolation, getLatestEligibleVersion, githubWorkflowBundle, industryDiscoveryBundle, jestBundle, maintenanceAuditBundle, meetingAnalysisBundle, orchestratorBundle, peopleProfileBundle, pnpmBundle, prReviewBundle, projenBundle, renderFocusSection, renderMeetingTypesSection, renderPriorityRulesSection, requirementsAnalystBundle, requirementsReviewerBundle, requirementsWriterBundle, researchPipelineBundle, resolveAgentPaths, resolveAstroProjectOutdir, resolveAwsCdkProjectOutdir, resolveModelAlias, resolveOutdirFromPackageName, resolveTemplateVariables, resolveTypeScriptProjectOutdir, slackBundle, softwareProfileBundle, turborepoBundle, typescriptBundle, validateMonorepoLayout, validateStarlightSingleton, vitestBundle };
4696
+ export { AGENT_MODEL, AGENT_PLATFORM, AGENT_RULE_SCOPE, AgentConfig, type AgentConfigOptions, type AgentExpansionRules, type AgentFeaturesConfig, type AgentModel, type AgentPathsConfig, type AgentPlatform, type AgentPlatformOverrides, type AgentProcedure, type AgentRule, type AgentRuleBundle, type AgentRuleScope, type AgentSkill, type AgentSubAgent, type AgentSubAgentPlatformOverrides, type ApproveMergeUpgradeOptions, AstroConfig, type AstroConfigOptions, type AstroIntegrationSpec, AstroOutput, AstroProject, type AstroProjectOptions, type AwsAccount, AwsCdkProject, type AwsCdkProjectOptions, AwsDeployWorkflow, AwsDeploymentConfig, AwsDeploymentTarget, type AwsDeploymentTargetOptions, type AwsLocalDeploymentConfig, type AwsOrganization, type AwsRegion, AwsTeardownWorkflow, type AwsTeardownWorkflowOptions, 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 CopilotHandoff, type CursorHookAction, type CursorHooksConfig, type CursorSettingsConfig, type CustomDocSection, DEFAULT_AGENT_PATHS, DEFAULT_PRIORITY_LABELS, DEFAULT_STATUS_LABELS, DEFAULT_TEARDOWN_BRANCH_PATTERNS, DEFAULT_TYPE_LABELS, type DeployWorkflowOptions, type DeploymentMetadata, type FocusArea, type FocusAreaMatch, type FocusConfig, type GitBranch, type GitHubBoardMetadata, type GitHubProjectMetadata, type GitHubSprintMetadata, type IDependencyResolver, JsiiFaker, LAYOUT_ENFORCEMENT, LAYOUT_ROOT_BY_PROJECT_TYPE, type LabelDefinition, type LayoutEnforcement, type LayoutViolation, MCP_TRANSPORT, MERGE_METHODS, MIMIMUM_RELEASE_AGE, MINIMUM_RELEASE_AGE, MONOREPO_LAYOUT, type McpServerConfig, type McpTransport, type MeetingArea, type MeetingScope, type MeetingType, type MeetingsConfig, type MergeMethod, type MonorepoLayoutRoot, MonorepoProject, type MonorepoProjectOptions, type OrganizationMetadata, PROD_DEPLOY_NAME, PnpmWorkspace, type PnpmWorkspaceOptions, type PriorityRule, ProjectMetadata, type ProjectMetadataOptions, REQUIREMENTS_WRITER_PATHS, ROOT_CI_TASK_NAME, ROOT_TURBO_TASK_NAME, type RemoteCacheOptions, type RepositoryMetadata, ResetTask, type ResetTaskOptions, type ResolvedAgentPaths, type ResolvedProjectMetadata, STARLIGHT_ROLE, type SlackMetadata, type SourceTierExamples, type StarlightEditLink, type StarlightLogo, StarlightProject, type StarlightProjectOptions, type StarlightRole, type StarlightSidebarItem, type StarlightSingletonViolation, type StarlightSocialLink, type SyncLabelsOptions, type TemplateResolveResult, 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, addSyncLabelsWorkflow, awsCdkBundle, baseBundle, bcmWriterBundle, companyProfileBundle, formatLayoutViolation, formatStarlightSingletonViolation, getLatestEligibleVersion, githubWorkflowBundle, industryDiscoveryBundle, jestBundle, maintenanceAuditBundle, meetingAnalysisBundle, orchestratorBundle, peopleProfileBundle, pnpmBundle, prReviewBundle, projenBundle, renderCustomDocSectionBlock, renderCustomDocSections, renderFocusSection, renderMeetingTypesSection, renderPriorityRulesSection, renderSourceTierExamples, requirementsAnalystBundle, requirementsReviewerBundle, requirementsWriterBundle, researchPipelineBundle, resolveAgentPaths, resolveAstroProjectOutdir, resolveAwsCdkProjectOutdir, resolveModelAlias, resolveOutdirFromPackageName, resolveTemplateVariables, resolveTypeScriptProjectOutdir, slackBundle, softwareProfileBundle, turborepoBundle, typescriptBundle, validateMonorepoLayout, validateStarlightSingleton, vitestBundle };
package/lib/index.d.ts CHANGED
@@ -1327,6 +1327,144 @@ interface MeetingsConfig {
1327
1327
  */
1328
1328
  readonly agendaTemplateRoot?: string;
1329
1329
  }
1330
+ /*******************************************************************************
1331
+ *
1332
+ * Agent Features Config
1333
+ *
1334
+ ******************************************************************************/
1335
+ /**
1336
+ * Per-tier lists of domain-specific source examples injected into the
1337
+ * base bundle's "Source Quality & Verification" rule under each of the
1338
+ * T1 / T2 / T3 / T4 headings.
1339
+ *
1340
+ * Every field is optional. When a field is set, the `base` bundle
1341
+ * renders a bullet list of the supplied examples beneath the
1342
+ * corresponding tier heading; when a field is unset, the tier heading
1343
+ * renders with its generic examples only.
1344
+ *
1345
+ * The examples are emitted verbatim — supply fully-formed descriptive
1346
+ * strings ("FHIR R4 capability statements", "SEC EDGAR filings").
1347
+ *
1348
+ * @see AgentFeaturesConfig
1349
+ * @see ./bundles/features.ts#renderSourceTierExamples
1350
+ */
1351
+ interface SourceTierExamples {
1352
+ /**
1353
+ * Primary living sources — T1. Examples that update when reality
1354
+ * changes (official product docs, company about/leadership pages,
1355
+ * live government registries).
1356
+ */
1357
+ readonly t1?: ReadonlyArray<string>;
1358
+ /**
1359
+ * Primary snapshot sources — T2. Examples that capture a moment in
1360
+ * time from the authoritative party (press releases, earnings
1361
+ * transcripts, regulatory filings, conference presentations).
1362
+ */
1363
+ readonly t2?: ReadonlyArray<string>;
1364
+ /**
1365
+ * Secondary sources — T3. Examples that interpret primary material
1366
+ * (news articles, trade press, analyst reports, industry databases).
1367
+ */
1368
+ readonly t3?: ReadonlyArray<string>;
1369
+ /**
1370
+ * Self-reported or marketing sources — T4. Examples that require
1371
+ * corroboration before any factual claim rides on them (vendor
1372
+ * comparison pages, testimonials, social posts, job listings,
1373
+ * Wikipedia).
1374
+ */
1375
+ readonly t4?: ReadonlyArray<string>;
1376
+ }
1377
+ /**
1378
+ * A single consumer-supplied doc-section template injected into a
1379
+ * bundle's rule content at rule-generation time.
1380
+ *
1381
+ * The configulator framework is deliberately generic here — it
1382
+ * matches by `bundleName` and appends `body` verbatim under a new
1383
+ * `## <sectionTitle>` heading after the first rule in the target
1384
+ * bundle whose content contains `## <afterSection>`. Named feature
1385
+ * toggles (stealth-mode, consortium-model, etc.) belong in downstream
1386
+ * consumer repos that compose the primitive this interface exposes.
1387
+ *
1388
+ * Placeholder substitution (`{{foo}}`) is **not** performed at
1389
+ * rule-generation time — the `body` string is emitted verbatim.
1390
+ * Any templating is the agent's responsibility at document-authoring
1391
+ * time, not configulator's.
1392
+ *
1393
+ * @see AgentFeaturesConfig
1394
+ * @see ./bundles/features.ts#renderCustomDocSection
1395
+ */
1396
+ interface CustomDocSection {
1397
+ /**
1398
+ * Target bundle id. Must match an `AgentRuleBundle.name` that is
1399
+ * active in the project. If no active bundle has this name, the
1400
+ * section is silently dropped.
1401
+ * @example 'company-profile', 'meeting-analysis', 'bcm-writer'
1402
+ */
1403
+ readonly bundleName: string;
1404
+ /**
1405
+ * Heading text (without any leading `#` characters) of the existing
1406
+ * section this custom section is inserted after. The framework
1407
+ * searches every rule in the target bundle for a heading line at
1408
+ * any level (`#` through `######`) whose text equals `afterSection`;
1409
+ * the first rule that contains such a heading is the insertion site.
1410
+ * Matching any level lets consumers hook into single-`#` bundle-rule
1411
+ * titles (e.g. `# Company Profile Workflow`) as well as nested `##` /
1412
+ * `###` subsections. If no rule contains a matching heading, the
1413
+ * section is silently dropped.
1414
+ *
1415
+ * Multiple entries targeting the same heading render in supplied
1416
+ * order — the first entry lands directly beneath the target heading
1417
+ * block, the second below it, and so on.
1418
+ * @example 'Company Profile Workflow', 'Company Type Taxonomy', 'Output Boundaries'
1419
+ */
1420
+ readonly afterSection: string;
1421
+ /**
1422
+ * Heading text for the injected section, rendered as
1423
+ * `## <sectionTitle>`.
1424
+ * @example 'Consortium Membership', 'Vortex Relevance'
1425
+ */
1426
+ readonly sectionTitle: string;
1427
+ /**
1428
+ * Markdown body emitted verbatim beneath the `## <sectionTitle>`
1429
+ * heading. Trailing newlines are trimmed before rendering.
1430
+ */
1431
+ readonly body: string;
1432
+ }
1433
+ /**
1434
+ * Framework injection points for source-tier customization and
1435
+ * custom doc sections. Supplied via `AgentConfigOptions.features`.
1436
+ *
1437
+ * - `sourceTierExamples` — per-tier domain-specific examples that get
1438
+ * listed under each tier in the base bundle's "Source Quality &
1439
+ * Verification" rule.
1440
+ * - `customDocSections` — per-bundle section templates that render
1441
+ * verbatim after an existing section heading in the target bundle's
1442
+ * rule content.
1443
+ *
1444
+ * Named feature toggles (`consortium-model`, `stealth-mode`, etc.)
1445
+ * are deliberately **not** part of this config surface. They belong
1446
+ * in downstream consumer repos built on top of the generic
1447
+ * `customDocSections` primitive.
1448
+ *
1449
+ * @see SourceTierExamples
1450
+ * @see CustomDocSection
1451
+ * @see ./bundles/features.ts
1452
+ */
1453
+ interface AgentFeaturesConfig {
1454
+ /**
1455
+ * Per-tier lists of domain-specific source examples injected under
1456
+ * T1 / T2 / T3 / T4 in the base bundle's "Source Quality &
1457
+ * Verification" rule.
1458
+ */
1459
+ readonly sourceTierExamples?: SourceTierExamples;
1460
+ /**
1461
+ * Custom doc-section templates to inject into active bundles at
1462
+ * rule-generation time. Each entry names the target bundle, the
1463
+ * section heading to insert after, the injected section's title,
1464
+ * and the body to emit verbatim.
1465
+ */
1466
+ readonly customDocSections?: ReadonlyArray<CustomDocSection>;
1467
+ }
1330
1468
  /*******************************************************************************
1331
1469
  *
1332
1470
  * AgentConfig Options
@@ -1479,6 +1617,27 @@ interface AgentConfigOptions {
1479
1617
  * @see ./bundles/meeting-types.ts#renderMeetingTypesSection
1480
1618
  */
1481
1619
  readonly meetings?: MeetingsConfig;
1620
+ /**
1621
+ * Framework injection points for source-tier customization and
1622
+ * custom doc sections.
1623
+ *
1624
+ * - `sourceTierExamples` — domain-specific examples injected under
1625
+ * T1 / T2 / T3 / T4 in the base bundle's "Source Quality &
1626
+ * Verification" rule.
1627
+ * - `customDocSections` — consumer-supplied section templates that
1628
+ * render verbatim after an existing section heading in a target
1629
+ * bundle's rule content.
1630
+ *
1631
+ * Named feature toggles (`consortium-model`, `stealth-mode`, etc.)
1632
+ * are intentionally out of scope here — build those on top of
1633
+ * `customDocSections` inside the consuming repo's projen config.
1634
+ *
1635
+ * @see AgentFeaturesConfig
1636
+ * @see SourceTierExamples
1637
+ * @see CustomDocSection
1638
+ * @see ./bundles/features.ts
1639
+ */
1640
+ readonly features?: AgentFeaturesConfig;
1482
1641
  }
1483
1642
 
1484
1643
  /**
@@ -1508,6 +1667,14 @@ declare class AgentConfig extends Component {
1508
1667
  * Find the AgentConfig component on a project.
1509
1668
  */
1510
1669
  static of(project: Project): AgentConfig | undefined;
1670
+ /**
1671
+ * Returns `true` when at least one tier array on the supplied
1672
+ * `SourceTierExamples` is non-empty, signalling that the consuming
1673
+ * repo has opted into rendering the base bundle's
1674
+ * `source-quality-verification` rule. Returns `false` for
1675
+ * `undefined`, `{}`, or a fully-empty `{ t1: [], t2: [], t3: [], t4: [] }`.
1676
+ */
1677
+ private static hasActiveTierExamples;
1511
1678
  /**
1512
1679
  * Merges default Claude permissions with bundle and user-supplied settings.
1513
1680
  *
@@ -1532,8 +1699,11 @@ declare class AgentConfig extends Component {
1532
1699
  /**
1533
1700
  * Return a bundle's rules with `filePatterns` narrowed to the projects
1534
1701
  * that actually matched the bundle's detection predicate (when the bundle
1535
- * provides `findApplicableProjects`). Rules with `ALWAYS` scope and rules
1536
- * on bundles that don't implement the hook are returned unchanged.
1702
+ * provides `findApplicableProjects`) and any project-specified
1703
+ * `features.customDocSections` entries injected into the matching rule
1704
+ * content. Rules with `ALWAYS` scope and rules on bundles that don't
1705
+ * implement the hook are returned with only the custom-section
1706
+ * transformation (if any) applied.
1537
1707
  */
1538
1708
  private bundleRulesFor;
1539
1709
  private resolveSkills;
@@ -1603,9 +1773,10 @@ declare const bcmWriterBundle: AgentRuleBundle;
1603
1773
  * `people-profile` (via `people:research`) and `software-profile` (via
1604
1774
  * `software:research`).
1605
1775
  *
1606
- * Ships a sub-agent (`company-profile-analyst`), a user-invocable skill
1607
- * (`/profile-company`), and `type:company-profile` plus `company:*`
1608
- * phase labels.
1776
+ * Ships a sub-agent (`company-profile-analyst`), four user-invocable
1777
+ * skills (`/profile-company`, `/match-company`, `/refresh-company`,
1778
+ * `/analyze-segment`), and `type:company-profile` plus `company:*`
1779
+ * phase labels for the six phases.
1609
1780
  */
1610
1781
  declare const companyProfileBundle: AgentRuleBundle;
1611
1782
 
@@ -1751,6 +1922,51 @@ declare const prReviewBundle: AgentRuleBundle;
1751
1922
  */
1752
1923
  declare const projenBundle: AgentRuleBundle;
1753
1924
 
1925
+ /**
1926
+ * Inject domain-specific source-tier examples into the content of the
1927
+ * base bundle's "Source Quality & Verification" rule.
1928
+ *
1929
+ * For every tier whose examples array is non-empty, a
1930
+ * `**Project-specific examples:**` line followed by a bullet list of
1931
+ * the supplied strings is appended immediately beneath the tier's
1932
+ * `### T<n> — ...` heading paragraph block. Tiers whose examples array
1933
+ * is missing or empty are left untouched.
1934
+ *
1935
+ * Returns the original `content` verbatim when the supplied config is
1936
+ * undefined or has no non-empty tier arrays, so callers can
1937
+ * unconditionally pipe content through this function.
1938
+ */
1939
+ declare function renderSourceTierExamples(content: string, examples: SourceTierExamples | undefined): string;
1940
+ /**
1941
+ * Apply every {@link CustomDocSection} that targets `bundle.name` to
1942
+ * the bundle's rules, returning a new bundle whose matched rules have
1943
+ * the section bodies appended after the configured `afterSection`
1944
+ * heading. Entries that reference a bundle name other than
1945
+ * `bundle.name`, or whose `afterSection` cannot be located in any
1946
+ * rule in the bundle, are silently dropped.
1947
+ *
1948
+ * Entries that target the same `afterSection` heading render in
1949
+ * supplied order — the first supplied entry appears immediately
1950
+ * beneath the target heading block, the second below that, and so on.
1951
+ * This is achieved by advancing the insertion anchor to each
1952
+ * just-injected section's `## <sectionTitle>` heading; the next
1953
+ * same-target entry then lands at the end of that newly-opened
1954
+ * section, which places it immediately after the previous entry
1955
+ * regardless of the original heading's level.
1956
+ *
1957
+ * Returns `bundle` unchanged when `sections` is empty or no entries
1958
+ * match, so callers can unconditionally pipe bundles through this
1959
+ * function without penalty.
1960
+ */
1961
+ declare function renderCustomDocSections(bundle: AgentRuleBundle, sections: ReadonlyArray<CustomDocSection>): AgentRuleBundle;
1962
+ /**
1963
+ * Render a {@link CustomDocSection} into the markdown block that
1964
+ * `renderCustomDocSections` splices after the target heading block.
1965
+ * Exposed for tests that exercise the renderer directly without
1966
+ * touching a full bundle.
1967
+ */
1968
+ declare function renderCustomDocSectionBlock(section: CustomDocSection): string;
1969
+
1754
1970
  /**
1755
1971
  * Render the markdown subsection appended to the
1756
1972
  * `issue-label-conventions` rule when `AgentConfigOptions.focus` is
@@ -4526,5 +4742,5 @@ declare const COMPLETE_JOB_ID = "complete";
4526
4742
  */
4527
4743
  declare function addBuildCompleteJob(buildWorkflow: BuildWorkflow): void;
4528
4744
 
4529
- export { AGENT_MODEL, AGENT_PLATFORM, AGENT_RULE_SCOPE, AgentConfig, AstroConfig, AstroOutput, AstroProject, AwsCdkProject, AwsDeployWorkflow, AwsDeploymentConfig, AwsDeploymentTarget, AwsTeardownWorkflow, BUILT_IN_BUNDLES, CLAUDE_RULE_TARGET, COMPLETE_JOB_ID, DEFAULT_AGENT_PATHS, DEFAULT_PRIORITY_LABELS, DEFAULT_STATUS_LABELS, DEFAULT_TEARDOWN_BRANCH_PATTERNS, DEFAULT_TYPE_LABELS, JsiiFaker, LAYOUT_ENFORCEMENT, LAYOUT_ROOT_BY_PROJECT_TYPE, MCP_TRANSPORT, MERGE_METHODS, MIMIMUM_RELEASE_AGE, MINIMUM_RELEASE_AGE, MONOREPO_LAYOUT, MonorepoProject, PROD_DEPLOY_NAME, PnpmWorkspace, ProjectMetadata, REQUIREMENTS_WRITER_PATHS, ROOT_CI_TASK_NAME, ROOT_TURBO_TASK_NAME, ResetTask, STARLIGHT_ROLE, StarlightProject, TestRunner, TurboRepo, TurboRepoTask, TypeScriptConfig, TypeScriptProject, VERSION, VERSION_KEYS_SKIP, VERSION_NPM_PACKAGES, VSCodeConfig, Vitest, addApproveMergeUpgradeWorkflow, addBuildCompleteJob, addSyncLabelsWorkflow, awsCdkBundle, baseBundle, bcmWriterBundle, companyProfileBundle, formatLayoutViolation, formatStarlightSingletonViolation, getLatestEligibleVersion, githubWorkflowBundle, industryDiscoveryBundle, jestBundle, maintenanceAuditBundle, meetingAnalysisBundle, orchestratorBundle, peopleProfileBundle, pnpmBundle, prReviewBundle, projenBundle, renderFocusSection, renderMeetingTypesSection, renderPriorityRulesSection, requirementsAnalystBundle, requirementsReviewerBundle, requirementsWriterBundle, researchPipelineBundle, resolveAgentPaths, resolveAstroProjectOutdir, resolveAwsCdkProjectOutdir, resolveModelAlias, resolveOutdirFromPackageName, resolveTemplateVariables, resolveTypeScriptProjectOutdir, slackBundle, softwareProfileBundle, turborepoBundle, typescriptBundle, validateMonorepoLayout, validateStarlightSingleton, vitestBundle };
4530
- export type { AgentConfigOptions, AgentExpansionRules, AgentModel, AgentPathsConfig, AgentPlatform, AgentPlatformOverrides, AgentProcedure, AgentRule, AgentRuleBundle, AgentRuleScope, AgentSkill, AgentSubAgent, AgentSubAgentPlatformOverrides, ApproveMergeUpgradeOptions, AstroConfigOptions, AstroIntegrationSpec, AstroProjectOptions, AwsAccount, AwsCdkProjectOptions, AwsDeploymentTargetOptions, AwsLocalDeploymentConfig, AwsOrganization, AwsRegion, AwsTeardownWorkflowOptions, CiDeploymentConfig, ClassTypeOptions, ClaudeAutoModeConfig, ClaudeHookAction, ClaudeHookEntry, ClaudeHooksConfig, ClaudePermissionsConfig, ClaudeRuleTarget, ClaudeSandboxConfig, ClaudeSettingsConfig, CopilotHandoff, CursorHookAction, CursorHooksConfig, CursorSettingsConfig, DeployWorkflowOptions, DeploymentMetadata, FocusArea, FocusAreaMatch, FocusConfig, GitBranch, GitHubBoardMetadata, GitHubProjectMetadata, GitHubSprintMetadata, IDependencyResolver, LabelDefinition, LayoutEnforcement, LayoutViolation, McpServerConfig, McpTransport, MeetingArea, MeetingScope, MeetingType, MeetingsConfig, MergeMethod, MonorepoLayoutRoot, MonorepoProjectOptions, OrganizationMetadata, PnpmWorkspaceOptions, PriorityRule, ProjectMetadataOptions, RemoteCacheOptions, RepositoryMetadata, ResetTaskOptions, ResolvedAgentPaths, ResolvedProjectMetadata, SlackMetadata, StarlightEditLink, StarlightLogo, StarlightProjectOptions, StarlightRole, StarlightSidebarItem, StarlightSingletonViolation, StarlightSocialLink, SyncLabelsOptions, TemplateResolveResult, TurboRepoOptions, TurboRepoTaskOptions, TypeScriptProjectOptions, VersionKey, VitestConfigOptions, VitestOptions };
4745
+ export { AGENT_MODEL, AGENT_PLATFORM, AGENT_RULE_SCOPE, AgentConfig, AstroConfig, AstroOutput, AstroProject, AwsCdkProject, AwsDeployWorkflow, AwsDeploymentConfig, AwsDeploymentTarget, AwsTeardownWorkflow, BUILT_IN_BUNDLES, CLAUDE_RULE_TARGET, COMPLETE_JOB_ID, DEFAULT_AGENT_PATHS, DEFAULT_PRIORITY_LABELS, DEFAULT_STATUS_LABELS, DEFAULT_TEARDOWN_BRANCH_PATTERNS, DEFAULT_TYPE_LABELS, JsiiFaker, LAYOUT_ENFORCEMENT, LAYOUT_ROOT_BY_PROJECT_TYPE, MCP_TRANSPORT, MERGE_METHODS, MIMIMUM_RELEASE_AGE, MINIMUM_RELEASE_AGE, MONOREPO_LAYOUT, MonorepoProject, PROD_DEPLOY_NAME, PnpmWorkspace, ProjectMetadata, REQUIREMENTS_WRITER_PATHS, ROOT_CI_TASK_NAME, ROOT_TURBO_TASK_NAME, ResetTask, STARLIGHT_ROLE, StarlightProject, TestRunner, TurboRepo, TurboRepoTask, TypeScriptConfig, TypeScriptProject, VERSION, VERSION_KEYS_SKIP, VERSION_NPM_PACKAGES, VSCodeConfig, Vitest, addApproveMergeUpgradeWorkflow, addBuildCompleteJob, addSyncLabelsWorkflow, awsCdkBundle, baseBundle, bcmWriterBundle, companyProfileBundle, formatLayoutViolation, formatStarlightSingletonViolation, getLatestEligibleVersion, githubWorkflowBundle, industryDiscoveryBundle, jestBundle, maintenanceAuditBundle, meetingAnalysisBundle, orchestratorBundle, peopleProfileBundle, pnpmBundle, prReviewBundle, projenBundle, renderCustomDocSectionBlock, renderCustomDocSections, renderFocusSection, renderMeetingTypesSection, renderPriorityRulesSection, renderSourceTierExamples, requirementsAnalystBundle, requirementsReviewerBundle, requirementsWriterBundle, researchPipelineBundle, resolveAgentPaths, resolveAstroProjectOutdir, resolveAwsCdkProjectOutdir, resolveModelAlias, resolveOutdirFromPackageName, resolveTemplateVariables, resolveTypeScriptProjectOutdir, slackBundle, softwareProfileBundle, turborepoBundle, typescriptBundle, validateMonorepoLayout, validateStarlightSingleton, vitestBundle };
4746
+ export type { AgentConfigOptions, AgentExpansionRules, AgentFeaturesConfig, AgentModel, AgentPathsConfig, AgentPlatform, AgentPlatformOverrides, AgentProcedure, AgentRule, AgentRuleBundle, AgentRuleScope, AgentSkill, AgentSubAgent, AgentSubAgentPlatformOverrides, ApproveMergeUpgradeOptions, AstroConfigOptions, AstroIntegrationSpec, AstroProjectOptions, AwsAccount, AwsCdkProjectOptions, AwsDeploymentTargetOptions, AwsLocalDeploymentConfig, AwsOrganization, AwsRegion, AwsTeardownWorkflowOptions, CiDeploymentConfig, ClassTypeOptions, ClaudeAutoModeConfig, ClaudeHookAction, ClaudeHookEntry, ClaudeHooksConfig, ClaudePermissionsConfig, ClaudeRuleTarget, ClaudeSandboxConfig, ClaudeSettingsConfig, CopilotHandoff, CursorHookAction, CursorHooksConfig, CursorSettingsConfig, CustomDocSection, DeployWorkflowOptions, DeploymentMetadata, FocusArea, FocusAreaMatch, FocusConfig, GitBranch, GitHubBoardMetadata, GitHubProjectMetadata, GitHubSprintMetadata, IDependencyResolver, LabelDefinition, LayoutEnforcement, LayoutViolation, McpServerConfig, McpTransport, MeetingArea, MeetingScope, MeetingType, MeetingsConfig, MergeMethod, MonorepoLayoutRoot, MonorepoProjectOptions, OrganizationMetadata, PnpmWorkspaceOptions, PriorityRule, ProjectMetadataOptions, RemoteCacheOptions, RepositoryMetadata, ResetTaskOptions, ResolvedAgentPaths, ResolvedProjectMetadata, SlackMetadata, SourceTierExamples, StarlightEditLink, StarlightLogo, StarlightProjectOptions, StarlightRole, StarlightSidebarItem, StarlightSingletonViolation, StarlightSocialLink, SyncLabelsOptions, TemplateResolveResult, TurboRepoOptions, TurboRepoTaskOptions, TypeScriptProjectOptions, VersionKey, VitestConfigOptions, VitestOptions };