Features Demo Docs GitHub

MazeBreak Trello
Sprint Board Automation

One script. One command. A production-grade Trello sprint board with dependency-encoded cards, execution checklists, acceptance tests, and a Definition of Done on every card. This is the complete reference.

Getting Started

Prerequisites

  • Node.js 18+ — required for modern JavaScript features. Verify with node --version.
  • npm — ships with Node.js. Used to install dependencies.
  • Trello Account — with access to create boards and workspaces.
  • Trello API Key & Token — obtained from the Trello Power-Up admin portal (see Configuration below).

Installation

Clone the repository and install dependencies.

bash
$ git clone https://github.com/RCushmaniii/mazebreak-trello.git
$ cd mazebreak-trello
$ npm install

This installs two dependencies:

  • axios — HTTP client for Trello API calls
  • dotenv — loads environment variables from .env

Create Your .env File

Create a .env file in the project root with your Trello credentials.

.env
TRELLO_API_KEY=your_api_key_here
TRELLO_SECRET_KEY=your_secret_key_here
TRELLO_TOKEN=your_token_here
Security

Never commit your .env file to version control. It contains secrets that grant full access to your Trello account. Add .env to your .gitignore.

Configuration

The script requires three environment variables to authenticate with the Trello API. All three are loaded from the .env file at the project root.

Variable Description Required
TRELLO_API_KEY Your Trello Power-Up API key. Used to authenticate every API request. Yes
TRELLO_SECRET_KEY Your Trello API secret (OAuth secret). Used for Power-Up registration. Yes
TRELLO_TOKEN A user-scoped token granting read/write access to your boards and workspaces. Yes

How to Get Your Credentials

  1. Go to https://trello.com/power-ups/admin
  2. Click "New" to create a new Power-Up integration (or select an existing one).
  3. Fill in basic details:
    • Name: MazeBreak (or any name you prefer)
    • Workspace: Select the workspace you want to use
    • Iframe connector URL: Your deployment URL + /connector (e.g., https://your-domain.com/connector)
  4. After creating, you will see your API Key and Secret on the Power-Up details page.
  5. To generate a Token, click the link on the Power-Up page that says "Token" or navigate to:
    url
    https://trello.com/1/authorize?expiration=never&scope=read,write&response_type=token&key=YOUR_API_KEY
  6. Authorize the app when prompted. Copy the token displayed on the screen.
  7. Paste all three values into your .env file.
Tip

Use expiration=never for long-lived automation tokens. If you prefer short-lived tokens, replace never with a duration like 1day or 30days.

Running the Script

With your .env configured, run the board builder.

bash
$ node trelloSetup.js

What It Creates

The script provisions the following resources in order via the Trello API:

  1. Workspace — "MazeBreak Development"
  2. Board — "MazeBreak – Core Development" inside that workspace
  3. Lists — 4 workflow columns for card progression
  4. Labels — 8 color-coded labels for categorization
  5. Cards — 10 fully-specified Sprint 0 cards with dependency prefixes
  6. Checklists — Execution checklists, acceptance tests, and Definition of Done on every card
  7. Comments — Dev Notes comment on every card with architecture guidance

Expected Output

terminal output
Starting MazeBreak Sprint 0 Trello build (idempotent)...

✓ Workspace Created: MazeBreak Development
✓ Board Created: MazeBreak – Core Development
✓ List Created: 🧪 Sprint 0 – Combat Prototype
✓ List Created: 🔜 Sprint 1 – Core Loop
✓ List Created: 📦 Backlog
✓ List Created: ✅ Done
✓ 8 Labels Created

✓ [S0-00] Gate Rules — 2 checklists, dev notes, DoD
✓ [S0-01] Foundation Setup — 2 checklists, dev notes, DoD
✓ [S0-02] InputController — 3 checklists, dev notes, DoD
✓ [S0-03] CombatManager — 3 checklists, dev notes, DoD
✓ [S0-04] DamageResolver — 3 checklists, dev notes, DoD
✓ [S0-05] Zombie Enemy — 3 checklists, dev notes, DoD
✓ [S0-06] Health System — 3 checklists, dev notes, DoD
✓ [S0-07] Basic HUD — 3 checklists, dev notes, DoD
✓ [S0-08] Feel Tuning — 3 checklists, dev notes, DoD
✓ [S0-09] Exit Gate — 2 checklists, dev notes, DoD

✓ Sprint 0 PRODUCTION++ complete.
   Safe to re-run (idempotent).

Re-Running

The script is fully idempotent. If you run it again, it will detect all existing resources and skip creation. You will see recycling indicators instead of creation confirmations. See Idempotency for details.

Board Structure

Lists

The script creates 8 workflow lists that represent the full card lifecycle.

List Purpose
Instructions Board overview, card lifecycle guide, Trello tips, and dependency map. Reference cards that explain how to use the board.
Sprint 0 – Combat Prototype Active sprint work. All 10 Sprint 0 cards land here. Cards are worked in dependency order [S0-00] through [S0-09].
In Progress Cards actively being worked on. Move cards here when you start implementation.
Review / Playtest Cards awaiting code review or playtest validation before they can move to Done.
Blocked Cards that are stuck waiting on a dependency, external resource, or decision. Add a comment explaining the blocker.
Done Completed and verified work. Cards move here after all checklists and the Definition of Done are satisfied.
Sprint 1 – Core Loop Placeholder for next sprint. No cards created here initially. Work moves here only after Sprint 0 Exit Gate passes.
Backlog Ideas, future work, and deferred items. Not prioritized yet.

Labels

8 color-coded labels categorize cards by domain. Cards can have multiple labels.

Label Color Purpose
Critical Black Must-complete for sprint. Every Sprint 0 card carries this label.
Architecture Purple Structural decisions, folder organization, code patterns.
Server Red Server-side logic (ServerScriptService). Authority and validation.
Client Blue Client-side logic (StarterPlayerScripts). Input, UI, feedback.
Combat Orange Combat system mechanics: attacks, hit detection, damage.
Enemy Green Enemy AI, state machines, behavior patterns.
UI Yellow User interface elements: HUD, health bars, feedback displays.
Polish Pink Feel tuning, timing adjustments, iteration work.

Cards — The Sprint 0 Dependency Chain

10 cards form a strict dependency chain. Each card's title carries a [S0-##] prefix that encodes its position. You must complete earlier cards before starting later ones.

[S0-00] Gate Rules
  |
  v
[S0-01] Foundation Setup
  |
  v
[S0-02] InputController
  |
  v
[S0-03] CombatManager  depends on S0-01 + S0-02
  |
  v
[S0-04] DamageResolver  depends on S0-01 + S0-03
  |
  v
[S0-05] Zombie Enemy  depends on S0-03 + S0-04
  |
  v
[S0-06] Health System  depends on S0-04 + S0-05
  |
  v
[S0-07] Basic HUD
  |
  v
[S0-08] Feel Tuning
  |
  v
[S0-09] Exit Gate  Ship / No-Ship decision
ID Card Title Depends On Labels
S0-00 SPRINT 0 – Gate Rules (Read First) None (starting point) Critical Architecture
S0-01 Project Foundation Setup S0-00 Critical Architecture Server
S0-02 Remotes + InputController (Client) S0-01 Critical Client Combat
S0-03 CombatManager (Server Authority Core) S0-01, S0-02 Critical Server Combat
S0-04 DamageResolver (Single Source of Truth) S0-01, S0-03 Critical Server Architecture
S0-05 Enemy: Zombie (Tier 1 State Machine) S0-03, S0-04 Critical Server Enemy Combat
S0-06 Health System + Damage Feedback S0-04, S0-05 Critical Server UI
S0-07 Basic HUD (Server-Truth Health Only) S0-06 Critical Client UI
S0-08 Feel Tuning Pass (20+ Fights Minimum) S0-07 Critical Polish Combat
S0-09 SPRINT 0 EXIT CHECKLIST – Ship/No-Ship Gate S0-08 Critical Architecture Combat

Card Specification

Every card created by the script is a complete work specification. No card is a stub or placeholder. Here is what each card includes.

Title with Dependency Prefix

Every card title follows the pattern [S0-##] CARD TITLE. The prefix encodes the card's position in the dependency chain, making sprint order visible at a glance in the Trello board view.

example
[S0-03] CARD 3 — CombatManager (Server Authority Core)

Description with Dependencies

Every card description contains:

  • Objective — what this card achieves
  • Depends On — which cards must be finished first
  • Technical specification — files to create, APIs to implement, folder structures
  • Completion Criteria — how to know when this card is done
  • Dependency Notes — appended automatically at the bottom of every card description

Execution Checklist

An ordered list of implementation steps. Work through these top-to-bottom. Each item is a concrete action, not a vague goal.

example: card 2 execution checklist
Execution Checklist (Ordered)
[ ] Create AttackRequest RemoteEvent in ReplicatedStorage/Remotes
[ ] Create InputController.client.lua in StarterPlayerScripts
[ ] Bind attack input (UIS or CAS) and fire AttackRequest:FireServer()
[ ] Add local throttle to prevent spam FireServer (visual only)
[ ] Test: clicks fire instantly with no console errors

Acceptance Tests

Cards 2 through 8 include an explicit acceptance test checklist. These are the verification criteria that must pass before the card can move to Done.

example: card 2 acceptance tests
Acceptance Tests
[ ] Spam click does NOT freeze client
[ ] Remote fires instantly on input
[ ] No client damage calculations exist

Definition of Done (Global)

A 9-item quality checklist attached to every single card. This is the universal quality bar. No card is "done" until all 9 items are checked.

Definition of Done (applies to all 10 cards)
[ ] Runs in Studio with zero errors in Output
[ ] Server-authoritative rules not violated (no client damage outcomes)
[ ] No gameplay logic placed in Workspace
[ ] Code is modular (Managers/Systems), no spaghetti in random scripts
[ ] No magic numbers: key constants centralized + named
[ ] Basic logging added where it helps debugging (not spammy)
[ ] Edge cases handled (nil targets, dead targets, missing humanoid)
[ ] Performance sanity: no runaway loops / no heavy per-frame work
[ ] Quick manual test performed and recorded in checklist notes

Dev Notes (Comment)

Every card receives a comment with architecture guidance and common pitfalls. These are attached as Trello card comments, not part of the checklist, so they serve as persistent reference without cluttering the task items.

example: card 3 dev notes
DEV NOTES (Architecture & Pitfalls)
- Keep CombatManager as an orchestrator: validate + route to systems.
- Don't subtract health in CombatManager. Always go through DamageResolver.
- If you add effects, don't hardcode them here — emit events/hooks later.

Dependency Notes

Appended to the bottom of every card description. Lists which cards must be finished before this one can start.

example: card 3 dependency notes
----
## Dependency Notes
- Finish: S0-01 before this
- Finish: S0-02 before this

Idempotency

The script is designed to be run multiple times without creating duplicates or corrupting existing data. This is the core engineering principle behind MazeBreak Trello.

How It Works

Every resource creation uses a find-or-create pattern:

  1. Query — before creating any resource, the script fetches the list of existing resources of that type (workspaces, boards, lists, labels, cards, checklists, checklist items, comments).
  2. Match — it searches the existing resources for a match by name (and color, for labels).
  3. Skip or Create — if a match is found, the existing resource ID is returned and creation is skipped. If no match is found, the resource is created fresh.
trelloSetup.js — find-or-create pattern
async function findOrCreateCard(listId, name, desc, idLabels = []) {
  // 1. Query existing cards in this list
  const res = await api.get(`/lists/${listId}/cards`, { params: params() });

  // 2. Match by name
  const existing = res.data.find((c) => c.name === name);

  // 3. Skip if found
  if (existing) {
    console.log("♻  Card exists:", name);
    return existing.id;
  }

  // 4. Create if not found
  const created = await api.post("/cards", null, {
    params: params({ idList: listId, name, desc, idLabels: idLabels.join(",") }),
  });
  console.log("✓ Card Created:", name);
  return created.data.id;
}

What This Means in Practice

  • Safe to re-run — run node trelloSetup.js any time. Nothing breaks.
  • No duplicates — you will never get two copies of the same card, list, or label.
  • Recovers from partial runs — if the script fails mid-way (network error, rate limit), re-run it. It picks up where it left off.
  • Manual edits preserved — if you manually add notes, move cards, or check items, the script does not overwrite them. It only checks for existence by name.
Caveat

If you rename a card, list, or label in Trello manually, the script will no longer find it by name and will create a new one on the next run. Keep names consistent if you want to preserve idempotency.

Idempotent Resources

Resource Match Key Scope
WorkspacedisplayNameAll user workspaces
BoardnameBoards in workspace
ListnameLists on board
Labelname + colorLabels on board
CardnameCards in list
ChecklistnameChecklists on card
Checklist ItemnameItems in checklist
CommentFirst 40 chars of textComments on card

Trello Power-Up

MazeBreak Trello includes a minimal Power-Up connector that allows you to register the project as a Trello Power-Up. This enables API key registration and integration with the Trello Power-Up ecosystem.

The Connector

The connector is a static HTML file served at /connector. It loads the Trello Power-Up client library and calls TrelloPowerUp.initialize({}) with an empty capability set.

public/connector.html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>MazeBreak — Trello Power-Up Connector</title>
</head>
<body>
  <script src="https://p.trellocdn.com/power-up.min.js"></script>
  <script>
    TrelloPowerUp.initialize({});
  </script>
</body>
</html>

How to Register the Power-Up

  1. Deploy MazeBreak Trello to a public URL (e.g., via Vercel, Netlify, Railway, or any static hosting).
  2. Go to https://trello.com/power-ups/admin.
  3. Click "New" to register a new Power-Up.
  4. Set the Iframe connector URL to your deployed URL plus /connector:
    example
    https://your-domain.com/connector
  5. Save. Your API key and secret will be displayed on the Power-Up admin page.
  6. Copy those values into your .env file as TRELLO_API_KEY and TRELLO_SECRET_KEY.
  7. Generate a token (see Configuration) and add it as TRELLO_TOKEN.
Note

The current connector is minimal — it registers the Power-Up with an empty capability set. You can extend it later to add board buttons, card badges, card detail sections, or other Power-Up capabilities as needed.

Customization

The entire board specification lives in a single file: trelloSetup.js. All card content, checklists, labels, and structure are defined in plain JavaScript arrays and objects. No external config files, no database. Change the code, re-run the script.

Adding a New Card

Add a new entry to the array returned by the sprint0Spec() function. Follow the existing pattern:

trelloSetup.js — adding a new card
// 1. Add a new ID constant in CARD_IDS
const CARD_IDS = {
  // ...existing IDs...
  C10: "S0-10",  // new card
};

// 2. Add the card spec inside sprint0Spec()
{
  id: CARD_IDS.C10,
  title: "CARD 10 — Your New Feature",
  dependsOn: [CARD_IDS.C8],  // must finish C8 first
  labels: [L.Critical, L.Server],
  desc: block([
    "## Objective",
    "Describe what this card achieves.",
    "",
    "## Depends On",
    `- ${CARD_IDS.C8}`,
    "",
    "## Completion Criteria",
    "- Define when this card is done",
  ]),
  checklists: [
    {
      title: "Execution Checklist (Ordered)",
      items: [
        "Step 1",
        "Step 2",
        "Step 3",
      ],
    },
    {
      title: "Acceptance Tests",
      items: [
        "Test condition 1",
        "Test condition 2",
      ],
    },
  ],
  devNotes: block([
    "DEV NOTES (Architecture & Pitfalls)",
    "- Guidance for the developer.",
  ]),
}

Modifying the Definition of Done

The global Definition of Done is defined in the DEFINITION_OF_DONE array near the top of trelloSetup.js. Add, remove, or edit items as needed.

trelloSetup.js — editing the DoD
const DEFINITION_OF_DONE = [
  "Runs in Studio with zero errors in Output",
  "Server-authoritative rules not violated",
  "No gameplay logic placed in Workspace",
  "Code is modular (Managers/Systems)",
  "No magic numbers: key constants centralized",
  "Basic logging added where it helps debugging",
  "Edge cases handled (nil targets, dead targets)",
  "Performance sanity: no runaway loops",
  "Quick manual test performed and recorded",
  // Add your own items here:
  "Accessibility check: screen reader tested",
];

Changing Labels

Labels are created in the main() function. To add a new label, add a findOrCreateLabel call and reference the new label ID in your card specs.

trelloSetup.js — adding a label
const labelIds = {
  // ...existing labels...
  Testing: await findOrCreateLabel(boardId, "Testing", "lime"),
};

Trello supports these label colors: green, yellow, orange, red, purple, blue, sky, lime, pink, black.

Modifying Checklists

Each card's checklists array accepts any number of checklist objects. Each object has a title and an items array of strings.

checklist structure
checklists: [
  {
    title: "Execution Checklist (Ordered)",
    items: ["Step 1", "Step 2", "Step 3"],
  },
  {
    title: "Acceptance Tests",
    items: ["Test 1", "Test 2"],
  },
  {
    title: "Research Notes",    // add as many as you want
    items: ["Link 1", "Link 2"],
  },
]

Adding More Lists

Lists are created in main() with findOrCreateList(). Add new lists in the order you want them to appear on the board (Trello creates them left-to-right).

trelloSetup.js — adding lists
// Add new lists in left-to-right order
await findOrCreateList(boardId, "In Review");
await findOrCreateList(boardId, "Blocked");
await findOrCreateList(boardId, "QA Testing");

Version Control Workflow

Because the board spec is code, you get full version control on board changes.

bash
# Edit the board spec
$ code trelloSetup.js

# Commit the change
$ git add trelloSetup.js
$ git commit -m "Add QA testing list and code review checklist"

# Push and re-run
$ git push
$ node trelloSetup.js
Key Principle

Your board is infrastructure as code. Every change is committed, reviewed, and auditable. If something goes wrong, git revert and re-run.