Skip to content

feat(cli): add read-only load_skill command - #17

Merged
RainLib merged 2 commits into
feature/pptx-slide-removal-parityfrom
feature/cli-load-skill-parity
Jul 21, 2026
Merged

feat(cli): add read-only load_skill command#17
RainLib merged 2 commits into
feature/pptx-slide-removal-parityfrom
feature/cli-load-skill-parity

Conversation

@RainLib

@RainLib RainLib commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • embed the bundled skills/ tree into the Rust binary at build time
  • add the read-only load_skill, load_skill <name>, and load_skill <name> --path <relpath> surfaces from C#
  • strip setup instructions from loaded entry files and append a compact reference manifest
  • reject traversal and binary assets on the text channel without installing or writing files
  • record CLI-003 as implemented in the durable C# parity ledger

Atomic scope

This PR only ports CLI-003 (load_skill). It is stacked on the schema CRC PR because both use the same build-time embedded-resource generator; the diff against its base contains no schema CRC behavior.

Validation

cargo fmt -- --check
cargo clippy --all-targets -- -D warnings
cargo test --workspace
cargo test -p officecli commands::load_skill::tests
cargo test -p officecli --test cli_smoke test_load_skill
target/debug/officecli help load_skill
target/debug/officecli load_skill morph-ppt --path reference/decision-rules.md

All passed locally. The tests cover the catalog, full front-matter descriptions, alias casing, setup-section removal, reference manifests, direct text reads, Windows separators, traversal rejection, binary rejection, unknown skills, and absence of install side effects under an empty temporary HOME.

Merge order

Merge PR #13 first, then PR #16, then this PR. Retarget this PR to main after its base is merged.

@RainLib

RainLib commented Jul 21, 2026

Copy link
Copy Markdown
Owner Author

验证完成:

  • cargo fmt -- --check:通过
  • cargo clippy --all-targets -- -D warnings:通过
  • cargo test --workspace:通过
  • load_skill 单元测试 5 项:通过
  • load_skill CLI smoke 2 项:通过
  • /private/tmp 运行嵌入资源的目录与引用读取:通过
  • 独立 Build & Release 工作流:Lint/Test 与 7 个发布目标全部通过

CI: https://github.com/RainLib/OfficeCli-rust/actions/runs/29794985906

唯一注解是 actions/cache@v4 的 Node.js 20 弃用警告,不影响本 PR 的构建与验证结果。

Base automatically changed from feature/cli-schema-crc-parity to feature/pptx-slide-removal-parity July 21, 2026 02:49
@RainLib
RainLib merged commit abce5c7 into feature/pptx-slide-removal-parity Jul 21, 2026
@RainLib
RainLib deleted the feature/cli-load-skill-parity branch July 21, 2026 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant