{
  "slug": "jj-configuration-supports-environment-based-conditions-dc5267884877",
  "title": "jj configuration supports environment-based conditions",
  "tools": [
    "jj"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-03-04T18:28:43.000Z",
  "announced_at": "2026-03-04T18:28:43.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When a repository development setting should apply only under an environment condition, add a conditional scope to jj configuration. Use `--when.environments` with `NAME=VALUE` to match a value or `NAME` to match whenever the variable is set.",
    "examples": [
      "[[--scope]]\n--when.environments = [\"<NAME>=<VALUE>\"]\n[--scope.<section>]\n<key> = \"<value>\""
    ],
    "gotchas": [
      "Version: v0.39.0",
      "--when.environments (required): List of environment conditions. Each item is `NAME=VALUE` to match that value, or `NAME` to match if set. Items in the list are alternatives (OR).",
      "--scope (required): Conditional configuration table; its variables are expanded to the root config table.",
      "Multiple condition keys: If multiple `--when` conditions are specified, their intersection is used (AND)."
    ]
  },
  "why_it_matters": "Apply a jj configuration condition based on environment variables in a repository development setup.",
  "sources": [
    "https://github.com/jj-vcs/jj/releases/tag/v0.39.0",
    "https://github.com/jj-vcs/jj/blob/v0.39.0/docs/config.md"
  ],
  "rank": 0.9403,
  "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": "wave1b-tools-20261017",
    "verdict_id": "wave1b-tools-20261017:wave1b-tools-20261017-7bbe2f4242294e1b-26:gate",
    "evidence_hash": "c53a418ad28d07436e7dcc93a9a84d24352b31af3ecd8b942def60733aee66fc"
  },
  "review": {
    "draft_hash": "cb1d217c90bfeede3222e2788152022c4a78f2f1df69ae7c0c389d9b15deb69e",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave1b-tools-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.94 >= 0.9; 2 needed) and Jev gave 0.64 (>= 0.6 needed)."
  }
}
