Atlassian 想把你的 Agent 循环管起来:在 AI 原生 SDLC 中规模化运行编码 Agent

·阅读约11分钟·Evergreen Tools Team

💡 工具推荐做这件事时,用 Evergreen Tools 的 AI 代码审查单元测试生成器API 文档生成器 更省心!

Atlassian 在 2026 年 9 月 10 日的发布,以一个让任何平台团队都不好受的数字开场。在它的 2026 年 AI SDLC 研究中,94% 的工程负责人表示已经使用 AI,但只有 6% 表示有能力把它扩展到整个软件生命周期。几乎所有人都在试验 Agent,但几乎没有人能让 Agent 大规模运行又不把事情搞砸。这次发布的新 Jira 功能,正是试图用上下文与治理来补齐这个缺口,而不是塞进更多自主性。本文讲清它改了什么,以及如何在你的仓库里落地。

工程团队规划 Agent 工作流

从演示走向数百名工程师

一、没有上下文的 Agent 循环为何会失败

Atlassian 的表述很直接:当 Agent 不理解你的世界——你的架构、你的决策、你的规范,以及活在团队脑子里的组织记忆——它就会失败。一个只能读单个文件、却看不到周边多仓库上下文的编码 Agent,会自信地产出能编译却违反你团队约定的代码。Code Context 构建在 Atlassian 的 Teamwork Graph 之上,目标是让 Rovo 与编码 Agent 获得跨多仓库代码库的安全智能,让规划、分诊与根因定位都扎根于系统真实的运作方式。

# jira-work-item.yaml — an agent-ready work item with explicit acceptance criteria
key: APP-4821
type: Task
summary: "Add idempotency keys to POST /payments"
agent_eligible: true
context:
  repos: [payments-api, shared-lib]      # Code Context scopes what the agent can read
  standards: [api/error-handling.md, security/idempotency.md]
acceptance_criteria:
  - "Duplicate POSTs with the same Idempotency-Key return the original response"
  - "Keys expire after 24h and are stored in Redis, not Postgres"
  - "Unit tests cover the replay path and a concurrent-duplicate race"
definition_of_done:
  - "PR opened and linked to APP-4821"
  - "AI Review and CI both green"
# Only well-defined, unassigned items should be agent_eligible.
# Vague tickets are the #1 cause of agent loops that never converge.

二、让工作项「Agent 友好」

第一个实用的抓手不是模型,而是工单卫生。Jira Coding Agent 会挑走「定义清晰且未分配」的工作项,执行开发工作,并开出一个供人审查的 Pull Request。关键词是「定义清晰」。代码示例 1 展示了 Agent 友好工作项的形状:明确的验收标准、可读取的具体仓库、必须遵循的规范,以及完成定义。含混的工单是 Agent 循环永远不收敛的头号原因——因为 Agent 无法知道自己什么时候算做完。

// agent-context-controls.json — who can run, where, and what they may see
{
  "space": "ENG-PLATFORM",
  "agents": {
    "jira-coding-agent": {
      "allowed_repos": ["payments-api", "shared-lib"],
      "denied_paths": ["**/secrets/**", "**/.env*", "infra/prod/**"],
      "data_classification_ceiling": "internal",
      "requires_human_approval_for": ["dependency-add", "schema-migration", "infra-change"]
    },
    "rovo-research-agent": {
      "allowed_repos": ["*"],
      "read_only": true,
      "data_classification_ceiling": "confidential"
    }
  },
  "default": "deny"
}
// Agent Context Controls let platform teams decide exactly which agents
// operate in a space and what each one is allowed to read.

三、治理哪个 Agent 能碰什么

没有边界的自主性,就是你让 Agent 去改生产环境的 Terraform 的方式。Agent Context Controls 让平台团队决定哪些 Agent 可以在某个空间运行、以及每个 Agent 具体能看到什么,默认策略是拒绝。代码示例 2 是一份治理策略:允许读取的仓库列表、对密钥与生产基础设施的路径拒绝、数据密级上限,以及一份「永远需要人工审批」的变更清单。这就是「演示级 Agent」和「敢让数百名工程师共用的 Agent」之间的差别。

# standards/api-error-handling.md — the policy an AI Review actually enforces
rules:
  - id: ERR-1
    must: "All 4xx/5xx responses use the shared error envelope"
    pattern: 'res.status(4|5)\{2\}\).json\(\{ error: \{ code, message \} \}\)'
  - id: ERR-2
    must: "No raw stack traces returned to clients"
    forbid: "stackTrace"
  - id: IDEMP-1
    must: "Mutating endpoints accept an Idempotency-Key header"
    applies_to: ["POST", "PUT", "PATCH"]
severity:
  ERR-1: blocking
  ERR-2: blocking
  IDEMP-1: warning
# Store standards as files in the repo so every review is deterministic
# and every change to policy goes through a pull request.

四、把规范写成代码,让审查可复现

只有当 AI Review 执行的规则被写下来并纳入版本管理时,它才有用。代码示例 3 把规范变成一等工件:每条规则有 id、must 或 forbid 条款、匹配模式与严重级别。把规范存成仓库里的文件,意味着每次审查都可复现,每次策略变更都可经 Pull Request 审计。当审查者对某条阻断规则有异议时,这场争论只发生一次,在规范文件里,而不是在 Agent 开出的每一个 PR 里。

// mcp-agent.manifest.json — expose only the tools an agent needs
{
  "agent": "jira-coding-agent",
  "mcpServers": {
    "repo-tools": { "tools": ["read_file", "search_code", "open_pr"] },
    "test-runner": { "tools": ["run_unit_tests"] }
  },
  "token_budget": { "per_task_usd": 2.5, "per_task_minutes": 20 },
  "network": { "egress": "deny-by-default", "allow": ["registry.npmjs.org"] }
}
// Any agent works: Claude, Cursor, Codex, GitHub Copilot, or a custom MCP agent.
// Keep the manifest in version control next to the code it touches.

五、用清单收敛工具与预算

这些功能跨任意 Agent 生效:Claude、Cursor、Codex、GitHub Copilot,或你自己的 MCP Agent。这意味着你需要一个地方集中声明每个 Agent 能做什么。代码示例 4 是一份 Agent 清单,列出 MCP 工具、每次任务的 token 与时间预算,以及默认拒绝的出网策略。这正是成本控制与安全的交汇点:一个只能调用 read_file、search_code、open_pr 与 run_unit_tests、且上限两美元的 Agent,不可能悄悄做出灾难性的事。

# .github/workflows/agent-gate.yml — never merge agent output on trust alone
name: agent-gate
on: pull_request
jobs:
  gate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - run: npm ci && npm test
      - name: Standards check
        run: npx evergreen-standards lint --standards standards/
      - name: Require human approval from CODEOWNERS
        if: contains(github.event.pull_request.labels.*.name, 'agent-authored')
        run: |
          echo "Agent-authored PR must be approved by a CODEOWNER."
# The Jira Coding Agent opens the PR; a human still merges it.
# Keep that gate explicit so autonomy never equals unreviewed code.

六、把人工闸门显式保留下来

Atlassian 这套模型里最重要的设计决策,恰恰是它没有移除的那一步:Agent 开 PR,人来合并。代码示例 5 把这一点接进 CI——凡是被标记为 agent-authored 的 PR 都要求 CODEOWNER 审批,并先跑一遍规范检查与测试套件。agent loops、Standards 与 AI Review 处于私有早期访问,Code Context 正以公开测试向付费客户逐步开放,Atlassian 也将在 2026 年 9 月 22 日举办 State of AI SDLC 峰会。方向已经很清晰:赢家不是自主性最高的团队,而是循环治理得最好的团队。

开发者审查 Pull Request

人工把关始终在环内

软件交付看板

治理内建于看板

📌 常见问题 FAQ

Atlassian 在 2026 年 9 月 10 日发布了什么?

面向 AI 原生 SDLC 的受治理 Agent 循环:构建于 Teamwork Graph 之上的 Code Context、用于治理 Agent 运行范围与可见内容的 Agent Context Controls,以及 Standards 与 AI Review。Code Context 正以公开测试向付费客户逐步开放,Agent 循环、Standards 与 AI Review 处于私有早期访问。

94% 与 6% 这组数字是什么?

来自 Atlassian 的 2026 年 AI SDLC 研究:94% 的工程负责人正在使用 AI,但只有 6% 有能力将其扩展到整个软件生命周期。它量化了「演示」与「可信赖的生产级 Agent 工作流」之间的差距。

Jira Coding Agent 如何工作?

它会识别定义清晰、尚未分配的 Jira 工作项,执行被指派的开发工作,并创建供人审查的 Pull Request。它被设计为由 Agent Context Controls 治理,并由 AI Review 评估。

它支持哪些 Agent?

Atlassian 表示该工作流可用于 Claude、Cursor、Codex、GitHub Copilot 以及任何 MCP Agent,因此上下文与治理层是与模型无关的。

最有价值的第一步是什么?

把规范写成代码,并让工作项达到 Agent 友好标准。可复现的版本化规则加上明确的验收标准,能消除大部分歧义——而歧义正是 Agent 循环最常失败的地方。