@@ -0,0 +1,116 @@
1++++
2+title = "%nested-goals"
3+date = "2022-06-22"
4+[taxonomies]
5+grant_type = ["Proposal"]
6+grant_category = ["App Dev"]
7+[extra]
8+image = ""
9+description = "Urbit application for invidividual and social management of high-level goals and their tasks"
10+reward = "3 stars"
11+champion = "~tacryt-socryp"
12+assignee = "~niblyx-malnus"
13+grant_id = "P0170"
14+completed = false
15+canceled = false
16+link = ""
17++++
18+
19+# Project Description
20+## Main Structure
21+- Every goal is an independent, uniquely identifiable, and self-contained unit.
22+- Every goal should be able to be succinctly summarized in a short sentence or two, much like a commit message.
23+- Every goal describes the transformation of the current state of the universe into a new desired future state. A goal is a description of this desired future state. A goal can also be a description of a set of criteria and a prescription for the means of evaluating whether these criteria have been met in a given state.
24+- Goals can be related to one another in two ways:
25+ - *Precedence*, which describes a relationship in time. When one goal precedes another, the state described by the second goal can only be achieved after passing through the state described by the first goal.
26+ - *Containment*, which describes the natural human tendency to hierarchically nest goals which exist at different levels of abstraction, ranging from the scale of the existential to the scale of fine motor movements. When Goal A contains Goal B, several things are implied. It is implied that we must pass through the state described by Goal B before getting to the state described by Goal A; in other words Goal B precedes Goal A. It is implied that Goal B is part of the same effort as Goal A. And it is implied that Goal B is a goal on a smaller scale than Goal A.
27+- All goals are preceded by the goals which they contain.
28+- Goals can precede other goals without being contained by them.
29+- Precedence is transitive.
30+- Goals are not allowed to precede themselves.
31+- Goals can be nested arbitrarily deep in a tree-like manner. Goals can contain subgoals can contain subgoals can contain subgoals. (Whether goals can be contained by multiple other goals may be revisited, but for simplicity here we assume only a single parent goal.)
32+- All uncontained goals are by default nested directly under the ultimate goal: the Pursuit of the Good and the Beautiful, or PGB for short.
33+- Goals can and should have deadlines. These deadlines are inherited by preceding goals as an upper bound on their deadlines. The deadline for a preceding goal can be earlier than the deadline for a succeeding goal, but it cannot be later.
34+- We can leverage this structure to harvest tasks. For any given goal, we can easily identify all the existing unpreceded goals which precede it. These should ideally represent all goals which can be tackled immediately.
35+- POTENTIALLY: Goals can contain arbitrary amounts of metadata, including perhaps longer written descriptions, links to other documents, rankings of importance…
36+- POTENTIALLY: %graph-store nodes can be extracted as goals and incorporated into the existing goal data structure. (suggested by `~sarlev-sarsen`)
37+- POTENTIALLY: Goals can be sorted according to their urgency (time left until their deadline), procrastination (time elapsed since their initial creation), and many other criteria…
38+- Goals can be marked completed. Goals can also be deleted. In either case, they are archived.
39+- Goals can be marked actionable. Actionable goals cannot have subgoals. (suggested by `~midlev-mindyr`)
40+- POTENTIALLY: existing goals with no actionable subgoals will prompt you to add subgoals. (suggested by `~midlev-mindyr`)
41+## Beyond a Single Person
42+- Each goal must be owned by a single identity. The owner of a goal can control who is able to view it, who is able to edit it, etc.
43+- The owner of a goal also owns all goals contained by that goal. In other words, for any goal, there is a single person who is completely responsible for it at every level of abstraction.
44+- Goals owned by different people can have precedence relationships, but not containment relationships.
45+- Goal ownership can be transferred. If this creates a containment relationship between two goals owned by different people, this relationship is transformed into a simple precedence relationship.
46+- Precedence relationships are created by the owner of the succeeding goal and not the owner of the preceding goal.
47+- The owner of a goal can delegate that goal to one or more other identities, giving them permissions to edit the goal, add subgoals, modify the deadline, or mark the goal complete. Delegation is not the same as ownership transfer.
48+- The delegatee(s) can in turn delegate subgoals. Ultimately, all decisions made by delegatees can be overridden by decisions made by delegators, with the ultimate power over any goal being held by the goal owner.
49+- POTENTIALLY: Goal deadlines can be synced with ucal or other urbit calendar apps.
50+## Possible Implications
51+- A simple way for an individual person to dynamically create and manage goals.
52+- A natural way for goals to extend beyond a single person and grow with a group.
53+- Useful for cathedrals. Useful for bazaars. Useful for all manner of cathedral-bazaar hybrids.
54+## Why Me
55+I have a background in computer science. This is probably not necessary, but has been useful for getting familiar with Urbit.
56+I am excited to implement this project because (1) I intend to use it myself and (2) I want to learn how to build on Urbit.
57+The project shouldn't require any expertise beyond familiarity with Hoon, Gall, and whatever else is involved in the Urbit app building stack.
58+I have also begun development of a 'Milestone 0' as a proof of concept, available on [github here](https://github.com/niblyx-malnus/nested-goals).
59+### Original Goals for Milestone 0
60+A basic CLI with the following affordances
61+(1) Add a goal with an associated description
62+(2) Remove a goal using a unique goal handle
63+(3) Nest one goal under another
64+(4) Unnest a goal from under another
65+(5) Pretty print the existing data structure
66+These 5 things have been accomplished. Feel free to try it out!
67+### Using the code
68+Just drop the files in `src` in their corresponding directories (`app`, `lib`, and `sur`) on the base desk of a fake zod, `|commit %base`, `|link ~zod %gol-cli` and then you should be in the CLI.
69+Alternatively:
70+```
71+|install ~niblyx-malnus %gol-cli
72+|rein %gol-cli [& %gol-cli]
73+|link %gol-cli
74+```
75+CLI Commands
76+Simply hit `Enter` to print the existing data structure based on the current context. The current context is like your current directory in a UNIX operating system. By default the data structure will be printed with respect to this goal. The default is `~` which prints the data structure in its entirety.
77+Add a goal with `ag 'Some text'`. This will create a goal nested under the current context.
78+Remove a goal with `rg ---`, where the three dashes are a standin for a "handle" which uniquely identifies a goal. These are printed next to the goals on the left.
79+To change the current context use `cc ---`.
80+To change back to the default context use `cc ~`.
81+To nest one goal under another, use `ng --c --p` where the child is first and the parent second.
82+To unnest one goal from under another, use `fg --c --p` (for "flee goal") where the child is first and the parent is second.
83+To print a specific goal without changing the context, use `pg ---`.
84+To print the ancestors or parent tree of a specific goal use `pp ---`.
85+(Also clearall will clear your whole data structure.)
86+
87+## Milestones & Compensation
88+### Milestone 1
89+Expected Completion: July 9th
90+Payment: 1 star
91+A fully functional personal task manager CLI.
92+Functionality:
93+- Can add and remove goals. (Milestone 0)
94+- Can hierarchically nest goals. (Milestone 0)
95+- Can add deadlines to goals.
96+- Deadlines are inherited from ancestor goals.
97+- Can mark goals as actionable.
98+- Can mark goals as complete.
99+- Can create "precedence" or "dependence" relationship between two goals.
100+- Can interact richly with the data structure; can move up and down the hierarchy, collapse and uncollapse nested subgoals.
101+- Can extract ("harvest") actionable, unpreceded goals in a list to see what goals can be tackled immediately.
102+- Can sort by date of deadline or by date of goal creation.
103+### Milestone 2
104+Expected Completion: August 6th
105+Payment: 1 star
106+A fully functional social task manager CLI.
107+- Can share goals so that they are viewable by others.
108+- Can delegate goals (and their subgoals) to other ships. Delegates will have permissions to add subgoals, edit deadlines, edit goal descriptions, create precedence relationships, and to further delegate subgoals with respect to the goal they have been delegated.
109+- Can transfer ownership of goals (and all their subgoals) between ships.
110+### Milestone 3
111+Expected Completion: September 16th
112+Payment: 1 star
113+- A basic Sail frontend.
114+- Ability to reference an arbitrary graph-store node or set of nodes to capture context which triggered the creation of the goal.
115+- Ability to have threaded comments on goals.
116+- Other such integrations with Groups which will probably become more obvious to me as I become more familiar with this part of user space.