Skip to content

feat(core): disclose and load skills with their directory and arguments - #496

Merged
lg2m merged 5 commits into
mainfrom
feat/plan-f-skills
Oct 29, 2026
Merged

lg2m merged 5 commits into
mainfrom
feat/plan-f-skills

Conversation

@lg2m

@lg2m lg2m commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

Change

Plan section F (skills).

  • The skill index tells the model to call load_skill before acting when a task matches a skill's description. The text lives in workspace/skills.rs, not the prompt body. The agent prompt version goes to 28.
  • A loaded skill states its directory, says its relative paths resolve against it, and lists up to 32 files beside it. Workspace skills get workspace-relative paths, so read_file works on them.
  • $ARGUMENTS is replaced by the text after /name, or by a new optional arguments field on load_skill.
  • A top-level front-matter name: names the skill. Invalid, reserved, and nested keys are ignored.
  • .agents/skills is now disclosed to the model. Each name keeps only its highest-precedence source (workspace .qq/ and packs, then global, then .agents/ and .claude/), so a mirrored .qq/skills copy is listed once. .claude/ stays /name-only.
  • New global root at <config>/skills (~/.config/qq/skills on Linux). A symlinked directory is followed, and creating it later recompiles the plan.
  • The rendered index is capped at 8 KiB, with a "(N more not listed)" line. Unlisted skills stay loadable by name. When the 64-entry limit is hit, lower-precedence sources are dropped first.

Verification

  • Unit tests for each rule: cargo nextest run -p qq-core -E 'test(/skill|guidance|pack/)' passes. a_full_index_drops_lower_tiers_before_native_skills fails with the precedence sort removed.
  • Scripted-provider run: a_model_loads_a_matching_skill_with_arguments_and_reads_the_script_beside_it. The model calls load_skill {"name":"greet","arguments":"Ada"} and gets back the directory, the listed scripts/greet.sh, and Run scripts/greet.sh Ada., then reads the script.
  • qq-host: global_skills_come_from_the_configuration_directory.
  • New smoke scenario run-skill, on the real binary: cargo xtask smoke --only run-skill passes. The script beside the skill runs through exec and prints hello Ada. On Windows it is read instead of run.
  • cargo xtask check on 99155830: fmt, lint and clippy pass. The test gate failed only on session tests that hit Elapsed timeouts while the machine was at load ~20. Each passes when rerun alone (edit_approvals_carry_the_diff_preview_and_apply_after_approval on the last run).

Known impact

  • Agent prompt 27 → 28. The plan descriptor digest golden is updated because the descriptor carries the prompt version.
  • Repositories with .agents/skills now have those skills listed in the system prompt.
  • The SkillSummary.source docs mention global:skills/.... No wire shape change.
  • xtask/src/legacy-sleeps.txt: five existing qq-host entries shift one line. No new sleeps.

lg2m added 2 commits October 28, 2026 19:14
…ts (plan F)

- the skill index tells the model to load_skill a matching skill before acting
- a loaded skill states its directory, that relative paths resolve against it,
  and lists the files beside it
- $ARGUMENTS is replaced by /name's text or load_skill's new arguments field
- a top-level front-matter name: names the skill
- .agents/skills is disclosed; a name keeps only its highest tier, so copies
  of .qq/skills are dropped
- global root at <config>/skills (~/.config/qq/skills)
- the rendered index is capped at 8 KiB; unlisted skills stay loadable
- run-skill smoke scenario
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T03:08:25.365099Z f432439 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@lg2m

lg2m commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9f7fec7999

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/qq-core/src/workspace/skills.rs Resolved
@lg2m

lg2m commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: f4324398cf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@lg2m
lg2m merged commit c82939c into main Oct 29, 2026
10 checks passed
@lg2m
lg2m deleted the feat/plan-f-skills branch October 29, 2026 03:15
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