create-sordo 0.0.0-stage → 0.1.0

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 (62) hide show
  1. package/CHANGELOG.md +114 -0
  2. package/README.md +52 -2
  3. package/bin/create-sordo.ts +11 -0
  4. package/package.json +31 -5
  5. package/src/index.ts +675 -0
  6. package/src/probes.ts +28 -0
  7. package/src/prompts.ts +141 -0
  8. package/src/readme.ts +74 -0
  9. package/src/ui.ts +207 -0
  10. package/src/versions.ts +3 -0
  11. package/templates/_backend/app/routes/api/todos.ts +27 -0
  12. package/templates/_claude/.claude/commands/sordo-init.md +64 -0
  13. package/templates/_claude/.claude/hooks/biome-check.sh +17 -0
  14. package/templates/_claude/.claude/rules/build-time-discovery.md +17 -0
  15. package/templates/_claude/.claude/rules/bun-native.md +28 -0
  16. package/templates/_claude/.claude/rules/filesystem-routing.md +31 -0
  17. package/templates/_claude/.claude/rules/islands.md +46 -0
  18. package/templates/_claude/.claude/rules/optional-ai.md +16 -0
  19. package/templates/_claude/.claude/rules/web-standards-boundary.md +25 -0
  20. package/templates/_claude/.claude/settings.json +22 -0
  21. package/templates/_claude/.claude/skills/sordo/SKILL.md +121 -0
  22. package/templates/_claude/.claude/skills/sordo-cli/SKILL.md +112 -0
  23. package/templates/_claude/CLAUDE.md +28 -0
  24. package/templates/_codex/.codex/README.md +10 -0
  25. package/templates/_codex/.codex/rules/build-time-discovery.md +17 -0
  26. package/templates/_codex/.codex/rules/bun-native.md +28 -0
  27. package/templates/_codex/.codex/rules/filesystem-routing.md +31 -0
  28. package/templates/_codex/.codex/rules/islands.md +46 -0
  29. package/templates/_codex/.codex/rules/optional-ai.md +15 -0
  30. package/templates/_codex/.codex/rules/sordo-cli.md +108 -0
  31. package/templates/_codex/.codex/rules/sordo-patterns.md +122 -0
  32. package/templates/_codex/.codex/rules/web-standards-boundary.md +25 -0
  33. package/templates/_codex/AGENTS.md +27 -0
  34. package/templates/_container/.dockerignore +7 -0
  35. package/templates/_container/Dockerfile +27 -0
  36. package/templates/_monorepo/packages/README.md +18 -0
  37. package/templates/_shared/sordo-patterns.md +122 -0
  38. package/templates/default/README-template.md +181 -0
  39. package/templates/default/app/islands/TodoApp.tsx +83 -0
  40. package/templates/default/app/routes/api/health.ts +8 -0
  41. package/templates/default/app/routes/index.tsx +29 -0
  42. package/templates/default/app/server.ts +28 -0
  43. package/templates/default/gitignore +9 -0
  44. package/templates/default/sordo.config.ts +5 -0
  45. package/templates/default/tsconfig.json +14 -0
  46. package/templates/ui-shadcn/components/button.tsx +63 -0
  47. package/templates/ui-shadcn/components/dialog.tsx +158 -0
  48. package/templates/ui-shadcn/demo/index.tsx +62 -0
  49. package/templates/ui-starter/_internal/cn.ts +6 -0
  50. package/templates/ui-starter/_internal/slot.ts +50 -0
  51. package/templates/ui-starter/_internal/variants.ts +1 -0
  52. package/templates/ui-starter/button.tsx +60 -0
  53. package/templates/ui-starter/card.tsx +92 -0
  54. package/templates/ui-starter/demo/TodoApp.tsx +86 -0
  55. package/templates/ui-starter/demo/index.tsx +45 -0
  56. package/templates/ui-starter/input.tsx +20 -0
  57. package/templates/ui-starter/label.tsx +18 -0
  58. package/templates/ui-starter/themes/neutral/tokens.css +46 -0
  59. package/templates/ui-starter/themes/slate/tokens.css +46 -0
  60. package/templates/ui-starter/themes/stone/tokens.css +46 -0
  61. package/templates/ui-starter/themes/zinc/tokens.css +46 -0
  62. package/templates/ui-starter/tokens.css +46 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,114 @@
1
+ # create-sordo
2
+
3
+ ## 0.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 37f5e14: Add `--ui shadcn`: upstream shadcn/ui components on a whole-tree hydrated demo page. Scaffolded apps now pin `sordo` to the release create-sordo shipped with (`^<version>`) and `bun-types` to `^1.3.0` instead of `latest`.
8
+ - c5c1020: Remove the `patties-ui` package and its built-in 60-component catalog. `sordo add` now takes upstream shadcn/ui (`@shadcn/<name>`), local paths, URLs, and `ui.registries`; `sordo add <name>` for a non-catalog name points at `@shadcn/<name>`. The registry schema, `_internal` helpers, tokens, and theme presets now ship inside `sordo`, so `bun add -D patties-ui` is no longer needed. Scaffolded apps no longer depend on `patties-ui`.
9
+
10
+ ## 0.0.13
11
+
12
+ ### Patch Changes
13
+
14
+ - c606a1f: Fix scaffold UX gaps surfaced by dogfooding the UI + `/sordo-init` flow:
15
+
16
+ - **Wire Tailwind for UI projects.** A `--ui` scaffold previously rendered
17
+ unstyled — `app/styles/app.css` was written but never compiled or linked. Now
18
+ the scaffolder ships a `css` script (`@tailwindcss/cli`, run by `dev`/`build`),
19
+ a `app/routes/api/styles.ts` route that serves the compiled sheet, and a shared
20
+ `app/components/_head.tsx` each page re-exports so styles load in dev and the
21
+ compiled binary alike. The generated CSS is gitignored.
22
+ - **Typecheck cleanly out of the box.** A fresh app failed `tsc --noEmit`: the
23
+ `tsconfig` lacked `allowImportingTsExtensions`/`noEmit` (every `.ts`/`.tsx`
24
+ extension import errored TS5097), and templates used the global `JSX.Element`
25
+ namespace that React 19 removed (TS2503). Both fixed, plus a `typecheck` script
26
+ and a `css` module type for the stylesheet import.
27
+ - **`/sordo-init` starts clean.** The command now removes the placeholder
28
+ TodoApp demo before scaffolding the first real feature, and carries the stable
29
+ framework constraints (pages get only `ctx.params`; `.ts` routes live under
30
+ `api/`; middleware gates pages; styling is opt-in per page) so the agent
31
+ doesn't re-derive them from source. The `/sordo` recipes encode the same.
32
+ - **Ignore build output.** `sordo-gen` (written at build time) is now in the
33
+ default gitignore.
34
+
35
+ ## 0.0.12
36
+
37
+ ### Patch Changes
38
+
39
+ - a99d1bf: Redesign the scaffolder prompt flow (cli specs 18 + 19): coding agent moves
40
+ earlier; a new **project type** (frontend / backend / fullstack) drives gated
41
+ sub-prompts for **Patties UI** and **monorepo** and the deploy-target option
42
+ set. Adds `--type`, `--ui`/`--no-ui`, `--monorepo`/`--no-monorepo`, `--theme`,
43
+ and a `container` target (emits a `Dockerfile`). When Patties UI is chosen, a
44
+ vendored starter set (button/card/input/label + tokens) is stamped so the demo
45
+ renders with real components. Claude / Codex projects now ship the `/sordo`
46
+ skill + `/sordo-init` command (Codex: a `sordo-patterns` rule), generated
47
+ from one source so they can't drift, and the next-steps output hands off to
48
+ `claude --permission-mode plan "/sordo-init"`. Stays zero-dependency.
49
+
50
+ ## 0.0.12-next.0
51
+
52
+ ### Patch Changes
53
+
54
+ - a99d1bf: Redesign the scaffolder prompt flow (cli specs 18 + 19): coding agent moves
55
+ earlier; a new **project type** (frontend / backend / fullstack) drives gated
56
+ sub-prompts for **Patties UI** and **monorepo** and the deploy-target option
57
+ set. Adds `--type`, `--ui`/`--no-ui`, `--monorepo`/`--no-monorepo`, `--theme`,
58
+ and a `container` target (emits a `Dockerfile`). When Patties UI is chosen, a
59
+ vendored starter set (button/card/input/label + tokens) is stamped so the demo
60
+ renders with real components. Claude / Codex projects now ship the `/sordo`
61
+ skill + `/sordo-init` command (Codex: a `sordo-patterns` rule), generated
62
+ from one source so they can't drift, and the next-steps output hands off to
63
+ `claude --permission-mode plan "/sordo-init"`. Stays zero-dependency.
64
+
65
+ ## 0.0.8
66
+
67
+ ### Patch Changes
68
+
69
+ - 3b3f80d: Scaffolder DX overhaul (specs 09 + 10).
70
+
71
+ - **Tool probes** — fail fast with a clear message when `bun` is missing
72
+ from PATH; skip-and-warn when `git` is missing instead of silently
73
+ swallowing failures.
74
+ - **Interactive prompts** — when stdin is a TTY and flags were not passed,
75
+ prompt for project name, target, deploy, and agent. Add `--yes` / `-y`
76
+ to accept all defaults non-interactively.
77
+ - **`--agent` alias** — the spec-05 `--agent claude-code` form is kept as
78
+ a backwards-compatible alias for `--template claude`.
79
+ - **Expanded agent overlays** — `_claude` now ships
80
+ `.claude/settings.json` (with `bun`/`bunx`/`sordo` permissions and a
81
+ Biome PostToolUse hook), `.claude/hooks/biome-check.sh` (no-ops when
82
+ Biome is not installed), and empty `.claude/agents/` /
83
+ `.claude/commands/` directories with README pointers. `_codex` now
84
+ ships a `.codex/README.md`.
85
+ - **Templated README** — `templates/default/README-template.md` is now a
86
+ real onboarding doc with `{{name}}` / `{{agent}}` / `{{target}}` /
87
+ `{{deploy}}` placeholders and HTML-comment conditional blocks. A
88
+ generic templating pass also interpolates `{{name}}` into CLAUDE.md
89
+ and AGENTS.md.
90
+
91
+ - **Todo demo template** — the default scaffold now ships a `TodoApp.tsx`
92
+ island and a route that mounts it. The README explains that buttons
93
+ don't react under `bun dev` today (dev hydration lands with framework
94
+ spec 18) and tells the user to `bun run build && bun start` to see the
95
+ island work; it also includes a "Remove the demo" section for when the
96
+ user is ready to start their real app.
97
+ - **`--blank` flag** — `bunx create-sordo@latest <name> --blank`
98
+ (alias: `--empty`) scaffolds a hello-world page with no demo and no
99
+ `app/islands/` directory.
100
+ - **Demo prompt** — interactive flow asks "Include the interactive
101
+ todo demo? [Y/n]" right after the agent question.
102
+ - **Git is now opt-in** — `git init` no longer runs by default. Pass
103
+ `--git` to opt in. The success output reminds the user how to
104
+ initialise a repo when they're ready. `--no-git` is kept as a no-op
105
+ for back-compat.
106
+ - **`_claude` overlay restructured.** The empty `.claude/agents/` and
107
+ `.claude/commands/` placeholders are gone. Replaced with:
108
+ - `.claude/skills/sordo-cli/SKILL.md` — a real skill teaching
109
+ Claude how to use the project CLI (`sordo dev/build/start/deploy/secret`).
110
+ - `.claude/rules/` — scaffolded meta-framework knowledge:
111
+ `bun-native.md`, `web-standards-boundary.md`,
112
+ `filesystem-routing.md`, `islands.md`, `build-time-discovery.md`,
113
+ `optional-ai.md`. Mirrors the framework's own rules but tuned
114
+ for users of the framework.
package/README.md CHANGED
@@ -1,3 +1,53 @@
1
- # Temporary Holding Version
1
+ # create-sordo
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The official scaffolder for [Sordo](https://github.com/bihaviour/sordo) —
4
+ a Bun-native full-stack meta-framework with React 19 rendering.
5
+
6
+ ```sh
7
+ bunx create-sordo@latest my-app
8
+ ```
9
+
10
+ Runs an interactive prompt (project name, agent overlay, demo template,
11
+ runtime target, deploy target), then scaffolds, installs, and gets you
12
+ to `bunx sordo dev` in one shot.
13
+
14
+ ## Options
15
+
16
+ ```sh
17
+ bunx create-sordo@latest my-app \
18
+ --template claude|codex|none \
19
+ --target bun|edge \
20
+ --deploy cloudflare|vercel|deno|netlify|bun|none \
21
+ --blank \
22
+ --git \
23
+ --no-install \
24
+ --yes
25
+ ```
26
+
27
+ | Flag | Default | What it does |
28
+ |---|---|---|
29
+ | `--template` | `claude` | Agent-platform overlay (`claude`, `codex`, or `none`). |
30
+ | `--target` | `bun` | Runtime target written into `sordo.config.ts`. |
31
+ | `--deploy` | `none` | Records the intended deploy target. |
32
+ | `--blank` / `--empty` | off | Skip the interactive todo demo; ship a hello-world page. |
33
+ | `--git` | off | Run `git init` + initial commit (opt-in). |
34
+ | `--no-install` | off | Skip `bun install`. |
35
+ | `--yes` / `-y` | off | Accept all defaults; skip prompts. |
36
+
37
+ `--agent claude-code` is retained as a back-compat alias for
38
+ `--template claude`.
39
+
40
+ ## What you get
41
+
42
+ A minimal Sordo app with filesystem routing under `app/routes/`,
43
+ optional client islands under `app/islands/`, and either the `_claude`
44
+ or `_codex` agent overlay scaffolding conventions for your chosen
45
+ coding agent.
46
+
47
+ See [the Sordo docs](https://bun-patties.com) for the full framework
48
+ guide.
49
+
50
+ ## Requires
51
+
52
+ Bun 1.3+. `bunx create-sordo@latest` won't work under Node — install
53
+ Bun first from [bun.sh](https://bun.sh).
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env bun
2
+ export {};
3
+
4
+ if (typeof Bun === "undefined") {
5
+ console.error("create-sordo requires Bun. Install Bun first: https://bun.sh");
6
+ process.exit(1);
7
+ }
8
+
9
+ const { run } = await import("../src/index.ts");
10
+ const code = await run(process.argv.slice(2));
11
+ process.exit(code);
package/package.json CHANGED
@@ -1,6 +1,32 @@
1
1
  {
2
- "name": "create-sordo",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
2
+ "name": "create-sordo",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "description": "Scaffolder for new Sordo projects.",
6
+ "license": "MIT",
7
+ "bin": {
8
+ "create-sordo": "bin/create-sordo.ts"
9
+ },
10
+ "exports": {
11
+ ".": "./src/index.ts"
12
+ },
13
+ "files": [
14
+ "bin",
15
+ "src",
16
+ "templates",
17
+ "README.md",
18
+ "CHANGELOG.md"
19
+ ],
20
+ "scripts": {
21
+ "test": "bun test",
22
+ "typecheck": "tsc --noEmit",
23
+ "lint": "biome check .",
24
+ "generate:sordo-skill": "bun run scripts/gen-sordo-skill.ts",
25
+ "check:sordo-skill": "bun run scripts/gen-sordo-skill.ts --check",
26
+ "sync:versions": "bun run scripts/sync-versions.ts",
27
+ "check:versions": "bun run scripts/sync-versions.ts --check"
28
+ },
29
+ "engines": {
30
+ "bun": ">=1.3.0"
31
+ }
32
+ }