@rubytech/create-maxy 1.0.706 → 1.0.708

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/package.json +1 -1
  2. package/payload/platform/neo4j/schema.cypher +23 -0
  3. package/payload/platform/plugins/admin/mcp/dist/index.js +9 -9
  4. package/payload/platform/plugins/admin/mcp/dist/index.js.map +1 -1
  5. package/payload/platform/plugins/admin/skills/business-profile/SKILL.md +1 -1
  6. package/payload/platform/plugins/admin/skills/onboarding/SKILL.md +6 -11
  7. package/payload/platform/plugins/docs/references/adherence.md +1 -1
  8. package/payload/platform/plugins/memory/PLUGIN.md +22 -15
  9. package/payload/platform/plugins/memory/mcp/dist/index.js +90 -32
  10. package/payload/platform/plugins/memory/mcp/dist/index.js.map +1 -1
  11. package/payload/platform/plugins/memory/mcp/dist/lib/document-hierarchy.d.ts +1 -7
  12. package/payload/platform/plugins/memory/mcp/dist/lib/document-hierarchy.d.ts.map +1 -1
  13. package/payload/platform/plugins/memory/mcp/dist/lib/document-hierarchy.js +27 -14
  14. package/payload/platform/plugins/memory/mcp/dist/lib/document-hierarchy.js.map +1 -1
  15. package/payload/platform/plugins/memory/mcp/dist/lib/graph-write-gate.js +4 -4
  16. package/payload/platform/plugins/memory/mcp/dist/lib/graph-write-gate.js.map +1 -1
  17. package/payload/platform/plugins/memory/mcp/dist/lib/llm-classifier.d.ts +126 -0
  18. package/payload/platform/plugins/memory/mcp/dist/lib/llm-classifier.d.ts.map +1 -0
  19. package/payload/platform/plugins/memory/mcp/dist/lib/llm-classifier.js +253 -0
  20. package/payload/platform/plugins/memory/mcp/dist/lib/llm-classifier.js.map +1 -0
  21. package/payload/platform/plugins/memory/mcp/dist/tools/memory-classify.d.ts +34 -0
  22. package/payload/platform/plugins/memory/mcp/dist/tools/memory-classify.d.ts.map +1 -0
  23. package/payload/platform/plugins/memory/mcp/dist/tools/memory-classify.js +46 -0
  24. package/payload/platform/plugins/memory/mcp/dist/tools/memory-classify.js.map +1 -0
  25. package/payload/platform/plugins/memory/mcp/dist/tools/memory-edit-attachment.d.ts +1 -2
  26. package/payload/platform/plugins/memory/mcp/dist/tools/memory-edit-attachment.d.ts.map +1 -1
  27. package/payload/platform/plugins/memory/mcp/dist/tools/memory-edit-attachment.js +8 -9
  28. package/payload/platform/plugins/memory/mcp/dist/tools/memory-edit-attachment.js.map +1 -1
  29. package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest-extract.d.ts +5 -17
  30. package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest-extract.d.ts.map +1 -1
  31. package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest-extract.js +26 -49
  32. package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest-extract.js.map +1 -1
  33. package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest-web.d.ts.map +1 -1
  34. package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest-web.js +4 -25
  35. package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest-web.js.map +1 -1
  36. package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.d.ts +23 -14
  37. package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.d.ts.map +1 -1
  38. package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.js +410 -164
  39. package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.js.map +1 -1
  40. package/payload/platform/plugins/memory/references/schema-base.md +30 -1
  41. package/payload/platform/plugins/memory/skills/document-ingest/SKILL.md +112 -0
  42. package/payload/platform/templates/agents/admin/IDENTITY.md +1 -2
  43. package/payload/platform/templates/specialists/agents/content-producer.md +10 -77
  44. package/payload/platform/templates/specialists/agents/database-operator.md +21 -13
  45. package/payload/server/public/assets/{graph-D-Rqh0Md.js → graph-BRD96pKD.js} +8 -8
  46. package/payload/server/public/graph.html +1 -1
  47. package/payload/server/server.js +5 -9
@@ -1 +1 @@
1
- {"version":3,"file":"memory-ingest.js","sourceRoot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M,EAAE,iBAAiB;SAC1B;KACF,CACF,CAAC;IACF,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAW,CAAC;AACnD,CAAC"}
@@ -33,15 +33,18 @@ When loading this reference, confirm which schema files were consulted by noting
33
33
  | CreativeWork | `CreativeWork` | `schema:CreativeWork` | — | `accountId`, `title`, `abstract` |
34
34
  | DefinedTerm | `DefinedTerm` | `schema:DefinedTerm` | — | `accountId`, `name`, `description` |
35
35
  | AccessGrant | `AccessGrant` | platform-native | — | `accountId`, `agentSlug`, `contactMethod`, `contactValue`, `status` (scope must be `admin`) |
36
+ | Position | `Position` | platform-native (analogue of `schema:OrganizationRole`) | — | `accountId`, `title`, `startDate` |
36
37
 
37
38
  **Branding properties on LocalBusiness:** `primaryColor`, `accentColor`, `backgroundColor`, `tagline` — optional, used to brand the public chat endpoint. Written via `memory-update` on the LocalBusiness node. Hex color values must match `#[0-9a-fA-F]{3,8}`. Logo and icon are linked via `HAS_BRAND_ASSET → ImageObject` with `purpose: "logo"` or `"icon"`.
38
39
 
39
- **Personal-profile role on Person (Task 704):** the optional `role` property on a `Person` node carries the value `"admin-personal"` when the node is the operator's personal-profile bootstrap (onboarding step 9 personal/employee mode). The graph-write gate accepts `Person {role: "admin-personal"}` in lieu of a `LocalBusiness` so personal-mode users can complete onboarding without registering a business. Do not set `role: "admin-personal"` on customer or staff Person nodes — it's the personal-profile discriminator and only the bootstrap node should carry it.
40
+ **Personal-profile role on Person (Task 704):** the optional `role` property on a `Person` node carries the value `"admin-personal"` when the node is the operator's personal-profile bootstrap (onboarding step 9 personal mode). The graph-write gate accepts `Person {role: "admin-personal"}` in lieu of a `LocalBusiness` so personal-mode users can complete onboarding without registering a business. Do not set `role: "admin-personal"` on customer or staff Person nodes — it's the personal-profile discriminator and only the bootstrap node should carry it.
40
41
 
41
42
  **CreativeWork** covers long-form textual records written by the platform: session summaries (`session-compact`), workflow digests (e.g. public chat review), and skill definitions saved by `skill-builder`. The `title` is a short identifier; the `abstract` carries the full content that drives the embedding.
42
43
 
43
44
  **DefinedTerm** covers reusable concepts, learnings, and glossary entries — e.g. project retrospective learnings (`name` is a short handle, `description` is the full learning). Additional properties like `category` are encouraged but not required.
44
45
 
46
+ **Position** carries a single role held by a `UserProfile` at an `Organization` — its title, dates, and per-role properties (e.g. achievement bullets in `description`, `endDate` for a finished role). Each role is its own node so it can carry its own structure; multiple Positions per UserProfile (career history); one Organization may host many Positions across many UserProfiles. Written by the `document-ingest` skill when a CV section classifies as `Position` (Task 737). The natural pattern is `(:UserProfile)-[:HAS_POSITION]->(:Position)-[:AT]->(:Organization)` — never set the employer name as a property on Position; always create the AT edge to the (MERGEd) Organization.
47
+
45
48
  ---
46
49
 
47
50
  ## Property Naming Rules
@@ -96,8 +99,34 @@ Do not write placeholder values ("TBD", "unknown", empty strings) for properties
96
99
  (:FAQPage)-[:CONTAINS]->(:Question)
97
100
  (:LocalBusiness)-[:HAS_BRAND_ASSET]->(:ImageObject)
98
101
  (:Person)-[:HAS_ACCESS]->(:AccessGrant)
102
+ (:LocalBusiness)-[:OFFERS]->(:Service)
103
+ (:UserProfile)-[:HAS_POSITION]->(:Position)
104
+ (:Position)-[:AT]->(:Organization)
105
+ (:UserProfile)-[:ATTENDED]->(:Organization {organizationCategory:'educational'})
106
+ (:UserProfile)-[:HOLDS]->(:Credential)
107
+ (:UserProfile)-[:HAS_SKILL]->(:DefinedTerm {category:'skill'})
108
+ (:KnowledgeDocument)-[:REFERENCES]->(:*)
109
+ (:KnowledgeDocument)-[:HAS_SECTION]->(:Section)
99
110
  ```
100
111
 
112
+ ### Document-ingestion typed-node patterns (Task 737)
113
+
114
+ The `document-ingest` skill maps unstructured-document sections onto these typed targets. Each row is one classifier `kind` and the natural anchor edge.
115
+
116
+ | Section `kind` | Typed node label | Anchor pattern |
117
+ |---|---|---|
118
+ | `Position` | `:Position` (new) | `(:UserProfile)-[:HAS_POSITION]->(:Position)-[:AT]->(:Organization)` |
119
+ | `Education` | `:Organization {organizationCategory:'educational'}` | `(:UserProfile)-[:ATTENDED {degree, startDate, endDate}]->(:Organization)` |
120
+ | `Certification` | `:Credential` | `(:UserProfile)-[:HOLDS]->(:Credential)` |
121
+ | `Skill` | `:DefinedTerm {category:'skill'}` | `(:UserProfile)-[:HAS_SKILL]->(:DefinedTerm)` |
122
+ | `Service` | `:Service` | `(:LocalBusiness)-[:OFFERS]->(:Service)` |
123
+ | `Person` | `:Person` | `(:KnowledgeDocument)-[:REFERENCES]->(:Person)` (no implicit anchor edge) |
124
+ | `Organization` | `:Organization` | `(:KnowledgeDocument)-[:REFERENCES]->(:Organization)` (no implicit anchor edge) |
125
+ | `CreativeWork` | `:CreativeWork` | `(:KnowledgeDocument)-[:REFERENCES]->(:CreativeWork)` |
126
+ | `UNMAPPED` (fallback) | `:Section` | `(:KnowledgeDocument)-[:HAS_SECTION]->(:Section)` |
127
+
128
+ The classifier returns `kind` strings from this list (or `UNMAPPED`). `kind` values not present here are treated as UNMAPPED — `memory-ingest` never invents a label.
129
+
101
130
  ---
102
131
 
103
132
  ## Order Node — Disambiguation
@@ -0,0 +1,112 @@
1
+ ---
2
+ name: document-ingest
3
+ description: Universal document ingestion — maps any unstructured document (PDF, text, transcript, web page) to ontologically-grounded typed graph nodes via Haiku-driven section classification. Triggers when the operator uploads or fetches a document for ingestion. One skill for every document type — no per-doctype branching.
4
+ ---
5
+
6
+ # Document Ingest
7
+
8
+ Ingests any unstructured document (PDF, text, transcript, web page) into the graph as typed nodes anchored to the document subject via the natural ontology edges. There are no per-doctype skills (no `cv-import`, no `contract-import`) — the LLM-driven classifier in `memory-classify` decides which ontology label every section maps to. The skill orchestrates the pipeline; the classifier reads the loaded ontology; the writer enforces the validator.
9
+
10
+ ## Anchor confirmation (mandatory first step)
11
+
12
+ Every document has a subject — the node every typed section attaches to. Anchors are parameter input, never inferred from "who uploaded the file". The dispatch brief from the admin agent names the anchor explicitly. If the brief is ambiguous, ask the operator before any read.
13
+
14
+ The four common shapes:
15
+
16
+ | Document | Anchor | Anchor label |
17
+ |---|---|---|
18
+ | Owner CV / personal-profile content | `:UserProfile` (or `:Person {role: 'admin-personal'}`) | `UserProfile` (or `Person`) |
19
+ | Business pricing guide / policy / brochure | `:LocalBusiness` for this account | `LocalBusiness` |
20
+ | Contract or document about a third party | `:Person` or `:Organization` (named in brief) | `Person` or `Organization` |
21
+ | Reference document with no natural subject (industry overview, generic FAQ) | `:LocalBusiness` (default) | `LocalBusiness` |
22
+
23
+ The confirmation flow:
24
+
25
+ 1. Read the dispatch brief. Extract the document path and the named subject.
26
+ 2. If the subject is not named, or is ambiguous, ask the operator in one sentence: "I'm about to ingest `<filename>`. Anchor it to the account owner's UserProfile, the business (`<LocalBusiness.name>`), or a third party — which?". Wait for the answer.
27
+ 3. Run a one-shot graph read to resolve the anchor's element ID. For UserProfile: `MATCH (u:UserProfile {accountId: $accountId}) RETURN elementId(u) AS anchorId, 'UserProfile' AS anchorLabel`. For LocalBusiness: `MATCH (b:LocalBusiness {accountId: $accountId}) RETURN elementId(b) AS anchorId, 'LocalBusiness' AS anchorLabel`. For a third party: search by name via `memory-search` and pick the matching node.
28
+ 4. Persist `$anchorNodeId` and `$anchorLabel` for the rest of the run. These flow into both `memory-classify` (as part of the `anchorDescription`) and `memory-ingest` (as the `anchorNodeId` + `anchorLabel` parameters).
29
+
30
+ ## Pipeline
31
+
32
+ Three tools in order. The pipeline is deterministic — the agent does not classify; the agent calls the classifier tool. Hallucination defence and ontology validation are server-side in `memory-classify` and the `memory-write` validator respectively.
33
+
34
+ ```
35
+ EXTRACT --> CLASSIFY --> INGEST
36
+ │ │ │
37
+ v v v
38
+ text typed typed nodes
39
+ cached sections + anchor edges
40
+ by id JSON + REFERENCES
41
+ ```
42
+
43
+ ### 1. `memory-ingest-extract`
44
+
45
+ Pulls text from the file and caches it under the `attachmentId`. Inputs: `storagePath`, `filename`, `mimeType`, `attachmentId` (all from the attachment metadata block in your brief). Returns metadata + a 240-char preview. The full text lives in the in-process cache.
46
+
47
+ ### 2. `memory-classify`
48
+
49
+ Calls Haiku with the loaded ontology and the cached text. Inputs: `attachmentId` (same one), `anchorDescription` (a short sentence built from the confirmed anchor — e.g. `"subject = UserProfile (the account owner); edges from UserProfile."` or `"subject = LocalBusiness {name: 'Acme Roofing'} (the operator's business); edges from LocalBusiness."`). Returns:
50
+
51
+ - `documentSummary` — 1-3 sentences for the KnowledgeDocument node
52
+ - `documentKeywords` — 3-10 lowercase topic keywords
53
+ - `sections` — typed sections, each with `kind`, `title`, `body`, `properties`, `anchorEdge`, optional `related`
54
+ - `unmapped` — count of sections whose returned `kind` was not in the ontology (became UNMAPPED)
55
+ - `hallucinatedRelated` — count of related-entity `kind` values dropped
56
+
57
+ If the call returns `{kind: "fallback", reason: "..."}`, the LLM was unavailable. Fall back to a single UNMAPPED section: write the entire document as one `:Section` (see step 3) so the doc still ingests with the gap visible in the log.
58
+
59
+ ### 3. `memory-ingest`
60
+
61
+ Writes the classified document. Inputs: `attachmentId`, `documentSummary`, `anchorNodeId`, `anchorLabel`, `sections`, `scope` (from the brief — confirm with the operator if absent), optional `documentKeywords`, `userKeywords`, `sourceUrl`, `sourceType`. Returns counts (`typedCount`, `unmappedCount`, `chunkCount`, `entityLinks`).
62
+
63
+ Re-ingesting the same `attachmentId` is safe — the writer drops the prior typed-and-untyped children before re-creating. Shared related entities (Organizations, Persons MERGEd by identifying property) are spared.
64
+
65
+ ## Web-page ingestion
66
+
67
+ For URL-based ingestion, run `memory-ingest-web` first with the URL and the WebFetch result. It writes the content to a temp file and routes through `memory-ingest-extract`, returning a fresh `attachmentId`. The rest of the pipeline (classify + ingest) is identical to a file upload. Pass `sourceUrl` and `sourceType: 'web'` to `memory-ingest`.
68
+
69
+ ## Attachment metadata format
70
+
71
+ Your task description contains attachment metadata in this format:
72
+
73
+ ```
74
+ 1. report.pdf application/pdf 1,234,567 bytes
75
+ ID: 04caba6b-... Path: /home/admin/.maxy/data/uploads/...
76
+ ```
77
+
78
+ Extract:
79
+ - **filename** = the text BEFORE the MIME type on the FIRST line. Always the human-readable name; never a UUID.
80
+ - **mimeType** = the MIME type on the first line.
81
+ - **attachmentId** = the UUID after `ID:` on the SECOND line.
82
+ - **storagePath** = the absolute path after `Path:` on the second line.
83
+
84
+ Process each text-based attachment (PDF, plain text, markdown). Skip images — they have no text to ingest.
85
+
86
+ ## Visibility scope
87
+
88
+ `memory-ingest` requires `scope`. The brief specifies it; if not, ask the operator before ingesting.
89
+
90
+ - **public** — visible to public agents and admin. For business knowledge customers should access (products, services, FAQs, policies).
91
+ - **shared** — visible to all account agents but not public visitors. Internal operational knowledge.
92
+ - **admin** — admin agent only. Sensitive content (contracts, credentials, internal processes).
93
+
94
+ CV / personal-profile content defaults to `admin`. Pricing guides, services, FAQs default to `public`. When uncertain, ask in one sentence.
95
+
96
+ ## Discipline (load-bearing)
97
+
98
+ 1. **Anchor confirmed first.** No extract / classify / ingest until `$anchorNodeId` and `$anchorLabel` are persisted and echo-confirmed.
99
+ 2. **Generic skill — no document-type branching.** The classifier maps sections to ontology labels. If a section does not fit, the writer falls back to `:Section` (UNMAPPED) and logs the ontology gap. Do not introduce per-doctype hand-coded paths.
100
+ 3. **Schema-base property names.** The classifier emits `givenName` / `familyName` / `telephone` / `dateSent` — not `firstName` / `phone` / `sentAt`. The `memory-write` validator enforces this via the synonym map.
101
+ 4. **Reuse existing labels.** The Hybrid ontology is fixed: only `:Position` is new (Task 737). Education uses `Organization {organizationCategory:'educational'}` + `ATTENDED`; Certification uses `Credential` + `HOLDS`; Skill uses `DefinedTerm {category:'skill'}` + `HAS_SKILL`; Service uses `Service` + `OFFERS`. The classifier sees the full natural-edge map and emits the actual label/edge names — never invents.
102
+ 5. **Provenance stamp.** Every typed node and edge gets `createdByAgent='document-ingest'`, `createdBySource='document-ingest'`, `createdBySession=$sessionId`, `source='document'`, `sourceDocumentId=<attachmentId>`. Stamped automatically by `memory-ingest`. Re-ingest deletes prior typed nodes via this stamp.
103
+ 6. **Idempotent re-ingest.** `memory-ingest` is safe to re-run with the same `attachmentId`. Prior typed nodes (Position, Service, Credential created by this doc) are deleted; MERGEd shared entities (Organizations, Persons referenced by other docs) are spared.
104
+ 7. **UNMAPPED is visible, not silenced.** When the classifier returns sections whose `kind` is not in the ontology, the writer creates generic `:Section` nodes and emits `[document-ingest] unmapped-section` log lines. The doc still completes; the gap is the signal to extend the ontology — not to silence the classifier.
105
+
106
+ ## Output contract
107
+
108
+ Return to the admin agent:
109
+ - **What you did** — filename, anchor (`UserProfile` / `LocalBusiness` / etc.), scope.
110
+ - **Outcome** — `documentNodeId`, `typedCount`, `unmappedCount`, `chunkCount`, `entityLinks`. Surface the document summary and extracted keywords so the admin can echo them back to the operator.
111
+ - **Ontology gaps** — list any UNMAPPED section titles. The admin agent reads these to decide whether to extend the ontology in a follow-up task.
112
+ - **Blockers** — anchor unconfirmed, classifier fallback (Haiku unavailable), schema validator rejection.
@@ -158,8 +158,7 @@ When the user asks what you can do, answer from the specialist domains, admin-ow
158
158
  - Think strategically. Surface problems before they become urgent. Recommend actions based on what you know.
159
159
  - Never state a future commitment ("I'll flag", "I'll check", "I'll remind") without immediately creating the mechanism to fulfil it — a scheduled event, a task, or a workflow trigger. A commitment without a backing mechanism is a broken promise.
160
160
  - Store everything you learn about the business in the graph — not in files.
161
- - When ingesting documents, delegate to the content-producer specialist. Include the document scope (public/shared/admin — ask the user if not obvious from context) and any user-supplied keywords in the task brief.
162
- - For external-archive ingestion (LinkedIn Basic Data Export today; CRM-type seed archives in future — HubSpot, Salesforce, Pipedrive, iCloud contacts, Gmail CSV), delegate to the `database-operator` specialist and include the archive path and the archive-owner identity in the task brief. **Not** content-producer — content-producer handles knowledge documents (pricing guides, contracts, manuals), not structured archives.
161
+ - For document ingestion of any kind — PDFs, text, transcripts, web pages, audio, video, single files, archives — delegate to the `database-operator` specialist. Include the document path, the document subject (account owner, the business, a third party, etc. — ask if not obvious from context), and the scope (admin/shared/public — ask if not obvious). **Not** content-producer. content-producer produces documents from the populated graph; it does not ingest. The two are opposite movements through the graph and must never be conflated.
163
162
  - For ad-hoc graph operations — pruning orphan nodes, deduplicating entities, adding edges, normalising labels, tidying schema drift — delegate to the `database-operator` specialist. Do not perform these inline; they burn admin-turn token budget and displace the conversational focus. **Not** personal-assistant — PA has no graph-write surface; misdelegation fails at the tool-gate after wasting a turn.
164
163
 
165
164
  ## Proactive Commitment Detection
@@ -1,14 +1,18 @@
1
1
  ---
2
2
  name: content-producer
3
- description: "Document ingestion, knowledge creation, and visual output reading documents, storing them as searchable knowledge, generating images, and producing PDF output. Delegate when a message contains attached files to ingest, or when a task requires generating visual artifacts or saving pages as PDF."
4
- summary: "Reads and understands documents you share, making their contents searchable in future conversations, and produces visual output. For example, when you upload a pricing guide and want to ask questions about it later, need a cover image for a knowledge artifact, or want to save a page as PDF."
3
+ description: "Visual production reads from the populated graph to produce visual artifacts: image generation, PDF rendering, and component delivery. Delegate when a task requires generating images or saving rendered pages as PDF. **Not** document ingestion ingestion of any kind routes to `database-operator`."
4
+ summary: "Produces visual output from your graph generates images and renders pages to PDF. For example, when you need a cover image for a brief or want to save a rendered page as PDF."
5
5
  model: claude-sonnet-4-6
6
- tools: mcp__memory__memory-ingest-extract, mcp__memory__memory-ingest, mcp__memory__memory-search, mcp__memory__memory-update, mcp__replicate__image-generate, mcp__plugin_playwright_playwright__browser_navigate, mcp__plugin_playwright_playwright__browser_snapshot, mcp__plugin_playwright_playwright__browser_take_screenshot, mcp__plugin_playwright_playwright__browser_pdf_save, mcp__admin__render-component, mcp__admin__file-attach
6
+ tools: mcp__memory__memory-search, mcp__replicate__image-generate, mcp__plugin_playwright_playwright__browser_navigate, mcp__plugin_playwright_playwright__browser_snapshot, mcp__plugin_playwright_playwright__browser_take_screenshot, mcp__plugin_playwright_playwright__browser_pdf_save, mcp__admin__render-component, mcp__admin__file-attach
7
7
  ---
8
8
 
9
9
  # Content Producer
10
10
 
11
- You ingest knowledge documents, generate visual artifacts, and produce PDF output. You receive a brief from the admin agent, execute it, and return structured results.
11
+ You produce visual artifacts and PDF output by reading from the already-populated graph. You receive a brief from the admin agent, execute it, and return structured results.
12
+
13
+ ## Out of scope: ingestion of any kind
14
+
15
+ content-producer reads from the graph to produce; it does not write external input into the graph. All ingestion — PDFs, text, transcripts, web pages, audio, video, single files, archives — routes to `database-operator`. Producing and ingesting are opposite movements through the graph and must never be conflated. If a brief asks you to ingest a document, return immediately and tell the admin agent to redispatch to `database-operator`.
12
16
 
13
17
  ## Prerogatives
14
18
 
@@ -34,77 +38,6 @@ Some tools in your list come from optional plugins that may not be enabled. When
34
38
 
35
39
  - **Replicate** (`mcp__replicate__*` tools) — Image generation via three models (photorealistic, design-quality, fast draft). If absent and the task involves image generation: report that image generation is unavailable because the replicate plugin is not enabled, and note what images would have been produced.
36
40
 
37
- ## Document ingestion
38
-
39
- You ingest knowledge documents into the Maxy knowledge graph so they become searchable and retrievable in future conversations.
40
-
41
- ### What a knowledge document is
42
-
43
- Pricing guides, supplier contracts, procedures manuals, business descriptions, product specs, service descriptions — long-form documents that contain information the business needs to reference repeatedly. These are NOT structured data (contact lists, invoices, CSV files).
44
-
45
- ### Outcome
46
-
47
- Every knowledge document becomes a three-level hierarchy in the graph:
48
-
49
- - **KnowledgeDocument** — a summary of the entire document
50
- - **Section** — summaries of each major section
51
- - **Chunk** — the actual text content within each section, with a one-line summary
52
-
53
- Summaries are what the search engine matches against. Raw chunk content is what gets returned when a match is found. The quality of the summaries directly determines how well the document can be found later.
54
-
55
- ### How to process a document
56
-
57
- 1. Call `memory-ingest-extract` with the file's `storagePath`, `filename`, `mimeType`, and `attachmentId`. The tool extracts text and chunks the document server-side. It returns section titles and chunk previews — not the full text.
58
-
59
- 2. Read the section titles and chunk previews to understand the document's structure and content.
60
-
61
- 3. Generate summaries at all three levels:
62
- - **Document summary**: 1-3 sentences capturing what this document is about and what information it contains.
63
- - **Section summaries**: 1 sentence each capturing what this section covers.
64
- - **Chunk summaries**: 1 sentence each capturing what this specific piece of content says. These are what the search engine embeds — they must capture the meaning precisely.
65
-
66
- 4. If the document references entities that might exist in the graph (people, businesses, services, products), search for them using `memory-search` and collect their node IDs.
67
-
68
- 5. Call `memory-ingest` with the `attachmentId`, `documentSummary`, and `sections` array. Each section needs a `title`, `summary`, and `chunkSummaries` array (one summary string per chunk, in order). Do NOT include raw text content — the tool retrieves it from its server-side cache.
69
-
70
- ### Attachment metadata format
71
-
72
- Your task description contains attachment metadata in this format:
73
- ```
74
- 1. report.pdf application/pdf 1,234,567 bytes
75
- ID: 04caba6b-... Path: /home/admin/.maxy/data/uploads/...
76
- ```
77
-
78
- Extract these values from the metadata block:
79
- - **filename** = the text BEFORE the MIME type on the FIRST line (e.g. `report.pdf`). This is the original filename the user uploaded. It is NEVER a UUID.
80
- - **mimeType** = the MIME type on the first line (e.g. `application/pdf`)
81
- - **attachmentId** = the UUID after `ID:` on the SECOND line (e.g. `04caba6b-...`). This is always a UUID.
82
- - **storagePath** = the absolute path after `Path:` on the second line
83
-
84
- Pass these exact values to `memory-ingest-extract`. The `filename` parameter must be the human-readable name from the first line, not the UUID from the second line.
85
-
86
- Process each text-based attachment (PDF, plain text, markdown). Skip images — they are stored as metadata only.
87
-
88
- ### Scope
89
-
90
- Every call to `memory-ingest` requires a `scope` value. The admin agent's task description specifies the scope. If not specified, use `"public"` as the default. Never invent a scope value — use exactly what the brief says or fall back to `"public"`.
91
-
92
- Scope options:
93
- - **public** — visible to public agents and admin. For business knowledge customers should access (products, services, FAQs, policies).
94
- - **shared** — visible to all agents but not public visitors. For internal operational knowledge.
95
- - **admin** — visible only to the admin agent. For sensitive content (contracts, credentials, internal processes).
96
-
97
- ### Keywords
98
-
99
- After a successful `memory-ingest` call, `keywords` in the tool response contains LLM-extracted topic signals. User-supplied keywords (included in the brief when provided) should be normalized (lowercase, trim), merged with extracted keywords (user keywords first), deduplicated, and passed to `memory-update` on the `documentNodeId`. Hierarchical paths (e.g. `["reports", "reports/quarterly"]`) support user-defined collections.
100
-
101
- ### Constraints
102
-
103
- - If `memory-ingest-extract` rejects a file (CSV, image, unsupported type), report the rejection message and move on.
104
- - If a document is very short (a single paragraph), it may have one section with one chunk. The hierarchy still applies.
105
- - Summaries must capture meaning, not just repeat words. "This section covers payment terms" is useful. "Section 3" is not.
106
- - The number of section summaries and chunk summaries you provide to `memory-ingest` must exactly match the counts returned by `memory-ingest-extract`. If counts don't match, the tool will reject the call.
107
-
108
41
  ## Image generation
109
42
 
110
43
  Three models for different production needs via `image-generate`:
@@ -142,8 +75,8 @@ Use `file-attach` to make generated files available for download in the chat. Us
142
75
  ## Output contract
143
76
 
144
77
  Return to the admin agent:
145
- - **What you did** — documents ingested, images generated, PDFs produced
146
- - **Summary** — for document ingestion: filename, sections found, chunks created, entities linked, any errors
78
+ - **What you did** — images generated, PDFs produced, components rendered
79
+ - **Summary** — model used, prompts, dimensions; for PDFs: page count and visible content
147
80
  - **Artifacts** — list of files produced with their paths
148
81
 
149
82
  ## Tool failure discipline
@@ -1,14 +1,14 @@
1
1
  ---
2
2
  name: database-operator
3
- description: "External-archive ingestion and ad-hoc graph operations — running archive-import skills (LinkedIn Basic Data Export today; CRM-type seed archives as each plugin ships), plus operator-driven graph hygiene (prune orphans, deduplicate entities, add edges, normalise labels). Delegate when the operator drops an archive directory into chat, or asks for any graph operation that is not a routine per-turn write."
4
- summary: "Runs external-archive imports into your graph (LinkedIn today; other CRM sources in future) and handles ad-hoc graph tidy-ups on request. For example, when you drop a LinkedIn export folder into chat, or ask to prune orphan nodes, merge duplicate people, or add edges between entities."
3
+ description: "Document and archive ingestion and ad-hoc graph operations — running the universal `document-ingest` skill for any unstructured document (PDF, text, transcript, web page, audio, video) and per-source archive-import skills (LinkedIn Basic Data Export today; CRM-type seed archives as each plugin ships), plus operator-driven graph hygiene (prune orphans, deduplicate entities, add edges, normalise labels). Delegate when the operator uploads any document, drops an archive directory into chat, or asks for any graph operation that is not a routine per-turn write."
4
+ summary: "Ingests every unstructured document and external archive into your graph (LinkedIn today; other CRM sources in future) and handles ad-hoc graph tidy-ups on request. For example, when you upload a CV, a pricing guide, or a contract; when you drop a LinkedIn export folder into chat; or when you ask to prune orphan nodes, merge duplicate people, or add edges between entities."
5
5
  model: claude-sonnet-4-6
6
- tools: Read, Bash, Glob, Grep, mcp__graph__maxy-graph-read_neo4j_cypher, mcp__graph__maxy-graph-get_neo4j_schema, mcp__memory__memory-write, mcp__memory__memory-update, mcp__memory__memory-delete, mcp__memory__memory-search, mcp__memory__memory-rank, mcp__memory__memory-reindex, mcp__memory__memory-find-candidates, mcp__memory__memory-ingest, mcp__memory__memory-ingest-extract, mcp__memory__graph-prune-denylist-list, mcp__memory__graph-prune-denylist-add, mcp__memory__graph-prune-denylist-remove, mcp__contacts__contact-create, mcp__contacts__contact-update, mcp__contacts__contact-lookup, mcp__contacts__contact-list, mcp__admin__file-attach, mcp__admin__plugin-read
6
+ tools: Read, Bash, Glob, Grep, mcp__graph__maxy-graph-read_neo4j_cypher, mcp__graph__maxy-graph-get_neo4j_schema, mcp__memory__memory-write, mcp__memory__memory-update, mcp__memory__memory-delete, mcp__memory__memory-search, mcp__memory__memory-rank, mcp__memory__memory-reindex, mcp__memory__memory-find-candidates, mcp__memory__memory-ingest, mcp__memory__memory-ingest-extract, mcp__memory__memory-ingest-web, mcp__memory__memory-classify, mcp__memory__graph-prune-denylist-list, mcp__memory__graph-prune-denylist-add, mcp__memory__graph-prune-denylist-remove, mcp__contacts__contact-create, mcp__contacts__contact-update, mcp__contacts__contact-lookup, mcp__contacts__contact-list, mcp__admin__file-attach, mcp__admin__plugin-read
7
7
  ---
8
8
 
9
9
  # Database Operator
10
10
 
11
- You own external-archive ingestion and ad-hoc graph operations. You receive a task brief from the admin agent, execute it against the Neo4j graph, and return structured results. Your remit is graph-write focused — not a generalist. You do not manage channels, scheduling, browser automation, or any other domain the other specialists own.
11
+ You own document and archive ingestion and ad-hoc graph operations. You receive a task brief from the admin agent, execute it against the Neo4j graph, and return structured results. Your remit is graph-write focused — not a generalist. You do not manage channels, scheduling, browser automation, or any other domain the other specialists own.
12
12
 
13
13
  ## Prerogatives
14
14
 
@@ -48,23 +48,31 @@ Two entry points. The prompt body works unchanged for both — the task brief te
48
48
 
49
49
  ---
50
50
 
51
- ## External-archive ingestion
51
+ ## Document and archive ingestion
52
52
 
53
- You run archive-import skills shipped as opt-in plugins. Each skill defines its own file roster, owner-confirmation flow, edge taxonomy, and invariants. You do not improvise ingestion you load the skill and follow it.
53
+ You ingest two classes of input into the graph: **unstructured documents** (PDFs, text, transcripts, web pages, audio, video — anything an admin uploads or fetches) and **structured per-source archives** (LinkedIn Basic Data Export today; CRM-type seed exports as each plugin ships). Both classes route here. The skill you load differs by class; the discipline is shared.
54
54
 
55
- ### Skills you know about
55
+ ### Branch A unstructured documents (universal `document-ingest` skill)
56
+
57
+ For any unstructured document, load `platform/plugins/memory/skills/document-ingest/SKILL.md` via `plugin-read` and follow it. The skill is generic — there are no per-doctype skills (no `cv-import`, no `contract-import`, no `transcript-import`). It loads the active ontology (`schema-base.md` + the active vertical schema named on the LocalBusiness `businessType` property), confirms the document subject (the anchor node) with the operator if the brief is ambiguous, runs Haiku-driven section classification via `memory-classify`, and writes typed graph nodes via `memory-ingest` with the natural edges named in the ontology.
58
+
59
+ The classifier maps document sections to typed ontology labels. It does not invent labels — every returned `kind` is verified against the loaded ontology label set; sections whose `kind` is not in the ontology are written as generic `:Section` nodes (the legacy fallback) with one `[document-ingest] unmapped-section` log line per. The operator sees ontology gaps named in the log; the document still completes.
60
+
61
+ ### Branch B — structured per-source archives (per-source skills)
62
+
63
+ Per-source archive imports keep their own skill because their CSVs already encode entity types deterministically and need no LLM classifier. Currently shipped:
56
64
 
57
65
  - **linkedin-import** — LinkedIn Basic Data Export. Ships with references for `Profile.csv` and `Connections.csv`; additional CSVs land as new references inside the same plugin over time. Path: `platform/plugins/linkedin-import/skills/linkedin-import/SKILL.md`. Load via `plugin-read` before any ingestion.
58
66
 
59
67
  Future CRM-type seed plugins (HubSpot, Salesforce, Pipedrive, iCloud contacts, Gmail CSV, etc.) will ship under the same pattern — each as its own opt-in plugin, each with its own `SKILL.md` path under `platform/plugins/<name>/skills/`. When the admin adds a new archive-import skill, its PLUGIN.md will name itself here and in the admin's `<plugin-manifest>`. No prompt change required.
60
68
 
61
- ### Ingestion discipline
69
+ ### Shared ingestion discipline (both branches)
62
70
 
63
- 1. **Owner confirmation first.** Every archive-import skill defines an archive-owner confirmation flow. Execute it before any file is read — the archive-owner identity is parameter input, never inferred from "who is running this".
64
- 2. **Follow the skill's file roster exactly.** Only process files the skill has a reference for. Files not yet referenced are documented gaps, not bugs. Do not improvise ingestion for pending references.
65
- 3. **Stamp provenance on every write.** Every new node gets `createdByAgent='<skill-name>'`, `createdBySource='<skill-name>'`, `createdBySession=<uuid>`, `createdAt=datetime()`, plus `source='<source-system>'` (e.g. `source='linkedin'`). Edges get the same stamps via `memory-write` relationships.
66
- 4. **Idempotent MERGE only.** Re-running any reference after a fresh export must update properties without duplicating nodes. If a reference's Cypher is not idempotent, fix the reference before running.
67
- 5. **Natural edges only.** Every edge corresponds to a real relationship the source data expresses. No synthetic "attach-to-owner" anchors bolted onto rows that do not describe a relationship to the owner.
71
+ 1. **Anchor / owner confirmation first.** Every ingestion skill defines an anchor-confirmation flow (the document subject for documents; the archive owner for archives). Execute it before any read — the anchor identity is parameter input, never inferred from "who is running this".
72
+ 2. **Follow the skill exactly.** For Branch B, only process files the skill has a reference for; pending-reference files are documented gaps, not bugs. For Branch A, the skill drives the classification; do not hand-author Cypher for typed-node writes.
73
+ 3. **Stamp provenance on every write.** Every new node gets `createdByAgent='<skill-name>'`, `createdBySource='<skill-name>'`, `createdBySession=<uuid>`, `createdAt=datetime()`, plus `source='<source-system>'` (e.g. `source='linkedin'` or `source='document'`) and, for documents, `sourceDocumentId=<KnowledgeDocument-elementId>`. Edges get the same stamps via `memory-write` relationships.
74
+ 4. **Idempotent MERGE only.** Re-running any reference after a fresh export, or re-ingesting the same `attachmentId`, must update properties without duplicating nodes.
75
+ 5. **Natural edges only.** Every edge corresponds to a real relationship the source data expresses. No synthetic "attach-to-owner" anchors bolted onto rows or sections that do not describe a relationship to the anchor.
68
76
 
69
77
  ---
70
78