@codedrifters/configulator 0.0.406 → 0.0.408
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 +2141 -1891
- package/lib/index.d.ts +2142 -1892
- package/lib/index.js +609 -223
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +599 -223
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -3933,8 +3933,27 @@ declare class AgentConfig extends Component {
|
|
|
3933
3933
|
* credential requirement when a remote cache actually exists. The
|
|
3934
3934
|
* getter is lazy by design — `TurboRepo` must already be attached
|
|
3935
3935
|
* to the project when the bundles are first read.
|
|
3936
|
+
*
|
|
3937
|
+
* Every **config-driven convention rule** is likewise resolved here
|
|
3938
|
+
* and seeded into its owning bundle, so the rule enters the rule map
|
|
3939
|
+
* already carrying the consumer's settings. Rewriting those rules
|
|
3940
|
+
* after the map was assembled — the previous approach — silently
|
|
3941
|
+
* discarded any `ruleExtensions` append or same-name `rules`
|
|
3942
|
+
* override that had already been merged in.
|
|
3936
3943
|
*/
|
|
3937
3944
|
private get pathAwareBundles();
|
|
3945
|
+
/**
|
|
3946
|
+
* Resolved settings for every config-driven convention rule, derived
|
|
3947
|
+
* from this project's options. Consumed by `buildBuiltInBundles` so
|
|
3948
|
+
* the `base` and `orchestrator` bundles seed final rule content.
|
|
3949
|
+
*
|
|
3950
|
+
* `excludeBundles` feeds two of these: the orchestrator's rendered
|
|
3951
|
+
* tier table / scope-gate overrides / scheduled-tasks registry drop
|
|
3952
|
+
* rows owned by excluded bundles, and the issue-templates rule falls
|
|
3953
|
+
* back to its disabled stub once every downstream-issue-kind bundle
|
|
3954
|
+
* has been excluded.
|
|
3955
|
+
*/
|
|
3956
|
+
private get resolvedRuleConventions();
|
|
3938
3957
|
/**
|
|
3939
3958
|
* Returns the bundles that are active for this project: auto-detected
|
|
3940
3959
|
* bundles (when `autoDetectBundles !== false`) plus force-included
|
|
@@ -3999,72 +4018,6 @@ declare class AgentConfig extends Component {
|
|
|
3999
4018
|
private resolveBundlePermissions;
|
|
4000
4019
|
}
|
|
4001
4020
|
|
|
4002
|
-
/**
|
|
4003
|
-
* Fully-resolved build policy for the consuming project.
|
|
4004
|
-
*
|
|
4005
|
-
* The generated agent guidance around `pnpm build:all` used to assert
|
|
4006
|
-
* unconditionally that the command "requires the user to be
|
|
4007
|
-
* authenticated to AWS on the prod account used for Turborepo remote
|
|
4008
|
-
* caching (`readonlyaccess-prod-525259625215-us-east-1` profile)".
|
|
4009
|
-
* Both halves of that sentence were wrong for most consumers:
|
|
4010
|
-
*
|
|
4011
|
-
* 1. The AWS-auth requirement only exists when a Turborepo **remote
|
|
4012
|
-
* cache** is configured. Consumers running a local cache only
|
|
4013
|
-
* (`turbo.json` with just a `cacheDir`) need no credentials at
|
|
4014
|
-
* all, and agents that believed otherwise aborted mid-flow —
|
|
4015
|
-
* three lost-work incidents in `codedrifters/openhi-planning`.
|
|
4016
|
-
* 2. The profile name was this repository's own profile, baked
|
|
4017
|
-
* verbatim into every consumer's generated text.
|
|
4018
|
-
*
|
|
4019
|
-
* This struct carries the two facts the rule renderers need, derived
|
|
4020
|
-
* from the project's actual {@link TurboRepo} configuration, so the
|
|
4021
|
-
* guidance is true for whichever consumer it renders into.
|
|
4022
|
-
*
|
|
4023
|
-
* @see resolveBuildPolicy
|
|
4024
|
-
*/
|
|
4025
|
-
interface ResolvedBuildPolicy {
|
|
4026
|
-
/**
|
|
4027
|
-
* Whether a Turborepo **remote** cache is configured on the project.
|
|
4028
|
-
*
|
|
4029
|
-
* `false` means either there is no {@link TurboRepo} component at
|
|
4030
|
-
* all, or it was constructed without `remoteCacheOptions` — in both
|
|
4031
|
-
* cases `pnpm build:all` needs no AWS credentials and the generated
|
|
4032
|
-
* guidance must not claim otherwise.
|
|
4033
|
-
*/
|
|
4034
|
-
readonly remoteCacheEnabled: boolean;
|
|
4035
|
-
/**
|
|
4036
|
-
* Local AWS profile name used to fetch the remote-cache endpoint and
|
|
4037
|
-
* token, taken from `remoteCacheOptions.profileName`.
|
|
4038
|
-
*
|
|
4039
|
-
* `undefined` whenever {@link remoteCacheEnabled} is `false`. Never
|
|
4040
|
-
* hard-code a profile name in rule content — read it from here so
|
|
4041
|
-
* each consumer's generated text names its own profile.
|
|
4042
|
-
*/
|
|
4043
|
-
readonly awsProfileName?: string;
|
|
4044
|
-
}
|
|
4045
|
-
/**
|
|
4046
|
-
* Build policy for a project with no Turborepo remote cache — the
|
|
4047
|
-
* zero-config default. Rule renderers that receive this omit the
|
|
4048
|
-
* AWS-authentication guidance entirely rather than asserting a
|
|
4049
|
-
* credential requirement that does not exist.
|
|
4050
|
-
*/
|
|
4051
|
-
declare const DEFAULT_BUILD_POLICY: ResolvedBuildPolicy;
|
|
4052
|
-
/**
|
|
4053
|
-
* Derives the {@link ResolvedBuildPolicy} for a project by inspecting
|
|
4054
|
-
* its {@link TurboRepo} component.
|
|
4055
|
-
*
|
|
4056
|
-
* Auto-detection, not opt-in: `remoteCacheOptions` being `undefined`
|
|
4057
|
-
* *is* the "remote cache disabled" signal — `TurboRepo.renderRunArgs`
|
|
4058
|
-
* already branches on exactly the same condition when it decides
|
|
4059
|
-
* whether to emit `--api` / `--token` / `--team` flags. Consumers get
|
|
4060
|
-
* accurate guidance with no extra configuration.
|
|
4061
|
-
*
|
|
4062
|
-
* Call this lazily (at synthesis time), not from a constructor: the
|
|
4063
|
-
* `TurboRepo` component must already be attached to the project for
|
|
4064
|
-
* detection to succeed.
|
|
4065
|
-
*/
|
|
4066
|
-
declare function resolveBuildPolicy(project: Project$1): ResolvedBuildPolicy;
|
|
4067
|
-
|
|
4068
4021
|
/**
|
|
4069
4022
|
* Valid `status:*` values that may appear in an
|
|
4070
4023
|
* `IssueDefaultsOverride.status`. The list mirrors the canonical
|
|
@@ -4160,1099 +4113,1450 @@ declare function validateIssueDefaultsConfig(config?: IssueDefaultsConfig): Reso
|
|
|
4160
4113
|
declare function labelsForPhase(resolved: ResolvedIssueDefaults, phaseLabel: string): ResolvedIssueDefaultsEntry;
|
|
4161
4114
|
|
|
4162
4115
|
/**
|
|
4163
|
-
*
|
|
4164
|
-
* the requirements root. Every property is required.
|
|
4165
|
-
*/
|
|
4166
|
-
interface ResolvedRequirementCategoryDirs {
|
|
4167
|
-
readonly business: string;
|
|
4168
|
-
readonly functional: string;
|
|
4169
|
-
readonly nonFunctional: string;
|
|
4170
|
-
readonly technical: string;
|
|
4171
|
-
readonly architecturalDecisions: string;
|
|
4172
|
-
readonly security: string;
|
|
4173
|
-
readonly data: string;
|
|
4174
|
-
readonly integration: string;
|
|
4175
|
-
readonly operational: string;
|
|
4176
|
-
readonly ux: string;
|
|
4177
|
-
readonly multiTenancy: string;
|
|
4178
|
-
}
|
|
4179
|
-
/**
|
|
4180
|
-
* Fully-resolved agent output-path roots. Every property is required.
|
|
4116
|
+
* The GitHub **issue type** vocabulary this convention assigns.
|
|
4181
4117
|
*
|
|
4182
|
-
*
|
|
4183
|
-
*
|
|
4184
|
-
*
|
|
4185
|
-
*/
|
|
4186
|
-
interface ResolvedAgentPaths {
|
|
4187
|
-
readonly docsRoot: string;
|
|
4188
|
-
readonly researchRoot: string;
|
|
4189
|
-
readonly profilesRoot: string;
|
|
4190
|
-
readonly meetingsRoot: string;
|
|
4191
|
-
readonly requirementsRoot: string;
|
|
4192
|
-
readonly researchRequirementsRoot: string;
|
|
4193
|
-
readonly bcmRoot: string;
|
|
4194
|
-
readonly peopleRoot: string;
|
|
4195
|
-
readonly companiesRoot: string;
|
|
4196
|
-
readonly softwareRoot: string;
|
|
4197
|
-
readonly industriesRoot: string;
|
|
4198
|
-
readonly requirementCategoryDirs: ResolvedRequirementCategoryDirs;
|
|
4199
|
-
}
|
|
4200
|
-
/**
|
|
4201
|
-
* Canonical default subdirectory name for each requirement category.
|
|
4202
|
-
* These mirror the hardcoded `functional/`, `non-functional/`, … dirs
|
|
4203
|
-
* that the requirements bundles emitted before category dirs became
|
|
4204
|
-
* configurable, so the generated requirements snapshot is unchanged
|
|
4205
|
-
* unless a consumer overrides an entry.
|
|
4206
|
-
*/
|
|
4207
|
-
declare const DEFAULT_REQUIREMENT_CATEGORY_DIRS: ResolvedRequirementCategoryDirs;
|
|
4208
|
-
/**
|
|
4209
|
-
* Canonical default values for every agent path. These mirror the
|
|
4210
|
-
* hardcoded paths that bundles used before `AgentPathsConfig` existed,
|
|
4211
|
-
* so `DEFAULT_AGENT_PATHS.*` can be substituted into bundle rule
|
|
4212
|
-
* content at module-eval time without changing the generated
|
|
4213
|
-
* `.claude/rules/*.md` snapshot.
|
|
4118
|
+
* An issue type is a first-class GitHub field (Epic / Feature / Bug /
|
|
4119
|
+
* Task) and is a completely different axis from the `type:*` **label**
|
|
4120
|
+
* taxonomy:
|
|
4214
4121
|
*
|
|
4215
|
-
*
|
|
4216
|
-
*
|
|
4217
|
-
*
|
|
4218
|
-
*
|
|
4219
|
-
*
|
|
4122
|
+
* - `type:<bundle>` / `type:<conventional-commit>` — a *label*. Routing
|
|
4123
|
+
* and dedup signal. Owned by {@link BUNDLE_OWNERSHIP} and set with
|
|
4124
|
+
* `gh issue create --label`.
|
|
4125
|
+
* - GitHub issue type — a *field*. Human triage, Epic-relationship
|
|
4126
|
+
* tracking, and reporting signal. `gh issue create` cannot set it, so
|
|
4127
|
+
* it is applied immediately after creation via the
|
|
4128
|
+
* `updateIssueIssueType` GraphQL mutation.
|
|
4129
|
+
*
|
|
4130
|
+
* Conflating the two is the single most common mistake in this area, so
|
|
4131
|
+
* both this module and the prose it renders keep them explicitly apart.
|
|
4220
4132
|
*/
|
|
4221
|
-
declare const
|
|
4133
|
+
declare const GITHUB_ISSUE_TYPES: readonly ["Epic", "Feature", "Bug", "Task"];
|
|
4134
|
+
type GithubIssueType = (typeof GITHUB_ISSUE_TYPES)[number];
|
|
4222
4135
|
/**
|
|
4223
|
-
*
|
|
4224
|
-
*
|
|
4136
|
+
* The issue type every title prefix maps to unless it is one of the
|
|
4137
|
+
* three explicit exceptions in {@link NON_DEFAULT_TITLE_PREFIX_TYPES}.
|
|
4225
4138
|
*
|
|
4226
|
-
* - `
|
|
4227
|
-
*
|
|
4228
|
-
*
|
|
4229
|
-
*
|
|
4230
|
-
* - `peopleRoot`, `companiesRoot`, `softwareRoot`, and `industriesRoot`
|
|
4231
|
-
* derive from the resolved `profilesRoot` when not explicitly set,
|
|
4232
|
-
* so that overriding `docsRoot` alone (or overriding `profilesRoot`
|
|
4233
|
-
* alone) propagates correctly through every dependent root.
|
|
4139
|
+
* Every bundle-phase prefix (`company:`, `req:`, `bcm:`, `software:`,
|
|
4140
|
+
* …) lands here, which is why agent-enqueued downstream issues are
|
|
4141
|
+
* almost always `Task` — the phased pipelines file work items, not
|
|
4142
|
+
* features or bug reports.
|
|
4234
4143
|
*/
|
|
4235
|
-
declare
|
|
4236
|
-
|
|
4144
|
+
declare const DEFAULT_GITHUB_ISSUE_TYPE: GithubIssueType;
|
|
4237
4145
|
/**
|
|
4238
|
-
*
|
|
4239
|
-
* rule. The policy walks every changed path in the PR and skips
|
|
4240
|
-
* rule #6 (size threshold) when **every** path matches at least one
|
|
4241
|
-
* glob in this list. Doc-only PRs routinely exceed the 500-insertion
|
|
4242
|
-
* threshold (large migrations, bulk additions, refresh passes) but
|
|
4243
|
-
* carry no production risk that warrants forcing a human reviewer.
|
|
4146
|
+
* Canonical issue-title-prefix → GitHub issue type map.
|
|
4244
4147
|
*
|
|
4245
|
-
*
|
|
4246
|
-
*
|
|
4247
|
-
*
|
|
4248
|
-
*
|
|
4249
|
-
* `
|
|
4148
|
+
* Derived from {@link CONVENTIONAL_COMMIT_TYPE_LABELS} — the shared
|
|
4149
|
+
* conventional-commit vocabulary exported alongside the bundle
|
|
4150
|
+
* ownership registry — so the prefix list can never drift from the
|
|
4151
|
+
* label list the create-issue workflow stamps. Every conventional-commit
|
|
4152
|
+
* prefix defaults to `Task`; the three exceptions are overlaid on top.
|
|
4250
4153
|
*
|
|
4251
|
-
*
|
|
4252
|
-
*
|
|
4154
|
+
* Prefixes carry their trailing colon (`"feat:"`) to match the way the
|
|
4155
|
+
* title conventions write them.
|
|
4253
4156
|
*/
|
|
4254
|
-
declare const
|
|
4157
|
+
declare const GITHUB_ISSUE_TYPE_BY_TITLE_PREFIX: Readonly<Record<string, GithubIssueType>>;
|
|
4255
4158
|
/**
|
|
4256
|
-
*
|
|
4257
|
-
* downstream renderers can reason about a single canonical shape.
|
|
4159
|
+
* Resolve an issue **title** to the GitHub issue type it must carry.
|
|
4258
4160
|
*
|
|
4259
|
-
*
|
|
4260
|
-
*
|
|
4261
|
-
*
|
|
4262
|
-
*
|
|
4263
|
-
* rules in the policy may be added in future versions of
|
|
4264
|
-
* `PrReviewPolicyConfig`.
|
|
4161
|
+
* Anything that is not one of the four recognised non-default prefixes
|
|
4162
|
+
* — including every bundle-phase prefix (`company:research: …`) and a
|
|
4163
|
+
* title with no prefix at all — resolves to
|
|
4164
|
+
* {@link DEFAULT_GITHUB_ISSUE_TYPE}.
|
|
4265
4165
|
*/
|
|
4266
|
-
|
|
4267
|
-
readonly autoMerge: ResolvedPrReviewAutoMerge;
|
|
4268
|
-
readonly ciVerification: ResolvedPrReviewCiVerification;
|
|
4269
|
-
}
|
|
4166
|
+
declare function githubIssueTypeForTitle(title: string): GithubIssueType;
|
|
4270
4167
|
/**
|
|
4271
|
-
*
|
|
4272
|
-
*
|
|
4273
|
-
*
|
|
4274
|
-
*
|
|
4168
|
+
* Path to the `set-issue-type.sh` helper the `github-workflow` bundle
|
|
4169
|
+
* ships. Referenced (never assumed present) by the rendered prose — see
|
|
4170
|
+
* {@link renderGithubIssueTypeSectionLines} for the fallback that keeps
|
|
4171
|
+
* the recipe working for consumers who exclude that bundle.
|
|
4275
4172
|
*/
|
|
4276
|
-
|
|
4277
|
-
readonly pathsExemptFromSize: ReadonlyArray<string>;
|
|
4278
|
-
}
|
|
4173
|
+
declare const SET_ISSUE_TYPE_HELPER_PATH = ".claude/procedures/set-issue-type.sh";
|
|
4279
4174
|
/**
|
|
4280
|
-
*
|
|
4175
|
+
* The two-step `updateIssueIssueType` GraphQL flow, rendered as shell.
|
|
4281
4176
|
*
|
|
4282
|
-
* `
|
|
4283
|
-
*
|
|
4284
|
-
*
|
|
4177
|
+
* `set-issue-type.sh` wraps exactly this flow, but that helper ships
|
|
4178
|
+
* **only** via the `github-workflow` bundle. Any recipe outside that
|
|
4179
|
+
* bundle that cited the helper unconditionally would be broken for a
|
|
4180
|
+
* consumer running `excludeBundles: ["github-workflow"]`, so the
|
|
4181
|
+
* fallback is documented inline in an always-on base rule and every
|
|
4182
|
+
* per-filing-site step points at it.
|
|
4285
4183
|
*/
|
|
4286
|
-
|
|
4287
|
-
readonly requiredWorkflows: ReadonlyArray<string>;
|
|
4288
|
-
}
|
|
4184
|
+
declare function renderSetIssueTypeFallbackLines(): Array<string>;
|
|
4289
4185
|
/**
|
|
4290
|
-
*
|
|
4291
|
-
* `
|
|
4292
|
-
* cascade from their documented defaults.
|
|
4186
|
+
* Render the **GitHub Issue Type** section of the always-on
|
|
4187
|
+
* `issue-conventions` rule.
|
|
4293
4188
|
*
|
|
4294
|
-
*
|
|
4295
|
-
*
|
|
4296
|
-
*
|
|
4297
|
-
|
|
4298
|
-
declare function resolvePrReviewPolicy(config?: PrReviewPolicyConfig): ResolvedPrReviewPolicy;
|
|
4299
|
-
/**
|
|
4300
|
-
* Synth-time validation hook. Throws a descriptive `Error` when the
|
|
4301
|
-
* supplied `PrReviewPolicyConfig` is malformed. Called by
|
|
4302
|
-
* `AgentConfig.preSynthesize` before any rendering so a misconfigured
|
|
4303
|
-
* policy fails the build instead of silently shipping broken carve-out
|
|
4304
|
-
* globs. Returns the resolved policy unchanged so callers can write
|
|
4305
|
-
* `const policy = validatePrReviewPolicyConfig(config)` in one line.
|
|
4189
|
+
* The section is the single canonical answer to "how does an agent set
|
|
4190
|
+
* an issue's type?", and it is rendered into an `ALWAYS`-scoped base
|
|
4191
|
+
* rule precisely so every downstream filing site can cite it in one
|
|
4192
|
+
* line regardless of which optional bundles the consumer enabled.
|
|
4306
4193
|
*
|
|
4307
|
-
*
|
|
4194
|
+
* It documents both paths deliberately:
|
|
4308
4195
|
*
|
|
4309
|
-
*
|
|
4310
|
-
*
|
|
4311
|
-
*
|
|
4312
|
-
* - `requiredWorkflows` entries that are empty or whitespace-only — a
|
|
4313
|
-
* blank workflow name can never match an Actions-run `name`, so the
|
|
4314
|
-
* intended gate would silently never fire.
|
|
4196
|
+
* 1. The `set-issue-type.sh` one-liner, when `github-workflow` is
|
|
4197
|
+
* active.
|
|
4198
|
+
* 2. The inline GraphQL fallback, when it is not.
|
|
4315
4199
|
*/
|
|
4316
|
-
declare function
|
|
4317
|
-
|
|
4200
|
+
declare function renderGithubIssueTypeSectionLines(): Array<string>;
|
|
4318
4201
|
/**
|
|
4319
|
-
*
|
|
4320
|
-
*
|
|
4321
|
-
*
|
|
4322
|
-
*
|
|
4323
|
-
*
|
|
4202
|
+
* Render the title-prefix → issue-type mapping as a markdown bullet
|
|
4203
|
+
* list, for recipes that present it inline rather than as a table (the
|
|
4204
|
+
* interactive create-issue workflow's step 3).
|
|
4205
|
+
*
|
|
4206
|
+
* Grouping matches the table in {@link renderGithubIssueTypeSectionLines}:
|
|
4207
|
+
* one bullet per non-default prefix, then a single bullet collapsing
|
|
4208
|
+
* every prefix that maps to {@link DEFAULT_GITHUB_ISSUE_TYPE}.
|
|
4324
4209
|
*/
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
/** Sub-agent name in `.claude/agents/`, e.g. `bcm-writer`. */
|
|
4331
|
-
readonly agent: string;
|
|
4210
|
+
declare function renderTitlePrefixTypeBullets(indent?: string): Array<string>;
|
|
4211
|
+
/** String form of {@link renderGithubIssueTypeSectionLines}. */
|
|
4212
|
+
declare function renderGithubIssueTypeSection(): string;
|
|
4213
|
+
/** Options for {@link renderIssueTypeAssignmentStep}. */
|
|
4214
|
+
interface IssueTypeAssignmentStepOptions {
|
|
4332
4215
|
/**
|
|
4333
|
-
*
|
|
4334
|
-
*
|
|
4335
|
-
*
|
|
4336
|
-
*
|
|
4337
|
-
* `AgentConfigOptions.paths` propagate into the rendered table.
|
|
4216
|
+
* Leading whitespace prepended to every rendered line so the step
|
|
4217
|
+
* nests correctly under the numbered/bulleted filing recipe it
|
|
4218
|
+
* follows. Defaults to the three spaces a top-level numbered list
|
|
4219
|
+
* item continues with.
|
|
4338
4220
|
*/
|
|
4339
|
-
readonly
|
|
4221
|
+
readonly indent?: string;
|
|
4340
4222
|
/**
|
|
4341
|
-
*
|
|
4342
|
-
*
|
|
4343
|
-
*
|
|
4223
|
+
* The GitHub issue type the filed issue must carry. Defaults to
|
|
4224
|
+
* {@link DEFAULT_GITHUB_ISSUE_TYPE}, which is correct for every
|
|
4225
|
+
* bundle-phase-prefixed downstream issue.
|
|
4344
4226
|
*/
|
|
4345
|
-
readonly
|
|
4227
|
+
readonly issueType?: GithubIssueType;
|
|
4346
4228
|
/**
|
|
4347
|
-
*
|
|
4348
|
-
*
|
|
4349
|
-
*
|
|
4350
|
-
*
|
|
4229
|
+
* Render the step as a markdown list item (`- …` with hanging
|
|
4230
|
+
* continuation lines) instead of a paragraph. Used at the handful of
|
|
4231
|
+
* filing recipes that specify the issue with a bullet list rather
|
|
4232
|
+
* than numbered prose.
|
|
4351
4233
|
*/
|
|
4352
|
-
readonly
|
|
4234
|
+
readonly bullet?: boolean;
|
|
4353
4235
|
}
|
|
4354
4236
|
/**
|
|
4355
|
-
*
|
|
4356
|
-
*
|
|
4357
|
-
*
|
|
4358
|
-
*
|
|
4359
|
-
*
|
|
4360
|
-
* `
|
|
4237
|
+
* Render the compact "now set the issue type" step appended to every
|
|
4238
|
+
* bundle-shipped downstream filing recipe.
|
|
4239
|
+
*
|
|
4240
|
+
* Kept deliberately short: it appears at ~45 filing sites across the
|
|
4241
|
+
* phased-pipeline bundles, so it names the concrete type, calls out that
|
|
4242
|
+
* the `type:*` label is a different field, gives the command, and
|
|
4243
|
+
* delegates the fallback to the always-on `issue-conventions` rule
|
|
4244
|
+
* rather than re-inlining the GraphQL flow at every site.
|
|
4361
4245
|
*/
|
|
4362
|
-
declare
|
|
4246
|
+
declare function renderIssueTypeAssignmentStep(options?: IssueTypeAssignmentStepOptions): Array<string>;
|
|
4363
4247
|
/**
|
|
4364
|
-
*
|
|
4365
|
-
*
|
|
4366
|
-
*
|
|
4367
|
-
*
|
|
4248
|
+
* Render the phase-wide variant of {@link renderIssueTypeAssignmentStep}
|
|
4249
|
+
* for a workflow phase that files several kinds of issue across several
|
|
4250
|
+
* steps, where repeating the per-recipe step at each one would bloat the
|
|
4251
|
+
* prompt without adding information.
|
|
4368
4252
|
*/
|
|
4369
|
-
declare
|
|
4253
|
+
declare function renderIssueTypeAssignmentBlanket(indent?: string, issueType?: GithubIssueType): Array<string>;
|
|
4254
|
+
|
|
4370
4255
|
/**
|
|
4371
|
-
*
|
|
4372
|
-
*
|
|
4373
|
-
*
|
|
4256
|
+
* Default master switch for the issue-templates convention. When no
|
|
4257
|
+
* config is supplied the convention ships **enabled** so every
|
|
4258
|
+
* configulator-consuming repo carries the canonical `gh issue create`
|
|
4259
|
+
* template reference in its rendered `CLAUDE.md`.
|
|
4260
|
+
*
|
|
4261
|
+
* @see IssueTemplatesConfig
|
|
4374
4262
|
*/
|
|
4375
|
-
declare
|
|
4263
|
+
declare const DEFAULT_ISSUE_TEMPLATES_ENABLED = true;
|
|
4376
4264
|
/**
|
|
4377
|
-
*
|
|
4378
|
-
*
|
|
4379
|
-
*
|
|
4380
|
-
* `
|
|
4381
|
-
*
|
|
4382
|
-
*
|
|
4383
|
-
*
|
|
4265
|
+
* Default repo-relative path for the consolidated issue-templates
|
|
4266
|
+
* documentation page. Matches the singleton `/docs` site layout every
|
|
4267
|
+
* configulator-managed repo ships: a single Starlight docs site at
|
|
4268
|
+
* `/docs` with agent reference pages under
|
|
4269
|
+
* `docs/src/content/docs/agents/`.
|
|
4270
|
+
*
|
|
4271
|
+
* The file is never generated by configulator unless `emitStarterDoc`
|
|
4272
|
+
* is set — the canonical list of templates is repo-specific and grows
|
|
4273
|
+
* whenever a new phase label is minted, so consumers author and evolve
|
|
4274
|
+
* the page themselves. The starter doc is opt-in.
|
|
4275
|
+
*
|
|
4276
|
+
* @see IssueTemplatesConfig
|
|
4384
4277
|
*/
|
|
4385
|
-
declare
|
|
4386
|
-
declare function buildAgentRegistryRule(bundles: ReadonlyArray<AgentRuleBundle>, paths: ResolvedAgentPaths): AgentRule | undefined;
|
|
4387
|
-
|
|
4278
|
+
declare const DEFAULT_ISSUE_TEMPLATES_PATH = "docs/src/content/docs/agents/issue-templates.md";
|
|
4388
4279
|
/**
|
|
4389
|
-
*
|
|
4280
|
+
* Default list of glob patterns that identify "bundle files" — the
|
|
4281
|
+
* source files that compose agent prompts and skill instructions.
|
|
4282
|
+
* These are the locations the optional lint walks when checking that
|
|
4283
|
+
* `gh issue create` snippets are **referenced** rather than inlined.
|
|
4390
4284
|
*
|
|
4391
|
-
*
|
|
4392
|
-
*
|
|
4393
|
-
* (peer-present assumption, same pattern as the other workflow
|
|
4394
|
-
* bundles).
|
|
4285
|
+
* The defaults cover the locations bundle-like content lives in a
|
|
4286
|
+
* generic configulator-consuming repo:
|
|
4395
4287
|
*
|
|
4396
|
-
*
|
|
4397
|
-
*
|
|
4398
|
-
*
|
|
4399
|
-
* invocable skills (`/draft-agenda`, `/finalize-agenda`), and
|
|
4400
|
-
* `agenda:*` phase labels via the bundle `labels` mechanism so
|
|
4401
|
-
* consuming projects automatically pick up the label taxonomy
|
|
4402
|
-
* through the sync-labels workflow.
|
|
4288
|
+
* - `.claude/agents/**.md` / `.claude/skills/**` — agent and skill
|
|
4289
|
+
* prompts in consuming repos that don't re-export configulator
|
|
4290
|
+
* bundles.
|
|
4403
4291
|
*
|
|
4404
|
-
*
|
|
4405
|
-
*
|
|
4406
|
-
* `
|
|
4292
|
+
* Repos that **also** host configulator's own bundle source as a
|
|
4293
|
+
* workspace package (only `codedrifters/packages` itself) should
|
|
4294
|
+
* append `packages/@codedrifters/configulator/src/agent/bundles/**.ts`
|
|
4295
|
+
* via `IssueTemplatesConfig.bundlePathPatterns` to lint those bundle
|
|
4296
|
+
* sources too. The default omits that pattern because it is dead
|
|
4297
|
+
* weight (matches nothing) in any other consumer.
|
|
4298
|
+
*
|
|
4299
|
+
* Consumers can replace the list outright via `bundlePathPatterns`
|
|
4300
|
+
* when their agent sources live elsewhere.
|
|
4301
|
+
*
|
|
4302
|
+
* @see IssueTemplatesConfig
|
|
4407
4303
|
*/
|
|
4408
|
-
declare const
|
|
4409
|
-
|
|
4304
|
+
declare const DEFAULT_ISSUE_TEMPLATES_BUNDLE_PATH_PATTERNS: ReadonlyArray<string>;
|
|
4410
4305
|
/**
|
|
4411
|
-
*
|
|
4306
|
+
* Default for whether the convention emits the
|
|
4307
|
+
* `.claude/procedures/check-issue-templates.sh` lint to disk. The
|
|
4308
|
+
* script greps the provided files (stdin or positional args) for
|
|
4309
|
+
* inline `gh issue create` invocations and fails non-zero when any
|
|
4310
|
+
* are found outside a fenced example block that cites the canonical
|
|
4311
|
+
* templates doc.
|
|
4312
|
+
*
|
|
4313
|
+
* Disabled by default because many consumers prefer to enforce the
|
|
4314
|
+
* rule via review discipline and the rendered guidance alone; the
|
|
4315
|
+
* script is opt-in for repos that want a hard CI gate or pre-commit
|
|
4316
|
+
* hook.
|
|
4317
|
+
*
|
|
4318
|
+
* @see IssueTemplatesConfig
|
|
4412
4319
|
*/
|
|
4413
|
-
declare const
|
|
4414
|
-
|
|
4320
|
+
declare const DEFAULT_ISSUE_TEMPLATES_EMIT_CHECKER = false;
|
|
4415
4321
|
/**
|
|
4416
|
-
*
|
|
4417
|
-
*
|
|
4322
|
+
* Default for whether the convention emits the issue-templates
|
|
4323
|
+
* scaffold to disk. The scaffold is two files:
|
|
4324
|
+
*
|
|
4325
|
+
* 1. A **write-once** starter page at `<templatesPath>` (projen
|
|
4326
|
+
* `SampleFile`) carrying the expected structure — the "How to use"
|
|
4327
|
+
* preamble and one example `## Template: <phase-label>` section —
|
|
4328
|
+
* which the consumer then fleshes out by hand.
|
|
4329
|
+
* 2. An **always-regenerated** companion page at
|
|
4330
|
+
* {@link issueTemplatesGeneratedPath}, carrying one label-correct
|
|
4331
|
+
* recipe stub per phase label the consumer's active bundles emit.
|
|
4332
|
+
*
|
|
4333
|
+
* The split exists because a `SampleFile` never reaches a consumer
|
|
4334
|
+
* whose page already exists: repos that adopted the convention on an
|
|
4335
|
+
* older configulator would otherwise be frozen on whatever skeleton
|
|
4336
|
+
* shipped that day. Hand-authored bodies stay in the write-once page;
|
|
4337
|
+
* the generated label sets regenerate on every `projen` run so a new
|
|
4338
|
+
* phase label reaches every consumer on their next upgrade.
|
|
4339
|
+
*
|
|
4340
|
+
* Disabled by default because the hand-authored page conflicts with
|
|
4341
|
+
* the ad-hoc notes most repos already maintain when they adopt the
|
|
4342
|
+
* convention.
|
|
4343
|
+
*
|
|
4344
|
+
* @see IssueTemplatesConfig
|
|
4418
4345
|
*/
|
|
4419
|
-
declare
|
|
4346
|
+
declare const DEFAULT_ISSUE_TEMPLATES_EMIT_STARTER = false;
|
|
4420
4347
|
/**
|
|
4421
|
-
*
|
|
4422
|
-
*
|
|
4423
|
-
*
|
|
4424
|
-
* `
|
|
4348
|
+
* Filename suffix appended to the templates page's stem to derive the
|
|
4349
|
+
* always-regenerated companion page. Chosen so the companion can never
|
|
4350
|
+
* collide with a hand-authored router layout that splits recipes into
|
|
4351
|
+
* `<stem>/<child>.md` sibling pages.
|
|
4425
4352
|
*/
|
|
4426
|
-
declare const
|
|
4427
|
-
|
|
4353
|
+
declare const ISSUE_TEMPLATES_GENERATED_SUFFIX = "-generated";
|
|
4428
4354
|
/**
|
|
4429
|
-
*
|
|
4430
|
-
*
|
|
4431
|
-
*
|
|
4432
|
-
*
|
|
4433
|
-
* recipes via the issue-templates convention).
|
|
4434
|
-
*
|
|
4435
|
-
* The registry is consulted by renderers in other bundles whenever
|
|
4436
|
-
* `AgentConfigOptions.excludeBundles` is non-empty so cross-bundle
|
|
4437
|
-
* references to an excluded bundle's agents, type labels, phase labels,
|
|
4438
|
-
* or scheduled tasks disappear from the generated output.
|
|
4439
|
-
*
|
|
4440
|
-
* The map is **hand-maintained** rather than derived from each bundle's
|
|
4441
|
-
* runtime shape. The defining surfaces (the funnel-tier table in
|
|
4442
|
-
* `tiers.ts`, the per-phase scope-gate overrides in `scope-gate.ts`, and
|
|
4443
|
-
* the scheduled-tasks registry in `scheduled-tasks.ts`) live as flat
|
|
4444
|
-
* data tables that already get walked by their renderers — declaring the
|
|
4445
|
-
* ownership map alongside them keeps the relationship explicit and
|
|
4446
|
-
* readable without forcing every bundle to grow an "ownership"
|
|
4447
|
-
* descriptor.
|
|
4448
|
-
*
|
|
4449
|
-
* Bundles that ship no cross-bundle surface (e.g. `slack`, `typescript`,
|
|
4450
|
-
* `pnpm`, `vitest`, `jest`, `aws-cdk`, `projen`, `turborepo`,
|
|
4451
|
-
* `upstream-configulator-docs`) deliberately do not appear here —
|
|
4452
|
-
* excluding them is already a no-op since they own nothing other
|
|
4453
|
-
* bundles reference.
|
|
4355
|
+
* Repo-relative path of the always-regenerated companion page for a
|
|
4356
|
+
* given `templatesPath`: the stem gains
|
|
4357
|
+
* {@link ISSUE_TEMPLATES_GENERATED_SUFFIX} and keeps its extension
|
|
4358
|
+
* (`…/issue-templates.md` → `…/issue-templates-generated.md`).
|
|
4454
4359
|
*/
|
|
4455
|
-
|
|
4456
|
-
/**
|
|
4457
|
-
* GitHub `type:*` label values (without the `type:` prefix) the
|
|
4458
|
-
* bundle owns. The funnel-tier table in `tiers.ts` and any rendered
|
|
4459
|
-
* tables that group agents by `type:*` label consult this list.
|
|
4460
|
-
*/
|
|
4461
|
-
readonly typeLabels: ReadonlyArray<string>;
|
|
4462
|
-
/**
|
|
4463
|
-
* Phase-label prefixes (with trailing colon, e.g. `"company:"`) the
|
|
4464
|
-
* bundle owns. Used by the scope-gate per-phase override table and
|
|
4465
|
-
* any other renderer that groups by phase label. An entry without a
|
|
4466
|
-
* trailing colon (e.g. `"req:write"`) is treated as an exact
|
|
4467
|
-
* phase-label match instead of a prefix.
|
|
4468
|
-
*/
|
|
4469
|
-
readonly phaseLabelPrefixes: ReadonlyArray<string>;
|
|
4470
|
-
/**
|
|
4471
|
-
* `taskId` values from `DEFAULT_SCHEDULED_TASK_ENTRIES` that target
|
|
4472
|
-
* this bundle's sub-agent. The scheduled-tasks registry filter in
|
|
4473
|
-
* `agent-config.ts` consults this list when pruning default entries
|
|
4474
|
-
* for an excluded bundle.
|
|
4475
|
-
*/
|
|
4476
|
-
readonly scheduledTaskIds: ReadonlyArray<string>;
|
|
4477
|
-
/**
|
|
4478
|
-
* Whether this bundle emits Starlight content roots — i.e. whether
|
|
4479
|
-
* any of its workflows write files under `docs/src/content/docs/`
|
|
4480
|
-
* (or the configured docs root). Drives the auto-suppression of the
|
|
4481
|
-
* `section-index-pages` rule when no docs-emitting bundle is active.
|
|
4482
|
-
*/
|
|
4483
|
-
readonly emitsDocs: boolean;
|
|
4484
|
-
/**
|
|
4485
|
-
* Whether this bundle dispatches downstream issues (i.e. its
|
|
4486
|
-
* workflows file `gh issue create` recipes). Drives the
|
|
4487
|
-
* auto-suppression of the `issue-templates-convention` rule when no
|
|
4488
|
-
* such bundle is active.
|
|
4489
|
-
*/
|
|
4490
|
-
readonly downstreamIssueKinds: boolean;
|
|
4491
|
-
}
|
|
4360
|
+
declare function issueTemplatesGeneratedPath(templatesPath: string): string;
|
|
4492
4361
|
/**
|
|
4493
|
-
*
|
|
4494
|
-
*
|
|
4362
|
+
* Glob matching the sibling child pages of a router-style templates
|
|
4363
|
+
* layout (`…/issue-templates.md` → `…/issue-templates/*.md`). The
|
|
4364
|
+
* label-consistency lint walks these so a repo that split its recipes
|
|
4365
|
+
* across child pages is checked against the same map.
|
|
4495
4366
|
*/
|
|
4496
|
-
declare
|
|
4367
|
+
declare function issueTemplatesChildGlob(templatesPath: string): string;
|
|
4497
4368
|
/**
|
|
4498
|
-
*
|
|
4499
|
-
*
|
|
4500
|
-
*
|
|
4501
|
-
* generic create-issue workflow (`feat:` → `type:feat`, `docs:` →
|
|
4502
|
-
* `type:docs`, …) and are the only `type:*` labels the phase-label
|
|
4503
|
-
* invariant is allowed to remove when it corrects a mislabeled issue.
|
|
4504
|
-
*
|
|
4505
|
-
* A bundle `type:*` label (e.g. `type:research`, `type:bcm-document`)
|
|
4506
|
-
* is deliberately **not** in this set: an issue carrying a phase label
|
|
4507
|
-
* from one bundle plus a `type:*` label owned by a *different* bundle
|
|
4508
|
-
* is genuinely ambiguous and gets flagged for a human rather than
|
|
4509
|
-
* silently rewritten.
|
|
4510
|
-
*/
|
|
4511
|
-
declare const CONVENTIONAL_COMMIT_TYPE_LABELS: ReadonlyArray<string>;
|
|
4512
|
-
/**
|
|
4513
|
-
* Canonical phase-label matcher → `type:<bundle>` label map, derived
|
|
4514
|
-
* from {@link BUNDLE_OWNERSHIP}. This is the **single source of truth**
|
|
4515
|
-
* for the phase-label → type-label invariant: label registry
|
|
4516
|
-
* generation, the orchestrator's triage sweep, and the consumer-facing
|
|
4517
|
-
* label audit all read this map rather than re-deriving the pairing.
|
|
4369
|
+
* Default for whether the rendered rule body asserts that every
|
|
4370
|
+
* `gh issue create` recipe in a bundle or agent prompt **MUST** cite
|
|
4371
|
+
* the canonical templates doc rather than inline a full template.
|
|
4518
4372
|
*
|
|
4519
|
-
*
|
|
4520
|
-
*
|
|
4521
|
-
*
|
|
4522
|
-
* the `
|
|
4373
|
+
* Defaults to `true` — the whole point of consolidation is that
|
|
4374
|
+
* templates live in one place, so the MUST phrasing is the correct
|
|
4375
|
+
* default. Consumers that treat consolidation as aspirational can
|
|
4376
|
+
* soften the phrasing by setting this to `false`.
|
|
4523
4377
|
*
|
|
4524
|
-
*
|
|
4525
|
-
* label: all three requirements bundles declare `type:requirement`, so
|
|
4526
|
-
* `req:`, `req:write`, `req:review`, and `req:deprecate` all resolve to
|
|
4527
|
-
* the same value. A matcher that resolved to two *different* type
|
|
4528
|
-
* labels would be a registry bug and throws at module load.
|
|
4378
|
+
* @see IssueTemplatesConfig
|
|
4529
4379
|
*/
|
|
4530
|
-
declare const
|
|
4380
|
+
declare const DEFAULT_ISSUE_TEMPLATES_REQUIRE_REFERENCE = true;
|
|
4531
4381
|
/**
|
|
4532
|
-
*
|
|
4533
|
-
*
|
|
4534
|
-
*
|
|
4535
|
-
* - `"none"` — the labels carry no **recognised** phase label, so the
|
|
4536
|
-
* invariant does not apply. Unrecognised `foo:bar` labels are
|
|
4537
|
-
* consumer-specific and deliberately not policed.
|
|
4538
|
-
* - `"match"` — the recognised phase labels all imply one and the same
|
|
4539
|
-
* `type:<bundle>` label, carried in `typeLabel`.
|
|
4540
|
-
* - `"ambiguous"` — the recognised phase labels imply two or more
|
|
4541
|
-
* different `type:<bundle>` labels. Never auto-corrected; the caller
|
|
4542
|
-
* flags the issue for human triage instead.
|
|
4382
|
+
* Fully-resolved issue-templates settings. Every field is defaulted
|
|
4383
|
+
* so downstream renderers can reason about a single canonical shape.
|
|
4543
4384
|
*/
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
readonly
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
* when `outcome` is `"match"`; `undefined` otherwise.
|
|
4552
|
-
*/
|
|
4553
|
-
readonly typeLabel?: string;
|
|
4554
|
-
/**
|
|
4555
|
-
* Every distinct implied `type:<bundle>` label, sorted. Empty on
|
|
4556
|
-
* `"none"`, one entry on `"match"`, two or more on `"ambiguous"`.
|
|
4557
|
-
*/
|
|
4558
|
-
readonly candidateTypeLabels: ReadonlyArray<string>;
|
|
4559
|
-
/**
|
|
4560
|
-
* The subset of the input labels that matched a phase-label matcher,
|
|
4561
|
-
* in input order. Empty on `"none"`.
|
|
4562
|
-
*/
|
|
4563
|
-
readonly phaseLabels: ReadonlyArray<string>;
|
|
4385
|
+
interface ResolvedIssueTemplates {
|
|
4386
|
+
readonly enabled: boolean;
|
|
4387
|
+
readonly templatesPath: string;
|
|
4388
|
+
readonly bundlePathPatterns: ReadonlyArray<string>;
|
|
4389
|
+
readonly emitChecker: boolean;
|
|
4390
|
+
readonly emitStarterDoc: boolean;
|
|
4391
|
+
readonly requireReference: boolean;
|
|
4564
4392
|
}
|
|
4565
4393
|
/**
|
|
4566
|
-
* Resolve a
|
|
4567
|
-
*
|
|
4394
|
+
* Resolve a (possibly absent) `IssueTemplatesConfig` into a canonical
|
|
4395
|
+
* `ResolvedIssueTemplates` with every field filled in. Unset fields
|
|
4396
|
+
* cascade from their documented defaults.
|
|
4568
4397
|
*
|
|
4569
|
-
*
|
|
4570
|
-
* `
|
|
4571
|
-
*
|
|
4572
|
-
* but the precedence is load-bearing for any future divergence.)
|
|
4398
|
+
* Malformed configs — empty / whitespace-only or absolute
|
|
4399
|
+
* `templatesPath`, empty `bundlePathPatterns`, empty /
|
|
4400
|
+
* whitespace-only path entry — throw a descriptive `Error`.
|
|
4573
4401
|
*/
|
|
4574
|
-
declare function
|
|
4402
|
+
declare function resolveIssueTemplates(config?: IssueTemplatesConfig): ResolvedIssueTemplates;
|
|
4575
4403
|
/**
|
|
4576
|
-
*
|
|
4577
|
-
*
|
|
4404
|
+
* Synth-time validation hook. Throws a descriptive `Error` when the
|
|
4405
|
+
* supplied `IssueTemplatesConfig` is malformed. Called by
|
|
4406
|
+
* `AgentConfig.preSynthesize` before any rendering so a misconfigured
|
|
4407
|
+
* convention fails the build instead of silently shipping broken
|
|
4408
|
+
* guidance. Returns the resolved config unchanged so callers can
|
|
4409
|
+
* write `const it = validateIssueTemplatesConfig(config)` in one line.
|
|
4578
4410
|
*
|
|
4579
|
-
*
|
|
4580
|
-
* the recognised phase labels itself and ignores everything else
|
|
4581
|
-
* (`status:*`, `priority:*`, existing `type:*`, and any consumer label
|
|
4582
|
-
* that matches no bundle).
|
|
4583
|
-
*/
|
|
4584
|
-
declare function resolveTypeLabelForLabels(labels: ReadonlyArray<string>): PhaseLabelTypeResolution;
|
|
4585
|
-
/**
|
|
4586
|
-
* Render the **Phase-label → `type:<bundle>` invariant** section of the
|
|
4587
|
-
* `orchestrator-conventions` rule. The matcher table is generated from
|
|
4588
|
-
* {@link PHASE_LABEL_TYPE_MAP}, so the documented pairing can never
|
|
4589
|
-
* drift from the pairing the sweep enforces.
|
|
4411
|
+
* Malformed cases rejected here:
|
|
4590
4412
|
*
|
|
4591
|
-
*
|
|
4592
|
-
*
|
|
4413
|
+
* - `templatesPath` empty, whitespace-only, or absolute.
|
|
4414
|
+
* - `bundlePathPatterns` not an array, empty, or contains an empty /
|
|
4415
|
+
* whitespace-only entry.
|
|
4593
4416
|
*/
|
|
4594
|
-
declare function
|
|
4417
|
+
declare function validateIssueTemplatesConfig(config?: IssueTemplatesConfig): ResolvedIssueTemplates;
|
|
4595
4418
|
/**
|
|
4596
|
-
* Render the
|
|
4597
|
-
*
|
|
4598
|
-
* TypeScript accessors read. Emitted into `check-blocked.sh` so the
|
|
4599
|
-
* orchestrator's triage sweep and the consumer-runnable label audit
|
|
4600
|
-
* never carry a hand-copied second map.
|
|
4419
|
+
* Render the full body for the `issue-templates-convention` rule
|
|
4420
|
+
* shipped by the `base` bundle. The rule documents:
|
|
4601
4421
|
*
|
|
4602
|
-
*
|
|
4422
|
+
* - Why the convention exists (drift between duplicated
|
|
4423
|
+
* `gh issue create` snippets across bundles).
|
|
4424
|
+
* - The on-disk contract — a single hand-authored page at
|
|
4425
|
+
* `<templatesPath>` with one `## Template: <phase-label>` section
|
|
4426
|
+
* per downstream issue kind.
|
|
4427
|
+
* - The **reference-don't-inline** rule, phrased as a hard
|
|
4428
|
+
* requirement or a strong recommendation per `requireReference`.
|
|
4429
|
+
* - The set of paths the rule applies to.
|
|
4430
|
+
* - The optional lint script (cross-referenced only when emitted).
|
|
4603
4431
|
*
|
|
4604
|
-
*
|
|
4605
|
-
* single phase label implies, or nothing. Exact-match branches are
|
|
4606
|
-
* emitted before prefix branches so `case` ordering reproduces the
|
|
4607
|
-
* exact-beats-prefix precedence.
|
|
4608
|
-
* - `phase_type_of` — reads an issue's labels (one per line) on stdin
|
|
4609
|
-
* and emits `KEY=VALUE` assignments: `OUTCOME=none|match|ambiguous`,
|
|
4610
|
-
* `TYPE_LABEL=` (match only), `CANDIDATE_TYPE_LABELS=` (ambiguous
|
|
4611
|
-
* only), and `PHASE_LABELS=`.
|
|
4612
|
-
* - `is_conventional_type_label <label>` — returns 0 for a
|
|
4613
|
-
* conventional-commit `type:*` label, i.e. the only labels the
|
|
4614
|
-
* auto-correction is allowed to remove.
|
|
4432
|
+
* When the convention is disabled, the rule renders a short stub.
|
|
4615
4433
|
*/
|
|
4616
|
-
declare function
|
|
4434
|
+
declare function renderIssueTemplatesRuleContent(it: ResolvedIssueTemplates, hasDownstreamBundles?: boolean): string;
|
|
4617
4435
|
/**
|
|
4618
|
-
*
|
|
4619
|
-
*
|
|
4620
|
-
*
|
|
4621
|
-
*
|
|
4436
|
+
* Render the short issue-templates hook section injected into a
|
|
4437
|
+
* phased-agent bundle's workflow rule. The section cites the full
|
|
4438
|
+
* contract documented in the base bundle's
|
|
4439
|
+
* `issue-templates-convention` rule so individual bundles stay DRY.
|
|
4440
|
+
*
|
|
4441
|
+
* When the convention is disabled, the function returns an empty
|
|
4442
|
+
* string so callers can no-op their append path.
|
|
4622
4443
|
*/
|
|
4623
|
-
declare function
|
|
4444
|
+
declare function renderIssueTemplatesBundleHook(it: ResolvedIssueTemplates, bundleLabel: string): string;
|
|
4624
4445
|
/**
|
|
4625
|
-
*
|
|
4626
|
-
*
|
|
4627
|
-
*
|
|
4628
|
-
*
|
|
4629
|
-
*
|
|
4446
|
+
* Render the write-once starter issue-templates page — the frontmatter,
|
|
4447
|
+
* the "How to use" preamble, a pointer at the always-regenerated
|
|
4448
|
+
* label-set companion, and a single example template section. Exported
|
|
4449
|
+
* so `AgentConfig` can emit it to disk when the consumer opts in via
|
|
4450
|
+
* `emitStarterDoc: true`.
|
|
4451
|
+
*
|
|
4452
|
+
* The starter stays deliberately sparse on **bodies**: it documents the
|
|
4453
|
+
* expected structure without committing the consumer to a particular
|
|
4454
|
+
* body shape. The correct-by-construction **label sets** live in the
|
|
4455
|
+
* companion page this one links to, which regenerates on every synth —
|
|
4456
|
+
* so a write-once starter can never freeze a consumer on a stale label
|
|
4457
|
+
* taxonomy.
|
|
4630
4458
|
*/
|
|
4631
|
-
declare function
|
|
4459
|
+
declare function renderIssueTemplatesStarterPage(it: ResolvedIssueTemplates): string;
|
|
4460
|
+
/*******************************************************************************
|
|
4461
|
+
*
|
|
4462
|
+
* Generated recipe stubs
|
|
4463
|
+
*
|
|
4464
|
+
******************************************************************************/
|
|
4632
4465
|
/**
|
|
4633
|
-
*
|
|
4634
|
-
*
|
|
4635
|
-
* filter to drop default entries pointing at an excluded bundle.
|
|
4466
|
+
* One correct-by-construction recipe stub: a phase label plus every
|
|
4467
|
+
* label the recipe must carry, all derived rather than hand-copied.
|
|
4636
4468
|
*/
|
|
4637
|
-
|
|
4469
|
+
interface IssueTemplateRecipeStub {
|
|
4470
|
+
/** The phase label the recipe files (e.g. `people:research`). */
|
|
4471
|
+
readonly phaseLabel: string;
|
|
4472
|
+
/** The `type:<bundle>` label the phase-label invariant requires. */
|
|
4473
|
+
readonly typeLabel: string;
|
|
4474
|
+
/** Bundle that contributes the phase label to `.github/labels.yml`. */
|
|
4475
|
+
readonly bundleName: string;
|
|
4476
|
+
/** The label's registry description, used as the section blurb. */
|
|
4477
|
+
readonly description: string;
|
|
4478
|
+
/** Effective `status:*` value for this phase. */
|
|
4479
|
+
readonly status: IssueDefaultsStatus;
|
|
4480
|
+
/** Effective `priority:*` value for this phase. */
|
|
4481
|
+
readonly priority: IssueDefaultsPriority;
|
|
4482
|
+
/** GitHub issue type the filed issue must be assigned. */
|
|
4483
|
+
readonly issueType: GithubIssueType;
|
|
4484
|
+
}
|
|
4638
4485
|
/**
|
|
4639
|
-
*
|
|
4640
|
-
*
|
|
4641
|
-
*
|
|
4642
|
-
*
|
|
4486
|
+
* Derive one recipe stub per phase label the supplied bundles
|
|
4487
|
+
* contribute to `.github/labels.yml`.
|
|
4488
|
+
*
|
|
4489
|
+
* A contributed label counts as a phase label exactly when
|
|
4490
|
+
* `typeLabelForPhaseLabel` resolves it — i.e. when the canonical
|
|
4491
|
+
* bundle-ownership map claims it. That is the *same* map that drives
|
|
4492
|
+
* the label registry and the orchestrator's phase-label invariant, so
|
|
4493
|
+
* a generated stub can never pair a phase label with the wrong
|
|
4494
|
+
* `type:<bundle>` label. Consumer-specific labels no bundle owns are
|
|
4495
|
+
* skipped rather than guessed at.
|
|
4496
|
+
*
|
|
4497
|
+
* Results are deduplicated by phase label (co-owned `req:*` labels are
|
|
4498
|
+
* contributed by more than one requirements bundle) and sorted so the
|
|
4499
|
+
* rendered page is stable across synth runs.
|
|
4643
4500
|
*/
|
|
4644
|
-
declare function
|
|
4501
|
+
declare function collectIssueTemplateRecipeStubs(bundles: ReadonlyArray<AgentRuleBundle>, issueDefaults?: ResolvedIssueDefaults): ReadonlyArray<IssueTemplateRecipeStub>;
|
|
4645
4502
|
/**
|
|
4646
|
-
*
|
|
4647
|
-
*
|
|
4648
|
-
*
|
|
4649
|
-
*
|
|
4503
|
+
* Render the always-regenerated companion page that carries one
|
|
4504
|
+
* label-correct `## Template: <phase-label>` stub per phase label the
|
|
4505
|
+
* consumer's active bundles emit.
|
|
4506
|
+
*
|
|
4507
|
+
* Only the **label set** and the issue-type assignment are generated —
|
|
4508
|
+
* title and body stay angle-bracket placeholders, so the page is a
|
|
4509
|
+
* correct-by-construction starting point rather than a second source of
|
|
4510
|
+
* truth for recipe bodies. Consumers move a stub into their
|
|
4511
|
+
* hand-authored templates page and flesh out its body there; the
|
|
4512
|
+
* label-consistency lint then holds both copies to the same pairing.
|
|
4650
4513
|
*/
|
|
4651
|
-
declare function
|
|
4652
|
-
|
|
4514
|
+
declare function renderIssueTemplatesGeneratedPage(it: ResolvedIssueTemplates, stubs: ReadonlyArray<IssueTemplateRecipeStub>): string;
|
|
4653
4515
|
/**
|
|
4654
|
-
*
|
|
4655
|
-
*
|
|
4656
|
-
*
|
|
4657
|
-
* inside the rule / skill / sub-agent content strings is an interpolation
|
|
4658
|
-
* of the supplied `paths` struct, so a consumer override of
|
|
4659
|
-
* `AgentConfigOptions.paths` propagates to the rendered output.
|
|
4516
|
+
* Render the `.claude/procedures/check-issue-templates.sh` helper
|
|
4517
|
+
* script. Exported so `AgentConfig` can register it as an
|
|
4518
|
+
* `AgentProcedure` when the consumer opts in via `emitChecker: true`.
|
|
4660
4519
|
*
|
|
4661
|
-
*
|
|
4662
|
-
* `appliesWhen` always returns `true` per this batch's directive that
|
|
4663
|
-
* bundles assume peers are present.
|
|
4520
|
+
* The script accepts the list of changed files as either:
|
|
4664
4521
|
*
|
|
4665
|
-
*
|
|
4666
|
-
*
|
|
4667
|
-
*
|
|
4668
|
-
* `bcm:*` phase labels.
|
|
4522
|
+
* 1. Positional arguments (one file per arg).
|
|
4523
|
+
* 2. Newline-separated entries on stdin (when no args supplied) —
|
|
4524
|
+
* pipe `git diff --name-only` directly into it.
|
|
4669
4525
|
*
|
|
4670
|
-
*
|
|
4671
|
-
*
|
|
4672
|
-
*
|
|
4673
|
-
* `
|
|
4526
|
+
* It fails non-zero when any changed file matches a bundle-path
|
|
4527
|
+
* pattern and contains a multi-line `gh issue create ... --title`
|
|
4528
|
+
* invocation that isn't in the configured allow list (the templates
|
|
4529
|
+
* page itself and the `create-issue-workflow` rule source).
|
|
4674
4530
|
*/
|
|
4675
|
-
declare function
|
|
4531
|
+
declare function renderIssueTemplatesCheckerScript(it: ResolvedIssueTemplates): string;
|
|
4676
4532
|
/**
|
|
4677
|
-
*
|
|
4678
|
-
*
|
|
4679
|
-
*
|
|
4680
|
-
*
|
|
4681
|
-
|
|
4682
|
-
|
|
4533
|
+
* Render the `.claude/procedures/check-issue-template-labels.sh`
|
|
4534
|
+
* companion lint. Exported so `AgentConfig` can emit it alongside the
|
|
4535
|
+
* reference-don't-inline lint when the consumer opts in via
|
|
4536
|
+
* `emitChecker: true`.
|
|
4537
|
+
*
|
|
4538
|
+
* Where `check-issue-templates.sh` polices *where* recipes live, this
|
|
4539
|
+
* one polices *what they say*. For every
|
|
4540
|
+
* `## Template: <phase-label>` section on the templates page, its
|
|
4541
|
+
* router-style child pages, and the generated companion, it asserts:
|
|
4542
|
+
*
|
|
4543
|
+
* 1. The recipe passes `--label <phase-label>` — the heading and the
|
|
4544
|
+
* command agree.
|
|
4545
|
+
* 2. It carries exactly one `type:*` label, and that label is the
|
|
4546
|
+
* `type:<bundle>` the phase-label invariant requires.
|
|
4547
|
+
* 3. It carries a GitHub issue-type assignment step (the
|
|
4548
|
+
* `set-issue-type.sh` helper or the `updateIssueIssueType` GraphQL
|
|
4549
|
+
* flow it wraps) — an issue filed without one stays untyped forever.
|
|
4550
|
+
*
|
|
4551
|
+
* Sections whose heading matches no bundle-owned phase label are
|
|
4552
|
+
* skipped, not failed: unrecognised `foo:bar` labels are
|
|
4553
|
+
* consumer-specific and deliberately not policed, exactly as the
|
|
4554
|
+
* orchestrator's invariant sweep treats them.
|
|
4555
|
+
*
|
|
4556
|
+
* The phase-label → type-label resolver is rendered from the same
|
|
4557
|
+
* `PHASE_LABEL_TYPE_MAP` that drives the label registry and the
|
|
4558
|
+
* orchestrator sweep, so the lint can never enforce a stale pairing.
|
|
4559
|
+
*/
|
|
4560
|
+
declare function renderIssueTemplateLabelsCheckerScript(it: ResolvedIssueTemplates): string;
|
|
4683
4561
|
|
|
4684
4562
|
/**
|
|
4685
|
-
*
|
|
4686
|
-
*
|
|
4687
|
-
* Every reference to a canonical agent path (docs root, research root,
|
|
4688
|
-
* etc.) inside the rule / skill / sub-agent content strings is an
|
|
4689
|
-
* interpolation of the supplied `paths` struct, so a consumer override
|
|
4690
|
-
* of `AgentConfigOptions.paths` propagates to the rendered output.
|
|
4691
|
-
*
|
|
4692
|
-
* The bundle sits between `industry-discovery` (upstream, selects
|
|
4693
|
-
* verticals) and `bcm-writer` (downstream, models capabilities). It
|
|
4694
|
-
* assumes `bcm-writer` is enabled so Phase 3 can hand off surfaced
|
|
4695
|
-
* capabilities via `bcm:outline` issues, and it is read by
|
|
4696
|
-
* `company-profile` via the shared `<BUSINESS_MODELS_ROOT>` default
|
|
4697
|
-
* path (`<docsRoot>/industry-research/`).
|
|
4563
|
+
* Fully-resolved requirement category subdirectory names, relative to
|
|
4564
|
+
* the requirements root. Every property is required.
|
|
4698
4565
|
*/
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4566
|
+
interface ResolvedRequirementCategoryDirs {
|
|
4567
|
+
readonly business: string;
|
|
4568
|
+
readonly functional: string;
|
|
4569
|
+
readonly nonFunctional: string;
|
|
4570
|
+
readonly technical: string;
|
|
4571
|
+
readonly architecturalDecisions: string;
|
|
4572
|
+
readonly security: string;
|
|
4573
|
+
readonly data: string;
|
|
4574
|
+
readonly integration: string;
|
|
4575
|
+
readonly operational: string;
|
|
4576
|
+
readonly ux: string;
|
|
4577
|
+
readonly multiTenancy: string;
|
|
4578
|
+
}
|
|
4708
4579
|
/**
|
|
4709
|
-
*
|
|
4710
|
-
*
|
|
4711
|
-
* Every reference to a canonical agent path (docs root, etc.) inside
|
|
4712
|
-
* the rule / skill / sub-agent content strings is an interpolation of
|
|
4713
|
-
* the supplied `paths` struct, so a consumer override of
|
|
4714
|
-
* `AgentConfigOptions.paths` propagates to the rendered output.
|
|
4580
|
+
* Fully-resolved agent output-path roots. Every property is required.
|
|
4715
4581
|
*
|
|
4716
|
-
*
|
|
4717
|
-
*
|
|
4718
|
-
*
|
|
4719
|
-
* phase labels for the six phases.
|
|
4582
|
+
* This is the shape that bundle code consumes at module-eval time via
|
|
4583
|
+
* `DEFAULT_AGENT_PATHS`, and the shape that `resolveAgentPaths()`
|
|
4584
|
+
* returns when consumers supply a partial `AgentPathsConfig` override.
|
|
4720
4585
|
*/
|
|
4721
|
-
|
|
4586
|
+
interface ResolvedAgentPaths {
|
|
4587
|
+
readonly docsRoot: string;
|
|
4588
|
+
readonly researchRoot: string;
|
|
4589
|
+
readonly profilesRoot: string;
|
|
4590
|
+
readonly meetingsRoot: string;
|
|
4591
|
+
readonly requirementsRoot: string;
|
|
4592
|
+
readonly researchRequirementsRoot: string;
|
|
4593
|
+
readonly bcmRoot: string;
|
|
4594
|
+
readonly peopleRoot: string;
|
|
4595
|
+
readonly companiesRoot: string;
|
|
4596
|
+
readonly softwareRoot: string;
|
|
4597
|
+
readonly industriesRoot: string;
|
|
4598
|
+
readonly requirementCategoryDirs: ResolvedRequirementCategoryDirs;
|
|
4599
|
+
}
|
|
4722
4600
|
/**
|
|
4723
|
-
*
|
|
4724
|
-
*
|
|
4725
|
-
*
|
|
4726
|
-
*
|
|
4601
|
+
* Canonical default subdirectory name for each requirement category.
|
|
4602
|
+
* These mirror the hardcoded `functional/`, `non-functional/`, … dirs
|
|
4603
|
+
* that the requirements bundles emitted before category dirs became
|
|
4604
|
+
* configurable, so the generated requirements snapshot is unchanged
|
|
4605
|
+
* unless a consumer overrides an entry.
|
|
4727
4606
|
*/
|
|
4728
|
-
declare const
|
|
4729
|
-
|
|
4607
|
+
declare const DEFAULT_REQUIREMENT_CATEGORY_DIRS: ResolvedRequirementCategoryDirs;
|
|
4730
4608
|
/**
|
|
4731
|
-
*
|
|
4732
|
-
*
|
|
4733
|
-
*
|
|
4734
|
-
*
|
|
4735
|
-
*
|
|
4736
|
-
*
|
|
4737
|
-
* Ships a sub-agent (`customer-profile-analyst`), three
|
|
4738
|
-
* user-invocable skills (`/discover-customers`, `/profile-customer`,
|
|
4739
|
-
* `/analyze-customer-competitors`), a customer-profile-page template
|
|
4740
|
-
* (emitted alongside the profile skill), and `type:customer-profile`
|
|
4741
|
-
* plus `customer:*` phase labels.
|
|
4742
|
-
*
|
|
4743
|
-
* The bundle sits downstream of `meeting-analysis`,
|
|
4744
|
-
* `industry-discovery`, and `research-pipeline` (which surface the
|
|
4745
|
-
* need for customer-archetype research) and hands off unmet needs to
|
|
4746
|
-
* the `requirements-analyst` bundle via `req:scan` issues, and
|
|
4747
|
-
* canonical profiles to `company-profile` and `people-profile` for
|
|
4748
|
-
* representative customer organizations, competitor organizations,
|
|
4749
|
-
* and notable contacts.
|
|
4609
|
+
* Canonical default values for every agent path. These mirror the
|
|
4610
|
+
* hardcoded paths that bundles used before `AgentPathsConfig` existed,
|
|
4611
|
+
* so `DEFAULT_AGENT_PATHS.*` can be substituted into bundle rule
|
|
4612
|
+
* content at module-eval time without changing the generated
|
|
4613
|
+
* `.claude/rules/*.md` snapshot.
|
|
4750
4614
|
*
|
|
4751
|
-
*
|
|
4752
|
-
*
|
|
4753
|
-
*
|
|
4754
|
-
*
|
|
4755
|
-
*
|
|
4756
|
-
* feature matrix.
|
|
4615
|
+
* Consumers override the defaults by passing an `AgentPathsConfig`
|
|
4616
|
+
* through `AgentConfigOptions.paths` and resolving it with
|
|
4617
|
+
* `resolveAgentPaths()`. Every path-aware bundle threads the resolved
|
|
4618
|
+
* struct through its rule / skill / sub-agent content, so an override
|
|
4619
|
+
* propagates into the rendered output.
|
|
4757
4620
|
*/
|
|
4758
|
-
declare
|
|
4621
|
+
declare const DEFAULT_AGENT_PATHS: ResolvedAgentPaths;
|
|
4759
4622
|
/**
|
|
4760
|
-
*
|
|
4761
|
-
*
|
|
4762
|
-
*
|
|
4763
|
-
*
|
|
4623
|
+
* Resolve a partial `AgentPathsConfig` into a fully-populated
|
|
4624
|
+
* `ResolvedAgentPaths`. Unset fields cascade from their parent root:
|
|
4625
|
+
*
|
|
4626
|
+
* - `profilesRoot`, `meetingsRoot`, `requirementsRoot`, and `bcmRoot`
|
|
4627
|
+
* derive from `docsRoot` when not explicitly set.
|
|
4628
|
+
* - `researchRequirementsRoot` derives from `researchRoot` when not
|
|
4629
|
+
* explicitly set.
|
|
4630
|
+
* - `peopleRoot`, `companiesRoot`, `softwareRoot`, and `industriesRoot`
|
|
4631
|
+
* derive from the resolved `profilesRoot` when not explicitly set,
|
|
4632
|
+
* so that overriding `docsRoot` alone (or overriding `profilesRoot`
|
|
4633
|
+
* alone) propagates correctly through every dependent root.
|
|
4764
4634
|
*/
|
|
4765
|
-
declare
|
|
4635
|
+
declare function resolveAgentPaths(paths?: AgentPathsConfig): ResolvedAgentPaths;
|
|
4766
4636
|
|
|
4767
4637
|
/**
|
|
4768
|
-
*
|
|
4769
|
-
*
|
|
4770
|
-
*
|
|
4771
|
-
* script's contents.
|
|
4772
|
-
*
|
|
4773
|
-
* The helper runs `@microsoft/api-extractor` end-to-end for a single
|
|
4774
|
-
* package and writes the `.api.md` rollup to the scratch folder
|
|
4775
|
-
* declared by that package's `api-extractor.json`. Rollups are
|
|
4776
|
-
* **regenerate-on-scan** per the docs-sync epic resolved decision #3
|
|
4777
|
-
* — the scan phase consumes the freshly-regenerated rollup in-memory
|
|
4778
|
-
* rather than comparing against a committed baseline.
|
|
4638
|
+
* Default master switch for the progress-file convention. When no
|
|
4639
|
+
* config is supplied, the convention ships **enabled** so every phased
|
|
4640
|
+
* agent writes a progress file on claim and reads it on resume.
|
|
4779
4641
|
*
|
|
4780
|
-
*
|
|
4781
|
-
* `api-extractor.json` at the target path, `3` the extractor exited
|
|
4782
|
-
* non-zero (compile error or extractor failure).
|
|
4642
|
+
* @see ProgressFilesConfig
|
|
4783
4643
|
*/
|
|
4784
|
-
declare
|
|
4644
|
+
declare const DEFAULT_PROGRESS_FILES_ENABLED = true;
|
|
4785
4645
|
/**
|
|
4786
|
-
*
|
|
4787
|
-
*
|
|
4788
|
-
*
|
|
4789
|
-
*
|
|
4646
|
+
* Default on-disk root for progress files, relative to the repo root.
|
|
4647
|
+
* Every progress file resolves to
|
|
4648
|
+
* `<stateDir>/<filename>` where `<filename>` is produced from
|
|
4649
|
+
* `filenamePattern` at runtime.
|
|
4650
|
+
*
|
|
4651
|
+
* Lives at the top-level `.state/` directory so the path stays
|
|
4652
|
+
* harness-neutral — any agent runtime (Claude Code, Cursor, a
|
|
4653
|
+
* bespoke worker) can read and write the same progress files
|
|
4654
|
+
* without having to scope under a harness-specific tree.
|
|
4655
|
+
*
|
|
4656
|
+
* @see ProgressFilesConfig
|
|
4790
4657
|
*/
|
|
4791
|
-
declare const
|
|
4658
|
+
declare const DEFAULT_PROGRESS_FILES_STATE_DIR = ".state";
|
|
4792
4659
|
/**
|
|
4793
|
-
*
|
|
4794
|
-
*
|
|
4795
|
-
*
|
|
4796
|
-
* script's contents.
|
|
4797
|
-
*
|
|
4798
|
-
* The helper wraps two external tools — `astro check` (internal
|
|
4799
|
-
* links) and `lychee` (external `https://…` URLs) — and normalizes
|
|
4800
|
-
* their per-finding output into a single JSON-array stream of
|
|
4801
|
-
* `{ url, docPath, line, kind, reason }` records on stdout. The
|
|
4802
|
-
* downstream docs-sync scan phase (#519/#520) consumes that stream
|
|
4803
|
-
* and decides which findings are advisory and which block the PR.
|
|
4660
|
+
* Default filename pattern for a progress file. The `<ISSUE_NUMBER>`
|
|
4661
|
+
* placeholder is substituted at runtime with the numeric id of the
|
|
4662
|
+
* issue the agent is working on (e.g. `479-progress.json`).
|
|
4804
4663
|
*
|
|
4805
|
-
*
|
|
4806
|
-
*
|
|
4807
|
-
*
|
|
4808
|
-
* (missing binary, config error, IO failure).
|
|
4664
|
+
* The placeholder uses the angle-bracketed uppercase-snake form — not
|
|
4665
|
+
* `{{curly-brace}}` form — because `AgentConfig`'s template resolver
|
|
4666
|
+
* claims the curly-brace namespace at rule generation time.
|
|
4809
4667
|
*
|
|
4810
|
-
*
|
|
4811
|
-
* root, `2` a required external tool is missing, `3` a tool ran
|
|
4812
|
-
* but exited non-zero for a reason other than broken-link
|
|
4813
|
-
* detection.
|
|
4668
|
+
* @see ProgressFilesConfig
|
|
4814
4669
|
*/
|
|
4815
|
-
declare
|
|
4670
|
+
declare const DEFAULT_PROGRESS_FILES_FILENAME_PATTERN = "<ISSUE_NUMBER>-progress.json";
|
|
4816
4671
|
/**
|
|
4817
|
-
*
|
|
4818
|
-
*
|
|
4819
|
-
*
|
|
4820
|
-
*
|
|
4821
|
-
*
|
|
4822
|
-
*
|
|
4672
|
+
* Default serialization format for a progress file body. JSON is the
|
|
4673
|
+
* default because it is trivially machine-parseable (e.g. for scripted
|
|
4674
|
+
* resume logic) while still remaining human-readable when opened.
|
|
4675
|
+
* Consumers that prefer the openhi-style markdown body can override.
|
|
4676
|
+
*
|
|
4677
|
+
* @see ProgressFilesConfig
|
|
4823
4678
|
*/
|
|
4824
|
-
declare const
|
|
4679
|
+
declare const DEFAULT_PROGRESS_FILES_FORMAT: "json" | "markdown";
|
|
4825
4680
|
/**
|
|
4826
|
-
*
|
|
4827
|
-
*
|
|
4828
|
-
*
|
|
4829
|
-
*
|
|
4830
|
-
*
|
|
4831
|
-
*
|
|
4832
|
-
* tags (`</content>`, `</invoke>`, occasionally `</parameter>`) as
|
|
4833
|
-
* trailing whole lines in the markdown they write. `astro check` and
|
|
4834
|
-
* CI link checks do not catch them. This helper strips those leaked
|
|
4835
|
-
* EOF artifact lines on write so they never reach the committed tree.
|
|
4836
|
-
*
|
|
4837
|
-
* Behaviour, mirroring `check-links.sh`'s defensive guards:
|
|
4838
|
-
*
|
|
4839
|
-
* - Takes a single file-path argument.
|
|
4840
|
-
* - Operates only when the file exists and its path is under
|
|
4841
|
-
* `docs/src/content/docs/`. Any other path (or a missing file) is
|
|
4842
|
-
* a silent no-op.
|
|
4843
|
-
* - Removes **trailing whole lines** that are exactly `</content>`,
|
|
4844
|
-
* `</invoke>`, or `</parameter>` (trailing whitespace on the line
|
|
4845
|
-
* is tolerated), plus any blank lines that become trailing once
|
|
4846
|
-
* the tags are removed, then leaves a single final newline.
|
|
4847
|
-
* - Only whole-line EOF tags are stripped — legitimate inline
|
|
4848
|
-
* `<...>` prose or fenced code is never touched.
|
|
4849
|
-
* - Idempotent: a second run on an already-clean file changes
|
|
4850
|
-
* nothing.
|
|
4851
|
-
* - Never edits a file it did not need to change, and **always**
|
|
4852
|
-
* exits 0 so a PostToolUse hook can never fail the tool call.
|
|
4681
|
+
* Default stale-threshold (hours) for branches carrying a progress
|
|
4682
|
+
* file. When the orchestrator's stale-branch decision tree finds a
|
|
4683
|
+
* progress file older than this many hours **and** no matching open
|
|
4684
|
+
* PR, it treats the branch as abandoned and resets the issue to
|
|
4685
|
+
* `status:ready`. Mirrors the 72-hour in-progress threshold used by
|
|
4686
|
+
* the orchestrator bundle's triage walk.
|
|
4853
4687
|
*
|
|
4854
|
-
*
|
|
4688
|
+
* @see ProgressFilesConfig
|
|
4855
4689
|
*/
|
|
4856
|
-
declare
|
|
4690
|
+
declare const DEFAULT_PROGRESS_FILES_STALE_AFTER_HOURS = 72;
|
|
4857
4691
|
/**
|
|
4858
|
-
* `
|
|
4859
|
-
*
|
|
4860
|
-
*
|
|
4861
|
-
* bundle is force-included, and chained into the base PostToolUse
|
|
4862
|
-
* Edit|Write hook so authored markdown is cleaned of leaked tool-call
|
|
4863
|
-
* artifact tags on write (#779).
|
|
4692
|
+
* Allowed values for `ProgressFilesConfig.format`. Exported so
|
|
4693
|
+
* consumers can reference the canonical set without hard-coding
|
|
4694
|
+
* literals.
|
|
4864
4695
|
*/
|
|
4865
|
-
declare const
|
|
4696
|
+
declare const PROGRESS_FILES_FORMAT_VALUES: readonly ["json", "markdown"];
|
|
4866
4697
|
/**
|
|
4867
|
-
*
|
|
4868
|
-
*
|
|
4869
|
-
* docs-sync bundle can register it as an `AgentProcedure` and the
|
|
4870
|
-
* bundles test suite can assert on the script's contents.
|
|
4871
|
-
*
|
|
4872
|
-
* The helper wraps the `compileFencedSamples` API exported from
|
|
4873
|
-
* `@codedrifters/configulator` (under `src/docs-sync/sample-compilation/`)
|
|
4874
|
-
* and emits a single JSON-array stream of failure records on stdout.
|
|
4875
|
-
* Detection is **data**, not failure: the helper exits `0` when the
|
|
4876
|
-
* compilation phase ran successfully, regardless of how many samples
|
|
4877
|
-
* failed to compile. Non-zero exits are reserved for tool-level
|
|
4878
|
-
* failures (missing binary, IO error, internal exception).
|
|
4879
|
-
*
|
|
4880
|
-
* Exit codes: `0` success, `1` usage error or unreadable docs root,
|
|
4881
|
-
* `2` a required binary is missing (`node` / `pnpm`), `3` the
|
|
4882
|
-
* compilation phase threw an unhandled exception.
|
|
4698
|
+
* Fully-resolved progress-file settings. Every field is defaulted so
|
|
4699
|
+
* downstream renderers can reason about a single canonical shape.
|
|
4883
4700
|
*/
|
|
4884
|
-
|
|
4701
|
+
interface ResolvedProgressFiles {
|
|
4702
|
+
readonly enabled: boolean;
|
|
4703
|
+
readonly stateDir: string;
|
|
4704
|
+
readonly filenamePattern: string;
|
|
4705
|
+
readonly format: "json" | "markdown";
|
|
4706
|
+
readonly cleanupOnComplete: boolean;
|
|
4707
|
+
readonly staleAfterHours: number;
|
|
4708
|
+
}
|
|
4885
4709
|
/**
|
|
4886
|
-
* `
|
|
4887
|
-
*
|
|
4888
|
-
*
|
|
4889
|
-
*
|
|
4890
|
-
*
|
|
4891
|
-
*
|
|
4892
|
-
*
|
|
4893
|
-
*
|
|
4894
|
-
* that fail to compile are one of the two hard-block cases.
|
|
4710
|
+
* Resolve a (possibly absent) `ProgressFilesConfig` into a canonical
|
|
4711
|
+
* `ResolvedProgressFiles` with every field filled in. Unset fields
|
|
4712
|
+
* cascade from their documented defaults.
|
|
4713
|
+
*
|
|
4714
|
+
* Malformed configs — empty / whitespace-only `stateDir`, absolute
|
|
4715
|
+
* `stateDir`, empty / whitespace-only `filenamePattern`, `filenamePattern`
|
|
4716
|
+
* missing the `<ISSUE_NUMBER>` placeholder, unknown `format` value,
|
|
4717
|
+
* non-positive `staleAfterHours` — throw a descriptive `Error`.
|
|
4895
4718
|
*/
|
|
4896
|
-
declare
|
|
4719
|
+
declare function resolveProgressFiles(config?: ProgressFilesConfig): ResolvedProgressFiles;
|
|
4897
4720
|
/**
|
|
4898
|
-
*
|
|
4721
|
+
* Synth-time validation hook. Throws a descriptive `Error` when the
|
|
4722
|
+
* supplied `ProgressFilesConfig` is malformed. Called by
|
|
4723
|
+
* `AgentConfig.preSynthesize` before any rendering so a misconfigured
|
|
4724
|
+
* convention fails the build instead of silently shipping broken
|
|
4725
|
+
* resume semantics. Returns the resolved config unchanged so callers
|
|
4726
|
+
* can write `const pf = validateProgressFilesConfig(config)` in
|
|
4727
|
+
* one line.
|
|
4899
4728
|
*
|
|
4900
|
-
*
|
|
4901
|
-
* `false` by default so the scaffold ships disabled until a
|
|
4902
|
-
* downstream child issue enables it across the monorepo.
|
|
4729
|
+
* Malformed cases rejected here:
|
|
4903
4730
|
*
|
|
4904
|
-
*
|
|
4905
|
-
*
|
|
4906
|
-
*
|
|
4907
|
-
*
|
|
4908
|
-
*
|
|
4909
|
-
* `docs-sync:advisory`, `docs-sync:blocking`), and a
|
|
4910
|
-
* `Documentation Sync Workflow` rule rendered into CLAUDE.md so
|
|
4911
|
-
* humans reading the file see the pipeline exists even while the
|
|
4912
|
-
* behavior is still landing across child issues.
|
|
4913
|
-
*/
|
|
4914
|
-
declare function buildDocsSyncBundle(paths?: ResolvedAgentPaths): AgentRuleBundle;
|
|
4915
|
-
/**
|
|
4916
|
-
* Default-paths instance of the docs-sync bundle, preserved for
|
|
4917
|
-
* parity with other path-aware bundles in this directory. The factory
|
|
4918
|
-
* above is the canonical entry point when a consumer supplies
|
|
4919
|
-
* `AgentConfigOptions.paths`.
|
|
4731
|
+
* - `stateDir` empty, whitespace-only, or absolute.
|
|
4732
|
+
* - `filenamePattern` empty, whitespace-only, or missing the
|
|
4733
|
+
* `<ISSUE_NUMBER>` placeholder.
|
|
4734
|
+
* - `format` not one of `"json"` / `"markdown"`.
|
|
4735
|
+
* - `staleAfterHours` non-integer, zero, or negative.
|
|
4920
4736
|
*/
|
|
4921
|
-
declare
|
|
4922
|
-
|
|
4737
|
+
declare function validateProgressFilesConfig(config?: ProgressFilesConfig): ResolvedProgressFiles;
|
|
4923
4738
|
/**
|
|
4924
|
-
*
|
|
4925
|
-
*
|
|
4739
|
+
* Resolve the runtime filename for a progress file given an issue
|
|
4740
|
+
* number and a resolved config. `<ISSUE_NUMBER>` placeholders in the
|
|
4741
|
+
* pattern are substituted; the returned value is **just** the filename
|
|
4742
|
+
* (no directory prefix).
|
|
4926
4743
|
*
|
|
4927
|
-
*
|
|
4928
|
-
*
|
|
4929
|
-
* omitted, the bundle ships the zero-remote-cache defaults
|
|
4930
|
-
* ({@link DEFAULT_BUILD_POLICY}), which emit no AWS-authentication
|
|
4931
|
-
* guidance at all.
|
|
4744
|
+
* Exported so consumer-side scripts (or the `partial-resume-protocol`
|
|
4745
|
+
* rule renderer) can compute the on-disk path deterministically.
|
|
4932
4746
|
*/
|
|
4933
|
-
declare function
|
|
4747
|
+
declare function renderProgressFileName(pf: ResolvedProgressFiles, issueNumber: number | string): string;
|
|
4934
4748
|
/**
|
|
4935
|
-
*
|
|
4936
|
-
*
|
|
4937
|
-
* consumers that import the const directly. Prefer
|
|
4938
|
-
* `buildGithubWorkflowBundle(buildPolicy)` when the consuming
|
|
4939
|
-
* project's Turborepo configuration is in scope.
|
|
4749
|
+
* Resolve the runtime path (directory + filename) for a progress file
|
|
4750
|
+
* given an issue number and a resolved config.
|
|
4940
4751
|
*/
|
|
4941
|
-
declare
|
|
4942
|
-
|
|
4752
|
+
declare function renderProgressFilePath(pf: ResolvedProgressFiles, issueNumber: number | string): string;
|
|
4943
4753
|
/**
|
|
4944
|
-
*
|
|
4754
|
+
* Render the full body for the `progress-file-convention` rule shipped
|
|
4755
|
+
* by the `base` bundle. The rule documents:
|
|
4945
4756
|
*
|
|
4946
|
-
*
|
|
4947
|
-
*
|
|
4948
|
-
*
|
|
4949
|
-
*
|
|
4757
|
+
* - The progress-file schema and on-disk path contract.
|
|
4758
|
+
* - The partial-resume protocol (read-before-write + acceptance
|
|
4759
|
+
* criteria replay).
|
|
4760
|
+
* - The stale-branch decision tree (clone-level recovery) that every
|
|
4761
|
+
* worker runs at session start.
|
|
4762
|
+
* - The `[BLOCKED]` structured comment format used when an agent
|
|
4763
|
+
* cannot proceed.
|
|
4764
|
+
*
|
|
4765
|
+
* When the convention is disabled, the rule renders a short stub that
|
|
4766
|
+
* tells agents the project does not enforce progress files and they
|
|
4767
|
+
* must pick up work from scratch on every session.
|
|
4950
4768
|
*/
|
|
4951
|
-
declare function
|
|
4769
|
+
declare function renderProgressFilesRuleContent(pf: ResolvedProgressFiles): string;
|
|
4952
4770
|
/**
|
|
4953
|
-
*
|
|
4954
|
-
*
|
|
4955
|
-
*
|
|
4956
|
-
*
|
|
4771
|
+
* Render the short progress-file hook section injected into a
|
|
4772
|
+
* phased-agent bundle's workflow rule (bcm-writer, research-pipeline,
|
|
4773
|
+
* etc.). The section cites the full contract documented in the base
|
|
4774
|
+
* bundle's `progress-file-convention` rule so individual bundles stay
|
|
4775
|
+
* DRY.
|
|
4776
|
+
*
|
|
4777
|
+
* When the convention is disabled, the function returns an empty
|
|
4778
|
+
* string so callers can no-op their append path.
|
|
4957
4779
|
*/
|
|
4958
|
-
declare
|
|
4780
|
+
declare function renderProgressFilesBundleHook(pf: ResolvedProgressFiles, bundleLabel: string): string;
|
|
4959
4781
|
|
|
4960
4782
|
/**
|
|
4961
|
-
*
|
|
4783
|
+
* Default master switch for the shared-editing convention. When no
|
|
4784
|
+
* config is supplied, the convention ships **enabled** so every agent
|
|
4785
|
+
* that edits an index file follows the single-entry / verify /
|
|
4786
|
+
* re-sort protocol.
|
|
4787
|
+
*
|
|
4788
|
+
* @see SharedEditingConfig
|
|
4962
4789
|
*/
|
|
4963
|
-
declare const
|
|
4964
|
-
|
|
4790
|
+
declare const DEFAULT_SHARED_EDITING_ENABLED = true;
|
|
4965
4791
|
/**
|
|
4966
|
-
*
|
|
4792
|
+
* Default list of path patterns considered "shared index files". The
|
|
4793
|
+
* patterns are plain glob strings rendered verbatim into the rule body
|
|
4794
|
+
* — agents match against them when deciding whether the shared-editing
|
|
4795
|
+
* contract applies to the file they are about to edit.
|
|
4967
4796
|
*
|
|
4968
|
-
*
|
|
4969
|
-
*
|
|
4970
|
-
* `true` per this batch's directive that bundles assume peers are
|
|
4971
|
-
* present.
|
|
4797
|
+
* The defaults cover the registry / index files every configulator
|
|
4798
|
+
* consumer ships by convention:
|
|
4972
4799
|
*
|
|
4973
|
-
*
|
|
4974
|
-
*
|
|
4975
|
-
*
|
|
4976
|
-
*
|
|
4977
|
-
*
|
|
4978
|
-
*
|
|
4979
|
-
*
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
* Default-paths instance of the maintenance-audit bundle, preserved
|
|
4984
|
-
* for backward compatibility with consumers that import the const
|
|
4985
|
-
* directly. The factory above is the canonical entry point when a
|
|
4986
|
-
* consumer supplies `AgentConfigOptions.paths`.
|
|
4987
|
-
*/
|
|
4988
|
-
declare const maintenanceAuditBundle: AgentRuleBundle;
|
|
4989
|
-
|
|
4990
|
-
/**
|
|
4991
|
-
* Build the meeting-analysis bundle with the supplied default sub-agent
|
|
4992
|
-
* model tier. The tier knob lets consumers globally demote the
|
|
4993
|
-
* `meeting-analyst` sub-agent to BALANCED (sonnet) — which is the
|
|
4994
|
-
* post-2026-05-08 default — without forking the bundle.
|
|
4995
|
-
*/
|
|
4996
|
-
declare function buildMeetingAnalysisBundle(tier?: AgentModel): AgentRuleBundle;
|
|
4997
|
-
/**
|
|
4998
|
-
* Default-tier instance of the meeting-analysis bundle, preserved for
|
|
4999
|
-
* backward compatibility with consumers that import the const directly.
|
|
5000
|
-
* The factory above is the canonical entry point when a consumer
|
|
5001
|
-
* supplies `AgentConfigOptions.defaultAgentTier`.
|
|
4800
|
+
* - A monorepo-wide docs site at `/docs` with one or more `index.md` /
|
|
4801
|
+
* `README.md` registry tables.
|
|
4802
|
+
* - Category landing pages under `docs/src/content/docs/**` that list
|
|
4803
|
+
* every profile, requirement, or capability in their category.
|
|
4804
|
+
* - Feature matrices produced by the `software-profile` bundle.
|
|
4805
|
+
*
|
|
4806
|
+
* Consumers can replace the list outright via `sharedIndexPaths` or
|
|
4807
|
+
* append project-specific registries.
|
|
4808
|
+
*
|
|
4809
|
+
* @see SharedEditingConfig
|
|
5002
4810
|
*/
|
|
5003
|
-
declare const
|
|
5004
|
-
|
|
4811
|
+
declare const DEFAULT_SHARED_INDEX_PATHS: ReadonlyArray<string>;
|
|
5005
4812
|
/**
|
|
5006
|
-
* Default
|
|
5007
|
-
*
|
|
5008
|
-
*
|
|
5009
|
-
*
|
|
5010
|
-
*
|
|
5011
|
-
* length is therefore `ratio + 1`.
|
|
4813
|
+
* Default conflict-resolution strategy rendered into the rule body.
|
|
4814
|
+
* `rebase` matches the `git pull --rebase` workflow every
|
|
4815
|
+
* configulator-managed repo already uses for feature branches; the
|
|
4816
|
+
* alternative (`merge`) is documented for projects that keep a
|
|
4817
|
+
* merge-commit-only history.
|
|
5012
4818
|
*
|
|
5013
|
-
* @see
|
|
4819
|
+
* @see SharedEditingConfig
|
|
5014
4820
|
*/
|
|
5015
|
-
declare const
|
|
4821
|
+
declare const DEFAULT_SHARED_EDITING_CONFLICT_STRATEGY: "rebase" | "merge";
|
|
5016
4822
|
/**
|
|
5017
|
-
* Default
|
|
5018
|
-
*
|
|
5019
|
-
*
|
|
5020
|
-
*
|
|
5021
|
-
*
|
|
4823
|
+
* Default for whether the convention renders the commit-path
|
|
4824
|
+
* verification protocol (read-back + single-row assertion). The
|
|
4825
|
+
* verification step is cheap, catches staging / path bugs that would
|
|
4826
|
+
* otherwise land on the branch, and is the core safety net the openhi
|
|
4827
|
+
* reference promotes — so it ships **on** by default.
|
|
5022
4828
|
*
|
|
5023
|
-
* @see
|
|
4829
|
+
* @see SharedEditingConfig
|
|
5024
4830
|
*/
|
|
5025
|
-
declare const
|
|
4831
|
+
declare const DEFAULT_SHARED_EDITING_VERIFY_COMMIT = true;
|
|
5026
4832
|
/**
|
|
5027
|
-
* Default
|
|
5028
|
-
*
|
|
5029
|
-
*
|
|
5030
|
-
*
|
|
4833
|
+
* Default for whether the convention emits the
|
|
4834
|
+
* `.claude/procedures/verify-index-row.sh` helper to disk. The helper
|
|
4835
|
+
* is opt-in because many consumers prefer to do the verification
|
|
4836
|
+
* inline via the documented `git show HEAD:<path>` recipe rather than
|
|
4837
|
+
* shell out to a dedicated script. Consumers that want the script
|
|
4838
|
+
* available to sub-agents enable the emission explicitly.
|
|
5031
4839
|
*
|
|
5032
|
-
* @see
|
|
4840
|
+
* @see SharedEditingConfig
|
|
5033
4841
|
*/
|
|
5034
|
-
declare const
|
|
4842
|
+
declare const DEFAULT_SHARED_EDITING_EMIT_HELPER = false;
|
|
5035
4843
|
/**
|
|
5036
|
-
*
|
|
5037
|
-
*
|
|
5038
|
-
*
|
|
5039
|
-
* cheaper model like Sonnet is the documented recommendation.
|
|
5040
|
-
*
|
|
5041
|
-
* @see RunRatioConfig
|
|
4844
|
+
* Allowed values for `SharedEditingConfig.conflictStrategy`. Exported
|
|
4845
|
+
* so consumers can reference the canonical set without hard-coding
|
|
4846
|
+
* literals.
|
|
5042
4847
|
*/
|
|
5043
|
-
declare const
|
|
4848
|
+
declare const SHARED_EDITING_CONFLICT_STRATEGY_VALUES: readonly ["rebase", "merge"];
|
|
5044
4849
|
/**
|
|
5045
|
-
* Fully-resolved
|
|
4850
|
+
* Fully-resolved shared-editing settings. Every field is defaulted so
|
|
5046
4851
|
* downstream renderers can reason about a single canonical shape.
|
|
5047
4852
|
*/
|
|
5048
|
-
interface
|
|
4853
|
+
interface ResolvedSharedEditing {
|
|
5049
4854
|
readonly enabled: boolean;
|
|
5050
|
-
readonly
|
|
5051
|
-
readonly
|
|
5052
|
-
readonly
|
|
5053
|
-
readonly
|
|
4855
|
+
readonly sharedIndexPaths: ReadonlyArray<string>;
|
|
4856
|
+
readonly verifyCommit: boolean;
|
|
4857
|
+
readonly conflictStrategy: "rebase" | "merge";
|
|
4858
|
+
readonly emitHelper: boolean;
|
|
5054
4859
|
}
|
|
5055
4860
|
/**
|
|
5056
|
-
* Resolve a (possibly absent) `
|
|
5057
|
-
* `
|
|
4861
|
+
* Resolve a (possibly absent) `SharedEditingConfig` into a canonical
|
|
4862
|
+
* `ResolvedSharedEditing` with every field filled in. Unset fields
|
|
5058
4863
|
* cascade from their documented defaults.
|
|
5059
4864
|
*
|
|
5060
|
-
* Malformed configs
|
|
5061
|
-
*
|
|
5062
|
-
* callers should not need to guard against it at runtime.
|
|
4865
|
+
* Malformed configs — empty / whitespace-only `sharedIndexPaths`
|
|
4866
|
+
* entry, unknown `conflictStrategy` — throw a descriptive `Error`.
|
|
5063
4867
|
*/
|
|
5064
|
-
declare function
|
|
4868
|
+
declare function resolveSharedEditing(config?: SharedEditingConfig): ResolvedSharedEditing;
|
|
5065
4869
|
/**
|
|
5066
4870
|
* Synth-time validation hook. Throws a descriptive `Error` when the
|
|
5067
|
-
* supplied `
|
|
4871
|
+
* supplied `SharedEditingConfig` is malformed. Called by
|
|
5068
4872
|
* `AgentConfig.preSynthesize` before any rendering so a misconfigured
|
|
5069
|
-
*
|
|
5070
|
-
*
|
|
5071
|
-
* callers can write `const
|
|
5072
|
-
* one line.
|
|
4873
|
+
* convention fails the build instead of silently shipping broken
|
|
4874
|
+
* shared-editing guidance. Returns the resolved config unchanged so
|
|
4875
|
+
* callers can write `const se = validateSharedEditingConfig(config)`
|
|
4876
|
+
* in one line.
|
|
5073
4877
|
*
|
|
5074
4878
|
* Malformed cases rejected here:
|
|
5075
4879
|
*
|
|
5076
|
-
* - `
|
|
5077
|
-
*
|
|
5078
|
-
*
|
|
4880
|
+
* - `sharedIndexPaths` contains an empty / whitespace-only entry, or
|
|
4881
|
+
* the array is supplied but empty.
|
|
4882
|
+
* - `conflictStrategy` is not one of `"rebase"` / `"merge"`.
|
|
5079
4883
|
*/
|
|
5080
|
-
declare function
|
|
4884
|
+
declare function validateSharedEditingConfig(config?: SharedEditingConfig): ResolvedSharedEditing;
|
|
5081
4885
|
/**
|
|
5082
|
-
*
|
|
5083
|
-
*
|
|
5084
|
-
* side (tests, downstream consumers that want to reason about the
|
|
5085
|
-
* cadence without shelling out). The shell helper produced by
|
|
5086
|
-
* `renderRunRatioShellHelpers` implements the same logic.
|
|
4886
|
+
* Render the full body for the `shared-editing-safety` rule shipped
|
|
4887
|
+
* by the `base` bundle. The rule documents:
|
|
5087
4888
|
*
|
|
5088
|
-
*
|
|
5089
|
-
*
|
|
5090
|
-
*
|
|
4889
|
+
* - The catalog of shared index files the contract applies to.
|
|
4890
|
+
* - The pre-edit read-latest protocol (pull + re-read before editing).
|
|
4891
|
+
* - The single-entry, deterministic-sort row-insert rule.
|
|
4892
|
+
* - The commit-path verification step (read-back + count assertion).
|
|
4893
|
+
* - The merge-conflict resolution recipe (rebase, re-sort, re-verify).
|
|
4894
|
+
*
|
|
4895
|
+
* When the convention is disabled, the rule renders a short stub that
|
|
4896
|
+
* tells agents the project does not enforce the convention and that
|
|
4897
|
+
* concurrent edits to shared index files may require manual conflict
|
|
4898
|
+
* resolution.
|
|
5091
4899
|
*/
|
|
5092
|
-
declare function
|
|
4900
|
+
declare function renderSharedEditingRuleContent(se: ResolvedSharedEditing): string;
|
|
5093
4901
|
/**
|
|
5094
|
-
* Render the
|
|
5095
|
-
*
|
|
5096
|
-
*
|
|
5097
|
-
*
|
|
4902
|
+
* Render the short shared-editing hook section injected into a
|
|
4903
|
+
* phased-agent bundle's workflow rule (company-profile,
|
|
4904
|
+
* people-profile, software-profile, etc.). The section cites the
|
|
4905
|
+
* full contract documented in the base bundle's
|
|
4906
|
+
* `shared-editing-safety` rule so individual bundles stay DRY.
|
|
4907
|
+
*
|
|
4908
|
+
* When the convention is disabled, the function returns an empty
|
|
4909
|
+
* string so callers can no-op their append path.
|
|
5098
4910
|
*/
|
|
5099
|
-
declare function
|
|
4911
|
+
declare function renderSharedEditingBundleHook(se: ResolvedSharedEditing, bundleLabel: string): string;
|
|
5100
4912
|
/**
|
|
5101
|
-
* Render
|
|
5102
|
-
*
|
|
4913
|
+
* Render the `.claude/procedures/verify-index-row.sh` helper script.
|
|
4914
|
+
* Exported so `AgentConfig` can register it as an `AgentProcedure`
|
|
4915
|
+
* when the consumer opts in via `emitHelper: true`.
|
|
5103
4916
|
*
|
|
5104
|
-
*
|
|
5105
|
-
* missing or unparseable).
|
|
5106
|
-
* 2. Increments the counter.
|
|
5107
|
-
* 3. Writes the new counter back atomically (temp file + `mv`).
|
|
5108
|
-
* 4. Echoes the post-increment counter and the classified run type
|
|
5109
|
-
* (`dispatch` or `housekeeping`) in the canonical
|
|
5110
|
-
* `run=<n> type=<dispatch|housekeeping>` format.
|
|
4917
|
+
* The script takes two positional arguments:
|
|
5111
4918
|
*
|
|
5112
|
-
*
|
|
5113
|
-
*
|
|
5114
|
-
*
|
|
4919
|
+
* 1. `<index-path>` — repo-relative path to the shared index file.
|
|
4920
|
+
* 2. `<row-unique-marker>` — substring unique to the new row.
|
|
4921
|
+
*
|
|
4922
|
+
* It exits non-zero on any of the following:
|
|
4923
|
+
*
|
|
4924
|
+
* - Wrong argument count.
|
|
4925
|
+
* - Index file is not present in `HEAD` (i.e. not staged).
|
|
4926
|
+
* - The unique-marker substring appears zero times (row missing)
|
|
4927
|
+
* or more than once (duplicate row from a mis-merged conflict).
|
|
5115
4928
|
*/
|
|
5116
|
-
declare function
|
|
4929
|
+
declare function renderSharedEditingHelperScript(_se: ResolvedSharedEditing): string;
|
|
5117
4930
|
|
|
5118
4931
|
/**
|
|
5119
|
-
*
|
|
5120
|
-
*
|
|
5121
|
-
*
|
|
5122
|
-
*
|
|
5123
|
-
* invocation time; splitting workers by type still gives independent
|
|
5124
|
-
* cadence and clean opt-in/opt-out control.
|
|
4932
|
+
* Default master switch for the skill-eval harness convention. When no
|
|
4933
|
+
* config is supplied, the convention ships **enabled** so every skill
|
|
4934
|
+
* that ships an `evals/evals.json` file has a documented schema,
|
|
4935
|
+
* runner entry-point, and product-context injection contract.
|
|
5125
4936
|
*
|
|
5126
|
-
* @see
|
|
5127
|
-
*/
|
|
5128
|
-
declare const SCHEDULED_TASK_MODEL_VALUES: readonly ["opus", "sonnet", "haiku"];
|
|
5129
|
-
type ScheduledTaskModel = (typeof SCHEDULED_TASK_MODEL_VALUES)[number];
|
|
5130
|
-
/**
|
|
5131
|
-
* Valid `kind` values for a scheduled-task entry. See
|
|
5132
|
-
* `ScheduledTaskEntry.kind` for semantics.
|
|
4937
|
+
* @see SkillEvalsConfig
|
|
5133
4938
|
*/
|
|
5134
|
-
declare const
|
|
5135
|
-
type ScheduledTaskKind = (typeof SCHEDULED_TASK_KIND_VALUES)[number];
|
|
4939
|
+
declare const DEFAULT_SKILL_EVALS_ENABLED = true;
|
|
5136
4940
|
/**
|
|
5137
|
-
* Default root directory (relative to the repo root)
|
|
5138
|
-
*
|
|
5139
|
-
*
|
|
4941
|
+
* Default root directory (relative to the repo root) that holds every
|
|
4942
|
+
* skill's SKILL.md. The harness contract says that any skill SKILL.md
|
|
4943
|
+
* under this root may ship an `evals/evals.json` file alongside it —
|
|
4944
|
+
* the runner discovers eval suites by walking
|
|
4945
|
+
* `<skillsRoot>/<skill-name>/evals/evals.json`.
|
|
5140
4946
|
*
|
|
5141
|
-
*
|
|
4947
|
+
* Defaults to `.claude/skills`, which matches the location every
|
|
4948
|
+
* configulator-managed project ships skills to on disk.
|
|
4949
|
+
*
|
|
4950
|
+
* @see SkillEvalsConfig
|
|
5142
4951
|
*/
|
|
5143
|
-
declare const
|
|
4952
|
+
declare const DEFAULT_SKILL_EVALS_SKILLS_ROOT = ".claude/skills";
|
|
5144
4953
|
/**
|
|
5145
|
-
*
|
|
5146
|
-
*
|
|
5147
|
-
*
|
|
5148
|
-
*
|
|
4954
|
+
* Default path to the product-context fixture consumed by every eval
|
|
4955
|
+
* suite. Configulator ships with a `docs/src/content/docs/project-context.md`
|
|
4956
|
+
* file that every agent already loads at session start; the eval harness
|
|
4957
|
+
* re-uses that file so eval prompts are parameterised by the consuming
|
|
4958
|
+
* project's domain vocabulary, in-scope capabilities, and stakeholders
|
|
4959
|
+
* without the evals needing per-project forks.
|
|
5149
4960
|
*
|
|
5150
|
-
* @see
|
|
4961
|
+
* @see SkillEvalsConfig
|
|
5151
4962
|
*/
|
|
5152
|
-
declare const
|
|
4963
|
+
declare const DEFAULT_PRODUCT_CONTEXT_PATH = "docs/src/content/docs/project-context.md";
|
|
5153
4964
|
/**
|
|
5154
|
-
*
|
|
5155
|
-
*
|
|
5156
|
-
*
|
|
5157
|
-
*
|
|
4965
|
+
* Default policy for whether the harness should **require** a
|
|
4966
|
+
* product-context file to be present before running the suite.
|
|
4967
|
+
*
|
|
4968
|
+
* `true` (default) — the runner fails fast when the file is missing,
|
|
4969
|
+
* because an eval that silently runs without its product-context
|
|
4970
|
+
* fixture is a false-positive waiting to happen.
|
|
4971
|
+
*
|
|
4972
|
+
* `false` — the runner emits a warning to stderr but still runs the
|
|
4973
|
+
* suite. Useful for bootstrapping a new consuming repo that has not
|
|
4974
|
+
* yet authored its `project-context.md`.
|
|
4975
|
+
*
|
|
4976
|
+
* @see SkillEvalsConfig
|
|
5158
4977
|
*/
|
|
5159
|
-
|
|
5160
|
-
/**
|
|
5161
|
-
* Unique task directory name. Emitted under
|
|
5162
|
-
* `<root>/<taskId>/SKILL.md`. Derived from the sub-agent name by
|
|
5163
|
-
* default (e.g. `company-profile-analyst` → `worker-company-profile`).
|
|
5164
|
-
*/
|
|
5165
|
-
readonly taskId: string;
|
|
5166
|
-
/**
|
|
5167
|
-
* Target sub-agent name (e.g. `company-profile-analyst`). The task's
|
|
5168
|
-
* rendered prompt points operators at `.claude/agents/<agent>.md`.
|
|
5169
|
-
*/
|
|
5170
|
-
readonly agent: string;
|
|
5171
|
-
/**
|
|
5172
|
-
* Human-readable agent label for rendered tables and frontmatter
|
|
5173
|
-
* descriptions (e.g. `"Company Profile"`).
|
|
5174
|
-
*/
|
|
5175
|
-
readonly agentLabel: string;
|
|
5176
|
-
/**
|
|
5177
|
-
* Primary GitHub `type:*` label (without the `type:` prefix). When
|
|
5178
|
-
* `typeLabels` is unset, this is the sole type filter; when
|
|
5179
|
-
* `typeLabels` is set, it is the first element.
|
|
5180
|
-
*/
|
|
5181
|
-
readonly typeLabel: string;
|
|
5182
|
-
/**
|
|
5183
|
-
* Exact `type:*` label values (without the `type:` prefix) the
|
|
5184
|
-
* worker picks up. When set (`length >= 1`), represents a
|
|
5185
|
-
* multi-type filter (e.g. routing-bucket `worker-issue`). When
|
|
5186
|
-
* unset, the `typeLabel` single-value filter applies.
|
|
5187
|
-
*/
|
|
5188
|
-
readonly typeLabels?: ReadonlyArray<string>;
|
|
5189
|
-
/**
|
|
5190
|
-
* Optional phase-label prefix (e.g. `company:`). When present and
|
|
5191
|
-
* `phaseLabels` is unset, the task's SKILL.md instructs the worker
|
|
5192
|
-
* to filter on both `type:<typeLabel>` **and** any `<phasePrefix>*`
|
|
5193
|
-
* label. Ignored when `phaseLabels` is set.
|
|
5194
|
-
*/
|
|
5195
|
-
readonly phasePrefix?: string;
|
|
5196
|
-
/**
|
|
5197
|
-
* Exact phase-label values the worker filters on (e.g.
|
|
5198
|
-
* `["req:write"]`). When set (`length >= 1`), takes precedence over
|
|
5199
|
-
* `phasePrefix`. When unset, the `phasePrefix` prefix-match
|
|
5200
|
-
* applies.
|
|
5201
|
-
*/
|
|
5202
|
-
readonly phaseLabels?: ReadonlyArray<string>;
|
|
5203
|
-
/**
|
|
5204
|
-
* Recommended model tier. Surfaced on the task's SKILL.md
|
|
5205
|
-
* frontmatter and in the rendered documentation table.
|
|
5206
|
-
*/
|
|
5207
|
-
readonly recommendedModel: ScheduledTaskModel;
|
|
5208
|
-
/** Whether the task is emitted to disk. Default: `false`. */
|
|
5209
|
-
readonly enabled: boolean;
|
|
5210
|
-
/**
|
|
5211
|
-
* Optional cron expression. When `null` the task is manual-only
|
|
5212
|
-
* (runs only when an operator invokes it explicitly).
|
|
5213
|
-
*/
|
|
5214
|
-
readonly cron: string | null;
|
|
5215
|
-
/**
|
|
5216
|
-
* Short one-line description for the rendered table and SKILL.md
|
|
5217
|
-
* frontmatter.
|
|
5218
|
-
*/
|
|
5219
|
-
readonly description: string;
|
|
5220
|
-
/**
|
|
5221
|
-
* Discriminator controlling how the SKILL.md body and the registered-
|
|
5222
|
-
* tasks table cell are rendered. `"issue-worker"` (default) emits the
|
|
5223
|
-
* standard delegate-to-issue-worker prompt; `"pipeline"` emits a
|
|
5224
|
-
* pipeline-manager prompt that points the operator at the target
|
|
5225
|
-
* sub-agent's full workflow and renders `_(none — pipeline manager)_`
|
|
5226
|
-
* for the type-label cell.
|
|
5227
|
-
*/
|
|
5228
|
-
readonly kind: ScheduledTaskKind;
|
|
5229
|
-
}
|
|
4978
|
+
declare const DEFAULT_REQUIRE_PRODUCT_CONTEXT = true;
|
|
5230
4979
|
/**
|
|
5231
|
-
*
|
|
5232
|
-
*
|
|
5233
|
-
*
|
|
5234
|
-
*
|
|
4980
|
+
* Default for whether the convention emits the
|
|
4981
|
+
* `.claude/procedures/run-skill-evals.sh` helper to disk. The helper
|
|
4982
|
+
* is opt-in because many consumers run evals from CI or ad-hoc from
|
|
4983
|
+
* their own scripts rather than through the bundled harness; consumers
|
|
4984
|
+
* who want a ready-to-invoke runner flip this to `true`.
|
|
5235
4985
|
*
|
|
5236
|
-
*
|
|
5237
|
-
* dispatch ordering, scheduled-task filter, and orchestrator queue
|
|
5238
|
-
* scan all agree on the type-label taxonomy.
|
|
4986
|
+
* @see SkillEvalsConfig
|
|
5239
4987
|
*/
|
|
5240
|
-
declare const
|
|
4988
|
+
declare const DEFAULT_SKILL_EVALS_EMIT_RUNNER = false;
|
|
5241
4989
|
/**
|
|
5242
|
-
* Fully-resolved
|
|
4990
|
+
* Fully-resolved skill-evals settings. Every field is defaulted so
|
|
5243
4991
|
* downstream renderers can reason about a single canonical shape.
|
|
5244
4992
|
*/
|
|
5245
|
-
interface
|
|
4993
|
+
interface ResolvedSkillEvals {
|
|
5246
4994
|
readonly enabled: boolean;
|
|
5247
|
-
readonly
|
|
5248
|
-
readonly
|
|
4995
|
+
readonly skillsRoot: string;
|
|
4996
|
+
readonly productContextPath: string;
|
|
4997
|
+
readonly requireProductContext: boolean;
|
|
4998
|
+
readonly emitRunner: boolean;
|
|
5249
4999
|
}
|
|
5250
5000
|
/**
|
|
5251
|
-
* Resolve a (possibly absent) `
|
|
5252
|
-
* `
|
|
5001
|
+
* Resolve a (possibly absent) `SkillEvalsConfig` into a canonical
|
|
5002
|
+
* `ResolvedSkillEvals` with every field filled in. Unset fields
|
|
5253
5003
|
* cascade from their documented defaults.
|
|
5254
5004
|
*
|
|
5255
|
-
*
|
|
5005
|
+
* Malformed configs — empty / whitespace-only or absolute `skillsRoot`,
|
|
5006
|
+
* empty / whitespace-only or absolute `productContextPath` — throw a
|
|
5007
|
+
* descriptive `Error`.
|
|
5008
|
+
*/
|
|
5009
|
+
declare function resolveSkillEvals(config?: SkillEvalsConfig): ResolvedSkillEvals;
|
|
5010
|
+
/**
|
|
5011
|
+
* Synth-time validation hook. Throws a descriptive `Error` when the
|
|
5012
|
+
* supplied `SkillEvalsConfig` is malformed. Called by
|
|
5013
|
+
* `AgentConfig.preSynthesize` before any rendering so a misconfigured
|
|
5014
|
+
* convention fails the build instead of silently shipping a broken
|
|
5015
|
+
* eval harness. Returns the resolved config unchanged so callers can
|
|
5016
|
+
* write `const se = validateSkillEvalsConfig(config)` in one line.
|
|
5017
|
+
*
|
|
5018
|
+
* Malformed cases rejected here:
|
|
5019
|
+
*
|
|
5020
|
+
* - `skillsRoot` empty, whitespace-only, or absolute.
|
|
5021
|
+
* - `productContextPath` empty, whitespace-only, or absolute.
|
|
5022
|
+
*/
|
|
5023
|
+
declare function validateSkillEvalsConfig(config?: SkillEvalsConfig): ResolvedSkillEvals;
|
|
5024
|
+
/**
|
|
5025
|
+
* Render the full body for the `skill-evals` rule shipped by the
|
|
5026
|
+
* `base` bundle. The rule documents:
|
|
5027
|
+
*
|
|
5028
|
+
* - The on-disk contract (where `evals/evals.json` lives).
|
|
5029
|
+
* - The JSON schema every eval file follows.
|
|
5030
|
+
* - The product-context injection protocol (how evals reference and
|
|
5031
|
+
* interpolate the repo's `project-context.md` without forking).
|
|
5032
|
+
* - The runner entry-point (`run-skill-evals.sh` when opted in, or
|
|
5033
|
+
* the inline `jq`-driven recipe when not).
|
|
5034
|
+
*
|
|
5035
|
+
* When the convention is disabled, the rule renders a short stub that
|
|
5036
|
+
* tells agents the project does not ship skill evals and that skill
|
|
5037
|
+
* changes ride on review alone.
|
|
5038
|
+
*/
|
|
5039
|
+
declare function renderSkillEvalsRuleContent(se: ResolvedSkillEvals): string;
|
|
5040
|
+
/**
|
|
5041
|
+
* Render the short skill-evals hook section injected into a skill's
|
|
5042
|
+
* owning bundle rule (requirements-writer, bcm-writer, etc.). The
|
|
5043
|
+
* section cites the full contract documented in the base bundle's
|
|
5044
|
+
* `skill-evals` rule so individual bundles stay DRY.
|
|
5045
|
+
*
|
|
5046
|
+
* When the convention is disabled, the function returns an empty
|
|
5047
|
+
* string so callers can no-op their append path.
|
|
5048
|
+
*/
|
|
5049
|
+
declare function renderSkillEvalsBundleHook(se: ResolvedSkillEvals, skillLabel: string): string;
|
|
5050
|
+
/**
|
|
5051
|
+
* Render the `.claude/procedures/run-skill-evals.sh` helper script.
|
|
5052
|
+
* Exported so `AgentConfig` can register it as an `AgentProcedure`
|
|
5053
|
+
* when the consumer opts in via `emitRunner: true`.
|
|
5054
|
+
*
|
|
5055
|
+
* The script takes zero or one positional arguments:
|
|
5056
|
+
*
|
|
5057
|
+
* 1. `[<skill-name>]` — optional, restricts the run to one skill.
|
|
5058
|
+
*
|
|
5059
|
+
* It exits non-zero on any of the following:
|
|
5060
|
+
*
|
|
5061
|
+
* - `jq` is not available on `PATH`.
|
|
5062
|
+
* - A discovered `evals.json` is malformed or missing required fields.
|
|
5063
|
+
* - `skill_name` inside the file does not match the parent directory.
|
|
5064
|
+
* - The product-context fixture is missing and `requireProductContext`
|
|
5065
|
+
* is `true` in the resolved config.
|
|
5066
|
+
*/
|
|
5067
|
+
declare function renderSkillEvalsRunnerScript(se: ResolvedSkillEvals): string;
|
|
5068
|
+
|
|
5069
|
+
/**
|
|
5070
|
+
* Default master switch for the temporal-framing convention. When no
|
|
5071
|
+
* config is supplied the convention ships **enabled** so every
|
|
5072
|
+
* configulator-consuming repo's analyst agents apply the
|
|
5073
|
+
* "as of [date]" qualifier rule.
|
|
5074
|
+
*
|
|
5075
|
+
* @see TemporalFramingConfig
|
|
5076
|
+
*/
|
|
5077
|
+
declare const DEFAULT_TEMPORAL_FRAMING_ENABLED = true;
|
|
5078
|
+
/**
|
|
5079
|
+
* Default path globs the rule applies to — every Markdown file under
|
|
5080
|
+
* the profile / research subtrees of a repo's Starlight docs site.
|
|
5081
|
+
* Consumers may override the list when their content layout differs.
|
|
5082
|
+
*
|
|
5083
|
+
* Out-of-scope locations (meeting notes, requirements, the
|
|
5084
|
+
* project-context page) are excluded by design: their own dating
|
|
5085
|
+
* conventions (file-name date prefix, version frontmatter, living
|
|
5086
|
+
* snapshot under direct human review) already anchor the temporal
|
|
5087
|
+
* meaning of their content.
|
|
5088
|
+
*
|
|
5089
|
+
* @see TemporalFramingConfig
|
|
5090
|
+
*/
|
|
5091
|
+
declare const DEFAULT_TEMPORAL_FRAMING_PATHS: ReadonlyArray<string>;
|
|
5092
|
+
/**
|
|
5093
|
+
* The five canonical time-sensitive claim categories surfaced by the
|
|
5094
|
+
* May 2026 sampled drift audit. The category names are shipped as the
|
|
5095
|
+
* key set for `TemporalFramingConfig.cadences` so consumers can dial
|
|
5096
|
+
* the per-category refresh cadence without inventing their own
|
|
5097
|
+
* category names.
|
|
5098
|
+
*/
|
|
5099
|
+
declare const TEMPORAL_FRAMING_CATEGORY_VALUES: readonly ["ownership", "company-leadership", "regulatory-status", "litigation", "dated-metrics"];
|
|
5100
|
+
type TemporalFramingCategory = (typeof TEMPORAL_FRAMING_CATEGORY_VALUES)[number];
|
|
5101
|
+
/**
|
|
5102
|
+
* Default per-category refresh cadences (in days). Fast-decay claims
|
|
5103
|
+
* (regulatory status, litigation) carry a 30-day cadence because a
|
|
5104
|
+
* single press release can invalidate them between scheduled refresh
|
|
5105
|
+
* passes. Slow-decay claims (ownership, dated metrics from press
|
|
5106
|
+
* releases or filings) carry a 180-day cadence — material changes
|
|
5107
|
+
* still happen but rarely outpace a half-yearly refresh. Leadership
|
|
5108
|
+
* tenure sits in the middle at 90 days.
|
|
5109
|
+
*
|
|
5110
|
+
* Consumers may override any subset of categories via
|
|
5111
|
+
* `TemporalFramingConfig.cadences`; unspecified entries fall through
|
|
5112
|
+
* to these defaults.
|
|
5113
|
+
*/
|
|
5114
|
+
declare const DEFAULT_TEMPORAL_FRAMING_CADENCES: {
|
|
5115
|
+
readonly [K in TemporalFramingCategory]: number;
|
|
5116
|
+
};
|
|
5117
|
+
/**
|
|
5118
|
+
* Default for whether the convention emits the
|
|
5119
|
+
* `.claude/procedures/check-temporal-framing.sh` lint script to disk.
|
|
5120
|
+
* Disabled by default — consumers opt in when they want a hard
|
|
5121
|
+
* pre-commit or CI gate. The rule body itself ships unconditionally
|
|
5122
|
+
* regardless of the lint script.
|
|
5123
|
+
*
|
|
5124
|
+
* @see TemporalFramingConfig
|
|
5125
|
+
*/
|
|
5126
|
+
declare const DEFAULT_TEMPORAL_FRAMING_EMIT_CHECKER = false;
|
|
5127
|
+
/**
|
|
5128
|
+
* Fully-resolved temporal-framing settings. Every field is defaulted
|
|
5129
|
+
* so downstream renderers can reason about a single canonical shape.
|
|
5130
|
+
*/
|
|
5131
|
+
interface ResolvedTemporalFraming {
|
|
5132
|
+
readonly enabled: boolean;
|
|
5133
|
+
readonly paths: ReadonlyArray<string>;
|
|
5134
|
+
readonly cadences: {
|
|
5135
|
+
readonly [K in TemporalFramingCategory]: number;
|
|
5136
|
+
};
|
|
5137
|
+
readonly emitChecker: boolean;
|
|
5138
|
+
}
|
|
5139
|
+
/**
|
|
5140
|
+
* Resolve a (possibly absent) `TemporalFramingConfig` into a canonical
|
|
5141
|
+
* `ResolvedTemporalFraming` with every field filled in. Unset fields
|
|
5142
|
+
* cascade from their documented defaults.
|
|
5143
|
+
*
|
|
5144
|
+
* Malformed configs throw a descriptive `Error`:
|
|
5145
|
+
*
|
|
5146
|
+
* - `paths` containing empty / whitespace-only entries.
|
|
5147
|
+
* - `cadences` containing non-integer or non-positive values.
|
|
5148
|
+
*/
|
|
5149
|
+
declare function resolveTemporalFraming(config?: TemporalFramingConfig): ResolvedTemporalFraming;
|
|
5150
|
+
/**
|
|
5151
|
+
* Synth-time validation hook. Throws a descriptive `Error` when the
|
|
5152
|
+
* supplied `TemporalFramingConfig` is malformed. Called by
|
|
5153
|
+
* `AgentConfig.preSynthesize` before any rendering so a misconfigured
|
|
5154
|
+
* convention fails the build instead of silently shipping broken
|
|
5155
|
+
* paths or cadences. Returns the resolved config unchanged so callers
|
|
5156
|
+
* can write `const tf = validateTemporalFramingConfig(config)` in
|
|
5157
|
+
* one line.
|
|
5158
|
+
*
|
|
5159
|
+
* Malformed cases rejected here:
|
|
5160
|
+
*
|
|
5161
|
+
* - `paths` containing empty or whitespace-only entries.
|
|
5162
|
+
* - `cadences` containing non-integer or non-positive values.
|
|
5163
|
+
*/
|
|
5164
|
+
declare function validateTemporalFramingConfig(config?: TemporalFramingConfig): ResolvedTemporalFraming;
|
|
5165
|
+
/**
|
|
5166
|
+
* Render the body for the `temporal-framing-convention` rule shipped
|
|
5167
|
+
* by the `base` bundle. The rule documents:
|
|
5168
|
+
*
|
|
5169
|
+
* - The "as of [date]" qualifier requirement on time-sensitive claims.
|
|
5170
|
+
* - The five canonical time-sensitive claim categories.
|
|
5171
|
+
* - Refresh-agent behaviour (grep for `as of `, re-verify against the
|
|
5172
|
+
* category-specific cadence).
|
|
5173
|
+
* - The scope of applicability (profile / research sections only).
|
|
5174
|
+
*
|
|
5175
|
+
* When the convention is disabled, the rule renders a short stub that
|
|
5176
|
+
* tells agents the project does not enforce explicit temporal
|
|
5177
|
+
* qualifiers and that staleness is caught by review alone.
|
|
5178
|
+
*/
|
|
5179
|
+
declare function renderTemporalFramingRuleContent(tf: ResolvedTemporalFraming): string;
|
|
5180
|
+
/**
|
|
5181
|
+
* Render the `.claude/procedures/check-temporal-framing.sh` helper
|
|
5182
|
+
* script. Exported so `AgentConfig` can register it when the consumer
|
|
5183
|
+
* opts in via `emitChecker: true`.
|
|
5184
|
+
*
|
|
5185
|
+
* The script accepts the list of changed files as either:
|
|
5186
|
+
*
|
|
5187
|
+
* 1. Positional arguments (one file per arg).
|
|
5188
|
+
* 2. Newline-separated entries on stdin (when no args supplied) —
|
|
5189
|
+
* pipe `git diff --name-only` directly into it.
|
|
5190
|
+
*
|
|
5191
|
+
* It fails non-zero when any changed file matches a configured path
|
|
5192
|
+
* pattern and contains time-sensitive framing (present-tense forms of
|
|
5193
|
+
* the canonical category triggers) but lacks an `as of ` qualifier
|
|
5194
|
+
* anywhere in the file. The lint is intentionally coarse — file-level
|
|
5195
|
+
* not line-level — so the cost of running it on every PR stays low.
|
|
5196
|
+
*/
|
|
5197
|
+
declare function renderTemporalFramingCheckerScript(tf: ResolvedTemporalFraming): string;
|
|
5198
|
+
|
|
5199
|
+
/**
|
|
5200
|
+
* Fully-resolved settings for the five config-driven convention rules
|
|
5201
|
+
* the base bundle owns. Every field is already resolved, so
|
|
5202
|
+
* `buildBaseBundle` can seed each rule's final content up front rather
|
|
5203
|
+
* than shipping default content that a later pass has to rewrite.
|
|
5204
|
+
*
|
|
5205
|
+
* Seeding before the rule map exists is what lets `ruleExtensions`
|
|
5206
|
+
* appends and consumer-supplied same-name `rules` entries compose with
|
|
5207
|
+
* a consumer's convention overrides instead of being clobbered by
|
|
5208
|
+
* them. This mirrors the `pr-review-policy` rule, which has always
|
|
5209
|
+
* resolved its policy inside `buildPrReviewBundle`.
|
|
5210
|
+
*/
|
|
5211
|
+
interface ResolvedBaseConventions {
|
|
5212
|
+
readonly progressFiles: ResolvedProgressFiles;
|
|
5213
|
+
readonly sharedEditing: ResolvedSharedEditing;
|
|
5214
|
+
readonly temporalFraming: ResolvedTemporalFraming;
|
|
5215
|
+
readonly skillEvals: ResolvedSkillEvals;
|
|
5216
|
+
readonly issueTemplates: ResolvedIssueTemplates;
|
|
5217
|
+
/**
|
|
5218
|
+
* Whether any bundle contributing a downstream issue kind survived
|
|
5219
|
+
* `excludeBundles`. When false the issue-templates rule renders its
|
|
5220
|
+
* disabled stub — the convention has nothing left to enforce.
|
|
5221
|
+
*/
|
|
5222
|
+
readonly hasDownstreamIssueKindBundles: boolean;
|
|
5223
|
+
}
|
|
5224
|
+
/**
|
|
5225
|
+
* The convention settings the base bundle ships when the consumer
|
|
5226
|
+
* supplies no override. Exported so callers can spread a partial
|
|
5227
|
+
* override over the documented defaults.
|
|
5228
|
+
*/
|
|
5229
|
+
declare const DEFAULT_BASE_CONVENTIONS: ResolvedBaseConventions;
|
|
5230
|
+
/**
|
|
5231
|
+
* Base bundle — always included unless `includeBaseRules: false`.
|
|
5232
|
+
* Contains project-overview, interaction-style, and general-conventions rules.
|
|
5233
|
+
*/
|
|
5234
|
+
declare function buildBaseBundle(paths?: ResolvedAgentPaths, conventions?: ResolvedBaseConventions): AgentRuleBundle;
|
|
5235
|
+
/**
|
|
5236
|
+
* Default-paths instance of the base bundle, preserved for backward
|
|
5237
|
+
* compatibility with consumers that import the const directly. The
|
|
5238
|
+
* factory above is the canonical entry point when a consumer supplies
|
|
5239
|
+
* `AgentConfigOptions.paths`.
|
|
5240
|
+
*/
|
|
5241
|
+
declare const baseBundle: AgentRuleBundle;
|
|
5242
|
+
|
|
5243
|
+
/**
|
|
5244
|
+
* Fully-resolved build policy for the consuming project.
|
|
5245
|
+
*
|
|
5246
|
+
* The generated agent guidance around `pnpm build:all` used to assert
|
|
5247
|
+
* unconditionally that the command "requires the user to be
|
|
5248
|
+
* authenticated to AWS on the prod account used for Turborepo remote
|
|
5249
|
+
* caching (`readonlyaccess-prod-525259625215-us-east-1` profile)".
|
|
5250
|
+
* Both halves of that sentence were wrong for most consumers:
|
|
5251
|
+
*
|
|
5252
|
+
* 1. The AWS-auth requirement only exists when a Turborepo **remote
|
|
5253
|
+
* cache** is configured. Consumers running a local cache only
|
|
5254
|
+
* (`turbo.json` with just a `cacheDir`) need no credentials at
|
|
5255
|
+
* all, and agents that believed otherwise aborted mid-flow —
|
|
5256
|
+
* three lost-work incidents in `codedrifters/openhi-planning`.
|
|
5257
|
+
* 2. The profile name was this repository's own profile, baked
|
|
5258
|
+
* verbatim into every consumer's generated text.
|
|
5259
|
+
*
|
|
5260
|
+
* This struct carries the two facts the rule renderers need, derived
|
|
5261
|
+
* from the project's actual {@link TurboRepo} configuration, so the
|
|
5262
|
+
* guidance is true for whichever consumer it renders into.
|
|
5263
|
+
*
|
|
5264
|
+
* @see resolveBuildPolicy
|
|
5265
|
+
*/
|
|
5266
|
+
interface ResolvedBuildPolicy {
|
|
5267
|
+
/**
|
|
5268
|
+
* Whether a Turborepo **remote** cache is configured on the project.
|
|
5269
|
+
*
|
|
5270
|
+
* `false` means either there is no {@link TurboRepo} component at
|
|
5271
|
+
* all, or it was constructed without `remoteCacheOptions` — in both
|
|
5272
|
+
* cases `pnpm build:all` needs no AWS credentials and the generated
|
|
5273
|
+
* guidance must not claim otherwise.
|
|
5274
|
+
*/
|
|
5275
|
+
readonly remoteCacheEnabled: boolean;
|
|
5276
|
+
/**
|
|
5277
|
+
* Local AWS profile name used to fetch the remote-cache endpoint and
|
|
5278
|
+
* token, taken from `remoteCacheOptions.profileName`.
|
|
5279
|
+
*
|
|
5280
|
+
* `undefined` whenever {@link remoteCacheEnabled} is `false`. Never
|
|
5281
|
+
* hard-code a profile name in rule content — read it from here so
|
|
5282
|
+
* each consumer's generated text names its own profile.
|
|
5283
|
+
*/
|
|
5284
|
+
readonly awsProfileName?: string;
|
|
5285
|
+
}
|
|
5286
|
+
/**
|
|
5287
|
+
* Build policy for a project with no Turborepo remote cache — the
|
|
5288
|
+
* zero-config default. Rule renderers that receive this omit the
|
|
5289
|
+
* AWS-authentication guidance entirely rather than asserting a
|
|
5290
|
+
* credential requirement that does not exist.
|
|
5291
|
+
*/
|
|
5292
|
+
declare const DEFAULT_BUILD_POLICY: ResolvedBuildPolicy;
|
|
5293
|
+
/**
|
|
5294
|
+
* Derives the {@link ResolvedBuildPolicy} for a project by inspecting
|
|
5295
|
+
* its {@link TurboRepo} component.
|
|
5296
|
+
*
|
|
5297
|
+
* Auto-detection, not opt-in: `remoteCacheOptions` being `undefined`
|
|
5298
|
+
* *is* the "remote cache disabled" signal — `TurboRepo.renderRunArgs`
|
|
5299
|
+
* already branches on exactly the same condition when it decides
|
|
5300
|
+
* whether to emit `--api` / `--token` / `--team` flags. Consumers get
|
|
5301
|
+
* accurate guidance with no extra configuration.
|
|
5302
|
+
*
|
|
5303
|
+
* Call this lazily (at synthesis time), not from a constructor: the
|
|
5304
|
+
* `TurboRepo` component must already be attached to the project for
|
|
5305
|
+
* detection to succeed.
|
|
5306
|
+
*/
|
|
5307
|
+
declare function resolveBuildPolicy(project: Project$1): ResolvedBuildPolicy;
|
|
5308
|
+
|
|
5309
|
+
/**
|
|
5310
|
+
* Default dispatch-to-housekeeping ratio — openhi's `DISPATCHER.md`
|
|
5311
|
+
* ships a 4:1 ratio: four consecutive dispatch runs, then one
|
|
5312
|
+
* housekeeping run, then the counter wraps. The ratio value stored
|
|
5313
|
+
* here is the dispatch-run count per housekeeping run; with
|
|
5314
|
+
* `ratio = 4`, runs 1–4 dispatch and run 5 housekeeps. The cycle
|
|
5315
|
+
* length is therefore `ratio + 1`.
|
|
5316
|
+
*
|
|
5317
|
+
* @see RunRatioConfig
|
|
5318
|
+
*/
|
|
5319
|
+
declare const DEFAULT_DISPATCH_TO_HOUSEKEEPING_RATIO = 4;
|
|
5320
|
+
/**
|
|
5321
|
+
* Default on-disk path for the orchestrator run-counter state file,
|
|
5322
|
+
* relative to the repo root. The file is tiny JSON
|
|
5323
|
+
* (`{ "run_counter": <n> }`) and is gitignored in most consumer repos
|
|
5324
|
+
* because it's local-only — each operator's orchestrator session
|
|
5325
|
+
* maintains its own counter.
|
|
5326
|
+
*
|
|
5327
|
+
* @see RunRatioConfig
|
|
5328
|
+
*/
|
|
5329
|
+
declare const DEFAULT_STATE_FILE_PATH = ".state/orchestrator-runs.json";
|
|
5330
|
+
/**
|
|
5331
|
+
* Default recommended model label for dispatch runs. Rendered into
|
|
5332
|
+
* the orchestrator-conventions rule so agents and humans can read the
|
|
5333
|
+
* model pairing at a glance; the string is purely informational and
|
|
5334
|
+
* does not cause configulator to set `AGENT_MODEL` on the sub-agent.
|
|
5335
|
+
*
|
|
5336
|
+
* @see RunRatioConfig
|
|
5337
|
+
*/
|
|
5338
|
+
declare const DEFAULT_DISPATCH_MODEL = "opus";
|
|
5339
|
+
/**
|
|
5340
|
+
* Default recommended model label for housekeeping runs. See
|
|
5341
|
+
* `DEFAULT_DISPATCH_MODEL` for the rendering contract. Housekeeping
|
|
5342
|
+
* runs are mechanical (batch PR review + maintenance scan), so a
|
|
5343
|
+
* cheaper model like Sonnet is the documented recommendation.
|
|
5344
|
+
*
|
|
5345
|
+
* @see RunRatioConfig
|
|
5346
|
+
*/
|
|
5347
|
+
declare const DEFAULT_HOUSEKEEPING_MODEL = "sonnet";
|
|
5348
|
+
/**
|
|
5349
|
+
* Fully-resolved run-ratio settings. Every field is defaulted so
|
|
5350
|
+
* downstream renderers can reason about a single canonical shape.
|
|
5351
|
+
*/
|
|
5352
|
+
interface ResolvedRunRatio {
|
|
5353
|
+
readonly enabled: boolean;
|
|
5354
|
+
readonly ratio: number;
|
|
5355
|
+
readonly stateFilePath: string;
|
|
5356
|
+
readonly dispatchModel: string;
|
|
5357
|
+
readonly housekeepingModel: string;
|
|
5358
|
+
}
|
|
5359
|
+
/**
|
|
5360
|
+
* Resolve a (possibly absent) `RunRatioConfig` into a canonical
|
|
5361
|
+
* `ResolvedRunRatio` with every field filled in. Unset fields
|
|
5362
|
+
* cascade from their documented defaults.
|
|
5363
|
+
*
|
|
5364
|
+
* Malformed configs (non-integer or non-positive ratio, empty or
|
|
5365
|
+
* whitespace-only state file path) throw a descriptive `Error` —
|
|
5366
|
+
* callers should not need to guard against it at runtime.
|
|
5367
|
+
*/
|
|
5368
|
+
declare function resolveRunRatio(config?: RunRatioConfig): ResolvedRunRatio;
|
|
5369
|
+
/**
|
|
5370
|
+
* Synth-time validation hook. Throws a descriptive `Error` when the
|
|
5371
|
+
* supplied `RunRatioConfig` is malformed. Called by
|
|
5372
|
+
* `AgentConfig.preSynthesize` before any rendering so a misconfigured
|
|
5373
|
+
* ratio fails the build instead of silently shipping broken
|
|
5374
|
+
* housekeeping cadence. Returns the resolved ratio unchanged so
|
|
5375
|
+
* callers can write `const rr = validateRunRatioConfig(config)` in
|
|
5376
|
+
* one line.
|
|
5377
|
+
*
|
|
5378
|
+
* Malformed cases rejected here:
|
|
5379
|
+
*
|
|
5380
|
+
* - `ratio` non-integer, zero, or negative.
|
|
5381
|
+
* - `stateFilePath` empty / whitespace-only, or an absolute path
|
|
5382
|
+
* (the state file must live inside the repo).
|
|
5383
|
+
*/
|
|
5384
|
+
declare function validateRunRatioConfig(config?: RunRatioConfig): ResolvedRunRatio;
|
|
5385
|
+
/**
|
|
5386
|
+
* Compute the run type (`"dispatch"` or `"housekeeping"`) for a
|
|
5387
|
+
* given run counter value and resolved ratio. Used by the TypeScript
|
|
5388
|
+
* side (tests, downstream consumers that want to reason about the
|
|
5389
|
+
* cadence without shelling out). The shell helper produced by
|
|
5390
|
+
* `renderRunRatioShellHelpers` implements the same logic.
|
|
5391
|
+
*
|
|
5392
|
+
* Every `(ratio + 1)`th run is a housekeeping run; all others
|
|
5393
|
+
* dispatch. For `ratio = 4`, runs 1–4 dispatch and run 5
|
|
5394
|
+
* housekeeps; run 6 is again dispatch; run 10 housekeeps.
|
|
5395
|
+
*/
|
|
5396
|
+
declare function classifyRun(runCounter: number, ratio: ResolvedRunRatio): "dispatch" | "housekeeping";
|
|
5397
|
+
/**
|
|
5398
|
+
* Render the markdown subsection appended to the
|
|
5399
|
+
* `orchestrator-conventions` rule. Always returns a non-empty string
|
|
5400
|
+
* so the orchestrator rule documents the cadence even when the
|
|
5401
|
+
* consumer relies on the defaults.
|
|
5402
|
+
*/
|
|
5403
|
+
declare function renderRunRatioSection(ratio: ResolvedRunRatio): string;
|
|
5404
|
+
/**
|
|
5405
|
+
* Render a shell-script snippet embedded in `check-blocked.sh`. The
|
|
5406
|
+
* snippet declares a `run_counter_tick()` function that:
|
|
5407
|
+
*
|
|
5408
|
+
* 1. Reads the state file (creating it with `run_counter: 1` if
|
|
5409
|
+
* missing or unparseable).
|
|
5410
|
+
* 2. Increments the counter.
|
|
5411
|
+
* 3. Writes the new counter back atomically (temp file + `mv`).
|
|
5412
|
+
* 4. Echoes the post-increment counter and the classified run type
|
|
5413
|
+
* (`dispatch` or `housekeeping`) in the canonical
|
|
5414
|
+
* `run=<n> type=<dispatch|housekeeping>` format.
|
|
5415
|
+
*
|
|
5416
|
+
* Returns the body of a shell function block (including the
|
|
5417
|
+
* `run_counter_tick()` wrapper) so the surrounding script can splice
|
|
5418
|
+
* it inline at the exact indent level it wants.
|
|
5419
|
+
*/
|
|
5420
|
+
declare function renderRunRatioShellHelpers(ratio: ResolvedRunRatio): string;
|
|
5421
|
+
|
|
5422
|
+
/**
|
|
5423
|
+
* Recommended model labels surfaced on the scheduled-task SKILL.md
|
|
5424
|
+
* frontmatter. The labels are **informational** — configulator does not
|
|
5425
|
+
* pin a model per task (the Claude Code scheduled-task runtime does not
|
|
5426
|
+
* support per-task model pinning yet). Operators choose the model at
|
|
5427
|
+
* invocation time; splitting workers by type still gives independent
|
|
5428
|
+
* cadence and clean opt-in/opt-out control.
|
|
5429
|
+
*
|
|
5430
|
+
* @see ScheduledTasksConfig
|
|
5431
|
+
*/
|
|
5432
|
+
declare const SCHEDULED_TASK_MODEL_VALUES: readonly ["opus", "sonnet", "haiku"];
|
|
5433
|
+
type ScheduledTaskModel = (typeof SCHEDULED_TASK_MODEL_VALUES)[number];
|
|
5434
|
+
/**
|
|
5435
|
+
* Valid `kind` values for a scheduled-task entry. See
|
|
5436
|
+
* `ScheduledTaskEntry.kind` for semantics.
|
|
5437
|
+
*/
|
|
5438
|
+
declare const SCHEDULED_TASK_KIND_VALUES: readonly ["issue-worker", "pipeline"];
|
|
5439
|
+
type ScheduledTaskKind = (typeof SCHEDULED_TASK_KIND_VALUES)[number];
|
|
5440
|
+
/**
|
|
5441
|
+
* Default root directory (relative to the repo root) for scheduled-task
|
|
5442
|
+
* files. Mirrors the vortex layout — one directory per task at
|
|
5443
|
+
* `.claude/scheduled-tasks/<taskId>/SKILL.md`.
|
|
5444
|
+
*
|
|
5445
|
+
* @see ScheduledTasksConfig
|
|
5446
|
+
*/
|
|
5447
|
+
declare const DEFAULT_SCHEDULED_TASKS_ROOT = ".claude/scheduled-tasks";
|
|
5448
|
+
/**
|
|
5449
|
+
* Off-peak cron sample surfaced in the rendered documentation. Every
|
|
5450
|
+
* 20 minutes during off-peak hours (before 08:00 and after 14:00
|
|
5451
|
+
* local). Informational only — tasks ship disabled by default with
|
|
5452
|
+
* no cron, so the consumer must opt in and set a cron explicitly.
|
|
5453
|
+
*
|
|
5454
|
+
* @see ScheduledTasksConfig
|
|
5455
|
+
*/
|
|
5456
|
+
declare const DEFAULT_OFF_PEAK_CRON_EXAMPLE = "3,23,43 0-7,14-23 * * *";
|
|
5457
|
+
/**
|
|
5458
|
+
* A single fully-resolved scheduled-task entry. Returned by
|
|
5459
|
+
* `resolveScheduledTasks()`; the rendered documentation section and
|
|
5460
|
+
* the emitted `.claude/scheduled-tasks/<taskId>/SKILL.md` files are
|
|
5461
|
+
* derived from this list.
|
|
5462
|
+
*/
|
|
5463
|
+
interface ResolvedScheduledTask {
|
|
5464
|
+
/**
|
|
5465
|
+
* Unique task directory name. Emitted under
|
|
5466
|
+
* `<root>/<taskId>/SKILL.md`. Derived from the sub-agent name by
|
|
5467
|
+
* default (e.g. `company-profile-analyst` → `worker-company-profile`).
|
|
5468
|
+
*/
|
|
5469
|
+
readonly taskId: string;
|
|
5470
|
+
/**
|
|
5471
|
+
* Target sub-agent name (e.g. `company-profile-analyst`). The task's
|
|
5472
|
+
* rendered prompt points operators at `.claude/agents/<agent>.md`.
|
|
5473
|
+
*/
|
|
5474
|
+
readonly agent: string;
|
|
5475
|
+
/**
|
|
5476
|
+
* Human-readable agent label for rendered tables and frontmatter
|
|
5477
|
+
* descriptions (e.g. `"Company Profile"`).
|
|
5478
|
+
*/
|
|
5479
|
+
readonly agentLabel: string;
|
|
5480
|
+
/**
|
|
5481
|
+
* Primary GitHub `type:*` label (without the `type:` prefix). When
|
|
5482
|
+
* `typeLabels` is unset, this is the sole type filter; when
|
|
5483
|
+
* `typeLabels` is set, it is the first element.
|
|
5484
|
+
*/
|
|
5485
|
+
readonly typeLabel: string;
|
|
5486
|
+
/**
|
|
5487
|
+
* Exact `type:*` label values (without the `type:` prefix) the
|
|
5488
|
+
* worker picks up. When set (`length >= 1`), represents a
|
|
5489
|
+
* multi-type filter (e.g. routing-bucket `worker-issue`). When
|
|
5490
|
+
* unset, the `typeLabel` single-value filter applies.
|
|
5491
|
+
*/
|
|
5492
|
+
readonly typeLabels?: ReadonlyArray<string>;
|
|
5493
|
+
/**
|
|
5494
|
+
* Optional phase-label prefix (e.g. `company:`). When present and
|
|
5495
|
+
* `phaseLabels` is unset, the task's SKILL.md instructs the worker
|
|
5496
|
+
* to filter on both `type:<typeLabel>` **and** any `<phasePrefix>*`
|
|
5497
|
+
* label. Ignored when `phaseLabels` is set.
|
|
5498
|
+
*/
|
|
5499
|
+
readonly phasePrefix?: string;
|
|
5500
|
+
/**
|
|
5501
|
+
* Exact phase-label values the worker filters on (e.g.
|
|
5502
|
+
* `["req:write"]`). When set (`length >= 1`), takes precedence over
|
|
5503
|
+
* `phasePrefix`. When unset, the `phasePrefix` prefix-match
|
|
5504
|
+
* applies.
|
|
5505
|
+
*/
|
|
5506
|
+
readonly phaseLabels?: ReadonlyArray<string>;
|
|
5507
|
+
/**
|
|
5508
|
+
* Recommended model tier. Surfaced on the task's SKILL.md
|
|
5509
|
+
* frontmatter and in the rendered documentation table.
|
|
5510
|
+
*/
|
|
5511
|
+
readonly recommendedModel: ScheduledTaskModel;
|
|
5512
|
+
/** Whether the task is emitted to disk. Default: `false`. */
|
|
5513
|
+
readonly enabled: boolean;
|
|
5514
|
+
/**
|
|
5515
|
+
* Optional cron expression. When `null` the task is manual-only
|
|
5516
|
+
* (runs only when an operator invokes it explicitly).
|
|
5517
|
+
*/
|
|
5518
|
+
readonly cron: string | null;
|
|
5519
|
+
/**
|
|
5520
|
+
* Short one-line description for the rendered table and SKILL.md
|
|
5521
|
+
* frontmatter.
|
|
5522
|
+
*/
|
|
5523
|
+
readonly description: string;
|
|
5524
|
+
/**
|
|
5525
|
+
* Discriminator controlling how the SKILL.md body and the registered-
|
|
5526
|
+
* tasks table cell are rendered. `"issue-worker"` (default) emits the
|
|
5527
|
+
* standard delegate-to-issue-worker prompt; `"pipeline"` emits a
|
|
5528
|
+
* pipeline-manager prompt that points the operator at the target
|
|
5529
|
+
* sub-agent's full workflow and renders `_(none — pipeline manager)_`
|
|
5530
|
+
* for the type-label cell.
|
|
5531
|
+
*/
|
|
5532
|
+
readonly kind: ScheduledTaskKind;
|
|
5533
|
+
}
|
|
5534
|
+
/**
|
|
5535
|
+
* Canonical default registry of scheduled-task entries. One entry per
|
|
5536
|
+
* agent bundle that ships with configulator. Every entry is
|
|
5537
|
+
* **disabled by default** — consumers must explicitly opt in via
|
|
5538
|
+
* `ScheduledTasksConfig.overrides[taskId].enabled = true`.
|
|
5539
|
+
*
|
|
5540
|
+
* The registry mirrors the funnel-tier table in `tiers.ts` so the
|
|
5541
|
+
* dispatch ordering, scheduled-task filter, and orchestrator queue
|
|
5542
|
+
* scan all agree on the type-label taxonomy.
|
|
5543
|
+
*/
|
|
5544
|
+
declare const DEFAULT_SCHEDULED_TASK_ENTRIES: ReadonlyArray<ResolvedScheduledTask>;
|
|
5545
|
+
/**
|
|
5546
|
+
* Fully-resolved scheduled-tasks settings. Every field is defaulted so
|
|
5547
|
+
* downstream renderers can reason about a single canonical shape.
|
|
5548
|
+
*/
|
|
5549
|
+
interface ResolvedScheduledTasks {
|
|
5550
|
+
readonly enabled: boolean;
|
|
5551
|
+
readonly root: string;
|
|
5552
|
+
readonly tasks: ReadonlyArray<ResolvedScheduledTask>;
|
|
5553
|
+
}
|
|
5554
|
+
/**
|
|
5555
|
+
* Resolve a (possibly absent) `ScheduledTasksConfig` into a canonical
|
|
5556
|
+
* `ResolvedScheduledTasks` with every field filled in. Unset fields
|
|
5557
|
+
* cascade from their documented defaults.
|
|
5558
|
+
*
|
|
5559
|
+
* The resolver merges three sources in this order:
|
|
5256
5560
|
*
|
|
5257
5561
|
* 1. `DEFAULT_SCHEDULED_TASK_ENTRIES` — the built-in per-agent registry.
|
|
5258
5562
|
* 2. `config.overrides` — per-task consumer overrides keyed by `taskId`.
|
|
@@ -5895,1143 +6199,1056 @@ declare function buildCheckBlockedProcedure(tiers: ReadonlyArray<ResolvedAgentTi
|
|
|
5895
6199
|
* `unblockDependentsProcedure` (declared below) is the default
|
|
5896
6200
|
* instance that ships when the consumer supplies no override.
|
|
5897
6201
|
*
|
|
5898
|
-
******************************************************************************/
|
|
5899
|
-
declare function buildUnblockDependentsProcedure(unblockDependents?: ResolvedUnblockDependents): AgentProcedure;
|
|
5900
|
-
/**
|
|
5901
|
-
* Build the orchestrator-conventions rule content for a given resolved
|
|
5902
|
-
* tier table, scope gate, scheduled-tasks, and unblock-dependents
|
|
5903
|
-
* config. The preamble is constant; each section below it is rendered
|
|
5904
|
-
* from the supplied values so consumer overrides propagate into the
|
|
5905
|
-
* generated rule.
|
|
5906
|
-
*
|
|
5907
|
-
* Every optional parameter defaults to the bundle's built-in default
|
|
5908
|
-
* when the caller omits it.
|
|
5909
|
-
*
|
|
5910
|
-
* The `runRatio` parameter is retained for API compatibility but is
|
|
5911
|
-
* no longer rendered into the conventions content — the orchestrator
|
|
5912
|
-
* runs a single linear cycle on every invocation, so the
|
|
5913
|
-
* dispatch/housekeeping ratio convention was retired. See Phase B
|
|
5914
|
-
* (PR review sweep) in `.claude/agents/orchestrator.md` for the
|
|
5915
|
-
* replacement workflow.
|
|
5916
|
-
*/
|
|
5917
|
-
declare function buildOrchestratorConventionsContent(tiers: ReadonlyArray<ResolvedAgentTier>, scopeGate?: ResolvedScopeGate, _runRatio?: ResolvedRunRatio, scheduledTasks?: ResolvedScheduledTasks, unblockDependents?: ResolvedUnblockDependents, excludeBundles?: ReadonlyArray<string>): string;
|
|
5918
|
-
/**
|
|
5919
|
-
* Resolve the orchestrator-conventions rule content and the
|
|
5920
|
-
* check-blocked.sh procedure content for a given (possibly absent)
|
|
5921
|
-
* consumer-supplied tier config, scope-gate config, run-ratio config,
|
|
5922
|
-
* and scheduled-tasks config. Called by `AgentConfig.preSynthesize`.
|
|
5923
|
-
*
|
|
5924
|
-
* Returns the resolved tier table, scope gate, run ratio, and
|
|
5925
|
-
* scheduled-tasks config alongside both rendered artifacts so callers
|
|
5926
|
-
* can splice them into their rule map and procedure map in a single
|
|
5927
|
-
* pass.
|
|
5928
|
-
*
|
|
5929
|
-
* The `runRatio` parameter is retained for API compatibility but no
|
|
5930
|
-
* longer feeds the rendered conventions content or the
|
|
5931
|
-
* `check-blocked.sh` script — the orchestrator runs a single linear
|
|
5932
|
-
* cycle on every invocation, so the run-counter / `tick` subcommand
|
|
5933
|
-
* were retired.
|
|
5934
|
-
*/
|
|
5935
|
-
declare function resolveOrchestratorAssets(tierConfig?: AgentTierConfig, scopeGateConfig?: ScopeGateConfig, runRatioConfig?: RunRatioConfig, scheduledTasksConfig?: ScheduledTasksConfig, unblockDependentsConfig?: UnblockDependentsConfig, excludeBundles?: ReadonlyArray<string>): {
|
|
5936
|
-
readonly tiers: ReadonlyArray<ResolvedAgentTier>;
|
|
5937
|
-
readonly scopeGate: ResolvedScopeGate;
|
|
5938
|
-
readonly runRatio: ResolvedRunRatio;
|
|
5939
|
-
readonly scheduledTasks: ResolvedScheduledTasks;
|
|
5940
|
-
readonly unblockDependents: ResolvedUnblockDependents;
|
|
5941
|
-
readonly conventionsContent: string;
|
|
5942
|
-
readonly procedure: AgentProcedure;
|
|
5943
|
-
readonly unblockDependentsProcedure: AgentProcedure;
|
|
5944
|
-
};
|
|
5945
|
-
/*******************************************************************************
|
|
5946
|
-
*
|
|
5947
|
-
* Bundle definition
|
|
5948
|
-
*
|
|
5949
|
-
******************************************************************************/
|
|
5950
|
-
declare const orchestratorBundle: AgentRuleBundle;
|
|
5951
|
-
|
|
5952
|
-
/**
|
|
5953
|
-
* People-profile bundle — enabled by default.
|
|
5954
|
-
*
|
|
5955
|
-
* Consuming projects can disable it with
|
|
5956
|
-
* `excludeBundles: ["people-profile"]`. `appliesWhen` always returns
|
|
5957
|
-
* `true` per the operating-system directive that bundles assume peers
|
|
5958
|
-
* are present — in Phase 3 this bundle hands work off to
|
|
5959
|
-
* `company-profile` (via `company:research`) and `software-profile`
|
|
5960
|
-
* (via `software:research`).
|
|
5961
|
-
*
|
|
5962
|
-
* Ships a sub-agent (`people-profile-analyst`), two user-invocable
|
|
5963
|
-
* skills (`/profile-person`, `/refresh-person`), and `type:people-profile`
|
|
5964
|
-
* plus `people:*` phase labels for the four phases.
|
|
5965
|
-
*/
|
|
5966
|
-
declare function buildPeopleProfileBundle(paths?: ResolvedAgentPaths, issueDefaults?: ResolvedIssueDefaults, tier?: AgentModel): AgentRuleBundle;
|
|
5967
|
-
/**
|
|
5968
|
-
* Default-paths instance of the people-profile bundle, preserved for
|
|
5969
|
-
* backward compatibility with consumers that import the const
|
|
5970
|
-
* directly. The factory above is the canonical entry point when a
|
|
5971
|
-
* consumer supplies `AgentConfigOptions.paths`.
|
|
5972
|
-
*/
|
|
5973
|
-
declare const peopleProfileBundle: AgentRuleBundle;
|
|
5974
|
-
|
|
5975
|
-
/**
|
|
5976
|
-
* PNPM bundle — auto-detected when the PnpmWorkspace component is present.
|
|
5977
|
-
*/
|
|
5978
|
-
declare const pnpmBundle: AgentRuleBundle;
|
|
5979
|
-
|
|
5980
|
-
/**
|
|
5981
|
-
* Default master switch for the issue-templates convention. When no
|
|
5982
|
-
* config is supplied the convention ships **enabled** so every
|
|
5983
|
-
* configulator-consuming repo carries the canonical `gh issue create`
|
|
5984
|
-
* template reference in its rendered `CLAUDE.md`.
|
|
5985
|
-
*
|
|
5986
|
-
* @see IssueTemplatesConfig
|
|
5987
|
-
*/
|
|
5988
|
-
declare const DEFAULT_ISSUE_TEMPLATES_ENABLED = true;
|
|
5989
|
-
/**
|
|
5990
|
-
* Default repo-relative path for the consolidated issue-templates
|
|
5991
|
-
* documentation page. Matches the singleton `/docs` site layout every
|
|
5992
|
-
* configulator-managed repo ships: a single Starlight docs site at
|
|
5993
|
-
* `/docs` with agent reference pages under
|
|
5994
|
-
* `docs/src/content/docs/agents/`.
|
|
5995
|
-
*
|
|
5996
|
-
* The file is never generated by configulator unless `emitStarterDoc`
|
|
5997
|
-
* is set — the canonical list of templates is repo-specific and grows
|
|
5998
|
-
* whenever a new phase label is minted, so consumers author and evolve
|
|
5999
|
-
* the page themselves. The starter doc is opt-in.
|
|
6000
|
-
*
|
|
6001
|
-
* @see IssueTemplatesConfig
|
|
6002
|
-
*/
|
|
6003
|
-
declare const DEFAULT_ISSUE_TEMPLATES_PATH = "docs/src/content/docs/agents/issue-templates.md";
|
|
6004
|
-
/**
|
|
6005
|
-
* Default list of glob patterns that identify "bundle files" — the
|
|
6006
|
-
* source files that compose agent prompts and skill instructions.
|
|
6007
|
-
* These are the locations the optional lint walks when checking that
|
|
6008
|
-
* `gh issue create` snippets are **referenced** rather than inlined.
|
|
6009
|
-
*
|
|
6010
|
-
* The defaults cover the locations bundle-like content lives in a
|
|
6011
|
-
* generic configulator-consuming repo:
|
|
6012
|
-
*
|
|
6013
|
-
* - `.claude/agents/**.md` / `.claude/skills/**` — agent and skill
|
|
6014
|
-
* prompts in consuming repos that don't re-export configulator
|
|
6015
|
-
* bundles.
|
|
6016
|
-
*
|
|
6017
|
-
* Repos that **also** host configulator's own bundle source as a
|
|
6018
|
-
* workspace package (only `codedrifters/packages` itself) should
|
|
6019
|
-
* append `packages/@codedrifters/configulator/src/agent/bundles/**.ts`
|
|
6020
|
-
* via `IssueTemplatesConfig.bundlePathPatterns` to lint those bundle
|
|
6021
|
-
* sources too. The default omits that pattern because it is dead
|
|
6022
|
-
* weight (matches nothing) in any other consumer.
|
|
6023
|
-
*
|
|
6024
|
-
* Consumers can replace the list outright via `bundlePathPatterns`
|
|
6025
|
-
* when their agent sources live elsewhere.
|
|
6026
|
-
*
|
|
6027
|
-
* @see IssueTemplatesConfig
|
|
6028
|
-
*/
|
|
6029
|
-
declare const DEFAULT_ISSUE_TEMPLATES_BUNDLE_PATH_PATTERNS: ReadonlyArray<string>;
|
|
6030
|
-
/**
|
|
6031
|
-
* Default for whether the convention emits the
|
|
6032
|
-
* `.claude/procedures/check-issue-templates.sh` lint to disk. The
|
|
6033
|
-
* script greps the provided files (stdin or positional args) for
|
|
6034
|
-
* inline `gh issue create` invocations and fails non-zero when any
|
|
6035
|
-
* are found outside a fenced example block that cites the canonical
|
|
6036
|
-
* templates doc.
|
|
6037
|
-
*
|
|
6038
|
-
* Disabled by default because many consumers prefer to enforce the
|
|
6039
|
-
* rule via review discipline and the rendered guidance alone; the
|
|
6040
|
-
* script is opt-in for repos that want a hard CI gate or pre-commit
|
|
6041
|
-
* hook.
|
|
6042
|
-
*
|
|
6043
|
-
* @see IssueTemplatesConfig
|
|
6044
|
-
*/
|
|
6045
|
-
declare const DEFAULT_ISSUE_TEMPLATES_EMIT_CHECKER = false;
|
|
6046
|
-
/**
|
|
6047
|
-
* Default for whether the convention emits a minimal starter
|
|
6048
|
-
* issue-templates page to disk at `<templatesPath>`. The starter
|
|
6049
|
-
* carries the expected structure (one `## Template: <phase-label>`
|
|
6050
|
-
* heading per known phase plus a placeholder body) so consumers
|
|
6051
|
-
* adopting the convention on a green-field repo have a working
|
|
6052
|
-
* template to extend.
|
|
6053
|
-
*
|
|
6054
|
-
* Disabled by default because the page is hand-authored and most
|
|
6055
|
-
* repos adopt the convention after they already maintain their own
|
|
6056
|
-
* ad-hoc notes — an emitted stub would conflict with existing
|
|
6057
|
-
* content.
|
|
6058
|
-
*
|
|
6059
|
-
* @see IssueTemplatesConfig
|
|
6060
|
-
*/
|
|
6061
|
-
declare const DEFAULT_ISSUE_TEMPLATES_EMIT_STARTER = false;
|
|
6062
|
-
/**
|
|
6063
|
-
* Default for whether the rendered rule body asserts that every
|
|
6064
|
-
* `gh issue create` recipe in a bundle or agent prompt **MUST** cite
|
|
6065
|
-
* the canonical templates doc rather than inline a full template.
|
|
6066
|
-
*
|
|
6067
|
-
* Defaults to `true` — the whole point of consolidation is that
|
|
6068
|
-
* templates live in one place, so the MUST phrasing is the correct
|
|
6069
|
-
* default. Consumers that treat consolidation as aspirational can
|
|
6070
|
-
* soften the phrasing by setting this to `false`.
|
|
6071
|
-
*
|
|
6072
|
-
* @see IssueTemplatesConfig
|
|
6073
|
-
*/
|
|
6074
|
-
declare const DEFAULT_ISSUE_TEMPLATES_REQUIRE_REFERENCE = true;
|
|
6075
|
-
/**
|
|
6076
|
-
* Fully-resolved issue-templates settings. Every field is defaulted
|
|
6077
|
-
* so downstream renderers can reason about a single canonical shape.
|
|
6078
|
-
*/
|
|
6079
|
-
interface ResolvedIssueTemplates {
|
|
6080
|
-
readonly enabled: boolean;
|
|
6081
|
-
readonly templatesPath: string;
|
|
6082
|
-
readonly bundlePathPatterns: ReadonlyArray<string>;
|
|
6083
|
-
readonly emitChecker: boolean;
|
|
6084
|
-
readonly emitStarterDoc: boolean;
|
|
6085
|
-
readonly requireReference: boolean;
|
|
6086
|
-
}
|
|
6087
|
-
/**
|
|
6088
|
-
* Resolve a (possibly absent) `IssueTemplatesConfig` into a canonical
|
|
6089
|
-
* `ResolvedIssueTemplates` with every field filled in. Unset fields
|
|
6090
|
-
* cascade from their documented defaults.
|
|
6091
|
-
*
|
|
6092
|
-
* Malformed configs — empty / whitespace-only or absolute
|
|
6093
|
-
* `templatesPath`, empty `bundlePathPatterns`, empty /
|
|
6094
|
-
* whitespace-only path entry — throw a descriptive `Error`.
|
|
6095
|
-
*/
|
|
6096
|
-
declare function resolveIssueTemplates(config?: IssueTemplatesConfig): ResolvedIssueTemplates;
|
|
6097
|
-
/**
|
|
6098
|
-
* Synth-time validation hook. Throws a descriptive `Error` when the
|
|
6099
|
-
* supplied `IssueTemplatesConfig` is malformed. Called by
|
|
6100
|
-
* `AgentConfig.preSynthesize` before any rendering so a misconfigured
|
|
6101
|
-
* convention fails the build instead of silently shipping broken
|
|
6102
|
-
* guidance. Returns the resolved config unchanged so callers can
|
|
6103
|
-
* write `const it = validateIssueTemplatesConfig(config)` in one line.
|
|
6104
|
-
*
|
|
6105
|
-
* Malformed cases rejected here:
|
|
6202
|
+
******************************************************************************/
|
|
6203
|
+
declare function buildUnblockDependentsProcedure(unblockDependents?: ResolvedUnblockDependents): AgentProcedure;
|
|
6204
|
+
/**
|
|
6205
|
+
* Build the orchestrator-conventions rule content for a given resolved
|
|
6206
|
+
* tier table, scope gate, scheduled-tasks, and unblock-dependents
|
|
6207
|
+
* config. The preamble is constant; each section below it is rendered
|
|
6208
|
+
* from the supplied values so consumer overrides propagate into the
|
|
6209
|
+
* generated rule.
|
|
6106
6210
|
*
|
|
6107
|
-
*
|
|
6108
|
-
*
|
|
6109
|
-
*
|
|
6211
|
+
* Every optional parameter defaults to the bundle's built-in default
|
|
6212
|
+
* when the caller omits it.
|
|
6213
|
+
*
|
|
6214
|
+
* The `runRatio` parameter is retained for API compatibility but is
|
|
6215
|
+
* no longer rendered into the conventions content — the orchestrator
|
|
6216
|
+
* runs a single linear cycle on every invocation, so the
|
|
6217
|
+
* dispatch/housekeeping ratio convention was retired. See Phase B
|
|
6218
|
+
* (PR review sweep) in `.claude/agents/orchestrator.md` for the
|
|
6219
|
+
* replacement workflow.
|
|
6110
6220
|
*/
|
|
6111
|
-
declare function
|
|
6221
|
+
declare function buildOrchestratorConventionsContent(tiers: ReadonlyArray<ResolvedAgentTier>, scopeGate?: ResolvedScopeGate, _runRatio?: ResolvedRunRatio, scheduledTasks?: ResolvedScheduledTasks, unblockDependents?: ResolvedUnblockDependents, excludeBundles?: ReadonlyArray<string>): string;
|
|
6112
6222
|
/**
|
|
6113
|
-
*
|
|
6114
|
-
*
|
|
6223
|
+
* Resolve the orchestrator-conventions rule content and the
|
|
6224
|
+
* check-blocked.sh procedure content for a given (possibly absent)
|
|
6225
|
+
* consumer-supplied tier config, scope-gate config, run-ratio config,
|
|
6226
|
+
* and scheduled-tasks config. Called by `AgentConfig.preSynthesize`.
|
|
6115
6227
|
*
|
|
6116
|
-
*
|
|
6117
|
-
*
|
|
6118
|
-
*
|
|
6119
|
-
*
|
|
6120
|
-
* per downstream issue kind.
|
|
6121
|
-
* - The **reference-don't-inline** rule, phrased as a hard
|
|
6122
|
-
* requirement or a strong recommendation per `requireReference`.
|
|
6123
|
-
* - The set of paths the rule applies to.
|
|
6124
|
-
* - The optional lint script (cross-referenced only when emitted).
|
|
6228
|
+
* Returns the resolved tier table, scope gate, run ratio, and
|
|
6229
|
+
* scheduled-tasks config alongside both rendered artifacts so callers
|
|
6230
|
+
* can splice them into their rule map and procedure map in a single
|
|
6231
|
+
* pass.
|
|
6125
6232
|
*
|
|
6126
|
-
*
|
|
6233
|
+
* The `runRatio` parameter is retained for API compatibility but no
|
|
6234
|
+
* longer feeds the rendered conventions content or the
|
|
6235
|
+
* `check-blocked.sh` script — the orchestrator runs a single linear
|
|
6236
|
+
* cycle on every invocation, so the run-counter / `tick` subcommand
|
|
6237
|
+
* were retired.
|
|
6127
6238
|
*/
|
|
6128
|
-
declare function
|
|
6239
|
+
declare function resolveOrchestratorAssets(tierConfig?: AgentTierConfig, scopeGateConfig?: ScopeGateConfig, runRatioConfig?: RunRatioConfig, scheduledTasksConfig?: ScheduledTasksConfig, unblockDependentsConfig?: UnblockDependentsConfig, excludeBundles?: ReadonlyArray<string>): {
|
|
6240
|
+
readonly tiers: ReadonlyArray<ResolvedAgentTier>;
|
|
6241
|
+
readonly scopeGate: ResolvedScopeGate;
|
|
6242
|
+
readonly runRatio: ResolvedRunRatio;
|
|
6243
|
+
readonly scheduledTasks: ResolvedScheduledTasks;
|
|
6244
|
+
readonly unblockDependents: ResolvedUnblockDependents;
|
|
6245
|
+
readonly conventionsContent: string;
|
|
6246
|
+
readonly procedure: AgentProcedure;
|
|
6247
|
+
readonly unblockDependentsProcedure: AgentProcedure;
|
|
6248
|
+
};
|
|
6129
6249
|
/**
|
|
6130
|
-
*
|
|
6131
|
-
*
|
|
6132
|
-
*
|
|
6133
|
-
*
|
|
6134
|
-
*
|
|
6135
|
-
* When the convention is disabled, the function returns an empty
|
|
6136
|
-
* string so callers can no-op their append path.
|
|
6250
|
+
* Fully-resolved settings that feed the `orchestrator-conventions`
|
|
6251
|
+
* rule. Every field is already resolved, so `buildOrchestratorBundle`
|
|
6252
|
+
* can seed the rule's final content up front rather than shipping
|
|
6253
|
+
* default content that a later pass has to rewrite.
|
|
6137
6254
|
*/
|
|
6138
|
-
|
|
6255
|
+
interface ResolvedOrchestratorConventions {
|
|
6256
|
+
readonly tiers: ReadonlyArray<ResolvedAgentTier>;
|
|
6257
|
+
readonly scopeGate: ResolvedScopeGate;
|
|
6258
|
+
readonly runRatio: ResolvedRunRatio;
|
|
6259
|
+
readonly scheduledTasks: ResolvedScheduledTasks;
|
|
6260
|
+
readonly unblockDependents: ResolvedUnblockDependents;
|
|
6261
|
+
/**
|
|
6262
|
+
* Bundle names the consumer excluded. Rows owned by an excluded
|
|
6263
|
+
* bundle are dropped from the rendered tier table, scope-gate
|
|
6264
|
+
* overrides, and scheduled-tasks registry.
|
|
6265
|
+
*/
|
|
6266
|
+
readonly excludeBundles: ReadonlyArray<string>;
|
|
6267
|
+
}
|
|
6139
6268
|
/**
|
|
6140
|
-
*
|
|
6141
|
-
*
|
|
6142
|
-
* section. Exported so `AgentConfig` can emit it to disk when the
|
|
6143
|
-
* consumer opts in via `emitStarterDoc: true`.
|
|
6144
|
-
*
|
|
6145
|
-
* The starter is deliberately sparse: it documents the expected
|
|
6146
|
-
* structure without committing the consumer to a particular phase
|
|
6147
|
-
* label list. Repos that already maintain a hand-authored templates
|
|
6148
|
-
* page should leave `emitStarterDoc` off — the emission would
|
|
6149
|
-
* overwrite their content.
|
|
6269
|
+
* The orchestrator-conventions settings the bundle ships when the
|
|
6270
|
+
* consumer supplies no override.
|
|
6150
6271
|
*/
|
|
6151
|
-
declare
|
|
6272
|
+
declare const DEFAULT_ORCHESTRATOR_CONVENTIONS: ResolvedOrchestratorConventions;
|
|
6152
6273
|
/**
|
|
6153
|
-
*
|
|
6154
|
-
*
|
|
6155
|
-
*
|
|
6156
|
-
*
|
|
6157
|
-
* The script accepts the list of changed files as either:
|
|
6274
|
+
* Build the `orchestrator` bundle with the consumer's resolved tier,
|
|
6275
|
+
* scope-gate, run-ratio, scheduled-tasks, and unblock-dependents
|
|
6276
|
+
* settings already baked into the `orchestrator-conventions` rule
|
|
6277
|
+
* content.
|
|
6158
6278
|
*
|
|
6159
|
-
*
|
|
6160
|
-
*
|
|
6161
|
-
*
|
|
6279
|
+
* Resolving here — rather than rewriting the rule after the rule map
|
|
6280
|
+
* has been assembled — is what lets a consumer's
|
|
6281
|
+
* `ruleExtensions["orchestrator-conventions"]` append (or a same-name
|
|
6282
|
+
* `agentConfig.rules` entry) survive alongside a tier / scope-gate /
|
|
6283
|
+
* scheduled-tasks override. The two features compose because the rule
|
|
6284
|
+
* enters the map already carrying the consumer's resolved settings.
|
|
6162
6285
|
*
|
|
6163
|
-
*
|
|
6164
|
-
*
|
|
6165
|
-
* invocation that isn't in the configured allow list (the templates
|
|
6166
|
-
* page itself and the `create-issue-workflow` rule source).
|
|
6286
|
+
* When the argument is omitted the bundle ships with the documented
|
|
6287
|
+
* defaults baked in, identical to the `orchestratorBundle` const below.
|
|
6167
6288
|
*/
|
|
6168
|
-
declare function
|
|
6289
|
+
declare function buildOrchestratorBundle(conventions?: ResolvedOrchestratorConventions): AgentRuleBundle;
|
|
6290
|
+
/**
|
|
6291
|
+
* Default-config instance of the orchestrator bundle, preserved for
|
|
6292
|
+
* backward compatibility with consumers that import the const
|
|
6293
|
+
* directly. The factory above is the canonical entry point when a
|
|
6294
|
+
* consumer supplies tier / scope-gate / scheduled-tasks overrides.
|
|
6295
|
+
*/
|
|
6296
|
+
declare const orchestratorBundle: AgentRuleBundle;
|
|
6169
6297
|
|
|
6170
6298
|
/**
|
|
6171
|
-
*
|
|
6172
|
-
*
|
|
6173
|
-
*
|
|
6174
|
-
*
|
|
6175
|
-
*
|
|
6299
|
+
* Default path globs that exempt a PR from the `human-required.size`
|
|
6300
|
+
* rule. The policy walks every changed path in the PR and skips
|
|
6301
|
+
* rule #6 (size threshold) when **every** path matches at least one
|
|
6302
|
+
* glob in this list. Doc-only PRs routinely exceed the 500-insertion
|
|
6303
|
+
* threshold (large migrations, bulk additions, refresh passes) but
|
|
6304
|
+
* carry no production risk that warrants forcing a human reviewer.
|
|
6176
6305
|
*
|
|
6177
|
-
*
|
|
6178
|
-
*
|
|
6179
|
-
*
|
|
6180
|
-
*
|
|
6181
|
-
*
|
|
6182
|
-
* it is applied immediately after creation via the
|
|
6183
|
-
* `updateIssueIssueType` GraphQL mutation.
|
|
6306
|
+
* The default exempts the entire `docs/**` tree — every consumer of
|
|
6307
|
+
* configulator places its Starlight docs site there. Consumers can
|
|
6308
|
+
* extend this list (e.g. add `docs/research/**` if doc-style research
|
|
6309
|
+
* notes live outside the Starlight tree) by passing
|
|
6310
|
+
* `prReviewPolicy.autoMerge.pathsExemptFromSize`.
|
|
6184
6311
|
*
|
|
6185
|
-
*
|
|
6186
|
-
*
|
|
6312
|
+
* @see PrReviewPolicyConfig
|
|
6313
|
+
* @see PrReviewAutoMergeConfig.pathsExemptFromSize
|
|
6187
6314
|
*/
|
|
6188
|
-
declare const
|
|
6189
|
-
type GithubIssueType = (typeof GITHUB_ISSUE_TYPES)[number];
|
|
6315
|
+
declare const DEFAULT_PATHS_EXEMPT_FROM_SIZE: ReadonlyArray<string>;
|
|
6190
6316
|
/**
|
|
6191
|
-
*
|
|
6192
|
-
*
|
|
6317
|
+
* Fully-resolved PR review policy. Every field is defaulted so
|
|
6318
|
+
* downstream renderers can reason about a single canonical shape.
|
|
6193
6319
|
*
|
|
6194
|
-
*
|
|
6195
|
-
*
|
|
6196
|
-
*
|
|
6197
|
-
*
|
|
6320
|
+
* Two sub-rules are configurable today: the doc-only carve-out
|
|
6321
|
+
* against the size threshold (`autoMerge.pathsExemptFromSize`) and
|
|
6322
|
+
* the CI-verification fallback's required-workflow list
|
|
6323
|
+
* (`ciVerification.requiredWorkflows`). Additional knobs for other
|
|
6324
|
+
* rules in the policy may be added in future versions of
|
|
6325
|
+
* `PrReviewPolicyConfig`.
|
|
6198
6326
|
*/
|
|
6199
|
-
|
|
6327
|
+
interface ResolvedPrReviewPolicy {
|
|
6328
|
+
readonly autoMerge: ResolvedPrReviewAutoMerge;
|
|
6329
|
+
readonly ciVerification: ResolvedPrReviewCiVerification;
|
|
6330
|
+
}
|
|
6200
6331
|
/**
|
|
6201
|
-
*
|
|
6202
|
-
*
|
|
6203
|
-
* Derived from {@link CONVENTIONAL_COMMIT_TYPE_LABELS} — the shared
|
|
6204
|
-
* conventional-commit vocabulary exported alongside the bundle
|
|
6205
|
-
* ownership registry — so the prefix list can never drift from the
|
|
6206
|
-
* label list the create-issue workflow stamps. Every conventional-commit
|
|
6207
|
-
* prefix defaults to `Task`; the three exceptions are overlaid on top.
|
|
6332
|
+
* Fully-resolved `auto-merge` half of the policy.
|
|
6208
6333
|
*
|
|
6209
|
-
*
|
|
6210
|
-
*
|
|
6334
|
+
* `pathsExemptFromSize` is always populated — the default
|
|
6335
|
+
* (`["docs/**"]`) ships when the consumer omits the option.
|
|
6211
6336
|
*/
|
|
6212
|
-
|
|
6337
|
+
interface ResolvedPrReviewAutoMerge {
|
|
6338
|
+
readonly pathsExemptFromSize: ReadonlyArray<string>;
|
|
6339
|
+
}
|
|
6213
6340
|
/**
|
|
6214
|
-
*
|
|
6341
|
+
* Fully-resolved `ci-verification` half of the policy.
|
|
6215
6342
|
*
|
|
6216
|
-
*
|
|
6217
|
-
*
|
|
6218
|
-
*
|
|
6219
|
-
* {@link DEFAULT_GITHUB_ISSUE_TYPE}.
|
|
6220
|
-
*/
|
|
6221
|
-
declare function githubIssueTypeForTitle(title: string): GithubIssueType;
|
|
6222
|
-
/**
|
|
6223
|
-
* Path to the `set-issue-type.sh` helper the `github-workflow` bundle
|
|
6224
|
-
* ships. Referenced (never assumed present) by the rendered prose — see
|
|
6225
|
-
* {@link renderGithubIssueTypeSectionLines} for the fallback that keeps
|
|
6226
|
-
* the recipe working for consumers who exclude that bundle.
|
|
6343
|
+
* `requiredWorkflows` is always populated — the default (`[]`, i.e.
|
|
6344
|
+
* "treat every observed Actions run as required") ships when the
|
|
6345
|
+
* consumer omits the option.
|
|
6227
6346
|
*/
|
|
6228
|
-
|
|
6347
|
+
interface ResolvedPrReviewCiVerification {
|
|
6348
|
+
readonly requiredWorkflows: ReadonlyArray<string>;
|
|
6349
|
+
}
|
|
6229
6350
|
/**
|
|
6230
|
-
*
|
|
6351
|
+
* Resolve a (possibly absent) `PrReviewPolicyConfig` into a canonical
|
|
6352
|
+
* `ResolvedPrReviewPolicy` with every field filled in. Unset fields
|
|
6353
|
+
* cascade from their documented defaults.
|
|
6231
6354
|
*
|
|
6232
|
-
*
|
|
6233
|
-
*
|
|
6234
|
-
*
|
|
6235
|
-
* consumer running `excludeBundles: ["github-workflow"]`, so the
|
|
6236
|
-
* fallback is documented inline in an always-on base rule and every
|
|
6237
|
-
* per-filing-site step points at it.
|
|
6355
|
+
* Malformed configs (empty / whitespace-only path entries) throw a
|
|
6356
|
+
* descriptive `Error` — callers should not need to guard against it
|
|
6357
|
+
* at runtime.
|
|
6238
6358
|
*/
|
|
6239
|
-
declare function
|
|
6359
|
+
declare function resolvePrReviewPolicy(config?: PrReviewPolicyConfig): ResolvedPrReviewPolicy;
|
|
6240
6360
|
/**
|
|
6241
|
-
*
|
|
6242
|
-
* `
|
|
6243
|
-
*
|
|
6244
|
-
*
|
|
6245
|
-
*
|
|
6246
|
-
*
|
|
6247
|
-
* line regardless of which optional bundles the consumer enabled.
|
|
6361
|
+
* Synth-time validation hook. Throws a descriptive `Error` when the
|
|
6362
|
+
* supplied `PrReviewPolicyConfig` is malformed. Called by
|
|
6363
|
+
* `AgentConfig.preSynthesize` before any rendering so a misconfigured
|
|
6364
|
+
* policy fails the build instead of silently shipping broken carve-out
|
|
6365
|
+
* globs. Returns the resolved policy unchanged so callers can write
|
|
6366
|
+
* `const policy = validatePrReviewPolicyConfig(config)` in one line.
|
|
6248
6367
|
*
|
|
6249
|
-
*
|
|
6368
|
+
* Malformed cases rejected here:
|
|
6250
6369
|
*
|
|
6251
|
-
*
|
|
6252
|
-
*
|
|
6253
|
-
*
|
|
6370
|
+
* - `pathsExemptFromSize` entries that are empty or whitespace-only —
|
|
6371
|
+
* such an entry would either silently match nothing or match every
|
|
6372
|
+
* path, both of which are almost certainly a typo.
|
|
6373
|
+
* - `requiredWorkflows` entries that are empty or whitespace-only — a
|
|
6374
|
+
* blank workflow name can never match an Actions-run `name`, so the
|
|
6375
|
+
* intended gate would silently never fire.
|
|
6254
6376
|
*/
|
|
6255
|
-
declare function
|
|
6377
|
+
declare function validatePrReviewPolicyConfig(config?: PrReviewPolicyConfig): ResolvedPrReviewPolicy;
|
|
6378
|
+
|
|
6256
6379
|
/**
|
|
6257
|
-
*
|
|
6258
|
-
*
|
|
6259
|
-
*
|
|
6260
|
-
*
|
|
6261
|
-
*
|
|
6262
|
-
* one bullet per non-default prefix, then a single bullet collapsing
|
|
6263
|
-
* every prefix that maps to {@link DEFAULT_GITHUB_ISSUE_TYPE}.
|
|
6380
|
+
* One row in the rendered agent registry table. Each phased-agent
|
|
6381
|
+
* bundle that previously shipped its own `<bundle>-workflow` rule
|
|
6382
|
+
* contributes exactly one entry here so the registry can answer
|
|
6383
|
+
* "which agent handles X" without rendering 18 prose summaries
|
|
6384
|
+
* into CLAUDE.md.
|
|
6264
6385
|
*/
|
|
6265
|
-
|
|
6266
|
-
/**
|
|
6267
|
-
|
|
6268
|
-
/**
|
|
6269
|
-
|
|
6386
|
+
interface AgentRegistryEntry {
|
|
6387
|
+
/** Bundle name as it appears in `buildBuiltInBundles`, e.g. `bcm-writer`. */
|
|
6388
|
+
readonly bundle: string;
|
|
6389
|
+
/** Primary user-invocable skill, with leading slash, e.g. `/write-bcm`. */
|
|
6390
|
+
readonly skill: string;
|
|
6391
|
+
/** Sub-agent name in `.claude/agents/`, e.g. `bcm-writer`. */
|
|
6392
|
+
readonly agent: string;
|
|
6270
6393
|
/**
|
|
6271
|
-
*
|
|
6272
|
-
*
|
|
6273
|
-
*
|
|
6274
|
-
*
|
|
6394
|
+
* Function that resolves the canonical output path for this
|
|
6395
|
+
* bundle from the project's resolved agent-path roots. Returning
|
|
6396
|
+
* an empty string signals "no filesystem output path" (used by
|
|
6397
|
+
* pr-review). Path-aware so consumer overrides on
|
|
6398
|
+
* `AgentConfigOptions.paths` propagate into the rendered table.
|
|
6275
6399
|
*/
|
|
6276
|
-
readonly
|
|
6400
|
+
readonly resolveOutputPath: (paths: ResolvedAgentPaths) => string;
|
|
6277
6401
|
/**
|
|
6278
|
-
*
|
|
6279
|
-
*
|
|
6280
|
-
*
|
|
6402
|
+
* One-line purpose description. Lifted from the first prose
|
|
6403
|
+
* sentence of the original `<bundle>-workflow` rule so consumers
|
|
6404
|
+
* keep the same routing signal.
|
|
6281
6405
|
*/
|
|
6282
|
-
readonly
|
|
6406
|
+
readonly purpose: string;
|
|
6283
6407
|
/**
|
|
6284
|
-
*
|
|
6285
|
-
*
|
|
6286
|
-
*
|
|
6287
|
-
*
|
|
6408
|
+
* Name of the original `<bundle>-workflow` rule. Used by the
|
|
6409
|
+
* registry helper to filter the resolved bundle list and assert
|
|
6410
|
+
* (via the test suite) that no bundle still ships its workflow
|
|
6411
|
+
* rule into the Claude platform output.
|
|
6288
6412
|
*/
|
|
6289
|
-
readonly
|
|
6413
|
+
readonly workflowRuleName: string;
|
|
6290
6414
|
}
|
|
6291
6415
|
/**
|
|
6292
|
-
*
|
|
6293
|
-
* bundle
|
|
6294
|
-
*
|
|
6295
|
-
*
|
|
6296
|
-
*
|
|
6297
|
-
*
|
|
6298
|
-
* delegates the fallback to the always-on `issue-conventions` rule
|
|
6299
|
-
* rather than re-inlining the GraphQL flow at every site.
|
|
6416
|
+
* Static registry of every phased-agent bundle that contributes a
|
|
6417
|
+
* routing row. Order is alphabetical by bundle name so the
|
|
6418
|
+
* rendered table is stable across runs and consumer-side diffs are
|
|
6419
|
+
* minimal. Adding a new phased-agent bundle requires appending one
|
|
6420
|
+
* row here and suppressing its `<bundle>-workflow` rule via
|
|
6421
|
+
* `platforms: { claude: { exclude: true } }`.
|
|
6300
6422
|
*/
|
|
6301
|
-
declare
|
|
6423
|
+
declare const AGENT_REGISTRY_ENTRIES: ReadonlyArray<AgentRegistryEntry>;
|
|
6302
6424
|
/**
|
|
6303
|
-
*
|
|
6304
|
-
*
|
|
6305
|
-
*
|
|
6306
|
-
*
|
|
6425
|
+
* The set of `<bundle>-workflow` rule names that the registry
|
|
6426
|
+
* subsumes. Used both to suppress those rules from the Claude
|
|
6427
|
+
* platform output and to assert in tests that no bundle still
|
|
6428
|
+
* ships its prose summary into CLAUDE.md.
|
|
6307
6429
|
*/
|
|
6308
|
-
declare
|
|
6309
|
-
|
|
6430
|
+
declare const SUPPRESSED_WORKFLOW_RULE_NAMES: ReadonlyArray<string>;
|
|
6310
6431
|
/**
|
|
6311
|
-
*
|
|
6312
|
-
*
|
|
6313
|
-
*
|
|
6314
|
-
*
|
|
6315
|
-
* @see ProgressFilesConfig
|
|
6432
|
+
* Returns `true` when the supplied rule name belongs to a
|
|
6433
|
+
* phased-agent `<bundle>-workflow` rule whose routing summary now
|
|
6434
|
+
* lives in the shared `agent-registry` rule.
|
|
6316
6435
|
*/
|
|
6317
|
-
declare
|
|
6436
|
+
declare function isSuppressedWorkflowRule(name: string): boolean;
|
|
6318
6437
|
/**
|
|
6319
|
-
*
|
|
6320
|
-
*
|
|
6321
|
-
*
|
|
6322
|
-
* `
|
|
6438
|
+
* Reverse map from a `<bundle>-workflow` rule name to its owning
|
|
6439
|
+
* bundle name. Used by the registry consolidation loop to detect
|
|
6440
|
+
* when a consumer has targeted a bundle with a
|
|
6441
|
+
* `features.customDocSections` entry — those bundles keep
|
|
6442
|
+
* rendering their workflow rule into CLAUDE.md so the consumer-
|
|
6443
|
+
* supplied prose has somewhere to live. Returns `undefined` for
|
|
6444
|
+
* any rule name that is not in the registry's suppression list.
|
|
6445
|
+
*/
|
|
6446
|
+
declare function bundleNameForWorkflowRule(ruleName: string): string | undefined;
|
|
6447
|
+
declare function buildAgentRegistryRule(bundles: ReadonlyArray<AgentRuleBundle>, paths: ResolvedAgentPaths): AgentRule | undefined;
|
|
6448
|
+
|
|
6449
|
+
/**
|
|
6450
|
+
* Agenda bundle — enabled by default.
|
|
6323
6451
|
*
|
|
6324
|
-
*
|
|
6325
|
-
*
|
|
6326
|
-
*
|
|
6327
|
-
*
|
|
6452
|
+
* Consuming projects can disable it with
|
|
6453
|
+
* `excludeBundles: ["agenda"]`. `appliesWhen` always returns `true`
|
|
6454
|
+
* (peer-present assumption, same pattern as the other workflow
|
|
6455
|
+
* bundles).
|
|
6328
6456
|
*
|
|
6329
|
-
*
|
|
6457
|
+
* Provides a 2-phase pre-meeting agenda pipeline
|
|
6458
|
+
* (draft → finalize), complementing the post-meeting pipeline in
|
|
6459
|
+
* the `meeting-analysis` bundle. Ships a sub-agent, two user-
|
|
6460
|
+
* invocable skills (`/draft-agenda`, `/finalize-agenda`), and
|
|
6461
|
+
* `agenda:*` phase labels via the bundle `labels` mechanism so
|
|
6462
|
+
* consuming projects automatically pick up the label taxonomy
|
|
6463
|
+
* through the sync-labels workflow.
|
|
6464
|
+
*
|
|
6465
|
+
* Reuses the meeting-type taxonomy from
|
|
6466
|
+
* `AgentConfigOptions.meetings.meetingTypes` — the same table the
|
|
6467
|
+
* `meeting-analysis` bundle consumes for post-meeting extraction.
|
|
6330
6468
|
*/
|
|
6331
|
-
declare const
|
|
6469
|
+
declare const agendaBundle: AgentRuleBundle;
|
|
6470
|
+
|
|
6332
6471
|
/**
|
|
6333
|
-
*
|
|
6334
|
-
|
|
6335
|
-
|
|
6472
|
+
* AWS CDK bundle — auto-detected when `aws-cdk-lib` is in dependencies.
|
|
6473
|
+
*/
|
|
6474
|
+
declare const awsCdkBundle: AgentRuleBundle;
|
|
6475
|
+
|
|
6476
|
+
/**
|
|
6477
|
+
* Hand-maintained registry mapping every bundle name to the cross-bundle
|
|
6478
|
+
* surface it owns: GitHub `type:*` labels, phase-label prefixes,
|
|
6479
|
+
* scheduled-task IDs, whether it emits Starlight docs, and whether it
|
|
6480
|
+
* declares any downstream issue kinds (i.e. files `gh issue create`
|
|
6481
|
+
* recipes via the issue-templates convention).
|
|
6336
6482
|
*
|
|
6337
|
-
* The
|
|
6338
|
-
* `
|
|
6339
|
-
*
|
|
6483
|
+
* The registry is consulted by renderers in other bundles whenever
|
|
6484
|
+
* `AgentConfigOptions.excludeBundles` is non-empty so cross-bundle
|
|
6485
|
+
* references to an excluded bundle's agents, type labels, phase labels,
|
|
6486
|
+
* or scheduled tasks disappear from the generated output.
|
|
6340
6487
|
*
|
|
6341
|
-
*
|
|
6488
|
+
* The map is **hand-maintained** rather than derived from each bundle's
|
|
6489
|
+
* runtime shape. The defining surfaces (the funnel-tier table in
|
|
6490
|
+
* `tiers.ts`, the per-phase scope-gate overrides in `scope-gate.ts`, and
|
|
6491
|
+
* the scheduled-tasks registry in `scheduled-tasks.ts`) live as flat
|
|
6492
|
+
* data tables that already get walked by their renderers — declaring the
|
|
6493
|
+
* ownership map alongside them keeps the relationship explicit and
|
|
6494
|
+
* readable without forcing every bundle to grow an "ownership"
|
|
6495
|
+
* descriptor.
|
|
6496
|
+
*
|
|
6497
|
+
* Bundles that ship no cross-bundle surface (e.g. `slack`, `typescript`,
|
|
6498
|
+
* `pnpm`, `vitest`, `jest`, `aws-cdk`, `projen`, `turborepo`,
|
|
6499
|
+
* `upstream-configulator-docs`) deliberately do not appear here —
|
|
6500
|
+
* excluding them is already a no-op since they own nothing other
|
|
6501
|
+
* bundles reference.
|
|
6342
6502
|
*/
|
|
6343
|
-
|
|
6503
|
+
interface BundleOwnership {
|
|
6504
|
+
/**
|
|
6505
|
+
* GitHub `type:*` label values (without the `type:` prefix) the
|
|
6506
|
+
* bundle owns. The funnel-tier table in `tiers.ts` and any rendered
|
|
6507
|
+
* tables that group agents by `type:*` label consult this list.
|
|
6508
|
+
*/
|
|
6509
|
+
readonly typeLabels: ReadonlyArray<string>;
|
|
6510
|
+
/**
|
|
6511
|
+
* Phase-label prefixes (with trailing colon, e.g. `"company:"`) the
|
|
6512
|
+
* bundle owns. Used by the scope-gate per-phase override table and
|
|
6513
|
+
* any other renderer that groups by phase label. An entry without a
|
|
6514
|
+
* trailing colon (e.g. `"req:write"`) is treated as an exact
|
|
6515
|
+
* phase-label match instead of a prefix.
|
|
6516
|
+
*/
|
|
6517
|
+
readonly phaseLabelPrefixes: ReadonlyArray<string>;
|
|
6518
|
+
/**
|
|
6519
|
+
* `taskId` values from `DEFAULT_SCHEDULED_TASK_ENTRIES` that target
|
|
6520
|
+
* this bundle's sub-agent. The scheduled-tasks registry filter in
|
|
6521
|
+
* `agent-config.ts` consults this list when pruning default entries
|
|
6522
|
+
* for an excluded bundle.
|
|
6523
|
+
*/
|
|
6524
|
+
readonly scheduledTaskIds: ReadonlyArray<string>;
|
|
6525
|
+
/**
|
|
6526
|
+
* Whether this bundle emits Starlight content roots — i.e. whether
|
|
6527
|
+
* any of its workflows write files under `docs/src/content/docs/`
|
|
6528
|
+
* (or the configured docs root). Drives the auto-suppression of the
|
|
6529
|
+
* `section-index-pages` rule when no docs-emitting bundle is active.
|
|
6530
|
+
*/
|
|
6531
|
+
readonly emitsDocs: boolean;
|
|
6532
|
+
/**
|
|
6533
|
+
* Whether this bundle dispatches downstream issues (i.e. its
|
|
6534
|
+
* workflows file `gh issue create` recipes). Drives the
|
|
6535
|
+
* auto-suppression of the `issue-templates-convention` rule when no
|
|
6536
|
+
* such bundle is active.
|
|
6537
|
+
*
|
|
6538
|
+
* Not an exhaustive enumerator of issue-filing bundles. Only bundles
|
|
6539
|
+
* that own a cross-bundle surface appear in {@link BUNDLE_OWNERSHIP}
|
|
6540
|
+
* at all, so a bundle can file issues and still be absent — the
|
|
6541
|
+
* `upstream-configulator-docs` bundle files into a *foreign* repo
|
|
6542
|
+
* (`codedrifters/packages`) and is deliberately not registered.
|
|
6543
|
+
* Treat a `true` here as "this bundle's phase labels need the
|
|
6544
|
+
* templates convention", not as "these are all the filing sites".
|
|
6545
|
+
*/
|
|
6546
|
+
readonly downstreamIssueKinds: boolean;
|
|
6547
|
+
}
|
|
6344
6548
|
/**
|
|
6345
|
-
*
|
|
6346
|
-
*
|
|
6347
|
-
* resume logic) while still remaining human-readable when opened.
|
|
6348
|
-
* Consumers that prefer the openhi-style markdown body can override.
|
|
6349
|
-
*
|
|
6350
|
-
* @see ProgressFilesConfig
|
|
6549
|
+
* Canonical ownership map. Only bundles that own at least one
|
|
6550
|
+
* cross-bundle surface appear here.
|
|
6351
6551
|
*/
|
|
6352
|
-
declare const
|
|
6552
|
+
declare const BUNDLE_OWNERSHIP: Readonly<Record<string, BundleOwnership>>;
|
|
6353
6553
|
/**
|
|
6354
|
-
*
|
|
6355
|
-
*
|
|
6356
|
-
*
|
|
6357
|
-
*
|
|
6358
|
-
* `
|
|
6359
|
-
*
|
|
6554
|
+
* GitHub `type:*` labels (WITH the `type:` prefix) that come from the
|
|
6555
|
+
* **conventional-commit** vocabulary rather than the bundle/routing
|
|
6556
|
+
* vocabulary. These are derived from an issue's title prefix by the
|
|
6557
|
+
* generic create-issue workflow (`feat:` → `type:feat`, `docs:` →
|
|
6558
|
+
* `type:docs`, …) and are the only `type:*` labels the phase-label
|
|
6559
|
+
* invariant is allowed to remove when it corrects a mislabeled issue.
|
|
6360
6560
|
*
|
|
6361
|
-
*
|
|
6561
|
+
* A bundle `type:*` label (e.g. `type:research`, `type:bcm-document`)
|
|
6562
|
+
* is deliberately **not** in this set: an issue carrying a phase label
|
|
6563
|
+
* from one bundle plus a `type:*` label owned by a *different* bundle
|
|
6564
|
+
* is genuinely ambiguous and gets flagged for a human rather than
|
|
6565
|
+
* silently rewritten.
|
|
6362
6566
|
*/
|
|
6363
|
-
declare const
|
|
6567
|
+
declare const CONVENTIONAL_COMMIT_TYPE_LABELS: ReadonlyArray<string>;
|
|
6364
6568
|
/**
|
|
6365
|
-
*
|
|
6366
|
-
*
|
|
6367
|
-
*
|
|
6569
|
+
* Canonical phase-label matcher → `type:<bundle>` label map, derived
|
|
6570
|
+
* from {@link BUNDLE_OWNERSHIP}. This is the **single source of truth**
|
|
6571
|
+
* for the phase-label → type-label invariant: label registry
|
|
6572
|
+
* generation, the orchestrator's triage sweep, and the consumer-facing
|
|
6573
|
+
* label audit all read this map rather than re-deriving the pairing.
|
|
6574
|
+
*
|
|
6575
|
+
* Keys are matchers in the same notation `BundleOwnership.phaseLabelPrefixes`
|
|
6576
|
+
* uses — an entry ending in a colon (`"company:"`) is a prefix match,
|
|
6577
|
+
* an entry without one (`"req:write"`) is an exact match. Values carry
|
|
6578
|
+
* the `type:` prefix.
|
|
6579
|
+
*
|
|
6580
|
+
* Co-ownership is fine as long as the co-owners agree on the type
|
|
6581
|
+
* label: all three requirements bundles declare `type:requirement`, so
|
|
6582
|
+
* `req:`, `req:write`, `req:review`, and `req:deprecate` all resolve to
|
|
6583
|
+
* the same value. A matcher that resolved to two *different* type
|
|
6584
|
+
* labels would be a registry bug and throws at module load.
|
|
6368
6585
|
*/
|
|
6369
|
-
declare const
|
|
6586
|
+
declare const PHASE_LABEL_TYPE_MAP: Readonly<Record<string, string>>;
|
|
6370
6587
|
/**
|
|
6371
|
-
*
|
|
6372
|
-
*
|
|
6588
|
+
* Outcome of resolving a set of issue labels against
|
|
6589
|
+
* {@link PHASE_LABEL_TYPE_MAP}.
|
|
6590
|
+
*
|
|
6591
|
+
* - `"none"` — the labels carry no **recognised** phase label, so the
|
|
6592
|
+
* invariant does not apply. Unrecognised `foo:bar` labels are
|
|
6593
|
+
* consumer-specific and deliberately not policed.
|
|
6594
|
+
* - `"match"` — the recognised phase labels all imply one and the same
|
|
6595
|
+
* `type:<bundle>` label, carried in `typeLabel`.
|
|
6596
|
+
* - `"ambiguous"` — the recognised phase labels imply two or more
|
|
6597
|
+
* different `type:<bundle>` labels. Never auto-corrected; the caller
|
|
6598
|
+
* flags the issue for human triage instead.
|
|
6373
6599
|
*/
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
readonly
|
|
6379
|
-
|
|
6380
|
-
|
|
6600
|
+
type PhaseLabelTypeOutcome = "none" | "match" | "ambiguous";
|
|
6601
|
+
/** Result of {@link resolveTypeLabelForLabels}. */
|
|
6602
|
+
interface PhaseLabelTypeResolution {
|
|
6603
|
+
/** Which of the three outcomes applies. */
|
|
6604
|
+
readonly outcome: PhaseLabelTypeOutcome;
|
|
6605
|
+
/**
|
|
6606
|
+
* The single implied `type:<bundle>` label (with the `type:` prefix)
|
|
6607
|
+
* when `outcome` is `"match"`; `undefined` otherwise.
|
|
6608
|
+
*/
|
|
6609
|
+
readonly typeLabel?: string;
|
|
6610
|
+
/**
|
|
6611
|
+
* Every distinct implied `type:<bundle>` label, sorted. Empty on
|
|
6612
|
+
* `"none"`, one entry on `"match"`, two or more on `"ambiguous"`.
|
|
6613
|
+
*/
|
|
6614
|
+
readonly candidateTypeLabels: ReadonlyArray<string>;
|
|
6615
|
+
/**
|
|
6616
|
+
* The subset of the input labels that matched a phase-label matcher,
|
|
6617
|
+
* in input order. Empty on `"none"`.
|
|
6618
|
+
*/
|
|
6619
|
+
readonly phaseLabels: ReadonlyArray<string>;
|
|
6381
6620
|
}
|
|
6382
6621
|
/**
|
|
6383
|
-
* Resolve a
|
|
6384
|
-
* `
|
|
6385
|
-
* cascade from their documented defaults.
|
|
6622
|
+
* Resolve a single phase label to the `type:<bundle>` label its owning
|
|
6623
|
+
* bundle declares, or `undefined` when no bundle owns it.
|
|
6386
6624
|
*
|
|
6387
|
-
*
|
|
6388
|
-
* `
|
|
6389
|
-
*
|
|
6390
|
-
*
|
|
6625
|
+
* Exact-match entries beat prefix entries: `req:write` is owned by
|
|
6626
|
+
* `requirements-writer` while the `req:` prefix is owned by
|
|
6627
|
+
* `requirements-analyst`. (Both currently declare `type:requirement`,
|
|
6628
|
+
* but the precedence is load-bearing for any future divergence.)
|
|
6391
6629
|
*/
|
|
6392
|
-
declare function
|
|
6630
|
+
declare function typeLabelForPhaseLabel(phaseLabel: string): string | undefined;
|
|
6393
6631
|
/**
|
|
6394
|
-
*
|
|
6395
|
-
*
|
|
6396
|
-
* `AgentConfig.preSynthesize` before any rendering so a misconfigured
|
|
6397
|
-
* convention fails the build instead of silently shipping broken
|
|
6398
|
-
* resume semantics. Returns the resolved config unchanged so callers
|
|
6399
|
-
* can write `const pf = validateProgressFilesConfig(config)` in
|
|
6400
|
-
* one line.
|
|
6401
|
-
*
|
|
6402
|
-
* Malformed cases rejected here:
|
|
6632
|
+
* Resolve every label on an issue to the `type:<bundle>` label the
|
|
6633
|
+
* phase-label invariant requires it to carry.
|
|
6403
6634
|
*
|
|
6404
|
-
*
|
|
6405
|
-
*
|
|
6406
|
-
*
|
|
6407
|
-
*
|
|
6408
|
-
* - `staleAfterHours` non-integer, zero, or negative.
|
|
6635
|
+
* The input is the issue's **full** label list — the resolver picks out
|
|
6636
|
+
* the recognised phase labels itself and ignores everything else
|
|
6637
|
+
* (`status:*`, `priority:*`, existing `type:*`, and any consumer label
|
|
6638
|
+
* that matches no bundle).
|
|
6409
6639
|
*/
|
|
6410
|
-
declare function
|
|
6640
|
+
declare function resolveTypeLabelForLabels(labels: ReadonlyArray<string>): PhaseLabelTypeResolution;
|
|
6411
6641
|
/**
|
|
6412
|
-
*
|
|
6413
|
-
*
|
|
6414
|
-
*
|
|
6415
|
-
*
|
|
6642
|
+
* Render the **Phase-label → `type:<bundle>` invariant** section of the
|
|
6643
|
+
* `orchestrator-conventions` rule. The matcher table is generated from
|
|
6644
|
+
* {@link PHASE_LABEL_TYPE_MAP}, so the documented pairing can never
|
|
6645
|
+
* drift from the pairing the sweep enforces.
|
|
6416
6646
|
*
|
|
6417
|
-
*
|
|
6418
|
-
*
|
|
6419
|
-
*/
|
|
6420
|
-
declare function renderProgressFileName(pf: ResolvedProgressFiles, issueNumber: number | string): string;
|
|
6421
|
-
/**
|
|
6422
|
-
* Resolve the runtime path (directory + filename) for a progress file
|
|
6423
|
-
* given an issue number and a resolved config.
|
|
6647
|
+
* Rows whose owning bundle appears in `excludeBundles` are dropped,
|
|
6648
|
+
* matching every other cross-bundle renderer.
|
|
6424
6649
|
*/
|
|
6425
|
-
declare function
|
|
6650
|
+
declare function renderPhaseTypeInvariantSection(excludeBundles?: ReadonlyArray<string>): string;
|
|
6426
6651
|
/**
|
|
6427
|
-
* Render the
|
|
6428
|
-
*
|
|
6429
|
-
*
|
|
6430
|
-
*
|
|
6431
|
-
*
|
|
6432
|
-
* criteria replay).
|
|
6433
|
-
* - The stale-branch decision tree (clone-level recovery) that every
|
|
6434
|
-
* worker runs at session start.
|
|
6435
|
-
* - The `[BLOCKED]` structured comment format used when an agent
|
|
6436
|
-
* cannot proceed.
|
|
6652
|
+
* Render the POSIX-shell half of the phase-label → `type:<bundle>`
|
|
6653
|
+
* invariant, derived from the same {@link PHASE_LABEL_TYPE_MAP} the
|
|
6654
|
+
* TypeScript accessors read. Emitted into `check-blocked.sh` so the
|
|
6655
|
+
* orchestrator's triage sweep and the consumer-runnable label audit
|
|
6656
|
+
* never carry a hand-copied second map.
|
|
6437
6657
|
*
|
|
6438
|
-
*
|
|
6439
|
-
* tells agents the project does not enforce progress files and they
|
|
6440
|
-
* must pick up work from scratch on every session.
|
|
6441
|
-
*/
|
|
6442
|
-
declare function renderProgressFilesRuleContent(pf: ResolvedProgressFiles): string;
|
|
6443
|
-
/**
|
|
6444
|
-
* Render the short progress-file hook section injected into a
|
|
6445
|
-
* phased-agent bundle's workflow rule (bcm-writer, research-pipeline,
|
|
6446
|
-
* etc.). The section cites the full contract documented in the base
|
|
6447
|
-
* bundle's `progress-file-convention` rule so individual bundles stay
|
|
6448
|
-
* DRY.
|
|
6658
|
+
* Three functions are rendered:
|
|
6449
6659
|
*
|
|
6450
|
-
*
|
|
6451
|
-
*
|
|
6660
|
+
* - `phase_label_type_of <label>` — echoes the `type:<bundle>` label a
|
|
6661
|
+
* single phase label implies, or nothing. Exact-match branches are
|
|
6662
|
+
* emitted before prefix branches so `case` ordering reproduces the
|
|
6663
|
+
* exact-beats-prefix precedence.
|
|
6664
|
+
* - `phase_type_of` — reads an issue's labels (one per line) on stdin
|
|
6665
|
+
* and emits `KEY=VALUE` assignments: `OUTCOME=none|match|ambiguous`,
|
|
6666
|
+
* `TYPE_LABEL=` (match only), `CANDIDATE_TYPE_LABELS=` (ambiguous
|
|
6667
|
+
* only), and `PHASE_LABELS=`.
|
|
6668
|
+
* - `is_conventional_type_label <label>` — returns 0 for a
|
|
6669
|
+
* conventional-commit `type:*` label, i.e. the only labels the
|
|
6670
|
+
* auto-correction is allowed to remove.
|
|
6452
6671
|
*/
|
|
6453
|
-
declare function
|
|
6454
|
-
|
|
6455
|
-
/*******************************************************************************
|
|
6456
|
-
*
|
|
6457
|
-
* Bundle definition — opt-in. Consumers must include via `includeBundles`
|
|
6458
|
-
* (or it auto-detects through the appliesWhen below). No hardcoded
|
|
6459
|
-
* domain-specific content.
|
|
6460
|
-
*
|
|
6461
|
-
******************************************************************************/
|
|
6672
|
+
declare function renderPhaseTypeInvariantShellHelpers(): string;
|
|
6462
6673
|
/**
|
|
6463
|
-
*
|
|
6464
|
-
*
|
|
6465
|
-
*
|
|
6466
|
-
*
|
|
6467
|
-
* protocol prose, the skills, the sub-agent, and the labels are all
|
|
6468
|
-
* fixed across consumers. The one dynamic surface is the rendered
|
|
6469
|
-
* `pr-review-policy` rule's YAML block and precedence walk, which
|
|
6470
|
-
* reflect the resolved `pathsExemptFromSize` carve-out so consumers
|
|
6471
|
-
* tuning the doc-only carve-out see their override land in the
|
|
6472
|
-
* rendered CLAUDE.md.
|
|
6473
|
-
*
|
|
6474
|
-
* When `policy` is omitted, the bundle ships with the documented
|
|
6475
|
-
* defaults baked in (`pathsExemptFromSize: ["docs/**"]`).
|
|
6674
|
+
* Return `true` when `typeLabel` (without the leading `type:` prefix)
|
|
6675
|
+
* is owned by any bundle in `excludedBundles`. Used by tier-table and
|
|
6676
|
+
* scheduled-task renderers to drop rows whose owning bundle has been
|
|
6677
|
+
* excluded.
|
|
6476
6678
|
*/
|
|
6477
|
-
declare function
|
|
6679
|
+
declare function isTypeLabelOwnedByExcluded(typeLabel: string, excludedBundles: ReadonlyArray<string>): boolean;
|
|
6478
6680
|
/**
|
|
6479
|
-
* `
|
|
6480
|
-
*
|
|
6481
|
-
*
|
|
6482
|
-
*
|
|
6681
|
+
* Return `true` when `phaseLabel` is owned by any bundle in
|
|
6682
|
+
* `excludedBundles`. Matches against both prefix entries (with
|
|
6683
|
+
* trailing colon, e.g. `"company:"`) and exact-match entries (without
|
|
6684
|
+
* trailing colon, e.g. `"req:write"`). Used by the scope-gate
|
|
6685
|
+
* per-phase-override table renderer.
|
|
6483
6686
|
*/
|
|
6484
|
-
declare
|
|
6485
|
-
|
|
6687
|
+
declare function isPhaseLabelOwnedByExcluded(phaseLabel: string, excludedBundles: ReadonlyArray<string>): boolean;
|
|
6486
6688
|
/**
|
|
6487
|
-
*
|
|
6689
|
+
* Return `true` when the scheduled-task `taskId` is owned by any
|
|
6690
|
+
* bundle in `excludedBundles`. Used by the scheduled-tasks registry
|
|
6691
|
+
* filter to drop default entries pointing at an excluded bundle.
|
|
6488
6692
|
*/
|
|
6489
|
-
declare
|
|
6490
|
-
|
|
6693
|
+
declare function isScheduledTaskOwnedByExcluded(taskId: string, excludedBundles: ReadonlyArray<string>): boolean;
|
|
6491
6694
|
/**
|
|
6492
|
-
*
|
|
6493
|
-
*
|
|
6494
|
-
*
|
|
6495
|
-
*
|
|
6496
|
-
* returns `true` per the workflow-bundle peer-present assumption.
|
|
6497
|
-
*
|
|
6498
|
-
* Ships a sub-agent (`regulatory-research-analyst`), three
|
|
6499
|
-
* user-invocable skills (`/scan-regulatory-landscape`,
|
|
6500
|
-
* `/research-regulation`, `/impact-regulation`), a regulation-page
|
|
6501
|
-
* template (emitted alongside the research skill), and
|
|
6502
|
-
* `type:regulatory-research` plus `regulatory:*` phase labels.
|
|
6503
|
-
*
|
|
6504
|
-
* The bundle sits downstream of `research-pipeline`,
|
|
6505
|
-
* `industry-discovery`, and `standards-research` (which surface the
|
|
6506
|
-
* need for regulatory research) and hands off actionable obligations
|
|
6507
|
-
* to the `requirements-analyst` bundle via `req:scan` issues that
|
|
6508
|
-
* become SEC (security & compliance) requirements in the writer
|
|
6509
|
-
* pipeline, and canonical profiles to `company-profile` and
|
|
6510
|
-
* `people-profile` for enforcement bodies and regulatory leaders.
|
|
6695
|
+
* Return `true` when at least one docs-emitting bundle is **not**
|
|
6696
|
+
* excluded. Used by the `section-index-pages` rule auto-suppression
|
|
6697
|
+
* gate — when this returns `false`, the rule is dropped from the
|
|
6698
|
+
* rendered rule map entirely.
|
|
6511
6699
|
*/
|
|
6512
|
-
declare function
|
|
6700
|
+
declare function hasAnyDocsEmittingBundle(excludedBundles: ReadonlyArray<string>): boolean;
|
|
6513
6701
|
/**
|
|
6514
|
-
*
|
|
6515
|
-
*
|
|
6516
|
-
*
|
|
6517
|
-
*
|
|
6702
|
+
* Return `true` when at least one downstream-issue-kind bundle is
|
|
6703
|
+
* **not** excluded. Used by the `issue-templates-convention`
|
|
6704
|
+
* auto-suppression gate — when this returns `false`, the rule body
|
|
6705
|
+
* renders the disabled-stub variant.
|
|
6518
6706
|
*/
|
|
6519
|
-
declare
|
|
6707
|
+
declare function hasAnyDownstreamIssueKindBundle(excludedBundles: ReadonlyArray<string>): boolean;
|
|
6520
6708
|
|
|
6521
6709
|
/**
|
|
6522
|
-
*
|
|
6523
|
-
* base bundle's "Source Quality & Verification" rule.
|
|
6710
|
+
* Build the bcm-writer bundle with the supplied resolved paths.
|
|
6524
6711
|
*
|
|
6525
|
-
*
|
|
6526
|
-
*
|
|
6527
|
-
* the supplied
|
|
6528
|
-
*
|
|
6529
|
-
* is missing or empty are left untouched.
|
|
6712
|
+
* Every reference to a canonical agent path (bcm root, docs root, etc.)
|
|
6713
|
+
* inside the rule / skill / sub-agent content strings is an interpolation
|
|
6714
|
+
* of the supplied `paths` struct, so a consumer override of
|
|
6715
|
+
* `AgentConfigOptions.paths` propagates to the rendered output.
|
|
6530
6716
|
*
|
|
6531
|
-
*
|
|
6532
|
-
*
|
|
6533
|
-
*
|
|
6534
|
-
*/
|
|
6535
|
-
declare function renderSourceTierExamples(content: string, examples: SourceTierExamples | undefined): string;
|
|
6536
|
-
/**
|
|
6537
|
-
* Apply every {@link CustomDocSection} that targets `bundle.name` to
|
|
6538
|
-
* the bundle's rules, returning a new bundle whose matched rules have
|
|
6539
|
-
* the section bodies appended after the configured `afterSection`
|
|
6540
|
-
* heading. Entries that reference a bundle name other than
|
|
6541
|
-
* `bundle.name`, or whose `afterSection` cannot be located in any
|
|
6542
|
-
* rule in the bundle, are silently dropped.
|
|
6717
|
+
* Consuming projects can disable it with `excludeBundles: ["bcm-writer"]`.
|
|
6718
|
+
* `appliesWhen` always returns `true` per this batch's directive that
|
|
6719
|
+
* bundles assume peers are present.
|
|
6543
6720
|
*
|
|
6544
|
-
*
|
|
6545
|
-
*
|
|
6546
|
-
*
|
|
6547
|
-
*
|
|
6548
|
-
* just-injected section's `## <sectionTitle>` heading; the next
|
|
6549
|
-
* same-target entry then lands at the end of that newly-opened
|
|
6550
|
-
* section, which places it immediately after the previous entry
|
|
6551
|
-
* regardless of the original heading's level.
|
|
6721
|
+
* Ships a single consolidated sub-agent (`bcm-writer`) with all 4 phase
|
|
6722
|
+
* handlers in one prompt (outline, scaffold, context, connect), a
|
|
6723
|
+
* user-invocable skill (`/write-bcm`), and `type:bcm-document` plus
|
|
6724
|
+
* `bcm:*` phase labels.
|
|
6552
6725
|
*
|
|
6553
|
-
*
|
|
6554
|
-
*
|
|
6555
|
-
*
|
|
6556
|
-
|
|
6557
|
-
declare function renderCustomDocSections(bundle: AgentRuleBundle, sections: ReadonlyArray<CustomDocSection>): AgentRuleBundle;
|
|
6558
|
-
/**
|
|
6559
|
-
* Render a {@link CustomDocSection} into the markdown block that
|
|
6560
|
-
* `renderCustomDocSections` splices after the target heading block.
|
|
6561
|
-
* Exposed for tests that exercise the renderer directly without
|
|
6562
|
-
* touching a full bundle.
|
|
6726
|
+
* The bundle assumes the `people-profile`, `company-profile`, and
|
|
6727
|
+
* `research-pipeline` bundles are also enabled so Phase 4 can hand off
|
|
6728
|
+
* surfaced items via `people:research`, `company:research`, and
|
|
6729
|
+
* `research:scope` issues.
|
|
6563
6730
|
*/
|
|
6564
|
-
declare function
|
|
6565
|
-
|
|
6731
|
+
declare function buildBcmWriterBundle(paths?: ResolvedAgentPaths, issueDefaults?: ResolvedIssueDefaults): AgentRuleBundle;
|
|
6566
6732
|
/**
|
|
6567
|
-
*
|
|
6568
|
-
*
|
|
6569
|
-
*
|
|
6570
|
-
*
|
|
6571
|
-
*
|
|
6572
|
-
* The section documents three things for agents:
|
|
6573
|
-
*
|
|
6574
|
-
* 1. How to read `focus.json` at triage time
|
|
6575
|
-
* 2. How focus weight interacts with the `priority:*` taxonomy
|
|
6576
|
-
* 3. The agent-driven expansion contract (what agents may append)
|
|
6577
|
-
*
|
|
6578
|
-
* Configulator ships this rule content plus a JSON Schema that
|
|
6579
|
-
* validates the `focus.json` file; the file itself is authored and
|
|
6580
|
-
* curated in the consuming repo.
|
|
6733
|
+
* Default-paths instance of the bcm-writer bundle, preserved for
|
|
6734
|
+
* backward compatibility with consumers that import the const directly.
|
|
6735
|
+
* The factory above is the canonical entry point when a consumer
|
|
6736
|
+
* supplies `AgentConfigOptions.paths`.
|
|
6581
6737
|
*/
|
|
6582
|
-
declare
|
|
6738
|
+
declare const bcmWriterBundle: AgentRuleBundle;
|
|
6583
6739
|
|
|
6584
6740
|
/**
|
|
6585
|
-
*
|
|
6586
|
-
* `meeting-processing-workflow` rule when `AgentConfigOptions.meetings`
|
|
6587
|
-
* is supplied. Returns an empty string when the supplied config has
|
|
6588
|
-
* nothing to render (no meeting types and no meeting areas) so callers
|
|
6589
|
-
* can unconditionally concatenate the result.
|
|
6590
|
-
*
|
|
6591
|
-
* Two subsections are rendered, each gated on its own input array:
|
|
6741
|
+
* Build the business-models bundle with the supplied resolved paths.
|
|
6592
6742
|
*
|
|
6593
|
-
*
|
|
6594
|
-
*
|
|
6595
|
-
*
|
|
6596
|
-
*
|
|
6597
|
-
* 2. **Area → doc-root mapping** — rendered when `meetingAreas` is
|
|
6598
|
-
* non-empty. Lists every declared area with its `id`, label, and
|
|
6599
|
-
* docs-root-relative destination folder.
|
|
6743
|
+
* Every reference to a canonical agent path (docs root, research root,
|
|
6744
|
+
* etc.) inside the rule / skill / sub-agent content strings is an
|
|
6745
|
+
* interpolation of the supplied `paths` struct, so a consumer override
|
|
6746
|
+
* of `AgentConfigOptions.paths` propagates to the rendered output.
|
|
6600
6747
|
*
|
|
6601
|
-
*
|
|
6602
|
-
*
|
|
6603
|
-
*
|
|
6748
|
+
* The bundle sits between `industry-discovery` (upstream, selects
|
|
6749
|
+
* verticals) and `bcm-writer` (downstream, models capabilities). It
|
|
6750
|
+
* assumes `bcm-writer` is enabled so Phase 3 can hand off surfaced
|
|
6751
|
+
* capabilities via `bcm:outline` issues, and it is read by
|
|
6752
|
+
* `company-profile` via the shared `<BUSINESS_MODELS_ROOT>` default
|
|
6753
|
+
* path (`<docsRoot>/industry-research/`).
|
|
6604
6754
|
*/
|
|
6605
|
-
declare function
|
|
6606
|
-
|
|
6755
|
+
declare function buildBusinessModelsBundle(paths?: ResolvedAgentPaths, issueDefaults?: ResolvedIssueDefaults): AgentRuleBundle;
|
|
6607
6756
|
/**
|
|
6608
|
-
*
|
|
6609
|
-
*
|
|
6610
|
-
*
|
|
6611
|
-
*
|
|
6612
|
-
*
|
|
6613
|
-
* Precedence is **first match wins** — rules render in the order
|
|
6614
|
-
* supplied. The bundle's default inference heuristics act as the
|
|
6615
|
-
* fallback when no rule matches.
|
|
6757
|
+
* Default-paths instance of the business-models bundle, preserved for
|
|
6758
|
+
* backward compatibility with consumers that import the const
|
|
6759
|
+
* directly. The factory above is the canonical entry point when a
|
|
6760
|
+
* consumer supplies `AgentConfigOptions.paths`.
|
|
6616
6761
|
*/
|
|
6617
|
-
declare
|
|
6762
|
+
declare const businessModelsBundle: AgentRuleBundle;
|
|
6618
6763
|
|
|
6619
6764
|
/**
|
|
6620
|
-
*
|
|
6621
|
-
* config is supplied, the convention ships **enabled** so every agent
|
|
6622
|
-
* that edits an index file follows the single-entry / verify /
|
|
6623
|
-
* re-sort protocol.
|
|
6765
|
+
* Build the company-profile bundle with the supplied resolved paths.
|
|
6624
6766
|
*
|
|
6625
|
-
*
|
|
6767
|
+
* Every reference to a canonical agent path (docs root, etc.) inside
|
|
6768
|
+
* the rule / skill / sub-agent content strings is an interpolation of
|
|
6769
|
+
* the supplied `paths` struct, so a consumer override of
|
|
6770
|
+
* `AgentConfigOptions.paths` propagates to the rendered output.
|
|
6771
|
+
*
|
|
6772
|
+
* Ships a sub-agent (`company-profile-analyst`), four user-invocable
|
|
6773
|
+
* skills (`/profile-company`, `/match-company`, `/refresh-company`,
|
|
6774
|
+
* `/analyze-segment`), and `type:company-profile` plus `company:*`
|
|
6775
|
+
* phase labels for the six phases.
|
|
6626
6776
|
*/
|
|
6627
|
-
declare
|
|
6777
|
+
declare function buildCompanyProfileBundle(paths?: ResolvedAgentPaths, issueDefaults?: ResolvedIssueDefaults, tier?: AgentModel): AgentRuleBundle;
|
|
6628
6778
|
/**
|
|
6629
|
-
* Default
|
|
6630
|
-
*
|
|
6631
|
-
*
|
|
6632
|
-
*
|
|
6779
|
+
* Default-paths instance of the company-profile bundle, preserved for
|
|
6780
|
+
* backward compatibility with consumers that import the const
|
|
6781
|
+
* directly. The factory above is the canonical entry point when a
|
|
6782
|
+
* consumer supplies `AgentConfigOptions.paths`.
|
|
6783
|
+
*/
|
|
6784
|
+
declare const companyProfileBundle: AgentRuleBundle;
|
|
6785
|
+
|
|
6786
|
+
/**
|
|
6787
|
+
* Customer-profile bundle — enabled by default.
|
|
6633
6788
|
*
|
|
6634
|
-
*
|
|
6635
|
-
*
|
|
6789
|
+
* Consuming projects can disable it with
|
|
6790
|
+
* `excludeBundles: ["customer-profile"]`. `appliesWhen` always
|
|
6791
|
+
* returns `true` per the workflow-bundle peer-present assumption.
|
|
6636
6792
|
*
|
|
6637
|
-
*
|
|
6638
|
-
*
|
|
6639
|
-
* -
|
|
6640
|
-
*
|
|
6641
|
-
*
|
|
6793
|
+
* Ships a sub-agent (`customer-profile-analyst`), three
|
|
6794
|
+
* user-invocable skills (`/discover-customers`, `/profile-customer`,
|
|
6795
|
+
* `/analyze-customer-competitors`), a customer-profile-page template
|
|
6796
|
+
* (emitted alongside the profile skill), and `type:customer-profile`
|
|
6797
|
+
* plus `customer:*` phase labels.
|
|
6642
6798
|
*
|
|
6643
|
-
*
|
|
6644
|
-
*
|
|
6799
|
+
* The bundle sits downstream of `meeting-analysis`,
|
|
6800
|
+
* `industry-discovery`, and `research-pipeline` (which surface the
|
|
6801
|
+
* need for customer-archetype research) and hands off unmet needs to
|
|
6802
|
+
* the `requirements-analyst` bundle via `req:scan` issues, and
|
|
6803
|
+
* canonical profiles to `company-profile` and `people-profile` for
|
|
6804
|
+
* representative customer organizations, competitor organizations,
|
|
6805
|
+
* and notable contacts.
|
|
6645
6806
|
*
|
|
6646
|
-
*
|
|
6807
|
+
* Distinct from `company-profile`: the `company-profile` bundle
|
|
6808
|
+
* targets any company entity (competitor, vendor, partner, customer
|
|
6809
|
+
* organization); this bundle targets **customer archetypes** (the
|
|
6810
|
+
* reusable shape of a buyer/user segment) and closes the loop from
|
|
6811
|
+
* unmet need to `req:scan` seed via the shared software-profile
|
|
6812
|
+
* feature matrix.
|
|
6647
6813
|
*/
|
|
6648
|
-
declare
|
|
6814
|
+
declare function buildCustomerProfileBundle(paths?: ResolvedAgentPaths, issueDefaults?: ResolvedIssueDefaults, tier?: AgentModel): AgentRuleBundle;
|
|
6649
6815
|
/**
|
|
6650
|
-
* Default
|
|
6651
|
-
*
|
|
6652
|
-
*
|
|
6653
|
-
*
|
|
6654
|
-
* merge-commit-only history.
|
|
6655
|
-
*
|
|
6656
|
-
* @see SharedEditingConfig
|
|
6816
|
+
* Default-paths instance of the customer-profile bundle, preserved
|
|
6817
|
+
* for backward compatibility with consumers that import the const
|
|
6818
|
+
* directly. The factory above is the canonical entry point when a
|
|
6819
|
+
* consumer supplies `AgentConfigOptions.paths`.
|
|
6657
6820
|
*/
|
|
6658
|
-
declare const
|
|
6821
|
+
declare const customerProfileBundle: AgentRuleBundle;
|
|
6822
|
+
|
|
6659
6823
|
/**
|
|
6660
|
-
*
|
|
6661
|
-
*
|
|
6662
|
-
*
|
|
6663
|
-
*
|
|
6664
|
-
* reference promotes — so it ships **on** by default.
|
|
6824
|
+
* Render the shell body of the `.claude/procedures/extract-api.sh`
|
|
6825
|
+
* helper. Exported so the docs-sync bundle can register it as an
|
|
6826
|
+
* `AgentProcedure` and the bundles test suite can assert on the
|
|
6827
|
+
* script's contents.
|
|
6665
6828
|
*
|
|
6666
|
-
*
|
|
6667
|
-
|
|
6668
|
-
|
|
6669
|
-
|
|
6670
|
-
*
|
|
6671
|
-
*
|
|
6672
|
-
* is opt-in because many consumers prefer to do the verification
|
|
6673
|
-
* inline via the documented `git show HEAD:<path>` recipe rather than
|
|
6674
|
-
* shell out to a dedicated script. Consumers that want the script
|
|
6675
|
-
* available to sub-agents enable the emission explicitly.
|
|
6829
|
+
* The helper runs `@microsoft/api-extractor` end-to-end for a single
|
|
6830
|
+
* package and writes the `.api.md` rollup to the scratch folder
|
|
6831
|
+
* declared by that package's `api-extractor.json`. Rollups are
|
|
6832
|
+
* **regenerate-on-scan** per the docs-sync epic resolved decision #3
|
|
6833
|
+
* — the scan phase consumes the freshly-regenerated rollup in-memory
|
|
6834
|
+
* rather than comparing against a committed baseline.
|
|
6676
6835
|
*
|
|
6677
|
-
*
|
|
6836
|
+
* Exit codes: `0` success, `1` usage / missing directory, `2` no
|
|
6837
|
+
* `api-extractor.json` at the target path, `3` the extractor exited
|
|
6838
|
+
* non-zero (compile error or extractor failure).
|
|
6678
6839
|
*/
|
|
6679
|
-
declare
|
|
6840
|
+
declare function renderExtractApiProcedure(): string;
|
|
6680
6841
|
/**
|
|
6681
|
-
*
|
|
6682
|
-
* so
|
|
6683
|
-
*
|
|
6842
|
+
* `AgentProcedure` definition for `.claude/procedures/extract-api.sh`.
|
|
6843
|
+
* Registered on the docs-sync bundle so it ships when the bundle is
|
|
6844
|
+
* force-included — matches the packaging of other bundled procedures
|
|
6845
|
+
* (see `orchestratorBundle.procedures`).
|
|
6684
6846
|
*/
|
|
6685
|
-
declare const
|
|
6847
|
+
declare const extractApiProcedure: AgentProcedure;
|
|
6686
6848
|
/**
|
|
6687
|
-
*
|
|
6688
|
-
*
|
|
6849
|
+
* Render the shell body of the `.claude/procedures/check-links.sh`
|
|
6850
|
+
* helper. Exported so the docs-sync bundle can register it as an
|
|
6851
|
+
* `AgentProcedure` and the bundles test suite can assert on the
|
|
6852
|
+
* script's contents.
|
|
6853
|
+
*
|
|
6854
|
+
* The helper wraps two external tools — `astro check` (internal
|
|
6855
|
+
* links) and `lychee` (external `https://…` URLs) — and normalizes
|
|
6856
|
+
* their per-finding output into a single JSON-array stream of
|
|
6857
|
+
* `{ url, docPath, line, kind, reason }` records on stdout. The
|
|
6858
|
+
* downstream docs-sync scan phase (#519/#520) consumes that stream
|
|
6859
|
+
* and decides which findings are advisory and which block the PR.
|
|
6860
|
+
*
|
|
6861
|
+
* Detection is **data**, not failure: the helper exits `0` whenever
|
|
6862
|
+
* a tool ran successfully, regardless of how many broken links it
|
|
6863
|
+
* reported. Non-zero exits are reserved for tool-level failures
|
|
6864
|
+
* (missing binary, config error, IO failure).
|
|
6865
|
+
*
|
|
6866
|
+
* Exit codes: `0` success, `1` usage error or unreadable docs
|
|
6867
|
+
* root, `2` a required external tool is missing, `3` a tool ran
|
|
6868
|
+
* but exited non-zero for a reason other than broken-link
|
|
6869
|
+
* detection.
|
|
6689
6870
|
*/
|
|
6690
|
-
|
|
6691
|
-
readonly enabled: boolean;
|
|
6692
|
-
readonly sharedIndexPaths: ReadonlyArray<string>;
|
|
6693
|
-
readonly verifyCommit: boolean;
|
|
6694
|
-
readonly conflictStrategy: "rebase" | "merge";
|
|
6695
|
-
readonly emitHelper: boolean;
|
|
6696
|
-
}
|
|
6871
|
+
declare function renderCheckLinksProcedure(): string;
|
|
6697
6872
|
/**
|
|
6698
|
-
*
|
|
6699
|
-
*
|
|
6700
|
-
*
|
|
6701
|
-
*
|
|
6702
|
-
*
|
|
6703
|
-
*
|
|
6873
|
+
* `AgentProcedure` definition for `.claude/procedures/check-links.sh`.
|
|
6874
|
+
* Registered on the docs-sync bundle so it ships when the bundle is
|
|
6875
|
+
* force-included — matches the packaging of `extractApiProcedure`
|
|
6876
|
+
* above. Provides the link-integrity input the docs-sync scan phase
|
|
6877
|
+
* (#519/#520) consumes alongside API-extractor and TSDoc-coverage
|
|
6878
|
+
* findings.
|
|
6704
6879
|
*/
|
|
6705
|
-
declare
|
|
6880
|
+
declare const checkLinksProcedure: AgentProcedure;
|
|
6706
6881
|
/**
|
|
6707
|
-
*
|
|
6708
|
-
*
|
|
6709
|
-
*
|
|
6710
|
-
*
|
|
6711
|
-
* shared-editing guidance. Returns the resolved config unchanged so
|
|
6712
|
-
* callers can write `const se = validateSharedEditingConfig(config)`
|
|
6713
|
-
* in one line.
|
|
6882
|
+
* Render the shell body of the
|
|
6883
|
+
* `.claude/procedures/strip-tool-artifact-tags.sh` helper. Exported so
|
|
6884
|
+
* the docs-sync bundle can register it as an `AgentProcedure` and the
|
|
6885
|
+
* bundles test suite can assert on the script's contents.
|
|
6714
6886
|
*
|
|
6715
|
-
*
|
|
6887
|
+
* Authoring agents intermittently leak tool-call wrapper *closing*
|
|
6888
|
+
* tags (`</content>`, `</invoke>`, occasionally `</parameter>`) as
|
|
6889
|
+
* trailing whole lines in the markdown they write. `astro check` and
|
|
6890
|
+
* CI link checks do not catch them. This helper strips those leaked
|
|
6891
|
+
* EOF artifact lines on write so they never reach the committed tree.
|
|
6716
6892
|
*
|
|
6717
|
-
*
|
|
6718
|
-
*
|
|
6719
|
-
*
|
|
6893
|
+
* Behaviour, mirroring `check-links.sh`'s defensive guards:
|
|
6894
|
+
*
|
|
6895
|
+
* - Takes a single file-path argument.
|
|
6896
|
+
* - Operates only when the file exists and its path is under
|
|
6897
|
+
* `docs/src/content/docs/`. Any other path (or a missing file) is
|
|
6898
|
+
* a silent no-op.
|
|
6899
|
+
* - Removes **trailing whole lines** that are exactly `</content>`,
|
|
6900
|
+
* `</invoke>`, or `</parameter>` (trailing whitespace on the line
|
|
6901
|
+
* is tolerated), plus any blank lines that become trailing once
|
|
6902
|
+
* the tags are removed, then leaves a single final newline.
|
|
6903
|
+
* - Only whole-line EOF tags are stripped — legitimate inline
|
|
6904
|
+
* `<...>` prose or fenced code is never touched.
|
|
6905
|
+
* - Idempotent: a second run on an already-clean file changes
|
|
6906
|
+
* nothing.
|
|
6907
|
+
* - Never edits a file it did not need to change, and **always**
|
|
6908
|
+
* exits 0 so a PostToolUse hook can never fail the tool call.
|
|
6909
|
+
*
|
|
6910
|
+
* Exit code: always `0`. Diagnostics (if any) flow to stderr.
|
|
6911
|
+
*/
|
|
6912
|
+
declare function renderStripToolArtifactTagsProcedure(): string;
|
|
6913
|
+
/**
|
|
6914
|
+
* `AgentProcedure` definition for
|
|
6915
|
+
* `.claude/procedures/strip-tool-artifact-tags.sh`. Registered on the
|
|
6916
|
+
* docs-sync bundle so it ships alongside `check-links.sh` when the
|
|
6917
|
+
* bundle is force-included, and chained into the base PostToolUse
|
|
6918
|
+
* Edit|Write hook so authored markdown is cleaned of leaked tool-call
|
|
6919
|
+
* artifact tags on write (#779).
|
|
6720
6920
|
*/
|
|
6721
|
-
declare
|
|
6921
|
+
declare const stripToolArtifactTagsProcedure: AgentProcedure;
|
|
6722
6922
|
/**
|
|
6723
|
-
* Render the
|
|
6724
|
-
*
|
|
6923
|
+
* Render the shell body of the
|
|
6924
|
+
* `.claude/procedures/check-doc-samples.sh` helper. Exported so the
|
|
6925
|
+
* docs-sync bundle can register it as an `AgentProcedure` and the
|
|
6926
|
+
* bundles test suite can assert on the script's contents.
|
|
6725
6927
|
*
|
|
6726
|
-
*
|
|
6727
|
-
*
|
|
6728
|
-
*
|
|
6729
|
-
*
|
|
6730
|
-
*
|
|
6928
|
+
* The helper wraps the `compileFencedSamples` API exported from
|
|
6929
|
+
* `@codedrifters/configulator` (under `src/docs-sync/sample-compilation/`)
|
|
6930
|
+
* and emits a single JSON-array stream of failure records on stdout.
|
|
6931
|
+
* Detection is **data**, not failure: the helper exits `0` when the
|
|
6932
|
+
* compilation phase ran successfully, regardless of how many samples
|
|
6933
|
+
* failed to compile. Non-zero exits are reserved for tool-level
|
|
6934
|
+
* failures (missing binary, IO error, internal exception).
|
|
6731
6935
|
*
|
|
6732
|
-
*
|
|
6733
|
-
*
|
|
6734
|
-
*
|
|
6735
|
-
* resolution.
|
|
6936
|
+
* Exit codes: `0` success, `1` usage error or unreadable docs root,
|
|
6937
|
+
* `2` a required binary is missing (`node` / `pnpm`), `3` the
|
|
6938
|
+
* compilation phase threw an unhandled exception.
|
|
6736
6939
|
*/
|
|
6737
|
-
declare function
|
|
6940
|
+
declare function renderCheckDocSamplesProcedure(): string;
|
|
6738
6941
|
/**
|
|
6739
|
-
*
|
|
6740
|
-
*
|
|
6741
|
-
*
|
|
6742
|
-
*
|
|
6743
|
-
* `
|
|
6744
|
-
*
|
|
6745
|
-
*
|
|
6746
|
-
*
|
|
6942
|
+
* `AgentProcedure` definition for
|
|
6943
|
+
* `.claude/procedures/check-doc-samples.sh`. Registered on the
|
|
6944
|
+
* docs-sync bundle so it ships when the bundle is force-included —
|
|
6945
|
+
* matches the packaging of `extractApiProcedure` and
|
|
6946
|
+
* `checkLinksProcedure` above. Provides the fenced-sample
|
|
6947
|
+
* compilation input the docs-sync scan phase (#520) consumes
|
|
6948
|
+
* alongside link integrity, API-extractor, TSDoc-coverage, and
|
|
6949
|
+
* doc-reference findings. Per the parent epic, fenced TS samples
|
|
6950
|
+
* that fail to compile are one of the two hard-block cases.
|
|
6747
6951
|
*/
|
|
6748
|
-
declare
|
|
6952
|
+
declare const checkDocSamplesProcedure: AgentProcedure;
|
|
6749
6953
|
/**
|
|
6750
|
-
*
|
|
6751
|
-
* Exported so `AgentConfig` can register it as an `AgentProcedure`
|
|
6752
|
-
* when the consumer opts in via `emitHelper: true`.
|
|
6753
|
-
*
|
|
6754
|
-
* The script takes two positional arguments:
|
|
6755
|
-
*
|
|
6756
|
-
* 1. `<index-path>` — repo-relative path to the shared index file.
|
|
6757
|
-
* 2. `<row-unique-marker>` — substring unique to the new row.
|
|
6954
|
+
* Docs-sync bundle — scaffolding release.
|
|
6758
6955
|
*
|
|
6759
|
-
*
|
|
6956
|
+
* Opt-in via `includeBundles: ["docs-sync"]`. `appliesWhen` returns
|
|
6957
|
+
* `false` by default so the scaffold ships disabled until a
|
|
6958
|
+
* downstream child issue enables it across the monorepo.
|
|
6760
6959
|
*
|
|
6761
|
-
* -
|
|
6762
|
-
*
|
|
6763
|
-
*
|
|
6764
|
-
*
|
|
6960
|
+
* Provides the skeleton of a 2-phase drift-detection + audit pipeline
|
|
6961
|
+
* (scan → fix) designed for monorepos that keep documentation inside
|
|
6962
|
+
* a Starlight singleton. Ships a sub-agent, two user-invocable skills
|
|
6963
|
+
* (`/docs-sync-pr`, `/docs-sync-audit`), five new labels
|
|
6964
|
+
* (`type:docs-sync`, `docs-sync:scan`, `docs-sync:fix`,
|
|
6965
|
+
* `docs-sync:advisory`, `docs-sync:blocking`), and a
|
|
6966
|
+
* `Documentation Sync Workflow` rule rendered into CLAUDE.md so
|
|
6967
|
+
* humans reading the file see the pipeline exists even while the
|
|
6968
|
+
* behavior is still landing across child issues.
|
|
6765
6969
|
*/
|
|
6766
|
-
declare function
|
|
6970
|
+
declare function buildDocsSyncBundle(paths?: ResolvedAgentPaths): AgentRuleBundle;
|
|
6971
|
+
/**
|
|
6972
|
+
* Default-paths instance of the docs-sync bundle, preserved for
|
|
6973
|
+
* parity with other path-aware bundles in this directory. The factory
|
|
6974
|
+
* above is the canonical entry point when a consumer supplies
|
|
6975
|
+
* `AgentConfigOptions.paths`.
|
|
6976
|
+
*/
|
|
6977
|
+
declare const docsSyncBundle: AgentRuleBundle;
|
|
6767
6978
|
|
|
6768
6979
|
/**
|
|
6769
|
-
*
|
|
6770
|
-
*
|
|
6771
|
-
* that ships an `evals/evals.json` file has a documented schema,
|
|
6772
|
-
* runner entry-point, and product-context injection contract.
|
|
6980
|
+
* Builds the GitHub workflow bundle — auto-detected when the project
|
|
6981
|
+
* has a GitHub component.
|
|
6773
6982
|
*
|
|
6774
|
-
*
|
|
6983
|
+
* The `build` policy conditions the PR-workflow build guidance on the
|
|
6984
|
+
* consuming project's Turborepo remote-cache configuration. When
|
|
6985
|
+
* omitted, the bundle ships the zero-remote-cache defaults
|
|
6986
|
+
* ({@link DEFAULT_BUILD_POLICY}), which emit no AWS-authentication
|
|
6987
|
+
* guidance at all.
|
|
6775
6988
|
*/
|
|
6776
|
-
declare
|
|
6989
|
+
declare function buildGithubWorkflowBundle(buildPolicy?: ResolvedBuildPolicy): AgentRuleBundle;
|
|
6777
6990
|
/**
|
|
6778
|
-
*
|
|
6779
|
-
*
|
|
6780
|
-
*
|
|
6781
|
-
*
|
|
6782
|
-
*
|
|
6783
|
-
*
|
|
6784
|
-
* Defaults to `.claude/skills`, which matches the location every
|
|
6785
|
-
* configulator-managed project ships skills to on disk.
|
|
6786
|
-
*
|
|
6787
|
-
* @see SkillEvalsConfig
|
|
6991
|
+
* `github-workflow` bundle built with the default (no remote cache)
|
|
6992
|
+
* build policy. Preserved for backward compatibility with tests and
|
|
6993
|
+
* consumers that import the const directly. Prefer
|
|
6994
|
+
* `buildGithubWorkflowBundle(buildPolicy)` when the consuming
|
|
6995
|
+
* project's Turborepo configuration is in scope.
|
|
6788
6996
|
*/
|
|
6789
|
-
declare const
|
|
6997
|
+
declare const githubWorkflowBundle: AgentRuleBundle;
|
|
6998
|
+
|
|
6790
6999
|
/**
|
|
6791
|
-
*
|
|
6792
|
-
* suite. Configulator ships with a `docs/src/content/docs/project-context.md`
|
|
6793
|
-
* file that every agent already loads at session start; the eval harness
|
|
6794
|
-
* re-uses that file so eval prompts are parameterised by the consuming
|
|
6795
|
-
* project's domain vocabulary, in-scope capabilities, and stakeholders
|
|
6796
|
-
* without the evals needing per-project forks.
|
|
7000
|
+
* Build the industry-discovery bundle with the supplied resolved paths.
|
|
6797
7001
|
*
|
|
6798
|
-
*
|
|
7002
|
+
* Every reference to a canonical agent path (docs root, etc.) inside
|
|
7003
|
+
* the rule / skill / sub-agent content strings is an interpolation of
|
|
7004
|
+
* the supplied `paths` struct, so a consumer override of
|
|
7005
|
+
* `AgentConfigOptions.paths` propagates to the rendered output.
|
|
6799
7006
|
*/
|
|
6800
|
-
declare
|
|
7007
|
+
declare function buildIndustryDiscoveryBundle(paths?: ResolvedAgentPaths, issueDefaults?: ResolvedIssueDefaults): AgentRuleBundle;
|
|
6801
7008
|
/**
|
|
6802
|
-
* Default
|
|
6803
|
-
*
|
|
6804
|
-
*
|
|
6805
|
-
*
|
|
6806
|
-
* because an eval that silently runs without its product-context
|
|
6807
|
-
* fixture is a false-positive waiting to happen.
|
|
6808
|
-
*
|
|
6809
|
-
* `false` — the runner emits a warning to stderr but still runs the
|
|
6810
|
-
* suite. Useful for bootstrapping a new consuming repo that has not
|
|
6811
|
-
* yet authored its `project-context.md`.
|
|
6812
|
-
*
|
|
6813
|
-
* @see SkillEvalsConfig
|
|
7009
|
+
* Default-paths instance of the industry-discovery bundle, preserved
|
|
7010
|
+
* for backward compatibility with consumers that import the const
|
|
7011
|
+
* directly. The factory above is the canonical entry point when a
|
|
7012
|
+
* consumer supplies `AgentConfigOptions.paths`.
|
|
6814
7013
|
*/
|
|
6815
|
-
declare const
|
|
7014
|
+
declare const industryDiscoveryBundle: AgentRuleBundle;
|
|
7015
|
+
|
|
6816
7016
|
/**
|
|
6817
|
-
*
|
|
6818
|
-
|
|
6819
|
-
|
|
6820
|
-
|
|
6821
|
-
|
|
7017
|
+
* Jest bundle — auto-detected when Jest is in dependencies.
|
|
7018
|
+
*/
|
|
7019
|
+
declare const jestBundle: AgentRuleBundle;
|
|
7020
|
+
|
|
7021
|
+
/**
|
|
7022
|
+
* Maintenance-audit bundle — enabled by default.
|
|
6822
7023
|
*
|
|
6823
|
-
*
|
|
7024
|
+
* Consuming projects can disable it with
|
|
7025
|
+
* `excludeBundles: ["maintenance-audit"]`. `appliesWhen` always returns
|
|
7026
|
+
* `true` per this batch's directive that bundles assume peers are
|
|
7027
|
+
* present.
|
|
7028
|
+
*
|
|
7029
|
+
* Provides a 3-phase documentation-maintenance pipeline
|
|
7030
|
+
* (scan → fix → verify) designed for any project with structured doc
|
|
7031
|
+
* registries and cross-references. Ships a sub-agent, two user-
|
|
7032
|
+
* invocable skills (`/audit-docs`, `/verify-audit`), and `maint:*`
|
|
7033
|
+
* phase labels via the bundle `labels` mechanism so consuming projects
|
|
7034
|
+
* automatically pick up the label taxonomy through the sync-labels
|
|
7035
|
+
* workflow.
|
|
6824
7036
|
*/
|
|
6825
|
-
declare
|
|
7037
|
+
declare function buildMaintenanceAuditBundle(paths?: ResolvedAgentPaths, issueDefaults?: ResolvedIssueDefaults, tier?: AgentModel): AgentRuleBundle;
|
|
6826
7038
|
/**
|
|
6827
|
-
*
|
|
6828
|
-
*
|
|
7039
|
+
* Default-paths instance of the maintenance-audit bundle, preserved
|
|
7040
|
+
* for backward compatibility with consumers that import the const
|
|
7041
|
+
* directly. The factory above is the canonical entry point when a
|
|
7042
|
+
* consumer supplies `AgentConfigOptions.paths`.
|
|
6829
7043
|
*/
|
|
6830
|
-
|
|
6831
|
-
|
|
6832
|
-
readonly skillsRoot: string;
|
|
6833
|
-
readonly productContextPath: string;
|
|
6834
|
-
readonly requireProductContext: boolean;
|
|
6835
|
-
readonly emitRunner: boolean;
|
|
6836
|
-
}
|
|
7044
|
+
declare const maintenanceAuditBundle: AgentRuleBundle;
|
|
7045
|
+
|
|
6837
7046
|
/**
|
|
6838
|
-
*
|
|
6839
|
-
*
|
|
6840
|
-
*
|
|
6841
|
-
*
|
|
6842
|
-
* Malformed configs — empty / whitespace-only or absolute `skillsRoot`,
|
|
6843
|
-
* empty / whitespace-only or absolute `productContextPath` — throw a
|
|
6844
|
-
* descriptive `Error`.
|
|
7047
|
+
* Build the meeting-analysis bundle with the supplied default sub-agent
|
|
7048
|
+
* model tier. The tier knob lets consumers globally demote the
|
|
7049
|
+
* `meeting-analyst` sub-agent to BALANCED (sonnet) — which is the
|
|
7050
|
+
* post-2026-05-08 default — without forking the bundle.
|
|
6845
7051
|
*/
|
|
6846
|
-
declare function
|
|
7052
|
+
declare function buildMeetingAnalysisBundle(tier?: AgentModel): AgentRuleBundle;
|
|
6847
7053
|
/**
|
|
6848
|
-
*
|
|
6849
|
-
*
|
|
6850
|
-
*
|
|
6851
|
-
*
|
|
6852
|
-
* eval harness. Returns the resolved config unchanged so callers can
|
|
6853
|
-
* write `const se = validateSkillEvalsConfig(config)` in one line.
|
|
6854
|
-
*
|
|
6855
|
-
* Malformed cases rejected here:
|
|
6856
|
-
*
|
|
6857
|
-
* - `skillsRoot` empty, whitespace-only, or absolute.
|
|
6858
|
-
* - `productContextPath` empty, whitespace-only, or absolute.
|
|
7054
|
+
* Default-tier instance of the meeting-analysis bundle, preserved for
|
|
7055
|
+
* backward compatibility with consumers that import the const directly.
|
|
7056
|
+
* The factory above is the canonical entry point when a consumer
|
|
7057
|
+
* supplies `AgentConfigOptions.defaultAgentTier`.
|
|
6859
7058
|
*/
|
|
6860
|
-
declare
|
|
7059
|
+
declare const meetingAnalysisBundle: AgentRuleBundle;
|
|
7060
|
+
|
|
6861
7061
|
/**
|
|
6862
|
-
*
|
|
6863
|
-
* `base` bundle. The rule documents:
|
|
7062
|
+
* People-profile bundle — enabled by default.
|
|
6864
7063
|
*
|
|
6865
|
-
*
|
|
6866
|
-
* -
|
|
6867
|
-
*
|
|
6868
|
-
*
|
|
6869
|
-
* -
|
|
6870
|
-
*
|
|
7064
|
+
* Consuming projects can disable it with
|
|
7065
|
+
* `excludeBundles: ["people-profile"]`. `appliesWhen` always returns
|
|
7066
|
+
* `true` per the operating-system directive that bundles assume peers
|
|
7067
|
+
* are present — in Phase 3 this bundle hands work off to
|
|
7068
|
+
* `company-profile` (via `company:research`) and `software-profile`
|
|
7069
|
+
* (via `software:research`).
|
|
6871
7070
|
*
|
|
6872
|
-
*
|
|
6873
|
-
*
|
|
6874
|
-
*
|
|
7071
|
+
* Ships a sub-agent (`people-profile-analyst`), two user-invocable
|
|
7072
|
+
* skills (`/profile-person`, `/refresh-person`), and `type:people-profile`
|
|
7073
|
+
* plus `people:*` phase labels for the four phases.
|
|
6875
7074
|
*/
|
|
6876
|
-
declare function
|
|
7075
|
+
declare function buildPeopleProfileBundle(paths?: ResolvedAgentPaths, issueDefaults?: ResolvedIssueDefaults, tier?: AgentModel): AgentRuleBundle;
|
|
6877
7076
|
/**
|
|
6878
|
-
*
|
|
6879
|
-
*
|
|
6880
|
-
*
|
|
6881
|
-
*
|
|
6882
|
-
*
|
|
6883
|
-
* When the convention is disabled, the function returns an empty
|
|
6884
|
-
* string so callers can no-op their append path.
|
|
7077
|
+
* Default-paths instance of the people-profile bundle, preserved for
|
|
7078
|
+
* backward compatibility with consumers that import the const
|
|
7079
|
+
* directly. The factory above is the canonical entry point when a
|
|
7080
|
+
* consumer supplies `AgentConfigOptions.paths`.
|
|
6885
7081
|
*/
|
|
6886
|
-
declare
|
|
7082
|
+
declare const peopleProfileBundle: AgentRuleBundle;
|
|
7083
|
+
|
|
6887
7084
|
/**
|
|
6888
|
-
*
|
|
6889
|
-
|
|
6890
|
-
|
|
7085
|
+
* PNPM bundle — auto-detected when the PnpmWorkspace component is present.
|
|
7086
|
+
*/
|
|
7087
|
+
declare const pnpmBundle: AgentRuleBundle;
|
|
7088
|
+
|
|
7089
|
+
/*******************************************************************************
|
|
6891
7090
|
*
|
|
6892
|
-
*
|
|
7091
|
+
* Bundle definition — opt-in. Consumers must include via `includeBundles`
|
|
7092
|
+
* (or it auto-detects through the appliesWhen below). No hardcoded
|
|
7093
|
+
* domain-specific content.
|
|
6893
7094
|
*
|
|
6894
|
-
|
|
7095
|
+
******************************************************************************/
|
|
7096
|
+
/**
|
|
7097
|
+
* Build the `pr-review` bundle with the supplied (possibly absent)
|
|
7098
|
+
* PR review policy override.
|
|
6895
7099
|
*
|
|
6896
|
-
*
|
|
7100
|
+
* The bundle is mostly static — the agent prompt, the feedback-
|
|
7101
|
+
* protocol prose, the skills, the sub-agent, and the labels are all
|
|
7102
|
+
* fixed across consumers. The one dynamic surface is the rendered
|
|
7103
|
+
* `pr-review-policy` rule's YAML block and precedence walk, which
|
|
7104
|
+
* reflect the resolved `pathsExemptFromSize` carve-out so consumers
|
|
7105
|
+
* tuning the doc-only carve-out see their override land in the
|
|
7106
|
+
* rendered CLAUDE.md.
|
|
6897
7107
|
*
|
|
6898
|
-
*
|
|
6899
|
-
*
|
|
6900
|
-
* - `skill_name` inside the file does not match the parent directory.
|
|
6901
|
-
* - The product-context fixture is missing and `requireProductContext`
|
|
6902
|
-
* is `true` in the resolved config.
|
|
7108
|
+
* When `policy` is omitted, the bundle ships with the documented
|
|
7109
|
+
* defaults baked in (`pathsExemptFromSize: ["docs/**"]`).
|
|
6903
7110
|
*/
|
|
6904
|
-
declare function
|
|
7111
|
+
declare function buildPrReviewBundle(policy?: ResolvedPrReviewPolicy): AgentRuleBundle;
|
|
7112
|
+
/**
|
|
7113
|
+
* `pr-review` bundle built with the default policy. Preserved for
|
|
7114
|
+
* backward compatibility with tests and consumers that import the
|
|
7115
|
+
* const directly. Prefer `buildPrReviewBundle(policy)` when consumer
|
|
7116
|
+
* overrides are in scope.
|
|
7117
|
+
*/
|
|
7118
|
+
declare const prReviewBundle: AgentRuleBundle;
|
|
6905
7119
|
|
|
6906
7120
|
/**
|
|
6907
|
-
*
|
|
6908
|
-
* config is supplied the convention ships **enabled** so every
|
|
6909
|
-
* configulator-consuming repo's analyst agents apply the
|
|
6910
|
-
* "as of [date]" qualifier rule.
|
|
6911
|
-
*
|
|
6912
|
-
* @see TemporalFramingConfig
|
|
7121
|
+
* Projen bundle — auto-detected when `projen` is in dependencies.
|
|
6913
7122
|
*/
|
|
6914
|
-
declare const
|
|
7123
|
+
declare const projenBundle: AgentRuleBundle;
|
|
7124
|
+
|
|
6915
7125
|
/**
|
|
6916
|
-
*
|
|
6917
|
-
* the profile / research subtrees of a repo's Starlight docs site.
|
|
6918
|
-
* Consumers may override the list when their content layout differs.
|
|
7126
|
+
* Regulatory-research bundle — enabled by default.
|
|
6919
7127
|
*
|
|
6920
|
-
*
|
|
6921
|
-
*
|
|
6922
|
-
*
|
|
6923
|
-
* snapshot under direct human review) already anchor the temporal
|
|
6924
|
-
* meaning of their content.
|
|
7128
|
+
* Consuming projects can disable it with
|
|
7129
|
+
* `excludeBundles: ["regulatory-research"]`. `appliesWhen` always
|
|
7130
|
+
* returns `true` per the workflow-bundle peer-present assumption.
|
|
6925
7131
|
*
|
|
6926
|
-
*
|
|
7132
|
+
* Ships a sub-agent (`regulatory-research-analyst`), three
|
|
7133
|
+
* user-invocable skills (`/scan-regulatory-landscape`,
|
|
7134
|
+
* `/research-regulation`, `/impact-regulation`), a regulation-page
|
|
7135
|
+
* template (emitted alongside the research skill), and
|
|
7136
|
+
* `type:regulatory-research` plus `regulatory:*` phase labels.
|
|
7137
|
+
*
|
|
7138
|
+
* The bundle sits downstream of `research-pipeline`,
|
|
7139
|
+
* `industry-discovery`, and `standards-research` (which surface the
|
|
7140
|
+
* need for regulatory research) and hands off actionable obligations
|
|
7141
|
+
* to the `requirements-analyst` bundle via `req:scan` issues that
|
|
7142
|
+
* become SEC (security & compliance) requirements in the writer
|
|
7143
|
+
* pipeline, and canonical profiles to `company-profile` and
|
|
7144
|
+
* `people-profile` for enforcement bodies and regulatory leaders.
|
|
6927
7145
|
*/
|
|
6928
|
-
declare
|
|
7146
|
+
declare function buildRegulatoryResearchBundle(paths?: ResolvedAgentPaths, issueDefaults?: ResolvedIssueDefaults): AgentRuleBundle;
|
|
6929
7147
|
/**
|
|
6930
|
-
*
|
|
6931
|
-
*
|
|
6932
|
-
*
|
|
6933
|
-
*
|
|
6934
|
-
* category names.
|
|
7148
|
+
* Default-paths instance of the regulatory-research bundle, preserved
|
|
7149
|
+
* for backward compatibility with consumers that import the const
|
|
7150
|
+
* directly. The factory above is the canonical entry point when a
|
|
7151
|
+
* consumer supplies `AgentConfigOptions.paths`.
|
|
6935
7152
|
*/
|
|
6936
|
-
declare const
|
|
6937
|
-
|
|
7153
|
+
declare const regulatoryResearchBundle: AgentRuleBundle;
|
|
7154
|
+
|
|
6938
7155
|
/**
|
|
6939
|
-
*
|
|
6940
|
-
*
|
|
6941
|
-
* single press release can invalidate them between scheduled refresh
|
|
6942
|
-
* passes. Slow-decay claims (ownership, dated metrics from press
|
|
6943
|
-
* releases or filings) carry a 180-day cadence — material changes
|
|
6944
|
-
* still happen but rarely outpace a half-yearly refresh. Leadership
|
|
6945
|
-
* tenure sits in the middle at 90 days.
|
|
7156
|
+
* Inject domain-specific source-tier examples into the content of the
|
|
7157
|
+
* base bundle's "Source Quality & Verification" rule.
|
|
6946
7158
|
*
|
|
6947
|
-
*
|
|
6948
|
-
*
|
|
6949
|
-
*
|
|
7159
|
+
* For every tier whose examples array is non-empty, a
|
|
7160
|
+
* `**Project-specific examples:**` line followed by a bullet list of
|
|
7161
|
+
* the supplied strings is appended immediately beneath the tier's
|
|
7162
|
+
* `### T<n> — ...` heading paragraph block. Tiers whose examples array
|
|
7163
|
+
* is missing or empty are left untouched.
|
|
7164
|
+
*
|
|
7165
|
+
* Returns the original `content` verbatim when the supplied config is
|
|
7166
|
+
* undefined or has no non-empty tier arrays, so callers can
|
|
7167
|
+
* unconditionally pipe content through this function.
|
|
6950
7168
|
*/
|
|
6951
|
-
declare
|
|
6952
|
-
readonly [K in TemporalFramingCategory]: number;
|
|
6953
|
-
};
|
|
7169
|
+
declare function renderSourceTierExamples(content: string, examples: SourceTierExamples | undefined): string;
|
|
6954
7170
|
/**
|
|
6955
|
-
*
|
|
6956
|
-
*
|
|
6957
|
-
*
|
|
6958
|
-
*
|
|
6959
|
-
*
|
|
7171
|
+
* Apply every {@link CustomDocSection} that targets `bundle.name` to
|
|
7172
|
+
* the bundle's rules, returning a new bundle whose matched rules have
|
|
7173
|
+
* the section bodies appended after the configured `afterSection`
|
|
7174
|
+
* heading. Entries that reference a bundle name other than
|
|
7175
|
+
* `bundle.name`, or whose `afterSection` cannot be located in any
|
|
7176
|
+
* rule in the bundle, are silently dropped.
|
|
6960
7177
|
*
|
|
6961
|
-
*
|
|
7178
|
+
* Entries that target the same `afterSection` heading render in
|
|
7179
|
+
* supplied order — the first supplied entry appears immediately
|
|
7180
|
+
* beneath the target heading block, the second below that, and so on.
|
|
7181
|
+
* This is achieved by advancing the insertion anchor to each
|
|
7182
|
+
* just-injected section's `## <sectionTitle>` heading; the next
|
|
7183
|
+
* same-target entry then lands at the end of that newly-opened
|
|
7184
|
+
* section, which places it immediately after the previous entry
|
|
7185
|
+
* regardless of the original heading's level.
|
|
7186
|
+
*
|
|
7187
|
+
* Returns `bundle` unchanged when `sections` is empty or no entries
|
|
7188
|
+
* match, so callers can unconditionally pipe bundles through this
|
|
7189
|
+
* function without penalty.
|
|
6962
7190
|
*/
|
|
6963
|
-
declare
|
|
7191
|
+
declare function renderCustomDocSections(bundle: AgentRuleBundle, sections: ReadonlyArray<CustomDocSection>): AgentRuleBundle;
|
|
6964
7192
|
/**
|
|
6965
|
-
*
|
|
6966
|
-
*
|
|
7193
|
+
* Render a {@link CustomDocSection} into the markdown block that
|
|
7194
|
+
* `renderCustomDocSections` splices after the target heading block.
|
|
7195
|
+
* Exposed for tests that exercise the renderer directly without
|
|
7196
|
+
* touching a full bundle.
|
|
6967
7197
|
*/
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
readonly paths: ReadonlyArray<string>;
|
|
6971
|
-
readonly cadences: {
|
|
6972
|
-
readonly [K in TemporalFramingCategory]: number;
|
|
6973
|
-
};
|
|
6974
|
-
readonly emitChecker: boolean;
|
|
6975
|
-
}
|
|
7198
|
+
declare function renderCustomDocSectionBlock(section: CustomDocSection): string;
|
|
7199
|
+
|
|
6976
7200
|
/**
|
|
6977
|
-
*
|
|
6978
|
-
* `
|
|
6979
|
-
*
|
|
6980
|
-
*
|
|
6981
|
-
* Malformed configs throw a descriptive `Error`:
|
|
7201
|
+
* Render the markdown subsection appended to the
|
|
7202
|
+
* `issue-label-conventions` rule when `AgentConfigOptions.focus` is
|
|
7203
|
+
* supplied. Returns an empty string when `focus` is undefined so
|
|
7204
|
+
* callers can unconditionally concatenate the result.
|
|
6982
7205
|
*
|
|
6983
|
-
*
|
|
6984
|
-
* - `cadences` containing non-integer or non-positive values.
|
|
6985
|
-
*/
|
|
6986
|
-
declare function resolveTemporalFraming(config?: TemporalFramingConfig): ResolvedTemporalFraming;
|
|
6987
|
-
/**
|
|
6988
|
-
* Synth-time validation hook. Throws a descriptive `Error` when the
|
|
6989
|
-
* supplied `TemporalFramingConfig` is malformed. Called by
|
|
6990
|
-
* `AgentConfig.preSynthesize` before any rendering so a misconfigured
|
|
6991
|
-
* convention fails the build instead of silently shipping broken
|
|
6992
|
-
* paths or cadences. Returns the resolved config unchanged so callers
|
|
6993
|
-
* can write `const tf = validateTemporalFramingConfig(config)` in
|
|
6994
|
-
* one line.
|
|
7206
|
+
* The section documents three things for agents:
|
|
6995
7207
|
*
|
|
6996
|
-
*
|
|
7208
|
+
* 1. How to read `focus.json` at triage time
|
|
7209
|
+
* 2. How focus weight interacts with the `priority:*` taxonomy
|
|
7210
|
+
* 3. The agent-driven expansion contract (what agents may append)
|
|
6997
7211
|
*
|
|
6998
|
-
*
|
|
6999
|
-
*
|
|
7212
|
+
* Configulator ships this rule content plus a JSON Schema that
|
|
7213
|
+
* validates the `focus.json` file; the file itself is authored and
|
|
7214
|
+
* curated in the consuming repo.
|
|
7000
7215
|
*/
|
|
7001
|
-
declare function
|
|
7216
|
+
declare function renderFocusSection(focus: FocusConfig | undefined): string;
|
|
7217
|
+
|
|
7002
7218
|
/**
|
|
7003
|
-
* Render the
|
|
7004
|
-
*
|
|
7219
|
+
* Render the markdown subsections appended to the
|
|
7220
|
+
* `meeting-processing-workflow` rule when `AgentConfigOptions.meetings`
|
|
7221
|
+
* is supplied. Returns an empty string when the supplied config has
|
|
7222
|
+
* nothing to render (no meeting types and no meeting areas) so callers
|
|
7223
|
+
* can unconditionally concatenate the result.
|
|
7005
7224
|
*
|
|
7006
|
-
*
|
|
7007
|
-
* - The five canonical time-sensitive claim categories.
|
|
7008
|
-
* - Refresh-agent behaviour (grep for `as of `, re-verify against the
|
|
7009
|
-
* category-specific cadence).
|
|
7010
|
-
* - The scope of applicability (profile / research sections only).
|
|
7225
|
+
* Two subsections are rendered, each gated on its own input array:
|
|
7011
7226
|
*
|
|
7012
|
-
*
|
|
7013
|
-
*
|
|
7014
|
-
*
|
|
7227
|
+
* 1. **Recognized meeting types** — rendered when `meetingTypes` is
|
|
7228
|
+
* non-empty. Lists every declared type with its scope, kind,
|
|
7229
|
+
* optional cadence, default duration, and agenda template path.
|
|
7230
|
+
* Also documents the resolved `agendaTemplateRoot`.
|
|
7231
|
+
* 2. **Area → doc-root mapping** — rendered when `meetingAreas` is
|
|
7232
|
+
* non-empty. Lists every declared area with its `id`, label, and
|
|
7233
|
+
* docs-root-relative destination folder.
|
|
7234
|
+
*
|
|
7235
|
+
* Bundles consume the rendered string by appending it to their own
|
|
7236
|
+
* rule content. A caller that has no meeting types and no meeting
|
|
7237
|
+
* areas receives an empty string and can safely concatenate.
|
|
7015
7238
|
*/
|
|
7016
|
-
declare function
|
|
7239
|
+
declare function renderMeetingTypesSection(meetings: MeetingsConfig | undefined): string;
|
|
7240
|
+
|
|
7017
7241
|
/**
|
|
7018
|
-
* Render the
|
|
7019
|
-
*
|
|
7020
|
-
*
|
|
7021
|
-
*
|
|
7022
|
-
* The script accepts the list of changed files as either:
|
|
7023
|
-
*
|
|
7024
|
-
* 1. Positional arguments (one file per arg).
|
|
7025
|
-
* 2. Newline-separated entries on stdin (when no args supplied) —
|
|
7026
|
-
* pipe `git diff --name-only` directly into it.
|
|
7242
|
+
* Render the markdown subsection appended to the
|
|
7243
|
+
* `issue-label-conventions` rule when `AgentConfigOptions.priorityRules`
|
|
7244
|
+
* is non-empty. Returns an empty string when the supplied array is
|
|
7245
|
+
* empty so callers can unconditionally concatenate the result.
|
|
7027
7246
|
*
|
|
7028
|
-
*
|
|
7029
|
-
*
|
|
7030
|
-
*
|
|
7031
|
-
* anywhere in the file. The lint is intentionally coarse — file-level
|
|
7032
|
-
* not line-level — so the cost of running it on every PR stays low.
|
|
7247
|
+
* Precedence is **first match wins** — rules render in the order
|
|
7248
|
+
* supplied. The bundle's default inference heuristics act as the
|
|
7249
|
+
* fallback when no rule matches.
|
|
7033
7250
|
*/
|
|
7034
|
-
declare function
|
|
7251
|
+
declare function renderPriorityRulesSection(rules: ReadonlyArray<PriorityRule>): string;
|
|
7035
7252
|
|
|
7036
7253
|
/**
|
|
7037
7254
|
* Build the requirements-analyst bundle with the supplied resolved
|
|
@@ -7340,6 +7557,30 @@ declare const upstreamConfigulatorDocsBundle: AgentRuleBundle;
|
|
|
7340
7557
|
*/
|
|
7341
7558
|
declare const vitestBundle: AgentRuleBundle;
|
|
7342
7559
|
|
|
7560
|
+
/**
|
|
7561
|
+
* Resolved settings for every **config-driven convention rule** — a
|
|
7562
|
+
* bundle rule whose body is derived from consumer configuration rather
|
|
7563
|
+
* than being fixed prose.
|
|
7564
|
+
*
|
|
7565
|
+
* These rules used to ship default content from their bundle and get
|
|
7566
|
+
* rewritten late in `AgentConfig.resolveRules()`, which silently
|
|
7567
|
+
* discarded any `ruleExtensions` append or same-name `rules` override
|
|
7568
|
+
* that had already been merged into the map. Passing the resolved
|
|
7569
|
+
* settings down to the bundle factories instead keeps the rule map a
|
|
7570
|
+
* pure composition surface: seed once, then extend / override / exclude
|
|
7571
|
+
* on top.
|
|
7572
|
+
*/
|
|
7573
|
+
interface ResolvedRuleConventions {
|
|
7574
|
+
/** Settings for the five convention rules the `base` bundle owns. */
|
|
7575
|
+
readonly base: ResolvedBaseConventions;
|
|
7576
|
+
/** Settings for the `orchestrator-conventions` rule. */
|
|
7577
|
+
readonly orchestrator: ResolvedOrchestratorConventions;
|
|
7578
|
+
}
|
|
7579
|
+
/**
|
|
7580
|
+
* Convention settings applied when the consumer configures none of the
|
|
7581
|
+
* config-driven conventions.
|
|
7582
|
+
*/
|
|
7583
|
+
declare const DEFAULT_RULE_CONVENTIONS: ResolvedRuleConventions;
|
|
7343
7584
|
/**
|
|
7344
7585
|
* Build the full list of built-in rule bundles with the supplied
|
|
7345
7586
|
* resolved agent paths. Every path-aware bundle accepts a
|
|
@@ -7365,10 +7606,19 @@ declare const vitestBundle: AgentRuleBundle;
|
|
|
7365
7606
|
* returns true; it is filtered by the `includeBaseRules` option
|
|
7366
7607
|
* in AgentConfig.
|
|
7367
7608
|
*
|
|
7609
|
+
* Bundles that own a **config-driven convention rule** (`base`,
|
|
7610
|
+
* `orchestrator`) accept their resolved convention settings via
|
|
7611
|
+
* `conventions` so each rule's content is final the moment it enters
|
|
7612
|
+
* the rule map. Seeding resolved content up front — instead of
|
|
7613
|
+
* rewriting the rule after the map is assembled — is what lets
|
|
7614
|
+
* `AgentConfigOptions.ruleExtensions` appends and consumer-supplied
|
|
7615
|
+
* same-name `rules` entries compose with a convention override rather
|
|
7616
|
+
* than being clobbered by it.
|
|
7617
|
+
*
|
|
7368
7618
|
* Bundles that do not read any agent path (typescript, jest,
|
|
7369
7619
|
* pnpm, etc.) stay as const exports and are referenced unchanged.
|
|
7370
7620
|
*/
|
|
7371
|
-
declare function buildBuiltInBundles(paths?: ResolvedAgentPaths, issueDefaults?: ResolvedIssueDefaults, defaultAgentTier?: AgentModel, bundleAgentTiers?: ReadonlyMap<string, AgentModel>, prReviewPolicy?: ResolvedPrReviewPolicy, buildPolicy?: ResolvedBuildPolicy): ReadonlyArray<AgentRuleBundle>;
|
|
7621
|
+
declare function buildBuiltInBundles(paths?: ResolvedAgentPaths, issueDefaults?: ResolvedIssueDefaults, defaultAgentTier?: AgentModel, bundleAgentTiers?: ReadonlyMap<string, AgentModel>, prReviewPolicy?: ResolvedPrReviewPolicy, buildPolicy?: ResolvedBuildPolicy, conventions?: ResolvedRuleConventions): ReadonlyArray<AgentRuleBundle>;
|
|
7372
7622
|
/**
|
|
7373
7623
|
* Built-in rule bundles assembled with the default agent paths.
|
|
7374
7624
|
* Preserved for backward compatibility with tests and consumers
|
|
@@ -13920,5 +14170,5 @@ declare function pinPnpmActionSetup(project: Project): void;
|
|
|
13920
14170
|
*/
|
|
13921
14171
|
declare function pinSetupNodeVersion(project: Project): void;
|
|
13922
14172
|
|
|
13923
|
-
export { AGENT_MODEL, AGENT_PLATFORM, AGENT_REGISTRY_ENTRIES, AGENT_RULE_SCOPE, AGENT_TIER_ROLES, AGENT_TIER_VALUES, AUDIT_CATEGORY_ORDER, AgentConfig, ApiExtractor, AstroConfig, AstroOutput, AstroProject, AuditCategory, AuditMode, AuditSeverity, AwsCdkProject, AwsDeployWorkflow, AwsDeploymentConfig, AwsDeploymentTarget, AwsTeardownWorkflow, BUILT_IN_BUNDLES, BUNDLE_OWNERSHIP, CDK_BOOTSTRAP_DEFAULTS_BY_STAGE, CDK_DEPLOY_DEFAULTS_BY_STAGE, CDK_DEPLOY_METHOD, CDK_DESTROY_DEFAULTS_BY_STAGE, CDK_DIFF_DEFAULTS_BY_STAGE, CDK_DIFF_METHOD, CDK_GC_ACTION, CDK_GC_TYPE, CDK_INIT_LANGUAGE, CDK_INIT_TEMPLATE, CDK_PROGRESS, CDK_REQUIRE_APPROVAL, CDK_SYNTH_DEFAULTS_BY_STAGE, CDK_WATCH_DEFAULTS_BY_STAGE, CLAUDE_RULE_TARGET, COMPLETE_JOB_ID, CONVENTIONAL_COMMIT_TYPE_LABELS, CdkCli, DEFAULT_AC_THRESHOLDS, DEFAULT_AGENT_PATHS, DEFAULT_AGENT_TIERS, DEFAULT_API_EXTRACTOR_CONFIG_FILE, DEFAULT_API_EXTRACTOR_ENTRY_POINT, DEFAULT_API_EXTRACTOR_REPORT_FILENAME, DEFAULT_API_EXTRACTOR_REPORT_FOLDER, DEFAULT_AUDIT_REPORT_DIR, DEFAULT_BUILD_POLICY, DEFAULT_BUNDLE_OVERRIDES, DEFAULT_DECOMPOSITION_TEMPLATE, DEFAULT_DISPATCH_MODEL, DEFAULT_DISPATCH_TO_HOUSEKEEPING_RATIO, DEFAULT_GITHUB_ISSUE_TYPE, DEFAULT_HOUSEKEEPING_MODEL, DEFAULT_ISSUE_PRIORITY, DEFAULT_ISSUE_STATUS, DEFAULT_ISSUE_TEMPLATES_BUNDLE_PATH_PATTERNS, DEFAULT_ISSUE_TEMPLATES_EMIT_CHECKER, DEFAULT_ISSUE_TEMPLATES_EMIT_STARTER, DEFAULT_ISSUE_TEMPLATES_ENABLED, DEFAULT_ISSUE_TEMPLATES_PATH, DEFAULT_ISSUE_TEMPLATES_REQUIRE_REFERENCE, DEFAULT_OFF_PEAK_CRON_EXAMPLE, DEFAULT_PARTIAL_UNBLOCK_COMMENT_TEMPLATE, DEFAULT_PATHS_EXEMPT_FROM_SIZE, DEFAULT_PRIORITY_LABELS, DEFAULT_PRODUCT_CONTEXT_PATH, DEFAULT_PROGRESS_FILES_ENABLED, DEFAULT_PROGRESS_FILES_FILENAME_PATTERN, DEFAULT_PROGRESS_FILES_FORMAT, DEFAULT_PROGRESS_FILES_STALE_AFTER_HOURS, DEFAULT_PROGRESS_FILES_STATE_DIR, DEFAULT_REQUIREMENT_CATEGORY_DIRS, DEFAULT_REQUIRE_PRODUCT_CONTEXT, DEFAULT_RESOLVED_ISSUE_DEFAULTS, DEFAULT_SAMPLE_COMPILER_OPTIONS, DEFAULT_SCHEDULED_TASKS_ROOT, DEFAULT_SCHEDULED_TASK_ENTRIES, DEFAULT_SHARED_EDITING_CONFLICT_STRATEGY, DEFAULT_SHARED_EDITING_EMIT_HELPER, DEFAULT_SHARED_EDITING_ENABLED, DEFAULT_SHARED_EDITING_VERIFY_COMMIT, DEFAULT_SHARED_INDEX_PATHS, DEFAULT_SKILL_EVALS_EMIT_RUNNER, DEFAULT_SKILL_EVALS_ENABLED, DEFAULT_SKILL_EVALS_SKILLS_ROOT, DEFAULT_SOURCES_THRESHOLDS, DEFAULT_STATE_FILE_PATH, DEFAULT_STATUS_LABELS, DEFAULT_TEARDOWN_BRANCH_PATTERNS, DEFAULT_TEMPORAL_FRAMING_CADENCES, DEFAULT_TEMPORAL_FRAMING_EMIT_CHECKER, DEFAULT_TEMPORAL_FRAMING_ENABLED, DEFAULT_TEMPORAL_FRAMING_PATHS, DEFAULT_TYPE_LABELS, DEFAULT_UNBLOCK_COMMENT_TEMPLATE, DEFAULT_UNBLOCK_DEPENDENTS_ENABLED, DEFAULT_UPSTREAM_CONFIGULATOR_ENABLED, DOCS_SYNC_AUDIT_SCHEMA_VERSION, GITHUB_ISSUE_TYPES, GITHUB_ISSUE_TYPE_BY_TITLE_PREFIX, JsiiFaker, LAYOUT_ENFORCEMENT, LAYOUT_ROOT_BY_PROJECT_TYPE, MAX_LABEL_DESCRIPTION_LENGTH, MCP_TRANSPORT, MERGE_METHODS, MIMIMUM_RELEASE_AGE, MINIMUM_RELEASE_AGE, MONOREPO_LAYOUT, MonorepoProject, Nvmrc, PHASE_LABEL_TYPE_MAP, PROD_DEPLOY_NAME, PROGRESS_FILES_FORMAT_VALUES, PnpmWorkspace, ProjectMetadata, REQUIREMENTS_WRITER_PATHS, ROOT_CI_TASK_NAME, ROOT_TURBO_TASK_NAME, ReactViteSiteProject, RequirementIssueTemplate, ResetTask, SCHEDULED_TASK_MODEL_VALUES, SCOPE_CLASS_VALUES, SET_ISSUE_TYPE_HELPER_PATH, SHARED_EDITING_CONFLICT_STRATEGY_VALUES, STARLIGHT_ROLE, SUPPRESSED_WORKFLOW_RULE_NAMES, SampleLang, StarlightProject, TEMPORAL_FRAMING_CATEGORY_VALUES, TURBO_RUN_CONTINUE, TURBO_RUN_DRY_RUN, TURBO_RUN_LOG_ORDER, TURBO_RUN_LOG_PREFIX, TURBO_RUN_OUTPUT_LOGS, TestRunner, TsDocCoverageKind, TsdocConfig, TurboRepo, TurboRepoTask, TypeScriptConfig, TypeScriptProject, UNKNOWN_TYPE_FALLBACK_TIER, VALID_PRIORITY_VALUES, VALID_STATUS_VALUES, VERSION, VERSION_KEYS_SKIP, VERSION_NPM_PACKAGES, VSCodeConfig, Vitest, addApproveMergeUpgradeWorkflow, addBuildCompleteJob, addPlaywright, addStorybook, addSyncLabelsWorkflow, agendaBundle, analyzeTsDocCoverage, auditReportJsonSchema, awsCdkBundle, baseBundle, bcmWriterBundle, buildAgentRegistryRule, buildBaseBundle, buildBcmWriterBundle, buildBuiltInBundles, buildBusinessModelsBundle, buildCheckBlockedProcedure, buildCompanyProfileBundle, buildCustomerProfileBundle, buildDocsSyncBundle, buildGithubWorkflowBundle, buildIndustryDiscoveryBundle, buildMaintenanceAuditBundle, buildMeetingAnalysisBundle, buildOrchestratorConventionsContent, buildPeopleProfileBundle, buildPrReviewBundle, buildRegulatoryResearchBundle, buildReport, buildRequirementsAnalystBundle, buildRequirementsReviewerBundle, buildRequirementsWriterBundle, buildResearchPipelineBundle, buildSoftwareProfileBundle, buildStandardsResearchBundle, buildTurborepoBundle, buildUnblockDependentsProcedure, bundleNameForWorkflowRule, businessModelsBundle, checkDocSamplesProcedure, checkLinksProcedure, classifyIssueScope, classifyRun, companyProfileBundle, compileFencedSamples, createApiDiffCheck, createReferenceMismatchCheck, createTsdocCoverageCheck, customerProfileBundle, diffApiRollups, docsSyncBundle, emptyCategoryBuckets, extractApiProcedure, extractDocReferences, extractFencedSamples, formatLayoutViolation, formatStarlightSingletonViolation, getLatestEligibleVersion, githubIssueTypeForTitle, githubWorkflowBundle, hasAnyDocsEmittingBundle, hasAnyDownstreamIssueKindBundle, includeHiddenFilesInBuildArtifact, industryDiscoveryBundle, isPhaseLabelOwnedByExcluded, isScheduledTaskOwnedByExcluded, isSuppressedWorkflowRule, isTypeLabelOwnedByExcluded, jestBundle, labelsForPhase, maintenanceAuditBundle, meetingAnalysisBundle, mergeCdkOptions, nextRequirementIdProcedure, orchestratorBundle, parseApiRollup, peopleProfileBundle, persistAuditReport, pinPnpmActionSetup, pinSetupNodeVersion, pnpmBundle, prReviewBundle, projenBundle, referenceRecordToFinding, regulatoryResearchBundle, renderAgentTierCaseStatement, renderAgentTierSection, renderCdkAcknowledge, renderCdkBootstrap, renderCdkContext, renderCdkDeploy, renderCdkDestroy, renderCdkDiff, renderCdkDocs, renderCdkDoctor, renderCdkDrift, renderCdkFlags, renderCdkGc, renderCdkImport, renderCdkInit, renderCdkList, renderCdkMetadata, renderCdkMigrate, renderCdkNotices, renderCdkOrphan, renderCdkPublishAssets, renderCdkRefactor, renderCdkRollback, renderCdkSynth, renderCdkWatch, renderCheckDocSamplesProcedure, renderCheckLinksProcedure, renderCustomDocSectionBlock, renderCustomDocSections, renderExtractApiProcedure, renderFocusSection, renderGithubIssueTypeSection, renderGithubIssueTypeSectionLines, renderIssueTemplatesBundleHook, renderIssueTemplatesCheckerScript, renderIssueTemplatesRuleContent, renderIssueTemplatesStarterPage, renderIssueTypeAssignmentBlanket, renderIssueTypeAssignmentStep, renderMeetingTypesSection, renderNextRequirementIdProcedure, renderPhaseTypeInvariantSection, renderPhaseTypeInvariantShellHelpers, renderPriorityRulesSection, renderProgressFileName, renderProgressFilePath, renderProgressFilesBundleHook, renderProgressFilesRuleContent, renderRequirementBlock, renderRunRatioSection, renderRunRatioShellHelpers, renderScheduledTaskSkillFile, renderScheduledTasksSection, renderScopeGateSection, renderScopeGateShellHelpers, renderSetIssueTypeFallbackLines, renderSharedEditingBundleHook, renderSharedEditingHelperScript, renderSharedEditingRuleContent, renderSkillEvalsBundleHook, renderSkillEvalsRuleContent, renderSkillEvalsRunnerScript, renderSourceTierExamples, renderStripToolArtifactTagsProcedure, renderTemporalFramingCheckerScript, renderTemporalFramingRuleContent, renderTitlePrefixTypeBullets, renderUnblockDependentsScript, renderUnblockDependentsSection, requirementsAnalystBundle, requirementsReviewerBundle, requirementsWriterBundle, researchPipelineBundle, resolveAgentPaths, resolveAgentTiers, resolveAstroProjectOutdir, resolveAwsCdkProjectOutdir, resolveBuildPolicy, resolveIssueDefaults, resolveIssueTemplates, resolveModelAlias, resolveOrchestratorAssets, resolveOutdirFromPackageName, resolveOverrideForLabels, resolvePrReviewPolicy, resolveProgressFiles, resolveReactViteSiteProjectOutdir, resolveRunRatio, resolveScheduledTasks, resolveScopeGate, resolveSharedEditing, resolveSkillEvals, resolveTemplateVariables, resolveTemporalFraming, resolveTypeLabelForLabels, resolveTypeScriptProjectOutdir, resolveUnblockDependents, runScan, slackBundle, softwareProfileBundle, standardsResearchBundle, stripToolArtifactTagsProcedure, tsdocRecordToFindings, turborepoBundle, typeLabelForPhaseLabel, typescriptBundle, upstreamConfigulatorDocsBundle, validateAgentTierConfig, validateIssueDefaultsConfig, validateIssueTemplatesConfig, validateMonorepoLayout, validatePrReviewPolicyConfig, validateProgressFilesConfig, validateRunRatioConfig, validateScheduledTasksConfig, validateScopeGateConfig, validateSharedEditingConfig, validateSkillEvalsConfig, validateStarlightSingleton, validateTemporalFramingConfig, validateUnblockDependentsConfig, vitestBundle };
|
|
13924
|
-
export type { ActionItemFilingConfig, ActivateBranchNameEnvVarOptions, AddStorybookOptions, AgentCommand, AgentConfigOptions, AgentExpansionRules, AgentFeaturesConfig, AgentModel, AgentPathsConfig, AgentPlatform, AgentPlatformOverrides, AgentProcedure, AgentRegistryEntry, AgentRule, AgentRuleBundle, AgentRuleScope, AgentSkill, AgentSubAgent, AgentSubAgentPlatformOverrides, AgentTier, AgentTierConfig, AgentTierEntry, AnalyzeTsDocCoverageOptions, ApiDiffCheckOptions, ApiDiffFinding, ApiDiffResult, ApiExtractorOptions, ApiExtractorReportOptions, ApiSurfaceEntry, ApproveMergeUpgradeOptions, AstroConfigOptions, AstroIntegrationSpec, AstroProjectOptions, AuditCheckRunner, AuditCheckRunnerContext, AuditFinding, AuditFindingBase, AuditLocation, AuditReport, AwsAccount, AwsCdkProjectOptions, AwsDeploymentTargetOptions, AwsLocalDeploymentConfig, AwsOrganization, AwsRegion, AwsTeardownWorkflowOptions, BundleOwnership, CdkAcknowledgeOptions, CdkBootstrapOptions, CdkCliOptions, CdkContextOptions, CdkDeployMethod, CdkDeployOptions, CdkDestroyOptions, CdkDiffMethod, CdkDiffOptions, CdkDocsOptions, CdkDoctorOptions, CdkDriftOptions, CdkFlagsOptions, CdkGcAction, CdkGcOptions, CdkGcType, CdkGlobalOptions, CdkImportOptions, CdkInitLanguage, CdkInitOptions, CdkInitTemplate, CdkListOptions, CdkMetadataOptions, CdkMigrateOptions, CdkNoticesOptions, CdkOrphanOptions, CdkProgress, CdkPublishAssetsOptions, CdkRefactorOptions, CdkRequireApproval, CdkRollbackOptions, CdkSynthOptions, CdkTargetOverrides, CdkWatchOptions, CiDeploymentConfig, ClassTypeOptions, ClaudeAutoModeConfig, ClaudeHookAction, ClaudeHookEntry, ClaudeHooksConfig, ClaudeMdConfig, ClaudePermissionsConfig, ClaudeRuleTarget, ClaudeSandboxConfig, ClaudeSettingsConfig, CompileFencedSamplesOptions, CopilotHandoff, CursorHookAction, CursorHooksConfig, CursorSettingsConfig, CustomDocSection, DeployWorkflowOptions, DeploymentMetadata, DocReferenceRecord, EffectiveScopeThresholds, ExtractDocReferencesOptions, ExtractFencedSamplesOptions, FencedSampleRecord, FocusArea, FocusAreaMatch, FocusConfig, GitBranch, GitHubBoardMetadata, GitHubProjectMetadata, GitHubSprintMetadata, GithubIssueType, IDependencyResolver, IssueDefaultsConfig, IssueDefaultsOverride, IssueDefaultsPriority, IssueDefaultsStatus, IssueTemplatesConfig, IssueTypeAssignmentStepOptions, LabelDefinition, LayoutEnforcement, LayoutViolation, LinkFailureFinding, McpServerConfig, McpTransport, MeetingArea, MeetingScope, MeetingType, MeetingTypeKind, MeetingsConfig, MergeMethod, MonorepoLayoutRoot, MonorepoPnpmOptions, MonorepoProjectOptions, OrganizationMetadata, PhaseLabelTypeOutcome, PhaseLabelTypeResolution, PnpmWorkspaceOptions, PrReviewAutoMergeConfig, PrReviewCiVerificationConfig, PrReviewPolicyConfig, PriorityRule, ProgressFilesConfig, ProjectMetadataOptions, ReactViteSiteProjectOptions, ReferenceMismatchCheckOptions, ReferenceMismatchFinding, RemoteCacheOptions, RepositoryMetadata, RequirementBlockFields, RequirementCategoryDirsConfig, RequirementIssueTemplateOptions, ResetTaskOptions, ResolvedAgentPaths, ResolvedAgentTier, ResolvedBuildPolicy, ResolvedIssueDefaults, ResolvedIssueDefaultsEntry, ResolvedIssueTemplates, ResolvedPrReviewAutoMerge, ResolvedPrReviewPolicy, ResolvedProgressFiles, ResolvedProjectMetadata, ResolvedRequirementCategoryDirs, ResolvedRunRatio, ResolvedScheduledTask, ResolvedScheduledTasks, ResolvedScopeGate, ResolvedScopeGateBundleOverride, ResolvedSharedEditing, ResolvedSkillEvals, ResolvedTemporalFraming, ResolvedUnblockDependents, RunRatioConfig, RunScanOptions, RunScanResult, SampleCompilationFailure, SampleFailureFinding, ScheduledTaskEntry, ScheduledTaskModel, ScheduledTaskOverride, ScheduledTasksConfig, ScopeClass, ScopeGateBundleOverride, ScopeGateConfig, ScopeGateThresholds, SharedEditingConfig, SkillEvalsConfig, SlackMetadata, SourceTierExamples, StarlightEditLink, StarlightLogo, StarlightProjectOptions, StarlightRole, StarlightSidebarItem, StarlightSingletonViolation, StarlightSocialLink, SyncLabelsOptions, TemplateResolveResult, TemporalFramingCategory, TemporalFramingConfig, TsDocCoverageRecord, TsdocConfigOptions, TsdocCoverageCheckOptions, TsdocCoverageFinding, TurboRepoOptions, TurboRepoTaskOptions, TurboRunContinue, TurboRunDryRun, TurboRunLogOrder, TurboRunLogPrefix, TurboRunOptions, TurboRunOutputLogs, TypeScriptProjectOptions, UnblockDependentsConfig, UpstreamConfigulatorConfig, VersionKey, VitestConfigOptions, VitestOptions };
|
|
14173
|
+
export { AGENT_MODEL, AGENT_PLATFORM, AGENT_REGISTRY_ENTRIES, AGENT_RULE_SCOPE, AGENT_TIER_ROLES, AGENT_TIER_VALUES, AUDIT_CATEGORY_ORDER, AgentConfig, ApiExtractor, AstroConfig, AstroOutput, AstroProject, AuditCategory, AuditMode, AuditSeverity, AwsCdkProject, AwsDeployWorkflow, AwsDeploymentConfig, AwsDeploymentTarget, AwsTeardownWorkflow, BUILT_IN_BUNDLES, BUNDLE_OWNERSHIP, CDK_BOOTSTRAP_DEFAULTS_BY_STAGE, CDK_DEPLOY_DEFAULTS_BY_STAGE, CDK_DEPLOY_METHOD, CDK_DESTROY_DEFAULTS_BY_STAGE, CDK_DIFF_DEFAULTS_BY_STAGE, CDK_DIFF_METHOD, CDK_GC_ACTION, CDK_GC_TYPE, CDK_INIT_LANGUAGE, CDK_INIT_TEMPLATE, CDK_PROGRESS, CDK_REQUIRE_APPROVAL, CDK_SYNTH_DEFAULTS_BY_STAGE, CDK_WATCH_DEFAULTS_BY_STAGE, CLAUDE_RULE_TARGET, COMPLETE_JOB_ID, CONVENTIONAL_COMMIT_TYPE_LABELS, CdkCli, DEFAULT_AC_THRESHOLDS, DEFAULT_AGENT_PATHS, DEFAULT_AGENT_TIERS, DEFAULT_API_EXTRACTOR_CONFIG_FILE, DEFAULT_API_EXTRACTOR_ENTRY_POINT, DEFAULT_API_EXTRACTOR_REPORT_FILENAME, DEFAULT_API_EXTRACTOR_REPORT_FOLDER, DEFAULT_AUDIT_REPORT_DIR, DEFAULT_BASE_CONVENTIONS, DEFAULT_BUILD_POLICY, DEFAULT_BUNDLE_OVERRIDES, DEFAULT_DECOMPOSITION_TEMPLATE, DEFAULT_DISPATCH_MODEL, DEFAULT_DISPATCH_TO_HOUSEKEEPING_RATIO, DEFAULT_GITHUB_ISSUE_TYPE, DEFAULT_HOUSEKEEPING_MODEL, DEFAULT_ISSUE_PRIORITY, DEFAULT_ISSUE_STATUS, DEFAULT_ISSUE_TEMPLATES_BUNDLE_PATH_PATTERNS, DEFAULT_ISSUE_TEMPLATES_EMIT_CHECKER, DEFAULT_ISSUE_TEMPLATES_EMIT_STARTER, DEFAULT_ISSUE_TEMPLATES_ENABLED, DEFAULT_ISSUE_TEMPLATES_PATH, DEFAULT_ISSUE_TEMPLATES_REQUIRE_REFERENCE, DEFAULT_OFF_PEAK_CRON_EXAMPLE, DEFAULT_ORCHESTRATOR_CONVENTIONS, DEFAULT_PARTIAL_UNBLOCK_COMMENT_TEMPLATE, DEFAULT_PATHS_EXEMPT_FROM_SIZE, DEFAULT_PRIORITY_LABELS, DEFAULT_PRODUCT_CONTEXT_PATH, DEFAULT_PROGRESS_FILES_ENABLED, DEFAULT_PROGRESS_FILES_FILENAME_PATTERN, DEFAULT_PROGRESS_FILES_FORMAT, DEFAULT_PROGRESS_FILES_STALE_AFTER_HOURS, DEFAULT_PROGRESS_FILES_STATE_DIR, DEFAULT_REQUIREMENT_CATEGORY_DIRS, DEFAULT_REQUIRE_PRODUCT_CONTEXT, DEFAULT_RESOLVED_ISSUE_DEFAULTS, DEFAULT_RULE_CONVENTIONS, DEFAULT_SAMPLE_COMPILER_OPTIONS, DEFAULT_SCHEDULED_TASKS_ROOT, DEFAULT_SCHEDULED_TASK_ENTRIES, DEFAULT_SHARED_EDITING_CONFLICT_STRATEGY, DEFAULT_SHARED_EDITING_EMIT_HELPER, DEFAULT_SHARED_EDITING_ENABLED, DEFAULT_SHARED_EDITING_VERIFY_COMMIT, DEFAULT_SHARED_INDEX_PATHS, DEFAULT_SKILL_EVALS_EMIT_RUNNER, DEFAULT_SKILL_EVALS_ENABLED, DEFAULT_SKILL_EVALS_SKILLS_ROOT, DEFAULT_SOURCES_THRESHOLDS, DEFAULT_STATE_FILE_PATH, DEFAULT_STATUS_LABELS, DEFAULT_TEARDOWN_BRANCH_PATTERNS, DEFAULT_TEMPORAL_FRAMING_CADENCES, DEFAULT_TEMPORAL_FRAMING_EMIT_CHECKER, DEFAULT_TEMPORAL_FRAMING_ENABLED, DEFAULT_TEMPORAL_FRAMING_PATHS, DEFAULT_TYPE_LABELS, DEFAULT_UNBLOCK_COMMENT_TEMPLATE, DEFAULT_UNBLOCK_DEPENDENTS_ENABLED, DEFAULT_UPSTREAM_CONFIGULATOR_ENABLED, DOCS_SYNC_AUDIT_SCHEMA_VERSION, GITHUB_ISSUE_TYPES, GITHUB_ISSUE_TYPE_BY_TITLE_PREFIX, ISSUE_TEMPLATES_GENERATED_SUFFIX, JsiiFaker, LAYOUT_ENFORCEMENT, LAYOUT_ROOT_BY_PROJECT_TYPE, MAX_LABEL_DESCRIPTION_LENGTH, MCP_TRANSPORT, MERGE_METHODS, MIMIMUM_RELEASE_AGE, MINIMUM_RELEASE_AGE, MONOREPO_LAYOUT, MonorepoProject, Nvmrc, PHASE_LABEL_TYPE_MAP, PROD_DEPLOY_NAME, PROGRESS_FILES_FORMAT_VALUES, PnpmWorkspace, ProjectMetadata, REQUIREMENTS_WRITER_PATHS, ROOT_CI_TASK_NAME, ROOT_TURBO_TASK_NAME, ReactViteSiteProject, RequirementIssueTemplate, ResetTask, SCHEDULED_TASK_MODEL_VALUES, SCOPE_CLASS_VALUES, SET_ISSUE_TYPE_HELPER_PATH, SHARED_EDITING_CONFLICT_STRATEGY_VALUES, STARLIGHT_ROLE, SUPPRESSED_WORKFLOW_RULE_NAMES, SampleLang, StarlightProject, TEMPORAL_FRAMING_CATEGORY_VALUES, TURBO_RUN_CONTINUE, TURBO_RUN_DRY_RUN, TURBO_RUN_LOG_ORDER, TURBO_RUN_LOG_PREFIX, TURBO_RUN_OUTPUT_LOGS, TestRunner, TsDocCoverageKind, TsdocConfig, TurboRepo, TurboRepoTask, TypeScriptConfig, TypeScriptProject, UNKNOWN_TYPE_FALLBACK_TIER, VALID_PRIORITY_VALUES, VALID_STATUS_VALUES, VERSION, VERSION_KEYS_SKIP, VERSION_NPM_PACKAGES, VSCodeConfig, Vitest, addApproveMergeUpgradeWorkflow, addBuildCompleteJob, addPlaywright, addStorybook, addSyncLabelsWorkflow, agendaBundle, analyzeTsDocCoverage, auditReportJsonSchema, awsCdkBundle, baseBundle, bcmWriterBundle, buildAgentRegistryRule, buildBaseBundle, buildBcmWriterBundle, buildBuiltInBundles, buildBusinessModelsBundle, buildCheckBlockedProcedure, buildCompanyProfileBundle, buildCustomerProfileBundle, buildDocsSyncBundle, buildGithubWorkflowBundle, buildIndustryDiscoveryBundle, buildMaintenanceAuditBundle, buildMeetingAnalysisBundle, buildOrchestratorBundle, buildOrchestratorConventionsContent, buildPeopleProfileBundle, buildPrReviewBundle, buildRegulatoryResearchBundle, buildReport, buildRequirementsAnalystBundle, buildRequirementsReviewerBundle, buildRequirementsWriterBundle, buildResearchPipelineBundle, buildSoftwareProfileBundle, buildStandardsResearchBundle, buildTurborepoBundle, buildUnblockDependentsProcedure, bundleNameForWorkflowRule, businessModelsBundle, checkDocSamplesProcedure, checkLinksProcedure, classifyIssueScope, classifyRun, collectIssueTemplateRecipeStubs, companyProfileBundle, compileFencedSamples, createApiDiffCheck, createReferenceMismatchCheck, createTsdocCoverageCheck, customerProfileBundle, diffApiRollups, docsSyncBundle, emptyCategoryBuckets, extractApiProcedure, extractDocReferences, extractFencedSamples, formatLayoutViolation, formatStarlightSingletonViolation, getLatestEligibleVersion, githubIssueTypeForTitle, githubWorkflowBundle, hasAnyDocsEmittingBundle, hasAnyDownstreamIssueKindBundle, includeHiddenFilesInBuildArtifact, industryDiscoveryBundle, isPhaseLabelOwnedByExcluded, isScheduledTaskOwnedByExcluded, isSuppressedWorkflowRule, isTypeLabelOwnedByExcluded, issueTemplatesChildGlob, issueTemplatesGeneratedPath, jestBundle, labelsForPhase, maintenanceAuditBundle, meetingAnalysisBundle, mergeCdkOptions, nextRequirementIdProcedure, orchestratorBundle, parseApiRollup, peopleProfileBundle, persistAuditReport, pinPnpmActionSetup, pinSetupNodeVersion, pnpmBundle, prReviewBundle, projenBundle, referenceRecordToFinding, regulatoryResearchBundle, renderAgentTierCaseStatement, renderAgentTierSection, renderCdkAcknowledge, renderCdkBootstrap, renderCdkContext, renderCdkDeploy, renderCdkDestroy, renderCdkDiff, renderCdkDocs, renderCdkDoctor, renderCdkDrift, renderCdkFlags, renderCdkGc, renderCdkImport, renderCdkInit, renderCdkList, renderCdkMetadata, renderCdkMigrate, renderCdkNotices, renderCdkOrphan, renderCdkPublishAssets, renderCdkRefactor, renderCdkRollback, renderCdkSynth, renderCdkWatch, renderCheckDocSamplesProcedure, renderCheckLinksProcedure, renderCustomDocSectionBlock, renderCustomDocSections, renderExtractApiProcedure, renderFocusSection, renderGithubIssueTypeSection, renderGithubIssueTypeSectionLines, renderIssueTemplateLabelsCheckerScript, renderIssueTemplatesBundleHook, renderIssueTemplatesCheckerScript, renderIssueTemplatesGeneratedPage, renderIssueTemplatesRuleContent, renderIssueTemplatesStarterPage, renderIssueTypeAssignmentBlanket, renderIssueTypeAssignmentStep, renderMeetingTypesSection, renderNextRequirementIdProcedure, renderPhaseTypeInvariantSection, renderPhaseTypeInvariantShellHelpers, renderPriorityRulesSection, renderProgressFileName, renderProgressFilePath, renderProgressFilesBundleHook, renderProgressFilesRuleContent, renderRequirementBlock, renderRunRatioSection, renderRunRatioShellHelpers, renderScheduledTaskSkillFile, renderScheduledTasksSection, renderScopeGateSection, renderScopeGateShellHelpers, renderSetIssueTypeFallbackLines, renderSharedEditingBundleHook, renderSharedEditingHelperScript, renderSharedEditingRuleContent, renderSkillEvalsBundleHook, renderSkillEvalsRuleContent, renderSkillEvalsRunnerScript, renderSourceTierExamples, renderStripToolArtifactTagsProcedure, renderTemporalFramingCheckerScript, renderTemporalFramingRuleContent, renderTitlePrefixTypeBullets, renderUnblockDependentsScript, renderUnblockDependentsSection, requirementsAnalystBundle, requirementsReviewerBundle, requirementsWriterBundle, researchPipelineBundle, resolveAgentPaths, resolveAgentTiers, resolveAstroProjectOutdir, resolveAwsCdkProjectOutdir, resolveBuildPolicy, resolveIssueDefaults, resolveIssueTemplates, resolveModelAlias, resolveOrchestratorAssets, resolveOutdirFromPackageName, resolveOverrideForLabels, resolvePrReviewPolicy, resolveProgressFiles, resolveReactViteSiteProjectOutdir, resolveRunRatio, resolveScheduledTasks, resolveScopeGate, resolveSharedEditing, resolveSkillEvals, resolveTemplateVariables, resolveTemporalFraming, resolveTypeLabelForLabels, resolveTypeScriptProjectOutdir, resolveUnblockDependents, runScan, slackBundle, softwareProfileBundle, standardsResearchBundle, stripToolArtifactTagsProcedure, tsdocRecordToFindings, turborepoBundle, typeLabelForPhaseLabel, typescriptBundle, upstreamConfigulatorDocsBundle, validateAgentTierConfig, validateIssueDefaultsConfig, validateIssueTemplatesConfig, validateMonorepoLayout, validatePrReviewPolicyConfig, validateProgressFilesConfig, validateRunRatioConfig, validateScheduledTasksConfig, validateScopeGateConfig, validateSharedEditingConfig, validateSkillEvalsConfig, validateStarlightSingleton, validateTemporalFramingConfig, validateUnblockDependentsConfig, vitestBundle };
|
|
14174
|
+
export type { ActionItemFilingConfig, ActivateBranchNameEnvVarOptions, AddStorybookOptions, AgentCommand, AgentConfigOptions, AgentExpansionRules, AgentFeaturesConfig, AgentModel, AgentPathsConfig, AgentPlatform, AgentPlatformOverrides, AgentProcedure, AgentRegistryEntry, AgentRule, AgentRuleBundle, AgentRuleScope, AgentSkill, AgentSubAgent, AgentSubAgentPlatformOverrides, AgentTier, AgentTierConfig, AgentTierEntry, AnalyzeTsDocCoverageOptions, ApiDiffCheckOptions, ApiDiffFinding, ApiDiffResult, ApiExtractorOptions, ApiExtractorReportOptions, ApiSurfaceEntry, ApproveMergeUpgradeOptions, AstroConfigOptions, AstroIntegrationSpec, AstroProjectOptions, AuditCheckRunner, AuditCheckRunnerContext, AuditFinding, AuditFindingBase, AuditLocation, AuditReport, AwsAccount, AwsCdkProjectOptions, AwsDeploymentTargetOptions, AwsLocalDeploymentConfig, AwsOrganization, AwsRegion, AwsTeardownWorkflowOptions, BundleOwnership, CdkAcknowledgeOptions, CdkBootstrapOptions, CdkCliOptions, CdkContextOptions, CdkDeployMethod, CdkDeployOptions, CdkDestroyOptions, CdkDiffMethod, CdkDiffOptions, CdkDocsOptions, CdkDoctorOptions, CdkDriftOptions, CdkFlagsOptions, CdkGcAction, CdkGcOptions, CdkGcType, CdkGlobalOptions, CdkImportOptions, CdkInitLanguage, CdkInitOptions, CdkInitTemplate, CdkListOptions, CdkMetadataOptions, CdkMigrateOptions, CdkNoticesOptions, CdkOrphanOptions, CdkProgress, CdkPublishAssetsOptions, CdkRefactorOptions, CdkRequireApproval, CdkRollbackOptions, CdkSynthOptions, CdkTargetOverrides, CdkWatchOptions, CiDeploymentConfig, ClassTypeOptions, ClaudeAutoModeConfig, ClaudeHookAction, ClaudeHookEntry, ClaudeHooksConfig, ClaudeMdConfig, ClaudePermissionsConfig, ClaudeRuleTarget, ClaudeSandboxConfig, ClaudeSettingsConfig, CompileFencedSamplesOptions, CopilotHandoff, CursorHookAction, CursorHooksConfig, CursorSettingsConfig, CustomDocSection, DeployWorkflowOptions, DeploymentMetadata, DocReferenceRecord, EffectiveScopeThresholds, ExtractDocReferencesOptions, ExtractFencedSamplesOptions, FencedSampleRecord, FocusArea, FocusAreaMatch, FocusConfig, GitBranch, GitHubBoardMetadata, GitHubProjectMetadata, GitHubSprintMetadata, GithubIssueType, IDependencyResolver, IssueDefaultsConfig, IssueDefaultsOverride, IssueDefaultsPriority, IssueDefaultsStatus, IssueTemplateRecipeStub, IssueTemplatesConfig, IssueTypeAssignmentStepOptions, LabelDefinition, LayoutEnforcement, LayoutViolation, LinkFailureFinding, McpServerConfig, McpTransport, MeetingArea, MeetingScope, MeetingType, MeetingTypeKind, MeetingsConfig, MergeMethod, MonorepoLayoutRoot, MonorepoPnpmOptions, MonorepoProjectOptions, OrganizationMetadata, PhaseLabelTypeOutcome, PhaseLabelTypeResolution, PnpmWorkspaceOptions, PrReviewAutoMergeConfig, PrReviewCiVerificationConfig, PrReviewPolicyConfig, PriorityRule, ProgressFilesConfig, ProjectMetadataOptions, ReactViteSiteProjectOptions, ReferenceMismatchCheckOptions, ReferenceMismatchFinding, RemoteCacheOptions, RepositoryMetadata, RequirementBlockFields, RequirementCategoryDirsConfig, RequirementIssueTemplateOptions, ResetTaskOptions, ResolvedAgentPaths, ResolvedAgentTier, ResolvedBaseConventions, ResolvedBuildPolicy, ResolvedIssueDefaults, ResolvedIssueDefaultsEntry, ResolvedIssueTemplates, ResolvedOrchestratorConventions, ResolvedPrReviewAutoMerge, ResolvedPrReviewPolicy, ResolvedProgressFiles, ResolvedProjectMetadata, ResolvedRequirementCategoryDirs, ResolvedRuleConventions, ResolvedRunRatio, ResolvedScheduledTask, ResolvedScheduledTasks, ResolvedScopeGate, ResolvedScopeGateBundleOverride, ResolvedSharedEditing, ResolvedSkillEvals, ResolvedTemporalFraming, ResolvedUnblockDependents, RunRatioConfig, RunScanOptions, RunScanResult, SampleCompilationFailure, SampleFailureFinding, ScheduledTaskEntry, ScheduledTaskModel, ScheduledTaskOverride, ScheduledTasksConfig, ScopeClass, ScopeGateBundleOverride, ScopeGateConfig, ScopeGateThresholds, SharedEditingConfig, SkillEvalsConfig, SlackMetadata, SourceTierExamples, StarlightEditLink, StarlightLogo, StarlightProjectOptions, StarlightRole, StarlightSidebarItem, StarlightSingletonViolation, StarlightSocialLink, SyncLabelsOptions, TemplateResolveResult, TemporalFramingCategory, TemporalFramingConfig, TsDocCoverageRecord, TsdocConfigOptions, TsdocCoverageCheckOptions, TsdocCoverageFinding, TurboRepoOptions, TurboRepoTaskOptions, TurboRunContinue, TurboRunDryRun, TurboRunLogOrder, TurboRunLogPrefix, TurboRunOptions, TurboRunOutputLogs, TypeScriptProjectOptions, UnblockDependentsConfig, UpstreamConfigulatorConfig, VersionKey, VitestConfigOptions, VitestOptions };
|