Skip to content

feat(skills): add 7 bundled skills#272

Merged
emal-avala merged 2 commits into
mainfrom
feat/bundled-skills-batch
May 4, 2026
Merged

feat(skills): add 7 bundled skills#272
emal-avala merged 2 commits into
mainfrom
feat/bundled-skills-batch

Conversation

@emal-avala
Copy link
Copy Markdown
Member

Summary

  • Promotes six existing inline-string bundled skills (batch, loop, remember, simplify, stuck, verify) to standalone markdown files under crates/lib/src/skills/bundled/, embedded via include_str!, and adds a brand-new app-builder skill for scaffolding new projects turn by turn.
  • Adds a BUNDLED_SKILL_FILES registry constant that ships every file-backed bundled skill; loader logs a warning and skips any malformed file rather than panicking at startup.
  • Updates README, docs/extending/skills.mdx, and the mdBook mirror; bumps the bundled-skills count from 24 to 31; ticks Phase 8.3 items in ROADMAP.md.

What each new skill does

  • batch — apply a single change across many files or branches with a preview/confirm step before any write.
  • loop — run a check on a recurring interval until a condition holds (state exit condition, interval, ceiling, then poll). Prompt-only in this release; the daemon-side recurring schedule lives in the cron / scheduled-routines tools.
  • remember — long-term memory write helper that walks the user through type (user / feedback / project / reference) and scope (user / project / team) before writing the file and indexing it in MEMORY.md.
  • simplify — review changed code for reuse, quality, and efficiency; read-only by default, user opts into the cleanup pass at the end.
  • stuck — escape hatch when the agent is doom-looping. Reconstructs what was tried, names the shared assumption, proposes three genuinely different alternatives, asks the user to pick. Frames as "step back and re-evaluate," not "give up."
  • verify — independent verification pass after a non-trivial change. Checks blast radius (callers, callees, tests, edge cases) and cross-checks the PR narrative; produces a checklist for the lead agent rather than auto-fixing.
  • app-builder — clarify brief, pick stack, scaffold workspace, point at the dev-loop, then iterate turn by turn. Prompt-only in this release; the real sandboxed preview workspace + iframe + chat is deferred to a follow-up.

Test plan

  • cargo check --all-targets
  • cargo clippy --all-targets -- -D warnings
  • cargo fmt --all -- --check
  • cargo test --tests --workspace -- --skip bwrap (the three skipped bwrap_* tests fail in containers without privileged uid mapping; they are unrelated to this change and pass on the same machine outside the container)
  • New unit tests cover BUNDLED_SKILL_FILES parsing, registry registration, expected-name drift detection, and exit-criterion presence.
  • New integration tests assert the prompt fragment delivered to the model for each of the seven skills.

Notes

  • No new dependencies.
  • loop and app-builder are intentionally prompt-only this release; both skill bodies and this PR description call out the deferred follow-up scope.

…stuck, verify, app-builder)

Promote six existing inline-string skills (batch, loop, remember, simplify,
stuck, verify) to standalone markdown files under
`crates/lib/src/skills/bundled/`, embedded via `include_str!`, and add a new
`app-builder` skill for scaffolding new projects turn by turn.

The new `BUNDLED_SKILL_FILES` registry lists each shipped file. Loader logs
a warning and skips any file that fails to parse rather than panicking at
startup. Skill bodies follow the existing format (YAML frontmatter +
imperative numbered steps + STOP for confirmation + explicit exit
criterion).

`loop` and `app-builder` are prompt-only in this release: `loop` describes
the in-session cadence and points at the cron tools for daemon-side
recurring schedules; `app-builder` does the brief/stack/scaffold flow but
defers a real sandboxed preview workspace + iframe + chat to a follow-up.

Tests: every bundled file parses, the `BUNDLED_SKILL_FILES` registry
matches a hardcoded expected name list, each skill loads into the
registry, each skill expand() returns the body, and one integration test
per skill checks that the prompt fragment the LLM receives contains the
expected text.

Docs: README and skills.mdx grow rows for the new entries; the count goes
from 24 to 31. ROADMAP 8.3 marks the seven items shipped.
Copy link
Copy Markdown

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

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: 364a73f606

ℹ️ 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/lib/tests/skills_integration.rs Outdated

#[test]
fn bundled_skill_batch_invokes_with_expected_prompt() {
let registry = SkillRegistry::load_all(None);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Isolate bundled-skill prompt tests from user overrides

These new prompt-fragment tests call SkillRegistry::load_all(None), which also loads ~/.config/agent-code/skills before bundled skills (see load_all in crates/lib/src/skills/mod.rs). On any machine with a user-defined batch, loop, remember, etc., registry.find(...) will return the override and these assertions will fail even though bundled skills are correct, making the integration suite non-hermetic and flaky across environments. Use an isolated home/config dir (or a bundled-only loader path) so the tests always validate the shipped prompts.

Useful? React with 👍 / 👎.

The new integration tests in this PR called SkillRegistry::load_all(None),
which composes user-defined skills from ~/.config/agent-code/skills/
on top of bundled skills. On any developer or CI machine that happens
to ship a user-defined batch / loop / remember / etc., registry.find()
returned the override and the prompt-fragment assertions failed even
though the bundled skill was correct.

Adds SkillRegistry::load_bundled_only() — a constructor that skips
the user/project skill dirs and only walks BUNDLED_SKILL_FILES. The
14 callers in skills_integration.rs that previously used load_all(None)
now use load_bundled_only() so they always validate the shipped
prompts regardless of host environment.

load_all keeps its original semantics; nothing changes for the runtime
loader path.
@emal-avala emal-avala merged commit 07f0bdd into main May 4, 2026
14 checks passed
@emal-avala emal-avala deleted the feat/bundled-skills-batch branch May 4, 2026 23:30
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