To build a robust piece of deep-functionality software (like an MS Word clone) with an LLM, you have to start from the underlying architectural decisions, particularly how data is structured and how it flows through the system.

If you have an LLM or human just start coding up something without nailing down those decisions first, then he/she/it will implicitly make those decisions arbitrarily in the moment (usually based more on pattern-matching than real weighing of alternatives) and the result will be a massive mess.

Ideally for an LLM, you'd hand-write a highly detailed DESIGN.md file to encode those decisions and a suite of test fixtures to enforce them.