mirror of
https://github.com/NomaDamas/k-skill.git
synced 2026-06-24 02:04:11 +00:00
Lock the unsandboxed smoke command contract and document that the managed clone is mutable bot state rather than a write-protected boundary. Constraint: PR #263 follow-up asked for TDD coverage and an update on feature/#257 targeting dev. Rejected: Hardening the runner into per-skill worktrees in this patch | broader behavior change than the approved documentation/contract follow-up. Confidence: high Scope-risk: narrow Directive: Do not describe the QA clone as write-protected while smoke tests run with sandbox bypass in that clone. Tested: bats tools/k-skill-qa-bot/test/bats/; shellcheck -e SC1091,SC2016,SC2012 tools/k-skill-qa-bot/bin/*.sh tools/k-skill-qa-bot/bin/lib/*.sh tools/k-skill-qa-bot/install.sh tools/k-skill-qa-bot/uninstall.sh; python3 -m py_compile tools/k-skill-qa-bot/bin/*.py tools/k-skill-qa-bot/bin/lib/*.py; git diff --check origin/dev...HEAD Not-tested: Live Codex network smoke execution against production skill endpoints
2.8 KiB
2.8 KiB
tools/k-skill-qa-bot — Agent instructions
Source tree for k-skill-qa-bot, an automated QA daemon for the k-skill repository.
What this is
- Source for an external macOS daemon installed at
~/.local/share/k-skill-qa-bot/. - Every 3 days (launchd LaunchAgent), the daemon:
- Refreshes a shallow clone of
NomaDamas/k-skillmain. - Discovers every
<skill>/SKILL.md, classifies each skill (read-only / location / login / destructive / api-key / proxy-dependent / deprecated). - Runs each suitable skill through
codex exec --dangerously-bypass-approvals-and-sandboxwith a smoke-test prompt synthesized from the skill's## When to use, while keeping the separate LLM judge on a read-only/no-approval Codex path. - An LLM judge (
codex exec --output-schema) grades pass / fail / skip. - Failed skills are filed as dedup'd issues on
NomaDamas/k-skill. Skipped skills (login required, deprecated, missing API key) never create issues.
- Refreshes a shallow clone of
Install path
After running install.sh, the runtime lives at ~/.local/share/k-skill-qa-bot/.
The k-skill repository itself is never modified by the bot — it is read-only SSOT. Test prompts are synthesized from each SKILL.md.
Trust-boundary notes
- Smoke tests intentionally run unsandboxed and may contact public skill endpoints, plus git, Codex, GitHub, and k-skill-proxy health-check endpoints.
- A dedicated LaunchAgent is scheduling isolation only; it is not a separate OS user, container, or filesystem sandbox.
- The bot-managed clone is not write-protected from the unsandboxed smoke agent; treat it as mutable bot state rather than a write-protected filesystem boundary.
- The judge uses read-only/no-approval Codex settings, but is still a tool-capable Codex agent over untrusted transcripts and skill Markdown. Do not describe it as a no-tools or file-isolated model call unless the implementation changes to enforce that boundary.
Design rules
- SSOT: All test prompts and skill metadata come from
SKILL.mdfiles in the bot's own shallow clone ofNomaDamas/k-skillmain. The k-skill repo gets no QA-bot-specific edits. - First-run safety:
CREATE_ISSUES=falseis the default. Users must opt in by writingCREATE_ISSUES=trueto~/.local/share/k-skill-qa-bot/.env. - Deprecated skills: Detected by parsing the cloned
README.mdfor~~…~~strike-through and⚠️ 지원 중단markers. Always SKIPPED, never failed. - Login / destructive skills: Force-skipped via
config/skill-overrides.yml. Never filed as issues. update-clone.shself-destruction guard: Refuses to operate ifK_SKILL_CLONEresolves to a directory that does not look like a managed-by-the-bot clone (nostate/clone-headancestor, or matches the development tree). Required after a real incident where the script git-reset the very tree it lived in.