openlore write tests

Engineering Community

Skill notes

When to use this skill

Trigger this skill when the user wants to write real tests for a function, module, or spec scenario, with phrasings like: "write tests for X" "add test coverage for Y" "what spec scenarios are untested?"

Step 1 — Identify target + detect framework

Ask the user: Target — a function name, file path, spec scenario, or domain to test. If unsure, skip to Step 1b. $PROJECT_ROOT — project root directory. Step 1b — Find untested scenarios (if no target given) Call the openlore MCP tool get_test_coverage with {"directory": "$PROJECT_ROOT"}.

Step 2 — Orient

Call the openlore MCP tool orient with: Extract: $TARGET_FILE — the file containing the function(s) to test $EXISTING_TEST_FILE — nearby test file, if any (e.g. foo.test.ts, test_foo.py, foo_test.go) $SPEC_DOMAIN — the spec domain associated with the target

Step 3 — Read implementation + spec contract

This step is mandatory. Do not write any test before completing it. 3a — Read the function body Call the openlore MCP tool get_function_body with: Identify: What the function takes as input, what it returns

Step 4 — Write tests

Write (or append to) $EXISTING_TEST_FILE (or create <name>.test.ts / test_<name>.py / <name>_test.go next to the source file).

Fluxly profile Runtime and permissions are inferred by Fluxly static checks, not author declarations or runtime test results.
Domain
Engineering
Author-declared agents
No explicit declaration found; this is not inferred or tested compatibility
Static check
88 / 100 · heuristic scan, not runtime safety proof
Runtime evidence
Not run; no isolated runtime test evidence is currently recorded
Author / version / license
@tomevault-io · no license declared
Token usage
Lean
Setup complexity
Guided setup
External API key
Not required
Operating systems
macOS · Linux · Windows
Runtime requirements
Python
Detected file/system behavior
  • Read-only
  • Write / modify
  • Shell exec
Network behavior
Local-only
Install commands
None (reference only)

Heads up: Tool permissions are not declared; actual access depends on the runtime.

01
Step 1 — Identify target + detect framework

Ask the user: Target — a function name, file path, spec scenario, or domain to test. If unsure, skip to Step 1b. `$PROJECT_ROOT` — project root directory. Step 1b — Find untested scenarios (if no target given) Call the openlore MCP tool `get_test_coverage` with `{"directory": "$PROJECT_ROOT"}`.

02
Step 2 — Orient

Call the openlore MCP tool `orient` with: Extract: `$TARGET_FILE` — the file containing the function(s) to test `$EXISTING_TEST_FILE` — nearby test file, if any (e.g. `foo.test.ts`, `test_foo.py`, `foo_test.go`) `$SPEC_DOMAIN` — the spec domain associated with the target

03
Step 3 — Read implementation + spec contract

This step is mandatory. Do not write any test before completing it. 3a — Read the function body Call the openlore MCP tool `get_function_body` with: Identify: What the function takes as input, what it returns

04
Step 4 — Write tests

Write (or append to) `$EXISTING_TEST_FILE` (or create `<name>.test.ts` / `test_<name>.py` / `<name>_test.go` next to the source file).

05
Step 5 — Run and fix

Run the test file with `$TEST_RUNNER`. Iterate until all tests pass. Outcome · Action All green · Proceed to Step 6 Failure in new test · Diagnose: is the assertion wrong, or is there a real bug? Fix the assertion if the expectation was incorrect. If a real bug is revealed, do not weaken the assertion — report the bug instead. Failure in pre-existing test · Stop. Fix the regression before adding more tests.

06
Step 6 — Coverage check

Call the openlore MCP tool `get_test_coverage` with `{"directory": "$PROJECT_ROOT"}`. Report: Which spec scenarios are now covered (new) Which scenarios remain uncovered in `$SPEC_DOMAIN` Whether any hub functions in `$SPEC_DOMAIN` are still untested (high-value next targets)

Discussion

Powered by GitHub Discussions. Sign in with GitHub to comment, react, or subscribe.