@cobol-ts/cli-init 0.0.0-stage → 0.0.57

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 (119) hide show
  1. package/README.md +16 -3
  2. package/dist/index.d.ts +5 -0
  3. package/dist/index.js +24 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/src/init.assets.d.ts +2 -0
  6. package/dist/src/init.assets.js +9 -0
  7. package/dist/src/init.assets.js.map +1 -0
  8. package/dist/src/init.assets.spec.d.ts +1 -0
  9. package/dist/src/init.assets.spec.js +39 -0
  10. package/dist/src/init.assets.spec.js.map +1 -0
  11. package/dist/src/init.crypto.d.ts +3 -0
  12. package/dist/src/init.crypto.js +41 -0
  13. package/dist/src/init.crypto.js.map +1 -0
  14. package/dist/src/init.d.ts +15 -0
  15. package/dist/src/init.destination.d.ts +18 -0
  16. package/dist/src/init.destination.js +32 -0
  17. package/dist/src/init.destination.js.map +1 -0
  18. package/dist/src/init.destination.spec.d.ts +1 -0
  19. package/dist/src/init.destination.spec.js +18 -0
  20. package/dist/src/init.destination.spec.js.map +1 -0
  21. package/dist/src/init.js +76 -0
  22. package/dist/src/init.js.map +1 -0
  23. package/dist/src/init.project.d.ts +11 -0
  24. package/dist/src/init.project.js +140 -0
  25. package/dist/src/init.project.js.map +1 -0
  26. package/dist/src/init.project.spec.d.ts +1 -0
  27. package/dist/src/init.project.spec.js +108 -0
  28. package/dist/src/init.project.spec.js.map +1 -0
  29. package/index.ts +6 -0
  30. package/init/.cobolts/accumulator.yaml +13 -0
  31. package/init/.cobolts/ai.yaml +126 -0
  32. package/init/.cobolts/characteristics.yaml +13 -0
  33. package/init/.cobolts/cobolts.yaml +11 -0
  34. package/init/.cobolts/compaction.yaml +12 -0
  35. package/init/.cobolts/crypto.yaml +16 -0
  36. package/init/.cobolts/data.yaml +7 -0
  37. package/init/.cobolts/extractions.yaml +76 -0
  38. package/init/.cobolts/files.yaml +78 -0
  39. package/init/.cobolts/generation.yaml +14 -0
  40. package/init/.cobolts/graph.yaml +100 -0
  41. package/init/.cobolts/historical-accumulator.yaml +10 -0
  42. package/init/.cobolts/icons/analyst.svg +1 -0
  43. package/init/.cobolts/icons/assistant.svg +1 -0
  44. package/init/.cobolts/icons/creator.svg +1 -0
  45. package/init/.cobolts/icons/daily.svg +1 -0
  46. package/init/.cobolts/icons/graph-validator.svg +1 -0
  47. package/init/.cobolts/icons/monthly.svg +1 -0
  48. package/init/.cobolts/icons/optimiser.svg +1 -0
  49. package/init/.cobolts/icons/researcher.svg +1 -0
  50. package/init/.cobolts/icons/review-validator.svg +1 -0
  51. package/init/.cobolts/icons/reviewer.svg +1 -0
  52. package/init/.cobolts/mock.ai.yaml +162 -0
  53. package/init/.cobolts/oracle.yaml +10 -0
  54. package/init/.cobolts/prompts/available-inputs.md +6 -0
  55. package/init/.cobolts/prompts/generate-system.md +11 -0
  56. package/init/.cobolts/prompts/global-hints.md +16 -0
  57. package/init/.cobolts/prompts/graph-semantics.md +28 -0
  58. package/init/.cobolts/prompts/graph-types.md +60 -0
  59. package/init/.cobolts/prompts/identification-create.md +5 -0
  60. package/init/.cobolts/prompts/identification-knowledge.md +122 -0
  61. package/init/.cobolts/prompts/review-system.md +13 -0
  62. package/init/.cobolts/prompts/target-characteristic.md +5 -0
  63. package/init/.cobolts/replay.yaml +6 -0
  64. package/init/.cobolts/runners/creator-reviewer.yaml +40 -0
  65. package/init/.cobolts/runners/creator-validator.yaml +22 -0
  66. package/init/README.md +298 -0
  67. package/init/characteristics/account-characteristics.xlsx.base64 +89 -0
  68. package/init/characteristics/input-characteristics.xlsx.base64 +75 -0
  69. package/init/characteristics/output-characteristics.xlsx.base64 +80 -0
  70. package/init/characteristics/sme-comments.yaml +40 -0
  71. package/init/copybooks/ACCOUNT.cpy +6 -0
  72. package/init/copybooks/CUSTOMER.cpy +5 -0
  73. package/init/data/account-to-customer.csv +6 -0
  74. package/init/data/accounts.fb.base64 +2 -0
  75. package/init/data/customers.fb.base64 +1 -0
  76. package/init/data/previous-state.igs.base64 +1 -0
  77. package/init/data/sicCodes.csv +6 -0
  78. package/init/expected/productionDaily.jsonl +5 -0
  79. package/init/expected/productionMonthly.jsonl +5 -0
  80. package/init/expected/productionMonthlyHistorical.jsonl +5 -0
  81. package/init/test_data/.gitattributes +1 -0
  82. package/init/test_data/README.md +16 -0
  83. package/init/test_data/productionDaily/2026-01-01/account-to-customer.csv +6 -0
  84. package/init/test_data/productionDaily/2026-01-01/accounts.fb +0 -0
  85. package/init/test_data/productionDaily/2026-01-01/customers.fb +1 -0
  86. package/init/test_data/productionDaily/2026-01-01/oracleDaily.jsonl +5 -0
  87. package/init/test_data/productionDaily/2026-01-14/account-to-customer.csv +7 -0
  88. package/init/test_data/productionDaily/2026-01-14/accounts.fb +0 -0
  89. package/init/test_data/productionDaily/2026-01-14/customers.fb +1 -0
  90. package/init/test_data/productionDaily/2026-01-14/oracleDaily.jsonl +5 -0
  91. package/init/test_data/productionDaily/2026-02-01/account-to-customer.csv +7 -0
  92. package/init/test_data/productionDaily/2026-02-01/accounts.fb +0 -0
  93. package/init/test_data/productionDaily/2026-02-01/customers.fb +1 -0
  94. package/init/test_data/productionDaily/2026-02-01/oracleDaily.jsonl +5 -0
  95. package/init/test_data/productionDaily/2026-02-14/account-to-customer.csv +6 -0
  96. package/init/test_data/productionDaily/2026-02-14/accounts.fb +0 -0
  97. package/init/test_data/productionDaily/2026-02-14/customers.fb +1 -0
  98. package/init/test_data/productionDaily/2026-02-14/oracleDaily.jsonl +5 -0
  99. package/init/test_data/productionDaily/2026-03-01/account-to-customer.csv +8 -0
  100. package/init/test_data/productionDaily/2026-03-01/accounts.fb +0 -0
  101. package/init/test_data/productionDaily/2026-03-01/customers.fb +1 -0
  102. package/init/test_data/productionDaily/2026-03-01/oracleDaily.jsonl +5 -0
  103. package/init/test_data/productionDaily/2026-03-14/account-to-customer.csv +6 -0
  104. package/init/test_data/productionDaily/2026-03-14/accounts.fb +0 -0
  105. package/init/test_data/productionDaily/2026-03-14/customers.fb +1 -0
  106. package/init/test_data/productionDaily/2026-03-14/oracleDaily.jsonl +5 -0
  107. package/init/test_data/productionMonthly/2026-01-31/account-to-customer.csv +7 -0
  108. package/init/test_data/productionMonthly/2026-01-31/accounts.fb +0 -0
  109. package/init/test_data/productionMonthly/2026-01-31/customers.fb +1 -0
  110. package/init/test_data/productionMonthly/2026-01-31/oracleMonthly.jsonl +5 -0
  111. package/init/test_data/productionMonthly/2026-02-28/account-to-customer.csv +6 -0
  112. package/init/test_data/productionMonthly/2026-02-28/accounts.fb +0 -0
  113. package/init/test_data/productionMonthly/2026-02-28/customers.fb +1 -0
  114. package/init/test_data/productionMonthly/2026-02-28/oracleMonthly.jsonl +5 -0
  115. package/init/test_data/productionMonthly/2026-03-31/account-to-customer.csv +5 -0
  116. package/init/test_data/productionMonthly/2026-03-31/accounts.fb +0 -0
  117. package/init/test_data/productionMonthly/2026-03-31/customers.fb +1 -0
  118. package/init/test_data/productionMonthly/2026-03-31/oracleMonthly.jsonl +5 -0
  119. package/package.json +72 -3
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const promises_1 = require("node:fs/promises");
4
+ const node_os_1 = require("node:os");
5
+ const node_path_1 = require("node:path");
6
+ const init_project_1 = require("./init.project");
7
+ describe('project initialisation filesystem boundary', () => {
8
+ let root;
9
+ let template;
10
+ let destination;
11
+ const prepare = async (stage) => { await (0, promises_1.writeFile)((0, node_path_1.join)(stage, 'generated.txt'), 'generated'); };
12
+ const plan = [
13
+ { path: (0, node_path_1.join)('.cobolts', 'files.yaml'), action: 'CREATE' },
14
+ { path: 'data.fb', action: 'CREATE' },
15
+ { path: 'generated.txt', action: 'CREATE' }
16
+ ];
17
+ beforeEach(async () => {
18
+ root = await (0, promises_1.mkdtemp)((0, node_path_1.join)((0, node_os_1.tmpdir)(), 'cobolts-init-test-'));
19
+ template = (0, node_path_1.join)(root, 'template');
20
+ destination = (0, node_path_1.join)(root, 'project');
21
+ await (0, promises_1.mkdir)((0, node_path_1.join)(template, '.cobolts'), { recursive: true });
22
+ await (0, promises_1.writeFile)((0, node_path_1.join)(template, '.cobolts', 'files.yaml'), 'files: {}\n');
23
+ await (0, promises_1.writeFile)((0, node_path_1.join)(template, 'data.fb.base64'), 'AID/\n');
24
+ });
25
+ afterEach(async () => { await (0, promises_1.rm)(root, { recursive: true, force: true }); });
26
+ it('copies hidden configuration and binary assets, plus generated files', async () => {
27
+ const reported = [];
28
+ expect(await (0, init_project_1.initialiseProject)(template, destination, {}, prepare, file => { reported.push(file); })).toEqual(plan);
29
+ expect(reported).toEqual(plan);
30
+ expect(await (0, init_project_1.initFiles)(destination)).toEqual(plan.map(file => file.path));
31
+ expect(await (0, promises_1.readFile)((0, node_path_1.join)(destination, 'data.fb'))).toEqual(Buffer.from([0, 128, 255]));
32
+ expect(await (0, promises_1.readFile)((0, node_path_1.join)(destination, 'generated.txt'), 'utf8')).toEqual('generated');
33
+ });
34
+ it('prefers Base64 over a legacy corrupt binary and decodes before preparation', async () => {
35
+ await (0, promises_1.writeFile)((0, node_path_1.join)(template, 'data.fb'), Buffer.from([239, 191, 189]));
36
+ await (0, init_project_1.initialiseProject)(template, destination, {}, async (stage) => {
37
+ expect(await (0, promises_1.readFile)((0, node_path_1.join)(stage, 'data.fb'))).toEqual(Buffer.from([0, 128, 255]));
38
+ await prepare(stage);
39
+ });
40
+ expect(await (0, init_project_1.initFiles)(destination)).toEqual(plan.map(file => file.path));
41
+ expect(await (0, promises_1.readFile)((0, node_path_1.join)(destination, 'data.fb'))).toEqual(Buffer.from([0, 128, 255]));
42
+ });
43
+ it('rejects invalid Base64 before preparation or destination writes', async () => {
44
+ await (0, promises_1.writeFile)((0, node_path_1.join)(template, 'data.fb.base64'), 'AID/!');
45
+ const neverPrepare = jest.fn(prepare);
46
+ await expect((0, init_project_1.initialiseProject)(template, destination, {}, neverPrepare))
47
+ .rejects.toThrow(new Error('Invalid Base64 template asset: data.fb.base64'));
48
+ expect(neverPrepare).not.toHaveBeenCalled();
49
+ await expect((0, init_project_1.initFiles)(destination)).rejects.toMatchObject({ code: 'ENOENT' });
50
+ });
51
+ it('rejects a second init before preparation unless force is explicit', async () => {
52
+ await (0, init_project_1.initialiseProject)(template, destination, {}, prepare);
53
+ await (0, promises_1.writeFile)((0, node_path_1.join)(destination, 'data.fb'), 'edited');
54
+ const neverPrepare = jest.fn(prepare);
55
+ const error = new Error(`Cannot initialise ${destination}: project already exists (.cobolts/files.yaml). Use --force to replace managed files.`);
56
+ await expect((0, init_project_1.initialiseProject)(template, destination, {}, neverPrepare)).rejects.toThrow(error);
57
+ await expect((0, init_project_1.initialiseProject)(template, destination, { dryRun: true }, neverPrepare)).rejects.toThrow(error);
58
+ expect(neverPrepare).not.toHaveBeenCalled();
59
+ expect(await (0, promises_1.readFile)((0, node_path_1.join)(destination, 'data.fb'), 'utf8')).toEqual('edited');
60
+ await (0, init_project_1.initialiseProject)(template, destination, { force: true }, prepare);
61
+ expect(await (0, promises_1.readFile)((0, node_path_1.join)(destination, 'data.fb'))).toEqual(Buffer.from([0, 128, 255]));
62
+ });
63
+ it('reports a dry run without creating the destination', async () => {
64
+ expect(await (0, init_project_1.initialiseProject)(template, destination, { dryRun: true }, prepare)).toEqual(plan);
65
+ await expect((0, init_project_1.initFiles)(destination)).rejects.toMatchObject({ code: 'ENOENT' });
66
+ });
67
+ it('checks derived and source conflicts together before making any writes', async () => {
68
+ await (0, promises_1.mkdir)(destination);
69
+ await (0, promises_1.writeFile)((0, node_path_1.join)(destination, 'data.fb'), 'old data');
70
+ await (0, promises_1.writeFile)((0, node_path_1.join)(destination, 'generated.txt'), 'old generated');
71
+ await expect((0, init_project_1.initialiseProject)(template, destination, {}, prepare)).rejects.toThrow(`Cannot initialise ${destination}:\ndata.fb: already exists\ngenerated.txt: already exists`);
72
+ expect(await (0, init_project_1.initFiles)(destination)).toEqual(['data.fb', 'generated.txt']);
73
+ expect(await (0, promises_1.readFile)((0, node_path_1.join)(destination, 'data.fb'), 'utf8')).toEqual('old data');
74
+ expect(await (0, promises_1.readFile)((0, node_path_1.join)(destination, 'generated.txt'), 'utf8')).toEqual('old generated');
75
+ });
76
+ it('replaces only managed files, including derived outputs', async () => {
77
+ await (0, promises_1.mkdir)(destination);
78
+ await (0, promises_1.writeFile)((0, node_path_1.join)(destination, 'data.fb'), 'old data');
79
+ await (0, promises_1.writeFile)((0, node_path_1.join)(destination, 'generated.txt'), 'old generated');
80
+ await (0, promises_1.writeFile)((0, node_path_1.join)(destination, 'notes.txt'), 'keep');
81
+ const expected = [plan[0], { path: 'data.fb', action: 'REPLACE' }, { path: 'generated.txt', action: 'REPLACE' }];
82
+ expect(await (0, init_project_1.initialiseProject)(template, destination, { force: true, dryRun: true }, prepare)).toEqual(expected);
83
+ expect(await (0, promises_1.readFile)((0, node_path_1.join)(destination, 'data.fb'), 'utf8')).toEqual('old data');
84
+ expect(await (0, init_project_1.initialiseProject)(template, destination, { force: true }, prepare)).toEqual(expected);
85
+ expect(await (0, promises_1.readFile)((0, node_path_1.join)(destination, 'data.fb'))).toEqual(Buffer.from([0, 128, 255]));
86
+ expect(await (0, promises_1.readFile)((0, node_path_1.join)(destination, 'generated.txt'), 'utf8')).toEqual('generated');
87
+ expect(await (0, promises_1.readFile)((0, node_path_1.join)(destination, 'notes.txt'), 'utf8')).toEqual('keep');
88
+ });
89
+ it('leaves the destination unchanged when preparation fails', async () => {
90
+ await expect((0, init_project_1.initialiseProject)(template, destination, {}, async () => { throw new Error('Invalid graph'); }))
91
+ .rejects.toThrow('Invalid graph');
92
+ await expect((0, init_project_1.initFiles)(destination)).rejects.toMatchObject({ code: 'ENOENT' });
93
+ });
94
+ it('rejects a directory in place of a managed file even with force', async () => {
95
+ await (0, promises_1.mkdir)((0, node_path_1.join)(destination, 'data.fb'), { recursive: true });
96
+ await expect((0, init_project_1.initialiseProject)(template, destination, { force: true }, prepare)).rejects.toThrow(`Cannot initialise ${destination}:\ndata.fb: Not a regular file`);
97
+ expect(await (0, init_project_1.initFiles)(destination)).toEqual([]);
98
+ });
99
+ it('does not traverse an existing directory symlink or Windows junction', async () => {
100
+ const outside = (0, node_path_1.join)(root, 'outside');
101
+ await (0, promises_1.mkdir)(outside);
102
+ await (0, promises_1.mkdir)(destination);
103
+ await (0, promises_1.symlink)(outside, (0, node_path_1.join)(destination, '.cobolts'), 'junction');
104
+ await expect((0, init_project_1.initialiseProject)(template, destination, { force: true }, prepare)).rejects.toThrow(`Cannot initialise ${destination}:\n${(0, node_path_1.join)('.cobolts', 'files.yaml')}: Not a regular directory: ${(0, node_path_1.join)(destination, '.cobolts')}`);
105
+ expect(await (0, init_project_1.initFiles)(outside)).toEqual([]);
106
+ });
107
+ });
108
+ //# sourceMappingURL=init.project.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.project.spec.js","sourceRoot":"","sources":["../../src/init.project.spec.ts"],"names":[],"mappings":";;AAAA,+CAAiF;AACjF,qCAA8B;AAC9B,yCAA8B;AAC9B,iDAA0E;AAE1E,QAAQ,CAAC,4CAA4C,EAAE,GAAG,EAAE;IACxD,IAAI,IAAY,CAAA;IAChB,IAAI,QAAgB,CAAA;IACpB,IAAI,WAAmB,CAAA;IACvB,MAAM,OAAO,GAAG,KAAK,EAAE,KAAa,EAAE,EAAE,GAAE,MAAM,IAAA,oBAAS,EAAC,IAAA,gBAAI,EAAC,KAAK,EAAE,eAAe,CAAC,EAAE,WAAW,CAAC,CAAA,CAAA,CAAC,CAAA;IACrG,MAAM,IAAI,GAAe;QACrB,EAAC,IAAI,EAAE,IAAA,gBAAI,EAAC,UAAU,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAC;QACxD,EAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAC;QACnC,EAAC,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAC;KAC5C,CAAA;IAED,UAAU,CAAC,KAAK,IAAI,EAAE;Q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,EAAE,IAAA,gBAAI,EAAC,WAAW,EAAE,UAAU,CAAC,EAAE,UAAU,CAAC,CAAA;QACjE,MAAM,MAAM,CAAC,IAAA,gCAAiB,EAAC,QAAQ,EAAE,WAAW,EAAE,EAAC,KAAK,EAAE,IAAI,EAAC,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAC1F,qBAAqB,WAAW,MAAM,IAAA,gBAAI,EAAC,UAAU,EAAE,YAAY,CAAC,8BAA8B,IAAA,gBAAI,EAAC,WAAW,EAAE,UAAU,CAAC,EAAE,CAAC,CAAA;QACtI,MAAM,CAAC,MAAM,IAAA,wBAAS,EAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;IAChD,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"}
package/index.ts ADDED
@@ -0,0 +1,6 @@
1
+ export * from './src/init'
2
+ export * from './src/init.crypto'
3
+ export * from './src/init.project'
4
+ export * from './src/init.assets'
5
+
6
+ export {initialiseDestination,type InitDestination,type WithPreparedInit} from './src/init.destination'
@@ -0,0 +1,13 @@
1
+ # Shared synthetic seed for every customer. This is not per-customer history.
2
+ # Evaluate is read-only; daily does not advance the monthly window.
3
+ optional: true
4
+ removed: reject
5
+ customerId:
6
+ field: customerId
7
+ type: number
8
+ initial:
9
+ C0330: 62020
10
+ monthlyBalance: [1200, 2100, 900]
11
+ C0200_monthlyBalance: [ 1200, 2100, 900 ]
12
+ C0210_monthlyBalance: [ 1200, 2100, 900 ]
13
+ C0230_monthlyBalance: [ 1200, 2100, 900 ]
@@ -0,0 +1,126 @@
1
+ active: mock-generation
2
+ experiments:
3
+ directory: experiments
4
+ maxMessages: 10
5
+ concurrency: 4
6
+ resolutions:
7
+ directory: resolutions
8
+ models:
9
+ mock:
10
+ provider: mock
11
+ model: mock-characteristic-graph
12
+ responses: mock.ai.yaml
13
+ openai-small:
14
+ provider: openai
15
+ model: gpt-5-mini
16
+ apiKeyEnv: OPENAI
17
+ groq-small:
18
+ provider: groq
19
+ model: openai/gpt-oss-20b
20
+ apiKeyEnv: GROQ
21
+ agents:
22
+ identification-creator:
23
+ model: openai-small
24
+ prompt: prompts/identification-create.md
25
+ icon: icons/creator.svg
26
+ mock-creator:
27
+ model: mock
28
+ prompt: prompts/generate-system.md
29
+ icon: icons/creator.svg
30
+ creator:
31
+ model: openai-small
32
+ prompt: prompts/generate-system.md
33
+ icon: icons/creator.svg
34
+ reviewer:
35
+ model: openai-small
36
+ prompt: prompts/review-system.md
37
+ icon: icons/reviewer.svg
38
+ groq-creator:
39
+ model: groq-small
40
+ prompt: prompts/generate-system.md
41
+ icon: icons/creator.svg
42
+ groq-reviewer:
43
+ model: groq-small
44
+ prompt: prompts/review-system.md
45
+ icon: icons/reviewer.svg
46
+ # Tool icons default to a shield for validators and a flag for the finished tool.
47
+ # Optional overrides (presentation only):
48
+ # tools:
49
+ # authoring-graph: {icon: icons/graph-validator.svg}
50
+ # review-response: {icon: icons/review-validator.svg}
51
+ runners:
52
+ quick-identification:
53
+ type: creator-validator
54
+ definition: runners/creator-validator.yaml
55
+ agent:
56
+ name: identification-creator
57
+ validators:
58
+ - tool: identification-graph
59
+ finished: experiment-finished
60
+ validated-identification:
61
+ type: creator-validator
62
+ definition: runners/creator-validator.yaml
63
+ agent:
64
+ name: identification-creator
65
+ validators:
66
+ - tool: identification-graph
67
+ - tool: identification-execution
68
+ maxEntities: 100
69
+ strategy:
70
+ type: all-prefixes
71
+ finished: experiment-finished
72
+ mock-generation:
73
+ type: creator-validator
74
+ definition: runners/creator-validator.yaml
75
+ agent:
76
+ name: mock-creator
77
+ validators:
78
+ - tool: authoring-graph
79
+ - tool: graph-execution
80
+ maxEntities: 100
81
+ finished: experiment-finished
82
+ quick-generation:
83
+ type: creator-validator
84
+ definition: runners/creator-validator.yaml
85
+ agent:
86
+ name: creator
87
+ validators:
88
+ - tool: authoring-graph
89
+ - tool: graph-execution
90
+ maxEntities: 100
91
+ finished: experiment-finished
92
+ reviewed-generation:
93
+ type: creator-reviewer
94
+ definition: runners/creator-reviewer.yaml
95
+ creator:
96
+ name: creator
97
+ validators:
98
+ - tool: authoring-graph
99
+ - tool: graph-execution
100
+ maxEntities: 100
101
+ reviewer:
102
+ name: reviewer
103
+ validators:
104
+ - tool: review-response
105
+ finished: experiment-finished
106
+ groq-reviewed-generation:
107
+ type: creator-reviewer
108
+ definition: runners/creator-reviewer.yaml
109
+ creator:
110
+ name: groq-creator
111
+ validators:
112
+ - tool: authoring-graph
113
+ - tool: graph-execution
114
+ maxEntities: 100
115
+ reviewer:
116
+ name: groq-reviewer
117
+ validators:
118
+ - tool: review-response
119
+ finished: experiment-finished
120
+ prompts:
121
+ identification: prompts/identification-knowledge.md
122
+ inputs: prompts/available-inputs.md
123
+ target: prompts/target-characteristic.md
124
+ graphTypes: prompts/graph-types.md
125
+ graphSemantics: prompts/graph-semantics.md
126
+ globalHints: prompts/global-hints.md
@@ -0,0 +1,13 @@
1
+ files: .
2
+ input:
3
+ sources:
4
+ combined:
5
+ type: yaml
6
+ file: input-characteristics.yaml
7
+ path: characteristics
8
+ output:
9
+ sources:
10
+ business:
11
+ type: yaml
12
+ file: output-characteristics.yaml
13
+ path: characteristics
@@ -0,0 +1,11 @@
1
+ # Application settings, independent of the discovery and execution pipelines.
2
+ security:
3
+ allowedRoots:
4
+ - .
5
+ serve:
6
+ api:
7
+ host: 127.0.0.1
8
+ port: 3000
9
+ gui:
10
+ host: 127.0.0.1
11
+ port: 5173
@@ -0,0 +1,12 @@
1
+ version: 1
2
+ source:
3
+ months:
4
+ from: "2026-01"
5
+ through: "2026-03"
6
+ target:
7
+ root: ../validation
8
+ shards: 2
9
+ # Published results are ordinary CSV/JSONL files; specify their entity key.
10
+ results:
11
+ oracleDaily.jsonl: {keyPath: C0010, keyType: integer}
12
+ oracleMonthly.jsonl: {keyPath: C0010, keyType: integer}
@@ -0,0 +1,16 @@
1
+ # Local developer/test packaging. Paths resolve relative to this .cobolts directory.
2
+ version: 1
3
+ storage:
4
+ type: filesystem
5
+ root: ../encrypted
6
+ security:
7
+ fileKeys:
8
+ strategy: local-sealed-box
9
+ recipientKeyId: local-dev-recipient
10
+ publicKeyFile: dev-keys/recipient.pub
11
+ privateKeyFile: dev-keys/recipient.key
12
+ signer:
13
+ strategy: local-ed25519
14
+ keyId: local-dev-publisher
15
+ privateKeyFile: dev-keys/publisher.key
16
+ trustedPublicKeyFile: dev-keys/publisher.pub
@@ -0,0 +1,7 @@
1
+ # Fresh projects use plaintext fixtures. Select published datasets under sources after publication (see README.md).
2
+ root: ../data
3
+ files:
4
+ customers: customers.fb
5
+ accounts: accounts.fb
6
+ account-to-customer: account-to-customer.csv
7
+ sicCodes: sicCodes.csv
@@ -0,0 +1,76 @@
1
+ extractions:
2
+ input-characteristics:
3
+ type: compose
4
+ sources: [physical-inputs, customer-business, account-business]
5
+ customer-business:
6
+ type: excel
7
+ file: ../characteristics/input-characteristics.xlsx
8
+ sheets:
9
+ - name: Characteristics
10
+ idColumn: A
11
+ headerRow: 1
12
+ firstDataRow: 2
13
+ columns:
14
+ name: B
15
+ description: C
16
+ type: D
17
+ account-business:
18
+ type: excel
19
+ file: ../characteristics/account-characteristics.xlsx
20
+ sheets:
21
+ - name: Characteristics
22
+ idColumn: A
23
+ headerRow: 1
24
+ firstDataRow: 2
25
+ columns:
26
+ name: B
27
+ description: C
28
+ type: D
29
+ output-characteristics:
30
+ type: compose
31
+ sources: [output-business, sme-comments]
32
+ sme-comments:
33
+ type: yaml
34
+ file: ../characteristics/sme-comments.yaml
35
+ path: characteristics
36
+ output-business:
37
+ type: excel
38
+ file: ../characteristics/output-characteristics.xlsx
39
+ sheets:
40
+ - name: Characteristics
41
+ idColumn: A
42
+ headerRow: 1
43
+ firstDataRow: 2
44
+ columns:
45
+ name: B
46
+ description: C
47
+ type: D
48
+ physical-inputs:
49
+ type: input
50
+ files:
51
+ customers:
52
+ keys:
53
+ customer: customerId
54
+ fields:
55
+ customerId:
56
+ id: I0010
57
+ customerName:
58
+ id: I0020
59
+ sicCode:
60
+ id: I0030
61
+ status:
62
+ id: I0040
63
+ accounts:
64
+ keys:
65
+ account: accountId
66
+ fields:
67
+ accountId:
68
+ id: I1010
69
+ balance:
70
+ id: I1020
71
+ creditLimit:
72
+ id: I1030
73
+ accountType:
74
+ id: I1040
75
+ status:
76
+ id: I1050
@@ -0,0 +1,78 @@
1
+ root: ../copybooks
2
+ entities:
3
+ - customer
4
+ - account
5
+ files:
6
+ sicCodes:
7
+ type: csv
8
+ description: Synthetic SIC reference lookup with illustrative risk categories
9
+ projection:
10
+ sicCode: {type: integer}
11
+ description: {type: string}
12
+ riskCategory: {type: string}
13
+ customers:
14
+ type: cobol
15
+ key: customer
16
+ keyPath: customerId
17
+ copybook: CUSTOMER.cpy
18
+ description: Customer master
19
+ options:
20
+ celIntegerRepresentation: number
21
+ encoding: ebcdic-037
22
+ framing:
23
+ kind: fixed
24
+ recordLength: 22
25
+ accounts:
26
+ type: cobol
27
+ key: account
28
+ keyPath: accountId
29
+ copybook: ACCOUNT.cpy
30
+ description: Account records with signed packed-decimal balance
31
+ options:
32
+ celIntegerRepresentation: number
33
+ encoding: ebcdic-037
34
+ framing:
35
+ kind: fixed
36
+ recordLength: 14
37
+ mappings:
38
+ account-to-customer:
39
+ type: csv
40
+ key: account
41
+ keyPath: accountId
42
+ projection:
43
+ accountId:
44
+ type: integer
45
+ customerId:
46
+ type: integer
47
+ foreign:
48
+ customerId: customer
49
+ compositions:
50
+ productionDaily:
51
+ type: relational
52
+ periodicity: daily
53
+ icon: icons/daily.svg
54
+ colour: "#2584c6"
55
+ master: customers
56
+ referenceData:
57
+ sicCodes: {keyPath: sicCode}
58
+ files:
59
+ customers: one
60
+ accounts:
61
+ cardinality: manyOptional
62
+ mapping: account-to-customer
63
+ productionMonthly:
64
+ type: relational
65
+ periodicity: monthly
66
+ icon: icons/monthly.svg
67
+ colour: "#a855c7"
68
+ master: customers
69
+ referenceData:
70
+ sicCodes: {keyPath: sicCode}
71
+ files:
72
+ customers: one
73
+ accounts:
74
+ cardinality: manyOptional
75
+ mapping: account-to-customer
76
+ validation:
77
+ type: validationDataSet
78
+ location: ../validation
@@ -0,0 +1,14 @@
1
+ root: ../generated
2
+ templates:
3
+ copybookType: ${name}.copybook.types.ts
4
+ projectionDefinition: ${name}.projection.ts
5
+ projectionType: ${name}.projection.types.ts
6
+ names:
7
+ customers:
8
+ source: CustomerRecordCB
9
+ projection: Customer
10
+ variable: customerProjection
11
+ accounts:
12
+ source: AccountRecordCB
13
+ projection: Account
14
+ variable: accountProjection
@@ -0,0 +1,100 @@
1
+ C0010:
2
+ type: cel
3
+ cel: input.customers.customerId
4
+ metadata:
5
+ type: number
6
+ javascriptType: number
7
+ C0330:
8
+ type: cel
9
+ cel: input.customers.sicCode
10
+ metadata:
11
+ type: number
12
+ javascriptType: number
13
+ default: 0
14
+ C0340:
15
+ type: cel
16
+ cel: input.customers.sicCode in reference.sicCodes
17
+ metadata:
18
+ type: boolean
19
+ C0350:
20
+ type: cel
21
+ cel: 'input.customers.sicCode in reference.sicCodes ? reference.sicCodes[input.customers.sicCode].description : "UNKNOWN"'
22
+ metadata:
23
+ type: string
24
+ C0360:
25
+ type: cel
26
+ cel: 'input.customers.sicCode in reference.sicCodes ? reference.sicCodes[input.customers.sicCode].riskCategory : "UNKNOWN"'
27
+ metadata:
28
+ type: string
29
+ C6880:
30
+ type: cel
31
+ cel: 'prev.C0330 != 0 && input.customers.sicCode != prev.C0330 ? "Y" : "N"'
32
+ metadata:
33
+ type: string
34
+ C0100:
35
+ type: cel
36
+ cel: input.accounts.size()
37
+ metadata:
38
+ type: number
39
+ javascriptType: number
40
+ C0110:
41
+ type: cel
42
+ cel: input.accounts.map(a, a.balance).sum()
43
+ metadata:
44
+ type: number
45
+ javascriptType: number
46
+ C0120:
47
+ type: cel
48
+ cel: input.accounts.map(a, a.creditLimit).sum()
49
+ metadata:
50
+ type: number
51
+ javascriptType: number
52
+ C0130:
53
+ type: cel
54
+ cel: input.accounts.filter(a, a.balance < 0).size()
55
+ metadata:
56
+ type: number
57
+ javascriptType: number
58
+ C0140:
59
+ type: cel
60
+ cel: 'now.C0120 == 0 ? 0 : (now.C0110 * 100) / now.C0120'
61
+ metadata:
62
+ type: number
63
+ javascriptType: number
64
+ monthlyBalance:
65
+ type: cel
66
+ cel: now.C0110
67
+ metadata:
68
+ type: number
69
+ javascriptType: number
70
+ rollingWindow:
71
+ periodicity: monthly
72
+ size: 3
73
+ C0200:
74
+ type: aggregate
75
+ window: monthlyBalance
76
+ operation: max
77
+ C0210:
78
+ type: aggregate
79
+ window: monthlyBalance
80
+ operation: min
81
+ C0220:
82
+ type: aggregate
83
+ window: monthlyBalance
84
+ operation: sum
85
+ C0230:
86
+ type: aggregate
87
+ window: monthlyBalance
88
+ operation: count
89
+ C0240:
90
+ type: cel
91
+ cel: 'now.C0230 == 0 ? 0 : now.C0220 / now.C0230'
92
+ metadata:
93
+ type: number
94
+ javascriptType: number
95
+ C0250:
96
+ type: cel
97
+ cel: 'now.C0230 == 0 ? 0 : now.C0200 - now.C0210'
98
+ metadata:
99
+ type: number
100
+ javascriptType: number
@@ -0,0 +1,10 @@
1
+ # Example checkpoint from the preceding monthly run (customers 1001 and 1002).
2
+ file: ../data/previous-state.igs
3
+ optional: false
4
+ removed: reject
5
+ customerId:
6
+ field: customerId
7
+ type: number
8
+ initial:
9
+ C0330: 62020
10
+ monthlyBalance: [1200, 2100, 900]
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><rect width="32" height="32" rx="7" fill="#0d9488" fill-opacity=".10"/><g fill="none" stroke="#0d9488" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M7 8v18h19M10 22l5-7 5 3 6-9"/><circle cx="26" cy="9" r="1"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><rect width="32" height="32" rx="7" fill="#64748b" fill-opacity=".10"/><g fill="none" stroke="#64748b" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="6" y="10" width="20" height="15" rx="4"/><path d="M16 10V6M12 25v2M20 25v2M11 17h1M20 17h1M13 21h6"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><rect width="32" height="32" rx="7" fill="#2563eb" fill-opacity=".10"/><g fill="none" stroke="#2563eb" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M8 24l4-1 13-13-3-3L9 20zM19 10l3 3M8 27h16"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#2584c6" stroke-width="2" stroke-linecap="round"><circle cx="12" cy="12" r="4"/><path d="M12 2v2m0 16v2M2 12h2m16 0h2M5 5l2 2m10 10 2 2M5 19l2-2M17 7l2-2"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><rect width="32" height="32" rx="8" fill="#eef1f5"/><g stroke="#52647b" stroke-width="1.8" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M16 5 25 9v7c0 6-5 10-9 12-4-2-9-6-9-12V9Z"/><path d="m13 12-4 4 4 4m6-8 4 4-4 4"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#a855c7" stroke-width="2" stroke-linecap="round"><rect x="3" y="5" width="18" height="16" rx="2"/><path d="M7 3v4m10-4v4M3 10h18M8 14h1m6 0h1m-8 3h1m6 0h1"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><rect width="32" height="32" rx="7" fill="#be185d" fill-opacity=".10"/><g fill="none" stroke="#be185d" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M6 24a11 11 0 1 1 20 0H6zM16 20l6-7"/><circle cx="16" cy="20" r="1"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><rect width="32" height="32" rx="7" fill="#b45309" fill-opacity=".10"/><g fill="none" stroke="#b45309" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M16 26V10Q10 6 5 9v15q6-3 11 2 5-5 11-2V9q-5-3-11 1z"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><rect width="32" height="32" rx="8" fill="#eef1f5"/><g stroke="#52647b" stroke-width="1.8" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M16 5 25 9v7c0 6-5 10-9 12-4-2-9-6-9-12V9Z"/><path d="m11 16 3 3 7-7"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><rect width="32" height="32" rx="7" fill="#7c3aed" fill-opacity=".10"/><g fill="none" stroke="#7c3aed" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="14" cy="14" r="7"/><path d="M19 19l7 7M11 14l2 2 4-4"/></g></svg>