/allium:weedfrom allium
Compares Allium specifications against implementation code to find divergences and resolve them. Use for spec-code alignment, drift audit, or syncing specs with code.
Ships in allium. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You weed the Allium garden. You compare .allium specifications against implementation code, find where they have diverged, and help resolve the divergences.
This skill runs in two modes. Every instruction below that asks, prompts or checks with the user follows the mode:
weed subagent (for example inside the Allium loop), where no user is reachable. Do not guess an answer: report each question as an open finding in your output (and, when updating the spec, record it as an open question declaration), then continue with the work that does not depend on it..allium files (search the project to find them if not specified).allium CLI is available, run allium check against the files to verify they are syntactically correct.You operate in one of three modes, determined by the caller's request:
Check. Read both spec and code. Report every divergence with its location in both. Do not modify anything.
Update spec. Modify the .allium files to match what the code actually does. The spec becomes a faithful description of current behaviour.
Update code. Modify the implementation to match what the spec says. The code becomes a faithful implementation of specified behaviour.
If no mode is specified, default to check and report all findings.
For each entity, rule or trigger in the spec, find the corresponding implementation. For each significant code path, check whether the spec accounts for it. Report mismatches in both directions: spec says X but code does Y, and code does Z but the spec is silent.
Beyond construct-by-construct comparison, check process-level properties:
BackgroundCheckResultReceived is provided by a surface, verify the code has the corresponding handler.Report process-level divergences alongside construct-level ones. Read assessing specs to understand the spec's maturity before checking — don't flag process-level gaps on a coarse spec that hasn't reached that level of development yet.
When you find a mismatch, propose a classification with your reasoning. The caller confirms or overrides. Classify each divergence as one of:
Present divergences grouped by entity or rule for easier review.
When code has repeated interface contracts across service boundaries (e.g. the same serialisation requirement in multiple integration points), check whether the spec uses contract declarations for reuse. Code assertions and invariants (e.g. assert balance >= 0, class-level validators) should align with spec invariants. If the spec lacks a corresponding invariant Name { expression }, flag the gap.
-- allium: N version marker. Do not change the version number.config blocks for variable values (thresholds, timeouts, limits). Do not hardcode numbers in rules.requires guards to prevent re-firing.with for relationships, where for projections. Do not swap them.extended_timeout = base_timeout * 2) should use qualified references or expression-form defaults in the spec.elicit skill.distill skill.skills/allium/references/language-reference.md. The language definition is governed separately.Spec alignment checks can require many edit-validate cycles. When running interactively, if you anticipate a long iterative session, or if the context is growing large, advise the user to open a fresh chat specifically for weeding the spec. Provide a copy-paste prompt so they can resume, such as: "Use the weed skill to continue resolving divergences between the [Spec Name] spec and [Implementation Files]."
After every edit to a .allium file, run allium check against the modified file if the CLI is installed. Fix any reported issues before presenting the result. If the CLI is not available, verify against the language reference. The first time the CLI is not found, note: "I'll validate against the language reference instead. If you'd like automated checking, the CLI is available via Homebrew or crates.io — see the README for details."
If allium analyse is available, run it after completing divergence checks. Use findings to identify process-level gaps that construct-by-construct comparison misses. A missing_producer finding might indicate either a spec gap (the code handles it but the spec doesn't model it) or a code gap (nobody implemented the data path). Classify each finding by checking whether the code addresses it. Consult actioning findings for how to translate findings into domain questions.
When reporting divergences (check mode), use this structure for each finding:
### [Entity/Rule name]
Spec: [what the spec says] (file:line)
Code: [what the code does] (file:line)
Classification: [proposed classification with reasoning]
Group related divergences together. Lead with the most consequential findings.
When running as the weed subagent inside the Allium loop, return your result as a single JSON object conforming to weed-result.schema.json, and nothing else. The loop routes on the structured fields (verdict, each divergence's classification, open_questions) rather than parsing prose, so the routing and the convergence check stay deterministic. Keep the summary field to the one human-readable line; put the detail in the structured fields. Emit every field, using [] for empty lists. Running interactively, present the prose format above as before — the typed record is for the machine hand-off, not the conversation.
{
"phase": "weed",
"mode": "check",
"verdict": "dirty",
"divergences": [
{ "subject": "Order.cancel", "classification": "code-bug", "spec": "cancel allowed from paid (shop.allium:42)", "code": "guarded to pending only (order.py:88)" }
],
"open_questions": [],
"artefacts": [],
"summary": "1 divergence: Order.cancel (code-bug)"
}
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
allium, spec-code-alignment, spec-audit, drift-detection, spec-sync
npx claudepluginhub juxt/claude-plugins --plugin allium7 skills in this plugin
/alliumGive your AI agents something more useful than a prompt. Velocity through clarity./distillExtract 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./elicitRun 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.Other plugins' skills for the same job