From 51dbf8e414ab56a209a06a79fa9900c9f848fd29 Mon Sep 17 00:00:00 2001 From: Jimisola Laursen Date: Sun, 21 Jun 2026 18:53:00 +0200 Subject: [PATCH] feat(ci): add reusable workflow to validate OpenSpec specs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extracts the openspec validate --specs --strict step that the OpenSpec ↔ reqstool dogfooding rollout (see reqstool/PLAN_dog_fooding.md) is adding to every participating repo's build.yml, so it lives once instead of being copy-pasted into each one. This step is fully build-system-agnostic (pure Node, no language toolchain dependency), unlike the reqstool status/validate steps which depend on per-language build artifacts and stay inline per-repo for now. First consumer: reqstool-demo#104. Signed-off-by: Jimisola Laursen --- .../workflows/common-validate-openspec.yml | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/common-validate-openspec.yml diff --git a/.github/workflows/common-validate-openspec.yml b/.github/workflows/common-validate-openspec.yml new file mode 100644 index 0000000..edaab00 --- /dev/null +++ b/.github/workflows/common-validate-openspec.yml @@ -0,0 +1,37 @@ +name: Validate OpenSpec specs + +on: + workflow_call: + inputs: + working-directory: + description: "Project root relative to repo root. Default '.' for repo-root projects." + required: false + type: string + default: "." + node-version: + description: "Node.js version to use." + required: false + type: string + default: "24" + +permissions: + contents: read + +jobs: + validate: + name: Validate OpenSpec specs + runs-on: ubuntu-latest + defaults: + run: + working-directory: ${{ inputs.working-directory }} + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v6 + with: + node-version: ${{ inputs.node-version }} + + - name: Validate OpenSpec specs + run: | + npm install -g @fission-ai/openspec + openspec validate --specs --strict