@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.js CHANGED
@@ -177,6 +177,7 @@ var index_exports = {};
177
177
  __export(index_exports, {
178
178
  AGENT_MODEL: () => AGENT_MODEL,
179
179
  AGENT_PLATFORM: () => AGENT_PLATFORM,
180
+ AGENT_REGISTRY_ENTRIES: () => AGENT_REGISTRY_ENTRIES,
180
181
  AGENT_RULE_SCOPE: () => AGENT_RULE_SCOPE,
181
182
  AGENT_TIER_ROLES: () => AGENT_TIER_ROLES,
182
183
  AGENT_TIER_VALUES: () => AGENT_TIER_VALUES,
@@ -273,6 +274,7 @@ __export(index_exports, {
273
274
  SCOPE_CLASS_VALUES: () => SCOPE_CLASS_VALUES,
274
275
  SHARED_EDITING_CONFLICT_STRATEGY_VALUES: () => SHARED_EDITING_CONFLICT_STRATEGY_VALUES,
275
276
  STARLIGHT_ROLE: () => STARLIGHT_ROLE,
277
+ SUPPRESSED_WORKFLOW_RULE_NAMES: () => SUPPRESSED_WORKFLOW_RULE_NAMES,
276
278
  SampleLang: () => SampleLang,
277
279
  StarlightProject: () => StarlightProject,
278
280
  TestRunner: () => TestRunner,
@@ -298,6 +300,7 @@ __export(index_exports, {
298
300
  awsCdkBundle: () => awsCdkBundle,
299
301
  baseBundle: () => baseBundle,
300
302
  bcmWriterBundle: () => bcmWriterBundle,
303
+ buildAgentRegistryRule: () => buildAgentRegistryRule,
301
304
  buildBaseBundle: () => buildBaseBundle,
302
305
  buildBcmWriterBundle: () => buildBcmWriterBundle,
303
306
  buildBuiltInBundles: () => buildBuiltInBundles,
@@ -308,6 +311,7 @@ __export(index_exports, {
308
311
  buildDocsSyncBundle: () => buildDocsSyncBundle,
309
312
  buildIndustryDiscoveryBundle: () => buildIndustryDiscoveryBundle,
310
313
  buildMaintenanceAuditBundle: () => buildMaintenanceAuditBundle,
314
+ buildMeetingAnalysisBundle: () => buildMeetingAnalysisBundle,
311
315
  buildOrchestratorConventionsContent: () => buildOrchestratorConventionsContent,
312
316
  buildPeopleProfileBundle: () => buildPeopleProfileBundle,
313
317
  buildRegulatoryResearchBundle: () => buildRegulatoryResearchBundle,
@@ -319,6 +323,7 @@ __export(index_exports, {
319
323
  buildSoftwareProfileBundle: () => buildSoftwareProfileBundle,
320
324
  buildStandardsResearchBundle: () => buildStandardsResearchBundle,
321
325
  buildUnblockDependentsProcedure: () => buildUnblockDependentsProcedure,
326
+ bundleNameForWorkflowRule: () => bundleNameForWorkflowRule,
322
327
  businessModelsBundle: () => businessModelsBundle,
323
328
  checkDocSamplesProcedure: () => checkDocSamplesProcedure,
324
329
  checkLinksProcedure: () => checkLinksProcedure,
@@ -345,6 +350,7 @@ __export(index_exports, {
345
350
  industryDiscoveryBundle: () => industryDiscoveryBundle,
346
351
  isPhaseLabelOwnedByExcluded: () => isPhaseLabelOwnedByExcluded,
347
352
  isScheduledTaskOwnedByExcluded: () => isScheduledTaskOwnedByExcluded,
353
+ isSuppressedWorkflowRule: () => isSuppressedWorkflowRule,
348
354
  isTypeLabelOwnedByExcluded: () => isTypeLabelOwnedByExcluded,
349
355
  jestBundle: () => jestBundle,
350
356
  labelsForPhase: () => labelsForPhase,
@@ -403,6 +409,7 @@ __export(index_exports, {
403
409
  resolveAgentTiers: () => resolveAgentTiers,
404
410
  resolveAstroProjectOutdir: () => resolveAstroProjectOutdir,
405
411
  resolveAwsCdkProjectOutdir: () => resolveAwsCdkProjectOutdir,
412
+ resolveDefaultAgentTier: () => resolveDefaultAgentTier,
406
413
  resolveIssueDefaults: () => resolveIssueDefaults,
407
414
  resolveIssueTemplates: () => resolveIssueTemplates,
408
415
  resolveModelAlias: () => resolveModelAlias,
@@ -445,6 +452,45 @@ module.exports = __toCommonJS(index_exports);
445
452
  // src/agent/agent-config.ts
446
453
  var import_projen8 = require("projen");
447
454
 
455
+ // src/agent/types.ts
456
+ var AGENT_RULE_SCOPE = {
457
+ ALWAYS: "always",
458
+ FILE_PATTERN: "file-pattern"
459
+ };
460
+ var AGENT_PLATFORM = {
461
+ CURSOR: "cursor",
462
+ CLAUDE: "claude",
463
+ CODEX: "codex",
464
+ COPILOT: "copilot"
465
+ };
466
+ var CLAUDE_RULE_TARGET = {
467
+ SCOPED_FILE: "scoped-file",
468
+ AGENTS_MD: "agents-md",
469
+ CLAUDE_MD: "claude-md"
470
+ };
471
+ var AGENT_MODEL = {
472
+ INHERIT: "inherit",
473
+ FAST: "fast",
474
+ BALANCED: "balanced",
475
+ POWERFUL: "powerful"
476
+ };
477
+ function resolveModelAlias(model) {
478
+ if (!model || model === AGENT_MODEL.INHERIT) {
479
+ return void 0;
480
+ }
481
+ const mapping = {
482
+ [AGENT_MODEL.POWERFUL]: "opus",
483
+ [AGENT_MODEL.BALANCED]: "sonnet",
484
+ [AGENT_MODEL.FAST]: "haiku"
485
+ };
486
+ return mapping[model] ?? model;
487
+ }
488
+ var MCP_TRANSPORT = {
489
+ STDIO: "stdio",
490
+ HTTP: "http",
491
+ SSE: "sse"
492
+ };
493
+
448
494
  // src/agent/bundles/project-context.ts
449
495
  var PROJECT_CONTEXT_PATH = "docs/src/content/docs/project-context.md";
450
496
  var SUBPROJECT_ROLE_GUIDANCE = [
@@ -572,45 +618,6 @@ var MONOREPO_LAYOUT_SEED_BLOCK = [
572
618
  ""
573
619
  ].join("\n");
574
620
 
575
- // src/agent/types.ts
576
- var AGENT_RULE_SCOPE = {
577
- ALWAYS: "always",
578
- FILE_PATTERN: "file-pattern"
579
- };
580
- var AGENT_PLATFORM = {
581
- CURSOR: "cursor",
582
- CLAUDE: "claude",
583
- CODEX: "codex",
584
- COPILOT: "copilot"
585
- };
586
- var CLAUDE_RULE_TARGET = {
587
- SCOPED_FILE: "scoped-file",
588
- AGENTS_MD: "agents-md",
589
- CLAUDE_MD: "claude-md"
590
- };
591
- var AGENT_MODEL = {
592
- INHERIT: "inherit",
593
- FAST: "fast",
594
- BALANCED: "balanced",
595
- POWERFUL: "powerful"
596
- };
597
- function resolveModelAlias(model) {
598
- if (!model || model === AGENT_MODEL.INHERIT) {
599
- return void 0;
600
- }
601
- const mapping = {
602
- [AGENT_MODEL.POWERFUL]: "opus",
603
- [AGENT_MODEL.BALANCED]: "sonnet",
604
- [AGENT_MODEL.FAST]: "haiku"
605
- };
606
- return mapping[model] ?? model;
607
- }
608
- var MCP_TRANSPORT = {
609
- STDIO: "stdio",
610
- HTTP: "http",
611
- SSE: "sse"
612
- };
613
-
614
621
  // src/agent/bundles/agenda.ts
615
622
  var agendaAnalystSubAgent = {
616
623
  name: "agenda-analyst",
@@ -3631,6 +3638,7 @@ function buildBaseBundle(paths = DEFAULT_AGENT_PATHS) {
3631
3638
  "- **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`.",
3632
3639
  "- **Configure dependencies through Projen** \u2014 never use `npm install`, `pnpm add`, or `yarn add`. Add them to `deps` or `devDeps` in Projen config.",
3633
3640
  "- **Export from index.ts** to maintain clean public APIs",
3641
+ '- **`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`.',
3634
3642
  "",
3635
3643
  "## Repository Layout",
3636
3644
  "",
@@ -6106,11 +6114,11 @@ function buildBusinessModelsBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults =
6106
6114
  var businessModelsBundle = buildBusinessModelsBundle();
6107
6115
 
6108
6116
  // src/agent/bundles/company-profile.ts
6109
- function buildCompanyProfileAnalystSubAgent(paths, issueDefaults) {
6117
+ function buildCompanyProfileAnalystSubAgent(paths, issueDefaults, tier) {
6110
6118
  return {
6111
6119
  name: "company-profile-analyst",
6112
6120
  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.",
6113
- model: AGENT_MODEL.POWERFUL,
6121
+ model: tier,
6114
6122
  maxTurns: 80,
6115
6123
  platforms: { cursor: { exclude: true } },
6116
6124
  prompt: [
@@ -7297,7 +7305,7 @@ function buildAnalyzeSegmentSkill(paths, issueDefaults) {
7297
7305
  ].join("\n")
7298
7306
  };
7299
7307
  }
7300
- function buildCompanyProfileBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAULT_RESOLVED_ISSUE_DEFAULTS) {
7308
+ function buildCompanyProfileBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAULT_RESOLVED_ISSUE_DEFAULTS, tier = AGENT_MODEL.BALANCED) {
7301
7309
  return {
7302
7310
  name: "company-profile",
7303
7311
  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.",
@@ -7355,7 +7363,7 @@ function buildCompanyProfileBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults =
7355
7363
  buildRefreshCompanySkill(paths, issueDefaults),
7356
7364
  buildAnalyzeSegmentSkill(paths, issueDefaults)
7357
7365
  ],
7358
- subAgents: [buildCompanyProfileAnalystSubAgent(paths, issueDefaults)],
7366
+ subAgents: [buildCompanyProfileAnalystSubAgent(paths, issueDefaults, tier)],
7359
7367
  labels: [
7360
7368
  {
7361
7369
  name: "type:company-profile",
@@ -7535,11 +7543,11 @@ var CUSTOMER_PROFILE_REFERENCE_FILES = [
7535
7543
  content: TEMPLATE_CUSTOMER_PROFILE
7536
7544
  }
7537
7545
  ];
7538
- function buildCustomerProfileAnalystSubAgent(paths, issueDefaults) {
7546
+ function buildCustomerProfileAnalystSubAgent(paths, issueDefaults, tier) {
7539
7547
  return {
7540
7548
  name: "customer-profile-analyst",
7541
7549
  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.",
7542
- model: AGENT_MODEL.POWERFUL,
7550
+ model: tier,
7543
7551
  maxTurns: 80,
7544
7552
  platforms: { cursor: { exclude: true } },
7545
7553
  prompt: [
@@ -8364,7 +8372,7 @@ function buildAnalyzeCustomerCompetitorsSkill(paths, issueDefaults) {
8364
8372
  ].join("\n")
8365
8373
  };
8366
8374
  }
8367
- function buildCustomerProfileBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAULT_RESOLVED_ISSUE_DEFAULTS) {
8375
+ function buildCustomerProfileBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAULT_RESOLVED_ISSUE_DEFAULTS, tier = AGENT_MODEL.BALANCED) {
8368
8376
  return {
8369
8377
  name: "customer-profile",
8370
8378
  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.",
@@ -8439,7 +8447,9 @@ function buildCustomerProfileBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults =
8439
8447
  buildProfileCustomerSkill(paths, issueDefaults),
8440
8448
  buildAnalyzeCustomerCompetitorsSkill(paths, issueDefaults)
8441
8449
  ],
8442
- subAgents: [buildCustomerProfileAnalystSubAgent(paths, issueDefaults)],
8450
+ subAgents: [
8451
+ buildCustomerProfileAnalystSubAgent(paths, issueDefaults, tier)
8452
+ ],
8443
8453
  labels: [
8444
8454
  {
8445
8455
  name: "type:customer-profile",
@@ -10222,11 +10232,11 @@ var jestBundle = {
10222
10232
  };
10223
10233
 
10224
10234
  // src/agent/bundles/maintenance-audit.ts
10225
- function buildMaintenanceAuditSubAgent(paths) {
10235
+ function buildMaintenanceAuditSubAgent(paths, tier) {
10226
10236
  return {
10227
10237
  name: "maintenance-audit",
10228
10238
  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.",
10229
- model: AGENT_MODEL.POWERFUL,
10239
+ model: tier,
10230
10240
  maxTurns: 80,
10231
10241
  platforms: { cursor: { exclude: true } },
10232
10242
  prompt: [
@@ -10860,7 +10870,7 @@ function buildMaintenanceVerifySkill(issueDefaults) {
10860
10870
  ].join("\n")
10861
10871
  };
10862
10872
  }
10863
- function buildMaintenanceAuditBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAULT_RESOLVED_ISSUE_DEFAULTS) {
10873
+ function buildMaintenanceAuditBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAULT_RESOLVED_ISSUE_DEFAULTS, tier = AGENT_MODEL.BALANCED) {
10864
10874
  return {
10865
10875
  name: "maintenance-audit",
10866
10876
  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.",
@@ -10907,7 +10917,7 @@ function buildMaintenanceAuditBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults
10907
10917
  buildMaintenanceAuditSkill(paths, issueDefaults),
10908
10918
  buildMaintenanceVerifySkill(issueDefaults)
10909
10919
  ],
10910
- subAgents: [buildMaintenanceAuditSubAgent(paths)],
10920
+ subAgents: [buildMaintenanceAuditSubAgent(paths, tier)],
10911
10921
  labels: [
10912
10922
  {
10913
10923
  name: "type:maintenance",
@@ -10935,351 +10945,353 @@ function buildMaintenanceAuditBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults
10935
10945
  var maintenanceAuditBundle = buildMaintenanceAuditBundle();
10936
10946
 
10937
10947
  // src/agent/bundles/meeting-analysis.ts
10938
- var meetingAnalystSubAgent = {
10939
- name: "meeting-analyst",
10940
- description: "Processes meeting transcripts through a 4-phase pipeline: extract, notes, draft, and link",
10941
- model: AGENT_MODEL.POWERFUL,
10942
- maxTurns: 80,
10943
- platforms: { cursor: { exclude: true } },
10944
- prompt: [
10945
- "# Meeting Analyst Agent",
10946
- "",
10947
- "You process meeting transcripts through a structured 4-phase pipeline.",
10948
- "Each phase runs as a **separate agent session**, triggered by its own",
10949
- "GitHub issue with a `meeting:*` phase label. You handle exactly **one",
10950
- "phase per session** \u2014 read the issue to determine which phase to execute.",
10951
- "",
10952
- "## Execution Model",
10953
- "",
10954
- "1. Each meeting produces up to 4 GitHub issues (one per phase)",
10955
- "2. Each issue carries a `meeting:*` label identifying the phase",
10956
- "3. You pick up one issue, execute that phase, commit/push, then close the issue",
10957
- "4. Phase 1 (Extract) creates the downstream phase issues for phases 2-4",
10958
- "5. Each downstream issue includes `Depends on: #N` linking to its predecessor",
10959
- "",
10960
- "## Design Principles",
10961
- "",
10962
- "1. **Extract, don't interpret.** Capture what was said and decided. Flag",
10963
- " ambiguity as open items rather than resolving it.",
10964
- "2. **Route to the right category.** Meeting content maps to requirements,",
10965
- " ADRs, product docs, and business strategy. Each output goes to the",
10966
- " correct location per the project's taxonomy.",
10967
- "3. **Preserve provenance.** Every extracted item links back to the meeting",
10968
- " source so reviewers can check context.",
10969
- "4. **Create issues, not documents.** For requirements and ADRs, create",
10970
- " GitHub issues that other agents or humans will pick up. Do not write",
10971
- " final requirement documents yourself.",
10972
- "5. **Bi-directional traceability.** Every document and issue created by",
10973
- " this pipeline must link back to the meeting source, and the meeting",
10974
- " source documents must link forward to everything created from them.",
10975
- "6. **Respect meeting type and areas.** Read the `meeting_type` and",
10976
- " `areas` values from the meeting frontmatter before starting Phase 1.",
10977
- " Apply the type-specific rules from the **Meeting type handling**",
10978
- " table (phases 1\u20132) and the area-filtered routing rules from the",
10979
- " **Areas filtering** table (phase 4).",
10980
- "",
10981
- "---",
10982
- "",
10983
- "## Meeting type handling",
10984
- "",
10985
- "Meeting frontmatter is expected to carry a `meeting_type` field whose",
10986
- "value is one of the project's concrete meeting-type `id`s (declared",
10987
- "via `AgentConfigOptions.meetings.meetingTypes`). Each concrete `id`",
10988
- "maps to one of six generic **meeting kinds** that drive type-specific",
10989
- "extraction rules:",
10990
- "",
10991
- "| Kind | Primary outputs | Phase-1/2 rules |",
10992
- "|------|-----------------|-----------------|",
10993
- "| `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. |",
10994
- "| `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. |",
10995
- "| `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. |",
10996
- "| `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. |",
10997
- "| `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. |",
10998
- "| `other` | General meeting extraction | Apply the default workflow with no type-specific overrides. |",
10999
- "",
11000
- "**How to resolve the kind:**",
11001
- "",
11002
- "1. Read `meeting_type` from the frontmatter.",
11003
- "2. Look up the matching `id` in the project's **Recognized meeting",
11004
- " types** table (rendered below when `meetingTypes` is declared).",
11005
- "3. Use the `Kind` column value. If the table is absent, the `id` is",
11006
- " unknown, or the `Kind` column is `\u2014`, fall back to `other`.",
11007
- "4. Apply the rules in the row above **in addition to** the normal",
11008
- " phase workflow \u2014 never as a replacement.",
11009
- "",
11010
- "If `meeting_type` is missing, invalid, or the declared `id` is not in",
11011
- "the project's table, note it in the extraction's Open Questions and",
11012
- "proceed with the default workflow (treat as `other`).",
11013
- "",
11014
- "## Areas filtering",
11015
- "",
11016
- "Meeting frontmatter may carry an `areas: [...]` list whose values",
11017
- "match `id`s from the project's **Area \u2192 doc-root mapping** table",
11018
- "(declared via `AgentConfigOptions.meetings.meetingAreas`). The list",
11019
- "scopes phase-4 direct edits and cross-references to the doc-root",
11020
- "sub-folders registered for those areas. A given area's effective",
11021
- "path resolves as `<docsRoot>/<docRoot>` \u2014 `docsRoot` comes from",
11022
- "`AgentPathsConfig.docsRoot`; `docRoot` is the sub-folder shown in",
11023
- "the **Area \u2192 doc-root mapping** table.",
11024
- "",
11025
- "**Gating contract (phase 4 only):**",
11026
- "",
11027
- "- **Scoped in:** direct edits and cross-reference stubs under the",
11028
- " `docRoot` of every `id` present in the meeting's `areas` list.",
11029
- "- **Scoped out:** direct edits to any doc-root sub-folder that is",
11030
- " declared in the project's area map but whose `id` is **not** in",
11031
- " the meeting's `areas`. For those out-of-scope areas, create",
11032
- " follow-up issues instead of editing the doc directly.",
11033
- "- **Not gated:** issue creation (requirements, ADRs, profiles,",
11034
- " research) is always in scope regardless of areas.",
11035
- "",
11036
- "**Resolution rules:**",
11037
- "",
11038
- "1. If the meeting's `areas` frontmatter is missing or empty **and**",
11039
- " the project has declared a non-empty `meetingAreas` map, no",
11040
- " doc-root sub-folder is gated in: direct edits to any declared",
11041
- " `docRoot` sub-folder are out-of-scope and become follow-up issues",
11042
- " per step 6. Only the default meetings root (`meetingsRoot`)",
11043
- " remains editable.",
11044
- "2. If `areas` lists an `id` that is not in the project's area map,",
11045
- " note it in the extraction's Open Questions and treat the unknown",
11046
- " `id` as absent. Do **not** invent a doc-root path for it.",
11047
- "3. Out-of-scope direct edits become `type:docs` follow-up issues on",
11048
- " phase 4 step 6, with the area noted in the issue body.",
11049
- "",
11050
- "When the project has **not** declared any `meetingAreas` at all,",
11051
- "this section applies degenerately \u2014 no areas are gated, no",
11052
- "follow-up issues are synthesized for missing areas, and phase-4",
11053
- "direct edits follow the default workflow (step 6 edits any doc",
11054
- "flagged as Firm, unrestricted by `docRoot`).",
11055
- "",
11056
- "---",
11057
- "",
11058
- ...PROJECT_CONTEXT_MAINTAINER_SECTION,
11059
- "## Traceability",
11060
- "",
11061
- "All outputs must be bi-directionally linked so any artifact can be traced",
11062
- "back to the meeting that produced it and forward to everything it spawned.",
11063
- "",
11064
- "### Backward links (created artifact \u2192 meeting source)",
11065
- "",
11066
- "Every GitHub issue and document created by this pipeline must include a",
11067
- "`## Traceability` section with:",
11068
- "",
11069
- "```markdown",
11070
- "## Traceability",
11071
- "",
11072
- "- **Source meeting:** <path to transcript or meeting notes>",
11073
- "- **Extraction:** <path to extraction file>",
11074
- "- **Phase issue:** #<N> (the phase issue that created this artifact)",
11075
- "```",
11076
- "",
11077
- "### Forward links (meeting source \u2192 created artifacts)",
11078
- "",
11079
- "After Phase 4 (Link) creates all follow-up issues and documents:",
11080
- "",
11081
- "1. **Update the extraction file** with a `## Downstream Artifacts` section",
11082
- " listing every issue and document created from this meeting:",
11083
- "",
11084
- " ```markdown",
11085
- " ## Downstream Artifacts",
11086
- "",
11087
- " | Artifact | Type | Issue/Path |",
11088
- " |----------|------|------------|",
11089
- " | <title> | requirement / ADR / action-item / profile | #<N> or <path> |",
11090
- " ```",
11091
- "",
11092
- "2. **Update the meeting notes** with a similar `## Related Issues` section",
11093
- " listing all issues created from this meeting.",
11094
- "",
11095
- "3. **Comment on the extract issue** with a summary linking to all created",
11096
- " artifacts.",
11097
- "",
11098
- "### Within-pipeline links",
11099
- "",
11100
- "- Phase issues link to predecessors via `Depends on: #N`",
11101
- "- Phase issues reference the extraction file path in their body",
11102
- "- Draft documents reference both the extraction and the meeting notes",
11103
- "",
11104
- "---",
11105
- "",
11106
- "## Phase 1: Extract (`meeting:extract`)",
11107
- "",
11108
- "**Goal:** Read the meeting transcript and categorize all substantive content.",
11109
- "",
11110
- "### Steps",
11111
- "",
11112
- "1. Read the transcript file specified in the issue body. Parse the",
11113
- " meeting-note frontmatter first, capturing `meeting_type` and",
11114
- " `areas`. Resolve `meeting_type` to a kind using the **Meeting type",
11115
- " handling** table; note the resolved kind in the extraction",
11116
- " frontmatter. If `meeting_type` is missing or not in the project's",
11117
- " Recognized meeting types table, treat it as `other` and flag it",
11118
- " in Open Questions.",
11119
- "2. Identify and categorize content into these buckets:",
11120
- "",
11121
- " | Bucket | What to look for |",
11122
- " |--------|-----------------|",
11123
- ` | **Decisions** | "We decided...", "Let's go with...", explicit choices |`,
11124
- ' | **Requirements** | Feature descriptions, acceptance criteria, "it should..." |',
11125
- " | **Technology discussions** | Platform comparisons, architecture options, tool evaluations |",
11126
- ' | **Action items** | "[Person] will...", "Next step is...", assigned tasks |',
11127
- ' | **Open questions** | "We need to figure out...", unresolved debates |',
11128
- " | **People of interest** | Industry contacts, domain experts mentioned |",
11129
- " | **Companies of interest** | Competitors, vendors, partners discussed |",
11130
- " | **Strategic direction** | Business model changes, market positioning |",
11131
- " | **Product direction** | Roadmap changes, feature prioritization |",
11132
- "",
11133
- "3. Write the extraction to a markdown file with structured sections:",
11134
- " - Attendees",
11135
- " - Decisions Made (with category and confidence: Firm / Tentative / Needs confirmation)",
11136
- " - Requirements Identified (with category and priority estimate)",
11137
- " - Technology Discussions (with status: Decided / Leaning toward / Open)",
11138
- " - Action Items (with assignee and due date if stated)",
11139
- " - Open Questions",
11140
- " - People of Interest (with context and whether a profile exists)",
11141
- " - Companies of Interest (with type and context)",
11142
- " - Strategic / Product Direction",
11143
- "",
11144
- " Carry `meeting_type`, the resolved `meeting_kind`, and `areas`",
11145
- " into the extraction frontmatter so downstream phases can gate",
11146
- " behaviour without re-parsing the meeting note.",
11147
- "",
11148
- "4. **Apply type-specific rules.** Consult the **Meeting type handling**",
11149
- " table for the resolved kind and apply its phase-1 rules in",
11150
- " addition to the default extraction above. Examples:",
11151
- " - `standup`: skip requirement, ADR, and BDR extraction; focus on",
11152
- " action items and status.",
11153
- " - `brainstorm`: emphasize Open Questions and Future Features.",
11154
- " Only mark decisions as Firm when the transcript is unambiguous.",
11155
- " - `external`: default attendees outside the team into People of",
11156
- " Interest; default organizations mentioned into Companies of",
11157
- " Interest (signal threshold still applies); capture customer",
11158
- " pain points as candidate BR (not FR).",
11159
- "",
11160
- "5. **Create downstream phase issues** using `gh issue create`:",
11161
- " - Always create a `meeting:notes` issue (blocked on this extract issue)",
11162
- " - If requirements OR decisions/ADRs identified, create a `meeting:draft` issue",
11163
- " (blocked on the notes issue). For kind `standup`, skip the",
11164
- " `meeting:draft` issue \u2014 standup meetings almost never produce",
11165
- " formal drafts.",
11166
- " - Always create a `meeting:link` issue \u2014 blocked on the draft issue if one",
11167
- " was created, otherwise blocked on the notes issue",
11168
- "",
11169
- "6. Commit, push, and close the extract issue.",
11170
- "",
11171
- "---",
11172
- "",
11173
- "## Phase 2: Notes (`meeting:notes`)",
11174
- "",
11175
- "**Goal:** Transform the extraction into structured meeting notes.",
11176
- "",
11177
- "### Steps",
11178
- "",
11179
- "1. Read the extraction file referenced in the issue body (output of Phase 1).",
11180
- "2. Write structured meeting notes with these sections:",
11181
- " - Meeting metadata (title, date, attendees)",
11182
- " - Agenda / topics covered",
11183
- " - Key Discussion Points (organized by topic)",
11184
- " - Decisions (numbered, with rationale)",
11185
- " - Action Items (table: who, what, when)",
11186
- " - Open Questions",
11187
- " - Follow-up items",
11188
- "3. Commit, push, and close the notes issue.",
11189
- "",
11190
- "---",
11191
- "",
11192
- "## Phase 3: Draft (`meeting:draft`)",
11193
- "",
11194
- "**Goal:** Draft proposals for requirements, ADRs, and product/strategy updates.",
11195
- "",
11196
- "This phase only exists if the extraction identified requirements, architectural",
11197
- "decisions, or strategy changes. If this issue exists, execute it.",
11198
- "",
11199
- "### Steps",
11200
- "",
11201
- "1. Read the extraction file from Phase 1.",
11202
- "2. Check existing requirement registries and ADR registries for duplicates.",
11203
- "3. Draft requirement proposals with:",
11204
- " - Category (FR, BR, NFR, etc.)",
11205
- " - Summary (2-3 sentences)",
11206
- " - Draft acceptance criteria",
11207
- " - Related existing requirements",
11208
- "4. Draft ADR proposals for technology decisions with:",
11209
- " - Context and problem statement",
11210
- " - Options discussed",
11211
- " - Stated preferences or decisions",
11212
- " - Status: Proposed or Decided",
11213
- "5. Summarize product/strategy document updates needed.",
11214
- "6. Commit, push, and close the draft issue.",
11215
- "",
11216
- "---",
11217
- "",
11218
- "## Phase 4: Link (`meeting:link`)",
11219
- "",
11220
- "**Goal:** Create GitHub issues for follow-up work, cross-reference the",
11221
- "meeting into existing documentation, and complete bi-directional traceability.",
11222
- "",
11223
- "### Steps",
11224
- "",
11225
- "1. Read the drafts from Phase 3 (if they exist) and the extraction from Phase 1.",
11226
- " Re-read the extraction frontmatter for `meeting_kind` and `areas`,",
11227
- " then build the area-gate: the set of `docRoot` sub-folders that",
11228
- " are in scope for direct edits on this meeting. Apply the rules in",
11229
- " the **Areas filtering** section above.",
11230
- "2. Create requirement issues using `gh issue create` with appropriate labels.",
11231
- " Include a `## Traceability` section in each issue body linking back to",
11232
- " the source meeting and extraction file. Issue creation is **not**",
11233
- " gated by areas.",
11234
- "3. Create ADR issues if technology decisions need formal records.",
11235
- " Include a `## Traceability` section in each. Not gated by areas.",
11236
- "4. Create action item issues for tasks that are not document-related.",
11237
- " Include a `## Traceability` section in each. Not gated by areas.",
11238
- "5. Cross-reference the meeting in any existing documents that were",
11239
- " discussed **and that live under an in-scope `docRoot`**. For",
11240
- " discussed documents under an out-of-scope `docRoot`, open a",
11241
- " follow-up `type:docs` issue instead of editing the doc directly.",
11242
- "6. Apply direct product/strategy doc updates for items flagged as",
11243
- " **Firm** confidence. When the project declares `meetingAreas`,",
11244
- " gate these edits: only apply them when the target path lies",
11245
- " under an in-scope `docRoot`, and for Firm items targeting an",
11246
- " out-of-scope `docRoot` open a follow-up `type:docs` issue",
11247
- " noting the area and the target path. When the project has not",
11248
- " declared any `meetingAreas`, apply Firm updates unrestricted",
11249
- " (the degenerate case above). For the kind `planning`, also",
11250
- " update the active sprint-plan doc directly (when the",
11251
- " sprint-plan doc's area is in-scope, or always when no",
11252
- " `meetingAreas` are declared); for the kind `review`, mark",
11253
- " completed tasks in that same doc.",
11254
- "7. **Update the extraction file** with a `## Downstream Artifacts` section",
11255
- " listing every issue and document created from this meeting. Note",
11256
- " any items that were deferred to follow-up issues because of the",
11257
- " area gate.",
11258
- "8. **Update the meeting notes** with a `## Related Issues` section listing",
11259
- " all issues created from this meeting.",
11260
- "9. Comment on the parent extract issue with a summary linking to all",
11261
- " created artifacts.",
11262
- "10. Commit and push (if any file changes were made), then close the link issue.",
11263
- "",
11264
- "---",
11265
- "",
11266
- "## GitHub Integration",
11267
- "",
11268
- "- Use `gh` CLI for all GitHub operations",
11269
- "- Apply the appropriate `meeting:*` phase label to each phase issue",
11270
- "- Use `type:docs` for documentation-producing issues, `type:chore` for",
11271
- " maintenance/organizational tasks",
11272
- "- Use `status:` labels to track progress (`status:ready`, `status:in-progress`, `status:done`)",
11273
- "- Reference the source meeting transcript in all created issues",
11274
- "- Link phase issues with `Depends on: #N` to enforce ordering",
11275
- "",
11276
- "## When to Shorten the Pipeline",
11277
- "",
11278
- "- **Short meetings** (<30 min, <2000 words): combine extract + notes into one session",
11279
- "- **No requirements or decisions**: Phase 1 skips creating the `meeting:draft` issue",
11280
- "- **Only action items**: extract + notes + link (3 phase issues)"
11281
- ].join("\n")
11282
- };
10948
+ function buildMeetingAnalystSubAgent(tier) {
10949
+ return {
10950
+ name: "meeting-analyst",
10951
+ description: "Processes meeting transcripts through a 4-phase pipeline: extract, notes, draft, and link",
10952
+ model: tier,
10953
+ maxTurns: 80,
10954
+ platforms: { cursor: { exclude: true } },
10955
+ prompt: [
10956
+ "# Meeting Analyst Agent",
10957
+ "",
10958
+ "You process meeting transcripts through a structured 4-phase pipeline.",
10959
+ "Each phase runs as a **separate agent session**, triggered by its own",
10960
+ "GitHub issue with a `meeting:*` phase label. You handle exactly **one",
10961
+ "phase per session** \u2014 read the issue to determine which phase to execute.",
10962
+ "",
10963
+ "## Execution Model",
10964
+ "",
10965
+ "1. Each meeting produces up to 4 GitHub issues (one per phase)",
10966
+ "2. Each issue carries a `meeting:*` label identifying the phase",
10967
+ "3. You pick up one issue, execute that phase, commit/push, then close the issue",
10968
+ "4. Phase 1 (Extract) creates the downstream phase issues for phases 2-4",
10969
+ "5. Each downstream issue includes `Depends on: #N` linking to its predecessor",
10970
+ "",
10971
+ "## Design Principles",
10972
+ "",
10973
+ "1. **Extract, don't interpret.** Capture what was said and decided. Flag",
10974
+ " ambiguity as open items rather than resolving it.",
10975
+ "2. **Route to the right category.** Meeting content maps to requirements,",
10976
+ " ADRs, product docs, and business strategy. Each output goes to the",
10977
+ " correct location per the project's taxonomy.",
10978
+ "3. **Preserve provenance.** Every extracted item links back to the meeting",
10979
+ " source so reviewers can check context.",
10980
+ "4. **Create issues, not documents.** For requirements and ADRs, create",
10981
+ " GitHub issues that other agents or humans will pick up. Do not write",
10982
+ " final requirement documents yourself.",
10983
+ "5. **Bi-directional traceability.** Every document and issue created by",
10984
+ " this pipeline must link back to the meeting source, and the meeting",
10985
+ " source documents must link forward to everything created from them.",
10986
+ "6. **Respect meeting type and areas.** Read the `meeting_type` and",
10987
+ " `areas` values from the meeting frontmatter before starting Phase 1.",
10988
+ " Apply the type-specific rules from the **Meeting type handling**",
10989
+ " table (phases 1\u20132) and the area-filtered routing rules from the",
10990
+ " **Areas filtering** table (phase 4).",
10991
+ "",
10992
+ "---",
10993
+ "",
10994
+ "## Meeting type handling",
10995
+ "",
10996
+ "Meeting frontmatter is expected to carry a `meeting_type` field whose",
10997
+ "value is one of the project's concrete meeting-type `id`s (declared",
10998
+ "via `AgentConfigOptions.meetings.meetingTypes`). Each concrete `id`",
10999
+ "maps to one of six generic **meeting kinds** that drive type-specific",
11000
+ "extraction rules:",
11001
+ "",
11002
+ "| Kind | Primary outputs | Phase-1/2 rules |",
11003
+ "|------|-----------------|-----------------|",
11004
+ "| `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. |",
11005
+ "| `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. |",
11006
+ "| `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. |",
11007
+ "| `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. |",
11008
+ "| `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. |",
11009
+ "| `other` | General meeting extraction | Apply the default workflow with no type-specific overrides. |",
11010
+ "",
11011
+ "**How to resolve the kind:**",
11012
+ "",
11013
+ "1. Read `meeting_type` from the frontmatter.",
11014
+ "2. Look up the matching `id` in the project's **Recognized meeting",
11015
+ " types** table (rendered below when `meetingTypes` is declared).",
11016
+ "3. Use the `Kind` column value. If the table is absent, the `id` is",
11017
+ " unknown, or the `Kind` column is `\u2014`, fall back to `other`.",
11018
+ "4. Apply the rules in the row above **in addition to** the normal",
11019
+ " phase workflow \u2014 never as a replacement.",
11020
+ "",
11021
+ "If `meeting_type` is missing, invalid, or the declared `id` is not in",
11022
+ "the project's table, note it in the extraction's Open Questions and",
11023
+ "proceed with the default workflow (treat as `other`).",
11024
+ "",
11025
+ "## Areas filtering",
11026
+ "",
11027
+ "Meeting frontmatter may carry an `areas: [...]` list whose values",
11028
+ "match `id`s from the project's **Area \u2192 doc-root mapping** table",
11029
+ "(declared via `AgentConfigOptions.meetings.meetingAreas`). The list",
11030
+ "scopes phase-4 direct edits and cross-references to the doc-root",
11031
+ "sub-folders registered for those areas. A given area's effective",
11032
+ "path resolves as `<docsRoot>/<docRoot>` \u2014 `docsRoot` comes from",
11033
+ "`AgentPathsConfig.docsRoot`; `docRoot` is the sub-folder shown in",
11034
+ "the **Area \u2192 doc-root mapping** table.",
11035
+ "",
11036
+ "**Gating contract (phase 4 only):**",
11037
+ "",
11038
+ "- **Scoped in:** direct edits and cross-reference stubs under the",
11039
+ " `docRoot` of every `id` present in the meeting's `areas` list.",
11040
+ "- **Scoped out:** direct edits to any doc-root sub-folder that is",
11041
+ " declared in the project's area map but whose `id` is **not** in",
11042
+ " the meeting's `areas`. For those out-of-scope areas, create",
11043
+ " follow-up issues instead of editing the doc directly.",
11044
+ "- **Not gated:** issue creation (requirements, ADRs, profiles,",
11045
+ " research) is always in scope regardless of areas.",
11046
+ "",
11047
+ "**Resolution rules:**",
11048
+ "",
11049
+ "1. If the meeting's `areas` frontmatter is missing or empty **and**",
11050
+ " the project has declared a non-empty `meetingAreas` map, no",
11051
+ " doc-root sub-folder is gated in: direct edits to any declared",
11052
+ " `docRoot` sub-folder are out-of-scope and become follow-up issues",
11053
+ " per step 6. Only the default meetings root (`meetingsRoot`)",
11054
+ " remains editable.",
11055
+ "2. If `areas` lists an `id` that is not in the project's area map,",
11056
+ " note it in the extraction's Open Questions and treat the unknown",
11057
+ " `id` as absent. Do **not** invent a doc-root path for it.",
11058
+ "3. Out-of-scope direct edits become `type:docs` follow-up issues on",
11059
+ " phase 4 step 6, with the area noted in the issue body.",
11060
+ "",
11061
+ "When the project has **not** declared any `meetingAreas` at all,",
11062
+ "this section applies degenerately \u2014 no areas are gated, no",
11063
+ "follow-up issues are synthesized for missing areas, and phase-4",
11064
+ "direct edits follow the default workflow (step 6 edits any doc",
11065
+ "flagged as Firm, unrestricted by `docRoot`).",
11066
+ "",
11067
+ "---",
11068
+ "",
11069
+ ...PROJECT_CONTEXT_MAINTAINER_SECTION,
11070
+ "## Traceability",
11071
+ "",
11072
+ "All outputs must be bi-directionally linked so any artifact can be traced",
11073
+ "back to the meeting that produced it and forward to everything it spawned.",
11074
+ "",
11075
+ "### Backward links (created artifact \u2192 meeting source)",
11076
+ "",
11077
+ "Every GitHub issue and document created by this pipeline must include a",
11078
+ "`## Traceability` section with:",
11079
+ "",
11080
+ "```markdown",
11081
+ "## Traceability",
11082
+ "",
11083
+ "- **Source meeting:** <path to transcript or meeting notes>",
11084
+ "- **Extraction:** <path to extraction file>",
11085
+ "- **Phase issue:** #<N> (the phase issue that created this artifact)",
11086
+ "```",
11087
+ "",
11088
+ "### Forward links (meeting source \u2192 created artifacts)",
11089
+ "",
11090
+ "After Phase 4 (Link) creates all follow-up issues and documents:",
11091
+ "",
11092
+ "1. **Update the extraction file** with a `## Downstream Artifacts` section",
11093
+ " listing every issue and document created from this meeting:",
11094
+ "",
11095
+ " ```markdown",
11096
+ " ## Downstream Artifacts",
11097
+ "",
11098
+ " | Artifact | Type | Issue/Path |",
11099
+ " |----------|------|------------|",
11100
+ " | <title> | requirement / ADR / action-item / profile | #<N> or <path> |",
11101
+ " ```",
11102
+ "",
11103
+ "2. **Update the meeting notes** with a similar `## Related Issues` section",
11104
+ " listing all issues created from this meeting.",
11105
+ "",
11106
+ "3. **Comment on the extract issue** with a summary linking to all created",
11107
+ " artifacts.",
11108
+ "",
11109
+ "### Within-pipeline links",
11110
+ "",
11111
+ "- Phase issues link to predecessors via `Depends on: #N`",
11112
+ "- Phase issues reference the extraction file path in their body",
11113
+ "- Draft documents reference both the extraction and the meeting notes",
11114
+ "",
11115
+ "---",
11116
+ "",
11117
+ "## Phase 1: Extract (`meeting:extract`)",
11118
+ "",
11119
+ "**Goal:** Read the meeting transcript and categorize all substantive content.",
11120
+ "",
11121
+ "### Steps",
11122
+ "",
11123
+ "1. Read the transcript file specified in the issue body. Parse the",
11124
+ " meeting-note frontmatter first, capturing `meeting_type` and",
11125
+ " `areas`. Resolve `meeting_type` to a kind using the **Meeting type",
11126
+ " handling** table; note the resolved kind in the extraction",
11127
+ " frontmatter. If `meeting_type` is missing or not in the project's",
11128
+ " Recognized meeting types table, treat it as `other` and flag it",
11129
+ " in Open Questions.",
11130
+ "2. Identify and categorize content into these buckets:",
11131
+ "",
11132
+ " | Bucket | What to look for |",
11133
+ " |--------|-----------------|",
11134
+ ` | **Decisions** | "We decided...", "Let's go with...", explicit choices |`,
11135
+ ' | **Requirements** | Feature descriptions, acceptance criteria, "it should..." |',
11136
+ " | **Technology discussions** | Platform comparisons, architecture options, tool evaluations |",
11137
+ ' | **Action items** | "[Person] will...", "Next step is...", assigned tasks |',
11138
+ ' | **Open questions** | "We need to figure out...", unresolved debates |',
11139
+ " | **People of interest** | Industry contacts, domain experts mentioned |",
11140
+ " | **Companies of interest** | Competitors, vendors, partners discussed |",
11141
+ " | **Strategic direction** | Business model changes, market positioning |",
11142
+ " | **Product direction** | Roadmap changes, feature prioritization |",
11143
+ "",
11144
+ "3. Write the extraction to a markdown file with structured sections:",
11145
+ " - Attendees",
11146
+ " - Decisions Made (with category and confidence: Firm / Tentative / Needs confirmation)",
11147
+ " - Requirements Identified (with category and priority estimate)",
11148
+ " - Technology Discussions (with status: Decided / Leaning toward / Open)",
11149
+ " - Action Items (with assignee and due date if stated)",
11150
+ " - Open Questions",
11151
+ " - People of Interest (with context and whether a profile exists)",
11152
+ " - Companies of Interest (with type and context)",
11153
+ " - Strategic / Product Direction",
11154
+ "",
11155
+ " Carry `meeting_type`, the resolved `meeting_kind`, and `areas`",
11156
+ " into the extraction frontmatter so downstream phases can gate",
11157
+ " behaviour without re-parsing the meeting note.",
11158
+ "",
11159
+ "4. **Apply type-specific rules.** Consult the **Meeting type handling**",
11160
+ " table for the resolved kind and apply its phase-1 rules in",
11161
+ " addition to the default extraction above. Examples:",
11162
+ " - `standup`: skip requirement, ADR, and BDR extraction; focus on",
11163
+ " action items and status.",
11164
+ " - `brainstorm`: emphasize Open Questions and Future Features.",
11165
+ " Only mark decisions as Firm when the transcript is unambiguous.",
11166
+ " - `external`: default attendees outside the team into People of",
11167
+ " Interest; default organizations mentioned into Companies of",
11168
+ " Interest (signal threshold still applies); capture customer",
11169
+ " pain points as candidate BR (not FR).",
11170
+ "",
11171
+ "5. **Create downstream phase issues** using `gh issue create`:",
11172
+ " - Always create a `meeting:notes` issue (blocked on this extract issue)",
11173
+ " - If requirements OR decisions/ADRs identified, create a `meeting:draft` issue",
11174
+ " (blocked on the notes issue). For kind `standup`, skip the",
11175
+ " `meeting:draft` issue \u2014 standup meetings almost never produce",
11176
+ " formal drafts.",
11177
+ " - Always create a `meeting:link` issue \u2014 blocked on the draft issue if one",
11178
+ " was created, otherwise blocked on the notes issue",
11179
+ "",
11180
+ "6. Commit, push, and close the extract issue.",
11181
+ "",
11182
+ "---",
11183
+ "",
11184
+ "## Phase 2: Notes (`meeting:notes`)",
11185
+ "",
11186
+ "**Goal:** Transform the extraction into structured meeting notes.",
11187
+ "",
11188
+ "### Steps",
11189
+ "",
11190
+ "1. Read the extraction file referenced in the issue body (output of Phase 1).",
11191
+ "2. Write structured meeting notes with these sections:",
11192
+ " - Meeting metadata (title, date, attendees)",
11193
+ " - Agenda / topics covered",
11194
+ " - Key Discussion Points (organized by topic)",
11195
+ " - Decisions (numbered, with rationale)",
11196
+ " - Action Items (table: who, what, when)",
11197
+ " - Open Questions",
11198
+ " - Follow-up items",
11199
+ "3. Commit, push, and close the notes issue.",
11200
+ "",
11201
+ "---",
11202
+ "",
11203
+ "## Phase 3: Draft (`meeting:draft`)",
11204
+ "",
11205
+ "**Goal:** Draft proposals for requirements, ADRs, and product/strategy updates.",
11206
+ "",
11207
+ "This phase only exists if the extraction identified requirements, architectural",
11208
+ "decisions, or strategy changes. If this issue exists, execute it.",
11209
+ "",
11210
+ "### Steps",
11211
+ "",
11212
+ "1. Read the extraction file from Phase 1.",
11213
+ "2. Check existing requirement registries and ADR registries for duplicates.",
11214
+ "3. Draft requirement proposals with:",
11215
+ " - Category (FR, BR, NFR, etc.)",
11216
+ " - Summary (2-3 sentences)",
11217
+ " - Draft acceptance criteria",
11218
+ " - Related existing requirements",
11219
+ "4. Draft ADR proposals for technology decisions with:",
11220
+ " - Context and problem statement",
11221
+ " - Options discussed",
11222
+ " - Stated preferences or decisions",
11223
+ " - Status: Proposed or Decided",
11224
+ "5. Summarize product/strategy document updates needed.",
11225
+ "6. Commit, push, and close the draft issue.",
11226
+ "",
11227
+ "---",
11228
+ "",
11229
+ "## Phase 4: Link (`meeting:link`)",
11230
+ "",
11231
+ "**Goal:** Create GitHub issues for follow-up work, cross-reference the",
11232
+ "meeting into existing documentation, and complete bi-directional traceability.",
11233
+ "",
11234
+ "### Steps",
11235
+ "",
11236
+ "1. Read the drafts from Phase 3 (if they exist) and the extraction from Phase 1.",
11237
+ " Re-read the extraction frontmatter for `meeting_kind` and `areas`,",
11238
+ " then build the area-gate: the set of `docRoot` sub-folders that",
11239
+ " are in scope for direct edits on this meeting. Apply the rules in",
11240
+ " the **Areas filtering** section above.",
11241
+ "2. Create requirement issues using `gh issue create` with appropriate labels.",
11242
+ " Include a `## Traceability` section in each issue body linking back to",
11243
+ " the source meeting and extraction file. Issue creation is **not**",
11244
+ " gated by areas.",
11245
+ "3. Create ADR issues if technology decisions need formal records.",
11246
+ " Include a `## Traceability` section in each. Not gated by areas.",
11247
+ "4. Create action item issues for tasks that are not document-related.",
11248
+ " Include a `## Traceability` section in each. Not gated by areas.",
11249
+ "5. Cross-reference the meeting in any existing documents that were",
11250
+ " discussed **and that live under an in-scope `docRoot`**. For",
11251
+ " discussed documents under an out-of-scope `docRoot`, open a",
11252
+ " follow-up `type:docs` issue instead of editing the doc directly.",
11253
+ "6. Apply direct product/strategy doc updates for items flagged as",
11254
+ " **Firm** confidence. When the project declares `meetingAreas`,",
11255
+ " gate these edits: only apply them when the target path lies",
11256
+ " under an in-scope `docRoot`, and for Firm items targeting an",
11257
+ " out-of-scope `docRoot` open a follow-up `type:docs` issue",
11258
+ " noting the area and the target path. When the project has not",
11259
+ " declared any `meetingAreas`, apply Firm updates unrestricted",
11260
+ " (the degenerate case above). For the kind `planning`, also",
11261
+ " update the active sprint-plan doc directly (when the",
11262
+ " sprint-plan doc's area is in-scope, or always when no",
11263
+ " `meetingAreas` are declared); for the kind `review`, mark",
11264
+ " completed tasks in that same doc.",
11265
+ "7. **Update the extraction file** with a `## Downstream Artifacts` section",
11266
+ " listing every issue and document created from this meeting. Note",
11267
+ " any items that were deferred to follow-up issues because of the",
11268
+ " area gate.",
11269
+ "8. **Update the meeting notes** with a `## Related Issues` section listing",
11270
+ " all issues created from this meeting.",
11271
+ "9. Comment on the parent extract issue with a summary linking to all",
11272
+ " created artifacts.",
11273
+ "10. Commit and push (if any file changes were made), then close the link issue.",
11274
+ "",
11275
+ "---",
11276
+ "",
11277
+ "## GitHub Integration",
11278
+ "",
11279
+ "- Use `gh` CLI for all GitHub operations",
11280
+ "- Apply the appropriate `meeting:*` phase label to each phase issue",
11281
+ "- Use `type:docs` for documentation-producing issues, `type:chore` for",
11282
+ " maintenance/organizational tasks",
11283
+ "- Use `status:` labels to track progress (`status:ready`, `status:in-progress`, `status:done`)",
11284
+ "- Reference the source meeting transcript in all created issues",
11285
+ "- Link phase issues with `Depends on: #N` to enforce ordering",
11286
+ "",
11287
+ "## When to Shorten the Pipeline",
11288
+ "",
11289
+ "- **Short meetings** (<30 min, <2000 words): combine extract + notes into one session",
11290
+ "- **No requirements or decisions**: Phase 1 skips creating the `meeting:draft` issue",
11291
+ "- **Only action items**: extract + notes + link (3 phase issues)"
11292
+ ].join("\n")
11293
+ };
11294
+ }
11283
11295
  var processMeetingSkill = {
11284
11296
  name: "process-meeting",
11285
11297
  description: "Process a meeting transcript through the 4-phase meeting analysis pipeline",
@@ -11323,64 +11335,67 @@ var processMeetingSkill = {
11323
11335
  " to pick up (notes, draft, link)"
11324
11336
  ].join("\n")
11325
11337
  };
11326
- var meetingAnalysisBundle = {
11327
- name: "meeting-analysis",
11328
- description: "Meeting transcript processing workflow with 4-phase pipeline (extract, notes, draft, link)",
11329
- appliesWhen: () => true,
11330
- rules: [
11331
- {
11332
- name: "meeting-processing-workflow",
11333
- description: "Describes the 4-phase meeting processing pipeline, extraction taxonomy, and labeling conventions",
11334
- scope: AGENT_RULE_SCOPE.ALWAYS,
11335
- content: [
11336
- "# Meeting Processing Workflow",
11337
- "",
11338
- "Use `/process-meeting <path>` to process a meeting transcript through a",
11339
- "4-phase pipeline (extract \u2192 notes \u2192 draft \u2192 link). Each phase runs as a",
11340
- "separate agent session tracked by a GitHub issue with a `meeting:*` label.",
11341
- "See the `meeting-analyst` agent definition for full workflow details.",
11342
- "",
11343
- "Meeting notes may declare a `meeting_type` (one of the project's",
11344
- "recognized types) and an `areas: [...]` list. The `meeting_type`",
11345
- "resolves to a generic kind \u2014 `planning` / `review` / `brainstorm` /",
11346
- "`standup` / `external` / `other` \u2014 that drives type-specific",
11347
- "extraction rules in phases 1\u20132. The `areas` list scopes phase-4",
11348
- "direct edits to the doc-root sub-folders declared in the project's",
11349
- "**Area \u2192 doc-root mapping** table. When both fields are absent",
11350
- "the pipeline falls back to the default workflow (kind `other`,",
11351
- "no area gating)."
11352
- ].join("\n"),
11353
- platforms: {
11354
- cursor: { exclude: true }
11338
+ function buildMeetingAnalysisBundle(tier = AGENT_MODEL.BALANCED) {
11339
+ return {
11340
+ name: "meeting-analysis",
11341
+ description: "Meeting transcript processing workflow with 4-phase pipeline (extract, notes, draft, link)",
11342
+ appliesWhen: () => true,
11343
+ rules: [
11344
+ {
11345
+ name: "meeting-processing-workflow",
11346
+ description: "Describes the 4-phase meeting processing pipeline, extraction taxonomy, and labeling conventions",
11347
+ scope: AGENT_RULE_SCOPE.ALWAYS,
11348
+ content: [
11349
+ "# Meeting Processing Workflow",
11350
+ "",
11351
+ "Use `/process-meeting <path>` to process a meeting transcript through a",
11352
+ "4-phase pipeline (extract \u2192 notes \u2192 draft \u2192 link). Each phase runs as a",
11353
+ "separate agent session tracked by a GitHub issue with a `meeting:*` label.",
11354
+ "See the `meeting-analyst` agent definition for full workflow details.",
11355
+ "",
11356
+ "Meeting notes may declare a `meeting_type` (one of the project's",
11357
+ "recognized types) and an `areas: [...]` list. The `meeting_type`",
11358
+ "resolves to a generic kind \u2014 `planning` / `review` / `brainstorm` /",
11359
+ "`standup` / `external` / `other` \u2014 that drives type-specific",
11360
+ "extraction rules in phases 1\u20132. The `areas` list scopes phase-4",
11361
+ "direct edits to the doc-root sub-folders declared in the project's",
11362
+ "**Area \u2192 doc-root mapping** table. When both fields are absent",
11363
+ "the pipeline falls back to the default workflow (kind `other`,",
11364
+ "no area gating)."
11365
+ ].join("\n"),
11366
+ platforms: {
11367
+ cursor: { exclude: true }
11368
+ },
11369
+ tags: ["workflow"]
11370
+ }
11371
+ ],
11372
+ skills: [processMeetingSkill],
11373
+ subAgents: [buildMeetingAnalystSubAgent(tier)],
11374
+ labels: [
11375
+ {
11376
+ name: "meeting:extract",
11377
+ color: "C5DEF5",
11378
+ description: "Phase 1: raw extraction from a meeting transcript"
11355
11379
  },
11356
- tags: ["workflow"]
11357
- }
11358
- ],
11359
- skills: [processMeetingSkill],
11360
- subAgents: [meetingAnalystSubAgent],
11361
- labels: [
11362
- {
11363
- name: "meeting:extract",
11364
- color: "C5DEF5",
11365
- description: "Phase 1: raw extraction from a meeting transcript"
11366
- },
11367
- {
11368
- name: "meeting:notes",
11369
- color: "BFDADC",
11370
- description: "Phase 2: curated notes derived from an extraction"
11371
- },
11372
- {
11373
- name: "meeting:draft",
11374
- color: "D4C5F9",
11375
- description: "Phase 3: draft follow-up issues proposed from notes"
11376
- },
11377
- {
11378
- name: "meeting:link",
11379
- color: "FEF2C0",
11380
- description: "Phase 4: linking/reconciling drafted issues with existing work"
11381
- }
11382
- ]
11383
- };
11380
+ {
11381
+ name: "meeting:notes",
11382
+ color: "BFDADC",
11383
+ description: "Phase 2: curated notes derived from an extraction"
11384
+ },
11385
+ {
11386
+ name: "meeting:draft",
11387
+ color: "D4C5F9",
11388
+ description: "Phase 3: draft follow-up issues proposed from notes"
11389
+ },
11390
+ {
11391
+ name: "meeting:link",
11392
+ color: "FEF2C0",
11393
+ description: "Phase 4: linking/reconciling drafted issues with existing work"
11394
+ }
11395
+ ]
11396
+ };
11397
+ }
11398
+ var meetingAnalysisBundle = buildMeetingAnalysisBundle();
11384
11399
 
11385
11400
  // src/agent/bundles/run-ratio.ts
11386
11401
  var DEFAULT_DISPATCH_TO_HOUSEKEEPING_RATIO = 4;
@@ -14793,6 +14808,69 @@ function resolveOrchestratorAssets(tierConfig, scopeGateConfig, runRatioConfig,
14793
14808
  )
14794
14809
  };
14795
14810
  }
14811
+ var orchestrateCommand = {
14812
+ name: "orchestrate",
14813
+ description: "Run one full orchestrator cycle: triage, queue scan, delegate to issue-worker.",
14814
+ content: [
14815
+ "# Orchestrate",
14816
+ "",
14817
+ "Invoke the `orchestrator` sub-agent and run **one full end-to-end",
14818
+ "cycle**: triage / unblock \u2192 maintenance \u2192 queue scan \u2192 delegate the",
14819
+ "picked issue to the `issue-worker` sub-agent \u2192 cleanup.",
14820
+ "",
14821
+ "Follow the contract in `.claude/agents/orchestrator.md`. Do **not**",
14822
+ "implement code, create branches, push commits, or merge PRs \u2014 those",
14823
+ "are the worker's and `pr-reviewer`'s jobs respectively.",
14824
+ "",
14825
+ "Run as a depth-0 (top-level) session so the orchestrator can spawn",
14826
+ "the `issue-worker` sub-agent at depth-1 \u2014 Claude Code forbids nested",
14827
+ "sub-agent dispatch.",
14828
+ ""
14829
+ ].join("\n")
14830
+ };
14831
+ var checkBlockedCommand = {
14832
+ name: "check-blocked",
14833
+ description: "Run .claude/procedures/check-blocked.sh and summarise the unblock candidates.",
14834
+ content: [
14835
+ "# Check Blocked",
14836
+ "",
14837
+ "Run the bundled triage helper and report what it found:",
14838
+ "",
14839
+ "```bash",
14840
+ 'bash .claude/procedures/check-blocked.sh "$@"',
14841
+ "```",
14842
+ "",
14843
+ "Pass any extra arguments through verbatim. The script walks every",
14844
+ "`status:blocked` issue, re-checks each `Depends on:` reference, and",
14845
+ "prints `UNBLOCKED` / `STILL_BLOCKED` lines for issues that should",
14846
+ "transition to `status:ready`.",
14847
+ "",
14848
+ "Summarise the output (counts, the first few candidates) \u2014 do **not**",
14849
+ "transition labels yourself; that is the orchestrator's responsibility.",
14850
+ ""
14851
+ ].join("\n")
14852
+ };
14853
+ var scanCommand = {
14854
+ name: "scan",
14855
+ description: "Run the orchestrator queue scan only and report the next ready issue without dispatching.",
14856
+ content: [
14857
+ "# Scan",
14858
+ "",
14859
+ "Run the orchestrator's **queue scan only** (Phase E of the contract",
14860
+ "in `.claude/agents/orchestrator.md`) and print the next ready issue,",
14861
+ "the funnel-tier sort that put it on top, and the scope-gate result.",
14862
+ "",
14863
+ "Do **not** claim the issue, create a branch, or delegate to",
14864
+ "`issue-worker`. This command exists for proactive review of what",
14865
+ "the next `/orchestrate` invocation would pick up.",
14866
+ "",
14867
+ "Walk each `priority:*` bucket in turn (capped at 50 per bucket),",
14868
+ "filter `Depends on:` references, and short-circuit on the first",
14869
+ "bucket whose survivors clear the filter. Report the top candidate",
14870
+ "and the number of survivors per bucket.",
14871
+ ""
14872
+ ].join("\n")
14873
+ };
14796
14874
  var orchestratorBundle = {
14797
14875
  name: "orchestrator",
14798
14876
  description: "Pipeline orchestrator agent for issue triage, PR review, and queue management",
@@ -14819,6 +14897,7 @@ var orchestratorBundle = {
14819
14897
  ],
14820
14898
  subAgents: [orchestratorSubAgent, issueWorkerSubAgent],
14821
14899
  procedures: [checkBlockedProcedure, unblockDependentsProcedure],
14900
+ commands: [orchestrateCommand, checkBlockedCommand, scanCommand],
14822
14901
  claudePermissions: {
14823
14902
  allow: [
14824
14903
  // Allow executing the check-blocked.sh procedure
@@ -14828,11 +14907,11 @@ var orchestratorBundle = {
14828
14907
  };
14829
14908
 
14830
14909
  // src/agent/bundles/people-profile.ts
14831
- function buildPeopleProfileAnalystSubAgent(paths, issueDefaults) {
14910
+ function buildPeopleProfileAnalystSubAgent(paths, issueDefaults, tier) {
14832
14911
  return {
14833
14912
  name: "people-profile-analyst",
14834
14913
  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.",
14835
- model: AGENT_MODEL.POWERFUL,
14914
+ model: tier,
14836
14915
  maxTurns: 80,
14837
14916
  platforms: { cursor: { exclude: true } },
14838
14917
  prompt: [
@@ -15662,7 +15741,7 @@ function buildRefreshPersonSkill(paths, issueDefaults) {
15662
15741
  ].join("\n")
15663
15742
  };
15664
15743
  }
15665
- function buildPeopleProfileBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAULT_RESOLVED_ISSUE_DEFAULTS) {
15744
+ function buildPeopleProfileBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAULT_RESOLVED_ISSUE_DEFAULTS, tier = AGENT_MODEL.BALANCED) {
15666
15745
  return {
15667
15746
  name: "people-profile",
15668
15747
  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.",
@@ -15710,7 +15789,7 @@ function buildPeopleProfileBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults = D
15710
15789
  buildProfilePersonSkill(paths, issueDefaults),
15711
15790
  buildRefreshPersonSkill(paths, issueDefaults)
15712
15791
  ],
15713
- subAgents: [buildPeopleProfileAnalystSubAgent(paths, issueDefaults)],
15792
+ subAgents: [buildPeopleProfileAnalystSubAgent(paths, issueDefaults, tier)],
15714
15793
  labels: [
15715
15794
  {
15716
15795
  name: "type:people-profile",
@@ -17285,7 +17364,19 @@ var prReviewBundle = {
17285
17364
  "to a PR's branch \u2014 it only reviews, decides, and orchestrates merge",
17286
17365
  "or comment. In loop mode, a failed review for one PR never stops",
17287
17366
  "the loop; the reviewer comments and moves on. See the `pr-reviewer`",
17288
- "agent definition for the full phase-by-phase contract.",
17367
+ "agent definition for the full phase-by-phase contract."
17368
+ ].join("\n"),
17369
+ platforms: {
17370
+ cursor: { exclude: true }
17371
+ },
17372
+ tags: ["workflow"]
17373
+ },
17374
+ {
17375
+ name: "pr-review-feedback-protocol",
17376
+ 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.",
17377
+ scope: AGENT_RULE_SCOPE.ALWAYS,
17378
+ content: [
17379
+ "# PR Review Feedback Protocol",
17289
17380
  "",
17290
17381
  "## Human-in-the-Loop Feedback Protocol",
17291
17382
  "",
@@ -24069,11 +24160,11 @@ var slackBundle = {
24069
24160
  };
24070
24161
 
24071
24162
  // src/agent/bundles/software-profile.ts
24072
- function buildSoftwareProfileAnalystSubAgent(paths, issueDefaults) {
24163
+ function buildSoftwareProfileAnalystSubAgent(paths, issueDefaults, tier) {
24073
24164
  return {
24074
24165
  name: "software-profile-analyst",
24075
24166
  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.",
24076
- model: AGENT_MODEL.POWERFUL,
24167
+ model: tier,
24077
24168
  maxTurns: 80,
24078
24169
  platforms: { cursor: { exclude: true } },
24079
24170
  prompt: [
@@ -25008,7 +25099,7 @@ function buildMapSoftwareSkill(paths, issueDefaults) {
25008
25099
  ].join("\n")
25009
25100
  };
25010
25101
  }
25011
- function buildSoftwareProfileBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAULT_RESOLVED_ISSUE_DEFAULTS) {
25102
+ function buildSoftwareProfileBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAULT_RESOLVED_ISSUE_DEFAULTS, tier = AGENT_MODEL.BALANCED) {
25012
25103
  return {
25013
25104
  name: "software-profile",
25014
25105
  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.",
@@ -25065,7 +25156,9 @@ function buildSoftwareProfileBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults =
25065
25156
  buildProfileSoftwareSkill(paths, issueDefaults),
25066
25157
  buildMapSoftwareSkill(paths, issueDefaults)
25067
25158
  ],
25068
- subAgents: [buildSoftwareProfileAnalystSubAgent(paths, issueDefaults)],
25159
+ subAgents: [
25160
+ buildSoftwareProfileAnalystSubAgent(paths, issueDefaults, tier)
25161
+ ],
25069
25162
  labels: [
25070
25163
  {
25071
25164
  name: "type:software-profile",
@@ -27299,6 +27392,211 @@ var vitestBundle = {
27299
27392
  }
27300
27393
  };
27301
27394
 
27395
+ // src/agent/bundles/agent-registry.ts
27396
+ var AGENT_REGISTRY_ENTRIES = [
27397
+ {
27398
+ bundle: "agenda",
27399
+ skill: "/draft-agenda",
27400
+ agent: "agenda-analyst",
27401
+ resolveOutputPath: (p) => `${p.meetingsRoot}/`,
27402
+ purpose: "Pre-meeting agenda authoring (2-phase: draft, finalize). Reuses the project's meeting-type taxonomy.",
27403
+ workflowRuleName: "meeting-agenda-workflow"
27404
+ },
27405
+ {
27406
+ bundle: "bcm-writer",
27407
+ skill: "/write-bcm",
27408
+ agent: "bcm-writer",
27409
+ resolveOutputPath: (p) => `${p.bcmRoot}/`,
27410
+ purpose: "BCM capability-model documents (4-phase: outline, scaffold, context, connect). BIZBOK-aligned.",
27411
+ workflowRuleName: "bcm-writer-workflow"
27412
+ },
27413
+ {
27414
+ bundle: "business-models",
27415
+ skill: "/scan-business-models",
27416
+ agent: "business-models-analyst",
27417
+ resolveOutputPath: (p) => `${p.docsRoot}/industry-research/`,
27418
+ purpose: "Osterwalder business-model canvases per industry segment (3-phase: scan, canvas, complete).",
27419
+ workflowRuleName: "business-models-workflow"
27420
+ },
27421
+ {
27422
+ bundle: "company-profile",
27423
+ skill: "/profile-company",
27424
+ agent: "company-profile-analyst",
27425
+ resolveOutputPath: (p) => `${p.companiesRoot}/`,
27426
+ purpose: "Company profiles, notes, and segment competitive analyses (up to 6 phases incl. refresh).",
27427
+ workflowRuleName: "company-profile-workflow"
27428
+ },
27429
+ {
27430
+ bundle: "customer-profile",
27431
+ skill: "/discover-customers",
27432
+ agent: "customer-profile-analyst",
27433
+ resolveOutputPath: (p) => `${p.profilesRoot}/customers/`,
27434
+ purpose: "Customer-archetype discovery, profiles, and competitor feature-mapping (3-phase).",
27435
+ workflowRuleName: "customer-profile-workflow"
27436
+ },
27437
+ {
27438
+ bundle: "docs-sync",
27439
+ skill: "/docs-sync-pr",
27440
+ agent: "docs-sync",
27441
+ resolveOutputPath: (p) => `${p.docsRoot}/`,
27442
+ purpose: "Pre-PR drift detection and mechanical doc fixes (2-phase: scan, fix). Skeleton release.",
27443
+ workflowRuleName: "docs-sync-workflow"
27444
+ },
27445
+ {
27446
+ bundle: "industry-discovery",
27447
+ skill: "/discover-industries",
27448
+ agent: "industry-discovery-analyst",
27449
+ resolveOutputPath: (p) => `${p.industriesRoot}/`,
27450
+ purpose: "Industry-vertical discovery, fit-evaluation, and research planning (3-phase).",
27451
+ workflowRuleName: "industry-discovery-workflow"
27452
+ },
27453
+ {
27454
+ bundle: "maintenance-audit",
27455
+ skill: "/audit-docs",
27456
+ agent: "maintenance-audit",
27457
+ resolveOutputPath: (p) => `${p.docsRoot}/`,
27458
+ purpose: "Doc-registry audits with idempotent fixes (3-phase: scan, fix, verify). No new content.",
27459
+ workflowRuleName: "maintenance-audit-workflow"
27460
+ },
27461
+ {
27462
+ bundle: "meeting-analysis",
27463
+ skill: "/process-meeting",
27464
+ agent: "meeting-analyst",
27465
+ resolveOutputPath: (p) => `${p.meetingsRoot}/`,
27466
+ purpose: "Post-meeting transcript processing (4-phase: extract, notes, draft, link).",
27467
+ workflowRuleName: "meeting-processing-workflow"
27468
+ },
27469
+ {
27470
+ bundle: "people-profile",
27471
+ skill: "/profile-person",
27472
+ agent: "people-profile-analyst",
27473
+ resolveOutputPath: (p) => `${p.peopleRoot}/`,
27474
+ purpose: "Person profiles only (up to 4 phases incl. refresh). Hands off to company/software bundles.",
27475
+ workflowRuleName: "people-profile-workflow"
27476
+ },
27477
+ {
27478
+ bundle: "pr-review",
27479
+ skill: "/review-pr",
27480
+ agent: "pr-reviewer",
27481
+ resolveOutputPath: () => "",
27482
+ purpose: "PR review, auto-merge gating, and human-in-the-loop feedback orchestration.",
27483
+ workflowRuleName: "pr-review-workflow"
27484
+ },
27485
+ {
27486
+ bundle: "regulatory-research",
27487
+ skill: "/scan-regulatory-landscape",
27488
+ agent: "regulatory-research-analyst",
27489
+ resolveOutputPath: (p) => `${p.docsRoot}/regulations/`,
27490
+ purpose: "Regulation research, version pages, and impact analysis (3-phase). Documents, never interprets.",
27491
+ workflowRuleName: "regulatory-research-workflow"
27492
+ },
27493
+ {
27494
+ bundle: "requirements-analyst",
27495
+ skill: "/scan-requirements",
27496
+ agent: "requirements-analyst",
27497
+ resolveOutputPath: (p) => `${p.researchRequirementsRoot}/`,
27498
+ purpose: "Requirements gap discovery + draft proposals (2-phase: scan, draft-trace). Hands off to writer.",
27499
+ workflowRuleName: "requirements-analyst-workflow"
27500
+ },
27501
+ {
27502
+ bundle: "requirements-reviewer",
27503
+ skill: "/review-requirements",
27504
+ agent: "requirements-reviewer",
27505
+ resolveOutputPath: (p) => `${p.requirementsRoot}/`,
27506
+ purpose: "Requirements audit (12 checks) and narrow-edit deprecation. Never authors new requirement docs.",
27507
+ workflowRuleName: "requirements-reviewer-workflow"
27508
+ },
27509
+ {
27510
+ bundle: "requirements-writer",
27511
+ skill: "/write-requirement",
27512
+ agent: "requirements-writer",
27513
+ resolveOutputPath: (p) => `${p.requirementsRoot}/`,
27514
+ purpose: "Formal requirement document authoring across the 11-category taxonomy + four-tier classification.",
27515
+ workflowRuleName: "requirements-writer-workflow"
27516
+ },
27517
+ {
27518
+ bundle: "research-pipeline",
27519
+ skill: "/research",
27520
+ agent: "research-analyst",
27521
+ resolveOutputPath: (p) => `${p.researchRoot}/`,
27522
+ purpose: "Generic research micro-tasks (3-phase: scope, slice, verify). Notes-only output.",
27523
+ workflowRuleName: "research-pipeline-workflow"
27524
+ },
27525
+ {
27526
+ bundle: "software-profile",
27527
+ skill: "/profile-software",
27528
+ agent: "software-profile-analyst",
27529
+ resolveOutputPath: (p) => `${p.softwareRoot}/`,
27530
+ purpose: "Software profiles, shared feature matrix, and BCM-tree capability mapping (up to 5 phases).",
27531
+ workflowRuleName: "software-profile-workflow"
27532
+ },
27533
+ {
27534
+ bundle: "standards-research",
27535
+ skill: "/scope-standards-research",
27536
+ agent: "standards-research-analyst",
27537
+ resolveOutputPath: (p) => `${p.docsRoot}/standards/`,
27538
+ purpose: "Interoperability standards research (5-phase: scope, research, compare, extension, organizations).",
27539
+ workflowRuleName: "standards-research-workflow"
27540
+ }
27541
+ ];
27542
+ var SUPPRESSED_WORKFLOW_RULE_NAMES = AGENT_REGISTRY_ENTRIES.map((e) => e.workflowRuleName);
27543
+ function isSuppressedWorkflowRule(name) {
27544
+ return SUPPRESSED_WORKFLOW_RULE_NAMES.includes(name);
27545
+ }
27546
+ function bundleNameForWorkflowRule(ruleName) {
27547
+ const entry = AGENT_REGISTRY_ENTRIES.find(
27548
+ (e) => e.workflowRuleName === ruleName
27549
+ );
27550
+ return entry?.bundle;
27551
+ }
27552
+ function buildAgentRegistryRule(bundles, paths) {
27553
+ const activeNames = new Set(bundles.map((b) => b.name));
27554
+ const rows = AGENT_REGISTRY_ENTRIES.filter(
27555
+ (e) => activeNames.has(e.bundle)
27556
+ ).slice();
27557
+ if (rows.length === 0) {
27558
+ return void 0;
27559
+ }
27560
+ rows.sort((a, b) => a.bundle.localeCompare(b.bundle));
27561
+ const lines = [
27562
+ "# Agent Registry",
27563
+ "",
27564
+ "Each row below is the routing summary for one phased-agent",
27565
+ "bundle: the user-invocable skill, the sub-agent that handles",
27566
+ "the work, the output path the agent writes to, and a one-line",
27567
+ "purpose. Use the table to answer *which agent handles X* \u2014",
27568
+ "full agent prompts live in `.claude/agents/<name>.md` and only",
27569
+ "load on delegation, so the table is the always-on routing",
27570
+ "signal.",
27571
+ "",
27572
+ "Cross-cutting policies that apply to every agent below \u2014",
27573
+ "Progress File Convention, Shared-Editing Safety, Issue",
27574
+ "Templates, Skill Evals \u2014 are documented as their own top-level",
27575
+ "sections elsewhere in this file. The registry only captures",
27576
+ "routing; it does not duplicate convention prose.",
27577
+ "",
27578
+ "| Skill | Agent | Bundle | Output path | Purpose |",
27579
+ "| --- | --- | --- | --- | --- |"
27580
+ ];
27581
+ for (const row of rows) {
27582
+ const outputPath = row.resolveOutputPath(paths);
27583
+ const pathCell = outputPath.length > 0 ? `\`${outputPath}\`` : "\u2014";
27584
+ lines.push(
27585
+ `| \`${row.skill}\` | \`${row.agent}\` | \`${row.bundle}\` | ${pathCell} | ${row.purpose} |`
27586
+ );
27587
+ }
27588
+ return {
27589
+ name: "agent-registry",
27590
+ 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.",
27591
+ scope: AGENT_RULE_SCOPE.ALWAYS,
27592
+ content: lines.join("\n"),
27593
+ platforms: {
27594
+ cursor: { exclude: true }
27595
+ },
27596
+ tags: ["workflow"]
27597
+ };
27598
+ }
27599
+
27302
27600
  // src/agent/bundles/features.ts
27303
27601
  var SOURCE_TIER_HEADINGS = [
27304
27602
  { key: "t1", heading: "### T1 \u2014 Primary Living" },
@@ -27666,7 +27964,7 @@ function renderPriorityRulesSection(rules) {
27666
27964
  }
27667
27965
 
27668
27966
  // src/agent/bundles/index.ts
27669
- function buildBuiltInBundles(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAULT_RESOLVED_ISSUE_DEFAULTS) {
27967
+ function buildBuiltInBundles(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAULT_RESOLVED_ISSUE_DEFAULTS, defaultAgentTier = AGENT_MODEL.BALANCED) {
27670
27968
  return [
27671
27969
  buildBaseBundle(paths),
27672
27970
  upstreamConfigulatorDocsBundle,
@@ -27679,7 +27977,7 @@ function buildBuiltInBundles(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAUL
27679
27977
  projenBundle,
27680
27978
  githubWorkflowBundle,
27681
27979
  slackBundle,
27682
- meetingAnalysisBundle,
27980
+ buildMeetingAnalysisBundle(defaultAgentTier),
27683
27981
  agendaBundle,
27684
27982
  orchestratorBundle,
27685
27983
  prReviewBundle,
@@ -27687,16 +27985,16 @@ function buildBuiltInBundles(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAUL
27687
27985
  buildRequirementsWriterBundle(paths, issueDefaults),
27688
27986
  buildRequirementsReviewerBundle(paths, issueDefaults),
27689
27987
  buildResearchPipelineBundle(paths, issueDefaults),
27690
- buildCompanyProfileBundle(paths, issueDefaults),
27691
- buildCustomerProfileBundle(paths, issueDefaults),
27692
- buildPeopleProfileBundle(paths, issueDefaults),
27693
- buildSoftwareProfileBundle(paths, issueDefaults),
27988
+ buildCompanyProfileBundle(paths, issueDefaults, defaultAgentTier),
27989
+ buildCustomerProfileBundle(paths, issueDefaults, defaultAgentTier),
27990
+ buildPeopleProfileBundle(paths, issueDefaults, defaultAgentTier),
27991
+ buildSoftwareProfileBundle(paths, issueDefaults, defaultAgentTier),
27694
27992
  buildIndustryDiscoveryBundle(paths, issueDefaults),
27695
27993
  buildBusinessModelsBundle(paths, issueDefaults),
27696
27994
  buildBcmWriterBundle(paths, issueDefaults),
27697
27995
  buildStandardsResearchBundle(paths, issueDefaults),
27698
27996
  buildRegulatoryResearchBundle(paths, issueDefaults),
27699
- buildMaintenanceAuditBundle(paths, issueDefaults),
27997
+ buildMaintenanceAuditBundle(paths, issueDefaults, defaultAgentTier),
27700
27998
  buildDocsSyncBundle(paths)
27701
27999
  ];
27702
28000
  }
@@ -27942,7 +28240,7 @@ var ClaudeRenderer = class _ClaudeRenderer {
27942
28240
  /**
27943
28241
  * Render all Claude Code configuration files.
27944
28242
  */
27945
- static render(component, rules, skills, subAgents, mcpServers, settings, procedures) {
28243
+ static render(component, rules, skills, subAgents, mcpServers, settings, procedures, commands) {
27946
28244
  _ClaudeRenderer.renderClaudeMd(component, rules);
27947
28245
  _ClaudeRenderer.renderScopedRules(component, rules);
27948
28246
  _ClaudeRenderer.renderSettings(component, mcpServers, settings);
@@ -27951,6 +28249,9 @@ var ClaudeRenderer = class _ClaudeRenderer {
27951
28249
  if (procedures && procedures.length > 0) {
27952
28250
  _ClaudeRenderer.renderProcedures(component, procedures);
27953
28251
  }
28252
+ if (commands && commands.length > 0) {
28253
+ _ClaudeRenderer.renderCommands(component, commands);
28254
+ }
27954
28255
  }
27955
28256
  static renderClaudeMd(component, rules) {
27956
28257
  const claudeMdRules = rules.filter((r) => {
@@ -28282,6 +28583,30 @@ var ClaudeRenderer = class _ClaudeRenderer {
28282
28583
  });
28283
28584
  }
28284
28585
  }
28586
+ /**
28587
+ * Renders user-invokable slash commands to `.claude/commands/<name>.md`.
28588
+ *
28589
+ * Each command file carries a YAML frontmatter block with the
28590
+ * `description` (always present) and an optional `model` alias. The
28591
+ * body is the {@link AgentCommand.content} written verbatim.
28592
+ *
28593
+ * @see https://docs.claude.com/en/docs/claude-code/slash-commands
28594
+ */
28595
+ static renderCommands(component, commands) {
28596
+ for (const command of commands) {
28597
+ const lines = [];
28598
+ lines.push("---");
28599
+ lines.push(`description: ${command.description}`);
28600
+ const resolvedModel = resolveModelAlias(command.model);
28601
+ if (resolvedModel) {
28602
+ lines.push(`model: ${resolvedModel}`);
28603
+ }
28604
+ lines.push("---");
28605
+ lines.push("");
28606
+ lines.push(...command.content.split("\n"));
28607
+ new import_textfile3.TextFile(component, `.claude/commands/${command.name}.md`, { lines });
28608
+ }
28609
+ }
28285
28610
  /**
28286
28611
  * Determine the default Claude rule target based on rule scope.
28287
28612
  * ALWAYS-scoped rules default to CLAUDE_MD; FILE_PATTERN rules default to SCOPED_FILE.
@@ -28304,6 +28629,17 @@ var CopilotRenderer = class {
28304
28629
  };
28305
28630
 
28306
28631
  // src/agent/agent-config.ts
28632
+ function resolveDefaultAgentTier(options) {
28633
+ switch (options?.defaultAgentTier) {
28634
+ case "powerful":
28635
+ return AGENT_MODEL.POWERFUL;
28636
+ case "fast":
28637
+ return AGENT_MODEL.FAST;
28638
+ case "balanced":
28639
+ default:
28640
+ return AGENT_MODEL.BALANCED;
28641
+ }
28642
+ }
28307
28643
  var DEFAULT_CLAUDE_ALLOW = [
28308
28644
  // ── Git ──────────────────────────────────────────────────────────────
28309
28645
  "Bash(git add *)",
@@ -28408,6 +28744,45 @@ var DEFAULT_CLAUDE_DENY = [
28408
28744
  "Bash(export *)",
28409
28745
  "Bash(env *)"
28410
28746
  ];
28747
+ var DEFAULT_CLAUDE_PATH_DENY = [
28748
+ "Read(./node_modules/**)",
28749
+ "Read(./dist/**)",
28750
+ "Read(./lib/**)",
28751
+ "Read(./.astro/**)",
28752
+ "Read(./.env)",
28753
+ "Read(./.env.*)",
28754
+ "Read(./*.lock)",
28755
+ "Read(./pnpm-lock.yaml)",
28756
+ "Read(./package-lock.json)"
28757
+ ];
28758
+ var DEFAULT_USAGE_LOG_PATH = ".claude/usage.log";
28759
+ var DEFAULT_CLAUDE_ENV = {
28760
+ ENABLE_TOOL_SEARCH: "1"
28761
+ };
28762
+ var DEFAULT_CLAUDE_HOOKS = {
28763
+ Stop: [
28764
+ {
28765
+ matcher: "*",
28766
+ hooks: [
28767
+ {
28768
+ type: "command",
28769
+ command: `echo "$(date -u +%FT%TZ),\${CLAUDE_SESSION_ID:-unknown},\${CLAUDE_INPUT_TOKENS:-0},\${CLAUDE_OUTPUT_TOKENS:-0}" >> ${DEFAULT_USAGE_LOG_PATH}`
28770
+ }
28771
+ ]
28772
+ }
28773
+ ],
28774
+ PostToolUse: [
28775
+ {
28776
+ matcher: "Edit|Write",
28777
+ hooks: [
28778
+ {
28779
+ type: "command",
28780
+ 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'
28781
+ }
28782
+ ]
28783
+ }
28784
+ ]
28785
+ };
28411
28786
  var PROGRESS_FILE_BUNDLE_HOOKS = [
28412
28787
  ["bcm-writer-workflow", "bcm-writer"],
28413
28788
  ["business-models-workflow", "business-models"],
@@ -28482,10 +28857,30 @@ var AgentConfig = class _AgentConfig extends import_projen8.Component {
28482
28857
  return (examples.t1?.length ?? 0) > 0 || (examples.t2?.length ?? 0) > 0 || (examples.t3?.length ?? 0) > 0 || (examples.t4?.length ?? 0) > 0;
28483
28858
  }
28484
28859
  /**
28485
- * Merges default Claude permissions with bundle and user-supplied settings.
28860
+ * Merges default Claude permissions and hooks with bundle and
28861
+ * user-supplied settings.
28862
+ *
28863
+ * Permission merge order: defaults → bundle permissions → user-supplied
28864
+ * entries. Both `allow` and `deny` are deduped via
28865
+ * `Array.from(new Set(...))`; V8 `Set` iteration preserves insertion
28866
+ * order, so the final ordering is defaults first, then bundle, then
28867
+ * user, with duplicates removed (first-occurrence wins). `defaultMode`
28868
+ * defaults to `"dontAsk"` unless overridden — see the inline comment
28869
+ * on the literal below for the autonomous-worker rationale.
28486
28870
  *
28487
- * Merge order: defaults bundle permissions user-supplied entries.
28488
- * `defaultMode` defaults to `"dontAsk"` unless overridden.
28871
+ * Hooks merge: consumer-supplied entries first, then default entries
28872
+ * (Stop, PostToolUse), deduped by `(matcher, JSON-serialized hooks)`.
28873
+ * Defaults are skipped entirely when `disableAllHooks: true` is set —
28874
+ * the `disableAllHooks` flag passes through to the rendered file so
28875
+ * Claude Code suppresses every project-level hook at runtime, and the
28876
+ * defaults are dropped at synth time so the rendered file does not
28877
+ * carry orphan entries that would re-fire if the operator later flipped
28878
+ * the flag back off.
28879
+ *
28880
+ * Env merge: defaults from `DEFAULT_CLAUDE_ENV` (e.g.
28881
+ * `ENABLE_TOOL_SEARCH=1`) layer first, then consumer-supplied
28882
+ * `claudeSettings.env` entries override on key collision. Sibling keys
28883
+ * from both sources land in the rendered file.
28489
28884
  */
28490
28885
  static mergeClaudeDefaults(userSettings, bundlePermissions) {
28491
28886
  const bundleAllow = bundlePermissions?.allow ?? [];
@@ -28494,14 +28889,80 @@ var AgentConfig = class _AgentConfig extends import_projen8.Component {
28494
28889
  const userDeny = userSettings?.permissions?.deny ?? [];
28495
28890
  return {
28496
28891
  ...userSettings,
28892
+ // `defaultMode: "dontAsk"` is configulator's hardcoded default
28893
+ // because scheduled-task workers (issue-worker, orchestrator,
28894
+ // pr-reviewer, and the analyst/writer family) run autonomously
28895
+ // and would deadlock on confirmation prompts. Any other value
28896
+ // breaks the autonomous-worker contract — override only after
28897
+ // revisiting that contract end-to-end. The override path for
28898
+ // consumers is `claudeSettings.defaultMode` on
28899
+ // `AgentConfigOptions`.
28497
28900
  defaultMode: userSettings?.defaultMode ?? "dontAsk",
28498
28901
  permissions: {
28499
28902
  ...userSettings?.permissions,
28500
- allow: [...DEFAULT_CLAUDE_ALLOW, ...bundleAllow, ...userAllow],
28501
- deny: [...DEFAULT_CLAUDE_DENY, ...bundleDeny, ...userDeny]
28502
- }
28903
+ allow: Array.from(
28904
+ /* @__PURE__ */ new Set([...DEFAULT_CLAUDE_ALLOW, ...bundleAllow, ...userAllow])
28905
+ ),
28906
+ deny: Array.from(
28907
+ /* @__PURE__ */ new Set([
28908
+ ...DEFAULT_CLAUDE_DENY,
28909
+ ...DEFAULT_CLAUDE_PATH_DENY,
28910
+ ...bundleDeny,
28911
+ ...userDeny
28912
+ ])
28913
+ )
28914
+ },
28915
+ hooks: _AgentConfig.mergeClaudeHooks(userSettings),
28916
+ env: { ...DEFAULT_CLAUDE_ENV, ...userSettings?.env ?? {} }
28503
28917
  };
28504
28918
  }
28919
+ /**
28920
+ * Merge default lifecycle hooks (Stop, PostToolUse) with consumer-
28921
+ * supplied entries on `claudeSettings.hooks`. Consumer entries appear
28922
+ * first so a downstream override that wires a faster lint/format hook
28923
+ * runs ahead of the defaults; defaults are appended after.
28924
+ *
28925
+ * Returns `undefined` when neither defaults nor consumer entries
28926
+ * remain — the renderer skips the `hooks` key entirely in that case
28927
+ * so opt-out repos do not ship an empty `"hooks": {}` object.
28928
+ *
28929
+ * Defaults are gated on `disableAllHooks !== true`. When the flag is
28930
+ * set we still pass through any consumer-supplied entries (the
28931
+ * runtime-level `disableAllHooks: true` is what suppresses execution),
28932
+ * but we never inject the bundle defaults. That keeps the disable-all
28933
+ * escape hatch idempotent: flipping the flag drops the bundle's
28934
+ * default surface area instead of leaving the entries on disk for a
28935
+ * future re-enable.
28936
+ */
28937
+ static mergeClaudeHooks(userSettings) {
28938
+ const userHooks = userSettings?.hooks;
28939
+ const includeDefaults = userSettings?.disableAllHooks !== true;
28940
+ const defaults = includeDefaults ? DEFAULT_CLAUDE_HOOKS : {};
28941
+ const allEvents = /* @__PURE__ */ new Set([
28942
+ ...Object.keys(userHooks ?? {}),
28943
+ ...Object.keys(defaults)
28944
+ ]);
28945
+ const merged = {};
28946
+ for (const event of allEvents) {
28947
+ const userEntries = (userHooks ?? {})[event] ?? [];
28948
+ const defaultEntries = defaults[event] ?? [];
28949
+ const seen = /* @__PURE__ */ new Set();
28950
+ const combined = [];
28951
+ for (const entry of [...userEntries, ...defaultEntries]) {
28952
+ const key = JSON.stringify({
28953
+ matcher: entry.matcher,
28954
+ hooks: entry.hooks
28955
+ });
28956
+ if (seen.has(key)) continue;
28957
+ seen.add(key);
28958
+ combined.push(entry);
28959
+ }
28960
+ if (combined.length > 0) {
28961
+ merged[event] = combined;
28962
+ }
28963
+ }
28964
+ return Object.keys(merged).length > 0 ? merged : void 0;
28965
+ }
28505
28966
  constructor(project, options = {}) {
28506
28967
  super(project);
28507
28968
  this.options = options;
@@ -28530,7 +28991,8 @@ var AgentConfig = class _AgentConfig extends import_projen8.Component {
28530
28991
  if (!this.cachedBundles) {
28531
28992
  this.cachedBundles = buildBuiltInBundles(
28532
28993
  this.resolvedPaths,
28533
- resolveIssueDefaults(this.options.issueDefaults)
28994
+ resolveIssueDefaults(this.options.issueDefaults),
28995
+ resolveDefaultAgentTier(this.options)
28534
28996
  );
28535
28997
  }
28536
28998
  return this.cachedBundles;
@@ -28576,6 +29038,9 @@ var AgentConfig = class _AgentConfig extends import_projen8.Component {
28576
29038
  if (resolvedRunRatio.enabled) {
28577
29039
  this.project.gitignore.addPatterns(`/${resolvedRunRatio.stateFilePath}`);
28578
29040
  }
29041
+ if (this.options.claudeSettings?.disableAllHooks !== true) {
29042
+ this.project.gitignore.addPatterns(`/${DEFAULT_USAGE_LOG_PATH}`);
29043
+ }
28579
29044
  validateUnblockDependentsConfig(this.options.unblockDependents);
28580
29045
  validateIssueDefaultsConfig(this.options.issueDefaults);
28581
29046
  const resolvedProgressFiles = validateProgressFilesConfig(
@@ -28640,6 +29105,7 @@ var AgentConfig = class _AgentConfig extends import_projen8.Component {
28640
29105
  const skills = this.resolveSkills();
28641
29106
  const subAgents = this.resolveSubAgents();
28642
29107
  const procedures = this.resolveProcedures();
29108
+ const commands = this.resolveCommands();
28643
29109
  const mcpServers = this.options.mcpServers ?? {};
28644
29110
  const projectMetadata = ProjectMetadata.of(this.project);
28645
29111
  const metadata = projectMetadata?.metadata;
@@ -28675,7 +29141,8 @@ var AgentConfig = class _AgentConfig extends import_projen8.Component {
28675
29141
  this.options.claudeSettings,
28676
29142
  bundlePermissions
28677
29143
  ),
28678
- resolvedProcedures
29144
+ resolvedProcedures,
29145
+ commands
28679
29146
  );
28680
29147
  }
28681
29148
  if (platforms.includes(AGENT_PLATFORM.CODEX)) {
@@ -28814,6 +29281,7 @@ ${section}`
28814
29281
  }
28815
29282
  }
28816
29283
  }
29284
+ const injectBundleHooks = this.options.claudeMd?.injectBundleHooks ?? true;
28817
29285
  const resolvedProgressFiles = resolveProgressFiles(
28818
29286
  this.options.progressFiles
28819
29287
  );
@@ -28831,7 +29299,7 @@ ${section}`
28831
29299
  }
28832
29300
  }
28833
29301
  }
28834
- if (resolvedProgressFiles.enabled) {
29302
+ if (injectBundleHooks && resolvedProgressFiles.enabled) {
28835
29303
  for (const [ruleName, label] of PROGRESS_FILE_BUNDLE_HOOKS) {
28836
29304
  const existing = ruleMap.get(ruleName);
28837
29305
  if (!existing) {
@@ -28871,7 +29339,7 @@ ${hook}`
28871
29339
  }
28872
29340
  }
28873
29341
  }
28874
- if (resolvedSharedEditingForRules.enabled) {
29342
+ if (injectBundleHooks && resolvedSharedEditingForRules.enabled) {
28875
29343
  for (const [ruleName, label] of SHARED_EDITING_BUNDLE_HOOKS) {
28876
29344
  const existing = ruleMap.get(ruleName);
28877
29345
  if (!existing) {
@@ -28911,7 +29379,7 @@ ${hook}`
28911
29379
  }
28912
29380
  }
28913
29381
  }
28914
- if (resolvedSkillEvalsForRules.enabled) {
29382
+ if (injectBundleHooks && resolvedSkillEvalsForRules.enabled) {
28915
29383
  for (const [ruleName, label] of SKILL_EVALS_BUNDLE_HOOKS) {
28916
29384
  const existing = ruleMap.get(ruleName);
28917
29385
  if (!existing) {
@@ -28956,7 +29424,7 @@ ${hook}`
28956
29424
  if (!hasAnyDocsEmittingBundle(excludedBundleNames)) {
28957
29425
  ruleMap.delete("stub-index-convention");
28958
29426
  }
28959
- if (resolvedIssueTemplatesForRules.enabled && hasDownstreamBundles) {
29427
+ if (injectBundleHooks && resolvedIssueTemplatesForRules.enabled && hasDownstreamBundles) {
28960
29428
  for (const [ruleName, label] of ISSUE_TEMPLATES_BUNDLE_HOOKS) {
28961
29429
  const existing = ruleMap.get(ruleName);
28962
29430
  if (!existing) {
@@ -29004,6 +29472,57 @@ ${hook}`
29004
29472
  }
29005
29473
  }
29006
29474
  }
29475
+ const registryRule = buildAgentRegistryRule(
29476
+ this.activeBundles,
29477
+ this.resolvedPaths
29478
+ );
29479
+ if (registryRule) {
29480
+ let registryContent = registryRule.content;
29481
+ const meetingAnalysisActive = this.activeBundles.some(
29482
+ (b) => b.name === "meeting-analysis"
29483
+ );
29484
+ if (this.options.meetings && meetingAnalysisActive) {
29485
+ const meetingsSection = renderMeetingTypesSection(
29486
+ this.options.meetings
29487
+ );
29488
+ if (meetingsSection.length > 0) {
29489
+ registryContent = `${registryContent}
29490
+
29491
+ ---
29492
+
29493
+ ${meetingsSection}`;
29494
+ }
29495
+ }
29496
+ ruleMap.set(registryRule.name, {
29497
+ ...registryRule,
29498
+ content: registryContent
29499
+ });
29500
+ const customSectionBundles = new Set(
29501
+ (this.options.features?.customDocSections ?? []).map(
29502
+ (s) => s.bundleName
29503
+ )
29504
+ );
29505
+ for (const [ruleName, rule] of ruleMap) {
29506
+ if (!isSuppressedWorkflowRule(ruleName)) {
29507
+ continue;
29508
+ }
29509
+ const owningBundleName = bundleNameForWorkflowRule(ruleName);
29510
+ if (owningBundleName !== void 0 && customSectionBundles.has(owningBundleName)) {
29511
+ continue;
29512
+ }
29513
+ const existingClaude = rule.platforms?.claude ?? {};
29514
+ if (existingClaude.exclude === true) {
29515
+ continue;
29516
+ }
29517
+ ruleMap.set(ruleName, {
29518
+ ...rule,
29519
+ platforms: {
29520
+ ...rule.platforms,
29521
+ claude: { ...existingClaude, exclude: true }
29522
+ }
29523
+ });
29524
+ }
29525
+ }
29007
29526
  return [...ruleMap.values()].sort((a, b) => {
29008
29527
  if (a.name === "project-overview") return -1;
29009
29528
  if (b.name === "project-overview") return 1;
@@ -29152,6 +29671,49 @@ ${hook}`
29152
29671
  }
29153
29672
  return [...procMap.values()];
29154
29673
  }
29674
+ /**
29675
+ * Resolves the final list of slash commands by merging bundle-shipped
29676
+ * defaults with consumer-supplied entries. Mirrors {@link resolveSkills}
29677
+ * and {@link resolveSubAgents}: auto-detected bundles contribute first,
29678
+ * force-included bundles overlay, and consumer commands override on
29679
+ * name collision. Names listed in `excludeCommands` are dropped after
29680
+ * the merge so consumers can opt out of a single default without
29681
+ * disabling the whole bundle.
29682
+ */
29683
+ resolveCommands() {
29684
+ const commandMap = /* @__PURE__ */ new Map();
29685
+ if (this.options.autoDetectBundles !== false) {
29686
+ for (const bundle of this.pathAwareBundles) {
29687
+ if (this.options.excludeBundles?.includes(bundle.name)) continue;
29688
+ if (bundle.appliesWhen(this.project) && bundle.commands) {
29689
+ for (const command of bundle.commands) {
29690
+ commandMap.set(command.name, command);
29691
+ }
29692
+ }
29693
+ }
29694
+ }
29695
+ if (this.options.includeBundles) {
29696
+ for (const bundleName of this.options.includeBundles) {
29697
+ const bundle = this.pathAwareBundles.find((b) => b.name === bundleName);
29698
+ if (bundle?.commands) {
29699
+ for (const command of bundle.commands) {
29700
+ commandMap.set(command.name, command);
29701
+ }
29702
+ }
29703
+ }
29704
+ }
29705
+ if (this.options.commands) {
29706
+ for (const command of this.options.commands) {
29707
+ commandMap.set(command.name, command);
29708
+ }
29709
+ }
29710
+ if (this.options.excludeCommands) {
29711
+ for (const name of this.options.excludeCommands) {
29712
+ commandMap.delete(name);
29713
+ }
29714
+ }
29715
+ return [...commandMap.values()];
29716
+ }
29155
29717
  /**
29156
29718
  * Resolves template variables in rule content using project metadata.
29157
29719
  * Emits synthesis warnings for rules with unresolved variables.
@@ -33584,6 +34146,7 @@ var TypeScriptConfig = class extends import_projen24.Component {
33584
34146
  0 && (module.exports = {
33585
34147
  AGENT_MODEL,
33586
34148
  AGENT_PLATFORM,
34149
+ AGENT_REGISTRY_ENTRIES,
33587
34150
  AGENT_RULE_SCOPE,
33588
34151
  AGENT_TIER_ROLES,
33589
34152
  AGENT_TIER_VALUES,
@@ -33680,6 +34243,7 @@ var TypeScriptConfig = class extends import_projen24.Component {
33680
34243
  SCOPE_CLASS_VALUES,
33681
34244
  SHARED_EDITING_CONFLICT_STRATEGY_VALUES,
33682
34245
  STARLIGHT_ROLE,
34246
+ SUPPRESSED_WORKFLOW_RULE_NAMES,
33683
34247
  SampleLang,
33684
34248
  StarlightProject,
33685
34249
  TestRunner,
@@ -33705,6 +34269,7 @@ var TypeScriptConfig = class extends import_projen24.Component {
33705
34269
  awsCdkBundle,
33706
34270
  baseBundle,
33707
34271
  bcmWriterBundle,
34272
+ buildAgentRegistryRule,
33708
34273
  buildBaseBundle,
33709
34274
  buildBcmWriterBundle,
33710
34275
  buildBuiltInBundles,
@@ -33715,6 +34280,7 @@ var TypeScriptConfig = class extends import_projen24.Component {
33715
34280
  buildDocsSyncBundle,
33716
34281
  buildIndustryDiscoveryBundle,
33717
34282
  buildMaintenanceAuditBundle,
34283
+ buildMeetingAnalysisBundle,
33718
34284
  buildOrchestratorConventionsContent,
33719
34285
  buildPeopleProfileBundle,
33720
34286
  buildRegulatoryResearchBundle,
@@ -33726,6 +34292,7 @@ var TypeScriptConfig = class extends import_projen24.Component {
33726
34292
  buildSoftwareProfileBundle,
33727
34293
  buildStandardsResearchBundle,
33728
34294
  buildUnblockDependentsProcedure,
34295
+ bundleNameForWorkflowRule,
33729
34296
  businessModelsBundle,
33730
34297
  checkDocSamplesProcedure,
33731
34298
  checkLinksProcedure,
@@ -33752,6 +34319,7 @@ var TypeScriptConfig = class extends import_projen24.Component {
33752
34319
  industryDiscoveryBundle,
33753
34320
  isPhaseLabelOwnedByExcluded,
33754
34321
  isScheduledTaskOwnedByExcluded,
34322
+ isSuppressedWorkflowRule,
33755
34323
  isTypeLabelOwnedByExcluded,
33756
34324
  jestBundle,
33757
34325
  labelsForPhase,
@@ -33810,6 +34378,7 @@ var TypeScriptConfig = class extends import_projen24.Component {
33810
34378
  resolveAgentTiers,
33811
34379
  resolveAstroProjectOutdir,
33812
34380
  resolveAwsCdkProjectOutdir,
34381
+ resolveDefaultAgentTier,
33813
34382
  resolveIssueDefaults,
33814
34383
  resolveIssueTemplates,
33815
34384
  resolveModelAlias,