Interactive scaffolding for new research projects. Creates the full directory structure (paper/, jcode/, notes/, refs/), populates CLAUDE.md files, sets up Julia project with chosen architecture (Style A Module or Style B Flat Include), and copies templates from the research toolkit.
You are setting up a new research project for Mohammed. Follow these steps exactly.
The research toolkit contains templates, guides, and conventions. Find it:
Search for a directory containing CLAUDE.md with the text "Mohammed's Research Toolkit" in these locations (use Glob and Grep, search in parallel):
~/.claude/skills/research-toolkit/~/research-toolkit/~/Research/research-toolkit/~/Dropbox/Research/research-toolkit/../research-toolkit/../../research-toolkit/If found, store the path and move to Step 2.
If NOT found, ask the user:
git clone https://github.com/mmogib/research-toolkit.git to a location the user specifies, then use that path.Check the current working directory:
paper/main.tex exist? If yes, note it — do not overwrite it.CLAUDE.md exist? If yes, warn the user and ask if they want to continue (this may be an existing project).Report what you found and proceed.
LaTeX template handling:
paper/main.tex does NOT exist: create it from templates/main.tex.template, filling in the title from the user's answer in Step 3. Also create an empty paper/references.bib and an empty paper/temp_refs_to_add.bib (with a header comment: % Suggested references for Mohammed to verify and import via Zotero). Create paper/submissions/ directory.paper/main.tex DOES exist: the user already has preliminary notes. Do NOT touch it. Offer to copy the LaTeX template as paper/template_reference.tex so the user can pull preamble/boilerplate from it if needed.Ask the user the following interactively using AskUserQuestion. Ask one group at a time, not all at once:
Group 1 — Project identity:
Group 2 — Coding architecture:
module ... end, explicit exports, @kwdef configs, @testset tests. Best for reusable libraries, multiple algorithms, namespace isolation.include("src/includes.jl"), iterator protocol, preset system, multi-solver benchmarking. Best for single-algorithm, rapid prototyping, many variants.Group 3 — Storage and problem domains:
experiments.db file, content-addressable config hashing, queryable, --export for CSV output.problems_nle.jl starterproblems_cs.jl starterproblems_imgrec.jl starterproblems.jl with interface contract only)Group 4 — Project scope (optional, can be filled later):
Based on the chosen style and options, read the appropriate templates from the toolkit directory:
Always read:
templates/CLAUDE.md.templatetemplates/jcode-CLAUDE.md.templatetemplates/Project.toml.templatetemplates/main.tex.template (LaTeX starter)templates/types_template.jl (SolverResult, IterRecord, make_result)templates/script_smoke_test.jlStyle A additionally:
templates/module_template.jltemplates/runtests.jl.templateStyle B additionally:
templates/includes_template.jl (has JCODE_ROOT)templates/deps_template.jltemplates/iterator_solver_template.jlIf SQLite backend:
templates/benchmark_db_template.jlPer selected problem domain:
templates/problems_nle_template.jltemplates/problems_cs_template.jltemplates/problems_imgrec_template.jlCreate the following directory tree:
./
├── CLAUDE.md ← Populated from template + user answers
├── paper/
│ ├── main.tex ← From LaTeX template (SKIP if already exists)
│ ├── references.bib ← Empty file (Zotero will populate)
│ ├── temp_refs_to_add.bib ← Claude puts suggested refs here for Mohammed to verify
│ ├── imgs/ ← Empty directory
│ └── submissions/ ← One subfolder per journal (cover letters, responses)
├── jcode/
│ ├── CLAUDE.md ← Populated from template + user answers
│ ├── Project.toml ← Populated with correct module name + DB deps
│ ├── src/
│ │ ├── includes.jl ← Style B entry point with JCODE_ROOT
│ │ ├── deps.jl ← Centralized dependencies (incl. SQLite if chosen)
│ │ ├── types.jl ← SolverResult, IterRecord, make_result
│ │ ├── io_utils.jl ← TeeIO, setup_logging, teardown_logging
│ │ ├── benchmark.jl ← DB infrastructure (if SQLite) or CSV helpers
│ │ ├── problems_nle.jl ← (if selected) nonlinear equations starter
│ │ ├── problems_cs.jl ← (if selected) compressed sensing starter
│ │ ├── problems_imgrec.jl ← (if selected) image restoration starter
│ │ └── algorithm.jl ← Style B: iterator solver template
│ ├── scripts/
│ │ └── s01_smoke_test.jl ← Smoke test with solver + hash checks
│ ├── test/ ← Style A: runtests.jl; Style B: empty
│ └── results/
│ └── logs/
├── notes/
│ └── done/
└── refs/ ← Reference papers (PDFs) for Claude to read
CLAUDE.md (project-level):
See [toolkit-path] for coding style, templates, and workflow guides.Skills: ~/.claude/skills/research-toolkit/jcode/CLAUDE.md:
jcode/Project.toml:
name to the codenamejcode/src/ (both styles — always created):
types.jl — from templates/types_template.jl (SolverResult, IterRecord, make_result)io_utils.jl — TeeIO implementation (from infrastructure-patterns.md)problems_nle_template.jl)jcode/src/ (Style A additionally):
{ModuleName}.jl — module file with includes and exports (from template)
jcode/src/ (Style B additionally):
includes.jl — from templates/includes_template.jl (with JCODE_ROOT, correct include order)
deps.jl — from templates/deps_template.jl
algorithm.jl — iterator solver template (with TODOs marked)jcode/src/benchmark.jl (storage-dependent):
templates/benchmark_db_template.jlrefs/:
jcode/scripts/s01_smoke_test.jl:
templates/script_smoke_test.jlusing, Style B: include)main(), with TeeIO loggingjcode/test/runtests.jl (Style A only):
After generating all files, print a summary:
julia --project=jcode/ -e 'import Pkg; Pkg.instantiate()' to install dependenciesproblems_*.jl filejcode/src/algorithm.jlsolvers list in s01_smoke_test.jl/jcode-script to create additional scripts (OAT, LHS, benchmark, figures)paper/main.tex if it already exists — the user's preliminary notes are there.