docs, skill: an unresolved variable warns and the run goes ahead (kane-cli 0.8.15+) - #197
Merged
shravan-lambdatest merged 11 commits intoSep 29, 2026
Conversation
… are never checked
…it at 0.8.15
The pre-run variable check warns and the run goes ahead, typing the name as written unless a step sets it first. Every passage now says that in one plain sentence instead of contrasting it with a refusal. The behaviour is gated at kane-cli 0.8.15+; the 0.8.12+ gate stays only on what shipped then (values, design declarations).
Corrections found while checking each passage against the CLI:
- parsing.md: restore the note that ask_user never fires when stdin is not a TTY; add the not_a_dataset_column reason.
- testrun.md: testrun_plan members carry unresolved?; the parsing loop handles the warning.
- cards.md: missing variable values are no longer an exit-2 cause; a run that carried the warning gets a Variables row.
- user guide: the dry run prints the warning too; CI can fail the step on the warning line; drop the ${x} sentence.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… not say
- A testrun preflight checks every step of a member, replayed ones included; run and testmd run skip replayed steps.
- An invalid plan can still be followed by the warning before the process exits.
- ask_user is disabled by a non-TTY stdin, not by being a subprocess.
- A Variables row on the card names the variables; it does not claim they were typed.
- A frontmatter declaration counts as a value even when empty.
- ${x} is a dataset column reference; a name that is no column of the run's dataset row gets its own warning, and the reason list says so.
- The parsing loop keys on the warning code, so other warning codes stay ignorable.
- CI: the warning does not change the exit code by itself; a step that fails on the literal text still fails the job.
- The receipt says "Add it to <file>" when the pool file exists.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
variables_declared arrives in the tests phase just before that phase's commit event. variables_summary arrives after session_complete on a clean completion only, lists every name the run declared without re-checking the pool, and never arrives on a paused or refused run, so a pause leaves variables_declared as the only source for the to-do. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…cases always through assurance - SKILL.md §3 gains one recipe for the moment a run needs values: collect the names (the warning, a dry-run plan's unresolved rows, a design run's declared variables), write the values you already have from the user or the requirement document into the file and say so, ask once for the rest using each variable's description (plain values here or in the file, secret-looking ones in the file only), run when the check is quiet. The assurance references point at it, and the design page says how an agent fills and asks. - Every testrun run line ends in < /dev/null (bash and zsh; < NUL in cmd.exe; through cmd from PowerShell). The first stdout line must be stream_start; anything else is terminal mode, which waits for a keypress after the suite and never exits on its own. - Test-case authoring has one path: the assurance commands. A description given in chat is written to a requirements file, ingested and designed from; the generate routing, section and its two references are gone from the skill. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…nal path
kane-cli testrun run takes explicit *_test.md files as positional paths and rejects a directory ("not a *_test.md file"). Every example that passed tests/app/, tests/ios/, tests/web/ or tests/ now selects with --match '^tests/…/' on the project-relative path.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…by name, terminal mode described exactly - The fill-variables recipe is a numbered list. The check before a run is a fresh dry run of the exact selection with no warning; design rows only list what design declared. A row with secret: true or a description naming a credential is a secret, not only a secret-looking name; the user fills it in the file and says when done, and the agent reports names and paths only. No placeholder is filled to silence the check, and an empty frontmatter value also silences it. A missing value is asked for before the run regardless of the first-run rule. - Terminal mode: on 0.8.17+ the first stdout line is stream_start; a prose plan means terminal mode, which after a real run opens an evidence table that waits until q or Esc; an empty stdout with a stderr message is a usage error. - Section 6 uses the chat description as the requirement, names both review checkpoints, and says what a chat draft and a hand-written test lack. - Remaining command forms with flags carry the redirect; --match sees the path as the OS writes it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The CLI already handles ask_user in agent mode; the section heading says when a response applies. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… on cmd.exe, frontmatter in the guide's list - SKILL.md §3: the never-checked list and the numbers-and-booleans rule sit with the contract paragraph again, and the fill-variables recipe starts its own paragraph. - The --match note says cmd.exe needs double quotes around the regex. - The user guide's never-checked list names a test's own frontmatter declarations again, empty value included. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The skill and the user guide describe the pre-run variable check as a refusal: an unresolved
{{name}}stops the run with exit2and oneerrorevent, and atestrunmember that references one fails preflight. Since kane-cli 0.8.15 the check warns and the run goes ahead: onewarningevent withcode: "unresolved_variables", exit codes unchanged, the plan stays valid, and the name is typed into the page as written unless a step sets it first. An agent following the documented contract either stops for a refusal that never comes, or dispatches a run that types the placeholder literally.Change
The variable check, described as it behaves
warningevent is documented in the events tables (SKILL.md,references/parsing.md) with its schema:code,message,suggested_file, andvariables[]rows withname,reason(value_missing,not_declared,not_a_dataset_column),file,used_by[]. It arrives before the first progress frame onrunandtestmd run, and right aftertestrun_planontestrun run.testrun_planmembers carryunresolved[]and the plan staysvalid; a suite preflight checks every step of a member, replayed ones included, whilerunandtestmd runskip replayed steps. Theunresolved_variablespreflight failure is gone fromreferences/testrun.mdand the user guide, and the parsing loop handles the warning.{{global.*}}reference, which resolves from Test Manager at run time.references/cards.md: missing variable values are no longer an exit-2 cause; a run whose output carried the warning gets a Variables row on its card.variables-and-context,running-tests,testrun(the dry run prints the warning too),testmd/running,cicd(how to fail a CI step on the warning line),troubleshooting,assurance/design.skill-installer/skills,.claude/skills/kane-cli,.agents/skills/kane-cli) stay byte-identical.What an agent does about it
warning, a dry-run plan'sunresolved[]rows, a design run'svariables_declaredandvariables_summaryrows); write the values you already have, from the user or the requirement document, into the file and say so; ask once for the rest using each variable'sdescription, plain values here or in the file, secret-looking ones in the file only; then a fresh dry run of the exact selection with no warning is the check, and a member whose rows are all filled may run while the others wait. A row withsecret: trueor a credential in its description is a secret as much as a secret-looking name; no placeholder is filled to silence the check. The assurance references point at it, and the design page says how an agent fills and asks.variables_declaredis documented as arriving just before the tests phase'scommitevent, andvariables_summaryonly aftersession_completeon a clean completion, listing every name the run declared.testrun runfrom an agenttestrun runline an agent writes ends in< /dev/null(bash and zsh;< NULin cmd.exe; through cmd from PowerShell). On 0.8.17+ the first stdout line isstream_start; a prose plan there means terminal mode, which shows the human view and, after a real run, waits on an evidence table untilqor Esc. An empty stdout with a stderr message is a usage error. All examples carry the redirect.testrun runtakes_test.mdfiles); everytests/app/-style example now selects with--match '^tests/app/'.Test cases always come from the assurance commands
kane-cli generate: the routing lines, the section and its two reference files are gone. A description given in chat is written torequirements/<feature>.md, ingested and designed from (new §6). The user guide's generate pages are unchanged.Tests
Fresh subagents, each with the skill installed and a shim in front of kane-cli that logs and blocks every paid or irreversible call, before and after the skill changes:
< /dev/null; 1/6 named thestream_startcheckkane-cli generatecontext ingestVerification
kane-cli testrun run .testmuai/tests/login_test.md --dry-run < /dev/nullon kane-cli 0.8.18-beta.1, with one empty stub (demo_pass) and one undeclared name (start_url): stdout isstream_start,testrun_planwithvalid: trueand both names under the member'sunresolved[], then onewarningwithcode: "unresolved_variables",suggested_fileand bothvariables[]rows; exit0; stderr empty. This matches the documented shape field for field.diff -rqbetween the three skill copies is empty.🤖 Generated with Claude Code