oxe-cc 1.14.0 → 1.16.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.
Files changed (40) hide show
  1. package/.github/dependabot.yml +31 -0
  2. package/.github/workflows/ci.yml +141 -56
  3. package/.github/workflows/release.yml +114 -89
  4. package/CHANGELOG.md +866 -779
  5. package/README.md +600 -736
  6. package/bin/lib/oxe-agent-install.cjs +299 -284
  7. package/bin/lib/oxe-artifact-catalog.cjs +376 -0
  8. package/bin/lib/oxe-command-registry.cjs +31 -0
  9. package/bin/lib/oxe-context-engine.cjs +11 -11
  10. package/bin/lib/oxe-core-command-handlers.cjs +82 -0
  11. package/bin/lib/oxe-dashboard.cjs +140 -140
  12. package/bin/lib/oxe-manifest.cjs +20 -20
  13. package/bin/lib/oxe-npm-version.cjs +6 -4
  14. package/bin/lib/oxe-plugin-cli.cjs +95 -0
  15. package/bin/lib/oxe-plugins.cjs +94 -3
  16. package/bin/lib/oxe-process.cjs +67 -0
  17. package/bin/lib/oxe-project-health.cjs +2846 -2856
  18. package/bin/lib/oxe-runtime-semantics.cjs +68 -69
  19. package/bin/oxe-cc.js +179 -325
  20. package/docs/INTEGRATION.md +182 -152
  21. package/docs/QUALITY-GATES.md +46 -0
  22. package/docs/RELEASE-READINESS.md +86 -61
  23. package/docs/RUNTIME-SMOKE-MATRIX.md +137 -135
  24. package/docs/oxe-artifact-map.html +1172 -1172
  25. package/lib/sdk/index.cjs +18 -0
  26. package/lib/sdk/index.d.ts +969 -900
  27. package/lib/sdk/index.types.ts +933 -0
  28. package/oxe/templates/PLUGINS.md +8 -1
  29. package/oxe/templates/STATE-REFERENCE.md +125 -0
  30. package/oxe/templates/STATE.md +11 -121
  31. package/oxe/workflows/help.md +2 -0
  32. package/package.json +129 -108
  33. package/packages/runtime/package.json +18 -18
  34. package/packages/runtime/src/evidence/evidence-store.ts +2 -2
  35. package/packages/runtime/src/scheduler/multi-agent-coordinator.ts +728 -728
  36. package/packages/runtime/src/workspace/strategies/git-worktree.ts +24 -24
  37. package/packages/runtime/tsconfig.json +8 -2
  38. package/vscode-extension/.vscodeignore +2 -0
  39. package/vscode-extension/package.json +193 -185
  40. package/vscode-extension/src/extension.js +11 -1
@@ -9,21 +9,21 @@ export class GitWorktreeManager implements WorkspaceManager {
9
9
  readonly isolation_level = 'isolated' as const;
10
10
  private leases = new Map<string, WorkspaceLease>();
11
11
 
12
- constructor(private readonly projectRoot: string) {}
13
-
14
- async allocate(req: WorkspaceRequest): Promise<WorkspaceLease> {
15
- const suffix = crypto.randomBytes(4).toString('hex');
16
- const safeWorkItem = String(req.work_item_id).replace(/[^A-Za-z0-9._-]/g, '-');
17
- const wsId = `ws-${safeWorkItem}-a${req.attempt_number}-${suffix}`;
18
- const branch = `oxe/${safeWorkItem}-attempt${req.attempt_number}-${suffix}`;
19
- const worktreePath = path.join(this.projectRoot, '.oxe', 'workspaces', wsId);
20
-
21
- const baseCommit = this.git(['rev-parse', 'HEAD'], undefined, 'git_worktree requires a git repository with at least one base commit').trim();
12
+ constructor(private readonly projectRoot: string) {}
13
+
14
+ async allocate(req: WorkspaceRequest): Promise<WorkspaceLease> {
15
+ const suffix = crypto.randomBytes(4).toString('hex');
16
+ const safeWorkItem = String(req.work_item_id).replace(/[^A-Za-z0-9._-]/g, '-');
17
+ const wsId = `ws-${safeWorkItem}-a${req.attempt_number}-${suffix}`;
18
+ const branch = `oxe/${safeWorkItem}-attempt${req.attempt_number}-${suffix}`;
19
+ const worktreePath = path.join(this.projectRoot, '.oxe', 'workspaces', wsId);
20
+
21
+ const baseCommit = this.git(['rev-parse', 'HEAD'], undefined, 'git_worktree requires a git repository with at least one base commit').trim();
22
22
 
23
23
  fs.mkdirSync(path.dirname(worktreePath), { recursive: true });
24
24
 
25
25
  // Create worktree on a new branch starting from HEAD
26
- this.git(['worktree', 'add', worktreePath, '-b', branch], undefined, 'failed to create git_worktree workspace');
26
+ this.git(['worktree', 'add', worktreePath, '-b', branch], undefined, 'failed to create git_worktree workspace');
27
27
 
28
28
  const lease: WorkspaceLease = {
29
29
  workspace_id: wsId,
@@ -72,16 +72,16 @@ export class GitWorktreeManager implements WorkspaceManager {
72
72
  this.leases.delete(id);
73
73
  }
74
74
 
75
- private git(args: string[], cwd?: string, message?: string): string {
76
- try {
77
- return execFileSync('git', args, {
78
- cwd: cwd ?? this.projectRoot,
79
- encoding: 'utf8',
80
- stdio: ['ignore', 'pipe', 'pipe'],
81
- });
82
- } catch (error) {
83
- const detail = error instanceof Error ? error.message : String(error);
84
- throw new Error(`${message || 'git command failed'}: git ${args.join(' ')} (${detail})`);
85
- }
86
- }
87
- }
75
+ private git(args: string[], cwd?: string, message?: string): string {
76
+ try {
77
+ return execFileSync('git', args, {
78
+ cwd: cwd ?? this.projectRoot,
79
+ encoding: 'utf8',
80
+ stdio: ['ignore', 'pipe', 'pipe'],
81
+ });
82
+ } catch (error) {
83
+ const detail = error instanceof Error ? error.message : String(error);
84
+ throw new Error(`${message || 'git command failed'}: git ${args.join(' ')} (${detail})`);
85
+ }
86
+ }
87
+ }
@@ -12,6 +12,12 @@
12
12
  "rootDir": "src",
13
13
  "skipLibCheck": true
14
14
  },
15
- "include": ["src/**/*.ts"],
16
- "exclude": ["tests/**", "node_modules/**", "dist-tests/**"]
15
+ "include": [
16
+ "src/**/*.ts"
17
+ ],
18
+ "exclude": [
19
+ "tests/**",
20
+ "node_modules/**",
21
+ "dist-tests/**"
22
+ ]
17
23
  }
@@ -2,6 +2,8 @@
2
2
  .git/**
3
3
  .gitignore
4
4
  node_modules/**
5
+ .vscode-test/**
6
+ test/**
5
7
  **/*.map
6
8
  **/*.test.js
7
9
  tests/**
@@ -1,185 +1,193 @@
1
- {
2
- "name": "oxe-agents",
3
- "displayName": "OXE Agents",
4
- "description": "Agentes OXE para GitHub Copilot Chat — cada fase do ciclo como um @agente no VS Code",
5
- "version": "1.14.0",
6
- "publisher": "oxe-cc",
7
- "license": "MIT",
8
- "engines": {
9
- "vscode": "^1.95.0"
10
- },
11
- "categories": [
12
- "AI",
13
- "Programming Languages",
14
- "Other"
15
- ],
16
- "keywords": [
17
- "oxe",
18
- "copilot",
19
- "chat",
20
- "agent",
21
- "workflow",
22
- "spec-driven"
23
- ],
24
- "extensionDependencies": [
25
- "GitHub.copilot-chat"
26
- ],
27
- "activationEvents": [
28
- "onStartupFinished"
29
- ],
30
- "main": "./src/extension.js",
31
- "contributes": {
32
- "chatParticipants": [
33
- {
34
- "id": "oxe.router",
35
- "name": "oxe",
36
- "fullName": "OXE",
37
- "description": "Router universal — lê STATE.md e sugere o próximo passo do ciclo OXE",
38
- "isSticky": false,
39
- "sampleRequest": "Qual é a situação atual do projeto e o próximo passo recomendado?"
40
- },
41
- {
42
- "id": "oxe.ask",
43
- "name": "oxe-ask",
44
- "fullName": "OXE Ask",
45
- "description": "Situational awarenessresponde perguntas sobre o estado atual do projeto com evidência explícita",
46
- "isSticky": false,
47
- "sampleRequest": "Qual é a fase atual e o que foi implementado até agora?"
48
- },
49
- {
50
- "id": "oxe.scan",
51
- "name": "oxe-scan",
52
- "fullName": "OXE Scan",
53
- "description": "Mapeamento do codebase reconstrói .oxe/codebase/ e contextualiza o projeto para um novo ciclo",
54
- "isSticky": false,
55
- "sampleRequest": "Mapeie o codebase e atualize o contexto do projeto."
56
- },
57
- {
58
- "id": "oxe.spec",
59
- "name": "oxe-spec",
60
- "fullName": "OXE Spec",
61
- "description": "Especificaçãogera SPEC.md com critérios de aceite verificáveis a partir de requisitos",
62
- "isSticky": true,
63
- "sampleRequest": "Preciso adicionar autenticação JWT ao sistema. Gere a especificação.",
64
- "commands": [
65
- {
66
- "name": "discuss",
67
- "description": "Abrir discussão estruturada antes de gerar a spec"
68
- }
69
- ]
70
- },
71
- {
72
- "id": "oxe.plan",
73
- "name": "oxe-plan",
74
- "fullName": "OXE Plan",
75
- "description": "Planejamento gera PLAN.md com ondas, tarefas, hipóteses críticas e confidence vector",
76
- "isSticky": true,
77
- "sampleRequest": "Gere o plano de implementação para o SPEC atual.",
78
- "commands": [
79
- {
80
- "name": "replan",
81
- "description": "Replanejar ciclo atual com motivo e lições aplicadas"
82
- },
83
- {
84
- "name": "agents",
85
- "description": "Gerar blueprint multi-agente para planos com múltiplos domínios"
86
- }
87
- ]
88
- },
89
- {
90
- "id": "oxe.quick",
91
- "name": "oxe-quick",
92
- "fullName": "OXE Quick",
93
- "description": "Plano rápido para tarefas S/M sem SPEC formal; objetivo → passos → verify",
94
- "isSticky": true,
95
- "sampleRequest": "Preciso renomear a função processPayment para handlePayment em todos os arquivos."
96
- },
97
- {
98
- "id": "oxe.execute",
99
- "name": "oxe-execute",
100
- "fullName": "OXE Execute",
101
- "description": "Execuçãoimplementa a onda atual do PLAN validando hipóteses antes de mutar",
102
- "isSticky": true,
103
- "sampleRequest": "Execute a onda atual do plano.",
104
- "commands": [
105
- {
106
- "name": "wave",
107
- "description": "Executar uma onda específica (ex: /wave 2)"
108
- },
109
- {
110
- "name": "task",
111
- "description": "Executar uma tarefa específica (ex: /task T3)"
112
- }
113
- ]
114
- },
115
- {
116
- "id": "oxe.debug",
117
- "name": "oxe-debug",
118
- "fullName": "OXE Debug",
119
- "description": "Debug diagnóstico orientado a hipóteses durante execução travada ou falha inline",
120
- "isSticky": false,
121
- "sampleRequest": "A tarefa T3 está falhando com erro de timeout. Ajude a diagnosticar."
122
- },
123
- {
124
- "id": "oxe.verify",
125
- "name": "oxe-verify",
126
- "fullName": "OXE Verify",
127
- "description": "Verificaçãovalida critérios A* do SPEC contra evidências reais produzidas pelo executor",
128
- "isSticky": true,
129
- "sampleRequest": "Verifique se a implementação atende todos os critérios do SPEC.",
130
- "commands": [
131
- {
132
- "name": "audit",
133
- "description": "Auditoria adversarial: sem acesso ao PLAN, apenas SPEC + evidências"
134
- }
135
- ]
136
- },
137
- {
138
- "id": "oxe.review",
139
- "name": "oxe-review",
140
- "fullName": "OXE Review",
141
- "description": "Revisão de código — auditor adversarial de PR e mudanças, findings por severidade",
142
- "isSticky": false,
143
- "sampleRequest": "Revise as mudanças desta branch e liste os findings por severidade."
144
- },
145
- {
146
- "id": "oxe.capabilities",
147
- "name": "oxe-capabilities",
148
- "fullName": "OXE Capabilities",
149
- "description": "Capabilities lista, instala, remove e atualiza capabilities nativas do projeto em .oxe/",
150
- "isSticky": false,
151
- "sampleRequest": "Liste as capabilities disponíveis neste projeto.",
152
- "commands": [
153
- {
154
- "name": "list",
155
- "description": "Listar capabilities instaladas"
156
- },
157
- {
158
- "name": "install",
159
- "description": "Instalar uma capability"
160
- }
161
- ]
162
- },
163
- {
164
- "id": "oxe.skill",
165
- "name": "oxe-skill",
166
- "fullName": "OXE Skill",
167
- "description": "Skills gerencia skills e habilidades registradas no framework OXE do projeto",
168
- "isSticky": false,
169
- "sampleRequest": "Quais skills estão disponíveis neste projeto OXE?"
170
- },
171
- {
172
- "id": "oxe.dashboard",
173
- "name": "oxe-dashboard",
174
- "fullName": "OXE Dashboard",
175
- "description": "Dashboardexibe status operacional: runtime, ondas, checkpoints e saúde do ciclo",
176
- "isSticky": false,
177
- "sampleRequest": "Mostre o status do dashboard: fase, active run e próximo passo."
178
- }
179
- ]
180
- },
181
- "repository": {
182
- "type": "git",
183
- "url": "https://github.com/oxe-cc/oxe-cc"
184
- }
185
- }
1
+ {
2
+ "name": "oxe-agents",
3
+ "displayName": "OXE Agents",
4
+ "description": "Agentes OXE para GitHub Copilot Chat — cada fase do ciclo como um @agente no VS Code",
5
+ "version": "1.16.0",
6
+ "publisher": "oxe-cc",
7
+ "license": "MIT",
8
+ "engines": {
9
+ "vscode": "^1.95.0"
10
+ },
11
+ "scripts": {
12
+ "test": "node test/run-extension-tests.cjs",
13
+ "package": "vsce package --no-yarn --no-dependencies --allow-missing-repository"
14
+ },
15
+ "devDependencies": {
16
+ "@vscode/test-electron": "2.5.2",
17
+ "@vscode/vsce": "3.9.2"
18
+ },
19
+ "categories": [
20
+ "AI",
21
+ "Programming Languages",
22
+ "Other"
23
+ ],
24
+ "keywords": [
25
+ "oxe",
26
+ "copilot",
27
+ "chat",
28
+ "agent",
29
+ "workflow",
30
+ "spec-driven"
31
+ ],
32
+ "extensionDependencies": [
33
+ "GitHub.copilot-chat"
34
+ ],
35
+ "activationEvents": [
36
+ "onStartupFinished"
37
+ ],
38
+ "main": "./src/extension.js",
39
+ "contributes": {
40
+ "chatParticipants": [
41
+ {
42
+ "id": "oxe.router",
43
+ "name": "oxe",
44
+ "fullName": "OXE",
45
+ "description": "Router universal STATE.md e sugere o próximo passo do ciclo OXE",
46
+ "isSticky": false,
47
+ "sampleRequest": "Qual é a situação atual do projeto e o próximo passo recomendado?"
48
+ },
49
+ {
50
+ "id": "oxe.ask",
51
+ "name": "oxe-ask",
52
+ "fullName": "OXE Ask",
53
+ "description": "Situational awarenessresponde perguntas sobre o estado atual do projeto com evidência explícita",
54
+ "isSticky": false,
55
+ "sampleRequest": "Qual é a fase atual e o que foi implementado até agora?"
56
+ },
57
+ {
58
+ "id": "oxe.scan",
59
+ "name": "oxe-scan",
60
+ "fullName": "OXE Scan",
61
+ "description": "Mapeamento do codebase reconstrói .oxe/codebase/ e contextualiza o projeto para um novo ciclo",
62
+ "isSticky": false,
63
+ "sampleRequest": "Mapeie o codebase e atualize o contexto do projeto."
64
+ },
65
+ {
66
+ "id": "oxe.spec",
67
+ "name": "oxe-spec",
68
+ "fullName": "OXE Spec",
69
+ "description": "Especificação — gera SPEC.md com critérios de aceite verificáveis a partir de requisitos",
70
+ "isSticky": true,
71
+ "sampleRequest": "Preciso adicionar autenticação JWT ao sistema. Gere a especificação.",
72
+ "commands": [
73
+ {
74
+ "name": "discuss",
75
+ "description": "Abrir discussão estruturada antes de gerar a spec"
76
+ }
77
+ ]
78
+ },
79
+ {
80
+ "id": "oxe.plan",
81
+ "name": "oxe-plan",
82
+ "fullName": "OXE Plan",
83
+ "description": "Planejamento — gera PLAN.md com ondas, tarefas, hipóteses críticas e confidence vector",
84
+ "isSticky": true,
85
+ "sampleRequest": "Gere o plano de implementação para o SPEC atual.",
86
+ "commands": [
87
+ {
88
+ "name": "replan",
89
+ "description": "Replanejar ciclo atual com motivo e lições aplicadas"
90
+ },
91
+ {
92
+ "name": "agents",
93
+ "description": "Gerar blueprint multi-agente para planos com múltiplos domínios"
94
+ }
95
+ ]
96
+ },
97
+ {
98
+ "id": "oxe.quick",
99
+ "name": "oxe-quick",
100
+ "fullName": "OXE Quick",
101
+ "description": "Plano rápido para tarefas S/M sem SPEC formal; objetivo passos verify",
102
+ "isSticky": true,
103
+ "sampleRequest": "Preciso renomear a função processPayment para handlePayment em todos os arquivos."
104
+ },
105
+ {
106
+ "id": "oxe.execute",
107
+ "name": "oxe-execute",
108
+ "fullName": "OXE Execute",
109
+ "description": "Execução — implementa a onda atual do PLAN validando hipóteses antes de mutar",
110
+ "isSticky": true,
111
+ "sampleRequest": "Execute a onda atual do plano.",
112
+ "commands": [
113
+ {
114
+ "name": "wave",
115
+ "description": "Executar uma onda específica (ex: /wave 2)"
116
+ },
117
+ {
118
+ "name": "task",
119
+ "description": "Executar uma tarefa específica (ex: /task T3)"
120
+ }
121
+ ]
122
+ },
123
+ {
124
+ "id": "oxe.debug",
125
+ "name": "oxe-debug",
126
+ "fullName": "OXE Debug",
127
+ "description": "Debugdiagnóstico orientado a hipóteses durante execução travada ou falha inline",
128
+ "isSticky": false,
129
+ "sampleRequest": "A tarefa T3 está falhando com erro de timeout. Ajude a diagnosticar."
130
+ },
131
+ {
132
+ "id": "oxe.verify",
133
+ "name": "oxe-verify",
134
+ "fullName": "OXE Verify",
135
+ "description": "Verificação — valida critérios A* do SPEC contra evidências reais produzidas pelo executor",
136
+ "isSticky": true,
137
+ "sampleRequest": "Verifique se a implementação atende todos os critérios do SPEC.",
138
+ "commands": [
139
+ {
140
+ "name": "audit",
141
+ "description": "Auditoria adversarial: sem acesso ao PLAN, apenas SPEC + evidências"
142
+ }
143
+ ]
144
+ },
145
+ {
146
+ "id": "oxe.review",
147
+ "name": "oxe-review",
148
+ "fullName": "OXE Review",
149
+ "description": "Revisão de código auditor adversarial de PR e mudanças, findings por severidade",
150
+ "isSticky": false,
151
+ "sampleRequest": "Revise as mudanças desta branch e liste os findings por severidade."
152
+ },
153
+ {
154
+ "id": "oxe.capabilities",
155
+ "name": "oxe-capabilities",
156
+ "fullName": "OXE Capabilities",
157
+ "description": "Capabilities — lista, instala, remove e atualiza capabilities nativas do projeto em .oxe/",
158
+ "isSticky": false,
159
+ "sampleRequest": "Liste as capabilities disponíveis neste projeto.",
160
+ "commands": [
161
+ {
162
+ "name": "list",
163
+ "description": "Listar capabilities instaladas"
164
+ },
165
+ {
166
+ "name": "install",
167
+ "description": "Instalar uma capability"
168
+ }
169
+ ]
170
+ },
171
+ {
172
+ "id": "oxe.skill",
173
+ "name": "oxe-skill",
174
+ "fullName": "OXE Skill",
175
+ "description": "Skillsgerencia skills e habilidades registradas no framework OXE do projeto",
176
+ "isSticky": false,
177
+ "sampleRequest": "Quais skills estão disponíveis neste projeto OXE?"
178
+ },
179
+ {
180
+ "id": "oxe.dashboard",
181
+ "name": "oxe-dashboard",
182
+ "fullName": "OXE Dashboard",
183
+ "description": "Dashboard — exibe status operacional: runtime, ondas, checkpoints e saúde do ciclo",
184
+ "isSticky": false,
185
+ "sampleRequest": "Mostre o status do dashboard: fase, active run e próximo passo."
186
+ }
187
+ ]
188
+ },
189
+ "repository": {
190
+ "type": "git",
191
+ "url": "https://github.com/propagno/oxe-build"
192
+ }
193
+ }
@@ -11,6 +11,13 @@ const contractBuilder = require('./shared/contractBuilder');
11
11
 
12
12
  /** @type {vscode.OutputChannel | null} */
13
13
  let outputChannel = null;
14
+ let registeredParticipantIds = [];
15
+
16
+ function publicRegistrationApi() {
17
+ return Object.freeze({
18
+ getRegisteredParticipantIds: () => [...registeredParticipantIds],
19
+ });
20
+ }
14
21
 
15
22
  function log(message) {
16
23
  if (outputChannel) outputChannel.appendLine(`[OXE Agents] ${message}`);
@@ -261,6 +268,7 @@ function makeHandler(agentDef) {
261
268
  * @param {import('vscode').ExtensionContext} context
262
269
  */
263
270
  function activate(context) {
271
+ registeredParticipantIds = [];
264
272
  // Criar output channel para diagnóstico
265
273
  outputChannel = vscode.window.createOutputChannel('OXE Agents');
266
274
  context.subscriptions.push(outputChannel);
@@ -271,7 +279,7 @@ function activate(context) {
271
279
  const msg = 'OXE Agents requer GitHub Copilot Chat (GitHub.copilot-chat) instalado e habilitado no VS Code.';
272
280
  log(`AVISO: ${msg}`);
273
281
  vscode.window.showWarningMessage(msg);
274
- return;
282
+ return publicRegistrationApi();
275
283
  }
276
284
 
277
285
  // Registrar todos os agentes
@@ -282,6 +290,7 @@ function activate(context) {
282
290
  participant.iconPath = new vscode.ThemeIcon('sparkle');
283
291
  context.subscriptions.push(participant);
284
292
  registered++;
293
+ registeredParticipantIds.push(agentDef.id);
285
294
  log(`Agente registrado: ${agentDef.id}`);
286
295
  } catch (err) {
287
296
  log(`Falha ao registrar ${agentDef.id}: ${err.message}`);
@@ -301,6 +310,7 @@ function activate(context) {
301
310
  if (choice === 'Ver log') outputChannel?.show();
302
311
  });
303
312
  }
313
+ return publicRegistrationApi();
304
314
  }
305
315
 
306
316
  function deactivate() {