Repository navigation
feat(cli): close the command-surface gaps around maps, goals, and artifacts - #89
Merged
Merged
Conversation
…ifacts - `map archive` / `map unarchive`, with `map list --all`; a map-scoped command against an archived map names the archive and how to restore it instead of claiming the map does not exist. - `map create --allowed-step-types` and `map restrict` set or clear a map's allowed step types; `map show` reports the current value. - `context --map <name>` renders artifact (and step) scope without WAYFUL_MAP set. - `goal show` reports a goal's description, body, required output slots, and current attachments. - `artifact show` dereferences an attached markdown `file:` ref and prints its content, keeping opaque refs opaque and refusing unattached refs. Both filesystem and GitHub backends implement the new MapStore operations: filesystem stamps `archived_at` in `map.toml`; GitHub closes and reopens the map issue and carries the restriction in the issue body.
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.
What & why
Closes #82. Closes the gaps an agent reaches for and does not find in the CLI, on both the filesystem and GitHub backends.
User-facing change
wayful map archive/wayful map unarchive,wayful map list --all; a map-scoped command names the archive and how to restore itwayful map create --allowed-step-types …andwayful map restrictset/clear it;wayful map showreports itWAYFUL_MAPwayful context 'file:docs/spec.md' --map <name>showwayful goal showreports description, body, required outputs, and attachmentsartifact showreported a ref and kind but never its contentartifact showdereferences an attached markdownfile:ref and prints its content; opaque refs stay opaque and unattached refs are refusedBefore / after example session
Before:
After:
How
MapMetadatagains a derivedarchivedflag. Filesystem storesarchived_atinmap.toml; GitHub derives it from the map issue's closed state, so no fact is stored twice.MapStoregainsarchiveMap,unarchiveMap, andsetAllowedStepTypes, plusincludeArchivedonlistMapsandallowedStepTypesoncreateMap.resolveMaprefuses an archived map with the restore hint.MapStore, so they behave the same under both backends; backend-specific behaviour is only how the state is represented.Tests
command-surface.test.ts(archive lifecycle, type restrictions,context --map,goal show,artifact showcontent).MapStorecontract gains archive/unarchive/restriction cases; GitHub store tests cover close/reopen,includeArchived, and body/state mutations.bun checkpasses (CLI 335 pass / UI 49 pass).Closes #82.