docs: 精简单人任务事实来源并分级工程基线 (#25)

This commit is contained in:
ila
2026-08-25 08:39:52 +08:00
parent 3696663781
commit 5821ea0d08
14 changed files with 174 additions and 108 deletions
+22
View File
@@ -92,6 +92,14 @@ class CoreDocumentTests(unittest.TestCase):
self.assertIn("## 新项目 Wiki 初始化门禁", workflow)
self.assertIn("#### 在线创建与回读门禁", setup)
def test_workflow_requires_issue_only_task_record(self) -> None:
workflow = CORE_DOCUMENT_REQUIREMENTS["docs/01-workflow.md"]
setup = CORE_DOCUMENT_REQUIREMENTS[
"docs/07-new-project-documentation-setup.md"
]
self.assertIn("## 稳定文档与可选历史快照", workflow)
self.assertIn("#### 工程基线裁剪", setup)
def test_existing_project_adoption_requires_upgrade_process(self) -> None:
required = CORE_DOCUMENT_REQUIREMENTS[
"docs/08-existing-project-adoption.md"
@@ -199,6 +207,20 @@ class TaskTemplateTests(unittest.TestCase):
errors,
)
def test_task_template_requires_optional_snapshot_policy(self) -> None:
with tempfile.TemporaryDirectory() as directory:
root = Path(directory)
template = root / ".gitea" / "issue_template" / "task.md"
template.parent.mkdir(parents=True)
template.write_text("## 基本信息\n", encoding="utf-8")
errors: list[str] = []
check_task_template(errors, root)
self.assertIn("单元任务模板缺少:## 任务记录与可选快照", errors)
self.assertIn(
"单元任务模板缺少:- [ ] 默认不创建任务快照",
errors,
)
def test_task_template_requires_subproject_impact(self) -> None:
with tempfile.TemporaryDirectory() as directory:
root = Path(directory)