# Seed File Templates

> Templates for Phase 4 of `/init-project-research`. Replace `<placeholders>` with interview answers.

## CLAUDE.md

```markdown
# Claude Context for <Working Title>

## Project Overview
- **Working title:** <title>
- **Authors:** <names>
- **Venue type:** <journal/conference/preprint>
- **Target venue:** <name>
- **Deadline:** <date or "No fixed deadline">
- **Type:** <experimental/computational/theoretical/mixed>

### Venue Details
<!-- Use ONE of the blocks below based on venue type -->

<!-- IF JOURNAL -->
- **CABS AJG:** <ranking>
- **WBS 60:** <yes/no>
- **FT 50:** <yes/no>
<!-- END JOURNAL -->

<!-- IF CONFERENCE -->
- **CORE ranking:** <A*/A/B/C>
- **Page limit:** <N pages + refs>
- **Format:** <template name>
- **Review type:** <double-blind/single-blind/open>
- **Anonymisation:** <yes/no>
- **Submission deadline:** <date>
- **Notification:** <date>
- **Camera-ready:** <date>
- **CfP link:** <URL>
<!-- END CONFERENCE -->

## Research Questions
1. <RQ1>
2. <RQ2>
3. <RQ3>

## Methodology
<One-line methodology overview>

## Setup

### Overleaf
- **Symlink:** `paper/` → `<overleaf-path>/`
- **External link:** <URL>
- **To recreate symlink:** `ln -s "<overleaf-path>" "<project-path>/paper"`

### GitHub
<URL or "Local-only">

### Collaborators
<Names, affiliations, contact if provided>

## Folder Structure
```
<tree of the created structure>
```

## Conventions

LaTeX → `out/`, Python → `uv`, paper/ → LaTeX only. Full conventions enforced by global rules (loaded automatically).
```

## README.md

```markdown
# <Working Title>

**Authors:** <names>
**Affiliation:** <institution>
**Target:** <venue> (<deadline or "ongoing">)

## Abstract
<elevator pitch>

## Links
- **Overleaf:** <external link>
- **GitHub:** <URL or "local-only">

## Status
- [ ] Literature review
- [ ] Research design
- [ ] Data collection
- [ ] Analysis
- [ ] Drafting
- [ ] Submission
```

## .gitignore

```gitignore
# OS
.DS_Store
Thumbs.db

# IDE
.vscode/
.idea/
*.swp

# Data (regenerable or too large for git)
data/
output/
results/

# Paper (tracked in Overleaf)
paper/

# Logs
log/

# Unsorted inbox
to-sort/

# Machine-specific memory (gitignored, never synced)
.claude/state/

# GitHub release repo (separate git repo — see references/github-release-repo.md)
github-repo/

# Python
__pycache__/
*.pyc
.venv/
*.egg-info/
dist/
build/

# R
.Rhistory
.RData
.Rproj.user/

# LaTeX build artifacts
*.aux
*.bbl
*.blg
*.fdb_latexmk
*.fls
*.log
*.out
*.synctex.gz
*.toc
out/

# Daily Overleaf snapshots (per `review-artefact-routing` rule + per-paper backup hook)
paper-*/backup/

# Archived review reports (per `review-artefact-routing` rule)
reviews/*/archived/
```

## reviews/INDEX.md

Seed an empty manifest. `/review-recap` will populate it as reviews accumulate.

```markdown
# Reviews — <Working Title>

> Manifest of review and audit reports for this project. Maintained by `/review-recap` from the on-disk artefacts in `reviews/<source>/`. See `rules/review-artefact-routing.md` for the convention.

## Latest per source

_No reports yet — run a review to populate this manifest._

## Open issues

_None._

## Stale sources

_None._
```

Also `mkdir -p reviews/` at scaffold time so the directory exists. Per-source subfolders (`reviews/paper-critic/`, etc.) are created lazily by each skill/agent on its first run.

## MEMORY.md

Seed MEMORY.md at project root based on project type. Use the **research** template by default; use the **teaching** template for teaching or workshop projects.

### Research Template

```markdown
# Memory — <Working Title>

## Notation Registry

| Variable | Convention | Anti-pattern |
|----------|-----------|--------------|
| | | |

## Citations

<!-- One-liner [LEARN:citation] corrections go here -->

## Estimand Registry

| What we estimate | Identification | Key assumptions |
|-----------------|---------------|-----------------|
| | | |

## Key Decisions

| Decision | Rationale | Date |
|----------|-----------|------|
| | | |

## Anti-Patterns

| What went wrong | Correction |
|----------------|------------|
| | |

## Code Pitfalls

| Bug | Impact | Fix |
|-----|--------|-----|
| | | |
```

### Teaching Template

```markdown
# Memory — <Course/Workshop Name>

## Lecture Progression

| Topic | Core question | Key method |
|-------|--------------|------------|
| | | |

## Student Misconceptions

| Misconception | Correction | How to address |
|--------------|------------|----------------|
| | | |

## Empirical Applications

| Paper | Dataset | Purpose |
|-------|---------|---------|
| | | |

## Code Pitfalls

| Bug | Impact | Fix |
|-----|--------|-----|
| | | |
```

## .claude/state/personal-memory.md (optional)

Not created during init — only created on first machine-specific `[LEARN]` tag. Seed template for reference:

```markdown
# Personal Memory — Machine-Specific

> Gitignored. Machine-specific workarounds and local paths.
> Generic learnings go in MEMORY.md (committed).

## Local Environment

| Issue | Workaround |
|-------|-----------|

## Tool Quirks

| Tool | Version | Gotcha |
|------|---------|--------|
```

## REVIEW-STATE.md

Per-project review log. One row per (skill/agent run). Append-only by convention. Populated by 20 review tools when they execute (paper-critic, referee2-reviewer, /proofread, /bib-validate, etc.). Rendered by `/review-recap`. Schema: `~/Task-Management/docs/reference/review-state-schema.md`.

At scaffold time, write only the header:

```markdown
# Review State — {project-slug}

> Per-project review log. One row per (skill/agent run). Append-only by convention.
> See `~/Task-Management/docs/reference/review-state-schema.md` for the schema.
> `/review-recap` renders this file. Hand-edits welcome (set Source=manual).

| Paper | Check | Last Run | Verdict | Score | Open Issues | Source | Trigger | Report | Notes |
|-------|-------|----------|---------|-------|-------------|--------|---------|--------|-------|
```

The first review tool to run on the project will append the first data row.

## .context/field-calibration.md

Copy the template from `skills/init-project-research/templates/field-calibration.md`, replacing `<Working Title>` with the project title. All other placeholders remain — `/interview-me` Phase 7 populates them.

## .context/current-focus.md

```markdown
# Current Focus

> Project just initialised. Update this file at the end of each session.

## Next Steps
1. <First logical step based on project type>
2. Set up bibliography in Overleaf
3. Begin literature review
```

## .context/project-recap.md

```markdown
# Project Recap: <Working Title>

## Abstract
<elevator pitch>

## Research Questions
1. <RQ1>
2. <RQ2>
3. <RQ3>

## Methodology
<overview>

## Key Decisions
<empty — to be populated as the project evolves>

## References
<empty — add key papers as literature review progresses>
```

## .claude/hooks/copy-paper-pdf.sh

PostToolUse hook that copies compiled paper PDFs to the backup folder after LaTeX compilation. Multi-paper-safe: scans for all `paper-*` directories/symlinks and copies each `main.pdf` to `<paper-wrapper>/backup/<dirname>_vcurrent.pdf`.

```bash
#!/usr/bin/env bash
# PostToolUse hook: copy compiled paper PDFs to backup folder after LaTeX compilation
# Scans for all paper-* directories and copies each main.pdf → backup/<dirname>_vcurrent.pdf
# Only copies when source is newer; silently skips missing PDFs

PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"

for paper_dir in "$PROJECT_ROOT"/paper-*; do
    [ -d "$paper_dir" ] || [ -L "$paper_dir" ] || continue
    dirname="$(basename "$paper_dir")"
    src="$paper_dir/paper/main.pdf"
    [ -f "$src" ] || src="$paper_dir/main.pdf"
    backup_dir="$paper_dir/backup"
    dest="$backup_dir/${dirname}_vcurrent.pdf"
    if [ -f "$src" ]; then
        if [ ! -f "$dest" ] || [ "$src" -nt "$dest" ]; then
            mkdir -p "$backup_dir"
            cp "$src" "$dest"
        fi
    fi
done
```

After creating the hook script, the PostToolUse hook must also be registered in `.claude/settings.local.json`. Add the following to the `hooks` key:

```json
"hooks": {
    "PostToolUse": [
        {
            "matcher": "Bash",
            "hooks": [
                {
                    "type": "command",
                    "command": ".claude/hooks/copy-paper-pdf.sh"
                }
            ]
        }
    ]
}
```
