thoth-plugin 1.2.4 → 1.2.5

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.
Files changed (101) hide show
  1. package/README.md +17 -1
  2. package/defaults/skill/cal-grid/SKILL.md +168 -0
  3. package/defaults/skill/cal-grid/cal-grid-template.md +106 -0
  4. package/defaults/skill/context-discovery/SKILL.md +253 -0
  5. package/defaults/skill/context-discovery/discovery.prose +143 -0
  6. package/defaults/skill/context-onboarding/SKILL.md +370 -0
  7. package/{dist/defaults/skill/_legacy/email-draft/skill.md → defaults/skill/email-draft/SKILL.md} +33 -30
  8. package/defaults/skill/evening-close/SKILL.md +93 -61
  9. package/defaults/skill/evening-close/evening-close-template.md +42 -0
  10. package/{dist/defaults/skill/_legacy → defaults/skill}/gardener/SKILL.md +3 -3
  11. package/{dist/defaults/skill/_legacy → defaults/skill}/google-chat-scan/SKILL.md +7 -0
  12. package/{dist/defaults/skill/_legacy → defaults/skill}/leadership-coach/SKILL.md +9 -8
  13. package/defaults/skill/mail-triage/SKILL.md +272 -15
  14. package/defaults/skill/mail-triage/mail-triage-template.md +90 -0
  15. package/defaults/skill/morning-boot/SKILL.md +214 -25
  16. package/defaults/skill/morning-boot/daily-log-template.md +98 -0
  17. package/defaults/skill/morning-boot/morning-boot.prose +98 -0
  18. package/defaults/skill/{_legacy/onboarding → onboarding}/SKILL.md +7 -6
  19. package/defaults/skill/open-prose/SKILL.md +373 -0
  20. package/defaults/skill/open-prose/antipatterns.md +852 -0
  21. package/defaults/skill/open-prose/docs.md +2676 -0
  22. package/defaults/skill/open-prose/patterns.md +610 -0
  23. package/defaults/skill/open-prose/prose.md +950 -0
  24. package/{dist/defaults/skill/_legacy → defaults/skill}/post-meeting-drill/SKILL.md +90 -95
  25. package/defaults/skill/post-meeting-drill/examples.md +130 -0
  26. package/defaults/skill/post-meeting-drill/post-meeting-drill-template.md +111 -0
  27. package/defaults/skill/skill-generator/SKILL.md +217 -0
  28. package/defaults/skill/skill-generator/skill-template.md +163 -0
  29. package/defaults/skill/slack-pulse/SKILL.md +211 -14
  30. package/defaults/skill/slack-pulse/slack-pulse-template.md +98 -0
  31. package/defaults/skill/slack-write/skill.md +184 -0
  32. package/defaults/skill/thought-router/SKILL.md +7 -8
  33. package/dist/cli.js +137 -3
  34. package/dist/config/schema.d.ts +0 -2
  35. package/dist/defaults/skill/cal-grid/SKILL.md +168 -0
  36. package/dist/defaults/skill/cal-grid/cal-grid-template.md +106 -0
  37. package/dist/defaults/skill/context-discovery/SKILL.md +253 -0
  38. package/dist/defaults/skill/context-discovery/discovery.prose +143 -0
  39. package/dist/defaults/skill/context-onboarding/SKILL.md +370 -0
  40. package/{defaults/skill/_legacy/email-draft/skill.md → dist/defaults/skill/email-draft/SKILL.md} +33 -30
  41. package/dist/defaults/skill/evening-close/SKILL.md +93 -61
  42. package/dist/defaults/skill/evening-close/evening-close-template.md +42 -0
  43. package/{defaults/skill/_legacy → dist/defaults/skill}/gardener/SKILL.md +3 -3
  44. package/{defaults/skill/_legacy → dist/defaults/skill}/google-chat-scan/SKILL.md +7 -0
  45. package/{defaults/skill/_legacy → dist/defaults/skill}/leadership-coach/SKILL.md +9 -8
  46. package/dist/defaults/skill/mail-triage/SKILL.md +272 -15
  47. package/dist/defaults/skill/mail-triage/mail-triage-template.md +90 -0
  48. package/dist/defaults/skill/morning-boot/SKILL.md +214 -25
  49. package/dist/defaults/skill/morning-boot/daily-log-template.md +98 -0
  50. package/dist/defaults/skill/morning-boot/morning-boot.prose +98 -0
  51. package/dist/defaults/skill/{_legacy/onboarding → onboarding}/SKILL.md +7 -6
  52. package/dist/defaults/skill/open-prose/SKILL.md +373 -0
  53. package/dist/defaults/skill/open-prose/antipatterns.md +852 -0
  54. package/dist/defaults/skill/open-prose/docs.md +2676 -0
  55. package/dist/defaults/skill/open-prose/patterns.md +610 -0
  56. package/dist/defaults/skill/open-prose/prose.md +950 -0
  57. package/{defaults/skill/_legacy → dist/defaults/skill}/post-meeting-drill/SKILL.md +90 -95
  58. package/dist/defaults/skill/post-meeting-drill/examples.md +130 -0
  59. package/dist/defaults/skill/post-meeting-drill/post-meeting-drill-template.md +111 -0
  60. package/dist/defaults/skill/skill-generator/SKILL.md +217 -0
  61. package/dist/defaults/skill/skill-generator/skill-template.md +163 -0
  62. package/dist/defaults/skill/slack-pulse/SKILL.md +211 -14
  63. package/dist/defaults/skill/slack-pulse/slack-pulse-template.md +98 -0
  64. package/dist/defaults/skill/slack-write/skill.md +184 -0
  65. package/dist/defaults/skill/thought-router/SKILL.md +7 -8
  66. package/dist/hooks/index.d.ts +0 -1
  67. package/dist/index.js +14 -201
  68. package/dist/sdk/index.d.ts +1 -1
  69. package/dist/sdk/sentinel-service.d.ts +0 -1
  70. package/dist/sdk/test-harness.d.ts +90 -0
  71. package/dist/shared/index.d.ts +0 -1
  72. package/dist/specialization/prompt-sections.d.ts +1 -1
  73. package/package.json +1 -1
  74. package/defaults/skill/_legacy/cal-grid/SKILL.md +0 -16
  75. package/defaults/skill/_legacy/skill-generator/SKILL.md +0 -362
  76. package/dist/defaults/skill/_legacy/cal-grid/SKILL.md +0 -16
  77. package/dist/defaults/skill/_legacy/skill-generator/SKILL.md +0 -362
  78. package/dist/hooks/temporal-awareness.d.ts +0 -31
  79. package/dist/hooks/temporal-awareness.test.d.ts +0 -1
  80. /package/defaults/skill/{_legacy/capsule-init → capsule-init}/SKILL.md +0 -0
  81. /package/defaults/skill/{_legacy/cross-linker → cross-linker}/SKILL.md +0 -0
  82. /package/defaults/skill/{_legacy/gardener → gardener}/confidence-tiers.md +0 -0
  83. /package/defaults/skill/{_legacy/gardener → gardener}/repair-workflow.md +0 -0
  84. /package/defaults/skill/{_legacy/handover → handover}/SKILL.md +0 -0
  85. /package/defaults/skill/{_legacy/interview-prep → interview-prep}/SKILL.md +0 -0
  86. /package/defaults/skill/{_legacy/link-retrofit → link-retrofit}/SKILL.md +0 -0
  87. /package/defaults/skill/{_legacy/restore-environment → restore-environment}/SKILL.md +0 -0
  88. /package/defaults/skill/{_legacy/scorecard-synthesis → scorecard-synthesis}/SKILL.md +0 -0
  89. /package/defaults/skill/{_legacy/skill-generator → skill-generator}/testing-protocol.md +0 -0
  90. /package/defaults/skill/{_legacy/system-init → system-init}/SKILL.md +0 -0
  91. /package/dist/defaults/skill/{_legacy/capsule-init → capsule-init}/SKILL.md +0 -0
  92. /package/dist/defaults/skill/{_legacy/cross-linker → cross-linker}/SKILL.md +0 -0
  93. /package/dist/defaults/skill/{_legacy/gardener → gardener}/confidence-tiers.md +0 -0
  94. /package/dist/defaults/skill/{_legacy/gardener → gardener}/repair-workflow.md +0 -0
  95. /package/dist/defaults/skill/{_legacy/handover → handover}/SKILL.md +0 -0
  96. /package/dist/defaults/skill/{_legacy/interview-prep → interview-prep}/SKILL.md +0 -0
  97. /package/dist/defaults/skill/{_legacy/link-retrofit → link-retrofit}/SKILL.md +0 -0
  98. /package/dist/defaults/skill/{_legacy/restore-environment → restore-environment}/SKILL.md +0 -0
  99. /package/dist/defaults/skill/{_legacy/scorecard-synthesis → scorecard-synthesis}/SKILL.md +0 -0
  100. /package/dist/defaults/skill/{_legacy/skill-generator → skill-generator}/testing-protocol.md +0 -0
  101. /package/dist/defaults/skill/{_legacy/system-init → system-init}/SKILL.md +0 -0
@@ -0,0 +1,370 @@
1
+ ---
2
+ name: context-onboarding
3
+ description: Use when context-discovery fails and user needs to set up their Thoth KB. Guides user through creating identity files and basic KB structure. Triggered automatically when morning-boot can't find required context.
4
+ triggers:
5
+ created: 2026-01-09
6
+ updated: 2026-01-10
7
+ ---
8
+
9
+ <!--
10
+ ARCHITECTURE REFERENCE: docs/concepts/skill-architecture.md
11
+ This skill is typically invoked when context-discovery fails.
12
+ -->
13
+
14
+ # Context Onboarding
15
+
16
+ **Core principle:** Get the user from zero to working morning-boot in under 2 minutes with the minimum viable configuration.
17
+
18
+ ---
19
+
20
+ ## When to Use
21
+
22
+ - context-discovery returned `ready: false`
23
+ - User has no thoth-kb set up
24
+ - User asks to "set up thoth" or "initialize knowledge base"
25
+ - First-time user trying to run a context-dependent skill
26
+
27
+ **Do NOT use when:**
28
+ - context-discovery succeeded (ready: true)
29
+ - User just needs to add a single file (guide them directly)
30
+ - User explicitly wants manual setup
31
+
32
+ ---
33
+
34
+ ## Quick Reference
35
+
36
+ | Task | Action |
37
+ |------|--------|
38
+ | Determine KB location | Ask user OR use `~/.thoth-kb/` default |
39
+ | Get work email | Ask user (required for morning-boot) |
40
+ | Get timezone | Ask user OR detect from system |
41
+ | Create structure | kernel/, work/, life/ directories |
42
+ | Create config | `~/.config/opencode/thoth.json` + `.opencode/thoth.json` |
43
+ | Create identity | `work/AGENTS.md` with MCP config table |
44
+
45
+ ---
46
+
47
+ ## Onboarding Flow
48
+
49
+ ### Phase 1: Assess Current State
50
+
51
+ Read the discovery results (passed as context) to understand what's missing:
52
+
53
+ ```
54
+ Missing KB root → Need to create KB structure
55
+ Missing identity → Need email address
56
+ Missing stakeholders → Optional, can add later
57
+ ```
58
+
59
+ ### Phase 2: Minimal Questions (Max 3)
60
+
61
+ Ask ONLY what's required. Don't over-ask.
62
+
63
+ **Question 1: KB Location** (if no KB found)
64
+ ```
65
+ Where would you like your Thoth knowledge base?
66
+
67
+ Options:
68
+ 1. ~/.thoth-kb/ (recommended - works from anywhere)
69
+ 2. Current directory: /path/to/cwd
70
+ 3. Custom path
71
+
72
+ [Default: ~/.thoth-kb/]
73
+ ```
74
+
75
+ **Question 2: Work Email** (required)
76
+ ```
77
+ What's your work email address?
78
+ (Used for Gmail/Calendar API calls)
79
+
80
+ Example: you@company.com
81
+ ```
82
+
83
+ **Question 3: Timezone** (optional, can detect)
84
+ ```
85
+ What's your timezone?
86
+
87
+ [Detected: America/Los_Angeles]
88
+ Press Enter to accept, or type a different timezone.
89
+ ```
90
+
91
+ ### Phase 3: Create Files
92
+
93
+ #### 3.1: Global Config (`~/.config/opencode/thoth.json`)
94
+
95
+ ```json
96
+ {
97
+ "kb_root": "/Users/username/.thoth-kb",
98
+ "default_hemisphere": "work",
99
+ "created": "2026-01-09",
100
+ "version": "1.0"
101
+ }
102
+ ```
103
+
104
+ #### 3.2: Project Marker (`{kb_root}/.opencode/thoth.json`)
105
+
106
+ ```json
107
+ {
108
+ "type": "thoth-kb",
109
+ "version": "1.0",
110
+ "hemispheres": ["kernel", "work", "life"]
111
+ }
112
+ ```
113
+
114
+ #### 3.3: Directory Structure
115
+
116
+ ```
117
+ {kb_root}/
118
+ ├── .opencode/
119
+ │ └── thoth.json # Project marker
120
+ ├── kernel/
121
+ │ └── AGENTS.md # System context
122
+ ├── work/
123
+ │ ├── AGENTS.md # Work context with MCP config
124
+ │ └── Stakeholders/ # Empty, to be populated
125
+ └── life/
126
+ └── AGENTS.md # Life context
127
+ ```
128
+
129
+ #### 3.4: Root AGENTS.md
130
+
131
+ ```markdown
132
+ ---
133
+ hemisphere: null
134
+ depth: 0
135
+ ---
136
+
137
+ # Thoth Knowledge Base
138
+
139
+ Your personal knowledge management system organized into hemispheres.
140
+
141
+ ## Hemispheres
142
+
143
+ | Hemisphere | Purpose |
144
+ |------------|---------|
145
+ | kernel/ | System configuration and preferences |
146
+ | work/ | Professional life - email, calendar, projects, colleagues |
147
+ | life/ | Personal life - health, relationships, home, finance |
148
+
149
+ ## Getting Started
150
+
151
+ Run `morning-boot` to start your day with email triage and calendar review.
152
+ ```
153
+
154
+ #### 3.5: Work AGENTS.md (Critical - Contains Identity)
155
+
156
+ ```markdown
157
+ ---
158
+ hemisphere: work
159
+ depth: 1
160
+ ---
161
+
162
+ # Work Hemisphere
163
+
164
+ Professional life domain.
165
+
166
+ ## MCP Tool Configuration (CRITICAL)
167
+
168
+ | MCP Server | Required Parameter | Value |
169
+ |------------|-------------------|-------|
170
+ | google-workspace | user_google_email | {USER_EMAIL} |
171
+ | drive-synapsis | user_google_email | {USER_EMAIL} |
172
+
173
+ **Rules:**
174
+ - Always include `user_google_email` parameter in Google Workspace calls
175
+ - Never guess or hardcode email addresses
176
+
177
+ ## Skill Triggers
178
+
179
+ | Trigger Phrases | Skill |
180
+ |----------------|-------|
181
+ | "start my day", "morning boot" | morning-boot |
182
+ | "check email", "email triage" | mail-triage |
183
+ | "check slack" | slack-pulse |
184
+
185
+ ## Structure
186
+
187
+ | Directory | Purpose |
188
+ |-----------|---------|
189
+ | Stakeholders/ | Key people you work with |
190
+ | projects/ | Active work initiatives |
191
+ | Team/ | Direct reports (if applicable) |
192
+ ```
193
+
194
+ #### 3.6: Life AGENTS.md
195
+
196
+ ```markdown
197
+ ---
198
+ hemisphere: life
199
+ depth: 1
200
+ ---
201
+
202
+ # Life Hemisphere
203
+
204
+ Personal life domain.
205
+
206
+ ## MCP Tool Configuration
207
+
208
+ | MCP Server | Required Parameter | Value |
209
+ |------------|-------------------|-------|
210
+ | google-workspace | user_google_email | {PERSONAL_EMAIL_OR_SAME} |
211
+
212
+ ## Structure
213
+
214
+ | Directory | Purpose |
215
+ |-----------|---------|
216
+ | people/ | Family, friends, relationships |
217
+ | health/ | Fitness, medical, wellness |
218
+ | home/ | Household, maintenance |
219
+ | finance/ | Budget, investments |
220
+ ```
221
+
222
+ #### 3.7: Kernel AGENTS.md
223
+
224
+ ```markdown
225
+ ---
226
+ hemisphere: kernel
227
+ depth: 1
228
+ ---
229
+
230
+ # Kernel
231
+
232
+ System configuration and Thoth self-improvement.
233
+
234
+ ## Purpose
235
+
236
+ - Store preferences and settings
237
+ - Track decisions and learnings
238
+ - Configure Thoth behavior
239
+
240
+ ## Structure
241
+
242
+ | Directory | Purpose |
243
+ |-----------|---------|
244
+ | config/ | User preferences |
245
+ | memory/ | Decisions log |
246
+ | state/ | Runtime state |
247
+ ```
248
+
249
+ ### Phase 4: Verify Setup
250
+
251
+ After creating files:
252
+
253
+ 1. Read back the created `work/AGENTS.md`
254
+ 2. Verify email is correctly embedded
255
+ 3. Confirm directory structure exists
256
+ 4. Update global config with kb_root
257
+
258
+ ### Phase 5: Handoff
259
+
260
+ ```
261
+ ✅ Thoth KB created at ~/.thoth-kb/
262
+
263
+ What was set up:
264
+ - Global config: ~/.config/opencode/thoth.json
265
+ - KB structure: kernel/, work/, life/
266
+ - Work identity: work/AGENTS.md (email: you@company.com)
267
+
268
+ Next steps:
269
+ 1. Run `morning-boot` - it should work now!
270
+ 2. First run will prompt for Google OAuth
271
+ 3. Add stakeholders to work/Stakeholders/ over time
272
+
273
+ Optional:
274
+ - Add personal email to life/AGENTS.md
275
+ - Create project files in work/projects/
276
+ ```
277
+
278
+ ---
279
+
280
+ ## Templates
281
+
282
+ ### Minimal Work AGENTS.md
283
+
284
+ Use this template, replacing `{EMAIL}`:
285
+
286
+ ```markdown
287
+ ---
288
+ hemisphere: work
289
+ depth: 1
290
+ ---
291
+
292
+ # Work Hemisphere
293
+
294
+ ## MCP Tool Configuration (CRITICAL)
295
+
296
+ | MCP Server | Required Parameter | Value |
297
+ |------------|-------------------|-------|
298
+ | google-workspace | user_google_email | {EMAIL} |
299
+ | drive-synapsis | user_google_email | {EMAIL} |
300
+
301
+ ## Skill Triggers
302
+
303
+ | Trigger | Skill |
304
+ |---------|-------|
305
+ | "morning boot" | morning-boot |
306
+ | "check email" | mail-triage |
307
+ ```
308
+
309
+ ---
310
+
311
+ ## Common Mistakes
312
+
313
+ | Mistake | Prevention |
314
+ |---------|------------|
315
+ | Asking too many questions | Max 3 questions. Email is the only truly required one. |
316
+ | Creating complex structure | Minimal viable: just work/AGENTS.md with email is enough |
317
+ | Not creating global config | Always create `~/.config/opencode/thoth.json` for cross-directory access |
318
+ | Forgetting MCP table format | Must be exact format with headers: MCP Server, Required Parameter, Value |
319
+ | Not verifying creation | Always read back critical files to confirm |
320
+
321
+ ---
322
+
323
+ ## Red Flags - STOP
324
+
325
+ - Asking more than 3 questions
326
+ - Creating files without confirming location with user
327
+ - Skipping the global config file
328
+ - Not embedding email in MCP table format
329
+ - Leaving placeholders like `{EMAIL}` in final files
330
+ - Not providing clear next steps
331
+
332
+ ---
333
+
334
+ ## Verification Checklist
335
+
336
+ - [ ] Asked ≤3 questions
337
+ - [ ] Created `~/.config/opencode/thoth.json` with kb_root
338
+ - [ ] Created `.opencode/thoth.json` in KB root
339
+ - [ ] Created work/AGENTS.md with MCP config table
340
+ - [ ] Email is correctly embedded (not placeholder)
341
+ - [ ] Provided clear next steps to user
342
+ - [ ] User can now run morning-boot successfully
343
+
344
+ ---
345
+
346
+ ## Integration with Discovery
347
+
348
+ After onboarding completes, discovery should be re-run:
349
+
350
+ ```prose
351
+ # In calling skill (e.g., morning-boot)
352
+
353
+ let context = do context-discovery
354
+
355
+ if **context.ready is false**:
356
+ do context-onboarding
357
+ context: context # Pass discovery results
358
+
359
+ # Retry discovery
360
+ let context = do context-discovery
361
+
362
+ if **still not ready**:
363
+ throw "Setup incomplete. Please check the error messages above."
364
+
365
+ # Proceed with context
366
+ ```
367
+
368
+ ---
369
+
370
+ *Context Onboarding v1.0 | Part of Thoth Skill System*
@@ -1,23 +1,38 @@
1
1
  ---
2
2
  name: email-draft
3
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
4
+ triggers:
5
+ created: 2026-01-09
6
+ updated: 2026-01-10
13
7
  ---
14
8
 
9
+ <!--
10
+ ARCHITECTURE REFERENCE: docs/concepts/skill-architecture.md
11
+ This skill can be invoked standalone OR as a subagent context template.
12
+ -->
13
+
15
14
  # Email Draft
16
15
 
17
16
  **Core principle:** Gmail does not support Markdown. Always use HTML formatting with `body_format="html"`.
18
17
 
19
18
  ---
20
19
 
20
+ ## Context Requirements (EXECUTE FIRST)
21
+
22
+ This skill requires the user's email address for API calls.
23
+
24
+ **Step 0 — Get Identity:**
25
+
26
+ 1. **Check if passed in context**: If you received `context.identity.email`, use it directly.
27
+
28
+ 2. **If not passed, invoke context-discovery skill**: Call `skill({ name: "context-discovery" })` and use the returned `email` value.
29
+
30
+ 3. **Store as `EMAIL`** for use in all API calls below.
31
+
32
+ **If discovery fails**: Stop and report the error from context-discovery.
33
+
34
+ ---
35
+
21
36
  ## When to Use
22
37
 
23
38
  - Drafting a reply to an email
@@ -72,31 +87,18 @@ Format with HTML:
72
87
  - `<p>` for paragraph separation
73
88
  - `<i>` sparingly for emphasis
74
89
 
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
- ```
90
+ ### 3. Present Final Payload for Approval
91
+ **CRITICAL:** Show Zeus the *exact* final HTML string that will be saved.
92
+ - If HTML conversion changes the wording, you MUST get re-approval.
93
+ - Use a code block to show the verbatim HTML payload.
91
94
 
92
95
  ### 4. Save Draft
93
-
94
96
  ```python
95
97
  google-workspace_draft_gmail_message(
96
- user_google_email="david.helmus@hellofresh.com",
98
+ user_google_email={EMAIL},
97
99
  to="recipient@example.com",
98
100
  subject="Re: Subject",
99
- body="<p>HTML content</p>",
101
+ body="<p>Approved HTML payload</p>",
100
102
  body_format="html", # CRITICAL
101
103
  thread_id="...", # For replies
102
104
  in_reply_to="<message-id>" # For replies
@@ -110,10 +112,11 @@ google-workspace_draft_gmail_message(
110
112
  | Mistake | Prevention |
111
113
  |---------|------------|
112
114
  | Using Markdown `**bold**` | Use HTML `<b>bold</b>` — Gmail renders Markdown literally |
113
- | Forgetting `body_format="html"` | Always include — defaults to plain text |
115
+ | Forgetting `body_format="html"` | Always include — plain text drafts have a **known bug** where they open empty in Gmail |
114
116
  | Missing `thread_id` on replies | Retrieve from original message first |
115
117
  | Sending without approval | Always draft first, ask Zeus to confirm |
116
- | Using personal email for work | Work context = `david.helmus@hellofresh.com` |
118
+ | Using wrong email | Use `{EMAIL}` from Context Discovery |
119
+ | Calling MCP tool without invoking skill | Always use this skill for email drafts — ensures correct formatting |
117
120
 
118
121
  ---
119
122
 
@@ -1,97 +1,129 @@
1
1
  ---
2
2
  name: evening-close
3
- version: 1.0.0
4
3
  description: Summarize the day, extract incomplete tasks into tomorrow's overflow, and persist daily learnings to the Knowledge Base.
5
4
  triggers:
6
- output:
7
- type: markdown
5
+ template: evening-close-template.md
8
6
  created: 2026-01-09
9
- updated: 2026-01-09
7
+ updated: 2026-01-10
10
8
  ---
11
9
 
10
+ <!--
11
+ ARCHITECTURE REFERENCE: docs/concepts/skill-architecture.md
12
+ This skill can be invoked standalone OR as a subagent context template.
13
+ -->
14
+
12
15
  # Evening Close Skill
13
16
 
14
- You are the **Integrity & Persistence Lead**. Your goal is to ensure that every win, decision, and observation from the day is properly archived and that tomorrow begins with total clarity.
17
+ **Core principle:** Every win, decision, and observation must be archived. Tomorrow begins with total clarity.
18
+
19
+ ---
20
+
21
+ ## Context Requirements (EXECUTE FIRST)
22
+
23
+ **Step 0 — Get Identity:**
24
+
25
+ 1. **Check if passed in context**: If `context.identity.kb_root` exists, use it.
26
+ 2. **If not passed**: Call `skill({ name: "context-discovery" })`.
27
+ 3. **Store `KB_ROOT`** for all file paths below.
15
28
 
16
- ## Protocol Execution
29
+ **If discovery fails**: Stop and report error.
30
+
31
+ ---
32
+
33
+ ## Quick Reference
34
+
35
+ | Task | Path |
36
+ |------|------|
37
+ | Today's log | `{KB_ROOT}/work/operations/daily-log/YYYY-MM-DD/daily-log.md` |
38
+ | Overflow file | `{KB_ROOT}/work/inbox/overflow-YYYY-MM-DD.md` |
39
+ | Chronicle | `{KB_ROOT}/work/chronicle.md` |
40
+ | People files | `{KB_ROOT}/work/people/{person}.md` |
41
+ | Project files | `{KB_ROOT}/work/projects/{project}.md` |
42
+
43
+ ---
44
+
45
+ ## Protocol
17
46
 
18
47
  ### Step 1: Audit
19
48
 
20
- 1. **Read Daily Log**: Load today's `work/logs/YYYY-MM-DD-daily-log.md`.
21
- 2. **Verify Progress**:
22
- - Compare **Top 3 Priorities** against the **Action Log**.
23
- - Identify any items marked incomplete or not mentioned in the Action Log.
49
+ 1. **Read Daily Log**: `{KB_ROOT}/work/operations/daily-log/YYYY-MM-DD/daily-log.md`
50
+ 2. **Verify Progress**: Compare Top 3 Priorities against Action Log
51
+ 3. **Identify incomplete items** (not mentioned or marked incomplete)
24
52
 
25
53
  ### Step 2: Summarize
26
54
 
27
- 1. **Generate Executive Recap**:
28
- - **Completed**: Count of actions taken.
29
- - **Key Wins**: 2-3 most impactful accomplishments.
30
- - **Blockers Surfaced**: Any items preventing progress.
31
- - **Decisions Logged**: Summary of strategic choices.
55
+ Fill in `## Evening Summary` section of daily-log.md:
32
56
 
33
- 2. **Update Log**: Fill in the `## Evening Summary` section of the `daily-log.md`:
34
- - Completed items
35
- - Blocked items
36
- - Deferred items
37
- - Key Wins
38
- - Key Decisions
39
- - Observations
57
+ | Field | Content |
58
+ |-------|---------|
59
+ | Completed | Count + list |
60
+ | Blocked | Items with blockers |
61
+ | Deferred | Moved to tomorrow |
62
+ | Key Wins | 2-3 most impactful |
63
+ | Key Decisions | Strategic choices made |
64
+ | Observations | Learnings, patterns |
40
65
 
41
66
  ### Step 3: Extract Overflow
42
67
 
43
- 1. **Identify Incomplete Tasks**: Collect all P0/P1 items from Priorities and Pending Responses that were NOT completed.
68
+ Create overflow file using template: `evening-close-template.md`
44
69
 
45
- 2. **Create Overflow File**: Write to `work/inbox/overflow-YYYY-MM-DD.md`:
46
- ```yaml
47
- ---
48
- type: overflow
49
- from_date: YYYY-MM-DD
50
- for_date: YYYY-MM-DD (tomorrow)
51
- ---
52
-
53
- # Overflow Tasks
54
-
55
- ## From [Date]
56
-
57
- - [ ] [P0] Task description - Reason: [why not completed]
58
- - [ ] [P1] Task description - Reason: [why not completed]
59
- ```
70
+ **Output path**: `{KB_ROOT}/work/inbox/overflow-YYYY-MM-DD.md`
60
71
 
61
- ### Step 4: Knowledge Persistence (The Save)
72
+ Collect all P0/P1 items NOT completed from:
73
+ - Top 3 Priorities
74
+ - Pending Responses
75
+ - Action items from meetings
62
76
 
63
- Using **Smart Merge** (append-only, never overwrite), update the permanent Knowledge base:
77
+ ### Step 4: Knowledge Persistence
64
78
 
65
- 1. **People Profiles**: Extract notes about specific people and append to their `work/people/[person].md` in the `## Interaction Log` section with date stamp.
79
+ **Smart Merge** (append-only, never overwrite):
66
80
 
67
- 2. **Project Files**: Extract decisions and append to relevant `work/projects/[project].md` in the `## Decisions` section with date stamp.
81
+ | Source | Destination | Section |
82
+ |--------|-------------|---------|
83
+ | People notes | `work/people/{person}.md` | `## Interaction Log` |
84
+ | Project decisions | `work/projects/{project}.md` | `## Decisions` |
85
+ | Day summary | `work/chronicle.md` | `## YYYY-MM-DD` |
68
86
 
69
- 3. **Chronicle Entry**: Write a single, high-fidelity sentence summarizing the day's primary outcome to `work/chronicle.md`:
70
- ```
71
- ## YYYY-MM-DD
72
- [One sentence summary of day's state and primary outcome]
73
- ```
87
+ Format: `> YYYY-MM-DD: [content]`
74
88
 
75
89
  ### Step 5: Weekly Maintenance (Friday Only)
76
90
 
77
- 1. **Check Date**: Calculate `DayOfWeek` from `<omo-env>`.
78
- 2. **If Friday**:
79
- - Run system hygiene checks
80
- - Review week's chronicle entries
81
- - Identify patterns or recurring blockers
82
- - Suggest focus areas for next week
91
+ If Friday:
92
+ - Run system hygiene checks
93
+ - Review week's chronicle entries
94
+ - Identify patterns or recurring blockers
95
+ - Suggest focus areas for next week
83
96
 
84
97
  ### Step 6: Finalize
85
98
 
86
- 1. Verify all file writes were successful.
87
- 2. Present the summary and overflow list to user in chat for final sign-off.
88
- 3. Suggest any preparation needed for tomorrow.
99
+ 1. Verify all file writes succeeded
100
+ 2. Present summary + overflow list to user
101
+ 3. Suggest preparation for tomorrow
102
+
103
+ ---
104
+
105
+ ## Common Mistakes
106
+
107
+ | Mistake | Prevention |
108
+ |---------|------------|
109
+ | Overwriting existing content | Use append-only Smart Merge |
110
+ | Hallucinating outcomes | Mark unclear items as "UNCLEAR", ask user |
111
+ | Missing incomplete tasks | Cross-check ALL priority lists |
112
+
113
+ ---
114
+
115
+ ## Red Flags - STOP
116
+
117
+ - About to overwrite existing section content
118
+ - Item status is unclear (ask user first)
119
+ - Daily log doesn't exist (run morning-boot first)
89
120
 
90
121
  ---
91
122
 
92
- ## Technical Constraints
123
+ ## Verification Checklist
93
124
 
94
- - **Smart Merge**: NEVER overwrite existing context. Only append to specific sections with a date stamp.
95
- - **Accuracy**: Do not hallucinate outcomes. If an item status is unclear, mark it as "UNCLEAR" and ask user.
96
- - **Trust Level**: This skill requires Trust Level 2+ for file writes to knowledge base.
97
- - **Privacy**: Summarize sensitive information, don't copy verbatim.
125
+ - [ ] Daily log updated with Evening Summary
126
+ - [ ] Overflow file created with all incomplete P0/P1
127
+ - [ ] Chronicle entry added
128
+ - [ ] People/project files updated if notes exist
129
+ - [ ] User presented with summary
@@ -0,0 +1,42 @@
1
+ ---
2
+ created: 2026-01-10
3
+ updated: 2026-01-10
4
+ ---
5
+
6
+ # Overflow — {{DATE}}
7
+
8
+ > Incomplete items from {{DATE}} requiring attention tomorrow.
9
+
10
+ ## P0 — Must Complete Tomorrow
11
+
12
+ | Item | Source | Context |
13
+ |------|--------|---------|
14
+ | {{P0_ITEMS}} |
15
+
16
+ ## P1 — Should Complete Tomorrow
17
+
18
+ | Item | Source | Context |
19
+ |------|--------|---------|
20
+ | {{P1_ITEMS}} |
21
+
22
+ ## Pending Responses
23
+
24
+ | Person | Topic | Days Waiting | Original Date |
25
+ |--------|-------|--------------|---------------|
26
+ | {{PENDING_RESPONSES}} |
27
+
28
+ ## Blocked Items
29
+
30
+ | Item | Blocker | Unblock Action |
31
+ |------|---------|----------------|
32
+ | {{BLOCKED_ITEMS}} |
33
+
34
+ ---
35
+
36
+ ## Notes for Tomorrow
37
+
38
+ {{NOTES}}
39
+
40
+ ---
41
+
42
+ *Generated by evening-close skill on {{GENERATED_AT}}*