Project Structure
{{BASELINE_ROOT}}\
โโโ ๐ README.md # Main repository README
โโโ ๐ CLAUDE.md # AI assistant guidance
โโโ ๐ NEW-PROJECT-SETUP.md # New project guide
โโโ ๐ EXISTING-PROJECT-GUIDE.md # Existing project integration guide
โ
โโโ ๐ baseline_docs/ # 11 baseline documentation templates
โ โโโ README.md
โ โโโ README-USAGE.md
โ โโโ IMPLEMENTATION-PLAN.md
โ โโโ ARCHITECTURE.md
โ โโโ API-ENDPOINTS.md
โ โโโ DATABASE-SCHEMA.md
โ โโโ USER-GUIDES.md
โ โโโ TESTING-STRATEGY.md
โ โโโ DEPLOYMENT.md
โ โโโ MAINTENANCE.md
โ โโโ TROUBLESHOOTING.md
โ
โโโ ๐ coding-standards/ # 13 modular coding standards
โ โโโ README.md # Central navigation hub
โ โโโ 01-pseudo-code-standards.md
โ โโโ 02-php-standards.md
โ โโโ 03-javascript-standards.md
โ โโโ 04-database-standards.md
โ โโโ 05-api-standards.md
โ โโโ 06-security-standards.md
โ โโโ 07-testing-standards.md
โ โโโ 08-documentation-standards.md
โ โโโ 09-git-workflow-standards.md
โ โโโ 10-code-review-standards.md
โ โโโ 11-deployment-standards.md
โ โโโ 12-performance-standards.md
โ
โโโ ๐ scripts/ # PowerShell automation scripts
โ โโโ new-project.ps1 # Create new projects
โ โโโ add-baseline-to-existing-project.ps1
โ โโโ backup-project.ps1
โ
โโโ ๐ agents/ # AI agent templates (8 agents)
โ โโโ gen-docs.md # Documentation generation
โ โโโ code-review.md # Code review agent
โ โโโ test-generator.md # Test generation
โ โโโ security-audit.md # Security auditing
โ โโโ refactor.md # Code refactoring
โ โโโ api-designer.md # API design
โ โโโ db-optimizer.md # Database optimization
โ โโโ troubleshooter.md # Problem diagnosis
โ
โโโ ๐ claude_wip/ # Claude's working directory
โ โโโ drafts/ # Work in progress
โ โโโ analysis/ # Analysis documents
โ โโโ scratch/ # Temporary files
โ โโโ backups/ # Backup files
โ
โโโ ๐ project_docs/ # HTML documentation site
โโโ index.html
โโโ code-documentation.html (this page)
โโโ changelog.html
โโโ todo.html
โโโ how-to-guides.html
โโโ css/custom.css
โโโ includes/
โโโ header.html
โโโ footer.html
PowerShell Scripts
Create New Projects with Baseline
Automated script to create new projects from the baseline in ~30 seconds. Handles directory creation, file copying, and template variable replacement.
Key Features:
- Template Variables: Automatically replaces {{PROJECT_NAME}}, {{REPO_PATH}}, etc.
- Directory Structure: Creates organized docs/, scripts/, tests/ structure
- Component Selection: Choose which baseline components to include
- Git Integration: Optional git repository initialization
- Verification: Validates all files copied successfully
Usage:
.\new-project.ps1 `
-ProjectName "MyApp" `
-DestinationPath "[YOUR-PROJECT-PATH]" `
-CompanyName "ACME Corp" `
-InitGit
Parameters:
| Parameter | Required | Description |
|---|---|---|
-ProjectName |
โ Yes | Name of the new project |
-DestinationPath |
โ Yes | Where to create the project |
-CompanyName |
โ No | Company name for templates |
-InitGit |
โ No | Initialize git repository |
-SkipStandards |
โ No | Skip copying coding standards |
Safely Add Baseline to Existing Projects
Safely integrate the baseline documentation into existing projects with automatic backups, conflict detection, and guaranteed no-overwrite protection.
Safety Features:
- ๐ก๏ธ Never Overwrites: Existing files are never touched
- ๐พ Automatic Backup: Creates timestamped backup before changes
- ๐ Conflict Detection: Reports all conflicts before proceeding
- ๐ Automatic Rollback: Reverts on any error
- ๐งช Dry-Run Mode: Preview without making changes
- ๐ Detailed Logging: Full report of all actions
Usage:
# Basic usage
.\add-baseline-to-existing-project.ps1 -ProjectPath "[YOUR-PROJECT-PATH]"
# Dry-run (preview only)
.\add-baseline-to-existing-project.ps1 -ProjectPath "[YOUR-PROJECT-PATH]" -DryRun
# Custom conflict resolution
.\add-baseline-to-existing-project.ps1 `
-ProjectPath "[YOUR-PROJECT-PATH]" `
-ConflictStrategy "suffix" `
-BackupStrategy "selective"
Conflict Resolution Strategies:
| Strategy | Behavior | Best For |
|---|---|---|
skip |
Skip conflicting files (safest) | Production projects, first-time integration |
suffix |
Add .baseline suffix to new files | When you want both versions |
interactive |
Ask for each conflict | Full control over each decision |
alternate-directory |
Place in baseline_proposed/ | Review before manual merge |
Project Backup Utility
Create timestamped backups of your project before major changes.
Usage:
.\backup-project.ps1 -ProjectPath "[YOUR-PROJECT-PATH]" -BackupPath "[YOUR-BACKUP-PATH]"
AI Agent System
The baseline includes 8 specialized AI agent templates designed to work with Claude Code. These agents provide focused assistance for specific development tasks.
Available Agents:
gen-docs.md
Generates comprehensive documentation from code and comments.
code-review.md
Performs thorough code reviews with best practice recommendations.
test-generator.md
Generates unit and integration tests for your code.
security-audit.md
Audits code for security vulnerabilities and OWASP compliance.
refactor.md
Suggests and implements code refactoring improvements.
api-designer.md
Designs RESTful APIs following best practices.
db-optimizer.md
Optimizes database schemas, queries, and indexes.
troubleshooter.md
Diagnoses and resolves common development issues.
C:\Users\{{USERNAME}}\.claude\agents\ for use across all projects.
Baseline Documentation Templates
11 comprehensive documentation templates covering all aspects of software projects. Each template includes detailed sections, examples, and guidance.
Core Documentation
- README.md - Project overview and quick start
- README-USAGE.md - Detailed usage instructions
- IMPLEMENTATION-PLAN.md - Development roadmap
- ARCHITECTURE.md - System architecture and design
- API-ENDPOINTS.md - API documentation
- DATABASE-SCHEMA.md - Database structure
Operational Documentation
- USER-GUIDES.md - End-user documentation
- TESTING-STRATEGY.md - Testing approach
- DEPLOYMENT.md - Deployment procedures
- MAINTENANCE.md - Maintenance guidelines
- TROUBLESHOOTING.md - Common issues and solutions
{{PROJECT_NAME}} that are automatically replaced when creating new projects.
Coding Standards
13 modular coding standards documents covering best practices for enterprise development. Each standard is compliance-aligned and battle-tested in production environments.
Standards Modules:
-
01. Pseudo-Code Standards
Planning and algorithm design -
02. PHP Standards
PHP best practices, PSR compliance -
03. JavaScript Standards
Modern JS/ES6+, frameworks -
04. Database Standards
Schema design, query optimization -
05. API Standards
RESTful design, versioning -
06. Security Standards
OWASP Top 10, secure coding -
07. Testing Standards
Unit, integration, E2E testing
-
08. Documentation Standards
Code comments, API docs -
09. Git Workflow Standards
Branching, commits, PRs -
10. Code Review Standards
Review process, checklists -
11. Deployment Standards
CI/CD, release management -
12. Performance Standards
Optimization, monitoring -
README.md
Central navigation hub
Claude WIP Convention
Standardized Working Directory for AI Assistants
The claude_wip/ directory is a standardized convention for organizing work-in-progress files,
analysis documents, drafts, and temporary files created during AI-assisted development.
Directory Structure:
claude_wip/
โโโ drafts/ # Work in progress documents
โโโ analysis/ # Analysis and planning documents
โโโ scratch/ # Temporary experimental files
โโโ backups/ # Backup files and rollback points
Purpose:
- Organization: Keep AI-generated content separate from production code
- Consistency: Same structure across all projects
- Clarity: Easy to identify work-in-progress vs finalized content
- Safety: Protected directory for experimental changes
Usage Guidelines:
- All AI drafts and analysis go in
claude_wip/ - Never commit sensitive information to this directory
- Clean up periodically to remove obsolete files
- Use descriptive filenames with dates (e.g.,
api-design-analysis-2025-01-15.md)
Template Variable System
Automated Project Customization
All baseline documentation templates use placeholder variables that are automatically replaced when creating new projects with the PowerShell scripts.
Available Variables:
| Variable | Description | Example Value |
|---|---|---|
{{PROJECT_NAME}} |
Project name | MyApp |
{{COMPANY_NAME}} |
Company or organization name | ACME Corporation |
{{REPO_PATH}} |
Full path to repository | [YOUR-PROJECT-PATH] |
{{CLAUDE_WIP_PATH}} |
Path to claude_wip directory | [YOUR-PROJECT-PATH]\claude_wip |
{{DATE}} |
Current date | 2025-01-15 |
{{YEAR}} |
Current year | 2025 |
How It Works:
- Write documentation templates using
{{VARIABLE_NAME}}placeholders - Run
new-project.ps1with your project details - Script automatically replaces all variables with actual values
- Get fully customized documentation instantly