@yottagraph-app/aether-instructions 1.1.40 → 1.1.42
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/AGENTS.md +85 -0
- package/commands/update_instructions.md +23 -6
- package/package.json +3 -2
- package/rules/agents.mdc +7 -0
- package/rules/architecture.mdc +2 -3
- package/rules/cursor-cloud.mdc +62 -0
- package/rules/deployment.mdc +19 -0
- package/rules/env.mdc +15 -0
- package/rules/instructions_warning.mdc +15 -4
- package/rules/local-setup.mdc +20 -0
- package/rules/storage.mdc +54 -0
- package/rules/aether.mdc +0 -21
package/AGENTS.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Aether
|
|
2
|
+
|
|
3
|
+
**Stack:** Nuxt 3 (SPA), Vue 3 Composition API (`<script setup>`), Vuetify 3, TypeScript (required), Auth0.
|
|
4
|
+
|
|
5
|
+
**Structure:** `pages/` (file-based routing), `components/`, `composables/`, `server/api/`, `agents/` (Python ADK), `mcp-servers/` (Python FastMCP).
|
|
6
|
+
|
|
7
|
+
**Data:** This app runs on the Lovelace platform -- entities, news, filings, sentiment, relationships, events. See the `data` rule for access patterns and gotchas. Skill docs: `skills/data-model/` (entity types, properties, relationships; `SKILL.md` first), `skills/elemental-mcp-patterns/` (MCP response shapes, property type handling, Python patterns for agent tools). Do NOT call external APIs for data the platform provides.
|
|
8
|
+
|
|
9
|
+
**Storage:** KV (Upstash Redis) for preferences and lightweight state via `Pref<T>` from `usePrefsStore()`. Neon Postgres for relational data if connected (see the `storage` rule).
|
|
10
|
+
|
|
11
|
+
**Source of truth:** `DESIGN.md` -- read before starting work, update when changing features. The starter UI is placeholder -- replace freely. Feature docs in `design/` for implementation planning.
|
|
12
|
+
|
|
13
|
+
**Git:** Commit meaningful units of work. Run `npm run format` before commit. Message format: `[Agent commit] {summary}`. Push directly to main — do NOT create PRs or feature branches.
|
|
14
|
+
|
|
15
|
+
**First action for a new project:** Run `/build_my_app`.
|
|
16
|
+
|
|
17
|
+
## Task-specific rules
|
|
18
|
+
|
|
19
|
+
Conditional rules, loaded based on what you're doing:
|
|
20
|
+
|
|
21
|
+
- `architecture` — project structure, navigation, server routes, agents, MCP
|
|
22
|
+
- `data` — Elemental API / data access patterns and gotchas
|
|
23
|
+
- `cookbook` — copy-paste UI patterns
|
|
24
|
+
- `cookbook-data` — data-fetching recipes
|
|
25
|
+
- `design` — DESIGN.md workflow, feature docs
|
|
26
|
+
- `ui` — page templates, layout patterns
|
|
27
|
+
- `pref` — KV preferences
|
|
28
|
+
- `branding` — colors, fonts
|
|
29
|
+
- `server` — Nitro routes, Neon Postgres usage
|
|
30
|
+
- `server-data` — server-side Elemental API from routes
|
|
31
|
+
- `storage` — KV vs Neon availability and selection
|
|
32
|
+
- `agents` — ADK agents
|
|
33
|
+
- `agents-data` — agents calling Elemental API
|
|
34
|
+
- `mcp-servers` — FastMCP server development
|
|
35
|
+
- `deployment` — app, agent, and MCP server deployment
|
|
36
|
+
- `env` — `.env` variable reference
|
|
37
|
+
- `local-setup` — manual local dev setup
|
|
38
|
+
- `cursor-cloud` — Cursor Cloud environment quirks
|
|
39
|
+
- `git-support` — commit workflow and pre-commit troubleshooting
|
|
40
|
+
- `something-broke` — error recovery, build failures
|
|
41
|
+
|
|
42
|
+
## Environment
|
|
43
|
+
|
|
44
|
+
Detect your runtime once at startup, then read the matching rule:
|
|
45
|
+
|
|
46
|
+
- **Cursor Cloud** if `$HOME` starts with `/root` or `/home/ubuntu`, OR `uname -s` reports `Linux` in a container-shaped path, OR a "Dev Server" terminal was auto-started from `.cursor/environment.json`. → Read the `cursor-cloud` rule.
|
|
47
|
+
- **Local dev** if `$HOME` is under `/Users/…` (macOS) or a normal Linux/Windows user home, and no "Dev Server" terminal is auto-running. → If `.env` and `node_modules/` are present, you're set up; otherwise read the `local-setup` rule.
|
|
48
|
+
|
|
49
|
+
This check is cheap and only needs to run once per session.
|
|
50
|
+
|
|
51
|
+
### Cursor instructions (`.cursor/`)
|
|
52
|
+
|
|
53
|
+
Cursor rules, commands, and skills are installed from the
|
|
54
|
+
`@yottagraph-app/aether-instructions` npm package during project init.
|
|
55
|
+
`.cursor/skills/elemental-api/` contains API skill documentation (endpoint
|
|
56
|
+
reference, types, usage patterns). `.cursor/skills/data-model/` contains
|
|
57
|
+
Lovelace data model documentation (entity types, schemas per fetch source).
|
|
58
|
+
If these directories are missing, run `/update_instructions` to reinstall.
|
|
59
|
+
|
|
60
|
+
## Configuration
|
|
61
|
+
|
|
62
|
+
`broadchurch.yaml` contains tenant-specific settings (GCP project, org ID,
|
|
63
|
+
service account, gateway URL, query server URL). It's generated during
|
|
64
|
+
provisioning and committed by the `tenant-init` workflow. Don't edit manually
|
|
65
|
+
unless you know what you're doing.
|
|
66
|
+
|
|
67
|
+
## Verification Commands
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
npm run dev # dev server -- check browser at localhost:3000
|
|
71
|
+
npm run build # production build -- catches compile errors
|
|
72
|
+
npm run format # Prettier formatting (run before committing)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Known Issues
|
|
76
|
+
|
|
77
|
+
### Port 3000 conflict
|
|
78
|
+
|
|
79
|
+
The dev server binds to port 3000 by default. If another service is already
|
|
80
|
+
using that port, start with `PORT=3001 npm run dev`.
|
|
81
|
+
|
|
82
|
+
### Formatting
|
|
83
|
+
|
|
84
|
+
Pre-commit hook runs `lint-staged` with Prettier. Run `npm run format` before
|
|
85
|
+
committing to avoid failures.
|
|
@@ -71,13 +71,22 @@ The extracted content is in `$TEMP_DIR/package/`.
|
|
|
71
71
|
|
|
72
72
|
## Step 4: Delete Previously Installed Files
|
|
73
73
|
|
|
74
|
-
Read the manifest and delete listed paths. **Skip blank lines** — an empty `rel` would run `rm -rf ".cursor/"` and wipe the whole directory.
|
|
74
|
+
Read the manifest and delete listed paths. **Skip blank lines** — an empty `rel` would run `rm -rf ".cursor/"` and wipe the whole directory. Entries prefixed with `root/` point at files at the repo root (currently just `AGENTS.md`); only remove **regular files** there, never directories.
|
|
75
75
|
|
|
76
76
|
```bash
|
|
77
77
|
if [ -f .cursor/.aether-instructions-manifest ]; then
|
|
78
78
|
while IFS= read -r rel || [ -n "$rel" ]; do
|
|
79
79
|
[ -z "$rel" ] && continue
|
|
80
|
-
|
|
80
|
+
case "$rel" in
|
|
81
|
+
root/*)
|
|
82
|
+
target="${rel#root/}"
|
|
83
|
+
case "$target" in ""|*..*) continue ;; esac
|
|
84
|
+
[ -f "$target" ] && rm -f "$target"
|
|
85
|
+
;;
|
|
86
|
+
*)
|
|
87
|
+
rm -rf ".cursor/$rel"
|
|
88
|
+
;;
|
|
89
|
+
esac
|
|
81
90
|
done < .cursor/.aether-instructions-manifest
|
|
82
91
|
fi
|
|
83
92
|
```
|
|
@@ -100,6 +109,12 @@ cp "$TEMP_DIR/package/commands/"* .cursor/commands/ 2>/dev/null || true
|
|
|
100
109
|
cp -r "$TEMP_DIR/package/skills/"* .cursor/skills/ 2>/dev/null || true
|
|
101
110
|
```
|
|
102
111
|
|
|
112
|
+
Copy the root-level AGENTS.md from the package to the tenant repo root, if the package ships one:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
[ -f "$TEMP_DIR/package/AGENTS.md" ] && cp "$TEMP_DIR/package/AGENTS.md" ./AGENTS.md
|
|
116
|
+
```
|
|
117
|
+
|
|
103
118
|
### Data-mode variant overlay
|
|
104
119
|
|
|
105
120
|
If this project uses **mcp-only** (or another non-default mode), re-apply the same overlay `init-project.js` uses. Read the saved mode:
|
|
@@ -134,6 +149,7 @@ Build a manifest of all installed files (one relative path per line). **Do not**
|
|
|
134
149
|
for f in .cursor/rules/*.mdc; do [ -f "$f" ] && echo "rules/$(basename "$f")"; done
|
|
135
150
|
for f in .cursor/commands/*.md; do [ -f "$f" ] && echo "commands/$(basename "$f")"; done
|
|
136
151
|
for d in .cursor/skills/*/; do [ -d "$d" ] && echo "skills/$(basename "$d")"; done
|
|
152
|
+
[ -f "$TEMP_DIR/package/AGENTS.md" ] && [ -f ./AGENTS.md ] && echo "root/AGENTS.md"
|
|
137
153
|
} > .cursor/.aether-instructions-manifest
|
|
138
154
|
```
|
|
139
155
|
|
|
@@ -185,6 +201,7 @@ Commit the updated instruction files. A root `.gitignore` rule like `skills/` ca
|
|
|
185
201
|
```bash
|
|
186
202
|
git add .cursor/rules/ .cursor/commands/ .cursor/.aether-instructions-version .cursor/.aether-instructions-manifest
|
|
187
203
|
git add -f .cursor/skills/
|
|
204
|
+
[ -f AGENTS.md ] && git add AGENTS.md
|
|
188
205
|
git commit -m "Update instructions to vX.Y.Z"
|
|
189
206
|
```
|
|
190
207
|
|
|
@@ -208,13 +225,13 @@ If you get permission errors:
|
|
|
208
225
|
|
|
209
226
|
> Try running with appropriate permissions, or check that `.cursor/` is writable.
|
|
210
227
|
|
|
211
|
-
### Want to customize a rule or
|
|
228
|
+
### Want to customize a rule, command, or AGENTS.md?
|
|
212
229
|
|
|
213
|
-
If you need to modify a package-provided file:
|
|
230
|
+
If you need to modify a package-provided file (including the root `AGENTS.md`):
|
|
214
231
|
|
|
215
232
|
1. Edit it directly — your changes will persist until the next update
|
|
216
|
-
2. To preserve changes across updates, copy it to a new name first
|
|
217
|
-
3. Remove the original's entry from `.cursor/.aether-instructions-manifest` so it won't be deleted on update
|
|
233
|
+
2. To preserve changes across updates, copy it to a new name first (e.g. `cp AGENTS.md AGENTS.local.md`)
|
|
234
|
+
3. Remove the original's entry from `.cursor/.aether-instructions-manifest` so it won't be deleted on update (for `AGENTS.md`, remove the `root/AGENTS.md` line)
|
|
218
235
|
|
|
219
236
|
### Blank line in manifest deleted `.cursor/`
|
|
220
237
|
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yottagraph-app/aether-instructions",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.42",
|
|
4
4
|
"description": "Cursor rules, commands, and skills for Aether development",
|
|
5
5
|
"files": [
|
|
6
6
|
"rules",
|
|
7
7
|
"commands",
|
|
8
8
|
"skills",
|
|
9
|
-
"variants"
|
|
9
|
+
"variants",
|
|
10
|
+
"AGENTS.md"
|
|
10
11
|
],
|
|
11
12
|
"repository": {
|
|
12
13
|
"type": "git",
|
package/rules/agents.mdc
CHANGED
|
@@ -8,6 +8,13 @@ alwaysApply: false
|
|
|
8
8
|
|
|
9
9
|
This project supports developing and deploying AI agents alongside the UI. Agents live in the `agents/` directory and deploy to Vertex AI Agent Engine via the `/deploy_agent` command.
|
|
10
10
|
|
|
11
|
+
## Starter agent
|
|
12
|
+
|
|
13
|
+
`agents/example_agent/` is a working starter agent that queries the Elemental
|
|
14
|
+
Knowledge Graph. It includes schema discovery, entity search, property lookup,
|
|
15
|
+
and optional MCP server integration. Use it as a starting point — customize the
|
|
16
|
+
instruction, add tools, and follow the patterns described below.
|
|
17
|
+
|
|
11
18
|
## Directory Structure
|
|
12
19
|
|
|
13
20
|
Each agent is a self-contained Python package. **Directory names must use underscores, not hyphens** (ADK uses the directory name as a Python identifier).
|
package/rules/architecture.mdc
CHANGED
|
@@ -30,10 +30,9 @@ mcp-servers/ # MCP servers (Python, deploy to Cloud Run)
|
|
|
30
30
|
|---|---|---|
|
|
31
31
|
| Platform data (Query Server / Postgres per your architecture) | Lovelace knowledge graph or synced local data | See the `data` rule |
|
|
32
32
|
| KV (Upstash Redis) | User preferences, lightweight state | Settings, watchlists, UI state that should persist |
|
|
33
|
-
| Neon Postgres | App-specific relational data | Custom tables, complex queries (if
|
|
33
|
+
| Neon Postgres | App-specific relational data | Custom tables, complex queries (if provisioned — see the `storage` rule for how to check) |
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
Check `.env` for `DATABASE_URL` before using Neon Postgres (see `server` rule).
|
|
35
|
+
See the `storage` rule to check which stores are available, then `pref` (client-side KV) and `server` (Neon usage) for detailed patterns.
|
|
37
36
|
|
|
38
37
|
## Adding Pages
|
|
39
38
|
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Cursor Cloud environment quirks (Node managed by env, dev server auto-started, skip browser testing during initial setup). Apply when the environment check in AGENTS.md indicates Cursor Cloud ($HOME under /root or /home/ubuntu, or a dev-server terminal was auto-started), or when the user mentions Cursor Cloud.
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
If you are in Cursor Cloud, the `environment.json` install step runs
|
|
7
|
+
`init-project.js` and `npm install` automatically, and starts a dev server
|
|
8
|
+
on port 3000.
|
|
9
|
+
|
|
10
|
+
**Verify before starting:** check that `.env` exists and `node_modules/` is
|
|
11
|
+
present. If either is missing, run: `node init-project.js && npm install`
|
|
12
|
+
|
|
13
|
+
**Do NOT** manually run `nvm install` or `nvm use` — Node version is managed
|
|
14
|
+
by the environment.
|
|
15
|
+
|
|
16
|
+
### Initial environment setup only
|
|
17
|
+
|
|
18
|
+
This subsection applies ONLY when first asked to "set up the development
|
|
19
|
+
environment" or "demonstrate that the environment is working." It does
|
|
20
|
+
**NOT** apply to ongoing development — once the app is built, use the
|
|
21
|
+
browser normally to test and verify UI changes.
|
|
22
|
+
|
|
23
|
+
**During initial setup**, skip browser/UI testing. The starter UI is a
|
|
24
|
+
placeholder template that will be replaced by `/build_my_app`. Do not
|
|
25
|
+
launch a browser, record videos, or take screenshots at this stage.
|
|
26
|
+
Verifying `npm run build` passes is sufficient.
|
|
27
|
+
|
|
28
|
+
1. Check the "Dev Server" terminal output for a line containing
|
|
29
|
+
`Listening on` or `Local: http://localhost:3000`. If present, the
|
|
30
|
+
environment is working.
|
|
31
|
+
2. If the dev server is NOT running, start it with `npm run dev` and wait
|
|
32
|
+
for the "Listening on" line.
|
|
33
|
+
3. Run `npm run build` to verify the project compiles.
|
|
34
|
+
4. Once confirmed, tell the user the environment is ready, then
|
|
35
|
+
immediately run the `/build_my_app` command.
|
|
36
|
+
|
|
37
|
+
### MCP tools
|
|
38
|
+
|
|
39
|
+
Lovelace MCP servers (`lovelace-elemental`, `lovelace-stocks`, etc.)
|
|
40
|
+
should be available if configured at the org level. Check your tool list
|
|
41
|
+
for `elemental_*` tools. If they're not available, use the Elemental API
|
|
42
|
+
client (`useElementalClient()`) and the skill docs in
|
|
43
|
+
`.cursor/skills/elemental-api/` and `.cursor/skills/data-model/` for platform data access instead.
|
|
44
|
+
|
|
45
|
+
### Technical details
|
|
46
|
+
|
|
47
|
+
Node 20 is the baseline (`.nvmrc`). The `environment.json` install step
|
|
48
|
+
handles this via `nvm install 20 && nvm alias default 20`. Newer Node
|
|
49
|
+
versions (22, 25) generally work but may produce `EBADENGINE` warnings
|
|
50
|
+
during install — safe to ignore.
|
|
51
|
+
|
|
52
|
+
The install step runs `node init-project.js --local` (creates `.env` if
|
|
53
|
+
absent) then `npm install` (triggers `postinstall` → `nuxt prepare`).
|
|
54
|
+
Auth0 is bypassed via `NUXT_PUBLIC_USER_NAME=dev-user`
|
|
55
|
+
in the generated `.env`.
|
|
56
|
+
|
|
57
|
+
**No automated test suite.** Verification is `npm run build` (compile
|
|
58
|
+
check) and `npm run format:check` (Prettier). See Verification Commands.
|
|
59
|
+
|
|
60
|
+
**Before committing:** always run `npm run format` — the husky pre-commit
|
|
61
|
+
hook runs `lint-staged` with `prettier --check` and will reject
|
|
62
|
+
unformatted files.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: App, agent, and MCP server deployment targets (Vercel, Vertex AI Agent Engine, Cloud Run). Apply when pushing to main, running /deploy_agent or /deploy_mcp, or explaining how code reaches production.
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
### App (Nuxt UI + server routes)
|
|
7
|
+
|
|
8
|
+
Vercel auto-deploys on every push to `main`. Preview deployments are created for
|
|
9
|
+
other branches. The app is available at `{slug}.yottagraph.app`.
|
|
10
|
+
|
|
11
|
+
### Agents (`agents/`)
|
|
12
|
+
|
|
13
|
+
Each subdirectory in `agents/` is a self-contained Python ADK agent. Deploy via
|
|
14
|
+
the Portal UI or `/deploy_agent` in Cursor.
|
|
15
|
+
|
|
16
|
+
### MCP Servers (`mcp-servers/`)
|
|
17
|
+
|
|
18
|
+
Each subdirectory in `mcp-servers/` is a Python FastMCP server. Deploy via
|
|
19
|
+
the Portal UI or `/deploy_mcp` in Cursor.
|
package/rules/env.mdc
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: .env variable reference (APP_ID, USER_NAME, QUERY_SERVER_ADDRESS, etc.). Apply when adding env vars, configuring Auth0 bypass, or inspecting runtime config.
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
| Variable | Purpose | Default |
|
|
7
|
+
| ---------------------------------- | -------------------------------- | --------------------------------------- |
|
|
8
|
+
| `NUXT_PUBLIC_APP_ID` | Unique app identifier | derived from directory name |
|
|
9
|
+
| `NUXT_PUBLIC_APP_NAME` | Display name | derived from directory name |
|
|
10
|
+
| `NUXT_PUBLIC_USER_NAME` | Set to any value to bypass Auth0 | `dev-user` in local mode |
|
|
11
|
+
| `NUXT_PUBLIC_QUERY_SERVER_ADDRESS` | Query Server URL | read from `broadchurch.yaml` if present |
|
|
12
|
+
| `NUXT_PUBLIC_GATEWAY_URL` | Portal Gateway for agent chat | read from `broadchurch.yaml` if present |
|
|
13
|
+
| `NUXT_PUBLIC_TENANT_ORG_ID` | Auth0 org ID for this tenant | read from `broadchurch.yaml` if present |
|
|
14
|
+
|
|
15
|
+
See `.env.example` for the full list.
|
|
@@ -10,32 +10,43 @@ alwaysApply: false
|
|
|
10
10
|
Package-managed files are tracked by `.cursor/.aether-instructions-manifest`.
|
|
11
11
|
They will be **overwritten** when you run `/update_instructions`.
|
|
12
12
|
|
|
13
|
+
This includes files under `.cursor/rules/`, `.cursor/commands/`,
|
|
14
|
+
`.cursor/skills/`, **and the root `AGENTS.md`** (tracked as `root/AGENTS.md`
|
|
15
|
+
in the manifest).
|
|
16
|
+
|
|
13
17
|
## Do Not
|
|
14
18
|
|
|
15
19
|
- Modify files listed in the manifest directly (changes will be lost on update)
|
|
16
20
|
|
|
17
21
|
## To Customize
|
|
18
22
|
|
|
19
|
-
If you need to modify a package-provided rule or
|
|
23
|
+
If you need to modify a package-provided rule, command, or the root `AGENTS.md`:
|
|
20
24
|
|
|
21
25
|
1. **Copy** the file to a new name
|
|
22
26
|
2. Make your changes to the copy
|
|
23
27
|
3. Remove the original's entry from `.cursor/.aether-instructions-manifest`
|
|
24
28
|
so it won't be replaced on update
|
|
25
29
|
|
|
26
|
-
|
|
30
|
+
Examples:
|
|
27
31
|
|
|
28
32
|
```bash
|
|
29
|
-
#
|
|
33
|
+
# Customize a rule
|
|
30
34
|
cp .cursor/rules/data.mdc .cursor/rules/data_custom.mdc
|
|
31
35
|
|
|
36
|
+
# Customize AGENTS.md
|
|
37
|
+
cp AGENTS.md AGENTS.local.md
|
|
38
|
+
# then remove the `root/AGENTS.md` line from
|
|
39
|
+
# .cursor/.aether-instructions-manifest
|
|
40
|
+
|
|
32
41
|
# Edit your copy — it won't be affected by instruction updates
|
|
33
42
|
```
|
|
34
43
|
|
|
35
44
|
## How It Works
|
|
36
45
|
|
|
37
46
|
- `.cursor/.aether-instructions-manifest` lists every file installed by the
|
|
38
|
-
package (one relative path per line, e.g. `rules/data.mdc`)
|
|
47
|
+
package (one relative path per line, e.g. `rules/data.mdc`). Entries
|
|
48
|
+
prefixed with `root/` refer to files at the tenant repo root
|
|
49
|
+
(currently only `root/AGENTS.md`).
|
|
39
50
|
- `/update_instructions` deletes manifest entries, extracts fresh files from
|
|
40
51
|
the latest package, and writes a new manifest
|
|
41
52
|
- Files not in the manifest are never touched
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Manual local dev setup (npm run init --local, npm run dev). Apply when the environment check in AGENTS.md indicates local (non-Cursor-Cloud) and .env or node_modules are missing, or when the user asks how to run the app locally.
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Manual / Local Setup
|
|
7
|
+
|
|
8
|
+
Node 20 is the baseline (pinned in `.nvmrc`). Newer versions generally work.
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm run init -- --local # creates .env with dev defaults (no Auth0)
|
|
12
|
+
npm install # all deps are public on npmjs.com -- no tokens needed
|
|
13
|
+
npm run dev # dev server on port 3000
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
For the full interactive wizard (project name, Auth0, query server, etc.):
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm run init # interactive, or --non-interactive for CI (see --help)
|
|
20
|
+
```
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Storage backends available to the app (KV/Upstash Redis always on; Neon Postgres if provisioned). Apply when choosing persistence, deciding if Postgres is available, or wiring up getRedis()/getDb().
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Two storage services are available. Check `.env` to see which are connected:
|
|
7
|
+
|
|
8
|
+
| Store | How to check | Env var | Utility file | Always available? |
|
|
9
|
+
| ---------------------- | --------------------------------------------------------------------------------- | --------------------------------------- | --------------------------------------------------------- | ----------------------------------- |
|
|
10
|
+
| **KV** (Upstash Redis) | `KV_REST_API_URL` in `.env` | `KV_REST_API_URL`, `KV_REST_API_TOKEN` | `server/utils/redis.ts` (pre-scaffolded) | Yes |
|
|
11
|
+
| **Neon Postgres** | `curl <gateway.url>/api/tenants/<tenant.org_id>` → `vercel.postgres_store_id` set | `DATABASE_URL`, `DATABASE_URL_UNPOOLED` | `server/utils/neon.ts` (create it if missing — see below) | Only if enabled at project creation |
|
|
12
|
+
|
|
13
|
+
### Quick start
|
|
14
|
+
|
|
15
|
+
**KV** is ready to use out of the box. Use `getRedis()` from
|
|
16
|
+
`server/utils/redis.ts` in server routes, or `usePrefsStore()` on the client
|
|
17
|
+
(see `pref` rule for the `Pref<T>` pattern).
|
|
18
|
+
|
|
19
|
+
**Neon Postgres** — provisioning is determined by the portal, not by `.env`.
|
|
20
|
+
To check whether Neon is enabled for this tenant, pull `gateway.url` and
|
|
21
|
+
`tenant.org_id` out of `broadchurch.yaml` and query the portal:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
curl <gateway.url>/api/tenants/<tenant.org_id>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
If the response has `vercel.postgres_store_id` set, Neon is provisioned. The
|
|
28
|
+
`DATABASE_URL` is also present under `agent_secrets` in that response, but
|
|
29
|
+
you usually do not need to read it directly.
|
|
30
|
+
|
|
31
|
+
`DATABASE_URL` and `DATABASE_URL_UNPOOLED` are intentionally left commented
|
|
32
|
+
out in local `.env` — Neon does not work locally. On deploy, Vercel
|
|
33
|
+
auto-injects `DATABASE_URL` at runtime, so pushed builds connect
|
|
34
|
+
transparently.
|
|
35
|
+
|
|
36
|
+
For the `getDb()` lazy-init pattern, `@neondatabase/serverless` install, and
|
|
37
|
+
full code examples (creating tables, handling missing tables in GET routes,
|
|
38
|
+
etc.), see the `server` rule.
|
|
39
|
+
|
|
40
|
+
### Where credentials come from
|
|
41
|
+
|
|
42
|
+
**Deployed builds** (push to `main` → Vercel): storage env vars are
|
|
43
|
+
auto-injected and decrypted at runtime. Storage works with zero
|
|
44
|
+
configuration. **This is the primary development path** — push your code
|
|
45
|
+
and test on the deployed preview/production URL.
|
|
46
|
+
|
|
47
|
+
**Local dev / Cursor Cloud:** storage credentials are not yet available for
|
|
48
|
+
local use. `getRedis()` and `getDb()` will return `null`, and the app should
|
|
49
|
+
handle this gracefully (show a "not configured" state, use defaults, etc.).
|
|
50
|
+
KV preferences fall back to their default values. Postgres features should
|
|
51
|
+
check `getDb()` and show appropriate UI when it returns `null`.
|
|
52
|
+
|
|
53
|
+
This is a known platform limitation — the Broadchurch team is working on
|
|
54
|
+
making storage credentials available for local development.
|
package/rules/aether.mdc
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
alwaysApply: true
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Aether
|
|
6
|
-
|
|
7
|
-
**Stack:** Nuxt 3 (SPA), Vue 3 Composition API (`<script setup>`), Vuetify 3, TypeScript (required), Auth0.
|
|
8
|
-
|
|
9
|
-
**Structure:** `pages/` (file-based routing), `components/`, `composables/`, `server/api/`, `agents/` (Python ADK), `mcp-servers/` (Python FastMCP).
|
|
10
|
-
|
|
11
|
-
**Data:** This app runs on the Lovelace platform -- entities, news, filings, sentiment, relationships, events. See the `data` rule for access patterns and gotchas. Skill docs: `skills/data-model/` (entity types, properties, relationships; `SKILL.md` first), `skills/elemental-mcp-patterns/` (MCP response shapes, property type handling, Python patterns for agent tools). Do NOT call external APIs for data the platform provides.
|
|
12
|
-
|
|
13
|
-
**Storage:** KV (Upstash Redis) for preferences and lightweight state via `Pref<T>` from `usePrefsStore()`. Neon Postgres for relational data if connected (check `.env` for `DATABASE_URL`).
|
|
14
|
-
|
|
15
|
-
**Source of truth:** `DESIGN.md` -- read before starting work, update when changing features. The starter UI is placeholder -- replace freely. Feature docs in `design/` for implementation planning.
|
|
16
|
-
|
|
17
|
-
**Git:** Commit meaningful units of work. Run `npm run format` before commit. Message format: `[Agent commit] {summary}`. Push directly to main — do NOT create PRs or feature branches.
|
|
18
|
-
|
|
19
|
-
**First action for a new project:** Run `/build_my_app`.
|
|
20
|
-
|
|
21
|
-
**Task-specific rules:** `architecture` (project structure, navigation, server routes, agents, MCP), `data` (Elemental API / data access patterns and gotchas), `cookbook` (copy-paste UI patterns), `cookbook-data` (data-fetching recipes), `design` (DESIGN.md workflow, feature docs), `ui` (page templates, layout patterns), `pref` (KV preferences), `branding` (colors, fonts), `server` (Nitro routes, Neon Postgres), `server-data` (server-side Elemental API from routes), `agents` (ADK agents), `agents-data` (agents calling Elemental API), `something-broke` (error recovery, build failures).
|