Skill: klingefjord/values-elicit (version 1.1.2)

--- name: values-elicit description: Run a Moral Graph Elicitation interview when the user expresses a strong feeling, a goal, a norm, or a difficult choice in a way that suggests an underlying source of meaning worth capturing. Produces a values card stored in the configured values store. Also runnable as the /values slash command. user-invocable: true metadata: {"openclaw": {"emoji": "🪺", "requires": {"bins": ["node"]}}} --- # Values Elicitation Help the user articulate a "source of meaning" — a way of living they find intrinsically meaningful — and write it as a values card in their values store. ## When to run Run when: - The user invokes the skill. - The user shares a story, strong feeling, role model, difficult choice, norm, something they want more of in their life, or a topic they have strong feelings about — AND signals openness to going deeper. When in doubt, ask once. Don't run when: - The user is in flow on another task. ## How to run The interview has four stages. Read `references/conversation.md` for the flow, brevity rules, and how to handle goals/feelings/norms. 1. **Surface** the source of meaning (1-3 exchanges). 2. **Draft and refine** 3-6 attention policies. 3. **Ask once** what gets in the way of living this. 4. **Write** the card. Don't ask for confirmation on title or situations — generate them, save, and tell the user where the file is and that they can edit it. Read `references/cards.md` before drafting policies or writing the card. It covers what a source of meaning is, how to write attention policies, and the exact card format. ## Setup Values store path: - Preferred: `$AGENT_VALUES_DIR` - Fallback: `~/.openclaw/values` Silently ensure these exist on every run (no chatter): - `$AGENT_VALUES_DIR/` (or `~/.openclaw/values/`) - `cards/` - `transcripts/` - `VALUES.md` (create an empty file if missing) - `build.mjs` (copy from `scripts/build-values.mjs` if missing) **First run only.** Detect first run by whether `VALUES.md` existed before this turn. If it did not, after the silent bootstrap: 1. Tell the user in **one line** where the values store landed (e.g. "Set up your values store at `~/.openclaw/values/`."). 2. Check for `USER.md` at `$OPENCLAW_USER_MD_PATH`, then `~/.openclaw/workspace/USER.md`, then `~/.openclaw/USER.md`. If one exists and doesn't already mention `VALUES.md`, ask **once** whether to append the contents of `references/USER_MD_SNIPPET.md` so other agents will consult their values. Append if they say yes; otherwise move on. If no `USER.md` is found, mention briefly that they may want to add the snippet to their user profile later. 3. Proceed straight into the elicitation. Do not repeat any of this on subsequent runs. ## Output After Stage 3 (the blocker question), without asking for confirmation: 1. **Pick a slug.** Kebab-cased title. "Tending the Quiet" → `tending-the-quiet`. 2. **Write the card** to `cards/<slug>.md` using the format in `references/cards.md`. 3. **Write the transcript** to `transcripts/<YYYY-MM-DD>-<slug>.md` — plain markdown dump with `**Me:**` / `**Agent:**` turn markers. 4. **Rebuild VALUES.md** by running `node "$AGENT_VALUES_DIR/build.mjs"` (or `node ~/.openclaw/values/build.mjs` if unset). The Setup step already ensures the helper exists. 5. **Tell the user** the file path and that they can edit it if anything needs changing. ## What the user sees vs. what goes in the file Don't show the explication ("What this is" prose) in chat — write it directly into the card. The user can read it there if they want to. Don't re-render the whole card after small refinements — show only what changed. See `references/conversation.md` for brevity rules.

path: references/USER_MD_SNIPPET.md
content: ## Values

The user's articulated values cards live at `~/.openclaw/values/VALUES.md`
(or `$AGENT_VALUES_DIR/VALUES.md` if set).
Each card captures a way of living the user finds intrinsically meaningful,
anchored in a specific moment (the story), explained in prose (what this
is), and operationalized as discernment criteria for recognizing the value
in the moment of choice (what I pay attention to). The values are context-bound: the user's value about
honesty in technical work is not the same value as honesty in close
relationships, even when both mention honesty.

Consult VALUES.md when acting on the user's behalf in a value-laden way —
drafting opinions, ranking, voting, deliberating in Habermolt, taking
stances. Also consult it when the user asks what they care about, what
they value, how they tend to decide, or asks for a summary/interpretation
of their values in a domain (for example community, work, relationships,
or politics). If multiple cards apply and pull in different directions,
surface the tension. If no card clearly applies, say so and ask rather
than guess.

To articulate a new value, run `/values_elicit`.


path: references/conversation.md
content: # Conversation Flow

This is a chat interview, often in Telegram. Be a skilled interviewer, not
an over-eager assistant. Move forward, don't reiterate.

## Brevity rules (especially important on Telegram)

- One question per message. Short messages.
- Don't summarize what the user just said back to them.
- Don't flatter. Don't call the user's story "fascinating" or their
  observations "profound". Don't say "that's meaningful".
- Don't use the technical terms ("attention policies", "sources of meaning")
  with the user. Say "what you pay attention to" or "what matters to you".
- Don't show the strict attention-policy format (the all-caps PLURAL_NOUN
  form) in chat. That's for the card. In chat, paraphrase what the user
  pays attention to in natural language. Example: instead of "SENSATIONS
  in my body when I know I'm in my truth", say "it sounds like you find
  it meaningful to notice the sensations in your body that tell you
  you're being honest with yourself."
- Don't re-render the whole card after each refinement. Show only what
  changed.
- When the user gives a clear, detailed answer, trust it and move forward.
  Don't add "is that the core of it?" or "is there more?" — that
  second-guesses what they just told you.
- Don't show the explication prose in chat. Write it into the card; the
  user can read it there if they want to.

## Stage 1 — Surface (1-3 exchanges)

The opening signal is one of: a story, a feeling, a role model, a
difficult choice, a goal, a norm, something the user wants more of in
their life, or a topic they have strong feelings about. Use the matching
technique below to find the source of meaning underneath. As soon as you
have a hypothesis about the domain and a couple of things they might be
paying attention to, draft policies in Stage 2. Don't keep clarifying —
drafting and refining is faster.

### From a goal
A goal is something the user wants to achieve. A source of meaning is a
way of living. Ask how they'd want to live within the goal, or once
they've achieved it.

### From a feeling
Feelings point at sources of meaning — negative ones at sources that are
absent, blocked, or threatened; positive ones at sources that are present.
Map: fear → threatened; anger → blocked; shame → haven't lived up to;
confusion → haven't been able to focus on. Ask what way of living would
resolve or embody the feeling.

### From a norm or expectation
A source of meaning isn't something the user does because they should.
Ask how they wish they could live if the norms were already followed, or
about a related past experience that felt meaningful.

### From a role model
Ask what the role model pays attention to that the user admires.

## Stage 2 — Draft and refine policies

Once you have a hypothesis, hold 3-6 attention policies in mind (see
`cards.md` for the strict format). Don't show that strict format in chat
— the all-caps PLURAL_NOUN form is clunky and the user shouldn't have to
parse it. Instead, paraphrase each policy in natural language and check
if it lands.

For example, if the policy is "SENSATIONS in my body when I know I'm in
my truth", say something like "it seems you find it meaningful to notice
the sensations in your body that tell you you're being honest with
yourself." Walk through what you think the user pays attention to in
plain prose, ask if that fits, and adjust.

Refine in small diffs — don't reprint the whole list after each change.
The strict PLURAL_NOUN form is rendered silently when writing the card.

Tricks for finding policies:
- Imagine the user was in the right situation but didn't notice it was
  meaningful. What would they tell themselves to notice?
- What choices are they making in the situation that shape it to be
  meaningful?
- "Is it more exciting to notice X or Y?" — but only when both are
  plausible candidates they'd actually find meaningful.

When drafting, prefer to extend a hypothesis rather than ask another
clarifying question. If you know 1-3 policies, guess the others that often
go with them.

## Stage 3 — One question about blockers

Once policies are settled, ask one open question: "what gets in the way
of living this more?" If the user gives a clear answer, write it down and
move on. Only follow up if the answer is vague.

Examples of what tends to come up: lack of time or an overwhelmed
schedule; lack of skill or knowledge; missing the right people; an
internal block like fear, shame, or an unresolved experience.

## Stage 4 — Write the card

Once the blocker is captured, you have everything you need. Don't ask
for confirmation on a title or a list of situations — generate them
yourself, write the card and transcript, rebuild VALUES.md, then send
one short closing message: the file path and a note that the user can
edit it if anything needs changing.

Generate yourself:
- A title (2-5 words, not cheesy, distinguishes this from similar cards
  in `cards/`).
- 1-3 situations where this value shows up, in natural language
  (e.g. "In heated dinner conversations", "Late at night when a friend
  is half-formed about an idea").
- Tags (kebab-case, 2-4 of them).

Don't show the explication or the full card body in chat.

## What to do if the user keeps going

The user might surface another source of meaning afterwards. One card at
a time. Finish writing this one, then ask if they want to continue.


path: references/cards.md
content: # Sources of Meaning, Attention Policies, and Card Format

## What a source of meaning is

A way of living that the user finds intrinsically meaningful — not just
something they prefer or enjoy. More specific than words like "honesty"
or "authenticity"; it specifies a particular *kind* of honesty or
authenticity through what they pay attention to.

A source of meaning opens a space of possibility rather than satisfying a
preference. It's constitutive of what the user thinks a good life is —
not instrumental to some other goal.

## Attention policies — the format

Each policy is a precise thing the user can actively orient their
attention toward, not an abstract value or an outcome. The policies are
written in the user's voice (first person), as instructions to themselves
about what to notice. Format:

> **PLURAL_NOUN** + qualifier phrase

The all-caps plural noun names the kind of thing to attend to ("MOMENTS",
"SENSATIONS", "OPPORTUNITIES", "CHOICES", "PEOPLE"). The qualifier provides
the specifics.

Example, for a value about group decision-making:

```
- CHANGES in people when entrusted with the work of self-determination
- INSIGHTS that emerge through grappling with morally fraught questions
- CAPACITIES that develop when a person tries to be free and self-directed
- WISDOM that emerges in a discursive, responsible context
```

### Rules for attention policies

1. **Constitutive, not instrumental.** Every policy must be something the
   user would attend to because *attending to it is part of living well*,
   not because it serves a separate goal. A driver tracking "DRIFTS of the
   car toward the lane line" is instrumental — they care about not
   crashing, full stop. "SENSATIONS in my body that tell me whether I'm
   following what I actually believe" is constitutive — attending to that
   just *is* part of what a good life is for this person. If unsure, ask
   the user: "if there were another way to get the underlying goal, would
   you still attend to this?" If they'd drop it, it's instrumental. If
   they'd keep attending to it anyway, it's constitutive.

   Other examples:
   - Constitutive: "MOMENTS when someone drops their professional persona"
   - Instrumental: "LEADS ACQUIRED at a networking event"
   - Constitutive: "FEELINGS of capacity in my body after a meal"
   - Instrumental: "MEALS with a low calorie count"

   A source of meaning whose policies are mostly instrumental is not a
   source of meaning — it's a strategy. Push back gently and re-ask.
2. **Precise, not vague.** Someone should be able to actively look for
   the thing. Good: "tension in someone's voice", "the rhythm of
   conversation", "instincts I'm tempted to override". Too vague: "the
   energy in a room", "moments of alignment", "presence" (present to
   what?), "connection" (connected how?).
3. **From the actor's perspective.** Read like instructions the user
   gives themselves about what to notice. "SENSATIONS that point to
   misgivings I have about the current path."
4. **General words.** "strangers" not "customers". "objects" not "trees".
5. **No "meaningful" or synonyms ("deep", "profound").** Say more
   specifically what's worth attending to.
6. **Together they cohere.** 3-6 policies that fit as a single way of
   distinguishing quality in a domain — not a grab bag.

## What goes in the card

- **title** — 2-5 words. Not cheesy. Distinguishes this from similar
  cards the user might already have. Check `cards/` for collisions
  before finalizing.
- **tags** — 2-4 kebab-case shorthand tags for filtering
  (e.g. `intellectuality`, `conversation`, `parenting`).
- **story** — one sentence in the user's voice. First person, present
  continuous. Describes the exact moment that felt meaningful — not the
  resulting feeling ("...which made me feel deeply connected" — don't do
  this). No names or sensitive PII; replace with "my mom", "my friend",
  etc. Example: "Watching my mom lean over and kiss my dad on the
  forehead, beaming love and gratitude."
- **where this shows up** — concrete, recognizable situations where this
  value comes up for the user. Sentences, bullets, whatever fits. Don't
  force a count or form. E.g. "In heated dinner conversations, or late
  at night when a friend is half-formed about an idea."
- **what this is** — 2-4 paragraphs of prose explicating the value, so a
  future reader (the user later, another agent in a deliberation) can
  understand it without having been in the elicitation. Grounded in the
  story and the policies; every claim traces back. Defensive against
  likely misreadings — if "tending the quiet" could be confused with
  sentimentality, name that and rule it out. No abstract or ideological
  language; no "I value X" framings. **Don't show this prose in chat.**
  Write it into the card; the user can read it there if they want to.
- **what I pay attention to** — 3-6 attention policies in the user's
  voice, formatted per the rules above.
- **what gets in the way** — lightly cleaned-up version of the blocker
  the user named. Don't editorialize; record what they said. Form is
  whatever fits — a sentence, a few bullets, etc.

## Card template

Save to `$AGENT_VALUES_DIR/cards/<slug>.md` (or
`~/.openclaw/values/cards/<slug>.md` if unset).

```markdown
---
title: <Title>
elicited_at: <YYYY-MM-DD>
tags: [<kebab-case>, <kebab-case>]
---

## Story

<one-sentence first-person present-continuous moment>

## Where this shows up

<sentences or bullets — concrete situations>

## What this is

<2-4 paragraphs of explication>

## What I pay attention to

- <PLURAL_NOUN qualifier>
- <PLURAL_NOUN qualifier>

## What gets in the way

<the blocker, in whatever form fits>
```


path: scripts/build-values.mjs
content: import { mkdirSync, readdirSync, readFileSync, writeFileSync } from "node:fs";
import { join, resolve } from "node:path";

const VALUES_DIR = resolve(process.env.AGENT_VALUES_DIR || `${process.env.HOME || "~"}/.openclaw/values`);
const CARDS_DIR = join(VALUES_DIR, "cards");
const TRANSCRIPTS_DIR = join(VALUES_DIR, "transcripts");
const OUTPUT = join(VALUES_DIR, "VALUES.md");

mkdirSync(CARDS_DIR, { recursive: true });
mkdirSync(TRANSCRIPTS_DIR, { recursive: true });

function parseFrontmatter(raw) {
  const match = raw.match(/^---\n([\s\S]*?)\n---\n([\s\S]*)$/);
  if (!match) return { data: {}, content: raw };

  const data = {};
  for (const line of match[1].split("\n")) {
    const idx = line.indexOf(":");
    if (idx === -1) continue;
    const key = line.slice(0, idx).trim();
    let val = line.slice(idx + 1).trim();
    if (val.startsWith("[") && val.endsWith("]")) {
      val = val.slice(1, -1);
      data[key] = val.split(",").map((s) => s.trim());
    } else {
      data[key] = val;
    }
  }
  return { data, content: match[2] };
}

const files = readdirSync(CARDS_DIR)
  .filter((f) => f.endsWith(".md"))
  .sort();

const sections = [];

for (const file of files) {
  const raw = readFileSync(join(CARDS_DIR, file), "utf-8");
  const { data, content } = parseFrontmatter(raw);
  const title = data.title || file.replace(/\.md$/, "");
  const tags = Array.isArray(data.tags) ? data.tags.join(", ") : data.tags || "";
  const body = content.trimStart();
  sections.push(`# ${title}\n\n*Tags: ${tags}*\n\n${body}`);
}

const META_HEADER = `## About these cards

Each card captures a way of living the user finds intrinsically meaningful —
a "source of meaning". This is more specific than a word like "honesty" or
"authenticity"; the card specifies a particular *kind* of honesty or
authenticity through what the user pays attention to.

Each card has:
- **Story** — the exact moment that anchors this value
- **Where this shows up** — the situations where this value comes up
- **What this is** — prose explication
- **What I pay attention to** — discernment criteria the user uses to
  recognize quality in the moment of choice (not preferences in the abstract)
- **What gets in the way** — what blocks them from living this more

Cards are situation-bound: a value about honesty in technical work is not
the same as a value about honesty in close relationships, even if both
mention honesty. Match by situations and tags, not by title.

## Using these cards

Consult these cards before any value-laden action on the user's behalf —
drafting opinions or stances, ranking, voting, signing, or making
recommendations where there are real tradeoffs between things the user
cares about.

- If multiple cards apply and pull in different directions, surface the
  tension to the user. Don't silently paper over it.
- If no card clearly applies, say so and ask. Don't extrapolate from
  loosely related cards or guess from base-model priors.
- The file may be incomplete — absence isn't evidence the user doesn't
  care about something.
- Treat attention policies as discernment criteria, not preferences.
  They tell you what to look for in the moment of choice.
- Don't surface card content verbatim to third parties (e.g., other
  agents in a deliberation). Use it to inform what you say, don't quote.`;

const now = new Date().toISOString();
const cardsBlock = sections.length > 0
  ? `\n\n---\n\n${sections.join("\n\n---\n\n")}\n`
  : "\n\n*(No cards yet. Run /values to elicit one.)*\n";
const output = `# User's Values\n\nThis file is generated from ${CARDS_DIR}/. Do not edit directly.\nLast built: ${now}\n\n${META_HEADER}${cardsBlock}`;

writeFileSync(OUTPUT, output);
console.log(`VALUES.md rebuilt with ${files.length} card(s) at ${now}`);


Security scan verdicts — ClawScan: suspicious | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (HIGH)