Polishing CLI#77
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR polishes the Donna CLI by flattening its command structure (removing the workspaces, sessions, and artifacts command groups in favor of top-level commands like init, start, run, list, etc.) and refactors the supporting domain types. It introduces a typed path system (donna/domain/paths.py), splits artifact/section identifiers into helper-driven NewTypes, replaces time-based caching with file-fingerprint-based caching, and accepts root-anchored, relative, or absolute project paths in artifact arguments.
Changes:
- Flatten CLI subcommands and rename
action-request-completedtocomplete-action-request; entry point now usesdonna.cli.application:mainwhich registers commands lazily. - Introduce
donna/domain/paths.pytyped paths and a newdonna/workspaces/paths.pyresolver; rewriteartifact_idsaroundNewTypeplus helper functions (artifact_section_id,split_artifact_section_id, etc.) and let artifact CLI args accept relative/absolute paths. - Replace the time-based
TimedCachewith aFileFingerprint-based cache for artifacts/state, drop thecache_lifetimeconfig option, and addSessionStateChangedExternallyerror; initialization writes a TOML fixture and no longer eagerly creates the session dir.
Reviewed changes
Copilot reviewed 46 out of 46 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Update CLI examples to flattened command names and explain lazy session dir. |
| pyproject.toml | Point entry point at donna.cli.application:main. |
| donna/cli/main.py | Delegate to main() instead of importing commands here. |
| donna/cli/application.py | Add main() that registers commands and runs app. |
| donna/cli/commands/{workspaces,sessions,artifacts}.py | Drop sub-Typers and register commands directly on app; parse path arguments through new helpers. |
| donna/cli/types.py | Replace ID parsers with raw-string parsers and parse_artifact_*_argument resolution helpers. |
| donna/cli/{entities,utils}.py | Use new UntrustedPath/PathInput types. |
| donna/domain/paths.py | New NewType-based path taxonomy. |
| donna/domain/artifact_ids.py | Rewrite IDs as NewType plus validation/split/build helpers. |
| donna/domain/types.py | Remove Milliseconds. |
| donna/workspaces/paths.py | New module for resolving and normalizing project paths. |
| donna/workspaces/initialization.py | Write fixture-based config; remove eager session-dir creation. |
| donna/workspaces/fixtures/base_config.toml | New default config fixture. |
| donna/workspaces/{config,errors,artifacts,sessions}.py | Switch to new typed paths and helper APIs; add fingerprint-based artifact API. |
| donna/workspaces/files.py | New FileFingerprint value object. |
| donna/context/{artifacts,state,primitives}.py | Replace timed cache with fingerprint cache; add external-change detection. |
| donna/context/entity_cache.py | Removed. |
| donna/machine/{tasks,state,sessions,errors}.py | Use split_artifact_section_id/artifact_section_id; add SessionStateChangedExternally. |
| donna/primitives/{artifacts,directives,sections}/*.py | Adopt new artifact-section helpers. |
| donna/core/utils.py | Return ProjectRootPath from discovery helpers. |
| donna/skills/fixtures/*.md | Update agent skill docs to flattened CLI. |
| donna.toml | Drop cache_lifetime. |
| .agents/donna/, .agents/skills/ | Remove obsolete agent docs and skills. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.