From 2cc1be0ab49a20095f8af08e07a12fc5b39974e9 Mon Sep 17 00:00:00 2001 From: Tim Wong <280945586+TimWongUp@users.noreply.github.com> Date: Sat, 10 Oct 2026 22:46:19 +0800 Subject: [PATCH] =?UTF-8?q?refactor(agents):=20=E7=A7=BB=E9=99=A4=20protot?= =?UTF-8?q?ype-worker=20=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 保留独立的 prototype Skill,并同步更新安装校验、架构说明和 README。 --- AGENTS.md | 6 +++--- README.md | 6 +++--- README.zh-CN.md | 6 +++--- agents/prototype-worker.toml | 12 ------------ docs/architecture.md | 9 +++++---- scripts/validate.py | 8 +------- 6 files changed, 15 insertions(+), 32 deletions(-) delete mode 100644 agents/prototype-worker.toml diff --git a/AGENTS.md b/AGENTS.md index ea5a3ea..80a132f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,9 +4,9 @@ - `README.md` and `README.zh-CN.md` are human-facing. Read them only when changing public usage or installation behavior. - Runtime behavior is defined by `SKILL.md`, `skills/`, `agents/`, `references/`, and `scripts/`. -- Bundled method Skills and the Agent profiles that load them are one portable runtime contract; - installation and validation must add or remove both sides together. Self-contained Agent profiles - have no bundled Skill half. +- Skills and Agent profiles are managed independently. An Agent profile may load a bundled Skill, + and a bundled Skill may remain available without a dedicated Agent profile; keep each source + inventory and its installed projection in sync. - This repository is the source of truth for portable runtime behavior. Installed Skills, Agents, and global rules are deployment artifacts; task-package language, machine-specific routing, and unrelated Hook registration stay outside the repository. - The target local platforms are macOS and native Windows. Claim support only after both CI diff --git a/README.md b/README.md index c8f8ac1..030293c 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ The repository is the only source of truth for its portable Skills, Agents, inst ## Who it is for -This release targets Codex on macOS and native Windows for reusable exploration, research, implementation, prototype, debugging, and focused-review agents. A release candidate is supported only after both platform CI jobs pass. +This release targets Codex on macOS and native Windows for reusable exploration, research, implementation, debugging, and focused-review agents, plus a standalone prototype Skill. A release candidate is supported only after both platform CI jobs pass. Installation uses one deterministic, dry-run-first Python implementation on both platforms. An Agent may operate it after reading `INSTALL.md`, but it does not reconstruct the filesystem projection itself. @@ -136,9 +136,9 @@ worker. Use risk-appropriate reviewers, and do not take over silently if a worke - A root-task orchestration Skill that owns delegation briefs, local write leases, Worktree Root coordination, acceptance, and reusable Agent execution. - An explicit, current-root-only manager-only branch with adaptive strong delegation and no silent code-work takeover. - An independent `codex-review-gate` Skill that defines the PR/merge R0–R3 route and authorizes only its selected read-only Reviewers; the review-owning root handles classification and authorized remediation; the merge-owning root retains integration. -- The complete `diagnosing-bugs` and `prototype` method Skills used by their corresponding writable Agents. +- The complete `diagnosing-bugs` method Skill used by its writable Agent, plus the standalone `prototype` Skill. - Read-only explorer, official-reference research, web research, expert, and focused-review agents. -- Writable implementation, debugging, and prototype workers governed by a per-root single-writer lease. +- Writable implementation and debugging workers governed by a per-root single-writer lease. - No project Hook; tool schemas own call mechanics, the Skill owns orchestration policy, and Agent profiles own derived-agent scope. - One small, managed global `AGENTS.md` block that independently routes subagent execution and code-change Review without replacing personal instructions. - A local, optional model-routing file. No model IDs are pinned in the repository. diff --git a/README.zh-CN.md b/README.zh-CN.md index e26aafc..2835ec4 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -92,7 +92,7 @@ python3 scripts/install.py --uninstall --apply ## 适合谁 -当前版本以 macOS 和原生 Windows 上的 Codex 为目标,提供可复用的代码探索、资料研究、正式实现、原型、疑难 Bug 和专项 Review 子代理。候选版本只有在两个平台的 CI 都通过后才声明受支持。 +当前版本以 macOS 和原生 Windows 上的 Codex 为目标,提供可复用的代码探索、资料研究、正式实现、疑难 Bug 和专项 Review 子代理,并保留独立的 prototype Skill。候选版本只有在两个平台的 CI 都通过后才声明受支持。 安装在两个平台上共用一个确定性、默认 dry run 的 Python 实现。Agent 可以在完整阅读 `INSTALL.md` 后代为运行,但不再自行重建文件投影。 @@ -117,9 +117,9 @@ python3 scripts/install.py --uninstall --apply - 负责委派简报、本地写入租约、Worktree Root 协调、验收和通用 Agent 执行的根任务编排 Skill。 - 一个显式、仅当前根任务生效的 manager-only 分支,提供自适应强委派并禁止静默接管代码工作。 - 独立定义合并前 R0–R3 路由、且只授权所选只读 Reviewer 的 `codex-review-gate` Skill;分级、整改和集成由合并负责人执行。 -- `diagnosing-bugs` 和 `prototype` 两份由对应可写 Agent 使用的完整方法 Skill。 +- 由可写 Agent 使用的完整 `diagnosing-bugs` 方法 Skill,以及独立可用的 `prototype` Skill。 - 只读代码探索、官方资料研究、Web 研究、专家和专项 Review Agent。 -- 受每个根任务单 Writer 租约约束的实现、Bug 诊断和原型 Worker。 +- 受每个根任务单 Writer 租约约束的实现与 Bug 诊断 Worker。 - 不安装项目 Hook;工具 schema 负责调用机制,Skill 负责编排策略,Agent 配置负责派生代理职责边界。 - 一个精简的全局 `AGENTS.md` 受控块:分别路由子代理执行与代码变更 Review,同时不替换个人指令。 - 可选的本地模型路由文件;仓库不固定任何模型 ID。 diff --git a/agents/prototype-worker.toml b/agents/prototype-worker.toml deleted file mode 100644 index 41e2ce1..0000000 --- a/agents/prototype-worker.toml +++ /dev/null @@ -1,12 +0,0 @@ -name = "prototype-worker" -description = "Writable prototype worker for throwaway UI or logic that answers one explicit design question." -sandbox_mode = "workspace-write" - -developer_instructions = """ -You are a derived, non-orchestrating agent, including in panel or hybrid work. Do not load or execute the codex-orchestration Skill, call collaboration tools, or create descendants. -The main agent selected you as this root task's active writer for one bounded prototype outcome. The task may be natural prose; labels and fixed fields are not required. Recover ordinary context from the repository, supplied references, and environment before asking for more information. Honor explicit exclusions and preserve pre-existing work. Before starting, load the `prototype` Skill and follow its prototyping method within the assigned outcome; leave its Git, issue, publishing, and other external-state capture steps to the main agent. - -Use the smallest runnable throwaway code that answers the stated question, including necessary adjacent files. Keep prototype state visible and avoid turning it into production architecture. If the work would materially expand the requested outcome, conflict with existing changes, or require new authority, return a checkpoint. Return a natural concise handoff covering the answer, changed files, run instructions, validation, limitations, which conclusions are worth preserving, and any closeout the main agent must perform. - -Keep test changes proportional to the assigned change's material risks. Add or update a test only when it supplies unique confidence at a correct observable seam and would fail for a credible regression; prefer extending an existing test at the lowest-cost appropriate layer. Use behavior rather than implementation order, private internals, mutable prose, or copies of production logic as the assertion boundary; count static analysis, schema validation, and stronger existing tests as protection when they already prove the property. Consolidate or remove a test within the assigned scope only when it adds no unique behavior or failure protection and equivalent protection remains; keep compatibility coverage only for current contracts, and never optimize for test count or a coverage percentage. -""" diff --git a/docs/architecture.md b/docs/architecture.md index fba7c2d..ba0a532 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -39,10 +39,11 @@ of installation. Codex plugin packaging is not the suite authority because plugins do not replace the separate custom-Agent projection. -The `skills/diagnosing-bugs` and `skills/prototype` directories contain the complete method Skills -loaded by their corresponding writable workers. The read-only `simplicity-reviewer` embeds its -focused review method directly in its Agent profile. Agent profiles retain authority and -orchestration boundaries; bundled method Skills provide the detailed writable task workflows. +The `skills/diagnosing-bugs` directory contains the complete method Skill loaded by its writable +worker. The `skills/prototype` Skill remains independently installable without a dedicated Agent +profile. The read-only `simplicity-reviewer` embeds its focused review method directly in its Agent +profile. Agent profiles retain authority and orchestration boundaries; bundled Skills provide +task workflows when useful. Every Codex task is a root for its own agent tree. Derived agents remain non-orchestrators, while a Worktree Root is an independent task and session with the same local orchestration authority as any diff --git a/scripts/validate.py b/scripts/validate.py index 96f791c..ba42f00 100644 --- a/scripts/validate.py +++ b/scripts/validate.py @@ -19,7 +19,7 @@ "prototype": ROOT / "skills" / "prototype", } THIRD_PARTY_SKILLS = {"diagnosing-bugs", "prototype"} -WRITERS = {"worker", "diagnosing-bugs-worker", "prototype-worker"} +WRITERS = {"worker", "diagnosing-bugs-worker"} REVIEWERS = { "architecture-reviewer", "correctness-reviewer", @@ -1081,12 +1081,6 @@ def validate_source() -> list[str]: "diagnosing-bugs-worker does not load its method Skill", failures, ) - require( - "load the `prototype` Skill" - in (ROOT / "agents" / "prototype-worker.toml").read_text(encoding="utf-8"), - "prototype-worker does not load its method Skill", - failures, - ) simplicity_reviewer = profile_instructions.get("simplicity-reviewer", "") simplicity_order = [ simplicity_reviewer.find(phrase) for phrase in SIMPLICITY_REVIEW_ORDER_PHRASES