@hybridlabor-api/aos 4.5.2 → 4.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/.agents/rules/antigravity-rtk-rules.md +32 -0
  2. package/.claude/agents/architect.md +0 -1
  3. package/.claude/agents/database-reviewer.md +3 -102
  4. package/.claude/agents/go-build-resolver.md +3 -105
  5. package/.claude/agents/godmode-engineering.md +1 -2
  6. package/.claude/agents/godmode-media-eventtech.md +1 -2
  7. package/.claude/agents/godmode-shipping.md +2 -3
  8. package/.claude/agents/godmode-ui-ux.md +2 -3
  9. package/.claude/agents/opensource-forker.md +4 -210
  10. package/.claude/agents/opensource-sanitizer.md +3 -199
  11. package/.claude/agents/reviewer.md +1 -2
  12. package/.claude/agents/security-reviewer.md +3 -119
  13. package/.claude/agents/silent-failure-hunter.md +3 -61
  14. package/.claude/agents/techlead.md +1 -2
  15. package/.opencode/agents/architect.md +1 -0
  16. package/.opencode/agents/database-reviewer.md +10 -0
  17. package/.opencode/agents/go-build-resolver.md +10 -0
  18. package/.opencode/agents/godmode-engineering.md +1 -0
  19. package/.opencode/agents/godmode-media-eventtech.md +1 -0
  20. package/.opencode/agents/godmode-shipping.md +2 -1
  21. package/.opencode/agents/godmode-ui-ux.md +1 -0
  22. package/.opencode/agents/opensource-forker.md +10 -0
  23. package/.opencode/agents/opensource-sanitizer.md +10 -0
  24. package/.opencode/agents/reviewer.md +1 -0
  25. package/.opencode/agents/security-reviewer.md +10 -0
  26. package/.opencode/agents/silent-failure-hunter.md +10 -0
  27. package/.opencode/agents/techlead.md +1 -0
  28. package/docs/email/aos-4.5.0-update-banner.html +211 -0
  29. package/installer.js +157 -25
  30. package/package.json +1 -1
  31. package/skills/basic/godmode-hardware-pcb/SKILL.md +64 -10
  32. package/skills/global_config/aos-project-init/SKILL.md +2 -0
  33. package/skills/global_config/subagent-setup/SKILL.md +71 -0
  34. package/skills/global_config/subagent-setup/scripts/setup-subagents.mjs +185 -0
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: subagent-setup
3
+ description: Configure and synchronize multi-harness subagents (Claude Code, Google Antigravity, OpenCode, ChatGPT Codex CLI) with canonical model tiers and single source of truth in .aos/pipeline.json.
4
+ category: bdb-core
5
+ risk: low
6
+ source: bdb
7
+ date_added: "2026-09-20"
8
+ ---
9
+
10
+ # Skill: subagent-setup — Multi-Harness Subagent Configuration
11
+
12
+ Manages and synchronizes autonomous subagent roles across all four supported execution harnesses:
13
+ 1. **Claude Code** (`.claude/agents/*.md`)
14
+ 2. **Google Antigravity** (`~/.gemini/config/agents/*.json`)
15
+ 3. **OpenCode** (`.opencode/agents/*.md`)
16
+ 4. **ChatGPT Codex CLI** (`.codex/agents/*.toml` & `.codex/agents/*.md`)
17
+
18
+ Single Source of Truth: **`.aos/pipeline.json`** (compatible with AO Orchestrator Pipeline Wizard).
19
+
20
+ ---
21
+
22
+ ## 1. Canonical Model Tiers (Resilience against Model Churn)
23
+
24
+ To prevent breaking configurations when providers update model names, roles map to canonical tiers:
25
+
26
+ | Tier | Description | Claude Code | Antigravity | OpenCode | Codex CLI |
27
+ |---|---|---|---|---|---|
28
+ | `reasoning_max` | Deep reasoning, planning, adversarial review | `opus` | `gemini-3.1-pro-high` | `opencode/muse-spark-1.3-contributor-free` | `o3-mini` |
29
+ | `standard_fast` | Fast coding, frontend/backend engineering | `sonnet` | `gemini-3.8-flash-high` | `opencode/muse-spark-1.3-contributor-free` | `gpt-4o` |
30
+ | `trivial_low` | Mechanical tasks, summaries | `haiku` | `gemini-3.8-flash-low` | `opencode/muse-spark-1.3-contributor-free` | `gpt-4o-mini` |
31
+
32
+ *Note:* Custom model IDs can also be set directly per role and harness.
33
+
34
+ ---
35
+
36
+ ## 2. CLI Usage
37
+
38
+ ### View Current Pipeline Status
39
+ ```bash
40
+ node skills/global_config/subagent-setup/scripts/setup-subagents.mjs --show
41
+ ```
42
+
43
+ ### Initialize Default Pipeline Configuration
44
+ ```bash
45
+ node skills/global_config/subagent-setup/scripts/setup-subagents.mjs --init-default
46
+ ```
47
+
48
+ ### Update a Specific Role
49
+ ```bash
50
+ # Example: Set Reviewer to Codex with o3-mini
51
+ node skills/global_config/subagent-setup/scripts/setup-subagents.mjs \
52
+ --set-role reviewer --harness codex --model o3-mini --tier reasoning_max
53
+
54
+ # Example: Set Shipping to OpenCode with Free Tier
55
+ node skills/global_config/subagent-setup/scripts/setup-subagents.mjs \
56
+ --set-role shipping --harness opencode --model opencode/muse-spark-1.3-contributor-free
57
+
58
+ # Example: Enable or Disable a Role
59
+ node skills/global_config/subagent-setup/scripts/setup-subagents.mjs --set-role media_eventtech --enable
60
+ ```
61
+
62
+ ### Synchronize to All Harnesses
63
+ ```bash
64
+ node skills/global_config/subagent-setup/scripts/setup-subagents.mjs --sync
65
+ ```
66
+
67
+ ---
68
+
69
+ ## 3. Integration with `aos-project-init` & AO Orchestrator
70
+ - **AO Orchestrator (Port 3101)**: The Pipeline Wizard (Schritt 3 von 4: Agenten & Rollen) directly reads and writes `.aos/pipeline.json`.
71
+ - **`aos-project-init`**: Offers subagent configuration during project interview, defaulting to the canonical tier matrix.
@@ -0,0 +1,185 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * skills/global_config/subagent-setup/scripts/setup-subagents.mjs
5
+ *
6
+ * Interactive & CLI tool to configure subagent roles and model tiers across:
7
+ * - Claude Code (.claude/agents/*.md)
8
+ * - Google Antigravity (~/.gemini/config/agents/*.json)
9
+ * - OpenCode (.opencode/agents/*.md)
10
+ * - ChatGPT Codex CLI (.codex/agents/*.toml & *.md)
11
+ *
12
+ * Single Source of Truth: .aos/pipeline.json (or .aos/project.json)
13
+ */
14
+
15
+ import fs from 'node:fs';
16
+ import path from 'node:path';
17
+ import readline from 'node:readline';
18
+ import { fileURLToPath } from 'node:url';
19
+ import { createRequire } from 'node:module';
20
+
21
+ const require = createRequire(import.meta.url);
22
+ const installer = require('../../../../installer.js');
23
+
24
+ const {
25
+ CANONICAL_TIERS,
26
+ loadPipelineConfig,
27
+ resolveAgentConfig,
28
+ parseAgentsMd,
29
+ compileClaudeAgents,
30
+ compileOpenCodeAgents,
31
+ compileCodexAgents
32
+ } = installer;
33
+
34
+ const ROLES = [
35
+ { key: 'architect', label: 'Architect', defaultTier: 'reasoning_max', defaultHarness: 'claude' },
36
+ { key: 'techlead', label: 'TechLead', defaultTier: 'standard_fast', defaultHarness: 'antigravity' },
37
+ { key: 'ui_ux', label: 'Godmode_UI_UX', defaultTier: 'standard_fast', defaultHarness: 'claude' },
38
+ { key: 'engineering', label: 'Godmode_Engineering', defaultTier: 'standard_fast', defaultHarness: 'claude' },
39
+ { key: 'media_eventtech', label: 'Godmode_Media_EventTech', defaultTier: 'standard_fast', defaultHarness: 'antigravity', defaultEnabled: false },
40
+ { key: 'reviewer', label: 'Reviewer', defaultTier: 'reasoning_max', defaultHarness: 'codex' },
41
+ { key: 'shipping', label: 'Godmode_Shipping', defaultTier: 'standard_fast', defaultHarness: 'opencode' }
42
+ ];
43
+
44
+ function printPipeline(pipeline) {
45
+ console.log('\n=== AOS Multi-Harness Subagent Pipeline ===\n');
46
+ console.log(
47
+ 'Role'.padEnd(20) +
48
+ 'Status'.padEnd(10) +
49
+ 'Harness'.padEnd(15) +
50
+ 'Tier'.padEnd(18) +
51
+ 'Model'
52
+ );
53
+ console.log('-'.repeat(80));
54
+
55
+ for (const r of ROLES) {
56
+ const cfg = pipeline[r.key] || {};
57
+ const enabled = cfg.enabled !== false;
58
+ const harness = cfg.harness || r.defaultHarness;
59
+ const tier = cfg.tier || r.defaultTier;
60
+ const model = cfg.model || (CANONICAL_TIERS[tier] ? CANONICAL_TIERS[tier][harness] : 'inherit');
61
+
62
+ console.log(
63
+ r.label.padEnd(20) +
64
+ (enabled ? '✔ ON' : '✖ OFF').padEnd(10) +
65
+ harness.padEnd(15) +
66
+ tier.padEnd(18) +
67
+ model
68
+ );
69
+ }
70
+ console.log('\nConfig file: .aos/pipeline.json\n');
71
+ }
72
+
73
+ function getDefaultPipeline() {
74
+ const pipeline = {};
75
+ for (const r of ROLES) {
76
+ const harness = r.defaultHarness;
77
+ const tier = r.defaultTier;
78
+ const model = CANONICAL_TIERS[tier] ? CANONICAL_TIERS[tier][harness] : 'inherit';
79
+ pipeline[r.key] = {
80
+ enabled: r.defaultEnabled !== false,
81
+ harness,
82
+ tier,
83
+ model
84
+ };
85
+ }
86
+ return pipeline;
87
+ }
88
+
89
+ function syncAllHarnesses(projectDir, pipeline) {
90
+ const agentsMdSrc = path.join(projectDir, '.agents', 'agents.md');
91
+ if (!fs.existsSync(agentsMdSrc)) {
92
+ console.error(`Error: .agents/agents.md not found at ${agentsMdSrc}`);
93
+ return false;
94
+ }
95
+
96
+ const content = fs.readFileSync(agentsMdSrc, 'utf8');
97
+ const agents = parseAgentsMd(content);
98
+
99
+ // 1. Claude
100
+ const claudeDir = path.join(projectDir, '.claude', 'agents');
101
+ compileClaudeAgents(agents, claudeDir, pipeline);
102
+ console.log(` ✓ Synced Claude Code agents to ${claudeDir}`);
103
+
104
+ // 2. OpenCode
105
+ const opencodeDir = path.join(projectDir, '.opencode', 'agents');
106
+ compileOpenCodeAgents(agents, opencodeDir, pipeline);
107
+ console.log(` ✓ Synced OpenCode agents to ${opencodeDir}`);
108
+
109
+ // 3. Codex
110
+ const codexDir = path.join(projectDir, '.codex', 'agents');
111
+ compileCodexAgents(agents, codexDir, pipeline);
112
+ console.log(` ✓ Synced Codex CLI agents to ${codexDir}`);
113
+
114
+ return true;
115
+ }
116
+
117
+ async function main() {
118
+ const args = process.argv.slice(2);
119
+ const cwd = process.cwd();
120
+ const aosDir = path.join(cwd, '.aos');
121
+ const pipelinePath = path.join(aosDir, 'pipeline.json');
122
+
123
+ let pipeline = loadPipelineConfig(cwd) || getDefaultPipeline();
124
+
125
+ if (args.includes('--show')) {
126
+ printPipeline(pipeline);
127
+ process.exit(0);
128
+ }
129
+
130
+ if (args.includes('--init-default')) {
131
+ fs.mkdirSync(aosDir, { recursive: true });
132
+ fs.writeFileSync(pipelinePath, JSON.stringify({ version: 1, pipeline: getDefaultPipeline() }, null, 2));
133
+ console.log(`Initialized default pipeline at ${pipelinePath}`);
134
+ printPipeline(getDefaultPipeline());
135
+ syncAllHarnesses(cwd, getDefaultPipeline());
136
+ process.exit(0);
137
+ }
138
+
139
+ if (args.includes('--sync')) {
140
+ console.log('Syncing all harnesses from .aos/pipeline.json...');
141
+ syncAllHarnesses(cwd, pipeline);
142
+ console.log('✓ All subagents synchronized.');
143
+ process.exit(0);
144
+ }
145
+
146
+ const setRoleIdx = args.indexOf('--set-role');
147
+ if (setRoleIdx !== -1 && args[setRoleIdx + 1]) {
148
+ const role = args[setRoleIdx + 1].toLowerCase().replace(/-/g, '_');
149
+ const harnessIdx = args.indexOf('--harness');
150
+ const modelIdx = args.indexOf('--model');
151
+ const tierIdx = args.indexOf('--tier');
152
+ const disableFlag = args.includes('--disable');
153
+ const enableFlag = args.includes('--enable');
154
+
155
+ if (!pipeline[role]) {
156
+ pipeline[role] = {};
157
+ }
158
+
159
+ if (harnessIdx !== -1 && args[harnessIdx + 1]) pipeline[role].harness = args[harnessIdx + 1];
160
+ if (modelIdx !== -1 && args[modelIdx + 1]) pipeline[role].model = args[modelIdx + 1];
161
+ if (tierIdx !== -1 && args[tierIdx + 1]) pipeline[role].tier = args[tierIdx + 1];
162
+ if (disableFlag) pipeline[role].enabled = false;
163
+ if (enableFlag) pipeline[role].enabled = true;
164
+
165
+ fs.mkdirSync(aosDir, { recursive: true });
166
+ fs.writeFileSync(pipelinePath, JSON.stringify({ version: 1, pipeline }, null, 2));
167
+ console.log(`Updated role "${role}" in ${pipelinePath}`);
168
+ printPipeline(pipeline);
169
+ syncAllHarnesses(cwd, pipeline);
170
+ process.exit(0);
171
+ }
172
+
173
+ // Default: Show pipeline and usage
174
+ printPipeline(pipeline);
175
+ console.log('Commands:');
176
+ console.log(' node setup-subagents.mjs --show');
177
+ console.log(' node setup-subagents.mjs --init-default');
178
+ console.log(' node setup-subagents.mjs --sync');
179
+ console.log(' node setup-subagents.mjs --set-role <role> --harness <claude|antigravity|opencode|codex> --model <model> [--tier <tier>]');
180
+ }
181
+
182
+ main().catch(err => {
183
+ console.error(err);
184
+ process.exit(1);
185
+ });