oxe-cc 1.0.0 → 1.2.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/.cursor/commands/oxe-ask.md +1 -1
- package/.cursor/commands/oxe-capabilities.md +1 -1
- package/.cursor/commands/oxe-checkpoint.md +1 -1
- package/.cursor/commands/oxe-compact.md +1 -1
- package/.cursor/commands/oxe-dashboard.md +1 -1
- package/.cursor/commands/oxe-debug.md +1 -1
- package/.cursor/commands/oxe-discuss.md +1 -1
- package/.cursor/commands/oxe-execute.md +2 -2
- package/.cursor/commands/oxe-forensics.md +1 -1
- package/.cursor/commands/oxe-help.md +1 -1
- package/.cursor/commands/oxe-loop.md +1 -1
- package/.cursor/commands/oxe-milestone.md +1 -1
- package/.cursor/commands/oxe-next.md +1 -1
- package/.cursor/commands/oxe-obs.md +1 -1
- package/.cursor/commands/oxe-plan-agent.md +1 -1
- package/.cursor/commands/oxe-plan.md +1 -1
- package/.cursor/commands/oxe-project.md +1 -1
- package/.cursor/commands/oxe-quick.md +1 -1
- package/.cursor/commands/oxe-research.md +1 -1
- package/.cursor/commands/oxe-retro.md +1 -1
- package/.cursor/commands/oxe-review-pr.md +1 -1
- package/.cursor/commands/oxe-route.md +1 -1
- package/.cursor/commands/oxe-scan.md +1 -1
- package/.cursor/commands/oxe-security.md +1 -1
- package/.cursor/commands/oxe-session.md +2 -2
- package/.cursor/commands/oxe-ship.md +45 -0
- package/.cursor/commands/oxe-skill.md +1 -1
- package/.cursor/commands/oxe-spec.md +1 -1
- package/.cursor/commands/oxe-ui-review.md +1 -1
- package/.cursor/commands/oxe-ui-spec.md +1 -1
- package/.cursor/commands/oxe-update.md +1 -1
- package/.cursor/commands/oxe-validate-gaps.md +1 -1
- package/.cursor/commands/oxe-verify.md +1 -1
- package/.cursor/commands/oxe-workstream.md +1 -1
- package/.cursor/commands/oxe.md +4 -4
- package/.github/copilot-instructions.md +91 -1
- package/.github/prompts/oxe-ask.prompt.md +1 -1
- package/.github/prompts/oxe-capabilities.prompt.md +1 -1
- package/.github/prompts/oxe-checkpoint.prompt.md +1 -1
- package/.github/prompts/oxe-compact.prompt.md +1 -1
- package/.github/prompts/oxe-dashboard.prompt.md +1 -1
- package/.github/prompts/oxe-debug.prompt.md +1 -1
- package/.github/prompts/oxe-discuss.prompt.md +1 -1
- package/.github/prompts/oxe-execute.prompt.md +2 -2
- package/.github/prompts/oxe-forensics.prompt.md +1 -1
- package/.github/prompts/oxe-help.prompt.md +1 -1
- package/.github/prompts/oxe-loop.prompt.md +1 -1
- package/.github/prompts/oxe-milestone.prompt.md +1 -1
- package/.github/prompts/oxe-next.prompt.md +1 -1
- package/.github/prompts/oxe-obs.prompt.md +1 -1
- package/.github/prompts/oxe-plan-agent.prompt.md +1 -1
- package/.github/prompts/oxe-plan.prompt.md +1 -1
- package/.github/prompts/oxe-project.prompt.md +1 -1
- package/.github/prompts/oxe-quick.prompt.md +1 -1
- package/.github/prompts/oxe-research.prompt.md +1 -1
- package/.github/prompts/oxe-retro.prompt.md +1 -1
- package/.github/prompts/oxe-review-pr.prompt.md +1 -1
- package/.github/prompts/oxe-route.prompt.md +1 -1
- package/.github/prompts/oxe-scan.prompt.md +1 -1
- package/.github/prompts/oxe-security.prompt.md +1 -1
- package/.github/prompts/oxe-session.prompt.md +2 -2
- package/.github/prompts/oxe-ship.prompt.md +45 -0
- package/.github/prompts/oxe-skill.prompt.md +1 -1
- package/.github/prompts/oxe-spec.prompt.md +1 -1
- package/.github/prompts/oxe-ui-review.prompt.md +1 -1
- package/.github/prompts/oxe-ui-spec.prompt.md +1 -1
- package/.github/prompts/oxe-update.prompt.md +1 -1
- package/.github/prompts/oxe-validate-gaps.prompt.md +1 -1
- package/.github/prompts/oxe-verify.prompt.md +1 -1
- package/.github/prompts/oxe-workstream.prompt.md +1 -1
- package/.github/prompts/oxe.prompt.md +3 -3
- package/AGENTS.md +43 -28
- package/CHANGELOG.md +158 -0
- package/README.md +72 -50
- package/bin/banner.txt +1 -1
- package/bin/lib/oxe-project-health.cjs +1 -1
- package/commands/oxe/ask.md +5 -1
- package/commands/oxe/checkpoint.md +1 -1
- package/commands/oxe/compact.md +1 -1
- package/commands/oxe/debug.md +1 -1
- package/commands/oxe/execute.md +2 -2
- package/commands/oxe/forensics.md +1 -1
- package/commands/oxe/loop.md +1 -1
- package/commands/oxe/milestone.md +1 -1
- package/commands/oxe/next.md +1 -1
- package/commands/oxe/obs.md +1 -1
- package/commands/oxe/oxe.md +3 -3
- package/commands/oxe/project.md +1 -1
- package/commands/oxe/research.md +1 -1
- package/commands/oxe/retro.md +1 -1
- package/commands/oxe/review-pr.md +1 -1
- package/commands/oxe/route.md +1 -1
- package/commands/oxe/scan.md +1 -1
- package/commands/oxe/security.md +1 -1
- package/commands/oxe/session.md +2 -2
- package/commands/oxe/ship.md +49 -0
- package/commands/oxe/spec.md +2 -2
- package/commands/oxe/ui-review.md +1 -1
- package/commands/oxe/ui-spec.md +1 -1
- package/commands/oxe/validate-gaps.md +1 -1
- package/commands/oxe/verify.md +2 -2
- package/commands/oxe/workstream.md +1 -1
- package/lib/runtime/audit/audit-trail.d.ts +71 -0
- package/lib/runtime/audit/audit-trail.js +154 -0
- package/lib/runtime/audit/index.d.ts +2 -0
- package/lib/runtime/audit/index.js +18 -0
- package/lib/runtime/audit/policy-pack.d.ts +15 -0
- package/lib/runtime/audit/policy-pack.js +57 -0
- package/lib/runtime/context/context-pack-builder.d.ts +15 -0
- package/lib/runtime/context/context-pack-builder.js +42 -0
- package/lib/runtime/context/context-pack-store.d.ts +38 -0
- package/lib/runtime/context/context-pack-store.js +142 -0
- package/lib/runtime/context/context-profiles.d.ts +11 -0
- package/lib/runtime/context/context-profiles.js +51 -0
- package/lib/runtime/context/index.d.ts +2 -0
- package/lib/runtime/context/index.js +2 -0
- package/lib/runtime/decision/decision-engine.d.ts +43 -0
- package/lib/runtime/decision/decision-engine.js +127 -0
- package/lib/runtime/decision/decision-memo.d.ts +53 -0
- package/lib/runtime/decision/decision-memo.js +173 -0
- package/lib/runtime/decision/index.d.ts +2 -0
- package/lib/runtime/decision/index.js +18 -0
- package/lib/runtime/delivery/index.d.ts +1 -0
- package/lib/runtime/delivery/index.js +1 -0
- package/lib/runtime/delivery/promotion-pipeline.d.ts +39 -0
- package/lib/runtime/delivery/promotion-pipeline.js +127 -0
- package/lib/runtime/index.d.ts +3 -0
- package/lib/runtime/index.js +4 -0
- package/lib/runtime/plugins/capability-matrix.d.ts +20 -0
- package/lib/runtime/plugins/capability-matrix.js +59 -0
- package/lib/runtime/plugins/index.d.ts +2 -0
- package/lib/runtime/plugins/index.js +2 -0
- package/lib/runtime/plugins/plugin-manifest.d.ts +22 -0
- package/lib/runtime/plugins/plugin-manifest.js +91 -0
- package/lib/runtime/plugins/plugin-registry.js +5 -0
- package/lib/runtime/policy/policy-engine.d.ts +28 -1
- package/lib/runtime/policy/policy-engine.js +96 -5
- package/lib/runtime/reducers/run-state-reducer.d.ts +26 -0
- package/lib/runtime/reducers/run-state-reducer.js +117 -1
- package/lib/runtime/scheduler/agent-registry.d.ts +44 -0
- package/lib/runtime/scheduler/agent-registry.js +96 -0
- package/lib/runtime/scheduler/agent-roles.d.ts +54 -0
- package/lib/runtime/scheduler/agent-roles.js +62 -0
- package/lib/runtime/scheduler/index.d.ts +3 -0
- package/lib/runtime/scheduler/index.js +3 -0
- package/lib/runtime/scheduler/multi-agent-coordinator.d.ts +2 -0
- package/lib/runtime/scheduler/multi-agent-coordinator.js +91 -4
- package/lib/runtime/scheduler/run-journal.d.ts +18 -0
- package/lib/runtime/scheduler/run-journal.js +54 -0
- package/lib/runtime/scheduler/scheduler.d.ts +11 -1
- package/lib/runtime/scheduler/scheduler.js +135 -7
- package/lib/runtime/verification/index.d.ts +1 -0
- package/lib/runtime/verification/index.js +1 -0
- package/lib/runtime/verification/verification-manifest.d.ts +58 -0
- package/lib/runtime/verification/verification-manifest.js +129 -0
- package/oxe/workflows/ask.md +4 -0
- package/oxe/workflows/checkpoint.md +14 -10
- package/oxe/workflows/debug.md +19 -15
- package/oxe/workflows/execute.md +30 -2
- package/oxe/workflows/forensics.md +13 -9
- package/oxe/workflows/help.md +97 -49
- package/oxe/workflows/loop.md +17 -13
- package/oxe/workflows/obs.md +4 -0
- package/oxe/workflows/oxe.md +64 -31
- package/oxe/workflows/project.md +6 -1
- package/oxe/workflows/references/workflow-runtime-contracts.json +23 -0
- package/oxe/workflows/research.md +32 -28
- package/oxe/workflows/retro.md +4 -0
- package/oxe/workflows/review-pr.md +15 -11
- package/oxe/workflows/scan.md +4 -0
- package/oxe/workflows/security.md +14 -10
- package/oxe/workflows/session.md +17 -1
- package/oxe/workflows/ship.md +142 -0
- package/oxe/workflows/spec.md +15 -0
- package/oxe/workflows/ui-review.md +20 -16
- package/oxe/workflows/ui-spec.md +7 -3
- package/oxe/workflows/validate-gaps.md +13 -9
- package/oxe/workflows/verify.md +42 -3
- package/package.json +1 -1
- package/packages/runtime/src/audit/audit-trail.ts +243 -0
- package/packages/runtime/src/audit/index.ts +2 -0
- package/packages/runtime/src/audit/policy-pack.ts +62 -0
- package/packages/runtime/src/context/context-pack-builder.ts +66 -0
- package/packages/runtime/src/context/context-pack-store.ts +197 -0
- package/packages/runtime/src/context/context-profiles.ts +60 -0
- package/packages/runtime/src/context/index.ts +2 -0
- package/packages/runtime/src/decision/decision-engine.ts +174 -0
- package/packages/runtime/src/decision/decision-memo.ts +211 -0
- package/packages/runtime/src/decision/index.ts +2 -0
- package/packages/runtime/src/delivery/index.ts +1 -0
- package/packages/runtime/src/delivery/promotion-pipeline.ts +180 -0
- package/packages/runtime/src/index.ts +5 -0
- package/packages/runtime/src/plugins/capability-matrix.ts +83 -0
- package/packages/runtime/src/plugins/index.ts +2 -0
- package/packages/runtime/src/plugins/plugin-manifest.ts +113 -0
- package/packages/runtime/src/plugins/plugin-registry.ts +5 -0
- package/packages/runtime/src/policy/policy-engine.ts +138 -7
- package/packages/runtime/src/reducers/run-state-reducer.ts +143 -1
- package/packages/runtime/src/scheduler/agent-registry.ts +132 -0
- package/packages/runtime/src/scheduler/agent-roles.ts +109 -0
- package/packages/runtime/src/scheduler/index.ts +3 -0
- package/packages/runtime/src/scheduler/multi-agent-coordinator.ts +106 -4
- package/packages/runtime/src/scheduler/run-journal.ts +62 -0
- package/packages/runtime/src/scheduler/scheduler.ts +168 -8
- package/packages/runtime/src/verification/index.ts +1 -0
- package/packages/runtime/src/verification/verification-manifest.ts +192 -0
- package/vscode-extension/oxe-agents-1.0.0.vsix +0 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import crypto from 'crypto';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import fs from 'fs';
|
|
4
|
+
import type { VerificationStatus } from '../models/verification-result';
|
|
5
|
+
import type { CheckResult } from './verification-compiler';
|
|
6
|
+
|
|
7
|
+
export type VerificationProfile = 'quick' | 'standard' | 'critical';
|
|
8
|
+
|
|
9
|
+
export type FailureClass =
|
|
10
|
+
| 'deterministic'
|
|
11
|
+
| 'flaky'
|
|
12
|
+
| 'timeout'
|
|
13
|
+
| 'env_setup'
|
|
14
|
+
| 'policy_failure'
|
|
15
|
+
| 'evidence_missing';
|
|
16
|
+
|
|
17
|
+
export type VerificationGranularity = 'work_item' | 'wave' | 'run';
|
|
18
|
+
|
|
19
|
+
export interface ManifestCheck {
|
|
20
|
+
check_id: string;
|
|
21
|
+
acceptance_ref: string | null;
|
|
22
|
+
status: VerificationStatus;
|
|
23
|
+
failure_class: FailureClass | null;
|
|
24
|
+
evidence_refs: string[];
|
|
25
|
+
duration_ms: number;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface VerificationManifest {
|
|
29
|
+
manifest_id: string;
|
|
30
|
+
run_id: string;
|
|
31
|
+
work_item_id: string | null;
|
|
32
|
+
wave: number | null;
|
|
33
|
+
granularity: VerificationGranularity;
|
|
34
|
+
profile: VerificationProfile;
|
|
35
|
+
compiled_at: string;
|
|
36
|
+
checks: ManifestCheck[];
|
|
37
|
+
summary: {
|
|
38
|
+
total: number;
|
|
39
|
+
pass: number;
|
|
40
|
+
fail: number;
|
|
41
|
+
skip: number;
|
|
42
|
+
error: number;
|
|
43
|
+
all_passed: boolean;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface ResidualRisk {
|
|
48
|
+
risk_id: string;
|
|
49
|
+
work_item_id: string | null;
|
|
50
|
+
check_id: string | null;
|
|
51
|
+
failure_class: FailureClass;
|
|
52
|
+
description: string;
|
|
53
|
+
severity: 'low' | 'medium' | 'high' | 'critical';
|
|
54
|
+
mitigation: string | null;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface ResidualRiskLedger {
|
|
58
|
+
run_id: string;
|
|
59
|
+
generated_at: string;
|
|
60
|
+
risks: ResidualRisk[];
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const PROFILE_REQUIRED_CHECKS: Record<VerificationProfile, FailureClass[]> = {
|
|
64
|
+
quick: ['deterministic'],
|
|
65
|
+
standard: ['deterministic', 'policy_failure'],
|
|
66
|
+
critical: ['deterministic', 'policy_failure', 'evidence_missing', 'flaky'],
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export function classifyFailure(result: CheckResult): FailureClass | null {
|
|
70
|
+
if (result.status === 'pass' || result.status === 'skip') return null;
|
|
71
|
+
if (result.error && (result.error.toLowerCase().includes('timeout') || result.error.toLowerCase().includes('timed out'))) return 'timeout';
|
|
72
|
+
if (result.exit_code === null && result.error) return 'env_setup';
|
|
73
|
+
if (result.stderr.toLowerCase().includes('policy') || result.stderr.toLowerCase().includes('denied')) {
|
|
74
|
+
return 'policy_failure';
|
|
75
|
+
}
|
|
76
|
+
if (result.exit_code !== 0 && result.stderr === '' && result.stdout === '') return 'evidence_missing';
|
|
77
|
+
// Default: non-deterministic signals (no reliable exit code pattern)
|
|
78
|
+
return 'deterministic';
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function buildManifest(
|
|
82
|
+
runId: string,
|
|
83
|
+
results: CheckResult[],
|
|
84
|
+
options: {
|
|
85
|
+
workItemId?: string;
|
|
86
|
+
wave?: number;
|
|
87
|
+
granularity?: VerificationGranularity;
|
|
88
|
+
profile?: VerificationProfile;
|
|
89
|
+
evidenceRefs?: Map<string, string[]>;
|
|
90
|
+
} = {}
|
|
91
|
+
): VerificationManifest {
|
|
92
|
+
const profile = options.profile ?? 'standard';
|
|
93
|
+
const granularity = options.granularity ?? 'run';
|
|
94
|
+
const evidenceRefs = options.evidenceRefs ?? new Map();
|
|
95
|
+
|
|
96
|
+
const checks: ManifestCheck[] = results.map((r) => ({
|
|
97
|
+
check_id: r.check_id,
|
|
98
|
+
acceptance_ref: r.acceptance_ref,
|
|
99
|
+
status: r.status,
|
|
100
|
+
failure_class: classifyFailure(r),
|
|
101
|
+
evidence_refs: evidenceRefs.get(r.check_id) ?? [],
|
|
102
|
+
duration_ms: r.duration_ms,
|
|
103
|
+
}));
|
|
104
|
+
|
|
105
|
+
const summary = {
|
|
106
|
+
total: checks.length,
|
|
107
|
+
pass: checks.filter((c) => c.status === 'pass').length,
|
|
108
|
+
fail: checks.filter((c) => c.status === 'fail').length,
|
|
109
|
+
skip: checks.filter((c) => c.status === 'skip').length,
|
|
110
|
+
error: checks.filter((c) => c.status === 'error').length,
|
|
111
|
+
all_passed: checks.every((c) => c.status === 'pass' || c.status === 'skip'),
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
return {
|
|
115
|
+
manifest_id: `vm-${crypto.randomBytes(4).toString('hex')}`,
|
|
116
|
+
run_id: runId,
|
|
117
|
+
work_item_id: options.workItemId ?? null,
|
|
118
|
+
wave: options.wave ?? null,
|
|
119
|
+
granularity,
|
|
120
|
+
profile,
|
|
121
|
+
compiled_at: new Date().toISOString(),
|
|
122
|
+
checks,
|
|
123
|
+
summary,
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function buildRiskLedger(
|
|
128
|
+
runId: string,
|
|
129
|
+
manifest: VerificationManifest
|
|
130
|
+
): ResidualRiskLedger {
|
|
131
|
+
const risks: ResidualRisk[] = [];
|
|
132
|
+
|
|
133
|
+
for (const check of manifest.checks) {
|
|
134
|
+
if (check.status === 'pass' || check.status === 'skip') continue;
|
|
135
|
+
if (!check.failure_class) continue;
|
|
136
|
+
|
|
137
|
+
const required = PROFILE_REQUIRED_CHECKS[manifest.profile];
|
|
138
|
+
if (!required.includes(check.failure_class)) continue;
|
|
139
|
+
|
|
140
|
+
risks.push({
|
|
141
|
+
risk_id: `risk-${crypto.randomBytes(3).toString('hex')}`,
|
|
142
|
+
work_item_id: manifest.work_item_id,
|
|
143
|
+
check_id: check.check_id,
|
|
144
|
+
failure_class: check.failure_class,
|
|
145
|
+
description: `Check ${check.check_id} ${check.status}: ${check.failure_class}`,
|
|
146
|
+
severity: check.failure_class === 'policy_failure' || check.failure_class === 'deterministic'
|
|
147
|
+
? 'high'
|
|
148
|
+
: check.failure_class === 'evidence_missing'
|
|
149
|
+
? 'medium'
|
|
150
|
+
: 'low',
|
|
151
|
+
mitigation: null,
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
return {
|
|
156
|
+
run_id: runId,
|
|
157
|
+
generated_at: new Date().toISOString(),
|
|
158
|
+
risks,
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export function saveManifest(projectRoot: string, runId: string, manifest: VerificationManifest): void {
|
|
163
|
+
const p = path.join(projectRoot, '.oxe', 'runs', runId, 'verification-manifest.json');
|
|
164
|
+
fs.mkdirSync(path.dirname(p), { recursive: true });
|
|
165
|
+
fs.writeFileSync(p, JSON.stringify(manifest, null, 2), 'utf8');
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export function loadManifest(projectRoot: string, runId: string): VerificationManifest | null {
|
|
169
|
+
const p = path.join(projectRoot, '.oxe', 'runs', runId, 'verification-manifest.json');
|
|
170
|
+
if (!fs.existsSync(p)) return null;
|
|
171
|
+
try {
|
|
172
|
+
return JSON.parse(fs.readFileSync(p, 'utf8')) as VerificationManifest;
|
|
173
|
+
} catch {
|
|
174
|
+
return null;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export function saveRiskLedger(projectRoot: string, runId: string, ledger: ResidualRiskLedger): void {
|
|
179
|
+
const p = path.join(projectRoot, '.oxe', 'runs', runId, 'residual-risks.json');
|
|
180
|
+
fs.mkdirSync(path.dirname(p), { recursive: true });
|
|
181
|
+
fs.writeFileSync(p, JSON.stringify(ledger, null, 2), 'utf8');
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export function loadRiskLedger(projectRoot: string, runId: string): ResidualRiskLedger | null {
|
|
185
|
+
const p = path.join(projectRoot, '.oxe', 'runs', runId, 'residual-risks.json');
|
|
186
|
+
if (!fs.existsSync(p)) return null;
|
|
187
|
+
try {
|
|
188
|
+
return JSON.parse(fs.readFileSync(p, 'utf8')) as ResidualRiskLedger;
|
|
189
|
+
} catch {
|
|
190
|
+
return null;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
Binary file
|