{
  "id": "openspec",
  "name": "OpenSpec",
  "homepage": "https://openspec.dev/",
  "description": "Spec-driven development (SDD) for AI coding assistants.",
  "executables": [
    "openspec"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/openspec/config.json",
      "%APPDATA%/openspec/config.json"
    ],
    "secret": []
  },
  "commands": {
    "format": 1,
    "label": "OpenSpec",
    "description": "Initialize OpenSpec in a project or refresh its instruction files. Stores, worksets and workflow commands are outside these forms.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": false,
      "short_bundles": false
    },
    "subcommand": [
      {
        "path": [
          "init"
        ],
        "label": "Initialize OpenSpec",
        "source": [
          {
            "id": "docs",
            "kind": "manual",
            "url": "https://github.com/Fission-AI/OpenSpec/blob/main/docs/cli.md",
            "evidence": "openspec init [path] [options]\n| `--tools <list>` | Configure AI tools non-interactively. Use `all`, `none`, or comma-separated list |\n| `--language <language>` | Write artifacts in this language when creating a new config |\n| `--force` | Auto-cleanup legacy files without prompting |\n| `--profile <profile>` | Override global profile for this init run (`core` or `custom`) |\n| `path` | No | Target directory (default: current directory) |\n"
          }
        ],
        "field": [
          {
            "id": "path",
            "label": "Target directory",
            "type": "path",
            "position": 0,
            "path": {
              "kind": "directory",
              "role": "output"
            },
            "sources": [
              "docs"
            ]
          },
          {
            "id": "tools",
            "label": "AI tools",
            "description": "all, none, or a comma-separated list.",
            "type": "string",
            "option": [
              "--tools"
            ],
            "suggestions": [
              {
                "value": "all",
                "label": "All"
              },
              {
                "value": "none",
                "label": "None"
              },
              {
                "value": "claude,cursor",
                "label": "Claude and Cursor"
              }
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "language",
            "label": "Artifact language",
            "type": "string",
            "option": [
              "--language"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "profile",
            "label": "Profile",
            "type": "enum",
            "option": [
              "--profile"
            ],
            "choices": [
              {
                "value": "core",
                "label": "Core"
              },
              {
                "value": "custom",
                "label": "Custom"
              }
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "force",
            "label": "Clean up legacy files without prompting",
            "type": "boolean",
            "option": [
              "--force"
            ],
            "effect": "delete",
            "sources": [
              "docs"
            ]
          }
        ],
        "task": [
          {
            "id": "init",
            "label": "Initialize",
            "fields": [
              "path",
              "tools",
              "profile"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "path",
              "tools",
              "profile"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "language",
              "force"
            ]
          }
        ]
      },
      {
        "path": [
          "update"
        ],
        "label": "Update instruction files",
        "source": [
          {
            "id": "docs",
            "kind": "manual",
            "url": "https://github.com/Fission-AI/OpenSpec/blob/main/docs/cli.md",
            "evidence": "openspec update [path] [options]\n| `--force` | Force update even when files are up to date |\n| `--dry-run` | Report what the update would change and write nothing |\n| `--json` | With `--dry-run`, print the planned changes as JSON |\n| `path` | No | Target directory (default: current directory) |\n"
          }
        ],
        "field": [
          {
            "id": "path",
            "label": "Target directory",
            "type": "path",
            "position": 0,
            "path": {
              "kind": "directory",
              "role": "output"
            },
            "sources": [
              "docs"
            ]
          },
          {
            "id": "dry_run",
            "label": "Dry run",
            "type": "boolean",
            "option": [
              "--dry-run"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "json",
            "label": "JSON output (with dry run)",
            "type": "boolean",
            "option": [
              "--json"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "force",
            "label": "Force update",
            "type": "boolean",
            "option": [
              "--force"
            ],
            "sources": [
              "docs"
            ]
          }
        ],
        "task": [
          {
            "id": "preview",
            "label": "Preview update",
            "set": {
              "dry_run": [
                true
              ]
            },
            "lock": [
              "dry_run"
            ],
            "fields": [
              "path",
              "dry_run",
              "json"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "path",
              "dry_run",
              "json",
              "force"
            ]
          }
        ]
      }
    ]
  }
}
