feat(skills): add 7 bundled skills#272
Conversation
…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.
There was a problem hiding this comment.
💡 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".
|
|
||
| #[test] | ||
| fn bundled_skill_batch_invokes_with_expected_prompt() { | ||
| let registry = SkillRegistry::load_all(None); |
There was a problem hiding this comment.
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.
Summary
batch,loop,remember,simplify,stuck,verify) to standalone markdown files undercrates/lib/src/skills/bundled/, embedded viainclude_str!, and adds a brand-newapp-builderskill for scaffolding new projects turn by turn.BUNDLED_SKILL_FILESregistry constant that ships every file-backed bundled skill; loader logs a warning and skips any malformed file rather than panicking at startup.docs/extending/skills.mdx, and the mdBook mirror; bumps the bundled-skills count from 24 to 31; ticks Phase 8.3 items inROADMAP.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 inMEMORY.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-targetscargo clippy --all-targets -- -D warningscargo fmt --all -- --checkcargo test --tests --workspace -- --skip bwrap(the three skippedbwrap_*tests fail in containers without privileged uid mapping; they are unrelated to this change and pass on the same machine outside the container)BUNDLED_SKILL_FILESparsing, registry registration, expected-name drift detection, and exit-criterion presence.Notes
loopandapp-builderare intentionally prompt-only this release; both skill bodies and this PR description call out the deferred follow-up scope.