edit-queries

Create and update Miroir Queries using a Test-Driven Development workflow.

2|1|Updated Mar 24, 2024
One-click install
npx skills add https://github.com/miroir-framework/miroir --skill edit-queries
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: edit-queries
Source: https://github.com/miroir-framework/miroir/tree/main/.github/skills/edit-queries
Command: npx skills add https://github.com/miroir-framework/miroir --skill edit-queries

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides developers to create and update Miroir Queries using a Test-Driven Development workflow, ensuring queries, templates, and transformers are implemented with concrete tests.

Core Features & Use Cases

  • TDD-driven query development: write tests first for extractors, combiners, and transformers.
  • Template-driven queries: define query templates and resolve them into boxed queries for runtime execution.
  • Pre-flight validation: run baseline tests and template resolution checks before implementing changes.
  • Use Case: a developer adds a new query pattern, writes tests, resolves a template, and validates results within the in-repo domain-state tests.

Quick Start

Inspect the repository for existing query tests. Run pre-flight tests: npm run vitest -w miroir-core -- queries.unit Add or update tests in packages/miroir-core/tests/2_domain/... Resolve templates and run the query to verify runtime results.

Frequently Asked Questions about edit-queries

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I apply test-driven development to create Miroir queries?

To create Miroir queries using TDD, write tests for extractors, combiners, and transformers first, then implement the query logic and run vitest to validate changes within in-repo domain-state tests.

How do I validate Miroir query templates before runtime execution?

You validate Miroir query templates by resolving them into boxed queries and running pre-flight checks, ensuring baseline tests pass before the queries are executed at runtime.

What is the workflow for testing Miroir extractors and transformers?

The workflow for testing Miroir extractors and transformers involves writing tests first, running baseline pre-flight checks, and validating the runtime results using npm-based vitest tooling.

Do I need vitest to develop Miroir queries with a test-first approach?

Yes, you need vitest to develop Miroir queries with a test-first approach, as the skill relies on npm-based vitest tooling to run baseline tests and validate repository domain-state changes.

Can I define query templates and resolve them into boxed queries for Miroir?

Yes, you can define query templates and resolve them into boxed queries for runtime execution, verifying the results through pre-flight validation and in-repo domain-state tests.

Where should I place domain-state tests when updating Miroir query patterns?

When updating Miroir query patterns, you should place or update domain-state tests in the packages/miroir-core/tests/2_domain/ directory and run them using vitest.