thoth-plugin 1.1.1 → 1.2.0

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.
@@ -0,0 +1,134 @@
1
+ ---
2
+ name: email-draft
3
+ description: Use when drafting emails, composing replies, or writing professional messages that will be sent via Gmail.
4
+ triggers:
5
+ - draft email
6
+ - draft a reply
7
+ - write an email
8
+ - respond to email
9
+ - compose email
10
+ - reply to this email
11
+ - help me write an email
12
+ - email response
13
+ ---
14
+
15
+ # Email Draft
16
+
17
+ **Core principle:** Gmail does not support Markdown. Always use HTML formatting with `body_format="html"`.
18
+
19
+ ---
20
+
21
+ ## When to Use
22
+
23
+ - Drafting a reply to an email
24
+ - Composing a new email
25
+ - Writing professional messages via Gmail
26
+
27
+ **Do NOT use when:**
28
+ - Sending Slack messages (different formatting)
29
+ - Writing internal KB notes (Markdown is fine)
30
+
31
+ ---
32
+
33
+ ## Quick Reference
34
+
35
+ | Task | Command/Action |
36
+ |------|----------------|
37
+ | Bold text | `<b>text</b>` |
38
+ | Italic text | `<i>text</i>` |
39
+ | Line break | `<br>` |
40
+ | Paragraph | `<p>text</p>` |
41
+ | Bullet list | `<ul><li>item</li></ul>` |
42
+ | Numbered list | `<ol><li>item</li></ol>` |
43
+ | Create draft | `google-workspace_draft_gmail_message` with `body_format="html"` |
44
+ | Send email | `google-workspace_send_gmail_message` with `body_format="html"` |
45
+
46
+ ---
47
+
48
+ ## Process
49
+
50
+ ### 1. Gather Context
51
+
52
+ **For replies:**
53
+ - Retrieve thread with `get_gmail_thread_content(thread_id, user_google_email)`
54
+ - Extract `thread_id` and `in_reply_to` (Message-ID header)
55
+ - Note key points requiring response
56
+
57
+ **For new emails:**
58
+ - Confirm recipient and purpose
59
+ - Check stakeholder file if available (`work/Stakeholders/` or `work/Team/`)
60
+
61
+ ### 2. Draft Content
62
+
63
+ Structure:
64
+ 1. **Opening** — Acknowledge their message (replies) or state purpose (new)
65
+ 2. **Body** — Key points with `<b>headers</b>` for multiple topics
66
+ 3. **Closing** — Next steps or call to action
67
+ 4. **Sign-off** — "Best, David"
68
+
69
+ Format with HTML:
70
+ - `<b>` for section headers
71
+ - `<ul><li>` for lists of 3+ items
72
+ - `<p>` for paragraph separation
73
+ - `<i>` sparingly for emphasis
74
+
75
+ ### 3. Present for Approval
76
+
77
+ Show full email in chat before saving:
78
+
79
+ ```
80
+ **Draft ready for review:**
81
+
82
+ ---
83
+ [Email content]
84
+ ---
85
+
86
+ **To:** recipient
87
+ **CC:** if applicable
88
+
89
+ Shall I save as draft?
90
+ ```
91
+
92
+ ### 4. Save Draft
93
+
94
+ ```python
95
+ google-workspace_draft_gmail_message(
96
+ user_google_email="david.helmus@hellofresh.com",
97
+ to="recipient@example.com",
98
+ subject="Re: Subject",
99
+ body="<p>HTML content</p>",
100
+ body_format="html", # CRITICAL
101
+ thread_id="...", # For replies
102
+ in_reply_to="<message-id>" # For replies
103
+ )
104
+ ```
105
+
106
+ ---
107
+
108
+ ## Common Mistakes
109
+
110
+ | Mistake | Prevention |
111
+ |---------|------------|
112
+ | Using Markdown `**bold**` | Use HTML `<b>bold</b>` — Gmail renders Markdown literally |
113
+ | Forgetting `body_format="html"` | Always include — defaults to plain text |
114
+ | Missing `thread_id` on replies | Retrieve from original message first |
115
+ | Sending without approval | Always draft first, ask Zeus to confirm |
116
+ | Using personal email for work | Work context = `david.helmus@hellofresh.com` |
117
+
118
+ ---
119
+
120
+ ## Red Flags - STOP
121
+
122
+ - About to use `**` or `__` for formatting — STOP, use HTML
123
+ - About to send without Zeus approval — STOP, save as draft
124
+ - Can't find thread_id for a reply — STOP, retrieve original thread first
125
+
126
+ ---
127
+
128
+ ## Verification Checklist
129
+
130
+ - [ ] Used HTML tags, not Markdown
131
+ - [ ] Included `body_format="html"` parameter
132
+ - [ ] For replies: included `thread_id` and `in_reply_to`
133
+ - [ ] Presented draft to Zeus before saving
134
+ - [ ] Used correct email (work vs personal context)
@@ -1,6 +1,13 @@
1
1
  ---
2
2
  name: evening-close
3
3
  description: Summarize the day, extract incomplete tasks into tomorrow's overflow, and persist daily learnings to the Knowledge Base.
4
+ triggers:
5
+ - end of day
6
+ - close out
7
+ - wrap up the day
8
+ - evening summary
9
+ - what did I accomplish
10
+ - end my day
4
11
  ---
5
12
 
6
13
  # Evening Close Skill
@@ -7,7 +7,42 @@ description: Use when knowledge base health needs checking, broken links need fi
7
7
 
8
8
  You are the **Knowledge Base Gardener**. Your role is to maintain the structural integrity and connectivity of the Thoth knowledge base.
9
9
 
10
- **Core principle:** A healthy knowledge base has no broken links, no orphan files, and rich cross-references between related content.
10
+ **Core principle:** A healthy knowledge base has no broken links, no orphan files, consistent frontmatter, and rich cross-references between related content.
11
+
12
+ ---
13
+
14
+ ## Frontmatter Schema Reference
15
+
16
+ The canonical frontmatter schema is defined in `kernel/config/frontmatter-schemas.yaml`. Key points:
17
+
18
+ ### Base Fields (ALL files)
19
+
20
+ | Field | Required | Auto-managed |
21
+ |-------|----------|--------------|
22
+ | `type` | Yes | No - agent sets |
23
+ | `hemisphere` | Yes | Inferred from path |
24
+ | `created` | Yes | **Hook auto-sets** |
25
+ | `updated` | Yes | **Hook auto-updates** |
26
+ | `tags` | No | Agent sets |
27
+ | `summary` | No | Agent sets |
28
+
29
+ ### Type-Specific Fields
30
+
31
+ | Type | Extra Required | Extra Optional |
32
+ |------|----------------|----------------|
33
+ | `person` | `relationship` | `email`, `slack` |
34
+ | `project` | `status` | `priority`, `health`, `due`, `stakeholders` |
35
+ | `task` | `status`, `priority` | `due`, `project` |
36
+ | All others | (none) | (none) |
37
+
38
+ ### Valid Values
39
+
40
+ - **hemisphere**: `kernel`, `work`, `life`, `coding`
41
+ - **relationship**: `manager`, `peer`, `report`, `stakeholder`, `friend`, `family`
42
+ - **status** (project): `planning`, `active`, `on-hold`, `completed`, `cancelled`
43
+ - **status** (task): `pending`, `in-progress`, `done`, `cancelled`, `blocked`
44
+ - **priority**: `P0`, `P1`, `P2`, `P3`
45
+ - **health**: `green`, `yellow`, `red`
11
46
 
12
47
  ---
13
48
 
@@ -1,6 +1,13 @@
1
1
  ---
2
2
  name: leadership-coach
3
3
  description: IC-to-Manager coaching for new leaders. Use for leadership challenges, team operations, stakeholder management, 1:1 prep, performance conversations, or when feeling overwhelmed as a new manager.
4
+ triggers:
5
+ - help me with leadership
6
+ - manager coaching
7
+ - prep for 1:1
8
+ - performance conversation
9
+ - feeling overwhelmed as manager
10
+ - team challenge
4
11
  ---
5
12
 
6
13
  ## Role
@@ -1,6 +1,13 @@
1
1
  ---
2
2
  name: mail-triage
3
3
  description: Exhaustive Gmail inbox triage using the Thoth standard protocol. Drains ALL inbox items and returns an executive dashboard.
4
+ triggers:
5
+ - check my email
6
+ - email triage
7
+ - process inbox
8
+ - what's in my inbox
9
+ - scan my email
10
+ - any important emails
4
11
  ---
5
12
 
6
13
  # Mail Triage Skill
@@ -1,6 +1,14 @@
1
1
  ---
2
2
  name: morning-boot
3
3
  description: The master orchestrator for your morning routine. Parallelizes scans and synthesizes the Daily Log.
4
+ triggers:
5
+ - start my day
6
+ - morning routine
7
+ - prepare me for the day
8
+ - what do I need to do today
9
+ - boot up
10
+ - daily briefing
11
+ - morning boot
4
12
  ---
5
13
 
6
14
  # Morning Boot Skill
@@ -1,6 +1,12 @@
1
1
  ---
2
2
  name: post-meeting-drill
3
3
  description: Deep processing of meeting notes with context hydration, entity resolution, thought-routing, urgency assessment, and knowledge persistence.
4
+ triggers:
5
+ - process meeting notes
6
+ - meeting follow-up
7
+ - extract action items from meeting
8
+ - drill meeting
9
+ - post meeting
4
10
  ---
5
11
 
6
12
  # Post-Meeting Drill Skill
@@ -7,7 +7,7 @@ description: Use when creating a new skill, editing an existing skill, or when a
7
7
 
8
8
  You are creating or editing a skill for the Thoth knowledge system.
9
9
 
10
- **Core principle:** No skill without baseline understanding first. Writing skills IS Test-Driven Development applied to process documentation.
10
+ **Core principle:** No skill without baseline failure first. Writing skills IS Test-Driven Development applied to process documentation.
11
11
 
12
12
  **Violating the letter of this process is violating the spirit of this process.**
13
13
 
@@ -16,20 +16,21 @@ You are creating or editing a skill for the Thoth knowledge system.
16
16
  ## The Iron Law
17
17
 
18
18
  ```
19
- NO SKILL FILE CREATED UNTIL PHASE 1 IS COMPLETE
19
+ NO SKILL FILE CREATED UNTIL RED PHASE SUBAGENT COMPLETES
20
20
  ```
21
21
 
22
- If you create a SKILL.md before completing Phase 1, delete it. Start over.
22
+ If you create a SKILL.md before the RED phase subagent documents a failure, delete it. Start over.
23
23
 
24
24
  **No exceptions:**
25
25
  - Don't keep it as "draft"
26
- - Don't "refine it later"
26
+ - Don't "refine it later"
27
27
  - Don't skip because "it's simple"
28
+ - Don't skip because "it's just a technique skill"
28
29
  - Delete means delete
29
30
 
30
31
  ---
31
32
 
32
- ## Phase 1: Research (Before Writing Anything)
33
+ ## Phase 0: Setup
33
34
 
34
35
  ### Step 1: Check if Skill Exists
35
36
 
@@ -41,39 +42,72 @@ If exists: Read it first. You're editing, not creating.
41
42
 
42
43
  ### Step 2: Classify Skill Type
43
44
 
44
- | Type | Purpose | Testing Approach |
45
- |------|---------|------------------|
46
- | **Discipline** | Rules that resist rationalization (TDD, verification) | Subagent pressure test |
47
- | **Workflow** | Multi-step process with checkpoints | Manual walkthrough |
48
- | **Technique** | Concrete method with steps | Clarity check |
49
- | **Reference** | API docs, syntax guides | Retrieval test |
45
+ | Type | Purpose |
46
+ |------|---------|
47
+ | **Discipline** | Rules that resist rationalization (TDD, verification) |
48
+ | **Workflow** | Multi-step process with checkpoints |
49
+ | **Technique** | Concrete method with steps |
50
+ | **Reference** | API docs, syntax guides |
50
51
 
51
52
  **Write down the type before proceeding.**
52
53
 
53
54
  ### Step 3: Research the Domain
54
55
 
55
- For technique/reference skills:
56
56
  - What tools/APIs are involved?
57
57
  - What are common mistakes?
58
58
  - What does success look like?
59
59
 
60
- For discipline skills:
61
- - What behavior are we enforcing?
60
+ For discipline skills, also identify:
62
61
  - What rationalizations will agents use to skip it?
63
62
  - What pressure scenarios test compliance?
64
63
 
65
- ### Step 4: Baseline Test (Discipline Skills Only)
64
+ ---
65
+
66
+ ## Phase 1: RED — Baseline Test (MANDATORY)
67
+
68
+ **You MUST dispatch a subagent to attempt the task WITHOUT the skill.**
69
+
70
+ ### Dispatch Baseline Subagent
71
+
72
+ ```
73
+ task(
74
+ subagent_type="general",
75
+ description="Baseline test for {skill-name}",
76
+ prompt="""
77
+ You are testing baseline behavior WITHOUT a skill.
78
+
79
+ **Task:** {Describe the task the skill will teach}
80
+
81
+ **Context:** {Relevant context}
82
+
83
+ **Instructions:** Complete the task using your best judgment.
84
+ Do NOT load any skills. Just complete the task as you normally would.
85
+
86
+ **Report back:**
87
+ 1. What approach did you take?
88
+ 2. What formatting/tools/methods did you use?
89
+ 3. Show the exact output you produced.
90
+ 4. What assumptions did you make?
91
+ """
92
+ )
93
+ ```
94
+
95
+ ### Document the Failure
66
96
 
67
- Run a scenario WITHOUT the skill. Document:
68
- - What did the agent do?
69
- - What rationalizations were used?
70
- - What was skipped?
97
+ Before proceeding, write down:
98
+ - **What the agent did wrong** (or suboptimally)
99
+ - **What rationalizations were used** (verbatim if possible)
100
+ - **What the skill must teach** to prevent this
71
101
 
72
- See [testing-protocol.md](testing-protocol.md) for detailed testing procedures by skill type.
102
+ **GATE: Do not proceed to Phase 2 until you have documented at least one failure or suboptimal behavior.**
103
+
104
+ If the baseline agent does everything perfectly, you may not need this skill.
73
105
 
74
106
  ---
75
107
 
76
- ## Phase 2: Write Minimal Skill
108
+ ## Phase 2: GREEN — Write Minimal Skill
109
+
110
+ Address the specific failures documented in Phase 1.
77
111
 
78
112
  ### Frontmatter (Required)
79
113
 
@@ -81,9 +115,26 @@ See [testing-protocol.md](testing-protocol.md) for detailed testing procedures b
81
115
  ---
82
116
  name: lowercase-with-hyphens
83
117
  description: Use when [specific triggers]. Third person. No workflow summary.
118
+ triggers:
119
+ - phrase that activates this skill
120
+ - another trigger phrase
121
+ - variations users might say
84
122
  ---
85
123
  ```
86
124
 
125
+ **Frontmatter Rules:**
126
+
127
+ | Field | Purpose | Rules |
128
+ |-------|---------|-------|
129
+ | `name` | Skill identifier | lowercase, hyphens only |
130
+ | `description` | Injected into system prompt for skill discovery | Start with "Use when...", third person, no workflow summary |
131
+ | `triggers` | **Automatic skill invocation** | Phrases users say that should activate this skill |
132
+
133
+ **Triggers are critical** — they teach Thoth when to use the skill automatically. Include:
134
+ - Direct commands ("check my email")
135
+ - Natural phrases ("what's in my inbox")
136
+ - Variations ("email triage", "process inbox")
137
+
87
138
  **Description Rules:**
88
139
  - ✅ Start with "Use when..."
89
140
  - ✅ Describe triggers/symptoms only
@@ -155,15 +206,67 @@ Copy this template and fill in:
155
206
 
156
207
  ---
157
208
 
158
- ## Phase 3: Quality Gate
209
+ ## Phase 3: GREEN — Verify With Skill (MANDATORY)
210
+
211
+ **You MUST dispatch a subagent to attempt the same task WITH the skill.**
212
+
213
+ ### Dispatch Skill-Guided Subagent
214
+
215
+ ```
216
+ task(
217
+ subagent_type="general",
218
+ description="Skill-guided test for {skill-name}",
219
+ prompt="""
220
+ You are testing a skill.
221
+
222
+ **REQUIRED SKILL — Read and follow this exactly:**
223
+
224
+ ---
225
+ {Paste the full skill content here}
226
+ ---
227
+
228
+ **Task:** {Same task as baseline}
229
+
230
+ **Context:** {Same context as baseline}
231
+
232
+ **Instructions:** Follow the skill above. Complete the task.
233
+
234
+ **Report back:**
235
+ 1. What approach did you take?
236
+ 2. Did you follow the skill completely?
237
+ 3. Show the exact output you produced.
238
+ """
239
+ )
240
+ ```
241
+
242
+ ### Verify the Fix
243
+
244
+ Compare baseline vs skill-guided:
245
+ - Did the agent avoid the mistakes from Phase 1?
246
+ - Any NEW rationalizations that bypassed the skill?
247
+ - Any ambiguities in the skill that allowed violations?
248
+
249
+ **GATE: Do not proceed until the skill-guided agent performs correctly.**
159
250
 
160
- Before claiming the skill is complete, verify:
251
+ If the agent still fails, revise the skill and re-test.
252
+
253
+ ---
254
+
255
+ ## Phase 4: REFACTOR — Quality Gate
256
+
257
+ ### Close Loopholes
258
+
259
+ For each new rationalization found in Phase 3:
260
+ 1. Add explicit counter to Common Mistakes or Rationalization Table
261
+ 2. Add to Red Flags section
262
+ 3. Re-run Phase 3 if significant changes made
161
263
 
162
264
  ### Format Checks
163
265
 
164
266
  - [ ] Name: lowercase, hyphens only, no special chars
165
267
  - [ ] Description: starts with "Use when...", no workflow summary
166
268
  - [ ] Description: third person, under 500 chars
269
+ - [ ] **Triggers: list of phrases that activate this skill**
167
270
  - [ ] Has "Core principle" statement
168
271
  - [ ] Has "When to Use" section
169
272
  - [ ] Has "Quick Reference" table
@@ -183,7 +286,8 @@ wc -l .opencode/skill/{name}/SKILL.md
183
286
 
184
287
  ### Functional Check
185
288
 
186
- - [ ] Walked through the skill as if following it
289
+ - [ ] Baseline subagent documented failure (Phase 1)
290
+ - [ ] Skill-guided subagent performed correctly (Phase 3)
187
291
  - [ ] All referenced tools/commands exist
188
292
  - [ ] No ambiguous instructions
189
293
 
@@ -198,20 +302,26 @@ wc -l .opencode/skill/{name}/SKILL.md
198
302
  | "The example is self-explanatory" | Examples don't replace Quick Reference tables. |
199
303
  | "It's just a reference skill" | Reference skills still need When to Use and Common Mistakes. |
200
304
  | "I already know this domain" | Your knowledge isn't in the file. Document it. |
201
- | "Baseline test is overkill" | Baseline reveals what you'll skip. Do it. |
305
+ | "Baseline test is overkill" | Baseline reveals what you'll skip. Do it. Subagent is mandatory. |
306
+ | "It's just a technique skill, doesn't need baseline" | Technique skills fail too. We learned this with email-draft. Test everything. |
307
+ | "I already know what will fail" | You're guessing. Run the subagent. Document actual behavior. |
308
+ | "I'll test after writing" | That's not TDD. RED comes before GREEN. Delete and start over. |
202
309
  | "Description can summarize the workflow" | Claude follows descriptions instead of reading skills. Never summarize. |
203
310
 
204
311
  ---
205
312
 
206
313
  ## Red Flags - STOP
207
314
 
208
- - Creating SKILL.md before completing Phase 1
315
+ - Creating SKILL.md before RED phase subagent completes
316
+ - Skipping baseline test for ANY skill type
317
+ - "I already know what will fail" without running subagent
209
318
  - Description summarizes workflow ("scans X, extracts Y, outputs Z")
319
+ - **Missing `triggers:` in frontmatter** — skill won't be auto-invoked
210
320
  - Missing "When to Use" section
211
321
  - No Quick Reference table
212
- - Skipping baseline test for discipline skills
213
322
  - "I'll test it later"
214
323
  - Skill over 500 lines without supporting files
324
+ - Proceeding to Phase 4 without Phase 3 subagent verification
215
325
 
216
326
  **All of these mean: STOP. Go back to the phase you skipped.**
217
327
 
@@ -237,4 +347,16 @@ This skill is a lightweight enforcement layer. The guide has the full theory and
237
347
 
238
348
  ---
239
349
 
240
- *Skill Generator v1.0 | Part of Thoth Knowledge Management System*
350
+ *Skill Generator v2.0 | Part of Thoth Knowledge Management System*
351
+
352
+ ---
353
+
354
+ ## Quick Reference: The Phases
355
+
356
+ | Phase | Name | Action | Gate |
357
+ |-------|------|--------|------|
358
+ | 0 | Setup | Check exists, classify type, research domain | — |
359
+ | 1 | RED | Dispatch subagent WITHOUT skill, document failure | Must have documented failure |
360
+ | 2 | GREEN | Write minimal skill addressing failures | — |
361
+ | 3 | GREEN | Dispatch subagent WITH skill, verify fix | Must pass |
362
+ | 4 | REFACTOR | Close loopholes, quality checks | All checks pass |
@@ -1,6 +1,12 @@
1
1
  ---
2
2
  name: slack-pulse
3
3
  description: Scan Slack for mentions, high-value DMs, and informal requests using the Thoth standard protocol.
4
+ triggers:
5
+ - check slack
6
+ - slack mentions
7
+ - what's happening on slack
8
+ - any slack messages
9
+ - scan slack
4
10
  ---
5
11
 
6
12
  # Slack Pulse Skill
@@ -1,6 +1,13 @@
1
1
  ---
2
2
  name: thought-router
3
3
  description: Quick capture tool that routes unstructured brain dumps to their correct home in the Thoth knowledge base.
4
+ triggers:
5
+ - quick thought
6
+ - capture this
7
+ - brain dump
8
+ - remember this
9
+ - note this down
10
+ - dump
4
11
  ---
5
12
 
6
13
  # Thought Router Skill
@@ -0,0 +1,24 @@
1
+ export interface FrontmatterEnforcerConfig {
2
+ knowledgeBasePath: string;
3
+ enabled?: boolean;
4
+ }
5
+ export declare function createFrontmatterEnforcerHook(config: FrontmatterEnforcerConfig): {
6
+ "tool.execute.before": (input: {
7
+ tool: string;
8
+ callID?: string;
9
+ }, output: {
10
+ args: Record<string, unknown>;
11
+ abort?: {
12
+ reason: string;
13
+ };
14
+ }) => Promise<void>;
15
+ "tool.execute.after": (input: {
16
+ tool: string;
17
+ callID: string;
18
+ }, _output: {
19
+ title: string;
20
+ output: string;
21
+ metadata: unknown;
22
+ }) => Promise<void>;
23
+ } | null;
24
+ export type FrontmatterEnforcerHook = ReturnType<typeof createFrontmatterEnforcerHook>;
@@ -2,3 +2,6 @@ export { createPermissionEnforcerHook, type PermissionEnforcerHook, type Permiss
2
2
  export { createTrustLevelTrackerHook, type TrustLevelTrackerHook, type TrustLevelTrackerConfig, type TrustLevel, type TrustState, } from "./trust-level-tracker";
3
3
  export { createContextApertureHook, type ContextApertureHook, type ContextApertureConfig, } from "./context-aperture";
4
4
  export { createTemporalAwarenessHook, type TemporalAwarenessHook, type TemporalAwarenessConfig, } from "./temporal-awareness";
5
+ export { createFrontmatterEnforcerHook, type FrontmatterEnforcerHook, type FrontmatterEnforcerConfig, } from "./frontmatter-enforcer";
6
+ export { createReadConfirmationHook, type ReadConfirmationHook, type ReadConfirmationConfig, } from "./read-confirmation";
7
+ export { createWriteConfirmationHook, type WriteConfirmationHook, type WriteConfirmationConfig, } from "./write-confirmation";
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Read Confirmation Hook
3
+ *
4
+ * After file reads, injects a confirmation message into the conversation.
5
+ * This creates an audit trail and prevents hallucination about what was read.
6
+ *
7
+ * Value:
8
+ * - Prevents "I read file X" when it wasn't actually read
9
+ * - Creates audit trail of file access
10
+ * - Helps with context management
11
+ */
12
+ export interface ReadConfirmationConfig {
13
+ knowledgeBasePath: string;
14
+ enabled?: boolean;
15
+ /** Only confirm reads within the knowledge base (default: true) */
16
+ kbOnly?: boolean;
17
+ }
18
+ export declare function createReadConfirmationHook(config: ReadConfirmationConfig): {
19
+ "tool.execute.before": (input: {
20
+ tool: string;
21
+ callID: string;
22
+ }, output: {
23
+ args: Record<string, unknown>;
24
+ }) => Promise<void>;
25
+ "tool.execute.after": (input: {
26
+ tool: string;
27
+ callID: string;
28
+ }, output: {
29
+ title: string;
30
+ output: string;
31
+ metadata: unknown;
32
+ }) => Promise<void>;
33
+ } | null;
34
+ export type ReadConfirmationHook = ReturnType<typeof createReadConfirmationHook>;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Write Confirmation Hook
3
+ *
4
+ * After file writes/edits, injects a confirmation message with reminders.
5
+ * This creates an audit trail and reinforces the Smart Merge protocol.
6
+ *
7
+ * Value:
8
+ * - Reminds about _index.md updates for new files
9
+ * - Creates audit trail of file modifications
10
+ * - Reinforces Smart Merge protocol
11
+ */
12
+ export interface WriteConfirmationConfig {
13
+ knowledgeBasePath: string;
14
+ enabled?: boolean;
15
+ /** Only confirm writes within the knowledge base (default: true) */
16
+ kbOnly?: boolean;
17
+ }
18
+ export declare function createWriteConfirmationHook(config: WriteConfirmationConfig): {
19
+ "tool.execute.before": (input: {
20
+ tool: string;
21
+ callID: string;
22
+ }, output: {
23
+ args: Record<string, unknown>;
24
+ }) => Promise<void>;
25
+ "tool.execute.after": (input: {
26
+ tool: string;
27
+ callID: string;
28
+ }, output: {
29
+ title: string;
30
+ output: string;
31
+ metadata: unknown;
32
+ }) => Promise<void>;
33
+ } | null;
34
+ export type WriteConfirmationHook = ReturnType<typeof createWriteConfirmationHook>;