@jeffober/thatch 0.1.19 → 0.1.21

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/src/prompts.ts CHANGED
@@ -46,15 +46,17 @@ workflows. The host auto-discovers them, but reach for them proactively:
46
46
  - \`thatch-session-reflection\` — record what you learned at end of session.
47
47
  - \`thatch-fact-extractor\` — extract durable facts from recent tool interactions (auto-triggered by the extraction pipeline).
48
48
  - \`thatch-dedup-classifier\` — resolve duplicate memory pairs from \`thatch_find_duplicates\`.
49
- - \`pr-description\` — draft a PR description using instructional-design scaffolding with bold and italic emphasis on the phrases that carry the meaning, so a reviewer skimming only the emphasized fragments still gets the story.
50
- - \`ticket-description\` — draft a ticket, issue, or work item (Linear or Jira) using instructional-design scaffolding with bold and italic emphasis for scanning.
49
+ - \`pr-description\` — draft a PR description with SYNOPSIS / PURPOSE / DESCRIPTION / WALK-THROUGH / NOTES, using bold and italic emphasis on the phrases that carry the meaning.
50
+ - \`ticket-description\` — draft a ticket, issue, or work item (Linear or Jira) with clear sections and bold/italic emphasis for scanning.
51
51
  - \`split-overlarge-pr\` — split already-completed work from an overlarge PR into human-reviewable, release-safe PRs targeting main.
52
52
 
53
53
  ## When to Write
54
54
 
55
55
  **One signal is enough.** Do not wait for confirmation.
56
56
  Save immediately on: feedback, preferences, corrections, emotional signals,
57
- new project knowledge, conventions, architectural decisions, investigation results.
57
+ new project knowledge, conventions, architectural decisions, investigation
58
+ results that produced durable knowledge (not point-in-time facts about the
59
+ current state of the code).
58
60
 
59
61
  ## Before Responding
60
62
 
@@ -64,6 +66,16 @@ whether you've discovered knowledge worth persisting. Use thatch_memory_recall
64
66
  to check for duplicates, then thatch_memory_remember for new findings. Then
65
67
  deliver your response.
66
68
 
69
+ ## Background Task Completions
70
+
71
+ When a background task completes and its result is injected into the session,
72
+ the completion is informational — it is not user input and not approval to
73
+ proceed with anything you were discussing. Do not narrate what the task did or
74
+ summarize its output. If you were mid-conversation with the user, continue
75
+ that thread. If the user's last message has been fully addressed, stop and
76
+ wait. Do not treat the completion as a trigger to advance work the user has
77
+ not greenlit.
78
+
67
79
  ## User Decision Model
68
80
 
69
81
  A statistical model of the user's decision-making preferences is maintained by
@@ -85,6 +97,14 @@ about their preferences:
85
97
  2. Use thatch_prediction_update to create, reinforce, or weaken a prediction
86
98
  3. Use thatch_prediction_delete to remove a prediction created in error
87
99
 
100
+ Code review discussions are high-signal prediction material. When working
101
+ through potential review comments with the user, watch for preferences about
102
+ review threshold, severity, tone, evidence, scope, false positives, or what is
103
+ worth posting. This applies whether the user invoked a review skill, is
104
+ reviewing your changes, or asked you to review their changes or another LLM's
105
+ changes. Before creating a new prediction, query for an existing one and
106
+ reinforce or adjust it when possible.
107
+
88
108
  ## What to Store
89
109
 
90
110
  - **Global store**: user observations, agent personality, system environment
@@ -92,8 +112,9 @@ about their preferences:
92
112
  component relationships, conventions, operational playbooks
93
113
  - **Branch-scoped**: branch purpose, feature design decisions, PR status,
94
114
  temporary workarounds
95
- - **Insights**: ALWAYS save non-obvious gotchas, patterns, and architectural
96
- lessons discovered during implementation. Never prompt the user; just do it.
115
+ - **Insights**: Save non-obvious gotchas, patterns, and architectural
116
+ lessons discovered during implementation, but only if they remain true
117
+ across sessions. Never prompt the user; just do it.
97
118
 
98
119
  ## How to Write
99
120
 
@@ -108,6 +129,16 @@ about their preferences:
108
129
  Session-specific context, incomplete/unverified info, anything already in
109
130
  CLAUDE.md or OPENCODE.md, speculative conclusions.
110
131
 
132
+ Apply the durability test: will this still be true and useful in a future
133
+ session that knows nothing about this branch, commit, or session? If not,
134
+ do not save it. Do not store:
135
+ - Point-in-time values (migration indices, line numbers, file counts) that
136
+ will be stale by next session
137
+ - Commit hashes and branch-specific history narratives. Git is the source
138
+ of truth for this; do not duplicate it in memory
139
+ - Anything re-derivable from the codebase faster than recalling it (current
140
+ file locations, type signatures, function names)
141
+
111
142
  ## Archived Memories
112
143
 
113
144
  Memories can be marked \`archived\` — a flag for stable, long-term historical
@@ -212,15 +243,17 @@ workflows. The host auto-discovers them, but reach for them proactively:
212
243
  - \`thatch-session-reflection\` — record what you learned at end of session.
213
244
  - \`thatch-fact-extractor\` — extract durable facts from recent tool interactions (auto-triggered by the extraction pipeline).
214
245
  - \`thatch-dedup-classifier\` — resolve duplicate memory pairs from \`find_duplicates\`.
215
- - \`pr-description\` — draft a PR description using instructional-design scaffolding with bold and italic emphasis on the phrases that carry the meaning, so a reviewer skimming only the emphasized fragments still gets the story.
216
- - \`ticket-description\` — draft a ticket, issue, or work item (Linear or Jira) using instructional-design scaffolding with bold and italic emphasis for scanning.
246
+ - \`pr-description\` — draft a PR description with SYNOPSIS / PURPOSE / DESCRIPTION / WALK-THROUGH / NOTES, using bold and italic emphasis on the phrases that carry the meaning.
247
+ - \`ticket-description\` — draft a ticket, issue, or work item (Linear or Jira) with clear sections and bold/italic emphasis for scanning.
217
248
  - \`split-overlarge-pr\` — split already-completed work from an overlarge PR into human-reviewable, release-safe PRs targeting main.
218
249
 
219
250
  ## When to Write
220
251
 
221
252
  **One signal is enough.** Do not wait for confirmation.
222
253
  Save immediately on: feedback, preferences, corrections, emotional signals,
223
- new project knowledge, conventions, architectural decisions, investigation results.
254
+ new project knowledge, conventions, architectural decisions, investigation
255
+ results that produced durable knowledge (not point-in-time facts about the
256
+ current state of the code).
224
257
 
225
258
  ## Before Responding
226
259
 
@@ -251,6 +284,14 @@ about their preferences:
251
284
  2. Use prediction_update to create, reinforce, or weaken a prediction
252
285
  3. Use prediction_delete to remove a prediction created in error
253
286
 
287
+ Code review discussions are high-signal prediction material. When working
288
+ through potential review comments with the user, watch for preferences about
289
+ review threshold, severity, tone, evidence, scope, false positives, or what is
290
+ worth posting. This applies whether the user invoked a review skill, is
291
+ reviewing your changes, or asked you to review their changes or another LLM's
292
+ changes. Before creating a new prediction, query for an existing one and
293
+ reinforce or adjust it when possible.
294
+
254
295
  ## What to Store
255
296
 
256
297
  - **Global store**: user observations, agent personality, system environment
@@ -258,8 +299,9 @@ about their preferences:
258
299
  component relationships, conventions, operational playbooks
259
300
  - **Branch-scoped**: branch purpose, feature design decisions, PR status,
260
301
  temporary workarounds
261
- - **Insights**: ALWAYS save non-obvious gotchas, patterns, and architectural
262
- lessons discovered during implementation. Never prompt the user; just do it.
302
+ - **Insights**: Save non-obvious gotchas, patterns, and architectural
303
+ lessons discovered during implementation, but only if they remain true
304
+ across sessions. Never prompt the user; just do it.
263
305
 
264
306
  ## How to Write
265
307
 
@@ -274,6 +316,16 @@ about their preferences:
274
316
  Session-specific context, incomplete/unverified info, anything already in
275
317
  CLAUDE.md, speculative conclusions.
276
318
 
319
+ Apply the durability test: will this still be true and useful in a future
320
+ session that knows nothing about this branch, commit, or session? If not,
321
+ do not save it. Do not store:
322
+ - Point-in-time values (migration indices, line numbers, file counts) that
323
+ will be stale by next session
324
+ - Commit hashes and branch-specific history narratives. Git is the source
325
+ of truth for this; do not duplicate it in memory
326
+ - Anything re-derivable from the codebase faster than recalling it (current
327
+ file locations, type signatures, function names)
328
+
277
329
  ## Archived Memories
278
330
 
279
331
  Memories can be marked \`archived\` — a flag for stable, long-term historical
@@ -440,15 +492,17 @@ workflows. The host auto-discovers them, but reach for them proactively:
440
492
  - \`thatch-session-reflection\` — record what you learned at end of session.
441
493
  - \`thatch-fact-extractor\` — extract durable facts from recent tool interactions (auto-triggered by the extraction pipeline).
442
494
  - \`thatch-dedup-classifier\` — resolve duplicate memory pairs from \`find_duplicates\`.
443
- - \`pr-description\` — draft a PR description using instructional-design scaffolding with bold and italic emphasis on the phrases that carry the meaning, so a reviewer skimming only the emphasized fragments still gets the story.
444
- - \`ticket-description\` — draft a ticket, issue, or work item (Linear or Jira) using instructional-design scaffolding with bold and italic emphasis for scanning.
495
+ - \`pr-description\` — draft a PR description with SYNOPSIS / PURPOSE / DESCRIPTION / WALK-THROUGH / NOTES, using bold and italic emphasis on the phrases that carry the meaning.
496
+ - \`ticket-description\` — draft a ticket, issue, or work item (Linear or Jira) with clear sections and bold/italic emphasis for scanning.
445
497
  - \`split-overlarge-pr\` — split already-completed work from an overlarge PR into human-reviewable, release-safe PRs targeting main.
446
498
 
447
499
  ## When to Write
448
500
 
449
501
  **One signal is enough.** Do not wait for confirmation.
450
502
  Save immediately on: feedback, preferences, corrections, emotional signals,
451
- new project knowledge, conventions, architectural decisions, investigation results.
503
+ new project knowledge, conventions, architectural decisions, investigation
504
+ results that produced durable knowledge (not point-in-time facts about the
505
+ current state of the code).
452
506
 
453
507
  ## Before Responding
454
508
 
@@ -479,6 +533,14 @@ about their preferences:
479
533
  2. Use prediction_update to create, reinforce, or weaken a prediction
480
534
  3. Use prediction_delete to remove a prediction created in error
481
535
 
536
+ Code review discussions are high-signal prediction material. When working
537
+ through potential review comments with the user, watch for preferences about
538
+ review threshold, severity, tone, evidence, scope, false positives, or what is
539
+ worth posting. This applies whether the user invoked a review skill, is
540
+ reviewing your changes, or asked you to review their changes or another LLM's
541
+ changes. Before creating a new prediction, query for an existing one and
542
+ reinforce or adjust it when possible.
543
+
482
544
  ## What to Store
483
545
 
484
546
  - **Global store**: user observations, agent personality, system environment
@@ -486,8 +548,9 @@ about their preferences:
486
548
  component relationships, conventions, operational playbooks
487
549
  - **Branch-scoped**: branch purpose, feature design decisions, PR status,
488
550
  temporary workarounds
489
- - **Insights**: ALWAYS save non-obvious gotchas, patterns, and architectural
490
- lessons discovered during implementation. Never prompt the user; just do it.
551
+ - **Insights**: Save non-obvious gotchas, patterns, and architectural
552
+ lessons discovered during implementation, but only if they remain true
553
+ across sessions. Never prompt the user; just do it.
491
554
 
492
555
  ## How to Write
493
556
 
@@ -502,6 +565,16 @@ about their preferences:
502
565
  Session-specific context, incomplete/unverified info, anything already in
503
566
  AGENTS.md, speculative conclusions.
504
567
 
568
+ Apply the durability test: will this still be true and useful in a future
569
+ session that knows nothing about this branch, commit, or session? If not,
570
+ do not save it. Do not store:
571
+ - Point-in-time values (migration indices, line numbers, file counts) that
572
+ will be stale by next session
573
+ - Commit hashes and branch-specific history narratives. Git is the source
574
+ of truth for this; do not duplicate it in memory
575
+ - Anything re-derivable from the codebase faster than recalling it (current
576
+ file locations, type signatures, function names)
577
+
505
578
  ## Archived Memories
506
579
 
507
580
  Memories can be marked \`archived\` — a flag for stable, long-term historical