@codedrifters/configulator 0.0.209 → 0.0.211

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.d.mts CHANGED
@@ -1058,6 +1058,19 @@ declare const industryDiscoveryBundle: AgentRuleBundle;
1058
1058
  */
1059
1059
  declare const jestBundle: AgentRuleBundle;
1060
1060
 
1061
+ /**
1062
+ * Maintenance-audit bundle — opt-in via
1063
+ * `includeBundles: ["maintenance-audit"]`.
1064
+ *
1065
+ * Provides a 2-phase documentation-maintenance pipeline (scan → fix)
1066
+ * designed for any project with structured doc registries and
1067
+ * cross-references. Ships a sub-agent, a user-invocable skill, and
1068
+ * `maint:*` phase labels via the bundle `labels` mechanism so
1069
+ * consuming projects automatically pick up the label taxonomy
1070
+ * through the sync-labels workflow.
1071
+ */
1072
+ declare const maintenanceAuditBundle: AgentRuleBundle;
1073
+
1061
1074
  /**
1062
1075
  * Meeting analysis bundle — included by default.
1063
1076
  * Provides a 4-phase meeting transcript processing workflow.
@@ -1894,7 +1907,7 @@ declare const VERSION: {
1894
1907
  *
1895
1908
  * CLI and lib are versioned separately, so this is the lib version.
1896
1909
  */
1897
- readonly AWS_CDK_LIB_VERSION: "2.249.0";
1910
+ readonly AWS_CDK_LIB_VERSION: "2.250.0";
1898
1911
  /**
1899
1912
  * Version of the AWS Constructs library to use.
1900
1913
  */
@@ -3508,4 +3521,4 @@ declare const COMPLETE_JOB_ID = "complete";
3508
3521
  */
3509
3522
  declare function addBuildCompleteJob(buildWorkflow: BuildWorkflow): void;
3510
3523
 
3511
- export { AGENT_MODEL, AGENT_PLATFORM, AGENT_RULE_SCOPE, AgentConfig, type AgentConfigOptions, type AgentModel, type AgentPlatform, type AgentPlatformOverrides, type AgentProcedure, type AgentRule, type AgentRuleBundle, type AgentRuleScope, type AgentSkill, type AgentSubAgent, type AgentSubAgentPlatformOverrides, type ApproveMergeUpgradeOptions, AstroConfig, type AstroConfigOptions, type AstroIntegrationSpec, AstroOutput, AstroProject, type AstroProjectOptions, type AwsAccount, AwsCdkProject, type AwsCdkProjectOptions, AwsDeployWorkflow, AwsDeploymentConfig, AwsDeploymentTarget, type AwsDeploymentTargetOptions, type AwsLocalDeploymentConfig, type AwsOrganization, type AwsRegion, AwsTeardownWorkflow, type AwsTeardownWorkflowOptions, BUILT_IN_BUNDLES, CLAUDE_RULE_TARGET, COMPLETE_JOB_ID, type CiDeploymentConfig, type ClassTypeOptions, type ClaudeAutoModeConfig, type ClaudeHookAction, type ClaudeHookEntry, type ClaudeHooksConfig, type ClaudePermissionsConfig, type ClaudeRuleTarget, type ClaudeSandboxConfig, type ClaudeSettingsConfig, type CopilotHandoff, type CursorHookAction, type CursorHooksConfig, type CursorSettingsConfig, DEFAULT_PRIORITY_LABELS, DEFAULT_STATUS_LABELS, DEFAULT_TEARDOWN_BRANCH_PATTERNS, DEFAULT_TYPE_LABELS, type DeployWorkflowOptions, type DeploymentMetadata, type GitBranch, type GitHubBoardMetadata, type GitHubProjectMetadata, type GitHubSprintMetadata, type IDependencyResolver, JsiiFaker, type LabelDefinition, MCP_TRANSPORT, MERGE_METHODS, MIMIMUM_RELEASE_AGE, MINIMUM_RELEASE_AGE, type McpServerConfig, type McpTransport, type MergeMethod, MonorepoProject, type MonorepoProjectOptions, type OrganizationMetadata, PROD_DEPLOY_NAME, PnpmWorkspace, type PnpmWorkspaceOptions, ProjectMetadata, type ProjectMetadataOptions, ROOT_CI_TASK_NAME, ROOT_TURBO_TASK_NAME, type RemoteCacheOptions, type RepositoryMetadata, ResetTask, type ResetTaskOptions, type ResolvedProjectMetadata, type SlackMetadata, type StarlightEditLink, type StarlightLogo, StarlightProject, type StarlightProjectOptions, type StarlightSidebarItem, type StarlightSocialLink, type SyncLabelsOptions, type TemplateResolveResult, TestRunner, TurboRepo, type TurboRepoOptions, TurboRepoTask, type TurboRepoTaskOptions, TypeScriptConfig, TypeScriptProject, type TypeScriptProjectOptions, VERSION, VERSION_KEYS_SKIP, VERSION_NPM_PACKAGES, VSCodeConfig, type VersionKey, Vitest, type VitestConfigOptions, type VitestOptions, addApproveMergeUpgradeWorkflow, addBuildCompleteJob, addSyncLabelsWorkflow, awsCdkBundle, baseBundle, bcmWriterBundle, companyProfileBundle, getLatestEligibleVersion, githubWorkflowBundle, industryDiscoveryBundle, jestBundle, meetingAnalysisBundle, orchestratorBundle, peopleProfileBundle, pnpmBundle, prReviewBundle, projenBundle, requirementsAnalystBundle, researchPipelineBundle, resolveModelAlias, resolveTemplateVariables, slackBundle, softwareProfileBundle, turborepoBundle, typescriptBundle, vitestBundle };
3524
+ export { AGENT_MODEL, AGENT_PLATFORM, AGENT_RULE_SCOPE, AgentConfig, type AgentConfigOptions, type AgentModel, type AgentPlatform, type AgentPlatformOverrides, type AgentProcedure, type AgentRule, type AgentRuleBundle, type AgentRuleScope, type AgentSkill, type AgentSubAgent, type AgentSubAgentPlatformOverrides, type ApproveMergeUpgradeOptions, AstroConfig, type AstroConfigOptions, type AstroIntegrationSpec, AstroOutput, AstroProject, type AstroProjectOptions, type AwsAccount, AwsCdkProject, type AwsCdkProjectOptions, AwsDeployWorkflow, AwsDeploymentConfig, AwsDeploymentTarget, type AwsDeploymentTargetOptions, type AwsLocalDeploymentConfig, type AwsOrganization, type AwsRegion, AwsTeardownWorkflow, type AwsTeardownWorkflowOptions, BUILT_IN_BUNDLES, CLAUDE_RULE_TARGET, COMPLETE_JOB_ID, type CiDeploymentConfig, type ClassTypeOptions, type ClaudeAutoModeConfig, type ClaudeHookAction, type ClaudeHookEntry, type ClaudeHooksConfig, type ClaudePermissionsConfig, type ClaudeRuleTarget, type ClaudeSandboxConfig, type ClaudeSettingsConfig, type CopilotHandoff, type CursorHookAction, type CursorHooksConfig, type CursorSettingsConfig, DEFAULT_PRIORITY_LABELS, DEFAULT_STATUS_LABELS, DEFAULT_TEARDOWN_BRANCH_PATTERNS, DEFAULT_TYPE_LABELS, type DeployWorkflowOptions, type DeploymentMetadata, type GitBranch, type GitHubBoardMetadata, type GitHubProjectMetadata, type GitHubSprintMetadata, type IDependencyResolver, JsiiFaker, type LabelDefinition, MCP_TRANSPORT, MERGE_METHODS, MIMIMUM_RELEASE_AGE, MINIMUM_RELEASE_AGE, type McpServerConfig, type McpTransport, type MergeMethod, MonorepoProject, type MonorepoProjectOptions, type OrganizationMetadata, PROD_DEPLOY_NAME, PnpmWorkspace, type PnpmWorkspaceOptions, ProjectMetadata, type ProjectMetadataOptions, ROOT_CI_TASK_NAME, ROOT_TURBO_TASK_NAME, type RemoteCacheOptions, type RepositoryMetadata, ResetTask, type ResetTaskOptions, type ResolvedProjectMetadata, type SlackMetadata, type StarlightEditLink, type StarlightLogo, StarlightProject, type StarlightProjectOptions, type StarlightSidebarItem, type StarlightSocialLink, type SyncLabelsOptions, type TemplateResolveResult, TestRunner, TurboRepo, type TurboRepoOptions, TurboRepoTask, type TurboRepoTaskOptions, TypeScriptConfig, TypeScriptProject, type TypeScriptProjectOptions, VERSION, VERSION_KEYS_SKIP, VERSION_NPM_PACKAGES, VSCodeConfig, type VersionKey, Vitest, type VitestConfigOptions, type VitestOptions, addApproveMergeUpgradeWorkflow, addBuildCompleteJob, addSyncLabelsWorkflow, awsCdkBundle, baseBundle, bcmWriterBundle, companyProfileBundle, getLatestEligibleVersion, githubWorkflowBundle, industryDiscoveryBundle, jestBundle, maintenanceAuditBundle, meetingAnalysisBundle, orchestratorBundle, peopleProfileBundle, pnpmBundle, prReviewBundle, projenBundle, requirementsAnalystBundle, researchPipelineBundle, resolveModelAlias, resolveTemplateVariables, slackBundle, softwareProfileBundle, turborepoBundle, typescriptBundle, vitestBundle };
package/lib/index.d.ts CHANGED
@@ -1107,6 +1107,19 @@ declare const industryDiscoveryBundle: AgentRuleBundle;
1107
1107
  */
1108
1108
  declare const jestBundle: AgentRuleBundle;
1109
1109
 
1110
+ /**
1111
+ * Maintenance-audit bundle — opt-in via
1112
+ * `includeBundles: ["maintenance-audit"]`.
1113
+ *
1114
+ * Provides a 2-phase documentation-maintenance pipeline (scan → fix)
1115
+ * designed for any project with structured doc registries and
1116
+ * cross-references. Ships a sub-agent, a user-invocable skill, and
1117
+ * `maint:*` phase labels via the bundle `labels` mechanism so
1118
+ * consuming projects automatically pick up the label taxonomy
1119
+ * through the sync-labels workflow.
1120
+ */
1121
+ declare const maintenanceAuditBundle: AgentRuleBundle;
1122
+
1110
1123
  /**
1111
1124
  * Meeting analysis bundle — included by default.
1112
1125
  * Provides a 4-phase meeting transcript processing workflow.
@@ -1943,7 +1956,7 @@ declare const VERSION: {
1943
1956
  *
1944
1957
  * CLI and lib are versioned separately, so this is the lib version.
1945
1958
  */
1946
- readonly AWS_CDK_LIB_VERSION: "2.249.0";
1959
+ readonly AWS_CDK_LIB_VERSION: "2.250.0";
1947
1960
  /**
1948
1961
  * Version of the AWS Constructs library to use.
1949
1962
  */
@@ -3557,5 +3570,5 @@ declare const COMPLETE_JOB_ID = "complete";
3557
3570
  */
3558
3571
  declare function addBuildCompleteJob(buildWorkflow: BuildWorkflow): void;
3559
3572
 
3560
- export { AGENT_MODEL, AGENT_PLATFORM, AGENT_RULE_SCOPE, AgentConfig, AstroConfig, AstroOutput, AstroProject, AwsCdkProject, AwsDeployWorkflow, AwsDeploymentConfig, AwsDeploymentTarget, AwsTeardownWorkflow, BUILT_IN_BUNDLES, CLAUDE_RULE_TARGET, COMPLETE_JOB_ID, DEFAULT_PRIORITY_LABELS, DEFAULT_STATUS_LABELS, DEFAULT_TEARDOWN_BRANCH_PATTERNS, DEFAULT_TYPE_LABELS, JsiiFaker, MCP_TRANSPORT, MERGE_METHODS, MIMIMUM_RELEASE_AGE, MINIMUM_RELEASE_AGE, MonorepoProject, PROD_DEPLOY_NAME, PnpmWorkspace, ProjectMetadata, ROOT_CI_TASK_NAME, ROOT_TURBO_TASK_NAME, ResetTask, StarlightProject, TestRunner, TurboRepo, TurboRepoTask, TypeScriptConfig, TypeScriptProject, VERSION, VERSION_KEYS_SKIP, VERSION_NPM_PACKAGES, VSCodeConfig, Vitest, addApproveMergeUpgradeWorkflow, addBuildCompleteJob, addSyncLabelsWorkflow, awsCdkBundle, baseBundle, bcmWriterBundle, companyProfileBundle, getLatestEligibleVersion, githubWorkflowBundle, industryDiscoveryBundle, jestBundle, meetingAnalysisBundle, orchestratorBundle, peopleProfileBundle, pnpmBundle, prReviewBundle, projenBundle, requirementsAnalystBundle, researchPipelineBundle, resolveModelAlias, resolveTemplateVariables, slackBundle, softwareProfileBundle, turborepoBundle, typescriptBundle, vitestBundle };
3573
+ export { AGENT_MODEL, AGENT_PLATFORM, AGENT_RULE_SCOPE, AgentConfig, AstroConfig, AstroOutput, AstroProject, AwsCdkProject, AwsDeployWorkflow, AwsDeploymentConfig, AwsDeploymentTarget, AwsTeardownWorkflow, BUILT_IN_BUNDLES, CLAUDE_RULE_TARGET, COMPLETE_JOB_ID, DEFAULT_PRIORITY_LABELS, DEFAULT_STATUS_LABELS, DEFAULT_TEARDOWN_BRANCH_PATTERNS, DEFAULT_TYPE_LABELS, JsiiFaker, MCP_TRANSPORT, MERGE_METHODS, MIMIMUM_RELEASE_AGE, MINIMUM_RELEASE_AGE, MonorepoProject, PROD_DEPLOY_NAME, PnpmWorkspace, ProjectMetadata, ROOT_CI_TASK_NAME, ROOT_TURBO_TASK_NAME, ResetTask, StarlightProject, TestRunner, TurboRepo, TurboRepoTask, TypeScriptConfig, TypeScriptProject, VERSION, VERSION_KEYS_SKIP, VERSION_NPM_PACKAGES, VSCodeConfig, Vitest, addApproveMergeUpgradeWorkflow, addBuildCompleteJob, addSyncLabelsWorkflow, awsCdkBundle, baseBundle, bcmWriterBundle, companyProfileBundle, getLatestEligibleVersion, githubWorkflowBundle, industryDiscoveryBundle, jestBundle, maintenanceAuditBundle, meetingAnalysisBundle, orchestratorBundle, peopleProfileBundle, pnpmBundle, prReviewBundle, projenBundle, requirementsAnalystBundle, researchPipelineBundle, resolveModelAlias, resolveTemplateVariables, slackBundle, softwareProfileBundle, turborepoBundle, typescriptBundle, vitestBundle };
3561
3574
  export type { AgentConfigOptions, AgentModel, AgentPlatform, AgentPlatformOverrides, AgentProcedure, AgentRule, AgentRuleBundle, AgentRuleScope, AgentSkill, AgentSubAgent, AgentSubAgentPlatformOverrides, ApproveMergeUpgradeOptions, AstroConfigOptions, AstroIntegrationSpec, AstroProjectOptions, AwsAccount, AwsCdkProjectOptions, AwsDeploymentTargetOptions, AwsLocalDeploymentConfig, AwsOrganization, AwsRegion, AwsTeardownWorkflowOptions, CiDeploymentConfig, ClassTypeOptions, ClaudeAutoModeConfig, ClaudeHookAction, ClaudeHookEntry, ClaudeHooksConfig, ClaudePermissionsConfig, ClaudeRuleTarget, ClaudeSandboxConfig, ClaudeSettingsConfig, CopilotHandoff, CursorHookAction, CursorHooksConfig, CursorSettingsConfig, DeployWorkflowOptions, DeploymentMetadata, GitBranch, GitHubBoardMetadata, GitHubProjectMetadata, GitHubSprintMetadata, IDependencyResolver, LabelDefinition, McpServerConfig, McpTransport, MergeMethod, MonorepoProjectOptions, OrganizationMetadata, PnpmWorkspaceOptions, ProjectMetadataOptions, RemoteCacheOptions, RepositoryMetadata, ResetTaskOptions, ResolvedProjectMetadata, SlackMetadata, StarlightEditLink, StarlightLogo, StarlightProjectOptions, StarlightSidebarItem, StarlightSocialLink, SyncLabelsOptions, TemplateResolveResult, TurboRepoOptions, TurboRepoTaskOptions, TypeScriptProjectOptions, VersionKey, VitestConfigOptions, VitestOptions };
package/lib/index.js CHANGED
@@ -228,6 +228,7 @@ __export(index_exports, {
228
228
  githubWorkflowBundle: () => githubWorkflowBundle,
229
229
  industryDiscoveryBundle: () => industryDiscoveryBundle,
230
230
  jestBundle: () => jestBundle,
231
+ maintenanceAuditBundle: () => maintenanceAuditBundle,
231
232
  meetingAnalysisBundle: () => meetingAnalysisBundle,
232
233
  orchestratorBundle: () => orchestratorBundle,
233
234
  peopleProfileBundle: () => peopleProfileBundle,
@@ -2896,6 +2897,481 @@ var jestBundle = {
2896
2897
  }
2897
2898
  };
2898
2899
 
2900
+ // src/agent/bundles/maintenance-audit.ts
2901
+ var maintenanceAuditSubAgent = {
2902
+ name: "maintenance-audit",
2903
+ 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.",
2904
+ model: AGENT_MODEL.POWERFUL,
2905
+ maxTurns: 80,
2906
+ platforms: { cursor: { exclude: true } },
2907
+ prompt: [
2908
+ "# Maintenance Audit Agent",
2909
+ "",
2910
+ "Generic documentation-maintenance pipeline. Given a set of",
2911
+ "configurable documentation directories (registries, cross-reference",
2912
+ "trees, index files), you perform an **audit-then-fix** cycle: scan",
2913
+ "for broken cross-references, registry drift, and stale indexes;",
2914
+ "produce an audit report; apply idempotent fixes. Each phase runs",
2915
+ "as its **own agent session**, triggered by a GitHub issue with a",
2916
+ "`maint:*` phase label. You handle exactly **one phase per session**",
2917
+ "\u2014 read the issue to determine which phase to execute.",
2918
+ "",
2919
+ "This agent is **domain-neutral**. It makes no assumptions about",
2920
+ "what the documentation covers (requirements, ADRs, capability",
2921
+ "models, research notes, profiles, product specs, etc.). All",
2922
+ "domain-specific vocabulary, doc paths, registry formats, and fix",
2923
+ "policies come from the invoking issue body or the consuming",
2924
+ "project's configuration.",
2925
+ "",
2926
+ "Follow your project's shared agent conventions (`AGENTS.md`,",
2927
+ "`CLAUDE.md`, or equivalent) for all commit, branch, and PR rules.",
2928
+ "",
2929
+ "---",
2930
+ "",
2931
+ ...PROJECT_CONTEXT_READER_SECTION,
2932
+ "## Design Principles",
2933
+ "",
2934
+ "1. **Audit before fix.** Every cycle begins with a scan that writes",
2935
+ " a durable report. No fixes are applied until Phase 2 reads that",
2936
+ " report.",
2937
+ "2. **Idempotent fixes only.** Every fix must be safe to re-run.",
2938
+ " Prefer removing stale entries, re-generating indexes from",
2939
+ " authoritative sources, and normalizing link targets. Never",
2940
+ " invent content to fill gaps \u2014 that is authoring work and",
2941
+ " belongs to the downstream writer agent for that doc type.",
2942
+ "3. **Filesystem durability.** Phase 1 persists its report to disk",
2943
+ " before closing its issue. Phase 2 reads that file \u2014 never rely",
2944
+ " on session memory.",
2945
+ "4. **Issue graph = state machine.** Phase ordering is encoded with",
2946
+ " `Depends on: #N` links between phase issues. The fix phase runs",
2947
+ " only after the scan phase is closed.",
2948
+ "5. **Bounded scope.** The audit scope for each cycle is declared in",
2949
+ " the scan issue body. Do not expand scope mid-session \u2014 if you",
2950
+ " discover additional doc trees that need auditing, note them in",
2951
+ " the report and let a human decide whether to queue a follow-up",
2952
+ " cycle.",
2953
+ "6. **Generic over specific.** No hardcoded domains, companies,",
2954
+ " source projects, or proprietary taxonomies. Use placeholders",
2955
+ " that the skill invocation or consuming project fills in.",
2956
+ "",
2957
+ "---",
2958
+ "",
2959
+ "## State Machine Overview",
2960
+ "",
2961
+ "Maintenance audits flow through **2 phases**:",
2962
+ "",
2963
+ "```",
2964
+ "\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",
2965
+ "\u2502 1. SCAN \u2502\u2500\u2500\u2500\u2500\u25B6\u2502 2. FIX \u2502",
2966
+ "\u2502 Walk doc \u2502 \u2502 Read audit \u2502",
2967
+ "\u2502 tree, check \u2502 \u2502 report, \u2502",
2968
+ "\u2502 xrefs and \u2502 \u2502 apply safe \u2502",
2969
+ "\u2502 indexes, \u2502 \u2502 idempotent \u2502",
2970
+ "\u2502 write audit \u2502 \u2502 fixes, then \u2502",
2971
+ "\u2502 report \u2502 \u2502 verify \u2502",
2972
+ "\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",
2973
+ "```",
2974
+ "",
2975
+ "**Issue labels encode the phase:**",
2976
+ "",
2977
+ "| Label | Phase | Session work |",
2978
+ "|-------|-------|-------------|",
2979
+ "| `maint:scan` | 1. Scan | Walk the configured doc tree, check cross-references and registry indexes, write a durable audit report. |",
2980
+ "| `maint:fix` | 2. Fix | Read the audit report, apply idempotent fixes, then verify the fixes cleared the reported findings. |",
2981
+ "",
2982
+ "All issues also carry `type:maintenance` and a `status:*` label.",
2983
+ "",
2984
+ "**Issue count per audit cycle:** 1 scan + 1 fix = **2 sessions**.",
2985
+ "",
2986
+ "**Shortened paths:**",
2987
+ "- Scan finds no issues \u2192 close scan issue with a justification,",
2988
+ " do not create a fix issue \u2192 **1 session**.",
2989
+ "- Every reported finding requires a human judgment call \u2192 close",
2990
+ " scan with the report, open a `status:needs-attention` flag,",
2991
+ " do not auto-create a fix issue \u2192 **1 session**.",
2992
+ "",
2993
+ "---",
2994
+ "",
2995
+ "## Configurable Paths",
2996
+ "",
2997
+ "Projects adopting this bundle must define these paths in their",
2998
+ "agent configuration (`agentConfig.rules` extension or project-level",
2999
+ "docs) or in each scan issue body. The agent never hardcodes paths.",
3000
+ "",
3001
+ "| Placeholder | Meaning | Example |",
3002
+ "|-------------|---------|---------|",
3003
+ "| `<DOCS_ROOT>` | Root of the doc tree being audited | `docs/requirements/`, `docs/adrs/`, `docs/bcm/` |",
3004
+ "| `<REGISTRY_INDEX>` | Registry or index file to check for drift | `<DOCS_ROOT>/_index.md`, `<DOCS_ROOT>/README.md` |",
3005
+ "| `<AUDIT_ROOT>` | Where audit reports are written | `docs/maintenance/` |",
3006
+ "| `<AUDIT_SLUG>` | Short identifier for this audit scope | e.g. `requirements-xrefs`, `adr-registry`, `bcm-traceability` |",
3007
+ "| `<FIX_POLICY>` | Which fix categories to auto-apply vs. flag | e.g. `auto: prune-stale-index, normalize-links; flag: missing-target` |",
3008
+ "",
3009
+ "If your project stores these in different locations, substitute",
3010
+ "accordingly wherever the phase instructions reference a path. The",
3011
+ "agent reads the scan issue body to determine which scope is being",
3012
+ "audited in this cycle.",
3013
+ "",
3014
+ "---",
3015
+ "",
3016
+ "## Agent Loop",
3017
+ "",
3018
+ "Run this loop exactly once per session. Never start a second issue.",
3019
+ "",
3020
+ "1. Claim one open `type:maintenance` issue using phase priority:",
3021
+ " `maint:scan` > `maint:fix`.",
3022
+ "2. Transition `status:ready` \u2192 `status:in-progress` and create the",
3023
+ " branch per your project's branch-naming convention.",
3024
+ "3. Execute the phase handler that matches the issue's `maint:*`",
3025
+ " label.",
3026
+ "4. Commit, push, open a PR (if applicable), and close the issue per",
3027
+ " your project's PR workflow.",
3028
+ "",
3029
+ "---",
3030
+ "",
3031
+ "## Phase 1: Scan (`maint:scan`)",
3032
+ "",
3033
+ "**Goal:** Walk the configured doc tree, check every cross-reference",
3034
+ "and registry index, and produce a durable audit report listing",
3035
+ "every finding.",
3036
+ "",
3037
+ "**Budget:** Filesystem reads + registry parsing. Write one audit",
3038
+ "report file. No edits to source docs in this phase.",
3039
+ "",
3040
+ "### Audit Checks",
3041
+ "",
3042
+ "The scan issue body declares which checks to run. Default check",
3043
+ "catalog:",
3044
+ "",
3045
+ "| Check | What it detects |",
3046
+ "|-------|-----------------|",
3047
+ "| **Broken xref** | A markdown link or relative path in a doc points to a file or anchor that does not exist under `<DOCS_ROOT>`. |",
3048
+ "| **Orphaned doc** | A doc file exists under `<DOCS_ROOT>` but is not referenced by any registry, index, or parent doc. |",
3049
+ "| **Registry drift** | A `<REGISTRY_INDEX>` lists a doc that no longer exists, or omits a doc that does exist. |",
3050
+ "| **Stale index** | An index file is older than the most recently modified doc it indexes, or lists entries in an outdated order. |",
3051
+ "| **Duplicate ID** | Two docs claim the same identifier (e.g. both `FOO-007`), violating the registry's ID uniqueness rule. |",
3052
+ "| **Missing traceability** | A doc declares a `Traceability` or `Related` section but one or more listed targets do not exist. |",
3053
+ "| **Dangling backlink** | A doc is referenced from elsewhere but its own Traceability section does not link back. |",
3054
+ "",
3055
+ "Additional project-specific checks can be supplied in the issue",
3056
+ "body. Only run the checks the issue enumerates \u2014 do not invent new",
3057
+ "categories mid-scan.",
3058
+ "",
3059
+ "### Steps",
3060
+ "",
3061
+ "1. **Read the scan scope** from the issue body. Confirm",
3062
+ " `<DOCS_ROOT>`, the checks to run, and the output path for the",
3063
+ " audit report.",
3064
+ "",
3065
+ "2. **Walk the doc tree.** Enumerate every file under `<DOCS_ROOT>`",
3066
+ " that matches the doc-extension convention (typically `*.md`).",
3067
+ "",
3068
+ "3. **Run each declared check.** For each finding, capture:",
3069
+ " - The check category (from the catalog above)",
3070
+ " - The source file path and line (if applicable)",
3071
+ " - The target that triggered the finding (broken link target,",
3072
+ " orphaned doc path, drifted registry entry, etc.)",
3073
+ " - A suggested fix category (`prune`, `normalize`, `regenerate`,",
3074
+ " `flag-for-human`)",
3075
+ "",
3076
+ "4. **Write the audit report** to:",
3077
+ " ```",
3078
+ " <AUDIT_ROOT>/maint-audit-<AUDIT_SLUG>-<YYYY-MM-DD>.md",
3079
+ " ```",
3080
+ "",
3081
+ " Format:",
3082
+ " ```markdown",
3083
+ " ---",
3084
+ ' title: "Maintenance Audit: <AUDIT_SLUG>"',
3085
+ " date: YYYY-MM-DD",
3086
+ " parent_issue: <N>",
3087
+ " status: complete",
3088
+ " ---",
3089
+ "",
3090
+ " # Maintenance Audit: <AUDIT_SLUG>",
3091
+ "",
3092
+ " ## Scope",
3093
+ " - **Docs root:** `<DOCS_ROOT>`",
3094
+ " - **Checks run:** <list of check categories>",
3095
+ " - **Files scanned:** <count>",
3096
+ "",
3097
+ " ## Findings Summary",
3098
+ " | Category | Count | Auto-fixable | Needs human |",
3099
+ " |----------|-------|--------------|-------------|",
3100
+ " | Broken xref | N | N | N |",
3101
+ " | Orphaned doc | N | N | N |",
3102
+ " | Registry drift | N | N | N |",
3103
+ " | Stale index | N | N | N |",
3104
+ " | Duplicate ID | N | N | N |",
3105
+ " | Missing traceability | N | N | N |",
3106
+ " | Dangling backlink | N | N | N |",
3107
+ "",
3108
+ " ## Findings",
3109
+ "",
3110
+ " ### Finding 1: <category> \u2014 <short description>",
3111
+ " - **File:** <path>:<line>",
3112
+ " - **Target:** <broken target or drifted entry>",
3113
+ " - **Suggested fix:** prune / normalize / regenerate / flag-for-human",
3114
+ " - **Notes:** <any context that helps the fix phase>",
3115
+ "",
3116
+ " ## Findings Requiring Human Judgment",
3117
+ " <list of findings where the fix phase must NOT auto-apply>",
3118
+ "",
3119
+ " ## Out-of-Scope Observations",
3120
+ " <incidental issues noticed during the walk but outside the",
3121
+ " declared scope \u2014 e.g. a sibling doc tree that also looks stale.",
3122
+ " Recorded here so a human can decide whether to queue a follow-up",
3123
+ " cycle. Not acted on in this cycle.>",
3124
+ " ```",
3125
+ "",
3126
+ "5. **Decide the next step:**",
3127
+ " - **No findings** \u2192 comment on the scan issue noting a clean",
3128
+ " audit, commit the (still valuable) empty report, close the",
3129
+ " issue. Do not create a `maint:fix` issue.",
3130
+ " - **All findings need human judgment** \u2192 commit the report,",
3131
+ " comment on the scan issue summarizing the findings, apply",
3132
+ " `status:needs-attention`, and close the issue. Do not create",
3133
+ " a `maint:fix` issue.",
3134
+ " - **At least one auto-fixable finding** \u2192 create a `maint:fix`",
3135
+ " issue (blocked on this scan issue via `Depends on: #N`). The",
3136
+ " fix issue body must reference the audit report path and",
3137
+ " enumerate the auto-fix categories to apply.",
3138
+ "",
3139
+ "6. **Commit and push.**",
3140
+ "",
3141
+ "---",
3142
+ "",
3143
+ "## Phase 2: Fix (`maint:fix`)",
3144
+ "",
3145
+ "**Goal:** Read the audit report, apply idempotent fixes, verify",
3146
+ "they cleared the reported findings, and commit the doc-tree changes.",
3147
+ "",
3148
+ "**Budget:** Bounded edits to files under `<DOCS_ROOT>` plus a final",
3149
+ "verification re-run of the checks from Phase 1. No new audit",
3150
+ "categories. No fixes that require authoring new content.",
3151
+ "",
3152
+ "### Fix Categories",
3153
+ "",
3154
+ "Apply only the categories the fix issue body enumerates. Defaults:",
3155
+ "",
3156
+ "| Category | What it does | Safety |",
3157
+ "|----------|-------------|--------|",
3158
+ "| **prune** | Remove stale entries from registries/indexes that point to non-existent docs. | Safe \u2014 only deletes references the scan confirmed are dead. |",
3159
+ "| **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. |",
3160
+ "| **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. |",
3161
+ "| **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. |",
3162
+ "",
3163
+ "### Steps",
3164
+ "",
3165
+ "1. **Read the audit report** referenced in the fix issue body.",
3166
+ "",
3167
+ "2. **Partition findings.** Group findings by fix category. Confirm",
3168
+ " each auto-fixable finding still matches what the report",
3169
+ " recorded (docs may have moved since the scan) \u2014 if a finding no",
3170
+ " longer applies, note it as `stale-finding` and skip.",
3171
+ "",
3172
+ "3. **Apply fixes in deterministic order:**",
3173
+ " 1. **prune** \u2014 remove dead registry entries first. This reduces",
3174
+ " the surface area for downstream fixes.",
3175
+ " 2. **normalize** \u2014 rewrite link expressions to canonical form.",
3176
+ " 3. **regenerate** \u2014 rebuild indexes last, from the now-clean",
3177
+ " tree.",
3178
+ "",
3179
+ "4. **Never author new content.** If a finding requires inventing a",
3180
+ " target (e.g. a broken link where no candidate target exists),",
3181
+ " mark it `flag-for-human` and skip. Authoring new docs belongs",
3182
+ " to the writer agent for that doc type, not this agent.",
3183
+ "",
3184
+ "5. **Verify.** Re-run the same checks the scan phase ran, scoped",
3185
+ " to the files the fix phase touched (plus any index files those",
3186
+ " edits affect). Every finding the fix phase claimed to resolve",
3187
+ " must now be gone. Any finding that remains is a regression \u2014",
3188
+ " revert the corresponding edit and mark it `flag-for-human`.",
3189
+ "",
3190
+ "6. **Write the fix report** to:",
3191
+ " ```",
3192
+ " <AUDIT_ROOT>/maint-fix-<AUDIT_SLUG>-<YYYY-MM-DD>.md",
3193
+ " ```",
3194
+ "",
3195
+ " Format:",
3196
+ " ```markdown",
3197
+ " ---",
3198
+ ' title: "Maintenance Fix: <AUDIT_SLUG>"',
3199
+ " date: YYYY-MM-DD",
3200
+ " parent_issue: <N>",
3201
+ " audit_report: <path to scan report>",
3202
+ " status: complete",
3203
+ " ---",
3204
+ "",
3205
+ " # Maintenance Fix: <AUDIT_SLUG>",
3206
+ "",
3207
+ " ## Source Audit Report",
3208
+ " <link to the Phase 1 audit report>",
3209
+ "",
3210
+ " ## Fixes Applied",
3211
+ " | Category | Count | Files touched |",
3212
+ " |----------|-------|---------------|",
3213
+ " | prune | N | <list> |",
3214
+ " | normalize | N | <list> |",
3215
+ " | regenerate | N | <list> |",
3216
+ "",
3217
+ " ## Skipped",
3218
+ " <findings that were stale, flagged for human, or reverted",
3219
+ " during verification \u2014 one entry each, with the reason>",
3220
+ "",
3221
+ " ## Verification",
3222
+ " - **Re-scan result:** clean / <N> residual findings",
3223
+ " - **Residual findings:** <list, with reasons \u2014 each becomes a",
3224
+ " follow-up `flag-for-human` note>",
3225
+ " ```",
3226
+ "",
3227
+ "7. **Comment on the scan issue** with a summary of what was fixed,",
3228
+ " what was skipped, and any residual findings.",
3229
+ "",
3230
+ "8. **Commit and push.**",
3231
+ "",
3232
+ "---",
3233
+ "",
3234
+ "## Coordination with Other Agents",
3235
+ "",
3236
+ "| Direction | Agent | What |",
3237
+ "|-----------|-------|------|",
3238
+ "| 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. |",
3239
+ "",
3240
+ "**File boundaries:** Writes audit and fix reports to",
3241
+ "`<AUDIT_ROOT>/`. Applies bounded, idempotent edits under",
3242
+ "`<DOCS_ROOT>/` per the fix-policy declared in the fix issue body.",
3243
+ "Never writes to source code, never writes to doc trees outside",
3244
+ "`<DOCS_ROOT>`, never authors new document files to close a gap.",
3245
+ "",
3246
+ "---",
3247
+ "",
3248
+ "## Blocked Issues",
3249
+ "",
3250
+ "Additional block reasons specific to maintenance audits:",
3251
+ "- `<DOCS_ROOT>` is undefined or does not exist in the repo",
3252
+ "- The registry file format is ambiguous (no declared schema)",
3253
+ "- All findings are `flag-for-human` and the fix issue has nothing",
3254
+ " to auto-apply \u2014 resolve by closing the fix issue with a summary",
3255
+ " instead",
3256
+ "",
3257
+ "---",
3258
+ "",
3259
+ "## Rules",
3260
+ "",
3261
+ "- **Audit before fix.** Never apply a fix whose finding is not",
3262
+ " recorded in the audit report referenced by the fix issue.",
3263
+ "- **Idempotent fixes only.** If re-running the same fix twice",
3264
+ " would produce a different result, it is not an idempotent fix.",
3265
+ " Mark it `flag-for-human` instead.",
3266
+ "- **Bounded scope.** Do not expand the audit scope mid-session.",
3267
+ " Record out-of-scope observations in the report for human review.",
3268
+ "- **No authoring.** Do not invent new document content to close a",
3269
+ " finding. That work belongs to the writer agent for the doc type.",
3270
+ "- **Verify before closing.** Always re-run the checks after",
3271
+ " applying fixes and record the result in the fix report."
3272
+ ].join("\n")
3273
+ };
3274
+ var maintenanceAuditSkill = {
3275
+ name: "audit-docs",
3276
+ description: "Kick off a documentation-maintenance audit cycle (scan \u2192 fix). Creates a maint:scan issue for the supplied scope and dispatches Phase 1.",
3277
+ disableModelInvocation: true,
3278
+ userInvocable: true,
3279
+ context: "fork",
3280
+ agent: "maintenance-audit",
3281
+ platforms: { cursor: { exclude: true } },
3282
+ instructions: [
3283
+ "# Audit Docs",
3284
+ "",
3285
+ "Kick off a maintenance-audit cycle against a configurable doc",
3286
+ "tree. Creates a `maint:scan` issue targeted at the requested",
3287
+ "scope and dispatches Phase 1 (Scan) in the maintenance-audit",
3288
+ "agent.",
3289
+ "",
3290
+ "## Usage",
3291
+ "",
3292
+ "/audit-docs <scope>",
3293
+ "",
3294
+ "Where `<scope>` is a short slug plus path for the doc tree to",
3295
+ "audit. Examples:",
3296
+ "- `requirements-xrefs:docs/requirements/` \u2014 audit requirement",
3297
+ " traceability links and the category registries",
3298
+ "- `adr-registry:docs/adrs/` \u2014 audit the ADR registry index",
3299
+ "- `bcm-traceability:docs/bcm/` \u2014 audit BCM capability-model",
3300
+ " cross-references",
3301
+ "",
3302
+ "The consuming project defines which scopes are valid.",
3303
+ "",
3304
+ "## Steps",
3305
+ "",
3306
+ "1. Create a `maint:scan` issue with `type:maintenance`,",
3307
+ " `priority:medium`, and `status:ready`. Body must list:",
3308
+ " - `<DOCS_ROOT>` \u2014 the doc tree to audit",
3309
+ " - `<AUDIT_ROOT>` \u2014 where to write the audit report",
3310
+ " - `<AUDIT_SLUG>` \u2014 short identifier for this audit",
3311
+ " - The audit checks to run (defaults to the full check catalog)",
3312
+ "2. Execute Phase 1 (Scan) of the maintenance-audit agent.",
3313
+ "3. If auto-fixable findings exist, a `maint:fix` issue is created",
3314
+ " automatically.",
3315
+ "",
3316
+ "## Output",
3317
+ "",
3318
+ "- A `maint-audit-<slug>-<YYYY-MM-DD>.md` report under",
3319
+ " `<AUDIT_ROOT>`.",
3320
+ "- A `maint:fix` issue if auto-fixable findings were found."
3321
+ ].join("\n")
3322
+ };
3323
+ var maintenanceAuditBundle = {
3324
+ name: "maintenance-audit",
3325
+ description: "Documentation-maintenance agent bundle. 2-phase pipeline (scan, fix) with maint:* phase labels for auditing registries and cross-references and applying idempotent fixes.",
3326
+ appliesWhen: () => false,
3327
+ rules: [
3328
+ {
3329
+ name: "maintenance-audit-workflow",
3330
+ description: "Describes the 2-phase documentation-maintenance pipeline, the maint:* label taxonomy, and the audit-before-fix boundary.",
3331
+ scope: AGENT_RULE_SCOPE.ALWAYS,
3332
+ content: [
3333
+ "# Maintenance Audit Workflow",
3334
+ "",
3335
+ "Use `/audit-docs <scope>` to kick off a documentation-maintenance",
3336
+ "audit cycle. The pipeline runs in 2 phases \u2014 scan and fix \u2014 each",
3337
+ "tracked by its own GitHub issue labeled `maint:scan` or",
3338
+ "`maint:fix`. All issues carry `type:maintenance`.",
3339
+ "",
3340
+ "The maintenance-audit agent *audits doc registries and applies",
3341
+ "idempotent fixes*; it does **not** author new document content.",
3342
+ "Findings that would require authoring new docs are flagged for",
3343
+ "human review so the appropriate writer agent can be dispatched.",
3344
+ "",
3345
+ "See the `maintenance-audit` agent definition for full workflow",
3346
+ "details and phase-by-phase instructions."
3347
+ ].join("\n"),
3348
+ platforms: {
3349
+ cursor: { exclude: true }
3350
+ },
3351
+ tags: ["workflow"]
3352
+ }
3353
+ ],
3354
+ skills: [maintenanceAuditSkill],
3355
+ subAgents: [maintenanceAuditSubAgent],
3356
+ labels: [
3357
+ {
3358
+ name: "type:maintenance",
3359
+ color: "5319E7",
3360
+ description: "Work that audits or fixes documentation registries, cross-references, or indexes"
3361
+ },
3362
+ {
3363
+ name: "maint:scan",
3364
+ color: "C5DEF5",
3365
+ description: "Phase 1: scan doc tree for broken xrefs, registry drift, and stale indexes"
3366
+ },
3367
+ {
3368
+ name: "maint:fix",
3369
+ color: "BFDADC",
3370
+ description: "Phase 2: apply idempotent fixes from a maintenance audit report"
3371
+ }
3372
+ ]
3373
+ };
3374
+
2899
3375
  // src/agent/bundles/meeting-analysis.ts
2900
3376
  var meetingAnalystSubAgent = {
2901
3377
  name: "meeting-analyst",
@@ -7289,7 +7765,7 @@ var VERSION = {
7289
7765
  *
7290
7766
  * CLI and lib are versioned separately, so this is the lib version.
7291
7767
  */
7292
- AWS_CDK_LIB_VERSION: "2.249.0",
7768
+ AWS_CDK_LIB_VERSION: "2.250.0",
7293
7769
  /**
7294
7770
  * Version of the AWS Constructs library to use.
7295
7771
  */
@@ -7511,7 +7987,8 @@ var BUILT_IN_BUNDLES = [
7511
7987
  peopleProfileBundle,
7512
7988
  softwareProfileBundle,
7513
7989
  industryDiscoveryBundle,
7514
- bcmWriterBundle
7990
+ bcmWriterBundle,
7991
+ maintenanceAuditBundle
7515
7992
  ];
7516
7993
 
7517
7994
  // src/agent/bundles/scope.ts
@@ -11037,6 +11514,7 @@ var TypeScriptConfig = class extends import_projen22.Component {
11037
11514
  githubWorkflowBundle,
11038
11515
  industryDiscoveryBundle,
11039
11516
  jestBundle,
11517
+ maintenanceAuditBundle,
11040
11518
  meetingAnalysisBundle,
11041
11519
  orchestratorBundle,
11042
11520
  peopleProfileBundle,