@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.mjs CHANGED
@@ -936,7 +936,7 @@ var agendaBundle = {
936
936
  {
937
937
  name: "agenda:finalize",
938
938
  color: "BFDADC",
939
- description: "Phase 2: incorporate late-added items, register in the meetings index, cross-link related docs, and lock the agenda"
939
+ description: "Phase 2: register in meetings index, cross-link related docs, and lock the agenda before the meeting"
940
940
  }
941
941
  ]
942
942
  };
@@ -2783,442 +2783,6 @@ function assertValidProductContextPath(value) {
2783
2783
  }
2784
2784
  }
2785
2785
 
2786
- // src/agent/bundles/workflow-diagrams.ts
2787
- var DEFAULT_WORKFLOW_DIAGRAMS_ENABLED = true;
2788
- var DEFAULT_WORKFLOW_DIAGRAMS_PATH = "docs/src/content/docs/agents/workflows.md";
2789
- var DEFAULT_WORKFLOW_DIAGRAMS_BUNDLE_PATH_PATTERNS = [
2790
- "packages/@codedrifters/configulator/src/agent/bundles/**/*.ts",
2791
- ".claude/agents/**/*.md",
2792
- ".claude/skills/**/*.md"
2793
- ];
2794
- var DEFAULT_WORKFLOW_DIAGRAMS_EMIT_STARTER = false;
2795
- var DEFAULT_WORKFLOW_DIAGRAMS_EMIT_CHECKER = false;
2796
- var DEFAULT_WORKFLOW_DIAGRAMS_REQUIRE_UPDATE = true;
2797
- function resolveWorkflowDiagrams(config) {
2798
- const diagramsPath = config?.diagramsPath ?? DEFAULT_WORKFLOW_DIAGRAMS_PATH;
2799
- assertValidDiagramsPath(diagramsPath);
2800
- const bundlePathPatterns = config?.bundlePathPatterns ?? DEFAULT_WORKFLOW_DIAGRAMS_BUNDLE_PATH_PATTERNS;
2801
- assertValidBundlePathPatterns2(bundlePathPatterns);
2802
- return {
2803
- enabled: config?.enabled ?? DEFAULT_WORKFLOW_DIAGRAMS_ENABLED,
2804
- diagramsPath,
2805
- bundlePathPatterns,
2806
- emitStarterDiagram: config?.emitStarterDiagram ?? DEFAULT_WORKFLOW_DIAGRAMS_EMIT_STARTER,
2807
- emitChecker: config?.emitChecker ?? DEFAULT_WORKFLOW_DIAGRAMS_EMIT_CHECKER,
2808
- requireDiagramUpdate: config?.requireDiagramUpdate ?? DEFAULT_WORKFLOW_DIAGRAMS_REQUIRE_UPDATE
2809
- };
2810
- }
2811
- function validateWorkflowDiagramsConfig(config) {
2812
- return resolveWorkflowDiagrams(config);
2813
- }
2814
- function renderWorkflowDiagramsRuleContent(wd) {
2815
- if (!wd.enabled) {
2816
- return [
2817
- "# Workflow Diagrams",
2818
- "",
2819
- "**The workflow-diagrams convention is disabled in this project.**",
2820
- "Agents may change bundle or agent source files without updating",
2821
- "any diagrams page. When diagrams fall behind the prose, humans",
2822
- "must reconcile them manually.",
2823
- "",
2824
- "Enable the convention via",
2825
- "`AgentConfigOptions.workflowDiagrams.enabled = true`."
2826
- ].join("\n");
2827
- }
2828
- const requirementVerb = wd.requireDiagramUpdate ? "MUST" : "SHOULD";
2829
- const lines = [
2830
- "# Workflow Diagrams",
2831
- "",
2832
- "This project maintains a single hand-authored workflow-diagrams",
2833
- "page that visualises every agent's phases, its decision points,",
2834
- "and every cross-agent handoff. Prose scattered across rule files",
2835
- "and agent prompts describes each handoff in isolation; the",
2836
- "diagrams page is the single visual reference that shows the",
2837
- "whole pipeline at once.",
2838
- "",
2839
- "Diagrams are **hand-authored for readability**, not",
2840
- "auto-generated. A machine-generated graph of bundle dependencies",
2841
- "would technically stay in sync, but would not communicate the",
2842
- "intent behind each handoff \u2014 so the convention trades",
2843
- "auto-sync for editorial clarity and enforces sync via the rule",
2844
- "below.",
2845
- "",
2846
- "## Diagrams Page",
2847
- "",
2848
- `The workflow-diagrams page lives at \`${wd.diagramsPath}\`. It`,
2849
- "follows a stable structure so the sync rule can mechanically",
2850
- "identify which section matches which bundle:",
2851
- "",
2852
- "1. **Master cross-agent diagram** \u2014 one top-level Mermaid",
2853
- " flowchart showing every agent as a node and every",
2854
- " cross-agent issue-creation or file-consumption handoff as an",
2855
- " edge.",
2856
- "2. **One section per agent / bundle** \u2014 a `## N. <agent-name>`",
2857
- " heading followed by a single Mermaid `flowchart TD` diagram",
2858
- " that depicts the agent's phase graph (nodes = phases /",
2859
- " decisions, edges = transitions, styled end-nodes = commit /",
2860
- " PR / done terminals).",
2861
- "3. **Legend** \u2014 a short table mapping colours and arrow styles",
2862
- " to their meanings (dispatcher vs agent vs skill; solid vs",
2863
- " dashed arrows for issue-creation vs file-consumption).",
2864
- "",
2865
- "Each agent section is independent. Changing one agent's phase",
2866
- "graph touches only that section; cross-agent handoff changes",
2867
- "touch the master diagram plus any affected agent sections.",
2868
- "",
2869
- "## Diagram-Touched-When-Bundle-Touched Rule",
2870
- "",
2871
- `Every change that modifies a bundle's phase graph ${requirementVerb}`,
2872
- `also update \`${wd.diagramsPath}\` in the same change set. The`,
2873
- "rule applies when **any** staged file in a commit or PR matches",
2874
- "one of the bundle-path patterns below:",
2875
- "",
2876
- ...wd.bundlePathPatterns.map((p) => `- \`${p}\``),
2877
- "",
2878
- "Mechanically: when a change set includes a file matching one of",
2879
- `the patterns above, it ${requirementVerb} also include a`,
2880
- `modification to \`${wd.diagramsPath}\`.`,
2881
- "",
2882
- "### What counts as a phase-graph change",
2883
- "",
2884
- "The rule targets edits that change **what the agent does**, not",
2885
- "stylistic tweaks. Concretely:",
2886
- "",
2887
- "- Adding, removing, or renaming a phase label.",
2888
- "- Changing a phase's inputs, outputs, or decision branches.",
2889
- "- Adding or removing a cross-agent handoff (an issue-creation",
2890
- " or file-consumption edge between two bundles).",
2891
- "- Changing the sort order or priority logic that drives",
2892
- " dispatcher routing between tiers.",
2893
- "",
2894
- "Edits that do **not** require a diagram update:",
2895
- "",
2896
- "- Typo fixes, comment tweaks, wording polish in rule prose.",
2897
- "- Refactors that preserve the exact phase / handoff graph",
2898
- " (extracting a helper, renaming an internal variable,",
2899
- " reordering imports).",
2900
- "- Updates to supporting metadata (permissions lists, default",
2901
- " paths) that do not change the visible phase flow.",
2902
- "",
2903
- "When a change is borderline \u2014 the phase graph is unchanged but",
2904
- "the diagram's caption or annotation would be more accurate \u2014",
2905
- "err on the side of updating the diagram. The convention favours",
2906
- "over-updating over silent drift.",
2907
- "",
2908
- "## Authoring Checklist",
2909
- "",
2910
- "Authors and reviewers walk the following checklist before",
2911
- "merging any PR that touches a bundle path:",
2912
- "",
2913
- `1. **Did the phase graph change?** If yes, update \`${wd.diagramsPath}\``,
2914
- " in the same PR \u2014 both the affected agent section and, if the",
2915
- " change added or removed a cross-agent handoff, the master",
2916
- " diagram.",
2917
- "2. **Did the diagram render?** Preview the Mermaid block locally",
2918
- " (or via the docs site's dev server) and confirm it renders",
2919
- " without syntax errors.",
2920
- `3. **Is the section heading stable?** Each agent section uses a`,
2921
- " `## N. <agent-name>` heading where `<agent-name>` matches the",
2922
- " bundle name / agent prompt filename. Keep the headings stable",
2923
- " \u2014 downstream tooling may match on them.",
2924
- "4. **Does the legend still apply?** If a new arrow style or node",
2925
- " colour was introduced, document it in the legend.",
2926
- ""
2927
- ];
2928
- if (wd.emitChecker) {
2929
- lines.push(
2930
- "## Automated Check",
2931
- "",
2932
- `The bundled \`.claude/procedures/check-workflow-diagrams.sh\``,
2933
- "helper enforces the rule mechanically. Given a set of changed",
2934
- "files (as a newline-separated list on stdin, or positional",
2935
- `arguments), it fails non-zero when any file matches a`,
2936
- `bundle-path pattern and \`${wd.diagramsPath}\` is not also in`,
2937
- "the list. Wire it into a pre-commit hook or CI job as needed:",
2938
- "",
2939
- "```bash",
2940
- "# Pre-commit (staged files):",
2941
- "git diff --cached --name-only \\",
2942
- " | .claude/procedures/check-workflow-diagrams.sh",
2943
- "",
2944
- "# CI (branch-vs-base):",
2945
- "git diff --name-only origin/main...HEAD \\",
2946
- " | .claude/procedures/check-workflow-diagrams.sh",
2947
- "```",
2948
- "",
2949
- "The helper exits with a descriptive diagnostic on failure, so",
2950
- "it plugs directly into any hook framework without further",
2951
- "glue. It exits `0` when no bundle files were touched or when",
2952
- "the diagrams file is also present in the change set.",
2953
- ""
2954
- );
2955
- }
2956
- lines.push(
2957
- "## Out of Scope",
2958
- "",
2959
- "The convention intentionally does not:",
2960
- "",
2961
- "- Auto-generate the diagrams \u2014 readability is the point.",
2962
- "- Enforce a specific Mermaid sub-grammar beyond `flowchart TD`",
2963
- " for per-agent sections. Sequence diagrams, state diagrams, or",
2964
- " class diagrams are fine for bespoke sections as long as they",
2965
- " render.",
2966
- "- Gate every unrelated cleanup PR on a diagram touch. The rule",
2967
- " targets phase-graph-affecting edits; pure cleanups documented",
2968
- " as such are exempt."
2969
- );
2970
- return lines.join("\n");
2971
- }
2972
- function renderWorkflowDiagramsBundleHook(wd, bundleLabel) {
2973
- if (!wd.enabled) {
2974
- return "";
2975
- }
2976
- const verb = wd.requireDiagramUpdate ? "must" : "should";
2977
- return [
2978
- "## Workflow Diagram",
2979
- "",
2980
- `Every ${bundleLabel} change that modifies the phase graph,`,
2981
- "decision branches, or cross-agent handoffs documented by this",
2982
- `bundle ${verb} also update the matching section in`,
2983
- `\`${wd.diagramsPath}\` in the same PR. See the`,
2984
- "`workflow-diagrams-convention` rule for the full authoring",
2985
- "checklist, the path patterns the rule covers, and what counts",
2986
- "as a phase-graph change vs. a cosmetic edit."
2987
- ].join("\n");
2988
- }
2989
- function renderWorkflowDiagramsStarterPage(_wd) {
2990
- return [
2991
- "---",
2992
- "title: Agent Workflows",
2993
- "description: Hand-authored Mermaid diagrams for every agent pipeline and every cross-agent handoff.",
2994
- "---",
2995
- "",
2996
- "# Agent Workflows",
2997
- "",
2998
- "Each diagram shows every input, decision point, output path, and",
2999
- "downstream issue created by the agent. Solid arrows are issue-",
3000
- "creation handoffs; dashed arrows are file-consumption handoffs.",
3001
- "",
3002
- "Update this page in the same PR that changes a bundle's phase",
3003
- "graph \u2014 see the `workflow-diagrams-convention` rule for the full",
3004
- "contract.",
3005
- "",
3006
- "## Master Cross-Agent Diagram",
3007
- "",
3008
- "```mermaid",
3009
- "flowchart TB",
3010
- " %% Replace the placeholder below with the real agent ecosystem.",
3011
- " DISPATCHER[Dispatcher]",
3012
- " AGENT_A[Agent A]",
3013
- " AGENT_B[Agent B]",
3014
- " DISPATCHER --> AGENT_A",
3015
- " DISPATCHER --> AGENT_B",
3016
- " AGENT_A -->|issue-creation| AGENT_B",
3017
- " AGENT_B -.->|file-consumption| AGENT_A",
3018
- "```",
3019
- "",
3020
- "## 1. Example Agent",
3021
- "",
3022
- "```mermaid",
3023
- "flowchart TD",
3024
- " START([Session Start]) --> CLAIM[Claim issue]",
3025
- " CLAIM --> PHASE{Phase label?}",
3026
- " PHASE -->|phase:a| A1[Phase A work]",
3027
- " PHASE -->|phase:b| B1[Phase B work]",
3028
- " A1 --> COMMIT[Commit & PR]",
3029
- " B1 --> COMMIT",
3030
- " COMMIT --> STOP([Stop])",
3031
- " style STOP fill:#e8f5e9,stroke:#2e7d32",
3032
- "```",
3033
- "",
3034
- "## Legend",
3035
- "",
3036
- "| Style | Meaning |",
3037
- "|-------|---------|",
3038
- "| Solid arrow | Issue-creation handoff (agent A creates an issue for agent B) |",
3039
- "| Dashed arrow | File-consumption handoff (agent A reads files produced by agent B) |",
3040
- "| Green end-node | Terminal state (session complete) |"
3041
- ].join("\n");
3042
- }
3043
- function renderWorkflowDiagramsCheckerScript(wd) {
3044
- const patternsLiteral = wd.bundlePathPatterns.map((p) => ` ${JSON.stringify(p)}`).join("\n");
3045
- return [
3046
- "#!/usr/bin/env bash",
3047
- "# check-workflow-diagrams.sh \u2014 Enforce the diagram-touched-when-bundle-touched rule.",
3048
- "#",
3049
- "# Usage:",
3050
- "# .claude/procedures/check-workflow-diagrams.sh <file>...",
3051
- "# git diff --name-only HEAD | .claude/procedures/check-workflow-diagrams.sh",
3052
- "#",
3053
- "# Exits 0 when the workflow-diagrams page was touched alongside any",
3054
- "# bundle file in the change set, or when no bundle files were touched.",
3055
- "# Exits non-zero with a descriptive diagnostic on failure.",
3056
- "#",
3057
- "# The bundle-path patterns and diagrams path are rendered from the",
3058
- "# consumer's WorkflowDiagramsConfig at synth time \u2014 do not edit by",
3059
- "# hand; regenerate via `pnpm exec projen`.",
3060
- "#",
3061
- "# Patterns support the `**` recursive-segment wildcard even though",
3062
- "# bash's native `[[ $file == $glob ]]` pattern matching does not:",
3063
- "# each glob is converted to a POSIX-extended regex internally and",
3064
- "# matched with `=~`, so the script works uniformly on bash 3.2",
3065
- "# (macOS default) and bash 4+ (Linux / CI) without depending on",
3066
- "# `shopt -s globstar` (which only affects pathname expansion, not",
3067
- "# `[[ ]]` pattern matching).",
3068
- "",
3069
- "set -uo pipefail",
3070
- "",
3071
- "err() {",
3072
- ' printf "check-workflow-diagrams.sh: %s\\n" "$*" >&2',
3073
- "}",
3074
- "",
3075
- `diagrams_path=${JSON.stringify(wd.diagramsPath)}`,
3076
- "",
3077
- "# Bundle-path glob patterns. Translated to anchored POSIX-extended",
3078
- "# regexes at runtime by `glob_to_regex` below so `**` matches",
3079
- "# recursively across path segments.",
3080
- "bundle_patterns=(",
3081
- patternsLiteral,
3082
- ")",
3083
- "",
3084
- "# Convert a bash-style glob into an anchored POSIX-extended regex:",
3085
- "# **/ \u2192 (.+/)? (zero or more path segments plus trailing slash)",
3086
- "# ** \u2192 .* (anywhere, including `/`)",
3087
- "# * \u2192 [^/]* (single path segment)",
3088
- "# ? \u2192 [^/] (single non-slash char)",
3089
- "# Every other char is passed through, with regex metacharacters",
3090
- "# backslash-escaped so literal `.` / `+` / `(` etc. match themselves.",
3091
- "glob_to_regex() {",
3092
- ' local glob="$1"',
3093
- ' local regex=""',
3094
- " local i=0",
3095
- " local len=${#glob}",
3096
- " while (( i < len )); do",
3097
- ' local c="${glob:i:1}"',
3098
- ' if [[ "$c" == "*" ]]; then',
3099
- ' local next="${glob:i+1:1}"',
3100
- ' if [[ "$next" == "*" ]]; then',
3101
- " # `**` \u2014 recursive segment wildcard.",
3102
- ' local after="${glob:i+2:1}"',
3103
- ' if [[ "$after" == "/" ]]; then',
3104
- ' regex+="(.+/)?"',
3105
- " i=$(( i + 3 ))",
3106
- " else",
3107
- ' regex+=".*"',
3108
- " i=$(( i + 2 ))",
3109
- " fi",
3110
- " else",
3111
- ' regex+="[^/]*"',
3112
- " i=$(( i + 1 ))",
3113
- " fi",
3114
- ' elif [[ "$c" == "?" ]]; then',
3115
- ' regex+="[^/]"',
3116
- " i=$(( i + 1 ))",
3117
- " else",
3118
- ' case "$c" in',
3119
- " # Regex metacharacters \u2014 escape to match literally.",
3120
- " '.'|'+'|'^'|'$'|'('|')'|'{'|'}'|'|'|'['|']'|'\\\\')",
3121
- ' regex+="\\\\$c"',
3122
- " ;;",
3123
- " *)",
3124
- ' regex+="$c"',
3125
- " ;;",
3126
- " esac",
3127
- " i=$(( i + 1 ))",
3128
- " fi",
3129
- " done",
3130
- ' printf "^%s$" "$regex"',
3131
- "}",
3132
- "",
3133
- "# Collect the input file list: positional args override stdin.",
3134
- "if [[ $# -gt 0 ]]; then",
3135
- ' files=("$@")',
3136
- "else",
3137
- " files=()",
3138
- " while IFS= read -r line; do",
3139
- ' [[ -z "$line" ]] && continue',
3140
- ' files+=("$line")',
3141
- " done",
3142
- "fi",
3143
- "",
3144
- "if [[ ${#files[@]} -eq 0 ]]; then",
3145
- " # No input \u2014 nothing to check.",
3146
- " exit 0",
3147
- "fi",
3148
- "",
3149
- "# Precompile each bundle pattern to a regex once.",
3150
- "bundle_regexes=()",
3151
- 'for pattern in "${bundle_patterns[@]}"; do',
3152
- ' bundle_regexes+=("$(glob_to_regex "$pattern")")',
3153
- "done",
3154
- "",
3155
- "bundle_touched=0",
3156
- "matched_bundle=''",
3157
- "diagrams_touched=0",
3158
- "",
3159
- 'for file in "${files[@]}"; do',
3160
- ' if [[ "$file" == "$diagrams_path" ]]; then',
3161
- " diagrams_touched=1",
3162
- " continue",
3163
- " fi",
3164
- ' for regex in "${bundle_regexes[@]}"; do',
3165
- ' if [[ "$file" =~ $regex ]]; then',
3166
- " bundle_touched=1",
3167
- ' matched_bundle="$file"',
3168
- " break",
3169
- " fi",
3170
- " done",
3171
- "done",
3172
- "",
3173
- 'if [[ "$bundle_touched" -eq 1 && "$diagrams_touched" -eq 0 ]]; then',
3174
- ` err "bundle file '$matched_bundle' was modified but '$diagrams_path' was not"`,
3175
- ' err "update the workflow-diagrams page in the same change set (see workflow-diagrams-convention rule)"',
3176
- " exit 1",
3177
- "fi",
3178
- "",
3179
- "exit 0"
3180
- ].join("\n");
3181
- }
3182
- function assertValidDiagramsPath(value) {
3183
- if (typeof value !== "string" || value.trim().length === 0) {
3184
- throw new Error(
3185
- `WorkflowDiagramsConfig.diagramsPath must be a non-empty string; got ${JSON.stringify(
3186
- value
3187
- )}`
3188
- );
3189
- }
3190
- if (value.startsWith("/")) {
3191
- throw new Error(
3192
- `WorkflowDiagramsConfig.diagramsPath must be a repo-relative path (no leading '/'); got ${JSON.stringify(
3193
- value
3194
- )}`
3195
- );
3196
- }
3197
- }
3198
- function assertValidBundlePathPatterns2(value) {
3199
- if (!Array.isArray(value)) {
3200
- throw new Error(
3201
- `WorkflowDiagramsConfig.bundlePathPatterns must be an array; got ${JSON.stringify(
3202
- value
3203
- )}`
3204
- );
3205
- }
3206
- if (value.length === 0) {
3207
- throw new Error(
3208
- "WorkflowDiagramsConfig.bundlePathPatterns must not be empty \u2014 supply at least one pattern or omit the field to use the defaults"
3209
- );
3210
- }
3211
- for (const entry of value) {
3212
- if (typeof entry !== "string" || entry.trim().length === 0) {
3213
- throw new Error(
3214
- `WorkflowDiagramsConfig.bundlePathPatterns entries must be non-empty strings; got ${JSON.stringify(
3215
- entry
3216
- )}`
3217
- );
3218
- }
3219
- }
3220
- }
3221
-
3222
2786
  // src/agent/bundles/base.ts
3223
2787
  var createPackageSkill = {
3224
2788
  name: "create-package",
@@ -4296,16 +3860,6 @@ function buildBaseBundle(paths = DEFAULT_AGENT_PATHS) {
4296
3860
  },
4297
3861
  tags: ["workflow"]
4298
3862
  },
4299
- {
4300
- name: "workflow-diagrams-convention",
4301
- 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.`,
4302
- scope: AGENT_RULE_SCOPE.ALWAYS,
4303
- content: renderWorkflowDiagramsRuleContent(resolveWorkflowDiagrams()),
4304
- platforms: {
4305
- cursor: { exclude: true }
4306
- },
4307
- tags: ["workflow"]
4308
- },
4309
3863
  {
4310
3864
  name: "issue-templates-convention",
4311
3865
  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.`,
@@ -5045,12 +4599,12 @@ function buildBcmWriterBundle(paths = DEFAULT_AGENT_PATHS) {
5045
4599
  {
5046
4600
  name: "bcm:context",
5047
4601
  color: "D4C5F9",
5048
- description: "Phase 3: fill Project Relevance, Value Stream Mapping, Enabling Software Systems, Roles Involved, and Company Size Applicability"
4602
+ description: "Phase 3: fill Project Relevance, Value Stream Mapping, Software Systems, Roles, and Company Size"
5049
4603
  },
5050
4604
  {
5051
4605
  name: "bcm:connect",
5052
4606
  color: "FEF2C0",
5053
- description: "Phase 4: cross-link with parent/siblings, update registry and capability-map, open downstream research issues"
4607
+ description: "Phase 4: cross-link parent/siblings, update registry and capability-map, open downstream issues"
5054
4608
  }
5055
4609
  ]
5056
4610
  };
@@ -6045,7 +5599,7 @@ function buildBusinessModelsBundle(paths = DEFAULT_AGENT_PATHS) {
6045
5599
  {
6046
5600
  name: "type:business-model",
6047
5601
  color: "5319E7",
6048
- description: "Work that authors or updates a Business Model Canvas plus BIZBOK value streams for an industry segment"
5602
+ description: "Authors or updates a Business Model Canvas plus BIZBOK value streams for an industry segment"
6049
5603
  },
6050
5604
  {
6051
5605
  name: "business-models:scan",
@@ -8384,22 +7938,22 @@ function buildCustomerProfileBundle(paths = DEFAULT_AGENT_PATHS) {
8384
7938
  {
8385
7939
  name: "type:customer-profile",
8386
7940
  color: "5319E7",
8387
- 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"
7941
+ description: "Researches a customer archetype: discovery, deep profile, or competitor analysis"
8388
7942
  },
8389
7943
  {
8390
7944
  name: "customer:discover",
8391
7945
  color: "C5DEF5",
8392
- description: "Phase 1: scan existing documentation for customer archetype candidates and write a discovery report; create downstream profile issues"
7946
+ description: "Phase 1: scan docs for archetype candidates, write discovery report, create profile issues"
8393
7947
  },
8394
7948
  {
8395
7949
  name: "customer:profile",
8396
7950
  color: "BFDADC",
8397
- 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"
7951
+ description: "Phase 2: deep-research one archetype: segment, goals, JTBD, constraints, buying process, tech"
8398
7952
  },
8399
7953
  {
8400
7954
  name: "customer:competitors",
8401
7955
  color: "D4C5F9",
8402
- 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"
7956
+ description: "Phase 3: map feature-matrix rows to archetype needs and hand off req:scan seeds"
8403
7957
  }
8404
7958
  ]
8405
7959
  };
@@ -9266,22 +8820,22 @@ function buildDocsSyncBundle(paths = DEFAULT_AGENT_PATHS) {
9266
8820
  {
9267
8821
  name: "docs-sync:scan",
9268
8822
  color: "C5DEF5",
9269
- description: "Phase 1: scan code and docs for drift (API diff, TSDoc coverage, reference integrity, link integrity, code-sample compilation)"
8823
+ description: "Phase 1: scan for drift (API diff, TSDoc coverage, references, links, sample compilation)"
9270
8824
  },
9271
8825
  {
9272
8826
  name: "docs-sync:fix",
9273
8827
  color: "BFDADC",
9274
- 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"
8828
+ description: "Phase 2: apply mechanical fixes and file docs:write follow-ups for conceptual changes"
9275
8829
  },
9276
8830
  {
9277
8831
  name: "docs-sync:advisory",
9278
8832
  color: "FBCA04",
9279
- description: "Drift detected by docs-sync but does not block the PR; surfaced as a non-blocking note on the sticky comment"
8833
+ description: "Drift detected by docs-sync but does not block the PR; surfaced as a sticky-comment note"
9280
8834
  },
9281
8835
  {
9282
8836
  name: "docs-sync:blocking",
9283
8837
  color: "B60205",
9284
- description: "Drift detected by docs-sync blocks the PR; applied together with review:human-required so pr-reviewer owns the merge gate"
8838
+ description: "Drift blocks the PR; applied with review:human-required so pr-reviewer owns the merge gate"
9285
8839
  }
9286
8840
  ]
9287
8841
  };
@@ -10876,7 +10430,7 @@ function buildMaintenanceAuditBundle(paths = DEFAULT_AGENT_PATHS) {
10876
10430
  {
10877
10431
  name: "maint:verify",
10878
10432
  color: "D4C5F9",
10879
- 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"
10433
+ description: "Phase 3: re-run scan checks scoped to fix-phase paths, compare findings, close or re-queue scan"
10880
10434
  }
10881
10435
  ]
10882
10436
  };
@@ -15415,7 +14969,7 @@ function buildPeopleProfileBundle(paths = DEFAULT_AGENT_PATHS) {
15415
14969
  {
15416
14970
  name: "people:followup",
15417
14971
  color: "D4C5F9",
15418
- 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"
14972
+ description: "Phase 3: cross-link profile to companies/software/meetings; enqueue follow-up research issues"
15419
14973
  },
15420
14974
  {
15421
14975
  name: "people:refresh",
@@ -18215,22 +17769,22 @@ function buildRegulatoryResearchBundle(paths = DEFAULT_AGENT_PATHS) {
18215
17769
  {
18216
17770
  name: "type:regulatory-research",
18217
17771
  color: "5319E7",
18218
- 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"
17772
+ description: "Researches a regulatory obligation: jurisdictional scan, deep-dive, or impact analysis"
18219
17773
  },
18220
17774
  {
18221
17775
  name: "regulatory:scan",
18222
17776
  color: "C5DEF5",
18223
- description: "Phase 1: enumerate regulations applicable to an industry, jurisdiction, or platform scope; write a scan report; create downstream research issues"
17777
+ description: "Phase 1: enumerate regulations for an industry/jurisdiction/scope; create research issues"
18224
17778
  },
18225
17779
  {
18226
17780
  name: "regulatory:research",
18227
17781
  color: "BFDADC",
18228
- description: "Phase 2: research one regulation in depth and populate the regulation page with scope, triggers, requirements, jurisdiction variations, enforcement, and penalties"
17782
+ description: "Phase 2: research one regulation in depth (scope, triggers, requirements, enforcement)"
18229
17783
  },
18230
17784
  {
18231
17785
  name: "regulatory:impact",
18232
17786
  color: "D4C5F9",
18233
- description: "Phase 3: assess product impact against one regulation and hand off actionable obligations as SEC req:scan seeds to the requirements-analyst bundle"
17787
+ description: "Phase 3: assess product impact and hand off SEC req:scan seeds to requirements-analyst"
18234
17788
  }
18235
17789
  ]
18236
17790
  };
@@ -21507,7 +21061,7 @@ function buildRequirementsWriterBundle(paths = DEFAULT_AGENT_PATHS) {
21507
21061
  {
21508
21062
  name: "tier:customer-workflow",
21509
21063
  color: "EDEDED",
21510
- description: "Architectural tier: customer-configured workflow (business logic tenants configure within the platform)"
21064
+ description: "Architectural tier: customer-configured workflow (business logic tenants configure)"
21511
21065
  },
21512
21066
  {
21513
21067
  name: "tier:consumer-app",
@@ -22907,7 +22461,7 @@ function buildRequirementsReviewerBundle(paths = DEFAULT_AGENT_PATHS) {
22907
22461
  {
22908
22462
  name: "req:deprecate",
22909
22463
  color: "D93F0B",
22910
- description: "Phase: transition existing requirement documents to Deprecated or Superseded using the requirements-reviewer skill"
22464
+ description: "Phase: transition requirement docs to Deprecated/Superseded via the requirements-reviewer"
22911
22465
  }
22912
22466
  ]
22913
22467
  };
@@ -24561,7 +24115,7 @@ function buildSoftwareProfileBundle(paths = DEFAULT_AGENT_PATHS) {
24561
24115
  {
24562
24116
  name: "type:software-profile",
24563
24117
  color: "0E8A16",
24564
- description: "Work that produces or maintains a software profile, research notes, feature-matrix rows, or capability mappings"
24118
+ description: "Produces a software profile, research notes, feature-matrix rows, or capability mappings"
24565
24119
  },
24566
24120
  {
24567
24121
  name: "software:research",
@@ -24581,12 +24135,12 @@ function buildSoftwareProfileBundle(paths = DEFAULT_AGENT_PATHS) {
24581
24135
  {
24582
24136
  name: "software:map",
24583
24137
  color: "A2EEEF",
24584
- 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"
24138
+ description: "Phase 4: map features to the BCM model and enqueue bcm:outline issues for unmapped features"
24585
24139
  },
24586
24140
  {
24587
24141
  name: "software:followup",
24588
24142
  color: "FBCA04",
24589
- description: "Phase 5: enqueue follow-up research issues for adjacent products, the vendor company, and primary-attribution people surfaced in the profile"
24143
+ description: "Phase 5: enqueue follow-up research for adjacent products, vendor company, and key people"
24590
24144
  }
24591
24145
  ]
24592
24146
  };
@@ -25913,32 +25467,32 @@ function buildStandardsResearchBundle(paths = DEFAULT_AGENT_PATHS) {
25913
25467
  {
25914
25468
  name: "type:standards-research",
25915
25469
  color: "5319E7",
25916
- description: "Work that researches an interoperability standard: version research, cross-version comparison, extension analysis, or standards-body organization profiling"
25470
+ description: "Researches an interoperability standard: versions, comparison, extension, or org profile"
25917
25471
  },
25918
25472
  {
25919
25473
  name: "standards:scope",
25920
25474
  color: "C5DEF5",
25921
- description: "Phase 1: plan the research campaign for one standard; write the query plan; create downstream research, compare, and organizations issues"
25475
+ description: "Phase 1: plan a standard's research campaign; write query plan; create downstream issues"
25922
25476
  },
25923
25477
  {
25924
25478
  name: "standards:research",
25925
25479
  color: "BFDADC",
25926
- description: "Phase 2: research one version of the standard and populate the version page with status, key changes, resources, adoption, and governance touch-points"
25480
+ description: "Phase 2: research one version (status, key changes, resources, adoption, governance)"
25927
25481
  },
25928
25482
  {
25929
25483
  name: "standards:compare",
25930
25484
  color: "D4C5F9",
25931
- description: "Phase 3: synthesize a cross-version comparison on the standard's overview page \u2014 version timeline, maturity progression, breaking changes, migration paths"
25485
+ description: "Phase 3: synthesize cross-version comparison: timeline, maturity, breaking changes, migration"
25932
25486
  },
25933
25487
  {
25934
25488
  name: "standards:extension",
25935
25489
  color: "FBCA04",
25936
- 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"
25490
+ description: "Phase 4: analyze extension for one Partial/Gap entity; hand off Proposed ADR to requirements"
25937
25491
  },
25938
25492
  {
25939
25493
  name: "standards:organizations",
25940
25494
  color: "0E8A16",
25941
- description: "Phase 5: profile one standards-body organization's role in the standard; hand off canonical company and people profiles to the profile bundles"
25495
+ description: "Phase 5: profile one standards-body organization; hand off company/people profile issues"
25942
25496
  }
25943
25497
  ]
25944
25498
  };
@@ -27696,26 +27250,6 @@ var SKILL_EVALS_BUNDLE_HOOKS = [
27696
27250
  ["requirements-analyst-workflow", "requirements-analyst"],
27697
27251
  ["requirements-writer-workflow", "write-requirement"]
27698
27252
  ];
27699
- var WORKFLOW_DIAGRAMS_BUNDLE_HOOKS = [
27700
- ["bcm-writer-workflow", "bcm-writer"],
27701
- ["business-models-workflow", "business-models"],
27702
- ["company-profile-workflow", "company-profile"],
27703
- ["customer-profile-workflow", "customer-profile"],
27704
- ["industry-discovery-workflow", "industry-discovery"],
27705
- ["maintenance-audit-workflow", "maintenance-audit"],
27706
- ["meeting-agenda-workflow", "agenda"],
27707
- ["meeting-processing-workflow", "meeting-analysis"],
27708
- ["orchestrator-conventions", "orchestrator"],
27709
- ["people-profile-workflow", "people-profile"],
27710
- ["pr-review-workflow", "pr-review"],
27711
- ["regulatory-research-workflow", "regulatory-research"],
27712
- ["requirements-analyst-workflow", "requirements-analyst"],
27713
- ["requirements-reviewer-workflow", "requirements-reviewer"],
27714
- ["requirements-writer-workflow", "requirements-writer"],
27715
- ["research-pipeline-workflow", "research-pipeline"],
27716
- ["software-profile-workflow", "software-profile"],
27717
- ["standards-research-workflow", "standards-research"]
27718
- ];
27719
27253
  var ISSUE_TEMPLATES_BUNDLE_HOOKS = [
27720
27254
  ["bcm-writer-workflow", "bcm-writer"],
27721
27255
  ["business-models-workflow", "business-models"],
@@ -27887,24 +27421,6 @@ var AgentConfig = class _AgentConfig extends Component8 {
27887
27421
  executable: true
27888
27422
  });
27889
27423
  }
27890
- const resolvedWorkflowDiagrams = validateWorkflowDiagramsConfig(
27891
- this.options.workflowDiagrams
27892
- );
27893
- if (resolvedWorkflowDiagrams.enabled) {
27894
- if (resolvedWorkflowDiagrams.emitChecker) {
27895
- new TextFile4(this, ".claude/procedures/check-workflow-diagrams.sh", {
27896
- lines: renderWorkflowDiagramsCheckerScript(
27897
- resolvedWorkflowDiagrams
27898
- ).split("\n"),
27899
- executable: true
27900
- });
27901
- }
27902
- if (resolvedWorkflowDiagrams.emitStarterDiagram) {
27903
- new SampleFile(this.project, resolvedWorkflowDiagrams.diagramsPath, {
27904
- contents: renderWorkflowDiagramsStarterPage(resolvedWorkflowDiagrams)
27905
- });
27906
- }
27907
- }
27908
27424
  const resolvedIssueTemplates = validateIssueTemplatesConfig(
27909
27425
  this.options.issueTemplates
27910
27426
  );
@@ -28217,46 +27733,6 @@ ${hook}`
28217
27733
 
28218
27734
  ---
28219
27735
 
28220
- ${hook}`
28221
- });
28222
- }
28223
- }
28224
- const resolvedWorkflowDiagramsForRules = resolveWorkflowDiagrams(
28225
- this.options.workflowDiagrams
28226
- );
28227
- if (this.options.workflowDiagrams) {
28228
- const workflowDiagramsRule = ruleMap.get("workflow-diagrams-convention");
28229
- if (workflowDiagramsRule) {
28230
- const workflowDiagramsContent = renderWorkflowDiagramsRuleContent(
28231
- resolvedWorkflowDiagramsForRules
28232
- );
28233
- if (workflowDiagramsContent !== workflowDiagramsRule.content) {
28234
- ruleMap.set("workflow-diagrams-convention", {
28235
- ...workflowDiagramsRule,
28236
- content: workflowDiagramsContent
28237
- });
28238
- }
28239
- }
28240
- }
28241
- if (resolvedWorkflowDiagramsForRules.enabled) {
28242
- for (const [ruleName, label] of WORKFLOW_DIAGRAMS_BUNDLE_HOOKS) {
28243
- const existing = ruleMap.get(ruleName);
28244
- if (!existing) {
28245
- continue;
28246
- }
28247
- const hook = renderWorkflowDiagramsBundleHook(
28248
- resolvedWorkflowDiagramsForRules,
28249
- label
28250
- );
28251
- if (hook.length === 0) {
28252
- continue;
28253
- }
28254
- ruleMap.set(ruleName, {
28255
- ...existing,
28256
- content: `${existing.content}
28257
-
28258
- ---
28259
-
28260
27736
  ${hook}`
28261
27737
  });
28262
27738
  }
@@ -30746,6 +30222,7 @@ var DEFAULT_TYPE_LABELS = [
30746
30222
  ];
30747
30223
  var DEFAULT_WORKFLOW_NAME2 = "sync-labels";
30748
30224
  var LABELS_CONFIG_PATH = ".github/labels.yml";
30225
+ var MAX_LABEL_DESCRIPTION_LENGTH = 100;
30749
30226
  function addSyncLabelsWorkflow(project, options) {
30750
30227
  const workflowName = options.workflowName ?? DEFAULT_WORKFLOW_NAME2;
30751
30228
  const deleteOtherLabels = options.deleteOtherLabels ?? true;
@@ -30768,6 +30245,18 @@ function addSyncLabelsWorkflow(project, options) {
30768
30245
  labelMap.set(label.name, label);
30769
30246
  }
30770
30247
  const allLabels = [...labelMap.values()];
30248
+ const overlength = allLabels.filter(
30249
+ (l) => (l.description ?? "").length > MAX_LABEL_DESCRIPTION_LENGTH
30250
+ );
30251
+ if (overlength.length > 0) {
30252
+ const offenders = overlength.map(
30253
+ (l) => ` - ${l.name} (${(l.description ?? "").length} chars): ${l.description}`
30254
+ ).join("\n");
30255
+ throw new Error(
30256
+ `The following label descriptions exceed GitHub's ${MAX_LABEL_DESCRIPTION_LENGTH}-char limit and would break the sync-labels workflow:
30257
+ ${offenders}`
30258
+ );
30259
+ }
30771
30260
  new LabelsFile(project, allLabels);
30772
30261
  const workflow = project.github?.addWorkflow(workflowName);
30773
30262
  if (!workflow) {
@@ -32412,16 +31901,11 @@ export {
32412
31901
  DEFAULT_TYPE_LABELS,
32413
31902
  DEFAULT_UNBLOCK_COMMENT_TEMPLATE,
32414
31903
  DEFAULT_UNBLOCK_DEPENDENTS_ENABLED,
32415
- DEFAULT_WORKFLOW_DIAGRAMS_BUNDLE_PATH_PATTERNS,
32416
- DEFAULT_WORKFLOW_DIAGRAMS_EMIT_CHECKER,
32417
- DEFAULT_WORKFLOW_DIAGRAMS_EMIT_STARTER,
32418
- DEFAULT_WORKFLOW_DIAGRAMS_ENABLED,
32419
- DEFAULT_WORKFLOW_DIAGRAMS_PATH,
32420
- DEFAULT_WORKFLOW_DIAGRAMS_REQUIRE_UPDATE,
32421
31904
  DOCS_SYNC_AUDIT_SCHEMA_VERSION,
32422
31905
  JsiiFaker,
32423
31906
  LAYOUT_ENFORCEMENT,
32424
31907
  LAYOUT_ROOT_BY_PROJECT_TYPE,
31908
+ MAX_LABEL_DESCRIPTION_LENGTH,
32425
31909
  MCP_TRANSPORT,
32426
31910
  MERGE_METHODS,
32427
31911
  MIMIMUM_RELEASE_AGE,
@@ -32548,10 +32032,6 @@ export {
32548
32032
  renderSourceTierExamples,
32549
32033
  renderUnblockDependentsScript,
32550
32034
  renderUnblockDependentsSection,
32551
- renderWorkflowDiagramsBundleHook,
32552
- renderWorkflowDiagramsCheckerScript,
32553
- renderWorkflowDiagramsRuleContent,
32554
- renderWorkflowDiagramsStarterPage,
32555
32035
  requirementsAnalystBundle,
32556
32036
  requirementsReviewerBundle,
32557
32037
  requirementsWriterBundle,
@@ -32574,7 +32054,6 @@ export {
32574
32054
  resolveTemplateVariables,
32575
32055
  resolveTypeScriptProjectOutdir,
32576
32056
  resolveUnblockDependents,
32577
- resolveWorkflowDiagrams,
32578
32057
  runScan,
32579
32058
  slackBundle,
32580
32059
  softwareProfileBundle,
@@ -32593,7 +32072,6 @@ export {
32593
32072
  validateSkillEvalsConfig,
32594
32073
  validateStarlightSingleton,
32595
32074
  validateUnblockDependentsConfig,
32596
- validateWorkflowDiagramsConfig,
32597
32075
  vitestBundle
32598
32076
  };
32599
32077
  //# sourceMappingURL=index.mjs.map