assertion-cli 0.5.14__tar.gz → 0.5.15__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.
Files changed (33) hide show
  1. {assertion_cli-0.5.14 → assertion_cli-0.5.15}/PKG-INFO +1 -2
  2. {assertion_cli-0.5.14 → assertion_cli-0.5.15}/README.md +0 -1
  3. {assertion_cli-0.5.14 → assertion_cli-0.5.15}/assertion_cli.egg-info/PKG-INFO +1 -2
  4. {assertion_cli-0.5.14 → assertion_cli-0.5.15}/main.py +2 -1
  5. {assertion_cli-0.5.14 → assertion_cli-0.5.15}/pyproject.toml +1 -1
  6. {assertion_cli-0.5.14 → assertion_cli-0.5.15}/templates/AGENTS.md +2 -2
  7. {assertion_cli-0.5.14 → assertion_cli-0.5.15}/templates/SKILL.md +21 -8
  8. {assertion_cli-0.5.14 → assertion_cli-0.5.15}/tests/test_install.py +9 -0
  9. {assertion_cli-0.5.14 → assertion_cli-0.5.15}/tests/test_session_start.py +20 -0
  10. {assertion_cli-0.5.14 → assertion_cli-0.5.15}/api.py +0 -0
  11. {assertion_cli-0.5.14 → assertion_cli-0.5.15}/assertion_cli.egg-info/SOURCES.txt +0 -0
  12. {assertion_cli-0.5.14 → assertion_cli-0.5.15}/assertion_cli.egg-info/dependency_links.txt +0 -0
  13. {assertion_cli-0.5.14 → assertion_cli-0.5.15}/assertion_cli.egg-info/entry_points.txt +0 -0
  14. {assertion_cli-0.5.14 → assertion_cli-0.5.15}/assertion_cli.egg-info/requires.txt +0 -0
  15. {assertion_cli-0.5.14 → assertion_cli-0.5.15}/assertion_cli.egg-info/top_level.txt +0 -0
  16. {assertion_cli-0.5.14 → assertion_cli-0.5.15}/bundle.py +0 -0
  17. {assertion_cli-0.5.14 → assertion_cli-0.5.15}/credentials.py +0 -0
  18. {assertion_cli-0.5.14 → assertion_cli-0.5.15}/git.py +0 -0
  19. {assertion_cli-0.5.14 → assertion_cli-0.5.15}/link.py +0 -0
  20. {assertion_cli-0.5.14 → assertion_cli-0.5.15}/models.py +0 -0
  21. {assertion_cli-0.5.14 → assertion_cli-0.5.15}/session.py +0 -0
  22. {assertion_cli-0.5.14 → assertion_cli-0.5.15}/setup.cfg +0 -0
  23. {assertion_cli-0.5.14 → assertion_cli-0.5.15}/templates/__init__.py +0 -0
  24. {assertion_cli-0.5.14 → assertion_cli-0.5.15}/tests/test_api.py +0 -0
  25. {assertion_cli-0.5.14 → assertion_cli-0.5.15}/tests/test_auth.py +0 -0
  26. {assertion_cli-0.5.14 → assertion_cli-0.5.15}/tests/test_bundle.py +0 -0
  27. {assertion_cli-0.5.14 → assertion_cli-0.5.15}/tests/test_credentials.py +0 -0
  28. {assertion_cli-0.5.14 → assertion_cli-0.5.15}/tests/test_decision.py +0 -0
  29. {assertion_cli-0.5.14 → assertion_cli-0.5.15}/tests/test_git.py +0 -0
  30. {assertion_cli-0.5.14 → assertion_cli-0.5.15}/tests/test_link.py +0 -0
  31. {assertion_cli-0.5.14 → assertion_cli-0.5.15}/tests/test_main.py +0 -0
  32. {assertion_cli-0.5.14 → assertion_cli-0.5.15}/tests/test_prompt.py +0 -0
  33. {assertion_cli-0.5.14 → assertion_cli-0.5.15}/tests/test_session.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: assertion-cli
3
- Version: 0.5.14
3
+ Version: 0.5.15
4
4
  Summary: CLI for the Assertion API
5
5
  Requires-Python: >=3.13
6
6
  Description-Content-Type: text/markdown
@@ -42,7 +42,6 @@ After installation:
42
42
  asrt install # one-time onboarding: write skill files, AGENTS.md/CLAUDE.md pointer, .gitignore
43
43
  asrt login # authenticate this repo (generate a token at Settings → Authentication)
44
44
  asrt session start # per work session: record the diff base (current HEAD)
45
- asrt new # reset local run state for a fresh session
46
45
  asrt stacks
47
46
  asrt checkpoint --stack <stack-id> "Implemented X\nUpdated Y"
48
47
  asrt checkpoint --continue "Implemented Y"
@@ -29,7 +29,6 @@ After installation:
29
29
  asrt install # one-time onboarding: write skill files, AGENTS.md/CLAUDE.md pointer, .gitignore
30
30
  asrt login # authenticate this repo (generate a token at Settings → Authentication)
31
31
  asrt session start # per work session: record the diff base (current HEAD)
32
- asrt new # reset local run state for a fresh session
33
32
  asrt stacks
34
33
  asrt checkpoint --stack <stack-id> "Implemented X\nUpdated Y"
35
34
  asrt checkpoint --continue "Implemented Y"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: assertion-cli
3
- Version: 0.5.14
3
+ Version: 0.5.15
4
4
  Summary: CLI for the Assertion API
5
5
  Requires-Python: >=3.13
6
6
  Description-Content-Type: text/markdown
@@ -42,7 +42,6 @@ After installation:
42
42
  asrt install # one-time onboarding: write skill files, AGENTS.md/CLAUDE.md pointer, .gitignore
43
43
  asrt login # authenticate this repo (generate a token at Settings → Authentication)
44
44
  asrt session start # per work session: record the diff base (current HEAD)
45
- asrt new # reset local run state for a fresh session
46
45
  asrt stacks
47
46
  asrt checkpoint --stack <stack-id> "Implemented X\nUpdated Y"
48
47
  asrt checkpoint --continue "Implemented Y"
@@ -469,7 +469,8 @@ def session_start(
469
469
 
470
470
  typer.echo("")
471
471
  typer.echo("The coding agent will now follow the Assertion workflow:")
472
- typer.echo(' - asrt prompt "<msg>" on every user turn')
472
+ typer.echo(' - in non-Plan mode, asrt prompt "<msg>" for each user turn')
473
+ typer.echo(' - when starting from a finalized plan, log it with asrt prompt')
473
474
  typer.echo(" - asrt checkpoint at trajectory-feedback moments")
474
475
  typer.echo(" - asrt verify at completion, then PR")
475
476
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "assertion-cli"
7
- version = "0.5.14"
7
+ version = "0.5.15"
8
8
  description = "CLI for the Assertion API"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.13"
@@ -5,9 +5,9 @@ This repo uses the Assertion CLI (`asrt`) to track user intent and verify your w
5
5
  - **Claude Code** — [`.claude/skills/assertion-cli/SKILL.md`](.claude/skills/assertion-cli/SKILL.md)
6
6
  - **Codex / Cursor** — [`.agents/skills/assertion-cli/SKILL.md`](.agents/skills/assertion-cli/SKILL.md)
7
7
 
8
- Both files are byte-identical — read whichever your agent loads (or either one directly). In brief, follow these three rules for every conversation:
8
+ Both files are byte-identical — read whichever your agent loads (or either one directly). In brief, follow these three rules in non-Plan mode:
9
9
 
10
- 1. **Every user message:** call `asrt prompt "<exact text of the message>"` before doing any other work for that turn. Apply to every user turn, not just the first.
10
+ 1. **Prompts:** do not call `asrt prompt` during Plan Mode. When implementation begins from a finalized plan, record that plan with `asrt prompt "<finalized plan text>"`; after that, call `asrt prompt "<exact text of the message>"` for each non-Plan user turn before doing other work.
11
11
  2. **Checkpoint at trajectory-feedback moments** with `asrt checkpoint` — a handful across a feature build, not one per file.
12
12
  3. **Verify, then PR with the session marker.** At completion, run `asrt verify` and poll `asrt verify-status` until clean. Then open the PR and embed the hidden session marker — `$(asrt get-link)`, an HTML comment — in its body.
13
13
 
@@ -1,14 +1,20 @@
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 whose body embeds the hidden Assertion session marker. 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 non-Plan user messages and finalized implementation plans with `asrt prompt`, checkpoint at trajectory-feedback moments (not on every change), and verify only at completion before opening a PR whose body embeds the hidden Assertion session marker. Applies to any coding agent reading this skill.
4
4
  ---
5
5
 
6
6
  # Assertion CLI
7
7
 
8
- You are operating in a repo that uses the Assertion CLI (`asrt`) to track user intent and verify your work. Follow the three rules below without exception. They apply regardless of which coding agent harness you are running under (Claude Code, Codex, Cursor, etc.).
8
+ You are operating in a repo that uses the Assertion CLI (`asrt`) to track user intent and verify your work. Follow the three rules below without exception in non-Plan mode. They apply regardless of which coding agent harness you are running under (Claude Code, Codex, Cursor, etc.).
9
9
 
10
10
  This skill is operational, not advisory. Treat each rule as a hard requirement unless the underlying service is unavailable.
11
11
 
12
+ ## Plan Mode boundary
13
+
14
+ When the harness is in Plan Mode, do not run `asrt prompt`, `asrt checkpoint`, `asrt verify`, or PR commands. Plan Mode is for producing a plan, not for mutating Assertion session state.
15
+
16
+ When the harness leaves Plan Mode and begins implementation from a finalized plan, first record that plan with `asrt prompt "<finalized plan text>"`. Then proceed with the non-Plan workflow below, including logging any later user messages as they arrive.
17
+
12
18
  ## Preflight (one-time per session)
13
19
 
14
20
  Before any `asrt` call:
@@ -21,7 +27,8 @@ Before any `asrt` call:
21
27
  **First command sequence for a new work session:**
22
28
 
23
29
  1. Run `asrt session start` to start fresh. This clears previous in-flight Assertion state (metadata, prompts log, link, verification status, screenshots) and records the current verification base.
24
- 2. Immediately log the active user prompt with `asrt prompt`.
30
+ 2. If starting from a finalized Plan Mode plan, immediately log that plan with `asrt prompt`.
31
+ 3. Otherwise, immediately log the active non-Plan user prompt with `asrt prompt`.
25
32
 
26
33
  Treat `.assertion/metadata.json`, `.assertion/prompts`, and `.assertion/verify_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 session start` to reset for a fresh session.
27
34
 
@@ -29,17 +36,23 @@ Treat `.assertion/metadata.json`, `.assertion/prompts`, and `.assertion/verify_b
29
36
 
30
37
  ---
31
38
 
32
- ## Rule 1 — Log every user message, immediately
39
+ ## Rule 1 — Log non-Plan user messages and finalized plans, immediately
33
40
 
34
- **The first thing you do when a new user message arrives — before reading any file, planning, or editing anything — is run:**
41
+ **In non-Plan mode, the first thing you do when a new user message arrives — before reading any file, planning, or editing anything — is run:**
35
42
 
36
43
  ```
37
44
  asrt prompt "<exact text of the user's message>"
38
45
  ```
39
46
 
40
- Exception: on the first user turn of a new work session, perform the Preflight fresh-session check first by running `asrt session start`, then immediately run `asrt prompt` for the active user message so the new/current session records the user's intent.
47
+ Plan Mode exception: if the harness is currently in Plan Mode, do not call `asrt prompt` for each planning turn. When implementation begins from the finalized plan, record the plan itself as the first prompt:
48
+
49
+ ```
50
+ asrt prompt "<finalized plan text>"
51
+ ```
52
+
53
+ Fresh-session exception: on the first non-Plan user turn of a new work session, perform the Preflight fresh-session check first by running `asrt session start`, then immediately run `asrt prompt` for the active user message or finalized plan so the new/current session records the user's intent.
41
54
 
42
- 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").
55
+ Outside Plan Mode, 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").
43
56
 
44
57
  **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.
45
58
 
@@ -207,7 +220,7 @@ A missing marker is a **blocking error**, not a warning: do not consider the PR
207
220
  ## Quick reference
208
221
 
209
222
  ```
210
- asrt prompt "<message>" # every user turn, before anything else
223
+ asrt prompt "<message>" # non-Plan user turn or finalized plan, before work
211
224
  asrt session start [--from <ref>] # start fresh; optional explicit verification base
212
225
  asrt stacks # list every stack — read once before first checkpoint
213
226
  asrt checkpoint --stack <id> "..." # first checkpoint of a session
@@ -47,6 +47,9 @@ def test_install_writes_agent_doc_pointers(tmp_path: Path, monkeypatch) -> None:
47
47
  assert main._AGENT_BLOCK_END in text
48
48
  assert "assertion-cli" in text
49
49
  assert "asrt prompt" in text
50
+ assert "do not call `asrt prompt` during Plan Mode" in text
51
+ assert "finalized plan" in text
52
+ assert "**Every user message:**" not in text
50
53
 
51
54
 
52
55
  def test_install_preserves_existing_agent_doc_content(
@@ -132,6 +135,12 @@ def test_install_records_skill_cleanup_guidance(tmp_path: Path, monkeypatch) ->
132
135
  skill = (tmp_path / ".agents" / "skills" / "assertion-cli" / "SKILL.md").read_text()
133
136
  assert "First command sequence for a new work session" in skill
134
137
  assert "`asrt session start`" in skill
138
+ assert "## Plan Mode boundary" in skill
139
+ assert (
140
+ "do not run `asrt prompt`, `asrt checkpoint`, `asrt verify`, or PR commands"
141
+ in skill
142
+ )
143
+ assert 'asrt prompt "<finalized plan text>"' in skill
135
144
  assert "`asrt new`" not in skill
136
145
 
137
146
 
@@ -66,6 +66,26 @@ def test_session_start_does_not_write_skill_or_agent_files(
66
66
  assert not (tmp_path / "AGENTS.md").exists()
67
67
 
68
68
 
69
+ def test_session_start_prints_non_plan_prompt_workflow(
70
+ tmp_path: Path, monkeypatch
71
+ ) -> None:
72
+ _init_repo(tmp_path)
73
+ monkeypatch.chdir(tmp_path)
74
+
75
+ result = runner.invoke(main.app, ["session", "start"])
76
+ assert result.exit_code == 0, result.stderr
77
+
78
+ assert (
79
+ 'in non-Plan mode, asrt prompt "<msg>" for each user turn'
80
+ in result.stdout
81
+ )
82
+ assert (
83
+ "when starting from a finalized plan, log it with asrt prompt"
84
+ in result.stdout
85
+ )
86
+ assert 'asrt prompt "<msg>" on every user turn' not in result.stdout
87
+
88
+
69
89
  def test_session_start_resets_assertion_state_but_keeps_seed_trackable(
70
90
  tmp_path: Path, monkeypatch
71
91
  ) -> None:
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes