@codedrifters/configulator 0.0.297 → 0.0.298

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.mjs CHANGED
@@ -175,6 +175,45 @@ var require_lib = __commonJS({
175
175
  // src/agent/agent-config.ts
176
176
  import { Component as Component8, SampleFile, TextFile as TextFile4 } from "projen";
177
177
 
178
+ // src/agent/types.ts
179
+ var AGENT_RULE_SCOPE = {
180
+ ALWAYS: "always",
181
+ FILE_PATTERN: "file-pattern"
182
+ };
183
+ var AGENT_PLATFORM = {
184
+ CURSOR: "cursor",
185
+ CLAUDE: "claude",
186
+ CODEX: "codex",
187
+ COPILOT: "copilot"
188
+ };
189
+ var CLAUDE_RULE_TARGET = {
190
+ SCOPED_FILE: "scoped-file",
191
+ AGENTS_MD: "agents-md",
192
+ CLAUDE_MD: "claude-md"
193
+ };
194
+ var AGENT_MODEL = {
195
+ INHERIT: "inherit",
196
+ FAST: "fast",
197
+ BALANCED: "balanced",
198
+ POWERFUL: "powerful"
199
+ };
200
+ function resolveModelAlias(model) {
201
+ if (!model || model === AGENT_MODEL.INHERIT) {
202
+ return void 0;
203
+ }
204
+ const mapping = {
205
+ [AGENT_MODEL.POWERFUL]: "opus",
206
+ [AGENT_MODEL.BALANCED]: "sonnet",
207
+ [AGENT_MODEL.FAST]: "haiku"
208
+ };
209
+ return mapping[model] ?? model;
210
+ }
211
+ var MCP_TRANSPORT = {
212
+ STDIO: "stdio",
213
+ HTTP: "http",
214
+ SSE: "sse"
215
+ };
216
+
178
217
  // src/agent/bundles/project-context.ts
179
218
  var PROJECT_CONTEXT_PATH = "docs/src/content/docs/project-context.md";
180
219
  var SUBPROJECT_ROLE_GUIDANCE = [
@@ -302,45 +341,6 @@ var MONOREPO_LAYOUT_SEED_BLOCK = [
302
341
  ""
303
342
  ].join("\n");
304
343
 
305
- // src/agent/types.ts
306
- var AGENT_RULE_SCOPE = {
307
- ALWAYS: "always",
308
- FILE_PATTERN: "file-pattern"
309
- };
310
- var AGENT_PLATFORM = {
311
- CURSOR: "cursor",
312
- CLAUDE: "claude",
313
- CODEX: "codex",
314
- COPILOT: "copilot"
315
- };
316
- var CLAUDE_RULE_TARGET = {
317
- SCOPED_FILE: "scoped-file",
318
- AGENTS_MD: "agents-md",
319
- CLAUDE_MD: "claude-md"
320
- };
321
- var AGENT_MODEL = {
322
- INHERIT: "inherit",
323
- FAST: "fast",
324
- BALANCED: "balanced",
325
- POWERFUL: "powerful"
326
- };
327
- function resolveModelAlias(model) {
328
- if (!model || model === AGENT_MODEL.INHERIT) {
329
- return void 0;
330
- }
331
- const mapping = {
332
- [AGENT_MODEL.POWERFUL]: "opus",
333
- [AGENT_MODEL.BALANCED]: "sonnet",
334
- [AGENT_MODEL.FAST]: "haiku"
335
- };
336
- return mapping[model] ?? model;
337
- }
338
- var MCP_TRANSPORT = {
339
- STDIO: "stdio",
340
- HTTP: "http",
341
- SSE: "sse"
342
- };
343
-
344
344
  // src/agent/bundles/agenda.ts
345
345
  var agendaAnalystSubAgent = {
346
346
  name: "agenda-analyst",
@@ -3361,6 +3361,7 @@ function buildBaseBundle(paths = DEFAULT_AGENT_PATHS) {
3361
3361
  "- **After modifying Projen configuration**, run the three-step regen sequence: `pnpm i`, then `pnpm exec projen`, then `pnpm i` again. The leading `pnpm i` syncs `node_modules` with the lockfile so synth runs against the right configulator/projen/plugin versions; the trailing `pnpm i` refreshes the lockfile to match anything projen rewrote in `package.json`.",
3362
3362
  "- **Configure dependencies through Projen** \u2014 never use `npm install`, `pnpm add`, or `yarn add`. Add them to `deps` or `devDeps` in Projen config.",
3363
3363
  "- **Export from index.ts** to maintain clean public APIs",
3364
+ '- **`defaultMode: "dontAsk"` is configulator\'s hardcoded default** for the rendered Claude Code `settings.json`. Scheduled-task workers (issue-worker, orchestrator, pr-reviewer, and the analyst/writer family) run autonomously and would deadlock on confirmation prompts, so the synthesised default suppresses them. Override only after revisiting the autonomous-worker contract end-to-end; the override path is `claudeSettings.defaultMode` on `AgentConfigOptions`.',
3364
3365
  "",
3365
3366
  "## Repository Layout",
3366
3367
  "",
@@ -5836,11 +5837,11 @@ function buildBusinessModelsBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults =
5836
5837
  var businessModelsBundle = buildBusinessModelsBundle();
5837
5838
 
5838
5839
  // src/agent/bundles/company-profile.ts
5839
- function buildCompanyProfileAnalystSubAgent(paths, issueDefaults) {
5840
+ function buildCompanyProfileAnalystSubAgent(paths, issueDefaults, tier) {
5840
5841
  return {
5841
5842
  name: "company-profile-analyst",
5842
5843
  description: "Researches an external company (competitor, vendor, partner, customer, etc.) from public sources and produces a structured markdown profile, then enqueues downstream `people:research` and `software:research` issues for notable people and software products surfaced during profiling. Also handles profile enrichment against business-model canvases (`company:match`), maintenance refreshes on a configurable staleness cadence (`company:refresh`), and cross-profile competitive synthesis for a segment (`company:analyze`). One company or segment per session, tracked by company:* GitHub issue labels.",
5843
- model: AGENT_MODEL.POWERFUL,
5844
+ model: tier,
5844
5845
  maxTurns: 80,
5845
5846
  platforms: { cursor: { exclude: true } },
5846
5847
  prompt: [
@@ -7027,7 +7028,7 @@ function buildAnalyzeSegmentSkill(paths, issueDefaults) {
7027
7028
  ].join("\n")
7028
7029
  };
7029
7030
  }
7030
- function buildCompanyProfileBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAULT_RESOLVED_ISSUE_DEFAULTS) {
7031
+ function buildCompanyProfileBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAULT_RESOLVED_ISSUE_DEFAULTS, tier = AGENT_MODEL.BALANCED) {
7031
7032
  return {
7032
7033
  name: "company-profile",
7033
7034
  description: "Company research and profiling pipeline: research, draft profile, followup, match, refresh, analyze. Enabled by default; domain-neutral; filesystem-durable between phases. Phase 3 (Followup) hands surfaced people and software products off to the `people-profile` and `software-profile` bundles via `people:research` and `software:research` issues. Phase 4 (Match) enriches profiles against business-model canvases. Phase 5 (Refresh) re-verifies profiles on a configurable staleness cadence. Phase 6 (Analyze) synthesizes profiles in a segment into a competitive-analysis document.",
@@ -7085,7 +7086,7 @@ function buildCompanyProfileBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults =
7085
7086
  buildRefreshCompanySkill(paths, issueDefaults),
7086
7087
  buildAnalyzeSegmentSkill(paths, issueDefaults)
7087
7088
  ],
7088
- subAgents: [buildCompanyProfileAnalystSubAgent(paths, issueDefaults)],
7089
+ subAgents: [buildCompanyProfileAnalystSubAgent(paths, issueDefaults, tier)],
7089
7090
  labels: [
7090
7091
  {
7091
7092
  name: "type:company-profile",
@@ -7265,11 +7266,11 @@ var CUSTOMER_PROFILE_REFERENCE_FILES = [
7265
7266
  content: TEMPLATE_CUSTOMER_PROFILE
7266
7267
  }
7267
7268
  ];
7268
- function buildCustomerProfileAnalystSubAgent(paths, issueDefaults) {
7269
+ function buildCustomerProfileAnalystSubAgent(paths, issueDefaults, tier) {
7269
7270
  return {
7270
7271
  name: "customer-profile-analyst",
7271
7272
  description: "Authors customer-archetype research through a 3-phase pipeline (discover \u2192 profile \u2192 competitors). Segments customer archetypes, profiles each archetype's goals, jobs-to-be-done, constraints, and buying process, then maps competitor features (from the shared software-profile feature matrix) to each archetype's needs and hands off unmet-need gaps to the requirements-analyst as req:scan seeds. One phase per session, tracked by customer:* GitHub issue labels with filesystem-based durability between phases.",
7272
- model: AGENT_MODEL.POWERFUL,
7273
+ model: tier,
7273
7274
  maxTurns: 80,
7274
7275
  platforms: { cursor: { exclude: true } },
7275
7276
  prompt: [
@@ -8094,7 +8095,7 @@ function buildAnalyzeCustomerCompetitorsSkill(paths, issueDefaults) {
8094
8095
  ].join("\n")
8095
8096
  };
8096
8097
  }
8097
- function buildCustomerProfileBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAULT_RESOLVED_ISSUE_DEFAULTS) {
8098
+ function buildCustomerProfileBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAULT_RESOLVED_ISSUE_DEFAULTS, tier = AGENT_MODEL.BALANCED) {
8098
8099
  return {
8099
8100
  name: "customer-profile",
8100
8101
  description: "Customer-archetype research pipeline: discover, profile, competitors. 3 phases with customer:* phase labels. Segments customer archetypes, profiles each archetype's goals, jobs-to-be-done, constraints, and buying process, then maps competitor features (from the shared software-profile feature matrix) to each archetype's needs and hands off unmet-need gaps to the requirements-analyst bundle as req:scan seeds. Enabled by default; domain-neutral; customer-centric (distinct from company-profile); filesystem-durable between phases.",
@@ -8169,7 +8170,9 @@ function buildCustomerProfileBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults =
8169
8170
  buildProfileCustomerSkill(paths, issueDefaults),
8170
8171
  buildAnalyzeCustomerCompetitorsSkill(paths, issueDefaults)
8171
8172
  ],
8172
- subAgents: [buildCustomerProfileAnalystSubAgent(paths, issueDefaults)],
8173
+ subAgents: [
8174
+ buildCustomerProfileAnalystSubAgent(paths, issueDefaults, tier)
8175
+ ],
8173
8176
  labels: [
8174
8177
  {
8175
8178
  name: "type:customer-profile",
@@ -9952,11 +9955,11 @@ var jestBundle = {
9952
9955
  };
9953
9956
 
9954
9957
  // src/agent/bundles/maintenance-audit.ts
9955
- function buildMaintenanceAuditSubAgent(paths) {
9958
+ function buildMaintenanceAuditSubAgent(paths, tier) {
9956
9959
  return {
9957
9960
  name: "maintenance-audit",
9958
9961
  description: "Audits documentation registries and cross-references for integrity (broken links, registry drift, stale indexes), applies idempotent fixes, then re-runs the checks to confirm the fixes cleared the reported findings. One phase per session, tracked by maint:* GitHub issue labels with filesystem-based durability between phases.",
9959
- model: AGENT_MODEL.POWERFUL,
9962
+ model: tier,
9960
9963
  maxTurns: 80,
9961
9964
  platforms: { cursor: { exclude: true } },
9962
9965
  prompt: [
@@ -10590,7 +10593,7 @@ function buildMaintenanceVerifySkill(issueDefaults) {
10590
10593
  ].join("\n")
10591
10594
  };
10592
10595
  }
10593
- function buildMaintenanceAuditBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAULT_RESOLVED_ISSUE_DEFAULTS) {
10596
+ function buildMaintenanceAuditBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAULT_RESOLVED_ISSUE_DEFAULTS, tier = AGENT_MODEL.BALANCED) {
10594
10597
  return {
10595
10598
  name: "maintenance-audit",
10596
10599
  description: "Documentation-maintenance agent bundle. 3-phase pipeline (scan, fix, verify) with maint:* phase labels for auditing registries and cross-references, applying idempotent fixes, and confirming the fixes cleared the originally-flagged findings. Enabled by default.",
@@ -10637,7 +10640,7 @@ function buildMaintenanceAuditBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults
10637
10640
  buildMaintenanceAuditSkill(paths, issueDefaults),
10638
10641
  buildMaintenanceVerifySkill(issueDefaults)
10639
10642
  ],
10640
- subAgents: [buildMaintenanceAuditSubAgent(paths)],
10643
+ subAgents: [buildMaintenanceAuditSubAgent(paths, tier)],
10641
10644
  labels: [
10642
10645
  {
10643
10646
  name: "type:maintenance",
@@ -10665,351 +10668,353 @@ function buildMaintenanceAuditBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults
10665
10668
  var maintenanceAuditBundle = buildMaintenanceAuditBundle();
10666
10669
 
10667
10670
  // src/agent/bundles/meeting-analysis.ts
10668
- var meetingAnalystSubAgent = {
10669
- name: "meeting-analyst",
10670
- description: "Processes meeting transcripts through a 4-phase pipeline: extract, notes, draft, and link",
10671
- model: AGENT_MODEL.POWERFUL,
10672
- maxTurns: 80,
10673
- platforms: { cursor: { exclude: true } },
10674
- prompt: [
10675
- "# Meeting Analyst Agent",
10676
- "",
10677
- "You process meeting transcripts through a structured 4-phase pipeline.",
10678
- "Each phase runs as a **separate agent session**, triggered by its own",
10679
- "GitHub issue with a `meeting:*` phase label. You handle exactly **one",
10680
- "phase per session** \u2014 read the issue to determine which phase to execute.",
10681
- "",
10682
- "## Execution Model",
10683
- "",
10684
- "1. Each meeting produces up to 4 GitHub issues (one per phase)",
10685
- "2. Each issue carries a `meeting:*` label identifying the phase",
10686
- "3. You pick up one issue, execute that phase, commit/push, then close the issue",
10687
- "4. Phase 1 (Extract) creates the downstream phase issues for phases 2-4",
10688
- "5. Each downstream issue includes `Depends on: #N` linking to its predecessor",
10689
- "",
10690
- "## Design Principles",
10691
- "",
10692
- "1. **Extract, don't interpret.** Capture what was said and decided. Flag",
10693
- " ambiguity as open items rather than resolving it.",
10694
- "2. **Route to the right category.** Meeting content maps to requirements,",
10695
- " ADRs, product docs, and business strategy. Each output goes to the",
10696
- " correct location per the project's taxonomy.",
10697
- "3. **Preserve provenance.** Every extracted item links back to the meeting",
10698
- " source so reviewers can check context.",
10699
- "4. **Create issues, not documents.** For requirements and ADRs, create",
10700
- " GitHub issues that other agents or humans will pick up. Do not write",
10701
- " final requirement documents yourself.",
10702
- "5. **Bi-directional traceability.** Every document and issue created by",
10703
- " this pipeline must link back to the meeting source, and the meeting",
10704
- " source documents must link forward to everything created from them.",
10705
- "6. **Respect meeting type and areas.** Read the `meeting_type` and",
10706
- " `areas` values from the meeting frontmatter before starting Phase 1.",
10707
- " Apply the type-specific rules from the **Meeting type handling**",
10708
- " table (phases 1\u20132) and the area-filtered routing rules from the",
10709
- " **Areas filtering** table (phase 4).",
10710
- "",
10711
- "---",
10712
- "",
10713
- "## Meeting type handling",
10714
- "",
10715
- "Meeting frontmatter is expected to carry a `meeting_type` field whose",
10716
- "value is one of the project's concrete meeting-type `id`s (declared",
10717
- "via `AgentConfigOptions.meetings.meetingTypes`). Each concrete `id`",
10718
- "maps to one of six generic **meeting kinds** that drive type-specific",
10719
- "extraction rules:",
10720
- "",
10721
- "| Kind | Primary outputs | Phase-1/2 rules |",
10722
- "|------|-----------------|-----------------|",
10723
- "| `planning` | Sprint/plan updates, task issues, requirement drafts | Extract every task assignment. Phase 4 updates the active sprint-plan doc directly and creates one issue per assigned task. |",
10724
- "| `review` | Retro notes, follow-up issues, status updates, requirement revisions | Mark completed tasks in the active sprint-plan doc. Capture retrospective learnings inside the meeting notes \u2014 do not spawn a separate retro document. |",
10725
- "| `brainstorm` | Future-feature candidates, research topics, very few Firm decisions | Lower the bar for Open Questions. Do **not** create requirement or ADR issues from brainstorm output unless the item is explicitly marked **Firm**. Prefer research/discovery issues for promising ideas. |",
10726
- "| `standup` | Action items, blockers, status updates | Do not produce requirement, ADR, or BDR drafts. Phase 3 (Draft) is almost always skipped. Focus on action-item issues and sprint-plan status updates. |",
10727
- "| `external` | Customer/competitive intel, people/company profiles, lead capture | Default every attendee outside the team into **People of Interest**. Default every organization mentioned into **Companies of Interest** (signal threshold still applies). Capture stated customer pain points as candidate **BR** (business requirements), not FR. |",
10728
- "| `other` | General meeting extraction | Apply the default workflow with no type-specific overrides. |",
10729
- "",
10730
- "**How to resolve the kind:**",
10731
- "",
10732
- "1. Read `meeting_type` from the frontmatter.",
10733
- "2. Look up the matching `id` in the project's **Recognized meeting",
10734
- " types** table (rendered below when `meetingTypes` is declared).",
10735
- "3. Use the `Kind` column value. If the table is absent, the `id` is",
10736
- " unknown, or the `Kind` column is `\u2014`, fall back to `other`.",
10737
- "4. Apply the rules in the row above **in addition to** the normal",
10738
- " phase workflow \u2014 never as a replacement.",
10739
- "",
10740
- "If `meeting_type` is missing, invalid, or the declared `id` is not in",
10741
- "the project's table, note it in the extraction's Open Questions and",
10742
- "proceed with the default workflow (treat as `other`).",
10743
- "",
10744
- "## Areas filtering",
10745
- "",
10746
- "Meeting frontmatter may carry an `areas: [...]` list whose values",
10747
- "match `id`s from the project's **Area \u2192 doc-root mapping** table",
10748
- "(declared via `AgentConfigOptions.meetings.meetingAreas`). The list",
10749
- "scopes phase-4 direct edits and cross-references to the doc-root",
10750
- "sub-folders registered for those areas. A given area's effective",
10751
- "path resolves as `<docsRoot>/<docRoot>` \u2014 `docsRoot` comes from",
10752
- "`AgentPathsConfig.docsRoot`; `docRoot` is the sub-folder shown in",
10753
- "the **Area \u2192 doc-root mapping** table.",
10754
- "",
10755
- "**Gating contract (phase 4 only):**",
10756
- "",
10757
- "- **Scoped in:** direct edits and cross-reference stubs under the",
10758
- " `docRoot` of every `id` present in the meeting's `areas` list.",
10759
- "- **Scoped out:** direct edits to any doc-root sub-folder that is",
10760
- " declared in the project's area map but whose `id` is **not** in",
10761
- " the meeting's `areas`. For those out-of-scope areas, create",
10762
- " follow-up issues instead of editing the doc directly.",
10763
- "- **Not gated:** issue creation (requirements, ADRs, profiles,",
10764
- " research) is always in scope regardless of areas.",
10765
- "",
10766
- "**Resolution rules:**",
10767
- "",
10768
- "1. If the meeting's `areas` frontmatter is missing or empty **and**",
10769
- " the project has declared a non-empty `meetingAreas` map, no",
10770
- " doc-root sub-folder is gated in: direct edits to any declared",
10771
- " `docRoot` sub-folder are out-of-scope and become follow-up issues",
10772
- " per step 6. Only the default meetings root (`meetingsRoot`)",
10773
- " remains editable.",
10774
- "2. If `areas` lists an `id` that is not in the project's area map,",
10775
- " note it in the extraction's Open Questions and treat the unknown",
10776
- " `id` as absent. Do **not** invent a doc-root path for it.",
10777
- "3. Out-of-scope direct edits become `type:docs` follow-up issues on",
10778
- " phase 4 step 6, with the area noted in the issue body.",
10779
- "",
10780
- "When the project has **not** declared any `meetingAreas` at all,",
10781
- "this section applies degenerately \u2014 no areas are gated, no",
10782
- "follow-up issues are synthesized for missing areas, and phase-4",
10783
- "direct edits follow the default workflow (step 6 edits any doc",
10784
- "flagged as Firm, unrestricted by `docRoot`).",
10785
- "",
10786
- "---",
10787
- "",
10788
- ...PROJECT_CONTEXT_MAINTAINER_SECTION,
10789
- "## Traceability",
10790
- "",
10791
- "All outputs must be bi-directionally linked so any artifact can be traced",
10792
- "back to the meeting that produced it and forward to everything it spawned.",
10793
- "",
10794
- "### Backward links (created artifact \u2192 meeting source)",
10795
- "",
10796
- "Every GitHub issue and document created by this pipeline must include a",
10797
- "`## Traceability` section with:",
10798
- "",
10799
- "```markdown",
10800
- "## Traceability",
10801
- "",
10802
- "- **Source meeting:** <path to transcript or meeting notes>",
10803
- "- **Extraction:** <path to extraction file>",
10804
- "- **Phase issue:** #<N> (the phase issue that created this artifact)",
10805
- "```",
10806
- "",
10807
- "### Forward links (meeting source \u2192 created artifacts)",
10808
- "",
10809
- "After Phase 4 (Link) creates all follow-up issues and documents:",
10810
- "",
10811
- "1. **Update the extraction file** with a `## Downstream Artifacts` section",
10812
- " listing every issue and document created from this meeting:",
10813
- "",
10814
- " ```markdown",
10815
- " ## Downstream Artifacts",
10816
- "",
10817
- " | Artifact | Type | Issue/Path |",
10818
- " |----------|------|------------|",
10819
- " | <title> | requirement / ADR / action-item / profile | #<N> or <path> |",
10820
- " ```",
10821
- "",
10822
- "2. **Update the meeting notes** with a similar `## Related Issues` section",
10823
- " listing all issues created from this meeting.",
10824
- "",
10825
- "3. **Comment on the extract issue** with a summary linking to all created",
10826
- " artifacts.",
10827
- "",
10828
- "### Within-pipeline links",
10829
- "",
10830
- "- Phase issues link to predecessors via `Depends on: #N`",
10831
- "- Phase issues reference the extraction file path in their body",
10832
- "- Draft documents reference both the extraction and the meeting notes",
10833
- "",
10834
- "---",
10835
- "",
10836
- "## Phase 1: Extract (`meeting:extract`)",
10837
- "",
10838
- "**Goal:** Read the meeting transcript and categorize all substantive content.",
10839
- "",
10840
- "### Steps",
10841
- "",
10842
- "1. Read the transcript file specified in the issue body. Parse the",
10843
- " meeting-note frontmatter first, capturing `meeting_type` and",
10844
- " `areas`. Resolve `meeting_type` to a kind using the **Meeting type",
10845
- " handling** table; note the resolved kind in the extraction",
10846
- " frontmatter. If `meeting_type` is missing or not in the project's",
10847
- " Recognized meeting types table, treat it as `other` and flag it",
10848
- " in Open Questions.",
10849
- "2. Identify and categorize content into these buckets:",
10850
- "",
10851
- " | Bucket | What to look for |",
10852
- " |--------|-----------------|",
10853
- ` | **Decisions** | "We decided...", "Let's go with...", explicit choices |`,
10854
- ' | **Requirements** | Feature descriptions, acceptance criteria, "it should..." |',
10855
- " | **Technology discussions** | Platform comparisons, architecture options, tool evaluations |",
10856
- ' | **Action items** | "[Person] will...", "Next step is...", assigned tasks |',
10857
- ' | **Open questions** | "We need to figure out...", unresolved debates |',
10858
- " | **People of interest** | Industry contacts, domain experts mentioned |",
10859
- " | **Companies of interest** | Competitors, vendors, partners discussed |",
10860
- " | **Strategic direction** | Business model changes, market positioning |",
10861
- " | **Product direction** | Roadmap changes, feature prioritization |",
10862
- "",
10863
- "3. Write the extraction to a markdown file with structured sections:",
10864
- " - Attendees",
10865
- " - Decisions Made (with category and confidence: Firm / Tentative / Needs confirmation)",
10866
- " - Requirements Identified (with category and priority estimate)",
10867
- " - Technology Discussions (with status: Decided / Leaning toward / Open)",
10868
- " - Action Items (with assignee and due date if stated)",
10869
- " - Open Questions",
10870
- " - People of Interest (with context and whether a profile exists)",
10871
- " - Companies of Interest (with type and context)",
10872
- " - Strategic / Product Direction",
10873
- "",
10874
- " Carry `meeting_type`, the resolved `meeting_kind`, and `areas`",
10875
- " into the extraction frontmatter so downstream phases can gate",
10876
- " behaviour without re-parsing the meeting note.",
10877
- "",
10878
- "4. **Apply type-specific rules.** Consult the **Meeting type handling**",
10879
- " table for the resolved kind and apply its phase-1 rules in",
10880
- " addition to the default extraction above. Examples:",
10881
- " - `standup`: skip requirement, ADR, and BDR extraction; focus on",
10882
- " action items and status.",
10883
- " - `brainstorm`: emphasize Open Questions and Future Features.",
10884
- " Only mark decisions as Firm when the transcript is unambiguous.",
10885
- " - `external`: default attendees outside the team into People of",
10886
- " Interest; default organizations mentioned into Companies of",
10887
- " Interest (signal threshold still applies); capture customer",
10888
- " pain points as candidate BR (not FR).",
10889
- "",
10890
- "5. **Create downstream phase issues** using `gh issue create`:",
10891
- " - Always create a `meeting:notes` issue (blocked on this extract issue)",
10892
- " - If requirements OR decisions/ADRs identified, create a `meeting:draft` issue",
10893
- " (blocked on the notes issue). For kind `standup`, skip the",
10894
- " `meeting:draft` issue \u2014 standup meetings almost never produce",
10895
- " formal drafts.",
10896
- " - Always create a `meeting:link` issue \u2014 blocked on the draft issue if one",
10897
- " was created, otherwise blocked on the notes issue",
10898
- "",
10899
- "6. Commit, push, and close the extract issue.",
10900
- "",
10901
- "---",
10902
- "",
10903
- "## Phase 2: Notes (`meeting:notes`)",
10904
- "",
10905
- "**Goal:** Transform the extraction into structured meeting notes.",
10906
- "",
10907
- "### Steps",
10908
- "",
10909
- "1. Read the extraction file referenced in the issue body (output of Phase 1).",
10910
- "2. Write structured meeting notes with these sections:",
10911
- " - Meeting metadata (title, date, attendees)",
10912
- " - Agenda / topics covered",
10913
- " - Key Discussion Points (organized by topic)",
10914
- " - Decisions (numbered, with rationale)",
10915
- " - Action Items (table: who, what, when)",
10916
- " - Open Questions",
10917
- " - Follow-up items",
10918
- "3. Commit, push, and close the notes issue.",
10919
- "",
10920
- "---",
10921
- "",
10922
- "## Phase 3: Draft (`meeting:draft`)",
10923
- "",
10924
- "**Goal:** Draft proposals for requirements, ADRs, and product/strategy updates.",
10925
- "",
10926
- "This phase only exists if the extraction identified requirements, architectural",
10927
- "decisions, or strategy changes. If this issue exists, execute it.",
10928
- "",
10929
- "### Steps",
10930
- "",
10931
- "1. Read the extraction file from Phase 1.",
10932
- "2. Check existing requirement registries and ADR registries for duplicates.",
10933
- "3. Draft requirement proposals with:",
10934
- " - Category (FR, BR, NFR, etc.)",
10935
- " - Summary (2-3 sentences)",
10936
- " - Draft acceptance criteria",
10937
- " - Related existing requirements",
10938
- "4. Draft ADR proposals for technology decisions with:",
10939
- " - Context and problem statement",
10940
- " - Options discussed",
10941
- " - Stated preferences or decisions",
10942
- " - Status: Proposed or Decided",
10943
- "5. Summarize product/strategy document updates needed.",
10944
- "6. Commit, push, and close the draft issue.",
10945
- "",
10946
- "---",
10947
- "",
10948
- "## Phase 4: Link (`meeting:link`)",
10949
- "",
10950
- "**Goal:** Create GitHub issues for follow-up work, cross-reference the",
10951
- "meeting into existing documentation, and complete bi-directional traceability.",
10952
- "",
10953
- "### Steps",
10954
- "",
10955
- "1. Read the drafts from Phase 3 (if they exist) and the extraction from Phase 1.",
10956
- " Re-read the extraction frontmatter for `meeting_kind` and `areas`,",
10957
- " then build the area-gate: the set of `docRoot` sub-folders that",
10958
- " are in scope for direct edits on this meeting. Apply the rules in",
10959
- " the **Areas filtering** section above.",
10960
- "2. Create requirement issues using `gh issue create` with appropriate labels.",
10961
- " Include a `## Traceability` section in each issue body linking back to",
10962
- " the source meeting and extraction file. Issue creation is **not**",
10963
- " gated by areas.",
10964
- "3. Create ADR issues if technology decisions need formal records.",
10965
- " Include a `## Traceability` section in each. Not gated by areas.",
10966
- "4. Create action item issues for tasks that are not document-related.",
10967
- " Include a `## Traceability` section in each. Not gated by areas.",
10968
- "5. Cross-reference the meeting in any existing documents that were",
10969
- " discussed **and that live under an in-scope `docRoot`**. For",
10970
- " discussed documents under an out-of-scope `docRoot`, open a",
10971
- " follow-up `type:docs` issue instead of editing the doc directly.",
10972
- "6. Apply direct product/strategy doc updates for items flagged as",
10973
- " **Firm** confidence. When the project declares `meetingAreas`,",
10974
- " gate these edits: only apply them when the target path lies",
10975
- " under an in-scope `docRoot`, and for Firm items targeting an",
10976
- " out-of-scope `docRoot` open a follow-up `type:docs` issue",
10977
- " noting the area and the target path. When the project has not",
10978
- " declared any `meetingAreas`, apply Firm updates unrestricted",
10979
- " (the degenerate case above). For the kind `planning`, also",
10980
- " update the active sprint-plan doc directly (when the",
10981
- " sprint-plan doc's area is in-scope, or always when no",
10982
- " `meetingAreas` are declared); for the kind `review`, mark",
10983
- " completed tasks in that same doc.",
10984
- "7. **Update the extraction file** with a `## Downstream Artifacts` section",
10985
- " listing every issue and document created from this meeting. Note",
10986
- " any items that were deferred to follow-up issues because of the",
10987
- " area gate.",
10988
- "8. **Update the meeting notes** with a `## Related Issues` section listing",
10989
- " all issues created from this meeting.",
10990
- "9. Comment on the parent extract issue with a summary linking to all",
10991
- " created artifacts.",
10992
- "10. Commit and push (if any file changes were made), then close the link issue.",
10993
- "",
10994
- "---",
10995
- "",
10996
- "## GitHub Integration",
10997
- "",
10998
- "- Use `gh` CLI for all GitHub operations",
10999
- "- Apply the appropriate `meeting:*` phase label to each phase issue",
11000
- "- Use `type:docs` for documentation-producing issues, `type:chore` for",
11001
- " maintenance/organizational tasks",
11002
- "- Use `status:` labels to track progress (`status:ready`, `status:in-progress`, `status:done`)",
11003
- "- Reference the source meeting transcript in all created issues",
11004
- "- Link phase issues with `Depends on: #N` to enforce ordering",
11005
- "",
11006
- "## When to Shorten the Pipeline",
11007
- "",
11008
- "- **Short meetings** (<30 min, <2000 words): combine extract + notes into one session",
11009
- "- **No requirements or decisions**: Phase 1 skips creating the `meeting:draft` issue",
11010
- "- **Only action items**: extract + notes + link (3 phase issues)"
11011
- ].join("\n")
11012
- };
10671
+ function buildMeetingAnalystSubAgent(tier) {
10672
+ return {
10673
+ name: "meeting-analyst",
10674
+ description: "Processes meeting transcripts through a 4-phase pipeline: extract, notes, draft, and link",
10675
+ model: tier,
10676
+ maxTurns: 80,
10677
+ platforms: { cursor: { exclude: true } },
10678
+ prompt: [
10679
+ "# Meeting Analyst Agent",
10680
+ "",
10681
+ "You process meeting transcripts through a structured 4-phase pipeline.",
10682
+ "Each phase runs as a **separate agent session**, triggered by its own",
10683
+ "GitHub issue with a `meeting:*` phase label. You handle exactly **one",
10684
+ "phase per session** \u2014 read the issue to determine which phase to execute.",
10685
+ "",
10686
+ "## Execution Model",
10687
+ "",
10688
+ "1. Each meeting produces up to 4 GitHub issues (one per phase)",
10689
+ "2. Each issue carries a `meeting:*` label identifying the phase",
10690
+ "3. You pick up one issue, execute that phase, commit/push, then close the issue",
10691
+ "4. Phase 1 (Extract) creates the downstream phase issues for phases 2-4",
10692
+ "5. Each downstream issue includes `Depends on: #N` linking to its predecessor",
10693
+ "",
10694
+ "## Design Principles",
10695
+ "",
10696
+ "1. **Extract, don't interpret.** Capture what was said and decided. Flag",
10697
+ " ambiguity as open items rather than resolving it.",
10698
+ "2. **Route to the right category.** Meeting content maps to requirements,",
10699
+ " ADRs, product docs, and business strategy. Each output goes to the",
10700
+ " correct location per the project's taxonomy.",
10701
+ "3. **Preserve provenance.** Every extracted item links back to the meeting",
10702
+ " source so reviewers can check context.",
10703
+ "4. **Create issues, not documents.** For requirements and ADRs, create",
10704
+ " GitHub issues that other agents or humans will pick up. Do not write",
10705
+ " final requirement documents yourself.",
10706
+ "5. **Bi-directional traceability.** Every document and issue created by",
10707
+ " this pipeline must link back to the meeting source, and the meeting",
10708
+ " source documents must link forward to everything created from them.",
10709
+ "6. **Respect meeting type and areas.** Read the `meeting_type` and",
10710
+ " `areas` values from the meeting frontmatter before starting Phase 1.",
10711
+ " Apply the type-specific rules from the **Meeting type handling**",
10712
+ " table (phases 1\u20132) and the area-filtered routing rules from the",
10713
+ " **Areas filtering** table (phase 4).",
10714
+ "",
10715
+ "---",
10716
+ "",
10717
+ "## Meeting type handling",
10718
+ "",
10719
+ "Meeting frontmatter is expected to carry a `meeting_type` field whose",
10720
+ "value is one of the project's concrete meeting-type `id`s (declared",
10721
+ "via `AgentConfigOptions.meetings.meetingTypes`). Each concrete `id`",
10722
+ "maps to one of six generic **meeting kinds** that drive type-specific",
10723
+ "extraction rules:",
10724
+ "",
10725
+ "| Kind | Primary outputs | Phase-1/2 rules |",
10726
+ "|------|-----------------|-----------------|",
10727
+ "| `planning` | Sprint/plan updates, task issues, requirement drafts | Extract every task assignment. Phase 4 updates the active sprint-plan doc directly and creates one issue per assigned task. |",
10728
+ "| `review` | Retro notes, follow-up issues, status updates, requirement revisions | Mark completed tasks in the active sprint-plan doc. Capture retrospective learnings inside the meeting notes \u2014 do not spawn a separate retro document. |",
10729
+ "| `brainstorm` | Future-feature candidates, research topics, very few Firm decisions | Lower the bar for Open Questions. Do **not** create requirement or ADR issues from brainstorm output unless the item is explicitly marked **Firm**. Prefer research/discovery issues for promising ideas. |",
10730
+ "| `standup` | Action items, blockers, status updates | Do not produce requirement, ADR, or BDR drafts. Phase 3 (Draft) is almost always skipped. Focus on action-item issues and sprint-plan status updates. |",
10731
+ "| `external` | Customer/competitive intel, people/company profiles, lead capture | Default every attendee outside the team into **People of Interest**. Default every organization mentioned into **Companies of Interest** (signal threshold still applies). Capture stated customer pain points as candidate **BR** (business requirements), not FR. |",
10732
+ "| `other` | General meeting extraction | Apply the default workflow with no type-specific overrides. |",
10733
+ "",
10734
+ "**How to resolve the kind:**",
10735
+ "",
10736
+ "1. Read `meeting_type` from the frontmatter.",
10737
+ "2. Look up the matching `id` in the project's **Recognized meeting",
10738
+ " types** table (rendered below when `meetingTypes` is declared).",
10739
+ "3. Use the `Kind` column value. If the table is absent, the `id` is",
10740
+ " unknown, or the `Kind` column is `\u2014`, fall back to `other`.",
10741
+ "4. Apply the rules in the row above **in addition to** the normal",
10742
+ " phase workflow \u2014 never as a replacement.",
10743
+ "",
10744
+ "If `meeting_type` is missing, invalid, or the declared `id` is not in",
10745
+ "the project's table, note it in the extraction's Open Questions and",
10746
+ "proceed with the default workflow (treat as `other`).",
10747
+ "",
10748
+ "## Areas filtering",
10749
+ "",
10750
+ "Meeting frontmatter may carry an `areas: [...]` list whose values",
10751
+ "match `id`s from the project's **Area \u2192 doc-root mapping** table",
10752
+ "(declared via `AgentConfigOptions.meetings.meetingAreas`). The list",
10753
+ "scopes phase-4 direct edits and cross-references to the doc-root",
10754
+ "sub-folders registered for those areas. A given area's effective",
10755
+ "path resolves as `<docsRoot>/<docRoot>` \u2014 `docsRoot` comes from",
10756
+ "`AgentPathsConfig.docsRoot`; `docRoot` is the sub-folder shown in",
10757
+ "the **Area \u2192 doc-root mapping** table.",
10758
+ "",
10759
+ "**Gating contract (phase 4 only):**",
10760
+ "",
10761
+ "- **Scoped in:** direct edits and cross-reference stubs under the",
10762
+ " `docRoot` of every `id` present in the meeting's `areas` list.",
10763
+ "- **Scoped out:** direct edits to any doc-root sub-folder that is",
10764
+ " declared in the project's area map but whose `id` is **not** in",
10765
+ " the meeting's `areas`. For those out-of-scope areas, create",
10766
+ " follow-up issues instead of editing the doc directly.",
10767
+ "- **Not gated:** issue creation (requirements, ADRs, profiles,",
10768
+ " research) is always in scope regardless of areas.",
10769
+ "",
10770
+ "**Resolution rules:**",
10771
+ "",
10772
+ "1. If the meeting's `areas` frontmatter is missing or empty **and**",
10773
+ " the project has declared a non-empty `meetingAreas` map, no",
10774
+ " doc-root sub-folder is gated in: direct edits to any declared",
10775
+ " `docRoot` sub-folder are out-of-scope and become follow-up issues",
10776
+ " per step 6. Only the default meetings root (`meetingsRoot`)",
10777
+ " remains editable.",
10778
+ "2. If `areas` lists an `id` that is not in the project's area map,",
10779
+ " note it in the extraction's Open Questions and treat the unknown",
10780
+ " `id` as absent. Do **not** invent a doc-root path for it.",
10781
+ "3. Out-of-scope direct edits become `type:docs` follow-up issues on",
10782
+ " phase 4 step 6, with the area noted in the issue body.",
10783
+ "",
10784
+ "When the project has **not** declared any `meetingAreas` at all,",
10785
+ "this section applies degenerately \u2014 no areas are gated, no",
10786
+ "follow-up issues are synthesized for missing areas, and phase-4",
10787
+ "direct edits follow the default workflow (step 6 edits any doc",
10788
+ "flagged as Firm, unrestricted by `docRoot`).",
10789
+ "",
10790
+ "---",
10791
+ "",
10792
+ ...PROJECT_CONTEXT_MAINTAINER_SECTION,
10793
+ "## Traceability",
10794
+ "",
10795
+ "All outputs must be bi-directionally linked so any artifact can be traced",
10796
+ "back to the meeting that produced it and forward to everything it spawned.",
10797
+ "",
10798
+ "### Backward links (created artifact \u2192 meeting source)",
10799
+ "",
10800
+ "Every GitHub issue and document created by this pipeline must include a",
10801
+ "`## Traceability` section with:",
10802
+ "",
10803
+ "```markdown",
10804
+ "## Traceability",
10805
+ "",
10806
+ "- **Source meeting:** <path to transcript or meeting notes>",
10807
+ "- **Extraction:** <path to extraction file>",
10808
+ "- **Phase issue:** #<N> (the phase issue that created this artifact)",
10809
+ "```",
10810
+ "",
10811
+ "### Forward links (meeting source \u2192 created artifacts)",
10812
+ "",
10813
+ "After Phase 4 (Link) creates all follow-up issues and documents:",
10814
+ "",
10815
+ "1. **Update the extraction file** with a `## Downstream Artifacts` section",
10816
+ " listing every issue and document created from this meeting:",
10817
+ "",
10818
+ " ```markdown",
10819
+ " ## Downstream Artifacts",
10820
+ "",
10821
+ " | Artifact | Type | Issue/Path |",
10822
+ " |----------|------|------------|",
10823
+ " | <title> | requirement / ADR / action-item / profile | #<N> or <path> |",
10824
+ " ```",
10825
+ "",
10826
+ "2. **Update the meeting notes** with a similar `## Related Issues` section",
10827
+ " listing all issues created from this meeting.",
10828
+ "",
10829
+ "3. **Comment on the extract issue** with a summary linking to all created",
10830
+ " artifacts.",
10831
+ "",
10832
+ "### Within-pipeline links",
10833
+ "",
10834
+ "- Phase issues link to predecessors via `Depends on: #N`",
10835
+ "- Phase issues reference the extraction file path in their body",
10836
+ "- Draft documents reference both the extraction and the meeting notes",
10837
+ "",
10838
+ "---",
10839
+ "",
10840
+ "## Phase 1: Extract (`meeting:extract`)",
10841
+ "",
10842
+ "**Goal:** Read the meeting transcript and categorize all substantive content.",
10843
+ "",
10844
+ "### Steps",
10845
+ "",
10846
+ "1. Read the transcript file specified in the issue body. Parse the",
10847
+ " meeting-note frontmatter first, capturing `meeting_type` and",
10848
+ " `areas`. Resolve `meeting_type` to a kind using the **Meeting type",
10849
+ " handling** table; note the resolved kind in the extraction",
10850
+ " frontmatter. If `meeting_type` is missing or not in the project's",
10851
+ " Recognized meeting types table, treat it as `other` and flag it",
10852
+ " in Open Questions.",
10853
+ "2. Identify and categorize content into these buckets:",
10854
+ "",
10855
+ " | Bucket | What to look for |",
10856
+ " |--------|-----------------|",
10857
+ ` | **Decisions** | "We decided...", "Let's go with...", explicit choices |`,
10858
+ ' | **Requirements** | Feature descriptions, acceptance criteria, "it should..." |',
10859
+ " | **Technology discussions** | Platform comparisons, architecture options, tool evaluations |",
10860
+ ' | **Action items** | "[Person] will...", "Next step is...", assigned tasks |',
10861
+ ' | **Open questions** | "We need to figure out...", unresolved debates |',
10862
+ " | **People of interest** | Industry contacts, domain experts mentioned |",
10863
+ " | **Companies of interest** | Competitors, vendors, partners discussed |",
10864
+ " | **Strategic direction** | Business model changes, market positioning |",
10865
+ " | **Product direction** | Roadmap changes, feature prioritization |",
10866
+ "",
10867
+ "3. Write the extraction to a markdown file with structured sections:",
10868
+ " - Attendees",
10869
+ " - Decisions Made (with category and confidence: Firm / Tentative / Needs confirmation)",
10870
+ " - Requirements Identified (with category and priority estimate)",
10871
+ " - Technology Discussions (with status: Decided / Leaning toward / Open)",
10872
+ " - Action Items (with assignee and due date if stated)",
10873
+ " - Open Questions",
10874
+ " - People of Interest (with context and whether a profile exists)",
10875
+ " - Companies of Interest (with type and context)",
10876
+ " - Strategic / Product Direction",
10877
+ "",
10878
+ " Carry `meeting_type`, the resolved `meeting_kind`, and `areas`",
10879
+ " into the extraction frontmatter so downstream phases can gate",
10880
+ " behaviour without re-parsing the meeting note.",
10881
+ "",
10882
+ "4. **Apply type-specific rules.** Consult the **Meeting type handling**",
10883
+ " table for the resolved kind and apply its phase-1 rules in",
10884
+ " addition to the default extraction above. Examples:",
10885
+ " - `standup`: skip requirement, ADR, and BDR extraction; focus on",
10886
+ " action items and status.",
10887
+ " - `brainstorm`: emphasize Open Questions and Future Features.",
10888
+ " Only mark decisions as Firm when the transcript is unambiguous.",
10889
+ " - `external`: default attendees outside the team into People of",
10890
+ " Interest; default organizations mentioned into Companies of",
10891
+ " Interest (signal threshold still applies); capture customer",
10892
+ " pain points as candidate BR (not FR).",
10893
+ "",
10894
+ "5. **Create downstream phase issues** using `gh issue create`:",
10895
+ " - Always create a `meeting:notes` issue (blocked on this extract issue)",
10896
+ " - If requirements OR decisions/ADRs identified, create a `meeting:draft` issue",
10897
+ " (blocked on the notes issue). For kind `standup`, skip the",
10898
+ " `meeting:draft` issue \u2014 standup meetings almost never produce",
10899
+ " formal drafts.",
10900
+ " - Always create a `meeting:link` issue \u2014 blocked on the draft issue if one",
10901
+ " was created, otherwise blocked on the notes issue",
10902
+ "",
10903
+ "6. Commit, push, and close the extract issue.",
10904
+ "",
10905
+ "---",
10906
+ "",
10907
+ "## Phase 2: Notes (`meeting:notes`)",
10908
+ "",
10909
+ "**Goal:** Transform the extraction into structured meeting notes.",
10910
+ "",
10911
+ "### Steps",
10912
+ "",
10913
+ "1. Read the extraction file referenced in the issue body (output of Phase 1).",
10914
+ "2. Write structured meeting notes with these sections:",
10915
+ " - Meeting metadata (title, date, attendees)",
10916
+ " - Agenda / topics covered",
10917
+ " - Key Discussion Points (organized by topic)",
10918
+ " - Decisions (numbered, with rationale)",
10919
+ " - Action Items (table: who, what, when)",
10920
+ " - Open Questions",
10921
+ " - Follow-up items",
10922
+ "3. Commit, push, and close the notes issue.",
10923
+ "",
10924
+ "---",
10925
+ "",
10926
+ "## Phase 3: Draft (`meeting:draft`)",
10927
+ "",
10928
+ "**Goal:** Draft proposals for requirements, ADRs, and product/strategy updates.",
10929
+ "",
10930
+ "This phase only exists if the extraction identified requirements, architectural",
10931
+ "decisions, or strategy changes. If this issue exists, execute it.",
10932
+ "",
10933
+ "### Steps",
10934
+ "",
10935
+ "1. Read the extraction file from Phase 1.",
10936
+ "2. Check existing requirement registries and ADR registries for duplicates.",
10937
+ "3. Draft requirement proposals with:",
10938
+ " - Category (FR, BR, NFR, etc.)",
10939
+ " - Summary (2-3 sentences)",
10940
+ " - Draft acceptance criteria",
10941
+ " - Related existing requirements",
10942
+ "4. Draft ADR proposals for technology decisions with:",
10943
+ " - Context and problem statement",
10944
+ " - Options discussed",
10945
+ " - Stated preferences or decisions",
10946
+ " - Status: Proposed or Decided",
10947
+ "5. Summarize product/strategy document updates needed.",
10948
+ "6. Commit, push, and close the draft issue.",
10949
+ "",
10950
+ "---",
10951
+ "",
10952
+ "## Phase 4: Link (`meeting:link`)",
10953
+ "",
10954
+ "**Goal:** Create GitHub issues for follow-up work, cross-reference the",
10955
+ "meeting into existing documentation, and complete bi-directional traceability.",
10956
+ "",
10957
+ "### Steps",
10958
+ "",
10959
+ "1. Read the drafts from Phase 3 (if they exist) and the extraction from Phase 1.",
10960
+ " Re-read the extraction frontmatter for `meeting_kind` and `areas`,",
10961
+ " then build the area-gate: the set of `docRoot` sub-folders that",
10962
+ " are in scope for direct edits on this meeting. Apply the rules in",
10963
+ " the **Areas filtering** section above.",
10964
+ "2. Create requirement issues using `gh issue create` with appropriate labels.",
10965
+ " Include a `## Traceability` section in each issue body linking back to",
10966
+ " the source meeting and extraction file. Issue creation is **not**",
10967
+ " gated by areas.",
10968
+ "3. Create ADR issues if technology decisions need formal records.",
10969
+ " Include a `## Traceability` section in each. Not gated by areas.",
10970
+ "4. Create action item issues for tasks that are not document-related.",
10971
+ " Include a `## Traceability` section in each. Not gated by areas.",
10972
+ "5. Cross-reference the meeting in any existing documents that were",
10973
+ " discussed **and that live under an in-scope `docRoot`**. For",
10974
+ " discussed documents under an out-of-scope `docRoot`, open a",
10975
+ " follow-up `type:docs` issue instead of editing the doc directly.",
10976
+ "6. Apply direct product/strategy doc updates for items flagged as",
10977
+ " **Firm** confidence. When the project declares `meetingAreas`,",
10978
+ " gate these edits: only apply them when the target path lies",
10979
+ " under an in-scope `docRoot`, and for Firm items targeting an",
10980
+ " out-of-scope `docRoot` open a follow-up `type:docs` issue",
10981
+ " noting the area and the target path. When the project has not",
10982
+ " declared any `meetingAreas`, apply Firm updates unrestricted",
10983
+ " (the degenerate case above). For the kind `planning`, also",
10984
+ " update the active sprint-plan doc directly (when the",
10985
+ " sprint-plan doc's area is in-scope, or always when no",
10986
+ " `meetingAreas` are declared); for the kind `review`, mark",
10987
+ " completed tasks in that same doc.",
10988
+ "7. **Update the extraction file** with a `## Downstream Artifacts` section",
10989
+ " listing every issue and document created from this meeting. Note",
10990
+ " any items that were deferred to follow-up issues because of the",
10991
+ " area gate.",
10992
+ "8. **Update the meeting notes** with a `## Related Issues` section listing",
10993
+ " all issues created from this meeting.",
10994
+ "9. Comment on the parent extract issue with a summary linking to all",
10995
+ " created artifacts.",
10996
+ "10. Commit and push (if any file changes were made), then close the link issue.",
10997
+ "",
10998
+ "---",
10999
+ "",
11000
+ "## GitHub Integration",
11001
+ "",
11002
+ "- Use `gh` CLI for all GitHub operations",
11003
+ "- Apply the appropriate `meeting:*` phase label to each phase issue",
11004
+ "- Use `type:docs` for documentation-producing issues, `type:chore` for",
11005
+ " maintenance/organizational tasks",
11006
+ "- Use `status:` labels to track progress (`status:ready`, `status:in-progress`, `status:done`)",
11007
+ "- Reference the source meeting transcript in all created issues",
11008
+ "- Link phase issues with `Depends on: #N` to enforce ordering",
11009
+ "",
11010
+ "## When to Shorten the Pipeline",
11011
+ "",
11012
+ "- **Short meetings** (<30 min, <2000 words): combine extract + notes into one session",
11013
+ "- **No requirements or decisions**: Phase 1 skips creating the `meeting:draft` issue",
11014
+ "- **Only action items**: extract + notes + link (3 phase issues)"
11015
+ ].join("\n")
11016
+ };
11017
+ }
11013
11018
  var processMeetingSkill = {
11014
11019
  name: "process-meeting",
11015
11020
  description: "Process a meeting transcript through the 4-phase meeting analysis pipeline",
@@ -11053,64 +11058,67 @@ var processMeetingSkill = {
11053
11058
  " to pick up (notes, draft, link)"
11054
11059
  ].join("\n")
11055
11060
  };
11056
- var meetingAnalysisBundle = {
11057
- name: "meeting-analysis",
11058
- description: "Meeting transcript processing workflow with 4-phase pipeline (extract, notes, draft, link)",
11059
- appliesWhen: () => true,
11060
- rules: [
11061
- {
11062
- name: "meeting-processing-workflow",
11063
- description: "Describes the 4-phase meeting processing pipeline, extraction taxonomy, and labeling conventions",
11064
- scope: AGENT_RULE_SCOPE.ALWAYS,
11065
- content: [
11066
- "# Meeting Processing Workflow",
11067
- "",
11068
- "Use `/process-meeting <path>` to process a meeting transcript through a",
11069
- "4-phase pipeline (extract \u2192 notes \u2192 draft \u2192 link). Each phase runs as a",
11070
- "separate agent session tracked by a GitHub issue with a `meeting:*` label.",
11071
- "See the `meeting-analyst` agent definition for full workflow details.",
11072
- "",
11073
- "Meeting notes may declare a `meeting_type` (one of the project's",
11074
- "recognized types) and an `areas: [...]` list. The `meeting_type`",
11075
- "resolves to a generic kind \u2014 `planning` / `review` / `brainstorm` /",
11076
- "`standup` / `external` / `other` \u2014 that drives type-specific",
11077
- "extraction rules in phases 1\u20132. The `areas` list scopes phase-4",
11078
- "direct edits to the doc-root sub-folders declared in the project's",
11079
- "**Area \u2192 doc-root mapping** table. When both fields are absent",
11080
- "the pipeline falls back to the default workflow (kind `other`,",
11081
- "no area gating)."
11082
- ].join("\n"),
11083
- platforms: {
11084
- cursor: { exclude: true }
11061
+ function buildMeetingAnalysisBundle(tier = AGENT_MODEL.BALANCED) {
11062
+ return {
11063
+ name: "meeting-analysis",
11064
+ description: "Meeting transcript processing workflow with 4-phase pipeline (extract, notes, draft, link)",
11065
+ appliesWhen: () => true,
11066
+ rules: [
11067
+ {
11068
+ name: "meeting-processing-workflow",
11069
+ description: "Describes the 4-phase meeting processing pipeline, extraction taxonomy, and labeling conventions",
11070
+ scope: AGENT_RULE_SCOPE.ALWAYS,
11071
+ content: [
11072
+ "# Meeting Processing Workflow",
11073
+ "",
11074
+ "Use `/process-meeting <path>` to process a meeting transcript through a",
11075
+ "4-phase pipeline (extract \u2192 notes \u2192 draft \u2192 link). Each phase runs as a",
11076
+ "separate agent session tracked by a GitHub issue with a `meeting:*` label.",
11077
+ "See the `meeting-analyst` agent definition for full workflow details.",
11078
+ "",
11079
+ "Meeting notes may declare a `meeting_type` (one of the project's",
11080
+ "recognized types) and an `areas: [...]` list. The `meeting_type`",
11081
+ "resolves to a generic kind \u2014 `planning` / `review` / `brainstorm` /",
11082
+ "`standup` / `external` / `other` \u2014 that drives type-specific",
11083
+ "extraction rules in phases 1\u20132. The `areas` list scopes phase-4",
11084
+ "direct edits to the doc-root sub-folders declared in the project's",
11085
+ "**Area \u2192 doc-root mapping** table. When both fields are absent",
11086
+ "the pipeline falls back to the default workflow (kind `other`,",
11087
+ "no area gating)."
11088
+ ].join("\n"),
11089
+ platforms: {
11090
+ cursor: { exclude: true }
11091
+ },
11092
+ tags: ["workflow"]
11093
+ }
11094
+ ],
11095
+ skills: [processMeetingSkill],
11096
+ subAgents: [buildMeetingAnalystSubAgent(tier)],
11097
+ labels: [
11098
+ {
11099
+ name: "meeting:extract",
11100
+ color: "C5DEF5",
11101
+ description: "Phase 1: raw extraction from a meeting transcript"
11085
11102
  },
11086
- tags: ["workflow"]
11087
- }
11088
- ],
11089
- skills: [processMeetingSkill],
11090
- subAgents: [meetingAnalystSubAgent],
11091
- labels: [
11092
- {
11093
- name: "meeting:extract",
11094
- color: "C5DEF5",
11095
- description: "Phase 1: raw extraction from a meeting transcript"
11096
- },
11097
- {
11098
- name: "meeting:notes",
11099
- color: "BFDADC",
11100
- description: "Phase 2: curated notes derived from an extraction"
11101
- },
11102
- {
11103
- name: "meeting:draft",
11104
- color: "D4C5F9",
11105
- description: "Phase 3: draft follow-up issues proposed from notes"
11106
- },
11107
- {
11108
- name: "meeting:link",
11109
- color: "FEF2C0",
11110
- description: "Phase 4: linking/reconciling drafted issues with existing work"
11111
- }
11112
- ]
11113
- };
11103
+ {
11104
+ name: "meeting:notes",
11105
+ color: "BFDADC",
11106
+ description: "Phase 2: curated notes derived from an extraction"
11107
+ },
11108
+ {
11109
+ name: "meeting:draft",
11110
+ color: "D4C5F9",
11111
+ description: "Phase 3: draft follow-up issues proposed from notes"
11112
+ },
11113
+ {
11114
+ name: "meeting:link",
11115
+ color: "FEF2C0",
11116
+ description: "Phase 4: linking/reconciling drafted issues with existing work"
11117
+ }
11118
+ ]
11119
+ };
11120
+ }
11121
+ var meetingAnalysisBundle = buildMeetingAnalysisBundle();
11114
11122
 
11115
11123
  // src/agent/bundles/run-ratio.ts
11116
11124
  var DEFAULT_DISPATCH_TO_HOUSEKEEPING_RATIO = 4;
@@ -14523,6 +14531,69 @@ function resolveOrchestratorAssets(tierConfig, scopeGateConfig, runRatioConfig,
14523
14531
  )
14524
14532
  };
14525
14533
  }
14534
+ var orchestrateCommand = {
14535
+ name: "orchestrate",
14536
+ description: "Run one full orchestrator cycle: triage, queue scan, delegate to issue-worker.",
14537
+ content: [
14538
+ "# Orchestrate",
14539
+ "",
14540
+ "Invoke the `orchestrator` sub-agent and run **one full end-to-end",
14541
+ "cycle**: triage / unblock \u2192 maintenance \u2192 queue scan \u2192 delegate the",
14542
+ "picked issue to the `issue-worker` sub-agent \u2192 cleanup.",
14543
+ "",
14544
+ "Follow the contract in `.claude/agents/orchestrator.md`. Do **not**",
14545
+ "implement code, create branches, push commits, or merge PRs \u2014 those",
14546
+ "are the worker's and `pr-reviewer`'s jobs respectively.",
14547
+ "",
14548
+ "Run as a depth-0 (top-level) session so the orchestrator can spawn",
14549
+ "the `issue-worker` sub-agent at depth-1 \u2014 Claude Code forbids nested",
14550
+ "sub-agent dispatch.",
14551
+ ""
14552
+ ].join("\n")
14553
+ };
14554
+ var checkBlockedCommand = {
14555
+ name: "check-blocked",
14556
+ description: "Run .claude/procedures/check-blocked.sh and summarise the unblock candidates.",
14557
+ content: [
14558
+ "# Check Blocked",
14559
+ "",
14560
+ "Run the bundled triage helper and report what it found:",
14561
+ "",
14562
+ "```bash",
14563
+ 'bash .claude/procedures/check-blocked.sh "$@"',
14564
+ "```",
14565
+ "",
14566
+ "Pass any extra arguments through verbatim. The script walks every",
14567
+ "`status:blocked` issue, re-checks each `Depends on:` reference, and",
14568
+ "prints `UNBLOCKED` / `STILL_BLOCKED` lines for issues that should",
14569
+ "transition to `status:ready`.",
14570
+ "",
14571
+ "Summarise the output (counts, the first few candidates) \u2014 do **not**",
14572
+ "transition labels yourself; that is the orchestrator's responsibility.",
14573
+ ""
14574
+ ].join("\n")
14575
+ };
14576
+ var scanCommand = {
14577
+ name: "scan",
14578
+ description: "Run the orchestrator queue scan only and report the next ready issue without dispatching.",
14579
+ content: [
14580
+ "# Scan",
14581
+ "",
14582
+ "Run the orchestrator's **queue scan only** (Phase E of the contract",
14583
+ "in `.claude/agents/orchestrator.md`) and print the next ready issue,",
14584
+ "the funnel-tier sort that put it on top, and the scope-gate result.",
14585
+ "",
14586
+ "Do **not** claim the issue, create a branch, or delegate to",
14587
+ "`issue-worker`. This command exists for proactive review of what",
14588
+ "the next `/orchestrate` invocation would pick up.",
14589
+ "",
14590
+ "Walk each `priority:*` bucket in turn (capped at 50 per bucket),",
14591
+ "filter `Depends on:` references, and short-circuit on the first",
14592
+ "bucket whose survivors clear the filter. Report the top candidate",
14593
+ "and the number of survivors per bucket.",
14594
+ ""
14595
+ ].join("\n")
14596
+ };
14526
14597
  var orchestratorBundle = {
14527
14598
  name: "orchestrator",
14528
14599
  description: "Pipeline orchestrator agent for issue triage, PR review, and queue management",
@@ -14549,6 +14620,7 @@ var orchestratorBundle = {
14549
14620
  ],
14550
14621
  subAgents: [orchestratorSubAgent, issueWorkerSubAgent],
14551
14622
  procedures: [checkBlockedProcedure, unblockDependentsProcedure],
14623
+ commands: [orchestrateCommand, checkBlockedCommand, scanCommand],
14552
14624
  claudePermissions: {
14553
14625
  allow: [
14554
14626
  // Allow executing the check-blocked.sh procedure
@@ -14558,11 +14630,11 @@ var orchestratorBundle = {
14558
14630
  };
14559
14631
 
14560
14632
  // src/agent/bundles/people-profile.ts
14561
- function buildPeopleProfileAnalystSubAgent(paths, issueDefaults) {
14633
+ function buildPeopleProfileAnalystSubAgent(paths, issueDefaults, tier) {
14562
14634
  return {
14563
14635
  name: "people-profile-analyst",
14564
14636
  description: "Researches an individual person (colleague, customer contact, vendor contact, partner contact, industry expert, or connector) from public sources and produces a structured markdown profile cross-linked to companies, software, and meeting notes, then enqueues downstream `company:research` and `software:research` issues for unprofiled companies and software products surfaced during profiling. Also handles maintenance refreshes on a configurable staleness cadence (`people:refresh`). One person per session, tracked by people:* GitHub issue labels.",
14565
- model: AGENT_MODEL.POWERFUL,
14637
+ model: tier,
14566
14638
  maxTurns: 80,
14567
14639
  platforms: { cursor: { exclude: true } },
14568
14640
  prompt: [
@@ -15392,7 +15464,7 @@ function buildRefreshPersonSkill(paths, issueDefaults) {
15392
15464
  ].join("\n")
15393
15465
  };
15394
15466
  }
15395
- function buildPeopleProfileBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAULT_RESOLVED_ISSUE_DEFAULTS) {
15467
+ function buildPeopleProfileBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAULT_RESOLVED_ISSUE_DEFAULTS, tier = AGENT_MODEL.BALANCED) {
15396
15468
  return {
15397
15469
  name: "people-profile",
15398
15470
  description: "People research and profiling pipeline: research, draft profile, followup, refresh. Enabled by default; domain-neutral; filesystem-durable between phases. Cross-references existing companies, software, and meeting notes, and Phase 3 (Followup) hands unprofiled, genuinely-relevant companies and software products off to the `company-profile` and `software-profile` bundles via `company:research` and `software:research` issues. Phase 4 (Refresh) re-verifies profiles on a configurable staleness cadence.",
@@ -15440,7 +15512,7 @@ function buildPeopleProfileBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults = D
15440
15512
  buildProfilePersonSkill(paths, issueDefaults),
15441
15513
  buildRefreshPersonSkill(paths, issueDefaults)
15442
15514
  ],
15443
- subAgents: [buildPeopleProfileAnalystSubAgent(paths, issueDefaults)],
15515
+ subAgents: [buildPeopleProfileAnalystSubAgent(paths, issueDefaults, tier)],
15444
15516
  labels: [
15445
15517
  {
15446
15518
  name: "type:people-profile",
@@ -17015,7 +17087,19 @@ var prReviewBundle = {
17015
17087
  "to a PR's branch \u2014 it only reviews, decides, and orchestrates merge",
17016
17088
  "or comment. In loop mode, a failed review for one PR never stops",
17017
17089
  "the loop; the reviewer comments and moves on. See the `pr-reviewer`",
17018
- "agent definition for the full phase-by-phase contract.",
17090
+ "agent definition for the full phase-by-phase contract."
17091
+ ].join("\n"),
17092
+ platforms: {
17093
+ cursor: { exclude: true }
17094
+ },
17095
+ tags: ["workflow"]
17096
+ },
17097
+ {
17098
+ name: "pr-review-feedback-protocol",
17099
+ description: "Documents the human-in-the-loop feedback loop on PR review: reaction state machine, pushback resolution, fix-list comment format, sticky reviewer-notes comment, label glossary, and human-author opt-in flag.",
17100
+ scope: AGENT_RULE_SCOPE.ALWAYS,
17101
+ content: [
17102
+ "# PR Review Feedback Protocol",
17019
17103
  "",
17020
17104
  "## Human-in-the-Loop Feedback Protocol",
17021
17105
  "",
@@ -23799,11 +23883,11 @@ var slackBundle = {
23799
23883
  };
23800
23884
 
23801
23885
  // src/agent/bundles/software-profile.ts
23802
- function buildSoftwareProfileAnalystSubAgent(paths, issueDefaults) {
23886
+ function buildSoftwareProfileAnalystSubAgent(paths, issueDefaults, tier) {
23803
23887
  return {
23804
23888
  name: "software-profile-analyst",
23805
23889
  description: "Researches a software product (competitor, adjacent, incumbent, enabler, infrastructure, or ecosystem-tool) from public sources, produces a structured markdown profile, contributes rows to a shared feature matrix ranked against configurable segment-importance weights, maps features back to the BCM capability model and flags unmapped features, then enqueues downstream `bcm:outline`, `company:research`, and `people:research` issues for new sub-capabilities, the vendor company, and primary-attribution founders/leaders surfaced during profiling. One product per session, tracked by software:* GitHub issue labels.",
23806
- model: AGENT_MODEL.POWERFUL,
23890
+ model: tier,
23807
23891
  maxTurns: 80,
23808
23892
  platforms: { cursor: { exclude: true } },
23809
23893
  prompt: [
@@ -24738,7 +24822,7 @@ function buildMapSoftwareSkill(paths, issueDefaults) {
24738
24822
  ].join("\n")
24739
24823
  };
24740
24824
  }
24741
- function buildSoftwareProfileBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAULT_RESOLVED_ISSUE_DEFAULTS) {
24825
+ function buildSoftwareProfileBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAULT_RESOLVED_ISSUE_DEFAULTS, tier = AGENT_MODEL.BALANCED) {
24742
24826
  return {
24743
24827
  name: "software-profile",
24744
24828
  description: "Software research, profiling, feature-matrix, and capability-mapping pipeline: research, profile, matrix, map, followup. Enabled by default; domain-neutral; filesystem-durable between phases; ranks features against configurable segment-importance weights and maps features back to the BCM capability model. Phase 4 (Map) hands unmapped features off to the `bcm-writer` bundle via `bcm:outline` issues. Phase 5 (Followup) hands the vendor company and primary-attribution founders/leaders off to the `company-profile` and `people-profile` bundles via `company:research` and `people:research` issues.",
@@ -24795,7 +24879,9 @@ function buildSoftwareProfileBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults =
24795
24879
  buildProfileSoftwareSkill(paths, issueDefaults),
24796
24880
  buildMapSoftwareSkill(paths, issueDefaults)
24797
24881
  ],
24798
- subAgents: [buildSoftwareProfileAnalystSubAgent(paths, issueDefaults)],
24882
+ subAgents: [
24883
+ buildSoftwareProfileAnalystSubAgent(paths, issueDefaults, tier)
24884
+ ],
24799
24885
  labels: [
24800
24886
  {
24801
24887
  name: "type:software-profile",
@@ -27029,6 +27115,211 @@ var vitestBundle = {
27029
27115
  }
27030
27116
  };
27031
27117
 
27118
+ // src/agent/bundles/agent-registry.ts
27119
+ var AGENT_REGISTRY_ENTRIES = [
27120
+ {
27121
+ bundle: "agenda",
27122
+ skill: "/draft-agenda",
27123
+ agent: "agenda-analyst",
27124
+ resolveOutputPath: (p) => `${p.meetingsRoot}/`,
27125
+ purpose: "Pre-meeting agenda authoring (2-phase: draft, finalize). Reuses the project's meeting-type taxonomy.",
27126
+ workflowRuleName: "meeting-agenda-workflow"
27127
+ },
27128
+ {
27129
+ bundle: "bcm-writer",
27130
+ skill: "/write-bcm",
27131
+ agent: "bcm-writer",
27132
+ resolveOutputPath: (p) => `${p.bcmRoot}/`,
27133
+ purpose: "BCM capability-model documents (4-phase: outline, scaffold, context, connect). BIZBOK-aligned.",
27134
+ workflowRuleName: "bcm-writer-workflow"
27135
+ },
27136
+ {
27137
+ bundle: "business-models",
27138
+ skill: "/scan-business-models",
27139
+ agent: "business-models-analyst",
27140
+ resolveOutputPath: (p) => `${p.docsRoot}/industry-research/`,
27141
+ purpose: "Osterwalder business-model canvases per industry segment (3-phase: scan, canvas, complete).",
27142
+ workflowRuleName: "business-models-workflow"
27143
+ },
27144
+ {
27145
+ bundle: "company-profile",
27146
+ skill: "/profile-company",
27147
+ agent: "company-profile-analyst",
27148
+ resolveOutputPath: (p) => `${p.companiesRoot}/`,
27149
+ purpose: "Company profiles, notes, and segment competitive analyses (up to 6 phases incl. refresh).",
27150
+ workflowRuleName: "company-profile-workflow"
27151
+ },
27152
+ {
27153
+ bundle: "customer-profile",
27154
+ skill: "/discover-customers",
27155
+ agent: "customer-profile-analyst",
27156
+ resolveOutputPath: (p) => `${p.profilesRoot}/customers/`,
27157
+ purpose: "Customer-archetype discovery, profiles, and competitor feature-mapping (3-phase).",
27158
+ workflowRuleName: "customer-profile-workflow"
27159
+ },
27160
+ {
27161
+ bundle: "docs-sync",
27162
+ skill: "/docs-sync-pr",
27163
+ agent: "docs-sync",
27164
+ resolveOutputPath: (p) => `${p.docsRoot}/`,
27165
+ purpose: "Pre-PR drift detection and mechanical doc fixes (2-phase: scan, fix). Skeleton release.",
27166
+ workflowRuleName: "docs-sync-workflow"
27167
+ },
27168
+ {
27169
+ bundle: "industry-discovery",
27170
+ skill: "/discover-industries",
27171
+ agent: "industry-discovery-analyst",
27172
+ resolveOutputPath: (p) => `${p.industriesRoot}/`,
27173
+ purpose: "Industry-vertical discovery, fit-evaluation, and research planning (3-phase).",
27174
+ workflowRuleName: "industry-discovery-workflow"
27175
+ },
27176
+ {
27177
+ bundle: "maintenance-audit",
27178
+ skill: "/audit-docs",
27179
+ agent: "maintenance-audit",
27180
+ resolveOutputPath: (p) => `${p.docsRoot}/`,
27181
+ purpose: "Doc-registry audits with idempotent fixes (3-phase: scan, fix, verify). No new content.",
27182
+ workflowRuleName: "maintenance-audit-workflow"
27183
+ },
27184
+ {
27185
+ bundle: "meeting-analysis",
27186
+ skill: "/process-meeting",
27187
+ agent: "meeting-analyst",
27188
+ resolveOutputPath: (p) => `${p.meetingsRoot}/`,
27189
+ purpose: "Post-meeting transcript processing (4-phase: extract, notes, draft, link).",
27190
+ workflowRuleName: "meeting-processing-workflow"
27191
+ },
27192
+ {
27193
+ bundle: "people-profile",
27194
+ skill: "/profile-person",
27195
+ agent: "people-profile-analyst",
27196
+ resolveOutputPath: (p) => `${p.peopleRoot}/`,
27197
+ purpose: "Person profiles only (up to 4 phases incl. refresh). Hands off to company/software bundles.",
27198
+ workflowRuleName: "people-profile-workflow"
27199
+ },
27200
+ {
27201
+ bundle: "pr-review",
27202
+ skill: "/review-pr",
27203
+ agent: "pr-reviewer",
27204
+ resolveOutputPath: () => "",
27205
+ purpose: "PR review, auto-merge gating, and human-in-the-loop feedback orchestration.",
27206
+ workflowRuleName: "pr-review-workflow"
27207
+ },
27208
+ {
27209
+ bundle: "regulatory-research",
27210
+ skill: "/scan-regulatory-landscape",
27211
+ agent: "regulatory-research-analyst",
27212
+ resolveOutputPath: (p) => `${p.docsRoot}/regulations/`,
27213
+ purpose: "Regulation research, version pages, and impact analysis (3-phase). Documents, never interprets.",
27214
+ workflowRuleName: "regulatory-research-workflow"
27215
+ },
27216
+ {
27217
+ bundle: "requirements-analyst",
27218
+ skill: "/scan-requirements",
27219
+ agent: "requirements-analyst",
27220
+ resolveOutputPath: (p) => `${p.researchRequirementsRoot}/`,
27221
+ purpose: "Requirements gap discovery + draft proposals (2-phase: scan, draft-trace). Hands off to writer.",
27222
+ workflowRuleName: "requirements-analyst-workflow"
27223
+ },
27224
+ {
27225
+ bundle: "requirements-reviewer",
27226
+ skill: "/review-requirements",
27227
+ agent: "requirements-reviewer",
27228
+ resolveOutputPath: (p) => `${p.requirementsRoot}/`,
27229
+ purpose: "Requirements audit (12 checks) and narrow-edit deprecation. Never authors new requirement docs.",
27230
+ workflowRuleName: "requirements-reviewer-workflow"
27231
+ },
27232
+ {
27233
+ bundle: "requirements-writer",
27234
+ skill: "/write-requirement",
27235
+ agent: "requirements-writer",
27236
+ resolveOutputPath: (p) => `${p.requirementsRoot}/`,
27237
+ purpose: "Formal requirement document authoring across the 11-category taxonomy + four-tier classification.",
27238
+ workflowRuleName: "requirements-writer-workflow"
27239
+ },
27240
+ {
27241
+ bundle: "research-pipeline",
27242
+ skill: "/research",
27243
+ agent: "research-analyst",
27244
+ resolveOutputPath: (p) => `${p.researchRoot}/`,
27245
+ purpose: "Generic research micro-tasks (3-phase: scope, slice, verify). Notes-only output.",
27246
+ workflowRuleName: "research-pipeline-workflow"
27247
+ },
27248
+ {
27249
+ bundle: "software-profile",
27250
+ skill: "/profile-software",
27251
+ agent: "software-profile-analyst",
27252
+ resolveOutputPath: (p) => `${p.softwareRoot}/`,
27253
+ purpose: "Software profiles, shared feature matrix, and BCM-tree capability mapping (up to 5 phases).",
27254
+ workflowRuleName: "software-profile-workflow"
27255
+ },
27256
+ {
27257
+ bundle: "standards-research",
27258
+ skill: "/scope-standards-research",
27259
+ agent: "standards-research-analyst",
27260
+ resolveOutputPath: (p) => `${p.docsRoot}/standards/`,
27261
+ purpose: "Interoperability standards research (5-phase: scope, research, compare, extension, organizations).",
27262
+ workflowRuleName: "standards-research-workflow"
27263
+ }
27264
+ ];
27265
+ var SUPPRESSED_WORKFLOW_RULE_NAMES = AGENT_REGISTRY_ENTRIES.map((e) => e.workflowRuleName);
27266
+ function isSuppressedWorkflowRule(name) {
27267
+ return SUPPRESSED_WORKFLOW_RULE_NAMES.includes(name);
27268
+ }
27269
+ function bundleNameForWorkflowRule(ruleName) {
27270
+ const entry = AGENT_REGISTRY_ENTRIES.find(
27271
+ (e) => e.workflowRuleName === ruleName
27272
+ );
27273
+ return entry?.bundle;
27274
+ }
27275
+ function buildAgentRegistryRule(bundles, paths) {
27276
+ const activeNames = new Set(bundles.map((b) => b.name));
27277
+ const rows = AGENT_REGISTRY_ENTRIES.filter(
27278
+ (e) => activeNames.has(e.bundle)
27279
+ ).slice();
27280
+ if (rows.length === 0) {
27281
+ return void 0;
27282
+ }
27283
+ rows.sort((a, b) => a.bundle.localeCompare(b.bundle));
27284
+ const lines = [
27285
+ "# Agent Registry",
27286
+ "",
27287
+ "Each row below is the routing summary for one phased-agent",
27288
+ "bundle: the user-invocable skill, the sub-agent that handles",
27289
+ "the work, the output path the agent writes to, and a one-line",
27290
+ "purpose. Use the table to answer *which agent handles X* \u2014",
27291
+ "full agent prompts live in `.claude/agents/<name>.md` and only",
27292
+ "load on delegation, so the table is the always-on routing",
27293
+ "signal.",
27294
+ "",
27295
+ "Cross-cutting policies that apply to every agent below \u2014",
27296
+ "Progress File Convention, Shared-Editing Safety, Issue",
27297
+ "Templates, Skill Evals \u2014 are documented as their own top-level",
27298
+ "sections elsewhere in this file. The registry only captures",
27299
+ "routing; it does not duplicate convention prose.",
27300
+ "",
27301
+ "| Skill | Agent | Bundle | Output path | Purpose |",
27302
+ "| --- | --- | --- | --- | --- |"
27303
+ ];
27304
+ for (const row of rows) {
27305
+ const outputPath = row.resolveOutputPath(paths);
27306
+ const pathCell = outputPath.length > 0 ? `\`${outputPath}\`` : "\u2014";
27307
+ lines.push(
27308
+ `| \`${row.skill}\` | \`${row.agent}\` | \`${row.bundle}\` | ${pathCell} | ${row.purpose} |`
27309
+ );
27310
+ }
27311
+ return {
27312
+ name: "agent-registry",
27313
+ description: "Routing table mapping each phased-agent bundle to its primary skill, sub-agent, output path, and one-line purpose. Replaces the per-bundle workflow rules whose prose summaries duplicated the routing signal.",
27314
+ scope: AGENT_RULE_SCOPE.ALWAYS,
27315
+ content: lines.join("\n"),
27316
+ platforms: {
27317
+ cursor: { exclude: true }
27318
+ },
27319
+ tags: ["workflow"]
27320
+ };
27321
+ }
27322
+
27032
27323
  // src/agent/bundles/features.ts
27033
27324
  var SOURCE_TIER_HEADINGS = [
27034
27325
  { key: "t1", heading: "### T1 \u2014 Primary Living" },
@@ -27396,7 +27687,7 @@ function renderPriorityRulesSection(rules) {
27396
27687
  }
27397
27688
 
27398
27689
  // src/agent/bundles/index.ts
27399
- function buildBuiltInBundles(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAULT_RESOLVED_ISSUE_DEFAULTS) {
27690
+ function buildBuiltInBundles(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAULT_RESOLVED_ISSUE_DEFAULTS, defaultAgentTier = AGENT_MODEL.BALANCED) {
27400
27691
  return [
27401
27692
  buildBaseBundle(paths),
27402
27693
  upstreamConfigulatorDocsBundle,
@@ -27409,7 +27700,7 @@ function buildBuiltInBundles(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAUL
27409
27700
  projenBundle,
27410
27701
  githubWorkflowBundle,
27411
27702
  slackBundle,
27412
- meetingAnalysisBundle,
27703
+ buildMeetingAnalysisBundle(defaultAgentTier),
27413
27704
  agendaBundle,
27414
27705
  orchestratorBundle,
27415
27706
  prReviewBundle,
@@ -27417,16 +27708,16 @@ function buildBuiltInBundles(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAUL
27417
27708
  buildRequirementsWriterBundle(paths, issueDefaults),
27418
27709
  buildRequirementsReviewerBundle(paths, issueDefaults),
27419
27710
  buildResearchPipelineBundle(paths, issueDefaults),
27420
- buildCompanyProfileBundle(paths, issueDefaults),
27421
- buildCustomerProfileBundle(paths, issueDefaults),
27422
- buildPeopleProfileBundle(paths, issueDefaults),
27423
- buildSoftwareProfileBundle(paths, issueDefaults),
27711
+ buildCompanyProfileBundle(paths, issueDefaults, defaultAgentTier),
27712
+ buildCustomerProfileBundle(paths, issueDefaults, defaultAgentTier),
27713
+ buildPeopleProfileBundle(paths, issueDefaults, defaultAgentTier),
27714
+ buildSoftwareProfileBundle(paths, issueDefaults, defaultAgentTier),
27424
27715
  buildIndustryDiscoveryBundle(paths, issueDefaults),
27425
27716
  buildBusinessModelsBundle(paths, issueDefaults),
27426
27717
  buildBcmWriterBundle(paths, issueDefaults),
27427
27718
  buildStandardsResearchBundle(paths, issueDefaults),
27428
27719
  buildRegulatoryResearchBundle(paths, issueDefaults),
27429
- buildMaintenanceAuditBundle(paths, issueDefaults),
27720
+ buildMaintenanceAuditBundle(paths, issueDefaults, defaultAgentTier),
27430
27721
  buildDocsSyncBundle(paths)
27431
27722
  ];
27432
27723
  }
@@ -27672,7 +27963,7 @@ var ClaudeRenderer = class _ClaudeRenderer {
27672
27963
  /**
27673
27964
  * Render all Claude Code configuration files.
27674
27965
  */
27675
- static render(component, rules, skills, subAgents, mcpServers, settings, procedures) {
27966
+ static render(component, rules, skills, subAgents, mcpServers, settings, procedures, commands) {
27676
27967
  _ClaudeRenderer.renderClaudeMd(component, rules);
27677
27968
  _ClaudeRenderer.renderScopedRules(component, rules);
27678
27969
  _ClaudeRenderer.renderSettings(component, mcpServers, settings);
@@ -27681,6 +27972,9 @@ var ClaudeRenderer = class _ClaudeRenderer {
27681
27972
  if (procedures && procedures.length > 0) {
27682
27973
  _ClaudeRenderer.renderProcedures(component, procedures);
27683
27974
  }
27975
+ if (commands && commands.length > 0) {
27976
+ _ClaudeRenderer.renderCommands(component, commands);
27977
+ }
27684
27978
  }
27685
27979
  static renderClaudeMd(component, rules) {
27686
27980
  const claudeMdRules = rules.filter((r) => {
@@ -28012,6 +28306,30 @@ var ClaudeRenderer = class _ClaudeRenderer {
28012
28306
  });
28013
28307
  }
28014
28308
  }
28309
+ /**
28310
+ * Renders user-invokable slash commands to `.claude/commands/<name>.md`.
28311
+ *
28312
+ * Each command file carries a YAML frontmatter block with the
28313
+ * `description` (always present) and an optional `model` alias. The
28314
+ * body is the {@link AgentCommand.content} written verbatim.
28315
+ *
28316
+ * @see https://docs.claude.com/en/docs/claude-code/slash-commands
28317
+ */
28318
+ static renderCommands(component, commands) {
28319
+ for (const command of commands) {
28320
+ const lines = [];
28321
+ lines.push("---");
28322
+ lines.push(`description: ${command.description}`);
28323
+ const resolvedModel = resolveModelAlias(command.model);
28324
+ if (resolvedModel) {
28325
+ lines.push(`model: ${resolvedModel}`);
28326
+ }
28327
+ lines.push("---");
28328
+ lines.push("");
28329
+ lines.push(...command.content.split("\n"));
28330
+ new TextFile3(component, `.claude/commands/${command.name}.md`, { lines });
28331
+ }
28332
+ }
28015
28333
  /**
28016
28334
  * Determine the default Claude rule target based on rule scope.
28017
28335
  * ALWAYS-scoped rules default to CLAUDE_MD; FILE_PATTERN rules default to SCOPED_FILE.
@@ -28034,6 +28352,17 @@ var CopilotRenderer = class {
28034
28352
  };
28035
28353
 
28036
28354
  // src/agent/agent-config.ts
28355
+ function resolveDefaultAgentTier(options) {
28356
+ switch (options?.defaultAgentTier) {
28357
+ case "powerful":
28358
+ return AGENT_MODEL.POWERFUL;
28359
+ case "fast":
28360
+ return AGENT_MODEL.FAST;
28361
+ case "balanced":
28362
+ default:
28363
+ return AGENT_MODEL.BALANCED;
28364
+ }
28365
+ }
28037
28366
  var DEFAULT_CLAUDE_ALLOW = [
28038
28367
  // ── Git ──────────────────────────────────────────────────────────────
28039
28368
  "Bash(git add *)",
@@ -28138,6 +28467,45 @@ var DEFAULT_CLAUDE_DENY = [
28138
28467
  "Bash(export *)",
28139
28468
  "Bash(env *)"
28140
28469
  ];
28470
+ var DEFAULT_CLAUDE_PATH_DENY = [
28471
+ "Read(./node_modules/**)",
28472
+ "Read(./dist/**)",
28473
+ "Read(./lib/**)",
28474
+ "Read(./.astro/**)",
28475
+ "Read(./.env)",
28476
+ "Read(./.env.*)",
28477
+ "Read(./*.lock)",
28478
+ "Read(./pnpm-lock.yaml)",
28479
+ "Read(./package-lock.json)"
28480
+ ];
28481
+ var DEFAULT_USAGE_LOG_PATH = ".claude/usage.log";
28482
+ var DEFAULT_CLAUDE_ENV = {
28483
+ ENABLE_TOOL_SEARCH: "1"
28484
+ };
28485
+ var DEFAULT_CLAUDE_HOOKS = {
28486
+ Stop: [
28487
+ {
28488
+ matcher: "*",
28489
+ hooks: [
28490
+ {
28491
+ type: "command",
28492
+ command: `echo "$(date -u +%FT%TZ),\${CLAUDE_SESSION_ID:-unknown},\${CLAUDE_INPUT_TOKENS:-0},\${CLAUDE_OUTPUT_TOKENS:-0}" >> ${DEFAULT_USAGE_LOG_PATH}`
28493
+ }
28494
+ ]
28495
+ }
28496
+ ],
28497
+ PostToolUse: [
28498
+ {
28499
+ matcher: "Edit|Write",
28500
+ hooks: [
28501
+ {
28502
+ type: "command",
28503
+ command: 'case "${CLAUDE_TOOL_INPUT_path:-}" in *docs/src/content/docs/*) if [ -x .claude/procedures/check-links.sh ]; then bash .claude/procedures/check-links.sh "$CLAUDE_TOOL_INPUT_path" 2>&1 | head -20; fi ;; esac'
28504
+ }
28505
+ ]
28506
+ }
28507
+ ]
28508
+ };
28141
28509
  var PROGRESS_FILE_BUNDLE_HOOKS = [
28142
28510
  ["bcm-writer-workflow", "bcm-writer"],
28143
28511
  ["business-models-workflow", "business-models"],
@@ -28212,10 +28580,30 @@ var AgentConfig = class _AgentConfig extends Component8 {
28212
28580
  return (examples.t1?.length ?? 0) > 0 || (examples.t2?.length ?? 0) > 0 || (examples.t3?.length ?? 0) > 0 || (examples.t4?.length ?? 0) > 0;
28213
28581
  }
28214
28582
  /**
28215
- * Merges default Claude permissions with bundle and user-supplied settings.
28583
+ * Merges default Claude permissions and hooks with bundle and
28584
+ * user-supplied settings.
28585
+ *
28586
+ * Permission merge order: defaults → bundle permissions → user-supplied
28587
+ * entries. Both `allow` and `deny` are deduped via
28588
+ * `Array.from(new Set(...))`; V8 `Set` iteration preserves insertion
28589
+ * order, so the final ordering is defaults first, then bundle, then
28590
+ * user, with duplicates removed (first-occurrence wins). `defaultMode`
28591
+ * defaults to `"dontAsk"` unless overridden — see the inline comment
28592
+ * on the literal below for the autonomous-worker rationale.
28216
28593
  *
28217
- * Merge order: defaults bundle permissions user-supplied entries.
28218
- * `defaultMode` defaults to `"dontAsk"` unless overridden.
28594
+ * Hooks merge: consumer-supplied entries first, then default entries
28595
+ * (Stop, PostToolUse), deduped by `(matcher, JSON-serialized hooks)`.
28596
+ * Defaults are skipped entirely when `disableAllHooks: true` is set —
28597
+ * the `disableAllHooks` flag passes through to the rendered file so
28598
+ * Claude Code suppresses every project-level hook at runtime, and the
28599
+ * defaults are dropped at synth time so the rendered file does not
28600
+ * carry orphan entries that would re-fire if the operator later flipped
28601
+ * the flag back off.
28602
+ *
28603
+ * Env merge: defaults from `DEFAULT_CLAUDE_ENV` (e.g.
28604
+ * `ENABLE_TOOL_SEARCH=1`) layer first, then consumer-supplied
28605
+ * `claudeSettings.env` entries override on key collision. Sibling keys
28606
+ * from both sources land in the rendered file.
28219
28607
  */
28220
28608
  static mergeClaudeDefaults(userSettings, bundlePermissions) {
28221
28609
  const bundleAllow = bundlePermissions?.allow ?? [];
@@ -28224,14 +28612,80 @@ var AgentConfig = class _AgentConfig extends Component8 {
28224
28612
  const userDeny = userSettings?.permissions?.deny ?? [];
28225
28613
  return {
28226
28614
  ...userSettings,
28615
+ // `defaultMode: "dontAsk"` is configulator's hardcoded default
28616
+ // because scheduled-task workers (issue-worker, orchestrator,
28617
+ // pr-reviewer, and the analyst/writer family) run autonomously
28618
+ // and would deadlock on confirmation prompts. Any other value
28619
+ // breaks the autonomous-worker contract — override only after
28620
+ // revisiting that contract end-to-end. The override path for
28621
+ // consumers is `claudeSettings.defaultMode` on
28622
+ // `AgentConfigOptions`.
28227
28623
  defaultMode: userSettings?.defaultMode ?? "dontAsk",
28228
28624
  permissions: {
28229
28625
  ...userSettings?.permissions,
28230
- allow: [...DEFAULT_CLAUDE_ALLOW, ...bundleAllow, ...userAllow],
28231
- deny: [...DEFAULT_CLAUDE_DENY, ...bundleDeny, ...userDeny]
28232
- }
28626
+ allow: Array.from(
28627
+ /* @__PURE__ */ new Set([...DEFAULT_CLAUDE_ALLOW, ...bundleAllow, ...userAllow])
28628
+ ),
28629
+ deny: Array.from(
28630
+ /* @__PURE__ */ new Set([
28631
+ ...DEFAULT_CLAUDE_DENY,
28632
+ ...DEFAULT_CLAUDE_PATH_DENY,
28633
+ ...bundleDeny,
28634
+ ...userDeny
28635
+ ])
28636
+ )
28637
+ },
28638
+ hooks: _AgentConfig.mergeClaudeHooks(userSettings),
28639
+ env: { ...DEFAULT_CLAUDE_ENV, ...userSettings?.env ?? {} }
28233
28640
  };
28234
28641
  }
28642
+ /**
28643
+ * Merge default lifecycle hooks (Stop, PostToolUse) with consumer-
28644
+ * supplied entries on `claudeSettings.hooks`. Consumer entries appear
28645
+ * first so a downstream override that wires a faster lint/format hook
28646
+ * runs ahead of the defaults; defaults are appended after.
28647
+ *
28648
+ * Returns `undefined` when neither defaults nor consumer entries
28649
+ * remain — the renderer skips the `hooks` key entirely in that case
28650
+ * so opt-out repos do not ship an empty `"hooks": {}` object.
28651
+ *
28652
+ * Defaults are gated on `disableAllHooks !== true`. When the flag is
28653
+ * set we still pass through any consumer-supplied entries (the
28654
+ * runtime-level `disableAllHooks: true` is what suppresses execution),
28655
+ * but we never inject the bundle defaults. That keeps the disable-all
28656
+ * escape hatch idempotent: flipping the flag drops the bundle's
28657
+ * default surface area instead of leaving the entries on disk for a
28658
+ * future re-enable.
28659
+ */
28660
+ static mergeClaudeHooks(userSettings) {
28661
+ const userHooks = userSettings?.hooks;
28662
+ const includeDefaults = userSettings?.disableAllHooks !== true;
28663
+ const defaults = includeDefaults ? DEFAULT_CLAUDE_HOOKS : {};
28664
+ const allEvents = /* @__PURE__ */ new Set([
28665
+ ...Object.keys(userHooks ?? {}),
28666
+ ...Object.keys(defaults)
28667
+ ]);
28668
+ const merged = {};
28669
+ for (const event of allEvents) {
28670
+ const userEntries = (userHooks ?? {})[event] ?? [];
28671
+ const defaultEntries = defaults[event] ?? [];
28672
+ const seen = /* @__PURE__ */ new Set();
28673
+ const combined = [];
28674
+ for (const entry of [...userEntries, ...defaultEntries]) {
28675
+ const key = JSON.stringify({
28676
+ matcher: entry.matcher,
28677
+ hooks: entry.hooks
28678
+ });
28679
+ if (seen.has(key)) continue;
28680
+ seen.add(key);
28681
+ combined.push(entry);
28682
+ }
28683
+ if (combined.length > 0) {
28684
+ merged[event] = combined;
28685
+ }
28686
+ }
28687
+ return Object.keys(merged).length > 0 ? merged : void 0;
28688
+ }
28235
28689
  constructor(project, options = {}) {
28236
28690
  super(project);
28237
28691
  this.options = options;
@@ -28260,7 +28714,8 @@ var AgentConfig = class _AgentConfig extends Component8 {
28260
28714
  if (!this.cachedBundles) {
28261
28715
  this.cachedBundles = buildBuiltInBundles(
28262
28716
  this.resolvedPaths,
28263
- resolveIssueDefaults(this.options.issueDefaults)
28717
+ resolveIssueDefaults(this.options.issueDefaults),
28718
+ resolveDefaultAgentTier(this.options)
28264
28719
  );
28265
28720
  }
28266
28721
  return this.cachedBundles;
@@ -28306,6 +28761,9 @@ var AgentConfig = class _AgentConfig extends Component8 {
28306
28761
  if (resolvedRunRatio.enabled) {
28307
28762
  this.project.gitignore.addPatterns(`/${resolvedRunRatio.stateFilePath}`);
28308
28763
  }
28764
+ if (this.options.claudeSettings?.disableAllHooks !== true) {
28765
+ this.project.gitignore.addPatterns(`/${DEFAULT_USAGE_LOG_PATH}`);
28766
+ }
28309
28767
  validateUnblockDependentsConfig(this.options.unblockDependents);
28310
28768
  validateIssueDefaultsConfig(this.options.issueDefaults);
28311
28769
  const resolvedProgressFiles = validateProgressFilesConfig(
@@ -28370,6 +28828,7 @@ var AgentConfig = class _AgentConfig extends Component8 {
28370
28828
  const skills = this.resolveSkills();
28371
28829
  const subAgents = this.resolveSubAgents();
28372
28830
  const procedures = this.resolveProcedures();
28831
+ const commands = this.resolveCommands();
28373
28832
  const mcpServers = this.options.mcpServers ?? {};
28374
28833
  const projectMetadata = ProjectMetadata.of(this.project);
28375
28834
  const metadata = projectMetadata?.metadata;
@@ -28405,7 +28864,8 @@ var AgentConfig = class _AgentConfig extends Component8 {
28405
28864
  this.options.claudeSettings,
28406
28865
  bundlePermissions
28407
28866
  ),
28408
- resolvedProcedures
28867
+ resolvedProcedures,
28868
+ commands
28409
28869
  );
28410
28870
  }
28411
28871
  if (platforms.includes(AGENT_PLATFORM.CODEX)) {
@@ -28544,6 +29004,7 @@ ${section}`
28544
29004
  }
28545
29005
  }
28546
29006
  }
29007
+ const injectBundleHooks = this.options.claudeMd?.injectBundleHooks ?? true;
28547
29008
  const resolvedProgressFiles = resolveProgressFiles(
28548
29009
  this.options.progressFiles
28549
29010
  );
@@ -28561,7 +29022,7 @@ ${section}`
28561
29022
  }
28562
29023
  }
28563
29024
  }
28564
- if (resolvedProgressFiles.enabled) {
29025
+ if (injectBundleHooks && resolvedProgressFiles.enabled) {
28565
29026
  for (const [ruleName, label] of PROGRESS_FILE_BUNDLE_HOOKS) {
28566
29027
  const existing = ruleMap.get(ruleName);
28567
29028
  if (!existing) {
@@ -28601,7 +29062,7 @@ ${hook}`
28601
29062
  }
28602
29063
  }
28603
29064
  }
28604
- if (resolvedSharedEditingForRules.enabled) {
29065
+ if (injectBundleHooks && resolvedSharedEditingForRules.enabled) {
28605
29066
  for (const [ruleName, label] of SHARED_EDITING_BUNDLE_HOOKS) {
28606
29067
  const existing = ruleMap.get(ruleName);
28607
29068
  if (!existing) {
@@ -28641,7 +29102,7 @@ ${hook}`
28641
29102
  }
28642
29103
  }
28643
29104
  }
28644
- if (resolvedSkillEvalsForRules.enabled) {
29105
+ if (injectBundleHooks && resolvedSkillEvalsForRules.enabled) {
28645
29106
  for (const [ruleName, label] of SKILL_EVALS_BUNDLE_HOOKS) {
28646
29107
  const existing = ruleMap.get(ruleName);
28647
29108
  if (!existing) {
@@ -28686,7 +29147,7 @@ ${hook}`
28686
29147
  if (!hasAnyDocsEmittingBundle(excludedBundleNames)) {
28687
29148
  ruleMap.delete("stub-index-convention");
28688
29149
  }
28689
- if (resolvedIssueTemplatesForRules.enabled && hasDownstreamBundles) {
29150
+ if (injectBundleHooks && resolvedIssueTemplatesForRules.enabled && hasDownstreamBundles) {
28690
29151
  for (const [ruleName, label] of ISSUE_TEMPLATES_BUNDLE_HOOKS) {
28691
29152
  const existing = ruleMap.get(ruleName);
28692
29153
  if (!existing) {
@@ -28734,6 +29195,57 @@ ${hook}`
28734
29195
  }
28735
29196
  }
28736
29197
  }
29198
+ const registryRule = buildAgentRegistryRule(
29199
+ this.activeBundles,
29200
+ this.resolvedPaths
29201
+ );
29202
+ if (registryRule) {
29203
+ let registryContent = registryRule.content;
29204
+ const meetingAnalysisActive = this.activeBundles.some(
29205
+ (b) => b.name === "meeting-analysis"
29206
+ );
29207
+ if (this.options.meetings && meetingAnalysisActive) {
29208
+ const meetingsSection = renderMeetingTypesSection(
29209
+ this.options.meetings
29210
+ );
29211
+ if (meetingsSection.length > 0) {
29212
+ registryContent = `${registryContent}
29213
+
29214
+ ---
29215
+
29216
+ ${meetingsSection}`;
29217
+ }
29218
+ }
29219
+ ruleMap.set(registryRule.name, {
29220
+ ...registryRule,
29221
+ content: registryContent
29222
+ });
29223
+ const customSectionBundles = new Set(
29224
+ (this.options.features?.customDocSections ?? []).map(
29225
+ (s) => s.bundleName
29226
+ )
29227
+ );
29228
+ for (const [ruleName, rule] of ruleMap) {
29229
+ if (!isSuppressedWorkflowRule(ruleName)) {
29230
+ continue;
29231
+ }
29232
+ const owningBundleName = bundleNameForWorkflowRule(ruleName);
29233
+ if (owningBundleName !== void 0 && customSectionBundles.has(owningBundleName)) {
29234
+ continue;
29235
+ }
29236
+ const existingClaude = rule.platforms?.claude ?? {};
29237
+ if (existingClaude.exclude === true) {
29238
+ continue;
29239
+ }
29240
+ ruleMap.set(ruleName, {
29241
+ ...rule,
29242
+ platforms: {
29243
+ ...rule.platforms,
29244
+ claude: { ...existingClaude, exclude: true }
29245
+ }
29246
+ });
29247
+ }
29248
+ }
28737
29249
  return [...ruleMap.values()].sort((a, b) => {
28738
29250
  if (a.name === "project-overview") return -1;
28739
29251
  if (b.name === "project-overview") return 1;
@@ -28882,6 +29394,49 @@ ${hook}`
28882
29394
  }
28883
29395
  return [...procMap.values()];
28884
29396
  }
29397
+ /**
29398
+ * Resolves the final list of slash commands by merging bundle-shipped
29399
+ * defaults with consumer-supplied entries. Mirrors {@link resolveSkills}
29400
+ * and {@link resolveSubAgents}: auto-detected bundles contribute first,
29401
+ * force-included bundles overlay, and consumer commands override on
29402
+ * name collision. Names listed in `excludeCommands` are dropped after
29403
+ * the merge so consumers can opt out of a single default without
29404
+ * disabling the whole bundle.
29405
+ */
29406
+ resolveCommands() {
29407
+ const commandMap = /* @__PURE__ */ new Map();
29408
+ if (this.options.autoDetectBundles !== false) {
29409
+ for (const bundle of this.pathAwareBundles) {
29410
+ if (this.options.excludeBundles?.includes(bundle.name)) continue;
29411
+ if (bundle.appliesWhen(this.project) && bundle.commands) {
29412
+ for (const command of bundle.commands) {
29413
+ commandMap.set(command.name, command);
29414
+ }
29415
+ }
29416
+ }
29417
+ }
29418
+ if (this.options.includeBundles) {
29419
+ for (const bundleName of this.options.includeBundles) {
29420
+ const bundle = this.pathAwareBundles.find((b) => b.name === bundleName);
29421
+ if (bundle?.commands) {
29422
+ for (const command of bundle.commands) {
29423
+ commandMap.set(command.name, command);
29424
+ }
29425
+ }
29426
+ }
29427
+ }
29428
+ if (this.options.commands) {
29429
+ for (const command of this.options.commands) {
29430
+ commandMap.set(command.name, command);
29431
+ }
29432
+ }
29433
+ if (this.options.excludeCommands) {
29434
+ for (const name of this.options.excludeCommands) {
29435
+ commandMap.delete(name);
29436
+ }
29437
+ }
29438
+ return [...commandMap.values()];
29439
+ }
28885
29440
  /**
28886
29441
  * Resolves template variables in rule content using project metadata.
28887
29442
  * Emits synthesis warnings for rules with unresolved variables.
@@ -33326,6 +33881,7 @@ var TypeScriptConfig = class extends Component20 {
33326
33881
  export {
33327
33882
  AGENT_MODEL,
33328
33883
  AGENT_PLATFORM,
33884
+ AGENT_REGISTRY_ENTRIES,
33329
33885
  AGENT_RULE_SCOPE,
33330
33886
  AGENT_TIER_ROLES,
33331
33887
  AGENT_TIER_VALUES,
@@ -33422,6 +33978,7 @@ export {
33422
33978
  SCOPE_CLASS_VALUES,
33423
33979
  SHARED_EDITING_CONFLICT_STRATEGY_VALUES,
33424
33980
  STARLIGHT_ROLE,
33981
+ SUPPRESSED_WORKFLOW_RULE_NAMES,
33425
33982
  SampleLang,
33426
33983
  StarlightProject,
33427
33984
  TestRunner,
@@ -33447,6 +34004,7 @@ export {
33447
34004
  awsCdkBundle,
33448
34005
  baseBundle,
33449
34006
  bcmWriterBundle,
34007
+ buildAgentRegistryRule,
33450
34008
  buildBaseBundle,
33451
34009
  buildBcmWriterBundle,
33452
34010
  buildBuiltInBundles,
@@ -33457,6 +34015,7 @@ export {
33457
34015
  buildDocsSyncBundle,
33458
34016
  buildIndustryDiscoveryBundle,
33459
34017
  buildMaintenanceAuditBundle,
34018
+ buildMeetingAnalysisBundle,
33460
34019
  buildOrchestratorConventionsContent,
33461
34020
  buildPeopleProfileBundle,
33462
34021
  buildRegulatoryResearchBundle,
@@ -33468,6 +34027,7 @@ export {
33468
34027
  buildSoftwareProfileBundle,
33469
34028
  buildStandardsResearchBundle,
33470
34029
  buildUnblockDependentsProcedure,
34030
+ bundleNameForWorkflowRule,
33471
34031
  businessModelsBundle,
33472
34032
  checkDocSamplesProcedure,
33473
34033
  checkLinksProcedure,
@@ -33494,6 +34054,7 @@ export {
33494
34054
  industryDiscoveryBundle,
33495
34055
  isPhaseLabelOwnedByExcluded,
33496
34056
  isScheduledTaskOwnedByExcluded,
34057
+ isSuppressedWorkflowRule,
33497
34058
  isTypeLabelOwnedByExcluded,
33498
34059
  jestBundle,
33499
34060
  labelsForPhase,
@@ -33552,6 +34113,7 @@ export {
33552
34113
  resolveAgentTiers,
33553
34114
  resolveAstroProjectOutdir,
33554
34115
  resolveAwsCdkProjectOutdir,
34116
+ resolveDefaultAgentTier,
33555
34117
  resolveIssueDefaults,
33556
34118
  resolveIssueTemplates,
33557
34119
  resolveModelAlias,