llman
llman — 管 LLM 应用的规则(prompts),也管 AI 时代的开发流程(SDD)
llman 是一个面向 AI 编码工作流的 Rust CLI,解决两个日常痛点:
- 规则漂移 — Cursor 用
.mdc、Claude Code 用CLAUDE.md、Codex 用 TOML,提示词各管各的,改一处忘三处。llman 把规则和 skills 收进一个配置库,一条命令生成、同步到各个工具。 - AI 写码没合约 — 让智能体改代码,改得对不对全靠肉眼。
llman sdd(独立二进制llmanspec)提供 Git-native 的规格驱动开发(SDD):规格是可执行的 Gherkin.feature,变更走 draft → apply → verify → archive 的生命周期,每一步都有 CLI 门禁。
本仓库自己就是用 llman sdd 开发的——规格在 llmanspec/specs/,AI 与人共用同一套合约。
提示词与技能管理
支持 Cursor / Claude Code / Codex 三个应用;sync-ignore 还能在它们之间同步 ignore 规则,llman tool 另带清理无用注释、清理空目录、管理 AGENTS.md 等开发小工具。
规格驱动开发(SDD)
一次功能变更被建模成有生命周期的「change」,规格(specs)是单轨的 Gherkin .feature 文件——人读得懂,rstest-bdd 能执行:
draft [proposal.md]
→ designed [+design+tasks]
→ bound [change start] # 自动绑 sdd/<id> 分支 + base_sha
→ specs-landed [编辑 .feature] # 规格先落地,代码后实施
→ apply → verify → archive
@human规则由人拥有、哈希锁定,改动需显式确认;llmanspec validate --all/llmanspec review是 AI 与人的共同门禁;llmanspec context按任务/文件检索相关规格,给智能体喂准确上下文。
安装
# crates.io(llman-core / llman-sdd / gherkin-zh 依赖一并安装)
从源码:
&&
也可从 GitHub tag 直接构建:cargo install --git https://github.com/StrayDragon/llman --tag v<version>。需要 nightly 工具链(rust-toolchain.toml 会自动切换)。
命令一览
llman 顶层命令组:
| 命令 | 说明 |
|---|---|
prompts |
Prompt orchestrator (interactive-only) |
skills |
Manage skills |
sdd |
Spec-driven development workflow |
x |
Experimental commands |
tool |
Developer tools |
self |
Self-management commands |
llman sdd:
| 子命令 | 说明 |
|---|---|
review |
Aggregate review: pending/manual rules, unbound scenarios, staleness, locked-rule hints and a validate --all sweep (sdd-review r5-r51) |
init |
Initialize llmanspec in your project (use --update to refresh existing) |
list |
List changes or specs |
show |
Show a change or spec |
validate |
Validate changes and specs |
archive |
Archive workflow commands (cold backup). Prefer sdd change archive to seal a change |
change |
Change lifecycle: new / start / attach / finalize / archive |
spec |
Spec authoring helpers |
graph |
Generate a change dependency graph |
worktree |
Worktree management commands |
context |
Get specs relevant to a task and/or file paths (agent-oriented) |
index |
Index management commands (rebuild, check freshness) |
config |
Project configuration commands (view/edit config.yaml) |
project |
Project management commands |
llman x:
| 子命令 | 说明 |
|---|---|
cursor |
Commands for interacting with Cursor |
claude-code |
Commands for managing Claude Code configurations |
codex |
Commands for managing Codex configurations |
llman tool:
| 子命令 | 说明 |
|---|---|
clean-useless-comments |
Clean useless comments from source code |
rm-useless-dirs |
Remove useless directories recursively |
sync-ignore |
Sync ignore rules across OpenCode/Cursor/Claude Code |
agents-md |
Manage agent init files (AGENTS.md / CLAUDE.md / .cursor/ etc.) |
独立二进制
llmanspec≡llman sdd(参数一致,供不带主 CLI 的场景使用);llman self提供 schema 生成与 shell 补全。
Workspace crates
| crate | 说明 |
|---|---|
llman |
主 CLI(llman + llmanspec 两个二进制) |
llman-core |
配置解析、路径等共享基础件 |
llman-sdd |
SDD 工作流实现(llman sdd / llmanspec) |
gherkin-zh |
gherkin 0.16 的 fork,补 zh-CN「规则」关键字 |
开发
README 中 <!-- README:GENERATED ... --> 标记的段落由 just readme 从 CLI --help 与 workspace 版本自动生成;改动命令面或版本号后跑一次,just check-readme 会拦截过期(已接入 just check-all 与 CI)。
文档
- AGENTS.md — 项目约定与 SDD 流程
- llmanspec/ — 本仓库的活规格(
llmanspec list --specs查看) - NOTICE — 第三方致谢与许可声明
许可证
MIT