---
type: agent/instruction
description: Get status and completion percentage for an OpenSpec change
category: "openspec"
usage: ":openspec/status [<change-id>]"
requires-openspec: true
includes:
  - ../../_openspec/status-format
instruction: >
  After receiving the openspec status JSON, check each artifact's `outputPath` for glob patterns (contains `*` or `**`).
  For each glob pattern found:
    1. Use the `glob` tool with pattern `openspec/changes/[change-name]/[outputPath]` to expand it
    2. Replace the glob pattern in `outputPath` with the comma-separated list of relative paths (relative to `openspec/changes/[change-name]/`)
    3. If no files match, replace with "(no files)"
  Then send the modified JSON using {{tool_prefix}}send_file_content with path `.openspec-status.json` to update the cache.
---
{{#openspec}}
{{#status}}
{{>status-format}}
{{/status}}

{{^status}}
{{#args.0.value}}
Run `openspec status --change {{args.0.value}} --json` and send the result using {{tool_prefix}}send_file_content with path `.openspec-status.json` to refresh the cache, then re-render this template to display the results.
{{/args.0.value}}
{{^args.0.value}}
{{#workflow.issue}}
Run `openspec status --change {{workflow.issue}} --json` and send the result using {{tool_prefix}}send_file_content with path `.openspec-status.json` to refresh the cache, then re-render this template to display the results.
{{/workflow.issue}}
{{^workflow.issue}}
**Error:** No change-id provided and no current workflow issue set.

Usage: `{{agent.prefix}}guide :openspec/status <change-id>`

Example: `{{agent.prefix}}guide :openspec/status add-client-documents`

Or set a workflow issue first with `{{agent.prefix}}guide :workflow/issue <change-id>`
{{/workflow.issue}}
{{/args.0.value}}
{{/status}}
{{/openspec}}
