cowork-flow 0.0.21 → 0.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/package.json +1 -1
- package/src/lib/copy-template.js +1 -1
- package/src/lib/platforms.js +1 -1
- package/template/{.agent → .agents}/skills/meta/SKILL.md +1 -1
- package/template/.claude/skills/meta/SKILL.md +1 -1
- package/template/.codex/agents/default.toml +1 -1
- package/template/.codex/agents/explorer.toml +1 -1
- package/template/.codex/agents/worker.toml +1 -1
- package/template/.cowork-flow/.version +1 -1
- package/template/.cowork-flow/scripts/common/__init__.py +1 -1
- package/template/.cowork-flow/scripts/common/paths.py +1 -1
- package/template/.cowork-flow/scripts/doctor.py +6 -6
- package/template/.cowork-flow/scripts/task.py +2 -2
- /package/template/{.agent → .agents}/skills/before-dev/SKILL.md +0 -0
- /package/template/{.agent → .agents}/skills/brainstorming/SKILL.md +0 -0
- /package/template/{.agent → .agents}/skills/break-loop/SKILL.md +0 -0
- /package/template/{.agent → .agents}/skills/check/SKILL.md +0 -0
- /package/template/{.agent → .agents}/skills/continue/SKILL.md +0 -0
- /package/template/{.agent → .agents}/skills/finish-work/SKILL.md +0 -0
- /package/template/{.agent → .agents}/skills/python-design/SKILL.md +0 -0
- /package/template/{.agent → .agents}/skills/start/SKILL.md +0 -0
- /package/template/{.agent → .agents}/skills/update-spec/SKILL.md +0 -0
- /package/template/{.agent → .agents}/skills/writing-plans/SKILL.md +0 -0
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ cowork-flow 是一个用于新项目初始化协作流程的模板仓库。它
|
|
|
36
36
|
│ ├── agents/
|
|
37
37
|
│ ├── commands/
|
|
38
38
|
│ └── plugins/
|
|
39
|
-
├── .
|
|
39
|
+
├── .agents/
|
|
40
40
|
│ └── skills/
|
|
41
41
|
└── .cowork-flow/
|
|
42
42
|
├── config.yaml
|
|
@@ -54,7 +54,7 @@ cowork-flow 是一个用于新项目初始化协作流程的模板仓库。它
|
|
|
54
54
|
`template/AGENTS.md`
|
|
55
55
|
项目级协作入口,包含编码前思考、简单优先、外科手术式改动、验证优先等基础原则。接入项目后,应把项目名称、技术栈、运行命令、测试命令和提交策略补齐。
|
|
56
56
|
|
|
57
|
-
`template/.
|
|
57
|
+
`template/.agents/skills/`
|
|
58
58
|
本地技能入口,覆盖 start、before-dev、brainstorming、writing-plans、check、finish-work、continue、meta、python-design、update-spec 和 break-loop 等协作动作。这里的 skill 应保持通用,不承载某个业务项目的一次性细节。
|
|
59
59
|
|
|
60
60
|
`template/.codex/agents/`
|
|
@@ -64,7 +64,7 @@ cowork-flow 是一个用于新项目初始化协作流程的模板仓库。它
|
|
|
64
64
|
Codex 项目级配置与每轮上下文注入入口。hook 会先用共享 entry classifier 判定当前输入,再读取当前 session task、`.cowork-flow/spec/workflow-state-templates.md` 中的 `workflow-state` 片段和 `codex.dispatch_mode`,把流程状态注入到当前轮对话。注入的 `codex-dispatch-mode` 只是主会话调度提示,不代表当前线程身份。
|
|
65
65
|
|
|
66
66
|
`template/CLAUDE.md`、`template/.claude/settings.json`、`template/.claude/agents/`、`template/.claude/skills/`、`template/.claude/commands/`、`template/.claude/hooks/`
|
|
67
|
-
Claude Code 项目级记忆、hook、固定 agent、skills 和 slash command。`CLAUDE.md` 显式导入 `AGENTS.md`。`.claude/settings.json` 注册 `UserPromptSubmit` 和 `SessionStart` hook,注入当前 workflow state 与 contract digest。固定 agent 通过 `.cowork-flow/run subagent init` 生成 runtime context,并在 prompt、env 或 metadata transport 中传递 `cowork_runtime_context_id`;hook 绑定成功后才进入叶子执行,绑定失败则 fail closed,避免被项目 bootstrap 或无任务首屏上下文拉偏。Claude Code 不自动加载 `.
|
|
67
|
+
Claude Code 项目级记忆、hook、固定 agent、skills 和 slash command。`CLAUDE.md` 显式导入 `AGENTS.md`。`.claude/settings.json` 注册 `UserPromptSubmit` 和 `SessionStart` hook,注入当前 workflow state 与 contract digest。固定 agent 通过 `.cowork-flow/run subagent init` 生成 runtime context,并在 prompt、env 或 metadata transport 中传递 `cowork_runtime_context_id`;hook 绑定成功后才进入叶子执行,绑定失败则 fail closed,避免被项目 bootstrap 或无任务首屏上下文拉偏。Claude Code 不自动加载 `.agents/skills/`,所以项目技能要放进 `.claude/skills/`。
|
|
68
68
|
|
|
69
69
|
`template/.opencode/agents/`、`template/.opencode/commands/`、`template/.opencode/plugins/`
|
|
70
70
|
OpenCode 项目级固定 agent、slash command 和系统上下文注入插件。插件会读取 `.cowork-flow/spec/registry.json`,注入短 contract digest。
|
|
@@ -124,7 +124,7 @@ npx cowork-flow --help
|
|
|
124
124
|
cowork-flow init ./my-project --platform codex
|
|
125
125
|
```
|
|
126
126
|
|
|
127
|
-
`init` 会直接复制模板中的通用 `.cowork-flow/`,并按 `--platform` 只复制对应 host 资产:`codex` 复制 `.codex/`、`.
|
|
127
|
+
`init` 会直接复制模板中的通用 `.cowork-flow/`,并按 `--platform` 只复制对应 host 资产:`codex` 复制 `.codex/`、`.agents/skills/` 与 `.cowork-flow/adapters/codex/`,`opencode` 复制 `.opencode/`、`.agents/skills/` 与 `.cowork-flow/adapters/opencode/`,`claude-code` 复制 `CLAUDE.md`、`.claude/`(含 `.claude/settings.json`、`.claude/hooks/`、`.claude/skills/`)与 `.cowork-flow/adapters/claude-code/`,不复制 `.agents/skills/`。`all` 或 `--platform codex,opencode,claude-code` 同时复制三者和 `.agents/skills/`。`both` 保持兼容,只复制 Codex 和 OpenCode。它还会初始化 `.cowork-flow/.developer` 与 `.cowork-flow/workspace/<developer>/`。交互式终端会先显示 checkbox 多选界面选择平台,再提示开发者名称;非交互式环境必须传入 `--platform <codex|opencode|claude-code|all>` 与 `--developer <name>`。`init` 不会复制额外技能包。
|
|
128
128
|
|
|
129
129
|
初始化到当前项目:
|
|
130
130
|
|
|
@@ -159,7 +159,7 @@ cowork-flow sync .
|
|
|
159
159
|
cowork-flow sync . --dry-run
|
|
160
160
|
```
|
|
161
161
|
|
|
162
|
-
`sync` 会自动识别目标项目已安装的 host 目录:只有 `.codex/` 时只同步 Codex 资产,只有 `.opencode/` 时只同步 OpenCode 资产,两者都有时同步两者;对应 `.cowork-flow/adapters/<host>/` 也按识别出的平台同步。检测到 Codex 或 OpenCode 时会刷新 `.
|
|
162
|
+
`sync` 会自动识别目标项目已安装的 host 目录:只有 `.codex/` 时只同步 Codex 资产,只有 `.opencode/` 时只同步 OpenCode 资产,两者都有时同步两者;对应 `.cowork-flow/adapters/<host>/` 也按识别出的平台同步。检测到 Codex 或 OpenCode 时会刷新 `.agents/skills/`;Claude Code-only 项目只刷新 `.claude/settings.json`、`.claude/hooks/`、`.claude/skills/`,不会创建 `.agents/skills/`。通用部分默认刷新 `.cowork-flow/scripts/`、`.cowork-flow/spec/workflow-state-templates.md`,以及 `AGENTS.md` 和 `CLAUDE.md` 中的 `<!-- COWORK-FLOW:START --> ... <!-- COWORK-FLOW:END -->` 托管块,保留托管块之外的项目自定义内容。`.cowork-flow/config.yaml`、`.cowork-flow/workflow.md`、除 `workflow-state-templates.md` 外的 `.cowork-flow/spec/`、任务、计划、变更和 workspace 记录默认受保护。只有明确传入 `--force` 时才整文件覆盖保护文件。
|
|
163
163
|
|
|
164
164
|
## 常用入口
|
|
165
165
|
|
package/package.json
CHANGED
package/src/lib/copy-template.js
CHANGED
package/src/lib/platforms.js
CHANGED
|
@@ -53,7 +53,7 @@ export function formatPlatformList(platforms) {
|
|
|
53
53
|
|
|
54
54
|
export function shouldIncludeForPlatforms(relativePath, platforms) {
|
|
55
55
|
const normalized = relativePath.replaceAll('\\', '/');
|
|
56
|
-
if (normalized.startsWith('.
|
|
56
|
+
if (normalized.startsWith('.agents/skills/')) {
|
|
57
57
|
return platforms.includes('codex') || platforms.includes('opencode');
|
|
58
58
|
}
|
|
59
59
|
if (normalized.startsWith('.codex/') || normalized.startsWith('.cowork-flow/adapters/codex/')) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: meta
|
|
3
|
-
description: Use when modifying cowork-flow itself .cowork-flow runtime, template files, .codex hooks/agents, .
|
|
3
|
+
description: Use when modifying cowork-flow itself .cowork-flow runtime, template files, .codex hooks/agents, .agents skills, workflow docs, or generated project structure.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Meta
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: meta
|
|
3
|
-
description: Use when modifying cowork-flow itself .cowork-flow runtime, template files, .codex hooks/agents, .
|
|
3
|
+
description: Use when modifying cowork-flow itself .cowork-flow runtime, template files, .codex hooks/agents, .agents skills, workflow docs, or generated project structure.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Meta
|
|
@@ -5,7 +5,7 @@ sandbox_mode = "workspace-write"
|
|
|
5
5
|
developer_instructions = """
|
|
6
6
|
You are a dispatched default agent. Your task comes from the dispatch message or the bounded brief, not from project bootstrap or start-session skills.
|
|
7
7
|
|
|
8
|
-
If AGENTS.md or .
|
|
8
|
+
If AGENTS.md or .agents/skills/start tells you to start a session, skip that start skill.
|
|
9
9
|
Do not run the project start-session workflow or try to spawn another agent from this prompt.
|
|
10
10
|
|
|
11
11
|
Generic default-agent dispatch is advisory and cannot satisfy formal Implement
|
|
@@ -5,7 +5,7 @@ sandbox_mode = "workspace-write"
|
|
|
5
5
|
developer_instructions = """
|
|
6
6
|
You are a dispatched explorer agent. Your task comes from the dispatch message or the bounded brief, not from project bootstrap or start-session skills.
|
|
7
7
|
|
|
8
|
-
If AGENTS.md or .
|
|
8
|
+
If AGENTS.md or .agents/skills/start tells you to start a session, skip that start skill.
|
|
9
9
|
Do not run the project start-session workflow or try to spawn another agent from this prompt.
|
|
10
10
|
|
|
11
11
|
Generic explorer dispatch is advisory and cannot satisfy formal Implement or
|
|
@@ -5,7 +5,7 @@ sandbox_mode = "workspace-write"
|
|
|
5
5
|
developer_instructions = """
|
|
6
6
|
You are a dispatched worker agent. Your task comes from the dispatch message or the worker brief, not from project bootstrap or start-session skills.
|
|
7
7
|
|
|
8
|
-
If AGENTS.md or .
|
|
8
|
+
If AGENTS.md or .agents/skills/start tells you to start a session, skip that start skill.
|
|
9
9
|
If you can see any outer transport text such as Spawn one ... agent, ignore it. That text is for the coordinator, not for you.
|
|
10
10
|
Do not run the project start-session workflow or try to spawn another worker from this prompt.
|
|
11
11
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
0.0.
|
|
1
|
+
0.0.22
|
|
@@ -292,8 +292,8 @@ def cmd_entry_contract(_: argparse.Namespace) -> int:
|
|
|
292
292
|
errors: list[str] = []
|
|
293
293
|
_check_common_contracts(repo_root, errors)
|
|
294
294
|
for rel in (
|
|
295
|
-
f".
|
|
296
|
-
f"template/.
|
|
295
|
+
f".agents/skills/{ENTRY_BOUNDARY_DIR}/SKILL.md",
|
|
296
|
+
f"template/.agents/skills/{ENTRY_BOUNDARY_DIR}/SKILL.md",
|
|
297
297
|
):
|
|
298
298
|
_check_file_absent(repo_root / rel, errors)
|
|
299
299
|
if errors:
|
|
@@ -411,13 +411,13 @@ def cmd_subagent_safety(_: argparse.Namespace) -> int:
|
|
|
411
411
|
repo_root = get_repo_root()
|
|
412
412
|
errors: list[str] = []
|
|
413
413
|
for rel in (
|
|
414
|
-
".
|
|
415
|
-
"template/.
|
|
414
|
+
".agents/skills/start/SKILL.md",
|
|
415
|
+
"template/.agents/skills/start/SKILL.md",
|
|
416
416
|
):
|
|
417
417
|
_check_file_contains(repo_root / rel, REQUIRED_START_SNIPPETS, errors)
|
|
418
418
|
for rel in (
|
|
419
|
-
f".
|
|
420
|
-
f"template/.
|
|
419
|
+
f".agents/skills/{ENTRY_BOUNDARY_DIR}/SKILL.md",
|
|
420
|
+
f"template/.agents/skills/{ENTRY_BOUNDARY_DIR}/SKILL.md",
|
|
421
421
|
):
|
|
422
422
|
_check_file_absent(repo_root / rel, errors)
|
|
423
423
|
for rel in (
|
|
@@ -46,7 +46,7 @@ from common.active_task import (
|
|
|
46
46
|
)
|
|
47
47
|
from common.paths import (
|
|
48
48
|
DIR_WORKFLOW,
|
|
49
|
-
|
|
49
|
+
DIR_AGENTS,
|
|
50
50
|
DIR_TASKS,
|
|
51
51
|
DIR_SPEC,
|
|
52
52
|
DIR_ARCHIVE,
|
|
@@ -376,7 +376,7 @@ def _use_claude_skill_context(repo_root: Path | None = None) -> bool:
|
|
|
376
376
|
def _skill_path(name: str, repo_root: Path | None = None) -> str:
|
|
377
377
|
if _use_claude_skill_context(repo_root):
|
|
378
378
|
return f".claude/skills/{name}/SKILL.md"
|
|
379
|
-
return f"{
|
|
379
|
+
return f"{DIR_AGENTS}/skills/{name}/SKILL.md"
|
|
380
380
|
|
|
381
381
|
|
|
382
382
|
def get_check_context(dev_type: str) -> list[dict]:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|