HNHacker News
TopNewBestAskShowJobs

Nizoss

17 karma · joined January 18, 2017

submissionscomments
Nizoss··on Getting good results from Claude Code
I've found that keeping my CLAUDE.md minimal (under 100 lines) yields the best results. I focus mainly on these areas:

- Essential project context and purpose

- A minimal project structure to help locate types, interfaces, and helpers

- Common commands to avoid parsing package.json repeatedly.

Regarding the specific practices mentioned:

Implementation Flow: I've noticed Claude Code often tries to write all tests at once, then implements everything when import fails (not true TDD). To address this, I created a TDD-Guard hook that enforces one test at a time, test fail for the right reason, only implement the minimal code to make the test pass.

Code quality: I've had good success automating these with husky, lint-staged, and commitlint. This gives deterministic results and frees up the context for more important information.

When Stuck: I agree that developer intervention is often the best path. I'm just afraid the specific guidance here might be too generic.

For anyone interested in this automated approach:

https://github.com/nizos/tdd-guard (includes example configuration)

https://github.com/typicode/husky

https://github.com/conventional-changelog/commitlint

https://github.com/lint-staged/lint-staged

Nizoss··on GPT-5 vs. Sonnet: Complex Agentic Coding
Interesting! So is it the agent that is responsible for triggering them? That is, they are not executed deterministically. Is that correct?
Nizoss··on GPT-5 vs. Sonnet: Complex Agentic Coding
Sorry, I missed the second part of your comment!

I don't have a detailed video beyond the short demo on the repo, but I'll look into recording something more comprehensive or cover it in a blog post. Happy to ping you when it's ready!

In the meantime: I simply set it up and go about my work. The only thing I really do is just nudge the agent into making architectural simplifications and make sure that it follows the testing strategies that I like: dependency injection, test helpers, test data factories and such. Things that I would do regardless of the hook.

I like to give my tests the same attention and care that I give production code. They should be meaningful and resilient. The code base contains plenty of examples but I will look into putting something together.

Nizoss··on GPT-5 vs. Sonnet: Complex Agentic Coding
Thank you for the kind words, it means a lot!

I spent my summer holiday on this because I truly believe in the potential of hooks in agentic coding. I'm equally surprised that this space hasn't been explored more.

I'm currently working on making the validation faster and more customizable, plus adding reporters to support more languages.

I think there is an Amazon backed vscode forked that is also exploring this space. I think they market it as spec driven development.

Edit: I found it, its called Kiro: https://kiro.dev/

Nizoss··on GPT-5 vs. Sonnet: Complex Agentic Coding
I have been using Claude Code with TDD through hooks, which significantly improved my workflow for production code.

Watching the ChatGPT 5 demo yesterday, I noticed most of the code seemed oriented towards one-off scripts rather than maintainable codebases which limits its value for me.

Does anyone know if ChatGPT 5 or Copilot have similar extensibility to enforce practices like TDD?

For context on the approach: https://github.com/nizos/tdd-guard

I use pre/post operation commands to enforce TDD rules.

Nizoss··on Show HN: Enforce TDD in Claude Code
Hi HN!

I built this to automatically enforce Test-Driven Development in Claude Code so that I can focus on designing solutions instead of policing TDD. It uses test reporters to collect the latest results and hooks into file operations to block violations such as premature or over-implementation.

One key takeaway from building this tool is that mechanically blocking TDD violations doesn't automatically lead to better software and that the refactor phase is critical for achieving the software qualities that TDD aims to promote.

The agent often skips the refactor step of the red-green-refactor cycle, or at best performs only superficial changes. The result is code that works, but suffers from tight coupling, duplication, and poor design. This reinforced the idea that TDD’s value lies in the mindset and discipline it fosters, not in mechanically following its rules.

Another takeaway is that measuring “good design” is hard. Finding practical tools to detect unnecessary complexity was trickier than expected. Most tools I evaluated are correlated with line count, which is not very useful, or required extensive setup that made them impractical.

That said, I have added some mechanisms to prompt the agent to perform basic refactoring using lint tools. Deeper, more meaningful refactoring is still up to the developers.

I'm happy with the results so far and have received a lot of positive feedback.

It currently supports these test frameworks:

- JavaScript/TypeScript: Jest and Vitest

- Python: Pytest

- PHP: PHPUnit

I'd love to hear your feedback or questions. Contributions and support for additional frameworks are welcome!

Nizoss··on Mozilla launches new brand identity
Does this work only in Firefox? What does it show?
← PreviousPage 2 of 2