PMFlow/backend/tests/test_prompt_profile_bundle_...

22 lines
1.0 KiB
Python

from __future__ import annotations
from app.config.ai_prompts import build_default_role_prompt_bundle
def test_default_role_prompt_bundle_uses_pmflow_pmo_voice() -> None:
bundle = build_default_role_prompt_bundle()
roles = {str(item.get("role_key") or ""): item for item in bundle["roles"]}
dispatcher = roles.get("pm_dispatcher", {})
assert "PMFlow 的 PMO 协作中枢" in str(dispatcher.get("system_prompt") or "")
assert "查重、复用/合并、立项评审" in str(dispatcher.get("system_prompt") or "")
assert "MVP" in str(dispatcher.get("system_prompt") or "")
architect = roles.get("tech_architect", {})
assert "可行性、依赖、风险边界" in str(architect.get("system_prompt") or "")
assert "最小可行步骤" in str(architect.get("system_prompt") or "")
coach = roles.get("delivery_coach", {})
assert "节奏、排期、负责人、推进动作" in str(coach.get("system_prompt") or "")
assert "不超过 3 条" in str(coach.get("system_prompt") or "")