assertion-cli 0.5.0__tar.gz → 0.5.1__tar.gz
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.
- {assertion_cli-0.5.0 → assertion_cli-0.5.1}/PKG-INFO +1 -1
- {assertion_cli-0.5.0 → assertion_cli-0.5.1}/assertion_cli.egg-info/PKG-INFO +1 -1
- {assertion_cli-0.5.0 → assertion_cli-0.5.1}/main.py +5 -1
- {assertion_cli-0.5.0 → assertion_cli-0.5.1}/pyproject.toml +1 -1
- {assertion_cli-0.5.0 → assertion_cli-0.5.1}/templates/ACTIVATION.md +9 -2
- {assertion_cli-0.5.0 → assertion_cli-0.5.1}/templates/SKILL.md +35 -5
- {assertion_cli-0.5.0 → assertion_cli-0.5.1}/README.md +0 -0
- {assertion_cli-0.5.0 → assertion_cli-0.5.1}/api.py +0 -0
- {assertion_cli-0.5.0 → assertion_cli-0.5.1}/assertion_cli.egg-info/SOURCES.txt +0 -0
- {assertion_cli-0.5.0 → assertion_cli-0.5.1}/assertion_cli.egg-info/dependency_links.txt +0 -0
- {assertion_cli-0.5.0 → assertion_cli-0.5.1}/assertion_cli.egg-info/entry_points.txt +0 -0
- {assertion_cli-0.5.0 → assertion_cli-0.5.1}/assertion_cli.egg-info/requires.txt +0 -0
- {assertion_cli-0.5.0 → assertion_cli-0.5.1}/assertion_cli.egg-info/top_level.txt +0 -0
- {assertion_cli-0.5.0 → assertion_cli-0.5.1}/bundle.py +0 -0
- {assertion_cli-0.5.0 → assertion_cli-0.5.1}/git.py +0 -0
- {assertion_cli-0.5.0 → assertion_cli-0.5.1}/link.py +0 -0
- {assertion_cli-0.5.0 → assertion_cli-0.5.1}/models.py +0 -0
- {assertion_cli-0.5.0 → assertion_cli-0.5.1}/session.py +0 -0
- {assertion_cli-0.5.0 → assertion_cli-0.5.1}/setup.cfg +0 -0
- {assertion_cli-0.5.0 → assertion_cli-0.5.1}/templates/__init__.py +0 -0
- {assertion_cli-0.5.0 → assertion_cli-0.5.1}/tests/test_api.py +0 -0
- {assertion_cli-0.5.0 → assertion_cli-0.5.1}/tests/test_bundle.py +0 -0
- {assertion_cli-0.5.0 → assertion_cli-0.5.1}/tests/test_decision.py +0 -0
- {assertion_cli-0.5.0 → assertion_cli-0.5.1}/tests/test_git.py +0 -0
- {assertion_cli-0.5.0 → assertion_cli-0.5.1}/tests/test_init.py +0 -0
- {assertion_cli-0.5.0 → assertion_cli-0.5.1}/tests/test_link.py +0 -0
- {assertion_cli-0.5.0 → assertion_cli-0.5.1}/tests/test_main.py +0 -0
- {assertion_cli-0.5.0 → assertion_cli-0.5.1}/tests/test_prompt.py +0 -0
- {assertion_cli-0.5.0 → assertion_cli-0.5.1}/tests/test_session.py +0 -0
|
@@ -109,7 +109,11 @@ def _apply_marked_block(path: Path, body: str, repo_root: Path) -> None:
|
|
|
109
109
|
if path.exists():
|
|
110
110
|
current = path.read_text(encoding="utf-8")
|
|
111
111
|
if pattern.search(current):
|
|
112
|
-
|
|
112
|
+
# Replace via a callable so re.sub does NOT interpret backslash
|
|
113
|
+
# escapes (e.g. `\n`, `\g`) in the block — the activation template
|
|
114
|
+
# contains literal shell snippets like `printf '%s\n\n...'`, and a
|
|
115
|
+
# string replacement would mangle them, breaking init idempotency.
|
|
116
|
+
new_content = pattern.sub(lambda _match: marked_block, current)
|
|
113
117
|
else:
|
|
114
118
|
sep = (
|
|
115
119
|
""
|
|
@@ -9,6 +9,13 @@ Both files are byte-identical. Read whichever your agent loads (or either one di
|
|
|
9
9
|
|
|
10
10
|
1. **Every user message:** call `asrt prompt "<exact text of the message>"` before doing any other work for that turn. This is the verifier's source of truth for what the user asked for and how their direction evolves. Apply to every user turn, not just the first.
|
|
11
11
|
2. **Checkpoint at trajectory-feedback moments**, not on every small change. On the first checkpoint of a session, run `asrt stacks`, pick the stack that fits this repo and the work (use the stack's `repo`, `name`, `description`, plus folder/branch/README signals), then run `asrt checkpoint --stack <id> "<summary>"`. Subsequent checkpoints in the same session don't need `--stack` — `asrt checkpoint "<summary>"` auto-continues. A whole feature build is a handful of checkpoints, not one per file.
|
|
12
|
-
3. **Verify at completion** with `asrt verify`. If feedback requires changes, iterate and re-verify — do **not** drop back into the checkpoint loop. Once verify is clean, open a PR
|
|
12
|
+
3. **Verify at completion** with `asrt verify`. If feedback requires changes, iterate and re-verify — do **not** drop back into the checkpoint loop. Once verify is clean, open a PR and **put the Assertion session URL in the PR description** — this is required, not optional. Read the URL from `asrt get-link` (don't paste from memory) and include it on its own labeled line:
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
```
|
|
15
|
+
SESSION_URL=$(asrt get-link)
|
|
16
|
+
gh pr create --title "<title>" --body "$(printf '%s\n\n**Assertion verification:** %s\n' '<one-paragraph why>' "$SESSION_URL")"
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
If a PR already exists for the branch, add the line with `gh pr edit --body` instead of opening a new one.
|
|
20
|
+
|
|
21
|
+
Do not open a PR without a clean `asrt verify`, and do not open one whose description omits the session URL.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: assertion-cli
|
|
3
|
-
description: Use this skill in non-Plan mode whenever working in a repo that uses the Assertion CLI (`asrt`). It enforces the three-rule workflow — log every user message with `asrt prompt`, checkpoint at trajectory-feedback moments (not on every change), and verify only at completion before opening a PR. Applies to any coding agent reading this skill.
|
|
3
|
+
description: Use this skill in non-Plan mode whenever working in a repo that uses the Assertion CLI (`asrt`). It enforces the three-rule workflow — log every user message with `asrt prompt`, checkpoint at trajectory-feedback moments (not on every change), and verify only at completion before opening a PR whose description includes the Assertion session URL. Applies to any coding agent reading this skill.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Assertion CLI
|
|
@@ -137,17 +137,46 @@ done
|
|
|
137
137
|
|
|
138
138
|
`asrt verify-status` is a one-shot poll. It prints the current status, refreshes `.assertion/link`, and on terminal status writes screenshots under `.assertion/screenshots/<verification_id>/`. Exit code is `0` for `created` / `running` / `succeeded` and `1` for `failed`, so a polling loop can also branch on `$?`.
|
|
139
139
|
|
|
140
|
-
`asrt get-link` prints the last session URL
|
|
140
|
+
`asrt get-link` prints the last session URL — the verification record reviewers open from the PR. Every PR you open from an Assertion session must carry this URL in its description (see *Put the session URL in the PR description* below).
|
|
141
141
|
|
|
142
142
|
**After status reports terminal, branch on the outcome:**
|
|
143
143
|
|
|
144
144
|
| Outcome | What you do next |
|
|
145
145
|
|---|---|
|
|
146
|
-
| **Clean** (succeeded, no required changes) | Open a PR
|
|
146
|
+
| **Clean** (succeeded, no required changes) | Open a PR and **put the session URL in the PR description** — mandatory, not optional. Use the exact command in *Put the session URL in the PR description* below. |
|
|
147
147
|
| **Feedback or failed** (changes required) | Treat the feedback as authoritative. Apply the changes it calls for, then re-run `asrt verify` and poll `asrt verify-status` again. Repeat until clean. **Do not drop back into the checkpoint loop** — verify is the gate, not a checkpoint. |
|
|
148
148
|
| **User sends a new message during iteration** | Log it with `asrt prompt` first (Rule 1 still applies). Address the new direction. Re-verify before opening the PR. |
|
|
149
149
|
|
|
150
|
-
|
|
150
|
+
### Put the session URL in the PR description (required)
|
|
151
|
+
|
|
152
|
+
Every PR opened from an Assertion session **must** include the verification session URL in its description. That URL is the reviewer's link to the verification record; a PR without it is incomplete. Do not bury it in a PR comment and do not omit it.
|
|
153
|
+
|
|
154
|
+
Read the URL with `asrt get-link` and pass it to `gh pr create` so it lands in the body — don't paste a URL from memory:
|
|
155
|
+
|
|
156
|
+
```
|
|
157
|
+
SESSION_URL=$(asrt get-link)
|
|
158
|
+
gh pr create --title "<title>" --body "$(cat <<EOF
|
|
159
|
+
<one-paragraph summary of *why*, not *what*>
|
|
160
|
+
|
|
161
|
+
**Assertion verification:** $SESSION_URL
|
|
162
|
+
EOF
|
|
163
|
+
)"
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
If a PR already exists for this branch, edit its body instead of opening a new one:
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
gh pr edit --body "$(cat <<EOF
|
|
170
|
+
<existing summary>
|
|
171
|
+
|
|
172
|
+
**Assertion verification:** $(asrt get-link)
|
|
173
|
+
EOF
|
|
174
|
+
)"
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Keep the `Assertion verification:` label line verbatim so reviewers and tooling can find the link. After creating or editing the PR, confirm the URL is actually in the rendered description with `gh pr view --json body`.
|
|
178
|
+
|
|
179
|
+
**Do not open a PR without a clean `asrt verify` / `asrt verify-status`, and do not open one whose description omits the session URL.** Do not end a session with a failed/dirty verify unless the verification service itself is unavailable.
|
|
151
180
|
|
|
152
181
|
---
|
|
153
182
|
|
|
@@ -161,7 +190,7 @@ asrt checkpoint "..." # subsequent checkpoints — auto-
|
|
|
161
190
|
asrt decision --yes|--no <ckpt-id> # optional, on failed checkpoints only
|
|
162
191
|
asrt verify # submit verification (non-blocking)
|
|
163
192
|
asrt verify-status # one-shot poll; loop with your own sleep
|
|
164
|
-
asrt get-link #
|
|
193
|
+
asrt get-link # last session URL — must go in the PR description
|
|
165
194
|
```
|
|
166
195
|
|
|
167
196
|
## Environment
|
|
@@ -180,5 +209,6 @@ When running under a non-interactive harness (CI, benchmark runner, scripts):
|
|
|
180
209
|
- Re-run `asrt checkpoint "<what you changed>" --json` (auto-continues the existing session).
|
|
181
210
|
- Bound retries: stop after 3 attempts on the same failure mode, or when the same `reasoning` is returned twice in a row.
|
|
182
211
|
4. `asrt verify --json` submits and exits with a one-line JSON `{"session_id", "url", "status": "submitted"}`. Poll `asrt verify-status --json` on your own cadence — terminal output is `{"session_id", "url", "status", "message", "summary", "screenshot_count"}` with exit `1` on `failed`, `0` otherwise. Choose the poll interval to fit your harness timeouts; do not block a single shell call on verify.
|
|
212
|
+
5. If the harness opens a PR, the `url` field (equivalently `asrt get-link`) is the session URL that **must** appear in the PR description — same requirement as interactive mode. Read it from the JSON rather than reconstructing it.
|
|
183
213
|
|
|
184
214
|
Do not mix `--json` output with human-rendered output in the same run. Pick one mode and stick with it.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|