@hybridlabor-api/aos 4.5.2 → 4.6.0
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.
- package/.agents/rules/antigravity-rtk-rules.md +32 -0
- package/.claude/agents/architect.md +0 -1
- package/.claude/agents/database-reviewer.md +3 -102
- package/.claude/agents/go-build-resolver.md +3 -105
- package/.claude/agents/godmode-engineering.md +1 -2
- package/.claude/agents/godmode-media-eventtech.md +1 -2
- package/.claude/agents/godmode-shipping.md +2 -3
- package/.claude/agents/godmode-ui-ux.md +2 -3
- package/.claude/agents/opensource-forker.md +4 -210
- package/.claude/agents/opensource-sanitizer.md +3 -199
- package/.claude/agents/reviewer.md +1 -2
- package/.claude/agents/security-reviewer.md +3 -119
- package/.claude/agents/silent-failure-hunter.md +3 -61
- package/.claude/agents/techlead.md +1 -2
- package/.opencode/agents/architect.md +1 -0
- package/.opencode/agents/database-reviewer.md +10 -0
- package/.opencode/agents/go-build-resolver.md +10 -0
- package/.opencode/agents/godmode-engineering.md +1 -0
- package/.opencode/agents/godmode-media-eventtech.md +1 -0
- package/.opencode/agents/godmode-shipping.md +2 -1
- package/.opencode/agents/godmode-ui-ux.md +1 -0
- package/.opencode/agents/opensource-forker.md +10 -0
- package/.opencode/agents/opensource-sanitizer.md +10 -0
- package/.opencode/agents/reviewer.md +1 -0
- package/.opencode/agents/security-reviewer.md +10 -0
- package/.opencode/agents/silent-failure-hunter.md +10 -0
- package/.opencode/agents/techlead.md +1 -0
- package/docs/email/aos-4.5.0-update-banner.html +211 -0
- package/installer.js +157 -25
- package/package.json +1 -1
- package/skills/global_config/aos-project-init/SKILL.md +2 -0
- package/skills/global_config/subagent-setup/SKILL.md +71 -0
- package/skills/global_config/subagent-setup/scripts/setup-subagents.mjs +185 -0
|
@@ -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
|
+
});
|