Load only these knowledge files before executing:
- knowledge/linear-operations.md
Purpose: Close the Linear project for the active issue after the repo workflow is complete.
This command finalizes the PM-facing tracking layer after /learning has finished in the repo.
Run /linear-close after /learning succeeds.
This command should not be used to bypass unfinished repo stages.
- Read
project-state.md - Read
experiments/results/postmortem-<issue_number>.mdif it exists - Read the most recent learning outputs if they exist
- Read Linear metadata from
project-state.md - Read
experiments/linear-sync/issue-<NNN>.jsonif it exists
If the active issue is not bound to Linear, stop and raise an explicit error.
Activate agents/linear-agent.md.
Confirm:
last_command_runis/learningor equivalent completion is recorded- repo status is
completed,done, or otherwise clearly closed
If the repo workflow is still active, raise an explicit error.
Use these MCP tools:
get_project,save_projectget_issue,save_issuelist_comments,save_commentcreate_document,update_document
Expected behavior:
- set the project state to
completed - set the root issue status to
Done - remove active stage labels and apply
AI Product OS/Completed - create or update a closeout snapshot document titled
issue-<NNN> Closeout Snapshot - include postmortem summary, learning summary, and local repo artifact paths
- add a final closeout comment on the root issue
Write these fields to project-state.md:
linear_last_synclinear_sync_status
Also update experiments/linear-sync/issue-<NNN>.json with:
- closeout document id
- last sync mode
close - last sync timestamp
Do not modify historical pipeline records.
- If the repo workflow is not complete, raise an explicit error
- If closing the Linear project fails, raise an explicit error with target context
Operation
Repo Completion Check
Linear Target
Closeout Actions
Final Sync Result