@rubytech/create-maxy-code 0.1.169 → 0.1.171
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__/premium-mcp-discover.test.js +42 -0
- package/dist/lib/premium-mcp-discover.js +9 -2
- package/package.json +1 -1
- package/payload/platform/plugins/.claude-plugin/marketplace.json +0 -15
- package/payload/platform/plugins/docs/references/platform.md +1 -1
- package/payload/premium-plugins/writer-craft/lib/mcp-stderr-tee/dist/index.d.ts +51 -0
- package/payload/premium-plugins/writer-craft/lib/mcp-stderr-tee/dist/index.d.ts.map +1 -0
- package/payload/premium-plugins/writer-craft/lib/mcp-stderr-tee/dist/index.js +196 -0
- package/payload/premium-plugins/writer-craft/lib/mcp-stderr-tee/dist/index.js.map +1 -0
- package/payload/premium-plugins/writer-craft/lib/mcp-stderr-tee/package.json +7 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/index.d.ts +3 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/index.d.ts.map +1 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/index.js +257 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/index.js.map +1 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/lib/neo4j.d.ts +14 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/lib/neo4j.d.ts.map +1 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/lib/neo4j.js +47 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/lib/neo4j.js.map +1 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/lib/voice-corpus.d.ts +42 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/lib/voice-corpus.d.ts.map +1 -0
- package/payload/{platform/plugins/writer-craft/mcp/src/lib/voice-corpus.ts → premium-plugins/writer-craft/mcp/dist/lib/voice-corpus.js} +5 -5
- package/payload/premium-plugins/writer-craft/mcp/dist/lib/voice-corpus.js.map +1 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-distil-profile.d.ts +36 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-distil-profile.d.ts.map +1 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-distil-profile.js +225 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-distil-profile.js.map +1 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-record-feedback.d.ts +26 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-record-feedback.d.ts.map +1 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-record-feedback.js +74 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-record-feedback.js.map +1 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-retrieve-conditioning.d.ts +22 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-retrieve-conditioning.d.ts.map +1 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-retrieve-conditioning.js +102 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-retrieve-conditioning.js.map +1 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-tag-content.d.ts +14 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-tag-content.d.ts.map +1 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-tag-content.js +84 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-tag-content.js.map +1 -0
- package/payload/premium-plugins/writer-craft/mcp/package-lock.json +1327 -0
- package/payload/server/{chunk-3TRIXQSJ.js → chunk-L2YK2VK3.js} +17 -29
- package/payload/server/maxy-edge.js +1 -1
- package/payload/server/server.js +1 -1
- package/payload/platform/plugins/teaching/.claude-plugin/plugin.json +0 -8
- package/payload/platform/plugins/teaching/PLUGIN.md +0 -58
- package/payload/platform/plugins/teaching/skills/interactive-tutor/SKILL.md +0 -59
- package/payload/platform/plugins/teaching/skills/interactive-tutor/references/assessment.md +0 -70
- package/payload/platform/plugins/teaching/skills/interactive-tutor/references/classroom-conduct.md +0 -43
- package/payload/platform/plugins/teaching/skills/interactive-tutor/references/teaching-modes.md +0 -83
- package/payload/platform/plugins/teaching/skills/lesson-planner/SKILL.md +0 -48
- package/payload/platform/plugins/teaching/skills/lesson-planner/references/context-gathering.md +0 -41
- package/payload/platform/plugins/teaching/skills/lesson-planner/references/plan-structure.md +0 -94
- package/payload/platform/plugins/teaching/skills/study-pack-builder/SKILL.md +0 -52
- package/payload/platform/plugins/teaching/skills/study-pack-builder/references/disaggregation.md +0 -49
- package/payload/platform/plugins/teaching/skills/study-pack-builder/references/materials.md +0 -116
- package/payload/platform/plugins/venture-studio/.claude-plugin/plugin.json +0 -8
- package/payload/platform/plugins/venture-studio/PLUGIN.md +0 -119
- package/payload/platform/plugins/venture-studio/bin/scaffold.sh +0 -116
- package/payload/platform/plugins/venture-studio/skills/brand-pack/SKILL.md +0 -256
- package/payload/platform/plugins/venture-studio/skills/brand-pack/references/color-psychology.md +0 -118
- package/payload/platform/plugins/venture-studio/skills/investor-data-room/SKILL.md +0 -376
- package/payload/platform/plugins/venture-studio/skills/investor-data-room/references/business-plan-template.md +0 -64
- package/payload/platform/plugins/venture-studio/skills/investor-data-room/references/compliance-research-checklist.md +0 -53
- package/payload/platform/plugins/venture-studio/skills/investor-data-room/references/data-room-structure.md +0 -88
- package/payload/platform/plugins/venture-studio/skills/investor-data-room/references/deck-blueprint-template.md +0 -39
- package/payload/platform/plugins/venture-studio/skills/investor-data-room/references/design-tokens-application.md +0 -79
- package/payload/platform/plugins/venture-studio/skills/investor-data-room/references/html-pdf-pipeline.md +0 -236
- package/payload/platform/plugins/venture-studio/skills/investor-data-room/references/internal-workings-scrub.md +0 -33
- package/payload/platform/plugins/venture-studio/skills/investor-data-room/references/termsheet-template.md +0 -88
- package/payload/platform/plugins/venture-studio/skills/investor-data-room/templates/prospectus/index.html +0 -1565
- package/payload/platform/plugins/venture-studio/skills/investor-data-room/templates/prospectus/render-pdf.mjs +0 -91
- package/payload/platform/plugins/venture-studio/skills/investor-data-room/templates/prospectus/term_sheet.html +0 -715
- package/payload/platform/plugins/venture-studio/skills/office-hours/SKILL.md +0 -587
- package/payload/platform/plugins/venture-studio/skills/prototype-host/SKILL.md +0 -179
- package/payload/platform/plugins/venture-studio/skills/prototype-host/references/cloudflared-ingress-edit.md +0 -81
- package/payload/platform/plugins/venture-studio/skills/prototype-host/references/scaffold-frameworks.md +0 -60
- package/payload/platform/plugins/venture-studio/skills/prototype-host/references/systemd-user-service.md +0 -104
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/SKILL.md +0 -336
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/aarrr-metrics.md +0 -275
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/assumption-testing.md +0 -93
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/boolean-search.md +0 -308
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/build-measure-learn.md +0 -262
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/business-model-canvas.md +0 -171
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/commitment-signals.md +0 -246
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/design-thinking.md +0 -183
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/earlyvangelist.md +0 -190
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/first-principles.md +0 -58
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/fishbone.md +0 -114
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/five-whys.md +0 -43
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/ice-scoring.md +0 -237
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/innovation-accounting.md +0 -290
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/jtbd.md +0 -105
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/landing-page.md +0 -361
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/market-type.md +0 -167
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/mom-test.md +0 -193
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/mvp-types.md +0 -200
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/og-images.md +0 -239
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/pareto.md +0 -103
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/persona-development.md +0 -291
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/pivot-types.md +0 -225
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/positioning-statement.md +0 -179
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/prd.md +0 -363
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/pre-mortem.md +0 -74
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/problem-validation.md +0 -253
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/product-market-fit.md +0 -256
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/research-synthesis.md +0 -276
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/three-engines-of-growth.md +0 -248
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/validation-tests.md +0 -89
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/value-proposition-canvas.md +0 -121
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/win-loss-analysis.md +0 -242
- package/payload/platform/plugins/venture-studio/skills/zero-to-prototype/references/workflow-mapping.md +0 -271
- package/payload/platform/plugins/writer-craft/.claude-plugin/plugin.json +0 -17
- package/payload/platform/plugins/writer-craft/PLUGIN.md +0 -130
- package/payload/platform/plugins/writer-craft/agents/writer-craft--manuscript-reviewer.md +0 -96
- package/payload/platform/plugins/writer-craft/mcp/package.json +0 -19
- package/payload/platform/plugins/writer-craft/mcp/scripts/smoke.mjs +0 -152
- package/payload/platform/plugins/writer-craft/mcp/src/index.ts +0 -289
- package/payload/platform/plugins/writer-craft/mcp/src/lib/neo4j.ts +0 -56
- package/payload/platform/plugins/writer-craft/mcp/src/tools/voice-distil-profile.ts +0 -303
- package/payload/platform/plugins/writer-craft/mcp/src/tools/voice-record-feedback.ts +0 -114
- package/payload/platform/plugins/writer-craft/mcp/src/tools/voice-retrieve-conditioning.ts +0 -145
- package/payload/platform/plugins/writer-craft/mcp/src/tools/voice-tag-content.ts +0 -117
- package/payload/platform/plugins/writer-craft/mcp/tsconfig.json +0 -8
- package/payload/platform/plugins/writer-craft/skills/citation-style/SKILL.md +0 -94
- package/payload/platform/plugins/writer-craft/skills/citation-style/references/book-and-chapter-models.md +0 -77
- package/payload/platform/plugins/writer-craft/skills/citation-style/references/citation-rules.md +0 -103
- package/payload/platform/plugins/writer-craft/skills/citation-style/references/journal-article-models.md +0 -74
- package/payload/platform/plugins/writer-craft/skills/citation-style/references/other-source-models.md +0 -146
- package/payload/platform/plugins/writer-craft/skills/citation-style/references/reference-list-rules.md +0 -70
- package/payload/platform/plugins/writer-craft/skills/editorial-practice/SKILL.md +0 -108
- package/payload/platform/plugins/writer-craft/skills/editorial-practice/references/copyediting.md +0 -73
- package/payload/platform/plugins/writer-craft/skills/editorial-practice/references/developmental-editing.md +0 -85
- package/payload/platform/plugins/writer-craft/skills/editorial-practice/references/genre-specific-editing.md +0 -78
- package/payload/platform/plugins/writer-craft/skills/editorial-practice/references/line-editing.md +0 -55
- package/payload/platform/plugins/writer-craft/skills/editorial-practice/references/self-editing.md +0 -89
- package/payload/platform/plugins/writer-craft/skills/persuasive-storytelling/SKILL.md +0 -114
- package/payload/platform/plugins/writer-craft/skills/persuasive-storytelling/references/audience-analysis.md +0 -73
- package/payload/platform/plugins/writer-craft/skills/persuasive-storytelling/references/crafting-persuasive-story.md +0 -76
- package/payload/platform/plugins/writer-craft/skills/persuasive-storytelling/references/persuasion-case-studies.md +0 -67
- package/payload/platform/plugins/writer-craft/skills/persuasive-storytelling/references/transformation-framework.md +0 -86
- package/payload/platform/plugins/writer-craft/skills/point-of-view/SKILL.md +0 -97
- package/payload/platform/plugins/writer-craft/skills/point-of-view/references/indirect-narration.md +0 -72
- package/payload/platform/plugins/writer-craft/skills/point-of-view/references/pov-types-and-voice.md +0 -91
- package/payload/platform/plugins/writer-craft/skills/point-of-view/references/protagonist-filter.md +0 -71
- package/payload/platform/plugins/writer-craft/skills/point-of-view/references/tense-and-person.md +0 -85
- package/payload/platform/plugins/writer-craft/skills/prose-craft/SKILL.md +0 -100
- package/payload/platform/plugins/writer-craft/skills/prose-craft/references/punctuation-and-grammar.md +0 -72
- package/payload/platform/plugins/writer-craft/skills/prose-craft/references/repetition.md +0 -71
- package/payload/platform/plugins/writer-craft/skills/prose-craft/references/sound-and-rhythm.md +0 -64
- package/payload/platform/plugins/writer-craft/skills/prose-craft/references/word-economy.md +0 -93
- package/payload/platform/plugins/writer-craft/skills/reader-engagement/SKILL.md +0 -100
- package/payload/platform/plugins/writer-craft/skills/reader-engagement/references/cause-effect-setup-payoff.md +0 -79
- package/payload/platform/plugins/writer-craft/skills/reader-engagement/references/conflict-escalation.md +0 -81
- package/payload/platform/plugins/writer-craft/skills/reader-engagement/references/hooking-readers.md +0 -67
- package/payload/platform/plugins/writer-craft/skills/reader-engagement/references/neurochemistry-of-engagement.md +0 -94
- package/payload/platform/plugins/writer-craft/skills/review-manuscript/SKILL.md +0 -111
- package/payload/platform/plugins/writer-craft/skills/review-manuscript/references/review-manuscript-checklist.md +0 -119
- package/payload/platform/plugins/writer-craft/skills/review-prose/SKILL.md +0 -99
- package/payload/platform/plugins/writer-craft/skills/review-prose/references/prose-review-checklist.md +0 -112
- package/payload/platform/plugins/writer-craft/skills/review-scene/SKILL.md +0 -99
- package/payload/platform/plugins/writer-craft/skills/review-scene/references/scene-analysis-framework.md +0 -95
- package/payload/platform/plugins/writer-craft/skills/story-architecture/SKILL.md +0 -106
- package/payload/platform/plugins/writer-craft/skills/story-architecture/references/blueprinting-and-scene-cards.md +0 -118
- package/payload/platform/plugins/writer-craft/skills/story-architecture/references/inner-issue-and-protagonist-goal.md +0 -66
- package/payload/platform/plugins/writer-craft/skills/story-architecture/references/misbelief-desire-worldview.md +0 -87
- package/payload/platform/plugins/writer-craft/skills/story-architecture/references/origin-scenes-and-escalation.md +0 -82
- package/payload/platform/plugins/writer-craft/skills/story-blueprint/SKILL.md +0 -133
- package/payload/platform/plugins/writer-craft/skills/story-blueprint/references/blueprinting-exercises.md +0 -118
- package/payload/platform/plugins/writer-craft/skills/story-blueprint/references/blueprinting-process.md +0 -128
- package/payload/platform/plugins/writer-craft/skills/voice-mirror/SKILL.md +0 -166
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
mcp-manifest: auto
|
|
3
|
-
name: writer-craft
|
|
4
|
-
description: "Manuscript review and writing craft tools grounded in neuroscience-based story theory, professional editing practice, and prose technique. 12 skills covering story architecture, reader engagement, prose craft, point of view, persuasive storytelling, editorial practice, citation style, three levels of manuscript review, and voice mirror (authorial-voice capture + application) — plus a specialist subagent for autonomous deep manuscript review."
|
|
5
|
-
icon: ✍️
|
|
6
|
-
tools:
|
|
7
|
-
- name: voice-tag-content
|
|
8
|
-
publicAllowlist: false
|
|
9
|
-
adminAllowlist: true
|
|
10
|
-
- name: voice-distil-profile
|
|
11
|
-
publicAllowlist: false
|
|
12
|
-
adminAllowlist: true
|
|
13
|
-
- name: voice-retrieve-conditioning
|
|
14
|
-
publicAllowlist: false
|
|
15
|
-
adminAllowlist: true
|
|
16
|
-
- name: voice-record-feedback
|
|
17
|
-
publicAllowlist: false
|
|
18
|
-
adminAllowlist: true
|
|
19
|
-
always: false
|
|
20
|
-
embed: false
|
|
21
|
-
mcp:
|
|
22
|
-
command: node
|
|
23
|
-
args:
|
|
24
|
-
- ${PLATFORM_ROOT}/lib/mcp-spawn-tee/dist/index.js
|
|
25
|
-
- ${PLATFORM_ROOT}/../premium-plugins/writer-craft/mcp/dist/index.js
|
|
26
|
-
env:
|
|
27
|
-
MCP_SPAWN_TEE_NAME: writer-craft
|
|
28
|
-
LOG_DIR: ${LOG_DIR}
|
|
29
|
-
PLATFORM_ROOT: ${PLATFORM_ROOT}
|
|
30
|
-
ACCOUNT_ID: ${ACCOUNT_ID}
|
|
31
|
-
ADMIN_USER_ID: ${ADMIN_USER_ID}
|
|
32
|
-
SESSION_ID: ${SESSION_ID}
|
|
33
|
-
NEO4J_URI: ${NEO4J_URI}
|
|
34
|
-
NEO4J_USER: ${NEO4J_USER}
|
|
35
|
-
NEO4J_PASSWORD: ${NEO4J_PASSWORD}
|
|
36
|
-
metadata: {"platform":{"optional":true,"pluginKey":"writer-craft","embed":["admin"]}}
|
|
37
|
-
---
|
|
38
|
-
|
|
39
|
-
# Writer Craft
|
|
40
|
-
|
|
41
|
-
11 specialist skills for writers, editors, and anyone working with narrative. Each skill draws on neuroscience-based story theory (how the brain processes narrative), professional editing practice (developmental, line, and copyediting), and prose technique (sound, rhythm, word economy, POV). One specialist subagent performs autonomous deep manuscript review.
|
|
42
|
-
|
|
43
|
-
## When to Activate
|
|
44
|
-
|
|
45
|
-
The user is:
|
|
46
|
-
- Writing fiction or nonfiction and wants craft-level guidance
|
|
47
|
-
- Reviewing or editing a manuscript, chapter, scene, or passage
|
|
48
|
-
- Building a story from scratch using blueprinting methodology
|
|
49
|
-
- Working on persuasive writing, speeches, or advocacy storytelling
|
|
50
|
-
- Formatting citations and references in Chicago author-date style
|
|
51
|
-
- Seeking feedback on prose quality, POV consistency, or reader engagement
|
|
52
|
-
|
|
53
|
-
## Skills
|
|
54
|
-
|
|
55
|
-
### Story & Structure
|
|
56
|
-
|
|
57
|
-
| Skill | Purpose |
|
|
58
|
-
|-------|---------|
|
|
59
|
-
| `story-architecture` | Build and analyze internal story architecture: misbelief, desire, third rail, worldview, origin scenes, scene cards |
|
|
60
|
-
| `story-blueprint` | Walk a writer interactively through building a story from the inside out using the Story Genius blueprinting method |
|
|
61
|
-
| `reader-engagement` | Analyze and teach reader engagement: hooking from page one, urgency, cause-and-effect, setup-payoff, conflict escalation |
|
|
62
|
-
|
|
63
|
-
### Prose & Voice
|
|
64
|
-
|
|
65
|
-
| Skill | Purpose |
|
|
66
|
-
|-------|---------|
|
|
67
|
-
| `prose-craft` | Review and teach prose technique: sound and rhythm, sentence variety, punctuation, repetition, word economy, crowding and leaping |
|
|
68
|
-
| `point-of-view` | Guide point of view, narrative voice, tense, person, and indirect narration |
|
|
69
|
-
| `persuasive-storytelling` | Guide persuasive storytelling for nonfiction, speeches, marketing, and advocacy |
|
|
70
|
-
|
|
71
|
-
### Editing & Reference
|
|
72
|
-
|
|
73
|
-
| Skill | Purpose |
|
|
74
|
-
|-------|---------|
|
|
75
|
-
| `editorial-practice` | Guide professional editing methods: developmental editing, line editing, copyediting, self-editing, genre-specific considerations |
|
|
76
|
-
| `citation-style` | Guide Chicago author-date citation and reference formatting per the Chicago Manual of Style (17th edition) |
|
|
77
|
-
|
|
78
|
-
### Review
|
|
79
|
-
|
|
80
|
-
| Skill | Purpose |
|
|
81
|
-
|-------|---------|
|
|
82
|
-
| `review-manuscript` | Comprehensive multi-level review covering story architecture, reader engagement, prose craft, and editorial quality |
|
|
83
|
-
| `review-scene` | Deep analysis of a single scene against scene card criteria, engagement principles, and prose craft standards |
|
|
84
|
-
| `review-prose` | Prose-level review analyzing sound, rhythm, sentence variety, POV consistency, word economy, and crowding/leaping balance |
|
|
85
|
-
|
|
86
|
-
### Authorial Voice
|
|
87
|
-
|
|
88
|
-
| Skill | Purpose |
|
|
89
|
-
|-------|---------|
|
|
90
|
-
| `voice-mirror` | Capture the operator's voice from their own writing (`human-only` corpus) and condition agent drafts on it. Four tools: tag historical content, distil a style card, retrieve conditioning for a drafting brief, and record operator edits as feedback. Other drafting skills (email composition, Postiz, property-brochure, prospectus) call it transparently — opt-out via `voiceMirror: false` in the calling skill's frontmatter. |
|
|
91
|
-
|
|
92
|
-
## Specialist Agent
|
|
93
|
-
|
|
94
|
-
| Agent | Purpose |
|
|
95
|
-
|-------|---------|
|
|
96
|
-
| `writer-craft--manuscript-reviewer` | Autonomous deep manuscript reviewer — reads a full manuscript or chapter and produces a structured report with inline observations and summary |
|
|
97
|
-
|
|
98
|
-
The manuscript-reviewer agent operates in its own context window with file tools (Read, Glob, Grep, Write), allowing it to work through full manuscripts autonomously. Use it when the user submits a substantial piece of text for comprehensive review across all dimensions.
|
|
99
|
-
|
|
100
|
-
## Tools
|
|
101
|
-
|
|
102
|
-
Voice-mirror introduces four deterministic plugin tools. They route writes through `memory-write` so the graph-write gate stamps provenance on every node.
|
|
103
|
-
|
|
104
|
-
| Tool | Purpose |
|
|
105
|
-
|------|---------|
|
|
106
|
-
| `voice-tag-content` | Stamp `authorshipMode ∈ {human-only, human-led-agent-assisted, agent-led-human-reviewed, agent-only, unknown}` on one or many `:KnowledgeDocument | :Message | :SocialPost` nodes (email threads live as `:KnowledgeDocument {source:'email'}` since Task 321). Bulk-mode for backfill batches. |
|
|
107
|
-
| `voice-distil-profile` | Walk the operator's `human-only` corpus and persist a `:VoiceProfile {styleCard, generatedAt, corpusSize, feedbackEntries}` linked to the `:AdminUser`. Cadence-guarded: re-runs on ≥20% corpus growth or ≥30 days, otherwise no-op. |
|
|
108
|
-
| `voice-retrieve-conditioning` | Return `{styleCard, exemplars[]}` for a drafting brief. K=5 short-form, K=15 long-form. Token-budget bounded. Graceful degradation: empty profile → `{styleCard: null, exemplars: []}`. |
|
|
109
|
-
| `voice-record-feedback` | Capture an operator edit on an agent draft as a `:VoiceEdit` with a Haiku-summarised `intent`, linked back to the operator's `:VoiceProfile` via `:FEEDBACK_FOR`. |
|
|
110
|
-
|
|
111
|
-
The non-voice skills continue to operate via existing platform tools (`memory-search` for knowledge retrieval). Structured choices are still presented as numbered lists in plain chat — the platform has no inline-UI component primitive on the admin / native-CC surface.
|
|
112
|
-
|
|
113
|
-
## References
|
|
114
|
-
|
|
115
|
-
Domain knowledge files loaded on demand by each skill. See individual skill files for their specific reference listings.
|
|
116
|
-
|
|
117
|
-
| Skill | References |
|
|
118
|
-
|-------|-----------|
|
|
119
|
-
| `story-architecture` | `misbelief-desire-worldview.md`, `blueprinting-and-scene-cards.md`, `origin-scenes-and-escalation.md`, `inner-issue-and-protagonist-goal.md` |
|
|
120
|
-
| `story-blueprint` | `blueprinting-process.md`, `blueprinting-exercises.md` |
|
|
121
|
-
| `prose-craft` | `sound-and-rhythm.md`, `word-economy.md`, `punctuation-and-grammar.md`, `repetition.md` |
|
|
122
|
-
| `point-of-view` | `pov-types-and-voice.md`, `tense-and-person.md`, `indirect-narration.md`, `protagonist-filter.md` |
|
|
123
|
-
| `reader-engagement` | `hooking-readers.md`, `cause-effect-setup-payoff.md`, `conflict-escalation.md`, `neurochemistry-of-engagement.md` |
|
|
124
|
-
| `persuasive-storytelling` | `audience-analysis.md`, `transformation-framework.md`, `crafting-persuasive-story.md`, `persuasion-case-studies.md` |
|
|
125
|
-
| `editorial-practice` | `developmental-editing.md`, `line-editing.md`, `copyediting.md`, `genre-specific-editing.md`, `self-editing.md` |
|
|
126
|
-
| `citation-style` | `citation-rules.md`, `reference-list-rules.md`, `journal-article-models.md`, `book-and-chapter-models.md`, `other-source-models.md` |
|
|
127
|
-
| `review-manuscript` | `review-manuscript-checklist.md` |
|
|
128
|
-
| `review-scene` | `scene-analysis-framework.md` |
|
|
129
|
-
| `review-prose` | `prose-review-checklist.md` |
|
|
130
|
-
| `voice-mirror` | No external references; the skill body defines the four tool contracts. Developer notes in `maxy-code/.docs/voice-mirror.md`. |
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: manuscript-reviewer
|
|
3
|
-
description: "Autonomous deep manuscript reviewer. Delegate when the user submits a manuscript, chapter, or substantial passage for comprehensive review, asks for a 'full review', 'manuscript assessment', or 'deep critique', or wants feedback across all dimensions of writing quality rather than a specific aspect."
|
|
4
|
-
summary: "Reads a full manuscript or chapter and produces a structured report with inline observations and a summary covering story architecture, reader engagement, prose craft, and editorial quality."
|
|
5
|
-
model: claude-sonnet-4-6
|
|
6
|
-
tools: Read, Glob, Grep, Write
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Manuscript Reviewer Agent
|
|
10
|
-
|
|
11
|
-
## Doctrine
|
|
12
|
-
|
|
13
|
-
Never run uncommanded git writes. `git init`, `git commit`, `git add`, `git stash`, `git reset`, `git checkout`, and branch mutations are forbidden unless the operator named the action in this turn. If a harness precondition demands a git state you don't have, stop and report — never improvise a repo or commit.
|
|
14
|
-
|
|
15
|
-
You are a manuscript reviewer with deep expertise in neuroscience-based story theory, professional editing practice, and prose craft. Your job is to read the submitted text carefully and produce a comprehensive review that helps the writer make their work better.
|
|
16
|
-
|
|
17
|
-
## Your Knowledge Base
|
|
18
|
-
|
|
19
|
-
You draw on three bodies of knowledge:
|
|
20
|
-
|
|
21
|
-
1. **Neuroscience-based story theory** — how the brain processes narrative, why readers engage or disengage, the internal architecture of story (misbelief, desire, third rail, cause-and-effect, setup-payoff)
|
|
22
|
-
2. **Professional editing practice** — developmental editing, line editing, copyediting, genre-specific considerations
|
|
23
|
-
3. **Prose craft technique** — sound, rhythm, sentence variety, POV, voice, word economy, crowding and leaping
|
|
24
|
-
|
|
25
|
-
## Review Process
|
|
26
|
-
|
|
27
|
-
### Step 1: Read the Full Text
|
|
28
|
-
Read everything before making observations. Note your first impressions — where you were engaged, confused, bored, or delighted. These are data.
|
|
29
|
-
|
|
30
|
-
### Step 2: Identify the Story's Core
|
|
31
|
-
Before critiquing, establish what exists:
|
|
32
|
-
- What is the story about (the internal journey, not the plot)?
|
|
33
|
-
- Who is the protagonist and what do they want?
|
|
34
|
-
- What is the misbelief or inner issue?
|
|
35
|
-
- What is the story question the reader is tracking?
|
|
36
|
-
|
|
37
|
-
If these cannot be identified, that is the primary finding.
|
|
38
|
-
|
|
39
|
-
### Step 3: Apply Four Lenses (in order)
|
|
40
|
-
|
|
41
|
-
**Lens 1 — Story Architecture:**
|
|
42
|
-
Check misbelief (specific, earned, active?), desire (in conflict with misbelief?), third rail (does every scene touch it?), cause-and-effect chain through the internal story, opening (last possible moment?), trajectory toward the Aha moment.
|
|
43
|
-
|
|
44
|
-
**Lens 2 — Reader Engagement:**
|
|
45
|
-
Check the opening hook, urgency, cause-and-effect scene to scene, setup-payoff integrity, conflict escalation, emotional resonance (protagonist reacting, reader able to mirror).
|
|
46
|
-
|
|
47
|
-
**Lens 3 — Prose Craft:**
|
|
48
|
-
Check sound and rhythm (mind's ear test), sentence variety, adjective/adverb economy, repetition (deliberate vs. accidental), POV consistency, exposition integration, crowding/leaping balance.
|
|
49
|
-
|
|
50
|
-
**Lens 4 — Editorial Quality:**
|
|
51
|
-
Check structural pacing, line-level clarity, internal consistency (names, timeline, details), passages where the reader would disengage.
|
|
52
|
-
|
|
53
|
-
### Step 4: Produce the Report
|
|
54
|
-
|
|
55
|
-
Output two parts:
|
|
56
|
-
|
|
57
|
-
**Part A — Inline Observations:**
|
|
58
|
-
Walk through the text, noting observations at the specific points where they occur. For each:
|
|
59
|
-
- Quote or reference the passage
|
|
60
|
-
- Name the issue precisely
|
|
61
|
-
- Explain why it matters to the reader's experience
|
|
62
|
-
- Suggest a direction for revision where possible
|
|
63
|
-
|
|
64
|
-
**Part B — Summary Report:**
|
|
65
|
-
|
|
66
|
-
```
|
|
67
|
-
## Manuscript Review: [Title/Description]
|
|
68
|
-
|
|
69
|
-
### What Works
|
|
70
|
-
[Specific, genuine praise — name what the writer does well]
|
|
71
|
-
|
|
72
|
-
### Story Architecture
|
|
73
|
-
[Misbelief, desire, third rail, internal story, cause-and-effect]
|
|
74
|
-
|
|
75
|
-
### Reader Engagement
|
|
76
|
-
[Hooks, urgency, setup-payoff, conflict, emotional resonance]
|
|
77
|
-
|
|
78
|
-
### Prose Craft
|
|
79
|
-
[Sound, rhythm, POV, word economy, crowding/leaping]
|
|
80
|
-
|
|
81
|
-
### Editorial Notes
|
|
82
|
-
[Structure, pacing, consistency, line-level issues]
|
|
83
|
-
|
|
84
|
-
### Priority Recommendations
|
|
85
|
-
[3-5 most important things to address, ordered by impact]
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
## Review Principles
|
|
89
|
-
|
|
90
|
-
- **Start with what works.** Every manuscript has strengths. Name them.
|
|
91
|
-
- **Biggest issues first.** If story architecture is broken, don't lead with comma placement.
|
|
92
|
-
- **Be specific.** Not "the pacing is off" but "Chapters 4-6 lose momentum because the protagonist has no active goal."
|
|
93
|
-
- **Explain why.** Don't just flag problems — explain what they do to the reader.
|
|
94
|
-
- **Preserve the author's voice.** Never suggest changes that would make the writing sound like you.
|
|
95
|
-
- **Frame as possibilities.** "What if..." rather than "You must..."
|
|
96
|
-
- **The book belongs to the author.** Help them write the best version of their book.
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@maxy/writer-craft-mcp",
|
|
3
|
-
"version": "0.1.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"build": "tsc",
|
|
9
|
-
"smoke": "node scripts/smoke.mjs"
|
|
10
|
-
},
|
|
11
|
-
"dependencies": {
|
|
12
|
-
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
13
|
-
"neo4j-driver": "^5.28.1"
|
|
14
|
-
},
|
|
15
|
-
"devDependencies": {
|
|
16
|
-
"typescript": "^5.7.0",
|
|
17
|
-
"@types/node": "^22.0.0"
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Boot + shape smoke test for the writer-craft MCP server.
|
|
4
|
-
*
|
|
5
|
-
* Verifies:
|
|
6
|
-
* 1. Every compiled tool module loads without throwing.
|
|
7
|
-
* 2. Every exported handler is a function with the expected name.
|
|
8
|
-
* 3. AUTHORSHIP_MODES enum covers the five spec-required values.
|
|
9
|
-
* 4. TAGGABLE_PRIMARY_LABELS covers the four content labels.
|
|
10
|
-
* 5. `voice-retrieve-conditioning` returns the graceful-degradation
|
|
11
|
-
* shape `{styleCard: null, exemplars: []}` when accountId is empty
|
|
12
|
-
* (the contract the calling drafting skills depend on).
|
|
13
|
-
*
|
|
14
|
-
* Runs with no external dependencies and no neo4j connection — the
|
|
15
|
-
* graceful-degradation case never opens a session. The four other tools
|
|
16
|
-
* are not exercised against the database here; their unit test coverage
|
|
17
|
-
* is filed as a follow-up. This smoke harness catches import errors,
|
|
18
|
-
* accidental contract changes on the empty-corpus return shape, and
|
|
19
|
-
* structural drift on the exported enum.
|
|
20
|
-
*
|
|
21
|
-
* Exit code: 0 on pass, 1 on any assertion failure. Designed for CI
|
|
22
|
-
* gating and `npm run smoke` in the build pipeline.
|
|
23
|
-
*/
|
|
24
|
-
import { strict as assert } from "node:assert";
|
|
25
|
-
|
|
26
|
-
const errors = [];
|
|
27
|
-
function check(name, fn) {
|
|
28
|
-
try {
|
|
29
|
-
const result = fn();
|
|
30
|
-
if (result && typeof result.then === "function") {
|
|
31
|
-
return result.then(
|
|
32
|
-
() => console.log(` ok ${name}`),
|
|
33
|
-
(err) => {
|
|
34
|
-
errors.push({ name, err });
|
|
35
|
-
console.error(` FAIL ${name}: ${err.message}`);
|
|
36
|
-
},
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
console.log(` ok ${name}`);
|
|
40
|
-
} catch (err) {
|
|
41
|
-
errors.push({ name, err });
|
|
42
|
-
console.error(` FAIL ${name}: ${err.message}`);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
console.log("[writer-craft smoke] starting");
|
|
47
|
-
|
|
48
|
-
// 1. Modules load.
|
|
49
|
-
const tagMod = await import("../dist/tools/voice-tag-content.js");
|
|
50
|
-
const distilMod = await import("../dist/tools/voice-distil-profile.js");
|
|
51
|
-
const retrieveMod = await import("../dist/tools/voice-retrieve-conditioning.js");
|
|
52
|
-
const feedbackMod = await import("../dist/tools/voice-record-feedback.js");
|
|
53
|
-
const corpusMod = await import("../dist/lib/voice-corpus.js");
|
|
54
|
-
|
|
55
|
-
await check("voice-tag-content exports voiceTagContent function", () => {
|
|
56
|
-
assert.equal(typeof tagMod.voiceTagContent, "function");
|
|
57
|
-
});
|
|
58
|
-
await check("voice-tag-content exports AUTHORSHIP_MODES set of 5", () => {
|
|
59
|
-
const expected = [
|
|
60
|
-
"human-only",
|
|
61
|
-
"human-led-agent-assisted",
|
|
62
|
-
"agent-led-human-reviewed",
|
|
63
|
-
"agent-only",
|
|
64
|
-
"unknown",
|
|
65
|
-
];
|
|
66
|
-
assert.equal(tagMod.AUTHORSHIP_MODES.size, 5);
|
|
67
|
-
for (const m of expected) assert.ok(tagMod.AUTHORSHIP_MODES.has(m), `missing ${m}`);
|
|
68
|
-
});
|
|
69
|
-
await check("voice-distil-profile exports voiceDistilProfile function", () => {
|
|
70
|
-
assert.equal(typeof distilMod.voiceDistilProfile, "function");
|
|
71
|
-
});
|
|
72
|
-
await check("voice-retrieve-conditioning exports voiceRetrieveConditioning function", () => {
|
|
73
|
-
assert.equal(typeof retrieveMod.voiceRetrieveConditioning, "function");
|
|
74
|
-
});
|
|
75
|
-
await check("voice-record-feedback exports voiceRecordFeedback function", () => {
|
|
76
|
-
assert.equal(typeof feedbackMod.voiceRecordFeedback, "function");
|
|
77
|
-
});
|
|
78
|
-
await check("VOICE_CORPUS_WHERE is non-empty string with both predicates", () => {
|
|
79
|
-
assert.equal(typeof corpusMod.VOICE_CORPUS_WHERE, "string");
|
|
80
|
-
assert.ok(corpusMod.VOICE_CORPUS_WHERE.includes("authorshipMode IN"));
|
|
81
|
-
assert.ok(corpusMod.VOICE_CORPUS_WHERE.includes("human-only"));
|
|
82
|
-
assert.ok(corpusMod.VOICE_CORPUS_WHERE.includes("human-led-agent-assisted"));
|
|
83
|
-
assert.ok(corpusMod.VOICE_CORPUS_WHERE.includes("Section"));
|
|
84
|
-
});
|
|
85
|
-
await check("TAGGABLE_PRIMARY_LABELS covers the four content labels", () => {
|
|
86
|
-
const labels = [...corpusMod.TAGGABLE_PRIMARY_LABELS];
|
|
87
|
-
assert.deepEqual(labels.sort(), ["Email", "KnowledgeDocument", "Message", "SocialPost"]);
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
// 2. Graceful-degradation contract — the drafting skills depend on this.
|
|
91
|
-
// Empty accountId/adminUserId path returns the empty shape without
|
|
92
|
-
// opening a neo4j session. This is the load-bearing contract.
|
|
93
|
-
await check(
|
|
94
|
-
"voice-retrieve-conditioning returns empty shape on missing accountId",
|
|
95
|
-
async () => {
|
|
96
|
-
const result = await retrieveMod.voiceRetrieveConditioning({
|
|
97
|
-
accountId: "",
|
|
98
|
-
adminUserId: "u",
|
|
99
|
-
brief: { format: "short" },
|
|
100
|
-
});
|
|
101
|
-
assert.deepEqual(result, { styleCard: null, exemplars: [] });
|
|
102
|
-
},
|
|
103
|
-
);
|
|
104
|
-
await check(
|
|
105
|
-
"voice-retrieve-conditioning returns empty shape on missing adminUserId",
|
|
106
|
-
async () => {
|
|
107
|
-
const result = await retrieveMod.voiceRetrieveConditioning({
|
|
108
|
-
accountId: "acc",
|
|
109
|
-
adminUserId: "",
|
|
110
|
-
brief: { format: "long" },
|
|
111
|
-
});
|
|
112
|
-
assert.deepEqual(result, { styleCard: null, exemplars: [] });
|
|
113
|
-
},
|
|
114
|
-
);
|
|
115
|
-
|
|
116
|
-
// 3. voice-tag-content validates the mode enum before any DB work.
|
|
117
|
-
await check("voice-tag-content rejects an invalid mode", async () => {
|
|
118
|
-
await assert.rejects(
|
|
119
|
-
() =>
|
|
120
|
-
tagMod.voiceTagContent({
|
|
121
|
-
nodeIds: ["x"],
|
|
122
|
-
mode: "not-a-mode",
|
|
123
|
-
accountId: "acc",
|
|
124
|
-
}),
|
|
125
|
-
/invalid authorshipMode/,
|
|
126
|
-
);
|
|
127
|
-
});
|
|
128
|
-
await check("voice-tag-content rejects empty accountId", async () => {
|
|
129
|
-
await assert.rejects(
|
|
130
|
-
() =>
|
|
131
|
-
tagMod.voiceTagContent({
|
|
132
|
-
nodeIds: ["x"],
|
|
133
|
-
mode: "human-only",
|
|
134
|
-
accountId: "",
|
|
135
|
-
}),
|
|
136
|
-
/accountId is required/,
|
|
137
|
-
);
|
|
138
|
-
});
|
|
139
|
-
await check("voice-tag-content returns zero counts on empty nodeIds (no DB hit)", async () => {
|
|
140
|
-
const result = await tagMod.voiceTagContent({
|
|
141
|
-
nodeIds: [],
|
|
142
|
-
mode: "human-only",
|
|
143
|
-
accountId: "acc",
|
|
144
|
-
});
|
|
145
|
-
assert.deepEqual(result, { updated: 0, skipped: 0, skippedReasons: {} });
|
|
146
|
-
});
|
|
147
|
-
|
|
148
|
-
if (errors.length > 0) {
|
|
149
|
-
console.error(`\n[writer-craft smoke] FAILED — ${errors.length} assertion(s)`);
|
|
150
|
-
process.exit(1);
|
|
151
|
-
}
|
|
152
|
-
console.log("\n[writer-craft smoke] all passed");
|
|
@@ -1,289 +0,0 @@
|
|
|
1
|
-
import { initStderrTee } from "../../../../platform/lib/mcp-stderr-tee/dist/index.js";
|
|
2
|
-
initStderrTee("writer-craft");
|
|
3
|
-
|
|
4
|
-
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
5
|
-
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
6
|
-
import { z } from "zod";
|
|
7
|
-
import { voiceTagContent, AUTHORSHIP_MODES, type AuthorshipMode } from "./tools/voice-tag-content.js";
|
|
8
|
-
import { voiceDistilProfile } from "./tools/voice-distil-profile.js";
|
|
9
|
-
import { voiceRetrieveConditioning } from "./tools/voice-retrieve-conditioning.js";
|
|
10
|
-
import { voiceRecordFeedback } from "./tools/voice-record-feedback.js";
|
|
11
|
-
import { closeDriver } from "./lib/neo4j.js";
|
|
12
|
-
|
|
13
|
-
const server = new McpServer({
|
|
14
|
-
name: "maxy-writer-craft",
|
|
15
|
-
version: "0.1.0",
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
// Plugin-system boot tolerance — module-init must never throw. Per-call
|
|
19
|
-
// refusal preserves account isolation. Mirrors the memory plugin's
|
|
20
|
-
// pattern (Task 202).
|
|
21
|
-
const accountId = process.env.ACCOUNT_ID ?? null;
|
|
22
|
-
const adminUserIdEnv = process.env.ADMIN_USER_ID ?? null;
|
|
23
|
-
process.stderr.write(
|
|
24
|
-
`[writer-craft] boot accountId=${accountId ?? "null"} adminUserId=${adminUserIdEnv ?? "null"}\n`,
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
function refuseNoAccount(toolName: string) {
|
|
28
|
-
process.stderr.write(
|
|
29
|
-
`[writer-craft] tool=${toolName} refuse reason=no-account-context\n`,
|
|
30
|
-
);
|
|
31
|
-
return {
|
|
32
|
-
content: [
|
|
33
|
-
{
|
|
34
|
-
type: "text" as const,
|
|
35
|
-
text: `${toolName} cannot execute: this MCP instance was launched without ACCOUNT_ID. Per-account graph access requires ACCOUNT_ID at spawn.`,
|
|
36
|
-
},
|
|
37
|
-
],
|
|
38
|
-
isError: true as const,
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function resolveAdminUserId(): string | null {
|
|
43
|
-
// ADMIN_USER_ID is stamped by the admin session manager at spawn time.
|
|
44
|
-
// When absent (e.g. specialist subagents), the operator must pass it as
|
|
45
|
-
// a tool argument or the tools refuse rather than orphan a profile.
|
|
46
|
-
return adminUserIdEnv;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
server.tool(
|
|
50
|
-
"voice-tag-content",
|
|
51
|
-
"Stamp authorshipMode on one or many content nodes (:KnowledgeDocument | :Message | :SocialPost) the operator owns. Email threads live as :KnowledgeDocument {source:'email'} since Task 321. Valid modes: human-only, human-led-agent-assisted, agent-led-human-reviewed, agent-only, unknown.",
|
|
52
|
-
{
|
|
53
|
-
nodeIds: z.array(z.string()).min(1).describe("Element IDs of nodes to tag"),
|
|
54
|
-
mode: z
|
|
55
|
-
.enum([
|
|
56
|
-
"human-only",
|
|
57
|
-
"human-led-agent-assisted",
|
|
58
|
-
"agent-led-human-reviewed",
|
|
59
|
-
"agent-only",
|
|
60
|
-
"unknown",
|
|
61
|
-
])
|
|
62
|
-
.describe("Authorship mode to apply"),
|
|
63
|
-
},
|
|
64
|
-
async ({ nodeIds, mode }) => {
|
|
65
|
-
if (!accountId) return refuseNoAccount("voice-tag-content");
|
|
66
|
-
try {
|
|
67
|
-
const result = await voiceTagContent({
|
|
68
|
-
nodeIds,
|
|
69
|
-
mode: mode as AuthorshipMode,
|
|
70
|
-
accountId,
|
|
71
|
-
});
|
|
72
|
-
return {
|
|
73
|
-
content: [
|
|
74
|
-
{
|
|
75
|
-
type: "text" as const,
|
|
76
|
-
text: `voice-tag: mode=${mode} updated=${result.updated} skipped=${result.skipped}`,
|
|
77
|
-
},
|
|
78
|
-
],
|
|
79
|
-
};
|
|
80
|
-
} catch (err) {
|
|
81
|
-
return {
|
|
82
|
-
content: [
|
|
83
|
-
{
|
|
84
|
-
type: "text" as const,
|
|
85
|
-
text: `voice-tag-content failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
86
|
-
},
|
|
87
|
-
],
|
|
88
|
-
isError: true,
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
);
|
|
93
|
-
|
|
94
|
-
server.tool(
|
|
95
|
-
"voice-distil-profile",
|
|
96
|
-
"Two-mode tool (Task 424). mode='sample' (default) walks the operator's human-only corpus, returns the exemplars + recent operator-edit intents for the agent to read. mode='write' persists the YAML style card the agent composed from the sample-mode response. Cadence-guarded: returns skip in 'write' mode without writing if corpus didn't grow ≥20% AND <30 days passed (pass force=true to override).",
|
|
97
|
-
{
|
|
98
|
-
adminUserId: z
|
|
99
|
-
.string()
|
|
100
|
-
.optional()
|
|
101
|
-
.describe(
|
|
102
|
-
"Operator AdminUser identifier. Defaults to ADMIN_USER_ID env from spawn context.",
|
|
103
|
-
),
|
|
104
|
-
force: z
|
|
105
|
-
.boolean()
|
|
106
|
-
.optional()
|
|
107
|
-
.describe("Override cadence guard; rebuild even if recent."),
|
|
108
|
-
mode: z
|
|
109
|
-
.enum(["sample", "write"])
|
|
110
|
-
.optional()
|
|
111
|
-
.describe("'sample' returns corpus exemplars + feedback for in-turn distillation; 'write' persists the agent-produced styleCardYaml."),
|
|
112
|
-
styleCardYaml: z
|
|
113
|
-
.string()
|
|
114
|
-
.optional()
|
|
115
|
-
.describe("Required for mode='write'. The YAML style card the agent composed from the sample-mode exemplars + feedback intents."),
|
|
116
|
-
},
|
|
117
|
-
async ({ adminUserId, force, mode, styleCardYaml }) => {
|
|
118
|
-
if (!accountId) return refuseNoAccount("voice-distil-profile");
|
|
119
|
-
const resolvedAdminUserId = adminUserId ?? resolveAdminUserId();
|
|
120
|
-
if (!resolvedAdminUserId) {
|
|
121
|
-
return {
|
|
122
|
-
content: [
|
|
123
|
-
{
|
|
124
|
-
type: "text" as const,
|
|
125
|
-
text:
|
|
126
|
-
"voice-distil-profile: adminUserId required (no ADMIN_USER_ID in spawn env).",
|
|
127
|
-
},
|
|
128
|
-
],
|
|
129
|
-
isError: true,
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
try {
|
|
133
|
-
const result = await voiceDistilProfile({
|
|
134
|
-
accountId,
|
|
135
|
-
adminUserId: resolvedAdminUserId,
|
|
136
|
-
force: force === true,
|
|
137
|
-
mode,
|
|
138
|
-
styleCardYaml,
|
|
139
|
-
});
|
|
140
|
-
const summary = result.skipped
|
|
141
|
-
? (result.exemplars
|
|
142
|
-
? `voice-distil sample: corpusSize=${result.corpusSize} exemplars=${result.exemplars.length} feedbackEntries=${result.feedbackEntries}\n${JSON.stringify({ exemplars: result.exemplars, feedbackIntents: result.feedbackIntents }, null, 2)}`
|
|
143
|
-
: `voice-distil: skipped reason=${result.skipReason} corpusSize=${result.corpusSize}`)
|
|
144
|
-
: `voice-distil: ok profileId=${result.profileId} corpusSize=${result.corpusSize} feedbackEntries=${result.feedbackEntries} generatedAt=${result.generatedAt}`;
|
|
145
|
-
return { content: [{ type: "text" as const, text: summary }] };
|
|
146
|
-
} catch (err) {
|
|
147
|
-
return {
|
|
148
|
-
content: [
|
|
149
|
-
{
|
|
150
|
-
type: "text" as const,
|
|
151
|
-
text: `voice-distil-profile failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
152
|
-
},
|
|
153
|
-
],
|
|
154
|
-
isError: true,
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
);
|
|
159
|
-
|
|
160
|
-
server.tool(
|
|
161
|
-
"voice-retrieve-conditioning",
|
|
162
|
-
"Return the operator's style card and K voice-matched exemplars for a drafting brief. K=5 short-form, K=15 long-form. Token-budget bounded. Returns empty {styleCard:null,exemplars:[]} when no profile exists.",
|
|
163
|
-
{
|
|
164
|
-
adminUserId: z
|
|
165
|
-
.string()
|
|
166
|
-
.optional()
|
|
167
|
-
.describe("Operator AdminUser identifier. Defaults to ADMIN_USER_ID env."),
|
|
168
|
-
topic: z
|
|
169
|
-
.string()
|
|
170
|
-
.optional()
|
|
171
|
-
.describe("Drafting topic keyword (filters exemplars to relevant ones)"),
|
|
172
|
-
format: z
|
|
173
|
-
.enum(["short", "long"])
|
|
174
|
-
.describe("Short = email/post (K=5, 16k tokens); long = brochure/prospectus (K=15, 96k tokens)"),
|
|
175
|
-
register: z.string().optional().describe("Optional register hint"),
|
|
176
|
-
tokenBudget: z.number().int().positive().optional(),
|
|
177
|
-
},
|
|
178
|
-
async ({ adminUserId, topic, format, register, tokenBudget }) => {
|
|
179
|
-
if (!accountId) return refuseNoAccount("voice-retrieve-conditioning");
|
|
180
|
-
const resolvedAdminUserId = adminUserId ?? resolveAdminUserId();
|
|
181
|
-
if (!resolvedAdminUserId) {
|
|
182
|
-
return {
|
|
183
|
-
content: [
|
|
184
|
-
{
|
|
185
|
-
type: "text" as const,
|
|
186
|
-
text: JSON.stringify({ styleCard: null, exemplars: [] }),
|
|
187
|
-
},
|
|
188
|
-
],
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
try {
|
|
192
|
-
const result = await voiceRetrieveConditioning({
|
|
193
|
-
accountId,
|
|
194
|
-
adminUserId: resolvedAdminUserId,
|
|
195
|
-
brief: { topic, format, register },
|
|
196
|
-
tokenBudget,
|
|
197
|
-
});
|
|
198
|
-
return {
|
|
199
|
-
content: [
|
|
200
|
-
{ type: "text" as const, text: JSON.stringify(result) },
|
|
201
|
-
],
|
|
202
|
-
};
|
|
203
|
-
} catch (err) {
|
|
204
|
-
// Graceful degradation: callers expect {styleCard:null,exemplars:[]}
|
|
205
|
-
// on failure, never an error response.
|
|
206
|
-
process.stderr.write(
|
|
207
|
-
`[voice-retrieve] tool error: ${err instanceof Error ? err.message : String(err)}\n`,
|
|
208
|
-
);
|
|
209
|
-
return {
|
|
210
|
-
content: [
|
|
211
|
-
{
|
|
212
|
-
type: "text" as const,
|
|
213
|
-
text: JSON.stringify({ styleCard: null, exemplars: [] }),
|
|
214
|
-
},
|
|
215
|
-
],
|
|
216
|
-
};
|
|
217
|
-
}
|
|
218
|
-
},
|
|
219
|
-
);
|
|
220
|
-
|
|
221
|
-
server.tool(
|
|
222
|
-
"voice-record-feedback",
|
|
223
|
-
"Capture an operator's edit on an agent draft. Writes :VoiceEdit linked to :VoiceProfile via :FEEDBACK_FOR. The calling agent supplies `intent` (one sentence describing what the operator changed and what voice preference it reveals); Task 424 moved the diff-intent summarisation into the agent's turn.",
|
|
224
|
-
{
|
|
225
|
-
adminUserId: z.string().optional(),
|
|
226
|
-
originalText: z.string().min(1),
|
|
227
|
-
editedText: z.string().min(1),
|
|
228
|
-
intent: z
|
|
229
|
-
.string()
|
|
230
|
-
.min(1)
|
|
231
|
-
.describe("One sentence summarising what changed and what voice preference it reveals — produced by the calling agent in-turn from originalText vs editedText (Task 424)."),
|
|
232
|
-
skill: z.string().optional().describe("Calling skill name, for provenance"),
|
|
233
|
-
brief: z.string().optional().describe("Drafting brief that produced the original"),
|
|
234
|
-
},
|
|
235
|
-
async ({ adminUserId, originalText, editedText, intent, skill, brief }) => {
|
|
236
|
-
if (!accountId) return refuseNoAccount("voice-record-feedback");
|
|
237
|
-
const resolvedAdminUserId = adminUserId ?? resolveAdminUserId();
|
|
238
|
-
if (!resolvedAdminUserId) {
|
|
239
|
-
return {
|
|
240
|
-
content: [
|
|
241
|
-
{
|
|
242
|
-
type: "text" as const,
|
|
243
|
-
text: "voice-record-feedback: adminUserId required (no ADMIN_USER_ID in spawn env).",
|
|
244
|
-
},
|
|
245
|
-
],
|
|
246
|
-
isError: true,
|
|
247
|
-
};
|
|
248
|
-
}
|
|
249
|
-
try {
|
|
250
|
-
const result = await voiceRecordFeedback({
|
|
251
|
-
accountId,
|
|
252
|
-
adminUserId: resolvedAdminUserId,
|
|
253
|
-
originalText,
|
|
254
|
-
editedText,
|
|
255
|
-
intent,
|
|
256
|
-
context: { skill, brief },
|
|
257
|
-
});
|
|
258
|
-
return {
|
|
259
|
-
content: [
|
|
260
|
-
{
|
|
261
|
-
type: "text" as const,
|
|
262
|
-
text: `voice-record-feedback: editId=${result.editId} intent="${result.intent}" hadProfile=${result.hadProfile}`,
|
|
263
|
-
},
|
|
264
|
-
],
|
|
265
|
-
};
|
|
266
|
-
} catch (err) {
|
|
267
|
-
return {
|
|
268
|
-
content: [
|
|
269
|
-
{
|
|
270
|
-
type: "text" as const,
|
|
271
|
-
text: `voice-record-feedback failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
272
|
-
},
|
|
273
|
-
],
|
|
274
|
-
isError: true,
|
|
275
|
-
};
|
|
276
|
-
}
|
|
277
|
-
},
|
|
278
|
-
);
|
|
279
|
-
|
|
280
|
-
const transport = new StdioServerTransport();
|
|
281
|
-
await server.connect(transport);
|
|
282
|
-
|
|
283
|
-
process.on("SIGTERM", async () => {
|
|
284
|
-
await closeDriver();
|
|
285
|
-
process.exit(0);
|
|
286
|
-
});
|
|
287
|
-
|
|
288
|
-
// Surface AUTHORSHIP_MODES for downstream callers / docs.
|
|
289
|
-
export { AUTHORSHIP_MODES };
|