### Example .env File Format Source: https://github.com/sortie-ai/sortie/blob/main/docs/workflow-reference.md This is an example of the .env file format. Lines starting with # are comments. Keys and values are trimmed, and values can be quoted. Only SORTIE_* prefixed keys are loaded. ```dotenv # Comment lines start with # SORTIE_TRACKER_API_KEY="tok_abc123" SORTIE_TRACKER_ENDPOINT=https://mycompany.atlassian.net SORTIE_POLLING_INTERVAL_MS=60000 ``` -------------------------------- ### Complete SSH-Mode Configuration Example Source: https://github.com/sortie-ai/sortie/blob/main/docs/workflow-reference.md A comprehensive Sortie configuration file demonstrating SSH worker setup, including tracker, agent, workspace, worker, and hook configurations. ```yaml --- tracker: kind: jira project: PROJ active_states: - To Do - In Progress terminal_states: - Done agent: kind: claude-code max_sessions: 4 max_turns: 10 workspace: root: /srv/sortie/workspaces worker: ssh_hosts: - build01.internal - build02.internal - build03.internal max_concurrent_agents_per_host: 2 ssh_strict_host_key_checking: accept-new hooks: after_create: | ssh "$SORTIE_SSH_HOST" "mkdir -p \"$SORTIE_WORKSPACE\" && git clone https://repo.example.com/project.git \"$SORTIE_WORKSPACE\"" before_remove: | ssh "$SORTIE_SSH_HOST" "rm -rf \"$SORTIE_WORKSPACE\"" --- You are a software engineer. Fix the issue described below. {{.issue_body}} ``` -------------------------------- ### Install Sortie via Curl Source: https://github.com/sortie-ai/sortie/blob/main/README.md Use this command to download and execute the Sortie installation script. ```bash curl -sSL https://get.sortie.ai/install.sh | sh ``` -------------------------------- ### Install Sortie via Homebrew Source: https://github.com/sortie-ai/sortie/blob/main/README.md Alternative installation method for macOS and Linux users using Homebrew. ```bash brew install sortie-ai/tap/sortie ``` -------------------------------- ### Install GitHub Copilot CLI Source: https://github.com/sortie-ai/sortie/blob/main/docs/copilot-adapter-notes.md Provides commands for installing the GitHub Copilot CLI on different operating systems. Ensure Node.js 22+ is installed if using npm. ```bash curl -fsSL https://gh.io/copilot-install | bash ``` ```bash brew install copilot-cli ``` ```bash winget install GitHub.Copilot ``` ```bash npm install -g @github/copilot ``` -------------------------------- ### Start Copilot ACP Server Source: https://github.com/sortie-ai/sortie/blob/main/docs/copilot-adapter-notes.md Initiates the Agent Client Protocol (ACP) server for Copilot. This is a reference example as the ACP protocol details are not fully documented by Copilot CLI. ```bash copilot --acp ``` -------------------------------- ### Example Adapter Invocation Source: https://github.com/sortie-ai/sortie/blob/main/docs/copilot-adapter-notes.md Demonstrates how to invoke the Sortie adapter for a new session, including setting a prompt and various command-line options. ```bash prompt='You are working on issue PROJ-123. Fix the authentication bug described below. ## Issue: Authentication fails on expired tokens The login endpoint returns 500 when the JWT token is expired instead of 401... ## Instructions 1. Read the relevant code files 2. Implement the fix 3. Run tests to verify' sh -c 'copilot -p "$1" \ --output-format json \ -s \ --allow-all \ --autopilot \ --no-ask-user \ --max-autopilot-continues 50' -- "$prompt" ``` -------------------------------- ### Prompt Template Example Source: https://context7.com/sortie-ai/sortie/llms.txt A Go template for generating agent prompts, including issue details, rules, and retry information. ```markdown --- # ... front matter above ... --- You are a senior engineer working on **{{ .issue.identifier }}**: {{ .issue.title }} {{ if .issue.description }} ## Description {{ .issue.description }} {{ end }} ## Rules 1. Run tests before finishing 2. Keep changes minimal {{ if .run.is_continuation }} ## Continuation Resuming work (turn {{ .run.turn_number }} of {{ .run.max_turns }}). {{ end }} {{ if .attempt }} ## Retry This is retry attempt {{ .attempt }}. Check the workspace for partial work. {{ end }} {{ if .issue.blocked_by }} ## Blockers {{ range .issue.blocked_by }}- **{{ .identifier }}**{{ if .state }} ({{ .state }}){{ end }} {{ end }} {{ end }} ``` -------------------------------- ### Example JSONL Output Source: https://github.com/sortie-ai/sortie/blob/main/docs/copilot-adapter-notes.md This example demonstrates the JSONL output format for several event types, including session loading, tool updates, and user messages. ```jsonl {"type":"session.mcp_servers_loaded","data":{"servers":[{"name":"github-mcp-server","status":"connected","source":"builtin"}]},"id":"...","timestamp":"2026-03-30T22:19:18.132Z","parentId":"...","ephemeral":true} {"type":"session.tools_updated","data":{"model":"claude-opus-4.6"},"id":"...","timestamp":"...","parentId":"...","ephemeral":true} {"type":"user.message","data":{"content":"Say exactly: hello world","transformedContent":"...","attachments":[],"agentMode":"autopilot","interactionId":"bac81e5a-..."},"id":"...","timestamp":"...","parentId":"..."} {"type":"assistant.turn_start","data":{"turnId":"0","interactionId":"bac81e5a-..."},"id":"...","timestamp":"...","parentId":"..."} ``` -------------------------------- ### Install Claude Code CLI Source: https://github.com/sortie-ai/sortie/blob/main/docs/claude-code-adapter-notes.md Install the Claude Code CLI globally using npm. This makes the `claude` binary available on your system's PATH. ```bash npm install -g @anthropic-ai/claude-code ``` -------------------------------- ### Example Issue Detail Response Source: https://context7.com/sortie-ai/sortie/llms.txt Example JSON response for a specific issue, showing its metadata and current running session information. ```json { "issue": { "id": "10001", "identifier": "PROJ-42", "title": "Implement user authentication", "state": "In Progress", "priority": 1, "labels": ["backend", "security"] }, "running": { "started_at": "2024-01-15T10:30:00Z", "turn_number": 3, "session_id": "abc123", "workspace_path": "/tmp/sortie_workspaces/PROJ-42" } } ``` -------------------------------- ### Start MCP Server Source: https://github.com/sortie-ai/sortie/blob/main/cmd/sortie/testdata/help.txt Initiate the MCP stdio server, which facilitates communication between agents and the orchestrator. ```bash sortie mcp-server ``` -------------------------------- ### StartSession API Source: https://github.com/sortie-ai/sortie/blob/main/docs/copilot-adapter-notes.md Details the process of starting a Copilot CLI session, including validation and initialization steps. ```APIDOC ## StartSession ### Description Establishes the logical Copilot CLI session by performing preflight validation and initializing session state. The actual Node.js subprocess is spawned later during `RunTurn`. ### Method Not Applicable (Conceptual Operation) ### Endpoint Not Applicable (Conceptual Operation) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (Conceptual) - **ID** (string) - The session ID, populated after the first turn. - **Internal** (object) - Adapter-internal state including workspace path and configuration snapshot. #### Response Example ```json { "ID": "", "Internal": { "workspacePath": "/path/to/workspace", "configSnapshot": { ... } } } ``` ``` -------------------------------- ### Sortie Tracker Configuration Example Source: https://github.com/sortie-ai/sortie/blob/main/docs/github-adapter-notes.md Example configuration for Sortie's tracker, defining active, terminal, and handoff states using GitHub labels. Ensure these labels exist in your repository. ```yaml tracker: active_states: ["backlog", "in-progress", "review"] terminal_states: ["done", "wontfix"] handoff_state: "review" ``` -------------------------------- ### Example Runtime State Response Source: https://context7.com/sortie-ai/sortie/llms.txt Example JSON response detailing running sessions, candidate issues, and retry schedules. Includes token usage and last agent messages for active sessions. ```json { "running": [ { "issue_id": "10001", "identifier": "PROJ-42", "state": "In Progress", "started_at": "2024-01-15T10:30:00Z", "turn_number": 3, "session_id": "abc123", "token_usage": { "input_tokens": 15000, "output_tokens": 8500, "total_tokens": 23500 }, "last_agent_message": "Running test suite..." } ], "candidates": [ { "id": "10002", "identifier": "PROJ-43", "title": "Add dark mode support", "state": "To Do", "priority": 2 } ], "retry_scheduled": [ { "issue_id": "10003", "next_attempt_at": "2024-01-15T11:00:00Z", "attempt_count": 2 } ] } ``` -------------------------------- ### Minimal Workflow Example Source: https://github.com/sortie-ai/sortie/blob/main/docs/workflow-reference.md This is the simplest valid workflow, using only a prompt. It relies on default settings and requires tracker configuration for actual dispatch. ```markdown You are a software engineer. Fix the following issue: **{{ .issue.identifier }}**: {{ .issue.title }} {{ if .issue.description }} {{ .issue.description }} {{ end }} ``` -------------------------------- ### Install OpenAI Codex CLI via npm Source: https://github.com/sortie-ai/sortie/blob/main/docs/codex-adapter-notes.md Use this command to install the Codex CLI globally using npm. This makes the `codex` binary available on your system's PATH. ```bash npm install -g @openai/codex ``` -------------------------------- ### Configure Custom Adapter Source: https://github.com/sortie-ai/sortie/blob/main/docs/workflow-reference.md Illustrative example of configuring a custom adapter. The orchestrator forwards this block directly to the matching adapter without interpretation. ```yaml my-custom-adapter: option_one: value option_two: true ``` -------------------------------- ### Tool Execution Start Event Data Source: https://github.com/sortie-ai/sortie/blob/main/docs/copilot-adapter-notes.md The 'tool.execution_start' event is not ephemeral and includes 'toolCallId', 'toolName', and 'arguments' in its data. ```json { "toolCallId": "string", "toolName": "string", "arguments": "object" } ``` -------------------------------- ### Service Startup Algorithm Source: https://github.com/sortie-ai/sortie/blob/main/docs/architecture.md This algorithm outlines the steps for starting a service, including configuration, logging, observability, validation, database operations, and event loop initialization. It reconstructs retry timers from persisted entries. ```text function start_service(): configure_logging() start_observability_outputs() start_workflow_watch(on_change=reload_and_reapply_workflow) validation = validate_dispatch_config() if validation is not ok: log_validation_error(validation) fail_startup(validation) open_or_create_sqlite_db() run_schema_migrations() persisted_retries = sqlite.load_retry_entries() state = { poll_interval_ms: get_config_poll_interval_ms(), max_concurrent_agents: get_config_max_concurrent_agents(), running: {}, claimed: set(), retry_attempts: {}, completed: set(), agent_totals: {input_tokens: 0, output_tokens: 0, total_tokens: 0, seconds_running: 0}, agent_rate_limits: null } for entry in persisted_retries: state = reconstruct_retry_timer(state, entry) startup_terminal_workspace_cleanup() schedule_tick(delay_ms=0) event_loop(state) ``` -------------------------------- ### Initialize and Use Copilot SDK Client Source: https://github.com/sortie-ai/sortie/blob/main/docs/copilot-adapter-notes.md Demonstrates how to programmatically control Copilot CLI using the GitHub Copilot SDK. This example shows client initialization, session creation with a specific model, sending a prompt, and handling the response. ```typescript import { CopilotClient, approveAll } from "@github/copilot-sdk"; const client = new CopilotClient({ useStdio: true, // stdio transport (default) githubToken: "gho_...", // Optional: override auth }); await client.start(); const session = await client.createSession({ model: "gpt-5", onPermissionRequest: approveAll, }); const result = await session.sendAndWait({ prompt: "Fix the authentication bug", }); await session.disconnect(); await client.stop(); ``` -------------------------------- ### Codex Session Lifecycle - Start Thread Source: https://github.com/sortie-ai/sortie/blob/main/docs/codex-adapter-notes.md Example of starting a new thread in Codex, specifying model, workspace, approval policy, sandbox mode, and dynamic tools. This is a crucial step for initiating a conversation or task. ```shell # 4. Start thread → {"method":"thread/start","id":10,"params":{"model":"gpt-5.4","cwd":"/var/sortie/workspaces/PROJ-123","approvalPolicy":"never","sandbox":"workspace-write","dynamicTools":[{"name":"tracker_api","description":"Issue tracker operations","inputSchema":{"type":"object","required":["operation"],"properties":{"operation":{"type":"string"},"issue_id":{"type":"string"},"target_state":{"type":"string"}}}}] }} ← {"id":10,"result":{"thread":{"id":"thr_abc123"}}} ← {"method":"thread/started","params":{"thread":{"id":"thr_abc123"}}} ``` -------------------------------- ### Example Adapter Invocation - Turn 1 (New Session) Source: https://github.com/sortie-ai/sortie/blob/main/docs/claude-code-adapter-notes.md Demonstrates how to invoke the Claude Code adapter for a new session, including setting a prompt and using the `--dangerously-skip-permissions` flag. Ensure the prompt is properly quoted. ```bash prompt='You are working on issue PROJ-123. Fix the authentication bug described below. ## Issue: Authentication fails on expired tokens The login endpoint returns 500 when the JWT token is expired instead of 401... ## Instructions 1. Read the relevant code files 2. Implement the fix 3. Run tests to verify' sh -c 'claude -p "$1" \ --output-format stream-json \ --verbose \ --dangerously-skip-permissions' -- "$prompt" ``` -------------------------------- ### Get Specific Issue Detail Source: https://context7.com/sortie-ai/sortie/llms.txt Fetch detailed information for a particular issue, including its identifier, title, state, priority, labels, and running session details like workspace path and start time. ```bash curl http://localhost:7678/api/v1/PROJ-42 ``` -------------------------------- ### Pongo2 Template Syntax Example Source: https://github.com/sortie-ai/sortie/blob/main/docs/decisions/0005-prompt-template-engine.md Demonstrates common Pongo2 (Jinja2-compatible) template syntax for Go, including variable access, conditionals, filters, and loops. Useful for prompt formatting when Jinja2 familiarity is high. ```go {{ issue.title }} ``` ```go {% if attempt %}...{% endif %} ``` ```go {{ issue.title|upper }} ``` ```go {% for label in issue.labels %} ``` ```go {{ issue.title|default:"N/A" }} ``` ```go {{ issue.title|join:", " }} ``` ```go {{ issue.title|truncatechars:100 }} ``` -------------------------------- ### Install OpenAI Codex CLI via Homebrew Source: https://github.com/sortie-ai/sortie/blob/main/docs/codex-adapter-notes.md For macOS users, install the Codex CLI using Homebrew. This command installs the application via the Homebrew Cask. ```bash brew install --cask codex ``` -------------------------------- ### Example File Structure with Front Matter Source: https://github.com/sortie-ai/sortie/blob/main/docs/workflow-reference.md Illustrates the structure of an input file that includes YAML front matter delimited by '---'. The front matter is used for configuration, and the content below it forms the prompt template. ```text ┌──────────────────────────────┐ │ --- │ ← Opening delimiter │ tracker: │ │ kind:jira │ ← YAML front matter (config) │ project: PROJ │ │ --- │ ← Closing delimiter │ │ │ You are an engineer. │ ← Prompt template body │ Fix {{ .issue.identifier }} │ └──────────────────────────────┘ ``` -------------------------------- ### Thread started notification Source: https://github.com/sortie-ai/sortie/blob/main/docs/codex-adapter-notes.md A notification indicating that a thread has been successfully started, providing the thread ID. ```json {"method": "thread/started", "params": {"thread": {"id": "thr_abc123"}}} ``` -------------------------------- ### sessionStart Hook Input Example Source: https://github.com/sortie-ai/sortie/blob/main/docs/copilot-adapter-notes.md Illustrates the JSON input format for the sessionStart hook, including timestamp, current working directory, source of the session, and the initial prompt. ```json {"timestamp": 1704614400000, "cwd": "/path/to/project", "source": "new", "initialPrompt": "..."} ``` -------------------------------- ### Thread start response Source: https://github.com/sortie-ai/sortie/blob/main/docs/codex-adapter-notes.md The response received after successfully starting a thread, containing the thread ID. ```json {"id": 10, "result": {"thread": {"id": "thr_abc123", "preview": "", "ephemeral": false, "modelProvider": "openai", "createdAt": 1745000000}}} ``` -------------------------------- ### Go Build and Test Commands Source: https://github.com/sortie-ai/sortie/blob/main/WORKFLOW.md Standard commands for linting, testing (with race detection), and building the Go project. ```bash make lint # zero warnings make test # all tests pass (includes -race) make build # binary compiles ``` -------------------------------- ### Conventional Commit Examples Source: https://github.com/sortie-ai/sortie/blob/main/CONTRIBUTING.md Examples of commit messages following the Conventional Commits specification for different types of changes. ```git feat(orchestrator): add stall detection for running sessions ``` ```git fix(workspace): reject symlinks escaping workspace root ``` ```git test(tracker): cover pagination edge cases in Jira adapter ``` -------------------------------- ### Go Build and Test Commands Source: https://github.com/sortie-ai/sortie/blob/main/AGENTS.md Common commands for formatting, linting, testing, building, and cleaning Go projects. Ensure golangci-lint is installed separately for linting. ```bash make fmt make lint make test make build make clean ``` -------------------------------- ### preToolUse Hook Input Example Source: https://github.com/sortie-ai/sortie/blob/main/docs/copilot-adapter-notes.md Example of JSON input for the preToolUse hook, detailing the timestamp, working directory, the tool name, and its arguments. ```json {"timestamp": 1704614600000, "cwd": "/path", "toolName": "bash", "toolArgs": "{\"command\":\"git status\"}"} ``` -------------------------------- ### Install Dependencies on Remote Host Source: https://github.com/sortie-ai/sortie/blob/main/docs/workflow-reference.md Use the `SORTIE_SSH_HOST` environment variable in a `before_run` hook to navigate to the workspace and install project dependencies on the remote host. ```bash # before_run — install dependencies on the remote host ssh "$SORTIE_SSH_HOST" "cd \"$SORTIE_WORKSPACE\" && npm install" ``` -------------------------------- ### Example Adapter Invocation - With Cost Cap and Model Override Source: https://github.com/sortie-ai/sortie/blob/main/docs/claude-code-adapter-notes.md Illustrates invoking the Claude Code adapter with specific configuration overrides, including model selection, fallback model, maximum budget, and maximum turns. This allows for fine-grained control over the execution. ```bash sh -c 'claude -p "$1" \ --output-format stream-json \ --verbose \ --dangerously-skip-permissions \ --model claude-sonnet-4-6 \ --fallback-model claude-haiku-4-5-20251001 \ --max-budget-usd 5.00 \ --max-turns 50' -- "$prompt" ``` -------------------------------- ### Example Health Check Responses Source: https://context7.com/sortie-ai/sortie/llms.txt Example responses for health check endpoints. 'ok' indicates normal operation, while 'draining' signifies the service is shutting down. ```json {"status":"ok"} ``` ```json { "status": "ok", "checks": { "database": "pass", "workflow": "pass", "preflight": "pass" } } ``` ```json {"status":"draining"} ``` -------------------------------- ### Agent Status File Write Example Source: https://github.com/sortie-ai/sortie/blob/main/docs/agent-to-orchestrator-protocol.md Demonstrates the complete agent-side protocol implementation for writing the status file. This involves creating the directory if it doesn't exist and echoing the status to the file. ```sh mkdir -p .sortie && echo "blocked" > .sortie/status ``` -------------------------------- ### Example Adapter Invocation - Turn 2 (Continuation) Source: https://github.com/sortie-ai/sortie/blob/main/docs/claude-code-adapter-notes.md Shows how to continue a previous session with the Claude Code adapter by providing a `session_id`. This is useful for multi-turn interactions where context needs to be maintained. ```bash prompt='Continue working on the issue. The previous turn made progress but tests are still failing. Focus on fixing the remaining test failures.' session_id='abc123-session-id' sh -c 'claude -p "$1" \ --output-format stream-json \ --verbose \ --dangerously-skip-permissions \ --resume "$2"' -- "$prompt" "$session_id" ``` -------------------------------- ### Hook: After Create Source: https://github.com/sortie-ai/sortie/blob/main/WORKFLOW.md Execute commands after a new task is created, such as cloning the repository and downloading Go modules. ```bash after_create: | git clone --depth 1 git@github.com:sortie-ai/sortie.git . go mod download ``` -------------------------------- ### Start a continuation turn Source: https://github.com/sortie-ai/sortie/blob/main/docs/codex-adapter-notes.md Starts a subsequent turn within an existing thread, automatically maintaining conversation history. No special flags are needed for continuation turns. ```json {"method": "turn/start", "id": 31, "params": { "threadId": "thr_abc123", "input": [{"type": "text", "text": ""}], "cwd": "/var/sortie/workspaces/PROJ-123" }} ``` -------------------------------- ### Multi-line Extension Path Example Source: https://github.com/sortie-ai/sortie/blob/main/docs/agent-to-orchestrator-protocol.md Illustrates how Version 1 of the protocol handles multi-line status files by only parsing the first line and ignoring subsequent lines. This ensures backward compatibility. ```text blocked reason: missing API key STRIPE_SECRET_KEY context: checked env, checked .env, checked vault ``` -------------------------------- ### Sortie Workflow Example - GitHub Issues + Copilot CLI Source: https://github.com/sortie-ai/sortie/blob/main/examples/WORKFLOW.copilot.md This is a sample workflow for Sortie AI, integrating GitHub Issues with Copilot CLI. It requires specific environment variables like GITHUB_TOKEN and SORTIE_GITHUB_PROJECT. ```go-template {{/* Sortie sample workflow — GitHub Issues + Copilot CLI. Fully GitHub-native: no Jira, no Claude Code. Required env vars: GITHUB_TOKEN — Fine-grained PAT with Issues read/write + Copilot Requests permissions. Serves double duty: the tracker reads it via $GITHUB_TOKEN expansion and the Copilot CLI picks it up from the process environment. SORTIE_GITHUB_PROJECT — Repository in owner/repo format SORTIE_REPO_URL — Git clone URL for the repository Optional: SORTIE_WORKSPACE_ROOT — Base directory for per-issue workspaces (defaults to system temp) */}} You are a senior engineer. Your work is tracked by an automated orchestrator (Sortie) that manages your session, retries failures, and monitors progress. ## Your task **#{{ .issue.identifier }}**: {{ .issue.title }} {{ if .issue.description }} ### Description {{ .issue.description }} {{ end }} ## Context Before making changes, read: - `AGENTS.md` or `CONTRIBUTING.md` for build commands and project conventions - Any existing tests in the area you are modifying - Related source files to understand current patterns ## Rules 1. Run the project's lint and test commands before finishing. All checks must pass. 2. Do not modify protected files (LICENSE, CODEOWNERS) unless the task explicitly requires it. 3. Keep changes minimal — implement exactly what the task requires. 4. Write tests for new functionality. Cover edge cases, not just the happy path. 5. If you encounter a problem outside the scope of this task, stop and explain what blocked you. {{ if not .run.is_continuation }} ## Approach 1. Read the relevant documentation and existing code before writing anything. 2. Implement the minimal change that satisfies the task requirements. 3. Write or update tests to cover the new behavior. 4. Run verification commands and fix any failures. 5. If the task is complete, confirm by reviewing your changes. {{ end }} {{ if .run.is_continuation }} ## Continuation You are resuming work on this task (turn {{ .run.turn_number }} of {{ .run.max_turns }}). Review the current state of the workspace — check test output, lint results, and any partial changes. Do not repeat work already completed. Proceed with the next step. {{ end }} {{ if .attempt }} ## Retry This is retry attempt {{ .attempt }}. A previous run failed or timed out. Check the workspace for partial work and do not start from scratch. Review any error output from the previous attempt if visible in the workspace. {{ end }} {{ if .issue.url }} ## Reference Ticket: {{ .issue.url }} {{ end }} {{ if .issue.labels }} ## Labels {{ .issue.labels | join ", " }} {{ end }} {{ if .issue.parent }} ## Parent issue {{ .issue.parent.identifier }} {{ end }} {{ if .issue.blocked_by }} ## Blockers The following issues block this task. If any are unresolved, focus on preparation work that does not depend on the blocked functionality (tests, scaffolding, documentation). {{ range .issue.blocked_by }}- **{{ .identifier }}**{{ if .state }} ({{ .state }}){{ end }} {{ end }} {{ end }} ``` -------------------------------- ### GitHub Issue Type JSON Example Source: https://github.com/sortie-ai/sortie/blob/main/docs/github-adapter-notes.md Example JSON structure for GitHub issue types, showing how the 'type.name' field is mapped to the domain.Issue.IssueType. This structure is present in organizations with issue types configured. ```json { "type": { "id": 32278178, "name": "Research", "description": "ADR, spike, or investigation before implementation", "color": "purple" } } ``` -------------------------------- ### Simple String Interpolation Example Source: https://github.com/sortie-ai/sortie/blob/main/docs/decisions/0005-prompt-template-engine.md Basic string interpolation using placeholders like `${variable}` or `{variable}`. This approach is simple but lacks conditional or iteration capabilities, making it insufficient for complex prompt logic. ```go ${issue.title} ``` ```go {issue.title} ``` -------------------------------- ### Example Issue JSON Structure Source: https://context7.com/sortie-ai/sortie/llms.txt Example JSON structure for issues used by the file tracker. Includes fields like ID, identifier, title, description, state, priority, labels, and timestamps. ```json [ { "id": "1", "identifier": "TEST-1", "title": "Implement user authentication", "description": "Add JWT-based auth to the API", "state": "To Do", "priority": 1, "labels": ["backend", "security"], "url": "https://example.com/issues/1", "created_at": "2024-01-15T10:00:00Z", "updated_at": "2024-01-15T10:00:00Z", "comments": [ { "id": "c1", "author": "alice", "body": "Use bcrypt for password hashing", "created_at": "2024-01-15T11:00:00Z" } ] } ] ```