@codemation/agent-skills 0.1.7 → 0.1.9
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 +17 -1
- package/README.md +7 -1
- package/package.json +1 -1
- package/skills/codemation-cli/SKILL.md +2 -0
- package/skills/codemation-custom-node-development/SKILL.md +1 -1
- package/skills/codemation-custom-node-development/references/node-patterns.md +1 -1
- package/skills/codemation-framework-concepts/SKILL.md +5 -2
- package/skills/codemation-framework-concepts/references/architecture-map.md +10 -0
- package/skills/codemation-plugin-development/references/plugin-structure.md +1 -1
- package/skills/codemation-workflow-dsl/SKILL.md +4 -2
- package/skills/codemation-workflow-dsl/references/builder-patterns.md +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @codemation/agent-skills
|
|
2
2
|
|
|
3
|
+
## 0.1.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#87](https://github.com/MadeRelevant/codemation/pull/87) [`4c50f29`](https://github.com/MadeRelevant/codemation/commit/4c50f29763ad7bc1e39723a6711ca3cf9add5014) Thanks [@cblokland90](https://github.com/cblokland90)! - Disable automatic packaged skill refreshes inside the Codemation framework monorepo so framework-author workflows stop dirtying the local worktree.
|
|
8
|
+
- keep `codemation skills sync` as the explicit refresh path after upgrading `@codemation/cli` or `@codemation/agent-skills`
|
|
9
|
+
- document the monorepo behavior in the packaged CLI skill and agent-skills README
|
|
10
|
+
|
|
11
|
+
## 0.1.8
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#78](https://github.com/MadeRelevant/codemation/pull/78) [`f451b1b`](https://github.com/MadeRelevant/codemation/commit/f451b1b4657b59406e15ce5f50b243e487ff99ed) Thanks [@cblokland90](https://github.com/cblokland90)! - Normalize fluent workflow DSL callback helpers around the runtime item contract.
|
|
16
|
+
|
|
17
|
+
`.map(...)`, `.if(...)`, and `.switch({ resolveCaseKey })` now receive `(item, ctx)` so workflow authors can use `item.json` consistently and read prior completed outputs through `ctx.data` without dropping down to direct node configs.
|
|
18
|
+
|
|
3
19
|
## 0.1.7
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -24,7 +40,7 @@
|
|
|
24
40
|
|
|
25
41
|
`WorkflowAgentOptions` now takes `messages` (the same `AgentMessageConfig` as `AIAgent`) instead of
|
|
26
42
|
`prompt`. The workflow helper passes `messages` through unchanged. Docs, workflow DSL skills, and the
|
|
27
|
-
test-dev sample use `
|
|
43
|
+
test-dev sample use `itemExpr(...)` for per-item prompts; execution docs note `itemExpr` on agent
|
|
28
44
|
`messages`.
|
|
29
45
|
|
|
30
46
|
## Unreleased
|
package/README.md
CHANGED
|
@@ -19,7 +19,13 @@ The starter templates call the extractor automatically after `pnpm install`.
|
|
|
19
19
|
|
|
20
20
|
## Framework-managed copy
|
|
21
21
|
|
|
22
|
-
The directory `.agents/skills/extracted` is **framework-managed**:
|
|
22
|
+
The directory `.agents/skills/extracted` is **framework-managed**:
|
|
23
|
+
|
|
24
|
+
- In consumer projects, Codemation overwrites packaged `codemation-*` skill folders there and removes stale packaged skill directories when you run `codemation dev`, `codemation build`, `codemation serve web`, `codemation dev:plugin`, or `codemation skills sync`.
|
|
25
|
+
- Inside the Codemation framework monorepo, the automatic refresh path is disabled to avoid polluting the local git worktree during framework development.
|
|
26
|
+
- After upgrading `@codemation/cli` or `@codemation/agent-skills` while working in the monorepo, run `codemation skills sync` intentionally if you want the extracted copy refreshed.
|
|
27
|
+
|
|
28
|
+
Put project-local skills in sibling folders under `.agents/skills`, not inside `extracted`, unless you accept them being replaced.
|
|
23
29
|
|
|
24
30
|
## Programmatic use
|
|
25
31
|
|
package/package.json
CHANGED
|
@@ -36,6 +36,8 @@ Do not use this skill for workflow graph design, custom node implementation, or
|
|
|
36
36
|
4. When Redis-backed execution is involved, mention the shared PostgreSQL requirement instead of assuming local SQLite still fits.
|
|
37
37
|
5. In consumer mode, discovered plugins are loaded from the built JavaScript path declared in `package.json#codemation.plugin`, not from TypeScript source under `node_modules`.
|
|
38
38
|
6. In plugin mode, the CLI TypeScript-loads only the current plugin repo through the generated `.codemation/plugin-dev/codemation.config.ts`.
|
|
39
|
+
7. In the Codemation framework monorepo, automatic refresh of `.agents/skills/extracted` is intentionally disabled to keep the worktree clean.
|
|
40
|
+
8. After `@codemation/cli` or `@codemation/agent-skills` package upgrades in monorepo work, remind the user to run `codemation skills sync` if they want the extracted packaged skills refreshed.
|
|
39
41
|
|
|
40
42
|
## Read next when needed
|
|
41
43
|
|
|
@@ -26,7 +26,7 @@ Do not use this skill for pure workflow chaining questions unless the node imple
|
|
|
26
26
|
1. Prefer helper-based nodes first.
|
|
27
27
|
2. Keep nodes deterministic and focused.
|
|
28
28
|
3. Request credentials through named slots instead of hard-coded secrets.
|
|
29
|
-
4. Put **static** options (credentials, retry policy, labels) on **config**; put **per-item** behavior in **inputs** / wire JSON and optional **`
|
|
29
|
+
4. Put **static** options (credentials, retry policy, labels) on **config**; put **per-item** behavior in **inputs** / wire JSON and optional **`itemExpr`** on config fields (consistent with built-in nodes).
|
|
30
30
|
5. Drop to class-based node APIs only when you need constructor-injected collaborators, decorators, or deeper runtime metadata.
|
|
31
31
|
|
|
32
32
|
## Testing with `WorkflowTestKit`
|
|
@@ -52,6 +52,6 @@ Reach for class-based node APIs when:
|
|
|
52
52
|
|
|
53
53
|
## Runtime reminder
|
|
54
54
|
|
|
55
|
-
- **`defineNode`** runs **`execute` once per item** (with optional **`inputSchema`** and **`
|
|
55
|
+
- **`defineNode`** runs **`execute` once per item** (with optional **`inputSchema`** and **`itemExpr`** on config fields before **`execute`**)
|
|
56
56
|
- **`defineBatchNode`** runs **`run`** once per activation batch
|
|
57
57
|
- keep nodes deterministic and testable; prefer real code paths or in-memory collaborators over heavy mocking
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: codemation-framework-concepts
|
|
3
|
-
description: Explains Codemation package boundaries, runtime concepts, and the normal consumer mental model. Use when the user asks where code belongs across `@codemation/core`, `@codemation/host`, `@codemation/next-host`, `@codemation/cli`, workflows, plugins, credentials, activation, or runtime modes.
|
|
3
|
+
description: Explains Codemation package boundaries, runtime concepts, observability shape, and the normal consumer mental model. Use when the user asks where code belongs across `@codemation/core`, `@codemation/host`, `@codemation/next-host`, `@codemation/cli`, workflows, plugins, credentials, activation, telemetry, or runtime modes.
|
|
4
4
|
compatibility: Designed for Codemation apps, plugins, and framework contributors.
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@ compatibility: Designed for Codemation apps, plugins, and framework contributors
|
|
|
8
8
|
|
|
9
9
|
## Use this skill when
|
|
10
10
|
|
|
11
|
-
Use this skill to explain package ownership, runtime shape, and the boundary between consumer code and framework code.
|
|
11
|
+
Use this skill to explain package ownership, runtime shape, observability boundaries, and the boundary between consumer code and framework code.
|
|
12
12
|
|
|
13
13
|
Do not use this skill as a substitute for detailed CLI, workflow DSL, or plugin implementation guidance when the user already knows the concept they need.
|
|
14
14
|
|
|
@@ -28,12 +28,15 @@ Do not use this skill as a substitute for detailed CLI, workflow DSL, or plugin
|
|
|
28
28
|
- items carry workflow data
|
|
29
29
|
- credentials provide typed runtime resources
|
|
30
30
|
- activation is framework-managed and happens in the UI
|
|
31
|
+
- telemetry is observability-first: traces, spans, artifacts, and metric points are framework-owned runtime data
|
|
32
|
+
- run retention and telemetry retention can differ, so trend data can outlive raw run state
|
|
31
33
|
|
|
32
34
|
## Runtime rule of thumb
|
|
33
35
|
|
|
34
36
|
1. Start with the minimum setup.
|
|
35
37
|
2. Move to shared PostgreSQL and Redis when execution needs separate worker infrastructure.
|
|
36
38
|
3. Keep workflow code stable while the runtime shape grows around it.
|
|
39
|
+
4. Treat telemetry as part of the runtime contract, not as ad-hoc node-local logging.
|
|
37
40
|
|
|
38
41
|
## Read next when needed
|
|
39
42
|
|
|
@@ -40,6 +40,16 @@ That usually means:
|
|
|
40
40
|
- Redis for queue-backed execution
|
|
41
41
|
- BullMQ-backed scheduling
|
|
42
42
|
|
|
43
|
+
## Observability data
|
|
44
|
+
|
|
45
|
+
Codemation stores observability data in the host runtime alongside other application state:
|
|
46
|
+
|
|
47
|
+
- traces and spans for execution correlation
|
|
48
|
+
- artifacts for drill-down payloads such as AI messages or tool I/O
|
|
49
|
+
- metric points for node-specific measurements without widening the span schema
|
|
50
|
+
|
|
51
|
+
Run retention and telemetry retention are intentionally separate so operators can keep trend data longer than raw run state.
|
|
52
|
+
|
|
43
53
|
## Activation flow
|
|
44
54
|
|
|
45
55
|
- deploy the workflow definition and any supporting plugin changes
|
|
@@ -23,7 +23,7 @@ That file is the plugin repository's source composition root. Consumers should d
|
|
|
23
23
|
|
|
24
24
|
## Node guidance
|
|
25
25
|
|
|
26
|
-
- start with `defineNode(...)` and **`execute(...)`** for simple reusable nodes (per-item pipeline; optional **`inputSchema`** and **`
|
|
26
|
+
- start with `defineNode(...)` and **`execute(...)`** for simple reusable nodes (per-item pipeline; optional **`inputSchema`** and **`itemExpr`** on config fields)
|
|
27
27
|
- use `defineBatchNode(...)` only when the node must process the **whole activation batch** in one **`run(items, ...)`**
|
|
28
28
|
- keep runtime logic close to the node definition
|
|
29
29
|
- move to class-based node APIs when you need constructor-injected collaborators or deeper runtime metadata
|
|
@@ -17,7 +17,8 @@ Do not use this skill for CLI-only troubleshooting or deep host architecture que
|
|
|
17
17
|
1. A workflow definition describes how items move from a trigger through downstream steps.
|
|
18
18
|
2. The fluent authoring chain is the normal starting point for Codemation apps.
|
|
19
19
|
3. Finish fluent workflow definitions with `.build()`.
|
|
20
|
-
4. Activations are **batch-shaped** (`Items`); many steps use **per-item** execution (`execute`, including helper **`defineNode`**) with optional **`inputSchema`** and **`
|
|
20
|
+
4. Activations are **batch-shaped** (`Items`); many steps use **per-item** execution (`execute`, including helper **`defineNode`**) with optional **`inputSchema`** and **`itemExpr`** on config fields. Batch reshape steps (split/filter/aggregate, **`defineBatchNode`**) work on the whole batch.
|
|
21
|
+
5. Fluent callback helpers follow the runtime item contract: `.map(...)`, `.if(...)`, and `.switch({ resolveCaseKey })` receive `(item, ctx)`, so row fields live under `item.json` and earlier completed outputs are available through `ctx.data`.
|
|
21
22
|
|
|
22
23
|
## Authoring rules
|
|
23
24
|
|
|
@@ -44,7 +45,8 @@ Do not use this skill for CLI-only troubleshooting or deep host architecture que
|
|
|
44
45
|
- Use `.agent(...)` for fluent workflow-defined agent steps.
|
|
45
46
|
- Define agent messages with `messages`, not a workflow-specific prompt shortcut.
|
|
46
47
|
- Use a static `messages` array for fixed prompts.
|
|
47
|
-
- Use `
|
|
48
|
+
- Use `itemExpr(...)` when agent messages depend on the current item.
|
|
49
|
+
- Use fluent `.map((item, ctx) => ...)` when workflow data itself needs reshaping before the agent step.
|
|
48
50
|
- `model` may be a provider string such as `"openai:gpt-4o-mini"` or a `ChatModelConfig`.
|
|
49
51
|
|
|
50
52
|
## Read next when needed
|
|
@@ -8,8 +8,8 @@ export default workflow("wf.example.id")
|
|
|
8
8
|
.manualTrigger("Start", {
|
|
9
9
|
step: "start",
|
|
10
10
|
})
|
|
11
|
-
.map("Transform", (item) => ({
|
|
12
|
-
...item,
|
|
11
|
+
.map("Transform", (item, _ctx) => ({
|
|
12
|
+
...item.json,
|
|
13
13
|
transformed: true,
|
|
14
14
|
}))
|
|
15
15
|
.build();
|
|
@@ -27,6 +27,8 @@ export default workflow("wf.example.id")
|
|
|
27
27
|
- items usually carry `json` data and optional `binary` data
|
|
28
28
|
- runtime nodes receive batches of items, not just one record
|
|
29
29
|
- author workflow steps with batching in mind
|
|
30
|
+
- fluent `.map(...)`, `.if(...)`, and `.switch({ resolveCaseKey })` callbacks receive `(item, ctx)`
|
|
31
|
+
- read row fields from `item.json` and earlier completed outputs from `ctx.data`
|
|
30
32
|
|
|
31
33
|
## When to move beyond callbacks
|
|
32
34
|
|
|
@@ -53,5 +55,5 @@ Promote inline callbacks into custom nodes when:
|
|
|
53
55
|
|
|
54
56
|
- use `.agent(...)` for agent steps in fluent workflow definitions
|
|
55
57
|
- define agent prompts with `messages`
|
|
56
|
-
- use `
|
|
58
|
+
- use `itemExpr(...)` when message content depends on `item.json`
|
|
57
59
|
- use `outputSchema` when the workflow should expose typed structured agent output
|