@codedrifters/configulator 0.0.254 → 0.0.255
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 +72 -1
- package/lib/index.d.ts +73 -2
- package/lib/index.js +55 -0
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +54 -0
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.d.mts
CHANGED
|
@@ -925,6 +925,51 @@ interface AgentPathsConfig {
|
|
|
925
925
|
*/
|
|
926
926
|
readonly industriesRoot?: string;
|
|
927
927
|
}
|
|
928
|
+
/*******************************************************************************
|
|
929
|
+
*
|
|
930
|
+
* Priority Rules
|
|
931
|
+
*
|
|
932
|
+
******************************************************************************/
|
|
933
|
+
/**
|
|
934
|
+
* A single project-specific priority-detection rule.
|
|
935
|
+
*
|
|
936
|
+
* Rules let consuming repos declare a sector-prefix regex, label, body
|
|
937
|
+
* regex, or explicit issue-number pin that maps to one of the five
|
|
938
|
+
* `priority:*` tiers. The `base` bundle renders a "Project-specific
|
|
939
|
+
* priority rules" subsection into the `issue-label-conventions` rule
|
|
940
|
+
* when `AgentConfigOptions.priorityRules` is non-empty, in precedence
|
|
941
|
+
* order.
|
|
942
|
+
*
|
|
943
|
+
* Precedence is **first match wins** — rules are evaluated in the
|
|
944
|
+
* order supplied, and the bundle's default inference heuristics act as
|
|
945
|
+
* the fallback when nothing matches.
|
|
946
|
+
*
|
|
947
|
+
* @see AgentConfigOptions.priorityRules
|
|
948
|
+
*/
|
|
949
|
+
interface PriorityRule {
|
|
950
|
+
/** Target priority tier the rule maps matched issues to. */
|
|
951
|
+
readonly priority: "critical" | "high" | "medium" | "low" | "trivial";
|
|
952
|
+
/**
|
|
953
|
+
* Match predicate. At least one sub-field should be set; multiple
|
|
954
|
+
* sub-fields on the same rule combine as a logical OR (any one
|
|
955
|
+
* matching fires the rule).
|
|
956
|
+
*/
|
|
957
|
+
readonly match: {
|
|
958
|
+
/** Any of these labels present on the issue matches. */
|
|
959
|
+
readonly labels?: ReadonlyArray<string>;
|
|
960
|
+
/** Regex applied to the issue title, anchored as supplied. */
|
|
961
|
+
readonly titleRegex?: string;
|
|
962
|
+
/** Regex applied to the issue body, anchored as supplied. */
|
|
963
|
+
readonly bodyRegex?: string;
|
|
964
|
+
/** Explicit issue numbers pinned to this priority. */
|
|
965
|
+
readonly issueNumbers?: ReadonlyArray<number>;
|
|
966
|
+
};
|
|
967
|
+
/**
|
|
968
|
+
* Human-readable rationale rendered into the generated rule
|
|
969
|
+
* content so reviewers understand why the rule exists.
|
|
970
|
+
*/
|
|
971
|
+
readonly rationale: string;
|
|
972
|
+
}
|
|
928
973
|
/*******************************************************************************
|
|
929
974
|
*
|
|
930
975
|
* AgentConfig Options
|
|
@@ -1023,6 +1068,20 @@ interface AgentConfigOptions {
|
|
|
1023
1068
|
* does not yet alter generated rules.
|
|
1024
1069
|
*/
|
|
1025
1070
|
readonly paths?: AgentPathsConfig;
|
|
1071
|
+
/**
|
|
1072
|
+
* Project-specific priority-detection rules. Each rule declares a
|
|
1073
|
+
* match predicate (labels, title regex, body regex, or explicit
|
|
1074
|
+
* issue numbers) and a target `priority:*` tier.
|
|
1075
|
+
*
|
|
1076
|
+
* When non-empty, the `base` bundle renders a "Project-specific
|
|
1077
|
+
* priority rules" subsection into the `issue-label-conventions`
|
|
1078
|
+
* rule. Precedence is **first match wins**; the bundle's default
|
|
1079
|
+
* inference heuristics act as the fallback when no rule matches.
|
|
1080
|
+
*
|
|
1081
|
+
* @see PriorityRule
|
|
1082
|
+
* @see ./bundles/priority-rules.ts#renderPriorityRulesSection
|
|
1083
|
+
*/
|
|
1084
|
+
readonly priorityRules?: ReadonlyArray<PriorityRule>;
|
|
1026
1085
|
}
|
|
1027
1086
|
|
|
1028
1087
|
/**
|
|
@@ -1295,6 +1354,18 @@ declare const prReviewBundle: AgentRuleBundle;
|
|
|
1295
1354
|
*/
|
|
1296
1355
|
declare const projenBundle: AgentRuleBundle;
|
|
1297
1356
|
|
|
1357
|
+
/**
|
|
1358
|
+
* Render the markdown subsection appended to the
|
|
1359
|
+
* `issue-label-conventions` rule when `AgentConfigOptions.priorityRules`
|
|
1360
|
+
* is non-empty. Returns an empty string when the supplied array is
|
|
1361
|
+
* empty so callers can unconditionally concatenate the result.
|
|
1362
|
+
*
|
|
1363
|
+
* Precedence is **first match wins** — rules render in the order
|
|
1364
|
+
* supplied. The bundle's default inference heuristics act as the
|
|
1365
|
+
* fallback when no rule matches.
|
|
1366
|
+
*/
|
|
1367
|
+
declare function renderPriorityRulesSection(rules: ReadonlyArray<PriorityRule>): string;
|
|
1368
|
+
|
|
1298
1369
|
/**
|
|
1299
1370
|
* Requirements-analyst bundle — opt-in via `includeBundles: [\"requirements-analyst\"]`.
|
|
1300
1371
|
*
|
|
@@ -4017,4 +4088,4 @@ declare const COMPLETE_JOB_ID = "complete";
|
|
|
4017
4088
|
*/
|
|
4018
4089
|
declare function addBuildCompleteJob(buildWorkflow: BuildWorkflow): void;
|
|
4019
4090
|
|
|
4020
|
-
export { AGENT_MODEL, AGENT_PLATFORM, AGENT_RULE_SCOPE, AgentConfig, type AgentConfigOptions, 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 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 MergeMethod, type MonorepoLayoutRoot, MonorepoProject, type MonorepoProjectOptions, type OrganizationMetadata, PROD_DEPLOY_NAME, PnpmWorkspace, type PnpmWorkspaceOptions, 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, requirementsAnalystBundle, requirementsReviewerBundle, requirementsWriterBundle, researchPipelineBundle, resolveAgentPaths, resolveAstroProjectOutdir, resolveAwsCdkProjectOutdir, resolveModelAlias, resolveOutdirFromPackageName, resolveTemplateVariables, resolveTypeScriptProjectOutdir, slackBundle, softwareProfileBundle, turborepoBundle, typescriptBundle, validateMonorepoLayout, validateStarlightSingleton, vitestBundle };
|
|
4091
|
+
export { AGENT_MODEL, AGENT_PLATFORM, AGENT_RULE_SCOPE, AgentConfig, type AgentConfigOptions, 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 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 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, renderPriorityRulesSection, requirementsAnalystBundle, requirementsReviewerBundle, requirementsWriterBundle, researchPipelineBundle, resolveAgentPaths, resolveAstroProjectOutdir, resolveAwsCdkProjectOutdir, resolveModelAlias, resolveOutdirFromPackageName, resolveTemplateVariables, resolveTypeScriptProjectOutdir, slackBundle, softwareProfileBundle, turborepoBundle, typescriptBundle, validateMonorepoLayout, validateStarlightSingleton, vitestBundle };
|
package/lib/index.d.ts
CHANGED
|
@@ -974,6 +974,51 @@ interface AgentPathsConfig {
|
|
|
974
974
|
*/
|
|
975
975
|
readonly industriesRoot?: string;
|
|
976
976
|
}
|
|
977
|
+
/*******************************************************************************
|
|
978
|
+
*
|
|
979
|
+
* Priority Rules
|
|
980
|
+
*
|
|
981
|
+
******************************************************************************/
|
|
982
|
+
/**
|
|
983
|
+
* A single project-specific priority-detection rule.
|
|
984
|
+
*
|
|
985
|
+
* Rules let consuming repos declare a sector-prefix regex, label, body
|
|
986
|
+
* regex, or explicit issue-number pin that maps to one of the five
|
|
987
|
+
* `priority:*` tiers. The `base` bundle renders a "Project-specific
|
|
988
|
+
* priority rules" subsection into the `issue-label-conventions` rule
|
|
989
|
+
* when `AgentConfigOptions.priorityRules` is non-empty, in precedence
|
|
990
|
+
* order.
|
|
991
|
+
*
|
|
992
|
+
* Precedence is **first match wins** — rules are evaluated in the
|
|
993
|
+
* order supplied, and the bundle's default inference heuristics act as
|
|
994
|
+
* the fallback when nothing matches.
|
|
995
|
+
*
|
|
996
|
+
* @see AgentConfigOptions.priorityRules
|
|
997
|
+
*/
|
|
998
|
+
interface PriorityRule {
|
|
999
|
+
/** Target priority tier the rule maps matched issues to. */
|
|
1000
|
+
readonly priority: "critical" | "high" | "medium" | "low" | "trivial";
|
|
1001
|
+
/**
|
|
1002
|
+
* Match predicate. At least one sub-field should be set; multiple
|
|
1003
|
+
* sub-fields on the same rule combine as a logical OR (any one
|
|
1004
|
+
* matching fires the rule).
|
|
1005
|
+
*/
|
|
1006
|
+
readonly match: {
|
|
1007
|
+
/** Any of these labels present on the issue matches. */
|
|
1008
|
+
readonly labels?: ReadonlyArray<string>;
|
|
1009
|
+
/** Regex applied to the issue title, anchored as supplied. */
|
|
1010
|
+
readonly titleRegex?: string;
|
|
1011
|
+
/** Regex applied to the issue body, anchored as supplied. */
|
|
1012
|
+
readonly bodyRegex?: string;
|
|
1013
|
+
/** Explicit issue numbers pinned to this priority. */
|
|
1014
|
+
readonly issueNumbers?: ReadonlyArray<number>;
|
|
1015
|
+
};
|
|
1016
|
+
/**
|
|
1017
|
+
* Human-readable rationale rendered into the generated rule
|
|
1018
|
+
* content so reviewers understand why the rule exists.
|
|
1019
|
+
*/
|
|
1020
|
+
readonly rationale: string;
|
|
1021
|
+
}
|
|
977
1022
|
/*******************************************************************************
|
|
978
1023
|
*
|
|
979
1024
|
* AgentConfig Options
|
|
@@ -1072,6 +1117,20 @@ interface AgentConfigOptions {
|
|
|
1072
1117
|
* does not yet alter generated rules.
|
|
1073
1118
|
*/
|
|
1074
1119
|
readonly paths?: AgentPathsConfig;
|
|
1120
|
+
/**
|
|
1121
|
+
* Project-specific priority-detection rules. Each rule declares a
|
|
1122
|
+
* match predicate (labels, title regex, body regex, or explicit
|
|
1123
|
+
* issue numbers) and a target `priority:*` tier.
|
|
1124
|
+
*
|
|
1125
|
+
* When non-empty, the `base` bundle renders a "Project-specific
|
|
1126
|
+
* priority rules" subsection into the `issue-label-conventions`
|
|
1127
|
+
* rule. Precedence is **first match wins**; the bundle's default
|
|
1128
|
+
* inference heuristics act as the fallback when no rule matches.
|
|
1129
|
+
*
|
|
1130
|
+
* @see PriorityRule
|
|
1131
|
+
* @see ./bundles/priority-rules.ts#renderPriorityRulesSection
|
|
1132
|
+
*/
|
|
1133
|
+
readonly priorityRules?: ReadonlyArray<PriorityRule>;
|
|
1075
1134
|
}
|
|
1076
1135
|
|
|
1077
1136
|
/**
|
|
@@ -1344,6 +1403,18 @@ declare const prReviewBundle: AgentRuleBundle;
|
|
|
1344
1403
|
*/
|
|
1345
1404
|
declare const projenBundle: AgentRuleBundle;
|
|
1346
1405
|
|
|
1406
|
+
/**
|
|
1407
|
+
* Render the markdown subsection appended to the
|
|
1408
|
+
* `issue-label-conventions` rule when `AgentConfigOptions.priorityRules`
|
|
1409
|
+
* is non-empty. Returns an empty string when the supplied array is
|
|
1410
|
+
* empty so callers can unconditionally concatenate the result.
|
|
1411
|
+
*
|
|
1412
|
+
* Precedence is **first match wins** — rules render in the order
|
|
1413
|
+
* supplied. The bundle's default inference heuristics act as the
|
|
1414
|
+
* fallback when no rule matches.
|
|
1415
|
+
*/
|
|
1416
|
+
declare function renderPriorityRulesSection(rules: ReadonlyArray<PriorityRule>): string;
|
|
1417
|
+
|
|
1347
1418
|
/**
|
|
1348
1419
|
* Requirements-analyst bundle — opt-in via `includeBundles: [\"requirements-analyst\"]`.
|
|
1349
1420
|
*
|
|
@@ -4066,5 +4137,5 @@ declare const COMPLETE_JOB_ID = "complete";
|
|
|
4066
4137
|
*/
|
|
4067
4138
|
declare function addBuildCompleteJob(buildWorkflow: BuildWorkflow): void;
|
|
4068
4139
|
|
|
4069
|
-
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, requirementsAnalystBundle, requirementsReviewerBundle, requirementsWriterBundle, researchPipelineBundle, resolveAgentPaths, resolveAstroProjectOutdir, resolveAwsCdkProjectOutdir, resolveModelAlias, resolveOutdirFromPackageName, resolveTemplateVariables, resolveTypeScriptProjectOutdir, slackBundle, softwareProfileBundle, turborepoBundle, typescriptBundle, validateMonorepoLayout, validateStarlightSingleton, vitestBundle };
|
|
4070
|
-
export type { AgentConfigOptions, 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, GitBranch, GitHubBoardMetadata, GitHubProjectMetadata, GitHubSprintMetadata, IDependencyResolver, LabelDefinition, LayoutEnforcement, LayoutViolation, McpServerConfig, McpTransport, MergeMethod, MonorepoLayoutRoot, MonorepoProjectOptions, OrganizationMetadata, PnpmWorkspaceOptions, ProjectMetadataOptions, RemoteCacheOptions, RepositoryMetadata, ResetTaskOptions, ResolvedAgentPaths, ResolvedProjectMetadata, SlackMetadata, StarlightEditLink, StarlightLogo, StarlightProjectOptions, StarlightRole, StarlightSidebarItem, StarlightSingletonViolation, StarlightSocialLink, SyncLabelsOptions, TemplateResolveResult, TurboRepoOptions, TurboRepoTaskOptions, TypeScriptProjectOptions, VersionKey, VitestConfigOptions, VitestOptions };
|
|
4140
|
+
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, renderPriorityRulesSection, requirementsAnalystBundle, requirementsReviewerBundle, requirementsWriterBundle, researchPipelineBundle, resolveAgentPaths, resolveAstroProjectOutdir, resolveAwsCdkProjectOutdir, resolveModelAlias, resolveOutdirFromPackageName, resolveTemplateVariables, resolveTypeScriptProjectOutdir, slackBundle, softwareProfileBundle, turborepoBundle, typescriptBundle, validateMonorepoLayout, validateStarlightSingleton, vitestBundle };
|
|
4141
|
+
export type { AgentConfigOptions, 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, GitBranch, GitHubBoardMetadata, GitHubProjectMetadata, GitHubSprintMetadata, IDependencyResolver, LabelDefinition, LayoutEnforcement, LayoutViolation, McpServerConfig, McpTransport, 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 };
|
package/lib/index.js
CHANGED
|
@@ -243,6 +243,7 @@ __export(index_exports, {
|
|
|
243
243
|
pnpmBundle: () => pnpmBundle,
|
|
244
244
|
prReviewBundle: () => prReviewBundle,
|
|
245
245
|
projenBundle: () => projenBundle,
|
|
246
|
+
renderPriorityRulesSection: () => renderPriorityRulesSection,
|
|
246
247
|
requirementsAnalystBundle: () => requirementsAnalystBundle,
|
|
247
248
|
requirementsReviewerBundle: () => requirementsReviewerBundle,
|
|
248
249
|
requirementsWriterBundle: () => requirementsWriterBundle,
|
|
@@ -14580,6 +14581,45 @@ var vitestBundle = {
|
|
|
14580
14581
|
}
|
|
14581
14582
|
};
|
|
14582
14583
|
|
|
14584
|
+
// src/agent/bundles/priority-rules.ts
|
|
14585
|
+
function renderPriorityRulesSection(rules) {
|
|
14586
|
+
if (rules.length === 0) {
|
|
14587
|
+
return "";
|
|
14588
|
+
}
|
|
14589
|
+
const lines = [
|
|
14590
|
+
"## Project-specific priority rules",
|
|
14591
|
+
"",
|
|
14592
|
+
"These rules are supplied by this project through",
|
|
14593
|
+
"`AgentConfigOptions.priorityRules` and override the generic inference",
|
|
14594
|
+
"heuristics above. Rules evaluate in the order listed; **first match",
|
|
14595
|
+
"wins**. The bundle's default heuristics apply only when no rule below",
|
|
14596
|
+
"matches.",
|
|
14597
|
+
""
|
|
14598
|
+
];
|
|
14599
|
+
rules.forEach((rule, index) => {
|
|
14600
|
+
const matchDetails = [];
|
|
14601
|
+
if (rule.match.labels && rule.match.labels.length > 0) {
|
|
14602
|
+
const labelList = rule.match.labels.map((l) => `\`${l}\``).join(", ");
|
|
14603
|
+
matchDetails.push(`labels: ${labelList}`);
|
|
14604
|
+
}
|
|
14605
|
+
if (rule.match.titleRegex) {
|
|
14606
|
+
matchDetails.push(`title regex: \`${rule.match.titleRegex}\``);
|
|
14607
|
+
}
|
|
14608
|
+
if (rule.match.bodyRegex) {
|
|
14609
|
+
matchDetails.push(`body regex: \`${rule.match.bodyRegex}\``);
|
|
14610
|
+
}
|
|
14611
|
+
if (rule.match.issueNumbers && rule.match.issueNumbers.length > 0) {
|
|
14612
|
+
const numberList = rule.match.issueNumbers.map((n) => `#${n}`).join(", ");
|
|
14613
|
+
matchDetails.push(`issue numbers: ${numberList}`);
|
|
14614
|
+
}
|
|
14615
|
+
const matchSummary = matchDetails.length > 0 ? matchDetails.join("; ") : "(no match fields)";
|
|
14616
|
+
lines.push(
|
|
14617
|
+
`${index + 1}. **\`priority:${rule.priority}\`** when ${matchSummary} \u2014 ${rule.rationale}`
|
|
14618
|
+
);
|
|
14619
|
+
});
|
|
14620
|
+
return lines.join("\n");
|
|
14621
|
+
}
|
|
14622
|
+
|
|
14583
14623
|
// src/agent/bundles/index.ts
|
|
14584
14624
|
var BUILT_IN_BUNDLES = [
|
|
14585
14625
|
baseBundle,
|
|
@@ -15500,6 +15540,20 @@ ${extra}`
|
|
|
15500
15540
|
}
|
|
15501
15541
|
}
|
|
15502
15542
|
}
|
|
15543
|
+
if (this.options.priorityRules && this.options.priorityRules.length > 0) {
|
|
15544
|
+
const issueLabelRule = ruleMap.get("issue-label-conventions");
|
|
15545
|
+
if (issueLabelRule) {
|
|
15546
|
+
const section = renderPriorityRulesSection(this.options.priorityRules);
|
|
15547
|
+
ruleMap.set("issue-label-conventions", {
|
|
15548
|
+
...issueLabelRule,
|
|
15549
|
+
content: `${issueLabelRule.content}
|
|
15550
|
+
|
|
15551
|
+
---
|
|
15552
|
+
|
|
15553
|
+
${section}`
|
|
15554
|
+
});
|
|
15555
|
+
}
|
|
15556
|
+
}
|
|
15503
15557
|
return [...ruleMap.values()].sort((a, b) => {
|
|
15504
15558
|
if (a.name === "project-overview") return -1;
|
|
15505
15559
|
if (b.name === "project-overview") return 1;
|
|
@@ -18311,6 +18365,7 @@ var TypeScriptConfig = class extends import_projen22.Component {
|
|
|
18311
18365
|
pnpmBundle,
|
|
18312
18366
|
prReviewBundle,
|
|
18313
18367
|
projenBundle,
|
|
18368
|
+
renderPriorityRulesSection,
|
|
18314
18369
|
requirementsAnalystBundle,
|
|
18315
18370
|
requirementsReviewerBundle,
|
|
18316
18371
|
requirementsWriterBundle,
|