GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - DavidCockson/EARS-SPECS: Tools for helpings with EARS (Easy Approach to Requirements Syntax) when using SDD (Spec driven development)

BranchesTags
Open more actions menu

Latest commit

 

History

24 Commits
24 Commits

Folders and files

NameName
Last commit message
Last commit date
.gemini
.gemini
 
 
.github/workflows
.github/workflows
 
 
.vscode
.vscode
 
 
examples
examples
 
 
media
media
 
 
snippets
snippets
 
 
src
src
 
 
test
test
 
 
.gitignore
.gitignore
 
 
.vscodeignore
.vscodeignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
extension.js
extension.js
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 

Repository files navigation

EARS Specs 👂

VS Marketplace Open VSX License: MIT

A VS Code extension for authoring EARS requirements — clear, testable specifications written in the Easy Approach to Requirements Syntax. It provides syntax highlighting, snippets for every EARS pattern, and a sidebar that classifies and organises requirements automatically.

The aim is consistent, reviewable specifications with zero manual bookkeeping: write a requirement, and the extension recognises its type, colours its structure, and files it in the right place.

EARS Specs in action — a requirements document organised into the five EARS types, with syntax highlighting, STABLE/DRAFT status badges, and the auto-classifying sidebar


Install

Install once from the Marketplace; it updates automatically thereafter. Supported on Windows, macOS and Linux.

From inside VS Code

  1. Open the Extensions view — Ctrl+Shift+X (Cmd+Shift+X on macOS).
  2. Search for EARS Specs by davidcockson (the 👂 icon).
  3. Select Install.

From the command line

code --install-extension davidcockson.ears-specs

VSCodium, Cursor and Gitpod resolve the same identifier via Open VSX — see Other ways to install.

Verify

Create a file ending in .ears.md, open it, and enter:

[DRAFT] When <user logs in>, the system shall <check the password>.

The keywords are highlighted and the 👂 EARS icon appears in the Activity Bar.


Using it

Snippets

Type a prefix and press Tab to expand the pattern; press Tab again to move between the <placeholders>.

Prefix Expands to EARS pattern
e-ubiq The <system> shall <response> Ubiquitous (always active)
e-state While <state>, the <system> shall <response> State-driven
e-event When <trigger>, the <system> shall <response> Event-driven
e-opt Where <feature>, the <system> shall <response> Option-driven
e-err If <problem>, then the <system> shall <response> Unwanted behaviour
e-draft [DRAFT] Mark as under discussion
e-stable [STABLE] Mark as agreed

If Tab does not expand, press Ctrl+Space to select the snippet from the list.

Requirements sidebar

Open the EARS view from the Activity Bar (👂). It lists every requirement in the active file, grouped by EARS pattern. A filled marker indicates STABLE (agreed); a hollow marker indicates DRAFT (under discussion). Select any entry to jump to its line.

Commands

Open the Command Palette — Ctrl+Shift+P (Cmd+Shift+P on macOS) — and run:

Command Description
EARS: Organize Document Rewrites the file into one section per EARS pattern, STABLE before DRAFT. The title and any notes above the first requirement stay at the top; other headings are regenerated, and lines that match no pattern go under Unclassified. Run it once a draft is complete.
EARS: New Spec File Scaffolds a templated .ears.md in the open folder (File → Open Folder). Never overwrites an existing file.
EARS: Refresh Outline Rebuilds the sidebar if it falls out of sync.

How it works

EARS in brief

EARS — the Easy Approach to Requirements Syntax — constrains every requirement to one of five sentence patterns, removing the ambiguity of free-form prose. Each pattern is identified by its leading keyword:

# Pattern Template Example
1 Ubiquitous The <system> shall <response> The system shall log all logins.
2 State-driven While <state>, the <system> shall <response> While the session is active, the system shall refresh the token.
3 Event-driven When <trigger>, the <system> shall <response> When the user clicks login, the system shall check the password.
4 Option-driven Where <feature>, the <system> shall <response> Where two-factor is enabled, the system shall require a code.
5 Unwanted behaviour If <problem>, then the <system> shall <response> If login fails three times, then the system shall lock the account.

What the extension adds

  • Scoped to .ears.md — features activate only for these files, so they never interfere with your other Markdown.
  • Syntax highlighting — keywords (When / While / Where / If / then), the backbone (The / shall), <placeholders>, and [DRAFT] / [STABLE] badges are coloured using VS Code decorations, with variants for light and dark themes. No additional extension required.
  • Automatic classification — each requirement's pattern is inferred from its leading keyword, so the sidebar groups everything with no manual tagging. Requirements can be plain lines or list items (-, *, 1.).
  • One-command organisation — Organize Document rewrites the file into ordered sections by pattern and status.
  • Status tracking — [DRAFT] and [STABLE] markers record whether a requirement is still under discussion or agreed.

The result is a spec-driven workflow: draft freely, and the extension keeps requirements classified, consistent and reviewable, with agreed and open items visible at a glance.


Other ways to install

The Marketplace install above suits most users. These are alternatives.

VSCodium, Cursor, Gitpod (Open VSX)

These editors resolve extensions from the Open VSX Registry. Search for EARS Specs in the Extensions view, or run:

code --install-extension davidcockson.ears-specs

Manual .vsix (offline or air-gapped)

  1. Download the latest .vsix from the Releases page.
  2. In VS Code: Extensions view → ... menu → Install from VSIX… → select the file.

macOS: if code reports command not found, run Shell Command: Install 'code' command in PATH from the Command Palette, then retry.

Build from source

git clone https://github.com/davidcockson-compliance/EARS-SPECS.git
cd EARS-SPECS
code .          # press F5 to launch an Extension Development Host

Package an installable build:

npm install -g @vscode/vsce
vsce package    # produces ears-specs-x.y.z.vsix

Run the tests:

npm install
npm run test:unit         # parser and Organize logic, no VS Code needed
npm run test:integration  # launches VS Code and exercises the commands

Pushing a version tag such as v0.3.0 runs the tests, builds the .vsix and publishes a GitHub Release automatically (see .github/workflows/release.yml).

License

MIT

About

Tools for helpings with EARS (Easy Approach to Requirements Syntax) when using SDD (Spec driven development)

marketplace.visualstudio.com/items?itemName=davidcockson.ears-specs

Topics

earsrequirements-engineeringspec-driven-developmentvscode-extension

Resources

Readme
MIT license
Activity

Stars

2 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.