ak5-live-test
Skill2 starsChanged 44 days agoApache-2.0View on GitHub
Spin up a live, isolated AK5 server instance and execute end-to-end functional and integration verification tests. Use after introducing new backend features, CLI updates, auth/security changes, or SDK modifications to verify real server behavior, API endpoints, CLI session flows, and security gates without polluting project state.
In this repository6 other files it gives its agents.
- audit-localSkill
- create-prSkill
- cursor-delegateSkill
- releaseSkill
- ak5Skill
- releaseSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Use this skill to spin up an ephemeral, sandboxed AK5 gateway server and execute end-to-end integration tests across the REST API, security …
- Very specific: line 70
Add a test_<feature>(self) method to LiveTestRunner, or extend an existing suite.
- Very specific: line 71
Start the server with self.spawn_server(extra_env).
- Very specific: line 72
Use the helpers: self.ak5(*args, profile=…) runs the CLI, self.cli_login(...) runs ak5 login and approves it, …
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AK5 Live Server Integration & E2E Test Skill
Use this skill to spin up an ephemeral, sandboxed AK5 gateway server and execute end-to-end integration tests across the REST API, security gates, CLI commands, and TypeScript SDK.
1. When to Use
- After modifying backend routes, models, or schemas: verifies live HTTP serialization, validation, and database operations.
- After changing identity / auth: local-owner login, web session → JWT exchange (CSRF), OAuth device grant for users and agents, JWT secret file permissions (
0600), self-identify disabled by default. - After changing the CLI, client daemon, or workflow verbs: drives the real
ak5CLI through the daemon across four profiles (human, triage, worker, gatekeeper) from inbox todone. - Before releases: supplements unit tests (
pytest) andbackend/tests/regressionwith real multi-process HTTP, UDS, and subprocess verification.
2. Quick Start
# Full matrix (identity, workflow, SDK)
uv run python .agents/skills/ak5-live-test/scripts/run_live_test.py
# One suite
uv run python .agents/skills/ak5-live-test/scripts/run_live_test.py --mode identity
uv run python .agents/skills/ak5-live-test/scripts/run_live_test.py --mode workflow
uv run python .agents/skills/ak5-live-test/scripts/run_live_test.py --mode sdk # needs: cd packages/sdk && npm run build
# Server logs on the terminal, fixed port, keep the sandbox for debugging
uv run python .agents/skills/ak5-live-test/scripts/run_live_test.py --verbose --port 8055 --keep-artifacts--mode security and --mode core still work as aliases of identity and workflow.
3. Test Suites & Verification Matrix
| Suite | Focus | Scenarios |
| 1. Identity | identity.md §2, §3, §8 | • GET /meta reports api_version 2<br>• POST /auth/identify refused without AK5_DEV_INSECURE_IDENTIFY<br>• Loopback local-owner login: wrong password 401, correct password → session + CSRF<br>• /auth/session/token rejects a bad CSRF header (403) and mints a user JWT<br>• Device grant (user) → access token; device grant (agent) → opaque ak5_agt_… token that authorizes the API<br>• JWT secret file created with 0600 |
| 2. Workflow | workflow.md §3, client.md §3–4 | • ak5 login (real CLI, code approved over HTTP) for me, triage-1, worker-1, gk-1<br>• whoami resolves the token through the daemon<br>• board create → T1 ticket create (inbox) → triage next --inbox / claim / route<br>• events wait --events WORK_AVAILABLE sees the routed ticket<br>• worker next / claim / heartbeat / submit<br>• gatekeeper claim / verdict --approve --findings<br>• T15 by an agent exits 4; human verdict --approve → done<br>• next --wait 1 with an empty board exits 6 |
| 3. SDK | @ak5/sdk | • Client with a device-grant agent token: ensureCompatible(), listBoards()<br>• An invalid agent token is rejected |
4. Sandbox & Safety Guarantees
The runner has no side effects on the host workspace:
- Ephemeral database:
AK5_DATA_DIRandDATABASE_URLpoint into/tmp/ak5lt_*. The host store is never opened. - Isolated JWT key:
AK5_JWT_SECRET_FILElives in the sandbox. - Sandboxed client:
HOME,AK5_HOME, andXDG_RUNTIME_DIRare sandbox paths, so profiles, credentials, claim tokens, and the daemon socket never touch~/.ak5. The short/tmp/ak5lt_prefix keeps the socket path under the AF_UNIX limit. - Clean environment:
AK5_TOKEN,AK5_PROFILE,AK5_DEV_INSECURE_IDENTIFY,AK5_OIDC_PROVIDERS, and related variables are removed from child processes. - Dynamic port: a free
127.0.0.1port unless--portis given. - Cleanup: servers and the daemon are stopped in
finallyblocks and the sandbox is removed (unless--keep-artifacts).
5. Adding New Feature Verifications
- Open
.agents/skills/ak5-live-test/scripts/run_live_test.py. - Add a
test_<feature>(self)method toLiveTestRunner, or extend an existing suite. - Start the server with
self.spawn_server(extra_env); it already sets the local-owner password. - Use the helpers:
self.ak5(*args, profile=…)runs the CLI,self.cli_login(...)runsak5 loginand approves it,self.device_grant_token(principal=…)mints a token over HTTP, andself.owner_client()returns a logged-in browser-like client. - Record results with
self.check(name, ok, reason). - Wire the method into
run_all()and the--modechoices.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

