commit 521c782c4232c063ee3d0bbf9282db977fda22d1 Author: Nathan Schneider Date: Sun Mar 23 21:44:39 2025 -0600 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8da2fb0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,44 @@ +# Hugo default output directory +/public/ + +# Generated files by hugo +/resources/_gen/ +/assets/jsconfig.json +hugo_stats.json + +# Temporary lock file while building +/.hugo_build.lock + +# OS generated files +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + +# IDE specific files +.idea +.vscode +*.swp +*.swo + +# Node modules if you're using npm +node_modules/ + +# Environment variables +.env + +# Log files +*.log + +# Local Netlify folder +.netlify + +# Build files +dist/ + +# Temporary files +*~ +\#*\# \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..bb1b1ad --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,49 @@ +image: registry.gitlab.com/pages/hugo:latest + +variables: + GIT_SUBMODULE_STRATEGY: recursive + +stages: + - build + - deploy + +build: + stage: build + script: + - hugo --minify + artifacts: + paths: + - public + only: + - master + +pages: + stage: deploy + script: + - echo "Deploying to GitLab Pages..." + artifacts: + paths: + - public + only: + - master + +# Self-hosted deployment using rsync +# Uncomment and configure this job for deploying to your own server +# deploy: +# stage: deploy +# image: alpine:latest +# before_script: +# - apk add --no-cache openssh-client rsync +# - eval $(ssh-agent -s) +# - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - +# - mkdir -p ~/.ssh +# - chmod 700 ~/.ssh +# - echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts +# - chmod 644 ~/.ssh/known_hosts +# script: +# - rsync -avuz --delete public/ $SSH_USER@$SSH_HOST:$DEPLOY_PATH +# only: +# - master +# environment: +# name: production +# url: https://your-domain.com \ No newline at end of file diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..71fe989 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,63 @@ +# Dispute Protocol Builder + +This is a prototype website, built in Hugo, to enable communities to develop customizable protocols for dispute resolution processes. It guides users through an accessible process that provides best practices while allowing for customization. + +## Project Structure + +- **Static Site Generator**: Hugo +- **Main Builder Interface**: `/themes/dispute-protocol-theme/layouts/_default/builder.html` +- **JavaScript Files**: + - `/static/js/builder.js`: Main application logic + - `/static/js/data/modules.js`: Predefined module options + - `/static/js/data/templates.js`: Complete protocol templates + - `/static/js/data/template-mapper.js`: Maps raw content to module references + +## Content Organization + +- **Components**: Building blocks of a protocol, defined in `/data/components/*.yaml` +- **Modules**: Reusable text blocks for specific fields, defined in `modules.js` +- **Templates**: Complete predefined protocols combining multiple modules + +## Data Model + +The application maintains a hierarchical data model: +- **Stages** → **Components** → **Fields** +- Each field can be populated with content from a **Module** + +## Core Features + +1. **Black & white UI**: Clean, accessible interface with vertical accordion sections +2. **Template selection**: Users can start with a predefined protocol template +3. **Module selection**: Users can choose from multiple pre-written modules for each field +4. **Customization**: Direct text editing in fields +5. **Export options**: Markdown, PDF, and JSON formats +6. **Import capability**: Load previously saved protocols + +## Module System + +Modules are the heart of the customization system: +- Each module has: `id`, `title`, `componentId`, `fieldId`, and `content` +- Modules are categorized by type (principles, participants, filing, etc.) +- Custom modules are generated from templates via `template-mapper.js` +- Module selector dropdowns display available options for each field + +## Recent Improvements + +1. **Template mapping**: Fixed custom module generation to create descriptive titles +2. **Module presentation**: Removed category labels from dropdowns +3. **Module coverage**: Added comprehensive modules for all components +4. **Name formatting**: Enhanced logic to extract meaningful titles from content + +## Deployment + +- Deployable from a self-hosted GitLab server +- Data is maintained in YAML files for components and stages +- Module content is defined in JavaScript for easy client-side use + +## Key Files to Modify + +- `/static/js/data/modules.js`: Add, edit or remove module options +- `/static/js/data/template-mapper.js`: Adjust how custom modules are generated +- `/static/js/data/templates.js`: Define new protocol templates +- `/static/js/builder.js`: Modify core interface functionality +- `/static/css/main.css`: Adjust styling and responsive behavior diff --git a/GITLAB_DEPLOYMENT.md b/GITLAB_DEPLOYMENT.md new file mode 100644 index 0000000..b307fd8 --- /dev/null +++ b/GITLAB_DEPLOYMENT.md @@ -0,0 +1,167 @@ +# Deploying from a Self-Hosted GitLab Server + +This guide provides detailed instructions for deploying the Dispute Protocol application from a self-hosted GitLab server. + +## Prerequisites + +- A self-hosted GitLab server (GitLab Community Edition or Enterprise Edition) +- GitLab Runner installed and configured on your server +- Basic familiarity with GitLab CI/CD + +## Deployment Options + +The project includes a `.gitlab-ci.yml` file that supports two deployment methods: + +1. **GitLab Pages** - For hosting directly on your GitLab instance +2. **Custom Server Deployment** - For deploying to an external web server + +## Option 1: Deploying to GitLab Pages + +GitLab Pages provides an easy way to host static websites directly from your GitLab repository. + +### Configuration Steps: + +1. Ensure GitLab Pages is enabled on your self-hosted GitLab instance: + - Go to Admin Area > Settings > Pages + - Enable GitLab Pages and configure the domain settings + +2. The existing `.gitlab-ci.yml` file already includes the necessary configuration for GitLab Pages. When you push to the `master` branch, the site will be automatically built and deployed. + +3. Access your site at `https://[group-or-username].gitlab-instance.com/dispute-protocol` + +## Option 2: Deploying to a Custom Web Server + +For more control, you can deploy to your own web server using rsync over SSH. + +### Configuration Steps: + +1. In your GitLab repository, go to **Settings > CI/CD > Variables** + +2. Add the following variables: + - `SSH_PRIVATE_KEY`: The private SSH key for connecting to your deployment server + - `SSH_KNOWN_HOSTS`: Output of `ssh-keyscan your-server.com` + - `SSH_USER`: Username on your deployment server + - `SSH_HOST`: Hostname or IP address of your deployment server + - `DEPLOY_PATH`: Path on your server where the site should be deployed + +3. Edit the `.gitlab-ci.yml` file and uncomment the `deploy` job + +4. Update the `url` parameter in the environment section with your actual domain + +5. Push your changes to the `master` branch to trigger the deployment + +### How to generate SSH_KNOWN_HOSTS value: + +```bash +ssh-keyscan -H your-server.com +``` + +### How to generate and configure SSH keys: + +1. Generate a new SSH key pair (without a passphrase for automated use): + ```bash + ssh-keygen -t ed25519 -C "gitlab-deploy" -f gitlab-deploy-key + ``` + +2. Add the public key to your server's authorized_keys: + ```bash + cat gitlab-deploy-key.pub >> ~/.ssh/authorized_keys + ``` + +3. Copy the private key content (including BEGIN and END lines) and paste it into the `SSH_PRIVATE_KEY` variable in GitLab + +## Web Server Configuration + +### Nginx Configuration + +```nginx +server { + listen 80; + server_name your-domain.com; + + root /path/to/deployment; + index index.html; + + location / { + try_files $uri $uri/ =404; + } + + # Optional: Enable gzip compression + gzip on; + gzip_vary on; + gzip_proxied any; + gzip_comp_level 6; + gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; +} +``` + +### Apache Configuration + +Create a .htaccess file in your deployment directory: + +```apache +# Enable rewriting +RewriteEngine On + +# If the requested resource doesn't exist as a file or directory +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d + +# Rewrite to index.html +RewriteRule ^(.*)$ /index.html [L] + +# Cache control for static assets + + Header set Cache-Control "max-age=604800, public" + +``` + +## Manual Deployment + +If you prefer to deploy manually without GitLab CI/CD, you can use the included scripts: + +### Testing the Build Locally + +Before deploying, you can test the build locally using the included `build-test.sh` script: + +```bash +./build-test.sh [port] +``` + +Example: +```bash +./build-test.sh 8080 +``` + +This will build the site and start a temporary web server on the specified port (default: 8080), allowing you to verify that everything works correctly before deployment. + +### Deploying to a Remote Server + +To deploy to your own server manually, use the included `deploy.sh` script: + +```bash +./deploy.sh [username] [server] [deploy-path] +``` + +Example: +```bash +./deploy.sh deploy-user example.com /var/www/dispute-protocol +``` + +This script will build the site and then use rsync to deploy it to your server. + +## Troubleshooting + +### CI/CD Pipeline Fails + +1. Check the pipeline logs for detailed error messages +2. Verify that the GitLab Runner is properly configured and running +3. Ensure the SSH key has the correct permissions on the target server +4. Try running the build and deploy steps manually to identify issues + +### Site Not Accessible After Deployment + +1. Check web server logs for errors +2. Verify file permissions in the deployment directory +3. Ensure the web server configuration is correct +4. Check that the domain DNS is pointing to the correct server \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f08e09f --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Community Dispute Protocol Builder + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..15c95f5 --- /dev/null +++ b/README.md @@ -0,0 +1,196 @@ +# Community Dispute Protocol Builder + +A Hugo-based web application that helps communities create structured processes for resolving conflicts and disputes. + +Created as a prototype by Nathan Schneider with Claude Code. + +## Features + +- Interactive protocol builder with multi-stage process +- Pre-defined modules for common dispute resolution approaches +- Complete protocol templates for different facilitation styles +- Export protocols as Markdown, PDF, or JSON +- Import previously created protocols (JSON format) +- Responsive design for desktop and mobile + +## Setup and Installation + +1. Make sure you have [Hugo](https://gohugo.io/installation/) installed +2. Clone this repository +3. Run the local development server: + +```bash +cd dispute-protocol +hugo server -D +``` + +4. Access the site at http://localhost:1313/ + +## Customizing the Dispute Protocol + +### Adding or Modifying Stages + +Edit the file `data/stages/stages.yaml` to modify the stages of the dispute resolution process. + +```yaml +- id: new-stage + title: New Stage Name + description: Description of this stage + order: 7 # This determines the order in which stages appear +``` + +### Adding or Modifying Components + +Components are grouped by stage. Create or edit files in the `data/components/` directory, naming the file after the stage ID. + +For example, to add components to a stage with ID "new-stage", create `data/components/new-stage.yaml`: + +```yaml +- id: new-component + title: New Component Title + description: Description of what this component addresses + stageId: new-stage + order: 1 + fields: + - id: newComponentField + type: text + label: Field Label + placeholder: Placeholder text... + required: true +``` + +### Adding Pre-defined Modules + +Modules provide pre-written content that users can select for specific fields. There are two places where modules are defined: + +1. **YAML Definition (source of truth):** Create or edit files in the `data/modules/` directory. + +```yaml +- id: new-module + title: New Module Title + componentId: new-component + fieldId: newComponentField + content: | + This is the pre-defined content that will be inserted when + the user selects this module. It can include multiple lines. +``` + +2. **JavaScript Implementation:** The frontend uses modules defined in `static/js/data/modules.js`. When adding new modules to the YAML files, you should also add them to this JavaScript file to make them available in the builder interface. + +```javascript +const moduleData = { + module_category: [ + { + id: "new-module", + title: "New Module Title", + componentId: "new-component", + fieldId: "newComponentField", + content: `This is the pre-defined content that will be inserted when +the user selects this module. It can include multiple lines.` + } + ] +}; +``` + +**Important:** Make sure the `componentId` and `fieldId` values match exactly with the component and field IDs defined in the `data/components/` directory. + +### Using Protocol Templates + +The application includes complete protocol templates that pre-fill all components with consistent content. Three templates are provided: + +1. **Peer-to-Peer Protocol**: A self-facilitated process where participants work together directly to resolve disputes without a formal facilitator. + +2. **Chosen Facilitator Protocol**: A process where participants mutually select a facilitator who may not have specialized skills but can help guide the discussion. + +3. **Facilitation Council Protocol**: A structured process with a trained council of facilitators who manage the dispute resolution process. + +Users can select a template from the dropdown at the top of the builder page to automatically populate all fields. They can then customize the content as needed for their community's specific requirements. + +#### Adding New Protocol Templates + +To add a new protocol template, edit the file `static/js/data/templates.js`. Each template follows this structure: + +```javascript +{ + id: "template-id", + title: "Template Name", + description: "Brief description of this template approach", + data: { + stages: { + // Full protocol data structure with content for all stages and components + } + } +} +``` + +## Deployment + +### Building for Production + +To build the site for production: + +```bash +hugo --minify +``` + +The generated site will be in the `public` directory, which you can deploy to any static hosting service. + +### Deploying from a Self-Hosted GitLab Server + +This project includes GitLab CI/CD configuration for easy deployment. The included `.gitlab-ci.yml` file supports two deployment options: + +1. **GitLab Pages** - Automatically deployed when you push to the master branch +2. **Custom Server Deployment** - Deploy to your own server using rsync + +#### Setting Up Custom Server Deployment + +1. In your GitLab repository, go to **Settings > CI/CD > Variables** + +2. Add the following variables: + - `SSH_PRIVATE_KEY`: Your private SSH key for the deployment server + - `SSH_KNOWN_HOSTS`: Output of `ssh-keyscan your-server.com` + - `SSH_USER`: Username on your deployment server + - `SSH_HOST`: Hostname or IP of your deployment server + - `DEPLOY_PATH`: Path on your server where the site should be deployed + +3. Uncomment the `deploy` job in `.gitlab-ci.yml` + +4. Update the `url` parameter in the environment section with your actual domain + +5. Push your changes to the master branch to trigger the deployment + +#### Web Server Configuration + +For Nginx, use a configuration similar to this: + +```nginx +server { + listen 80; + server_name your-domain.com; + + location / { + root /path/to/deployment; + index index.html; + try_files $uri $uri/ =404; + } +} +``` + +For Apache, create a .htaccess file in your deployment directory: + +```apache +RewriteEngine On +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule ^(.*)$ /index.html [L] +``` + +## Technologies Used + +- Hugo static site generator +- JavaScript for interactive features +- jsPDF for PDF generation + +## License + +This project is licensed under the MIT License - see the LICENSE file for details. diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..00e77bd --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,6 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +draft: true +--- + diff --git a/build-test.sh b/build-test.sh new file mode 100755 index 0000000..5603105 --- /dev/null +++ b/build-test.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +# Test build script for the Dispute Protocol site +# This script builds the site and runs a temporary server to check it works + +set -e + +# Colors for output +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +RED='\033[0;31m' +NC='\033[0m' # No Color + +# Configuration +BUILD_DIR="public" +PORT=${1:-8080} + +# Check if Hugo is installed +if ! command -v hugo &> /dev/null; then + echo -e "${RED}Error: Hugo is not installed. Please install Hugo first.${NC}" + echo "Visit https://gohugo.io/installation/ for installation instructions." + exit 1 +fi + +echo -e "${YELLOW}Building site...${NC}" +hugo --minify + +# Check if build succeeded +if [ ! -d "$BUILD_DIR" ]; then + echo -e "${RED}Error: Build failed. The '$BUILD_DIR' directory doesn't exist.${NC}" + exit 1 +fi + +echo -e "${GREEN}Build completed successfully!${NC}" +echo -e "${YELLOW}Starting a temporary server on port $PORT...${NC}" +echo -e "${YELLOW}Press Ctrl+C to stop the server.${NC}" + +cd $BUILD_DIR +python3 -m http.server $PORT + +exit 0 \ No newline at end of file diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..e6cf960 --- /dev/null +++ b/config.toml @@ -0,0 +1,41 @@ +baseURL = '/' +languageCode = 'en-us' +title = 'Community Dispute Protocol' +theme = 'dispute-protocol-theme' + +# Enable relative URLs for easier deployment in different environments +relativeURLs = true +canonifyURLs = false + +# Output configuration +[outputs] + home = ["HTML", "RSS"] + +# Configure static resources +[params] + # Custom CSS + customCSS = ["css/main.css"] + + # Custom JS + customJS = ["js/builder.js", "js/data/modules.js", "js/data/templates.js"] + + # Site description + description = "A tool for communities to develop customized dispute resolution protocols" + + # Footer text + footer = "Powered by Hugo and hosted on GitLab" + +# Menu configuration +[menu] + [[menu.main]] + name = "Home" + url = "/" + weight = 1 + [[menu.main]] + name = "Builder" + url = "/builder/" + weight = 2 + [[menu.main]] + name = "About" + url = "/about/" + weight = 3 diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..efd25d4 --- /dev/null +++ b/content/_index.md @@ -0,0 +1,8 @@ +--- +title: "Community Dispute Protocol Builder" +date: 2023-07-10 +draft: false +--- + +Welcome to the Community Dispute Protocol Builder. This tool helps communities create structured processes for resolving conflicts and disputes. + diff --git a/content/about.md b/content/about.md new file mode 100644 index 0000000..85c106c --- /dev/null +++ b/content/about.md @@ -0,0 +1,95 @@ +--- +title: "About" +date: 2023-07-10 +draft: false +--- + +# About the Community Dispute Protocol Builder + +The Dispute Protocol Builder is a collaborative tool designed to help communities develop customized frameworks for addressing and resolving conflicts. Rather than imposing a one-size-fits-all solution, this tool empowers communities to create protocols that reflect their unique values, culture, and specific needs. + +## Why Create a Dispute Protocol? + +Every community experiences conflicts. Whether in neighborhoods, workplaces, cooperatives, online spaces, or cultural groups, disagreements and tensions are inevitable. Having a thoughtful, agreed-upon process for addressing these conflicts provides numerous benefits: + +- **Prevents escalation** of small issues into major conflicts +- **Creates consistency** and predictability during challenging times +- **Ensures fairness and transparency** in how issues are addressed +- **Reduces harm** during the resolution process +- **Builds community capacity** to handle future conflicts +- **Strengthens relationships** by demonstrating commitment to healthy conflict engagement +- **Embodies community values** in practical, actionable ways +- **Provides guidance** when emotions are running high + +Without a clear protocol, communities often default to ad-hoc approaches that can amplify harm, reinforce power imbalances, or leave conflicts unresolved. + +## How the Builder Works + +The Protocol Builder guides you through creating a comprehensive dispute resolution framework using a modular approach: + +### 1. Start from Templates or Build from Scratch + +Begin with one of our pre-designed templates based on restorative justice, transformative justice, or consensus-based approaches—or start with a blank slate and build your own custom protocol. + +### 2. Customize Each Stage + +The builder walks you through six key stages of dispute resolution: + +1. **Preparation**: Establishing core values, principles, and participant roles +2. **Initiation**: Defining how disputes are raised, acknowledged, and entered into the process +3. **Exploration**: Investigating and understanding the facts, perspectives, and underlying needs +4. **Deliberation**: Discussing potential solutions and working toward agreements +5. **Resolution**: Finalizing, documenting, and implementing solutions +6. **Follow-up**: Evaluating outcomes, ensuring accountability, and making improvements + +### 3. Mix and Match Modules + +For each component within these stages, you can select from pre-written modules or craft your own content. This modular approach lets you: + +- Choose elements that align with your community's values +- Adapt the protocol based on your community's capacity and resources +- Create a coherent process that addresses your specific needs +- Ensure nothing important is overlooked + +### 4. Export and Share + +When your protocol is complete, export it as: +- A formatted PDF to share with your community +- A Markdown document for easy editing and version control +- A JSON file that can be imported back into the builder for future updates + +## Design Principles + +The Dispute Protocol Builder is designed around these core principles: + +- **Accessibility**: Simple, clear language and an intuitive interface make this tool usable by anyone, regardless of technical expertise or familiarity with conflict resolution terminology. + +- **Flexibility**: Every component is customizable to accommodate diverse community contexts and needs. + +- **Comprehensiveness**: The tool addresses all aspects of dispute resolution, from initial values to final implementation. + +- **Educational**: Pre-written modules offer best practices drawn from various dispute resolution traditions. + +- **Privacy-Focused**: All work happens locally in your browser—no data is sent to our servers. + +## Who Is This For? + +This tool is designed for any group that wants to improve how they handle internal conflicts: + +- **Intentional Communities and Cooperatives** +- **Neighborhood Associations** +- **Activist Groups and Collectives** +- **Small Businesses and Worker Cooperatives** +- **Faith Communities** +- **Online Communities and Forums** +- **Educational Institutions** +- **Non-Profit Organizations** +- **Artistic and Cultural Collectives** + +## Get Started + +
+Ready to create your community's dispute protocol? + +Start Building Your Protocol +
\ No newline at end of file diff --git a/content/builder.md b/content/builder.md new file mode 100644 index 0000000..42fef4a --- /dev/null +++ b/content/builder.md @@ -0,0 +1,8 @@ +--- +title: "Protocol Builder" +date: 2023-07-10 +draft: false +layout: "builder" +--- + +Use this interactive builder to create your community's dispute resolution protocol. \ No newline at end of file diff --git a/content/modules.md b/content/modules.md new file mode 100644 index 0000000..d136deb --- /dev/null +++ b/content/modules.md @@ -0,0 +1,8 @@ +--- +title: "Modules Library" +description: "Browse all available modules for the Dispute Protocol Builder" +layout: "modules" +draft: false +--- + +This page displays all available modules in the Dispute Protocol Builder, organized by Stage and Component. You can see which Templates use each module. \ No newline at end of file diff --git a/data/components/appeal.yaml b/data/components/appeal.yaml new file mode 100644 index 0000000..ed8f8ff --- /dev/null +++ b/data/components/appeal.yaml @@ -0,0 +1,23 @@ +- id: appeal_criteria + title: "What are the criteria for a permissible appeal?" + description: "Standards for allowing an appeal of a resolution" + stageId: appeal + order: 1 + fields: + - id: appealCriteriaText + type: text + label: "What are the criteria for a permissible appeal?" + placeholder: "Describe what circumstances justify an appeal of a resolution..." + required: true + +- id: appeal_process + title: "What happens when an appeal occurs?" + description: "Process for handling appeals" + stageId: appeal + order: 2 + fields: + - id: appealProcessText + type: text + label: "What happens when an appeal occurs?" + placeholder: "Describe the process that follows when an appeal is initiated..." + required: true \ No newline at end of file diff --git a/data/components/assessment.yaml b/data/components/assessment.yaml new file mode 100644 index 0000000..9c73422 --- /dev/null +++ b/data/components/assessment.yaml @@ -0,0 +1,59 @@ +- id: dispute_assessment + title: "How to assess the state of the dispute?" + description: "Methods for evaluating the current status of a dispute" + stageId: assessment + order: 1 + fields: + - id: disputeAssessmentText + type: text + label: "How is the state of the dispute assessed?" + placeholder: "Describe methods used to evaluate the current status of a dispute..." + required: true + +- id: values_adherence + title: "Are community values being followed?" + description: "Evaluating whether the process is aligned with community values" + stageId: assessment + order: 2 + fields: + - id: valuesAdherenceText + type: text + label: "How do you ensure community values are being followed?" + placeholder: "Describe how you evaluate whether the process adheres to community values..." + required: true + +- id: jurisdiction + title: "Is the dispute within the jurisdiction of this process?" + description: "Determining whether this is the appropriate forum for the dispute" + stageId: assessment + order: 3 + fields: + - id: jurisdictionText + type: text + label: "How do you determine if a dispute falls within this process's jurisdiction?" + placeholder: "Describe how you determine whether this process is appropriate for a given dispute..." + required: true + +- id: non_participation + title: "What happens when someone fails to participate?" + description: "Handling non-participation in the process" + stageId: assessment + order: 4 + fields: + - id: nonParticipationText + type: text + label: "What happens when someone fails to participate?" + placeholder: "Describe procedures for handling situations where someone refuses to participate..." + required: true + +- id: process_change + title: "What if the process needs to be changed?" + description: "Adapting the process when necessary" + stageId: assessment + order: 5 + fields: + - id: processChangeText + type: text + label: "What if the process needs to be changed?" + placeholder: "Describe how the process can be adapted if it's not working effectively..." + required: true \ No newline at end of file diff --git a/data/components/become_aware.yaml b/data/components/become_aware.yaml new file mode 100644 index 0000000..c729c92 --- /dev/null +++ b/data/components/become_aware.yaml @@ -0,0 +1,23 @@ +- id: reporting + title: "Reporting" + description: "Methods for reporting conflicts or disputes" + stageId: become_aware + order: 1 + fields: + - id: reportingText + type: text + label: "How are conflicts or disputes reported?" + placeholder: "Describe the mechanisms for reporting conflicts..." + required: true + +- id: monitoring + title: "Monitoring" + description: "Proactive monitoring for potential conflicts" + stageId: become_aware + order: 2 + fields: + - id: monitoringText + type: text + label: "How does your community monitor for potential conflicts?" + placeholder: "Describe approaches to monitoring for potential conflicts..." + required: true \ No newline at end of file diff --git a/data/components/delegation.yaml b/data/components/delegation.yaml new file mode 100644 index 0000000..48578a7 --- /dev/null +++ b/data/components/delegation.yaml @@ -0,0 +1,11 @@ +- id: delegation_options + title: "Where can the dispute be delegated if this process is inadequate?" + description: "Alternative processes for disputes that cannot be handled by this process" + stageId: delegation + order: 1 + fields: + - id: delegationOptionsText + type: text + label: "Where can the dispute be delegated if this process is inadequate?" + placeholder: "Describe alternative processes for disputes that cannot be handled internally..." + required: true \ No newline at end of file diff --git a/data/components/deliberation.yaml b/data/components/deliberation.yaml new file mode 100644 index 0000000..0a040e4 --- /dev/null +++ b/data/components/deliberation.yaml @@ -0,0 +1,35 @@ +- id: deliberation_process + title: "How do participants deliberate about the dispute?" + description: "Methods for deliberation during the dispute process" + stageId: deliberation + order: 1 + fields: + - id: deliberationProcessText + type: text + label: "How do participants deliberate about the dispute?" + placeholder: "Describe the format and structure of deliberations..." + required: true + +- id: additional_voices + title: "Who, beyond the main participants, can be heard?" + description: "Including additional perspectives in the deliberation" + stageId: deliberation + order: 2 + fields: + - id: additionalVoicesText + type: text + label: "Who, beyond the main participants, can be heard?" + placeholder: "Describe whose voices are included in deliberations beyond the main parties..." + required: true + +- id: deliberation_conclusion + title: "When is the deliberation over?" + description: "Criteria for concluding the deliberation phase" + stageId: deliberation + order: 3 + fields: + - id: deliberationConclusionText + type: text + label: "When is the deliberation over?" + placeholder: "Describe how you determine when deliberation is complete..." + required: true \ No newline at end of file diff --git a/data/components/initiation.yaml b/data/components/initiation.yaml new file mode 100644 index 0000000..7ea2cc5 --- /dev/null +++ b/data/components/initiation.yaml @@ -0,0 +1,23 @@ +- id: filing + title: Filing a Complaint + description: Process for submitting a dispute + stageId: initiation + order: 1 + fields: + - id: filingProcess + type: text + label: Filing Process + placeholder: Describe how disputes are submitted... + required: true + +- id: notification + title: Notification Process + description: How parties are informed of the dispute + stageId: initiation + order: 2 + fields: + - id: notificationMethod + type: text + label: Notification Method + placeholder: Describe how involved parties are notified... + required: true \ No newline at end of file diff --git a/data/components/intake.yaml b/data/components/intake.yaml new file mode 100644 index 0000000..8520a4c --- /dev/null +++ b/data/components/intake.yaml @@ -0,0 +1,71 @@ +- id: process_start + title: "How does the process begin?" + description: "The mechanism for initiating the dispute process" + stageId: intake + order: 1 + fields: + - id: processStartText + type: text + label: "How does the process begin?" + placeholder: "Describe how disputes are initiated in your community..." + required: true + +- id: rules_access + title: "Where does the community keep its rules?" + description: "Location and accessibility of community rules and guidelines" + stageId: intake + order: 2 + fields: + - id: rulesAccessText + type: text + label: "Where does the community keep its rules?" + placeholder: "Describe where community rules are documented and how they can be accessed..." + required: true + +- id: information_access + title: "Who has access to information about the process?" + description: "Transparency and confidentiality policies" + stageId: intake + order: 3 + fields: + - id: informationAccessText + type: text + label: "Who has access to information about the process?" + placeholder: "Describe who can access information about ongoing dispute processes..." + required: true + +- id: participant_inclusion + title: "How are other participants brought into the process?" + description: "Methods for notifying and including relevant parties" + stageId: intake + order: 4 + fields: + - id: participantInclusionText + type: text + label: "How are other participants brought into the process?" + placeholder: "Describe how relevant parties are notified and included in the process..." + required: true + +- id: participation_requirement + title: "Is participation in the process required or voluntary for involved parties?" + description: "Expectations regarding participation" + stageId: intake + order: 5 + fields: + - id: participationRequirementText + type: text + label: "Is participation required or voluntary?" + placeholder: "Describe whether participation is mandatory or optional for involved parties..." + required: true + +- id: participation_commitments + title: "What commitments does participation involve?" + description: "Expectations of participants in the process" + stageId: intake + order: 6 + fields: + - id: participationCommitmentsText + type: text + label: "What commitments does participation involve?" + placeholder: "Describe what participants are committing to when they engage in the process..." + required: true \ No newline at end of file diff --git a/data/components/preparation.yaml b/data/components/preparation.yaml new file mode 100644 index 0000000..139030b --- /dev/null +++ b/data/components/preparation.yaml @@ -0,0 +1,23 @@ +- id: principles + title: Guiding Principles + description: Core values that guide the dispute resolution process + stageId: preparation + order: 1 + fields: + - id: principlesText + type: text + label: Principles + placeholder: List the guiding principles for your dispute resolution process... + required: true + +- id: participants + title: Participants + description: Roles and responsibilities in the dispute resolution process + stageId: preparation + order: 2 + fields: + - id: participantsRoles + type: text + label: Roles and Responsibilities + placeholder: Define the roles involved in your dispute resolution process... + required: true \ No newline at end of file diff --git a/data/components/prepare.yaml b/data/components/prepare.yaml new file mode 100644 index 0000000..603f399 --- /dev/null +++ b/data/components/prepare.yaml @@ -0,0 +1,35 @@ +- id: values + title: "Values" + description: "Core values that guide the dispute resolution process" + stageId: prepare + order: 1 + fields: + - id: valuesText + type: text + label: "What values guide your dispute resolution process?" + placeholder: "List the values that inform your approach to conflict..." + required: true + +- id: agreements + title: "Agreements" + description: "Agreements about how conflicts will be handled" + stageId: prepare + order: 2 + fields: + - id: agreementsText + type: text + label: "What agreements do community members make about handling conflicts?" + placeholder: "Describe the agreements community members make about how conflicts will be handled..." + required: true + +- id: skills + title: "Skills" + description: "Skills needed for handling disputes effectively" + stageId: prepare + order: 3 + fields: + - id: skillsText + type: text + label: "What skills do community members need for handling disputes?" + placeholder: "Describe the skills that community members should develop..." + required: true \ No newline at end of file diff --git a/data/components/process.yaml b/data/components/process.yaml new file mode 100644 index 0000000..082248d --- /dev/null +++ b/data/components/process.yaml @@ -0,0 +1,35 @@ +- id: community_values + title: "What values does the community hold in disputes?" + description: "Core values that guide the dispute resolution process" + stageId: process + order: 1 + fields: + - id: communityValuesText + type: text + label: "What values does the community hold in disputes?" + placeholder: "Describe the core values that guide your community's approach to conflicts..." + required: true + +- id: facilitation + title: "How is the process facilitated?" + description: "Methods of facilitation during the dispute process" + stageId: process + order: 2 + fields: + - id: facilitationText + type: text + label: "How is the process facilitated?" + placeholder: "Describe who facilitates the process and how they are selected/trained..." + required: true + +- id: ground_rules + title: "What are the ground-rules of the process?" + description: "Basic rules of conduct during the dispute process" + stageId: process + order: 3 + fields: + - id: groundRulesText + type: text + label: "What are the ground-rules of the process?" + placeholder: "Describe the rules of engagement that all participants must follow..." + required: true \ No newline at end of file diff --git a/data/components/resolution.yaml b/data/components/resolution.yaml new file mode 100644 index 0000000..a13494b --- /dev/null +++ b/data/components/resolution.yaml @@ -0,0 +1,23 @@ +- id: resolution_process + title: "How does resolution of the dispute occur?" + description: "Methods for reaching a resolution" + stageId: resolution + order: 1 + fields: + - id: resolutionProcessText + type: text + label: "How does resolution of the dispute occur?" + placeholder: "Describe the process by which disputes are resolved..." + required: true + +- id: resolution_failure + title: "What if a resolution cannot be reached?" + description: "Handling situations where resolution is not achieved" + stageId: resolution + order: 2 + fields: + - id: resolutionFailureText + type: text + label: "What if a resolution cannot be reached?" + placeholder: "Describe what happens when parties cannot come to a resolution..." + required: true \ No newline at end of file diff --git a/data/modules/assessment.yaml b/data/modules/assessment.yaml new file mode 100644 index 0000000..be779cf --- /dev/null +++ b/data/modules/assessment.yaml @@ -0,0 +1,27 @@ +- id: participant-goal-assessment + title: "Participant Goal Assessment" + componentId: dispute_assessment + fieldId: disputeAssessmentText + content: | + The dispute is assessed by focusing on the goals of all participants: + + 1. Each participant articulates what they hope to achieve through the process + 2. Participants identify areas of common ground and shared interests + 3. The facilitator helps frame the dispute in terms of compatible and competing goals + 4. Participants rate the importance of different goals to help prioritize + 5. Assessment continues throughout the process as goals may evolve + 6. Resolution options are evaluated against the stated goals of participants + +- id: fact-assessment + title: "Fact Assessment" + componentId: dispute_assessment + fieldId: disputeAssessmentText + content: | + The dispute is assessed through a structured fact-finding process: + + 1. Facilitators interview all parties separately to gather initial accounts + 2. Documentary evidence and other materials are collected and cataloged + 3. Areas of factual agreement and disagreement are identified + 4. Where possible, neutral verification of disputed facts is sought + 5. A written summary of established facts is created and shared with participants + 6. The dispute assessment is updated as new information becomes available \ No newline at end of file diff --git a/data/modules/delegation.yaml b/data/modules/delegation.yaml new file mode 100644 index 0000000..3cba09e --- /dev/null +++ b/data/modules/delegation.yaml @@ -0,0 +1,41 @@ +- id: police-report + title: "Refer to Police Report" + componentId: delegation_options + fieldId: delegationOptionsText + content: | + In cases where this process is inadequate, disputes may be referred to law enforcement: + + 1. Situations involving immediate danger or criminal behavior are referred to police + 2. The community does not attempt to handle issues of criminal law internally + 3. Support is offered to community members who need to file police reports + 4. Community members may request an advocate to accompany them + 5. The community maintains relationships with local law enforcement liaisons + 6. Community process may resume after legal proceedings if appropriate + +- id: internal-process + title: "Refer to Another Internal Process" + componentId: delegation_options + fieldId: delegationOptionsText + content: | + In cases where this process is inadequate, disputes may be referred to other internal processes: + + 1. The community maintains several conflict resolution pathways for different situations + 2. Disputes involving multiple community groups are referred to the inter-group resolution committee + 3. Disputes requiring specialized knowledge may be referred to relevant working groups + 4. Cases requiring more structured intervention may be referred to the elder council + 5. Mediation services are available as an alternative to the standard process + 6. The community maintains clear guidelines for which process is appropriate for different situations + +- id: external-process + title: "Refer to External Process" + componentId: delegation_options + fieldId: delegationOptionsText + content: | + In cases where this process is inadequate, disputes may be referred to external resolution services: + + 1. The community maintains partnerships with professional mediation services + 2. Complex cases may be referred to specialized conflict resolution organizations + 3. Cases involving legal questions may be referred to legal aid services + 4. The community maintains a fund to help members access external services when needed + 5. A list of recommended external resources is maintained and regularly updated + 6. The community liaison helps ensure smooth handoff to external processes \ No newline at end of file diff --git a/data/modules/filing.yaml b/data/modules/filing.yaml new file mode 100644 index 0000000..147028f --- /dev/null +++ b/data/modules/filing.yaml @@ -0,0 +1,21 @@ +- id: written-filing + title: Written Filing Process + componentId: filing + fieldId: filingProcess + content: | + 1. Complainant fills out a standard form describing the dispute + 2. Form includes sections for: parties involved, description of the issue, desired outcome + 3. Submission can be made via email, website, or physical drop-off + 4. Complainant receives confirmation of receipt + 5. Submission is reviewed for completeness within 48 hours + +- id: verbal-filing + title: Verbal Filing Process + componentId: filing + fieldId: filingProcess + content: | + 1. Complainant schedules a meeting with a designated intake person + 2. During the meeting, the intake person documents the dispute details + 3. The intake person reviews the documented information with the complainant + 4. Once approved, the complaint is officially filed + 5. Complainant receives a copy of the documented complaint \ No newline at end of file diff --git a/data/modules/intake.yaml b/data/modules/intake.yaml new file mode 100644 index 0000000..96dd9c9 --- /dev/null +++ b/data/modules/intake.yaml @@ -0,0 +1,104 @@ +- id: incident-report-form + title: "Incident Report Form" + componentId: process_start + fieldId: processStartText + content: | + The dispute process begins when a community member fills out an incident report form. This form includes: + + 1. Details about the parties involved in the dispute + 2. A description of what happened, including dates and times + 3. Any relevant evidence or documentation + 4. A description of the outcome the person is seeking + + The form can be submitted electronically through our community portal or as a paper form to the designated community coordinator. + +- id: strong-confidentiality + title: "Strong Confidentiality" + componentId: information_access + fieldId: informationAccessText + content: | + Our community practices strong confidentiality in dispute processes: + + 1. Only the designated facilitator(s) and directly involved parties have access to full information + 2. All participants must sign confidentiality agreements + 3. Records are kept secure and are accessible only to the dispute resolution committee + 4. Only general statistics and anonymized outcomes may be shared with the broader community + 5. Breaches of confidentiality may result in removal from the process + +- id: strong-transparency + title: "Strong Transparency" + componentId: information_access + fieldId: informationAccessText + content: | + Our community practices strong transparency in dispute processes: + + 1. Basic information about active disputes is available to all community members + 2. Proceedings are documented and records are available for community review + 3. Regular updates on the status of disputes are shared at community meetings + 4. Only personal identifying information and sensitive details are redacted + 5. All decisions and their rationales are published internally + +- id: notification-message + title: "Notification Message" + componentId: participant_inclusion + fieldId: participantInclusionText + content: | + Additional participants are brought into the process through a formal notification message: + + 1. The facilitator sends a written notification to all identified relevant parties + 2. The notification includes the nature of the dispute, the process that will be followed, and their role + 3. Recipients are given information about how to respond and participate + 4. The notification includes resources to help participants understand the process + 5. Participants have 7 days to acknowledge receipt and confirm their participation + +- id: summons + title: "Summons" + componentId: participant_inclusion + fieldId: participantInclusionText + content: | + Additional participants are brought into the process through a formal summons: + + 1. The dispute committee issues an official summons to all identified relevant parties + 2. The summons clearly states that participation is required according to community agreements + 3. It specifies the date, time, and method of required appearance + 4. The summons outlines potential consequences of non-participation + 5. Delivery of the summons is documented to ensure proper notification + +- id: voluntary-participation + title: "Voluntary Participation" + componentId: participation_requirement + fieldId: participationRequirementText + content: | + Participation in our dispute resolution process is entirely voluntary: + + 1. All parties must consent to participate in the process + 2. Any party may withdraw from the process at any time + 3. No negative consequences result from declining to participate + 4. Alternative means of resolution are suggested for those who decline + 5. The community respects individuals' autonomy in choosing whether to engage + +- id: required-participation + title: "Required Participation" + componentId: participation_requirement + fieldId: participationRequirementText + content: | + Participation in our dispute resolution process is required for all community members: + + 1. By joining our community, members agree to participate in the dispute process when necessary + 2. Participation is mandatory for all named parties in a dispute + 3. Failure to participate may result in consequences as outlined in our community agreement + 4. Only in exceptional circumstances may exemptions be granted + 5. Repeated refusal to participate may result in review of community membership + +- id: stake-based-participation + title: "Stake-based Participation" + componentId: participation_commitments + fieldId: participationCommitmentsText + content: | + Participants in the dispute process must place a meaningful stake into the process: + + 1. Each participant contributes a small financial deposit (adjusted based on ability to pay) + 2. Deposits are returned when parties fulfill all process commitments + 3. Participants commit a specified amount of time to the process + 4. Participants agree to adhere to all ground rules and procedural guidelines + 5. All parties agree to implement the resolution in good faith \ No newline at end of file diff --git a/data/modules/notification.yaml b/data/modules/notification.yaml new file mode 100644 index 0000000..ff3c52f --- /dev/null +++ b/data/modules/notification.yaml @@ -0,0 +1,21 @@ +- id: direct-notification + title: Direct Notification Process + componentId: notification + fieldId: notificationMethod + content: | + 1. All parties are notified in writing within 72 hours of a filed complaint + 2. Notification includes a copy of the complaint and next steps + 3. Parties confirm receipt of notification + 4. If no confirmation is received within 48 hours, a secondary contact method is used + 5. All notifications maintain privacy and confidentiality standards + +- id: facilitated-notification + title: Facilitated Notification Process + componentId: notification + fieldId: notificationMethod + content: | + 1. A neutral facilitator contacts all parties individually + 2. The facilitator explains the process and shares the complaint details + 3. Parties have an opportunity to ask questions about the process + 4. The facilitator documents that notification has occurred + 5. Follow-up written summary is provided to all parties \ No newline at end of file diff --git a/data/modules/participants.yaml b/data/modules/participants.yaml new file mode 100644 index 0000000..fdd0dd2 --- /dev/null +++ b/data/modules/participants.yaml @@ -0,0 +1,33 @@ +- id: community-circle + title: Community Circle Model + componentId: participants + fieldId: participantsRoles + content: | + 1. Facilitator: Guides the process, ensures fairness, and helps maintain focus + 2. Affected Parties: Those directly impacted by the dispute + 3. Support Persons: Friends, family, or advocates who support affected parties + 4. Community Members: Representatives who bring wider perspective + 5. Resource People: Those with relevant expertise to inform the process + +- id: mediation-model + title: Mediation Model + componentId: participants + fieldId: participantsRoles + content: | + 1. Mediator: Neutral third party who facilitates the process + 2. Disputants: Primary parties involved in the conflict + 3. Advocates: Optional support persons who may speak on behalf of disputants + 4. Witnesses: Those who provide information relevant to the dispute + 5. Implementers: Those responsible for helping carry out any agreements + +- id: council-model + title: Council Model + componentId: participants + fieldId: participantsRoles + content: | + 1. Council Members: A designated group responsible for hearing disputes + 2. Complainant: Person bringing the dispute + 3. Respondent: Person responding to the complaint + 4. Witnesses: Those providing testimony or evidence + 5. Advisors: Those who support the council with expertise + 6. Community Observers: Those who may witness proceedings for transparency \ No newline at end of file diff --git a/data/modules/principles.yaml b/data/modules/principles.yaml new file mode 100644 index 0000000..c1ff1d1 --- /dev/null +++ b/data/modules/principles.yaml @@ -0,0 +1,32 @@ +- id: restorative + title: Restorative Justice Principles + componentId: principles + fieldId: principlesText + content: | + 1. Focus on harm and needs of those affected + 2. Address obligations resulting from harm + 3. Use inclusive, collaborative processes + 4. Involve all stakeholders (victims, offenders, community) + 5. Work toward repairing harm and healing relationships + +- id: transformative + title: Transformative Justice Principles + componentId: principles + fieldId: principlesText + content: | + 1. Seek to address immediate safety, healing, and agency + 2. Work to transform the conditions that allowed violence to occur + 3. Build community accountability systems + 4. Focus on community-based responses without relying on punitive systems + 5. Acknowledge interconnection of all forms of violence + +- id: consensus + title: Consensus-Based Principles + componentId: principles + fieldId: principlesText + content: | + 1. All members have equal input in decision-making + 2. Seek solutions that address everyone's fundamental concerns + 3. Prioritize listening and understanding diverse perspectives + 4. Work toward outcomes that all parties can accept + 5. Focus on collaborative problem-solving over adversarial positions \ No newline at end of file diff --git a/data/modules/process.yaml b/data/modules/process.yaml new file mode 100644 index 0000000..c0056e3 --- /dev/null +++ b/data/modules/process.yaml @@ -0,0 +1,65 @@ +- id: participant-facilitation + title: "Participant Facilitation" + componentId: facilitation + fieldId: facilitationText + content: | + The dispute process is facilitated by the participants themselves: + + 1. Participants take turns leading different parts of the conversation + 2. A written guide provides structure to ensure all voices are heard + 3. All participants receive basic training in productive dialogue techniques + 4. Time limits and speaking guidelines ensure fair participation + 5. Any participant can call for a break or reset if the process becomes unproductive + +- id: peer-facilitation + title: "Peer Facilitation" + componentId: facilitation + fieldId: facilitationText + content: | + The dispute process is facilitated by peers from within the community: + + 1. A pool of trained peer facilitators is maintained within the community + 2. Facilitators are selected who have no direct involvement in the dispute + 3. Peer facilitators receive regular training in conflict resolution techniques + 4. Typically, two peer facilitators work together on each case + 5. Peer facilitators help maintain structure but do not make decisions + +- id: trained-facilitation + title: "Trained Facilitation (e.g. mediator)" + componentId: facilitation + fieldId: facilitationText + content: | + The dispute process is facilitated by professionally trained mediators: + + 1. Professional mediators with formal certification lead the process + 2. Mediators are selected from outside the community to ensure neutrality + 3. Mediators have specific training in the type of conflict being addressed + 4. The community maintains a roster of approved mediators + 5. Mediators are paid for their services according to a pre-established rate + +- id: facilitation-committee + title: "Facilitation Committee" + componentId: facilitation + fieldId: facilitationText + content: | + The dispute process is facilitated by a standing committee: + + 1. A dedicated committee of 5-7 members oversees all dispute processes + 2. Committee members serve rotating terms and receive ongoing training + 3. For each dispute, a subgroup of 2-3 committee members is assigned + 4. Committee members with conflicts of interest must recuse themselves + 5. The committee follows established procedures and maintains records of all cases + +- id: nonviolent-communication + title: "Nonviolent Communication" + componentId: ground_rules + fieldId: groundRulesText + content: | + Our dispute process follows the principles of Nonviolent Communication (NVC): + + 1. Participants focus on observations rather than evaluations or judgments + 2. Participants express feelings using "I" statements rather than blaming others + 3. Participants identify needs that are or are not being met by the situation + 4. Participants make clear, actionable requests rather than demands + 5. Facilitators help participants translate judgmental language into NVC format + 6. Active listening is practiced, with participants reflecting back what they've heard \ No newline at end of file diff --git a/data/modules/resolution.yaml b/data/modules/resolution.yaml new file mode 100644 index 0000000..669a488 --- /dev/null +++ b/data/modules/resolution.yaml @@ -0,0 +1,41 @@ +- id: participant-consensus + title: "Participant Consensus" + componentId: resolution_process + fieldId: resolutionProcessText + content: | + Resolution occurs through consensus of all involved participants: + + 1. Participants collaboratively develop possible solutions + 2. All parties must agree to the final resolution + 3. Consensus does not mean everyone's first choice, but a solution everyone can accept + 4. Multiple rounds of proposal and revision may be necessary + 5. Facilitators help test solutions against participants' stated needs + 6. Once consensus is reached, the agreement is documented in writing + +- id: facilitator-adjudication + title: "Facilitator Adjudication" + componentId: resolution_process + fieldId: resolutionProcessText + content: | + Resolution occurs through a decision made by the facilitator(s): + + 1. After full deliberation, the facilitator(s) makes a binding decision + 2. The decision is based on community guidelines and the specifics of the case + 3. Facilitators provide a written explanation of their decision and reasoning + 4. All parties agree in advance to abide by the facilitator's decision + 5. Decisions establish precedent for future similar cases + 6. Decisions may be appealed only on specific grounds + +- id: jury-adjudication + title: "Jury Adjudication" + componentId: resolution_process + fieldId: resolutionProcessText + content: | + Resolution occurs through a decision made by a jury of community peers: + + 1. A jury of 5-7 community members is randomly selected + 2. Jury members receive an orientation to their role and responsibilities + 3. After hearing all perspectives, the jury deliberates privately + 4. The jury reaches a decision by two-thirds majority + 5. The jury provides a written explanation of their decision + 6. All community members agree in advance to respect jury decisions \ No newline at end of file diff --git a/data/stages/stages.yaml b/data/stages/stages.yaml new file mode 100644 index 0000000..4f4c036 --- /dev/null +++ b/data/stages/stages.yaml @@ -0,0 +1,34 @@ +- id: intake + title: "Intake" + description: "How disputes enter the process" + order: 1 + +- id: process + title: "Process" + description: "How the dispute resolution operates" + order: 2 + +- id: assessment + title: "Assessment" + description: "Evaluating the state of the dispute" + order: 3 + +- id: deliberation + title: "Deliberation" + description: "Discussing the dispute" + order: 4 + +- id: resolution + title: "Resolution" + description: "Determining outcomes for the dispute" + order: 5 + +- id: appeal + title: "Appeal" + description: "Process for reconsidering dispute decisions" + order: 6 + +- id: delegation + title: "Delegation" + description: "Alternative processes when this one is inadequate" + order: 7 \ No newline at end of file diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..cdec4c1 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +# Dispute Protocol Deployment Script +# This script builds and deploys the dispute protocol site to a remote server + +set -e + +# Colors for output +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +RED='\033[0;31m' +NC='\033[0m' # No Color + +# Configuration +SSH_USER=${1:-$USER} +SSH_HOST=${2:-"example.com"} +DEPLOY_PATH=${3:-"/var/www/dispute-protocol"} +BUILD_DIR="public" + +# Check if Hugo is installed +if ! command -v hugo &> /dev/null; then + echo -e "${RED}Error: Hugo is not installed. Please install Hugo first.${NC}" + echo "Visit https://gohugo.io/installation/ for installation instructions." + exit 1 +fi + +echo -e "${YELLOW}Building site...${NC}" +hugo --minify + +# Check if build succeeded +if [ ! -d "$BUILD_DIR" ]; then + echo -e "${RED}Error: Build failed. The '$BUILD_DIR' directory doesn't exist.${NC}" + exit 1 +fi + +echo -e "${YELLOW}Deploying to $SSH_USER@$SSH_HOST:$DEPLOY_PATH...${NC}" + +# Create directory if it doesn't exist +ssh $SSH_USER@$SSH_HOST "mkdir -p $DEPLOY_PATH" + +# Deploy using rsync +rsync -avz --delete $BUILD_DIR/ $SSH_USER@$SSH_HOST:$DEPLOY_PATH + +echo -e "${GREEN}Deployment completed successfully!${NC}" +echo -e "${YELLOW}NOTE: Make sure your web server is configured correctly to serve the site.${NC}" + +exit 0 \ No newline at end of file diff --git a/static/css/main.css b/static/css/main.css new file mode 100644 index 0000000..b23a7cc --- /dev/null +++ b/static/css/main.css @@ -0,0 +1,1359 @@ +/* Base styles */ +:root { + --primary-color: #000000; + --secondary-color: #333333; + --accent-color: #666666; + --light-color: #ffffff; + --dark-color: #000000; + --border-color: #dddddd; + --success-color: #444444; + --warning-color: #777777; + --danger-color: #999999; +} + +* { + box-sizing: border-box; + margin: 0; + padding: 0; +} + +body { + font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; + line-height: 1.6; + color: var(--secondary-color); + background-color: var(--light-color); + max-width: 1440px; + margin: 0 auto; + padding: 0 2rem; +} + +.container { + width: 100%; + max-width: 1200px; + margin: 0 auto; + padding: 0 2rem; +} + +/* Header styles */ +header { + padding: 2rem 0; + border-bottom: 1px solid var(--border-color); + margin-bottom: 3rem; +} + +header .container { + display: flex; + justify-content: space-between; + align-items: center; +} + +.logo a { + font-size: 1.5rem; + font-weight: bold; + color: var(--dark-color); + text-decoration: none; +} + +nav ul { + display: flex; + list-style: none; +} + +nav ul li { + margin-left: 2rem; +} + +nav ul li a { + color: var(--secondary-color); + text-decoration: none; + transition: color 0.3s; +} + +nav ul li a:hover { + color: var(--dark-color); + border-bottom: 1px solid var(--dark-color); +} + +/* Modules Page Styles */ +.search-filter { + margin-bottom: 2rem; + padding: 1.5rem; + background-color: #f5f5f5; + border: 1px solid var(--border-color); + display: flex; + flex-wrap: wrap; + gap: 1rem; + box-shadow: 0 2px 4px rgba(0,0,0,0.05); + border-radius: 4px; +} + +.search-filter input, +.search-filter select { + padding: 0.8rem; + border: 1px solid var(--border-color); + border-radius: 4px; + font-size: 1rem; + transition: all 0.2s ease; + box-shadow: inset 0 1px 3px rgba(0,0,0,0.05); +} + +.search-filter input:focus, +.search-filter select:focus { + outline: none; + border-color: #000; + box-shadow: 0 0 0 2px rgba(0,0,0,0.1); +} + +.search-filter input { + flex-grow: 1; + min-width: 200px; +} + +.search-filter select { + min-width: 150px; + background-color: white; + cursor: pointer; + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M10.3 3.3L6 7.6 1.7 3.3c-.4-.4-1-.4-1.4 0s-.4 1 0 1.4l5 5c.2.2.4.3.7.3s.5-.1.7-.3l5-5c.4-.4.4-1 0-1.4s-1-.4-1.4 0z'/%3E%3C/svg%3E"); + background-position: calc(100% - 10px) center; + background-repeat: no-repeat; + padding-right: 30px; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} + +.modules-container { + margin-top: 2rem; +} + +.module-stage { + margin-bottom: 3rem; +} + +.module-stage h2 { + border-bottom: 2px solid var(--primary-color); + padding-bottom: 0.5rem; + margin-bottom: 1.5rem; + font-size: 1.75rem; +} + +.module-component { + margin-bottom: 2rem; + padding-left: 1.5rem; +} + +.module-component h3 { + color: var(--secondary-color); + margin-bottom: 1rem; + font-size: 1.4rem; +} + +.module-card { + border: 1px solid var(--border-color); + margin-bottom: 1.5rem; + border-radius: 4px; + overflow: hidden; + background-color: var(--light-color); + box-shadow: 0 1px 3px rgba(0,0,0,0.1); + transition: box-shadow 0.3s ease; +} + +.module-card.expanded { + box-shadow: 0 3px 6px rgba(0,0,0,0.16); +} + +.module-header { + padding: 1rem 1.5rem; + background-color: #f5f5f5; + cursor: pointer; + display: flex; + justify-content: space-between; + align-items: flex-start; + flex-wrap: wrap; + transition: background-color 0.2s ease; + position: relative; +} + +.module-header:hover { + background-color: #e9e9e9; +} + +.module-header:after { + content: "▼"; + position: absolute; + right: 1rem; + top: 1rem; + font-size: 0.8rem; + color: var(--secondary-color); + transition: transform 0.3s ease; +} + +.expanded .module-header:after { + transform: rotate(180deg); +} + +.module-header h4 { + margin: 0; + font-size: 1.1rem; + color: var(--primary-color); + flex-grow: 1; + padding-right: 2rem; +} + +.module-tags { + display: flex; + gap: 0.5rem; + flex-wrap: wrap; + margin-top: 0.8rem; +} + +.tag { + display: inline-block; + padding: 0.3rem 0.6rem; + border-radius: 3px; + font-size: 0.7rem; + font-weight: bold; + text-transform: uppercase; + box-shadow: 0 1px 2px rgba(0,0,0,0.1); + transition: all 0.2s ease; +} + +.tag:hover { + transform: translateY(-1px); + box-shadow: 0 2px 3px rgba(0,0,0,0.15); +} + +.stage-tag { + background-color: #e0f0ff; + color: #0066cc; + border: 1px solid rgba(0, 102, 204, 0.2); +} + +.component-tag { + background-color: #f0e0ff; + color: #6600cc; + border: 1px solid rgba(102, 0, 204, 0.2); +} + +/* Module Library specific styles */ +.modules-container .component-card { + margin-bottom: 1rem; + animation: fadeIn 0.3s ease; +} + +@keyframes fadeIn { + from { opacity: 0; } + to { opacity: 1; } +} + +.modules-container .component-body { + padding: 1.5rem 2rem; + animation: slideDown 0.3s ease; +} + +@keyframes slideDown { + from { + opacity: 0; + transform: translateY(-10px); + } + to { + opacity: 1; + transform: translateY(0); + } +} + +.module-meta { + display: flex; + flex-wrap: wrap; + gap: 0.5rem; + margin-bottom: 1.5rem; +} + +.module-content { + margin: 1.5rem 0; +} + +.module-content textarea { + width: 100%; + min-height: 180px; + padding: 1rem; + border: 1px solid var(--border-color); + font-family: inherit; + resize: vertical; + background-color: var(--light-color); + font-size: 1.05rem; + line-height: 1.6; + color: var(--secondary-color); +} + +.module-templates { + margin-top: 1.5rem; + padding-top: 1rem; + border-top: 1px solid var(--border-color); + font-size: 0.9rem; + color: var(--accent-color); +} + +.module-templates strong { + color: var(--secondary-color); + font-weight: 600; + margin-right: 0.5rem; +} + +.component-group-heading { + margin: 1.5rem 0 1rem; + font-size: 1.2rem; + color: var(--dark-color); + font-weight: 600; + border-bottom: 1px solid #eee; + padding-bottom: 0.5rem; + display: flex; + align-items: baseline; +} + +.component-group-heading:first-child { + margin-top: 0; +} + +.component-module-count { + font-size: 0.85rem; + color: var(--accent-color); + font-weight: normal; + margin-left: 0.5rem; +} + +.loading, .error, .no-results { + padding: 2rem; + text-align: center; + color: var(--accent-color); + font-style: italic; +} + +.error { + color: var(--danger-color); +} + +/* Footer styles */ +footer { + padding: 3rem 0; + border-top: 1px solid var(--border-color); + margin-top: 3rem; + text-align: center; + font-size: 0.9rem; +} + +footer a { + color: var(--dark-color); + text-decoration: none; +} + +/* Home page styles */ +.home-content { + padding: 2rem 0; +} + +.hero { + padding: 4rem 0; + text-align: center; + margin-bottom: 4rem; +} + +.hero h1 { + font-size: 3rem; + margin-bottom: 1.5rem; + color: var(--dark-color); + font-weight: 700; +} + +.hero .lead { + font-size: 1.4rem; + margin-bottom: 2.5rem; + color: var(--secondary-color); + max-width: 800px; + margin-left: auto; + margin-right: auto; +} + +/* Content page styles */ +.content-container { + max-width: 800px; + margin: 0 auto; + padding: 4rem 2rem; +} + +.page-content { + margin-bottom: 4rem; + line-height: 1.8; +} + +.page-content h1 { + font-size: 2.7rem; + margin-bottom: 3rem; + margin-top: 2rem; + color: var(--dark-color); + font-weight: 700; + border-bottom: 1px solid var(--border-color); + padding-bottom: 1.5rem; +} + +.page-content h2 { + font-size: 2rem; + margin-top: 4.5rem; + margin-bottom: 2rem; + color: var(--dark-color); + font-weight: 600; + padding-bottom: 0.75rem; + border-bottom: 1px solid rgba(0,0,0,0.1); +} + +.page-content h3 { + font-size: 1.5rem; + margin-top: 3rem; + margin-bottom: 1.5rem; + color: var(--dark-color); + font-weight: 600; +} + +.page-content p { + margin-bottom: 2.25rem; + line-height: 1.8; + font-size: 1.05rem; + max-width: 38em; +} + +.page-content ul, +.page-content ol { + margin-bottom: 3rem; + margin-top: 1.5rem; + padding-left: 2rem; +} + +.page-content li { + margin-bottom: 1.25rem; + line-height: 1.7; + max-width: 36em; +} + +.page-content strong { + font-weight: 600; + color: var(--dark-color); +} + +/* Add spacing after specific elements */ +.page-content h2 + p, +.page-content h3 + p { + margin-top: 1.5rem; +} + +.page-content p + ul, +.page-content p + ol { + margin-top: 1.5rem; +} + +/* Add more breathing room between sections */ +.page-content h2 + h3 { + margin-top: 2rem; +} + +/* Style links in page content */ +.page-content a { + color: var(--dark-color); + text-decoration: none; + border-bottom: 1px solid var(--border-color); + padding-bottom: 2px; + transition: border-color 0.3s; +} + +.page-content a:hover { + border-color: var(--dark-color); +} + +/* CTA button styling */ +.cta-container { + margin: 4rem 0; + padding: 3rem; + background-color: rgba(0,0,0,0.02); + border: 1px solid var(--border-color); + text-align: center; + font-size: 1.2rem; +} + +.cta-button { + display: inline-block; + margin-top: 2rem; + padding: 1rem 2.5rem; + background-color: var(--dark-color); + color: white !important; + font-weight: 600; + font-size: 1.1rem; + border: none !important; + transition: transform 0.3s, background-color 0.3s; +} + +.cta-button:hover { + transform: translateY(-3px); + background-color: #333; +} + +.btn-primary, .btn-secondary { + display: inline-block; + padding: 0.75rem 1.75rem; + margin: 0.5rem; + border-radius: 0; + text-decoration: none; + font-weight: 500; + transition: all 0.3s; +} + +.btn-primary { + background-color: var(--dark-color); + color: white; +} + +.btn-secondary { + background-color: transparent; + color: var(--dark-color); + border: 1px solid var(--dark-color); +} + +.btn-primary:hover { + background-color: var(--secondary-color); +} + +.btn-secondary:hover { + background-color: var(--border-color); +} + +.content { + margin: 3rem 0; + max-width: 800px; + margin-left: auto; + margin-right: auto; +} + +.stages-overview { + margin: 5rem 0; +} + +.stages-overview h2 { + text-align: center; + margin-bottom: 3rem; + color: var(--dark-color); + font-weight: 700; +} + +.stages-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); + gap: 2rem; +} + +.stage-card { + border: 1px solid var(--border-color); + padding: 2rem; + transition: transform 0.3s, box-shadow 0.3s; +} + +.stage-card:hover { + transform: translateY(-5px); + box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05); +} + +.stage-card h3 { + color: var(--dark-color); + margin-bottom: 1rem; + font-weight: 600; +} + +/* Builder styles */ +.builder-container { + padding: 2rem 0; + max-width: 1100px; + margin: 0 auto; +} + +.builder { + border: 1px solid var(--border-color); + margin-top: 2rem; + margin-bottom: 4rem; + display: flex; +} + +.builder-main { + flex: 1; + border-right: 1px solid var(--border-color); +} + +.builder-sidebar { + width: 280px; + background-color: #f9f9f9; + padding: 1.5rem; + display: flex; + flex-direction: column; +} + +.sidebar-section { + margin-bottom: 2rem; + width: 100%; +} + +.sidebar-section h3 { + font-size: 1.2rem; + margin-bottom: 1rem; + padding-bottom: 0.5rem; + border-bottom: 1px solid var(--border-color); +} + +/* Navigation sidebar styles */ +.sidebar-nav { + margin-bottom: 1.5rem; + max-height: 30vh; + overflow-y: auto; + border: 1px solid var(--border-color); + border-radius: 4px; + background-color: #f9f9f9; + padding: 1rem; +} + +.sidebar-nav h4 { + margin-top: 0; + margin-bottom: 0.75rem; + padding-bottom: 0.5rem; + font-size: 1rem; + font-weight: 600; + border-bottom: 1px solid var(--border-color); + font-size: 1.1rem; +} + +.sidebar-nav-content { + font-size: 0.9rem; +} + +.nav-tree { + display: flex; + flex-direction: column; + gap: 0.75rem; +} + +.nav-stage { + margin-bottom: 0.5rem; +} + +.nav-stage-link { + display: block; + font-weight: 600; + color: var(--dark-color); + text-decoration: none; + padding: 0.3rem 0.5rem; + border-radius: 3px; + transition: background-color 0.2s; +} + +.nav-stage-link:hover, .nav-stage-link.active { + background-color: rgba(0,0,0,0.05); +} + +.nav-components { + display: flex; + flex-direction: column; + padding-left: 1rem; + margin-top: 0.25rem; + border-left: 1px solid var(--border-color); +} + +.nav-component-link { + display: block; + padding: 0.2rem 0.5rem; + margin: 0.15rem 0; + color: var(--secondary-color); + text-decoration: none; + font-size: 0.85rem; + border-radius: 3px; + transition: background-color 0.2s, color 0.2s; +} + +.nav-component-link:hover, .nav-component-link.active { + background-color: rgba(0,0,0,0.05); + color: var(--dark-color); +} + +.sidebar-toggle { + margin-bottom: 1rem; +} + +.toggle-switch { + display: flex; + align-items: center; + cursor: pointer; + padding: 10px; + background-color: #f5f5f5; + border-radius: 4px; + transition: background-color 0.3s; + margin-bottom: 0.5rem; +} + +.toggle-switch:hover { + background-color: #e9e9e9; +} + +.toggle-switch input { + opacity: 0; + width: 0; + height: 0; + position: absolute; +} + +.toggle-slider { + position: relative; + display: inline-block; + width: 44px; + height: 22px; + background-color: #ccc; + border-radius: 22px; + transition: .4s; + margin-right: 10px; + box-shadow: inset 0 1px 3px rgba(0,0,0,0.2); +} + +.toggle-slider:before { + position: absolute; + content: ""; + height: 18px; + width: 18px; + left: 2px; + bottom: 2px; + background-color: white; + border-radius: 50%; + transition: .4s; + box-shadow: 0 1px 2px rgba(0,0,0,0.2); +} + +input:checked + .toggle-slider { + background-color: var(--dark-color); +} + +input:checked + .toggle-slider:before { + transform: translateX(22px); +} + +.toggle-label { + font-weight: 600; + font-size: 0.95rem; +} + +.sidebar-info { + font-size: 0.85rem; + color: var(--accent-color); + line-height: 1.4; + margin-bottom: 1rem; +} + +.preview-status { + margin-top: 1rem; + padding: 0.75rem; + background-color: rgba(0, 0, 0, 0.05); + border-radius: 4px; + border-left: 3px solid var(--dark-color); +} + +.status-indicator { + display: flex; + align-items: center; +} + +.status-dot { + width: 10px; + height: 10px; + background-color: var(--dark-color); + border-radius: 50%; + margin-right: 8px; + animation: pulse 1.5s infinite; +} + +.status-text { + font-weight: 600; + font-size: 0.9rem; +} + +@keyframes pulse { + 0% { + transform: scale(0.8); + opacity: 0.7; + } + 50% { + transform: scale(1.1); + opacity: 1; + } + 100% { + transform: scale(0.8); + opacity: 0.7; + } +} + +/* Sidebar export options */ +.sidebar-export-options { + display: flex; + flex-direction: column; + gap: 10px; +} + +.sidebar-btn { + display: block; + width: 100%; + padding: 10px; + background-color: transparent; + color: var(--dark-color); + text-decoration: none; + text-align: center; + border: 1px solid var(--dark-color); + border-radius: 4px; + font-size: 0.95rem; + font-weight: 500; + cursor: pointer; + transition: all 0.3s; +} + +.sidebar-btn:hover { + background-color: #f5f5f5; + transform: translateY(-1px); + box-shadow: 0 1px 3px rgba(0,0,0,0.1); +} + +/* Preview mode styles */ +.preview-mode .module-selector { + display: none !important; +} + +.preview-mode .field:not(.has-content) { + display: none; +} + +.preview-mode textarea { + display: none; /* Hide textareas in preview mode - we'll use divs instead */ +} + +/* Style for the preview content divs that replace textareas */ +.preview-content { + font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; + font-size: 1rem; + line-height: 1.6; + color: var(--secondary-color); + white-space: pre-wrap; + word-wrap: break-word; + width: 100%; + margin-bottom: 1.5rem; +} + +.preview-mode .component-card:not(.has-content) { + display: none; +} + +.preview-mode .stage-section:not(.has-content) { + display: none; +} + +/* Clean up the styling in preview mode */ +.preview-mode .stage-body { + display: block !important; + padding-top: 1rem; +} + +.preview-mode .component-card { + border: none; + box-shadow: none; + margin-bottom: 2rem; + background-color: transparent; +} + +.preview-mode .component-header { + background-color: transparent; + border-bottom: none; + padding: 0 2rem 0.5rem 2rem; +} + +.preview-mode .component-short-label { + display: none; +} + +.preview-mode .component-header h3 { + font-size: 1.4rem; + font-weight: 600; + border-bottom: 1px solid #eee; + padding-bottom: 0.5rem; + color: var(--dark-color); +} + +.preview-mode .component-body { + padding: 0.5rem 2rem 0; +} + +.preview-mode .field.has-content { + margin-bottom: 1.5rem; +} + +/* Visual indicator that we're in preview mode */ +.preview-mode { + background-color: #fff; +} + +.preview-mode .stage-header { + background-color: #f8f8f8; +} + +/* Preview mode metadata styling */ +.preview-mode .protocol-metadata { + background-color: transparent; + padding: 2rem 2rem 0; + border-bottom: none; +} + +.preview-mode .metadata-field label { + display: none; +} + +.preview-mode .metadata-field input, +.preview-mode .metadata-field textarea { + border: none; + background-color: transparent; + padding: 0; +} + +.preview-mode .metadata-field input { + font-size: 2rem; + font-weight: 700; + color: var(--dark-color); + padding-bottom: 0.5rem; +} + +.preview-mode .metadata-field textarea { + font-size: 1.1rem; + color: var(--secondary-color); + margin-bottom: 2rem; +} + +.protocol-template-selector { + padding: 2rem; + border-bottom: 1px solid var(--border-color); + background-color: rgba(0, 0, 0, 0.02); +} + +.protocol-template-selector label { + display: block; + margin-bottom: 0.75rem; + font-weight: 500; + font-size: 1.1rem; +} + +.protocol-template-select { + width: 100%; + padding: 0.75rem; + border: 1px solid var(--border-color); + font-family: inherit; + background-color: var(--light-color); + margin-bottom: 1rem; +} + +.protocol-metadata { + padding: 2rem; + border-bottom: 1px solid var(--border-color); + background-color: rgba(0, 0, 0, 0.02); +} + +.metadata-field { + margin-bottom: 1.5rem; +} + +.metadata-field:last-child { + margin-bottom: 0; +} + +.metadata-field label { + display: block; + margin-bottom: 0.75rem; + font-weight: 500; + font-size: 1.1rem; +} + +.metadata-field input[type="text"] { + width: 100%; + padding: 0.75rem; + border: 1px solid var(--border-color); + font-family: inherit; + background-color: var(--light-color); +} + +.metadata-field textarea { + width: 100%; + min-height: 100px; + padding: 0.75rem; + border: 1px solid var(--border-color); + font-family: inherit; + background-color: var(--light-color); +} + +.builder-content { + padding: 0; +} + +/* Stage sections */ +.stage-section { + border-bottom: 1px solid var(--border-color); + margin-bottom: 0; +} + +.stage-section:last-child { + border-bottom: none; +} + +.stage-header { + padding: 1.5rem 2rem; + display: flex; + justify-content: space-between; + align-items: center; + background-color: var(--light-color); +} + +.stage-header-content { + flex: 1; + cursor: pointer; +} + +.stage-header h2 { + font-size: 1.4rem; + margin: 0; + color: var(--dark-color); + font-weight: 600; +} + +.stage-brief { + margin-top: 0.5rem; + color: var(--secondary-color); + font-size: 0.95rem; +} + +.toggle-btn { + background: none; + border: 1px solid var(--border-color); + width: 30px; + height: 30px; + font-size: 1.2rem; + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; + color: var(--secondary-color); + z-index: 10; + margin-left: 1rem; +} + +.toggle-btn:hover { + background-color: var(--border-color); +} + +.stage-body { + display: none; + padding: 0 2rem 2rem; +} + +.stage-description { + margin-bottom: 2rem; + color: var(--secondary-color); +} + +/* Components */ +.components { + display: flex; + flex-direction: column; + gap: 2rem; +} + +.component-card { + border: 1px solid var(--border-color); + background-color: var(--light-color); + margin-bottom: 2rem; +} + +.component-header { + padding: 1.2rem 2rem; + border-bottom: 1px solid var(--border-color); + background-color: rgba(0, 0, 0, 0.02); + display: flex; + justify-content: space-between; + align-items: center; +} + +.component-title-wrapper { + flex: 1; +} + +.component-short-label { + font-size: 0.75rem; + text-transform: uppercase; + letter-spacing: 0.05em; + color: var(--accent-color); + margin-bottom: 0.25rem; + font-weight: 500; +} + +.component-header h3 { + font-size: 1.2rem; + margin: 0; + color: var(--dark-color); + font-weight: 600; +} + +.component-body { + padding: 1.2rem 2rem; +} + +.field { + margin-top: 0.75rem; +} + +.field:first-of-type { + margin-top: 0; +} + +.module-selector { + margin-bottom: 1rem; + background-color: rgba(0, 0, 0, 0.02); + padding: 0.8rem; + border: 1px solid var(--border-color); + display: flex; + align-items: center; + flex-wrap: wrap; +} + +.module-selector label { + margin-bottom: 0; + margin-right: 1rem; + font-size: 0.9rem; + font-weight: 500; + white-space: nowrap; + min-width: 110px; +} + +.module-select { + flex: 1; + padding: 0.5rem; + border: 1px solid var(--border-color); + font-family: inherit; + background-color: var(--light-color); + min-width: 200px; + font-size: 1rem; +} + +textarea { + width: 100%; + min-height: 250px; + padding: 1rem; + border: 1px solid var(--border-color); + font-family: inherit; + resize: vertical; + background-color: var(--light-color); + font-size: 1.05rem; + line-height: 1.5; +} + +.builder-actions { + padding: 2rem; + background-color: var(--light-color); + border-top: 1px solid var(--border-color); + display: flex; + justify-content: flex-end; + gap: 1.5rem; +} + +.btn { + padding: 0.75rem 1.5rem; + background-color: var(--dark-color); + color: white; + border: none; + border-radius: 0; + cursor: pointer; + transition: all 0.3s; + font-weight: 500; +} + +.btn:hover { + background-color: var(--secondary-color); +} + +#import-btn { + background-color: #f0f0f0; + color: var(--dark-color); + border: 1px solid var(--dark-color); +} + +#import-btn:hover { + background-color: #e0e0e0; +} + +/* Export dropdown styles */ +.dropdown { + position: relative; + display: inline-block; +} + +.dropdown-toggle { + cursor: pointer; +} + +.dropdown-menu { + position: absolute; + right: 0; + top: 100%; + z-index: 1000; + min-width: 200px; + padding: 0; + margin: 0; + background-color: #fff; + border: 1px solid var(--border-color); + box-shadow: 0 2px 5px rgba(0,0,0,0.1); +} + +.dropdown-menu ul { + list-style: none; + margin: 0; + padding: 0; +} + +.dropdown-menu li { + margin: 0; + padding: 0; +} + +.dropdown-menu a { + display: block; + padding: 10px 15px; + color: var(--dark-color); + text-decoration: none; + border-bottom: 1px solid var(--border-color); +} + +.dropdown-menu li:last-child a { + border-bottom: none; +} + +.dropdown-menu a:hover { + background-color: #f9f9f9; +} + +/* Responsive styles */ +@media (max-width: 768px) { + body { + padding: 0 1rem; + } + + .container { + padding: 0 1rem; + } + + .hero h1 { + font-size: 2.2rem; + } + + .hero .lead { + font-size: 1.1rem; + } + + .builder { + flex-direction: column; + } + + .builder-main { + border-right: none; + border-bottom: 1px solid var(--border-color); + } + + .builder-sidebar { + width: 100%; + padding: 1rem; + } + + .sticky-nav, .sticky-nav.fixed { + position: static; + max-height: none; + margin: 0 0 1rem 0; + width: 100% !important; + } + + .stage-header { + padding: 1.2rem 1.5rem; + } + + .stage-body { + padding: 0 1.5rem 1.5rem; + } + + .component-header { + padding: 1.2rem 1.5rem; + } + + .component-body { + padding: 1.5rem; + } + + .module-selector { + flex-direction: column; + align-items: flex-start; + } + + .module-selector label { + margin-bottom: 0.5rem; + margin-right: 0; + } + + .module-select { + width: 100%; + } + + .protocol-template-selector { + padding: 1.5rem; + } + + .protocol-template-select { + padding: 0.5rem; + } + + .protocol-metadata { + padding: 1.5rem; + } + + .metadata-field { + margin-bottom: 1rem; + } + + .metadata-field input[type="text"], + .metadata-field textarea { + padding: 0.5rem; + } + + .builder-actions { + padding: 1.5rem; + flex-direction: column; + align-items: stretch; + } + + .btn { + margin-bottom: 0.5rem; + } + + .dropdown { + display: block; + width: 100%; + margin-bottom: 10px; + } + + .dropdown-toggle { + width: 100%; + text-align: center; + } + + .dropdown-menu { + width: 100%; + position: static; + box-shadow: none; + margin-top: 5px; + } +} \ No newline at end of file diff --git a/static/js/builder.js b/static/js/builder.js new file mode 100644 index 0000000..d343c58 --- /dev/null +++ b/static/js/builder.js @@ -0,0 +1,970 @@ +document.addEventListener('DOMContentLoaded', function() { + console.log('DOM loaded - initializing builder'); + + // Initialize preview mode state + let previewModeActive = false; + + // Preview Mode Toggle + const previewToggle = document.getElementById('preview-toggle'); + if (previewToggle) { + console.log('Preview toggle found, adding event listener'); + + document.addEventListener('click', function(e) { + // Hacky way: find any click anywhere near the toggle and check status + if (e.target.closest('.toggle-switch') || e.target.id === 'preview-toggle') { + // Give time for the checkbox to update + setTimeout(function() { + previewModeActive = previewToggle.checked; + console.log('Preview toggle changed to:', previewModeActive); + + // Add a direct style change to visually confirm toggle works + document.querySelector('.toggle-label').style.color = previewModeActive ? 'blue' : ''; + + togglePreviewMode(previewModeActive); + }, 50); + } + }); + } else { + console.error('Preview toggle element not found!'); + } + + // Function to toggle preview mode + function togglePreviewMode(active) { + console.log('Toggle preview mode called with active =', active); + + // Use inline styles for preview mode + // This directly styles elements without relying on classes + const styleId = 'preview-mode-style'; + let styleElement = document.getElementById(styleId); + + if (active) { + // Create style element if it doesn't exist + if (!styleElement) { + styleElement = document.createElement('style'); + styleElement.id = styleId; + document.head.appendChild(styleElement); + } + + // Find all textareas with content to mark for display + const contentTextareas = []; + document.querySelectorAll('textarea').forEach(textarea => { + if (textarea.value && textarea.value.trim()) { + // Get the ID for later targeting + contentTextareas.push('#' + textarea.id); + + // Mark parents for visibility + const field = textarea.closest('.field'); + if (field) field.classList.add('has-content'); + + const component = textarea.closest('.component-card'); + if (component) component.classList.add('has-content'); + + const stage = textarea.closest('.stage-section'); + if (stage) stage.classList.add('has-content'); + + // Ensure stage is expanded + if (stage) { + const stageBody = stage.querySelector('.stage-body'); + if (stageBody) stageBody.style.display = 'block'; + } + } + }); + + // Apply direct CSS to create preview mode + styleElement.textContent = ` + /* Hide module selectors and empty fields */ + .module-selector { display: none !important; } + .field:not(.has-content) { display: none !important; } + + /* Hide empty components and sections */ + .component-card:not(.has-content) { display: none !important; } + .stage-section:not(.has-content) { display: none !important; } + + /* Hide template selector */ + .protocol-template-selector { display: none !important; } + + /* Expand all sections */ + .stage-body { display: block !important; } + + /* Make textareas read-only appearance */ + textarea { + border: none !important; + background-color: transparent !important; + padding: 0 !important; + min-height: unset !important; + height: auto !important; + resize: none !important; + pointer-events: none !important; + outline: none !important; + box-shadow: none !important; + } + + /* Only show filled textareas */ + textarea:not(${contentTextareas.join(',')}) { + display: none !important; + } + + /* Clean styling for components */ + .component-header { + background-color: transparent !important; + border-bottom: none !important; + padding-bottom: 0 !important; + } + + .component-short-label { display: none !important; } + + /* Improved typography for preview mode */ + .component-header h3 { + font-size: 1.4rem !important; + margin-bottom: 1rem !important; + color: #000 !important; + border-bottom: 1px solid #eee !important; + padding-bottom: 0.5rem !important; + } + `; + + // Replace textareas with divs for better display in preview mode + updatePreviewContent(); + + // Make other fields read-only + document.querySelectorAll('#community-name, #protocol-summary').forEach(el => { + el.setAttribute('readonly', 'readonly'); + }); + } else { + // Remove preview styles + if (styleElement) { + styleElement.textContent = ''; + } + + // Remove preview content divs and show textareas again + document.querySelectorAll('.preview-content').forEach(div => { + const textareaId = div.dataset.forTextarea; + if (textareaId) { + const textarea = document.getElementById(textareaId); + if (textarea) { + textarea.style.display = ''; + } + } + div.parentNode.removeChild(div); + }); + + // Make fields editable again + document.querySelectorAll('textarea, #community-name, #protocol-summary').forEach(el => { + el.removeAttribute('readonly'); + }); + + // Remove content markers + document.querySelectorAll('.has-content').forEach(el => { + el.classList.remove('has-content'); + }); + + // Reset any display properties that were directly set + document.querySelectorAll('.stage-body').forEach(el => { + el.style.display = ''; + }); + } + } + + // Function to mark components and stages that have content + function markComponentsWithContent() { + // First reset all markers + document.querySelectorAll('.has-content').forEach(el => { + el.classList.remove('has-content'); + }); + + // Mark fields with content + document.querySelectorAll('textarea').forEach(textarea => { + if (textarea.value && textarea.value.trim()) { + const field = textarea.closest('.field'); + if (field) field.classList.add('has-content'); + + const component = textarea.closest('.component-card'); + if (component) component.classList.add('has-content'); + + const stage = textarea.closest('.stage-section'); + if (stage) stage.classList.add('has-content'); + } + }); + + // Show all expanded sections that have content + document.querySelectorAll('.stage-section.has-content').forEach(stage => { + const stageBody = stage.querySelector('.stage-body'); + if (stageBody) { + stageBody.style.display = 'block'; + const toggleBtn = stage.querySelector('.toggle-btn'); + if (toggleBtn) { + toggleBtn.textContent = '-'; + } + } + }); + } + + // Load module data + let allModules = {}; + try { + // Check if moduleData is defined (from modules.js) + if (typeof moduleData !== 'undefined') { + allModules = moduleData; + console.log('Module data loaded from modules.js'); + } + } catch (e) { + console.error('Error loading module data:', e); + allModules = {}; + } + + // Load and process template data + let templates = []; + try { + // Check if raw templates are defined (from templates.js) + if (typeof rawProtocolTemplates !== 'undefined' && typeof templateMapper !== 'undefined') { + console.log('Raw protocol templates loaded from templates.js'); + + // Process each template to use module references + rawProtocolTemplates.forEach(rawTemplate => { + const processedTemplate = templateMapper.convertTemplateToModules(rawTemplate, allModules); + templates.push(processedTemplate); + }); + + console.log('Processed templates to use module references:', templates); + } + } catch (e) { + console.error('Error processing protocol templates:', e); + templates = []; + } + + // Protocol data structure + let protocol = { + metadata: { + communityName: "", + summary: "" + }, + stages: {} + }; + + // DOM elements + const stageHeaders = document.querySelectorAll('.stage-header'); + console.log('Found stage headers:', stageHeaders.length); + + const stageContents = document.querySelectorAll('.stage-body'); + console.log('Found stage bodies:', stageContents.length); + + const moduleSelects = document.querySelectorAll('.module-select'); + console.log('Found module selects:', moduleSelects.length); + + const protocolTemplateSelect = document.getElementById('protocol-template'); + const communityNameInput = document.getElementById('community-name'); + const protocolSummaryTextarea = document.getElementById('protocol-summary'); + + const exportBtn = document.getElementById('export-btn'); + const exportMdBtn = document.getElementById('export-md'); + const exportPdfBtn = document.getElementById('export-pdf'); + const exportJsonBtn = document.getElementById('export-json'); + const importJsonInput = document.getElementById('import-json'); + const importBtn = document.getElementById('import-btn'); + + // Populate protocol template select + if (protocolTemplateSelect && templates.length > 0) { + templates.forEach(template => { + const option = document.createElement('option'); + option.value = template.id; + option.textContent = template.title; + protocolTemplateSelect.appendChild(option); + }); + + // Add template selection event handler + protocolTemplateSelect.addEventListener('change', function() { + const selectedTemplateId = this.value; + + if (selectedTemplateId) { + // Find the selected template + const selectedTemplate = templates.find(t => t.id === selectedTemplateId); + + if (selectedTemplate) { + console.log('Applying template:', selectedTemplate); + + console.log('Selected template:', selectedTemplate.title); + + // Reset protocol data while preserving metadata + protocol = { + metadata: { + communityName: communityNameInput.value || "", + summary: protocolSummaryTextarea.value || "" + }, + stages: {}, + templateId: selectedTemplate.id, + templateTitle: selectedTemplate.title, + templateDescription: selectedTemplate.description + }; + + // If summary is empty, use template description + if (!protocol.metadata.summary) { + protocolSummaryTextarea.value = selectedTemplate.description; + protocol.metadata.summary = selectedTemplate.description; + } + + // Apply the template module references to the form + for (const stageId in selectedTemplate.moduleRefs) { + if (!protocol.stages[stageId]) { + protocol.stages[stageId] = {}; + } + + for (const componentId in selectedTemplate.moduleRefs[stageId]) { + if (!protocol.stages[stageId][componentId]) { + protocol.stages[stageId][componentId] = {}; + } + + for (const fieldId in selectedTemplate.moduleRefs[stageId][componentId]) { + const moduleId = selectedTemplate.moduleRefs[stageId][componentId][fieldId]; + const textarea = document.getElementById(fieldId); + + if (textarea) { + // Find the module with this ID + let moduleContent = ''; + + for (const category in allModules) { + const foundModule = allModules[category].find(m => m.id === moduleId); + if (foundModule) { + moduleContent = foundModule.content; + break; + } + } + + // Apply the module content to the textarea + textarea.value = moduleContent; + + // Store in protocol data + protocol.stages[stageId][componentId][fieldId] = moduleContent; + + // If there's a template selector for this field, update it + const moduleSelector = document.querySelector(`select.module-select[data-field-id="${fieldId}"][data-component-id="${componentId}"]`); + if (moduleSelector) { + moduleSelector.value = moduleId; + } + } + } + } + } + + // Expand all sections to show the populated content + stageContents.forEach(content => { + content.style.display = 'block'; + const toggleBtn = content.parentElement.querySelector('.toggle-btn'); + if (toggleBtn) { + toggleBtn.textContent = '-'; + } + }); + + // Update preview mode if active + if (previewModeActive) { + markComponentsWithContent(); + } + } + } else { + // Clear all fields if "Create Your Own" is selected + + document.querySelectorAll('textarea').forEach(textarea => { + textarea.value = ''; + }); + + // Reset protocol data + protocol = { stages: {} }; + + // Collapse all sections + stageContents.forEach(content => { + content.style.display = 'none'; + const toggleBtn = content.parentElement.querySelector('.toggle-btn'); + if (toggleBtn) { + toggleBtn.textContent = '+'; + } + }); + + // Update preview mode if active + if (previewModeActive) { + markComponentsWithContent(); + } + } + }); + } + + // Initialize all module selects + populateModuleSelects(); + + // Module selection handlers + moduleSelects.forEach(select => { + select.addEventListener('change', function() { + const fieldId = this.getAttribute('data-field-id'); + const componentId = this.getAttribute('data-component-id'); + const targetTextarea = document.getElementById(fieldId); + + if (targetTextarea && this.value) { + // Find the selected module + for (const category in allModules) { + const selectedModule = allModules[category].find(m => m.id === this.value); + if (selectedModule) { + targetTextarea.value = selectedModule.content; + + // Update protocol data + updateProtocolData(); + + // Update preview mode if active + if (previewModeActive) { + markComponentsWithContent(); + } + break; + } + } + } + }); + }); + + // Function to populate module select dropdowns + function populateModuleSelects() { + console.log('Populating module selects...'); + console.log('Available module categories:', Object.keys(allModules)); + + // Debugging: Log all modules to check componentId and fieldId + console.log('All module mapping:'); + for (const category in allModules) { + console.log(`Category: ${category}`); + allModules[category].forEach(module => { + console.log(` Module: ${module.id}, Component: ${module.componentId}, Field: ${module.fieldId}`); + }); + } + + moduleSelects.forEach(select => { + const fieldId = select.getAttribute('data-field-id'); + const componentId = select.getAttribute('data-component-id'); + + console.log(`Processing module select for fieldId: ${fieldId}, componentId: ${componentId}`); + + // Clear existing options except the first one + while (select.options.length > 1) { + select.remove(1); + } + + // Find modules that match this field and component + let hasOptions = false; + + // Always show select first - we'll hide it later if no options found + select.closest('.module-selector').style.display = 'flex'; + + // Check for case matching issues and missing references + for (const category in allModules) { + let exactMatches = allModules[category].filter(m => + m.fieldId === fieldId && m.componentId === componentId + ); + + let caseInsensitiveMatches = allModules[category].filter(m => + m.fieldId.toLowerCase() === fieldId.toLowerCase() && + m.componentId.toLowerCase() === componentId.toLowerCase() && + !exactMatches.includes(m) + ); + + if (caseInsensitiveMatches.length > 0) { + console.warn(`Found ${caseInsensitiveMatches.length} case-insensitive matches for ${componentId}/${fieldId}. Consider fixing these module references.`); + + // Add case-insensitive matches to the collection + caseInsensitiveMatches.forEach(module => { + // Create a copy with corrected references + const correctedModule = { + ...module, + componentId: componentId, + fieldId: fieldId + }; + + // Add to the exact matches + exactMatches.push(correctedModule); + }); + } + + if (exactMatches.length > 0) { + console.log(`Found ${exactMatches.length} modules in category ${category} for ${componentId}/${fieldId}`); + hasOptions = true; + + // Don't use option groups - add options directly to the select + // This avoids showing category labels which can be confusing + exactMatches.forEach(module => { + const option = document.createElement('option'); + option.value = module.id; + + // Use the module title directly from the definition + // This relies on proper module titles being defined in modules.js + option.textContent = module.title; + + // Add directly to select instead of to a group + select.appendChild(option); + }); + } + } + + // If no modules found, hide the selector + if (!hasOptions) { + console.log(`No modules found for ${componentId}/${fieldId}, hiding selector`); + select.closest('.module-selector').style.display = 'none'; + } + }); + } + + // Update protocol data from form inputs + function updateProtocolData() { + // Update metadata + protocol.metadata = { + communityName: communityNameInput.value || "", + summary: protocolSummaryTextarea.value || "" + }; + + // Reset the stages data + protocol.stages = {}; + + // Get all textareas and their values + const textareas = document.querySelectorAll('textarea'); + textareas.forEach(textarea => { + const fieldId = textarea.id; + const fieldValue = textarea.value; + + // Skip empty fields + if (!fieldValue || !fieldValue.trim()) return; + + // Find the component and stage for this field + const componentCard = textarea.closest('.component-card'); + if (!componentCard) return; + + const componentId = componentCard.id.replace('component-', ''); + + const stageSection = textarea.closest('.stage-section'); + if (!stageSection) return; + + const stageId = stageSection.id.replace('stage-', ''); + + // Initialize stage and component if they don't exist + if (!protocol.stages[stageId]) { + protocol.stages[stageId] = {}; + } + + if (!protocol.stages[stageId][componentId]) { + protocol.stages[stageId][componentId] = {}; + } + + // Set the field value + protocol.stages[stageId][componentId][fieldId] = fieldValue; + }); + + // If a template is selected, preserve the template information + const selectedTemplateId = protocolTemplateSelect ? protocolTemplateSelect.value : ''; + + if (selectedTemplateId) { + const selectedTemplate = templates.find(t => t.id === selectedTemplateId); + if (selectedTemplate) { + protocol.templateId = selectedTemplateId; + protocol.templateTitle = selectedTemplate.title; + protocol.templateDescription = selectedTemplate.description; + } + } + + // Remove empty components and stages + for (const stageId in protocol.stages) { + // Check if stage has any non-empty components + const stageComponents = protocol.stages[stageId]; + let stageHasContent = false; + + for (const componentId in stageComponents) { + // Check if component has any fields + const component = stageComponents[componentId]; + const fieldCount = Object.keys(component).length; + + if (fieldCount > 0) { + stageHasContent = true; + } else { + // Remove empty component + delete stageComponents[componentId]; + } + } + + // If stage has no content, remove it + if (!stageHasContent) { + delete protocol.stages[stageId]; + } + } + } + + // Export to Markdown + exportMdBtn.addEventListener('click', function(e) { + e.preventDefault(); + + updateProtocolData(); + + // Use community name if available, otherwise default + const communityName = protocol.metadata.communityName || "Community"; + let markdown = `# ${communityName} Dispute Protocol\n\n`; + + // Include protocol summary if available + if (protocol.metadata.summary) { + markdown += `${protocol.metadata.summary}\n\n`; + markdown += '---\n\n'; + } + + // Include template information if a template was used + if (protocol.templateTitle) { + markdown += `**Template Used:** ${protocol.templateTitle}\n\n`; + markdown += '---\n\n'; + } + + // Loop through the stages in order + stageHeaders.forEach(header => { + const stageId = header.getAttribute('data-stage'); + const stageName = header.querySelector('h2').textContent; + + let stageContent = ''; + let hasContent = false; + + // Get components for this stage + const stageComponents = protocol.stages[stageId]; + if (stageComponents) { + // Loop through components + for (const componentId in stageComponents) { + const componentCard = document.getElementById(`component-${componentId}`); + if (componentCard) { + const componentName = componentCard.querySelector('h3').textContent; + + let componentContent = ''; + let componentHasContent = false; + + // Loop through fields + for (const fieldId in stageComponents[componentId]) { + const fieldValue = stageComponents[componentId][fieldId]; + + // Skip empty fields + if (fieldValue && fieldValue.trim()) { + const fieldLabel = document.querySelector(`label[for="${fieldId}"]`).textContent; + componentContent += `#### ${fieldLabel}\n\n${fieldValue}\n\n`; + componentHasContent = true; + hasContent = true; + } + } + + // Only add component if it has content + if (componentHasContent) { + stageContent += `### ${componentName}\n\n${componentContent}`; + } + } + } + } + + // Only add stage if it has content + if (hasContent) { + markdown += `## ${stageName}\n\n${stageContent}`; + } + }); + + // Create and download the file + downloadFile('community_dispute_protocol.md', markdown); + }); + + // Export to PDF + exportPdfBtn.addEventListener('click', function(e) { + e.preventDefault(); + + updateProtocolData(); + + // Create a styled HTML version for PDF export + const { jsPDF } = window.jspdf; + const doc = new jsPDF(); + + let yPos = 20; + + // Use community name if available, otherwise default + const communityName = protocol.metadata.communityName || "Community"; + + // Add title + doc.setFontSize(18); + doc.text(`${communityName} Dispute Protocol`, 105, yPos, { align: 'center' }); + yPos += 15; + + // Add protocol summary if available + if (protocol.metadata.summary) { + doc.setFontSize(12); + const summaryLines = doc.splitTextToSize(protocol.metadata.summary, 180); + doc.text(summaryLines, 14, yPos); + yPos += summaryLines.length * 7 + 8; + } + + // Add template info if available + if (protocol.templateTitle) { + doc.setFontSize(10); + doc.text(`Template Used: ${protocol.templateTitle}`, 14, yPos); + yPos += 10; + } + + // Loop through the stages + stageHeaders.forEach(header => { + const stageId = header.getAttribute('data-stage'); + const stageName = header.querySelector('h2').textContent; + + let stageHasContent = false; + let stageStartYPos = yPos; + + // Save current position to add stage heading later if content is found + if (yPos > 250) { + doc.addPage(); + stageStartYPos = 20; + yPos = 20; + } + + // Skip stage heading for now - we'll add it if the stage has content + let currentYPos = stageStartYPos + 10; // Space for the heading + + // Get components for this stage + const stageComponents = protocol.stages[stageId]; + if (stageComponents) { + // Loop through components + for (const componentId in stageComponents) { + const componentCard = document.getElementById(`component-${componentId}`); + if (componentCard) { + let componentHasContent = false; + let componentStartYPos = currentYPos; + + // Check for page break + if (currentYPos > 250) { + doc.addPage(); + componentStartYPos = 20; + currentYPos = 20; + } + + // Skip component heading for now - add if it has content + const componentFieldStartYPos = componentStartYPos + 8; + let fieldYPos = componentFieldStartYPos; + + const componentName = componentCard.querySelector('h3').textContent; + + // Loop through fields + for (const fieldId in stageComponents[componentId]) { + const fieldValue = stageComponents[componentId][fieldId]; + + // Skip empty fields + if (fieldValue && fieldValue.trim()) { + const fieldLabel = document.querySelector(`label[for="${fieldId}"]`).textContent; + + // Add page break if needed + if (fieldYPos > 250) { + doc.addPage(); + fieldYPos = 20; + } + + // We have content - if this is the first content in the component, + // add the component heading + if (!componentHasContent) { + componentHasContent = true; + stageHasContent = true; + + // If this is the first content in the stage, add the stage heading + if (!stageHasContent) { + doc.setFontSize(16); + doc.text(stageName, 14, stageStartYPos); + } + + // Add component heading + doc.setFontSize(14); + doc.text(componentName, 14, componentStartYPos); + } + + // Add field heading + doc.setFontSize(12); + doc.text(fieldLabel, 14, fieldYPos); + fieldYPos += 6; + + // Split the text into lines to handle wrapping + const textLines = doc.splitTextToSize(fieldValue, 180); + + // Add field content + doc.setFontSize(10); + doc.text(textLines, 14, fieldYPos); + fieldYPos += textLines.length * 5 + 8; + } + } + + // Update current Y position if component had content + if (componentHasContent) { + currentYPos = fieldYPos; + } + } + } + } + + // Update the overall Y position if stage had content + if (stageHasContent) { + yPos = currentYPos; + } + }); + + // Save the PDF + doc.save('community_dispute_protocol.pdf'); + }); + + // Export to JSON + exportJsonBtn.addEventListener('click', function(e) { + e.preventDefault(); + + updateProtocolData(); + const jsonData = JSON.stringify(protocol, null, 2); + downloadFile('community_dispute_protocol.json', jsonData); + }); + + // Import from JSON + importBtn.addEventListener('click', function() { + importJsonInput.click(); + }); + + importJsonInput.addEventListener('change', function(event) { + const file = event.target.files[0]; + if (file) { + const reader = new FileReader(); + reader.onload = function(e) { + try { + const importedProtocol = JSON.parse(e.target.result); + protocol = importedProtocol; + + // Populate metadata fields if present + if (protocol.metadata) { + if (protocol.metadata.communityName) { + communityNameInput.value = protocol.metadata.communityName; + } + + if (protocol.metadata.summary) { + protocolSummaryTextarea.value = protocol.metadata.summary; + } + } + + // Populate the component fields with the imported data + for (const stageId in protocol.stages) { + for (const componentId in protocol.stages[stageId]) { + for (const fieldId in protocol.stages[stageId][componentId]) { + const textarea = document.getElementById(fieldId); + if (textarea) { + textarea.value = protocol.stages[stageId][componentId][fieldId]; + } + } + } + } + + // If the imported protocol has template information, select that template + if (protocol.templateId && protocolTemplateSelect) { + protocolTemplateSelect.value = protocol.templateId; + + // Update template description + if (protocol.templateDescription && templateDescription) { + templateDescription.textContent = protocol.templateDescription; + templateDescription.style.display = 'block'; + } + + // Expand all sections + stageContents.forEach(content => { + content.style.display = 'block'; + const toggleBtn = content.parentElement.querySelector('.toggle-btn'); + if (toggleBtn) { + toggleBtn.textContent = '-'; + } + }); + } else { + // If no template, reset the template selector + if (protocolTemplateSelect) { + protocolTemplateSelect.value = ''; + } + if (templateDescription) { + templateDescription.textContent = ''; + templateDescription.style.display = 'none'; + } + } + + // Update preview mode if active + if (previewModeActive) { + markComponentsWithContent(); + } + + alert('Protocol imported successfully!'); + } catch (error) { + alert('Failed to import protocol. Invalid JSON format.'); + console.error(error); + } + }; + reader.readAsText(file); + } + }); + + // Helper function to download a file + function downloadFile(filename, content) { + const element = document.createElement('a'); + element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(content)); + element.setAttribute('download', filename); + element.style.display = 'none'; + document.body.appendChild(element); + element.click(); + document.body.removeChild(element); + } + + // Save data when inputs change + document.querySelectorAll('textarea').forEach(textarea => { + textarea.addEventListener('input', function() { + updateProtocolData(); + // Update preview mode if active + if (previewModeActive) { + markComponentsWithContent(); + } + }); + }); + + // Function to update preview content + function updatePreviewContent() { + // First, clear any existing preview divs + document.querySelectorAll('.preview-content').forEach(div => { + div.parentNode.removeChild(div); + }); + + // Show all textareas again + document.querySelectorAll('textarea').forEach(textarea => { + textarea.style.display = ''; + }); + + // Then create new preview divs for all textareas with content + document.querySelectorAll('textarea').forEach(textarea => { + if (textarea.value && textarea.value.trim()) { + // Create a div to replace the textarea for preview + const previewDiv = document.createElement('div'); + previewDiv.className = 'preview-content'; + previewDiv.textContent = textarea.value; + previewDiv.dataset.forTextarea = textarea.id; + + // Hide the textarea and insert the div + textarea.style.display = 'none'; + textarea.parentNode.insertBefore(previewDiv, textarea.nextSibling); + } + }); + } + + // Update preview content when preview mode is toggled + document.getElementById('preview-toggle').addEventListener('change', function() { + if (this.checked) { + // Wait for the preview mode styles to apply, then update content + setTimeout(updatePreviewContent, 100); + } + }); + + // Update preview content when module content changes + document.querySelectorAll('.module-select').forEach(select => { + select.addEventListener('change', function() { + setTimeout(() => { + if (document.getElementById('preview-toggle').checked) { + updatePreviewContent(); + } + }, 100); + }); + }); + + // Update preview content on window resize + window.addEventListener('resize', function() { + if (document.getElementById('preview-toggle').checked) { + updatePreviewContent(); + } + }); + + console.log('Builder initialization complete'); +}); \ No newline at end of file diff --git a/static/js/data/modules.js b/static/js/data/modules.js new file mode 100644 index 0000000..1d190db --- /dev/null +++ b/static/js/data/modules.js @@ -0,0 +1,1997 @@ +// This file contains the module data that would normally be loaded from the server +// In a production environment, this would be generated from YAML files + +const moduleData = { + // New modules for Restorative Justice template + restorative_justice: [ + { + id: "restorative-principles", + title: "Restorative Justice Principles", + componentId: "principles", + fieldId: "principlesText", + content: `Our dispute resolution process is guided by these core restorative justice principles: + +1. Focus on harm and repairing relationships, not punishment +2. Include all affected parties in the process +3. Provide space for truth-telling and emotional expression +4. Work toward healing and transformation +5. Seek solutions that address root causes of conflict +6. Empower participants to find their own resolution +7. Build community capacity to handle future conflicts` + }, + { + id: "restorative-circle", + title: "Restorative Circle Process", + componentId: "facilitation", + fieldId: "facilitationText", + content: `The dispute process uses a restorative circle approach: + +1. A trained circle keeper facilitates but does not control the process +2. All participants sit in a circle with no tables or barriers between them +3. A talking piece is passed around the circle to ensure each person can speak without interruption +4. Multiple rounds allow for deepening the conversation and moving toward resolution +5. The circle process follows indigenous wisdom traditions adapted for contemporary contexts +6. The circle keeper prepares participants individually before the full circle gathering` + }, + { + id: "harm-needs-assessment", + title: "Harm and Needs Assessment", + componentId: "situation", + fieldId: "situationText", + content: `The situation is assessed through a harm and needs framework: + +1. Each participant describes what happened from their perspective +2. Participants identify how they have been affected or harmed +3. Underlying needs that weren't met are identified +4. The impact on relationships and the wider community is explored +5. The assessment focuses on understanding rather than blame +6. This approach creates a foundation for addressing specific harms` + }, + { + id: "collaborative-agreement", + title: "Collaborative Responsibility Plan", + componentId: "agreement", + fieldId: "agreementText", + content: `All resolutions result in a collaborative responsibility plan: + +1. The plan details specific actions to repair harm +2. Each participant has clear responsibilities for making things right +3. The plan includes timeline commitments for implementation +4. Support mechanisms are built in to help participants fulfill their commitments +5. The plan may include ongoing relationship-building activities +6. All participants sign the agreement and receive a copy +7. The agreement focuses on healing and moving forward rather than punishment` + } + ], + + // New modules for Transformative Justice template + transformative_justice: [ + { + id: "transformative-principles", + title: "Transformative Justice Principles", + componentId: "principles", + fieldId: "principlesText", + content: `Our dispute resolution process is guided by these transformative justice principles: + +1. Address immediate harm between individuals +2. Connect individual instances of harm to broader social patterns +3. Transform the conditions that allowed harm to occur +4. Build community accountability systems without relying on punitive measures +5. Center the needs of those most impacted while inviting those who caused harm into accountability +6. Develop collective strategies for healing, resilience, and safety +7. Work toward long-term cultural and structural change` + }, + { + id: "community-accountability", + title: "Community Accountability Process", + componentId: "facilitation", + fieldId: "facilitationText", + content: `The dispute process uses a community accountability approach: + +1. A facilitation team of 2-3 trained community members guides the process +2. Both the person harmed and the person who caused harm have support teams +3. The wider community is represented by stakeholders affected by the issues +4. The process begins with individual preparation sessions before group meetings +5. Facilitation focuses on transforming harmful patterns, not just individual incidents +6. Multiple sessions allow for deep exploration of systemic factors +7. The process builds community capacity to address similar issues in the future` + }, + { + id: "systems-analysis", + title: "Systems Analysis Assessment", + componentId: "situation", + fieldId: "situationText", + content: `The situation is assessed through a systemic analysis framework: + +1. Individual experiences and harms are documented +2. Patterns of behavior and power dynamics are identified +3. Structural factors that contributed to the harm are analyzed +4. Community norms and cultural assumptions are examined +5. The assessment connects individual incidents to broader social contexts +6. This approach identifies intervention points at multiple levels, from individual to systemic` + }, + { + id: "transformative-agreement", + title: "Transformative Action Plan", + componentId: "agreement", + fieldId: "agreementText", + content: `All resolutions result in a multi-level transformative action plan: + +1. Individual actions to address immediate harm and accountability +2. Relationship-building commitments between affected parties +3. Community-level interventions to address cultural factors +4. Structural changes to prevent similar harms in the future +5. Education and awareness components to share learning +6. The plan includes both short-term and long-term actions +7. Regular review points are scheduled to assess progress and adjust strategies` + } + ], + + // New modules for Jury template + jury: [ + { + id: "jury-principles", + title: "Community Jury Principles", + componentId: "principles", + fieldId: "principlesText", + content: `Our dispute resolution process is guided by these community jury principles: + +1. Fair representation through random selection of community members +2. Impartiality through screening for conflicts of interest +3. Informed deliberation based on evidence and testimony +4. Collective wisdom through diverse perspectives +5. Transparency in process while maintaining appropriate confidentiality +6. Community standards as the basis for decision-making +7. Balance between structure and flexibility to ensure fairness` + }, + { + id: "jury-selection", + title: "Jury Selection and Preparation", + componentId: "selection", + fieldId: "selectionText", + content: `Jurors are selected through a structured random process: + +1. A pool of 15-20 community members is randomly selected from the membership roster +2. Potential jurors complete a screening questionnaire to identify conflicts of interest +3. Both parties in the dispute may exclude up to 3 potential jurors without stating a reason +4. A final panel of 5-7 jurors is confirmed from the remaining pool +5. Selected jurors receive orientation materials and basic conflict resolution training +6. The process ensures diversity of perspectives while maintaining impartiality` + }, + { + id: "jury-facilitation", + title: "Structured Jury Process", + componentId: "facilitation", + fieldId: "facilitationText", + content: `The dispute process is facilitated through a structured jury format: + +1. A trained process facilitator guides the proceedings but does not participate in decision-making +2. The process follows clear phases: opening statements, evidence presentation, questions, deliberation, and decision +3. All parties have equal time to present their perspectives and evidence +4. Jurors may ask clarifying questions through the facilitator +5. The facilitator ensures adherence to community standards and procedural fairness +6. Deliberations are conducted by jurors alone, with the facilitator available for procedural questions` + }, + { + id: "jury-deliberation", + title: "Jury Deliberation Process", + componentId: "finding_solutions", + fieldId: "findingSolutionsText", + content: `Solutions are developed through structured jury deliberation: + +1. Jurors first identify key issues requiring resolution +2. Each juror shares their initial perspective without interruption +3. The jury works to develop a shared understanding of the situation +4. Multiple solution options are generated and evaluated +5. Decisions require a supermajority (typically 2/3) agreement +6. When consensus isn't possible on specific points, the jury may offer multiple options +7. The jury documents their reasoning along with their final decision` + }, + { + id: "jury-decision", + title: "Jury Decision Process", + componentId: "decision_making", + fieldId: "decisionMakingText", + content: `Decisions are made through a structured jury voting process: + +1. After thorough deliberation, the jury votes on proposed resolutions +2. A 2/3 majority is required for decisions to be adopted +3. If the first vote doesn't reach the threshold, further discussion occurs +4. Up to three voting rounds may take place to reach the required majority +5. If consensus cannot be reached after three rounds, the most supported option with at least 60% support is adopted +6. The jury provides written rationale for their decision based on community standards +7. Jury decisions are binding within the scope of community governance` + } + ], + + // New modules for Referee template + referee: [ + { + id: "referee-principles", + title: "Single Referee Principles", + componentId: "principles", + fieldId: "principlesText", + content: `Our dispute resolution process is guided by these referee principles: + +1. Expertise-based facilitation by a qualified individual +2. Fairness through clear procedures and balanced participation +3. Efficiency through streamlined process with a single decision-maker +4. Consistency in applying community standards +5. Practicality in developing workable solutions +6. Transparency in reasoning while maintaining confidentiality +7. Authority balanced with participant input and feedback` + }, + { + id: "referee-selection", + title: "Referee Selection Process", + componentId: "selection", + fieldId: "selectionText", + content: `The referee is selected through a structured process: + +1. The community maintains a roster of 5-7 trained referees with diverse expertise +2. For each dispute, 3 available referees are presented to the parties +3. Parties rank their preferences, with the highest mutual ranking selected +4. If parties cannot agree, a random selection from the three options is made +5. Selected referees must disclose any potential conflicts of interest +6. Parties may challenge the selection based on demonstrated bias or conflict +7. Referees receive ongoing training and peer review to maintain quality` + }, + { + id: "referee-facilitation", + title: "Referee-Led Process", + componentId: "facilitation", + fieldId: "facilitationText", + content: `The dispute process is led by a single referee who: + +1. Reviews all submitted materials before the first meeting +2. Conducts individual intake interviews with each party +3. Structures a joint session with clear speaking times and guidelines +4. Asks clarifying questions to develop a complete understanding +5. May request additional information or witnesses as needed +6. Maintains control of the process while ensuring all voices are heard +7. Provides guidance on realistic options based on community standards` + }, + { + id: "referee-decision", + title: "Referee Decision Process", + componentId: "decision_making", + fieldId: "decisionMakingText", + content: `Decisions are made through a referee determination process: + +1. The referee first encourages participants to reach their own agreement +2. If parties cannot agree, the referee considers all presented information +3. The decision is based on community standards, precedent, and fairness +4. The referee provides a written determination with clear reasoning +5. Parties may ask clarifying questions about the decision +6. The referee has authority to make binding decisions within community governance +7. Decisions are delivered within one week of the final session` + }, + { + id: "referee-agreement", + title: "Referee-Facilitated Agreement", + componentId: "agreement", + fieldId: "agreementText", + content: `All resolutions result in a clear written determination: + +1. The document summarizes the dispute and process +2. Key findings on factual and policy matters are stated clearly +3. Specific required actions are detailed with deadlines +4. Rationale for the decision is provided with reference to community standards +5. Implementation responsibilities are assigned to specific parties +6. Follow-up and verification methods are specified +7. The referee signs the determination, and parties acknowledge receipt` + } + ], + principles: [ + { + id: "restorative", + title: "Restorative Justice Principles", + componentId: "principles", + fieldId: "principlesText", + content: `1. Focus on harm and needs of those affected +2. Address obligations resulting from harm +3. Use inclusive, collaborative processes +4. Involve all stakeholders (victims, offenders, community) +5. Work toward repairing harm and healing relationships` + }, + { + id: "transformative", + title: "Transformative Justice Principles", + componentId: "principles", + fieldId: "principlesText", + content: `1. Seek to address immediate safety, healing, and agency +2. Work to transform the conditions that allowed violence to occur +3. Build community accountability systems +4. Focus on community-based responses without relying on punitive systems +5. Acknowledge interconnection of all forms of violence` + }, + { + id: "consensus", + title: "Consensus-Based Principles", + componentId: "principles", + fieldId: "principlesText", + content: `1. All members have equal input in decision-making +2. Seek solutions that address everyone's fundamental concerns +3. Prioritize listening and understanding diverse perspectives +4. Work toward outcomes that all parties can accept +5. Focus on collaborative problem-solving over adversarial positions` + }, + { + id: "procedural-justice", + title: "Procedural Justice Principles", + componentId: "principles", + fieldId: "principlesText", + content: `1. Ensure consistent application of rules across all cases +2. Provide transparent decision-making processes that can be explained +3. Give all parties opportunities to voice their perspectives +4. Maintain neutral, unbiased facilitators without conflicts of interest +5. Treat all participants with dignity and respect throughout the process +6. Make decisions based on facts rather than personal biases` + }, + { + id: "cooperative-principles", + title: "Cooperative Problem Solving Principles", + componentId: "principles", + fieldId: "principlesText", + content: `1. Separate people from problems - address issues, not personalities +2. Focus on interests rather than positions +3. Generate multiple options before deciding what to do +4. Insist that results be based on objective criteria +5. Recognize the legitimacy of feelings and perceptions +6. Commit to ongoing learning and improving conflict resolution skills` + } + ], + participants: [ + { + id: "community-circle", + title: "Community Circle Roles and Participants", + componentId: "participants", + fieldId: "participantsRoles", + content: `1. Facilitator: Guides the process, ensures fairness, and helps maintain focus +2. Affected Parties: Those directly impacted by the dispute +3. Support Persons: Friends, family, or advocates who support affected parties +4. Community Members: Representatives who bring wider perspective +5. Resource People: Those with relevant expertise to inform the process` + }, + { + id: "mediation-model", + title: "Formal Mediation Participant Roles", + componentId: "participants", + fieldId: "participantsRoles", + content: `1. Mediator: Neutral third party who facilitates the process +2. Disputants: Primary parties involved in the conflict +3. Advocates: Optional support persons who may speak on behalf of disputants +4. Witnesses: Those who provide information relevant to the dispute +5. Implementers: Those responsible for helping carry out any agreements` + }, + { + id: "council-model", + title: "Dispute Council Participant Roles", + componentId: "participants", + fieldId: "participantsRoles", + content: `1. Council Members: A designated group responsible for hearing disputes +2. Complainant: Person bringing the dispute +3. Respondent: Person responding to the complaint +4. Witnesses: Those providing testimony or evidence +5. Advisors: Those who support the council with expertise +6. Community Observers: Those who may witness proceedings for transparency` + }, + { + id: "peer-panel-model", + title: "Peer Panel Participant Structure", + componentId: "participants", + fieldId: "participantsRoles", + content: `1. Panel Members: 3-5 peers randomly selected from the community +2. Initiator: Person who brings the issue for resolution +3. Responding Party: Person responding to the concerns raised +4. Process Coordinator: Person who administers the process but doesn't make decisions +5. Advisor: Optional person who provides procedural guidance to all participants +6. Note-taker: Person responsible for documenting the process and outcomes` + }, + { + id: "collaborative-team-model", + title: "Collaborative Team Member Roles", + componentId: "participants", + fieldId: "participantsRoles", + content: `1. Coach: Person who helps design the process and keeps it on track +2. Core Participants: Those directly involved in and affected by the dispute +3. Resource Team: People with specific knowledge or skills needed to resolve the issue +4. Implementation Team: People responsible for carrying out and monitoring agreements +5. Learning Partners: People who document the process for organizational learning` + } + ], + filing: [ + { + id: "written-filing", + title: "Written Filing Process", + componentId: "filing", + fieldId: "filingProcess", + content: `1. Complainant fills out a standard form describing the dispute +2. Form includes sections for: parties involved, description of the issue, desired outcome +3. Submission can be made via email, website, or physical drop-off +4. Complainant receives confirmation of receipt +5. Submission is reviewed for completeness within 48 hours` + }, + { + id: "verbal-filing", + title: "Verbal Filing Process", + componentId: "filing", + fieldId: "filingProcess", + content: `1. Complainant schedules a meeting with a designated intake person +2. During the meeting, the intake person documents the dispute details +3. The intake person reviews the documented information with the complainant +4. Once approved, the complaint is officially filed +5. Complainant receives a copy of the documented complaint` + }, + { + id: "third-party-assisted", + title: "Third-Party Assisted Filing", + componentId: "filing", + fieldId: "filingProcess", + content: `1. A neutral third party is available to help anyone who wishes to file a complaint +2. The third party helps articulate concerns clearly and completely +3. The assistance can be provided in person, by phone, or via video call +4. The third party does not judge the merits of the complaint +5. The person filing retains final say over content before submission +6. Support is available in multiple languages as needed` + }, + { + id: "multi-channel-filing", + title: "Multi-Channel Filing System", + componentId: "filing", + fieldId: "filingProcess", + content: `1. Multiple channels are available for initiating the process +2. Options include web form, email, phone hotline, text message, in-person, or postal mail +3. All channels feed into a single tracking system to ensure consistent handling +4. Each filing receives a unique tracking number for reference +5. The system acknowledges receipt through the same channel used to file +6. Filers can choose their preferred method for future communications` + } + ], + notification: [ + { + id: "direct-notification", + title: "Direct Notification Process", + componentId: "notification", + fieldId: "notificationMethod", + content: `1. All parties are notified in writing within 72 hours of a filed complaint +2. Notification includes a copy of the complaint and next steps +3. Parties confirm receipt of notification +4. If no confirmation is received within 48 hours, a secondary contact method is used +5. All notifications maintain privacy and confidentiality standards` + }, + { + id: "facilitated-notification", + title: "Facilitated Notification Process", + componentId: "notification", + fieldId: "notificationMethod", + content: `1. A neutral facilitator contacts all parties individually +2. The facilitator explains the process and shares the complaint details +3. Parties have an opportunity to ask questions about the process +4. The facilitator documents that notification has occurred +5. Follow-up written summary is provided to all parties` + }, + { + id: "staged-notification", + title: "Staged Notification Process", + componentId: "notification", + fieldId: "notificationMethod", + content: `1. Initial notice informs parties only about the existence of a dispute process +2. Second notification (48 hours later) provides process details and expectations +3. Third notification (after orientation) shares specific complaint details +4. Each stage requires acknowledgment before proceeding +5. This approach gives parties time to process information and prepare +6. Support resources are offered at each stage` + }, + { + id: "community-witness", + title: "Community Witness Notification", + componentId: "notification", + fieldId: "notificationMethod", + content: `1. A respected community member serves as the notification witness +2. The witness personally delivers notification to all parties +3. The witness explains both the complaint and the process in person +4. The witness can answer questions and provide initial emotional support +5. The witness has no decision-making role in the actual dispute process +6. Written documentation follows the in-person notification` + } + ], + // Adding process module options + process: [ + { + id: "participant-facilitation", + title: "Participant Facilitation", + componentId: "facilitation", + fieldId: "facilitationText", + content: `The dispute process is facilitated by the participants themselves: + +1. Participants take turns leading different parts of the conversation +2. A written guide provides structure to ensure all voices are heard +3. All participants receive basic training in productive dialogue techniques +4. Time limits and speaking guidelines ensure fair participation +5. Any participant can call for a break or reset if the process becomes unproductive` + }, + { + id: "peer-facilitation", + title: "Peer Facilitation", + componentId: "facilitation", + fieldId: "facilitationText", + content: `The dispute process is facilitated by peers from within the community: + +1. A pool of trained peer facilitators is maintained within the community +2. Facilitators are selected who have no direct involvement in the dispute +3. Peer facilitators receive regular training in conflict resolution techniques +4. Typically, two peer facilitators work together on each case +5. Peer facilitators help maintain structure but do not make decisions` + }, + { + id: "trained-facilitation", + title: "Professional Mediator Facilitation", + componentId: "facilitation", + fieldId: "facilitationText", + content: `The dispute process is facilitated by professionally trained mediators: + +1. Professional mediators with formal certification lead the process +2. Mediators are selected from outside the community to ensure neutrality +3. Mediators have specific training in the type of conflict being addressed +4. The community maintains a roster of approved mediators +5. Mediators are paid for their services according to a pre-established rate` + }, + { + id: "facilitation-committee", + title: "Standing Facilitation Committee", + componentId: "facilitation", + fieldId: "facilitationText", + content: `The dispute process is facilitated by a standing committee: + +1. A dedicated committee of 5-7 members oversees all dispute processes +2. Committee members serve rotating terms and receive ongoing training +3. For each dispute, a subgroup of 2-3 committee members is assigned +4. Committee members with conflicts of interest must recuse themselves +5. The committee follows established procedures and maintains records of all cases` + }, + { + id: "rotating-facilitation", + title: "Rotating Facilitator Approach", + componentId: "facilitation", + fieldId: "facilitationText", + content: `The dispute process uses a rotating facilitation approach: + +1. Different facilitators guide each stage of the process +2. This prevents any single person from having too much influence +3. Facilitators include both trained professionals and community members +4. Each facilitator receives a comprehensive briefing before their segment +5. This model combines diverse skills and perspectives throughout the process +6. A process coordinator ensures smooth transitions between facilitators` + }, + { + id: "co-facilitation-team", + title: "Co-Facilitation Team", + componentId: "facilitation", + fieldId: "facilitationText", + content: `The dispute process is guided by a co-facilitation team: + +1. A team of 2-3 facilitators work together throughout the entire process +2. The team includes people with diverse backgrounds, skills, and perspectives +3. At least one facilitator has deep knowledge of the community +4. At least one facilitator has professional conflict resolution training +5. Team members support each other and can step in if one becomes overwhelmed +6. The team models collaborative problem-solving for participants` + }, + { + id: "nonviolent-communication", + title: "Nonviolent Communication Guidelines", + componentId: "ground_rules", + fieldId: "groundRulesText", + content: `Our dispute process follows the principles of Nonviolent Communication (NVC): + +1. Participants focus on observations rather than evaluations or judgments +2. Participants express feelings using "I" statements rather than blaming others +3. Participants identify needs that are or are not being met by the situation +4. Participants make clear, actionable requests rather than demands +5. Facilitators help participants translate judgmental language into NVC format +6. Active listening is practiced, with participants reflecting back what they've heard` + }, + { + id: "structured-dialogue", + title: "Structured Dialogue Rules", + componentId: "ground_rules", + fieldId: "groundRulesText", + content: `Our process uses a structured dialogue approach with clear rules: + +1. Each person speaks uninterrupted for up to 3 minutes +2. After speaking, the next person must summarize what they heard before responding +3. No personal attacks or derogatory language is permitted +4. Specific examples must be provided when making claims +5. Questions must be genuine (seeking information) rather than rhetorical +6. Technology and distractions are not permitted during sessions +7. Agreements and disagreements are documented throughout` + }, + { + id: "circle-process", + title: "Traditional Circle Process Guidelines", + componentId: "ground_rules", + fieldId: "groundRulesText", + content: `Our dispute process follows traditional circle practice guidelines: + +1. A talking piece is passed clockwise around the circle +2. Only the person holding the talking piece may speak +3. Participants can pass and receive the talking piece later +4. Everyone speaks from the heart and listens with respect +5. Stories and experiences are honored as valid ways of sharing +6. Silence is respected as a form of participation +7. What is shared in the circle stays in the circle +8. The circle continues until resolution is reached` + } + ], + // Adding intake module options + intake: [ + { + id: "incident-report-form", + title: "Incident Report Form", + componentId: "process_start", + fieldId: "processStartText", + content: `The dispute process begins when a community member fills out an incident report form. This form includes: + +1. Details about the parties involved in the dispute +2. A description of what happened, including dates and times +3. Any relevant evidence or documentation +4. A description of the outcome the person is seeking + +The form can be submitted electronically through our community portal or as a paper form to the designated community coordinator.` + }, + { + id: "initial-conversation", + title: "Initial Guided Conversation Start", + componentId: "process_start", + fieldId: "processStartText", + content: `The dispute process begins with an initial conversation with a process guide: + +1. Community members can schedule a 30-minute conversation with a trained process guide +2. The conversation helps clarify whether a formal process is needed +3. The guide explains available options and helps identify the most appropriate path +4. If a formal process is chosen, the guide helps document key information +5. The conversation is confidential and no records are kept if the person decides not to proceed +6. This approach reduces barriers to accessing the dispute process` + }, + { + id: "community-hours", + title: "Drop-in Community Office Hours", + componentId: "process_start", + fieldId: "processStartText", + content: `The dispute process begins during regular community office hours: + +1. Trained facilitators hold weekly office hours at a consistent time and location +2. Community members can drop in without an appointment to discuss concerns +3. Multiple facilitators are available to accommodate different preferences +4. The space is designed to be welcoming, accessible, and private +5. Simple refreshments are provided to create a comfortable atmosphere +6. If a formal process is initiated, follow-up appointments are scheduled` + }, + { + id: "strong-confidentiality", + title: "Strong Confidentiality", + componentId: "information_access", + fieldId: "informationAccessText", + content: `Our community practices strong confidentiality in dispute processes: + +1. Information is shared only with those directly involved in the case +2. All participants sign a confidentiality agreement at the beginning of the process +3. Records are kept secure and access is limited to the facilitator/mediator +4. Only anonymized statistics are shared with the wider community +5. Breaches of confidentiality may result in removal from the process` + }, + { + id: "tiered-confidentiality", + title: "Tiered Confidentiality System", + componentId: "information_access", + fieldId: "informationAccessText", + content: `Our community uses a tiered confidentiality system: + +1. Level 1 (Public): General process information is publicly available +2. Level 2 (Community): Case existence and general status is shared within the community +3. Level 3 (Participants): Specific details are shared only with direct participants +4. Level 4 (Private): Sensitive personal information remains strictly confidential +5. Participants jointly decide which tier applies to different types of information +6. This approach balances privacy with appropriate community awareness` + }, + { + id: "online-rules-repository", + title: "Online Rules Repository System", + componentId: "rules_access", + fieldId: "rulesAccessText", + content: `Our community maintains all rules and agreements in an online repository: + +1. The repository is accessible to all community members through a password-protected portal +2. Rules are organized by category and searchable by keyword +3. Each rule includes the date it was established and any revisions +4. The repository includes plain-language explanations and case examples +5. New members receive an orientation to the rules repository when they join` + }, + { + id: "plain-language-handbook", + title: "Plain Language Handbook", + componentId: "rules_access", + fieldId: "rulesAccessText", + content: `Our community rules are compiled in a plain language handbook: + +1. The handbook uses everyday language without legal or technical jargon +2. Rules are explained with real-world examples and scenarios +3. Visual aids and diagrams illustrate complex processes +4. The handbook is available in print and digital formats +5. Multiple languages are supported for diverse communities +6. Audio versions are available for accessibility +7. The handbook is updated annually with community input` + }, + { + id: "formal-notification", + title: "Formal Notification", + componentId: "participant_inclusion", + fieldId: "participantInclusionText", + content: `Other participants are brought into the process through formal notification: + +1. Within 48 hours of receiving a dispute form, all named parties are contacted +2. Notification occurs via email with delivery confirmation and a follow-up phone call +3. The notification includes a copy of the dispute form and information about next steps +4. Parties are given 5 days to respond and indicate their willingness to participate +5. If necessary, a neutral third party may facilitate initial communications` + }, + { + id: "relational-invitation", + title: "Relational Invitation Process", + componentId: "participant_inclusion", + fieldId: "participantInclusionText", + content: `Other participants are brought into the process through a relational invitation approach: + +1. The initiator is encouraged to personally invite other parties when appropriate +2. If direct invitation isn't suitable, a mutually trusted community member extends the invitation +3. Invitations frame the process as collaborative problem-solving rather than conflict +4. Emphasis is placed on shared community values and relationships +5. Initial one-on-one conversations address concerns before group meetings +6. This approach recognizes that how people enter the process significantly affects outcomes` + }, + { + id: "voluntary-participation", + title: "Voluntary Participation", + componentId: "participation_requirement", + fieldId: "participationRequirementText", + content: `Participation in our dispute resolution process is entirely voluntary: + +1. All parties must freely choose to participate +2. Anyone may withdraw from the process at any time +3. No penalties are imposed for choosing not to participate +4. Alternative resolution paths are provided for situations where some parties are unwilling to engage +5. Facilitators check in regularly to ensure continued willing participation` + }, + { + id: "community-agreement", + title: "Community Agreement Participation", + componentId: "participation_requirement", + fieldId: "participationRequirementText", + content: `Participation follows our pre-established community agreements: + +1. All community members agree to participate in dispute processes when joining +2. This agreement is explicitly reviewed during orientation +3. While participation is expected, accommodations are available for special circumstances +4. Multiple process options ensure everyone can participate in a way that works for them +5. Those who consistently refuse participation may be asked to reconsider community membership +6. Focus remains on finding resolutions that work for everyone rather than enforcement` + } + ], + // Adding assessment module options + assessment: [ + { + id: "shared-narrative", + title: "Collaborative Narrative Development", + componentId: "situation", + fieldId: "situationText", + content: `The situation is assessed through development of a shared narrative: + +1. Each participant shares their perspective on what happened +2. A combined timeline of events is created noting points of agreement and disagreement +3. Underlying issues and patterns are identified together +4. The impact on each person and on the community is acknowledged +5. A summary document is created that all participants review for accuracy` + }, + { + id: "separate-interviews", + title: "Separate Party Initial Interviews", + componentId: "situation", + fieldId: "situationText", + content: `The situation is assessed through separate initial interviews: + +1. A trained assessor conducts individual interviews with each participant +2. Interviews follow a structured format with consistent questions +3. The assessor creates a summary document identifying key issues and perspectives +4. This summary is shared with all participants for review and correction +5. Only after this initial assessment do participants meet together +6. This approach allows for safe sharing of perspectives and identifies areas of agreement and disagreement` + }, + { + id: "impact-circles", + title: "Concentric Impact Circles Assessment", + componentId: "situation", + fieldId: "situationText", + content: `The situation is assessed using concentric impact circles: + +1. Participants identify who has been directly and indirectly affected by the situation +2. A visual map is created showing primary, secondary, and tertiary impacts +3. Representatives from each circle are invited to provide input on how they've been affected +4. This approach ensures all impacts are recognized, even beyond the immediate participants +5. The visual representation helps everyone understand the full scope of the situation` + }, + { + id: "needs-assessment", + title: "Comprehensive Needs Assessment", + componentId: "needs", + fieldId: "needsText", + content: `We identify the needs of all participants through a structured assessment: + +1. Each person completes a needs identification worksheet +2. Facilitators help distinguish between wants (strategies) and underlying needs +3. Common needs are identified as potential areas of collaboration +4. Conflicting needs are noted for focused problem-solving +5. The group generates multiple strategies for meeting each identified need` + }, + { + id: "values-based-assessment", + title: "Values-Based Assessment", + componentId: "needs", + fieldId: "needsText", + content: `We identify needs through a values-based assessment approach: + +1. Participants identify their core values that relate to the situation +2. Each person explains how these values inform what they need from the resolution +3. The group works to understand the relationship between values and needs +4. Shared values are highlighted as foundation for collaboration +5. This approach helps elevate the conversation from positions to deeper values and principles +6. Solutions that honor everyone's core values become the priority` + }, + { + id: "harm-repair-assessment", + title: "Harm and Repair Assessment", + componentId: "needs", + fieldId: "needsText", + content: `We identify needs by assessing harm and potential repairs: + +1. All forms of harm are documented (emotional, relational, material, etc.) +2. For each harm, participants identify what would help repair or address it +3. Both immediate and long-term repair needs are considered +4. The assessment distinguishes between repairing past harm and preventing future harm +5. Cultural and contextual factors that influence perceptions of harm are explicitly discussed +6. This approach focuses on concrete actions that can address specific harms` + } + ], + // Adding resolution module options + resolution: [ + { + id: "consensus-decision", + title: "Formal Consensus Decision Process", + componentId: "decision_making", + fieldId: "decisionMakingText", + content: `Decisions are made through a formal consensus process: + +1. Proposals are developed collaboratively based on everyone's input +2. Each proposal is tested for consensus through a round where everyone indicates their level of support +3. Concerns are addressed and proposals are modified until consensus is reached +4. Consensus means all participants can live with and support the decision +5. If consensus cannot be reached after multiple attempts, a previously agreed-upon fallback method is used` + }, + { + id: "collaborative-problem-solving", + title: "Collaborative Problem Solving", + componentId: "decision_making", + fieldId: "decisionMakingText", + content: `Decisions are made through collaborative problem solving: + +1. The group begins by establishing shared goals and criteria for a good solution +2. Multiple options are generated without immediate evaluation (brainstorming) +3. Options are then evaluated based on how well they meet the established criteria +4. The most promising options are refined and combined to create optimal solutions +5. The group checks that solutions address everyone's core concerns +6. The process is iterative, with flexibility to revisit earlier steps as needed` + }, + { + id: "third-party-recommendation", + title: "Third-Party Recommendation", + componentId: "decision_making", + fieldId: "decisionMakingText", + content: `Decisions are made through a third-party recommendation process: + +1. A neutral third party with relevant expertise reviews all information +2. After hearing from all participants, the third party develops recommendations +3. These recommendations are non-binding but carry significant weight +4. Participants discuss the recommendations and may suggest modifications +5. Final decisions require agreement from all central participants +6. This approach combines external perspective with participant ownership` + }, + { + id: "written-agreement", + title: "Detailed Written Agreement", + componentId: "agreement", + fieldId: "agreementText", + content: `All resolutions result in a detailed written agreement: + +1. The agreement includes specific actions, responsibilities, and timelines +2. Each item is written in clear, unambiguous language +3. The agreement includes methods for monitoring implementation +4. Procedures for addressing possible breaches of the agreement are included +5. All participants sign the agreement and receive a copy +6. The agreement includes a process for modifications if needed` + }, + { + id: "visual-agreement", + title: "Visual Agreement Format", + componentId: "agreement", + fieldId: "agreementText", + content: `All resolutions result in a visual agreement document: + +1. The agreement uses visual formats (diagrams, flowcharts, timelines) to illustrate commitments +2. Color coding helps distinguish different types of responsibilities +3. Icons and symbols make the agreement accessible regardless of language or literacy +4. The visual format is supplemented by text explanations where needed +5. Digital versions include interactive elements for tracking progress +6. This approach makes agreements more accessible and memorable for all participants` + }, + { + id: "phased-agreement", + title: "Multi-Phase Implementation Agreement", + componentId: "agreement", + fieldId: "agreementText", + content: `All resolutions use a phased implementation agreement approach: + +1. The agreement is structured in clear implementation phases with checkpoints +2. Phase 1 includes immediate actions to address urgent concerns +3. Later phases depend on successful completion of earlier phases +4. Each phase includes specific measurable goals and review criteria +5. The agreement includes incentives for completing phases successfully +6. This approach builds trust through progressive implementation +7. It allows for adjustment based on what's learned in earlier phases` + } + ], + // Adding modules for deliberation components + deliberation: [ + { + id: "structured-deliberation", + title: "Structured Deliberation Process", + componentId: "deliberation_process", + fieldId: "deliberationProcessText", + content: `Our deliberation process follows a structured format: + +1. Opening Phase: Each party shares their perspective uninterrupted +2. Understanding Phase: Parties ask questions to clarify and understand each other's views +3. Issue Identification: Key issues are listed and prioritized +4. Option Generation: Multiple solutions are brainstormed without evaluation +5. Option Assessment: Each option is evaluated against shared criteria +6. Solution Building: The most promising options are combined and refined +7. Testing Agreement: Potential solutions are tested for durability and feasibility +8. Each phase has specific time limits and protocols to ensure progress` + }, + { + id: "interest-based-deliberation", + title: "Interest-Based Deliberation", + componentId: "deliberation_process", + fieldId: "deliberationProcessText", + content: `Our deliberation focuses on underlying interests rather than positions: + +1. The facilitator helps parties distinguish between positions and interests +2. Each party identifies their core interests (needs, concerns, hopes) +3. Common interests are highlighted as areas of potential collaboration +4. Discussions focus on how various options satisfy different interests +5. Creative problem-solving techniques help generate interest-satisfying options +6. The group works to find solutions that address all core interests +7. This approach avoids positional bargaining and zero-sum thinking +8. Regular summaries ensure everyone understands the developing solutions` + }, + { + id: "subject-matter-experts", + title: "Subject Matter Expert Inclusion", + componentId: "additional_voices", + fieldId: "additionalVoicesText", + content: `Our process includes subject matter experts when needed: + +1. Participants can jointly request expert input on technical matters +2. Experts are selected based on relevant knowledge and neutrality +3. Experts provide information but do not make recommendations +4. All parties submit questions in advance for the expert to address +5. Experts present to all parties simultaneously to ensure equal access +6. Parties can ask clarifying questions but not debate with experts +7. Expert information becomes part of the shared knowledge base +8. This approach ensures decisions are informed by relevant expertise` + }, + { + id: "community-perspective", + title: "Community Perspective Panel", + componentId: "additional_voices", + fieldId: "additionalVoicesText", + content: `Additional community perspectives are included through a representative panel: + +1. A diverse panel of 3-5 community members is selected to provide broader perspective +2. Panel members are not directly involved in the dispute but represent community interests +3. The panel observes key discussions and reviews proposed solutions +4. They provide feedback on how outcomes might affect the wider community +5. This ensures that solutions consider impacts beyond the immediate parties +6. Panel members commit to confidentiality and impartiality +7. They receive orientation on their advisory role and responsibilities` + }, + { + id: "progress-evaluation", + title: "Progress Evaluation Protocol", + componentId: "deliberation_conclusion", + fieldId: "deliberationConclusionText", + content: `Deliberations conclude through a structured progress evaluation: + +1. The facilitator guides a review of accomplishments and remaining issues +2. Agreements reached are documented in clear, actionable language +3. Areas still needing resolution are clearly identified +4. The group decides whether to: + - Continue with the current process + - Try a different approach + - Take a break before resuming + - Formalize partial agreements while continuing work on others +5. Next steps are agreed upon with specific timelines +6. This ensures thoughtful transitions between process phases` + }, + { + id: "agreement-readiness", + title: "Agreement Readiness Assessment", + componentId: "deliberation_conclusion", + fieldId: "deliberationConclusionText", + content: `Deliberations conclude with an agreement readiness assessment: + +1. Each potential resolution point is tested against readiness criteria: + - Is the agreement clear and specific? + - Is it feasible to implement? + - Do all parties fully understand their commitments? + - Are there adequate resources for implementation? + - Is there genuine buy-in from all involved? +2. Issues meeting the criteria move to formal agreement +3. Issues needing more work return to deliberation or move to alternative processes +4. This assessment prevents premature agreements that may later unravel +5. It ensures that agreements represent true resolution rather than temporary compromise` + } + ], + + resolution: [ + { + id: "consensus-building", + title: "Consensus Building Resolution", + componentId: "resolution_process", + fieldId: "resolutionProcessText", + content: `Our resolution process uses consensus building: + +1. Potential solutions are developed collaboratively by all participants +2. Each solution is refined through multiple rounds of feedback +3. Consensus is tested using a scale: + - Full support + - Support with minor concerns + - Can live with it + - Need more discussion + - Cannot support +4. Issues with "need more discussion" or "cannot support" responses are addressed +5. The process continues until all participants are at "can live with it" or higher +6. This ensures solutions have broad support rather than merely majority approval +7. Emphasis is placed on creative solutions that address all core concerns` + }, + { + id: "resolution-circles", + title: "Resolution Circles", + componentId: "resolution_process", + fieldId: "resolutionProcessText", + content: `Our community uses resolution circles to finalize agreements: + +1. When deliberation indicates readiness for resolution, a circle is convened +2. The circle includes all primary parties plus community witnesses +3. Each person in the circle speaks to what they believe a good resolution requires +4. Proposed agreements are read aloud and each person responds +5. If concerns arise, the circle explores modifications until consensus is reached +6. The final agreement is affirmed through a formal closing process +7. Community witnesses help commemorate the agreement +8. This process adds community significance to the resolution` + }, + { + id: "alternative-paths", + title: "Alternative Resolution Paths", + componentId: "resolution_failure", + fieldId: "resolutionFailureText", + content: `When full resolution isn't achieved, we offer alternative paths: + +1. Partial Agreements: Formalize points of agreement while acknowledging areas of continued difference +2. Structured Coexistence: Develop protocols for interaction when full resolution isn't possible +3. External Resources: Connect parties with additional resources that may help address underlying issues +4. Future Process: Schedule a follow-up process after a cooling-off period +5. Different Format: Suggest alternative dispute processes that might be more suitable +6. Closure Ritual: Provide a respectful way to conclude the process even without full resolution +7. This approach recognizes that not all disputes can be fully resolved while still supporting parties` + }, + { + id: "impasse-breaking", + title: "Impasse Breaking Techniques", + componentId: "resolution_failure", + fieldId: "resolutionFailureText", + content: `When resolution stalls, we use specific impasse-breaking techniques: + +1. Reframing: Reconstruct the issues from a different perspective +2. Contingent Agreements: Create if/then scenarios to address concerns about implementation +3. Package Agreements: Bundle multiple issues together to create value +4. Single-Text Negotiation: Work from a single evolving document rather than competing proposals +5. Decision Rules: Change the decision-making process if consensus is blocked +6. Third-Party Recommendations: Bring in neutral perspectives on possible solutions +7. Future Review: Add review periods to agreements that address concerns about unknown outcomes +8. If these techniques don't work, the facilitator helps the group decide on next steps outside the process` + } + ], + + process: [ + { + id: "justice-values", + title: "Justice-Centered Values", + componentId: "community_values", + fieldId: "communityValuesText", + content: `Our dispute resolution process is guided by these justice-centered values: + +1. Equity - Ensuring fair treatment and access for all community members +2. Accountability - Taking responsibility for one's actions and their impact +3. Restoration - Repairing harm and rebuilding relationships +4. Transformation - Addressing underlying causes of conflict +5. Voice - Ensuring all affected parties can meaningfully participate +6. Safety - Creating conditions where all can engage without fear +7. These values inform every aspect of our dispute resolution process` + }, + { + id: "relationship-values", + title: "Relationship-Centered Values", + componentId: "community_values", + fieldId: "communityValuesText", + content: `Our dispute resolution process prioritizes these relationship values: + +1. Respect - Treating all participants with dignity +2. Empathy - Seeking to understand others' experiences +3. Honesty - Speaking truthfully and acting with integrity +4. Compassion - Showing care for others' suffering +5. Trust - Building reliable expectations through consistent action +6. Growth - Learning and developing through challenge +7. Community - Recognizing our interdependence and shared future` + }, + ], + + appeal: [ + { + id: "substantive-appeal-criteria", + title: "Substantive Appeal Criteria", + componentId: "appeal_criteria", + fieldId: "appealCriteriaText", + content: `Appeals may be filed based on these substantive criteria: + +1. New Information: Significant evidence that was not available during the original process +2. Disproportionate Outcome: Resolution that is substantially unbalanced or unfair +3. Misapplication of Values: Decision that contradicts community values +4. Implementation Issues: Agreements that prove unworkable despite good faith efforts +5. Changed Circumstances: Significant changes that make the original resolution inappropriate +6. Appeals must be filed within 30 days of discovering the grounds for appeal +7. The appeal request must specify which criteria apply and provide supporting evidence` + }, + { + id: "procedural-appeal-criteria", + title: "Procedural Appeal Criteria", + componentId: "appeal_criteria", + fieldId: "appealCriteriaText", + content: `Appeals may be filed based on these procedural criteria: + +1. Bias: Evidence that the facilitator or decision-makers showed partiality +2. Process Violation: Failure to follow established procedures +3. Lack of Information: Decisions made without essential information +4. Exclusion: Affected parties prevented from meaningful participation +5. Coercion: Evidence that agreements were made under duress +6. Appeals must be filed within 14 days of the conclusion of the process +7. The appeal must describe specific procedural errors and their impact on outcomes` + }, + { + id: "appeal-panel-process", + title: "Appeal Panel Review Process", + componentId: "appeal_process", + fieldId: "appealProcessText", + content: `Our appeal process works through an independent panel review: + +1. Appeals are submitted in writing to the appeals coordinator +2. A panel of 3-5 members who were not involved in the original process is formed +3. The panel first reviews all documentation from the original case +4. The panel may request additional information or interview participants +5. A hearing is held where all parties can present their perspectives +6. The panel deliberates using the same values as the original process +7. The panel may uphold, modify, or replace the original resolution +8. Their decision is documented with clear reasoning and next steps` + }, + { + id: "mediated-appeal", + title: "Mediator-Facilitated Appeal Process", + componentId: "appeal_process", + fieldId: "appealProcessText", + content: `Appeals are addressed through a mediated process: + +1. A new mediator reviews the appeal request and original case materials +2. If the appeal meets basic criteria, a joint session is scheduled +3. The mediator helps parties discuss concerns about the original process/outcome +4. Rather than judging the original outcome, the focus is on finding a resolution that works now +5. All parties participate in developing modifications to the original agreement +6. This approach treats the appeal as a continuation of problem-solving rather than a judgment +7. The process concludes with either a revised agreement or confirmation of the original one` + } + ], + + delegation: [ + { + id: "external-mediation", + title: "External Mediation Delegation", + componentId: "delegation_options", + fieldId: "delegationOptionsText", + content: `When our internal process isn't suitable, we offer external mediation: + +1. The community maintains relationships with professional mediators +2. Cases may be referred to external mediation when: + - The dispute involves specialized technical knowledge + - Conflicts of interest prevent internal handling + - The dispute involves high emotion or complexity + - Internal resources are insufficient +3. The community covers or subsidizes costs based on financial need +4. Referrals include a warm handoff and case summary +5. External mediators provide basic outcome reports while maintaining confidentiality +6. This option ensures disputes have appropriate resources while maintaining community connection` + }, + { + id: "partnered-resolution", + title: "Inter-Community Resolution Network", + componentId: "delegation_options", + fieldId: "delegationOptionsText", + content: `Our community participates in a partnered resolution network: + +1. A network of communities shares dispute resolution resources and expertise +2. Cases can be delegated to partner communities when: + - Internal processes have been exhausted + - Neutrality concerns prevent effective internal resolution + - The dispute would benefit from an outside perspective +3. Delegation uses a formal referral process with participant consent +4. Partner communities apply their processes while respecting our community values +5. Learning exchanges between communities strengthen all resolution systems +6. This collaborative approach expands resources while building inter-community connections` + } + ], + + intake: [ + { + id: "behavioral-guidelines", + title: "Participant Behavioral Guidelines", + componentId: "participation_commitments", + fieldId: "participationCommitmentsText", + content: `Participants commit to these behavioral guidelines: + +1. Speak respectfully, avoiding personal attacks or blame +2. Listen actively without interruption when others are speaking +3. Focus on understanding before seeking to be understood +4. Maintain confidentiality about sensitive information shared +5. Participate in good faith with genuine effort toward resolution +6. Follow agreed-upon process guidelines and timeframes +7. Take responsibility for your part in the situation +8. These guidelines are reviewed at the beginning of each session` + }, + { + id: "customized-agreements", + title: "Customizable Participant Agreements", + componentId: "participation_commitments", + fieldId: "participationCommitmentsText", + content: `Our process begins with customized participation agreements: + +1. Each dispute process starts with participants developing shared agreements +2. Standard guidelines are presented as a starting point for discussion +3. Participants may add, modify, or clarify guidelines to address specific concerns +4. Special accommodations are incorporated to ensure inclusive participation +5. The final agreement is documented and endorsed by all participants +6. These agreements are revisited if process difficulties arise +7. This approach gives participants ownership of the process parameters +8. It acknowledges that different disputes may require different participation frameworks` + } + ], + + become_aware: [ + { + id: "multiple-channels", + title: "Multiple Dispute Reporting Channels", + componentId: "reporting", + fieldId: "reportingText", + content: `Our community provides multiple channels for reporting concerns: + +1. Direct reporting to designated community liaisons +2. Confidential online submission form +3. Monthly community circle with time for raising issues +4. Anonymous option through secure comment box +5. Buddy system where someone can report on another's behalf +6. Regular community surveys that include space for concerns +7. Specialized channels for sensitive issues (harassment, safety) +8. All channels feed into a consistent intake process` + }, + { + id: "transparent-reporting", + title: "Transparent Dispute Reporting Process", + componentId: "reporting", + fieldId: "reportingText", + content: `Our community uses a transparent reporting process: + +1. Clear documentation of how reports are received and processed +2. Visible timelines for each step of the report handling +3. Regular status updates to those who file reports +4. Published annual summary of types of reports and outcomes +5. Community input into any changes to the reporting system +6. Periodic review of system effectiveness with user feedback +7. This transparency builds trust in the reporting process` + }, + { + id: "early-warning-indicators", + title: "Conflict Early Warning Indicators", + componentId: "monitoring", + fieldId: "monitoringText", + content: `Our community monitors for potential issues using early warning indicators: + +1. Dedicated community members serve as "conflict sensors" +2. They watch for warning signs like: + - Increasing tension in meetings + - Community members avoiding each other + - Shifts in participation patterns + - Recurring topics of disagreement + - Formation of rigid subgroups or factions +3. Observations are sensitively discussed in monthly check-ins +4. The focus is on early support rather than intervention +5. Resources are offered proactively before conflicts escalate +6. This system helps address issues at their earliest stages` + }, + { + id: "community-health-check", + title: "Regular Community Health Check System", + componentId: "monitoring", + fieldId: "monitoringText", + content: `We monitor conflict through regular community health checks: + +1. Quarterly surveys assess relational health indicators +2. Anonymous feedback mechanisms allow sharing of concerns +3. Facilitated community conversations explore emerging tensions +4. Data is tracked over time to identify patterns and trends +5. Results are shared transparently with the whole community +6. Resource allocation for conflict support is based on identified needs +7. This systematic approach treats conflict monitoring as community care` + } + ], + + // Adding appeal module options + appeal: [ + { + id: "appeal-panel-review", + title: "Appeal Panel Review Criteria", + componentId: "criteria", + fieldId: "criteriaText", + content: `Appeals may be initiated under the following specific circumstances: + +1. New significant information has emerged that was not available during the original process +2. There was a procedural error that may have affected the outcome +3. The resolution agreement has proven impossible to implement despite good faith efforts +4. There has been a substantial change in circumstances since the agreement was made +5. Appeals must be submitted within 21 days of discovering the grounds for appeal` + }, + { + id: "tiered-appeal-criteria", + title: "Three-Level Appeal Criteria System", + componentId: "criteria", + fieldId: "criteriaText", + content: `Our appeal process uses tiered criteria that define different levels of review: + +1. Level 1 (Implementation Review): When parties encounter challenges implementing the agreement +2. Level 2 (Procedural Review): When there are concerns about how the process was conducted +3. Level 3 (Substantive Review): When new information emerges that could change the outcome +4. Each level involves different reviewers and follows different procedures +5. Parties must specify which level of review they are requesting and why` + }, + { + id: "collaborative-appeal-process", + title: "Collaborative Group Appeal Process", + componentId: "appeal_deliberation", + fieldId: "appealDeliberationText", + content: `Appeal deliberations use a collaborative approach: + +1. All original participants are involved in reviewing the appeal together +2. A new facilitator guides this process to bring fresh perspective +3. The group first establishes shared goals for the appeal review +4. Concerns are examined one by one with structured dialogue +5. The focus is on finding solutions that address the underlying needs +6. Any modifications to the original agreement require consensus among all parties` + }, + { + id: "independent-panel-deliberation", + title: "Independent Review Panel Deliberation", + componentId: "appeal_deliberation", + fieldId: "appealDeliberationText", + content: `Appeal deliberations are conducted by an independent review panel: + +1. A panel of 3-5 members who were not involved in the original process reviews the appeal +2. The panel first reviews all documentation from the original case +3. Limited new testimony may be provided related specifically to the appeal grounds +4. The panel uses a structured evaluation framework to assess the appeal +5. Deliberations follow a formal process with clear decision-making criteria +6. The panel may uphold, modify, or replace the original resolution` + }, + { + id: "detailed-written-decision", + title: "Detailed Written Appeal Decision", + componentId: "appeal_resolution", + fieldId: "appealResolutionText", + content: `Appeal resolutions are documented in a detailed written decision: + +1. Summary of the original resolution and grounds for appeal +2. Analysis of how each appeal criterion was or was not met +3. Specific reasoning for upholding, modifying, or replacing the original resolution +4. Clear implementation instructions for any changes to the agreement +5. Timeline for putting new elements into effect +6. Statement regarding whether further appeals are possible +7. Signatures from all review panel members` + }, + { + id: "resolution-conference", + title: "Facilitated Resolution Conference", + componentId: "appeal_resolution", + fieldId: "appealResolutionText", + content: `Appeal resolutions are finalized in a resolution conference: + +1. All parties gather for a facilitated conference to review the appeal outcome +2. The review panel presents their findings and recommendations +3. Parties have an opportunity to ask clarifying questions +4. Any modifications to the original agreement are discussed in detail +5. Implementation plans are developed collaboratively +6. The conference concludes with a ceremony acknowledging the completion of the process +7. A summary document is created and distributed afterward` + } + ], + // Adding delegation module options + delegation: [ + { + id: "self-selection-process", + title: "Self-Selection of Facilitators", + componentId: "selection", + fieldId: "selectionText", + content: `Facilitators, mediators and others with specific roles are selected through a self-selection process: + +1. When a dispute process begins, a call for interested facilitators is distributed +2. Interested individuals nominate themselves and provide relevant experience information +3. A brief vetting process ensures basic qualifications are met +4. The pool of qualified volunteers is presented to the disputing parties +5. Parties select their preferred facilitators from this pool through a preference ranking +6. The most mutually agreeable facilitators are chosen` + }, + { + id: "rotation-system", + title: "Fair Rotation System for Roles", + componentId: "selection", + fieldId: "selectionText", + content: `Facilitators and other roles are assigned through a fair rotation system: + +1. The community maintains a roster of trained dispute facilitators +2. Assignments follow a transparent rotation to ensure equal distribution of cases +3. The next 3-5 people in the rotation are notified when a case arises +4. Those with conflicts of interest can decline without losing their place +5. The rotation system is periodically reviewed to ensure it remains fair +6. New facilitators are integrated into the rotation after completing training` + }, + { + id: "comprehensive-training", + title: "Comprehensive Facilitator Training", + componentId: "preparation", + fieldId: "preparationText", + content: `Those taking on specific roles receive comprehensive preparation through our training program: + +1. Initial 20-hour foundational training covering conflict theory and facilitation skills +2. Monthly skill-building workshops focusing on specific techniques +3. Apprenticeship with experienced facilitators for at least three cases +4. Cultural competency training to work with diverse community members +5. Regular peer support groups to share experiences and challenges +6. Annual recertification to ensure skills remain current +7. Access to a resource library of articles, videos and case studies` + }, + { + id: "case-specific-briefing", + title: "Case-Specific Briefing", + componentId: "preparation", + fieldId: "preparationText", + content: `Those taking on specific roles receive preparation focused on the particular case: + +1. A detailed briefing document is prepared summarizing key aspects of the dispute +2. Facilitators review all relevant background materials and community history +3. A pre-process meeting with neutral advisors helps identify potential challenges +4. Specific resources are gathered based on the nature of the dispute +5. If specialized knowledge is needed, relevant experts are identified +6. Facilitators develop a tailored process plan for the specific situation` + } + ], + // Adding modules for remaining components + initiation: [ + { + id: "community-meeting", + title: "Community Meeting", + componentId: "conflict_awareness", + fieldId: "conflictAwarenessText", + content: `Community members become aware of disputes through regular community meetings: + +1. Monthly community meetings include time for raising concerns +2. Anyone can bring up an emerging conflict during the designated time +3. A structured format helps people express concerns constructively +4. The community acknowledges the concern without immediate problem-solving +5. After the meeting, designated community members follow up with those involved` + }, + { + id: "early-warning-system", + title: "Early Warning System", + componentId: "conflict_awareness", + fieldId: "conflictAwarenessText", + content: `Our community uses an early warning system to identify emerging conflicts: + +1. Community members are trained to recognize signs of emerging conflict +2. Anonymous reporting channels are available for sensitive concerns +3. Regular check-ins with community subgroups help identify tension points +4. Data on warning signs is tracked to identify patterns +5. When multiple indicators appear, a response team is activated` + }, + { + id: "peer-navigation", + title: "Peer Navigation", + componentId: "accessing_help", + fieldId: "accessingHelpText", + content: `Community members can access help through a peer navigation system: + +1. Trained peer navigators are available to help people understand their options +2. Navigators maintain a comprehensive knowledge of available resources +3. They help match specific situations to appropriate resolution pathways +4. Navigators provide emotional support but are not counselors or advocates +5. Translation services are available for multilingual communities +6. Regular drop-in hours make navigators easily accessible` + }, + { + id: "central-resource-hub", + title: "Central Resource Hub", + componentId: "accessing_help", + fieldId: "accessingHelpText", + content: `Our community provides a central resource hub for accessing dispute resolution help: + +1. A physical and virtual hub centralizes all dispute-related resources +2. Information is available in multiple languages and formats +3. Self-assessment tools help people identify appropriate pathways +4. The hub maintains up-to-date contact information for all services +5. Staff members are available to answer questions and provide guidance +6. Regular workshops introduce community members to available resources` + } + ], + deliberation: [ + { + id: "consensus-circle", + title: "Consensus Circle", + componentId: "discussion", + fieldId: "discussionText", + content: `Our deliberation process uses a consensus circle approach: + +1. Participants sit in a circle with no physical barriers between them +2. Each person has equal speaking time using a talking piece +3. Multiple rounds allow for deepening the conversation +4. First round: each person speaks to the issue without interruption +5. Second round: reactions to what was heard and clarifying questions +6. Third round: exploring possibilities for resolution +7. Final round: testing consensus on proposed solutions` + }, + { + id: "structured-dialogue", + title: "Structured Dialogue", + componentId: "discussion", + fieldId: "discussionText", + content: `Discussions use a structured dialogue format: + +1. Clear agenda with timeframes for each discussion stage +2. Opening statements from each key participant (limited to 5 minutes) +3. Facilitated questioning period with balanced participation +4. Identification of key issues through collaborative mind-mapping +5. Small group breakouts to explore specific aspects of the situation +6. Reconvening to share insights and build toward solutions +7. Documentation of major discussion points and areas of agreement` + }, + { + id: "interest-based", + title: "Interest-Based Exploration", + componentId: "finding_solutions", + fieldId: "findingSolutionsText", + content: `We find solutions through an interest-based problem-solving approach: + +1. Identify interests (needs, desires, concerns) behind each party's position +2. Separate inventing options from deciding on solutions +3. Generate multiple options without immediate evaluation +4. Use objective criteria to evaluate options +5. Look for solutions that satisfy mutual interests +6. Consider bundling multiple issues to create value +7. Develop BATNA (Best Alternative to Negotiated Agreement) awareness` + }, + { + id: "transformative-approach", + title: "Transformative Approach", + componentId: "finding_solutions", + fieldId: "findingSolutionsText", + content: `Solutions are developed using a transformative approach: + +1. Focus on transformation rather than just resolution +2. Support parties in developing empowerment and recognition +3. Explore how the conflict reveals deeper systemic issues +4. Consider solutions that address both immediate and root causes +5. Include plans for healing relationships and community bonds +6. Build in opportunities for ongoing learning and growth +7. Acknowledge both individual and collective responsibility` + } + ], + become_aware: [ + { + id: "conflict-coaching", + title: "Conflict Coaching", + componentId: "reflection", + fieldId: "reflectionText", + content: `Parties reflect on the dispute through one-on-one conflict coaching: + +1. Trained conflict coaches help individuals explore their experience +2. Structured reflection identifies underlying interests and needs +3. Emotional aspects of the conflict are acknowledged and processed +4. Coaches help identify patterns of conflict and personal triggers +5. Reflection focuses on both the specific situation and broader patterns +6. The process helps clarify what resolution might look like for each person` + }, + { + id: "guided-journaling", + title: "Guided Journaling", + componentId: "reflection", + fieldId: "reflectionText", + content: `Our reflection process includes guided journaling: + +1. Participants receive a structured journaling guide with prompts +2. Questions help explore different perspectives on the situation +3. Journaling occurs before any joint meetings +4. The process includes prompts about emotions, needs, and hopes +5. Participants are encouraged to identify what they can take responsibility for +6. Journals remain private but insights can be shared if desired` + }, + { + id: "premediation-consultation", + title: "Pre-mediation Consultation", + componentId: "direct_conversation", + fieldId: "directConversationText", + content: `Before formal processes begin, parties are encouraged to have a direct conversation: + +1. A neutral third party helps prepare each person for the conversation +2. Guidelines for constructive communication are established +3. The conversation has a clear timeframe and simple agenda +4. Each person has uninterrupted time to share their perspective +5. The focus is on understanding rather than problem-solving +6. Parties can request the presence of a facilitator if needed +7. The conversation is confidential and separate from formal processes` + }, + { + id: "shuttle-dialogue", + title: "Shuttle Dialogue", + componentId: "direct_conversation", + fieldId: "directConversationText", + content: `When direct conversation is challenging, we use a shuttle dialogue approach: + +1. A mediator moves between parties who are in separate spaces +2. Each person shares their perspective with the mediator +3. The mediator relays information, questions, and possible areas of agreement +4. This approach allows for exchange of views when direct conversation is difficult +5. Parties can gradually move toward direct conversation as trust builds +6. The mediator helps identify misunderstandings and clarify information` + } + ], + preparation: [ + { + id: "foundational-values", + title: "Foundational Values", + componentId: "principles", + fieldId: "principlesText", + content: `Our dispute resolution process is guided by these foundational values: + +1. Mutual respect for each person's dignity and perspective +2. Personal accountability for one's actions and their impact +3. Collaboration in finding solutions that work for everyone +4. Transparency in how the process works and decisions are made +5. Compassion for the challenges and suffering of all involved +6. Fairness in ensuring equal voice and consideration` + }, + { + id: "ecosystem-approach", + title: "Ecosystem Approach", + componentId: "principles", + fieldId: "principlesText", + content: `We approach conflict as an ecosystem with these guiding principles: + +1. Interconnection - recognizing how all parts of a conflict affect each other +2. Balance - seeking harmony between different needs and interests +3. Adaptability - remaining flexible as situations evolve +4. Diversity - valuing different perspectives as sources of wisdom +5. Resilience - building capacity to recover from difficulties +6. Sustainability - creating solutions that support long-term well-being` + } + ], + // Adding modules for missing components + dispute_assessment: [ + { + id: "structured-diagnostic", + title: "Structured Diagnostic Assessment", + componentId: "dispute_assessment", + fieldId: "disputeAssessmentText", + content: `The dispute assessment is conducted through a structured diagnostic process: + +1. Each party completes a standardized assessment form +2. The form documents key issues, attempted solutions, and desired outcomes +3. A trained assessor reviews the forms and identifies patterns +4. The assessor may conduct follow-up interviews to clarify information +5. A summary report is created that maps the dispute's key dimensions +6. This report is shared with all parties and used to guide process selection` + }, + { + id: "facilitated-joint-assessment", + title: "Facilitated Joint Assessment", + componentId: "dispute_assessment", + fieldId: "disputeAssessmentText", + content: `Disputes are assessed through a facilitated joint session: + +1. All parties meet with a trained facilitator in a structured setting +2. The facilitator guides a conversation using a conflict mapping framework +3. Key issues, interests, and potential barriers to resolution are identified +4. The group develops a shared understanding of the dispute's dimensions +5. This assessment focuses on understanding rather than solution-finding +6. The session concludes with agreement on next steps in the process` + }, + { + id: "triage-assessment", + title: "Dispute Triage Assessment", + componentId: "dispute_assessment", + fieldId: "disputeAssessmentText", + content: `Our community uses a triage approach to assess disputes: + +1. Initial screening determines urgency and appropriate response level +2. Level 1: Simple disputes amenable to direct facilitation +3. Level 2: Complex disputes requiring structured mediation +4. Level 3: High-conflict situations needing specialized intervention +5. The triage assessment considers factors such as: + - Safety concerns + - Power imbalances + - Number of parties involved + - History of the conflict + - Complexity of issues +6. This approach ensures resources are matched to dispute needs` + } + ], + + values_adherence: [ + { + id: "values-checkpoints", + title: "Values Checkpoints Review", + componentId: "values_adherence", + fieldId: "valuesAdherenceText", + content: `Community values are integrated throughout the process through regular checkpoints: + +1. At the beginning of each session, key values are reviewed and affirmed +2. Participants can call a "values check" if they feel the process is diverging from values +3. The facilitator periodically pauses to reflect on how well values are being honored +4. At the conclusion of each phase, participants evaluate values alignment +5. A designated "values guardian" observers sessions and offers feedback +6. This ongoing attention ensures values remain central rather than peripheral` + }, + { + id: "values-reflection", + title: "Collaborative Values Reflection", + componentId: "values_adherence", + fieldId: "valuesAdherenceText", + content: `Community values are upheld through collaborative reflection: + +1. All participants receive a values guide that explains each core value and how it applies +2. After each session, participants complete a brief values reflection +3. These reflections are shared at the beginning of the next session +4. If values concerns arise, the group pauses to address them directly +5. The process continues only when there is agreement that values are being honored +6. This approach distributes responsibility for values adherence to all participants` + } + ], + + jurisdiction: [ + { + id: "eligibility-criteria", + title: "Clear Eligibility Criteria", + componentId: "jurisdiction", + fieldId: "jurisdictionText", + content: `We determine jurisdiction through clear eligibility criteria: + +1. The dispute must involve at least one community member +2. The issues must relate to community activities or relationships +3. The dispute must not be currently in litigation or formal external processes +4. All parties must be willing to participate voluntarily +5. The issues must be within the scope of what the process can address +6. A dedicated intake coordinator reviews each case against these criteria +7. Borderline cases are reviewed by a small panel for final determination` + }, + { + id: "tiered-jurisdiction", + title: "Tiered Jurisdiction System", + componentId: "jurisdiction", + fieldId: "jurisdictionText", + content: `Our community uses a tiered jurisdiction system: + +1. Core Jurisdiction: Disputes between community members about community matters +2. Extended Jurisdiction: Disputes involving community members and non-members +3. Advisory Jurisdiction: Situations where the community process can provide guidance but not resolution +4. Excluded Matters: Issues that must be handled through other channels (legal, etc.) +5. Each tier has specific procedural requirements and limitations +6. The intake committee determines which tier applies to each situation +7. This approach provides clarity while maintaining flexibility` + } + ], + + non_participation: [ + { + id: "alternative-pathways", + title: "Alternative Resolution Pathways", + componentId: "non_participation", + fieldId: "nonParticipationText", + content: `When someone chooses not to participate, we offer alternative pathways: + +1. If one party declines to participate, the initiating party is offered support options: + - Individual conflict coaching + - Support circles with other community members + - Guidance on addressing the situation independently +2. The declining party receives information about future opportunities to engage +3. No negative consequences are imposed for non-participation +4. The door remains open for future engagement when circumstances change +5. Community education focuses on the benefits of participation +6. This approach honors choice while still providing support` + }, + { + id: "graduated-engagement", + title: "Graduated Engagement Approach", + componentId: "non_participation", + fieldId: "nonParticipationText", + content: `When someone is reluctant to participate, we use a graduated engagement approach: + +1. Initial invitation comes from a trusted community member rather than the process +2. Participation options begin with minimal commitment (30-minute conversation) +3. Concerns about the process are addressed directly and accommodations offered +4. Reluctant parties can bring support persons to initial meetings +5. Alternative formats are available (written exchange, representatives, etc.) +6. If participation is still declined after these efforts, the process adapts to work with willing parties +7. This approach recognizes that engagement barriers vary and require different responses` + } + ], + + process_change: [ + { + id: "adaptive-process", + title: "Adaptive Process Framework", + componentId: "process_change", + fieldId: "processChangeText", + content: `Our dispute resolution process can be adapted when necessary: + +1. Any participant can request a process adjustment at any point +2. The facilitator regularly checks if the current approach is working +3. If changes are needed, options are discussed with all participants +4. Criteria for evaluating process effectiveness include: + - Is everyone able to participate meaningfully? + - Are discussions productive and moving forward? + - Do participants feel safe and respected? +5. Alternative formats are available and can be implemented quickly +6. Documentation tracks process adjustments for organizational learning` + }, + { + id: "meta-mediation", + title: "Meta-Mediation Approach", + componentId: "process_change", + fieldId: "processChangeText", + content: `When the process itself becomes a source of conflict, we use meta-mediation: + +1. If concerns arise about the process, a pause is called +2. A different facilitator conducts a brief meta-mediation about the process +3. All participants share their experiences of what is and isn't working +4. Process adaptations are negotiated using the same principles as content issues +5. Once agreement is reached, the primary process resumes with adjustments +6. This approach acknowledges that the "how" is as important as the "what" +7. It models collaborative problem-solving even at the meta level` + } + ], + + // Adding modules for prepare component + prepare: [ + { + id: "core-community-values", + title: "Core Community Values", + componentId: "values", + fieldId: "valuesText", + content: `Our community's approach to conflict is guided by these core values: + +1. Honesty - speaking truthfully and acting with integrity +2. Empathy - seeking to understand others' experiences and feelings +3. Courage - addressing conflict directly rather than avoiding it +4. Patience - giving the process time to unfold authentically +5. Growth - viewing conflict as an opportunity for learning +6. Community - recognizing our interdependence and shared well-being` + }, + { + id: "relational-values", + title: "Relational Values", + componentId: "values", + fieldId: "valuesText", + content: `We prioritize these relationship-centered values in our conflict approach: + +1. Trust - building and maintaining confidence in each other and the process +2. Care - showing genuine concern for everyone's wellbeing +3. Dignity - honoring the inherent worth of each person +4. Connection - strengthening relationships even through difficult conversations +5. Curiosity - approaching differences with genuine interest rather than judgment +6. Repair - restoring relationships damaged by conflict` + }, + { + id: "community-commitments", + title: "Community Commitments", + componentId: "agreements", + fieldId: "agreementsText", + content: `Community members make these commitments regarding conflict: + +1. Address conflicts directly with the person involved before bringing in others +2. Use "I" statements and specific examples rather than generalizations +3. Focus on understanding before problem-solving +4. Maintain confidentiality about sensitive aspects of conflicts +5. Participate in good faith in resolution processes when requested +6. Respect the different ways people experience and express emotions +7. Follow through on agreements made during resolution processes` + }, + { + id: "conflict-protocol", + title: "Conflict Protocol", + componentId: "agreements", + fieldId: "agreementsText", + content: `Our community agrees to follow this conflict protocol: + +1. Cool-down period: Take 24-48 hours before addressing heated conflicts +2. Direct communication: Attempt one-on-one conversation as the first step +3. Support option: Either party can request a neutral support person +4. Escalation path: If direct communication doesn't resolve the issue, request mediation +5. Timeliness: Address conflicts within two weeks of becoming aware of them +6. Documentation: Keep brief, factual notes about steps taken toward resolution +7. Review: Periodically check in on how well agreements are working` + }, + { + id: "communication-skills", + title: "Communication Skills", + componentId: "skills", + fieldId: "skillsText", + content: `Community members develop these key communication skills: + +1. Active listening: focusing fully on understanding the speaker +2. Reflecting back: summarizing what was heard to confirm understanding +3. "I" statements: expressing feelings/needs without blame ("I feel... when...") +4. Separating observation from interpretation: distinguishing facts from assumptions +5. Asking open questions: inviting elaboration rather than yes/no answers +6. Managing emotional triggers: recognizing and regulating strong reactions +7. Giving and receiving feedback constructively` + }, + { + id: "conflict-literacy", + title: "Conflict Literacy", + componentId: "skills", + fieldId: "skillsText", + content: `Our community cultivates these conflict literacy skills: + +1. Conflict analysis: identifying underlying causes, triggers, and dynamics +2. Perspective-taking: mentally stepping into others' positions +3. Needs identification: recognizing core needs beneath positions +4. Boundary-setting: communicating limits clearly and respectfully +5. De-escalation: calming tense situations through tone and wording +6. Cultural bridging: navigating different communication styles and norms +7. Creative problem-solving: generating multiple options before deciding` + } + ] +}; + +// Make sure moduleData is available globally +window.moduleData = moduleData; \ No newline at end of file diff --git a/static/js/data/template-mapper.js b/static/js/data/template-mapper.js new file mode 100644 index 0000000..9a7a6c8 --- /dev/null +++ b/static/js/data/template-mapper.js @@ -0,0 +1,274 @@ +// This file handles mapping raw template content to module IDs +// It's used to convert templates that use raw content to use module references instead + +// Helper function to find the best matching module for a given content +function findBestMatchingModule(content, componentId, fieldId, modules) { + // If content is empty, return null + if (!content || !content.trim()) { + return null; + } + + // Check if there are modules for this component and field + let matchingModules = []; + + for (const category in modules) { + const categoryModules = modules[category].filter(m => + m.componentId === componentId && m.fieldId === fieldId + ); + + if (categoryModules.length > 0) { + matchingModules = matchingModules.concat(categoryModules); + } + } + + if (matchingModules.length === 0) { + return null; + } + + // Find the most similar module based on content + let bestMatch = null; + let highestSimilarity = 0; + + matchingModules.forEach(module => { + // Simple similarity metric: count of matching words + const contentWords = content.toLowerCase().split(/\s+/); + const moduleWords = module.content.toLowerCase().split(/\s+/); + + // Count matching words + let matchCount = 0; + contentWords.forEach(word => { + if (moduleWords.includes(word)) { + matchCount++; + } + }); + + // Calculate similarity as percentage of matching words + const similarity = matchCount / Math.max(contentWords.length, moduleWords.length); + + if (similarity > highestSimilarity) { + highestSimilarity = similarity; + bestMatch = module; + } + }); + + // Only return a match if similarity is above threshold + return highestSimilarity > 0.5 ? bestMatch : null; +} + +// Convert a raw template to use module references +function convertTemplateToModules(template, modules) { + const result = { + id: template.id, + title: template.title, + description: template.description, + moduleRefs: {} + }; + + // Go through each stage, component, and field + for (const stageId in template.data.stages) { + if (!result.moduleRefs[stageId]) { + result.moduleRefs[stageId] = {}; + } + + for (const componentId in template.data.stages[stageId]) { + if (!result.moduleRefs[stageId][componentId]) { + result.moduleRefs[stageId][componentId] = {}; + } + + for (const fieldId in template.data.stages[stageId][componentId]) { + const content = template.data.stages[stageId][componentId][fieldId]; + + // Find best matching module + const matchingModule = findBestMatchingModule(content, componentId, fieldId, modules); + + if (matchingModule) { + // Store module reference + result.moduleRefs[stageId][componentId][fieldId] = matchingModule.id; + } else { + // If no matching module, create a custom one with this content + const customId = `custom-${template.id}-${componentId}-${fieldId}`; + + // Add to appropriate module category or create a new one + const categoryKey = stageId; // Use stage ID as category + + if (!modules[categoryKey]) { + modules[categoryKey] = []; + } + + // Check if custom module already exists + const existingModule = modules[categoryKey].find(m => + m.id === customId && m.componentId === componentId && m.fieldId === fieldId + ); + + if (!existingModule) { + // Create a concise but descriptive module title + let moduleTitle = ""; + + // Helper function to create more meaningful component-based titles + function getComponentBasedTitle() { + // Get a human-readable form of the component and field IDs + const componentName = componentId.split('_') + .map(word => word.charAt(0).toUpperCase() + word.slice(1)) + .join(' '); + const fieldName = fieldId.replace(/([A-Z])/g, ' $1') + .replace(/Text$/, '') + .replace(/Id$/, '') + .split(/[_\s]/) + .map(word => word.charAt(0).toUpperCase() + word.slice(1)) + .join(' ') + .trim(); + + // Find core theme from content + const lines = content.split('\n').map(l => l.trim()).filter(l => l); + + // Try to find a descriptive keyword from the first paragraph + const firstPara = lines[0]; + const keywords = firstPara.match(/\b(restorative|collaborative|consensus|transformative|community|circle|mediation|third-party|written|verbal|facilitated|direct|multi-channel|needs|impact|harm|assessment|visual|phased|panel|independent|detailed|criteria|values|commitments|skills)\b/gi) || []; + + if (keywords.length > 0) { + const keywordTitle = keywords[0].charAt(0).toUpperCase() + keywords[0].slice(1).toLowerCase(); + return `${keywordTitle} ${fieldName || componentName}`; + } + + // Check for approach/model/process keywords + const approachMatch = content.match(/\b(approach|model|process|method|system|framework|practice)\b/i); + if (approachMatch) { + // Get adjectives before the approach word + const contentBefore = content.substring(0, approachMatch.index).trim(); + const lastWords = contentBefore.split(/\s+/).slice(-2); + if (lastWords.length > 0 && lastWords[0].length > 3) { + const adjective = lastWords.join(' '); + return `${adjective.charAt(0).toUpperCase() + adjective.slice(1)} ${approachMatch[0]}`; + } + } + + return `${componentName} ${fieldName}`.trim(); + } + + // Analyze content structure + const firstSentence = content.split(/[.!?:]\s+/)[0].trim().replace(/^[^a-zA-Z0-9]*/, ''); + const lines = content.split('\n').map(l => l.trim()).filter(l => l); + const hasNumberedList = lines.some(line => line.match(/^[0-9]\.\s+/)); + + // Strategy 1: Look for purpose statements (often after "Our", "The", etc.) + const purposeMatch = content.match(/\b(Our|The|This|A)\s+([^.!?:]+)(is|uses|follows|provides|ensures|helps)\s+/i); + if (purposeMatch) { + const purpose = purposeMatch[2].trim(); + if (purpose.length > 5 && purpose.length < 40) { + moduleTitle = purpose.charAt(0).toUpperCase() + purpose.slice(1); + } + } + + // Strategy 2: Check for clear format identifiers in first line + if (!moduleTitle && lines.length > 0) { + const firstLine = lines[0]; + if (firstLine.includes('approach') || + firstLine.includes('model') || + firstLine.includes('process') || + firstLine.includes('system')) { + moduleTitle = firstLine; + } + } + + // Strategy 3: Title with colon format + if (!moduleTitle && firstSentence.includes(':')) { + const beforeColon = firstSentence.split(':')[0].trim(); + if (beforeColon.length > 5 && beforeColon.length < 40) { + moduleTitle = beforeColon.replace(/^(The|Our|This)\s+/i, ''); + } + } + + // Strategy 4: Numbered list with key concept + if (!moduleTitle && hasNumberedList) { + // Get the first numbered point - often a good summary + for (let i = 0; i < lines.length && i < 5; i++) { + const line = lines[i]; + if (line.match(/^[0-9]\.\s+/)) { + let pointText = line.replace(/^[0-9]\.\s+/, ''); + + // Extract core concept (first 3-5 words) + const words = pointText.split(/\s+/); + if (words.length > 2) { + pointText = words.slice(0, Math.min(5, words.length)).join(' '); + } + + if (pointText.length > 5 && pointText.length < 40) { + moduleTitle = pointText; + break; + } + } + } + } + + // Strategy 5: Extract key theme based on field purpose + if (!moduleTitle) { + // Use component and field context to generate meaningful title + moduleTitle = getComponentBasedTitle(); + } + + // Cleanup and formatting + // Remove stopwords from beginning + moduleTitle = moduleTitle.replace(/^(The|Our|This|An|A)\s+/i, ''); + + // Capitalize first letter + moduleTitle = moduleTitle.charAt(0).toUpperCase() + moduleTitle.slice(1); + + // Ensure reasonable length + if (moduleTitle.length > 40) { + const words = moduleTitle.split(/\s+/); + moduleTitle = words.slice(0, 4).join(' '); + } + + // Remove any duplicate words + const words = moduleTitle.split(/\s+/); + const uniqueWords = []; + for (const word of words) { + if (!uniqueWords.includes(word)) { + uniqueWords.push(word); + } + } + moduleTitle = uniqueWords.join(' '); + + // If all else fails, create a descriptive title based on component and content + if (moduleTitle.length < 5) { + const componentKey = componentId.split('_')[0]; + const componentName = componentKey.charAt(0).toUpperCase() + componentKey.slice(1); + + // Find a distinctive word from content + const contentWords = content.split(/\s+/) + .filter(word => + word.length > 4 && + !['process', 'option', 'through', 'their', 'these', 'those', 'about', 'which', 'would', 'could', 'should'].includes(word.toLowerCase()) + ); + + const distinctiveWord = contentWords[0] || 'Standard'; + moduleTitle = distinctiveWord.charAt(0).toUpperCase() + distinctiveWord.slice(1) + " " + componentName; + } + + // Create new custom module with concise title + modules[categoryKey].push({ + id: customId, + title: moduleTitle, + componentId: componentId, + fieldId: fieldId, + content: content + }); + } + + result.moduleRefs[stageId][componentId][fieldId] = customId; + } + } + } + } + + return result; +} + +// Export the mapper functions +const templateMapper = { + findBestMatchingModule, + convertTemplateToModules +}; + +// Make sure it's available globally +window.templateMapper = templateMapper; \ No newline at end of file diff --git a/static/js/data/templates.js b/static/js/data/templates.js new file mode 100644 index 0000000..20ac831 --- /dev/null +++ b/static/js/data/templates.js @@ -0,0 +1,905 @@ +// Protocol templates +// This file contains the raw template data +// The builder.js code will convert these to use module references + +const rawProtocolTemplates = [ + { + id: "restorative-justice", + title: "Restorative Justice", + description: "A collaborative process that focuses on healing relationships and repairing harm rather than punitive measures", + data: { + stages: { + intake: { + process_start: { + processStartText: "The restorative justice process begins when anyone in the community submits a request form indicating harm that needs to be addressed. This form asks for a brief description of what happened, who was involved, and what the person hopes might come from the process. A restorative justice coordinator acknowledges receipt within 24 hours and begins initial conversations with the person who submitted the request." + }, + rules_access: { + rulesAccessText: "Our community principles and restorative process guidelines are publicly available in multiple formats: a printed handbook in common spaces, an accessible online document, and visual displays in community gathering areas. New members receive an orientation to these principles when they join the community." + }, + information_access: { + informationAccessText: "Information about specific restorative processes is shared only with those directly involved. Statistical information about types of harm addressed (without identifying details) is shared annually to help the community learn and grow. The circle keeper maintains confidential records that are accessible only to them and the participants in each case." + }, + participant_inclusion: { + participantInclusionText: "Other participants are brought into the process through thoughtful invitation rather than formal notification. The restorative coordinator reaches out personally to each identified participant, explains the process, answers questions, and extends an invitation to participate. They emphasize that the goal is healing rather than blame." + }, + participation_requirement: { + participationRequirementText: "Participation in restorative justice processes is entirely voluntary. We believe that genuine healing and transformation can only come from willing engagement. If someone chooses not to participate, we respect that decision and explore other paths forward with the person who initiated the request." + }, + participation_commitments: { + participationCommitmentsText: "Participants in restorative processes commit to: 1) Speaking honestly from their own experience, 2) Listening deeply to others without interruption, 3) Maintaining confidentiality about what is shared, 4) Working toward understanding before solutions, 5) Following through on agreements they make, and 6) Engaging with respect and care for themselves and others throughout the process." + } + }, + process: { + preparation: { + preparationText: "Before any circle gathering, the circle keeper meets individually with each participant to build relationship, explain the process in detail, answer questions, address concerns, and help the person prepare what they might want to share. These preparation meetings help establish trust and safety for the full circle process." + }, + place: { + placeText: "Restorative circles take place in a neutral, comfortable space with natural light and privacy. Chairs are arranged in a perfect circle with no tables or barriers. A centerpiece with meaningful objects (plants, stones, candles, etc.) creates a focal point. The space is prepared thoughtfully to create a sense of safety and importance." + }, + facilitation: { + facilitationText: "The dispute process uses a restorative circle approach:\n\n1. A trained circle keeper facilitates but does not control the process\n2. All participants sit in a circle with no tables or barriers between them\n3. A talking piece is passed around the circle to ensure each person can speak without interruption\n4. Multiple rounds allow for deepening the conversation and moving toward resolution\n5. The circle process follows indigenous wisdom traditions adapted for contemporary contexts\n6. The circle keeper prepares participants individually before the full circle gathering" + }, + communication: { + communicationText: "Communication in restorative circles follows these guidelines: 1) Speak from the heart about your own experience, 2) Listen from the heart without planning your response, 3) Speak with respect and without blame, 4) Share what's true for you in the moment, 5) Be mindful of time so everyone can share, 6) Honor the talking piece - only the person holding it may speak, 7) Respect the confidentiality of what is shared." + }, + participation: { + participationText: "A restorative circle typically includes: 1) The person who experienced harm, 2) The person who caused harm, 3) Community members or loved ones who support each primary participant, 4) Community members affected by the situation, and 5) The circle keeper. Everyone participates as an equal in the circle, though the needs of those most affected guide the process." + }, + documentation: { + documentationText: "The circle keeper takes minimal notes during the process to maintain presence. The agreements reached are documented clearly in a format agreed upon by all participants. These written agreements are shared only with participants and include specific actions, timelines, and follow-up plans." + } + }, + assessment: { + situation: { + situationText: "The situation is assessed through a harm and needs framework:\n\n1. Each participant describes what happened from their perspective\n2. Participants identify how they have been affected or harmed\n3. Underlying needs that weren't met are identified\n4. The impact on relationships and the wider community is explored\n5. The assessment focuses on understanding rather than blame\n6. This approach creates a foundation for addressing specific harms" + }, + stage_of_conflict: { + stageOfConflictText: "The circle keeper assesses the readiness of all parties for a restorative process. They consider: 1) Whether those who caused harm acknowledge their responsibility, 2) The emotional state and safety needs of those who experienced harm, 3) The willingness of all parties to work toward repair, and 4) Any power dynamics that might affect the process. This assessment helps determine timing and structure." + }, + needs: { + needsText: "During preparation and circle meetings, participants identify their underlying needs related to the situation. These might include needs for safety, acknowledgment, understanding, accountability, belonging, repair, or healing. The circle process helps surface these needs and explore how they might be met through the restorative process." + }, + evidence: { + evidenceText: "Restorative processes focus more on impact and experience than evidence in a traditional sense. Participants share their direct experiences and how they were affected. When factual disagreements arise, the circle keeper helps the group find shared understanding without determining absolute truth. The focus remains on healing rather than proof." + }, + jurisdiction: { + jurisdictionText: "Our restorative justice process is appropriate for most interpersonal harms and conflicts within our community. For situations involving ongoing safety risks, legal violations that require reporting, or when participants are unwilling to acknowledge basic responsibility for harm, the process may be adapted or alternative resources recommended." + } + }, + deliberation: { + information_gathering: { + informationGatheringText: "Information emerges organically through circle sharing. The process begins with establishing relationships and context before directly addressing the harm. Multiple rounds of the talking piece allow deeper layers of the situation to surface. As understanding develops, the circle considers what needs to happen to make things right." + }, + brainstorming: { + brainstormingText: "Once the impact of the situation is well understood, the circle moves into generating ideas for repair and moving forward. Everyone contributes possibilities without immediate evaluation. The keeper encourages creative thinking that addresses the specific harms and needs identified earlier in the process." + }, + discussion: { + discussionText: "The circle discusses potential solutions through a structured process: 1) Each idea is considered in terms of how it addresses identified harms and needs, 2) Those most affected by the situation speak to what would help them move forward, 3) The group refines ideas based on what's practical and meaningful, 4) The keeper helps the group move toward consensus on actions for repair and healing." + }, + deliberation_format: { + deliberationFormatText: "Deliberation happens within the circle format, guided by a series of thoughtful questions from the keeper. The talking piece continues to structure the conversation. The process may include multiple circle sessions with time for reflection between meetings. Deliberation concludes when the group reaches shared agreements about how to move forward." + } + }, + resolution: { + decision_making: { + decisionMakingText: "Decisions in restorative processes are made by consensus of all participants. The circle keeper helps test potential agreements to ensure everyone can support them. If perfect agreement isn't possible, the keeper helps craft a solution that addresses core needs while respecting individual boundaries about what people are willing to do." + }, + outcomes: { + outcomesText: "Restorative outcomes typically include: 1) Acknowledgment of the harm that occurred, 2) Specific actions to repair damage or address impacts, 3) Commitments to changed behavior in the future, 4) Healing rituals or symbolic acts, 5) Plans for rebuilding trust and relationships over time, and 6) Community support mechanisms to help implement agreements." + }, + agreement: { + agreementText: "All resolutions result in a collaborative responsibility plan:\n\n1. The plan details specific actions to repair harm\n2. Each participant has clear responsibilities for making things right\n3. The plan includes timeline commitments for implementation\n4. Support mechanisms are built in to help participants fulfill their commitments\n5. The plan may include ongoing relationship-building activities\n6. All participants sign the agreement and receive a copy\n7. The agreement focuses on healing and moving forward rather than punishment" + }, + follow_up: { + followUpText: "The circle keeper schedules a follow-up circle 3-4 weeks after agreements are made to check on progress, celebrate steps taken, and address any challenges. Additional follow-up may happen at 3 months and 6 months depending on the situation. These follow-ups provide accountability and ongoing support for the healing process." + }, + announcement: { + announcementText: "The outcomes of restorative processes remain confidential to the participants unless they specifically agree to share information with the broader community. When information is shared, it focuses on lessons learned and community needs rather than personal details." + } + }, + appeal: { + criteria: { + criteriaText: "Restorative processes can be reopened if: 1) Agreements aren't being fulfilled despite good faith efforts, 2) New information emerges that significantly changes understanding of the situation, 3) Additional harms occur related to the original situation, or 4) The process was completed but healing remains incomplete." + }, + appeal_process: { + appealProcessText: "To revisit a completed process, any participant can contact the circle keeper to request a follow-up circle. The keeper reaches out to all original participants to check willingness to reconvene. If everyone agrees, a new circle is scheduled focusing specifically on the issues that need further attention." + }, + appeal_deliberation: { + appealDeliberationText: "The reconvened circle follows the same structured format as the original process but with focused attention on the specific concerns that led to reopening the case. The circle acknowledges progress already made while addressing outstanding issues or new insights." + }, + appeal_resolution: { + appealResolutionText: "The follow-up circle develops revised or additional agreements addressing the newly identified needs. These amendments are added to the original agreement with clear timelines for implementation and additional follow-up as needed." + } + }, + delegation: { + criteria: { + criteriaText: "The restorative process may be inappropriate when: 1) There are immediate safety concerns that need addressing first, 2) One or more key participants are unwilling to engage, 3) The harm involves legal violations requiring formal intervention, 4) The situation involves complex systems beyond interpersonal harm, or 5) Previous restorative attempts have not led to meaningful change." + }, + delegation_process: { + delegationProcessText: "If restorative justice isn't the right fit, the circle keeper works with participants to identify more appropriate resources. They provide warm referrals to other services like mediation, therapy, organizational change processes, or when necessary, formal authorities. The transition includes clear communication about why delegation is recommended." + }, + delegation_authority: { + delegationAuthorityText: "Our community maintains relationships with professional mediators, conflict coaches, mental health providers, social workers, and when needed, legal professionals. We have established referral protocols with each of these resources and provide financial assistance when cost would be a barrier to accessing needed support." + } + } + } + } + }, + { + id: "transformative-justice", + title: "Transformative Justice", + description: "A process that addresses immediate harm while working to transform the conditions that allowed harm to occur", + data: { + stages: { + intake: { + process_start: { + processStartText: "The transformative justice process begins when a community member reaches out to the transformative justice collective with a concern about harm. This initial contact can be through a secure online form, a phone line, or direct conversation with a collective member. Within 48 hours, two collective members are assigned to do an initial assessment and begin conversations with the person who raised the concern." + }, + rules_access: { + rulesAccessText: "Our community agreements, values, and transformative justice framework are documented in accessible formats including a community handbook (print and digital), visual materials, audio resources, and multilingual versions. These resources clearly distinguish between aspirational values and concrete practices. All members participate in regular workshops to review and update these materials." + }, + information_access: { + informationAccessText: "Information is shared based on a consent-based model. Those directly involved determine what information is shared beyond the immediate process. The transformative justice collective maintains secure records that include agreements made and lessons learned, but not sensitive personal details. Pattern-level information about types of harm addressed informs community education while protecting confidentiality." + }, + participant_inclusion: { + participantInclusionText: "People are brought into the process through intentional outreach by the facilitators, who explain the transformative approach and how it differs from punitive models. Key stakeholders include those directly harmed, those who caused harm, support people for both parties, and community members affected by or contributing to the situation. Each person receives individual preparation before group sessions." + }, + participation_requirement: { + participationRequirementText: "Participation is voluntary but strongly encouraged as part of our community commitments. We recognize that meaningful accountability cannot be forced. However, if someone chooses not to participate directly, the process may continue with those who are willing, focusing on community support for those harmed and addressing systemic factors that contributed to the harm." + }, + participation_commitments: { + participationCommitmentsText: "Participants commit to: 1) Engaging honestly in examining harm and its impacts, 2) Considering both individual and collective dimensions of accountability, 3) Respecting confidentiality boundaries established by the group, 4) Working to understand systemic factors beyond individual actions, 5) Contributing to implementation of agreements, and 6) Participating in follow-up and ongoing learning." + } + }, + prepare: { + principles: { + principlesText: "Our dispute resolution process is guided by these transformative justice principles:\n\n1. Address immediate harm between individuals\n2. Connect individual instances of harm to broader social patterns\n3. Transform the conditions that allowed harm to occur\n4. Build community accountability systems without relying on punitive measures\n5. Center the needs of those most impacted while inviting those who caused harm into accountability\n6. Develop collective strategies for healing, resilience, and safety\n7. Work toward long-term cultural and structural change" + }, + values: { + valuesText: "Our transformative justice work is rooted in these core values: 1) Liberation - working toward freedom from all forms of oppression, 2) Accountability without punishment, 3) Collective responsibility for community well-being, 4) Radical honesty about impacts and conditions, 5) Compassion for all involved, including those who have caused harm, 6) Faith in people's capacity to transform, 7) Commitment to sustainable, long-term change." + }, + agreements: { + agreementsText: "Participants in the transformative justice process agree to: 1) Approach the process with a willingness to examine personal and collective relationships to systems of power, 2) Listen to understand rather than defend, 3) Be open to feedback about impact regardless of intent, 4) Recognize that transformative work takes time and commitment, 5) Balance accountability with care for self and others." + } + }, + process: { + preparation: { + preparationText: "Preparation includes multiple one-on-one conversations with each participant before any group sessions. During these meetings, facilitators build relationship, explain the process, address concerns, provide educational resources about transformative justice, and help participants identify their needs and capacities. Support people are oriented to their role in the process." + }, + place: { + placeText: "Meetings take place in spaces that feel safe, accessible, and comfortable for all participants. The environment is checked for potential triggers or barriers. Sessions may move between private and community spaces depending on the phase of work. Sometimes neutral territory outside the community is used to provide perspective." + }, + facilitation: { + facilitationText: "The dispute process uses a community accountability approach:\n\n1. A facilitation team of 2-3 trained community members guides the process\n2. Both the person harmed and the person who caused harm have support teams\n3. The wider community is represented by stakeholders affected by the issues\n4. The process begins with individual preparation sessions before group meetings\n5. Facilitation focuses on transforming harmful patterns, not just individual incidents\n6. Multiple sessions allow for deep exploration of systemic factors\n7. The process builds community capacity to address similar issues in the future" + }, + communication: { + communicationText: "Communication follows these agreements: 1) Speak from personal experience using 'I' statements, 2) Acknowledge the difference between intent and impact, 3) Use language that recognizes both individual and systemic dimensions, 4) Name patterns and power dynamics when relevant, 5) Practice active listening, 6) Honor silence and processing time, 7) Express needs directly rather than through criticism." + }, + participation: { + participationText: "The process includes a constellation of participants depending on the situation: 1) Core participants directly involved in the harm, 2) Support people chosen by core participants, 3) Facilitators from the transformative justice collective, 4) Community stakeholders who represent affected groups or have relevant expertise, 5) Witnesses who help document and hold the process. Each participant has a specific role with clear responsibilities." + }, + documentation: { + documentationText: "Documentation includes: 1) Meeting summaries shared with all participants, 2) Agreements and action plans with assigned responsibilities, 3) Feedback collected after each major session, 4) Analysis of structural and cultural factors identified, 5) Resources shared during the process. Personal information is documented only as necessary and with consent." + } + }, + assessment: { + situation: { + situationText: "The situation is assessed through a systemic analysis framework:\n\n1. Individual experiences and harms are documented\n2. Patterns of behavior and power dynamics are identified\n3. Structural factors that contributed to the harm are analyzed\n4. Community norms and cultural assumptions are examined\n5. The assessment connects individual incidents to broader social contexts\n6. This approach identifies intervention points at multiple levels, from individual to systemic" + }, + stage_of_conflict: { + stageOfConflictText: "The facilitation team assesses: 1) The history and timeline of the harm, 2) Whether this is an isolated incident or part of a pattern, 3) The presence of immediate safety concerns, 4) The current capacity of all involved to engage in the process, 5) Community readiness to address potential systemic changes, and 6) Power dynamics that might impact the process." + }, + needs: { + needsText: "The assessment identifies needs at multiple levels: 1) Immediate needs for safety, support, and stabilization, 2) Individual healing needs for those directly impacted, 3) Accountability needs to address the harm, 4) Community needs for understanding and prevention, 5) Systemic needs for policy or cultural change, and 6) Learning needs to build capacity for addressing similar situations." + }, + evidence: { + evidenceText: "Information is gathered through multiple perspectives rather than a singular evidence-based approach. This includes: 1) First-person accounts of experiences, 2) Documentation of impacts, 3) Contextual information about the environment in which harm occurred, 4) Historical patterns within the community, 5) Analysis of how power operates in the situation, and 6) Relevant community agreements or expectations." + }, + jurisdiction: { + jurisdictionText: "Transformative justice processes are most appropriate for situations where: 1) The harm is connected to broader social patterns, 2) Community-based intervention is possible and desired, 3) There is willingness to address both immediate harm and root causes, and 4) Public systems (legal, etc.) would likely cause additional harm. The process may be adapted based on safety needs and legal requirements." + } + }, + deliberation: { + information_gathering: { + informationGatheringText: "Information is gathered through a trauma-informed approach that centers those most impacted. Multiple sessions allow time for reflection and integration. The facilitation team helps contextualize individual experiences within systemic patterns, gathering information about both the specific harm and the conditions that enabled it." + }, + brainstorming: { + brainstormingText: "Solution-building happens through structured brainstorming processes that include: 1) Small group work to generate ideas addressing different levels of change, 2) Research into approaches used by other communities, 3) Consultation with relevant experts or elders, 4) Creative visioning exercises that imagine new possibilities, and 5) Reality testing of proposals against available resources and capacities." + }, + discussion: { + discussionText: "Facilitated discussions focus on building shared understanding of how change can happen at multiple levels. Participants examine proposed solutions in terms of how they address immediate needs, build accountability, heal relationships, transform conditions, and prevent future harm. Special attention is paid to sustainability and community capacity." + }, + deliberation_format: { + deliberationFormatText: "The deliberation process includes multiple formats: 1) Structured dialogue sessions with all participants, 2) Caucus meetings with specific stakeholder groups, 3) One-on-one conversations for sensitive topics, 4) Community forums for systemic issues, and 5) Reflection periods between sessions. The process typically unfolds over 2-3 months, adapting to the specific situation." + } + }, + resolution: { + decision_making: { + decisionMakingText: "Decisions are made through a consensus process that prioritizes the needs of those most impacted while engaging everyone in finding solutions. The facilitation team helps test proposals against transformative justice principles. When full consensus isn't possible, the group identifies which elements have universal support and which need further development." + }, + outcomes: { + outcomesText: "Outcomes address multiple dimensions: 1) Survivor-centered responses to address immediate harm, 2) Accountability processes for those who caused harm, 3) Community support mechanisms to enable healing and accountability, 4) Education initiatives to build awareness, 5) Policy or structural changes to transform conditions, and 6) Community capacity-building to sustain changes over time." + }, + agreement: { + agreementText: "All resolutions result in a multi-level transformative action plan:\n\n1. Individual actions to address immediate harm and accountability\n2. Relationship-building commitments between affected parties\n3. Community-level interventions to address cultural factors\n4. Structural changes to prevent similar harms in the future\n5. Education and awareness components to share learning\n6. The plan includes both short-term and long-term actions\n7. Regular review points are scheduled to assess progress and adjust strategies" + }, + follow_up: { + followUpText: "Follow-up includes: 1) Regular check-ins on agreement implementation, 2) Support for those taking on accountability, 3) Ongoing resources for those who were harmed, 4) Community updates on systemic changes, 5) Periodic reassessment of whether the approach is effective, and 6) Documentation of lessons learned to inform future processes." + }, + announcement: { + announcementText: "Communication about outcomes follows consent-based protocols established during the process. Typically, information is shared at different levels: 1) Detailed information with direct participants, 2) General progress reports with the broader community, 3) Pattern-level insights for community education, and 4) Specific policy or structural changes implemented as a result of the process." + } + }, + appeal: { + criteria: { + criteriaText: "The process can be revisited if: 1) Agreements aren't being implemented as planned, 2) Implementation reveals unforeseen challenges, 3) New information emerges about the situation, 4) The harm continues or recurs, 5) Systemic changes aren't effectively addressing root causes, or 6) Additional affected parties come forward." + }, + appeal_process: { + appealProcessText: "Any participant can request reassessment by contacting the transformative justice collective. Two members review the request and consult with key stakeholders to determine next steps. This may lead to reconvening the original group, forming a new group, or taking targeted action on specific unaddressed issues." + }, + appeal_deliberation: { + appealDeliberationText: "Reassessment follows a structured format: 1) Review of original agreements and implementation status, 2) Identification of gaps or new issues, 3) Analysis of why certain aspects haven't been effective, 4) Development of refined or additional responses, with emphasis on systematic factors that may have been overlooked." + }, + appeal_resolution: { + appealResolutionText: "The renewed process produces an updated action plan that builds on previous work while addressing newly identified needs. This updated plan includes specific metrics for success and may assign new roles or resources to overcome previous implementation barriers." + } + }, + delegation: { + criteria: { + criteriaText: "Delegation to other resources may be appropriate when: 1) Immediate safety requires formal intervention, 2) The situation involves legal requirements beyond community capacity, 3) Specialized expertise is needed, 4) The community lacks resources to address the scale of harm, or 5) The transformative justice approach has been attempted without success." + }, + delegation_process: { + delegationProcessText: "When delegation is needed, the facilitation team: 1) Clearly explains why additional resources are recommended, 2) Helps participants understand options and potential impacts, 3) Supports access to appropriate services, 4) Continues to provide community support even when formal systems are involved, and 5) Documents learnings to strengthen future community capacity." + }, + delegation_authority: { + delegationAuthorityText: "Our community maintains relationships with a network of resources including: 1) Specialized transformative justice practitioners for complex cases, 2) Mental health providers with trauma expertise, 3) Legal advocates who understand transformative approaches, 4) Cultural workers who can support healing processes, and 5) Organizations working on systemic change in relevant areas." + } + } + } + } + }, + { + id: "jury-protocol", + title: "Community Jury", + description: "A process where a randomly selected jury of community members hears evidence and makes decisions on disputes", + data: { + stages: { + intake: { + process_start: { + processStartText: "The community jury process begins when a community member submits a case request form. This form requires a description of the dispute, parties involved, attempts at resolution so far, and desired outcome. The Jury Administrator reviews all submissions within 3 business days to determine if the case meets basic criteria for the jury process. If accepted, the case is assigned a number and scheduled for an initial hearing date." + }, + rules_access: { + rulesAccessText: "Community standards and jury procedures are publicly available through multiple channels: 1) A comprehensive online handbook with searchable content, 2) Print copies in the community center, 3) Audio recordings for accessibility, and 4) Regular community education sessions. New residents receive an orientation to these standards during their welcome process. The Jury Administrator is available to answer questions about procedures." + }, + information_access: { + informationAccessText: "Information about specific cases follows tiered access protocols: 1) Case parties receive all documentation relevant to their case, 2) Jury members receive case materials with sensitive personal information redacted, 3) The wider community receives notification of cases accepted and decisions made without identifying details, 4) Case summaries with key learnings are published annually for community education. Records are maintained securely by the Jury Administrator." + }, + participant_inclusion: { + participantInclusionText: "When a case is accepted, all named parties receive formal notification through both email and paper letter. This notification includes the initial claim, information about the jury process, their rights and responsibilities, important dates, and a response form to be returned within 10 days. The Jury Administrator follows up by phone if no response is received within 5 days." + }, + participation_requirement: { + participationRequirementText: "For community members, participation in the jury process is required as specified in the community agreement signed upon joining. For non-members or external entities, participation is voluntary. If a respondent declines to participate, the jury may still hear the case and reach a decision based on available information, but will note the limited nature of the proceedings." + }, + participation_commitments: { + participationCommitmentsText: "All participants in the jury process commit to: 1) Providing truthful information and evidence, 2) Adhering to scheduled deadlines and hearing dates, 3) Treating all participants with respect regardless of disagreements, 4) Preparing materials as requested by the jury, 5) Accepting the jury's decision as binding within community governance, and 6) Implementing agreed-upon actions or decisions within specified timeframes." + } + }, + prepare: { + principles: { + principlesText: "Our dispute resolution process is guided by these community jury principles:\n\n1. Fair representation through random selection of community members\n2. Impartiality through screening for conflicts of interest\n3. Informed deliberation based on evidence and testimony\n4. Collective wisdom through diverse perspectives\n5. Transparency in process while maintaining appropriate confidentiality\n6. Community standards as the basis for decision-making\n7. Balance between structure and flexibility to ensure fairness" + }, + values: { + valuesText: "Our community jury system is grounded in these core values: 1) Procedural fairness - ensuring consistent, transparent processes, 2) Collective wisdom - trusting in the reasoned judgment of peers, 3) Community ownership - placing decision-making authority within the community, 4) Balanced perspective - bringing diverse viewpoints to each case, 5) Reasoned judgment - basing decisions on evidence and community standards, and 6) Restorative outcomes - seeking decisions that repair harm and rebuild relationships." + }, + agreements: { + agreementsText: "All participants in the jury process agree to: 1) Accept the authority of the randomly selected jury to make decisions, 2) Present information honestly and completely, 3) Respect the confidentiality of sensitive information shared during the process, 4) Abide by the procedural rules established for hearings and deliberations, 5) Implement jury decisions in good faith, and 6) Use the appeals process rather than undermining decisions publicly." + } + }, + process: { + preparation: { + preparationText: "Case preparation includes several key steps: 1) The Jury Administrator creates a case file containing all initial submissions, 2) Both parties receive a preparation packet with instructions for submitting evidence and witness statements, 3) Parties have 14 days to submit all materials, which are then organized and distributed to jury members, 4) Jurors review all materials individually before the hearing, 5) Pre-hearing conferences address procedural questions and establish time allocations, 6) The facilitator ensures all parties understand the process and their roles." + }, + place: { + placeText: "Jury hearings take place in the community's designated hearing room, which features: 1) A formal arrangement with tables for parties and jury members, 2) Audio recording equipment to document proceedings, 3) Presentation technology for displaying evidence, 4) Good acoustics and appropriate lighting, 5) Accessibility features for all participants, and 6) A separate deliberation room for jury discussions. For sensitive cases, alternative venues can be arranged to ensure privacy and comfort for all participants." + }, + facilitation: { + facilitationText: "The dispute process is facilitated through a structured jury format:\n\n1. A trained process facilitator guides the proceedings but does not participate in decision-making\n2. The process follows clear phases: opening statements, evidence presentation, questions, deliberation, and decision\n3. All parties have equal time to present their perspectives and evidence\n4. Jurors may ask clarifying questions through the facilitator\n5. The facilitator ensures adherence to community standards and procedural fairness\n6. Deliberations are conducted by jurors alone, with the facilitator available for procedural questions" + }, + communication: { + communicationText: "Communication during jury proceedings follows formal protocols: 1) Opening and closing statements are uninterrupted and time-limited, 2) Evidence presentation follows a structured format with visual aids as needed, 3) Questions from jurors are submitted to the facilitator, who may rephrase for clarity, 4) Cross-examination is limited and focused on fact clarification rather than confrontation, 5) The facilitator moderates all exchanges to maintain respectful discourse, 6) Emotional expression is allowed but must remain appropriate to the setting." + }, + participation: { + participationText: "Jury proceedings involve the following participants: 1) The 5-7 community members selected as jurors, 2) The case parties (initiator and respondent), 3) A trained facilitator who guides the process, 4) Witnesses called by either party or the jury itself, 5) The Jury Administrator who manages logistics and record-keeping, and 6) Community observers who may attend open portions of the hearings. Each role has clear responsibilities and boundaries established in the process guidelines." + }, + documentation: { + documentationText: "Comprehensive documentation is maintained throughout the jury process: 1) Audio recordings of all open proceedings, 2) Written transcripts produced from these recordings, 3) A case file containing all submitted evidence and statements, 4) Jury deliberation worksheets (without attribution to specific jurors), 5) The final written decision with its rationale, and 6) Implementation and follow-up records. All documentation is maintained securely by the Jury Administrator for a minimum of five years." + } + }, + assessment: { + situation: { + situationText: "The jury assesses each case through a structured framework: 1) Establishing agreed-upon facts versus disputed elements, 2) Identifying relevant community standards or agreements that apply, 3) Evaluating the credibility and completeness of evidence presented, 4) Considering context and mitigating circumstances, 5) Assessing impacts on individuals and the community, and 6) Determining responsibility based on the preponderance of evidence. This assessment is documented as part of their deliberation process." + }, + stage_of_conflict: { + stageOfConflictText: "The jury considers the stage and history of the conflict, including: 1) Whether this is a first-time issue or recurring pattern, 2) Previous attempts at resolution and why they were unsuccessful, 3) Whether the situation is escalating or de-escalating, 4) The current relationship between the parties, 5) Potential impacts of various decision options on the conflict trajectory, and 6) How the timing of intervention might affect outcomes. This contextual understanding informs both their decision and implementation recommendations." + }, + needs: { + needsText: "The jury identifies the fundamental needs of all involved parties: 1) Each party's stated desired outcome, 2) Underlying needs for recognition, restoration, safety, or clarity, 3) Community needs for precedent, standard-setting, or harm prevention, 4) Practical needs related to resources, access, or accommodations, 5) Relationship needs between the parties and with the broader community, and 6) Systemic needs that might require policy changes beyond the specific case. This needs assessment guides the development of comprehensive solutions." + }, + evidence: { + evidenceText: "Evidence is evaluated through a structured process: 1) Written statements from all parties and witnesses, 2) Documentary evidence such as communications, records, or other relevant materials, 3) Visual evidence including photos, videos, or site documentation, 4) Community standards and agreements that establish expectations, 5) Expert testimony when specialized knowledge is required, and 6) Impact statements describing effects on involved parties. The jury weighs evidence based on relevance, credibility, and consistency rather than technical rules of admissibility." + }, + jurisdiction: { + jurisdictionText: "The community jury has jurisdiction over: 1) Disputes between community members regarding shared resources or spaces, 2) Alleged violations of community agreements or standards, 3) Conflicts affecting community function or wellbeing, 4) Requests for clarification of policies or practices, and 5) Appeals of decisions made by community committees. The jury does not have jurisdiction over legal matters requiring formal court proceedings, situations presenting immediate safety risks, or disputes that have been explicitly excluded in the community charter." + } + }, + deliberation: { + information_gathering: { + informationGatheringText: "Jury information gathering continues during deliberation: 1) Jurors identify information gaps that emerged during the hearing, 2) They may request clarification from parties through written questions, 3) They review all submitted evidence methodically, creating an evidence summary, 4) They consult community standards and precedents from previous similar cases, 5) If needed, they may request additional expert input on technical matters, and 6) They document key findings of fact that will form the basis for their decision." + }, + brainstorming: { + brainstormingText: "The jury uses a structured brainstorming process: 1) Individual jurors first write down potential solutions independently, 2) Each juror shares their ideas without criticism or evaluation, 3) Ideas are recorded visibly for all jurors to consider, 4) Building on initial ideas, jurors suggest modifications and combinations, 5) The full range of possibilities is organized into categories, and 6) The jury identifies underlying principles that might guide an effective resolution. This approach ensures all perspectives are considered before evaluation begins." + }, + discussion: { + discussionText: "Jury deliberation discussions follow a structured format: 1) The jury first clarifies the key questions that must be answered, 2) They review evidence related to each question, 3) Each juror shares their perspective on how the evidence answers these questions, 4) Areas of agreement and disagreement are explicitly identified, 5) For disagreements, jurors explore underlying reasoning and concerns, 6) The facilitator helps maintain focus and ensures all voices are heard, and 7) The jury works toward finding areas of consensus before moving to formal decision-making." + }, + finding_solutions: { + findingSolutionsText: "Solutions are developed through structured jury deliberation:\n\n1. Jurors first identify key issues requiring resolution\n2. Each juror shares their initial perspective without interruption\n3. The jury works to develop a shared understanding of the situation\n4. Multiple solution options are generated and evaluated\n5. Decisions require a supermajority (typically 2/3) agreement\n6. When consensus isn't possible on specific points, the jury may offer multiple options\n7. The jury documents their reasoning along with their final decision" + }, + deliberation_format: { + deliberationFormatText: "Jury deliberations follow a clear format: 1) Initial deliberations occur immediately following the hearing while information is fresh, 2) If needed, additional sessions are scheduled within 7 days, 3) A designated jury foreperson facilitates the discussion with assistance from the process facilitator as requested, 4) Deliberations are private, with only jury members present unless procedural assistance is needed, 5) Deliberations continue until a decision is reached or the maximum time (typically 10 hours total) has been used, 6) The jury takes structured breaks to prevent fatigue and allow reflection." + } + }, + resolution: { + decision_making: { + decisionMakingText: "Decisions are made through a structured jury voting process:\n\n1. After thorough deliberation, the jury votes on proposed resolutions\n2. A 2/3 majority is required for decisions to be adopted\n3. If the first vote doesn't reach the threshold, further discussion occurs\n4. Up to three voting rounds may take place to reach the required majority\n5. If consensus cannot be reached after three rounds, the most supported option with at least 60% support is adopted\n6. The jury provides written rationale for their decision based on community standards\n7. Jury decisions are binding within the scope of community governance" + }, + outcomes: { + outcomesText: "Jury decisions may include multiple outcome elements: 1) Determination of whether community standards were violated, 2) Specific actions required to address harm or restore conditions, 3) Clarification of rights and responsibilities going forward, 4) Resource allocations or adjustments to shared arrangements, 5) Monitoring provisions to ensure implementation, 6) Preventative measures to avoid similar issues, and 7) Recommendations for community policy or practice changes. Outcomes are designed to be specific, measurable, achievable, relevant, and time-bound." + }, + agreement: { + agreementText: "The jury decision is documented in a formal written determination that includes: 1) A summary of the case and key facts established, 2) The specific questions the jury was asked to resolve, 3) The jury's findings on each question with supporting rationale, 4) Specific actions required of each party with deadlines, 5) Consequences for non-compliance if applicable, 6) Monitoring and verification procedures, and 7) Signatures of all jury members. This document is provided to all parties and becomes part of community records." + }, + follow_up: { + followUpText: "Implementation of jury decisions is tracked through a structured follow-up process: 1) The Jury Administrator monitors compliance with required actions, 2) Parties submit documentation of completed items by established deadlines, 3) A 30-day check-in assesses initial progress, 4) A final implementation review occurs after all deadlines have passed, 5) The original jury foreperson is consulted if clarification is needed, and 6) Successful implementation is documented and the case is formally closed. If implementation issues arise, the Administrator may reconvene the jury or initiate the non-compliance process." + }, + announcement: { + announcementText: "Jury decisions are announced according to established protocols: 1) Parties receive the full written determination within 3 days of the decision, 2) A brief announcement that a decision has been reached is posted to community channels, 3) A redacted version removing sensitive information may be shared if the case involves community-wide issues, 4) Any policy implications or precedents are highlighted for community governance, 5) The jury may recommend specific educational communications if the case reveals common misunderstandings of community standards." + } + }, + appeal: { + criteria: { + criteriaText: "Appeals of jury decisions may be filed based on specific criteria: 1) Significant new evidence that wasn't available during the original hearing, 2) Procedural errors that materially affected the outcome, 3) Clear misapplication of community standards by the jury, 4) Jury bias or misconduct that affected the decision, or 5) Implementation difficulties that make the decision unworkable. Appeals must be filed within 14 days of the decision and must specifically identify which criteria apply." + }, + appeal_process: { + appealProcessText: "The appeal process follows these steps: 1) The appellant submits a written appeal stating the grounds and desired outcome, 2) The Appeal Committee (three community members not involved in the original case) reviews the appeal to determine if it meets criteria, 3) If accepted, a new jury is selected, larger than the original, 4) The new jury reviews all original materials plus the appeal documentation, 5) A limited appeal hearing is held focusing only on the specific grounds for appeal, 6) The appeal jury deliberates and issues a new decision that either confirms, modifies, or overturns the original decision." + }, + appeal_deliberation: { + appealDeliberationText: "Appeal deliberations focus specifically on the grounds presented: 1) For new evidence appeals, the jury assesses whether the evidence is truly new and would likely have changed the outcome, 2) For procedural error appeals, they determine if errors occurred and materially affected the result, 3) For misapplication of standards, they review the standards and their application, 4) For bias claims, they examine the conduct and decision patterns, 5) For implementation issues, they assess practicality and alternatives. Their deliberation is limited to the specific appeal grounds rather than rehearing the entire case." + }, + appeal_resolution: { + appealResolutionText: "The appeal jury has three possible resolution options: 1) Confirm the original decision if the appeal grounds are not substantiated, 2) Modify specific aspects of the decision while maintaining the core findings, or 3) Overturn the decision completely and issue a new determination. The appeal resolution includes specific reasoning addressing each appeal ground raised. Appeal decisions are final and not subject to further community appeal, though legal rights remain unaffected." + } + }, + delegation: { + criteria: { + criteriaText: "Cases may be delegated from the jury process when: 1) The matter involves legal issues beyond community governance, 2) Specialized expertise is required for proper resolution, 3) Immediate intervention is needed for safety concerns, 4) The case complexity exceeds what volunteer jurors can reasonably handle, 5) Multiple previous attempts through the jury process have failed to resolve the issue, or 6) The case would create significant conflicts of interest within the available jury pool. Delegation decisions are made by the Jury Administrator in consultation with community leadership." + }, + delegation_process: { + delegationProcessText: "When delegation is appropriate, the process includes: 1) The Jury Administrator documents the reason for delegation, 2) Parties are notified of the delegation decision and rationale, 3) They are provided with information about the alternative process and next steps, 4) Relevant case information is transferred to the appropriate body (with party consent), 5) The Jury Administrator remains available as a resource during the transition, and 6) The community record notes the delegation and eventual outcome for future reference and learning." + }, + selection: { + selectionText: "Jurors are selected through a structured random process:\n\n1. A pool of 15-20 community members is randomly selected from the membership roster\n2. Potential jurors complete a screening questionnaire to identify conflicts of interest\n3. Both parties in the dispute may exclude up to 3 potential jurors without stating a reason\n4. A final panel of 5-7 jurors is confirmed from the remaining pool\n5. Selected jurors receive orientation materials and basic conflict resolution training\n6. The process ensures diversity of perspectives while maintaining impartiality" + }, + delegation_authority: { + delegationAuthorityText: "Our community maintains relationships with several delegation authorities: 1) A panel of professional mediators for complex relationship conflicts, 2) Legal advisors for matters with potential legal implications, 3) Subject matter experts in areas like construction, finance, and technology, 4) Restorative justice practitioners for cases involving harm repair, 5) Mental health professionals for situations involving psychological wellbeing, and 6) External facilitation teams for conflicts involving governance leadership. These resources receive training on our community values and approaches." + } + } + } + } + }, + { + id: "referee-protocol", + title: "Community Referee", + description: "A streamlined process where a single trained referee facilitates and decides on dispute resolution", + data: { + stages: { + intake: { + process_start: { + processStartText: "The referee process begins when a community member submits a dispute resolution request form. This form includes a description of the issue, parties involved, desired outcome, and relevant documentation. Within 2 business days, the Dispute Coordinator reviews the form and determines if the referee process is appropriate. If so, the referee selection process begins immediately, with a goal of assigning a referee within 5 days of the initial submission." + }, + rules_access: { + rulesAccessText: "Community standards and the referee process guidelines are made accessible through: 1) A comprehensive digital handbook available on the community website, 2) Print copies in the community office, 3) Periodic community workshops explaining the process, and 4) A quick-reference guide that summarizes key points. New community members receive orientation to these materials when they join. The Dispute Coordinator is available to answer questions about the process." + }, + information_access: { + informationAccessText: "Information management follows clear confidentiality protocols: 1) Case information is shared only with the assigned referee and parties directly involved, 2) Documentation is stored securely in both digital and physical formats, 3) Anonymized statistical information is compiled quarterly for process improvements, 4) Final determinations may be used as precedent for future cases with identifying details removed, and 5) Parties may agree to share specific outcomes with the wider community when relevant to community functioning." + }, + participant_inclusion: { + participantInclusionText: "When a case is accepted, the Dispute Coordinator contacts all identified parties via email and phone within 48 hours. They receive an explanation of the process, a copy of the initial dispute form, information about referee selection, and a response form to be completed within 3 days. The coordinator answers questions and addresses concerns about the process to ensure informed participation. If a party is unresponsive, a secondary contact method is attempted." + }, + participation_requirement: { + participationRequirementText: "Participation in the referee process is a condition of community membership as outlined in our community agreement. Members are expected to engage in good faith when named in a dispute. However, the process may proceed even if a party declines to participate actively. In such cases, the referee will consider available information and note the limited participation in their determination. External parties not bound by community agreements may voluntarily opt in to the process." + }, + participation_commitments: { + participationCommitmentsText: "Parties in the referee process commit to: 1) Providing accurate and complete information, 2) Responding to referee requests within specified timeframes, 3) Participating in scheduled meetings prepared and on time, 4) Engaging respectfully even during disagreement, 5) Considering resolution options with an open mind, 6) Abiding by the referee's determination, and 7) Implementing required actions within established deadlines. These commitments are acknowledged in writing at the process start." + } + }, + prepare: { + principles: { + principlesText: "Our dispute resolution process is guided by these referee principles:\n\n1. Expertise-based facilitation by a qualified individual\n2. Fairness through clear procedures and balanced participation\n3. Efficiency through streamlined process with a single decision-maker\n4. Consistency in applying community standards\n5. Practicality in developing workable solutions\n6. Transparency in reasoning while maintaining confidentiality\n7. Authority balanced with participant input and feedback" + }, + values: { + valuesText: "The referee process embodies these essential values: 1) Efficiency - streamlining resolution to minimize time and resources, 2) Fairness - ensuring balanced consideration and equal opportunity to be heard, 3) Expertise - bringing relevant knowledge and skills to complex situations, 4) Practicality - focusing on workable solutions that can be implemented, 5) Consistency - applying community standards evenly across similar cases, and 6) Respect - maintaining dignity for all participants throughout the process." + }, + agreements: { + agreementsText: "All parties in the referee process agree to: 1) Recognize the authority of the referee to make binding determinations, 2) Provide information honestly and completely when requested, 3) Meet deadlines for submissions and responses, 4) Participate in good faith in all scheduled sessions, 5) Treat the referee and other participants with respect, 6) Maintain confidentiality about process details, and 7) Implement the referee's determination promptly once issued." + } + }, + process: { + preparation: { + preparationText: "Case preparation follows a streamlined sequence: 1) The assigned referee reviews the initial submission within 24 hours, 2) A case management plan with clear timeline is created and shared with all parties, 3) Parties submit position statements and supporting documentation within 5 days, 4) The referee identifies key issues and information gaps, 5) Individual pre-meeting calls are conducted with each party, and 6) The referee prepares a structured agenda for the joint session, focusing discussion on the most relevant issues." + }, + place: { + placeText: "Referee sessions typically take place in a neutral meeting room at the community center, featuring: 1) A conference table with equal seating for all parties, 2) Presentation equipment for sharing relevant information, 3) Soundproofing to ensure privacy, 4) Comfortable seating for sessions that may last 2-3 hours, 5) Good lighting and ventilation, and 6) Water and basic refreshments. Virtual participation options are available when necessary, using secure video conferencing technology with screen sharing capabilities." + }, + facilitation: { + facilitationText: "The dispute process is led by a single referee who:\n\n1. Reviews all submitted materials before the first meeting\n2. Conducts individual intake interviews with each party\n3. Structures a joint session with clear speaking times and guidelines\n4. Asks clarifying questions to develop a complete understanding\n5. May request additional information or witnesses as needed\n6. Maintains control of the process while ensuring all voices are heard\n7. Provides guidance on realistic options based on community standards" + }, + communication: { + communicationText: "Communication in referee sessions follows structured guidelines: 1) The referee establishes clear speaking protocols at the start, 2) Each party has equal opportunity to present their perspective without interruption, 3) Questions are directed through the referee to maintain order, 4) Time limits ensure balanced participation, 5) The referee may caucus with parties separately when needed, 6) Communication focuses on facts and interests rather than accusations, and 7) The referee summarizes key points to ensure shared understanding." + }, + participation: { + participationText: "Participation typically includes: 1) The primary parties directly involved in the dispute, 2) The referee who facilitates and ultimately decides the case, 3) One support person per party (non-speaking unless invited), 4) Witnesses with relevant information (for specific portions only), 5) The Dispute Coordinator who handles logistics and record-keeping, and 6) Occasional observers for training purposes (with party consent). All participants receive clear information about their role and expectations in advance." + }, + documentation: { + documentationText: "Documentation is maintained throughout the process: 1) All written submissions are compiled in a case file, 2) The referee takes structured notes during all meetings and calls, 3) Audio recording may be used with party consent for accuracy, 4) The referee documents key findings of fact and policy interpretations, 5) A written summary is provided to parties after each significant meeting, and 6) The final determination serves as the official record of the process outcome. All documentation is maintained confidentially in accordance with community record-keeping policies." + } + }, + assessment: { + situation: { + situationText: "The referee conducts a thorough situation assessment: 1) Identifying agreed-upon facts versus disputed facts, 2) Clarifying which community standards or agreements apply to the situation, 3) Determining the chronology of relevant events, 4) Assessing the impact on involved parties and the community, 5) Evaluating the credibility of conflicting accounts when necessary, and 6) Distinguishing between primary issues that require resolution and secondary factors. This assessment provides the foundation for a fair determination." + }, + stage_of_conflict: { + stageOfConflictText: "The referee evaluates the stage and dynamics of the conflict: 1) Whether this is a new issue or part of an ongoing pattern, 2) The level of escalation and emotional intensity, 3) Current communication patterns between the parties, 4) Power dynamics that may influence resolution options, 5) Previous attempts at resolution and why they were unsuccessful, and 6) The potential for cooperative versus imposed solutions based on relationship factors. This assessment helps the referee tailor the process appropriately." + }, + needs: { + needsText: "The referee identifies the underlying needs of all parties: 1) Stated desires and positions as expressed by each party, 2) Deeper interests that may not be explicitly articulated, 3) Practical needs related to resources, timing, or implementation capacity, 4) Relationship needs between the parties, 5) Community needs for precedent and standard enforcement, and 6) Procedural needs for clarity and closure. Understanding these needs helps the referee craft solutions that address core concerns rather than just surface positions." + }, + evidence: { + evidenceText: "Evidence evaluation follows a practical approach: 1) Written statements from all involved parties, 2) Supporting documentation such as communications, photos, or records, 3) Witness accounts from those with direct knowledge, 4) Site visits or inspections when relevant to physical disputes, 5) Community guidelines and precedents from similar cases, and 6) Expert input when specialized knowledge is required. The referee weighs evidence based on relevance, credibility, and consistency, focusing on information that directly impacts the key issues." + }, + jurisdiction: { + jurisdictionText: "The referee process has jurisdiction over: 1) Interpretation and application of community agreements and policies, 2) Allocation of shared resources and spaces, 3) Interpersonal conflicts affecting community functioning, 4) Minor property disputes between community members, and 5) Compliance with previous community decisions. The process does not have jurisdiction over legal matters outside community governance, criminal activities, or disputes explicitly excluded in the community charter. Complex cases may be referred to specialized authorities when appropriate." + } + }, + deliberation: { + information_gathering: { + informationGatheringText: "The referee gathers information through a structured approach: 1) Initial submissions from all parties, 2) Clarification questions to fill information gaps, 3) Targeted witness statements on specific disputed facts, 4) Review of community standards and precedents, 5) Site visits or physical inspections when relevant, and 6) Expert consultation on technical matters if needed. The process is designed to be thorough but efficient, gathering essential information without unnecessary delay." + }, + brainstorming: { + brainstormingText: "Solution development occurs through guided brainstorming: 1) The referee first asks parties to suggest potential solutions, 2) Each suggestion is noted without immediate evaluation, 3) The referee may offer additional options based on experience with similar cases, 4) Benefits and challenges of each option are identified, 5) Parties discuss which elements of various options might be combined, and 6) The referee helps refine promising approaches into workable solutions. This collaborative phase occurs before the referee makes a final determination." + }, + discussion: { + discussionText: "Discussion in referee sessions is highly structured: 1) The referee identifies specific topics for focused conversation, 2) Each party has equal opportunity to address each topic, 3) Direct questions between parties are moderated by the referee, 4) The referee summarizes points of agreement and disagreement, 5) When positions differ, the referee explores underlying interests and concerns, and 6) The discussion concludes with a summary of key findings and possible resolution paths. This structure ensures efficient use of time while covering all relevant issues." + }, + deliberation_format: { + deliberationFormatText: "The referee's deliberation typically includes: 1) A structured review of all gathered information, 2) Analysis of which community standards apply to the situation, 3) Assessment of the credibility and weight of conflicting evidence, 4) Consideration of precedent from similar cases, 5) Evaluation of proposed solutions against practical implementation criteria, and 6) Drafting of a determination that addresses all key issues. The referee may consult with other referees on complex matters while maintaining case confidentiality. Deliberation occurs within 3 days of the final information gathering." + } + }, + resolution: { + decision_making: { + decisionMakingText: "Decisions are made through a referee determination process:\n\n1. The referee first encourages participants to reach their own agreement\n2. If parties cannot agree, the referee considers all presented information\n3. The decision is based on community standards, precedent, and fairness\n4. The referee provides a written determination with clear reasoning\n5. Parties may ask clarifying questions about the decision\n6. The referee has authority to make binding decisions within community governance\n7. Decisions are delivered within one week of the final session" + }, + outcomes: { + outcomesText: "Referee determinations may include multiple elements: 1) Findings on disputed facts based on the preponderance of evidence, 2) Interpretation of how community standards apply to the situation, 3) Specific actions required of each party with deadlines, 4) Allocation of costs or resources if relevant, 5) Preventive measures to avoid similar disputes in the future, 6) Monitoring protocols to verify implementation, and 7) Recommendations for community policy clarification if gaps are identified. Outcomes balance fairness with practicality, focusing on clear, implementable solutions." + }, + agreement: { + agreementText: "All resolutions result in a clear written determination:\n\n1. The document summarizes the dispute and process\n2. Key findings on factual and policy matters are stated clearly\n3. Specific required actions are detailed with deadlines\n4. Rationale for the decision is provided with reference to community standards\n5. Implementation responsibilities are assigned to specific parties\n6. Follow-up and verification methods are specified\n7. The referee signs the determination, and parties acknowledge receipt" + }, + follow_up: { + followUpText: "Implementation is supported through structured follow-up: 1) The referee schedules check-in points based on action deadlines, 2) Parties submit verification of completed items, 3) The Dispute Coordinator tracks overall implementation progress, 4) Brief follow-up calls address any clarification needs or implementation challenges, 5) If implementation problems arise, the referee may reconvene the parties for problem-solving, and 6) When all requirements are complete, the case is formally closed with documentation of successful implementation. This accountability system ensures determinations are put into practice." + }, + announcement: { + announcementText: "Communication about referee determinations follows a tiered approach: 1) Parties receive the complete determination document, 2) The Dispute Coordinator records the outcome in the confidential case tracking system, 3) If the case involves community-wide issues, a general announcement noting that a determination has been made may be shared without personal details, 4) Policy implications or clarifications may be communicated to relevant community committees, and 5) Anonymized case summaries may be used for referee training and process improvement." + } + }, + appeal: { + criteria: { + criteriaText: "Appeals of referee determinations may be filed based on limited criteria: 1) Significant new information that wasn't available during the original process, 2) Clear misapplication of community standards, 3) Procedural errors that materially affected the outcome, 4) Bias or conflict of interest that wasn't previously disclosed, or 5) Implementation impossibility due to factors outside the party's control. Appeals must be filed within 10 days of the determination and must specifically identify which criterion applies and provide supporting evidence." + }, + appeal_process: { + appealProcessText: "The appeal process follows these steps: 1) The appealing party submits a written appeal form with supporting documentation, 2) The Appeals Committee (consisting of three experienced referees not involved in the original case) reviews the appeal to determine if it meets criteria, 3) If accepted, a senior referee not involved in the original case is assigned, 4) The senior referee reviews all materials from the original case plus the appeal documentation, 5) A limited appeal hearing may be held to address specific issues, and 6) The senior referee issues a final determination that confirms, modifies, or replaces the original decision." + }, + appeal_deliberation: { + appealDeliberationText: "Appeal deliberation is tightly focused on the specific grounds raised: 1) For new information appeals, the senior referee assesses whether the information is truly new and substantial enough to affect the outcome, 2) For misapplication appeals, they review the relevant standards and their application, 3) For procedural error appeals, they determine if the alleged errors occurred and materially impacted the result, 4) For bias appeals, they evaluate the evidence of partiality, and 5) For implementation appeals, they assess the practical constraints. The deliberation is completed within 5 days of receiving all appeal materials." + }, + appeal_resolution: { + appealResolutionText: "The appeal resolution is documented in a written determination that: 1) Addresses each appeal ground specifically, 2) Explains the rationale for upholding or modifying the original determination, 3) Provides any revised directives or timelines, 4) Clarifies implementation requirements, 5) Notes that this decision is final within the community process, and 6) Is delivered to all parties within 48 hours of the decision. The Appeals Committee records the outcome for tracking and quality improvement purposes." + } + }, + delegation: { + criteria: { + criteriaText: "Cases may be delegated from the referee process when: 1) Legal issues beyond community governance are central to the dispute, 2) The complexity requires specialized expertise beyond the referees' training, 3) Safety concerns require immediate professional intervention, 4) The scope affects multiple community systems or external entities, 5) Significant conflicts of interest exist with all available referees, or 6) The case involves policy creation rather than policy application. The Dispute Coordinator makes initial delegation recommendations, which are reviewed by the Referee Oversight Committee." + }, + delegation_process: { + delegationProcessText: "The delegation process includes: 1) Documentation of why the referee process is not appropriate, 2) Consultation with parties about alternative options, 3) Formal referral to the appropriate resource with relevant background information, 4) Assistance with transition to ensure parties understand the new process, 5) The Dispute Coordinator remains available as a resource during the transition, and 6) The outcome is recorded for community learning and process improvement. This approach ensures no dispute falls through the cracks due to jurisdictional limitations." + }, + selection: { + selectionText: "The referee is selected through a structured process:\n\n1. The community maintains a roster of 5-7 trained referees with diverse expertise\n2. For each dispute, 3 available referees are presented to the parties\n3. Parties rank their preferences, with the highest mutual ranking selected\n4. If parties cannot agree, a random selection from the three options is made\n5. Selected referees must disclose any potential conflicts of interest\n6. Parties may challenge the selection based on demonstrated bias or conflict\n7. Referees receive ongoing training and peer review to maintain quality" + }, + delegation_authority: { + delegationAuthorityText: "Our community maintains relationships with several authorities for delegation: 1) A network of professional mediators with various specializations, 2) Legal services for matters requiring formal legal intervention, 3) Subject matter experts in areas like construction, finance, technology, and health, 4) Conflict coaching services for high-emotion situations, 5) Therapeutic resources for conflicts with significant relational components, and 6) Regulatory agencies when disputes involve compliance with external requirements. The community budget includes funds to support access to these resources when needed." + } + } + } + } + }, + { + id: "peer-to-peer", + title: "Peer-to-Peer", + description: "A self-facilitated process where participants work together directly to resolve disputes", + data: { + stages: { + intake: { + process_start: { + processStartText: "The process begins when any community member fills out a dispute form, which is available on the community website or as paper copies in common areas. The form asks for a description of the issue, who is involved, and what resolution they're seeking." + }, + rules_access: { + rulesAccessText: "Community rules are kept in a shared digital repository accessible to all members, with physical copies posted in community spaces. Rules are reviewed annually in a community-wide meeting." + }, + information_access: { + informationAccessText: "Information about disputes is shared only with those directly involved in the process. A summary of resolved disputes (with identifying details removed) is shared quarterly to help the community learn and improve processes." + }, + participant_inclusion: { + participantInclusionText: "When a dispute is filed, all identified parties are contacted via their preferred communication method within 48 hours. They receive a copy of the dispute form and information about the peer-to-peer resolution process." + }, + participation_requirement: { + participationRequirementText: "Participation is voluntary but strongly encouraged. Community members have agreed in advance that the peer resolution process is the first step before escalating disputes to other forums." + }, + participation_commitments: { + participationCommitmentsText: "Participants commit to: 1) Communicating honestly and respectfully, 2) Listening to understand rather than to respond, 3) Working toward a mutually beneficial resolution, 4) Respecting confidentiality, and 5) Following through on any agreed-upon actions." + } + }, + process: { + preparation: { + preparationText: "Both parties have 3-5 days to prepare for the conversation. During this time, they reflect on the issue, their needs, and possible solutions. A preparation worksheet is provided to help structure their thoughts. Participants may seek advice from trusted friends but are asked to keep details confidential." + }, + place: { + placeText: "Participants choose a neutral location that feels comfortable for both parties. This could be a community meeting room, quiet outdoor space, or online video call if necessary. The space should be private, quiet, and free from interruptions." + }, + facilitation: { + facilitationText: "This process is self-facilitated by the participants. Both parties review a shared guidance document on productive communication before meeting. This document includes suggested time frames, communication techniques, and a basic structure for the conversation." + }, + communication: { + communicationText: "Participants follow these guidelines: 1) Take turns speaking without interruption, 2) Use 'I' statements to express feelings and needs, 3) Ask clarifying questions, 4) Summarize what you've heard to ensure understanding, 5) Focus on the present issue and future solutions rather than past grievances." + }, + participation: { + participationText: "Only the directly involved parties participate in the initial conversation. If they reach an impasse, they may jointly decide to invite a mutual trusted friend to help facilitate a follow-up conversation." + }, + documentation: { + documentationText: "Participants take collaborative notes during the meeting, focusing on agreements made and next steps. Both parties review these notes at the end of the meeting and receive a copy. These notes remain confidential to the participants." + } + }, + assessment: { + situation: { + situationText: "Participants assess the situation together by identifying: 1) The specific issue or behavior causing concern, 2) The impact on each person and the community, 3) Related community values or agreements, and 4) What needs to happen for resolution." + }, + stage_of_conflict: { + stageOfConflictText: "Participants jointly determine whether the dispute is: 1) Early stage (single incident or misunderstanding), 2) Developing (pattern forming but communication still possible), or 3) Escalated (significant breakdown in communication or trust). This helps determine appropriate next steps." + }, + needs: { + needsText: "Each participant identifies and shares their underlying needs, such as respect, clarity, security, fairness, autonomy, or community connection. They discuss how these needs can be addressed while honoring the needs of others." + }, + evidence: { + evidenceText: "Participants share relevant information with each other directly. This may include communications, photos, witness accounts, or other documentation. Both parties agree to honestly present all relevant information." + }, + jurisdiction: { + jurisdictionText: "The peer-to-peer process is appropriate for most interpersonal conflicts and minor disagreements. If the dispute involves illegal activity, poses safety risks, or requires specialized expertise, participants should refer to the delegation process." + } + }, + deliberation: { + information_gathering: { + informationGatheringText: "Participants ask each other clarifying questions to ensure they fully understand the situation. They may take a break to gather more information if needed before continuing the conversation." + }, + brainstorming: { + brainstormingText: "Participants jointly brainstorm potential solutions without immediately evaluating them. All ideas are recorded. After generating options, they discuss the advantages and challenges of each approach." + }, + discussion: { + discussionText: "Discussion follows the format of: 1) Each person shares their perspective uninterrupted, 2) Clarifying questions are asked, 3) Areas of agreement and difference are identified, 4) Participants work to find solutions that address core needs of all involved." + }, + deliberation_format: { + deliberationFormatText: "The deliberation is a face-to-face conversation (or video call if necessary) that typically lasts 60-90 minutes. If more time is needed, participants may schedule follow-up conversations rather than rushing to resolution." + } + }, + resolution: { + decision_making: { + decisionMakingText: "Decisions are made through mutual agreement. Both participants must consent to the resolution, meaning they can live with the decision even if it isn't their ideal outcome." + }, + outcomes: { + outcomesText: "Possible outcomes include: 1) Clarification of misunderstandings, 2) Apologies and acknowledgment of impact, 3) Agreements about future behavior, 4) Specific actions to restore harm, 5) Plans for ongoing communication, or 6) Agreement to disagree respectfully on certain matters." + }, + agreement: { + agreementText: "Agreements are documented in writing, with copies provided to both participants. They include specific, measurable actions with timelines and how progress will be reviewed. Both participants sign the agreement." + }, + follow_up: { + followUpText: "Participants schedule a follow-up check-in 2-4 weeks after the agreement to discuss progress and any adjustments needed. This can be a brief meeting or exchange of messages." + }, + announcement: { + announcementText: "The resolution remains confidential between the participants unless they jointly agree to share specific information with the wider community." + } + }, + appeal: { + criteria: { + criteriaText: "If either participant feels the agreement isn't working or circumstances have changed significantly, they can request a follow-up conversation using the same peer-to-peer process." + }, + appeal_process: { + appealProcessText: "To revisit the agreement, the participant sends a written request to the other party explaining why they believe the agreement needs adjustment. They then schedule a new conversation following the same format as the original process." + }, + appeal_deliberation: { + appealDeliberationText: "The follow-up conversation focuses specifically on the aspects of the agreement that aren't working, rather than reopening the entire dispute. Both parties discuss changes that could make the agreement more effective." + }, + appeal_resolution: { + appealResolutionText: "The participants revise their written agreement based on the follow-up conversation, with both signing the updated document." + } + }, + delegation: { + criteria: { + criteriaText: "Delegation to a different process is appropriate if: 1) The peer-to-peer process has been attempted without resolution, 2) The dispute involves serious safety concerns, 3) There is a significant power imbalance between participants, 4) The issue affects the broader community, or 5) Specialized expertise is needed." + }, + delegation_process: { + delegationProcessText: "If delegation is needed, participants document what has been tried and what issues remain unresolved. They then request assistance from the community mediator pool, a group of trained volunteer mediators." + }, + delegation_authority: { + delegationAuthorityText: "The community mediator pool maintains a roster of trained mediators who can facilitate a more structured process. They also maintain referral relationships with professional mediators, counselors, and legal services as needed." + } + } + } + } + }, + { + id: "chosen-facilitator", + title: "Chosen Facilitator", + description: "A process where participants mutually select a facilitator to help guide their dispute resolution", + data: { + stages: { + intake: { + process_start: { + processStartText: "The process begins when a community member submits a dispute form to the Community Relations Committee. The form includes details about the issue, parties involved, and previous attempts at resolution. The committee acknowledges receipt within 24 hours." + }, + rules_access: { + rulesAccessText: "Community rules and the dispute resolution protocol are available on the community website and in a physical binder kept in the community center. New members receive an orientation to these guidelines when they join." + }, + information_access: { + informationAccessText: "Information is shared on a need-to-know basis. The Community Relations Committee keeps records of disputes, and the parties involved have access to all documentation related to their case. Annual anonymous statistics about disputes are shared with the community." + }, + participant_inclusion: { + participantInclusionText: "Within 48 hours of receiving a dispute form, the committee contacts all named parties and provides them with a copy of the form and information about the process. Each person confirms their willingness to participate and receives information about selecting a facilitator." + }, + participation_requirement: { + participationRequirementText: "Participation is voluntary, though all community members have agreed as part of their membership that they will make a good faith effort to resolve conflicts through the community process before pursuing outside remedies." + }, + participation_commitments: { + participationCommitmentsText: "Participants commit to: 1) Engaging honestly and respectfully, 2) Selecting a mutually acceptable facilitator, 3) Attending all scheduled sessions, 4) Respecting confidentiality, 5) Working toward resolution in good faith, and 6) Abiding by any agreements reached." + } + }, + process: { + preparation: { + preparationText: "Before the first facilitated session, each participant completes a preparation form describing their perspective on the issue, their needs, and possible solutions. They submit this to the facilitator at least 48 hours before the first meeting. The facilitator may have individual pre-meetings with participants." + }, + place: { + placeText: "Meetings take place in a neutral community space, typically a designated meeting room in the community center. The facilitator ensures the space is set up appropriately with comfortable seating, water, and any needed materials like whiteboard or flipchart." + }, + facilitation: { + facilitationText: "The process is guided by a facilitator chosen jointly by all participants from a list of community members who have expressed willingness to serve in this role. The facilitator has basic training in conflict resolution but is not a professional mediator. They help guide the conversation, ensure all voices are heard, and maintain focus on resolution." + }, + communication: { + communicationText: "The facilitator establishes ground rules at the beginning of the first session, such as: 1) One person speaks at a time, 2) Focus on issues rather than personal attacks, 3) Use respectful language, 4) Actively listen to understand, 5) Take breaks when needed, and 6) Maintain confidentiality." + }, + participation: { + participationText: "The primary participants and the facilitator attend all sessions. With agreement from all parties, participants may bring one support person to sessions. Support people may speak when invited but primarily provide emotional support and perspective between sessions." + }, + documentation: { + documentationText: "The facilitator takes notes capturing main discussion points and any agreements reached. These notes are shared with participants after each session for review and correction. Final agreements are documented in writing and signed by all participants." + } + }, + assessment: { + situation: { + situationText: "In the first session, the facilitator helps participants create a shared understanding of the situation by: 1) Having each person share their perspective without interruption, 2) Identifying areas of agreement and disagreement, 3) Clarifying facts versus interpretations, and 4) Establishing what resolution would look like." + }, + stage_of_conflict: { + stageOfConflictText: "The facilitator helps assess whether the conflict is: 1) A misunderstanding that can be clarified, 2) A disagreement about resources or procedures, 3) A values-based conflict, or 4) A relationship conflict with a history of tension. This assessment helps determine appropriate resolution approaches." + }, + needs: { + needsText: "The facilitator guides participants in identifying their underlying needs and interests beyond their stated positions. These might include needs for respect, autonomy, fairness, safety, belonging, or understanding. The facilitator helps frame the dispute in terms of compatible needs rather than opposing positions." + }, + evidence: { + evidenceText: "Relevant information is shared through the facilitator, who ensures all participants have access to the same information. The facilitator may request additional documentation or clarification as needed. Information is presented factually without accusatory language." + }, + jurisdiction: { + jurisdictionText: "The facilitator helps determine if the chosen facilitator process is appropriate for the dispute. If the issue involves serious safety concerns, legal violations, or requires specialized expertise, the facilitator will recommend delegation to a more appropriate resource." + } + }, + deliberation: { + information_gathering: { + informationGatheringText: "After initial perspectives are shared, the facilitator identifies information gaps and helps participants determine what additional information might be needed. They may assign 'homework' to gather specific information before the next session." + }, + brainstorming: { + brainstormingText: "The facilitator leads a structured brainstorming session where all possible solutions are recorded without criticism. They may use techniques such as round-robin contribution or written idea submission to ensure everyone's ideas are included." + }, + discussion: { + discussionText: "After brainstorming, the facilitator helps participants evaluate options based on previously identified needs and interests. They guide the discussion to focus on finding solutions that address the core concerns of all parties rather than positional bargaining." + }, + deliberation_format: { + deliberationFormatText: "Deliberation typically involves 1-3 sessions of 90-120 minutes each, scheduled about a week apart. This provides time for reflection between sessions. The facilitator sets a clear agenda for each session and manages time to ensure productive discussion." + } + }, + resolution: { + decision_making: { + decisionMakingText: "Decisions are made by consensus of the participants, with the facilitator helping to test whether proposed solutions are acceptable to everyone. The facilitator may use techniques like fist-to-five voting to gauge levels of support for proposals." + }, + outcomes: { + outcomesText: "Typical outcomes include: 1) Mutual understanding and clarified expectations, 2) Specific action agreements with timelines, 3) Changes to procedures or resources, 4) Commitments to specific communication practices, 5) Relationship-rebuilding activities, or 6) Agreements about future conflict resolution if issues arise again." + }, + agreement: { + agreementText: "The facilitator drafts a written agreement based on the decisions reached. The agreement includes specific, actionable items with timelines, how implementation will be verified, and a plan for addressing any future issues. All participants review, possibly revise, and sign the agreement." + }, + follow_up: { + followUpText: "The facilitator schedules a follow-up check-in 3-4 weeks after the agreement is reached. This may be a meeting or individual check-ins to assess whether the agreement is working and address any implementation challenges." + }, + announcement: { + announcementText: "The fact that a resolution has been reached may be shared with the Community Relations Committee, but the details remain confidential unless all participants agree to share specific information more widely." + } + }, + appeal: { + criteria: { + criteriaText: "Appeals may be initiated if: 1) New information emerges that could significantly affect the agreement, 2) Circumstances change making the agreement unworkable, 3) There are persistent challenges implementing the agreement, or 4) One or more participants feel the process was unfair." + }, + appeal_process: { + appealProcessText: "To appeal, a participant submits a written request to the Community Relations Committee explaining why they believe the agreement needs reconsideration. The committee reviews the request and contacts all original participants to determine next steps." + }, + appeal_deliberation: { + appealDeliberationText: "If an appeal proceeds, a new facilitator is selected from the community to provide fresh perspective. This facilitator reviews documentation from the original process and conducts a new series of facilitated sessions focusing on the specific issues raised in the appeal." + }, + appeal_resolution: { + appealResolutionText: "The appeal process results in either a confirmation of the original agreement, modifications to address specific concerns, or in some cases, a completely new agreement. The new or modified agreement is documented and signed by all participants." + } + }, + delegation: { + criteria: { + criteriaText: "Delegation to a different process is appropriate when: 1) The facilitated process has been attempted without success, 2) The issue requires specialized expertise (legal, financial, therapeutic, etc.), 3) There are significant power imbalances that can't be addressed by a peer facilitator, 4) Safety concerns exist, or 5) The dispute has community-wide implications." + }, + delegation_process: { + delegationProcessText: "The facilitator or Community Relations Committee may recommend delegation at any point in the process. They document the reason for delegation and what has been attempted so far. They then connect participants with appropriate resources, which may be within or outside the community." + }, + delegation_authority: { + delegationAuthorityText: "The Community Relations Committee maintains a resource list of professional mediators, counselors, restorative justice practitioners, and legal resources. They have established relationships with these providers and can make direct referrals when needed. The community has a small fund to assist with costs if financial barriers exist." + } + } + } + } + }, + { + id: "facilitation-council", + title: "Facilitation Council", + description: "A structured process with a trained council of facilitators who manage the dispute resolution process", + data: { + stages: { + intake: { + process_start: { + processStartText: "The dispute resolution process begins when an individual submits a formal request using the council's intake form. This form is available online and in hard copy at the community office. The form requires details about the nature of the dispute, parties involved, and previous resolution attempts. A member of the Facilitation Council acknowledges receipt within 24 hours and assigns an intake coordinator." + }, + rules_access: { + rulesAccessText: "Community rules, bylaws, and the detailed dispute resolution protocol are maintained in a searchable online database with version history. Physical copies are available in the community center library. The Facilitation Council conducts quarterly workshops to educate community members about the rules and processes." + }, + information_access: { + informationAccessText: "Information access follows a tiered model: 1) The involved parties and council members have full access to case documentation, 2) Council administrators track anonymized case data for process improvement, 3) Quarterly reports with statistical information and lessons learned (without identifying details) are shared with the community." + }, + participant_inclusion: { + participantInclusionText: "The intake coordinator contacts all named parties within 48 hours via email and phone. They receive an explanation of the process, a copy of the initial request, information about their rights and responsibilities, and a response form to complete within 5 days. The coordinator offers to meet with each party individually to answer questions about the process." + }, + participation_requirement: { + participationRequirementText: "Participation in the facilitation council process is required for active community members as specified in the community membership agreement. For non-members or in cases where mandatory participation would be inappropriate, the council works with willing participants and documents non-participation of others." + }, + participation_commitments: { + participationCommitmentsText: "Participants commit to: 1) Providing complete and truthful information, 2) Respecting confidentiality, 3) Attending all scheduled meetings, 4) Engaging respectfully with all parties and council members, 5) Following the structured process, 6) Implementing agreed-upon resolutions, and 7) Participating in scheduled follow-up. These commitments are formalized in writing at the start of the process." + } + }, + process: { + preparation: { + preparationText: "After intake, each party receives a preparation packet with: 1) A detailed statement form to document their perspective, 2) Instructions for gathering and submitting relevant evidence, 3) A guide for identifying potential witnesses, and 4) Reflection questions about desired outcomes. Parties have one week to complete these materials. Council members then review all materials before the first session and may request additional information." + }, + place: { + placeText: "The council maintains a dedicated dispute resolution room in the community center, designed specifically for these processes. The room features a round table, comfortable seating, good acoustics, privacy screens, and necessary technology for sharing information. For complex cases with many participants, larger spaces can be reserved. Virtual participation options are available when in-person attendance is impossible." + }, + facilitation: { + facilitationText: "Disputes are facilitated by a panel of 2-3 council members who have completed a comprehensive training program in conflict resolution, mediation, and restorative practices. The panel always includes diversity of perspectives and backgrounds. One member serves as the lead facilitator, while others may focus on documentation, process management, or emotional support. The council operates according to established procedures with flexibility to adapt to specific needs of each case." + }, + communication: { + communicationText: "The council establishes and enforces clear communication protocols: 1) A talking piece indicates who has the floor, 2) Structured speaking order ensures equal voice, 3) Time limits for presentations may be used, 4) Direct communication between parties is facilitated when productive, 5) Council members summarize and reframe statements to ensure understanding, 6) Caucus sessions (private meetings) are available when needed, and 7) Written communication supplements verbal discussion for complex topics." + }, + participation: { + participationText: "The process includes: 1) Primary parties to the dispute, 2) Council panel members, 3) Witnesses invited by either party or the council (for specific sessions only), 4) Support persons (one per participant, non-speaking unless invited), and 5) In cases affecting community standards, a community representative. For disputes involving allegations of harm, the council uses practices that prevent re-traumatization while ensuring fair process." + }, + documentation: { + documentationText: "A designated council member maintains detailed documentation including: 1) Written submissions from all parties, 2) Minutes of all meetings with key points and decisions, 3) Supporting evidence and witness statements, 4) Audio recordings of sessions (with permission), 5) Written agreements, and 6) Follow-up reports. Parties receive copies of all non-confidential documentation. Records are securely stored according to the council's data retention policy." + } + }, + assessment: { + situation: { + situationText: "The council conducts a structured assessment through: 1) Individual interviews with each party, 2) Review of written statements and evidence, 3) Consultation with relevant witnesses, 4) Consideration of applicable community agreements or policies, and 5) Discussion with the full council to identify the nature and scope of the dispute. The assessment is documented in a preliminary findings report shared with all parties." + }, + stage_of_conflict: { + stageOfConflictText: "The council uses a formal assessment framework to determine: 1) The history and duration of the conflict, 2) The level of emotion and polarization between parties, 3) Whether communication between parties is still functional, 4) If the dispute is escalating or de-escalating, 5) The underlying causes (structural, relational, value-based, etc.), and 6) The potential community impact. This assessment determines the appropriate intervention approach and timeline." + }, + needs: { + needsText: "The council works with each party to identify needs using a structured needs assessment tool that covers: 1) Physical needs (safety, resources, space), 2) Emotional needs (recognition, respect, belonging), 3) Procedural needs (voice, fairness, clarity), and 4) Identity needs (role, values, reputation). The council maps these needs to identify commonalities and differences, using this as a foundation for resolution options." + }, + evidence: { + evidenceText: "The council has established procedures for evidence collection and evaluation: 1) Parties submit evidence following standardized guidelines, 2) A designated council member reviews all submissions for relevance and completeness, 3) Evidence is categorized and indexed, 4) All parties have equal access to non-confidential evidence, 5) The council may request additional evidence or clarification, and 6) When factual disputes persist, the council may consult appropriate experts or additional witnesses." + }, + jurisdiction: { + jurisdictionText: "The council follows a jurisdictional assessment checklist to determine if the case is appropriate for their process. Cases involving serious legal violations, safety threats, or requiring specialized expertise beyond the council's capacity are referred to appropriate authorities. For complex cases, the council may establish jurisdiction over certain aspects while referring others. The assessment considers legal requirements, community capacity, and the nature of the dispute." + } + }, + deliberation: { + information_gathering: { + informationGatheringText: "The council uses a structured information gathering process: 1) Initial statements from all parties, 2) Clarifying questions from council members, 3) Testimony from relevant witnesses, 4) Review of documentary evidence, 5) Expert input if needed for technical matters, and 6) Community standard review when applicable. Information gathering follows a predetermined schedule with deadlines for submissions and specific session agendas." + }, + brainstorming: { + brainstormingText: "Facilitated brainstorming sessions use specific methodologies including: 1) Individual brainstorming where each party independently generates solutions, 2) Council-moderated joint sessions using visual mapping tools, 3) Structured brainstorming techniques such as nominal group process or rounds, and 4) Consideration of precedents from similar cases. All options are documented without evaluation during the brainstorming phase." + }, + discussion: { + discussionText: "Discussion follows a structured format: 1) Review of brainstormed options, 2) Evaluation against previously identified needs and community values, 3) Consideration of implementation feasibility, 4) Discussion of modifications to promising options, 5) Council-facilitated negotiations on specific details, and 6) Caucus sessions when needed for private discussion. The council maintains focus on interests rather than positions and ensures balanced participation." + }, + deliberation_format: { + deliberationFormatText: "The council uses a multi-stage deliberation format: 1) Preliminary council-only meeting to review all materials and plan the process, 2) Joint sessions with all parties following a structured agenda, 3) Separate sessions with individual parties as needed, 4) Council executive sessions to assess progress and adjust process, 5) Final resolution session(s). Most cases involve 3-5 sessions of 2-3 hours each over a 2-4 week period, with a detailed schedule provided at the outset." + } + }, + resolution: { + decision_making: { + decisionMakingText: "The council uses a tiered decision-making approach: 1) Facilitated consensus among parties is the preferred method, with the council helping parties reach mutually acceptable agreements, 2) If consensus cannot be reached on all issues after good faith efforts, parties may authorize the council to make recommendations on specific points, 3) In cases involving community standards or policies, the council may make binding decisions following established criteria. The basis for all decisions is documented." + }, + outcomes: { + outcomesText: "Resolution outcomes may include: 1) Written agreements between parties with specific commitments, 2) Action plans with timelines and accountability measures, 3) Restorative agreements to address harm, 4) Resource allocation decisions, 5) Clarification of policies or expectations, 6) Structural changes to prevent future conflicts, 7) Educational or training requirements, and 8) Recommendations to community governance bodies for policy changes. All outcomes include clear implementation plans." + }, + agreement: { + agreementText: "Agreements are documented using a standard format that includes: 1) Names and roles of all parties, 2) Summary of the dispute and process, 3) Specific agreements with detailed action items, 4) Timelines for implementation, 5) Verification methods, 6) Consequences for non-compliance if applicable, 7) Privacy and communication guidelines, 8) Follow-up schedule, 9) Process for addressing future disputes or agreement modifications, and 10) Signatures of all parties and facilitating council members." + }, + follow_up: { + followUpText: "The council implements a multi-stage follow-up process: 1) Initial check-in 2 weeks after agreement, 2) Formal review meeting at 1-3 months, 3) Final assessment at 6 months, 4) Additional check-ins as specified in the agreement. A designated council member serves as agreement monitor, collecting implementation evidence and facilitating resolution of any implementation challenges." + }, + announcement: { + announcementText: "The council follows structured guidelines for announcements: 1) Parties and council members agree on what information will be shared, 2) A brief, factual summary is prepared noting that a resolution has been reached (without private details), 3) Any community-wide implications or policy changes are communicated through established channels, 4) In cases of broad community impact, educational sessions may be held to share lessons learned while respecting confidentiality, 5) Statistical information is included in quarterly council reports." + } + }, + appeal: { + criteria: { + criteriaText: "Appeals may be filed when: 1) New, significant evidence emerges that was not available during the original process, 2) There was a substantial procedural error that may have affected the outcome, 3) The agreement has proven unworkable despite good faith implementation efforts, or 4) There has been a significant change in circumstances that renders the agreement ineffective. Appeals must be filed within 30 days of discovering the grounds for appeal." + }, + appeal_process: { + appealProcessText: "The appeal process includes: 1) Submission of a formal appeal request specifying grounds for appeal and desired outcome, 2) Review by council members not involved in the original case to determine if appeal criteria are met, 3) Notification to all original parties, 4) If accepted, assignment of a new council panel, 5) Structured review of original documentation and new evidence, 6) Limited-scope hearings focused on appeal issues, 7) Decision rendered within 30 days of appeal acceptance." + }, + appeal_deliberation: { + appealDeliberationText: "Appeal deliberations follow a specialized process: 1) The appeal panel first reviews all documentation from the original process, 2) New evidence or procedural concerns are examined in detail, 3) Limited testimony may be heard specifically related to appeal grounds, 4) The panel deliberates using a structured framework for evaluating whether the original outcome should stand, be modified, or be replaced, 5) Deliberations are documented with specific reasoning for decisions." + }, + appeal_resolution: { + appealResolutionText: "Appeal resolutions are documented in a formal decision that includes: 1) Summary of the original case and resolution, 2) Grounds for appeal and additional evidence considered, 3) Analysis of how the appeal criteria were or were not met, 4) Specific modifications to the original agreement if applicable, 5) Implementation plan for any changes, 6) Statement of finality indicating whether further appeals are possible, and 7) Signatures of appeal panel members. All parties receive this document and acknowledge receipt." + } + }, + delegation: { + criteria: { + criteriaText: "Cases are delegated when: 1) They involve legal issues beyond the council's authority, 2) Specialized expertise is required (legal, psychological, financial, etc.), 3) Safety concerns exceed the council's capacity to address, 4) Conflicts of interest make impartial council deliberation impossible, 5) The case has implications beyond the immediate community requiring broader involvement, or 6) Multiple attempts at resolution through the council process have failed." + }, + delegation_process: { + delegationProcessText: "The delegation process involves: 1) Identification of delegation need either at intake or during the process, 2) Council deliberation and formal vote on delegation recommendation, 3) Documentation of reasons for delegation and process to date, 4) Consultation with parties about appropriate external resources, 5) Formal referral including transfer of relevant documentation (with permission), 6) Assignment of a council liaison to support transition and maintain communication, 7) Closure of the council process with clear communication about next steps." + }, + delegation_authority: { + delegationAuthorityText: "The council maintains formal relationships with: 1) A panel of professional mediators with different specializations, 2) Legal resources including community legal aid, 3) Mental health professionals for cases involving trauma or psychological concerns, 4) Restorative justice practitioners for cases involving harm, 5) Subject matter experts in relevant fields, and 6) Regional conflict resolution centers. Annual budget is allocated for professional services when needed, and financial assistance is available to ensure access regardless of ability to pay." + } + } + } + } + } +]; + +// Make sure rawProtocolTemplates is available globally +window.rawProtocolTemplates = rawProtocolTemplates; \ No newline at end of file diff --git a/static/js/debug.js b/static/js/debug.js new file mode 100644 index 0000000..7506118 --- /dev/null +++ b/static/js/debug.js @@ -0,0 +1,26 @@ +console.log('Testing toggle button functionality'); + +// Debug script to inspect template loading +console.log("Debug script loaded"); + +document.addEventListener('DOMContentLoaded', function() { + console.log("DOM loaded in debug script"); + + // Log raw templates + console.log("Raw Protocol Templates:", typeof rawProtocolTemplates !== 'undefined' ? rawProtocolTemplates.length : "undefined"); + if (typeof rawProtocolTemplates !== 'undefined') { + console.log("Template titles:", rawProtocolTemplates.map(t => t.title)); + } + + // Log processed templates + setTimeout(() => { + const templateSelect = document.getElementById('protocol-template'); + if (templateSelect) { + console.log("Template options:", templateSelect.options.length); + const options = Array.from(templateSelect.options).map(o => o.textContent); + console.log("Option texts:", options); + } else { + console.log("Template select element not found"); + } + }, 1000); +}); diff --git a/static/js/fix-dropdown.js b/static/js/fix-dropdown.js new file mode 100644 index 0000000..1960fe6 --- /dev/null +++ b/static/js/fix-dropdown.js @@ -0,0 +1,25 @@ +// Make sure the dropdown works correctly +document.addEventListener('DOMContentLoaded', function() { + const exportBtn = document.getElementById('export-btn'); + const dropdownMenu = document.querySelector('.dropdown-menu'); + + if (exportBtn && dropdownMenu) { + // Force clear any previous event listeners + const newExportBtn = exportBtn.cloneNode(true); + exportBtn.parentNode.replaceChild(newExportBtn, exportBtn); + + // Add event listener to the new button + newExportBtn.addEventListener('click', function(e) { + e.preventDefault(); + e.stopPropagation(); + dropdownMenu.style.display = dropdownMenu.style.display === 'block' ? 'none' : 'block'; + }); + + // Close dropdown when clicking elsewhere + document.addEventListener('click', function(e) { + if (newExportBtn && \!newExportBtn.contains(e.target) && dropdownMenu && \!dropdownMenu.contains(e.target)) { + dropdownMenu.style.display = 'none'; + } + }); + } +}); diff --git a/static/js/modules-page.js b/static/js/modules-page.js new file mode 100644 index 0000000..f8aa0ee --- /dev/null +++ b/static/js/modules-page.js @@ -0,0 +1,695 @@ +document.addEventListener('DOMContentLoaded', function() { + console.log('Modules page initializing...'); + + // Reference to container and filters + const modulesContainer = document.getElementById('modules-container'); + const moduleSearch = document.getElementById('module-search'); + const stageFilter = document.getElementById('stage-filter'); + const componentFilter = document.getElementById('component-filter'); + const templateFilter = document.getElementById('template-filter'); + + // Data structures + let allModules = []; + let stageNames = {}; + let componentNames = {}; + let templateUsage = {}; + let processedTemplates = []; + + // Functions + function initializeData() { + console.log('Initializing data...'); + + // Check if data is available + if (typeof moduleData === 'undefined') { + console.error('Error: moduleData is undefined'); + modulesContainer.innerHTML = '
Error: Module data not available
'; + return false; + } + + if (typeof rawProtocolTemplates === 'undefined' || typeof templateMapper === 'undefined') { + console.error('Error: Template data or mapper not available'); + modulesContainer.innerHTML = '
Error: Template data not available
'; + return false; + } + + // Log what we're working with + console.log('Module categories:', Object.keys(moduleData)); + console.log('Templates count:', rawProtocolTemplates.length); + + try { + // Process templates + rawProtocolTemplates.forEach(template => { + const processedTemplate = templateMapper.convertTemplateToModules(template, moduleData); + processedTemplates.push(processedTemplate); + }); + + // Collect all modules into a flat array + for (const category in moduleData) { + moduleData[category].forEach(module => { + // Add category to module + module.category = category; + + // Initialize template usage + module.usedInTemplates = []; + + // Ensure all modules have a componentId - no uncategorized modules allowed + if (!module.componentId) { + // Try to infer from category first + if (category !== 'uncategorized') { + console.log(`Module ${module.id} missing componentId, using category: ${category}`); + module.componentId = category; + } + // If that doesn't work, infer from title or content + else { + // First, try to find clues in the title + if (module.title) { + const titleLower = module.title.toLowerCase(); + // Check for key component names in the title + if (titleLower.includes('principle')) module.componentId = 'principles'; + else if (titleLower.includes('process')) module.componentId = 'process'; + else if (titleLower.includes('assessment')) module.componentId = 'assessment'; + else if (titleLower.includes('intake')) module.componentId = 'intake'; + else if (titleLower.includes('appeal')) module.componentId = 'appeal'; + else if (titleLower.includes('deliberat')) module.componentId = 'deliberation'; + else if (titleLower.includes('resolut')) module.componentId = 'resolution'; + else if (titleLower.includes('facilit')) module.componentId = 'facilitation'; + else if (titleLower.includes('particip')) module.componentId = 'participants'; + else if (titleLower.includes('file') || titleLower.includes('submit')) module.componentId = 'filing'; + else if (titleLower.includes('notif') || titleLower.includes('inform')) module.componentId = 'notification'; + else if (titleLower.includes('delegat')) module.componentId = 'delegation'; + else module.componentId = 'process'; // Default to process + } + // If no title clues, check content + else if (module.content) { + const contentLower = module.content.toLowerCase(); + // Same checks in content + if (contentLower.includes('principle')) module.componentId = 'principles'; + else if (contentLower.includes('process')) module.componentId = 'process'; + else if (contentLower.includes('assessment')) module.componentId = 'assessment'; + else if (contentLower.includes('intake')) module.componentId = 'intake'; + else if (contentLower.includes('appeal')) module.componentId = 'appeal'; + else if (contentLower.includes('deliberat')) module.componentId = 'deliberation'; + else if (contentLower.includes('resolut')) module.componentId = 'resolution'; + else if (contentLower.includes('facilit')) module.componentId = 'facilitation'; + else if (contentLower.includes('particip')) module.componentId = 'participants'; + else if (contentLower.includes('file') || contentLower.includes('submit')) module.componentId = 'filing'; + else if (contentLower.includes('notif') || contentLower.includes('inform')) module.componentId = 'notification'; + else if (contentLower.includes('delegat')) module.componentId = 'delegation'; + else module.componentId = 'process'; // Default to process + } + // Last resort default + else { + module.componentId = 'process'; + } + + console.log(`Module ${module.id} had no componentId, assigned to: ${module.componentId}`); + } + } + + // Add to all modules array + allModules.push(module); + }); + } + + console.log('Total modules collected:', allModules.length); + + // Track which templates use each module + processedTemplates.forEach(template => { + for (const stageId in template.moduleRefs) { + if (!stageNames[stageId]) { + // Create a readable stage name + stageNames[stageId] = stageId.charAt(0).toUpperCase() + stageId.slice(1).replace(/_/g, ' '); + } + + for (const componentId in template.moduleRefs[stageId]) { + if (!componentNames[componentId]) { + // Create a readable component name + componentNames[componentId] = componentId.charAt(0).toUpperCase() + componentId.slice(1).replace(/_/g, ' '); + } + + for (const fieldId in template.moduleRefs[stageId][componentId]) { + const moduleId = template.moduleRefs[stageId][componentId][fieldId]; + + // Find the module with this id + const matchingModule = allModules.find(m => m.id === moduleId); + if (matchingModule) { + // Add template to module's usage + if (!matchingModule.usedInTemplates.includes(template.title)) { + matchingModule.usedInTemplates.push(template.title); + } + + // Set stage and component for the module if not already set + if (!matchingModule.stageId) { + matchingModule.stageId = stageId; + } + + // Track template usage + if (!templateUsage[template.title]) { + templateUsage[template.title] = []; + } + if (!templateUsage[template.title].includes(moduleId)) { + templateUsage[template.title].push(moduleId); + } + } + } + } + } + }); + + // Define official stages from YAML file + const officialStages = { + 'intake': 'Intake', + 'process': 'Process', + 'assessment': 'Assessment', + 'deliberation': 'Deliberation', + 'resolution': 'Resolution', + 'appeal': 'Appeal', + 'delegation': 'Delegation' + }; + + // Define official components with standardized display names + const officialComponents = { + // Process stage components + 'principles': 'Principles', + 'community_values': 'Values', + 'participants': 'Participants', + 'facilitation': 'Facilitation', + 'ground_rules': 'Ground Rules', + 'skills': 'Skills', + + // Intake stage components + 'process_start': 'Process Start', + 'filing': 'Filing', + 'notification': 'Notification', + 'rules_access': 'Rules Access', + 'information_access': 'Information Access', + 'participant_inclusion': 'Participant Inclusion', + + // Assessment stage components + 'dispute_assessment': 'Assessment', + 'values_adherence': 'Values Adherence', + 'jurisdiction': 'Jurisdiction', + + // Deliberation stage components + 'deliberation_process': 'Deliberation Process', + 'additional_voices': 'Additional Voices', + 'deliberation_conclusion': 'Deliberation Conclusion', + + // Resolution stage components + 'resolution_process': 'Resolution Process', + 'resolution_failure': 'Resolution Failure', + + // Appeal stage components + 'appeal_criteria': 'Appeal Criteria', + 'appeal_process': 'Appeal Process', + + // Delegation stage components + 'delegation_options': 'Delegation Options' + }; + + // Map all component IDs (including custom ones) to official stages + const componentToStageMap = { + // Process stage components + 'principles': 'process', + 'community_values': 'process', + 'participants': 'process', + 'facilitation': 'process', + 'ground_rules': 'process', + 'skills': 'process', + 'values': 'process', + 'agreements': 'process', + 'participation_commitments': 'process', + + // Intake stage components + 'process_start': 'intake', + 'filing': 'intake', + 'notification': 'intake', + 'rules_access': 'intake', + 'information_access': 'intake', + 'participant_inclusion': 'intake', + 'reporting': 'intake', + + // Assessment stage components + 'dispute_assessment': 'assessment', + 'values_adherence': 'assessment', + 'jurisdiction': 'assessment', + 'non_participation': 'assessment', + + // Deliberation stage components + 'deliberation_process': 'deliberation', + 'additional_voices': 'deliberation', + 'deliberation_conclusion': 'deliberation', + 'decision_making': 'deliberation', + 'discussion': 'deliberation', + + // Resolution stage components + 'resolution_process': 'resolution', + 'resolution_failure': 'resolution', + + // Appeal stage components + 'appeal_criteria': 'appeal', + 'appeal_process': 'appeal', + 'appeal_deliberation': 'appeal', + 'appeal_resolution': 'appeal', + + // Delegation stage components + 'delegation_options': 'delegation' + }; + + // Map non-standard components to official ones + const componentMapping = { + 'direct_conversation': 'deliberation_process', + 'conflict_awareness': 'dispute_assessment', + 'accessing_help': 'process_start', + 'preparation': 'principles', + 'selection': 'participant_inclusion', + 'criteria': 'appeal_criteria', + 'agreement': 'resolution_process', + 'process': 'principles', + 'process_change': 'resolution_failure', + 'assessment': 'dispute_assessment', + 'situation': 'dispute_assessment', + 'reflection': 'deliberation_conclusion', + 'monitoring': 'dispute_assessment', + 'participation_requirement': 'participant_inclusion' + }; + + allModules.forEach(module => { + // If module has no stageId, try to infer from category + if (!module.stageId && module.category) { + // Check if category matches a known stage + if (stageNames[module.category]) { + module.stageId = module.category; + } else { + // Use category as stageId if not already recognized + module.stageId = module.category; + // Create a readable stage name from category + stageNames[module.category] = module.category.charAt(0).toUpperCase() + + module.category.slice(1).replace(/_/g, ' '); + } + } + + // If still no stageId, try to infer from componentId using the mapping + if (!module.stageId && module.componentId) { + const mappedStage = componentToStageMap[module.componentId]; + if (mappedStage) { + module.stageId = mappedStage; + console.log(`Module ${module.id} missing stageId, inferred from component: ${mappedStage}`); + } else { + // Default stage if no mapping exists + module.stageId = 'process'; + console.log(`Module ${module.id} missing stageId, defaulting to: process`); + } + } + + // If STILL no stageId (somehow), assign to process + if (!module.stageId) { + module.stageId = 'process'; + console.log(`Module ${module.id} had no stageId, assigned to: process`); + } + + // Force module to use only official stages + if (officialStages[module.stageId]) { + // Use official stage name + module.stageName = officialStages[module.stageId]; + } else { + // Map to closest official stage + const mappedStage = componentToStageMap[module.componentId]; + if (mappedStage && officialStages[mappedStage]) { + module.stageId = mappedStage; + module.stageName = officialStages[mappedStage]; + console.log(`Module ${module.id} had invalid stage "${module.stageId}", remapped to: ${mappedStage}`); + } else { + // Default to Process stage if can't map anywhere else + module.stageId = 'process'; + module.stageName = officialStages['process']; + console.log(`Module ${module.id} had invalid stage "${module.stageId}", defaulting to: Process`); + } + } + + // Handle component mapping for non-standard components + if (componentMapping[module.componentId]) { + const originalComponentId = module.componentId; + module.componentId = componentMapping[originalComponentId]; + console.log(`Module ${module.id} had non-standard component "${originalComponentId}", mapped to: ${module.componentId}`); + } + + // Set a readable component name using official list + if (officialComponents[module.componentId]) { + module.componentName = officialComponents[module.componentId]; + } else { + // Generate a readable name for custom components + module.componentName = module.componentId.charAt(0).toUpperCase() + + module.componentId.slice(1).replace(/_/g, ' '); + + // Log any component not in the official list + console.log(`Module ${module.id} uses custom component: ${module.componentId}`); + } + }); + + // Log the distribution of modules by stage + const stageDistribution = {}; + allModules.forEach(module => { + stageDistribution[module.stageName] = (stageDistribution[module.stageName] || 0) + 1; + }); + console.log('Module distribution by stage:', stageDistribution); + + console.log('Data initialization complete'); + console.log('Stages:', Object.keys(stageNames)); + console.log('Components:', Object.keys(componentNames)); + console.log('Templates:', Object.keys(templateUsage)); + + return true; + } catch (error) { + console.error('Error initializing data:', error); + modulesContainer.innerHTML = `
Error initializing data: ${error.message}
`; + return false; + } + } + + function populateFilters() { + console.log('Populating filters...'); + + // Clear existing options + stageFilter.innerHTML = ''; + componentFilter.innerHTML = ''; + templateFilter.innerHTML = ''; + + // Get unique stages and components + const stages = [...new Set(allModules.map(m => m.stageName))].sort(); + const components = [...new Set(allModules.map(m => m.componentName))].sort(); + const templates = Object.keys(templateUsage).sort(); + + console.log('Filter options - Stages:', stages); + console.log('Filter options - Components:', components); + console.log('Filter options - Templates:', templates); + + // Add options to filters + stages.forEach(stage => { + const option = document.createElement('option'); + option.value = stage; + option.textContent = stage; + stageFilter.appendChild(option); + }); + + components.forEach(component => { + const option = document.createElement('option'); + option.value = component; + option.textContent = component; + componentFilter.appendChild(option); + }); + + templates.forEach(template => { + const option = document.createElement('option'); + option.value = template; + option.textContent = template; + templateFilter.appendChild(option); + }); + } + + function renderModules() { + console.log('Rendering modules...'); + + // Clear container + modulesContainer.innerHTML = ''; + + // Get filter values + const searchText = moduleSearch.value.toLowerCase(); + const stageValue = stageFilter.value; + const componentValue = componentFilter.value; + const templateValue = templateFilter.value; + + console.log('Filter values:', { + search: searchText, + stage: stageValue, + component: componentValue, + template: templateValue + }); + + // Create a stage-based organization of modules + const modulesByStage = {}; + + // Filter modules based on search and filter criteria + allModules.forEach(module => { + // Check if module matches search text + const matchesSearch = searchText === '' || + module.title.toLowerCase().includes(searchText) || + (module.content && module.content.toLowerCase().includes(searchText)); + + // Check if module matches stage filter + const matchesStage = stageValue === '' || module.stageName === stageValue; + + // Check if module matches component filter + const matchesComponent = componentValue === '' || module.componentName === componentValue; + + // Check if module matches template filter + const matchesTemplate = templateValue === '' || + module.usedInTemplates.includes(templateValue); + + // Include module if it matches all criteria + if (matchesSearch && matchesStage && matchesComponent && matchesTemplate) { + // Initialize stage object if not exists + if (!modulesByStage[module.stageName]) { + modulesByStage[module.stageName] = []; + } + + // Add module to its stage + modulesByStage[module.stageName].push(module); + } + }); + + // Sort stages according to the official order from the YAML file + const stageOrder = [ + 'Intake', 'Process', 'Assessment', + 'Deliberation', 'Resolution', 'Appeal', 'Delegation' + ]; + + // Get all stages from the data + const availableStages = Object.keys(modulesByStage); + + // Sort stages according to the defined order, with any others at the end + const sortedStages = []; + + // First add stages in the predefined order (if they exist in the data) + stageOrder.forEach(stage => { + if (availableStages.includes(stage)) { + sortedStages.push(stage); + } + }); + + // Then add any other stages not in the predefined order (sorted alphabetically) + availableStages + .filter(stage => !stageOrder.includes(stage)) + .sort() + .forEach(stage => sortedStages.push(stage)); + + // If no modules match, show message + if (sortedStages.length === 0) { + modulesContainer.innerHTML = '
No modules match your search criteria
'; + return; + } + + // Create HTML for each stage and its modules + sortedStages.forEach(stageName => { + const stageModules = modulesByStage[stageName]; + + // Create stage section using similar structure to builder + const stageSection = document.createElement('div'); + stageSection.className = 'stage-section'; + + // Create stage header + const stageHeader = document.createElement('div'); + stageHeader.className = 'stage-header'; + + const stageHeaderContent = document.createElement('div'); + stageHeaderContent.className = 'stage-header-content'; + stageHeaderContent.innerHTML = ` +

${stageName}

+
+ Contains ${stageModules.length} module${stageModules.length !== 1 ? 's' : ''} +
+ `; + + // Create toggle button + const toggleBtn = document.createElement('button'); + toggleBtn.className = 'toggle-btn'; + toggleBtn.innerHTML = '+'; + toggleBtn.setAttribute('aria-label', 'Toggle stage content'); + + stageHeader.appendChild(stageHeaderContent); + stageHeader.appendChild(toggleBtn); + stageSection.appendChild(stageHeader); + + // Create stage body + const stageBody = document.createElement('div'); + stageBody.className = 'stage-body'; + stageBody.style.display = 'none'; + + // Group modules by component + const modulesByComponent = {}; + stageModules.forEach(module => { + // Use just the component name without duplicating stage info + const cleanComponentName = module.componentName.replace(module.stageName, '').trim(); + const displayComponentName = cleanComponentName || module.componentName; + + if (!modulesByComponent[displayComponentName]) { + modulesByComponent[displayComponentName] = []; + } + modulesByComponent[displayComponentName].push(module); + }); + + // Sort components + const sortedComponents = Object.keys(modulesByComponent).sort(); + + // Create components container + const componentsContainer = document.createElement('div'); + componentsContainer.className = 'components'; + + // Create component sections + sortedComponents.forEach(componentName => { + const componentModules = modulesByComponent[componentName]; + + // Create a component group heading with count + const componentHeading = document.createElement('h3'); + componentHeading.className = 'component-group-heading'; + + // Create main text + const headingText = document.createTextNode(componentName); + componentHeading.appendChild(headingText); + + // Add count in parentheses + const moduleCount = componentModules.length; + const countSpan = document.createElement('span'); + countSpan.className = 'component-module-count'; + countSpan.textContent = ` (${moduleCount} module${moduleCount !== 1 ? 's' : ''})`; + componentHeading.appendChild(countSpan); + + componentsContainer.appendChild(componentHeading); + + // Add modules to component section + componentModules.forEach(module => { + const moduleCard = createModuleCard(module); + componentsContainer.appendChild(moduleCard); + }); + }); + + stageBody.appendChild(componentsContainer); + stageSection.appendChild(stageBody); + + // Add toggle functionality + stageHeaderContent.addEventListener('click', function() { + if (stageBody.style.display === 'none') { + stageBody.style.display = 'block'; + toggleBtn.innerHTML = '−'; + } else { + stageBody.style.display = 'none'; + toggleBtn.innerHTML = '+'; + } + }); + + toggleBtn.addEventListener('click', function(e) { + e.stopPropagation(); + if (stageBody.style.display === 'none') { + stageBody.style.display = 'block'; + toggleBtn.innerHTML = '−'; + } else { + stageBody.style.display = 'none'; + toggleBtn.innerHTML = '+'; + } + }); + + modulesContainer.appendChild(stageSection); + }); + + console.log('Modules rendering complete'); + } + + function createModuleCard(module) { + const card = document.createElement('div'); + card.className = 'component-card'; + card.dataset.id = module.id; + + // Format templates list + const templatesList = module.usedInTemplates.length > 0 + ? module.usedInTemplates.join(', ') + : 'Not used in any template'; + + // Create card content with structure similar to builder component + card.innerHTML = ` +
+

${module.title}

+
+
+
+ ${module.stageName} + ${module.componentName} +
+
+ +
+
+ Used in templates: ${templatesList} +
+
+ `; + + // Make the header clickable to toggle content visibility + const header = card.querySelector('.component-header'); + const body = card.querySelector('.component-body'); + + // Add toggle button to the header (already positioned by CSS flexbox) + const toggleBtn = document.createElement('button'); + toggleBtn.className = 'toggle-btn'; + toggleBtn.innerHTML = '+'; + toggleBtn.setAttribute('aria-label', 'Toggle module content'); + header.appendChild(toggleBtn); + + // Start with content hidden + body.style.display = 'none'; + + // Toggle functionality + function toggleContent() { + if (body.style.display === 'none') { + body.style.display = 'block'; + toggleBtn.innerHTML = '−'; + card.classList.add('expanded'); + } else { + body.style.display = 'none'; + toggleBtn.innerHTML = '+'; + card.classList.remove('expanded'); + } + } + + header.addEventListener('click', toggleContent); + + return card; + } + + // Initialize page + function init() { + console.log('Initializing modules page...'); + + // Load data + if (!initializeData()) { + console.error('Failed to initialize data'); + return; + } + + // Populate filters + populateFilters(); + + // Render modules + renderModules(); + + // Add event listeners to filters + moduleSearch.addEventListener('input', renderModules); + stageFilter.addEventListener('change', renderModules); + componentFilter.addEventListener('change', renderModules); + templateFilter.addEventListener('change', renderModules); + + console.log('Modules page initialized with', allModules.length, 'modules'); + } + + // Start initialization + init(); +}); \ No newline at end of file diff --git a/themes/dispute-protocol-theme/LICENSE b/themes/dispute-protocol-theme/LICENSE new file mode 100644 index 0000000..1c9f1ba --- /dev/null +++ b/themes/dispute-protocol-theme/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2025 YOUR_NAME_HERE + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/themes/dispute-protocol-theme/archetypes/default.md b/themes/dispute-protocol-theme/archetypes/default.md new file mode 100644 index 0000000..ac36e06 --- /dev/null +++ b/themes/dispute-protocol-theme/archetypes/default.md @@ -0,0 +1,2 @@ ++++ ++++ diff --git a/themes/dispute-protocol-theme/layouts/404.html b/themes/dispute-protocol-theme/layouts/404.html new file mode 100644 index 0000000..e69de29 diff --git a/themes/dispute-protocol-theme/layouts/_default/baseof.html b/themes/dispute-protocol-theme/layouts/_default/baseof.html new file mode 100644 index 0000000..5f8e2ec --- /dev/null +++ b/themes/dispute-protocol-theme/layouts/_default/baseof.html @@ -0,0 +1,11 @@ + + + {{- partial "head.html" . -}} + + {{- partial "header.html" . -}} +
+ {{- block "main" . }}{{- end }} +
+ {{- partial "footer.html" . -}} + + diff --git a/themes/dispute-protocol-theme/layouts/_default/builder.html b/themes/dispute-protocol-theme/layouts/_default/builder.html new file mode 100644 index 0000000..f88efac --- /dev/null +++ b/themes/dispute-protocol-theme/layouts/_default/builder.html @@ -0,0 +1,290 @@ +{{ define "main" }} +
+

{{ .Title }}

+ {{ .Content }} + +
+
+ + +
+ + +
+ +
+ {{ range $.Site.Data.stages.stages }} +
+
+
+

{{ .title }}

+

{{ .description }}

+
+ +
+
+
+ {{ $stageId := .id }} + {{ $componentFile := printf "%s" $stageId }} + {{ range index $.Site.Data.components $componentFile }} + {{ $componentId := .id }} +
+
+
+
{{ $componentId | humanize }}
+

{{ .title }}

+
+
+
+ {{ range .fields }} +
+
+ + +
+ + +
+ {{ end }} +
+
+ {{ end }} +
+
+
+ {{ end }} +
+ + + +
+ +
+ + + +
+
+
+ + + +{{ end }} \ No newline at end of file diff --git a/themes/dispute-protocol-theme/layouts/_default/list.html b/themes/dispute-protocol-theme/layouts/_default/list.html new file mode 100644 index 0000000..e69de29 diff --git a/themes/dispute-protocol-theme/layouts/_default/modules.html b/themes/dispute-protocol-theme/layouts/_default/modules.html new file mode 100644 index 0000000..60fe0e9 --- /dev/null +++ b/themes/dispute-protocol-theme/layouts/_default/modules.html @@ -0,0 +1,36 @@ +{{ define "main" }} +
+ + +
+ {{ .Content }} +
+ +
+ + + + +
+ +
+ +
Loading modules...
+
+
+ + + + + + +{{ end }} \ No newline at end of file diff --git a/themes/dispute-protocol-theme/layouts/_default/single.html b/themes/dispute-protocol-theme/layouts/_default/single.html new file mode 100644 index 0000000..bc17c6d --- /dev/null +++ b/themes/dispute-protocol-theme/layouts/_default/single.html @@ -0,0 +1,7 @@ +{{ define "main" }} +
+
+ {{ .Content }} +
+
+{{ end }} \ No newline at end of file diff --git a/themes/dispute-protocol-theme/layouts/index.html b/themes/dispute-protocol-theme/layouts/index.html new file mode 100644 index 0000000..74857df --- /dev/null +++ b/themes/dispute-protocol-theme/layouts/index.html @@ -0,0 +1,26 @@ +{{ define "main" }} +
+
+

{{ .Title }}

+

Create a customized dispute resolution protocol for your community

+ Start Building + Learn More +
+ +
+ {{ .Content }} +
+ +
+

The Dispute Resolution Process

+
+ {{ range $.Site.Data.stages.stages }} +
+

{{ .title }}

+

{{ .description }}

+
+ {{ end }} +
+
+
+{{ end }} \ No newline at end of file diff --git a/themes/dispute-protocol-theme/layouts/partials/footer.html b/themes/dispute-protocol-theme/layouts/partials/footer.html new file mode 100644 index 0000000..872bbdc --- /dev/null +++ b/themes/dispute-protocol-theme/layouts/partials/footer.html @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/themes/dispute-protocol-theme/layouts/partials/head.html b/themes/dispute-protocol-theme/layouts/partials/head.html new file mode 100644 index 0000000..44fc252 --- /dev/null +++ b/themes/dispute-protocol-theme/layouts/partials/head.html @@ -0,0 +1,36 @@ + + + + {{ .Title }} | {{ .Site.Title }} + + + + + + + + + + + + {{ if eq .Layout "builder" }} + + + + + + {{ end }} + + + {{ range .Site.Params.customJS }} + {{ if not (in . "modules.js" ) }} + {{ if not (in . "templates.js" ) }} + {{ if not (in . "template-mapper.js" ) }} + {{ if not (in . "builder.js" ) }} + + {{ end }} + {{ end }} + {{ end }} + {{ end }} + {{ end }} + \ No newline at end of file diff --git a/themes/dispute-protocol-theme/layouts/partials/header.html b/themes/dispute-protocol-theme/layouts/partials/header.html new file mode 100644 index 0000000..f7716e0 --- /dev/null +++ b/themes/dispute-protocol-theme/layouts/partials/header.html @@ -0,0 +1,15 @@ +
+ +
\ No newline at end of file diff --git a/themes/dispute-protocol-theme/theme.toml b/themes/dispute-protocol-theme/theme.toml new file mode 100644 index 0000000..8dc2889 --- /dev/null +++ b/themes/dispute-protocol-theme/theme.toml @@ -0,0 +1,21 @@ +# theme.toml template for a Hugo theme +# See https://github.com/gohugoio/hugoThemes#themetoml for an example + +name = "Dispute Protocol Theme" +license = "MIT" +licenselink = "https://github.com/yourname/yourtheme/blob/master/LICENSE" +description = "" +homepage = "http://example.com/" +tags = [] +features = [] +min_version = "0.41.0" + +[author] + name = "" + homepage = "" + +# If porting an existing theme +[original] + name = "" + homepage = "" + repo = ""