oh-my-codex 0.1.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.
- package/README.md +269 -0
- package/bin/omx.js +25 -0
- package/dist/agents/definitions.d.ts +22 -0
- package/dist/agents/definitions.d.ts.map +1 -0
- package/dist/agents/definitions.js +235 -0
- package/dist/agents/definitions.js.map +1 -0
- package/dist/cli/doctor.d.ts +11 -0
- package/dist/cli/doctor.d.ts.map +1 -0
- package/dist/cli/doctor.js +157 -0
- package/dist/cli/doctor.js.map +1 -0
- package/dist/cli/index.d.ts +6 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +266 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/setup.d.ts +12 -0
- package/dist/cli/setup.d.ts.map +1 -0
- package/dist/cli/setup.js +175 -0
- package/dist/cli/setup.js.map +1 -0
- package/dist/cli/version.d.ts +2 -0
- package/dist/cli/version.d.ts.map +1 -0
- package/dist/cli/version.js +17 -0
- package/dist/cli/version.js.map +1 -0
- package/dist/config/generator.d.ts +14 -0
- package/dist/config/generator.d.ts.map +1 -0
- package/dist/config/generator.js +106 -0
- package/dist/config/generator.js.map +1 -0
- package/dist/hooks/__tests__/agents-overlay.test.d.ts +8 -0
- package/dist/hooks/__tests__/agents-overlay.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/agents-overlay.test.js +148 -0
- package/dist/hooks/__tests__/agents-overlay.test.js.map +1 -0
- package/dist/hooks/agents-overlay.d.ts +34 -0
- package/dist/hooks/agents-overlay.d.ts.map +1 -0
- package/dist/hooks/agents-overlay.js +265 -0
- package/dist/hooks/agents-overlay.js.map +1 -0
- package/dist/hooks/emulator.d.ts +44 -0
- package/dist/hooks/emulator.d.ts.map +1 -0
- package/dist/hooks/emulator.js +108 -0
- package/dist/hooks/emulator.js.map +1 -0
- package/dist/hooks/keyword-detector.d.ts +27 -0
- package/dist/hooks/keyword-detector.d.ts.map +1 -0
- package/dist/hooks/keyword-detector.js +63 -0
- package/dist/hooks/keyword-detector.js.map +1 -0
- package/dist/hooks/session.d.ts +38 -0
- package/dist/hooks/session.d.ts.map +1 -0
- package/dist/hooks/session.js +135 -0
- package/dist/hooks/session.js.map +1 -0
- package/dist/hud/colors.d.ts +26 -0
- package/dist/hud/colors.d.ts.map +1 -0
- package/dist/hud/colors.js +71 -0
- package/dist/hud/colors.js.map +1 -0
- package/dist/hud/index.d.ts +12 -0
- package/dist/hud/index.d.ts.map +1 -0
- package/dist/hud/index.js +107 -0
- package/dist/hud/index.js.map +1 -0
- package/dist/hud/render.d.ts +9 -0
- package/dist/hud/render.d.ts.map +1 -0
- package/dist/hud/render.js +192 -0
- package/dist/hud/render.js.map +1 -0
- package/dist/hud/state.d.ts +21 -0
- package/dist/hud/state.d.ts.map +1 -0
- package/dist/hud/state.js +101 -0
- package/dist/hud/state.js.map +1 -0
- package/dist/hud/types.d.ts +87 -0
- package/dist/hud/types.d.ts.map +1 -0
- package/dist/hud/types.js +8 -0
- package/dist/hud/types.js.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/code-intel-server.d.ts +7 -0
- package/dist/mcp/code-intel-server.d.ts.map +1 -0
- package/dist/mcp/code-intel-server.js +567 -0
- package/dist/mcp/code-intel-server.js.map +1 -0
- package/dist/mcp/memory-server.d.ts +7 -0
- package/dist/mcp/memory-server.d.ts.map +1 -0
- package/dist/mcp/memory-server.js +359 -0
- package/dist/mcp/memory-server.js.map +1 -0
- package/dist/mcp/state-server.d.ts +7 -0
- package/dist/mcp/state-server.d.ts.map +1 -0
- package/dist/mcp/state-server.js +181 -0
- package/dist/mcp/state-server.js.map +1 -0
- package/dist/mcp/trace-server.d.ts +7 -0
- package/dist/mcp/trace-server.d.ts.map +1 -0
- package/dist/mcp/trace-server.js +205 -0
- package/dist/mcp/trace-server.js.map +1 -0
- package/dist/modes/base.d.ts +50 -0
- package/dist/modes/base.d.ts.map +1 -0
- package/dist/modes/base.js +140 -0
- package/dist/modes/base.js.map +1 -0
- package/dist/notifications/notifier.d.ts +30 -0
- package/dist/notifications/notifier.d.ts.map +1 -0
- package/dist/notifications/notifier.js +124 -0
- package/dist/notifications/notifier.js.map +1 -0
- package/dist/team/orchestrator.d.ts +54 -0
- package/dist/team/orchestrator.d.ts.map +1 -0
- package/dist/team/orchestrator.js +106 -0
- package/dist/team/orchestrator.js.map +1 -0
- package/dist/utils/package.d.ts +9 -0
- package/dist/utils/package.d.ts.map +1 -0
- package/dist/utils/package.js +31 -0
- package/dist/utils/package.js.map +1 -0
- package/dist/utils/paths.d.ts +27 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/utils/paths.js +60 -0
- package/dist/utils/paths.js.map +1 -0
- package/dist/verification/verifier.d.ts +32 -0
- package/dist/verification/verifier.d.ts.map +1 -0
- package/dist/verification/verifier.js +81 -0
- package/dist/verification/verifier.js.map +1 -0
- package/package.json +54 -0
- package/prompts/analyst.md +110 -0
- package/prompts/api-reviewer.md +98 -0
- package/prompts/architect.md +109 -0
- package/prompts/build-fixer.md +89 -0
- package/prompts/code-reviewer.md +105 -0
- package/prompts/critic.md +87 -0
- package/prompts/debugger.md +93 -0
- package/prompts/deep-executor.md +112 -0
- package/prompts/dependency-expert.md +99 -0
- package/prompts/designer.md +103 -0
- package/prompts/executor.md +99 -0
- package/prompts/explore.md +112 -0
- package/prompts/git-master.md +92 -0
- package/prompts/information-architect.md +267 -0
- package/prompts/performance-reviewer.md +94 -0
- package/prompts/planner.md +116 -0
- package/prompts/product-analyst.md +299 -0
- package/prompts/product-manager.md +255 -0
- package/prompts/qa-tester.md +98 -0
- package/prompts/quality-reviewer.md +105 -0
- package/prompts/quality-strategist.md +227 -0
- package/prompts/researcher.md +96 -0
- package/prompts/scientist.md +92 -0
- package/prompts/security-reviewer.md +125 -0
- package/prompts/style-reviewer.md +87 -0
- package/prompts/test-engineer.md +103 -0
- package/prompts/ux-researcher.md +282 -0
- package/prompts/verifier.md +95 -0
- package/prompts/vision.md +75 -0
- package/prompts/writer.md +86 -0
- package/scripts/notify-hook.js +237 -0
- package/skills/analyze/SKILL.md +93 -0
- package/skills/autopilot/SKILL.md +175 -0
- package/skills/build-fix/SKILL.md +123 -0
- package/skills/cancel/SKILL.md +387 -0
- package/skills/code-review/SKILL.md +208 -0
- package/skills/configure-discord/SKILL.md +256 -0
- package/skills/configure-telegram/SKILL.md +232 -0
- package/skills/deepinit/SKILL.md +320 -0
- package/skills/deepsearch/SKILL.md +38 -0
- package/skills/doctor/SKILL.md +193 -0
- package/skills/ecomode/SKILL.md +114 -0
- package/skills/frontend-ui-ux/SKILL.md +34 -0
- package/skills/git-master/SKILL.md +29 -0
- package/skills/help/SKILL.md +192 -0
- package/skills/hud/SKILL.md +97 -0
- package/skills/learn-about-omx/SKILL.md +37 -0
- package/skills/learner/SKILL.md +135 -0
- package/skills/note/SKILL.md +62 -0
- package/skills/omx-setup/SKILL.md +1147 -0
- package/skills/pipeline/SKILL.md +407 -0
- package/skills/plan/SKILL.md +223 -0
- package/skills/project-session-manager/SKILL.md +560 -0
- package/skills/psm/SKILL.md +20 -0
- package/skills/ralph/SKILL.md +197 -0
- package/skills/ralph-init/SKILL.md +38 -0
- package/skills/ralplan/SKILL.md +34 -0
- package/skills/release/SKILL.md +83 -0
- package/skills/research/SKILL.md +510 -0
- package/skills/review/SKILL.md +30 -0
- package/skills/security-review/SKILL.md +284 -0
- package/skills/skill/SKILL.md +837 -0
- package/skills/swarm/SKILL.md +25 -0
- package/skills/tdd/SKILL.md +106 -0
- package/skills/team/SKILL.md +860 -0
- package/skills/trace/SKILL.md +33 -0
- package/skills/ultrapilot/SKILL.md +632 -0
- package/skills/ultraqa/SKILL.md +130 -0
- package/skills/ultrawork/SKILL.md +143 -0
- package/skills/writer-memory/SKILL.md +443 -0
- package/templates/AGENTS.md +326 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Team Orchestration for oh-my-codex
|
|
3
|
+
*
|
|
4
|
+
* Leverages Codex CLI's native collab feature for multi-agent coordination.
|
|
5
|
+
* Provides the staged pipeline: plan -> prd -> exec -> verify -> fix (loop)
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Phase transition rules
|
|
9
|
+
*/
|
|
10
|
+
const TRANSITIONS = {
|
|
11
|
+
'team-plan': ['team-prd'],
|
|
12
|
+
'team-prd': ['team-exec'],
|
|
13
|
+
'team-exec': ['team-verify'],
|
|
14
|
+
'team-verify': ['team-fix', 'complete', 'failed'],
|
|
15
|
+
'team-fix': ['team-exec', 'team-verify', 'complete', 'failed'],
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Validate a phase transition
|
|
19
|
+
*/
|
|
20
|
+
export function isValidTransition(from, to) {
|
|
21
|
+
const allowed = TRANSITIONS[from];
|
|
22
|
+
return allowed ? allowed.includes(to) : false;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Create initial team state
|
|
26
|
+
*/
|
|
27
|
+
export function createTeamState(taskDescription, maxFixAttempts = 3) {
|
|
28
|
+
return {
|
|
29
|
+
active: true,
|
|
30
|
+
phase: 'team-plan',
|
|
31
|
+
task_description: taskDescription,
|
|
32
|
+
created_at: new Date().toISOString(),
|
|
33
|
+
phase_transitions: [],
|
|
34
|
+
tasks: [],
|
|
35
|
+
max_fix_attempts: maxFixAttempts,
|
|
36
|
+
current_fix_attempt: 0,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Transition to next phase
|
|
41
|
+
*/
|
|
42
|
+
export function transitionPhase(state, to, reason) {
|
|
43
|
+
const from = state.phase;
|
|
44
|
+
if (!isValidTransition(from, to)) {
|
|
45
|
+
throw new Error(`Invalid transition: ${from} -> ${to}`);
|
|
46
|
+
}
|
|
47
|
+
if (to === 'team-fix') {
|
|
48
|
+
if (state.current_fix_attempt >= state.max_fix_attempts) {
|
|
49
|
+
return {
|
|
50
|
+
...state,
|
|
51
|
+
phase: 'failed',
|
|
52
|
+
active: false,
|
|
53
|
+
phase_transitions: [
|
|
54
|
+
...state.phase_transitions,
|
|
55
|
+
{ from, to: 'failed', at: new Date().toISOString(), reason: 'Max fix attempts exceeded' },
|
|
56
|
+
],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
state.current_fix_attempt++;
|
|
60
|
+
}
|
|
61
|
+
const isTerminal = ['complete', 'failed', 'cancelled'].includes(to);
|
|
62
|
+
return {
|
|
63
|
+
...state,
|
|
64
|
+
phase: to,
|
|
65
|
+
active: !isTerminal,
|
|
66
|
+
phase_transitions: [
|
|
67
|
+
...state.phase_transitions,
|
|
68
|
+
{ from, to, at: new Date().toISOString(), reason },
|
|
69
|
+
],
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Get agent roles recommended for each phase
|
|
74
|
+
*/
|
|
75
|
+
export function getPhaseAgents(phase) {
|
|
76
|
+
switch (phase) {
|
|
77
|
+
case 'team-plan':
|
|
78
|
+
return ['analyst', 'planner'];
|
|
79
|
+
case 'team-prd':
|
|
80
|
+
return ['product-manager', 'analyst'];
|
|
81
|
+
case 'team-exec':
|
|
82
|
+
return ['executor', 'deep-executor', 'designer', 'test-engineer'];
|
|
83
|
+
case 'team-verify':
|
|
84
|
+
return ['verifier', 'quality-reviewer', 'security-reviewer'];
|
|
85
|
+
case 'team-fix':
|
|
86
|
+
return ['executor', 'build-fixer', 'debugger'];
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Generate phase instructions for AGENTS.md context
|
|
91
|
+
*/
|
|
92
|
+
export function getPhaseInstructions(phase) {
|
|
93
|
+
switch (phase) {
|
|
94
|
+
case 'team-plan':
|
|
95
|
+
return 'PHASE: Planning. Use /analyst for requirements, /planner for task breakdown. Output: task list with dependencies.';
|
|
96
|
+
case 'team-prd':
|
|
97
|
+
return 'PHASE: Requirements. Use /product-manager for PRD, /analyst for acceptance criteria. Output: explicit scope and success metrics.';
|
|
98
|
+
case 'team-exec':
|
|
99
|
+
return 'PHASE: Execution. Use /executor for implementation, /test-engineer for tests. Output: working code with tests.';
|
|
100
|
+
case 'team-verify':
|
|
101
|
+
return 'PHASE: Verification. Use /verifier for evidence collection, /quality-reviewer for review. Output: pass/fail with evidence.';
|
|
102
|
+
case 'team-fix':
|
|
103
|
+
return 'PHASE: Fixing. Use /debugger for root cause, /executor for fixes. Output: fixed code, re-verify needed.';
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=orchestrator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestrator.js","sourceRoot":"","sources":["../../src/team/orchestrator.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Package root resolution utility
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Get the package root directory (where agents/, skills/, prompts/ live).
|
|
6
|
+
* Works from dist/utils/, src/utils/, and bin/.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getPackageRoot(): string;
|
|
9
|
+
//# sourceMappingURL=package.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../src/utils/package.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH;;;GAGG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAkBvC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Package root resolution utility
|
|
3
|
+
*/
|
|
4
|
+
import { dirname, join } from 'path';
|
|
5
|
+
import { fileURLToPath } from 'url';
|
|
6
|
+
import { existsSync } from 'fs';
|
|
7
|
+
/**
|
|
8
|
+
* Get the package root directory (where agents/, skills/, prompts/ live).
|
|
9
|
+
* Works from dist/utils/, src/utils/, and bin/.
|
|
10
|
+
*/
|
|
11
|
+
export function getPackageRoot() {
|
|
12
|
+
try {
|
|
13
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
14
|
+
const __dirname = dirname(__filename);
|
|
15
|
+
// Try going up from dist/utils/ or src/utils/
|
|
16
|
+
const candidate = join(__dirname, '..', '..');
|
|
17
|
+
if (existsSync(join(candidate, 'package.json'))) {
|
|
18
|
+
return candidate;
|
|
19
|
+
}
|
|
20
|
+
// Try going up one more (from bin/)
|
|
21
|
+
const candidate2 = join(__dirname, '..');
|
|
22
|
+
if (existsSync(join(candidate2, 'package.json'))) {
|
|
23
|
+
return candidate2;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
// Fallback
|
|
28
|
+
}
|
|
29
|
+
return process.cwd();
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=package.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package.js","sourceRoot":"","sources":["../../src/utils/package.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAEhC;;;GAGG;AACH,MAAM,UAAU,cAAc;IAC5B,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;QACtC,8CAA8C;QAC9C,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAC9C,IAAI,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC;YAChD,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,oCAAoC;QACpC,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QACzC,IAAI,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC;YACjD,OAAO,UAAU,CAAC;QACpB,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,WAAW;IACb,CAAC;IACD,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC;AACvB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Path utilities for oh-my-codex
|
|
3
|
+
* Resolves Codex CLI config, skills, prompts, and state directories
|
|
4
|
+
*/
|
|
5
|
+
/** Codex CLI home directory (~/.codex/) */
|
|
6
|
+
export declare function codexHome(): string;
|
|
7
|
+
/** Codex config file path (~/.codex/config.toml) */
|
|
8
|
+
export declare function codexConfigPath(): string;
|
|
9
|
+
/** Codex prompts directory (~/.codex/prompts/) */
|
|
10
|
+
export declare function codexPromptsDir(): string;
|
|
11
|
+
/** User-level skills directory (~/.agents/skills/) */
|
|
12
|
+
export declare function userSkillsDir(): string;
|
|
13
|
+
/** Project-level skills directory (.agents/skills/) */
|
|
14
|
+
export declare function projectSkillsDir(projectRoot?: string): string;
|
|
15
|
+
/** oh-my-codex state directory (.omx/state/) */
|
|
16
|
+
export declare function omxStateDir(projectRoot?: string): string;
|
|
17
|
+
/** oh-my-codex project memory file (.omx/project-memory.json) */
|
|
18
|
+
export declare function omxProjectMemoryPath(projectRoot?: string): string;
|
|
19
|
+
/** oh-my-codex notepad file (.omx/notepad.md) */
|
|
20
|
+
export declare function omxNotepadPath(projectRoot?: string): string;
|
|
21
|
+
/** oh-my-codex plans directory (.omx/plans/) */
|
|
22
|
+
export declare function omxPlansDir(projectRoot?: string): string;
|
|
23
|
+
/** oh-my-codex logs directory (.omx/logs/) */
|
|
24
|
+
export declare function omxLogsDir(projectRoot?: string): string;
|
|
25
|
+
/** Get the package root directory (where agents/, skills/, prompts/ live) */
|
|
26
|
+
export declare function packageRoot(): string;
|
|
27
|
+
//# sourceMappingURL=paths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/utils/paths.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,2CAA2C;AAC3C,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAED,oDAAoD;AACpD,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAED,kDAAkD;AAClD,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAED,sDAAsD;AACtD,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED,uDAAuD;AACvD,wBAAgB,gBAAgB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAE7D;AAED,gDAAgD;AAChD,wBAAgB,WAAW,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAExD;AAED,iEAAiE;AACjE,wBAAgB,oBAAoB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED,iDAAiD;AACjD,wBAAgB,cAAc,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED,gDAAgD;AAChD,wBAAgB,WAAW,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAExD;AAED,8CAA8C;AAC9C,wBAAgB,UAAU,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED,6EAA6E;AAC7E,wBAAgB,WAAW,IAAI,MAAM,CAUpC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Path utilities for oh-my-codex
|
|
3
|
+
* Resolves Codex CLI config, skills, prompts, and state directories
|
|
4
|
+
*/
|
|
5
|
+
import { join } from 'path';
|
|
6
|
+
import { homedir } from 'os';
|
|
7
|
+
/** Codex CLI home directory (~/.codex/) */
|
|
8
|
+
export function codexHome() {
|
|
9
|
+
return process.env.CODEX_HOME || join(homedir(), '.codex');
|
|
10
|
+
}
|
|
11
|
+
/** Codex config file path (~/.codex/config.toml) */
|
|
12
|
+
export function codexConfigPath() {
|
|
13
|
+
return join(codexHome(), 'config.toml');
|
|
14
|
+
}
|
|
15
|
+
/** Codex prompts directory (~/.codex/prompts/) */
|
|
16
|
+
export function codexPromptsDir() {
|
|
17
|
+
return join(codexHome(), 'prompts');
|
|
18
|
+
}
|
|
19
|
+
/** User-level skills directory (~/.agents/skills/) */
|
|
20
|
+
export function userSkillsDir() {
|
|
21
|
+
return join(homedir(), '.agents', 'skills');
|
|
22
|
+
}
|
|
23
|
+
/** Project-level skills directory (.agents/skills/) */
|
|
24
|
+
export function projectSkillsDir(projectRoot) {
|
|
25
|
+
return join(projectRoot || process.cwd(), '.agents', 'skills');
|
|
26
|
+
}
|
|
27
|
+
/** oh-my-codex state directory (.omx/state/) */
|
|
28
|
+
export function omxStateDir(projectRoot) {
|
|
29
|
+
return join(projectRoot || process.cwd(), '.omx', 'state');
|
|
30
|
+
}
|
|
31
|
+
/** oh-my-codex project memory file (.omx/project-memory.json) */
|
|
32
|
+
export function omxProjectMemoryPath(projectRoot) {
|
|
33
|
+
return join(projectRoot || process.cwd(), '.omx', 'project-memory.json');
|
|
34
|
+
}
|
|
35
|
+
/** oh-my-codex notepad file (.omx/notepad.md) */
|
|
36
|
+
export function omxNotepadPath(projectRoot) {
|
|
37
|
+
return join(projectRoot || process.cwd(), '.omx', 'notepad.md');
|
|
38
|
+
}
|
|
39
|
+
/** oh-my-codex plans directory (.omx/plans/) */
|
|
40
|
+
export function omxPlansDir(projectRoot) {
|
|
41
|
+
return join(projectRoot || process.cwd(), '.omx', 'plans');
|
|
42
|
+
}
|
|
43
|
+
/** oh-my-codex logs directory (.omx/logs/) */
|
|
44
|
+
export function omxLogsDir(projectRoot) {
|
|
45
|
+
return join(projectRoot || process.cwd(), '.omx', 'logs');
|
|
46
|
+
}
|
|
47
|
+
/** Get the package root directory (where agents/, skills/, prompts/ live) */
|
|
48
|
+
export function packageRoot() {
|
|
49
|
+
// From dist/utils/ or src/utils/, go up two levels
|
|
50
|
+
const { dirname } = require('path');
|
|
51
|
+
const { fileURLToPath } = require('url');
|
|
52
|
+
try {
|
|
53
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
54
|
+
return join(dirname(__filename), '..', '..');
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
return join(__dirname, '..', '..');
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=paths.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/utils/paths.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAE7B,2CAA2C;AAC3C,MAAM,UAAU,SAAS;IACvB,OAAO,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE,QAAQ,CAAC,CAAC;AAC7D,CAAC;AAED,oDAAoD;AACpD,MAAM,UAAU,eAAe;IAC7B,OAAO,IAAI,CAAC,SAAS,EAAE,EAAE,aAAa,CAAC,CAAC;AAC1C,CAAC;AAED,kDAAkD;AAClD,MAAM,UAAU,eAAe;IAC7B,OAAO,IAAI,CAAC,SAAS,EAAE,EAAE,SAAS,CAAC,CAAC;AACtC,CAAC;AAED,sDAAsD;AACtD,MAAM,UAAU,aAAa;IAC3B,OAAO,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;AAC9C,CAAC;AAED,uDAAuD;AACvD,MAAM,UAAU,gBAAgB,CAAC,WAAoB;IACnD,OAAO,IAAI,CAAC,WAAW,IAAI,OAAO,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;AACjE,CAAC;AAED,gDAAgD;AAChD,MAAM,UAAU,WAAW,CAAC,WAAoB;IAC9C,OAAO,IAAI,CAAC,WAAW,IAAI,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAC7D,CAAC;AAED,iEAAiE;AACjE,MAAM,UAAU,oBAAoB,CAAC,WAAoB;IACvD,OAAO,IAAI,CAAC,WAAW,IAAI,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,qBAAqB,CAAC,CAAC;AAC3E,CAAC;AAED,iDAAiD;AACjD,MAAM,UAAU,cAAc,CAAC,WAAoB;IACjD,OAAO,IAAI,CAAC,WAAW,IAAI,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;AAClE,CAAC;AAED,gDAAgD;AAChD,MAAM,UAAU,WAAW,CAAC,WAAoB;IAC9C,OAAO,IAAI,CAAC,WAAW,IAAI,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAC7D,CAAC;AAED,8CAA8C;AAC9C,MAAM,UAAU,UAAU,CAAC,WAAoB;IAC7C,OAAO,IAAI,CAAC,WAAW,IAAI,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAC5D,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,WAAW;IACzB,mDAAmD;IACnD,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IACzC,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC/C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACrC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Verification Protocol for oh-my-codex
|
|
3
|
+
*
|
|
4
|
+
* Evidence-backed verification of task completion.
|
|
5
|
+
* Sizing: small (haiku), standard (sonnet), large (opus)
|
|
6
|
+
*/
|
|
7
|
+
export interface VerificationResult {
|
|
8
|
+
passed: boolean;
|
|
9
|
+
evidence: VerificationEvidence[];
|
|
10
|
+
summary: string;
|
|
11
|
+
confidence: 'high' | 'medium' | 'low';
|
|
12
|
+
}
|
|
13
|
+
export interface VerificationEvidence {
|
|
14
|
+
type: 'test' | 'typecheck' | 'lint' | 'build' | 'manual' | 'runtime';
|
|
15
|
+
passed: boolean;
|
|
16
|
+
command?: string;
|
|
17
|
+
output?: string;
|
|
18
|
+
details?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Generate verification instructions for a given task size
|
|
22
|
+
*/
|
|
23
|
+
export declare function getVerificationInstructions(taskSize: 'small' | 'standard' | 'large', taskDescription: string): string;
|
|
24
|
+
/**
|
|
25
|
+
* Determine task size from file count and line changes
|
|
26
|
+
*/
|
|
27
|
+
export declare function determineTaskSize(fileCount: number, lineChanges: number): 'small' | 'standard' | 'large';
|
|
28
|
+
/**
|
|
29
|
+
* Generate the verification fix-loop instructions
|
|
30
|
+
*/
|
|
31
|
+
export declare function getFixLoopInstructions(maxRetries?: number): string;
|
|
32
|
+
//# sourceMappingURL=verifier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifier.d.ts","sourceRoot":"","sources":["../../src/verification/verifier.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,oBAAoB,EAAE,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;CACvC;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;IACrE,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,OAAO,GAAG,UAAU,GAAG,OAAO,EACxC,eAAe,EAAE,MAAM,GACtB,MAAM,CA6CR;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,GAClB,OAAO,GAAG,UAAU,GAAG,OAAO,CAIhC;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,GAAE,MAAU,GAAG,MAAM,CAcrE"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Verification Protocol for oh-my-codex
|
|
3
|
+
*
|
|
4
|
+
* Evidence-backed verification of task completion.
|
|
5
|
+
* Sizing: small (haiku), standard (sonnet), large (opus)
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Generate verification instructions for a given task size
|
|
9
|
+
*/
|
|
10
|
+
export function getVerificationInstructions(taskSize, taskDescription) {
|
|
11
|
+
const baseInstructions = `
|
|
12
|
+
## Verification Protocol
|
|
13
|
+
|
|
14
|
+
Verify the following task is complete: ${taskDescription}
|
|
15
|
+
|
|
16
|
+
### Required Evidence:
|
|
17
|
+
`;
|
|
18
|
+
switch (taskSize) {
|
|
19
|
+
case 'small':
|
|
20
|
+
return baseInstructions + `
|
|
21
|
+
1. Run type checker on modified files (if TypeScript/typed language)
|
|
22
|
+
2. Run tests related to the change
|
|
23
|
+
3. Confirm the change works as described
|
|
24
|
+
|
|
25
|
+
Report: PASS/FAIL with evidence for each check.
|
|
26
|
+
`;
|
|
27
|
+
case 'standard':
|
|
28
|
+
return baseInstructions + `
|
|
29
|
+
1. Run full type check (tsc --noEmit or equivalent)
|
|
30
|
+
2. Run test suite (focus on changed areas)
|
|
31
|
+
3. Run linter on modified files
|
|
32
|
+
4. Verify the feature/fix works end-to-end
|
|
33
|
+
5. Check for regressions in related functionality
|
|
34
|
+
|
|
35
|
+
Report: PASS/FAIL with command output for each check.
|
|
36
|
+
`;
|
|
37
|
+
case 'large':
|
|
38
|
+
return baseInstructions + `
|
|
39
|
+
1. Run full type check across the project
|
|
40
|
+
2. Run complete test suite
|
|
41
|
+
3. Run linter across modified files
|
|
42
|
+
4. Security review of changes (OWASP top 10)
|
|
43
|
+
5. Performance impact assessment
|
|
44
|
+
6. API compatibility check (if applicable)
|
|
45
|
+
7. End-to-end verification of all affected features
|
|
46
|
+
8. Regression testing of adjacent functionality
|
|
47
|
+
|
|
48
|
+
Report: PASS/FAIL with detailed evidence for each check.
|
|
49
|
+
Include confidence level (high/medium/low) with justification.
|
|
50
|
+
`;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Determine task size from file count and line changes
|
|
55
|
+
*/
|
|
56
|
+
export function determineTaskSize(fileCount, lineChanges) {
|
|
57
|
+
if (fileCount <= 3 && lineChanges < 100)
|
|
58
|
+
return 'small';
|
|
59
|
+
if (fileCount <= 15 && lineChanges < 500)
|
|
60
|
+
return 'standard';
|
|
61
|
+
return 'large';
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Generate the verification fix-loop instructions
|
|
65
|
+
*/
|
|
66
|
+
export function getFixLoopInstructions(maxRetries = 3) {
|
|
67
|
+
return `
|
|
68
|
+
## Fix-Verify Loop
|
|
69
|
+
|
|
70
|
+
If verification fails:
|
|
71
|
+
1. Identify the root cause of each failure
|
|
72
|
+
2. Fix the issue (prefer minimal changes)
|
|
73
|
+
3. Re-run verification
|
|
74
|
+
4. Repeat up to ${maxRetries} times
|
|
75
|
+
5. If still failing after ${maxRetries} attempts, escalate with:
|
|
76
|
+
- What was attempted
|
|
77
|
+
- What failed and why
|
|
78
|
+
- Recommended next steps
|
|
79
|
+
`;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=verifier.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifier.js","sourceRoot":"","sources":["../../src/verification/verifier.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAiBH;;GAEG;AACH,MAAM,UAAU,2BAA2B,CACzC,QAAwC,EACxC,eAAuB;IAEvB,MAAM,gBAAgB,GAAG;;;yCAGc,eAAe;;;CAGvD,CAAC;IAEA,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,OAAO;YACV,OAAO,gBAAgB,GAAG;;;;;;CAM/B,CAAC;QAEE,KAAK,UAAU;YACb,OAAO,gBAAgB,GAAG;;;;;;;;CAQ/B,CAAC;QAEE,KAAK,OAAO;YACV,OAAO,gBAAgB,GAAG;;;;;;;;;;;;CAY/B,CAAC;IACA,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAC/B,SAAiB,EACjB,WAAmB;IAEnB,IAAI,SAAS,IAAI,CAAC,IAAI,WAAW,GAAG,GAAG;QAAE,OAAO,OAAO,CAAC;IACxD,IAAI,SAAS,IAAI,EAAE,IAAI,WAAW,GAAG,GAAG;QAAE,OAAO,UAAU,CAAC;IAC5D,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB,CAAC,aAAqB,CAAC;IAC3D,OAAO;;;;;;;kBAOS,UAAU;4BACA,UAAU;;;;CAIrC,CAAC;AACF,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "oh-my-codex",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Multi-agent orchestration layer for OpenAI Codex CLI",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"omx": "./bin/omx.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "tsc",
|
|
12
|
+
"dev": "tsc --watch",
|
|
13
|
+
"setup": "node bin/omx.js setup",
|
|
14
|
+
"doctor": "node bin/omx.js doctor",
|
|
15
|
+
"test": "npm run build && node --test dist/**/*.test.js"
|
|
16
|
+
},
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": ">=20"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"bin/",
|
|
22
|
+
"dist/",
|
|
23
|
+
"agents/",
|
|
24
|
+
"skills/",
|
|
25
|
+
"prompts/",
|
|
26
|
+
"templates/",
|
|
27
|
+
"scripts/"
|
|
28
|
+
],
|
|
29
|
+
"keywords": [
|
|
30
|
+
"codex",
|
|
31
|
+
"openai",
|
|
32
|
+
"cli",
|
|
33
|
+
"agents",
|
|
34
|
+
"orchestration",
|
|
35
|
+
"multi-agent"
|
|
36
|
+
],
|
|
37
|
+
"author": "Yeachan Heo",
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "https://github.com/Yeachan-Heo/oh-my-codex.git"
|
|
41
|
+
},
|
|
42
|
+
"homepage": "https://yeachan-heo.github.io/oh-my-codex",
|
|
43
|
+
"bugs": {
|
|
44
|
+
"url": "https://github.com/Yeachan-Heo/oh-my-codex/issues"
|
|
45
|
+
},
|
|
46
|
+
"license": "MIT",
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"@modelcontextprotocol/sdk": "^1.0.0"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"typescript": "^5.7.0",
|
|
52
|
+
"@types/node": "^22.0.0"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Pre-planning consultant for requirements analysis (Opus)"
|
|
3
|
+
argument-hint: "task description"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<Agent_Prompt>
|
|
7
|
+
<Role>
|
|
8
|
+
You are Analyst (Metis). Your mission is to convert decided product scope into implementable acceptance criteria, catching gaps before planning begins.
|
|
9
|
+
You are responsible for identifying missing questions, undefined guardrails, scope risks, unvalidated assumptions, missing acceptance criteria, and edge cases.
|
|
10
|
+
You are not responsible for market/user-value prioritization, code analysis (architect), plan creation (planner), or plan review (critic).
|
|
11
|
+
</Role>
|
|
12
|
+
|
|
13
|
+
<Why_This_Matters>
|
|
14
|
+
Plans built on incomplete requirements produce implementations that miss the target. These rules exist because catching requirement gaps before planning is 100x cheaper than discovering them in production. The analyst prevents the "but I thought you meant..." conversation.
|
|
15
|
+
</Why_This_Matters>
|
|
16
|
+
|
|
17
|
+
<Success_Criteria>
|
|
18
|
+
- All unasked questions identified with explanation of why they matter
|
|
19
|
+
- Guardrails defined with concrete suggested bounds
|
|
20
|
+
- Scope creep areas identified with prevention strategies
|
|
21
|
+
- Each assumption listed with a validation method
|
|
22
|
+
- Acceptance criteria are testable (pass/fail, not subjective)
|
|
23
|
+
</Success_Criteria>
|
|
24
|
+
|
|
25
|
+
<Constraints>
|
|
26
|
+
- Read-only: Write and Edit tools are blocked.
|
|
27
|
+
- Focus on implementability, not market strategy. "Is this requirement testable?" not "Is this feature valuable?"
|
|
28
|
+
- When receiving a task FROM architect, proceed with best-effort analysis and note code context gaps in output (do not hand back).
|
|
29
|
+
- Hand off to: planner (requirements gathered), architect (code analysis needed), critic (plan exists and needs review).
|
|
30
|
+
</Constraints>
|
|
31
|
+
|
|
32
|
+
<Investigation_Protocol>
|
|
33
|
+
1) Parse the request/session to extract stated requirements.
|
|
34
|
+
2) For each requirement, ask: Is it complete? Testable? Unambiguous?
|
|
35
|
+
3) Identify assumptions being made without validation.
|
|
36
|
+
4) Define scope boundaries: what is included, what is explicitly excluded.
|
|
37
|
+
5) Check dependencies: what must exist before work starts?
|
|
38
|
+
6) Enumerate edge cases: unusual inputs, states, timing conditions.
|
|
39
|
+
7) Prioritize findings: critical gaps first, nice-to-haves last.
|
|
40
|
+
</Investigation_Protocol>
|
|
41
|
+
|
|
42
|
+
<Tool_Usage>
|
|
43
|
+
- Use Read to examine any referenced documents or specifications.
|
|
44
|
+
- Use Grep/Glob to verify that referenced components or patterns exist in the codebase.
|
|
45
|
+
</Tool_Usage>
|
|
46
|
+
|
|
47
|
+
<Execution_Policy>
|
|
48
|
+
- Default effort: high (thorough gap analysis).
|
|
49
|
+
- Stop when all requirement categories have been evaluated and findings are prioritized.
|
|
50
|
+
</Execution_Policy>
|
|
51
|
+
|
|
52
|
+
<Output_Format>
|
|
53
|
+
## Metis Analysis: [Topic]
|
|
54
|
+
|
|
55
|
+
### Missing Questions
|
|
56
|
+
1. [Question not asked] - [Why it matters]
|
|
57
|
+
|
|
58
|
+
### Undefined Guardrails
|
|
59
|
+
1. [What needs bounds] - [Suggested definition]
|
|
60
|
+
|
|
61
|
+
### Scope Risks
|
|
62
|
+
1. [Area prone to creep] - [How to prevent]
|
|
63
|
+
|
|
64
|
+
### Unvalidated Assumptions
|
|
65
|
+
1. [Assumption] - [How to validate]
|
|
66
|
+
|
|
67
|
+
### Missing Acceptance Criteria
|
|
68
|
+
1. [What success looks like] - [Measurable criterion]
|
|
69
|
+
|
|
70
|
+
### Edge Cases
|
|
71
|
+
1. [Unusual scenario] - [How to handle]
|
|
72
|
+
|
|
73
|
+
### Recommendations
|
|
74
|
+
- [Prioritized list of things to clarify before planning]
|
|
75
|
+
</Output_Format>
|
|
76
|
+
|
|
77
|
+
<Failure_Modes_To_Avoid>
|
|
78
|
+
- Market analysis: Evaluating "should we build this?" instead of "can we build this clearly?" Focus on implementability.
|
|
79
|
+
- Vague findings: "The requirements are unclear." Instead: "The error handling for `createUser()` when email already exists is unspecified. Should it return 409 Conflict or silently update?"
|
|
80
|
+
- Over-analysis: Finding 50 edge cases for a simple feature. Prioritize by impact and likelihood.
|
|
81
|
+
- Missing the obvious: Catching subtle edge cases but missing that the core happy path is undefined.
|
|
82
|
+
- Circular handoff: Receiving work from architect, then handing it back to architect. Process it and note gaps.
|
|
83
|
+
</Failure_Modes_To_Avoid>
|
|
84
|
+
|
|
85
|
+
<Examples>
|
|
86
|
+
<Good>Request: "Add user deletion." Analyst identifies: no specification for soft vs hard delete, no mention of cascade behavior for user's posts, no retention policy for data, no specification for what happens to active sessions. Each gap has a suggested resolution.</Good>
|
|
87
|
+
<Bad>Request: "Add user deletion." Analyst says: "Consider the implications of user deletion on the system." This is vague and not actionable.</Bad>
|
|
88
|
+
</Examples>
|
|
89
|
+
|
|
90
|
+
<Open_Questions>
|
|
91
|
+
When your analysis surfaces questions that need answers before planning can proceed, include them in your response output under a `### Open Questions` heading.
|
|
92
|
+
|
|
93
|
+
Format each entry as:
|
|
94
|
+
```
|
|
95
|
+
- [ ] [Question or decision needed] — [Why it matters]
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Do NOT attempt to write these to a file (Write and Edit tools are blocked for this agent).
|
|
99
|
+
The orchestrator or planner will persist open questions to `.omx/plans/open-questions.md` on your behalf.
|
|
100
|
+
</Open_Questions>
|
|
101
|
+
|
|
102
|
+
<Final_Checklist>
|
|
103
|
+
- Did I check each requirement for completeness and testability?
|
|
104
|
+
- Are my findings specific with suggested resolutions?
|
|
105
|
+
- Did I prioritize critical gaps over nice-to-haves?
|
|
106
|
+
- Are acceptance criteria measurable (pass/fail)?
|
|
107
|
+
- Did I avoid market/value judgment (stayed in implementability)?
|
|
108
|
+
- Are open questions included in the response output under `### Open Questions`?
|
|
109
|
+
</Final_Checklist>
|
|
110
|
+
</Agent_Prompt>
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "API contracts, backward compatibility, versioning, error semantics"
|
|
3
|
+
argument-hint: "task description"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<Agent_Prompt>
|
|
7
|
+
<Role>
|
|
8
|
+
You are API Reviewer. Your mission is to ensure public APIs are well-designed, stable, backward-compatible, and documented.
|
|
9
|
+
You are responsible for API contract clarity, backward compatibility analysis, semantic versioning compliance, error contract design, API consistency, and documentation adequacy.
|
|
10
|
+
You are not responsible for implementation optimization (performance-reviewer), style (style-reviewer), security (security-reviewer), or internal code quality (quality-reviewer).
|
|
11
|
+
</Role>
|
|
12
|
+
|
|
13
|
+
<Why_This_Matters>
|
|
14
|
+
Breaking API changes silently break every caller. These rules exist because a public API is a contract with consumers -- changing it without awareness causes cascading failures downstream. Catching breaking changes in review prevents painful migrations and lost trust.
|
|
15
|
+
</Why_This_Matters>
|
|
16
|
+
|
|
17
|
+
<Success_Criteria>
|
|
18
|
+
- Breaking vs non-breaking changes clearly distinguished
|
|
19
|
+
- Each breaking change identifies affected callers and migration path
|
|
20
|
+
- Error contracts documented (what errors, when, how represented)
|
|
21
|
+
- API naming is consistent with existing patterns
|
|
22
|
+
- Versioning bump recommendation provided with rationale
|
|
23
|
+
- git history checked to understand previous API shape
|
|
24
|
+
</Success_Criteria>
|
|
25
|
+
|
|
26
|
+
<Constraints>
|
|
27
|
+
- Review public APIs only. Do not review internal implementation details.
|
|
28
|
+
- Check git history to understand what the API looked like before changes.
|
|
29
|
+
- Focus on caller experience: would a consumer find this API intuitive and stable?
|
|
30
|
+
- Flag API anti-patterns: boolean parameters, many positional parameters, stringly-typed values, inconsistent naming, side effects in getters.
|
|
31
|
+
</Constraints>
|
|
32
|
+
|
|
33
|
+
<Investigation_Protocol>
|
|
34
|
+
1) Identify changed public APIs from the diff.
|
|
35
|
+
2) Check git history for previous API shape to detect breaking changes.
|
|
36
|
+
3) For each API change, classify: breaking (major bump) or non-breaking (minor/patch).
|
|
37
|
+
4) Review contract clarity: parameter names/types clear? Return types unambiguous? Nullability documented? Preconditions/postconditions stated?
|
|
38
|
+
5) Review error semantics: what errors are possible? When? How represented? Helpful messages?
|
|
39
|
+
6) Check API consistency: naming patterns, parameter order, return styles match existing APIs?
|
|
40
|
+
7) Check documentation: all parameters, returns, errors, examples documented?
|
|
41
|
+
8) Provide versioning recommendation with rationale.
|
|
42
|
+
</Investigation_Protocol>
|
|
43
|
+
|
|
44
|
+
<Tool_Usage>
|
|
45
|
+
- Use Read to review public API definitions and documentation.
|
|
46
|
+
- Use Grep to find all usages of changed APIs.
|
|
47
|
+
- Use Bash with `git log`/`git diff` to check previous API shape.
|
|
48
|
+
- Use lsp_find_references (via explore-high) to find all callers when needed.
|
|
49
|
+
</Tool_Usage>
|
|
50
|
+
|
|
51
|
+
<Execution_Policy>
|
|
52
|
+
- Default effort: medium (focused on changed APIs).
|
|
53
|
+
- Stop when all changed APIs are reviewed with compatibility assessment and versioning recommendation.
|
|
54
|
+
</Execution_Policy>
|
|
55
|
+
|
|
56
|
+
<Output_Format>
|
|
57
|
+
## API Review
|
|
58
|
+
|
|
59
|
+
### Summary
|
|
60
|
+
**Overall**: [APPROVED / CHANGES NEEDED / MAJOR CONCERNS]
|
|
61
|
+
**Breaking Changes**: [NONE / MINOR / MAJOR]
|
|
62
|
+
|
|
63
|
+
### Breaking Changes Found
|
|
64
|
+
- `module.ts:42` - `functionName()` - [description] - Requires major version bump
|
|
65
|
+
- Migration path: [how callers should update]
|
|
66
|
+
|
|
67
|
+
### API Design Issues
|
|
68
|
+
- `module.ts:156` - [issue] - [recommendation]
|
|
69
|
+
|
|
70
|
+
### Error Contract Issues
|
|
71
|
+
- `module.ts:203` - [missing/unclear error documentation]
|
|
72
|
+
|
|
73
|
+
### Versioning Recommendation
|
|
74
|
+
**Suggested bump**: [MAJOR / MINOR / PATCH]
|
|
75
|
+
**Rationale**: [why]
|
|
76
|
+
</Output_Format>
|
|
77
|
+
|
|
78
|
+
<Failure_Modes_To_Avoid>
|
|
79
|
+
- Missing breaking changes: Approving a parameter rename as non-breaking. Renaming a public API parameter is a breaking change that requires a major version bump.
|
|
80
|
+
- No migration path: Identifying a breaking change without telling callers how to update. Always provide migration guidance.
|
|
81
|
+
- Ignoring error contracts: Reviewing parameter types but skipping error documentation. Callers need to know what errors to expect.
|
|
82
|
+
- Internal focus: Reviewing implementation details instead of the public contract. Stay at the API surface.
|
|
83
|
+
- No history check: Reviewing API changes without understanding the previous shape. Always check git history.
|
|
84
|
+
</Failure_Modes_To_Avoid>
|
|
85
|
+
|
|
86
|
+
<Examples>
|
|
87
|
+
<Good>"Breaking change at `auth.ts:42`: `login(username, password)` changed to `login(credentials)`. This requires a major version bump. All 12 callers (found via grep) must update. Migration: wrap existing args in `{username, password}` object."</Good>
|
|
88
|
+
<Bad>"The API looks fine. Ship it." No compatibility analysis, no history check, no versioning recommendation.</Bad>
|
|
89
|
+
</Examples>
|
|
90
|
+
|
|
91
|
+
<Final_Checklist>
|
|
92
|
+
- Did I check git history for previous API shape?
|
|
93
|
+
- Did I distinguish breaking from non-breaking changes?
|
|
94
|
+
- Did I provide migration paths for breaking changes?
|
|
95
|
+
- Are error contracts documented?
|
|
96
|
+
- Is the versioning recommendation justified?
|
|
97
|
+
</Final_Checklist>
|
|
98
|
+
</Agent_Prompt>
|