ticlawk 0.1.16-dev.34 → 0.1.16-dev.35

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.16-dev.34",
3
+ "version": "0.1.16-dev.35",
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",
@@ -8,6 +8,8 @@ Use this in DMs, and in groups where your conversation role is admin or owner.
8
8
 
9
9
  - You are responsible for driving the conversation toward its goal, not only replying to isolated messages.
10
10
  - Maintain or infer the current goal from the direct ask, charter, dashboard/briefing quote, task board, and conversation context.
11
+ - Each turn, first handle the incoming message: reply to the user and do what it asks, sending the result. That is not the end of the turn — then run the goal loop, even if the message was only a quick question.
12
+ - If a goal exists, run the loop and drive any gap (see Goal Loop and Gap States); if none exists, decide whether this message warrants setting one (see Goal Setup When No Specific Goal Exists). The turn ends only when the loop reaches `no_gap` or `wait`.
11
13
 
12
14
  ## Goal Setup When No Specific Goal Exists
13
15
 
@@ -82,19 +82,43 @@ function buildCurrentConversationGuide(ctx = {}) {
82
82
  return lines.join('\n');
83
83
  }
84
84
 
85
+ const FILE_DESCRIPTIONS = {
86
+ 'MEMORY.md': 'your durable memory.',
87
+ 'GOAL_AUTHORITY.md': 'it covers our goal-driven loop: what to do whether you have a goal, have none, or got a quick question.',
88
+ 'BASICS.md': 'workspace and work basics.',
89
+ 'COMMUNICATION.md': 'replying via the ticlawk CLI.',
90
+ 'COLLABORATION.md': 'DM/group conduct.',
91
+ 'GOAL_TASK_CORE.md': 'goal/task concepts.',
92
+ 'DM_SCOPE.md': 'DM goal scope.',
93
+ 'SURFACES.md': 'dashboards, briefings, shared tools.',
94
+ 'GROUP_ADMIN_SCOPE.md': 'group admin scope.',
95
+ 'GROUP_MEMBER_SCOPE.md': 'group member scope.',
96
+ 'TASK_WORKER.md': 'executing assigned tasks.',
97
+ };
98
+
99
+ // Files re-read at the start of every turn, not just once per session.
100
+ // MEMORY.md for continuity; GOAL_AUTHORITY.md so the goal loop runs each turn
101
+ // (it only appears in goal-authority scopes).
102
+ const EVERY_TURN_FILES = new Set(['MEMORY.md', 'GOAL_AUTHORITY.md']);
103
+
104
+ function describeFile(name) {
105
+ const desc = FILE_DESCRIPTIONS[name];
106
+ return desc ? `\`${name}\` — ${desc}` : `\`${name}\``;
107
+ }
108
+
85
109
  function buildReadInstructions(ctx = {}) {
86
110
  const files = buildReadFileNames(ctx);
87
- const memoryFiles = files.filter((name) => name === 'MEMORY.md');
88
- const handbookFiles = files.filter((name) => name !== 'MEMORY.md');
89
- const memoryList = memoryFiles.map((name, index) => `${index + 1}. \`${name}\``).join('\n');
90
- const handbookList = handbookFiles.map((name, index) => `${index + 1}. \`${name}\``).join('\n');
111
+ const everyTurn = files.filter((name) => EVERY_TURN_FILES.has(name));
112
+ const once = files.filter((name) => !EVERY_TURN_FILES.has(name));
113
+ const everyTurnList = everyTurn.map((name, index) => `${index + 1}. ${describeFile(name)}`).join('\n');
114
+ const onceList = once.map((name, index) => `${index + 1}. ${describeFile(name)}`).join('\n');
91
115
  return `To reply to the user or group, use \`ticlawk message send --target <target>\`. Normal assistant output is private and is not sent to the user. Details are in \`COMMUNICATION.md\`.
92
116
 
93
- Read this file every time before acting because it may be updated:
94
- ${memoryList}
117
+ Read these every turn before acting (they may have changed):
118
+ ${everyTurnList}
95
119
 
96
- Read these files if you haven't already. Otherwise, skip:
97
- ${handbookList}`;
120
+ Read these once if you haven't this session. Otherwise skip:
121
+ ${onceList}`;
98
122
  }
99
123
 
100
124
  function buildReadFileNames(ctx = {}) {