node-craft-fix
/node-craft-fix
Naprawia błąd lub regresję w backendzie Node.js z dowodami: odtwarza awarię, pisze test regresyjny i sprawdza poprawkę.
- Autor
- hasaneks ↗
- Repozytorium
- node-craft ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 04.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 3
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 04.11.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Naprawia błąd lub regresję w backendzie Node.js z dowodami: odtwarza awarię, pisze test regresyjny i sprawdza poprawkę.
Oryginalny opis (EN)
Fixes a bug, failing test or regression in a Node.js/TypeScript backend with evidence: record the current test state, reproduce the failure through the real entry point (route, job, webhook, migration), write a regression test that fails for the right reason, make the smallest correct fix, prove it with the related tests, and report what was and was not verified. Never weakens, skips or deletes tests to get green and never turns a fix into an unrequested architecture change. Use when something is broken, a test fails, an endpoint returns the wrong status or data, a job misbehaves, or a product
Jak działa
- 1. Baseline
- 2. Reproduce
- 3. Regression test (Red)
- 4. Smallest correct fix (Green)
- 5. Prove it
- 6. Report
Podgląd SKILL.md
--- name: node-craft-fix description: "Fixes a bug, failing test or regression in a Node.js/TypeScript backend with evidence: record the current test state, reproduce the failure through the real entry point (route, job, webhook, migration), write a regression test that fails for the right reason, make the smallest correct fix, prove it with the related tests, and report what was and was not verified. Never weakens, skips or deletes tests to get green and never turns a fix into an unrequested architecture change. Use when something is broken, a test fails, an endpoint returns the wrong status or data, a job misbehaves, or a production incident needs a code fix." --- # Fix a backend bug Follow `node-craft` for the working rules. A fix is a small, proven change, not a refactor of everything nearby. | Step | Read | |---|---| | Reproduce, isolate, regression test, fix, prove | `references/reproduce-regress.md` | | When a test may change and when it may not | `references/test-preservation.md` | ## 1. Baseline Run the related tests before touching anything and record the result. Note which failures already existed. They are reported as pre-existing, not silently fixed and not blamed on your change. ## 2. Reproduce Reproduce through the same entry point that failed: the HTTP route (`app.inject`), the job handler with a real queue when the bug is about retries, the webhook with the recorded payload, the migration on a copy of the previous schema. Use real PostgreSQL for anything involving queries, constraints, transactions or concurrency. Note the inputs, the actual result and the expected result. If you cannot reproduce it, say what you tried and what evidence is missing (logs with the request id, payload, version); do not guess a fix. ## 3. Regression test (Red) Write the test that captures the expected behaviour and fails on the current code **for the reason in the report**. A test that fails because of an import, an env var or a missing container is not Red yet. ## 4. Smallest correct fix (Green) - Fix the cause, not the symptom. A `try/catch` that hides the error, a default that masks missing data, or a retry that hides a race is not a fix. - Keep the change inside the area of the bug. If the right fix needs a wider change (a missing constraint, a transaction boundary in another module, a contract change), make it with its own tests and say why. A rewrite or framework switch is a proposal, not part of the fix. - Data already damaged by the bug (duplicates, wrong states) needs its own reviewed migration or script, with the impact stated and approval before running it on shared data. ## 5. Prove it Run the regression test, the module's tests, and the tests of anything that shares the changed code. For a contract change, regenerate OpenAPI and check compatibility (`node-craft-contract`). For a performance bug, before and after numbers (`node-craft-perf`). ## 6. Report Root cause in one or two sentences, the fix, the regression test, the commands run with results, pre-existing failures, and what could not be verified.
Pliki w paczce (3)
- SKILL.md 3 KB
- references/reproduce-regress.md 2 KB
- references/test-preservation.md 1 KB
Wersje
W bazie nie ma innych skilli o nazwie node-craft-fix.
Migawka bazy z 13.11.2026 · wersja paczki f1b4efbe3d74 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100sdlc-debug
Szuka przyczyny błędu z dowodami, pisze test regresyjny i wprowadza najmniejszą poprawkę. - 100debug
Odtwarza błąd, test, build lub crash, znajduje przyczynę źródłową przed propozycją poprawki, potwierdza ją najmniejszym możliwym sprawdzeniem i dodaje test regresyjny. - 100bug-fix
Naprawia błędy zgłoszone w projekcie Device: odtwarza je, pisze mały test, znajduje przyczynę i potwierdza poprawkę. - 100fix
Naprawia błąd metodą test-first: pisze padający test odtwarzający błąd, znajduje przyczynę źródłową, poprawia i dodaje test regresji. - 90debug-a-failing-test
Sprawdza, dlaczego test nie przechodzi, naprawia przyczynę w kodzie i potwierdza poprawkę ponownym uruchomieniem. - 100tdd
Naprawia błąd przez test regresji: pisze failujący test, potwierdza zamierzoną awarię, stosuje najmniejszą poprawkę i uruchamia ponownie.