You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: sync alpha from main (20260402-100225) (#1154)
## Summary
Automated merge of `main` into `alpha`.
- Commits from `main` not yet in `alpha`: **12**
- merge-base: `595d79011a81e828335e7ba8cd51d17a520c5f8b`
- Generated: 20260402-100225
## Review Instructions
1. Check for conflict markers (`<<<<<<<`) in changed files and resolve
them.
2. Cherry-pick any alpha-specific fix commits onto this branch.
3. Verify CI passes.
4. Merge into `alpha` using **Create a merge commit** (not rebase).
Generated by `scripts/rebase-main-to-alpha.sh`.
Copy file name to clipboardExpand all lines: .claude/skills/dev-cluster/SKILL.md
+101Lines changed: 101 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,7 @@ The Ambient Code Platform consists of these containerized components:
37
37
**Commands:**
38
38
-`make kind-up` - Create cluster, deploy with Quay.io images
39
39
-`make kind-up LOCAL_IMAGES=true` - Create cluster, build and load local images
40
+
-`make kind-up LOCAL_IMAGES=true LOCAL_VERTEX=true` - Same but with Vertex AI enabled (reads `ANTHROPIC_VERTEX_PROJECT_ID`, `CLOUD_ML_REGION`, `GOOGLE_APPLICATION_CREDENTIALS` from shell env)
40
41
-`make kind-down` - Destroy cluster
41
42
-`make kind-rebuild` - Rebuild all components, reload images, restart
42
43
-`make kind-port-forward` - Setup port forwarding
@@ -51,6 +52,54 @@ The Ambient Code Platform consists of these containerized components:
51
52
52
53
**Access:**`http://localhost:$KIND_FWD_FRONTEND_PORT` (run `make kind-status` for assigned ports)
53
54
55
+
## CRITICAL: Always Use `make kind-up`, Never Manually Recover
56
+
57
+
**If `make kind-up` fails partway through, fix the root cause and re-run `make kind-up` (after `make kind-down`).** Do NOT manually patch deployments, create buckets, or set env vars to recover — the Makefile handles MinIO bucket creation, Vertex AI setup, token extraction, and port forwarding in a specific order. Manually recovering individual steps is slower, error-prone, and skips steps you don't know about.
58
+
59
+
## Vertex AI / GCP Configuration
60
+
61
+
When the user needs Vertex AI (Claude via GCP) instead of Anthropic API:
62
+
63
+
```bash
64
+
# One-command setup — reads env vars from shell profile
65
+
make kind-up LOCAL_IMAGES=true LOCAL_VERTEX=true
66
+
```
67
+
68
+
**Prerequisites:** These env vars must be set in the user's shell (check `~/.bashrc` or `~/.zshrc`):
69
+
-`ANTHROPIC_VERTEX_PROJECT_ID` — GCP project ID
70
+
-`CLOUD_ML_REGION` — Vertex AI region (e.g., `us-east5`)
71
+
-`GOOGLE_APPLICATION_CREDENTIALS` — Path to service account JSON or ADC file
72
+
73
+
The `LOCAL_VERTEX=true` flag runs `scripts/setup-vertex-kind.sh` which creates the `ambient-vertex` secret, patches `operator-config`, and restarts the operator. **Do not do these steps manually.**
74
+
75
+
## Feature Flags (Unleash)
76
+
77
+
The platform uses **Unleash** for feature flags, running in-cluster. Some endpoints are gated behind feature flags and will return 404 if the flag is not enabled. If you hit an unexpected 404 on an endpoint that exists in the code, check whether it's behind a `requireFeatureFlag()` middleware and ensure the flag is created and enabled in Unleash (admin token: `*:*.unleash-admin-token`, API at `http://localhost:4242` inside the cluster).
78
+
79
+
## Custom Workflow Branches
80
+
81
+
To test workflow changes from a different branch of `ambient-code/workflows`:
82
+
83
+
```bash
84
+
kubectl set env deployment/backend-api -n ambient-code \
**Cause:** MinIO `ambient-sessions` bucket doesn't exist. This happens when `make kind-up` fails partway through (e.g., due to image pull errors) and the `init-minio.sh` step is skipped.
kubectl exec deployment/minio -n ambient-code -- mc mb local/ambient-sessions
354
+
```
355
+
356
+
**Prevention:** If `make kind-up` fails, fix the underlying issue and re-run it rather than manually recovering individual steps. The Makefile runs `init-minio.sh` near the end of `kind-up`.
357
+
297
358
### Port forwarding not working
298
359
**Cause:** Port already in use or forwarding process died
299
360
@@ -382,6 +443,46 @@ npm run dev
382
443
- Backend, operator, or runner changes (those still need image rebuild + load)
383
444
- Testing changes to container configuration or deployment manifests
384
445
446
+
## Benchmarking Developer Loops
447
+
448
+
Use the benchmark harness when the user wants measured cold-start or rebuild timing rather than ad hoc impressions.
449
+
450
+
### Commands
451
+
452
+
```bash
453
+
# Human-friendly local summary
454
+
make benchmark
455
+
456
+
# Agent / automation friendly output
457
+
make benchmark FORMAT=tsv
458
+
459
+
# Single component
460
+
make benchmark COMPONENT=frontend MODE=cold
461
+
make benchmark COMPONENT=backend MODE=warm
462
+
```
463
+
464
+
### Agent Guidance
465
+
466
+
- Prefer `FORMAT=tsv` when another agent, script, or evaluation harness will consume the output.
467
+
- Prefer the default `human` format for interactive local use in a terminal.
0 commit comments