3.7 KiB
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
CircleCI orb for QQQ framework projects. Provides pre-built jobs for building, testing, and publishing Maven and Node.js projects using GitFlow branching strategy.
Build Commands
make pack # Pack orb to target/qqq-orb-packed.yml
make validate # Pack and validate orb
make test # Pack and validate (alias for validate)
make test-scripts # Run calculate_version.sh test suite
make test-all # Run all tests (orb + scripts)
make lint # Run yamllint, shellcheck, and CircleCI validation
make dev # Development workflow: pack, validate, show status
make clean # Remove target/ and tests/test_data/
make publish-snapshot # Publish to kingsrook/qqq-orb@dev:snapshot
make publish-release # Interactive production release with git tagging
Running Individual Tests
./tests/run_tests.sh # Standard test run
./tests/run_tests.sh --verbose # Verbose output
./tests/run_tests.sh --ci # CI mode (minimal output)
./tests/test_calculate_version.sh # Direct test suite execution
Architecture
Directory Structure
src/@orb.yml- Main orb definition entry pointsrc/commands/- Reusable orb commands (YAML files that include scripts)src/jobs/- Complete job definitions combining commandssrc/executors/- Docker executor definitions (java.yml, default.yml)src/scripts/- Bash scripts included in commandstests/- Test suite for calculate_version.sh
Key Components
Executors:
java- cimg/openjdk image with configurable version (17.0, 21.0), resource_class: largedefault- cimg/node image for Node.js projects
Jobs:
mvn_publish- Full publish workflow (build, version, test, deploy, git ops, GitHub release)mvn_test_only- Build and test for feature branchesmvn_frontend_publish/mvn_frontend_test_only- Same with frontend supportnode_publish/node_test_only- Pure Node.js workflows
Version Calculation:
The core logic is in src/scripts/calculate_version.sh. It determines version based on branch type:
develop->X.Y.Z-SNAPSHOTrelease/*->X.Y.Z-RC.Nmain(tagged) ->X.Y.Zhotfix/*-> Patch version bumpfeature/*->X.Y.Z-feature-{name}-{hash}-SNAPSHOT
Orb Packing
The orb uses CircleCI's "unpacked" format. YAML files in src/ are packed into a single target/qqq-orb-packed.yml. Commands reference scripts via <<include(scripts/scriptname.sh)>> syntax.
CI Pipeline
.circleci/config.yml runs lint/pack/review/shellcheck, then continues to .circleci/test-deploy.yml which runs command tests and publishes on release tags (v*.*.*).
Linting Requirements
- YAML: yamllint for commands/jobs/examples
- Shell: shellcheck for all .sh files in src/scripts/ and tests/
- Orb:
circleci orb validatefor orb syntax
Required Context Variables for Publishing
MAVEN_USERNAME,MAVEN_PASSWORD- Sonatype credentialsGPG_PRIVATE_KEY_B64,GPG_KEYNAME,GPG_PASSPHRASE- GPG signingGITHUB_TOKEN- GitHub API access
Knowledge base
Deep-review dossiers for this repo and the wider QQQ platform live in the second-brain
vault (Obsidian, R:/Git.Local/KofTwentyTwo/second-brain):
- Platform hub:
knowledge/qqq/qqq-hub.md - This repo's dossier:
knowledge/qqq/repos/qqq-orb.md(reviewed at develop commitbdff16ff9582, 2026-07-04) — covers 0.5.0→0.6.0→HEAD behavior changes, the npm dist-tag defect verdict, org-wide pin survey, licensing history, and open bug #5 (release-branch patch loss). - Release/versioning architecture:
knowledge/qqq/architecture/build-release-versioning.md