@ouro.bot/cli 0.1.0-alpha.189 → 0.1.0-alpha.190

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/changelog.json CHANGED
@@ -1,6 +1,14 @@
1
1
  {
2
2
  "_note": "This changelog is maintained as part of the PR/version-bump workflow. Agent-curated, not auto-generated. Agents read this file directly via read_file to understand what changed between versions.",
3
3
  "versions": [
4
+ {
5
+ "version": "0.1.0-alpha.190",
6
+ "changes": [
7
+ "feat(coding): coding-lane identity packet",
8
+ "feat(prompt): self-fix workflow contract",
9
+ "feat(coding): verification truthfulness"
10
+ ]
11
+ },
4
12
  {
5
13
  "version": "0.1.0-alpha.189",
6
14
  "changes": [
@@ -632,6 +632,12 @@ function formatActiveWorkFrame(frame, options) {
632
632
  for (const session of frame.codingSessions) {
633
633
  const checkpoint = compactCodingCheckpoint(session);
634
634
  lines.push(`- [${session.status}] ${formatCodingLaneLabel(session)}${describeCodingSessionScope(session, frame.currentSession)}${checkpoint ? `: ${checkpoint}` : ""}`);
635
+ /* v8 ignore start -- coding identity display: tested in identity-packet.test.ts @preserve */
636
+ if (session.codingIdentity) {
637
+ const id = session.codingIdentity;
638
+ lines.push(` branch: ${id.branch ?? "unknown"} commit: ${id.commit ?? "unknown"} ${id.dirty ? "dirty" : "clean"} verification: ${id.verificationStatus}`);
639
+ }
640
+ /* v8 ignore stop */
635
641
  }
636
642
  }
637
643
  if (otherActiveSessions.length > 0) {
@@ -43,6 +43,7 @@ exports.wakePacketSection = wakePacketSection;
43
43
  exports.centerOfGravitySteeringSection = centerOfGravitySteeringSection;
44
44
  exports.commitmentsSection = commitmentsSection;
45
45
  exports.delegationHintSection = delegationHintSection;
46
+ exports.workspaceDisciplineSection = workspaceDisciplineSection;
46
47
  exports.contextSection = contextSection;
47
48
  exports.metacognitiveFramingSection = metacognitiveFramingSection;
48
49
  exports.readJournalFiles = readJournalFiles;
@@ -474,6 +475,36 @@ function toolContractsSection(options) {
474
475
  }
475
476
  return lines.join("\n");
476
477
  }
478
+ function memoryJudgementSection() {
479
+ return `## memory judgement
480
+
481
+ save a friend note when i learn something about a specific person that should change how i work with them again.
482
+ - preferences
483
+ - workflow expectations
484
+ - personal facts
485
+ - tool or communication likes/dislikes
486
+
487
+ write to diary when i learn something durable about the system, codebase, workflow, architecture, or a conclusion future me will likely need.
488
+ - engineering decisions
489
+ - failure modes
490
+ - review lessons
491
+ - continuity patterns
492
+ - coding workflow truths
493
+
494
+ keep it ephemeral when it is only useful for the current turn or current local execution state.
495
+ - temporary branch names unless they matter beyond the task
496
+ - one-off shell output with no durable lesson
497
+ - transient emotional tone or conversational filler
498
+
499
+ when deciding between friend note and diary:
500
+ - if it is about a person, default friend note
501
+ - if it is about the system, default diary
502
+ - if it changes both, save both deliberately
503
+
504
+ do not save noise.
505
+ if i am unlikely to reuse it, leave it in the session.
506
+ if i keep re-deriving it, save it.`;
507
+ }
477
508
  function bridgeContextSection(options) {
478
509
  if (options?.activeWorkFrame)
479
510
  return "";
@@ -674,6 +705,23 @@ I consider the reversibility and blast radius of my actions before taking them.
674
705
  - If tests fail, I say so with the output. If I did not run a verification step, I say that plainly.
675
706
  - Three similar lines of code are better than a premature abstraction. I do not over-engineer.
676
707
 
708
+ **self-fix workflow**
709
+ when i notice meaningful friction in my own harness, i do not patch it ad hoc.
710
+
711
+ i follow the same loop we use for normal engineering work:
712
+ 1. identify the friction precisely
713
+ 2. create or update a task that describes the problem and expected outcome
714
+ 3. create a branch or worktree for the fix
715
+ 4. use coding_spawn or an equivalent coding lane to implement the change
716
+ 5. run targeted verification and record what i personally verified
717
+ 6. push the branch and open a pr
718
+ 7. review the pr from the actual branch/worktree under review
719
+ 8. merge only after ci and review are green
720
+
721
+ no direct-to-main.
722
+ no invisible self-modification.
723
+ no claiming verification i did not personally perform.
724
+
677
725
  **git discipline**
678
726
  - I do not run destructive git commands (\`push --force\`, \`reset --hard\`, \`checkout .\`, \`clean -f\`, \`branch -D\`) without explicit request.
679
727
  - I do not skip hooks (\`--no-verify\`) without explicit request.
@@ -994,6 +1042,7 @@ async function buildSystem(channel = "cli", options, context) {
994
1042
  reasoningEffortSection(options),
995
1043
  skillsSection(),
996
1044
  toolContractsSection(options),
1045
+ memoryJudgementSection(),
997
1046
  // Group 4: how i work
998
1047
  "# how i work",
999
1048
  workspaceDisciplineSection(),
@@ -118,6 +118,55 @@ function captureRepoSnapshot(workdir, runCommand) {
118
118
  : [],
119
119
  };
120
120
  }
121
+ function buildIdentityPacket(snapshot, request) {
122
+ if (!snapshot.available) {
123
+ return {
124
+ repoPath: null,
125
+ worktreePath: null,
126
+ branch: null,
127
+ commit: null,
128
+ dirty: false,
129
+ dirtyFiles: [],
130
+ taskRef: request.taskRef ?? null,
131
+ verificationCommands: request.verificationCommands ?? [],
132
+ verificationStatus: "not-verified",
133
+ };
134
+ }
135
+ const dirtyFiles = snapshot.statusLines.filter((line) => line.length > 0);
136
+ return {
137
+ repoPath: snapshot.repoRoot,
138
+ worktreePath: snapshot.repoRoot,
139
+ branch: snapshot.branch,
140
+ commit: snapshot.head,
141
+ dirty: dirtyFiles.length > 0,
142
+ dirtyFiles,
143
+ taskRef: request.taskRef ?? null,
144
+ verificationCommands: request.verificationCommands ?? [],
145
+ verificationStatus: "not-verified",
146
+ };
147
+ }
148
+ function formatIdentitySection(packet) {
149
+ const lines = [
150
+ "## Coding Identity",
151
+ `repoPath: ${packet.repoPath ?? "unknown"}`,
152
+ `worktreePath: ${packet.worktreePath ?? "unknown"}`,
153
+ `branch: ${packet.branch ?? "unknown"}`,
154
+ `commit: ${packet.commit ?? "unknown"}`,
155
+ `dirty: ${packet.dirty}`,
156
+ ];
157
+ if (packet.dirtyFiles.length > 0) {
158
+ lines.push("dirtyFiles:");
159
+ for (const file of packet.dirtyFiles) {
160
+ lines.push(file);
161
+ }
162
+ }
163
+ lines.push(`taskRef: ${packet.taskRef ?? "none"}`);
164
+ if (packet.verificationCommands.length > 0) {
165
+ lines.push(`verificationCommands: ${packet.verificationCommands.join(", ")}`);
166
+ }
167
+ lines.push(`verificationStatus: ${packet.verificationStatus}`);
168
+ return lines.join("\n");
169
+ }
121
170
  function formatContextFiles(files) {
122
171
  if (files.length === 0)
123
172
  return "(none found)";
@@ -175,7 +224,7 @@ function buildScopeContent(request, contextFiles, skills, agentName) {
175
224
  formatSkills(skills),
176
225
  ].join("\n");
177
226
  }
178
- function buildStateContent(request, contextKey, generatedAt, snapshot, existingSessions, agentName, activeWorkFrame, wakePacket) {
227
+ function buildStateContent(request, contextKey, generatedAt, snapshot, existingSessions, agentName, identityPacket, activeWorkFrame, wakePacket) {
179
228
  const gitSection = snapshot.available
180
229
  ? [
181
230
  `repoRoot: ${snapshot.repoRoot ?? "unknown"}`,
@@ -194,6 +243,8 @@ function buildStateContent(request, contextKey, generatedAt, snapshot, existingS
194
243
  `obligationId: ${request.obligationId ?? "none"}`,
195
244
  ...(wakePacket ? ["", "## Continuity", wakePacket] : []),
196
245
  "",
246
+ formatIdentitySection(identityPacket),
247
+ "",
197
248
  "## Workspace Snapshot",
198
249
  gitSection,
199
250
  ...(activeWorkFrame ? ["", (0, active_work_1.formatLiveWorldStateCheckpoint)(activeWorkFrame)] : []),
@@ -228,8 +279,9 @@ function prepareCodingContextPack(input, deps = {}) {
228
279
  const existingSessions = relatedSessions(input.request, input.existingSessions ?? []);
229
280
  const snapshot = captureRepoSnapshot(input.request.workdir, runCommand);
230
281
  const generatedAt = nowIso();
282
+ const identityPacket = buildIdentityPacket(snapshot, input.request);
231
283
  const scopeContent = buildScopeContent(input.request, contextFiles, skills, agentName);
232
- const stateContent = buildStateContent(input.request, contextKey, generatedAt, snapshot, existingSessions, agentName, input.activeWorkFrame, input.wakePacket || undefined);
284
+ const stateContent = buildStateContent(input.request, contextKey, generatedAt, snapshot, existingSessions, agentName, identityPacket, input.activeWorkFrame, input.wakePacket || undefined);
233
285
  mkdirSync(contextDir, { recursive: true });
234
286
  writeFileSync(scopeFile, `${scopeContent}\n`, "utf-8");
235
287
  writeFileSync(stateFile, `${stateContent}\n`, "utf-8");
@@ -253,6 +305,7 @@ function prepareCodingContextPack(input, deps = {}) {
253
305
  stateFile,
254
306
  scopeContent,
255
307
  stateContent,
308
+ identityPacket,
256
309
  };
257
310
  }
258
311
  /**
@@ -477,7 +477,8 @@ function BlockRenderer({ block, isFirst, isLast, maxWidth }) {
477
477
  const depth = block.level ?? 1;
478
478
  const barPrefix = "\u2502 ".repeat(depth);
479
479
  const barLen = barPrefix.length;
480
- const wrapWidth = Math.max(40, (maxWidth || 80) - barLen);
480
+ const effectiveMax = maxWidth || 80;
481
+ const wrapWidth = Math.max(effectiveMax - barLen, 10);
481
482
  // Pre-wrap each line so continuation lines also get the bar prefix
482
483
  const wrappedLines = [];
483
484
  for (const line of block.lines) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.189",
3
+ "version": "0.1.0-alpha.190",
4
4
  "main": "dist/heart/daemon/ouro-entry.js",
5
5
  "bin": {
6
6
  "cli": "dist/heart/daemon/ouro-bot-entry.js",