{
  "slug": "cdk-synth-watch-re-synthesizes-on-file-changes-ff2e3151e64e",
  "title": "cdk synth --watch re-synthesizes on file changes",
  "tools": [
    "cdk"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-09-09T14:16:58.000Z",
  "announced_at": "2026-09-09T14:16:58.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When iterating on a CDK app, run `cdk synth --watch` to synthesize initially and re-synthesize when watched files change. Configure the project’s `cdk.json` with a `watch` key first.",
    "examples": [
      "cdk synth --watch"
    ],
    "gotchas": [
      "Version: 2.1141.0",
      "--watch (required): Enables watching project files and re-synthesizing on changes.",
      "cdk.json: watch (required): Project configuration key required by `cdk synth --watch` to set watched files.",
      "cdk.json: watch.include: Paths to include in watching; accepts a string or array of strings.",
      "cdk.json: watch.exclude: Paths to exclude from watching; accepts a string or array of strings. `include` and `exclude` are not documented as mutually exclusive.",
      "Prerequisite: The project’s `cdk.json` must contain a `watch` key; the commit’s integration test configures `watch.include` as `['**/*.ts']`."
    ]
  },
  "why_it_matters": "When iterating on a CDK app, watch for file changes and regenerate the synthesized output.",
  "sources": [
    "https://github.com/aws/aws-cdk-cli/releases/tag/aws-cdk%40v2.1141.0",
    "https://github.com/aws/aws-cdk-cli/commit/ef24968709532254444d3b868d3ae899a8ffbd1a",
    "https://docs.aws.amazon.com/cdk/v2/guide/ref-cli-cmd-watch.html"
  ],
  "rank": 0.98039,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2a-20261017",
    "verdict_id": "wave2a-20261017:wave2a-20261017-96a7e0f4b5222d18-0:gate",
    "evidence_hash": "03b5da2ac03dd06ea0064e6ab279b755ef333e9a7187d64ae41e1fa1447d9832"
  },
  "review": {
    "draft_hash": "1de290df3ea057343990f607285430a33d106a0ecdf09deff159a01bd79a5a68",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2a-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.98 >= 0.9; 2 needed) and Jev gave 0.76 (>= 0.6 needed)."
  }
}
