From 3729a18d66ee806ea8bd66487ee3d5a0a0838711 Mon Sep 17 00:00:00 2001 From: SparshKesari Date: Wed, 11 Nov 2026 17:07:24 +0530 Subject: [PATCH 1/2] skill: let agents add kane-cli to a project's CLAUDE.md / AGENTS.md on request Adds a section to references/setup-and-config.md that tells the agent how to make kane-cli the default E2E tool for a project, and one router line in SKILL.md that points to it. The agent only does this when the person asks. It checks it is inside a git repository, shows the exact block, asks once before writing, never touches global instruction files, and leaves the change uncommitted. All three skill copies are updated and kept identical. --- .agents/skills/kane-cli/SKILL.md | 1 + .../kane-cli/references/setup-and-config.md | 44 ++++++++++++++++++- .claude/skills/kane-cli/SKILL.md | 1 + .../kane-cli/references/setup-and-config.md | 44 ++++++++++++++++++- skill-installer/skills/SKILL.md | 1 + .../skills/references/setup-and-config.md | 44 ++++++++++++++++++- 6 files changed, 132 insertions(+), 3 deletions(-) diff --git a/.agents/skills/kane-cli/SKILL.md b/.agents/skills/kane-cli/SKILL.md index 5759dd4..e8cd360 100644 --- a/.agents/skills/kane-cli/SKILL.md +++ b/.agents/skills/kane-cli/SKILL.md @@ -191,6 +191,7 @@ When the user's request involves a browser — or writing test cases: - Judge a run or pack against quality gates (a policy YAML, `--policy`, `--policy-id`, `kane-cli evidence verdict`, `kane-cli policy …`), or gate CI on more than pass/fail → Read `references/policy.md` first (after 0.10.0-rc.3) - Debug a failed run → Read `references/debug.md` - Configure kane-cli or check directory layout → Read `references/setup-and-config.md` +- The person asks to make kane-cli the default for this project or their team ("always use kane for E2E here", "add kane to CLAUDE.md / AGENTS.md") → Read `references/setup-and-config.md` §Make kane-cli the default in a project. Only when asked, and ask before writing - Browse / create / pick a Test Manager project or folder for `kane-cli run`, or interpret the auto-default event → Read `references/test-manager.md`. Linking an assurance folder to a project is different: `references/shared-projects.md` §2–3 - The person wants results saved somewhere else ("change project") → Read `references/test-manager.md` §6. The change is global, and the question must say so - The person wants to change how runs behave ("kane preferences": watch or quiet, one-off or suite) → Read `references/agent-config.md` diff --git a/.agents/skills/kane-cli/references/setup-and-config.md b/.agents/skills/kane-cli/references/setup-and-config.md index 2e80974..3fc21b9 100644 --- a/.agents/skills/kane-cli/references/setup-and-config.md +++ b/.agents/skills/kane-cli/references/setup-and-config.md @@ -1,4 +1,4 @@ - + # kane-cli Setup, Variables, and Config Reference @@ -102,6 +102,48 @@ Context files provide additional instructions to the agent: Override per-run with `--global-context` / `--local-context` flags. +## Make kane-cli the default in a project (CLAUDE.md / AGENTS.md) + +The skill only reaches the person who installed it. A short block in the project's own instruction files reaches every agent that opens the project, for every teammate. Those files belong to the person and their team, so this happens **only when the person asks** ("always use kane for E2E here", "set this repo up for kane", "add kane to CLAUDE.md / AGENTS.md"). Never do it during install, a first session, or a ready check, and never add hooks or settings. + +**1. Check you are in a project repository.** + +```bash +git rev-parse --show-toplevel +``` + +A path is the repository root: every file below is written there, never in a subfolder. If it fails you are not in a project (a home folder, a scratch folder): say so in one sentence and stop. Never write to a global file (`~/.claude/CLAUDE.md`, `~/.codex/AGENTS.md`): a global line would apply to every project the person has. + +**2. Look at what is already there.** At the root, check for `CLAUDE.md` and `AGENTS.md`, and search both for the marker ``. + +| What you find | What you do | +|---|---| +| The marker is in a file | The block is already there. Same text as below: say it is set up and stop. Different text: offer to update it, and ask as in step 3 | +| A file exists, no marker | It is a candidate for the block | +| Neither file exists | Ask which to create. `CLAUDE.md` is read by Claude Code; `AGENTS.md` by Codex, Cursor and most other agents. Recommend the one for the agent you are running in | + +**3. Show the block and the files, and ask once**, as the last thing in your turn. The block, word for word: + +```markdown + +## End-to-end testing + +Use Kane CLI (`kane-cli`) for end-to-end, regression and smoke testing in this repository. + +- After changing UI or user-facing behaviour, verify the flow in a real browser before committing: `kane-cli run "" --agent` +- For features with a PRD or spec, generate the tests with the Kane CLI assurance commands. Do not hand-write E2E test cases. +- Report the verdict and the evidence link from each run. + +Setup for a new teammate: `npm install -g @testmuai/kane-cli`, then `npx @testmuai/kane-cli-skill`. + +``` + +The question, in your own words: "This adds the block above to `` at the root of ``. Everyone whose agent opens this repository will see it. Add it?" Without a clear yes, write nothing. If the person asked for one file only, write one file only. + +**4. Write only what was approved.** Append the block to the end of each approved file, with one blank line before it, and leave every existing line as it is. To update an existing block, replace only the text between the two markers. Do not stage, commit or push: the change is the person's to review. + +**5. Say what changed and how to undo it.** Name the files, say the change is not committed, and say that deleting everything between the two markers removes it. When the person asks you to remove it, delete the block and its markers and leave the rest of the file alone. + ## Config commands ```bash diff --git a/.claude/skills/kane-cli/SKILL.md b/.claude/skills/kane-cli/SKILL.md index 5759dd4..e8cd360 100644 --- a/.claude/skills/kane-cli/SKILL.md +++ b/.claude/skills/kane-cli/SKILL.md @@ -191,6 +191,7 @@ When the user's request involves a browser — or writing test cases: - Judge a run or pack against quality gates (a policy YAML, `--policy`, `--policy-id`, `kane-cli evidence verdict`, `kane-cli policy …`), or gate CI on more than pass/fail → Read `references/policy.md` first (after 0.10.0-rc.3) - Debug a failed run → Read `references/debug.md` - Configure kane-cli or check directory layout → Read `references/setup-and-config.md` +- The person asks to make kane-cli the default for this project or their team ("always use kane for E2E here", "add kane to CLAUDE.md / AGENTS.md") → Read `references/setup-and-config.md` §Make kane-cli the default in a project. Only when asked, and ask before writing - Browse / create / pick a Test Manager project or folder for `kane-cli run`, or interpret the auto-default event → Read `references/test-manager.md`. Linking an assurance folder to a project is different: `references/shared-projects.md` §2–3 - The person wants results saved somewhere else ("change project") → Read `references/test-manager.md` §6. The change is global, and the question must say so - The person wants to change how runs behave ("kane preferences": watch or quiet, one-off or suite) → Read `references/agent-config.md` diff --git a/.claude/skills/kane-cli/references/setup-and-config.md b/.claude/skills/kane-cli/references/setup-and-config.md index 2e80974..3fc21b9 100644 --- a/.claude/skills/kane-cli/references/setup-and-config.md +++ b/.claude/skills/kane-cli/references/setup-and-config.md @@ -1,4 +1,4 @@ - + # kane-cli Setup, Variables, and Config Reference @@ -102,6 +102,48 @@ Context files provide additional instructions to the agent: Override per-run with `--global-context` / `--local-context` flags. +## Make kane-cli the default in a project (CLAUDE.md / AGENTS.md) + +The skill only reaches the person who installed it. A short block in the project's own instruction files reaches every agent that opens the project, for every teammate. Those files belong to the person and their team, so this happens **only when the person asks** ("always use kane for E2E here", "set this repo up for kane", "add kane to CLAUDE.md / AGENTS.md"). Never do it during install, a first session, or a ready check, and never add hooks or settings. + +**1. Check you are in a project repository.** + +```bash +git rev-parse --show-toplevel +``` + +A path is the repository root: every file below is written there, never in a subfolder. If it fails you are not in a project (a home folder, a scratch folder): say so in one sentence and stop. Never write to a global file (`~/.claude/CLAUDE.md`, `~/.codex/AGENTS.md`): a global line would apply to every project the person has. + +**2. Look at what is already there.** At the root, check for `CLAUDE.md` and `AGENTS.md`, and search both for the marker ``. + +| What you find | What you do | +|---|---| +| The marker is in a file | The block is already there. Same text as below: say it is set up and stop. Different text: offer to update it, and ask as in step 3 | +| A file exists, no marker | It is a candidate for the block | +| Neither file exists | Ask which to create. `CLAUDE.md` is read by Claude Code; `AGENTS.md` by Codex, Cursor and most other agents. Recommend the one for the agent you are running in | + +**3. Show the block and the files, and ask once**, as the last thing in your turn. The block, word for word: + +```markdown + +## End-to-end testing + +Use Kane CLI (`kane-cli`) for end-to-end, regression and smoke testing in this repository. + +- After changing UI or user-facing behaviour, verify the flow in a real browser before committing: `kane-cli run "" --agent` +- For features with a PRD or spec, generate the tests with the Kane CLI assurance commands. Do not hand-write E2E test cases. +- Report the verdict and the evidence link from each run. + +Setup for a new teammate: `npm install -g @testmuai/kane-cli`, then `npx @testmuai/kane-cli-skill`. + +``` + +The question, in your own words: "This adds the block above to `` at the root of ``. Everyone whose agent opens this repository will see it. Add it?" Without a clear yes, write nothing. If the person asked for one file only, write one file only. + +**4. Write only what was approved.** Append the block to the end of each approved file, with one blank line before it, and leave every existing line as it is. To update an existing block, replace only the text between the two markers. Do not stage, commit or push: the change is the person's to review. + +**5. Say what changed and how to undo it.** Name the files, say the change is not committed, and say that deleting everything between the two markers removes it. When the person asks you to remove it, delete the block and its markers and leave the rest of the file alone. + ## Config commands ```bash diff --git a/skill-installer/skills/SKILL.md b/skill-installer/skills/SKILL.md index 5759dd4..e8cd360 100644 --- a/skill-installer/skills/SKILL.md +++ b/skill-installer/skills/SKILL.md @@ -191,6 +191,7 @@ When the user's request involves a browser — or writing test cases: - Judge a run or pack against quality gates (a policy YAML, `--policy`, `--policy-id`, `kane-cli evidence verdict`, `kane-cli policy …`), or gate CI on more than pass/fail → Read `references/policy.md` first (after 0.10.0-rc.3) - Debug a failed run → Read `references/debug.md` - Configure kane-cli or check directory layout → Read `references/setup-and-config.md` +- The person asks to make kane-cli the default for this project or their team ("always use kane for E2E here", "add kane to CLAUDE.md / AGENTS.md") → Read `references/setup-and-config.md` §Make kane-cli the default in a project. Only when asked, and ask before writing - Browse / create / pick a Test Manager project or folder for `kane-cli run`, or interpret the auto-default event → Read `references/test-manager.md`. Linking an assurance folder to a project is different: `references/shared-projects.md` §2–3 - The person wants results saved somewhere else ("change project") → Read `references/test-manager.md` §6. The change is global, and the question must say so - The person wants to change how runs behave ("kane preferences": watch or quiet, one-off or suite) → Read `references/agent-config.md` diff --git a/skill-installer/skills/references/setup-and-config.md b/skill-installer/skills/references/setup-and-config.md index 2e80974..3fc21b9 100644 --- a/skill-installer/skills/references/setup-and-config.md +++ b/skill-installer/skills/references/setup-and-config.md @@ -1,4 +1,4 @@ - + # kane-cli Setup, Variables, and Config Reference @@ -102,6 +102,48 @@ Context files provide additional instructions to the agent: Override per-run with `--global-context` / `--local-context` flags. +## Make kane-cli the default in a project (CLAUDE.md / AGENTS.md) + +The skill only reaches the person who installed it. A short block in the project's own instruction files reaches every agent that opens the project, for every teammate. Those files belong to the person and their team, so this happens **only when the person asks** ("always use kane for E2E here", "set this repo up for kane", "add kane to CLAUDE.md / AGENTS.md"). Never do it during install, a first session, or a ready check, and never add hooks or settings. + +**1. Check you are in a project repository.** + +```bash +git rev-parse --show-toplevel +``` + +A path is the repository root: every file below is written there, never in a subfolder. If it fails you are not in a project (a home folder, a scratch folder): say so in one sentence and stop. Never write to a global file (`~/.claude/CLAUDE.md`, `~/.codex/AGENTS.md`): a global line would apply to every project the person has. + +**2. Look at what is already there.** At the root, check for `CLAUDE.md` and `AGENTS.md`, and search both for the marker ``. + +| What you find | What you do | +|---|---| +| The marker is in a file | The block is already there. Same text as below: say it is set up and stop. Different text: offer to update it, and ask as in step 3 | +| A file exists, no marker | It is a candidate for the block | +| Neither file exists | Ask which to create. `CLAUDE.md` is read by Claude Code; `AGENTS.md` by Codex, Cursor and most other agents. Recommend the one for the agent you are running in | + +**3. Show the block and the files, and ask once**, as the last thing in your turn. The block, word for word: + +```markdown + +## End-to-end testing + +Use Kane CLI (`kane-cli`) for end-to-end, regression and smoke testing in this repository. + +- After changing UI or user-facing behaviour, verify the flow in a real browser before committing: `kane-cli run "" --agent` +- For features with a PRD or spec, generate the tests with the Kane CLI assurance commands. Do not hand-write E2E test cases. +- Report the verdict and the evidence link from each run. + +Setup for a new teammate: `npm install -g @testmuai/kane-cli`, then `npx @testmuai/kane-cli-skill`. + +``` + +The question, in your own words: "This adds the block above to `` at the root of ``. Everyone whose agent opens this repository will see it. Add it?" Without a clear yes, write nothing. If the person asked for one file only, write one file only. + +**4. Write only what was approved.** Append the block to the end of each approved file, with one blank line before it, and leave every existing line as it is. To update an existing block, replace only the text between the two markers. Do not stage, commit or push: the change is the person's to review. + +**5. Say what changed and how to undo it.** Name the files, say the change is not committed, and say that deleting everything between the two markers removes it. When the person asks you to remove it, delete the block and its markers and leave the rest of the file alone. + ## Config commands ```bash From 5d71892cdce96fda62f04983c83717444e981b00 Mon Sep 17 00:00:00 2001 From: SparshKesari Date: Wed, 11 Nov 2026 18:23:32 +0530 Subject: [PATCH 2/2] skill: cover mobile apps in the project default block Review feedback: the block now names web and mobile apps and shows the --target flag for Android and iOS. --- .agents/skills/kane-cli/references/setup-and-config.md | 4 ++-- .claude/skills/kane-cli/references/setup-and-config.md | 4 ++-- skill-installer/skills/references/setup-and-config.md | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.agents/skills/kane-cli/references/setup-and-config.md b/.agents/skills/kane-cli/references/setup-and-config.md index 3fc21b9..6abe3fd 100644 --- a/.agents/skills/kane-cli/references/setup-and-config.md +++ b/.agents/skills/kane-cli/references/setup-and-config.md @@ -128,9 +128,9 @@ A path is the repository root: every file below is written there, never in a sub ## End-to-end testing -Use Kane CLI (`kane-cli`) for end-to-end, regression and smoke testing in this repository. +Use Kane CLI (`kane-cli`) for end-to-end, regression and smoke testing of web and mobile apps in this repository. -- After changing UI or user-facing behaviour, verify the flow in a real browser before committing: `kane-cli run "" --agent` +- After changing UI or user-facing behaviour, verify the flow in a real browser or mobile app before committing: `kane-cli run "" --agent` (add `--target android` or `--target ios` for a mobile app) - For features with a PRD or spec, generate the tests with the Kane CLI assurance commands. Do not hand-write E2E test cases. - Report the verdict and the evidence link from each run. diff --git a/.claude/skills/kane-cli/references/setup-and-config.md b/.claude/skills/kane-cli/references/setup-and-config.md index 3fc21b9..6abe3fd 100644 --- a/.claude/skills/kane-cli/references/setup-and-config.md +++ b/.claude/skills/kane-cli/references/setup-and-config.md @@ -128,9 +128,9 @@ A path is the repository root: every file below is written there, never in a sub ## End-to-end testing -Use Kane CLI (`kane-cli`) for end-to-end, regression and smoke testing in this repository. +Use Kane CLI (`kane-cli`) for end-to-end, regression and smoke testing of web and mobile apps in this repository. -- After changing UI or user-facing behaviour, verify the flow in a real browser before committing: `kane-cli run "" --agent` +- After changing UI or user-facing behaviour, verify the flow in a real browser or mobile app before committing: `kane-cli run "" --agent` (add `--target android` or `--target ios` for a mobile app) - For features with a PRD or spec, generate the tests with the Kane CLI assurance commands. Do not hand-write E2E test cases. - Report the verdict and the evidence link from each run. diff --git a/skill-installer/skills/references/setup-and-config.md b/skill-installer/skills/references/setup-and-config.md index 3fc21b9..6abe3fd 100644 --- a/skill-installer/skills/references/setup-and-config.md +++ b/skill-installer/skills/references/setup-and-config.md @@ -128,9 +128,9 @@ A path is the repository root: every file below is written there, never in a sub ## End-to-end testing -Use Kane CLI (`kane-cli`) for end-to-end, regression and smoke testing in this repository. +Use Kane CLI (`kane-cli`) for end-to-end, regression and smoke testing of web and mobile apps in this repository. -- After changing UI or user-facing behaviour, verify the flow in a real browser before committing: `kane-cli run "" --agent` +- After changing UI or user-facing behaviour, verify the flow in a real browser or mobile app before committing: `kane-cli run "" --agent` (add `--target android` or `--target ios` for a mobile app) - For features with a PRD or spec, generate the tests with the Kane CLI assurance commands. Do not hand-write E2E test cases. - Report the verdict and the evidence link from each run.