Thesis Writer
Thesis Writer is a dual-vendor plugin for co-drafting a doctoral thesis in LaTeX, with Zotero-backed fact checks and citations. One shared source produces complete Claude Code and Codex plugins; vendor mechanics are kept in small, explicit overlays.
What it provides
document-planner ⇄ zotero-research ⇄ zotero-source-acquisition
│ (author writes prose; agent proposes bullets, reviews, moves, checks facts)
├─ prose-sweep weasel words, vagueness, report guidelines
├─ figure-generator
├─ formatter
└─ reviewer ⇄ zotero-research pre-submission audit
The plugin also includes authorship-session logging and a vendor-specific project initializer. Claude Code initializes CLAUDE.md; Codex initializes AGENTS.md. Both use the same canonical thesis-instruction template.
Prerequisites
- Zotero with a populated research library
- The Deep Zotero MCP server in a Python virtual environment
- Claude Code and/or Codex
- A LaTeX distribution for compilation
- Python 3.10 or newer; matplotlib for figure generation
- For corpus-gap acquisition: installed Google Chrome, a dedicated persistent SSO profile, and a Zotero API key with library write and file access
The local scripts default to C:\local_working_projects\zotero_citation_mcp. Pass --mcp-root on another machine. The generated MCP configuration contains only the resolved virtual-environment interpreter and -m deep_zotero.server; it never copies or prints API keys.
Install or update locally
Build and validate both plugins first:
python scripts\build_plugin.py --vendor all
python scripts\validate_all.py --mcp-root C:\path\to\zotero_citation_mcp
Install or update Codex:
python scripts\install_plugin.py --vendor codex --mcp-root C:\path\to\zotero_citation_mcp --execute
This copies the disposable generated plugin to ~/plugins/thesis-writer, creates the standard personal marketplace entry only when needed, applies Codex's required local cachebuster, and runs codex plugin add thesis-writer@personal. Start a new Codex task after installation so skills and MCP tools are reloaded.
The installer stages and fully configures the replacement before swapping it into place, so a missing MCP interpreter, failed server import, or missing cachebuster cannot destroy a working installation. A custom --marketplace is supported when it follows <root>/.agents/plugins/marketplace.json and --plugin-home is <root>/plugins; the installer reads and uses that marketplace's actual top-level name in the Codex command.
Install or update Claude Code:
python scripts\install_plugin.py --vendor claude --mcp-root C:\path\to\zotero_citation_mcp --execute
The script builds the Claude distribution, updates or registers this repository as the thesis-writer-marketplace, and updates or installs thesis-writer@thesis-writer-marketplace. Restart Claude Code after installation. From the Claude Code interface, published updates can also be applied with /plugin marketplace update thesis-writer-marketplace followed by /plugin update thesis-writer@thesis-writer-marketplace.
Omit --execute to build and show the vendor commands without running them. Codex's plugin files and marketplace entry are still prepared locally so their paths and MCP import can be verified.
Initialize a thesis project
- Claude Code: run
/thesis-writer:init.
- Codex: ask to use the
thesis-writer-init skill.
The initializer appends the versioned contract block beside any existing project instructions and replaces the block in place when its version differs from the template's. Content outside the contract markers is never modified, and no reduced fallback template is produced.
Source and build architecture
Repository-root AGENTS.md contains plugin-maintainer instructions, and root CLAUDE.md is a relative symlink to it. These files govern work on this repository; they are not thesis-project templates and are not consumed by the builder. End-user instructions come only from src/templates/thesis-instructions.md.