You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,7 @@ Program frontmatter:
21
21
22
22
-`id` (optional)
23
23
-`model` (optional)
24
+
-`skills` (optional list of required provider-native skills)
24
25
25
26
## How `apply` Works
26
27
@@ -98,6 +99,16 @@ The confirmation preview includes a variables summary, for example: `variables:
98
99
99
100
Program variables are defined in frontmatter under `variables` (`NAME: {}` for required, `NAME: { default: "..." }` for optional defaults) and referenced as `${{ var.NAME }}`.
100
101
102
+
Required provider-native skills can be declared in frontmatter with `skills`, for example:
103
+
104
+
```yaml
105
+
---
106
+
skills: [dstack]
107
+
---
108
+
```
109
+
110
+
If a required skill is unavailable, the run fails early. Implementation details and provider-specific behavior are documented in `contrib/ARCHITECTURE.md` and `contrib/DEVELOPMENT.md`.
111
+
101
112
Example output (will vary by session/model):
102
113
103
114
```text
@@ -106,7 +117,7 @@ Last session: 019d5843-eb2d-70b1-b49a-343033117944 (success, 43m ago)
4. variables without default are required at apply time
85
86
87
+
Skill rules:
88
+
89
+
1.`skills` is a shared frontmatter list, for example `skills: [dstack]`
90
+
2. each listed skill name must be a single non-empty token without whitespace
91
+
3. Clawform prepends explicit provider-native skill validation/invocation lines to the real session prompt before the normal apply contract
92
+
4. skill command syntax is provider-specific (`$skill` for Codex, `/skill` for Claude)
93
+
5. the injected validation line is phrased as `Fail if skill is not found.`
94
+
6. the injected prelude also instructs the agent to write `.clawform/agent_result.json` with `status: failure` and `reason: program_blocked` before stopping
95
+
7. if the provider still surfaces a missing-skill response without writing the result artifact, Clawform uses provider-specific fallback detection and fails the apply run
96
+
86
97
## 4) Apply Session Flow (Current Behavior)
87
98
88
99
1. Load program + config and resolve provider + model (`-p/--provider` overrides default provider selection).
@@ -94,7 +105,7 @@ Variable rules:
94
105
- variable diff vs last session variable snapshot (if available)
95
106
5. Ask for confirmation (interactive default; skipped by `--yes`).
96
107
6. Clear prior run protocol files in `.clawform/` and write runtime variables file (`.clawform/agent_variables.json`) when variables are present.
97
-
7. Build runtime prompt; in`workspace` and `auto` modes include explicit verdict-gate rules for sandbox-vs-program blocking.
108
+
7. Build runtime prompt; if the program declares `skills`, prepend provider-native skill invocation commands first. In`workspace` and `auto` modes include explicit verdict-gate rules for sandbox-vs-program blocking.
98
109
8. Run provider in the current workspace (no temp workspace copy).
99
110
9. Normalize provider-native events into shared progress categories, stream them to terminal, and during the run write session `commands/*` and `messages/*`. In debug mode, also write session `events.ndjson`.
100
111
10. In `auto` mode, allow at most one retry in `full-access` mode only when current-run `.clawform/agent_result.json` reports `status=partial|failure` and `reason=sandbox_blocked` (no stdout/stderr heuristic fallback).
@@ -106,7 +117,7 @@ Variable rules:
106
117
## 4.1 Progress Rendering Semantics
107
118
108
119
- In an interactive TTY, rich progress keeps a spinner plus a live `running` or `running: <activity>` status line.
109
-
- The run-start line includes the session id, execution mode, and a compact `provider:model` suffix, for example `🧵 <session> | workspace | codex:gpt-5-codex`.
120
+
- The run-start line includes the session id, execution mode, a compact `provider:model` suffix, and when applicable a compact `skills:` suffix, for example `🧵 <session> | workspace | codex:gpt-5-codex | skills:dstack`.
110
121
-`running` means the provider run is still alive. It is a liveness indicator, not the same thing as reasoning text.
111
122
- The live activity suffix is derived from the highest-priority active provider item, for example `search ...`, `fetch ...`, `use ...`, `edit ...`, or `update plan`.
112
123
- Completed progress lines are normalized across Claude and Codex into shared categories such as reasoning (`💭`), assistant text (`💬`), search (`🔎`), fetch (`🌐`), command (`❱`), file change (`✏️`), plan update (`update plan | ...`), generic tool (`🔧`), and unknown provider event (`📦`).
Copy file name to clipboardExpand all lines: contrib/DEVELOPMENT.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,7 +108,7 @@ Interactive progress UI is enabled automatically only when stdin/stdout are atta
108
108
Current progress semantics:
109
109
110
110
- Rich mode keeps a spinner plus a live `running` or `running: <activity>` status line.
111
-
- The run-start line includes the session id, execution mode, and a compact `provider:model` suffixsuch as `🧵 <session> | workspace | claude:sonnet`.
111
+
- The run-start line includes the session id, execution mode, a compact `provider:model` suffix, and when applicable a compact `skills:` suffix such as `🧵 <session> | workspace | claude:sonnet | skills:dstack`.
112
112
-`running` is a liveness indicator. It does not mean the model is explicitly emitting reasoning.
113
113
- Plain mode prints stable progress lines without the interactive spinner/status renderer.
114
114
- Completed provider items are normalized across Claude and Codex into categories such as `💭`, `💬`, `🔎`, `🌐`, `❱`, `✏️`, `update plan | ...`, `🔧`, and `📦`.
That debug run will also persist `.clawform/programs/<program_id>/sessions/<session_id>/events.ndjson` for postmortem event inspection.
126
126
127
+
Program frontmatter also supports required provider-native skills:
128
+
129
+
```yaml
130
+
---
131
+
skills: [dstack]
132
+
---
133
+
```
134
+
135
+
When present, Clawform prepends explicit provider-native skill validation/invocation lines to the real session prompt before the normal apply contract, for example `$dstack Fail if skill is not found.` or `/dstack Fail if skill is not found.`. The injected prelude also tells the agent to stop and write `.clawform/agent_result.json` with `reason: program_blocked` if a required skill is unavailable.
0 commit comments