CommunityRule /lab/medlab/ en Making the CommunityRule Library Searchable /lab/medlab/2024/05/07/making-communityrule-library-searchable <span>Making the CommunityRule Library Searchable</span> <span><span>Anonymous (not verified)</span></span> <span><time datetime="2024-05-07T10:08:54-06:00" title="Tuesday, May 7, 2024 - 10:08">Tue, 05/07/2024 - 10:08</time> </span> <div> <div class="imageMediaStyle focal_image_wide"> <img loading="lazy" src="/lab/medlab/sites/default/files/styles/focal_image_wide/public/article-thumbnail/crchatbot2.png?h=1680d77c&amp;itok=1sghTSvi" width="1200" height="600" alt="Screenshot of CommunityRule"> </div> </div> <div role="contentinfo" class="container ucb-article-tags" itemprop="keywords"> <span class="visually-hidden">Tags:</span> <div class="ucb-article-tag-icon" aria-hidden="true"> <i class="fa-solid fa-tags"></i> </div> <a href="/lab/medlab/taxonomy/term/19" hreflang="en">Collaborative Governance</a> <a href="/lab/medlab/taxonomy/term/90" hreflang="en">CommunityRule</a> </div> <a href="/lab/medlab/rohit-taware">Rohit Taware</a> <div class="ucb-article-content ucb-striped-content"> <div class="container"> <div class="paragraph paragraph--type--article-content paragraph--view-mode--default"> <div class="ucb-article-content-media ucb-article-content-media-above"> <div> <div class="paragraph paragraph--type--media paragraph--view-mode--default"> <div> <div class="imageMediaStyle large_image_style"> <img loading="lazy" src="/lab/medlab/sites/default/files/styles/large_image_style/public/article-image/crchatbot1.png?itok=qDcrwn20" width="1500" height="2145" alt="Screenshot of CommunityRule"> </div> </div> </div> </div> </div> <div class="ucb-article-text d-flex align-items-center" itemprop="articleBody"> <div><p>Creating an effective way for users to navigate and utilize an online platform with extensive content can be a challenge, particularly for new users unfamiliar with the site’s structure. This was the case with <a href="https://communityrule.info/" rel="nofollow">CommunityRule</a>, our online tool that hosts a growing library of user-created governance designs and existing templates. Newcomers often find it daunting to search for and locate specific rules or communities relevant to their interests. To address this, we embarked on a journey to enhance user experience through the implementation of a chatbot aimed at simplifying the search process.</p> <p>Initially, we explored options based on the new crop of AI systems, particularly large-language model chatbots. But the complexity of that approach quickly got out of hand for a platform meant to be simple, open-source, and inexpensive to host. The solution we devised involves the use of a basic search tool powered by <a href="https://en.wikipedia.org/wiki/Cosine_similarity" rel="nofollow">cosine similarity</a>, an algorithm that measures the cosine of the angle between two vectors. This method is particularly suited for text comparison, making it an ideal choice for matching user queries with relevant content in our database. By analyzing the text input by users and comparing it to existing descriptions of rules and communities, the chatbot can suggest the most relevant matches, thereby streamlining the search process. Although we departed from the idea of having a conversational chatbot, we retained the chat interface for this search tool.</p> <h2>How to search CommunityRule</h2> <p>You will find the search icon at the bottom-right of the website, which will open a chat prompt as follows:</p> <p></p> <p>After searching with keywords, the tool returns the top five best matches as responses. The user can click a link and see that rule.</p> <p></p> <p>With the search-enabled chatbot in place, navigating CommunityRule has become significantly more accessible to new users. They can more easily find communities and rules that match their needs, enhancing their engagement and participation on the platform.</p></div> </div> </div> </div> </div> <h2> <div class="paragraph paragraph--type--ucb-related-articles-block paragraph--view-mode--default"> <div>Off</div> </div> </h2> <div>Traditional</div> <div>0</div> <div>On</div> <div>White</div> Tue, 07 May 2024 16:08:54 +0000 Anonymous 298 at /lab/medlab New in CommunityRule: User Login, Rule Editing, and More /lab/medlab/2024/04/03/new-communityrule-user-login-rule-editing-and-more <span>New in CommunityRule: User Login, Rule Editing, and More</span> <span><span>Anonymous (not verified)</span></span> <span><time datetime="2024-04-03T16:43:02-06:00" title="Wednesday, April 3, 2024 - 16:43">Wed, 04/03/2024 - 16:43</time> </span> <div> <div class="imageMediaStyle focal_image_wide"> <img loading="lazy" src="/lab/medlab/sites/default/files/styles/focal_image_wide/public/article-thumbnail/screenshot_2024-04-08_at_13-38-30_communityrule.png?h=a56a7816&amp;itok=9o9BW86-" width="1200" height="600" alt="Screenshot of CommunityRule showing login instructions"> </div> </div> <div role="contentinfo" class="container ucb-article-tags" itemprop="keywords"> <span class="visually-hidden">Tags:</span> <div class="ucb-article-tag-icon" aria-hidden="true"> <i class="fa-solid fa-tags"></i> </div> <a href="/lab/medlab/taxonomy/term/19" hreflang="en">Collaborative Governance</a> <a href="/lab/medlab/taxonomy/term/90" hreflang="en">CommunityRule</a> </div> <a href="/lab/medlab/rohit-taware">Rohit Taware</a> <div class="ucb-article-content ucb-striped-content"> <div class="container"> <div class="paragraph paragraph--type--article-content paragraph--view-mode--default"> <div class="ucb-article-content-media ucb-article-content-media-above"> <div> <div class="paragraph paragraph--type--media paragraph--view-mode--default"> </div> </div> </div> <div class="ucb-article-text d-flex align-items-center" itemprop="articleBody"> <div><p><a href="https://communityrule.info/" rel="nofollow">CommunityRule</a> is a tool that helps make communities better by providing a central place where people can create and share governance designs for their communities. It offers nine simple templates for setting up community structures. Communities can follow, modify, or even decide not to use these templates. They are meant to start discussions, inspire new ideas, and encourage feedback.</p> <p>Since CommunityRule was first developed as a prototype by MEDLab, it has lacked certain important features. For example:</p> <ul> <li><strong>User logins:</strong> There was no option for users to create personal accounts or log in.</li> <li><strong>Robust database:</strong> The site lacked a robust database. It relied on a simple Google Sheet to manage the library of user-generated rules. This presented limitations on data storage, as well as yoking the project to an external platform.</li> <li><strong>History of rule versions:</strong> The website didn’t keep a record of old versions of rules, making it difficult to see how rules evolved over time.</li> <li><strong>Editing rules:</strong> The website did not allow users to edit the rules they had created. This could affect their ability to make changes or updates to the guidelines as a community evolves.</li> <li><strong>Permissions: </strong>There was a lack of proper structure of permissions on who can delete or edit rules.</li> </ul> <p>To address these missing features, and to establish a firmer foundation for CommunityRule development, we introduced a few new features to our existing platform.</p> <p><strong>Database:</strong> Database and editing tool enhancements will make it easier for users to find relevant information and customize it to their specific community needs, thus improving the overall usability of the platform. Users will find it more convenient to access relevant information, and the customization options will empower them to adapt the platform to their community's unique needs. MySQL is the chosen database management system for the backend. MySQL is a widely used relational database that provides a robust and scalable solution for storing and retrieving data.</p> <p><strong>REST API:</strong> We developed various Representational State Transfer (REST) APIs. REST is an architectural style for designing networked applications, and in this context, it's used to create a set of standardized endpoints for communication between the frontend and backend. The REST APIs are exposed from the backend, meaning they are made available for external applications (such as the front end of the website) to interact with. Node.js is employed as the backend technology. Node.js is a JavaScript runtime that allows developers to use JavaScript for server-side scripting. It is known for its efficiency and asynchronous, event-driven architecture.</p> <p><strong>Login functionality: </strong>We introduced a new login functionality where users can manage their own rules. Upon clicking the Login button, users will see the following prompt to enter an email address:</p> <p></p> <p>Once the user clicks on the Send Code button, the provided email address will receive a unique 4-digit code. An email will be from hello@communityrule.info; the subject of the email will be the “Logging code for community rule,” and the content will be of the following format “Code for logging into community rule is XXXX.” The user will be prompted with the following new prompt to enter the code:</p> <p></p> <p>Now the user needs to enter the correct code to log in. If the code is correct, the user is logged in. If the code is incorrect, the user will see an error message. The user can also ask to send the code again. Once successfully logged in, the user will see a user icon, as shown in the following screenshot. The user can then click on that icon to see the logged-in email address.</p> <p></p> <p>&nbsp;</p> <p></p> <p>If you click on the logout button, you will be logged out of the website and you will see the login button again.</p> <p>You need not be logged in to see the rules in the library, or even to create a new rule. Logging in is necessary only for publishing rules and for editing or deleting rules you have previously published. When you publish your rule using your email address you will be considered as the owner of the rule</p> <p><strong>Library options:</strong> The library will list all the rules that have been published till now from the new database we created. Now when the user clicks on any rule it will be loaded into the window as follows which will have the Edit and Delete buttons as shown below.</p> <p></p> <p><strong>Edit:</strong> If you are the owner, you will now be able to edit your rule. We introduced a new button, Edit, which will be visible only to the owner of the rule—the rule’s original creator, i.e. you created the rule. If you are editing the rule, however, you won’t be able to change the name of the rule; the rule name will be read-only.</p> <p><strong>Delete:</strong> You will be able to delete the rule if you are the owner of the rule or an admin. If any rule is deleted, it will no longer appear in the Library.</p> <p>If you are not logged in, or you are not the owner of the rule, you will not see those buttons. As before, all users (whether logged in or not, whether owner or not) have the ability to use the Fork &amp; Edit button to copy the rule and edit it. Rule owners who want to change the rule’s name will need to use this functionality.</p> <p><strong>Fork history:</strong> In the Library of user-generated rules, the fork history of any rule is now recorded at the bottom. If the rule was not forked from another, no fork history will be visible. Deleted rules will still be visible in the fork history but they will not be publicly visible.</p> <p></p> <p>These changes are important steps toward making CommunityRule a more sophisticated, user-focused, and versatile tool. By addressing current limitations and expanding its functionalities, we aim to solidify its role as an essential resource for communities seeking effective organizational structures and governance models.</p></div> </div> </div> </div> </div> <h2> <div class="paragraph paragraph--type--ucb-related-articles-block paragraph--view-mode--default"> <div>Off</div> </div> </h2> <div>Traditional</div> <div>0</div> <div>On</div> <div>White</div> Wed, 03 Apr 2024 22:43:02 +0000 Anonymous 296 at /lab/medlab CommunityRule Refactor Now Online /lab/medlab/2022/05/20/communityrule-refactor-now-online <span>CommunityRule Refactor Now Online</span> <span><span>Anonymous (not verified)</span></span> <span><time datetime="2022-05-20T10:31:28-06:00" title="Friday, May 20, 2022 - 10:31">Fri, 05/20/2022 - 10:31</time> </span> <div> <div class="imageMediaStyle focal_image_wide"> <img loading="lazy" src="/lab/medlab/sites/default/files/styles/focal_image_wide/public/article-thumbnail/screenshot_2022-05-20_at_10-30-26_create_communityrule.png?h=3cfef6ef&amp;itok=ULDTmDco" width="1200" height="600" alt="Preview button on CommunityRule"> </div> </div> <div role="contentinfo" class="container ucb-article-tags" itemprop="keywords"> <span class="visually-hidden">Tags:</span> <div class="ucb-article-tag-icon" aria-hidden="true"> <i class="fa-solid fa-tags"></i> </div> <a href="/lab/medlab/taxonomy/term/19" hreflang="en">Collaborative Governance</a> <a href="/lab/medlab/taxonomy/term/90" hreflang="en">CommunityRule</a> </div> <a href="/lab/medlab/nathan-schneider">Nathan Schneider</a> <div class="ucb-article-content ucb-striped-content"> <div class="container"> <div class="paragraph paragraph--type--article-content paragraph--view-mode--default"> <div class="ucb-article-content-media ucb-article-content-media-above"> <div> <div class="paragraph paragraph--type--media paragraph--view-mode--default"> </div> </div> </div> <div class="ucb-article-text d-flex align-items-center" itemprop="articleBody"> <div><h3>Background</h3> <p>Last year, <a href="https://www.smartcontractresearch.org/t/communityrule-what-should-an-interface-for-designing-governance-do/952/11" rel="nofollow">Smart Contract Research Forum provided a grant</a> to CommunityRule, an open-source Web app led by <a href="/lab/medlab/" rel="nofollow">MEDLab at CU Boulder</a> meant to serve as an interface for community governance design. The project was led by <a href="http://www.sqglz.com/" rel="nofollow">Deacon Rodda at SQGLZ</a>, and I have already <a href="https://www.smartcontractresearch.org/t/deciding-how-to-decide-a-reflection-on-the-state-of-communityrule/1282/3" rel="nofollow">shared</a> Deacon’s brilliant reflections on the project. <a href="https://dhornbein.com/" rel="nofollow">Drew Hornbein</a> took on the development work to implement Deacon’s recommendations. <a href="https://www.smartcontractresearch.org/t/designing-community-governance-with-blockly/1239" rel="nofollow">As I reported earlier,</a> Asher Farr did some experiments with reimagining CommunityRule in Blockly.</p> <p>CommunityRule was initially developed as a demonstration project by me. While it achieved some exploratory adoption, the (badly designed!) technical underpinnings limited its ability to be modular and adaptable to new challenges.</p> <h3>Results</h3> <p>The SCRF-funded project enabled some important advances:</p> <ul> <li>Refactoring the application code from vanilla JavaScript to the much more advanced Vue.js</li> <li>Moving the database from raw HTML to JSON/YAML, enabling vastly improved data portability</li> <li>Redesigning the authoring interface to be more self-explanatory, responsive, and flexible</li> <li>Encouraging custom module design as the default, rather than relying on pre-written modules</li> <li>Small adjustments in nomenclature and usability</li> </ul> <h3>Discussion and Key Takeaways</h3> <p>These changes bring us closer to the goal of connecting a) a visual design interface with b) programmable governance software. For example, we hope that CommunityRule can be used in the future for designing and implementing governance processes using DAO technologies and Web2 services like <a href="https://policykit.org/" rel="nofollow">PolicyKit</a> and <a href="https://gitlab.com/medlabboulder/modpol/" rel="nofollow">Modpol</a>. Moving to a JSON-based data model enables us to much more easily do things like:</p> <ul> <li>Add arbitrary data fields on governance modules</li> <li>Deploy custom instances of CommunityRule with custom module sets</li> <li>Translate modules into working governance code</li> </ul> <p>One important insight during this process, aided by the Blockly experiment, was recognizing the need for governance modules to be much more precisely specifiable, rather than simply being described in natural language text. As we move closer to enabling computable rules on CommunityRule, we need to gradually lessen our dependence on natural language and support appropriate machine-readable data models.</p> <h3>Implications and Follow-ups</h3> <p>We will continue to develop the basic software for usability and new features. This process will be spurred by much larger pending grant projects, in partnership with the <a href="https://metagov.org" rel="nofollow">Metagovernance Project</a>, which we hope will fund CommunityRule development for use by open-source communities and integration with PolicyKit, respectively. Thanks to the groundwork provided by this phase of development, we can hit the ground running on those efforts.</p> <p>Thank you, SCRF, for your support! And we invite anyone interested to <a href="https://communityrule.info" rel="nofollow">give the new CommunityRule a try</a> and let us know what you think.</p> <p><em><a href="https://www.smartcontractresearch.org/t/communityrule-refactor-now-online/1567" rel="nofollow">Also published</a> at the Smart Contract Research Forum.</em></p></div> </div> </div> </div> </div> <h2> <div class="paragraph paragraph--type--ucb-related-articles-block paragraph--view-mode--default"> <div>Off</div> </div> </h2> <div>Traditional</div> <div>0</div> <div>On</div> <div>White</div> Fri, 20 May 2022 16:31:28 +0000 Anonymous 257 at /lab/medlab Designing Community Governance with Blockly /lab/medlab/2022/02/14/designing-community-governance-blockly <span>Designing Community Governance with Blockly</span> <span><span>Anonymous (not verified)</span></span> <span><time datetime="2022-02-14T21:36:14-07:00" title="Monday, February 14, 2022 - 21:36">Mon, 02/14/2022 - 21:36</time> </span> <div> <div class="imageMediaStyle focal_image_wide"> <img loading="lazy" src="/lab/medlab/sites/default/files/styles/focal_image_wide/public/article-thumbnail/screen_shot_2022-02-13_at_7.05.57_pm.png?h=240d6a7c&amp;itok=YZ3LS4qs" width="1200" height="600" alt="Example CommunityRule module for voting created in Blockly."> </div> </div> <div role="contentinfo" class="container ucb-article-tags" itemprop="keywords"> <span class="visually-hidden">Tags:</span> <div class="ucb-article-tag-icon" aria-hidden="true"> <i class="fa-solid fa-tags"></i> </div> <a href="/lab/medlab/taxonomy/term/19" hreflang="en">Collaborative Governance</a> <a href="/lab/medlab/taxonomy/term/90" hreflang="en">CommunityRule</a> </div> <a href="/lab/medlab/asher-farr">Asher Farr</a> <span>,&nbsp;</span> <a href="/lab/medlab/nathan-schneider">Nathan Schneider</a> <div class="ucb-article-content ucb-striped-content"> <div class="container"> <div class="paragraph paragraph--type--article-content paragraph--view-mode--default"> <div class="ucb-article-content-media ucb-article-content-media-above"> <div> <div class="paragraph paragraph--type--media paragraph--view-mode--default"> <div> <div class="imageMediaStyle large_image_style"> <img loading="lazy" src="/lab/medlab/sites/default/files/styles/large_image_style/public/article-image/screen_shot_2022-02-13_at_7.05.57_pm.png?itok=PpQ4z9A1" width="1500" height="996" alt="Example CommunityRule module for voting created in Blockly."> </div> </div> </div> </div> </div> <div class="ucb-article-text d-flex align-items-center" itemprop="articleBody"> <div><p><a href="https://communityrule.info/" rel="nofollow">CommunityRule</a> is a Web app we've been building at MEDLab to help communities design, edit, and share their own governance systems. You can think about it as an effort to re-think the idea of bylaws in an Internet-native way. It's something that could be useful for all kinds of virtual communities, and we have developed it in partnership with open-source developers and mutual-aid groups. Currently, it is just a visual interface, but ultimately we hope it can export code for governance software tools.</p> <p>As an experiment, we are currently attempting to re-implement CommunityRule in <a href="https://github.com/google/Blockly" rel="nofollow">Blockly</a>, an open-source library for block-based visual code editing. This gets us one step closer to converting the governance structures described by someone’s community into code that can be implemented—for example, by the smart contracts of a DAO, or by software like <a href="https://policykit.org/" rel="nofollow">PolicyKit</a>. Blockly has a built-in functionality for converting blocks into code. You have to define what the code is, but doing an initial implementation in Blockly gives us a skeleton that we can fill in with code later. Blockly also has a built-in notion of type, which makes it easier to define what blocks can go together, further providing structure for converting the blocks to code. Blockly also has built-in definitions for various common programming structures like loops, conditional statements, and arithmetic operations. Conceivably, these could allow users to define their own governance modules with considerable precision and modify already existing ones easily. Overall, a CommunityRule blockly implementation is intended to begin bridging between the purely visual representation that we have now and a programmatic representation.</p> <p>The first experiment was making a modifiable block for a majority vote or a straw-poll. The block has several options. It allows users to set the winning threshold, which by default is 51 percent. It also has a quorum option, allowing users to specify a minimum number of voters required for a valid election. It takes as an input a candidate list and has a section to add more blocks that describe what to do if there is a tie. Theoretically, in a fuller implementation of CommunityRule, users could drop blocks into the tie section to describe what procedure to run if there is a tie, using other blocks.</p> <p>This block raises a few questions about the implementation in terms of how much detail is required. One of CommunityRule’s goals is readability, but as you get deeper into the weeds of formality and require blocks to become programs, you need more and more details specified. For example, this block takes as an input the list of candidates which would be required for an actual program to run a majority vote, in addition to a list of votes, but it’s unclear how much of that detail should be available to the users and how much could remain on the back-end.</p> <p>Here, for example, is the code behind the above module:</p> <p></p> <p>And the underlying JSON code:</p> <p></p> <p>While it may be possible to have the candidate list be present in the block but not shown to users, this is part of the difficulty with making the Blockly implementation. If something is necessary for the code but can reduce readability, we have to decide what will take priority.</p> <p>Another question raised by this block is how the blocks fit together. CommunityRule, as it stands, mixes procedure and structure with no clear distinction. It’s equally easy to drag and drop blocks that define structural elements such as circles or boards with procedural elements such as majority voting consensus, without clearly defining how the structure interacts with the procedure.</p> <p>This is acceptable in a purely visual implementation, because it relies on human intuition to determine how these things fit together, and there is no requirement of having a machine understand it. But with the Blockly implementation comes the question of how do we make structures and procedures talk to each other, and what connective tissue we have to create to do that.</p> <p>For example, the majority-voting block currently has a “left output” configuration meaning that it “plugs in” to another block as an input instead of following after another block in a stack of instructions. What exactly it can plug into is still undefined, however. A solution for this might be to create a type system with clearly defined input and output types for each block, so the users can tell how blocks fit together, but this could lead to confusion along with the possibility of reducing the possible governance structures that are definable using CommunityRule.</p> <p>One thing to try next is the implementation of the structural templates on CommunityRule, such as <a href="https://communityrule.info/create/?r=circles" rel="nofollow">circles</a>. So far, a little experimentation has been done to try and create a generalized structure block called a group, which should act as a sort of class initializer that would combine structure with procedure, along with some of the other CommunityRule blocks like values into an encompassing group structure.</p> <p>We could also simply add more Blockly versions of CommunityRule blocks with additional configuration options. This would help us explore how they might fit together and what kinds of patterns they have in common.</p> <p>Another next step is pursuing a more formal type system as discussed above, though the specifics of the type are still unclear. It appears that at minimum a distinction between blocks that dictate structure and blocks that dictate procedure must be established.</p> <p>One other need, which has come up several times during the development of CommunityRule, is having some sort of questionnaire that guides the user through creating a governance structure. This could go a long way in improving usability by narrowing the options and creating a template that users can modify instead of expecting them to start from scratch.</p></div> </div> </div> </div> </div> <h2> <div class="paragraph paragraph--type--ucb-related-articles-block paragraph--view-mode--default"> <div>Off</div> </div> </h2> <div>Traditional</div> <div>0</div> <div>On</div> <div>White</div> Tue, 15 Feb 2022 04:36:14 +0000 Anonymous 233 at /lab/medlab