Skip to content

feat(skill): agent first-run experience and the Claude Code live strip - #195

Open
siddhant573 wants to merge 11 commits into
LambdaTest:mainfrom
siddhant573:feat/agent-first-run
Open

siddhant573 wants to merge 11 commits into
LambdaTest:mainfrom
siddhant573:feat/agent-first-run

Conversation

@siddhant573

@siddhant573 siddhant573 commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

Makes the first agent-driven kane-cli run feel watched instead of waited on. Today the skill launches kane-cli with one blocking call, so a first-time user sees one line and then silence for 30 seconds to several minutes. This change adds a ready check, a run with nothing asked first, a short tour read during the wait, richer result cards, three choices asked once afterwards, and a live status strip for Claude Code.

Everything ships from this repo (skill, scripts shipped with the skill, npm installer). No kane-cli change is needed. The live strip needs kane-cli 0.8.17 or newer.

#194 is merged and main is merged into this branch, so the diff shows only this work.

What changes for the person

  1. Ready check. One short preflight script, one card: signed in, credits, Chrome, their own app if it is running locally, and where results will be saved. Full card on the first session, one line afterwards. Every problem is shown at once with its fix. The agent starts browser sign-in itself and never asks for an access key in chat.
  2. Run first, ask after. Run one uses detected defaults (browser visible unless there is no display, SSH, or CI). Nothing is asked before the first result.
  3. A tour during the wait. Sent with the launch line on the first run only: runs, authoring, replays, assurance, Test Manager, evidence, with links to the user guide. Same wording in every agent.
  4. Result cards. The existing emoji table gains credits, evidence, test case and next-move rows, plus cards for didn't start, stopped early, possible product bug, saved test, and suite (with a failed-tests table and cloud grid rows).
  5. Three choices, asked once, after the first result: watch mode, where results go, one-off or saved suite. Saved in ~/.testmuai/kaneai/agent-config/config.json, read and written by the agent through the shell. Changing where results go is global, and the question says so.
  6. Live strip (Claude Code). One status line that names the current step while a run works. It wraps the person's existing status line, shows only during a run and for five minutes after, shows only in the Claude Code session that started the run (other sessions in the same project stay untouched), reads only local files, and never echoes typed text. It is never on by default: Claude Code asks once, as a recommended choice, after the person's first result in it (in any session, since onboarding may have happened in another agent), and the installer asks the same question only when a person runs it by hand in a terminal. npx @testmuai/kane-cli-skill strip enable turns it on, and strip disable undoes it exactly.

What is in the diff

  • Skill (skill-installer/skills/, mirrored byte for byte to .claude/ and .agents/): SKILL.md section 1 rewritten, five new references (ready-check, first-run, agent-config, cards, live-strip), scripts/preflight.sh and preflight.ps1. The agent tag is now inline on every command, because an exported variable does not survive between shell calls in agent hosts.
  • References corrected against the real 0.8.17 stream: stream_start, v and ts on every line, credits_consumed (was documented as credits), the saved-test event table (step headings, replay versus authoring), suite log_path and failure, testrun_progress, and "do not pass --stream-members by default". folders list and folders create require --project (the reference said otherwise).
  • Installer: prefs, strip enable|disable|status, a welcome at the end of install, seeding of the agent config folder, the strip reader (strip/kane-strip.mjs). Zero dependencies.
  • Docs: new docs/user-guide/agents.md, linked from the guide index and the README.
  • Kiro: power and steering files mirror the canonical skill, with a new first-run steering file. The strip is noted as Claude Code only.
  • CI: a new workflow runs the installer suite on ubuntu, macos and windows with Node 18 and 22, checks the three skill copies are identical, and checks the npm package contents. The publish workflow runs npm test before publishing.
  • Test guide: skill-installer/TESTING.md lists what CI covers and gives the manual matrix of hosts, operating systems and numbered cases to walk before a release.

Test plan

  • cd skill-installer && npm test: 73 tests pass on macOS and Linux, 63 plus 14 POSIX-only skips on Windows (strip reader, installer helpers, preflight), driven by sanitized captures from kane-cli 0.8.17-beta.1 (run, saved test authored and replayed, two-test suite with a failure)
  • Real preflight run: 1.7 s, all sections correct
  • Live check against a real headless run: the strip ticked through the steps, ended on ✓ passed · 5 steps · 0:54 · 16 credits, and showed nothing for a different project
  • Installer smoke test in a throwaway home: install, seed, welcome, strip enable then strip disable restores settings
  • Local first-run test in a real Claude Code session: install, strip enable wrapping an existing custom status line, ready card, tour, named run, result card with evidence viewer and test case links, three choices saved, project change flow (new project and folder created, next run landed in it)
  • Session isolation, live: with a run in flight the launching session showed the strip through to passed, while a reader under a different host process showed only the person's own status line
  • npm pack --dry-run: lib/, strip/, skills/scripts/ included, tests excluded
  • The three skill roots are identical (diff -r)
  • preflight.ps1 on real Windows: four Windows-only tests run it under PowerShell against a stand-in kane-cli.cmd in CI, all six OS and Node jobs green
  • Installer question in a real pseudo-terminal: n leaves settings untouched and records that the person was asked, Enter turns the strip on with a backup, an unattended install never asks
  • Real Codex CLI sessions (later session, then a true first session), read back from Codex's own session log
  • The strip in a real Claude Code status bar: seen live with an existing custom status line wrapped, which is how the one-strip-per-session issue was found
  • The per-session fix re-checked by eye across several open Claude Code sessions (so far verified by running the reader under two different host processes during a live run)
  • Cloud grid stream additions (documented from the CLI design, not from a capture)
  • A first-run pass on Gemini CLI, OpenCode and Hermes, and every host on Windows (Codex CLI on macOS is done)

Notes for reviewers

  • Two fixes came from running real agents. Codex's question tool posts the questions and returns before the person answers, so the first run now saves its defaults right after the result card and again when answers arrive, and the choices are the last thing in the turn. And because onboarding is shared by every agent while the strip is Claude Code only, the strip question has its own once-only trigger in SKILL.md section 1 instead of riding on the first session.
  • Found while testing, needs a kane-cli fix: kane-cli config project <id> and config folder <id> save the new ids but leave the old project_name and folder_name in the config, even after a run. config show then names the wrong location, and so would the ready card. Runs do land in the new project.
  • Session isolation relies on ps. On Windows the reader falls back to matching by project folder.
  • The strip appears roughly 10 to 30 seconds after launch, once kane-cli has created the session and written its pointer file. Before that the person sees their normal status line.
  • The strip has no target chip (chrome, android, ios): the stream does not name the target yet.
  • Left for later: a finish notification, a per-repo preferred project, just-in-time hints, and the Kiro hook, which still uses the retired --retry flag.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DAoyR4RZRwM2d81a9MCKuU

siddhant573 and others added 11 commits September 21, 2026 14:51
Every session now starts with a ready check: one preflight script call
(scripts/preflight.sh, preflight.ps1) and one ready card. A first session
runs with nothing asked first, sends a short tour with the launch line,
and asks three choices once, after the first result. Preferences live in
~/.testmuai/kaneai/agent-config/, read and written by the agent through
the shell, with no kane-cli change.

- SKILL.md section 1 rewritten as "Every session: ready check, launch,
  result card". The agent tag goes inline on every command, because an
  exported variable does not survive between shell calls in agent hosts.
- New references: ready-check, first-run (tour text, verbatim),
  agent-config, cards (every emoji-table card), live-strip.
- Existing references brought up to the real kane-cli 0.8.17 stream:
  stream_start, v and ts on every line, credits_consumed, the saved-test
  event table, suite member log_path and failure, testrun_progress, and
  "do not pass --stream-members by default".
- test-manager: folders list and create require --project, plus the
  global flow for changing where results go.
- Sign-in: the agent runs the browser flow itself and never asks for an
  access key in chat.

The three skill roots are byte-identical.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DAoyR4RZRwM2d81a9MCKuU
…der, tests

- install now seeds the agent config folder and ends with a welcome.
- prefs --watch --purpose [--narration] is the fallback setter for hosts
  that refuse a write outside the project.
- strip enable|disable|status turns the Claude Code live strip on and
  off. Enable backs up settings.json, remembers the person's own status
  line and wraps it. Disable restores it exactly.
- strip/kane-strip.mjs is the reader: it finds live runs through the
  active-run pointer, tails events.ndjson, and prints one line for run,
  test and suite. Typed text is never echoed. Needs kane-cli 0.8.17+.
- 64 tests on node:test with zero dependencies, driven by sanitized
  captures from kane-cli 0.8.17-beta.1. The publish workflow runs them
  before publishing.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DAoyR4RZRwM2d81a9MCKuU
- New user guide page: what the agent does on a first run, saved
  preferences, where results are saved, the live status strip, and what
  leaves the machine. Linked from the guide index and the README.
- Kiro power mirrors the canonical skill: every-session ready check,
  first-run steering file, emoji-table cards, the 0.8.17 stream, and the
  folders --project fix. The live strip is noted as Claude Code only.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DAoyR4RZRwM2d81a9MCKuU
…arted the run

The reader matched runs by project folder, so every Claude Code session
open in the same project showed the strip. Each session is its own
process, and it starts both its status line command and, through its
shell, kane-cli. The reader now reads the process table once per refresh
(only when a live run for the project has to be checked), finds its own
host process as the first ancestor that is not a shell, and keeps a run
only when the run descends from that same process.

Finished runs are remembered per session id instead of per project, so
the "passed" line also stays in the session that ran it. Where the
process table cannot be read (no ps, as on Windows) the reader falls
back to project matching. A run started by hand in a terminal is no
longer shown.

Verified live: with a real run in flight, the launching session showed
the strip through to "passed" while a reader under a different host
process showed only the person's own status line.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DAoyR4RZRwM2d81a9MCKuU
With purpose "suite" or "ask" the skill offered to keep passing runs as
saved tests, but only the first run was launched with --name. A run
launched without a name is not recorded, so keeping it meant running it
again. The skill now says to add --name to every one-off run for those
two purposes, and to remove the test file when the person declines.
Mirrored to the Kiro first-run steering file.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DAoyR4RZRwM2d81a9MCKuU
…n by default

The strip stays off until the person says yes. In Claude Code it is now
the fourth choice after the first result, with "Turn it on (Recommended)"
first and a plain description of what changes. The agent records that it
asked, so it never asks twice.

The installer asks the same question when a person runs it by hand in a
terminal (Enter takes the recommended yes, a missing answer is a no). An
unattended install never asks and never turns it on: no TTY, CI, no
Claude Code, or already asked all skip it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DAoyR4RZRwM2d81a9MCKuU
New workflow runs the skill installer suite on ubuntu, macos and windows
with Node 18 and 22, checks that the three skill copies are identical,
and checks the npm package contents.

preflight.sh tests skip on Windows, where a new Windows-only test runs
preflight.ps1 for real against a stand-in kane-cli.cmd: section order,
a missing CLI, the mobile and grid flags, saved preferences, and the
saved-test count.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DAoyR4RZRwM2d81a9MCKuU
…nual host matrix

Lists what the cross-OS workflow covers, and gives the manual matrix a
person walks before a release: hosts (how each finds the skill, how it
asks, sandbox notes), the reset to a first session, and numbered cases
for install, ready check, first run, later sessions, result cards,
changing where results go, the live strip, and sessions with nobody
present.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DAoyR4RZRwM2d81a9MCKuU
…s last

Found with Codex: its question tool posts the questions and returns
straight away with no answers. The skill only saved preferences after
answers, so the turn ended with nothing written, the next session would
have repeated the tour, and the questions sat above the result card
where they were easy to miss.

The first run now saves twice. Right after the result card it writes
the config with the defaults that run used, so the tour and the choices
never repeat whatever happens next. When answers arrive, in the same
turn or as the person's next message, it writes again. The choices are
now the last thing in the turn, and a host that hands control back
early ends its turn there. If the next message is about something else,
the defaults stay and nothing is asked again.

Mirrored to the Kiro first-run steering file. TESTING.md gains cases
for both saves and for ignoring the choices.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DAoyR4RZRwM2d81a9MCKuU
…ot only the first

Found by running Codex first and Claude Code second. Onboarding is
shared by every agent, but the live strip exists only in Claude Code.
The strip question was tied to the first session, so once another agent
had completed onboarding, Claude Code took the later-session path and
never asked.

The question now has its own once-only trigger in SKILL.md section 1,
where every session reads it: in Claude Code, whenever the agent config
has no strip.claude-code.offered_at and the strip's needs are met, ask
once after that session's first result card. On a first session it
still rides along as the fourth choice. TESTING.md gains case G1b.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DAoyR4RZRwM2d81a9MCKuU
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant