From 6b4acaff13ad2fe6c5738798bf5011b0c3be8782 Mon Sep 17 00:00:00 2001 From: ymq Date: Fri, 21 Aug 2026 18:41:15 +0800 Subject: [PATCH] =?UTF-8?q?fix(sdlc):=20=E7=9B=AE=E5=BD=95=E5=B1=82=20esse?= =?UTF-8?q?ntial=20=E5=9F=BA=E7=A1=80=E8=A7=84=E8=8C=83=E4=BC=98=E5=85=88?= =?UTF-8?q?=E6=8E=92=E5=BA=8F=E2=80=94=E2=80=94project-directory-spec=20?= =?UTF-8?q?=E7=AD=89=20essential=20=E6=8A=80=E8=83=BD=E6=8E=92=E6=9C=80?= =?UTF-8?q?=E5=89=8D=EF=BC=8C=E4=B8=8D=E8=A2=AB=2060=20=E4=B8=AA=E6=88=AA?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pipeline_service/agent_loop.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pipeline_service/agent_loop.py b/pipeline_service/agent_loop.py index 7310bd0..d544402 100644 --- a/pipeline_service/agent_loop.py +++ b/pipeline_service/agent_loop.py @@ -1026,7 +1026,8 @@ async def _build_role_skills_block(sor, project_id, role, org_id=""): if not merged: return "" skills = sorted(merged.values(), - key=lambda s: -SCOPE_PRIORITY.get(getattr(s, 'scope', ''), 0)) + key=lambda s: (-int(getattr(s, 'essential', False)), + -SCOPE_PRIORITY.get(getattr(s, 'scope', ''), 0))) lines = ["## 可用技能(目录,按需用 load_skill 加载全文;优先级 角色>项目>产线>组织>通用)"] for s in skills[:60]: tag = SCOPE_TAG.get(getattr(s, 'scope', ''), getattr(s, 'scope', ''))