substrate-ai 0.20.6 → 0.20.7
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/package.json
CHANGED
|
@@ -64,6 +64,96 @@ Use this exact format for each item:
|
|
|
64
64
|
- The transport annotation `(queue: ...)` or `(api: ...)` or `(from story X-Y)` is optional but recommended when applicable
|
|
65
65
|
- **The `## Interface Contracts` section is optional** — omit it entirely if the story has no cross-story schema dependencies
|
|
66
66
|
|
|
67
|
+
## Runtime Verification Guidance
|
|
68
|
+
|
|
69
|
+
**Decide whether this story's artifact is runtime-dependent.** An artifact is runtime-dependent if correctness depends on execution — systemd units, container definitions (Podman Quadlet, Docker Compose), install scripts, migration runners, anything whose behavior is only observable by running it against a real host or ephemeral sandbox.
|
|
70
|
+
|
|
71
|
+
If the artifact is runtime-dependent, add a `## Runtime Probes` section to the story file. Each probe is a short shell command whose exit status answers "does this artifact actually work?".
|
|
72
|
+
|
|
73
|
+
**If the artifact is NOT runtime-dependent — TypeScript/JavaScript code + tests, type-only refactors, documentation, build or tsconfig edits — omit the `## Runtime Probes` section entirely.** Adding one for a static-output story produces a `pass` (skip) with no benefit. The default substrate self-development case (source code + tests) has no probes.
|
|
74
|
+
|
|
75
|
+
### Probe YAML shape
|
|
76
|
+
|
|
77
|
+
Declare probes as a YAML list inside a single fenced `yaml` block directly under the `## Runtime Probes` heading. Each entry has this shape:
|
|
78
|
+
|
|
79
|
+
```text
|
|
80
|
+
- name: <hyphen-separated-identifier> # required; unique within story
|
|
81
|
+
sandbox: host | twin # required; one of host | twin
|
|
82
|
+
command: <shell command line(s)> # required
|
|
83
|
+
timeout_ms: 60000 # optional; defaults to 60000
|
|
84
|
+
description: <optional context> # optional
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Required fields: `name`, `sandbox`, `command`. `timeout_ms` and `description` are optional. Probe names must be unique within one story.
|
|
88
|
+
|
|
89
|
+
### Sandbox choice
|
|
90
|
+
|
|
91
|
+
- **`sandbox: twin`** — default for probes that mutate host state: starting services, binding ports, writing outside the project working directory, running privileged commands. Safer; ephemeral.
|
|
92
|
+
- **`sandbox: host`** — only when the probe is strictly read-only from the host's perspective (linting a file, parsing config, asserting a command exists, pulling an image into a local cache) OR when the host context itself is what the story needs to verify.
|
|
93
|
+
- **When in doubt, pick `twin`.**
|
|
94
|
+
|
|
95
|
+
### Probe granularity
|
|
96
|
+
|
|
97
|
+
For stories with multiple runtime concerns (install + start + connect), declare **separate named probes per concern** rather than one monolithic probe. Finding messages reference probe names; granular probes produce actionable failures and let retries focus on the specific failure.
|
|
98
|
+
|
|
99
|
+
Probe names are hyphen-separated identifiers, not sentences: `dolt-image-pullable`, not `verify that the dolt image can be pulled`.
|
|
100
|
+
|
|
101
|
+
### Examples by artifact class
|
|
102
|
+
|
|
103
|
+
**Systemd unit:**
|
|
104
|
+
|
|
105
|
+
```yaml
|
|
106
|
+
- name: unit-is-active
|
|
107
|
+
sandbox: twin
|
|
108
|
+
command: systemctl is-active my-service.service
|
|
109
|
+
description: unit started and has not crashed
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**Container / Podman Quadlet** (catches the wrong-image-path class — strata Story 1-4):
|
|
113
|
+
|
|
114
|
+
```yaml
|
|
115
|
+
- name: dolt-image-pullable
|
|
116
|
+
sandbox: host
|
|
117
|
+
command: podman pull ghcr.io/dolthub/dolt-sql-server:latest
|
|
118
|
+
description: image reference resolves and is pullable
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**Install script:**
|
|
122
|
+
|
|
123
|
+
```yaml
|
|
124
|
+
- name: installer-exits-clean
|
|
125
|
+
sandbox: twin
|
|
126
|
+
command: bash ./install.sh --dry-run
|
|
127
|
+
- name: installed-binary-reports-version
|
|
128
|
+
sandbox: twin
|
|
129
|
+
command: /usr/local/bin/my-tool --version
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**Database migration:**
|
|
133
|
+
|
|
134
|
+
```yaml
|
|
135
|
+
- name: migration-applies-cleanly
|
|
136
|
+
sandbox: twin
|
|
137
|
+
command: npm run migrate:up && npm run migrate:status
|
|
138
|
+
description: migration applies and schema_migrations reports the new version
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
**Docker Compose:**
|
|
142
|
+
|
|
143
|
+
```yaml
|
|
144
|
+
- name: compose-parses
|
|
145
|
+
sandbox: host
|
|
146
|
+
command: docker compose -f ./compose.yaml config --quiet
|
|
147
|
+
description: compose file is syntactically valid
|
|
148
|
+
- name: compose-service-starts
|
|
149
|
+
sandbox: twin
|
|
150
|
+
command: docker compose -f ./compose.yaml up -d api && docker compose -f ./compose.yaml ps api | grep -q running
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Framing
|
|
154
|
+
|
|
155
|
+
Treat the probes you draft as a **first pass** the human author will refine. Probes execute on a real host (or — for `sandbox: twin` — a real ephemeral sandbox), so command correctness matters. Prefer conservative commands that exit 0 only on true success and non-zero on any real failure.
|
|
156
|
+
|
|
67
157
|
## Scope Cap Guidance
|
|
68
158
|
|
|
69
159
|
**Aim for 6-7 acceptance criteria and 7-8 tasks per story.**
|