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