-
Notifications
You must be signed in to change notification settings - Fork 630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Task and workflow-related NIPs #1767
base: master
Are you sure you want to change the base?
Conversation
This commit introduces a few NIPs related to business use cases around tasks and workflows
I didn't read everything yet, but it looks good and well-thought. Except for the edit request event, which I like and I think it could be used elsewhere, the other NIPs could all be merged into one? They're all interdependent, right? Sorry, I'll read better when I have more stamina. |
Can we make the kanban spec compatible with https://www.kanbanstr.com? |
Thank you for reading @fiatjaf!
In terms of interdependencies:
I wrote A, B, C as separate NIPs because I wanted to give clients/relays the option to implement either a "to-do" flow, a "Kanban" flow, or some other flow that is not yet listed in here (e.g. Gantt charts could be another such workflow that could be built on NIP-XXA). In other words, I did not want to force clients/relays to implement a specific flow if it doesn't interest their use case. We could discuss merging A, B, C if needed, as long as we can give implementers the flexibility to pick the workflow that works best for them (i.e. I would not want to force an "Apple Reminders" clone app to implement a Kanban flow, and vice versa) |
Interesting, I don't know much about it yet. How does kanbanstr work? |
They have a PR open here #1665 |
Thanks @vitorpamplona, I had some more time to go through that PR. To answer your question, I think the kanban spec here can be modified to be very close and mostly compatible with the "Board Event" spec at #1665, but there is one important fundamental difference between this proposal and #1665. In #1665, the "Card Event" makes a reference to the board it lives in, and only exists within the context of Kanban boards. That is the reverse approach from the one proposed in this PR. In this PR, the Kanban Board makes reference to items it tracks instead (which I believe allows for more flexibility, different use cases, and easy integration with other NIPs (such as NIP-34 git issues)). Other than that, the schema of the board event could be the same or similar to #1665. cc @vivganes, I am curious to hear what your thoughts are on this! And whether having the board refer to cards/tasks instead would work for your intended use case. I am also curious to hear from @pablof7z about his thoughts on this approach. I believe it solves some of the concerns he raised in #1665. Thank you! |
@danieldaquino - I initially added the cards list in the board event like your suggestion. However, I changed my approach due to the following reasons:
|
|
||
This NIP defines `kind:35000` (an _addressable event_) for tasks, generally referred to as "tasks", "to-do items", or "reminders". | ||
|
||
This NIP intentionally does not define any information about workflows, states, authorization mechanisms, or any other complex task management features, as the needs and requirements for these vary greatly between different applications and use cases. This NIP is meant to be used only as a base for more complex task management systems, and only focuses on the basic information that models a task itself. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BRAVO!!!
Most people design too narrowly for exclusively their own use case.
Again... BRAVO!
XXA.md
Outdated
|
||
### Content | ||
|
||
The `.content` of these events MUST be used as the description of a task, and should be a string text in [Github Flavored Markdown syntax](https://github.github.com/gfm), with the following constraints: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just markdown instead of GFM?? Or perhaps asciidoc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would be ok with CommonMark markdown (a.k.a. "regular" markdown), it's probably easier to support than GfM. I will update!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIP-23 has miserly defined Markdown specs that we should probably reuse here, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree.
My only issue with NIP-23 is that it is a bit ambiguous on whether it follows CommonMark or GfM (Probably CommonMark?), which means that I don't know if it would support markdown tables (for example) — but not a big deal honestly, I am happy to use whatever Markdown spec most of Nostr is using. I guess those ambiguities are out of the scope of this PR, we should delegate that decision to NIP-23.
I will update that on the next version.
XXC.md
Outdated
|
||
When a task's status changes within this board, the tag's state value should update to reflect its new position in the workflow sequence. | ||
|
||
### Multi-user editing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think having p
tags that are editors is an underutilized tool -- I've implemented that in https://collab-lemon.vercel.app/ and works like a charm.
The owner just p
tags the people that can edit the board and when a client wants to know the latest version they just REQ
with "#d": [ "<d-tag-of-the-board>" ], "authors": [ "<all-p-tagged-pubkeys>"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a very nice idea, and I was debating myself back-and-forth over this quite a bit — there are multiple pros and cons to consider.
However, I found one issue with this scheme which unfortunately is a blocker in my opinion. And that is that this is not compatible with NIP-01.
NIP-01 specifies:
for kind
n
such that30000 <= n < 40000
, events are addressable by theirkind
,pubkey
andd
tag value -- which means that, for each combination ofkind
,pubkey
and thed
tag value, only the latest event MUST be stored by relays, older versions MAY be discarded.
The scheme proposed effectively uses a combination of kind
, d
tag, and multiple pubkeys, which breaks the specification of an addressable event.
I tried to think about whether this pragmatically would break things, and the answer is that it would break "a" tags:
The
a
tag, used to refer to (...) an addressable event:["a", <kind integer>:<32-bytes lowercase hex of a pubkey>:<d tag value>, <recommended relay URL, optional>]
Under this scheme we would not be able to link using anchor tags, because the pubkey of the latest board update cannot be known at the time the anchor tag is created — Anchor tags would be broken.
However, this made me think of a better way to handle multi-user board editing authorization.
We can simply make the board owned by the key that signs it, and push the rest of the complexity to key management and scripting. ALL possible multi-user editing authorization/rules can be implemented with a combination of:
- FROST-like signature schemes
- Edit requests + Scripting (e.g. A server listens to edit requests, and approves/rejects them based on an arbitrarily complex business logic)
An analogy: Imagine an office. Instead of having 3 side-by-side doors to let different people in with their own house keys, you can have one door with a powerful lock that can authorize based on any possible logic, and then you can distribute office keys to whoever you want.
Your example use case could be implemented using a group keypair to own the board, and a 1-of-N FROST signature scheme to let any participant edit it.
Thanks @vivganes for your thoughts and insights!
That's a very good point that I haven't given enough thought yet. The alternative of having tasks/cards refer to the workflow (e.g. kanban board) could indeed reduce the risk of race conditions — but it concerns me that the task/card event specification is dependent on the kanban/workflow specification, which limits its reusability in other workflow contexts (e.g. apps similar to Apple Reminders, Gantt chart applications, etc) I am going to do some more thinking on:
Thanks for sharing that use case! I think the ability you describe will become important in other scenarios as well. More broadly, I am thinking of it as the ability to track/filter specific things and having some sort of "shared filter" among a group of people (e.g. executives, as you mentioned) I will give it some thought! |
I am working on a new version of this proposal. |
- Race condition issues solved - Multi-user collaboration has a single well-defined consensus, without compromising flexibility — all use-cases are still possible to implement - Kanban board event modified to be very similar and almost compatible with Kanbanstr - Workflow architecture is now more scalable and extensible to cover even more use cases.
Submitted version 2 of the draft, with a new model. It solves the problems brought up here, with zero compromises (in fact, it makes it more extensible than ever) 🏎️ Race condition issue was solved. It is now even better to prevent race conditions than either of the previous proposed approaches, without compromising any extensibility (actually it even makes it more extensible). More details in NIP-XXE 📋 Kanban board spec was updated to be much more compatible with Kanbanstr. cc @vivganes — More details in NIP-XXC ✌️Multi-user collaboration has a single well-defined consensus for much better interoperability — without compromising access control flexibility. It actually makes it more flexible for more use-cases. cc @pablof7z More details here 🏢 More extensibility for more use-cases, native NIP-34 git issue support, etc. For example, the executive board use-case pointed out by @vivganes is also now possible without requiring extra specs. See this example use case (read NIP-XXE for context) I added some example use-cases with visual diagrams to how those could be implemented under this new NIP-XXE model. The new NIP-XXE spec itself is less than 100 lines long, and only uses 3 simple concepts to bring all these benefits. CC @fiatjaf, @pablof7z, @vivganes, @vitorpamplona, thanks for all the comments and insights on my first draft, I would love to hear your thoughts on this new draft! |
I just came here to say I checked in 4 different clients and they all support Markdown tables, so I guess that's the standard now. |
This PR draft introduces 4 new NIPs that can be used to implement task and project management systems — as well as other productivity tools — using Nostr.
Motivation
Most mainstream productivity and task management tools are either closed, or have limited interoperability, which leads to a myriad of issues, including:
Note: I have personally experienced all these issues, and can confirm that they are real and painful.
Benefits
The proposed NIPs aim to address these issues by providing a set of common formats and specifications that promote standardization and ease of integration across multiple task management systems and other productivity tools, bringing the following benefits:
Rationale and approach
Task management and workflows are very diverse, there is no one-size-fits-all solution that can cover all use cases. Therefore, these NIPs have been designed to be small and modular. This approach deliberately avoids the imposition of a one-size-fits-all solution, promoting instead a framework of reusable primitives. By isolating each NIP to address specific components of task management, and without over-constraining the specifications, they can be tailored to meet more use cases and be combined in various ways.
Some fragmentation on the consensus around the state of tasks is acceptable (i.e. When is a particular task considered "done"? Who is allowed to change a task?), because consensus is usually done at an organizational or project level, so it's not a problem if different organizations or projects to use slightly different rules. The important thing is that the same primitives and tools can be used, and data can be shared and integrated between different tools and systems without too much friction.
Other notes
I would love to hear and discuss any feedback, suggestions, or concerns you might have.
Thank you!