diff --git a/docs/cmd/ai/example.md b/docs/cmd/ai/example.md new file mode 100644 index 00000000..b115b090 --- /dev/null +++ b/docs/cmd/ai/example.md @@ -0,0 +1,100 @@ +# AI Examples + +## Workflow Example + +Complete task management workflow: + +```bash +# 1. List available tasks +core ai tasks --status pending + +# 2. Auto-select and claim a task +core ai task --auto --claim + +# 3. Work on the task... + +# 4. Update progress +core ai task:update abc123 --progress 75 + +# 5. Commit with task reference +core ai task:commit abc123 -m 'implement feature' + +# 6. Create PR +core ai task:pr abc123 + +# 7. Mark complete +core ai task:complete abc123 --output 'Feature implemented and PR created' +``` + +## Task Filtering + +```bash +# By status +core ai tasks --status pending +core ai tasks --status in_progress + +# By priority +core ai tasks --priority critical +core ai tasks --priority high + +# By labels +core ai tasks --labels bug,urgent + +# Combined filters +core ai tasks --status pending --priority high --labels bug +``` + +## Task Updates + +```bash +# Change status +core ai task:update abc123 --status in_progress +core ai task:update abc123 --status blocked + +# Update progress +core ai task:update abc123 --progress 25 +core ai task:update abc123 --progress 50 --notes 'Halfway done' +core ai task:update abc123 --progress 100 +``` + +## Git Integration + +```bash +# Commit with task reference +core ai task:commit abc123 -m 'add authentication' + +# With scope +core ai task:commit abc123 -m 'fix login' --scope auth + +# Commit and push +core ai task:commit abc123 -m 'complete feature' --push + +# Create PR +core ai task:pr abc123 + +# Draft PR +core ai task:pr abc123 --draft + +# PR with labels +core ai task:pr abc123 --labels 'enhancement,ready-for-review' + +# PR to different base +core ai task:pr abc123 --base develop +``` + +## Configuration + +### Environment Variables + +```env +AGENTIC_TOKEN=your-api-token +AGENTIC_BASE_URL=https://agentic.example.com +``` + +### ~/.core/agentic.yaml + +```yaml +token: your-api-token +base_url: https://agentic.example.com +default_project: my-project +``` diff --git a/docs/cmd/ai/index.md b/docs/cmd/ai/index.md index 507168ac..f6c49bee 100644 --- a/docs/cmd/ai/index.md +++ b/docs/cmd/ai/index.md @@ -254,27 +254,7 @@ core ai claude config ## Workflow Example -```bash -# 1. List available tasks -core ai tasks --status pending - -# 2. Auto-select and claim a task -core ai task --auto --claim - -# 3. Work on the task... - -# 4. Update progress -core ai task:update abc123 --progress 75 - -# 5. Commit with task reference -core ai task:commit abc123 -m 'implement feature' - -# 6. Create PR -core ai task:pr abc123 - -# 7. Mark complete -core ai task:complete abc123 --output 'Feature implemented and PR created' -``` +See [Workflow Example](example.md#workflow-example) for a complete task management workflow. ## See Also diff --git a/docs/cmd/build/index.md b/docs/cmd/build/index.md index 9f342e98..6956e657 100644 --- a/docs/cmd/build/index.md +++ b/docs/cmd/build/index.md @@ -110,40 +110,7 @@ dist/ ## Configuration -Optional `.core/build.yaml`: - -```yaml -version: 1 - -project: - name: myapp - binary: myapp - -build: - main: ./cmd/myapp - ldflags: - - -s -w - - -X main.version={{.Version}} - -targets: - - os: linux - arch: amd64 - - os: linux - arch: arm64 - - os: darwin - arch: arm64 - -sign: - enabled: true - gpg: - key: $GPG_KEY_ID - macos: - identity: "Developer ID Application: Your Name (TEAM_ID)" - notarize: false - apple_id: $APPLE_ID - team_id: $APPLE_TEAM_ID - app_password: $APPLE_APP_PASSWORD -``` +Optional `.core/build.yaml` - see [Configuration](example.md#configuration) for examples. ## Code Signing diff --git a/docs/cmd/ci/example.md b/docs/cmd/ci/example.md index 5c43806b..faf47205 100644 --- a/docs/cmd/ci/example.md +++ b/docs/cmd/ci/example.md @@ -10,7 +10,7 @@ core build core ci # Publish -core ci --were-go-for-launch +core ci --we-are-go-for-launch ``` ## Configuration diff --git a/docs/cmd/ci/index.md b/docs/cmd/ci/index.md index 86339a4a..ee2c7597 100644 --- a/docs/cmd/ci/index.md +++ b/docs/cmd/ci/index.md @@ -61,7 +61,7 @@ core ci --we-are-go-for-launch ## Publishers -See [example.md](example.md) for publisher configuration. +See [Publisher Examples](example.md#publisher-examples) for configuration. | Type | Target | |------|--------| @@ -76,4 +76,4 @@ See [example.md](example.md) for publisher configuration. ## Changelog -Auto-generated from conventional commits. See [example.md](example.md) for configuration. +Auto-generated from conventional commits. See [Changelog Configuration](example.md#changelog-configuration). diff --git a/docs/cmd/ci/init/index.md b/docs/cmd/ci/init/index.md index 351e2461..23ba068d 100644 --- a/docs/cmd/ci/init/index.md +++ b/docs/cmd/ci/init/index.md @@ -8,18 +8,4 @@ Initialize release configuration. core ci init ``` -Creates `.core/release.yaml` with default configuration. - -## Example Output - -```yaml -version: 1 - -project: - name: myapp - -publishers: - - type: github -``` - -See [configuration.md](../../../configuration.md) for full configuration options. +Creates `.core/release.yaml` with default configuration. See [Configuration](../example.md#configuration) for output format. diff --git a/docs/cmd/dev/example.md b/docs/cmd/dev/example.md index 73e7c0a6..8d235ae8 100644 --- a/docs/cmd/dev/example.md +++ b/docs/cmd/dev/example.md @@ -153,7 +153,8 @@ core dev claude ## Configuration -`repos.yaml`: +### repos.yaml + ```yaml org: host-uk repos: @@ -165,9 +166,38 @@ repos: depends: [core-php] ``` -`~/.core/config.yaml`: +### ~/.core/config.yaml + ```yaml version: 1 + images: - source: auto + source: auto # auto | github | registry | cdn + + cdn: + url: https://images.example.com/core-devops + + github: + repo: host-uk/core-images + + registry: + image: ghcr.io/host-uk/core-devops +``` + +### .core/test.yaml + +```yaml +version: 1 + +commands: + - name: unit + run: vendor/bin/pest --parallel + - name: types + run: vendor/bin/phpstan analyse + - name: lint + run: vendor/bin/pint --test + +env: + APP_ENV: testing + DB_CONNECTION: sqlite ``` diff --git a/docs/cmd/dev/index.md b/docs/cmd/dev/index.md index 676103ca..56a50905 100644 --- a/docs/cmd/dev/index.md +++ b/docs/cmd/dev/index.md @@ -214,23 +214,7 @@ core dev test -- go test -v ./pkg/... ### Test Configuration -Create `.core/test.yaml` for custom test setup: - -```yaml -version: 1 - -commands: - - name: unit - run: vendor/bin/pest --parallel - - name: types - run: vendor/bin/phpstan analyse - - name: lint - run: vendor/bin/pint --test - -env: - APP_ENV: testing - DB_CONNECTION: sqlite -``` +Create `.core/test.yaml` for custom test setup - see [Configuration](example.md#configuration) for examples. ## dev claude @@ -341,23 +325,7 @@ The core-devops image includes 100+ tools: ## Configuration -Global config in `~/.core/config.yaml`: - -```yaml -version: 1 - -images: - source: auto # auto | github | registry | cdn - - cdn: - url: https://images.example.com/core-devops - - github: - repo: host-uk/core-images - - registry: - image: ghcr.io/host-uk/core-devops -``` +Global config in `~/.core/config.yaml` - see [Configuration](example.md#configuration) for examples. ## Image Storage diff --git a/docs/cmd/dev/work/example.md b/docs/cmd/dev/work/example.md index f62b5145..74db3fb6 100644 --- a/docs/cmd/dev/work/example.md +++ b/docs/cmd/dev/work/example.md @@ -19,3 +19,15 @@ core dev work --status │ core-admin │ dev │ clean │ 3 │ └─────────────┴────────┴──────────┴─────────┘ ``` + +## Registry + +```yaml +repos: + - name: core + path: ./core + url: https://github.com/host-uk/core + - name: core-php + path: ./core-php + url: https://github.com/host-uk/core-php +``` diff --git a/docs/cmd/dev/work/index.md b/docs/cmd/dev/work/index.md index acacf3fe..6e8ccea3 100644 --- a/docs/cmd/dev/work/index.md +++ b/docs/cmd/dev/work/index.md @@ -283,17 +283,7 @@ core dev impact core-php ## Registry -These commands use `repos.yaml` to know which repos to manage: - -```yaml -repos: - - name: core - path: ./core - url: https://github.com/host-uk/core - - name: core-php - path: ./core-php - url: https://github.com/host-uk/core-php -``` +These commands use `repos.yaml` to know which repos to manage. See [Configuration](example.md#registry) for format. Use `core setup` to clone all repos from the registry. diff --git a/docs/cmd/php/example.md b/docs/cmd/php/example.md index 508163ce..96e16008 100644 --- a/docs/cmd/php/example.md +++ b/docs/cmd/php/example.md @@ -60,7 +60,8 @@ core php deploy:rollback ## Configuration -`.env`: +### .env + ```env COOLIFY_URL=https://coolify.example.com COOLIFY_TOKEN=your-api-token @@ -68,6 +69,27 @@ COOLIFY_APP_ID=production-app-id COOLIFY_STAGING_APP_ID=staging-app-id ``` +### .core/php.yaml + +```yaml +version: 1 + +dev: + domain: myapp.test + ssl: true + services: + - frankenphp + - vite + - horizon + - reverb + - redis + +deploy: + coolify: + server: https://coolify.example.com + project: my-project +``` + ## Package Linking ```bash diff --git a/docs/cmd/php/index.md b/docs/cmd/php/index.md index f28d58af..83ad5967 100644 --- a/docs/cmd/php/index.md +++ b/docs/cmd/php/index.md @@ -410,23 +410,4 @@ core php deploy:list [flags] ## Configuration -Optional `.core/php.yaml`: - -```yaml -version: 1 - -dev: - domain: myapp.test - ssl: true - services: - - frankenphp - - vite - - horizon - - reverb - - redis - -deploy: - coolify: - server: https://coolify.example.com - project: my-project -``` +Optional `.core/php.yaml` - see [Configuration](example.md#configuration) for examples. diff --git a/docs/cmd/setup/index.md b/docs/cmd/setup/index.md index e4ad6edc..b46c5eaa 100644 --- a/docs/cmd/setup/index.md +++ b/docs/cmd/setup/index.md @@ -172,24 +172,7 @@ core setup --all --name my-project --build ## Registry Format -The registry file (`repos.yaml`) defines repositories: - -```yaml -org: host-uk -base_path: . -repos: - core-php: - type: foundation - description: Foundation framework - core-tenant: - type: module - depends_on: [core-php] - description: Multi-tenancy module - core-bio: - type: product - depends_on: [core-php, core-tenant] - description: Link-in-bio product -``` +The registry file (`repos.yaml`) defines repositories. See [Configuration Files](example.md#configuration-files) for format. --- diff --git a/docs/cmd/vm/templates/example.md b/docs/cmd/vm/templates/example.md index ffe73956..c1f8b353 100644 --- a/docs/cmd/vm/templates/example.md +++ b/docs/cmd/vm/templates/example.md @@ -32,3 +32,22 @@ Variables for core-dev: ```bash core vm run --template core-dev --var SSH_KEY="ssh-rsa AAAA..." ``` + +## Template Format + +`.core/linuxkit/myserver.yml`: + +```yaml +kernel: + image: linuxkit/kernel:5.15 + cmdline: "console=tty0" + +init: + - linuxkit/init:v1.0.0 + +services: + - name: sshd + image: linuxkit/sshd:v1.0.0 + - name: myapp + image: ghcr.io/myorg/myapp:latest +``` diff --git a/docs/cmd/vm/templates/index.md b/docs/cmd/vm/templates/index.md index d460ea74..7ca3700b 100644 --- a/docs/cmd/vm/templates/index.md +++ b/docs/cmd/vm/templates/index.md @@ -110,23 +110,7 @@ Templates are searched in order: ## Creating Templates -Create a LinuxKit YAML in `.core/linuxkit/`: - -```yaml -# .core/linuxkit/myserver.yml -kernel: - image: linuxkit/kernel:5.15 - cmdline: "console=tty0" - -init: - - linuxkit/init:v1.0.0 - -services: - - name: sshd - image: linuxkit/sshd:v1.0.0 - - name: myapp - image: ghcr.io/myorg/myapp:latest -``` +Create a LinuxKit YAML in `.core/linuxkit/`. See [Template Format](example.md#template-format) for examples. Run with: