BILINGUAL EDITION · 中英双语 · v0.5 WORKING DRAFT

一个动作,所有界面。

One action. Every interface.

影核(ActionParity)是面向 AI 时代的动作同源开放标准。让 GUI、CLI、MCP、API 与测试共同调用一个无界面的 Action Core

ActionParity is an open standard for the AI era. GUI, CLI, MCP, API, automation, and tests all invoke the same headless Action Core.

25/25测试通过 / tests passing
6试点动作 / pilot actions
4二元规则 / binary rules
ONE COREActionCore
GUI
CLI
MCP
API
Tests
HUMAN NATIVEAGENT NATIVE

行为不该长在界面里。

Behavior should not live inside the interface.

当业务逻辑分别写进按钮、命令和 API,多一个界面就多一份实现;当软件只能通过屏幕操作,Agent 就只能猜坐标、读截图,并把业务正确性寄托在像素上。

When business logic is repeated in buttons, commands, and APIs, every new interface creates another implementation. When software can only be driven through a screen, agents must guess coordinates and place correctness in pixels.

INTERFACE-BOUND

过去 / Before

  • GUI独立实现 / duplicate
  • CLI独立实现 / duplicate
  • API独立实现 / duplicate
行为漂移 · 重复修复 · DRIFT · REWORK
ACTION-NATIVE

影核 / ActionParity

GUICLIMCPONE ACTION CORE
一次实现 · 统一状态 · IMPLEMENT ONCE

影子里,不许有这四样东西。

Four things a shadow may never contain.

符合与不符合是二元判断。分数可以帮助审计,但不能替代架构事实。

Conformance is binary. Scores may support an audit, but they cannot replace an architectural fact.

01

没有第二份业务实现

No duplicate implementation

按钮、命令和工具都调用同一个 Action Core;修一次,所有入口一起生效。

Buttons, commands, and tools invoke the same Action Core. Fix it once, and every interface changes together.

02

没有界面独占的策略

No interface-only policy

确认、权限与风险控制必须在动作核心强制,不能只靠前端弹窗。

Confirmation, authorization, and risk controls are enforced below every interface, not only in a dialog.

03

没有独立的状态真相源

No shadow-owned truth

界面可以缓存状态,但不能拥有状态;所有入口最终观察同一份事实。

A shadow may cache state, but it cannot own it. Every interface ultimately observes the same facts.

04

没有只能从界面到达的动作

No GUI-only business action

每个有意义的 GUI 动作都保留一条非视觉机器入口,让 Agent 不必猜像素。

Every meaningful GUI action has a non-visual machine path, so agents never have to guess at pixels.

界面仍然原生,行为只有一份。

Native interfaces. One behavior.

GUI 不需要每次启动 CLI 子进程。不同界面可以直接引用同一个动作库,也可以通过本地 IPC 调用同一个常驻运行时。关键不是传输方式,而是所有入口抵达同一个规范实现。

A GUI does not need to spawn a CLI process. Interfaces may share a library or call one runtime over local IPC. The transport is not the invariant; reaching the same canonical implementation is.

  • 稳定 Action ID 与 Schema / Stable IDs and schemas
  • 统一结果、状态和事件 / Shared results, state, and events
  • 结构化机器入口 / Structured machine access
  • 核心层安全与审计 / Core-enforced safety and audit
action-parity.json
{
  "id": "gateway.start",
  "input_schema": { "type": "object" },
  "effects": {
    "class": "write",
    "risk": "medium",
    "confirmation": "conditional"
  },
  "execution": {
    "headless": true,
    "timeout_ms": 30000
  },
  "bindings": [
    { "surface": "desktop" },
    { "surface": "cli" },
    { "surface": "mcp" }
  ]
}
3 shadows → 1 canonical action

规范不是口号,它可以被检查。

A standard that can be checked.

规范、Schema、验证器与示例全部开放,任何团队都能免费自测。

The specification, schema, validator, and examples are open for every team to use.

$node bin/action-parity.mjs validate action-parity.json
VALIDViolations  0Unproven   0

软件迎来了一种新的用户:AI Agent。

过去几十年,应用默认所有有意义的操作都会经过屏幕、鼠标和人的手。AI 改变了这个前提,但大多数软件仍把能力锁在像素后面。

Software has a new kind of user.

For decades, applications assumed that every meaningful action would pass through a screen, a pointer, and a human hand. AI agents changed that assumption, but most software still hides its capabilities behind pixels.

我们相信 / We believe
  1. 01
    中文

    一核多影。行为只有一个落脚处,GUI、CLI、TUI、MCP、API 都是它投在各平台上的影子——影子有各自的形状,但没有自己的行为。

    ENGLISH

    One core, many shadows.

    There is one place where a behavior lives. GUI, CLI, TUI, MCP, API, and automation are shadows it casts on different platforms — each shaped by its platform's conventions, none of them holding a behavior of its own.

  2. 02
    中文

    一个行为写一遍,多一个平台只多一个影子。不是每个平台把每个行为重写一遍。AI 让「复制一份实现」变得极便宜,也让「三份已经跑偏」变得看不见。

    ENGLISH

    A behavior should be written once, and a platform should cost one shadow.

    A feature duplicated across interfaces will drift, and AI-assisted development makes duplication cheap while making drift invisible. Adding a behavior should cost one implementation; adding a platform should cost one shadow, not one reimplementation per behavior.

  3. 03
    中文

    人和 Agent 都应该获得语义级访问能力。

    ENGLISH

    Humans and agents deserve semantic access.

    Humans need understandable interfaces. Agents need discoverable actions, typed inputs, structured results, and stable state. Neither should receive a weaker version of the product.

  4. 04
    中文

    Computer Use 是兼容层,不应是新软件的地基。

    ENGLISH

    Computer Use is a compatibility layer, not the foundation.

    Screenshots, coordinates, and input injection remain valuable for old software and final visual verification. New software should expose meaning directly.

  5. 05
    中文

    符合与否是能与不能,不是百分比。有分子的数字就会被优化——把错在哪、在哪一行写出来,比给一个分数有用。

    ENGLISH

    Conformance is a yes or a no, not a percentage.

    Claims such as “AI-ready” are not enough, so applications publish manifests, mappings, exceptions, and tests. But a shadow either holds behavior of its own or it does not, and that question has no score. A number with a numerator will be optimized; write down what is wrong and where.

  6. 06
    中文

    权限、确认、审计和回滚必须位于界面之下。

    ENGLISH

    Safety belongs below the interface.

    Permissions, confirmation, risk, audit, cancellation, and rollback cannot live only in a prompt or dialog.

  7. 07
    中文

    动作核心正确,不能代替真实 GUI 测试。

    ENGLISH

    Real GUI testing still matters.

    A correct Action Core does not prove that a button is reachable, a label is readable, or a layout works. Semantic and visual interface tests remain part of conformance.

  8. 08
    中文

    开放标准会创造更大的商业市场。

    ENGLISH

    Open standards create larger markets.

    The specification should be freely implementable. Companies should compete on tools, reliability, integration, support, and trust—not private access to the definition of compatibility.

我们的承诺只有一句 / Our promise is simple一个动作,所有界面。One action. Every interface.

无论一个人点击、一个脚本调用、一个 Agent 执行,还是一个测试验证,他们操作的都应该是同一个软件。

When a person clicks, a script calls, an agent invokes, or a test verifies, they should be operating the same application.

GitHub 原文 / Source manifesto ↗

不用推倒重写,从一个纵切动作开始。

Start with one vertical action.

选择一个低风险、可观察结果的动作,把它从界面事件中抽出来,再让 GUI 与机器入口共同调用。第一条证据链跑通后,再扩展到更多动作和平台。

Choose one low-risk action with an observable result, extract it from the interface event, and let both GUI and machine paths invoke it. Expand only after the first evidence chain works.

采用指南 / Adoption guide
  1. 01
    盘点动作 / Inventory

    区分业务动作与纯界面交互。Separate business behavior from presentation.

  2. 02
    抽出核心 / Extract

    建立稳定 ID、Schema 与无界面实现。Create stable IDs, schemas, and a headless implementation.

  3. 03
    连接影子 / Bind

    让 GUI、CLI、MCP 走同一个注册点。Connect every interface to one registry.

  4. 04
    留下证据 / Prove

    验证绑定、状态、安全与真实界面。Test bindings, state, safety, and the real GUI.