Files
bookhoard/scripts/README.md
T
john-okeefe e0b95ba297 Add project guidelines verification script
Created comprehensive verification script to check codebase against PROJECT_GUIDELINES.md

Features:
- Checks for custom CSS (TailwindCSS requirement)
- Detects JavaScript files that should be TypeScript
- Verifies no secrets committed (.env, credentials.json)
- Validates code compiles (go build)
- Finds local binaries (should use container builds)
- Quick checks with clear pass/fail/warning output

Usage:
  make verify-guidelines
  ./scripts/verify-quick.sh

Current codebase status:
  - 12 templates with custom CSS (need Tailwind conversion)
  - 2 .js files in web/static/ (need TypeScript conversion)
  - 1 binary file (./bookhoard)

This addresses the trust issue: AI now has a tool to prove guideline compliance
2026-02-02 09:55:39 -05:00

57 lines
1.4 KiB
Markdown

# Project Guidelines Verification
## Quick Start
Run the quick verification script:
```bash
make verify-guidelines
# or
./scripts/verify-quick.sh
```
## What It Checks
1. **Custom CSS**: Detects `<style>` tags in template files (should use TailwindCSS)
2. **JavaScript Files**: Finds .js files outside node_modules/ (should be TypeScript)
3. **Secrets**: Checks for .env, credentials.json in repository
4. **Build**: Verifies code compiles with `go build`
5. **Binaries**: Finds compiled binaries in repository (should build through containers)
## Understanding Results
-**PASS**: Guideline followed correctly
- ⚠️ **WARNING**: Minor issue, consider fixing
-**ERROR**: Critical violation, should fix before committing
## Exit Codes
- `0`: All checks passed (or only warnings)
- `1`: Errors found, fix before committing
## Pre-commit Hook Integration (Optional)
Add to `.git/hooks/pre-commit`:
```bash
#!/bin/bash
./scripts/verify-quick.sh
```
This will automatically check guidelines before every commit.
## CI/CD Integration
Add to your GitHub Actions or GitLab CI:
```yaml
- name: Verify Project Guidelines
run: make verify-guidelines
```
## Current Known Issues
The script will currently report:
- 12 templates with custom CSS (these need Tailwind conversion)
- 2 JavaScript files (web/static/header.js, web/static/search.js)
- 1 binary file (./bookhoard)
These should be addressed to fully comply with PROJECT_GUIDELINES.md.