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: contrib/ARCHITECTURE.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,7 +96,7 @@ Variable rules:
96
96
6. Clear prior run protocol files in `.clawform/` and write runtime variables file (`.clawform/agent_variables.json`) when variables are present.
97
97
7. Build runtime prompt; in `workspace` and `auto` modes include explicit verdict-gate rules for sandbox-vs-program blocking.
98
98
8. Run provider in the current workspace (no temp workspace copy).
99
-
9. Normalize provider-native events into shared progress categories, stream them to terminal, and during the run write session `commands/*` and `messages/*`.
99
+
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
100
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).
101
101
11. Read agent status from `.clawform/agent_result.json` (required) and validate strict status/reason schema.
102
102
12. Collect reported changed files from `.clawform/agent_outputs.json` when that file exists and was updated in this run.
@@ -106,9 +106,10 @@ Variable rules:
106
106
## 4.1 Progress Rendering Semantics
107
107
108
108
- 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`.
109
110
-`running` means the provider run is still alive. It is a liveness indicator, not the same thing as reasoning text.
110
111
- The live activity suffix is derived from the highest-priority active provider item, for example `search ...`, `fetch ...`, `use ...`, `edit ...`, or `update plan`.
111
-
- Completed progress lines are normalized across Claude and Codex into shared categories such as reasoning (`💭`), assistant text (`💬`), search (`🔎`), fetch (`🌐`), command (`❱`), file change (`✎`), plan update (`🗒️`), generic tool (`🔧`), and unknown provider event (`📦`).
112
+
- 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 (`📦`).
112
113
- In `plain` mode, Clawform prints stable progress lines without the interactive spinner/status renderer.
113
114
- Unknown tool-like and non-tool provider items are rendered through generic fallbacks instead of being silently dropped.
114
115
- Interrupting with `Ctrl+C` should surface cancellation rather than a raw provider stdout/stderr dump.
@@ -138,6 +139,7 @@ During the current run:
138
139
139
140
- Write `<protocol_root>/agent_variables.json` (when variables exist); the agent reads this file for resolved `${{ var.NAME }}` values.
140
141
- Write `<session_root>/commands/*` and `<session_root>/messages/*` as per-session execution artifacts.
142
+
- In debug mode, also write `<session_root>/events.ndjson` as a per-session event trace artifact.
141
143
- Read `<protocol_root>/agent_result.json`, `<protocol_root>/agent_outputs.json`, and optional `<protocol_root>/agent_output.md` at run end to determine status, changed files, and summary.
142
144
143
145
On the next run of the same program:
@@ -159,6 +161,7 @@ For audit/debug visibility:
159
161
|`<protocol_root>/agent_result.json`| Workspace-global scratch file for the currently running apply (overwritten on each apply) | Receive final structured run verdict (`status`, optional `reason`, `message`) where `reason` is strict enum (`sandbox_blocked` or `program_blocked`) | Read by Clawform at run end; in sandbox auto mode also used as the only retry signal source, only if file mtime is from this run |
160
162
|`<protocol_root>/agent_outputs.json`| Workspace-global scratch file for the currently running apply (overwritten on each apply) | Receive changed-file list from the agent | Read by Clawform at run end for file summary/history, only if file mtime is from this run |
161
163
|`<protocol_root>/agent_output.md`| Workspace-global scratch file for the currently running apply (optional; overwritten on each apply) | Receive agent-written summary text | Read by Clawform at run end; then copied into session `output.md`|
164
+
|`<session_root>/events.ndjson`| Per-session (`<program_id>/<session_id>`), debug mode only | Preserve normalized provider events plus raw source lines for this session | Used for audit/debug flows and event-based validation |
162
165
|`<session_root>/commands/*.txt`| Per-session (`<program_id>/<session_id>`) | Preserve command output artifacts for this session | Used for progress drilldown and debugging |
163
166
|`<session_root>/messages/*.md`| Per-session (`<program_id>/<session_id>`) | Preserve assistant/message artifacts for this session | Used for progress drilldown and fallback summary source |
164
167
|`<session_root>/output.md`| Per-session (`<program_id>/<session_id>`) | Store stable summary artifact for this session | Used on next run of same `program_id` for preview/prompt reference |
@@ -169,7 +172,7 @@ For audit/debug visibility:
169
172
170
173
Compatibility behavior:
171
174
172
-
- No read fallback is used for `agent_summary.md` or `events.ndjson`.
175
+
- No read fallback is used for `agent_summary.md`.
173
176
- Current apply reads only the current protocol files documented in this section.
174
177
- Sandbox auto-retry does not parse provider stdout/stderr for sandbox heuristics; it only trusts current-run `agent_result.json`.
175
178
@@ -186,7 +189,7 @@ Current apply does not persist:
Copy file name to clipboardExpand all lines: contrib/DEVELOPMENT.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,18 +108,22 @@ 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` suffix such as `🧵 <session> | workspace | claude:sonnet`.
111
112
-`running` is a liveness indicator. It does not mean the model is explicitly emitting reasoning.
112
113
- Plain mode prints stable progress lines without the interactive spinner/status renderer.
113
-
- Completed provider items are normalized across Claude and Codex into categories such as `💭`, `💬`, `🔎`, `🌐`, `❱`, `✎`, `🗒️`, `🔧`, and `📦`.
114
+
- Completed provider items are normalized across Claude and Codex into categories such as `💭`, `💬`, `🔎`, `🌐`, `❱`, `✏️`, `update plan | ...`, `🔧`, and `📦`.
114
115
- Unknown provider item types still surface through `🔧` / `📦` fallbacks instead of being silently dropped.
115
116
-`Ctrl+C` should report cancellation rather than dumping raw provider stdout/stderr.
117
+
- Per-session `events.ndjson` traces are written only in debug mode.
116
118
117
119
Show provider raw logs (debug mode):
118
120
119
121
```bash
120
122
cargo run -p clawform -- apply -f examples/smoke.md --debug
121
123
```
122
124
125
+
That debug run will also persist `.clawform/programs/<program_id>/sessions/<session_id>/events.ndjson` for postmortem event inspection.
0 commit comments