requirements-verification
Skill210 starsChanged 6 months agoApache-2.0View on GitHub
Analyzes an OpenSpec requirements spec for internal consistency, implementation compliance, and test opportunities; when a shell is available, run openspec validate first for structural checks. Use when reviewing specs, verifying implementation against requirements, or identifying test gaps.
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
Before deep analysis, run the OpenSpec CLI so the spec matches what CI enforces.
- Very specific: line 31
If validation fails, report the CLI errors first and fix the markdown before spending effort on sections 1–3.
- Very specific: line 35
Read the doc and extract: title/type name, implementation path (from Resource implementation: / Data source implementation: / Workflow …
- Distinctive: line 44
Lifecycle: No requirement that X triggers replace and another that X is updated in place.
- Distinctive: line 46
State/Plan: No requirement that the resource “preserve null” and another that it “store empty list” for the same field.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Requirements Document Analysis
Analyze an OpenSpec requirements spec (from openspec/specs/<capability>/spec.md, or a delta spec under openspec/changes/**/specs/) and produce three outputs:
- Internal consistency — whether requirements contradict each other or the schema.
- Implementation compliance — whether the implementation meets each requirement.
- Test opportunities — concrete unit or acceptance tests that would verify requirements programmatically.
Input
- Requirements document: User specifies the path (e.g.
openspec/specs/elasticsearch-security-role/spec.md) or the entity name/implementation path. Resolve to thespec.mdunderopenspec/specs/<capability>/(or the relevant delta spec path). - Implementation: From the doc’s “Resource implementation” or “Data source implementation” line (e.g.
internal/elasticsearch/security/role). Use that package for compliance and test analysis.
Workflow
0. OpenSpec structural validation (recommended when a shell is available)
Before deep analysis, run the OpenSpec CLI so the spec matches what CI enforces. This checks structure (e.g. ### Requirement: / #### Scenario: shape, SHALL / MUST in requirement bodies)—not semantic consistency or implementation compliance.
- Repo root, after
make setup(ormake setup-openspec/npm ci):make check-openspec
or:OPENSPEC_TELEMETRY=0 ./node_modules/.bin/openspec validate --specs - Single spec (optional):
OPENSPEC_TELEMETRY=0 ./node_modules/.bin/openspec validate <capability> --type spec(e.g.elasticsearch-security-role) - Active change deltas (optional):
openspec validate --allto includeopenspec/changes/**
If validation fails, report the CLI errors first and fix the markdown before spending effort on sections 1–3. If no terminal is available, proceed with manual review and note that openspec validate was not run.
1. Parse the requirements document
- Read the doc and extract: title/type name, implementation path (from
Resource implementation:/Data source implementation:/Workflow implementation:/Script implementation:), Purpose, Schema (HCL/YAML block if present). - List every
### Requirement:section: id (use(REQ-NNN)or(REQ-001–REQ-003)from the heading if present; otherwise derive a short id from the heading), category (infer from content: API, Identity, Import, etc.), and text (full SHALL/MUST statements in that section). Normalize references (e.g. “id format”, “cluster_uuid/name”) for consistency checks.
2. Internal consistency
Apply the checks in reference.md (Consistency checks):
- Identity/Import: Same id format in Identity and Import requirements; no conflicting formats.
- Schema vs requirements: Required/optional/computed in schema matches what requirements imply (e.g. “when X is configured” implies X is optional or optional+computed).
- Lifecycle: No requirement that X triggers replace and another that X is updated in place.
- Compatibility: Version numbers and feature names aligned across requirements; no conflicting minimum versions for the same feature.
- State/Plan: No requirement that the resource “preserve null” and another that it “store empty list” for the same field.
- StateUpgrade: Referenced prior schema version exists; upgrade steps are ordered and non-conflicting.
Output: Consistent or list Inconsistencies with requirement ids and short explanation.
3. Implementation compliance
- Resolve implementation package from the doc (e.g.
internal/elasticsearch/security/role). Locateresource.go,schema.go,create.go,read.go,update.go,delete.go,models.go, state upgrade code, and any validators/plan modifiers. - For each requirement, determine where the behavior would be implemented (see reference.md “Requirement → implementation mapping”). Search or read that code and verify the behavior.
- Classify each requirement: Met (code clearly implements it), Not met (code contradicts or omits it), Unclear (cannot determine from code or tests).
- Output: Table or list: REQ-ID, Category, Status (Met / Not met / Unclear), Evidence (file/function or “not found”).
4. Test opportunities
- Locate unit tests:
*_test.goin the implementation package (e.g.resource_test.go,state_upgrade_test.go) and acceptance tests:acc_test.go(or*_acc_test.go) for the resource. - For each requirement, decide whether it is verifiable by unit test (e.g. state upgrade logic, id parsing, validation) or verifiable by acceptance test (e.g. create/read/update/delete, import, error diagnostics). See reference.md “Test opportunity patterns”.
- Identify requirements that are not covered by existing tests (or only weakly covered). Suggest concrete test cases: unit test name + scenario, or acceptance test step (config + checks) that would assert the requirement.
- Output: List of Suggested tests, each with: requirement id(s), type (unit / acceptance), description, and how it would verify the requirement.
5. Report
Produce a single report with three sections:
- Internal consistency: Result + any inconsistencies.
- Implementation compliance: Summary (e.g. X/Y met, Z unclear) + per-requirement status table.
- Test opportunities: List of suggested tests with requirement ids and verification approach.
Output format
# Requirements analysis: <entity name>
**Document**: `openspec/specs/.../spec.md`
**Implementation**: `internal/...` (or workflow/script path from the spec)
## 1. Internal consistency
- **Result**: Consistent | Inconsistent
- **Inconsistencies** (if any): [REQ-xxx] vs [REQ-yyy]: ...
## 2. Implementation compliance
| REQ-ID | Category | Status | Evidence |
|--------|------------|----------|----------|
| REQ-001| API | Met | create.go, update.go call PutRole |
...
**Summary**: X met, Y not met, Z unclear.
## 3. Test opportunities
| REQ-ID(s) | Type | Suggested test | Verifies |
|-----------|------------|----------------|----------|
| REQ-008 | Acceptance | Import with invalid id; expect error diagnostic | Import validation |
...Reference
- OpenSpec authoring and CLI overview:
dev-docs/high-level/openspec-requirements.md - Requirement categories and implementation mapping: reference.md
- Existing entity code-path checklist (for locating implementation):
.agents/skills/existing-entity-requirements/reference.md - Schema/acceptance test coverage (for test patterns):
.cursor/skills/schema-coverage/if analyzing attribute-level coverage alongside requirements.
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- elastic/terraform-provider-ec★ 18313% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository22 other files it gives its agents.
- AGENTS.mdAGENTS.md
- existing-entity-requirementsSkill
- flaky-test-catcherSkill
- new-entity-requirementsSkill
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-continue-changeSkill
- openspec-exploreSkill
- openspec-implementation-loopSkill
- openspec-new-changeSkill
- openspec-plus-applySkill
- openspec-plus-designSkill
- openspec-plus-proposalSkill
- openspec-plus-specSkill
- openspec-plus-tasksSkill
- openspec-plus-tddSkill
- openspec-proposeSkill
- openspec-sync-specsSkill
- openspec-verify-changeSkill
- pr-monitoring-loopSkill
- schema-coverageSkill
- agentic-workflowsSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

