Copy an existing module’s structure into a new one

A commenter used Cursor to scaffold a second module, but it missed the pattern because it did not load the source module’s files.

Done with Cursor· Intermediate

What they did
They first set up the project foundation by hand, then asked Cursor to build a new module based on an already-existing one. The reference pattern was spread across 4–5 files, but Cursor did not pull that context in and failed to follow the structure closely enough.
How it went
The agent could not produce a matching scaffold from the original module’s layout. The commenter said it acted as if it was too lazy to read the needed files, and replies agreed that less context led to worse, more error-prone output.
Tips
When a pattern lives across several files, make the agent inspect them before it writes anything. If the task could affect code structure, ask it to summarize the conventions first and wait for your approval.

Try it yourself with Cursor

Inspect [existing module path] in [repo name] before creating anything new. Open every file that belongs to that module, summarize its folder layout, file roles, naming style, and repeated patterns, then pause and ask me to confirm your understanding. After I approve, create [new module name] in the same style. When the scaffold is complete, compare it against the original and tell me whether the structure, exports, and file naming match. Do not send, submit, delete, or overwrite anything without asking first.

Fill in the [brackets]. Agents can make mistakes, so review anything before it is sent, paid or deleted.

Get 3 agent uses like this every morning

With the day's top AI news. Free, and one click to unsubscribe.