DocsPlanner PluginAll docs

DEVELOPER

Planner Plugin

opencode plugin that brings ForLoop space management, AI agents, and file sync into your IDE.

ForLoop Planner Plugin

Overview

The ForLoop Planner Plugin is an opencode plugin that bridges your IDE with the ForLoop AI development platform. It registers 30+ tools that opencode's AI agents can use to manage sprints, stories, files, organizations, and trigger AI developer agents — all from your terminal.


What it does

Instead of switching between your IDE and the ForLoop web app, the plugin lets opencode AI agents:

  • List and manage sprints — create, update, delete sprints
  • Create and update stories — tasks, notes, document folders with template support
  • Upload and sync files — push local files to sprint S3 storage, or download remote files
  • Query AI agents — get suggestions, breakdowns, estimates, and trigger developer agents
  • Manage organizations — create, update, and view organizations
  • Check quotas — monitor usage limits for users and organizations
  • Record conversations — all opencode chat messages are persisted to ForLoop

Installation

One-line installer

curl -fsSL https://raw.githubusercontent.com/forloop-cc/forloop-opencode-plugin-planner/main/install.sh | bash

Install options

FlagDescription
-g, --globalInstall globally to ~/.config/opencode/opencode.json
-l, --localInstall for current project only (./opencode.json)
-n, --npmUse npm package instead of git URL
--skip-agentsSkip installing AI agents and skills

Update

curl -fsSL https://raw.githubusercontent.com/forloop-cc/forloop-opencode-plugin-planner/main/update.sh | bash

Configuration

API token setup

  1. Create a token at Profile → API Tokens
  2. Required scopes: sprint:read, sprint:write, story:read, story:write, agent:query, profile:read
  3. The installer prompts you for the token, or set it manually:
forloop auth login --api-key floop_xxxxxxxxxxxx

Token is stored at ~/.config/forloop/tokens.json with 600 permissions.

Configuration priority

  1. FORLOOP_API_URL environment variable
  2. Project ./opencode.json → "forloop" → "apiUrl"
  3. Global ~/.config/opencode/config.json → "forloop" → "apiUrl"
  4. Default: https://api.forloop.cc

Full configuration example (./opencode.json)

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["forloop-planner@git+https://github.com/forloop-cc/forloop-opencode-plugin-planner.git"],
  "forloop": {
    "apiUrl": "https://api.forloop.cc",
    "debug": true
  }
}

Available Tools

The plugin registers 30+ tools that opencode agents use automatically. You interact by typing natural language — agents pick the right tools behind the scenes.

Sprint Management (5 tools)

ToolDescription
forloopSpaceSprintListList all accessible spaces
forloopSpaceSprintGetGet space details (stories, files, AI agents)
forloopSpaceSprintCreateCreate a new space with dates and settings
forloopSpaceSprintUpdateUpdate space details
forloopSpaceSprintDeleteDelete a space (with confirmation)

Story Operations (4 tools)

ToolDescription
forloopStoryCreateCreate a story with template support, assignments, positions
forloopStoryGetGet story details including comments and agent artifacts
forloopStoryUpdateUpdate story status, priority, points
forloopStoryDeleteDelete a story

AI Agent Tools (8 tools)

ToolDescription
forloopAgentQueryQuery AI agents for analysis, suggestions, or execution
forloopAgentSuggestGet AI suggestions for breakdowns, estimates, planning
forloopAgentBreakdownBreak down a story into actionable subtasks
forloopAgentEstimateGet AI-powered story point estimates
forloopAgentHistoryView conversation history with AI agents
forloopAgentClearClear conversation history for a sprint
forloopAiAgentListList all available AI agents in the catalog
forloopSpaceSprintAiAgentsUpdateEnable/disable AI agents for a space

File & Sync Tools (4 tools)

ToolDescription
forloopFileUploadUpload a file via presigned S3 URL
forloopFileListList files attached to a sprint
forloopFileDeleteDelete a file permanently
forloopFileDownloadGet a download URL for a file

Organization Tools (5 tools)

ToolDescription
forloopOrganizationListList organizations you belong to
forloopOrganizationGetGet details of a specific organization
forloopOrganizationCreateCreate a new organization
forloopOrganizationUpdateUpdate organization details
forloopOrganizationDeleteDelete organization (owner only)

User & Quota Tools (3 tools)

ToolDescription
forloopUserProfileGet current user profile
forloopUserQuotasCheck your quota limits and usage
forloopOrganizationQuotasGet quota info for a specific organization

Template & Scheduling (3 tools)

ToolDescription
forloopTemplateListList available story templates
forloopStoryTemplateCreate a story using a template
forloopScheduleCreateSchedule a meeting with attendees
forloopScheduleUpdateUpdate an existing schedule

Document Sync (4 tools)

ToolDescription
forloopSyncAivyFolderEnsure a document folder exists for sync
forloopAivyDocGetGet the doc folder story ID
forloopSyncS3ToLocalSync remote sprint files to local ~/.forloop/
forloopSyncLocalToS3Sync a local file to sprint S3

AI Execution Tools (2 tools)

ToolDescription
forloopAiDeveloperSpaceSprintTrigger developer agent for a space
forloopDeveloperStatusCheck status of a running developer task

Streaming Response Mode

When running on AWS Lambda, the plugin supports real-time streaming of AI responses:

  1. Agent generates a response — text chunks are written to /tmp/forloop-stream/
  2. A parent Lambda process polls and POSTs chunks to the ForLoop API
  3. The web client renders progressive markdown with a blinking cursor

Streaming lifecycle:

  • message.part.updated — Each text chunk is buffered
  • message.updated — Final buffered text is flushed to the API
  • message.removed — Conversation cleanup

Context filtering: Large context text (>5,000 characters) is automatically skipped to keep streaming fast.


Conversation Recording

Every opencode conversation is automatically persisted to ForLoop:

  • User messages captured via chat.message hook
  • Assistant responses captured via event hook with message lifecycle tracking
  • Fire-and-forget design — hooks never throw or block the LLM

Architecture

opencode (IDE)
├── @forloop-cc/forloop-opencode-plugin-planner (this plugin)
│   ├── Tools (30+ functions registered with opencode)
│   ├── Hooks (shell env injection, message recording)
│   ├── Capabilities (API client, auth, token storage, config)
│   └── AI Agents (forLoopPlanner, forLoopStoryEvaluator)
│
└── ForLoop API (https://api.forloop.cc)
    ├── Sprints & Stories
    ├── AI Agents
    ├── Files (S3 via presigned URLs)
    ├── Organizations
    └── User Profiles & Quotas

Common Use Cases

1. Start working on a sprint

In opencode, type:

"Pull up sprint 42 and show me what's in progress"

The agent calls forloopSpaceSprintGet, forloopDeveloperStatus, and forloopSyncS3ToLocal.

2. Plan and dispatch a sprint

"Create a sprint called Q3 Feature Release, add stories for user login and analytics dashboard, then trigger the developer agent"

The agent calls forloopSpaceSprintCreate, forloopStoryCreate (×2), and forloopAiDeveloperSpaceSprint.

3. Review and iterate

"Show me the conversation history for sprint 42, then break down the remaining stories"

The agent calls forloopAgentHistory and forloopAgentBreakdown.


Next Steps