@codedrifters/configulator 0.0.275 → 0.0.276

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
@@ -246,16 +246,11 @@ __export(index_exports, {
246
246
  DEFAULT_TYPE_LABELS: () => DEFAULT_TYPE_LABELS,
247
247
  DEFAULT_UNBLOCK_COMMENT_TEMPLATE: () => DEFAULT_UNBLOCK_COMMENT_TEMPLATE,
248
248
  DEFAULT_UNBLOCK_DEPENDENTS_ENABLED: () => DEFAULT_UNBLOCK_DEPENDENTS_ENABLED,
249
- DEFAULT_WORKFLOW_DIAGRAMS_BUNDLE_PATH_PATTERNS: () => DEFAULT_WORKFLOW_DIAGRAMS_BUNDLE_PATH_PATTERNS,
250
- DEFAULT_WORKFLOW_DIAGRAMS_EMIT_CHECKER: () => DEFAULT_WORKFLOW_DIAGRAMS_EMIT_CHECKER,
251
- DEFAULT_WORKFLOW_DIAGRAMS_EMIT_STARTER: () => DEFAULT_WORKFLOW_DIAGRAMS_EMIT_STARTER,
252
- DEFAULT_WORKFLOW_DIAGRAMS_ENABLED: () => DEFAULT_WORKFLOW_DIAGRAMS_ENABLED,
253
- DEFAULT_WORKFLOW_DIAGRAMS_PATH: () => DEFAULT_WORKFLOW_DIAGRAMS_PATH,
254
- DEFAULT_WORKFLOW_DIAGRAMS_REQUIRE_UPDATE: () => DEFAULT_WORKFLOW_DIAGRAMS_REQUIRE_UPDATE,
255
249
  DOCS_SYNC_AUDIT_SCHEMA_VERSION: () => DOCS_SYNC_AUDIT_SCHEMA_VERSION,
256
250
  JsiiFaker: () => JsiiFaker,
257
251
  LAYOUT_ENFORCEMENT: () => LAYOUT_ENFORCEMENT,
258
252
  LAYOUT_ROOT_BY_PROJECT_TYPE: () => LAYOUT_ROOT_BY_PROJECT_TYPE,
253
+ MAX_LABEL_DESCRIPTION_LENGTH: () => MAX_LABEL_DESCRIPTION_LENGTH,
259
254
  MCP_TRANSPORT: () => MCP_TRANSPORT,
260
255
  MERGE_METHODS: () => MERGE_METHODS,
261
256
  MIMIMUM_RELEASE_AGE: () => MIMIMUM_RELEASE_AGE,
@@ -382,10 +377,6 @@ __export(index_exports, {
382
377
  renderSourceTierExamples: () => renderSourceTierExamples,
383
378
  renderUnblockDependentsScript: () => renderUnblockDependentsScript,
384
379
  renderUnblockDependentsSection: () => renderUnblockDependentsSection,
385
- renderWorkflowDiagramsBundleHook: () => renderWorkflowDiagramsBundleHook,
386
- renderWorkflowDiagramsCheckerScript: () => renderWorkflowDiagramsCheckerScript,
387
- renderWorkflowDiagramsRuleContent: () => renderWorkflowDiagramsRuleContent,
388
- renderWorkflowDiagramsStarterPage: () => renderWorkflowDiagramsStarterPage,
389
380
  requirementsAnalystBundle: () => requirementsAnalystBundle,
390
381
  requirementsReviewerBundle: () => requirementsReviewerBundle,
391
382
  requirementsWriterBundle: () => requirementsWriterBundle,
@@ -408,7 +399,6 @@ __export(index_exports, {
408
399
  resolveTemplateVariables: () => resolveTemplateVariables,
409
400
  resolveTypeScriptProjectOutdir: () => resolveTypeScriptProjectOutdir,
410
401
  resolveUnblockDependents: () => resolveUnblockDependents,
411
- resolveWorkflowDiagrams: () => resolveWorkflowDiagrams,
412
402
  runScan: () => runScan,
413
403
  slackBundle: () => slackBundle,
414
404
  softwareProfileBundle: () => softwareProfileBundle,
@@ -427,7 +417,6 @@ __export(index_exports, {
427
417
  validateSkillEvalsConfig: () => validateSkillEvalsConfig,
428
418
  validateStarlightSingleton: () => validateStarlightSingleton,
429
419
  validateUnblockDependentsConfig: () => validateUnblockDependentsConfig,
430
- validateWorkflowDiagramsConfig: () => validateWorkflowDiagramsConfig,
431
420
  vitestBundle: () => vitestBundle
432
421
  });
433
422
  module.exports = __toCommonJS(index_exports);
@@ -1196,7 +1185,7 @@ var agendaBundle = {
1196
1185
  {
1197
1186
  name: "agenda:finalize",
1198
1187
  color: "BFDADC",
1199
- description: "Phase 2: incorporate late-added items, register in the meetings index, cross-link related docs, and lock the agenda"
1188
+ description: "Phase 2: register in meetings index, cross-link related docs, and lock the agenda before the meeting"
1200
1189
  }
1201
1190
  ]
1202
1191
  };
@@ -3043,442 +3032,6 @@ function assertValidProductContextPath(value) {
3043
3032
  }
3044
3033
  }
3045
3034
 
3046
- // src/agent/bundles/workflow-diagrams.ts
3047
- var DEFAULT_WORKFLOW_DIAGRAMS_ENABLED = true;
3048
- var DEFAULT_WORKFLOW_DIAGRAMS_PATH = "docs/src/content/docs/agents/workflows.md";
3049
- var DEFAULT_WORKFLOW_DIAGRAMS_BUNDLE_PATH_PATTERNS = [
3050
- "packages/@codedrifters/configulator/src/agent/bundles/**/*.ts",
3051
- ".claude/agents/**/*.md",
3052
- ".claude/skills/**/*.md"
3053
- ];
3054
- var DEFAULT_WORKFLOW_DIAGRAMS_EMIT_STARTER = false;
3055
- var DEFAULT_WORKFLOW_DIAGRAMS_EMIT_CHECKER = false;
3056
- var DEFAULT_WORKFLOW_DIAGRAMS_REQUIRE_UPDATE = true;
3057
- function resolveWorkflowDiagrams(config) {
3058
- const diagramsPath = config?.diagramsPath ?? DEFAULT_WORKFLOW_DIAGRAMS_PATH;
3059
- assertValidDiagramsPath(diagramsPath);
3060
- const bundlePathPatterns = config?.bundlePathPatterns ?? DEFAULT_WORKFLOW_DIAGRAMS_BUNDLE_PATH_PATTERNS;
3061
- assertValidBundlePathPatterns2(bundlePathPatterns);
3062
- return {
3063
- enabled: config?.enabled ?? DEFAULT_WORKFLOW_DIAGRAMS_ENABLED,
3064
- diagramsPath,
3065
- bundlePathPatterns,
3066
- emitStarterDiagram: config?.emitStarterDiagram ?? DEFAULT_WORKFLOW_DIAGRAMS_EMIT_STARTER,
3067
- emitChecker: config?.emitChecker ?? DEFAULT_WORKFLOW_DIAGRAMS_EMIT_CHECKER,
3068
- requireDiagramUpdate: config?.requireDiagramUpdate ?? DEFAULT_WORKFLOW_DIAGRAMS_REQUIRE_UPDATE
3069
- };
3070
- }
3071
- function validateWorkflowDiagramsConfig(config) {
3072
- return resolveWorkflowDiagrams(config);
3073
- }
3074
- function renderWorkflowDiagramsRuleContent(wd) {
3075
- if (!wd.enabled) {
3076
- return [
3077
- "# Workflow Diagrams",
3078
- "",
3079
- "**The workflow-diagrams convention is disabled in this project.**",
3080
- "Agents may change bundle or agent source files without updating",
3081
- "any diagrams page. When diagrams fall behind the prose, humans",
3082
- "must reconcile them manually.",
3083
- "",
3084
- "Enable the convention via",
3085
- "`AgentConfigOptions.workflowDiagrams.enabled = true`."
3086
- ].join("\n");
3087
- }
3088
- const requirementVerb = wd.requireDiagramUpdate ? "MUST" : "SHOULD";
3089
- const lines = [
3090
- "# Workflow Diagrams",
3091
- "",
3092
- "This project maintains a single hand-authored workflow-diagrams",
3093
- "page that visualises every agent's phases, its decision points,",
3094
- "and every cross-agent handoff. Prose scattered across rule files",
3095
- "and agent prompts describes each handoff in isolation; the",
3096
- "diagrams page is the single visual reference that shows the",
3097
- "whole pipeline at once.",
3098
- "",
3099
- "Diagrams are **hand-authored for readability**, not",
3100
- "auto-generated. A machine-generated graph of bundle dependencies",
3101
- "would technically stay in sync, but would not communicate the",
3102
- "intent behind each handoff \u2014 so the convention trades",
3103
- "auto-sync for editorial clarity and enforces sync via the rule",
3104
- "below.",
3105
- "",
3106
- "## Diagrams Page",
3107
- "",
3108
- `The workflow-diagrams page lives at \`${wd.diagramsPath}\`. It`,
3109
- "follows a stable structure so the sync rule can mechanically",
3110
- "identify which section matches which bundle:",
3111
- "",
3112
- "1. **Master cross-agent diagram** \u2014 one top-level Mermaid",
3113
- " flowchart showing every agent as a node and every",
3114
- " cross-agent issue-creation or file-consumption handoff as an",
3115
- " edge.",
3116
- "2. **One section per agent / bundle** \u2014 a `## N. <agent-name>`",
3117
- " heading followed by a single Mermaid `flowchart TD` diagram",
3118
- " that depicts the agent's phase graph (nodes = phases /",
3119
- " decisions, edges = transitions, styled end-nodes = commit /",
3120
- " PR / done terminals).",
3121
- "3. **Legend** \u2014 a short table mapping colours and arrow styles",
3122
- " to their meanings (dispatcher vs agent vs skill; solid vs",
3123
- " dashed arrows for issue-creation vs file-consumption).",
3124
- "",
3125
- "Each agent section is independent. Changing one agent's phase",
3126
- "graph touches only that section; cross-agent handoff changes",
3127
- "touch the master diagram plus any affected agent sections.",
3128
- "",
3129
- "## Diagram-Touched-When-Bundle-Touched Rule",
3130
- "",
3131
- `Every change that modifies a bundle's phase graph ${requirementVerb}`,
3132
- `also update \`${wd.diagramsPath}\` in the same change set. The`,
3133
- "rule applies when **any** staged file in a commit or PR matches",
3134
- "one of the bundle-path patterns below:",
3135
- "",
3136
- ...wd.bundlePathPatterns.map((p) => `- \`${p}\``),
3137
- "",
3138
- "Mechanically: when a change set includes a file matching one of",
3139
- `the patterns above, it ${requirementVerb} also include a`,
3140
- `modification to \`${wd.diagramsPath}\`.`,
3141
- "",
3142
- "### What counts as a phase-graph change",
3143
- "",
3144
- "The rule targets edits that change **what the agent does**, not",
3145
- "stylistic tweaks. Concretely:",
3146
- "",
3147
- "- Adding, removing, or renaming a phase label.",
3148
- "- Changing a phase's inputs, outputs, or decision branches.",
3149
- "- Adding or removing a cross-agent handoff (an issue-creation",
3150
- " or file-consumption edge between two bundles).",
3151
- "- Changing the sort order or priority logic that drives",
3152
- " dispatcher routing between tiers.",
3153
- "",
3154
- "Edits that do **not** require a diagram update:",
3155
- "",
3156
- "- Typo fixes, comment tweaks, wording polish in rule prose.",
3157
- "- Refactors that preserve the exact phase / handoff graph",
3158
- " (extracting a helper, renaming an internal variable,",
3159
- " reordering imports).",
3160
- "- Updates to supporting metadata (permissions lists, default",
3161
- " paths) that do not change the visible phase flow.",
3162
- "",
3163
- "When a change is borderline \u2014 the phase graph is unchanged but",
3164
- "the diagram's caption or annotation would be more accurate \u2014",
3165
- "err on the side of updating the diagram. The convention favours",
3166
- "over-updating over silent drift.",
3167
- "",
3168
- "## Authoring Checklist",
3169
- "",
3170
- "Authors and reviewers walk the following checklist before",
3171
- "merging any PR that touches a bundle path:",
3172
- "",
3173
- `1. **Did the phase graph change?** If yes, update \`${wd.diagramsPath}\``,
3174
- " in the same PR \u2014 both the affected agent section and, if the",
3175
- " change added or removed a cross-agent handoff, the master",
3176
- " diagram.",
3177
- "2. **Did the diagram render?** Preview the Mermaid block locally",
3178
- " (or via the docs site's dev server) and confirm it renders",
3179
- " without syntax errors.",
3180
- `3. **Is the section heading stable?** Each agent section uses a`,
3181
- " `## N. <agent-name>` heading where `<agent-name>` matches the",
3182
- " bundle name / agent prompt filename. Keep the headings stable",
3183
- " \u2014 downstream tooling may match on them.",
3184
- "4. **Does the legend still apply?** If a new arrow style or node",
3185
- " colour was introduced, document it in the legend.",
3186
- ""
3187
- ];
3188
- if (wd.emitChecker) {
3189
- lines.push(
3190
- "## Automated Check",
3191
- "",
3192
- `The bundled \`.claude/procedures/check-workflow-diagrams.sh\``,
3193
- "helper enforces the rule mechanically. Given a set of changed",
3194
- "files (as a newline-separated list on stdin, or positional",
3195
- `arguments), it fails non-zero when any file matches a`,
3196
- `bundle-path pattern and \`${wd.diagramsPath}\` is not also in`,
3197
- "the list. Wire it into a pre-commit hook or CI job as needed:",
3198
- "",
3199
- "```bash",
3200
- "# Pre-commit (staged files):",
3201
- "git diff --cached --name-only \\",
3202
- " | .claude/procedures/check-workflow-diagrams.sh",
3203
- "",
3204
- "# CI (branch-vs-base):",
3205
- "git diff --name-only origin/main...HEAD \\",
3206
- " | .claude/procedures/check-workflow-diagrams.sh",
3207
- "```",
3208
- "",
3209
- "The helper exits with a descriptive diagnostic on failure, so",
3210
- "it plugs directly into any hook framework without further",
3211
- "glue. It exits `0` when no bundle files were touched or when",
3212
- "the diagrams file is also present in the change set.",
3213
- ""
3214
- );
3215
- }
3216
- lines.push(
3217
- "## Out of Scope",
3218
- "",
3219
- "The convention intentionally does not:",
3220
- "",
3221
- "- Auto-generate the diagrams \u2014 readability is the point.",
3222
- "- Enforce a specific Mermaid sub-grammar beyond `flowchart TD`",
3223
- " for per-agent sections. Sequence diagrams, state diagrams, or",
3224
- " class diagrams are fine for bespoke sections as long as they",
3225
- " render.",
3226
- "- Gate every unrelated cleanup PR on a diagram touch. The rule",
3227
- " targets phase-graph-affecting edits; pure cleanups documented",
3228
- " as such are exempt."
3229
- );
3230
- return lines.join("\n");
3231
- }
3232
- function renderWorkflowDiagramsBundleHook(wd, bundleLabel) {
3233
- if (!wd.enabled) {
3234
- return "";
3235
- }
3236
- const verb = wd.requireDiagramUpdate ? "must" : "should";
3237
- return [
3238
- "## Workflow Diagram",
3239
- "",
3240
- `Every ${bundleLabel} change that modifies the phase graph,`,
3241
- "decision branches, or cross-agent handoffs documented by this",
3242
- `bundle ${verb} also update the matching section in`,
3243
- `\`${wd.diagramsPath}\` in the same PR. See the`,
3244
- "`workflow-diagrams-convention` rule for the full authoring",
3245
- "checklist, the path patterns the rule covers, and what counts",
3246
- "as a phase-graph change vs. a cosmetic edit."
3247
- ].join("\n");
3248
- }
3249
- function renderWorkflowDiagramsStarterPage(_wd) {
3250
- return [
3251
- "---",
3252
- "title: Agent Workflows",
3253
- "description: Hand-authored Mermaid diagrams for every agent pipeline and every cross-agent handoff.",
3254
- "---",
3255
- "",
3256
- "# Agent Workflows",
3257
- "",
3258
- "Each diagram shows every input, decision point, output path, and",
3259
- "downstream issue created by the agent. Solid arrows are issue-",
3260
- "creation handoffs; dashed arrows are file-consumption handoffs.",
3261
- "",
3262
- "Update this page in the same PR that changes a bundle's phase",
3263
- "graph \u2014 see the `workflow-diagrams-convention` rule for the full",
3264
- "contract.",
3265
- "",
3266
- "## Master Cross-Agent Diagram",
3267
- "",
3268
- "```mermaid",
3269
- "flowchart TB",
3270
- " %% Replace the placeholder below with the real agent ecosystem.",
3271
- " DISPATCHER[Dispatcher]",
3272
- " AGENT_A[Agent A]",
3273
- " AGENT_B[Agent B]",
3274
- " DISPATCHER --> AGENT_A",
3275
- " DISPATCHER --> AGENT_B",
3276
- " AGENT_A -->|issue-creation| AGENT_B",
3277
- " AGENT_B -.->|file-consumption| AGENT_A",
3278
- "```",
3279
- "",
3280
- "## 1. Example Agent",
3281
- "",
3282
- "```mermaid",
3283
- "flowchart TD",
3284
- " START([Session Start]) --> CLAIM[Claim issue]",
3285
- " CLAIM --> PHASE{Phase label?}",
3286
- " PHASE -->|phase:a| A1[Phase A work]",
3287
- " PHASE -->|phase:b| B1[Phase B work]",
3288
- " A1 --> COMMIT[Commit & PR]",
3289
- " B1 --> COMMIT",
3290
- " COMMIT --> STOP([Stop])",
3291
- " style STOP fill:#e8f5e9,stroke:#2e7d32",
3292
- "```",
3293
- "",
3294
- "## Legend",
3295
- "",
3296
- "| Style | Meaning |",
3297
- "|-------|---------|",
3298
- "| Solid arrow | Issue-creation handoff (agent A creates an issue for agent B) |",
3299
- "| Dashed arrow | File-consumption handoff (agent A reads files produced by agent B) |",
3300
- "| Green end-node | Terminal state (session complete) |"
3301
- ].join("\n");
3302
- }
3303
- function renderWorkflowDiagramsCheckerScript(wd) {
3304
- const patternsLiteral = wd.bundlePathPatterns.map((p) => ` ${JSON.stringify(p)}`).join("\n");
3305
- return [
3306
- "#!/usr/bin/env bash",
3307
- "# check-workflow-diagrams.sh \u2014 Enforce the diagram-touched-when-bundle-touched rule.",
3308
- "#",
3309
- "# Usage:",
3310
- "# .claude/procedures/check-workflow-diagrams.sh <file>...",
3311
- "# git diff --name-only HEAD | .claude/procedures/check-workflow-diagrams.sh",
3312
- "#",
3313
- "# Exits 0 when the workflow-diagrams page was touched alongside any",
3314
- "# bundle file in the change set, or when no bundle files were touched.",
3315
- "# Exits non-zero with a descriptive diagnostic on failure.",
3316
- "#",
3317
- "# The bundle-path patterns and diagrams path are rendered from the",
3318
- "# consumer's WorkflowDiagramsConfig at synth time \u2014 do not edit by",
3319
- "# hand; regenerate via `pnpm exec projen`.",
3320
- "#",
3321
- "# Patterns support the `**` recursive-segment wildcard even though",
3322
- "# bash's native `[[ $file == $glob ]]` pattern matching does not:",
3323
- "# each glob is converted to a POSIX-extended regex internally and",
3324
- "# matched with `=~`, so the script works uniformly on bash 3.2",
3325
- "# (macOS default) and bash 4+ (Linux / CI) without depending on",
3326
- "# `shopt -s globstar` (which only affects pathname expansion, not",
3327
- "# `[[ ]]` pattern matching).",
3328
- "",
3329
- "set -uo pipefail",
3330
- "",
3331
- "err() {",
3332
- ' printf "check-workflow-diagrams.sh: %s\\n" "$*" >&2',
3333
- "}",
3334
- "",
3335
- `diagrams_path=${JSON.stringify(wd.diagramsPath)}`,
3336
- "",
3337
- "# Bundle-path glob patterns. Translated to anchored POSIX-extended",
3338
- "# regexes at runtime by `glob_to_regex` below so `**` matches",
3339
- "# recursively across path segments.",
3340
- "bundle_patterns=(",
3341
- patternsLiteral,
3342
- ")",
3343
- "",
3344
- "# Convert a bash-style glob into an anchored POSIX-extended regex:",
3345
- "# **/ \u2192 (.+/)? (zero or more path segments plus trailing slash)",
3346
- "# ** \u2192 .* (anywhere, including `/`)",
3347
- "# * \u2192 [^/]* (single path segment)",
3348
- "# ? \u2192 [^/] (single non-slash char)",
3349
- "# Every other char is passed through, with regex metacharacters",
3350
- "# backslash-escaped so literal `.` / `+` / `(` etc. match themselves.",
3351
- "glob_to_regex() {",
3352
- ' local glob="$1"',
3353
- ' local regex=""',
3354
- " local i=0",
3355
- " local len=${#glob}",
3356
- " while (( i < len )); do",
3357
- ' local c="${glob:i:1}"',
3358
- ' if [[ "$c" == "*" ]]; then',
3359
- ' local next="${glob:i+1:1}"',
3360
- ' if [[ "$next" == "*" ]]; then',
3361
- " # `**` \u2014 recursive segment wildcard.",
3362
- ' local after="${glob:i+2:1}"',
3363
- ' if [[ "$after" == "/" ]]; then',
3364
- ' regex+="(.+/)?"',
3365
- " i=$(( i + 3 ))",
3366
- " else",
3367
- ' regex+=".*"',
3368
- " i=$(( i + 2 ))",
3369
- " fi",
3370
- " else",
3371
- ' regex+="[^/]*"',
3372
- " i=$(( i + 1 ))",
3373
- " fi",
3374
- ' elif [[ "$c" == "?" ]]; then',
3375
- ' regex+="[^/]"',
3376
- " i=$(( i + 1 ))",
3377
- " else",
3378
- ' case "$c" in',
3379
- " # Regex metacharacters \u2014 escape to match literally.",
3380
- " '.'|'+'|'^'|'$'|'('|')'|'{'|'}'|'|'|'['|']'|'\\\\')",
3381
- ' regex+="\\\\$c"',
3382
- " ;;",
3383
- " *)",
3384
- ' regex+="$c"',
3385
- " ;;",
3386
- " esac",
3387
- " i=$(( i + 1 ))",
3388
- " fi",
3389
- " done",
3390
- ' printf "^%s$" "$regex"',
3391
- "}",
3392
- "",
3393
- "# Collect the input file list: positional args override stdin.",
3394
- "if [[ $# -gt 0 ]]; then",
3395
- ' files=("$@")',
3396
- "else",
3397
- " files=()",
3398
- " while IFS= read -r line; do",
3399
- ' [[ -z "$line" ]] && continue',
3400
- ' files+=("$line")',
3401
- " done",
3402
- "fi",
3403
- "",
3404
- "if [[ ${#files[@]} -eq 0 ]]; then",
3405
- " # No input \u2014 nothing to check.",
3406
- " exit 0",
3407
- "fi",
3408
- "",
3409
- "# Precompile each bundle pattern to a regex once.",
3410
- "bundle_regexes=()",
3411
- 'for pattern in "${bundle_patterns[@]}"; do',
3412
- ' bundle_regexes+=("$(glob_to_regex "$pattern")")',
3413
- "done",
3414
- "",
3415
- "bundle_touched=0",
3416
- "matched_bundle=''",
3417
- "diagrams_touched=0",
3418
- "",
3419
- 'for file in "${files[@]}"; do',
3420
- ' if [[ "$file" == "$diagrams_path" ]]; then',
3421
- " diagrams_touched=1",
3422
- " continue",
3423
- " fi",
3424
- ' for regex in "${bundle_regexes[@]}"; do',
3425
- ' if [[ "$file" =~ $regex ]]; then',
3426
- " bundle_touched=1",
3427
- ' matched_bundle="$file"',
3428
- " break",
3429
- " fi",
3430
- " done",
3431
- "done",
3432
- "",
3433
- 'if [[ "$bundle_touched" -eq 1 && "$diagrams_touched" -eq 0 ]]; then',
3434
- ` err "bundle file '$matched_bundle' was modified but '$diagrams_path' was not"`,
3435
- ' err "update the workflow-diagrams page in the same change set (see workflow-diagrams-convention rule)"',
3436
- " exit 1",
3437
- "fi",
3438
- "",
3439
- "exit 0"
3440
- ].join("\n");
3441
- }
3442
- function assertValidDiagramsPath(value) {
3443
- if (typeof value !== "string" || value.trim().length === 0) {
3444
- throw new Error(
3445
- `WorkflowDiagramsConfig.diagramsPath must be a non-empty string; got ${JSON.stringify(
3446
- value
3447
- )}`
3448
- );
3449
- }
3450
- if (value.startsWith("/")) {
3451
- throw new Error(
3452
- `WorkflowDiagramsConfig.diagramsPath must be a repo-relative path (no leading '/'); got ${JSON.stringify(
3453
- value
3454
- )}`
3455
- );
3456
- }
3457
- }
3458
- function assertValidBundlePathPatterns2(value) {
3459
- if (!Array.isArray(value)) {
3460
- throw new Error(
3461
- `WorkflowDiagramsConfig.bundlePathPatterns must be an array; got ${JSON.stringify(
3462
- value
3463
- )}`
3464
- );
3465
- }
3466
- if (value.length === 0) {
3467
- throw new Error(
3468
- "WorkflowDiagramsConfig.bundlePathPatterns must not be empty \u2014 supply at least one pattern or omit the field to use the defaults"
3469
- );
3470
- }
3471
- for (const entry of value) {
3472
- if (typeof entry !== "string" || entry.trim().length === 0) {
3473
- throw new Error(
3474
- `WorkflowDiagramsConfig.bundlePathPatterns entries must be non-empty strings; got ${JSON.stringify(
3475
- entry
3476
- )}`
3477
- );
3478
- }
3479
- }
3480
- }
3481
-
3482
3035
  // src/agent/bundles/base.ts
3483
3036
  var createPackageSkill = {
3484
3037
  name: "create-package",
@@ -4556,16 +4109,6 @@ function buildBaseBundle(paths = DEFAULT_AGENT_PATHS) {
4556
4109
  },
4557
4110
  tags: ["workflow"]
4558
4111
  },
4559
- {
4560
- name: "workflow-diagrams-convention",
4561
- description: `Workflow-diagrams convention: hand-authored Mermaid page under \`${paths.docsRoot}/agents/workflows.md\` with one diagram per agent plus a master cross-agent diagram, and the diagram-touched-when-bundle-touched rule that keeps the page in sync with every phase-graph or cross-agent-handoff change.`,
4562
- scope: AGENT_RULE_SCOPE.ALWAYS,
4563
- content: renderWorkflowDiagramsRuleContent(resolveWorkflowDiagrams()),
4564
- platforms: {
4565
- cursor: { exclude: true }
4566
- },
4567
- tags: ["workflow"]
4568
- },
4569
4112
  {
4570
4113
  name: "issue-templates-convention",
4571
4114
  description: `Issue-templates convention: a single hand-authored reference page under \`${paths.docsRoot}/agents/issue-templates.md\` that carries one canonical \`gh issue create\` recipe per downstream phase label, and the reference-don't-inline rule that keeps bundle rules and agent prompts citing that page instead of duplicating full template invocations.`,
@@ -5305,12 +4848,12 @@ function buildBcmWriterBundle(paths = DEFAULT_AGENT_PATHS) {
5305
4848
  {
5306
4849
  name: "bcm:context",
5307
4850
  color: "D4C5F9",
5308
- description: "Phase 3: fill Project Relevance, Value Stream Mapping, Enabling Software Systems, Roles Involved, and Company Size Applicability"
4851
+ description: "Phase 3: fill Project Relevance, Value Stream Mapping, Software Systems, Roles, and Company Size"
5309
4852
  },
5310
4853
  {
5311
4854
  name: "bcm:connect",
5312
4855
  color: "FEF2C0",
5313
- description: "Phase 4: cross-link with parent/siblings, update registry and capability-map, open downstream research issues"
4856
+ description: "Phase 4: cross-link parent/siblings, update registry and capability-map, open downstream issues"
5314
4857
  }
5315
4858
  ]
5316
4859
  };
@@ -6305,7 +5848,7 @@ function buildBusinessModelsBundle(paths = DEFAULT_AGENT_PATHS) {
6305
5848
  {
6306
5849
  name: "type:business-model",
6307
5850
  color: "5319E7",
6308
- description: "Work that authors or updates a Business Model Canvas plus BIZBOK value streams for an industry segment"
5851
+ description: "Authors or updates a Business Model Canvas plus BIZBOK value streams for an industry segment"
6309
5852
  },
6310
5853
  {
6311
5854
  name: "business-models:scan",
@@ -8644,22 +8187,22 @@ function buildCustomerProfileBundle(paths = DEFAULT_AGENT_PATHS) {
8644
8187
  {
8645
8188
  name: "type:customer-profile",
8646
8189
  color: "5319E7",
8647
- description: "Work that researches a customer archetype: discovery across a scope, deep profile of one archetype, or feature-to-need competitor analysis for one archetype"
8190
+ description: "Researches a customer archetype: discovery, deep profile, or competitor analysis"
8648
8191
  },
8649
8192
  {
8650
8193
  name: "customer:discover",
8651
8194
  color: "C5DEF5",
8652
- description: "Phase 1: scan existing documentation for customer archetype candidates and write a discovery report; create downstream profile issues"
8195
+ description: "Phase 1: scan docs for archetype candidates, write discovery report, create profile issues"
8653
8196
  },
8654
8197
  {
8655
8198
  name: "customer:profile",
8656
8199
  color: "BFDADC",
8657
- description: "Phase 2: research one archetype in depth and populate the archetype page with segment, goals, jobs-to-be-done, constraints, buying process, and technology landscape"
8200
+ description: "Phase 2: deep-research one archetype: segment, goals, JTBD, constraints, buying process, tech"
8658
8201
  },
8659
8202
  {
8660
8203
  name: "customer:competitors",
8661
8204
  color: "D4C5F9",
8662
- description: "Phase 3: map shared feature-matrix rows to archetype needs, identify unmet needs, and hand off req:scan seeds to the requirements-analyst bundle"
8205
+ description: "Phase 3: map feature-matrix rows to archetype needs and hand off req:scan seeds"
8663
8206
  }
8664
8207
  ]
8665
8208
  };
@@ -9526,22 +9069,22 @@ function buildDocsSyncBundle(paths = DEFAULT_AGENT_PATHS) {
9526
9069
  {
9527
9070
  name: "docs-sync:scan",
9528
9071
  color: "C5DEF5",
9529
- description: "Phase 1: scan code and docs for drift (API diff, TSDoc coverage, reference integrity, link integrity, code-sample compilation)"
9072
+ description: "Phase 1: scan for drift (API diff, TSDoc coverage, references, links, sample compilation)"
9530
9073
  },
9531
9074
  {
9532
9075
  name: "docs-sync:fix",
9533
9076
  color: "BFDADC",
9534
- description: "Phase 2: apply mechanical idempotent fixes (TSDoc stubs, dead-link updates, registry sync, rename-follow) and file docs:write follow-ups for conceptual changes"
9077
+ description: "Phase 2: apply mechanical fixes and file docs:write follow-ups for conceptual changes"
9535
9078
  },
9536
9079
  {
9537
9080
  name: "docs-sync:advisory",
9538
9081
  color: "FBCA04",
9539
- description: "Drift detected by docs-sync but does not block the PR; surfaced as a non-blocking note on the sticky comment"
9082
+ description: "Drift detected by docs-sync but does not block the PR; surfaced as a sticky-comment note"
9540
9083
  },
9541
9084
  {
9542
9085
  name: "docs-sync:blocking",
9543
9086
  color: "B60205",
9544
- description: "Drift detected by docs-sync blocks the PR; applied together with review:human-required so pr-reviewer owns the merge gate"
9087
+ description: "Drift blocks the PR; applied with review:human-required so pr-reviewer owns the merge gate"
9545
9088
  }
9546
9089
  ]
9547
9090
  };
@@ -11136,7 +10679,7 @@ function buildMaintenanceAuditBundle(paths = DEFAULT_AGENT_PATHS) {
11136
10679
  {
11137
10680
  name: "maint:verify",
11138
10681
  color: "D4C5F9",
11139
- description: "Phase 3: re-run the scan checks scoped to the paths the fix phase touched, compare pre/post findings, and close or re-queue the parent scan"
10682
+ description: "Phase 3: re-run scan checks scoped to fix-phase paths, compare findings, close or re-queue scan"
11140
10683
  }
11141
10684
  ]
11142
10685
  };
@@ -15675,7 +15218,7 @@ function buildPeopleProfileBundle(paths = DEFAULT_AGENT_PATHS) {
15675
15218
  {
15676
15219
  name: "people:followup",
15677
15220
  color: "D4C5F9",
15678
- description: "Phase 3: cross-link the profile to existing companies, software, and meeting notes, and enqueue follow-up research issues for unprofiled companies and software products"
15221
+ description: "Phase 3: cross-link profile to companies/software/meetings; enqueue follow-up research issues"
15679
15222
  },
15680
15223
  {
15681
15224
  name: "people:refresh",
@@ -18475,22 +18018,22 @@ function buildRegulatoryResearchBundle(paths = DEFAULT_AGENT_PATHS) {
18475
18018
  {
18476
18019
  name: "type:regulatory-research",
18477
18020
  color: "5319E7",
18478
- description: "Work that researches a regulatory compliance obligation: scan of a jurisdictional landscape, deep-dive on one regulation, or impact analysis against the consuming project"
18021
+ description: "Researches a regulatory obligation: jurisdictional scan, deep-dive, or impact analysis"
18479
18022
  },
18480
18023
  {
18481
18024
  name: "regulatory:scan",
18482
18025
  color: "C5DEF5",
18483
- description: "Phase 1: enumerate regulations applicable to an industry, jurisdiction, or platform scope; write a scan report; create downstream research issues"
18026
+ description: "Phase 1: enumerate regulations for an industry/jurisdiction/scope; create research issues"
18484
18027
  },
18485
18028
  {
18486
18029
  name: "regulatory:research",
18487
18030
  color: "BFDADC",
18488
- description: "Phase 2: research one regulation in depth and populate the regulation page with scope, triggers, requirements, jurisdiction variations, enforcement, and penalties"
18031
+ description: "Phase 2: research one regulation in depth (scope, triggers, requirements, enforcement)"
18489
18032
  },
18490
18033
  {
18491
18034
  name: "regulatory:impact",
18492
18035
  color: "D4C5F9",
18493
- description: "Phase 3: assess product impact against one regulation and hand off actionable obligations as SEC req:scan seeds to the requirements-analyst bundle"
18036
+ description: "Phase 3: assess product impact and hand off SEC req:scan seeds to requirements-analyst"
18494
18037
  }
18495
18038
  ]
18496
18039
  };
@@ -21767,7 +21310,7 @@ function buildRequirementsWriterBundle(paths = DEFAULT_AGENT_PATHS) {
21767
21310
  {
21768
21311
  name: "tier:customer-workflow",
21769
21312
  color: "EDEDED",
21770
- description: "Architectural tier: customer-configured workflow (business logic tenants configure within the platform)"
21313
+ description: "Architectural tier: customer-configured workflow (business logic tenants configure)"
21771
21314
  },
21772
21315
  {
21773
21316
  name: "tier:consumer-app",
@@ -23167,7 +22710,7 @@ function buildRequirementsReviewerBundle(paths = DEFAULT_AGENT_PATHS) {
23167
22710
  {
23168
22711
  name: "req:deprecate",
23169
22712
  color: "D93F0B",
23170
- description: "Phase: transition existing requirement documents to Deprecated or Superseded using the requirements-reviewer skill"
22713
+ description: "Phase: transition requirement docs to Deprecated/Superseded via the requirements-reviewer"
23171
22714
  }
23172
22715
  ]
23173
22716
  };
@@ -24821,7 +24364,7 @@ function buildSoftwareProfileBundle(paths = DEFAULT_AGENT_PATHS) {
24821
24364
  {
24822
24365
  name: "type:software-profile",
24823
24366
  color: "0E8A16",
24824
- description: "Work that produces or maintains a software profile, research notes, feature-matrix rows, or capability mappings"
24367
+ description: "Produces a software profile, research notes, feature-matrix rows, or capability mappings"
24825
24368
  },
24826
24369
  {
24827
24370
  name: "software:research",
@@ -24841,12 +24384,12 @@ function buildSoftwareProfileBundle(paths = DEFAULT_AGENT_PATHS) {
24841
24384
  {
24842
24385
  name: "software:map",
24843
24386
  color: "A2EEEF",
24844
- description: "Phase 4: map each feature back to the BCM capability model, write the mapping onto the profile, and enqueue `bcm:outline` issues for unmapped features above the configured threshold"
24387
+ description: "Phase 4: map features to the BCM model and enqueue bcm:outline issues for unmapped features"
24845
24388
  },
24846
24389
  {
24847
24390
  name: "software:followup",
24848
24391
  color: "FBCA04",
24849
- description: "Phase 5: enqueue follow-up research issues for adjacent products, the vendor company, and primary-attribution people surfaced in the profile"
24392
+ description: "Phase 5: enqueue follow-up research for adjacent products, vendor company, and key people"
24850
24393
  }
24851
24394
  ]
24852
24395
  };
@@ -26173,32 +25716,32 @@ function buildStandardsResearchBundle(paths = DEFAULT_AGENT_PATHS) {
26173
25716
  {
26174
25717
  name: "type:standards-research",
26175
25718
  color: "5319E7",
26176
- description: "Work that researches an interoperability standard: version research, cross-version comparison, extension analysis, or standards-body organization profiling"
25719
+ description: "Researches an interoperability standard: versions, comparison, extension, or org profile"
26177
25720
  },
26178
25721
  {
26179
25722
  name: "standards:scope",
26180
25723
  color: "C5DEF5",
26181
- description: "Phase 1: plan the research campaign for one standard; write the query plan; create downstream research, compare, and organizations issues"
25724
+ description: "Phase 1: plan a standard's research campaign; write query plan; create downstream issues"
26182
25725
  },
26183
25726
  {
26184
25727
  name: "standards:research",
26185
25728
  color: "BFDADC",
26186
- description: "Phase 2: research one version of the standard and populate the version page with status, key changes, resources, adoption, and governance touch-points"
25729
+ description: "Phase 2: research one version (status, key changes, resources, adoption, governance)"
26187
25730
  },
26188
25731
  {
26189
25732
  name: "standards:compare",
26190
25733
  color: "D4C5F9",
26191
- description: "Phase 3: synthesize a cross-version comparison on the standard's overview page \u2014 version timeline, maturity progression, breaking changes, migration paths"
25734
+ description: "Phase 3: synthesize cross-version comparison: timeline, maturity, breaking changes, migration"
26192
25735
  },
26193
25736
  {
26194
25737
  name: "standards:extension",
26195
25738
  color: "FBCA04",
26196
- description: "Phase 4: analyze the extension mechanism needed for one domain entity whose base-spec mapping is Partial or Gap; hand off a Proposed ADR to the requirements pipeline"
25739
+ description: "Phase 4: analyze extension for one Partial/Gap entity; hand off Proposed ADR to requirements"
26197
25740
  },
26198
25741
  {
26199
25742
  name: "standards:organizations",
26200
25743
  color: "0E8A16",
26201
- description: "Phase 5: profile one standards-body organization's role in the standard; hand off canonical company and people profiles to the profile bundles"
25744
+ description: "Phase 5: profile one standards-body organization; hand off company/people profile issues"
26202
25745
  }
26203
25746
  ]
26204
25747
  };
@@ -27956,26 +27499,6 @@ var SKILL_EVALS_BUNDLE_HOOKS = [
27956
27499
  ["requirements-analyst-workflow", "requirements-analyst"],
27957
27500
  ["requirements-writer-workflow", "write-requirement"]
27958
27501
  ];
27959
- var WORKFLOW_DIAGRAMS_BUNDLE_HOOKS = [
27960
- ["bcm-writer-workflow", "bcm-writer"],
27961
- ["business-models-workflow", "business-models"],
27962
- ["company-profile-workflow", "company-profile"],
27963
- ["customer-profile-workflow", "customer-profile"],
27964
- ["industry-discovery-workflow", "industry-discovery"],
27965
- ["maintenance-audit-workflow", "maintenance-audit"],
27966
- ["meeting-agenda-workflow", "agenda"],
27967
- ["meeting-processing-workflow", "meeting-analysis"],
27968
- ["orchestrator-conventions", "orchestrator"],
27969
- ["people-profile-workflow", "people-profile"],
27970
- ["pr-review-workflow", "pr-review"],
27971
- ["regulatory-research-workflow", "regulatory-research"],
27972
- ["requirements-analyst-workflow", "requirements-analyst"],
27973
- ["requirements-reviewer-workflow", "requirements-reviewer"],
27974
- ["requirements-writer-workflow", "requirements-writer"],
27975
- ["research-pipeline-workflow", "research-pipeline"],
27976
- ["software-profile-workflow", "software-profile"],
27977
- ["standards-research-workflow", "standards-research"]
27978
- ];
27979
27502
  var ISSUE_TEMPLATES_BUNDLE_HOOKS = [
27980
27503
  ["bcm-writer-workflow", "bcm-writer"],
27981
27504
  ["business-models-workflow", "business-models"],
@@ -28147,24 +27670,6 @@ var AgentConfig = class _AgentConfig extends import_projen8.Component {
28147
27670
  executable: true
28148
27671
  });
28149
27672
  }
28150
- const resolvedWorkflowDiagrams = validateWorkflowDiagramsConfig(
28151
- this.options.workflowDiagrams
28152
- );
28153
- if (resolvedWorkflowDiagrams.enabled) {
28154
- if (resolvedWorkflowDiagrams.emitChecker) {
28155
- new import_projen8.TextFile(this, ".claude/procedures/check-workflow-diagrams.sh", {
28156
- lines: renderWorkflowDiagramsCheckerScript(
28157
- resolvedWorkflowDiagrams
28158
- ).split("\n"),
28159
- executable: true
28160
- });
28161
- }
28162
- if (resolvedWorkflowDiagrams.emitStarterDiagram) {
28163
- new import_projen8.SampleFile(this.project, resolvedWorkflowDiagrams.diagramsPath, {
28164
- contents: renderWorkflowDiagramsStarterPage(resolvedWorkflowDiagrams)
28165
- });
28166
- }
28167
- }
28168
27673
  const resolvedIssueTemplates = validateIssueTemplatesConfig(
28169
27674
  this.options.issueTemplates
28170
27675
  );
@@ -28477,46 +27982,6 @@ ${hook}`
28477
27982
 
28478
27983
  ---
28479
27984
 
28480
- ${hook}`
28481
- });
28482
- }
28483
- }
28484
- const resolvedWorkflowDiagramsForRules = resolveWorkflowDiagrams(
28485
- this.options.workflowDiagrams
28486
- );
28487
- if (this.options.workflowDiagrams) {
28488
- const workflowDiagramsRule = ruleMap.get("workflow-diagrams-convention");
28489
- if (workflowDiagramsRule) {
28490
- const workflowDiagramsContent = renderWorkflowDiagramsRuleContent(
28491
- resolvedWorkflowDiagramsForRules
28492
- );
28493
- if (workflowDiagramsContent !== workflowDiagramsRule.content) {
28494
- ruleMap.set("workflow-diagrams-convention", {
28495
- ...workflowDiagramsRule,
28496
- content: workflowDiagramsContent
28497
- });
28498
- }
28499
- }
28500
- }
28501
- if (resolvedWorkflowDiagramsForRules.enabled) {
28502
- for (const [ruleName, label] of WORKFLOW_DIAGRAMS_BUNDLE_HOOKS) {
28503
- const existing = ruleMap.get(ruleName);
28504
- if (!existing) {
28505
- continue;
28506
- }
28507
- const hook = renderWorkflowDiagramsBundleHook(
28508
- resolvedWorkflowDiagramsForRules,
28509
- label
28510
- );
28511
- if (hook.length === 0) {
28512
- continue;
28513
- }
28514
- ruleMap.set(ruleName, {
28515
- ...existing,
28516
- content: `${existing.content}
28517
-
28518
- ---
28519
-
28520
27985
  ${hook}`
28521
27986
  });
28522
27987
  }
@@ -30997,6 +30462,7 @@ var DEFAULT_TYPE_LABELS = [
30997
30462
  ];
30998
30463
  var DEFAULT_WORKFLOW_NAME2 = "sync-labels";
30999
30464
  var LABELS_CONFIG_PATH = ".github/labels.yml";
30465
+ var MAX_LABEL_DESCRIPTION_LENGTH = 100;
31000
30466
  function addSyncLabelsWorkflow(project, options) {
31001
30467
  const workflowName = options.workflowName ?? DEFAULT_WORKFLOW_NAME2;
31002
30468
  const deleteOtherLabels = options.deleteOtherLabels ?? true;
@@ -31019,6 +30485,18 @@ function addSyncLabelsWorkflow(project, options) {
31019
30485
  labelMap.set(label.name, label);
31020
30486
  }
31021
30487
  const allLabels = [...labelMap.values()];
30488
+ const overlength = allLabels.filter(
30489
+ (l) => (l.description ?? "").length > MAX_LABEL_DESCRIPTION_LENGTH
30490
+ );
30491
+ if (overlength.length > 0) {
30492
+ const offenders = overlength.map(
30493
+ (l) => ` - ${l.name} (${(l.description ?? "").length} chars): ${l.description}`
30494
+ ).join("\n");
30495
+ throw new Error(
30496
+ `The following label descriptions exceed GitHub's ${MAX_LABEL_DESCRIPTION_LENGTH}-char limit and would break the sync-labels workflow:
30497
+ ${offenders}`
30498
+ );
30499
+ }
31022
30500
  new LabelsFile(project, allLabels);
31023
30501
  const workflow = project.github?.addWorkflow(workflowName);
31024
30502
  if (!workflow) {
@@ -32660,16 +32138,11 @@ var TypeScriptConfig = class extends import_projen23.Component {
32660
32138
  DEFAULT_TYPE_LABELS,
32661
32139
  DEFAULT_UNBLOCK_COMMENT_TEMPLATE,
32662
32140
  DEFAULT_UNBLOCK_DEPENDENTS_ENABLED,
32663
- DEFAULT_WORKFLOW_DIAGRAMS_BUNDLE_PATH_PATTERNS,
32664
- DEFAULT_WORKFLOW_DIAGRAMS_EMIT_CHECKER,
32665
- DEFAULT_WORKFLOW_DIAGRAMS_EMIT_STARTER,
32666
- DEFAULT_WORKFLOW_DIAGRAMS_ENABLED,
32667
- DEFAULT_WORKFLOW_DIAGRAMS_PATH,
32668
- DEFAULT_WORKFLOW_DIAGRAMS_REQUIRE_UPDATE,
32669
32141
  DOCS_SYNC_AUDIT_SCHEMA_VERSION,
32670
32142
  JsiiFaker,
32671
32143
  LAYOUT_ENFORCEMENT,
32672
32144
  LAYOUT_ROOT_BY_PROJECT_TYPE,
32145
+ MAX_LABEL_DESCRIPTION_LENGTH,
32673
32146
  MCP_TRANSPORT,
32674
32147
  MERGE_METHODS,
32675
32148
  MIMIMUM_RELEASE_AGE,
@@ -32796,10 +32269,6 @@ var TypeScriptConfig = class extends import_projen23.Component {
32796
32269
  renderSourceTierExamples,
32797
32270
  renderUnblockDependentsScript,
32798
32271
  renderUnblockDependentsSection,
32799
- renderWorkflowDiagramsBundleHook,
32800
- renderWorkflowDiagramsCheckerScript,
32801
- renderWorkflowDiagramsRuleContent,
32802
- renderWorkflowDiagramsStarterPage,
32803
32272
  requirementsAnalystBundle,
32804
32273
  requirementsReviewerBundle,
32805
32274
  requirementsWriterBundle,
@@ -32822,7 +32291,6 @@ var TypeScriptConfig = class extends import_projen23.Component {
32822
32291
  resolveTemplateVariables,
32823
32292
  resolveTypeScriptProjectOutdir,
32824
32293
  resolveUnblockDependents,
32825
- resolveWorkflowDiagrams,
32826
32294
  runScan,
32827
32295
  slackBundle,
32828
32296
  softwareProfileBundle,
@@ -32841,7 +32309,6 @@ var TypeScriptConfig = class extends import_projen23.Component {
32841
32309
  validateSkillEvalsConfig,
32842
32310
  validateStarlightSingleton,
32843
32311
  validateUnblockDependentsConfig,
32844
- validateWorkflowDiagramsConfig,
32845
32312
  vitestBundle
32846
32313
  });
32847
32314
  //# sourceMappingURL=index.js.map