docs: clarify shared Python, CLI vs Action, and Task Center rules
All checks were successful
技能自动化发布 / release (push) Successful in 11s

This commit is contained in:
2026-07-15 11:13:53 +08:00
parent 6b64aad138
commit 296798a0f3
12 changed files with 178 additions and 111 deletions

View File

@@ -302,10 +302,38 @@ class TestDocsStandards(unittest.TestCase):
self.assertNotIn("ALLOW_" + "REAL_" + "API", text)
self.assertNotIn("ALLOW_WRITE_ACTIONS", text)
def test_cli_md_mentions_shared_python_runtime(self) -> None:
def test_cli_md_requires_shared_python_not_uv_run(self) -> None:
text = self._read("references/CLI.md")
self.assertIn("python-runtime", text)
self.assertIn("JIANGCHANG_PYTHON_EXE", text)
self.assertIn("禁止", text)
self.assertIn("uv run python", text)
self.assertNotRegex(
text,
r"(?m)^(?!\*\*禁止\*\*).*\*\*建议\*\*.*uv run python",
msg="CLI.md must not recommend uv run for skill scripts",
)
def test_skill_md_requires_shared_python_not_uv_run(self) -> None:
text = self._read("SKILL.md")
self.assertIn("JIANGCHANG_PYTHON_EXE", text)
self.assertIn("uv run python", text)
self.assertIn("禁止", text)
self.assertIn("run_skill_action", text)
self.assertIn("executionProfile", text)
self.assertTrue(
"任务中心" in text and "无关" in text,
msg="SKILL.md must state Task Center is independent of entry point",
)
def test_actions_md_states_profile_not_entry_for_task_center(self) -> None:
text = self._read("references/ACTIONS.md")
self.assertIn("executionProfile", text)
self.assertIn("任务中心", text)
self.assertTrue(
"无关" in text or "orthogonal" in text.lower() or "正交" in text,
msg="ACTIONS.md must keep placements orthogonal to Task Center",
)
def test_testing_md_mentions_pytest_txt_collection_guard(self) -> None:
text = self._read("development/TESTING.md")