feat(skills): curate code workflow skills

Add a Gitea CI triage skill with legacy web-log fallback, document first-party and third-party skill roles, and register selected third-party code workflow sources.

Remove the first-party bulk refactor workflow in favor of the registered codebase migration replacement.
This commit is contained in:
csh
2026-05-29 12:55:10 +08:00
parent d8eb418277
commit 3023aef8a0
12 changed files with 476 additions and 123 deletions
+24 -2
View File
@@ -30,6 +30,7 @@ for entry in data["sources"]:
entry.get("template_root", ""),
entry.get("data_dir", ""),
entry.get("scripts_dir", ""),
"\x1e".join(entry.get("include_skill_dirs", [])),
]
)
)
@@ -105,6 +106,24 @@ tracked_skill_exists() {
[ -f "skills/$name/SKILL.md" ]
}
skill_dir_included() {
local name="$1"
local include_skill_dirs="$2"
[ -n "$include_skill_dirs" ] || return 0
local IFS=$'\x1e'
local expected
read -r -a included <<< "$include_skill_dirs"
for expected in "${included[@]}"; do
if [ "$name" = "$expected" ]; then
return 0
fi
done
return 1
}
cd "$REPO_DIR"
@@ -130,7 +149,7 @@ if ! emit_sources_tsv > "$sources_file"; then
exit 1
fi
while IFS=$'\x1f' read -r source_id snapshot_dir sync_mode source_list skills_subdir output_name platform_config template_root data_dir scripts_dir; do
while IFS=$'\x1f' read -r source_id snapshot_dir sync_mode source_list skills_subdir output_name platform_config template_root data_dir scripts_dir include_skill_dirs; do
[ -n "$source_id" ] || continue
if [ -f "$source_list" ]; then
@@ -142,7 +161,7 @@ while IFS=$'\x1f' read -r source_id snapshot_dir sync_mode source_list skills_su
done < "$sources_file"
declare -A owners=()
while IFS=$'\x1f' read -r source_id snapshot_dir sync_mode source_list skills_subdir output_name platform_config template_root data_dir scripts_dir; do
while IFS=$'\x1f' read -r source_id snapshot_dir sync_mode source_list skills_subdir output_name platform_config template_root data_dir scripts_dir include_skill_dirs; do
[ -n "$source_id" ] || continue
git archive --format=tar "origin/${THIRDPARTY_BRANCH}" "$snapshot_dir" | tar -xf - -C "$tmp_dir"
@@ -160,6 +179,9 @@ while IFS=$'\x1f' read -r source_id snapshot_dir sync_mode source_list skills_su
for dir in "$source_skills_dir"/*; do
[ -d "$dir" ] || continue
name="$(basename "$dir")"
if ! skill_dir_included "$name" "$include_skill_dirs"; then
continue
fi
if [ -n "${owners[$name]:-}" ] && [ "${owners[$name]}" != "$source_id" ]; then
echo "ERROR: duplicate third-party skill name: $name" >&2
exit 1