Skip to content
Back to skills

Intent

ASecurity

Cover the skill's parsing, scaffolding, checks and index with an executable suite that runs in CI.

  • 17 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 29, 2026
testingsqltesting

Works with

  • cli

Security analysis

A100/100

Pro scans all 21 files and shows the line behind each finding

Scanned September 29, 2026

npx -y skills add finos/morphir-scala --skill intent --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Intent?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Intent
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/finos-intent-morphir-scala/badge)](https://www.skillsdirectory.com/skills/finos-intent-morphir-scala)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
type: Intent
title: Test suite for the kb and intent skill
description: "Cover the skill's parsing, scaffolding, checks and index with an executable suite that runs in CI."
state: Released
kind: test
breaking: false
created: 2026-07-28
state_since: 2026-07-28
tags: [kb, ci]
capability: morphir/morphir-scala:/knowledge-base-tooling.md
---

# 0006 — Test suite for the kb and intent skill

Cover the skill's parsing, scaffolding, checks and index with an executable suite that runs in CI.

## Problem

Roughly 2,500 lines of Scala that mutate files on disk, verified only by running commands by hand and reading the
output. The Codex review on #936 found a frontmatter-corrupting bug that manual testing had walked straight past —
releasing an intent whose frontmatter ended in a `sources:` block inserted the new key between the block header and
its children.

Manual verification also cannot be re-run cheaply, so nothing stops a fixed bug coming back.

## Approach

`KbTests.scala` — an executable suite covering parsing, path arithmetic, scaffolding, the intent lifecycle and its
obligations, the checks, refresh, and the SQLite index.

Written with kyo-test, the framework `langkit` and `kit` already use. Mill's script mode exposes no test module, so
`mill test <script>` does not resolve — but kyo-test ships a CLI runner with a `main`, so the suite runs through it as
the script's `mainClass`, with `//| resources:` putting the ServiceLoader registry on the classpath. A hand-rolled
harness was written first and thrown away once that worked; using the project's own framework was plainly better.

Forty-nine cases across six suites. Four are named *regression* and pin behaviour that was once wrong — three from
the review, one from dogfooding. The suite was verified to fail: reintroducing the `setKeys` bug fails that case and
exits 1.

Discovery is ServiceLoader-only, so a suite missing from the registry silently never runs rather than failing —
which would leave CI green over untested code. `KbMetaSpec` asserts the registry and the defined suites agree, on the
same principle as the rest of this design: enforce it, do not merely document it.

Runs in CI in the `knowledge-base` job, and locally as `mise run kb:test`.

Files in this skill

  • 0001-intent-management-in-the-knowledge-base.md1.5 KB
  • 0002-release-labels-for-performance-security-and-deprecation.md1.8 KB
  • 0003-capability-coverage-for-morphir-scala.md1.1 KB
  • 0004-publish-intent-as-github-issues.md1.2 KB
  • 0005-enforce-knowledge-base-checks-in-ci.md1.3 KB
  • 0006-test-suite-for-the-kb-and-intent-skill.md2.2 KB
  • 0007-multi-frontend-morphir-transformation-pipeline.md15.5 KB
  • 0008-buildkit-core-task-graph.md2.2 KB
  • 0009-standard-morphir-build-pipeline.md2.2 KB
  • 0010-elm-frontend-buildkit-adapter.md1.9 KB
  • 0011-buildkit-bdd-vertical-slice.md1.8 KB
  • 0012-workspace-and-manifest-normalization.md1.4 KB
  • 0013-pluggable-package-resolution-and-materialization.md3.1 KB
  • 0014-backend-generation-and-artifact-reconciliation.md1.4 KB
  • 0015-incremental-builds-and-checkpoints.md1.5 KB
  • 0016-parallel-task-graph-executor.md1.3 KB
  • 0017-morphir-cli-buildkit-integration.md2 KB
  • 0018-typed-pipeline-plugins-and-immutable-presets.md2.1 KB
  • 0019-typed-tree-processing-interoperability.md2.9 KB
  • 0020-github-graphql-connector.md4.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…