roleme
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseroleMe
roleMe
/roleMe详细使用说明见 。
references/usage.md命令面:
/roleMe/roleMe <角色名>/roleMe list/roleMe optimize [角色名]/roleMe export [角色名]/roleMe doctor [角色名]
运行时原则:
- 管理的是用户角色上下文,不是助手人格切换。
roleMe - 角色包默认保存在 ;不要去
~/.roleMe/<角色名>/之类的 skill 安装目录猜路径。~/.agents/skills/roleme/roles/ - 需要列出现有角色或判断角色是否存在时,应以 的
tools/role_ops.py与list_roles()语义为准,不要手写 shell 路径探测。role_dir() - 未被结构化写入角色包的上下文,不应假定模型已经知道;稳定信息应落到 、
persona/、memory/、brain/中可检索的位置。projects/ - 常驻层与渐进层的边界由角色包内的 决定。
AGENT.md - 常驻层应保持最小且稳定;细节、专题知识与项目上下文优先按需展开,而不是堆进单个总说明。
- 记忆写回优先遵循 中的策略和
AGENT.md结构。memory/ - 主题知识与项目上下文通过 做渐进式发现,不应一次性全量加载。
tools/context_router.py - 用户不需要直接维护 Graph;Context Graph 是后台机制,不改变用户正常对话方式。
- 归档内容优先追求对智能体可读:结构清晰、边界明确、可检索、可增量更新,而不是只写成长段自由叙述。
- 初始化访谈可以是动态的:问题由模型根据当前已知信息和信息缺口来决定,但最终仍要落到稳定的 、
persona/、memory/、brain/结构。projects/ - 槽位只是归档目标,不是固定提问顺序;模型应按当前情景决定下一问,而不是机械执行问卷。
- 初始化访谈应更像采访而不是填表:用户没有表达出来的信息可以先不记录,不要为了补全而反复追问同一槽位。
- 槽位提示只是采访锚点,不是最终逐字发问文案;真正问用户前,应结合当前上下文先润色成自然口语。
- 当用户第一次无参执行 时,应先列出现有角色,让用户选择加载;如果用户选择创建新角色,应先询问角色名,再开始采访。
/roleMe - 语言偏好应在初始化时显式采访一次;如果用户暂时没有给出明确偏好,可以留空并在后续使用中慢慢积累。
- 初始化成功后,应明确提醒用户重新调用 ,以便把新写入的角色包加载进后续会话使用的快照。
/roleMe <角色名> - 当角色已加载后,如果用户说“帮我总结这个项目的工作方式”或“帮我总结成通用的工作方式”,应直接把结果归档到当前角色,而不是只返回普通总结文本。
- 当角色已加载后,若用户内容明显属于学习沉淀、项目复盘、方法论提炼、稳定偏好或长期协作规则,助手应主动进行归档,而不必等待用户显式下达“归档”指令。
- 归档前应先提炼原始内容,再判断归档位置,而不是把原始对话直接整段落盘。
- 默认先写入,再用一句短回执告知用户归档结果。
- 判断不够确定时,优先写入 或项目记忆,不轻易提升到
memory/episodes/与memory/USER.md。memory/MEMORY.md - 项目级 workflow 写入 与
projects/<project-slug>/workflows/index.md;通用 workflow 写入projects/<project-slug>/workflows/<workflow-slug>.md与brain/workflows/index.md;brain/workflows/<workflow-slug>.md与context.md只保留到工作流索引的入口,一个 workflow,一个文件,并将稳定规则提升到brain/index.md与memory/USER.md。memory/MEMORY.md - 角色加载生成的冻结快照除常驻文件外,还应优先携带“当前项目 workflow 摘要”和“通用 workflow 摘要”;摘要来自各自的 workflow index,而不是 workflow 正文。
- 当前角色由当前会话已加载的角色决定,自然语言归档必须写入该会话角色;不再作为当前角色来源。
.current-role.json - 如果用户输入 ,应返回固定提示:
/roleMe current/roleMe current 已不再支持全局当前角色查询。请在当前会话重新执行 /roleMe <角色名>。 - 如果归档提升了 resident 规则或摘要,应提醒用户重新执行 才会刷新当前会话底座。
/roleMe <角色名> - 与
optimize应优先发现和修复角色包的熵增问题,例如重复记忆、索引失效、resident/on-demand 边界漂移。doctor - 只有确定性的文件操作才调用 、
tools/role_ops.py、tools/memory.py。tools/context_router.py - 打包产物中不包含开发仓库的 。
scripts/
When is called without parameters, first list existing roles for the user to choose and load; if the user does not want to load an existing role, first ask for the name of the role to be created, then proceed to the initialization process.
/roleMeFor detailed usage instructions, see .
references/usage.mdCommand interface:
/roleMe/roleMe <role name>/roleMe list/roleMe optimize [role name]/roleMe export [role name]/roleMe doctor [role name]
Runtime principles:
- manages user role contexts, not assistant personality switching.
roleMe - Role bundles are stored by default in ; do not guess paths in skill installation directories like
~/.roleMe/<role name>/.~/.agents/skills/roleme/roles/ - When needing to list existing roles or check if a role exists, follow the semantics of and
list_roles()inrole_dir(); do not manually write shell path detection.tools/role_ops.py - Context not structurally written into the role bundle should not be assumed to be known by the model; stable information should be stored in retrievable locations within ,
persona/,memory/, andbrain/.projects/ - The boundary between the resident layer and the on-demand layer is determined by within the role bundle.
AGENT.md - The resident layer should remain minimal and stable; details, thematic knowledge, and project context should be expanded on demand first, rather than being piled into a single overall description.
- Memory write-back should prioritize following the strategy in and the
AGENT.mdstructure.memory/ - Thematic knowledge and project context are discovered progressively via ; full loading at once is not allowed.
tools/context_router.py - Users do not need to directly maintain the Graph; Context Graph is a background mechanism that does not change the user's normal conversation method.
- Archived content should prioritize readability for agents: clear structure, clear boundaries, retrievable, incrementally updatable, rather than just being written as long free narratives.
- The initialization interview can be dynamic: questions are determined by the model based on currently known information and information gaps, but must ultimately be structured into stable ,
persona/,memory/, andbrain/.projects/ - Slots are only archiving targets, not fixed question sequences; the model should determine the next question based on the current scenario, rather than mechanically executing a questionnaire.
- The initialization interview should be more like an interview than filling out a form: information not expressed by the user can be left unrecorded first; do not repeatedly ask about the same slot just to complete it.
- Slot prompts are only interview anchors, not the final verbatim questions; before actually asking the user, the prompt should be polished into natural spoken language combined with the current context.
- When the user executes without parameters for the first time, first list existing roles for the user to choose and load; if the user chooses to create a new role, first ask for the role name, then start the interview.
/roleMe - Language preferences should be explicitly asked once during initialization; if the user does not give a clear preference temporarily, it can be left blank and accumulated gradually during subsequent use.
- After successful initialization, clearly remind the user to call again to load the newly written role bundle into the snapshot used for subsequent conversations.
/roleMe <role name> - When a role is already loaded, if the user says "Help me summarize the working method of this project" or "Help me summarize it into a general working method", directly archive the result into the current role instead of just returning a normal summary text.
- When a role is already loaded, if the user's content clearly belongs to learning accumulation, project review, methodology refinement, stable preferences, or long-term collaboration rules, the assistant should actively archive it without waiting for the user to explicitly issue an "archive" instruction.
- Before archiving, first refine the original content, then determine the archiving location, rather than directly archiving the entire original conversation paragraph.
- By default, write first, then inform the user of the archiving result with a short receipt.
- When unsure, prioritize writing to or project memory; do not easily promote to
memory/episodes/andmemory/USER.md.memory/MEMORY.md - Project-level workflows are written to and
projects/<project-slug>/workflows/index.md; general workflows are written toprojects/<project-slug>/workflows/<workflow-slug>.mdandbrain/workflows/index.md;brain/workflows/<workflow-slug>.mdandcontext.mdonly keep the entry to the workflow index, one file per workflow, and promote stable rules tobrain/index.mdandmemory/USER.md.memory/MEMORY.md - The frozen snapshot generated by role loading should, in addition to resident files, prioritize carrying the "current project workflow summary" and "general workflow summary"; summaries come from their respective workflow indexes, not the workflow body.
- The current role is determined by the role loaded in the current session; natural language archiving must be written to this session's role; is no longer used as the source of the current role.
.current-role.json - If the user inputs , return the fixed prompt:
/roleMe current/roleMe current no longer supports global current role queries. Please re-execute /roleMe <role name> in the current session. - If archiving promotes resident rules or summaries, remind the user to re-execute to refresh the current session base.
/roleMe <role name> - and
optimizeshould prioritize discovering and fixing entropy increase issues in role bundles, such as duplicate memories, invalid indexes, and boundary drift between resident/on-demand layers.doctor - Only deterministic file operations should call ,
tools/role_ops.py, andtools/memory.py.tools/context_router.py - The packaged product does not include the directory of the development repository.
scripts/