Linux RISC-V Contribute
Overview
Use this skill to run a repeatable discover -> issue -> plan -> implement -> patch pipeline with OpenClaw as orchestrator and ACP agents (claude-code, codex) as workers.
Keep humans at exactly three gates:
- 1. Confirm gap triage and priorities.
- Approve implementation plan.
- Approve final patch email before sending.
Workflow
Step 0: Bootstrap workspace
Run scripts/bootstrap_openclaw_workflow.sh <docs_repo_root> <linux_repo_path> to create/update:
- - INLINECODE4
- INLINECODE5
- INLINECODE6
If files already exist, do not overwrite without explicit user approval.
Step 1: Discover RISC-V gaps
Collect evidence from:
- - Linux source tree (
arch/riscv, arch/arm64, arch/x86, virt/kvm) - KVM lore (
https://yhbt.net/lore/kvm/)
Write structured entries to state/gap_registry.yaml with:
- -
gap_id, type (feature|performance|maintainability), INLINECODE16 - INLINECODE17 (paths, commits, lore URLs)
- INLINECODE18 (
P0|P1|P2), confidence (high|medium|low) - INLINECODE22
Pause for Gate-1 human triage before creating issues.
Step 2: Sync GitHub issues
For each approved gap:
- - Create/update issue in configured repo.
- Add labels from severity/type.
- Save
gap_id -> issue_number mapping to state/issue_map.yaml.
Use one issue per gap; avoid duplicate issues by matching gap_id.
Step 3: Plan with Claude Code (ACP)
Spawn ACP session explicitly:
- - INLINECODE26
- INLINECODE27
Ask for:
- - file-level design
- test matrix (
kselftest, kvm-unit-tests, perf) - rollback/risk notes
- upstreaming strategy
Save outputs under kernel/openclaw/plans/issue-<id>-plan.md.
Pause for Gate-2 human plan approval.
Step 4: Implement and verify with Codex (ACP)
Spawn ACP session explicitly:
- - INLINECODE31
- INLINECODE32
Run iterative loop until pass or policy limit:
- 1. Implement approved plan.
- Build and run configured tests.
- Parse failures and patch.
Record each iteration in state/run_history/*.json.
If max iterations reached, return to Step 3 with failure summary.
Step 5: Generate patch and email package
Produce:
- -
git format-patch series - INLINECODE35 result
- suggested
To/Cc (get_maintainer.pl, lore context) - cover letter draft
Save artifacts in kernel/openclaw/patches/.
Pause for Gate-3 human send approval.
Only send to mailing lists after explicit approval.
OpenClaw execution rules
- - Prefer ACP
sessions_spawn for agent work; set agentId explicitly. - Limit parallel issues to 2-3 unless user changes policy.
- Never auto-send external email without user confirmation.
- Preserve auditability: every stage must have file artifacts.
Quick command prompts for operator
Use these ready prompts in OpenClaw chat:
- 1. INLINECODE41
- INLINECODE42
- INLINECODE43
- INLINECODE44
- INLINECODE45
References
- - Workflow template: INLINECODE46
- Issue template: INLINECODE47
- Human gate checklist: INLINECODE48
Linux RISC-V 贡献
概述
使用此技能运行可重复的发现 -> 问题 -> 规划 -> 实现 -> 补丁流水线,以OpenClaw为编排器,ACP代理(claude-code、codex)为执行者。
仅在以下三个关卡保留人工介入:
- 1. 确认差距分类和优先级。
- 批准实施方案。
- 发送前批准最终补丁邮件。
工作流
第0步:初始化工作空间
运行 scripts/bootstrapopenclawworkflow.sh reporoot> repopath> 创建/更新:
- - kernel/openclaw/config/workflow.yaml
- kernel/openclaw/state/{gapregistry.yaml,issuemap.yaml,run_history/}
- kernel/openclaw/{plans,patches,logs}
如果文件已存在,未经用户明确批准不得覆盖。
第1步:发现RISC-V差距
从以下来源收集证据:
- - Linux源码树(arch/riscv、arch/arm64、arch/x86、virt/kvm)
- KVM邮件列表(https://yhbt.net/lore/kvm/)
将结构化条目写入 state/gap_registry.yaml,包含:
- - gapid、type(feature|performance|maintainability)、summary
- evidence(路径、提交、邮件列表URL)
- severity(P0|P1|P2)、confidence(high|medium|low)
- acceptancehint
在创建问题前暂停,等待关卡1人工分类。
第2步:同步GitHub问题
对于每个已批准的差距:
- - 在配置的仓库中创建/更新问题。
- 根据严重性/类型添加标签。
- 将 gapid -> issuenumber 映射保存到 state/issue_map.yaml。
每个差距使用一个问题;通过匹配 gap_id 避免重复问题。
第3步:使用Claude Code(ACP)规划
显式启动ACP会话:
- - runtime: acp
- agentId: claude-code
要求提供:
- - 文件级设计
- 测试矩阵(kselftest、kvm-unit-tests、性能测试)
- 回滚/风险说明
- 上游提交策略
将输出保存到 kernel/openclaw/plans/issue--plan.md。
暂停等待关卡2人工计划批准。
第4步:使用Codex(ACP)实现和验证
显式启动ACP会话:
- - runtime: acp
- agentId: codex
运行迭代循环,直到通过或达到策略限制:
- 1. 实现已批准的计划。
- 构建并运行配置的测试。
- 解析失败并修补。
每次迭代记录到 state/run_history/*.json。
如果达到最大迭代次数,返回第3步并附带失败摘要。
第5步:生成补丁和邮件包
生成:
- - git format-patch 系列
- checkpatch 结果
- 建议的 To/Cc(get_maintainer.pl、邮件列表上下文)
- 封面信草稿
将产物保存到 kernel/openclaw/patches/。
暂停等待关卡3人工发送批准。
仅在获得明确批准后才发送到邮件列表。
OpenClaw执行规则
- - 优先使用ACP sessions_spawn 进行代理工作;显式设置 agentId。
- 除非用户更改策略,否则并行问题限制为2-3个。
- 未经用户确认,不得自动发送外部邮件。
- 保持可审计性:每个阶段必须有文件产物。
操作员快速命令提示
在OpenClaw聊天中使用以下现成提示:
- 1. 按 workflow.yaml 执行 Step-1,更新 gap_registry.yaml,并生成 Gate-1 审核表。
- 基于已批准 gap 执行 Step-2,同步 issue 并输出映射表。
- 对 issue # 用 claude-code 执行 Step-3,生成详细方案和测试矩阵。
- 对 issue # 用 codex 执行 Step-4,直到验证通过或达到迭代上限。
- 对 issue # 执行 Step-5,先 dry-run 生成 patch 和发信草案,等待我确认。
参考
- - 工作流模板:references/workflow-template.yaml
- 问题模板:references/issue-template.md
- 人工关卡检查表:references/gate-checklist.md