Skip to content

About

Hash OpenSpec Custom Schema

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

82 Commits

Folders and files

Repository files navigation

tempa-spec

tempa-spec — a custom OpenSpec schema for teams who don't take an agent's word that a phase is done.

License: MIT Schema version Requires


About tempa-spec

Tempa — Indonesian for forging: heating, hammering, folding, repeated until the metal holds. A blade forged this way develops pamor, a pattern that only appears when the process was done right — it cannot be shortcut. This schema treats specs the same way.

The default OpenSpec pipeline (proposal -> specs -> design -> tasks -> apply) takes the agent's self-report at face value: it produces an artifact, checks a box, moves on. tempa-spec doesn't. It adds a capped interview before anything gets proposed, a human-gated consistency pass before implementation starts, and a strict TDD-plus-review discipline before a task counts as done — three places where the default schema just trusts and tempa-spec makes the agent show its work.

proposal -> specs -> design -> tasks -> align -> apply (TDD + review)

Pipeline

Phase Produces What it does
proposal proposal.md A short interview (4 questions a round, 4 rounds at most), then why + what + affected capabilities. Checked by the lint and your read-and-confirm.
specs specs/**/*.md Testable WHEN/THEN scenarios, one file per capability. Adversarially reviewed.
design design.md How to implement — decisions, seams, trade-offs, migration. Adversarially reviewed.
tasks tasks.md Checkbox groups with Depends on:; a group that delivers a threat mitigation names it on Threats:. No scenario list: the lint checks every scenario is covered by a design seam and every threat by a group.
align ✨ align.md Automated checks + a human walkthrough led by specs and design, until a round is clean or the human signs off. Runs before apply.
apply code (tracks tasks.md) Strict TDD, one task at a time, then a separate spec-vs-code review (up to 3 passes, findings to screen).

✨ = no equivalent in the default OpenSpec schema.

Install (local, into the current repo)

Installs tempa-spec into ./openspec/schemas/tempa-spec, provisions the skills its instructions point to (one npx skills add for this repo's skills/ — both the local hrt-* skills and the vendored external ones), and sets it as the repo's default schema (openspec/config.yaml):

curl -fsSL https://raw.githubusercontent.com/hash-id/openspec-schema/master/scripts/install-schema.sh | bash

Windows (PowerShell):

irm https://raw.githubusercontent.com/hash-id/openspec-schema/master/scripts/install-schema.ps1 | iex

Defaults to the latest git tag (stable release). Pass a tag/ref to pin a specific version:

curl -fsSL https://raw.githubusercontent.com/hash-id/openspec-schema/master/scripts/install-schema.sh | bash -s -- 2026.7.6
$s = irm https://raw.githubusercontent.com/hash-id/openspec-schema/master/scripts/install-schema.ps1; & ([scriptblock]::Create($s)) 2026.7.6

Local only (no global/user dir). Re-run to update.

Use

openspec new change <name>          # uses tempa-spec as default
openspec instructions proposal --change <name>
openspec instructions align   --change <name>
openspec instructions apply   --change <name>

Security

Security checks run in two places: at plan time (specs, design) and on the code (apply).

At plan time

specs and design run a short security pass (hrt-security-pass), but only when a change touches a trust boundary.

  • Lists: the OWASP Top 10 that matches what the change touches (web, API, mobile, LLM, agent, machine identities), plus the MITRE CWE Top 25.
  • Money, stock, quantity, limits, multi-step state flows: also a list of business-flow abuse questions (business-flow.md).
  • New or upgraded third-party package: also fires the pass, with questions on dependency confusion, typosquatting, install scripts, and the lockfile diff (OWASP CICD-SEC-3).

On the code (apply)

apply reuses the same lists on the changed code, and adds three mechanical checks:

  • Your repo's own commands. Whatever security commands the repo already has (scripts, pre-commit, CI, scanner configs), scoped to the diff.
  • Floor guard. A bundled script over the diff that flags new suppression comments (# nosec, @ts-ignore, ...), added skips, deleted tests, fewer assertions, and stubs, so a check is never silenced to get to green without you deciding.
  • opengrep rules. A small set of rules of our own (Python, JavaScript/TypeScript, and Odoo), run whenever a change touches Python or JavaScript/TypeScript files (or Odoo XML).

opengrep is required

tempa-spec installs no scanner, but it requires opengrep. If the opengrep command is missing or disabled, the review does not finish: the change stays a release blocker until it is installed. There is no skip and no waiver. Install it yourself; the installer does not.

If you have no other scanner, two language-agnostic, permissively licensed starting points are gitleaks (secrets) and osv-scanner (vulnerable dependencies); add a SAST tool for your language on top.

Installing opengrep

Releases are on the releases page and are signed with Cosign; prefer a pinned version over latest. The project's own quick installs:

curl -fsSL https://raw.githubusercontent.com/opengrep/opengrep/main/install.sh | bash   # Linux, macOS
irm https://raw.githubusercontent.com/opengrep/opengrep/main/install.ps1 | iex          # Windows (use -Version to pin)

They run a script from the network, so read it first if your policy asks for that. The bundled rules passed their tests on versions 1.11.1 and 1.32.0. The rules are local files and the scan fetches nothing.

Layout

openspec/schemas/tempa-spec/schema.yaml   workflow definition (artifacts, deps, apply)
openspec/schemas/tempa-spec/templates/    artifact templates
skills/hrt-*                        local skills referenced from schema.yaml
skills/vendor/                      external skills vendored in (grilling, tdd, ...) + vendor-lock.json
scripts/merge-config.cjs            installer's config.yaml merger
scripts/vendor-skills.cjs           refreshes skills/vendor/ from upstream (--check / --apply)
scripts/install-schema.sh           local installer (no params, bash)
scripts/install-schema.ps1          local installer (no params, PowerShell)

Editing the schema itself (not just using it)? See AGENTS.md.

About

Hash OpenSpec Custom Schema

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages