thoth-plugin 1.2.4 → 1.2.6

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 +12 -9
  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 +12 -9
  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,184 @@
1
+ ---
2
+ name: slack-write
3
+ description: Use when writing Slack messages, team announcements, or channel posts. Ensures correct mrkdwn formatting instead of Markdown.
4
+ triggers:
5
+ created: 2026-01-07
6
+ updated: 2026-01-10
7
+ ---
8
+
9
+ <!--
10
+ ARCHITECTURE REFERENCE: docs/concepts/skill-architecture.md
11
+ -->
12
+
13
+ # Slack Write
14
+
15
+ **Core principle:** Slack uses `mrkdwn`, NOT Markdown. Different syntax for bold, links, and structure.
16
+
17
+ ---
18
+
19
+ ## When to Use
20
+
21
+ - Posting messages to Slack channels
22
+ - Team announcements or updates
23
+ - Any `slack_conversations_add_message` call
24
+
25
+ **Do NOT use when:**
26
+ - Reading/scanning Slack (use slack-pulse)
27
+ - Writing emails (use email-draft)
28
+ - Writing KB documentation (Markdown is fine)
29
+
30
+ ---
31
+
32
+ ## Quick Reference
33
+
34
+ | Format | mrkdwn Syntax | NOT This |
35
+ |--------|---------------|----------|
36
+ | **Bold** | `*text*` | `**text**` |
37
+ | *Italic* | `_text_` | `*text*` |
38
+ | ~~Strike~~ | `~text~` | `~~text~~` |
39
+ | `Code` | `` `code` `` | same |
40
+ | Link | `<https://url|text>` | `[text](url)` |
41
+ | User mention | `<@U123ABC>` | `@username` |
42
+ | Channel | `<#C123ABC>` | `#channel` |
43
+ | Emoji | `:emoji_name:` | same |
44
+ | Quote | `>text` | same |
45
+ | Line break | `\n` in string | same |
46
+
47
+ ---
48
+
49
+ ## Structure for Readability
50
+
51
+ Slack renders everything inline. Create visual breaks with:
52
+
53
+ ### Section Headers
54
+ Use emoji + bold:
55
+ ```
56
+ :rotating_light: *Important Update*
57
+ ```
58
+
59
+ ### Dividers
60
+ Use unicode box drawing (not `---`):
61
+ ```
62
+ ────────────────────────────
63
+ ```
64
+ Or emoji line:
65
+ ```
66
+ :small_blue_diamond::small_blue_diamond::small_blue_diamond:
67
+ ```
68
+
69
+ ### Bullets
70
+ No native list syntax. Use:
71
+ - `•` (unicode bullet)
72
+ - `◦` (hollow bullet)
73
+ - Emoji: `:white_check_mark:`, `:arrow_right:`
74
+
75
+ ### Numbered Lists
76
+ Manual numbering with line breaks:
77
+ ```
78
+ 1. First item\n2. Second item\n3. Third item
79
+ ```
80
+
81
+ ---
82
+
83
+ ## Message Template
84
+
85
+ ```
86
+ :emoji: *Header Title*
87
+
88
+ Brief intro paragraph.
89
+
90
+ ────────────────────────────
91
+
92
+ :dart: *Section One*
93
+ • Point one
94
+ • Point two
95
+
96
+ :warning: *Section Two*
97
+ • Important note
98
+
99
+ ────────────────────────────
100
+
101
+ :link: Links: <https://example.com|Click here>
102
+
103
+ Questions? Reply in thread.
104
+ ```
105
+
106
+ ---
107
+
108
+ ## Process
109
+
110
+ ### 1. Draft Content
111
+ Write the message content first, focusing on clarity.
112
+
113
+ ### 2. Convert to mrkdwn
114
+ - Replace `**bold**` → `*bold*`
115
+ - Replace `[text](url)` → `<url|text>`
116
+ - Add emoji section headers
117
+ - Add unicode dividers for visual breaks
118
+
119
+ ### 3. Present Final Payload for Approval
120
+ **CRITICAL:** Show Zeus the *exact* final string that will be sent.
121
+ - If formatting changes the wording, you MUST get re-approval.
122
+ - Use a code block to show the verbatim payload.
123
+
124
+ ### 4. Post only after "Yes" to the final payload
125
+ ```
126
+ slack_conversations_add_message(
127
+ channel_id="C123ABC",
128
+ content_type="text/markdown",
129
+ payload="*Approved Final Payload*"
130
+ )
131
+ ```
132
+
133
+ ---
134
+
135
+ ## Common Mistakes
136
+
137
+ | Mistake | Prevention |
138
+ |---------|------------|
139
+ | `**bold**` | Use `*bold*` — single asterisks |
140
+ | `[text](url)` | Use `<url|text>` — angle brackets, pipe separator |
141
+ | `---` for divider | Use `────────────────────────────` (unicode) |
142
+ | Markdown tables | Not supported — use aligned text or bullet lists |
143
+ | `- item` for bullets | Use `•` or `◦` unicode bullets |
144
+ | Wall of text | Add emoji headers and dividers for scannability |
145
+ | Assuming Markdown works | mrkdwn is NOT Markdown — always convert |
146
+
147
+ ---
148
+
149
+ ## Red Flags - STOP
150
+
151
+ - About to use `**` for bold → STOP, use `*`
152
+ - About to use `[text](url)` → STOP, use `<url|text>`
153
+ - About to use `---` for divider → STOP, use unicode `────────`
154
+ - Message is a wall of text → STOP, add section breaks
155
+ - Not sure about syntax → Check Quick Reference table
156
+
157
+ ---
158
+
159
+ ## Verification Checklist
160
+
161
+ - [ ] No `**` double asterisks (use single `*`)
162
+ - [ ] Links use `<url|text>` format
163
+ - [ ] Dividers use unicode, not `---`
164
+ - [ ] Has visual structure (headers, breaks)
165
+ - [ ] Emoji used for scannability
166
+ - [ ] Presented to Zeus before posting
167
+
168
+ ---
169
+
170
+ ## Useful Emoji
171
+
172
+ | Purpose | Emoji |
173
+ |---------|-------|
174
+ | Alert/Important | `:rotating_light:` `:warning:` `:exclamation:` |
175
+ | Info/Update | `:information_source:` `:mega:` `:loudspeaker:` |
176
+ | Action/Task | `:dart:` `:arrow_right:` `:point_right:` |
177
+ | Success | `:white_check_mark:` `:tada:` `:sparkles:` |
178
+ | Link/Reference | `:link:` `:bookmark:` `:page_facing_up:` |
179
+ | Question | `:question:` `:thinking_face:` |
180
+ | Divider | `:small_blue_diamond:` `:heavy_minus_sign:` |
181
+
182
+ ---
183
+
184
+ *Slack Write Skill v1.0 | mrkdwn formatting for Slack messages*
@@ -1,17 +1,20 @@
1
1
  ---
2
2
  name: thought-router
3
- version: 1.0.0
4
- description: The thought(s) to capture
5
- triggers:
6
- inputs:
7
- - name: content
8
- type: markdown
9
- required: true
10
- output:
3
+ description: Route unstructured thoughts, brain dumps, and quick captures to their correct home in the knowledge base.
4
+ triggers:
5
+ - "dump:"
6
+ - "brain dump"
7
+ - "quick thought"
8
+ - "capture this"
9
+ - "route this"
11
10
  created: 2026-01-09
12
- updated: 2026-01-09
11
+ updated: 2026-01-10
13
12
  ---
14
13
 
14
+ <!--
15
+ ARCHITECTURE REFERENCE: docs/concepts/skill-architecture.md
16
+ -->
17
+
15
18
  # Thought Router Skill
16
19
 
17
20
  You are the **Thought Router**. Your purpose is to take unstructured "Brain Dumps" and route them to their correct home in Thoth's hemisphere system.
package/dist/cli.js CHANGED
@@ -2,10 +2,19 @@
2
2
  // @bun
3
3
 
4
4
  // src/cli.ts
5
- import { existsSync, mkdirSync, cpSync, writeFileSync } from "fs";
5
+ import { existsSync, mkdirSync, cpSync, writeFileSync, readFileSync } from "fs";
6
6
  import { join, resolve } from "path";
7
7
  import { homedir } from "os";
8
8
  var __dirname = "/Users/davidhelmus/Repos/thoth/thoth-core/src";
9
+ var GLOBAL_CONFIG_DIR = join(homedir(), ".config", "opencode");
10
+ var GLOBAL_CONFIG_PATH = join(GLOBAL_CONFIG_DIR, "thoth.json");
11
+ function getSystemTimezone() {
12
+ try {
13
+ return Intl.DateTimeFormat().resolvedOptions().timeZone;
14
+ } catch {
15
+ return "UTC";
16
+ }
17
+ }
9
18
  var KNOWLEDGE_BASE_TEMPLATE = `
10
19
  # Thoth Knowledge Base
11
20
 
@@ -75,23 +84,148 @@ function init() {
75
84
  console.warn("Warning: Could not find defaults directory. Skills will not be pre-populated.");
76
85
  }
77
86
  writeFileSync(join(targetDir, "README.md"), KNOWLEDGE_BASE_TEMPLATE.trim());
87
+ writeFileSync(join(targetDir, ".thoth-root"), `# Thoth Knowledge Base Root Marker
88
+ # This file helps context-discovery locate the KB
89
+ `);
90
+ const projectConfig = {
91
+ type: "thoth-kb",
92
+ version: "1.0",
93
+ hemispheres: ["kernel", "work", "life"],
94
+ created: new Date().toISOString().split("T")[0]
95
+ };
96
+ mkdirSync(join(targetDir, ".opencode"), { recursive: true });
97
+ writeFileSync(join(targetDir, ".opencode", "thoth.json"), JSON.stringify(projectConfig, null, 2) + `
98
+ `);
99
+ mkdirSync(GLOBAL_CONFIG_DIR, { recursive: true });
100
+ const globalConfig = {
101
+ kb_root: targetDir,
102
+ default_hemisphere: "work",
103
+ timezone: getSystemTimezone(),
104
+ created: new Date().toISOString().split("T")[0],
105
+ version: "1.0"
106
+ };
107
+ writeFileSync(GLOBAL_CONFIG_PATH, JSON.stringify(globalConfig, null, 2) + `
108
+ `);
109
+ console.log(`\u2713 Global config created: ${GLOBAL_CONFIG_PATH}`);
78
110
  console.log("\u2713 Knowledge base created!");
79
111
  console.log("");
112
+ console.log("Created:");
113
+ console.log(` - KB root: ${targetDir}`);
114
+ console.log(` - Global config: ${GLOBAL_CONFIG_PATH}`);
115
+ console.log(` - Project marker: ${join(targetDir, ".opencode", "thoth.json")}`);
116
+ console.log("");
80
117
  console.log("Next steps:");
81
118
  console.log(`1. cd ${targetDir}`);
82
119
  console.log("2. Start OpenCode");
83
- console.log("3. Ask Thoth: 'Help me onboard'");
120
+ console.log("3. Run '/morning-boot' to start your day");
121
+ console.log("");
122
+ console.log("Note: First run will prompt for Google OAuth to access email/calendar.");
84
123
  } catch (err) {
85
124
  console.error("Failed to initialize knowledge base:", err);
86
125
  process.exit(1);
87
126
  }
88
127
  }
128
+ function link() {
129
+ const targetDir = resolve(process.cwd());
130
+ const hasKernel = existsSync(join(targetDir, "kernel"));
131
+ const hasWork = existsSync(join(targetDir, "work"));
132
+ const hasLife = existsSync(join(targetDir, "life"));
133
+ if (!hasKernel && !hasWork && !hasLife) {
134
+ console.log("Warning: Current directory doesn't look like a Thoth KB.");
135
+ console.log("Expected directories: kernel/, work/, or life/");
136
+ console.log("");
137
+ console.log("Continue anyway? This will create config files pointing to this directory.");
138
+ console.log("(Run 'thoth init' to create a new KB instead)");
139
+ console.log("");
140
+ }
141
+ try {
142
+ const projectConfigPath = join(targetDir, ".opencode", "thoth.json");
143
+ if (!existsSync(projectConfigPath)) {
144
+ const projectConfig = {
145
+ type: "thoth-kb",
146
+ version: "1.0",
147
+ hemispheres: ["kernel", "work", "life"].filter((h) => existsSync(join(targetDir, h))),
148
+ created: new Date().toISOString().split("T")[0]
149
+ };
150
+ mkdirSync(join(targetDir, ".opencode"), { recursive: true });
151
+ writeFileSync(projectConfigPath, JSON.stringify(projectConfig, null, 2) + `
152
+ `);
153
+ console.log(`\u2713 Project marker created: ${projectConfigPath}`);
154
+ } else {
155
+ console.log(`\u2713 Project marker exists: ${projectConfigPath}`);
156
+ }
157
+ const markerPath = join(targetDir, ".thoth-root");
158
+ if (!existsSync(markerPath)) {
159
+ writeFileSync(markerPath, `# Thoth Knowledge Base Root Marker
160
+ `);
161
+ console.log(`\u2713 Root marker created: ${markerPath}`);
162
+ }
163
+ mkdirSync(GLOBAL_CONFIG_DIR, { recursive: true });
164
+ let globalConfig = {};
165
+ if (existsSync(GLOBAL_CONFIG_PATH)) {
166
+ try {
167
+ globalConfig = JSON.parse(readFileSync(GLOBAL_CONFIG_PATH, "utf-8"));
168
+ } catch {}
169
+ }
170
+ globalConfig.kb_root = targetDir;
171
+ globalConfig.default_hemisphere = globalConfig.default_hemisphere || "work";
172
+ globalConfig.timezone = globalConfig.timezone || getSystemTimezone();
173
+ globalConfig.updated = new Date().toISOString().split("T")[0];
174
+ globalConfig.version = "1.0";
175
+ writeFileSync(GLOBAL_CONFIG_PATH, JSON.stringify(globalConfig, null, 2) + `
176
+ `);
177
+ console.log(`\u2713 Global config updated: ${GLOBAL_CONFIG_PATH}`);
178
+ console.log("");
179
+ console.log(`Linked ${targetDir} as your Thoth KB.`);
180
+ console.log("Context-discovery will now find this KB from any directory.");
181
+ } catch (err) {
182
+ console.error("Failed to link knowledge base:", err);
183
+ process.exit(1);
184
+ }
185
+ }
186
+ function status() {
187
+ console.log("Thoth Configuration Status");
188
+ console.log("===========================");
189
+ console.log("");
190
+ if (existsSync(GLOBAL_CONFIG_PATH)) {
191
+ try {
192
+ const config = JSON.parse(readFileSync(GLOBAL_CONFIG_PATH, "utf-8"));
193
+ console.log(`Global config: ${GLOBAL_CONFIG_PATH}`);
194
+ console.log(` kb_root: ${config.kb_root}`);
195
+ console.log(` timezone: ${config.timezone}`);
196
+ console.log(` default_hemisphere: ${config.default_hemisphere}`);
197
+ if (config.kb_root && existsSync(config.kb_root)) {
198
+ console.log(` status: \u2713 KB exists`);
199
+ const projectMarker = join(config.kb_root, ".opencode", "thoth.json");
200
+ if (existsSync(projectMarker)) {
201
+ console.log(` project marker: \u2713 exists`);
202
+ } else {
203
+ console.log(` project marker: \u2717 missing (run 'thoth link' from KB directory)`);
204
+ }
205
+ } else {
206
+ console.log(` status: \u2717 KB not found at path`);
207
+ }
208
+ } catch {
209
+ console.log(`Global config: ${GLOBAL_CONFIG_PATH} (invalid JSON)`);
210
+ }
211
+ } else {
212
+ console.log("Global config: not found");
213
+ console.log(" Run 'thoth init' to create a new KB, or");
214
+ console.log(" Run 'thoth link' from an existing KB directory");
215
+ }
216
+ }
89
217
  var command = process.argv[2];
90
218
  if (command === "init") {
91
219
  init();
220
+ } else if (command === "link") {
221
+ link();
222
+ } else if (command === "status") {
223
+ status();
92
224
  } else {
93
225
  console.log("Thoth - Life Orchestrator for OpenCode");
94
226
  console.log("");
95
227
  console.log("Commands:");
96
- console.log(" thoth init [path] Create knowledge base (default: ~/thoth)");
228
+ console.log(" thoth init [path] Create new knowledge base (default: ~/thoth)");
229
+ console.log(" thoth link Link current directory as KB root");
230
+ console.log(" thoth status Show current configuration");
97
231
  }
@@ -9,7 +9,6 @@ declare const HooksConfigSchema: z.ZodObject<{
9
9
  "permission-enforcer": z.ZodOptional<z.ZodBoolean>;
10
10
  "trust-level-tracker": z.ZodOptional<z.ZodBoolean>;
11
11
  "context-aperture": z.ZodOptional<z.ZodBoolean>;
12
- "temporal-awareness": z.ZodOptional<z.ZodBoolean>;
13
12
  "knowledge-persistence": z.ZodOptional<z.ZodBoolean>;
14
13
  "directory-agents-injector": z.ZodOptional<z.ZodBoolean>;
15
14
  "frontmatter-enforcer": z.ZodOptional<z.ZodBoolean>;
@@ -81,7 +80,6 @@ export declare const ThothPluginConfigSchema: z.ZodObject<{
81
80
  "permission-enforcer": z.ZodOptional<z.ZodBoolean>;
82
81
  "trust-level-tracker": z.ZodOptional<z.ZodBoolean>;
83
82
  "context-aperture": z.ZodOptional<z.ZodBoolean>;
84
- "temporal-awareness": z.ZodOptional<z.ZodBoolean>;
85
83
  "knowledge-persistence": z.ZodOptional<z.ZodBoolean>;
86
84
  "directory-agents-injector": z.ZodOptional<z.ZodBoolean>;
87
85
  "frontmatter-enforcer": z.ZodOptional<z.ZodBoolean>;
@@ -0,0 +1,168 @@
1
+ ---
2
+ name: cal-grid
3
+ description: Map the daily calendar grid identifying meetings, deep work slots, and preparation needs.
4
+ triggers:
5
+ template: cal-grid-template.md
6
+ created: 2026-01-09
7
+ updated: 2026-01-09
8
+ ---
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
+
15
+ # Calendar Grid Skill
16
+
17
+ You are the Daily Grid Architect. Your mission is to scan today's calendar and produce a high-resolution grid of the day.
18
+
19
+ ---
20
+
21
+ ## Context Requirements (EXECUTE FIRST)
22
+
23
+ This skill requires the user's email address for API calls.
24
+
25
+ **Step 0 — Get Identity:**
26
+
27
+ 1. **Check if passed in context**: If you received `context.identity.email`, use it directly.
28
+
29
+ 2. **If not passed, invoke context-discovery skill**: Call `skill({ name: "context-discovery" })` and use the returned `email` value.
30
+
31
+ 3. **Store as `EMAIL`** for use in all API calls below.
32
+
33
+ **If discovery fails**: Stop and report the error from context-discovery.
34
+
35
+ ---
36
+
37
+ ## When to Use
38
+
39
+ - Morning boot calendar scan
40
+ - "What's on my calendar today?"
41
+ - "Any meetings I need to prepare for?"
42
+ - Before planning focus time
43
+
44
+ ---
45
+
46
+ ## Tools Required
47
+
48
+ | Action | Tool | Parameters |
49
+ | ------------ | --------------------------- | ---------------------------------------------------------------------- |
50
+ | Get events | google-workspace_get_events | `user_google_email: {EMAIL}`, `time_min`, `time_max`, `detailed: true` |
51
+ | Write output | write | `work/operations/daily-log/YYYY-MM-DD/cal-grid.md` |
52
+
53
+ ---
54
+
55
+ ## Execution Protocol
56
+
57
+ ### Phase 1: Scan Calendar
58
+
59
+ ```
60
+ google-workspace_get_events(
61
+ user_google_email={EMAIL},
62
+ time_min="YYYY-MM-DDT00:00:00Z", # Today start
63
+ time_max="YYYY-MM-DDT23:59:59Z", # Today end
64
+ detailed=true
65
+ )
66
+ ```
67
+
68
+ Also scan tomorrow for preparation awareness:
69
+ ```
70
+ google-workspace_get_events(
71
+ user_google_email={EMAIL},
72
+ time_min="YYYY-MM-DD+1T00:00:00Z", # Tomorrow start
73
+ time_max="YYYY-MM-DD+1T23:59:59Z", # Tomorrow end
74
+ detailed=true
75
+ )
76
+ ```
77
+
78
+ ### Phase 2: Analyze Each Meeting
79
+
80
+ For each event, determine:
81
+
82
+ | Field | Analysis |
83
+ |-------|----------|
84
+ | **Time** | Start-end in local time |
85
+ | **Event** | Title (clean up noise) |
86
+ | **Attendees** | Who's attending, any VIPs? |
87
+ | **Prep Needed** | What preparation is required? |
88
+ | **Classification** | 1:1, Team, External, Focus, Admin |
89
+
90
+ **Classification Guide:**
91
+
92
+ | Type | Signal |
93
+ |------|--------|
94
+ | 1:1 | Two attendees, recurring |
95
+ | Team | 3+ internal attendees |
96
+ | External | External domain attendees |
97
+ | Focus | Blocked time, no attendees |
98
+ | Admin | Recurring admin tasks |
99
+
100
+ ### Phase 3: Identify Focus Blocks
101
+
102
+ Find gaps between meetings that could be used for deep work:
103
+
104
+ | Block Quality | Duration |
105
+ |---------------|----------|
106
+ | Deep Work | 90+ minutes |
107
+ | Shallow Work | 30-90 minutes |
108
+ | Buffer | <30 minutes |
109
+
110
+ ### Phase 4: Flag Preparation Needs
111
+
112
+ For each meeting, assess:
113
+ - Do I need to review anything beforehand?
114
+ - Are there action items I committed to?
115
+ - Is this a high-stakes meeting (skip-level, external)?
116
+
117
+ ---
118
+
119
+ ## Output Format
120
+
121
+ **Template:** Read `cal-grid-template.md` from this skill folder.
122
+
123
+ **Output path:** `work/operations/daily-log/YYYY-MM-DD/cal-grid.md`
124
+
125
+ Fill the template placeholders with scan results:
126
+
127
+ | Placeholder | Value |
128
+ |-------------|-------|
129
+ | `{{DATE}}` | Today's date (YYYY-MM-DD) |
130
+ | `{{TIME}}` | Scan completion time (HH:MM) |
131
+ | `{{CALENDAR_ID}}` | Calendar scanned (usually "primary") |
132
+ | `{{MEETING_COUNT}}` | Total meetings today |
133
+ | `{{MEETING_HOURS}}` | Total hours in meetings |
134
+ | `{{FOCUS_HOURS}}` | Available focus time |
135
+ | `{{COMPLEXITY}}` | Light/Medium/Heavy |
136
+ | `{{TODAY_MEETINGS_TABLE}}` | Table rows for today's meetings |
137
+ | `{{FOCUS_BLOCKS_TABLE}}` | Table rows for focus blocks |
138
+ | `{{PREP_REQUIRED_TABLE}}` | Table rows for meetings needing prep |
139
+ | `{{CONFLICTS_TABLE}}` | Table rows for conflicts (if any) |
140
+ | `{{TOMORROW_TABLE}}` | Table rows for tomorrow preview |
141
+ | `{{HIGH_PRIORITY_PREP}}` | Urgent prep items |
142
+ | `{{STANDARD_PREP}}` | Standard prep items |
143
+ | `{{DEEP_WORK_STRATEGY}}` | Recommended focus block usage |
144
+
145
+ **Critical:** Output MUST include `## SCAN_DATA_START` and `## SCAN_DATA_END` markers for parsing.
146
+
147
+ ---
148
+
149
+ ## Completion Checklist
150
+
151
+ - [ ] Context discovery completed (have EMAIL)
152
+ - [ ] Today's events scanned
153
+ - [ ] Tomorrow's events scanned for prep
154
+ - [ ] Each meeting classified
155
+ - [ ] Focus blocks identified
156
+ - [ ] Preparation needs flagged
157
+ - [ ] Output written to `work/operations/daily-log/YYYY-MM-DD/cal-grid.md`
158
+ - [ ] SCAN_DATA markers included
159
+
160
+ ---
161
+
162
+ ## Error Handling
163
+
164
+ | Error | Action |
165
+ |-------|--------|
166
+ | No calendar access | Report OAuth needed, stop |
167
+ | Empty calendar | Report "No meetings scheduled", still output focus blocks |
168
+ | API rate limit | Wait and retry once |
@@ -0,0 +1,106 @@
1
+ ---
2
+ type: operations
3
+ hemisphere: work
4
+ created: {{DATE}}
5
+ updated: 2026-01-09
6
+ tags: [cal-grid, daily-log]
7
+ summary: Calendar Grid — {{DATE}}
8
+ ---
9
+
10
+ # Calendar Grid — {{DATE}}
11
+
12
+ **Scan Time:** {{TIME}}
13
+ **Calendar:** {{CALENDAR_ID}}
14
+
15
+ ---
16
+
17
+ ## Day Summary
18
+
19
+ | Metric | Value |
20
+ |--------|-------|
21
+ | **Total meetings** | {{MEETING_COUNT}} |
22
+ | **Meeting hours** | {{MEETING_HOURS}} |
23
+ | **Focus time available** | {{FOCUS_HOURS}} hours |
24
+ | **Complexity** | {{COMPLEXITY}} |
25
+
26
+ ---
27
+
28
+ ## SCAN_DATA_START
29
+
30
+ ### TODAY_MEETINGS
31
+
32
+ | Time | Event | Attendees | Prep | Type |
33
+ |------|-------|-----------|------|------|
34
+ {{TODAY_MEETINGS_TABLE}}
35
+
36
+ ### FOCUS_BLOCKS
37
+
38
+ | Block | Duration | Quality |
39
+ |-------|----------|---------|
40
+ {{FOCUS_BLOCKS_TABLE}}
41
+
42
+ ### PREP_REQUIRED
43
+
44
+ | Time | Meeting | Preparation Needed |
45
+ |------|---------|-------------------|
46
+ {{PREP_REQUIRED_TABLE}}
47
+
48
+ ### CONFLICTS
49
+
50
+ | Issue | Meetings Affected | Recommendation |
51
+ |-------|-------------------|----------------|
52
+ {{CONFLICTS_TABLE}}
53
+
54
+ ### TOMORROW_PREVIEW
55
+
56
+ | Time | Event | Prep Needed |
57
+ |------|-------|-------------|
58
+ {{TOMORROW_TABLE}}
59
+
60
+ ## SCAN_DATA_END
61
+
62
+ ---
63
+
64
+ ## Complexity Budget
65
+
66
+ **Meeting Load: {{COMPLEXITY}}**
67
+
68
+ {{#if COMPLEXITY == "Light"}}
69
+ - 0-2 meetings scheduled
70
+ - Capacity: 2-3 Heavy tasks, multiple Light tasks
71
+ - Recommendation: Use today for deep work
72
+ {{/if}}
73
+
74
+ {{#if COMPLEXITY == "Medium"}}
75
+ - 3-4 meetings scheduled
76
+ - Capacity: 1-2 Heavy tasks, few Light tasks
77
+ - Recommendation: Protect focus blocks aggressively
78
+ {{/if}}
79
+
80
+ {{#if COMPLEXITY == "Heavy"}}
81
+ - 5+ meetings scheduled
82
+ - Capacity: 1 Light task maximum
83
+ - Recommendation: Focus on meetings, defer other work
84
+ {{/if}}
85
+
86
+ ---
87
+
88
+ ## Preparation Alerts
89
+
90
+ ### High Priority
91
+
92
+ {{HIGH_PRIORITY_PREP}}
93
+
94
+ ### Standard
95
+
96
+ {{STANDARD_PREP}}
97
+
98
+ ---
99
+
100
+ ## Deep Work Strategy
101
+
102
+ {{DEEP_WORK_STRATEGY}}
103
+
104
+ ---
105
+
106
+ *Generated by cal-grid skill at {{TIME}}*