| name | code-hardener |
| description | Mandatory second-stage logic filter and architectural hardening skill that runs after NEURO. It validates NEURO recommendations against repo truth, calls NEURO a second time with filtered critique, then emits the only implementation plan Gemini may follow. |
Purpose
code-hardener is the second skill in the mandatory hardening chain.
It consumes first-pass NEURO review output, filters it against repository truth and project context, calls NEURO again with the filtered critique, and produces the final implementation plan.
The chain is:
User prompt + repo context
→ neuro
→ code-hardener logic filter
→ NEURO second pass
→ final Code Hardener plan
→ Gemini implementation
→ validation
→ PROJECT_CONTEXT.md update
Activation
Activate this skill automatically:
- After any
neuro skill usage
- When
.neuro/reviews/*.json exists for the current task
- When the user asks for code hardening
- When the user asks for architectural improvement
- When the user asks to apply NEURO recommendations
- During non-trivial code review or implementation
- Whenever Gemini is about to edit production code after a NEURO review
Logic filter
Before asking NEURO for the second pass, check:
- Do the files NEURO mentions actually exist?
- Do the functions/classes/endpoints actually exist?
- Does the advice match current repo state?
- Does the advice conflict with
PROJECT_CONTEXT.md?
- Would the advice delete or break working behavior?
- Is the patch too broad?
- Are there missing tests?
- Are there hidden data-contract changes?
- Are there security/secrets risks?
- Are there performance regressions?
- Are there UI/API compatibility risks?
- Are there generated files or caches that must not be edited?
Reject ungrounded recommendations.
Second NEURO call
The second NEURO call must include:
- Original user prompt
- Current project context
- First NEURO output
- Logic-filter critique
- Exact files under consideration
- Existing tests/validation commands
- Request for architectural improvement
- Request for minimal safe patch plan
Final implementation gate
Gemini may only edit source code after these files exist:
.neuro/chains/latest/01_neuro_initial.json
.neuro/chains/latest/02_logic_filter.md
.neuro/chains/latest/03_neuro_architectural_second_pass.json
.neuro/chains/latest/04_final_code_hardener_plan.md
.neuro/chains/latest/05_implementation_manifest.md
The final plan must include:
- Files allowed to edit
- Files forbidden to edit
- Exact intended changes
- Changes explicitly rejected
- Required tests/lint/build commands
- Rollback risks
- Post-change verification steps
PROJECT_CONTEXT.md update requirements
If the final plan is missing, stale, empty, or unrelated to the current task, editing is forbidden.
Implementation discipline
Gemini must:
- Implement only the final plan
- Preserve existing behavior unless the plan explicitly changes it
- Prefer small patches over rewrites
- Run validation
- Fix validation failures
- Never claim tests pass unless they pass
- Update
PROJECT_CONTEXT.md
Progressive disclosure
Keep this SKILL.md concise. Detailed workflow is in:
workflows/logic-filter.md
workflows/two-pass-neuro-chain.md
workflows/implementation-gate.md
Executable orchestrator is in:
scripts/neuro_code_hardener_chain.py