auriga-cli 1.27.0 → 1.29.0

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 CHANGED
@@ -10,7 +10,7 @@ This repo itself is a fully configured harness project. You can clone it to see
10
10
 
11
11
  | Module | Description |
12
12
  |---|---|
13
- | **Workflow** | `CLAUDE.md` auriga workflow: requirement clarification -> TDD -> Review, Harness principles, Subagent usage guide |
13
+ | **Workflow** | `AGENTS.md` auriga workflow: requirement clarification -> TDD -> Review, Harness principles, Subagent usage guide |
14
14
  | **Skills** | External development process skills — systematic-debugging, TDD, verification, planning, playwright (spec authoring and architecture design ship as the `spec-design` and `arch-design` skills inside the `auriga-workflow` plugin) |
15
15
  | **Recommended Skills** | Optional utility skills (e.g. `codex-agent`, `claude-code-agent`) you can add on top of the workflow skills |
16
16
  | **Plugins** | Recommended Claude Code and Codex plugins — skill-creator, claude-md-management, playground, codex, auriga-workflow, auriga-notify, session-instructions-loader |
@@ -40,9 +40,9 @@ The leading `-y` belongs to `npx` (it auto-confirms package installation), **not
40
40
  Non-interactive install commands:
41
41
 
42
42
  ```bash
43
- npx -y auriga-cli install --preset # curated workflow core: CLAUDE.md/AGENTS.md
43
+ npx -y auriga-cli install --preset # curated workflow core: AGENTS.md/CLAUDE.md
44
44
  # + workflow skills + auriga-workflow plugin
45
- # (defaults: scope user, agent both, lang en)
45
+ # (defaults: scope user, agent both, lang zh-CN)
46
46
  npx -y auriga-cli install --all # everything: workflow + skills + recommended + plugins
47
47
  npx -y auriga-cli install recommended # just the opt-in utility skills
48
48
  npx -y auriga-cli install plugins --agent codex --plugin session-instructions-loader
@@ -50,9 +50,9 @@ npx -y auriga-cli install <type> [--flags] # one of: workflow | skills | recom
50
50
  npx -y auriga-cli --help # full catalog + flags
51
51
  ```
52
52
 
53
- `--preset` is atomic — it cannot be combined with a `<type>` or any filter flag, but it accepts `--scope`, `--agent`, and `--lang` (preset defaults: `user` / `both` / `en`, which differ from the per-category defaults).
53
+ `--preset` is atomic — it cannot be combined with a `<type>` or any filter flag, but it accepts `--scope`, `--agent`, and `--lang` (preset defaults: `user` / `both` / `zh-CN`, which differ from the per-category defaults).
54
54
 
55
- Exit codes: `0` success, `1` fatal (precheck / parse / fetch), `2` partial success — `stderr` lists per-category `[OK]/[FAIL]` and a `Retry:` hint. After install, reload the Claude Code or Codex session so the new `CLAUDE.md` / skills / plugins / hook-plugin registrations are picked up.
55
+ Exit codes: `0` success, `1` fatal (precheck / parse / fetch), `2` partial success — `stderr` lists per-category `[OK]/[FAIL]` and a `Retry:` hint. After install, reload the Claude Code or Codex session so the new `AGENTS.md` / skills / plugins / hook-plugin registrations are picked up.
56
56
 
57
57
  ### Web UI (opt-in)
58
58
 
@@ -76,20 +76,21 @@ Interactive menu — select what to install:
76
76
 
77
77
  ```
78
78
  ? Select what to install:
79
- ◉ Recommended preset — CLAUDE.md/AGENTS.md + workflow skills + auriga-workflow plugin
79
+ ◉ Recommended preset — AGENTS.md/CLAUDE.md + workflow skills + auriga-workflow plugin
80
80
  ◯ Optional skills — opt-in utility skills (claude-code-agent, codex-agent...)
81
81
  ◯ Other plugins — everything except auriga-workflow (auriga-notify, skill-creator, codex...)
82
82
  ```
83
83
 
84
- The **Recommended preset** is checked by default and installs silently with the preset defaults (scope `user`, agent `both`, language `en`) — to fine-tune those, use the non-interactive `install --preset` flags. The other two items drill down into a per-item sub-selection. Plugin installation also asks which runtime to target: Claude Code, Codex, or both.
84
+ The **Recommended preset** is checked by default and installs silently with the preset defaults (scope `user`, agent `both`, language `zh-CN`) — to fine-tune those, use the non-interactive `install --preset` flags. The other two items drill down into a per-item sub-selection. Plugin installation also asks which runtime to target: Claude Code, Codex, or both.
85
85
 
86
86
  ## Module Details
87
87
 
88
88
  ### Workflow
89
89
 
90
- Copies `CLAUDE.md` to the target project and creates an `AGENTS.md` symlink for compatibility with different Agent frameworks. Supports English and Chinese you choose during installation.
90
+ Installs `AGENTS.md` into the target project and creates a `CLAUDE.md` symlink for Claude Code compatibility. Chinese is the default; English remains available with `--lang en`.
91
91
 
92
- - Backs up existing `CLAUDE.md` before overwriting
92
+ - **Extensible and upgradable**: the auriga workflow ships inside a managed block delimited by `<!-- AURIGA:WORKFLOW:v1 START/END -->` markers. Add your project-specific instructions *after* the END marker — re-running install upgrades the managed block in place and leaves your section untouched.
93
+ - A pre-marker `CLAUDE.md` (installed by an older version) is safely migrated into the new `AGENTS.md` primary shape on the next install, with the old file backed up to `CLAUDE.md.bak`. A foreign `AGENTS.md` or `CLAUDE.md` from another tool is kept as your user section below a fresh managed block.
93
94
  - Covers: requirement clarification, TDD, code review, branch workflow, subagent orchestration
94
95
 
95
96
  ### Skills
@@ -133,7 +134,7 @@ npx -y auriga-cli install plugins --agent codex --plugin session-instructions-lo
133
134
  | Plugin | Runtime | Description |
134
135
  |---|---|---|
135
136
  | skill-creator | Claude Code | Create and manage custom skills |
136
- | claude-md-management | Claude Code / Codex | Audit and improve CLAUDE.md |
137
+ | claude-md-management | Claude Code / Codex | Audit and improve AGENTS.md / CLAUDE.md |
137
138
  | playground | Claude Code / Codex | Build interactive HTML playgrounds |
138
139
  | codex | Claude Code | Codex cross-model collaboration |
139
140
  | auriga-workflow | Claude Code / Codex | The auriga workflow plugin — workflow skills plus the git lifecycle hooks that enforce them. Skills: `incremental-impl`, `test-designer`, `spec-design`, `arch-design`, `code-simplify`, `session-compound`, `goalify` (plans an autonomous goal and dispatches it via the built-in `/goal` command), `deep-review` (multi-dimensional PR review orchestrator — parallel per-dimension reviewers synthesized into an actionable punch list), `reviewer-creator` (scaffolds project-level custom reviewers under `docs/rules/review/`), and `git-workflow` (git lifecycle skill). Hooks: `commit-reminder` (PostToolUse on file edits — `Edit` / `Write` / `MultiEdit` in Claude Code, `apply_patch` in Codex — nudges to commit at the next semantic boundary when uncommitted diff vs `HEAD` exceeds 200 lines or 8 files), `pr-create-guard` (PostToolUse on `gh pr create` → injects a PR-body snapshot for five-element self-verification and flags non-Conventional-Commits titles), `pr-ready-guard` (PreToolUse on `gh pr ready` and non-draft `gh pr create` → blocks on stray planning docs, unfinalized active specs under `docs/specs/`, or unpushed commits), and `pr-merge-guard` (PreToolUse on `gh pr merge` → blocks while the PR body's Acceptance criteria section still has unchecked checklist items). The two PostToolUse hooks reach full Claude Code / Codex parity; Codex currently fails open on `pr-ready-guard`'s PreToolUse `additionalContext` informational path (block path identical). Installed by default through the plugin path. |
package/README.zh-CN.md CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
  | 模块 | 说明 |
12
12
  |---|---|
13
- | **Workflow** | `CLAUDE.md` 里的 auriga 工作流:需求澄清 → TDD → Review,Harness 原则,Subagent 使用指南 |
13
+ | **Workflow** | `AGENTS.md` 里的 auriga 工作流:需求澄清 → TDD → Review,Harness 原则,Subagent 使用指南 |
14
14
  | **Skills** | 外部开发流程 skills —— systematic-debugging、TDD、verification、planning、playwright(spec 撰写与架构设计由 `auriga-workflow` 插件内的 `spec-design`、`arch-design` skill 提供)|
15
15
  | **Recommended Skills** | 可选的工具类 skills(如 `codex-agent`、`claude-code-agent`),在 workflow skills 之外按需追加 |
16
16
  | **Plugins** | 推荐的 Claude Code 和 Codex 插件 —— skill-creator、claude-md-management、playground、codex、auriga-workflow、auriga-notify、session-instructions-loader |
@@ -40,9 +40,9 @@ npx -y auriga-cli guide
40
40
  非交互安装命令:
41
41
 
42
42
  ```bash
43
- npx -y auriga-cli install --preset # 工作流核心:CLAUDE.md/AGENTS.md
43
+ npx -y auriga-cli install --preset # 工作流核心:AGENTS.md/CLAUDE.md
44
44
  # + 工作流 skill + auriga-workflow 插件
45
- # (默认:scope user、agent both、lang en)
45
+ # (默认:scope user、agent both、lang zh-CN)
46
46
  npx -y auriga-cli install --all # 全装:workflow + skills + recommended + plugins
47
47
  npx -y auriga-cli install recommended # 只装可选工具 skills
48
48
  npx -y auriga-cli install plugins --agent codex --plugin session-instructions-loader
@@ -50,9 +50,9 @@ npx -y auriga-cli install <type> [--flags] # 单类:workflow | skills | recomm
50
50
  npx -y auriga-cli --help # 完整 catalog + flag 说明
51
51
  ```
52
52
 
53
- `--preset` 是原子标志 —— 不能与 `<type>` 或任何过滤标志同时使用,但可带 `--scope`、`--agent`、`--lang`(预设默认 `user` / `both` / `en`,与分类安装的默认不同)。
53
+ `--preset` 是原子标志 —— 不能与 `<type>` 或任何过滤标志同时使用,但可带 `--scope`、`--agent`、`--lang`(预设默认 `user` / `both` / `zh-CN`,与分类安装的默认不同)。
54
54
 
55
- 退出码:`0` 成功;`1` 致命错误(前置检查 / 解析 / 拉取失败);`2` 部分成功——`stderr` 会列出逐类 `[OK]/[FAIL]` 和 `Retry:` 提示。装完后请重启 Claude Code 或 Codex 会话,让新的 `CLAUDE.md` / skills / plugins / hook 插件注册生效。
55
+ 退出码:`0` 成功;`1` 致命错误(前置检查 / 解析 / 拉取失败);`2` 部分成功——`stderr` 会列出逐类 `[OK]/[FAIL]` 和 `Retry:` 提示。装完后请重启 Claude Code 或 Codex 会话,让新的 `AGENTS.md` / skills / plugins / hook 插件注册生效。
56
56
 
57
57
  ### Web UI(可选)
58
58
 
@@ -76,20 +76,21 @@ npx auriga-cli
76
76
 
77
77
  ```
78
78
  ? Select what to install:
79
- ◉ Recommended preset — CLAUDE.md/AGENTS.md + workflow skills + auriga-workflow plugin
79
+ ◉ Recommended preset — AGENTS.md/CLAUDE.md + workflow skills + auriga-workflow plugin
80
80
  ◯ Optional skills — opt-in utility skills (claude-code-agent, codex-agent...)
81
81
  ◯ Other plugins — everything except auriga-workflow (auriga-notify, skill-creator, codex...)
82
82
  ```
83
83
 
84
- **Recommended preset** 默认勾选,以预设默认值静默安装(scope `user`、agent `both`、语言 `en`)—— 要精调这些参数,改用非交互的 `install --preset` 标志。另两项会下钻到逐项子勾选。安装插件时还会先选择目标运行时:Claude Code、Codex 或两者都装。
84
+ **Recommended preset** 默认勾选,以预设默认值静默安装(scope `user`、agent `both`、语言 `zh-CN`)—— 要精调这些参数,改用非交互的 `install --preset` 标志。另两项会下钻到逐项子勾选。安装插件时还会先选择目标运行时:Claude Code、Codex 或两者都装。
85
85
 
86
86
  ## 模块详情
87
87
 
88
88
  ### Workflow
89
89
 
90
- 将 `CLAUDE.md` 复制到目标项目,并创建 `AGENTS.md` 软链接以兼容不同 Agent 框架。支持中英文版本,安装时可选择。
90
+ 将 `AGENTS.md` 安装到目标项目,并创建 `CLAUDE.md` 软链接以兼容 Claude Code。默认安装中文版本,英文可通过 `--lang en` 显式选择。
91
91
 
92
- - 目标已有 `CLAUDE.md` 时会自动备份后覆盖
92
+ - **可扩展、可升级**:auriga 工作流被一对 `<!-- AURIGA:WORKFLOW:v1 START/END -->` 标记包成「受管区块」。把你的工程专属规则写在 END 标记**之后**——再次安装只就地升级受管区块,你的内容原样保留。
93
+ - 旧版本装下的、无标记的 `CLAUDE.md` 会在下次安装时安全迁移到新的 `AGENTS.md` 主文件形态,旧文件备份到 `CLAUDE.md.bak`。别的工具生成的 `AGENTS.md` 或 `CLAUDE.md` 会作为用户区保留在全新受管区块下方。
93
94
  - 涵盖:需求澄清、TDD、代码 Review、分支工作流、Subagent 编排
94
95
 
95
96
  ### Skills
@@ -133,7 +134,7 @@ npx -y auriga-cli install plugins --agent codex --plugin session-instructions-lo
133
134
  | 插件 | 运行时 | 说明 |
134
135
  |---|---|---|
135
136
  | skill-creator | Claude Code | 创建和管理自定义 skills |
136
- | claude-md-management | Claude Code / Codex | 审计和改进 CLAUDE.md |
137
+ | claude-md-management | Claude Code / Codex | 审计和改进 AGENTS.md / CLAUDE.md |
137
138
  | playground | Claude Code / Codex | 构建交互式 HTML playground |
138
139
  | codex | Claude Code | Codex 跨模型协作 |
139
140
  | auriga-workflow | Claude Code / Codex | auriga 工作流插件 —— 工作流 skill 加上强制执行工作流的 git 生命周期 hook。Skills:`incremental-impl`、`test-designer`、`spec-design`、`arch-design`、`code-simplify`、`session-compound`、`goalify`(plan 出自驱 goal 并通过内置 `/goal` 命令分发执行)、`deep-review`(多维度 PR review 编排器——并行派发各维度 reviewer,汇总成可执行的 punch list)、`reviewer-creator`(在 `docs/rules/review/` 下生成项目级自定义 reviewer)、`git-workflow`(git 生命周期 skill)。Hooks:`commit-reminder`(文件编辑的 PostToolUse —— Claude Code 匹配 `Edit` / `Write` / `MultiEdit`,Codex 匹配 `apply_patch` —— 未提交 diff 对比 `HEAD` 超过 200 行或 8 个文件时,提醒在下一个语义边界 commit)、`pr-create-guard`(`gh pr create` 的 PostToolUse —— 注入 PR body 快照供五要素自检,并对不符合 Conventional Commits 的标题提示)、`pr-ready-guard`(`gh pr ready` 与非 draft `gh pr create` 的 PreToolUse —— 拦截游离规划文档、`docs/specs/` 内未结案的活跃 spec、未 push commits)、`pr-merge-guard`(`gh pr merge` 的 PreToolUse —— PR body 的验收标准章节仍有未勾选清单项时拦截合并)。两个 PostToolUse hook 在 Claude Code / Codex 上完全对齐;Codex 仅对 `pr-ready-guard` 的 PreToolUse `additionalContext` 信息路径 fail-open(block 路径两边一致)。默认通过插件路径安装。 |
@@ -71,11 +71,11 @@ export interface PluginState {
71
71
  }
72
72
  export interface StateWarning {
73
73
  code: "claude-cli-missing" | "codex-cli-missing" | "marketplace-offline" | "claude-code-not-installed" | "settings-unreadable" | "skill-malformed"
74
- /** Project-scope CLAUDE.md (or the user-scope fallback when scanning
75
- * user scope) is present but has no recognizable `# auriga Workflow (vX.Y.Z)`
76
- * header. The row reports `not-installed`; install will back up the
77
- * existing file to `CLAUDE.md.bak` and write ours. */
78
- | "workflow-foreign-claudemd";
74
+ /** Workflow instruction file is present but has no recognizable
75
+ * `# auriga Workflow (vX.Y.Z)` header. The row reports `not-installed`;
76
+ * install keeps the existing content in the user region before writing
77
+ * ours. */
78
+ | "workflow-foreign-agentsmd" | "workflow-foreign-claudemd";
79
79
  message: string;
80
80
  }
81
81
  export type ApplyCategory = "workflow" | "skill" | "recommended-skill" | "plugin"
@@ -93,10 +93,10 @@ export type ApplyAction = "install" | "uninstall";
93
93
  */
94
94
  export type ApplyScope = "project" | "user";
95
95
  /**
96
- * Workflow CLAUDE.md language variant.
96
+ * Workflow AGENTS.md language variant.
97
97
  *
98
- * - "en": English CLAUDE.md (the default).
99
- * - "zh-CN": Simplified Chinese CLAUDE.md (the localized variant).
98
+ * - "zh-CN": Simplified Chinese AGENTS.md (the default).
99
+ * - "en": English AGENTS.en.md.
100
100
  *
101
101
  * Only meaningful for `category === "workflow"`; rejected for other
102
102
  * categories so the API surface stays explicit.
@@ -120,7 +120,7 @@ export interface ApplyItemRef {
120
120
  * server rejects this field for category="workflow" because workflow
121
121
  * has no scope concept (it's a single file at the project root). */
122
122
  scope?: ApplyScope;
123
- /** Workflow CLAUDE.md language variant. Omitted = "en" (back-compat
123
+ /** Workflow AGENTS.md language variant. Omitted = "zh-CN"
124
124
  * default). The server accepts this field only for category="workflow"
125
125
  * and category="preset" (the preset installs the workflow doc). */
126
126
  lang?: ApplyLang;
@@ -11,7 +11,7 @@ export interface ApplyHandlerContext {
11
11
  * and the handler iterates the list, installing to each agent in turn.
12
12
  * Names not in the map default to `["claude"]` (existing CLI default). */
13
13
  pluginAgentsByName: Map<string, ("claude" | "codex")[]>;
14
- /** Workflow language for install. Defaults to "en". */
14
+ /** Workflow language for install. Defaults to "zh-CN". */
15
15
  workflowLang?: ApplyLang;
16
16
  }
17
17
  export declare function buildDefaultApplyHandlers(ctx: ApplyHandlerContext): ApplyHandlers;
@@ -23,6 +23,7 @@
23
23
  import { installPlugins, uninstallPlugin, } from "./plugins.js";
24
24
  import { installPreset } from "./preset.js";
25
25
  import { installRecommendedSkills, installSkills, uninstallSkill, } from "./skills.js";
26
+ import { DEFAULT_WORKFLOW_LANG } from "./utils.js";
26
27
  import { installWorkflow, uninstallWorkflow } from "./workflow.js";
27
28
  const ALL_ACTIONS = new Set([
28
29
  "install",
@@ -37,7 +38,7 @@ function assertAction(action) {
37
38
  }
38
39
  export function buildDefaultApplyHandlers(ctx) {
39
40
  const { packageRoot, cwd, pluginAgentsByName } = ctx;
40
- const lang = ctx.workflowLang ?? "en";
41
+ const lang = ctx.workflowLang ?? DEFAULT_WORKFLOW_LANG;
41
42
  const workflow = async (action, _name, { onLog, lang: requestedLang }) => {
42
43
  assertAction(action);
43
44
  // Per-item lang overrides the ctx default (the UI now drives this via
@@ -155,7 +156,7 @@ export function buildDefaultApplyHandlers(ctx) {
155
156
  // The preset is a single apply item that drives the whole installPreset
156
157
  // orchestration. scope / agent / lang come from the Dashboard's preset
157
158
  // controls; omitted values fall back to the preset defaults
158
- // (user / both / en). Uninstall is not a preset operation.
159
+ // (user / both / zh-CN). Uninstall is not a preset operation.
159
160
  const preset = async (action, _name, { onLog, scope, lang: requestedLang, agent }) => {
160
161
  assertAction(action);
161
162
  if (action !== "install") {
package/dist/catalog.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-05-16T06:04:29.959Z",
2
+ "generatedAt": "2026-05-16T13:16:49.448Z",
3
3
  "workflowSkills": [
4
4
  {
5
5
  "name": "planning-with-files",
@@ -78,7 +78,7 @@
78
78
  },
79
79
  {
80
80
  "name": "claude-md-management",
81
- "description": "(Claude/Codex) Audit and improve CLAUDE.md files",
81
+ "description": "(Claude/Codex) Audit and improve AGENTS.md / CLAUDE.md files",
82
82
  "agents": [
83
83
  "claude",
84
84
  "codex"
package/dist/cli.d.ts CHANGED
@@ -49,7 +49,7 @@ type LegacyMenuValue = "preset" | "recommended" | "plugins";
49
49
  *
50
50
  * Workflow + Skills are absorbed by the「推荐预设」item.
51
51
  * The preset label spells out the silent defaults (scope user / agent
52
- * both / lang en) so a TTY user knows what they're getting — fine-tuning
52
+ * both / lang zh-CN) so a TTY user knows what they're getting — fine-tuning
53
53
  * those goes through the non-interactive `install --preset` flags.
54
54
  */
55
55
  export declare const LEGACY_MENU_CHOICES: ReadonlyArray<{
package/dist/cli.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import fs from "node:fs";
3
3
  import path from "node:path";
4
4
  import { fileURLToPath } from "node:url";
5
- import { exec, fetchContentRoot, getPackageRoot, isNonInteractive, LANGUAGES, log, readPackageVersion, } from "./utils.js";
5
+ import { exec, DEFAULT_WORKFLOW_LANG, fetchContentRoot, getPackageRoot, isNonInteractive, LANGUAGES, log, readPackageVersion, } from "./utils.js";
6
6
  import { installWorkflow } from "./workflow.js";
7
7
  import { installSkills, installRecommendedSkills } from "./skills.js";
8
8
  import { installPlugins } from "./plugins.js";
@@ -11,7 +11,7 @@ import { loadCatalog } from "./catalog.js";
11
11
  import { renderHelp, renderTypeHelp } from "./help.js";
12
12
  import { renderGuide } from "./guide.js";
13
13
  import { CATEGORY_NAMES } from "./types.js";
14
- const RELOAD_REMINDER = "\n⚠ Reload your Claude Code or Codex session to pick up the new harness (CLAUDE.md / skills / plugins are loaded at session startup).\n";
14
+ const RELOAD_REMINDER = "\n⚠ Reload your Claude Code or Codex session to pick up the new harness (AGENTS.md / skills / plugins are loaded at session startup).\n";
15
15
  const CATEGORY_SET = new Set(CATEGORY_NAMES);
16
16
  const TYPE_FOR_FILTER = {
17
17
  "--skill": "skills",
@@ -259,7 +259,7 @@ function validateInstall(out, filterFlag) {
259
259
  // (workflow doc + workflow skills + auriga-workflow plugin) and cannot
260
260
  // combine with a <type>, a sub-item filter, or --all. Unlike a category
261
261
  // install it DOES accept --scope / --agent / --lang as preset modifiers
262
- // (the preset defaults differ: user / both / en). --cwd is not a preset
262
+ // (the preset defaults differ: user / both / zh-CN). --cwd is not a preset
263
263
  // modifier — the workflow doc always lands in the current directory.
264
264
  if (out.preset) {
265
265
  if (out.all) {
@@ -475,7 +475,7 @@ async function runInstall(p) {
475
475
  * succeed → 0; any step fails → 2 with per-step status on stderr.
476
476
  *
477
477
  * The preset defaults differ from a category install — scope=user,
478
- * agent=both, lang=en — and are resolved here before handing off, so
478
+ * agent=both, lang=zh-CN — and are resolved here before handing off, so
479
479
  * `installPreset` itself stays default-free (the TUI / Web UI callers
480
480
  * resolve their own defaults the same way).
481
481
  */
@@ -489,7 +489,7 @@ async function runPreset(p) {
489
489
  interactive: false,
490
490
  scope: p.scope ?? "user",
491
491
  agent,
492
- lang: p.lang ?? "en",
492
+ lang: p.lang ?? DEFAULT_WORKFLOW_LANG,
493
493
  });
494
494
  for (const r of results) {
495
495
  if (r.ok) {
@@ -507,7 +507,14 @@ async function runPreset(p) {
507
507
  // The preset is one atomic "install the right defaults" action — the
508
508
  // retry is the whole command again, not a per-category fan-out like
509
509
  // runAll's hint.
510
- process.stderr.write("\nRetry:\n npx -y auriga-cli install --preset\n");
510
+ const retryArgs = ["install", "--preset"];
511
+ if (p.scope)
512
+ retryArgs.push("--scope", p.scope);
513
+ if (p.agent)
514
+ retryArgs.push("--agent", p.agent);
515
+ if (p.lang)
516
+ retryArgs.push("--lang", p.lang);
517
+ process.stderr.write(`\nRetry:\n npx -y auriga-cli ${retryArgs.join(" ")}\n`);
511
518
  if (failed.length < results.length) {
512
519
  process.stderr.write(RELOAD_REMINDER);
513
520
  }
@@ -619,7 +626,7 @@ async function runAll(p) {
619
626
  process.stderr.write(` npx -y auriga-cli install ${s.category}${suffix}\n`);
620
627
  }
621
628
  // Partial success still installed assets that need a session reload
622
- // (CLAUDE.md / skills / plugins load at startup). Without this hint
629
+ // (AGENTS.md / skills / plugins load at startup). Without this hint
623
630
  // the user may retry the failed category and act on stale state.
624
631
  if (failed.length < status.length) {
625
632
  process.stderr.write(RELOAD_REMINDER);
@@ -686,7 +693,7 @@ async function runUi(p, version) {
686
693
  // - tarballRoot: where `dist/catalog.json` + the bundled DEV ui/dist live.
687
694
  // Always read from the installed npm package; can't be fetched because
688
695
  // dist/ is built artifact, not git content.
689
- // - contentRoot: where the runtime install recipes live (CLAUDE.md,
696
+ // - contentRoot: where the runtime install recipes live (AGENTS.md,
690
697
  // marketplace manifests, extra_plugin_configs.json, skills-lock.json).
691
698
  // These files are
692
699
  // NOT in the npm tarball — the `files` allowlist only ships `dist/*`
@@ -750,7 +757,7 @@ async function runUi(p, version) {
750
757
  return 1;
751
758
  }
752
759
  const applyCatalog = {
753
- // Workflow is a singleton (one CLAUDE.md per project); we pick the
760
+ // Workflow is a singleton (one AGENTS.md per project); we pick the
754
761
  // sentinel name "workflow" to match what the Web UI's Dashboard sends
755
762
  // and to remain semantically self-describing. The handler ignores the
756
763
  // name argument either way.
@@ -767,7 +774,7 @@ async function runUi(p, version) {
767
774
  pluginAgentsByName.set(name, def.agents);
768
775
  }
769
776
  const applyHandlers = buildDefaultApplyHandlers({
770
- // contentRoot: install handlers read CLAUDE.md, marketplace manifests,
777
+ // contentRoot: install handlers read AGENTS.md, marketplace manifests,
771
778
  // extra_plugin_configs.json, and skills-lock.json — all CONTENT_FILES.
772
779
  // Routing them at tarballRoot fails ENOENT for npm-installed users.
773
780
  packageRoot: contentRoot,
@@ -793,7 +800,7 @@ async function runUi(p, version) {
793
800
  cwd,
794
801
  // server reads dist/catalog.json (tarball-shipped) via
795
802
  // buildScanCatalog on each /api/state call; install-time content
796
- // (marketplace manifests, extra plugin config, CLAUDE.md, …) was already injected
803
+ // (marketplace manifests, extra plugin config, AGENTS.md, …) was already injected
797
804
  // into applyHandlers above with contentRoot.
798
805
  packageRoot: tarballRoot,
799
806
  heartbeatTimeoutMs: UI_HEARTBEAT_TIMEOUT_MS,
@@ -878,13 +885,13 @@ function highlight(text) {
878
885
  *
879
886
  * Workflow + Skills are absorbed by the「推荐预设」item.
880
887
  * The preset label spells out the silent defaults (scope user / agent
881
- * both / lang en) so a TTY user knows what they're getting — fine-tuning
888
+ * both / lang zh-CN) so a TTY user knows what they're getting — fine-tuning
882
889
  * those goes through the non-interactive `install --preset` flags.
883
890
  */
884
891
  export const LEGACY_MENU_CHOICES = [
885
892
  {
886
893
  value: "preset",
887
- name: "Recommended preset — CLAUDE.md/AGENTS.md + workflow skills + auriga-workflow plugin (scope user · agent both · lang en)",
894
+ name: "Recommended preset — AGENTS.md/CLAUDE.md + workflow skills + auriga-workflow plugin (scope user · agent both · lang zh-CN)",
888
895
  checked: true,
889
896
  },
890
897
  {
@@ -928,7 +935,7 @@ async function runLegacyMenu() {
928
935
  return 0;
929
936
  }
930
937
  // 「推荐预设」silently uses the preset defaults (scope user / agent
931
- // both / lang en) — it does not prompt for them. The other two items
938
+ // both / lang zh-CN) — it does not prompt for them. The other two items
932
939
  // drill down into their category's per-item sub-selection as before.
933
940
  if (picks.includes("preset")) {
934
941
  console.log("\n--- Recommended preset ---\n");
@@ -936,7 +943,7 @@ async function runLegacyMenu() {
936
943
  interactive: true,
937
944
  scope: "user",
938
945
  agent: "both",
939
- lang: "en",
946
+ lang: DEFAULT_WORKFLOW_LANG,
940
947
  });
941
948
  }
942
949
  if (picks.includes("recommended")) {
package/dist/guide.js CHANGED
@@ -20,7 +20,7 @@ export function renderGuide(opts) {
20
20
  return `${h(`# auriga-cli bootstrap SOP (v${opts.version})`)}
21
21
 
22
22
  This guide walks an Agent through installing the auriga harness
23
- (CLAUDE.md + skills + plugins) into the current repository.
23
+ (AGENTS.md + skills + plugins) into the current repository.
24
24
 
25
25
  Run each step in order. If any step fails with exit 1, stop and report.
26
26
  If exit 2, see stderr for per-category status and follow the "Retry"
@@ -61,9 +61,10 @@ Per-type detail (flags + only that category's catalog slice):
61
61
 
62
62
  ${h("## Step 3 — Install")}
63
63
 
64
- Recommended — the curated workflow preset (CLAUDE.md/AGENTS.md +
64
+ Recommended — the curated workflow preset (AGENTS.md/CLAUDE.md +
65
65
  workflow skills + the auriga-workflow plugin). Defaults: scope user,
66
- agent both (Claude Code + Codex), lang en:
66
+ agent both (Claude Code + Codex), lang zh-CN. Scope applies to skills
67
+ and plugins; the workflow doc always writes to the current project:
67
68
  ${cmd("npx -y auriga-cli install --preset")}
68
69
 
69
70
  Everything — workflow + skills + recommended skills + default plugins:
@@ -96,7 +97,7 @@ Exit codes:
96
97
 
97
98
  ${h("## Step 4 — Reload session (REQUIRED when installed non-interactively)")}
98
99
 
99
- ${warn("⚠")} CLAUDE.md, .agents/skills/, and plugin enablement /
100
+ ${warn("⚠")} AGENTS.md, .agents/skills/, and plugin enablement /
100
101
  registrations are loaded at session startup. If you ran
101
102
  \`npx -y auriga-cli install\` inside an existing Claude Code or Codex session
102
103
  (e.g., \`claude -p\` / \`claude -p --worktree\` / \`codex exec\`), the current session
@@ -110,8 +111,8 @@ Action:
110
111
  ${h("## Step 5 — Verify install")}
111
112
 
112
113
  Expected artifacts/checks:
113
- - CLAUDE.md (workflow manifesto)
114
- - AGENTS.md -> CLAUDE.md (symlink)
114
+ - AGENTS.md (workflow manifesto, Chinese by default)
115
+ - CLAUDE.md -> AGENTS.md (Claude Code compatibility symlink)
115
116
  - .agents/skills/<name>/ (one per installed skill)
116
117
  - claude plugins list (shows Claude plugins, if Claude plugins selected)
117
118
  - ~/.codex/config.toml (Codex plugin enablement, if Codex plugins selected)
package/dist/help.js CHANGED
@@ -13,7 +13,8 @@ USAGE
13
13
  npx auriga-cli install --preset [--scope <s>] [--agent <a>] [--lang <code>]
14
14
  curated default set: workflow doc
15
15
  + workflow skills + auriga-workflow plugin
16
- (defaults: scope user, agent both, lang en)
16
+ (defaults: scope user, agent both, lang zh-CN)
17
+ scope applies to skills/plugins; workflow writes current project
17
18
  npx auriga-cli install --all [--scope <s>] [--agent <a>]
18
19
  everything: workflow + skills
19
20
  + recommended + plugins
@@ -28,13 +29,13 @@ USAGE
28
29
  npx -y auriga-cli install --preset
29
30
 
30
31
  TYPES (exactly one with <type> form)
31
- workflow CLAUDE.md + AGENTS.md (workflow manifesto)
32
+ workflow AGENTS.md + CLAUDE.md symlink (workflow manifesto)
32
33
  skills Default-on workflow skills (listed below)
33
34
  recommended Opt-in utility skills (listed below)
34
35
  plugins Claude Code and Codex plugins (listed below)
35
36
 
36
37
  TYPE-SPECIFIC FLAGS
37
- workflow: --lang <code> default en; available: en, zh-CN
38
+ workflow: --lang <code> default zh-CN; available: zh-CN, en
38
39
  --cwd <dir> default current working directory
39
40
  skills: --skill <names...> space-separated; '*' = all
40
41
  --scope <project|user> default project
@@ -80,11 +81,11 @@ USAGE
80
81
  npx auriga-cli install workflow [--lang <code>] [--cwd <dir>]
81
82
 
82
83
  FLAGS
83
- --lang <code> default en; available: en, zh-CN
84
+ --lang <code> default zh-CN; available: zh-CN, en
84
85
  --cwd <dir> default current working directory
85
86
 
86
87
  NOTE
87
- workflow has no --scope flag (single file + AGENTS.md symlink).
88
+ workflow has no --scope flag (AGENTS.md primary + CLAUDE.md symlink).
88
89
  `;
89
90
  case "skills":
90
91
  return `${header}
package/dist/preset.d.ts CHANGED
@@ -6,7 +6,7 @@ import type { PluginAgent } from "./utils.js";
6
6
  */
7
7
  export declare const PRESET_PLUGINS: readonly ["auriga-workflow"];
8
8
  /**
9
- * installPreset 的输入。三个默认值(scope=user / agent=both / lang=en)
9
+ * installPreset 的输入。三个默认值(scope=user / agent=both / lang=zh-CN)
10
10
  * 与分类安装不同,由调用方负责落定后再传入 —— 预设的默认不在本函数内
11
11
  * 兜底,使「默认值是什么」对每个调用端都显式可见。
12
12
  */
package/dist/preset.js CHANGED
@@ -3,7 +3,7 @@
3
3
  // installPreset —— 「推荐预设安装」的单一编排入口。
4
4
  //
5
5
  // 预设由三部分组成,按下面的顺序安装:
6
- // 1. workflow 文档 (CLAUDE.md + AGENTS.md)
6
+ // 1. workflow 文档 (AGENTS.md + CLAUDE.md 兼容软链)
7
7
  // 2. 工作流 skill (WORKFLOW_SKILLS 全集 —— installSkills 自身已限定)
8
8
  // 3. auriga-workflow 插件
9
9
  //
package/dist/server.d.ts CHANGED
@@ -5,8 +5,8 @@ export interface ApplyHandlerOptions {
5
5
  * translate into the per-installer flag (`--scope project|user`). The
6
6
  * workflow handler ignores it (workflow has no scope concept). */
7
7
  scope?: "project" | "user";
8
- /** Workflow CLAUDE.md language variant. Meaningful for the workflow and
9
- * preset handlers; other handlers ignore it. Omitted = "en". */
8
+ /** Workflow AGENTS.md language variant. Meaningful for the workflow and
9
+ * preset handlers; other handlers ignore it. Omitted = "zh-CN". */
10
10
  lang?: "en" | "zh-CN";
11
11
  /** Preset install runtime. Only meaningful for the preset handler;
12
12
  * other handlers ignore it. Omitted = "both". */
package/dist/skills.js CHANGED
@@ -3,7 +3,7 @@ import os from "node:os";
3
3
  import path from "node:path";
4
4
  import { checkbox, select } from "@inquirer/prompts";
5
5
  import { atomicWriteFile, exec, execAsync, log, withEsc } from "./utils.js";
6
- // Curated default-on set: skills that the workflow in the root CLAUDE.md
6
+ // Curated default-on set: skills that the workflow in the root AGENTS.md
7
7
  // directly references. Anything else in skills-lock.json is surfaced via
8
8
  // installRecommendedSkills as an opt-in utility.
9
9
  export const WORKFLOW_SKILLS = [
package/dist/state.js CHANGED
@@ -3,7 +3,8 @@
3
3
  // own dev-repo layout. The truth sources:
4
4
  //
5
5
  // Workflow: ~/.claude/CLAUDE.md (user scope)
6
- // <proj>/CLAUDE.md (project scope)
6
+ // <proj>/AGENTS.md (project scope primary)
7
+ // <proj>/CLAUDE.md (project scope legacy fallback)
7
8
  // Skills: ~/.claude/skills/<name>/SKILL.md (user scope)
8
9
  // <proj>/.claude/skills/<name>/SKILL.md (project scope)
9
10
  // Plugins(Claude): execPluginList(scope) + settings.json enabledPlugins
@@ -24,6 +25,8 @@ import fs from "node:fs";
24
25
  import os from "node:os";
25
26
  import path from "node:path";
26
27
  import { parse as parseToml } from "smol-toml";
28
+ import { hasAurigaHeader, parseMarkers } from "./workflow-markers.js";
29
+ import { WORKFLOW_COMPAT_FILE, WORKFLOW_PRIMARY_FILE, } from "./workflow-docs.js";
27
30
  /**
28
31
  * Shorten an absolute path by replacing the user's $HOME with `~`. Avoids
29
32
  * leaking the full username in screenshots and keeps the TopBar label
@@ -147,50 +150,63 @@ function aggregateStatus(records) {
147
150
  // ---------------------------------------------------------------------------
148
151
  // Workflow
149
152
  // ---------------------------------------------------------------------------
150
- const WORKFLOW_HEADER_RE = /^#\s+auriga\s+Workflow\s*\(v\d+\.\d+\.\d+\)/;
151
153
  function workflowPathsForScope(scope, projectRoot, home) {
152
154
  if (scope === "user") {
153
155
  return [path.join(home, ".claude", "CLAUDE.md")];
154
156
  }
155
- // Project: only `<proj>/CLAUDE.md` the auriga workflow installer
156
- // (src/workflow.ts) writes here and never to `<proj>/.claude/CLAUDE.md`.
157
- // The old fallback collapsed onto `$HOME/.claude/CLAUDE.md` when
158
- // projectRoot === $HOME (user runs `web-ui` from home dir), leaking
159
- // user-scope content into the project-scope row.
160
- return [path.join(projectRoot, "CLAUDE.md")];
157
+ // Project: prefer the current `<proj>/AGENTS.md` primary. Keep
158
+ // `<proj>/CLAUDE.md` as a legacy fallback so already-installed projects do
159
+ // not flash as missing before their next install flips the symlink direction.
160
+ // Never fall back to `<proj>/.claude/CLAUDE.md`: that path can collapse onto
161
+ // user scope when projectRoot === HOME.
162
+ return [
163
+ path.join(projectRoot, WORKFLOW_PRIMARY_FILE),
164
+ path.join(projectRoot, WORKFLOW_COMPAT_FILE),
165
+ ];
161
166
  }
162
- function scanWorkflow(scope, projectRoot, home, warnings) {
163
- const candidates = workflowPathsForScope(scope, projectRoot, home);
164
- let content = null;
167
+ function workflowForeignWarningCode(filePath) {
168
+ return path.basename(filePath) === WORKFLOW_PRIMARY_FILE
169
+ ? "workflow-foreign-agentsmd"
170
+ : "workflow-foreign-claudemd";
171
+ }
172
+ function workflowForeignWarningMessage(filePath) {
173
+ const name = path.basename(filePath);
174
+ return `Foreign ${name} detected at the workflow path — no auriga-workflow header. Install will preserve existing content or link intent before replacing the workflow path.`;
175
+ }
176
+ function readFirstWorkflowCandidate(candidates) {
165
177
  for (const candidate of candidates) {
166
178
  try {
167
- content = fs.readFileSync(candidate, "utf8");
168
- break;
179
+ return { content: fs.readFileSync(candidate, "utf8"), filePath: candidate };
169
180
  }
170
181
  catch {
171
182
  // try next candidate
172
183
  }
173
184
  }
174
- if (content === null) {
185
+ return null;
186
+ }
187
+ function scanWorkflow(scope, projectRoot, home, warnings) {
188
+ const candidates = workflowPathsForScope(scope, projectRoot, home);
189
+ const workflowFile = readFirstWorkflowCandidate(candidates);
190
+ if (workflowFile === null) {
175
191
  return { status: "not-installed", observedScope: scope };
176
192
  }
177
- // Walk the first non-blank lines looking for the auriga header. We only
178
- // need to know "is this our CLAUDE.md or foreign" — the actual version
179
- // string is unused since v1.19.0 dropped update-available status.
180
- for (const line of content.split(/\r?\n/)) {
181
- if (WORKFLOW_HEADER_RE.test(line)) {
182
- return { status: "installed", observedScope: scope };
183
- }
184
- if (line.trim().length > 0)
185
- break;
186
- }
187
- // CLAUDE.md exists but no recognizable auriga marker. The file is foreign
188
- // — not our workflow. Report `not-installed` honestly; the install path
189
- // (src/workflow.ts) protects user content by backing it up to
190
- // `CLAUDE.md.bak` (backup-once: never clobbers a prior .bak).
193
+ const { content, filePath } = workflowFile;
194
+ // "Is this our workflow instruction file?" — two recognizable shapes:
195
+ // - managed-block markers (the current install format). The START marker
196
+ // is an HTML comment ahead of the auriga header, so a first-non-blank-
197
+ // line header walk would miss it — detect the marker pair directly.
198
+ // - an auriga workflow header with no markers (a pre-marker install).
199
+ // Still ours; the next install migrates it to the marked format.
200
+ if (parseMarkers(content).kind === "marked" || hasAurigaHeader(content)) {
201
+ return { status: "installed", observedScope: scope };
202
+ }
203
+ // The workflow path exists but is neither marked nor auriga-headed. The file
204
+ // is foreign — not our workflow. Report `not-installed` honestly; the install
205
+ // path keeps the foreign content as the user region below a fresh managed
206
+ // block, so nothing is lost.
191
207
  warnings.push({
192
- code: "workflow-foreign-claudemd",
193
- message: `Foreign CLAUDE.md detected at the workflow path — no auriga-workflow header. Install will back up to CLAUDE.md.bak.`,
208
+ code: workflowForeignWarningCode(filePath),
209
+ message: workflowForeignWarningMessage(filePath),
194
210
  });
195
211
  return { status: "not-installed", observedScope: scope };
196
212
  }