@codedrifters/configulator 0.0.278 → 0.0.280

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.js CHANGED
@@ -246,6 +246,7 @@ __export(index_exports, {
246
246
  DEFAULT_TYPE_LABELS: () => DEFAULT_TYPE_LABELS,
247
247
  DEFAULT_UNBLOCK_COMMENT_TEMPLATE: () => DEFAULT_UNBLOCK_COMMENT_TEMPLATE,
248
248
  DEFAULT_UNBLOCK_DEPENDENTS_ENABLED: () => DEFAULT_UNBLOCK_DEPENDENTS_ENABLED,
249
+ DEFAULT_UPSTREAM_CONFIGULATOR_ENABLED: () => DEFAULT_UPSTREAM_CONFIGULATOR_ENABLED,
249
250
  DOCS_SYNC_AUDIT_SCHEMA_VERSION: () => DOCS_SYNC_AUDIT_SCHEMA_VERSION,
250
251
  JsiiFaker: () => JsiiFaker,
251
252
  LAYOUT_ENFORCEMENT: () => LAYOUT_ENFORCEMENT,
@@ -412,6 +413,7 @@ __export(index_exports, {
412
413
  tsdocRecordToFindings: () => tsdocRecordToFindings,
413
414
  turborepoBundle: () => turborepoBundle,
414
415
  typescriptBundle: () => typescriptBundle,
416
+ upstreamConfigulatorDocsBundle: () => upstreamConfigulatorDocsBundle,
415
417
  validateAgentTierConfig: () => validateAgentTierConfig,
416
418
  validateIssueTemplatesConfig: () => validateIssueTemplatesConfig,
417
419
  validateMonorepoLayout: () => validateMonorepoLayout,
@@ -1680,10 +1682,14 @@ function renderIssueTemplatesCheckerScript(it) {
1680
1682
  "# that includes a `--title` flag on a subsequent line. Single-line",
1681
1683
  "# fragments and prose mentions are permitted.",
1682
1684
  "#",
1683
- "# Two paths are allow-listed: the templates page itself, and the",
1684
- "# `github-workflow` bundle's `create-issue-workflow` rule source",
1685
- "# (which documents the conventional call shape as taxonomy, not a",
1686
- "# downstream template).",
1685
+ "# Five paths are allow-listed: the templates page itself, the",
1686
+ "# `github-workflow` bundle's `create-issue-workflow` rule source,",
1687
+ "# the `upstream-configulator-docs` bundle's rule source, the",
1688
+ "# `issue-templates` bundle source (which renders the templates",
1689
+ "# page and so necessarily embeds the recipes as its content), and",
1690
+ "# the `issue-templates` test source (which contains recipe fixtures",
1691
+ "# used to exercise this very lint). All five legitimately contain",
1692
+ "# `gh issue create` recipes as taxonomy, content, or test fixtures.",
1687
1693
  "#",
1688
1694
  "# The bundle-path patterns and templates path are rendered from the",
1689
1695
  "# consumer's IssueTemplatesConfig at synth time \u2014 do not edit by",
@@ -1704,12 +1710,16 @@ function renderIssueTemplatesCheckerScript(it) {
1704
1710
  "",
1705
1711
  `templates_path=${JSON.stringify(it.templatesPath)}`,
1706
1712
  "",
1707
- "# Allow-listed paths: the templates page itself and the",
1708
- "# create-issue-workflow rule source (both legitimately contain",
1709
- "# `gh issue create` recipes).",
1713
+ "# Allow-listed paths: the templates page itself, the",
1714
+ "# create-issue-workflow rule source, the upstream-configulator-docs",
1715
+ "# rule source, and the issue-templates bundle source + test (which",
1716
+ "# render and exercise the lint and so necessarily embed recipes).",
1710
1717
  "allowlist=(",
1711
1718
  ` "$templates_path"`,
1712
1719
  ' "packages/@codedrifters/configulator/src/agent/bundles/github-workflow.ts"',
1720
+ ' "packages/@codedrifters/configulator/src/agent/bundles/upstream-configulator-docs.ts"',
1721
+ ' "packages/@codedrifters/configulator/src/agent/bundles/issue-templates.ts"',
1722
+ ' "packages/@codedrifters/configulator/src/agent/bundles/issue-templates.test.ts"',
1713
1723
  ")",
1714
1724
  "",
1715
1725
  "# Bundle-path glob patterns. Translated to anchored POSIX-extended",
@@ -16968,6 +16978,19 @@ var projenBundle = {
16968
16978
  "}",
16969
16979
  "```",
16970
16980
  "",
16981
+ "The same pattern applies to bundled sub-agents and skills. Use `agentConfig.subAgentExtensions` to append project-specific content to a sub-agent prompt and `agentConfig.skillExtensions` to append content to a skill's `SKILL.md` body. Both options mirror `ruleExtensions` exactly \u2014 keys are sub-agent / skill names, values are markdown appended after a horizontal rule, and unknown keys are silently ignored.",
16982
+ "",
16983
+ "```typescript",
16984
+ "agentConfig: {",
16985
+ " subAgentExtensions: {",
16986
+ " 'requirements-writer': '## Project-Specific Gaps\\n\\n- My custom guidance',",
16987
+ " },",
16988
+ " skillExtensions: {",
16989
+ " 'write-requirement': '## Project-Specific Templates\\n\\n- My custom template note',",
16990
+ " },",
16991
+ "}",
16992
+ "```",
16993
+ "",
16971
16994
  "## After Any Change",
16972
16995
  "",
16973
16996
  "Run the three-step regen sequence to regenerate the output files: `pnpm i`, then `pnpm exec projen`, then `pnpm i` again. The leading `pnpm i` syncs `node_modules` with the lockfile before synth so `pnpm exec projen` runs against the right configulator/projen/plugin versions; the trailing `pnpm i` refreshes the lockfile for any dependency changes projen made during synth."
@@ -26150,6 +26173,223 @@ var typescriptBundle = {
26150
26173
  }
26151
26174
  };
26152
26175
 
26176
+ // src/agent/bundles/upstream-configulator-docs.ts
26177
+ var DEFAULT_UPSTREAM_CONFIGULATOR_ENABLED = true;
26178
+ var UPSTREAM_CONFIGULATOR_DOCS_SUMMARY = [
26179
+ "# Upstream Configulator Docs",
26180
+ "",
26181
+ "This project consumes `@codedrifters/configulator` from the upstream repository **`codedrifters/packages`**. When you need to understand a configulator behaviour, project type, bundle, or rule, read the upstream docs first \u2014 the configulator package in this checkout is generated, not authoritative.",
26182
+ "",
26183
+ "## Where the docs live",
26184
+ "",
26185
+ "- **Repository:** `codedrifters/packages`",
26186
+ "- **Docs root:** `docs/src/content/docs/`",
26187
+ "- **Canonical absolute base URL:**",
26188
+ " <https://github.com/codedrifters/packages/tree/main/docs/src/content/docs/>",
26189
+ "",
26190
+ "Always link to upstream docs from this repo's CLAUDE.md or `.claude/rules/` using **absolute** GitHub URLs \u2014 relative links only work inside a single repo's tree, not across repos.",
26191
+ "",
26192
+ "## Reading the docs without cloning",
26193
+ "",
26194
+ "Use the `gh` CLI to read upstream docs from inside this checkout \u2014 no clone of `codedrifters/packages` required:",
26195
+ "",
26196
+ "```sh",
26197
+ "# Read one doc by path:",
26198
+ "gh api repos/codedrifters/packages/contents/docs/src/content/docs/<path> \\",
26199
+ " --jq '.content' | base64 -d",
26200
+ "",
26201
+ "# List a docs directory:",
26202
+ "gh api repos/codedrifters/packages/contents/docs/src/content/docs/<dir> \\",
26203
+ " --jq '.[].path'",
26204
+ "",
26205
+ "# Search docs by keyword:",
26206
+ "gh search code --repo codedrifters/packages --filename '*.md' '<query>'",
26207
+ "```",
26208
+ "",
26209
+ "The Contents API returns base64-encoded payloads \u2014 `--jq '.content' | base64 -d` is the canonical decode recipe.",
26210
+ "",
26211
+ "## Upstream-issue-first preference",
26212
+ "",
26213
+ "When configulator is missing a feature, surfaces a bug, or behaves wrong, **file an issue against `codedrifters/packages`** rather than patching around it locally. Manual downstream overrides in `agentConfig.rules` or `agentConfig.ruleExtensions` are a last resort, not a first response \u2014 they fork divergence into every consumer that hits the same gap.",
26214
+ "",
26215
+ "Use the conventional issue recipe (mirrors the `Create Issue Workflow` in this project's CLAUDE.md):",
26216
+ "",
26217
+ "```sh",
26218
+ "gh issue create --repo codedrifters/packages \\",
26219
+ " --title 'feat: <short description>' \\",
26220
+ " --label 'type:feat' \\",
26221
+ " --label 'priority:medium' \\",
26222
+ " --label 'status:ready' \\",
26223
+ " --body $'## Summary\\n\\n<1-3 sentences>\\n\\n## Details\\n\\n<context, acceptance criteria, or repro steps>'",
26224
+ "```",
26225
+ "",
26226
+ "Pick the `type:*` and matching prefix that describes the work (`feat:`, `fix:`, `chore:`, `docs:`, `refactor:`). Set `priority:*` from the urgency and use `status:blocked` instead of `status:ready` if the issue depends on another open issue.",
26227
+ "",
26228
+ "See `.claude/rules/upstream-configulator-docs-detail.md` for the full reference \u2014 extended `gh` recipes, common pitfalls (rate limits, base64 decoding, search vs. browse), and a complete issue-creation walkthrough."
26229
+ ].join("\n");
26230
+ var UPSTREAM_CONFIGULATOR_DOCS_DETAIL = [
26231
+ "# Upstream Configulator Docs \u2014 Detail",
26232
+ "",
26233
+ "This project depends on `@codedrifters/configulator` for its Projen project types, agent bundles, and generated rules. Configulator itself is developed in the upstream repository **`codedrifters/packages`** \u2014 the source of record for project-type defaults, bundle behaviour, rule content, and the agent-config schema.",
26234
+ "",
26235
+ "When you are editing `.projenrc.ts`, `projenrc/**`, `.claude/**`, or `CLAUDE.md` and need to confirm how a configulator feature works, **read the upstream docs before editing**. Generated files in this checkout are not authoritative; the upstream markdown is.",
26236
+ "",
26237
+ "## 1. Where configulator's docs live",
26238
+ "",
26239
+ "- **Upstream repo:** `codedrifters/packages`",
26240
+ "- **Docs root inside the repo:** `docs/src/content/docs/`",
26241
+ "- **Canonical absolute base URL:**",
26242
+ " <https://github.com/codedrifters/packages/tree/main/docs/src/content/docs/>",
26243
+ "",
26244
+ "Always cite upstream docs with **absolute** `https://github.com/codedrifters/packages/...` URLs when linking from this consumer's CLAUDE.md or `.claude/rules/`. Relative `../docs/...` links only resolve inside a single repo's tree \u2014 they break the moment a downstream agent loads the rule from a different checkout.",
26245
+ "",
26246
+ "Common doc subtrees (browse the canonical base above for the live tree):",
26247
+ "",
26248
+ "- `docs/src/content/docs/agents/` \u2014 agent bundles, phase contracts, issue templates",
26249
+ "- `docs/src/content/docs/components/` \u2014 Projen components and project types",
26250
+ "- `docs/src/content/docs/requirements/` \u2014 requirement documents and ADRs",
26251
+ "",
26252
+ "## 2. Reading the docs via the GitHub API",
26253
+ "",
26254
+ "Use `gh` to fetch upstream docs without cloning `codedrifters/packages`. The recipes below run from inside any consumer's checkout.",
26255
+ "",
26256
+ "### Browse a single doc by path",
26257
+ "",
26258
+ "```sh",
26259
+ "gh api repos/codedrifters/packages/contents/docs/src/content/docs/<path> \\",
26260
+ " --jq '.content' | base64 -d",
26261
+ "```",
26262
+ "",
26263
+ 'The GitHub Contents API returns `{ content: "<base64>", encoding: "base64", ... }`. The `--jq \'.content\'` filter strips the JSON envelope and `base64 -d` decodes the payload to plain Markdown. On macOS the decode flag is `base64 -D` on older `base64` versions \u2014 use `base64 -d` (lowercase) on the GNU coreutils install that ships with most modern dev environments.',
26264
+ "",
26265
+ "Example \u2014 fetch the agent issue-templates page:",
26266
+ "",
26267
+ "```sh",
26268
+ "gh api repos/codedrifters/packages/contents/docs/src/content/docs/agents/issue-templates.md \\",
26269
+ " --jq '.content' | base64 -d",
26270
+ "```",
26271
+ "",
26272
+ "### List a docs directory",
26273
+ "",
26274
+ "```sh",
26275
+ "gh api repos/codedrifters/packages/contents/docs/src/content/docs/<dir> \\",
26276
+ " --jq '.[].path'",
26277
+ "```",
26278
+ "",
26279
+ "Lists the immediate children (files and subdirectories) of `<dir>`. Use this to discover what's inside an agents/ or components/ subtree before browsing individual files.",
26280
+ "",
26281
+ "### Search docs by keyword",
26282
+ "",
26283
+ "```sh",
26284
+ "gh search code --repo codedrifters/packages --filename '*.md' '<query>'",
26285
+ "```",
26286
+ "",
26287
+ "`gh search code` hits the GitHub code-search index and is the right tool when you don't know which file to read. Scope by `--filename '*.md'` to keep results to documentation. Scope further with `--path 'docs/src/content/docs/<subtree>'` when you only care about one section.",
26288
+ "",
26289
+ "### Common pitfalls",
26290
+ "",
26291
+ "- **Forgot to base64-decode.** The Contents API never returns plain text \u2014 without `base64 -d` you get a base64 blob, not Markdown. Pipe through `base64 -d` every time.",
26292
+ "- **Rate limits.** Unauthenticated `gh` calls share a tight per-IP quota. Authenticate with `gh auth login` before running these recipes; an authenticated token gets a 5,000-request hourly quota that is more than enough for interactive doc browsing.",
26293
+ "- **Search vs. browse.** `gh search code` is best when you don't know the path. `gh api .../contents/...` is best when you do. Don't search for a path you already know \u2014 it's slower and the search index can lag behind the live file by a few minutes.",
26294
+ "- **Branch defaults.** All recipes default to the repo's default branch (`main`). To read a doc from a feature branch, append `?ref=<branch>` to the contents-API path: `gh api 'repos/codedrifters/packages/contents/<path>?ref=<branch>' --jq '.content' | base64 -d`.",
26295
+ "- **Large directories.** `gh api .../contents/<dir>` truncates responses over 1,000 entries. The `docs/src/content/docs/` subtrees are well under that limit today, but if you ever hit truncation, fall back to the Git Trees API: `gh api repos/codedrifters/packages/git/trees/main?recursive=1 --jq '.tree[] | select(.path | startswith(\"docs/src/content/docs/\")) | .path'`.",
26296
+ "",
26297
+ "## 3. Upstream-issue-first preference",
26298
+ "",
26299
+ "Configulator's rules, bundles, project types, and agent contracts ship for every consumer of the package. When you find a gap or a bug, the right fix is almost always upstream \u2014 patching around it locally forks divergence into this consumer and silently denies every other consumer the fix.",
26300
+ "",
26301
+ "**Default policy:** file an issue against `codedrifters/packages`. Reach for `agentConfig.rules` (new local rule) or `agentConfig.ruleExtensions` (append to a bundle rule) only when the upstream change is non-trivial and you need to unblock immediate work.",
26302
+ "",
26303
+ "### Canonical issue-creation recipe",
26304
+ "",
26305
+ "The recipe mirrors the `Create Issue Workflow` documented in this project's CLAUDE.md \u2014 same conventional-prefix titles, same `type:*` / `priority:*` / `status:*` label set, same body template \u2014 with `--repo codedrifters/packages` so it works from inside any consumer's checkout:",
26306
+ "",
26307
+ "```sh",
26308
+ "gh issue create --repo codedrifters/packages \\",
26309
+ " --title '<type>: <short description>' \\",
26310
+ " --label '<type-label>' \\",
26311
+ " --label '<priority-label>' \\",
26312
+ " --label '<status-label>' \\",
26313
+ " --body $'## Summary\\n\\n<1-3 sentences describing the issue>\\n\\n## Details\\n\\n<acceptance criteria, repro steps, or context>'",
26314
+ "```",
26315
+ "",
26316
+ "### Title prefix \u2192 type label",
26317
+ "",
26318
+ "Pick exactly one matching pair:",
26319
+ "",
26320
+ "| Title prefix | `type:*` label | Use for |",
26321
+ "|--------------|----------------|---------|",
26322
+ "| `feat:` | `type:feat` | New features or functionality |",
26323
+ "| `fix:` | `type:fix` | Bug fixes |",
26324
+ "| `chore:` | `type:chore` | Maintenance: deps, tooling, config |",
26325
+ "| `docs:` | `type:docs` | Documentation-only work |",
26326
+ "| `refactor:` | `type:refactor` | Code restructure, no behavior change |",
26327
+ "| `release:` | `type:release` | Release preparation, version bumps |",
26328
+ "| `hotfix:` | `type:hotfix` | Urgent production fixes |",
26329
+ "| `epic:` | `type:feat` | Large initiatives spanning multiple child issues |",
26330
+ "",
26331
+ "### Priority and status labels",
26332
+ "",
26333
+ "- `priority:*` \u2014 pick exactly one of `priority:critical`, `priority:high`, `priority:medium`, `priority:low`, `priority:trivial`. Default to `priority:medium` when nothing in the request signals urgency. Use `priority:high` for blockers and `priority:critical` only for outages or release-blocking work.",
26334
+ "- `status:*` \u2014 `status:ready` for self-contained issues, `status:blocked` when the issue declares `Depends on: #<n>` against another open issue.",
26335
+ "",
26336
+ "### Worked example",
26337
+ "",
26338
+ "Suppose configulator's `software-profile-analyst` agent prompt is missing a step you need. Instead of forking the prompt locally:",
26339
+ "",
26340
+ "```sh",
26341
+ "gh issue create --repo codedrifters/packages \\",
26342
+ " --title 'feat: software-profile-analyst should record vendor pricing tier' \\",
26343
+ " --label 'type:feat' \\",
26344
+ " --label 'priority:medium' \\",
26345
+ " --label 'status:ready' \\",
26346
+ " --body $'## Summary\\n\\nThe `software-profile-analyst` Phase 2 prompt does not capture the vendor pricing tier (free / paid / enterprise), which downstream consumers need for segment matching.\\n\\n## Details\\n\\n- Add a `Pricing tier` field to the profile template at `docs/src/content/docs/agents/software-profile-analyst.md`\\n- Update the Phase 2 instructions to require the field before commit\\n- Add a regression test in `bundles.test.ts`'",
26347
+ "```",
26348
+ "",
26349
+ "After filing, reference the upstream issue from any local workaround so it can be reverted once the upstream fix lands:",
26350
+ "",
26351
+ "```typescript",
26352
+ "// TODO(codedrifters/packages#<N>): remove this override once upstream lands the fix.",
26353
+ "agentConfig: {",
26354
+ " ruleExtensions: {",
26355
+ " 'software-profile-analyst': '## Local override\\n\\n- Capture pricing tier...',",
26356
+ " },",
26357
+ "}",
26358
+ "```",
26359
+ "",
26360
+ "### When a local override is the right call",
26361
+ "",
26362
+ "Reach for `agentConfig.rules` or `agentConfig.ruleExtensions` only when **all** of the following hold:",
26363
+ "",
26364
+ "- The need is genuinely consumer-specific (not a gap that affects every configulator user).",
26365
+ "- An upstream fix would take longer than you can wait, **and** you have already filed the upstream issue with a `TODO(codedrifters/packages#<N>)` reference in the local override.",
26366
+ "- The override is small enough that diverging from upstream for a few days is cheaper than blocking on the upstream change.",
26367
+ "",
26368
+ "Anything that fails one of those tests belongs upstream first. The `# Reference Documentation` rule in this project's CLAUDE.md says it explicitly: trust the project sources and ask for clarification \u2014 that protocol extends across repo boundaries to `codedrifters/packages` for anything configulator owns."
26369
+ ].join("\n");
26370
+ var upstreamConfigulatorDocsBundle = {
26371
+ name: "upstream-configulator-docs",
26372
+ description: "Pointers to @codedrifters/configulator's upstream docs and the upstream-issue protocol for missing features. Gated by AgentConfigOptions.upstreamConfigulator.enabled (default true).",
26373
+ appliesWhen: () => true,
26374
+ rules: [
26375
+ {
26376
+ name: "upstream-configulator-docs",
26377
+ description: "Top-level reminder that the project consumes @codedrifters/configulator and where the upstream docs live",
26378
+ scope: AGENT_RULE_SCOPE.ALWAYS,
26379
+ content: UPSTREAM_CONFIGULATOR_DOCS_SUMMARY,
26380
+ tags: ["project"]
26381
+ },
26382
+ {
26383
+ name: "upstream-configulator-docs-detail",
26384
+ description: "Detailed protocol for reading @codedrifters/configulator upstream docs and filing upstream issues",
26385
+ scope: AGENT_RULE_SCOPE.FILE_PATTERN,
26386
+ filePatterns: [".projenrc.ts", "projenrc/**", ".claude/**", "CLAUDE.md"],
26387
+ content: UPSTREAM_CONFIGULATOR_DOCS_DETAIL,
26388
+ tags: ["project"]
26389
+ }
26390
+ ]
26391
+ };
26392
+
26153
26393
  // src/vitest/vitest-component.ts
26154
26394
  var import_projen3 = require("projen");
26155
26395
  var import_javascript2 = require("projen/lib/javascript");
@@ -26751,6 +26991,7 @@ function renderPriorityRulesSection(rules) {
26751
26991
  function buildBuiltInBundles(paths = DEFAULT_AGENT_PATHS) {
26752
26992
  return [
26753
26993
  buildBaseBundle(paths),
26994
+ upstreamConfigulatorDocsBundle,
26754
26995
  typescriptBundle,
26755
26996
  vitestBundle,
26756
26997
  jestBundle,
@@ -28074,6 +28315,13 @@ ${hook}`
28074
28315
  } else {
28075
28316
  ruleMap.delete("source-quality-verification");
28076
28317
  }
28318
+ if (this.options.upstreamConfigulator?.enabled === false) {
28319
+ for (const ruleName of [...ruleMap.keys()]) {
28320
+ if (ruleName.startsWith("upstream-configulator-docs")) {
28321
+ ruleMap.delete(ruleName);
28322
+ }
28323
+ }
28324
+ }
28077
28325
  return [...ruleMap.values()].sort((a, b) => {
28078
28326
  if (a.name === "project-overview") return -1;
28079
28327
  if (b.name === "project-overview") return 1;
@@ -28243,9 +28491,13 @@ ${hook}`
28243
28491
  });
28244
28492
  }
28245
28493
  /**
28246
- * Resolves template variables in skill instructions using project metadata.
28494
+ * Resolves template variables in skill instructions using project metadata,
28495
+ * then appends any matching `skillExtensions` content after a horizontal
28496
+ * rule. Unknown keys in `skillExtensions` are silently ignored, mirroring
28497
+ * the `ruleExtensions` contract.
28247
28498
  */
28248
28499
  resolveSkillTemplates(skills, metadata) {
28500
+ const extensions = this.options.skillExtensions;
28249
28501
  return skills.map((skill) => {
28250
28502
  const { resolved, unresolvedKeys } = resolveTemplateVariables(
28251
28503
  skill.instructions,
@@ -28256,13 +28508,24 @@ ${hook}`
28256
28508
  `AgentConfig: ProjectMetadata not found; skill '${skill.name}' using default values`
28257
28509
  );
28258
28510
  }
28259
- return resolved !== skill.instructions ? { ...skill, instructions: resolved } : skill;
28511
+ const extra = extensions?.[skill.name];
28512
+ const baseInstructions = resolved;
28513
+ const finalInstructions = extra !== void 0 && extra !== "" ? `${baseInstructions}
28514
+
28515
+ ---
28516
+
28517
+ ${extra}` : baseInstructions;
28518
+ return finalInstructions !== skill.instructions ? { ...skill, instructions: finalInstructions } : skill;
28260
28519
  });
28261
28520
  }
28262
28521
  /**
28263
- * Resolves template variables in sub-agent prompts using project metadata.
28522
+ * Resolves template variables in sub-agent prompts using project metadata,
28523
+ * then appends any matching `subAgentExtensions` content after a horizontal
28524
+ * rule. Unknown keys in `subAgentExtensions` are silently ignored,
28525
+ * mirroring the `ruleExtensions` contract.
28264
28526
  */
28265
28527
  resolveSubAgentTemplates(subAgents, metadata) {
28528
+ const extensions = this.options.subAgentExtensions;
28266
28529
  return subAgents.map((agent) => {
28267
28530
  const { resolved, unresolvedKeys } = resolveTemplateVariables(
28268
28531
  agent.prompt,
@@ -28273,7 +28536,14 @@ ${hook}`
28273
28536
  `AgentConfig: ProjectMetadata not found; sub-agent '${agent.name}' using default values`
28274
28537
  );
28275
28538
  }
28276
- return resolved !== agent.prompt ? { ...agent, prompt: resolved } : agent;
28539
+ const extra = extensions?.[agent.name];
28540
+ const basePrompt = resolved;
28541
+ const finalPrompt = extra !== void 0 && extra !== "" ? `${basePrompt}
28542
+
28543
+ ---
28544
+
28545
+ ${extra}` : basePrompt;
28546
+ return finalPrompt !== agent.prompt ? { ...agent, prompt: finalPrompt } : agent;
28277
28547
  });
28278
28548
  }
28279
28549
  /**
@@ -32547,6 +32817,7 @@ var TypeScriptConfig = class extends import_projen23.Component {
32547
32817
  DEFAULT_TYPE_LABELS,
32548
32818
  DEFAULT_UNBLOCK_COMMENT_TEMPLATE,
32549
32819
  DEFAULT_UNBLOCK_DEPENDENTS_ENABLED,
32820
+ DEFAULT_UPSTREAM_CONFIGULATOR_ENABLED,
32550
32821
  DOCS_SYNC_AUDIT_SCHEMA_VERSION,
32551
32822
  JsiiFaker,
32552
32823
  LAYOUT_ENFORCEMENT,
@@ -32713,6 +32984,7 @@ var TypeScriptConfig = class extends import_projen23.Component {
32713
32984
  tsdocRecordToFindings,
32714
32985
  turborepoBundle,
32715
32986
  typescriptBundle,
32987
+ upstreamConfigulatorDocsBundle,
32716
32988
  validateAgentTierConfig,
32717
32989
  validateIssueTemplatesConfig,
32718
32990
  validateMonorepoLayout,