@besales/ops-framework 0.1.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/CHANGELOG.md +10 -0
- package/README.md +328 -0
- package/bin/build-check-context.mjs +67 -0
- package/bin/build-execution-ledger.mjs +54 -0
- package/bin/estimate-llm-input.mjs +160 -0
- package/bin/guard-task.mjs +384 -0
- package/bin/hash-task-artifacts.mjs +44 -0
- package/bin/init-project.mjs +49 -0
- package/bin/intake-execution-feedback.mjs +207 -0
- package/bin/intake-feedback.test.mjs +73 -0
- package/bin/learning-loop.mjs +658 -0
- package/bin/learning-loop.test.mjs +175 -0
- package/bin/lib/bootstrap-utils.mjs +542 -0
- package/bin/lib/bootstrap-utils.test.mjs +156 -0
- package/bin/lib/check-context-utils.mjs +1448 -0
- package/bin/lib/check-context-utils.test.mjs +497 -0
- package/bin/lib/execution-ledger-utils.mjs +162 -0
- package/bin/lib/execution-ledger-utils.test.mjs +74 -0
- package/bin/lib/llm-input-pack-utils.mjs +663 -0
- package/bin/lib/llm-input-pack-utils.test.mjs +262 -0
- package/bin/lib/project-config.mjs +229 -0
- package/bin/lib/project-config.test.mjs +102 -0
- package/bin/lib/task-manifest-utils.mjs +512 -0
- package/bin/lib/task-manifest-utils.test.mjs +218 -0
- package/bin/lib/task-metrics-utils.mjs +63 -0
- package/bin/lib/task-metrics-utils.test.mjs +40 -0
- package/bin/lib/test-setup.mjs +37 -0
- package/bin/new-task.mjs +42 -0
- package/bin/ops-agent.mjs +81 -0
- package/bin/preflight.mjs +56 -0
- package/bin/providers/external-cli-checker.mjs +190 -0
- package/bin/providers/openai-checker.mjs +62 -0
- package/bin/quality-gates.mjs +92 -0
- package/bin/run-check.mjs +559 -0
- package/bin/run-plan-check-loop.mjs +392 -0
- package/bin/run-verify.mjs +627 -0
- package/bin/self-lint.mjs +88 -0
- package/bin/supervisor-turn.mjs +146 -0
- package/bin/supervisor-turn.test.mjs +72 -0
- package/bin/task-manifest.mjs +57 -0
- package/bin/task-metrics.mjs +48 -0
- package/bin/transition.mjs +94 -0
- package/bin/validate-check-artifacts.mjs +418 -0
- package/config/default-agents.json +100 -0
- package/package.json +28 -0
- package/playbooks/checker-context.md +9 -0
- package/playbooks/complexity-performance.md +13 -0
- package/playbooks/production-rollout.md +9 -0
- package/playbooks/source-sync-provider.md +9 -0
- package/playbooks/ui-acceptance.md +9 -0
- package/prompts/checker.md +170 -0
- package/prompts/executor.md +54 -0
- package/prompts/planner.md +128 -0
- package/prompts/researcher.md +44 -0
- package/prompts/supervisor.md +337 -0
- package/prompts/verifier.md +128 -0
- package/templates/brief.md +15 -0
- package/templates/check-resolution.md +69 -0
- package/templates/check-result.json +32 -0
- package/templates/check.md +46 -0
- package/templates/execution-feedback.md +25 -0
- package/templates/execution.md +101 -0
- package/templates/human-gate-summary.md +49 -0
- package/templates/orchestration-log.md +8 -0
- package/templates/plan.md +86 -0
- package/templates/research.md +13 -0
- package/templates/retrospective.md +48 -0
- package/templates/status.md +53 -0
- package/templates/verify-result.json +19 -0
- package/templates/verify.md +41 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import {
|
|
3
|
+
mergeChangedFiles,
|
|
4
|
+
parseGitStatusLine,
|
|
5
|
+
} from './execution-ledger-utils.mjs';
|
|
6
|
+
|
|
7
|
+
describe('execution ledger utils', () => {
|
|
8
|
+
it('parses git status lines including untracked and renamed files', () => {
|
|
9
|
+
expect(parseGitStatusLine(' M ops/agent-pipeline/bin/run-verify.mjs')).toEqual({
|
|
10
|
+
status: ' M',
|
|
11
|
+
path: 'ops/agent-pipeline/bin/run-verify.mjs',
|
|
12
|
+
originalPath: null,
|
|
13
|
+
});
|
|
14
|
+
expect(parseGitStatusLine('?? ops/agent-pipeline/tasks/TASK-999-example/')).toEqual({
|
|
15
|
+
status: '??',
|
|
16
|
+
path: 'ops/agent-pipeline/tasks/TASK-999-example/',
|
|
17
|
+
originalPath: null,
|
|
18
|
+
});
|
|
19
|
+
expect(parseGitStatusLine('R old/path.ts -> new/path.ts')).toEqual({
|
|
20
|
+
status: 'R ',
|
|
21
|
+
path: 'new/path.ts',
|
|
22
|
+
originalPath: 'old/path.ts',
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it('classifies task artifacts, ops framework files and unrelated dirty files', () => {
|
|
27
|
+
const changedFiles = mergeChangedFiles({
|
|
28
|
+
taskRelativePath: 'ops/agent-pipeline/tasks/TASK-999-example',
|
|
29
|
+
statusEntries: [
|
|
30
|
+
{ status: ' M', path: 'web/app/src/page.tsx', originalPath: null },
|
|
31
|
+
{ status: ' M', path: 'ops/agent-pipeline/bin/run-verify.mjs', originalPath: null },
|
|
32
|
+
{ status: ' M', path: 'ops/agent-pipeline/memory/project-context-digest.md', originalPath: null },
|
|
33
|
+
{ status: ' M', path: 'ops/agent-pipeline/playbooks/ui-acceptance.md', originalPath: null },
|
|
34
|
+
{ status: ' M', path: 'ops/agent-pipeline/tasks/TASK-999-example/execution.md', originalPath: null },
|
|
35
|
+
{ status: ' M', path: 'shared-platform/packages/ops-framework/bin/ops-agent.mjs', originalPath: null },
|
|
36
|
+
],
|
|
37
|
+
unstagedDiff: ['web/app/src/page.tsx', 'ops/agent-pipeline/bin/run-verify.mjs'],
|
|
38
|
+
stagedDiff: [],
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
expect(changedFiles).toEqual([
|
|
42
|
+
expect.objectContaining({
|
|
43
|
+
path: 'ops/agent-pipeline/bin/run-verify.mjs',
|
|
44
|
+
isTaskArtifact: false,
|
|
45
|
+
isOpsFrameworkFile: true,
|
|
46
|
+
}),
|
|
47
|
+
expect.objectContaining({
|
|
48
|
+
path: 'ops/agent-pipeline/memory/project-context-digest.md',
|
|
49
|
+
isTaskArtifact: false,
|
|
50
|
+
isOpsFrameworkFile: false,
|
|
51
|
+
}),
|
|
52
|
+
expect.objectContaining({
|
|
53
|
+
path: 'ops/agent-pipeline/playbooks/ui-acceptance.md',
|
|
54
|
+
isTaskArtifact: false,
|
|
55
|
+
isOpsFrameworkFile: false,
|
|
56
|
+
}),
|
|
57
|
+
expect.objectContaining({
|
|
58
|
+
path: 'ops/agent-pipeline/tasks/TASK-999-example/execution.md',
|
|
59
|
+
isTaskArtifact: true,
|
|
60
|
+
isOpsFrameworkFile: false,
|
|
61
|
+
}),
|
|
62
|
+
expect.objectContaining({
|
|
63
|
+
path: 'shared-platform/packages/ops-framework/bin/ops-agent.mjs',
|
|
64
|
+
isTaskArtifact: false,
|
|
65
|
+
isOpsFrameworkFile: true,
|
|
66
|
+
}),
|
|
67
|
+
expect.objectContaining({
|
|
68
|
+
path: 'web/app/src/page.tsx',
|
|
69
|
+
isTaskArtifact: false,
|
|
70
|
+
isOpsFrameworkFile: false,
|
|
71
|
+
}),
|
|
72
|
+
]);
|
|
73
|
+
});
|
|
74
|
+
});
|