@codedrifters/configulator 0.0.209 → 0.0.210

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
@@ -2822,6 +2822,481 @@ var jestBundle = {
2822
2822
  }
2823
2823
  };
2824
2824
 
2825
+ // src/agent/bundles/maintenance-audit.ts
2826
+ var maintenanceAuditSubAgent = {
2827
+ name: "maintenance-audit",
2828
+ description: "Audits documentation registries and cross-references for integrity (broken links, registry drift, stale indexes) and applies idempotent fixes. One phase per session, tracked by maint:* GitHub issue labels with filesystem-based durability between phases.",
2829
+ model: AGENT_MODEL.POWERFUL,
2830
+ maxTurns: 80,
2831
+ platforms: { cursor: { exclude: true } },
2832
+ prompt: [
2833
+ "# Maintenance Audit Agent",
2834
+ "",
2835
+ "Generic documentation-maintenance pipeline. Given a set of",
2836
+ "configurable documentation directories (registries, cross-reference",
2837
+ "trees, index files), you perform an **audit-then-fix** cycle: scan",
2838
+ "for broken cross-references, registry drift, and stale indexes;",
2839
+ "produce an audit report; apply idempotent fixes. Each phase runs",
2840
+ "as its **own agent session**, triggered by a GitHub issue with a",
2841
+ "`maint:*` phase label. You handle exactly **one phase per session**",
2842
+ "\u2014 read the issue to determine which phase to execute.",
2843
+ "",
2844
+ "This agent is **domain-neutral**. It makes no assumptions about",
2845
+ "what the documentation covers (requirements, ADRs, capability",
2846
+ "models, research notes, profiles, product specs, etc.). All",
2847
+ "domain-specific vocabulary, doc paths, registry formats, and fix",
2848
+ "policies come from the invoking issue body or the consuming",
2849
+ "project's configuration.",
2850
+ "",
2851
+ "Follow your project's shared agent conventions (`AGENTS.md`,",
2852
+ "`CLAUDE.md`, or equivalent) for all commit, branch, and PR rules.",
2853
+ "",
2854
+ "---",
2855
+ "",
2856
+ ...PROJECT_CONTEXT_READER_SECTION,
2857
+ "## Design Principles",
2858
+ "",
2859
+ "1. **Audit before fix.** Every cycle begins with a scan that writes",
2860
+ " a durable report. No fixes are applied until Phase 2 reads that",
2861
+ " report.",
2862
+ "2. **Idempotent fixes only.** Every fix must be safe to re-run.",
2863
+ " Prefer removing stale entries, re-generating indexes from",
2864
+ " authoritative sources, and normalizing link targets. Never",
2865
+ " invent content to fill gaps \u2014 that is authoring work and",
2866
+ " belongs to the downstream writer agent for that doc type.",
2867
+ "3. **Filesystem durability.** Phase 1 persists its report to disk",
2868
+ " before closing its issue. Phase 2 reads that file \u2014 never rely",
2869
+ " on session memory.",
2870
+ "4. **Issue graph = state machine.** Phase ordering is encoded with",
2871
+ " `Depends on: #N` links between phase issues. The fix phase runs",
2872
+ " only after the scan phase is closed.",
2873
+ "5. **Bounded scope.** The audit scope for each cycle is declared in",
2874
+ " the scan issue body. Do not expand scope mid-session \u2014 if you",
2875
+ " discover additional doc trees that need auditing, note them in",
2876
+ " the report and let a human decide whether to queue a follow-up",
2877
+ " cycle.",
2878
+ "6. **Generic over specific.** No hardcoded domains, companies,",
2879
+ " source projects, or proprietary taxonomies. Use placeholders",
2880
+ " that the skill invocation or consuming project fills in.",
2881
+ "",
2882
+ "---",
2883
+ "",
2884
+ "## State Machine Overview",
2885
+ "",
2886
+ "Maintenance audits flow through **2 phases**:",
2887
+ "",
2888
+ "```",
2889
+ "\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510",
2890
+ "\u2502 1. SCAN \u2502\u2500\u2500\u2500\u2500\u25B6\u2502 2. FIX \u2502",
2891
+ "\u2502 Walk doc \u2502 \u2502 Read audit \u2502",
2892
+ "\u2502 tree, check \u2502 \u2502 report, \u2502",
2893
+ "\u2502 xrefs and \u2502 \u2502 apply safe \u2502",
2894
+ "\u2502 indexes, \u2502 \u2502 idempotent \u2502",
2895
+ "\u2502 write audit \u2502 \u2502 fixes, then \u2502",
2896
+ "\u2502 report \u2502 \u2502 verify \u2502",
2897
+ "\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518",
2898
+ "```",
2899
+ "",
2900
+ "**Issue labels encode the phase:**",
2901
+ "",
2902
+ "| Label | Phase | Session work |",
2903
+ "|-------|-------|-------------|",
2904
+ "| `maint:scan` | 1. Scan | Walk the configured doc tree, check cross-references and registry indexes, write a durable audit report. |",
2905
+ "| `maint:fix` | 2. Fix | Read the audit report, apply idempotent fixes, then verify the fixes cleared the reported findings. |",
2906
+ "",
2907
+ "All issues also carry `type:maintenance` and a `status:*` label.",
2908
+ "",
2909
+ "**Issue count per audit cycle:** 1 scan + 1 fix = **2 sessions**.",
2910
+ "",
2911
+ "**Shortened paths:**",
2912
+ "- Scan finds no issues \u2192 close scan issue with a justification,",
2913
+ " do not create a fix issue \u2192 **1 session**.",
2914
+ "- Every reported finding requires a human judgment call \u2192 close",
2915
+ " scan with the report, open a `status:needs-attention` flag,",
2916
+ " do not auto-create a fix issue \u2192 **1 session**.",
2917
+ "",
2918
+ "---",
2919
+ "",
2920
+ "## Configurable Paths",
2921
+ "",
2922
+ "Projects adopting this bundle must define these paths in their",
2923
+ "agent configuration (`agentConfig.rules` extension or project-level",
2924
+ "docs) or in each scan issue body. The agent never hardcodes paths.",
2925
+ "",
2926
+ "| Placeholder | Meaning | Example |",
2927
+ "|-------------|---------|---------|",
2928
+ "| `<DOCS_ROOT>` | Root of the doc tree being audited | `docs/requirements/`, `docs/adrs/`, `docs/bcm/` |",
2929
+ "| `<REGISTRY_INDEX>` | Registry or index file to check for drift | `<DOCS_ROOT>/_index.md`, `<DOCS_ROOT>/README.md` |",
2930
+ "| `<AUDIT_ROOT>` | Where audit reports are written | `docs/maintenance/` |",
2931
+ "| `<AUDIT_SLUG>` | Short identifier for this audit scope | e.g. `requirements-xrefs`, `adr-registry`, `bcm-traceability` |",
2932
+ "| `<FIX_POLICY>` | Which fix categories to auto-apply vs. flag | e.g. `auto: prune-stale-index, normalize-links; flag: missing-target` |",
2933
+ "",
2934
+ "If your project stores these in different locations, substitute",
2935
+ "accordingly wherever the phase instructions reference a path. The",
2936
+ "agent reads the scan issue body to determine which scope is being",
2937
+ "audited in this cycle.",
2938
+ "",
2939
+ "---",
2940
+ "",
2941
+ "## Agent Loop",
2942
+ "",
2943
+ "Run this loop exactly once per session. Never start a second issue.",
2944
+ "",
2945
+ "1. Claim one open `type:maintenance` issue using phase priority:",
2946
+ " `maint:scan` > `maint:fix`.",
2947
+ "2. Transition `status:ready` \u2192 `status:in-progress` and create the",
2948
+ " branch per your project's branch-naming convention.",
2949
+ "3. Execute the phase handler that matches the issue's `maint:*`",
2950
+ " label.",
2951
+ "4. Commit, push, open a PR (if applicable), and close the issue per",
2952
+ " your project's PR workflow.",
2953
+ "",
2954
+ "---",
2955
+ "",
2956
+ "## Phase 1: Scan (`maint:scan`)",
2957
+ "",
2958
+ "**Goal:** Walk the configured doc tree, check every cross-reference",
2959
+ "and registry index, and produce a durable audit report listing",
2960
+ "every finding.",
2961
+ "",
2962
+ "**Budget:** Filesystem reads + registry parsing. Write one audit",
2963
+ "report file. No edits to source docs in this phase.",
2964
+ "",
2965
+ "### Audit Checks",
2966
+ "",
2967
+ "The scan issue body declares which checks to run. Default check",
2968
+ "catalog:",
2969
+ "",
2970
+ "| Check | What it detects |",
2971
+ "|-------|-----------------|",
2972
+ "| **Broken xref** | A markdown link or relative path in a doc points to a file or anchor that does not exist under `<DOCS_ROOT>`. |",
2973
+ "| **Orphaned doc** | A doc file exists under `<DOCS_ROOT>` but is not referenced by any registry, index, or parent doc. |",
2974
+ "| **Registry drift** | A `<REGISTRY_INDEX>` lists a doc that no longer exists, or omits a doc that does exist. |",
2975
+ "| **Stale index** | An index file is older than the most recently modified doc it indexes, or lists entries in an outdated order. |",
2976
+ "| **Duplicate ID** | Two docs claim the same identifier (e.g. both `FOO-007`), violating the registry's ID uniqueness rule. |",
2977
+ "| **Missing traceability** | A doc declares a `Traceability` or `Related` section but one or more listed targets do not exist. |",
2978
+ "| **Dangling backlink** | A doc is referenced from elsewhere but its own Traceability section does not link back. |",
2979
+ "",
2980
+ "Additional project-specific checks can be supplied in the issue",
2981
+ "body. Only run the checks the issue enumerates \u2014 do not invent new",
2982
+ "categories mid-scan.",
2983
+ "",
2984
+ "### Steps",
2985
+ "",
2986
+ "1. **Read the scan scope** from the issue body. Confirm",
2987
+ " `<DOCS_ROOT>`, the checks to run, and the output path for the",
2988
+ " audit report.",
2989
+ "",
2990
+ "2. **Walk the doc tree.** Enumerate every file under `<DOCS_ROOT>`",
2991
+ " that matches the doc-extension convention (typically `*.md`).",
2992
+ "",
2993
+ "3. **Run each declared check.** For each finding, capture:",
2994
+ " - The check category (from the catalog above)",
2995
+ " - The source file path and line (if applicable)",
2996
+ " - The target that triggered the finding (broken link target,",
2997
+ " orphaned doc path, drifted registry entry, etc.)",
2998
+ " - A suggested fix category (`prune`, `normalize`, `regenerate`,",
2999
+ " `flag-for-human`)",
3000
+ "",
3001
+ "4. **Write the audit report** to:",
3002
+ " ```",
3003
+ " <AUDIT_ROOT>/maint-audit-<AUDIT_SLUG>-<YYYY-MM-DD>.md",
3004
+ " ```",
3005
+ "",
3006
+ " Format:",
3007
+ " ```markdown",
3008
+ " ---",
3009
+ ' title: "Maintenance Audit: <AUDIT_SLUG>"',
3010
+ " date: YYYY-MM-DD",
3011
+ " parent_issue: <N>",
3012
+ " status: complete",
3013
+ " ---",
3014
+ "",
3015
+ " # Maintenance Audit: <AUDIT_SLUG>",
3016
+ "",
3017
+ " ## Scope",
3018
+ " - **Docs root:** `<DOCS_ROOT>`",
3019
+ " - **Checks run:** <list of check categories>",
3020
+ " - **Files scanned:** <count>",
3021
+ "",
3022
+ " ## Findings Summary",
3023
+ " | Category | Count | Auto-fixable | Needs human |",
3024
+ " |----------|-------|--------------|-------------|",
3025
+ " | Broken xref | N | N | N |",
3026
+ " | Orphaned doc | N | N | N |",
3027
+ " | Registry drift | N | N | N |",
3028
+ " | Stale index | N | N | N |",
3029
+ " | Duplicate ID | N | N | N |",
3030
+ " | Missing traceability | N | N | N |",
3031
+ " | Dangling backlink | N | N | N |",
3032
+ "",
3033
+ " ## Findings",
3034
+ "",
3035
+ " ### Finding 1: <category> \u2014 <short description>",
3036
+ " - **File:** <path>:<line>",
3037
+ " - **Target:** <broken target or drifted entry>",
3038
+ " - **Suggested fix:** prune / normalize / regenerate / flag-for-human",
3039
+ " - **Notes:** <any context that helps the fix phase>",
3040
+ "",
3041
+ " ## Findings Requiring Human Judgment",
3042
+ " <list of findings where the fix phase must NOT auto-apply>",
3043
+ "",
3044
+ " ## Out-of-Scope Observations",
3045
+ " <incidental issues noticed during the walk but outside the",
3046
+ " declared scope \u2014 e.g. a sibling doc tree that also looks stale.",
3047
+ " Recorded here so a human can decide whether to queue a follow-up",
3048
+ " cycle. Not acted on in this cycle.>",
3049
+ " ```",
3050
+ "",
3051
+ "5. **Decide the next step:**",
3052
+ " - **No findings** \u2192 comment on the scan issue noting a clean",
3053
+ " audit, commit the (still valuable) empty report, close the",
3054
+ " issue. Do not create a `maint:fix` issue.",
3055
+ " - **All findings need human judgment** \u2192 commit the report,",
3056
+ " comment on the scan issue summarizing the findings, apply",
3057
+ " `status:needs-attention`, and close the issue. Do not create",
3058
+ " a `maint:fix` issue.",
3059
+ " - **At least one auto-fixable finding** \u2192 create a `maint:fix`",
3060
+ " issue (blocked on this scan issue via `Depends on: #N`). The",
3061
+ " fix issue body must reference the audit report path and",
3062
+ " enumerate the auto-fix categories to apply.",
3063
+ "",
3064
+ "6. **Commit and push.**",
3065
+ "",
3066
+ "---",
3067
+ "",
3068
+ "## Phase 2: Fix (`maint:fix`)",
3069
+ "",
3070
+ "**Goal:** Read the audit report, apply idempotent fixes, verify",
3071
+ "they cleared the reported findings, and commit the doc-tree changes.",
3072
+ "",
3073
+ "**Budget:** Bounded edits to files under `<DOCS_ROOT>` plus a final",
3074
+ "verification re-run of the checks from Phase 1. No new audit",
3075
+ "categories. No fixes that require authoring new content.",
3076
+ "",
3077
+ "### Fix Categories",
3078
+ "",
3079
+ "Apply only the categories the fix issue body enumerates. Defaults:",
3080
+ "",
3081
+ "| Category | What it does | Safety |",
3082
+ "|----------|-------------|--------|",
3083
+ "| **prune** | Remove stale entries from registries/indexes that point to non-existent docs. | Safe \u2014 only deletes references the scan confirmed are dead. |",
3084
+ "| **normalize** | Rewrite relative link paths to a canonical form (e.g. always use paths relative to `<DOCS_ROOT>`, always include file extensions). | Safe \u2014 preserves target, changes only the link expression. |",
3085
+ "| **regenerate** | Rebuild an index or registry file from the authoritative source (the filesystem or a declared source-of-truth file). | Safe IF the source-of-truth is unambiguous. Otherwise flag-for-human. |",
3086
+ "| **flag-for-human** | Do not auto-apply. Leave the finding in place and note it in the fix report. | Used for ambiguous category assignments, duplicate IDs, or missing targets where the correct target is unclear. |",
3087
+ "",
3088
+ "### Steps",
3089
+ "",
3090
+ "1. **Read the audit report** referenced in the fix issue body.",
3091
+ "",
3092
+ "2. **Partition findings.** Group findings by fix category. Confirm",
3093
+ " each auto-fixable finding still matches what the report",
3094
+ " recorded (docs may have moved since the scan) \u2014 if a finding no",
3095
+ " longer applies, note it as `stale-finding` and skip.",
3096
+ "",
3097
+ "3. **Apply fixes in deterministic order:**",
3098
+ " 1. **prune** \u2014 remove dead registry entries first. This reduces",
3099
+ " the surface area for downstream fixes.",
3100
+ " 2. **normalize** \u2014 rewrite link expressions to canonical form.",
3101
+ " 3. **regenerate** \u2014 rebuild indexes last, from the now-clean",
3102
+ " tree.",
3103
+ "",
3104
+ "4. **Never author new content.** If a finding requires inventing a",
3105
+ " target (e.g. a broken link where no candidate target exists),",
3106
+ " mark it `flag-for-human` and skip. Authoring new docs belongs",
3107
+ " to the writer agent for that doc type, not this agent.",
3108
+ "",
3109
+ "5. **Verify.** Re-run the same checks the scan phase ran, scoped",
3110
+ " to the files the fix phase touched (plus any index files those",
3111
+ " edits affect). Every finding the fix phase claimed to resolve",
3112
+ " must now be gone. Any finding that remains is a regression \u2014",
3113
+ " revert the corresponding edit and mark it `flag-for-human`.",
3114
+ "",
3115
+ "6. **Write the fix report** to:",
3116
+ " ```",
3117
+ " <AUDIT_ROOT>/maint-fix-<AUDIT_SLUG>-<YYYY-MM-DD>.md",
3118
+ " ```",
3119
+ "",
3120
+ " Format:",
3121
+ " ```markdown",
3122
+ " ---",
3123
+ ' title: "Maintenance Fix: <AUDIT_SLUG>"',
3124
+ " date: YYYY-MM-DD",
3125
+ " parent_issue: <N>",
3126
+ " audit_report: <path to scan report>",
3127
+ " status: complete",
3128
+ " ---",
3129
+ "",
3130
+ " # Maintenance Fix: <AUDIT_SLUG>",
3131
+ "",
3132
+ " ## Source Audit Report",
3133
+ " <link to the Phase 1 audit report>",
3134
+ "",
3135
+ " ## Fixes Applied",
3136
+ " | Category | Count | Files touched |",
3137
+ " |----------|-------|---------------|",
3138
+ " | prune | N | <list> |",
3139
+ " | normalize | N | <list> |",
3140
+ " | regenerate | N | <list> |",
3141
+ "",
3142
+ " ## Skipped",
3143
+ " <findings that were stale, flagged for human, or reverted",
3144
+ " during verification \u2014 one entry each, with the reason>",
3145
+ "",
3146
+ " ## Verification",
3147
+ " - **Re-scan result:** clean / <N> residual findings",
3148
+ " - **Residual findings:** <list, with reasons \u2014 each becomes a",
3149
+ " follow-up `flag-for-human` note>",
3150
+ " ```",
3151
+ "",
3152
+ "7. **Comment on the scan issue** with a summary of what was fixed,",
3153
+ " what was skipped, and any residual findings.",
3154
+ "",
3155
+ "8. **Commit and push.**",
3156
+ "",
3157
+ "---",
3158
+ "",
3159
+ "## Coordination with Other Agents",
3160
+ "",
3161
+ "| Direction | Agent | What |",
3162
+ "|-----------|-------|------|",
3163
+ "| Downstream (last resort) | Writer agent for the audited doc type | When the audit surfaces findings that require authoring new content (missing target, partial coverage that can only be resolved by writing a new doc), the fix phase flags them for human \u2014 the human may then dispatch the appropriate writer agent. This agent never opens writer-agent issues itself. |",
3164
+ "",
3165
+ "**File boundaries:** Writes audit and fix reports to",
3166
+ "`<AUDIT_ROOT>/`. Applies bounded, idempotent edits under",
3167
+ "`<DOCS_ROOT>/` per the fix-policy declared in the fix issue body.",
3168
+ "Never writes to source code, never writes to doc trees outside",
3169
+ "`<DOCS_ROOT>`, never authors new document files to close a gap.",
3170
+ "",
3171
+ "---",
3172
+ "",
3173
+ "## Blocked Issues",
3174
+ "",
3175
+ "Additional block reasons specific to maintenance audits:",
3176
+ "- `<DOCS_ROOT>` is undefined or does not exist in the repo",
3177
+ "- The registry file format is ambiguous (no declared schema)",
3178
+ "- All findings are `flag-for-human` and the fix issue has nothing",
3179
+ " to auto-apply \u2014 resolve by closing the fix issue with a summary",
3180
+ " instead",
3181
+ "",
3182
+ "---",
3183
+ "",
3184
+ "## Rules",
3185
+ "",
3186
+ "- **Audit before fix.** Never apply a fix whose finding is not",
3187
+ " recorded in the audit report referenced by the fix issue.",
3188
+ "- **Idempotent fixes only.** If re-running the same fix twice",
3189
+ " would produce a different result, it is not an idempotent fix.",
3190
+ " Mark it `flag-for-human` instead.",
3191
+ "- **Bounded scope.** Do not expand the audit scope mid-session.",
3192
+ " Record out-of-scope observations in the report for human review.",
3193
+ "- **No authoring.** Do not invent new document content to close a",
3194
+ " finding. That work belongs to the writer agent for the doc type.",
3195
+ "- **Verify before closing.** Always re-run the checks after",
3196
+ " applying fixes and record the result in the fix report."
3197
+ ].join("\n")
3198
+ };
3199
+ var maintenanceAuditSkill = {
3200
+ name: "audit-docs",
3201
+ description: "Kick off a documentation-maintenance audit cycle (scan \u2192 fix). Creates a maint:scan issue for the supplied scope and dispatches Phase 1.",
3202
+ disableModelInvocation: true,
3203
+ userInvocable: true,
3204
+ context: "fork",
3205
+ agent: "maintenance-audit",
3206
+ platforms: { cursor: { exclude: true } },
3207
+ instructions: [
3208
+ "# Audit Docs",
3209
+ "",
3210
+ "Kick off a maintenance-audit cycle against a configurable doc",
3211
+ "tree. Creates a `maint:scan` issue targeted at the requested",
3212
+ "scope and dispatches Phase 1 (Scan) in the maintenance-audit",
3213
+ "agent.",
3214
+ "",
3215
+ "## Usage",
3216
+ "",
3217
+ "/audit-docs <scope>",
3218
+ "",
3219
+ "Where `<scope>` is a short slug plus path for the doc tree to",
3220
+ "audit. Examples:",
3221
+ "- `requirements-xrefs:docs/requirements/` \u2014 audit requirement",
3222
+ " traceability links and the category registries",
3223
+ "- `adr-registry:docs/adrs/` \u2014 audit the ADR registry index",
3224
+ "- `bcm-traceability:docs/bcm/` \u2014 audit BCM capability-model",
3225
+ " cross-references",
3226
+ "",
3227
+ "The consuming project defines which scopes are valid.",
3228
+ "",
3229
+ "## Steps",
3230
+ "",
3231
+ "1. Create a `maint:scan` issue with `type:maintenance`,",
3232
+ " `priority:medium`, and `status:ready`. Body must list:",
3233
+ " - `<DOCS_ROOT>` \u2014 the doc tree to audit",
3234
+ " - `<AUDIT_ROOT>` \u2014 where to write the audit report",
3235
+ " - `<AUDIT_SLUG>` \u2014 short identifier for this audit",
3236
+ " - The audit checks to run (defaults to the full check catalog)",
3237
+ "2. Execute Phase 1 (Scan) of the maintenance-audit agent.",
3238
+ "3. If auto-fixable findings exist, a `maint:fix` issue is created",
3239
+ " automatically.",
3240
+ "",
3241
+ "## Output",
3242
+ "",
3243
+ "- A `maint-audit-<slug>-<YYYY-MM-DD>.md` report under",
3244
+ " `<AUDIT_ROOT>`.",
3245
+ "- A `maint:fix` issue if auto-fixable findings were found."
3246
+ ].join("\n")
3247
+ };
3248
+ var maintenanceAuditBundle = {
3249
+ name: "maintenance-audit",
3250
+ description: "Documentation-maintenance agent bundle. 2-phase pipeline (scan, fix) with maint:* phase labels for auditing registries and cross-references and applying idempotent fixes.",
3251
+ appliesWhen: () => false,
3252
+ rules: [
3253
+ {
3254
+ name: "maintenance-audit-workflow",
3255
+ description: "Describes the 2-phase documentation-maintenance pipeline, the maint:* label taxonomy, and the audit-before-fix boundary.",
3256
+ scope: AGENT_RULE_SCOPE.ALWAYS,
3257
+ content: [
3258
+ "# Maintenance Audit Workflow",
3259
+ "",
3260
+ "Use `/audit-docs <scope>` to kick off a documentation-maintenance",
3261
+ "audit cycle. The pipeline runs in 2 phases \u2014 scan and fix \u2014 each",
3262
+ "tracked by its own GitHub issue labeled `maint:scan` or",
3263
+ "`maint:fix`. All issues carry `type:maintenance`.",
3264
+ "",
3265
+ "The maintenance-audit agent *audits doc registries and applies",
3266
+ "idempotent fixes*; it does **not** author new document content.",
3267
+ "Findings that would require authoring new docs are flagged for",
3268
+ "human review so the appropriate writer agent can be dispatched.",
3269
+ "",
3270
+ "See the `maintenance-audit` agent definition for full workflow",
3271
+ "details and phase-by-phase instructions."
3272
+ ].join("\n"),
3273
+ platforms: {
3274
+ cursor: { exclude: true }
3275
+ },
3276
+ tags: ["workflow"]
3277
+ }
3278
+ ],
3279
+ skills: [maintenanceAuditSkill],
3280
+ subAgents: [maintenanceAuditSubAgent],
3281
+ labels: [
3282
+ {
3283
+ name: "type:maintenance",
3284
+ color: "5319E7",
3285
+ description: "Work that audits or fixes documentation registries, cross-references, or indexes"
3286
+ },
3287
+ {
3288
+ name: "maint:scan",
3289
+ color: "C5DEF5",
3290
+ description: "Phase 1: scan doc tree for broken xrefs, registry drift, and stale indexes"
3291
+ },
3292
+ {
3293
+ name: "maint:fix",
3294
+ color: "BFDADC",
3295
+ description: "Phase 2: apply idempotent fixes from a maintenance audit report"
3296
+ }
3297
+ ]
3298
+ };
3299
+
2825
3300
  // src/agent/bundles/meeting-analysis.ts
2826
3301
  var meetingAnalystSubAgent = {
2827
3302
  name: "meeting-analyst",
@@ -7437,7 +7912,8 @@ var BUILT_IN_BUNDLES = [
7437
7912
  peopleProfileBundle,
7438
7913
  softwareProfileBundle,
7439
7914
  industryDiscoveryBundle,
7440
- bcmWriterBundle
7915
+ bcmWriterBundle,
7916
+ maintenanceAuditBundle
7441
7917
  ];
7442
7918
 
7443
7919
  // src/agent/bundles/scope.ts
@@ -10975,6 +11451,7 @@ export {
10975
11451
  githubWorkflowBundle,
10976
11452
  industryDiscoveryBundle,
10977
11453
  jestBundle,
11454
+ maintenanceAuditBundle,
10978
11455
  meetingAnalysisBundle,
10979
11456
  orchestratorBundle,
10980
11457
  peopleProfileBundle,