4 Commits

Author SHA1 Message Date
Yuhao
589ec132de Merge pull request #203 from sjhddh/fix/skill-description-empty-intro
fix: handle empty skill_intro in skill_description generation
2026-04-17 23:31:46 +08:00
sjhddh
5952147376 fix: handle empty skill_intro in skill_description generation
When a harness has no README.md, skill_intro is an empty string.
The previous code unconditionally appended " - ..." producing malformed
output like "Command-line interface for TestApp - ..." in SKILL.md
YAML frontmatter.

Also fixed: when skill_intro is non-empty but <=100 chars, no ellipsis
is appended (previously appended to complete text).

Applied the same fix to both:
- cli-anything-plugin/skill_generator.py (line 118)
- mubu/agent-harness/skill_generator.py (line 238)

Updated test_harness_without_readme to assert skill_description is
well-formed when intro is empty.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 19:05:31 +02:00
sjhddh
59f13c7a83 fix: extract_system_package returns wrong command for apt-get matches
The third regex pattern for apt-get install contains the substring "apt",
so the guard `if "apt" in pattern` matched it first and returned
`"apt install <pkg>"` instead of `"apt-get install <pkg>"`.

Fix by checking `"apt-get" in pattern` before `"apt" in pattern`.
Also adds backtick delimiters to the apt-get pattern for consistency
with the other two patterns.

Same fix applied to the duplicate in mubu/agent-harness/skill_generator.py.
Regression test added to test_skill_generator.py covering the apt-get case.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 19:05:31 +02:00
Sereja
262502f93e fix: address PR review — correct path mismatch, relocate tests
1. Rename pi-extension/ to .pi-extension/ to match Pi auto-discovery
   convention. Update root README install instructions to reference
   correct path and install.sh workflow instead of non-existent
   .pi-extension/extensions/cli-anything/.

2. Move test_skill_generator.py from .pi-extension/cli-anything/tests/
   to cli-anything-plugin/tests/ (next to skill_generator.py) so it
   runs standalone without fragile parent-navigation fallbacks.
   Update install.sh to copy tests during global install.

31/31 pytest tests pass.
2026-04-06 00:19:37 +03:00