fix: always load archived beans, remove --with-archived flag#33
Merged
Conversation
- Epic for workflow CLI commands (beans-mmyp) - beans complete: complete a bean with optional summary - beans scrap: scrap a bean with required reason - beans start: start working on a bean - beans ready: find beans ready to work on - beans next: show highest-priority bean to work on - beans milestones: list planned milestones - beans blocked: show blocked beans - beans progress: show work status summary Refs: beans-mmyp
The --with-archived flag created a usability antipattern where users needed prior knowledge about whether something was archived to find it. Now archived beans are always loaded and visible in all queries. The archive remains purely an organizational mechanism (keeping .beans/ tidy) rather than an access control mechanism. Changes: - Remove --with-archived flag from root command - Remove withArchived field and methods from Core struct - Update loadFromDisk() to always include archive directory - Update watcher to always watch archive directory - Simplify LoadAndUnarchive() to work with always-loaded beans - Update archive command description - Remove special handling in check command - Update tests to reflect new behavior BREAKING CHANGE: The --with-archived flag is removed. Archived beans are now always included in all queries.
Generalize the loading mechanism to recursively find all .md files within the .beans directory tree. This prepares for future features like auto-filing beans into per-milestone or per-epic directories. Changes: - Replace loadFromDisk + loadBeansFromDir with filepath.WalkDir - Update watcher to watch all subdirectories - Add TestLoadFromSubdirectories to document the behavior
ea1311b to
129e2d1
Compare
hmans
added a commit
that referenced
this pull request
Dec 27, 2025
* main: fix: always load archived beans, remove --with-archived flag (#33) fix: prettify JSON output in --json mode
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.
Summary
--with-archivedflag entirely.beans/.beans/tidy) rather than an access control mechanismProblem
The
--with-archivedflag created a usability antipattern where users (or agents) needed prior knowledge about whether something was archived to find it. This led to surprising scenarios where searches would fail to find beans that existed but were archived.Solution
.mdfiles within.beans/, preparing for future features like auto-filing beans into per-milestone or per-epic directoriesChanges
Commit 1: Remove
--with-archivedflagwithArchivedvariable and flag registrationwithArchivedfield,SetWithArchived(),WithArchived()methodsCommit 2: Load beans from all subdirectories
loadFromDisk+loadBeansFromDirwithfilepath.WalkDirto recursively load all.mdfilesTestLoadFromSubdirectoriesto document the new behavior--with-archivedreferencesTest plan
--with-archivedflag is no longer available