Load only these knowledge files before executing:
- knowledge/linear-operations.md
Purpose: Bind the active repo workflow to a Linear team and project.
This command establishes the durable relationship between the current active_issue and its Linear representation. It does not change the 12-step pipeline. It only creates or updates the PM-facing tracking layer.
Run /linear-bind when:
- a new active issue should be tracked in Linear
- the active issue already exists in the repo but has no Linear binding
- the Linear team or project name needs to be corrected
Recommended checkpoint:
- Immediately after
/create-issue
Run as:
/linear-bind [team] [project-name]
If team is omitted and exactly one Linear team exists, use that team. If more than one team exists, raise an explicit error.
If project-name is omitted, derive it from the repo issue title.
- Read
project-state.md - Read
experiments/ideas/<active_issue>.md - Read
experiments/exploration/exploration-<issue_number>.mdif it exists - Read
experiments/linear-sync/issue-<NNN>.jsonif it exists
Required fields:
active_issue- project name
- current stage
If active_issue is none, stop and raise an explicit error.
Activate agents/linear-agent.md.
Extract:
- repo issue number
- repo issue title
- current stage
- existing Linear metadata from
project-state.md - existing sync map metadata from
experiments/linear-sync/issue-<NNN>.json
Using the provided team and optional project name, use these MCP tools:
list_teams,get_teamlist_issue_labels,create_issue_labellist_projects,save_projectlist_issues,save_issue
Rules:
- resolve the team by explicit argument, or default to the sole team if exactly one exists
- ensure the parent label group
AI Product OSexists - ensure child labels exist:
Discovery,Planning,Execution,Review,Blocked,Release Ready,Completed - ensure issue type labels exist at the team level:
Feature,Enhancement,Bug - ensure one Linear project exists for the repo issue
- ensure one root Linear issue exists under that project
Issue type label mapping (read issue_type from the issue file header):
issue_type in issue file |
Linear label to apply |
|---|---|
Feature |
Feature |
Enhancement |
Enhancement |
Bug Fix |
Bug |
Default object shape:
- project title:
issue-<NNN> — <repo issue title> - root issue title:
issue-<NNN> — <repo issue title> - root issue labels:
<mapped issue type label>andAI Product OS/Discovery - root issue status:
Backlog
Write the following fields to project-state.md:
linear_enabled: truelinear_team_idlinear_teamlinear_project_idlinear_projectlinear_project_urllinear_root_issue_idlinear_root_issue_identifierlinear_sync_map_pathlinear_last_synclinear_sync_status
Also write experiments/linear-sync/issue-<NNN>.json with:
- team id and name
- project id, name, and URL
- root issue id, identifier, and title
- label ids (stage labels +
feature,enhancement,bugtype labels) issue_typefield matching the value from the issue file (Feature,Enhancement, orBug Fix)- empty
documentsobject - empty
tasksobject - last sync mode
bind
Do not modify any pipeline stage fields.
Lookup order:
experiments/linear-sync/issue-<NNN>.jsonproject-state.md- live Linear query by exact team plus exact title
Re-running /linear-bind must update existing objects rather than create duplicates.
- If the Linear team cannot be resolved, raise an explicit error
- If no team argument is provided and multiple teams exist, raise an explicit error
- If the active issue is missing, raise an explicit error
- If Linear write operations fail, raise an explicit error with operation context
- Never silently continue without a binding
Operation
Repo Context
Linear Team
Linear Project
Root Linear Issue
Binding Result
Updated State Fields