rhdh-context

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

RHDH Context

RHDH 上下文

The environment facts every other RHDH skill starts from: which repositories are checked out and where, which tools are on PATH, which RHDH and Backstage versions this checkout targets, and where its configuration lives. Callers invoke this skill by name and read what it reports; they never inspect its files or import its Python package.
其他所有RHDH技能启动时依赖的环境信息:已检出的仓库及其路径、PATH中的工具、当前检出代码对应的目标RHDH和Backstage版本,以及配置文件的位置。调用方通过名称调用本技能并读取其返回的信息;他们无需检查本技能的文件或导入其Python包。

What this skill hands back

本技能返回的内容

Run this before another skill needs repository, tool, version, or configuration facts:
bash
python scripts/context.py --project-root <repo> --json
It prints one JSON object and nothing else:
repositories
is an array of
{name, path}
,
tools
maps each probed tool to
installed
,
missing
, or
not-probed
, and
configuration
carries the config paths plus
targetRhdh
,
targetBackstage
, and
source
. The source is
user
when
--target-rhdh
is given,
repository
when the checkout pins a version in
backstage.json
, and
rhdh-context
when the answer comes from the checked-in compatibility matrix.
Consume the whole object. Reuse it within the session unless configuration or repository state changes. When a required capability is missing, name that capability and tell the human to run
/setup-rhdh-skills
; a model skill cannot invoke that human-only entry point.
在其他技能需要仓库、工具、版本或配置信息前,运行以下命令:
bash
python scripts/context.py --project-root <repo> --json
它仅输出一个JSON对象:
repositories
是包含
{name, path}
的数组,
tools
将每个探测到的工具映射为
installed
missing
not-probed
configuration
包含配置路径以及
targetRhdh
targetBackstage
source
。当指定
--target-rhdh
参数时,
source
user
;当检出代码在
backstage.json
中固定了版本时,
source
repository
;当答案来自已提交的兼容性矩阵时,
source
rhdh-context
请完整使用该对象。除非配置或仓库状态发生变化,否则在会话内可重复使用。当缺少必要功能时,请指明该功能并告知用户运行
/setup-rhdh-skills
;模型技能无法调用这个仅支持人工触发的入口。

Preserved CLI

保留的CLI

Run the CLI from this skill directory as
uv run scripts/rhdh <command>
. It is a bundled wrapper, not an installed executable:
npx skills add
copies skill directories and installs no console script. The wrapper declares no dependencies — the
rhdh
package beside it is stdlib-only.
OutcomeInterface
Environment orientation and diagnostics
uv run scripts/rhdh status
,
uv run scripts/rhdh doctor
Layered project/user configuration
uv run scripts/rhdh config ...
Repository submodule setup
uv run scripts/rhdh setup submodule ...
Overlay workspace inspection
uv run scripts/rhdh workspace ...
Worklog state
uv run scripts/rhdh log ...
Todo state
uv run scripts/rhdh todo ...
Config, worklog, todo, JSON output shapes, exit codes, and existing
.rhdh
state remain compatible. Local runtime actions belong to
/rhdh-local
. The compatibility command
uv run scripts/rhdh local ...
delegates to the standalone
rhdh-local
executable; this skill does not import or locate another skill's files.
在本技能目录下运行
uv run scripts/rhdh <command>
即可使用该CLI。它是一个捆绑式包装器,而非已安装的可执行文件:
npx skills add
仅复制技能目录,不会安装控制台脚本。该包装器不声明任何依赖——旁边的
rhdh
包仅依赖标准库。
功能接口
环境定位与诊断
uv run scripts/rhdh status
,
uv run scripts/rhdh doctor
分层项目/用户配置
uv run scripts/rhdh config ...
仓库子模块设置
uv run scripts/rhdh setup submodule ...
覆盖工作区检查
uv run scripts/rhdh workspace ...
工作日志状态
uv run scripts/rhdh log ...
待办事项状态
uv run scripts/rhdh todo ...
配置、工作日志、待办事项、JSON输出格式、退出码以及现有
.rhdh
状态均保持兼容。本地运行时操作归属于
/rhdh-local
。兼容性命令
uv run scripts/rhdh local ...
会委托给独立的
rhdh-local
可执行文件;本技能不会导入或定位其他技能的文件。

Handoffs

上下文传递

Handoffs stay in the conversation. This skill prints its context as JSON; the caller reads it and carries what it needs.
When the human needs context to survive into a later session, tell them to run
/handoff
, which writes a summary to the operating system temporary directory. That is a human-invoked skill and a deliberate action, not something this skill does on their behalf.
上下文传递需保留在对话中。本技能将上下文以JSON格式输出;调用方读取后携带所需信息。
当用户需要上下文保留到后续会话时,请告知他们运行
/handoff
,该命令会将摘要写入操作系统的临时目录。这是一个由人工调用的技能,属于主动操作,而非本技能自动执行的行为。

Conditional references

条件引用

  • Read references/rhdh-repos.md when identifying an RHDH repository or explaining ecosystem relationships.
  • Read references/versions.md when a workflow needs the checked-in compatibility matrix. Prefer live repository facts when they disagree with cached prose.
  • 当识别RHDH仓库或解释生态系统关系时,请阅读references/rhdh-repos.md
  • 当工作流需要已提交的兼容性矩阵时,请阅读references/versions.md。当实时仓库信息与缓存文档不一致时,优先使用实时仓库信息。

Completion

完成标准

Complete when the answer names the resolved repositories and their paths, the tool status, the target RHDH and Backstage versions with the source that produced them, and every capability the caller still has to set up. A repository that is not configured is reported with a null path, never guessed. The caller receives the facts themselves, not a path to a file it has to open.
当回答中指明了已解析的仓库及其路径、工具状态、目标RHDH和Backstage版本及其来源,以及调用方仍需设置的所有功能时,即完成任务。未配置的仓库会报告为null路径,绝不猜测。调用方直接获取事实信息,而非需要打开的文件路径。