feat: add project-local DeepAgents skills#8
Conversation
Load DeepAgents-native skills from the project-local .agents/skills directory for filesystem-backed sessions, while allowing explicit --skills-dir sources to override auto-discovery. Reject local skills on the state backend to avoid unsupported state-backed file loading. Split TUI assistant bubbles at tool boundaries so skill-loading tool calls do not make later output append to pre-tool text. Constraint: DeepAgents skills support requires deepagents>=0.6.7 Constraint: Local skill directories are only supported with filesystem backend Rejected: Implement a custom SKILL.md loader | duplicates DeepAgents native middleware Rejected: Load .deepagents/skills by default | user requested only .agents/skills Confidence: high Scope-risk: moderate Tested: uv run pytest tests/ Co-authored-by: OmX <omx@oh-my-codex.dev>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ca46ea88a1
ℹ️ 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".
| from deep_code_agent.models.llms.langchain_chat import create_chat_model | ||
|
|
||
| load_dotenv() | ||
| skills = _resolve_skills(args, codebase_dir) |
There was a problem hiding this comment.
Gate auto-discovered skills on filesystem backend
When the default backend remains state and the selected codebase already contains .agents/skills, this resolves a non-empty skills list and passes it into create_code_agent, which immediately raises ValueError("Skills require filesystem backend"). That makes otherwise normal state-backend CLI/TUI startup fail merely because the project has a skills directory; only explicit --skills-dir on the state backend should be rejected, or auto-discovery should be skipped unless args.backend_type == "filesystem".
Useful? React with 👍 / 👎.
| self._streaming_chunks.clear() | ||
| self._streaming_bubble = None |
There was a problem hiding this comment.
Preserve split bubbles after message completion
After a tool boundary this clears only the bridge's current segment, but StreamHandler still accumulates all message chunks for the turn and later emits MESSAGE_COMPLETE with the full combined text. In a response like Before → tool → After, the final complete event updates the post-tool bubble to BeforeAfter, duplicating the pre-tool text and undoing the intended split at tool boundaries.
Useful? React with 👍 / 👎.
Summary
--skills-dirvalues or default to<codebase_dir>/.agents/skills.Validation
uv run pytest tests/Notes
deepagentsto>=0.6.7so the nativeskillsparameter is available.