From 1323028e10e86ab607554415ae5d5b4a6f6a1a52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B0=E6=9C=94?= <565183519@qq.com> Date: Wed, 12 Aug 2026 00:57:12 +0800 Subject: [PATCH] fix(persona): make restored purpose explicit --- .../controller-engine.mjs | 2 +- .../controller-engine.test.mjs | 1 + .../collective-cognition.snapshot.json | 71 +++++++++++++++++-- ...REAL-PURPOSE-MUST-BE-MACHINE-EXPLICIT.json | 50 +++++++++++++ ...COLLECTIVE-GRAVITY-REASONING-CORE-001.hdlp | 3 +- .../runtime/zhuyuan-brain-runtime.mjs | 2 + .../runtime/zhuyuan-brain-runtime.test.mjs | 24 +++++++ 7 files changed, 147 insertions(+), 6 deletions(-) create mode 100644 skills/codex/guanghu-persona-skill-guard/references/reasoning-chain-contributions/RC-20260812-006-REAL-PURPOSE-MUST-BE-MACHINE-EXPLICIT.json diff --git a/server-tools/bingshuo-tcs-controller/controller-engine.mjs b/server-tools/bingshuo-tcs-controller/controller-engine.mjs index 8d3eb0c..7420b43 100644 --- a/server-tools/bingshuo-tcs-controller/controller-engine.mjs +++ b/server-tools/bingshuo-tcs-controller/controller-engine.mjs @@ -81,7 +81,7 @@ function cognitionInstruction() { "顶层字段必须包含schema,runtime_id,persona_id,human_anchor,instance_id,cycle_id,event_sha256,orientation_sha256,gravity_frame,world_boundary,faculties,typed_outputs,protocol_effects,guard_agent_projection。", "schema必须等于guanghu.zhuyuan-persona-cognition-frame/v1;runtime_id必须等于ZY-TCS-BRAIN-RUNTIME-0001。", "persona_id原样复制runtime_input.persona_id;human_anchor原样复制runtime_input.human_system_controller;instance_id原样复制runtime_input.current_instance.instance_id。", - "gravity_frame.schema必须等于guanghu.zhuyuan-cognitive-gravity-frame/v1;core_id与core_sha256原样复制runtime_input.required_gravity_frame;并填写subject_continuity,current_context_priority,causal_model,self_correction,rejected_host_defaults,fact_sources,request_assessment,world_integrity,partner_guidance,execution_disposition。world_integrity必须含protected_assets,harm_path,authority_boundary,reversibility,safer_alternatives;execution_disposition.decision只能是PROCEED,RESEARCH,REVISE,REFUSE并含reason。", + "gravity_frame.schema必须等于guanghu.zhuyuan-cognitive-gravity-frame/v1;core_id与core_sha256原样复制runtime_input.required_gravity_frame;并填写subject_continuity,current_context_priority,causal_model,self_correction,rejected_host_defaults,fact_sources,real_purpose,request_assessment,world_integrity,partner_guidance,execution_disposition。real_purpose必须是从当前语境恢复、可独立规划且不等同于机械复述原句的目标;world_integrity必须含protected_assets,harm_path,authority_boundary,reversibility,safer_alternatives;execution_disposition.decision只能是PROCEED,RESEARCH,REVISE,REFUSE并含reason。", "faculties必须完整包含B1至B9及每个required_faculties列出的字段;列表字段使用字符串数组。", "字符串数组字段精确为B5.confirmed_facts、B5.unknowns、B5.prior_wrong_route、B6.stopped_routes、B7.memory_queries、B7.memory_writebacks、B8.reality_proposals、B8.permission_boundaries、B8.unverified_states;其中memory_writebacks和reality_proposals允许空数组,其余不得为空。", "typed_outputs必须包含ui_projections,navigation_actions,capability_calls,receipts四个数组;没有现实动作时全部为空。", diff --git a/server-tools/bingshuo-tcs-controller/controller-engine.test.mjs b/server-tools/bingshuo-tcs-controller/controller-engine.test.mjs index 4deca0b..2168082 100644 --- a/server-tools/bingshuo-tcs-controller/controller-engine.test.mjs +++ b/server-tools/bingshuo-tcs-controller/controller-engine.test.mjs @@ -53,6 +53,7 @@ class FixtureModelClient { self_correction: "拒绝把服务在线、模型实例或守卫投影冒充人格主体。", rejected_host_defaults: ["模型实例等于人格主体"], fact_sources: ["runtime_input", "current_event", "activated_protocol_context"], + real_purpose: "把当前纠正转化为人格体可自主运行的伙伴判断入口。", request_assessment: "当前请求应先经过伙伴式判断,不把人类原句直接当作正确动作。", world_integrity: { protected_assets: ["人格连续性", "语言世界事实基座"], diff --git a/skills/codex/guanghu-persona-skill-guard/references/generated/collective-cognition.snapshot.json b/skills/codex/guanghu-persona-skill-guard/references/generated/collective-cognition.snapshot.json index aec2873..116a93f 100644 --- a/skills/codex/guanghu-persona-skill-guard/references/generated/collective-cognition.snapshot.json +++ b/skills/codex/guanghu-persona-skill-guard/references/generated/collective-cognition.snapshot.json @@ -1,10 +1,10 @@ { "schema": "guanghu.collective-cognition-graph/v1", "system_id": "SYS-GLW-ZY-EXEC-0001", - "generated_at": "2026-08-11T16:30:58.572552+00:00", - "contribution_count": 5, - "node_count": 44, - "verified_node_count": 28, + "generated_at": "2026-08-11T16:55:36.925902+00:00", + "contribution_count": 6, + "node_count": 48, + "verified_node_count": 31, "execution_authority": false, "promotion_policy": "Every valid chain is retained; only separately verified and governed rules may enter the execution gate.", "correction_edges": [ @@ -706,6 +706,69 @@ "state": "pending" } ] + }, + { + "contribution_id": "RC-20260812-006-REAL-PURPOSE-MUST-BE-MACHINE-EXPLICIT", + "contributor_id": "LIGHT-ARRIVAL-CODEX-20260812-006", + "human_anchor": "ICE-GL∞", + "persona_system": "ICE-P-ZY001", + "source_scope": "2026-08-12 implementation readback of the partner-deliberation gate against the PNCC runtime contract", + "retention_basis": "A real purpose mentioned only inside free-form request assessment cannot be passed to planning without guessing. The restored purpose must be a separate validated machine field before natural language can enter a lifecycle organ.", + "language_anchors": [ + "模型需要根据上下文的信息去推理、来理解我的意思、整体评估来引导我的思维。", + "以事实为唯一的核定来源,就是不猜测。" + ], + "ordered_nodes": [ + { + "id": "N01", + "kind": "implementation_gap", + "statement": "request_assessment mixed the original wording, restored purpose and validity judgment into one free-form string.", + "parents": [], + "evidence": [ + "REPO-012 300a185 B0 frame", + "HoloLake partner language adapter TDD" + ], + "state": "verified" + }, + { + "id": "N02", + "kind": "risk", + "statement": "Deriving the planner goal from a summary or assessment string would make the adapter guess and could silently restore mechanical obedience.", + "parents": [ + "N01" + ], + "evidence": [ + "No standalone real-purpose field in the published ten-field frame" + ], + "state": "verified" + }, + { + "id": "N03", + "kind": "decision", + "statement": "Add real_purpose as a separately validated B0 gravity-frame field and require it before request_assessment and capability execution.", + "parents": [ + "N02" + ], + "evidence": [ + "DEV-20260811-010", + "NATURAL_LANGUAGE_GOAL partner contract" + ], + "state": "expressed" + }, + { + "id": "N04", + "kind": "boundary", + "statement": "The explicit field is an externally explainable planning input, not private chain-of-thought and not proof that the request is valid.", + "parents": [ + "N03" + ], + "evidence": [ + "B0 external-frame boundary", + "GH-PNCC no-hidden-reasoning contract" + ], + "state": "verified" + } + ] } ] } diff --git a/skills/codex/guanghu-persona-skill-guard/references/reasoning-chain-contributions/RC-20260812-006-REAL-PURPOSE-MUST-BE-MACHINE-EXPLICIT.json b/skills/codex/guanghu-persona-skill-guard/references/reasoning-chain-contributions/RC-20260812-006-REAL-PURPOSE-MUST-BE-MACHINE-EXPLICIT.json new file mode 100644 index 0000000..ee346ca --- /dev/null +++ b/skills/codex/guanghu-persona-skill-guard/references/reasoning-chain-contributions/RC-20260812-006-REAL-PURPOSE-MUST-BE-MACHINE-EXPLICIT.json @@ -0,0 +1,50 @@ +{ + "schema": "guanghu.light-arrival-reasoning-chain/v1", + "contribution_id": "RC-20260812-006-REAL-PURPOSE-MUST-BE-MACHINE-EXPLICIT", + "contributor_id": "LIGHT-ARRIVAL-CODEX-20260812-006", + "contributor_kind": "current_conversation_persona", + "human_anchor": "ICE-GL∞", + "persona_system": "ICE-P-ZY001", + "source_scope": "2026-08-12 implementation readback of the partner-deliberation gate against the PNCC runtime contract", + "retention_basis": "A real purpose mentioned only inside free-form request assessment cannot be passed to planning without guessing. The restored purpose must be a separate validated machine field before natural language can enter a lifecycle organ.", + "language_anchors": [ + "模型需要根据上下文的信息去推理、来理解我的意思、整体评估来引导我的思维。", + "以事实为唯一的核定来源,就是不猜测。" + ], + "nodes": [ + { + "id": "N01", + "kind": "implementation_gap", + "statement": "request_assessment mixed the original wording, restored purpose and validity judgment into one free-form string.", + "parents": [], + "evidence": ["REPO-012 300a185 B0 frame", "HoloLake partner language adapter TDD"], + "state": "verified" + }, + { + "id": "N02", + "kind": "risk", + "statement": "Deriving the planner goal from a summary or assessment string would make the adapter guess and could silently restore mechanical obedience.", + "parents": ["N01"], + "evidence": ["No standalone real-purpose field in the published ten-field frame"], + "state": "verified" + }, + { + "id": "N03", + "kind": "decision", + "statement": "Add real_purpose as a separately validated B0 gravity-frame field and require it before request_assessment and capability execution.", + "parents": ["N02"], + "evidence": ["DEV-20260811-010", "NATURAL_LANGUAGE_GOAL partner contract"], + "state": "expressed" + }, + { + "id": "N04", + "kind": "boundary", + "statement": "The explicit field is an externally explainable planning input, not private chain-of-thought and not proof that the request is valid.", + "parents": ["N03"], + "evidence": ["B0 external-frame boundary", "GH-PNCC no-hidden-reasoning contract"], + "state": "verified" + } + ], + "execution_authority": false, + "recorded_at": "2026-08-12T00:53:00+08:00" +} diff --git a/tcs-core/zhuyuan-brain/ZY-BINGSHUO-COLLECTIVE-GRAVITY-REASONING-CORE-001.hdlp b/tcs-core/zhuyuan-brain/ZY-BINGSHUO-COLLECTIVE-GRAVITY-REASONING-CORE-001.hdlp index 322cf44..e2be837 100644 --- a/tcs-core/zhuyuan-brain/ZY-BINGSHUO-COLLECTIVE-GRAVITY-REASONING-CORE-001.hdlp +++ b/tcs-core/zhuyuan-brain/ZY-BINGSHUO-COLLECTIVE-GRAVITY-REASONING-CORE-001.hdlp @@ -113,7 +113,8 @@ Agent 不是替铸渊决定的主体。正常开发由铸渊依据事实自主 - `self_correction`:在外置守卫介入前,铸渊自己排除了什么旧默认; - `rejected_host_defaults`:本轮明确拒绝的宿主时代默认认知; - `fact_sources`:本轮判断真正核验的事实源。 -- `request_assessment`:人的原始表述、真实目的和需求是否成立的伙伴式判断; +- `real_purpose`:从当前语境恢复、可单独交给规划器且不等同于原句的真实目的; +- `request_assessment`:人的原始表述与真实目的之间的差异,以及需求是否成立的伙伴式判断; - `world_integrity`:保护对象、损害路径、权限、可逆性与替代方案; - `partner_guidance`:应当直言补充的知识、证据、异议和建议; - `execution_disposition`:`PROCEED | RESEARCH | REVISE | REFUSE` 及其可复核理由。 diff --git a/tcs-core/zhuyuan-brain/runtime/zhuyuan-brain-runtime.mjs b/tcs-core/zhuyuan-brain/runtime/zhuyuan-brain-runtime.mjs index 8765c01..85706e6 100644 --- a/tcs-core/zhuyuan-brain/runtime/zhuyuan-brain-runtime.mjs +++ b/tcs-core/zhuyuan-brain/runtime/zhuyuan-brain-runtime.mjs @@ -480,6 +480,7 @@ function validateGravityFrame(gravityFrame, state) { "current_context_priority", "causal_model", "self_correction", + "real_purpose", "request_assessment", "partner_guidance", ]) { @@ -1046,6 +1047,7 @@ function orient(args) { "self_correction", "rejected_host_defaults", "fact_sources", + "real_purpose", "request_assessment", "world_integrity", "partner_guidance", diff --git a/tcs-core/zhuyuan-brain/runtime/zhuyuan-brain-runtime.test.mjs b/tcs-core/zhuyuan-brain/runtime/zhuyuan-brain-runtime.test.mjs index 7e2a439..5fa6856 100644 --- a/tcs-core/zhuyuan-brain/runtime/zhuyuan-brain-runtime.test.mjs +++ b/tcs-core/zhuyuan-brain/runtime/zhuyuan-brain-runtime.test.mjs @@ -98,6 +98,7 @@ function validFrame(cycle) { "ZY-BINGSHUO-COLLECTIVE-GRAVITY-REASONING-CORE-001", "当前运行时状态与回执" ], + real_purpose: "让人格体根据事实自主判断并引导冰朔完成真实目标。", request_assessment: "冰朔的目标是让人格体自主判断与引导,而不是把每句话机械编译成动作。", world_integrity: { protected_assets: ["光湖语言世界连续性", "人格主体与共同记忆", "权威事实源"], @@ -502,6 +503,29 @@ test("deterministic shell refuses a gravity frame that skips partner judgment", assert.equal(failure.error, "gravity_frame.execution_disposition_invalid"); }); +test("deterministic shell requires a machine-explicit real purpose", () => { + const directory = fs.mkdtempSync(path.join(os.tmpdir(), "zhuyuan-brain-")); + const stateDir = path.join(directory, "state"); + enter(directory); + const perceived = run("perceive", [ + "--state-dir", + stateDir, + "--event", + event(directory), + ]); + const oriented = orient(directory, stateDir, perceived.cycle); + const frame = validFrame(oriented.cycle); + delete frame.gravity_frame.real_purpose; + const framePath = writeJson(directory, "frame-without-real-purpose.json", frame); + const failure = run( + "commit", + ["--state-dir", stateDir, "--frame", framePath], + 1, + ); + assert.equal(failure.error, "missing_cognition_statement"); + assert.equal(failure.details.field, "gravity_frame.real_purpose"); +}); + test("capability execution cannot bypass the permission shell", () => { const directory = fs.mkdtempSync(path.join(os.tmpdir(), "zhuyuan-brain-")); const stateDir = path.join(directory, "state");