@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.d.mts +137 -3
- package/lib/index.d.ts +138 -4
- package/lib/index.js +283 -11
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +281 -11
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.mjs
CHANGED
|
@@ -1424,10 +1424,14 @@ function renderIssueTemplatesCheckerScript(it) {
|
|
|
1424
1424
|
"# that includes a `--title` flag on a subsequent line. Single-line",
|
|
1425
1425
|
"# fragments and prose mentions are permitted.",
|
|
1426
1426
|
"#",
|
|
1427
|
-
"#
|
|
1428
|
-
"# `github-workflow` bundle's `create-issue-workflow` rule source",
|
|
1429
|
-
"#
|
|
1430
|
-
"#
|
|
1427
|
+
"# Five paths are allow-listed: the templates page itself, the",
|
|
1428
|
+
"# `github-workflow` bundle's `create-issue-workflow` rule source,",
|
|
1429
|
+
"# the `upstream-configulator-docs` bundle's rule source, the",
|
|
1430
|
+
"# `issue-templates` bundle source (which renders the templates",
|
|
1431
|
+
"# page and so necessarily embeds the recipes as its content), and",
|
|
1432
|
+
"# the `issue-templates` test source (which contains recipe fixtures",
|
|
1433
|
+
"# used to exercise this very lint). All five legitimately contain",
|
|
1434
|
+
"# `gh issue create` recipes as taxonomy, content, or test fixtures.",
|
|
1431
1435
|
"#",
|
|
1432
1436
|
"# The bundle-path patterns and templates path are rendered from the",
|
|
1433
1437
|
"# consumer's IssueTemplatesConfig at synth time \u2014 do not edit by",
|
|
@@ -1448,12 +1452,16 @@ function renderIssueTemplatesCheckerScript(it) {
|
|
|
1448
1452
|
"",
|
|
1449
1453
|
`templates_path=${JSON.stringify(it.templatesPath)}`,
|
|
1450
1454
|
"",
|
|
1451
|
-
"# Allow-listed paths: the templates page itself
|
|
1452
|
-
"# create-issue-workflow rule source
|
|
1453
|
-
"#
|
|
1455
|
+
"# Allow-listed paths: the templates page itself, the",
|
|
1456
|
+
"# create-issue-workflow rule source, the upstream-configulator-docs",
|
|
1457
|
+
"# rule source, and the issue-templates bundle source + test (which",
|
|
1458
|
+
"# render and exercise the lint and so necessarily embed recipes).",
|
|
1454
1459
|
"allowlist=(",
|
|
1455
1460
|
` "$templates_path"`,
|
|
1456
1461
|
' "packages/@codedrifters/configulator/src/agent/bundles/github-workflow.ts"',
|
|
1462
|
+
' "packages/@codedrifters/configulator/src/agent/bundles/upstream-configulator-docs.ts"',
|
|
1463
|
+
' "packages/@codedrifters/configulator/src/agent/bundles/issue-templates.ts"',
|
|
1464
|
+
' "packages/@codedrifters/configulator/src/agent/bundles/issue-templates.test.ts"',
|
|
1457
1465
|
")",
|
|
1458
1466
|
"",
|
|
1459
1467
|
"# Bundle-path glob patterns. Translated to anchored POSIX-extended",
|
|
@@ -16712,6 +16720,19 @@ var projenBundle = {
|
|
|
16712
16720
|
"}",
|
|
16713
16721
|
"```",
|
|
16714
16722
|
"",
|
|
16723
|
+
"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.",
|
|
16724
|
+
"",
|
|
16725
|
+
"```typescript",
|
|
16726
|
+
"agentConfig: {",
|
|
16727
|
+
" subAgentExtensions: {",
|
|
16728
|
+
" 'requirements-writer': '## Project-Specific Gaps\\n\\n- My custom guidance',",
|
|
16729
|
+
" },",
|
|
16730
|
+
" skillExtensions: {",
|
|
16731
|
+
" 'write-requirement': '## Project-Specific Templates\\n\\n- My custom template note',",
|
|
16732
|
+
" },",
|
|
16733
|
+
"}",
|
|
16734
|
+
"```",
|
|
16735
|
+
"",
|
|
16715
16736
|
"## After Any Change",
|
|
16716
16737
|
"",
|
|
16717
16738
|
"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."
|
|
@@ -25894,6 +25915,223 @@ var typescriptBundle = {
|
|
|
25894
25915
|
}
|
|
25895
25916
|
};
|
|
25896
25917
|
|
|
25918
|
+
// src/agent/bundles/upstream-configulator-docs.ts
|
|
25919
|
+
var DEFAULT_UPSTREAM_CONFIGULATOR_ENABLED = true;
|
|
25920
|
+
var UPSTREAM_CONFIGULATOR_DOCS_SUMMARY = [
|
|
25921
|
+
"# Upstream Configulator Docs",
|
|
25922
|
+
"",
|
|
25923
|
+
"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.",
|
|
25924
|
+
"",
|
|
25925
|
+
"## Where the docs live",
|
|
25926
|
+
"",
|
|
25927
|
+
"- **Repository:** `codedrifters/packages`",
|
|
25928
|
+
"- **Docs root:** `docs/src/content/docs/`",
|
|
25929
|
+
"- **Canonical absolute base URL:**",
|
|
25930
|
+
" <https://github.com/codedrifters/packages/tree/main/docs/src/content/docs/>",
|
|
25931
|
+
"",
|
|
25932
|
+
"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.",
|
|
25933
|
+
"",
|
|
25934
|
+
"## Reading the docs without cloning",
|
|
25935
|
+
"",
|
|
25936
|
+
"Use the `gh` CLI to read upstream docs from inside this checkout \u2014 no clone of `codedrifters/packages` required:",
|
|
25937
|
+
"",
|
|
25938
|
+
"```sh",
|
|
25939
|
+
"# Read one doc by path:",
|
|
25940
|
+
"gh api repos/codedrifters/packages/contents/docs/src/content/docs/<path> \\",
|
|
25941
|
+
" --jq '.content' | base64 -d",
|
|
25942
|
+
"",
|
|
25943
|
+
"# List a docs directory:",
|
|
25944
|
+
"gh api repos/codedrifters/packages/contents/docs/src/content/docs/<dir> \\",
|
|
25945
|
+
" --jq '.[].path'",
|
|
25946
|
+
"",
|
|
25947
|
+
"# Search docs by keyword:",
|
|
25948
|
+
"gh search code --repo codedrifters/packages --filename '*.md' '<query>'",
|
|
25949
|
+
"```",
|
|
25950
|
+
"",
|
|
25951
|
+
"The Contents API returns base64-encoded payloads \u2014 `--jq '.content' | base64 -d` is the canonical decode recipe.",
|
|
25952
|
+
"",
|
|
25953
|
+
"## Upstream-issue-first preference",
|
|
25954
|
+
"",
|
|
25955
|
+
"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.",
|
|
25956
|
+
"",
|
|
25957
|
+
"Use the conventional issue recipe (mirrors the `Create Issue Workflow` in this project's CLAUDE.md):",
|
|
25958
|
+
"",
|
|
25959
|
+
"```sh",
|
|
25960
|
+
"gh issue create --repo codedrifters/packages \\",
|
|
25961
|
+
" --title 'feat: <short description>' \\",
|
|
25962
|
+
" --label 'type:feat' \\",
|
|
25963
|
+
" --label 'priority:medium' \\",
|
|
25964
|
+
" --label 'status:ready' \\",
|
|
25965
|
+
" --body $'## Summary\\n\\n<1-3 sentences>\\n\\n## Details\\n\\n<context, acceptance criteria, or repro steps>'",
|
|
25966
|
+
"```",
|
|
25967
|
+
"",
|
|
25968
|
+
"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.",
|
|
25969
|
+
"",
|
|
25970
|
+
"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."
|
|
25971
|
+
].join("\n");
|
|
25972
|
+
var UPSTREAM_CONFIGULATOR_DOCS_DETAIL = [
|
|
25973
|
+
"# Upstream Configulator Docs \u2014 Detail",
|
|
25974
|
+
"",
|
|
25975
|
+
"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.",
|
|
25976
|
+
"",
|
|
25977
|
+
"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.",
|
|
25978
|
+
"",
|
|
25979
|
+
"## 1. Where configulator's docs live",
|
|
25980
|
+
"",
|
|
25981
|
+
"- **Upstream repo:** `codedrifters/packages`",
|
|
25982
|
+
"- **Docs root inside the repo:** `docs/src/content/docs/`",
|
|
25983
|
+
"- **Canonical absolute base URL:**",
|
|
25984
|
+
" <https://github.com/codedrifters/packages/tree/main/docs/src/content/docs/>",
|
|
25985
|
+
"",
|
|
25986
|
+
"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.",
|
|
25987
|
+
"",
|
|
25988
|
+
"Common doc subtrees (browse the canonical base above for the live tree):",
|
|
25989
|
+
"",
|
|
25990
|
+
"- `docs/src/content/docs/agents/` \u2014 agent bundles, phase contracts, issue templates",
|
|
25991
|
+
"- `docs/src/content/docs/components/` \u2014 Projen components and project types",
|
|
25992
|
+
"- `docs/src/content/docs/requirements/` \u2014 requirement documents and ADRs",
|
|
25993
|
+
"",
|
|
25994
|
+
"## 2. Reading the docs via the GitHub API",
|
|
25995
|
+
"",
|
|
25996
|
+
"Use `gh` to fetch upstream docs without cloning `codedrifters/packages`. The recipes below run from inside any consumer's checkout.",
|
|
25997
|
+
"",
|
|
25998
|
+
"### Browse a single doc by path",
|
|
25999
|
+
"",
|
|
26000
|
+
"```sh",
|
|
26001
|
+
"gh api repos/codedrifters/packages/contents/docs/src/content/docs/<path> \\",
|
|
26002
|
+
" --jq '.content' | base64 -d",
|
|
26003
|
+
"```",
|
|
26004
|
+
"",
|
|
26005
|
+
'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.',
|
|
26006
|
+
"",
|
|
26007
|
+
"Example \u2014 fetch the agent issue-templates page:",
|
|
26008
|
+
"",
|
|
26009
|
+
"```sh",
|
|
26010
|
+
"gh api repos/codedrifters/packages/contents/docs/src/content/docs/agents/issue-templates.md \\",
|
|
26011
|
+
" --jq '.content' | base64 -d",
|
|
26012
|
+
"```",
|
|
26013
|
+
"",
|
|
26014
|
+
"### List a docs directory",
|
|
26015
|
+
"",
|
|
26016
|
+
"```sh",
|
|
26017
|
+
"gh api repos/codedrifters/packages/contents/docs/src/content/docs/<dir> \\",
|
|
26018
|
+
" --jq '.[].path'",
|
|
26019
|
+
"```",
|
|
26020
|
+
"",
|
|
26021
|
+
"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.",
|
|
26022
|
+
"",
|
|
26023
|
+
"### Search docs by keyword",
|
|
26024
|
+
"",
|
|
26025
|
+
"```sh",
|
|
26026
|
+
"gh search code --repo codedrifters/packages --filename '*.md' '<query>'",
|
|
26027
|
+
"```",
|
|
26028
|
+
"",
|
|
26029
|
+
"`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.",
|
|
26030
|
+
"",
|
|
26031
|
+
"### Common pitfalls",
|
|
26032
|
+
"",
|
|
26033
|
+
"- **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.",
|
|
26034
|
+
"- **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.",
|
|
26035
|
+
"- **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.",
|
|
26036
|
+
"- **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`.",
|
|
26037
|
+
"- **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'`.",
|
|
26038
|
+
"",
|
|
26039
|
+
"## 3. Upstream-issue-first preference",
|
|
26040
|
+
"",
|
|
26041
|
+
"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.",
|
|
26042
|
+
"",
|
|
26043
|
+
"**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.",
|
|
26044
|
+
"",
|
|
26045
|
+
"### Canonical issue-creation recipe",
|
|
26046
|
+
"",
|
|
26047
|
+
"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:",
|
|
26048
|
+
"",
|
|
26049
|
+
"```sh",
|
|
26050
|
+
"gh issue create --repo codedrifters/packages \\",
|
|
26051
|
+
" --title '<type>: <short description>' \\",
|
|
26052
|
+
" --label '<type-label>' \\",
|
|
26053
|
+
" --label '<priority-label>' \\",
|
|
26054
|
+
" --label '<status-label>' \\",
|
|
26055
|
+
" --body $'## Summary\\n\\n<1-3 sentences describing the issue>\\n\\n## Details\\n\\n<acceptance criteria, repro steps, or context>'",
|
|
26056
|
+
"```",
|
|
26057
|
+
"",
|
|
26058
|
+
"### Title prefix \u2192 type label",
|
|
26059
|
+
"",
|
|
26060
|
+
"Pick exactly one matching pair:",
|
|
26061
|
+
"",
|
|
26062
|
+
"| Title prefix | `type:*` label | Use for |",
|
|
26063
|
+
"|--------------|----------------|---------|",
|
|
26064
|
+
"| `feat:` | `type:feat` | New features or functionality |",
|
|
26065
|
+
"| `fix:` | `type:fix` | Bug fixes |",
|
|
26066
|
+
"| `chore:` | `type:chore` | Maintenance: deps, tooling, config |",
|
|
26067
|
+
"| `docs:` | `type:docs` | Documentation-only work |",
|
|
26068
|
+
"| `refactor:` | `type:refactor` | Code restructure, no behavior change |",
|
|
26069
|
+
"| `release:` | `type:release` | Release preparation, version bumps |",
|
|
26070
|
+
"| `hotfix:` | `type:hotfix` | Urgent production fixes |",
|
|
26071
|
+
"| `epic:` | `type:feat` | Large initiatives spanning multiple child issues |",
|
|
26072
|
+
"",
|
|
26073
|
+
"### Priority and status labels",
|
|
26074
|
+
"",
|
|
26075
|
+
"- `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.",
|
|
26076
|
+
"- `status:*` \u2014 `status:ready` for self-contained issues, `status:blocked` when the issue declares `Depends on: #<n>` against another open issue.",
|
|
26077
|
+
"",
|
|
26078
|
+
"### Worked example",
|
|
26079
|
+
"",
|
|
26080
|
+
"Suppose configulator's `software-profile-analyst` agent prompt is missing a step you need. Instead of forking the prompt locally:",
|
|
26081
|
+
"",
|
|
26082
|
+
"```sh",
|
|
26083
|
+
"gh issue create --repo codedrifters/packages \\",
|
|
26084
|
+
" --title 'feat: software-profile-analyst should record vendor pricing tier' \\",
|
|
26085
|
+
" --label 'type:feat' \\",
|
|
26086
|
+
" --label 'priority:medium' \\",
|
|
26087
|
+
" --label 'status:ready' \\",
|
|
26088
|
+
" --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`'",
|
|
26089
|
+
"```",
|
|
26090
|
+
"",
|
|
26091
|
+
"After filing, reference the upstream issue from any local workaround so it can be reverted once the upstream fix lands:",
|
|
26092
|
+
"",
|
|
26093
|
+
"```typescript",
|
|
26094
|
+
"// TODO(codedrifters/packages#<N>): remove this override once upstream lands the fix.",
|
|
26095
|
+
"agentConfig: {",
|
|
26096
|
+
" ruleExtensions: {",
|
|
26097
|
+
" 'software-profile-analyst': '## Local override\\n\\n- Capture pricing tier...',",
|
|
26098
|
+
" },",
|
|
26099
|
+
"}",
|
|
26100
|
+
"```",
|
|
26101
|
+
"",
|
|
26102
|
+
"### When a local override is the right call",
|
|
26103
|
+
"",
|
|
26104
|
+
"Reach for `agentConfig.rules` or `agentConfig.ruleExtensions` only when **all** of the following hold:",
|
|
26105
|
+
"",
|
|
26106
|
+
"- The need is genuinely consumer-specific (not a gap that affects every configulator user).",
|
|
26107
|
+
"- 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.",
|
|
26108
|
+
"- The override is small enough that diverging from upstream for a few days is cheaper than blocking on the upstream change.",
|
|
26109
|
+
"",
|
|
26110
|
+
"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."
|
|
26111
|
+
].join("\n");
|
|
26112
|
+
var upstreamConfigulatorDocsBundle = {
|
|
26113
|
+
name: "upstream-configulator-docs",
|
|
26114
|
+
description: "Pointers to @codedrifters/configulator's upstream docs and the upstream-issue protocol for missing features. Gated by AgentConfigOptions.upstreamConfigulator.enabled (default true).",
|
|
26115
|
+
appliesWhen: () => true,
|
|
26116
|
+
rules: [
|
|
26117
|
+
{
|
|
26118
|
+
name: "upstream-configulator-docs",
|
|
26119
|
+
description: "Top-level reminder that the project consumes @codedrifters/configulator and where the upstream docs live",
|
|
26120
|
+
scope: AGENT_RULE_SCOPE.ALWAYS,
|
|
26121
|
+
content: UPSTREAM_CONFIGULATOR_DOCS_SUMMARY,
|
|
26122
|
+
tags: ["project"]
|
|
26123
|
+
},
|
|
26124
|
+
{
|
|
26125
|
+
name: "upstream-configulator-docs-detail",
|
|
26126
|
+
description: "Detailed protocol for reading @codedrifters/configulator upstream docs and filing upstream issues",
|
|
26127
|
+
scope: AGENT_RULE_SCOPE.FILE_PATTERN,
|
|
26128
|
+
filePatterns: [".projenrc.ts", "projenrc/**", ".claude/**", "CLAUDE.md"],
|
|
26129
|
+
content: UPSTREAM_CONFIGULATOR_DOCS_DETAIL,
|
|
26130
|
+
tags: ["project"]
|
|
26131
|
+
}
|
|
26132
|
+
]
|
|
26133
|
+
};
|
|
26134
|
+
|
|
25897
26135
|
// src/vitest/vitest-component.ts
|
|
25898
26136
|
import { Component as Component5 } from "projen";
|
|
25899
26137
|
import { Jest } from "projen/lib/javascript";
|
|
@@ -26495,6 +26733,7 @@ function renderPriorityRulesSection(rules) {
|
|
|
26495
26733
|
function buildBuiltInBundles(paths = DEFAULT_AGENT_PATHS) {
|
|
26496
26734
|
return [
|
|
26497
26735
|
buildBaseBundle(paths),
|
|
26736
|
+
upstreamConfigulatorDocsBundle,
|
|
26498
26737
|
typescriptBundle,
|
|
26499
26738
|
vitestBundle,
|
|
26500
26739
|
jestBundle,
|
|
@@ -27818,6 +28057,13 @@ ${hook}`
|
|
|
27818
28057
|
} else {
|
|
27819
28058
|
ruleMap.delete("source-quality-verification");
|
|
27820
28059
|
}
|
|
28060
|
+
if (this.options.upstreamConfigulator?.enabled === false) {
|
|
28061
|
+
for (const ruleName of [...ruleMap.keys()]) {
|
|
28062
|
+
if (ruleName.startsWith("upstream-configulator-docs")) {
|
|
28063
|
+
ruleMap.delete(ruleName);
|
|
28064
|
+
}
|
|
28065
|
+
}
|
|
28066
|
+
}
|
|
27821
28067
|
return [...ruleMap.values()].sort((a, b) => {
|
|
27822
28068
|
if (a.name === "project-overview") return -1;
|
|
27823
28069
|
if (b.name === "project-overview") return 1;
|
|
@@ -27987,9 +28233,13 @@ ${hook}`
|
|
|
27987
28233
|
});
|
|
27988
28234
|
}
|
|
27989
28235
|
/**
|
|
27990
|
-
* Resolves template variables in skill instructions using project metadata
|
|
28236
|
+
* Resolves template variables in skill instructions using project metadata,
|
|
28237
|
+
* then appends any matching `skillExtensions` content after a horizontal
|
|
28238
|
+
* rule. Unknown keys in `skillExtensions` are silently ignored, mirroring
|
|
28239
|
+
* the `ruleExtensions` contract.
|
|
27991
28240
|
*/
|
|
27992
28241
|
resolveSkillTemplates(skills, metadata) {
|
|
28242
|
+
const extensions = this.options.skillExtensions;
|
|
27993
28243
|
return skills.map((skill) => {
|
|
27994
28244
|
const { resolved, unresolvedKeys } = resolveTemplateVariables(
|
|
27995
28245
|
skill.instructions,
|
|
@@ -28000,13 +28250,24 @@ ${hook}`
|
|
|
28000
28250
|
`AgentConfig: ProjectMetadata not found; skill '${skill.name}' using default values`
|
|
28001
28251
|
);
|
|
28002
28252
|
}
|
|
28003
|
-
|
|
28253
|
+
const extra = extensions?.[skill.name];
|
|
28254
|
+
const baseInstructions = resolved;
|
|
28255
|
+
const finalInstructions = extra !== void 0 && extra !== "" ? `${baseInstructions}
|
|
28256
|
+
|
|
28257
|
+
---
|
|
28258
|
+
|
|
28259
|
+
${extra}` : baseInstructions;
|
|
28260
|
+
return finalInstructions !== skill.instructions ? { ...skill, instructions: finalInstructions } : skill;
|
|
28004
28261
|
});
|
|
28005
28262
|
}
|
|
28006
28263
|
/**
|
|
28007
|
-
* Resolves template variables in sub-agent prompts using project metadata
|
|
28264
|
+
* Resolves template variables in sub-agent prompts using project metadata,
|
|
28265
|
+
* then appends any matching `subAgentExtensions` content after a horizontal
|
|
28266
|
+
* rule. Unknown keys in `subAgentExtensions` are silently ignored,
|
|
28267
|
+
* mirroring the `ruleExtensions` contract.
|
|
28008
28268
|
*/
|
|
28009
28269
|
resolveSubAgentTemplates(subAgents, metadata) {
|
|
28270
|
+
const extensions = this.options.subAgentExtensions;
|
|
28010
28271
|
return subAgents.map((agent) => {
|
|
28011
28272
|
const { resolved, unresolvedKeys } = resolveTemplateVariables(
|
|
28012
28273
|
agent.prompt,
|
|
@@ -28017,7 +28278,14 @@ ${hook}`
|
|
|
28017
28278
|
`AgentConfig: ProjectMetadata not found; sub-agent '${agent.name}' using default values`
|
|
28018
28279
|
);
|
|
28019
28280
|
}
|
|
28020
|
-
|
|
28281
|
+
const extra = extensions?.[agent.name];
|
|
28282
|
+
const basePrompt = resolved;
|
|
28283
|
+
const finalPrompt = extra !== void 0 && extra !== "" ? `${basePrompt}
|
|
28284
|
+
|
|
28285
|
+
---
|
|
28286
|
+
|
|
28287
|
+
${extra}` : basePrompt;
|
|
28288
|
+
return finalPrompt !== agent.prompt ? { ...agent, prompt: finalPrompt } : agent;
|
|
28021
28289
|
});
|
|
28022
28290
|
}
|
|
28023
28291
|
/**
|
|
@@ -32303,6 +32571,7 @@ export {
|
|
|
32303
32571
|
DEFAULT_TYPE_LABELS,
|
|
32304
32572
|
DEFAULT_UNBLOCK_COMMENT_TEMPLATE,
|
|
32305
32573
|
DEFAULT_UNBLOCK_DEPENDENTS_ENABLED,
|
|
32574
|
+
DEFAULT_UPSTREAM_CONFIGULATOR_ENABLED,
|
|
32306
32575
|
DOCS_SYNC_AUDIT_SCHEMA_VERSION,
|
|
32307
32576
|
JsiiFaker,
|
|
32308
32577
|
LAYOUT_ENFORCEMENT,
|
|
@@ -32469,6 +32738,7 @@ export {
|
|
|
32469
32738
|
tsdocRecordToFindings,
|
|
32470
32739
|
turborepoBundle,
|
|
32471
32740
|
typescriptBundle,
|
|
32741
|
+
upstreamConfigulatorDocsBundle,
|
|
32472
32742
|
validateAgentTierConfig,
|
|
32473
32743
|
validateIssueTemplatesConfig,
|
|
32474
32744
|
validateMonorepoLayout,
|