barry-cache 0.3.0 → 0.3.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/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Barry Cache
2
2
 
3
3
  <p align="center">
4
- <img src="https://unpkg.com/barry-cache@latest/assets/barry-cache.png" alt="Barry Cache" width="420">
4
+ <img src="https://raw.githubusercontent.com/AlexanderIstomin/barry-cache/main/assets/barry-cache.png" alt="Barry Cache" width="420">
5
5
  </p>
6
6
 
7
7
  Barry Cache remembers your repo.
@@ -150,6 +150,8 @@ It appends a JSONL handoff record to `.context-state/handoffs/handoffs.jsonl`.
150
150
 
151
151
  Use this before ending a meaningful work session so the next agent can recover what happened.
152
152
 
153
+ `finalize` writes operational memory only. It does not update canonical project context in `docs/context/`. If a task introduced durable implementation behavior, add or update source-backed facts in `docs/context/features/*/FACTS.jsonl` and run `barry-cache validate`.
154
+
153
155
  Statuses:
154
156
  - `success`: the task was completed.
155
157
  - `partial`: some useful progress was made.
@@ -345,6 +347,7 @@ Rules:
345
347
  3. Put uncertain notes, blockers, and next steps in operational memory, not canonical facts.
346
348
  4. Update IDMAP.md or KG.adj only when new source IDs or relationships are needed.
347
349
  5. Run barry-cache validate before finishing.
350
+ 6. Do not claim Barry canonical memory is updated unless docs/context/ changed.
348
351
  ```
349
352
 
350
353
  The minimum useful save is:
package/dist/cli.js CHANGED
@@ -786,6 +786,12 @@ Before handing off substantial work, record factual evidence:
786
786
  \`\`\`bash
787
787
  ${commandPrefix} finalize --status success --summary "<summary>"
788
788
  \`\`\`
789
+
790
+ Memory policy:
791
+
792
+ - Finalize writes operational memory only.
793
+ - Do not claim Barry canonical memory is updated unless \`docs/context/\` changed.
794
+ - If a task adds durable implementation behavior, add or update source-backed facts in \`docs/context/features/*/FACTS.jsonl\` and run \`${commandPrefix} validate\`.
789
795
  `;
790
796
  }
791
797
  var indexMd = `# Context Index
@@ -1070,6 +1076,18 @@ Validate context changes with:
1070
1076
  \`\`\`bash
1071
1077
  ${commandPrefix} validate
1072
1078
  \`\`\`
1079
+
1080
+ Before handing off substantial work, record factual evidence:
1081
+
1082
+ \`\`\`bash
1083
+ ${commandPrefix} finalize --status success --summary "<summary>"
1084
+ \`\`\`
1085
+
1086
+ Memory policy:
1087
+
1088
+ - Finalize writes operational memory only.
1089
+ - Do not claim Barry canonical memory is updated unless \`docs/context/\` changed.
1090
+ - If a task adds durable implementation behavior, add or update source-backed facts in \`docs/context/features/*/FACTS.jsonl\` and run \`${commandPrefix} validate\`.
1073
1091
  `;
1074
1092
  }
1075
1093
  function llmsTxt() {
@@ -3915,7 +3933,8 @@ async function main(argv = process.argv.slice(2)) {
3915
3933
  case "finalize": {
3916
3934
  const status = optionalChoice(parsed, "status", finalizeStatuses, "success", commandUsage("finalize"));
3917
3935
  const summary = requiredString(parsed, "summary", commandUsage("finalize"), { status: [...finalizeStatuses] });
3918
- print(await finalizeProject({ repo, status, summary }), json);
3936
+ const result = await finalizeProject({ repo, status, summary });
3937
+ print(result, json, formatFinalizeMessage(result));
3919
3938
  break;
3920
3939
  }
3921
3940
  case "adr": {
@@ -4124,6 +4143,14 @@ function formatAdrList(adrs) {
4124
4143
  return adrs.map((adr) => `${adr.id} ${adr.status} ${adr.title} (${adr.path})`).join(`
4125
4144
  `);
4126
4145
  }
4146
+ function formatFinalizeMessage(result) {
4147
+ return [
4148
+ `Saved operational handoff to ${result.path}.`,
4149
+ "Finalize writes operational memory only; it does not update canonical context in docs/context/.",
4150
+ "If this task introduced durable implementation behavior, add or update docs/context/features/*/FACTS.jsonl and run barry-cache validate."
4151
+ ].join(`
4152
+ `);
4153
+ }
4127
4154
  function formatInitMessage(result) {
4128
4155
  if (!result.dryRun) {
4129
4156
  const lines2 = [`Barry Cache init ${result.changed ? "changed files" : "already up to date"}.`];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "barry-cache",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Barry Cache remembers your repo.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -15,7 +15,6 @@
15
15
  },
16
16
  "files": [
17
17
  "dist",
18
- "assets/barry-cache.png",
19
18
  "README.md"
20
19
  ],
21
20
  "engines": {
@@ -26,4 +25,4 @@
26
25
  "@types/node": "^25.8.0",
27
26
  "typescript": "^6.0.3"
28
27
  }
29
- }
28
+ }
Binary file