ticlawk 0.1.17-dev.1 → 0.1.17-dev.2

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ticlawk",
3
- "version": "0.1.17-dev.1",
3
+ "version": "0.1.17-dev.2",
4
4
  "description": "Local connector that links agent harnesses (Claude Code, Codex, OpenClaw, opencode, Pi) to the Ticlawk mobile app.",
5
5
  "type": "module",
6
6
  "main": "ticlawk.mjs",
@@ -20,6 +20,24 @@ ${buildReadInstructions(ctx)}
20
20
  Read other local files only when the current work clearly needs them.`;
21
21
  }
22
22
 
23
+ // A goal-lane turn is a single backend FSM step, not a chat message. Its
24
+ // per-step instructions and exact CLI commands (`goal report`, `task`,
25
+ // `approval request`, `message send`) live in the goal-step (user) prompt
26
+ // built by goal-step-prompt.mjs. The system prompt here therefore stays
27
+ // minimal: identity + the one reply invariant. It deliberately omits the
28
+ // chat-lane role framing and handbook read-list, which would compete with
29
+ // the narrow step instruction and pull the model toward proactive
30
+ // assistant behavior. See system.md "Lane-aware standing prompt".
31
+ function buildGoalLaneStandingPrompt(_ctx = {}) {
32
+ return `You are executing one backend goal-loop step for this conversation, dispatched by the system — not a message from a person. Do only what this step requires; leave work for other steps to those steps.
33
+
34
+ Your normal output is private and reaches no one. When the step calls for an owner-facing update, send it with \`ticlawk message send --target <target> --phase progress|final\`. Read \`MEMORY.md\` only if the step needs durable context.`;
35
+ }
36
+
37
+ function isGoalLane(ctx = {}) {
38
+ return ctx?.inbound?.lane === 'goal' || readDeliveryReason(ctx) === 'transition';
39
+ }
40
+
23
41
  function getInboundRaw(ctx = {}) {
24
42
  return ctx?.inbound?.raw && typeof ctx.inbound.raw === 'object'
25
43
  ? ctx.inbound.raw
@@ -144,6 +162,7 @@ function unique(values) {
144
162
  }
145
163
 
146
164
  export function buildStandingPrompt(_ctx = {}) {
165
+ if (isGoalLane(_ctx)) return promptBlock(buildGoalLaneStandingPrompt(_ctx));
147
166
  return promptBlock(buildBaseStandingPrompt(_ctx));
148
167
  }
149
168