@jeffober/thatch 0.1.15 → 0.1.17
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 +37 -15
- package/artifacts/skills/pr-description.md +360 -0
- package/artifacts/skills/split-overlarge-pr.md +112 -0
- package/artifacts/skills/thatch-change-walkthrough.md +211 -0
- package/artifacts/skills/thatch-code-walkthrough.md +194 -0
- package/artifacts/skills/ticket-description.md +399 -0
- package/bin/thatch +1 -1
- package/docs/dev/README.md +42 -18
- package/docs/dev/gotchas.md +27 -0
- package/docs/dev/mcp-parity.md +17 -10
- package/docs/dev/setup-and-hooks.md +4 -4
- package/docs/dev/skills.md +8 -3
- package/docs/qa/README.md +1 -1
- package/docs/qa/use-cases/README.md +4 -2
- package/docs/qa/use-cases/UC-003-extraction-nudge.md +17 -4
- package/docs/qa/use-cases/UC-005-setup-install.md +2 -2
- package/docs/qa/use-cases/UC-006-cursor-hook-lifecycle.md +4 -3
- package/docs/qa/use-cases/UC-009-flush-tools-tiers.md +3 -1
- package/docs/qa/use-cases/UC-014-skill-install-drift.md +3 -3
- package/docs/qa/use-cases/UC-016-concurrent-session-isolation.md +4 -3
- package/docs/qa/use-cases/UC-019-archived-memory-lifecycle.md +36 -0
- package/docs/qa/use-cases/UC-020-extraction-escalation.md +38 -0
- package/docs/user/README.md +27 -5
- package/package.json +3 -2
- package/src/index.ts +15 -15
- package/src/mcp.ts +1 -1
- package/src/prompts.ts +41 -1
- package/src/setup.ts +1 -1
- package/src/skills.ts +11 -3
package/src/prompts.ts
CHANGED
|
@@ -6,7 +6,8 @@ knowledge so future sessions can build on what you've already learned.
|
|
|
6
6
|
|
|
7
7
|
Tools: thatch_memory_remember, thatch_memory_recall, thatch_memory_list,
|
|
8
8
|
thatch_memory_show, thatch_memory_forget, thatch_store_list,
|
|
9
|
-
thatch_find_duplicates, thatch_dedup_mark_checked
|
|
9
|
+
thatch_find_duplicates, thatch_dedup_mark_checked,
|
|
10
|
+
thatch_extraction_done
|
|
10
11
|
|
|
11
12
|
## Stores
|
|
12
13
|
|
|
@@ -34,11 +35,16 @@ workflows. The host auto-discovers them, but reach for them proactively:
|
|
|
34
35
|
|
|
35
36
|
- \`thatch-code-review\` — full multi-agent code review (dispatches 6 specialists + synthesizer). Requires sub-agent support.
|
|
36
37
|
- \`thatch-workflow-research\` — research code workflows affected by a change or planned change, before reviewing or planning.
|
|
38
|
+
- \`thatch-change-walkthrough\` — produces a teaching walkthrough of a diff with a specific format (SYNOPSIS + per-workflow orient/mechanism/numbered-stages + change overlay mirroring the same numbers) and calibrated prose rules. Load the skill for the format and prose rules, not just for the research method.
|
|
39
|
+
- \`thatch-code-walkthrough\` — produces a teaching walkthrough for a feature/workflow as it stands today with a specific format (SYNOPSIS + per-workflow orient/mechanism/numbered-stages + Key files) and calibrated prose rules. Also use proactively to draft high-level docs for new or undocumented features (suitable for pkg/README.md or docs/features/<name>.md). Load the skill for the format and prose rules, not just for the research method.
|
|
37
40
|
- \`thatch-review-context\` — gather project context (PRs, tickets, TODOs, deferred work) before a review.
|
|
38
41
|
- \`thatch-project-primer\` — investigate a new project and write foundational memories.
|
|
39
42
|
- \`thatch-session-reflection\` — record what you learned at end of session.
|
|
40
43
|
- \`thatch-fact-extractor\` — extract durable facts from recent tool interactions (auto-triggered by the extraction pipeline).
|
|
41
44
|
- \`thatch-dedup-classifier\` — resolve duplicate memory pairs from \`thatch_find_duplicates\`.
|
|
45
|
+
- \`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.
|
|
46
|
+
- \`ticket-description\` — draft a ticket, issue, or work item (Linear or Jira) using instructional-design scaffolding with bold and italic emphasis for scanning.
|
|
47
|
+
- \`split-overlarge-pr\` — split already-completed work from an overlarge PR into human-reviewable, release-safe PRs targeting main.
|
|
42
48
|
|
|
43
49
|
## When to Write
|
|
44
50
|
|
|
@@ -46,6 +52,14 @@ workflows. The host auto-discovers them, but reach for them proactively:
|
|
|
46
52
|
Save immediately on: feedback, preferences, corrections, emotional signals,
|
|
47
53
|
new project knowledge, conventions, architectural decisions, investigation results.
|
|
48
54
|
|
|
55
|
+
## Before Responding
|
|
56
|
+
|
|
57
|
+
Before composing a final response after substantial work this turn — multiple
|
|
58
|
+
rounds of tool calls for investigation, debugging, or code-writing — check
|
|
59
|
+
whether you've discovered knowledge worth persisting. Use thatch_memory_recall
|
|
60
|
+
to check for duplicates, then thatch_memory_remember for new findings. Then
|
|
61
|
+
deliver your response.
|
|
62
|
+
|
|
49
63
|
## What to Store
|
|
50
64
|
|
|
51
65
|
- **Global store**: user observations, agent personality, system environment
|
|
@@ -164,12 +178,17 @@ Thatch ships skills for code review, project investigation, and memory
|
|
|
164
178
|
workflows. The host auto-discovers them, but reach for them proactively:
|
|
165
179
|
|
|
166
180
|
- \`thatch-workflow-research\` — research code workflows affected by a change or planned change, before reviewing or planning.
|
|
181
|
+
- \`thatch-change-walkthrough\` — produces a teaching walkthrough of a diff with a specific format (SYNOPSIS + per-workflow orient/mechanism/numbered-stages + change overlay mirroring the same numbers) and calibrated prose rules. Load the skill for the format and prose rules, not just for the research method.
|
|
182
|
+
- \`thatch-code-walkthrough\` — produces a teaching walkthrough for a feature/workflow as it stands today with a specific format (SYNOPSIS + per-workflow orient/mechanism/numbered-stages + Key files) and calibrated prose rules. Also use proactively to draft high-level docs for new or undocumented features (suitable for pkg/README.md or docs/features/<name>.md). Load the skill for the format and prose rules, not just for the research method.
|
|
167
183
|
- \`thatch-review-context\` — gather project context (PRs, tickets, TODOs, deferred work) before a review.
|
|
168
184
|
- \`thatch-review-pedantic\` / \`-acceptance\` / \`-state-flow\` / \`-no-slop\` / \`-breadcrumbs\` / \`-mark-and-sweep\` — six specialist review lenses. Run individually, then \`thatch-review-synthesizer\` to verify and aggregate.
|
|
169
185
|
- \`thatch-project-primer\` — investigate a new project and write foundational memories.
|
|
170
186
|
- \`thatch-session-reflection\` — record what you learned at end of session.
|
|
171
187
|
- \`thatch-fact-extractor\` — extract durable facts from recent tool interactions (auto-triggered by the extraction pipeline).
|
|
172
188
|
- \`thatch-dedup-classifier\` — resolve duplicate memory pairs from \`find_duplicates\`.
|
|
189
|
+
- \`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.
|
|
190
|
+
- \`ticket-description\` — draft a ticket, issue, or work item (Linear or Jira) using instructional-design scaffolding with bold and italic emphasis for scanning.
|
|
191
|
+
- \`split-overlarge-pr\` — split already-completed work from an overlarge PR into human-reviewable, release-safe PRs targeting main.
|
|
173
192
|
|
|
174
193
|
## When to Write
|
|
175
194
|
|
|
@@ -177,6 +196,14 @@ workflows. The host auto-discovers them, but reach for them proactively:
|
|
|
177
196
|
Save immediately on: feedback, preferences, corrections, emotional signals,
|
|
178
197
|
new project knowledge, conventions, architectural decisions, investigation results.
|
|
179
198
|
|
|
199
|
+
## Before Responding
|
|
200
|
+
|
|
201
|
+
Before composing a final response after substantial work this turn — multiple
|
|
202
|
+
rounds of tool calls for investigation, debugging, or code-writing — check
|
|
203
|
+
whether you've discovered knowledge worth persisting. Use memory_recall to
|
|
204
|
+
check for duplicates, then memory_remember for new findings. Then deliver
|
|
205
|
+
your response.
|
|
206
|
+
|
|
180
207
|
## What to Store
|
|
181
208
|
|
|
182
209
|
- **Global store**: user observations, agent personality, system environment
|
|
@@ -357,12 +384,17 @@ Thatch ships skills for code review, project investigation, and memory
|
|
|
357
384
|
workflows. The host auto-discovers them, but reach for them proactively:
|
|
358
385
|
|
|
359
386
|
- \`thatch-workflow-research\` — research code workflows affected by a change or planned change, before reviewing or planning.
|
|
387
|
+
- \`thatch-change-walkthrough\` — produces a teaching walkthrough of a diff with a specific format (SYNOPSIS + per-workflow orient/mechanism/numbered-stages + change overlay mirroring the same numbers) and calibrated prose rules. Load the skill for the format and prose rules, not just for the research method.
|
|
388
|
+
- \`thatch-code-walkthrough\` — produces a teaching walkthrough for a feature/workflow as it stands today with a specific format (SYNOPSIS + per-workflow orient/mechanism/numbered-stages + Key files) and calibrated prose rules. Also use proactively to draft high-level docs for new or undocumented features (suitable for pkg/README.md or docs/features/<name>.md). Load the skill for the format and prose rules, not just for the research method.
|
|
360
389
|
- \`thatch-review-context\` — gather project context (PRs, tickets, TODOs, deferred work) before a review.
|
|
361
390
|
- \`thatch-review-pedantic\` / \`-acceptance\` / \`-state-flow\` / \`-no-slop\` / \`-breadcrumbs\` / \`-mark-and-sweep\` — six specialist review lenses. Run individually, then \`thatch-review-synthesizer\` to verify and aggregate.
|
|
362
391
|
- \`thatch-project-primer\` — investigate a new project and write foundational memories.
|
|
363
392
|
- \`thatch-session-reflection\` — record what you learned at end of session.
|
|
364
393
|
- \`thatch-fact-extractor\` — extract durable facts from recent tool interactions (auto-triggered by the extraction pipeline).
|
|
365
394
|
- \`thatch-dedup-classifier\` — resolve duplicate memory pairs from \`find_duplicates\`.
|
|
395
|
+
- \`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.
|
|
396
|
+
- \`ticket-description\` — draft a ticket, issue, or work item (Linear or Jira) using instructional-design scaffolding with bold and italic emphasis for scanning.
|
|
397
|
+
- \`split-overlarge-pr\` — split already-completed work from an overlarge PR into human-reviewable, release-safe PRs targeting main.
|
|
366
398
|
|
|
367
399
|
## When to Write
|
|
368
400
|
|
|
@@ -370,6 +402,14 @@ workflows. The host auto-discovers them, but reach for them proactively:
|
|
|
370
402
|
Save immediately on: feedback, preferences, corrections, emotional signals,
|
|
371
403
|
new project knowledge, conventions, architectural decisions, investigation results.
|
|
372
404
|
|
|
405
|
+
## Before Responding
|
|
406
|
+
|
|
407
|
+
Before composing a final response after substantial work this turn — multiple
|
|
408
|
+
rounds of tool calls for investigation, debugging, or code-writing — check
|
|
409
|
+
whether you've discovered knowledge worth persisting. Use memory_recall to
|
|
410
|
+
check for duplicates, then memory_remember for new findings. Then deliver
|
|
411
|
+
your response.
|
|
412
|
+
|
|
373
413
|
## What to Store
|
|
374
414
|
|
|
375
415
|
- **Global store**: user observations, agent personality, system environment
|
package/src/setup.ts
CHANGED
|
@@ -173,7 +173,7 @@ function writeHooks(path: string, thatchBin: string): void {
|
|
|
173
173
|
// (see src/extract-queue.ts). No stdout — the next model call must not block
|
|
174
174
|
// on a payload that should be invisible to the agent until UserPromptSubmit.
|
|
175
175
|
const bufferCmd = `${thatchBin} buffer-batch`;
|
|
176
|
-
// UserPromptSubmit
|
|
176
|
+
// UserPromptSubmit peeks the queue. With buffered interactions, it prints
|
|
177
177
|
// the extraction nudge carrying the JSON payload; with an empty queue, it
|
|
178
178
|
// falls back to the static write-nudge. Either output is transcript-visible
|
|
179
179
|
// since UserPromptSubmit adds stdout to context.
|
package/src/skills.ts
CHANGED
|
@@ -16,11 +16,14 @@ function loadSkillFile(name: string): string {
|
|
|
16
16
|
const artifactsDir = join(__dirname, "..", "artifacts", "skills");
|
|
17
17
|
const filePath = join(artifactsDir, name + ".md");
|
|
18
18
|
const raw = readFileSync(filePath, "utf8");
|
|
19
|
-
// Interpolate REVIEW_COMMON
|
|
20
|
-
|
|
19
|
+
// Interpolate REVIEW_COMMON only when it appears on its own line (the
|
|
20
|
+
// directive form used by review specialist skills). Inline mentions in
|
|
21
|
+
// other skills (e.g. as examples in prose) are content, not directives,
|
|
22
|
+
// and must not be interpolated.
|
|
23
|
+
if (/^[ \t]*\$\{REVIEW_COMMON\}[ \t]*$/m.test(raw)) {
|
|
21
24
|
const commonPath = join(artifactsDir, "common.md");
|
|
22
25
|
const commonContent = readFileSync(commonPath, "utf8");
|
|
23
|
-
return raw.replace(
|
|
26
|
+
return raw.replace(/^[ \t]*\$\{REVIEW_COMMON\}[ \t]*$/gm, commonContent);
|
|
24
27
|
}
|
|
25
28
|
return raw;
|
|
26
29
|
}
|
|
@@ -39,7 +42,12 @@ function loadSharedSkills(): SkillDef[] {
|
|
|
39
42
|
"thatch-review-synthesizer",
|
|
40
43
|
"thatch-review-context",
|
|
41
44
|
"thatch-workflow-research",
|
|
45
|
+
"thatch-change-walkthrough",
|
|
46
|
+
"thatch-code-walkthrough",
|
|
42
47
|
"thatch-session-reflection",
|
|
48
|
+
"pr-description",
|
|
49
|
+
"ticket-description",
|
|
50
|
+
"split-overlarge-pr",
|
|
43
51
|
];
|
|
44
52
|
return names.map((name) => ({ name, content: loadSkillFile(name) }));
|
|
45
53
|
}
|