关于 draxarp
draxarp 是通过 orbit 命令行管理的开发情报模块,面向需要 LLM 辅助开发并跟踪项目上下文的团队。它涵盖任务、记忆、规格、文档、冲刺和知识图谱等资源,并提供工作流事件与令牌用量追踪。
主要功能
- 01管理项目、任务与依赖
- 02记录持久记忆和技术规格
- 03维护文档并批量同步
- 04规划冲刺并查看速度历史
- 05捕获开发上下文并持久化
- 06分解任务并管理知识图谱
适用场景
- 01跟踪编码 Agent 的任务进度与交接
- 02整理项目决策、模式和领域信息
- 03规划冲刺并评估团队速度
- 04诊断工作流事件和令牌用量追踪
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ jorgemuza/ orbit --skill draxarp安装后在 Claude Code 中输入/draxarp确认已加载。
详细介绍
Draxarp Intelligence — orbit CLI
别名:dx
orbit draxarp(或 orbit dx)命令用于管理 Draxarp Development Intelligence 模块——一个面向大模型辅助开发的第二大脑。它涵盖九种资源类型:
资源
| 资源 | 别名 | 描述 |
|---|---|---|
project | proj | 智能项目——用于归类任务、规范、记忆和文档 |
task | — | 开发任务,包含状态、优先级、活动日志、交接、焦点和依赖项 |
memory | mem | 持久化知识——模式、漏洞、决策和领域背景 |
spec | — | 规范,包含审核工作流(draft → review → approved/rejected) |
doc | — | 技术文档,支持基于 slug 的寻址和维基链接 |
sprint | — | Sprint 规划,支持速度跟踪和 AI 内容建议 |
capture | cap | 上下文捕获——Git 提交、PR、CI 事件、部署 |
graph | kg | 知识图谱——节点、边、影响分析、子图、路径查找 |
decompose | — | 根据描述,由 AI 驱动的任务分解 |
跟踪(通过 orbit tracking)
| 命令 | 描述 |
|---|---|
tracking event push | 推送工作流事件(技能完成、Jira 状态转换、Agent 调用) |
tracking tkm push | 从本地 TKM 数据库推送令牌用量数据 |
跟踪管理与诊断(通过 orbit dx tracking,别名 trk)
| 命令 | 描述 |
|---|---|
tool-versions / tv | 显示/设置预期的最新工具版本(orbit、claude-code、paybook-workflow) |
doctor <user> | 诊断单个用户的流水线,并提供结论和可执行提示 |
pipelines | 集群范围的流水线健康状况 +“卡住的用户”列表 |
tail | 跟踪两个流水线中的摄取事件;支持 --follow |
api-logs | 查询 api_logs 表(启用请求日志记录时) |
hooks | 检查本地 ~/.claude/settings.json 摄取钩子(离线) |
hooks install | 幂等地配置一个 Stop 钩子,在每次 Claude Code 响应后运行 tracking tkm push |
hooks uninstall | 移除 tracking tkm push Stop 钩子,同时保留无关钩子 |
# Diagnose why events stopped flowing for a user
orbit dx trk doctor [email protected]
# Cluster health + stuck users
orbit dx trk pipelines
# Real-time stream for a single user
orbit dx trk tail --user [email protected] --follow
# Verify the user's local hooks still reference the ingest endpoints
orbit dx trk hooks
# First-run setup: wire the token-usage Stop hook (idempotent)
orbit dx trk hooks install --bake-profile paybook
如果未运行
hooks install,令牌用量事件只有在明确使用内嵌tracking tkm push的技能(例如paybook-workflow:commit、paybook-workflow:prime)时才会流转——这会导致doctor给出错误的TOKEN_USAGE_BROKEN结论。
快速参考
项目
orbit dx proj ls # List projects
orbit dx proj view <id-or-slug> # View project details
orbit dx proj create --name "My Project" # Create project
orbit dx proj delete <id> # Delete project
所有位置均可使用 Slug: 所有
--project标志和资源 ID 均接受 UUID 或 slug。 为提高可读性,请使用 slug:--project draxarp-portal,而不是--project 019cf38c-...
任务——核心 CRUD
orbit dx task ls --project <id> # List tasks for a project
orbit dx task ls --status in_progress # Filter by status
orbit dx task ls --type epic --project <id> # List only epics
orbit dx task ls --parent <epic-id> # List children of an epic
orbit dx task view <id> # View task details + last 5 activity logs
orbit dx task create --title "Fix bug" --project <id> --priority high
orbit dx task create --title "Wire frontend" --project <id> --depends-on <blocker-id>
orbit dx task create --title "Auth" --project <id> --type epic # Create an epic
orbit dx task create --title "JWT" --project <id> --type story --parent <epic-id> # Story under epic
orbit dx task update <id> --status testing --activity "Running PHPUnit"
orbit dx task assign <id> --assignee claude # Assign task
orbit dx task start <id> # Set status to in_progress
orbit dx task complete <id> # Mark completed (with guard checks)
orbit dx task delete <id> # Delete task
orbit dx task epic <id> # Show epic progress (% complete, children)
任务类型:task(默认)、epic、story
任务——焦点与下一步(会话管理)
orbit dx task focus <id> # One command: assign + start + set focus
orbit dx task focus <id> --agent claude # Specify agent (default: claude)
orbit dx task current # Show currently focused task
orbit dx task current --agent claude # For a specific agent
orbit dx task next --project <id> # Next available task by priority (skips epics & blocked)
任务——活动日志
orbit dx task log <id> "Implemented API endpoints" --tag progress
orbit dx task log <id> "Blocked on DB schema" --tag blocker --agent claude
orbit dx task log <id> "Chose approach A over B" --tag decision
orbit dx task logs <id> # List all logs (newest first)
orbit dx task logs <id> --tag blocker # Filter by tag
orbit dx task logs <id> --limit 10 # Limit results
orbit dx task logs <id> -o json # JSON output
活动日志标签:progress、blocker、decision、hypothesis、tried、result、handoff、note
任务——结构化交接与上下文
# Record a handoff (session continuity)
orbit dx task handoff <id> \
--done "Implemented X" --done "Added tests for Y" \
--remaining "Wire up frontend" --remaining "Add error handling" \
--decision "Used approach A because of constraint B" \
--uncertain "Not sure if Z is the right abstraction" \
--files "backend/Services/Foo.php,frontend/Show.tsx" \
--agent claude
# Get AI-optimized context for resuming work
orbit dx task context <id> # Human-readable
orbit dx task context <id> -o json # Structured JSON
任务——依赖项
orbit dx task dep <id> --on <blocking-task-id> # Add dependency
orbit dx task deps <id> # Show dependency tree (blocks/blocked-by)
orbit dx task deps <id> -o json # JSON output
任务状态:pending、in_progress、testing、completed、blocked、cancelled
任务优先级:low、medium、high、critical
记忆
orbit dx mem ls --project <id> # List memories
orbit dx mem ls --type architecture # Filter by type
orbit dx mem view <id> # View memory content
orbit dx mem create --title "Pattern: Repo" --content "..." --project <id> --type patterns
orbit dx mem archive <id> # Archive memory
记忆类型:architecture、patterns、bugs、domain、decisions、preferences、context
规范
orbit dx spec ls --project <id> # List specs
orbit dx spec view <id> # View spec content
orbit dx spec create --title "Auth Spec" --content "..." --project <id>
orbit dx spec submit <id> # Submit for review
orbit dx spec approve <id> # Approve spec
orbit dx spec reject <id> # Reject spec
orbit dx spec delete <id> # Delete spec
规范状态:draft、in_review、approved、rejected
文档
orbit dx doc ls # List all docs
orbit dx doc ls --category architecture # Filter by category
orbit dx doc toc # Table of contents (no content)
orbit dx doc view <id> # View doc by ID
orbit dx doc view architecture/overview # View by slug (auto-detected)
orbit dx doc create --title "API Guide" --category api --slug api/guide
orbit dx doc sync docs.json # Batch sync from JSON file
orbit dx doc publish <id> # Publish draft doc
orbit dx doc archive <id> # Archive doc
orbit dx doc delete <id> # Delete doc
文档类别:architecture、components、flows、security、api、infrastructure、general
文档状态:draft、published、archived
Slug 自动检测: doc view 会自动检测参数是 UUID 还是 slug——无需使用 --slug 标志(但仍可通过它显式指定)。
批量同步: doc sync 接受包含文档对象数组的 JSON 文件:
[{"slug": "api/guide", "title": "API Guide", "content": "...", "category": "api"}]
已有文档(按 slug 匹配)会被更新;新的 slug 会被创建。
Sprint
orbit dx sprint ls --project <id> # List sprints
orbit dx sprint view <id> # View sprint details
orbit dx sprint create --project <id> --name "Sprint 1" --starts-at 2026-03-16 --ends-at 2026-03-30
orbit dx sprint create --project <id> --name "Sprint 2" --starts-at 2026-03-30 --ends-at 2026-04-13 --goal "Ship auth" --velocity-target 20
orbit dx sprint start <id> # Start a sprint
orbit dx sprint complete <id> # Complete a sprint
orbit dx sprint suggest <id> # AI-powered sprint content suggestions
orbit dx sprint velocity --project <id> # Velocity history (last 5 sprints)
orbit dx sprint velocity --project <id> --count 10 # More history
上下文捕获
orbit dx capture ls --project <id> # List captures for a project
orbit dx capture view <id> # View capture details + payload
orbit dx capture webhook --project <id> --source git_commit --payload '{"sha":"abc","message":"fix"}'
orbit dx capture persist <id> # Persist capture as a memory
上下文来源:git_commit、git_pr、ci_pipeline、deployment、code_review、manual
知识图谱
# Nodes
orbit dx graph nodes --project <id> # List nodes
orbit dx graph nodes --type module # Filter by type
orbit dx graph node <id> # View node details
orbit dx graph create-node --project <id> --type module --name "AuthService"
orbit dx graph delete-node <id> # Delete a node
# Edges
orbit dx graph create-edge --from <id> --to <id> --relationship depends_on
orbit dx graph delete-edge <id> # Delete an edge
# Analysis
orbit dx graph impact <node-id> # Impact analysis (depth 3)
orbit dx graph impact <node-id> --depth 5 # Deeper analysis
orbit dx graph subgraph <node-id> # Local subgraph (depth 2)
orbit dx graph paths --from <id> --to <id> # Find paths between nodes
orbit dx graph paths --from <id> --to <id> --max-depth 8
任务分解
orbit dx decompose create --project <id> --description "Build user auth with JWT"
orbit dx decompose create --project <id> --description "..." --spec <spec-id> # With spec context
orbit dx decompose ls --project <id> # List decompositions
orbit dx decompose view <id> # View decomposition + options
orbit dx decompose accept <id> --indexes 0,1,2 # Accept and create tasks from selected options
orbit dx decompose reject <id> # Reject decomposition
典型 Agent 工作流
# 1. Orient
orbit dx context -p draxarp --project <id>
# 2. Pick up or create task
orbit dx task next --project <id> -p draxarp # Or create new
orbit dx task focus <task-id> -p draxarp # One command: assign + start + focus
# 3. Work (hooks auto-log progress)
# ... edit files, run tests ...
# 4. Log key decisions/blockers manually
orbit dx task log <id> "Chose X because Y" --tag decision -p draxarp
orbit dx task log <id> "Blocked on Z" --tag blocker -p draxarp
# 5. Handoff before session ends
orbit dx task handoff <id> --done "API done" --remaining "Frontend" --agent claude -p draxarp
# 6. Complete
orbit dx task complete <id> -p draxarp
# 7. Next session picks up with context
orbit dx task context <id> -p draxarp
配置
添加到 ~/.config/orbit/config.yaml:
profiles:
- name: my-project
services:
- name: draxarp
type: draxarp
base_url: https://your-draxarp-instance.com
auth:
method: token
token: "your-api-token"
headers: # Optional custom headers
X-Tenant: my-tenant-slug # Required for tenant-scoped access
对于多租户设置,X-Tenant 标头会将所有 API 响应限定为该租户的工作区和项目。令牌可以是平台管理员(Sanctum)令牌,也可以是租户用户(PAT)令牌。
配置文件选择
使用 -p <profile> 指定目标配置文件:
orbit dx proj ls -p draxarp
orbit dx task ls -p draxarp --project <id>
JSON 输出
所有命令都支持 -o json,用于输出机器可读的数据:
orbit dx proj ls -o json
orbit dx mem view <id> -o json
orbit dx doc toc -o json
orbit dx task context <id> -o json
orbit dx sprint ls --project <id> -o json
orbit dx graph nodes --project <id> -o json
API 详情
orbit CLI 与以下地址的 Draxarp API 通信:
- 智能资源:
/api/admin/v1/intelligence/*(任务、记忆、规范、文档、冲刺、图谱、捕获、分解) - 平台资源:
/api/admin/v1/*(项目、工作区) - 身份验证:
Authorization: Bearer <token>(platform-api 或 tenant-api Sanctum guard) - 租户范围:
X-Tenant: <slug>标头(租户绑定令牌必需) - 分页:
{ "success": true, "data": [...], "meta": { "current_page", "last_page", "per_page", "total" } } - 单个资源:
{ "success": true, "data": { ... } }