test-cases
Starter Skill Interface Contract
Verify the Forma skills command contract for stable Agent-facing skill discovery and retrieval.
Purpose
Verify that forma skills is a stable Agent-facing interface: Agents can discover available skills, retrieve the right skill content, handle errors, and avoid falling back to workspace-specific path assumptions.
Preconditions
- The starter config contract passes.
- The starter guideline discovery contract passes.
- The command runs from the repository root unless a test case explicitly changes the working directory.
Test Data
- Workspace:
examples/getting-started-workspace - List command:
cargo run -q -p forma-cli -- --workspace examples/getting-started-workspace skills list --json - Built-in get command:
cargo run -q -p forma-cli -- --workspace examples/getting-started-workspace skills get forma-cli-core - Projected task skill command:
cargo run -q -p forma-cli -- --workspace examples/getting-started-workspace skills get getting-started-task-selection - Projected workspace skill command:
cargo run -q -p forma-cli -- --workspace examples/getting-started-workspace skills get getting-started-workspace-operations - Missing skill command:
cargo run -q -p forma-cli -- --workspace examples/getting-started-workspace skills get missing-skill - Boundary fixtures:
- No projected skills: remove
skillmetadata from configured guideline files in a temporary starter copy. - Duplicate skill id: set two configured guidelines to the same
skill.idin a temporary starter copy. - Invalid skill metadata: remove
skill.idfrom one configured guideline in a temporary starter copy.
- No projected skills: remove
Steps
- Run the list command.
- Confirm the JSON status is
passed. - Confirm the list includes
forma-cli-core,getting-started-workspace-operations, andgetting-started-task-selection. - Confirm each listed skill has stable Agent-facing fields:
id,title,description,source,sourcePath,order, andtriggers. - Confirm
forma-cli-corehassource: builtInandsourcePath: builtin:forma-cli-core. - Confirm projected starter skills have
source: guidelineand source paths that point to ordinary starter Markdown guideline files. - Run each get command for the built-in and projected skills.
- Confirm each get command returns readable Markdown with a frontmatter-like header and enough guidance for an Agent to act.
- Confirm projected skill output is derived from the guideline content rather than a separate duplicated skill document.
- Run the missing skill command.
- Confirm the missing skill fails clearly and does not suggest hard-coded guideline paths or hidden fallback behavior.
- Repeat the list and get commands from outside the starter workspace using
--workspace, and confirm the results still point at the starter workspace. - Run
skills list --jsonandcheck --jsonagainst the no-projected-skills fixture. - Confirm the no-projected-skills fixture still exposes
forma-cli-coreand passescheck. - Run
skills list --jsonandcheck --jsonagainst the duplicate-skill-id fixture. - Confirm both operations fail with
skills.duplicateId. - Run
skills list --jsonandcheck --jsonagainst the invalid-skill-metadata fixture. - Confirm both operations fail with
skills.invalidMetadata.
Expected Results
skills list --jsonis stable enough for Agent routing and automation assertions.skills getis stable enough for direct Agent reading.- Built-in and projected skills are distinguishable by
sourceandsourcePath. - Missing skill ids produce clear errors.
- Duplicate and invalid skill metadata are surfaced by both
skills listandcheck. - Correct workspace selection is controlled by the CLI workspace option or current workspace root, not by repository-specific path guessing.
Coverage
- Suite index: test-cases/forma-starter-kit
- Skills list contract.
- Skills get contract.
- Built-in skill packaging.
- Guideline-projected skill packaging.
- Missing skill error behavior.
- Workspace selection behavior.
- Skill metadata diagnostics as a regular quality gate.
Evidence Or Execution Notes
Record command output summaries, returned skill ids, source paths, and the missing-skill error text.
Open Questions
- Should
skills getsupport JSON output for machine clients, or is Markdown output the primary Agent contract?