Skip to content

feat(cli): bundle workflow guides and add dpgen skills - #1985

Open
njzjz-bot wants to merge 2 commits into
deepmodeling:masterfrom
njzjz-bot:agent-dot/bundled-skills-cli-20261024
Open

njzjz-bot wants to merge 2 commits into
deepmodeling:masterfrom
njzjz-bot:agent-dot/bundled-skills-cli-20261024

Conversation

@njzjz-bot

@njzjz-bot njzjz-bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Bundle public workflow guides as offline, version-matched package resources.
  • Expose read-only documentation discovery via dpgen skills list and dpgen skills read <name> [relative-path].
  • Integrate relevant guide pointers into CLI help and retain existing CLI behavior.
  • Add packaging support and regression tests for resource lookup, safe reading, and help output.

Documentation

  • Document the new commands in the existing dedicated reference: doc/overview/cli.rst.
  • Keep the main README.md unchanged relative to upstream; use the existing docs navigation instead.
  • Distinguish reading installed guides from installing skills into an AI agent or executing workflows.

Validation

  • Added tests/test_skills.py and tests/test_skill_help.py.
  • Tests were reported completed before PR submission; no test rerun is claimed for the later documentation-only refinement.

Provenance

  • Original implementation: njzjz-bot:agent-dot/bundled-skills-cli-20261024.
  • PR opened and documentation placement refined by ChatGPT (GPT-6).
  • Documentation follow-up commits record the agent and model; no feature code was changed during documentation refinement.

Summary by CodeRabbit

  • New Features
    • Added dpgen skills list to display available workflow guides.
    • Added dpgen skills read to show a guide or a relative text file within it; guide commands also appear in workflow help.
    • Bundled workflow guides are available in installed distributions.
  • Documentation
    • Updated CLI documentation with the guide commands and clarified that they display documentation without running workflows or submitting jobs.

@codecov

codecov Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.68293% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.63%. Comparing base (0b9acec) to head (4404572).

Files with missing lines Patch % Lines
dpgen/skills.py 93.33% 4 Missing ⚠️
dpgen/main.py 90.90% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1985      +/-   ##
==========================================
+ Coverage   54.91%   55.63%   +0.72%     
==========================================
  Files          84       85       +1     
  Lines       15084    15141      +57     
==========================================
+ Hits         8283     8424     +141     
+ Misses       6801     6717      -84     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9e5731d3-decc-4faf-9fda-02dff3e1e7fe
Commits

Reviewing files that changed from the base of the PR and between b73b9bc and 4404572.

Files selected for processing: 1
  • doc/overview/cli.rst

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

Walkthrough

The CLI now lists and reads bundled workflow guides. It packages the skills directory, adds guide references to command help, and imports workflow implementations only when their commands run.

Changes: Offline Skills CLI

Layer / File(s) Summary
Package and validate skill resources
setup.py, MANIFEST.in, dpgen/skills.py, tests/test_skills.py
The build includes the skills directory in package outputs. Resource lookup supports packaged and source-tree locations. Reads validate names and paths, enforce containment, require regular files, and decode UTF-8. Tests cover invalid paths and symlink escapes.
Load workflow handlers on demand
dpgen/main.py, tests/test_skills.py
Workflow commands import their implementation modules when invoked. The command handlers use _run_command to call the selected functions. Tests check the module and function mapping.
Expose skills listing and reading
dpgen/main.py, dpgen/skills.py, tests/test_skills.py, tests/test_skill_help.py, doc/overview/cli.rst
The CLI adds skills list and read commands, workflow help hints, and offline guide documentation. Tests cover guide output, command help, and listing without calling workflow or info handlers.

Priority: Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant Main as dpgen.main
  participant Skills as dpgen.skills
  participant Resources as skill resources
  User->>Main: Invoke skills read command
  Main->>Skills: Call show_skills(args)
  Skills->>Resources: Locate and read requested file
  Resources-->>Skills: Return file contents
  Skills-->>User: Print file contents
Loading
Merge Risk: Minimal · up to 44045

The reviewed changes are mergeable with normal checks; no actionable current-head risk was established.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 23.81% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 21 functions across 5 files. (1 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "feat(cli): bundle workflow guides and add dpgen skills" matches the main change. The PR bundles canonical workflow guides into installed releases and adds a dpgen skills command with `l…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "feat(cli): bundle workflow guides and add dpgen skills" matches the main change. The PR bundles canonical workflow guides into installed releases and adds a dpgen skills command with list and read subcommands. The changeset includes the packaging changes (MANIFEST.in, setup.py), the CLI changes (dpgen/main.py, dpgen/skills.py), tests, and docs. The title is concise, specific, and follows a conventional-commit style. It does not describe anything absent from the changeset.

Full details: Docstring Coverage

Explanation

Docstring coverage is 23.81% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 21 functions across 5 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Keep the main README focused; document version-matched offline guides under doc/overview/cli.rst.

Agent: ChatGPT
Model: GPT-6
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