Skip to content

Commit 702a277

Browse files
committed
docs(getting-started): the agent wires new files by barrel export, not by stack keys
Build with Claude Code said the agent wires the action, view and app through `actions:` / `views:` / `apps:` arrays in defineStack(). On the wired starter those keys already read the barrels through exportsOf(), so a second key duplicates it (tsc TS1117) and replaces the barrel's wiring (a later `os g view` reports Not wired). The page now says each file is exported from its directory's index.ts, which is the whole wiring. Claude-Session: https://claude.ai/code/session_01UYBdGBzWSrAMzpW8ah3GbP Co-authored-by: Claude <noreply@anthropic.com>
1 parent df0c0c8 commit 702a277

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

‎content/docs/getting-started/build-with-claude-code.mdx‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,16 @@ export const SupportApp = defineApp({
223223
});
224224
```
225225

226-
The agent also **wires the new files into `objectstack.config.ts`** — the object
227-
through the `src/objects/index.ts` barrel, and the action, view and app via the
228-
`actions:` / `views:` / `apps:` arrays in `defineStack()`. There is no
229-
filename-suffix magic: metadata exists in the app only if the config imports it,
230-
so if a freshly-authored action doesn't show up, the wiring is the first thing to
231-
check.
226+
The agent also **exports each new file from its directory's barrel** — the object
227+
from `src/objects/index.ts`, and the action, view and app from
228+
`src/actions/index.ts`, `src/views/index.ts` and `src/apps/index.ts`. The
229+
starter's `objectstack.config.ts` already hands every barrel to `defineStack()`
230+
through `exportsOf()`, so that export line is the whole wiring and the config is
231+
not edited; adding an `actions:` / `views:` / `apps:` key for the file instead
232+
would duplicate the key and replace that barrel's wiring. There is no
233+
filename-suffix magic: metadata exists in the app only if its barrel exports it,
234+
so if a freshly-authored action doesn't show up, its export line is the first
235+
thing to check.
232236

233237
What it does **not** touch is the starter `note` object the `blank` template
234238
scaffolded in step 1 (`src/objects/note.object.ts`, two fields). Nothing asked

0 commit comments

Comments
 (0)