spec-kit icon indicating copy to clipboard operation
spec-kit copied to clipboard

[Extension]: Add OKR Bets

Open juanl opened this issue 2 weeks ago โ€ข 2 comments

Extension ID

okr

Extension Name

OKR Bets

Version

0.2.1

Description

Treat every spec as a bet on a team Key Result: a hypothesis and a verification contract before /speckit.specify, measurement planned into the plan, and a verdict after launch that gates scaling. Company OKRs are read-only context.

Author

juanl

Repository URL

https://github.com/juanl/spec-kit-okr

Download URL

https://github.com/juanl/spec-kit-okr/releases/download/v0.2.1/spec-kit-okr-0.2.1.zip

License

MIT

Homepage (optional)

https://github.com/juanl/spec-kit-okr

Documentation URL (optional)

https://github.com/juanl/spec-kit-okr/blob/v0.2.1/README.md

Changelog URL (optional)

https://github.com/juanl/spec-kit-okr/blob/v0.2.1/CHANGELOG.md

Required Spec Kit Version

=0.9.0

Required Tools (optional)

None. Optional: an MCP server for your OKR tool, if team or company OKRs live outside the repo (read through the server's tools; a local mirror records when it was synced).

Number of Commands

7

Number of Hooks (optional)

3

Tags

okr, hypothesis, metrics, experimentation, product

Key Features

  • Frame a feature as a bet before the spec (/speckit.okr.frame, before_specify hook): the team KR it should move, the hypothesis, what result would refute it, guardrails, and candidate ideas, in about 7 questions (3 in lite mode).
  • Verification contract in every bet: one row per number the verdict depends on (leading signals, KRs, guardrails), each with its definition, source and owner, baseline, validated/refuted thresholds, and whether it can be measured today. The spec, the plan, and the review all read it and never redefine a number.
  • Gate before building: READY / NEEDS WORK / BLOCKED. BLOCKED means the verdict cannot be computed yet (for example, a KR that can only be read through another team or a vendor with no date), and names what unblocks it.
  • Align the spec with its bet (/speckit.okr.align, after_specify hook): P1 must be the slice that can confirm or refute the hypothesis; scale stories are gated on validation; every guardrail is covered; success criteria are tagged to contract IDs. Frames the bet post-hoc if none exists.
  • Measurement planned into the plan (/speckit.okr.measure, after_plan hook): capture, instrumentation, baselines taken before exposure, attribution strategy, sizing, dependencies, and a check-in calendar, so /speckit.tasks generates them before the validation slice ships. A readiness mode works on a bet before any spec exists, and looks beyond product analytics (APM, logs, databases, third parties).
  • Verdict after launch (/speckit.okr.review): validated / refuted / inconclusive / too early, with guardrail overrides. It decides scale, iterate, or stop, and never moves a threshold after seeing the data.
  • Living team OKRs, read-only company OKRs (/speckit.okr.set, /speckit.okr.checkin, /speckit.okr.status): team sets with check-ins, change log, and period close; company OKRs imported as read-only context to see which company KR each bet impacts. Sources per level: markdown in the repo, or an OKR tool through MCP.

Testing Checklist

  • [x] Extension installs successfully via download URL
  • [x] All commands execute without errors
  • [x] Documentation is complete and accurate
  • [x] No security vulnerabilities identified
  • [x] Tested on at least one real project

Submission Requirements

  • [x] Valid extension.yml manifest included
  • [x] README.md with installation and usage instructions
  • [x] LICENSE file included
  • [x] GitHub release created with version tag
  • [x] All command files exist and are properly formatted
  • [x] Extension ID follows naming conventions (lowercase-with-hyphens)

Testing Details

Tested on:

  • macOS with Spec Kit (specify-cli) 0.16.2, Claude Code integration, skills mode
  • Ubuntu (GitHub Actions CI) with specify-cli 0.16.2: static checks (41 tests) plus a fresh specify init โ†’ extension add โ†’ preset add, checking that the 7 skills are generated and the preset resolves in the spec template

Test projects:

  • The example in the repo (examples/reporting-team-2027-Q1, recorded with v0.1.0): set โ†’ frame โ†’ specify โ†’ align โ†’ review โ†’ checkin โ†’ status, with a PM persona answering from a fixed fact sheet, and a mock MCP OKR tool for the MCP source.
  • A private project with one real product team's OKRs and a real bet framed by its PM (not linked: internal data), run through set โ†’ frame โ†’ specify โ†’ align โ†’ measure with v0.2.x. The bet reached BLOCKED on its own, because its KR could only be read through a vendor with no date; align found decisions recorded only in the spec and a missing observation window; measure in readiness mode found that the vendor deliverable the team counted on measured usage, not timings, and produced a staggered rollout and a deadline calendar.

Test scenarios:

  1. Installed from the v0.2.1 release URLs (--from) in a fresh project, and with --dev
  2. Upgraded an existing project in place with add --force (config preserved)
  3. Ran the commands interactively and headless (claude -p)
  4. Verified the written artifacts (team set, bet file, spec section, measurement plan, review) and that company OKRs are never written
  5. Checked that a run with arguments only answers in the project's language (artifact_language: auto)

Example Usage

# Install the extension (and, recommended, its companion preset)
specify extension add okr --from https://github.com/juanl/spec-kit-okr/releases/download/v0.2.1/spec-kit-okr-0.2.1.zip
specify preset add --from https://github.com/juanl/spec-kit-okr/releases/download/v0.2.1/spec-kit-okr-bet-preset-0.2.1.zip

# Team OKRs for the period, and a read-only copy of the company OKRs
/speckit.okr.set
/speckit.okr.set level=company

# Frame a feature as a bet on a team KR, then write the spec that tests it
/speckit.okr.frame Stakeholders don't open the weekly report
/speckit.specify okr:reporting/H-1 Share the weekly report by email

# Check the spec, plan the measurement, and read the verdict after launch
/speckit.okr.align
/speckit.plan
/speckit.okr.measure
/speckit.okr.review KR-1=12%, G-1=+3%

Proposed Catalog Entry

{
  "okr": {
    "name": "OKR Bets",
    "id": "okr",
    "description": "Treat every spec as a bet on a team Key Result: a hypothesis and a verification contract before /speckit.specify, measurement planned into the plan, and a verdict after launch that gates scaling. Company OKRs are read-only context.",
    "author": "juanl",
    "version": "0.2.1",
    "download_url": "https://github.com/juanl/spec-kit-okr/releases/download/v0.2.1/spec-kit-okr-0.2.1.zip",
    "sha256": "56b17e6dce43b6fd28e0b33778dc13d11695f57a46d755c4d714c716a373292f",
    "repository": "https://github.com/juanl/spec-kit-okr",
    "homepage": "https://github.com/juanl/spec-kit-okr",
    "documentation": "https://github.com/juanl/spec-kit-okr/blob/v0.2.1/README.md",
    "changelog": "https://github.com/juanl/spec-kit-okr/blob/v0.2.1/CHANGELOG.md",
    "license": "MIT",
    "category": "process",
    "effect": "read-write",
    "requires": {
      "speckit_version": ">=0.9.0"
    },
    "provides": {
      "commands": 7,
      "hooks": 3
    },
    "tags": ["okr", "hypothesis", "metrics", "experimentation", "product"],
    "verified": false,
    "downloads": 0,
    "stars": 0,
    "created_at": "2026-11-12T00:00:00Z",
    "updated_at": "2026-11-12T00:00:00Z"
  }
}

Additional Context

A companion preset, okr-bet, adds a Hypothesis & Bet section (with the verification contract) to the spec template and teaches /speckit.specify to fill it from an okr:<team>/H-n bet. It is submitted separately with the Preset Submission template. The extension works without it: /speckit.okr.align inserts the section afterwards.

juanl avatar Nov 12 '26 13:11 juanl

cc @github/spec-kit-maintainers โ€” new catalog submission for review.

github-actions[bot] avatar Nov 12 '26 14:11 github-actions[bot]

Pull request created: #5412

Generated by Add Community Extension from Issue Submission ยท copilot ยท gpt53codex ยท 35.1 AIC ยท โŒ– 0.703 AIC ยท โŠž 29.1K

github-actions[bot] avatar Nov 12 '26 14:11 github-actions[bot]