Implement programmer agent system and consolidate agent infrastructure
Programmer Agent System: - Add programmer-orchestrator (Opus) for workflow coordination - Add code-planner (Sonnet) for design and planning - Add code-implementer (Sonnet) for writing code - Add code-reviewer (Sonnet) for quality review - Add /programmer command and project registration skill - Add state files for preferences and project context Agent Infrastructure: - Add master-orchestrator and linux-sysadmin agents - Restructure skills to use SKILL.md subdirectory format - Convert workflows from markdown to YAML format - Add commands for k8s and sysadmin domains - Add shared state files (model-policy, autonomy-levels, system-instructions) - Add PA memory system (decisions, preferences, projects, facts) Cleanup: - Remove deprecated markdown skills and workflows - Remove crontab example (moved to workflows) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,97 +0,0 @@
|
||||
# Deploy Application Workflow
|
||||
|
||||
A simple workflow for deploying new applications or updating existing ones.
|
||||
|
||||
## When to use
|
||||
|
||||
Use this workflow when:
|
||||
- Deploying a new application to the cluster
|
||||
- Updating an existing application's configuration
|
||||
- Rolling out a new version of an application
|
||||
|
||||
## Steps
|
||||
|
||||
### 1. Gather Requirements
|
||||
|
||||
Ask the user for:
|
||||
- Application name
|
||||
- Container image and tag
|
||||
- Namespace (default: `default`)
|
||||
- Resource requirements (CPU/memory limits)
|
||||
- Exposed ports
|
||||
- Any special requirements (tolerations for Pi 3, etc.)
|
||||
|
||||
### 2. Check Existing State
|
||||
|
||||
Delegate to **argocd-operator** (haiku):
|
||||
- Check if application already exists in ArgoCD
|
||||
- If exists, get current status and version
|
||||
|
||||
Delegate to **k8s-diagnostician** (haiku):
|
||||
- If exists, check current pod status
|
||||
- Check namespace exists
|
||||
|
||||
### 3. Create/Update Manifests
|
||||
|
||||
Delegate to **git-operator** (sonnet):
|
||||
- Create or update deployment manifest
|
||||
- Create or update service manifest (if ports exposed)
|
||||
- Create or update kustomization.yaml
|
||||
- Include appropriate resource limits for Pi cluster:
|
||||
```yaml
|
||||
resources:
|
||||
requests:
|
||||
memory: "64Mi"
|
||||
cpu: "50m"
|
||||
limits:
|
||||
memory: "128Mi"
|
||||
cpu: "200m"
|
||||
```
|
||||
- If targeting Pi 3, add tolerations:
|
||||
```yaml
|
||||
tolerations:
|
||||
- key: "node-type"
|
||||
operator: "Equal"
|
||||
value: "pi3"
|
||||
effect: "NoSchedule"
|
||||
```
|
||||
|
||||
### 4. Commit Changes
|
||||
|
||||
Delegate to **git-operator** (sonnet):
|
||||
- Create feature branch: `deploy/<app-name>`
|
||||
- Commit with message: `feat: deploy <app-name>`
|
||||
- Push branch to origin
|
||||
- Create pull request
|
||||
|
||||
**[CONFIRM]** User must approve the PR creation.
|
||||
|
||||
### 5. Sync Application
|
||||
|
||||
After PR is merged:
|
||||
|
||||
Delegate to **argocd-operator** (sonnet):
|
||||
- Create ArgoCD application if new
|
||||
- Trigger sync for the application
|
||||
- Wait for sync to complete
|
||||
|
||||
**[CONFIRM]** User must approve the sync operation.
|
||||
|
||||
### 6. Verify Deployment
|
||||
|
||||
Delegate to **k8s-diagnostician** (haiku):
|
||||
- Check pods are running
|
||||
- Check no restart loops
|
||||
- Verify resource usage is within limits
|
||||
|
||||
Report final status to user.
|
||||
|
||||
## Rollback
|
||||
|
||||
If deployment fails:
|
||||
|
||||
Delegate to **argocd-operator**:
|
||||
- Check application history
|
||||
- Propose rollback to previous version
|
||||
|
||||
**[CONFIRM]** User must approve rollback.
|
||||
118
workflows/deploy/deploy-app.yaml
Normal file
118
workflows/deploy/deploy-app.yaml
Normal file
@@ -0,0 +1,118 @@
|
||||
name: deploy-app
|
||||
description: Deploy new application or update existing one
|
||||
version: "1.0"
|
||||
|
||||
trigger:
|
||||
- manual: true
|
||||
|
||||
inputs:
|
||||
app_name:
|
||||
description: Application name
|
||||
required: true
|
||||
image:
|
||||
description: Container image and tag
|
||||
required: true
|
||||
namespace:
|
||||
description: Target namespace
|
||||
default: "default"
|
||||
ports:
|
||||
description: Exposed ports (comma-separated)
|
||||
required: false
|
||||
pi3_compatible:
|
||||
description: Add tolerations for Pi 3 node
|
||||
default: false
|
||||
|
||||
defaults:
|
||||
model: sonnet
|
||||
|
||||
steps:
|
||||
- name: check-existing
|
||||
description: Check if application already exists
|
||||
parallel:
|
||||
- agent: argocd-operator
|
||||
model: haiku
|
||||
task: |
|
||||
Check if application '{{ inputs.app_name }}' exists in ArgoCD.
|
||||
If exists, get current status, version, and sync state.
|
||||
output: argocd_status
|
||||
|
||||
- agent: k8s-diagnostician
|
||||
model: haiku
|
||||
task: |
|
||||
Check if namespace '{{ inputs.namespace }}' exists.
|
||||
If app exists, check current pod status for '{{ inputs.app_name }}'.
|
||||
output: k8s_status
|
||||
|
||||
- name: create-manifests
|
||||
agent: git-operator
|
||||
model: sonnet
|
||||
task: |
|
||||
Create or update Kubernetes manifests for '{{ inputs.app_name }}':
|
||||
|
||||
1. Deployment manifest with:
|
||||
- Image: {{ inputs.image }}
|
||||
- Namespace: {{ inputs.namespace }}
|
||||
- Resource limits (Pi-optimized):
|
||||
requests: {memory: "64Mi", cpu: "50m"}
|
||||
limits: {memory: "128Mi", cpu: "200m"}
|
||||
{% if inputs.pi3_compatible %}
|
||||
- Tolerations for Pi 3 node
|
||||
{% endif %}
|
||||
|
||||
2. Service manifest (if ports specified: {{ inputs.ports }})
|
||||
|
||||
3. Kustomization.yaml
|
||||
|
||||
Existing state:
|
||||
- ArgoCD: {{ steps.check-existing.argocd_status }}
|
||||
- K8s: {{ steps.check-existing.k8s_status }}
|
||||
output: manifests
|
||||
confirm: true
|
||||
|
||||
- name: commit-changes
|
||||
agent: git-operator
|
||||
model: sonnet
|
||||
task: |
|
||||
Commit the manifests to GitOps repository:
|
||||
1. Create feature branch: deploy/{{ inputs.app_name }}
|
||||
2. Commit with message: feat: deploy {{ inputs.app_name }}
|
||||
3. Push branch to origin
|
||||
4. Create pull request
|
||||
output: pr_url
|
||||
confirm: true
|
||||
|
||||
- name: sync-application
|
||||
agent: argocd-operator
|
||||
model: sonnet
|
||||
task: |
|
||||
After PR is merged:
|
||||
1. Create ArgoCD application if new
|
||||
2. Trigger sync for '{{ inputs.app_name }}'
|
||||
3. Wait for sync to complete
|
||||
4. Report sync result
|
||||
output: sync_result
|
||||
confirm: true
|
||||
depends_on_user: "PR must be merged before continuing"
|
||||
|
||||
- name: verify-deployment
|
||||
agent: k8s-diagnostician
|
||||
model: haiku
|
||||
task: |
|
||||
Verify deployment of '{{ inputs.app_name }}':
|
||||
- Check pods are running
|
||||
- Check no restart loops
|
||||
- Verify resource usage within limits
|
||||
Report final deployment status.
|
||||
output: verification
|
||||
|
||||
on_failure:
|
||||
- name: propose-rollback
|
||||
agent: argocd-operator
|
||||
task: |
|
||||
Deployment failed. Check application history and propose rollback.
|
||||
confirm: true
|
||||
|
||||
outputs:
|
||||
- pr_url
|
||||
- sync_result
|
||||
- verification
|
||||
Reference in New Issue
Block a user