Repository navigation
Description
Overview
Two small, independently-motivated but co-located fixes to the project and task core schemas in packages/core/src/models/core_schemas.rs, bundled because they touch the same file and the same two schema definitions:
- Several field
descriptionvalues are redundantly prefixed with the owning type's name (e.g.project.status→"Project status"), even thoughdescriptionis rendered as the field's own label inside a form already scoped to that type. projectandtaskhave no relationship between them despite being an obvious, expected pairing (a project's tasks / a task's project) —project.relationshipsis currently[].
Neither requires a data migration: (1) is a text-only change with no data-shape impact, and (2) is purely additive schema metadata — no existing project/task node needs to change, and no relationship table rows are created by declaring the schema relationship (see clarification below).
Problem Statement
Part 1 — Redundant description prefixes
description is used directly as the form field label, not as a secondary tooltip/hint:
<!-- packages/desktop-app/src/lib/components/schema/generic-schema-form.svelte:160 -->
{field.description || formatFieldLabel(field.name)}
<!-- same pattern in task-schema-form.svelte:633 and schema-property-form.svelte:399 -->So a redundant type-name prefix in description shows up verbatim as the visible label, e.g. "Project Status" instead of "Status" inside a form that is already contextually a Project.
Confirmed inconsistent, queried live from core_schemas.rs / the running database:
project(packages/core/src/models/core_schemas.rs:236,267,285,303) — all 4 fields prefixed:"Project status","Project priority","Project start date","Project end date"task— inconsistent within the same schema:status→"Task status",priority→"Task priority"(prefixed), butdue_date→"Due date",started_at→"Started at",completed_at→"Completed at",assignee→"Assignee"(not prefixed)person— no prefix on either field; both are genuinely descriptive prose (e.g."Display name; optional — a person may exist before a name is set")skill— no prefix on any field; same, genuinely descriptive (e.g."What this skill does (drives semantic search discovery)")
The task/project prefixed fields (status/priority) share an identical enum-field shape (core protection, coreValues/userValues, extensible), suggesting the prefix was introduced once and copy-pasted for structurally similar fields across the two schemas, while other fields were written independently without it. person and skill show the intended, unprefixed convention already exists in the codebase — it's just not applied consistently.
Part 2 — Missing project ↔ task relationship
project's schema declares relationships: vec![] (packages/core/src/models/core_schemas.rs, ~line 311). No relationship exists between project and task in either direction, despite this being an expected, obvious pairing — a project should be able to show/manage its tasks, and a task should show which project it belongs to.
Clarification on what "adding a relationship" means here, since it's easy to conflate with the relationship table: declaring a SchemaRelationship on a schema node (stored in that schema node's own properties.relationships JSON, the same way properties.fields stores field definitions) is pure metadata — it does not create any row in the relationship table (packages/core/src/db/schema.sql:43-56), which stores concrete in_node/out_node edges between actual node instances. Declaring project.relationships = [{name: "tasks", targetType: "task", ...}] does not touch any existing project or task node's data. A relationship table row only appears later, when a user or agent actually links a specific project to a specific task (via create_relationship / rel_ops::create_relationship, the same write path #1918's relationship viewer and its backend command surface already use). This is why Part 2 needs no data migration — it's purely additive schema declaration, exactly like adding a new field would be.
This part is a domain/product decision (the relationship's name, direction, and cardinality), independent of how it's physically stored. #2008 is an open, not-yet-decided architecture discussion about moving SchemaRelationship storage from JSON-in-properties to relationship-table edges. That storage question does not change what's being decided here — whether it lands as JSON now or as a table edge later (per whatever #2008 concludes), project still has many tasks and task still has one project. If #2008's redesign lands first, implement Part 2 directly in the new format instead of JSON; if this issue lands first, #2008's migration (if it proceeds) will need to carry this declaration forward like any other.
Proposed Solution
Part 1 — Remove redundant prefixes
project.status:"Project status"→"Status"project.priority:"Project priority"→"Priority"project.start_date:"Project start date"→"Start date"project.end_date:"Project end date"→"End date"task.status:"Task status"→"Status"task.priority:"Task priority"→"Priority"
person and skill need no change — already following the correct convention. Audit any other core schema in core_schemas.rs not explicitly checked above for the same pattern before considering this complete.
Part 2 — Add the project ↔ task relationship
Add a SchemaRelationship to project's schema definition, e.g. name: "tasks", targetType: "task", cardinality: Many — a project has many tasks. The inverse (reverseName, e.g. "project", reverseCardinality: One) makes it show correctly from the task side via RelationshipCache::get_inbound_relationships, per #1918's bi-directional relationship design — task's own schema does not need its own relationships entry for this; the inbound side is derived automatically from project's declaration.
Implement this in whichever storage format is current at implementation time — JSON-in-properties (today's model) unless #2008 has landed first, in which case implement directly as a relationship-table edge per that issue's resolved design.
Acceptance Criteria
-
project's 4 field descriptions no longer include the word "Project" as a redundant prefix -
task'sstatus/prioritydescriptions no longer include the word "Task" as a redundant prefix - Remaining
taskfields (due_date,started_at,completed_at,assignee) are unchanged — already correct -
personandskillare unchanged — already correct - Every other core schema in
core_schemas.rsaudited for the same description-prefix pattern; any found are fixed in this same PR (small, mechanical — same fix, no new investigation needed) -
projectschema gains atasks(or similarly named) relationship targetingtask, with an appropriate cardinality and reverse name/cardinality for thetaskside — implemented in whichever storage format (Store SchemaRelationship declarations as relationship-table edges instead of schema-node JSON #2008-pending JSON, or the resolved table-edge design) is current at implementation time - Existing tests referencing the old description strings (if any) are updated
- Schema enumeration/count tests (if any assert a fixed relationship or field count for
project) are updated to reflect the new relationship - No new test failures (
bun run test:all) - Code passes
bun run quality:fix
Technical Specifications
Reference Files
packages/core/src/models/core_schemas.rs— source of truth for all core schema field/relationship definitions;project's 4 fields are at lines 236, 267, 285, 303,relationships: vec![]at ~line 311;task'sstatus/priorityare the analogous enum fields earlier in the same file (search for"Task status"/"Task priority")packages/desktop-app/src/lib/components/schema/generic-schema-form.svelte:160,packages/desktop-app/src/lib/components/property-forms/task-schema-form.svelte:633,packages/desktop-app/src/lib/components/property-forms/schema-property-form.svelte:399— the three render sites confirmingdescriptionis used directly as the visible field label, which is why the prefix is user-visible redundancy and not just an internal stringpackages/nodespace-types/src/schema.rs—SchemaRelationship,RelationshipCardinality,RelationshipDirectionstruct/enum definitions for Part 2packages/core/src/services/relationship_cache.rs:128—get_inbound_relationships, confirms the inbound (task-side) view is derived automatically fromproject's declaration alone, notask-side schema change neededpackages/core/src/db/schema.sql:43-56— therelationshiptable itself, confirming schema-level relationship declarations are independent of it under the current model (see Problem Statement clarification; Store SchemaRelationship declarations as relationship-table edges instead of schema-node JSON #2008 proposes changing this)
Non-Goals
- Does not change
description's role as the field-label source, or add a separate label/description distinction — that's a larger UX change, not implied by this fix. - Does not touch
personorskillfield descriptions — already correct. - Does not create any actual
project↔taskedges (relationshiptable rows) for existing nodes — this is schema declaration only; linking specific instances happens later, through the existing relationship-editing UI/tool calls, independent of this issue. - Does not implement or change the Relationships button's visibility gating in
generic-schema-form.svelte— that's Relationships trigger shows even when a schema has no typed relationships defined #2007's scope, which depends on this issue's relationship existing to be testable, but is a separate frontend-logic fix. - Does not address any of isCustomSchemaType conflates "is core" with "has a dedicated frontend integration" across 4 call sites #1998's scope (project has no working properties form yet) — this issue's fixes become visible once that lands, but the two are independent and can ship in either order.
- Does not resolve or depend on Store SchemaRelationship declarations as relationship-table edges instead of schema-node JSON #2008's storage-model redesign — that discussion is still open and unresolved. This issue is a domain-level decision (the relationship exists, with this name/direction/cardinality) that holds regardless of how Store SchemaRelationship declarations as relationship-table edges instead of schema-node JSON #2008 is eventually decided.
Related Issues
- Default new node content to "Untitled {Type}" for name-as-content core types (project, skill) #1995 (project creation)
- isCustomSchemaType conflates "is core" with "has a dedicated frontend integration" across 4 call sites #1998 (project has no working properties form yet)
- Relationships trigger shows even when a schema has no typed relationships defined #2007 (Relationships button visibility gating — depends on this issue's relationship existing to have something real to test against)
- Relationship viewer: view and manage typed relationships between nodes #1918 (relationship viewer this schema relationship will be exercised through)
- Store SchemaRelationship declarations as relationship-table edges instead of schema-node JSON #2008 (open architecture discussion on relationship storage — does not change this issue's domain decision, only its eventual physical representation)
Activity
[-]Remove redundant type-name prefix from schema field descriptions (project, task status/priority)[/-][+]Fix project/task schema field descriptions and add the missing project-task relationship[/+]Fix project/task schema field descriptions and add project→task relat…
mstomar125 commentedon Aug 10, 2026
Resolved by PR #2016 (merged, main
d579459d).Part 1 — removed the redundant owning-type prefix from the 6 project/task field descriptions (they render directly as the form label). Audited every core schema;
person/skill/query/ai-chatuse descriptive prose, so none other changed.Part 2 — declared the
project → tasksrelationship (Many; task-side inverseproject/One derived automatically, sotaskcarries no entry). Implemented against the #2008 storage model (rebased mid-flight when #2008 landed): the declaration inget_core_schemas()is seeded as a relationship-table edge viaset_schema_declarations.Live-validated: new
test_project_declares_tasks_relationshipunit test + green against #2008'sschema_relationship_declarations_test.rssuite and the full core Rust suite; pre-push gate passed. Unblocks #2007.Gate the Relationships trigger on the type having typed relationships (…