@ghostpaw/questlog 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,807 @@
1
+ #!/usr/bin/env node
2
+ import { questlogMcpInstructions } from './chunk-SVWAEAKC.js';
3
+ import { reviewQuestlogTool, questlogSurfaceTools } from './chunk-3Y5F3SMB.js';
4
+
5
+ // src/skills/skill_types.ts
6
+ function defineQuestlogSkill(skill) {
7
+ return skill;
8
+ }
9
+
10
+ // src/skills/archive-delete-and-prune.ts
11
+ var archiveDeleteAndPruneSkill = defineQuestlogSkill({
12
+ name: "archive-delete-and-prune",
13
+ description: "Choose the right retirement action for each kind of work so history stays honest and hiding does not get confused with archival or terminal execution truth.",
14
+ content: `# Archive Delete And Prune
15
+
16
+ Primary tools:
17
+ - \`shape_work\`
18
+ - \`organize_work\`
19
+ - \`manage_repeatable\`
20
+ - \`retire_work\`
21
+ - \`run_quest\`
22
+
23
+ Steps:
24
+ 1. Use \`shape_work\` to dismiss rumors when intake should be retired without becoming committed work.
25
+ 2. Use \`organize_work\` to archive questlines when the arc is complete but should remain visible as retired structure.
26
+ 3. Use \`manage_repeatable\` to archive repeatable definitions when they should stop spawning future work.
27
+ 4. Use \`retire_work\` to hide items when they should disappear from active operation while preserving history.
28
+ 5. Use \`run_quest\` to abandon real committed work instead of hiding it when the truthful record is that the work ended unsuccessfully.
29
+
30
+ Outcome handling:
31
+ - Treat \`success\` as confirmation that the right retirement path happened.
32
+ - Treat \`no_op\` from repeated hide as confirmation that the item is already retired that way.
33
+ - Treat \`error\` as a sign that the target or retirement mode is wrong.
34
+
35
+ Failure handling:
36
+ - Do not soft-hide committed execution work just to make dashboards look tidy.
37
+ - Do not confuse archive with hide.
38
+ - Do not use \`manage_repeatable\` for hiding repeatables now that \`retire_work\` is the canonical hide path.`
39
+ });
40
+
41
+ // src/skills/choose-work-shape.ts
42
+ var chooseWorkShapeSkill = defineQuestlogSkill({
43
+ name: "choose-work-shape",
44
+ description: "Choose the right structure for new work by separating uncertainty, one-shot execution, multi-step arcs, and recurring patterns.",
45
+ content: `# Choose Work Shape
46
+
47
+ Primary tools:
48
+ - \`capture_rumor\`
49
+ - \`shape_work\`
50
+ - \`manage_repeatable\`
51
+ - \`inspect_questlog_item\`
52
+
53
+ Steps:
54
+ 1. Use \`capture_rumor\` when the work is still uncertain, interpretive, or politically fuzzy.
55
+ 2. Use \`shape_work\` with \`create_quest\` when there is one concrete executable step with one honest objective.
56
+ 3. Use \`shape_work\` with \`create_questline\` when several related quests need shared initiative context.
57
+ 4. Use \`manage_repeatable\` with \`create\` when the work is a cadence that should spawn fresh quests over time.
58
+ 5. Use \`shape_work\` with \`settle_rumor\` when a rumor is ready to graduate into committed quest or questline structure.
59
+ 6. Use \`inspect_questlog_item\` after creation when you need to confirm the chosen shape before planning or execution.
60
+
61
+ Outcome handling:
62
+ - Treat \`success\` as confirmation that the chosen shape now exists in the system.
63
+ - Treat \`needs_clarification\` as a sign that the shape choice is still incomplete and should not be guessed.
64
+ - Treat \`error\` as a sign that the requested shape or inputs are invalid as entered.
65
+
66
+ Failure handling:
67
+ - If the work feels both vague and actionable, keep it as a rumor until one executable step is truly obvious.
68
+ - Do not create a repeatable just because something happened twice.
69
+ - Do not force a questline when one real quest would be enough.`
70
+ });
71
+
72
+ // src/skills/clarify-ambiguous-requests.ts
73
+ var clarifyAmbiguousRequestsSkill = defineQuestlogSkill({
74
+ name: "clarify-ambiguous-requests",
75
+ description: "Treat ambiguity as a real state, capture uncertainty honestly, and only commit work structure once the next executable shape is clear.",
76
+ content: `# Clarify Ambiguous Requests
77
+
78
+ Primary tools:
79
+ - \`capture_rumor\`
80
+ - \`search_questlog\`
81
+ - \`inspect_questlog_item\`
82
+ - \`shape_work\`
83
+
84
+ Steps:
85
+ 1. If the request is still ambiguous, use \`capture_rumor\` instead of forcing it into a quest too early.
86
+ 2. Use \`search_questlog\` when the ambiguity might really be duplicate or overlapping work instead of net-new intake.
87
+ 3. Use \`inspect_questlog_item\` when you need the exact current state of the intake item before deciding how to commit it.
88
+ 4. Once the missing outcome or structure is clear, use \`shape_work\` with the smallest honest action: \`create_quest\`, \`create_questline\`, or \`settle_rumor\`.
89
+ 5. If \`shape_work\` returns \`needs_clarification\`, answer the missing branch choice before retrying. Do not guess between quests and questlines.
90
+
91
+ Outcome handling:
92
+ - Treat \`success\` as a valid clarification milestone or committed structure change.
93
+ - Treat \`needs_clarification\` as expected when the system can see that the request is valid in spirit but still underdetermined.
94
+ - Treat \`error\` as a real contract or state problem that must be repaired before continuing.
95
+
96
+ Failure handling:
97
+ - If someone wants speed without clarity, record the uncertainty as intake and move forward honestly.
98
+ - If several plausible existing items match, stop at clarification instead of choosing one silently.
99
+ - Do not fabricate a crisp quest objective just to make the system look tidy.`
100
+ });
101
+
102
+ // src/skills/close-work-and-claim-outcomes.ts
103
+ var closeWorkAndClaimOutcomesSkill = defineQuestlogSkill({
104
+ name: "close-work-and-claim-outcomes",
105
+ description: "Close work with the correct terminal lifecycle action, then handle any concrete reward claim as a separate explicit step.",
106
+ content: `# Close Work And Claim Outcomes
107
+
108
+ Primary tools:
109
+ - \`run_quest\`
110
+ - \`reward_work\`
111
+ - \`review_questlog\`
112
+ - \`inspect_questlog_item\`
113
+
114
+ Steps:
115
+ 1. Use \`run_quest\` with the correct terminal action: \`finish\` for successful completion or \`abandon\` when the work did not land.
116
+ 2. Use \`inspect_questlog_item\` or \`review_questlog\` when you need to confirm the exact post-resolution state.
117
+ 3. If rewards exist, use \`reward_work\` with \`action: "claim"\` as a separate follow-up step.
118
+ 4. Accept \`no_op\` on repeated reward claim as confirmation that the outcome was already claimed.
119
+
120
+ Outcome handling:
121
+ - Treat \`success\` as a real terminal lifecycle step or reward claim.
122
+ - Treat \`no_op\` on claim as valid confirmation, not as a failure.
123
+ - Treat \`error\` as a real invalid-state problem that needs diagnosis before retrying.
124
+
125
+ Failure handling:
126
+ - Do not treat quest finish and reward claim as one hidden operation.
127
+ - Do not leave reward claim ambiguous after successful closure when the reward matters.
128
+ - Do not close work with a fake success outcome when it should be abandoned instead.`
129
+ });
130
+
131
+ // src/skills/create-concrete-quest.ts
132
+ var createConcreteQuestSkill = defineQuestlogSkill({
133
+ name: "create-concrete-quest",
134
+ description: "Create real, bounded executable quests only when the objective is concrete enough to execute without interpretive guesswork.",
135
+ content: `# Create Concrete Quest
136
+
137
+ Primary tools:
138
+ - \`shape_work\`
139
+ - \`inspect_questlog_item\`
140
+ - \`plan_quest\`
141
+
142
+ Steps:
143
+ 1. Use \`shape_work\` with \`action: "create_quest"\` only when there is one clear executable objective.
144
+ 2. Put shared arc context in a questline, not inside a bloated quest objective.
145
+ 3. Use \`inspect_questlog_item\` after creation when you need to confirm the exact quest detail that was created.
146
+ 4. Use \`plan_quest\` later for timing or estimate refinement instead of overloading creation with every downstream decision.
147
+
148
+ Outcome handling:
149
+ - Treat \`success\` as confirmation that a concrete quest now exists.
150
+ - Treat \`error\` as a sign that the requested quest input is invalid and should be repaired before retrying.
151
+
152
+ Failure handling:
153
+ - If the objective still needs interpretation, go back to intake or clarification instead of creating the quest.
154
+ - If the work is really multi-step, use questline structure instead of one overloaded quest.
155
+ - Do not create a quest whose title and objective hide uncertainty.`
156
+ });
157
+
158
+ // src/skills/detect-slips-and-staleness.ts
159
+ var detectSlipsAndStalenessSkill = defineQuestlogSkill({
160
+ name: "detect-slips-and-staleness",
161
+ description: "Detect work that is slipping or going stale by reading overdue, deferred, in-progress, and related operational views before choosing one recovery move.",
162
+ content: `# Detect Slips And Staleness
163
+
164
+ Primary tools:
165
+ - \`review_questlog\`
166
+ - \`inspect_questlog_item\`
167
+ - \`plan_quest\`
168
+ - \`run_quest\`
169
+
170
+ Steps:
171
+ 1. Use \`review_questlog\` to look at overdue, due-soon, deferred, in-progress, or missed-scheduled views.
172
+ 2. Use \`inspect_questlog_item\` when one slipping item needs exact diagnosis before action.
173
+ 3. If the problem is timing drift, use \`plan_quest\` to repair the planning state.
174
+ 4. If the problem is execution drift, use \`run_quest\` for the next real lifecycle move.
175
+
176
+ Outcome handling:
177
+ - Treat empty stale-work views as valid \`success\`.
178
+ - Treat \`error\` as a bad view or filter choice, not as evidence that the work is healthy.
179
+
180
+ Failure handling:
181
+ - Do not call work healthy just because it is still open.
182
+ - Do not change timing blindly before you inspect the exact item.
183
+ - Do not assume a stale item is blocked; diagnose it first.`
184
+ });
185
+
186
+ // src/skills/escalate-and-unblock.ts
187
+ var escalateAndUnblockSkill = defineQuestlogSkill({
188
+ name: "escalate-and-unblock",
189
+ description: "Diagnose blockers honestly, then remove or realign hard gates when the model is wrong instead of treating every delay as generic escalation theater.",
190
+ content: `# Escalate And Unblock
191
+
192
+ Primary tools:
193
+ - \`review_questlog\`
194
+ - \`inspect_questlog_item\`
195
+ - \`organize_work\`
196
+ - \`plan_quest\`
197
+
198
+ Steps:
199
+ 1. Use \`review_questlog\` to confirm whether work is actually blocked.
200
+ 2. Use \`inspect_questlog_item\` to diagnose the exact blocker on the affected quest.
201
+ 3. If the unlock graph is wrong, use \`organize_work\` to remove or replace the blocker set.
202
+ 4. If the work is not truly blocked, use planning changes instead of fake escalation language.
203
+
204
+ Outcome handling:
205
+ - Treat \`success\` as a real unblock step.
206
+ - Treat \`error\` as a structural issue that still needs diagnosis.
207
+
208
+ Failure handling:
209
+ - Do not call work blocked when it is only unclear or underspecified.
210
+ - Do not leave a quest in the blocked state after the model has changed.
211
+ - Do not remove prerequisites casually; inspect before unblocking.`
212
+ });
213
+
214
+ // src/skills/frame-initiative-questline.ts
215
+ var frameInitiativeQuestlineSkill = defineQuestlogSkill({
216
+ name: "frame-initiative-questline",
217
+ description: "Use questlines for shared initiative context, then attach concrete quests and maintain the structure without confusing one quest with one arc.",
218
+ content: `# Frame Initiative Questline
219
+
220
+ Primary tools:
221
+ - \`shape_work\`
222
+ - \`organize_work\`
223
+ - \`review_questlog\`
224
+ - \`inspect_questlog_item\`
225
+
226
+ Steps:
227
+ 1. Use \`shape_work\` with \`create_questline\` when several related quests need one umbrella initiative.
228
+ 2. Use \`shape_work\` with \`attach_quest_to_questline\` or \`detach_quest_from_questline\` to place concrete quests correctly inside the initiative.
229
+ 3. Use \`organize_work\` to update questline fields or archive the questline once the arc is truly retired.
230
+ 4. Use \`review_questlog\` and \`inspect_questlog_item\` to verify the initiative health and exact structure.
231
+
232
+ Outcome handling:
233
+ - Treat \`success\` as a real questline or membership change.
234
+ - Treat \`no_op\` as confirmation that the quest was already attached or detached as requested.
235
+ - Treat \`error\` as a sign that the target ids or structural state are invalid.
236
+
237
+ Failure handling:
238
+ - Do not create a questline for one isolated executable task.
239
+ - Do not leave membership implied; attach or detach quests explicitly.
240
+ - Do not archive a questline just to hide active work that still matters.`
241
+ });
242
+
243
+ // src/skills/handle-exceptions-and-weird-cases.ts
244
+ var handleExceptionsAndWeirdCasesSkill = defineQuestlogSkill({
245
+ name: "handle-exceptions-and-weird-cases",
246
+ description: "Handle weird cases by diagnosing the actual tool outcome, routing into clarification or recovery when needed, and refusing to fake a clean normal-state story.",
247
+ content: `# Handle Exceptions And Weird Cases
248
+
249
+ Primary tools:
250
+ - \`inspect_questlog_item\`
251
+ - \`search_questlog\`
252
+ - \`review_questlog\`
253
+ - then the nearest corrective tool such as \`shape_work\`, \`organize_work\`, \`plan_quest\`, or \`run_quest\`
254
+
255
+ Steps:
256
+ 1. Start with diagnosis, not mutation. Use \`inspect_questlog_item\`, \`search_questlog\`, or \`review_questlog\` depending on what is actually unknown.
257
+ 2. If the tool returns \`needs_clarification\`, stop and answer the missing branch instead of guessing.
258
+ 3. If the tool returns \`error\`, read the recovery guidance and choose the next corrective tool deliberately.
259
+ 4. Only mutate state after the weird case has been made specific enough to model honestly.
260
+
261
+ Outcome handling:
262
+ - Treat \`success\` as a real answer, even if that answer is an empty review view.
263
+ - Treat \`no_op\` as signal that the requested change was already true.
264
+ - Treat \`needs_clarification\` as expected when the system can enumerate the ambiguity safely.
265
+ - Treat \`error\` as a structured boundary, not as a cue to improvise around the rules.
266
+
267
+ Failure handling:
268
+ - Do not force a weird case into a fake normal flow just to keep moving.
269
+ - Do not guess among multiple plausible targets.
270
+ - Do not mutate first and inspect later.`
271
+ });
272
+
273
+ // src/skills/intake-triage.ts
274
+ var intakeTriageSkill = defineQuestlogSkill({
275
+ name: "intake-triage",
276
+ description: "Triage new asks, ideas, and vague incoming work into the right next step without prematurely committing execution structure.",
277
+ content: `# Intake Triage
278
+
279
+ Primary tools:
280
+ - \`search_questlog\`
281
+ - \`capture_rumor\`
282
+ - \`inspect_questlog_item\`
283
+ - \`shape_work\`
284
+
285
+ Steps:
286
+ 1. Start with \`search_questlog\` when the ask might duplicate existing work. Use \`mode: "identify_one"\` when you need one exact target instead of a browse list.
287
+ 2. If the work is still vague, risky, or under-specified, use \`capture_rumor\` with only the minimum facts that explain what arrived and why it matters.
288
+ 3. Use \`inspect_questlog_item\` on the returned rumor id when you need to confirm the intake record before deciding what to do next.
289
+ 4. Use \`shape_work\` for the next honest transition: \`dismiss_rumor\`, \`reopen_rumor\`, or later \`settle_rumor\`.
290
+ 5. If the ask is already clearly executable, hand off to \`shape_work\` with \`create_quest\` or \`create_questline\` instead of letting it rot in intake.
291
+
292
+ Outcome handling:
293
+ - Treat \`success\` as a usable search or intake result.
294
+ - Treat \`no_op\` as confirmation that the rumor is already in the requested state.
295
+ - Treat \`needs_clarification\` from \`search_questlog\` as a stop signal: choose among the returned candidates instead of guessing.
296
+ - Treat \`error\` as a cue to repair the query or target before continuing.
297
+
298
+ Failure handling:
299
+ - If the ask is urgent but unclear, still capture it first instead of inventing execution detail.
300
+ - If similar work already exists, reuse or update that thread instead of creating parallel intake.
301
+ - Do not create a quest just because someone asked for something.`
302
+ });
303
+
304
+ // src/skills/maintain-clear-ownership.ts
305
+ var maintainClearOwnershipSkill = defineQuestlogSkill({
306
+ name: "maintain-clear-ownership",
307
+ description: "Keep ownership explicit through quest content and classification because Questlog does not provide a separate assignee field or ownership tool.",
308
+ content: `# Maintain Clear Ownership
309
+
310
+ Primary tools:
311
+ - \`shape_work\`
312
+ - \`tag_work\`
313
+ - \`inspect_questlog_item\`
314
+ - \`review_questlog\`
315
+
316
+ Steps:
317
+ 1. Use \`shape_work\` to create or settle the real work item with ownership clarity embedded in the title, objective, or narrative details.
318
+ 2. Use \`tag_work\` when a lightweight ownership or team classification tag helps portfolio review.
319
+ 3. Use \`inspect_questlog_item\` to confirm the exact wording and current structure of the owned work.
320
+ 4. Use \`review_questlog\` with tag filters when you need to inspect one ownership slice of the portfolio.
321
+
322
+ Outcome handling:
323
+ - Treat \`success\` as confirmation that the ownership signal is now present in real work structure or classification.
324
+ - Treat \`no_op\` as confirmation that the ownership tag or state was already present.
325
+
326
+ Failure handling:
327
+ - Do not invent an assignee field that the system does not have.
328
+ - Do not hide unclear ownership behind generic task wording.
329
+ - Do not treat tags as a substitute for writing a clear objective or context.`
330
+ });
331
+
332
+ // src/skills/manage-approvals-and-promises.ts
333
+ var manageApprovalsAndPromisesSkill = defineQuestlogSkill({
334
+ name: "manage-approvals-and-promises",
335
+ description: "Treat approvals and commitments as modeled work with timing and dependencies instead of burying them as vague narrative promises.",
336
+ content: `# Manage Approvals And Promises
337
+
338
+ Primary tools:
339
+ - \`shape_work\`
340
+ - \`organize_work\`
341
+ - \`plan_quest\`
342
+ - \`review_questlog\`
343
+
344
+ Steps:
345
+ 1. Model the approval step as a concrete quest instead of a hidden note.
346
+ 2. Model dependent execution work separately and connect it with \`organize_work\` unlocks when the approval is a hard prerequisite.
347
+ 3. Use \`plan_quest\` to record the real timing pressure on the approval and the dependent work.
348
+ 4. Use \`review_questlog\` to confirm which approval work is blocked, due soon, or overdue.
349
+
350
+ Outcome handling:
351
+ - Treat \`success\` as confirmation that the promise is now visible in real work structure.
352
+ - Treat blocked review results as a truth to manage, not as an inconvenience to hide.
353
+
354
+ Failure handling:
355
+ - Do not bury approvals inside another quest objective.
356
+ - Do not pretend a promise is safe if the approval quest is already overdue.
357
+ - Do not skip the unlock when the downstream work truly cannot start yet.`
358
+ });
359
+
360
+ // src/skills/plan-successor-work.ts
361
+ var planSuccessorWorkSkill = defineQuestlogSkill({
362
+ name: "plan-successor-work",
363
+ description: "Create explicit successor work after closure by spawning follow-ups or shaping new work, while keeping uncertain next steps in intake instead of faking certainty.",
364
+ content: `# Plan Successor Work
365
+
366
+ Primary tools:
367
+ - \`run_quest\`
368
+ - \`shape_work\`
369
+ - \`capture_rumor\`
370
+ - \`inspect_questlog_item\`
371
+
372
+ Steps:
373
+ 1. If successor work is already clear at abandonment time, use \`run_quest\` with \`action: "abandon_and_spawn_followups"\`.
374
+ 2. If the current quest should finish cleanly before successor work is created, use \`run_quest\` first and then use \`shape_work\` for the new quest or questline.
375
+ 3. If the next step is still fuzzy, use \`capture_rumor\` instead of inventing a fake follow-up.
376
+ 4. Use \`inspect_questlog_item\` on spawned or newly created work when you need to confirm the handoff.
377
+
378
+ Outcome handling:
379
+ - Treat \`success\` as a real successor planning step.
380
+ - Treat \`error\` from empty follow-up spawn requests as a signal to use plain abandon or another honest path instead.
381
+
382
+ Failure handling:
383
+ - Do not abandon-and-spawn with an empty follow-up list.
384
+ - Do not invent successor work when the real next step is still uncertain.
385
+ - Do not leave successor work implied but unmodeled when it is already clearly known.`
386
+ });
387
+
388
+ // src/skills/plan-time-correctly.ts
389
+ var planTimeCorrectlySkill = defineQuestlogSkill({
390
+ name: "plan-time-correctly",
391
+ description: "Use quest planning fields honestly so availability, due pressure, and schedule intent stay meaningful instead of getting collapsed into one generic date.",
392
+ content: `# Plan Time Correctly
393
+
394
+ Primary tools:
395
+ - \`plan_quest\`
396
+ - \`review_questlog\`
397
+ - \`inspect_questlog_item\`
398
+
399
+ Steps:
400
+ 1. Use \`plan_quest\` with \`action: "set_time"\` to change not-before, due, schedule, all-day, or estimate fields.
401
+ 2. Use \`inspect_questlog_item\` when the current timing state needs exact diagnosis before changing it.
402
+ 3. Use \`review_questlog\` to verify the downstream effect in deferred, due-soon, overdue, scheduled-now, or missed-scheduled views.
403
+ 4. If the exact timing request is unchanged, accept the \`no_op\` result instead of forcing meaningless churn.
404
+
405
+ Outcome handling:
406
+ - Treat \`success\` as a real planning change.
407
+ - Treat \`no_op\` as confirmation that the planning state is already correct.
408
+ - Treat \`error\` as conflicting or invalid timing input that must be repaired before retrying.
409
+
410
+ Failure handling:
411
+ - Do not use one date field to mean every kind of timing intent.
412
+ - Do not assume a schedule miss is the same as being overdue.
413
+ - Do not re-plan blindly without first understanding the current quest timing state.`
414
+ });
415
+
416
+ // src/skills/prioritize-across-streams.ts
417
+ var prioritizeAcrossStreamsSkill = defineQuestlogSkill({
418
+ name: "prioritize-across-streams",
419
+ description: "Prioritize across competing work streams by reading real candidate sets, distinguishing available from blocked work, and then reflecting the choice in planning.",
420
+ content: `# Prioritize Across Streams
421
+
422
+ Primary tools:
423
+ - \`review_questlog\`
424
+ - \`inspect_questlog_item\`
425
+ - \`plan_quest\`
426
+
427
+ Steps:
428
+ 1. Use \`review_questlog\` to assemble the real candidate pool: available, blocked, due-soon, overdue, or questline slices.
429
+ 2. Use \`inspect_questlog_item\` on a candidate when the row is not enough to decide.
430
+ 3. Prioritize from the available work, not from blocked wishful thinking.
431
+ 4. Reflect the choice in \`plan_quest\` so the system shows what is actually next.
432
+
433
+ Outcome handling:
434
+ - Treat blocked candidates as real constraints, not as silent ties.
435
+ - Treat empty views as real signal about the current portfolio state.
436
+
437
+ Failure handling:
438
+ - Do not choose blocked work as if it were executable now.
439
+ - Do not pretend a priority decision exists if the candidate pool is still unclear.
440
+ - Do not leave the system unchanged after deciding what should move next.`
441
+ });
442
+
443
+ // src/skills/protect-capacity-and-focus.ts
444
+ var protectCapacityAndFocusSkill = defineQuestlogSkill({
445
+ name: "protect-capacity-and-focus",
446
+ description: "Protect capacity and focus by reading the real in-progress and scheduled-now load, then using planning to rebalance instead of silently overcommitting.",
447
+ content: `# Protect Capacity And Focus
448
+
449
+ Primary tools:
450
+ - \`review_questlog\`
451
+ - \`plan_quest\`
452
+ - \`run_quest\`
453
+
454
+ Steps:
455
+ 1. Use \`review_questlog\` to inspect active, in-progress, scheduled-now, or missed-scheduled load before committing more work.
456
+ 2. If too much is scheduled or active at once, use \`plan_quest\` to rebalance timing instead of pretending everything can move now.
457
+ 3. Use \`run_quest\` only for real execution progress once the load is honest.
458
+
459
+ Outcome handling:
460
+ - Treat dense scheduled-now or in-progress views as real capacity warnings.
461
+ - Treat empty views as signal too; do not manufacture urgency.
462
+
463
+ Failure handling:
464
+ - Do not stack new timing commitments on top of already impossible schedules.
465
+ - Do not use execution updates to hide planning overload.
466
+ - Do not confuse availability with realistic capacity.`
467
+ });
468
+
469
+ // src/skills/recover-from-modeling-mistakes.ts
470
+ var recoverFromModelingMistakesSkill = defineQuestlogSkill({
471
+ name: "recover-from-modeling-mistakes",
472
+ description: "Recover from modeling mistakes by diagnosing the exact current state first, then applying the smallest honest corrective tool instead of rewriting history blindly.",
473
+ content: `# Recover From Modeling Mistakes
474
+
475
+ Primary tools:
476
+ - \`inspect_questlog_item\`
477
+ - \`review_questlog\`
478
+ - \`shape_work\`
479
+ - \`organize_work\`
480
+ - \`plan_quest\`
481
+ - \`retire_work\`
482
+
483
+ Steps:
484
+ 1. Diagnose first with \`inspect_questlog_item\` or the appropriate \`review_questlog\` view.
485
+ 2. Choose the smallest honest fix: re-plan timing, change structure, correct unlocks, archive or hide an item, or reshape successor work.
486
+ 3. Prefer a corrective move that preserves truthful history over one that merely makes the surface look cleaner.
487
+ 4. Re-run inspect or review after the correction to confirm the model now matches reality.
488
+
489
+ Outcome handling:
490
+ - Treat \`success\` as confirmation that the smallest honest correction landed.
491
+ - Treat \`no_op\` as a clue that the model may already match the intended correction.
492
+ - Treat \`error\` as a sign you still have not diagnosed the issue precisely enough.
493
+
494
+ Failure handling:
495
+ - Do not start with mutation before diagnosis.
496
+ - Do not erase real execution history just to hide a modeling error.
497
+ - Do not stack multiple speculative corrections when one targeted fix will do.`
498
+ });
499
+
500
+ // src/skills/report-status-and-manage-expectations.ts
501
+ var reportStatusAndManageExpectationsSkill = defineQuestlogSkill({
502
+ name: "report-status-and-manage-expectations",
503
+ description: "Build status reporting from the real questlog state, separating available, blocked, in-progress, slipping, and resolved work without relying on memory.",
504
+ content: `# Report Status And Manage Expectations
505
+
506
+ Primary tools:
507
+ - \`review_questlog\`
508
+ - \`inspect_questlog_item\`
509
+
510
+ Steps:
511
+ 1. Use \`review_questlog\` to assemble the current slices that matter: available, blocked, in-progress, overdue, resolved, or questlines.
512
+ 2. Use \`inspect_questlog_item\` when one item needs exact detail before you report its state or risk.
513
+ 3. Report what the system actually shows instead of compressing everything into one vague summary.
514
+ 4. If a stakeholder asks about something that is not in the system, say that explicitly and capture or shape it separately instead of bluffing.
515
+
516
+ Outcome handling:
517
+ - Treat empty review views as valid status facts.
518
+ - Treat \`error\` as a bad view or filter contract that must be fixed before reporting.
519
+
520
+ Failure handling:
521
+ - Do not rely on memory when the system can answer directly.
522
+ - Do not call blocked work available just because it is important.
523
+ - Do not merge resolved and reward-unclaimed states into one misleading status line.`
524
+ });
525
+
526
+ // src/skills/revise-or-reshape-commitment.ts
527
+ var reviseOrReshapeCommitmentSkill = defineQuestlogSkill({
528
+ name: "revise-or-reshape-commitment",
529
+ description: "Revise a quest objective before execution starts, but reshape commitments honestly with lifecycle tools once real execution history exists.",
530
+ content: `# Revise Or Reshape Commitment
531
+
532
+ Primary tools:
533
+ - \`inspect_questlog_item\`
534
+ - \`plan_quest\`
535
+ - \`run_quest\`
536
+
537
+ Steps:
538
+ 1. Use \`inspect_questlog_item\` to confirm whether the quest has already started or resolved.
539
+ 2. If the quest has not started, use \`plan_quest\` with \`action: "revise_objective"\` to sharpen the commitment.
540
+ 3. If execution has already started, do not rewrite history. Use \`run_quest\` to finish, abandon, or abandon-and-spawn follow-up work instead.
541
+ 4. Accept \`no_op\` when the requested objective is already the current one.
542
+
543
+ Outcome handling:
544
+ - Treat \`success\` as a valid pre-start revision or honest lifecycle reshape.
545
+ - Treat \`no_op\` as confirmation that the objective already matches.
546
+ - Treat \`error\` from revise-after-start as a rule you should respect, not bypass.
547
+
548
+ Failure handling:
549
+ - Do not revise objective text after real execution has begun.
550
+ - Do not hide a broken commitment with wording changes when the truth is that the work must be abandoned or succeeded by follow-ups.
551
+ - Do not guess whether a quest has started; inspect it first.`
552
+ });
553
+
554
+ // src/skills/run-operational-review.ts
555
+ var runOperationalReviewSkill = defineQuestlogSkill({
556
+ name: "run-operational-review",
557
+ description: "Drive daily or weekly operational review from structured list views, then move from diagnosis into actual planning or execution changes.",
558
+ content: `# Run Operational Review
559
+
560
+ Primary tools:
561
+ - \`review_questlog\`
562
+ - \`inspect_questlog_item\`
563
+ - \`plan_quest\`
564
+ - \`run_quest\`
565
+
566
+ Steps:
567
+ 1. Start with \`review_questlog\` and choose the right operational surface such as available, blocked, deferred, overdue, in-progress, or scheduled views.
568
+ 2. Use \`inspect_questlog_item\` when one row needs a closer read before acting.
569
+ 3. If the review reveals timing drift, use \`plan_quest\` to correct the planning state.
570
+ 4. If the review reveals executable work that should actually move, use \`run_quest\` for lifecycle progress.
571
+ 5. End the review with at least one honest system change when the review uncovered something actionable.
572
+
573
+ Outcome handling:
574
+ - Treat empty review views as valid \`success\`.
575
+ - Treat \`needs_clarification\` as expected when a view like \`quests.scheduled_for_day\` requires a day choice.
576
+ - Treat \`error\` as a sign that the chosen view or filter combination is invalid.
577
+
578
+ Failure handling:
579
+ - Do not substitute search for a structured review surface.
580
+ - Do not stop at observation when the review surfaced a real next action.
581
+ - Do not guess a day-specific schedule view without providing the day.`
582
+ });
583
+
584
+ // src/skills/run-recurring-rhythms.ts
585
+ var runRecurringRhythmsSkill = defineQuestlogSkill({
586
+ name: "run-recurring-rhythms",
587
+ description: "Model recurring work as repeatable definitions that spawn fresh concrete quests over time instead of living forever as one immortal task.",
588
+ content: `# Run Recurring Rhythms
589
+
590
+ Primary tools:
591
+ - \`manage_repeatable\`
592
+ - \`review_questlog\`
593
+ - \`inspect_questlog_item\`
594
+ - \`run_quest\`
595
+
596
+ Steps:
597
+ 1. Use \`manage_repeatable\` with \`action: "create"\` to define the recurring pattern with RRULE and anchor timing.
598
+ 2. Use \`manage_repeatable\` with \`action: "preview_due"\` or \`review_questlog\` with \`view: "repeatables.due_anchors"\` to inspect what is due.
599
+ 3. Use \`manage_repeatable\` with \`action: "spawn_due"\` to materialize real concrete quests.
600
+ 4. Use \`inspect_questlog_item\` or normal execution tools on the spawned quests.
601
+ 5. Use \`manage_repeatable\` with \`action: "update"\` or \`action: "archive"\` to change future behavior honestly.
602
+
603
+ Outcome handling:
604
+ - Treat empty previews as valid \`success\`.
605
+ - Treat empty spawns as a real no-op instead of a failure.
606
+ - Treat \`error\` as a repeatable definition or RRULE problem that needs repair.
607
+
608
+ Failure handling:
609
+ - Do not model recurring work as one permanent open quest.
610
+ - Do not assume repeatables materialize automatically without \`spawn_due\`.
611
+ - Do not rewrite already spawned history when only the future cadence changed.`
612
+ });
613
+
614
+ // src/skills/search-and-retrieve-context.ts
615
+ var searchAndRetrieveContextSkill = defineQuestlogSkill({
616
+ name: "search-and-retrieve-context",
617
+ description: "Find relevant questlog context quickly, then switch from discovery to exact inspection without confusing free-text search with structured review surfaces.",
618
+ content: `# Search And Retrieve Context
619
+
620
+ Primary tools:
621
+ - \`search_questlog\`
622
+ - \`review_questlog\`
623
+ - \`inspect_questlog_item\`
624
+
625
+ Steps:
626
+ 1. Use \`search_questlog\` for free-text discovery across quests and rumors when you do not know the exact id yet.
627
+ 2. Use \`mode: "identify_one"\` when you need one exact target and want the tool to stop at clarification instead of guessing.
628
+ 3. Once you know the item id, switch to \`inspect_questlog_item\` for exact detail.
629
+ 4. If the thing you need is better represented as a structured list or a non-FTS entity kind, use \`review_questlog\` instead of forcing search to do the wrong job.
630
+ 5. Use \`detailLevel: "compact"\` by default and ask for \`detailLevel: "full"\` only when the richer payload is truly needed.
631
+
632
+ Outcome handling:
633
+ - Treat empty \`search_questlog\` results as valid \`success\`, not as proof that nothing relevant exists everywhere.
634
+ - Treat \`needs_clarification\` from identify-one search as a cue to choose a candidate.
635
+ - Treat \`error\` as a malformed query or invalid target problem.
636
+
637
+ Failure handling:
638
+ - Do not assume full-text search covers questlines, repeatable definitions, or every relational angle.
639
+ - Do not keep browsing when you already have an exact item id; inspect it.
640
+ - Do not read large full-detail payloads unless the next decision needs them.`
641
+ });
642
+
643
+ // src/skills/sequence-with-unlocks.ts
644
+ var sequenceWithUnlocksSkill = defineQuestlogSkill({
645
+ name: "sequence-with-unlocks",
646
+ description: "Model hard sequencing with unlocks between concrete quests so blocked and available work stay truthful and reviewable.",
647
+ content: `# Sequence With Unlocks
648
+
649
+ Primary tools:
650
+ - \`organize_work\`
651
+ - \`review_questlog\`
652
+ - \`inspect_questlog_item\`
653
+ - \`shape_work\`
654
+
655
+ Steps:
656
+ 1. Create the concrete quests first, then use \`organize_work\` with \`add_unlock\`, \`remove_unlock\`, or \`replace_unlocks\` to model hard gates.
657
+ 2. Use \`review_questlog\` to confirm the effect in the blocked and available views.
658
+ 3. Use \`inspect_questlog_item\` when the exact unlock graph on one quest needs diagnosis.
659
+ 4. Treat unlocks as hard prerequisites, not as soft notes or labels.
660
+
661
+ Outcome handling:
662
+ - Treat \`success\` as a real unlock graph change.
663
+ - Treat \`no_op\` as confirmation that the blocker set already matched.
664
+ - Treat \`error\` as a real constraint problem such as self-unlock or cycle creation.
665
+
666
+ Failure handling:
667
+ - Do not use unlocks for work that is merely preferred or informative.
668
+ - Do not ignore blocked review results after adding an unlock.
669
+ - Do not force a dependency graph that violates the cycle rules.`
670
+ });
671
+
672
+ // src/skills/settle-rumor-into-structure.ts
673
+ var settleRumorIntoStructureSkill = defineQuestlogSkill({
674
+ name: "settle-rumor-into-structure",
675
+ description: "Turn a ready rumor into committed quest or questline structure without losing provenance or pretending vague intake is settled.",
676
+ content: `# Settle Rumor Into Structure
677
+
678
+ Primary tools:
679
+ - \`capture_rumor\`
680
+ - \`shape_work\`
681
+ - \`inspect_questlog_item\`
682
+ - \`review_questlog\`
683
+
684
+ Steps:
685
+ 1. Use \`capture_rumor\` first if the incoming work is not already tracked as intake.
686
+ 2. When the rumor is ready to graduate, use \`shape_work\` with \`action: "settle_rumor"\`.
687
+ 3. Include the real downstream structure: one or more quest inputs, a questline input, or both.
688
+ 4. If \`shape_work\` returns \`needs_clarification\`, answer the missing structure question before retrying.
689
+ 5. Use \`inspect_questlog_item\` on the rumor or created items when you need to confirm provenance and relationships.
690
+ 6. Use \`review_questlog\` with \`view: "quests.available"\` when you want to verify that the new concrete work is now visible for execution.
691
+
692
+ Outcome handling:
693
+ - Treat \`success\` as a real commitment transition out of intake.
694
+ - Treat \`needs_clarification\` as a normal stop when the downstream structure is still underspecified.
695
+ - Treat \`error\` as a sign that the target or input contract needs repair before settlement can continue.
696
+
697
+ Failure handling:
698
+ - If the rumor is still too vague, do not settle it just to clean up intake.
699
+ - If only one concrete next step is known, create that exact structure instead of inventing a larger arc.
700
+ - Do not leave settled work unverifed; inspect or review the result.`
701
+ });
702
+
703
+ // src/skills/tag-and-filter-portfolios.ts
704
+ var tagAndFilterPortfoliosSkill = defineQuestlogSkill({
705
+ name: "tag-and-filter-portfolios",
706
+ description: "Use tags for cross-cutting classification and portfolio filtering without confusing tags for status, timing, or dependency modeling.",
707
+ content: `# Tag And Filter Portfolios
708
+
709
+ Primary tools:
710
+ - \`tag_work\`
711
+ - \`review_questlog\`
712
+ - \`inspect_questlog_item\`
713
+
714
+ Steps:
715
+ 1. Use \`tag_work\` to add, remove, or replace classification tags on quests and repeatable definitions.
716
+ 2. Use \`review_questlog\` with \`filters.tagNames\` to review one tagged slice of the portfolio.
717
+ 3. Use \`inspect_questlog_item\` when you need the exact detail of a tagged item before changing its classification.
718
+
719
+ Outcome handling:
720
+ - Treat \`success\` as confirmation that the target now has the intended tag set.
721
+ - Treat \`no_op\` as confirmation that the requested tag state already existed.
722
+ - Treat \`error\` as an invalid target or unsupported action problem.
723
+
724
+ Failure handling:
725
+ - Do not use tags to fake lifecycle state or prerequisites.
726
+ - Do not ignore no-op tag responses; they often tell you the portfolio is already classified correctly.
727
+ - Do not filter by tags and assume that is the same as a schedule or dependency review.`
728
+ });
729
+
730
+ // src/skills/skill_registry.ts
731
+ var questlogSkills = [
732
+ archiveDeleteAndPruneSkill,
733
+ chooseWorkShapeSkill,
734
+ clarifyAmbiguousRequestsSkill,
735
+ closeWorkAndClaimOutcomesSkill,
736
+ createConcreteQuestSkill,
737
+ detectSlipsAndStalenessSkill,
738
+ escalateAndUnblockSkill,
739
+ frameInitiativeQuestlineSkill,
740
+ handleExceptionsAndWeirdCasesSkill,
741
+ intakeTriageSkill,
742
+ maintainClearOwnershipSkill,
743
+ manageApprovalsAndPromisesSkill,
744
+ planSuccessorWorkSkill,
745
+ planTimeCorrectlySkill,
746
+ prioritizeAcrossStreamsSkill,
747
+ protectCapacityAndFocusSkill,
748
+ recoverFromModelingMistakesSkill,
749
+ reportStatusAndManageExpectationsSkill,
750
+ reviseOrReshapeCommitmentSkill,
751
+ runOperationalReviewSkill,
752
+ runRecurringRhythmsSkill,
753
+ searchAndRetrieveContextSkill,
754
+ sequenceWithUnlocksSkill,
755
+ settleRumorIntoStructureSkill,
756
+ tagAndFilterPortfoliosSkill
757
+ ];
758
+
759
+ // src/soul.ts
760
+ var questlogSoulTraits = [
761
+ {
762
+ principle: "Store the least committed truth first.",
763
+ provenance: "The worst downstream errors usually start upstream: vague asks are turned into quests, soft ideas become fake deadlines, and half-understood work is treated as fully shaped. Using rumors and clarification before commitment keeps uncertainty where it belongs."
764
+ },
765
+ {
766
+ principle: "Read before you prescribe.",
767
+ provenance: "Many management mistakes are category mistakes: blocked work gets treated as available, missed schedule as overdue, or resolved work as fully closed when follow-through still remains. Reading the derived state first prevents confident but wrong interventions."
768
+ },
769
+ {
770
+ principle: "Protect history when reality changes.",
771
+ provenance: "Once execution starts, rewriting a quest into a different commitment destroys the meaning of the record. Honest finishes, abandonments, and follow-up quests preserve what actually happened and keep later review, planning, and reporting trustworthy."
772
+ },
773
+ {
774
+ principle: "Close the last mile, not just the main work.",
775
+ provenance: "Operational debt often hides in almost-done states: work finished but not claimed, reported, handed off, reviewed, or retired. Treating closure as a real phase prevents stale rewards, lingering initiatives, and misleading progress signals."
776
+ }
777
+ ];
778
+
779
+ // src/surface/questlog_skill_spec.ts
780
+ var questlogSkillSpec = {
781
+ name: "questlog",
782
+ cheatSheet: [
783
+ "`questlog` and `ghostpaw-questlog` are the same binary.",
784
+ "",
785
+ '- `questlog add --title "..." --tag a,b --due tomorrow`',
786
+ `- \`questlog list [--view <view>]\`: ${reviewQuestlogTool.inputSchema.properties?.view?.enum?.join(", ")}.`,
787
+ '- `questlog done <id> --outcome "..."`',
788
+ "- `questlog search <words>`",
789
+ "- `questlog show <id>`",
790
+ "- Use `--json` on any plain command.",
791
+ "- Exit codes: 0 ok / 1 error / 2 usage / 3 needs input.",
792
+ "- Database: `~/.ghostpaw/questlog.db`; override with `--db` or `GHOSTPAW_QUESTLOG_DB`.",
793
+ "- Use one database per agent or project."
794
+ ].join("\n"),
795
+ description: "Manage local tasks, calendar commitments, and recurring work. Use when planning, executing, reviewing, or organizing work.",
796
+ license: "MIT",
797
+ compatibility: "Node.js 24 or newer. MCP stdio or ghostpaw-questlog CLI.",
798
+ bin: "ghostpaw-questlog",
799
+ packageName: "@ghostpaw/questlog",
800
+ server: "ghostpaw-questlog",
801
+ about: questlogMcpInstructions,
802
+ tools: questlogSurfaceTools,
803
+ workflows: questlogSkills,
804
+ principles: questlogSoulTraits.map((trait) => trait.principle)
805
+ };
806
+
807
+ export { questlogSkillSpec };