proteum 2.1.9 → 2.2.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/.codex/environments/environment.toml +11 -0
- package/AGENTS.md +27 -11
- package/README.md +30 -11
- package/agents/project/AGENTS.md +172 -123
- package/agents/project/CODING_STYLE.md +1 -1
- package/agents/project/app-root/AGENTS.md +16 -0
- package/agents/project/client/AGENTS.md +5 -5
- package/agents/project/client/pages/AGENTS.md +13 -13
- package/agents/project/diagnostics.md +19 -10
- package/agents/project/optimizations.md +5 -6
- package/agents/project/root/AGENTS.md +297 -0
- package/agents/project/server/routes/AGENTS.md +2 -2
- package/agents/project/server/services/AGENTS.md +4 -2
- package/agents/project/tests/AGENTS.md +9 -2
- package/cli/app/index.ts +31 -7
- package/cli/commands/configure.ts +226 -0
- package/cli/commands/dev.ts +0 -2
- package/cli/commands/diagnose.ts +33 -1
- package/cli/commands/explain.ts +1 -1
- package/cli/commands/migrate.ts +51 -0
- package/cli/commands/orient.ts +169 -0
- package/cli/commands/perf.ts +8 -1
- package/cli/commands/verify.ts +1003 -49
- package/cli/compiler/artifacts/manifest.ts +4 -4
- package/cli/compiler/artifacts/routing.ts +2 -2
- package/cli/compiler/artifacts/services.ts +12 -3
- package/cli/compiler/client/index.ts +65 -19
- package/cli/compiler/common/files/style.ts +47 -2
- package/cli/compiler/common/generatedRouteModules.ts +31 -38
- package/cli/compiler/common/index.ts +10 -0
- package/cli/compiler/common/proteumManifest.ts +1 -0
- package/cli/compiler/server/index.ts +34 -9
- package/cli/context.ts +6 -1
- package/cli/index.ts +7 -8
- package/cli/migrate/pageContract.ts +516 -0
- package/cli/paths.ts +47 -6
- package/cli/presentation/commands.ts +100 -10
- package/cli/presentation/devSession.ts +4 -6
- package/cli/presentation/help.ts +2 -2
- package/cli/presentation/ink.ts +10 -5
- package/cli/presentation/welcome.ts +2 -4
- package/cli/runtime/commands.ts +94 -1
- package/cli/scaffold/index.ts +2 -2
- package/cli/scaffold/templates.ts +4 -2
- package/cli/utils/agents.ts +273 -58
- package/client/dev/profiler/index.tsx +3 -2
- package/client/router.ts +10 -2
- package/client/services/router/index.tsx +6 -22
- package/common/dev/connect.ts +20 -4
- package/common/dev/console.ts +7 -0
- package/common/dev/contractsDoctor.ts +354 -0
- package/common/dev/diagnostics.ts +10 -7
- package/common/dev/inspection.ts +830 -38
- package/common/dev/performance.ts +19 -5
- package/common/dev/profiler.ts +1 -0
- package/common/dev/proteumManifest.ts +5 -4
- package/common/dev/requestTrace.ts +78 -1
- package/common/env/proteumEnv.ts +10 -3
- package/common/router/contracts.ts +8 -11
- package/common/router/index.ts +2 -2
- package/common/router/pageData.ts +72 -0
- package/common/router/register.ts +10 -46
- package/common/router/response/page.ts +28 -16
- package/docs/assets/unique-domains-chip.png +0 -0
- package/docs/dev-sessions.md +8 -4
- package/docs/diagnostics.md +77 -11
- package/docs/migrate-from-2.1.3.md +388 -0
- package/docs/request-tracing.md +42 -9
- package/package.json +6 -1
- package/scripts/update-codex-agents.ts +2 -2
- package/server/app/container/console/index.ts +11 -1
- package/server/app/container/trace/index.ts +370 -72
- package/server/app/devDiagnostics.ts +1 -1
- package/server/app/index.ts +5 -1
- package/server/services/auth/index.ts +9 -0
- package/server/services/prisma/index.ts +15 -12
- package/server/services/router/http/index.ts +1 -1
- package/server/services/router/index.ts +105 -23
- package/server/services/router/request/api.ts +7 -1
- package/server/services/router/request/index.ts +2 -1
- package/server/services/router/response/index.ts +8 -28
- package/types/global/vendors.d.ts +12 -0
- package/types/vendors.d.ts +12 -0
- package/common/router/pageSetup.ts +0 -51
package/AGENTS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Proteum Core
|
|
2
2
|
|
|
3
|
-
This file governs work in the Proteum framework repository itself. For downstream app rules, use `agents/project/AGENTS.md
|
|
3
|
+
This file governs work in the Proteum framework repository itself. For downstream app rules, use `agents/project/AGENTS.md` for the standalone app-root contract, or split between `agents/project/root/AGENTS.md` and `agents/project/app-root/AGENTS.md` in a monorepo.
|
|
4
4
|
Role: keep only framework-repo instructions here.
|
|
5
5
|
Keep here: core-repo priorities, framework change workflow, reference-app validation, and framework-specific constraints.
|
|
6
6
|
Do not put here: downstream app implementation contracts, area-specific app rules, or repeated content that belongs in `agents/project/**`.
|
|
@@ -19,34 +19,47 @@ After those optimization concerns, preserve explicit, typed, machine-readable co
|
|
|
19
19
|
- Keep `server/index.ts` as the canonical type root for services, router context, request context, and models.
|
|
20
20
|
- Keep generated code deterministic, auditable, and easy to map back to source.
|
|
21
21
|
- Prefer typed traces, perf rollups, and manifest-backed diagnostics over ad hoc logging.
|
|
22
|
+
- For Prisma-backed apps, declare database structure changes in the app's `schema.prisma` only. Never create or edit migration files manually, and never run schema-mutating SQL such as `ALTER TABLE`, `CREATE TABLE`, or `DROP TABLE`.
|
|
22
23
|
- Follow `agents/project/optimizations.md` when choosing packages, helpers, runtimes, plugins, or build infrastructure.
|
|
23
24
|
- Delete obsolete compatibility layers, helper indirection, and unused packages when safe.
|
|
24
25
|
|
|
25
26
|
## Workflow
|
|
26
27
|
|
|
27
28
|
- If the user pastes raw errors without asking for a fix, do not implement changes. List likely causes and, for each one, give probability, why, and how to fix it.
|
|
29
|
+
- If you changed any app `schema.prisma`, do not start testing or validation yet. Ask the user to run the following command in the affected worktree directory, replacing the placeholders, and wait for the user to reply exactly `continue` before resuming validation or tests:
|
|
30
|
+
```
|
|
31
|
+
cd <worktree path>
|
|
32
|
+
npx prisma migrate dev --config ./prisma.config.ts --name <migration name>
|
|
33
|
+
```
|
|
28
34
|
- After implementing a framework feature or change, do not stop at code edits. Boot both reference apps, exercise the affected flow with Playwright or the smallest real Proteum surface, run the relevant `proteum` diagnostics or perf commands, and confirm there is no meaningful regression in runtime behavior, performance, load size, SEO output, or coding-style expectations before finishing.
|
|
29
|
-
- When starting a long-lived reference app dev server for framework work,
|
|
35
|
+
- When starting a long-lived reference app dev server for framework work, always request elevated permissions and run `npx proteum dev` outside the sandbox. Use an explicit thread-scoped session file such as `var/run/proteum/dev/framework-<app>-<task>.json`, inspect tracked sessions plus current listeners first, for example with `npx proteum dev list --json` and `lsof -nP -iTCP -sTCP:LISTEN`, then choose a port that is not currently used before starting `npx proteum dev --session-file <path> --port <port>`. After the server is ready, print the live server URL as a clickable Markdown link such as `[http://localhost:3100](http://localhost:3100)`.
|
|
36
|
+
- Do not use `--replace-existing` unless you are restarting the exact session file started by the current thread/task. Never replace another live session that belongs to a user, another thread, or an unknown owner.
|
|
37
|
+
- When a reference app uses local `file:` connected projects for the affected flow, boot every connected producer app as well, each on its own free port and thread-scoped session file, and run every one of those `proteum dev` processes with elevated permissions outside the sandbox before starting or validating the consumer app.
|
|
30
38
|
- Before retrying a boot on the same app, changing ports, or finishing the task, stop every framework-started dev session with `npx proteum dev stop --session-file <path>` or `npx proteum dev stop --all --stale`.
|
|
31
39
|
- If the task changed the dev workflow itself, verify the final cleanup path with `npx proteum dev list --json` before finishing.
|
|
32
|
-
- When you have finished your work, summarize in one top-level short (up to 100 characters) sentence the changes you made since the beginning of the conversation. Strictly use the Conventional Commits specification:
|
|
33
|
-
```
|
|
34
|
-
Commit message: <type>[optional scope]: <description>
|
|
40
|
+
- When you have finished your work, summarize in one top-level short (up to 100 characters) sentence ALL the changes you made since the beginning of the WHOLE conversation. Strictly use the Conventional Commits specification:
|
|
41
|
+
```
|
|
42
|
+
Commit message: <type>[optional scope]: <description>
|
|
35
43
|
|
|
36
|
-
[optional body]
|
|
37
|
-
```
|
|
44
|
+
[optional body]
|
|
45
|
+
```
|
|
46
|
+
If the user replies exactly `commit`, use that Conventional Commit message, stage the task-related changed files with `git add` while avoiding unrelated user changes or incidental untracked files, then create the commit by running `git commit`.
|
|
47
|
+
After providing a commit message or after creating a commit, immediately follow it with this exact prompt and obey it:
|
|
48
|
+
`Explain in short minimalistic and few bullet points what we changed in this thread, like you would do to your grandma. Start with a verb in the past.`
|
|
38
49
|
|
|
39
50
|
## Core Changes
|
|
40
51
|
|
|
41
52
|
- Validate framework changes against the reference apps:
|
|
42
53
|
- `/Users/gaetan/Desktop/Projets/crosspath/platform`: Standalone app
|
|
54
|
+
- `/Users/gaetan/Desktop/Projets/crosspath/website`: Standalone app
|
|
43
55
|
- `/Users/gaetan/Desktop/Projets/unique.domains/platform`: Monorepo including the following apps:
|
|
44
56
|
- `/Users/gaetan/Desktop/Projets/unique.domains/platform/apps/product`
|
|
45
57
|
- `/Users/gaetan/Desktop/Projets/unique.domains/platform/apps/website`
|
|
46
58
|
- Inspect how both apps currently use the touched feature, runtime, API, compiler behavior, or generated output before proposing or implementing changes.
|
|
47
|
-
- Keep the developer-facing contract synchronized when framework work changes CLI commands, profiler capabilities, or the `proteum dev` banner. Update the live surfaces together in the same pass: CLI command/help definitions, profiler panels and dev-only endpoints, banner text/examples, and the most relevant agent docs that describe them, especially `AGENTS.md`, `agents/project/AGENTS.md`, `agents/project/diagnostics.md`, and any narrower `agents/project/**/AGENTS.md` file that mentions the changed workflow.
|
|
48
|
-
-
|
|
49
|
-
-
|
|
59
|
+
- Keep the developer-facing contract synchronized when framework work changes CLI commands, profiler capabilities, or the `proteum dev` banner. Update the live surfaces together in the same pass: CLI command/help definitions, profiler panels and dev-only endpoints, banner text/examples, and the most relevant agent docs that describe them, especially `AGENTS.md`, `agents/project/AGENTS.md`, `agents/project/root/AGENTS.md`, `agents/project/app-root/AGENTS.md`, `agents/project/diagnostics.md`, and any narrower `agents/project/**/AGENTS.md` file that mentions the changed workflow.
|
|
60
|
+
- Keep the same-system trace contract explicit when request instrumentation changes: `TRACE_*` controls the retained dev trace store plus the trace/perf CLI, dev-only HTTP endpoints, and bottom profiler, while `ENABLE_PROFILER` enables the reduced request-local `request.profiling` snapshot and `request.finished` hook payload without retaining finished requests globally unless dev trace is also enabled.
|
|
61
|
+
- Current CLI banner contract: only the bare `proteum build` and bare `proteum dev` commands print the welcome banner and include the active Proteum installation method. Any extra argument or option skips the banner. Only `proteum dev` clears the interactive terminal before rendering, exposes `CTRL+R` reload plus `CTRL+C` shutdown hotkeys in its session UI, and reports connected app names plus successful connected `/ping` checks in the ready banner.
|
|
62
|
+
- Keep core changes aligned with the explicit controller/page architecture in `agents/project/root/AGENTS.md` and its standalone composition in `agents/project/AGENTS.md`.
|
|
50
63
|
- Prefer removing framework magic when the same result can be expressed with explicit contracts, generated code, or typed context.
|
|
51
64
|
- Apply the pruning rules from `agents/project/optimizations.md`, especially for webpack plugins, Babel plugins, aliases, helpers, runtime services, and npm packages that are not meaningfully used by both apps.
|
|
52
65
|
- Remove dead docs, flags, helper files, and compatibility branches in the same pass when safe.
|
|
@@ -64,13 +77,16 @@ Commit message: <type>[optional scope]: <description>
|
|
|
64
77
|
|
|
65
78
|
Do not stop at static analysis for routing, controllers, generated code, SSR, client runtime, services, webpack, Babel, or emitted assets.
|
|
66
79
|
|
|
67
|
-
- Run `npx proteum dev --no-cache --
|
|
80
|
+
- Run `npx proteum dev --no-cache --session-file var/run/proteum/dev/framework-<app>.json --port <free-3xxx-port>` in both reference apps on explicit free ports and with elevated permissions outside the sandbox.
|
|
81
|
+
- If either reference app uses local `file:` connected projects for the affected flow, run those producer apps too on their own free ports before exercising the consumer.
|
|
68
82
|
- When validating a concrete route, controller path, or failing page on a running dev server, prefer `proteum diagnose <path> --port <port>` first. Use raw `proteum trace ...` output when you need lower-level event detail beyond the diagnose summary.
|
|
69
83
|
- When the issue is latency, CPU, SQL cost, render cost, or memory drift, inspect `proteum perf top`, `proteum perf request`, `proteum perf compare`, or `proteum perf memory` against the running dev server before adding custom instrumentation.
|
|
70
84
|
- When a framework change can affect shipped client code size, run `proteum build --prod --analyze` for static bundle artifacts or `proteum build --prod --analyze --analyze-serve --analyze-port auto` when you need a local analyzer URL.
|
|
71
85
|
- For protected browser or API flows in dev, prefer `npx proteum session <email> --role <role>` to mint a dev auth cookie instead of automating the login UI. Use the login UI only when login itself is the feature under test.
|
|
86
|
+
- When a task needs browser execution instead of the higher-level verifier, prefer `npx proteum verify browser <path>` or direct Playwright with a disposable profile. Keep auth sourced from `npx proteum session`, not UI login or shared browser state.
|
|
72
87
|
- For request-time behavior, arm traces with `proteum trace arm --capture deep`, reproduce once, then inspect `proteum trace latest` or `proteum trace show <requestId>`.
|
|
73
88
|
- When the framework-facing workflow itself changed, verify the CLI surface too with `proteum verify framework-change --crosspath-port <port> --product-port <port> --website-port <port>`.
|
|
89
|
+
- Only the final verifier agent should usually run browser flows. Other agents should stay on `orient`, `verify owner`, `verify request`, and command-level checks unless browser execution is the only trustworthy surface.
|
|
74
90
|
- Open the real pages with Playwright.
|
|
75
91
|
- Inspect browser console errors and warnings.
|
|
76
92
|
- Inspect server startup and runtime errors.
|
package/README.md
CHANGED
|
@@ -4,6 +4,14 @@ Proteum is an LLM-first SSR / SEO / TypeScript framework for full-stack web appl
|
|
|
4
4
|
|
|
5
5
|
It is built for teams that want explicit server contracts, server-first rendering, deterministic generated artifacts, and a codebase that an AI agent can inspect without reverse-engineering hidden runtime magic.
|
|
6
6
|
|
|
7
|
+
Migration guide for older apps: [docs/migrate-from-2.1.3.md](docs/migrate-from-2.1.3.md)
|
|
8
|
+
|
|
9
|
+
## Sponsor
|
|
10
|
+
|
|
11
|
+
Proteum is sponsored by [Unique Domains](https://unique.domains/?utm_source=github&utm_medium=referral&utm_campaign=repo_proteum&utm_content=top_sponsor).
|
|
12
|
+
|
|
13
|
+
[](https://unique.domains/?utm_source=github&utm_medium=referral&utm_campaign=repo_proteum&utm_content=top_sponsor)
|
|
14
|
+
|
|
7
15
|
## Why Proteum
|
|
8
16
|
|
|
9
17
|
Most full-stack frameworks optimize first for human convenience.
|
|
@@ -24,7 +32,7 @@ Proteum combines:
|
|
|
24
32
|
|
|
25
33
|
## Core Principles
|
|
26
34
|
|
|
27
|
-
- **Server-first by default.** Put data loading in the page
|
|
35
|
+
- **Server-first by default.** Put data loading in the page data function and keep client code focused on UI.
|
|
28
36
|
- **Explicit request entrypoints.** Controllers are classes. Request access is explicit through `this.request`.
|
|
29
37
|
- **Local validation.** Validate handler input inside the handler with `this.input(schema)`.
|
|
30
38
|
- **Deterministic generation.** Proteum owns `.proteum/` and regenerates it from source.
|
|
@@ -69,7 +77,7 @@ Important files:
|
|
|
69
77
|
- `process.env` / optional `.env`: `PORT`, `ENV_*`, `URL`, `URL_INTERNAL`, any app-chosen variables referenced by `proteum.config.ts`, and `TRACE_*` environment variables loaded by the app
|
|
70
78
|
- `server/config/*.ts`: plain typed config exports consumed by the explicit app bootstrap
|
|
71
79
|
- `server/index.ts`: default-exported `Application` subclass that instantiates root services and router plugins
|
|
72
|
-
- `client/pages/**`: SSR page entrypoints registered through `Router.page(
|
|
80
|
+
- `client/pages/**`: SSR page entrypoints registered through `Router.page(path, options, data, render)`
|
|
73
81
|
- `server/controllers/**`: request handlers that extend `Controller`
|
|
74
82
|
- `commands/**`: dev-only internal commands that extend `Commands`
|
|
75
83
|
- `server/services/**`: business logic that extends `Service`
|
|
@@ -99,6 +107,7 @@ Optional trace env vars:
|
|
|
99
107
|
- `TRACE_EVENTS_LIMIT`
|
|
100
108
|
- `TRACE_CAPTURE`
|
|
101
109
|
- `TRACE_PERSIST_ON_ERROR`
|
|
110
|
+
- `ENABLE_PROFILER`
|
|
102
111
|
|
|
103
112
|
Optional `proteum.config.ts` fields:
|
|
104
113
|
|
|
@@ -192,9 +201,11 @@ import Router from '@/client/router';
|
|
|
192
201
|
|
|
193
202
|
Router.page(
|
|
194
203
|
'/',
|
|
204
|
+
{
|
|
205
|
+
auth: false,
|
|
206
|
+
layout: false,
|
|
207
|
+
},
|
|
195
208
|
({ Plans, Stats }) => ({
|
|
196
|
-
_auth: false,
|
|
197
|
-
_layout: false,
|
|
198
209
|
plans: Plans.getPlans(),
|
|
199
210
|
stats: Stats.general(),
|
|
200
211
|
}),
|
|
@@ -207,9 +218,10 @@ Router.page(
|
|
|
207
218
|
What happens here:
|
|
208
219
|
|
|
209
220
|
- the first argument is the route path
|
|
210
|
-
- the
|
|
211
|
-
-
|
|
212
|
-
-
|
|
221
|
+
- the second argument is the explicit route-options object
|
|
222
|
+
- the third argument is the page data function or `null`
|
|
223
|
+
- route behavior such as `auth`, `layout`, `static`, or `redirectLogged` lives in the options object
|
|
224
|
+
- every key returned from the data function becomes page data
|
|
213
225
|
- the renderer receives the resolved data and the generated controller/service context
|
|
214
226
|
|
|
215
227
|
## Example: Controller
|
|
@@ -334,6 +346,7 @@ Proteum ships with a compact CLI focused on the real app lifecycle:
|
|
|
334
346
|
| `proteum session` | Mint a dev-only auth session token and Playwright-ready cookie payload |
|
|
335
347
|
| `proteum verify` | Validate framework-facing workflows across one or more running dev apps; `framework-change` is the built-in cross-reference-app check |
|
|
336
348
|
| `proteum init` | Scaffold a new Proteum app with built-in deterministic templates |
|
|
349
|
+
| `proteum configure agents` | Interactively configure Proteum-managed instruction symlinks and confirm overwrites for standalone or monorepo apps |
|
|
337
350
|
| `proteum create` | Scaffold a page, controller, command, route, or root service inside an app |
|
|
338
351
|
|
|
339
352
|
Recommended daily workflow:
|
|
@@ -347,7 +360,7 @@ proteum build --prod --analyze
|
|
|
347
360
|
proteum build --prod --analyze --analyze-serve --analyze-port auto
|
|
348
361
|
```
|
|
349
362
|
|
|
350
|
-
|
|
363
|
+
Only the bare `proteum build` and bare `proteum dev` commands print the welcome banner and include the active Proteum installation method. Any extra argument or option skips the banner. `proteum dev` is the only command that clears the interactive terminal before rendering its live session UI, exposes `CTRL+R` reload plus `CTRL+C` shutdown hotkeys, and prints connected app names plus successful connected `/ping` checks in the server-ready banner.
|
|
351
364
|
|
|
352
365
|
Useful inspection commands:
|
|
353
366
|
|
|
@@ -383,11 +396,14 @@ Useful scaffolding commands:
|
|
|
383
396
|
```bash
|
|
384
397
|
proteum init my-app --name "My App"
|
|
385
398
|
proteum init my-app --name "My App" --dry-run --json
|
|
399
|
+
proteum configure agents
|
|
386
400
|
proteum create page marketing/faq --route /faq
|
|
387
401
|
proteum create controller Founder/projects --method list
|
|
388
402
|
proteum create service Conversion/Plans
|
|
389
403
|
```
|
|
390
404
|
|
|
405
|
+
`proteum configure agents` asks before replacing any existing non-managed instruction file or foreign symlink. If you decline, that path is left untouched.
|
|
406
|
+
|
|
391
407
|
`proteum connect`, `proteum explain`, `proteum doctor`, and `proteum diagnose` share the same generated manifest and contract state. `proteum perf` uses the same dev request-trace store as the profiler `Perf` tab. For the full diagnostics and tracing model, see [docs/diagnostics.md](docs/diagnostics.md) and [docs/request-tracing.md](docs/request-tracing.md).
|
|
392
408
|
|
|
393
409
|
## Dev Commands
|
|
@@ -455,6 +471,7 @@ Default behavior:
|
|
|
455
471
|
- payloads are summarized, long strings are truncated, and sensitive fields such as cookies, passwords, and tokens are redacted
|
|
456
472
|
- `TRACE_PERSIST_ON_ERROR` can export crashing requests under `var/traces/`
|
|
457
473
|
- `proteum dev` removes auto-persisted crash traces from `var/traces/` when the dev session stops
|
|
474
|
+
- `ENABLE_PROFILER=true` reuses the same instrumentation path to populate `request.profiling` and the router `request.finished` hook with a reduced request/API/SQL snapshot in any environment, without retaining finished requests in the global trace buffer unless dev trace is also enabled
|
|
458
475
|
|
|
459
476
|
Trace env example:
|
|
460
477
|
|
|
@@ -464,6 +481,7 @@ export TRACE_REQUESTS_LIMIT=200
|
|
|
464
481
|
export TRACE_EVENTS_LIMIT=800
|
|
465
482
|
export TRACE_CAPTURE=resolve
|
|
466
483
|
export TRACE_PERSIST_ON_ERROR=true
|
|
484
|
+
export ENABLE_PROFILER=true
|
|
467
485
|
```
|
|
468
486
|
|
|
469
487
|
Capture modes:
|
|
@@ -491,7 +509,7 @@ Proteum answers those questions with explicit artifacts:
|
|
|
491
509
|
|
|
492
510
|
- `identity.config.ts` for app identity
|
|
493
511
|
- `proteum.config.ts` for compiler and connected-project setup
|
|
494
|
-
- `PORT`, `ENV_*`, `URL`, `URL_INTERNAL`, app-chosen connected-project config values, and `
|
|
512
|
+
- `PORT`, `ENV_*`, `URL`, `URL_INTERNAL`, app-chosen connected-project config values, `TRACE_*`, and `ENABLE_PROFILER` env vars for the environment surface
|
|
495
513
|
- `server/index.ts` for the explicit root service graph
|
|
496
514
|
- `.proteum/manifest.json` for machine-readable app structure
|
|
497
515
|
- `proteum explain --json` for structured framework introspection
|
|
@@ -507,12 +525,12 @@ Proteum answers those questions with explicit artifacts:
|
|
|
507
525
|
If you are an LLM or automation agent, start here:
|
|
508
526
|
|
|
509
527
|
1. Read `identity.config.ts` and `proteum.config.ts`.
|
|
510
|
-
2. Read `PORT`, the relevant `ENV_*`, `URL`, `URL_INTERNAL`, any env values referenced by `proteum.config.ts`,
|
|
528
|
+
2. Read `PORT`, the relevant `ENV_*`, `URL`, `URL_INTERNAL`, any env values referenced by `proteum.config.ts`, plus `TRACE_*` and `ENABLE_PROFILER`, or run `proteum explain env`.
|
|
511
529
|
3. Inspect `server/index.ts` and `server/config/*.ts` for the explicit app bootstrap.
|
|
512
530
|
4. Read `.proteum/manifest.json` or run `proteum explain --json`.
|
|
513
531
|
5. Inspect `server/controllers/**` for request entrypoints.
|
|
514
532
|
6. Inspect `server/services/**` for business logic.
|
|
515
|
-
7. Inspect `client/pages/**` for SSR routes and page
|
|
533
|
+
7. Inspect `client/pages/**` for SSR routes and page data contracts.
|
|
516
534
|
8. If the task touches a protected route or controller in dev and login UX is not the feature under test, use `proteum session <email> --role <role>` before Playwright or direct HTTP calls.
|
|
517
535
|
|
|
518
536
|
For implementation rules in a real Proteum app, treat the local `AGENTS.md` files plus `proteum explain`, `proteum doctor`, `proteum diagnose`, `proteum perf`, and `proteum trace` as the task contract. This README is the framework overview, not the project-local instruction layer.
|
|
@@ -576,6 +594,7 @@ Then use the normal workflow:
|
|
|
576
594
|
|
|
577
595
|
```bash
|
|
578
596
|
npm install
|
|
597
|
+
npx proteum configure agents
|
|
579
598
|
npx proteum dev
|
|
580
599
|
npx proteum check
|
|
581
600
|
npx proteum build --prod
|