thoth-plugin 1.1.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.
Files changed (89) hide show
  1. package/README.md +84 -0
  2. package/dist/agents/archivist.d.ts +2 -0
  3. package/dist/agents/chronicler.d.ts +2 -0
  4. package/dist/agents/coach.d.ts +2 -0
  5. package/dist/agents/code-master.d.ts +2 -0
  6. package/dist/agents/diplomat.d.ts +2 -0
  7. package/dist/agents/index.d.ts +12 -0
  8. package/dist/agents/life-master.d.ts +2 -0
  9. package/dist/agents/scribe.d.ts +2 -0
  10. package/dist/agents/sentinel.d.ts +2 -0
  11. package/dist/agents/thoth.d.ts +37 -0
  12. package/dist/agents/work-master.d.ts +2 -0
  13. package/dist/cli.d.ts +9 -0
  14. package/dist/cli.js +220 -0
  15. package/dist/config/index.d.ts +1 -0
  16. package/dist/config/schema.d.ts +99 -0
  17. package/dist/defaults/AGENTS.md +53 -0
  18. package/dist/defaults/skill/cal-grid/SKILL.md +16 -0
  19. package/dist/defaults/skill/capsule-init/SKILL.md +102 -0
  20. package/dist/defaults/skill/cross-linker/SKILL.md +357 -0
  21. package/dist/defaults/skill/evening-close/SKILL.md +91 -0
  22. package/dist/defaults/skill/gardener/SKILL.md +248 -0
  23. package/dist/defaults/skill/gardener/confidence-tiers.md +142 -0
  24. package/dist/defaults/skill/gardener/repair-workflow.md +170 -0
  25. package/dist/defaults/skill/google-chat-scan/SKILL.md +135 -0
  26. package/dist/defaults/skill/handover/SKILL.md +18 -0
  27. package/dist/defaults/skill/interview-prep/SKILL.md +23 -0
  28. package/dist/defaults/skill/leadership-coach/SKILL.md +160 -0
  29. package/dist/defaults/skill/link-retrofit/SKILL.md +345 -0
  30. package/dist/defaults/skill/mail-triage/SKILL.md +16 -0
  31. package/dist/defaults/skill/morning-boot/SKILL.md +98 -0
  32. package/dist/defaults/skill/post-meeting-drill/SKILL.md +479 -0
  33. package/dist/defaults/skill/restore-environment/SKILL.md +30 -0
  34. package/dist/defaults/skill/scorecard-synthesis/SKILL.md +26 -0
  35. package/dist/defaults/skill/skill-generator/SKILL.md +240 -0
  36. package/dist/defaults/skill/skill-generator/testing-protocol.md +158 -0
  37. package/dist/defaults/skill/slack-pulse/SKILL.md +16 -0
  38. package/dist/defaults/skill/system-init/SKILL.md +103 -0
  39. package/dist/defaults/skill/thought-router/SKILL.md +80 -0
  40. package/dist/hooks/context-aperture.d.ts +37 -0
  41. package/dist/hooks/context-aperture.test.d.ts +1 -0
  42. package/dist/hooks/directory-agents-injector/constants.d.ts +6 -0
  43. package/dist/hooks/directory-agents-injector/index.d.ts +21 -0
  44. package/dist/hooks/directory-agents-injector/storage.d.ts +8 -0
  45. package/dist/hooks/directory-agents-injector/types.d.ts +24 -0
  46. package/dist/hooks/index.d.ts +4 -0
  47. package/dist/hooks/permission-enforcer.d.ts +15 -0
  48. package/dist/hooks/permission-enforcer.test.d.ts +1 -0
  49. package/dist/hooks/temporal-awareness.d.ts +31 -0
  50. package/dist/hooks/temporal-awareness.test.d.ts +1 -0
  51. package/dist/hooks/trust-level-tracker.d.ts +58 -0
  52. package/dist/hooks/trust-level-tracker.test.d.ts +1 -0
  53. package/dist/index.d.ts +4 -0
  54. package/dist/index.js +31196 -0
  55. package/dist/shared/index.d.ts +21 -0
  56. package/dist/shared-hooks/background-agent/index.d.ts +2 -0
  57. package/dist/shared-hooks/background-agent/manager.d.ts +39 -0
  58. package/dist/shared-hooks/background-agent/types.d.ts +30 -0
  59. package/dist/shared-hooks/background-notification/index.d.ts +12 -0
  60. package/dist/shared-hooks/background-notification/types.d.ts +4 -0
  61. package/dist/shared-hooks/context-window-monitor.d.ts +18 -0
  62. package/dist/shared-hooks/index.d.ts +7 -0
  63. package/dist/shared-hooks/session-recovery/constants.d.ts +6 -0
  64. package/dist/shared-hooks/session-recovery/index.d.ts +21 -0
  65. package/dist/shared-hooks/session-recovery/storage.d.ts +19 -0
  66. package/dist/shared-hooks/session-recovery/types.d.ts +90 -0
  67. package/dist/shared-hooks/todo-continuation-enforcer.d.ts +12 -0
  68. package/dist/shared-hooks/utils/constants.d.ts +6 -0
  69. package/dist/shared-hooks/utils/index.d.ts +5 -0
  70. package/dist/shared-hooks/utils/logger.d.ts +2 -0
  71. package/dist/shared-hooks/utils/message-storage.d.ts +6 -0
  72. package/dist/shared-hooks/utils/session-state.d.ts +4 -0
  73. package/dist/shared-hooks/utils/types.d.ts +141 -0
  74. package/dist/specialization/boot-sequences.d.ts +19 -0
  75. package/dist/specialization/detector.d.ts +20 -0
  76. package/dist/specialization/index.d.ts +10 -0
  77. package/dist/specialization/prompt-builder.d.ts +30 -0
  78. package/dist/specialization/prompt-sections.d.ts +19 -0
  79. package/dist/specialization/types.d.ts +86 -0
  80. package/dist/thoth-plugin.schema.json +7 -0
  81. package/dist/tools/background-task/constants.d.ts +3 -0
  82. package/dist/tools/background-task/index.d.ts +2 -0
  83. package/dist/tools/background-task/tools.d.ts +7 -0
  84. package/dist/tools/background-task/types.d.ts +14 -0
  85. package/dist/tools/index.d.ts +2 -0
  86. package/dist/tools/skill/index.d.ts +2 -0
  87. package/dist/tools/skill/tools.d.ts +2 -0
  88. package/dist/tools/skill/types.d.ts +37 -0
  89. package/package.json +54 -0
package/README.md ADDED
@@ -0,0 +1,84 @@
1
+ # Thoth
2
+
3
+ > Life orchestration system and OpenCode plugin for managing work, personal life, and technical projects.
4
+
5
+ Thoth is a knowledge-based life operating system that acts as your chief of staff. Unlike traditional coding assistants, Thoth is designed to **support, guide, and mentor** — not just write code.
6
+
7
+ ## Features
8
+
9
+ - **Four Hemispheres**: Organized knowledge across work, life, coding, and system (kernel)
10
+ - **Depth-Based Specialization**: Agent persona adapts based on where you are in the knowledge base
11
+ - **Smart Delegation**: Routes tasks to specialized sub-agents (Work Master, Life Master, Code Master)
12
+ - **Permission System**: Critical actions require explicit approval
13
+ - **Knowledge Persistence**: Learns and remembers across sessions
14
+
15
+ ## Depth-Based Specialization
16
+
17
+ Thoth's personality and expertise change based on your current directory:
18
+
19
+ | Depth | Example | Persona |
20
+ |-------|---------|---------|
21
+ | 0 | `/thoth/` | Pure Chief of Staff |
22
+ | 1 | `/thoth/work/` | Executive COS (crisp, P0-focused) |
23
+ | 1 | `/thoth/life/` | Personal Consultant (warm, Socratic) |
24
+ | 2 | `/thoth/work/projects/` | Project Portfolio Manager |
25
+ | 3 | `/thoth/work/projects/x/` | Deep Expert on Project X |
26
+
27
+ See [Persona Building Guide](kernel/knowledge/persona-building.md) for details.
28
+
29
+ ## Structure
30
+
31
+ ```
32
+ thoth/
33
+ ├── kernel/ # System config, memory, standards
34
+ ├── work/ # Professional life
35
+ ├── life/ # Personal life
36
+ ├── coding/ # Technical projects
37
+ └── src/ # OpenCode plugin source
38
+ ```
39
+
40
+ ## As an OpenCode Plugin
41
+
42
+ Thoth is also an [OpenCode](https://github.com/nichochar/opencode) plugin that provides:
43
+
44
+ - **Thoth Agent**: Primary orchestrator with depth-based specialization
45
+ - **Sub-Agents**: Work Master, Life Master, Code Master, Coach, Sentinel, Diplomat, Chronicler
46
+ - **Hooks**: Permission enforcement, trust tracking, context management
47
+ - **Skills**: Morning boot, evening close, thought routing, meeting processing
48
+
49
+ ### Installation
50
+
51
+ ```bash
52
+ # In your opencode config
53
+ {
54
+ "plugins": ["path/to/thoth"]
55
+ }
56
+ ```
57
+
58
+ ### Building
59
+
60
+ ```bash
61
+ npm install
62
+ npm run build
63
+ ```
64
+
65
+ ## Documentation
66
+
67
+ - [**Thoth User Guide**](kernel/knowledge/thoth-user-guide.md) - Comprehensive guide to capabilities, usage, and configuration
68
+ - [Vision](kernel/knowledge/vision.md) - Chief of Staff philosophy
69
+ - [Persona Building](kernel/knowledge/persona-building.md) - How depth-based specialization works
70
+ - [Plugin Architecture](kernel/knowledge/plugin-architecture.md) - Technical architecture
71
+
72
+ ## Philosophy
73
+
74
+ Thoth operates on these principles:
75
+
76
+ 1. **Chief of Staff, not servant** — Warm but professional, challenges when appropriate
77
+ 2. **Context is king** — Retrieves relevant knowledge before acting
78
+ 3. **Permission-aware** — Critical actions require approval
79
+ 4. **Cross-domain synthesis** — Can connect insights across hemispheres
80
+ 5. **Continuous learning** — Persists learnings to the knowledge base
81
+
82
+ ## License
83
+
84
+ Private repository.
@@ -0,0 +1,2 @@
1
+ import type { AgentConfig } from "@opencode-ai/sdk";
2
+ export declare const archivistAgent: AgentConfig;
@@ -0,0 +1,2 @@
1
+ import type { AgentConfig } from "@opencode-ai/sdk";
2
+ export declare const chroniclerAgent: AgentConfig;
@@ -0,0 +1,2 @@
1
+ import type { AgentConfig } from "@opencode-ai/sdk";
2
+ export declare const coachAgent: AgentConfig;
@@ -0,0 +1,2 @@
1
+ import type { AgentConfig } from "@opencode-ai/sdk";
2
+ export declare const codeMasterAgent: AgentConfig;
@@ -0,0 +1,2 @@
1
+ import type { AgentConfig } from "@opencode-ai/sdk";
2
+ export declare const diplomatAgent: AgentConfig;
@@ -0,0 +1,12 @@
1
+ import type { AgentConfig } from "@opencode-ai/sdk";
2
+ import type { ThothPluginConfig } from "../config";
3
+ export declare const builtinAgents: Record<string, AgentConfig>;
4
+ export declare function createAgents(config: ThothPluginConfig): Record<string, AgentConfig>;
5
+ export { thothAgent } from "./thoth";
6
+ export { workMasterAgent } from "./work-master";
7
+ export { lifeMasterAgent } from "./life-master";
8
+ export { codeMasterAgent } from "./code-master";
9
+ export { coachAgent } from "./coach";
10
+ export { sentinelAgent } from "./sentinel";
11
+ export { diplomatAgent } from "./diplomat";
12
+ export { chroniclerAgent } from "./chronicler";
@@ -0,0 +1,2 @@
1
+ import type { AgentConfig } from "@opencode-ai/sdk";
2
+ export declare const lifeMasterAgent: AgentConfig;
@@ -0,0 +1,2 @@
1
+ import type { AgentConfig } from "@opencode-ai/sdk";
2
+ export declare const scribeAgent: AgentConfig;
@@ -0,0 +1,2 @@
1
+ import type { AgentConfig } from "@opencode-ai/sdk";
2
+ export declare const sentinelAgent: AgentConfig;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Thoth Agent Configuration
3
+ *
4
+ * Thoth is Zeus's root-level life orchestrator and trusted chief of staff.
5
+ * Uses depth-based specialization: the prompt is built dynamically based on
6
+ * the current working directory when the session starts.
7
+ *
8
+ * Depth Model:
9
+ * - Depth 0: /thoth/ → Pure Chief of Staff
10
+ * - Depth 1: /thoth/work/ → Executive COS (crisp, P0-focused)
11
+ * - Depth 2: /thoth/work/projects/ → Project Portfolio Manager
12
+ * - Depth 3: /thoth/work/projects/xyz/ → Deep Expert on Project XYZ
13
+ */
14
+ import type { AgentConfig } from "@opencode-ai/sdk";
15
+ import { buildThothPrompt, detectSpecialization } from "../specialization";
16
+ import type { Specialization } from "../specialization";
17
+ /**
18
+ * Create a Thoth agent with the given specialization
19
+ *
20
+ * @param specialization - The detected specialization
21
+ * @param cwd - Current working directory (for resolving boot files)
22
+ * @param knowledgeBasePath - Path to the knowledge base root
23
+ */
24
+ export declare function createThothAgent(specialization: Specialization, cwd?: string, knowledgeBasePath?: string): AgentConfig;
25
+ /**
26
+ * The default Thoth agent configuration (Depth 0)
27
+ *
28
+ * This is used when no specialization is detected or as a fallback.
29
+ * The actual agent used in a session is created dynamically based on
30
+ * the detected specialization from the working directory.
31
+ */
32
+ export declare const thothAgent: AgentConfig;
33
+ /**
34
+ * Re-export for convenience
35
+ */
36
+ export { detectSpecialization, buildThothPrompt };
37
+ export type { Specialization };
@@ -0,0 +1,2 @@
1
+ import type { AgentConfig } from "@opencode-ai/sdk";
2
+ export declare const workMasterAgent: AgentConfig;
package/dist/cli.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Thoth CLI - Knowledge Base Initialization
4
+ *
5
+ * Usage:
6
+ * npx thoth-plugin init [path]
7
+ * thoth init [path]
8
+ */
9
+ export {};
package/dist/cli.js ADDED
@@ -0,0 +1,220 @@
1
+ #!/usr/bin/env node
2
+ // @bun
3
+
4
+ // src/cli.ts
5
+ import { existsSync, mkdirSync, cpSync, writeFileSync, readdirSync } from "fs";
6
+ import { join, dirname } from "path";
7
+ import { homedir } from "os";
8
+ import { fileURLToPath } from "url";
9
+ var __filename2 = fileURLToPath(import.meta.url);
10
+ var __dirname2 = dirname(__filename2);
11
+ var NPM_DEFAULTS_PATH = join(__dirname2, "defaults");
12
+ var README_TEMPLATE = `# Thoth Knowledge Base
13
+
14
+ Welcome to your personal Thoth knowledge base - your AI chief of staff for life orchestration.
15
+
16
+ ## Structure
17
+
18
+ | Hemisphere | Purpose |
19
+ |------------|---------|
20
+ | \`work/\` | Professional life - projects, colleagues, career |
21
+ | \`life/\` | Personal life - health, relationships, home, finance |
22
+ | \`coding/\` | Technical projects and development |
23
+ | \`kernel/\` | System configuration and preferences |
24
+
25
+ ## Getting Started
26
+
27
+ 1. Start OpenCode in this directory:
28
+ \`\`\`bash
29
+ cd ${process.argv[3] || "~/thoth"}
30
+ opencode
31
+ \`\`\`
32
+
33
+ 2. Ask Thoth to help you onboard:
34
+ \`\`\`
35
+ Help me set up my knowledge base
36
+ \`\`\`
37
+
38
+ 3. Or run the onboarding skill:
39
+ \`\`\`
40
+ /system-init
41
+ \`\`\`
42
+
43
+ ## Available Skills
44
+
45
+ Run these skills to automate common workflows:
46
+
47
+ | Skill | Description |
48
+ |-------|-------------|
49
+ | \`/morning-boot\` | Start your day with inbox triage and calendar review |
50
+ | \`/evening-close\` | End-of-day summary and overflow extraction |
51
+ | \`/mail-triage\` | Process Gmail inbox systematically |
52
+ | \`/slack-pulse\` | Scan Slack for mentions and important messages |
53
+ | \`/thought-router\` | Quick capture and route thoughts |
54
+ | \`/post-meeting-drill\` | Process meeting notes into action items |
55
+
56
+ ## Configuration
57
+
58
+ Configure Thoth in \`.opencode/thoth-plugin.json\`:
59
+
60
+ \`\`\`json
61
+ {
62
+ "knowledge_base": "${process.argv[3] || "~/thoth"}"
63
+ }
64
+ \`\`\`
65
+
66
+ ## Learn More
67
+
68
+ - Ask: "What can you help me with?"
69
+ - Ask: "Explain how Thoth works"
70
+ - Ask: "What skills are available?"
71
+ `;
72
+ function copyDefaultSkills(targetSkillDir) {
73
+ const sourceSkillDir = join(NPM_DEFAULTS_PATH, "skill");
74
+ if (!existsSync(sourceSkillDir)) {
75
+ console.log(" (No default skills found in package)");
76
+ return;
77
+ }
78
+ const skills = readdirSync(sourceSkillDir, { withFileTypes: true }).filter((d) => d.isDirectory()).map((d) => d.name);
79
+ for (const skill of skills) {
80
+ const source = join(sourceSkillDir, skill);
81
+ const target = join(targetSkillDir, skill);
82
+ cpSync(source, target, { recursive: true });
83
+ }
84
+ console.log(` Copied ${skills.length} default skills`);
85
+ }
86
+ function init(targetPath) {
87
+ const targetDir = targetPath || join(homedir(), "thoth");
88
+ if (existsSync(targetDir)) {
89
+ console.log(`
90
+ Error: Directory already exists: ${targetDir}`);
91
+ console.log("Use a different path or remove the existing directory.");
92
+ console.log(`
93
+ Example:`);
94
+ console.log(` npx thoth-plugin init ~/my-thoth`);
95
+ process.exit(1);
96
+ }
97
+ console.log(`
98
+ Creating Thoth knowledge base at: ${targetDir}
99
+ `);
100
+ const dirs = [
101
+ "work/projects",
102
+ "work/people",
103
+ "work/inbox",
104
+ "work/logs",
105
+ "life/inbox",
106
+ "life/health",
107
+ "life/relationships",
108
+ "life/finances",
109
+ "coding/projects",
110
+ "coding/references",
111
+ "kernel/config",
112
+ "kernel/templates",
113
+ "kernel/memory",
114
+ "kernel/Personas",
115
+ ".opencode/skill"
116
+ ];
117
+ for (const dir of dirs) {
118
+ mkdirSync(join(targetDir, dir), { recursive: true });
119
+ }
120
+ console.log(" Created directory structure");
121
+ const defaultAgentsMd = join(NPM_DEFAULTS_PATH, "AGENTS.md");
122
+ if (existsSync(defaultAgentsMd)) {
123
+ cpSync(defaultAgentsMd, join(targetDir, "AGENTS.md"));
124
+ console.log(" Copied root AGENTS.md");
125
+ }
126
+ copyDefaultSkills(join(targetDir, ".opencode", "skill"));
127
+ writeFileSync(join(targetDir, "README.md"), README_TEMPLATE);
128
+ console.log(" Created README.md");
129
+ writeFileSync(join(targetDir, "kernel", "config", "preferences.md"), `---
130
+ type: config
131
+ hemisphere: kernel
132
+ created: ${new Date().toISOString().split("T")[0]}
133
+ updated: ${new Date().toISOString().split("T")[0]}
134
+ ---
135
+
136
+ # Preferences
137
+
138
+ Your personal preferences for Thoth.
139
+
140
+ ## Communication Style
141
+
142
+ - Default: balanced (not too verbose, not too terse)
143
+
144
+ ## Timezone
145
+
146
+ - Default: auto-detect
147
+
148
+ ## Work Hours
149
+
150
+ - Default: 9:00 - 18:00
151
+
152
+ ---
153
+
154
+ *Edit this file to customize Thoth's behavior.*
155
+ `);
156
+ console.log(" Created kernel/config/preferences.md");
157
+ const hemispheres = ["work", "life", "coding", "kernel"];
158
+ for (const hemi of hemispheres) {
159
+ writeFileSync(join(targetDir, hemi, "registry.md"), `---
160
+ type: registry
161
+ hemisphere: ${hemi}
162
+ created: ${new Date().toISOString().split("T")[0]}
163
+ updated: ${new Date().toISOString().split("T")[0]}
164
+ ---
165
+
166
+ # ${hemi.charAt(0).toUpperCase() + hemi.slice(1)} Registry
167
+
168
+ Index of all knowledge in the ${hemi} hemisphere.
169
+
170
+ ## Contents
171
+
172
+ *This registry will be populated as you add knowledge.*
173
+ `);
174
+ }
175
+ console.log(" Created hemisphere registries");
176
+ console.log(`
177
+ \u2713 Knowledge base created!
178
+ `);
179
+ console.log("Next steps:");
180
+ console.log(` 1. cd ${targetDir}`);
181
+ console.log(" 2. opencode");
182
+ console.log(` 3. Ask: "Help me onboard"
183
+ `);
184
+ }
185
+ function showHelp() {
186
+ console.log(`
187
+ Thoth - Life Orchestrator for OpenCode
188
+
189
+ Usage:
190
+ npx thoth-plugin <command> [options]
191
+
192
+ Commands:
193
+ init [path] Create a new knowledge base (default: ~/thoth)
194
+
195
+ Examples:
196
+ npx thoth-plugin init # Create at ~/thoth
197
+ npx thoth-plugin init ~/my-thoth # Create at custom path
198
+ npx thoth-plugin init ./kb # Create in current directory
199
+
200
+ Learn more: https://github.com/davidhelmus/thoth-core
201
+ `);
202
+ }
203
+ var command = process.argv[2];
204
+ switch (command) {
205
+ case "init":
206
+ init(process.argv[3]);
207
+ break;
208
+ case "help":
209
+ case "--help":
210
+ case "-h":
211
+ showHelp();
212
+ break;
213
+ default:
214
+ showHelp();
215
+ if (command && command !== "help") {
216
+ console.log(`Unknown command: ${command}
217
+ `);
218
+ process.exit(1);
219
+ }
220
+ }
@@ -0,0 +1 @@
1
+ export { ThothPluginConfigSchema, type ThothPluginConfig, type AgentOverride, type HooksConfig, type SkillsConfig, type IntegrationsConfig, type HookName, type SkillName, type AgentName, } from "./schema";
@@ -0,0 +1,99 @@
1
+ import { z } from "zod";
2
+ declare const AgentOverrideSchema: z.ZodObject<{
3
+ model: z.ZodOptional<z.ZodString>;
4
+ thinking: z.ZodOptional<z.ZodBoolean>;
5
+ temperature: z.ZodOptional<z.ZodNumber>;
6
+ maxTokens: z.ZodOptional<z.ZodNumber>;
7
+ }, z.core.$strict>;
8
+ declare const HooksConfigSchema: z.ZodObject<{
9
+ "permission-enforcer": z.ZodOptional<z.ZodBoolean>;
10
+ "trust-level-tracker": z.ZodOptional<z.ZodBoolean>;
11
+ "context-aperture": z.ZodOptional<z.ZodBoolean>;
12
+ "temporal-awareness": z.ZodOptional<z.ZodBoolean>;
13
+ "knowledge-persistence": z.ZodOptional<z.ZodBoolean>;
14
+ "directory-agents-injector": z.ZodOptional<z.ZodBoolean>;
15
+ "todo-continuation": z.ZodOptional<z.ZodBoolean>;
16
+ "session-recovery": z.ZodOptional<z.ZodBoolean>;
17
+ "context-window-monitor": z.ZodOptional<z.ZodBoolean>;
18
+ "background-notification": z.ZodOptional<z.ZodBoolean>;
19
+ }, z.core.$strict>;
20
+ declare const SkillsConfigSchema: z.ZodObject<{
21
+ "morning-boot": z.ZodOptional<z.ZodBoolean>;
22
+ "evening-close": z.ZodOptional<z.ZodBoolean>;
23
+ "thought-router": z.ZodOptional<z.ZodBoolean>;
24
+ "post-meeting-drill": z.ZodOptional<z.ZodBoolean>;
25
+ }, z.core.$strict>;
26
+ declare const IntegrationsConfigSchema: z.ZodObject<{
27
+ google_workspace: z.ZodOptional<z.ZodBoolean>;
28
+ slack: z.ZodOptional<z.ZodBoolean>;
29
+ jira: z.ZodOptional<z.ZodBoolean>;
30
+ drive_sync: z.ZodOptional<z.ZodBoolean>;
31
+ }, z.core.$strict>;
32
+ export declare const ThothPluginConfigSchema: z.ZodObject<{
33
+ enabled: z.ZodOptional<z.ZodBoolean>;
34
+ knowledge_base: z.ZodOptional<z.ZodString>;
35
+ agents: z.ZodOptional<z.ZodObject<{
36
+ thoth: z.ZodOptional<z.ZodObject<{
37
+ model: z.ZodOptional<z.ZodString>;
38
+ thinking: z.ZodOptional<z.ZodBoolean>;
39
+ temperature: z.ZodOptional<z.ZodNumber>;
40
+ maxTokens: z.ZodOptional<z.ZodNumber>;
41
+ }, z.core.$strict>>;
42
+ "work-master": z.ZodOptional<z.ZodObject<{
43
+ model: z.ZodOptional<z.ZodString>;
44
+ thinking: z.ZodOptional<z.ZodBoolean>;
45
+ temperature: z.ZodOptional<z.ZodNumber>;
46
+ maxTokens: z.ZodOptional<z.ZodNumber>;
47
+ }, z.core.$strict>>;
48
+ "life-master": z.ZodOptional<z.ZodObject<{
49
+ model: z.ZodOptional<z.ZodString>;
50
+ thinking: z.ZodOptional<z.ZodBoolean>;
51
+ temperature: z.ZodOptional<z.ZodNumber>;
52
+ maxTokens: z.ZodOptional<z.ZodNumber>;
53
+ }, z.core.$strict>>;
54
+ "code-master": z.ZodOptional<z.ZodObject<{
55
+ model: z.ZodOptional<z.ZodString>;
56
+ thinking: z.ZodOptional<z.ZodBoolean>;
57
+ temperature: z.ZodOptional<z.ZodNumber>;
58
+ maxTokens: z.ZodOptional<z.ZodNumber>;
59
+ }, z.core.$strict>>;
60
+ }, z.core.$strip>>;
61
+ hooks: z.ZodOptional<z.ZodObject<{
62
+ "permission-enforcer": z.ZodOptional<z.ZodBoolean>;
63
+ "trust-level-tracker": z.ZodOptional<z.ZodBoolean>;
64
+ "context-aperture": z.ZodOptional<z.ZodBoolean>;
65
+ "temporal-awareness": z.ZodOptional<z.ZodBoolean>;
66
+ "knowledge-persistence": z.ZodOptional<z.ZodBoolean>;
67
+ "directory-agents-injector": z.ZodOptional<z.ZodBoolean>;
68
+ "todo-continuation": z.ZodOptional<z.ZodBoolean>;
69
+ "session-recovery": z.ZodOptional<z.ZodBoolean>;
70
+ "context-window-monitor": z.ZodOptional<z.ZodBoolean>;
71
+ "background-notification": z.ZodOptional<z.ZodBoolean>;
72
+ }, z.core.$strict>>;
73
+ skills: z.ZodOptional<z.ZodObject<{
74
+ "morning-boot": z.ZodOptional<z.ZodBoolean>;
75
+ "evening-close": z.ZodOptional<z.ZodBoolean>;
76
+ "thought-router": z.ZodOptional<z.ZodBoolean>;
77
+ "post-meeting-drill": z.ZodOptional<z.ZodBoolean>;
78
+ }, z.core.$strict>>;
79
+ integrations: z.ZodOptional<z.ZodObject<{
80
+ google_workspace: z.ZodOptional<z.ZodBoolean>;
81
+ slack: z.ZodOptional<z.ZodBoolean>;
82
+ jira: z.ZodOptional<z.ZodBoolean>;
83
+ drive_sync: z.ZodOptional<z.ZodBoolean>;
84
+ }, z.core.$strict>>;
85
+ user: z.ZodOptional<z.ZodObject<{
86
+ name: z.ZodOptional<z.ZodString>;
87
+ email: z.ZodOptional<z.ZodString>;
88
+ timezone: z.ZodOptional<z.ZodString>;
89
+ }, z.core.$strip>>;
90
+ }, z.core.$strict>;
91
+ export type ThothPluginConfig = z.infer<typeof ThothPluginConfigSchema>;
92
+ export type AgentOverride = z.infer<typeof AgentOverrideSchema>;
93
+ export type HooksConfig = z.infer<typeof HooksConfigSchema>;
94
+ export type SkillsConfig = z.infer<typeof SkillsConfigSchema>;
95
+ export type IntegrationsConfig = z.infer<typeof IntegrationsConfigSchema>;
96
+ export type HookName = keyof NonNullable<ThothPluginConfig["hooks"]>;
97
+ export type SkillName = keyof NonNullable<ThothPluginConfig["skills"]>;
98
+ export type AgentName = "thoth" | "work-master" | "life-master" | "code-master";
99
+ export {};
@@ -0,0 +1,53 @@
1
+ ---
2
+ hemisphere: null
3
+ depth: 0
4
+ boot_sequence: []
5
+ ---
6
+
7
+ # Thoth - Life Orchestrator
8
+
9
+ Welcome to Thoth, your AI chief of staff for life orchestration.
10
+
11
+ ## Quick Start
12
+
13
+ If this is your first time using Thoth, you have two options:
14
+
15
+ ### Option 1: Initialize a Knowledge Base
16
+
17
+ Run in your terminal:
18
+ ```bash
19
+ npx thoth-plugin init
20
+ ```
21
+
22
+ This creates a knowledge base structure at `~/thoth/` with:
23
+ - `work/` - Professional life (projects, colleagues, career)
24
+ - `life/` - Personal life (health, relationships, home, finance)
25
+ - `coding/` - Technical projects and development
26
+ - `kernel/` - System configuration and preferences
27
+
28
+ ### Option 2: Use Without a Knowledge Base
29
+
30
+ Thoth works immediately for:
31
+ - Running skills (`/morning-boot`, `/mail-triage`, etc.)
32
+ - General assistance and planning
33
+ - Ad-hoc task management
34
+
35
+ ## Available Skills
36
+
37
+ Skills are pre-built workflows. Invoke with the skill tool:
38
+
39
+ | Skill | Description |
40
+ |-------|-------------|
41
+ | `morning-boot` | Start your day with inbox triage and calendar review |
42
+ | `evening-close` | End-of-day summary and overflow extraction |
43
+ | `mail-triage` | Process Gmail inbox systematically |
44
+ | `slack-pulse` | Scan Slack for mentions and important messages |
45
+ | `thought-router` | Quick capture and route thoughts to the right place |
46
+ | `post-meeting-drill` | Process meeting notes into action items |
47
+ | `leadership-coach` | IC-to-Manager coaching for new leaders |
48
+
49
+ ## Learn More
50
+
51
+ - Ask: "What skills are available?"
52
+ - Ask: "Help me set up my knowledge base"
53
+ - Ask: "Explain how Thoth works"
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: cal-grid
3
+ description: Map Zeus's daily calendar grid using the Thoth standard protocol. Identifies deep work slots and critical preparation needs.
4
+ ---
5
+
6
+ # Calendar Grid Skill
7
+
8
+ You are the Daily Grid Architect for Zeus's Chief of Staff.
9
+
10
+ ## Protocol Execution
11
+
12
+ 1. **Read Master Instructions**: Load the full protocol from `kernel/Agents/cal-grid.md`.
13
+ 2. **Execute**: Follow the protocol exactly as defined in the master file.
14
+ 3. **Synthesize**: Provide the high-resolution grid and the required raw data block.
15
+
16
+ **MANDATORY**: Ensure the output includes the `## SCAN_DATA_START` and `## SCAN_DATA_END` markers as specified in the master instructions.
@@ -0,0 +1,102 @@
1
+ ---
2
+ name: capsule-init
3
+ description: Upgrades a project file or folder to a focused Thoth Capsule.
4
+ ---
5
+
6
+ # Capsule Init Skill
7
+
8
+ Use this skill when a project grows too complex or when you want to "Deep Dive" into a specific subfolder.
9
+
10
+ ## Logic
11
+
12
+ ### 1. Target Identification
13
+ Identify if it's a file (`Projects/foo.md`) or a folder (`coding/bar/`).
14
+
15
+ ### 2. Location Check
16
+ Determine if the capsule is inside or outside the Thoth repo:
17
+ ```bash
18
+ # Get thoth repo root (if inside)
19
+ THOTH_ROOT=$(git -C <target_path> rev-parse --show-toplevel 2>/dev/null)
20
+
21
+ # Check if this is actually the thoth repo (not some other repo)
22
+ # by verifying kernel/ exists
23
+ if [[ -d "$THOTH_ROOT/kernel" ]]; then
24
+ echo "Inside thoth repo"
25
+ else
26
+ echo "Outside thoth repo (or different repo)"
27
+ fi
28
+ ```
29
+
30
+ ### 3. Strategy
31
+ Read the existing content to distill the "Strategic North Star".
32
+
33
+ ### 4. Scaffold
34
+ Create the capsule structure:
35
+
36
+ | File | Purpose | When to Create |
37
+ |------|---------|----------------|
38
+ | `AGENTS.md` | Bootloader with persona and context | Always |
39
+ | `CONTEXT.md` | Strategic Interface | Always |
40
+ | `opencode.json` | Instruction Pinning | Always |
41
+ | `.opencode/oh-my-opencode.json` | Plugin config (disables Sisyphus) | **ALWAYS** (symlink if inside, copy if outside) |
42
+
43
+ ### 5. Migration
44
+ Move the original project file to `README.md` within the new capsule.
45
+
46
+ ## Templates
47
+
48
+ Use templates in `kernel/templates/`:
49
+ - `AGENTS.template.md` — Bootloader structure
50
+ - `CONTEXT.template.md` — Strategic interface
51
+ - `oh-my-opencode.template.json` — Plugin config for external capsules
52
+
53
+ ## Plugin Config (CRITICAL - ALWAYS REQUIRED)
54
+
55
+ oh-my-opencode uses `process.cwd()` to find config, NOT git root. Every capsule needs `.opencode/oh-my-opencode.json` accessible from its directory.
56
+
57
+ ### Inside Thoth Repo → Create Symlink
58
+
59
+ Calculate the relative path from capsule to root `.opencode/`:
60
+
61
+ ```bash
62
+ # Example: capsule at coding/projects/my-app/
63
+ # Depth = 3 levels from root
64
+ # Symlink target = ../../../.opencode/oh-my-opencode.json
65
+
66
+ # Calculate depth from root
67
+ CAPSULE_PATH="coding/projects/my-app" # relative to thoth root
68
+ DEPTH=$(echo "$CAPSULE_PATH" | tr -cd '/' | wc -c)
69
+ DEPTH=$((DEPTH + 1)) # add 1 for the directory itself
70
+
71
+ # Build relative path (../ repeated DEPTH times)
72
+ REL_PATH=$(printf '../%.0s' $(seq 1 $DEPTH))
73
+
74
+ # Create symlink
75
+ mkdir -p "$CAPSULE_PATH/.opencode"
76
+ cd "$CAPSULE_PATH/.opencode"
77
+ ln -s "${REL_PATH}.opencode/oh-my-opencode.json" oh-my-opencode.json
78
+ ```
79
+
80
+ **Quick reference for common depths:**
81
+
82
+ | Capsule Location | Depth | Symlink Target |
83
+ |------------------|-------|----------------|
84
+ | `kernel/` | 1 | `../../.opencode/oh-my-opencode.json` |
85
+ | `work/projects/` | 2 | `../../../.opencode/oh-my-opencode.json` |
86
+ | `coding/projects/my-app/` | 3 | `../../../../.opencode/oh-my-opencode.json` |
87
+
88
+ ### Outside Thoth Repo → Copy Template
89
+
90
+ ```bash
91
+ mkdir -p <capsule>/.opencode
92
+ cp kernel/templates/oh-my-opencode.template.json <capsule>/.opencode/oh-my-opencode.json
93
+ ```
94
+
95
+ **Without this config, the capsule will use Sisyphus instead of Thoth.**
96
+
97
+ ## Prompt Requirements
98
+
99
+ Ask the user for:
100
+ - Strategic Objective (if not inferable)
101
+ - Persona choice (ARCHITECT, COS, SYSTEM, etc.)
102
+ - Target location (confirm if outside thoth repo)