allium
無料Give your AI agents something more useful than a prompt. Velocity through clarity.
日本語の概要は準備中です。原文の説明を表示しています。
Generate tests from Allium specifications. Use when the user wants to propagate tests, generate test files from a spec, write tests for a specification, create property-based tests, produce state machine tests, check test coverage against spec obligations, or understand what tests a specification requires.
インストール方法を見るインストールする前に、エージェントに与えられる指示の中身を確認できます。
This skill generates tests from Allium specifications. Propagation is how plants reproduce from cuttings of the parent: the spec is the parent, the tests are the offspring.
Deterministic tools guarantee completeness (every spec construct maps to a test obligation). You handle the implementation bridge: correlating spec constructs with code, generating tests in the project's conventions.
Before propagating tests, you need:
.allium file describing the system's behaviourallium plan <spec> (JSON listing every required test)allium model <spec> (JSON describing entity shapes, constraints, state machines)If the CLI tools are not available, derive test obligations manually from the spec using the test-generation taxonomy in references/test-generation.md.
Generates boundary tests from surface declarations. Use when the user wants to test an API, UI contract or integration boundary.
For each surface in the spec:
exposes is accessible to the specified actor, including for iteration over collectionswhen conditions are true and are hidden otherwise, including when the corresponding rule's requires clauses are not metidentified_by predicate can interact; for actors with within, verify interaction is scoped to the declared contextcontext predicatedemands are satisfied by the counterpart, fulfils are supplied by this surface, including all typed signatures@guarantee annotations hold across the boundaryWalks the full test obligations document. Use when the user wants comprehensive test coverage for the entire specification.
Categories from the test-generation taxonomy:
?) null handling, when-clause state-dependent presence, relationships, join lookups, equality.created trigger narrowing-> field extraction, parameterised derived values, now volatility, collection operationsif guards read resulting state), entity creation, removal, bulk updates, rule-level for iteration, let bindings, chained triggerstransitions_to vs becomes semanticswithin scoping, context scoping, related navigation@invariant honouring, demands/fulfils directionwhen set, absence obligations on leaving, no obligation when moving within or outside, convergent transitions all set the field, guard required to access when-qualified fields, derived value when inference via input intersection.created()) to each terminal state, following a valid path through the transition graph. Each test exercises a complete lifecycle.allium analyse identifies potential deadlocks, generate tests that put the entity in the stuck state and verify whether it can progress.If allium analyse is available, use its findings to prioritise test generation. A missing_producer or dead_transition finding indicates a gap worth exercising with a test. A deadlock finding should generate a test documenting that the entity cannot escape the stuck state. Consult actioning findings for the finding type taxonomy.
For deterministic obligations: field presence, enum membership, transition validity, surface exposure, state-dependent field presence and absence. These are standard unit/integration tests.
For invariants and rule properties. Each expression-bearing invariant becomes a PBT property:
Use the project's PBT framework:
| Language | Framework | Discovery |
|---|---|---|
| TypeScript | fast-check | package.json |
| Python | Hypothesis | pyproject.toml |
| Rust | proptest | Cargo.toml |
| Go | rapid | go.mod |
| Elixir | StreamData | mix.exs |
Fall back to assertion-based tests if no PBT framework is present.
For entities with status enums. When a transition graph is declared, walk every path through the graph. When no graph is declared, derive valid transitions from rules.
when clausesState machine tests require an action map: a function per transition edge that takes the entity in the source state and produces it in the target state by calling the actual implementation code. Without this map, the test framework can describe valid paths through the graph but cannot execute them.
To build the action map:
requires clauses), invokes the code, and returns the entity in the target state(from_state, to_state) keyOnce the map is built, the PBT framework can walk random valid paths: start at any non-terminal state, pick a random outbound edge, apply its action, check all entity-level invariants, repeat. The path length and starting state are generated randomly. This is the fullest expression of the spec's transition graph as a test.
You correlate spec constructs with implementation code, the same way the weed skill correlates for divergence checking.
Map surfaces to their implementation:
Discover the mapping by reading the codebase. Look for naming patterns, route definitions and handler registrations.
For each rule in the spec:
Temporal triggers (deadline-based rules) need a controllable time source in the test. If the implementation uses wall-clock time (Instant.now(), System.currentTimeMillis()), the test cannot reliably position itself before, at or after a deadline.
Before attempting temporal tests, check whether the component accepts an injected clock or time parameter. Common patterns: a Clock parameter on the constructor, an epoch-millisecond argument on the method, a TimeProvider interface. If the seam exists, inject a controllable time source. If it does not, flag this as a test infrastructure gap: the temporal tests cannot be generated until the component supports time injection. Do not attempt to test temporal behaviour by sleeping or racing against wall-clock time.
When a rule emits a trigger that another spec's rule receives (e.g. the Arbiter emits ClerkReceivesEvent, the Clerk handles it), testing the chain requires multiple components wired together.
Before generating cross-module tests:
Cross-module tests are integration tests by nature. They verify that the spec's trigger chains are faithfully implemented across component boundaries. Prioritise them after single-component tests are passing.
When exploring the codebase, note which spec obligations are already covered by existing tests. An existing integration test that exercises the happy path from event submission through to acknowledged output already covers multiple rule_success obligations and the end-to-end scenario.
When an existing test covers a spec obligation, reference it rather than generating a duplicate. The propagate skill's value at the integration level is verifying that coverage is complete against the spec's obligation list, identifying gaps, and generating tests to fill them — the reconciliation step in the process below makes this check explicit. Replacing working hand-written tests with generated equivalents adds no value.
Deferred specifications are fully specified in separate files. When the target codebase doesn't include the deferred spec's module, generate a test stub with a placeholder:
// TODO: deferred spec — InterviewerMatching.suggest
// This behaviour is specified as deferred. Provide a mock or skip.
elicit or distill skill to develop it further before propagating tests. A spec with rules and surfaces enables the full test taxonomy including data flow chain tests and reachability tests.allium plan output or manual derivationallium model output or manual derivationBefore generating tests, establish:
__tests__/, tests/, etc.)When generator specs are available, use them to produce valid test data:
when clauses (e.g. a shipped Order has tracking_number and shipped_at populated; a pending Order does not)After generating tests, walk the full obligation list — from allium plan output or the manual derivation — and map each obligation to the test that covers it, whether generated this run or pre-existing. Reconciliation is silent: obligations are internal working data, so do not narrate the mapping, print the obligation list or present a coverage report while everything is on track.
For each obligation with no covering test, attempt to cover it:
This is a mini-loop, and it needs the same guards as the outer Allium loop (see driving the loop):
Obligations still uncovered when a guard trips are the only part of reconciliation the user sees. Report each with a classification and a one-line reason:
Missing implementation is not a residue category. In a spec-first flow no code exists yet by design: write the test against the intended interface and let it fail — a failing test covers its obligation, and the loop's implement phase turns it green. An obligation is uncovered only when no test for it could be written at all.
Close with a single summary line: N obligations, M covered, K uncovered. When everything is covered that one line is the entire user-facing output of reconciliation. Silence about an individual obligation means it is covered; anything itemised needs a human decision. When propagate runs inside the Allium loop, this line feeds the loop's consolidated summary, and the loop must not treat the spec as converged while obligations remain uncovered without a reported reason.
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Give your AI agents something more useful than a prompt. Velocity through clarity.
日本語の概要は準備中です。原文の説明を表示しています。
Extract an Allium specification from an existing codebase. Use when the user has existing code and wants to distil behaviour into a spec, reverse engineer a specification from implementation, generate a spec from code, turn implementation into a behavioural specification, or document what a codebase does in Allium terms.
日本語の概要は準備中です。原文の説明を表示しています。
Run a structured discovery session to build an Allium specification through conversation. Use when the user wants to create a new spec from scratch, elicit or gather requirements, capture domain behaviour, specify a feature or system, define what a system should do, or is describing functionality and needs help shaping it into a specification.
日本語の概要は準備中です。原文の説明を表示しています。
Implement command handlers that validate state and emit events using the Grain framework
日本語の概要は準備中です。原文の説明を表示しています。
Create scheduled background jobs that run on cron schedules
日本語の概要は準備中です。原文の説明を表示しています。
Implement query handlers that read from event-sourced read models
日本語の概要は準備中です。原文の説明を表示しています。