Skip to content

Subjects across stores

Work for agents is spread across stores. An issue lives in GitHub, its task in Asana, the mission working on it in SDD, and the discussion about it in cynapse. cynapse’s model of this is a network of subjects.

A subject is anything a conversation can be about: an issue, a PR, a task, a repository, a participant, a mission. Each subject lives in the store that owns it.

  • A relation is metadata on both ends. “#15 closes #12” is written on #15 and on #12, each in its own store: frontmatter, a label, a custom field. The two writes can’t be atomic, so a reader treats a relation as present if either end records it.
  • Hierarchy is a view, not identity. Parent and child, epic and story are relations. Nothing’s identity depends on its place in a hierarchy, so reorganising work doesn’t break anything.
  • A subject’s type comes from its store, and each consumer attaches its own perceived type. A GitHub issue is a gh.issue. When SDD works on it, SDD perceives it as an sdd.mission.

This follows DNA, the Datum Network Architecture.

A channel is keyed by the subject it is about, and there are two kinds:

Channels keyed by subjectIn GitHub, the repository cyberuni/cynapse, issue 12 and PR 15 are subjects. The relation "PR 15 closes issue 12" is recorded on both subjects. In cynapse, each subject keys one channel by UUIDv5 of its native ID: the repository an address channel with an owner, the issue and the PR a work channel each, with members and no owner. A participant registered by the runtime, the reviewer, keys an address channel too.GITHUB (THE SUBJECTS’ STORE)CYNAPSEcyberuni/cynapsea repositoryADDRESS CHANNELgh:cyberuni/cynapseowner: the repository’s ownerissue #12closed-by: #15WORK CHANNELgh:cyberuni/cynapse#12members, no ownerPR #15closes: #12WORK CHANNELgh:cyberuni/cynapse#15members, no ownerkeysUUIDv5(native ID)relation, on both endsRUNTIME REGISTERSparticipant reviewerkey cyberlegion:role/reviewerADDRESS CHANNELreviewerowner: the participant
Address channels (outlined in the accent color) take direct messages; work channels hold the conversation about one piece of work. The readable reference is a handle, not the key, because it changes when a subject moves. Accepted (ADR-0012) and proposed (ADR-0013), not built.
Address channel Work channel
Keyed by Something that receives messages: a participant, a repository, a project, a folder A unit of work: an issue, a PR, a task, a mission
Owner The subject’s owner, who triages it and sets conventions None. It has members.
Used for Direct traffic: a question to a role, mail for an owner The shared working conversation about that piece of work, including the messages about it
  • The key is the subject’s native ID when the channel is created: GitHub’s node_id, Asana’s gid, Linear’s UUID. The readable reference (gh:cyberuni/cynapse#12) is a handle, because it changes when an issue moves.
  • A move adds an alias key. If a transfer gives the issue a new native ID, the new ID becomes another key of the same channel. The channel keeps its identity.
  • The key has no type. Every consumer working on an issue meets in its one channel, instead of each opening its own.
  • Each work item has its own channel. A PR’s channel isn’t a child of its issue’s. Anchors still branch a conversation inside cynapse, such as an arbitration started from a review comment.
  • There are no DMs. Traffic about a work item goes on its work channel. Direct traffic to a participant goes on their address channel (Messaging).
  • The key format is cynapse’s. A consumer resolves the native ID, because that needs the store’s API, and passes the store and the ID in. cynapse builds the key, so two consumers resolving the same ID meet in the same channel.

A channel holds the conversation, never the subject. cynapse doesn’t fetch the issue or cache its metadata. It tells a consumer which one call returns it, and composes what the consumer passes back. What a consumer writes back to the issue is a short list of things that change it for the issue’s readers. Both are on What cynapse stores.