@sakanano-moe/agenthelm 6.8.0 → 6.11.0-rc.1
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/package.json +1 -1
- package/runtime/index.json +6 -6
- package/runtime/plugins/agent-pack/.codex-plugin/plugin.json +1 -1
- package/runtime/plugins/agent-pack/hooks/hooks.json +32 -0
- package/runtime/plugins/agent-pack/plugin.json +1 -1
- package/runtime/plugins/agent-pack/references/local-only.md +126 -0
- package/runtime/plugins/agent-pack/references/nudge.en.md +58 -0
- package/runtime/plugins/agent-pack/references/nudge.md +58 -0
- package/runtime/plugins/agent-pack/runtime/agent_pack_nudge.py +573 -0
- package/runtime/plugins/agent-pack/runtime/agenthelm.py +228 -147
- package/runtime/plugins/agent-pack/runtime/agenthelm_runtime.py +64 -59
- package/runtime/plugins/agent-pack/runtime/i18n_agent_pack.py +78 -0
- package/runtime/plugins/agent-pack/runtime/local_only.py +1130 -0
- package/runtime/plugins/agent-pack/runtime/locale/en.json +385 -0
- package/runtime/plugins/agent-pack/runtime/mcp_server.py +25 -0
- package/runtime/plugins/agent-pack/runtime/nudge_text.py +107 -0
- package/runtime/plugins/agent-pack/skills/agent-pack/SKILL.md +9 -1
- package/runtime/plugins/agents-init/.codex-plugin/plugin.json +1 -1
- package/runtime/plugins/agents-init/content.json +4 -4
- package/runtime/plugins/agents-init/plugin.json +1 -1
- package/runtime/plugins/agents-init/skills/agents-init/AGENT.template.md +47 -0
- package/runtime/plugins/agents-init/skills/agents-init/SKILL.md +26 -1
- package/runtime/plugins/agents-init/skills/agents-init/project.schema.json +399 -80
- package/runtime/plugins/agents-init/skills/agents-init/scripts/adopt.py +596 -0
- package/runtime/plugins/agents-init/skills/agents-init/scripts/i18n_init.py +78 -0
- package/runtime/plugins/agents-init/skills/agents-init/scripts/init_project.py +210 -76
- package/runtime/plugins/agents-init/skills/agents-init/scripts/locale/en.json +210 -0
- package/runtime/plugins/agents-init/skills/agents-init/scripts/regions.py +99 -0
- package/runtime/plugins/agents-init/skills/agents-init/scripts/scaffold.py +210 -62
- package/runtime/plugins/agents-init/skills/agents-init/scripts/test_adopt.py +551 -0
- package/runtime/plugins/agents-init/skills/agents-init/scripts/test_init_project.py +46 -2
- package/runtime/plugins/agents-init/skills/agents-init/scripts/test_scaffold.py +4 -0
- package/runtime/plugins/agents-init/skills/agents-init/skeleton.json +2 -0
- package/runtime/plugins/agents-init/skills/agents-init/skill.json +1 -1
- package/runtime/plugins/opinion-manager/.codex-plugin/plugin.json +1 -1
- package/runtime/plugins/opinion-manager/plugin.json +1 -1
- package/runtime/plugins/opinion-manager/references/inbox.en.md +48 -0
- package/runtime/plugins/opinion-manager/references/inbox.md +48 -0
- package/runtime/plugins/opinion-manager/runtime/context.py +19 -18
- package/runtime/plugins/opinion-manager/runtime/i18n_opinion.py +78 -0
- package/runtime/plugins/opinion-manager/runtime/inbox.py +397 -0
- package/runtime/plugins/opinion-manager/runtime/inbox_text.py +101 -0
- package/runtime/plugins/opinion-manager/runtime/lifecycle.py +45 -44
- package/runtime/plugins/opinion-manager/runtime/locale/en.json +184 -0
- package/runtime/plugins/opinion-manager/runtime/opinion_manager.py +55 -50
- package/runtime/plugins/opinion-manager/runtime/versioned.py +84 -83
- package/runtime/plugins/opinion-manager/skills/opinion-manager/SKILL.md +15 -2
- package/runtime/plugins/project-orchestrator/.codex-plugin/plugin.json +1 -1
- package/runtime/plugins/project-orchestrator/content.json +30 -3
- package/runtime/plugins/project-orchestrator/plugin.json +1 -1
- package/runtime/plugins/project-orchestrator/references/case-workspaces.md +9 -1
- package/runtime/plugins/project-orchestrator/references/case.schema.json +1 -0
- package/runtime/plugins/project-orchestrator/references/sop-interview.md +83 -0
- package/runtime/plugins/project-orchestrator/references/sop.md +156 -0
- package/runtime/plugins/project-orchestrator/runtime/assets.py +52 -57
- package/runtime/plugins/project-orchestrator/runtime/case.py +139 -80
- package/runtime/plugins/project-orchestrator/runtime/case_structure.py +71 -0
- package/runtime/plugins/project-orchestrator/runtime/case_workspace.py +47 -46
- package/runtime/plugins/project-orchestrator/runtime/i18n_orchestrator.py +78 -0
- package/runtime/plugins/project-orchestrator/runtime/locale/en.json +1409 -0
- package/runtime/plugins/project-orchestrator/runtime/memory.py +44 -43
- package/runtime/plugins/project-orchestrator/runtime/private_paths.py +119 -0
- package/runtime/plugins/project-orchestrator/runtime/project_base.py +37 -19
- package/runtime/plugins/project-orchestrator/runtime/project_cli.py +222 -189
- package/runtime/plugins/project-orchestrator/runtime/project_demo.py +130 -48
- package/runtime/plugins/project-orchestrator/runtime/project_maintain.py +241 -204
- package/runtime/plugins/project-orchestrator/runtime/project_menu.py +145 -89
- package/runtime/plugins/project-orchestrator/runtime/project_real.py +184 -105
- package/runtime/plugins/project-orchestrator/runtime/project_write.py +58 -55
- package/runtime/plugins/project-orchestrator/runtime/sop.py +1670 -0
- package/runtime/plugins/project-orchestrator/runtime/sop_structure.py +226 -0
- package/runtime/plugins/project-orchestrator/runtime/wf.py +74 -70
- package/runtime/plugins/project-orchestrator/skills/project-orchestrator/SKILL.md +22 -0
- package/runtime/plugins/project-orchestrator/sop-templates/blank/SOP.en.md +57 -0
- package/runtime/plugins/project-orchestrator/sop-templates/blank/SOP.md +57 -0
- package/runtime/plugins/project-orchestrator/sop-templates/knowledge-digest/SOP.en.md +77 -0
- package/runtime/plugins/project-orchestrator/sop-templates/knowledge-digest/SOP.md +77 -0
- package/runtime/plugins/project-orchestrator/sop-templates/knowledge-digest/templates/digest.en.md +11 -0
- package/runtime/plugins/project-orchestrator/sop-templates/knowledge-digest/templates/digest.md +11 -0
- package/runtime/plugins/project-orchestrator/sop-templates/video-to-transcript/SOP.en.md +87 -0
- package/runtime/plugins/project-orchestrator/sop-templates/video-to-transcript/SOP.md +87 -0
- package/runtime/plugins/project-orchestrator/sop-templates/weekly-review/SOP.en.md +75 -0
- package/runtime/plugins/project-orchestrator/sop-templates/weekly-review/SOP.md +75 -0
- package/runtime/plugins/project-orchestrator/sop-templates/weekly-review/templates/review.en.md +11 -0
- package/runtime/plugins/project-orchestrator/sop-templates/weekly-review/templates/review.md +12 -0
- package/runtime/plugins/project-orchestrator/templates/CASE.en.md +39 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"packs": [
|
|
4
4
|
{
|
|
5
5
|
"id": "agents-init/project-contract",
|
|
6
|
-
"version": "1.
|
|
6
|
+
"version": "1.2.0",
|
|
7
7
|
"kind": "template",
|
|
8
8
|
"title": "项目契约模板",
|
|
9
9
|
"description": "初始化时渲染为项目入口文件的中文模板与根目录启动器;更新后由用户逐文件选择是否重新渲染。",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
],
|
|
21
21
|
"project_lock": "agenthelm",
|
|
22
22
|
"files": {
|
|
23
|
-
"skills/agents-init/AGENT.template.md": "
|
|
23
|
+
"skills/agents-init/AGENT.template.md": "780f32a1137044274ab9d8b8f736dc59875acfca58ff3963611182131398cbc1",
|
|
24
24
|
"skills/agents-init/launcher.sh": "cf27d6cca786905a192446ea4eefe5635942914c3358c78d12117af912107cad"
|
|
25
25
|
},
|
|
26
26
|
"materializes_from_profile": [
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
"id": "agents-init/project-skeleton",
|
|
32
|
-
"version": "1.
|
|
32
|
+
"version": "1.1.0",
|
|
33
33
|
"kind": "manifest",
|
|
34
34
|
"title": "期望骨架清单",
|
|
35
35
|
"description": "项目脚手架应有的文件、Profile 受检字段与不参与比较的字段(审计字段、Opinion 设置);agenthelm check 据此对比项目,不写入项目。",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"materializes": [],
|
|
40
40
|
"project_lock": "none",
|
|
41
41
|
"files": {
|
|
42
|
-
"skills/agents-init/skeleton.json": "
|
|
42
|
+
"skills/agents-init/skeleton.json": "4a7c2ccaed293bc63ae2f3b3e6c8fa5e906292462f81c41a0fc88fcb22a3eeeb"
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
3
|
"name": "agents-init",
|
|
4
|
-
"version": "6.
|
|
4
|
+
"version": "6.8.0",
|
|
5
5
|
"description": "Initialize or migrate an Agent project contract (AGENTS.md, Project Profile, root launcher); ships with project-orchestrator, agent-pack and opinion-manager.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "lc4t"
|
|
@@ -166,6 +166,7 @@ Agent Plugins 1.0 可移植文件直接位于 `.agents/`:`plugin.json`、`skil
|
|
|
166
166
|
- 构建:TODO
|
|
167
167
|
- 架构/文档:TODO
|
|
168
168
|
- 隐私或禁止路径:未声明
|
|
169
|
+
- 用户规则:若存在 `AGENT.USER.md`(接管项目时从原 `AGENTS.md` 移出的用户内容),与本文件一并遵循。
|
|
169
170
|
```
|
|
170
171
|
<!-- /agents-init:template -->
|
|
171
172
|
|
|
@@ -222,6 +223,18 @@ Agent Plugins 1.0 可移植文件直接位于 `.agents/`:`plugin.json`、`skil
|
|
|
222
223
|
|
|
223
224
|
### CLAUDE.md 与 AGENT.md
|
|
224
225
|
|
|
226
|
+
Claude Code 在工作目录及其上级目录没有任何 `CLAUDE.md` 时才直接读取 `AGENTS.md`(v2.1.277 起),两者并存时只读 `CLAUDE.md`;旧版本、禁用内置插件以及部分会话也读不到 `AGENTS.md`。因此 `CLAUDE.md` 保留为一行 `@AGENTS.md` 的导入桩,`AGENTS.md` 是唯一内容来源,Claude 专属指令写在导入行下面。`AGENT.md` 给其他客户端,用文字路由。
|
|
227
|
+
|
|
228
|
+
<!-- agents-init:template CLAUDE.md -->
|
|
229
|
+
```markdown
|
|
230
|
+
@AGENTS.md
|
|
231
|
+
|
|
232
|
+
## Claude Code
|
|
233
|
+
|
|
234
|
+
Claude Code 专属指令写在这里;项目通用规则放在 `AGENTS.md` 与 `AGENT.RULES.md`。
|
|
235
|
+
```
|
|
236
|
+
<!-- /agents-init:template -->
|
|
237
|
+
|
|
225
238
|
<!-- agents-init:template ROUTE.md -->
|
|
226
239
|
```markdown
|
|
227
240
|
# Agent 路由
|
|
@@ -230,6 +243,28 @@ Agent Plugins 1.0 可移植文件直接位于 `.agents/`:`plugin.json`、`skil
|
|
|
230
243
|
```
|
|
231
244
|
<!-- /agents-init:template -->
|
|
232
245
|
|
|
246
|
+
### 受管区块模板
|
|
247
|
+
|
|
248
|
+
接管已有文件时,工具只向用户的文件追加带标记的区块(见 `scripts/regions.py`),区块之外的内容保持原样。区块正文来自下面的模板,随内容包更新;区块内部被改过时不会被覆盖,由用户选择。
|
|
249
|
+
|
|
250
|
+
<!-- agents-init:template region/claude-import -->
|
|
251
|
+
```markdown
|
|
252
|
+
@AGENTS.md
|
|
253
|
+
```
|
|
254
|
+
<!-- /agents-init:template -->
|
|
255
|
+
|
|
256
|
+
<!-- agents-init:template region/agents-contract -->
|
|
257
|
+
```markdown
|
|
258
|
+
## agenthelm 项目契约
|
|
259
|
+
|
|
260
|
+
本项目由 agenthelm 管理项目生命周期。开始实质工作前:
|
|
261
|
+
|
|
262
|
+
1. 加载 `project-orchestrator`,读取 `.agents/moe.sakanano.agent-pack/project.json`(Project Profile)。
|
|
263
|
+
2. 项目专属约束见 `AGENT.RULES.md`;Plugin/Skill/MCP 管理交给 `agent-pack`;Opinion 交给 `opinion-manager`。
|
|
264
|
+
3. 本文件其余部分是接管项目前就有的用户规则,与上述契约一并遵循。
|
|
265
|
+
```
|
|
266
|
+
<!-- /agents-init:template -->
|
|
267
|
+
|
|
233
268
|
### 流程占位文件
|
|
234
269
|
|
|
235
270
|
`.agent-doc/plan.md`:
|
|
@@ -330,6 +365,18 @@ Agent Plugins 1.0 可移植文件直接位于 `.agents/`:`plugin.json`、`skil
|
|
|
330
365
|
5. 保持历史 Task/Case 与能力源完整,随后使用 `agent-pack` 盘点。
|
|
331
366
|
6. 只有得到明确授权,才能把个人 Opinion 内容移入私有权威源。
|
|
332
367
|
|
|
368
|
+
### 接管已有内容的目录
|
|
369
|
+
|
|
370
|
+
目录里已经有自己的文件时,原则是**控制新增,不追溯历史**:与骨架冲突的旧文件可以长期并存,不是阻塞项;只有用户显式选择,才改动已有文件,且先备份到项目外。
|
|
371
|
+
|
|
372
|
+
1. `--mode scan`(只读):列出路径碰撞、目录含义是否相同、`AGENTS.md` / `CLAUDE.md` 的状况,每项给出选项和推荐。
|
|
373
|
+
2. `--mode adopt`(默认预览,`--apply` 才写入):已有文件原样保留,只补缺失的骨架;保留下来且与模板不同的文件记入决定文件,`check` 不再追问。
|
|
374
|
+
3. 改动已有文件才需要显式选择,并带 `--recovery-dir`:`--agents-policy append|split|side-by-side`、`--claude-policy add-import`。`split` 用 `--route <章节序号>=<agents|rules|user|opinion|sop>` 指定每个章节的去向(建议来自关键词启发式,最终由用户决定;`opinion` / `sop` 先放进 `AGENT.USER.md` 并标注待交接)。
|
|
375
|
+
4. 目录含义冲突的用 `--case-root` / `--memory-root` 另设位置,已有的工作容器目录用 `--register-root` 只读登记。
|
|
376
|
+
5. 追加到用户文件里的内容是带标记的受管区块(见 `scripts/regions.py`),区块之外不动;区块内部被改过时升级不覆盖,用 `--mode region` 逐个 `--keep` / `--accept`。
|
|
377
|
+
|
|
378
|
+
历史内容什么时候迁移由用户决定:之后可以用 `--mode adopt` 以外的迁移工具逐步把旧内容整理进标准结构,不影响日常使用。
|
|
379
|
+
|
|
333
380
|
### 将既有项目整理为 Case 工作目录
|
|
334
381
|
|
|
335
382
|
1. 阅读同包 `project-orchestrator/references/case-workspaces.md`,明确 Case 的目标、子工作项与专属材料范围。
|
|
@@ -51,7 +51,9 @@ python3 scripts/init_project.py --project /path/to/project \
|
|
|
51
51
|
--stack python --runtime local --agent-cli codex --apply
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
**项目文件语言**:初始化前先问用户项目里的文件用中文还是英文(用户没有特别要求时取当前对话的语言),用 `--language zh|en` 传入;不传时取当前界面语言(`AGENTHELM_LANG`、系统 locale,最后英文)。它写进 Profile 的 `language`,决定新建 Case 的小节名与默认文字、README 追加的使用说明用哪种语言,随项目同步,与各人的命令行界面语言无关;缺省的旧项目保持中文。`--mode migrate` 缺省保持中文,要改传 `--language en`。
|
|
55
|
+
|
|
56
|
+
新项目默认在根目录生成启动器 `menu`(人不经过 Agent 打开项目菜单),并在 Profile 写入 `entry` 段;用户想用别的名字时传 `--entry-name <名称>`,不要启动器时传 `--no-entry`。README.md 不存在时新建并写入使用说明小节(中文项目叫「怎样使用」,英文项目叫 How to use),已存在的不改动。
|
|
55
57
|
|
|
56
58
|
为已初始化的项目补上入口只用 `--mode entry`,它只涉及 Profile 的 `entry` 段、启动器与内容锁;根目录已有同名文件时视为用户的文件,必须由用户选择 `--keep` 或 `--accept`(替换前备份到 `--recovery-dir`):
|
|
57
59
|
|
|
@@ -69,6 +71,21 @@ python3 scripts/init_project.py --mode migrate --project /path/to/project \
|
|
|
69
71
|
--replace AGENTS.md --recovery-dir /safe/recovery/example-v6 --apply
|
|
70
72
|
```
|
|
71
73
|
|
|
74
|
+
目录里已有自己的文件时(没有 Project Profile)先扫描,再接管。原则是控制新增、不追溯历史:与骨架冲突的旧文件可以长期并存,不是阻塞项;只有用户显式选择,才改动已有文件,且先备份到 `--recovery-dir`(项目外):
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
python3 scripts/init_project.py --project /path/to/project --mode scan # 只读:冲突、选项与推荐
|
|
78
|
+
python3 scripts/init_project.py --project /path/to/project --mode adopt \
|
|
79
|
+
--name example --project-type code --vcs github --stack python --runtime local --agent-cli codex # 预览
|
|
80
|
+
python3 scripts/init_project.py ... --mode adopt --agents-policy append --claude-policy add-import \
|
|
81
|
+
--recovery-dir /safe/recovery/example --apply # 改动已有文件须显式选择
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
- `AGENTS.md` 已有用户内容:`keep`(缺省,不动)、`append`(推荐:原文不动,追加带标记的项目契约区块)、`split`(`--route <章节序号>=<agents|rules|user|opinion|sop>`,未指定的章节留下)、`side-by-side`(原文整体移到 `AGENT.USER.md`)。章节去向建议只来自关键词启发式,逐段判断放在 session 里与用户确认,再把结果交给 `--route`;写入始终经由本命令。
|
|
85
|
+
- `CLAUDE.md` 已有内容但没有导入 `AGENTS.md`:Claude Code 两者并存时只读 `CLAUDE.md`,项目契约不会加载,推荐 `--claude-policy add-import`。
|
|
86
|
+
- `cases/`、`memory/` 被别的内容占用:并存,或 `--case-root` / `--memory-root` 另设位置;已有工作容器用 `--register-root` 只读登记。
|
|
87
|
+
- 追加进用户文件的是受管区块(`scripts/regions.py`):区块之外不动,区块内部被改过时升级不覆盖,用 `--mode region` 逐个 `--keep <文件>#<ID>` / `--accept <文件>#<ID>`。
|
|
88
|
+
|
|
72
89
|
已初始化的项目对照最新脚手架用 `--mode check`(只读);其余模式默认只预览,`--apply` 才写入,已有文件不被覆盖,替换前备份到 `--recovery-dir`:
|
|
73
90
|
|
|
74
91
|
```bash
|
|
@@ -107,6 +124,10 @@ cases/
|
|
|
107
124
|
└── .gitkeep
|
|
108
125
|
memory/
|
|
109
126
|
└── .gitkeep
|
|
127
|
+
sops/
|
|
128
|
+
└── .gitkeep
|
|
129
|
+
private/
|
|
130
|
+
└── .gitignore
|
|
110
131
|
docs/
|
|
111
132
|
├── refs/README.md
|
|
112
133
|
└── drafts/.gitkeep
|
|
@@ -114,6 +135,10 @@ docs/
|
|
|
114
135
|
|
|
115
136
|
`AGENTS.md` 是项目执行入口;`CLAUDE.md` 与 `AGENT.md` 是短路由文件;初始化产生的 `OPINION.md` 保持为空白配置入口。用户确认后由 `opinion-manager` 写入当前项目;用户内容禁止复制到公开模板、示例、测试或文档。
|
|
116
137
|
|
|
138
|
+
新项目的 Profile 声明 `privacy.forbidden_default_reads: ["private/"]` 并建立 `private/`(里面的 `.gitignore` 让内容默认不进入 git):私有信息放在这里,Agent 默认不读,读之前须经用户确认;用到它的 Case 标为 `sensitivity: private`。已有项目没有声明时 `check` 不要求 `private/`,不会多出差异。
|
|
139
|
+
|
|
140
|
+
新项目的 Profile 带 `sop: {"root": "sops"}`,并建立 `sops/`:用户自己的流程(SOP)放在这里,由 `project-orchestrator` 的 `runtime/sop.py` 管理。已有项目没有 `sop` 段时 `check` 不要求 `sops/`,想启用就在 Profile 加这一段并运行 `fix add-skeleton`。
|
|
141
|
+
|
|
117
142
|
新项目默认 `work.mode=case-workspace`。`--work-mode legacy` 可保留旧分类;既有项目迁移时未显式选择模式就保持现有模式。Case 数据迁移由 `project-orchestrator` 的已审阅映射工具执行,初始化器只更新骨架与 Profile。
|
|
118
143
|
|
|
119
144
|
## 迁移规则
|