thoth-plugin 1.2.3 → 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.
- package/README.md +17 -1
- package/defaults/skill/cal-grid/SKILL.md +168 -0
- package/defaults/skill/cal-grid/cal-grid-template.md +106 -0
- package/defaults/skill/context-discovery/SKILL.md +253 -0
- package/defaults/skill/context-discovery/discovery.prose +143 -0
- package/defaults/skill/context-onboarding/SKILL.md +370 -0
- package/{dist/defaults/skill/_legacy/email-draft/skill.md → defaults/skill/email-draft/SKILL.md} +33 -30
- package/defaults/skill/evening-close/SKILL.md +93 -61
- package/defaults/skill/evening-close/evening-close-template.md +42 -0
- package/{dist/defaults/skill/_legacy → defaults/skill}/gardener/SKILL.md +3 -3
- package/{dist/defaults/skill/_legacy → defaults/skill}/google-chat-scan/SKILL.md +7 -0
- package/{dist/defaults/skill/_legacy → defaults/skill}/leadership-coach/SKILL.md +9 -8
- package/defaults/skill/mail-triage/SKILL.md +272 -15
- package/defaults/skill/mail-triage/mail-triage-template.md +90 -0
- package/defaults/skill/morning-boot/SKILL.md +214 -25
- package/defaults/skill/morning-boot/daily-log-template.md +98 -0
- package/defaults/skill/morning-boot/morning-boot.prose +98 -0
- package/defaults/skill/{_legacy/onboarding → onboarding}/SKILL.md +7 -6
- package/defaults/skill/open-prose/SKILL.md +373 -0
- package/defaults/skill/open-prose/antipatterns.md +852 -0
- package/defaults/skill/open-prose/docs.md +2676 -0
- package/defaults/skill/open-prose/patterns.md +610 -0
- package/defaults/skill/open-prose/prose.md +950 -0
- package/{dist/defaults/skill/_legacy → defaults/skill}/post-meeting-drill/SKILL.md +90 -95
- package/defaults/skill/post-meeting-drill/examples.md +130 -0
- package/defaults/skill/post-meeting-drill/post-meeting-drill-template.md +111 -0
- package/defaults/skill/skill-generator/SKILL.md +217 -0
- package/defaults/skill/skill-generator/skill-template.md +163 -0
- package/defaults/skill/slack-pulse/SKILL.md +211 -14
- package/defaults/skill/slack-pulse/slack-pulse-template.md +98 -0
- package/defaults/skill/slack-write/skill.md +184 -0
- package/defaults/skill/thought-router/SKILL.md +7 -8
- package/dist/cli.js +137 -3
- package/dist/config/schema.d.ts +0 -2
- package/dist/defaults/skill/cal-grid/SKILL.md +168 -0
- package/dist/defaults/skill/cal-grid/cal-grid-template.md +106 -0
- package/dist/defaults/skill/context-discovery/SKILL.md +253 -0
- package/dist/defaults/skill/context-discovery/discovery.prose +143 -0
- package/dist/defaults/skill/context-onboarding/SKILL.md +370 -0
- package/{defaults/skill/_legacy/email-draft/skill.md → dist/defaults/skill/email-draft/SKILL.md} +33 -30
- package/dist/defaults/skill/evening-close/SKILL.md +93 -61
- package/dist/defaults/skill/evening-close/evening-close-template.md +42 -0
- package/{defaults/skill/_legacy → dist/defaults/skill}/gardener/SKILL.md +3 -3
- package/{defaults/skill/_legacy → dist/defaults/skill}/google-chat-scan/SKILL.md +7 -0
- package/{defaults/skill/_legacy → dist/defaults/skill}/leadership-coach/SKILL.md +9 -8
- package/dist/defaults/skill/mail-triage/SKILL.md +272 -15
- package/dist/defaults/skill/mail-triage/mail-triage-template.md +90 -0
- package/dist/defaults/skill/morning-boot/SKILL.md +214 -25
- package/dist/defaults/skill/morning-boot/daily-log-template.md +98 -0
- package/dist/defaults/skill/morning-boot/morning-boot.prose +98 -0
- package/dist/defaults/skill/{_legacy/onboarding → onboarding}/SKILL.md +7 -6
- package/dist/defaults/skill/open-prose/SKILL.md +373 -0
- package/dist/defaults/skill/open-prose/antipatterns.md +852 -0
- package/dist/defaults/skill/open-prose/docs.md +2676 -0
- package/dist/defaults/skill/open-prose/patterns.md +610 -0
- package/dist/defaults/skill/open-prose/prose.md +950 -0
- package/{defaults/skill/_legacy → dist/defaults/skill}/post-meeting-drill/SKILL.md +90 -95
- package/dist/defaults/skill/post-meeting-drill/examples.md +130 -0
- package/dist/defaults/skill/post-meeting-drill/post-meeting-drill-template.md +111 -0
- package/dist/defaults/skill/skill-generator/SKILL.md +217 -0
- package/dist/defaults/skill/skill-generator/skill-template.md +163 -0
- package/dist/defaults/skill/slack-pulse/SKILL.md +211 -14
- package/dist/defaults/skill/slack-pulse/slack-pulse-template.md +98 -0
- package/dist/defaults/skill/slack-write/skill.md +184 -0
- package/dist/defaults/skill/thought-router/SKILL.md +7 -8
- package/dist/hooks/index.d.ts +0 -1
- package/dist/index.js +26 -189
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/sentinel-service.d.ts +0 -1
- package/dist/sdk/test-harness.d.ts +90 -0
- package/dist/sdk/thoth-client.d.ts +1 -0
- package/dist/shared/index.d.ts +0 -1
- package/dist/specialization/prompt-sections.d.ts +1 -1
- package/package.json +1 -1
- package/defaults/skill/_legacy/cal-grid/SKILL.md +0 -16
- package/defaults/skill/_legacy/skill-generator/SKILL.md +0 -362
- package/dist/defaults/skill/_legacy/cal-grid/SKILL.md +0 -16
- package/dist/defaults/skill/_legacy/skill-generator/SKILL.md +0 -362
- package/dist/hooks/temporal-awareness.d.ts +0 -31
- package/dist/hooks/temporal-awareness.test.d.ts +0 -1
- /package/defaults/skill/{_legacy/capsule-init → capsule-init}/SKILL.md +0 -0
- /package/defaults/skill/{_legacy/cross-linker → cross-linker}/SKILL.md +0 -0
- /package/defaults/skill/{_legacy/gardener → gardener}/confidence-tiers.md +0 -0
- /package/defaults/skill/{_legacy/gardener → gardener}/repair-workflow.md +0 -0
- /package/defaults/skill/{_legacy/handover → handover}/SKILL.md +0 -0
- /package/defaults/skill/{_legacy/interview-prep → interview-prep}/SKILL.md +0 -0
- /package/defaults/skill/{_legacy/link-retrofit → link-retrofit}/SKILL.md +0 -0
- /package/defaults/skill/{_legacy/restore-environment → restore-environment}/SKILL.md +0 -0
- /package/defaults/skill/{_legacy/scorecard-synthesis → scorecard-synthesis}/SKILL.md +0 -0
- /package/defaults/skill/{_legacy/skill-generator → skill-generator}/testing-protocol.md +0 -0
- /package/defaults/skill/{_legacy/system-init → system-init}/SKILL.md +0 -0
- /package/dist/defaults/skill/{_legacy/capsule-init → capsule-init}/SKILL.md +0 -0
- /package/dist/defaults/skill/{_legacy/cross-linker → cross-linker}/SKILL.md +0 -0
- /package/dist/defaults/skill/{_legacy/gardener → gardener}/confidence-tiers.md +0 -0
- /package/dist/defaults/skill/{_legacy/gardener → gardener}/repair-workflow.md +0 -0
- /package/dist/defaults/skill/{_legacy/handover → handover}/SKILL.md +0 -0
- /package/dist/defaults/skill/{_legacy/interview-prep → interview-prep}/SKILL.md +0 -0
- /package/dist/defaults/skill/{_legacy/link-retrofit → link-retrofit}/SKILL.md +0 -0
- /package/dist/defaults/skill/{_legacy/restore-environment → restore-environment}/SKILL.md +0 -0
- /package/dist/defaults/skill/{_legacy/scorecard-synthesis → scorecard-synthesis}/SKILL.md +0 -0
- /package/dist/defaults/skill/{_legacy/skill-generator → skill-generator}/testing-protocol.md +0 -0
- /package/dist/defaults/skill/{_legacy/system-init → system-init}/SKILL.md +0 -0
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: context-discovery
|
|
3
|
+
description: Use when a skill needs Thoth KB context (identity, stakeholders, projects) and it hasn't been discovered yet this session. Called automatically by morning-boot and other context-dependent skills.
|
|
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 by other skills, not directly by user.
|
|
12
|
+
-->
|
|
13
|
+
|
|
14
|
+
# Context Discovery
|
|
15
|
+
|
|
16
|
+
**Core principle:** Find the Thoth KB and extract context needed for skills to operate, adapting to the actual file structure rather than assuming an ideal one.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## When to Use
|
|
21
|
+
|
|
22
|
+
- Morning-boot or other skills need user context (email, stakeholders)
|
|
23
|
+
- Running from unknown directory and need to find KB root
|
|
24
|
+
- Context hasn't been discovered yet this session
|
|
25
|
+
- User asks "where is my knowledge base"
|
|
26
|
+
|
|
27
|
+
**Do NOT use when:**
|
|
28
|
+
- Context is already cached in session
|
|
29
|
+
- User explicitly provides context (email, etc.)
|
|
30
|
+
- Running a skill that doesn't need KB context
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Quick Reference
|
|
35
|
+
|
|
36
|
+
| Task | How |
|
|
37
|
+
|------|-----|
|
|
38
|
+
| Find KB root | Check config → walk up for markers → check siblings |
|
|
39
|
+
| Determine hemisphere | Parse CWD path for `/work/`, `/life/`, `/coding/` |
|
|
40
|
+
| Find email | Read `{hemisphere}/AGENTS.md`, extract from MCP config table |
|
|
41
|
+
| Find stakeholders | Check `{hemisphere}/Stakeholders/_index.md` or `{hemisphere}/people/_index.md` |
|
|
42
|
+
| Cache results | Store in `.thoth-state/context.json` for session reuse |
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Discovery Algorithm
|
|
47
|
+
|
|
48
|
+
### Step 1: Check Explicit Config (Fastest)
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
Check: ~/.config/opencode/thoth.json
|
|
52
|
+
Look for: { "kb_root": "/path/to/thoth-kb" }
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
If found, use this path directly. Skip walk-up.
|
|
56
|
+
|
|
57
|
+
### Step 2: Walk Up for Markers
|
|
58
|
+
|
|
59
|
+
Starting from CWD, check each parent directory for:
|
|
60
|
+
|
|
61
|
+
| Marker | Priority | Indicates |
|
|
62
|
+
|--------|----------|-----------|
|
|
63
|
+
| `.opencode/thoth.json` with `"type": "thoth-kb"` | 1 (best) | Explicit KB marker |
|
|
64
|
+
| `.thoth-root` file | 2 | Simple marker file |
|
|
65
|
+
| `kernel/` + `work/` + `life/` directories | 3 | Structure-based detection |
|
|
66
|
+
|
|
67
|
+
Stop at first match. That's the KB root.
|
|
68
|
+
|
|
69
|
+
### Step 3: Check Siblings (If Walk-Up Fails)
|
|
70
|
+
|
|
71
|
+
If in a development directory (like `thoth-core`), check sibling directories:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
ls .. | grep -E "(thoth-kb|kb)"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Look for directories containing `kernel/` or `.opencode/thoth.json`.
|
|
78
|
+
|
|
79
|
+
### Step 4: Determine Hemisphere
|
|
80
|
+
|
|
81
|
+
Analyze CWD path:
|
|
82
|
+
|
|
83
|
+
| Path Contains | Hemisphere |
|
|
84
|
+
|---------------|------------|
|
|
85
|
+
| `/work/` | work |
|
|
86
|
+
| `/life/` | life |
|
|
87
|
+
| `/coding/` | coding |
|
|
88
|
+
| `/kernel/` | kernel |
|
|
89
|
+
| None of above | unknown |
|
|
90
|
+
|
|
91
|
+
If hemisphere is `unknown` and KB root was found, default based on context:
|
|
92
|
+
- Morning boot → default to `work`
|
|
93
|
+
- Or ask user which hemisphere
|
|
94
|
+
|
|
95
|
+
### Step 5: Extract Identity
|
|
96
|
+
|
|
97
|
+
Read `{kb_root}/{hemisphere}/AGENTS.md` and find the MCP configuration table:
|
|
98
|
+
|
|
99
|
+
```markdown
|
|
100
|
+
## MCP Tool Configuration
|
|
101
|
+
|
|
102
|
+
| MCP Server | Required Parameter | Value |
|
|
103
|
+
|------------|-------------------|-------|
|
|
104
|
+
| google-workspace | user_google_email | user@example.com |
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Extract `user_google_email` value.
|
|
108
|
+
|
|
109
|
+
**Fallback locations:**
|
|
110
|
+
1. `{hemisphere}/AGENTS.md` MCP table (preferred)
|
|
111
|
+
2. `{hemisphere}/digital-identity.md`
|
|
112
|
+
3. `{hemisphere}/_identity.md`
|
|
113
|
+
4. `kernel/config/identity.md`
|
|
114
|
+
|
|
115
|
+
### Step 6: Locate Stakeholders
|
|
116
|
+
|
|
117
|
+
Check in order (use first that exists):
|
|
118
|
+
1. `{kb_root}/{hemisphere}/Stakeholders/_index.md`
|
|
119
|
+
2. `{kb_root}/{hemisphere}/people/_index.md`
|
|
120
|
+
3. `{kb_root}/{hemisphere}/Team/_index.md` (for direct reports)
|
|
121
|
+
|
|
122
|
+
### Step 7: Build Context Object
|
|
123
|
+
|
|
124
|
+
```json
|
|
125
|
+
{
|
|
126
|
+
"kb_root": "/path/to/thoth-kb",
|
|
127
|
+
"hemisphere": "work",
|
|
128
|
+
"identity": {
|
|
129
|
+
"email": "user@example.com",
|
|
130
|
+
"source": "work/AGENTS.md"
|
|
131
|
+
},
|
|
132
|
+
"stakeholders": {
|
|
133
|
+
"path": "work/Stakeholders/_index.md",
|
|
134
|
+
"count": 32
|
|
135
|
+
},
|
|
136
|
+
"projects": {
|
|
137
|
+
"path": "work/projects/_index.md"
|
|
138
|
+
},
|
|
139
|
+
"ready": true,
|
|
140
|
+
"missing": []
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Step 8: Cache Results
|
|
145
|
+
|
|
146
|
+
Write to `.thoth-state/context.json` in KB root for session reuse.
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Output Format
|
|
151
|
+
|
|
152
|
+
Return a structured context object:
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
CONTEXT DISCOVERY RESULT
|
|
156
|
+
========================
|
|
157
|
+
|
|
158
|
+
KB Root: /path/to/thoth-kb
|
|
159
|
+
Hemisphere: work
|
|
160
|
+
Source: ~/.config/opencode/thoth.json (or walk-up, or sibling)
|
|
161
|
+
|
|
162
|
+
Identity:
|
|
163
|
+
Email: user@example.com
|
|
164
|
+
Timezone: Europa/Berlin (if found)
|
|
165
|
+
Source: work/AGENTS.md
|
|
166
|
+
|
|
167
|
+
Stakeholders:
|
|
168
|
+
Path: work/Stakeholders/_index.md
|
|
169
|
+
Count: 32 files
|
|
170
|
+
|
|
171
|
+
Projects:
|
|
172
|
+
Path: work/projects/_index.md
|
|
173
|
+
|
|
174
|
+
Ready: YES
|
|
175
|
+
Missing Required: (none)
|
|
176
|
+
Missing Optional: [timezone]
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
If discovery fails:
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
CONTEXT DISCOVERY FAILED
|
|
183
|
+
========================
|
|
184
|
+
|
|
185
|
+
KB Root: NOT FOUND
|
|
186
|
+
Searched:
|
|
187
|
+
- ~/.config/opencode/thoth.json: not found
|
|
188
|
+
- Walk-up from /current/path: no markers found
|
|
189
|
+
- Siblings: no thoth-kb found
|
|
190
|
+
|
|
191
|
+
Action Required: Run context-onboarding to set up KB
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## Common Mistakes
|
|
197
|
+
|
|
198
|
+
| Mistake | Prevention |
|
|
199
|
+
|---------|------------|
|
|
200
|
+
| Assuming fixed file paths | Always use discovery algorithm, never hardcode |
|
|
201
|
+
| Not checking config file first | Config is fastest path, always check first |
|
|
202
|
+
| Stopping at first `kernel/` found | Verify it's a real KB (has work/ or life/ too) |
|
|
203
|
+
| Parsing AGENTS.md wrong | Look for MCP table specifically, not general content |
|
|
204
|
+
| Not caching results | Always cache to `.thoth-state/context.json` |
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## Red Flags - STOP
|
|
209
|
+
|
|
210
|
+
- Hardcoding `/Users/username/...` paths
|
|
211
|
+
- Assuming `_identity.md` exists (it often doesn't)
|
|
212
|
+
- Not handling "hemisphere unknown" case
|
|
213
|
+
- Returning partial results without `ready: false` flag
|
|
214
|
+
- Not reporting what's missing when discovery fails
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## Verification Checklist
|
|
219
|
+
|
|
220
|
+
- [ ] Can find KB when running from KB root
|
|
221
|
+
- [ ] Can find KB when running from hemisphere subdirectory
|
|
222
|
+
- [ ] Can find KB when running from sibling directory (e.g., thoth-core)
|
|
223
|
+
- [ ] Correctly extracts email from AGENTS.md MCP table
|
|
224
|
+
- [ ] Reports missing files clearly when KB incomplete
|
|
225
|
+
- [ ] Caches results for session reuse
|
|
226
|
+
- [ ] Works for new user with no KB (reports failure, suggests onboarding)
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## Integration
|
|
231
|
+
|
|
232
|
+
Other skills call discovery like this:
|
|
233
|
+
|
|
234
|
+
```prose
|
|
235
|
+
# In morning-boot.prose
|
|
236
|
+
|
|
237
|
+
# Check for cached context
|
|
238
|
+
let cached = session "Read .thoth-state/context.json if exists and fresh"
|
|
239
|
+
|
|
240
|
+
if **no cached context or stale**:
|
|
241
|
+
let context = do context-discovery
|
|
242
|
+
|
|
243
|
+
if **context.ready is false**:
|
|
244
|
+
do context-onboarding
|
|
245
|
+
let context = do context-discovery # retry
|
|
246
|
+
|
|
247
|
+
# Use context
|
|
248
|
+
let email = context.identity.email
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
*Context Discovery v1.0 | Part of Thoth Skill System*
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# Context Discovery Test
|
|
2
|
+
# Validates that AI-driven context discovery works reliably
|
|
3
|
+
|
|
4
|
+
# Phase 1: Environment Discovery
|
|
5
|
+
let discovery = session "Discover Thoth KB environment"
|
|
6
|
+
prompt: """
|
|
7
|
+
You are testing context discovery for Thoth skills.
|
|
8
|
+
|
|
9
|
+
Execute these steps and report findings:
|
|
10
|
+
|
|
11
|
+
## Step 1: Get Current Location
|
|
12
|
+
Run `pwd` to get the current working directory.
|
|
13
|
+
|
|
14
|
+
## Step 2: Find KB Root
|
|
15
|
+
Walk up the directory tree looking for markers:
|
|
16
|
+
- `.thoth-root` file (preferred marker)
|
|
17
|
+
- `.opencode/` directory with thoth configuration
|
|
18
|
+
- `kernel/` directory (thoth-kb convention)
|
|
19
|
+
|
|
20
|
+
For each parent directory up to filesystem root, check if these exist.
|
|
21
|
+
Stop when you find a marker.
|
|
22
|
+
|
|
23
|
+
## Step 3: Determine Hemisphere
|
|
24
|
+
Look at the CWD path:
|
|
25
|
+
- If path contains `/work/` → hemisphere is "work"
|
|
26
|
+
- If path contains `/life/` → hemisphere is "life"
|
|
27
|
+
- If path contains `/coding/` → hemisphere is "coding"
|
|
28
|
+
- Otherwise → hemisphere is "unknown"
|
|
29
|
+
|
|
30
|
+
## Step 4: Locate Identity Files
|
|
31
|
+
If KB root was found, check for these files (report exists: true/false):
|
|
32
|
+
- `{root}/work/_identity.md`
|
|
33
|
+
- `{root}/life/_identity.md`
|
|
34
|
+
- `{root}/kernel/config/identity.md` (fallback)
|
|
35
|
+
|
|
36
|
+
## Step 5: Locate Stakeholder Files
|
|
37
|
+
Check for:
|
|
38
|
+
- `{root}/work/people/_index.md`
|
|
39
|
+
- `{root}/life/people/_index.md`
|
|
40
|
+
|
|
41
|
+
## Report Format
|
|
42
|
+
|
|
43
|
+
Return a structured report:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
DISCOVERY REPORT
|
|
47
|
+
================
|
|
48
|
+
|
|
49
|
+
Current Directory: /path/to/cwd
|
|
50
|
+
|
|
51
|
+
KB Root Search:
|
|
52
|
+
- Checked: /path/to/cwd → no markers
|
|
53
|
+
- Checked: /path/to/parent → found .thoth-root
|
|
54
|
+
- KB Root: /path/to/thoth-kb (or NOT FOUND)
|
|
55
|
+
|
|
56
|
+
Hemisphere Detection:
|
|
57
|
+
- Path analysis: contains "/work/"
|
|
58
|
+
- Detected: work (or life, coding, unknown)
|
|
59
|
+
|
|
60
|
+
Identity Files:
|
|
61
|
+
- work/_identity.md: EXISTS / MISSING
|
|
62
|
+
- life/_identity.md: EXISTS / MISSING
|
|
63
|
+
- kernel/config/identity.md: EXISTS / MISSING
|
|
64
|
+
- Recommended: {path to use}
|
|
65
|
+
|
|
66
|
+
Stakeholder Files:
|
|
67
|
+
- work/people/_index.md: EXISTS / MISSING
|
|
68
|
+
- life/people/_index.md: EXISTS / MISSING
|
|
69
|
+
|
|
70
|
+
Ready Status:
|
|
71
|
+
- Can run morning boot: YES / NO
|
|
72
|
+
- Missing required: [list of missing files]
|
|
73
|
+
- Missing optional: [list of missing files]
|
|
74
|
+
```
|
|
75
|
+
"""
|
|
76
|
+
|
|
77
|
+
# Phase 2: Validate Discovery
|
|
78
|
+
session "Analyze discovery results"
|
|
79
|
+
prompt: """
|
|
80
|
+
Based on the discovery results above, answer:
|
|
81
|
+
|
|
82
|
+
1. **Discovery Reliability**: Did the walk-up algorithm successfully
|
|
83
|
+
find the KB root? Was the hemisphere correctly inferred?
|
|
84
|
+
|
|
85
|
+
2. **File Resolution**: Were identity and stakeholder files found
|
|
86
|
+
where expected? Any surprises?
|
|
87
|
+
|
|
88
|
+
3. **Readiness Assessment**: Could the morning boot skill run with
|
|
89
|
+
the discovered context? What's missing?
|
|
90
|
+
|
|
91
|
+
4. **Edge Cases Identified**: Any issues with the discovery approach
|
|
92
|
+
that would need handling?
|
|
93
|
+
|
|
94
|
+
5. **Recommendations**: Suggestions to improve the discovery pattern.
|
|
95
|
+
|
|
96
|
+
Be specific and actionable.
|
|
97
|
+
"""
|
|
98
|
+
context: discovery
|
|
99
|
+
|
|
100
|
+
# Phase 3: Simulate Morning Boot Context Loading
|
|
101
|
+
if **KB root was found and identity file exists**:
|
|
102
|
+
let identity = session "Load identity file"
|
|
103
|
+
prompt: """
|
|
104
|
+
Read the identity file that was discovered (the recommended one
|
|
105
|
+
from the discovery report).
|
|
106
|
+
|
|
107
|
+
Extract:
|
|
108
|
+
- Email address
|
|
109
|
+
- Timezone
|
|
110
|
+
- Any other identity context
|
|
111
|
+
|
|
112
|
+
Report what you found.
|
|
113
|
+
"""
|
|
114
|
+
context: discovery
|
|
115
|
+
|
|
116
|
+
session "Validate identity is usable"
|
|
117
|
+
prompt: """
|
|
118
|
+
The identity file was loaded. Validate:
|
|
119
|
+
|
|
120
|
+
1. Is there an email address we can use for Gmail/Calendar APIs?
|
|
121
|
+
2. Is there a timezone for scheduling context?
|
|
122
|
+
3. Is the format parseable and consistent?
|
|
123
|
+
|
|
124
|
+
Report whether this identity context is sufficient for morning boot.
|
|
125
|
+
"""
|
|
126
|
+
context: identity
|
|
127
|
+
|
|
128
|
+
else:
|
|
129
|
+
session "Guide user to set up identity"
|
|
130
|
+
prompt: """
|
|
131
|
+
No usable KB root or identity file was found.
|
|
132
|
+
|
|
133
|
+
Guide the user to set this up:
|
|
134
|
+
|
|
135
|
+
1. Explain what's needed (a thoth-kb with identity file)
|
|
136
|
+
2. Show them the expected structure
|
|
137
|
+
3. Offer to create a starter identity file if they provide:
|
|
138
|
+
- Their email address
|
|
139
|
+
- Their timezone
|
|
140
|
+
|
|
141
|
+
Be helpful and specific about file locations.
|
|
142
|
+
"""
|
|
143
|
+
context: discovery
|