matkoson-standard
v1.6.0
Published
STANDARD compliance with Quality Attestation Token (QAT) system
Readme
STANDARD - TypeScript/Bun Package Development Standards
Purpose
Central repository defining development standards, templates, and automation tools for TypeScript/Bun packages across 40+ repositories.
Directory Structure
/assets/
Purpose: Media files only (images, videos, screenshots, recordings)
- For documentation illustrations
- Architecture diagrams
- Tutorial screenshots
- Currently empty - ready for media assets
/bin/
Purpose: Executable wrapper scripts (thin wrappers calling scripts/)
harden-qat-hooks- Wrapper for QAT hook hardeningqat-history-healer- Wrapper for legacy commit recoveryresume-setup- Wrapper for setup resumptionsetup-quality-attestation- Wrapper for QAT installationsetup-repository- Wrapper for repository initializationvalidate-repo-structure- Wrapper for structure validation
Pattern: Each wrapper is an executable bash script (no extension) that calls the corresponding implementation in scripts/
/scripts/
Purpose: Script implementations (NOT directly executable)
harden-qat-hooks.sh- QAT hook hardening implementationqat-history-healer.sh- Legacy commit recovery implementationrepo-structure-validator.ts- TypeScript validator implementationresume-setup.sh- Setup resumption implementationsetup-quality-attestation.sh- QAT installation implementationsetup-repository.sh- Repository initialization implementation
Pattern: Implementations are called by bin/ wrappers, allowing swap without breaking references
/boilerplate/
Purpose: Template files for new repositories
package.json- Package manifest templatetsconfig.json- TypeScript configuration templatebiome.json- Linting/formatting configuration template.gitignore- Git ignore rules templateREADME.md- Documentation templatesetup-quality-attestation.sh- QAT setup script (copied into new repos)- Complete directory structure (bin/, docs/, json/, logs/, out/, src/, scripts/)
Exception: Standard filenames (package.json, etc.) preserved for compatibility
/guides/
Purpose: Comprehensive documentation for the STANDARD
Primary Reference:
- STANDARD-BUN-PACKAGE.md - THE CANONICAL STANDARD (single source of truth)
Supporting Guides:
AUTOMATION-USAGE.md- Automation and tooling guideBUN-PACKAGE-REVIEWER-PROMPT.md- Code review guidelinesCI-CD-SECURITY-REQUIREMENTS.md- CI/CD security requirementsGITHUB-ACTIONS-SETUP-GUIDE.md- GitHub Actions setupGITHUB-ACTIONS-SETUP-GUIDE-STANDARD.md- Standard GitHub Actions setupHARDEN-QAT-HOOKS.md- QAT hook hardening documentationIMAGE-ANALYSIS-REQUIREMENTS.md- Image analysis package requirementsOPTIMIZATION-SUMMARY.md- Optimization guidelinesQAT-AUTOPUSH-MIGRATION.md- QAT autopush migration guideQAT-HARDENING-RUNBOOK.md- Complete QAT hardening proceduresQAT-HISTORY-HEALER.md- Legacy commit recovery documentationQAT-MERGE-CHECK-AUTO-PUSH.md- Merge check and auto-push guideSLASH-COMMAND-REVIEW.md- Slash command review workflowSONARCLOUD-INTEGRATION.md- SonarCloud integration guideTYPESCRIPT-BUN-STANDARDS.md- TypeScript/Bun standards overviewvalidation-integration.md- Validation integration guide
/workflows/
Purpose: GitHub Actions workflow templates
Primary Workflow:
qat.yml- Quality Attestation Token verification (THE STANDARD WORKFLOW)
Additional Workflows:
claude-code-review.yml- Claude Code review automationclaude-interactive-ci.yml- Claude interactive CI workflow
Examples:
examples/subdirectory containing example workflow configurations
/global/
Purpose: Shared configuration files used across all repositories
biome.json- Shared Biome configuration (canonical linting/formatting)tsconfig.base.json- Base TypeScript configurationtsconfig.reference.json- TypeScript project references
/example/
Purpose: Reference implementation demonstrating the STANDARD in practice
- Complete working example of a compliant TypeScript/Bun package
- Shows correct directory structure, naming conventions, and patterns
README.mdcontains detailed explanations of all patterns
Usage
Setup New Repository
/Users/matkoson/STANDARD/bin/setup-repository <repo-name>Apply QAT System
bash /Users/matkoson/STANDARD/bin/setup-quality-attestationHarden QAT Hooks (requires sudo)
sudo /Users/matkoson/STANDARD/bin/harden-qat-hooks /absolute/path/to/repositoryValidate Repository Structure
/Users/matkoson/STANDARD/bin/validate-repo-structure /absolute/path/to/repositoryHeal Legacy Commits
/Users/matkoson/STANDARD/bin/qat-history-healerNaming Conventions
This repository follows kebab-case naming conventions:
- Directories: kebab-case (e.g.,
bin/,scripts/,guides/) - Files: kebab-case (e.g.,
ensure-compliance,setup-repository.sh,pre-commit-logic.ts) - Exceptions: Conventional names preserved where appropriate (e.g.,
README.md,.gitignore,package.json)
Script Organization Pattern
The Rule
Separate implementation from execution interface:
bin/command (executable wrapper)
↓ calls
scripts/command.sh (implementation)Benefits
- Can swap implementations without breaking references to bin/
- Decouples interface from implementation details
- Standardized pattern across all scripts
- Single entry point for users (bin/ directory)
Example
# User calls:
/Users/matkoson/STANDARD/bin/harden-qat-hooks /path/to/repo
# Wrapper internally calls:
bash /Users/matkoson/STANDARD/scripts/harden-qat-hooks.sh /path/to/repoThe Canonical Standard
See guides/standard-bun-package.md for complete specification.
This is the single source of truth referenced by 40+ repositories.
Key Features
Quality Attestation Token (QAT) System
- Enforces quality standards locally before commits
- Cryptographic proof of quality checks
- Eliminates expensive CI/CD validation
- 95% reduction in GitHub Actions costs
Configuration-Driven Development
- All business logic driven by JSON configs in
json/directory - Enables runtime behavior changes without code changes
Dual Output Pattern
- Console output for immediate feedback
- Persistent file output in
out/directory - All executable code follows this pattern
100% Test Coverage
- Mandatory for all library repositories
- Enforced locally before commits allowed
- No exceptions permitted
Repository Standards
All 40+ repositories follow these standards:
- TypeScript exclusively
- Bun runtime exclusively
- Biome for linting/formatting
- kebab-case naming for all files and directories
- SCREAMING-PASCAL-CASE for JSON configs
- QAT system for quality enforcement
Migration Notes
This repository was recently reorganized:
- 2025-10-28: Eliminated BUN-TS-PACKAGE and __GUIDE duplication, separated script implementations from wrappers
- 2025-11-15: Migrated to standard naming conventions (kebab-case directories, snake_case files)
All path references updated to reflect new structure.
