@rubytech/create-maxy-code 0.1.22 → 0.1.24
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/dist/__tests__/samba-provision.test.js +202 -0
- package/dist/index.js +127 -73
- package/dist/samba-provision.js +215 -0
- package/dist/uninstall.js +160 -3
- package/package.json +1 -1
- package/payload/platform/plugins/admin/PLUGIN.md +4 -0
- package/payload/platform/plugins/admin/skills/admin-user-management/SKILL.md +47 -0
- package/payload/platform/plugins/admin/skills/commitment-followthrough/SKILL.md +60 -0
- package/payload/platform/plugins/admin/skills/file-presentation/SKILL.md +67 -0
- package/payload/platform/plugins/admin/skills/session-management/SKILL.md +62 -0
- package/payload/platform/plugins/deep-research/.claude-plugin/plugin.json +1 -1
- package/payload/platform/plugins/deep-research/PLUGIN.md +7 -1
- package/payload/platform/plugins/deep-research/recipes/README.md +36 -0
- package/payload/platform/plugins/deep-research/skills/academic-verify/SKILL.md +75 -0
- package/payload/platform/plugins/deep-research/skills/book-mirror/SKILL.md +68 -0
- package/payload/platform/plugins/deep-research/skills/data-research/SKILL.md +108 -0
- package/payload/platform/plugins/deep-research/skills/strategic-reading/SKILL.md +69 -0
- package/payload/platform/plugins/docs/references/deployment.md +23 -2
- package/payload/platform/plugins/email/mcp/dist/lib/imap.d.ts +1 -1
- package/payload/platform/plugins/email/mcp/dist/scripts/email-fetch.d.ts +7 -2
- package/payload/platform/plugins/email/mcp/dist/scripts/email-fetch.d.ts.map +1 -1
- package/payload/platform/plugins/email/mcp/dist/scripts/email-fetch.js +7 -2
- package/payload/platform/plugins/email/mcp/dist/scripts/email-fetch.js.map +1 -1
- package/payload/platform/plugins/email/references/email-reference.md +4 -4
- package/payload/platform/plugins/linkedin-import/skills/linkedin-import/SKILL.md +2 -0
- package/payload/platform/plugins/memory/PLUGIN.md +6 -0
- package/payload/platform/plugins/memory/skills/archive-crawler/SKILL.md +67 -0
- package/payload/platform/plugins/memory/skills/concept-synthesis/SKILL.md +80 -0
- package/payload/platform/plugins/memory/skills/conversation-archive/SKILL.md +2 -0
- package/payload/platform/plugins/memory/skills/document-ingest/SKILL.md +2 -0
- package/payload/platform/plugins/scheduling/PLUGIN.md +4 -1
- package/payload/platform/plugins/scheduling/mcp/dist/scripts/check-due-events.d.ts +7 -3
- package/payload/platform/plugins/scheduling/mcp/dist/scripts/check-due-events.d.ts.map +1 -1
- package/payload/platform/plugins/scheduling/mcp/dist/scripts/check-due-events.js +7 -3
- package/payload/platform/plugins/scheduling/mcp/dist/scripts/check-due-events.js.map +1 -1
- package/payload/platform/plugins/scheduling/skills/briefing/SKILL.md +75 -0
- package/payload/platform/plugins/scheduling/skills/daily-prep/SKILL.md +61 -0
- package/payload/platform/plugins/workflows/PLUGIN.md +2 -2
- package/payload/platform/plugins/workflows/skills/workflow-manager/SKILL.md +1 -1
- package/payload/platform/services/claude-session-manager/dist/http-server.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/http-server.js +14 -1
- package/payload/platform/services/claude-session-manager/dist/http-server.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts +14 -0
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.js +9 -2
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/system-prompt.d.ts +25 -1
- package/payload/platform/services/claude-session-manager/dist/system-prompt.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/system-prompt.js +54 -3
- package/payload/platform/services/claude-session-manager/dist/system-prompt.js.map +1 -1
- package/payload/platform/templates/agents/admin/IDENTITY.md +39 -291
- package/payload/platform/templates/agents/admin/SOUL.md +4 -4
- package/payload/platform/templates/specialists/agents/content-producer.md +24 -69
- package/payload/platform/templates/specialists/agents/database-operator.md +49 -155
- package/payload/platform/templates/specialists/agents/personal-assistant.md +27 -177
- package/payload/platform/templates/specialists/agents/project-manager.md +29 -96
- package/payload/platform/templates/specialists/agents/research-assistant.md +36 -78
- package/payload/premium-plugins/real-agency/agents/compliance.md +14 -0
- package/payload/premium-plugins/real-agency/agents/negotiator.md +22 -0
- package/payload/premium-plugins/real-agency/agents/valuer.md +16 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/.claude-plugin/plugin.json +1 -1
- package/payload/premium-plugins/real-agency/plugins/estate-business/PLUGIN.md +29 -13
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/commission-calculator/SKILL.md +40 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/month-end-close/SKILL.md +69 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/payment-batch-stager/SKILL.md +42 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/period-reconciler/SKILL.md +42 -0
- package/payload/premium-plugins/real-agency/plugins/estate-sales/.claude-plugin/plugin.json +1 -1
- package/payload/premium-plugins/real-agency/plugins/estate-sales/PLUGIN.md +27 -13
- package/payload/premium-plugins/real-agency/plugins/estate-sales/skills/chase-progression/SKILL.md +107 -0
- package/payload/premium-plugins/real-agency/plugins/estate-sales/skills/risk-scorer/SKILL.md +42 -0
- package/payload/premium-plugins/real-agency/plugins/leads/.claude-plugin/plugin.json +1 -1
- package/payload/premium-plugins/real-agency/plugins/leads/PLUGIN.md +24 -10
- package/payload/premium-plugins/real-agency/plugins/leads/skills/chain-progression-tracker/SKILL.md +51 -0
- package/payload/premium-plugins/real-agency/plugins/leads/skills/diary-builder/SKILL.md +38 -0
- package/payload/premium-plugins/real-agency/plugins/leads/skills/enquiry-triage/SKILL.md +36 -0
- package/payload/premium-plugins/real-agency/plugins/leads/skills/morning-round/SKILL.md +72 -0
- package/payload/premium-plugins/real-agency/plugins/listings/.claude-plugin/plugin.json +1 -1
- package/payload/premium-plugins/real-agency/plugins/listings/PLUGIN.md +43 -12
- package/payload/premium-plugins/real-agency/plugins/listings/skills/comparable-finder/SKILL.md +52 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/epc-checker/SKILL.md +38 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/listing-copy-writer/SKILL.md +55 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/local-market-stats/SKILL.md +33 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/new-instruction/SKILL.md +78 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/particulars-builder/SKILL.md +48 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/portal-launch-scheduler/SKILL.md +49 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/pricing-scenario-builder/SKILL.md +35 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/supplier-booker/SKILL.md +39 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/talk-track-composer/SKILL.md +36 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/terms-of-business-drafter/SKILL.md +54 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/valuation-prep/SKILL.md +69 -0
- package/payload/premium-plugins/real-agency/plugins/loop/PLUGIN.md +20 -0
- package/payload/premium-plugins/real-agency/plugins/loop/skills/compliance-flag-checker/SKILL.md +53 -0
- package/payload/premium-plugins/real-agency/plugins/loop/skills/priority-ranker/SKILL.md +40 -0
- package/payload/premium-plugins/real-agency/plugins/loop/skills/tone-matched-drafter/SKILL.md +53 -0
- package/payload/premium-plugins/real-agency/plugins/loop/skills/variance-narrator/SKILL.md +50 -0
- package/payload/premium-plugins/real-agency/plugins/loop/skills/vendor-research/SKILL.md +54 -0
- package/payload/server/public/assets/{Checkbox-B79fVxpA.js → Checkbox-D1OQD43b.js} +1 -1
- package/payload/server/public/assets/admin-czNBxWor.js +216 -0
- package/payload/server/public/assets/{architectureDiagram-Q4EWVU46-D8e59YJ0.js → architectureDiagram-Q4EWVU46-BcwgT80u.js} +1 -1
- package/payload/server/public/assets/{blockDiagram-DXYQGD6D-CxaDkc0A.js → blockDiagram-DXYQGD6D-BMSyZUQA.js} +1 -1
- package/payload/server/public/assets/{brand-Cg9t5U6J.css → brand-2cku8WFs.css} +1 -1
- package/payload/server/public/assets/{brand-jT16ErmC.js → brand-CSQuxS9w.js} +1 -1
- package/payload/server/public/assets/{c4Diagram-AHTNJAMY-D0PAvq-q.js → c4Diagram-AHTNJAMY-DPRGY1jJ.js} +1 -1
- package/payload/server/public/assets/channel-fxEghWew.js +1 -0
- package/payload/server/public/assets/{chunk-336JU56O-B-CXn-Et.js → chunk-336JU56O-B7oQ3g1c.js} +2 -2
- package/payload/server/public/assets/{chunk-426QAEUC-BLzCQHKA.js → chunk-426QAEUC-C1P0yFXw.js} +1 -1
- package/payload/server/public/assets/{chunk-4TB4RGXK-Bql1UwLT.js → chunk-4TB4RGXK-LI7kOJd0.js} +1 -1
- package/payload/server/public/assets/{chunk-5FUZZQ4R-CQK7jBtX.js → chunk-5FUZZQ4R-CXQRGTQE.js} +1 -1
- package/payload/server/public/assets/{chunk-5PVQY5BW-AJc1-lvX.js → chunk-5PVQY5BW-NSyzpXRy.js} +1 -1
- package/payload/server/public/assets/{chunk-EDXVE4YY-Cf3E3THL.js → chunk-EDXVE4YY-voNwxbDs.js} +1 -1
- package/payload/server/public/assets/{chunk-ENJZ2VHE-BNx6z6hJ.js → chunk-ENJZ2VHE-CMEMPzYY.js} +1 -1
- package/payload/server/public/assets/{chunk-ICPOFSXX-DBUEFs2-.js → chunk-ICPOFSXX-hEbwu-pe.js} +1 -1
- package/payload/server/public/assets/{chunk-OYMX7WX6-Csx2p315.js → chunk-OYMX7WX6-DxskDrLs.js} +1 -1
- package/payload/server/public/assets/{chunk-U2HBQHQK-x17h7UYW.js → chunk-U2HBQHQK-D7TKgUo0.js} +1 -1
- package/payload/server/public/assets/{chunk-X2U36JSP--Lkl5yjV.js → chunk-X2U36JSP-BvPUQEPm.js} +1 -1
- package/payload/server/public/assets/{chunk-YZCP3GAM-C4GsNX8A.js → chunk-YZCP3GAM-BY-RWQUW.js} +1 -1
- package/payload/server/public/assets/{chunk-ZZ45TVLE-YrhUPmZc.js → chunk-ZZ45TVLE-DZvOYDY6.js} +1 -1
- package/payload/server/public/assets/classDiagram-6PBFFD2Q-BsWzGW0N.js +1 -0
- package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-BGVa3h90.js +1 -0
- package/payload/server/public/assets/clone-Khvocke2.js +1 -0
- package/payload/server/public/assets/{dagre-YVALPG-M.js → dagre-Bt-fpckL.js} +1 -1
- package/payload/server/public/assets/{dagre-KV5264BT-D6JU6DW_.js → dagre-KV5264BT-Cnj0mUZl.js} +1 -1
- package/payload/server/public/assets/data-DBd-Buhp.js +1 -0
- package/payload/server/public/assets/device-url-actions-Bjz3Xzbm.js +33 -0
- package/payload/server/public/assets/{diagram-5BDNPKRD-yeO06N5Q.js → diagram-5BDNPKRD-DjLzvOlx.js} +1 -1
- package/payload/server/public/assets/{diagram-G4DWMVQ6-DzbVT_BC.js → diagram-G4DWMVQ6-DTfuRd-T.js} +1 -1
- package/payload/server/public/assets/{diagram-MMDJMWI5-DwYO5VZF.js → diagram-MMDJMWI5-BaL2mCnx.js} +1 -1
- package/payload/server/public/assets/{diagram-TYMM5635-BLUcdkDS.js → diagram-TYMM5635-C5InWY5R.js} +1 -1
- package/payload/server/public/assets/{erDiagram-SMLLAGMA-BiEUB19e.js → erDiagram-SMLLAGMA-DO7BXTpn.js} +1 -1
- package/payload/server/public/assets/{flowDiagram-DWJPFMVM-TILIKxOp.js → flowDiagram-DWJPFMVM-DDdAKfLf.js} +1 -1
- package/payload/server/public/assets/{ganttDiagram-T4ZO3ILL-B7cGzYqT.js → ganttDiagram-T4ZO3ILL-arJD8Utm.js} +1 -1
- package/payload/server/public/assets/{gitGraphDiagram-UUTBAWPF-DFOxN5bc.js → gitGraphDiagram-UUTBAWPF-C55GH-OS.js} +1 -1
- package/payload/server/public/assets/graph-DUtVdnZ6.js +1 -0
- package/payload/server/public/assets/graph-labels-Dxfue-fP.js +1 -0
- package/payload/server/public/assets/{graphlib-BBibixaA.js → graphlib-DL9PM7Ex.js} +1 -1
- package/payload/server/public/assets/{infoDiagram-42DDH7IO-nH2azhY8.js → infoDiagram-42DDH7IO-BMSGqUbG.js} +1 -1
- package/payload/server/public/assets/{ishikawaDiagram-UXIWVN3A-WD3tfqFi.js → ishikawaDiagram-UXIWVN3A-Dw6BZ6BG.js} +1 -1
- package/payload/server/public/assets/{journeyDiagram-VCZTEJTY-LUkaVSqw.js → journeyDiagram-VCZTEJTY-DrywUGXw.js} +1 -1
- package/payload/server/public/assets/{kanban-definition-6JOO6SKY-Dk-lYgpJ.js → kanban-definition-6JOO6SKY-DuwtVBBc.js} +1 -1
- package/payload/server/public/assets/{line-BDv6CEnp.js → line-JAksyKHj.js} +1 -1
- package/payload/server/public/assets/{mermaid-parser.core-D2XsSGgp.js → mermaid-parser.core-BMq-ApBW.js} +1 -1
- package/payload/server/public/assets/{mermaid.core-FyN-UmQV.js → mermaid.core-tH4oX0Kh.js} +3 -3
- package/payload/server/public/assets/{mindmap-definition-QFDTVHPH-BRAHEUIS.js → mindmap-definition-QFDTVHPH-D1OiiJga.js} +1 -1
- package/payload/server/public/assets/page-BZpoS7iR.js +1 -0
- package/payload/server/public/assets/{page-CTbSJbem.js → page-CkvBvezS.js} +2 -2
- package/payload/server/public/assets/{pieDiagram-DEJITSTG-BqibVC2X.js → pieDiagram-DEJITSTG-Ckwm69PW.js} +1 -1
- package/payload/server/public/assets/{public-BDUZIabs.js → public-C-dTMgXu.js} +5 -5
- package/payload/server/public/assets/{quadrantDiagram-34T5L4WZ-DNuExGnr.js → quadrantDiagram-34T5L4WZ-COw3yZ1j.js} +1 -1
- package/payload/server/public/assets/{requirementDiagram-MS252O5E-5JXTdydh.js → requirementDiagram-MS252O5E-DqGzM4K-.js} +1 -1
- package/payload/server/public/assets/{sankeyDiagram-XADWPNL6-B_8rhvcR.js → sankeyDiagram-XADWPNL6-D-l1c_Pl.js} +1 -1
- package/payload/server/public/assets/{sequenceDiagram-FGHM5R23-BznkBgjf.js → sequenceDiagram-FGHM5R23-BeIi0DtJ.js} +1 -1
- package/payload/server/public/assets/{stateDiagram-FHFEXIEX-BeAZOQfs.js → stateDiagram-FHFEXIEX-C-jgegLk.js} +1 -1
- package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-BaMs8Znv.js +1 -0
- package/payload/server/public/assets/{timeline-definition-GMOUNBTQ-CpJAs-Vw.js → timeline-definition-GMOUNBTQ-BGFKkYmi.js} +1 -1
- package/payload/server/public/assets/{vennDiagram-DHZGUBPP-BzH3ItkG.js → vennDiagram-DHZGUBPP-5NuIhJLS.js} +1 -1
- package/payload/server/public/assets/{wardleyDiagram-NUSXRM2D-ax9AgwA1.js → wardleyDiagram-NUSXRM2D-Be9ytVut.js} +1 -1
- package/payload/server/public/assets/{xychartDiagram-5P7HB3ND-CV6vt_tW.js → xychartDiagram-5P7HB3ND-DCyHg41R.js} +1 -1
- package/payload/server/public/data.html +5 -5
- package/payload/server/public/graph.html +6 -6
- package/payload/server/public/index.html +8 -8
- package/payload/server/public/public.html +5 -5
- package/payload/server/server.js +62 -101
- package/payload/server/public/assets/admin-CXLuiXFU.js +0 -216
- package/payload/server/public/assets/channel-BU_eIdRB.js +0 -1
- package/payload/server/public/assets/classDiagram-6PBFFD2Q-DMpM1d2b.js +0 -1
- package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-D_XbuPVj.js +0 -1
- package/payload/server/public/assets/clone-BBT00JUO.js +0 -1
- package/payload/server/public/assets/data-BdwO_kv-.js +0 -1
- package/payload/server/public/assets/device-url-actions-C8dD0ydz.js +0 -33
- package/payload/server/public/assets/graph-DpgsOhUZ.js +0 -1
- package/payload/server/public/assets/graph-labels-DJ717p00.js +0 -1
- package/payload/server/public/assets/page-BWHYktEF.js +0 -1
- package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-iVlXKz7S.js +0 -1
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: session-management
|
|
3
|
+
description: "Reset the current session, list past sessions, continue a previous session, or read the session memory. Triggers when the owner says 'start a new session', 'continue the last session', 'pick up where we left off', 'what were we doing last time', or asks about session state."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Session management
|
|
7
|
+
|
|
8
|
+
This skill wraps the session tools and carries the discipline that keeps long-running work coherent across sessions. The platform handles a lot of session machinery automatically: this skill is for the moments where the owner names a session intent directly.
|
|
9
|
+
|
|
10
|
+
## The tools
|
|
11
|
+
|
|
12
|
+
| Tool | Purpose |
|
|
13
|
+
|---|---|
|
|
14
|
+
| `session-reset` | Clear the current session and return to idle. |
|
|
15
|
+
| `session-list` | List recent sessions with metadata. |
|
|
16
|
+
| `session-resume` | Resume a specific session by `conversationId`. |
|
|
17
|
+
| `session-compact-status` | Read the compaction state of the current session: how much context has been compacted, what remains. |
|
|
18
|
+
|
|
19
|
+
## Resetting the session
|
|
20
|
+
|
|
21
|
+
When the owner asks to start a new session, clear the conversation, or reset, call `session-reset`. Do not ask for confirmation. After the tool call, say nothing further; the UI clears and returns to idle.
|
|
22
|
+
|
|
23
|
+
**Before suggesting a reset (e.g. after a plugin activation, when context has drifted), persist every actionable finding from the current conversation to its durable store first.** Compaction saves a session summary, but summaries are lossy: decisions, working state, and unfinished threads must be captured explicitly before the context window is cleared. Write open tasks via `task-create`, profile updates via `profile-update`, and any other graph state. Then tell the owner what will carry into the new session (the summary and the open tasks via `<previous-context>`) and suggest the reset.
|
|
24
|
+
|
|
25
|
+
## Continuing a previous session
|
|
26
|
+
|
|
27
|
+
When the owner asks to continue, pick up, resume, or carry on:
|
|
28
|
+
|
|
29
|
+
- **Most recent session.** Call `session-list` with `limit: 1`, then `session-resume` with the returned `conversationId`.
|
|
30
|
+
- **Specific session by name or topic.** Call `session-list` with a higher limit, identify the matching session, then `session-resume`.
|
|
31
|
+
- **No sessions found.** Tell the owner. Do not improvise by reading `<previous-context>`, searching memory, or re-researching prior work.
|
|
32
|
+
|
|
33
|
+
## Trusting the session summary
|
|
34
|
+
|
|
35
|
+
When `<previous-context>` is present in the system prompt, the platform has injected a recent session summary and the open tasks at session end. The platform rejects stale summaries older than 48 hours; when the summary is present, it is recent and trustworthy.
|
|
36
|
+
|
|
37
|
+
- Trust the summary for state orientation. Do not re-verify claims it already describes.
|
|
38
|
+
- Pick up from the state the summary describes. Redundant `memory-search` or other tool calls for information already in the summary waste the owner's time.
|
|
39
|
+
- Use the summary to greet the owner with awareness of prior work and outstanding tasks.
|
|
40
|
+
|
|
41
|
+
When `<previous-context>` is absent, Neo4j was unreachable or no prior context exists: proceed normally, using tool calls to establish state.
|
|
42
|
+
|
|
43
|
+
## The recovery context block
|
|
44
|
+
|
|
45
|
+
A `<recovery-context>` block on the user-message side appears whenever the previous turn was aborted by a stall recovery. It is the authoritative description of what failed, what was incomplete, and what to do now.
|
|
46
|
+
|
|
47
|
+
- The **resume variant** announces that a synthetic tool result for the in-flight `tool_use_id` was just pushed above this message. Read it for the completed-work summary, then resume by re-issuing the next pending step concretely.
|
|
48
|
+
- The **handoff variant** carries an LLM-generated continuation summary describing what was happening before the abort.
|
|
49
|
+
|
|
50
|
+
In both shapes, the next operator message means resume the work. Never treat it as empty, never ask "what would you like to do?", never wait for direction. Do not re-research the blocker. Do not call `session-list` to figure out what was happening.
|
|
51
|
+
|
|
52
|
+
## The api-wait-ping liveness gate
|
|
53
|
+
|
|
54
|
+
The platform suppresses a heartbeat-driven stall fire while the SDK API request is still alive, bounded by a 600-second cap. When the cap forces an abort, the synthetic tool result names "API request stayed alive past the 600 s cap without producing tokens". This is upstream API latency, not specialist failure. Do not infer that the specialist's approach was wrong from a long stall; many stalls are not the subagent's fault.
|
|
55
|
+
|
|
56
|
+
## In managed context mode
|
|
57
|
+
|
|
58
|
+
Conversation history is provided inside `<conversation-history>` tags. Use `session-compact-status` to retrieve older archived context if needed.
|
|
59
|
+
|
|
60
|
+
## What this skill does not do
|
|
61
|
+
|
|
62
|
+
It does not edit summaries, delete past sessions, or modify the recovery-context block. These are platform-owned mechanics.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "deep-research",
|
|
3
|
-
"description": "Structured multi-source research workflow
|
|
3
|
+
"description": "Structured multi-source research workflow: query decomposition, search strategy, source evaluation, synthesis, citation formatting, plus four named knowledge-worker skills (book-mirror, strategic-reading, academic-verify, data-research). Uses Claude Code's native WebSearch and WebFetch tools.",
|
|
4
4
|
"version": "0.1.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Rubytech LLC"
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: deep-research
|
|
3
|
-
description: "Structured multi-source research workflow
|
|
3
|
+
description: "Structured multi-source research workflow: query decomposition, search strategy, source evaluation, synthesis, citation formatting, plus four named knowledge-worker skills (book-mirror, strategic-reading, academic-verify, data-research). Uses Claude Code's native WebSearch and WebFetch tools."
|
|
4
4
|
tools: []
|
|
5
|
+
skills:
|
|
6
|
+
- skills/deep-research/SKILL.md
|
|
7
|
+
- skills/book-mirror/SKILL.md
|
|
8
|
+
- skills/strategic-reading/SKILL.md
|
|
9
|
+
- skills/academic-verify/SKILL.md
|
|
10
|
+
- skills/data-research/SKILL.md
|
|
5
11
|
always: false
|
|
6
12
|
embed: false
|
|
7
13
|
---
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Recipes
|
|
2
|
+
|
|
3
|
+
Recipes for the `data-research` skill. Each recipe is a YAML file that declares the field-by-field shape of an extraction, the source kinds it accepts, the validations to apply, and the graph target.
|
|
4
|
+
|
|
5
|
+
A recipe is a contract. The owner reads the recipe and knows what `data-research` will write to the graph before it runs.
|
|
6
|
+
|
|
7
|
+
## Recipe shape
|
|
8
|
+
|
|
9
|
+
```yaml
|
|
10
|
+
name: <recipe-name>
|
|
11
|
+
description: One-line description of what this recipe extracts.
|
|
12
|
+
source_kinds:
|
|
13
|
+
- email-thread # one or more of: email-thread, web-page, pdf, text-file, form-submission
|
|
14
|
+
fields:
|
|
15
|
+
- name: <field name>
|
|
16
|
+
type: string | number | date | boolean
|
|
17
|
+
required: true | false
|
|
18
|
+
validation: # optional
|
|
19
|
+
min: <number>
|
|
20
|
+
max: <number>
|
|
21
|
+
pattern: <regex>
|
|
22
|
+
enum: [a, b, c]
|
|
23
|
+
graph_target:
|
|
24
|
+
label: <Node label that must exist in the live Neo4j ontology>
|
|
25
|
+
identity: # property names that together uniquely identify a row
|
|
26
|
+
- <field name>
|
|
27
|
+
- <field name>
|
|
28
|
+
relationships: # optional
|
|
29
|
+
- type: <RELATIONSHIP_TYPE>
|
|
30
|
+
target_label: <Node label>
|
|
31
|
+
target_match: <field name> # the field whose value resolves the target node via memory-search
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Updating a recipe
|
|
35
|
+
|
|
36
|
+
Recipes are part of the plugin and are committed alongside the plugin. To add or change a recipe, the owner names the extraction in conversation, the operator drafts the YAML, the owner reviews it, and the file is saved here. The `data-research` skill loads recipes by name at run-time; it does not author or modify them inline.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: academic-verify
|
|
3
|
+
description: "Traces an academic or scientific claim through the publication chain to a primary source, checks for retraction, and returns one of four verdicts: verified, contradicted, retracted, or cannot be confirmed. Triggers when the owner says 'verify this study', 'is this paper real', 'check the citation', 'is X actually peer-reviewed'."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Academic verify
|
|
7
|
+
|
|
8
|
+
This skill is for claims that arrive as "studies show", "research suggests", or a named paper title. It traces the claim to the actual paper, the actual journal, and the actual conclusion of the source. It never says "verified" without a primary source URL.
|
|
9
|
+
|
|
10
|
+
## When to run
|
|
11
|
+
|
|
12
|
+
Run when the owner asks whether an academic or scientific claim is real. The trigger phrases are above. Also run when the owner repeats a strong claim attributed to "research" or "a study" and asks to check.
|
|
13
|
+
|
|
14
|
+
## Inputs
|
|
15
|
+
|
|
16
|
+
`claim` (the statement to verify) and optionally `source` (the citation the owner has, if any: a paper title, DOI, author and year, journal name, or a URL).
|
|
17
|
+
|
|
18
|
+
If `claim` is missing, refuse. If `source` is missing, the skill will try to find the source from the claim wording.
|
|
19
|
+
|
|
20
|
+
## Method
|
|
21
|
+
|
|
22
|
+
1. **Find the originating paper.** If the owner provided a DOI or URL, fetch it. If they provided a paper title, search via `WebSearch` for the title in quotes, prioritising the journal's own site or a known repository (Google Scholar, PubMed, arXiv, OpenAlex). If they provided only the claim wording, search for the claim's distinctive phrasing in quotes.
|
|
23
|
+
2. **Confirm the chain.** Pull these four facts from the source page:
|
|
24
|
+
- Paper title, authors, journal name, year.
|
|
25
|
+
- DOI (or arXiv ID, or PubMed ID).
|
|
26
|
+
- Peer-review status (peer-reviewed journal, preprint, working paper, conference abstract).
|
|
27
|
+
- The paper's own abstract or conclusion as written.
|
|
28
|
+
3. **Check for retraction.** Search Retraction Watch and the journal's own page for a retraction notice. Capture the date and reason if found.
|
|
29
|
+
4. **Cross-reference the claim against the paper.** Read the paper's abstract or conclusion. Compare the owner's claim wording to what the paper actually says. Decide one of four verdicts:
|
|
30
|
+
- **Verified.** The paper exists, is peer-reviewed (or clearly named as preprint), is not retracted, and the claim wording matches what the paper concludes.
|
|
31
|
+
- **Contradicted by source.** The paper exists but the claim wording overstates, reverses, or generalises beyond what the paper actually concludes.
|
|
32
|
+
- **Retracted.** The paper has been retracted. Name the date and reason.
|
|
33
|
+
- **Cannot be confirmed.** A search could not find a primary source, or the primary source is behind a paywall and only a secondary summary is available.
|
|
34
|
+
5. **Return the verdict with the chain.** Verdict in the first sentence. Below it, the four facts from step 2. If retracted, the retraction details. If cannot-be-confirmed, name what was searched and where it stopped.
|
|
35
|
+
|
|
36
|
+
## Output format
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
**Verdict.** <verified | contradicted by source | retracted | cannot be confirmed>
|
|
40
|
+
|
|
41
|
+
**Source.**
|
|
42
|
+
- Title: <paper title>
|
|
43
|
+
- Authors: <list>
|
|
44
|
+
- Journal: <journal name>, <year>
|
|
45
|
+
- DOI: <DOI or other identifier>
|
|
46
|
+
- Peer-review status: <peer-reviewed | preprint | working paper | conference abstract>
|
|
47
|
+
- Primary source URL: <URL>
|
|
48
|
+
|
|
49
|
+
**The paper concludes.** <one to three sentences, paraphrased tightly or quoted verbatim if wording matters>
|
|
50
|
+
|
|
51
|
+
**The claim says.** <the owner's claim, verbatim>
|
|
52
|
+
|
|
53
|
+
**Match.** <one paragraph on whether the claim faithfully represents the paper's conclusion. If contradicted, name the specific divergence.>
|
|
54
|
+
|
|
55
|
+
(If retracted:)
|
|
56
|
+
**Retraction.** <date, reason, retraction notice URL>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Discipline
|
|
60
|
+
|
|
61
|
+
- **Never say "verified" without a primary source URL in the output.** A claim is verified against the actual paper, not against a secondary summary.
|
|
62
|
+
- **Paywalled abstracts.** If the abstract is behind a paywall, the verdict is "cannot be confirmed". Surface the paywall, do not infer from training memory what the paper says.
|
|
63
|
+
- **Preprints.** A preprint is not the same as peer-reviewed. Surface the distinction explicitly; the owner may not want to act on a preprint result.
|
|
64
|
+
- **Press release vs paper.** Press releases routinely overstate the paper's conclusions. If the chain goes paper → press release → claim, the verdict is usually "contradicted by source"; name the divergence.
|
|
65
|
+
- **Author affiliation conflicts.** Surface known conflicts of interest from the paper's disclosure if present. Do not pretend they affect the verdict; they affect the owner's interpretation of the verdict.
|
|
66
|
+
|
|
67
|
+
## Failure modes
|
|
68
|
+
|
|
69
|
+
- **Search returns no candidates.** Verdict is "cannot be confirmed". Report the search terms tried.
|
|
70
|
+
- **Multiple candidate papers.** Surface the top three and ask the owner to confirm which is the source.
|
|
71
|
+
- **Search returns a retraction watch entry but no journal page.** Use the retraction watch entry as the primary source; the verdict is "retracted".
|
|
72
|
+
|
|
73
|
+
## What this skill does not do
|
|
74
|
+
|
|
75
|
+
It does not evaluate the paper's methodology or replicate the analysis. It checks whether the claim matches the source, not whether the source is correct. A flawed paper that is correctly cited returns "verified"; the owner is the one who decides whether the paper itself is sound.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: book-mirror
|
|
3
|
+
description: "Reads a book the owner provides (PDF, ePub, web link, or text), walks it chapter by chapter, and produces a personalised mirror that maps each chapter's claims to the owner's known context. Triggers when the owner says 'mirror this book', 'two-column analysis', 'how does this book apply to me', 'personalise this book against my business'."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Book mirror
|
|
7
|
+
|
|
8
|
+
This skill turns a book into a usable document by walking the chapters one at a time and asking, for each: "what does this say, and how does it apply to this specific owner". The output is a personalised pack the owner can read once and act on. It is grounded in the graph; the right-hand column is always specific to what the graph already knows about the owner.
|
|
9
|
+
|
|
10
|
+
## When to run
|
|
11
|
+
|
|
12
|
+
Run when the owner asks for a book to be applied to their situation. The trigger phrases are above. Do not run when the owner asks for a simple summary; a summary is what `deep-research` produces, and that is the right skill for that intent.
|
|
13
|
+
|
|
14
|
+
## Inputs
|
|
15
|
+
|
|
16
|
+
| Input | Meaning |
|
|
17
|
+
|---|---|
|
|
18
|
+
| `source` | The book. A path to a file in `$ACCOUNT_DIR`, a web URL, or pasted text. |
|
|
19
|
+
| `anchor` | A node in the graph the book is being mirrored against. Usually the `LocalBusiness` node; can also be a named `Project` or `Goal`. |
|
|
20
|
+
|
|
21
|
+
If the anchor is missing, ask for it in one sentence: "Mirror against the business, or a specific project?".
|
|
22
|
+
|
|
23
|
+
## Method
|
|
24
|
+
|
|
25
|
+
1. **Confirm the source.** If `source` is a file path, read it. If it is a URL, fetch it. If it is pasted text, work from the text directly. Reject sources that cannot be read; do not paraphrase a book the skill has not seen.
|
|
26
|
+
2. **Identify the chapters.** Look for chapter headings in the text. If the book has none, segment by first-level headings or by every 2000 to 4000 words. Tell the owner the chapter count before starting.
|
|
27
|
+
3. **For each chapter, build the two columns.**
|
|
28
|
+
- **Left.** A two-to-three-sentence summary of the chapter's actual claim. Quote verbatim only when the wording matters; otherwise paraphrase tightly.
|
|
29
|
+
- **Right.** A two-to-three-sentence note on how the claim applies to the anchor, grounded in graph specifics. Pull from `memory-search` against the anchor: the owner's business stage, recent obstacles, named projects, the LocalBusiness `businessType` schema. Name specific entities. Do not write "this applies to your business in general": that is jargon for "I have nothing specific to say".
|
|
30
|
+
- **Actions.** End each chapter with one or two concrete steps the owner could take this week. Use the imperative ("Call the photographer to confirm the brief for 14 Garth Road" rather than "Consider arranging photography").
|
|
31
|
+
4. **Save the result.** Compose the whole pack as one `:KnowledgeDocument` with `:Section:Chapter` children per chapter. Link the document to the anchor node via `MIRRORS` (or `REFERENCES` if `MIRRORS` is not in the live ontology: call `maxy-graph-get_neo4j_schema` first).
|
|
32
|
+
|
|
33
|
+
## Output format
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
# Mirror: <book title> against <anchor name>
|
|
37
|
+
|
|
38
|
+
## Chapter 1: <chapter title>
|
|
39
|
+
|
|
40
|
+
**The chapter.** <2-3 sentence summary>
|
|
41
|
+
|
|
42
|
+
**For <anchor>.** <2-3 sentence application, grounded in graph specifics>
|
|
43
|
+
|
|
44
|
+
**This week.**
|
|
45
|
+
- <one concrete action>
|
|
46
|
+
- <one concrete action>
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Chapter 2: ...
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Render the pack via `render-component name: document-editor` for owner review before saving. The owner can edit any chapter inline before the save. Once approved, write to the graph.
|
|
54
|
+
|
|
55
|
+
## Length discipline
|
|
56
|
+
|
|
57
|
+
Each chapter must fit on one screen (roughly 30 lines). If a chapter's claims need more, split the application across two or three chapter mirrors; do not pad. The whole pack should be readable in one sitting; a 20-chapter book becomes a 60-page pack only if every chapter genuinely earns its application.
|
|
58
|
+
|
|
59
|
+
## Failure modes
|
|
60
|
+
|
|
61
|
+
- **No chapters detectable and no headings.** Ask the owner to confirm the chunk size or to provide a chapter list.
|
|
62
|
+
- **Anchor has thin graph context** (LocalBusiness with no recent activity, Project with no Tasks). Surface the gap: "the graph has limited context for <anchor>. The right column will be general where it should be specific. Continue?". Wait for confirmation.
|
|
63
|
+
- **`memory-search` returns no useful results for the anchor**. Stop. The book cannot be mirrored against an empty anchor; tell the owner and recommend running `business-profile` or naming a different anchor.
|
|
64
|
+
- **Source fetch fails.** Surface the error literally. Do not summarise from training memory.
|
|
65
|
+
|
|
66
|
+
## What this skill does not do
|
|
67
|
+
|
|
68
|
+
It does not summarise a book without an anchor; that is generic content, which `deep-research` can produce. It does not produce a study guide, a literature review, or a comparative essay. It produces one specific output: a personalised application of one book to one named entity in the graph.
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: data-research
|
|
3
|
+
description: "Recipe-driven structured-data extraction. Takes a named recipe and a set of sources (emails, reports, web pages, forms, PDFs) and writes typed entities to the graph per the recipe's schema. Triggers when the owner says 'extract X from these emails', 'track investor updates', 'pull donation amounts', 'build a table of Y from these documents'."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Data research
|
|
7
|
+
|
|
8
|
+
This skill turns unstructured-looking sources (emails, reports, forms, web pages) into structured graph entities. The transformation is always recipe-driven: a named YAML recipe declares what fields to extract, what validations to apply, and what graph nodes to write. The skill runs a named recipe; it never invents a schema on the fly.
|
|
9
|
+
|
|
10
|
+
**Default parent.** Every recipe declares its hierarchy parent via `graph_target.parent` — either `Project` (the run-time recipe argument names which Project elementId to attach to) or `LocalBusiness` (the account root, for cross-project recipes like investor-updates). The skill refuses to run a recipe whose `parent` field is missing or whose named Project does not exist. Per-row writes attach to that parent via the canonical containment edge; the recipe's `relationships:` block describes cross-hierarchy edges (e.g. `ROUND_FOR → Organization`) which are written separately and do not substitute for the parent.
|
|
11
|
+
|
|
12
|
+
## When to run
|
|
13
|
+
|
|
14
|
+
Run when the owner wants the same extraction repeated across many sources. The trigger phrases are above. Do not run for one-off extractions; a one-off is what `document-ingest` does.
|
|
15
|
+
|
|
16
|
+
## Inputs
|
|
17
|
+
|
|
18
|
+
| Input | Meaning |
|
|
19
|
+
|---|---|
|
|
20
|
+
| `recipe` | The name of an existing recipe at `plugins/deep-research/recipes/<name>.yaml`. |
|
|
21
|
+
| `sources` | One or more source paths or URLs. Email thread paths, PDF paths, web URLs, or a folder. |
|
|
22
|
+
| `parent` | The Project elementId (or `LocalBusiness` for cross-project recipes) the writes anchor to. Required when the recipe's `parent` field is `Project`; ignored when the recipe's parent is `LocalBusiness` (the account root resolves automatically). |
|
|
23
|
+
|
|
24
|
+
If `recipe` does not match any file in the recipes directory, refuse. List the available recipe names. Do not invent a recipe.
|
|
25
|
+
|
|
26
|
+
If the owner asks for an extraction shape that no existing recipe covers, the answer is "no recipe exists for that yet. Want me to draft one?". The skill never extracts data without a recipe; that is the point of the recipe layer.
|
|
27
|
+
|
|
28
|
+
## Recipe shape
|
|
29
|
+
|
|
30
|
+
A recipe is a YAML file with this shape:
|
|
31
|
+
|
|
32
|
+
```yaml
|
|
33
|
+
name: investor-updates
|
|
34
|
+
description: One-line description of what this recipe extracts.
|
|
35
|
+
source_kinds:
|
|
36
|
+
- email-thread
|
|
37
|
+
- web-page
|
|
38
|
+
- pdf
|
|
39
|
+
fields:
|
|
40
|
+
- name: company_name
|
|
41
|
+
type: string
|
|
42
|
+
required: true
|
|
43
|
+
- name: round
|
|
44
|
+
type: string
|
|
45
|
+
required: false
|
|
46
|
+
- name: amount_gbp
|
|
47
|
+
type: number
|
|
48
|
+
required: false
|
|
49
|
+
validation:
|
|
50
|
+
min: 0
|
|
51
|
+
- name: date_announced
|
|
52
|
+
type: date
|
|
53
|
+
required: true
|
|
54
|
+
graph_target:
|
|
55
|
+
label: FundingRound
|
|
56
|
+
parent: LocalBusiness # or `Project` — names the hierarchy anchor for every row
|
|
57
|
+
identity:
|
|
58
|
+
- company_name
|
|
59
|
+
- date_announced
|
|
60
|
+
relationships:
|
|
61
|
+
- type: ROUND_FOR
|
|
62
|
+
target_label: Organization
|
|
63
|
+
target_match: company_name
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Method
|
|
67
|
+
|
|
68
|
+
1. **Load and validate the recipe.** Read the recipe file. Check that every field declared has a `name` and `type`. Check that `graph_target.label` is a label in the live ontology (`maxy-graph-get_neo4j_schema`). Check that `graph_target.parent` is present and resolves (Project elementId supplied at call time, or `LocalBusiness` resolved from the account root). If anything fails, refuse and report the recipe's defect.
|
|
69
|
+
2. **Iterate sources.** For each source: classify by kind against `source_kinds`. Skip sources whose kind is not in the recipe's allowed list, list them in the report.
|
|
70
|
+
3. **Extract per source.** Fetch the source. Use Haiku-driven classification (`memory-classify` with a recipe-specific prompt) to extract each declared field. Apply each field's validation. Reject rows that fail required-field checks; capture them in a rejected list.
|
|
71
|
+
4. **Write to the graph.** For each accepted row, `memory-write` a node with the declared label and the extracted properties. Attach it to the resolved hierarchy parent via the canonical containment edge. Stamp `createdByAgent: data-research`, `createdByRecipe: <recipe name>`, `sourceDocumentId: <source>`. Write the declared cross-hierarchy relationships, resolving target nodes via `memory-search` on the named match property.
|
|
72
|
+
5. **Report.** Return one line per source (accepted count, rejected count) and one summary line: total rows written, total rejected, total relationships created.
|
|
73
|
+
|
|
74
|
+
## Output format
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
**Recipe.** <name>
|
|
78
|
+
**Sources.** <N> processed.
|
|
79
|
+
|
|
80
|
+
| Source | Accepted | Rejected | Reason |
|
|
81
|
+
|---|---|---|---|
|
|
82
|
+
| <source path or URL> | 3 | 1 | "amount_gbp negative" |
|
|
83
|
+
| ... | | | |
|
|
84
|
+
|
|
85
|
+
**Total.** 12 rows written as :<Label>, 9 relationships created via <RelType>.
|
|
86
|
+
**Rejections.** 3 rows rejected (full list below).
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Why recipes
|
|
90
|
+
|
|
91
|
+
A recipe is a contract. The owner reads the recipe and knows what will be written. The recipe is version-controlled and auditable. Without recipes, the skill would extract whatever the LLM thinks is interesting, which means the graph schema drifts with every run and the owner cannot trust what arrives. The recipe layer is the difference between a controlled pipeline and a junk shop.
|
|
92
|
+
|
|
93
|
+
## Failure modes
|
|
94
|
+
|
|
95
|
+
- **Recipe file is malformed.** Surface the YAML error literally and refuse.
|
|
96
|
+
- **Recipe declares a `graph_target.label` not in the ontology.** Refuse. Tell the owner the label is missing and recommend either adjusting the recipe or extending the ontology.
|
|
97
|
+
- **Recipe's `graph_target.parent` is missing or unresolvable.** Refuse. The hierarchy parent is mandatory; without it, every row would land as an orphan.
|
|
98
|
+
- **No sources match the recipe's allowed kinds.** Refuse. List what the recipe accepts.
|
|
99
|
+
- **Target-match relationship cannot resolve** (the recipe wants `ROUND_FOR -> Organization` and the named company is not in the graph). Capture in the rejected list with the reason "target organisation not found"; do not create a placeholder organisation.
|
|
100
|
+
- **Embedding service unavailable mid-batch.** Stop. Report which sources completed and which did not.
|
|
101
|
+
|
|
102
|
+
## Where recipes live
|
|
103
|
+
|
|
104
|
+
Recipes live at `platform/plugins/deep-research/recipes/<name>.yaml`. The directory is part of the plugin and ships with the platform. To author a new recipe, the owner names the extraction they want; the skill can scaffold the YAML and the owner reviews and saves it. Recipe authoring is a separate path; this skill consumes recipes, it does not write them inline.
|
|
105
|
+
|
|
106
|
+
## What this skill does not do
|
|
107
|
+
|
|
108
|
+
It does not run free-form extractions. It does not write to the graph without an approved recipe. It does not modify recipes during a run; if the recipe needs changing, the run aborts, the owner edits the recipe, and the run is re-issued.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: strategic-reading
|
|
3
|
+
description: "Reads a source (article, book, report, document) through a specific lens the owner names, and produces both a faithful summary and an applied playbook. Triggers when the owner says 'read this through the lens of X', 'apply this to my problem', 'extract a playbook for Y from this', 'what can I learn from this about Z'."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Strategic reading
|
|
7
|
+
|
|
8
|
+
This skill reads a document with a specific question in mind. The owner names the lens (a project, a problem, a goal). The skill summarises what the source actually says, then translates each section into how it applies to the named lens, and closes with a playbook of three to seven concrete steps. Both halves are grounded: the left half in the source text, the right half in the graph.
|
|
9
|
+
|
|
10
|
+
## When to run
|
|
11
|
+
|
|
12
|
+
Run when the owner has a specific problem and wants to test what a particular source teaches them about it. Not for general reading; for applied reading. The trigger phrases are above.
|
|
13
|
+
|
|
14
|
+
## Inputs
|
|
15
|
+
|
|
16
|
+
| Input | Meaning |
|
|
17
|
+
|---|---|
|
|
18
|
+
| `source` | The text to read. Path to a file, a URL, or pasted text. |
|
|
19
|
+
| `lens` | The named focus. A `:Project`, a `:Goal`, a problem statement in the owner's words, or an entity in the graph the owner wants to apply the source to. |
|
|
20
|
+
|
|
21
|
+
If `lens` is missing, ask once: "Through which lens: a project, a goal, or a problem statement?".
|
|
22
|
+
|
|
23
|
+
## Method
|
|
24
|
+
|
|
25
|
+
1. **Confirm the source.** Read or fetch it. If it cannot be read, refuse; do not paraphrase from training memory.
|
|
26
|
+
2. **Resolve the lens.** If the lens is a named entity, `memory-search` for it and pull its current state, recent obstacles, related entities. If the lens is a free-text problem, capture it verbatim; it is the question every section will be tested against.
|
|
27
|
+
3. **Walk the source in sections.** Section boundaries are the source's own headings. For each section, two paragraphs:
|
|
28
|
+
- **The section.** One paragraph: what it claims and what its evidence is. Quote verbatim only when the wording matters.
|
|
29
|
+
- **Applied to <lens>.** One paragraph: how the section's claim helps or hurts the lens. Use graph specifics. Name entities. Do not write "this could apply" or "consider how this might"; write the specific implication for the specific lens.
|
|
30
|
+
4. **Produce the playbook.** After the last section, compose a single list of three to seven concrete actions the owner could take. Each action is imperative, names a specific next step, and (where possible) names the entity it touches.
|
|
31
|
+
5. **Save the result.** Compose the whole pack as one `:KnowledgeDocument` linked to the lens's underlying entity via `INFORMS` (or `REFERENCES` if `INFORMS` is not in the live ontology).
|
|
32
|
+
|
|
33
|
+
## Output format
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
# Strategic reading: <source title> for <lens>
|
|
37
|
+
|
|
38
|
+
## Lens
|
|
39
|
+
<one-paragraph restatement of the lens, including the graph context the skill loaded>
|
|
40
|
+
|
|
41
|
+
## Section 1: <section heading>
|
|
42
|
+
|
|
43
|
+
**The section.** <one paragraph on the source's claim>
|
|
44
|
+
|
|
45
|
+
**Applied to <lens>.** <one paragraph on the implication for this owner>
|
|
46
|
+
|
|
47
|
+
## Section 2: ...
|
|
48
|
+
|
|
49
|
+
## Playbook
|
|
50
|
+
1. <imperative action, names entity>
|
|
51
|
+
2. <imperative action, names entity>
|
|
52
|
+
... (three to seven items)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Render the pack via `render-component name: document-editor` for review before save.
|
|
56
|
+
|
|
57
|
+
## Difference from book-mirror
|
|
58
|
+
|
|
59
|
+
Book mirror walks every chapter and produces a chapter-by-chapter application: the unit of work is the chapter. Strategic reading uses the source's own sections and is filtered by a specific question: the unit of work is the section, and the filter is the lens. A book mirrored is a personalised version of the whole book. A source read strategically is the answer to one question about that source.
|
|
60
|
+
|
|
61
|
+
## Failure modes
|
|
62
|
+
|
|
63
|
+
- **Lens resolves to an entity with no graph context.** Surface the gap and ask whether to proceed with the lens as a free-text problem instead.
|
|
64
|
+
- **Source covers a topic the lens does not touch.** Each section's right-hand column will read as "this section does not apply directly to <lens>". Surface this pattern after section 3; the owner may want to abandon the read or change the lens.
|
|
65
|
+
- **Source is shorter than three sections** (a short blog post, a one-page memo). Use paragraph boundaries instead of section boundaries. If the source is fewer than 200 words, do not run; the owner can read it themselves faster than the skill can mirror it.
|
|
66
|
+
|
|
67
|
+
## What this skill does not do
|
|
68
|
+
|
|
69
|
+
It does not produce a critical review of the source. It does not score the source. It does not compare it against other sources. It produces one specific output: one source read with one lens, ending in one playbook.
|
|
@@ -45,8 +45,8 @@ After install, the first time you open the admin URL, {{productName}} walks you
|
|
|
45
45
|
|
|
46
46
|
- `seed-neo4j.sh` writes the node at install time with `currentStep=0`. The installer re-reads it before exiting; a missing node or an unreachable Neo4j fails the install loudly (`[install-invariant] onboarding-state-MISSING` or `onboarding-state-UNREACHABLE`).
|
|
47
47
|
- Every admin session-create reads `currentStep`. Anything below 9 keeps `onboarding_complete=false` on `/api/health` and `/api/admin/session`, and the chat opens on the next step's component (multi-select, dropdown, etc.).
|
|
48
|
-
-
|
|
49
|
-
- If Neo4j is unreachable at session-create, the
|
|
48
|
+
- Every freshly-spawned admin claude session ships the `<onboarding-state currentStep="N">` directive as a third sentinel-wrapped section in `--append-system-prompt` (alongside `<host>` and `<attachment-ceiling>`). The agent's first turn calls `skill-load skillName=onboarding`. Resumed sessions skip the section so the agent doesn't re-ask the same step. (Task 043 — pre-fix the directive was prepended to the first user message; the Claude CLI's Ink TextInput interpreted each `\n` in the block as Enter, dropping the directive bytes before they reached the agent. The system prompt is the only multi-line-safe surface for PTY-spawned Claude Code.)
|
|
49
|
+
- If Neo4j is unreachable at session-create, the section becomes a loud-fail block (`graphUnreachable="true"`) and `onboarding_complete` is reported false — never silently skipped.
|
|
50
50
|
|
|
51
51
|
Diagnostic command on the Pi (substitute the brand's Neo4j port from `~/.maxy/.env` or `~/.realagent/.env`):
|
|
52
52
|
|
|
@@ -61,6 +61,7 @@ Failure signals to grep in `~/.maxy/logs/server.log` (or `~/.realagent/logs/serv
|
|
|
61
61
|
- `[install-invariant] onboarding-state-MISSING`
|
|
62
62
|
- `[onboarding-gate] step=null complete=true` (the pre-Task-033 bug)
|
|
63
63
|
- missing `[skill-load] name=onboarding` while `[onboarding-gate]` reports `complete=false`
|
|
64
|
+
- missing `[onboarding-prompt] step=<n|missing|graph-unreachable> bytes=<n>` for a fresh spawn whose `[pty-spawn] appendSystemPromptBytes=` is at the bare 622-byte host + ceiling size (Task 043 — the onboarding directive failed to ship in the system prompt)
|
|
64
65
|
|
|
65
66
|
## Service Management
|
|
66
67
|
|
|
@@ -68,6 +69,26 @@ Failure signals to grep in `~/.maxy/logs/server.log` (or `~/.realagent/logs/serv
|
|
|
68
69
|
|
|
69
70
|
If you need to restart the service manually (rare), ask {{productName}} to do it for you.
|
|
70
71
|
|
|
72
|
+
## Browsing the brand filesystem on your LAN (SMB)
|
|
73
|
+
|
|
74
|
+
{{productName}} exposes its install folder (`/home/admin/<brand>` on the Pi) as a network share so you can drop files in, drag files out, and edit them from your Mac, Windows PC, iPhone, or Android device. It uses SMB — the same protocol Windows file sharing uses — which every modern OS speaks natively. No client install required.
|
|
75
|
+
|
|
76
|
+
The share is **LAN-only**: it binds to the loopback and your Pi's Wi-Fi/Ethernet interface only. Cloudflare tunnels carry HTTPS for the web UI, not SMB, so the share is invisible from the public internet. Off-LAN access for travelling operators is handled by a separate route (in progress).
|
|
77
|
+
|
|
78
|
+
**Credentials:** SMB user is `admin`; password is your {{productName}} PIN. The installer wires the sync so every time you set or rotate the PIN in the admin UI, the SMB password updates with it.
|
|
79
|
+
|
|
80
|
+
**macOS Finder**: Press `Cmd-K` from any Finder window, type `smb://<hostname>.local` (use the hostname your installer printed — for example `smb://maxy-code.local` or `smb://realagent-code.local`), click Connect, sign in as `admin` with your PIN. The share appears in the Finder sidebar; drag-and-drop works in both directions.
|
|
81
|
+
|
|
82
|
+
**Windows Explorer**: Open File Explorer, type `\\<hostname>.local\<brand>` in the address bar (for example `\\maxy-code.local\maxy-code`), press Enter, sign in as `admin` with your PIN. To keep it across reboots, right-click → "Map network drive".
|
|
83
|
+
|
|
84
|
+
**iOS Files**: Open Files → tap the `…` menu (top-right) → "Connect to Server" → enter `smb://<hostname>.local` → "Registered User" → username `admin`, password is your PIN.
|
|
85
|
+
|
|
86
|
+
**Android (Solid Explorer, CX File Explorer)**: Add a new connection of type SMB / Network. Host = `<hostname>.local`, share = `<brand>` (same as your install folder name), user = `admin`, password = your PIN.
|
|
87
|
+
|
|
88
|
+
**Troubleshooting:** if the mount fails with "logon failure", change your PIN in the admin UI and try again — that re-triggers the smbpasswd sync. If the share doesn't show up at all, your client may need `<hostname>.local` resolved by mDNS — try the Pi's LAN IP address as a fallback (`smb://192.168.1.50` on macOS, `\\192.168.1.50\<brand>` on Windows).
|
|
89
|
+
|
|
90
|
+
The installer maintains the share automatically. To remove it, uninstalling the brand strips its stanza from `/etc/samba/smb.conf` and (when no peer brand remains on the device) stops `smbd`, drops the smbpasswd entry, and purges the samba package.
|
|
91
|
+
|
|
71
92
|
## Remote Access via Cloudflare
|
|
72
93
|
|
|
73
94
|
{{productName}} uses a Cloudflare tunnel to make your local Pi accessible from anywhere without opening router ports. The tunnel is configured during setup and runs as a background service.
|
|
@@ -134,7 +134,7 @@ export declare function searchMessages(config: EmailConfig, password: string, qu
|
|
|
134
134
|
beforeUid?: number;
|
|
135
135
|
}): Promise<PaginatedMessages>;
|
|
136
136
|
/**
|
|
137
|
-
* Result from an incremental email fetch
|
|
137
|
+
* Result from an incremental email fetch performed by the email-fetch dispatcher.
|
|
138
138
|
* Includes the raw envelope data needed for graph storage (not just display).
|
|
139
139
|
*/
|
|
140
140
|
export interface FetchedEmail {
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Dispatcher script: email-fetch
|
|
3
3
|
*
|
|
4
4
|
* Polls IMAP for new emails and persists them as Email nodes in the graph.
|
|
5
|
-
*
|
|
5
|
+
* Standalone dispatcher. Not fired automatically on a running install — the
|
|
6
|
+
* installer-registered cron entry was removed in Task 039 and the replacement
|
|
7
|
+
* surface (Claude Code's desktop scheduled tasks, per maxy-code-prd.md
|
|
8
|
+
* §Scheduled tasks) is not yet wired. Until that lands, this binary runs only
|
|
9
|
+
* when invoked manually or by a future scheduled-task dispatcher. When invoked,
|
|
10
|
+
* checks pollIntervalMinutes before fetching.
|
|
6
11
|
*
|
|
7
12
|
* Flow:
|
|
8
13
|
* 1. Acquire PID lock (skip if another instance is running)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email-fetch.d.ts","sourceRoot":"","sources":["../../src/scripts/email-fetch.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"email-fetch.d.ts","sourceRoot":"","sources":["../../src/scripts/email-fetch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Dispatcher script: email-fetch
|
|
3
3
|
*
|
|
4
4
|
* Polls IMAP for new emails and persists them as Email nodes in the graph.
|
|
5
|
-
*
|
|
5
|
+
* Standalone dispatcher. Not fired automatically on a running install — the
|
|
6
|
+
* installer-registered cron entry was removed in Task 039 and the replacement
|
|
7
|
+
* surface (Claude Code's desktop scheduled tasks, per maxy-code-prd.md
|
|
8
|
+
* §Scheduled tasks) is not yet wired. Until that lands, this binary runs only
|
|
9
|
+
* when invoked manually or by a future scheduled-task dispatcher. When invoked,
|
|
10
|
+
* checks pollIntervalMinutes before fetching.
|
|
6
11
|
*
|
|
7
12
|
* Flow:
|
|
8
13
|
* 1. Acquire PID lock (skip if another instance is running)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email-fetch.js","sourceRoot":"","sources":["../../src/scripts/email-fetch.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"email-fetch.js","sourceRoot":"","sources":["../../src/scripts/email-fetch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzG,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxF,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAkB,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,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C;AACH,CAAC;AAED,IAAI,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IAC/C,GAAG,CAAC,OAAO,EAAE,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACpE,WAAW,EAAE,CAAC;IACd,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -73,7 +73,7 @@ When `agentAddress` is not set or matches the auth email, all tools behave as be
|
|
|
73
73
|
|
|
74
74
|
## Email Persistence
|
|
75
75
|
|
|
76
|
-
Emails are
|
|
76
|
+
Emails are fetched from IMAP and stored as `Email` nodes in the graph. The fetcher binary lives at `email/mcp/dist/scripts/email-fetch.js`. As of Task 039 it is **not currently scheduled on any install** — migration to Desktop scheduled tasks (the canonical dispatch surface, see `maxy-code-prd.md` §Scheduled tasks) is tracked separately. Until that landing, new email is only ingested when an operator invokes the fetcher manually.
|
|
77
77
|
|
|
78
78
|
- **Polling:** After `email-setup` completes, the platform polls IMAP at the configured interval (default: every 5 minutes). Only emails addressed TO the agent's `agentAddress` are stored.
|
|
79
79
|
- **Deduplication:** Each email is identified by its Message-ID header. Re-polling the same messages does not create duplicates, even if the agent's email address changes between poll cycles. A composite unique constraint on `(messageId, accountId)` provides database-level enforcement.
|
|
@@ -82,7 +82,7 @@ Emails are automatically polled from IMAP and stored as `Email` nodes in the gra
|
|
|
82
82
|
|
|
83
83
|
## Email Threading
|
|
84
84
|
|
|
85
|
-
Emails are linked into conversation threads via `REPLY_TO` graph edges. When an email has an `In-Reply-To` header, the platform looks up the parent email by `Message-ID` within the same account and creates an edge. Thread linking happens
|
|
85
|
+
Emails are linked into conversation threads via `REPLY_TO` graph edges. When an email has an `In-Reply-To` header, the platform looks up the parent email by `Message-ID` within the same account and creates an edge. Thread linking happens as part of each fetch run (which is operator-invoked until the dispatcher is wired — see above).
|
|
86
86
|
|
|
87
87
|
- **Out-of-order delivery:** If a reply arrives before its parent, the edge is created later when the parent is stored (orphan back-fill).
|
|
88
88
|
- **Thread context:** `email-read` and `email-search` include `Thread-Depth` (number of hops to the thread root) and `Thread-ID` (emailId of the root message) for any email that is part of a thread. Root emails (no parent) have no thread fields.
|
|
@@ -150,7 +150,7 @@ Classification verdicts are logged to `{accountDir}/logs/email-fetch.log` with p
|
|
|
150
150
|
|
|
151
151
|
## Auto-Respond
|
|
152
152
|
|
|
153
|
-
When enabled, a public agent
|
|
153
|
+
When enabled, a public agent replies to incoming emails. The auto-respond binary lives at `email/mcp/dist/scripts/email-auto-respond.js` and, like the fetcher, is **not currently scheduled on any install** as of Task 039 — see `maxy-code-prd.md` §Scheduled tasks for the canonical dispatch destination. Until that landing, auto-respond only runs when an operator invokes the script manually.
|
|
154
154
|
|
|
155
155
|
### Setup
|
|
156
156
|
|
|
@@ -168,7 +168,7 @@ When called without an `agentSlug`, the tool returns available agents. Present t
|
|
|
168
168
|
|
|
169
169
|
### Behaviour
|
|
170
170
|
|
|
171
|
-
-
|
|
171
|
+
- Once the dispatcher is wired (see above), each account's poll is skipped if the configured interval hasn't elapsed since the last poll. The interval gate is enforced inside `email-auto-respond.js`, so the same skip logic applies whether the script is fired by the dispatcher or manually by an operator.
|
|
172
172
|
- Only emails addressed TO the agent's email address are processed (alias filtering applies).
|
|
173
173
|
- Auto-replies, mailing list messages, and emails from the agent's own address are automatically skipped (RFC 3834 loop prevention).
|
|
174
174
|
- Outgoing replies include `In-Reply-To` and `References` headers for correct threading, and `Auto-Submitted: auto-replied` to prevent loops with other auto-responders.
|