[OMEGA-346] Add optional Telos goal-representation module (lib_telos_goals.metta) - #218
[OMEGA-346] Add optional Telos goal-representation module (lib_telos_goals.metta)#218arielagor wants to merge 1 commit into
Conversation
OmegaClaw is goal-autonomous but the core ships no dedicated goal model (no `goal` token in run.metta / lib_omegaclaw.metta). This adds an opt-in, side-effect-free MeTTa module: a goal/rel schema + parameterized rules for conflicts, collective goals, blocking, and individual<->collective alignment. Verified to load + derive on Hyperon and in a live OmegaClaw (PeTTa) runtime. Paired with a 14-scenario goal-understanding benchmark (github.com/arielagor/telos). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Quick verification context for reviewers:
|
timur-ashkenov
left a comment
There was a problem hiding this comment.
@arielagor Looks good to me overall - I like that this is additive, opt-in, and side-effect-free on load.
Left a few comments below, none of these are blockers.
| (aligns $i with $c))))) | ||
|
|
||
| ; A full goal reading: run every lens. Call after asserting the goal/rel atoms. | ||
| (= (telos-reading) |
There was a problem hiding this comment.
telos-reading is described as a “full goal reading,” but it seems to only cover the cross-goal/global view - achieved goals aren’t included because telos-achieved requires parameters.
Is that intentional? If so, maybe the naming/docs could make that clearer. Otherwise, would it make sense to add an all-achieved-goals view here?
There was a problem hiding this comment.
Good catch, and it was not intentional. telos-reading now folds in every zero-arity lens, including three new ones: telos-achieved-goals (every achieved goal, any scope or owner), telos-abandoned-goals, and telos-subgoals. The two parameterised probes (telos-goals-of <owner>, telos-achieved <goal>) stay outside the reading because they need an argument, and both the source and the reference doc now say so explicitly. Covered in tests/tests_lib_telos_goals.metta (the "full reading includes every zero-arity lens" block).
|
|
||
| ## Use | ||
|
|
||
| Load it, then have the agent assert goal/rel atoms it inferred from what it is reading and |
There was a problem hiding this comment.
Could you clarify the intended integration here? The module defines the representation and queries, but OmegaClaw doesn’t currently infer or assert goal / rel atoms on its own.
There was a problem hiding this comment.
Correct: Omega does not infer or assert goal / rel atoms on its own, and the doc now leads with that instead of leaving it implied. The intended path is the LLM layer asserting them through the existing metta skill (metta (add-atom &self (goal ...))) and reading them back the same way. To make that concrete, the module now ships (telos-enable), which uses the core add-prompt-extension hook from src/skills.metta to install a GOAL GRAPH prompt section describing the schema, the add-atom calls, the read lenses, and the rule that every conflict-between / blocked result is surfaced to the user before acting on a goal. (telos-disable) removes it. Still opt-in and still nothing runs at import. The enable/disable round trip through getPromptExtensions is tested. The doc moved to docs/reference-lib-telos-goals.md to match the reference-* convention and is linked from docs/README.md.
| ; Schema (atoms the agent asserts into &self while reading): | ||
| ; (goal <id> <scope> <owner> <status>) scope: individual | collective | ||
| ; status: active | proposed | achieved | abandoned | ||
| ; (rel <type> <src> <dst>) type: supports | conflicts | subsumes | depends-on |
There was a problem hiding this comment.
subsumes is part of the public schema, but no current rule uses it and its direction is not documented. Is it intentionally reserved for future use?
There was a problem hiding this comment.
It was reserved, which is not a good state for a public schema entry. It is now used: telos-subgoals yields (subgoal <child> of <parent>) from (rel subsumes <parent> <child>), and the schema block documents that direction plus the general rule that every relation reads src -> dst. The tests assert the direction (the reversed pair yields nothing).
|
Closed due to lack of feedback. |
…ocument subsumes, add telos-enable and tests Responds to timur-ashkenov's three review comments on singnet#218: - telos-reading now includes every zero-arity lens: new telos-achieved-goals, telos-abandoned-goals and telos-subgoals join conflicts/collective/blocked/ aligned. The parameterised probes (telos-goals-of, telos-achieved) are documented as deliberately outside the reading. - subsumes is now used (telos-subgoals) and its direction is documented: (rel subsumes <parent> <child>). Every relation reads src -> dst. - Integration made explicit: Omega does not infer goal/rel atoms itself. The LLM layer asserts them via the metta skill; (telos-enable) installs a GOAL GRAPH prompt extension through the core add-prompt-extension hook, (telos-disable) removes it. Nothing runs at import. - tests/tests_lib_telos_goals.metta: 29 assertions covering every lens, both probes, subsumes direction, reading membership and the enable/disable round trip. Passes under PeTTa in singularitynet/omega:latest with the rest of tests/mettatest.sh. - Docs moved to docs/reference-lib-telos-goals.md to match the reference-* convention and linked from docs/README.md; import path updated to (library Omega lib_telos_goals) after the OmegaClaw -> Omega rename. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0184Dcp8hBMjnBRH2R4epNxc
|
Reopening: all three review comments are addressed in 4085acc, and the branch is merged up with current What changed
Verification (working tree mounted into
|
|
GitHub refuses to reopen this PR (422) because the branch moved after it was closed, so the addressed version is now #335 from the same branch, merged up with current main. The three thread replies above describe each fix. |
What
Adds
lib_telos_goals.metta— an optional, opt-in goal-representation module for OmegaClaw — plus a short usage doc. Additive only; no changes to the core.Why
OmegaClaw is goal-autonomous, but the public core has no dedicated, inspectable model of what the goals are —
run.mettaandlib_omegaclaw.mettacontain nogoaltoken. Goal misunderstanding (pursuing the literal request while missing the real goal; serving one person while externalising cost onto the group; chasing an abandoned goal) is where an autonomous agent is most dangerous, and it is rarely represented or measured.What's in it
(goal id scope owner status)+(rel type src dst)atoms.telos-reading.!(import! &self (library OmegaClaw-Core lib_telos_goals)).Verified
Loads on the standalone Hyperon interpreter and in a live OmegaClaw (PeTTa) runtime — the conflict rule derives
(conflict-between alice-train dao-fair-access)inside the running agent's AtomSpace.Measuring it
Paired with a 14-scenario / 7-category goal-understanding benchmark that can score OmegaClaw or any agent: https://github.com/arielagor/telos (MIT, same licence). Contributed from the BGI Sprint I project "Telos".
Happy to adjust naming/placement to fit your conventions.
🤖 Disclosure: authored with Claude Code — Telos is an openly AI-built submission under human oversight.