12 Commits

Author SHA1 Message Date
27c76cafa4 fix: Create automated sync script to ensure pull-before-push
CRITICAL FIX: The /sync command was not pulling remote changes before pushing,
causing machines to miss each other's work.

Changes:
- Created .claude/scripts/sync.sh (automated sync script)
- Created .claude/scripts/sync.bat (Windows wrapper)
- Updated .claude/commands/sync.md to use script

The script ensures:
1. Fetches remote changes FIRST
2. Pulls with rebase (conflict detection)
3. Then pushes local changes
4. Proper error handling
5. Clear status reporting

This fixes the issue where running /sync multiple times did not see
the Mac's changes until manual git fetch was run.

Both Windows and Mac will now use the same reliable sync script.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-03 19:59:32 -07:00
f79ca039dd sync: Auto-sync from ACG-M-L5090 at 2026-01-21 18:34:33
Synced files:
- Updated /sync command with /refresh-directives integration
- Added Phase 5 step 13: Auto-invoke refresh-directives
- Updated usage examples to show auto-refresh

Machine: ACG-M-L5090
Timestamp: 2026-01-21 18:34:33

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-21 18:34:48 -07:00
3560c90ea3 sync: Auto-sync from ACG-M-L5090 at 2026-01-21 16:38:37
Synced files:
- Enhanced /sync command with behavioral elements
- Added CODING_GUIDELINES.md sync
- Added AGENT_COORDINATION_RULES.md sync
- Added agent documentation sync

Machine: ACG-M-L5090
Timestamp: 2026-01-21 16:38:37

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-21 16:38:54 -07:00
565b6458ba fix: Remove all emojis from documentation for cross-platform compliance
Replaced 50+ emoji types with ASCII text markers for consistent rendering
across all terminals, editors, and operating systems:

  - Checkmarks/status: [OK], [DONE], [SUCCESS], [PASS]
  - Errors/warnings: [ERROR], [FAIL], [WARNING], [CRITICAL]
  - Actions: [DO], [DO NOT], [REQUIRED], [OPTIONAL]
  - Navigation: [NEXT], [PREVIOUS], [TIP], [NOTE]
  - Progress: [IN PROGRESS], [PENDING], [BLOCKED]

Additional changes:
  - Made paths cross-platform (~/ClaudeTools for Mac/Linux)
  - Fixed database host references to 172.16.3.30
  - Updated START_HERE.md and CONTEXT_RECOVERY_PROMPT.md for multi-OS use

Files updated: 58 markdown files across:
  - .claude/ configuration and agents
  - docs/ documentation
  - projects/ project files
  - Root-level documentation

This enforces the NO EMOJIS rule from directives.md and ensures
documentation renders correctly on all systems.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 16:21:06 -07:00
4efceab2e3 Complete project organization: move all DOS files to projects/dataforth-dos, create client folders, update Claude config 2026-01-20 16:03:00 -07:00
d24e56c558 fix: Update /sync command to use HTTPS instead of SSH for Gitea
Changed Gitea repository URL from SSH to HTTPS format for better
compatibility across different machines and authentication setups.

URL change: git@git.azcomputerguru.comhttps://git.azcomputerguru.com

Also simplified the command documentation to focus on practical steps
rather than extensive technical implementation details.

Files modified:
- .claude/commands/sync.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 08:51:00 -07:00
0e119ce30d docs: Remove database save from checkpoint command
Removed deprecated database context save functionality from /checkpoint:
- Deleted Part 2: Database Context Save section
- Removed API endpoint, JWT auth, and payload examples
- Updated description to focus on git operations only
- Simplified verification to git commit only
- Kept directives refresh requirement

Checkpoint command now handles git commits exclusively.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-19 16:01:34 -07:00
b87e97d3ba feat: Add directives system and DOS management utilities
Implemented comprehensive directives system for agent coordination:
- Created directives.md (590 lines) - Core operational rules defining
  coordinator vs executor roles, agent delegation patterns, and coding
  standards (NO EMOJIS, ASCII markers only)
- Added DIRECTIVES_ENFORCEMENT.md - Documentation of enforcement
  mechanisms and checklist for validating compliance
- Created refresh-directives command - Allows reloading directives
  after Gitea updates without restarting Claude Code
- Updated checkpoint and save commands to verify directives compliance
- Updated .claude/claude.md to mandate reading directives.md first

Added DOS system management PowerShell utilities:
- check-bat-on-nas.ps1 - Verify BAT files on NAS match source
- check-latest-errors.ps1 - Scan DOS error logs for recent issues
- check-plink-references.ps1 - Find plink.exe usage in scripts
- check-scp-errors.ps1 - Analyze SCP transfer errors
- check-sync-log.ps1 (modified) - Enhanced sync log analysis
- check-sync-status.ps1 - Monitor sync process status
- copy-to-nas-now.ps1 - Manual NAS file deployment
- find-error-logging.ps1 - Locate error logging patterns
- fix-copy-tonas-logging.ps1 - Repair logging in copy scripts
- fix-dos-files.ps1 - Batch DOS file corrections
- fix-line-break.ps1 - Fix line ending issues
- fix-plink-usage.ps1 - Modernize plink.exe to WinRM
- push-fixed-bat-files.ps1 - Deploy corrected BAT files
- run-sync-direct.ps1 - Direct sync execution
- test-error-logging.ps1 - Validate error logging functionality
- trigger-sync-push.ps1 - Initiate sync push operations
- verify-error-logging.ps1 - Confirm error logging working
- scripts/fix-ad2-error-logging.ps1 - Fix AD2 error logging

Added Gitea password management scripts:
- Reset-GiteaPassword.ps1 - Windows PowerShell password reset
- reset-gitea-password.sh - Unix shell password reset

Key architectural decisions:
- Directives system establishes clear separation between Main Claude
  (coordinator) and specialized agents (executors)
- DOS utilities modernize legacy plink.exe usage to WinRM
- Error logging enhancements improve troubleshooting capabilities
- All scripts follow PSScriptAnalyzer standards

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-19 15:52:28 -07:00
3faf09c111 feat: Complete DOS update system with test data routing fix
Implemented comprehensive DOS 6.22 update system for ~30 test stations with
critical fix for test data database import routing.

## Major Changes

### DOS Batch Files (7 files)
- NWTOC.BAT: Download updates from network to DOS machines
- CTONW.BAT v1.2: Upload with separate ProdSW/LOGS routing (CRITICAL FIX)
- UPDATE.BAT: Full system backup to network
- STAGE.BAT: System file staging for safe updates
- REBOOT.BAT: Apply staged updates on reboot
- CHECKUPD.BAT: Check for available updates
- DEPLOY.BAT: One-time deployment installer for DOS machines

### CTONW v1.2 Critical Fix
Fixed test data routing to match AD2 sync script expectations:
- Software distribution: C:\ATE\*.EXE -> T:\TS-4R\ProdSW\ (bidirectional)
- Test data logging: C:\ATE\8BDATA\*.DAT -> T:\TS-4R\LOGS\8BLOG\ (upload only)
- Subdirectory mapping: 8BDATA->8BLOG, DSCDATA->DSCLOG, HVDATA->HVLOG, etc.
- Test data now correctly imported to AD2 database via Sync-FromNAS.ps1

### Deployment Infrastructure
- copy-to-ad2.ps1: Automated deployment to AD2 server
- DOS_DEPLOYMENT_GUIDE.md: Complete deployment documentation
- DEPLOYMENT_GUIDE.md: Technical workflow documentation
- credentials.md: Centralized credentials (AD2, NAS, Gitea)

### Analysis & Documentation (15 files)
- CTONW_ANALYSIS.md: Comprehensive compliance analysis
- CTONW_V1.2_CHANGELOG.md: Detailed v1.2 changes
- NWTOC_ANALYSIS.md: Download workflow analysis
- DOS_BATCH_ANALYSIS.md: DOS 6.22 compatibility guide
- UPDATE_WORKFLOW.md: Backup system workflow
- BEHAVIORAL_RULES_INTEGRATION_SUMMARY.md: C: drive integration

### Session Logs
- session-logs/2026-01-19-session.md: Complete session documentation

### Conversation Reorganization
- Cleaned up 156 imported conversation files
- Organized into sessions-by-date structure
- Created metadata index and large files guide

## Technical Details

### AD2 → NAS → DOS Sync Flow
1. Admin copies files to AD2: \192.168.0.6\C$\Shares\test\
2. Sync-FromNAS.ps1 runs every 15 minutes (AD2 → NAS)
3. DOS machines access via T: drive (\D2TESTNAS\test)
4. NWTOC downloads updates, CTONW uploads test data
5. Sync imports test data to AD2 database

### DOS 6.22 Compatibility
- No %COMPUTERNAME%, uses %MACHINE% variable
- No IF /I, uses multiple case-specific checks
- Proper ERRORLEVEL checking (highest values first)
- XCOPY /S for subdirectory support
- ASCII markers ([OK], [ERROR], [WARNING]) instead of emojis

### File Locations
- AD2: C:\Shares\test\COMMON\ProdSW\ (deployed)
- NAS: T:\COMMON\ProdSW\ (synced)
- DOS: C:\BAT\ (installed)
- Logs: T:\TS-4R\LOGS\8BLOG\ (test data for database import)

## Deployment Status

 All 7 batch files deployed to AD2 (both COMMON and _COMMON)
 Pending sync to NAS (within 15 minutes)
 Pending pilot deployment on TS-4R
📋 Ready for rollout to ~30 DOS machines

## Breaking Changes

CTONW v1.1 → v1.2: Test data now uploads to LOGS folder instead of ProdSW.
Existing machines must download v1.2 via NWTOC for proper database import.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-19 12:49:54 -07:00
89e5118306 Remove conversation context/recall system from ClaudeTools
Completely removed the database context recall system while preserving
database tables for safety. This major cleanup removes 80+ files and
16,831 lines of code.

What was removed:
- API layer: 4 routers (conversation-contexts, context-snippets,
  project-states, decision-logs) with 35+ endpoints
- Database models: 5 models (ConversationContext, ContextSnippet,
  DecisionLog, ProjectState, ContextTag)
- Services: 4 service layers with business logic
- Schemas: 4 Pydantic schema files
- Claude Code hooks: 13 hook files (user-prompt-submit, task-complete,
  sync-contexts, periodic saves)
- Scripts: 15+ scripts (import, migration, testing, tombstone checking)
- Tests: 5 test files (context recall, compression, diagnostics)
- Documentation: 30+ markdown files (guides, architecture, quick starts)
- Utilities: context compression, conversation parsing

Files modified:
- api/main.py: Removed router registrations
- api/models/__init__.py: Removed model imports
- api/schemas/__init__.py: Removed schema imports
- api/services/__init__.py: Removed service imports
- .claude/claude.md: Completely rewritten without context references

Database tables preserved:
- conversation_contexts, context_snippets, context_tags,
  project_states, decision_logs (5 orphaned tables remain for safety)
- Migration created but NOT applied: 20260118_172743_remove_context_system.py
- Tables can be dropped later when confirmed not needed

New files added:
- CONTEXT_SYSTEM_REMOVAL_SUMMARY.md: Detailed removal report
- CONTEXT_SYSTEM_REMOVAL_COMPLETE.md: Final status
- CONTEXT_EXPORT_RESULTS.md: Export attempt results
- scripts/export-tombstoned-contexts.py: Export tool for future use
- migrations/versions/20260118_172743_remove_context_system.py

Impact:
- Reduced from 130 to 95 API endpoints
- Reduced from 43 to 38 active database tables
- Removed 16,831 lines of code
- System fully operational without context recall

Reason for removal:
- System was not actively used (no tombstoned contexts found)
- Reduces codebase complexity
- Focuses on core MSP work tracking functionality
- Database preserved for safety (can rollback if needed)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-18 19:10:41 -07:00
75ce1c2fd5 feat: Add Sequential Thinking to Code Review + Frontend Validation
Enhanced code review and frontend validation with intelligent triggers:

Code Review Agent Enhancement:
- Added Sequential Thinking MCP integration for complex issues
- Triggers on 2+ rejections or 3+ critical issues
- New escalation format with root cause analysis
- Comprehensive solution strategies with trade-off evaluation
- Educational feedback to break rejection cycles
- Files: .claude/agents/code-review.md (+308 lines)
- Docs: CODE_REVIEW_ST_ENHANCEMENT.md, CODE_REVIEW_ST_TESTING.md

Frontend Design Skill Enhancement:
- Automatic invocation for ANY UI change
- Comprehensive validation checklist (200+ checkpoints)
- 8 validation categories (visual, interactive, responsive, a11y, etc.)
- 3 validation levels (quick, standard, comprehensive)
- Integration with code review workflow
- Files: .claude/skills/frontend-design/SKILL.md (+120 lines)
- Docs: UI_VALIDATION_CHECKLIST.md (462 lines), AUTOMATIC_VALIDATION_ENHANCEMENT.md (587 lines)

Settings Optimization:
- Repaired .claude/settings.local.json (fixed m365 pattern)
- Reduced permissions from 49 to 33 (33% reduction)
- Removed duplicates, sorted alphabetically
- Created SETTINGS_PERMISSIONS.md documentation

Checkpoint Command Enhancement:
- Dual checkpoint system (git + database)
- Saves session context to API for cross-machine recall
- Includes git metadata in database context
- Files: .claude/commands/checkpoint.md (+139 lines)

Decision Rationale:
- Sequential Thinking MCP breaks rejection cycles by identifying root causes
- Automatic frontend validation catches UI issues before code review
- Dual checkpoints enable complete project memory across machines
- Settings optimization improves maintainability

Total: 1,200+ lines of documentation and enhancements

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-17 16:23:52 -07:00
fffb71ff08 Initial commit: ClaudeTools system foundation
Complete architecture for multi-mode Claude operation:
- MSP Mode (client work tracking)
- Development Mode (project management)
- Normal Mode (general research)

Agents created:
- Coding Agent (perfectionist programmer)
- Code Review Agent (quality gatekeeper)
- Database Agent (data custodian)
- Gitea Agent (version control)
- Backup Agent (data protection)

Workflows documented:
- CODE_WORKFLOW.md (mandatory review process)
- TASK_MANAGEMENT.md (checklist system)
- FILE_ORGANIZATION.md (hybrid storage)
- MSP-MODE-SPEC.md (complete architecture, 36 tables)

Commands:
- /sync (pull latest from Gitea)

Database schema: 36 tables for comprehensive context storage
File organization: clients/, projects/, normal/, backups/
Backup strategy: Daily/weekly/monthly with retention

Status: Architecture complete, ready for implementation

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-15 18:55:45 -07:00