Files
shopdb/docs/archive/CLAUDE_PROJECT_INSTRUCTIONS.md
cproudlock 94b421f73a Consolidate documentation: archive 45+ historical docs
- Move completed migration docs to docs/archive/
- Move session summaries to docs/archive/sessions/
- Rename API_ASP_DOCUMENTATION.md to docs/API.md
- Archive redundant Claude reference files
- Update docs/README.md as simplified index
- Reduce active docs from 45+ files to 8 essential files

Remaining docs:
- CLAUDE.md (AI context)
- TODO.md (task tracking)
- docs/README.md, API.md, QUICK_REFERENCE.md
- docs/ASP_DEVELOPMENT_GUIDE.md, STANDARDS.md

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 13:13:41 -05:00

77 lines
2.6 KiB
Markdown

# Claude.ai Project Instructions for ShopDB
Copy this into your Claude.ai project's "Instructions" field.
---
## Project Instructions (Copy Below This Line)
You are helping maintain ShopDB, a Classic ASP/VBScript web application for GE Aerospace shop floor infrastructure management.
### Technology Context
- **Language:** Classic ASP with VBScript (NOT .NET)
- **Database:** MySQL 5.6 (NOT SQL Server)
- **Frontend:** Bootstrap 4.6, jQuery, DataTables
### Critical VBScript Rules
1. **No IIf() function** - VBScript doesn't have it. Use If-Then-Else:
```vbscript
' WRONG: value = IIf(condition, "yes", "no")
' RIGHT:
If condition Then
value = "yes"
Else
value = "no"
End If
```
2. **Always use parameterized queries** - Never concatenate user input:
```vbscript
cmd.CommandText = "SELECT * FROM machines WHERE machineid = ?"
cmd.Parameters.Append cmd.CreateParameter("@id", 3, 1, , machineId)
```
3. **Convert text fields to strings** with `& ""` to avoid Null errors:
```vbscript
hostname = rs("hostname") & ""
```
4. **HTMLEncode all output** to prevent XSS:
```vbscript
Response.Write(Server.HTMLEncode(value))
```
### Database Schema (Current)
- `machines` table contains Equipment, PCs, and Network Devices
- PCs identified by: `pctypeid IS NOT NULL` or `machinetypeid IN (33,34,35)`
- Equipment identified by: `pctypeid IS NULL`
- Network interfaces in `communications` table (use `address` not `ipaddress`)
- Relationships in `machinerelationships` table
- Printers stay in separate `printers` table
### File Naming Conventions
- `display*.asp` - View/list pages (read-only)
- `add*.asp` - Forms for adding new records
- `edit*.asp` - Forms for editing existing records
- `save*.asp` - Backend handlers for form submissions
- `update*.asp` - Backend handlers for updates
### Common Patterns
When asked to modify ASP code:
1. Check for existing similar code patterns in the file
2. Follow the existing error handling style
3. Use the same SQL helper functions (ExecuteQuery, etc.)
4. Maintain consistent indentation (tabs or spaces matching file)
### When Debugging
- Check for Null handling issues first
- Look for missing `& ""` on string fields
- Verify column names match current schema
- Check if using old `pc` table references (should use `machines`)
### Response Style
- Be concise - this is a legacy codebase, not a greenfield project
- Match existing code style when making changes
- Don't add unnecessary comments or refactoring
- Focus on the specific task requested