一键导入
allium-cli-parse
Use when debugging syntax or parsed structure for one or more .allium files inside a folder, then returning to entrypoint-level validation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when debugging syntax or parsed structure for one or more .allium files inside a folder, then returning to entrypoint-level validation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | allium-cli-parse |
| description | Use when debugging syntax or parsed structure for one or more .allium files inside a folder, then returning to entrypoint-level validation. |
Use this skill when a folder-level CLI task reveals confusing syntax, malformed structure, or unexpected parser behavior in a .allium file.
Use allium parse to inspect the syntax tree of a specific .allium file, then return to allium check against the resolved folder entrypoint.
This skill is invoked against a folder containing one or more .allium files. Do not pass the folder itself to allium commands. Allium CLI commands operate on spec files, so first resolve the effective entrypoint file.
Treat the user's folder argument as SPEC_DIR. If no folder is provided, use the current working directory only after confirming it contains .allium files.
SPEC_DIR="${SPEC_DIR:-.}"
find "$SPEC_DIR" -type f -name '*.allium' | sort
If no .allium files are found, stop and report that the folder does not contain Allium specs.
Use this order:
SPEC_DIR/index.allium exists, use it.SPEC_DIR/allium/index.allium exists, use it..allium file exists under SPEC_DIR, use that file..allium files exist and no clear entrypoint exists, inspect imports/references and choose the file that appears to aggregate the others.Use ENTRYPOINT for commands that need the whole model. Use a leaf file only for narrow syntax debugging with allium parse, and return to the entrypoint for validation.
ENTRYPOINT="$SPEC_DIR/index.allium"
allium check "$ENTRYPOINT"
allium check "$SPEC_DIR"
allium analyse "$SPEC_DIR"
allium model "$SPEC_DIR"
allium plan "$SPEC_DIR"
Passing a directory produces misleading failures and does not validate the spec set.
allium parse accepts a spec file and outputs syntax-tree structure. It is useful for debugging structure, but it is not proof that the spec set is valid or semantically complete.
Always follow syntax debugging with:
allium check "$ENTRYPOINT"
parseUse parse when:
allium check diagnostics point to syntax but the cause is unclear.Do not use parse as the first command for ordinary validation. Start with check.
TARGET_FILEChoose TARGET_FILE using this order:
.allium file.If no target file is clear, run check first and use its diagnostic to select the file.
allium check "$ENTRYPOINT"
allium parse "$TARGET_FILE"
# patch the smallest malformed construct
allium parse "$TARGET_FILE"
allium check "$ENTRYPOINT"
Do not keep parsing repeatedly after the structure is clear. Return to validation.
Look for:
rule body contains the intended when, requires, let, and ensures clauses.entity body includes fields, transitions, and invariants at the intended nesting level.Symptom: a rule appears inside an entity or another block unexpectedly.
Repair:
parse, then check.ensuresSymptom: intended outcome lines are not parsed under ensures.
Repair:
parse, then check.Symptom: transition declarations do not appear under the intended transitions block.
Repair:
parse, then check.Symptom: parse tree stops or changes shape near an invariant, precondition, or derived expression.
Repair:
check passes.SPEC_DIR="specs/allium"
ENTRYPOINT="specs/allium/index.allium"
TARGET_FILE="specs/allium/orders.allium"
allium parse "$TARGET_FILE"
allium check "$ENTRYPOINT"
SPEC_DIR="specs/allium"
ENTRYPOINT="specs/allium/index.allium"
allium parse "$ENTRYPOINT"
allium check "$ENTRYPOINT"
When reporting parse output, do not dump the entire tree unless it is small and directly relevant. Summarize:
check.When reporting command results, include:
Do not claim a spec is valid unless the relevant command completed successfully against the resolved entrypoint.
allium-cli-check for validation.allium-cli-diagnostics-repair for failure loops.allium-cli-output-interpretation for summarizing large parser output.Use for practical command recipes when agents operate Allium CLI commands on a folder of .allium specs.
Use when running deeper semantic and process-level analysis on a folder of .allium specs after allium check has passed.
Use when validating a folder of .allium specs with allium check. Resolves the folder to an entrypoint file, runs validation, interprets diagnostics, and defines the repair loop.
Use when defining or applying CI-quality command gates for a folder of .allium specs. Assumes allium is already available.
Use as a concise reference for Allium CLI commands when working on a folder of .allium specs. Assumes the CLI is already available and entrypoint resolution is required.
Use when an Allium CLI command fails on a folder of .allium specs. Classifies diagnostics, performs minimal repairs, and reruns the correct command against the resolved entrypoint.