|
| 1 | +# Contributing to DataMagic |
| 2 | + |
| 3 | +Thanks for your interest in DataMagic. The repo is currently **docs-first** — |
| 4 | +the production product lives at [datamagic.chat](https://datamagic.chat/), while this |
| 5 | +repository holds the public documentation, the published paper artifacts, and the |
| 6 | +[`datamagic-video`](./datamagic-video/) skill for AI coding agents. |
| 7 | + |
| 8 | +So contributions today land in one of four buckets: |
| 9 | + |
| 10 | +| Bucket | Examples | |
| 11 | +|---|---| |
| 12 | +| Docs (Chinese / English) | typo fixes, clearer explanations, broken links, missing context | |
| 13 | +| The `datamagic-video` skill | new rule pages, refining narrative patterns, chart-selection guidance, anti-patterns | |
| 14 | +| Examples | new input/output examples under `docs/input-output-examples*.md` | |
| 15 | +| Infrastructure | CI, link checking, lint config | |
| 16 | + |
| 17 | +Please open an Issue first for anything beyond a small fix so we can align on scope. |
| 18 | + |
| 19 | +## Quick start |
| 20 | + |
| 21 | +```bash |
| 22 | +git clone https://github.com/HKUSTDial/DataMagic |
| 23 | +cd DataMagic |
| 24 | +``` |
| 25 | + |
| 26 | +The repo has no build step. To preview your edits, just open the Markdown files |
| 27 | +locally (or in your editor's preview pane). To match what CI checks, run: |
| 28 | + |
| 29 | +```bash |
| 30 | +# Markdown lint (matches the rules in .markdownlint.json) |
| 31 | +npx --yes markdownlint-cli@0.41.0 "**/*.md" --ignore node_modules |
| 32 | + |
| 33 | +# Link check on a single file |
| 34 | +npx --yes markdown-link-check@3.12.2 -c .markdown-link-check.json README.md |
| 35 | +``` |
| 36 | + |
| 37 | +## Style |
| 38 | + |
| 39 | +- Keep both `README.md` (中文) and `README.en.md` (English) in sync when editing |
| 40 | + shared sections (links, badges, examples, roadmap). |
| 41 | +- For per-doc Chinese / English pairs under `docs/`, edit both files in the same PR. |
| 42 | +- Don't add new top-level files unless necessary — prefer extending an existing doc. |
| 43 | +- The `datamagic-video` skill has its own conventions; read `datamagic-video/SKILL.md` |
| 44 | + before adding or restructuring rules there. |
| 45 | + |
| 46 | +## CI |
| 47 | + |
| 48 | +Every push and PR runs the `docs` workflow ([.github/workflows/docs.yml](./.github/workflows/docs.yml)): |
| 49 | + |
| 50 | +- **markdownlint** — across the whole repo, using `.markdownlint.json` |
| 51 | +- **link check** — only the Markdown files changed in the PR, using |
| 52 | + `.markdown-link-check.json` |
| 53 | + |
| 54 | +Both jobs run on Node 20 and finish in well under a minute. Please make sure they |
| 55 | +pass locally before opening a PR. |
| 56 | + |
| 57 | +## Reporting issues |
| 58 | + |
| 59 | +For product bugs (the hosted app at datamagic.chat), please include a reproducer, |
| 60 | +the dataset shape, and the generation mode you used (Full Pipeline / Fast / Single |
| 61 | +Chart). For skill / docs issues, link the exact file and line. |
0 commit comments