{
  "slug": "jj-templates-add-list-manipulation-methods-cdd5a1000805",
  "title": "jj templates add list manipulation methods",
  "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 jj template needs list manipulation for repository inspection, call the list methods on a list value. Use `jj log -T` with a template such as `self.parents().reverse().take(2).map(|c| c.commit_id().short()).join(\"\\n\")` to inspect recent parents.",
    "examples": [
      "jj log -T 'self.parents().reverse().take(2).map(|c| c.commit_id().short()).join(\"\\n\")'"
    ],
    "gotchas": [
      "Version: v0.39.0",
      "first(): Returns the first element; errors if the list is empty.",
      "last(): Returns the last element; errors if the list is empty.",
      "get(index: Integer) (required): Returns the element at the zero-based index; errors if out of bounds.",
      "reverse(): Returns the list in reverse order.",
      "skip(count: Integer) (required): Skips the first count elements and returns the rest.",
      "take(count: Integer) (required): Returns only the first count elements.",
      "These methods are supported on list types."
    ]
  },
  "why_it_matters": "Manipulate list values in a jj template used for repository inspection.",
  "sources": [
    "https://github.com/jj-vcs/jj/releases/tag/v0.39.0",
    "https://github.com/jj-vcs/jj/blob/v0.39.0/docs/templates.md"
  ],
  "rank": 0.97021,
  "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-8:gate",
    "evidence_hash": "c53a418ad28d07436e7dcc93a9a84d24352b31af3ecd8b942def60733aee66fc"
  },
  "review": {
    "draft_hash": "3b4582cbed079ec294c9bbc5009106663ade5e2108d521de3f6f1acaa14f0e6d",
    "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.97 >= 0.9; 2 needed) and Jev gave 0.65 (>= 0.6 needed)."
  }
}
