Skip to content
/

OpenSpec Badge Action

openspec-badge-action · wearetechnative/openspec-badge-action · ★ 4 · last commit 2026-02-26

Generate OpenSpec health metrics as SVG badges for embedding in GitHub READMEs via CI.

Best whenSpec-driven development should produce the same social-proof signals (badges) as test coverage and build status.
vs seeds
openspecworkflows, not a participant in them.
Primitive shape
No installable primitives
00

Summary

OpenSpec Badge Action — Summary

OpenSpec Badge Action is a GitHub Actions composite action that generates SVG status badges reflecting four OpenSpec project health metrics: number of specs, number of requirements, open changes, and task completion status. The badges are deployed to the gh-pages branch for embedding in READMEs. The action installs the OpenSpec CLI, queries project metrics via openspec spec list --json and openspec list --changes --json, then generates SVGs via badgen (Node.js). It supports two visual styles (classic gradient, flat solid) and an optional label. No LLM interaction, no workflow orchestration, no prompts — it is a pure CI/CD reporting layer that makes OpenSpec project health visible in GitHub repos.

differs_from_seeds: No seed framework provides CI badge generation. This is a narrow infrastructure utility analogous to test coverage badges or build status indicators, but applied to OpenSpec workflow metrics. It differs from all seeds in that it contributes zero runtime agent behavior — its entire value is a static SVG artifact pushed to gh-pages.

01

Overview

OpenSpec Badge Action — Overview

Origin

Published by wearetechnative (TechNative, a cloud-native company) under Apache-2.0 license. Authored in JavaScript with a shell-based composite GitHub Actions workflow. First released in early 2026, tracking the OpenSpec CLI v1.x interface.

Philosophy

Make OpenSpec project health as immediately visible as test coverage badges or CI build status. The README implicitly frames this as "project health indicators at a glance" — the same social proof mechanism as shields.io badges but for spec-driven development metrics.

Manifesto-style statements (from README)

  • "A GitHub Action that generates an SVG badge showing OpenSpec metrics for your repository."
  • "The badge displays key project health indicators at a glance."
  • "This project uses OpenSpec for structured change management."

Target user

Teams maintaining OpenSpec projects on GitHub who want README badges showing their spec-driven development progress. Primary audience is project maintainers and open-source projects wanting to display workflow health publicly.

Metric types supported

Metric Description
number_of_specs Total specification files
number_of_requirements Total requirements across all specs
tasks_status Ratio of completed vs. open tasks
open_changes Number of active (non-archived) changes
02

Architecture

OpenSpec Badge Action — Architecture

Distribution

  • GitHub Actions composite action (no npm package)
  • Referenced via uses: weAretechnative/openspec-badge-action@main

Install method

- uses: actions/checkout@v4
- uses: weAretechnative/openspec-badge-action@main
  with:
    metric_types: number_of_specs,number_of_requirements,tasks_status,open_changes
    badge_style: flat

Tech stack

  • Action type: Composite (shell-based steps, no Docker)
  • Badge generation: badgen npm package (installed ephemerally in $RUNNER_TEMP)
  • Metric collection: OpenSpec CLI (@fission-ai/openspec) + Node.js JSON parsing
  • Deployment: git push to gh-pages branch with retry logic (up to 3 attempts)

Directory structure

openspec-badge-action/
├── action.yml          # Composite action definition
├── scripts/
│   └── badge-generator.js  # SVG generation script
├── tests/
├── openspec/           # Uses itself as an OpenSpec project
├── examples/badges/    # Example SVG badge outputs
└── README.md

Required runtime

  • GitHub Actions runner (ubuntu-latest)
  • Node.js (on runner)
  • npm (on runner)
  • OpenSpec CLI (installed by action itself: npm install -g @fission-ai/openspec)
  • contents: write permission on the repository

Dependencies

  • @fission-ai/openspec (installed at action runtime)
  • badgen (installed ephemerally in $RUNNER_TEMP/node_modules)

Output location

gh-pages branch → badges/<metric>.svg files

Badge reference syntax

![specs](https://raw.githubusercontent.com/<owner>/<repo>/gh-pages/badges/number_of_specs.svg)
03

Components

OpenSpec Badge Action — Components

action.yml (composite action steps)

Step Name Purpose
1 Validate inputs Validates metric_types against allowlist; validates badge_style; normalizes show_label boolean
2 Install OpenSpec CLI npm install -g @fission-ai/openspec if not present
3 Verify OpenSpec project Checks for openspec/config.yaml; exits with error if absent
4 Collect spec metrics openspec spec list --json → count specs + sum requirements
5 Collect change metrics openspec list --changes --json → count open changes + sum tasks
6 Install badgen npm install --prefix "$RUNNER_TEMP" badgen
7 Generate badges Loops over metrics; calls badge-generator.js for each SVG
8 Configure git user Sets github-actions[bot] identity
9 Deploy badges Fetch gh-pages; copy SVGs; commit and push (retry loop up to 3×)

scripts/badge-generator.js

  • Node.js script that takes CLI flags: --metric, --spec-count, --req-count, --open-changes, --completed-tasks, --total-tasks, --style, --show-label, --output
  • Uses badgen library to produce SVG output

Inputs (action.yml)

Input Description Default
metric_types Comma-separated metric list All 4 metrics
badge_style classic or flat classic
show_label Show "OpenSpec" label false

No skills, hooks, commands, agents, or MCP servers

Purely a GitHub Actions composite action — no Claude Code or AI-facing primitives.

05

Prompts

OpenSpec Badge Action — Prompts

OpenSpec Badge Action ships no prompt files. It contains zero CLAUDE.md, skills, commands, agent instructions, or AI-facing primitives.

No AI interaction

This action purely calls the OpenSpec CLI as a data source and the badgen library as a rendering engine. No LLM is invoked at any point.

Closest thing to "prompts"

The action.yml contains inline shell scripts that are system instructions for the GitHub Actions runner, but these are conventional CI scripts, not LLM prompts.

Verdict: Not applicable. No prompting occurs in this framework.

09

Uniqueness

OpenSpec Badge Action — Uniqueness & Positioning

differs_from_seeds

No seed framework provides CI badge generation for OpenSpec metrics. This is a narrow infrastructure utility without parallel in any of the 11 seeds. Unlike all seed frameworks that add agent behavior, this action adds only passive project health signaling — a downstream artifact of the OpenSpec workflow, not a participant in it.

Positioning

  • Category: OpenSpec ecosystem — CI/CD reporting utility
  • User: Project maintainers who want to display OpenSpec health metrics in their GitHub README
  • Integration: Added to a GitHub Actions workflow alongside existing CI
  • Value: Makes spec-driven development progress visible to contributors and reviewers through familiar badge conventions

Observable failure modes

  1. OpenSpec CLI version drift: The action installs @fission-ai/openspec@latest — if the CLI interface changes, metric collection commands may break
  2. gh-pages branch conflicts: The 3× retry loop handles most conflicts but concurrent runs could still fail
  3. contents: write permission required: Projects with strict branch protection or read-only tokens cannot use this action
  4. JSON parsing brittleness: Metric collection uses node -p inline JSON evaluation — fragile if CLI output format changes

Cross-references

  • Depends on: OpenSpec CLI (@fission-ai/openspec)
  • Spek (this batch) also generates badges (scripts/generate-badges.ts) as part of its static export — similar output, different delivery mechanism
04

Workflow

OpenSpec Badge Action — Workflow

CI workflow

Phase Actor Action Artifact
1 — Trigger GitHub Actions Push to configured branch Workflow run starts
2 — Checkout CI actions/checkout@v4 (fetch-depth: 0 recommended) Full repo + git history
3 — Validate Action Check metric_types, badge_style inputs Validated input values
4 — Install CLI Action npm install -g @fission-ai/openspec OpenSpec CLI ready
5 — Verify project Action Check openspec/config.yaml exists Continue or fail
6 — Collect metrics Action openspec spec list --json, openspec list --changes --json JSON metric data
7 — Generate badges Action Node.js badge-generator.js per metric SVG files in $RUNNER_TEMP/badges/
8 — Deploy Action Fetch gh-pages, copy SVGs, commit, push (3× retry) Badges on gh-pages branch

Approval gates

None — fully automated CI action.

Phase-to-artifact map

Phase Artifact
Metric collection JSON stats from OpenSpec CLI
Badge generation *.svg files in runner temp
Deployment badges/ directory on gh-pages branch

Failure modes

  • Missing openspec/config.yaml → immediate exit with error
  • Invalid metric type input → immediate exit with error
  • Push conflict after 3 retries → action fails
06

Memory Context

OpenSpec Badge Action — Memory & Context

State storage

None. The action is stateless — each run is fully independent.

Persistence

The gh-pages branch serves as persistent storage for the generated badge SVGs, but this is standard GitHub repository hosting, not a framework-specific state mechanism.

Cross-session handoff

Not applicable. CI actions are ephemeral.

Context compaction

Not applicable. No LLM context involved.

07

Orchestration

OpenSpec Badge Action — Orchestration

Multi-agent support

None.

Orchestration pattern

Sequential (action steps run in order as defined in action.yml).

Isolation mechanism

GitHub Actions runner (ephemeral cloud VM per run). This is CI infrastructure isolation, not agent isolation.

Multi-model support

None.

Execution mode

One-shot (triggered by CI event, runs to completion, exits).

Subagents

None.

Crash recovery

Retry logic: push to gh-pages is retried up to 3 times on conflict (RETRY_LIMIT=3).

08

Ui Cli Surface

OpenSpec Badge Action — UI & CLI Surface

CLI binary

None. This is a GitHub Actions action, not a CLI tool.

Local UI surface

None. The output is SVG files hosted on gh-pages, displayed in GitHub READMEs.

IDE integration

None.

Observability

  • GitHub Actions run log provides step-by-step output
  • Badge SVG files are the only output artifact
  • [skip ci] commit tag on badge commits avoids CI loops

Configuration surface

Three inputs in action.yml:

  • metric_types — comma-separated list
  • badge_styleclassic or flat
  • show_labeltrue or false

User-facing surface

Embedded SVG badges in README.md, rendered by GitHub's Markdown renderer.

Related frameworks

same archetype · same primary tool · same memory type

BMAD-METHOD ★ 48k

Provides a full agile delivery lifecycle with named expert-persona AI collaborators that elicit the human's best thinking rather…

Agent OS ★ 4.6k

Extracts implicit codebase conventions into token-efficient markdown standards files and injects them selectively into AI agent…

Claude Conductor ★ 367

Gives Claude Code a persistent, cross-linked, auto-analyzed documentation system so it retains codebase context across sessions.

Spec-Driver (Greenfield Spec-Driven Development) ★ 25

Prevents spec rot in AI-assisted development by making implementation changes flow back into evergreen, authoritative specs via…

Anthropic Knowledge Work Plugins ★ 16k

Role-specialized plugin bundles with live MCP connectors that turn Claude into a domain expert for enterprise knowledge workers.

Codex Integration for Claude Code (skill-codex) ★ 1.3k

Single Claude Code skill that handles Codex CLI invocation correctly (stdin blocking, thinking token suppression, session resume)…