diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json new file mode 100644 index 0000000..3855c14 --- /dev/null +++ b/.claude-plugin/marketplace.json @@ -0,0 +1,40 @@ +{ + "name": "core-agent", + "description": "Host UK Claude Code plugin collection", + "owner": { + "name": "Host UK", + "email": "hello@host.uk.com" + }, + "plugins": [ + { + "name": "code", + "source": "./claude/code", + "description": "Core development plugin - hooks, scripts, data collection skills", + "version": "0.1.0" + }, + { + "name": "review", + "source": "./claude/review", + "description": "Code review automation - PR review, security checks", + "version": "0.1.0" + }, + { + "name": "verify", + "source": "./claude/verify", + "description": "Work verification - ensure tests pass, no debug statements", + "version": "0.1.0" + }, + { + "name": "qa", + "source": "./claude/qa", + "description": "Quality assurance - iterative fix loops, lint enforcement", + "version": "0.1.0" + }, + { + "name": "ci", + "source": "./claude/ci", + "description": "CI integration - GitHub Actions, test automation", + "version": "0.1.0" + } + ] +} diff --git a/CLAUDE.md b/CLAUDE.md index 50e7926..697aca4 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,21 +4,83 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co ## Overview -**core-agent** is the advanced in-house Claude Code plugin for the Host UK federated monorepo. The public version lives at `core-claude`. +**core-agent** is a monorepo of Claude Code plugins for the Host UK federated monorepo. It contains multiple focused plugins that can be installed individually or together. -This repository contains: -- Claude Code hooks, commands, and automation scripts -- Data collection skills for archiving OSS project data across platforms (since 2019) +## Plugins + +| Plugin | Description | Install | +|--------|-------------|---------| +| **code** | Core development - hooks, scripts, data collection | `claude plugin add host-uk/core-agent/claude/code` | +| **review** | Code review automation | `claude plugin add host-uk/core-agent/claude/review` | +| **verify** | Work verification | `claude plugin add host-uk/core-agent/claude/verify` | +| **qa** | Quality assurance loops | `claude plugin add host-uk/core-agent/claude/qa` | +| **ci** | CI/CD integration | `claude plugin add host-uk/core-agent/claude/ci` | + +Or install all via marketplace: +```bash +claude plugin add host-uk/core-agent +``` + +## Repository Structure + +``` +core-agent/ +├── .claude-plugin/ +│ └── marketplace.json # Plugin registry (enables auto-updates) +├── claude/ +│ ├── code/ # Core development plugin +│ │ ├── .claude-plugin/ +│ │ │ └── plugin.json +│ │ ├── hooks.json +│ │ ├── hooks/ +│ │ ├── scripts/ +│ │ ├── commands/ # /code:remember, /code:yes +│ │ ├── skills/ # Data collection skills +│ │ └── collection/ # Collection event hooks +│ ├── review/ # Code review plugin +│ │ ├── .claude-plugin/ +│ │ │ └── plugin.json +│ │ └── commands/ # /review:review +│ ├── verify/ # Verification plugin +│ │ ├── .claude-plugin/ +│ │ │ └── plugin.json +│ │ └── commands/ # /verify:verify +│ ├── qa/ # QA plugin +│ │ ├── .claude-plugin/ +│ │ │ └── plugin.json +│ │ ├── scripts/ +│ │ └── commands/ # /qa:qa, /qa:fix +│ └── ci/ # CI plugin +│ ├── .claude-plugin/ +│ │ └── plugin.json +│ └── commands/ # /ci:ci, /ci:workflow +├── CLAUDE.md +└── .gitignore +``` + +## Plugin Commands + +### code +- `/code:remember ` - Save context that persists across compaction +- `/code:yes ` - Auto-approve mode with commit requirement + +### review +- `/review:review [range]` - Code review on staged changes or commits + +### verify +- `/verify:verify [--quick|--full]` - Verify work is complete + +### qa +- `/qa:qa` - Iterative QA fix loop (runs until all checks pass) +- `/qa:fix ` - Fix a specific QA issue + +### ci +- `/ci:ci [status|run|logs|fix]` - CI status and management +- `/ci:workflow ` - Generate GitHub Actions workflows ## Core CLI Philosophy -**Always use `core` CLI instead of raw commands.** The `core` binary is a Go framework and CLI that handles the full E2E development lifecycle for Go and PHP ecosystems. - -Why this matters: -- Every agent using `core` is testing the framework -- Missing features get raised as issues on `host-uk/core` -- Code as if functionality exists (TDD approach) -- The CLI becomes battle-tested and eventually bulletproof +**Always use `core` CLI instead of raw commands.** The `core` binary handles the full E2E development lifecycle for Go and PHP ecosystems. ### Command Mappings @@ -27,213 +89,82 @@ Why this matters: | `go test` | `core go test` | | `go build` | `core build` | | `go fmt` | `core go fmt` | -| `go mod tidy` | `core go mod tidy` | | `golangci-lint` | `core go lint` | | `composer test` | `core php test` | | `./vendor/bin/pint` | `core php fmt` | | `./vendor/bin/phpstan` | `core php stan` | -| `php artisan serve` | `core php dev` | -| `git status` (multi-repo) | `core dev health` | -| `git commit` (multi-repo) | `core dev commit` | -| `git push` (multi-repo) | `core dev push` | -| `gh pr create` | `core ai task:pr` | ### Key Commands ```bash -# Development workflow -core dev health # Quick status across all repos +# Development +core dev health # Status across repos core dev work # Full workflow: status → commit → push -core dev commit # Claude-assisted commits -core dev apply --command # Run command across repos (agent-safe) -# Go development +# Go core go test # Run tests -core go test --filter=Name # Single test -core go cov # Coverage report -core go fmt # Format code -core go lint # Lint with golangci-lint core go qa # Full QA pipeline -# PHP development +# PHP core php test # Run Pest tests -core php fmt # Format with Pint -core php stan # PHPStan analysis core php qa # Full QA pipeline -core php dev # Start dev server -# Building & releases +# Building core build # Auto-detect and build -core build --targets=... # Cross-compile -core ci --we-are-go-for-launch # Publish release -# AI integration -core ai tasks # List available tasks +# AI core ai task # Auto-select a task -core ai task:commit # Commit with task reference core ai task:pr # Create PR for task -core ai task:complete # Mark task done - -# Quality & security -core qa health # Aggregate CI health -core security alerts # All security alerts -core security deps # Dependabot alerts -core doctor # Check environment ``` -### Missing Features? - -If `core` doesn't have what you need: - -1. **Raise an issue** on `host-uk/core` describing the feature -2. **Code as if it exists** - write the call you wish existed -3. **Write a TDD test** for the expected behaviour -4. The feature will get implemented and your code will work - -## Installation - -```bash -claude plugin add host-uk/core-agent -``` - -Or for local development: -```bash -claude plugin add /path/to/core-agent -``` - -## Repository Structure - -``` -core-agent/ -├── .claude-plugin/ -│ └── plugin.json # Plugin manifest (enables auto-updates) -├── hooks.json # Hook definitions -├── hooks/ # Hook scripts -│ └── prefer-core.sh # PreToolUse: enforce core CLI -├── scripts/ # Automation scripts -│ ├── pre-compact.sh # Save state before compaction -│ ├── session-start.sh # Restore context on startup -│ ├── php-format.sh # Auto-format PHP after edits -│ ├── go-format.sh # Auto-format Go after edits -│ ├── check-debug.sh # Warn about debug statements -│ ├── auto-approve.sh # /core:yes PermissionRequest hook -│ ├── ensure-commit.sh # /core:yes Stop hook -│ ├── qa-filter.sh # /core:qa PostToolUse hook -│ └── qa-verify.sh # /core:qa Stop hook -├── commands/ # Slash commands (skills) -│ ├── remember.md # /core:remember - persist facts -│ ├── yes.md # /core:yes - auto-approve mode -│ └── qa.md # /core:qa - iterative QA fix loop -├── collection/ # Data collection event hooks -│ ├── hooks.json # Collection hook registration -│ ├── dispatch.sh # Hook dispatcher -│ └── *.sh # Event handlers -└── skills/ # Data collection skills - ├── ledger-papers/ # Whitepaper archive (91+ papers) - ├── project-archaeology/ # Dead project excavation - ├── bitcointalk/ # BitcoinTalk thread collection - ├── coinmarketcap/ # Market data collection - ├── github-history/ # Git history preservation - └── ... # Other collectors -``` - -## Claude Plugin Features +## code Plugin Features ### Hooks | Hook | File | Purpose | |------|------|---------| | PreToolUse | `prefer-core.sh` | Block dangerous commands, enforce `core` CLI | -| PostToolUse | `php-format.sh` | Auto-format PHP via `core php fmt` | -| PostToolUse | `go-format.sh` | Auto-format Go via `core go fmt` | +| PostToolUse | `php-format.sh` | Auto-format PHP | +| PostToolUse | `go-format.sh` | Auto-format Go | | PostToolUse | `check-debug.sh` | Warn about debug statements | | PreCompact | `pre-compact.sh` | Save state before compaction | | SessionStart | `session-start.sh` | Restore context on startup | ### Blocked Patterns -The plugin blocks dangerous patterns and enforces `core` CLI: - **Destructive operations:** - `rm -rf` / `rm -r` (except node_modules, vendor, .cache) - `mv`/`cp` with wildcards - `xargs` with rm/mv/cp - `find -exec` with file operations - `sed -i` (in-place editing) -- `grep -l | ...` (mass file targeting) **Raw commands (use core instead):** - `go test/build/fmt/mod` → `core go *` -- `golangci-lint` → `core go lint` - `composer test` → `core php test` -- `./vendor/bin/pint` → `core php fmt` -- `php artisan serve` → `core php dev` -### Commands (Skills) +### Data Collection Skills -- `/core:remember ` - Save context that persists across compaction -- `/core:yes ` - Auto-approve mode with commit requirement -- `/core:qa` - Iterative QA fix loop (runs until all checks pass) - -### Context Preservation - -State is saved to `~/.claude/sessions/` before compaction: -- Working directory and branch -- Git status (modified files) -- In-progress todos -- User-saved context facts - -## Data Collection Skills - -### ledger-papers - -Archive of 91+ distributed ledger whitepapers across 15 categories. - -```bash -./discover.sh --all # List all papers -./discover.sh --category=privacy # Filter by category -``` - -### project-archaeology - -Excavates abandoned CryptoNote projects before data is lost. - -```bash -./excavate.sh masari # Full dig -./excavate.sh masari --scan-only # Check what's accessible -``` - -### Other collectors - -- `bitcointalk/` - BitcoinTalk thread archival -- `coinmarketcap/` - Historical price data -- `github-history/` - Repository history preservation -- `wallet-releases/` - Binary release archival -- `block-explorer/` - Blockchain data indexing +| Skill | Purpose | +|-------|---------| +| `ledger-papers/` | 91+ distributed ledger whitepapers | +| `project-archaeology/` | Dead project excavation | +| `bitcointalk/` | Forum thread archival | +| `coinmarketcap/` | Historical price data | +| `github-history/` | Repository history preservation | ## Development +### Adding a new plugin + +1. Create `claude//.claude-plugin/plugin.json` +2. Add commands to `claude//commands/` +3. Register in `.claude-plugin/marketplace.json` + ### Testing hooks locally ```bash -# Simulate PreToolUse hook input -echo '{"tool_input": {"command": "rm -rf /"}}' | bash ./hooks/prefer-core.sh -``` - -### Adding new hooks - -1. Add script to `scripts/` -2. Register in `hooks.json` using `${CLAUDE_PLUGIN_ROOT}/scripts/yourscript.sh` -3. Test with simulated input - -### Collection skill structure - -``` -skills// -├── SKILL.md # Documentation -├── discover.sh # Job generator (outputs URL|FILENAME|TYPE|METADATA) -├── process.sh # Job processor (optional) -└── registry.json # Data registry (optional) +echo '{"tool_input": {"command": "rm -rf /"}}' | bash ./claude/code/hooks/prefer-core.sh ``` ## Coding Standards @@ -242,9 +173,3 @@ skills// - **Shell scripts**: Use `#!/bin/bash`, read JSON with `jq` - **Hook output**: JSON with `decision` (approve/block) and optional `message` - **License**: EUPL-1.2 CIC - -## Integration with Host UK - -This plugin is designed for use across the Host UK federated monorepo. It enforces the `core` CLI for multi-repo operations. See `/Users/snider/Code/host-uk/CLAUDE.md` for full monorepo documentation. - -The `core` CLI source lives at `host-uk/core` - raise issues there for missing features. diff --git a/claude/ci/.claude-plugin/plugin.json b/claude/ci/.claude-plugin/plugin.json new file mode 100644 index 0000000..d21ddce --- /dev/null +++ b/claude/ci/.claude-plugin/plugin.json @@ -0,0 +1,8 @@ +{ + "name": "ci", + "description": "CI integration - GitHub Actions status, workflow management", + "version": "0.1.0", + "author": { + "name": "Host UK" + } +} diff --git a/claude/ci/commands/ci.md b/claude/ci/commands/ci.md new file mode 100644 index 0000000..2471186 --- /dev/null +++ b/claude/ci/commands/ci.md @@ -0,0 +1,80 @@ +--- +name: ci +description: Check CI status and manage workflows +args: [status|run|logs|fix] +--- + +# CI Integration + +Check GitHub Actions status and manage CI workflows. + +## Commands + +### Status (default) +``` +/ci:ci +/ci:ci status +``` + +Check current CI status for the repo/branch. + +### Run workflow +``` +/ci:ci run +/ci:ci run tests +``` + +Trigger a workflow run. + +### View logs +``` +/ci:ci logs +/ci:ci logs 12345 +``` + +View logs from a workflow run. + +### Fix failing CI +``` +/ci:ci fix +``` + +Analyse failing CI and suggest fixes. + +## Implementation + +### Check status +```bash +gh run list --limit 5 +gh run view --log-failed +``` + +### Trigger workflow +```bash +gh workflow run tests.yml +``` + +### View logs +```bash +gh run view 12345 --log +``` + +## CI Status Report + +```markdown +## CI Status: main + +| Workflow | Status | Duration | Commit | +|----------|--------|----------|--------| +| Tests | ✓ passing | 2m 34s | abc123 | +| Lint | ✓ passing | 45s | abc123 | +| Build | ✗ failed | 1m 12s | abc123 | + +### Failing: Build +``` +Error: go build failed + pkg/api/handler.go:42: undefined: ErrNotFound +``` + +**Suggested fix**: Add missing error definition +``` diff --git a/claude/ci/commands/workflow.md b/claude/ci/commands/workflow.md new file mode 100644 index 0000000..a98b974 --- /dev/null +++ b/claude/ci/commands/workflow.md @@ -0,0 +1,76 @@ +--- +name: workflow +description: Create or update GitHub Actions workflow +args: +--- + +# Workflow Generator + +Create or update GitHub Actions workflows. + +## Workflow Types + +### test +Standard test workflow for Go/PHP projects. + +### lint +Linting workflow with golangci-lint or PHPStan. + +### release +Release workflow with goreleaser or similar. + +### deploy +Deployment workflow (requires configuration). + +## Usage + +``` +/ci:workflow test +/ci:workflow lint +/ci:workflow release +``` + +## Templates + +### Go Test Workflow +```yaml +name: Tests + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: '1.22' + - run: go test -v ./... +``` + +### PHP Test Workflow +```yaml +name: Tests + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: shivammathur/setup-php@v2 + with: + php-version: '8.3' + - run: composer install + - run: composer test +``` diff --git a/.claude-plugin/plugin.json b/claude/code/.claude-plugin/plugin.json similarity index 100% rename from .claude-plugin/plugin.json rename to claude/code/.claude-plugin/plugin.json diff --git a/collection/HOOKS.md b/claude/code/collection/HOOKS.md similarity index 100% rename from collection/HOOKS.md rename to claude/code/collection/HOOKS.md diff --git a/collection/collect-whitepaper.sh b/claude/code/collection/collect-whitepaper.sh similarity index 100% rename from collection/collect-whitepaper.sh rename to claude/code/collection/collect-whitepaper.sh diff --git a/collection/dispatch.sh b/claude/code/collection/dispatch.sh similarity index 100% rename from collection/dispatch.sh rename to claude/code/collection/dispatch.sh diff --git a/collection/hooks.json b/claude/code/collection/hooks.json similarity index 100% rename from collection/hooks.json rename to claude/code/collection/hooks.json diff --git a/collection/update-index.sh b/claude/code/collection/update-index.sh similarity index 100% rename from collection/update-index.sh rename to claude/code/collection/update-index.sh diff --git a/commands/qa.md b/claude/code/commands/qa.md similarity index 100% rename from commands/qa.md rename to claude/code/commands/qa.md diff --git a/commands/remember.md b/claude/code/commands/remember.md similarity index 100% rename from commands/remember.md rename to claude/code/commands/remember.md diff --git a/commands/yes.md b/claude/code/commands/yes.md similarity index 100% rename from commands/yes.md rename to claude/code/commands/yes.md diff --git a/hooks.json b/claude/code/hooks.json similarity index 100% rename from hooks.json rename to claude/code/hooks.json diff --git a/hooks/prefer-core.sh b/claude/code/hooks/prefer-core.sh similarity index 100% rename from hooks/prefer-core.sh rename to claude/code/hooks/prefer-core.sh diff --git a/scripts/auto-approve.sh b/claude/code/scripts/auto-approve.sh similarity index 100% rename from scripts/auto-approve.sh rename to claude/code/scripts/auto-approve.sh diff --git a/scripts/block-docs.sh b/claude/code/scripts/block-docs.sh similarity index 100% rename from scripts/block-docs.sh rename to claude/code/scripts/block-docs.sh diff --git a/scripts/capture-context.sh b/claude/code/scripts/capture-context.sh similarity index 100% rename from scripts/capture-context.sh rename to claude/code/scripts/capture-context.sh diff --git a/scripts/check-debug.sh b/claude/code/scripts/check-debug.sh similarity index 100% rename from scripts/check-debug.sh rename to claude/code/scripts/check-debug.sh diff --git a/scripts/ensure-commit.sh b/claude/code/scripts/ensure-commit.sh similarity index 100% rename from scripts/ensure-commit.sh rename to claude/code/scripts/ensure-commit.sh diff --git a/scripts/extract-actionables.sh b/claude/code/scripts/extract-actionables.sh similarity index 100% rename from scripts/extract-actionables.sh rename to claude/code/scripts/extract-actionables.sh diff --git a/scripts/go-format.sh b/claude/code/scripts/go-format.sh similarity index 100% rename from scripts/go-format.sh rename to claude/code/scripts/go-format.sh diff --git a/scripts/php-format.sh b/claude/code/scripts/php-format.sh similarity index 100% rename from scripts/php-format.sh rename to claude/code/scripts/php-format.sh diff --git a/scripts/post-commit-check.sh b/claude/code/scripts/post-commit-check.sh similarity index 100% rename from scripts/post-commit-check.sh rename to claude/code/scripts/post-commit-check.sh diff --git a/scripts/pr-created.sh b/claude/code/scripts/pr-created.sh similarity index 100% rename from scripts/pr-created.sh rename to claude/code/scripts/pr-created.sh diff --git a/scripts/pre-compact.sh b/claude/code/scripts/pre-compact.sh similarity index 100% rename from scripts/pre-compact.sh rename to claude/code/scripts/pre-compact.sh diff --git a/scripts/qa-filter.sh b/claude/code/scripts/qa-filter.sh similarity index 100% rename from scripts/qa-filter.sh rename to claude/code/scripts/qa-filter.sh diff --git a/scripts/qa-verify.sh b/claude/code/scripts/qa-verify.sh similarity index 100% rename from scripts/qa-verify.sh rename to claude/code/scripts/qa-verify.sh diff --git a/scripts/session-start.sh b/claude/code/scripts/session-start.sh similarity index 100% rename from scripts/session-start.sh rename to claude/code/scripts/session-start.sh diff --git a/scripts/suggest-compact.sh b/claude/code/scripts/suggest-compact.sh similarity index 100% rename from scripts/suggest-compact.sh rename to claude/code/scripts/suggest-compact.sh diff --git a/skills/bitcointalk/SKILL.md b/claude/code/skills/bitcointalk/SKILL.md similarity index 100% rename from skills/bitcointalk/SKILL.md rename to claude/code/skills/bitcointalk/SKILL.md diff --git a/skills/bitcointalk/collect.sh b/claude/code/skills/bitcointalk/collect.sh similarity index 100% rename from skills/bitcointalk/collect.sh rename to claude/code/skills/bitcointalk/collect.sh diff --git a/skills/block-explorer/SKILL.md b/claude/code/skills/block-explorer/SKILL.md similarity index 100% rename from skills/block-explorer/SKILL.md rename to claude/code/skills/block-explorer/SKILL.md diff --git a/skills/block-explorer/generate-jobs.sh b/claude/code/skills/block-explorer/generate-jobs.sh similarity index 100% rename from skills/block-explorer/generate-jobs.sh rename to claude/code/skills/block-explorer/generate-jobs.sh diff --git a/skills/coinmarketcap/SKILL.md b/claude/code/skills/coinmarketcap/SKILL.md similarity index 100% rename from skills/coinmarketcap/SKILL.md rename to claude/code/skills/coinmarketcap/SKILL.md diff --git a/skills/coinmarketcap/generate-jobs.sh b/claude/code/skills/coinmarketcap/generate-jobs.sh similarity index 100% rename from skills/coinmarketcap/generate-jobs.sh rename to claude/code/skills/coinmarketcap/generate-jobs.sh diff --git a/skills/coinmarketcap/process.sh b/claude/code/skills/coinmarketcap/process.sh similarity index 100% rename from skills/coinmarketcap/process.sh rename to claude/code/skills/coinmarketcap/process.sh diff --git a/skills/community-chat/SKILL.md b/claude/code/skills/community-chat/SKILL.md similarity index 100% rename from skills/community-chat/SKILL.md rename to claude/code/skills/community-chat/SKILL.md diff --git a/skills/cryptonote-discovery/SKILL.md b/claude/code/skills/cryptonote-discovery/SKILL.md similarity index 100% rename from skills/cryptonote-discovery/SKILL.md rename to claude/code/skills/cryptonote-discovery/SKILL.md diff --git a/skills/cryptonote-discovery/discover.sh b/claude/code/skills/cryptonote-discovery/discover.sh similarity index 100% rename from skills/cryptonote-discovery/discover.sh rename to claude/code/skills/cryptonote-discovery/discover.sh diff --git a/skills/cryptonote-discovery/registry.json b/claude/code/skills/cryptonote-discovery/registry.json similarity index 100% rename from skills/cryptonote-discovery/registry.json rename to claude/code/skills/cryptonote-discovery/registry.json diff --git a/skills/github-history/SKILL.md b/claude/code/skills/github-history/SKILL.md similarity index 100% rename from skills/github-history/SKILL.md rename to claude/code/skills/github-history/SKILL.md diff --git a/skills/github-history/collect.sh b/claude/code/skills/github-history/collect.sh similarity index 100% rename from skills/github-history/collect.sh rename to claude/code/skills/github-history/collect.sh diff --git a/skills/job-collector/SKILL.md b/claude/code/skills/job-collector/SKILL.md similarity index 100% rename from skills/job-collector/SKILL.md rename to claude/code/skills/job-collector/SKILL.md diff --git a/skills/job-collector/generate-jobs.sh b/claude/code/skills/job-collector/generate-jobs.sh similarity index 100% rename from skills/job-collector/generate-jobs.sh rename to claude/code/skills/job-collector/generate-jobs.sh diff --git a/skills/job-collector/process.sh b/claude/code/skills/job-collector/process.sh similarity index 100% rename from skills/job-collector/process.sh rename to claude/code/skills/job-collector/process.sh diff --git a/skills/ledger-papers/SKILL.md b/claude/code/skills/ledger-papers/SKILL.md similarity index 100% rename from skills/ledger-papers/SKILL.md rename to claude/code/skills/ledger-papers/SKILL.md diff --git a/skills/ledger-papers/archive/00-genesis/README.md b/claude/code/skills/ledger-papers/archive/00-genesis/README.md similarity index 100% rename from skills/ledger-papers/archive/00-genesis/README.md rename to claude/code/skills/ledger-papers/archive/00-genesis/README.md diff --git a/skills/ledger-papers/archive/01-cryptonote/README.md b/claude/code/skills/ledger-papers/archive/01-cryptonote/README.md similarity index 100% rename from skills/ledger-papers/archive/01-cryptonote/README.md rename to claude/code/skills/ledger-papers/archive/01-cryptonote/README.md diff --git a/skills/ledger-papers/archive/02-mrl/README.md b/claude/code/skills/ledger-papers/archive/02-mrl/README.md similarity index 100% rename from skills/ledger-papers/archive/02-mrl/README.md rename to claude/code/skills/ledger-papers/archive/02-mrl/README.md diff --git a/skills/ledger-papers/archive/03-privacy/README.md b/claude/code/skills/ledger-papers/archive/03-privacy/README.md similarity index 100% rename from skills/ledger-papers/archive/03-privacy/README.md rename to claude/code/skills/ledger-papers/archive/03-privacy/README.md diff --git a/skills/ledger-papers/archive/04-smart-contracts/README.md b/claude/code/skills/ledger-papers/archive/04-smart-contracts/README.md similarity index 100% rename from skills/ledger-papers/archive/04-smart-contracts/README.md rename to claude/code/skills/ledger-papers/archive/04-smart-contracts/README.md diff --git a/skills/ledger-papers/archive/05-layer2/README.md b/claude/code/skills/ledger-papers/archive/05-layer2/README.md similarity index 100% rename from skills/ledger-papers/archive/05-layer2/README.md rename to claude/code/skills/ledger-papers/archive/05-layer2/README.md diff --git a/skills/ledger-papers/archive/06-consensus/README.md b/claude/code/skills/ledger-papers/archive/06-consensus/README.md similarity index 100% rename from skills/ledger-papers/archive/06-consensus/README.md rename to claude/code/skills/ledger-papers/archive/06-consensus/README.md diff --git a/skills/ledger-papers/archive/07-cryptography/README.md b/claude/code/skills/ledger-papers/archive/07-cryptography/README.md similarity index 100% rename from skills/ledger-papers/archive/07-cryptography/README.md rename to claude/code/skills/ledger-papers/archive/07-cryptography/README.md diff --git a/skills/ledger-papers/archive/08-defi/README.md b/claude/code/skills/ledger-papers/archive/08-defi/README.md similarity index 100% rename from skills/ledger-papers/archive/08-defi/README.md rename to claude/code/skills/ledger-papers/archive/08-defi/README.md diff --git a/skills/ledger-papers/archive/09-storage/README.md b/claude/code/skills/ledger-papers/archive/09-storage/README.md similarity index 100% rename from skills/ledger-papers/archive/09-storage/README.md rename to claude/code/skills/ledger-papers/archive/09-storage/README.md diff --git a/skills/ledger-papers/archive/10-identity/README.md b/claude/code/skills/ledger-papers/archive/10-identity/README.md similarity index 100% rename from skills/ledger-papers/archive/10-identity/README.md rename to claude/code/skills/ledger-papers/archive/10-identity/README.md diff --git a/skills/ledger-papers/archive/11-dag/README.md b/claude/code/skills/ledger-papers/archive/11-dag/README.md similarity index 100% rename from skills/ledger-papers/archive/11-dag/README.md rename to claude/code/skills/ledger-papers/archive/11-dag/README.md diff --git a/skills/ledger-papers/archive/12-mev/README.md b/claude/code/skills/ledger-papers/archive/12-mev/README.md similarity index 100% rename from skills/ledger-papers/archive/12-mev/README.md rename to claude/code/skills/ledger-papers/archive/12-mev/README.md diff --git a/skills/ledger-papers/archive/13-standards-btc/README.md b/claude/code/skills/ledger-papers/archive/13-standards-btc/README.md similarity index 100% rename from skills/ledger-papers/archive/13-standards-btc/README.md rename to claude/code/skills/ledger-papers/archive/13-standards-btc/README.md diff --git a/skills/ledger-papers/archive/14-standards-eth/README.md b/claude/code/skills/ledger-papers/archive/14-standards-eth/README.md similarity index 100% rename from skills/ledger-papers/archive/14-standards-eth/README.md rename to claude/code/skills/ledger-papers/archive/14-standards-eth/README.md diff --git a/skills/ledger-papers/archive/15-p2p/README.md b/claude/code/skills/ledger-papers/archive/15-p2p/README.md similarity index 100% rename from skills/ledger-papers/archive/15-p2p/README.md rename to claude/code/skills/ledger-papers/archive/15-p2p/README.md diff --git a/skills/ledger-papers/archive/16-zk-advanced/README.md b/claude/code/skills/ledger-papers/archive/16-zk-advanced/README.md similarity index 100% rename from skills/ledger-papers/archive/16-zk-advanced/README.md rename to claude/code/skills/ledger-papers/archive/16-zk-advanced/README.md diff --git a/skills/ledger-papers/archive/17-oracles/README.md b/claude/code/skills/ledger-papers/archive/17-oracles/README.md similarity index 100% rename from skills/ledger-papers/archive/17-oracles/README.md rename to claude/code/skills/ledger-papers/archive/17-oracles/README.md diff --git a/skills/ledger-papers/archive/18-bridges/README.md b/claude/code/skills/ledger-papers/archive/18-bridges/README.md similarity index 100% rename from skills/ledger-papers/archive/18-bridges/README.md rename to claude/code/skills/ledger-papers/archive/18-bridges/README.md diff --git a/skills/ledger-papers/archive/19-attacks/README.md b/claude/code/skills/ledger-papers/archive/19-attacks/README.md similarity index 100% rename from skills/ledger-papers/archive/19-attacks/README.md rename to claude/code/skills/ledger-papers/archive/19-attacks/README.md diff --git a/skills/ledger-papers/archive/20-cryptonote-projects/README.md b/claude/code/skills/ledger-papers/archive/20-cryptonote-projects/README.md similarity index 100% rename from skills/ledger-papers/archive/20-cryptonote-projects/README.md rename to claude/code/skills/ledger-papers/archive/20-cryptonote-projects/README.md diff --git a/skills/ledger-papers/archive/20-cryptonote-projects/graft/README.md b/claude/code/skills/ledger-papers/archive/20-cryptonote-projects/graft/README.md similarity index 100% rename from skills/ledger-papers/archive/20-cryptonote-projects/graft/README.md rename to claude/code/skills/ledger-papers/archive/20-cryptonote-projects/graft/README.md diff --git a/skills/ledger-papers/archive/20-cryptonote-projects/graft/RFC-001-GSD-general-supernode-design.md b/claude/code/skills/ledger-papers/archive/20-cryptonote-projects/graft/RFC-001-GSD-general-supernode-design.md similarity index 100% rename from skills/ledger-papers/archive/20-cryptonote-projects/graft/RFC-001-GSD-general-supernode-design.md rename to claude/code/skills/ledger-papers/archive/20-cryptonote-projects/graft/RFC-001-GSD-general-supernode-design.md diff --git a/skills/ledger-papers/archive/20-cryptonote-projects/graft/RFC-002-SLS-supernode-list-selection.md b/claude/code/skills/ledger-papers/archive/20-cryptonote-projects/graft/RFC-002-SLS-supernode-list-selection.md similarity index 100% rename from skills/ledger-papers/archive/20-cryptonote-projects/graft/RFC-002-SLS-supernode-list-selection.md rename to claude/code/skills/ledger-papers/archive/20-cryptonote-projects/graft/RFC-002-SLS-supernode-list-selection.md diff --git a/skills/ledger-papers/archive/20-cryptonote-projects/graft/RFC-003-RTVF-rta-transaction-validation.md b/claude/code/skills/ledger-papers/archive/20-cryptonote-projects/graft/RFC-003-RTVF-rta-transaction-validation.md similarity index 100% rename from skills/ledger-papers/archive/20-cryptonote-projects/graft/RFC-003-RTVF-rta-transaction-validation.md rename to claude/code/skills/ledger-papers/archive/20-cryptonote-projects/graft/RFC-003-RTVF-rta-transaction-validation.md diff --git a/skills/ledger-papers/archive/20-cryptonote-projects/graft/RFC-005-DF-disqualification-flow.md b/claude/code/skills/ledger-papers/archive/20-cryptonote-projects/graft/RFC-005-DF-disqualification-flow.md similarity index 100% rename from skills/ledger-papers/archive/20-cryptonote-projects/graft/RFC-005-DF-disqualification-flow.md rename to claude/code/skills/ledger-papers/archive/20-cryptonote-projects/graft/RFC-005-DF-disqualification-flow.md diff --git a/skills/ledger-papers/archive/20-cryptonote-projects/graft/auth-sample-selection-algorithm.md b/claude/code/skills/ledger-papers/archive/20-cryptonote-projects/graft/auth-sample-selection-algorithm.md similarity index 100% rename from skills/ledger-papers/archive/20-cryptonote-projects/graft/auth-sample-selection-algorithm.md rename to claude/code/skills/ledger-papers/archive/20-cryptonote-projects/graft/auth-sample-selection-algorithm.md diff --git a/skills/ledger-papers/archive/20-cryptonote-projects/graft/blockchain-based-list-selection-analysis.md b/claude/code/skills/ledger-papers/archive/20-cryptonote-projects/graft/blockchain-based-list-selection-analysis.md similarity index 100% rename from skills/ledger-papers/archive/20-cryptonote-projects/graft/blockchain-based-list-selection-analysis.md rename to claude/code/skills/ledger-papers/archive/20-cryptonote-projects/graft/blockchain-based-list-selection-analysis.md diff --git a/skills/ledger-papers/archive/20-cryptonote-projects/graft/communication-options-p2p-design.md b/claude/code/skills/ledger-papers/archive/20-cryptonote-projects/graft/communication-options-p2p-design.md similarity index 100% rename from skills/ledger-papers/archive/20-cryptonote-projects/graft/communication-options-p2p-design.md rename to claude/code/skills/ledger-papers/archive/20-cryptonote-projects/graft/communication-options-p2p-design.md diff --git a/skills/ledger-papers/archive/20-cryptonote-projects/graft/rta-double-spend-attack-vectors.md b/claude/code/skills/ledger-papers/archive/20-cryptonote-projects/graft/rta-double-spend-attack-vectors.md similarity index 100% rename from skills/ledger-papers/archive/20-cryptonote-projects/graft/rta-double-spend-attack-vectors.md rename to claude/code/skills/ledger-papers/archive/20-cryptonote-projects/graft/rta-double-spend-attack-vectors.md diff --git a/skills/ledger-papers/archive/20-cryptonote-projects/graft/udht-implementation.md b/claude/code/skills/ledger-papers/archive/20-cryptonote-projects/graft/udht-implementation.md similarity index 100% rename from skills/ledger-papers/archive/20-cryptonote-projects/graft/udht-implementation.md rename to claude/code/skills/ledger-papers/archive/20-cryptonote-projects/graft/udht-implementation.md diff --git a/skills/ledger-papers/archive/README.md b/claude/code/skills/ledger-papers/archive/README.md similarity index 100% rename from skills/ledger-papers/archive/README.md rename to claude/code/skills/ledger-papers/archive/README.md diff --git a/skills/ledger-papers/discover.sh b/claude/code/skills/ledger-papers/discover.sh similarity index 100% rename from skills/ledger-papers/discover.sh rename to claude/code/skills/ledger-papers/discover.sh diff --git a/skills/ledger-papers/registry.json b/claude/code/skills/ledger-papers/registry.json similarity index 100% rename from skills/ledger-papers/registry.json rename to claude/code/skills/ledger-papers/registry.json diff --git a/skills/mining-pools/SKILL.md b/claude/code/skills/mining-pools/SKILL.md similarity index 100% rename from skills/mining-pools/SKILL.md rename to claude/code/skills/mining-pools/SKILL.md diff --git a/skills/mining-pools/generate-jobs.sh b/claude/code/skills/mining-pools/generate-jobs.sh similarity index 100% rename from skills/mining-pools/generate-jobs.sh rename to claude/code/skills/mining-pools/generate-jobs.sh diff --git a/skills/project-archaeology/SKILL.md b/claude/code/skills/project-archaeology/SKILL.md similarity index 100% rename from skills/project-archaeology/SKILL.md rename to claude/code/skills/project-archaeology/SKILL.md diff --git a/skills/project-archaeology/digs/graftnetwork/SALVAGE-REPORT.md b/claude/code/skills/project-archaeology/digs/graftnetwork/SALVAGE-REPORT.md similarity index 100% rename from skills/project-archaeology/digs/graftnetwork/SALVAGE-REPORT.md rename to claude/code/skills/project-archaeology/digs/graftnetwork/SALVAGE-REPORT.md diff --git a/skills/project-archaeology/excavate.sh b/claude/code/skills/project-archaeology/excavate.sh similarity index 100% rename from skills/project-archaeology/excavate.sh rename to claude/code/skills/project-archaeology/excavate.sh diff --git a/skills/project-archaeology/templates/LESSONS.md b/claude/code/skills/project-archaeology/templates/LESSONS.md similarity index 100% rename from skills/project-archaeology/templates/LESSONS.md rename to claude/code/skills/project-archaeology/templates/LESSONS.md diff --git a/skills/project-archaeology/templates/SALVAGE-REPORT.md b/claude/code/skills/project-archaeology/templates/SALVAGE-REPORT.md similarity index 100% rename from skills/project-archaeology/templates/SALVAGE-REPORT.md rename to claude/code/skills/project-archaeology/templates/SALVAGE-REPORT.md diff --git a/skills/wallet-releases/SKILL.md b/claude/code/skills/wallet-releases/SKILL.md similarity index 100% rename from skills/wallet-releases/SKILL.md rename to claude/code/skills/wallet-releases/SKILL.md diff --git a/skills/whitepaper-archive/SKILL.md b/claude/code/skills/whitepaper-archive/SKILL.md similarity index 100% rename from skills/whitepaper-archive/SKILL.md rename to claude/code/skills/whitepaper-archive/SKILL.md diff --git a/claude/qa/.claude-plugin/plugin.json b/claude/qa/.claude-plugin/plugin.json new file mode 100644 index 0000000..cad3074 --- /dev/null +++ b/claude/qa/.claude-plugin/plugin.json @@ -0,0 +1,8 @@ +{ + "name": "qa", + "description": "Quality assurance - iterative fix loops, lint enforcement, test coverage", + "version": "0.1.0", + "author": { + "name": "Host UK" + } +} diff --git a/claude/qa/commands/fix.md b/claude/qa/commands/fix.md new file mode 100644 index 0000000..ece31cb --- /dev/null +++ b/claude/qa/commands/fix.md @@ -0,0 +1,57 @@ +--- +name: fix +description: Fix a specific QA issue +args: +--- + +# Fix Issue + +Fix a specific issue from QA output. + +## Usage + +``` +/qa:fix undefined: ErrNotFound in pkg/api/handler.go:42 +/qa:fix TestCreateUser failing - expected 200, got 500 +/qa:fix pkg/api/handler.go needs formatting +``` + +## Process + +1. **Parse the issue**: Extract file, line, error type +2. **Read context**: Read the file around the error line +3. **Understand**: Determine root cause +4. **Fix**: Make minimal change to resolve +5. **Verify**: Run relevant test/lint check + +## Issue Types + +### Undefined variable/type +``` +undefined: ErrNotFound +``` +→ Add missing import or define the variable + +### Test failure +``` +expected 200, got 500 +``` +→ Read test and implementation, fix logic + +### Formatting +``` +file needs formatting +``` +→ Run `core go fmt` or `core php fmt` + +### Lint warning +``` +ineffectual assignment to err +``` +→ Use the variable or remove assignment + +### Type error +``` +cannot use X as Y +``` +→ Fix type conversion or function signature diff --git a/claude/qa/commands/qa.md b/claude/qa/commands/qa.md new file mode 100644 index 0000000..0d82c6e --- /dev/null +++ b/claude/qa/commands/qa.md @@ -0,0 +1,66 @@ +--- +name: qa +description: Run full QA pipeline and fix all issues iteratively +hooks: + PostToolUse: + - matcher: "Bash" + hooks: + - type: command + command: "${CLAUDE_PLUGIN_ROOT}/scripts/qa-filter.sh" + Stop: + - hooks: + - type: command + command: "${CLAUDE_PLUGIN_ROOT}/scripts/qa-verify.sh" + once: true +--- + +# QA Fix Loop + +Run the full QA pipeline and fix all issues until everything passes. + +## Detection + +First, detect the project type: +- If `go.mod` exists → Go project → `core go qa` +- If `composer.json` exists → PHP project → `core php qa` +- If both exist → check current directory or ask + +## Process + +1. **Run QA**: Execute `core go qa` or `core php qa` +2. **Parse issues**: Extract failures from output +3. **Fix each issue**: Address one at a time, simplest first +4. **Re-verify**: After fixes, re-run QA +5. **Repeat**: Until all checks pass +6. **Report**: Summary of what was fixed + +## Issue Priority + +Fix in this order (fastest feedback first): +1. **fmt** - formatting (auto-fix with `core go fmt`) +2. **lint** - static analysis (usually quick fixes) +3. **test** - failing tests (may need investigation) +4. **build** - compilation errors (fix before tests can run) + +## Fixing Strategy + +**Formatting (fmt/pint):** +- Just run `core go fmt` or `core php fmt` +- No code reading needed + +**Lint errors:** +- Read the specific file:line +- Understand the error type +- Make minimal fix + +**Test failures:** +- Read the test file to understand expectation +- Read the implementation +- Fix the root cause (not just the symptom) + +## Stop Condition + +Only stop when: +- All QA checks pass, OR +- User explicitly cancels, OR +- Same error repeats 3 times (stuck - ask for help) diff --git a/claude/qa/scripts/qa-filter.sh b/claude/qa/scripts/qa-filter.sh new file mode 100755 index 0000000..6a83930 --- /dev/null +++ b/claude/qa/scripts/qa-filter.sh @@ -0,0 +1,62 @@ +#!/bin/bash +# Filter QA output to show only actionable issues during /core:qa mode +# +# PostToolUse hook that processes QA command output and extracts +# only the failures, hiding verbose success output. + +read -r input +COMMAND=$(echo "$input" | jq -r '.tool_input.command // empty') +OUTPUT=$(echo "$input" | jq -r '.tool_response.stdout // .tool_response.output // empty') +EXIT_CODE=$(echo "$input" | jq -r '.tool_response.exit_code // 0') + +# Only process QA-related commands +case "$COMMAND" in + "core go qa"*|"core php qa"*|"core go test"*|"core php test"*|"core go lint"*|"core php stan"*) + ;; + *) + # Not a QA command, pass through unchanged + echo "$input" + exit 0 + ;; +esac + +# Extract failures from output +FAILURES=$(echo "$OUTPUT" | grep -E "^(FAIL|---\s*FAIL|✗|ERROR|undefined:|error:|panic:)" | head -20) +SUMMARY=$(echo "$OUTPUT" | grep -E "^(fmt:|lint:|test:|pint:|stan:|=== RESULT ===)" | tail -5) + +# Also grab specific error lines with file:line references +FILE_ERRORS=$(echo "$OUTPUT" | grep -E "^[a-zA-Z0-9_/.-]+\.(go|php):[0-9]+:" | head -10) + +if [ -z "$FAILURES" ] && [ "$EXIT_CODE" = "0" ]; then + # All passed - show brief confirmation + cat << 'EOF' +{ + "suppressOutput": true, + "hookSpecificOutput": { + "hookEventName": "PostToolUse", + "additionalContext": "✓ QA passed" + } +} +EOF +else + # Combine failures and file errors + ISSUES="$FAILURES" + if [ -n "$FILE_ERRORS" ]; then + ISSUES="$ISSUES +$FILE_ERRORS" + fi + + # Escape for JSON + ISSUES_ESCAPED=$(echo "$ISSUES" | sed 's/\\/\\\\/g' | sed 's/"/\\"/g' | sed ':a;N;$!ba;s/\n/\\n/g') + SUMMARY_ESCAPED=$(echo "$SUMMARY" | sed 's/\\/\\\\/g' | sed 's/"/\\"/g' | sed ':a;N;$!ba;s/\n/ | /g') + + cat << EOF +{ + "suppressOutput": true, + "hookSpecificOutput": { + "hookEventName": "PostToolUse", + "additionalContext": "## QA Issues\n\n\`\`\`\n$ISSUES_ESCAPED\n\`\`\`\n\n**Summary:** $SUMMARY_ESCAPED" + } +} +EOF +fi diff --git a/claude/qa/scripts/qa-verify.sh b/claude/qa/scripts/qa-verify.sh new file mode 100755 index 0000000..c9257a2 --- /dev/null +++ b/claude/qa/scripts/qa-verify.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# Verify QA passes before stopping during /core:qa mode +# +# Stop hook that runs QA checks and blocks if any failures exist. +# Ensures Claude fixes all issues before completing the task. + +read -r input +STOP_ACTIVE=$(echo "$input" | jq -r '.stop_hook_active // false') + +# Prevent infinite loop +if [ "$STOP_ACTIVE" = "true" ]; then + exit 0 +fi + +# Detect project type and run QA +if [ -f "go.mod" ]; then + PROJECT="go" + RESULT=$(core go qa 2>&1) || true +elif [ -f "composer.json" ]; then + PROJECT="php" + RESULT=$(core php qa 2>&1) || true +else + # Not a Go or PHP project, allow stop + exit 0 +fi + +# Check if QA passed +if echo "$RESULT" | grep -qE "FAIL|ERROR|✗|panic:|undefined:"; then + # Extract top issues for context + ISSUES=$(echo "$RESULT" | grep -E "^(FAIL|ERROR|✗|undefined:|panic:)|^[a-zA-Z0-9_/.-]+\.(go|php):[0-9]+:" | head -5) + + # Escape for JSON + ISSUES_ESCAPED=$(echo "$ISSUES" | sed 's/\\/\\\\/g' | sed 's/"/\\"/g' | sed ':a;N;$!ba;s/\n/\\n/g') + + cat << EOF +{ + "decision": "block", + "reason": "QA still has issues:\n\n$ISSUES_ESCAPED\n\nPlease fix these before stopping." +} +EOF +else + # QA passed, allow stop + exit 0 +fi diff --git a/claude/review/.claude-plugin/plugin.json b/claude/review/.claude-plugin/plugin.json new file mode 100644 index 0000000..c3f0a97 --- /dev/null +++ b/claude/review/.claude-plugin/plugin.json @@ -0,0 +1,8 @@ +{ + "name": "review", + "description": "Code review automation - PR review, security checks, best practices", + "version": "0.1.0", + "author": { + "name": "Host UK" + } +} diff --git a/claude/review/commands/review.md b/claude/review/commands/review.md new file mode 100644 index 0000000..2b6d442 --- /dev/null +++ b/claude/review/commands/review.md @@ -0,0 +1,63 @@ +--- +name: review +description: Perform code review on staged changes or PRs +args: [commit-range|--pr=N|--security] +--- + +# Code Review + +Perform a thorough code review of the specified changes. + +## Arguments + +- No args: Review staged changes +- `HEAD~3..HEAD`: Review last 3 commits +- `--pr=123`: Review PR #123 +- `--security`: Focus on security issues + +## Process + +1. **Gather changes**: Get diff for the specified range +2. **Analyse each file**: Review for issues by category +3. **Report findings**: Output structured review + +## Review Checklist + +| Category | Checks | +|----------|--------| +| **Correctness** | Logic errors, edge cases, error handling | +| **Security** | SQL injection, XSS, hardcoded secrets, CSRF | +| **Performance** | N+1 queries, unnecessary loops, large allocations | +| **Maintainability** | Naming, structure, complexity | +| **Tests** | Coverage gaps, missing assertions | + +## Output Format + +```markdown +## Code Review: [title] + +### Critical +- **file:line** - Issue description + +### Warning +- **file:line** - Issue description + +### Suggestions +- **file:line** - Improvement idea + +--- +**Summary**: X critical, Y warnings, Z suggestions +``` + +## Commands + +```bash +# Get staged diff +git diff --cached + +# Get PR diff +gh pr diff 123 + +# Get commit range diff +git diff HEAD~3..HEAD +``` diff --git a/claude/verify/.claude-plugin/plugin.json b/claude/verify/.claude-plugin/plugin.json new file mode 100644 index 0000000..1b0def1 --- /dev/null +++ b/claude/verify/.claude-plugin/plugin.json @@ -0,0 +1,8 @@ +{ + "name": "verify", + "description": "Work verification - ensure tests pass, code quality checks complete", + "version": "0.1.0", + "author": { + "name": "Host UK" + } +} diff --git a/claude/verify/commands/verify.md b/claude/verify/commands/verify.md new file mode 100644 index 0000000..8e22b9e --- /dev/null +++ b/claude/verify/commands/verify.md @@ -0,0 +1,87 @@ +--- +name: verify +description: Verify work is complete before stopping +args: [--quick|--full] +--- + +# Work Verification + +Verify that your work is complete and ready to commit/push. + +## Arguments + +- No args: Standard verification +- `--quick`: Fast checks only (format, lint) +- `--full`: All checks including slow tests + +## Verification Steps + +### 1. Check for uncommitted changes +```bash +git status --porcelain +``` + +### 2. Check for debug statements +Look for: +- Go: `fmt.Println`, `log.Println`, `spew.Dump` +- PHP: `dd(`, `dump(`, `var_dump(`, `ray(` +- JS/TS: `console.log`, `debugger` + +### 3. Run tests +```bash +# Go +core go test + +# PHP +core php test +``` + +### 4. Run linter +```bash +# Go +core go lint + +# PHP +core php stan +``` + +### 5. Check formatting +```bash +# Go +core go fmt --check + +# PHP +core php fmt --test +``` + +## Output + +Report verification status: + +``` +## Verification Results + +✓ No uncommitted changes +✓ No debug statements found +✓ Tests passing (47/47) +✓ Lint clean +✓ Formatting correct + +**Status: READY** +``` + +Or if issues found: + +``` +## Verification Results + +✓ No uncommitted changes +✗ Debug statement found: src/handler.go:42 +✗ Tests failing (45/47) +✓ Lint clean +✓ Formatting correct + +**Status: NOT READY** + +Fix these issues before proceeding. +```