You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+70-15Lines changed: 70 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,36 +4,82 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
4
4
5
5
## Repository Overview
6
6
7
-
This is the lab manual for the Contextual Dynamics Laboratory (CDL) at Dartmouth College. It's a LaTeX document using the Tufte-book class that describes lab policies, member responsibilities, and research approach.
7
+
This is the lab manual for the Contextual Dynamics Laboratory (CDL) at Dartmouth College. It's a LaTeX document using the Tufte-book class that describes lab policies, member responsibilities, and research approach. The repo also contains a **Slack onboarding bot** (`scripts/onboarding/`) that automates member on/offboarding.
8
8
9
9
## Build Commands
10
10
11
11
**Compile the PDF:**
12
12
```bash
13
13
./compile.sh
14
14
```
15
+
Runs `latex` 5x (for cross-references/index), then `pdflatex`, and cleans up intermediate files. Requires a LaTeX distribution (`brew install --cask mactex` on macOS).
15
16
16
-
This runs `latex` multiple times (for cross-references and index), then `pdflatex`, and cleans up intermediate files. Requires a LaTeX distribution (e.g., `brew install --cask mactex` on macOS).
Tests use real API calls (no mocks). Tests skip automatically when credentials are missing.
17
33
18
-
**HTML version:** The HTML version is automatically generated via GitHub Actions when changes are pushed to master. No manual build is needed. The workflow uses make4ht (TeX4ht) with `tufte.cfg` configuration to convert to tufte-css styled HTML.
34
+
**Run the onboarding bot:**
35
+
```bash
36
+
python -m scripts.onboarding.bot
37
+
```
38
+
Requires `.env` in `scripts/onboarding/` with Slack tokens, GitHub PAT, and optionally Google/Anthropic credentials.
19
39
20
40
## Project Structure
21
41
22
-
-`lab_manual.tex` - Main document source (single file containing all content)
23
-
-`lab_manual.pdf` - Compiled output (committed to repo)
24
-
-`tufte.cfg` - TeX4ht configuration for HTML generation
-**`compile-latex.yml`** — On PRs touching `.tex` files: compiles LaTeX, posts error comment and closes PR on failure
74
+
-**`build-html.yml`** — On push to `master`: converts LaTeX to HTML via tex4ht, deploys to GitHub Pages at `contextlab.github.io/lab-manual`
29
75
30
76
## LaTeX Conventions
31
77
32
-
The document uses several custom commands defined in `lab_manual.tex`:
33
-
-`\marginnote{}`- For margin notes (TASK items and NOTEs)
34
-
-`\newthought{}`- For section introductions
35
-
-`\ourschool`- Expands to "Dartmouth College"
36
-
-`\director`, `\coordinator`- Lab director references
78
+
Custom commands in `lab_manual.tex`:
79
+
-`\marginnote{}`— Margin notes (TASK items and NOTEs)
80
+
-`\newthought{}`— Section introductions
81
+
-`\ourschool`— Expands to "Dartmouth College"
82
+
-`\director`, `\coordinator`— Lab director references
37
83
- Links use `dartmouthgreen` color (RGB: 0, 105, 62)
38
84
39
85
## Workflow Notes
@@ -42,3 +88,12 @@ After editing `lab_manual.tex`:
42
88
1. Run `./compile.sh` to regenerate the PDF
43
89
2. Verify the PDF looks correct (check TOC links, margin notes positioning)
44
90
3. Commit both the `.tex` source and updated `.pdf`
91
+
92
+
The HTML version is auto-generated by CI — no manual build needed.
93
+
94
+
## Key Gotchas
95
+
96
+
-`lab_manual.tex` is gitignored (the `.tex` line in `.gitignore`) — this is intentional to avoid accidental commits of intermediate build state. The file IS tracked by git despite the gitignore entry.
97
+
- The CI will **close PRs** that fail LaTeX compilation — always test locally with `./compile.sh` first.
98
+
- Onboarding bot credentials go in `scripts/onboarding/.env` (gitignored). Never commit tokens or service account JSON files.
99
+
- Bot tests require running from the repo root so `scripts.onboarding` is importable as a package.
an interface for asking questions, storing notes, and sharing
829
822
ideas. If you have a~\ourschool~NetID you should be able to join the workspace by clicking the link.
830
823
If you do \textit{not} have a NetID, you'll need to \href{https://services.dartmouth.edu/TDClient/1806/Portal/Requests/ServiceDet?ID=30581}{request one here}.
831
-
\marginnote{\texttt{TASK:} When you join our Slack workspace, initiate our onboarding process using the ``Join the lab!'' workflow. You can access this workflow in the \texttt{\#general} channel
824
+
\marginnote{\texttt{TASK:} When you join our Slack workspace, initiate our onboarding process using the \href{https://slack.com/shortcuts/Ft07ESC6CP3J/b1531b6fe100db8522fbd05c6a49ef63}{``Join the lab!'' workflow}. You can also access this workflow in the \texttt{\#general} channel
832
825
through the Workflows menu (usually near the top left of the window). Once you initiate the workflow, you'll be guided through the onboarding process.}
feel you don't have the appropriate account type, please communicate
867
860
your concerns to \director.
868
861
862
+
\newthought{Onboarding and offboarding}
863
+
\label{sec:onboarding}
864
+
865
+
\noindent The lab uses an automated onboarding system to help new members get set up quickly and consistently. When you initiate the ``Join the lab!'' workflow in Slack, you'll be asked to provide:
866
+
\begin{itemize}
867
+
\item Your GitHub username
868
+
\item Your email address (preferably Gmail or Dartmouth)
869
+
\item Your preferred name for the lab website
870
+
\item A short bio (2--3 sentences about yourself and your research interests)
871
+
\item A link to your personal website (optional)
872
+
\end{itemize}
873
+
874
+
\marginnote{\texttt{NOTE:} After submitting the workflow, please also send a profile photo to \director~via Slack DM. Once approved, your photo and bio will be added to the lab website.}
875
+
876
+
Once you submit this information, \director~will review your submission and approve your onboarding. The system will then automatically:
877
+
\begin{itemize}
878
+
\item Send you an invitation to the \href{https://github.com/ContextLab}{ContextLab GitHub organization}
879
+
\item Grant you access to the lab's Google Calendars (Contextual Dynamics Lab, Out of lab, and CDL Resources)
880
+
\item Add your profile to the \href{https://contextlab.github.io}{lab website} via a pull request
881
+
\item Update the lab's internal records
882
+
\end{itemize}
883
+
884
+
You will receive notifications in Slack as each step completes. If any issues arise during the process, \director~will reach out to help resolve them.
885
+
886
+
\textbf{When leaving the lab,} please notify \director~in advance via Slack to initiate the offboarding process. The offboarding process will:
887
+
\begin{itemize}
888
+
\item Move your profile to the alumni section of the lab website
889
+
\item Revoke access to GitHub repositories and calendars (as appropriate)
890
+
\item Update lab records
891
+
\end{itemize}
892
+
You may be asked to provide your current position and institution URL for the alumni listing.
893
+
869
894
\newthought{Setting up your development environment}
0 commit comments