Skip to content

Commit 082fe4b

Browse files
committed
Make the brownfield attach-web path explicit in docs
The attach-web workflow was implemented, but first-contact docs still described brownfield adoption conceptually instead of leading with the shipped CLI path. README, CLI docs, and the bring-your-own-web-app guides now start from 'fulora attach web', show the canonical attach->dev->package sequence, and explain that bridge drift is fixed explicitly with 'fulora generate types' rather than hidden auto-repair. The implementation plan document is also updated to reflect the actual status of the slice so future work does not have to infer completion from code archaeology. Docs governance now enforces the brownfield wording so this path stays aligned with the shipped CLI. Constraint: The approved DX slice explicitly avoided introducing doctor-style automation or hidden auto-fix behavior Rejected: Leave the docs as conceptual architecture guidance only | users would still miss the shipped attach-web entry point Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep brownfield docs anchored on the explicit attach->dev->package flow unless the CLI path changes first Tested: dotnet test tests/Agibuild.Fulora.Docs.UnitTests/Agibuild.Fulora.Docs.UnitTests.csproj Tested: dotnet test tests/Agibuild.Fulora.Governance.UnitTests/Agibuild.Fulora.Governance.UnitTests.csproj --filter AutomationLaneGovernanceTests Tested: dotnet tool restore && dotnet docfx docs/docfx.json Tested: git diff --check Not-tested: Broader project test suite beyond docs/governance surfaces (docs-only change)
1 parent f81418c commit 082fe4b

6 files changed

Lines changed: 236 additions & 37 deletions

File tree

README.md

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,40 @@ Go deeper with [Getting Started](docs/articles/getting-started.md), the [Documen
3232

3333
You do not need to rebuild your frontend to adopt Fulora.
3434

35-
The recommended path is:
35+
The canonical brownfield path is:
36+
37+
```text
38+
attach web -> dev -> package
39+
```
40+
41+
In practice, start by wiring the existing frontend into a Fulora workspace:
42+
43+
```bash
44+
fulora attach web \
45+
--web ./app/web \
46+
--desktop ./app/desktop \
47+
--bridge ./app/bridge \
48+
--framework react \
49+
--web-command "npm run dev" \
50+
--dev-server-url http://localhost:5173
51+
```
52+
53+
Then use the saved `fulora.json` wiring for the normal loop:
54+
55+
```bash
56+
fulora dev --preflight-only
57+
fulora package --profile desktop-public --preflight-only
58+
```
59+
60+
The recommended flow is:
3661

3762
1. keep your existing React/Vue/Next-style web app
38-
2. point Fulora at your dev server during development
39-
3. switch to embedded or packaged static assets in production
40-
4. add native capabilities gradually through typed app services
63+
2. run `fulora attach web` once to scaffold Fulora-owned files and persist `fulora.json`
64+
3. point Fulora at your dev server during development
65+
4. switch to embedded or packaged static assets in production
66+
5. add native capabilities gradually through typed app services
67+
68+
If bridge artifacts drift, fix them explicitly with `fulora generate types`; the preflight commands report drift instead of silently auto-fixing files behind your back.
4169

4270
In development, that usually looks like:
4371

docs/articles/bring-your-own-web-app-quickstart.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,31 @@
22

33
If you already have a React, Vue, or similar web application, you can adopt Fulora without rewriting your frontend.
44

5-
The recommended path is:
5+
The recommended brownfield path is:
6+
7+
```text
8+
attach web -> dev -> package
9+
```
10+
11+
Start by wiring your existing frontend into a Fulora workspace:
12+
13+
```bash
14+
fulora attach web \
15+
--web ./app/web \
16+
--desktop ./app/desktop \
17+
--bridge ./app/bridge \
18+
--framework react \
19+
--web-command "npm run dev" \
20+
--dev-server-url http://localhost:5173
21+
```
22+
23+
This creates Fulora-owned wiring, writes `fulora.json`, and leaves the existing web app structure intact.
624

725
1. keep your existing web project
8-
2. add a lightweight Avalonia + Fulora desktop host
9-
3. connect the host to your web dev server in development
10-
4. add native capabilities gradually through typed services
26+
2. run `fulora attach web` once
27+
3. add a lightweight Avalonia + Fulora desktop host
28+
4. connect the host to your web dev server in development
29+
5. add native capabilities gradually through typed services
1130

1231
## Development model
1332

@@ -79,11 +98,14 @@ const profile = await services.userProfile.get();
7998
## Useful commands
8099

81100
```bash
101+
fulora attach web --web ./app/web --framework react
82102
fulora dev --preflight-only
83103
fulora package --profile desktop-public --preflight-only
84104
fulora generate types --project ./app/bridge/MyProduct.Bridge.csproj
85105
```
86106

107+
If bridge artifacts are missing or stale, run `fulora generate types` explicitly. Fulora preflight checks report drift instead of silently rewriting files.
108+
87109
## Next step
88110

89111
For the full recommended structure, integration steps, and troubleshooting guidance, see the full guide:

docs/articles/bring-your-own-web-app.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,26 @@ If you already have a React, Vue, or similar web application, you do not need to
66

77
This guide explains the recommended architecture, development flow, and best practices for that adoption path.
88

9+
The canonical brownfield path is:
10+
11+
```text
12+
attach web -> dev -> package
13+
```
14+
15+
Start by wiring the existing frontend into Fulora explicitly:
16+
17+
```bash
18+
fulora attach web \
19+
--web ./app/web \
20+
--desktop ./app/desktop \
21+
--bridge ./app/bridge \
22+
--framework react \
23+
--web-command "npm run dev" \
24+
--dev-server-url http://localhost:5173
25+
```
26+
27+
This scaffolds the Fulora-owned desktop + bridge wiring, creates `fulora.json`, and keeps your existing frontend business code intact.
28+
929
## When to use this approach
1030

1131
This guide is for teams that:
@@ -25,6 +45,24 @@ Typical fits include:
2545

2646
If you are starting from scratch, use the standard Fulora template path first. If you already have a product, this “bring your own web app” path is usually the better starting point.
2747

48+
## Brownfield workflow at a glance
49+
50+
Use the commands in this order:
51+
52+
```bash
53+
fulora attach web --web ./app/web --framework react
54+
fulora dev --preflight-only
55+
fulora package --profile desktop-public --preflight-only
56+
```
57+
58+
If bridge artifacts drift, regenerate them explicitly:
59+
60+
```bash
61+
fulora generate types --project ./app/bridge/MyProduct.Bridge.csproj
62+
```
63+
64+
Fulora reports drift in preflight output instead of silently auto-fixing generated files during `dev` or `package`.
65+
2866
## Fulora’s role in an existing web app architecture
2967

3068
When adopting Fulora in an existing product, the best mental model is:

docs/cli.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,34 @@ fulora new MyApp --frontend vue --shell-preset app-shell
2626
| `--frontend`, `-f` | **Required.** `react`, `vue`, or `vanilla` |
2727
| `--shell-preset` | Desktop shell preset: `baseline` or `app-shell` |
2828

29+
### `fulora attach web`
30+
31+
Attach an existing web app to a Fulora desktop host without rewriting the frontend first.
32+
33+
```bash
34+
fulora attach web --web ./app/web --desktop ./app/desktop --bridge ./app/bridge --framework react
35+
fulora attach web --web ./app/web --framework vue --web-command "npm run dev" --dev-server-url http://localhost:5173
36+
```
37+
38+
This is the canonical brownfield path:
39+
40+
```text
41+
attach web -> dev -> package
42+
```
43+
44+
The command creates Fulora-owned wiring, writes `fulora.json`, and leaves your existing frontend business code intact.
45+
46+
| Option | Description |
47+
|---|---|
48+
| `--web` | **Required.** Existing web project directory containing `package.json` |
49+
| `--desktop` | Desktop project directory to create/reuse |
50+
| `--bridge` | Bridge project directory to create/reuse |
51+
| `--framework` | `react`, `vue`, or `generic` |
52+
| `--web-command` | Existing frontend dev command to echo in next steps |
53+
| `--dev-server-url` | Existing frontend dev server URL such as `http://localhost:5173` |
54+
55+
`fulora attach web` establishes the structure once. If generated bridge artifacts later drift, regenerate them explicitly with `fulora generate types`; Fulora reports drift in preflight checks instead of silently auto-fixing generated files.
56+
2957
### `fulora dev`
3058

3159
Start the Vite dev server and Avalonia desktop app together. Run from the solution root.
@@ -47,6 +75,8 @@ Press **Ctrl+C** to stop both processes.
4775

4876
Use `--preflight-only` when you want to validate bridge artifact consistency and project wiring without launching Vite or the desktop host.
4977

78+
When `fulora.json` is present, `fulora dev` reuses the attached brownfield workspace configuration before falling back to heuristics.
79+
5080
### `fulora package`
5181

5282
Package your app for distribution. The recommended first path is to start with a named profile.
@@ -86,6 +116,8 @@ The command now emits **preflight notes** before packaging when the selected pro
86116

87117
Use `--preflight-only` when you want those checks without triggering `dotnet publish` or `vpk`.
88118

119+
When `fulora.json` is present, `fulora package` reuses the configured desktop project before falling back to heuristics.
120+
89121
## Advanced Workflows
90122

91123
Use these commands after the main path is already working.
@@ -111,6 +143,8 @@ fulora gen types --project ./MyApp.Bridge/MyApp.Bridge.csproj --output ./MyApp.W
111143

112144
The generated `bridge.manifest.json` records the bridge project identity, artifact directory, build configuration, target framework, bridge assembly hash, and artifact hashes so `fulora dev` and `fulora package` can detect missing or stale generated outputs without relying only on timestamps.
113145

146+
Use this command explicitly when bridge artifacts drift. Fulora surfaces the mismatch in preflight output; it does not silently auto-fix generated files during `dev` or `package`.
147+
114148
### `fulora add service <name>`
115149

116150
Scaffold a new bridge service with three files:

0 commit comments

Comments
 (0)