Uploaded September 2026 | Updated November 2026, 3 days ago
In this coding session, I’m cleaning up Tsugi by merging the old `setup` controller into the `settings` controller.
The goal sounds simple: `/settings` should handle site-wide settings, while `/courses/42/settings` should handle course-specific settings. When we’re finished, `setup.php` should disappear completely.
But the interesting part of this session isn’t really the controller refactor.
I initially kept working in a very long Cursor conversation because I assumed Cursor would benefit from remembering all the code it had just written. Instead, the conversation contained old code, obsolete assumptions, and too much accumulated context. Cursor started heading in the wrong direction.
So I stopped it, reset the code, opened a completely new conversation, and gave it the same architectural goal.
And suddenly everything went much better.
That led to an important lesson for AI-assisted development: after a major refactor, it may be better to commit the working code and start a fresh AI conversation rather than carrying a huge history full of now-obsolete information.
Once the context was clean, Cursor successfully merged the controllers, removed `setup.php`, extracted reusable routing logic, ran the tests, and produced the course-specific settings URL I was looking for.
I also send the resulting pull request through CodeRabbit for another round of AI code review.
Along the way I talk about managing long Cursor conversations, LLM context summarization, refactoring controller routing, global versus course-specific URLs, reusable routing helpers, automated testing, CodeRabbit reviews, and why the human developer still provides the architecture.
The emerging workflow feels increasingly clear: my job is to figure out the architecture and strategy, communicate that clearly to the LLM, and then use multiple AI tools to help implement and review it.
In this coding session, I’m cleaning up Tsugi by merging the old `setup` controller into the `settings` controller.
The goal sounds simple: `/settings` should handle site-wide settings, while `/courses/42/settings` should handle course-specific settings. When we’re finished, `setup.php` should disappear completely.
But the interesting part of this session isn’t really the controller refactor.
I initially kept working in a very long Cursor conversation because I assumed Cursor would benefit from remembering all the code it had just written. Instead, the conversation contained old code, obsolete assumptions, and too much accumulated context. Cursor started heading in the wrong direction.
So I stopped it, reset the code, opened a completely new conversation, and gave it the same architectural goal.
And suddenly everything went much better.
That led to an important lesson for AI-assisted development: after a major refactor, it may be better to commit the working code and start a fresh AI conversation rather than carrying a huge history full of now-obsolete information.
Once the context was clean, Cursor successfully merged the controllers, removed `setup.php`, extracted reusable routing logic, ran the tests, and produced the course-specific settings URL I was looking for.
I also send the resulting pull request through CodeRabbit for another round of AI code review.
Along the way I talk about managing long Cursor conversations, LLM context summarization, refactoring controller routing, global versus course-specific URLs, reusable routing helpers, automated testing, CodeRabbit reviews, and why the human developer still provides the architecture.
The emerging workflow feels increasingly clear: my job is to figure out the architecture and strategy, communicate that clearly to the LLM, and then use multiple AI tools to help implement and review it.










