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
README.md (project overview), and CHANGELOG.md. If you just implemented a
12
+
feature and need to update documentation, this is the skill to use. Never
13
+
manually edit docs without cross-validating against Go source first.
13
14
argument-hint: "[feature-name | commit-range]"
14
15
targets: [claude, codex]
15
16
---
16
17
17
-
Sync skills/ documentation with recent code changes. $ARGUMENTS specifies scope: a feature name (e.g., `step-setup`), commit range, or omit to auto-detect from `git diff HEAD~1`.
18
+
Sync all documentation with recent code changes. $ARGUMENTS specifies scope: a feature name (e.g., `step-setup`), commit range, or omit to auto-detect from `git diff HEAD~1`.
18
19
19
-
**Scope**: This skill updates `skills/`, `CHANGELOG.md`. It does NOT write Go code (use `implement-feature`).
20
+
**Scope**: This skill updates `docs/`, `skills/`, `README.md`, `CHANGELOG.md`. It does NOT write Go code (use `implement-feature`).
21
+
22
+
**Documentation tiers** (update all that are affected):
23
+
24
+
| Tier | Path | Audience | What lives here |
25
+
|------|------|----------|-----------------|
26
+
| User guides |`docs/`| End users, GitHub visitors | CLI reference, runbook authoring, advanced features |
27
+
| AI skill |`skills/`| AI agents (Claude, Codex) | Compact reference for agent consumption |
-**New major feature** → add to `README.md` Features table + Key Concepts
109
+
-**Removed flag/field** → remove from all docs
110
+
-**Changed behavior** → update description in all affected docs
81
111
-**Every `--flag` / `-flag` in docs** must have a matching hit in source
82
112
83
113
### Step 3: Update Documentation
84
114
85
-
Apply changes following the established structure:
115
+
Apply changes following the established structure. Update **all tiers** that are affected — a new flag needs to appear in `docs/cli-reference.md`, `skills/SKILL.md`, and possibly `README.md`.
116
+
117
+
#### docs/cli-reference.md structure:
118
+
119
+
| Section | What to update |
120
+
|---------|---------------|
121
+
| Flags table | Must match `cmd/mdproof/main.go` flag definitions exactly |
122
+
| Subcommands | New subcommands (sandbox, upgrade) |
123
+
| Examples | Add usage examples for new flags |
124
+
125
+
#### docs/writing-runbooks.md structure:
126
+
127
+
| Section | What to update |
128
+
|---------|---------------|
129
+
| Code Blocks | New execution behaviors (sub-commands, separators) |
130
+
| Persistent Shell Session | Changes to env persistence model |
131
+
| Assertions | New assertion types or changed behavior |
132
+
| Directives | New HTML comment directives |
133
+
| Inline Testing | Changes to `--inline` mode |
134
+
135
+
#### docs/advanced.md structure:
136
+
137
+
| Section | What to update |
138
+
|---------|---------------|
139
+
| Hooks | Per-runbook hooks + per-step hooks |
140
+
| Configuration |`mdproof.json` fields — must match Config struct |
| Features table | New major features (For AI Agents / For Humans) |
153
+
| Key Concepts | New concepts users should know about |
154
+
| Assertions table | New assertion types |
155
+
| Quick Start | Only if the basic workflow changes |
86
156
87
157
#### skills/SKILL.md structure:
88
158
@@ -123,13 +193,15 @@ Apply changes following the established structure:
123
193
124
194
### Step 4: Consistency Checks
125
195
126
-
After updating, verify cross-references are consistent:
196
+
After updating, verify cross-references are consistent across all doc tiers:
127
197
128
-
1.**Assertion count** — `skills/SKILL.md` says "Six types" → count actual types in assertions-guide.md
129
-
2.**Config example** — JSON example in advanced-features.md must include all Config struct fields
130
-
3.**Flag table** — CLI Flags in SKILL.md must be a complete subset of flags in main.go
131
-
4.**Quick Reference** — examples must use correct flag ordering (flags before file path — Go's `flag` package requirement)
132
-
5.**Report fields** — any jq assertion examples must reference fields that actually exist in the JSON report
198
+
1.**Flag completeness** — every flag in `cmd/mdproof/main.go` must appear in both `docs/cli-reference.md` and `skills/SKILL.md`
199
+
2.**Config completeness** — every `json:"..."` field in Config struct must appear in both `docs/advanced.md` and `skills/references/advanced-features.md` config examples
200
+
3.**Assertion count** — `skills/SKILL.md` says "Six types" → count actual types in assertions-guide.md and `docs/writing-runbooks.md`
201
+
4.**Cross-tier consistency** — `docs/` and `skills/` must not contradict each other (e.g., different flag descriptions, different default values)
202
+
5.**README coverage** — every major feature in Key Concepts should have a corresponding section in `docs/advanced.md`
203
+
6.**Flag ordering** — all CLI examples across all docs must put flags before file paths (Go's `flag` package requirement)
204
+
7.**Report fields** — any jq assertion examples must reference fields that actually exist in the JSON report
133
205
134
206
### Step 5: Verify
135
207
@@ -149,36 +221,48 @@ List all changes made with rationale:
149
221
== Documentation Updates ==
150
222
151
223
Modified:
224
+
docs/cli-reference.md
225
+
- Added -step-setup/-step-teardown to Flags table
226
+
- Added per-step hooks example
227
+
228
+
docs/advanced.md
229
+
- Added Per-Step Setup/Teardown section
230
+
- Updated Configuration table with step_setup/step_teardown
231
+
152
232
skills/SKILL.md
153
233
- Added -step-setup/-step-teardown to CLI Flags table
154
-
- Added sub-command separator section to Writing Runbooks
155
234
156
235
skills/references/advanced-features.md
157
-
- Added Per-Step Setup/Teardown section
158
236
- Updated Configuration File example with step_setup/step_teardown
159
237
238
+
README.md
239
+
- Added per-step hooks to Features table and Key Concepts
-**Source of truth is Go code** — docs must match what the code actually does
179
261
-**Every flag/config claim must be verified** — grep source before writing docs
262
+
-**Update all tiers** — a new flag must appear in `docs/`, `skills/`, and possibly `README.md`
180
263
-**No speculative docs** — never document planned but unimplemented features
181
-
-**No code changes** — this skill only touches `skills/` and `CHANGELOG.md`
182
-
-**Preserve style** — match existing doc structure and tone
264
+
-**No code changes** — this skill only touches documentation files
265
+
-**Preserve style** — match existing doc structure and tone per tier
183
266
-**Flag ordering** — all CLI examples must put flags before file paths
184
267
-**Config field names** — use the exact `json:"..."` tag from Config struct (snake_case)
268
+
-**`docs/` vs `skills/`** — `docs/` is for human end users (more prose, examples, mermaid diagrams); `skills/` is for AI agents (compact, structured, precise)
|`isolation`| string |`"shared"` (default) or `"per-runbook"`|
109
132
|`env`| object | Environment variables seeded into all steps |
110
133
111
134
Sandbox settings can also be configured:
@@ -122,6 +145,46 @@ Sandbox settings can also be configured:
122
145
123
146
CLI flags override config file values.
124
147
148
+
## Per-Runbook Isolation
149
+
150
+
By default, all runbooks share the host's `$HOME` and `$TMPDIR`. With `--isolation per-runbook`, each runbook gets a fresh temp directory as `$HOME` with `$TMPDIR` under `$HOME/tmp`, cleaned up after each runbook:
151
+
152
+
```bash
153
+
mdproof --isolation per-runbook ./runbooks/
154
+
```
155
+
156
+
Or in `mdproof.json`:
157
+
158
+
```json
159
+
{ "isolation": "per-runbook" }
160
+
```
161
+
162
+
- Build hook (`--build`) runs in the original environment — not affected by isolation
163
+
- Setup/teardown hooks inherit the isolated `$HOME`/`$TMPDIR`
164
+
- Invalid values produce an error at config load time
165
+
- CLI `--isolation` overrides the config file value
166
+
167
+
## Report Formats
168
+
169
+
### JSON
170
+
171
+
```bash
172
+
mdproof --report json test.md # single object to stdout
173
+
mdproof --report json ./runbooks/ # JSON array to stdout
Produces JUnit XML for native CI test result display (GitHub Actions, GitLab CI, Jenkins). Sub-command exit codes and stderr are included in failure bodies.
187
+
125
188
## Coverage
126
189
127
190
Analyze assertion coverage of your runbooks without executing them:
@@ -251,7 +314,7 @@ Once installed, your AI agent can autonomously:
251
314
252
315
- Write runbook files with correct naming (`*-proof.md`, `*_runbook.md`)
253
316
- Use all 6 assertion types (substring, exit_code, regex, jq, snapshot, negated)
254
-
- Configure hooks (build, setup, teardown) and `mdproof.json`
317
+
- Configure hooks (build, setup, teardown, step-setup, step-teardown) and `mdproof.json`
0 commit comments