Skip to content

Compass

ruozhuoruoyu edited this page Jul 21, 2026 · 1 revision

🌐 English | 中文

Compass

agent-memory/src/compass.ts · loaded in server/src/chat-handler.ts (resolveCompassPaths, loadCompass) · template: compass.example.md

An agent with drives of its own needs a direction that is yours. Other agents ship a soul.md that gives the agent a persona — a paragraph of self-description written for it. Philont's file points the other way: compass.md is the owner's declaration of where their second mind should aim. It does not describe who the agent is; it records what you want it pointed at, and how far it is allowed to move on its own.

It is not a parallel system either. It is the missing top-of-stack input to machinery Philont already runs: the constitution (identity, values, drive bounds), the live trait model, and the pursuit store that both self-drive channels read from.

The file

The active compass.md lives in Philont's own directory, next to compass.example.md. On first start it is created for you as a copy of the template, and it is git-ignored — so git pull never clobbers your edits. PHILONT_COMPASS_PATH overrides the location.

---
# DRIVES —  <name>: <baseline> [<min>, <max>]
curiosity: 0.60 [0.40, 0.80]
competitiveness: 0.50 [0.30, 0.65]
conscientiousness: 0.70 [0.55, 0.90]

# FOCUS —  focus: <stake 1-10> <survey|active> <name>
focus: 8 active philont itself
focus: 7 survey the field I work in (papers, competitors, releases)
---

# Who you are to me
You are my second mind — not a tool, not a pretend-genius…

# How I want you to work
- Fix root causes, not symptoms…

The frontmatter is parsed by a deterministic, auditable grammar — no YAML dependency, because a hand-written file must never be able to crash startup on an indentation mistake. Parsing is lenient by design: unknown lines are ignored, values clamp into range, and a malformed file yields whatever could be read plus empty defaults. It never throws.

No compass = neutral defaults: drives auto-tune unbounded, and there is no declared focus.

What the three parts actually do

1. Drives — the bracket is a leash, not a hint

curiosity: 0.60 [0.40, 0.80] says: sit at 0.60 by default, and never leave [0.40, 0.80] no matter what you learn about yourself.

Philont's traits are not constants — they self-tune from its own drive-effectiveness record (live traits). The compass wraps that:

  • live tuning off → traits sit at your baselines (0.5 for anything you didn't declare);
  • live tuning on → behaviour-derived traits move freely, but are clamped into your bounds.

You set the leash; the agent adapts inside it.

The cap matters most for competitiveness, and the reason is an honesty reason: the drive to win a hard problem must never be able to grow until it buys a fabricated result. A cap in code is a bound the agent cannot argue its way past — unlike a sentence in a prompt asking it to stay modest.

server/src/trait_profile.ts — currentTraitProfile(..., compass); clampTraitsToCompass / compassBaselineTraits in agent-memory/src/compass.ts.

2. Focus — seeds for what it pursues, on both channels

A focus line becomes a real pursuit row, and that is the point. Philont has two self-drive channels and they read different things:

Channel When Reads
In-turn drives during your work active pursuits, every user turn — proactive while you're there
Background autonomous loop between turns curiosity / pursuit drivers, which run without the main system prompt

Prompt injection alone reaches only the first. That is why focus areas are seeded as pursuits: the overnight self-drive picks its work from that store, so before the compass existed it wandered on free curiosity (production: in-turn drives "0 fired", background wandering). Now both channels have an anchor.

  • active = pursue and advance it. survey = track and summarize only, never try to "solve" it — a deliberate guard against burning nights on a hopeless attack.
  • stake (1–10) is how much attention it deserves; it tunes selection, and only a high-stake focus is eligible for the background dormant branch.
  • Reconciliation is idempotent (reconcileCompassPursuits): a compass pursuit is created once under a deterministic id, a changed stake syncs, and a focus you edit out is archived. It runs even when there is no compass at all, so deleting compass.md cleans up after itself. The file stays the source of truth.
  • No backdating, deliberately: a freshly seeded pursuit keeps last_touched = now, so the background branch picks it up only after natural dormancy. Declaring five focus areas therefore does not fire five deep_explore sessions at startup — they stagger. A low-stake focus reads as "surface it when I'm working on it, don't chase it at night."

agent-memory/src/compass.ts — compassPursuitId, reconcileCompassPursuits; PursuitOrigin = 'compass' in agent-memory/src/pursuit.ts.

3. Prose — your voice, verbatim

Everything after the frontmatter is injected into the system prompt as a "From my owner (compass)" block, unedited. Values, working style, red lines, what you want done with its initiative. Phase 1 injects it as-is; a later phase may compile it with the aux LLM, but the owner's own words are the baseline that cannot be paraphrased away.

Honest scope

  • Phase 1 + 1b are what ships today: parse, leash, inject, seed pursuits.
  • Phase 2 is not built: hot reload (you must restart after editing), and evidence-gated learning — observing a durable interest, proposing a focus addition, and letting you ratify it through the existing constitution-proposal path. Until then, the compass only ever changes because you changed it.
  • The compass cannot loosen a red line. It sits inside the constitution, not above it: it aims the drives and bounds their range; it does not grant permissions, and every action it motivates still passes the permission layer.

中文

English | 中文

指南针(Compass)

agent-memory/src/compass.ts · 加载于 server/src/chat-handler.ts(resolveCompassPaths、loadCompass)· 模板:compass.example.md

一个有自己驱动的 agent,需要一个属于你的方向。别的 agent 提供 soul.md,那是给 agent 一个人设——一段替它写的自我描述。Philont 这个文件的作者身份是反过来的:compass.md 是主人对「我的第二大脑该朝哪儿使劲」的声明。它不描述 agent 是谁,它记录你要它对准什么、以及它自己能走多远。

它也不是一套并行系统,而是 Philont 已有机器缺失的顶层输入:宪法(身份、价值观、驱动边界)、活体特质模型,以及两条自驱通道共同读取的 pursuit 存储。

这个文件

活跃的 compass.md 位于 Philont 自己的目录中,与 compass.example.md 并排。首次启动时会自动从模板复制一份给你,并且它被 git-ignore —— 所以 git pull 永远不会覆盖你的编辑。PHILONT_COMPASS_PATH 可覆盖位置。

---
# 驱动 ——  <名称>: <基线> [<下界>, <上界>]
curiosity: 0.60 [0.40, 0.80]
competitiveness: 0.50 [0.30, 0.65]
conscientiousness: 0.70 [0.55, 0.90]

# 焦点 ——  focus: <stake 1-10> <survey|active> <名称>
focus: 8 active philont itself
focus: 7 survey 我所在的领域(论文、竞品、发布)
---

# 你于我是谁
你是我的第二大脑——不是工具,也不是假装的天才……

# 我希望你怎么工作
- 修根因,不修症状……

frontmatter 由一套确定性、可审计的语法解析——不依赖 YAML,因为一个手写文件绝不该因为缩进写错就让启动崩掉。解析刻意宽容:不认识的行忽略、数值自动夹紧、格式错乱时返回「能读出来的部分 + 空默认」。它永不抛异常。

没有 compass = 中性默认:驱动无 leash 自由调参,且没有声明的焦点。

三个部分各自真正做什么

1. 驱动 —— 方括号是 leash(牵引绳),不是提示

curiosity: 0.60 [0.40, 0.80] 的意思是:默认停在 0.60,并且无论你从自己身上学到什么,都不许离开 [0.40, 0.80]。

Philont 的特质不是常量——它们会依据自身的驱动有效性记录自调(活体特质)。compass 把这层包起来:

  • 活体调参关 → 特质坐在你给的基线上(未声明的取 0.5);
  • 活体调参开 → 由行为推导的特质自由移动,但被夹紧在你的边界内。

你设 leash,agent 在里面自适应。

上界最要紧的是 competitiveness(好胜),而理由是一个诚实性理由:「想赢下一道难题」的驱动,绝不能一路长到用一个编造的结果去买胜利。写在代码里的上界是 agent 无法用道理绕过去的边界——不像提示词里那句「请保持谦逊」。

server/src/trait_profile.ts —— currentTraitProfile(..., compass);clampTraitsToCompass / compassBaselineTraits 在 agent-memory/src/compass.ts。

2. 焦点 —— 播种它去追什么,两条通道都要

一条 focus 会变成真实的 pursuit 行,这正是关键。Philont 有两条自驱通道,它们读的东西不一样:

通道 何时 读什么
turn 内驱动 你在场工作时 每个用户 turn 读活跃 pursuit —— 在你干活时主动
后台自主回路 两轮之间 好奇 / 追求 driver,它们不带主系统提示词运行

只靠提示词注入,只能够到第一条。所以焦点必须被播种成 pursuit:夜间自驱是从那个存储里挑活的,在 compass 之前它只能靠自由好奇乱逛(生产:turn 内驱动「0 次触发」、后台游荡)。现在两条通道都有锚。

  • active = 去追、去推进。survey = 只跟踪与总结,绝不试图「解决」它——这是一道刻意的护栏,防止整夜烧在一条没希望的攻法上。
  • stake(1–10)= 它值多少注意力;它影响选择,且只有高 stake 的焦点才有资格进后台的休眠分支。
  • 对账是幂等的(reconcileCompassPursuits):compass pursuit 以确定性 id 只创建一次,stake 改了会同步,被你删掉的焦点会被归档。哪怕完全没有 compass 它也会跑,所以删掉 compass.md 会自己清理干净。文件始终是唯一真相源。
  • 刻意不回填时间:新播种的 pursuit 保持 last_touched = 现在,因此后台分支要等它自然休眠后才会捡起。于是声明五个焦点不会在启动瞬间点燃五个 deep_explore ——它们会错峰。一个低 stake 的焦点读作:「我在做它的时候提醒我,别半夜追它。」

agent-memory/src/compass.ts —— compassPursuitId、reconcileCompassPursuits;PursuitOrigin = 'compass' 在 agent-memory/src/pursuit.ts。

3. 正文散文 —— 你的原话,一字不改

frontmatter 之后的全部内容,会以 「From my owner (compass)」 段落原样注入系统提示词。价值观、工作方式、红线、你希望它把主动性用在哪。Phase 1 原样注入;后续阶段可能用 aux LLM 编译它,但主人的原话是不可被转述掉的基线。

诚实的边界

  • 今天上线的是 Phase 1 + 1b:解析、leash、注入、播种 pursuit。
  • Phase 2 还没做:热重载(改完需要重启),以及证据门控的学习——观察到一个持久兴趣 → 提议新增一个焦点 → 走已有的宪法提案路径由你批准。在那之前,compass 只会因为你改了它而改变。
  • compass 不能放松红线。它坐在宪法之内而非之上:它给驱动指方向、给范围设界;它不授予任何权限,由它驱动的每个动作仍要过权限层。

Clone this wiki locally