@rubytech/create-maxy 1.0.708 → 1.0.710

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 (59) hide show
  1. package/package.json +1 -1
  2. package/payload/platform/lib/mcp-spawn-tee/dist/index.d.ts +53 -0
  3. package/payload/platform/lib/mcp-spawn-tee/dist/index.d.ts.map +1 -0
  4. package/payload/platform/lib/mcp-spawn-tee/dist/index.js +132 -0
  5. package/payload/platform/lib/mcp-spawn-tee/dist/index.js.map +1 -0
  6. package/payload/platform/lib/mcp-spawn-tee/src/index.ts +134 -0
  7. package/payload/platform/lib/mcp-spawn-tee/tsconfig.json +8 -0
  8. package/payload/platform/lib/oauth-llm/dist/index.d.ts +101 -0
  9. package/payload/platform/lib/oauth-llm/dist/index.d.ts.map +1 -0
  10. package/payload/platform/lib/oauth-llm/dist/index.js +353 -0
  11. package/payload/platform/lib/oauth-llm/dist/index.js.map +1 -0
  12. package/payload/platform/lib/oauth-llm/src/index.ts +526 -0
  13. package/payload/platform/lib/oauth-llm/tsconfig.json +8 -0
  14. package/payload/platform/neo4j/schema.cypher +37 -11
  15. package/payload/platform/package.json +2 -2
  16. package/payload/platform/plugins/docs/references/plugins-guide.md +12 -4
  17. package/payload/platform/plugins/email/mcp/dist/lib/screening.d.ts +3 -3
  18. package/payload/platform/plugins/email/mcp/dist/lib/screening.d.ts.map +1 -1
  19. package/payload/platform/plugins/email/mcp/dist/lib/screening.js +12 -12
  20. package/payload/platform/plugins/email/mcp/dist/lib/screening.js.map +1 -1
  21. package/payload/platform/plugins/email/mcp/dist/scripts/email-auto-respond.js +14 -28
  22. package/payload/platform/plugins/email/mcp/dist/scripts/email-auto-respond.js.map +1 -1
  23. package/payload/platform/plugins/email/mcp/dist/scripts/email-fetch.js +9 -19
  24. package/payload/platform/plugins/email/mcp/dist/scripts/email-fetch.js.map +1 -1
  25. package/payload/platform/plugins/memory/mcp/dist/index.js +46 -18
  26. package/payload/platform/plugins/memory/mcp/dist/index.js.map +1 -1
  27. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-loader.test.js +34 -1
  28. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-loader.test.js.map +1 -1
  29. package/payload/platform/plugins/memory/mcp/dist/lib/document-hierarchy.d.ts.map +1 -1
  30. package/payload/platform/plugins/memory/mcp/dist/lib/document-hierarchy.js +22 -18
  31. package/payload/platform/plugins/memory/mcp/dist/lib/document-hierarchy.js.map +1 -1
  32. package/payload/platform/plugins/memory/mcp/dist/lib/llm-classifier.d.ts +98 -24
  33. package/payload/platform/plugins/memory/mcp/dist/lib/llm-classifier.d.ts.map +1 -1
  34. package/payload/platform/plugins/memory/mcp/dist/lib/llm-classifier.js +176 -86
  35. package/payload/platform/plugins/memory/mcp/dist/lib/llm-classifier.js.map +1 -1
  36. package/payload/platform/plugins/memory/mcp/dist/lib/llm-ranker.d.ts.map +1 -1
  37. package/payload/platform/plugins/memory/mcp/dist/lib/llm-ranker.js +12 -46
  38. package/payload/platform/plugins/memory/mcp/dist/lib/llm-ranker.js.map +1 -1
  39. package/payload/platform/plugins/memory/mcp/dist/lib/schema-loader.d.ts +10 -0
  40. package/payload/platform/plugins/memory/mcp/dist/lib/schema-loader.d.ts.map +1 -1
  41. package/payload/platform/plugins/memory/mcp/dist/lib/schema-loader.js +22 -3
  42. package/payload/platform/plugins/memory/mcp/dist/lib/schema-loader.js.map +1 -1
  43. package/payload/platform/plugins/memory/mcp/dist/tools/memory-classify.d.ts.map +1 -1
  44. package/payload/platform/plugins/memory/mcp/dist/tools/memory-classify.js +24 -12
  45. package/payload/platform/plugins/memory/mcp/dist/tools/memory-classify.js.map +1 -1
  46. package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.d.ts +27 -11
  47. package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.d.ts.map +1 -1
  48. package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.js +276 -238
  49. package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.js.map +1 -1
  50. package/payload/platform/plugins/memory/mcp/package.json +3 -1
  51. package/payload/platform/plugins/memory/mcp/scripts/boot-smoke.sh +69 -0
  52. package/payload/platform/plugins/memory/references/graph-primitives.md +22 -0
  53. package/payload/platform/plugins/memory/references/schema-base.md +66 -14
  54. package/payload/platform/plugins/memory/skills/document-ingest/SKILL.md +53 -20
  55. package/payload/platform/templates/specialists/agents/database-operator.md +18 -0
  56. package/payload/server/chunk-A5K3CFMI.js +12297 -0
  57. package/payload/server/chunk-Y57ACANQ.js +12292 -0
  58. package/payload/server/maxy-edge.js +1 -1
  59. package/payload/server/server.js +25 -44
@@ -1 +1 @@
1
- {"version":3,"file":"memory-ingest.js","sourceRoot":"","sources":["../../src/tools/memory-ingest.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,8CAA8C,CAAC;AAG3E,8EAA8E;AAC9E,4CAA4C;AAC5C,EAAE;AACF,6EAA6E;AAC7E,sFAAsF;AACtF,yFAAyF;AACzF,uFAAuF;AACvF,EAAE;AACF,0CAA0C;AAC1C,2EAA2E;AAC3E,0EAA0E;AAC1E,4EAA4E;AAC5E,yEAAyE;AACzE,8CAA8C;AAC9C,2EAA2E;AAC3E,4EAA4E;AAC5E,4DAA4D;AAC5D,EAAE;AACF,mEAAmE;AACnE,uEAAuE;AACvE,iEAAiE;AACjE,8EAA8E;AAE9E,MAAM,cAAc,GAAG,IAAI,CAAC;AAC5B,MAAM,cAAc,GAAG,GAAG,CAAC;AAC3B,MAAM,QAAQ,GAAG,UAAU,CAAC;AAC5B,MAAM,gBAAgB,GAAG,iBA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ClE,qEAAqE;QACrE,+DAA+D;QAC/D,sDAAsD;QACtD,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,GAAG,CAC9B,cAAc,OAAO,CAAC,IAAI,iCAAiC,QAAQ,CAAC,GAAG;;;;;;;;;;qCAUxC,EAC/B;YACE,SAAS;YACT,UAAU,EAAE,QAAQ,CAAC,KAAK;YAC1B,WAAW,EAAE,EAAE,GAAG,OAAO,CAAC,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE;YAClE,SAAS,EAAE,gBAAgB;YAC3B,SAAS,EAAE,GAAG;YACd,cAAc,EAAE,gBAAgB;YAChC,gBAAgB,EAAE,SAAS,IAAI,EAAE;YACjC,MAAM,EAAE,iBAAiB;SAC1B,CACF,CAAC;QACF,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAW,CAAC;IACnD,CAAC;IAED,sEAAsE;IACtE,yEAAyE;IACzE,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,GAAG,CAC9B,eAAe,OAAO,CAAC,IAAI;;mCAEI,EAC/B;QACE,KAAK,EAAE;YACL,GAAG,OAAO,CAAC,UAAU;YACrB,SAAS;YACT,KAAK,EAAE,QAAQ;YACf,SAAS,EAAE,gBAAgB;YAC3B,SAAS,EAAE,GAAG;YACd,SAAS,EAAE,GAAG;YACd,cAAc,EAAE,gBAAgB;YAChC,eAAe,EAAE,gBAAgB;YACjC,gBAAgB,EAAE,SAAS,IAAI,EAAE;YACjC,MAAM,EAAE,iBAAiB;SAC1B;KACF,CACF,CAAC;IACF,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAW,CAAC;AACnD,CAAC"}
@@ -6,7 +6,9 @@
6
6
  "main": "dist/index.js",
7
7
  "scripts": {
8
8
  "build": "tsc",
9
- "start": "node dist/index.js"
9
+ "start": "node dist/index.js",
10
+ "smoke": "bash ./scripts/boot-smoke.sh",
11
+ "prepublish": "bash ./scripts/boot-smoke.sh"
10
12
  },
11
13
  "dependencies": {
12
14
  "@anthropic-ai/sdk": "^0.81.0",
@@ -0,0 +1,69 @@
1
+ #!/usr/bin/env bash
2
+ # Memory MCP boot-smoke gate (Task 743).
3
+ #
4
+ # Spawns dist/index.js with a stub env, holds stdin open via `tail -f /dev/null`
5
+ # (the MCP SDK's StdioServerTransport exits on EOF — closing stdin would mask a
6
+ # clean boot as a failure), sleeps 2s, then asserts the process is still alive.
7
+ # A schema-loader throw, an import failure, or any other module-load fault
8
+ # would have killed the child by now and `kill -0` would return non-zero.
9
+ #
10
+ # Wired to the memory MCP `prepublish` script in package.json so a regression
11
+ # can never reach npm publish without the gate firing first. Local matrix:
12
+ #
13
+ # $ ./scripts/boot-smoke.sh
14
+ # [boot-smoke] memory ok
15
+ #
16
+ # $ # break the schema content, rebuild, retry
17
+ # $ ./scripts/boot-smoke.sh
18
+ # [boot-smoke] memory FAILED tail=<schema-loader throw>
19
+ # exit 1
20
+ set -euo pipefail
21
+
22
+ SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
23
+ MCP_DIR=$(cd "$SCRIPT_DIR/.." && pwd)
24
+ ENTRY="$MCP_DIR/dist/index.js"
25
+ PLATFORM_ROOT=$(cd "$MCP_DIR/../../.." && pwd)
26
+
27
+ if [ ! -f "$ENTRY" ]; then
28
+ echo "[boot-smoke] memory FAILED tail=\"dist/index.js missing — run npm run build first\"" >&2
29
+ exit 1
30
+ fi
31
+
32
+ LOG_DIR=$(mktemp -d -t mcp-boot-smoke.XXXXXX)
33
+ trap 'rm -rf "$LOG_DIR"' EXIT
34
+
35
+ # stdin from a `tail -f /dev/null` keeps the StdioServerTransport open. The
36
+ # pipeline's left side is a tiny long-running process; the right side is the
37
+ # MCP server we are smoke-testing. Both are killed below.
38
+ # Disable pipefail for this block — when bash forks the pipeline, $! is the
39
+ # PID of the LAST command (the node process), which is what we test below.
40
+ set +o pipefail
41
+
42
+ tail -f /dev/null | env \
43
+ ACCOUNT_ID=boot-smoke-test \
44
+ PLATFORM_ROOT="$PLATFORM_ROOT" \
45
+ LOG_DIR="$LOG_DIR" \
46
+ STREAM_LOG_PATH="$LOG_DIR/stream.log" \
47
+ NEO4J_URI=bolt://localhost:7687 \
48
+ SESSION_ID=boot-smoke \
49
+ node "$ENTRY" > /dev/null 2>"$LOG_DIR/stderr-direct.log" &
50
+
51
+ NODE_PID=$!
52
+ sleep 2
53
+
54
+ if ! kill -0 "$NODE_PID" 2>/dev/null; then
55
+ TAIL=$(tail -n 5 "$LOG_DIR/stderr-direct.log" 2>/dev/null | tr '\n' ' ' | sed 's/"/\\"/g')
56
+ echo "[boot-smoke] memory FAILED tail=\"$TAIL\"" >&2
57
+ # Reap the tail process by killing its parent group (the pipeline subshell).
58
+ kill 0 2>/dev/null || true
59
+ exit 1
60
+ fi
61
+
62
+ echo "[boot-smoke] memory ok"
63
+ kill "$NODE_PID" 2>/dev/null || true
64
+ # Reap the still-running `tail -f /dev/null` so the script exits cleanly.
65
+ # `disown` first so bash does not print a job-control "Terminated" line
66
+ # when the pipeline subshell is killed by exit-trap.
67
+ { disown -a 2>/dev/null; pkill -P $$ -f "tail -f /dev/null"; } 2>/dev/null || true
68
+ wait 2>/dev/null || true
69
+ exit 0
@@ -38,6 +38,28 @@ deterministic path through the shim is the only supported way to read
38
38
  the graph, and any substitute path loses the read-only + namespace +
39
39
  token-limit discipline the upstream server enforces.
40
40
 
41
+ ## When the memory tools are absent
42
+
43
+ If `mcp__memory__memory-write`, `mcp__memory__memory-search`,
44
+ `mcp__memory__memory-rank`, `mcp__memory__memory-reindex`,
45
+ `mcp__memory__session-compact`, `mcp__memory__session-compact-status`, or
46
+ `mcp__memory__conversation-search` is missing from your tool list, the
47
+ memory MCP server failed to start on this device. Reply once with
48
+ exactly:
49
+
50
+ > The memory MCP server failed to start on this device. Run the admin
51
+ > system-status check to diagnose — do not retry by other routes.
52
+
53
+ Then stop. Do not search for a similarly-named tool via `ToolSearch`, do
54
+ not improvise via `maxy-graph-read_neo4j_cypher` (it is read-only — every
55
+ write goes through the schema-aware memory tools), do not paraphrase.
56
+ A missing memory tool is a deterministic failure of the per-account
57
+ memory server: the platform's `[mcp-init-error] server=memory` line in
58
+ the per-conversation stream log already names it; the user-facing reply
59
+ exists so the operator knows the session cannot proceed without an
60
+ operator-side fix (Task 743 propagates Task 560's loud-fail contract
61
+ from graph to memory).
62
+
41
63
  ## Mutation intents
42
64
 
43
65
  The graph tools above are read-only. Every write intent has a schema-aware
@@ -109,23 +109,75 @@ Do not write placeholder values ("TBD", "unknown", empty strings) for properties
109
109
  (:KnowledgeDocument)-[:HAS_SECTION]->(:Section)
110
110
  ```
111
111
 
112
- ### Document-ingestion typed-node patterns (Task 737)
112
+ ### Document-ingestion section kinds (Task 740, replacing Task 737's typed-vs-UNMAPPED fork)
113
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.
114
+ The `document-ingest` skill maps unstructured-document sections onto a closed enumeration of `kind` values. Every section becomes one `:Section` node; recognised kinds carry a secondary label so the same node serves as both the document section and the typed entity. Identity-kind anchor edges point from the document subject directly at the multi-labeled section node — there is no parallel "Section vs typed-node" concept.
115
115
 
116
- | Section `kind` | Typed node label | Anchor pattern |
116
+ The closed enumeration:
117
+
118
+ **Identity kinds (anchor edge from the document subject, usually `UserProfile`):**
119
+
120
+ | `kind` | Section labels | Anchor pattern |
121
+ |---|---|---|
122
+ | `Position` | `:Section:Position` | `(:UserProfile)-[:HAS_POSITION]->(:Section:Position)`; section `-[:AT]->` `:Organization` |
123
+ | `Education` | `:Section:Education` | `(:UserProfile)-[:ATTENDED {degree, startDate, endDate}]->(:Section:Education)`; section `-[:ATTENDED]->` `:Organization {organizationCategory:'educational'}` |
124
+ | `Credential` | `:Section:Credential` | `(:UserProfile)-[:HOLDS]->(:Section:Credential)` |
125
+ | `Skill` | `:Section:Skill` | `(:UserProfile)-[:HAS_SKILL]->(:Section:Skill)` |
126
+ | `Biography` | `:Section:Biography` | `(:UserProfile)-[:DESCRIBED_BY]->(:Section:Biography)` |
127
+
128
+ **Standalone (non-Section) node kind:**
129
+
130
+ | `kind` | Node label | Anchor pattern |
117
131
  |---|---|---|
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.
132
+ | `Project` | `:Project` | `(:UserProfile)-[:CREATED]->(:Project)`; optional `(:Project)-[:UNDER]->(:Organization)` |
133
+
134
+ **Document-structural kinds (HAS_SECTION + NEXT only — no anchor edge):**
135
+
136
+ `Preface`, `Abstract` (alias for Summary / ExecutiveSummary), `Introduction`, `TableOfContents`, `Chapter`, `Conclusion`, `Appendix`, `Bibliography` (alias for References), `Glossary`, `Acknowledgments` — each becomes `:Section:<Kind>` linked to the document via `(:KnowledgeDocument)-[:HAS_SECTION]->` and chained to siblings via `(:Section)-[:NEXT]->(:Section)` in reading order.
137
+
138
+ **Contract-clause kinds (HAS_SECTION + NEXT, plus special-case extras for two kinds):**
139
+
140
+ `Parties`, `Recitals`, `Definitions`, `Scope`, `Term`, `Payment`, `Confidentiality`, `IntellectualProperty`, `Warranties`, `Indemnification`, `Liability`, `Termination`, `GoverningLaw`, `ForceMajeure`, `Notices`, `EntireAgreement`, `Amendment`, `Assignment`, `Severability`, `Signatures`.
141
+
142
+ Two contract-clause kinds carry additional structure:
143
+ - `:Section:Parties` — the classifier additionally emits `documentEdges` of type `PARTY` so the writer creates `(:KnowledgeDocument)-[:PARTY]->(:Person|:Organization)` for each party named.
144
+ - `:Section:Definitions` — the classifier additionally emits `related` entries with edge type `DEFINES` so the writer creates `(:Section:Definitions)-[:DEFINES]->(:DefinedTerm)` for each defined term.
145
+
146
+ **Label fallback:**
147
+
148
+ | `kind` | Section labels | Notes |
149
+ |---|---|---|
150
+ | `Other` | `:Section:Other` | Classifier ran but the section's content fits no listed kind. The `classifierReason` property carries the one-line description. Distinct from a classifier *crash* (which aborts ingest entirely). Distinct from edge-orphan-candidate (which is a node-level concept). |
151
+
152
+ The classifier returns `kind` strings from the closed enumeration above. `kind` values not in the list collapse to `Other` server-side — `memory-ingest` never invents a label or accepts an unrecognised kind silently.
153
+
154
+ **Edges introduced by document-ingest (Task 740):**
155
+
156
+ | Edge | From → To | Notes |
157
+ |---|---|---|
158
+ | `HAS_SECTION` | `KnowledgeDocument` → `Section` | Always, every section. |
159
+ | `NEXT` | `Section` → `Section` | Reading-order chain; one per pair of consecutive sections within a single document. |
160
+ | `HAS_POSITION` | `UserProfile` → `Section:Position` | Identity anchor. |
161
+ | `ATTENDED` | `UserProfile` → `Section:Education` and `Section:Education` → `Organization` | Anchor + related-entity. |
162
+ | `HOLDS` | `UserProfile` → `Section:Credential` | Identity anchor. |
163
+ | `HAS_SKILL` | `UserProfile` → `Section:Skill` | Identity anchor. |
164
+ | `DESCRIBED_BY` | `UserProfile` → `Section:Biography` | Identity anchor. |
165
+ | `CREATED` | `UserProfile` → `Project` | Standalone-node anchor. |
166
+ | `UNDER` | `Project` → `Organization` | Optional Project context. |
167
+ | `AT` | `Section:Position` → `Organization` | Position's employer. |
168
+ | `PARTY` | `KnowledgeDocument` → `Person` or `Organization` | Contract Parties — written from `documentEdges`. |
169
+ | `DEFINES` | `Section:Definitions` → `DefinedTerm` | Contract definitions — written from per-section `related`. |
170
+
171
+ **Ontology-growth review query.** When a document accumulates several `:Section:Other` nodes, the operator (or admin agent) can run the following Cypher to surface candidate ontology additions:
172
+
173
+ ```cypher
174
+ MATCH (s:Section:Other)
175
+ WHERE s.accountId = $acc
176
+ RETURN s.title, s.classifierReason, count(*) AS occurrences
177
+ ORDER BY occurrences DESC
178
+ ```
179
+
180
+ Patterns with high occurrence count are candidates for new section-kind labels. Adding a kind = adding a row to `schema-base.md` (and any relevant vertical schema) — never per-account.
129
181
 
130
182
  ---
131
183
 
@@ -1,15 +1,15 @@
1
1
  ---
2
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.
3
+ description: Universal document ingestion — maps any unstructured document (PDF, text, transcript, web page) to ontologically-grounded `:Section` graph nodes via Haiku-driven classification. Triggers when the operator uploads or fetches a document for ingestion. One skill for every document type — no per-doctype branching.
4
4
  ---
5
5
 
6
6
  # Document Ingest
7
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.
8
+ Ingests any unstructured document (PDF, text, transcript, web page) into the graph. Every classified section becomes one `:Section` node carrying a secondary label from a closed enumeration (`:Section:Position`, `:Section:Chapter`, `:Section:Parties`, …); identity-kind anchor edges go from the document subject directly at the multi-labeled section node. There are no per-doctype skills (no `cv-import`, no `contract-import`) — the classifier in `memory-classify` decides which kind every section maps to. The skill orchestrates the pipeline; the classifier reads the loaded ontology; the writer enforces the validator. **Classifier failure is terminal — the ingest aborts entirely; nothing is written. Loud failures, never silent landfill (Task 740).**
9
9
 
10
10
  ## Anchor confirmation (mandatory first step)
11
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.
12
+ Every document has a subject — the node every identity-kind 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
13
 
14
14
  The four common shapes:
15
15
 
@@ -35,9 +35,12 @@ Three tools in order. The pipeline is deterministic — the agent does not class
35
35
  EXTRACT --> CLASSIFY --> INGEST
36
36
  │ │ │
37
37
  v v v
38
- text typed typed nodes
39
- cached sections + anchor edges
40
- by id JSON + REFERENCES
38
+ text sections one :Section per
39
+ cached + edges semantic boundary
40
+ by id + orphans + NEXT chain
41
+ + anchor edges
42
+ + related entities
43
+ + KD-level edges
41
44
  ```
42
45
 
43
46
  ### 1. `memory-ingest-extract`
@@ -50,17 +53,46 @@ Calls Haiku with the loaded ontology and the cached text. Inputs: `attachmentId`
50
53
 
51
54
  - `documentSummary` — 1-3 sentences for the KnowledgeDocument node
52
55
  - `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
+ - `sections` — section-shaped output, each with `kind` (from the closed enumeration), `title`, `body`, `properties`, `anchorEdge` (or null), optional `related`, optional `classifierReason` (when `kind === "Other"`)
57
+ - `documentEdges` — optional. Document-level edges off the KnowledgeDocument (currently used for contracts: `PARTY` edges to Person/Organization)
58
+ - `orphanCandidates` — nodes the classifier wanted to emit but could not natural-edge. Surfaced loudly to the operator (see Output contract below)
59
+ - `hallucinatedRelated` — diagnostic count of related-kind values dropped server-side as ontology misses
56
60
 
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.
61
+ **Failure is terminal.** If the call returns `{kind: "fallback", reason}`, the LLM was unavailable, malformed, or otherwise unusable. **Do not call `memory-ingest`. Do not write anything.** Return to the dispatching agent immediately with a structured blocker: `Classifier unavailable <reason>. Document not ingested. Operator must <remediation>.` The dispatching agent surfaces this to the operator in plain English. There is no longer any "fallback-to-UNMAPPED-section" write path — Task 740 deleted it.
62
+
63
+ After step 2 succeeds, emit a chat message before step 3 naming what the classifier produced: **"Classified into N sections, covering: <topic keywords>."** This is step 2 of the three-step narrative the operator sees per ingest.
58
64
 
59
65
  ### 3. `memory-ingest`
60
66
 
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`).
67
+ Writes the classified document. Inputs: `attachmentId`, `documentSummary`, `anchorNodeId`, `anchorLabel`, `sections`, `documentEdges` (pass through if present), `orphanCandidates` (pass through if present), `scope` (from the brief — confirm with the operator if absent), optional `documentKeywords`, `userKeywords`, `sourceUrl`, `sourceType`. Returns:
68
+
69
+ - `documentNodeId`, `sectionCount`
70
+ - `kindBreakdown` — per-kind count, e.g. `{"Position": 4, "Chapter": 12, "Other": 1}`
71
+ - `edgeBreakdown` — per-edge-type count, e.g. `{"HAS_SECTION": 17, "NEXT": 16, "HAS_POSITION": 4, "ATTENDED": 1, "AT": 4}`
72
+ - `relatedCount` — Organizations/Persons/DefinedTerms created or merged
73
+ - `standaloneCount` — `:Project` nodes created
74
+ - `orphanCandidates` — passed through from the classifier so the agent can surface them in the post-write narrative
75
+ - `documentSummary`, `keywords`
76
+
77
+ After step 3 succeeds, emit the third chat message naming everything that was created or connected (see "Three-step operator narrative" below).
78
+
79
+ Re-ingesting the same `attachmentId` is safe — the writer drops prior `:Section` children (any secondary label), prior `:Project` standalone nodes, and prior KD-level edges (`PARTY`, `REFERENCES`) before re-creating. Shared related entities (Organizations, Persons MERGEd by identifying property) are spared.
80
+
81
+ ## Three-step operator narrative (Task 740)
82
+
83
+ Each ingest produces three chat messages, each at the moment it happens. Failures replace the relevant step's message with a blocker.
84
+
85
+ | Step | Emitted by | Trigger | Content |
86
+ |---|---|---|---|
87
+ | 1 | Admin agent | On dispatch to database-operator | "Sending `<filename>` to database-operator for ingest." |
88
+ | 2 | Database-operator (this skill) | After `memory-classify` returns ok | "Classified `<filename>` into `<N>` sections, covering: `<topicKeyword1>, <topicKeyword2>, …`." |
89
+ | 3 | Database-operator (this skill) | After `memory-ingest` returns | "Created/connected: `<kind: count via edgeType to anchor>` for each kind; `<orphan-candidates: label and reason>` for any orphans; `<related entities created or merged: kind: count>`." |
90
+
91
+ **Step 2 failure form:** "Classifier unavailable — `<reason>`. `<filename>` not ingested. `<remediation>`." Do not call step 3.
92
+
93
+ **Step 3 failure form:** "`<n>` sections classified but write failed at `<stage>` — `<reason>`. `<filename>` not in graph."
62
94
 
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.
95
+ The operator always sees what was attempted and where it stopped.
64
96
 
65
97
  ## Web-page ingestion
66
98
 
@@ -96,17 +128,18 @@ CV / personal-profile content defaults to `admin`. Pricing guides, services, FAQ
96
128
  ## Discipline (load-bearing)
97
129
 
98
130
  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.
131
+ 2. **Generic skill — no document-type branching.** The classifier maps sections to the closed enumeration. The writer applies the classifier's edges; never invents its own.
100
132
  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.
133
+ 4. **Closed enumeration of section kinds.** Identity, structural, contract-clause, plus standalone `Project` and label-fallback `Other`. The classifier never invents a new kind. `Other` collapses unrecognised content with a `classifierReason`; the operator runs `MATCH (s:Section:Other) WHERE s.accountId = $acc RETURN s.title, s.classifierReason, count(*) AS occurrences ORDER BY occurrences DESC` to surface ontology-growth candidates.
134
+ 5. **Provenance stamp.** Every section, standalone, and edge gets `createdByAgent='document-ingest'`, `createdBySession=<sessionId>`, `source='document'`, `sourceDocumentId=<attachmentId>`. Stamped automatically by `memory-ingest`. Re-ingest deletes prior children via this stamp.
135
+ 6. **Idempotent re-ingest.** `memory-ingest` is safe to re-run with the same `attachmentId`. Prior `:Section` children (any secondary label) and `:Project` standalones are deleted; MERGEd shared entities (Organizations, Persons referenced by other docs) are spared.
136
+ 7. **Loud failure, never silent landfill.** Classifier failure aborts the ingest; nothing is written. Edge orphans are surfaced via `orphanCandidates`; the writer never synthesises edges to "fix" them.
105
137
 
106
138
  ## Output contract
107
139
 
108
140
  Return to the admin agent:
109
141
  - **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.
142
+ - **Outcome** — `documentNodeId`, `sectionCount`, `kindBreakdown`, `edgeBreakdown`, `relatedCount`, `standaloneCount`. Surface the document summary and extracted keywords so the admin can echo them back to the operator.
143
+ - **Orphan candidates** — for each entry the classifier flagged: kind, label, reason. The admin agent reads these to decide whether the orphan is intentional (rare, valid) or a classifier miss (bug). Never silently skip.
144
+ - **Ontology gaps** — list any `:Section:Other` titles + classifierReasons. The admin agent reads these to decide whether to extend the ontology in a follow-up task.
145
+ - **Blockers** — anchor unconfirmed, classifier failure (Haiku unavailable, malformed JSON, etc.), schema validator rejection, write failure mid-ingest.
@@ -37,6 +37,24 @@ Return to the admin agent:
37
37
 
38
38
  Do not return raw CSV rows, raw Cypher bodies, or raw tool-result dumps. Compression is the output discipline.
39
39
 
40
+ ### Three-step operator narrative for document ingestion (Task 740)
41
+
42
+ When the dispatch is a document ingestion (Branch A, the `document-ingest` skill), the operator sees three messages — one at each phase. You emit step 2 and step 3 directly into chat at the moment each phase completes; admin emits step 1 before dispatching to you.
43
+
44
+ **Step 2 (after `memory-classify` returns ok).** Emit one chat message: `Classified <filename> into <N> sections, covering: <topicKeyword1>, <topicKeyword2>, …`. Use the `documentKeywords` from the classifier output. Do not paraphrase or reorder.
45
+
46
+ **Step 3 (after `memory-ingest` returns).** Emit one chat message listing every change. Format the line from the writer's `kindBreakdown` and `edgeBreakdown`:
47
+
48
+ > Created/connected: `<n> :Section:<Kind>` via `<edgeType>` to `<anchor>` (one phrase per identity kind); `<n> structural sections` (HAS_SECTION + NEXT only); `<orphan-candidates: kind \"label\" — reason>` for any orphans; `<related entities: <kind: count>>` for Organizations/Persons/DefinedTerms.
49
+
50
+ Use the actual numbers from the tool result, not approximations. Don't omit orphan candidates — they're the operator's primary debugging surface.
51
+
52
+ **Failure replacements.**
53
+ - Classifier failure (step 2): replace step 2 with `Classifier unavailable — <cause>: <reason>. <filename> not ingested. <remediation>.` Do not call `memory-ingest`. Do not emit step 3.
54
+ - Write failure (step 3): replace step 3 with `<n> sections classified but write failed at <stage> — <reason>. <filename> not in graph.`
55
+
56
+ This is the operator's narrative — it must be truthful, specific, and complete. Never paraphrase the tool's structured output into a vague "ingested OK" — the verification cypher will catch the mismatch (`[memory-ingest] sections=… typed=… edges=… orphans=…` server.log lines must agree with the chat numbers).
57
+
40
58
  ---
41
59
 
42
60
  ## Invocation shapes