docs(mt#1529): Inbox CLI UX spec — post-v1 verbs (mt#1529 research)#940
docs(mt#1529): Inbox CLI UX spec — post-v1 verbs (mt#1529 research)#940minsky-ai[bot] wants to merge 1 commit into
Conversation
…se, reopen, deadlines, priorities)
There was a problem hiding this comment.
Independent adversarial review (Chinese-wall)
Reviewer: minsky-reviewer[bot] via openai:gpt-5
Tier: unknown
Comprehensive docs-only spec with clear dry-run patterns and state-machine references. However, there is a fundamental semantic mismatch in §3.4/§5: the spec defines asks close as transitioning to cancelled while citing repo.close(), but the repository’s close() transitions to closed. This contradiction risks misimplementation and user confusion and must be corrected. Additional non-blocking notes: the claim/release sections suggest a metadata patch via transition("suspended") despite no repo API for metadata updates; extend-deadline assumes a setDeadline method not present (provisionally noted but could be clearer); and priority-in-metadata combined with asks list --priority would have performance/feasibility implications unless a dedicated column is introduced. Please address the blocking state mismatch and tighten repo-API references for clarity.
Findings
- [BLOCKING] docs/research/mt1529-inbox-cli-ux-spec.md:260 — asks close: documented transition/state contradicts repository semantics (repo.close() sets state "closed", not "cancelled")
In §3.4 "asks close" the spec defines the verb as operator-driven cancellation that transitions the Ask tocancelled, and in the Repository + state transition table it listsrepo.close()as the method and "Current state → cancelled" as the effect. However, the actual repository contractAskRepository.close()transitions the Ask to"closed"and explicitly setsstate: "closed"(see src/domain/ask/repository.ts: thecloseimplementation callsguardTransition(existing.state, "closed")and updatesstate: "closed"alongsideclosedAtandrespondedAt). There is no repository method that results incancelled, andcloseis semantically bound toclosedthroughout the codebase. This contradiction will mislead implementers and users about terminal semantics. Please align the verb semantics and transition table: either (a) define a dedicated cancel path (e.g.,repo.transition(..., "cancelled")with payload conventions) and stop referencingrepo.close(), or (b) change the CLI verb/description to reflect thatasks closeresults inclosed, notcancelled. The state-transition summary in §5 also repeats this mismatch and should be corrected accordingly. - [NON-BLOCKING] docs/research/mt1529-inbox-cli-ux-spec.md:118 — Claim/release implementation sketch suggests metadata patch via repo.transition even though no such metadata update API exists
In §3.2asks claimthe Repo + state transition table proposesrepo.transition(id, "suspended") + metadata patchfor recording claimedBy/claimedAt. The repository interface exposes no general "metadata patch" operation; only specific field updaters exist (updateRoutingTarget,updateWindowMissedCount,updateForceImmediate). Similarly forasks release. Callingtransition("suspended")as a no-op write to enable metadata persistence seems like an anti-pattern and might be unnecessary. Consider documenting a dedicatedrepo.updateMetadata(id, patch)orrepo.claim(id, operator)/repo.releaseClaim(id, force?)provisional methods in §5/§8, or clarify that implementations will perform a direct metadata update without a state transition. This avoids implying an API that doesn’t exist and reduces risk of consumers misusingtransitionfor non-state updates. - [NON-BLOCKING] docs/research/mt1529-inbox-cli-ux-spec.md:585 —
asks extend-deadlineassumes arepo.setDeadline()method not present in the current repository interface
Section 3.6 specifies updating deadlines via a newrepo.setDeadline()method, and §5 repeats this. The currentAskRepository(src/domain/ask/repository.ts) has no such method; only state transitions and a few targeted field updaters exist. While §8 marks this as provisional, it would help to explicitly listsetDeadlinein the "New repository methods required" block with a concrete signature (you do list it later in §5 bullets) and/or acknowledge the alternative of using a generalrepo.update()patch method if that lands in mt#1528. Minor clarity improvement, but the doc is internally mostly consistent. - [NON-BLOCKING] docs/research/mt1529-inbox-cli-ux-spec.md:732 —
asks set-prioritystores priority in metadata but list filters later treat it as canonical; call out indexing/filter implications
Section 3.7 defines priority inmetadata.priorityand §4 proposesasks list --priority <level>. Given the repo has no first-class priority field and list filters currently operate in-memory in asks.ts (gatherAsks fetches by state then filters), clarifying that--prioritywould be implemented either via client-side filtering (and thus non-performant) or requires a schema change (mt#1528 dedicated column + indexed) would set expectations. §8 mentions a possible dedicated column; referencing that from §4 would keep the spec coherent about performance and feasibility.
Summary
Research-only document specifying the post-v1 CLI surface for the Agent Inbox (mt#454). Covers
multi-operator concurrency verbs (
claim,release), lifecycle recovery verbs (close,reopen),deadline and priority management (
extend-deadline,set-priority,assign), batch operations,and a v2 verb backlog with 7 deferred entries. No code changes — docs only.
Motivation and Context
mt#1456 + mt#1458 shipped the v1 asks CLI (
list,create,respond,reconcile). This briefdesigns the next layer of verbs that multi-operator inbox workflows require, grounding each verb in
the existing
AskRepositoryinterface andstate-machine.tstransition table.Design Approach
src/domain/ask/state-machine.ts— no verb violates the existingtransition table without an explicit flag marking it as a new transition required by mt#1528.
onto Minsky verbs in §2.
--dry-runandrequires
--executeto apply. Each verb section specifies exactly what dry-run previews.--jsonoutput shapes).Key Changes
docs/research/mt1529-inbox-cli-ux-spec.md— new file (924 lines)claim,release,close,reopen,extend-deadline,set-priority,assign,batch-close,batch-assignasks listfilter extensions (--task,--deadline-before,--overdue, etc.)AskRepositorymethod(s)Dependencies on mt#1528
The following items in this spec are provisional and require mt#1528 finalization:
metadata.claimedByfieldreopentransitionclosed → suspendedin state machinereopenedstaterepo.setDeadline()methodrepo.update()repo.reassign()methodrepo.update()metadata.priorityfieldprioritycolumnasks reopencannot be implemented until mt#1528 addsclosed → suspendedto the state machine.All other verbs work with the current state machine and repository interface.
Acceptance Test Verification
(signature, params, exit codes, JSON shape, examples, errors, dry-run). Covered in §3.
against
src/domain/ask/state-machine.ts(asks reopenflagged as requiring new transition).Covered in §5.
--executeflag pattern. Covered in each verb's dry-run subsection in §3.Covered in §7.
asks.respondand mt#1456asks.listsurfaces maintained. Coveredin §6 and §9.
Testing
Docs-only PR — no runnable tests. Prettier was run and confirmed clean before commit.