@x12i/memorix-skills 0.3.4 → 0.3.6

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 (77) hide show
  1. package/README.md +53 -53
  2. package/agents/BLOCKS.md +21 -21
  3. package/agents/README.md +15 -15
  4. package/agents/evidence-summary/README.md +5 -5
  5. package/agents/evidence-summary/models.json +30 -30
  6. package/agents/evidence-summary/processes/evidence-summary/fixture.json +23 -23
  7. package/agents/evidence-summary/processes/evidence-summary/process.json +96 -96
  8. package/agents/evidence-summary/processes/evidence-summary/processing/check.example-outputs/index.json +21 -21
  9. package/agents/evidence-summary/processes/evidence-summary/processing/check.example-outputs/output.json +9 -9
  10. package/agents/evidence-summary/processes/evidence-summary/processing/check.example-outputs/result.json +3 -3
  11. package/agents/evidence-summary/processes/evidence-summary/processing/draft.example-outputs/index.json +21 -21
  12. package/agents/evidence-summary/processes/evidence-summary/processing/draft.example-outputs/output.json +12 -12
  13. package/agents/evidence-summary/processes/evidence-summary/processing/draft.example-outputs/result.json +3 -3
  14. package/agents/evidence-summary/processes/evidence-summary/processing/incomplete.example-outputs/index.json +21 -21
  15. package/agents/evidence-summary/processes/evidence-summary/processing/incomplete.example-outputs/output.json +11 -11
  16. package/agents/evidence-summary/processes/evidence-summary/processing/incomplete.example-outputs/result.json +3 -3
  17. package/agents/evidence-summary/processes/evidence-summary/processing/publish.example-outputs/index.json +21 -21
  18. package/agents/evidence-summary/processes/evidence-summary/processing/publish.example-outputs/output.json +12 -12
  19. package/agents/evidence-summary/processes/evidence-summary/schemas/summary.json +9 -9
  20. package/agents/foundation/README.md +20 -20
  21. package/agents/foundation/auditing/entity-overview.audit.md +32 -32
  22. package/agents/foundation/auditing/list-overview.audit.md +32 -32
  23. package/agents/foundation/blocks/overview-sections.md +13 -13
  24. package/agents/foundation/processing/entity-overview.md +25 -25
  25. package/agents/foundation/processing/list-overview.md +27 -27
  26. package/agents/record-brief/README.md +7 -7
  27. package/agents/record-brief/models.json +16 -16
  28. package/agents/record-brief/processes/record-brief/edges/summary-when-long.mjs +10 -10
  29. package/agents/record-brief/processes/record-brief/fixture.json +22 -22
  30. package/agents/record-brief/processes/record-brief/process.json +143 -143
  31. package/agents/record-brief/processes/record-brief/processing/count-briefs.example-outputs/index.json +21 -21
  32. package/agents/record-brief/processes/record-brief/processing/count-briefs.example-outputs/output.json +9 -9
  33. package/agents/record-brief/processes/record-brief/processing/index-terms.example-outputs/index.json +21 -21
  34. package/agents/record-brief/processes/record-brief/processing/index-terms.example-outputs/output.json +12 -12
  35. package/agents/record-brief/processes/record-brief/processing/normalize-note.example-outputs/index.json +21 -21
  36. package/agents/record-brief/processes/record-brief/processing/normalize-note.example-outputs/output.json +11 -11
  37. package/agents/record-brief/processes/record-brief/processing/summarize-note.example-outputs/index.json +21 -21
  38. package/agents/record-brief/processes/record-brief/processing/summarize-note.example-outputs/output.json +11 -11
  39. package/agents/record-brief/processes/record-brief/prompts/summarize.md +1 -1
  40. package/agents/record-brief/processes/record-brief/steps/count-briefs.mjs +6 -6
  41. package/agents/record-brief/processes/record-brief/steps/index-terms.mjs +6 -6
  42. package/agents/record-brief/processes/record-brief/steps/normalize-note.mjs +16 -16
  43. package/agents/record-brief/processes/record-brief/steps/summarize-note.mjs +38 -38
  44. package/agents/system/README.md +37 -37
  45. package/agents/system/internal/audit-prompt.md +28 -28
  46. package/agents/system/internal/audit-result.md +28 -28
  47. package/agents/system/internal/fix-attempt.md +17 -17
  48. package/agents/system/internal/improve-prompt.md +17 -17
  49. package/agents/system/internal/investigate-audit.md +9 -9
  50. package/agents/system/internal/investigate-context.md +9 -9
  51. package/agents/system/internal/investigate-contract.md +9 -9
  52. package/agents/system/internal/investigate-execution.md +9 -9
  53. package/agents/system/internal/investigate-inputs.md +9 -9
  54. package/agents/system/internal/investigate-instructions.md +9 -9
  55. package/agents/system/internal/investigate-provenance.md +9 -9
  56. package/agents/system/internal/investigate-response.md +9 -9
  57. package/agents/system/internal/investigate-synthesis.md +19 -19
  58. package/agents/tryout/README.md +7 -7
  59. package/agents/tryout/processes/tryout/fixture.json +28 -28
  60. package/agents/tryout/processes/tryout/process.json +88 -88
  61. package/agents/tryout/processes/tryout/processing/echo-stamp.example-outputs/index.json +16 -16
  62. package/agents/tryout/processes/tryout/processing/echo-stamp.example-outputs/output.json +10 -10
  63. package/agents/tryout/processes/tryout/processing/name-label.example-outputs/index.json +16 -16
  64. package/agents/tryout/processes/tryout/processing/name-label.example-outputs/output.json +9 -9
  65. package/agents/tryout/processes/tryout/processing/stamp-note.example-outputs/index.json +16 -16
  66. package/agents/tryout/processes/tryout/processing/stamp-note.example-outputs/output.json +10 -10
  67. package/agents/tryout/processes/tryout/steps/echo-stamp.mjs +11 -11
  68. package/agents/tryout/processes/tryout/steps/name-label.mjs +8 -8
  69. package/agents/tryout/processes/tryout/steps/stamp-note.mjs +11 -11
  70. package/dist/create-memorix-skills.d.ts +5 -4
  71. package/dist/create-memorix-skills.d.ts.map +1 -1
  72. package/dist/create-memorix-skills.js +32 -7
  73. package/dist/create-memorix-skills.js.map +1 -1
  74. package/dist/shared-packs.d.ts.map +1 -1
  75. package/dist/shared-packs.js +6 -0
  76. package/dist/shared-packs.js.map +1 -1
  77. package/package.json +3 -3
package/README.md CHANGED
@@ -1,53 +1,53 @@
1
- # `@x12i/memorix-skills` (skill runner)
2
-
3
- This package **only runs a skill**:
4
-
5
- 1. Resolve `skill` → `{agentDir}/processing/<skill>.md`, then `auditing/`, then `code/`
6
- 2. Render with Rendrix (`records` → `{{input}}`, optional `catalogs` → `catalogs`)
7
- 3. Call `dispatcher.run({ ...request, prompt })`
8
- 4. Return the `AiDispatcherResponse` unchanged
9
-
10
- It does not orchestrate pipelines, land records, or call Nexum.
11
-
12
- ## Internal actions
13
-
14
- `agents/system/internal/{key}.md` is a helper call, not a sequence step. This package ships that folder. A system folder placed beside a running pack replaces the shipped file with the same key. A real pack's `internal/` folder is ignored.
15
-
16
- ## Package agents and blocks
17
-
18
- `agents/` in this package is the published agent root: `foundation`, `system`, and the samples `record-brief`, `evidence-summary`, and `tryout`. Real packs stay outside this package. A skill key is loaded from the running pack, then `foundation`, then `system`. `{{block:name.md}}` inserts `blocks/name.md` before Rendrix fills the other tokens. The same order applies. See `agents/BLOCKS.md`.
19
-
20
- ```ts
21
- const response = await skills.runInternal({
22
- action: "audit-prompt",
23
- input: { prompt: "Write the note." },
24
- });
25
- ```
26
-
27
- `listInternalActions(skillsDir)` and `renderInternalAction(action, input)` prepare the call without sending it.
28
-
29
- ## Usage
30
-
31
- ```ts
32
- import { createMemorixSkills } from "@x12i/memorix-skills";
33
-
34
- const skills = createMemorixSkills({
35
- skillsDir: "/path/to/.memorix-agents/neo-networks", // one agent directory; default uses AGENTS_DIR or SKILLS_DIR
36
- dispatcher: {
37
- openrouter: { apiKey: process.env.OPENROUTER_API_KEY },
38
- },
39
- });
40
-
41
- const response = await skills.run({
42
- skill: "echo-records",
43
- records: [{ recordId: "map-1", data: { name: "Example" } }],
44
- request: {
45
- provider: "openrouter",
46
- model: "openai/gpt-5.2",
47
- },
48
- });
49
-
50
- console.log(response.text);
51
- ```
52
-
53
- Optional Memorix HTTP client: `skills.memorix` (station env / options). Unused by `run`.
1
+ # `@x12i/memorix-skills` (skill runner)
2
+
3
+ This package **only runs a skill**:
4
+
5
+ 1. Resolve `skill` → `{agentDir}/processing/<skill>.md`, then `auditing/`, then `code/`
6
+ 2. Render with Rendrix (`records` → `{{input}}`, optional `catalogs` → `catalogs`)
7
+ 3. Call `dispatcher.run({ ...request, prompt })`
8
+ 4. Return the `AiDispatcherResponse` unchanged
9
+
10
+ It does not orchestrate pipelines, land records, or call Nexum.
11
+
12
+ ## Internal actions
13
+
14
+ `agents/system/internal/{key}.md` is a helper call, not a sequence step. This package ships that folder. A system folder placed beside a running pack replaces the shipped file with the same key. A real pack's `internal/` folder is ignored.
15
+
16
+ ## Package agents and blocks
17
+
18
+ `agents/` in this package is the published agent root: `foundation`, `system`, and the samples `record-brief`, `evidence-summary`, and `tryout`. Real packs stay outside this package. A skill key is loaded from the running pack, then `foundation`, then `system`. `{{block:name.md}}` inserts `blocks/name.md` before Rendrix fills the other tokens. The same order applies. See `agents/BLOCKS.md`.
19
+
20
+ ```ts
21
+ const response = await skills.runInternal({
22
+ action: "audit-prompt",
23
+ input: { prompt: "Write the note." },
24
+ });
25
+ ```
26
+
27
+ `listInternalActions(skillsDir)` and `renderInternalAction(action, input)` prepare the call without sending it.
28
+
29
+ ## Usage
30
+
31
+ ```ts
32
+ import { createMemorixSkills } from "@x12i/memorix-skills";
33
+
34
+ const skills = createMemorixSkills({
35
+ skillsDir: "/path/to/.memorix-agents/neo-networks", // one agent directory; default uses AGENTS_DIR or SKILLS_DIR
36
+ dispatcher: {
37
+ openrouter: { apiKey: process.env.OPENROUTER_API_KEY },
38
+ },
39
+ });
40
+
41
+ const response = await skills.run({
42
+ skill: "echo-records",
43
+ records: [{ recordId: "map-1", data: { name: "Example" } }],
44
+ request: {
45
+ provider: "openrouter",
46
+ model: "openai/gpt-5.2",
47
+ },
48
+ });
49
+
50
+ console.log(response.text);
51
+ ```
52
+
53
+ Optional Memorix HTTP client: `skills.memorix` (station env / options). Unused by `run`.
package/agents/BLOCKS.md CHANGED
@@ -1,21 +1,21 @@
1
- # Blocks
2
-
3
- A block is a markdown file in a pack's `blocks/` folder. A prompt inserts that file with a token:
4
-
5
- ```text
6
- {{block:overview-sections.md}}
7
- ```
8
-
9
- The name is the file name, including `.md`. It is one file in `blocks/`, not a path.
10
-
11
- The token is replaced with the file before Rendrix runs. Rendrix then fills the tokens in that text on the same render: `{{input}}`, catalog fields, and a nested `{{block:…}}`. A block that includes itself fails. A missing file fails.
12
-
13
- Search order:
14
-
15
- 1. The pack's own `blocks/{name}.md`
16
- 2. `foundation/blocks/{name}.md`
17
- 3. `system/blocks/{name}.md`
18
-
19
- `foundation` and `system` ship inside `@x12i/memorix-skills` at `agents/`. A real pack lives in `.memorix-agents/` and is not in that npm package. When a real pack is published for a run, the run stores a snapshot of `foundation` and `system` under `shared/`. That snapshot is what the run reads.
20
-
21
- `overview-sections.md` is the shared heading block used by `entity-overview` and `list-overview`.
1
+ # Blocks
2
+
3
+ A block is a markdown file in a pack's `blocks/` folder. A prompt inserts that file with a token:
4
+
5
+ ```text
6
+ {{block:overview-sections.md}}
7
+ ```
8
+
9
+ The name is the file name, including `.md`. It is one file in `blocks/`, not a path.
10
+
11
+ The token is replaced with the file before Rendrix runs. Rendrix then fills the tokens in that text on the same render: `{{input}}`, catalog fields, and a nested `{{block:…}}`. A block that includes itself fails. A missing file fails.
12
+
13
+ Search order:
14
+
15
+ 1. The pack's own `blocks/{name}.md`
16
+ 2. `foundation/blocks/{name}.md`
17
+ 3. `system/blocks/{name}.md`
18
+
19
+ `foundation` and `system` ship inside `@x12i/memorix-skills` at `agents/`. A real pack lives in `.memorix-agents/` and is not in that npm package. When a real pack is published for a run, the run stores a snapshot of `foundation` and `system` under `shared/`. That snapshot is what the run reads.
20
+
21
+ `overview-sections.md` is the shared heading block used by `entity-overview` and `list-overview`.
package/agents/README.md CHANGED
@@ -1,15 +1,15 @@
1
- # Package agents
2
-
3
- These folders ship with `@x12i/memorix-skills`. Real packs stay in the repository `.memorix-agents/` folder and are not part of this package.
4
-
5
- | Folder | Role |
6
- |---|---|
7
- | `foundation` | Shared skills and blocks. `entity-overview`, `list-overview`, and `blocks/overview-sections.md`. Not a job. |
8
- | `system` | Helper actions in `internal/`: audit a prompt, audit a result, improve a prompt, investigation, and fix. Not a job. |
9
- | `record-brief` | Sample process. |
10
- | `evidence-summary` | Sample process. |
11
- | `tryout` | Sample process. A note points at a label. |
12
-
13
- A skill key is loaded from the pack that is running, then `foundation`, then `system`. The pack's own `processing/`, `auditing/`, and `code/` folders are searched at the pack root and inside each `processes/<process-id>/` folder. Blocks are described in [BLOCKS.md](BLOCKS.md).
14
-
15
- A process lives in `processes/<process-id>/`, even when the pack has one process. `foundation` and `system` are not processes. The same layout is written out in the repository [`.memorix-agents/README.md`](../../../.memorix-agents/README.md).
1
+ # Package agents
2
+
3
+ These folders ship with `@x12i/memorix-skills`. Real packs stay in the repository `.memorix-agents/` folder and are not part of this package.
4
+
5
+ | Folder | Role |
6
+ |---|---|
7
+ | `foundation` | Shared skills and blocks. `entity-overview`, `list-overview`, and `blocks/overview-sections.md`. Not a job. |
8
+ | `system` | Helper actions in `internal/`: audit a prompt, audit a result, improve a prompt, investigation, and fix. Not a job. |
9
+ | `record-brief` | Sample process. |
10
+ | `evidence-summary` | Sample process. |
11
+ | `tryout` | Sample process. A note points at a label. |
12
+
13
+ A skill key is loaded from the pack that is running, then `foundation`, then `system`. The pack's own `processing/`, `auditing/`, and `code/` folders are searched at the pack root and inside each `processes/<process-id>/` folder. Blocks are described in [BLOCKS.md](BLOCKS.md).
14
+
15
+ A process lives in `processes/<process-id>/`, even when the pack has one process. `foundation` and `system` are not processes. The same layout is written out in the repository [`.memorix-agents/README.md`](../../../.memorix-agents/README.md).
@@ -1,5 +1,5 @@
1
- # Evidence summary
2
-
3
- A pure JSON process. It drafts a summary, checks it, and either publishes or refines inside a declared loop. There are no step or edge modules.
4
-
5
- Shared packs sit beside this folder. `foundation` has reusable skills (`entity-overview`, `list-overview`) and blocks. `system` has the helper actions. An instruction can insert `{{block:name.md}}`. This pack's `blocks/` file wins, then foundation, then system. A skill key that this pack does not define is loaded from foundation, then system.
1
+ # Evidence summary
2
+
3
+ A pure JSON process. It drafts a summary, checks it, and either publishes or refines inside a declared loop. There are no step or edge modules.
4
+
5
+ Shared packs sit beside this folder. `foundation` has reusable skills (`entity-overview`, `list-overview`) and blocks. `system` has the helper actions. An instruction can insert `{{block:name.md}}`. This pack's `blocks/` file wins, then foundation, then system. A skill key that this pack does not define is loaded from foundation, then system.
@@ -1,30 +1,30 @@
1
- {
2
- "schemaVersion": "memorix.models/v2",
3
- "defaultProfile": "analysis",
4
- "roles": {
5
- "ai": "analysis",
6
- "planner": "planning",
7
- "reviser": "planning",
8
- "audit": "audit"
9
- },
10
- "profiles": {
11
- "analysis": {
12
- "provider": "openrouter",
13
- "connection": "primary-ai",
14
- "model": "cyber/default",
15
- "parameters": { "reasoningEffort": "high", "maxOutputTokens": 4000 }
16
- },
17
- "planning": {
18
- "provider": "openrouter",
19
- "connection": "primary-ai",
20
- "model": "deep/default",
21
- "parameters": { "reasoningEffort": "high", "maxOutputTokens": 8000 }
22
- },
23
- "audit": {
24
- "provider": "openrouter",
25
- "connection": "primary-ai",
26
- "model": "cyber/deep_forensics",
27
- "parameters": { "reasoningEffort": "high", "maxOutputTokens": 2000 }
28
- }
29
- }
30
- }
1
+ {
2
+ "schemaVersion": "memorix.models/v2",
3
+ "defaultProfile": "analysis",
4
+ "roles": {
5
+ "ai": "analysis",
6
+ "planner": "planning",
7
+ "reviser": "planning",
8
+ "audit": "audit"
9
+ },
10
+ "profiles": {
11
+ "analysis": {
12
+ "provider": "openrouter",
13
+ "connection": "primary-ai",
14
+ "model": "cyber/default",
15
+ "parameters": { "reasoningEffort": "high", "maxOutputTokens": 4000 }
16
+ },
17
+ "planning": {
18
+ "provider": "openrouter",
19
+ "connection": "primary-ai",
20
+ "model": "deep/default",
21
+ "parameters": { "reasoningEffort": "high", "maxOutputTokens": 8000 }
22
+ },
23
+ "audit": {
24
+ "provider": "openrouter",
25
+ "connection": "primary-ai",
26
+ "model": "cyber/deep_forensics",
27
+ "parameters": { "reasoningEffort": "high", "maxOutputTokens": 2000 }
28
+ }
29
+ }
30
+ }
@@ -1,23 +1,23 @@
1
- {
2
- "packId": "evidence-summary",
3
- "processId": "evidence-summary",
4
- "subjects": [
5
- {
6
- "recordId": "fx-subject",
7
- "objectType": "record"
8
- }
9
- ],
10
- "documents": [],
11
- "relations": [],
12
- "inputs": {
13
- "subject": {
14
- "recordId": "fx-subject"
15
- },
16
- "evidence": [
17
- {
18
- "id": "ev-1",
19
- "text": "Observed once."
20
- }
21
- ]
22
- }
23
- }
1
+ {
2
+ "packId": "evidence-summary",
3
+ "processId": "evidence-summary",
4
+ "subjects": [
5
+ {
6
+ "recordId": "fx-subject",
7
+ "objectType": "record"
8
+ }
9
+ ],
10
+ "documents": [],
11
+ "relations": [],
12
+ "inputs": {
13
+ "subject": {
14
+ "recordId": "fx-subject"
15
+ },
16
+ "evidence": [
17
+ {
18
+ "id": "ev-1",
19
+ "text": "Observed once."
20
+ }
21
+ ]
22
+ }
23
+ }
@@ -1,96 +1,96 @@
1
- {
2
- "schemaVersion": "memorix.process/v2",
3
- "id": "evidence-summary",
4
- "initiation": [],
5
- "modelProfile": "analysis",
6
- "runtime": { "maxAiCalls": 6, "maxWallTimeMs": 180000 },
7
- "entryNodes": ["draft"],
8
- "inputs": {
9
- "subject": { "required": true },
10
- "evidence": { "required": true }
11
- },
12
- "nodes": [
13
- {
14
- "id": "draft",
15
- "kind": "action",
16
- "action": "ai.generate",
17
- "scope": "invocation",
18
- "instructions": "Summarize the supplied evidence. Cite evidence IDs. Address feedback when present. Do not invent missing observations.",
19
- "inputs": {
20
- "evidence": { "ref": "process.inputs.evidence" },
21
- "feedback": { "ref": "nodes.check.output.feedback", "loop": "refinement", "iteration": "previous", "optional": true }
22
- },
23
- "output": { "schemaRef": "./schemas/summary.json", "persistence": "execution" }
24
- },
25
- {
26
- "id": "check",
27
- "kind": "action",
28
- "action": "data.validate",
29
- "scope": "invocation",
30
- "validators": ["summary-contract", "evidence-references"],
31
- "inputs": {
32
- "candidate": { "ref": "nodes.draft.output" },
33
- "evidence": { "ref": "process.inputs.evidence" }
34
- },
35
- "output": { "schemaRef": "./schemas/validation-result.json", "persistence": "execution" }
36
- },
37
- {
38
- "id": "publish",
39
- "kind": "action",
40
- "action": "output.emit",
41
- "scope": "invocation",
42
- "inputs": {
43
- "subject": { "ref": "process.inputs.subject" },
44
- "result": { "ref": "nodes.draft.output", "loop": "refinement", "iteration": "exiting" }
45
- },
46
- "output": { "contentType": "summary", "schemaRef": "./schemas/summary.json", "persistence": "derived" }
47
- },
48
- {
49
- "id": "incomplete",
50
- "kind": "action",
51
- "action": "data.project",
52
- "scope": "invocation",
53
- "value": { "status": "incomplete", "reasonCode": "REFINEMENT_LIMIT", "coverage": "incomplete" },
54
- "output": { "persistence": "execution" }
55
- }
56
- ],
57
- "edges": [
58
- { "id": "draft-check", "from": "draft", "to": "check", "on": "succeeded" },
59
- {
60
- "id": "check-publish",
61
- "from": "check",
62
- "to": "publish",
63
- "on": "succeeded",
64
- "when": { "op": "eq", "args": [{ "ref": "nodes.check.output.accepted" }, true] }
65
- },
66
- {
67
- "id": "check-refine",
68
- "from": "check",
69
- "to": "draft",
70
- "on": "succeeded",
71
- "when": { "op": "eq", "args": [{ "ref": "nodes.check.output.accepted" }, false] },
72
- "advanceLoop": "refinement"
73
- }
74
- ],
75
- "loops": [
76
- {
77
- "id": "refinement",
78
- "members": ["draft", "check"],
79
- "entries": ["draft"],
80
- "feedbackEdges": ["check-refine"],
81
- "maxIterations": 3,
82
- "onLimit": { "to": "incomplete" }
83
- }
84
- ],
85
- "outputs": {
86
- "result": { "ref": "nodes.publish.output", "optional": true },
87
- "incomplete": { "ref": "nodes.incomplete.output", "optional": true }
88
- },
89
- "completion": {
90
- "mode": "any",
91
- "successNodes": ["publish"],
92
- "incompleteNodes": ["incomplete"],
93
- "requiredExportsOnSuccess": ["result"],
94
- "remainingWork": "drainRequired"
95
- }
96
- }
1
+ {
2
+ "schemaVersion": "memorix.process/v2",
3
+ "id": "evidence-summary",
4
+ "initiation": [],
5
+ "modelProfile": "analysis",
6
+ "runtime": { "maxAiCalls": 6, "maxWallTimeMs": 180000 },
7
+ "entryNodes": ["draft"],
8
+ "inputs": {
9
+ "subject": { "required": true },
10
+ "evidence": { "required": true }
11
+ },
12
+ "nodes": [
13
+ {
14
+ "id": "draft",
15
+ "kind": "action",
16
+ "action": "ai.generate",
17
+ "scope": "invocation",
18
+ "instructions": "Summarize the supplied evidence. Cite evidence IDs. Address feedback when present. Do not invent missing observations.",
19
+ "inputs": {
20
+ "evidence": { "ref": "process.inputs.evidence" },
21
+ "feedback": { "ref": "nodes.check.output.feedback", "loop": "refinement", "iteration": "previous", "optional": true }
22
+ },
23
+ "output": { "schemaRef": "./schemas/summary.json", "persistence": "execution" }
24
+ },
25
+ {
26
+ "id": "check",
27
+ "kind": "action",
28
+ "action": "data.validate",
29
+ "scope": "invocation",
30
+ "validators": ["summary-contract", "evidence-references"],
31
+ "inputs": {
32
+ "candidate": { "ref": "nodes.draft.output" },
33
+ "evidence": { "ref": "process.inputs.evidence" }
34
+ },
35
+ "output": { "schemaRef": "./schemas/validation-result.json", "persistence": "execution" }
36
+ },
37
+ {
38
+ "id": "publish",
39
+ "kind": "action",
40
+ "action": "output.emit",
41
+ "scope": "invocation",
42
+ "inputs": {
43
+ "subject": { "ref": "process.inputs.subject" },
44
+ "result": { "ref": "nodes.draft.output", "loop": "refinement", "iteration": "exiting" }
45
+ },
46
+ "output": { "contentType": "summary", "schemaRef": "./schemas/summary.json", "persistence": "derived" }
47
+ },
48
+ {
49
+ "id": "incomplete",
50
+ "kind": "action",
51
+ "action": "data.project",
52
+ "scope": "invocation",
53
+ "value": { "status": "incomplete", "reasonCode": "REFINEMENT_LIMIT", "coverage": "incomplete" },
54
+ "output": { "persistence": "execution" }
55
+ }
56
+ ],
57
+ "edges": [
58
+ { "id": "draft-check", "from": "draft", "to": "check", "on": "succeeded" },
59
+ {
60
+ "id": "check-publish",
61
+ "from": "check",
62
+ "to": "publish",
63
+ "on": "succeeded",
64
+ "when": { "op": "eq", "args": [{ "ref": "nodes.check.output.accepted" }, true] }
65
+ },
66
+ {
67
+ "id": "check-refine",
68
+ "from": "check",
69
+ "to": "draft",
70
+ "on": "succeeded",
71
+ "when": { "op": "eq", "args": [{ "ref": "nodes.check.output.accepted" }, false] },
72
+ "advanceLoop": "refinement"
73
+ }
74
+ ],
75
+ "loops": [
76
+ {
77
+ "id": "refinement",
78
+ "members": ["draft", "check"],
79
+ "entries": ["draft"],
80
+ "feedbackEdges": ["check-refine"],
81
+ "maxIterations": 3,
82
+ "onLimit": { "to": "incomplete" }
83
+ }
84
+ ],
85
+ "outputs": {
86
+ "result": { "ref": "nodes.publish.output", "optional": true },
87
+ "incomplete": { "ref": "nodes.incomplete.output", "optional": true }
88
+ },
89
+ "completion": {
90
+ "mode": "any",
91
+ "successNodes": ["publish"],
92
+ "incompleteNodes": ["incomplete"],
93
+ "requiredExportsOnSuccess": ["result"],
94
+ "remainingWork": "drainRequired"
95
+ }
96
+ }
@@ -1,21 +1,21 @@
1
- {
2
- "packId": "evidence-summary",
3
- "skill": "check",
4
- "subjects": [
5
- {
6
- "id": "record",
7
- "objectType": "record",
8
- "contentType": "execution",
9
- "recordId": "fx-subject",
10
- "documents": [
11
- {
12
- "objectType": "record",
13
- "contentType": "execution",
14
- "recordId": "fx-subject",
15
- "file": "output.json"
16
- }
17
- ],
18
- "absent": []
19
- }
20
- ]
21
- }
1
+ {
2
+ "packId": "evidence-summary",
3
+ "skill": "check",
4
+ "subjects": [
5
+ {
6
+ "id": "record",
7
+ "objectType": "record",
8
+ "contentType": "execution",
9
+ "recordId": "fx-subject",
10
+ "documents": [
11
+ {
12
+ "objectType": "record",
13
+ "contentType": "execution",
14
+ "recordId": "fx-subject",
15
+ "file": "output.json"
16
+ }
17
+ ],
18
+ "absent": []
19
+ }
20
+ ]
21
+ }
@@ -1,9 +1,9 @@
1
- {
2
- "objectType": "record",
3
- "contentType": "execution",
4
- "recordId": "fx-subject",
5
- "data": {
6
- "instanceId": "check",
7
- "accepted": true
8
- }
9
- }
1
+ {
2
+ "objectType": "record",
3
+ "contentType": "execution",
4
+ "recordId": "fx-subject",
5
+ "data": {
6
+ "instanceId": "check",
7
+ "accepted": true
8
+ }
9
+ }
@@ -1,3 +1,3 @@
1
- {
2
- "ok": true
3
- }
1
+ {
2
+ "ok": true
3
+ }
@@ -1,21 +1,21 @@
1
- {
2
- "packId": "evidence-summary",
3
- "skill": "draft",
4
- "subjects": [
5
- {
6
- "id": "record",
7
- "objectType": "record",
8
- "contentType": "execution",
9
- "recordId": "fx-subject",
10
- "documents": [
11
- {
12
- "objectType": "record",
13
- "contentType": "execution",
14
- "recordId": "fx-subject",
15
- "file": "output.json"
16
- }
17
- ],
18
- "absent": []
19
- }
20
- ]
21
- }
1
+ {
2
+ "packId": "evidence-summary",
3
+ "skill": "draft",
4
+ "subjects": [
5
+ {
6
+ "id": "record",
7
+ "objectType": "record",
8
+ "contentType": "execution",
9
+ "recordId": "fx-subject",
10
+ "documents": [
11
+ {
12
+ "objectType": "record",
13
+ "contentType": "execution",
14
+ "recordId": "fx-subject",
15
+ "file": "output.json"
16
+ }
17
+ ],
18
+ "absent": []
19
+ }
20
+ ]
21
+ }
@@ -1,12 +1,12 @@
1
- {
2
- "objectType": "record",
3
- "contentType": "execution",
4
- "recordId": "fx-subject",
5
- "data": {
6
- "instanceId": "draft",
7
- "summary": "Observed once.",
8
- "citations": [
9
- "ev-1"
10
- ]
11
- }
12
- }
1
+ {
2
+ "objectType": "record",
3
+ "contentType": "execution",
4
+ "recordId": "fx-subject",
5
+ "data": {
6
+ "instanceId": "draft",
7
+ "summary": "Observed once.",
8
+ "citations": [
9
+ "ev-1"
10
+ ]
11
+ }
12
+ }
@@ -1,3 +1,3 @@
1
- {
2
- "ok": true
3
- }
1
+ {
2
+ "ok": true
3
+ }