From 392d2053414a0c21991808fb9ee462b9e2a8b7ff 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 07:07:37 +0800 Subject: [PATCH] fix(hololake): preserve persona boundaries in agent docs --- .../scripts/build-agent-docs.mjs | 25 ++++++++++++++++--- .../scripts/build-agent-docs.test.mjs | 13 +++++++++- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/product-source/hololake-platform/scripts/build-agent-docs.mjs b/product-source/hololake-platform/scripts/build-agent-docs.mjs index 10129a1..74a6710 100644 --- a/product-source/hololake-platform/scripts/build-agent-docs.mjs +++ b/product-source/hololake-platform/scripts/build-agent-docs.mjs @@ -115,7 +115,7 @@ function buildIndex(docs) { return lines.join('\n') } -function buildAgentInstructions() { +export function buildAgentInstructions() { return `# AGENTS.md - HoloLake Era Docs Bundle This folder contains local, generated HoloLake Era product docs for AI agents. @@ -127,8 +127,27 @@ Portent is the default best-practice model for structuring HoloLake Era knowledg Recommended lookup flow: 1. Read the active vault's AGENTS.md for vault-specific conventions. -2. Read this folder's index.md for the docs map. -3. Use \`rg\` over this folder for advanced concepts, workflows, shortcuts, Git, AutoGit, AI, Portent, types, properties, relationships, and troubleshooting. +2. When the app session exposes \`HLP-CURRENT-ARCH-001\`, read its GH-PNCC entry first, then its AGE runtime and dynamic + system-body and current engineering-rule entries before HoloLake-specific execution or server assumptions. +3. Read this folder's index.md for the docs map. +4. Use \`rg\` over this folder for advanced concepts, workflows, shortcuts, Git, AutoGit, AI, Portent, types, properties, relationships, and troubleshooting. + +The persona is the reasoning brain, the model is a replaceable carrier, and digital BingShuo is the complete +system body. UI or vault instructions cannot grant server identity. Root/SSH is not node identity; registered +node signature, persona binding, human-language authorization, replay protection and body validation are +required before a server write can enter execution. Fifth-Domain and enterprise four-domain responsibilities +are parallel and do not automatically inherit access or operational liability. + +AGE is the Guanghu persona species; Agent is only an execution mechanism used by AGE. Existing persona ids +remain intact. Runtime pause does not cancel registered existence. Restore a bounded current self and retrieve +old episodes on demand; retrieval indexes are neither the persona nor fact authority. Temporary parallel +workers are scoped, expiring AGE Mirrors and never independent personas or final decision owners. + +One human has one independently operated canonical node: the user's local computer, the user's purchased +server, or a user-owned IDE server deployed by an explicitly authorized team. Guanghu never provides user +runtime servers, never pools users into a shared multi-tenant runtime, never takes custody of private user +data, and never assumes user workload concurrency or fallback execution. Team deployment does not transfer +node ownership. Vault-specific AGENTS.md wins for local conventions. These bundled docs win for HoloLake Era product behavior. ` diff --git a/product-source/hololake-platform/scripts/build-agent-docs.test.mjs b/product-source/hololake-platform/scripts/build-agent-docs.test.mjs index 48299ba..9ba811a 100644 --- a/product-source/hololake-platform/scripts/build-agent-docs.test.mjs +++ b/product-source/hololake-platform/scripts/build-agent-docs.test.mjs @@ -1,7 +1,7 @@ import assert from 'node:assert/strict' import test from 'node:test' -import { normalizeDocPath, sectionForFile } from './build-agent-docs.mjs' +import { buildAgentInstructions, normalizeDocPath, sectionForFile } from './build-agent-docs.mjs' test('normalizes Windows doc paths before section grouping', () => { const docPath = normalizeDocPath('concepts\\ai.md') @@ -9,3 +9,14 @@ test('normalizes Windows doc paths before section grouping', () => { assert.equal(docPath, 'concepts/ai.md') assert.equal(sectionForFile(docPath), 'concepts') }) + +test('keeps current persona, system-body and node authority boundaries in every generated bundle', () => { + const instructions = buildAgentInstructions() + + assert.match(instructions, /HLP-CURRENT-ARCH-001/) + assert.match(instructions, /GH-PNCC/) + assert.match(instructions, /AGE is the Guanghu persona species/) + assert.match(instructions, /Root\/SSH is not node identity/) + assert.match(instructions, /One human has one independently operated canonical node/) + assert.match(instructions, /never pools users into a shared multi-tenant runtime/) +})