Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

5.8 KB
Raw Blame
{
  "scenario": "team-perms",
  "description": "One team (acme: alice owner, bob + erin admin, carol member), dave collaborates via channels without being on the team, eve is an outsider. erin is a second admin with edit shares on all of Alice's documents and tasks — a full-edit-access teammate (edit is the highest grantable share level; ownership stays with alice). The Acme members carry team_subscriber + sub_opus like real paying-team members (join_team grants exactly those); dave is a solo professional_subscriber; eve is a free account. Exercises owner/user/team/channel/public/project/delegation access edges across every entity type.",
  "users": {
    "alice": {
      "email": "[email protected]",
      "first_name": "Alice",
      "roles": ["team_subscriber", "sub_opus"]
    },
    "bob": {
      "email": "[email protected]",
      "first_name": "Bob",
      "roles": ["team_subscriber", "sub_opus"]
    },
    "carol": {
      "email": "[email protected]",
      "first_name": "Carol",
      "roles": ["team_subscriber", "sub_opus"]
    },
    "erin": {
      "email": "[email protected]",
      "first_name": "Erin",
      "roles": ["team_subscriber", "sub_opus"]
    },
    "dave": {
      "email": "[email protected]",
      "first_name": "Dave",
      "roles": ["professional_subscriber"]
    },
    "eve": { "email": "[email protected]", "first_name": "Eve" }
  },
  "teams": {
    "acme": {
      "name": "Acme",
      "owner": "alice",
      "members": { "bob": "admin", "carol": "member", "erin": "admin" }
    }
  },
  "channels": {
    "town-square": { "type": "public", "owner": "alice", "members": ["bob", "dave"] },
    "eng": { "type": "private", "owner": "alice", "members": ["bob", "dave"] },
    "acme-hq": { "type": "team", "team": "acme" },
    "dm-alice-dave": { "type": "direct_message", "members": ["alice", "dave"] }
  },
  "projects": {
    "roadmap": {
      "owner": "alice",
      "name": "Roadmap",
      "share": [{ "with": "team:acme", "level": "view" }]
    }
  },
  "documents": {
    "q3-plan": {
      "owner": "alice",
      "name": "Q3 Plan",
      "content": "# Q3 Plan\n\n- Ship the tagging system\n- Verify permissions across every entity type\n- Grow the Acme team\n",
      "project": "roadmap",
      "share": [{ "with": "user:erin", "level": "edit" }]
    },
    "design-doc": {
      "owner": "alice",
      "name": "Design Doc",
      "content": "# Design Doc\n\nDave has edit access; the eng channel can view this via the share and Bob's mention.\n",
      "share": [
        { "with": "user:dave", "level": "edit" },
        { "with": "channel:eng", "level": "view" },
        { "with": "user:erin", "level": "edit" }
      ]
    },
    "handbook": {
      "owner": "alice",
      "name": "Handbook",
      "file": "pdf.pdf",
      "link_share": "PUBLIC",
      "link_share_access_level": "view",
      "share": [{ "with": "user:erin", "level": "edit" }]
    },
    "bob-notes": {
      "owner": "bob",
      "name": "Bob Notes",
      "file": "md.md",
      "link_share": "TEAM",
      "link_share_access_level": "view"
    }
  },
  "tasks": {
    "ship-tags": {
      "owner": "alice",
      "name": "Ship the tagging system",
      "content": "# Ship the tagging system\n\n- [x] backend\n- [ ] verify perms across entity types\n",
      "project": "roadmap",
      "status": "in_progress",
      "assignees": ["alice", "bob", "erin"],
      "share_with_team": true,
      "share": [{ "with": "user:erin", "level": "edit" }]
    },
    "fix-perms": {
      "owner": "dave",
      "name": "Fix the perms edge case",
      "assignees": ["alice"],
      "share": [{ "with": "channel:eng", "level": "view" }]
    },
    "write-docs": {
      "owner": "alice",
      "name": "Write the perms docs",
      "content": "# Write the perms docs\n\nCover every access edge the seeder exercises.\n",
      "status": "in_review",
      "assignees": ["carol"],
      "share_with_team": true,
      "share": [{ "with": "user:erin", "level": "edit" }]
    }
  },
  "chats": {
    "alice-ai": {
      "owner": "alice",
      "name": "Alice AI chat",
      "share": [{ "with": "user:carol", "level": "view" }]
    }
  },
  "calls": {
    "eng-standup": {
      "channel": "eng",
      "created_by": "alice",
      "share_with_team": true,
      "participants": ["alice", "bob"],
      "duration_minutes": 30,
      "name": "Eng standup",
      "transcript": [
        { "speaker": "alice", "text": "Let's review the Q3 plan before we ship the design doc." },
        { "speaker": "bob", "text": "The tagging work is nearly done, verifying perms today." }
      ]
    },
    "dm-huddle": {
      "channel": "dm-alice-dave",
      "created_by": "dave",
      "participants": ["dave", "alice"],
      "duration_minutes": 10
    }
  },
  "emails": {
    "alice-inbox": {
      "owner": "alice",
      "delegated_to": ["bob"],
      "threads": {
        "welcome": {
          "subject": "Welcome to Acme",
          "from": "[email protected]",
          "body": "Welcome aboard! Here's everything you need to get started.",
          "unread": true
        },
        "renewal": {
          "subject": "Contract renewal",
          "from": "[email protected]",
          "body": "The renewal is attached, please review by Friday."
        }
      }
    },
    "dave-inbox": {
      "owner": "dave",
      "threads": {
        "invoice": {
          "subject": "Invoice #42",
          "from": "[email protected]",
          "body": "Your invoice for June is attached."
        }
      }
    }
  },
  "messages": [
    {
      "channel": "eng",
      "from": "bob",
      "text": "Design doc is ready for review",
      "mentions": ["document:design-doc"]
    },
    { "channel": "town-square", "from": "alice", "text": "Welcome everyone!" },
    { "channel": "acme-hq", "from": "carol", "text": "Team sync at 3pm." }
  ]
}