Commit graph

39 commits

Author SHA1 Message Date
Snider
6440b8fe42 feat(skills): add autonomous PHP agent skill
Adds /php-agent skill for continuous PHP development:
- Finds open issues across host-uk PHP repos
- Creates branches, implements solutions, writes tests
- Handles CodeRabbit reviews automatically
- Merges when approved
- Loops to pick up next task

Includes:
- php-agent.md skill definition with full workflow
- Updated plugin.json registration
- Extended permissions in settings.local.json

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 04:15:05 +00:00
Snider
04bd1b3d08 feat(config): add GitHub configuration for setup command
Adds .core/github.yaml with org-standard labels, webhook templates,
branch protection rules, and security settings for use with
`core setup github`.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 02:37:49 +00:00
Snider
9c9e79587b chore(ide): update dictionary word order
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 01:42:44 +00:00
Snider
07ce689a8c feat(github): enable free GitHub features
- dependabot.yml: automated updates for GitHub Actions and Go modules
- CODEOWNERS: auto-assign reviewers by path
- SECURITY.md: vulnerability reporting policy
- ISSUE_TEMPLATE/: structured bug reports and feature requests
- PULL_REQUEST_TEMPLATE.md: PR checklist

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 01:29:52 +00:00
Snider
c99101a29d feat(ide): add shared JetBrains/PhpStorm configuration
- Code style: PSR-12 for PHP, 2-space indent for JS/TS/YAML
- Inspection profile: Laravel-friendly, reduced noise in vendor
- Run configurations: Composer test/lint, PHPStan, clone-repos
- Scopes: Packages, Vendor, Tests for focused searches
- Dictionary: Project-specific terms (agentic, livewire, etc.)
- PHP 8.4 language level, Laravel Idea multimodule support
- File watcher: Pint auto-format (disabled by default)
- Excludes: vendor/ and node_modules/ for faster indexing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 01:22:33 +00:00
Snider
9a52fd937a fix(windows): improve PowerShell installer and add clone script
- Fix return value leakage in install-core.ps1 (suppressed with $null)
- Fix ACL -bor compatibility across PowerShell versions
- Handle unsigned/lightweight git tags in GPG verification
- Skip GPG verification for branch builds (main)
- Add explicit GOOS=windows for Go build
- Detect Windows syscall build errors with helpful message
- Add clone-repos.ps1 as Windows alternative to `core setup`
- Update CLAUDE.md with Windows-specific setup instructions

Closes #56 workaround documented

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 01:17:10 +00:00
Snider
621438a876 docs: update TODO with container image progress
- Added container images section (core-images)
- Tracked dual-registry workflow (GHCR + Docker Hub)
- Added core CLI issue #50 (linuxkit flags)
- Added DOCKERHUB_TOKEN rotation reminder

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 23:22:22 +00:00
Snider
438ad7bd65 fix: align container image naming convention
Use ghcr.io/host-uk/core-images:{tag} format where tag is the
image variant (developer, server-php) rather than path-based naming.

See: https://github.com/host-uk/core-images/issues/1

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 23:10:44 +00:00
Snider
63079ed187 feat: add developer container config with packages/ mount
- docker-compose.yml for standalone Docker usage
- .devcontainer/devcontainer.json for VS Code/Cursor
- Mounts packages/ as /workspace in container
- Persists home directory with named volume
- SSH and gitconfig mounted read-only

Uses ghcr.io/host-uk/core-images/developer:latest

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 22:58:09 +00:00
Snider
dff9bcb43c docs: mark PHP workflows complete 2026-01-31 22:50:27 +00:00
Snider
f1cb5c5c93 docs: add session TODO summary 2026-01-31 22:48:55 +00:00
Snider
6d34cbe33c docs: add contributor onboarding for distributed compute network
Host UK CIC mission: aggregate free tier compute to benefit OSS commons

Added:
- CONTRIBUTING.md: 5-minute contributor onboarding guide
- scripts/contribute.sh: One-command setup for new contributors
- Updated free-tier-services.md: Mission context, economics explained

The model:
- 100 contributors × free tiers = enterprise-scale compute
- core monitor aggregates findings from all sources
- Tasks routed to Host UK packages AND unfunded OSS projects
- LLMs learned from OSS, we give back

Who pays: Microsoft, Google, Groq (marketing budgets)
Who benefits: Open source commons

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 22:44:17 +00:00
Snider
9c10ff9b1c feat: add comprehensive free tier integrations
AI Services (contributor's fork pays):
- Groq: 14,400 req/day (Llama 3.3 70B)
- Mistral: 1M tokens/month
- Cohere: 1000 req/month (classification)
- Cloudflare AI: 10K neurons/day
- Gemini: 1500 req/day (existing)

Security Scanners (100% free, no keys):
- Semgrep: SAST
- Trivy: Container/IaC vulns
- Gitleaks: Secret detection
- OSV-Scanner: Google vuln DB
- Checkov: IaC security

All results:
- Upload to GitHub Security tab (SARIF)
- Create artifacts for core CLI to consume
- Feed into Agentic task queue

Doc: free-tier-services.md lists 50+ free services

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 22:36:27 +00:00
Snider
a78ef46133 feat: add AI worker workflows (Gemini + Jules)
Distributed AI compute using contributor's free tiers:

Gemini 2.0 Flash (ai-worker.yml):
- 1500 req/day free from Google
- Code review, security scan, bug detection
- Contributor sets GEMINI_API_KEY in fork secrets

Jules/Copilot (jules-dispatch.yml):
- Triggered by @jules or /jules comments
- Creates PRs to fix issues automatically
- Uses contributor's Copilot allowance (free for OSS)

Documentation (doc/free-tier-compute.md):
- Setup guide for all free tiers
- Compute distribution model diagram
- Donor fleet instructions

Innocent strategy: Jules commits fixes to contributor's fork 😇

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 22:30:38 +00:00
Snider
c03c49a539 ci: add fork-based compute workflows
Strategy: Heavy analysis runs on contributor's GitHub Actions allowance
Microsoft/GitHub subsidizes the compute through free tiers

Workflows:
- contributor-ci.yml: Full CI runs on fork (contributor pays)
- fork-ai-triage.yml: AI analysis, labeling, security scan (fork pays)
- fork-pr-analysis.yml: Upstream just verifies fork CI passed

Benefits:
- Unlimited scale via contributor free tiers
- AI/Copilot features use their allowance
- We only pay for lightweight verification
- Forks inherit these workflows automatically

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 22:27:08 +00:00
Snider
7c4e9222ef feat: add template bootstrap workflow and setup guide
When creating a new repo from this template:
- template-bootstrap.yml runs on first push
- Creates standard labels (agent:*, priority:*, type:*)
- Enables security features (Dependabot, vuln alerts)
- Creates setup checklist issue
- TEMPLATE_SETUP.md guides customization

Files to customize: repos.yaml, CLAUDE.md, README.md
Delete TEMPLATE_SETUP.md when done.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 22:24:05 +00:00
Snider
42d495a7e8 chore: add CodeRabbit configuration
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 21:41:44 +00:00
Snider
d6d4ddb15b ci: add security scanning workflow templates
Templates for repos to enable language-specific security scanning:
- security-php.yml: PHPStan + Semgrep SAST
- security-shell.yml: ShellCheck for bash scripts
- security-docker.yml: Hadolint for Dockerfiles

CodeQL default setup now enabled across all public repos for:
- Go, JavaScript/TypeScript (core, core-gui, build)
- JavaScript/TypeScript (core-admin, core-api, core-mcp, etc.)
- Actions workflow scanning (core-php, core-tenant, etc.)
- Python (ansible-*, docker-server-blockchain)
- C# (btcpayserver-docker)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 21:35:16 +00:00
Snider
c6139214eb fix: remove npm cache requirement from docs workflow 2026-01-31 20:40:00 +00:00
Snider
97aab0fcca docs: add VitePress documentation with GitHub Pages deployment
- VitePress config with canonical URLs to core.help
- Developer preview banner linking to main docs
- Documentation pages: quick-start, commands, core-folder, repos-yaml
- GitHub Actions workflow for Pages deployment

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 20:28:07 +00:00
Snider
8a921dfb2d ci: add CodeQL security scanning 2026-01-31 20:04:32 +00:00
Snider
b1aada9b0e docs: add project scope to gh auth setup
- Add read:project,project scopes to gh auth in install scripts
- Update troubleshooting docs for missing scopes
- Enable GitHub Projects access for workspace management

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 19:57:30 +00:00
Snider
99897636a1 ci: add cross-platform setup test workflow
- Add GitHub Actions workflow to test install scripts on Linux, macOS, Windows
- Runs weekly to catch upstream package changes
- Update install-deps.sh to configure gh with workflow scope
- Document workflow scope in README.md and CLAUDE.md troubleshooting

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 19:05:52 +00:00
Snider
9600277897 feat: add .core/ bridge system for fresh developer onboarding
Introduces a .core/ folder structure that provides:
- workspace.yaml for active package configuration
- Claude Code plugin with skills for multi-repo navigation
- Hook script suggesting core CLI over raw commands
- Full .core/ folder specification for other packages

Also restructures README.md and CLAUDE.md for better fresh
developer experience with clear "what happens" and "what's next"
sections.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 18:41:23 +00:00
Snider
cd79af256c docs: expand CLAUDE.md with setup instructions and package types
- Add initial setup section with make commands
- Document all core CLI workflow commands with flags
- Add package types table explaining repo architecture
- Update CORE_REPO path in Makefile

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 18:16:25 +00:00
Snider
89872c14a3
#1 from host-uk/feature/security-hardening
Security hardening for install scripts
2026-01-31 18:15:57 +00:00
unknown
15778b7a5f
fix: address CodeRabbit review feedback
- Separate local declaration from assignment to avoid masking errors (SC2155)
- Add exit code check after Homebrew installer execution
- Add exit code check after NodeSource setup script execution
- Add LASTEXITCODE check after Chocolatey installer execution

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 02:00:26 +11:00
unknown
d9a8fe279e
security: harden shell scripts with integrity verification
- Add SHA256 checksum verification to install-core.sh binary download
- Add version pinning (v0.1.0) to install-core.sh matching PowerShell version
- Use mktemp for secure temp files instead of predictable /tmp/core
- Add symlink detection to prevent directory traversal attacks
- Add GPG signature verification for git tags when available
- Add checksum verification for Go binary in install-deps.sh
- Add SHA384 signature verification for Composer installer
- Replace Invoke-Expression with download-verify-execute in install-deps.ps1
- Download Homebrew/NodeSource scripts to temp files before execution
- Add security documentation and warnings for external scripts

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 01:19:45 +11:00
unknown
05bd711219
fix: production quality improvements
- Add PowerShell 4.0+ version check at startup
- Add disk space check (100MB minimum) before install
- Add try/finally cleanup for download temp files (handles Ctrl+C)
- Fix PATH duplicate semicolons by trimming before append
- Update header with requirements documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 00:54:45 +11:00
unknown
1248758d46
security: fix single percent detection and add fsutil to PowerShell
setup.bat:
- Fix percent sign detection to catch single % (not just %%)
- Use string substitution for reliable detection

install-core.ps1:
- Add fsutil reparsepoint query to Test-SecureDirectory
- Matches batch script's dual-layer detection approach
- Keep .NET attribute check as fallback

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 00:46:46 +11:00
unknown
7eead7d48a
security: expand character filtering and improve junction detection
- Add backtick and percent sign to blocked characters
- Use fsutil reparsepoint query for reliable symlink/junction detection
- Keep attribute check as fallback defense layer

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 00:40:58 +11:00
unknown
991bb45d44
security: address remaining vulnerabilities from security review
install-core.ps1:
- Add Test-SecureDirectory and New-SecureDirectory to mitigate TOCTOU races
- Add Test-GitTagSignature for GPG verification of git tags
- Make ACL failures fatal for temp directories with retry logic
- Use precise PATH matching instead of substring contains
- Add unique GUID suffix to temp file names
- Document security controls and known limitations in header

setup.bat:
- Validate LOCALAPPDATA is within USERPROFILE
- Reject paths with invalid shell characters
- Add symlink detection for install directory
- Use delayed expansion variables for path safety

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 00:29:32 +11:00
unknown
c27158066e
security: harden install script against supply chain attacks
- Add SHA256 hash verification for downloaded binaries
- Pin to specific version (v0.1.0) instead of dev tag
- Validate LOCALAPPDATA is within user profile
- Detect symlink attacks on install directory
- Set restrictive ACL (owner-only) on temp build directories
- Validate PATH entries before modification
- Improve error handling with specific exception types

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 00:20:37 +11:00
unknown
53a2617fb8
refactor: use try/finally for Push-Location cleanup
Ensures Pop-Location is always called, even if Write-Err exits early.
Makes the cleanup pattern consistent and easier to maintain.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 00:11:34 +11:00
unknown
2e034f43f2
fix: add error handling and cleanup to install scripts
- Add git prerequisite check before cloning
- Check $LASTEXITCODE after git clone and go build
- Wrap build logic in try/finally for guaranteed temp cleanup
- Add error check after core setup command in batch file
- Show warning if core doctor reports issues

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 00:07:45 +11:00
unknown
86a80ec2e1
fix: Windows compatibility for install scripts
- Use Join-Path for reliable path handling in PowerShell
- Replace fragile New-TemporaryFile with GetTempPath + GUID
- Enable delayed expansion in batch for reliable errorlevel checks
- Add call statements for proper subprocess error propagation
- Verify core.exe exists before running commands
- Update repo reference and build path

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 00:00:23 +11:00
Snider
e7ee34ec5f chore: add .core/ to gitignore
Core CLI cache directory should not be tracked.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 15:19:11 +00:00
Snider
64bf2e281e feat: add installation scripts for cross-platform setup
- Add Makefile for make-based workflow
- Add setup.sh / setup.bat for one-command bootstrap
- Add scripts/install-deps.sh for macOS/Linux dependencies
- Add scripts/install-deps.ps1 for Windows (Chocolatey)
- Add scripts/install-core.sh to build/download core CLI
- Add scripts/install-core.ps1 for Windows
- Update README with installation instructions

Developers can now run:
  macOS/Linux: ./setup.sh (or make setup)
  Windows: .\setup.bat (as Admin)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 14:57:30 +00:00
Snider
71e8c1b2ef feat: initial developer workspace setup
- Add repos.yaml registry for all host-uk packages
- Add packages/ directory with .gitkeep (contents git-ignored)
- Add README with quickstart and prerequisites
- Add CLAUDE.md for AI-assisted development

Use `core setup` to clone all repos into packages/

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 14:50:45 +00:00