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
+15 -8
View File
@@ -7,8 +7,8 @@ ROOT = Path(__file__).resolve().parents[1]
SKILLS_ROOT = ROOT / "skills"
FIRST_PARTY_SKILLS = {
"commit-message": SKILLS_ROOT / "commit-message" / "SKILL.md",
"gitea-fix-ci": SKILLS_ROOT / "gitea-fix-ci" / "SKILL.md",
"style-cleanup": SKILLS_ROOT / "style-cleanup" / "SKILL.md",
"bulk-refactor-workflow": SKILLS_ROOT / "bulk-refactor-workflow" / "SKILL.md",
}
@@ -92,13 +92,20 @@ class FirstPartySkillsQualityTests(unittest.TestCase):
self.assertIn("formatter -> lint/check -> lint --fix -> final check", text)
self.assertIn("second formatter run produces no additional diff", text)
def test_bulk_refactor_skill_is_dirty_aware_and_delegates_final_cleanup(self):
text = normalize_space(read_text(FIRST_PARTY_SKILLS["bulk-refactor-workflow"]))
self.assertIn("Dirty worktrees are allowed", text)
self.assertIn("Do not revert unrelated changes", text)
self.assertIn("Use `style-cleanup` for the final formatting/lint pass", text)
self.assertIn("apply the transformation in bounded batches", text)
def test_gitea_fix_ci_skill_is_gitea_specific_and_plan_gated(self):
text = normalize_space(read_text(FIRST_PARTY_SKILLS["gitea-fix-ci"]))
self.assertIn("Gitea Actions", text)
self.assertIn("tea", text)
self.assertIn("tea actions runs", text)
self.assertIn("Gitea API", text)
self.assertIn("Gitea 1.21", text)
self.assertIn("workflow runs", text)
self.assertIn("job logs", text)
self.assertIn("/actions/runs/<run>/jobs/<job-index>/logs", text)
self.assertIn("Do not implement before the user approves the fix plan", text)
self.assertIn("not a standalone executor", text)
self.assertNotIn("gh pr checks", text)
self.assertNotIn("GitHub Actions", text)
if __name__ == "__main__":
unittest.main()
+44
View File
@@ -0,0 +1,44 @@
import unittest
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
README = ROOT / "skills" / "README.md"
class SkillsReadmeTests(unittest.TestCase):
def test_readme_describes_first_party_and_thirdparty_skill_groups(self):
text = README.read_text(encoding="utf-8")
for name in ("commit-message", "gitea-fix-ci", "style-cleanup"):
self.assertIn(name, text)
for name in (
"brainstorming",
"executing-plans",
"systematic-debugging",
"test-driven-development",
"requesting-code-review",
"receiving-code-review",
"ui-ux-pro-max",
"karpathy-guidelines",
):
self.assertIn(name, text)
def test_readme_explains_suite_membership_for_registered_sources(self):
text = README.read_text(encoding="utf-8")
self.assertIn("brooks-lint", text)
self.assertIn("brooks-review", text)
self.assertIn("brooks-audit", text)
self.assertIn("brooks-debt", text)
self.assertIn("brooks-test", text)
self.assertIn("_shared", text)
self.assertIn("codebase-recon", text)
self.assertIn("codebase-migrate", text)
self.assertIn("已登记待同步", text)
if __name__ == "__main__":
unittest.main()
+33
View File
@@ -0,0 +1,33 @@
import unittest
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
CURATION = ROOT / "skills" / "thirdparty" / "thirdparty-skills.yml"
def read_text(path: Path) -> str:
return path.read_text(encoding="utf-8")
class ThirdpartySkillCurationTests(unittest.TestCase):
def test_architecture_skills_are_recorded_for_sync(self):
text = read_text(CURATION)
self.assertIn("id: brooks-lint", text)
self.assertIn("upstream_repo: https://github.com/hyhmrright/brooks-lint", text)
self.assertIn("architecture audit", text)
self.assertIn("sync: enabled", text)
self.assertIn("id: codebase-recon", text)
self.assertIn("upstream_repo: https://github.com/outfitter-dev/agents", text)
self.assertIn("upstream_path: plugins/outfitter/skills/codebase-recon", text)
self.assertIn("risk scan", text)
self.assertIn("id: codebase-migrate", text)
self.assertIn("upstream_repo: https://github.com/ComposioHQ/awesome-codex-skills", text)
self.assertIn("upstream_path: codebase-migrate", text)
self.assertIn("large codebase migrations", text)
if __name__ == "__main__":
unittest.main()
+45 -1
View File
@@ -17,6 +17,8 @@ SKILLS_MD = ROOT / "SKILLS.md"
SUPERPOWERS_LIST = ROOT / "skills" / "thirdparty" / ".sources" / "superpowers.list"
UI_UX_PRO_MAX_LIST = ROOT / "skills" / "thirdparty" / ".sources" / "ui-ux-pro-max.list"
UI_UX_PRO_MAX_DIR = ROOT / "skills" / "thirdparty" / "ui-ux-pro-max"
BROOKS_LINT_LIST = ROOT / "skills" / "thirdparty" / ".sources" / "brooks-lint.list"
CODEBASE_RECON_LIST = ROOT / "skills" / "thirdparty" / ".sources" / "codebase-recon.list"
def load_manifest() -> dict:
@@ -46,7 +48,14 @@ class ThirdpartySkillsPipelineTests(unittest.TestCase):
data = load_manifest()
self.assertEqual(
[entry["id"] for entry in data["sources"]],
["superpowers", "ui-ux-pro-max", "andrej-karpathy-skills"],
[
"superpowers",
"ui-ux-pro-max",
"andrej-karpathy-skills",
"brooks-lint",
"codebase-recon",
"codebase-migrate",
],
)
def test_karpathy_manifest_uses_copy_skill_dirs_sync_mode(self):
@@ -67,6 +76,39 @@ class ThirdpartySkillsPipelineTests(unittest.TestCase):
self.assertEqual(ui_skill["sync_mode"], "render_skill")
self.assertEqual(ui_skill["snapshot_dir"], "ui-ux-pro-max")
def test_architecture_skill_sources_use_include_filters(self):
data = load_manifest()
brooks = next(item for item in data["sources"] if item["id"] == "brooks-lint")
self.assertEqual(brooks["sync_mode"], "copy_skill_dirs")
self.assertEqual(brooks["snapshot_dir"], "brooks-lint")
self.assertEqual(brooks["skills_subdir"], "skills")
self.assertEqual(
brooks["source_list"], "skills/thirdparty/.sources/brooks-lint.list"
)
self.assertIn("brooks-audit", brooks["include_skill_dirs"])
self.assertIn("brooks-review", brooks["include_skill_dirs"])
self.assertIn("_shared", brooks["include_skill_dirs"])
recon = next(item for item in data["sources"] if item["id"] == "codebase-recon")
self.assertEqual(recon["sync_mode"], "copy_skill_dirs")
self.assertEqual(recon["snapshot_dir"], "outfitter-agents")
self.assertEqual(recon["skills_subdir"], "plugins/outfitter/skills")
self.assertEqual(
recon["source_list"], "skills/thirdparty/.sources/codebase-recon.list"
)
self.assertEqual(recon["include_skill_dirs"], ["codebase-recon"])
migrate = next(
item for item in data["sources"] if item["id"] == "codebase-migrate"
)
self.assertEqual(migrate["sync_mode"], "copy_skill_dirs")
self.assertEqual(migrate["snapshot_dir"], "awesome-codex-skills")
self.assertEqual(migrate["skills_subdir"], ".")
self.assertEqual(
migrate["source_list"], "skills/thirdparty/.sources/codebase-migrate.list"
)
self.assertEqual(migrate["include_skill_dirs"], ["codebase-migrate"])
def test_superpowers_manifest_prunes_non_superpowers_paths(self):
data = load_manifest()
superpowers = next(item for item in data["sources"] if item["id"] == "superpowers")
@@ -138,6 +180,8 @@ class ThirdpartySkillsPipelineTests(unittest.TestCase):
text = SYNC_SCRIPT.read_text(encoding="utf-8")
self.assertIn('"\\x1f".join(', text)
self.assertIn("while IFS=$'\\x1f' read -r", text)
self.assertIn("include_skill_dirs", text)
self.assertIn('skill_dir_included "$name" "$include_skill_dirs"', text)
self.assertNotIn("while IFS=$'\\t' read -r", text)
self.assertNotIn("exclude_skill_dirs", text)
self.assertNotIn("is_excluded_skill_dir", text)