Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

feat(cos): add GitHub repo maintenance autonomous job

Adam Eivy879188ad1cd6
diff --git a/.changelog/v0.12.x.md b/.changelog/v0.12.x.md
index 8e1c051449..63c75cbd2a 100644
--- a/.changelog/v0.12.x.md
+++ b/.changelog/v0.12.x.md
@@ -508,6 +508,18 @@ This release adds branch management and automated release workflow capabilities
- **Negative example routing** ✅: Anti-pattern recording in task learning — every task completion now records a `routingAccuracy` cross-reference (taskType × modelTier) with success/failure counts. `suggestModelTier()` enhanced to avoid tiers with <40% success and prefer proven-successful tiers. New "Routing Accuracy" section in Learning tab shows misroutes, tier overview cards, and a full task-type × tier matrix table. New `GET /api/cos/learning/routing` endpoint. Reset also cleans up routing data.
- **Deterministic workflow skills** ✅: Recurring autonomous jobs (daily briefing, git maintenance, brain processing, project review) converted from inline prompt strings to versioned skill templates in `data/prompts/skills/jobs/`. Each template defines structured sections (Steps, Expected Outputs, Success Criteria) that `generateTaskFromJob()` assembles into effective prompts. New API routes (`GET/PUT /api/prompts/skills/jobs/:name`, preview endpoint) and a "Job Skills" tab in the Prompt Manager UI for editing templates without touching code.
+### CoS — GitHub Repo Maintenance Scheduler
+- **New autonomous job**: `job-github-repo-maintenance` — a weekly recurring CoS job that audits all GitHub repos via `gh` CLI
+- **5-point health check**: Lists all repos, flags stale repos (90+ days no commits with staleness tiers), counts Dependabot/security alerts, identifies repos missing CI/README/license, and generates a severity-grouped maintenance report
+- **Actionable task creation**: Creates prioritized CoS tasks for high-priority repos (5+ security alerts), batch license updates, and dormant repo reviews — not one giant "fix everything" task
+- **Skill template**: Full structured skill template at `data/prompts/skills/jobs/github-repo-maintenance.md` with Steps, Expected Outputs, and Success Criteria sections
+- **Default disabled**: Ships disabled like other default jobs — enable via the CoS Jobs UI or API
+
+**Server changes**:
+- `server/services/autonomousJobs.js` — Added `job-github-repo-maintenance` to `DEFAULT_JOBS` and `JOB_SKILL_MAP`
+- `data/prompts/skills/jobs/github-repo-maintenance.md` — New skill template with 7-step workflow
+- `data/cos/autonomous-jobs.json` — Added job entry to persistent data
+
### CyberCity — Immersive Audio & Visual Overhaul
- **Procedural synthwave music**: Web Audio API synthesizer generating ambient cyberpunk music with bass drone, arpeggiated lead, detuned pad layer, LFO filter sweeps, reverb, and delay — chord progression (Am → Em → F → C) at 100BPM, all procedurally generated with zero audio files
- **Spatial sound effects**: 5 synthesized SFX types — building hover (sine sweep), building click (noise burst + ping), lightning thunder (distorted noise), shooting star whoosh (panned noise sweep), and data pulse chirp — all generated in real-time from Web Audio oscillators
diff --git a/server/services/autonomousJobs.js b/server/services/autonomousJobs.js
index 43a8a0c8db..bcaa8408f8 100644
--- a/server/services/autonomousJobs.js
+++ b/server/services/autonomousJobs.js
@@ -33,6 +33,7 @@ const JOBS_SKILLS_DIR = join(__dirname, '../../data/prompts/skills/jobs')
const JOB_SKILL_MAP = {
'job-daily-briefing': 'daily-briefing',
'job-git-maintenance': 'git-maintenance',
+ 'job-github-repo-maintenance': 'github-repo-maintenance',
'job-brain-processing': 'brain-processing',
'job-project-review': 'project-review'
}
@@ -74,6 +75,40 @@ Report a summary of the repository health status when done.`,
createdAt: null,
updatedAt: null
},
+ {
+ id: 'job-github-repo-maintenance',
+ name: 'GitHub Repo Maintenance',
+ description: 'Audit all GitHub repos for stale dependencies, security alerts, missing CI/README/license, and repos with no recent commits.',
+ category: 'github-maintenance',
+ interval: 'weekly',
+ intervalMs: WEEK,
+ enabled: false,
+ priority: 'MEDIUM',
+ autonomyLevel: 'manager',
+ promptTemplate: `[Autonomous Job] GitHub Repo Maintenance
+
+You are acting as my Chief of Staff, performing automated maintenance checks across all my GitHub repositories.
+
+My GitHub username is: atomantic
+
+Use the \`gh\` CLI to query GitHub.
+
+Tasks to perform:
+1. List all non-archived repos via gh repo list
+2. Check for stale repos (no commits in 90+ days)
+3. Check for Dependabot/security alerts per repo
+4. Flag repos missing CI, README, or license
+5. Generate a maintenance report grouped by severity
+6. Create CoS tasks for actionable maintenance items
+
+Focus on actionable findings. Don't make changes directly — create CoS tasks for anything that needs doing.
+
+Save the report via the CoS report system.`,
+ lastRun: null,
+ runCount: 0,
+ createdAt: null,
+ updatedAt: null
+ },
{
id: 'job-brain-processing',
name: 'Brain Inbox Processing',
diff --git a/server/services/autonomousJobs.test.js b/server/services/autonomousJobs.test.js
index 8419c7f071..846df78fd5 100644
--- a/server/services/autonomousJobs.test.js
+++ b/server/services/autonomousJobs.test.js
@@ -251,6 +251,7 @@ describe('autonomousJobs', () => {
expect(jobs.length).toBeGreaterThan(1)
expect(jobs.find(j => j.id === 'job-custom-only')).toBeDefined()
expect(jobs.find(j => j.id === 'job-git-maintenance')).toBeDefined()
+ expect(jobs.find(j => j.id === 'job-github-repo-maintenance')).toBeDefined()
expect(jobs.find(j => j.id === 'job-brain-processing')).toBeDefined()
})
})