@codedrifters/configulator 0.0.403 → 0.0.404

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.mjs CHANGED
@@ -5556,6 +5556,409 @@ function buildBcmWriterBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAU
5556
5556
  }
5557
5557
  var bcmWriterBundle = buildBcmWriterBundle();
5558
5558
 
5559
+ // src/turbo/turbo-repo.ts
5560
+ import {
5561
+ Component as Component2,
5562
+ FileBase,
5563
+ JsonFile,
5564
+ SampleDir,
5565
+ SampleFile
5566
+ } from "projen/lib";
5567
+ import { JobPermission } from "projen/lib/github/workflows-model";
5568
+
5569
+ // src/turbo/turbo-repo-task.ts
5570
+ import { Component } from "projen/lib";
5571
+ var TurboRepoTask = class extends Component {
5572
+ constructor(project, options) {
5573
+ super(project);
5574
+ this.project = project;
5575
+ this.name = options.name;
5576
+ this.dependsOn = options.dependsOn ?? [];
5577
+ this.env = options.env ?? [];
5578
+ this.passThroughEnv = options.passThroughEnv ?? [];
5579
+ this.outputs = options.outputs ?? [];
5580
+ this.cache = options.cache ?? true;
5581
+ this.inputs = [
5582
+ ...options.inputs ?? [],
5583
+ // rerun if projen config changes
5584
+ ".projen/**",
5585
+ // ignore mac files
5586
+ "!.DS_Store",
5587
+ "!**/.DS_Store"
5588
+ ];
5589
+ this.outputLogs = options.outputLogs ?? "new-only";
5590
+ this.persistent = options.persistent ?? false;
5591
+ this.interactive = options.interactive ?? false;
5592
+ this.isActive = true;
5593
+ }
5594
+ taskConfig() {
5595
+ return {
5596
+ dependsOn: this.dependsOn,
5597
+ env: this.env,
5598
+ passThroughEnv: this.passThroughEnv,
5599
+ outputs: this.outputs,
5600
+ cache: this.cache,
5601
+ inputs: this.inputs,
5602
+ outputLogs: this.outputLogs,
5603
+ persistent: this.persistent,
5604
+ interactive: this.interactive
5605
+ };
5606
+ }
5607
+ };
5608
+
5609
+ // src/turbo/turbo-repo.ts
5610
+ var ROOT_TURBO_TASK_NAME = "turbo:build";
5611
+ var ROOT_CI_TASK_NAME = "build:all";
5612
+ var _TurboRepo = class _TurboRepo extends Component2 {
5613
+ constructor(project, options = {}) {
5614
+ super(project);
5615
+ this.project = project;
5616
+ /**
5617
+ * Sub-Tasks to run
5618
+ */
5619
+ this.tasks = [];
5620
+ this.turboVersion = options.turboVersion ?? "catalog:";
5621
+ this.isRootProject = project === project.root;
5622
+ if (this.isRootProject) {
5623
+ project.addDevDeps(`turbo@${this.turboVersion}`);
5624
+ }
5625
+ project.gitignore.addPatterns("/.turbo");
5626
+ project.npmignore?.addPatterns("/.turbo/");
5627
+ this.extends = options.extends ?? (this.isRootProject ? [] : ["//"]);
5628
+ this.globalDependencies = options.globalDependencies ?? [];
5629
+ this.globalEnv = options.globalEnv ?? [];
5630
+ this.globalPassThroughEnv = options.globalPassThroughEnv ?? [];
5631
+ this.ui = options.ui ?? "stream";
5632
+ this.dangerouslyDisablePackageManagerCheck = options.dangerouslyDisablePackageManagerCheck ?? false;
5633
+ this.cacheDir = options.cacheDir ?? ".turbo/cache";
5634
+ this.daemon = options.daemon ?? true;
5635
+ this.envMode = options.envMode ?? "strict";
5636
+ this.runOptions = {
5637
+ ...options.runOptions,
5638
+ summarize: options.runOptions?.summarize ?? true,
5639
+ concurrency: options.runOptions?.concurrency ?? 10
5640
+ };
5641
+ this.remoteCacheOptions = options.remoteCacheOptions;
5642
+ this.buildAllTaskEnvVars = options.buildAllTaskEnvVars ?? {};
5643
+ this.buildTask = new TurboRepoTask(this.project, {
5644
+ name: ROOT_TURBO_TASK_NAME,
5645
+ dependsOn: this.isRootProject ? [`^${ROOT_TURBO_TASK_NAME}`] : []
5646
+ });
5647
+ if (this.isRootProject) {
5648
+ this.buildAllTask = this.project.tasks.addTask(ROOT_CI_TASK_NAME, {
5649
+ description: "Root build followed by sub-project builds. Mimics the CI build process in one step."
5650
+ });
5651
+ this.buildAllTask.exec("turbo telemetry disable");
5652
+ if (this.buildAllTaskEnvVars) {
5653
+ Object.entries(this.buildAllTaskEnvVars).forEach(([name, value]) => {
5654
+ this.addGlobalEnvVar(name, value);
5655
+ });
5656
+ }
5657
+ if (!this.remoteCacheOptions) {
5658
+ this.buildAllTask.exec(
5659
+ `turbo ${ROOT_TURBO_TASK_NAME} ${this.renderRunArgs(false)}`
5660
+ );
5661
+ } else {
5662
+ this.buildAllTask.exec(
5663
+ `turbo ${ROOT_TURBO_TASK_NAME} ${this.renderRunArgs(true)}`,
5664
+ {
5665
+ condition: '[ ! -n "$CI" ]',
5666
+ env: {
5667
+ TURBO_ENDPOINT: `$(aws ssm get-parameter --name ${this.remoteCacheOptions.endpointParamName} --query Parameter.Value --output text --profile ${this.remoteCacheOptions.profileName})`,
5668
+ TURBO_TOKEN: `$(aws ssm get-parameter --name ${this.remoteCacheOptions.tokenParamName} --query Parameter.Value --output text --profile ${this.remoteCacheOptions.profileName})`
5669
+ }
5670
+ }
5671
+ );
5672
+ this.buildAllTask.exec(
5673
+ `turbo ${ROOT_TURBO_TASK_NAME} ${this.renderRunArgs(true)}`,
5674
+ {
5675
+ condition: '[ -n "$CI" ]',
5676
+ env: {
5677
+ TURBO_ENDPOINT: `$(aws ssm get-parameter --name ${this.remoteCacheOptions.endpointParamName} --query Parameter.Value --output text)`,
5678
+ TURBO_TOKEN: `$(aws ssm get-parameter --name ${this.remoteCacheOptions.tokenParamName} --query Parameter.Value --output text)`
5679
+ }
5680
+ }
5681
+ );
5682
+ }
5683
+ }
5684
+ if (!this.isRootProject) {
5685
+ this.preCompileTask = new TurboRepoTask(project, {
5686
+ name: options.preCompileTask?.name ?? "pre-compile",
5687
+ inputs: ["src/**"]
5688
+ });
5689
+ this.compileTask = new TurboRepoTask(project, {
5690
+ name: options.compileTask?.name ?? "compile",
5691
+ inputs: ["src/**"]
5692
+ });
5693
+ this.postCompileTask = new TurboRepoTask(project, {
5694
+ name: options.postCompileTask?.name ?? "post-compile",
5695
+ inputs: ["src/**"]
5696
+ });
5697
+ this.testTask = new TurboRepoTask(project, {
5698
+ name: options.testTask?.name ?? "test"
5699
+ });
5700
+ this.packageTask = new TurboRepoTask(project, {
5701
+ name: options.packageTask?.name ?? "package",
5702
+ inputs: [".npmignore"]
5703
+ });
5704
+ this.tasks.push(
5705
+ this.preCompileTask,
5706
+ this.compileTask,
5707
+ this.postCompileTask,
5708
+ this.testTask,
5709
+ this.packageTask
5710
+ );
5711
+ }
5712
+ }
5713
+ /**
5714
+ * Static method to discovert turbo in a project.
5715
+ */
5716
+ static of(project) {
5717
+ const isDefined = (c) => c instanceof _TurboRepo;
5718
+ return project.components.find(isDefined);
5719
+ }
5720
+ /**
5721
+ * Render the `turbo run` CLI flag string for the `build:all` / `reset:all`
5722
+ * task commands from {@link runOptions}. With no `runOptions` configured the
5723
+ * output matches the historically hard-coded flags exactly.
5724
+ *
5725
+ * @param remote - when `true`, also emit the remote-cache flags
5726
+ * (`--cache=remote:rw` plus `--api` / `--token` / `--team` derived from
5727
+ * {@link remoteCacheOptions}). The remote-cache `build:all` variant passes
5728
+ * `true`; `reset:all` and the local `build:all` variant pass `false`.
5729
+ */
5730
+ renderRunArgs(remote) {
5731
+ const run = this.runOptions;
5732
+ const args = [];
5733
+ if (run.summarize) {
5734
+ args.push("--summarize");
5735
+ }
5736
+ args.push(`--concurrency=${run.concurrency}`);
5737
+ if (run.force) {
5738
+ args.push("--force");
5739
+ }
5740
+ if (run.noCache) {
5741
+ args.push("--no-cache");
5742
+ }
5743
+ if (run.only) {
5744
+ args.push("--only");
5745
+ }
5746
+ if (run.affected) {
5747
+ args.push("--affected");
5748
+ }
5749
+ if (run.cacheWorkers !== void 0) {
5750
+ args.push(`--cache-workers=${run.cacheWorkers}`);
5751
+ }
5752
+ if (run.continueOn !== void 0) {
5753
+ args.push(`--continue=${run.continueOn}`);
5754
+ }
5755
+ if (run.frameworkInference !== void 0) {
5756
+ args.push(`--framework-inference=${run.frameworkInference}`);
5757
+ }
5758
+ for (const filter of run.filter ?? []) {
5759
+ args.push(`--filter=${filter}`);
5760
+ }
5761
+ if (run.outputLogs !== void 0) {
5762
+ args.push(`--output-logs=${run.outputLogs}`);
5763
+ }
5764
+ if (run.logOrder !== void 0) {
5765
+ args.push(`--log-order=${run.logOrder}`);
5766
+ }
5767
+ if (run.logPrefix !== void 0) {
5768
+ args.push(`--log-prefix=${run.logPrefix}`);
5769
+ }
5770
+ if (run.dryRun !== void 0) {
5771
+ args.push(`--dry-run=${run.dryRun}`);
5772
+ }
5773
+ const cache = run.cache ?? (remote ? "remote:rw" : void 0);
5774
+ if (cache !== void 0) {
5775
+ args.push(`--cache=${cache}`);
5776
+ }
5777
+ if (remote && this.remoteCacheOptions) {
5778
+ args.push(
5779
+ "--api=$TURBO_ENDPOINT",
5780
+ "--token=$TURBO_TOKEN",
5781
+ `--team=${this.remoteCacheOptions.teamName}`
5782
+ );
5783
+ }
5784
+ if (run.additionalArgs) {
5785
+ args.push(...run.additionalArgs);
5786
+ }
5787
+ return args.join(" ");
5788
+ }
5789
+ /**
5790
+ * Add an env var to the global env vars for all tasks.
5791
+ * This will also become an input for the build:all task cache at the root.
5792
+ */
5793
+ addGlobalEnvVar(name, value) {
5794
+ this.buildAllTask?.env(name, value);
5795
+ if (this.isRootProject) {
5796
+ this.globalEnv.push(name);
5797
+ }
5798
+ }
5799
+ activateBranchNameEnvVar(options) {
5800
+ const value = '$([ -n "$GIT_BRANCH_NAME" ] && echo "$GIT_BRANCH_NAME" || git rev-parse --abbrev-ref HEAD)';
5801
+ if (options === void 0) {
5802
+ this.project.logger.warn(
5803
+ "TurboRepo.activateBranchNameEnvVar() with no arguments is deprecated. It writes GIT_BRANCH_NAME to the root `globalEnv`, which forces every task in the monorepo to miss cache on every branch switch. Pass `{ tasks: [...] }` and name only the tasks that actually consume the branch (e.g. CDK synth/package) to preserve cross-branch cache hits for everything else."
5804
+ );
5805
+ this.addGlobalEnvVar("GIT_BRANCH_NAME", value);
5806
+ return;
5807
+ }
5808
+ const knownTaskNames = this.tasks.map((task) => task.name);
5809
+ const unknown = options.tasks.filter(
5810
+ (name) => !knownTaskNames.includes(name)
5811
+ );
5812
+ if (unknown.length > 0) {
5813
+ throw new Error(
5814
+ `TurboRepo.activateBranchNameEnvVar: unknown task name(s) ${JSON.stringify(
5815
+ unknown
5816
+ )}. Known tasks on this TurboRepo: ${JSON.stringify(knownTaskNames)}.`
5817
+ );
5818
+ }
5819
+ for (const name of options.tasks) {
5820
+ const task = this.tasks.find((t) => t.name === name);
5821
+ if (task && !task.env.includes("GIT_BRANCH_NAME")) {
5822
+ task.env.push("GIT_BRANCH_NAME");
5823
+ }
5824
+ }
5825
+ }
5826
+ /**
5827
+ * Paths of all generated files in the project, deduped, for use as task
5828
+ * inputs so the compile cache invalidates when they change. Includes
5829
+ * projen-managed `FileBase` files plus generated-once `SampleFile` /
5830
+ * `SampleDir` — whose paths projen keeps private, so they are read defensively
5831
+ * and skipped if that internal shape ever changes. Computed at synth time so
5832
+ * files added after this component (e.g. a subclass's SampleFiles) are seen.
5833
+ */
5834
+ generatedFileInputs() {
5835
+ const inputs = /* @__PURE__ */ new Set();
5836
+ for (const component of this.project.components) {
5837
+ if (component instanceof FileBase) {
5838
+ inputs.add(component.path);
5839
+ } else if (component instanceof SampleFile) {
5840
+ const filePath = component.filePath;
5841
+ if (typeof filePath === "string") {
5842
+ inputs.add(filePath);
5843
+ }
5844
+ } else if (component instanceof SampleDir) {
5845
+ const dir = component.dir;
5846
+ if (typeof dir === "string") {
5847
+ inputs.add(`${dir}/**`);
5848
+ }
5849
+ }
5850
+ }
5851
+ return Array.from(inputs);
5852
+ }
5853
+ preSynthesize() {
5854
+ let nextDependsOn = this.project.deps.all.filter((d) => d.version === "workspace:*").map((d) => [d.name, ROOT_TURBO_TASK_NAME].join("#"));
5855
+ if (!this.isRootProject) {
5856
+ [
5857
+ [this.project.preCompileTask, this.preCompileTask],
5858
+ [this.project.compileTask, this.compileTask],
5859
+ [this.project.postCompileTask, this.postCompileTask],
5860
+ [this.project.testTask, this.testTask],
5861
+ [this.project.packageTask, this.packageTask]
5862
+ ].forEach(([pjTask, turboTask]) => {
5863
+ if (pjTask && turboTask && pjTask.steps.length > 0) {
5864
+ if (nextDependsOn.length > 0) {
5865
+ turboTask.dependsOn.push(...nextDependsOn);
5866
+ }
5867
+ nextDependsOn = [turboTask.name];
5868
+ } else {
5869
+ turboTask.isActive = false;
5870
+ }
5871
+ });
5872
+ this.buildTask.dependsOn.push(...nextDependsOn);
5873
+ }
5874
+ const generatedInputs = this.generatedFileInputs();
5875
+ const appendGeneratedInputs = (task) => {
5876
+ if (!task) {
5877
+ return;
5878
+ }
5879
+ for (const input of generatedInputs) {
5880
+ if (!task.inputs.includes(input)) {
5881
+ task.inputs.push(input);
5882
+ }
5883
+ }
5884
+ };
5885
+ if (this.isRootProject) {
5886
+ appendGeneratedInputs(this.buildTask);
5887
+ } else {
5888
+ appendGeneratedInputs(this.preCompileTask);
5889
+ appendGeneratedInputs(this.compileTask);
5890
+ appendGeneratedInputs(this.postCompileTask);
5891
+ }
5892
+ const fileName = "turbo.json";
5893
+ this.project.addPackageIgnore(fileName);
5894
+ new JsonFile(this.project, fileName, {
5895
+ obj: {
5896
+ extends: this.extends.length ? this.extends : void 0,
5897
+ globalDependencies: this.isRootProject && this.globalDependencies.length ? this.globalDependencies : void 0,
5898
+ globalEnv: this.isRootProject && this.globalEnv.length ? this.globalEnv : void 0,
5899
+ globalPassThroughEnv: this.isRootProject && this.globalPassThroughEnv.length ? this.globalPassThroughEnv : void 0,
5900
+ ui: this.isRootProject ? this.ui : void 0,
5901
+ dangerouslyDisablePackageManagerCheck: this.isRootProject ? this.dangerouslyDisablePackageManagerCheck : void 0,
5902
+ cacheDir: this.isRootProject ? this.cacheDir : void 0,
5903
+ envMode: this.isRootProject ? this.envMode : void 0,
5904
+ /**
5905
+ * All tasks
5906
+ */
5907
+ tasks: this.tasks.filter((task) => task.isActive).reduce(
5908
+ (acc, task) => {
5909
+ acc[task.name] = {
5910
+ ...task.taskConfig()
5911
+ };
5912
+ return acc;
5913
+ },
5914
+ {
5915
+ [this.buildTask.name]: { ...this.buildTask.taskConfig() }
5916
+ }
5917
+ )
5918
+ }
5919
+ });
5920
+ super.preSynthesize();
5921
+ }
5922
+ };
5923
+ _TurboRepo.buildWorkflowOptions = (remoteCacheOptions) => {
5924
+ return {
5925
+ env: {
5926
+ GIT_BRANCH_NAME: "${{ github.head_ref || github.ref_name }}"
5927
+ },
5928
+ permissions: {
5929
+ contents: JobPermission.WRITE,
5930
+ idToken: JobPermission.WRITE
5931
+ },
5932
+ preBuildSteps: [
5933
+ {
5934
+ name: "AWS Creds for SSM",
5935
+ uses: "aws-actions/configure-aws-credentials@v6",
5936
+ with: {
5937
+ ["role-to-assume"]: remoteCacheOptions.oidcRole,
5938
+ ["aws-region"]: "us-east-1",
5939
+ ["role-duration-seconds"]: "900"
5940
+ }
5941
+ }
5942
+ ]
5943
+ };
5944
+ };
5945
+ var TurboRepo = _TurboRepo;
5946
+
5947
+ // src/agent/bundles/build-policy.ts
5948
+ var DEFAULT_BUILD_POLICY = {
5949
+ remoteCacheEnabled: false
5950
+ };
5951
+ function resolveBuildPolicy(project) {
5952
+ const remoteCacheOptions = TurboRepo.of(project)?.remoteCacheOptions;
5953
+ if (!remoteCacheOptions) {
5954
+ return DEFAULT_BUILD_POLICY;
5955
+ }
5956
+ return {
5957
+ remoteCacheEnabled: true,
5958
+ awsProfileName: remoteCacheOptions.profileName
5959
+ };
5960
+ }
5961
+
5559
5962
  // src/agent/bundles/business-models.ts
5560
5963
  var TEMPLATE_CANVAS = `---
5561
5964
  title: "Business Model: <Segment Name>"
@@ -10494,188 +10897,210 @@ var cleanMergedBranchesSkill = {
10494
10897
  }
10495
10898
  ]
10496
10899
  };
10497
- var githubWorkflowBundle = {
10498
- name: "github-workflow",
10499
- description: "GitHub issue and PR workflow automation patterns",
10500
- appliesWhen: (project) => hasComponent(project, GitHub),
10501
- rules: [
10502
- {
10503
- name: "issue-workflow",
10504
- description: "Automated workflow for starting work on a GitHub issue",
10505
- scope: AGENT_RULE_SCOPE.ALWAYS,
10506
- content: [
10507
- "# Issue Workflow",
10508
- "",
10509
- '## "Work on issue X" Automation',
10510
- "",
10511
- "When the user says **work on issue X** (or similar), invoke the `issue-worker` agent in interactive mode, passing the issue number in the prompt. Do not perform the branch creation, issue fetching, or planning steps yourself \u2014 the agent handles the full workflow (claim, branch, plan, implement, PR) and will pause for your approval at the appropriate checkpoints."
10512
- ].join("\n"),
10513
- tags: ["workflow"]
10514
- },
10515
- {
10516
- name: "create-issue-workflow",
10517
- description: "Automated workflow for creating a new GitHub issue",
10518
- // ALWAYS scope: users invoke "create an issue" from any
10519
- // context, not only when editing agent / skill / bundle source.
10520
- // Consumers that want to narrow the load can override via
10521
- // `agentConfig.additionalRulePaths` or `excludeRules`.
10522
- scope: AGENT_RULE_SCOPE.ALWAYS,
10523
- content: [
10524
- "# Create Issue Workflow",
10525
- "",
10526
- '## "Create an issue" Automation',
10527
- "",
10528
- "When the user says **create an issue** (or similar), follow these steps exactly:",
10529
- "",
10530
- "1. **Determine the issue type prefix** from the user's description:",
10531
- " - `epic:` \u2014 Large initiatives spanning multiple child issues",
10532
- " - `feat:` \u2014 New features or functionality",
10533
- " - `fix:` \u2014 Bug fixes",
10534
- " - `chore:` \u2014 Maintenance: deps, tooling, config",
10535
- " - `docs:` \u2014 Documentation-only work",
10536
- " - `refactor:` \u2014 Code restructure, no behavior change",
10537
- " - `release:` \u2014 Release preparation, version bumps",
10538
- " - `hotfix:` \u2014 Urgent production fixes",
10539
- " - If unclear, ask the user which type applies",
10540
- "2. **Compose the issue title** in the format: `<type>: <short description>`",
10541
- "3. **Determine the GitHub issue type** based on the prefix:",
10542
- " - `epic:` \u2192 Epic",
10543
- " - `feat:` \u2192 Feature",
10544
- " - `fix:` \u2192 Bug",
10545
- " - `chore:`, `docs:`, `refactor:`, `release:`, `hotfix:` \u2192 Task",
10546
- "4. **Identify prerequisite issues** \u2014 if the user mentions dependencies or blockers, include a **Dependencies** section in the body with `Depends on: #<issue-number>`",
10547
- "5. **Determine labels** \u2014 every issue must be created with the following labels:",
10548
- " - **`type:*`** \u2014 derived from the issue title prefix:",
10549
- " - `epic:` \u2192 `type:feat`",
10550
- " - `feat:` \u2192 `type:feat`",
10551
- " - `fix:` \u2192 `type:fix`",
10552
- " - `chore:` \u2192 `type:chore`",
10553
- " - `docs:` \u2192 `type:docs`",
10554
- " - `refactor:` \u2192 `type:refactor`",
10555
- " - `release:` \u2192 `type:release`",
10556
- " - `hotfix:` \u2192 `type:hotfix`",
10557
- ' - **`priority:*`** \u2014 infer from the user\'s description when possible (e.g., "urgent"/"critical" \u2192 `priority:critical`, "important" \u2192 `priority:high`, "minor"/"low priority" \u2192 `priority:low`). If the priority is unclear, ask the user before creating the issue. Valid values: `priority:critical`, `priority:high`, `priority:medium`, `priority:low`, `priority:trivial`',
10558
- " - **`status:ready`** \u2014 always add unless the issue has dependencies or blockers, in which case use `status:blocked`",
10559
- "6. **Create the issue** using `gh issue create`:",
10560
- " - `--title '<type>: <description>'`",
10561
- " - `--body '<issue body>'`",
10562
- " - `--label '<type-label>' --label '<priority-label>' --label '<status-label>'`",
10563
- "7. **Set the GitHub issue type** by invoking the `set-issue-type.sh` helper (shipped with this bundle):",
10564
- "",
10565
- " ```sh",
10566
- " .claude/procedures/set-issue-type.sh <issue-number> <Feature|Task|Epic|Bug>",
10567
- " ```",
10568
- "",
10569
- " The helper resolves owner/repo, looks up the issue type node ID, looks up the issue node ID, and applies the `updateIssueIssueType` mutation in one step. It exits non-zero with a clear diagnostic on any error and lists available types if the type name is not recognised.",
10570
- "",
10571
- " **Under the hood** (documented fallback if the helper is unavailable): the helper performs a two-step GraphQL flow \u2014 first a `repository(...).issueTypes` query to map the human-readable type name to a node ID, then the `updateIssueIssueType` mutation. The canonical queries are:",
10572
- "",
10573
- " ```sh",
10574
- " gh api graphql -f query='query($owner:String!,$repo:String!){repository(owner:$owner,name:$repo){issueTypes(first:50){nodes{id name}}}}' -f owner=<owner> -f repo=<repo>",
10575
- " gh api graphql -f query='mutation($issueId:ID!,$typeId:ID!){updateIssueIssueType(input:{issueId:$issueId,issueTypeId:$typeId}){issue{number issueType{name}}}}' -f issueId=<issue-node-id> -f typeId=<issue-type-node-id>",
10576
- " ```",
10577
- "",
10578
- "### Issue Body Template",
10579
- "",
10580
- "```markdown",
10581
- "## Summary",
10582
- "",
10583
- "<1-3 sentences describing the issue>",
10584
- "",
10585
- "## Details",
10586
- "",
10587
- "<Detailed description, acceptance criteria, or reproduction steps as appropriate>",
10588
- "",
10589
- "## Dependencies",
10590
- "",
10591
- "Depends on: #<issue-number> (if any, otherwise omit this section)",
10592
- "```",
10593
- "",
10594
- "### Important",
10595
- "",
10596
- "- Always use the conventional prefix in the issue title",
10597
- "- Always assign the correct GitHub issue type via the `set-issue-type.sh` helper (step 7) \u2014 never via `gh issue create --type`",
10598
- "- Always include `type:*`, `priority:*`, and `status:*` labels",
10599
- "- If the user does not specify a type, ask before creating the issue",
10600
- "- If the priority cannot be inferred from the description, ask the user before creating the issue",
10601
- "- Keep titles concise and descriptive"
10602
- ].join("\n"),
10603
- tags: ["workflow"]
10604
- },
10605
- {
10606
- name: "pr-workflow",
10607
- description: "Automated workflow for opening a pull request",
10608
- scope: AGENT_RULE_SCOPE.ALWAYS,
10609
- content: [
10610
- "# PR Workflow",
10611
- "",
10612
- '## "Open a PR" Automation',
10613
- "",
10614
- "When the user says **open a PR** (or similar), follow these steps exactly:",
10615
- "",
10616
- "1. **Regenerate project files** \u2014 run the three-step regen sequence (`pnpm i`, then `pnpm exec projen`, then `pnpm i` again) to ensure all generated files are up to date. The leading `pnpm i` is required because `pnpm exec projen` synthesises against whatever version of configulator (and projen, and any projen plugins) is currently resolved in `node_modules`; if the lockfile has moved past `node_modules` (typically right after `git pull` lands a dependency upgrade, or on a fresh checkout), synth runs against stale templates and produces phantom drift in `.claude/`, `.github/labels.yml`, `CLAUDE.md`, and other generated files. The trailing `pnpm i` picks up any dependency changes projen wrote into `package.json` during synth. Check `git diff` after the third step \u2014 if there are changes, commit them before proceeding.",
10617
- "2. **Run the full monorepo build** \u2014 run `pnpm build:all` to compile, lint, and test all packages (mirrors the CI pipeline). This command requires the user to be authenticated to AWS on the prod account used for Turborepo remote caching (`readonlyaccess-prod-525259625215-us-east-1` profile). If the command fails due to AWS credentials, ask the user to authenticate first. If the build produces changes to turbo inputs (typically snapshot files or ESLint auto-fixes), commit those changes and run `pnpm build:all` again \u2014 the build must complete cleanly with no uncommitted changes.",
10618
- "3. **Check for uncommitted changes** \u2014 if any exist, commit them with a conventional commit message",
10619
- "4. **Pull and rebase from the default branch** \u2014 run `git pull origin {{repository.defaultBranch}} --rebase` to incorporate the latest changes and resolve any conflicts before pushing",
10620
- "5. **Push the branch** to origin: `git push -u origin <branch>`",
10621
- "6. **Create the PR** using `gh pr create`:",
10622
- " - **Title**: use a conventional commit style title (e.g., `feat(scope): short description`)",
10623
- " - **Body**: include `Closes #<issue-number>` (derived from the branch name) and a brief summary of changes",
10624
- "7. **Delegate review and merge to the `pr-reviewer` sub-agent.** After the PR is created, invoke the `/review-pr <pr-number>` skill (or otherwise hand the new PR number to the `pr-reviewer` sub-agent). The reviewer verifies the diff against the linked issue's acceptance criteria and enables squash auto-merge when all checks pass. Do **not** run `gh pr merge --auto` yourself \u2014 review/merge policy lives solely in the `pr-reviewer` agent.",
10625
- "",
10626
- "### PR Body Template",
10627
- "",
10628
- "```markdown",
10629
- "## Summary",
10630
- "",
10631
- "<1-3 bullet points describing what changed and why>",
10632
- "",
10633
- "Closes #<issue-number>",
10634
- "",
10635
- "## Test Plan",
10636
- "",
10637
- "- [ ] Tests pass locally",
10638
- "- [ ] Relevant changes have been reviewed",
10639
- "```",
10640
- "",
10641
- "### Important",
10642
- "",
10643
- "- Always derive the issue number from the branch name (e.g., `feat/42-add-login` \u2192 `#42`)",
10644
- "- Use conventional commit format for the PR title",
10645
- "- Delegate merge to the `pr-reviewer` sub-agent \u2014 do not merge manually and do not enable auto-merge directly"
10646
- ].join("\n"),
10647
- tags: ["workflow"]
10648
- },
10649
- {
10650
- name: "branch-cleanup",
10651
- description: "Local-branch hygiene helpers shipped with the github-workflow bundle, including the /clean-merged-branches skill for safely force-deleting branches whose content has already merged into the base (handles squash merges).",
10652
- scope: AGENT_RULE_SCOPE.ALWAYS,
10653
- content: [
10654
- "# Branch Cleanup",
10655
- "",
10656
- "Local branches accumulate after every merged PR. In squash-merge",
10657
- "repositories `git branch -d` refuses to delete them because the",
10658
- "commit hash on the base differs, even when the branch content is",
10659
- "fully merged. The `github-workflow` bundle ships two affordances",
10660
- "that use content-equality (not commit-graph reachability) to",
10661
- "identify branches safe to force-delete:",
10662
- "",
10663
- "- `/clean-merged-branches` \u2014 interactive slash-command skill that",
10664
- " classifies every local branch, prompts for confirmation, then",
10665
- " runs `git branch -D` on the confirmed list. See",
10666
- " `.claude/skills/clean-merged-branches/SKILL.md` for usage,",
10667
- " output format, and the squash-merge verification algorithm.",
10668
- "- `.claude/procedures/clean-merged-branches.sh` \u2014 analysis-only",
10669
- " procedure for non-interactive agent use (orchestrator,",
10670
- " maintenance-audit). NEVER deletes \u2014 only reports `MERGED` /",
10671
- " `UNMERGED` / `EMPTY` / `SKIP_WORKTREE` lines."
10672
- ].join("\n"),
10673
- tags: ["workflow"]
10674
- }
10675
- ],
10676
- skills: [cleanMergedBranchesSkill],
10677
- procedures: [setIssueTypeProcedure, cleanMergedBranchesProcedure]
10678
- };
10900
+ function renderPrWorkflowBuildStep(policy) {
10901
+ const lines = [
10902
+ "2. **Run the build \u2014 scoped to what changed.**",
10903
+ "",
10904
+ " - **Documentation-only changes** \u2014 a diff confined to documentation content (markdown pages, no source, config, or projen inputs) does **not** require `pnpm build:all`. There is nothing to compile, and CI is the authoritative content gate. Commit the content and proceed to the next step.",
10905
+ " - **Everything else** \u2014 when the change touches build inputs (source code, `.projenrc.ts`, `projenrc/**`, or any other projen-generated config), run `pnpm build:all` to compile, lint, and test all packages (mirrors the CI pipeline). If the build produces changes to turbo inputs (typically snapshot files or ESLint auto-fixes), commit those changes and run `pnpm build:all` again \u2014 the build must complete cleanly with no uncommitted changes."
10906
+ ];
10907
+ if (policy.remoteCacheEnabled && policy.awsProfileName) {
10908
+ lines.push(
10909
+ "",
10910
+ ` \`pnpm build:all\` uses the Turborepo **remote cache**, which requires the user to be authenticated to AWS on the \`${policy.awsProfileName}\` profile. If the command fails due to AWS credentials, ask the user to authenticate first.`
10911
+ );
10912
+ }
10913
+ lines.push(
10914
+ "",
10915
+ " **Never background a long build and end the turn.** If you run a build, run it in the **foreground** to completion before committing, pushing, or opening the PR. Launching `pnpm build:all` as a background process and ending your turn while it is still running strands the deliverable uncommitted \u2014 that work is lost. This is the documented root cause of autonomous worker-stall incidents."
10916
+ );
10917
+ return lines;
10918
+ }
10919
+ function buildGithubWorkflowBundle(buildPolicy = DEFAULT_BUILD_POLICY) {
10920
+ return {
10921
+ name: "github-workflow",
10922
+ description: "GitHub issue and PR workflow automation patterns",
10923
+ appliesWhen: (project) => hasComponent(project, GitHub),
10924
+ rules: [
10925
+ {
10926
+ name: "issue-workflow",
10927
+ description: "Automated workflow for starting work on a GitHub issue",
10928
+ scope: AGENT_RULE_SCOPE.ALWAYS,
10929
+ content: [
10930
+ "# Issue Workflow",
10931
+ "",
10932
+ '## "Work on issue X" Automation',
10933
+ "",
10934
+ "When the user says **work on issue X** (or similar), invoke the `issue-worker` agent in interactive mode, passing the issue number in the prompt. Do not perform the branch creation, issue fetching, or planning steps yourself \u2014 the agent handles the full workflow (claim, branch, plan, implement, PR) and will pause for your approval at the appropriate checkpoints."
10935
+ ].join("\n"),
10936
+ tags: ["workflow"]
10937
+ },
10938
+ {
10939
+ name: "create-issue-workflow",
10940
+ description: "Automated workflow for creating a new GitHub issue",
10941
+ // ALWAYS scope: users invoke "create an issue" from any
10942
+ // context, not only when editing agent / skill / bundle source.
10943
+ // Consumers that want to narrow the load can override via
10944
+ // `agentConfig.additionalRulePaths` or `excludeRules`.
10945
+ scope: AGENT_RULE_SCOPE.ALWAYS,
10946
+ content: [
10947
+ "# Create Issue Workflow",
10948
+ "",
10949
+ '## "Create an issue" Automation',
10950
+ "",
10951
+ "When the user says **create an issue** (or similar), follow these steps exactly:",
10952
+ "",
10953
+ "1. **Determine the issue type prefix** from the user's description:",
10954
+ " - `epic:` \u2014 Large initiatives spanning multiple child issues",
10955
+ " - `feat:` \u2014 New features or functionality",
10956
+ " - `fix:` \u2014 Bug fixes",
10957
+ " - `chore:` \u2014 Maintenance: deps, tooling, config",
10958
+ " - `docs:` \u2014 Documentation-only work",
10959
+ " - `refactor:` \u2014 Code restructure, no behavior change",
10960
+ " - `release:` \u2014 Release preparation, version bumps",
10961
+ " - `hotfix:` \u2014 Urgent production fixes",
10962
+ " - If unclear, ask the user which type applies",
10963
+ "2. **Compose the issue title** in the format: `<type>: <short description>`",
10964
+ "3. **Determine the GitHub issue type** based on the prefix:",
10965
+ " - `epic:` \u2192 Epic",
10966
+ " - `feat:` \u2192 Feature",
10967
+ " - `fix:` \u2192 Bug",
10968
+ " - `chore:`, `docs:`, `refactor:`, `release:`, `hotfix:` \u2192 Task",
10969
+ "4. **Identify prerequisite issues** \u2014 if the user mentions dependencies or blockers, include a **Dependencies** section in the body with `Depends on: #<issue-number>`",
10970
+ "5. **Determine labels** \u2014 every issue must be created with the following labels:",
10971
+ " - **`type:*`** \u2014 derived from the issue title prefix:",
10972
+ " - `epic:` \u2192 `type:feat`",
10973
+ " - `feat:` \u2192 `type:feat`",
10974
+ " - `fix:` \u2192 `type:fix`",
10975
+ " - `chore:` \u2192 `type:chore`",
10976
+ " - `docs:` \u2192 `type:docs`",
10977
+ " - `refactor:` \u2192 `type:refactor`",
10978
+ " - `release:` \u2192 `type:release`",
10979
+ " - `hotfix:` \u2192 `type:hotfix`",
10980
+ ' - **`priority:*`** \u2014 infer from the user\'s description when possible (e.g., "urgent"/"critical" \u2192 `priority:critical`, "important" \u2192 `priority:high`, "minor"/"low priority" \u2192 `priority:low`). If the priority is unclear, ask the user before creating the issue. Valid values: `priority:critical`, `priority:high`, `priority:medium`, `priority:low`, `priority:trivial`',
10981
+ " - **`status:ready`** \u2014 always add unless the issue has dependencies or blockers, in which case use `status:blocked`",
10982
+ "6. **Create the issue** using `gh issue create`:",
10983
+ " - `--title '<type>: <description>'`",
10984
+ " - `--body '<issue body>'`",
10985
+ " - `--label '<type-label>' --label '<priority-label>' --label '<status-label>'`",
10986
+ "7. **Set the GitHub issue type** by invoking the `set-issue-type.sh` helper (shipped with this bundle):",
10987
+ "",
10988
+ " ```sh",
10989
+ " .claude/procedures/set-issue-type.sh <issue-number> <Feature|Task|Epic|Bug>",
10990
+ " ```",
10991
+ "",
10992
+ " The helper resolves owner/repo, looks up the issue type node ID, looks up the issue node ID, and applies the `updateIssueIssueType` mutation in one step. It exits non-zero with a clear diagnostic on any error and lists available types if the type name is not recognised.",
10993
+ "",
10994
+ " **Under the hood** (documented fallback if the helper is unavailable): the helper performs a two-step GraphQL flow \u2014 first a `repository(...).issueTypes` query to map the human-readable type name to a node ID, then the `updateIssueIssueType` mutation. The canonical queries are:",
10995
+ "",
10996
+ " ```sh",
10997
+ " gh api graphql -f query='query($owner:String!,$repo:String!){repository(owner:$owner,name:$repo){issueTypes(first:50){nodes{id name}}}}' -f owner=<owner> -f repo=<repo>",
10998
+ " gh api graphql -f query='mutation($issueId:ID!,$typeId:ID!){updateIssueIssueType(input:{issueId:$issueId,issueTypeId:$typeId}){issue{number issueType{name}}}}' -f issueId=<issue-node-id> -f typeId=<issue-type-node-id>",
10999
+ " ```",
11000
+ "",
11001
+ "### Issue Body Template",
11002
+ "",
11003
+ "```markdown",
11004
+ "## Summary",
11005
+ "",
11006
+ "<1-3 sentences describing the issue>",
11007
+ "",
11008
+ "## Details",
11009
+ "",
11010
+ "<Detailed description, acceptance criteria, or reproduction steps as appropriate>",
11011
+ "",
11012
+ "## Dependencies",
11013
+ "",
11014
+ "Depends on: #<issue-number> (if any, otherwise omit this section)",
11015
+ "```",
11016
+ "",
11017
+ "### Important",
11018
+ "",
11019
+ "- Always use the conventional prefix in the issue title",
11020
+ "- Always assign the correct GitHub issue type via the `set-issue-type.sh` helper (step 7) \u2014 never via `gh issue create --type`",
11021
+ "- Always include `type:*`, `priority:*`, and `status:*` labels",
11022
+ "- If the user does not specify a type, ask before creating the issue",
11023
+ "- If the priority cannot be inferred from the description, ask the user before creating the issue",
11024
+ "- Keep titles concise and descriptive"
11025
+ ].join("\n"),
11026
+ tags: ["workflow"]
11027
+ },
11028
+ {
11029
+ name: "pr-workflow",
11030
+ description: "Automated workflow for opening a pull request",
11031
+ scope: AGENT_RULE_SCOPE.ALWAYS,
11032
+ content: [
11033
+ "# PR Workflow",
11034
+ "",
11035
+ '## "Open a PR" Automation',
11036
+ "",
11037
+ "When the user says **open a PR** (or similar), follow these steps exactly:",
11038
+ "",
11039
+ "1. **Regenerate project files** \u2014 run the three-step regen sequence (`pnpm i`, then `pnpm exec projen`, then `pnpm i` again) to ensure all generated files are up to date. The leading `pnpm i` is required because `pnpm exec projen` synthesises against whatever version of configulator (and projen, and any projen plugins) is currently resolved in `node_modules`; if the lockfile has moved past `node_modules` (typically right after `git pull` lands a dependency upgrade, or on a fresh checkout), synth runs against stale templates and produces phantom drift in `.claude/`, `.github/labels.yml`, `CLAUDE.md`, and other generated files. The trailing `pnpm i` picks up any dependency changes projen wrote into `package.json` during synth. Check `git diff` after the third step \u2014 if there are changes, commit them before proceeding.",
11040
+ ...renderPrWorkflowBuildStep(buildPolicy),
11041
+ "3. **Check for uncommitted changes** \u2014 if any exist, commit them with a conventional commit message",
11042
+ "4. **Pull and rebase from the default branch** \u2014 run `git pull origin {{repository.defaultBranch}} --rebase` to incorporate the latest changes and resolve any conflicts before pushing",
11043
+ "5. **Push the branch** to origin: `git push -u origin <branch>`",
11044
+ "6. **Create the PR** using `gh pr create`:",
11045
+ " - **Title**: use a conventional commit style title (e.g., `feat(scope): short description`)",
11046
+ " - **Body**: include `Closes #<issue-number>` (derived from the branch name) and a brief summary of changes",
11047
+ "7. **Delegate review and merge to the `pr-reviewer` sub-agent.** After the PR is created, invoke the `/review-pr <pr-number>` skill (or otherwise hand the new PR number to the `pr-reviewer` sub-agent). The reviewer verifies the diff against the linked issue's acceptance criteria and enables squash auto-merge when all checks pass. Do **not** run `gh pr merge --auto` yourself \u2014 review/merge policy lives solely in the `pr-reviewer` agent.",
11048
+ "",
11049
+ "### PR Body Template",
11050
+ "",
11051
+ "```markdown",
11052
+ "## Summary",
11053
+ "",
11054
+ "<1-3 bullet points describing what changed and why>",
11055
+ "",
11056
+ "Closes #<issue-number>",
11057
+ "",
11058
+ "## Test Plan",
11059
+ "",
11060
+ "- [ ] Tests pass locally",
11061
+ "- [ ] Relevant changes have been reviewed",
11062
+ "```",
11063
+ "",
11064
+ "### Important",
11065
+ "",
11066
+ "- Always derive the issue number from the branch name (e.g., `feat/42-add-login` \u2192 `#42`)",
11067
+ "- Use conventional commit format for the PR title",
11068
+ "- Delegate merge to the `pr-reviewer` sub-agent \u2014 do not merge manually and do not enable auto-merge directly"
11069
+ ].join("\n"),
11070
+ tags: ["workflow"]
11071
+ },
11072
+ {
11073
+ name: "branch-cleanup",
11074
+ description: "Local-branch hygiene helpers shipped with the github-workflow bundle, including the /clean-merged-branches skill for safely force-deleting branches whose content has already merged into the base (handles squash merges).",
11075
+ scope: AGENT_RULE_SCOPE.ALWAYS,
11076
+ content: [
11077
+ "# Branch Cleanup",
11078
+ "",
11079
+ "Local branches accumulate after every merged PR. In squash-merge",
11080
+ "repositories `git branch -d` refuses to delete them because the",
11081
+ "commit hash on the base differs, even when the branch content is",
11082
+ "fully merged. The `github-workflow` bundle ships two affordances",
11083
+ "that use content-equality (not commit-graph reachability) to",
11084
+ "identify branches safe to force-delete:",
11085
+ "",
11086
+ "- `/clean-merged-branches` \u2014 interactive slash-command skill that",
11087
+ " classifies every local branch, prompts for confirmation, then",
11088
+ " runs `git branch -D` on the confirmed list. See",
11089
+ " `.claude/skills/clean-merged-branches/SKILL.md` for usage,",
11090
+ " output format, and the squash-merge verification algorithm.",
11091
+ "- `.claude/procedures/clean-merged-branches.sh` \u2014 analysis-only",
11092
+ " procedure for non-interactive agent use (orchestrator,",
11093
+ " maintenance-audit). NEVER deletes \u2014 only reports `MERGED` /",
11094
+ " `UNMERGED` / `EMPTY` / `SKIP_WORKTREE` lines."
11095
+ ].join("\n"),
11096
+ tags: ["workflow"]
11097
+ }
11098
+ ],
11099
+ skills: [cleanMergedBranchesSkill],
11100
+ procedures: [setIssueTypeProcedure, cleanMergedBranchesProcedure]
11101
+ };
11102
+ }
11103
+ var githubWorkflowBundle = buildGithubWorkflowBundle();
10679
11104
 
10680
11105
  // src/agent/bundles/industry-discovery.ts
10681
11106
  function buildIndustryDiscoveryAnalystSubAgent(paths, issueDefaults) {
@@ -18986,7 +19411,7 @@ var peopleProfileBundle = buildPeopleProfileBundle();
18986
19411
 
18987
19412
  // src/pnpm/pnpm-workspace.ts
18988
19413
  import { relative } from "path";
18989
- import { Component, YamlFile } from "projen";
19414
+ import { Component as Component3, YamlFile } from "projen";
18990
19415
  var MINIMUM_RELEASE_AGE = {
18991
19416
  ZERO_DAYS: 0,
18992
19417
  ONE_HOUR: 60,
@@ -19000,7 +19425,7 @@ var MINIMUM_RELEASE_AGE = {
19000
19425
  SIX_DAYS: 8640,
19001
19426
  ONE_WEEK: 10080
19002
19427
  };
19003
- var PnpmWorkspace = class _PnpmWorkspace extends Component {
19428
+ var PnpmWorkspace = class _PnpmWorkspace extends Component3 {
19004
19429
  /**
19005
19430
  * Get the pnpm workspace component of a project. If it does not exist,
19006
19431
  * return undefined.
@@ -28565,7 +28990,7 @@ function buildResearchPipelineBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults
28565
28990
  var researchPipelineBundle = buildResearchPipelineBundle();
28566
28991
 
28567
28992
  // src/projects/project-metadata.ts
28568
- import { Component as Component2 } from "projen";
28993
+ import { Component as Component4 } from "projen";
28569
28994
  import { NodeProject } from "projen/lib/javascript";
28570
28995
  var GITHUB_HTTPS_RE = /(?:https?:\/\/|git\+https:\/\/)github\.com\/([^/]+)\/([^/.]+)(?:\.git)?/;
28571
28996
  var GITHUB_SSH_RE = /git@github\.com:([^/]+)\/([^/.]+)(?:\.git)?/;
@@ -28580,7 +29005,7 @@ function parseGitHubUrl(url) {
28580
29005
  }
28581
29006
  return { owner: void 0, name: void 0 };
28582
29007
  }
28583
- var ProjectMetadata = class _ProjectMetadata extends Component2 {
29008
+ var ProjectMetadata = class _ProjectMetadata extends Component4 {
28584
29009
  /**
28585
29010
  * Returns the ProjectMetadata instance for a project. Walks up the parent
28586
29011
  * chain so sub-projects resolve the metadata declared on a root
@@ -31177,435 +31602,56 @@ function buildStandardsResearchBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults
31177
31602
  }
31178
31603
  var standardsResearchBundle = buildStandardsResearchBundle();
31179
31604
 
31180
- // src/turbo/turbo-repo.ts
31181
- import {
31182
- Component as Component4,
31183
- FileBase,
31184
- JsonFile,
31185
- SampleDir,
31186
- SampleFile
31187
- } from "projen/lib";
31188
- import { JobPermission } from "projen/lib/github/workflows-model";
31189
-
31190
- // src/turbo/turbo-repo-task.ts
31191
- import { Component as Component3 } from "projen/lib";
31192
- var TurboRepoTask = class extends Component3 {
31193
- constructor(project, options) {
31194
- super(project);
31195
- this.project = project;
31196
- this.name = options.name;
31197
- this.dependsOn = options.dependsOn ?? [];
31198
- this.env = options.env ?? [];
31199
- this.passThroughEnv = options.passThroughEnv ?? [];
31200
- this.outputs = options.outputs ?? [];
31201
- this.cache = options.cache ?? true;
31202
- this.inputs = [
31203
- ...options.inputs ?? [],
31204
- // rerun if projen config changes
31205
- ".projen/**",
31206
- // ignore mac files
31207
- "!.DS_Store",
31208
- "!**/.DS_Store"
31209
- ];
31210
- this.outputLogs = options.outputLogs ?? "new-only";
31211
- this.persistent = options.persistent ?? false;
31212
- this.interactive = options.interactive ?? false;
31213
- this.isActive = true;
31214
- }
31215
- taskConfig() {
31216
- return {
31217
- dependsOn: this.dependsOn,
31218
- env: this.env,
31219
- passThroughEnv: this.passThroughEnv,
31220
- outputs: this.outputs,
31221
- cache: this.cache,
31222
- inputs: this.inputs,
31223
- outputLogs: this.outputLogs,
31224
- persistent: this.persistent,
31225
- interactive: this.interactive
31226
- };
31227
- }
31228
- };
31229
-
31230
- // src/turbo/turbo-repo.ts
31231
- var ROOT_TURBO_TASK_NAME = "turbo:build";
31232
- var ROOT_CI_TASK_NAME = "build:all";
31233
- var _TurboRepo = class _TurboRepo extends Component4 {
31234
- constructor(project, options = {}) {
31235
- super(project);
31236
- this.project = project;
31237
- /**
31238
- * Sub-Tasks to run
31239
- */
31240
- this.tasks = [];
31241
- this.turboVersion = options.turboVersion ?? "catalog:";
31242
- this.isRootProject = project === project.root;
31243
- if (this.isRootProject) {
31244
- project.addDevDeps(`turbo@${this.turboVersion}`);
31245
- }
31246
- project.gitignore.addPatterns("/.turbo");
31247
- project.npmignore?.addPatterns("/.turbo/");
31248
- this.extends = options.extends ?? (this.isRootProject ? [] : ["//"]);
31249
- this.globalDependencies = options.globalDependencies ?? [];
31250
- this.globalEnv = options.globalEnv ?? [];
31251
- this.globalPassThroughEnv = options.globalPassThroughEnv ?? [];
31252
- this.ui = options.ui ?? "stream";
31253
- this.dangerouslyDisablePackageManagerCheck = options.dangerouslyDisablePackageManagerCheck ?? false;
31254
- this.cacheDir = options.cacheDir ?? ".turbo/cache";
31255
- this.daemon = options.daemon ?? true;
31256
- this.envMode = options.envMode ?? "strict";
31257
- this.runOptions = {
31258
- ...options.runOptions,
31259
- summarize: options.runOptions?.summarize ?? true,
31260
- concurrency: options.runOptions?.concurrency ?? 10
31261
- };
31262
- this.remoteCacheOptions = options.remoteCacheOptions;
31263
- this.buildAllTaskEnvVars = options.buildAllTaskEnvVars ?? {};
31264
- this.buildTask = new TurboRepoTask(this.project, {
31265
- name: ROOT_TURBO_TASK_NAME,
31266
- dependsOn: this.isRootProject ? [`^${ROOT_TURBO_TASK_NAME}`] : []
31267
- });
31268
- if (this.isRootProject) {
31269
- this.buildAllTask = this.project.tasks.addTask(ROOT_CI_TASK_NAME, {
31270
- description: "Root build followed by sub-project builds. Mimics the CI build process in one step."
31271
- });
31272
- this.buildAllTask.exec("turbo telemetry disable");
31273
- if (this.buildAllTaskEnvVars) {
31274
- Object.entries(this.buildAllTaskEnvVars).forEach(([name, value]) => {
31275
- this.addGlobalEnvVar(name, value);
31276
- });
31277
- }
31278
- if (!this.remoteCacheOptions) {
31279
- this.buildAllTask.exec(
31280
- `turbo ${ROOT_TURBO_TASK_NAME} ${this.renderRunArgs(false)}`
31281
- );
31282
- } else {
31283
- this.buildAllTask.exec(
31284
- `turbo ${ROOT_TURBO_TASK_NAME} ${this.renderRunArgs(true)}`,
31285
- {
31286
- condition: '[ ! -n "$CI" ]',
31287
- env: {
31288
- TURBO_ENDPOINT: `$(aws ssm get-parameter --name ${this.remoteCacheOptions.endpointParamName} --query Parameter.Value --output text --profile ${this.remoteCacheOptions.profileName})`,
31289
- TURBO_TOKEN: `$(aws ssm get-parameter --name ${this.remoteCacheOptions.tokenParamName} --query Parameter.Value --output text --profile ${this.remoteCacheOptions.profileName})`
31290
- }
31291
- }
31292
- );
31293
- this.buildAllTask.exec(
31294
- `turbo ${ROOT_TURBO_TASK_NAME} ${this.renderRunArgs(true)}`,
31295
- {
31296
- condition: '[ -n "$CI" ]',
31297
- env: {
31298
- TURBO_ENDPOINT: `$(aws ssm get-parameter --name ${this.remoteCacheOptions.endpointParamName} --query Parameter.Value --output text)`,
31299
- TURBO_TOKEN: `$(aws ssm get-parameter --name ${this.remoteCacheOptions.tokenParamName} --query Parameter.Value --output text)`
31300
- }
31301
- }
31302
- );
31303
- }
31304
- }
31305
- if (!this.isRootProject) {
31306
- this.preCompileTask = new TurboRepoTask(project, {
31307
- name: options.preCompileTask?.name ?? "pre-compile",
31308
- inputs: ["src/**"]
31309
- });
31310
- this.compileTask = new TurboRepoTask(project, {
31311
- name: options.compileTask?.name ?? "compile",
31312
- inputs: ["src/**"]
31313
- });
31314
- this.postCompileTask = new TurboRepoTask(project, {
31315
- name: options.postCompileTask?.name ?? "post-compile",
31316
- inputs: ["src/**"]
31317
- });
31318
- this.testTask = new TurboRepoTask(project, {
31319
- name: options.testTask?.name ?? "test"
31320
- });
31321
- this.packageTask = new TurboRepoTask(project, {
31322
- name: options.packageTask?.name ?? "package",
31323
- inputs: [".npmignore"]
31324
- });
31325
- this.tasks.push(
31326
- this.preCompileTask,
31327
- this.compileTask,
31328
- this.postCompileTask,
31329
- this.testTask,
31330
- this.packageTask
31331
- );
31332
- }
31333
- }
31334
- /**
31335
- * Static method to discovert turbo in a project.
31336
- */
31337
- static of(project) {
31338
- const isDefined = (c) => c instanceof _TurboRepo;
31339
- return project.components.find(isDefined);
31340
- }
31341
- /**
31342
- * Render the `turbo run` CLI flag string for the `build:all` / `reset:all`
31343
- * task commands from {@link runOptions}. With no `runOptions` configured the
31344
- * output matches the historically hard-coded flags exactly.
31345
- *
31346
- * @param remote - when `true`, also emit the remote-cache flags
31347
- * (`--cache=remote:rw` plus `--api` / `--token` / `--team` derived from
31348
- * {@link remoteCacheOptions}). The remote-cache `build:all` variant passes
31349
- * `true`; `reset:all` and the local `build:all` variant pass `false`.
31350
- */
31351
- renderRunArgs(remote) {
31352
- const run = this.runOptions;
31353
- const args = [];
31354
- if (run.summarize) {
31355
- args.push("--summarize");
31356
- }
31357
- args.push(`--concurrency=${run.concurrency}`);
31358
- if (run.force) {
31359
- args.push("--force");
31360
- }
31361
- if (run.noCache) {
31362
- args.push("--no-cache");
31363
- }
31364
- if (run.only) {
31365
- args.push("--only");
31366
- }
31367
- if (run.affected) {
31368
- args.push("--affected");
31369
- }
31370
- if (run.cacheWorkers !== void 0) {
31371
- args.push(`--cache-workers=${run.cacheWorkers}`);
31372
- }
31373
- if (run.continueOn !== void 0) {
31374
- args.push(`--continue=${run.continueOn}`);
31375
- }
31376
- if (run.frameworkInference !== void 0) {
31377
- args.push(`--framework-inference=${run.frameworkInference}`);
31378
- }
31379
- for (const filter of run.filter ?? []) {
31380
- args.push(`--filter=${filter}`);
31381
- }
31382
- if (run.outputLogs !== void 0) {
31383
- args.push(`--output-logs=${run.outputLogs}`);
31384
- }
31385
- if (run.logOrder !== void 0) {
31386
- args.push(`--log-order=${run.logOrder}`);
31387
- }
31388
- if (run.logPrefix !== void 0) {
31389
- args.push(`--log-prefix=${run.logPrefix}`);
31390
- }
31391
- if (run.dryRun !== void 0) {
31392
- args.push(`--dry-run=${run.dryRun}`);
31393
- }
31394
- const cache = run.cache ?? (remote ? "remote:rw" : void 0);
31395
- if (cache !== void 0) {
31396
- args.push(`--cache=${cache}`);
31397
- }
31398
- if (remote && this.remoteCacheOptions) {
31399
- args.push(
31400
- "--api=$TURBO_ENDPOINT",
31401
- "--token=$TURBO_TOKEN",
31402
- `--team=${this.remoteCacheOptions.teamName}`
31403
- );
31404
- }
31405
- if (run.additionalArgs) {
31406
- args.push(...run.additionalArgs);
31407
- }
31408
- return args.join(" ");
31409
- }
31410
- /**
31411
- * Add an env var to the global env vars for all tasks.
31412
- * This will also become an input for the build:all task cache at the root.
31413
- */
31414
- addGlobalEnvVar(name, value) {
31415
- this.buildAllTask?.env(name, value);
31416
- if (this.isRootProject) {
31417
- this.globalEnv.push(name);
31418
- }
31419
- }
31420
- activateBranchNameEnvVar(options) {
31421
- const value = '$([ -n "$GIT_BRANCH_NAME" ] && echo "$GIT_BRANCH_NAME" || git rev-parse --abbrev-ref HEAD)';
31422
- if (options === void 0) {
31423
- this.project.logger.warn(
31424
- "TurboRepo.activateBranchNameEnvVar() with no arguments is deprecated. It writes GIT_BRANCH_NAME to the root `globalEnv`, which forces every task in the monorepo to miss cache on every branch switch. Pass `{ tasks: [...] }` and name only the tasks that actually consume the branch (e.g. CDK synth/package) to preserve cross-branch cache hits for everything else."
31425
- );
31426
- this.addGlobalEnvVar("GIT_BRANCH_NAME", value);
31427
- return;
31428
- }
31429
- const knownTaskNames = this.tasks.map((task) => task.name);
31430
- const unknown = options.tasks.filter(
31431
- (name) => !knownTaskNames.includes(name)
31432
- );
31433
- if (unknown.length > 0) {
31434
- throw new Error(
31435
- `TurboRepo.activateBranchNameEnvVar: unknown task name(s) ${JSON.stringify(
31436
- unknown
31437
- )}. Known tasks on this TurboRepo: ${JSON.stringify(knownTaskNames)}.`
31438
- );
31439
- }
31440
- for (const name of options.tasks) {
31441
- const task = this.tasks.find((t) => t.name === name);
31442
- if (task && !task.env.includes("GIT_BRANCH_NAME")) {
31443
- task.env.push("GIT_BRANCH_NAME");
31444
- }
31445
- }
31446
- }
31447
- /**
31448
- * Paths of all generated files in the project, deduped, for use as task
31449
- * inputs so the compile cache invalidates when they change. Includes
31450
- * projen-managed `FileBase` files plus generated-once `SampleFile` /
31451
- * `SampleDir` — whose paths projen keeps private, so they are read defensively
31452
- * and skipped if that internal shape ever changes. Computed at synth time so
31453
- * files added after this component (e.g. a subclass's SampleFiles) are seen.
31454
- */
31455
- generatedFileInputs() {
31456
- const inputs = /* @__PURE__ */ new Set();
31457
- for (const component of this.project.components) {
31458
- if (component instanceof FileBase) {
31459
- inputs.add(component.path);
31460
- } else if (component instanceof SampleFile) {
31461
- const filePath = component.filePath;
31462
- if (typeof filePath === "string") {
31463
- inputs.add(filePath);
31464
- }
31465
- } else if (component instanceof SampleDir) {
31466
- const dir = component.dir;
31467
- if (typeof dir === "string") {
31468
- inputs.add(`${dir}/**`);
31469
- }
31470
- }
31471
- }
31472
- return Array.from(inputs);
31473
- }
31474
- preSynthesize() {
31475
- let nextDependsOn = this.project.deps.all.filter((d) => d.version === "workspace:*").map((d) => [d.name, ROOT_TURBO_TASK_NAME].join("#"));
31476
- if (!this.isRootProject) {
31477
- [
31478
- [this.project.preCompileTask, this.preCompileTask],
31479
- [this.project.compileTask, this.compileTask],
31480
- [this.project.postCompileTask, this.postCompileTask],
31481
- [this.project.testTask, this.testTask],
31482
- [this.project.packageTask, this.packageTask]
31483
- ].forEach(([pjTask, turboTask]) => {
31484
- if (pjTask && turboTask && pjTask.steps.length > 0) {
31485
- if (nextDependsOn.length > 0) {
31486
- turboTask.dependsOn.push(...nextDependsOn);
31487
- }
31488
- nextDependsOn = [turboTask.name];
31489
- } else {
31490
- turboTask.isActive = false;
31491
- }
31492
- });
31493
- this.buildTask.dependsOn.push(...nextDependsOn);
31494
- }
31495
- const generatedInputs = this.generatedFileInputs();
31496
- const appendGeneratedInputs = (task) => {
31497
- if (!task) {
31498
- return;
31499
- }
31500
- for (const input of generatedInputs) {
31501
- if (!task.inputs.includes(input)) {
31502
- task.inputs.push(input);
31503
- }
31504
- }
31505
- };
31506
- if (this.isRootProject) {
31507
- appendGeneratedInputs(this.buildTask);
31508
- } else {
31509
- appendGeneratedInputs(this.preCompileTask);
31510
- appendGeneratedInputs(this.compileTask);
31511
- appendGeneratedInputs(this.postCompileTask);
31512
- }
31513
- const fileName = "turbo.json";
31514
- this.project.addPackageIgnore(fileName);
31515
- new JsonFile(this.project, fileName, {
31516
- obj: {
31517
- extends: this.extends.length ? this.extends : void 0,
31518
- globalDependencies: this.isRootProject && this.globalDependencies.length ? this.globalDependencies : void 0,
31519
- globalEnv: this.isRootProject && this.globalEnv.length ? this.globalEnv : void 0,
31520
- globalPassThroughEnv: this.isRootProject && this.globalPassThroughEnv.length ? this.globalPassThroughEnv : void 0,
31521
- ui: this.isRootProject ? this.ui : void 0,
31522
- dangerouslyDisablePackageManagerCheck: this.isRootProject ? this.dangerouslyDisablePackageManagerCheck : void 0,
31523
- cacheDir: this.isRootProject ? this.cacheDir : void 0,
31524
- envMode: this.isRootProject ? this.envMode : void 0,
31525
- /**
31526
- * All tasks
31527
- */
31528
- tasks: this.tasks.filter((task) => task.isActive).reduce(
31529
- (acc, task) => {
31530
- acc[task.name] = {
31531
- ...task.taskConfig()
31532
- };
31533
- return acc;
31534
- },
31535
- {
31536
- [this.buildTask.name]: { ...this.buildTask.taskConfig() }
31537
- }
31538
- )
31539
- }
31540
- });
31541
- super.preSynthesize();
31605
+ // src/agent/bundles/turborepo.ts
31606
+ function renderCachingBullet(policy) {
31607
+ if (policy.remoteCacheEnabled && policy.awsProfileName) {
31608
+ return `- Uses remote caching (requires AWS credentials on the \`${policy.awsProfileName}\` profile)`;
31542
31609
  }
31543
- };
31544
- _TurboRepo.buildWorkflowOptions = (remoteCacheOptions) => {
31610
+ return "- Local caching only \u2014 no remote cache is configured, so no AWS credentials are required";
31611
+ }
31612
+ function buildTurborepoBundle(buildPolicy = DEFAULT_BUILD_POLICY) {
31545
31613
  return {
31546
- env: {
31547
- GIT_BRANCH_NAME: "${{ github.head_ref || github.ref_name }}"
31548
- },
31549
- permissions: {
31550
- contents: JobPermission.WRITE,
31551
- idToken: JobPermission.WRITE
31552
- },
31553
- preBuildSteps: [
31614
+ name: "turborepo",
31615
+ description: "Turborepo workspace rules and task pipeline conventions",
31616
+ appliesWhen: (project) => hasComponent(project, TurboRepo),
31617
+ rules: [
31554
31618
  {
31555
- name: "AWS Creds for SSM",
31556
- uses: "aws-actions/configure-aws-credentials@v6",
31557
- with: {
31558
- ["role-to-assume"]: remoteCacheOptions.oidcRole,
31559
- ["aws-region"]: "us-east-1",
31560
- ["role-duration-seconds"]: "900"
31561
- }
31619
+ name: "turborepo-conventions",
31620
+ description: "Turborepo build system and task pipeline conventions",
31621
+ scope: AGENT_RULE_SCOPE.FILE_PATTERN,
31622
+ filePatterns: ["turbo.json", "package.json"],
31623
+ content: [
31624
+ "# Turborepo Conventions",
31625
+ "",
31626
+ "## Build System",
31627
+ "",
31628
+ "- **Build**: `pnpm build:all` (uses Turborepo)",
31629
+ "- **Test**: `pnpm test` or `pnpm test:watch`",
31630
+ "- **Lint**: `pnpm eslint`",
31631
+ "",
31632
+ "## Task Pipeline",
31633
+ "",
31634
+ renderCachingBullet(buildPolicy),
31635
+ "- Only rebuilds changed packages",
31636
+ "- Cache key based on file hashes and dependency graph",
31637
+ "- Configured in `turbo.json`",
31638
+ "",
31639
+ "## Workspace Rules",
31640
+ "",
31641
+ "- Source files: `src/` directory",
31642
+ "- Tests: Co-located with source files (`.spec.ts` or `.test.ts`)",
31643
+ "- Exports: Use `index.ts` files for clean public APIs",
31644
+ "- Configuration: Managed by Projen (edit `.projenrc.ts` or `projenrc/*.ts`)"
31645
+ ].join("\n"),
31646
+ tags: ["workflow"]
31562
31647
  }
31563
- ]
31564
- };
31565
- };
31566
- var TurboRepo = _TurboRepo;
31567
-
31568
- // src/agent/bundles/turborepo.ts
31569
- var turborepoBundle = {
31570
- name: "turborepo",
31571
- description: "Turborepo workspace rules and task pipeline conventions",
31572
- appliesWhen: (project) => hasComponent(project, TurboRepo),
31573
- rules: [
31574
- {
31575
- name: "turborepo-conventions",
31576
- description: "Turborepo build system and task pipeline conventions",
31577
- scope: AGENT_RULE_SCOPE.FILE_PATTERN,
31578
- filePatterns: ["turbo.json", "package.json"],
31579
- content: [
31580
- "# Turborepo Conventions",
31581
- "",
31582
- "## Build System",
31583
- "",
31584
- "- **Build**: `pnpm build:all` (uses Turborepo)",
31585
- "- **Test**: `pnpm test` or `pnpm test:watch`",
31586
- "- **Lint**: `pnpm eslint`",
31587
- "",
31588
- "## Task Pipeline",
31589
- "",
31590
- "- Uses remote caching (requires AWS credentials)",
31591
- "- Only rebuilds changed packages",
31592
- "- Cache key based on file hashes and dependency graph",
31593
- "- Configured in `turbo.json`",
31594
- "",
31595
- "## Workspace Rules",
31596
- "",
31597
- "- Source files: `src/` directory",
31598
- "- Tests: Co-located with source files (`.spec.ts` or `.test.ts`)",
31599
- "- Exports: Use `index.ts` files for clean public APIs",
31600
- "- Configuration: Managed by Projen (edit `.projenrc.ts` or `projenrc/*.ts`)"
31601
- ].join("\n"),
31602
- tags: ["workflow"]
31648
+ ],
31649
+ claudePermissions: {
31650
+ allow: ["Bash(npx turbo:*)"]
31603
31651
  }
31604
- ],
31605
- claudePermissions: {
31606
- allow: ["Bash(npx turbo:*)"]
31607
- }
31608
- };
31652
+ };
31653
+ }
31654
+ var turborepoBundle = buildTurborepoBundle();
31609
31655
 
31610
31656
  // src/agent/bundles/typescript.ts
31611
31657
  var typescriptBundle = {
@@ -32820,7 +32866,7 @@ function renderPriorityRulesSection(rules) {
32820
32866
  }
32821
32867
 
32822
32868
  // src/agent/bundles/index.ts
32823
- function buildBuiltInBundles(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAULT_RESOLVED_ISSUE_DEFAULTS, defaultAgentTier = AGENT_MODEL.BALANCED, bundleAgentTiers = /* @__PURE__ */ new Map(), prReviewPolicy = resolvePrReviewPolicy()) {
32869
+ function buildBuiltInBundles(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAULT_RESOLVED_ISSUE_DEFAULTS, defaultAgentTier = AGENT_MODEL.BALANCED, bundleAgentTiers = /* @__PURE__ */ new Map(), prReviewPolicy = resolvePrReviewPolicy(), buildPolicy = DEFAULT_BUILD_POLICY) {
32824
32870
  const tierFor = (bundle) => bundleAgentTiers.get(bundle) ?? defaultAgentTier;
32825
32871
  return [
32826
32872
  buildBaseBundle(paths),
@@ -32828,11 +32874,11 @@ function buildBuiltInBundles(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAUL
32828
32874
  typescriptBundle,
32829
32875
  vitestBundle,
32830
32876
  jestBundle,
32831
- turborepoBundle,
32877
+ buildTurborepoBundle(buildPolicy),
32832
32878
  pnpmBundle,
32833
32879
  awsCdkBundle,
32834
32880
  projenBundle,
32835
- githubWorkflowBundle,
32881
+ buildGithubWorkflowBundle(buildPolicy),
32836
32882
  slackBundle,
32837
32883
  buildMeetingAnalysisBundle(tierFor("meeting-analysis")),
32838
32884
  agendaBundle,
@@ -33917,6 +33963,13 @@ var AgentConfig = class _AgentConfig extends Component8 {
33917
33963
  * their rendered rule content reflects any consumer override.
33918
33964
  * Bundles that do not read agent paths are passed through as-is
33919
33965
  * from their default const exports.
33966
+ *
33967
+ * The build policy is auto-detected from the project's `TurboRepo`
33968
+ * component here rather than configured, so build guidance in the
33969
+ * `github-workflow` and `turborepo` rules only claims an AWS
33970
+ * credential requirement when a remote cache actually exists. The
33971
+ * getter is lazy by design — `TurboRepo` must already be attached
33972
+ * to the project when the bundles are first read.
33920
33973
  */
33921
33974
  get pathAwareBundles() {
33922
33975
  if (!this.cachedBundles) {
@@ -33925,7 +33978,8 @@ var AgentConfig = class _AgentConfig extends Component8 {
33925
33978
  resolveIssueDefaults(this.options.issueDefaults),
33926
33979
  resolveDefaultAgentTier(this.options),
33927
33980
  resolveBundleAgentTiers(this.options),
33928
- resolvePrReviewPolicy(this.options.prReviewPolicy)
33981
+ resolvePrReviewPolicy(this.options.prReviewPolicy),
33982
+ resolveBuildPolicy(this.project)
33929
33983
  );
33930
33984
  }
33931
33985
  return this.cachedBundles;
@@ -40643,6 +40697,7 @@ export {
40643
40697
  DEFAULT_API_EXTRACTOR_REPORT_FILENAME,
40644
40698
  DEFAULT_API_EXTRACTOR_REPORT_FOLDER,
40645
40699
  DEFAULT_AUDIT_REPORT_DIR,
40700
+ DEFAULT_BUILD_POLICY,
40646
40701
  DEFAULT_BUNDLE_OVERRIDES,
40647
40702
  DEFAULT_DECOMPOSITION_TEMPLATE,
40648
40703
  DEFAULT_DISPATCH_MODEL,
@@ -40763,6 +40818,7 @@ export {
40763
40818
  buildCompanyProfileBundle,
40764
40819
  buildCustomerProfileBundle,
40765
40820
  buildDocsSyncBundle,
40821
+ buildGithubWorkflowBundle,
40766
40822
  buildIndustryDiscoveryBundle,
40767
40823
  buildMaintenanceAuditBundle,
40768
40824
  buildMeetingAnalysisBundle,
@@ -40777,6 +40833,7 @@ export {
40777
40833
  buildResearchPipelineBundle,
40778
40834
  buildSoftwareProfileBundle,
40779
40835
  buildStandardsResearchBundle,
40836
+ buildTurborepoBundle,
40780
40837
  buildUnblockDependentsProcedure,
40781
40838
  bundleNameForWorkflowRule,
40782
40839
  businessModelsBundle,
@@ -40894,6 +40951,7 @@ export {
40894
40951
  resolveAgentTiers,
40895
40952
  resolveAstroProjectOutdir,
40896
40953
  resolveAwsCdkProjectOutdir,
40954
+ resolveBuildPolicy,
40897
40955
  resolveBundleAgentTiers,
40898
40956
  resolveDefaultAgentTier,
40899
40957
  resolveIssueDefaults,