herdr

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Herdr development

Herdr 开发

Commands

命令

Prefer
just
(see root
justfile
):
bash
just lint    # fmt check + clippy -D warnings
just test    # nextest + python maintenance + bun suites
just check   # ci + windows-lint + maintenance tests
just test-one <filter>
cargo build  # or cargo run -- <cmd>
Cursor Cloud: if local
cargo
/
zig
/
just test|check|lint
is blocked by hooks, validate via GitHub Actions (
gh pr checks
).
优先使用
just
(参见根目录的
justfile
):
bash
just lint    # fmt check + clippy -D warnings
just test    # nextest + python maintenance + bun suites
just check   # ci + windows-lint + maintenance tests
just test-one <filter>
cargo build  # or cargo run -- <cmd>
Cursor Cloud:如果本地
cargo
/
zig
/
just test|check|lint
被 hooks 阻止,请通过 GitHub Actions 进行验证(
gh pr checks
)。

Invariants

约束条件

From
AGENTS.md
— do not violate:
  1. AppState
    pure; no PTY required for state tests
  2. render()
    never mutates state
  3. Platform code only under
    src/platform/
  4. Detection reads snapshots only; evidence-based manifests
  5. Server owns runtime facts; TUI owns presentation only
来自
AGENTS.md
——不得违反:
  1. AppState
    保持纯粹;状态测试不需要 PTY
  2. render()
    绝不改变状态
  3. 平台代码只能放在
    src/platform/
    下
  4. 检测只读取快照;使用基于证据的清单
  5. Server 负责运行时事实;TUI 只负责呈现

Tests

测试

  • Unit tests beside code (
    #[cfg(test)]
    )
  • AppState::test_new()
    /
    Workspace::test_new()
  • Identity refactors:
    assert_invariants_for_test()
    + adversarial helpers
  • 单元测试与代码相邻(
    #[cfg(test)]
    )
  • AppState::test_new()
    /
    Workspace::test_new()
  • Identity 重构:
    assert_invariants_for_test()
    + 对抗性辅助函数

Commits

提交

Lowercase conventional commits. Issue body line:
refs #<n>
(not
fixes
/
closes
). No AI co-author trailers.
使用小写的 Conventional Commits。Issue 正文行:
refs #<n>
(不要使用
fixes
/
closes
)。不要添加 AI 共同作者尾注。

Docs

文档

  • Stable:
    website/src/content/docs/
  • Unreleased:
    docs/next/website/src/content/docs/
  • Do not hand-edit
    website/latest.json
    / preview channel files unless release work
  • 稳定版:
    website/src/content/docs/
  • 未发布版:
    docs/next/website/src/content/docs/
  • 除非进行发布工作,否则不要手动编辑
    website/latest.json
    或预览频道文件

Source run

运行源码

bash
env -u HERDR_SOCKET_PATH -u HERDR_CLIENT_SOCKET_PATH cargo run -- <command>
Headless:
./target/debug/herdr server
+ CLI/socket. TUI needs a real TTY.
bash
env -u HERDR_SOCKET_PATH -u HERDR_CLIENT_SOCKET_PATH cargo run -- <command>
无头模式:
./target/debug/herdr server
+ CLI/socket。TUI 需要真实的 TTY。

Detection loop

检测流程

  1. herdr agent read <pane> --source detection --format text
    (+
    ansi
    if needed)
  2. Edit
    src/detect/manifests/<agent>.toml
  3. Optional override +
    herdr server reload-agent-manifests
  4. Remove override when done
  1. herdr agent read <pane> --source detection --format text
    (如需要则加上
    ansi
    )
  2. 编辑
    src/detect/manifests/<agent>.toml
  3. 可选:覆盖配置 +
    herdr server reload-agent-manifests
  4. 完成后移除覆盖配置

CHEF fleet

CHEF fleet

For Linear/GitHub/UDO/Kater, Fleet Ops Bar, and
com.chefgroep.*
plugins, use the chef-fleet skill (
.cursor/skills/chef-fleet/SKILL.md
). UI dismiss rules and bar presentation live in herdr-ui.
对于 Linear/GitHub/UDO/Kater、Fleet Ops Bar 以及
com.chefgroep.*
插件,请使用 chef-fleet skill(
.cursor/skills/chef-fleet/SKILL.md
)。UI 关闭规则和栏位呈现位于 herdr-ui 中。

External contributors

外部贡献者

If GitHub account is not
GroepOnline
, follow
CONTRIBUTING.md
. Agents must not open GitHub issues on a human’s behalf.
如果 GitHub 账号不是
GroepOnline
,请遵循
CONTRIBUTING.md
。Agent 不得代表人类创建 GitHub issue。