Skip to content

diptiman-mohanta/CodeGuard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›‘οΈ CodeGuard Protocol

CodeGuard is a high-integrity coding protocol for Claude. It transforms the AI from a passive code-generator into a Senior Staff Engineer that prioritizes Correctness > Simplicity > Speed.

Tired of AI "laziness," hallucinated APIs, and broken // ... rest of code blocks? CodeGuard fixes the AI-human development loop by mandating deep reasoning, multi-stage verification, and bit-perfect code delivery.


✨ Key Features

  • Anti-Laziness: Strictly forbids // ... placeholders. You get the full code or precise SEARCH/REPLACE blocks.
  • P0-P2 Escalation: Stops the AI from "question-bombing" you. It only halts for critical (P0) showstoppers.
  • Library Hygiene: Mandates web_search for modern libraries to prevent API hallucinations.
  • Dual-Output Diffs: Provides a clean diff for human review and a byte-perfect SEARCH/REPLACE for machine application.
  • PUC (Perfectly Understandable Comments): Every changed line includes a comment explaining the intent, not just the syntax.

πŸš€ How to Use

For Claude.ai (Web)

  1. Download the repo and then upload the SKILL.md in the claude.
  2. Trigger: Now, whenever you type /codeguard, Claude will follow the protocol.

πŸ›  The Protocol Cycle

Every interaction follows a strict 7-stage lifecycle:

  1. Pre-Code Analysis: Identification of unknowns and a "Simplicity Audit."
  2. The "Ask" Check: High-risk variables (P0) are resolved before any code is written.
  3. Web Verification: Live documentation check for modern frameworks.
  4. Dual Output: Generation of diff and SEARCH/REPLACE blocks.
  5. PUC Annotation: Intent-based inline documentation.
  6. Impact Statement: A downstream table showing what else might break.
  7. Validation: A specific CLI command to verify the fix.

πŸ“‹ Example Analysis Block

When you ask for a feature, CodeGuard begins with:

Analysis

  • Unknowns: Database schema for auth_logs not provided.
  • Threshold Check: Partial Answer Mode: [ASSUMED] PostgreSQL 15 syntax.
  • YAGNI Check: Not adding a caching layer yet; unnecessary for this scale.
  • Simplicity Audit: Use a single SQL join instead of nested ORM calls.

🀝 Contributing

We welcome improvements to the reasoning steps and make it more efficient.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

βš–οΈ License

Distributed under the MIT License. See LICENSE for more information.


Stop guessing. Start Guarding. πŸ›οΈ

About

πŸ›οΈ Claude CodeGuard: A Staff-Level Engineering Protocol that mandates deep reasoning over speed. Fixes AI laziness, prevents code omissions, and enforces architectural integrity via P0-P2 escalation and bit-perfect SEARCH/REPLACE.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors