@craft-ts/mcp 0.7.0-beta.17 → 0.7.0-beta.19

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.
@@ -8,12 +8,46 @@ Public docs: https://craft-ts.github.io/craft
8
8
  LLM index: https://craft-ts.github.io/craft/llms.txt
9
9
  Full dump: https://craft-ts.github.io/craft/llms-full.txt
10
10
 
11
- For a new framework-independent app, start with `npx craft create <directory>`.
12
- The prompt asks for EffectTS v4 first, then the agent integrations to install
13
- (`codex`, `cursor`, `cloud-code`; `claude-code` is also supported). The starter
14
- already contains a routed page, a `CraftHttpClient` API query, ESLint, unit and
15
- Playwright tests, and the `architecture/` contract. Use `--effect=v4` or
16
- `--effect=none` for non-interactive setup.
11
+ For a new framework-independent app, start by asking the user only:
12
+
13
+ > What kind of application are you building, and what are its main features?
14
+ > Keep the answer high-level for now; we will refine the details afterwards.
15
+
16
+ Do not begin by asking whether to use EffectTS. From the application type and
17
+ the main features, infer whether a backend is needed. If it is, propose the
18
+ stack explicitly and ask for confirmation:
19
+
20
+ > I suggest CraftTS for the frontend and EffectTS v4 for the backend. EffectTS
21
+ > fits this project particularly well because its typed services, Layers and
22
+ > errors align with CraftTS's dependency graph and typed server boundary. Is
23
+ > that stack OK?
24
+
25
+ When the user confirms the proposal, use EffectTS for the backend by default.
26
+ If the user rejects it or names another backend, do not silently scaffold an
27
+ EffectTS backend; honour the requested choice, or leave the backend out when
28
+ no alternative is specified.
29
+
30
+ Once the stack is confirmed, create an empty, domain-ready starter with the
31
+ quality surfaces enabled from the beginning:
32
+
33
+ ```bash
34
+ npx --yes --package @craft-ts/dev-tools@beta craft create <directory> \
35
+ --yes --no-demos --domain app \
36
+ --frontend-runtime=plain --backend-runtime=effect \
37
+ --i18n=strict --design-system=basic --typed-css \
38
+ --references=all --agents=codex
39
+ ```
40
+
41
+ Replace `--backend-runtime=effect` with the user's explicit backend choice,
42
+ or `--backend-runtime=none` when they decline a backend. When no Effect
43
+ runtime is selected, use `--references=craft-ts` instead of `--references=all`.
44
+ Keep
45
+ `--no-demos`, `--i18n=strict`, `--design-system=basic` and `--typed-css` by
46
+ default for agent-created projects. The starter contains the CraftTS
47
+ architecture and tooling contract, but no prefilled product pages or demo
48
+ content. CraftTS source references are always enabled, and EffectTS references
49
+ are included whenever either runtime uses EffectTS; there is no final reference
50
+ confirmation question.
17
51
 
18
52
  When MCP tools are available, call `get_best_practices` once, then `search_documentation` / `get_skill` instead of inventing APIs.
19
53
 
@@ -45,7 +79,7 @@ Decision page: `/guide/concepts/choose-primitive`.
45
79
  state.
46
80
  3. **Do not use `async` / `await` / `for await`.** Generators, `craftSleep`, and `CraftHttpClient` replace them.
47
81
  4. **HTTP:** `query` for reads, `mutation` for writes, both backed by `CraftHttpClient`. No raw `fetch` / `HttpClient`.
48
- 5. **Forms** derive from `state` + `insertForm`. Validators are `cRequired`, `cEmail`, `cMinLength`, … Submit through `insertFormSubmit` + a `mutation`. Failures are `craftException` values.
82
+ 5. **Forms** derive from `state` + `insertForm`. Validators are `cRequired`, `cEmail`, `cMinLength`, … Submit through `insertFormSubmit` + a `mutation`. Failures are `craftException` values. Search terms `form`, `formulaire`, `validation`, `submit`, `field`, and `FormData` map to these APIs; native `FormData` is an interoperability boundary, not the form state model.
49
83
  6. **Services:** `craftService({ name, scope }, function* () { ... })`. Consume
50
84
  the generated `X()` helper, typically `yield* X(...)`.
51
85
  7. **Routes:** `craftRoutes(name, [...])`, every component route has `componentDeps: {} as import('./x').GenDeps_X`, and **every file** has its own `ValidateCascadeRoutesFile` / `CanRun` check. Parent checks do not cover `loadChildren`. On `TS2589`, split with `loadChildren` — never delete the check.