testmode
Skill4 starsChanged 3 months agoMITView on GitHub
Run and interpret the ClideTestApp platform integration harness. Use after modifying toolchain resolution, IPC dispatch, extension lifecycle, theme loading, or native platform code. Also use when the user says "run testmode", "test the app", "smoke test", or "verify the build". Triggers on changes to: lib/kernel/src/toolchain.dart, lib/src/daemon/dispatcher.dart, lib/src/ipc/, lib/src/pty/, lib/builtin/terminal/, lib/extension/, lib/kernel/src/theme/, lib/builtin/*/src/extension.dart, linux/CMakeLists.txt, macos/, Makefile (run targets), lib/main.dart.
In this repository7 other files it gives its agents.
- .vibe/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- legacy/CLAUDE.mdCLAUDE.md
- clideSkill
- git-commitSkill
- ui-designSkill
- whats-nextSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 64
If the app never prints [testmode] lines, the testmode gate in main.dart didn't fire — check that CLIDE_TESTMODE is set to a non-empty …
- Very specific: line 70
All test logic lives in lib/test_app.dart.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
Testmode harness
ClideTestApp is a lightweight Flutter app that boots the real platform
layer, runs structured tests, prints results, and exits. It catches
regressions that unit tests cannot see: missing binaries, broken
subprocess wiring, IPC dispatch failures, extension activation order,
and theme parse errors.
Running
make run-testmode # all categories, 60s timeout
make run-testmode TESTMODE_CATEGORY=toolchain
make run-testmode TESTMODE_CATEGORY=ipc
make run-testmode TESTMODE_CATEGORY=extensions
make run-testmode TESTMODE_CATEGORY=terminal
make run-testmode TESTMODE_TIMEOUT=120 # longer timeout for slow buildsResults go to stdout and /tmp/clide-testmode.log. The last line
of testmode output is machine-readable:
[testmode:json] {"passed":33,"failed":0,"total":33,"failures":[]}Exit code is non-zero when any test fails. The Makefile verifies
"failed":0 in the log via grep -q.
When to run which category
| Changed area | Category | Why |
| Toolchain, PATH, dugite, ptyc, shell | toolchain | Binary resolution + exec |
| IPC envelope, dispatcher, schema | ipc | Round-trip + error contract |
| Extension manifest, activate, contributions | extensions | Register + activate lifecycle |
| Theme YAML, loader, palette | extensions | Theme parse is in this category |
| PTY spawning, terminal pane, xterm wiring | terminal | Real PTY spawn + I/O round-trip |
| Platform config (CMakeLists, pbxproj, Makefile) | all | Full rebuild validates everything |
| Any doubt | all | ~30s, cheap insurance |
Interpreting output
[testmode] exec | ... | OK— subprocess ran, exit 0 or 1.[testmode] PASS | ...— assertion passed (IPC / extension tests).[testmode] FAIL | ...— assertion failed. The output column says why.[testmode] exec | ... | EXCEPTION— binary not found or not executable.[testmode] exec | ... | TIMEOUT— subprocess hung (5s limit).
If the app never prints [testmode] lines, the testmode gate in
main.dart didn't fire — check that CLIDE_TESTMODE is set to a
non-empty string (not a bare bool).
Adding tests
All test logic lives in lib/test_app.dart. Pattern:
// In the appropriate _run*Tests method:
await _testExec('label', binary, ['args'], workDir);
// or
_addResult('label', boolCondition, 'detail string');New categories: add a runFoo bool from the category string,
gate a new _runFooTests method, and add the category name to
the Makefile help comment and this skill's table above.
Extension tests must include transitive dependencies — e.g.
GitExtension requires DiffExtension to activate first.
Source files
lib/test_app.dart— all test logic and UIlib/main.dart:54— testmode gate (String.fromEnvironment)Makefile:42–56—run-testmodetarget with category variable
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.

