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:
OpenCode Test
2025-12-29 13:23:42 -08:00
parent 119d2a464e
commit 431e10b449
62 changed files with 3572 additions and 539 deletions

View File

@@ -0,0 +1,52 @@
---
name: cluster-status
description: Get quick cluster health overview
aliases: [status, cs]
invokes: workflow:health/cluster-health-check
---
# /cluster-status Command
Get a quick health overview of the Raspberry Pi Kubernetes cluster.
## Usage
```
/cluster-status
/cluster-status --full # Run complete health check workflow
/cluster-status --quick # Just node and pod status (faster)
```
## What It Does
Invokes the `cluster-health-check` workflow to provide a comprehensive cluster health overview by coordinating specialized agents:
1. **Node Health** - Node statuses, conditions, resource usage
2. **Active Alerts** - Firing alerts from Alertmanager
3. **ArgoCD Status** - App sync and health status
4. **Summary** - Overall health rating and recommendations
## Example Output
```
Cluster Status: Healthy
Nodes:
| Node | Status | CPU | Memory | Conditions |
|--------|--------|------|--------|------------|
| pi5-1 | Ready | 45% | 68% | OK |
| pi5-2 | Ready | 32% | 52% | OK |
Active Alerts: 0
ArgoCD Apps:
| App | Sync | Health |
|-----------|----------|-----------|
| homepage | Synced | Healthy |
Recommendations: None
```
## Autonomy
This command is read-only and runs without confirmation.

61
commands/k8s/deploy.md Normal file
View File

@@ -0,0 +1,61 @@
---
name: deploy
description: Deploy application to K8s cluster
aliases: [d]
invokes: workflow:deploy/deploy-app
---
# /deploy Command
Deploy a new application or update an existing one on the Raspberry Pi Kubernetes cluster.
## Usage
```
/deploy <app-name>
/deploy <app-name> --image <image:tag>
/deploy <app-name> --update
```
## Quick Deploy
```
/deploy myapp --image ghcr.io/user/myapp:latest --namespace apps --port 8080
```
## What It Does
Invokes the `deploy-app` workflow to guide you through deploying via GitOps with ArgoCD:
1. **Check existing state** - See if app exists, current status
2. **Generate manifests** - Create deployment, service, kustomization
3. **Create PR** - Push to GitOps repo, create PR
4. **Sync** - After PR merge, trigger ArgoCD sync
5. **Verify** - Confirm pods are running
## Interactive Mode
When run without full arguments, prompts for:
- Application name
- Container image
- Namespace (default: default)
- Ports
- Resources (Pi-optimized defaults)
- Pi 3 compatibility
## Resource Defaults (Pi-optimized)
```yaml
requests:
memory: "64Mi"
cpu: "50m"
limits:
memory: "128Mi"
cpu: "200m"
```
## Confirmation Points
- **[CONFIRM]** Creating PR in GitOps repo
- **[CONFIRM]** Syncing ArgoCD application
- **[CONFIRM]** Rollback if deployment fails

77
commands/k8s/diagnose.md Normal file
View File

@@ -0,0 +1,77 @@
---
name: diagnose
description: Investigate cluster issues
aliases: [diag]
invokes: workflow:incidents/*
---
# /diagnose Command
Investigate and diagnose problems in the Raspberry Pi Kubernetes cluster.
## Usage
```
/diagnose <issue-description>
/diagnose pod <pod-name> -n <namespace>
/diagnose app <argocd-app-name>
/diagnose node <node-name>
```
## What It Does
Invokes the k8s-orchestrator to coordinate multiple specialist agents for investigation. May trigger incident workflows:
- `pod-crashloop` - For CrashLoopBackOff issues
- `node-issue-response` - For node problems
- `resource-pressure-response` - For resource alerts
- `argocd-sync-failure` - For sync failures
## Diagnosis Types
### General Issue
```
/diagnose "my app is returning 503 errors"
```
### Pod Diagnosis
```
/diagnose pod myapp-7d9f8b6c5-x2k4m -n production
```
### ArgoCD App Diagnosis
```
/diagnose app homepage
```
### Node Diagnosis
```
/diagnose node pi5-1
```
## Output Format
```
Diagnosis for: [issue description]
Status: [Investigating/Identified/Resolved]
Findings:
1. [Finding with evidence]
Root Cause:
[Explanation]
Recommended Actions:
- [SAFE] Action that can be auto-applied
- [CONFIRM] Action requiring approval
- [INFO] Suggestion for manual follow-up
Severity: [Low/Medium/High/Critical]
```
## Options
- `--verbose` - Include full command outputs
- `--logs` - Focus on log analysis
- `--metrics` - Focus on metrics analysis
- `--quick` - Fast surface-level check only