@growthub/cli 0.3.59 → 0.4.1
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.
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/.env.example +10 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/QUICKSTART.md +44 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/brands/NEW-CLIENT.md +10 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/brands/_template/brand-kit.md +27 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/brands/growthub/brand-kit.md +25 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/bundles/growthub-custom-workspace-starter-v1.json +47 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/docs/fork-sync-integration.md +32 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/docs/starter-kit-overview.md +26 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/docs/vite-ui-shell-guide.md +24 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/examples/workspace-sample.md +10 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/growthub-meta/README.md +3 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/growthub-meta/kit-standard.md +10 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/kit.json +101 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/output/README.md +3 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/output-standards.md +11 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/runtime-assumptions.md +8 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/setup/check-deps.sh +20 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/setup/verify-env.mjs +20 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/skills.md +14 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/studio/index.html +12 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/studio/package.json +20 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/studio/serve.mjs +42 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/studio/src/App.jsx +32 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/studio/src/app.css +20 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/studio/src/main.jsx +10 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/studio/vite.config.js +8 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/templates/agent-contract.md +9 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/templates/deployment-plan.md +22 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/templates/workspace-brief.md +11 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/validation-checklist.md +13 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/workers/custom-workspace-operator/CLAUDE.md +32 -0
- package/assets/worker-kits/growthub-zernio-social-v1/.env.example +5 -0
- package/assets/worker-kits/growthub-zernio-social-v1/QUICKSTART.md +36 -4
- package/assets/worker-kits/growthub-zernio-social-v1/bundles/growthub-zernio-social-v1.json +30 -1
- package/assets/worker-kits/growthub-zernio-social-v1/docs/growthub-agentic-social-platform-ui-shell.md +134 -0
- package/assets/worker-kits/growthub-zernio-social-v1/docs/local-adapters.md +2 -2
- package/assets/worker-kits/growthub-zernio-social-v1/growthub-meta/README.md +5 -8
- package/assets/worker-kits/growthub-zernio-social-v1/growthub-meta/kit-standard.md +1 -1
- package/assets/worker-kits/growthub-zernio-social-v1/kit.json +33 -1
- package/assets/worker-kits/growthub-zernio-social-v1/skills.md +1 -1
- package/assets/worker-kits/growthub-zernio-social-v1/studio/.env.example +3 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/dist/assets/index-DTmBMuXr.js +78 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/dist/assets/index-gHr-nTMF.css +1 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/dist/index.html +14 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/index.html +13 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/package-lock.json +1677 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/package.json +20 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/serve.mjs +60 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/App.jsx +130 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/api.js +146 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/app.css +558 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/lib/rules.js +64 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/lib/templates.js +207 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/main.jsx +10 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/views/Accounts.jsx +57 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/views/Agent.jsx +167 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/views/Analytics.jsx +164 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/views/ApiKeys.jsx +143 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/views/Automations.jsx +122 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/views/CommentRules.jsx +592 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/views/Compose.jsx +185 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/views/Dashboard.jsx +87 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/views/Inbox.jsx +144 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/views/Queues.jsx +167 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/views/Scheduled.jsx +85 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/views/Sequences.jsx +160 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/src/views/Templates.jsx +275 -0
- package/assets/worker-kits/growthub-zernio-social-v1/studio/vite.config.js +7 -0
- package/assets/worker-kits/growthub-zernio-social-v1/workers/zernio-social-operator/CLAUDE.md +3 -3
- package/dist/index.js +1183 -592
- package/package.json +1 -1
- package/assets/worker-kits/growthub-zernio-social-v1/docs/postiz-ui-shell-integration.md +0 -166
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Growthub Custom Workspace Starter Kit — environment template
|
|
2
|
+
#
|
|
3
|
+
# The starter ships with zero required env vars. Copy this file to `.env`
|
|
4
|
+
# (which is unconditionally preserved by the Self-Healing Fork Sync Agent
|
|
5
|
+
# via USER_PROTECTED_PATTERNS) and add whatever your workspace needs.
|
|
6
|
+
#
|
|
7
|
+
# Optional overrides honoured by the CLI (not the starter):
|
|
8
|
+
# GROWTHUB_KIT_FORKS_HOME=~/.growthub/kit-forks
|
|
9
|
+
# GROWTHUB_GITHUB_HOME=~/.growthub/github
|
|
10
|
+
# GROWTHUB_GITHUB_CLIENT_ID=<your-oauth-app-client-id>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Growthub Custom Workspace Starter Kit — Quickstart
|
|
2
|
+
|
|
3
|
+
This kit is the canonical v1 starter primitive. Run `growthub starter init --name <workspace> --out <path>` and the CLI will:
|
|
4
|
+
|
|
5
|
+
1. Materialize this bundled asset tree at `<path>`.
|
|
6
|
+
2. Auto-register the directory as a kit-fork with a dedicated `forkId`, writing `<path>/.growthub-fork/fork.json` (canonical self-describing state).
|
|
7
|
+
3. Optionally create a GitHub remote with `growthub kit fork create --upstream <owner/repo>` flow.
|
|
8
|
+
4. Seed a conservative `policy.json` (`autoApprove=additive`, `remoteSyncMode=off` by default).
|
|
9
|
+
5. Append a `registered` + `remote_connected` trace event.
|
|
10
|
+
|
|
11
|
+
After that, every customization you make stays yours — the Self-Healing Fork Sync Agent will propose upstream additions non-destructively, honouring your policy.
|
|
12
|
+
|
|
13
|
+
## Run the bundled Vite UI shell
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
cd studio
|
|
17
|
+
npm install
|
|
18
|
+
npm run dev # local dev server
|
|
19
|
+
npm run build # produces studio/dist
|
|
20
|
+
node serve.mjs # serves the built shell
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Build out the agent contract
|
|
24
|
+
|
|
25
|
+
Edit `workers/custom-workspace-operator/CLAUDE.md`. This is the living contract between the CLI agent and your workspace. Add tools, skills, and output rules here.
|
|
26
|
+
|
|
27
|
+
## Healing from upstream
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
growthub kit fork status <fork-id>
|
|
31
|
+
growthub kit fork heal <fork-id> --dry-run
|
|
32
|
+
growthub kit fork heal <fork-id>
|
|
33
|
+
growthub kit fork trace --fork-id <fork-id> --tail 50
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Policy primer
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
growthub kit fork policy --fork-id <fork-id> --set \
|
|
40
|
+
autoApprove=additive \
|
|
41
|
+
untouchablePaths+=studio/src/views/MyFeature.jsx \
|
|
42
|
+
confirmBeforeChange+=workers/custom-workspace-operator/CLAUDE.md \
|
|
43
|
+
remoteSyncMode=pr
|
|
44
|
+
```
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# New Client — Onboarding
|
|
2
|
+
|
|
3
|
+
When the operator starts a new project:
|
|
4
|
+
|
|
5
|
+
1. Create `brands/<client-slug>/brand-kit.md` from the `_template` scaffold.
|
|
6
|
+
2. Fill in the Identity, Voice, Visual, Assets sections.
|
|
7
|
+
3. Append a `registered` event to `.growthub-fork/trace.jsonl` with `{clientSlug}` in the detail.
|
|
8
|
+
4. Run `growthub kit fork status <fork-id>` to confirm no drift was introduced.
|
|
9
|
+
|
|
10
|
+
The `_template/` brand is upstream-owned; all real client work lives under `brands/<client-slug>/`.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Brand Kit — Template
|
|
2
|
+
|
|
3
|
+
Copy this template to `brands/<slug>/brand-kit.md` and fill in the fields.
|
|
4
|
+
|
|
5
|
+
## Identity
|
|
6
|
+
|
|
7
|
+
- Display name:
|
|
8
|
+
- Slug:
|
|
9
|
+
- Tagline:
|
|
10
|
+
|
|
11
|
+
## Voice
|
|
12
|
+
|
|
13
|
+
- Tone:
|
|
14
|
+
- Vocabulary:
|
|
15
|
+
- Anti-patterns to avoid:
|
|
16
|
+
|
|
17
|
+
## Visual
|
|
18
|
+
|
|
19
|
+
- Primary colour:
|
|
20
|
+
- Secondary colour:
|
|
21
|
+
- Typography pairing:
|
|
22
|
+
|
|
23
|
+
## Assets
|
|
24
|
+
|
|
25
|
+
- Logo URL:
|
|
26
|
+
- Favicon URL:
|
|
27
|
+
- Open Graph image URL:
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Growthub — Reference Brand Kit
|
|
2
|
+
|
|
3
|
+
A worked example of a fully-populated brand kit. The `growthub/` brand is owned by upstream — if you want to customize, create your own brand under `brands/<your-slug>/brand-kit.md`.
|
|
4
|
+
|
|
5
|
+
## Identity
|
|
6
|
+
|
|
7
|
+
- Display name: Growthub
|
|
8
|
+
- Slug: growthub
|
|
9
|
+
- Tagline: Local DX and GTM runtime for AI-native teams.
|
|
10
|
+
|
|
11
|
+
## Voice
|
|
12
|
+
|
|
13
|
+
- Tone: Direct, technical, no filler.
|
|
14
|
+
- Vocabulary: "Worker kit", "custom workspace", "kernel packet", "fork-sync", "heal".
|
|
15
|
+
- Anti-patterns: marketing fluff, redundant adjectives, overpromising.
|
|
16
|
+
|
|
17
|
+
## Visual
|
|
18
|
+
|
|
19
|
+
- Primary colour: #0a0a0a
|
|
20
|
+
- Secondary colour: #4ade80
|
|
21
|
+
- Typography: Inter for UI, JetBrains Mono for code.
|
|
22
|
+
|
|
23
|
+
## Assets
|
|
24
|
+
|
|
25
|
+
- See `ui/public/` in the main repository.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 2,
|
|
3
|
+
"bundle": {
|
|
4
|
+
"id": "growthub-custom-workspace-starter-v1",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"kitId": "growthub-custom-workspace-starter-v1",
|
|
7
|
+
"workerId": "custom-workspace-operator"
|
|
8
|
+
},
|
|
9
|
+
"briefType": "custom-workspace-starter",
|
|
10
|
+
"capabilityType": "worker",
|
|
11
|
+
"executionMode": "export",
|
|
12
|
+
"activationModes": ["export"],
|
|
13
|
+
"publicExampleBrandPaths": [
|
|
14
|
+
"brands/growthub/brand-kit.md"
|
|
15
|
+
],
|
|
16
|
+
"requiredFrozenAssets": [
|
|
17
|
+
"QUICKSTART.md",
|
|
18
|
+
".env.example",
|
|
19
|
+
"skills.md",
|
|
20
|
+
"output-standards.md",
|
|
21
|
+
"runtime-assumptions.md",
|
|
22
|
+
"validation-checklist.md",
|
|
23
|
+
"workers/custom-workspace-operator/CLAUDE.md",
|
|
24
|
+
"brands/_template/brand-kit.md",
|
|
25
|
+
"brands/growthub/brand-kit.md",
|
|
26
|
+
"brands/NEW-CLIENT.md",
|
|
27
|
+
"setup/verify-env.mjs",
|
|
28
|
+
"setup/check-deps.sh",
|
|
29
|
+
"output/README.md",
|
|
30
|
+
"templates/workspace-brief.md",
|
|
31
|
+
"templates/agent-contract.md",
|
|
32
|
+
"templates/deployment-plan.md",
|
|
33
|
+
"examples/workspace-sample.md",
|
|
34
|
+
"docs/starter-kit-overview.md",
|
|
35
|
+
"docs/fork-sync-integration.md",
|
|
36
|
+
"docs/vite-ui-shell-guide.md",
|
|
37
|
+
"studio/index.html",
|
|
38
|
+
"studio/package.json",
|
|
39
|
+
"studio/vite.config.js",
|
|
40
|
+
"studio/serve.mjs",
|
|
41
|
+
"studio/src/main.jsx",
|
|
42
|
+
"studio/src/App.jsx",
|
|
43
|
+
"studio/src/app.css",
|
|
44
|
+
"growthub-meta/README.md",
|
|
45
|
+
"growthub-meta/kit-standard.md"
|
|
46
|
+
]
|
|
47
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Starter Kit — Fork Sync Integration
|
|
2
|
+
|
|
3
|
+
The starter kit is the first bundled worker kit that is both a **template** and a **native consumer** of the Self-Healing Fork Sync Agent.
|
|
4
|
+
|
|
5
|
+
## What the starter registers for you
|
|
6
|
+
|
|
7
|
+
On `growthub starter init` the CLI:
|
|
8
|
+
|
|
9
|
+
1. Materializes the bundled tree to `<out>` via `copyBundledKitSource`.
|
|
10
|
+
2. Calls `registerKitFork({ forkPath, kitId, baseVersion })` — writes `<out>/.growthub-fork/fork.json` and appends an entry to the CLI-owned discovery index at `GROWTHUB_KIT_FORKS_HOME/index.json`.
|
|
11
|
+
3. Seeds `<out>/.growthub-fork/policy.json` with conservative defaults (`autoApprove=additive`, `remoteSyncMode=off`, `interactiveConflicts=true`).
|
|
12
|
+
4. Appends a `registered` event to `<out>/.growthub-fork/trace.jsonl`.
|
|
13
|
+
5. Optionally binds a GitHub remote via `growthub kit fork create --upstream <owner/repo>` or `growthub kit fork connect --remote <owner/repo>`.
|
|
14
|
+
|
|
15
|
+
## What you never have to do manually
|
|
16
|
+
|
|
17
|
+
- Generate a forkId.
|
|
18
|
+
- Write the initial policy.json.
|
|
19
|
+
- Ensure `.growthub-fork/` is present and well-formed.
|
|
20
|
+
- Add the fork to the discovery index.
|
|
21
|
+
|
|
22
|
+
## When upstream ships a new version
|
|
23
|
+
|
|
24
|
+
Exactly the same flow as every other kit-fork:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
growthub kit fork status <fork-id>
|
|
28
|
+
growthub kit fork heal <fork-id> --dry-run
|
|
29
|
+
growthub kit fork heal <fork-id>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The heal plan honours your `policy.json`. User-modified files, `policy.untouchablePaths`, and `CUSTOM_SKILL_PATTERNS` are never overwritten.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Starter Kit — Overview
|
|
2
|
+
|
|
3
|
+
The Growthub Custom Workspace Starter Kit is the canonical v1 primitive for forking a single worker kit without the rest of the repository. It combines:
|
|
4
|
+
|
|
5
|
+
1. **Bundled asset tree** — the full custom-workspace kernel-packet surface (kit.json, frozen assets, brand scaffolds, setup, templates, examples, docs, growthub-meta).
|
|
6
|
+
2. **Vite-bundled UI shell** — a minimal React + Vite 5 studio at `studio/` that users extend with their own views.
|
|
7
|
+
3. **First-class Self-Healing Fork Sync Agent wiring** — `growthub starter init` materializes this tree at a user-chosen path and auto-registers it as a kit-fork with a dedicated `forkId`.
|
|
8
|
+
|
|
9
|
+
## Why a dedicated primitive
|
|
10
|
+
|
|
11
|
+
Users who want to customize one worker kit shouldn't have to fork the whole `growthub-local` repository. The starter kit gives them:
|
|
12
|
+
|
|
13
|
+
- A clean, empty workspace that still satisfies every custom-workspace kernel invariant.
|
|
14
|
+
- An auto-registered fork with policy, trace, and (optionally) a GitHub remote.
|
|
15
|
+
- A guaranteed upgrade path back to upstream via the Self-Healing Fork Sync Agent.
|
|
16
|
+
|
|
17
|
+
## End-to-end flow
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
growthub starter init --name my-workspace --out ./my-workspace
|
|
21
|
+
└→ copyBundledKitSource('growthub-custom-workspace-starter-v1', './my-workspace')
|
|
22
|
+
└→ registerKitFork({ forkPath: './my-workspace', kitId: '...', baseVersion: '1.0.0' })
|
|
23
|
+
└→ writeKitForkPolicy(forkPath, default)
|
|
24
|
+
└→ appendKitForkTraceEvent(forkPath, 'registered')
|
|
25
|
+
└→ (optional) growthub kit fork create --upstream owner/repo → GitHub remote
|
|
26
|
+
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Starter Kit — Vite UI Shell Guide
|
|
2
|
+
|
|
3
|
+
The `studio/` directory ships a minimal Vite 5 + React 18 shell. It is intentionally tiny — a single `App.jsx` view that introspects the fork state.
|
|
4
|
+
|
|
5
|
+
## Extend it
|
|
6
|
+
|
|
7
|
+
Add views under `studio/src/views/<Name>.jsx`. Import them in `App.jsx`. Vite's hot-module-replacement handles the dev loop; the Self-Healing Fork Sync Agent treats any file you add under `studio/src/` as user-authored (it may still update upstream-owned files in `studio/src/` — protect yours via `policy.untouchablePaths`).
|
|
8
|
+
|
|
9
|
+
## Build + serve
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
cd studio
|
|
13
|
+
npm install
|
|
14
|
+
npm run dev # dev server
|
|
15
|
+
npm run build # production build -> studio/dist
|
|
16
|
+
node serve.mjs # serve studio/dist on localhost
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Why Vite, not Next.js
|
|
20
|
+
|
|
21
|
+
- Zero server coupling — a static `dist/` directory ships anywhere.
|
|
22
|
+
- Fast dev loop (HMR).
|
|
23
|
+
- No vendor lock-in at the framework level.
|
|
24
|
+
- Mirrors the pattern already in production for `growthub-zernio-social-v1`.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Workspace Sample — Reference Output
|
|
2
|
+
|
|
3
|
+
A worked example of the artifact shape a finished workspace produces. Use this as a comparison benchmark when validating a custom workspace run.
|
|
4
|
+
|
|
5
|
+
- Client: growthub
|
|
6
|
+
- Project slug: starter-reference
|
|
7
|
+
- Goals: (1) demonstrate the starter contract; (2) validate fork-sync wiring; (3) produce a minimal but complete workspace tree
|
|
8
|
+
- First heal checkpoint: `status_ran` at registration, overall severity = none.
|
|
9
|
+
|
|
10
|
+
See `output/growthub/starter-reference/` after running the starter init + first heal.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Kit Standard
|
|
2
|
+
|
|
3
|
+
This starter is a custom-workspace worker kit with:
|
|
4
|
+
|
|
5
|
+
- `schemaVersion: 2` in `kit.json`
|
|
6
|
+
- `family: "studio"`
|
|
7
|
+
- `executionMode: "export"`
|
|
8
|
+
- `activationModes: ["export"]`
|
|
9
|
+
|
|
10
|
+
Every bundled worker kit under `cli/assets/worker-kits/` conforms to the same shape. See `docs/kernel-packets/KERNEL_PACKET_CUSTOM_WORKSPACES.md` for the full invariant list.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 2,
|
|
3
|
+
"kit": {
|
|
4
|
+
"id": "growthub-custom-workspace-starter-v1",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"name": "Growthub Custom Workspace Starter Kit",
|
|
7
|
+
"description": "Canonical v1 starter primitive for a Growthub custom workspace worker kit. Ships a minimal Vite-bundled UI shell, a worker agent contract, the full custom-workspace kernel-packet asset surface, and first-class wiring into the Self-Healing Fork Sync Agent. Users can fork just this one kit without the rest of the repository and the CLI will register the new directory as a self-describing fork with a dedicated forkId, honouring every v1 policy, trace, and remote-sync invariant.",
|
|
8
|
+
"type": "worker",
|
|
9
|
+
"visibility": "public-open-source",
|
|
10
|
+
"sourceRepo": "growthub-local",
|
|
11
|
+
"family": "studio"
|
|
12
|
+
},
|
|
13
|
+
"entrypoint": {
|
|
14
|
+
"workerId": "custom-workspace-operator",
|
|
15
|
+
"path": "workers/custom-workspace-operator/CLAUDE.md"
|
|
16
|
+
},
|
|
17
|
+
"workerIds": [
|
|
18
|
+
"custom-workspace-operator"
|
|
19
|
+
],
|
|
20
|
+
"agentContractPath": "workers/custom-workspace-operator/CLAUDE.md",
|
|
21
|
+
"brandTemplatePath": "brands/_template/brand-kit.md",
|
|
22
|
+
"publicExampleBrandPaths": [
|
|
23
|
+
"brands/growthub/brand-kit.md"
|
|
24
|
+
],
|
|
25
|
+
"frozenAssetPaths": [
|
|
26
|
+
"QUICKSTART.md",
|
|
27
|
+
".env.example",
|
|
28
|
+
"skills.md",
|
|
29
|
+
"output-standards.md",
|
|
30
|
+
"runtime-assumptions.md",
|
|
31
|
+
"validation-checklist.md",
|
|
32
|
+
"workers/custom-workspace-operator/CLAUDE.md",
|
|
33
|
+
"brands/_template/brand-kit.md",
|
|
34
|
+
"brands/growthub/brand-kit.md",
|
|
35
|
+
"brands/NEW-CLIENT.md",
|
|
36
|
+
"setup/verify-env.mjs",
|
|
37
|
+
"setup/check-deps.sh",
|
|
38
|
+
"output/README.md",
|
|
39
|
+
"templates/workspace-brief.md",
|
|
40
|
+
"templates/agent-contract.md",
|
|
41
|
+
"templates/deployment-plan.md",
|
|
42
|
+
"examples/workspace-sample.md",
|
|
43
|
+
"docs/starter-kit-overview.md",
|
|
44
|
+
"docs/fork-sync-integration.md",
|
|
45
|
+
"docs/vite-ui-shell-guide.md",
|
|
46
|
+
"studio/index.html",
|
|
47
|
+
"studio/package.json",
|
|
48
|
+
"studio/vite.config.js",
|
|
49
|
+
"studio/serve.mjs",
|
|
50
|
+
"studio/src/main.jsx",
|
|
51
|
+
"studio/src/App.jsx",
|
|
52
|
+
"studio/src/app.css",
|
|
53
|
+
"growthub-meta/README.md",
|
|
54
|
+
"growthub-meta/kit-standard.md"
|
|
55
|
+
],
|
|
56
|
+
"setupPaths": {
|
|
57
|
+
"quickstart": "QUICKSTART.md",
|
|
58
|
+
"setupDir": "setup/",
|
|
59
|
+
"outputDir": "output/"
|
|
60
|
+
},
|
|
61
|
+
"outputStandard": {
|
|
62
|
+
"type": "working-directory",
|
|
63
|
+
"description": "Fork the starter kit directly with `growthub starter init` — the CLI materializes this bundled asset tree to the user's chosen path, auto-registers the destination as a kit-fork (canonical state under `<forkPath>/.growthub-fork/fork.json`), optionally binds it to a GitHub remote, and hands off the forkId. Every downstream customization flows through the v1 Self-Healing Fork Sync Agent.",
|
|
64
|
+
"requiredPaths": [
|
|
65
|
+
"QUICKSTART.md",
|
|
66
|
+
"kit.json",
|
|
67
|
+
".env.example",
|
|
68
|
+
"bundles/growthub-custom-workspace-starter-v1.json",
|
|
69
|
+
"skills.md",
|
|
70
|
+
"workers/custom-workspace-operator/CLAUDE.md",
|
|
71
|
+
"brands/_template/brand-kit.md",
|
|
72
|
+
"brands/growthub/brand-kit.md",
|
|
73
|
+
"brands/NEW-CLIENT.md",
|
|
74
|
+
"setup/verify-env.mjs",
|
|
75
|
+
"setup/check-deps.sh",
|
|
76
|
+
"output/README.md",
|
|
77
|
+
"studio",
|
|
78
|
+
"templates",
|
|
79
|
+
"docs",
|
|
80
|
+
"growthub-meta"
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
"bundles": [
|
|
84
|
+
{
|
|
85
|
+
"id": "growthub-custom-workspace-starter-v1",
|
|
86
|
+
"version": "1.0.0",
|
|
87
|
+
"path": "bundles/growthub-custom-workspace-starter-v1.json"
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"executionMode": "export",
|
|
91
|
+
"activationModes": [
|
|
92
|
+
"export"
|
|
93
|
+
],
|
|
94
|
+
"compatibility": {
|
|
95
|
+
"cliMinVersion": "0.4.0"
|
|
96
|
+
},
|
|
97
|
+
"provenance": {
|
|
98
|
+
"sourceRepo": "growthub-local",
|
|
99
|
+
"frozenAt": "2026-04-16T00:00:00.000Z"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Starter Kit — Output Standards
|
|
2
|
+
|
|
3
|
+
All generated artifacts write to `output/<client-slug>/<project-slug>/`.
|
|
4
|
+
|
|
5
|
+
Required artifacts per project:
|
|
6
|
+
|
|
7
|
+
- `workspace-brief.md` — the user-supplied brief (or a generated one)
|
|
8
|
+
- `deployment-plan.md` — machine-readable and human-reviewable
|
|
9
|
+
- `trace-summary.md` — distilled view of `.growthub-fork/trace.jsonl` for the run
|
|
10
|
+
|
|
11
|
+
Machine-readable outputs must be shape-compatible with the `growthub-custom-workspace-starter-v1` bundle descriptor.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Starter Kit — Runtime Assumptions
|
|
2
|
+
|
|
3
|
+
- **Node**: >= v20 (the Growthub CLI ships `resolveCliVersion()` which is tested against the same minimum).
|
|
4
|
+
- **Git**: required on PATH for fork-sync remote operations.
|
|
5
|
+
- **Vite**: `studio/` uses Vite 5 + React 18; any compatible toolchain is fine.
|
|
6
|
+
- **Fork registration**: the CLI expects `<forkPath>/.growthub-fork/fork.json` to exist and be readable. Do not commit this file to version control if you are publishing your fork — `.growthub-fork/` is developer-local state and should be added to `.gitignore`.
|
|
7
|
+
- **Policy defaults**: `autoApprove=additive`, `autoApproveDepUpdates=additive`, `remoteSyncMode=off`, `interactiveConflicts=true`.
|
|
8
|
+
- **Bundled sources**: everything under `frozenAssetPaths` in `kit.json` is upstream-owned. Modify at your own risk — the Self-Healing Fork Sync Agent flags every change there for confirmation.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Starter kit — dependency check. Verifies the local runtime is ready.
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
|
|
5
|
+
have() { command -v "$1" >/dev/null 2>&1; }
|
|
6
|
+
|
|
7
|
+
missing=0
|
|
8
|
+
for cmd in node npm git; do
|
|
9
|
+
if ! have "$cmd"; then
|
|
10
|
+
echo " [check-deps] MISSING: $cmd"
|
|
11
|
+
missing=1
|
|
12
|
+
else
|
|
13
|
+
echo " [check-deps] ok: $cmd ($(command -v "$cmd"))"
|
|
14
|
+
fi
|
|
15
|
+
done
|
|
16
|
+
|
|
17
|
+
if [ "$missing" -ne 0 ]; then
|
|
18
|
+
exit 1
|
|
19
|
+
fi
|
|
20
|
+
echo " [check-deps] All prerequisites satisfied."
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Starter kit — env verification.
|
|
3
|
+
// Prints a readiness report; exits non-zero if critical env is missing.
|
|
4
|
+
import process from "node:process";
|
|
5
|
+
|
|
6
|
+
const required = []; // starter ships with zero required env — add as the workspace grows
|
|
7
|
+
const optional = ["GROWTHUB_KIT_FORKS_HOME", "GROWTHUB_GITHUB_HOME"];
|
|
8
|
+
|
|
9
|
+
let errors = 0;
|
|
10
|
+
for (const key of required) {
|
|
11
|
+
if (!process.env[key]) {
|
|
12
|
+
console.error(`[verify-env] missing required env: ${key}`);
|
|
13
|
+
errors += 1;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
for (const key of optional) {
|
|
17
|
+
const v = process.env[key];
|
|
18
|
+
console.log(`[verify-env] ${key} = ${v ? v : "(unset — default path applies)"}`);
|
|
19
|
+
}
|
|
20
|
+
process.exit(errors > 0 ? 1 : 0);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Starter Kit — Skills
|
|
2
|
+
|
|
3
|
+
This file catalogues the skills the Custom Workspace Operator offers out of the box. Add your own under `skills/custom/` — those paths are unconditionally preserved across every heal.
|
|
4
|
+
|
|
5
|
+
## Built-in skills (upstream-owned, heal will update)
|
|
6
|
+
|
|
7
|
+
- **scaffold-view** — generate a new Vite view under `studio/src/views/<Name>.jsx`
|
|
8
|
+
- **scaffold-api** — stub an API adapter under `studio/src/api/<slug>.js`
|
|
9
|
+
- **emit-brand-scaffold** — clone `brands/_template/brand-kit.md` to `brands/<slug>/brand-kit.md`
|
|
10
|
+
- **trace-inspect** — summarise the last N events in `.growthub-fork/trace.jsonl`
|
|
11
|
+
|
|
12
|
+
## User-authored skills (never touched by heal)
|
|
13
|
+
|
|
14
|
+
Create any markdown file under `skills/custom/` or `custom-skills/`. The agent will discover them at runtime but the Self-Healing Fork Sync Agent will never modify them.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>Growthub Custom Workspace Starter</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="root"></div>
|
|
10
|
+
<script type="module" src="/src/main.jsx"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "growthub-custom-workspace-starter-studio",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "vite build",
|
|
9
|
+
"preview": "vite preview",
|
|
10
|
+
"serve": "node serve.mjs"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"react": "^18.3.1",
|
|
14
|
+
"react-dom": "^18.3.1"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@vitejs/plugin-react": "^4.3.1",
|
|
18
|
+
"vite": "^5.4.2"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Minimal static server for the built Vite shell.
|
|
3
|
+
// Usage: node serve.mjs [--port 5180]
|
|
4
|
+
import http from "node:http";
|
|
5
|
+
import fs from "node:fs";
|
|
6
|
+
import path from "node:path";
|
|
7
|
+
import { fileURLToPath } from "node:url";
|
|
8
|
+
|
|
9
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
10
|
+
const DIST = path.resolve(__dirname, "dist");
|
|
11
|
+
const PORT = Number(process.env.PORT ?? 5180);
|
|
12
|
+
|
|
13
|
+
const mime = {
|
|
14
|
+
".html": "text/html; charset=utf-8",
|
|
15
|
+
".js": "application/javascript; charset=utf-8",
|
|
16
|
+
".css": "text/css; charset=utf-8",
|
|
17
|
+
".svg": "image/svg+xml",
|
|
18
|
+
".json": "application/json; charset=utf-8",
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
function serve(req, res) {
|
|
22
|
+
const url = decodeURIComponent(req.url?.split("?")[0] ?? "/");
|
|
23
|
+
const file = url === "/" ? "/index.html" : url;
|
|
24
|
+
const full = path.resolve(DIST, "." + file);
|
|
25
|
+
if (!full.startsWith(DIST)) { res.statusCode = 403; res.end("Forbidden"); return; }
|
|
26
|
+
fs.readFile(full, (err, buf) => {
|
|
27
|
+
if (err) {
|
|
28
|
+
// SPA fallback
|
|
29
|
+
fs.readFile(path.resolve(DIST, "index.html"), (err2, fallback) => {
|
|
30
|
+
if (err2) { res.statusCode = 404; res.end("Not found"); return; }
|
|
31
|
+
res.setHeader("Content-Type", mime[".html"]); res.end(fallback);
|
|
32
|
+
});
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
res.setHeader("Content-Type", mime[path.extname(full)] ?? "application/octet-stream");
|
|
36
|
+
res.end(buf);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
http.createServer(serve).listen(PORT, () => {
|
|
41
|
+
console.log(`[starter-studio] serving ${DIST} on http://localhost:${PORT}`);
|
|
42
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
export default function App() {
|
|
4
|
+
return (
|
|
5
|
+
<main className="starter">
|
|
6
|
+
<header className="starter-header">
|
|
7
|
+
<h1>Growthub Custom Workspace Starter</h1>
|
|
8
|
+
<p className="starter-subtitle">
|
|
9
|
+
A Vite + React shell wired to the Self-Healing Fork Sync Agent.
|
|
10
|
+
</p>
|
|
11
|
+
</header>
|
|
12
|
+
<section className="starter-grid">
|
|
13
|
+
<Card title="kit.json" body="Schema v2 — family: studio." />
|
|
14
|
+
<Card title=".growthub-fork/" body="fork.json · policy.json · trace.jsonl · jobs/" />
|
|
15
|
+
<Card title="workers/" body="custom-workspace-operator — the agent contract." />
|
|
16
|
+
<Card title="studio/" body="This shell. Extend src/views/ with your own React." />
|
|
17
|
+
</section>
|
|
18
|
+
<footer className="starter-footer">
|
|
19
|
+
Next: <code>growthub kit fork status <fork-id></code>
|
|
20
|
+
</footer>
|
|
21
|
+
</main>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function Card({ title, body }) {
|
|
26
|
+
return (
|
|
27
|
+
<article className="starter-card">
|
|
28
|
+
<h2>{title}</h2>
|
|
29
|
+
<p>{body}</p>
|
|
30
|
+
</article>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
color-scheme: dark;
|
|
3
|
+
--fg: #eaeaea;
|
|
4
|
+
--fg-dim: #888;
|
|
5
|
+
--bg: #0a0a0a;
|
|
6
|
+
--accent: #4ade80;
|
|
7
|
+
--card: #141414;
|
|
8
|
+
--border: #222;
|
|
9
|
+
}
|
|
10
|
+
* { box-sizing: border-box; }
|
|
11
|
+
body { margin: 0; font-family: Inter, system-ui, sans-serif; background: var(--bg); color: var(--fg); }
|
|
12
|
+
.starter { max-width: 960px; margin: 0 auto; padding: 48px 24px; }
|
|
13
|
+
.starter-header h1 { font-size: 2rem; margin: 0 0 8px; letter-spacing: -0.02em; }
|
|
14
|
+
.starter-subtitle { color: var(--fg-dim); margin: 0 0 32px; }
|
|
15
|
+
.starter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
|
|
16
|
+
.starter-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
|
|
17
|
+
.starter-card h2 { font-size: 1rem; margin: 0 0 6px; color: var(--accent); font-family: JetBrains Mono, monospace; }
|
|
18
|
+
.starter-card p { margin: 0; font-size: 0.9rem; color: var(--fg-dim); }
|
|
19
|
+
.starter-footer { margin-top: 40px; color: var(--fg-dim); font-family: JetBrains Mono, monospace; font-size: 0.9rem; }
|
|
20
|
+
.starter-footer code { background: var(--card); padding: 2px 6px; border-radius: 4px; }
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Agent Contract — Template
|
|
2
|
+
|
|
3
|
+
Used when layering a custom agent on top of this workspace. Keep this narrow — the Self-Healing Fork Sync Agent enforces the broader contract; this template is for workspace-specific rules.
|
|
4
|
+
|
|
5
|
+
- Agent ID:
|
|
6
|
+
- Scope (which files it may read / write):
|
|
7
|
+
- Tools it may invoke:
|
|
8
|
+
- Escalation policy (when to pause for user confirmation):
|
|
9
|
+
- Trace requirements (which events must be appended):
|