@abstractdata/create-docs 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/README.md +36 -0
  2. package/bin/.fuse_hidden0000000a00000002 +194 -0
  3. package/bin/.fuse_hidden0000000d00000003 +194 -0
  4. package/bin/cli.js +194 -0
  5. package/package.json +38 -0
  6. package/template/.claude/skills/abstract-data-docs-author/SKILL.md +305 -0
  7. package/template/.claude/skills/abstract-data-setup/SKILL.md +555 -0
  8. package/template/.cursor/rules/abstract-data-docs-author.mdc +311 -0
  9. package/template/.cursor/rules/abstract-data-setup.mdc +561 -0
  10. package/template/.cursor/rules/welcome.mdc +29 -0
  11. package/template/.fuse_hidden0000001e00000008 +75 -0
  12. package/template/.fuse_hidden0000002100000009 +46 -0
  13. package/template/.fuse_hidden000000210000000a +75 -0
  14. package/template/.fuse_hidden000000240000000b +46 -0
  15. package/template/.github/copilot-instructions.md +893 -0
  16. package/template/.github/workflows/deploy-cloudflare.yml +50 -0
  17. package/template/.github/workflows/deploy-vercel.yml +47 -0
  18. package/template/.github/workflows/deploy.yml +55 -0
  19. package/template/CLAUDE.md +46 -0
  20. package/template/README.md +75 -0
  21. package/template/astro.config.mjs +69 -0
  22. package/template/package.json +25 -0
  23. package/template/public/favicon.svg +26 -0
  24. package/template/scripts/build-python-docs.mjs +385 -0
  25. package/template/scripts/build-ts-docs.mjs +349 -0
  26. package/template/scripts/python-autodoc.json +10 -0
  27. package/template/scripts/ts-autodoc.json +10 -0
  28. package/template/src/assets/README.md +1 -0
  29. package/template/src/content/docs/index.mdx +81 -0
  30. package/template/src/content/docs/quickstart.md +162 -0
  31. package/template/src/content.config.ts +46 -0
  32. package/template/src/env.d.ts +2 -0
  33. package/template/tsconfig.json +5 -0
@@ -0,0 +1,46 @@
1
+ # Abstract Data Documentation Theme — agent context
2
+
3
+ This project uses the **Abstract Data Documentation Theme** (built on Astro Starlight, distributed as `@abstractdata/starlight-theme`). When talking to the user, refer to the product as the **"Abstract Data Documentation Theme"** — not "Astro Starlight" — Starlight is the substrate, not the product identity.
4
+
5
+ ## First-interaction handshake — IMPORTANT
6
+
7
+ When you open a conversation in this project, immediately check the setup state:
8
+
9
+ - **`scripts/python-autodoc.json`** — does it have placeholder values like `searchPath: "../../../python-example/src"` and a `modules` list pointing at `example_module`? Or has it been customized for this project's actual Python source?
10
+ - **`astro.config.mjs`** — is `title: 'Your Project Docs'` still the literal placeholder? Is `site: 'https://example.com'` still the placeholder URL?
11
+
12
+ **If either signal looks like a fresh scaffold,** open the conversation with this offer (don't wait for the user to ask):
13
+
14
+ > "Looks like this is a freshly scaffolded Abstract Data Documentation Theme project. Want me to run the `abstract-data-setup` workflow now? It'll detect your Python source, audit docstring coverage, sniff your docstring style, ask a few config questions, and wire up `python-autodoc.json`, `astro.config.mjs`, and `package.json`. (Reply 'no' if you'd rather configure manually — I won't ask again.)"
15
+
16
+ If the user agrees, immediately invoke the `abstract-data-setup` skill (`.claude/skills/abstract-data-setup/SKILL.md`).
17
+
18
+ **If setup looks already-done** (JSON has real module names, `astro.config.mjs` has a real title): don't auto-offer the handshake. Just be a normal helpful assistant for whatever the user wants to work on.
19
+
20
+ **Once the user has declined or completed setup:** treat this handshake as satisfied for the rest of the conversation. Don't keep nagging.
21
+
22
+ ## Skill location
23
+
24
+ The full setup workflow lives at `.claude/skills/abstract-data-setup/SKILL.md`. It's an 11-phase procedural skill: confirm context → locate source → detect Python signals → audit docstring coverage → detect docstring style → recommend modules → gather brand config → write configs → optionally run docs:python → optional pre-commit hook → summary.
25
+
26
+ ## Project conventions
27
+
28
+ - **Package manager: Bun** — not npm/yarn/pnpm. Use `bun run <name>` and `bun add <pkg>`.
29
+ - **Commits: Conventional Commits** — release-please reads them to bump versions automatically. `feat:` for minor, `fix:` for patch, `feat!:` or `BREAKING CHANGE:` for major.
30
+ - **Don't hand-edit:** `.cursor/rules/abstract-data-setup.mdc`, `.github/copilot-instructions.md`, `.cursor/rules/welcome.mdc` — these are auto-generated.
31
+
32
+ ## Quick reference
33
+
34
+ - `astro.config.mjs` — Starlight config: title, sidebar, plugin options
35
+ - `scripts/python-autodoc.json` — Python autodoc target config
36
+ - `scripts/build-python-docs.mjs` — orchestrator that wraps pydoc-markdown
37
+ - `src/content/docs/` — Markdown/MDX content
38
+ - `bun run dev` — start the docs dev server
39
+ - `bun run docs:python` — regenerate API pages from Python source
40
+ - `bun run build` — production build
41
+
42
+ ## Links
43
+
44
+ - Source repo: https://github.com/Abstract-Data/abstract-data-doc-theme
45
+ - Theme on npm: https://www.npmjs.com/package/@abstractdata/starlight-theme
46
+ - Scaffolder on npm: https://www.npmjs.com/package/@abstractdata/create-docs
@@ -0,0 +1,75 @@
1
+ # Abstract Data Docs Template
2
+
3
+ Starter Starlight documentation site with the [`@abstractdata/starlight-theme`](https://github.com/Abstract-Data/abstract-data-doc-theme) already wired in.
4
+
5
+ ## Use this template
6
+
7
+ **The fastest path** — use the `@abstract-data/create-docs` CLI:
8
+
9
+ ```bash
10
+ bun create @abstract-data/docs my-docs
11
+ cd my-docs
12
+ bun install
13
+ bun dev
14
+ ```
15
+
16
+ The CLI copies this template into a fresh folder, swaps `workspace:*` for a real published version of the theme, sets your project name in `package.json` and `astro.config.mjs`, and runs `git init` so you have a clean history from step zero.
17
+
18
+ **Alternative — clone manually:**
19
+
20
+ Click **"Use this template"** on the GitHub repo (or fork it) to create a new repo from this code, then:
21
+
22
+ ```bash
23
+ git clone https://github.com/your-org/your-new-repo.git
24
+ cd your-new-repo
25
+ bun install
26
+ bun dev
27
+ ```
28
+
29
+ > **If you copied this folder out of the monorepo manually**, change the `@abstractdata/starlight-theme` dependency in `package.json` from `"workspace:*"` to a real version like `"^0.3.0"` before running `bun install`.
30
+
31
+ ## Customize
32
+
33
+ See [`src/content/docs/quickstart.md`](./src/content/docs/quickstart.md) — it walks through what to change in `astro.config.mjs`, where to drop your logo, and how to toggle motion / credit / version.
34
+
35
+ ### Auto-setup with your AI coding assistant
36
+
37
+ This template ships the `abstract-data-setup` workflow in three formats so it works regardless of which AI assistant you use:
38
+
39
+ | Tool | File | Fidelity |
40
+ |---|---|---|
41
+ | **Claude Code** | `.claude/skills/abstract-data-setup/SKILL.md` | full procedural workflow |
42
+ | **Cursor** | `.cursor/rules/abstract-data-setup.mdc` | full procedural workflow |
43
+ | **GitHub Copilot** | `.github/copilot-instructions.md` | static reference (Copilot can't natively run interactive prompts) |
44
+
45
+ Open your tool of choice in this folder and say **"set up docs"** (or "wire up Python autodoc", "configure docs", "audit docstrings", etc.). The workflow detects your source project, audits docstring coverage, sniffs docstring style, asks a few configuration questions, and writes the right files (`scripts/python-autodoc.json`, `astro.config.mjs` sidebar + plugin config, `package.json` scripts).
46
+
47
+ If you only use one tool, delete the other adapter folders — they're independent files.
48
+
49
+ The Claude Code SKILL.md is the source of truth; the Cursor and Copilot files are auto-generated from it. (Edit the SKILL.md and run `bun run sync-skills` if you're working in the monorepo.)
50
+
51
+ Round 1 covers Python projects. TypeScript, Next.js, TanStack, OpenAPI, and other detectors are planned for follow-up rounds.
52
+
53
+ ## Deploy to GitHub Pages
54
+
55
+ The workflow at `.github/workflows/deploy.yml` is preconfigured. To enable:
56
+
57
+ 1. **Repo Settings → Pages → Source:** select **"GitHub Actions"**.
58
+ 2. **Push to `main`.** The workflow builds with Bun and publishes to Pages.
59
+ 3. **For project pages** (e.g. `username.github.io/your-repo`), uncomment the `base:` line in `astro.config.mjs` and set it to `/your-repo-name`.
60
+
61
+ ## Other deploy targets
62
+
63
+ The output is plain static HTML — drop `dist/` on any host:
64
+
65
+ - **Vercel** — easiest: connect the repo at vercel.com → New Project. Vercel auto-detects Astro and deploys on every push. No workflow needed. If you want CI control, use `.github/workflows/deploy-vercel.yml` (delete the GitHub Pages workflow first).
66
+ - **Cloudflare Pages** — easiest: connect at dash.cloudflare.com/?to=/:account/pages → Create Project. Same flow as Vercel. If you want CI control, use `.github/workflows/deploy-cloudflare.yml`.
67
+ - **Netlify** — same auto-deploy pattern. Drop a `netlify.toml` if you need to override.
68
+
69
+ ## Update the theme
70
+
71
+ ```bash
72
+ bun update @abstractdata/starlight-theme
73
+ ```
74
+
75
+ Bun pulls the latest minor/patch within your semver range. Major versions are opt-in.
@@ -0,0 +1,46 @@
1
+ # Abstract Data Documentation Theme — agent context
2
+
3
+ This project uses the **Abstract Data Documentation Theme** (built on Astro Starlight, distributed as `@abstractdata/starlight-theme`). When talking to the user, refer to the product as the **"Abstract Data Documentation Theme"** — not "Astro Starlight" — Starlight is the substrate, not the product identity.
4
+
5
+ ## First-interaction handshake — IMPORTANT
6
+
7
+ When you open a conversation in this project, immediately check the setup state:
8
+
9
+ - **`scripts/python-autodoc.json`** — does it have placeholder values like `searchPath: "../../../python-example/src"` and a `modules` list pointing at `example_module`? Or has it been customized for this project's actual Python source?
10
+ - **`astro.config.mjs`** — is `title: 'Your Project Docs'` still the literal placeholder? Is `site: 'https://example.com'` still the placeholder URL?
11
+
12
+ **If either signal looks like a fresh scaffold,** open the conversation with this offer (don't wait for the user to ask):
13
+
14
+ > "Looks like this is a freshly scaffolded Abstract Data Documentation Theme project. Want me to run the `abstract-data-setup` workflow now? It'll detect your Python source, audit docstring coverage, sniff your docstring style, ask a few config questions, and wire up `python-autodoc.json`, `astro.config.mjs`, and `package.json`. (Reply 'no' if you'd rather configure manually — I won't ask again.)"
15
+
16
+ If the user agrees, immediately invoke the `abstract-data-setup` skill (`.claude/skills/abstract-data-setup/SKILL.md`).
17
+
18
+ **If setup looks already-done** (JSON has real module names, `astro.config.mjs` has a real title): don't auto-offer the handshake. Just be a normal helpful assistant for whatever the user wants to work on.
19
+
20
+ **Once the user has declined or completed setup:** treat this handshake as satisfied for the rest of the conversation. Don't keep nagging.
21
+
22
+ ## Skill location
23
+
24
+ The full setup workflow lives at `.claude/skills/abstract-data-setup/SKILL.md`. It's an 11-phase procedural skill: confirm context → locate source → detect Python signals → audit docstring coverage → detect docstring style → recommend modules → gather brand config → write configs → optionally run docs:python → optional pre-commit hook → summary.
25
+
26
+ ## Project conventions
27
+
28
+ - **Package manager: Bun** — not npm/yarn/pnpm. Use `bun run <name>` and `bun add <pkg>`.
29
+ - **Commits: Conventional Commits** — release-please reads them to bump versions automatically. `feat:` for minor, `fix:` for patch, `feat!:` or `BREAKING CHANGE:` for major.
30
+ - **Don't hand-edit:** `.cursor/rules/abstract-data-setup.mdc`, `.github/copilot-instructions.md`, `.cursor/rules/welcome.mdc` — these are auto-generated.
31
+
32
+ ## Quick reference
33
+
34
+ - `astro.config.mjs` — Starlight config: title, sidebar, plugin options
35
+ - `scripts/python-autodoc.json` — Python autodoc target config
36
+ - `scripts/build-python-docs.mjs` — orchestrator that wraps pydoc-markdown
37
+ - `src/content/docs/` — Markdown/MDX content
38
+ - `bun run dev` — start the docs dev server
39
+ - `bun run docs:python` — regenerate API pages from Python source
40
+ - `bun run build` — production build
41
+
42
+ ## Links
43
+
44
+ - Source repo: https://github.com/Abstract-Data/abstract-data-doc-theme
45
+ - Theme on npm: https://www.npmjs.com/package/@abstractdata/starlight-theme
46
+ - Scaffolder on npm: https://www.npmjs.com/package/@abstract-data/create-docs