Repository navigation
Resolve the trail commands from a workspace view - #332
Merged
Merged
Conversation
From a workspace view (a directory outside git that links its planning repo), verify, view, status, stats, report generate, decisions generate, approval *, decision record and import stopped with "Not a git repository. Run 'git init' first", advice that would turn the view into a repository. They resolved the repository root with resolveRepositoryRoot directly, while orient, refresh, note, decision capture, task and the rest go through resolveBasouRootForCommand. They now go through it too, so a view resolves to the repository it links and a portfolio member to the workspace that aggregates it. init, project new, exec and run work on the repository they run in, so they keep resolving in place, through a new resolveRepositoryRootInPlace. Outside git it tells a workspace view apart from a plain directory and, for a view, says what the directory is instead of advising git init. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- basou view: a portfolio card with no store of its own (a workspace view, a portfolio member) refuses a refresh or an import with "Workspace not initialized", as 0.65.0 did. Its import now resolves to the workspace that aggregates it while the card's paths stay put, so an import wrote into another card's store and a refresh wrote part of its work and then failed. - Capture coverage resolves each registered entry as basou import does (resolveBasouRootForCommand, quietly, against the registry it checks), so a registered view or member declares the roots of the workspace it resolves to instead of being reported as an entry import cannot run in. - Tests: show, approve and reject from a view; verify and decision record from a portfolio member (HOME stubbed to a fixture registry); the working directory decision record records from a view; a failing git in an existing repository surfaces as "Git command failed"; the uninitialized card; coverage of a registered view and member. Coverage tests resolve against an absent registry instead of the developer's own. - Comments that the change made stale (decision, view, import, coverage). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
The commands that read or write a workspace's trail (
verify,view,status,stats,report generate,decisions generate,approval *,decision record,import claude-code/import codex) now resolve a workspace view to the repository it links, asorient,refresh,note,decision capture,taskand the rest already do.init,project new,execandrunkeep resolving in place, but from a workspace view they now say what the directory is instead of advisinggit init.Why
A workspace view is a directory outside git that links its planning repo, and it is the operator's daily cwd. From one,
basou verify,view,statusandstats(reproduced) stopped withNot a git repository. Run 'git init' first, then re-run 'basou <command>'.: following that advice would turn the view into a repository, which it is designed not to be. These commands calledresolveRepositoryRootdirectly; the other commands go throughresolveBasouRootForCommand, which redirects a view to the repository it links and a storeless portfolio member to the workspace that aggregates it. They now go through it too (the helpers they used are removed).initandproject newset up the repository they run in, andexecandrunrun a child there and record its git changes, so redirecting them would initialize or snapshot the wrong repository. They resolve through a newresolveRepositoryRootInPlace, which tells a workspace view (a non-git directory whose links include one repository, or more, with a.basoustore) apart from a plain directory and printsNot a git repository: this is a workspace view (it links <name>). Run 'basou <command>' inside a repository instead.for a view. A directory that is not a view keeps thegit initadvice, word for word.No
--jsonshape, exit code, flag or on-disk format changes: commands that failed from a view now succeed, and the new message is prose.Checklist
main.approvalcoveringlist,show,approveandreject), portfolio-member tests forverifyanddecision record(HOME stubbed to a fixture registry), unit tests forresolveRepositoryRootInPlace(in a repository, a view with one link, a view with two, a directory whose links hold no store, a plain directory, a repository whose git fails), the uninitialized portfolio card, and coverage of a registered view and member. Each fails when the resolution it covers is reverted: no redirect for each of the nine (and forapproval showandapprove/rejectseparately), no member resolution forverifyanddecision record, a redirect for each of the four, the in-place guard removed, the card gate removed, coverage resolving the git toplevel only, anddecision recordrecording the cwd as its working directory.pnpm lint,pnpm typecheck, andpnpm testare all green locally (core 2620, sdk 65, cli 1461; lint reports the same 4 warnings asmain).CHANGELOG.md## Unreleasedupdated (### Fixed, three entries).Review
A convergent review (one round, review-only) ran before merge. Applied in the second commit:
basou view: a portfolio card with no store of its own refuses a refresh or an import withWorkspace not initialized, as 0.65.0 did. With the change, its import resolved to the workspace that aggregates it while the card's paths stayed put, so an import (reached only by a direct HTTP request; the UI does not open such a card) wrote into another card's store, and a refresh wrote part of its work and then failed.view --portfolio --check) resolves each registered entry asbasou importdoes, so a registered view or member declares the roots of the workspace it resolves to instead of being reported as an entry import cannot run in (refresh --portfolioalready resolved it that way).approval show/approve/reject, the member path, the working directory and the in-place guard; comments the change made stale.Left for separate work: a relative
--linked-fileis checked against the cwd but rendered against the resolved root, whichdecision capturealready does from a view; and the commands' tests read the developer's own~/.basou/portfolio.yamlwhen they resolve a storeless repo, asorientand the other commands' tests already do.Related
Reproduced from a workspace view with build a93e199 (v0.65.0):
verify,view,statusandstatsexited 1 with thegit initadvice; with this branch they resolve, andinit,execandproject newprint the view message.🤖 Generated with Claude Code