assertion-cli 0.5.6__tar.gz → 0.5.7__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.6 → assertion_cli-0.5.7}/PKG-INFO +1 -1
- {assertion_cli-0.5.6 → assertion_cli-0.5.7}/assertion_cli.egg-info/PKG-INFO +1 -1
- {assertion_cli-0.5.6 → assertion_cli-0.5.7}/pyproject.toml +1 -1
- {assertion_cli-0.5.6 → assertion_cli-0.5.7}/templates/SKILL.md +12 -1
- {assertion_cli-0.5.6 → assertion_cli-0.5.7}/tests/test_init.py +31 -2
- {assertion_cli-0.5.6 → assertion_cli-0.5.7}/README.md +0 -0
- {assertion_cli-0.5.6 → assertion_cli-0.5.7}/api.py +0 -0
- {assertion_cli-0.5.6 → assertion_cli-0.5.7}/assertion_cli.egg-info/SOURCES.txt +0 -0
- {assertion_cli-0.5.6 → assertion_cli-0.5.7}/assertion_cli.egg-info/dependency_links.txt +0 -0
- {assertion_cli-0.5.6 → assertion_cli-0.5.7}/assertion_cli.egg-info/entry_points.txt +0 -0
- {assertion_cli-0.5.6 → assertion_cli-0.5.7}/assertion_cli.egg-info/requires.txt +0 -0
- {assertion_cli-0.5.6 → assertion_cli-0.5.7}/assertion_cli.egg-info/top_level.txt +0 -0
- {assertion_cli-0.5.6 → assertion_cli-0.5.7}/bundle.py +0 -0
- {assertion_cli-0.5.6 → assertion_cli-0.5.7}/git.py +0 -0
- {assertion_cli-0.5.6 → assertion_cli-0.5.7}/link.py +0 -0
- {assertion_cli-0.5.6 → assertion_cli-0.5.7}/main.py +0 -0
- {assertion_cli-0.5.6 → assertion_cli-0.5.7}/models.py +0 -0
- {assertion_cli-0.5.6 → assertion_cli-0.5.7}/session.py +0 -0
- {assertion_cli-0.5.6 → assertion_cli-0.5.7}/setup.cfg +0 -0
- {assertion_cli-0.5.6 → assertion_cli-0.5.7}/templates/__init__.py +0 -0
- {assertion_cli-0.5.6 → assertion_cli-0.5.7}/tests/test_api.py +0 -0
- {assertion_cli-0.5.6 → assertion_cli-0.5.7}/tests/test_bundle.py +0 -0
- {assertion_cli-0.5.6 → assertion_cli-0.5.7}/tests/test_decision.py +0 -0
- {assertion_cli-0.5.6 → assertion_cli-0.5.7}/tests/test_git.py +0 -0
- {assertion_cli-0.5.6 → assertion_cli-0.5.7}/tests/test_link.py +0 -0
- {assertion_cli-0.5.6 → assertion_cli-0.5.7}/tests/test_main.py +0 -0
- {assertion_cli-0.5.6 → assertion_cli-0.5.7}/tests/test_new.py +0 -0
- {assertion_cli-0.5.6 → assertion_cli-0.5.7}/tests/test_prompt.py +0 -0
- {assertion_cli-0.5.6 → assertion_cli-0.5.7}/tests/test_session.py +0 -0
|
@@ -16,7 +16,16 @@ Before any `asrt` call:
|
|
|
16
16
|
- You are inside a git repository.
|
|
17
17
|
- `asrt init` has been run in this repo. It records the current HEAD as the diff base that every checkpoint/verify diffs against, and installs the skill files you are reading right now. If `asrt checkpoint` or `asrt verify` errors with "No diff base recorded", run `asrt init` and retry.
|
|
18
18
|
|
|
19
|
-
**
|
|
19
|
+
**First command sequence for a new work session:**
|
|
20
|
+
|
|
21
|
+
1. Before any `asrt` call, check whether this repo may have previous Assertion state in `.assertion/`.
|
|
22
|
+
2. If previous Assertion state exists, ask the user: "Do you want to clean up the previous Assertion session and start fresh?"
|
|
23
|
+
3. When the harness supports structured prompts or selectable options, present the question with selectable `Yes` and `No` options. Do not ask the user to type `yes` or `no` unless selectable options are unavailable.
|
|
24
|
+
4. If the user answers yes, run `asrt new` before any other `asrt` command.
|
|
25
|
+
5. If the user answers no, continue with the existing session state.
|
|
26
|
+
6. After the reset decision is resolved, immediately log the active user prompt with `asrt prompt`. Treat the cleanup confirmation itself as a control response, not user intent to record, when it only answers this reset question.
|
|
27
|
+
|
|
28
|
+
This check is the only allowed exception to Rule 1's "first thing" requirement: resolve it before the first `asrt prompt` call, because `asrt new` clears the prompts log. `asrt new` clears the previous session's in-flight state (metadata, prompts log, link, verification status, screenshots) and records the current `HEAD` as the new diff base, so a new session starts clean on the current branch and anchors to the stack you pick on the first checkpoint. Do not run `asrt new` without explicit user consent — it resets the session.
|
|
20
29
|
|
|
21
30
|
Treat `.assertion/metadata.json`, `.assertion/prompts`, and `.assertion/base_sha` as internal state owned by the CLI. Do not create, edit, or delete those files manually — use `asrt prompt` to append to the prompts log and `asrt new` to reset for a fresh session.
|
|
22
31
|
|
|
@@ -32,6 +41,8 @@ Treat `.assertion/metadata.json`, `.assertion/prompts`, and `.assertion/base_sha
|
|
|
32
41
|
asrt prompt "<exact text of the user's message>"
|
|
33
42
|
```
|
|
34
43
|
|
|
44
|
+
Exception: on the first user turn of a new work session, perform the Preflight fresh-session check first. If the user approves a reset, run `asrt new` before `asrt prompt`; otherwise skip the reset. Once that decision is resolved, immediately run `asrt prompt` for the active user message so the new/current session records the user's intent. If the only separate user message during preflight is a plain reset confirmation, do not record that confirmation as its own prompt.
|
|
45
|
+
|
|
35
46
|
This applies to **every user turn**, not just the first. It applies even when the message is a one-word direction change ("nope"), a clarification ("use Postgres, not SQLite"), or a follow-up after verify ("also add dark mode").
|
|
36
47
|
|
|
37
48
|
**Why:** The prompts log is the verifier's source of truth for what the user asked for and how their direction evolved. It is shipped with every checkpoint and the final verify, and persisted in the verification database. A missed turn causes the verifier to flag legitimate work as off-spec because it cannot see the intent change that authorized the work.
|
|
@@ -178,8 +178,37 @@ def test_init_skill_prompts_before_new_session_cleanup(
|
|
|
178
178
|
skill = (
|
|
179
179
|
tmp_path / ".agents" / "skills" / "assertion-cli" / "SKILL.md"
|
|
180
180
|
).read_text()
|
|
181
|
-
assert "
|
|
182
|
-
assert
|
|
181
|
+
assert "First command sequence for a new work session" in skill
|
|
182
|
+
assert (
|
|
183
|
+
'ask the user: "Do you want to clean up the previous Assertion session '
|
|
184
|
+
'and start fresh?"'
|
|
185
|
+
) in skill
|
|
186
|
+
assert (
|
|
187
|
+
"present the question with selectable `Yes` and `No` options"
|
|
188
|
+
) in skill
|
|
189
|
+
assert (
|
|
190
|
+
"Do not ask the user to type `yes` or `no` unless selectable options "
|
|
191
|
+
"are unavailable"
|
|
192
|
+
) in skill
|
|
193
|
+
assert (
|
|
194
|
+
"resolve it before the first `asrt prompt` call, because `asrt new` clears "
|
|
195
|
+
"the prompts log"
|
|
196
|
+
) in skill
|
|
197
|
+
assert (
|
|
198
|
+
"If the user answers yes, run `asrt new` before any other `asrt` command"
|
|
199
|
+
) in skill
|
|
200
|
+
assert (
|
|
201
|
+
"After the reset decision is resolved, immediately log the active user prompt "
|
|
202
|
+
"with `asrt prompt`"
|
|
203
|
+
) in skill
|
|
204
|
+
assert (
|
|
205
|
+
"Treat the cleanup confirmation itself as a control response, not user intent "
|
|
206
|
+
"to record"
|
|
207
|
+
) in skill
|
|
208
|
+
assert (
|
|
209
|
+
"If the only separate user message during preflight is a plain reset "
|
|
210
|
+
"confirmation, do not record that confirmation as its own prompt"
|
|
211
|
+
) in skill
|
|
183
212
|
assert "Do not run `asrt new` without explicit user consent" in skill
|
|
184
213
|
assert "After the PR marker is confirmed" in skill
|
|
185
214
|
assert "clean up the completed Assertion session" in skill
|
|
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
|
|
File without changes
|