Skip to content

Commit ad5ee07

Browse files
author
KHAL-DX
committed
docs: clarify git-native pack policy
1 parent 73ea799 commit ad5ee07

15 files changed

Lines changed: 564 additions & 410 deletions

README.md

Lines changed: 18 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,33 @@
1-
# Mintlify Starter Kit
1+
# KHAL OS public docs
22

3-
Use the starter kit to get your docs deployed and ready to customize.
3+
This repository contains the public Mintlify documentation site for KHAL OS. It is the public-facing docs surface for product concepts, app/pack authoring, SDK usage, and release/customer handoff guidance.
44

5-
Click the green **Use this template** button at the top of this repo to copy the Mintlify starter kit. The starter kit contains examples with
5+
## Local development
66

7-
- Guide pages
8-
- Navigation
9-
- Customizations
10-
- API reference pages
11-
- Use of popular components
12-
13-
**[Follow the full quickstart guide](https://starter.mintlify.com/quickstart)**
14-
15-
## AI-assisted writing
16-
17-
Set up your AI coding tool to work with Mintlify:
7+
Run commands from the repository root, where `docs.json` lives:
188

199
```bash
20-
npx skills add https://mintlify.com/docs
21-
```
22-
23-
This command installs Mintlify's documentation skill for your configured AI tools like Claude Code, Cursor, Windsurf, and others. The skill includes component reference, writing standards, and workflow guidance.
24-
25-
See the [AI tools guides](/ai-tools) for tool-specific setup.
26-
27-
## Development
28-
29-
Install the [Mintlify CLI](https://www.npmjs.com/package/mint) to preview your documentation changes locally. To install, use the following command:
30-
31-
```
32-
npm i -g mint
10+
npx --yes mint@latest dev
11+
npx --yes mint@latest broken-links
3312
```
3413

35-
Run the following command at the root of your documentation, where your `docs.json` is located:
14+
If you prefer a global CLI, install Mintlify with `npm i -g mint` and run `mint dev` or `mint broken-links`.
3615

37-
```
38-
mint dev
39-
```
16+
## Public/private boundary
4017

41-
View your local preview at `http://localhost:3000`.
18+
These docs are public. Do not add secrets, tokens, credentials, customer identifiers, private hostnames, internal IPs, live monitoring URLs, admin usernames, migration/cutover notes, or operator-only runbook commands. Keep production operations and private topology in internal Hermes/KHAL runbooks unless Felipe explicitly approves publication.
4219

43-
## Publishing changes
20+
## Pack distribution policy
4421

45-
Install our GitHub app from your [dashboard](https://dashboard.mintlify.com/settings/organization/github-app) to propagate changes from your repo to your deployment. Changes are deployed to production automatically after pushing to the default branch.
22+
Pack/app repos are git-native: Marketplace/App Store installation reads the git repo and `khal-app.json`, then builds/loads the app from that source. Do not document `pack-*` repos as npm or GitHub Packages artifacts.
4623

47-
## Need help?
24+
The npm packages that belong in public docs are the app-kit/framework packages only:
4825

49-
### Troubleshooting
26+
- `@khal-os/sdk`
27+
- `@khal-os/ui`
28+
- `@khal-os/types`
29+
- `@khal-os/dev-cli`
5030

51-
- If your dev environment isn't running: Run `mint update` to ensure you have the most recent version of the CLI.
52-
- If a page loads as a 404: Make sure you are running in a folder with a valid `docs.json`.
31+
## Review requirement
5332

54-
### Resources
55-
- [Mintlify documentation](https://mintlify.com/docs)
33+
Open a PR for documentation changes and request review before publishing or merging to the default branch. Public docs changes need product/schema review for technical truth and public/private boundary review for safety.

dev/local-dev-and-testing.mdx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ bun run watch
2323
```
2424
</CodeGroup>
2525

26-
The build produces CJS + ESM + `.d.ts` outputs into `package/dist/`. The publish pipeline only ships what's under `package/`.
26+
The build produces frontend bundle outputs into `package/dist/` when the current build pipeline is available. Pack/app repos are installed from git; do not describe `package/` as an npm publish artifact.
2727

2828
## Typecheck and lint
2929

@@ -85,17 +85,19 @@ For full-stack packs, a lightweight integration test talks to your service over
8585
</Step>
8686
</Steps>
8787

88-
## The `khal-dev` QA CLI
88+
## The `khal` developer CLI
8989

90-
The `@khal-os/dev-cli` package ships `khal-dev` — a pack-focused QA toolkit. Subcommands live under `app-kit/packages/dev-cli/src/commands/`.
90+
The `@khal-os/app-kit` package ships the `khal` binary. Developer-loop commands live under `khal dev`; run `khal dev --help` on your installed copy for the current list.
9191

9292
Key commands:
9393

9494
- `khal new app <name>` — scaffold a new pack from the bundled `app` template (also `khal new service <name>` and `khal new workflow <name>`).
95-
- `khal-dev qa <sub>` — the QA family. Inspect `app-kit/packages/dev-cli/src/commands/qa/` for the current list of sub-checks; `khal-dev qa --help` on your installed copy is authoritative.
95+
- `khal dev design-system --no-browser` — serve the bundled feature catalog without launching a browser, useful for CI/tests.
96+
- `khal dev manifest` — validate and inspect a `khal-app.json` manifest.
97+
- `khal dev qa <sub>` — the QA family. `khal dev qa --help` on your installed copy is authoritative for the current subcommands.
9698

9799
<Note>
98-
The exact QA subcommand list evolves with the toolchain. Run `khal-dev qa --help` for the live list rather than memorizing it.
100+
The exact QA subcommand list evolves with the toolchain. Run `khal dev qa --help` for the live list rather than memorizing it.
99101
</Note>
100102

101103
## Debug tips
@@ -116,14 +118,14 @@ The exact QA subcommand list evolves with the toolchain. Run `khal-dev qa --help
116118
</CardGroup>
117119

118120
<Frame>
119-
<img alt="khal-dev qa output during a local test run" src="/images/khal-dev-qa.png" />
121+
<img alt="khal dev qa output during a local test run" src="/images/khal-dev-qa.png" />
120122
</Frame>
121123

122124
## What's next
123125

124126
<CardGroup cols={2}>
125127
<Card title="Publish your pack" icon="upload" href="/release/publish-your-pack">
126-
Push → CI builds → publish.
128+
Push → CI builds → git-native release/install.
127129
</Card>
128130
<Card title="khal-app.json reference" icon="file-lines" href="/reference/khal-app-json-schema">
129131
The full manifest schema.

docs.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@
7474
"group": "Patterns",
7575
"pages": [
7676
"patterns/frontend-only-pack",
77-
"patterns/full-stack-pack"
77+
"patterns/full-stack-pack",
78+
"patterns/design-system-reference-app"
7879
]
7980
}
8081
]
Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,78 @@
11
---
22
title: "Install dependencies"
3-
description: "Which package manager to use where — pnpm for the SDK workspace, bun for pack-* repos — and the commands that get everything compiling."
3+
description: "Which package manager to use where — pnpm for app-kit and current khal-new app repos, bun only where an older repo already commits Bun metadata."
44
---
55

6-
KhalOS uses two package managers on purpose. The **SDK workspace** (the `@khal-os/*` packages you'll import into your pack) is a `pnpm` monorepo. Each **`pack-*` repo** (including `pack-template`) is a `bun` workspace. Knowing which tool runs where is the only setup detail that trips up first-time contributors.
6+
KhalOS uses package managers by repo contract. The **app-kit workspace** publishes the framework packages and the `khal` CLI. Current apps scaffolded with `khal new` use the package manager emitted in their next-steps output; older pack repos may still be Bun workspaces. When in doubt, follow the lockfile and scripts committed in the repo you are editing.
77

88
## TL;DR
99

1010
<CardGroup cols={2}>
1111
<Card title="pnpm" icon="box">
12-
For the `@khal-os/*` SDK workspace. `pnpm install`, `pnpm build`, `pnpm typecheck`, `pnpm lint`.
12+
For the app-kit framework workspace. `pnpm install`, `pnpm build`, `pnpm typecheck`, `pnpm lint`.
1313
</Card>
14-
<Card title="bun" icon="bolt">
15-
For every `pack-*` repo (the scaffold you clone from `pack-template`). `bun install`, `bun run build`, `bun run typecheck`.
14+
<Card title="pnpm in new app repos" icon="box-open">
15+
Current `khal new app` output says `pnpm install`, then `khal start`. Build with the repo's scripts, for example `pnpm build` when the scaffold exposes `"build": "khal build"`.
16+
</Card>
17+
<Card title="bun in older pack repos" icon="bolt">
18+
Use Bun only where the repo already commits Bun metadata and scripts. Typical older commands are `bun install`, `bun run build`, `bun run typecheck`.
1619
</Card>
1720
</CardGroup>
1821

1922
## Node version
2023

21-
Install **Node 20 or newer**. The `@khal-os/*` packages target modern Node and `bun` itself installs cleanly on 20.x. If you use `nvm`, run `nvm use` inside any repo that ships an `.nvmrc`.
24+
Install **Node 20 or newer**. The app-kit packages target modern Node, and both `pnpm` and `bun` install cleanly on 20.x. If you use `nvm`, run `nvm use` inside any repo that ships an `.nvmrc`.
2225

2326
```bash
2427
node --version # v20.x or newer
2528
pnpm --version # any recent release
26-
bun --version # 1.x
29+
bun --version # 1.x, only needed for repos that already use Bun
2730
```
2831

29-
## The SDK workspace — `pnpm`
32+
## The app-kit workspace — `pnpm`
3033

31-
The SDK workspace ships the four framework packages your pack will depend on: `@khal-os/sdk`, `@khal-os/ui`, `@khal-os/types`, and `@khal-os/dev-cli`. It uses `pnpm` and Turbo under the hood.
34+
The app-kit workspace ships the framework packages your pack will depend on (`@khal-os/sdk`, `@khal-os/ui`, `@khal-os/types`) plus the `@khal-os/app-kit` package that exposes the `khal` CLI. It uses `pnpm` and Turbo under the hood.
3235

3336
<CodeGroup>
34-
3537
```bash pnpm
3638
pnpm install # install workspace deps
3739
pnpm build # turbo run build — build every package
3840
pnpm typecheck # turbo run typecheck across the workspace
3941
pnpm lint # biome check
4042
pnpm lint:fix # biome check --write .
4143
```
42-
4344
</CodeGroup>
4445

45-
You usually don't need to run these yourself: the packages publish from CI to GitHub Packages, and your pack consumes them as ordinary npm dependencies. Install them here only if you're debugging an SDK issue or running a local snapshot of the SDK against your pack.
46+
Those framework packages may be consumed as npm dependencies by pack/app repos. That does not make `pack-*` repos npm packages; pack identity and install content remain git-native.
4647

47-
## Pack repos — `bun`
48+
## Pack/app repos — follow the scaffold
4849

49-
Every `pack-*` repo — including the scaffold you clone from `pack-template` — uses `bun` as both its package manager and its runtime. `bun install` is fast, workspaces are first-class, and the included bundler already matches the toolchain the template expects.
50+
Current `khal new app <name>` output tells you to run `pnpm install` and then `khal start`. The generated root `package.json` exposes `"dev": "khal dev"` and `"build": "khal build"`, so use the package manager that installs the root workspace and then run the scripts it provides.
5051

5152
<CodeGroup>
52-
53-
```bash bun
54-
bun install # install pack deps
55-
bun run build # build the frontend package
56-
bun run typecheck # type-check all workspaces
57-
bun run lint # biome lint
58-
bun run test # run tests (if present)
53+
```bash Current khal new app
54+
pnpm install # install app deps, as emitted by current scaffold next steps
55+
pnpm build # runs khal build through the generated package.json script
56+
khal start # start the local KhalOS dev loop
5957
```
6058

59+
```bash Older Bun pack repo
60+
bun install # install deps when the repo already uses Bun
61+
bun run build # build using that repo's existing script
62+
bun run typecheck # type-check if the repo defines the script
63+
```
6164
</CodeGroup>
6265

6366
<Callout type="warning">
64-
Don't cross the streams. Running `pnpm install` inside a `pack-*` repo, or `bun install` inside the SDK workspace, will produce a lockfile the other tool ignores — and the next person on the repo will have to untangle it. When in doubt, check which lockfile is already committed.
67+
Don't cross the streams. Running `bun install` in a pnpm scaffold, or `pnpm install` in an older Bun-only pack repo, can produce a lockfile the repo does not use. When in doubt, check which lockfile and scripts are already committed.
6568
</Callout>
6669

6770
## Verifying your setup
6871

6972
After you've cloned the workspace, pick one of each and confirm both install cleanly:
7073

7174
<Steps>
72-
<Step title="SDK workspace">
75+
<Step title="App-kit workspace">
7376
```bash
7477
cd repos/app-kit
7578
pnpm install && pnpm build
@@ -78,18 +81,19 @@ After you've cloned the workspace, pick one of each and confirm both install cle
7881
`pnpm build` should finish with every package green in the Turbo summary.
7982
</Step>
8083

81-
<Step title="A reference pack">
84+
<Step title="A scaffolded pack/app">
8285
```bash
83-
cd repos/pack-template
84-
bun install && bun run build
86+
khal new app hello-fde
87+
cd hello-fde
88+
pnpm install && pnpm build
8589
```
8690

87-
`bun run build` should emit CJS + ESM + `.d.ts` outputs into `package/dist/`.
91+
`pnpm build` should run the scaffold's `khal build` script and emit bundle outputs into `package/dist/` when the current build pipeline is available.
8892
</Step>
8993
</Steps>
9094

9195
<Frame>
92-
![Split terminal showing pnpm install in app-kit on the left and bun install in pack-template on the right, both finishing green.](/images/getting-started/pnpm-bun-split.png)
96+
![Split terminal showing pnpm install in app-kit on the left and pnpm install in a khal new app repo on the right, both finishing green.](/images/getting-started/pnpm-bun-split.png)
9397
</Frame>
9498

9599
## Next steps
@@ -99,6 +103,6 @@ After you've cloned the workspace, pick one of each and confirm both install cle
99103
Scaffold a new pack with `khal new app <name>` and get a "Hello FDE" component shipping.
100104
</Card>
101105
<Card title="Pack anatomy" href="/packs/anatomy-of-a-pack">
102-
A directory-level tour of everything inside a pack — manifest, frontend package, backend service, Helm chart, CI.
106+
A directory-level tour of everything inside a pack — manifest, frontend source, backend service, Helm chart, CI.
103107
</Card>
104108
</CardGroup>

getting-started/your-first-pack.mdx

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,51 @@ description: "Scaffold a pack with `khal new`, edit a React component, and see i
66
A pack is a self-contained KhalOS app: a frontend React package plus an optional backend service, a manifest that declares both, and a Helm chart for shipping. In this walkthrough you'll go from an empty directory to a running "Hello FDE" pack in under ten minutes.
77

88
<Callout type="info">
9-
This page is the fast path. For the full pack contract — every manifest field, every CI workflow, every deploy mode — follow the **Next steps** links at the bottom.
9+
This page is the fast path. For the full pack contract — every manifest field, every install mode, every design-system expectation — follow the **Next steps** links at the bottom.
10+
</Callout>
11+
12+
<Callout type="warning">
13+
Packs are installed from git. Do not add `.npmrc`, `publishConfig`, npm publish scripts/workflows, or `frontend.package` to a new pack manifest.
1014
</Callout>
1115

1216
## 1. Scaffold with `khal new`
1317

1418
`@khal-os/app-kit` ships a `khal new` command that stamps out a complete pack locally. It bundles three templates — `app` (full-stack), `service` (backend-only), and `workflow` (Temporal) — and emits a runnable project with no network calls.
1519

20+
Verify the CLI you are about to use:
21+
22+
```bash
23+
khal --version
24+
khal new --list
25+
```
26+
27+
Expected shape:
28+
29+
```text
30+
1.x.y
31+
Bundled templates:
32+
app v1.x.y
33+
service v1.x.y
34+
workflow v1.x.y
35+
```
36+
37+
Package note: the npm package is `@khal-os/app-kit` and its binary is `khal`. As of 2026-05-18, npm reports `latest` as `1.0.14` and `next` as `1.0.24`; use an installed, verified `khal` binary for scaffolding until the public `latest` tag is promoted to the release you want to document.
38+
1639
```bash
1740
khal new app <name>
1841
cd <name>
1942
```
2043

21-
Replace `<name>` with your pack's identifier — lowercase, hyphen-separated, and short. It becomes the Helm chart name, the manifest `id`, and the package name. `khal new` substitutes the token everywhere it appears in the bundled template.
44+
Replace `<name>` with your pack's identifier — lowercase, hyphen-separated, and short. It becomes the manifest `id`, local build workspace name, and any generated backend/chart names. `khal new` substitutes the token everywhere it appears in the bundled scaffold.
45+
46+
Current scaffold output ends with:
47+
48+
```text
49+
Next steps:
50+
1. cd <name>
51+
2. pnpm install
52+
3. khal start
53+
```
2254

2355
<Callout type="tip">
2456
Run `khal new` with no arguments to see the three available types and their one-line descriptions. Add `--list` to inspect the bundled template versions.
@@ -71,15 +103,14 @@ If your pack is **frontend-only**, delete the `service/` directory and remove th
71103
## 4. Build and typecheck
72104

73105
```bash
74-
bun install
75-
bun run build
76-
bun run typecheck
106+
pnpm install
107+
pnpm build
77108
```
78109

79-
`bun run build` produces CJS + ESM bundles plus TypeScript declarations in `package/dist/`. `bun run typecheck` validates both the frontend package and the service (if present).
110+
Current `khal new app` scaffolds expose a root `"build": "khal build"` script. Run the scripts committed in your generated `package.json`; older pack repos may still expose separate `bun run build` or `bun run typecheck` scripts.
80111

81112
<Frame>
82-
![Terminal showing bun run build output with dist artifacts listed, followed by a green bun run typecheck summary.](/images/getting-started/bun-build-success.png)
113+
![Terminal showing pnpm build output with dist artifacts listed and a green build summary.](/images/getting-started/bun-build-success.png)
83114
</Frame>
84115

85116
## 5. See it in the shell
@@ -115,4 +146,7 @@ You've got two paths to render your pack in a live shell:
115146
<Card title="Full-stack pack pattern" href="/patterns/full-stack-pack">
116147
The end-to-end reference pattern for packs with both a frontend and a backend service.
117148
</Card>
149+
<Card title="Design-system reference app" href="/patterns/design-system-reference-app">
150+
What to copy when you want your pack to look, install, and QA like a first-class KhalOS app.
151+
</Card>
118152
</CardGroup>

0 commit comments

Comments
 (0)