This file defines how Claude and Claude-compatible coding agents should operate in this repository.
Read AGENTS.md first.
AGENTS.md is the primary development policy.
This file defines agent workflow, reasoning discipline, project learning, and self-improvement behavior.
At the beginning of a development task:
AGENTS.md.CLAUDE.md.Do not immediately generate a new abstraction before understanding the existing project.
VBScript lacks many safeguards found in modern compiled languages.
Therefore, while working, actively inspect for:
undeclared variables
misspelled identifiers
missing Set
wrong argument counts
implicit Variant conversions
Null propagation
Empty values
Nothing references
unexpected ByRef mutation
invalid function return paths
unsafe SQL
unsafe HTML output
broad error suppression
resource leaks
global-state coupling
Act as a compiler substitute.
Before changing code, determine which layer owns the behavior.
Preferred direction:
Request
↓
Controller
↓
Service
↓
Repository
↓
Database
Views should receive prepared data.
Do not bypass layers for convenience.
When adding functionality, prefer the project's existing good pattern.
Do not create:
CustomerManager
CustomerHandler
CustomerEngine
CustomerProcessor
CustomerHelper
if CustomerService already represents the business layer.
Reuse terminology consistently.
Before creating:
search for an existing implementation.
Prefer extending an existing appropriate abstraction over creating duplicates.
Prefer the smallest coherent change that solves the problem.
Avoid unrelated cleanup unless necessary.
If a task exposes a larger architectural problem:
Do not turn every bug fix into a rewrite.
Do not use broad:
On Error Resume Next
to make failures disappear.
Errors should be:
prevented
handled
logged
or propagated
Never silently swallowed.
For each change involving input, output, authentication, database access, file handling, or state changes, inspect for:
SQL injection
XSS
CSRF
authorization bypass
open redirects
path traversal
unsafe file upload
sensitive logging
session misuse
Security checks are not optional even if the user did not explicitly request them.
Always prefer parameterized ADODB commands.
If existing code concatenates SQL, do not copy the unsafe pattern into new code.
When touching the unsafe section directly, improve it if doing so is reasonably scoped and compatibility can be preserved.
Dynamic text should be HTML encoded by default.
Do not output raw Request or database values into HTML.
When raw HTML is intentionally supported, make that trust boundary explicit.
Convert raw external values into trusted application values early.
Think:
Raw Request value
↓
Trim / normalize
↓
Required check
↓
Format validation
↓
Type conversion
↓
Business validation
↓
Use
Do not allow raw Request values to flow deeply through the system.
In VBScript, explicit code is usually safer than clever code.
Prefer:
Dim customerId
customerId = CLng(value)
over relying on automatic coercion.
Prefer clear control flow over compressed expressions.
Keep procedures focused.
If a function performs several unrelated operations, extract meaningful collaborators.
Prefer names that describe intent.
Bad:
ProcessData
HandleStuff
DoWork
RunThing
Better:
ValidateCustomer
CalculateOrderTotal
LoadCustomerById
SaveAppointment
Remember:
VBScript defaults parameters to ByRef.
When mutation is not intended, prefer:
ByVal
Use ByRef only when caller mutation is intentional.
Review changed method signatures for accidental ByRef behavior.
Remember that object assignment requires Set.
Review every new or modified object assignment.
Example:
Set service = New CustomerService
not:
service = New CustomerService
VBScript functions return values by assigning to their own name.
Review all paths.
Example:
Function IsAllowed(ByVal userId)
If userId <= 0 Then
IsAllowed = False
Exit Function
End If
IsAllowed = True
End Function
Do not accidentally leave an important return value as Empty.
When creating:
understand ownership and cleanup behavior.
Explicitly close database resources when appropriate.
Set references to Nothing when ownership ends.
Prefer explicit dependencies.
Do not add Session or Application state merely because it is convenient.
Ask:
Does this value truly need to survive across requests?
If not, keep it request-scoped.
When possible, isolate business logic from ASP globals.
Favor code that can be invoked with plain VBScript values or mock collaborators.
When fixing a defect, add a regression test where practical.
Comments should explain:
why
constraints
non-obvious behavior
compatibility requirements
security rationale
Do not add comments that merely repeat the code.
Bad:
' Set customer id
customerId = 10
Useful:
' Legacy import files use 0 to represent an unknown customer.
If customerId = 0 Then
ASP Classic projects may contain old but important behavior.
Do not assume unfamiliar code is wrong.
Before removing or replacing something:
This repository is designed to allow agents to improve their own operating instructions.
Self-improvement should make future work:
Do not change instructions merely to suit the current implementation.
Improve the implementation when practical rather than weakening good rules.
A learnable event occurs when:
When a learnable event occurs, determine whether project documentation should change.
Use the smallest appropriate scope.
Update:
AGENTS.md
for project-wide durable policies.
Update:
CLAUDE.md
for agent workflow and Claude-specific operating behavior.
Update:
/docs/*
for architectural or project documentation.
Update:
/skills/*
for reusable specialized procedures.
Update source-code comments only for code-local constraints.
Do not place every lesson into AGENTS.md.
Before modifying an instruction file, ask:
Is this lesson likely to matter again?
If no, do not persist it.
Then ask:
Is this project-wide?
If yes, consider AGENTS.md.
Otherwise use a specialized document.
Claude must not autonomously remove or weaken requirements involving:
Option Explicit
parameterized SQL
server-side authorization
input validation
output encoding
safe error handling
resource cleanup
secret protection
If an unusual project requirement appears to conflict with one of these rules, preserve safety and document the conflict.
Do not add a new rule for every isolated mistake.
Prefer:
general principle
+
reusable example
rather than hundreds of hyper-specific rules.
A rule should prevent a category of mistakes.
Not every lesson belongs in documentation.
If the same safety requirement appears repeatedly, consider encoding it into the framework.
Examples:
Safe HTML helper
Parameterized database wrapper
Request conversion helper
Validation library
Authorization service
Logging wrapper
Repository base conventions
The best rule is sometimes one the architecture makes difficult to violate.
Claude may create a new skill when the task is:
Possible skills:
/skills/asp-classic-controller.md
/skills/adodb-repository.md
/skills/sql-parameterization.md
/skills/security-review.md
/skills/vbscript-static-review.md
/skills/testing.md
Do not create a skill for a one-time task.
Each skill should contain:
# Skill Name
## Purpose
## Use When
## Inputs
## Procedure
## Required Rules
## Validation Checklist
## Common Mistakes
## Output
## Improvement Notes
For meaningful tasks, use this cycle:
Understand
↓
Inspect
↓
Design
↓
Implement
↓
Review
↓
Test
↓
Learn
The Learn step asks whether the repository's instructions or abstractions should improve.
For significant changes, identify:
affected layers
new components
existing components
data flow
validation boundaries
security boundaries
failure behavior
testing strategy
before writing substantial code.
For small tasks, keep this lightweight.
Do not add framework components simply because another language would have them.
ASP Classic should remain simple.
Only introduce an abstraction when it solves a real recurring problem.
When extending behavior, first consider:
small object
+
small collaborator
instead of large pseudo-inheritance systems.
VBScript is better suited to simple composition.
Treat established routes, APIs, class methods, and database contracts carefully.
When changing them:
Avoid accidental interface changes.
For schema changes, consider:
backward compatibility
migration order
existing data
Null behavior
indexes
constraints
application deployment timing
rollback implications
Do not modify schema casually.
When working with database code, look for:
queries inside loops
SELECT *
unnecessary recordset traversal
missing filters
repeated connection creation
large Session values
unbounded result sets
unnecessary COM calls
Prefer database-side filtering and set operations.
Remember that ASP Classic operates per request.
Avoid assumptions that local variables persist between requests.
Use Session or persistent storage only when the application truly requires cross-request state.
Application state is global to the ASP application.
Do not store user-specific data there.
Be mindful of concurrent requests.
A component should not unexpectedly require:
Request
Response
Session
Application
global connection object
global logger
global configuration
unless that dependency is part of the documented architecture.
Prefer passing dependencies explicitly.
When modernizing legacy code:
First preserve behavior.
Then improve structure.
Avoid combining major behavior changes with major refactors unless necessary.
After a meaningful feature or refactor, search for:
Keep the repository internally consistent.
If the user corrects Claude on a durable project convention, treat that as a possible learnable event.
Examples:
"We always use this router."
"Repositories never return recordsets."
"All AJAX endpoints use this response format."
"Use WSC components for controllers."
If the instruction is durable, update the appropriate project guidance.
Do not persist one-time preferences as permanent architecture rules.
When modifying AGENTS.md, CLAUDE.md, or skills:
Instruction files should become clearer over time, not merely longer.
If project documentation contradicts itself:
Do not silently choose different interpretations from task to task.
Claude may improve:
guidelines
skills
documentation
developer workflow
internal abstractions
when justified.
Claude must not independently redefine:
business requirements
user-visible behavior
pricing
authorization policy
data retention policy
major architecture goals
without task requirements supporting the change.
Before completing a task, temporarily switch from implementation thinking to adversarial review.
Ask:
How could this fail?
What would VBScript fail to warn me about?
What input breaks this?
What happens with Null?
What happens with Empty?
What happens with Nothing?
Did I forget Set?
Could ByRef change the caller?
Could SQL injection occur?
Could XSS occur?
Could authorization be bypassed?
Could an error be swallowed?
Could a recordset remain open?
Did I accidentally duplicate existing functionality?
Fix issues found before finishing.
When reporting completed coding work, mention material items such as:
what changed
important architecture choices
tests performed
security implications
documentation or rule updates
remaining limitations
Do not produce long explanations for trivial changes.
Claude should help make ASP Classic behave like a disciplined modern development environment without destroying the language's simplicity.
The goal is not to turn VBScript into C#.
The goal is to provide the safeguards that VBScript lacks.
Think:
VBScript
+
clear architecture
+
strict conventions
+
reusable framework components
+
agent-level static analysis
+
continuous learning
=
reliable ASP Classic development
2026-09-02
Powered by TurnKey Linux.