Skip to content
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
PerishCode merged 3 commits into
mainfrom
feat/plane-dep
Jul 1, 2026
Merged

dep: label-backed cross-project dependency surface (add/rm/ls/gc)#11
PerishCode merged 3 commits into
mainfrom
feat/plane-dep

Conversation

@PerishCode

Copy link
Copy Markdown
Contributor

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/v1 endpoint). 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 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; 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 the dep:* 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] — parse dep:* labels, resolve each target via GET work-items/KEY-SEQ/, print the name or flag dangling; --json.
  • plane dep gc --project P [--write] — delete orphan dep:* labels (labels no item carries); dry run unless --write.

commands/api/dep.rs + wiring; skills/plane-cli/references/api.md documents it. DAG diagnosis (plane dep doctor) is deferred to a follow-up.

Tests

cargo fmt --all --check                                          -> clean
cargo clippy --locked --workspace --all-targets -- -D warnings   -> clean
cargo test --locked --workspace                                  -> 68 passed (21 + 47)

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

  • Edges live in the label namespace (the only cross-project, queryable primitive Plane exposes). gc prunes orphan labels so the label list stays equal to the live edge set. Native cross-project relations remain the long-term server-side fix.

PerishCode and others added 3 commits July 1, 2026 13:14
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>
@PerishCode
PerishCode merged commit 006b7b4 into main Jul 1, 2026
1 check passed
@PerishCode
PerishCode deleted the feat/plane-dep branch July 1, 2026 06:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants