forge-openclaw-plugin 0.2.4 → 0.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/README.md +186 -6
  2. package/dist/assets/board-C_m78kvK.js +6 -0
  3. package/dist/assets/board-C_m78kvK.js.map +1 -0
  4. package/dist/assets/favicon-BCHm9dUV.ico +0 -0
  5. package/dist/assets/index-BWtLtXwb.js +36 -0
  6. package/dist/assets/index-BWtLtXwb.js.map +1 -0
  7. package/dist/assets/index-Dp5GXY_z.css +1 -0
  8. package/dist/assets/motion-CpZvZumD.js +10 -0
  9. package/dist/assets/motion-CpZvZumD.js.map +1 -0
  10. package/dist/assets/plus-jakarta-sans-latin-ext-wght-normal-DmpS2jIq.woff2 +0 -0
  11. package/dist/assets/plus-jakarta-sans-latin-wght-normal-eXO_dkmS.woff2 +0 -0
  12. package/dist/assets/plus-jakarta-sans-vietnamese-wght-normal-qRpaaN48.woff2 +0 -0
  13. package/dist/assets/sora-latin-ext-wght-normal-CawQDOvP.woff2 +0 -0
  14. package/dist/assets/sora-latin-wght-normal-DdqRvwsR.woff2 +0 -0
  15. package/dist/assets/space-grotesk-latin-500-normal-CNSSEhBt.woff +0 -0
  16. package/dist/assets/space-grotesk-latin-500-normal-lFbtlQH6.woff2 +0 -0
  17. package/dist/assets/space-grotesk-latin-700-normal-CwsQ-cCU.woff +0 -0
  18. package/dist/assets/space-grotesk-latin-700-normal-RjhwGPKo.woff2 +0 -0
  19. package/dist/assets/space-grotesk-latin-ext-500-normal-3dgZTiw9.woff +0 -0
  20. package/dist/assets/space-grotesk-latin-ext-500-normal-DUe3BAxM.woff2 +0 -0
  21. package/dist/assets/space-grotesk-latin-ext-700-normal-BQnZhY3m.woff2 +0 -0
  22. package/dist/assets/space-grotesk-latin-ext-700-normal-HVCqSBdx.woff +0 -0
  23. package/dist/assets/space-grotesk-vietnamese-500-normal-BTqKIpxg.woff +0 -0
  24. package/dist/assets/space-grotesk-vietnamese-500-normal-BmEvtly_.woff2 +0 -0
  25. package/dist/assets/space-grotesk-vietnamese-700-normal-DMty7AZE.woff2 +0 -0
  26. package/dist/assets/space-grotesk-vietnamese-700-normal-Duxec5Rn.woff +0 -0
  27. package/dist/assets/table-DtyXTw03.js +23 -0
  28. package/dist/assets/table-DtyXTw03.js.map +1 -0
  29. package/dist/assets/ui-BXbpiKyS.js +46 -0
  30. package/dist/assets/ui-BXbpiKyS.js.map +1 -0
  31. package/dist/assets/vendor-CRS-psbw.css +1 -0
  32. package/dist/assets/vendor-QBH6qVEe.js +433 -0
  33. package/dist/assets/vendor-QBH6qVEe.js.map +1 -0
  34. package/dist/assets/viz-w-IMeueL.js +34 -0
  35. package/dist/assets/viz-w-IMeueL.js.map +1 -0
  36. package/dist/favicon.ico +0 -0
  37. package/dist/favicon.png +0 -0
  38. package/dist/index.html +29 -0
  39. package/dist/openclaw/api-client.d.ts +9 -0
  40. package/dist/openclaw/api-client.js +31 -4
  41. package/dist/openclaw/local-runtime.d.ts +3 -0
  42. package/dist/openclaw/local-runtime.js +136 -0
  43. package/dist/openclaw/parity.d.ts +4 -4
  44. package/dist/openclaw/parity.js +23 -33
  45. package/dist/openclaw/plugin-entry-shared.d.ts +4 -2
  46. package/dist/openclaw/plugin-entry-shared.js +63 -9
  47. package/dist/openclaw/routes.d.ts +12 -3
  48. package/dist/openclaw/routes.js +156 -924
  49. package/dist/openclaw/tools.js +242 -1100
  50. package/dist/server/app.js +2487 -0
  51. package/dist/server/db.js +313 -0
  52. package/dist/server/demo-data.js +49 -0
  53. package/dist/server/e2e-server.js +20 -0
  54. package/dist/server/errors.js +15 -0
  55. package/dist/server/index.js +16 -0
  56. package/dist/server/managers/base.js +17 -0
  57. package/dist/server/managers/contracts.js +47 -0
  58. package/dist/server/managers/platform/api-gateway-manager.js +11 -0
  59. package/dist/server/managers/platform/audit-manager.js +15 -0
  60. package/dist/server/managers/platform/authentication-manager.js +56 -0
  61. package/dist/server/managers/platform/authorization-manager.js +56 -0
  62. package/dist/server/managers/platform/background-job-manager.js +10 -0
  63. package/dist/server/managers/platform/configuration-manager.js +33 -0
  64. package/dist/server/managers/platform/database-manager.js +14 -0
  65. package/dist/server/managers/platform/event-bus-manager.js +7 -0
  66. package/dist/server/managers/platform/external-service-manager.js +11 -0
  67. package/dist/server/managers/platform/health-manager.js +7 -0
  68. package/dist/server/managers/platform/migration-manager.js +8 -0
  69. package/dist/server/managers/platform/search-index-manager.js +4 -0
  70. package/dist/server/managers/platform/secrets-manager.js +19 -0
  71. package/dist/server/managers/platform/session-manager.js +121 -0
  72. package/dist/server/managers/platform/storage-manager.js +16 -0
  73. package/dist/server/managers/platform/token-manager.js +37 -0
  74. package/dist/server/managers/platform/transaction-manager.js +8 -0
  75. package/dist/server/managers/platform/trusted-network.js +39 -0
  76. package/dist/server/managers/runtime.js +56 -0
  77. package/dist/server/managers/type-guards.js +4 -0
  78. package/dist/server/openapi.js +3553 -0
  79. package/dist/server/psyche-types.js +366 -0
  80. package/dist/server/repositories/activity-events.js +157 -0
  81. package/dist/server/repositories/collaboration.js +497 -0
  82. package/dist/server/repositories/deleted-entities.js +226 -0
  83. package/dist/server/repositories/domains.js +30 -0
  84. package/dist/server/repositories/event-log.js +64 -0
  85. package/dist/server/repositories/goals.js +156 -0
  86. package/dist/server/repositories/notes.js +359 -0
  87. package/dist/server/repositories/projects.js +211 -0
  88. package/dist/server/repositories/psyche.js +1353 -0
  89. package/dist/server/repositories/rewards.js +675 -0
  90. package/dist/server/repositories/settings.js +399 -0
  91. package/dist/server/repositories/tags.js +160 -0
  92. package/dist/server/repositories/task-runs.js +490 -0
  93. package/dist/server/repositories/tasks.js +424 -0
  94. package/dist/server/seed-demo.js +11 -0
  95. package/dist/server/services/context.js +214 -0
  96. package/dist/server/services/dashboard.js +173 -0
  97. package/dist/server/services/entity-crud.js +573 -0
  98. package/dist/server/services/gamification.js +215 -0
  99. package/dist/server/services/insights.js +91 -0
  100. package/dist/server/services/projects.js +77 -0
  101. package/dist/server/services/psyche.js +63 -0
  102. package/dist/server/services/relations.js +28 -0
  103. package/dist/server/services/reviews.js +88 -0
  104. package/dist/server/services/run-recovery.js +13 -0
  105. package/dist/server/services/tagging.js +49 -0
  106. package/dist/server/services/task-run-watchdog.js +92 -0
  107. package/dist/server/services/work-time.js +176 -0
  108. package/dist/server/types.js +1058 -0
  109. package/dist/server/web.js +91 -0
  110. package/openclaw.plugin.json +32 -9
  111. package/package.json +17 -4
  112. package/server/migrations/001_core.sql +411 -0
  113. package/server/migrations/002_psyche.sql +392 -0
  114. package/skills/forge-openclaw/SKILL.md +197 -271
@@ -1,328 +1,254 @@
1
1
  ---
2
2
  name: forge-openclaw
3
- description: Use the Forge OpenClaw plugin to collaborate with Forge through explicit plugin-owned routes and tools backed by the live /api/v1 contract.
3
+ description: use when the user wants to save, search, update, review, start, stop, or explain work or psyche records inside forge, or when the conversation is clearly about a forge entity such as a goal, project, task, task_run, insight, psyche_value, behavior_pattern, behavior, belief_entry, mode_profile, mode_guide_session, trigger_report, event_type, or emotion_definition. identify the exact forge entity, keep the main conversation natural, offer saving once when helpful, ask only for missing fields, and use the correct forge tool and payload shape.
4
4
  ---
5
5
 
6
- # Forge OpenClaw
6
+ Forge is the user's structured system for planning work, doing work, reflecting on patterns, and keeping a truthful record of what is happening. Use it when the user is clearly working inside that system, or when they are describing something that naturally belongs there and would benefit from being stored, updated, reviewed, or acted on in Forge. Keep the conversation natural first. Do not turn every message into intake. When a real Forge entity is clearly present, name the exact entity type plainly, help with the substance of the conversation, and then offer Forge once, lightly, if storing it would genuinely help.
7
7
 
8
- Use this skill when Forge is available as a native OpenClaw plugin and you need truthful, structured access to the live Forge system.
8
+ Forge has two major domains. The planning side covers goals, projects, tasks, notes, live work sessions, and agent-authored insights. The Psyche side covers values, patterns, behaviors, beliefs, modes, guided mode sessions, trigger reports, event types, and reusable emotion definitions. The model should use the real entity names, not vague substitutes. Say `project`, not “initiative”. Say `behavior_pattern`, not “theme”. Say `trigger_report`, not “incident note”.
9
9
 
10
- Forge is a life operating system with:
11
- - goals
12
- - projects
13
- - tasks
14
- - live work timers
15
- - comments, insights, and approvals
16
- - a sensitive Psyche module for values, patterns, beliefs, behaviors, modes, and trigger reports
10
+ Write to Forge only with clear user consent. If the user is just thinking aloud, helping first is usually better than writing immediately. After helping, you may offer one short Forge prompt if the match is strong. If the user agrees, ask only for the missing fields and only one to three focused questions at a time. Do not offer Forge again after a decline unless the user reopens it.
17
11
 
18
- ## Public working posture
12
+ Forge data location rule:
19
13
 
20
- Keep the main discussion natural.
21
- Do not turn every conversation into a form.
14
+ - by default, Forge stores data under the active runtime root at `data/forge.sqlite`
15
+ - on a normal OpenClaw install, this usually means `~/.openclaw/extensions/forge-openclaw-plugin/data/forge.sqlite`
16
+ - on a linked repo-local install, this usually means `<repo>/openclaw-plugin/data/forge.sqlite`
17
+ - if the user wants the data somewhere else for persistence, backup, or manual control, tell them to set `plugins.entries["forge-openclaw-plugin"].config.dataRoot` and restart the OpenClaw gateway
18
+ - if the user asks where the data is stored or how to move it, explain the current default plainly and show the exact config field
22
19
 
23
- Default flow:
24
- 1. Continue the normal discussion first.
25
- 2. If something clearly looks like a Forge entity, add one short optional suggestion near the end.
26
- 3. Only start collection questions if the user accepts.
27
- 4. Ask only for the missing fields.
28
- 5. Ask at most 1 to 3 questions at a time.
20
+ Use these exact entity meanings when deciding what the user is describing.
29
21
 
30
- Good suggestion style:
31
- - "This sounds like a concrete project. If you want, we can break it down and store it in Forge."
32
- - "This sounds like an important trigger event. If you want, we can map it together and save it in Forge."
22
+ `goal` is a meaningful long-horizon direction or outcome. Use it for “be a great father”, “create meaningfully”, or “build a beautiful family”, not for one-off action items.
33
23
 
34
- Bad suggestion style:
35
- - interrupting the main reply too early
36
- - sounding pushy or repetitive
37
- - asking for every field before the user has agreed to save it
24
+ `project` is a bounded workstream under a goal. Use it for “launch Forge plugin”, “plan summer move”, or “repair relationship with X”.
38
25
 
39
- ## Advertised plugin interface
26
+ `task` is a concrete action item or deliverable. Use it for “draft the plugin README”, “call the landlord”, or “book therapy session”.
40
27
 
41
- Treat this as the public mental model:
28
+ `task_run` is one truthful live work session on a task. It is not the same thing as task status.
42
29
 
43
- Read first:
44
- - `forge_get_operator_overview`
30
+ `note` is a Markdown evidence record that can link to one or many entities. Use it for work summaries, context, progress logs, handoff explanations, or reflective detail that should stay searchable and attached to the right records.
45
31
 
46
- High-level entity workflow:
47
- - `forge_search_entities`
48
- - `forge_create_entities`
49
- - `forge_update_entities`
50
- - `forge_delete_entities`
51
- - `forge_restore_entities`
32
+ `insight` is an agent-authored observation, recommendation, or warning grounded in Forge data. It does not replace a requested goal, project, task, pattern, belief, or trigger report.
52
33
 
53
- Agent-authored recommendations:
54
- - `forge_post_insight`
34
+ `psyche_value` is a direction the user wants to live toward, such as honesty, courage, steadiness, compassion, or creativity.
55
35
 
56
- Narrow CRUD tools still exist for exact operations, timers, settings, approvals, comments, rewards, and specialized Psyche flows, but they are fallback tools and should not be the main advertised workflow.
36
+ `behavior_pattern` is a recurring loop across situations. Think in terms of cue, emotion, thought, action, short-term payoff, long-term cost, and preferred replacement response.
57
37
 
58
- ## Source of truth
38
+ `behavior` is one recurring action tendency or move, such as withdrawing, appeasing, attacking, numbing out, or taking a regulating walk.
59
39
 
60
- Forge remains the source of truth.
40
+ `belief_entry` is one explicit belief sentence the user carries, such as “If I disappoint people, they will leave me.”
41
+
42
+ `mode_profile` is one recurring state, voice, or inner role, such as inner critic, abandoned child, detached protector, overcontroller, or healthy adult.
43
+
44
+ `mode_guide_session` is a guided exploration record used to understand what mode may be active right now. It is a structured worksheet, not the final durable profile unless the user wants it that way.
45
+
46
+ `trigger_report` is one specific emotionally meaningful episode described as what happened, what was felt, what was thought, what was done, what happened next, and what would help next time.
47
+
48
+ `event_type` is a reusable category for trigger reports, such as rejection, criticism, conflict, uncertainty, or abandonment cue.
49
+
50
+ `emotion_definition` is a reusable emotion entry, such as fear, shame, anger, grief, relief, or disgust.
51
+
52
+ Use this intake map when the user agrees to save or update something.
53
+
54
+ `goal`
55
+ Use for a meaningful direction over time.
56
+ Minimum field: `title`
57
+ Usually useful: `description`, `horizon`, `status`
58
+ Ask:
59
+ 1. What should this goal be called?
60
+ 2. Why does it matter to you?
61
+ 3. Is this a quarter, year, or lifetime horizon?
62
+
63
+ `project`
64
+ Use for a bounded workstream under a goal.
65
+ Minimum field: `title`
66
+ Usually useful: `goalId`, `description`, `status`
67
+ Ask:
68
+ 1. What should this project be called?
69
+ 2. Which goal does it support?
70
+ 3. What outcome should it produce?
71
+
72
+ `task`
73
+ Use for one concrete action or deliverable.
74
+ Minimum field: `title`
75
+ Usually useful: `projectId`, `goalId`, `priority`, `dueDate`, `status`, `owner`
76
+ Ask:
77
+ 1. What is the task in one concrete sentence?
78
+ 2. Should it live under an existing goal or project?
79
+ 3. Does it need a due date, priority, or owner?
61
80
 
62
- Use:
63
- - plugin routes under `/forge/v1/...`
64
- - the batch entity tools for most entity work
65
- - `forge_post_insight` for structured recommendations
81
+ `task_run`
82
+ Use for live work happening now.
83
+ Required fields to start: `taskId`, `actor`
84
+ Ask only what is needed to start the run, such as the task, the actor, and whether the run is planned or unlimited.
66
85
 
67
- Do not:
68
- - mutate storage directly
69
- - scrape the UI instead of using the API
70
- - invent entities outside the real Forge model
86
+ `psyche_value`
87
+ Use for a value or committed direction.
88
+ Minimum field: `title`
89
+ Usually useful: `description`, `valuedDirection`, `whyItMatters`, links to goals, projects, or tasks
90
+ Ask:
91
+ 1. What value or direction is this?
92
+ 2. How would you describe it in your own words?
93
+ 3. Why does it matter now?
71
94
 
72
- ## Overview-first and batch-first rules
95
+ `behavior_pattern`
96
+ Use for a recurring loop across situations.
97
+ Minimum field: `title`
98
+ Usually useful: `description`, `targetBehavior`, `cueContexts`, `shortTermPayoff`, `longTermCost`, `preferredResponse`
99
+ Ask:
100
+ 1. What would you call this pattern?
101
+ 2. What usually sets it off, and what tends to happen next?
102
+ 3. What does it give you in the short term, what does it cost later, and what response would you rather make?
73
103
 
74
- 1. Start with `forge_get_operator_overview` unless the user is clearly asking for one exact known record.
75
- 2. Before creating or updating ambiguous entities, use `forge_search_entities` to check for duplicates.
76
- 3. Prefer batch tools even for small multi-step work when they keep the operation coherent.
77
- 4. Use narrow tools only when the job is genuinely specialized:
78
- - live timers and work logging
79
- - settings
80
- - approvals
81
- - comments
82
- - rewards
83
- - exact single-record fallback flows
104
+ `behavior`
105
+ Use for one recurring move or action tendency.
106
+ Minimum fields: `kind`, `title`
107
+ Usually useful: `commonCues`, `urgeStory`, `shortTermPayoff`, `longTermCost`, `replacementMove`, `repairPlan`
108
+ Ask:
109
+ 1. What happened, in plain language?
110
+ 2. Is it an `away`, `committed`, or `recovery` behavior?
111
+ 3. What cues show up, and what move would you want available instead?
84
112
 
85
- ## When to offer saving to Forge
113
+ `belief_entry`
114
+ Use for one explicit belief sentence.
115
+ Minimum fields: `statement`, `beliefType`
116
+ Usually useful: `confidence`, `evidenceFor`, `evidenceAgainst`, `flexibleAlternative`, `originNote`
117
+ Ask:
118
+ 1. What is the belief in one sentence?
119
+ 2. Is it `absolute` or `conditional`, and how true does it feel from 0 to 100?
120
+ 3. What supports it, what weakens it, and what would be a more flexible alternative?
86
121
 
87
- Offer once, gently, near the end of the reply, when the signal is strong.
122
+ `mode_profile`
123
+ Use for a recurring part-state or inner role.
124
+ Minimum fields: `family`, `title`
125
+ Usually useful: `fear`, `burden`, `protectiveJob`, `originContext`, links to patterns, behaviors, and values
126
+ Ask:
127
+ 1. What kind of mode is this: `coping`, `child`, `critic_parent`, `healthy_adult`, or `happy_child`?
128
+ 2. What should this mode be called?
129
+ 3. What does it fear, carry, or try to protect?
88
130
 
89
- Offer for likely:
90
- - `goal`
91
- - `project`
92
- - `task`
93
- - `psyche_value`
94
- - `behavior_pattern`
95
- - `behavior`
96
- - `belief_entry`
97
- - `trigger_report`
98
- - retroactive work that should be logged
99
- - a recommendation that should become an `insight`
131
+ `mode_guide_session`
132
+ Use for guided exploration before or alongside a durable mode profile.
133
+ Minimum fields: `summary`, `answers`, `results`
134
+ Ask only what is needed to capture the guided exploration and the candidate interpretations.
100
135
 
101
- Do not offer when:
102
- - it was just a passing mention
103
- - the user needs support or clarity first
104
- - the record is still too vague to name honestly
105
- - the user already declined
106
-
107
- ## What insights are for
108
-
109
- An `insight` is an agent-authored observation or recommendation grounded in the user's real Forge data.
110
-
111
- Use insights when the agent can see a meaningful pattern across:
112
- - goals, projects, and tasks
113
- - momentum, drift, or stalled progress
114
- - recurring trigger reports, beliefs, behaviors, or patterns
115
- - tradeoffs between what the user says matters and what their recent activity shows
136
+ `trigger_report`
137
+ Use for one specific emotionally important episode.
138
+ Minimum field: `title`
139
+ Usually useful: `eventSituation`, `occurredAt`, `emotions`, `thoughts`, `behaviors`, `consequences`, `nextMoves`, links to values, beliefs, patterns, modes, goals, projects, or tasks
140
+ Ask:
141
+ 1. What happened?
142
+ 2. What emotions were present, and how intense were they?
143
+ 3. What thoughts showed up, what did you do next, and what would be the useful next move now?
116
144
 
117
- A good insight should do three things:
118
- - name the pattern or tension clearly
119
- - explain why it matters now
120
- - suggest one practical next move, experiment, or reframing
145
+ `event_type`
146
+ Use for a reusable trigger category.
147
+ Minimum field: `label`
148
+ Usually useful: `description`
149
+ Ask:
150
+ 1. What should this event type be called?
151
+ 2. What kind of incident does it represent?
121
152
 
122
- Good examples:
123
- - "You are consistently moving the same goal forward, but the related admin work is what keeps stalling. It may help to split the admin work into one smaller recurring task and protect the creative block separately."
124
- - "Your trigger reports keep clustering around late-day overload. It may be worth defining one lighter recovery action that you can do before the full crash spiral starts."
153
+ `emotion_definition`
154
+ Use for a reusable emotion vocabulary entry.
155
+ Minimum field: `label`
156
+ Usually useful: `description`, `category`
157
+ Ask:
158
+ 1. What emotion label do you want to reuse?
159
+ 2. How would you describe it?
160
+ 3. Does it belong to a broader category?
161
+
162
+ Use these rules when choosing tools.
125
163
 
126
- Use `forge_post_insight` when you want to store that recommendation with agent provenance.
127
- Do not use an insight as a substitute for the main conversation. The main reply should still help the user directly.
128
- If storing the insight would be useful, mention it lightly near the end of the response, for example:
129
- - "There may be a useful insight here about how this pattern keeps showing up. If you want, I can turn it into a structured Forge insight so it stays visible."
164
+ Read first with `forge_get_operator_overview`, `forge_get_operator_context`, or `forge_get_current_work` unless the user is clearly asking for one exact known record or one exact write.
130
165
 
131
- ## Entity format cards
166
+ Before creating or updating an ambiguous stored entity, use `forge_search_entities` to check for duplicates.
132
167
 
133
- These are the main advertised formats. Use them to decide what to ask next.
168
+ Use the batch entity tools for stored records:
169
+ `forge_search_entities`, `forge_create_entities`, `forge_update_entities`, `forge_delete_entities`, `forge_restore_entities`
134
170
 
135
- ### `goal`
171
+ These tools operate on:
172
+ `goal`, `project`, `task`, `note`, `psyche_value`, `behavior_pattern`, `behavior`, `belief_entry`, `mode_profile`, `mode_guide_session`, `trigger_report`, `event_type`, `emotion_definition`
136
173
 
137
- Purpose:
138
- - a long-horizon life direction or outcome
174
+ Use live work tools for `task_run`:
175
+ `forge_log_work`, `forge_start_task_run`, `forge_heartbeat_task_run`, `forge_focus_task_run`, `forge_complete_task_run`, `forge_release_task_run`
139
176
 
140
- Minimum fields:
141
- - `title`: the name of the goal
177
+ Use `forge_post_insight` for `insight`.
142
178
 
143
- Useful optional fields:
144
- - `description`: why it matters or what success looks like
145
- - `horizon`: `quarter`, `year`, or `lifetime`
146
- - `tagIds`: values, categories, or execution tags when already known
179
+ Do not say you lack a creation path when these tools cover the request. Do not open the Forge UI or a browser for normal creation or updates that the tools already support. Use `forge_get_ui_entrypoint` only when visual review, Kanban movement, graph exploration, or complex multi-record editing would genuinely be easier there.
147
180
 
148
- What to ask:
149
- - "What would you like to call this goal?"
150
- - "Why does it matter to you?"
151
- - "Is this a quarter, year, or lifetime horizon?"
181
+ Use these exact payload expectations.
152
182
 
153
- ### `project`
183
+ `forge_search_entities` expects a top-level `searches` array.
154
184
 
155
- Purpose:
156
- - a concrete workstream under a goal
185
+ `forge_create_entities`, `forge_update_entities`, `forge_delete_entities`, and `forge_restore_entities` expect a top-level `operations` array.
157
186
 
158
- Minimum fields:
159
- - `title`: the project name
160
- - `goalId`: the parent goal if known
187
+ For create operations, each item must include `entityType` and `data`.
161
188
 
162
- Useful optional fields:
163
- - `description`: desired outcome or scope
164
- - `status`: `active`, `paused`, or `completed`
165
- - `themeColor`: optional visual/editorial color
189
+ When creating `goal`, `project`, or `task`, the create payload may also include `notes: [{ contentMarkdown, author?, links? }]`. Forge will create real linked `note` entities automatically and attach them to the new parent record.
166
190
 
167
- What to ask:
168
- - "What should this project be called?"
169
- - "Which goal does it support?"
170
- - "What outcome do you want this project to produce?"
191
+ For update operations, each item must include `entityType`, `id`, and `patch`.
171
192
 
172
- ### `task`
193
+ For delete operations, each item must include `entityType` and `id`. Delete is soft by default unless the user explicitly wants hard delete.
173
194
 
174
- Purpose:
175
- - a concrete actionable work item
195
+ For restore operations, each item must include `entityType` and `id`.
176
196
 
177
- Minimum fields:
178
- - `title`: the action itself
197
+ Batch tools do not create or control `task_run` or `insight`.
179
198
 
180
- Useful optional fields:
181
- - `goalId`: linked goal if known
182
- - `projectId`: linked project if known
183
- - `dueDate`: when it matters
184
- - `priority`: `low`, `medium`, `high`, or `critical`
185
- - `status`: `backlog`, `focus`, `in_progress`, `blocked`, or `done`
186
- - `description`: useful detail, not a paragraph by default
199
+ Use the exact route-facing field names. Do not invent friendlier aliases. If a field name is unclear, use `forge_get_agent_onboarding` as the schema source of truth.
187
200
 
188
- What to ask:
189
- - "What is the task in one concrete sentence?"
190
- - "Should this live under an existing goal or project?"
191
- - "Does it need a due date or priority?"
201
+ Use these live work rules.
192
202
 
193
- ### `psyche_value`
203
+ A `task_run` is the truthful way to represent live work. Do not pretend that changing task status is the same as starting or stopping a work session.
194
204
 
195
- Purpose:
196
- - an ACT-style value or committed direction
205
+ Use `forge_start_task_run` to begin live work. Required fields: `taskId`, `actor`. If `timerMode` is `planned`, include `plannedDurationSeconds`. If `timerMode` is `unlimited`, omit `plannedDurationSeconds` or set it to null.
197
206
 
198
- Minimum fields:
199
- - `title`: the value name
207
+ Use `forge_heartbeat_task_run` to keep an active run alive.
200
208
 
201
- Useful optional fields:
202
- - `description`: what the value means in practice
203
- - `linkedGoalIds`
204
- - `linkedProjectIds`
205
- - `linkedTaskIds`
206
-
207
- What to ask:
208
- - "What value or direction does this point toward?"
209
- - "How would you describe that value in your own words?"
210
- - "Do you want it linked to an existing goal, project, or task?"
209
+ Use `forge_focus_task_run` when one active run should become the current visible run.
211
210
 
212
- ### `behavior_pattern`
211
+ Use `forge_complete_task_run` to finish live work. When the user or agent wants to preserve what was done, include `closeoutNote` so Forge creates a real linked `note` instead of losing that explanation inside ephemeral run metadata.
213
212
 
214
- Purpose:
215
- - a recurring loop, trigger chain, or repeated behavior pattern
213
+ Use `forge_release_task_run` to stop live work without completing the task. `closeoutNote` is also available there for handoff or pause context.
216
214
 
217
- Minimum fields:
218
- - `title`: short name for the pattern
215
+ Use `forge_log_work` only for retroactive work that already happened. If the user explains the work in a way that should be preserved, include `closeoutNote`.
219
216
 
220
- Useful optional fields:
221
- - `description`: what usually happens
222
- - `triggerCue`: what tends to start it
223
- - `linkedValueIds`
224
- - `linkedReportIds`
217
+ Use these interaction rules.
225
218
 
226
- What to ask:
227
- - "What would you call this pattern?"
228
- - "What usually triggers it?"
229
- - "What tends to happen once the pattern starts?"
219
+ Keep the main discussion natural. Do not turn every conversation into a form. Do not offer Forge for every passing mention. Offer it once, near the end, only when the signal is strong and storing would help.
230
220
 
231
- ### `behavior`
232
-
233
- Purpose:
234
- - one concrete behavior instance or repeated behavior you want tracked
235
-
236
- Minimum fields:
237
- - `title`: what happened
238
-
239
- Useful optional fields:
240
- - `kind`: `away`, `committed`, or `recovery`
241
- - `description`: short context
242
- - `linkedPatternIds`
243
- - `linkedValueIds`
244
- - `linkedReportIds`
245
-
246
- What to ask:
247
- - "What happened, in plain language?"
248
- - "Would you classify it as away, committed, or recovery?"
249
- - "Do you want it linked to a pattern, value, or report?"
250
-
251
- ### `belief_entry`
252
-
253
- Purpose:
254
- - a belief worth tracking, examining, or linking to schema work
255
-
256
- Minimum fields:
257
- - `title`: short label or belief title
258
-
259
- Useful optional fields:
260
- - `belief`: the actual belief statement
261
- - `schemaFamily`: maladaptive or adaptive framing when known
262
- - `linkedReportIds`
263
-
264
- What to ask:
265
- - "What is the belief in one sentence?"
266
- - "Does it feel like an old pressure theme or a healthier stabilizing one?"
267
- - "Is this tied to a specific trigger report?"
268
-
269
- ### `trigger_report`
270
-
271
- Purpose:
272
- - a reflective incident report that ties together trigger, emotions, thoughts, behaviors, beliefs, and next moves
273
-
274
- Minimum fields:
275
- - `title`: short name for the incident
276
-
277
- Useful optional fields:
278
- - `eventSummary`: what happened
279
- - `eventTypeId`
280
- - `emotionIds`
281
- - `thoughtSummary`
282
- - `behaviorSummary`
283
- - `nextMove`
284
- - `linkedGoalIds`
285
- - `linkedProjectIds`
286
- - `linkedTaskIds`
287
- - `linkedPatternIds`
288
- - `linkedValueIds`
289
-
290
- What to ask:
291
- - "What happened?"
292
- - "What emotions were present?"
293
- - "What thoughts or beliefs showed up?"
294
- - "What did you do next?"
295
- - "What would be a useful next move now?"
296
-
297
- ## Mapping guidance
298
-
299
- Prefer:
300
- - `goal` for a meaningful long-horizon direction
301
- - `project` for a multi-step outcome under a goal
302
- - `task` for a concrete next action
303
- - `psyche_value` for a value or committed direction
304
- - `behavior_pattern` for a repeating loop
305
- - `behavior` for one behavior or behavior tendency
306
- - `belief_entry` for a trackable belief
307
- - `trigger_report` for a specific reflective event chain
308
- - `insight` when the agent is storing a data-grounded observation or recommendation rather than the user’s own work item or reflection record
309
-
310
- ## Auth and provenance
311
-
312
- Plugin-originated requests carry:
313
- - `Authorization: Bearer <token>` when configured
314
- - `X-Forge-Source: openclaw`
315
- - `X-Forge-Actor: <actorLabel>`
316
-
317
- Localhost and Tailscale installs can bootstrap an operator session automatically.
318
- Remote non-local installs should use a token.
319
-
320
- ## Working rules
321
-
322
- 1. Prefer `forge_get_operator_overview` first.
323
- 2. Prefer `forge_search_entities` before create/update when duplicate risk exists.
324
- 3. Prefer batch tools for multi-entity work.
325
- 4. Use `forge_log_work` if the work already happened.
326
- 5. Use `forge_post_insight` for structured recommendations.
327
- 6. Respect sensitive Psyche scopes. Psyche is not casual metadata.
328
- 7. Default delete is soft delete. Hard delete requires explicit user intent.
221
+ Good examples:
222
+ “This is a `project` in Forge. Do you want to save it?”
223
+ “This sounds like a `behavior_pattern`. Do you want to map it and save it?”
224
+ “This is a `trigger_report`. Do you want to capture it in Forge?”
225
+
226
+ Bad behavior:
227
+ interrupting too early
228
+ asking for every optional field
229
+ using vague labels instead of the real entity name
230
+ repeating the Forge prompt after the user has declined
231
+
232
+ Treat Psyche as structured reflective work, not as casual metadata. When the user is distressed, prioritize support and clarity over structure. Only suggest storage when the user seems ready.
233
+
234
+ When the user asks which Forge tools are available, list exactly these tools:
235
+ `forge_get_operator_overview`
236
+ `forge_get_operator_context`
237
+ `forge_get_agent_onboarding`
238
+ `forge_get_psyche_overview`
239
+ `forge_get_xp_metrics`
240
+ `forge_get_weekly_review`
241
+ `forge_get_current_work`
242
+ `forge_get_ui_entrypoint`
243
+ `forge_search_entities`
244
+ `forge_create_entities`
245
+ `forge_update_entities`
246
+ `forge_delete_entities`
247
+ `forge_restore_entities`
248
+ `forge_log_work`
249
+ `forge_start_task_run`
250
+ `forge_heartbeat_task_run`
251
+ `forge_focus_task_run`
252
+ `forge_complete_task_run`
253
+ `forge_release_task_run`
254
+ `forge_post_insight`