I’ve been experimenting with AI agents (Claude Code, etc.). I’ve found they get me started on tasks I wouldn’t normally attempt.
A django example
I tested this with Django’s collectstatic issues, specifically the CSS/JS file parsing challenges. The current implementation uses regex to replace static file references, which works in many cases but has edge cases: CSS comments break it, and JS import/export statements proved so tricky they’re only experimental.
The proper solution is parsing CSS/JS files rather than regex substitution, but that comes with performance and complexity costs. I’ve done a little parser work before, just enough to know it would take me significant time and be outside my comfort zone. I could do it if required but wouldn’t have the energy for a volunteer effort. I doubt I’m the only one who felt like this in the 12 years the issue has been open.
AI-Assisted Approach
I researched the tickets and learned, from Adam, about Django’s existing JS lexer for gettext. I asked the agent to show me how this would work for import/export cases — it provided working code that I then copy/pasted, tested, and fixed. A nice start but I could have done this without AI. I submitted a PR #19574 [1]
For CSS, I needed to create a lexer from scratch. I started with the prompt:
“I have this Python code for JavaScript lexical analysis [included JsLexer class]. Could we build a class for doing the same with CSS files?”
The agent provided a solid starting point that became a working lexer with minimal prompting. Django’s test suite let me prove the lexer still made all the needing substitution and could now handle CSS comments. #19561
Full Agent Mode
I then tried “full agent” mode - giving it codebase access, showing it how to run tests, and having it write commit messages. I tried this workflow on three different collectstatic issues. (#26583, #28200, #27929)
Results
In one afternoon, I had 5 PRs across 4 issues - work I wouldn’t have attempted before. This highlights the potential to create more reviewer workload. I held back on submitting all PRs simultaneously out of respect for maintainers’ time, only fully reviewing and submitting the assisted work, rather than the solo agent work. I did later review the simplest of the solo agent’s work and submit it with only minor modifications needed by me. #19574
I think that these AI agents will increase the amount of contributions. I looked for community discussion on this topic but found little relevant, so I was glad to see the PR template discussion starting:
#19594. I think it will be worth considering how to manage the affects of these coding agents. While at the same time I do see how it can help improve the framework as hopefully in the example of the CSS parser.
When Shai did a review and suggested adding support for more modern JS features, like await/async, I did go back to AI for suggestions on that too. Again I could have done it myself but it was multiple times faster this way. ↩︎