@codedrifters/configulator 0.0.266 → 0.0.268

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.ts CHANGED
@@ -1510,235 +1510,1716 @@ interface AgentFeaturesConfig {
1510
1510
  }
1511
1511
  /*******************************************************************************
1512
1512
  *
1513
- * AgentConfig Options
1513
+ * Agent Tier Config
1514
1514
  *
1515
1515
  ******************************************************************************/
1516
1516
  /**
1517
- * Options for the AgentConfig component.
1517
+ * A single consumer-supplied agent-type → funnel-tier mapping.
1518
+ *
1519
+ * The `type` field is the GitHub `type:*` label value **without** the
1520
+ * `type:` prefix (e.g. supply `"company-profile"`, not
1521
+ * `"type:company-profile"`). The `tier` field is a funnel tier in the
1522
+ * range **0–4**:
1523
+ *
1524
+ * - **0 — routing.** Unblocks other work. Picked first on a priority tie.
1525
+ * - **1 — research.** Feeds downstream pipelines.
1526
+ * - **2 — profiles.** Consumes research.
1527
+ * - **3 — synthesis.** Produces deliverables.
1528
+ * - **4 — support.** Important but not pipeline-critical.
1529
+ *
1530
+ * The `orchestrator` bundle validates this value at synth time and
1531
+ * fails the build when the tier is outside 0–4 or when `type` is
1532
+ * empty/whitespace.
1533
+ *
1534
+ * @see AgentTierConfig
1535
+ * @see ./bundles/tiers.ts#renderAgentTierSection
1518
1536
  */
1519
- interface AgentConfigOptions {
1537
+ interface AgentTierEntry {
1520
1538
  /**
1521
- * Target platforms to generate configuration for.
1522
- * @default [AGENT_PLATFORM.CURSOR, AGENT_PLATFORM.CLAUDE]
1539
+ * GitHub `type:*` label value (without the `type:` prefix).
1540
+ * @example 'research', 'company-profile', 'requirement'
1523
1541
  */
1524
- readonly platforms?: ReadonlyArray<AgentPlatform>;
1542
+ readonly type: string;
1525
1543
  /**
1526
- * Additional agent rules to generate alongside auto-detected and bundled rules.
1527
- * Custom rules override bundled rules of the same name.
1544
+ * Funnel tier 0–4. Lower tiers dispatch first when priority is tied.
1528
1545
  */
1529
- readonly rules?: ReadonlyArray<AgentRule>;
1546
+ readonly tier: 0 | 1 | 2 | 3 | 4;
1547
+ }
1548
+ /**
1549
+ * Funnel-tier configuration consumed by the `orchestrator` bundle.
1550
+ *
1551
+ * The orchestrator sorts eligible issues by
1552
+ * **priority desc → tier asc → issue number asc**. Lower tier numbers
1553
+ * win ties on priority so research work feeds downstream pipelines
1554
+ * before synthesis consumes attention.
1555
+ *
1556
+ * Every field is optional. When the whole config is absent the
1557
+ * orchestrator renders its built-in default tier table (matching the
1558
+ * openhi `DISPATCHER.md` source). Two override knobs are supported:
1559
+ *
1560
+ * - `tiers` — **replace** the default list wholesale. Rare; reserved
1561
+ * for repos that want a bespoke taxonomy end-to-end.
1562
+ * - `customTypes` — **extend** whichever list is in play. Entries
1563
+ * with a `type` that already exists in the default (or replacement)
1564
+ * list win — consumer overrides take precedence.
1565
+ *
1566
+ * @see AgentTierEntry
1567
+ * @see ./bundles/tiers.ts#resolveAgentTiers
1568
+ */
1569
+ interface AgentTierConfig {
1530
1570
  /**
1531
- * Additional skills to generate.
1571
+ * Replacement tier list. When supplied, the built-in default list
1572
+ * is discarded and this list is used as the base before
1573
+ * `customTypes` are merged in. Supply an empty array is an error —
1574
+ * omit the field to keep the defaults.
1532
1575
  */
1533
- readonly skills?: ReadonlyArray<AgentSkill>;
1576
+ readonly tiers?: ReadonlyArray<AgentTierEntry>;
1534
1577
  /**
1535
- * Custom sub-agent definitions.
1578
+ * Additional tier mappings merged on top of whatever list is in
1579
+ * play (default or replacement). Later entries override earlier
1580
+ * entries on `type` collision, so consumer-supplied mappings win
1581
+ * over the built-in defaults.
1536
1582
  */
1537
- readonly subAgents?: ReadonlyArray<AgentSubAgent>;
1583
+ readonly customTypes?: ReadonlyArray<AgentTierEntry>;
1584
+ }
1585
+ /*******************************************************************************
1586
+ *
1587
+ * Scope Gate Config
1588
+ *
1589
+ ******************************************************************************/
1590
+ /**
1591
+ * Threshold pair describing the inclusive upper bounds of the `small` /
1592
+ * `medium` scope classes. Any issue above `medium` is classified `large`
1593
+ * and rejected by the scope gate.
1594
+ *
1595
+ * Every issue is scored on two signals read from the issue body:
1596
+ *
1597
+ * - **Acceptance criteria** — the count of checkbox lines
1598
+ * (`- [ ]` / `- [x]`) under the issue's `## Acceptance Criteria`
1599
+ * section.
1600
+ * - **Sources** — the count of bullet list items under the issue's
1601
+ * `## Inputs` / `## References` / `## Sources` sections (whichever
1602
+ * exists; they're summed if multiple exist).
1603
+ *
1604
+ * `small` requires **both** counts to be at or below `smallMax`.
1605
+ * `medium` requires **both** counts to be at or below `mediumMax`.
1606
+ * Anything above `mediumMax` on either axis is `large`.
1607
+ *
1608
+ * @see ScopeGateConfig
1609
+ * @see ./bundles/scope-gate.ts#classifyIssueScope
1610
+ */
1611
+ interface ScopeGateThresholds {
1538
1612
  /**
1539
- * Custom procedure definitions (executable shell scripts).
1613
+ * Inclusive upper bound on the `acceptance-criteria` / `sources`
1614
+ * count for the **small** scope class.
1540
1615
  */
1541
- readonly procedures?: ReadonlyArray<AgentProcedure>;
1616
+ readonly smallMax: number;
1542
1617
  /**
1543
- * MCP server configurations. Cross-platform rendered to the appropriate
1544
- * config file for each platform.
1618
+ * Inclusive upper bound on the `acceptance-criteria` / `sources`
1619
+ * count for the **medium** scope class. Must be strictly greater
1620
+ * than `smallMax`.
1545
1621
  */
1546
- readonly mcpServers?: Readonly<Record<string, McpServerConfig>>;
1622
+ readonly mediumMax: number;
1623
+ }
1624
+ /**
1625
+ * Scope-gate configuration consumed by the `orchestrator` bundle.
1626
+ *
1627
+ * The scope gate rejects oversized issues at dispatch time and
1628
+ * instructs the orchestrator to decompose them into phased sub-issues
1629
+ * instead of claiming a worker session for a multi-hour task. The
1630
+ * gate reads the **issue body only** — it does not inspect the
1631
+ * repository. Heuristics are deliberately repo-agnostic so any
1632
+ * consuming repo can adopt the contract without customizing code.
1633
+ *
1634
+ * Two threshold dials control the classification:
1635
+ *
1636
+ * - `acceptanceCriteria` — counts of checkbox lines under the issue's
1637
+ * `## Acceptance Criteria` section.
1638
+ * - `sources` — counts of bullet list items under the issue's
1639
+ * `## Inputs` / `## References` / `## Sources` sections.
1640
+ *
1641
+ * An issue is classified **small** when both counts are at or below
1642
+ * the `small` thresholds, **medium** when both are at or below the
1643
+ * `medium` thresholds, and **large** otherwise. Large issues are
1644
+ * rejected — the orchestrator applies `status:needs-attention`,
1645
+ * posts a decomposition proposal comment, and (when `autoFile` is
1646
+ * true) files the proposed phased sub-issues automatically.
1647
+ *
1648
+ * Consumers may override the per-axis thresholds, the decomposition
1649
+ * comment template, and the auto-file toggle. When the whole config
1650
+ * is absent the orchestrator applies openhi's published defaults
1651
+ * (small: ≤3 AC + ≤2 sources; medium: ≤6 AC + ≤5 sources).
1652
+ *
1653
+ * Malformed configs — thresholds that are negative, non-integer, or
1654
+ * inverted (medium ≤ small) — fail the build at synth time via
1655
+ * `validateScopeGateConfig`.
1656
+ *
1657
+ * @see ScopeGateThresholds
1658
+ * @see ./bundles/scope-gate.ts#resolveScopeGate
1659
+ * @see ./bundles/scope-gate.ts#validateScopeGateConfig
1660
+ * @see ./bundles/scope-gate.ts#renderScopeGateSection
1661
+ */
1662
+ interface ScopeGateConfig {
1547
1663
  /**
1548
- * Whether to automatically detect and include context-aware rule bundles
1549
- * based on project introspection.
1550
- * @default true
1664
+ * Master switch for the scope gate. When `false`, the orchestrator
1665
+ * dispatches issues of every size and no decomposition proposal is
1666
+ * posted. Defaults to `true` — scope gating is on by default.
1551
1667
  */
1552
- readonly autoDetectBundles?: boolean;
1668
+ readonly enabled?: boolean;
1553
1669
  /**
1554
- * Explicit list of bundle names to include, regardless of auto-detection.
1555
- * @example ['vitest', 'aws-cdk']
1670
+ * Classification thresholds for **acceptance-criteria counts**
1671
+ * (checkbox lines under `## Acceptance Criteria`).
1672
+ * Defaults to `{ smallMax: 3, mediumMax: 6 }` — openhi's published
1673
+ * heuristic.
1556
1674
  */
1557
- readonly includeBundles?: ReadonlyArray<string>;
1675
+ readonly acceptanceCriteria?: ScopeGateThresholds;
1558
1676
  /**
1559
- * Bundle names to exclude even if auto-detection would include them.
1560
- * @example ['jest']
1677
+ * Classification thresholds for **source counts** (bullet list
1678
+ * items under the issue's `## Inputs` / `## References` /
1679
+ * `## Sources` sections). Defaults to `{ smallMax: 2, mediumMax: 5 }`.
1561
1680
  */
1562
- readonly excludeBundles?: ReadonlyArray<string>;
1681
+ readonly sources?: ScopeGateThresholds;
1563
1682
  /**
1564
- * Whether to include the base rule set (project-overview, general conventions).
1565
- * @default true
1683
+ * When `true`, the orchestrator files the proposed phased
1684
+ * sub-issues automatically after posting the decomposition
1685
+ * proposal comment. When `false` (the default), it posts the
1686
+ * proposal and stops — a human is expected to file the sub-issues.
1687
+ *
1688
+ * Autofile is **opt-in** because sub-issue creation permanently
1689
+ * modifies the project state; repos that adopt the feature should
1690
+ * validate the decomposition template first and graduate to
1691
+ * autofile once they trust the output.
1692
+ * @default false
1566
1693
  */
1567
- readonly includeBaseRules?: boolean;
1694
+ readonly autoFile?: boolean;
1568
1695
  /**
1569
- * Names of individual rules to exclude from any source.
1696
+ * Override for the decomposition-proposal comment body posted on
1697
+ * a rejected `large` issue. When unset, the bundle ships a generic
1698
+ * template that the orchestrator fills in with the classified axis
1699
+ * (`acceptance-criteria` / `sources`), the observed counts, and a
1700
+ * boilerplate `Phase 1 / Phase 2 / Phase 3` skeleton for the agent
1701
+ * to refine.
1702
+ *
1703
+ * The override string may embed the following placeholders — the
1704
+ * orchestrator substitutes them at comment-composition time:
1705
+ *
1706
+ * - `<AC_COUNT>` — observed acceptance-criteria count.
1707
+ * - `<SOURCES_COUNT>` — observed sources count.
1708
+ * - `<AC_LIMIT>` — the `acceptanceCriteria.mediumMax` threshold
1709
+ * the issue tripped.
1710
+ * - `<SOURCES_LIMIT>` — the `sources.mediumMax` threshold the
1711
+ * issue tripped.
1712
+ *
1713
+ * Placeholders use the angle-bracketed uppercase-snake form — not
1714
+ * `{{curly-brace}}` form — because `AgentConfig`'s template
1715
+ * resolver claims the curly-brace namespace at rule generation
1716
+ * time and would rewrite `{{acCount}}` to `<acCount>` before the
1717
+ * agent ever saw it.
1718
+ *
1719
+ * Placeholder substitution is performed by the orchestrator at
1720
+ * runtime — configulator emits the template verbatim.
1570
1721
  */
1571
- readonly excludeRules?: ReadonlyArray<string>;
1722
+ readonly decompositionTemplate?: string;
1723
+ }
1724
+ /*******************************************************************************
1725
+ *
1726
+ * Run Ratio Config
1727
+ *
1728
+ ******************************************************************************/
1729
+ /**
1730
+ * Run-ratio configuration consumed by the `orchestrator` bundle.
1731
+ *
1732
+ * The orchestrator keeps a persistent run counter and interleaves
1733
+ * **dispatch runs** (pick the next ready issue, recommend a worker)
1734
+ * with **housekeeping runs** (batch PR review + maintenance scan) on
1735
+ * a configurable dispatch-to-housekeeping ratio. This mirrors
1736
+ * openhi's `DISPATCHER.md` 4:1 cadence — four dispatch runs feed the
1737
+ * worker queue, then one batched housekeeping run flushes the
1738
+ * review backlog and runs maintenance triage so the pipeline never
1739
+ * drifts.
1740
+ *
1741
+ * The counter persists in a small gitignored JSON state file
1742
+ * (default `.claude/state/orchestrator-runs.json`). Every orchestrator
1743
+ * invocation ticks the counter once and classifies the run based on
1744
+ * `runCounter % (ratio + 1) == 0` — the `ratio + 1`th run in every
1745
+ * cycle is a housekeeping run, all others dispatch.
1746
+ *
1747
+ * Every field is optional. When the whole config is absent the
1748
+ * orchestrator ships with openhi's 4:1 defaults baked in (4 dispatch
1749
+ * runs, 1 housekeeping run, state file at the default path,
1750
+ * `opus` / `sonnet` recommended models).
1751
+ *
1752
+ * Malformed configs — non-integer or non-positive `ratio`, empty or
1753
+ * absolute `stateFilePath` — fail the build at synth time via
1754
+ * `validateRunRatioConfig`.
1755
+ *
1756
+ * @see ./bundles/run-ratio.ts#resolveRunRatio
1757
+ * @see ./bundles/run-ratio.ts#validateRunRatioConfig
1758
+ * @see ./bundles/run-ratio.ts#renderRunRatioSection
1759
+ */
1760
+ interface RunRatioConfig {
1572
1761
  /**
1573
- * Additional content to append to existing rules (from bundles or custom rules).
1574
- * Keys are rule names, values are markdown content appended after a horizontal rule.
1575
- * Use this to supplement bundle rules with project-specific additions without
1576
- * replacing the entire rule.
1577
- *
1578
- * @example
1579
- * ```ts
1580
- * ruleExtensions: {
1581
- * 'typescript-conventions': '## Additional Conventions\n\n- Use branded types for IDs',
1582
- * }
1583
- * ```
1762
+ * Master switch for the run-ratio pipeline. When `false`, every
1763
+ * orchestrator run executes the full dispatch pipeline and no
1764
+ * housekeeping batching is performed; PR review and maintenance
1765
+ * remain manual invocations. Defaults to `true` — ratio-based
1766
+ * batching is on by default.
1584
1767
  */
1585
- readonly ruleExtensions?: Readonly<Record<string, string>>;
1768
+ readonly enabled?: boolean;
1586
1769
  /**
1587
- * Claude Code settings.json configuration.
1588
- * Generated to .claude/settings.json (committed, team-shared).
1770
+ * Number of dispatch runs per housekeeping run. With `ratio = 4`,
1771
+ * runs 1–4 dispatch and run 5 housekeeps; the counter then wraps.
1772
+ * The cycle length is therefore `ratio + 1` runs.
1773
+ *
1774
+ * Must be a positive integer (`ratio >= 1`). Defaults to `4` —
1775
+ * the openhi-published cadence.
1589
1776
  */
1590
- readonly claudeSettings?: ClaudeSettingsConfig;
1777
+ readonly ratio?: number;
1591
1778
  /**
1592
- * Cursor-specific configuration. Generates .cursor/hooks.json for
1593
- * lifecycle hooks and .cursorignore / .cursorindexingignore for
1594
- * file visibility control.
1779
+ * Path to the run-counter state file, relative to the repo root.
1780
+ * The orchestrator reads, increments, and writes back this file on
1781
+ * every invocation. The file is tiny JSON (`{ "run_counter": <n> }`)
1782
+ * and is expected to be gitignored — each operator's orchestrator
1783
+ * session maintains its own counter.
1784
+ *
1785
+ * Must be a non-empty relative path (no leading `/`). Defaults to
1786
+ * `.claude/state/orchestrator-runs.json`.
1595
1787
  */
1596
- readonly cursorSettings?: CursorSettingsConfig;
1788
+ readonly stateFilePath?: string;
1597
1789
  /**
1598
- * Overrides for the output-path roots used by agent bundles
1599
- * (requirements, BCM, profiles, meetings, research). Unset fields
1600
- * fall back to the defaults captured in
1601
- * `bundles/paths.ts#DEFAULT_AGENT_PATHS`.
1790
+ * Human-readable label for the model recommended on dispatch runs.
1791
+ * Rendered verbatim into the orchestrator-conventions rule so the
1792
+ * operator knows which model to run each dispatch session against.
1793
+ * Configulator does **not** set `model:` frontmatter on the
1794
+ * sub-agent — the label is informational.
1602
1795
  *
1603
- * This option is the first of the Group A framework injection
1604
- * points from epic #414. Per-project propagation of these values
1605
- * into bundle rule content lands in a follow-up — setting it today
1606
- * does not yet alter generated rules.
1796
+ * Defaults to `"opus"`.
1607
1797
  */
1608
- readonly paths?: AgentPathsConfig;
1798
+ readonly dispatchModel?: string;
1609
1799
  /**
1610
- * Project-specific priority-detection rules. Each rule declares a
1611
- * match predicate (labels, title regex, body regex, or explicit
1612
- * issue numbers) and a target `priority:*` tier.
1800
+ * Human-readable label for the model recommended on housekeeping
1801
+ * runs. See `dispatchModel` for the rendering contract.
1802
+ * Housekeeping is mechanical (batch PR review + maintenance scan)
1803
+ * so a cheaper model is the documented recommendation.
1613
1804
  *
1614
- * When non-empty, the `base` bundle renders a "Project-specific
1615
- * priority rules" subsection into the `issue-label-conventions`
1616
- * rule. Precedence is **first match wins**; the bundle's default
1617
- * inference heuristics act as the fallback when no rule matches.
1805
+ * Defaults to `"sonnet"`.
1806
+ */
1807
+ readonly housekeepingModel?: string;
1808
+ }
1809
+ /*******************************************************************************
1810
+ *
1811
+ * Pre-flight PR merge Config
1812
+ *
1813
+ ******************************************************************************/
1814
+ /**
1815
+ * Pre-flight PR merge configuration consumed by the `orchestrator`
1816
+ * bundle.
1817
+ *
1818
+ * The pre-flight step (vortex `CLAUDE.md` step 0b) runs **before** the
1819
+ * orchestrator's triage walk so eligible PRs land before the unblock
1820
+ * and queue-scan phases read dependency state. Without it, an issue
1821
+ * whose only remaining blocker is an approved-but-not-yet-merged PR
1822
+ * shows up as blocked on every dispatch cycle — the pipeline thrashes
1823
+ * on stale dependency state.
1824
+ *
1825
+ * The sweep is idempotent: `gh pr merge` on an already-merged PR is a
1826
+ * no-op, so re-running pre-flight on every orchestrator invocation
1827
+ * (dispatch **and** housekeeping) is safe and cheap. Eligibility is
1828
+ * read by the `check-blocked.sh preflight` subcommand and returned as
1829
+ * one line per candidate PR for the orchestrator to act on.
1830
+ *
1831
+ * Every field is optional. When the whole config is absent the
1832
+ * orchestrator ships with vortex's published defaults baked in
1833
+ * (pre-flight enabled, delegated to the `pr-reviewer` sub-agent so the
1834
+ * merge workflow runs on a cheaper model, squash merges, linked-issue
1835
+ * keyword required).
1836
+ *
1837
+ * Malformed configs — unknown `mergeMethod`, empty / whitespace-only
1838
+ * `eligibleLabels` entries — fail the build at synth time via
1839
+ * `validatePreflightPrConfig`.
1840
+ *
1841
+ * @see ./bundles/preflight-pr.ts#resolvePreflightPr
1842
+ * @see ./bundles/preflight-pr.ts#validatePreflightPrConfig
1843
+ * @see ./bundles/preflight-pr.ts#renderPreflightPrSection
1844
+ */
1845
+ interface PreflightPrConfig {
1846
+ /**
1847
+ * Master switch for the pre-flight sweep. When `false`, the
1848
+ * orchestrator skips pre-flight entirely; PR merges land via the
1849
+ * existing batch PR review step on housekeeping runs or via a
1850
+ * human operator.
1618
1851
  *
1619
- * @see PriorityRule
1620
- * @see ./bundles/priority-rules.ts#renderPriorityRulesSection
1852
+ * Defaults to `true` — pre-flight is on by default. Repos that
1853
+ * want to keep merges manual should set this to `false` explicitly.
1621
1854
  */
1622
- readonly priorityRules?: ReadonlyArray<PriorityRule>;
1855
+ readonly enabled?: boolean;
1623
1856
  /**
1624
- * Focus-scoring configuration. Declares the path to the consuming
1625
- * repo's `focus.json` file, score thresholds, and the
1626
- * agent-expansion rules that govern what agents may append to the
1627
- * file.
1857
+ * Whether the orchestrator delegates the pre-flight sweep to the
1858
+ * `pr-reviewer` sub-agent. Mirrors vortex's step 0b contract:
1859
+ * invoking the reviewer as a sub-agent lets the merge workflow run
1860
+ * on its own (cheaper) model rather than on the orchestrator's
1861
+ * more expensive model budget.
1628
1862
  *
1629
- * When set, the `base` bundle appends a "Focus scoring"
1630
- * subsection to the `issue-label-conventions` rule that teaches
1631
- * agents (a) how to read `focus.json`, (b) how focus weight
1632
- * interacts with the `priority:*` taxonomy, and (c) the
1633
- * agent-driven expansion contract. The actual `focus.json` file
1634
- * is authored and curated in the consuming repo — configulator
1635
- * ships the schema and agent instructions only.
1863
+ * Set to `false` to have the orchestrator merge eligible PRs inline
1864
+ * without delegation (useful in pipelines that have not wired a
1865
+ * `pr-reviewer` sub-agent).
1636
1866
  *
1637
- * @see FocusConfig
1638
- * @see FocusArea
1639
- * @see AgentExpansionRules
1640
- * @see ./bundles/focus.ts#renderFocusSection
1867
+ * Defaults to `true`.
1641
1868
  */
1642
- readonly focus?: FocusConfig;
1869
+ readonly delegateToPrReviewer?: boolean;
1643
1870
  /**
1644
- * Meeting-analysis injection points typed configs the
1645
- * `meeting-analysis` bundle consults when classifying, routing, and
1646
- * templating meetings. Supplies the meeting-type taxonomy, the
1647
- * area doc-root routing map, and the agenda-template root used
1648
- * by the (future) `agenda` bundle.
1649
- *
1650
- * When `meetingTypes` is non-empty, the `meeting-analysis` bundle
1651
- * appends a "Recognized meeting types" subsection to the
1652
- * `meeting-processing-workflow` rule. When `meetingAreas` is
1653
- * non-empty, it appends an "Area → doc-root mapping" subsection.
1654
- * When both are empty or unset, the generated rule content is
1655
- * unchanged from the no-config baseline.
1871
+ * Merge method used when the orchestrator merges a PR inline
1872
+ * (`delegateToPrReviewer = false`). Maps to the `gh pr merge`
1873
+ * flags: `squash` `--squash`, `merge` `--merge`, `rebase`
1874
+ * → `--rebase`.
1656
1875
  *
1657
- * @see MeetingsConfig
1658
- * @see MeetingType
1659
- * @see MeetingArea
1660
- * @see ./bundles/meeting-types.ts#renderMeetingTypesSection
1876
+ * Defaults to `"squash"` — squash-and-merge matches every existing
1877
+ * configulator consumer and keeps `main` free of
1878
+ * branch-construction noise.
1661
1879
  */
1662
- readonly meetings?: MeetingsConfig;
1880
+ readonly mergeMethod?: "squash" | "merge" | "rebase";
1663
1881
  /**
1664
- * Framework injection points for source-tier customization and
1665
- * custom doc sections.
1882
+ * Whether pre-flight skips PRs that lack a
1883
+ * `Closes/Fixes/Resolves #<n>` keyword in the body. Most pipelines
1884
+ * require a linked issue so the dependency graph stays intact, so
1885
+ * the safe default is `true` — pre-flight only merges PRs that
1886
+ * cleanly complete a known issue.
1666
1887
  *
1667
- * - `sourceTierExamples` domain-specific examples injected under
1668
- * T1 / T2 / T3 / T4 in the base bundle's "Source Quality &
1669
- * Verification" rule.
1670
- * - `customDocSections` — consumer-supplied section templates that
1671
- * render verbatim after an existing section heading in a target
1672
- * bundle's rule content.
1888
+ * Set to `false` in repos that accept human-authored PRs with no
1889
+ * linked issue (docs-only changes, dependency bumps, etc.) and
1890
+ * still want pre-flight to land them.
1673
1891
  *
1674
- * Named feature toggles (`consortium-model`, `stealth-mode`, etc.)
1675
- * are intentionally out of scope here — build those on top of
1676
- * `customDocSections` inside the consuming repo's projen config.
1892
+ * Defaults to `true`.
1893
+ */
1894
+ readonly requireLinkedIssue?: boolean;
1895
+ /**
1896
+ * Optional allowlist of labels that, when present on a PR, gate
1897
+ * eligibility. When the list is empty (the default) every open PR
1898
+ * that otherwise satisfies the eligibility checks qualifies;
1899
+ * supplying a non-empty list restricts pre-flight to PRs carrying
1900
+ * at least one of the listed labels.
1677
1901
  *
1678
- * @see AgentFeaturesConfig
1679
- * @see SourceTierExamples
1680
- * @see CustomDocSection
1681
- * @see ./bundles/features.ts
1902
+ * Use this to opt specific pipelines in — for example,
1903
+ * `['origin:issue-worker']` restricts pre-flight to bot-authored
1904
+ * PRs, leaving human-authored PRs for the normal review path.
1905
+ *
1906
+ * Every entry must be a non-empty string; empty / whitespace-only
1907
+ * entries fail the build via `validatePreflightPrConfig`.
1682
1908
  */
1683
- readonly features?: AgentFeaturesConfig;
1909
+ readonly eligibleLabels?: ReadonlyArray<string>;
1684
1910
  }
1685
-
1911
+ /*******************************************************************************
1912
+ *
1913
+ * Unblock Dependents Config
1914
+ *
1915
+ ******************************************************************************/
1686
1916
  /**
1687
- * Generates AI coding assistant configuration files from a common schema.
1917
+ * Agent-driven unblocking configuration consumed by the `orchestrator`
1918
+ * bundle.
1688
1919
  *
1689
- * Supports Cursor and Claude Code (initial release), with Codex and Copilot
1690
- * renderers planned for future issues. Rules, skills, and sub-agents are
1691
- * defined once and rendered into the correct format for each target platform.
1920
+ * After any agent applies `status:done` to an issue, it runs a
1921
+ * targeted sweep against that issue's dependents open issues whose
1922
+ * body contains `Depends on: #<just-closed>`. Dependents whose full
1923
+ * dependency list is now closed flip from `status:blocked` to
1924
+ * `status:ready` immediately, without waiting for the next
1925
+ * orchestrator dispatch cycle. The sweep is implemented by the
1926
+ * shipped `.claude/procedures/unblock-dependents.sh` script.
1692
1927
  *
1693
- * Follows the configulator component pattern: extends Component, static .of()
1694
- * factory, options interface with JSDoc.
1928
+ * Every field is optional. When the whole config is absent the
1929
+ * orchestrator ships with the sweep **enabled** and a generic
1930
+ * "Dependencies resolved by #<n> — unblocking." citation comment.
1695
1931
  *
1696
- * @example
1697
- * ```ts
1698
- * new AgentConfig(project, {
1699
- * rules: [{
1700
- * name: 'my-rule',
1701
- * description: 'Project conventions',
1702
- * scope: AGENT_RULE_SCOPE.ALWAYS,
1703
- * content: '# My Rule\n\nFollow these conventions...',
1704
- * }],
1705
- * });
1706
- * ```
1932
+ * Malformed configs — empty / whitespace-only `commentTemplate` or
1933
+ * `partialUnblockCommentTemplate` — fail the build at synth time via
1934
+ * `validateUnblockDependentsConfig`.
1935
+ *
1936
+ * @see ./bundles/unblock-dependents.ts#resolveUnblockDependents
1937
+ * @see ./bundles/unblock-dependents.ts#validateUnblockDependentsConfig
1938
+ * @see ./bundles/unblock-dependents.ts#renderUnblockDependentsSection
1707
1939
  */
1708
- declare class AgentConfig extends Component {
1940
+ interface UnblockDependentsConfig {
1709
1941
  /**
1710
- * Find the AgentConfig component on a project.
1942
+ * Master switch for the agent-driven unblock sweep. When `false`,
1943
+ * agents skip the targeted sweep after applying `status:done`;
1944
+ * dependents wait for the next orchestrator dispatch (Phase C) to
1945
+ * pick up the resolved dependency.
1946
+ *
1947
+ * Defaults to `true` — the sweep is on by default. Repos that
1948
+ * want to keep label transitions manual should set this to `false`
1949
+ * explicitly.
1711
1950
  */
1712
- static of(project: Project): AgentConfig | undefined;
1951
+ readonly enabled?: boolean;
1713
1952
  /**
1714
- * Returns `true` when at least one tier array on the supplied
1715
- * `SourceTierExamples` is non-empty, signalling that the consuming
1716
- * repo has opted into rendering the base bundle's
1717
- * `source-quality-verification` rule. Returns `false` for
1718
- * `undefined`, `{}`, or a fully-empty `{ t1: [], t2: [], t3: [], t4: [] }`.
1953
+ * Override for the citation comment posted on each fully-unblocked
1954
+ * dependent. The string is interpolated at runtime by the shipped
1955
+ * shell script: `<CLOSED_ISSUE>` is replaced with the resolving
1956
+ * issue's `#<n>` reference.
1957
+ *
1958
+ * The placeholder syntax deliberately avoids `{{curly-brace}}` —
1959
+ * `AgentConfig`'s template resolver claims that namespace at rule
1960
+ * generation time.
1961
+ *
1962
+ * Defaults to `"Dependencies resolved by <CLOSED_ISSUE> — unblocking."`.
1719
1963
  */
1720
- private static hasActiveTierExamples;
1964
+ readonly commentTemplate?: string;
1721
1965
  /**
1722
- * Merges default Claude permissions with bundle and user-supplied settings.
1966
+ * Whether to post a partial-unblock comment on a dependent whose
1967
+ * full dependency list is **not** yet fully closed. When `true`,
1968
+ * each intermediate dependency resolution leaves a trail of
1969
+ * "still waiting on X" comments on the dependent — useful for
1970
+ * operator visibility on long dependency chains. When `false`,
1971
+ * partial resolutions are logged to the script's stdout only and
1972
+ * the dependent issue stays silent until the final dep closes.
1723
1973
  *
1724
- * Merge order: defaults bundle permissions user-supplied entries.
1725
- * `defaultMode` defaults to `"dontAsk"` unless overridden.
1974
+ * Defaults to `false` keeps issue threads clean by default.
1726
1975
  */
1727
- private static mergeClaudeDefaults;
1728
- private readonly options;
1729
- constructor(project: Project, options?: AgentConfigOptions);
1976
+ readonly flagPartialUnblockWithAttention?: boolean;
1730
1977
  /**
1731
- * Returns the bundles that are active for this project: auto-detected
1732
- * bundles (when `autoDetectBundles !== false`) plus force-included
1733
- * bundles, minus explicitly excluded bundles. Deduplicated by name.
1978
+ * Override for the partial-unblock comment posted when
1979
+ * `flagPartialUnblockWithAttention` is `true`. The string is
1980
+ * interpolated at runtime: `<CLOSED_ISSUE>` is replaced with the
1981
+ * just-resolved issue's `#<n>` reference, and `<OPEN_DEPS>` with
1982
+ * the space-separated list of remaining open dependencies
1983
+ * (e.g. `#45 #47`).
1734
1984
  *
1735
- * Exposed so sibling components (e.g. the sync-labels workflow) can
1736
- * consume bundle-contributed configuration.
1985
+ * Defaults to `"Dependency <CLOSED_ISSUE> resolved, but still waiting on: <OPEN_DEPS>."`.
1737
1986
  */
1738
- get activeBundles(): ReadonlyArray<AgentRuleBundle>;
1739
- preSynthesize(): void;
1740
- private resolvePlatforms;
1741
- private resolveRules;
1987
+ readonly partialUnblockCommentTemplate?: string;
1988
+ }
1989
+ /*******************************************************************************
1990
+ *
1991
+ * Progress Files Config
1992
+ *
1993
+ ******************************************************************************/
1994
+ /**
1995
+ * Progress-file convention consumed by the `base` bundle and every
1996
+ * phased-agent bundle (bcm-writer, research-pipeline, etc.).
1997
+ *
1998
+ * Every phased agent session writes a small progress file to disk as
1999
+ * its first action after claiming an issue, updates it after each
2000
+ * non-trivial step, and deletes it in the final commit that closes
2001
+ * the issue. If the session crashes, the next session reads the
2002
+ * progress file, confirms on-disk state matches reality, and resumes
2003
+ * from the next uncompleted step rather than starting from scratch.
2004
+ *
2005
+ * The convention complements the stale-branch decision tree — clone
2006
+ * recovery returns the checkout to the default branch; the progress
2007
+ * file restores the *deliverable* to a partially-complete state so
2008
+ * resumed work can build on it.
2009
+ *
2010
+ * Every field is optional. When the whole config is absent the
2011
+ * convention ships **enabled** with JSON-formatted files stored under
2012
+ * `.claude/state/<issue-number>-progress.json`.
2013
+ *
2014
+ * Malformed configs — empty / whitespace-only or absolute `stateDir`,
2015
+ * empty / whitespace-only `filenamePattern`, `filenamePattern` missing
2016
+ * the `<ISSUE_NUMBER>` placeholder, unknown `format`, non-positive
2017
+ * `staleAfterHours` — fail the build at synth time via
2018
+ * `validateProgressFilesConfig`.
2019
+ *
2020
+ * @see ./bundles/progress-files.ts#resolveProgressFiles
2021
+ * @see ./bundles/progress-files.ts#validateProgressFilesConfig
2022
+ * @see ./bundles/progress-files.ts#renderProgressFilesRuleContent
2023
+ */
2024
+ interface ProgressFilesConfig {
2025
+ /**
2026
+ * Master switch for the progress-file convention. When `false`,
2027
+ * the base bundle renders a short stub stating the project does not
2028
+ * enforce progress files; phased-agent bundles skip the
2029
+ * per-workflow "Progress File" injection. Partial-resume guidance
2030
+ * still renders because it applies even without a progress file.
2031
+ *
2032
+ * Defaults to `true` — the convention is on by default.
2033
+ */
2034
+ readonly enabled?: boolean;
2035
+ /**
2036
+ * Root directory (relative to the repo root) where progress files
2037
+ * are written. Must be a non-empty relative path (no leading `/`).
2038
+ * The directory is added to the project's `.gitignore` at synth
2039
+ * time so progress files never land on the default branch.
2040
+ *
2041
+ * Defaults to `.claude/state`.
2042
+ */
2043
+ readonly stateDir?: string;
2044
+ /**
2045
+ * Filename pattern for an individual progress file. The
2046
+ * `<ISSUE_NUMBER>` placeholder is substituted at runtime with the
2047
+ * numeric id of the issue the agent is working on (e.g.
2048
+ * `479-progress.json`).
2049
+ *
2050
+ * Must contain the `<ISSUE_NUMBER>` placeholder and must not
2051
+ * contain a `/` (use `stateDir` for the directory).
2052
+ *
2053
+ * The placeholder uses the angle-bracketed uppercase-snake form —
2054
+ * not `{{curly-brace}}` form — because `AgentConfig`'s template
2055
+ * resolver claims the curly-brace namespace at rule generation
2056
+ * time.
2057
+ *
2058
+ * Defaults to `"<ISSUE_NUMBER>-progress.json"`.
2059
+ */
2060
+ readonly filenamePattern?: string;
2061
+ /**
2062
+ * Serialization format for the progress-file body.
2063
+ *
2064
+ * - `"json"` (default) — machine-parseable JSON with a typed
2065
+ * schema. Preferred when scripted resume logic reads the file.
2066
+ * - `"markdown"` — human-readable markdown with a YAML frontmatter
2067
+ * block. Preferred for projects that treat the progress file as
2068
+ * an operator-visible log.
2069
+ */
2070
+ readonly format?: "json" | "markdown";
2071
+ /**
2072
+ * Whether the final commit that closes the issue must delete the
2073
+ * progress file. When `true` (the default), progress files are a
2074
+ * working-branch artefact and never land on the default branch.
2075
+ * When `false`, progress files are retained as an audit trail.
2076
+ *
2077
+ * Defaults to `true`.
2078
+ */
2079
+ readonly cleanupOnComplete?: boolean;
2080
+ /**
2081
+ * Stale-threshold in hours for the stale-branch decision tree. A
2082
+ * branch whose progress file's `last_updated` is older than this
2083
+ * many hours **and** that has no matching open PR is considered
2084
+ * abandoned. Rendered verbatim into the stale-branch documentation
2085
+ * so operators have a single authoritative number.
2086
+ *
2087
+ * Must be a positive integer. Defaults to `72` — matches the
2088
+ * orchestrator bundle's in-progress staleness threshold.
2089
+ */
2090
+ readonly staleAfterHours?: number;
2091
+ }
2092
+ /*******************************************************************************
2093
+ *
2094
+ * Shared Editing Config
2095
+ *
2096
+ ******************************************************************************/
2097
+ /**
2098
+ * Shared-editing safety convention consumed by the `base` bundle and
2099
+ * every phased-agent bundle that writes rows to a shared registry or
2100
+ * feature-matrix file.
2101
+ *
2102
+ * Multiple concurrent agent sessions frequently need to edit the same
2103
+ * index file — registry `README.md` / `index.md` row tables, category
2104
+ * landing pages, feature matrices. Without a shared contract, parallel
2105
+ * sessions conflict on the index even when their content contributions
2106
+ * are independent, and the resolver may accidentally drop a row.
2107
+ *
2108
+ * The convention covers: pre-edit read-latest, single-entry
2109
+ * deterministic-sort inserts, commit-path verification (read-back the
2110
+ * committed file, assert the new row is present exactly once), and a
2111
+ * scripted merge-conflict resolution recipe.
2112
+ *
2113
+ * Every field is optional. When the whole config is absent the
2114
+ * convention ships **enabled** with the documented default set of
2115
+ * shared index path patterns and the rebase-based conflict strategy.
2116
+ *
2117
+ * Malformed configs — empty `sharedIndexPaths`, empty /
2118
+ * whitespace-only path entry, unknown `conflictStrategy` — fail the
2119
+ * build at synth time via `validateSharedEditingConfig`.
2120
+ *
2121
+ * @see ./bundles/shared-editing.ts#resolveSharedEditing
2122
+ * @see ./bundles/shared-editing.ts#validateSharedEditingConfig
2123
+ * @see ./bundles/shared-editing.ts#renderSharedEditingRuleContent
2124
+ */
2125
+ interface SharedEditingConfig {
2126
+ /**
2127
+ * Master switch for the shared-editing convention. When `false`,
2128
+ * the base bundle renders a short stub stating the project does not
2129
+ * enforce the convention; phased-agent bundles skip the
2130
+ * per-workflow "Shared Index Editing" injection.
2131
+ *
2132
+ * Defaults to `true` — the convention is on by default.
2133
+ */
2134
+ readonly enabled?: boolean;
2135
+ /**
2136
+ * Path patterns (plain glob strings) that identify shared index
2137
+ * files. Rendered verbatim into the rule body as a bullet list;
2138
+ * agents match the file they are about to edit against the patterns
2139
+ * to decide whether the contract applies.
2140
+ *
2141
+ * Must be a non-empty array of non-empty strings.
2142
+ *
2143
+ * Defaults to the configulator-wide set covering docs-site
2144
+ * `index.md` / `README.md` registry tables and feature-matrix
2145
+ * files.
2146
+ */
2147
+ readonly sharedIndexPaths?: ReadonlyArray<string>;
2148
+ /**
2149
+ * Whether the rendered convention includes the commit-path
2150
+ * verification protocol (read-back the committed file, assert the
2151
+ * new row is present exactly once). The verification step catches
2152
+ * staging / path bugs that would otherwise silently drop a row.
2153
+ *
2154
+ * Defaults to `true` — verification is on by default.
2155
+ */
2156
+ readonly verifyCommit?: boolean;
2157
+ /**
2158
+ * Strategy the convention's merge-conflict recipe prescribes when
2159
+ * two agents both add a row to the same shared index:
2160
+ *
2161
+ * - `"rebase"` (default) — `git pull --rebase` the branch, re-insert
2162
+ * the new row in sort order, resolve, `git rebase --continue`.
2163
+ * - `"merge"` — `git pull` (fast-forward or merge commit), re-insert
2164
+ * the row, `git commit`. Use for projects that keep a merge-commit
2165
+ * history on feature branches.
2166
+ */
2167
+ readonly conflictStrategy?: "rebase" | "merge";
2168
+ /**
2169
+ * Whether the convention emits the
2170
+ * `.claude/procedures/verify-index-row.sh` helper to disk. The
2171
+ * helper implements the commit-path verification step in a single
2172
+ * shell invocation; consumers that prefer the inline
2173
+ * `git show HEAD:<path>` recipe can leave it disabled.
2174
+ *
2175
+ * Defaults to `false` — the helper is opt-in.
2176
+ */
2177
+ readonly emitHelper?: boolean;
2178
+ }
2179
+ /*******************************************************************************
2180
+ *
2181
+ * Skill Evals Config
2182
+ *
2183
+ ******************************************************************************/
2184
+ /**
2185
+ * Skill eval harness convention consumed by the `base` bundle and
2186
+ * every skill-owning bundle (requirements-writer, bcm-writer, etc.).
2187
+ *
2188
+ * Each skill under `<skillsRoot>/<skill-name>/` may ship a regression
2189
+ * suite at `<skillsRoot>/<skill-name>/evals/evals.json`. Suites are
2190
+ * declarative prompt / expected-output fixtures parameterised by a
2191
+ * shared **product-context** fixture (by default
2192
+ * `docs/src/content/docs/project-context.md`) so the same eval shape
2193
+ * works across every project that depends on configulator — each
2194
+ * consuming repo supplies its own `project-context.md`, not its own
2195
+ * forked eval files.
2196
+ *
2197
+ * The convention is declarative: the optional runner script shipped
2198
+ * by `emitRunner: true` walks the skills root, validates every
2199
+ * `evals.json` against the schema, resolves the product-context
2200
+ * fixture, and emits a JSON execution plan to stdout. It never
2201
+ * invokes an LLM itself — the plan is consumed by whatever human or
2202
+ * model actually replays the prompts against the skill.
2203
+ *
2204
+ * Every field is optional. When the whole config is absent the
2205
+ * convention ships **enabled** with the documented default paths,
2206
+ * product-context required, and the runner script opt-in.
2207
+ *
2208
+ * Malformed configs — empty / whitespace-only or absolute
2209
+ * `skillsRoot`, empty / whitespace-only or absolute
2210
+ * `productContextPath` — fail the build at synth time via
2211
+ * `validateSkillEvalsConfig`.
2212
+ *
2213
+ * @see ./bundles/skill-evals.ts#resolveSkillEvals
2214
+ * @see ./bundles/skill-evals.ts#validateSkillEvalsConfig
2215
+ * @see ./bundles/skill-evals.ts#renderSkillEvalsRuleContent
2216
+ */
2217
+ interface SkillEvalsConfig {
2218
+ /**
2219
+ * Master switch for the skill-eval harness convention. When `false`,
2220
+ * the base bundle renders a short stub stating the project does not
2221
+ * ship skill evals; skill-owning bundles skip their per-bundle
2222
+ * "Skill Evals" injection and the optional runner script is not
2223
+ * emitted even if `emitRunner: true`.
2224
+ *
2225
+ * Defaults to `true` — the convention is on by default.
2226
+ */
2227
+ readonly enabled?: boolean;
2228
+ /**
2229
+ * Root directory (relative to the repo root) under which skill
2230
+ * SKILL.md files live. The runner walks this directory to discover
2231
+ * eval suites at `<skillsRoot>/<skill-name>/evals/evals.json`.
2232
+ *
2233
+ * Must be a non-empty relative path (no leading `/`).
2234
+ *
2235
+ * Defaults to `.claude/skills`, which matches the path every
2236
+ * configulator-managed project ships skills to on disk.
2237
+ */
2238
+ readonly skillsRoot?: string;
2239
+ /**
2240
+ * Path (relative to the repo root) to the product-context fixture
2241
+ * every eval suite references by default. A per-suite
2242
+ * `product_context` field in an `evals.json` overrides this value
2243
+ * for that suite only.
2244
+ *
2245
+ * Must be a non-empty relative path (no leading `/`).
2246
+ *
2247
+ * Defaults to `docs/src/content/docs/project-context.md`, which is
2248
+ * the file every configulator-managed agent already loads at
2249
+ * session start.
2250
+ */
2251
+ readonly productContextPath?: string;
2252
+ /**
2253
+ * Whether the runner fails fast when the product-context fixture is
2254
+ * missing. The default (`true`) is deliberately strict — an eval
2255
+ * that silently runs without its fixture produces a false-positive
2256
+ * pass. Projects bootstrapping a new consuming repo that has not
2257
+ * yet authored its `project-context.md` can set this to `false`,
2258
+ * at which point a missing fixture becomes a stderr warning rather
2259
+ * than a hard failure.
2260
+ *
2261
+ * Defaults to `true`.
2262
+ */
2263
+ readonly requireProductContext?: boolean;
2264
+ /**
2265
+ * Whether the convention emits the
2266
+ * `.claude/procedures/run-skill-evals.sh` helper to disk. The
2267
+ * helper implements the full runner contract (discover, validate,
2268
+ * resolve product-context, emit JSON plan) in a single shell
2269
+ * invocation. Consumers that prefer to roll their own runner can
2270
+ * leave it disabled and follow the inline recipe documented in the
2271
+ * rule body.
2272
+ *
2273
+ * Defaults to `false` — the helper is opt-in.
2274
+ */
2275
+ readonly emitRunner?: boolean;
2276
+ }
2277
+ /*******************************************************************************
2278
+ *
2279
+ * Workflow Diagrams Config
2280
+ *
2281
+ ******************************************************************************/
2282
+ /**
2283
+ * Workflow-diagrams convention consumed by the `base` bundle and
2284
+ * every phased-agent bundle. Documents the single hand-authored
2285
+ * Mermaid-based diagrams page that visualises every agent's phase
2286
+ * graph and every cross-agent handoff, and enforces the
2287
+ * **diagram-touched-when-bundle-touched** rule: a change set that
2288
+ * modifies a bundle's phase graph must also update the matching
2289
+ * section in the diagrams page.
2290
+ *
2291
+ * The convention is deliberately content-free — configulator cannot
2292
+ * ship meaningful diagrams because each consuming repo enables a
2293
+ * different subset of bundles and customises agent labels, paths,
2294
+ * and taxonomies via the Group A injection points. Instead the
2295
+ * bundle renders the rule (what to author, when to update it) and
2296
+ * optionally emits a starter page + a checker script.
2297
+ *
2298
+ * Every field is optional. When the whole config is absent the
2299
+ * convention ships **enabled** with the documented default diagrams
2300
+ * path (`docs/src/content/docs/agents/workflows.md`), the default
2301
+ * bundle-path patterns, the hard-requirement phrasing, the starter
2302
+ * page opt-in, and the checker script opt-in.
2303
+ *
2304
+ * Malformed configs — empty / whitespace-only or absolute
2305
+ * `diagramsPath`, empty `bundlePathPatterns`, empty /
2306
+ * whitespace-only pattern entry — fail the build at synth time via
2307
+ * `validateWorkflowDiagramsConfig`.
2308
+ *
2309
+ * @see ./bundles/workflow-diagrams.ts#resolveWorkflowDiagrams
2310
+ * @see ./bundles/workflow-diagrams.ts#validateWorkflowDiagramsConfig
2311
+ * @see ./bundles/workflow-diagrams.ts#renderWorkflowDiagramsRuleContent
2312
+ */
2313
+ interface WorkflowDiagramsConfig {
2314
+ /**
2315
+ * Master switch for the workflow-diagrams convention. When `false`,
2316
+ * the base bundle renders a short stub stating the project does not
2317
+ * enforce the convention; phased-agent bundles skip the
2318
+ * per-workflow "Workflow Diagram" injection and the optional helper
2319
+ * script / starter page are not emitted even if their `emit*`
2320
+ * flags are true.
2321
+ *
2322
+ * Defaults to `true` — the convention is on by default.
2323
+ */
2324
+ readonly enabled?: boolean;
2325
+ /**
2326
+ * Repo-relative path to the single workflow-diagrams page. The
2327
+ * rendered rule cites this path as the on-disk home of every
2328
+ * Mermaid diagram; the checker script uses it as the sentinel path
2329
+ * that must appear in a change set when any bundle file is
2330
+ * touched.
2331
+ *
2332
+ * Must be a non-empty relative path (no leading `/`).
2333
+ *
2334
+ * Defaults to `docs/src/content/docs/agents/workflows.md`, which
2335
+ * matches the monorepo-wide singleton `/docs` Starlight site every
2336
+ * configulator-managed repo ships.
2337
+ */
2338
+ readonly diagramsPath?: string;
2339
+ /**
2340
+ * Path patterns (bash-style globs) that identify "bundle files" —
2341
+ * the source files whose edits require the workflow-diagrams page
2342
+ * to be touched in the same change set. Rendered verbatim into
2343
+ * the rule body as a bullet list and emitted into the checker
2344
+ * script when `emitChecker: true`.
2345
+ *
2346
+ * Must be a non-empty array of non-empty strings.
2347
+ *
2348
+ * Defaults to the configulator-wide set covering in-tree bundle
2349
+ * source files, `.claude/agents/**.md` agent prompts, and
2350
+ * `.claude/skills/**.md` skill prompts.
2351
+ */
2352
+ readonly bundlePathPatterns?: ReadonlyArray<string>;
2353
+ /**
2354
+ * Whether the convention emits a minimal starter diagrams page to
2355
+ * disk at `<diagramsPath>`. The starter carries the expected
2356
+ * structure (master diagram placeholder, one example agent section,
2357
+ * legend) so consumers adopting the convention on a green-field
2358
+ * repo have a working template to extend.
2359
+ *
2360
+ * Disabled by default because the page is hand-authored — an
2361
+ * emitted stub would conflict with existing content on repos
2362
+ * adopting the convention late.
2363
+ */
2364
+ readonly emitStarterDiagram?: boolean;
2365
+ /**
2366
+ * Whether the convention emits the
2367
+ * `.claude/procedures/check-workflow-diagrams.sh` helper to disk.
2368
+ * The script walks a newline-separated list of changed files (from
2369
+ * stdin or positional arguments) and fails non-zero when any file
2370
+ * matches a bundle-path pattern but `<diagramsPath>` is not also
2371
+ * in the list.
2372
+ *
2373
+ * Disabled by default — the helper is opt-in for repos that want a
2374
+ * hard CI gate or pre-commit hook. Consumers that prefer to
2375
+ * enforce the rule via review discipline alone can leave it off.
2376
+ */
2377
+ readonly emitChecker?: boolean;
2378
+ /**
2379
+ * Whether the rendered rule body phrases the diagram update as a
2380
+ * **hard requirement** (`MUST`) or a **strong recommendation**
2381
+ * (`SHOULD`). Defaults to `true` — the hard-requirement phrasing
2382
+ * matches the "enforced via CI" posture the convention is
2383
+ * designed for. Consumers that treat diagrams as aspirational can
2384
+ * soften the phrasing by setting this to `false`.
2385
+ */
2386
+ readonly requireDiagramUpdate?: boolean;
2387
+ }
2388
+ /*******************************************************************************
2389
+ *
2390
+ * Issue Templates Config
2391
+ *
2392
+ ******************************************************************************/
2393
+ /**
2394
+ * Issue-templates convention consumed by the `base` bundle and every
2395
+ * phased-agent bundle that files downstream issues. Documents the
2396
+ * single hand-authored reference page that carries one canonical
2397
+ * `gh issue create` recipe per downstream phase label, and enforces
2398
+ * the **reference-don't-inline** rule: bundle rules and agent prompts
2399
+ * cite the matching section of that page instead of duplicating a
2400
+ * full `gh issue create --title ... --label ... --body ...`
2401
+ * invocation.
2402
+ *
2403
+ * The convention is deliberately content-free — configulator cannot
2404
+ * ship meaningful templates because each consuming repo enables a
2405
+ * different subset of bundles and customises phase labels, tier
2406
+ * taxonomies, and body conventions via the Group A injection points.
2407
+ * Instead the bundle renders the rule (what to author, when to cite
2408
+ * it) and optionally emits a starter page + a lint script.
2409
+ *
2410
+ * Every field is optional. When the whole config is absent the
2411
+ * convention ships **enabled** with the documented default templates
2412
+ * path (`docs/src/content/docs/agents/issue-templates.md`), the
2413
+ * default bundle-path patterns, the hard-requirement phrasing, and
2414
+ * both the starter page and the lint script opt-in.
2415
+ *
2416
+ * Malformed configs — empty / whitespace-only or absolute
2417
+ * `templatesPath`, empty `bundlePathPatterns`, empty /
2418
+ * whitespace-only pattern entry — fail the build at synth time via
2419
+ * `validateIssueTemplatesConfig`.
2420
+ *
2421
+ * @see ./bundles/issue-templates.ts#resolveIssueTemplates
2422
+ * @see ./bundles/issue-templates.ts#validateIssueTemplatesConfig
2423
+ * @see ./bundles/issue-templates.ts#renderIssueTemplatesRuleContent
2424
+ */
2425
+ interface IssueTemplatesConfig {
2426
+ /**
2427
+ * Master switch for the issue-templates convention. When `false`,
2428
+ * the base bundle renders a short stub stating the project does not
2429
+ * enforce the convention; phased-agent bundles skip the per-workflow
2430
+ * "Issue Templates" injection and the optional helper script /
2431
+ * starter page are not emitted even if their `emit*` flags are
2432
+ * true.
2433
+ *
2434
+ * Defaults to `true` — the convention is on by default.
2435
+ */
2436
+ readonly enabled?: boolean;
2437
+ /**
2438
+ * Repo-relative path to the single issue-templates reference page.
2439
+ * The rendered rule cites this path as the on-disk home of every
2440
+ * `gh issue create` recipe; the lint script uses it as the
2441
+ * allow-listed sentinel path that is permitted to contain full
2442
+ * recipes.
2443
+ *
2444
+ * Must be a non-empty relative path (no leading `/`).
2445
+ *
2446
+ * Defaults to `docs/src/content/docs/agents/issue-templates.md`,
2447
+ * which matches the monorepo-wide singleton `/docs` Starlight site
2448
+ * every configulator-managed repo ships.
2449
+ */
2450
+ readonly templatesPath?: string;
2451
+ /**
2452
+ * Path patterns (bash-style globs) that identify "bundle files" —
2453
+ * the source files composing agent prompts and skill instructions.
2454
+ * Rendered verbatim into the rule body as a bullet list and emitted
2455
+ * into the lint script when `emitChecker: true`.
2456
+ *
2457
+ * Must be a non-empty array of non-empty strings.
2458
+ *
2459
+ * Defaults to the configulator-wide set covering in-tree bundle
2460
+ * source files, `.claude/agents/**.md` agent prompts, and
2461
+ * `.claude/skills/**.md` skill prompts.
2462
+ */
2463
+ readonly bundlePathPatterns?: ReadonlyArray<string>;
2464
+ /**
2465
+ * Whether the convention emits the
2466
+ * `.claude/procedures/check-issue-templates.sh` lint to disk. The
2467
+ * script walks a newline-separated list of changed files (from
2468
+ * stdin or positional arguments) and fails non-zero when any file
2469
+ * matches a bundle-path pattern and contains a multi-line
2470
+ * `gh issue create ... --title` invocation.
2471
+ *
2472
+ * Disabled by default — the lint is opt-in for repos that want a
2473
+ * hard CI gate or pre-commit hook. Consumers that prefer to
2474
+ * enforce the rule via review discipline alone can leave it off.
2475
+ */
2476
+ readonly emitChecker?: boolean;
2477
+ /**
2478
+ * Whether the convention emits a minimal starter templates page to
2479
+ * disk at `<templatesPath>`. The starter carries the expected
2480
+ * structure (how-to-use preamble + one example
2481
+ * `## Template: <phase-label>` section) so consumers adopting the
2482
+ * convention on a green-field repo have a working template to
2483
+ * extend.
2484
+ *
2485
+ * Disabled by default because the page is hand-authored — an
2486
+ * emitted stub would conflict with existing content on repos
2487
+ * adopting the convention late.
2488
+ */
2489
+ readonly emitStarterDoc?: boolean;
2490
+ /**
2491
+ * Whether the rendered rule body phrases the reference-don't-inline
2492
+ * rule as a **hard requirement** (`MUST`) or a **strong
2493
+ * recommendation** (`SHOULD`). Defaults to `true` — the
2494
+ * hard-requirement phrasing matches the consolidation goal the
2495
+ * convention is designed for. Consumers that treat consolidation
2496
+ * as aspirational can soften the phrasing by setting this to
2497
+ * `false`.
2498
+ */
2499
+ readonly requireReference?: boolean;
2500
+ }
2501
+ /*******************************************************************************
2502
+ *
2503
+ * Scheduled Tasks Config
2504
+ *
2505
+ ******************************************************************************/
2506
+ /**
2507
+ * Partial override for a single default scheduled-task entry keyed by
2508
+ * `taskId`. Every field is optional — only supplied fields replace the
2509
+ * default. Use `enabled: true` to opt a task in without otherwise
2510
+ * changing its shape.
2511
+ *
2512
+ * @see ScheduledTasksConfig
2513
+ * @see ./bundles/scheduled-tasks.ts#DEFAULT_SCHEDULED_TASK_ENTRIES
2514
+ */
2515
+ interface ScheduledTaskOverride {
2516
+ /** Whether the task is emitted to disk. Defaults to the registry entry's value (normally `false`). */
2517
+ readonly enabled?: boolean;
2518
+ /**
2519
+ * Cron expression. Set to `null` to mean manual-only. Default is
2520
+ * manual-only; every configulator default entry ships without a cron.
2521
+ */
2522
+ readonly cron?: string | null;
2523
+ /** Recommended model label surfaced on frontmatter and the rendered table. */
2524
+ readonly recommendedModel?: "opus" | "sonnet" | "haiku";
2525
+ /** One-line description for the rendered table and SKILL.md frontmatter. */
2526
+ readonly description?: string;
2527
+ /**
2528
+ * Exact `type:*` label values (without the `type:` prefix) the
2529
+ * worker should pick up. When set, replaces the default entry's
2530
+ * single `typeLabel` with a multi-type filter (useful for the
2531
+ * routing-bucket `worker-issue` which covers
2532
+ * `feat/fix/chore/refactor/docs/release/hotfix`). Empty array not
2533
+ * allowed; use `undefined` to keep the default.
2534
+ */
2535
+ readonly typeLabels?: ReadonlyArray<string>;
2536
+ /**
2537
+ * Exact phase-label values the worker filters on. When set, takes
2538
+ * precedence over `phasePrefix` (prefix-match is dropped). Empty
2539
+ * array not allowed; use `undefined` to keep the default.
2540
+ */
2541
+ readonly phaseLabels?: ReadonlyArray<string>;
2542
+ }
2543
+ /**
2544
+ * Fully consumer-authored scheduled-task entry. Entries whose `taskId`
2545
+ * collides with a built-in default **replace** the default outright;
2546
+ * entries with a new `taskId` are appended to the registry.
2547
+ *
2548
+ * @see ScheduledTasksConfig
2549
+ */
2550
+ interface ScheduledTaskEntry {
2551
+ /**
2552
+ * Unique task directory name. Emitted under
2553
+ * `<root>/<taskId>/SKILL.md`. Every `taskId` must be unique within
2554
+ * the resolved registry.
2555
+ */
2556
+ readonly taskId: string;
2557
+ /** Target sub-agent name (filename stem under `.claude/agents/`). */
2558
+ readonly agent: string;
2559
+ /** Human-readable agent label for rendered tables / frontmatter. Defaults to `agent`. */
2560
+ readonly agentLabel?: string;
2561
+ /** GitHub `type:*` label value (without the `type:` prefix) that gates which issues this worker picks up. Ignored when `typeLabels` is set. */
2562
+ readonly typeLabel: string;
2563
+ /**
2564
+ * Exact `type:*` label values (without the `type:` prefix) the
2565
+ * worker picks up. When set, replaces the single `typeLabel` with
2566
+ * a multi-type filter (e.g. the routing-bucket `worker-issue`
2567
+ * covers `feat/fix/chore/refactor/docs/release/hotfix`). Empty
2568
+ * array not allowed.
2569
+ */
2570
+ readonly typeLabels?: ReadonlyArray<string>;
2571
+ /** Optional phase-label prefix (e.g. `research:`). When set, the worker filters on both `type:<typeLabel>` and any `<phasePrefix>*` label. Ignored when `phaseLabels` is set. */
2572
+ readonly phasePrefix?: string;
2573
+ /**
2574
+ * Exact phase-label values the worker filters on (e.g.
2575
+ * `["req:write"]` for a writer that only picks up issues whose
2576
+ * phase label is exactly `req:write`). When set, takes precedence
2577
+ * over `phasePrefix`. Empty array not allowed.
2578
+ */
2579
+ readonly phaseLabels?: ReadonlyArray<string>;
2580
+ /** Recommended model label surfaced on frontmatter and the rendered table. */
2581
+ readonly recommendedModel: "opus" | "sonnet" | "haiku";
2582
+ /** Whether the task is emitted to disk. Defaults to `false` — opt-in. */
2583
+ readonly enabled?: boolean;
2584
+ /** Cron expression. Defaults to `null` (manual-only). */
2585
+ readonly cron?: string | null;
2586
+ /** One-line description for the rendered table and SKILL.md frontmatter. */
2587
+ readonly description?: string;
2588
+ }
2589
+ /**
2590
+ * Per-agent scheduled-task configuration consumed by the `orchestrator`
2591
+ * bundle. Drives the per-agent worker layout at
2592
+ * `<root>/<taskId>/SKILL.md` — one task per agent type with its own
2593
+ * label filter, recommended model, and opt-in enablement.
2594
+ *
2595
+ * The pattern mirrors vortex-management's `.claude/scheduled-tasks/`
2596
+ * layout: splitting workers by type lets expensive research agents run
2597
+ * on a different cadence than cheap synthesis agents, and disabling a
2598
+ * whole category is a one-line toggle instead of label surgery.
2599
+ *
2600
+ * Every task ships **disabled by default**. Consumers opt in
2601
+ * explicitly; the generated repo contains no scheduled-task files
2602
+ * unless at least one task is enabled.
2603
+ *
2604
+ * Every field is optional. When the whole config is absent the
2605
+ * scheduled-tasks subsystem is enabled but no task is emitted (every
2606
+ * default is disabled).
2607
+ *
2608
+ * Malformed configs — unknown model value, empty `taskId` / `agent` /
2609
+ * `typeLabel`, duplicate `taskId` inside `tasks`, override referencing
2610
+ * an unknown default `taskId` — fail the build at synth time via
2611
+ * `validateScheduledTasksConfig`.
2612
+ *
2613
+ * @see ScheduledTaskEntry
2614
+ * @see ScheduledTaskOverride
2615
+ * @see ./bundles/scheduled-tasks.ts#resolveScheduledTasks
2616
+ * @see ./bundles/scheduled-tasks.ts#validateScheduledTasksConfig
2617
+ * @see ./bundles/scheduled-tasks.ts#renderScheduledTasksSection
2618
+ */
2619
+ interface ScheduledTasksConfig {
2620
+ /**
2621
+ * Master switch for the scheduled-tasks subsystem. When `false`, no
2622
+ * `<root>/<taskId>/SKILL.md` files are emitted regardless of
2623
+ * individual task overrides. Defaults to `true` — the subsystem is
2624
+ * on, but every default task is still disabled.
2625
+ */
2626
+ readonly enabled?: boolean;
2627
+ /**
2628
+ * Root directory (relative to the repo root) for emitted
2629
+ * scheduled-task files. Each task renders to
2630
+ * `<root>/<taskId>/SKILL.md`.
2631
+ *
2632
+ * Must be a non-empty relative path (no leading `/`). Defaults to
2633
+ * `.claude/scheduled-tasks`.
2634
+ */
2635
+ readonly root?: string;
2636
+ /**
2637
+ * Per-task overrides keyed by the built-in `taskId`. Use this to
2638
+ * flip the `enabled` toggle on one or more default tasks, override
2639
+ * the cron expression, or change the recommended model without
2640
+ * re-declaring the rest of the entry.
2641
+ *
2642
+ * Every key must match a built-in default `taskId`; unknown keys
2643
+ * fail the build. Use `tasks` to append new entries.
2644
+ */
2645
+ readonly overrides?: Readonly<Record<string, ScheduledTaskOverride>>;
2646
+ /**
2647
+ * Fully consumer-authored task entries. Entries whose `taskId`
2648
+ * matches a built-in default **replace** the default wholesale;
2649
+ * entries with a new `taskId` are appended.
2650
+ *
2651
+ * Every `taskId` must be unique within this list (duplicate
2652
+ * `taskId`s inside `tasks` fail the build). Use `overrides` to
2653
+ * tweak a single field without re-declaring the rest of the entry.
2654
+ */
2655
+ readonly tasks?: ReadonlyArray<ScheduledTaskEntry>;
2656
+ }
2657
+ /*******************************************************************************
2658
+ *
2659
+ * AgentConfig Options
2660
+ *
2661
+ ******************************************************************************/
2662
+ /**
2663
+ * Options for the AgentConfig component.
2664
+ */
2665
+ interface AgentConfigOptions {
2666
+ /**
2667
+ * Target platforms to generate configuration for.
2668
+ * @default [AGENT_PLATFORM.CURSOR, AGENT_PLATFORM.CLAUDE]
2669
+ */
2670
+ readonly platforms?: ReadonlyArray<AgentPlatform>;
2671
+ /**
2672
+ * Additional agent rules to generate alongside auto-detected and bundled rules.
2673
+ * Custom rules override bundled rules of the same name.
2674
+ */
2675
+ readonly rules?: ReadonlyArray<AgentRule>;
2676
+ /**
2677
+ * Additional skills to generate.
2678
+ */
2679
+ readonly skills?: ReadonlyArray<AgentSkill>;
2680
+ /**
2681
+ * Custom sub-agent definitions.
2682
+ */
2683
+ readonly subAgents?: ReadonlyArray<AgentSubAgent>;
2684
+ /**
2685
+ * Custom procedure definitions (executable shell scripts).
2686
+ */
2687
+ readonly procedures?: ReadonlyArray<AgentProcedure>;
2688
+ /**
2689
+ * MCP server configurations. Cross-platform — rendered to the appropriate
2690
+ * config file for each platform.
2691
+ */
2692
+ readonly mcpServers?: Readonly<Record<string, McpServerConfig>>;
2693
+ /**
2694
+ * Whether to automatically detect and include context-aware rule bundles
2695
+ * based on project introspection.
2696
+ * @default true
2697
+ */
2698
+ readonly autoDetectBundles?: boolean;
2699
+ /**
2700
+ * Explicit list of bundle names to include, regardless of auto-detection.
2701
+ * @example ['vitest', 'aws-cdk']
2702
+ */
2703
+ readonly includeBundles?: ReadonlyArray<string>;
2704
+ /**
2705
+ * Bundle names to exclude even if auto-detection would include them.
2706
+ * @example ['jest']
2707
+ */
2708
+ readonly excludeBundles?: ReadonlyArray<string>;
2709
+ /**
2710
+ * Whether to include the base rule set (project-overview, general conventions).
2711
+ * @default true
2712
+ */
2713
+ readonly includeBaseRules?: boolean;
2714
+ /**
2715
+ * Names of individual rules to exclude from any source.
2716
+ */
2717
+ readonly excludeRules?: ReadonlyArray<string>;
2718
+ /**
2719
+ * Additional content to append to existing rules (from bundles or custom rules).
2720
+ * Keys are rule names, values are markdown content appended after a horizontal rule.
2721
+ * Use this to supplement bundle rules with project-specific additions without
2722
+ * replacing the entire rule.
2723
+ *
2724
+ * @example
2725
+ * ```ts
2726
+ * ruleExtensions: {
2727
+ * 'typescript-conventions': '## Additional Conventions\n\n- Use branded types for IDs',
2728
+ * }
2729
+ * ```
2730
+ */
2731
+ readonly ruleExtensions?: Readonly<Record<string, string>>;
2732
+ /**
2733
+ * Claude Code settings.json configuration.
2734
+ * Generated to .claude/settings.json (committed, team-shared).
2735
+ */
2736
+ readonly claudeSettings?: ClaudeSettingsConfig;
2737
+ /**
2738
+ * Cursor-specific configuration. Generates .cursor/hooks.json for
2739
+ * lifecycle hooks and .cursorignore / .cursorindexingignore for
2740
+ * file visibility control.
2741
+ */
2742
+ readonly cursorSettings?: CursorSettingsConfig;
2743
+ /**
2744
+ * Overrides for the output-path roots used by agent bundles
2745
+ * (requirements, BCM, profiles, meetings, research). Unset fields
2746
+ * fall back to the defaults captured in
2747
+ * `bundles/paths.ts#DEFAULT_AGENT_PATHS`.
2748
+ *
2749
+ * This option is the first of the Group A framework injection
2750
+ * points from epic #414. Per-project propagation of these values
2751
+ * into bundle rule content lands in a follow-up — setting it today
2752
+ * does not yet alter generated rules.
2753
+ */
2754
+ readonly paths?: AgentPathsConfig;
2755
+ /**
2756
+ * Project-specific priority-detection rules. Each rule declares a
2757
+ * match predicate (labels, title regex, body regex, or explicit
2758
+ * issue numbers) and a target `priority:*` tier.
2759
+ *
2760
+ * When non-empty, the `base` bundle renders a "Project-specific
2761
+ * priority rules" subsection into the `issue-label-conventions`
2762
+ * rule. Precedence is **first match wins**; the bundle's default
2763
+ * inference heuristics act as the fallback when no rule matches.
2764
+ *
2765
+ * @see PriorityRule
2766
+ * @see ./bundles/priority-rules.ts#renderPriorityRulesSection
2767
+ */
2768
+ readonly priorityRules?: ReadonlyArray<PriorityRule>;
2769
+ /**
2770
+ * Focus-scoring configuration. Declares the path to the consuming
2771
+ * repo's `focus.json` file, score thresholds, and the
2772
+ * agent-expansion rules that govern what agents may append to the
2773
+ * file.
2774
+ *
2775
+ * When set, the `base` bundle appends a "Focus scoring"
2776
+ * subsection to the `issue-label-conventions` rule that teaches
2777
+ * agents (a) how to read `focus.json`, (b) how focus weight
2778
+ * interacts with the `priority:*` taxonomy, and (c) the
2779
+ * agent-driven expansion contract. The actual `focus.json` file
2780
+ * is authored and curated in the consuming repo — configulator
2781
+ * ships the schema and agent instructions only.
2782
+ *
2783
+ * @see FocusConfig
2784
+ * @see FocusArea
2785
+ * @see AgentExpansionRules
2786
+ * @see ./bundles/focus.ts#renderFocusSection
2787
+ */
2788
+ readonly focus?: FocusConfig;
2789
+ /**
2790
+ * Meeting-analysis injection points — typed configs the
2791
+ * `meeting-analysis` bundle consults when classifying, routing, and
2792
+ * templating meetings. Supplies the meeting-type taxonomy, the
2793
+ * area → doc-root routing map, and the agenda-template root used
2794
+ * by the (future) `agenda` bundle.
2795
+ *
2796
+ * When `meetingTypes` is non-empty, the `meeting-analysis` bundle
2797
+ * appends a "Recognized meeting types" subsection to the
2798
+ * `meeting-processing-workflow` rule. When `meetingAreas` is
2799
+ * non-empty, it appends an "Area → doc-root mapping" subsection.
2800
+ * When both are empty or unset, the generated rule content is
2801
+ * unchanged from the no-config baseline.
2802
+ *
2803
+ * @see MeetingsConfig
2804
+ * @see MeetingType
2805
+ * @see MeetingArea
2806
+ * @see ./bundles/meeting-types.ts#renderMeetingTypesSection
2807
+ */
2808
+ readonly meetings?: MeetingsConfig;
2809
+ /**
2810
+ * Framework injection points for source-tier customization and
2811
+ * custom doc sections.
2812
+ *
2813
+ * - `sourceTierExamples` — domain-specific examples injected under
2814
+ * T1 / T2 / T3 / T4 in the base bundle's "Source Quality &
2815
+ * Verification" rule.
2816
+ * - `customDocSections` — consumer-supplied section templates that
2817
+ * render verbatim after an existing section heading in a target
2818
+ * bundle's rule content.
2819
+ *
2820
+ * Named feature toggles (`consortium-model`, `stealth-mode`, etc.)
2821
+ * are intentionally out of scope here — build those on top of
2822
+ * `customDocSections` inside the consuming repo's projen config.
2823
+ *
2824
+ * @see AgentFeaturesConfig
2825
+ * @see SourceTierExamples
2826
+ * @see CustomDocSection
2827
+ * @see ./bundles/features.ts
2828
+ */
2829
+ readonly features?: AgentFeaturesConfig;
2830
+ /**
2831
+ * Funnel-tier configuration consumed by the `orchestrator` bundle.
2832
+ * Drives the multi-key dispatch sort (priority desc → tier asc →
2833
+ * issue number asc) that keeps research feeders from starving.
2834
+ *
2835
+ * When the whole config is omitted the orchestrator ships its
2836
+ * built-in default tier table. Supply `customTypes` to register
2837
+ * additional agent types or override the tier of an existing entry;
2838
+ * supply `tiers` to replace the default list wholesale.
2839
+ *
2840
+ * Malformed configs — tier outside 0–4, empty `type`, duplicate
2841
+ * entries inside a single list — fail the build at synth time via
2842
+ * the orchestrator bundle's tier validator.
2843
+ *
2844
+ * @see AgentTierConfig
2845
+ * @see AgentTierEntry
2846
+ * @see ./bundles/tiers.ts#resolveAgentTiers
2847
+ * @see ./bundles/tiers.ts#validateAgentTierConfig
2848
+ */
2849
+ readonly tiers?: AgentTierConfig;
2850
+ /**
2851
+ * Scope-gate configuration consumed by the `orchestrator` bundle.
2852
+ * Rejects oversized issues at dispatch and instructs the orchestrator
2853
+ * to decompose them into phased sub-issues instead of claiming a
2854
+ * worker session for a multi-hour task.
2855
+ *
2856
+ * When the whole config is omitted, the orchestrator ships with
2857
+ * openhi's published defaults baked in (small: ≤3 AC + ≤2 sources;
2858
+ * medium: ≤6 AC + ≤5 sources; auto-file off).
2859
+ *
2860
+ * Supply `acceptanceCriteria` / `sources` to override the
2861
+ * per-axis thresholds, `decompositionTemplate` to customize the
2862
+ * proposal comment body, or `autoFile: true` to have the
2863
+ * orchestrator file the proposed sub-issues automatically.
2864
+ *
2865
+ * Malformed configs — negative or non-integer thresholds, or
2866
+ * `mediumMax <= smallMax` — fail the build at synth time via
2867
+ * `validateScopeGateConfig`.
2868
+ *
2869
+ * @see ScopeGateConfig
2870
+ * @see ScopeGateThresholds
2871
+ * @see ./bundles/scope-gate.ts#resolveScopeGate
2872
+ * @see ./bundles/scope-gate.ts#validateScopeGateConfig
2873
+ */
2874
+ readonly scopeGate?: ScopeGateConfig;
2875
+ /**
2876
+ * Run-ratio configuration consumed by the `orchestrator` bundle.
2877
+ * Drives the dispatch-to-housekeeping cadence — every `(ratio + 1)`th
2878
+ * run batches PR review + maintenance scan instead of dispatching
2879
+ * fresh issue work, preventing review and maintenance backlog drift
2880
+ * on always-on agent pipelines.
2881
+ *
2882
+ * When the whole config is omitted, the orchestrator ships with
2883
+ * openhi's published 4:1 defaults (four dispatch runs, one
2884
+ * housekeeping run, state file at
2885
+ * `.claude/state/orchestrator-runs.json`, `opus` / `sonnet`
2886
+ * recommended models).
2887
+ *
2888
+ * Supply `ratio` to change the cadence, `stateFilePath` to move
2889
+ * the counter file, `dispatchModel` / `housekeepingModel` to
2890
+ * override the recommended-model labels rendered into the
2891
+ * orchestrator-conventions rule, or `enabled: false` to disable
2892
+ * run-ratio batching entirely.
2893
+ *
2894
+ * Malformed configs — non-integer or non-positive `ratio`, empty
2895
+ * or absolute `stateFilePath` — fail the build at synth time via
2896
+ * `validateRunRatioConfig`.
2897
+ *
2898
+ * @see RunRatioConfig
2899
+ * @see ./bundles/run-ratio.ts#resolveRunRatio
2900
+ * @see ./bundles/run-ratio.ts#validateRunRatioConfig
2901
+ */
2902
+ readonly runRatio?: RunRatioConfig;
2903
+ /**
2904
+ * Pre-flight PR merge configuration consumed by the `orchestrator`
2905
+ * bundle. Drives the pre-flight sweep (vortex step 0b) that merges
2906
+ * eligible PRs before the triage walk reads dependency state,
2907
+ * preventing stale-dependency thrashing on always-on pipelines.
2908
+ *
2909
+ * When the whole config is omitted, the orchestrator ships with
2910
+ * vortex's published defaults (pre-flight enabled, delegated to
2911
+ * the `pr-reviewer` sub-agent, squash merges, linked-issue
2912
+ * keyword required).
2913
+ *
2914
+ * Supply `enabled: false` to disable pre-flight entirely,
2915
+ * `delegateToPrReviewer: false` to merge inline without delegation,
2916
+ * `mergeMethod` to switch to merge-commit or rebase strategies,
2917
+ * `requireLinkedIssue: false` to include PRs without a
2918
+ * `Closes/Fixes/Resolves` keyword, or `eligibleLabels` to gate
2919
+ * pre-flight on consumer-declared opt-in labels.
2920
+ *
2921
+ * Malformed configs — unknown `mergeMethod`, empty /
2922
+ * whitespace-only `eligibleLabels` entries — fail the build at
2923
+ * synth time via `validatePreflightPrConfig`.
2924
+ *
2925
+ * @see PreflightPrConfig
2926
+ * @see ./bundles/preflight-pr.ts#resolvePreflightPr
2927
+ * @see ./bundles/preflight-pr.ts#validatePreflightPrConfig
2928
+ */
2929
+ readonly preflightPr?: PreflightPrConfig;
2930
+ /**
2931
+ * Scheduled-tasks configuration consumed by the `orchestrator`
2932
+ * bundle. Drives the per-agent worker layout at
2933
+ * `<root>/<taskId>/SKILL.md` — one task per agent type with its own
2934
+ * label filter, recommended model, and opt-in enablement.
2935
+ *
2936
+ * Every default task is **disabled by default**. Consumers opt in
2937
+ * explicitly via `overrides.<taskId>.enabled = true`; the generated
2938
+ * repo contains no scheduled-task files until at least one task is
2939
+ * enabled.
2940
+ *
2941
+ * Supply `overrides` to flip `enabled`, cron, or model on a default
2942
+ * task; supply `tasks` to add new entries or replace defaults
2943
+ * wholesale; supply `root` to change the output directory; supply
2944
+ * `enabled: false` on the whole config to disable the subsystem
2945
+ * regardless of individual overrides.
2946
+ *
2947
+ * Malformed configs — unknown model, empty `taskId` / `agent` /
2948
+ * `typeLabel`, duplicate `taskId` in `tasks`, override referencing
2949
+ * an unknown default `taskId` — fail the build at synth time via
2950
+ * `validateScheduledTasksConfig`.
2951
+ *
2952
+ * @see ScheduledTasksConfig
2953
+ * @see ScheduledTaskEntry
2954
+ * @see ScheduledTaskOverride
2955
+ * @see ./bundles/scheduled-tasks.ts#resolveScheduledTasks
2956
+ * @see ./bundles/scheduled-tasks.ts#validateScheduledTasksConfig
2957
+ */
2958
+ readonly scheduledTasks?: ScheduledTasksConfig;
2959
+ /**
2960
+ * Agent-driven unblocking configuration consumed by the
2961
+ * `orchestrator` bundle. Controls the targeted sweep agents run
2962
+ * after applying `status:done` — the sweep flips downstream
2963
+ * `Depends on: #<just-closed>` issues from `status:blocked` to
2964
+ * `status:ready` without waiting for the next orchestrator
2965
+ * dispatch cycle.
2966
+ *
2967
+ * When the whole config is omitted, the orchestrator ships with
2968
+ * the sweep **enabled** and a generic citation comment.
2969
+ *
2970
+ * Supply `enabled: false` to disable the sweep entirely,
2971
+ * `commentTemplate` to override the unblock citation, or
2972
+ * `flagPartialUnblockWithAttention: true` to have the sweep post a
2973
+ * progress comment on dependents whose dependency list is not yet
2974
+ * fully resolved.
2975
+ *
2976
+ * Malformed configs — empty / whitespace-only `commentTemplate` or
2977
+ * `partialUnblockCommentTemplate` — fail the build at synth time
2978
+ * via `validateUnblockDependentsConfig`.
2979
+ *
2980
+ * @see UnblockDependentsConfig
2981
+ * @see ./bundles/unblock-dependents.ts#resolveUnblockDependents
2982
+ * @see ./bundles/unblock-dependents.ts#validateUnblockDependentsConfig
2983
+ */
2984
+ readonly unblockDependents?: UnblockDependentsConfig;
2985
+ /**
2986
+ * Progress-file convention consumed by the `base` bundle and every
2987
+ * phased-agent bundle (bcm-writer, research-pipeline, etc.). Every
2988
+ * phased agent writes a small progress file when it claims an
2989
+ * issue, updates it after each non-trivial step, and deletes it in
2990
+ * the final commit that closes the issue. Crashed sessions are
2991
+ * resumed by reading the file rather than starting over.
2992
+ *
2993
+ * When the whole config is omitted, the convention ships
2994
+ * **enabled** with JSON-formatted files stored under
2995
+ * `.claude/state/<issue-number>-progress.json` and a 72-hour
2996
+ * staleness threshold.
2997
+ *
2998
+ * Supply `enabled: false` to disable the convention entirely,
2999
+ * `format: "markdown"` to use the openhi-style markdown body,
3000
+ * `stateDir` / `filenamePattern` to move or rename the on-disk
3001
+ * artefact, `cleanupOnComplete: false` to retain progress files
3002
+ * after the issue closes, or `staleAfterHours` to override the
3003
+ * stale-branch threshold rendered into the documentation.
3004
+ *
3005
+ * Malformed configs — empty / whitespace-only or absolute
3006
+ * `stateDir`, empty / whitespace-only `filenamePattern`,
3007
+ * `filenamePattern` missing the `<ISSUE_NUMBER>` placeholder,
3008
+ * unknown `format`, non-positive `staleAfterHours` — fail the
3009
+ * build at synth time via `validateProgressFilesConfig`.
3010
+ *
3011
+ * @see ProgressFilesConfig
3012
+ * @see ./bundles/progress-files.ts#resolveProgressFiles
3013
+ * @see ./bundles/progress-files.ts#validateProgressFilesConfig
3014
+ * @see ./bundles/progress-files.ts#renderProgressFilesRuleContent
3015
+ */
3016
+ readonly progressFiles?: ProgressFilesConfig;
3017
+ /**
3018
+ * Shared-editing safety convention consumed by the `base` bundle
3019
+ * and every phased-agent bundle that writes rows to a shared
3020
+ * registry or feature-matrix file. Documents the single-entry /
3021
+ * deterministic-sort / verify-commit / re-sort-on-conflict protocol
3022
+ * agents follow when touching an index file other sessions may also
3023
+ * be editing concurrently.
3024
+ *
3025
+ * When the whole config is omitted, the convention ships
3026
+ * **enabled** with the documented default set of shared-index path
3027
+ * patterns, commit-path verification on, and the `rebase` conflict
3028
+ * strategy.
3029
+ *
3030
+ * Supply `enabled: false` to disable the convention entirely,
3031
+ * `sharedIndexPaths` to replace the default pattern list,
3032
+ * `verifyCommit: false` to drop the commit-path verification
3033
+ * protocol from the rendered rule, `conflictStrategy: "merge"` to
3034
+ * switch the conflict recipe to the merge-commit flow, or
3035
+ * `emitHelper: true` to ship the
3036
+ * `.claude/procedures/verify-index-row.sh` helper script to disk.
3037
+ *
3038
+ * Malformed configs — empty `sharedIndexPaths`, empty /
3039
+ * whitespace-only path entry, unknown `conflictStrategy` — fail
3040
+ * the build at synth time via `validateSharedEditingConfig`.
3041
+ *
3042
+ * @see SharedEditingConfig
3043
+ * @see ./bundles/shared-editing.ts#resolveSharedEditing
3044
+ * @see ./bundles/shared-editing.ts#validateSharedEditingConfig
3045
+ * @see ./bundles/shared-editing.ts#renderSharedEditingRuleContent
3046
+ */
3047
+ readonly sharedEditing?: SharedEditingConfig;
3048
+ /**
3049
+ * Skill eval harness convention consumed by the `base` bundle and
3050
+ * every skill-owning bundle. Each skill under
3051
+ * `<skillsRoot>/<skill-name>/` may ship a regression suite at
3052
+ * `<skillsRoot>/<skill-name>/evals/evals.json`. Suites are
3053
+ * declarative prompt / expected-output fixtures parameterised by a
3054
+ * shared product-context fixture so the same eval shape works
3055
+ * across every project that depends on configulator.
3056
+ *
3057
+ * When the whole config is omitted, the convention ships
3058
+ * **enabled** with skills-root `.claude/skills`, product-context
3059
+ * fixture `docs/src/content/docs/project-context.md`,
3060
+ * product-context required, and the runner helper opt-in.
3061
+ *
3062
+ * Supply `enabled: false` to disable the convention entirely,
3063
+ * `skillsRoot` or `productContextPath` to override the default
3064
+ * paths, `requireProductContext: false` to downgrade missing
3065
+ * product-context to a warning, or `emitRunner: true` to ship the
3066
+ * `.claude/procedures/run-skill-evals.sh` helper to disk.
3067
+ *
3068
+ * Malformed configs — empty / whitespace-only or absolute
3069
+ * `skillsRoot`, empty / whitespace-only or absolute
3070
+ * `productContextPath` — fail the build at synth time via
3071
+ * `validateSkillEvalsConfig`.
3072
+ *
3073
+ * @see SkillEvalsConfig
3074
+ * @see ./bundles/skill-evals.ts#resolveSkillEvals
3075
+ * @see ./bundles/skill-evals.ts#validateSkillEvalsConfig
3076
+ * @see ./bundles/skill-evals.ts#renderSkillEvalsRuleContent
3077
+ */
3078
+ readonly skillEvals?: SkillEvalsConfig;
3079
+ /**
3080
+ * Workflow-diagrams convention consumed by the `base` bundle and
3081
+ * every phased-agent bundle. Documents the single hand-authored
3082
+ * Mermaid-based diagrams page that visualises every agent's phase
3083
+ * graph and every cross-agent handoff, and enforces the
3084
+ * diagram-touched-when-bundle-touched rule: a change set that
3085
+ * modifies a bundle's phase graph must also update the matching
3086
+ * section in the diagrams page.
3087
+ *
3088
+ * When the whole config is omitted, the convention ships
3089
+ * **enabled** with the default diagrams path
3090
+ * (`docs/src/content/docs/agents/workflows.md`), the default
3091
+ * bundle-path patterns, the hard-requirement phrasing, and both
3092
+ * the starter page and the checker script opt-in.
3093
+ *
3094
+ * Supply `enabled: false` to disable the convention entirely,
3095
+ * `diagramsPath` to move the page, `bundlePathPatterns` to
3096
+ * replace the default pattern list, `emitStarterDiagram: true`
3097
+ * to seed a minimal starter page on disk, `emitChecker: true` to
3098
+ * ship the `.claude/procedures/check-workflow-diagrams.sh`
3099
+ * helper, or `requireDiagramUpdate: false` to soften the rule
3100
+ * phrasing from MUST to SHOULD.
3101
+ *
3102
+ * Malformed configs — empty / whitespace-only or absolute
3103
+ * `diagramsPath`, empty `bundlePathPatterns`, empty /
3104
+ * whitespace-only pattern entry — fail the build at synth time
3105
+ * via `validateWorkflowDiagramsConfig`.
3106
+ *
3107
+ * @see WorkflowDiagramsConfig
3108
+ * @see ./bundles/workflow-diagrams.ts#resolveWorkflowDiagrams
3109
+ * @see ./bundles/workflow-diagrams.ts#validateWorkflowDiagramsConfig
3110
+ * @see ./bundles/workflow-diagrams.ts#renderWorkflowDiagramsRuleContent
3111
+ */
3112
+ readonly workflowDiagrams?: WorkflowDiagramsConfig;
3113
+ /**
3114
+ * Issue-templates convention consumed by the `base` bundle and
3115
+ * every phased-agent bundle that files downstream issues.
3116
+ * Documents the single hand-authored reference page that carries
3117
+ * one canonical `gh issue create` recipe per downstream phase
3118
+ * label, and enforces the reference-don't-inline rule: bundle
3119
+ * rules and agent prompts cite the matching section of that page
3120
+ * instead of duplicating a full `gh issue create` invocation.
3121
+ *
3122
+ * When the whole config is omitted, the convention ships
3123
+ * **enabled** with the default templates path
3124
+ * (`docs/src/content/docs/agents/issue-templates.md`), the default
3125
+ * bundle-path patterns, the hard-requirement phrasing, and both
3126
+ * the starter page and the lint script opt-in.
3127
+ *
3128
+ * Supply `enabled: false` to disable the convention entirely,
3129
+ * `templatesPath` to move the page, `bundlePathPatterns` to
3130
+ * replace the default pattern list, `emitStarterDoc: true` to
3131
+ * seed a minimal starter page on disk, `emitChecker: true` to
3132
+ * ship the `.claude/procedures/check-issue-templates.sh` helper,
3133
+ * or `requireReference: false` to soften the rule phrasing from
3134
+ * MUST to SHOULD.
3135
+ *
3136
+ * Malformed configs — empty / whitespace-only or absolute
3137
+ * `templatesPath`, empty `bundlePathPatterns`, empty /
3138
+ * whitespace-only pattern entry — fail the build at synth time
3139
+ * via `validateIssueTemplatesConfig`.
3140
+ *
3141
+ * @see IssueTemplatesConfig
3142
+ * @see ./bundles/issue-templates.ts#resolveIssueTemplates
3143
+ * @see ./bundles/issue-templates.ts#validateIssueTemplatesConfig
3144
+ * @see ./bundles/issue-templates.ts#renderIssueTemplatesRuleContent
3145
+ */
3146
+ readonly issueTemplates?: IssueTemplatesConfig;
3147
+ }
3148
+
3149
+ /**
3150
+ * Generates AI coding assistant configuration files from a common schema.
3151
+ *
3152
+ * Supports Cursor and Claude Code (initial release), with Codex and Copilot
3153
+ * renderers planned for future issues. Rules, skills, and sub-agents are
3154
+ * defined once and rendered into the correct format for each target platform.
3155
+ *
3156
+ * Follows the configulator component pattern: extends Component, static .of()
3157
+ * factory, options interface with JSDoc.
3158
+ *
3159
+ * @example
3160
+ * ```ts
3161
+ * new AgentConfig(project, {
3162
+ * rules: [{
3163
+ * name: 'my-rule',
3164
+ * description: 'Project conventions',
3165
+ * scope: AGENT_RULE_SCOPE.ALWAYS,
3166
+ * content: '# My Rule\n\nFollow these conventions...',
3167
+ * }],
3168
+ * });
3169
+ * ```
3170
+ */
3171
+ declare class AgentConfig extends Component {
3172
+ /**
3173
+ * Find the AgentConfig component on a project.
3174
+ */
3175
+ static of(project: Project): AgentConfig | undefined;
3176
+ /**
3177
+ * Returns `true` when at least one tier array on the supplied
3178
+ * `SourceTierExamples` is non-empty, signalling that the consuming
3179
+ * repo has opted into rendering the base bundle's
3180
+ * `source-quality-verification` rule. Returns `false` for
3181
+ * `undefined`, `{}`, or a fully-empty `{ t1: [], t2: [], t3: [], t4: [] }`.
3182
+ */
3183
+ private static hasActiveTierExamples;
3184
+ /**
3185
+ * Merges default Claude permissions with bundle and user-supplied settings.
3186
+ *
3187
+ * Merge order: defaults → bundle permissions → user-supplied entries.
3188
+ * `defaultMode` defaults to `"dontAsk"` unless overridden.
3189
+ */
3190
+ private static mergeClaudeDefaults;
3191
+ private readonly options;
3192
+ private cachedBundles?;
3193
+ private cachedPaths?;
3194
+ constructor(project: Project, options?: AgentConfigOptions);
3195
+ /**
3196
+ * Resolved agent-path roots for this project. Consumer overrides on
3197
+ * `AgentConfigOptions.paths` cascade into derived roots via
3198
+ * `resolveAgentPaths()`. Memoized so repeated reads during synthesis
3199
+ * do not re-run the resolver.
3200
+ */
3201
+ private get resolvedPaths();
3202
+ /**
3203
+ * Path-aware built-in bundles assembled with this project's
3204
+ * resolved paths. Path-aware bundle factories (e.g.
3205
+ * `buildResearchPipelineBundle`) receive the resolved struct so
3206
+ * their rendered rule content reflects any consumer override.
3207
+ * Bundles that do not read agent paths are passed through as-is
3208
+ * from their default const exports.
3209
+ */
3210
+ private get pathAwareBundles();
3211
+ /**
3212
+ * Returns the bundles that are active for this project: auto-detected
3213
+ * bundles (when `autoDetectBundles !== false`) plus force-included
3214
+ * bundles, minus explicitly excluded bundles. Deduplicated by name.
3215
+ *
3216
+ * Exposed so sibling components (e.g. the sync-labels workflow) can
3217
+ * consume bundle-contributed configuration.
3218
+ */
3219
+ get activeBundles(): ReadonlyArray<AgentRuleBundle>;
3220
+ preSynthesize(): void;
3221
+ private resolvePlatforms;
3222
+ private resolveRules;
1742
3223
  /**
1743
3224
  * Return a bundle's rules with `filePatterns` narrowed to the projects
1744
3225
  * that actually matched the bundle's detection predicate (when the bundle
@@ -1748,253 +3229,1479 @@ declare class AgentConfig extends Component {
1748
3229
  * implement the hook are returned with only the custom-section
1749
3230
  * transformation (if any) applied.
1750
3231
  */
1751
- private bundleRulesFor;
1752
- private resolveSkills;
1753
- private resolveSubAgents;
1754
- private resolveProcedures;
3232
+ private bundleRulesFor;
3233
+ private resolveSkills;
3234
+ private resolveSubAgents;
3235
+ private resolveProcedures;
3236
+ /**
3237
+ * Resolves template variables in rule content using project metadata.
3238
+ * Emits synthesis warnings for rules with unresolved variables.
3239
+ */
3240
+ private resolveTemplates;
3241
+ /**
3242
+ * Resolves template variables in skill instructions using project metadata.
3243
+ */
3244
+ private resolveSkillTemplates;
3245
+ /**
3246
+ * Resolves template variables in sub-agent prompts using project metadata.
3247
+ */
3248
+ private resolveSubAgentTemplates;
3249
+ /**
3250
+ * Resolves template variables in procedure content using project metadata.
3251
+ */
3252
+ private resolveProcedureTemplates;
3253
+ /**
3254
+ * Collects Claude permission entries from all active bundles.
3255
+ */
3256
+ private resolveBundlePermissions;
3257
+ }
3258
+
3259
+ /**
3260
+ * Fully-resolved agent output-path roots. Every property is required.
3261
+ *
3262
+ * This is the shape that bundle code consumes at module-eval time via
3263
+ * `DEFAULT_AGENT_PATHS`, and the shape that `resolveAgentPaths()`
3264
+ * returns when consumers supply a partial `AgentPathsConfig` override.
3265
+ */
3266
+ interface ResolvedAgentPaths {
3267
+ readonly docsRoot: string;
3268
+ readonly researchRoot: string;
3269
+ readonly profilesRoot: string;
3270
+ readonly meetingsRoot: string;
3271
+ readonly requirementsRoot: string;
3272
+ readonly researchRequirementsRoot: string;
3273
+ readonly bcmRoot: string;
3274
+ readonly peopleRoot: string;
3275
+ readonly companiesRoot: string;
3276
+ readonly softwareRoot: string;
3277
+ readonly industriesRoot: string;
3278
+ }
3279
+ /**
3280
+ * Canonical default values for every agent path. These mirror the
3281
+ * hardcoded paths that bundles used before `AgentPathsConfig` existed,
3282
+ * so `DEFAULT_AGENT_PATHS.*` can be substituted into bundle rule
3283
+ * content at module-eval time without changing the generated
3284
+ * `.claude/rules/*.md` snapshot.
3285
+ *
3286
+ * Consumers override the defaults by passing an `AgentPathsConfig`
3287
+ * through `AgentConfigOptions.paths` and resolving it with
3288
+ * `resolveAgentPaths()`. Per-project propagation into bundle rule
3289
+ * content is a follow-up — this export is the first step: interface +
3290
+ * resolver land in this PR; the `AgentConfig.resolveRules` wiring lands
3291
+ * next.
3292
+ */
3293
+ declare const DEFAULT_AGENT_PATHS: ResolvedAgentPaths;
3294
+ /**
3295
+ * Resolve a partial `AgentPathsConfig` into a fully-populated
3296
+ * `ResolvedAgentPaths`. Unset fields cascade from their parent root:
3297
+ *
3298
+ * - `profilesRoot`, `meetingsRoot`, `requirementsRoot`, and `bcmRoot`
3299
+ * derive from `docsRoot` when not explicitly set.
3300
+ * - `researchRequirementsRoot` derives from `researchRoot` when not
3301
+ * explicitly set.
3302
+ * - `peopleRoot`, `companiesRoot`, `softwareRoot`, and `industriesRoot`
3303
+ * derive from the resolved `profilesRoot` when not explicitly set,
3304
+ * so that overriding `docsRoot` alone (or overriding `profilesRoot`
3305
+ * alone) propagates correctly through every dependent root.
3306
+ */
3307
+ declare function resolveAgentPaths(paths?: AgentPathsConfig): ResolvedAgentPaths;
3308
+
3309
+ /**
3310
+ * Agenda bundle — enabled by default.
3311
+ *
3312
+ * Consuming projects can disable it with
3313
+ * `excludeBundles: ["agenda"]`. `appliesWhen` always returns `true`
3314
+ * (peer-present assumption, same pattern as the other workflow
3315
+ * bundles).
3316
+ *
3317
+ * Provides a 2-phase pre-meeting agenda pipeline
3318
+ * (draft → finalize), complementing the post-meeting pipeline in
3319
+ * the `meeting-analysis` bundle. Ships a sub-agent, two user-
3320
+ * invocable skills (`/draft-agenda`, `/finalize-agenda`), and
3321
+ * `agenda:*` phase labels via the bundle `labels` mechanism so
3322
+ * consuming projects automatically pick up the label taxonomy
3323
+ * through the sync-labels workflow.
3324
+ *
3325
+ * Reuses the meeting-type taxonomy from
3326
+ * `AgentConfigOptions.meetings.meetingTypes` — the same table the
3327
+ * `meeting-analysis` bundle consumes for post-meeting extraction.
3328
+ */
3329
+ declare const agendaBundle: AgentRuleBundle;
3330
+
3331
+ /**
3332
+ * AWS CDK bundle — auto-detected when `aws-cdk-lib` is in dependencies.
3333
+ */
3334
+ declare const awsCdkBundle: AgentRuleBundle;
3335
+
3336
+ /**
3337
+ * Base bundle — always included unless `includeBaseRules: false`.
3338
+ * Contains project-overview, interaction-style, and general-conventions rules.
3339
+ */
3340
+ declare function buildBaseBundle(paths?: ResolvedAgentPaths): AgentRuleBundle;
3341
+ /**
3342
+ * Default-paths instance of the base bundle, preserved for backward
3343
+ * compatibility with consumers that import the const directly. The
3344
+ * factory above is the canonical entry point when a consumer supplies
3345
+ * `AgentConfigOptions.paths`.
3346
+ */
3347
+ declare const baseBundle: AgentRuleBundle;
3348
+
3349
+ /**
3350
+ * Build the bcm-writer bundle with the supplied resolved paths.
3351
+ *
3352
+ * Every reference to a canonical agent path (bcm root, docs root, etc.)
3353
+ * inside the rule / skill / sub-agent content strings is an interpolation
3354
+ * of the supplied `paths` struct, so a consumer override of
3355
+ * `AgentConfigOptions.paths` propagates to the rendered output.
3356
+ *
3357
+ * Consuming projects can disable it with `excludeBundles: ["bcm-writer"]`.
3358
+ * `appliesWhen` always returns `true` per this batch's directive that
3359
+ * bundles assume peers are present.
3360
+ *
3361
+ * Ships a single consolidated sub-agent (`bcm-writer`) with all 4 phase
3362
+ * handlers in one prompt (outline, scaffold, context, connect), a
3363
+ * user-invocable skill (`/write-bcm`), and `type:bcm-document` plus
3364
+ * `bcm:*` phase labels.
3365
+ *
3366
+ * The bundle assumes the `people-profile`, `company-profile`, and
3367
+ * `research-pipeline` bundles are also enabled so Phase 4 can hand off
3368
+ * surfaced items via `people:research`, `company:research`, and
3369
+ * `research:scope` issues.
3370
+ */
3371
+ declare function buildBcmWriterBundle(paths?: ResolvedAgentPaths): AgentRuleBundle;
3372
+ /**
3373
+ * Default-paths instance of the bcm-writer bundle, preserved for
3374
+ * backward compatibility with consumers that import the const directly.
3375
+ * The factory above is the canonical entry point when a consumer
3376
+ * supplies `AgentConfigOptions.paths`.
3377
+ */
3378
+ declare const bcmWriterBundle: AgentRuleBundle;
3379
+
3380
+ /**
3381
+ * Build the business-models bundle with the supplied resolved paths.
3382
+ *
3383
+ * Every reference to a canonical agent path (docs root, research root,
3384
+ * etc.) inside the rule / skill / sub-agent content strings is an
3385
+ * interpolation of the supplied `paths` struct, so a consumer override
3386
+ * of `AgentConfigOptions.paths` propagates to the rendered output.
3387
+ *
3388
+ * The bundle sits between `industry-discovery` (upstream, selects
3389
+ * verticals) and `bcm-writer` (downstream, models capabilities). It
3390
+ * assumes `bcm-writer` is enabled so Phase 3 can hand off surfaced
3391
+ * capabilities via `bcm:outline` issues, and it is read by
3392
+ * `company-profile` via the shared `<BUSINESS_MODELS_ROOT>` default
3393
+ * path (`<docsRoot>/industry-research/`).
3394
+ */
3395
+ declare function buildBusinessModelsBundle(paths?: ResolvedAgentPaths): AgentRuleBundle;
3396
+ /**
3397
+ * Default-paths instance of the business-models bundle, preserved for
3398
+ * backward compatibility with consumers that import the const
3399
+ * directly. The factory above is the canonical entry point when a
3400
+ * consumer supplies `AgentConfigOptions.paths`.
3401
+ */
3402
+ declare const businessModelsBundle: AgentRuleBundle;
3403
+
3404
+ /**
3405
+ * Build the company-profile bundle with the supplied resolved paths.
3406
+ *
3407
+ * Every reference to a canonical agent path (docs root, etc.) inside
3408
+ * the rule / skill / sub-agent content strings is an interpolation of
3409
+ * the supplied `paths` struct, so a consumer override of
3410
+ * `AgentConfigOptions.paths` propagates to the rendered output.
3411
+ *
3412
+ * Ships a sub-agent (`company-profile-analyst`), four user-invocable
3413
+ * skills (`/profile-company`, `/match-company`, `/refresh-company`,
3414
+ * `/analyze-segment`), and `type:company-profile` plus `company:*`
3415
+ * phase labels for the six phases.
3416
+ */
3417
+ declare function buildCompanyProfileBundle(paths?: ResolvedAgentPaths): AgentRuleBundle;
3418
+ /**
3419
+ * Default-paths instance of the company-profile bundle, preserved for
3420
+ * backward compatibility with consumers that import the const
3421
+ * directly. The factory above is the canonical entry point when a
3422
+ * consumer supplies `AgentConfigOptions.paths`.
3423
+ */
3424
+ declare const companyProfileBundle: AgentRuleBundle;
3425
+
3426
+ /**
3427
+ * Customer-profile bundle — enabled by default.
3428
+ *
3429
+ * Consuming projects can disable it with
3430
+ * `excludeBundles: ["customer-profile"]`. `appliesWhen` always
3431
+ * returns `true` per the workflow-bundle peer-present assumption.
3432
+ *
3433
+ * Ships a sub-agent (`customer-profile-analyst`), three
3434
+ * user-invocable skills (`/discover-customers`, `/profile-customer`,
3435
+ * `/analyze-customer-competitors`), a customer-profile-page template
3436
+ * (emitted alongside the profile skill), and `type:customer-profile`
3437
+ * plus `customer:*` phase labels.
3438
+ *
3439
+ * The bundle sits downstream of `meeting-analysis`,
3440
+ * `industry-discovery`, and `research-pipeline` (which surface the
3441
+ * need for customer-archetype research) and hands off unmet needs to
3442
+ * the `requirements-analyst` bundle via `req:scan` issues, and
3443
+ * canonical profiles to `company-profile` and `people-profile` for
3444
+ * representative customer organizations, competitor organizations,
3445
+ * and notable contacts.
3446
+ *
3447
+ * Distinct from `company-profile`: the `company-profile` bundle
3448
+ * targets any company entity (competitor, vendor, partner, customer
3449
+ * organization); this bundle targets **customer archetypes** (the
3450
+ * reusable shape of a buyer/user segment) and closes the loop from
3451
+ * unmet need to `req:scan` seed via the shared software-profile
3452
+ * feature matrix.
3453
+ */
3454
+ declare function buildCustomerProfileBundle(paths?: ResolvedAgentPaths): AgentRuleBundle;
3455
+ /**
3456
+ * Default-paths instance of the customer-profile bundle, preserved
3457
+ * for backward compatibility with consumers that import the const
3458
+ * directly. The factory above is the canonical entry point when a
3459
+ * consumer supplies `AgentConfigOptions.paths`.
3460
+ */
3461
+ declare const customerProfileBundle: AgentRuleBundle;
3462
+
3463
+ /**
3464
+ * Render the shell body of the `.claude/procedures/extract-api.sh`
3465
+ * helper. Exported so the docs-sync bundle can register it as an
3466
+ * `AgentProcedure` and the bundles test suite can assert on the
3467
+ * script's contents.
3468
+ *
3469
+ * The helper runs `@microsoft/api-extractor` end-to-end for a single
3470
+ * package and writes the `.api.md` rollup to the scratch folder
3471
+ * declared by that package's `api-extractor.json`. Rollups are
3472
+ * **regenerate-on-scan** per the docs-sync epic resolved decision #3
3473
+ * — the scan phase consumes the freshly-regenerated rollup in-memory
3474
+ * rather than comparing against a committed baseline.
3475
+ *
3476
+ * Exit codes: `0` success, `1` usage / missing directory, `2` no
3477
+ * `api-extractor.json` at the target path, `3` the extractor exited
3478
+ * non-zero (compile error or extractor failure).
3479
+ */
3480
+ declare function renderExtractApiProcedure(): string;
3481
+ /**
3482
+ * `AgentProcedure` definition for `.claude/procedures/extract-api.sh`.
3483
+ * Registered on the docs-sync bundle so it ships when the bundle is
3484
+ * force-included — matches the packaging of other bundled procedures
3485
+ * (see `orchestratorBundle.procedures`).
3486
+ */
3487
+ declare const extractApiProcedure: AgentProcedure;
3488
+ /**
3489
+ * Docs-sync bundle — scaffolding release.
3490
+ *
3491
+ * Opt-in via `includeBundles: ["docs-sync"]`. `appliesWhen` returns
3492
+ * `false` by default so the scaffold ships disabled until a
3493
+ * downstream child issue enables it across the monorepo.
3494
+ *
3495
+ * Provides the skeleton of a 2-phase drift-detection + audit pipeline
3496
+ * (scan → fix) designed for monorepos that keep documentation inside
3497
+ * a Starlight singleton. Ships a sub-agent, two user-invocable skills
3498
+ * (`/docs-sync-pr`, `/docs-sync-audit`), five new labels
3499
+ * (`type:docs-sync`, `docs-sync:scan`, `docs-sync:fix`,
3500
+ * `docs-sync:advisory`, `docs-sync:blocking`), and a
3501
+ * `Documentation Sync Workflow` rule rendered into CLAUDE.md so
3502
+ * humans reading the file see the pipeline exists even while the
3503
+ * behavior is still landing across child issues.
3504
+ */
3505
+ declare function buildDocsSyncBundle(paths?: ResolvedAgentPaths): AgentRuleBundle;
3506
+ /**
3507
+ * Default-paths instance of the docs-sync bundle, preserved for
3508
+ * parity with other path-aware bundles in this directory. The factory
3509
+ * above is the canonical entry point when a consumer supplies
3510
+ * `AgentConfigOptions.paths`.
3511
+ */
3512
+ declare const docsSyncBundle: AgentRuleBundle;
3513
+
3514
+ /**
3515
+ * GitHub workflow bundle — auto-detected when the project has a GitHub component.
3516
+ */
3517
+ declare const githubWorkflowBundle: AgentRuleBundle;
3518
+
3519
+ /**
3520
+ * Build the industry-discovery bundle with the supplied resolved paths.
3521
+ *
3522
+ * Every reference to a canonical agent path (docs root, etc.) inside
3523
+ * the rule / skill / sub-agent content strings is an interpolation of
3524
+ * the supplied `paths` struct, so a consumer override of
3525
+ * `AgentConfigOptions.paths` propagates to the rendered output.
3526
+ */
3527
+ declare function buildIndustryDiscoveryBundle(paths?: ResolvedAgentPaths): AgentRuleBundle;
3528
+ /**
3529
+ * Default-paths instance of the industry-discovery bundle, preserved
3530
+ * for backward compatibility with consumers that import the const
3531
+ * directly. The factory above is the canonical entry point when a
3532
+ * consumer supplies `AgentConfigOptions.paths`.
3533
+ */
3534
+ declare const industryDiscoveryBundle: AgentRuleBundle;
3535
+
3536
+ /**
3537
+ * Jest bundle — auto-detected when Jest is in dependencies.
3538
+ */
3539
+ declare const jestBundle: AgentRuleBundle;
3540
+
3541
+ /**
3542
+ * Maintenance-audit bundle — enabled by default.
3543
+ *
3544
+ * Consuming projects can disable it with
3545
+ * `excludeBundles: ["maintenance-audit"]`. `appliesWhen` always returns
3546
+ * `true` per this batch's directive that bundles assume peers are
3547
+ * present.
3548
+ *
3549
+ * Provides a 3-phase documentation-maintenance pipeline
3550
+ * (scan → fix → verify) designed for any project with structured doc
3551
+ * registries and cross-references. Ships a sub-agent, two user-
3552
+ * invocable skills (`/audit-docs`, `/verify-audit`), and `maint:*`
3553
+ * phase labels via the bundle `labels` mechanism so consuming projects
3554
+ * automatically pick up the label taxonomy through the sync-labels
3555
+ * workflow.
3556
+ */
3557
+ declare function buildMaintenanceAuditBundle(paths?: ResolvedAgentPaths): AgentRuleBundle;
3558
+ /**
3559
+ * Default-paths instance of the maintenance-audit bundle, preserved
3560
+ * for backward compatibility with consumers that import the const
3561
+ * directly. The factory above is the canonical entry point when a
3562
+ * consumer supplies `AgentConfigOptions.paths`.
3563
+ */
3564
+ declare const maintenanceAuditBundle: AgentRuleBundle;
3565
+
3566
+ /**
3567
+ * Meeting analysis bundle — included by default.
3568
+ * Provides a 4-phase meeting transcript processing workflow.
3569
+ */
3570
+ declare const meetingAnalysisBundle: AgentRuleBundle;
3571
+
3572
+ /**
3573
+ * Default for whether the orchestrator delegates the pre-flight merge
3574
+ * sweep to the `pr-reviewer` sub-agent. Mirrors vortex's step 0b
3575
+ * contract: invoking the reviewer as a sub-agent lets the merge
3576
+ * workflow run on its own (cheaper) model rather than on the
3577
+ * orchestrator's model. Set to `false` to have the orchestrator merge
3578
+ * eligible PRs inline.
3579
+ *
3580
+ * @see PreflightPrConfig
3581
+ */
3582
+ declare const DEFAULT_DELEGATE_TO_PR_REVIEWER = true;
3583
+ /**
3584
+ * Default merge method used when the orchestrator merges a PR inline
3585
+ * (`delegateToPrReviewer = false`). Squash-and-merge matches every
3586
+ * existing configulator consumer and keeps `main` free of
3587
+ * branch-construction noise.
3588
+ *
3589
+ * @see PreflightPrConfig
3590
+ */
3591
+ declare const DEFAULT_MERGE_METHOD: PreflightMergeMethod;
3592
+ /**
3593
+ * Default for whether pre-flight skips PRs lacking a
3594
+ * `Closes/Fixes/Resolves #<n>` keyword in the body. Most pipelines
3595
+ * require a linked issue, so the safe default is `true` — pre-flight
3596
+ * only merges PRs that cleanly complete a known issue.
3597
+ *
3598
+ * @see PreflightPrConfig
3599
+ */
3600
+ declare const DEFAULT_REQUIRE_LINKED_ISSUE = true;
3601
+ /**
3602
+ * Merge-method values accepted on `PreflightPrConfig.mergeMethod`.
3603
+ * Matches the `gh pr merge` flags: `--squash`, `--merge`, `--rebase`.
3604
+ */
3605
+ declare const PREFLIGHT_MERGE_METHOD_VALUES: readonly ["squash", "merge", "rebase"];
3606
+ type PreflightMergeMethod = (typeof PREFLIGHT_MERGE_METHOD_VALUES)[number];
3607
+ /**
3608
+ * Fully-resolved pre-flight PR merge settings. Every field is defaulted
3609
+ * so downstream renderers can reason about a single canonical shape.
3610
+ */
3611
+ interface ResolvedPreflightPr {
3612
+ readonly enabled: boolean;
3613
+ readonly delegateToPrReviewer: boolean;
3614
+ readonly mergeMethod: PreflightMergeMethod;
3615
+ readonly requireLinkedIssue: boolean;
3616
+ readonly eligibleLabels: ReadonlyArray<string>;
3617
+ }
3618
+ /**
3619
+ * Resolve a (possibly absent) `PreflightPrConfig` into a canonical
3620
+ * `ResolvedPreflightPr` with every field filled in. Unset fields
3621
+ * cascade from their documented defaults.
3622
+ *
3623
+ * Malformed configs (unknown `mergeMethod`, empty or whitespace-only
3624
+ * `eligibleLabels` entry) throw a descriptive `Error` — callers should
3625
+ * not need to guard against it at runtime.
3626
+ */
3627
+ declare function resolvePreflightPr(config?: PreflightPrConfig): ResolvedPreflightPr;
3628
+ /**
3629
+ * Synth-time validation hook. Throws a descriptive `Error` when the
3630
+ * supplied `PreflightPrConfig` is malformed. Called by
3631
+ * `AgentConfig.preSynthesize` before any rendering so a misconfigured
3632
+ * pre-flight sweep fails the build instead of silently shipping a
3633
+ * broken check-blocked.sh subcommand. Returns the resolved config
3634
+ * unchanged so callers can write
3635
+ * `const pf = validatePreflightPrConfig(config)` in one line.
3636
+ *
3637
+ * Malformed cases rejected here:
3638
+ *
3639
+ * - `mergeMethod` not one of `squash` / `merge` / `rebase`.
3640
+ * - Any `eligibleLabels` entry that is empty or whitespace-only.
3641
+ */
3642
+ declare function validatePreflightPrConfig(config?: PreflightPrConfig): ResolvedPreflightPr;
3643
+ /**
3644
+ * Render the markdown subsection appended to the
3645
+ * `orchestrator-conventions` rule. Always returns a non-empty string so
3646
+ * the orchestrator rule documents the pre-flight contract even when the
3647
+ * consumer relies on the defaults.
3648
+ */
3649
+ declare function renderPreflightPrSection(pf: ResolvedPreflightPr): string;
3650
+ /**
3651
+ * Render a shell-script snippet embedded in `check-blocked.sh`. The
3652
+ * snippet declares a `cmd_preflight()` function that scans open PRs
3653
+ * and echoes one eligibility line per PR in the canonical
3654
+ * `PREFLIGHT_MERGE PR #<n> issue:#<m> branch:<b> — "<title>"` format
3655
+ * (or `PREFLIGHT_SKIP PR #<n> — <reason> — "<title>"` on skip, or
3656
+ * `NO_PREFLIGHT_PRS` when nothing is eligible).
3657
+ *
3658
+ * Returns the body of a shell function block (including the
3659
+ * `cmd_preflight()` wrapper) so the surrounding script can splice it
3660
+ * inline at the exact indent level it wants.
3661
+ */
3662
+ declare function renderPreflightPrShellHelpers(pf: ResolvedPreflightPr): string;
3663
+
3664
+ /**
3665
+ * Default dispatch-to-housekeeping ratio — openhi's `DISPATCHER.md`
3666
+ * ships a 4:1 ratio: four consecutive dispatch runs, then one
3667
+ * housekeeping run, then the counter wraps. The ratio value stored
3668
+ * here is the dispatch-run count per housekeeping run; with
3669
+ * `ratio = 4`, runs 1–4 dispatch and run 5 housekeeps. The cycle
3670
+ * length is therefore `ratio + 1`.
3671
+ *
3672
+ * @see RunRatioConfig
3673
+ */
3674
+ declare const DEFAULT_DISPATCH_TO_HOUSEKEEPING_RATIO = 4;
3675
+ /**
3676
+ * Default on-disk path for the orchestrator run-counter state file,
3677
+ * relative to the repo root. The file is tiny JSON
3678
+ * (`{ "run_counter": <n> }`) and is gitignored in most consumer repos
3679
+ * because it's local-only — each operator's orchestrator session
3680
+ * maintains its own counter.
3681
+ *
3682
+ * @see RunRatioConfig
3683
+ */
3684
+ declare const DEFAULT_STATE_FILE_PATH = ".claude/state/orchestrator-runs.json";
3685
+ /**
3686
+ * Default recommended model label for dispatch runs. Rendered into
3687
+ * the orchestrator-conventions rule so agents and humans can read the
3688
+ * model pairing at a glance; the string is purely informational and
3689
+ * does not cause configulator to set `AGENT_MODEL` on the sub-agent.
3690
+ *
3691
+ * @see RunRatioConfig
3692
+ */
3693
+ declare const DEFAULT_DISPATCH_MODEL = "opus";
3694
+ /**
3695
+ * Default recommended model label for housekeeping runs. See
3696
+ * `DEFAULT_DISPATCH_MODEL` for the rendering contract. Housekeeping
3697
+ * runs are mechanical (batch PR review + maintenance scan), so a
3698
+ * cheaper model like Sonnet is the documented recommendation.
3699
+ *
3700
+ * @see RunRatioConfig
3701
+ */
3702
+ declare const DEFAULT_HOUSEKEEPING_MODEL = "sonnet";
3703
+ /**
3704
+ * Fully-resolved run-ratio settings. Every field is defaulted so
3705
+ * downstream renderers can reason about a single canonical shape.
3706
+ */
3707
+ interface ResolvedRunRatio {
3708
+ readonly enabled: boolean;
3709
+ readonly ratio: number;
3710
+ readonly stateFilePath: string;
3711
+ readonly dispatchModel: string;
3712
+ readonly housekeepingModel: string;
3713
+ }
3714
+ /**
3715
+ * Resolve a (possibly absent) `RunRatioConfig` into a canonical
3716
+ * `ResolvedRunRatio` with every field filled in. Unset fields
3717
+ * cascade from their documented defaults.
3718
+ *
3719
+ * Malformed configs (non-integer or non-positive ratio, empty or
3720
+ * whitespace-only state file path) throw a descriptive `Error` —
3721
+ * callers should not need to guard against it at runtime.
3722
+ */
3723
+ declare function resolveRunRatio(config?: RunRatioConfig): ResolvedRunRatio;
3724
+ /**
3725
+ * Synth-time validation hook. Throws a descriptive `Error` when the
3726
+ * supplied `RunRatioConfig` is malformed. Called by
3727
+ * `AgentConfig.preSynthesize` before any rendering so a misconfigured
3728
+ * ratio fails the build instead of silently shipping broken
3729
+ * housekeeping cadence. Returns the resolved ratio unchanged so
3730
+ * callers can write `const rr = validateRunRatioConfig(config)` in
3731
+ * one line.
3732
+ *
3733
+ * Malformed cases rejected here:
3734
+ *
3735
+ * - `ratio` non-integer, zero, or negative.
3736
+ * - `stateFilePath` empty / whitespace-only, or an absolute path
3737
+ * (the state file must live inside the repo).
3738
+ */
3739
+ declare function validateRunRatioConfig(config?: RunRatioConfig): ResolvedRunRatio;
3740
+ /**
3741
+ * Compute the run type (`"dispatch"` or `"housekeeping"`) for a
3742
+ * given run counter value and resolved ratio. Used by the TypeScript
3743
+ * side (tests, downstream consumers that want to reason about the
3744
+ * cadence without shelling out). The shell helper produced by
3745
+ * `renderRunRatioShellHelpers` implements the same logic.
3746
+ *
3747
+ * Every `(ratio + 1)`th run is a housekeeping run; all others
3748
+ * dispatch. For `ratio = 4`, runs 1–4 dispatch and run 5
3749
+ * housekeeps; run 6 is again dispatch; run 10 housekeeps.
3750
+ */
3751
+ declare function classifyRun(runCounter: number, ratio: ResolvedRunRatio): "dispatch" | "housekeeping";
3752
+ /**
3753
+ * Render the markdown subsection appended to the
3754
+ * `orchestrator-conventions` rule. Always returns a non-empty string
3755
+ * so the orchestrator rule documents the cadence even when the
3756
+ * consumer relies on the defaults.
3757
+ */
3758
+ declare function renderRunRatioSection(ratio: ResolvedRunRatio): string;
3759
+ /**
3760
+ * Render a shell-script snippet embedded in `check-blocked.sh`. The
3761
+ * snippet declares a `run_counter_tick()` function that:
3762
+ *
3763
+ * 1. Reads the state file (creating it with `run_counter: 1` if
3764
+ * missing or unparseable).
3765
+ * 2. Increments the counter.
3766
+ * 3. Writes the new counter back atomically (temp file + `mv`).
3767
+ * 4. Echoes the post-increment counter and the classified run type
3768
+ * (`dispatch` or `housekeeping`) in the canonical
3769
+ * `run=<n> type=<dispatch|housekeeping>` format.
3770
+ *
3771
+ * Returns the body of a shell function block (including the
3772
+ * `run_counter_tick()` wrapper) so the surrounding script can splice
3773
+ * it inline at the exact indent level it wants.
3774
+ */
3775
+ declare function renderRunRatioShellHelpers(ratio: ResolvedRunRatio): string;
3776
+
3777
+ /**
3778
+ * Recommended model labels surfaced on the scheduled-task SKILL.md
3779
+ * frontmatter. The labels are **informational** — configulator does not
3780
+ * pin a model per task (the Claude Code scheduled-task runtime does not
3781
+ * support per-task model pinning yet). Operators choose the model at
3782
+ * invocation time; splitting workers by type still gives independent
3783
+ * cadence and clean opt-in/opt-out control.
3784
+ *
3785
+ * @see ScheduledTasksConfig
3786
+ */
3787
+ declare const SCHEDULED_TASK_MODEL_VALUES: readonly ["opus", "sonnet", "haiku"];
3788
+ type ScheduledTaskModel = (typeof SCHEDULED_TASK_MODEL_VALUES)[number];
3789
+ /**
3790
+ * Default root directory (relative to the repo root) for scheduled-task
3791
+ * files. Mirrors the vortex layout — one directory per task at
3792
+ * `.claude/scheduled-tasks/<taskId>/SKILL.md`.
3793
+ *
3794
+ * @see ScheduledTasksConfig
3795
+ */
3796
+ declare const DEFAULT_SCHEDULED_TASKS_ROOT = ".claude/scheduled-tasks";
3797
+ /**
3798
+ * Off-peak cron sample surfaced in the rendered documentation. Every
3799
+ * 20 minutes during off-peak hours (before 08:00 and after 14:00
3800
+ * local). Informational only — tasks ship disabled by default with
3801
+ * no cron, so the consumer must opt in and set a cron explicitly.
3802
+ *
3803
+ * @see ScheduledTasksConfig
3804
+ */
3805
+ declare const DEFAULT_OFF_PEAK_CRON_EXAMPLE = "3,23,43 0-7,14-23 * * *";
3806
+ /**
3807
+ * A single fully-resolved scheduled-task entry. Returned by
3808
+ * `resolveScheduledTasks()`; the rendered documentation section and
3809
+ * the emitted `.claude/scheduled-tasks/<taskId>/SKILL.md` files are
3810
+ * derived from this list.
3811
+ */
3812
+ interface ResolvedScheduledTask {
3813
+ /**
3814
+ * Unique task directory name. Emitted under
3815
+ * `<root>/<taskId>/SKILL.md`. Derived from the sub-agent name by
3816
+ * default (e.g. `company-profile-analyst` → `worker-company-profile`).
3817
+ */
3818
+ readonly taskId: string;
1755
3819
  /**
1756
- * Resolves template variables in rule content using project metadata.
1757
- * Emits synthesis warnings for rules with unresolved variables.
3820
+ * Target sub-agent name (e.g. `company-profile-analyst`). The task's
3821
+ * rendered prompt points operators at `.claude/agents/<agent>.md`.
1758
3822
  */
1759
- private resolveTemplates;
3823
+ readonly agent: string;
1760
3824
  /**
1761
- * Resolves template variables in skill instructions using project metadata.
3825
+ * Human-readable agent label for rendered tables and frontmatter
3826
+ * descriptions (e.g. `"Company Profile"`).
1762
3827
  */
1763
- private resolveSkillTemplates;
3828
+ readonly agentLabel: string;
1764
3829
  /**
1765
- * Resolves template variables in sub-agent prompts using project metadata.
3830
+ * Primary GitHub `type:*` label (without the `type:` prefix). When
3831
+ * `typeLabels` is unset, this is the sole type filter; when
3832
+ * `typeLabels` is set, it is the first element.
1766
3833
  */
1767
- private resolveSubAgentTemplates;
3834
+ readonly typeLabel: string;
1768
3835
  /**
1769
- * Resolves template variables in procedure content using project metadata.
3836
+ * Exact `type:*` label values (without the `type:` prefix) the
3837
+ * worker picks up. When set (length >= 1), represents a
3838
+ * multi-type filter (e.g. routing-bucket `worker-issue`). When
3839
+ * unset, the `typeLabel` single-value filter applies.
1770
3840
  */
1771
- private resolveProcedureTemplates;
3841
+ readonly typeLabels?: ReadonlyArray<string>;
3842
+ /**
3843
+ * Optional phase-label prefix (e.g. `company:`). When present and
3844
+ * `phaseLabels` is unset, the task's SKILL.md instructs the worker
3845
+ * to filter on both `type:<typeLabel>` **and** any `<phasePrefix>*`
3846
+ * label. Ignored when `phaseLabels` is set.
3847
+ */
3848
+ readonly phasePrefix?: string;
3849
+ /**
3850
+ * Exact phase-label values the worker filters on (e.g.
3851
+ * `["req:write"]`). When set (length >= 1), takes precedence over
3852
+ * `phasePrefix`. When unset, the `phasePrefix` prefix-match
3853
+ * applies.
3854
+ */
3855
+ readonly phaseLabels?: ReadonlyArray<string>;
3856
+ /**
3857
+ * Recommended model tier. Surfaced on the task's SKILL.md
3858
+ * frontmatter and in the rendered documentation table.
3859
+ */
3860
+ readonly recommendedModel: ScheduledTaskModel;
3861
+ /** Whether the task is emitted to disk. Default: `false`. */
3862
+ readonly enabled: boolean;
3863
+ /**
3864
+ * Optional cron expression. When `null` the task is manual-only
3865
+ * (runs only when an operator invokes it explicitly).
3866
+ */
3867
+ readonly cron: string | null;
3868
+ /**
3869
+ * Short one-line description for the rendered table and SKILL.md
3870
+ * frontmatter.
3871
+ */
3872
+ readonly description: string;
3873
+ }
3874
+ /**
3875
+ * Canonical default registry of scheduled-task entries. One entry per
3876
+ * agent bundle that ships with configulator. Every entry is
3877
+ * **disabled by default** — consumers must explicitly opt in via
3878
+ * `ScheduledTasksConfig.overrides[taskId].enabled = true`.
3879
+ *
3880
+ * The registry mirrors the funnel-tier table in `tiers.ts` so the
3881
+ * dispatch ordering, scheduled-task filter, and orchestrator queue
3882
+ * scan all agree on the type-label taxonomy.
3883
+ */
3884
+ declare const DEFAULT_SCHEDULED_TASK_ENTRIES: ReadonlyArray<ResolvedScheduledTask>;
3885
+ /**
3886
+ * Fully-resolved scheduled-tasks settings. Every field is defaulted so
3887
+ * downstream renderers can reason about a single canonical shape.
3888
+ */
3889
+ interface ResolvedScheduledTasks {
3890
+ readonly enabled: boolean;
3891
+ readonly root: string;
3892
+ readonly tasks: ReadonlyArray<ResolvedScheduledTask>;
3893
+ }
3894
+ /**
3895
+ * Resolve a (possibly absent) `ScheduledTasksConfig` into a canonical
3896
+ * `ResolvedScheduledTasks` with every field filled in. Unset fields
3897
+ * cascade from their documented defaults.
3898
+ *
3899
+ * The resolver merges three sources in this order:
3900
+ *
3901
+ * 1. `DEFAULT_SCHEDULED_TASK_ENTRIES` — the built-in per-agent registry.
3902
+ * 2. `config.overrides` — per-task consumer overrides keyed by `taskId`.
3903
+ * 3. `config.tasks` — fully consumer-authored entries. Entries whose
3904
+ * `taskId` matches a default entry **replace** it; entries with a new
3905
+ * `taskId` are appended.
3906
+ *
3907
+ * Malformed configs (unknown model, empty taskId/agent/typeLabel,
3908
+ * duplicate taskIds in a single supplied list) throw a descriptive
3909
+ * `Error` — callers should not need to guard against it at runtime.
3910
+ */
3911
+ declare function resolveScheduledTasks(config?: ScheduledTasksConfig): ResolvedScheduledTasks;
3912
+ /**
3913
+ * Synth-time validation hook. Throws a descriptive `Error` when the
3914
+ * supplied `ScheduledTasksConfig` is malformed. Called by
3915
+ * `AgentConfig.preSynthesize` before any rendering so a misconfigured
3916
+ * scheduled-tasks table fails the build instead of silently shipping
3917
+ * broken worker prompts. Returns the resolved config unchanged so
3918
+ * callers can write `const st = validateScheduledTasksConfig(config)` in
3919
+ * one line.
3920
+ *
3921
+ * Malformed cases rejected here:
3922
+ *
3923
+ * - `root` empty, whitespace-only, or absolute.
3924
+ * - `overrides[taskId]` referencing an unknown `taskId`.
3925
+ * - Consumer-supplied `tasks` entry with unknown model, empty
3926
+ * `taskId` / `agent` / `typeLabel`, or cron string that is not a
3927
+ * plain string.
3928
+ * - Duplicate `taskId` values within the supplied `tasks` list.
3929
+ */
3930
+ declare function validateScheduledTasksConfig(config?: ScheduledTasksConfig): ResolvedScheduledTasks;
3931
+ /**
3932
+ * Render the markdown subsection appended to the
3933
+ * `orchestrator-conventions` rule. Always returns a non-empty string —
3934
+ * the default registry is non-empty so the section documents the
3935
+ * per-agent scheduled-task layout even when every task is disabled
3936
+ * (the default).
3937
+ */
3938
+ declare function renderScheduledTasksSection(resolved: ResolvedScheduledTasks): string;
3939
+ /**
3940
+ * Render the body of a single scheduled-task `SKILL.md` file. The
3941
+ * frontmatter carries the task name, description, and recommended
3942
+ * model; the body teaches the worker which label filter to apply and
3943
+ * which agent file to route issues to.
3944
+ *
3945
+ * The output is the full file contents — including the leading
3946
+ * frontmatter delimiter — so callers can hand it straight to a
3947
+ * `TextFile`.
3948
+ */
3949
+ declare function renderScheduledTaskSkillFile(task: ResolvedScheduledTask): string;
3950
+
3951
+ /**
3952
+ * Classified scope size for a single issue. Drives the dispatch
3953
+ * decision in the orchestrator — `small` / `medium` are dispatched,
3954
+ * `large` is rejected and decomposed.
3955
+ */
3956
+ declare const SCOPE_CLASS_VALUES: readonly ["small", "medium", "large"];
3957
+ type ScopeClass = (typeof SCOPE_CLASS_VALUES)[number];
3958
+ /**
3959
+ * Default acceptance-criteria thresholds — openhi's published
3960
+ * heuristic. An issue with at most 3 acceptance-criteria checkboxes
3961
+ * is `small`; at most 6 is `medium`; more than 6 is `large`.
3962
+ */
3963
+ declare const DEFAULT_AC_THRESHOLDS: ScopeGateThresholds;
3964
+ /**
3965
+ * Default sources thresholds — openhi's published heuristic. An
3966
+ * issue with at most 2 listed sources is `small`; at most 5 is
3967
+ * `medium`; more than 5 is `large`.
3968
+ */
3969
+ declare const DEFAULT_SOURCES_THRESHOLDS: ScopeGateThresholds;
3970
+ /**
3971
+ * Default decomposition-proposal comment body. The orchestrator
3972
+ * substitutes the following angle-bracketed uppercase-snake
3973
+ * placeholders at comment-composition time:
3974
+ *
3975
+ * - `<AC_COUNT>` — observed acceptance-criteria count.
3976
+ * - `<SOURCES_COUNT>` — observed sources count.
3977
+ * - `<AC_LIMIT>` — the `acceptanceCriteria.mediumMax` threshold.
3978
+ * - `<SOURCES_LIMIT>` — the `sources.mediumMax` threshold.
3979
+ *
3980
+ * The placeholder syntax deliberately avoids `{{curly-brace}}` form —
3981
+ * `AgentConfig`'s template resolver claims that namespace at rule
3982
+ * generation time, so a `{{acCount}}` placeholder would be rewritten
3983
+ * to `<acCount>` before the agent ever saw it.
3984
+ *
3985
+ * This template is deliberately generic so every consuming repo
3986
+ * can adopt it without customization — project-specific phrasing
3987
+ * belongs in `ScopeGateConfig.decompositionTemplate`.
3988
+ */
3989
+ declare const DEFAULT_DECOMPOSITION_TEMPLATE: string;
3990
+ /**
3991
+ * Fully-resolved scope-gate settings. Every field is defaulted so
3992
+ * downstream renderers can reason about a single canonical shape.
3993
+ */
3994
+ interface ResolvedScopeGate {
3995
+ readonly enabled: boolean;
3996
+ readonly acceptanceCriteria: ScopeGateThresholds;
3997
+ readonly sources: ScopeGateThresholds;
3998
+ readonly autoFile: boolean;
3999
+ readonly decompositionTemplate: string;
4000
+ }
4001
+ /**
4002
+ * Resolve a (possibly absent) `ScopeGateConfig` into a canonical
4003
+ * `ResolvedScopeGate` with every field filled in. Unset fields
4004
+ * cascade from their documented defaults.
4005
+ *
4006
+ * Malformed configs (negative or non-integer thresholds, inverted
4007
+ * ranges) throw a descriptive `Error` — callers should not need to
4008
+ * guard against it at runtime.
4009
+ */
4010
+ declare function resolveScopeGate(config?: ScopeGateConfig): ResolvedScopeGate;
4011
+ /**
4012
+ * Synth-time validation hook. Throws a descriptive `Error` when the
4013
+ * supplied `ScopeGateConfig` is malformed. Called by
4014
+ * `AgentConfig.preSynthesize` before any rendering so a misconfigured
4015
+ * gate fails the build instead of silently shipping broken dispatch
4016
+ * thresholds. Returns the resolved gate unchanged so callers can
4017
+ * write `const gate = validateScopeGateConfig(config)` in one line.
4018
+ *
4019
+ * Malformed cases rejected here:
4020
+ *
4021
+ * - Threshold values that are negative or non-integer.
4022
+ * - Threshold ranges where `mediumMax <= smallMax` (the gate would
4023
+ * never classify an issue as `medium`).
4024
+ */
4025
+ declare function validateScopeGateConfig(config?: ScopeGateConfig): ResolvedScopeGate;
4026
+ /**
4027
+ * Classify a raw issue body against a resolved scope gate. Returns
4028
+ * the scope class and the observed counts so the orchestrator can
4029
+ * embed them in the decomposition-proposal comment.
4030
+ *
4031
+ * The parser is deliberately tolerant:
4032
+ *
4033
+ * - Acceptance-criteria checkboxes — lines matching `- [ ]` or
4034
+ * `- [x]` (case-insensitive) under a `## Acceptance Criteria`
4035
+ * heading (or any heading whose normalized text equals
4036
+ * `acceptance criteria`). Stops at the next heading.
4037
+ * - Sources — bullet list items (`- ` or `* `) under any of
4038
+ * `## Inputs`, `## References`, `## Sources` (case-insensitive).
4039
+ * Counts from every matching section are summed, so an issue
4040
+ * that uses both `## Inputs` and `## References` has its sources
4041
+ * counted across both.
4042
+ *
4043
+ * An issue with **no** `## Acceptance Criteria` section produces an
4044
+ * `acCount` of 0 and is classified `small` on the AC axis. An issue
4045
+ * body that's pure prose with no recognizable sections classifies
4046
+ * `small` — the gate never rejects an issue it can't read.
4047
+ */
4048
+ declare function classifyIssueScope(body: string, gate: ResolvedScopeGate): {
4049
+ readonly scope: ScopeClass;
4050
+ readonly acCount: number;
4051
+ readonly sourcesCount: number;
4052
+ };
4053
+ /**
4054
+ * Render the markdown subsection appended to the
4055
+ * `orchestrator-conventions` rule. Always returns a non-empty string
4056
+ * so the orchestrator rule documents the scope gate even when the
4057
+ * consumer relies on the defaults.
4058
+ */
4059
+ declare function renderScopeGateSection(gate: ResolvedScopeGate): string;
4060
+ /**
4061
+ * Render a shell-script snippet embedded in `check-blocked.sh`. The
4062
+ * snippet declares a `scope_of()` function that reads an issue body
4063
+ * (passed as `$1`) and echoes one of `small` / `medium` / `large`.
4064
+ * Orchestrator-side bash hooks call this function before dispatch.
4065
+ *
4066
+ * Returns the body of a shell function block (including the
4067
+ * `scope_of()` wrapper) so the surrounding script can splice it
4068
+ * inline at the exact indent level it wants.
4069
+ */
4070
+ declare function renderScopeGateShellHelpers(gate: ResolvedScopeGate): string;
4071
+
4072
+ /**
4073
+ * Valid funnel-tier values. Lower numbers dispatch first when priority
4074
+ * is tied. See `DEFAULT_AGENT_TIERS` for the role of each tier.
4075
+ */
4076
+ declare const AGENT_TIER_VALUES: readonly [0, 1, 2, 3, 4];
4077
+ type AgentTier = (typeof AGENT_TIER_VALUES)[number];
4078
+ /**
4079
+ * Human-readable role name for each funnel tier. Rendered into the
4080
+ * orchestrator-conventions rule and surfaced in generated `PICK` lines
4081
+ * so agents and humans can read the sort key at a glance.
4082
+ */
4083
+ declare const AGENT_TIER_ROLES: Readonly<Record<AgentTier, string>>;
4084
+ /**
4085
+ * A single resolved agent-type → tier mapping. Returned by
4086
+ * `resolveAgentTiers()`; the rendered table in the orchestrator rule
4087
+ * content and the lookup table embedded in `check-blocked.sh` are
4088
+ * derived from this list.
4089
+ */
4090
+ interface ResolvedAgentTier {
1772
4091
  /**
1773
- * Collects Claude permission entries from all active bundles.
4092
+ * GitHub `type:*` label value (e.g. `"feat"`, `"research"`,
4093
+ * `"company-profile"`). The leading `type:` prefix is **not** part
4094
+ * of the stored value — it is added when the resolver stringifies
4095
+ * the lookup table.
1774
4096
  */
1775
- private resolveBundlePermissions;
4097
+ readonly type: string;
4098
+ /** Funnel tier 0–4 (lower dispatches first on a priority tie). */
4099
+ readonly tier: AgentTier;
4100
+ /** Human-readable tier role (routing / research / profiles / synthesis / support). */
4101
+ readonly role: string;
1776
4102
  }
1777
-
1778
4103
  /**
1779
- * Agenda bundle enabled by default.
4104
+ * Canonical default mapping of GitHub `type:*` label values to funnel
4105
+ * tiers. Mirrors openhi's `DISPATCHER.md` Dispatch Table plus the
4106
+ * taxonomy documented in the Group D epic (#414, issue #473).
1780
4107
  *
1781
- * Consuming projects can disable it with
1782
- * `excludeBundles: ["agenda"]`. `appliesWhen` always returns `true`
1783
- * (peer-present assumption, same pattern as the other workflow
1784
- * bundles).
4108
+ * - **Tier 0 routing.** Unblocks other work. Picked first on a
4109
+ * priority tie. Covers the issue-worker's own type labels
4110
+ * (`feat`, `fix`, `chore`, `refactor`, `docs`, `release`,
4111
+ * `hotfix`) plus classification-style labels (`plan`, `review`,
4112
+ * `adr`).
4113
+ * - **Tier 1 — research.** Feeds downstream pipelines.
4114
+ * - **Tier 2 — profiles.** Consumes research.
4115
+ * - **Tier 3 — synthesis.** Produces deliverables.
4116
+ * - **Tier 4 — support.** Important but not pipeline-critical.
1785
4117
  *
1786
- * Provides a 2-phase pre-meeting agenda pipeline
1787
- * (draft → finalize), complementing the post-meeting pipeline in
1788
- * the `meeting-analysis` bundle. Ships a sub-agent, two user-
1789
- * invocable skills (`/draft-agenda`, `/finalize-agenda`), and
1790
- * `agenda:*` phase labels via the bundle `labels` mechanism so
1791
- * consuming projects automatically pick up the label taxonomy
1792
- * through the sync-labels workflow.
4118
+ * Consumers extend or override this list via
4119
+ * `AgentConfigOptions.tiers` (see `resolveAgentTiers`). Every
4120
+ * registered agent type must resolve to exactly one tier; unmapped
4121
+ * types fail synth-time validation.
4122
+ */
4123
+ declare const DEFAULT_AGENT_TIERS: ReadonlyArray<ResolvedAgentTier>;
4124
+ /**
4125
+ * Fallback tier applied to issues whose `type:*` label does not match
4126
+ * any entry in the resolved tier table. Using tier 0 (routing) means
4127
+ * an unclassified or newly-introduced issue is dispatched **before**
4128
+ * lower-tier work on a priority tie, which matches the openhi
4129
+ * dispatcher's "routing unblocks other work" rule. The synth-time
4130
+ * validator still rejects **registered** custom types that omit a
4131
+ * tier assignment — the fallback exists only for unknown labels
4132
+ * encountered at runtime.
4133
+ */
4134
+ declare const UNKNOWN_TYPE_FALLBACK_TIER: AgentTier;
4135
+ /**
4136
+ * Resolve a (possibly absent) consumer-supplied `AgentTierConfig` into
4137
+ * a deduplicated list of `ResolvedAgentTier` entries.
1793
4138
  *
1794
- * Reuses the meeting-type taxonomy from
1795
- * `AgentConfigOptions.meetings.meetingTypes` — the same table the
1796
- * `meeting-analysis` bundle consumes for post-meeting extraction.
4139
+ * Precedence:
4140
+ *
4141
+ * 1. `config.tiers` fully **replaces** the default list when supplied.
4142
+ * This is the escape hatch for repos that want a bespoke taxonomy.
4143
+ * 2. `config.customTypes` entries **extend** whatever list is in play
4144
+ * (default or replacement). Later entries override earlier ones on
4145
+ * `type` collision, so consumer overrides win over defaults.
4146
+ *
4147
+ * @throws `Error` when any entry references a tier outside 0–4, when a
4148
+ * `type` is empty/whitespace, or when `config.tiers` is an
4149
+ * empty array (use omission to mean "keep the defaults").
1797
4150
  */
1798
- declare const agendaBundle: AgentRuleBundle;
1799
-
4151
+ declare function resolveAgentTiers(config?: AgentTierConfig): ReadonlyArray<ResolvedAgentTier>;
1800
4152
  /**
1801
- * AWS CDK bundle auto-detected when `aws-cdk-lib` is in dependencies.
4153
+ * Synth-time validation hook. Throws a descriptive `Error` when the
4154
+ * resolved tier list is malformed. Called by `AgentConfig` before
4155
+ * rendering so a misconfigured `AgentTierConfig` fails the build
4156
+ * instead of silently shipping broken sort keys.
4157
+ *
4158
+ * Malformed cases rejected here:
4159
+ *
4160
+ * - Duplicate `type` values **within** the same supplied list (the
4161
+ * resolver dedupes between the default list and `customTypes`, so
4162
+ * those collisions are fine; duplicates inside one list are not).
4163
+ * - Tier values outside 0–4.
4164
+ * - Empty or whitespace-only `type` strings.
4165
+ *
4166
+ * Returns the validated list unchanged so callers can write
4167
+ * `const tiers = validateAgentTierConfig(config)` in one line.
1802
4168
  */
1803
- declare const awsCdkBundle: AgentRuleBundle;
1804
-
4169
+ declare function validateAgentTierConfig(config?: AgentTierConfig): ReadonlyArray<ResolvedAgentTier>;
1805
4170
  /**
1806
- * Base bundle always included unless `includeBaseRules: false`.
1807
- * Contains project-overview, interaction-style, and general-conventions rules.
4171
+ * Render the funnel-tier subsection appended to the
4172
+ * `orchestrator-conventions` rule. Always returns a non-empty string
4173
+ * because the default tier list is non-empty — the orchestrator
4174
+ * always documents its sort order.
1808
4175
  */
1809
- declare const baseBundle: AgentRuleBundle;
4176
+ declare function renderAgentTierSection(tiers: ReadonlyArray<ResolvedAgentTier>): string;
4177
+ /**
4178
+ * Render a shell-script snippet that the `check-blocked.sh` procedure
4179
+ * uses to look up a tier for a given `type:*` label. Emitted as a
4180
+ * `case` statement so the generated script stays POSIX-shell
4181
+ * compatible (no associative arrays).
4182
+ *
4183
+ * The function returns the body of a shell function, not the
4184
+ * surrounding function wrapper, so bundle code can splice it inline
4185
+ * at the exact indent level it wants.
4186
+ */
4187
+ declare function renderAgentTierCaseStatement(tiers: ReadonlyArray<ResolvedAgentTier>): string;
1810
4188
 
1811
4189
  /**
1812
- * BCM writer bundle enabled by default for projects that adopt this
1813
- * batch.
4190
+ * Default for whether the unblock-dependents sweep runs at all. When
4191
+ * the consumer omits `UnblockDependentsConfig`, the bundle ships with
4192
+ * the sweep **enabled** so every `status:done` transition
4193
+ * automatically propagates into the dependency graph.
1814
4194
  *
1815
- * Consuming projects can disable it with `excludeBundles: ["bcm-writer"]`.
1816
- * `appliesWhen` always returns `true` per this batch's directive that
1817
- * bundles assume peers are present.
4195
+ * @see UnblockDependentsConfig
4196
+ */
4197
+ declare const DEFAULT_UNBLOCK_DEPENDENTS_ENABLED = true;
4198
+ /**
4199
+ * Default comment body posted on a newly-unblocked issue. Variables
4200
+ * are substituted at runtime by the `unblock-dependents.sh` script:
1818
4201
  *
1819
- * Ships a single consolidated sub-agent (`bcm-writer`) with all 4 phase",
1820
- * handlers in one prompt (outline, scaffold, context, connect), a
1821
- * user-invocable skill (`/write-bcm`), and `type:bcm-document` plus
1822
- * `bcm:*` phase labels.
4202
+ * - `<CLOSED_ISSUE>` the `#<n>` reference to the issue whose
4203
+ * closure triggered the sweep (e.g. `#123`).
1823
4204
  *
1824
- * The bundle assumes the `people-profile`, `company-profile`, and
1825
- * `research-pipeline` bundles are also enabled so Phase 4 can hand off
1826
- * surfaced items via `people:research`, `company:research`, and
1827
- * `research:scope` issues.
4205
+ * The placeholder syntax deliberately avoids `{{curly-brace}}` form —
4206
+ * `AgentConfig`'s template resolver claims that namespace at rule
4207
+ * generation time, so a `{{closedIssue}}` placeholder would be
4208
+ * rewritten before the agent ever saw it.
1828
4209
  */
1829
- declare const bcmWriterBundle: AgentRuleBundle;
1830
-
4210
+ declare const DEFAULT_UNBLOCK_COMMENT_TEMPLATE = "Dependencies resolved by <CLOSED_ISSUE> \u2014 unblocking.";
1831
4211
  /**
1832
- * Business-models bundle enabled by default.
4212
+ * Default comment body posted on a dependent whose other dependencies
4213
+ * are still open (partial unblock). Variables substituted at runtime:
1833
4214
  *
1834
- * Consuming projects can disable it with
1835
- * `excludeBundles: ["business-models"]`. `appliesWhen` always returns
1836
- * `true` per the workflow-bundle peer-present assumption.
4215
+ * - `<CLOSED_ISSUE>` the just-closed issue (`#<n>`).
4216
+ * - `<OPEN_DEPS>` — space-separated list of remaining open
4217
+ * dependencies (e.g. `#45 #47`).
1837
4218
  *
1838
- * Ships a sub-agent (`business-models-analyst`), three user-invocable
1839
- * skills (`/scan-business-models`, `/canvas-business-model`,
1840
- * `/complete-business-model`), a canvas template (emitted alongside
1841
- * the canvas skill), and `type:business-model` plus
1842
- * `business-models:*` phase labels.
4219
+ * Applied when `flagPartialUnblockWithAttention` is `true`; otherwise
4220
+ * no comment is posted and the dependent is left untouched.
4221
+ */
4222
+ declare const DEFAULT_PARTIAL_UNBLOCK_COMMENT_TEMPLATE = "Dependency <CLOSED_ISSUE> resolved, but still waiting on: <OPEN_DEPS>.";
4223
+ /**
4224
+ * Fully-resolved unblock-dependents settings. Every field is defaulted
4225
+ * so downstream renderers can reason about a single canonical shape.
4226
+ */
4227
+ interface ResolvedUnblockDependents {
4228
+ readonly enabled: boolean;
4229
+ readonly commentTemplate: string;
4230
+ readonly flagPartialUnblockWithAttention: boolean;
4231
+ readonly partialUnblockCommentTemplate: string;
4232
+ }
4233
+ /**
4234
+ * Resolve a (possibly absent) `UnblockDependentsConfig` into a canonical
4235
+ * `ResolvedUnblockDependents` with every field filled in. Unset fields
4236
+ * cascade from their documented defaults.
1843
4237
  *
1844
- * The bundle sits between `industry-discovery` (upstream, selects
1845
- * verticals) and `bcm-writer` (downstream, models capabilities). It
1846
- * assumes `bcm-writer` is enabled so Phase 3 can hand off surfaced
1847
- * capabilities via `bcm:outline` issues, and it is read by
1848
- * `company-profile` via the shared `<BUSINESS_MODELS_ROOT>` default
1849
- * path (`docs/src/content/docs/industry-research/`).
4238
+ * Malformed configs (empty / whitespace-only `commentTemplate`) throw
4239
+ * a descriptive `Error` callers should not need to guard against it
4240
+ * at runtime.
1850
4241
  */
1851
- declare const businessModelsBundle: AgentRuleBundle;
4242
+ declare function resolveUnblockDependents(config?: UnblockDependentsConfig): ResolvedUnblockDependents;
4243
+ /**
4244
+ * Synth-time validation hook. Throws a descriptive `Error` when the
4245
+ * supplied `UnblockDependentsConfig` is malformed. Called by
4246
+ * `AgentConfig.preSynthesize` before any rendering so a misconfigured
4247
+ * sweep fails the build instead of silently shipping a broken
4248
+ * procedure script. Returns the resolved config unchanged so callers
4249
+ * can write `const ud = validateUnblockDependentsConfig(config)` in
4250
+ * one line.
4251
+ *
4252
+ * Malformed cases rejected here:
4253
+ *
4254
+ * - `commentTemplate` empty or whitespace-only.
4255
+ * - `partialUnblockCommentTemplate` empty or whitespace-only.
4256
+ */
4257
+ declare function validateUnblockDependentsConfig(config?: UnblockDependentsConfig): ResolvedUnblockDependents;
4258
+ /**
4259
+ * Render the markdown subsection appended to the
4260
+ * `orchestrator-conventions` rule. Always returns a non-empty string
4261
+ * so the orchestrator rule documents the contract even when the
4262
+ * consumer relies on the defaults.
4263
+ */
4264
+ declare function renderUnblockDependentsSection(ud: ResolvedUnblockDependents): string;
4265
+ /**
4266
+ * Render the full `unblock-dependents.sh` script body for a given
4267
+ * resolved unblock-dependents config. The script takes a single
4268
+ * positional argument (the just-closed issue number) and emits one
4269
+ * line per processed dependent in the canonical
4270
+ * `UNBLOCKED` / `STILL_BLOCKED` / `NO_DEPENDENTS` format.
4271
+ *
4272
+ * Exported so `AgentConfig.preSynthesize` can emit the procedure
4273
+ * alongside `check-blocked.sh`.
4274
+ */
4275
+ declare function renderUnblockDependentsScript(ud: ResolvedUnblockDependents): string;
4276
+
4277
+ /**
4278
+ * Build the check-blocked.sh procedure definition for a given resolved
4279
+ * tier table, scope gate, run-ratio, and pre-flight config.
4280
+ * `AgentConfig.preSynthesize` calls this with the consumer's resolved
4281
+ * configs so the emitted script's `tier_of()` lookup, `scope_of()`
4282
+ * thresholds, `run_counter_tick()` cycle length, and `cmd_preflight()`
4283
+ * eligibility filter match whatever the rendered
4284
+ * orchestrator-conventions rule documents.
4285
+ *
4286
+ * Scope-gate settings default to the bundle's built-in defaults
4287
+ * (small: ≤3 AC + ≤2 sources; medium: ≤6 AC + ≤5 sources;
4288
+ * auto-file off) when the caller omits them. Run-ratio settings
4289
+ * default to the openhi 4:1 cadence with the counter persisted at
4290
+ * `.claude/state/orchestrator-runs.json`. Pre-flight settings default
4291
+ * to vortex's step 0b contract (enabled, delegated to the
4292
+ * `pr-reviewer` sub-agent, squash merges, linked-issue keyword
4293
+ * required).
4294
+ */
4295
+ declare function buildCheckBlockedProcedure(tiers: ReadonlyArray<ResolvedAgentTier>, scopeGate?: ResolvedScopeGate, runRatio?: ResolvedRunRatio, preflight?: ResolvedPreflightPr): AgentProcedure;
4296
+ /*******************************************************************************
4297
+ *
4298
+ * unblock-dependents.sh — Targeted post-close dependency sweep.
4299
+ *
4300
+ * Called by every agent that applies `status:done` to an issue. The
4301
+ * script searches open issues for `Depends on: #<just-closed>` and
4302
+ * flips fully-resolved dependents from `status:blocked` to
4303
+ * `status:ready`.
4304
+ *
4305
+ * `buildUnblockDependentsProcedure()` is the factory that parameterises
4306
+ * the rendered script with a resolved `ResolvedUnblockDependents`;
4307
+ * `unblockDependentsProcedure` (declared below) is the default
4308
+ * instance that ships when the consumer supplies no override.
4309
+ *
4310
+ ******************************************************************************/
4311
+ declare function buildUnblockDependentsProcedure(unblockDependents?: ResolvedUnblockDependents): AgentProcedure;
4312
+ /**
4313
+ * Build the orchestrator-conventions rule content for a given resolved
4314
+ * tier table, scope gate, run-ratio, pre-flight, scheduled-tasks, and
4315
+ * unblock-dependents config. The preamble is constant; each section
4316
+ * below it is rendered from the supplied values so consumer overrides
4317
+ * propagate into the generated rule.
4318
+ *
4319
+ * Every optional parameter defaults to the bundle's built-in default
4320
+ * when the caller omits it.
4321
+ */
4322
+ declare function buildOrchestratorConventionsContent(tiers: ReadonlyArray<ResolvedAgentTier>, scopeGate?: ResolvedScopeGate, runRatio?: ResolvedRunRatio, preflight?: ResolvedPreflightPr, scheduledTasks?: ResolvedScheduledTasks, unblockDependents?: ResolvedUnblockDependents): string;
4323
+ /**
4324
+ * Resolve the orchestrator-conventions rule content and the
4325
+ * check-blocked.sh procedure content for a given (possibly absent)
4326
+ * consumer-supplied tier config, scope-gate config, run-ratio config,
4327
+ * pre-flight config, and scheduled-tasks config. Called by
4328
+ * `AgentConfig.preSynthesize`.
4329
+ *
4330
+ * Returns the resolved tier table, scope gate, run ratio, pre-flight,
4331
+ * and scheduled-tasks config alongside both rendered artifacts so
4332
+ * callers can splice them into their rule map and procedure map in a
4333
+ * single pass.
4334
+ */
4335
+ declare function resolveOrchestratorAssets(tierConfig?: AgentTierConfig, scopeGateConfig?: ScopeGateConfig, runRatioConfig?: RunRatioConfig, preflightPrConfig?: PreflightPrConfig, scheduledTasksConfig?: ScheduledTasksConfig, unblockDependentsConfig?: UnblockDependentsConfig): {
4336
+ readonly tiers: ReadonlyArray<ResolvedAgentTier>;
4337
+ readonly scopeGate: ResolvedScopeGate;
4338
+ readonly runRatio: ResolvedRunRatio;
4339
+ readonly preflight: ResolvedPreflightPr;
4340
+ readonly scheduledTasks: ResolvedScheduledTasks;
4341
+ readonly unblockDependents: ResolvedUnblockDependents;
4342
+ readonly conventionsContent: string;
4343
+ readonly procedure: AgentProcedure;
4344
+ readonly unblockDependentsProcedure: AgentProcedure;
4345
+ };
4346
+ /*******************************************************************************
4347
+ *
4348
+ * Bundle definition
4349
+ *
4350
+ ******************************************************************************/
4351
+ declare const orchestratorBundle: AgentRuleBundle;
1852
4352
 
1853
4353
  /**
1854
- * Company-profile bundle — enabled by default.
4354
+ * People-profile bundle — enabled by default.
1855
4355
  *
1856
4356
  * Consuming projects can disable it with
1857
- * `excludeBundles: ["company-profile"]`. `appliesWhen` always returns
4357
+ * `excludeBundles: ["people-profile"]`. `appliesWhen` always returns
1858
4358
  * `true` per the operating-system directive that bundles assume peers
1859
4359
  * are present — in Phase 3 this bundle hands work off to
1860
- * `people-profile` (via `people:research`) and `software-profile` (via
1861
- * `software:research`).
4360
+ * `company-profile` (via `company:research`) and `software-profile`
4361
+ * (via `software:research`).
1862
4362
  *
1863
- * Ships a sub-agent (`company-profile-analyst`), four user-invocable
1864
- * skills (`/profile-company`, `/match-company`, `/refresh-company`,
1865
- * `/analyze-segment`), and `type:company-profile` plus `company:*`
1866
- * phase labels for the six phases.
4363
+ * Ships a sub-agent (`people-profile-analyst`), two user-invocable
4364
+ * skills (`/profile-person`, `/refresh-person`), and `type:people-profile`
4365
+ * plus `people:*` phase labels for the four phases.
1867
4366
  */
1868
- declare const companyProfileBundle: AgentRuleBundle;
4367
+ declare function buildPeopleProfileBundle(paths?: ResolvedAgentPaths): AgentRuleBundle;
4368
+ /**
4369
+ * Default-paths instance of the people-profile bundle, preserved for
4370
+ * backward compatibility with consumers that import the const
4371
+ * directly. The factory above is the canonical entry point when a
4372
+ * consumer supplies `AgentConfigOptions.paths`.
4373
+ */
4374
+ declare const peopleProfileBundle: AgentRuleBundle;
1869
4375
 
1870
4376
  /**
1871
- * GitHub workflow bundle — auto-detected when the project has a GitHub component.
4377
+ * PNPM bundle — auto-detected when the PnpmWorkspace component is present.
1872
4378
  */
1873
- declare const githubWorkflowBundle: AgentRuleBundle;
4379
+ declare const pnpmBundle: AgentRuleBundle;
1874
4380
 
1875
4381
  /**
1876
- * Industry-discovery bundle enabled by default.
4382
+ * Default master switch for the issue-templates convention. When no
4383
+ * config is supplied the convention ships **enabled** so every
4384
+ * configulator-consuming repo carries the canonical `gh issue create`
4385
+ * template reference in its rendered `CLAUDE.md`.
1877
4386
  *
1878
- * Consuming projects can disable it with
1879
- * `excludeBundles: ["industry-discovery"]`. `appliesWhen` always returns
1880
- * `true` per this batch's directive that bundles assume peers are
1881
- * present.
4387
+ * @see IssueTemplatesConfig
4388
+ */
4389
+ declare const DEFAULT_ISSUE_TEMPLATES_ENABLED = true;
4390
+ /**
4391
+ * Default repo-relative path for the consolidated issue-templates
4392
+ * documentation page. Matches the singleton `/docs` site layout every
4393
+ * configulator-managed repo ships: a single Starlight docs site at
4394
+ * `/docs` with agent reference pages under
4395
+ * `docs/src/content/docs/agents/`.
1882
4396
  *
1883
- * Ships a sub-agent (`industry-discovery-analyst`), a user-invocable
1884
- * skill (`/discover-industries`), and `type:industry-discovery` plus
1885
- * `industry:*` phase labels.
4397
+ * The file is never generated by configulator unless `emitStarterDoc`
4398
+ * is set — the canonical list of templates is repo-specific and grows
4399
+ * whenever a new phase label is minted, so consumers author and evolve
4400
+ * the page themselves. The starter doc is opt-in.
1886
4401
  *
1887
- * The bundle assumes the `research-pipeline` bundle is also enabled so
1888
- * Phase 3 can hand off cleared verticals via `research:scope` issues.
4402
+ * @see IssueTemplatesConfig
1889
4403
  */
1890
- declare const industryDiscoveryBundle: AgentRuleBundle;
1891
-
4404
+ declare const DEFAULT_ISSUE_TEMPLATES_PATH = "docs/src/content/docs/agents/issue-templates.md";
1892
4405
  /**
1893
- * Jest bundle auto-detected when Jest is in dependencies.
4406
+ * Default list of glob patterns that identify "bundle files" — the
4407
+ * source files that compose agent prompts and skill instructions.
4408
+ * These are the locations the optional lint walks when checking that
4409
+ * `gh issue create` snippets are **referenced** rather than inlined.
4410
+ *
4411
+ * The defaults cover the two canonical locations bundle-like content
4412
+ * lives in a configulator-consuming repo:
4413
+ *
4414
+ * - `packages/@codedrifters/configulator/src/agent/bundles/**.ts` —
4415
+ * the bundle authoring sites inside configulator itself.
4416
+ * - `.claude/agents/**.md` / `.claude/skills/**` — agent and skill
4417
+ * prompts in consuming repos that don't re-export configulator
4418
+ * bundles.
4419
+ *
4420
+ * Consumers can replace the list outright via `bundlePathPatterns`
4421
+ * when their agent sources live elsewhere.
4422
+ *
4423
+ * @see IssueTemplatesConfig
1894
4424
  */
1895
- declare const jestBundle: AgentRuleBundle;
1896
-
4425
+ declare const DEFAULT_ISSUE_TEMPLATES_BUNDLE_PATH_PATTERNS: ReadonlyArray<string>;
1897
4426
  /**
1898
- * Maintenance-audit bundle enabled by default.
4427
+ * Default for whether the convention emits the
4428
+ * `.claude/procedures/check-issue-templates.sh` lint to disk. The
4429
+ * script greps the provided files (stdin or positional args) for
4430
+ * inline `gh issue create` invocations and fails non-zero when any
4431
+ * are found outside a fenced example block that cites the canonical
4432
+ * templates doc.
1899
4433
  *
1900
- * Consuming projects can disable it with
1901
- * `excludeBundles: ["maintenance-audit"]`. `appliesWhen` always returns
1902
- * `true` per this batch's directive that bundles assume peers are
1903
- * present.
4434
+ * Disabled by default because many consumers prefer to enforce the
4435
+ * rule via review discipline and the rendered guidance alone; the
4436
+ * script is opt-in for repos that want a hard CI gate or pre-commit
4437
+ * hook.
1904
4438
  *
1905
- * Provides a 3-phase documentation-maintenance pipeline
1906
- * (scan → fix → verify) designed for any project with structured doc
1907
- * registries and cross-references. Ships a sub-agent, two user-
1908
- * invocable skills (`/audit-docs`, `/verify-audit`), and `maint:*`
1909
- * phase labels via the bundle `labels` mechanism so consuming projects
1910
- * automatically pick up the label taxonomy through the sync-labels
1911
- * workflow.
4439
+ * @see IssueTemplatesConfig
1912
4440
  */
1913
- declare const maintenanceAuditBundle: AgentRuleBundle;
1914
-
4441
+ declare const DEFAULT_ISSUE_TEMPLATES_EMIT_CHECKER = false;
1915
4442
  /**
1916
- * Meeting analysis bundle included by default.
1917
- * Provides a 4-phase meeting transcript processing workflow.
4443
+ * Default for whether the convention emits a minimal starter
4444
+ * issue-templates page to disk at `<templatesPath>`. The starter
4445
+ * carries the expected structure (one `## Template: <phase-label>`
4446
+ * heading per known phase plus a placeholder body) so consumers
4447
+ * adopting the convention on a green-field repo have a working
4448
+ * template to extend.
4449
+ *
4450
+ * Disabled by default because the page is hand-authored and most
4451
+ * repos adopt the convention after they already maintain their own
4452
+ * ad-hoc notes — an emitted stub would conflict with existing
4453
+ * content.
4454
+ *
4455
+ * @see IssueTemplatesConfig
1918
4456
  */
1919
- declare const meetingAnalysisBundle: AgentRuleBundle;
1920
-
1921
- /*******************************************************************************
4457
+ declare const DEFAULT_ISSUE_TEMPLATES_EMIT_STARTER = false;
4458
+ /**
4459
+ * Default for whether the rendered rule body asserts that every
4460
+ * `gh issue create` recipe in a bundle or agent prompt **MUST** cite
4461
+ * the canonical templates doc rather than inline a full template.
1922
4462
  *
1923
- * Bundle definition
4463
+ * Defaults to `true` — the whole point of consolidation is that
4464
+ * templates live in one place, so the MUST phrasing is the correct
4465
+ * default. Consumers that treat consolidation as aspirational can
4466
+ * soften the phrasing by setting this to `false`.
1924
4467
  *
1925
- ******************************************************************************/
1926
- declare const orchestratorBundle: AgentRuleBundle;
4468
+ * @see IssueTemplatesConfig
4469
+ */
4470
+ declare const DEFAULT_ISSUE_TEMPLATES_REQUIRE_REFERENCE = true;
4471
+ /**
4472
+ * Fully-resolved issue-templates settings. Every field is defaulted
4473
+ * so downstream renderers can reason about a single canonical shape.
4474
+ */
4475
+ interface ResolvedIssueTemplates {
4476
+ readonly enabled: boolean;
4477
+ readonly templatesPath: string;
4478
+ readonly bundlePathPatterns: ReadonlyArray<string>;
4479
+ readonly emitChecker: boolean;
4480
+ readonly emitStarterDoc: boolean;
4481
+ readonly requireReference: boolean;
4482
+ }
4483
+ /**
4484
+ * Resolve a (possibly absent) `IssueTemplatesConfig` into a canonical
4485
+ * `ResolvedIssueTemplates` with every field filled in. Unset fields
4486
+ * cascade from their documented defaults.
4487
+ *
4488
+ * Malformed configs — empty / whitespace-only or absolute
4489
+ * `templatesPath`, empty `bundlePathPatterns`, empty /
4490
+ * whitespace-only path entry — throw a descriptive `Error`.
4491
+ */
4492
+ declare function resolveIssueTemplates(config?: IssueTemplatesConfig): ResolvedIssueTemplates;
4493
+ /**
4494
+ * Synth-time validation hook. Throws a descriptive `Error` when the
4495
+ * supplied `IssueTemplatesConfig` is malformed. Called by
4496
+ * `AgentConfig.preSynthesize` before any rendering so a misconfigured
4497
+ * convention fails the build instead of silently shipping broken
4498
+ * guidance. Returns the resolved config unchanged so callers can
4499
+ * write `const it = validateIssueTemplatesConfig(config)` in one line.
4500
+ *
4501
+ * Malformed cases rejected here:
4502
+ *
4503
+ * - `templatesPath` empty, whitespace-only, or absolute.
4504
+ * - `bundlePathPatterns` not an array, empty, or contains an empty /
4505
+ * whitespace-only entry.
4506
+ */
4507
+ declare function validateIssueTemplatesConfig(config?: IssueTemplatesConfig): ResolvedIssueTemplates;
4508
+ /**
4509
+ * Render the full body for the `issue-templates-convention` rule
4510
+ * shipped by the `base` bundle. The rule documents:
4511
+ *
4512
+ * - Why the convention exists (drift between duplicated
4513
+ * `gh issue create` snippets across bundles).
4514
+ * - The on-disk contract — a single hand-authored page at
4515
+ * `<templatesPath>` with one `## Template: <phase-label>` section
4516
+ * per downstream issue kind.
4517
+ * - The **reference-don't-inline** rule, phrased as a hard
4518
+ * requirement or a strong recommendation per `requireReference`.
4519
+ * - The set of paths the rule applies to.
4520
+ * - The optional lint script (cross-referenced only when emitted).
4521
+ *
4522
+ * When the convention is disabled, the rule renders a short stub.
4523
+ */
4524
+ declare function renderIssueTemplatesRuleContent(it: ResolvedIssueTemplates): string;
4525
+ /**
4526
+ * Render the short issue-templates hook section injected into a
4527
+ * phased-agent bundle's workflow rule. The section cites the full
4528
+ * contract documented in the base bundle's
4529
+ * `issue-templates-convention` rule so individual bundles stay DRY.
4530
+ *
4531
+ * When the convention is disabled, the function returns an empty
4532
+ * string so callers can no-op their append path.
4533
+ */
4534
+ declare function renderIssueTemplatesBundleHook(it: ResolvedIssueTemplates, bundleLabel: string): string;
4535
+ /**
4536
+ * Render a minimal starter issue-templates page — a top-level
4537
+ * heading, the "How to use" preamble, and a single example template
4538
+ * section. Exported so `AgentConfig` can emit it to disk when the
4539
+ * consumer opts in via `emitStarterDoc: true`.
4540
+ *
4541
+ * The starter is deliberately sparse: it documents the expected
4542
+ * structure without committing the consumer to a particular phase
4543
+ * label list. Repos that already maintain a hand-authored templates
4544
+ * page should leave `emitStarterDoc` off — the emission would
4545
+ * overwrite their content.
4546
+ */
4547
+ declare function renderIssueTemplatesStarterPage(_it: ResolvedIssueTemplates): string;
4548
+ /**
4549
+ * Render the `.claude/procedures/check-issue-templates.sh` helper
4550
+ * script. Exported so `AgentConfig` can register it as an
4551
+ * `AgentProcedure` when the consumer opts in via `emitChecker: true`.
4552
+ *
4553
+ * The script accepts the list of changed files as either:
4554
+ *
4555
+ * 1. Positional arguments (one file per arg).
4556
+ * 2. Newline-separated entries on stdin (when no args supplied) —
4557
+ * pipe `git diff --name-only` directly into it.
4558
+ *
4559
+ * It fails non-zero when any changed file matches a bundle-path
4560
+ * pattern and contains a multi-line `gh issue create ... --title`
4561
+ * invocation that isn't in the configured allow list (the templates
4562
+ * page itself and the `create-issue-workflow` rule source).
4563
+ */
4564
+ declare function renderIssueTemplatesCheckerScript(it: ResolvedIssueTemplates): string;
1927
4565
 
1928
4566
  /**
1929
- * Fully-resolved agent output-path roots. Every property is required.
4567
+ * Default master switch for the progress-file convention. When no
4568
+ * config is supplied, the convention ships **enabled** so every phased
4569
+ * agent writes a progress file on claim and reads it on resume.
1930
4570
  *
1931
- * This is the shape that bundle code consumes at module-eval time via
1932
- * `DEFAULT_AGENT_PATHS`, and the shape that `resolveAgentPaths()`
1933
- * returns when consumers supply a partial `AgentPathsConfig` override.
4571
+ * @see ProgressFilesConfig
1934
4572
  */
1935
- interface ResolvedAgentPaths {
1936
- readonly docsRoot: string;
1937
- readonly researchRoot: string;
1938
- readonly profilesRoot: string;
1939
- readonly meetingsRoot: string;
1940
- readonly requirementsRoot: string;
1941
- readonly researchRequirementsRoot: string;
1942
- readonly bcmRoot: string;
1943
- readonly peopleRoot: string;
1944
- readonly companiesRoot: string;
1945
- readonly softwareRoot: string;
1946
- readonly industriesRoot: string;
4573
+ declare const DEFAULT_PROGRESS_FILES_ENABLED = true;
4574
+ /**
4575
+ * Default on-disk root for progress files, relative to the repo root.
4576
+ * Every progress file resolves to
4577
+ * `<stateDir>/<filename>` where `<filename>` is produced from
4578
+ * `filenamePattern` at runtime.
4579
+ *
4580
+ * @see ProgressFilesConfig
4581
+ */
4582
+ declare const DEFAULT_PROGRESS_FILES_STATE_DIR = ".claude/state";
4583
+ /**
4584
+ * Default filename pattern for a progress file. The `<ISSUE_NUMBER>`
4585
+ * placeholder is substituted at runtime with the numeric id of the
4586
+ * issue the agent is working on (e.g. `479-progress.json`).
4587
+ *
4588
+ * The placeholder uses the angle-bracketed uppercase-snake form — not
4589
+ * `{{curly-brace}}` form — because `AgentConfig`'s template resolver
4590
+ * claims the curly-brace namespace at rule generation time.
4591
+ *
4592
+ * @see ProgressFilesConfig
4593
+ */
4594
+ declare const DEFAULT_PROGRESS_FILES_FILENAME_PATTERN = "<ISSUE_NUMBER>-progress.json";
4595
+ /**
4596
+ * Default serialization format for a progress file body. JSON is the
4597
+ * default because it is trivially machine-parseable (e.g. for scripted
4598
+ * resume logic) while still remaining human-readable when opened.
4599
+ * Consumers that prefer the openhi-style markdown body can override.
4600
+ *
4601
+ * @see ProgressFilesConfig
4602
+ */
4603
+ declare const DEFAULT_PROGRESS_FILES_FORMAT: "json" | "markdown";
4604
+ /**
4605
+ * Default stale-threshold (hours) for branches carrying a progress
4606
+ * file. When the orchestrator's stale-branch decision tree finds a
4607
+ * progress file older than this many hours **and** no matching open
4608
+ * PR, it treats the branch as abandoned and resets the issue to
4609
+ * `status:ready`. Mirrors the 72-hour in-progress threshold used by
4610
+ * the orchestrator bundle's triage walk.
4611
+ *
4612
+ * @see ProgressFilesConfig
4613
+ */
4614
+ declare const DEFAULT_PROGRESS_FILES_STALE_AFTER_HOURS = 72;
4615
+ /**
4616
+ * Allowed values for `ProgressFilesConfig.format`. Exported so
4617
+ * consumers can reference the canonical set without hard-coding
4618
+ * literals.
4619
+ */
4620
+ declare const PROGRESS_FILES_FORMAT_VALUES: readonly ["json", "markdown"];
4621
+ /**
4622
+ * Fully-resolved progress-file settings. Every field is defaulted so
4623
+ * downstream renderers can reason about a single canonical shape.
4624
+ */
4625
+ interface ResolvedProgressFiles {
4626
+ readonly enabled: boolean;
4627
+ readonly stateDir: string;
4628
+ readonly filenamePattern: string;
4629
+ readonly format: "json" | "markdown";
4630
+ readonly cleanupOnComplete: boolean;
4631
+ readonly staleAfterHours: number;
1947
4632
  }
1948
4633
  /**
1949
- * Canonical default values for every agent path. These mirror the
1950
- * hardcoded paths that bundles used before `AgentPathsConfig` existed,
1951
- * so `DEFAULT_AGENT_PATHS.*` can be substituted into bundle rule
1952
- * content at module-eval time without changing the generated
1953
- * `.claude/rules/*.md` snapshot.
4634
+ * Resolve a (possibly absent) `ProgressFilesConfig` into a canonical
4635
+ * `ResolvedProgressFiles` with every field filled in. Unset fields
4636
+ * cascade from their documented defaults.
1954
4637
  *
1955
- * Consumers override the defaults by passing an `AgentPathsConfig`
1956
- * through `AgentConfigOptions.paths` and resolving it with
1957
- * `resolveAgentPaths()`. Per-project propagation into bundle rule
1958
- * content is a follow-up this export is the first step: interface +
1959
- * resolver land in this PR; the `AgentConfig.resolveRules` wiring lands
1960
- * next.
4638
+ * Malformed configs empty / whitespace-only `stateDir`, absolute
4639
+ * `stateDir`, empty / whitespace-only `filenamePattern`, `filenamePattern`
4640
+ * missing the `<ISSUE_NUMBER>` placeholder, unknown `format` value,
4641
+ * non-positive `staleAfterHours`throw a descriptive `Error`.
1961
4642
  */
1962
- declare const DEFAULT_AGENT_PATHS: ResolvedAgentPaths;
4643
+ declare function resolveProgressFiles(config?: ProgressFilesConfig): ResolvedProgressFiles;
1963
4644
  /**
1964
- * Resolve a partial `AgentPathsConfig` into a fully-populated
1965
- * `ResolvedAgentPaths`. Unset fields cascade from their parent root:
4645
+ * Synth-time validation hook. Throws a descriptive `Error` when the
4646
+ * supplied `ProgressFilesConfig` is malformed. Called by
4647
+ * `AgentConfig.preSynthesize` before any rendering so a misconfigured
4648
+ * convention fails the build instead of silently shipping broken
4649
+ * resume semantics. Returns the resolved config unchanged so callers
4650
+ * can write `const pf = validateProgressFilesConfig(config)` in
4651
+ * one line.
4652
+ *
4653
+ * Malformed cases rejected here:
4654
+ *
4655
+ * - `stateDir` empty, whitespace-only, or absolute.
4656
+ * - `filenamePattern` empty, whitespace-only, or missing the
4657
+ * `<ISSUE_NUMBER>` placeholder.
4658
+ * - `format` not one of `"json"` / `"markdown"`.
4659
+ * - `staleAfterHours` non-integer, zero, or negative.
4660
+ */
4661
+ declare function validateProgressFilesConfig(config?: ProgressFilesConfig): ResolvedProgressFiles;
4662
+ /**
4663
+ * Resolve the runtime filename for a progress file given an issue
4664
+ * number and a resolved config. `<ISSUE_NUMBER>` placeholders in the
4665
+ * pattern are substituted; the returned value is **just** the filename
4666
+ * (no directory prefix).
1966
4667
  *
1967
- * - `profilesRoot`, `meetingsRoot`, `requirementsRoot`, and `bcmRoot`
1968
- * derive from `docsRoot` when not explicitly set.
1969
- * - `researchRequirementsRoot` derives from `researchRoot` when not
1970
- * explicitly set.
1971
- * - `peopleRoot`, `companiesRoot`, `softwareRoot`, and `industriesRoot`
1972
- * derive from the resolved `profilesRoot` when not explicitly set,
1973
- * so that overriding `docsRoot` alone (or overriding `profilesRoot`
1974
- * alone) propagates correctly through every dependent root.
4668
+ * Exported so consumer-side scripts (or the `partial-resume-protocol`
4669
+ * rule renderer) can compute the on-disk path deterministically.
1975
4670
  */
1976
- declare function resolveAgentPaths(paths?: AgentPathsConfig): ResolvedAgentPaths;
1977
-
4671
+ declare function renderProgressFileName(pf: ResolvedProgressFiles, issueNumber: number | string): string;
1978
4672
  /**
1979
- * People-profile bundle enabled by default.
4673
+ * Resolve the runtime path (directory + filename) for a progress file
4674
+ * given an issue number and a resolved config.
4675
+ */
4676
+ declare function renderProgressFilePath(pf: ResolvedProgressFiles, issueNumber: number | string): string;
4677
+ /**
4678
+ * Render the full body for the `progress-file-convention` rule shipped
4679
+ * by the `base` bundle. The rule documents:
1980
4680
  *
1981
- * Consuming projects can disable it with
1982
- * `excludeBundles: ["people-profile"]`. `appliesWhen` always returns
1983
- * `true` per the operating-system directive that bundles assume peers
1984
- * are present in Phase 3 this bundle hands work off to
1985
- * `company-profile` (via `company:research`) and `software-profile`
1986
- * (via `software:research`).
4681
+ * - The progress-file schema and on-disk path contract.
4682
+ * - The partial-resume protocol (read-before-write + acceptance
4683
+ * criteria replay).
4684
+ * - The stale-branch decision tree (clone-level recovery) that every
4685
+ * worker runs at session start.
4686
+ * - The `[BLOCKED]` structured comment format used when an agent
4687
+ * cannot proceed.
1987
4688
  *
1988
- * Ships a sub-agent (`people-profile-analyst`), two user-invocable
1989
- * skills (`/profile-person`, `/refresh-person`), and `type:people-profile`
1990
- * plus `people:*` phase labels for the four phases.
4689
+ * When the convention is disabled, the rule renders a short stub that
4690
+ * tells agents the project does not enforce progress files and they
4691
+ * must pick up work from scratch on every session.
1991
4692
  */
1992
- declare const peopleProfileBundle: AgentRuleBundle;
1993
-
4693
+ declare function renderProgressFilesRuleContent(pf: ResolvedProgressFiles): string;
1994
4694
  /**
1995
- * PNPM bundle auto-detected when the PnpmWorkspace component is present.
4695
+ * Render the short progress-file hook section injected into a
4696
+ * phased-agent bundle's workflow rule (bcm-writer, research-pipeline,
4697
+ * etc.). The section cites the full contract documented in the base
4698
+ * bundle's `progress-file-convention` rule so individual bundles stay
4699
+ * DRY.
4700
+ *
4701
+ * When the convention is disabled, the function returns an empty
4702
+ * string so callers can no-op their append path.
1996
4703
  */
1997
- declare const pnpmBundle: AgentRuleBundle;
4704
+ declare function renderProgressFilesBundleHook(pf: ResolvedProgressFiles, bundleLabel: string): string;
1998
4705
 
1999
4706
  /*******************************************************************************
2000
4707
  *
@@ -2010,6 +4717,36 @@ declare const prReviewBundle: AgentRuleBundle;
2010
4717
  */
2011
4718
  declare const projenBundle: AgentRuleBundle;
2012
4719
 
4720
+ /**
4721
+ * Regulatory-research bundle — enabled by default.
4722
+ *
4723
+ * Consuming projects can disable it with
4724
+ * `excludeBundles: ["regulatory-research"]`. `appliesWhen` always
4725
+ * returns `true` per the workflow-bundle peer-present assumption.
4726
+ *
4727
+ * Ships a sub-agent (`regulatory-research-analyst`), three
4728
+ * user-invocable skills (`/scan-regulatory-landscape`,
4729
+ * `/research-regulation`, `/impact-regulation`), a regulation-page
4730
+ * template (emitted alongside the research skill), and
4731
+ * `type:regulatory-research` plus `regulatory:*` phase labels.
4732
+ *
4733
+ * The bundle sits downstream of `research-pipeline`,
4734
+ * `industry-discovery`, and `standards-research` (which surface the
4735
+ * need for regulatory research) and hands off actionable obligations
4736
+ * to the `requirements-analyst` bundle via `req:scan` issues that
4737
+ * become SEC (security & compliance) requirements in the writer
4738
+ * pipeline, and canonical profiles to `company-profile` and
4739
+ * `people-profile` for enforcement bodies and regulatory leaders.
4740
+ */
4741
+ declare function buildRegulatoryResearchBundle(paths?: ResolvedAgentPaths): AgentRuleBundle;
4742
+ /**
4743
+ * Default-paths instance of the regulatory-research bundle, preserved
4744
+ * for backward compatibility with consumers that import the const
4745
+ * directly. The factory above is the canonical entry point when a
4746
+ * consumer supplies `AgentConfigOptions.paths`.
4747
+ */
4748
+ declare const regulatoryResearchBundle: AgentRuleBundle;
4749
+
2013
4750
  /**
2014
4751
  * Inject domain-specific source-tier examples into the content of the
2015
4752
  * base bundle's "Source Quality & Verification" rule.
@@ -2109,15 +4846,481 @@ declare function renderMeetingTypesSection(meetings: MeetingsConfig | undefined)
2109
4846
  declare function renderPriorityRulesSection(rules: ReadonlyArray<PriorityRule>): string;
2110
4847
 
2111
4848
  /**
2112
- * Requirements-analyst bundle opt-in via `includeBundles: [\"requirements-analyst\"]`.
4849
+ * Default master switch for the shared-editing convention. When no
4850
+ * config is supplied, the convention ships **enabled** so every agent
4851
+ * that edits an index file follows the single-entry / verify /
4852
+ * re-sort protocol.
4853
+ *
4854
+ * @see SharedEditingConfig
4855
+ */
4856
+ declare const DEFAULT_SHARED_EDITING_ENABLED = true;
4857
+ /**
4858
+ * Default list of path patterns considered "shared index files". The
4859
+ * patterns are plain glob strings rendered verbatim into the rule body
4860
+ * — agents match against them when deciding whether the shared-editing
4861
+ * contract applies to the file they are about to edit.
4862
+ *
4863
+ * The defaults cover the registry / index files every configulator
4864
+ * consumer ships by convention:
4865
+ *
4866
+ * - A monorepo-wide docs site at `/docs` with one or more `index.md` /
4867
+ * `README.md` registry tables.
4868
+ * - Category landing pages under `docs/src/content/docs/**` that list
4869
+ * every profile, requirement, or capability in their category.
4870
+ * - Feature matrices produced by the `software-profile` bundle.
4871
+ *
4872
+ * Consumers can replace the list outright via `sharedIndexPaths` or
4873
+ * append project-specific registries.
4874
+ *
4875
+ * @see SharedEditingConfig
4876
+ */
4877
+ declare const DEFAULT_SHARED_INDEX_PATHS: ReadonlyArray<string>;
4878
+ /**
4879
+ * Default conflict-resolution strategy rendered into the rule body.
4880
+ * `rebase` matches the `git pull --rebase` workflow every
4881
+ * configulator-managed repo already uses for feature branches; the
4882
+ * alternative (`merge`) is documented for projects that keep a
4883
+ * merge-commit-only history.
4884
+ *
4885
+ * @see SharedEditingConfig
4886
+ */
4887
+ declare const DEFAULT_SHARED_EDITING_CONFLICT_STRATEGY: "rebase" | "merge";
4888
+ /**
4889
+ * Default for whether the convention renders the commit-path
4890
+ * verification protocol (read-back + single-row assertion). The
4891
+ * verification step is cheap, catches staging / path bugs that would
4892
+ * otherwise land on the branch, and is the core safety net the openhi
4893
+ * reference promotes — so it ships **on** by default.
4894
+ *
4895
+ * @see SharedEditingConfig
4896
+ */
4897
+ declare const DEFAULT_SHARED_EDITING_VERIFY_COMMIT = true;
4898
+ /**
4899
+ * Default for whether the convention emits the
4900
+ * `.claude/procedures/verify-index-row.sh` helper to disk. The helper
4901
+ * is opt-in because many consumers prefer to do the verification
4902
+ * inline via the documented `git show HEAD:<path>` recipe rather than
4903
+ * shell out to a dedicated script. Consumers that want the script
4904
+ * available to sub-agents enable the emission explicitly.
4905
+ *
4906
+ * @see SharedEditingConfig
4907
+ */
4908
+ declare const DEFAULT_SHARED_EDITING_EMIT_HELPER = false;
4909
+ /**
4910
+ * Allowed values for `SharedEditingConfig.conflictStrategy`. Exported
4911
+ * so consumers can reference the canonical set without hard-coding
4912
+ * literals.
4913
+ */
4914
+ declare const SHARED_EDITING_CONFLICT_STRATEGY_VALUES: readonly ["rebase", "merge"];
4915
+ /**
4916
+ * Fully-resolved shared-editing settings. Every field is defaulted so
4917
+ * downstream renderers can reason about a single canonical shape.
4918
+ */
4919
+ interface ResolvedSharedEditing {
4920
+ readonly enabled: boolean;
4921
+ readonly sharedIndexPaths: ReadonlyArray<string>;
4922
+ readonly verifyCommit: boolean;
4923
+ readonly conflictStrategy: "rebase" | "merge";
4924
+ readonly emitHelper: boolean;
4925
+ }
4926
+ /**
4927
+ * Resolve a (possibly absent) `SharedEditingConfig` into a canonical
4928
+ * `ResolvedSharedEditing` with every field filled in. Unset fields
4929
+ * cascade from their documented defaults.
4930
+ *
4931
+ * Malformed configs — empty / whitespace-only `sharedIndexPaths`
4932
+ * entry, unknown `conflictStrategy` — throw a descriptive `Error`.
4933
+ */
4934
+ declare function resolveSharedEditing(config?: SharedEditingConfig): ResolvedSharedEditing;
4935
+ /**
4936
+ * Synth-time validation hook. Throws a descriptive `Error` when the
4937
+ * supplied `SharedEditingConfig` is malformed. Called by
4938
+ * `AgentConfig.preSynthesize` before any rendering so a misconfigured
4939
+ * convention fails the build instead of silently shipping broken
4940
+ * shared-editing guidance. Returns the resolved config unchanged so
4941
+ * callers can write `const se = validateSharedEditingConfig(config)`
4942
+ * in one line.
4943
+ *
4944
+ * Malformed cases rejected here:
4945
+ *
4946
+ * - `sharedIndexPaths` contains an empty / whitespace-only entry, or
4947
+ * the array is supplied but empty.
4948
+ * - `conflictStrategy` is not one of `"rebase"` / `"merge"`.
4949
+ */
4950
+ declare function validateSharedEditingConfig(config?: SharedEditingConfig): ResolvedSharedEditing;
4951
+ /**
4952
+ * Render the full body for the `shared-editing-safety` rule shipped
4953
+ * by the `base` bundle. The rule documents:
4954
+ *
4955
+ * - The catalog of shared index files the contract applies to.
4956
+ * - The pre-edit read-latest protocol (pull + re-read before editing).
4957
+ * - The single-entry, deterministic-sort row-insert rule.
4958
+ * - The commit-path verification step (read-back + count assertion).
4959
+ * - The merge-conflict resolution recipe (rebase, re-sort, re-verify).
4960
+ *
4961
+ * When the convention is disabled, the rule renders a short stub that
4962
+ * tells agents the project does not enforce the convention and that
4963
+ * concurrent edits to shared index files may require manual conflict
4964
+ * resolution.
4965
+ */
4966
+ declare function renderSharedEditingRuleContent(se: ResolvedSharedEditing): string;
4967
+ /**
4968
+ * Render the short shared-editing hook section injected into a
4969
+ * phased-agent bundle's workflow rule (company-profile,
4970
+ * people-profile, software-profile, etc.). The section cites the
4971
+ * full contract documented in the base bundle's
4972
+ * `shared-editing-safety` rule so individual bundles stay DRY.
4973
+ *
4974
+ * When the convention is disabled, the function returns an empty
4975
+ * string so callers can no-op their append path.
4976
+ */
4977
+ declare function renderSharedEditingBundleHook(se: ResolvedSharedEditing, bundleLabel: string): string;
4978
+ /**
4979
+ * Render the `.claude/procedures/verify-index-row.sh` helper script.
4980
+ * Exported so `AgentConfig` can register it as an `AgentProcedure`
4981
+ * when the consumer opts in via `emitHelper: true`.
4982
+ *
4983
+ * The script takes two positional arguments:
4984
+ *
4985
+ * 1. `<index-path>` — repo-relative path to the shared index file.
4986
+ * 2. `<row-unique-marker>` — substring unique to the new row.
4987
+ *
4988
+ * It exits non-zero on any of the following:
4989
+ *
4990
+ * - Wrong argument count.
4991
+ * - Index file is not present in `HEAD` (i.e. not staged).
4992
+ * - The unique-marker substring appears zero times (row missing)
4993
+ * or more than once (duplicate row from a mis-merged conflict).
4994
+ */
4995
+ declare function renderSharedEditingHelperScript(_se: ResolvedSharedEditing): string;
4996
+
4997
+ /**
4998
+ * Default master switch for the skill-eval harness convention. When no
4999
+ * config is supplied, the convention ships **enabled** so every skill
5000
+ * that ships an `evals/evals.json` file has a documented schema,
5001
+ * runner entry-point, and product-context injection contract.
5002
+ *
5003
+ * @see SkillEvalsConfig
5004
+ */
5005
+ declare const DEFAULT_SKILL_EVALS_ENABLED = true;
5006
+ /**
5007
+ * Default root directory (relative to the repo root) that holds every
5008
+ * skill's SKILL.md. The harness contract says that any skill SKILL.md
5009
+ * under this root may ship an `evals/evals.json` file alongside it —
5010
+ * the runner discovers eval suites by walking
5011
+ * `<skillsRoot>/<skill-name>/evals/evals.json`.
5012
+ *
5013
+ * Defaults to `.claude/skills`, which matches the location every
5014
+ * configulator-managed project ships skills to on disk.
5015
+ *
5016
+ * @see SkillEvalsConfig
5017
+ */
5018
+ declare const DEFAULT_SKILL_EVALS_SKILLS_ROOT = ".claude/skills";
5019
+ /**
5020
+ * Default path to the product-context fixture consumed by every eval
5021
+ * suite. Configulator ships with a `docs/src/content/docs/project-context.md`
5022
+ * file that every agent already loads at session start; the eval harness
5023
+ * re-uses that file so eval prompts are parameterised by the consuming
5024
+ * project's domain vocabulary, in-scope capabilities, and stakeholders
5025
+ * without the evals needing per-project forks.
5026
+ *
5027
+ * @see SkillEvalsConfig
5028
+ */
5029
+ declare const DEFAULT_PRODUCT_CONTEXT_PATH = "docs/src/content/docs/project-context.md";
5030
+ /**
5031
+ * Default policy for whether the harness should **require** a
5032
+ * product-context file to be present before running the suite.
5033
+ *
5034
+ * `true` (default) — the runner fails fast when the file is missing,
5035
+ * because an eval that silently runs without its product-context
5036
+ * fixture is a false-positive waiting to happen.
5037
+ *
5038
+ * `false` — the runner emits a warning to stderr but still runs the
5039
+ * suite. Useful for bootstrapping a new consuming repo that has not
5040
+ * yet authored its `project-context.md`.
5041
+ *
5042
+ * @see SkillEvalsConfig
5043
+ */
5044
+ declare const DEFAULT_REQUIRE_PRODUCT_CONTEXT = true;
5045
+ /**
5046
+ * Default for whether the convention emits the
5047
+ * `.claude/procedures/run-skill-evals.sh` helper to disk. The helper
5048
+ * is opt-in because many consumers run evals from CI or ad-hoc from
5049
+ * their own scripts rather than through the bundled harness; consumers
5050
+ * who want a ready-to-invoke runner flip this to `true`.
5051
+ *
5052
+ * @see SkillEvalsConfig
5053
+ */
5054
+ declare const DEFAULT_SKILL_EVALS_EMIT_RUNNER = false;
5055
+ /**
5056
+ * Fully-resolved skill-evals settings. Every field is defaulted so
5057
+ * downstream renderers can reason about a single canonical shape.
5058
+ */
5059
+ interface ResolvedSkillEvals {
5060
+ readonly enabled: boolean;
5061
+ readonly skillsRoot: string;
5062
+ readonly productContextPath: string;
5063
+ readonly requireProductContext: boolean;
5064
+ readonly emitRunner: boolean;
5065
+ }
5066
+ /**
5067
+ * Resolve a (possibly absent) `SkillEvalsConfig` into a canonical
5068
+ * `ResolvedSkillEvals` with every field filled in. Unset fields
5069
+ * cascade from their documented defaults.
5070
+ *
5071
+ * Malformed configs — empty / whitespace-only or absolute `skillsRoot`,
5072
+ * empty / whitespace-only or absolute `productContextPath` — throw a
5073
+ * descriptive `Error`.
5074
+ */
5075
+ declare function resolveSkillEvals(config?: SkillEvalsConfig): ResolvedSkillEvals;
5076
+ /**
5077
+ * Synth-time validation hook. Throws a descriptive `Error` when the
5078
+ * supplied `SkillEvalsConfig` is malformed. Called by
5079
+ * `AgentConfig.preSynthesize` before any rendering so a misconfigured
5080
+ * convention fails the build instead of silently shipping a broken
5081
+ * eval harness. Returns the resolved config unchanged so callers can
5082
+ * write `const se = validateSkillEvalsConfig(config)` in one line.
5083
+ *
5084
+ * Malformed cases rejected here:
5085
+ *
5086
+ * - `skillsRoot` empty, whitespace-only, or absolute.
5087
+ * - `productContextPath` empty, whitespace-only, or absolute.
5088
+ */
5089
+ declare function validateSkillEvalsConfig(config?: SkillEvalsConfig): ResolvedSkillEvals;
5090
+ /**
5091
+ * Render the full body for the `skill-evals` rule shipped by the
5092
+ * `base` bundle. The rule documents:
5093
+ *
5094
+ * - The on-disk contract (where `evals/evals.json` lives).
5095
+ * - The JSON schema every eval file follows.
5096
+ * - The product-context injection protocol (how evals reference and
5097
+ * interpolate the repo's `project-context.md` without forking).
5098
+ * - The runner entry-point (`run-skill-evals.sh` when opted in, or
5099
+ * the inline `jq`-driven recipe when not).
5100
+ *
5101
+ * When the convention is disabled, the rule renders a short stub that
5102
+ * tells agents the project does not ship skill evals and that skill
5103
+ * changes ride on review alone.
5104
+ */
5105
+ declare function renderSkillEvalsRuleContent(se: ResolvedSkillEvals): string;
5106
+ /**
5107
+ * Render the short skill-evals hook section injected into a skill's
5108
+ * owning bundle rule (requirements-writer, bcm-writer, etc.). The
5109
+ * section cites the full contract documented in the base bundle's
5110
+ * `skill-evals` rule so individual bundles stay DRY.
5111
+ *
5112
+ * When the convention is disabled, the function returns an empty
5113
+ * string so callers can no-op their append path.
5114
+ */
5115
+ declare function renderSkillEvalsBundleHook(se: ResolvedSkillEvals, skillLabel: string): string;
5116
+ /**
5117
+ * Render the `.claude/procedures/run-skill-evals.sh` helper script.
5118
+ * Exported so `AgentConfig` can register it as an `AgentProcedure`
5119
+ * when the consumer opts in via `emitRunner: true`.
5120
+ *
5121
+ * The script takes zero or one positional arguments:
5122
+ *
5123
+ * 1. `[<skill-name>]` — optional, restricts the run to one skill.
5124
+ *
5125
+ * It exits non-zero on any of the following:
5126
+ *
5127
+ * - `jq` is not available on `PATH`.
5128
+ * - A discovered `evals.json` is malformed or missing required fields.
5129
+ * - `skill_name` inside the file does not match the parent directory.
5130
+ * - The product-context fixture is missing and `requireProductContext`
5131
+ * is `true` in the resolved config.
5132
+ */
5133
+ declare function renderSkillEvalsRunnerScript(se: ResolvedSkillEvals): string;
5134
+
5135
+ /**
5136
+ * Default master switch for the workflow-diagrams convention. When no
5137
+ * config is supplied the convention ships **enabled** so every
5138
+ * configulator-consuming repo carries the "diagram-touched-when-bundle-
5139
+ * touched" rule in its rendered `CLAUDE.md`.
5140
+ *
5141
+ * @see WorkflowDiagramsConfig
5142
+ */
5143
+ declare const DEFAULT_WORKFLOW_DIAGRAMS_ENABLED = true;
5144
+ /**
5145
+ * Default repo-relative path for the workflow-diagrams page. Matches
5146
+ * the singleton `/docs` site layout the monorepo contract assumes: a
5147
+ * single Starlight docs site at `/docs` with sub-project agent pages
5148
+ * under `docs/src/content/docs/agents/`.
5149
+ *
5150
+ * The file is never generated by configulator (the convention is
5151
+ * explicit: diagrams are hand-authored for readability). Consumers
5152
+ * opt into the starter stub via `emitStarterDiagram: true`.
5153
+ *
5154
+ * @see WorkflowDiagramsConfig
5155
+ */
5156
+ declare const DEFAULT_WORKFLOW_DIAGRAMS_PATH = "docs/src/content/docs/agents/workflows.md";
5157
+ /**
5158
+ * Default list of glob patterns that identify "bundle files" — the
5159
+ * source files whose edits require the workflow-diagrams page to be
5160
+ * touched in the same change set.
5161
+ *
5162
+ * The defaults cover the two canonical locations bundle-like content
5163
+ * lives in a configulator-consuming repo:
5164
+ *
5165
+ * - `packages/@codedrifters/configulator/src/agent/bundles/**.ts` —
5166
+ * the bundle authoring sites inside configulator itself.
5167
+ * - `.claude/agents/**.md` / `.claude/skills/**` — agent and skill
5168
+ * prompts in consuming repos that don't re-export configulator
5169
+ * bundles.
5170
+ *
5171
+ * Consumers can replace the list outright via `bundlePathPatterns`
5172
+ * when their agent sources live elsewhere (e.g. a monorepo that keeps
5173
+ * agents under `tools/agents/`).
5174
+ *
5175
+ * @see WorkflowDiagramsConfig
5176
+ */
5177
+ declare const DEFAULT_WORKFLOW_DIAGRAMS_BUNDLE_PATH_PATTERNS: ReadonlyArray<string>;
5178
+ /**
5179
+ * Default for whether the convention emits a starter workflow-diagrams
5180
+ * page to disk at `<diagramsPath>`. Disabled by default because the
5181
+ * page is hand-authored — an emitted stub would conflict with
5182
+ * existing content on repos adopting the convention late.
5183
+ *
5184
+ * @see WorkflowDiagramsConfig
5185
+ */
5186
+ declare const DEFAULT_WORKFLOW_DIAGRAMS_EMIT_STARTER = false;
5187
+ /**
5188
+ * Default for whether the convention emits the
5189
+ * `.claude/procedures/check-workflow-diagrams.sh` checker script. The
5190
+ * script walks the staged / changed-file set and fails when a bundle
5191
+ * file is touched without the diagrams page being touched too.
5192
+ *
5193
+ * Disabled by default because many consumers prefer to enforce the
5194
+ * rule via review discipline and the rendered documentation alone;
5195
+ * the script is opt-in for repos that want a hard CI gate or
5196
+ * pre-commit hook.
5197
+ *
5198
+ * @see WorkflowDiagramsConfig
5199
+ */
5200
+ declare const DEFAULT_WORKFLOW_DIAGRAMS_EMIT_CHECKER = false;
5201
+ /**
5202
+ * Default for whether the rendered rule body asserts the diagram
5203
+ * update as a **hard requirement** vs. a **strong recommendation**.
5204
+ * Defaults to `true` — the whole point of the convention is that
5205
+ * diagrams stay in sync, so the hard-requirement phrasing is the
5206
+ * correct default. Consumers that treat diagrams as aspirational can
5207
+ * soften the phrasing by setting this to `false`.
5208
+ *
5209
+ * @see WorkflowDiagramsConfig
5210
+ */
5211
+ declare const DEFAULT_WORKFLOW_DIAGRAMS_REQUIRE_UPDATE = true;
5212
+ /**
5213
+ * Fully-resolved workflow-diagrams settings. Every field is defaulted
5214
+ * so downstream renderers can reason about a single canonical shape.
5215
+ */
5216
+ interface ResolvedWorkflowDiagrams {
5217
+ readonly enabled: boolean;
5218
+ readonly diagramsPath: string;
5219
+ readonly bundlePathPatterns: ReadonlyArray<string>;
5220
+ readonly emitStarterDiagram: boolean;
5221
+ readonly emitChecker: boolean;
5222
+ readonly requireDiagramUpdate: boolean;
5223
+ }
5224
+ /**
5225
+ * Resolve a (possibly absent) `WorkflowDiagramsConfig` into a
5226
+ * canonical `ResolvedWorkflowDiagrams` with every field filled in.
5227
+ * Unset fields cascade from their documented defaults.
5228
+ *
5229
+ * Malformed configs — empty / whitespace-only or absolute
5230
+ * `diagramsPath`, empty `bundlePathPatterns`, empty /
5231
+ * whitespace-only path entry — throw a descriptive `Error`.
5232
+ */
5233
+ declare function resolveWorkflowDiagrams(config?: WorkflowDiagramsConfig): ResolvedWorkflowDiagrams;
5234
+ /**
5235
+ * Synth-time validation hook. Throws a descriptive `Error` when the
5236
+ * supplied `WorkflowDiagramsConfig` is malformed. Called by
5237
+ * `AgentConfig.preSynthesize` before any rendering so a misconfigured
5238
+ * convention fails the build instead of silently shipping broken
5239
+ * workflow-diagrams guidance. Returns the resolved config unchanged
5240
+ * so callers can write
5241
+ * `const wd = validateWorkflowDiagramsConfig(config)` in one line.
5242
+ *
5243
+ * Malformed cases rejected here:
5244
+ *
5245
+ * - `diagramsPath` empty, whitespace-only, or absolute.
5246
+ * - `bundlePathPatterns` not an array, empty, or contains an empty /
5247
+ * whitespace-only entry.
5248
+ */
5249
+ declare function validateWorkflowDiagramsConfig(config?: WorkflowDiagramsConfig): ResolvedWorkflowDiagrams;
5250
+ /**
5251
+ * Render the full body for the `workflow-diagrams-convention` rule
5252
+ * shipped by the `base` bundle. The rule documents:
5253
+ *
5254
+ * - Why the convention exists (diagram / prose drift).
5255
+ * - The on-disk contract — a single Mermaid-based page at
5256
+ * `<diagramsPath>` with one diagram per agent + a master
5257
+ * cross-agent diagram.
5258
+ * - The **diagram-touched-when-bundle-touched** rule, phrased as a
5259
+ * hard requirement or a strong recommendation per
5260
+ * `requireDiagramUpdate`.
5261
+ * - The set of paths the rule applies to.
5262
+ * - The optional checker script (cross-referenced only when emitted).
5263
+ *
5264
+ * When the convention is disabled, the rule renders a short stub.
5265
+ */
5266
+ declare function renderWorkflowDiagramsRuleContent(wd: ResolvedWorkflowDiagrams): string;
5267
+ /**
5268
+ * Render the short workflow-diagrams hook section injected into a
5269
+ * phased-agent bundle's workflow rule. The section cites the full
5270
+ * contract documented in the base bundle's
5271
+ * `workflow-diagrams-convention` rule so individual bundles stay DRY.
5272
+ *
5273
+ * When the convention is disabled, the function returns an empty
5274
+ * string so callers can no-op their append path.
5275
+ */
5276
+ declare function renderWorkflowDiagramsBundleHook(wd: ResolvedWorkflowDiagrams, bundleLabel: string): string;
5277
+ /**
5278
+ * Render a minimal starter workflow-diagrams page — a top-level
5279
+ * heading, the master-diagram placeholder, and a single example
5280
+ * agent section. Exported so `AgentConfig` can emit it to disk when
5281
+ * the consumer opts in via `emitStarterDiagram: true`.
5282
+ *
5283
+ * The starter is deliberately sparse: it documents the expected
5284
+ * structure without committing the consumer to a particular agent
5285
+ * list. Repos that already maintain a hand-authored diagrams page
5286
+ * should leave `emitStarterDiagram` off — the emission would
5287
+ * overwrite their content.
5288
+ */
5289
+ declare function renderWorkflowDiagramsStarterPage(_wd: ResolvedWorkflowDiagrams): string;
5290
+ /**
5291
+ * Render the `.claude/procedures/check-workflow-diagrams.sh` helper
5292
+ * script. Exported so `AgentConfig` can register it as an
5293
+ * `AgentProcedure` when the consumer opts in via `emitChecker: true`.
5294
+ *
5295
+ * The script accepts the list of changed files as either:
5296
+ *
5297
+ * 1. Positional arguments (one file per arg).
5298
+ * 2. Newline-separated entries on stdin (when no args supplied) —
5299
+ * pipe `git diff --name-only` directly into it.
5300
+ *
5301
+ * It fails non-zero when any changed file matches a bundle-path
5302
+ * pattern and the configured diagrams path is not also in the list.
5303
+ * It exits `0` when no bundle files were touched or when the
5304
+ * diagrams page was touched alongside them.
5305
+ */
5306
+ declare function renderWorkflowDiagramsCheckerScript(wd: ResolvedWorkflowDiagrams): string;
5307
+
5308
+ /**
5309
+ * Build the requirements-analyst bundle with the supplied resolved
5310
+ * paths.
2113
5311
  *
2114
- * Provides a 2-phase requirements gap-discovery pipeline
2115
- * (scan draft-trace) designed for projects using the BCM (Business
2116
- * Capability Model) framework. Ships a sub-agent, a user-invocable
2117
- * skill, and `req:*` phase labels via the bundle `labels` mechanism so
2118
- * consuming projects automatically pick up the label taxonomy through
2119
- * the sync-labels workflow. See ADR-009 for the rationale behind
2120
- * collapsing the draft and trace phases.
5312
+ * Every reference to a canonical agent path (docs root, requirements
5313
+ * root, bcm root, etc.) inside the rule / skill / sub-agent content
5314
+ * strings is an interpolation of the supplied `paths` struct, so a
5315
+ * consumer override of `AgentConfigOptions.paths` propagates to the
5316
+ * rendered output.
5317
+ */
5318
+ declare function buildRequirementsAnalystBundle(paths?: ResolvedAgentPaths): AgentRuleBundle;
5319
+ /**
5320
+ * Default-paths instance of the requirements-analyst bundle, preserved
5321
+ * for backward compatibility with consumers that import the const
5322
+ * directly. The factory above is the canonical entry point when a
5323
+ * consumer supplies `AgentConfigOptions.paths`.
2121
5324
  */
2122
5325
  declare const requirementsAnalystBundle: AgentRuleBundle;
2123
5326
 
@@ -2152,6 +5355,13 @@ declare const requirementsAnalystBundle: AgentRuleBundle;
2152
5355
  * phase label so they share the same queue and triage flow as the
2153
5356
  * rest of the requirements pipeline.
2154
5357
  */
5358
+ declare function buildRequirementsReviewerBundle(paths?: ResolvedAgentPaths): AgentRuleBundle;
5359
+ /**
5360
+ * Default-paths instance of the requirements-reviewer bundle, preserved
5361
+ * for backward compatibility with consumers that import the const
5362
+ * directly. The factory above is the canonical entry point when a
5363
+ * consumer supplies `AgentConfigOptions.paths`.
5364
+ */
2155
5365
  declare const requirementsReviewerBundle: AgentRuleBundle;
2156
5366
 
2157
5367
  /**
@@ -2188,18 +5398,29 @@ declare const REQUIREMENTS_WRITER_PATHS: {
2188
5398
  * `type:requirement` is intentionally **not** declared here — it is
2189
5399
  * already declared by the `requirements-analyst` bundle and reused.
2190
5400
  */
5401
+ declare function buildRequirementsWriterBundle(paths?: ResolvedAgentPaths): AgentRuleBundle;
5402
+ /**
5403
+ * Default-paths instance of the requirements-writer bundle, preserved
5404
+ * for backward compatibility with consumers that import the const
5405
+ * directly. The factory above is the canonical entry point when a
5406
+ * consumer supplies `AgentConfigOptions.paths`.
5407
+ */
2191
5408
  declare const requirementsWriterBundle: AgentRuleBundle;
2192
5409
 
2193
5410
  /**
2194
- * Research-pipeline bundle enabled by default.
2195
- *
2196
- * Consuming projects can disable it with
2197
- * `excludeBundles: ["research-pipeline"]`. `appliesWhen` always returns
2198
- * `true` per this batch's directive that bundles assume peers are
2199
- * present.
5411
+ * Build the research-pipeline bundle with the supplied resolved paths.
2200
5412
  *
2201
- * Ships a sub-agent (`research-analyst`), a user-invocable skill
2202
- * (`/research`), and `type:research` plus `research:*` phase labels.
5413
+ * Every reference to a canonical agent path (research root, docs root,
5414
+ * etc.) inside the rule / skill / sub-agent content strings is an
5415
+ * interpolation of the supplied `paths` struct, so a consumer override
5416
+ * of `AgentConfigOptions.paths` propagates to the rendered output.
5417
+ */
5418
+ declare function buildResearchPipelineBundle(paths?: ResolvedAgentPaths): AgentRuleBundle;
5419
+ /**
5420
+ * Default-paths instance of the research-pipeline bundle, preserved
5421
+ * for backward compatibility with consumers that import the const
5422
+ * directly. The factory above is the canonical entry point when a
5423
+ * consumer supplies `AgentConfigOptions.paths`.
2203
5424
  */
2204
5425
  declare const researchPipelineBundle: AgentRuleBundle;
2205
5426
 
@@ -2217,6 +5438,13 @@ declare const researchPipelineBundle: AgentRuleBundle;
2217
5438
  declare const slackBundle: AgentRuleBundle;
2218
5439
 
2219
5440
  /**
5441
+ * Build the software-profile bundle with the supplied resolved paths.
5442
+ *
5443
+ * Every reference to a canonical agent path (docs root, bcm root)
5444
+ * inside the rule / skill / sub-agent content strings is an
5445
+ * interpolation of the supplied `paths` struct, so a consumer override
5446
+ * of `AgentConfigOptions.paths` propagates to the rendered output.
5447
+ *
2220
5448
  * Software-profile bundle — enabled by default.
2221
5449
  *
2222
5450
  * Consuming projects can disable it with
@@ -2231,8 +5459,49 @@ declare const slackBundle: AgentRuleBundle;
2231
5459
  * skills (`/profile-software` and `/map-software`), and
2232
5460
  * `type:software-profile` plus `software:*` phase labels.
2233
5461
  */
5462
+ declare function buildSoftwareProfileBundle(paths?: ResolvedAgentPaths): AgentRuleBundle;
5463
+ /**
5464
+ * Default-paths instance of the software-profile bundle, preserved
5465
+ * for backward compatibility with consumers that import the const
5466
+ * directly. The factory above is the canonical entry point when a
5467
+ * consumer supplies `AgentConfigOptions.paths`.
5468
+ */
2234
5469
  declare const softwareProfileBundle: AgentRuleBundle;
2235
5470
 
5471
+ /**
5472
+ * Build the standards-research bundle with the supplied resolved paths.
5473
+ *
5474
+ * Every reference to a canonical agent path (docs root, research root,
5475
+ * etc.) inside the rule / skill / sub-agent content strings is an
5476
+ * interpolation of the supplied `paths` struct, so a consumer override
5477
+ * of `AgentConfigOptions.paths` propagates to the rendered output.
5478
+ *
5479
+ * Consuming projects can disable it with
5480
+ * `excludeBundles: ["standards-research"]`. `appliesWhen` always
5481
+ * returns `true` per the workflow-bundle peer-present assumption.
5482
+ *
5483
+ * Ships a sub-agent (`standards-research-analyst`), five user-invocable
5484
+ * skills (`/scope-standards-research`, `/research-standard`,
5485
+ * `/compare-standards`, `/extension-standard`,
5486
+ * `/organizations-standard`), a comparison-grid template (emitted
5487
+ * alongside the compare skill), and `type:standards-research` plus
5488
+ * `standards:*` phase labels.
5489
+ *
5490
+ * The bundle sits downstream of `research-pipeline` and
5491
+ * `industry-discovery` (which surface the need for standards research)
5492
+ * and hands off canonical profiles to `company-profile` and
5493
+ * `people-profile`, extension ADRs to `requirements-writer`, and
5494
+ * domain-entity mappings to `bcm-writer`.
5495
+ */
5496
+ declare function buildStandardsResearchBundle(paths?: ResolvedAgentPaths): AgentRuleBundle;
5497
+ /**
5498
+ * Default-paths instance of the standards-research bundle, preserved
5499
+ * for backward compatibility with consumers that import the const
5500
+ * directly. The factory above is the canonical entry point when a
5501
+ * consumer supplies `AgentConfigOptions.paths`.
5502
+ */
5503
+ declare const standardsResearchBundle: AgentRuleBundle;
5504
+
2236
5505
  /**
2237
5506
  * Turborepo bundle — auto-detected when the TurboRepo component is present.
2238
5507
  */
@@ -2249,13 +5518,26 @@ declare const typescriptBundle: AgentRuleBundle;
2249
5518
  declare const vitestBundle: AgentRuleBundle;
2250
5519
 
2251
5520
  /**
2252
- * Built-in rule bundles that ship with configulator.
2253
- * Each bundle is auto-detected based on project introspection.
5521
+ * Build the full list of built-in rule bundles with the supplied
5522
+ * resolved agent paths. Every path-aware bundle accepts a
5523
+ * `ResolvedAgentPaths` and threads it through its rule / skill /
5524
+ * sub-agent content, so a consumer override of
5525
+ * `AgentConfigOptions.paths` propagates into the rendered output.
2254
5526
  *
2255
5527
  * Order matters: base is first so its rules can be overridden by
2256
5528
  * more specific bundles. The base bundle's `appliesWhen` always
2257
5529
  * returns true; it is filtered by the `includeBaseRules` option
2258
5530
  * in AgentConfig.
5531
+ *
5532
+ * Bundles that do not read any agent path (typescript, jest,
5533
+ * pnpm, etc.) stay as const exports and are referenced unchanged.
5534
+ */
5535
+ declare function buildBuiltInBundles(paths?: ResolvedAgentPaths): ReadonlyArray<AgentRuleBundle>;
5536
+ /**
5537
+ * Built-in rule bundles assembled with the default agent paths.
5538
+ * Preserved for backward compatibility with tests and consumers
5539
+ * that import the array directly. Prefer `buildBuiltInBundles(paths)`
5540
+ * when consumer overrides are in scope.
2259
5541
  */
2260
5542
  declare const BUILT_IN_BUNDLES: ReadonlyArray<AgentRuleBundle>;
2261
5543
 
@@ -2520,6 +5802,150 @@ interface TemplateResolveResult {
2520
5802
  */
2521
5803
  declare function resolveTemplateVariables(template: string, metadata: ResolvedProjectMetadata | undefined): TemplateResolveResult;
2522
5804
 
5805
+ /**
5806
+ * Options for the `.api.md` rollup slot produced by API Extractor.
5807
+ */
5808
+ interface ApiExtractorReportOptions {
5809
+ /**
5810
+ * Folder (relative to the package root) where the `.api.md` rollup
5811
+ * is written when the extractor runs. Treated as a scratch/temp
5812
+ * location because rollups are **regenerated on scan** rather than
5813
+ * committed to git (per docs-sync epic #448 resolved decision #3).
5814
+ *
5815
+ * The parent `ApiExtractor` component adds this folder to the
5816
+ * package's `.gitignore` so rollups never land on the default branch.
5817
+ *
5818
+ * @default ".api-extractor/"
5819
+ */
5820
+ readonly reportFolder?: string;
5821
+ /**
5822
+ * Filename of the generated rollup, relative to `reportFolder`.
5823
+ * Accepts the `<unscopedPackageName>` placeholder API Extractor
5824
+ * expands at runtime.
5825
+ *
5826
+ * @default "<unscopedPackageName>.api.md"
5827
+ */
5828
+ readonly reportFileName?: string;
5829
+ }
5830
+ /**
5831
+ * Options for the `ApiExtractor` projen component.
5832
+ */
5833
+ interface ApiExtractorOptions {
5834
+ /**
5835
+ * Path to the TypeScript `.d.ts` rollup produced by the package's
5836
+ * compile step, relative to the package root. Used as the
5837
+ * extractor's `mainEntryPointFilePath`.
5838
+ *
5839
+ * Defaults to `<projectFolder>/lib/index.d.ts` — matches the
5840
+ * `TypeScriptProject` default layout.
5841
+ *
5842
+ * @default "<projectFolder>/lib/index.d.ts"
5843
+ */
5844
+ readonly mainEntryPointFilePath?: string;
5845
+ /**
5846
+ * Path to the generated `api-extractor.json` config file (relative
5847
+ * to the package root).
5848
+ *
5849
+ * @default "api-extractor.json"
5850
+ */
5851
+ readonly configFilePath?: string;
5852
+ /**
5853
+ * Rollup report options (where the `.api.md` lands).
5854
+ */
5855
+ readonly report?: ApiExtractorReportOptions;
5856
+ /**
5857
+ * Override the version of `@microsoft/api-extractor` that is added
5858
+ * to the package's devDeps. Defaults to `VERSION.API_EXTRACTOR_VERSION`.
5859
+ */
5860
+ readonly apiExtractorVersion?: string;
5861
+ /**
5862
+ * When `true`, the extractor's `.api.md` rollup is treated as the
5863
+ * committed baseline and diff-checked in-place. The docs-sync epic
5864
+ * deliberately sets this to `false` — rollups are regenerate-on-scan
5865
+ * and not committed to git.
5866
+ *
5867
+ * @default false
5868
+ */
5869
+ readonly commitApiReport?: boolean;
5870
+ }
5871
+ /**
5872
+ * Default folder where `.api.md` rollups are written. Gitignored by
5873
+ * the component so rollups never land in a commit.
5874
+ */
5875
+ declare const DEFAULT_API_EXTRACTOR_REPORT_FOLDER = ".api-extractor/";
5876
+ /**
5877
+ * Default filename template for rollups. The `<unscopedPackageName>`
5878
+ * placeholder is expanded by `@microsoft/api-extractor` at run time.
5879
+ */
5880
+ declare const DEFAULT_API_EXTRACTOR_REPORT_FILENAME = "<unscopedPackageName>.api.md";
5881
+ /**
5882
+ * Default path (relative to the package root) to the TypeScript
5883
+ * `.d.ts` rollup the extractor consumes. Matches the
5884
+ * `TypeScriptProject` default output layout.
5885
+ */
5886
+ declare const DEFAULT_API_EXTRACTOR_ENTRY_POINT = "<projectFolder>/lib/index.d.ts";
5887
+ /**
5888
+ * Default path (relative to the package root) to the generated
5889
+ * `api-extractor.json` config file.
5890
+ */
5891
+ declare const DEFAULT_API_EXTRACTOR_CONFIG_FILE = "api-extractor.json";
5892
+ /**
5893
+ * Wires `@microsoft/api-extractor` into a TypeScript project so the
5894
+ * docs-sync pipeline can detect public-API drift introduced by a
5895
+ * diff.
5896
+ *
5897
+ * The component adds the extractor devDep, synthesizes an
5898
+ * `api-extractor.json` under the package root, and gitignores the
5899
+ * generated `.api.md` rollup. Rollups are **regenerated on scan**
5900
+ * (never committed to git) per docs-sync epic #448 resolved
5901
+ * decision #3 — the in-repo helper at
5902
+ * `.claude/procedures/extract-api.sh` runs the extractor end-to-end
5903
+ * and writes the rollup to the scratch folder for the scan phase
5904
+ * to consume in-memory.
5905
+ *
5906
+ * Callers normally do not construct this directly — the
5907
+ * `TypeScriptProject` constructor creates one automatically.
5908
+ */
5909
+ declare class ApiExtractor extends Component {
5910
+ readonly project: NodeProject;
5911
+ /**
5912
+ * Find the ApiExtractor component on a project.
5913
+ */
5914
+ static of(project: NodeProject): ApiExtractor | undefined;
5915
+ /**
5916
+ * Generated config file path, relative to the package root.
5917
+ */
5918
+ readonly configFilePath: string;
5919
+ /**
5920
+ * Entry-point path supplied to the extractor.
5921
+ */
5922
+ readonly mainEntryPointFilePath: string;
5923
+ /**
5924
+ * Folder where `.api.md` rollups are written.
5925
+ */
5926
+ readonly reportFolder: string;
5927
+ /**
5928
+ * Filename (or filename template) of the rollup.
5929
+ */
5930
+ readonly reportFileName: string;
5931
+ /**
5932
+ * Pinned version of `@microsoft/api-extractor`.
5933
+ */
5934
+ readonly apiExtractorVersion: string;
5935
+ /**
5936
+ * Whether the generated report is committed alongside source.
5937
+ * `false` by default — rollups regenerate on scan.
5938
+ */
5939
+ readonly commitApiReport: boolean;
5940
+ constructor(project: NodeProject, options?: ApiExtractorOptions);
5941
+ /**
5942
+ * Render the JSON body of the generated `api-extractor.json`. Kept
5943
+ * as a public method so tests can assert the shape without going
5944
+ * through `synthSnapshot`.
5945
+ */
5946
+ renderConfig(): Record<string, unknown>;
5947
+ }
5948
+
2523
5949
  /**
2524
5950
  * Astro output mode.
2525
5951
  *
@@ -2972,16 +6398,24 @@ interface AwsOrganization {
2972
6398
  declare function getLatestEligibleVersion(packageName: string, minimumReleaseAgeMinutes: number): Promise<string | null>;
2973
6399
 
2974
6400
  declare const VERSION: {
6401
+ /**
6402
+ * Version of `@microsoft/api-extractor` to pin for the docs-sync
6403
+ * public-API drift detection runner. Used by the `ApiExtractor`
6404
+ * component (wired into every `TypeScriptProject`) and the shared
6405
+ * helper at `.claude/procedures/extract-api.sh`. See docs-sync
6406
+ * epic child issue #513.
6407
+ */
6408
+ readonly API_EXTRACTOR_VERSION: "7.58.7";
2975
6409
  /**
2976
6410
  * Version of Astro to pin for AstroProject scaffolding.
2977
6411
  */
2978
- readonly ASTRO_VERSION: "6.1.8";
6412
+ readonly ASTRO_VERSION: "6.1.9";
2979
6413
  /**
2980
6414
  * CDK CLI for workflows and command line operations.
2981
6415
  *
2982
6416
  * CLI and lib are versioned separately, so this is the CLI version.
2983
6417
  */
2984
- readonly AWS_CDK_CLI_VERSION: "2.1118.2";
6418
+ readonly AWS_CDK_CLI_VERSION: "2.1119.0";
2985
6419
  /**
2986
6420
  * CDK Version to use for construct projects.
2987
6421
  *
@@ -3004,11 +6438,11 @@ declare const VERSION: {
3004
6438
  /**
3005
6439
  * Version of PNPM to use in workflows at github actions.
3006
6440
  */
3007
- readonly PNPM_VERSION: "10.33.0";
6441
+ readonly PNPM_VERSION: "10.33.2";
3008
6442
  /**
3009
6443
  * Version of Projen to use.
3010
6444
  */
3011
- readonly PROJEN_VERSION: "0.99.51";
6445
+ readonly PROJEN_VERSION: "0.99.52";
3012
6446
  /**
3013
6447
  * Version of `actions/setup-node` to use in GitHub workflows.
3014
6448
  * Tracks the version projen currently emits (see node_modules/projen/lib/github/workflows.js).
@@ -3022,7 +6456,7 @@ declare const VERSION: {
3022
6456
  /**
3023
6457
  * Version of @astrojs/starlight to pin for StarlightProject scaffolding.
3024
6458
  */
3025
- readonly STARLIGHT_VERSION: "0.38.3";
6459
+ readonly STARLIGHT_VERSION: "0.38.4";
3026
6460
  /**
3027
6461
  * What version of the turborepo library should we use?
3028
6462
  */
@@ -3563,6 +6997,16 @@ interface TypeScriptProjectOptions extends Omit<typescript.TypeScriptProjectOpti
3563
6997
  * @default false
3564
6998
  */
3565
6999
  readonly agentConfig?: AgentConfigOptions | boolean;
7000
+ /**
7001
+ * Configure the `@microsoft/api-extractor` runner used by the
7002
+ * docs-sync pipeline for public-API drift detection. When omitted
7003
+ * the extractor is enabled with default options (rollups write to
7004
+ * `.api-extractor/` and are gitignored). Set to `false` to opt a
7005
+ * package out of drift detection entirely.
7006
+ *
7007
+ * @default {}
7008
+ */
7009
+ readonly apiExtractor?: ApiExtractorOptions | false;
3566
7010
  }
3567
7011
  declare class TypeScriptProject extends typescript.TypeScriptProject {
3568
7012
  constructor(userOptions: TypeScriptProjectOptions);
@@ -4833,5 +8277,5 @@ declare const COMPLETE_JOB_ID = "complete";
4833
8277
  */
4834
8278
  declare function addBuildCompleteJob(buildWorkflow: BuildWorkflow): void;
4835
8279
 
4836
- export { AGENT_MODEL, AGENT_PLATFORM, AGENT_RULE_SCOPE, AgentConfig, AstroConfig, AstroOutput, AstroProject, AwsCdkProject, AwsDeployWorkflow, AwsDeploymentConfig, AwsDeploymentTarget, AwsTeardownWorkflow, BUILT_IN_BUNDLES, CLAUDE_RULE_TARGET, COMPLETE_JOB_ID, DEFAULT_AGENT_PATHS, DEFAULT_PRIORITY_LABELS, DEFAULT_STATUS_LABELS, DEFAULT_TEARDOWN_BRANCH_PATTERNS, DEFAULT_TYPE_LABELS, JsiiFaker, LAYOUT_ENFORCEMENT, LAYOUT_ROOT_BY_PROJECT_TYPE, MCP_TRANSPORT, MERGE_METHODS, MIMIMUM_RELEASE_AGE, MINIMUM_RELEASE_AGE, MONOREPO_LAYOUT, MonorepoProject, PROD_DEPLOY_NAME, PnpmWorkspace, ProjectMetadata, REQUIREMENTS_WRITER_PATHS, ROOT_CI_TASK_NAME, ROOT_TURBO_TASK_NAME, ResetTask, STARLIGHT_ROLE, StarlightProject, TestRunner, TurboRepo, TurboRepoTask, TypeScriptConfig, TypeScriptProject, VERSION, VERSION_KEYS_SKIP, VERSION_NPM_PACKAGES, VSCodeConfig, Vitest, addApproveMergeUpgradeWorkflow, addBuildCompleteJob, addSyncLabelsWorkflow, agendaBundle, awsCdkBundle, baseBundle, bcmWriterBundle, businessModelsBundle, companyProfileBundle, formatLayoutViolation, formatStarlightSingletonViolation, getLatestEligibleVersion, githubWorkflowBundle, industryDiscoveryBundle, jestBundle, maintenanceAuditBundle, meetingAnalysisBundle, orchestratorBundle, peopleProfileBundle, pnpmBundle, prReviewBundle, projenBundle, renderCustomDocSectionBlock, renderCustomDocSections, renderFocusSection, renderMeetingTypesSection, renderPriorityRulesSection, renderSourceTierExamples, requirementsAnalystBundle, requirementsReviewerBundle, requirementsWriterBundle, researchPipelineBundle, resolveAgentPaths, resolveAstroProjectOutdir, resolveAwsCdkProjectOutdir, resolveModelAlias, resolveOutdirFromPackageName, resolveTemplateVariables, resolveTypeScriptProjectOutdir, slackBundle, softwareProfileBundle, turborepoBundle, typescriptBundle, validateMonorepoLayout, validateStarlightSingleton, vitestBundle };
4837
- export type { AgentConfigOptions, AgentExpansionRules, AgentFeaturesConfig, AgentModel, AgentPathsConfig, AgentPlatform, AgentPlatformOverrides, AgentProcedure, AgentRule, AgentRuleBundle, AgentRuleScope, AgentSkill, AgentSubAgent, AgentSubAgentPlatformOverrides, ApproveMergeUpgradeOptions, AstroConfigOptions, AstroIntegrationSpec, AstroProjectOptions, AwsAccount, AwsCdkProjectOptions, AwsDeploymentTargetOptions, AwsLocalDeploymentConfig, AwsOrganization, AwsRegion, AwsTeardownWorkflowOptions, CiDeploymentConfig, ClassTypeOptions, ClaudeAutoModeConfig, ClaudeHookAction, ClaudeHookEntry, ClaudeHooksConfig, ClaudePermissionsConfig, ClaudeRuleTarget, ClaudeSandboxConfig, ClaudeSettingsConfig, CopilotHandoff, CursorHookAction, CursorHooksConfig, CursorSettingsConfig, CustomDocSection, DeployWorkflowOptions, DeploymentMetadata, FocusArea, FocusAreaMatch, FocusConfig, GitBranch, GitHubBoardMetadata, GitHubProjectMetadata, GitHubSprintMetadata, IDependencyResolver, LabelDefinition, LayoutEnforcement, LayoutViolation, McpServerConfig, McpTransport, MeetingArea, MeetingScope, MeetingType, MeetingTypeKind, MeetingsConfig, MergeMethod, MonorepoLayoutRoot, MonorepoProjectOptions, OrganizationMetadata, PnpmWorkspaceOptions, PriorityRule, ProjectMetadataOptions, RemoteCacheOptions, RepositoryMetadata, ResetTaskOptions, ResolvedAgentPaths, ResolvedProjectMetadata, SlackMetadata, SourceTierExamples, StarlightEditLink, StarlightLogo, StarlightProjectOptions, StarlightRole, StarlightSidebarItem, StarlightSingletonViolation, StarlightSocialLink, SyncLabelsOptions, TemplateResolveResult, TurboRepoOptions, TurboRepoTaskOptions, TypeScriptProjectOptions, VersionKey, VitestConfigOptions, VitestOptions };
8280
+ export { AGENT_MODEL, AGENT_PLATFORM, AGENT_RULE_SCOPE, AGENT_TIER_ROLES, AGENT_TIER_VALUES, AgentConfig, ApiExtractor, AstroConfig, AstroOutput, AstroProject, AwsCdkProject, AwsDeployWorkflow, AwsDeploymentConfig, AwsDeploymentTarget, AwsTeardownWorkflow, BUILT_IN_BUNDLES, CLAUDE_RULE_TARGET, COMPLETE_JOB_ID, 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_DECOMPOSITION_TEMPLATE, DEFAULT_DELEGATE_TO_PR_REVIEWER, DEFAULT_DISPATCH_MODEL, DEFAULT_DISPATCH_TO_HOUSEKEEPING_RATIO, DEFAULT_HOUSEKEEPING_MODEL, 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_MERGE_METHOD, DEFAULT_OFF_PEAK_CRON_EXAMPLE, DEFAULT_PARTIAL_UNBLOCK_COMMENT_TEMPLATE, 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_REQUIRE_LINKED_ISSUE, DEFAULT_REQUIRE_PRODUCT_CONTEXT, 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_TYPE_LABELS, DEFAULT_UNBLOCK_COMMENT_TEMPLATE, DEFAULT_UNBLOCK_DEPENDENTS_ENABLED, DEFAULT_WORKFLOW_DIAGRAMS_BUNDLE_PATH_PATTERNS, DEFAULT_WORKFLOW_DIAGRAMS_EMIT_CHECKER, DEFAULT_WORKFLOW_DIAGRAMS_EMIT_STARTER, DEFAULT_WORKFLOW_DIAGRAMS_ENABLED, DEFAULT_WORKFLOW_DIAGRAMS_PATH, DEFAULT_WORKFLOW_DIAGRAMS_REQUIRE_UPDATE, JsiiFaker, LAYOUT_ENFORCEMENT, LAYOUT_ROOT_BY_PROJECT_TYPE, MCP_TRANSPORT, MERGE_METHODS, MIMIMUM_RELEASE_AGE, MINIMUM_RELEASE_AGE, MONOREPO_LAYOUT, MonorepoProject, PREFLIGHT_MERGE_METHOD_VALUES, PROD_DEPLOY_NAME, PROGRESS_FILES_FORMAT_VALUES, PnpmWorkspace, ProjectMetadata, REQUIREMENTS_WRITER_PATHS, ROOT_CI_TASK_NAME, ROOT_TURBO_TASK_NAME, ResetTask, SCHEDULED_TASK_MODEL_VALUES, SCOPE_CLASS_VALUES, SHARED_EDITING_CONFLICT_STRATEGY_VALUES, STARLIGHT_ROLE, StarlightProject, TestRunner, TurboRepo, TurboRepoTask, TypeScriptConfig, TypeScriptProject, UNKNOWN_TYPE_FALLBACK_TIER, VERSION, VERSION_KEYS_SKIP, VERSION_NPM_PACKAGES, VSCodeConfig, Vitest, addApproveMergeUpgradeWorkflow, addBuildCompleteJob, addSyncLabelsWorkflow, agendaBundle, awsCdkBundle, baseBundle, bcmWriterBundle, buildBaseBundle, buildBcmWriterBundle, buildBuiltInBundles, buildBusinessModelsBundle, buildCheckBlockedProcedure, buildCompanyProfileBundle, buildCustomerProfileBundle, buildDocsSyncBundle, buildIndustryDiscoveryBundle, buildMaintenanceAuditBundle, buildOrchestratorConventionsContent, buildPeopleProfileBundle, buildRegulatoryResearchBundle, buildRequirementsAnalystBundle, buildRequirementsReviewerBundle, buildRequirementsWriterBundle, buildResearchPipelineBundle, buildSoftwareProfileBundle, buildStandardsResearchBundle, buildUnblockDependentsProcedure, businessModelsBundle, classifyIssueScope, classifyRun, companyProfileBundle, customerProfileBundle, docsSyncBundle, extractApiProcedure, formatLayoutViolation, formatStarlightSingletonViolation, getLatestEligibleVersion, githubWorkflowBundle, industryDiscoveryBundle, jestBundle, maintenanceAuditBundle, meetingAnalysisBundle, orchestratorBundle, peopleProfileBundle, pnpmBundle, prReviewBundle, projenBundle, regulatoryResearchBundle, renderAgentTierCaseStatement, renderAgentTierSection, renderCustomDocSectionBlock, renderCustomDocSections, renderExtractApiProcedure, renderFocusSection, renderIssueTemplatesBundleHook, renderIssueTemplatesCheckerScript, renderIssueTemplatesRuleContent, renderIssueTemplatesStarterPage, renderMeetingTypesSection, renderPreflightPrSection, renderPreflightPrShellHelpers, renderPriorityRulesSection, renderProgressFileName, renderProgressFilePath, renderProgressFilesBundleHook, renderProgressFilesRuleContent, renderRunRatioSection, renderRunRatioShellHelpers, renderScheduledTaskSkillFile, renderScheduledTasksSection, renderScopeGateSection, renderScopeGateShellHelpers, renderSharedEditingBundleHook, renderSharedEditingHelperScript, renderSharedEditingRuleContent, renderSkillEvalsBundleHook, renderSkillEvalsRuleContent, renderSkillEvalsRunnerScript, renderSourceTierExamples, renderUnblockDependentsScript, renderUnblockDependentsSection, renderWorkflowDiagramsBundleHook, renderWorkflowDiagramsCheckerScript, renderWorkflowDiagramsRuleContent, renderWorkflowDiagramsStarterPage, requirementsAnalystBundle, requirementsReviewerBundle, requirementsWriterBundle, researchPipelineBundle, resolveAgentPaths, resolveAgentTiers, resolveAstroProjectOutdir, resolveAwsCdkProjectOutdir, resolveIssueTemplates, resolveModelAlias, resolveOrchestratorAssets, resolveOutdirFromPackageName, resolvePreflightPr, resolveProgressFiles, resolveRunRatio, resolveScheduledTasks, resolveScopeGate, resolveSharedEditing, resolveSkillEvals, resolveTemplateVariables, resolveTypeScriptProjectOutdir, resolveUnblockDependents, resolveWorkflowDiagrams, slackBundle, softwareProfileBundle, standardsResearchBundle, turborepoBundle, typescriptBundle, validateAgentTierConfig, validateIssueTemplatesConfig, validateMonorepoLayout, validatePreflightPrConfig, validateProgressFilesConfig, validateRunRatioConfig, validateScheduledTasksConfig, validateScopeGateConfig, validateSharedEditingConfig, validateSkillEvalsConfig, validateStarlightSingleton, validateUnblockDependentsConfig, validateWorkflowDiagramsConfig, vitestBundle };
8281
+ export type { AgentConfigOptions, AgentExpansionRules, AgentFeaturesConfig, AgentModel, AgentPathsConfig, AgentPlatform, AgentPlatformOverrides, AgentProcedure, AgentRule, AgentRuleBundle, AgentRuleScope, AgentSkill, AgentSubAgent, AgentSubAgentPlatformOverrides, AgentTier, AgentTierConfig, AgentTierEntry, ApiExtractorOptions, ApiExtractorReportOptions, ApproveMergeUpgradeOptions, AstroConfigOptions, AstroIntegrationSpec, AstroProjectOptions, AwsAccount, AwsCdkProjectOptions, AwsDeploymentTargetOptions, AwsLocalDeploymentConfig, AwsOrganization, AwsRegion, AwsTeardownWorkflowOptions, CiDeploymentConfig, ClassTypeOptions, ClaudeAutoModeConfig, ClaudeHookAction, ClaudeHookEntry, ClaudeHooksConfig, ClaudePermissionsConfig, ClaudeRuleTarget, ClaudeSandboxConfig, ClaudeSettingsConfig, CopilotHandoff, CursorHookAction, CursorHooksConfig, CursorSettingsConfig, CustomDocSection, DeployWorkflowOptions, DeploymentMetadata, FocusArea, FocusAreaMatch, FocusConfig, GitBranch, GitHubBoardMetadata, GitHubProjectMetadata, GitHubSprintMetadata, IDependencyResolver, IssueTemplatesConfig, LabelDefinition, LayoutEnforcement, LayoutViolation, McpServerConfig, McpTransport, MeetingArea, MeetingScope, MeetingType, MeetingTypeKind, MeetingsConfig, MergeMethod, MonorepoLayoutRoot, MonorepoProjectOptions, OrganizationMetadata, PnpmWorkspaceOptions, PreflightMergeMethod, PreflightPrConfig, PriorityRule, ProgressFilesConfig, ProjectMetadataOptions, RemoteCacheOptions, RepositoryMetadata, ResetTaskOptions, ResolvedAgentPaths, ResolvedAgentTier, ResolvedIssueTemplates, ResolvedPreflightPr, ResolvedProgressFiles, ResolvedProjectMetadata, ResolvedRunRatio, ResolvedScheduledTask, ResolvedScheduledTasks, ResolvedScopeGate, ResolvedSharedEditing, ResolvedSkillEvals, ResolvedUnblockDependents, ResolvedWorkflowDiagrams, RunRatioConfig, ScheduledTaskEntry, ScheduledTaskModel, ScheduledTaskOverride, ScheduledTasksConfig, ScopeClass, ScopeGateConfig, ScopeGateThresholds, SharedEditingConfig, SkillEvalsConfig, SlackMetadata, SourceTierExamples, StarlightEditLink, StarlightLogo, StarlightProjectOptions, StarlightRole, StarlightSidebarItem, StarlightSingletonViolation, StarlightSocialLink, SyncLabelsOptions, TemplateResolveResult, TurboRepoOptions, TurboRepoTaskOptions, TypeScriptProjectOptions, UnblockDependentsConfig, VersionKey, VitestConfigOptions, VitestOptions, WorkflowDiagramsConfig };