docs: move inline YAML to example.md files with fragment links
- Remove inline YAML from all index.md files - Add fragment links to corresponding example.md sections - Create ai/example.md for workflow examples - Add missing configs to example.md files (test.yaml, php.yaml, etc) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
f44ffe6f11
commit
363f12f4da
15 changed files with 199 additions and 177 deletions
100
docs/cmd/ai/example.md
Normal file
100
docs/cmd/ai/example.md
Normal file
|
|
@ -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
|
||||
```
|
||||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ core build
|
|||
core ci
|
||||
|
||||
# Publish
|
||||
core ci --were-go-for-launch
|
||||
core ci --we-are-go-for-launch
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
```
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
```
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
```
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue