@codedrifters/configulator 0.0.292 → 0.0.293

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.mjs CHANGED
@@ -3990,8 +3990,92 @@ function buildBaseBundle(paths = DEFAULT_AGENT_PATHS) {
3990
3990
  }
3991
3991
  var baseBundle = buildBaseBundle();
3992
3992
 
3993
+ // src/agent/bundles/issue-defaults.ts
3994
+ var VALID_STATUS_VALUES = [
3995
+ "ready",
3996
+ "blocked",
3997
+ "in-progress",
3998
+ "ready-for-review",
3999
+ "needs-attention",
4000
+ "done",
4001
+ "deferred"
4002
+ ];
4003
+ var VALID_PRIORITY_VALUES = [
4004
+ "critical",
4005
+ "high",
4006
+ "medium",
4007
+ "low",
4008
+ "trivial"
4009
+ ];
4010
+ var DEFAULT_ISSUE_STATUS = "ready";
4011
+ var DEFAULT_ISSUE_PRIORITY = "medium";
4012
+ var DEFAULT_RESOLVED_ISSUE_DEFAULTS = {
4013
+ defaults: {
4014
+ status: DEFAULT_ISSUE_STATUS,
4015
+ priority: DEFAULT_ISSUE_PRIORITY
4016
+ },
4017
+ overrides: {}
4018
+ };
4019
+ function resolveIssueDefaults(config) {
4020
+ if (config === void 0) {
4021
+ return DEFAULT_RESOLVED_ISSUE_DEFAULTS;
4022
+ }
4023
+ const overrides = {};
4024
+ for (const [phaseLabel, override] of Object.entries(config)) {
4025
+ assertValidPhaseLabel(phaseLabel);
4026
+ assertValidOverride(phaseLabel, override);
4027
+ overrides[phaseLabel] = {
4028
+ status: override.status ?? DEFAULT_ISSUE_STATUS,
4029
+ priority: override.priority ?? DEFAULT_ISSUE_PRIORITY
4030
+ };
4031
+ }
4032
+ return {
4033
+ defaults: {
4034
+ status: DEFAULT_ISSUE_STATUS,
4035
+ priority: DEFAULT_ISSUE_PRIORITY
4036
+ },
4037
+ overrides
4038
+ };
4039
+ }
4040
+ function validateIssueDefaultsConfig(config) {
4041
+ return resolveIssueDefaults(config);
4042
+ }
4043
+ function labelsForPhase(resolved, phaseLabel) {
4044
+ return resolved.overrides[phaseLabel] ?? resolved.defaults;
4045
+ }
4046
+ function assertValidPhaseLabel(phaseLabel) {
4047
+ if (typeof phaseLabel !== "string" || phaseLabel.trim() === "") {
4048
+ throw new Error(
4049
+ "AgentConfigOptions.issueDefaults: phase-label keys must be non-empty strings (e.g. `people:research`)."
4050
+ );
4051
+ }
4052
+ }
4053
+ function assertValidOverride(phaseLabel, override) {
4054
+ if (override === null || typeof override !== "object" || Array.isArray(override)) {
4055
+ throw new Error(
4056
+ `AgentConfigOptions.issueDefaults["${phaseLabel}"] must be an object with optional \`status\` and \`priority\` fields.`
4057
+ );
4058
+ }
4059
+ const { status, priority } = override;
4060
+ if (status === void 0 && priority === void 0) {
4061
+ throw new Error(
4062
+ `AgentConfigOptions.issueDefaults["${phaseLabel}"] must declare at least one of \`status\` or \`priority\`. Empty entries are rejected because they are almost always a typo on the field name.`
4063
+ );
4064
+ }
4065
+ if (status !== void 0 && !VALID_STATUS_VALUES.includes(status)) {
4066
+ throw new Error(
4067
+ `AgentConfigOptions.issueDefaults["${phaseLabel}"].status="${status}" is not a recognised status value. Allowed values: ${VALID_STATUS_VALUES.join(", ")}.`
4068
+ );
4069
+ }
4070
+ if (priority !== void 0 && !VALID_PRIORITY_VALUES.includes(priority)) {
4071
+ throw new Error(
4072
+ `AgentConfigOptions.issueDefaults["${phaseLabel}"].priority="${priority}" is not a recognised priority value. Allowed values: ${VALID_PRIORITY_VALUES.join(", ")}.`
4073
+ );
4074
+ }
4075
+ }
4076
+
3993
4077
  // src/agent/bundles/bcm-writer.ts
3994
- function buildBcmWriterSubAgent(paths) {
4078
+ function buildBcmWriterSubAgent(paths, issueDefaults) {
3995
4079
  return {
3996
4080
  name: "bcm-writer",
3997
4081
  description: "Writes BCM (Business Capability Model) capability-model documents through a 4-phase pipeline (outline \u2192 scaffold \u2192 context \u2192 connect), one phase per session, tracked by bcm:* GitHub issue labels with filesystem-based durability between phases. Produces BIZBOK-aligned capability documents \u2014 not requirement documents.",
@@ -4489,20 +4573,37 @@ function buildBcmWriterSubAgent(paths) {
4489
4573
  " section of sibling/parent docs.",
4490
4574
  "",
4491
4575
  "5. **Create downstream research issues.** For each distinct item",
4492
- " surfaced during authoring:",
4576
+ " surfaced during authoring, file one issue against the appropriate",
4577
+ " downstream bundle. Every handoff issue includes a brief scope",
4578
+ " statement, a link back to this BCM document for traceability, and",
4579
+ " a reference to the context-phase output that revealed the item.",
4580
+ "",
4581
+ " **Unfamiliar person (role holder, stakeholder).** Hand off to the",
4582
+ " `people-profile` bundle by creating a `people:research` issue.",
4583
+ " The issue must carry:",
4584
+ "",
4585
+ " - `type:people-profile`",
4586
+ " - `people:research`",
4587
+ ` - \`priority:${labelsForPhase(issueDefaults, "people:research").priority}\``,
4588
+ ` - \`status:${labelsForPhase(issueDefaults, "people:research").status}\``,
4493
4589
  "",
4494
- " | Surfaced item | Downstream label | Bundle |",
4495
- " |---------------|------------------|--------|",
4496
- " | Unfamiliar person (role holder, stakeholder) | `people:research` | `people-profile` |",
4497
- " | Unfamiliar company (enabling vendor, partner, competitor) | `company:research` | `company-profile` |",
4498
- " | Missing research topic (value stream, market sizing, etc.) | `research:scope` | `research-pipeline` |",
4590
+ " **Unfamiliar company (enabling vendor, partner, competitor).**",
4591
+ " Hand off to the `company-profile` bundle by creating a",
4592
+ " `company:research` issue. The issue must carry:",
4499
4593
  "",
4500
- " Each downstream issue should:",
4501
- " - Carry the listed phase label plus the bundle's `type:*` label,",
4502
- " `priority:medium`, and `status:ready`",
4503
- " - Include a brief scope statement and a link back to this BCM",
4504
- " document for traceability",
4505
- " - Reference the context-phase output that revealed the item",
4594
+ " - `type:company-profile`",
4595
+ " - `company:research`",
4596
+ ` - \`priority:${labelsForPhase(issueDefaults, "company:research").priority}\``,
4597
+ ` - \`status:${labelsForPhase(issueDefaults, "company:research").status}\``,
4598
+ "",
4599
+ " **Missing research topic (value stream, market sizing, etc.).**",
4600
+ " Hand off to the `research-pipeline` bundle by creating a",
4601
+ " `research:scope` issue. The issue must carry:",
4602
+ "",
4603
+ " - `type:research`",
4604
+ " - `research:scope`",
4605
+ ` - \`priority:${labelsForPhase(issueDefaults, "research:scope").priority}\``,
4606
+ ` - \`status:${labelsForPhase(issueDefaults, "research:scope").status}\``,
4506
4607
  "",
4507
4608
  " This phase assumes the `people-profile`, `company-profile`, and",
4508
4609
  " `research-pipeline` bundles are enabled in the consuming project.",
@@ -4578,7 +4679,7 @@ function buildBcmWriterSubAgent(paths) {
4578
4679
  ].join("\n")
4579
4680
  };
4580
4681
  }
4581
- function buildWriteBcmSkill(paths) {
4682
+ function buildWriteBcmSkill(paths, issueDefaults) {
4582
4683
  return {
4583
4684
  name: "write-bcm",
4584
4685
  description: "Kick off a BCM capability-model document authoring cycle. Creates a bcm:outline issue carrying the capability name and dispatches Phase 1 (Outline) in the bcm-writer agent.",
@@ -4623,9 +4724,11 @@ function buildWriteBcmSkill(paths) {
4623
4724
  "## Steps",
4624
4725
  "",
4625
4726
  "1. Create a `bcm:outline` issue with `type:bcm-document`,",
4626
- " `priority:medium`, and `status:ready`. Body must include the",
4727
+ ` \`priority:${labelsForPhase(issueDefaults, "bcm:outline").priority}\`, and \`status:${labelsForPhase(issueDefaults, "bcm:outline").status}\`. Body must include the`,
4627
4728
  " verbatim capability name and any overrides.",
4729
+ "",
4628
4730
  "2. Execute Phase 1 (Outline) of the bcm-writer agent.",
4731
+ "",
4629
4732
  "3. Phase 1 creates a `bcm:scaffold` issue, which Phase 2 follows with",
4630
4733
  " `bcm:context`, then Phase 4 (`bcm:connect`). Each downstream issue",
4631
4734
  " declares its `Depends on:` predecessor. Phase 4 creates downstream",
@@ -4644,7 +4747,7 @@ function buildWriteBcmSkill(paths) {
4644
4747
  ].join("\n")
4645
4748
  };
4646
4749
  }
4647
- function buildBcmWriterBundle(paths = DEFAULT_AGENT_PATHS) {
4750
+ function buildBcmWriterBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAULT_RESOLVED_ISSUE_DEFAULTS) {
4648
4751
  return {
4649
4752
  name: "bcm-writer",
4650
4753
  description: "BCM (Business Capability Model) capability-model document authoring pipeline: outline, scaffold, context, connect. Enabled by default; BIZBOK-aligned; filesystem-durable between phases.",
@@ -4689,8 +4792,8 @@ function buildBcmWriterBundle(paths = DEFAULT_AGENT_PATHS) {
4689
4792
  tags: ["workflow"]
4690
4793
  }
4691
4794
  ],
4692
- skills: [buildWriteBcmSkill(paths)],
4693
- subAgents: [buildBcmWriterSubAgent(paths)],
4795
+ skills: [buildWriteBcmSkill(paths, issueDefaults)],
4796
+ subAgents: [buildBcmWriterSubAgent(paths, issueDefaults)],
4694
4797
  labels: [
4695
4798
  {
4696
4799
  name: "type:bcm-document",
@@ -5462,7 +5565,7 @@ function buildBusinessModelsAnalystSubAgent(paths) {
5462
5565
  ].join("\n")
5463
5566
  };
5464
5567
  }
5465
- function buildScanBusinessModelsSkill(paths) {
5568
+ function buildScanBusinessModelsSkill(paths, issueDefaults) {
5466
5569
  return {
5467
5570
  name: "scan-business-models",
5468
5571
  description: "Kick off the scan phase of a business-model analysis cycle. Creates a business-models:scan issue for the supplied industry and dispatches Phase 1 of the business-models-analyst, which reads industry-discovery output and identifies segments needing a canvas.",
@@ -5501,7 +5604,7 @@ function buildScanBusinessModelsSkill(paths) {
5501
5604
  "## Steps",
5502
5605
  "",
5503
5606
  "1. Create a `business-models:scan` issue with `type:business-model`,",
5504
- " `priority:medium`, and `status:ready`. The body must include the",
5607
+ ` \`priority:${labelsForPhase(issueDefaults, "business-models:scan").priority}\`, and \`status:${labelsForPhase(issueDefaults, "business-models:scan").status}\`. The body must include the`,
5505
5608
  " industry slug, the source plan path (if any), and any overrides.",
5506
5609
  "2. Execute Phase 1 (Scan) of the business-models-analyst agent.",
5507
5610
  "3. Phase 1 creates one `business-models:canvas` issue per in-scope",
@@ -5518,7 +5621,7 @@ function buildScanBusinessModelsSkill(paths) {
5518
5621
  ].join("\n")
5519
5622
  };
5520
5623
  }
5521
- function buildCanvasBusinessModelSkill(paths) {
5624
+ function buildCanvasBusinessModelSkill(paths, issueDefaults) {
5522
5625
  return {
5523
5626
  name: "canvas-business-model",
5524
5627
  description: "Kick off the canvas phase of a business-model analysis cycle. Creates a business-models:canvas issue for the supplied industry/segment and dispatches Phase 2 of the business-models-analyst, which researches and writes the Osterwalder nine-block canvas.",
@@ -5574,7 +5677,7 @@ function buildCanvasBusinessModelSkill(paths) {
5574
5677
  "## Steps",
5575
5678
  "",
5576
5679
  "1. Create a `business-models:canvas` issue with",
5577
- " `type:business-model`, `priority:medium`, and `status:ready`.",
5680
+ ` \`type:business-model\`, \`priority:${labelsForPhase(issueDefaults, "business-models:canvas").priority}\`, and \`status:${labelsForPhase(issueDefaults, "business-models:canvas").status}\`.`,
5578
5681
  " The body must include the industry slug, segment slug, and any",
5579
5682
  " scan-report reference.",
5580
5683
  "2. Execute Phase 2 (Canvas) of the business-models-analyst agent.",
@@ -5590,7 +5693,7 @@ function buildCanvasBusinessModelSkill(paths) {
5590
5693
  ].join("\n")
5591
5694
  };
5592
5695
  }
5593
- function buildCompleteBusinessModelSkill(paths) {
5696
+ function buildCompleteBusinessModelSkill(paths, issueDefaults) {
5594
5697
  return {
5595
5698
  name: "complete-business-model",
5596
5699
  description: "Kick off the complete phase of a business-model analysis cycle. Creates a business-models:complete issue for an already-authored canvas and dispatches Phase 3 of the business-models-analyst, which derives BIZBOK value streams, documents variations, and hands off capability work to bcm-writer.",
@@ -5634,7 +5737,7 @@ function buildCompleteBusinessModelSkill(paths) {
5634
5737
  "## Steps",
5635
5738
  "",
5636
5739
  "1. Create a `business-models:complete` issue with",
5637
- " `type:business-model`, `priority:medium`, and `status:ready`.",
5740
+ ` \`type:business-model\`, \`priority:${labelsForPhase(issueDefaults, "business-models:complete").priority}\`, and \`status:${labelsForPhase(issueDefaults, "business-models:complete").status}\`.`,
5638
5741
  " Body must include the canvas document path.",
5639
5742
  "2. Execute Phase 3 (Complete) of the business-models-analyst agent.",
5640
5743
  "",
@@ -5649,7 +5752,7 @@ function buildCompleteBusinessModelSkill(paths) {
5649
5752
  ].join("\n")
5650
5753
  };
5651
5754
  }
5652
- function buildBusinessModelsBundle(paths = DEFAULT_AGENT_PATHS) {
5755
+ function buildBusinessModelsBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAULT_RESOLVED_ISSUE_DEFAULTS) {
5653
5756
  return {
5654
5757
  name: "business-models",
5655
5758
  description: "Business-model authoring pipeline: Osterwalder Business Model Canvas plus BIZBOK value streams per industry segment. 3 phases (scan, canvas, complete) with business-models:* phase labels. Sits between industry-discovery and bcm-writer in the research pipeline. Enabled by default; domain-neutral; filesystem-durable between phases.",
@@ -5701,9 +5804,9 @@ function buildBusinessModelsBundle(paths = DEFAULT_AGENT_PATHS) {
5701
5804
  }
5702
5805
  ],
5703
5806
  skills: [
5704
- buildScanBusinessModelsSkill(paths),
5705
- buildCanvasBusinessModelSkill(paths),
5706
- buildCompleteBusinessModelSkill(paths)
5807
+ buildScanBusinessModelsSkill(paths, issueDefaults),
5808
+ buildCanvasBusinessModelSkill(paths, issueDefaults),
5809
+ buildCompleteBusinessModelSkill(paths, issueDefaults)
5707
5810
  ],
5708
5811
  subAgents: [buildBusinessModelsAnalystSubAgent(paths)],
5709
5812
  labels: [
@@ -5732,90 +5835,6 @@ function buildBusinessModelsBundle(paths = DEFAULT_AGENT_PATHS) {
5732
5835
  }
5733
5836
  var businessModelsBundle = buildBusinessModelsBundle();
5734
5837
 
5735
- // src/agent/bundles/issue-defaults.ts
5736
- var VALID_STATUS_VALUES = [
5737
- "ready",
5738
- "blocked",
5739
- "in-progress",
5740
- "ready-for-review",
5741
- "needs-attention",
5742
- "done",
5743
- "deferred"
5744
- ];
5745
- var VALID_PRIORITY_VALUES = [
5746
- "critical",
5747
- "high",
5748
- "medium",
5749
- "low",
5750
- "trivial"
5751
- ];
5752
- var DEFAULT_ISSUE_STATUS = "ready";
5753
- var DEFAULT_ISSUE_PRIORITY = "medium";
5754
- var DEFAULT_RESOLVED_ISSUE_DEFAULTS = {
5755
- defaults: {
5756
- status: DEFAULT_ISSUE_STATUS,
5757
- priority: DEFAULT_ISSUE_PRIORITY
5758
- },
5759
- overrides: {}
5760
- };
5761
- function resolveIssueDefaults(config) {
5762
- if (config === void 0) {
5763
- return DEFAULT_RESOLVED_ISSUE_DEFAULTS;
5764
- }
5765
- const overrides = {};
5766
- for (const [phaseLabel, override] of Object.entries(config)) {
5767
- assertValidPhaseLabel(phaseLabel);
5768
- assertValidOverride(phaseLabel, override);
5769
- overrides[phaseLabel] = {
5770
- status: override.status ?? DEFAULT_ISSUE_STATUS,
5771
- priority: override.priority ?? DEFAULT_ISSUE_PRIORITY
5772
- };
5773
- }
5774
- return {
5775
- defaults: {
5776
- status: DEFAULT_ISSUE_STATUS,
5777
- priority: DEFAULT_ISSUE_PRIORITY
5778
- },
5779
- overrides
5780
- };
5781
- }
5782
- function validateIssueDefaultsConfig(config) {
5783
- return resolveIssueDefaults(config);
5784
- }
5785
- function labelsForPhase(resolved, phaseLabel) {
5786
- return resolved.overrides[phaseLabel] ?? resolved.defaults;
5787
- }
5788
- function assertValidPhaseLabel(phaseLabel) {
5789
- if (typeof phaseLabel !== "string" || phaseLabel.trim() === "") {
5790
- throw new Error(
5791
- "AgentConfigOptions.issueDefaults: phase-label keys must be non-empty strings (e.g. `people:research`)."
5792
- );
5793
- }
5794
- }
5795
- function assertValidOverride(phaseLabel, override) {
5796
- if (override === null || typeof override !== "object" || Array.isArray(override)) {
5797
- throw new Error(
5798
- `AgentConfigOptions.issueDefaults["${phaseLabel}"] must be an object with optional \`status\` and \`priority\` fields.`
5799
- );
5800
- }
5801
- const { status, priority } = override;
5802
- if (status === void 0 && priority === void 0) {
5803
- throw new Error(
5804
- `AgentConfigOptions.issueDefaults["${phaseLabel}"] must declare at least one of \`status\` or \`priority\`. Empty entries are rejected because they are almost always a typo on the field name.`
5805
- );
5806
- }
5807
- if (status !== void 0 && !VALID_STATUS_VALUES.includes(status)) {
5808
- throw new Error(
5809
- `AgentConfigOptions.issueDefaults["${phaseLabel}"].status="${status}" is not a recognised status value. Allowed values: ${VALID_STATUS_VALUES.join(", ")}.`
5810
- );
5811
- }
5812
- if (priority !== void 0 && !VALID_PRIORITY_VALUES.includes(priority)) {
5813
- throw new Error(
5814
- `AgentConfigOptions.issueDefaults["${phaseLabel}"].priority="${priority}" is not a recognised priority value. Allowed values: ${VALID_PRIORITY_VALUES.join(", ")}.`
5815
- );
5816
- }
5817
- }
5818
-
5819
5838
  // src/agent/bundles/company-profile.ts
5820
5839
  function buildCompanyProfileAnalystSubAgent(paths, issueDefaults) {
5821
5840
  return {
@@ -7247,7 +7266,6 @@ var CUSTOMER_PROFILE_REFERENCE_FILES = [
7247
7266
  }
7248
7267
  ];
7249
7268
  function buildCustomerProfileAnalystSubAgent(paths, issueDefaults) {
7250
- void issueDefaults;
7251
7269
  return {
7252
7270
  name: "customer-profile-analyst",
7253
7271
  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.",
@@ -7571,12 +7589,23 @@ function buildCustomerProfileAnalystSubAgent(paths, issueDefaults) {
7571
7589
  " customer organizations that do not already have a canonical",
7572
7590
  " profile or an open `company:research` issue. The",
7573
7591
  " `company-profile` bundle owns the downstream profile; this",
7574
- " agent only hands off.",
7592
+ " agent only hands off. Each issue must carry:",
7593
+ "",
7594
+ " - `type:company-profile`",
7595
+ " - `company:research`",
7596
+ ` - \`priority:${labelsForPhase(issueDefaults, "company:research").priority}\``,
7597
+ ` - \`status:${labelsForPhase(issueDefaults, "company:research").status}\``,
7575
7598
  "",
7576
7599
  "9. **Create `people:research` issues** for notable contacts",
7577
7600
  " (economic buyers, technical buyers, user champions) surfaced in",
7578
7601
  " sources. Keep the list small \u2014 at most three individuals per",
7579
7602
  " profile session \u2014 and skip anyone already profiled or queued.",
7603
+ " Each issue must carry:",
7604
+ "",
7605
+ " - `type:people-profile`",
7606
+ " - `people:research`",
7607
+ ` - \`priority:${labelsForPhase(issueDefaults, "people:research").priority}\``,
7608
+ ` - \`status:${labelsForPhase(issueDefaults, "people:research").status}\``,
7580
7609
  "",
7581
7610
  "10. **Verify all handoffs were created** before committing.",
7582
7611
  "",
@@ -7672,21 +7701,39 @@ function buildCustomerProfileAnalystSubAgent(paths, issueDefaults) {
7672
7701
  "7. **Create `req:scan` issues** for each unmet need. Each issue",
7673
7702
  " hands off to the `requirements-analyst` bundle so its scan phase",
7674
7703
  " can deduplicate and open `req:write` issues in the appropriate",
7675
- " category. Each handoff issue body must:",
7676
- " - Carry `type:requirement` and `req:scan` labels",
7704
+ " category. Each handoff issue must carry:",
7705
+ "",
7706
+ " - `type:requirement`",
7707
+ " - `req:scan`",
7708
+ ` - \`priority:${labelsForPhase(issueDefaults, "req:scan").priority}\``,
7709
+ ` - \`status:${labelsForPhase(issueDefaults, "req:scan").status}\``,
7710
+ "",
7711
+ " The body must also:",
7677
7712
  " - Link back to the archetype page and the competitor page",
7678
7713
  " - Cite the specific unmet-need row and the originating job",
7679
- " - Inherit priority from the unmet need (escalate if the",
7680
- " archetype is high-priority and the gap is a deal-breaker)",
7714
+ " - Escalate the priority above the bundle default when the",
7715
+ " archetype is high-priority and the gap is a deal-breaker",
7681
7716
  "",
7682
7717
  "8. **Create `company:research` issues** for competitor organizations",
7683
7718
  " referenced in the analysis that do not already have a canonical",
7684
- " profile or an open `company:research` issue.",
7719
+ " profile or an open `company:research` issue. Each issue must",
7720
+ " carry:",
7721
+ "",
7722
+ " - `type:company-profile`",
7723
+ " - `company:research`",
7724
+ ` - \`priority:${labelsForPhase(issueDefaults, "company:research").priority}\``,
7725
+ ` - \`status:${labelsForPhase(issueDefaults, "company:research").status}\``,
7685
7726
  "",
7686
7727
  "9. **Create `people:research` issues** for notable competitor",
7687
7728
  " leadership or customer-advocacy figures surfaced in the analysis.",
7688
7729
  " Keep this list small \u2014 at most three individuals per competitors",
7689
- " session \u2014 and skip anyone already profiled or queued.",
7730
+ " session \u2014 and skip anyone already profiled or queued. Each",
7731
+ " issue must carry:",
7732
+ "",
7733
+ " - `type:people-profile`",
7734
+ " - `people:research`",
7735
+ ` - \`priority:${labelsForPhase(issueDefaults, "people:research").priority}\``,
7736
+ ` - \`status:${labelsForPhase(issueDefaults, "people:research").status}\``,
7690
7737
  "",
7691
7738
  "10. **Commit and push** the competitor-analysis page and the",
7692
7739
  " updated archetype page. Close the competitors issue.",
@@ -10428,7 +10475,7 @@ function buildMaintenanceAuditSubAgent(paths) {
10428
10475
  ].join("\n")
10429
10476
  };
10430
10477
  }
10431
- function buildMaintenanceAuditSkill(paths) {
10478
+ function buildMaintenanceAuditSkill(paths, issueDefaults) {
10432
10479
  return {
10433
10480
  name: "audit-docs",
10434
10481
  description: "Kick off a documentation-maintenance audit cycle (scan \u2192 fix \u2192 verify). Creates a maint:scan issue for the supplied scope and dispatches Phase 1.",
@@ -10463,7 +10510,7 @@ function buildMaintenanceAuditSkill(paths) {
10463
10510
  "## Steps",
10464
10511
  "",
10465
10512
  "1. Create a `maint:scan` issue with `type:maintenance`,",
10466
- " `priority:medium`, and `status:ready`. Body must list:",
10513
+ ` \`priority:${labelsForPhase(issueDefaults, "maint:scan").priority}\`, and \`status:${labelsForPhase(issueDefaults, "maint:scan").status}\`. Body must list:`,
10467
10514
  " - `<DOCS_ROOT>` \u2014 the doc tree to audit",
10468
10515
  " - `<AUDIT_ROOT>` \u2014 where to write the audit report",
10469
10516
  " - `<AUDIT_SLUG>` \u2014 short identifier for this audit",
@@ -10485,7 +10532,7 @@ function buildMaintenanceAuditSkill(paths) {
10485
10532
  ].join("\n")
10486
10533
  };
10487
10534
  }
10488
- function buildMaintenanceVerifySkill() {
10535
+ function buildMaintenanceVerifySkill(issueDefaults) {
10489
10536
  return {
10490
10537
  name: "verify-audit",
10491
10538
  description: "Kick off the verify phase of a documentation-maintenance audit cycle. Creates a maint:verify issue that re-runs the scan checks scoped to the paths a fix phase touched, compares pre/post findings, and closes the parent maint:scan issue when clean or files a follow-up maint:scan for residual findings.",
@@ -10526,7 +10573,7 @@ function buildMaintenanceVerifySkill() {
10526
10573
  "## Steps",
10527
10574
  "",
10528
10575
  "1. Create a `maint:verify` issue with `type:maintenance`,",
10529
- " `priority:medium`, and `status:ready`. Body must list:",
10576
+ ` \`priority:${labelsForPhase(issueDefaults, "maint:verify").priority}\`, and \`status:${labelsForPhase(issueDefaults, "maint:verify").status}\`. Body must list:`,
10530
10577
  " - The parent `maint:scan` issue number",
10531
10578
  " - The Phase 1 audit report path",
10532
10579
  " - The Phase 2 fix report path (if one exists)",
@@ -10543,7 +10590,7 @@ function buildMaintenanceVerifySkill() {
10543
10590
  ].join("\n")
10544
10591
  };
10545
10592
  }
10546
- function buildMaintenanceAuditBundle(paths = DEFAULT_AGENT_PATHS) {
10593
+ function buildMaintenanceAuditBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAULT_RESOLVED_ISSUE_DEFAULTS) {
10547
10594
  return {
10548
10595
  name: "maintenance-audit",
10549
10596
  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.",
@@ -10586,7 +10633,10 @@ function buildMaintenanceAuditBundle(paths = DEFAULT_AGENT_PATHS) {
10586
10633
  tags: ["workflow"]
10587
10634
  }
10588
10635
  ],
10589
- skills: [buildMaintenanceAuditSkill(paths), buildMaintenanceVerifySkill()],
10636
+ skills: [
10637
+ buildMaintenanceAuditSkill(paths, issueDefaults),
10638
+ buildMaintenanceVerifySkill(issueDefaults)
10639
+ ],
10590
10640
  subAgents: [buildMaintenanceAuditSubAgent(paths)],
10591
10641
  labels: [
10592
10642
  {
@@ -17288,7 +17338,6 @@ var REGULATORY_RESEARCH_REFERENCE_FILES = [
17288
17338
  }
17289
17339
  ];
17290
17340
  function buildRegulatoryResearchAnalystSubAgent(paths, issueDefaults) {
17291
- void issueDefaults;
17292
17341
  return {
17293
17342
  name: "regulatory-research-analyst",
17294
17343
  description: "Authors jurisdictional compliance research through a 3-phase pipeline (scan \u2192 research \u2192 impact). Enumerates applicable regulations by jurisdiction and business activity, researches each in depth, and produces an impact analysis that hands off actionable obligations to the requirements-analyst as req:scan seeds in the SEC category. One phase per session, tracked by regulatory:* GitHub issue labels with filesystem-based durability between phases.",
@@ -17643,6 +17692,12 @@ function buildRegulatoryResearchAnalystSubAgent(paths, issueDefaults) {
17643
17692
  " regulator agencies that do not already have a canonical profile",
17644
17693
  " or an open `company:research` issue. The `company-profile`",
17645
17694
  " bundle owns the downstream profile; this agent only hands off.",
17695
+ " Each issue must carry:",
17696
+ "",
17697
+ " - `type:company-profile`",
17698
+ " - `company:research`",
17699
+ ` - \`priority:${labelsForPhase(issueDefaults, "company:research").priority}\``,
17700
+ ` - \`status:${labelsForPhase(issueDefaults, "company:research").status}\``,
17646
17701
  "",
17647
17702
  "9. **Verify all handoffs were created** before committing.",
17648
17703
  "",
@@ -17711,25 +17766,42 @@ function buildRegulatoryResearchAnalystSubAgent(paths, issueDefaults) {
17711
17766
  "4. **Create `req:scan` issues** for each capability gap identified.",
17712
17767
  " Each issue hands off to the `requirements-analyst` bundle so its",
17713
17768
  " scan phase can deduplicate and open `req:write` issues in the",
17714
- " SEC category. The issue body must:",
17715
- " - Carry `type:requirement` and `req:scan` labels",
17769
+ " SEC category. Each issue must carry:",
17770
+ "",
17771
+ " - `type:requirement`",
17772
+ " - `req:scan`",
17773
+ ` - \`priority:${labelsForPhase(issueDefaults, "req:scan").priority}\``,
17774
+ ` - \`status:${labelsForPhase(issueDefaults, "req:scan").status}\``,
17775
+ "",
17776
+ " The body must also:",
17716
17777
  " - Identify the target category as **SEC** (security & compliance)",
17717
17778
  " in the body so the downstream writer phase picks up the right",
17718
17779
  " template",
17719
17780
  " - Link back to the regulation page and cite the triggering",
17720
17781
  " requirement",
17721
- " - Inherit priority from the impact issue (escalate if the",
17722
- " regulation is already in force and the gap is unmitigated)",
17782
+ " - Escalate the priority above the bundle default when the",
17783
+ " regulation is already in force and the gap is unmitigated",
17723
17784
  "",
17724
17785
  "5. **Create `company:research` issues** for any enforcement body",
17725
17786
  " mentioned on the regulation page that does not already have a",
17726
- " canonical profile or an open `company:research` issue.",
17787
+ " canonical profile or an open `company:research` issue. Each",
17788
+ " issue must carry:",
17789
+ "",
17790
+ " - `type:company-profile`",
17791
+ " - `company:research`",
17792
+ ` - \`priority:${labelsForPhase(issueDefaults, "company:research").priority}\``,
17793
+ ` - \`status:${labelsForPhase(issueDefaults, "company:research").status}\``,
17727
17794
  "",
17728
17795
  "6. **Create `people:research` issues** for notable regulatory",
17729
17796
  " leaders (commissioners, agency directors, lead policy authors)",
17730
17797
  " mentioned on the regulation page. Keep this list small \u2014 at most",
17731
17798
  " three individuals per impact session \u2014 and skip anyone already",
17732
- " profiled or queued.",
17799
+ " profiled or queued. Each issue must carry:",
17800
+ "",
17801
+ " - `type:people-profile`",
17802
+ " - `people:research`",
17803
+ ` - \`priority:${labelsForPhase(issueDefaults, "people:research").priority}\``,
17804
+ ` - \`status:${labelsForPhase(issueDefaults, "people:research").status}\``,
17733
17805
  "",
17734
17806
  "7. **Commit and push** the updated regulation page. Close the",
17735
17807
  " impact issue.",
@@ -18258,7 +18330,7 @@ var REQ_WRITE_ISSUE_SCHEMA_SECTION = [
18258
18330
  ];
18259
18331
 
18260
18332
  // src/agent/bundles/requirements-analyst.ts
18261
- function buildRequirementsAnalystSubAgent(paths) {
18333
+ function buildRequirementsAnalystSubAgent(paths, issueDefaults) {
18262
18334
  return {
18263
18335
  name: "requirements-analyst",
18264
18336
  description: "Discovers requirement gaps from BCM model docs, competitive analysis, product docs, and meeting extracts. Produces scan reports, proposals, and req:write issues for the downstream requirements-writer agent. Runs through a 2-phase pipeline (scan \u2192 draft-trace), one phase per session, tracked by req:* GitHub issue labels.",
@@ -18576,14 +18648,14 @@ function buildRequirementsAnalystSubAgent(paths) {
18576
18648
  " `## Template: req:write` of",
18577
18649
  " `docs/src/content/docs/agents/issue-templates.md`.",
18578
18650
  "",
18579
- " All `type:requirement` issues default to `priority:medium` (override",
18651
+ ` All \`type:requirement\` issues default to \`priority:${labelsForPhase(issueDefaults, "req:write").priority}\` (override`,
18580
18652
  " only if the proposal's priority was explicitly High or Low). Each",
18581
18653
  " issue must also carry the `req:write` phase label plus the matching",
18582
18654
  " `tier:*` label so the downstream `requirements-writer` bundle picks",
18583
18655
  " it up with the correct tier. Concretely, the label list includes",
18584
18656
  ' `--label "type:requirement"`, `--label "req:write"`,',
18585
- ' `--label "tier:<tier-slug>"`, `--label "status:ready"`, and',
18586
- ' `--label "priority:medium"`.',
18657
+ ` \`--label "tier:<tier-slug>"\`, \`--label "status:${labelsForPhase(issueDefaults, "req:write").status}"\`, and`,
18658
+ ` \`--label "priority:${labelsForPhase(issueDefaults, "req:write").priority}"\`.`,
18587
18659
  "",
18588
18660
  " The body must carry the three writer-required fields in an",
18589
18661
  " `## Objective` block, written as bold-prefixed lines so the",
@@ -18600,7 +18672,7 @@ function buildRequirementsAnalystSubAgent(paths) {
18600
18672
  "",
18601
18673
  " When one of Category / Tier / Output Path could not be derived",
18602
18674
  " from the proposal (for example, the proposal omitted the Tier",
18603
- " line), replace `status:ready` with `status:needs-attention` in",
18675
+ ` line), replace \`status:${labelsForPhase(issueDefaults, "req:write").status}\` with \`status:needs-attention\` in`,
18604
18676
  " the label list and add a `Missing: <field> \u2014 <reason>` line",
18605
18677
  " directly below the Output Path line in the body. Populate",
18606
18678
  " whichever of the three fields **could** be derived so a human",
@@ -18666,48 +18738,50 @@ function buildRequirementsAnalystSubAgent(paths) {
18666
18738
  ].join("\n")
18667
18739
  };
18668
18740
  }
18669
- var scanRequirementsSkill = {
18670
- name: "scan-requirements",
18671
- description: "Kick off a requirements-analyst scan across BCM model docs, competitive analysis, product docs, or meeting extracts. Creates a req:scan issue and dispatches Phase 1.",
18672
- disableModelInvocation: true,
18673
- userInvocable: true,
18674
- context: "fork",
18675
- agent: "requirements-analyst",
18676
- platforms: { cursor: { exclude: true } },
18677
- instructions: [
18678
- "# Scan Requirements",
18679
- "",
18680
- "Kick off a requirements-analyst scan cycle. Creates a `req:scan` issue",
18681
- "targeted at the requested scope and dispatches Phase 1 (Scan) in the",
18682
- "requirements-analyst agent.",
18683
- "",
18684
- "## Usage",
18685
- "",
18686
- "/scan-requirements <scope>",
18687
- "",
18688
- "Where `<scope>` is one of:",
18689
- "- `bcm:<PREFIX-NNN>` \u2014 a single BCM model doc",
18690
- "- `competitive:<slug>` \u2014 a single competitive analysis doc",
18691
- "- `product-roadmap` \u2014 the prioritized feature roadmap",
18692
- "- `entity-taxonomy` \u2014 the entity taxonomy doc",
18693
- "- `meeting:<slug>` \u2014 a meeting extract",
18694
- "- `all-bcm` / `all-competitive` \u2014 full sweep (long-running)",
18695
- "",
18696
- "## Steps",
18697
- "",
18698
- "1. Create a `req:scan` issue with `type:requirement`, `priority:medium`,",
18699
- " and `status:ready`. Body must list the files to read and the scan scope.",
18700
- "2. Execute Phase 1 (Scan) of the requirements-analyst agent.",
18701
- "3. If gaps are found, a `req:draft-trace` issue is created automatically.",
18702
- "",
18703
- "## Output",
18704
- "",
18705
- "- A `req-scan-<scope>-<YYYY-MM-DD>.md` file under the project's research",
18706
- " requirements directory.",
18707
- "- A `req:draft-trace` issue if any gaps were identified."
18708
- ].join("\n")
18709
- };
18710
- function buildRequirementsAnalystBundle(paths = DEFAULT_AGENT_PATHS) {
18741
+ function buildScanRequirementsSkill(issueDefaults) {
18742
+ return {
18743
+ name: "scan-requirements",
18744
+ description: "Kick off a requirements-analyst scan across BCM model docs, competitive analysis, product docs, or meeting extracts. Creates a req:scan issue and dispatches Phase 1.",
18745
+ disableModelInvocation: true,
18746
+ userInvocable: true,
18747
+ context: "fork",
18748
+ agent: "requirements-analyst",
18749
+ platforms: { cursor: { exclude: true } },
18750
+ instructions: [
18751
+ "# Scan Requirements",
18752
+ "",
18753
+ "Kick off a requirements-analyst scan cycle. Creates a `req:scan` issue",
18754
+ "targeted at the requested scope and dispatches Phase 1 (Scan) in the",
18755
+ "requirements-analyst agent.",
18756
+ "",
18757
+ "## Usage",
18758
+ "",
18759
+ "/scan-requirements <scope>",
18760
+ "",
18761
+ "Where `<scope>` is one of:",
18762
+ "- `bcm:<PREFIX-NNN>` \u2014 a single BCM model doc",
18763
+ "- `competitive:<slug>` \u2014 a single competitive analysis doc",
18764
+ "- `product-roadmap` \u2014 the prioritized feature roadmap",
18765
+ "- `entity-taxonomy` \u2014 the entity taxonomy doc",
18766
+ "- `meeting:<slug>` \u2014 a meeting extract",
18767
+ "- `all-bcm` / `all-competitive` \u2014 full sweep (long-running)",
18768
+ "",
18769
+ "## Steps",
18770
+ "",
18771
+ `1. Create a \`req:scan\` issue with \`type:requirement\`, \`priority:${labelsForPhase(issueDefaults, "req:scan").priority}\`,`,
18772
+ ` and \`status:${labelsForPhase(issueDefaults, "req:scan").status}\`. Body must list the files to read and the scan scope.`,
18773
+ "2. Execute Phase 1 (Scan) of the requirements-analyst agent.",
18774
+ "3. If gaps are found, a `req:draft-trace` issue is created automatically.",
18775
+ "",
18776
+ "## Output",
18777
+ "",
18778
+ "- A `req-scan-<scope>-<YYYY-MM-DD>.md` file under the project's research",
18779
+ " requirements directory.",
18780
+ "- A `req:draft-trace` issue if any gaps were identified."
18781
+ ].join("\n")
18782
+ };
18783
+ }
18784
+ function buildRequirementsAnalystBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAULT_RESOLVED_ISSUE_DEFAULTS) {
18711
18785
  return {
18712
18786
  name: "requirements-analyst",
18713
18787
  description: "Requirements gap-discovery agent bundle for BCM-driven projects. 2-phase pipeline (scan, draft-trace) with req:* phase labels.",
@@ -18744,8 +18818,8 @@ function buildRequirementsAnalystBundle(paths = DEFAULT_AGENT_PATHS) {
18744
18818
  tags: ["workflow"]
18745
18819
  }
18746
18820
  ],
18747
- skills: [scanRequirementsSkill],
18748
- subAgents: [buildRequirementsAnalystSubAgent(paths)],
18821
+ skills: [buildScanRequirementsSkill(issueDefaults)],
18822
+ subAgents: [buildRequirementsAnalystSubAgent(paths, issueDefaults)],
18749
18823
  labels: [
18750
18824
  {
18751
18825
  name: "type:requirement",
@@ -21246,7 +21320,7 @@ function buildRequirementsWriterSubAgent(paths) {
21246
21320
  ].join("\n")
21247
21321
  };
21248
21322
  }
21249
- function buildWriteRequirementSkill(paths) {
21323
+ function buildWriteRequirementSkill(paths, issueDefaults) {
21250
21324
  return {
21251
21325
  name: WRITE_REQUIREMENT_SKILL_NAME,
21252
21326
  description: "Write one formal requirement document (BR / FR / NFR / TR / ADR / SEC / DR / INT / OPS / UX / MT) using the shipped category template and decision-authority rules. Picks up a req:write issue created by the upstream requirements-analyst pipeline (or kicked off ad hoc) and dispatches the requirements-writer agent.",
@@ -21300,7 +21374,7 @@ function buildWriteRequirementSkill(paths) {
21300
21374
  "## Steps",
21301
21375
  "",
21302
21376
  "1. Create a `req:write` issue with `type:requirement`,",
21303
- " `priority:medium`, `status:ready`, and the matching `tier:*` label.",
21377
+ ` \`priority:${labelsForPhase(issueDefaults, "req:write").priority}\`, \`status:${labelsForPhase(issueDefaults, "req:write").status}\`, and the matching \`tier:*\` label.`,
21304
21378
  " Body must include the category, tier, output path, and a pointer",
21305
21379
  " to the upstream proposal (or a direct user description if no",
21306
21380
  " proposals file exists).",
@@ -21319,7 +21393,7 @@ function buildWriteRequirementSkill(paths) {
21319
21393
  ].join("\n")
21320
21394
  };
21321
21395
  }
21322
- function buildRequirementsWriterBundle(paths = DEFAULT_AGENT_PATHS) {
21396
+ function buildRequirementsWriterBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAULT_RESOLVED_ISSUE_DEFAULTS) {
21323
21397
  return {
21324
21398
  name: "requirements-writer",
21325
21399
  description: "Requirements writer agent bundle. Authors formal requirement documents from upstream proposals using the 11-category taxonomy (BR, FR, NFR, TR, ADR, SEC, DR, INT, OPS, UX, MT), the four-tier classification, and decision-authority rules (direct-write vs. propose-only). Ships 13 templates plus a standards-and-frameworks reference.",
@@ -21367,7 +21441,7 @@ function buildRequirementsWriterBundle(paths = DEFAULT_AGENT_PATHS) {
21367
21441
  tags: ["workflow"]
21368
21442
  }
21369
21443
  ],
21370
- skills: [buildWriteRequirementSkill(paths)],
21444
+ skills: [buildWriteRequirementSkill(paths, issueDefaults)],
21371
21445
  subAgents: [buildRequirementsWriterSubAgent(paths)],
21372
21446
  labels: [
21373
21447
  {
@@ -21401,7 +21475,7 @@ function buildRequirementsWriterBundle(paths = DEFAULT_AGENT_PATHS) {
21401
21475
  var requirementsWriterBundle = buildRequirementsWriterBundle();
21402
21476
 
21403
21477
  // src/agent/bundles/requirements-reviewer.ts
21404
- function buildRequirementsReviewerSubAgent(paths) {
21478
+ function buildRequirementsReviewerSubAgent(paths, issueDefaults) {
21405
21479
  return {
21406
21480
  name: "requirements-reviewer",
21407
21481
  description: "Audits and deprecates existing requirement documents (BR, FR, NFR, TR, ADR, SEC, DR, INT, OPS, UX, MT). In `req:review` mode, runs the 12-check audit (structural compliance, categorization, traceability, cross-reference integrity, sequence integrity, content quality, registry sync, decision-authority compliance, tier classification, cross-referencing conventions, stale `Proposed` ADR/TR decisions) and produces a report grouped by Critical / Warning / Info (plus a dedicated Stale decisions section). In `req:deprecate` mode, transitions target documents to `Deprecated` or `Superseded`, updates the category index row, and files `req:write` follow-ups for every back-reference so the writer can rewrite them. One phase per session.",
@@ -22366,7 +22440,7 @@ function buildRequirementsReviewerSubAgent(paths) {
22366
22440
  " reference).",
22367
22441
  "- Labels: `type:requirement`, `req:write`, the matching",
22368
22442
  " `tier:*` label derived from the referencing document's Tier,",
22369
- " `priority:medium`, `status:ready`.",
22443
+ ` \`priority:${labelsForPhase(issueDefaults, "req:write").priority}\`, \`status:${labelsForPhase(issueDefaults, "req:write").status}\`.`,
22370
22444
  "- If any of Category / Tier / Output Path cannot be derived from",
22371
22445
  " the referencing document, open the follow-up with",
22372
22446
  " `status:needs-attention` and a `Missing:` line, per the same",
@@ -22456,7 +22530,7 @@ function buildRequirementsReviewerSubAgent(paths) {
22456
22530
  ].join("\n")
22457
22531
  };
22458
22532
  }
22459
- function buildReviewRequirementsSkill(paths) {
22533
+ function buildReviewRequirementsSkill(paths, issueDefaults) {
22460
22534
  return {
22461
22535
  name: "review-requirements",
22462
22536
  description: "Audit existing requirement documents (BR / FR / NFR / TR / ADR / SEC / DR / INT / OPS / UX / MT) for structural compliance, categorization, traceability, cross-reference integrity, sequence integrity, content quality, registry sync, decision-authority compliance, tier classification, cross-referencing conventions, and stale `Proposed` ADR/TR decisions. Supports four scopes (full audit, category, single document, targeted check) and dispatches the requirements-reviewer agent. Audits documents \u2014 never writes them. Soft dependency: expects requirement templates at `" + REQUIREMENTS_WRITER_PATHS.templatesRoot + "`, shipped by the requirements-writer bundle.",
@@ -22519,7 +22593,7 @@ function buildReviewRequirementsSkill(paths) {
22519
22593
  "## Steps",
22520
22594
  "",
22521
22595
  "1. Create a `req:review` issue with `type:requirement`,",
22522
- " `priority:medium`, and `status:ready`. Body must include the",
22596
+ ` \`priority:${labelsForPhase(issueDefaults, "req:review").priority}\`, and \`status:${labelsForPhase(issueDefaults, "req:review").status}\`. Body must include the`,
22523
22597
  " scope, the requirements root (or accept the default), and the",
22524
22598
  " output path.",
22525
22599
  "2. Execute the review phase of the requirements-reviewer agent.",
@@ -22558,7 +22632,7 @@ function buildReviewRequirementsSkill(paths) {
22558
22632
  ].join("\n")
22559
22633
  };
22560
22634
  }
22561
- function buildDeprecateRequirementSkill(_paths) {
22635
+ function buildDeprecateRequirementSkill(_paths, issueDefaults) {
22562
22636
  return {
22563
22637
  name: "deprecate-requirement",
22564
22638
  description: "Transition one or more requirement documents to `Deprecated` or `Superseded`. Creates a `req:deprecate` issue and dispatches the requirements-reviewer agent's deprecation phase, which edits the target document's Status, Revision History, Superseded-by traceability link, and category index row, then files `req:write` follow-ups for every back-reference so the requirements-writer can rewrite them. The deprecation phase pauses for explicit human confirmation before editing (unless the issue body pre-approves the change).",
@@ -22621,7 +22695,7 @@ function buildDeprecateRequirementSkill(_paths) {
22621
22695
  "## Steps",
22622
22696
  "",
22623
22697
  "1. Create a `req:deprecate` issue with `type:requirement`,",
22624
- " `priority:medium`, and `status:ready`. Body must include the",
22698
+ ` \`priority:${labelsForPhase(issueDefaults, "req:deprecate").priority}\`, and \`status:${labelsForPhase(issueDefaults, "req:deprecate").status}\`. Body must include the`,
22625
22699
  " Targets, Transition, and Reason sections above (optionally",
22626
22700
  " `Pre-approved: yes`).",
22627
22701
  "2. Execute the deprecation phase of the requirements-reviewer",
@@ -22662,7 +22736,7 @@ function buildDeprecateRequirementSkill(_paths) {
22662
22736
  ].join("\n")
22663
22737
  };
22664
22738
  }
22665
- function buildRequirementsReviewerBundle(paths = DEFAULT_AGENT_PATHS) {
22739
+ function buildRequirementsReviewerBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAULT_RESOLVED_ISSUE_DEFAULTS) {
22666
22740
  return {
22667
22741
  name: "requirements-reviewer",
22668
22742
  description: "Requirements reviewer agent bundle. Audits existing requirement documents (BR, FR, NFR, TR, ADR, SEC, DR, INT, OPS, UX, MT) via the 12-check review phase (including Check 12: stale `Proposed` ADR/TR decisions), and transitions requirements to `Deprecated` or `Superseded` via the deprecation phase (narrow writes to Status, Revision History, Superseded-by, and category index row, with `req:write` follow-ups for every back-reference). Reads templates from the requirements-writer bundle's reference directory; ships no templates of its own.",
@@ -22775,10 +22849,10 @@ function buildRequirementsReviewerBundle(paths = DEFAULT_AGENT_PATHS) {
22775
22849
  }
22776
22850
  ],
22777
22851
  skills: [
22778
- buildReviewRequirementsSkill(paths),
22779
- buildDeprecateRequirementSkill(paths)
22852
+ buildReviewRequirementsSkill(paths, issueDefaults),
22853
+ buildDeprecateRequirementSkill(paths, issueDefaults)
22780
22854
  ],
22781
- subAgents: [buildRequirementsReviewerSubAgent(paths)],
22855
+ subAgents: [buildRequirementsReviewerSubAgent(paths, issueDefaults)],
22782
22856
  labels: [
22783
22857
  {
22784
22858
  name: "req:review",
@@ -23152,7 +23226,7 @@ function buildResearchAnalystSubAgent(paths) {
23152
23226
  ].join("\n")
23153
23227
  };
23154
23228
  }
23155
- function buildResearchSkill(paths) {
23229
+ function buildResearchSkill(paths, issueDefaults) {
23156
23230
  return {
23157
23231
  name: "research",
23158
23232
  description: "Kick off a generic research micro-task pipeline. Creates a research:scope issue and dispatches Phase 1 (Scope) in the research-analyst agent.",
@@ -23192,7 +23266,7 @@ function buildResearchSkill(paths) {
23192
23266
  "## Steps",
23193
23267
  "",
23194
23268
  "1. Create a `research:scope` issue with `type:research`,",
23195
- " `priority:medium`, and `status:ready`. Body must include the",
23269
+ ` \`priority:${labelsForPhase(issueDefaults, "research:scope").priority}\`, and \`status:${labelsForPhase(issueDefaults, "research:scope").status}\`. Body must include the`,
23196
23270
  " verbatim question, authorized sources, and any overrides.",
23197
23271
  "2. Execute Phase 1 (Scope) of the research-analyst agent.",
23198
23272
  "3. Phase 1 creates `research:slice` issues (one per slice) and a",
@@ -23210,7 +23284,7 @@ function buildResearchSkill(paths) {
23210
23284
  ].join("\n")
23211
23285
  };
23212
23286
  }
23213
- function buildResearchPipelineBundle(paths = DEFAULT_AGENT_PATHS) {
23287
+ function buildResearchPipelineBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAULT_RESOLVED_ISSUE_DEFAULTS) {
23214
23288
  return {
23215
23289
  name: "research-pipeline",
23216
23290
  description: "Generic research micro-task pipeline: scope, N-way slice search/synthesize, and verify. Enabled by default; domain-neutral; filesystem-durable between phases.",
@@ -23243,7 +23317,7 @@ function buildResearchPipelineBundle(paths = DEFAULT_AGENT_PATHS) {
23243
23317
  tags: ["workflow"]
23244
23318
  }
23245
23319
  ],
23246
- skills: [buildResearchSkill(paths)],
23320
+ skills: [buildResearchSkill(paths, issueDefaults)],
23247
23321
  subAgents: [buildResearchAnalystSubAgent(paths)],
23248
23322
  labels: [
23249
23323
  {
@@ -24587,7 +24661,6 @@ var STANDARDS_COMPARE_REFERENCE_FILES = [
24587
24661
  }
24588
24662
  ];
24589
24663
  function buildStandardsResearchAnalystSubAgent(paths, issueDefaults) {
24590
- void issueDefaults;
24591
24664
  return {
24592
24665
  name: "standards-research-analyst",
24593
24666
  description: "Authors version-aware interoperability standards research through a 5-phase pipeline (scope \u2192 research \u2192 compare \u2192 extension \u2192 organizations). Researches one standard version per session, synthesizes cross-version comparisons, profiles extensions/profiles/implementation guides, and profiles standards-body organizations. Hands off canonical company and people profiles to the company-profile and people-profile bundles via company:research and people:research issues. One phase per session, tracked by standards:* GitHub issue labels with filesystem-based durability between phases.",
@@ -24951,12 +25024,23 @@ function buildStandardsResearchAnalystSubAgent(paths, issueDefaults) {
24951
25024
  " *Organizations of Interest* that does not already have a",
24952
25025
  " canonical company profile or an open `company:research` issue.",
24953
25026
  " The `company-profile` bundle owns the downstream profile; this",
24954
- " agent only hands off.",
25027
+ " agent only hands off. Each issue must carry:",
25028
+ "",
25029
+ " - `type:company-profile`",
25030
+ " - `company:research`",
25031
+ ` - \`priority:${labelsForPhase(issueDefaults, "company:research").priority}\``,
25032
+ ` - \`status:${labelsForPhase(issueDefaults, "company:research").status}\``,
24955
25033
  "",
24956
25034
  "6. **Create `people:research` issues** for every entry in *People of",
24957
25035
  " Interest* that does not already have a canonical person profile",
24958
25036
  " or an open `people:research` issue. The `people-profile` bundle",
24959
- " owns the downstream profile; this agent only hands off.",
25037
+ " owns the downstream profile; this agent only hands off. Each",
25038
+ " issue must carry:",
25039
+ "",
25040
+ " - `type:people-profile`",
25041
+ " - `people:research`",
25042
+ ` - \`priority:${labelsForPhase(issueDefaults, "people:research").priority}\``,
25043
+ ` - \`status:${labelsForPhase(issueDefaults, "people:research").status}\``,
24960
25044
  "",
24961
25045
  "7. **Verify all handoffs were created** before committing. For each",
24962
25046
  " entity in both tables, confirm an existing profile or a fresh",
@@ -25243,12 +25327,23 @@ function buildStandardsResearchAnalystSubAgent(paths, issueDefaults) {
25243
25327
  " `company:research` issue if no canonical profile exists and no",
25244
25328
  " open `company:research` issue is already tracking this",
25245
25329
  " organization. The `company-profile` bundle owns the downstream",
25246
- " profile.",
25330
+ " profile. The issue must carry:",
25331
+ "",
25332
+ " - `type:company-profile`",
25333
+ " - `company:research`",
25334
+ ` - \`priority:${labelsForPhase(issueDefaults, "company:research").priority}\``,
25335
+ ` - \`status:${labelsForPhase(issueDefaults, "company:research").status}\``,
25247
25336
  "",
25248
25337
  "6. **Hand off canonical people profiles** by creating one",
25249
25338
  " `people:research` issue per leadership entry that does not",
25250
25339
  " already have a canonical profile or an open `people:research`",
25251
25340
  " issue. The `people-profile` bundle owns the downstream profiles.",
25341
+ " Each issue must carry:",
25342
+ "",
25343
+ " - `type:people-profile`",
25344
+ " - `people:research`",
25345
+ ` - \`priority:${labelsForPhase(issueDefaults, "people:research").priority}\``,
25346
+ ` - \`status:${labelsForPhase(issueDefaults, "people:research").status}\``,
25252
25347
  "",
25253
25348
  "7. **Commit and push** the organization page. Close the",
25254
25349
  " organizations issue.",
@@ -27025,20 +27120,20 @@ function buildBuiltInBundles(paths = DEFAULT_AGENT_PATHS, issueDefaults = DEFAUL
27025
27120
  agendaBundle,
27026
27121
  orchestratorBundle,
27027
27122
  prReviewBundle,
27028
- buildRequirementsAnalystBundle(paths),
27029
- buildRequirementsWriterBundle(paths),
27030
- buildRequirementsReviewerBundle(paths),
27031
- buildResearchPipelineBundle(paths),
27123
+ buildRequirementsAnalystBundle(paths, issueDefaults),
27124
+ buildRequirementsWriterBundle(paths, issueDefaults),
27125
+ buildRequirementsReviewerBundle(paths, issueDefaults),
27126
+ buildResearchPipelineBundle(paths, issueDefaults),
27032
27127
  buildCompanyProfileBundle(paths, issueDefaults),
27033
27128
  buildCustomerProfileBundle(paths, issueDefaults),
27034
27129
  buildPeopleProfileBundle(paths, issueDefaults),
27035
27130
  buildSoftwareProfileBundle(paths, issueDefaults),
27036
27131
  buildIndustryDiscoveryBundle(paths, issueDefaults),
27037
- buildBusinessModelsBundle(paths),
27038
- buildBcmWriterBundle(paths),
27132
+ buildBusinessModelsBundle(paths, issueDefaults),
27133
+ buildBcmWriterBundle(paths, issueDefaults),
27039
27134
  buildStandardsResearchBundle(paths, issueDefaults),
27040
27135
  buildRegulatoryResearchBundle(paths, issueDefaults),
27041
- buildMaintenanceAuditBundle(paths),
27136
+ buildMaintenanceAuditBundle(paths, issueDefaults),
27042
27137
  buildDocsSyncBundle(paths)
27043
27138
  ];
27044
27139
  }