Repository navigation
Description
Overview
task has no way today to declare that it is blocked by, or blocks, another task — nor a general "relates to"/"duplicates" link, nor who originally created/reported it (distinct from assignee, which already exists via person.tasks). Every mainstream work-tracking tool (Jira's "blocks"/"is blocked by"/"relates to", Linear's issue relations and Reporter field) treats these as first-class, universal capabilities — not something specific to any one methodology. They belong on the core task/person schemas themselves, the same way project.tasks and person.tasks (→ assignee) already do, not gated behind a specific recipe's install.
Problem Statement
There is no relationship in packages/core/src/models/core_schemas.rs or packages/core/src/models/schema.rs's BUILTIN_RELATIONSHIP_NAMES for task-to-task blocking/relation links, or for a task's creator/reporter (as opposed to its assignee) — confirmed via direct inspection of both files, and via search of ../nodespace-docs/decisions/ and ../nodespace-docs/components/ for blocks/blocked_by/depends_on/reporter/creator as task-relationship concepts (no ADR names any of these; unrelated hits are about build/task-graph ordering, not this feature). A methodology recipe wanting to demonstrate real Jira/Linear-style workflows has nothing to build on for this without first defining it.
Proposed Solution
Three separate SchemaRelationship declarations, all optional (required: None throughout — the common case for every one of these is absence), all reusing the existing SchemaRelationship/set_schema_declarations mechanism already exercised by project.tasks and person.tasks/assignee — no new relationship machinery required for any of them.
1. Self-referential blocking pair on task (mirrors project.tasks's declaration shape, packages/core/src/models/core_schemas.rs ~line 371-381, but Many/Many since a task can block multiple others and be blocked by multiple others):
SchemaRelationship {
name: "blocks".to_string(),
target_type: Some("task".to_string()),
direction: RelationshipDirection::Out,
cardinality: RelationshipCardinality::Many,
required: None,
reverse_name: "blocked_by".to_string(),
reverse_cardinality: RelationshipCardinality::Many,
edge_fields: None,
description: Some("Tasks that cannot start/complete until this task is done".to_string()),
},2. Self-referential, symmetric-in-meaning relation pairs on task (same shape, seeded as separate optional declarations; duplicates is directional — one task is the duplicate of another — relates_to is a weaker, non-directional-in-meaning link but still stored as a directed edge like every other relationship here):
SchemaRelationship {
name: "relates_to".to_string(),
target_type: Some("task".to_string()),
direction: RelationshipDirection::Out,
cardinality: RelationshipCardinality::Many,
required: None,
reverse_name: "related_from".to_string(),
reverse_cardinality: RelationshipCardinality::Many,
edge_fields: None,
description: Some("Tasks this task is related to, with no directional dependency".to_string()),
},
SchemaRelationship {
name: "duplicates".to_string(),
target_type: Some("task".to_string()),
direction: RelationshipDirection::Out,
cardinality: RelationshipCardinality::Many,
required: None,
reverse_name: "duplicated_by".to_string(),
reverse_cardinality: RelationshipCardinality::Many,
edge_fields: None,
description: Some("The task(s) this task duplicates".to_string()),
},3. Creator/reporter pair on person (mirrors person.tasks's existing assignee declaration exactly, ~line 1329-1340, distinct relationship name since a task can have a different creator than assignee):
SchemaRelationship {
name: "reported_tasks".to_string(),
target_type: Some("task".to_string()),
direction: RelationshipDirection::Out,
cardinality: RelationshipCardinality::Many,
required: None,
reverse_name: "creator".to_string(),
reverse_cardinality: RelationshipCardinality::One,
edge_fields: None,
description: Some("Tasks originally reported/created by this person".to_string()),
},Once ../nodespace-docs/decisions/078-schema-extends-relationship-for-field-composition.md (ADR-078)'s extends lands (tracked by #2598), any task-extending schema (e.g. a future issue schema) inherits all of these automatically — no separate declaration needed on the extending schema, consistent with how extends composes relationships the same as fields.
Architecture Impact
No existing ADR documents task dependency/relation/creator relationships — this is new capability, not a reversal of a prior decision.
Acceptance Criteria
-
taskschema declaresblocks/blocked_by,relates_to/related_from,duplicates/duplicated_byas shown above, seeded via the existingset_schema_declarationspath -
personschema declaresreported_tasks/creatoras shown above, alongside its existingtasks/assigneedeclaration - All new relationships are queryable via existing relationship-traversal APIs (
NodeService::get_related_nodes), matching howproject.tasks/tasks.projectandperson.tasks/assigneealready work -
required: Noneon every new declaration, both ends - A cycle (
A blocks B blocks A) is representable at the data level (no new cycle-detection required — existing relationships already permit cycles unless explicitly validated against; confirm during implementation whether this needs the same treatment as any other schema relationship, i.e. none, since only ADR-078'sextendsrequires cycle detection, not general relationships) - Tests pass (
bun run test:all) - Code passes
bun run quality:fix
Technical Specifications
Reference Files
packages/core/src/models/core_schemas.rs(~line 44,taskschema; ~line 371-381,project.tasks— the exact shape for the self-referential pairs to mirror; ~line 1329-1340,person.tasks/assignee— the exact shapereported_tasks/creatormirrors)packages/core/src/models/schema.rs—BUILTIN_RELATIONSHIP_NAMES(confirm whether any of these names need to be added here, or whether schema-declared relationships on a core type don't require that list —project.tasks/tasks.projectdid not need an entry there, so precedent suggests no change needed, but verify during implementation)packages/core/tests/schema_relationship_declarations_test.rs— existing test coverage pattern for schema-declared relationships to follow
Dependencies
None — this can be implemented independently of extends (#2598); extending schemas simply inherit these once extends lands.
Related Issues
- Add methodology recipe mechanism (TS source, generated CLI reference doc) with Linear-style as first recipe #2596 (Linear-style methodology recipe) — a natural consumer of all three relationship pairs once they exist, for Linear-style issue relations and Reporter, though not a blocker for either issue
- Seed a core Play that completes a parent task when all its children are done #2636 (auto-complete parent when children done) — a related but distinct core Play; this issue only adds relationships, not any Play logic gating a task's start/completion on its blockers
Non-Goals
- Any Play/automation enforcing that a blocked task cannot start or complete until its blocker is done — this issue is schema-only; enforcement behavior (if wanted) is separate future work
- UI for authoring/displaying any of these relationships — schema/data-layer only
Activity
[-]Add core blocks/blocked_by relationship on task[/-][+]Add core blocks/blocked_by, relates_to/duplicates, and creator relationships on task[/+]malibio commentedon Sep 17, 2026
Baseline (frontend): Test Files 247 passed, Tests 5085 passed.