consumer-integration-worker
Migrate CLI/TUI consumers onto the redesigned engine contract and verify user-facing CLI behavior stays coherent.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Migrate CLI/TUI consumers onto the redesigned engine contract and verify user-facing CLI behavior stays coherent.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Implement canonical engine contract, selector validation, discovery metadata, and contract-facing architecture artifacts in amlich-core/amlich-api.
Redesign machine-readable amlich outputs and enforce selector/headless parity with focused CLI contract tests and explicit stdout/stderr verification.
Build the explorer-first interactive amlich TUI and verify launch, selector, and inspector flows with test-first Rust changes plus bounded PTY smoke checks.
| name | consumer-integration-worker |
| description | Migrate CLI/TUI consumers onto the redesigned engine contract and verify user-facing CLI behavior stays coherent. |
NOTE: Startup and cleanup are handled by worker-base. This skill defines the WORK PROCEDURE.
Use this skill for features centered on:
crates/amlichcrates/amlich-tuiDo not use this skill for deep amlich-core or amlich-api contract design unless the feature explicitly includes consumer wiring.
mission.md, validation-contract.md, mission AGENTS.md, and .factory/library/user-testing.md before editing.crates/amlich/tests/cli_contract.rs for CLI behavior and focused compile/test coverage for TUI.cargo check --package amlich-cli --package amlich-tuicargo test --package amlich-cli --test cli_contract -- --nocapture.factory/library/ only when you discover durable CLI/testing knowledge future workers will need.{
"salientSummary": "Migrated `amlich day` and `amlich range` onto the new engine contract, added CLI discovery commands for rulesets and recommendation packs, and kept text/Waybar outputs aligned on overlapping facts. CLI contract tests now cover the new selector flags and invalid range/field failures.",
"whatWasImplemented": "Updated `crates/amlich` to build engine requests directly from CLI flags, wired lookup commands for rulesets and recommendation packs, tightened range envelope handling, and aligned legacy query/headless messaging with the documented migration boundary. Also updated TUI loading paths where the new contract changed required fields.",
"whatWasLeftUndone": "Desktop and WASM consumers still target legacy DTOs and were intentionally left out of scope for this mission.",
"verification": {
"commandsRun": [
{
"command": "cargo check --package amlich-cli --package amlich-tui",
"exitCode": 0,
"observation": "CLI and TUI compile against the new contract."
},
{
"command": "cargo test --package amlich-cli --test cli_contract -- --nocapture",
"exitCode": 0,
"observation": "CLI contract coverage passed, including the new engine-flag and discovery-command cases."
},
{
"command": "cargo run --package amlich-cli -- lookup rulesets --format json",
"exitCode": 0,
"observation": "Ruleset discovery returns canonical ids and default-selection metadata."
},
{
"command": "cargo run --package amlich-cli -- day 2026-02-20 --format json --pretty --ruleset vn_baseline_v1 --recommendation-packs pack.nhi_thap_bat_tu.v1",
"exitCode": 0,
"observation": "Day JSON shows canonical ruleset metadata and contextual recommendation activation matching the discovered pack."
}
],
"interactiveChecks": [
{
"action": "Compared `amlich day` JSON, text, and waybar output for the same date after migration.",
"observed": "Overlapping facts stayed aligned and Waybar remained parseable with `text`, `tooltip`, and `class` fields."
},
{
"action": "Ran the agreed TUI startup smoke test after updating TUI wiring.",
"observed": "The TUI started successfully for the target date without expanding acceptance beyond CLI surfaces."
}
]
},
"tests": {
"added": [
{
"file": "crates/amlich/tests/cli_contract.rs",
"cases": [
{
"name": "day_json_exposes_engine_metadata_and_selector_effects",
"verifies": "CLI JSON matches the canonical engine contract and selector-enabled output changes predictably."
},
{
"name": "range_rows_match_day_results_for_shared_fields",
"verifies": "Range output stays aligned with per-day output on overlapping metadata and sections."
}
]
}
]
},
"discoveredIssues": [
{
"severity": "low",
"description": "Desktop and WASM consumers still use legacy DTO entrypoints and will need a follow-up migration if they must adopt engine selectors.",
"suggestedFix": "Track a later consumer migration mission after CLI/TUI contract stabilization."
}
]
}
amlich-api first.