--- project_name: 'workspace' user_name: 'Daniel Covington' date: '2026-03-13' sections_completed: ['technology_stack', 'language_rules', 'framework_rules', 'testing_rules', 'quality_rules', 'workflow_rules', 'anti_patterns'] status: 'complete' rule_count: 23 optimized_for_llm: true --- # Project Context for AI Agents _This file contains critical rules and patterns that AI agents must follow when implementing code in this project. Focus on unobvious details that agents might otherwise miss._ --- ## Technology Stack & Versions - Runtime: IIS + Classic ASP on Windows - Language: VBScript / `.asp` - Framework: custom MVC helpers under `MVC/` - Data access: ADO via `App/DAL/lib.DAL.asp` - Database: Access MDB via Jet/ACE providers - Reporting/export: ReportMan, Debenu PDF Library, Chilkat COM components - Testing: ASPUnit served through IIS - Automation: VBScript and PowerShell scripts outside the web app ## Critical Implementation Rules ### Language-Specific Rules - Start application `.asp` and `.vbs` files with `Option Explicit`. - Keep `` directives near the top; include order matters because the app relies on side-effect loading. - Follow the existing singleton-style factory pattern for repositories instead of introducing new instantiation conventions mid-module. - Match the nearby VBScript style exactly; there is no formatter protecting consistency. ### Framework-Specific Rules - Web entry starts at `index.asp`, but the real bootstrap is `App/include_all.asp`; changes that depend on shared libraries should be wired there only if they are globally required. - Routes are initialized by `Routes.Initialize "/App/"`; avoid changing route roots casually because controller links assume that base. - Controllers typically orchestrate directly and include views inline; do not introduce partial modern abstractions unless they clearly reduce duplication. - Use existing MVC helpers such as `Automapper`, `Flash`, `FormCache`, and `HTMLSecurity` before inventing parallel helpers. ### Testing Rules - Existing automated coverage is strongest for helper libraries, not end-to-end operational workflows. - Any change in controller export/proof logic requires manual verification on Windows/IIS even if tests pass. - Run `Tests/Test_All.asp` through IIS for regression checks when changing shared MVC helpers or utility behavior. ### Code Quality & Style Rules - Preserve PascalCase class and file naming used across controllers, repositories, and view models. - Keep repository SQL in the repository layer; avoid scattering new raw SQL into views. - When changing a screen, trace controller, repository, view model, and view together because behavior is distributed across those layers. - Prefer minimal, local edits over broad refactors; this codebase is highly environment-coupled. ### Development Workflow Rules - Check `App/app.config.asp` before assuming path behavior; `dev` mode changes export locations and runtime assumptions. - Search both `App/` and `ImportService/` when changing statuses, file names, export behavior, or schema-related fields. - For schema changes, add a numbered migration under `Data/Migrations/` and then update the affected repository/model code. - Treat report templates in `Data/*.rep` as part of the runtime contract, not incidental assets. ### Critical Don't-Miss Rules - Do not commit new secrets, unlock keys, credentials, or machine-specific paths. Existing hard-coded values are legacy constraints, not a pattern to extend. - Do not assume Linux validation is enough. COM, IIS, Jet/ACE, report generation, and network shares are Windows-only concerns here. - Do not rename or normalize status strings without global search; automation scripts appear to branch on exact textual statuses. - Do not change export filenames or folder structures without auditing downstream consumers such as SnailWorks and import-service scripts. - Do not move shared includes or bootstrap files casually; many files rely on implicit availability of globals and helpers. - Be careful with view file names: there are similarly named templates such as `CreateKit.asp` and `CreateTrackingKit.asp`, and controllers include them directly. --- ## Usage Guidelines **For AI Agents:** - Read this file before implementing any code. - Prefer the existing Classic ASP patterns over introducing modern architecture unless explicitly requested. - When unsure, choose the option that minimizes environment risk and preserves current operational behavior. - Update this file if you discover a repeated brownfield rule that would prevent future mistakes. **For Humans:** - Keep this file lean and focused on non-obvious implementation constraints. - Update it when environment behavior, schema patterns, or core workflow conventions change. - Re-check it before delegating larger brownfield changes to an AI agent. Last Updated: 2026-03-13