Integrate

From yha9806/academic-writing-toolkit · View interactive version

Integrate is an AI agent skill from the GitHub repository yha9806/academic-writing-toolkit. Map reading notes to thesis chapters and integrate key arguments into the manuscript. Use after completing a reading session to weave new material into the thesis.

How to use this skill

Skill file

/integrate — Thesis Integration Skill

Purpose

After completing a reading session, this skill weaves key arguments, quotes, and concepts from reading notes into the thesis manuscript. It ensures new material is placed in the right chapter and section, with proper attribution and minimal disruption to existing structure.

Trigger Words

This skill activates on: integrate, weave in, add to thesis, /integrate.

Workflow

  1. Scan the specified notes file(s) for the ## Thesis Connections table and ## Key Arguments section. If the user does not specify which notes file, ask. If the user says "all pending", scan all notes files with Status: completed (not yet integrated). First run the contract lint /note names in its step 7 (notes-lint.mjs, beside that skill): report any file that fails it and exclude it from the plan explicitly — never silently skip a non-conforming file. A source whose notes carry Evidence status: abstract_only or metadata_only must not be woven in as supporting evidence; flag it instead.
  1. Read target chapter files in chapters/ to identify insertion points. Use Grep to find relevant sections, existing citations of the same author, and thematic paragraphs where the new material fits.
  1. Present an integration plan as a table. Do not execute any changes yet.

```

## Integration Plan: {Author} -- {Title}

| # | Source Concept | Chapter | Section | Insertion Type | Preview |

|---|---------------|---------|---------|----------------|---------|

| 1 | {concept} | Ch{N} | {section ref} | new paragraph / expand existing / add citation / add footnote | {first 10 words of proposed text} |

Estimated word count delta: +{N} words across {N} chapters.

Proceed? (yes / edit plan / cancel)

```

  1. Wait for user approval. The user may:
  1. Execute the integration. For each row in the approved plan:
  1. Update the notes file. Change Status from completed to integrated using Edit. Update the Last updated timestamp.
  1. Report results.

```

## Integration Complete

| Chapter | Words before | Words after | Delta |

|---------|-------------|------------|-------|

| {ch} | {N} | {N} | +{N} |

Total: +{N} words across {N} chapters.

Notes file status updated to: integrated.

```

Insertion Types

Constraints

  1. Never integrate without showing the plan first. The user must approve before any chapter file is modified.
  2. Preserve existing chapter structure. Do not reorder sections, delete content, or rewrite paragraphs beyond the insertion point.
  3. Track and report word count changes for every chapter affected.
  4. Attribution: Every integrated quote must include a page reference. Every integrated argument must cite the source.
  5. No emoji in output or inserted text.
  6. British English for all inserted text (e.g., "colour" not "color", "analyse" not "analyze").
  7. One notes file at a time unless the user explicitly requests batch integration.
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.