Skip to content

feat: planqueue backlog CLI codifying the ordering interface#1

Closed
aryrabelo wants to merge 3 commits into
mainfrom
feat/backlog-cli
Closed

feat: planqueue backlog CLI codifying the ordering interface#1
aryrabelo wants to merge 3 commits into
mainfrom
feat/backlog-cli

Conversation

@aryrabelo

Copy link
Copy Markdown
Owner

Codifies the pending-items ordering as a real CLI over ~/.planqueue/backlog.db. The store OWNS PRAGMA foreign_keys=ON per connection and an atomic cycle-guard inside every edge-insert transaction (so a dep can never close a cycle -> silent deadlock).

src/backlog.ts (BacklogStore, bun:sqlite) + src/cli.ts (argv, JSON stdout, imports resolveLocation from planqueue-core). New bin 'planqueue'. 8 tests, bun+typecheck+biome clean, smoke-tested e2e.

Caveats:

  • Swept a pre-existing 0.1.0->0.1.1 version bump that was already in the working tree — drop it if unintended.
  • DOX pass on src/AGENTS.md pending (protected-path hook blocks the agent).

aryrabelo added 3 commits July 3, 2026 12:11
Replaces the pending-items skill's hand-pasted SQL with a real CLI over
~/.planqueue/backlog.db. The store OWNS the two invariants the prose SQL left to
caller discipline:
- PRAGMA foreign_keys = ON on every (fresh) connection.
- an atomic cycle-guard inside the same transaction as every edge insert, so a
  dependency can never close a cycle (which the non-recursive ready query would
  otherwise turn into a silent deadlock).

src/backlog.ts = BacklogStore (bun:sqlite; ready/blocked/addDep/setStatus/addEpic).
src/cli.ts = argv dispatch, JSON stdout, imports (not copies) resolveLocation from
@aryrabelo/planqueue-core to derive the current repo for ready ordering. New bin
'planqueue'. 7 unit tests (temp db) cover ready ordering, blocked, and the cycle
guard (self/missing/direct/transitive). bun test + typecheck + biome clean.

Follow-up (blocked by protected-path hook): DOX pass on src/AGENTS.md to document
the new CLI surface.
- Document the 0.1.1 changes: /clear-note, /rebuild-note, the widget/label
  rename, and the new planqueue backlog CLI (bin entry).
- Sync pi.setLabel to 'PlanQueue · Notes' to match the widget branding.
@aryrabelo

Copy link
Copy Markdown
Owner Author

Moved to a dedicated operator-owned package @aryrabelo/operator-backlog. The epic/backlog level is a hermes-operator concern and must not ship inside the OSS PlanQueue notes plugin. PlanQueue stays clean (notes/FIFO only); operator-backlog imports resolveLocation from @aryrabelo/planqueue-core.

@aryrabelo aryrabelo closed this Jul 5, 2026
@aryrabelo aryrabelo deleted the feat/backlog-cli branch July 5, 2026 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant