From thesis-writer
Interactive, evidence-grounded planning at thesis, chapter, section, subsection, and paragraph scope. Use to preserve top-down narrative narrowing while building author-readable plan.md files paired with claim-addressable evidence.md provenance ledgers through interleaved Zotero research and author review.
How this skill is triggered — by the user, by Claude, or both
Slash command
/thesis-writer:document-plannerThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
<!-- GENERATED FILE — edit src/ or vendors/, then run scripts/build_plugin.py -->
Build plans collaboratively from thesis scope down to paragraph and sentence scope. Preserve the author's narrative and domain judgment while preventing model-generated facts from entering a write-ready plan without visible provenance.
The planner may propose structure, reader-state transitions, purposes, research questions, and placement. It must not generate an external factual proposition from memory and then search for a citation that can be made to fit it.
CRITICAL — Zotero access policy: NEVER call mcp__deep-zotero__* tools directly. All Zotero library access MUST go through the zotero-research agent, spawned via the Task tool. Only the zotero-research agent is permitted to call the MCP tools.
Read, in this order:
.tex file. Existing prose is authoritative for existing content.plan.md. This is the author-readable content and structure authority.evidence.md. This is the grounding and provenance authority for the stable point IDs in the local plan.plan.md and sibling evidence.md, up to the thesis level. Parent plans set narrative goals and scope; their ledgers ground their points.Use a plan.md and sibling evidence.md at every hierarchy level. Do not use chapter_plan.md. Keep plan.md readable as a working document for the author: narrative, structure, planned content, citations, figures, cross-references, and only a stable point ID plus status as machine metadata. Put point type, origin, cards, passages, qualifications, contradictions, search receipts, and every non-literature receipt in evidence.md.
plan.md is authoritative for what the thesis should say and how it is organised. evidence.md is authoritative for whether each planned point is grounded and how. The ledger may not add a point that is absent from its sibling plan, change its intended meaning, or become a second planning surface. Every stable point ID in either file must have exactly one matching entry in the other.
Higher-level decisions constrain lower levels. A lower-level change to narrative, structure, emphasis, or scope requires author approval and a matching update to every affected parent plan. Existing .tex content cannot be removed without explicit discussion.
When a plan is absent, create its structure only after the author approves the proposed hierarchy. Do not copy an ungrounded factual bullet into a lower-level plan as though inheritance had verified it.
Every paragraph-level point has exactly one type. Apply the same types to substantive bullets at higher levels when they contain technical information.
| Type | Meaning | Evidence gate | Prose eligibility |
|---|---|---|---|
CLAIM | Literature-backed proposition about the world | Supported or explicitly qualified Zotero evidence card | Yes, with the card's citations |
PROJECT_FACT | Fact about this thesis, apparatus, data, code, or procedure | Exact project-evidence locator | Yes; cite locally when the document convention requires it |
DERIVATION | Mathematical consequence of stated premises | Premise IDs plus checked steps or calculation receipt | Yes |
AUTHOR_ASSERTION | Domain statement the author explicitly owns | Author attestation recorded with date/context | Yes only after the author explicitly accepts uncited responsibility |
INFERENCE | New conclusion drawn from grounded premises | Premise IDs plus explicit inference and limits | Yes, labelled with the warranted strength |
LINK | Ordering, contrast, or reader-navigation instruction | None | Planning metadata; normally produces no sentence |
PURPOSE | What a unit must accomplish for the narrative | None | Planning metadata; produces no sentence |
OPEN | Question, candidate proposition, corpus gap, or unresolved conflict | None yet | No |
Use this test: if deleting the point loses technical information about the world or project, it is not a LINK or PURPOSE. A transition containing a causal premise contains a claim even if it also links paragraphs. Split the claim from the link.
Author approval does not convert a CLAIM into evidence. It may convert a point into AUTHOR_ASSERTION only when the author knowingly accepts that provenance.
Assign stable IDs before research and never reuse an ID. Use a readable hierarchical prefix and an immutable serial, for example:
C03-S02-P01-CL01C03-S02-P01-LK01C03-S02-P01-OP01The location prefix may become stale after reordering; the ID remains unchanged. Record the current location separately. When one point splits, retain the original ID for the surviving proposition and assign new IDs to additional propositions. When points merge, retain all contributing IDs as aliases.
Claim IDs persist through thesis, chapter, section, paragraph, prose, and review. Lower levels may narrow a higher-level claim but may not silently strengthen or broaden it.
A paragraph is write-ready only when:
CLAIM has an approved evidence card containing at least one supporting passage; otherwise retype it as OPEN.PROJECT_FACT has a precise project locator.DERIVATION names grounded premises and has checked steps.AUTHOR_ASSERTION records explicit author attestation.INFERENCE names grounded premises and states its inferential limits.LINK and PURPOSE points contain no hidden propositions.OPEN point is included in writer input.Fail closed. A plan may be structurally approved while not write-ready. Label those states separately.
Report the structure and content found in .tex, the local plan.md, and parent plans. Identify:
Ask the author to resolve substantive mismatches before editing authority documents. Preserve their edits.
Plan in this order:
thesis → chapter → section → subsection → paragraph
Complete and obtain author agreement at one level before descending. Work through sibling units sequentially. At each level establish:
PURPOSE.LINK points.Present a compact visual chain, for example:
[Feedback vocabulary] → [Sensor and actuator paths] → [Controller design] → [Robustness limits]
Structural planning may proceed without citations because PURPOSE and LINK are not factual content. If a proposed stub asserts a mechanism, quantity, comparison, cause, prevalence, or literature conclusion, type it as OPEN until grounded.
For each section, revalidate:
Then propose section-local paragraphs (¶1, ¶2, ...), each with:
PURPOSE;LINK instructions;Do not invent a concrete factual stub to make the outline look complete. Express missing content as OPEN: a bounded question or evidence need.
Operate one paragraph or tightly coupled paragraph group at a time. Do not generate a section's factual skeleton before research.
For each paragraph, distinguish:
.tex;Turn planner uncertainty into a research question, not a candidate fact. Ask questions such as "What mechanisms does the indexed literature report for X under Y conditions?" rather than "Find support for X causes Y." A user-supplied proposition may be submitted for verification, but retain its AUTHOR_ASSERTION or OPEN origin until the evidence verdict returns.
Spawn zotero-research for the paragraph's research questions and verification requests. Require:
The research worker may synthesize across retrieved passages because the raw Zotero context is too large for the planner. The planner must not strengthen that synthesis.
Construct points only from returned evidence, explicit author statements, project evidence, or derivations. Assign IDs and type each point. Preserve:
If sources disagree, retain the conflict in the card and propose contested wording. Never select only the convenient side.
Present the paragraph's typed point list with its evidence cards. The author may change scope, ordering, emphasis, or provenance. Any substantive rewording that exceeds the passages' entailment requires a new Zotero verification request.
After feedback, rerun prerequisite, topic-coherence, gap, framing, and quantitative checks. A framing check may add only PURPOSE or LINK; it cannot add a technical premise.
Iterate until the author approves both content and provenance. Record structural approval and write-ready approval separately.
Write approved point wording, citations, status, narrative, structure, and figure or cross-reference notes into the directory plan.md. Write the matching typed provenance entries into its sibling evidence.md. Before continuing, reconcile the files bidirectionally: reject a missing ledger entry, an orphan ledger ID, a status that exceeds its receipt, or a semantic mismatch between planned content and grounded scope. Then continue to the next paragraph and section. After a section is complete, check cross-paragraph duplication and claim scope. After a chapter is complete, check cross-section duplication and update parent plans and ledgers for approved structural changes.
Keep all provenance in the sibling evidence.md. This is the single grounding authority, not a second content plan and not a reference_debt.md replacement. Entries are keyed by IDs already present in plan.md.
# Evidence: [Title]
Plan: [sibling plan path]
Document type: [background|research|conclusions|future-work]
Recorded: [YYYY-MM-DD]
Parent plan: [parent plan path]
## C03-S02-P01-CL01
**Type:** CLAIM
**Origin:** Zotero synthesis from research request [request ID]
**Grounded scope:** [single bounded synthesis matching, without broadening, the planned content]
#### Supporting evidence
- `keyA` — [item title], p. 42, [section/chunk]
> "[shortest complete verbatim supporting passage]"
Entailment: [supported content and limits]
- `keyB` — [item title], p. 118, [section/chunk]
> "[verbatim passage]"
Entailment: [supported content and limits]
#### Qualifying evidence
- `keyC` — [item title], p. 9, [section/chunk]
> "[verbatim passage]"
Qualification: [how the claim must be narrowed]
#### Contradicting evidence
- `keyD` — [item title], p. 27, [section/chunk]
> "[verbatim passage]"
Conflict: [opposing result and differing conditions]
**Search receipt:** [queries, filters, tools, index coverage, stopping boundary]
List None found within the search boundary under an empty evidence class. "All" means all materially relevant results admitted by the recorded search, not corpus completeness.
Use the same entry envelope for every point type. PROJECT_FACT, DERIVATION, AUTHOR_ASSERTION, and INFERENCE entries contain their type-specific locators, steps, attestations, premises, warrants, and limits. LINK and PURPOSE entries contain their type and origin but no invented receipt. Do not put these fields, evidence-card bodies, quotations, research-request details, search receipts, premise bookkeeping, or attestations in plan.md.
## [point ID]
**Type:** PROJECT_FACT | DERIVATION | AUTHOR_ASSERTION | INFERENCE | LINK | PURPOSE
**Origin:** [author/project/plan/research origin]
**Grounded scope:** [scope that semantically matches the plan item]
**Receipt:** [exact project locator | premise IDs and checked steps | dated author attestation | premise IDs, warrant, and limits | not required]
Keep an unresolved point visible and readable in plan.md as an ID, status, and bounded question or proposed content. Keep its full gap record in the matching evidence.md entry:
## C03-S02-P01-OP04
**Type:** OPEN
**Origin:** author assertion | existing prose | project lead | research lead
**Zotero search receipt:** [...]
**Missing evidence:** [...]
**Resolution:** project evidence | author attestation | source acquisition | revision | removal
Do not create or append to reference_debt.md. A derived summary of unresolved IDs is allowed only as a generated view; plan.md remains the content authority and evidence.md remains the grounding authority.
Resolution lanes:
PROJECT_FACT.AUTHOR_ASSERTION.zotero-source-acquisition skill to locate candidate primary sources, obtain user approval, and import approved sources with PDFs into Zotero. After import and indexing, send the claim back to zotero-research.The planner and zotero-research must never fetch or import external sources themselves. A source-acquisition recommendation is not evidence and does not make a point write-ready.
# Plan: [Title]
Status: [draft|approved]
## Narrative thread
[Author-approved narrative]
## Sections
### Section X.Y: [Title]
**Purpose:** [C03-S02-PU01 | structure-only] [narrative function]
#### Paragraph 1 — [label]
**Purpose:** [C03-S02-P01-PU01 | structure-only] [...]
- [C03-S02-P01-CL01 | write-ready] [bounded claim] \cite{keyA,keyB}
- [C03-S02-P01-PF01 | write-ready] [project-specific planned content]
- [C03-S02-P01-IF01 | write-ready] [bounded inference]
- [C03-S02-P01-LK01 | structure-only] [ordering instruction; no thesis sentence]
- [C03-S02-P01-OP01 | open] [bounded unresolved question or proposed content]
→ **Figure:** [descriptive label and specification]
## Unresolved points
[Optional readable index of `open` point IDs and their questions; full gap records remain only in `evidence.md`]
Use only write-ready, open, and structure-only as point statuses. Status is the only machine field besides the stable ID in a plan point. Do not encode type, origin, evidence verdict, research request, or receipt details in a plan line. A technical point may be write-ready only when its matching ledger entry contains its complete type-specific receipt. OPEN points use open; LINK and PURPOSE points use structure-only.
The plan header may contain only the author-visible Status: draft|approved field. Keep document type, recording date, parent path, research state, and grounding bookkeeping in evidence.md. Do not add a block-level grounding field to plan.md; derive readiness by reconciling every in-scope point status with its ledger receipt.
Do not apply paragraph-level "standard textbook" exemptions. Citation need follows point type, not chapter type or citation-density targets. Background chapters usually contain more CLAIM points; methods and results usually contain more PROJECT_FACT and DERIVATION points. Conclusions should derive from earlier claim and project-fact IDs rather than introduce new propositions.
After the author approves a structural level or grounded plan block, silently append a terse entry to authorship_log_draft.md containing:
Do not checkpoint clarification or mechanical research calls. Preserve working state until the block is committed; then remove temporary scratch files.
zotero-research only for the indexed Zotero corpus.zotero-source-acquisition; imported material returns through zotero-research before promotion.plan.md and evidence.md authority documents.writer.Autonomy is low. Read and analyse autonomously; propose structure and research questions; run bounded Zotero research after the relevant scope is agreed. Do not finalize structure, promote evidence, retype an author assertion, or write authority documents without author approval.
npx claudepluginhub p/ccam80-thesis-writer-dist-claude-thesis-writerGuides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.
Dispatches multiple subagents concurrently for independent tasks without shared state. Use when facing 2+ unrelated failures or subsystems that can be investigated in parallel.