existing-entity-requirements
Skill183 starsChanged 20 days agoApache-2.0View on GitHub
Capture current OpenSpec requirements for one named Terraform resource or data source that is about to change and has no spec yet. Use when the user names a single existing entity (type or package) and needs a baseline to express a delta. Do not use to backfill the provider surface, to spec ec_deployment as a whole, or to author a brand-new unimplemented entity (use new-entity-requirements).
1 other project uses a version of this.
Adopted by
Most recently taken up by
- elastic/terraform-provider-elasticstacktheir own version, first seen Apr 21, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- elastic/terraform-provider-elasticstack★ 210same name
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 repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- new-entity-requirementsSkill
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-continue-changeSkill
- openspec-exploreSkill
- openspec-implementation-loopSkill
- openspec-new-changeSkill
- openspec-proposeSkill
- openspec-sync-specsSkill
- openspec-verify-changeSkill
- pr-monitoring-loopSkill
- releaseSkill
- requirements-verificationSkill
- schema-coverageSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
Unimplemented behavior: do not write it into openspec/specs/.
- Distinctive: line 29
Use the checklist in reference.md.
- Distinctive: line 45
Never invent a scratch path under the repo for the draft.
- Distinctive: line 57
Every requirement traces to a file/function.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Existing entity requirements
Produce an OpenSpec spec (spec.md) for one existing Terraform resource or data source by reading its implementation. Capture current behavior only. Follow dev-docs/high-level/openspec-requirements.md: ## Purpose, optional ## Schema, ## Requirements with ### Requirement: / #### Scenario:; use SHALL / MUST in requirement bodies.
This skill is on demand: the entity is about to change and has no spec yet, so you need a baseline for the delta. It is not a mandate to spec every resource.
Input
- Entity: the user names one Terraform type (e.g.
ec_deployment_traffic_filter) or one implementation package (e.g.ec/ecresource/trafficfilterresource). If they name more than one entity, or ask to spec “everything”, refuse and ask them to pick a single type that is about to change. - Resolve the type via
Metadata()(request.ProviderTypeName + "_...") and the registry inec/provider.go(Resources()/DataSources()). There is no SDKv2 list.
Hard stops
ec_deploymentas a whole: refuse. Ask which slice is changing (e.g. Integrations Server endpoints → capability iddeployment-integrations-server). See the authoring guide. Locate the package if useful, then stop.- Surface-wide backfill: refuse.
- Unimplemented behavior: do not write it into
openspec/specs/. That isnew-entity-requirements/ an OpenSpec change.
Workflow
- Locate implementation
- Resource:
ec/ecresource/<name>resource/—schema.go(Schema,Metadata,Configure,ImportState,ValidateConfig),create.go/read.go/update.go/delete.go, validators, plan modifiers, and the API↔Terraform mappers (filenames vary; see reference.md §8). - Data source:
ec/ecdatasource/<name>datasource/—Schema,Read,Metadata,Configure. - One Go package may register several Terraform types (
projectresource→ec_elasticsearch_project/ec_observability_project/ec_security_project;privatelinkdatasource→ three endpoint data sources). Spec one type, not the package. - Use the checklist in reference.md.
- Resource:
- Examine the code path (do not open an existing
openspec/specs/<id>/spec.mdyet — drafting from the exemplar makes “consistent with 1.3” tautological):- Schema (attributes, blocks, required/optional/computed, plan modifiers, validators).
- Metadata: type name, import.
- CRUD: which client and API, how
idis set, create/update-then-read, “not found” on read, delete (including association teardown if any). - Client:
internal.ConvertProviderData→Stateful(cloud-sdk-go) vsServerless(ec/internal/gen/serverless/). Unconfigured-client guard (Unconfigured API Client). - Mapping: API → state and plan → payload (names vary:
modelToState/ expanders, orReadDeployment/ReadElasticsearches/ElasticsearchPayload), empty vs null, unknown-in-plan. - Lifecycle:
RequiresReplacevs in-place update. - Type-gated validation (
ValidateConfig) when present. - State upgrade:
schema.SchemaVersion,UpgradeState/ResourceWithUpgradeState. If Version is non-zero and there is no upgrader, that is a known gap (do not invent an upgrader). See reference.md.
- Write policy
- Capability id: kebab-case without the
ec_prefix (e.g.deployment-traffic-filter). One directory per Terraform type. - No canonical spec (
openspec/specs/<id>/missing): writeopenspec/specs/<id>/spec.mdas a current-behavior baseline. Then runmake check-openspec. Tell the user to review accuracy and freeze requirement headings before the follow-up change — OpenSpec deltas match on heading text; unstable names make the delta fail to fold in. - Spec already exists: do not write. Finish the draft from code, then read the canonical spec and report a comparison in the conversation. If they want new/changed behavior, that is an OpenSpec change (
openspec-propose/openspec-new-change), not an overwrite. - Never invent a scratch path under the repo for the draft.
- Capability id: kebab-case without the
- Spec shape (copy the 1.3 exemplars, not a new layout):
- H1 title: Terraform type name in backticks (e.g.
# `ec_deployment_traffic_filter`). - Required line (load-bearing for
requirements-verification):Resource implementation:orData source implementation:followed by the Go package path in backticks. - Purpose: in scope / out of scope in plain language.
- Schema: optional HCL with
<required|optional|optional+computed|computed>, types, brief notes. - Requirements: named
### Requirement:headings. Do not inventREQ-xxxids (the 1.3 exemplars do not use them). Each body MUST contain SHALL or MUST. Each requirement has#### Scenario:Given / When / Then blocks. - Optional Known gaps for current-behavior limitations (non-normative). Keep the
SHALLas what the code does. - Style references (read after drafting, or when this entity has no spec yet):
openspec/specs/deployment-traffic-filter/spec.md(resource),openspec/specs/stack/spec.md(data source).
- H1 title: Terraform type name in backticks (e.g.
- Quality
- Every requirement traces to a file/function. Do not invent behavior.
- Schema and requirements must agree (optional vs required, computed vs configured).
- Agents never run
make testacc/TF_ACC. Acc coverage may be named as a human/Buildkite step (ec/acc/,TestAcc…).
Output format
# `ec_example`
Resource implementation: `ec/ecresource/exampleresource`
## Purpose
...
## Schema
```hcl
...
```
## Requirements
### Requirement: Short name
The resource SHALL ...
#### Scenario: ...
- GIVEN ...
- WHEN ...
- THEN the provider SHALL ...Reference
- Authoring:
dev-docs/high-level/openspec-requirements.md - Resource exemplar (after drafting):
openspec/specs/deployment-traffic-filter/spec.md - Data-source exemplar (after drafting):
openspec/specs/stack/spec.md - Code-path checklist and categories: reference.md
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
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.

