Skip to content

task-context: links live in a human-readable "## Related" deep-link section#6

Merged
renezander030 merged 1 commit into
mainfrom
feat/links-related-section
Jun 17, 2026
Merged

task-context: links live in a human-readable "## Related" deep-link section#6
renezander030 merged 1 commit into
mainfrom
feat/links-related-section

Conversation

@renezander030

Copy link
Copy Markdown
Owner

What

Typed cross-task links previously lived inside the ats:context JSON block as opaque {type, projectId, taskId} entries — a wall of IDs that means nothing to a human reading the task in TickTick/Obsidian. This moves them to a human-readable ## Related section near the bottom of the task body:

## Related
- depends-on: [Auth spec](https://ticktick.com/webapp/#p/demo/tasks/auth-spec)
- supports: [Q3 launch plan](https://ticktick.com/webapp/#p/demo/tasks/q3-plan)

One line serves both audiences: a human clicks the deep link (Obsidian-style backlink navigation), the agent parses type: [title](url).

How

  • Serialization-only change in packages/core/task-context.js (parseTaskMetadata / writeTaskMetadata + helpers). The in-memory link model is unchanged, so ats link, ats graph, ats context, hierarchy, and the event stream all keep working untouched.
  • projectId/taskId are recovered from the link URL — the TickTick native deep link (…/#p/<proj>/tasks/<task>), or a generic …/<projectId>/<taskId> form for other adapters' urlFor(). A link written without a url falls back to a parseable ats://task/<proj>/<task> ref so it still round-trips.
  • The machine block now holds only intent / lifecycle / security / hierarchy.

Back-compat

Links still inside a legacy JSON block are read (no data loss) and migrate to the ## Related section on the next write.

Tests

  • Full suite 180/180 pass, lint clean.
  • New: links render as a Related deep-link section (not JSON); machine block carries no link IDs; round-trips into the in-memory model.
  • New: legacy JSON-block links are read and migrate to Related on write.
  • Existing graph/context/hierarchy/MCP/event tests pass unchanged.

Docs updated in docs/agent-layer.md.

🤖 Generated with Claude Code

…ection

Typed cross-task links previously sat inside the ats:context JSON block as
opaque {type, projectId, taskId} entries — a wall of IDs that means nothing to
a human reading the task in their storage app. Move them to a "## Related"
section near the bottom of the body, one bullet per link:

  ## Related
  - depends-on: [Auth spec](https://ticktick.com/webapp/#p/demo/tasks/auth-spec)

The link text and deep link serve a human (Obsidian-style backlink navigation);
the agent reads the same lines. projectId/taskId are recovered from the URL
(TickTick deep link, or a generic .../<projectId>/<taskId> form), so the
in-memory link model and everything downstream (graph/context/hierarchy/events)
is unchanged. The machine block keeps only intent/lifecycle/security/hierarchy.

Back-compat: links still inside a legacy JSON block are read and migrate to the
Related section on the next write. Full suite green (180).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@renezander030 renezander030 merged commit e671bd0 into main Jun 17, 2026
2 checks passed
@renezander030 renezander030 deleted the feat/links-related-section branch June 17, 2026 09:53
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