This repository was archived by the owner on Jul 15, 2026. It is now read-only.
dep: label-backed cross-project dependency surface (add/rm/ls/gc) - #11
Merged
Conversation
Plane's native relations do not cross projects, so cross-project dependency edges are stored as `dep:<KEY>:<SEQ>` labels on the dependent item (an item carrying `dep:PLANE:5` is blocked by PLANE-5). Labels are the durable, queryable edge store; `plane dep` is the CRUD + query layer over them. DAG diagnosis (`doctor`) is deferred to a follow-up. - `plane dep add --project P --work-item ID --on KEY:SEQ` — validate the target exists (forward references are rejected), ensure the dep label, attach it (read-modify-write of the work item's labels, since the API replaces the set). - `plane dep rm ... --on KEY:SEQ` — detach the label; the label object is kept. - `plane dep ls --project P [--work-item ID]` — parse dep:* labels, resolve each target via GET work-items/KEY-SEQ/, print name or flag dangling; `--json`. - `plane dep gc --project P [--write]` — delete orphan dep:* labels; dry run unless --write. commands/api/dep.rs plus wiring and a top-level `plane dep`. Unit tests cover the on/label parsing and label-id extraction; skills/references document it. Live-verified against a real workspace (add/idempotency/reject/rm/gc all pass). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
references/api.md already documents the surface; add a one-line entry to the SKILL.md command overview so it is discoverable from the skill entry point. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Distill the practice from building the plane-cli/Plane project portfolio. - skills references/scenarios.md: add "Scenario D — Cold-start a project skeleton", a scale-aware playbook (single repo = one project + labels; multi-repo = project-per-repo + `plane dep` edges, kept a DAG). Ships with the `plane dep` command in this PR. - AGENTS.md maintenance flows: add "Iterating the agent skill" — the source location, the SKILL.md content boundary, packaging, and the edit -> PR -> release -> `plane skill upgrade` loop, including the rule that a command documented in the skill must already exist in the released binary. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
lefarcen
approved these changes
Jul 1, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Why
Plane's native work-item relations do not cross projects, but real dependencies do (e.g. a plane-cli command depends on a Plane-server
api/v1endpoint). We need a way to record and query cross-project dependency edges today, without waiting on server-side support.What
plane dep— a top-level surface that stores dependency edges asdep:<KEY>:<SEQ>labels on the dependent item (an item carryingdep:PLANE:5is blocked by PLANE-5). Labels are the durable, queryable edge store; the CLI is the CRUD + query layer.plane dep add --project P --work-item ID --on KEY:SEQ— validate the target exists (forward references are rejected), ensure thedep:*label (reserved color), and attach it. Attach is a read-modify-write of the item's labels, since the API replaces the whole set.plane dep rm ... --on KEY:SEQ— detach the label; the label object is kept.plane dep ls --project P [--work-item ID]— parsedep:*labels, resolve each target viaGET work-items/KEY-SEQ/, print the name or flag dangling;--json.plane dep gc --project P [--write]— delete orphandep:*labels (labels no item carries); dry run unless--write.commands/api/dep.rs+ wiring;skills/plane-cli/references/api.mddocuments it. DAG diagnosis (plane dep doctor) is deferred to a follow-up.Tests
Unit tests cover
--on/label parsing and label-id extraction. Live-verified against a real workspace: add + idempotency, forward-ref + bad-format rejection, ls resolution, and the rm → gc-dry-run → gc --write orphan-cleanup cycle all pass.Trade-off worth flagging
gcprunes orphan labels so the label list stays equal to the live edge set. Native cross-project relations remain the long-term server-side fix.