89 lines
3.0 KiB
Markdown
89 lines
3.0 KiB
Markdown
# CLAUDE.md - Agent Guidelines for Uni Slides (DHBW + HdM)
|
||
|
||
This project builds presentation decks for Marp, supporting multiple courses.
|
||
|
||
## Courses
|
||
|
||
- **223015b** - Dateiformate, Schnittstellen, Speichermedien (HdM, 6 Kapitel + Klausur)
|
||
- **223015c** - Internettechnologien (HdM, 3 Kapitel + Klausur)
|
||
- **dhbw** - Technik I – Grundlagen IT (DHBW, 8 Kapitel)
|
||
|
||
## Agent Restrictions
|
||
|
||
- Agent NEVER runs commands outside this folder
|
||
- Agent NEVER runs build/deploy commands without explicit user request
|
||
- Agent NEVER runs deploy commands (make deploy, scp, etc.) without explicit user permission
|
||
- Agent NEVER runs `git checkout --` or `git restore` on files with uncommitted work. To undo specific changes, use targeted Edit operations instead.
|
||
|
||
## Critical File Protection
|
||
|
||
Slide files in `slides/*/*.md` are main content files:
|
||
- ALLOWED: Adding slides, adjusting content, fixing typos, enhancing sections
|
||
- FORBIDDEN (without permission): Deleting slides, removing sections, bulk deletions
|
||
- Before ANY deletion: ALWAYS ask user for confirmation
|
||
|
||
## Project Structure
|
||
|
||
```
|
||
slides/
|
||
├── 223015b/ # HdM: Dateiformate
|
||
├── 223015c/ # HdM: Internettechnik
|
||
└── dhbw/ # DHBW: Technik I
|
||
scripts/ # Shared scripts
|
||
themes/ # Custom Marp themes
|
||
build/ # Generated output (gitignored)
|
||
```
|
||
|
||
## Build Commands
|
||
|
||
Unified per-course pattern: `make <target>-<course>`. Group targets without
|
||
suffix run for all courses.
|
||
|
||
```bash
|
||
# Per-course (replace <c> with course id: 223015b, 223015c, dhbw)
|
||
make dev-<c> # Live server (HMR) on per-course port
|
||
make build-<c> # Build HTML + PDF
|
||
make html-<c> # HTML only
|
||
make pdf-<c> # PDF only
|
||
make klausur-<c> # Extract klausur slides (HdM only)
|
||
make deploy-<c> # Build + deploy single course (ASK FIRST!)
|
||
|
||
# All courses
|
||
make dev # Combined dev server (port 1312, all courses)
|
||
make build # Build everything
|
||
make html / pdf # HTML / PDF only
|
||
make klausur # Extract klausur (HdM courses only)
|
||
make deploy # Deploy everything (ASK FIRST!)
|
||
```
|
||
|
||
Per-course ports: `223015b` → 1313, `223015c` → 1314, `dhbw` → 1315.
|
||
|
||
**Adding a new course:** add id to `COURSES` in Makefile + define `<id>_NAME`,
|
||
`<id>_KAPITEL`, `<id>_DEPLOY`, `<id>_PORT`, `<id>_KLAUSUR`. No new targets needed.
|
||
|
||
## Nix Flake Commands
|
||
|
||
```bash
|
||
nix develop # Dev shell with all tools (node 22, npm, make)
|
||
```
|
||
|
||
## Code Style Guidelines
|
||
|
||
### File Structure
|
||
- Slides in `slides/<course>/`
|
||
- Assets in `slides/<course>/assets/`
|
||
- Always reference images as `./assets/filename.png`
|
||
|
||
### Naming Conventions
|
||
- Slide files: `NN-topic.md` (e.g., `01-grundlagen.md`)
|
||
- Images: `snake_case.jpg` or `kebab-case.jpg`
|
||
|
||
### Markdown Style
|
||
- Use ATX-style headers (# ## ###)
|
||
- Frontmatter for slide metadata
|
||
- Never include a final `---` (creates empty slide)
|
||
|
||
### Git Workflow
|
||
- Commit messages: ALWAYS lowercase
|
||
- NEVER add co-authoring lines or generated footers
|