ccoalm/ccl-skills / skills/skill-extraction-workflow
skill-extraction-workflow
Flagged复盘 / 沉淀 / 总结经验 / 补进技能 / 技能缺陷 / 流程优化 / would other teammates hit this / will we forget next time / teamwide recurrence / extract skill / post-mortem / 深度 review·审计技能仓库 / 对标外部技能包找 gap(benchmark superpowers·gstack 等) / 核查全局安装点(~/.config/opencode 等)旧快照是否遮蔽本仓技能 / 本仓(ccl-skills 等共享技能仓)OpenCode 项目配置·命令治理 → turn reusable lessons into durable CCL skills.
scripts/source-register-pending-status.rb
View on GitHub#!/usr/bin/env ruby
# frozen_string_literal: true
# Reports whether the current diff adds a pending/interim source-register row.
# stdout is exactly 0 or 1; diagnostics go to stderr. The full checker consumes
# this result when choosing its final clean/interim token.
root = ARGV.fetch(0)
base = ENV["CCL_SKILL_BASE_REF"].to_s.strip
if base.empty?
upstream_ref = IO.popen(["git", "-C", root, "rev-parse", "--abbrev-ref", "--symbolic-full-name", "@{upstream}", err: File::NULL], &:read).strip
base = upstream_ref.empty? ? "origin/main" : upstream_ref
end
merge_base = IO.popen(["git", "-C", root, "merge-base", base, "HEAD"], &:read).strip
# The impact-chain gate owns the missing-merge-base failure. This helper stays
# neutral so it cannot independently upgrade or downgrade the final token.
if merge_base.empty?
puts "0"
exit 0
end
diff = IO.popen(["git", "-C", root, "diff", merge_base, "HEAD", "--", "skills/skill-extraction-workflow/references/source-register.md"], &:read)
hits = []
diff.lines.each do |line|
next unless line.start_with?("+")
body = line.sub(/\A\+/, "").strip
next unless body.start_with?("|") && body.end_with?("|")
inner = body[1..-2].to_s
esc_bs = "\u0001"
esc_pipe = "\u0002"
cells = inner.gsub("\\\\", esc_bs).gsub("\\|", esc_pipe).split("|", -1).map do |cell|
cell.gsub(esc_pipe, "|").gsub(esc_bs, "\\\\").strip
end
nonterminal = lambda do |cell|
status = cell.delete("`").strip.downcase
status == "pending" || status == "interim"
end
if cells.length == 5
next unless nonterminal.call(cells[3])
else
next unless cells.any? { |cell| nonterminal.call(cell) }
end
hits << body
end
if hits.empty?
puts "0"
else
warn "register_nonterminal_status_added: the changed source-register diff adds #{hits.length} row(s) with a `pending`/`interim` status; a pending/interim ledger row blocks a clean-landing/complete claim, so this run is forced to interim (NOT clean-landing)"
hits.each { |hit| warn " row: #{hit}" }
puts "1"
end
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |